[antlr-interest] Getting correct line information

braden_mcdaniel braden at endoframe.com
Wed Feb 13 07:37:40 PST 2002

I'm using a C++ ANTLR parser with a hand-written scanner that derives
from TokenStream.  It basically works, but the line information in the
error messages is wrong (generally I get some huge number that looks
like an uninitialized value).

Looking around in the ANTLR library source, it looks like I probably
want to derive from CharScanner rather than TokenStream in order to
make the line information work. I'm hoping someone can give me a
clearer roadmap to follow, though. Assuming I'm on the right track,
what methods do I need to override to get sane results? Any other
special steps I need to take? Thanks...



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

More information about the antlr-interest mailing list