[antlr-interest] newline in Antlr3
Ilia Kantor
ilia at obnovlenie.ru
Thu Aug 31 15:08:18 PDT 2006
Hmmm indeed.. I just want ANY rule to read all nested brackets, like
{ ..{..}. }
How you'd recommend to implement it ?
> 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
More information about the antlr-interest
mailing list