[antlr-interest] (no subject)

Sam Harwell sam at tunnelvisionlabs.com
Thu Nov 15 07:15:29 PST 2012


ANTLR 4 is not currently optimized for this use case. You might be able to reduce the code size a bit by passing the -Xforce-atn flag when you generate your grammar.

To help with optimizing the generated code, can you provide me with one of the grammars that's causing a problem?

Thank you,
--
Sam Harwell
Owner, Lead Developer
http://tunnelvisionlabs.com

-----Original Message-----
From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-bounces at antlr.org] On Behalf Of Pascal Parrot
Sent: Thursday, November 15, 2012 1:55 AM
To: antlr-interest at antlr.org
Subject: Re: [antlr-interest] (no subject)


Jim,
Yes, I looked a the generated code, but the error is on this line:
protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache(); PredictionContextCache does not appear anywhere else in the file and  _sharedContextCache is a parameter in a function.

Even if there was a huge something there, I wouldn't know what to do with it.

I guess my question is:
Is antlr (java) suited for grammars with large sets of keywords and many parser rules?
If it is, how should the grammar be organized so that the generated code fits within the limits of java in terms of size? Using hashmaps helps in the lexer, but what about in the parser?

Pascal
 		 	   		  

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