[antlr-interest] Dealing with issues in non-greedy (.)* rules
Gavin Lambert
antlr at mirality.co.nz
Tue Jun 12 13:37:02 PDT 2007
At 04:31 13/06/2007, Terence Parr wrote:
>.+ works fine in the lexer and probably parser. Consumes
>until it sees what follows.
Yeah, but there is a difference. In the lexer it consumes
characters, whereas in the parser it consumes tokens. So when
trying to match characters that aren't otherwise assigned a token
you need to use it in the final lexer rule.
More information about the antlr-interest
mailing list