[antlr-interest] Re: feature request: Token.getOffset()
lgcraymer
lgc at mail1.jpl.nasa.gov
Mon Dec 8 13:04:21 PST 2003
--- In antlr-interest at yahoogroups.com, Ric Klaren <klaren at c...> wrote:
..
> (/grants loring permission to throw something at him) Hmmm so we can get up
> to a 20% gain in our lexers by kicking out the column stuff ;) ? Or move
> the checking of tabs out of the CharScanner::consume method and handle them
> similarly to newline by explicit calls in the lexer?
The 20% would require heavy optimization of the lexer--right now, ANTLR lexers are grossly inefficient. Handling tab() like newline(),
though, would be a good idea. line/column information is generally useful (it's hard to imagine a production batch translator that didn't
need the line/column error reporting for text processing. Ter's working on doing a few things that should significantly improve ANTLR
lexer performance.
--Loring
> Cheers,
>
> Ric
> --
> -----+++++*****************************************************+++++++++-------
> ---- Ric Klaren ----- j.klaren at u... ----- +31 53 4893722 ----
> -----+++++*****************************************************+++++++++-------
> Words fly like arrows
> as if we knew what was right and wrong. --- Chuang Tsu
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list