[antlr-interest] Tracking absolute Lexer Position

Thomas Dudziak tomdz at cs.tu-berlin.de
Thu Jan 30 05:27:11 PST 2003


Have you tried using a special input Reader (java) or fstream (C++)? When
I need absolute (byte) file position, then I simply count the read bytes in the
stream and expose this information to a special token stream which can
store this in the generated tokens if necessary. This way you shouldn't
have problems with lookahead and similar.

Tom



 

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



More information about the antlr-interest mailing list