[antlr-interest] Error recovery - HELP
jduquevieira
jpdv at medialog.pt
Wed Apr 21 12:39:38 PDT 2004
I have a simple Math gramar.
And it's used in a graphical Math editor.
The editor user has to be able to write incomplete expressions
like "(2+".
And when the user writes this, I have to get an incomplete tree, not
an exception.
Any ideas?
Here goes the gramar.
Best regards.
expression
: equal
;
equal
: sum (EQUAL^ sum)*
;
sum
: subtraction (PLUS^ subtraction)*
;
subtraction
: product (MINUS^ product)*
;
product
: division (TIMES^ division)*
;
division
: number (DIV^ number)*
;
number
: NUMBER
| LEFT_PARENT expression RIGHT_PARENT
;
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list