HI,all:
the grammar is list below:
----------------------------------------------
logicExp
: FIELDNAME ( '>' | '<' ) (CONST_INT | CONST_STRING)
| '(' logicExp')'
;
fragment DIGIT : '0'..'9';
fragment LOWER : 'a'..'z';
fragment UPPER : 'A'..'Z';
FIELDNAME : LOWER (LOWER|DIGIT)* ;
CONST_INT : DIGIT+;
CONST_STRING : '"' (LOWER|UPPER|DIGIT)* '"';
----------------------------------------
When I use the antlrworks to test the grammar,I use the input "( a>3 )",but
the interepter failed to recoginze the last ")", output as follows:
logicExp
/ \
/ \
( logicExp
/\ \
/ \ \
a > 3
As you see, the last ')' is missed.
So what's wrong with my grammar?
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.