[antlr-interest] Error nodes created upon syntax error

Johannes Luber jaluber at gmx.de
Mon Dec 3 11:10:55 PST 2007


Terence Parr wrote:
> I don't know the strategy pattern (I don't really pay attention to
> formal pattern names). can you be more specific?

<http://en.wikipedia.org/wiki/Strategy_pattern>. In our context, people
can exchange the error handler easily. The default may be printing error
messages, a new behaviour may allow to check errors programmatically via
exception transfer. Using Strategy gives more flexibility overall at a
very low cost.

>  I'm thinking about simply removing the single token insertion and
> deletion and providing a faq entry that describes how to turn it back on
> 
>> Better worded: How does this change affect the error recovery as
>> described in the book?
> 
> Only where it talks about how it impressed it is with itself. ;)

It should have been "effect" then? Otherwise I don't get your joke.

> It won't really affect anybody.  I'm not convinced that it will actually
> be worse at air recovery.  It will probably actually reduce the number of
> exceptions encountered upon syntax error.

That's good.

Johannes


More information about the antlr-interest mailing list