[antlr-interest] Newbie, rapidly losing mind

John B. Brodie jbb at acm.org
Wed Feb 10 20:15:16 PST 2010


Greetings!

On Wed, 2010-02-10 at 23:05 -0500, cdellima at paragenic.org wrote:
> Hi, I am relatively new to ANTLR but I have to make a custom-built grammar
> file for the Java language. I am having trouble with a rule for which I
> get a
> 
> rule arrayInstantiation has non-LL(*) decision due to recursive rule
> invocations reachable from alts 1,2.  Resolve by left-factoring or using
> syntactic predicates or using backtrack=true option.
> 
> To identify the cause of the trouble, I am taking the approach of removing
> things from my grammar until the thing compiles again. Problem is, I've
> got it to compile but I've removed a rule that wasn't actually invoked in
> another rule. I do not understand this. Should I be surprised? If I
> comment this rule out, my grammar builds. But if I leave the rule (that
> isn't invoked anywhere and should be impossible to reach) uncommented then
> my build fails.
> 

Seems very odd.

Please post the *SMALLEST* sample grammar that contains your problem so
that we can try to analyze the cause.




More information about the antlr-interest mailing list