[antlr-interest] Error in AST

Andrew Haley aph at redhat.com
Wed May 26 03:21:46 PDT 2010


On 05/26/2010 11:18 AM, Nourchn Nor wrote:
> I wrote one grammar on AntlrWorks but one error is shown when I add same
> statement,
> Here is the error: "error(211): Essai.g:87:16: [fatal] rule predicate has
> non-LL(*) decision due to recursive rule invocations reachable from alts
> 5,6.  Resolve by left-factoring or using syntactic predicates or using
> backtrack=true option"
> And if I have correct by backtrack=true, the AST of every rule in the syntax
> Diagram of Antlworks is consisted by { synpred1_Essai }? With Essai is the
> name of grammar.
> This is an error this  { synpred1_Essai }?  ? what can I  have to correct
> him?
> please help me

Have you read the book?  It explains LL(*) in detail, and what you have to
do to deal with things like this.

http://www.pragprog.com/titles/tpantlr/the-definitive-antlr-reference

Andrew.


More information about the antlr-interest mailing list