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

Micheal J open.zone at virgin.net
Fri Nov 25 18:17:43 PST 2005


> Am Freitag, den 25.11.2005, 20:58 +0000 schrieb Micheal J:
> > Please don't post HTML mail to the list.
> 
> Yeah, please don't do that. You too ;-)

I was being tolerant  ;-)

> I would opt against doing the newline magic behind the scenes 
> automagically. Doing newlines properly is a good exercise to 
> get started with ANTLR, and those who can't get it to work 
> with some documentation have much bigger problems. On the 
> other hand, there are people parsing binary files (line 
> what?), people using Eclipse (that's the offset people ;-)), 
> people who want to provide proper line/column numbers to 
> users. It's easy to do all of these, just some minor Java 
> work. IMHO ANTLR should keep out of that business.

Doing line/col/offset tracking badly can have a serious impact on lexer
performance. I'm already worried about the too many virtual methods we have
currently in v2.

Micheal



More information about the antlr-interest mailing list