was not computing lookahead correctly in _LOOK. It assumed all epsilons were predicates.

This commit is contained in:
Terence Parr 2012-03-19 17:50:51 -07:00
parent ea7037dd2d
commit 2232ea5101
1 changed files with 28 additions and 23 deletions

View File

@ -120,7 +120,12 @@ public class LL1Analyzer {
new RuleContext(ctx, s.stateNumber);
_LOOK(t.target, newContext, look, lookBusy, seeThruPreds);
}
else if ( t.isEpsilon() && seeThruPreds ) {
else if ( t instanceof PredicateTransition ) {
if ( seeThruPreds ) {
_LOOK(t.target, ctx, look, lookBusy, seeThruPreds);
}
}
else if ( t.isEpsilon() ) {
_LOOK(t.target, ctx, look, lookBusy, seeThruPreds);
}
else if ( t.getClass() == WildcardTransition.class ) {