[antlr-interest] Antlr 3 and the newline token problem

Martin Probst mail at martin-probst.com
Sat Nov 26 04:12:23 PST 2005


Hi,

> The latter really should be handled by the tool as it can have a serious impact
> on lexer performance if done inefficiently.

Maybe I'm lacking imagination, but in what parsing task do you actually
expect that counting lines/offsets is a significant performance
bottleneck? I really can't imagine anything complex enough to justify
using something like ANTLR but so trivial that line counting might give
significant performance differences.

About the virtual methods: maybe some C++ crack might be able to change
the ANTLR C++ code creation and move lots of the stuff now handled by
virtual functions into some template magic. That would of course ruin
compatibility with old compilers, so probably both modes should be
available.

Martin



More information about the antlr-interest mailing list