[antlr-interest] Tokens that span across char streams
David-Sarah Hopwood
david-sarah at jacaranda.org
Wed Aug 26 17:31:46 PDT 2009
Stanislav Sokorac wrote:
> Who keeps track of line numbers and character positions? The char stream, or
> the lexer?
The char stream. It's actually fairly straightforward to override in your
own subclass -- look at the source code for the consume method of
ANTLRStringStream, for example:
<http://www.antlr.org/api/Java/_a_n_t_l_r_string_stream_8java-source.html#l00097>.
--
David-Sarah Hopwood ⚥ http://davidsarah.livejournal.com
More information about the antlr-interest
mailing list