[antlr-interest] Possible bug in ANTLR's lexer

Jose María Chumo Mata jmchuma at gmail.com
Mon Apr 12 04:30:15 PDT 2010


Hello.
I'm using ANTLR v3.2 (the one that comes with ANTLR Works 1.3.1) and I
think I've found a bug in the reset method in Lexer.java. What I've
done is travell the file, call the reset method and travell it again.
The bug I've found is that the line number of the tokens are wrong on
the second iteration. They are equal the the right line number plus
the number of lines in the parsed file. I thought the reset method
would let everything as when the lexer was created, but maybe the
current behaviour is the intended one.
On a (not so) unrelated note, I'm not really sure if the verb travell
can be used as I've used it but English is not my mother tongue so I
apologize the spelling mistakes.
Regards.


More information about the antlr-interest mailing list