[antlr-interest] Problem with position of parenthesis term
Johannes Luber
jaluber at gmx.de
Mon Dec 3 13:17:19 PST 2007
Friedhelm wrote:
> Maybe it is my misunderstanding, but I have problems regarding
> parenthese is my logic (please see my grammar below)
>
> I have added rules for handling AND and OR and for expressions in
> parenthesis.
> But now, depending on the positition of the parenthesis term, the lexer
> does not evaluate correctly.
>
> working: AGE>0 AND (AGE<10 OR WEIGHT<500)
> NOT working (AGE<10 OR WEIGHT<500) AND AGE>0
>
>
> What is my mistake? Does anyone have an example with similar logic?
>
> Thanks for any answer,
> Fridi
Try adding
start: expression EOF;
Johannes
More information about the antlr-interest
mailing list