[antlr-interest] improve performance for grammar inheritance

Terence Parr parrt at jguru.com
Fri Apr 26 09:41:51 PDT 2002


On Friday, April 26, 2002, at 05:54  AM, Silvain Piree wrote:

> 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.

Sure...send me some changes to 2.7.2a2 and I'll take a look.  Send the 
whole file(s) so I can do the visual diff myself :)

Thanks,
Ter
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org


 

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



More information about the antlr-interest mailing list