[antlr-interest] Newbie, rapidly losing mind

Loring Craymer lgcraymer at yahoo.com
Wed Feb 10 22:24:18 PST 2010


Well, it is possible that there is an analysis bug, but it is more likely that the rule you deleted invoked other rules in a fashion that caused the ambiguity.  There is no such thing as a "non reachable" rule:  any rule could be an entry rule (that is, one invoked from target language code, not necessarily by any other rules in the grammar).

--Loring




----- Original Message ----
> From: "cdellima at paragenic.org" <cdellima at paragenic.org>
> To: antlr-interest at antlr.org
> Sent: Wed, February 10, 2010 8:05:28 PM
> Subject: [antlr-interest] Newbie, rapidly losing mind
> 
> 
> 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.
> 
> 
> 
> 
> 
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: 
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address



      



More information about the antlr-interest mailing list