[antlr-interest] antlr 2.7.6 - nondeterminism question
Costa Basil
costa_basil at yahoo.ca
Mon Dec 18 01:22:21 PST 2006
Hi:
I am working on big grammar with k=3 and I have a spot where antlr returns the nondeterminism warning. Now, I know that the grammar is right but because of the linear approximate lookahead antlr returns this warning. Is there an option to turn it off? Unfortunately it appears on a alternate block with no empty choices so I cannot use the warnWhenFollowAmbig option.
This is my problem simplified. For k = 2 antlr chokes because of the linear approximation
p1 : alt1 | alt2;
alt1: A B | C D | X Y | U V;
alt2: A V | X D;
This approximate lookahead causes me a lot of frustration. I wish there was a way to turn it off. Every time I make changes and I regenerate the grammar there are obscure warnings popping up from all over the place just because of the way this thing works and it is annoying because I think I got my changes right but antlr says I didn't. Then trying to figure out what's going on is the same as searching a needle in the haystack.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20061218/e02a9c95/attachment.html
More information about the antlr-interest
mailing list