[antlr-interest] Antlr v4 - C++ target

A Z asicaddress at gmail.com
Tue Jan 31 10:50:19 PST 2012


Hi Gokulakannan,

  I am also converting to C++ but my goal is primarily performance. I don't
intend to use templates.
  As far as tradeoffs, the commontoken struct has a field for everything so
lookup after lexing is fast but at the cost of memory use. I'm
investigating replacing some of these with member functions that only
calculate values when needed or redirect to a different data structure.


On Thu, Jan 26, 2012 at 11:47 AM, Gokulakannan Somasundaram <
gokul007 at gmail.com> wrote:

> The specific goal is to create a Parser infrastructure for ANTLR 3.4 in
> C++. Nothing more specific than that. Of course replacing function pointers
> was my other aim, as it saves both execution time and memory.
>
> " I see many speed/memory/feature tradeoffs in the lexer design. "
>      Can you be more specific? I am not going to do any new lexer design.
> Just going to translate the one which is already present. Or do you mean
> that by implementing the changes i suggested, i am compromising on
> speed/memory/feature?
>
> Thanks,
> Gokul.
>


More information about the antlr-interest mailing list