[antlr-interest] token position defined by lexer
Michiel Vermandel
Michiel_Vermandel at axi.be
Tue Jun 13 02:27:24 PDT 2006
Hi,
In my lexer I have the following rule:
QUOTED_STRING
:
'\''! ( WS | "\'\'" | ~('\'') )* '\''!
;
So the lexer does not return the quotes, just the string text.
I do get the AST tree without the quotes but the column position of the
string is a bit strange, I think.
If I have the following text:
Hello 'world'
then I get the lexer token world at column 7 instead of 8.
So the quote gets removed but the column position of the token is not
shifted by 1.
Is there some way to work around this?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060613/c66be6cc/attachment.html
More information about the antlr-interest
mailing list