[antlr-interest] Error recovery

jduquevieira jpdv at medialog.pt
Tue Apr 6 13:49:23 PDT 2004


Hello.

I have a math editor that uses ANTLR as the parser.
Now I have problems recovering from errors.

For instance, if the user writes:
    "2+"

The parser can't handle it, because it expects another number after 
the sum operator:
    "2+<number>"

I've tried to handle it with exceptions and got no good results.
Besides, by using exceptions the parser gets too slow.

I've also tried to write every possibility in every rule, but I get 
a lot of ambiguities.

Does anyone know how to do this?
Any ideas?

Thanks in advance.
Best regards.



 
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