wasn't seeing thru some preds.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9484]
This commit is contained in:
parent
0bf1aca47f
commit
2243cc2e81
|
@ -752,15 +752,16 @@ public class ParserATNSimulator<Symbol> extends ATNSimulator {
|
|||
// RuleContext ctx = null;
|
||||
// if ( inContext ) ctx = outerContext;
|
||||
|
||||
ATNConfig c = null;
|
||||
if ( parser==null || !collectPredicates ) {
|
||||
c = new ATNConfig(config, pt.target);
|
||||
}
|
||||
else if ( !pt.isCtxDependent || (pt.isCtxDependent&&inContext) ) {
|
||||
ATNConfig c;
|
||||
if ( !pt.isCtxDependent || (pt.isCtxDependent&&inContext) ) {
|
||||
SemanticContext newSemCtx = new SemanticContext.AND(config.semanticContext, pt.getPredicate());
|
||||
c = new ATNConfig(config, pt.target, newSemCtx);
|
||||
}
|
||||
else {
|
||||
c = new ATNConfig(config, pt.target);
|
||||
}
|
||||
|
||||
if ( debug ) System.out.println("config from pred transition="+c);
|
||||
return c;
|
||||
|
||||
// We see through the predicate if:
|
||||
|
|
Loading…
Reference in New Issue