[antlr-interest] narrowing it down

James Briant jab.antlr at species.org
Wed Mar 31 23:51:41 PDT 2010


A NonLLStarDecisionException was being throw in the DFA constructor, but
then the DecisionProbe was not printing any information because in

public void issueWarnings() {
// NONREGULAR DUE TO RECURSION > 1 ALTS
// Issue this before aborted analysis, which might also occur
// if we take too long to terminate
if ( nonLLStarDecision && !dfa.getAutoBacktrackMode() ) {
ErrorManager.nonLLStarDecision(this);
}

the if clause was ( true && false). so dfa.getAutoBacktrackMode is returning
true. When I nuked that part of the test I got this error message:

error(211): JavaDef.g:378:5: [fatal] rule statement has non-LL(*) decision
due to recursive rule invocations reachable from alts 2,3.  Resolve by
left-factoring or using syntactic predicates or using backtrack=true option.

The DFA that had this problem in the constructor is the one failing later
because the resetStateNumbersToBeContiguous() method was never called.


More information about the antlr-interest mailing list