[antlr-interest] Error recovery contortion

Ric Klaren ric.klaren at gmail.com
Tue Dec 7 11:37:47 PST 2004


On Tue, 7 Dec 2004 11:06:29 -0800, Terence Parr <parrt at cs.usfca.edu> wrote:
> Yes, this is reasonable.  We should change:
> 
>                 catch (RecognitionException ex) {
>                         reportError(ex);
>                         consume();
>                         consumeUntil(_tokenSet_0);
>                 }
> 
> to
>                 catch (RecognitionException ex) {
>                         reportError(ex);
>                         recover(ex, _tokenSet_0);
>                 }
> 
> For 2.7.5.  Anybody got a problem with this?  I would be just factoring
> out the code into a method.

No problem I guess, would be simple to implement. Might be an idea to
also move the reportError into recover then, saves some code.

Cheers,

Ric


 
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