[antlr-interest] Re: Performance Issues

Bill Canfield canfield at computer.org
Fri Oct 28 12:14:53 PDT 2005


Bryan Ewbank wrote:
> An update on my performance issues.  Thanks for all the responses!
> 
> We've found two measurable improvements (C++)
> 

Hi Bryan:

This may not apply to you, but another performance issue is 
TokenStreamSelector::retry().  If you use token streams for things like 
include files, and retry on EOF, the retry() is really an exception in 
disguise.

My strategy was to subclass TokenStreamSelector, and override 
nextToken() to handle EOF more gracefully (also delete the previous stream).

There are some details in a powerpoint I showed at ANTLR 2005; if that's 
not up on the web yet I can edit them into an email for the list for 
those who are interested.

Bill



More information about the antlr-interest mailing list