[antlr-interest] More, Status of C++ backend?
Jim Idle
jimi at temporal-wave.com
Wed Jan 2 08:17:09 PST 2008
> -----Original Message-----
> From: Ruslan Zasukhin [mailto:sunshine at public.kherson.ua]
> Sent: Wednesday, January 02, 2008 3:10 AM
> To: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] More, Status of C++ backend?
>
>
> ---------
> And one more thing.
>
> MEMORY POOL
>
> I believe that C/C++ runtimes of ANTLR should be armed by this things
> always. And give to develop this way:
>
> pool -> all AST nodes and may be even our SQL nodes we allocate
from
> it.
> then we trash the whole tree by single call of pool.free_all()
>
> I know that few developers have use this way, and say this improve a
lots
> speed. So why we all need invent a bike?
Please read through the C source as you will find that it already deals
with tokens and nodes and anything that may need to be allocated lots of
times in this manner, allocating a chunk of them at once and parceling
them out when requested. You free everything when your parser is
'finished'.
Jim
More information about the antlr-interest
mailing list