[antlr-interest] feature request: Token.getOffset()

cj_daly cj_daly at yahoo.com
Sat Dec 6 16:05:44 PST 2003

Hi Antlr Maintainers,

For my purposes currently it's more important to have the absolute
offset into the input file for each token than to have the
line/column.  To get what I want I've been calling


before the parse and then calls to getColumn() return the offset I
need.  But this means I never call newline() because that would reset
the column counter and thus I can't have line/column info if I want

I think that it would be nice and easy have it both ways.  We would
just need to add getOffset() and setOffset() to Token and then have
LexerSharedInputState manage an offset counter independently of the
line/column counters.

Does that make sense?  Am I totally missing something here (i.e. is
the offset info I need already available somewhere)?



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

More information about the antlr-interest mailing list