wasn't seeing thru some preds.

[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9484]
This commit is contained in:
parrt 2011-11-29 17:31:18 -08:00
parent 0bf1aca47f
commit 2243cc2e81
1 changed files with 6 additions and 5 deletions

View File

@ -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: