[antlr-interest] Resetting the Lexer and Parser in C-Target

Jim Idle jimi at temporal-wave.com
Tue Jan 5 23:46:03 PST 2010

Yes, the next release [of the C runtime] generates a reuse() method for all components of the sequence and reuses all memory allocations. This is a big performance win if you have many inputs to parse. Also, the next release has a universal input stream that deals with UTFxx (with or without BOM) and EBCDIC. This release is a good few weeks away yet though and is tied to ANTLR v3 using ANTLR v3 for the various recognizers.


> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Gokulakannan Somasundaram
> Sent: Tuesday, January 05, 2010 10:46 PM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] Resetting the Lexer and Parser in C-Target
> Hi,
>     I have a grammar with close to 1000 rules, because of which the
> size of
> the parser in C-Target is close to 8k. I was looking at the parser and
> it
> has a function pointer for each of my rule. This portion is not going
> to
> change for ever. So i was wondering, if there is a way to reset the
> parser
> and re-use it, instead of allocating and initializing it from scratch.
> I am
> trying to form something more specific to my project. In the meanwhile,
> i
> thought of asking, whether there is a easy way to do the same.
> Thanks,
> Gokul.
> 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