[antlr-interest] How to reuse lexer object and parser object

Ronghui Yu stoneyrh at gmail.com
Thu Oct 9 00:30:39 PDT 2008


Yes, this is the easiest way to make it work.
It is not I who designed the architecture. But I think the reason may be the
performance, the parser object contains over 1000 fields needed to be set,
it may be much faster to reuse it by resetting some fields of it.

On Thu, Oct 9, 2008 at 3:12 PM, Gavin Lambert <antlr at mirality.co.nz> wrote:

> At 19:59 9/10/2008, Ronghui Yu wrote:
>
>> As I mentioned before, I use the same lexer and parser object for parsing
>> different SQL statements.
>>
>
> Is there some particular reason why you don't want to construct a new
> instance?
>
>


-- 
===========================
Regards
Ronghui Yu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20081009/bc5e9a86/attachment.html 


More information about the antlr-interest mailing list