[antlr-interest] Dealing with issues in non-greedy (.)* rules
Marc-André Laverdière
ma_laver at ciise.concordia.ca
Wed Jun 13 11:07:31 PDT 2007
I'm not sure I understand what to do... what's a final lexer rule?
Gavin Lambert wrote:
> 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.
--
Marc-André LAVERDIÈRE, B. Eng., M. A. Sc. (in progress)
Computer Security Laboratory - Laboratoire de sécurité informatique
CIISE, Université Concordia University, Montréal, Québec, Canada
www.ciise.concordia.ca
/"\
\ / ASCII Ribbon Campaign
X against HTML e-mail
/ \
"Perseverance must finish its work so that you may be mature and
complete, not lacking anything." -James 1:4
More information about the antlr-interest
mailing list