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

Thomas Dudziak tomdz at first.gmd.de
Mon Dec 8 06:22:34 PST 2003


I for one use something like that for parsing files. This allows for a
two-pass parsing scheme that skips contents of functions or similar 
etc. in the first pass but stores information about the whereabouts at the
nodes so that the second pass can start right there when the contents of a
function are required.
Putting it into the parser was quite some work (especially in combination
with input streams that translate some other encoding to unicode) and is
probably not pretty reusable (not even extractable ...).

So I could use such a feature from time to time, say by specifying an 
option in the grammar header.
And I guess line and column info is not so useful when parsing binary
files so making them optional (but on per default) could be useful.

Tom



 

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




More information about the antlr-interest mailing list