Hi,
I've been using antlr for a few months in order to parse logical
formulae, with the C target.
I have a rule in a parser such as
subformula:
atom
| term (x='and' term)+ -> ^($x term+)
| term ('or' term)+ -> ^('or' term+)
| term
;
As far as i have understood, antlr generates a syntactic predicate in
order to distinguish between the 'and' and 'or' alternatives.
In the case as presented above, the code of such a predicate is
incorrect, as it begins with :
pANTLR3_COMMON_TOKEN ;
= NULL ;
It looks like the name x is omitted in this declaration, though it
appears later in the code.
I don't actually need to name the token 'and', and deleting x fixes the
problem.
Expliciting the syntactic predicate seems to fix it as well.
I also noted that the bug does not appear without the +.
Hope this may help improving this great tool:-)
--
Max
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.