[antlr-interest] newline in Antlr3

Kay Roepke kroepke at classdump.org
Thu Aug 31 14:32:29 PDT 2006


Hi!

On 31. Aug 2006, at 22:58 Uhr, Ilia Kantor wrote:

> But somehow lexer misses line number... And newline() call from  
> Antlr2 is not
> working.

It seems that your ANY rule just chews through until EOF. That's why  
the it's only counting four lines.
It also appears that you have a leading newline in your test file.

newline() doesn't exist anymore, ANTLR now does automatic line  
counting on \n.

HTH,

Kay
-- 
Kay Röpke <kroepke at classdump.org>
classdump Software
Key fingerprint = A849 0F2C C322 4022 379E  8661 7E1B FE0D 4CD2 A6D0





More information about the antlr-interest mailing list