[antlr-interest] Re: strong error recovery

Monty Zukowski monty at codetransform.com
Mon Aug 2 09:33:00 PDT 2004


On Aug 2, 2004, at 4:46 AM, Neurosurg wrote:

> 5+5+
>
> is just skipped, i.e. nothing extracted.

Indeed.  ANTLR knows that the plus is supposed to be part of an 
expression and when nothing good follows it it throws an exception 
(check the generated code).  Perhaps you should define an exception 
handler in your expression rule that catches the exception and swallows 
it so that the good part of the expression is preserved.

This is certainly a task that ANTLR is not designed for.

Monty



 
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