[antlr-interest] A proposal for keywords

Martin Probst mail at martin-probst.com
Wed May 24 15:37:18 PDT 2006


I would recommend not changing the text of a token anyways, but rather
having a field "parsed text", or "modified text", or whatever.

Rationale is that you want to have the original token text for error
reporting, plus it's not actually expensive to have the string around
(it's not a copy, it's just offsets into the original string). So I'd
create a method called getModifiedText() that defaults to return the
original text (if modified text is null).


More information about the antlr-interest mailing list