[antlr-interest] newbie problem
ali azimi
aliaazimi at yahoo.com
Wed Jul 4 17:22:12 PDT 2007
Dear all,
When I try to generate code from my grammar I get the following errors. Where can I get more information about left-recursive problems? And how can I remedy them?
[00:15:36] Aborting because the following rules are mutually left-recursive:
[elementextract, infixexpression, expression, fieldextract]
[fieldmodify, elementmodify, variable] ;
variable:fieldmodify|elementmodify|variableidentifier
;
The followings are the part of grammar which I think, have problems.
elementmodify
:variable'('expression(','expression)*')'
;
fieldmodify
:variable'!'fieldname
;
expression
:literalidentifier|synonymidentifier|variableidentifier|fieldextract|elementextract|infixexpression|parenthesisexpression|operatorapplication|
valuemake|imperativeoperator|conditionalexpression|forallname|spellingexpression
;
infixexpression
:expression dyadicoperator expression
|monadicoperator expression
;
elementextract
:expression '('expression (',' expression)*')'
;
fieldextract
:expression '!'fieldname
;
Thank you very much in advance,
Al
---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070704/c773abed/attachment-0001.html
More information about the antlr-interest
mailing list