[antlr-interest] advocacy of C++ support in ANTLR 3.x

Jim Idle jimi at temporal-wave.com
Sun Mar 30 16:29:11 PDT 2008



> -----Original Message-----
> From: Ruslan Zasukhin [mailto:sunshine at public.kherson.ua]
> Sent: Friday, March 28, 2008 4:20 AM
> To: Jim Idle; Tomas Potrusil
> Cc: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] advocacy of C++ support in ANTLR 3.x
> 
> On 3/28/08 11:52 AM, "Jim Idle" <jimi at temporal-wave.com> wrote:
> 
> Hi Jim,
> 
> > Tomas Potrusil wrote:
> >
> > I should add that if you really need to build C++ strings from the
> token, then
> > you should  probably not use the .text attribute of the token. That
> is really
> > just a convenience method. Write yourself a class with a constructor
> that
> > accepts a token as input and constructs the C++ string directly. That
> is all
> > that the C runtime does internally and there is no need to incur the
> overhead
> > of getting the C runtime to produce the token text, when you can take
> it
> > directly from the input stream.
> 
> Why not add such C++ class into ANTLR 3.1 = 3.1for C target ?
> 
> So each C++ user will not reinvent a bike.

I did say that I would do this, but there are still a few other things to do yet ;-)

Jim
 






More information about the antlr-interest mailing list