[antlr-interest] improve performance for grammar inheritance

Silvain Piree s.piree at enneya.com
Fri Apr 26 05:54:44 PDT 2002


Hi,

I'm using grammar inheritance and experienced performance 
problems.

After some inspection of the ANTLR source code I found that
my performance problems related to the fact that an intermediate
grammar was created for the combined grammars.

This combining of grammars was very slow because the toString()
methods in GrammarFile and Grammar didn't use StringBuffer
but used String.

When using StringBuffer the performance increased significantly.
If anyone is interested I can send the changed source files.

Note: this remark not only applies to GrammarFile and Grammar
but also to other classes (like Rule) that use String. 

Silvain



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list