[antlr-interest] Why does antlr not know alternative?

John B. Brodie jbb at acm.org
Tue Jan 10 14:16:43 PST 2012


On 01/10/2012 04:39 PM, James Ladd wrote:
> >> All of the above is just speculation since you did not supply a 
> grammar
> > that i could actually run
>
> Huh - the grammar is a cut-n-paste from ANTLRWorks where I use the 
> built in
> interpreter to run it. Is there another format that you want it in?

I do not use ANTLRWorks. Last time I tried using its interpreter (and it 
was a *really* long time ago) the interpreter produced different results 
than the parser generated by the org.antlr.Tool

maybe this has been fixed...

all of your actions call methods that are not available to me and so I 
am unable to run the grammar through the org.antlr.Tool, compile it and 
then run it.

>
> Also - I appreciate the detailed response on why the grammar has 
> issues, however
> I'm not sure how to fix them, please can you suggest?
>
> Rgs, James.
>

it would be best to post the smallest - yet complete - grammar that 
illustrates your problem(s).



More information about the antlr-interest mailing list