[antlr-interest] Re: Help me please to correct error

micheal_jor open.zone at virgin.net
Mon Nov 18 11:45:52 PST 2002


> While I have warning for the grammar?
> How shall I change it ? 
> Can I get correct grammar without changing 
> parentheses positions ?
> 
> test :
>   (   A B 
>     | C D 
>   )
>   | ( A D )
>   ;
> 
> warning: nondeterminism upon
>     k==1:A
>     k==2:D
>     k==3:EOF

This is due to the approximate-LL(k) lookahead issue in ANTLR2 if 
memory serves. 

http://www.jguru.com/faq/view.jsp?EID=264825

http://www.jguru.com/faq/view.jsp?EID=64316

My advise?, check the relevant part of the generated code manually to 
ensure it is indeed doing what you want (and changing it if it 
isn't). That's one of the strengths of ANTLR, the generated code is 
human-readable....

Micheal



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list