[antlr-interest] Big grammar => static initializer/method size is exceeding the 65535 bytes limit

Jim Idle jimi at temporal-wave.com
Wed Nov 4 08:01:45 PST 2009


See previous post about -X options. But it if you do not want to improve parser organization then it is much better to split the grammar up in to a number of 'import' grammars, which will reduce individual class size. You do not want to apply scripts to generated code really :-(

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Andreas Meyer
> Sent: Wednesday, November 04, 2009 5:32 AM
> To: Antlr interest
> Subject: Re: [antlr-interest] Big grammar => static initializer/method
> size is exceeding the 65535 bytes limit
> 
> Back in the days when we tried to migrate our ANTLR2 grammar to ANTLR3,
> we also experienced this problem, due to lots of static initializer
> code
> in the _parser_ class. Our solution was to apply some perl-skript
> magic,
> but if Alex Marin now proposes a built-in solution, that is only good
> for ANTLR.
> 
> Andreas
> 
> Jim Idle schrieb:
> > I think that the issue is more likely something to do with your lexer
> specification. You should not need to worry about having lots of
> keywords, so one of the other rules must be causing the huge expansion.
> For instance I have problems with the complete lexer for TSQL, which
> has more keywords than you can shake a stick at.
> >
> > Did you ever post your complete lexer spec? I was out of the country
> when you first started this thread.
> >
> > Jim
> >
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address





More information about the antlr-interest mailing list