[antlr-interest] [SPAM] non-LL(*) error with nested arrays

Olivier Lefevre lefevrol at yahoo.com
Thu Jun 24 18:00:27 PDT 2010


Greetings ANTLR experts,

I have the attached toy grammar for integer arrays of arbitrary
depth but the stat rule has non-LL(*) decision due to recursive
rule invocation. It is recommended to left-factor or to use a
syntactic predicate; in principle I know what both are (I just
reread the applicable sections in the book) but it's been a while
since I last used ANTLR and in this case, with the added twist of
recursion, I still don't get it. Can someone offer a hint?

Thanks,

-- O.L.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ArrayTest.g
Url: http://www.antlr.org/pipermail/antlr-interest/attachments/20100625/0ead34cf/attachment.pl 


More information about the antlr-interest mailing list