[antlr-interest] Problems with memory consumption when generating parsers

Jim Idle jimi at temporal-wave.com
Sun Dec 13 10:11:29 PST 2009


The analysis can take a lot of memory and you may just need more stack space, but it could also be your grammar construction. Lexers especially can use a lot of memory to analyse, especially if you specify huge sets of 'valid' characters'. I'll look at it if you send it to me.

jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Marcin Rzeznicki
> Sent: Sunday, December 13, 2009 8:26 AM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] Problems with memory consumption when
> generating parsers
> 
> Hi to all,
> I am experiencing some problems with excessive memory usage when
> generating my parser. I allocated 128MB of heap memory to ANTLRWorks
> and it cannot complete generation of parser for Java-like expressions.
> I suspect this is rater bad sign but I am not sure whether I need, at
> this point, to just allocate more memory and get over the issue or
> start worrying. How do you think? Also, how can I check out which
> parts of the grammar cause this? Are there any techniques which you
> can recommend? I could post the grammar but I think it is too big for
> the mailing list - but if someone would like to take a look then I'll
> surely post it.
> --
> Greetings
> Marcin Rzeźnicki
> 
> 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