[antlr-interest] Line terminator.
Cesar Octavio López Nataren
cesar at ciencias.unam.mx
Thu Apr 10 01:15:22 PDT 2003
Hello, in my grammar the simbols: \u000A, \u000D, \u2028, \2029 are called
Line terminator.
Now my problem is:
There are some small cases where I don't want to ignore that a line
terminator appears.
Here is an example:
ContinueStatement: continue [no LineTerminator here] Identifier_opt;
By now, I had been ignoring these "corner cases" by just ignoring on the
lexer those symbols with the very well known Token.SKIP but now I need more
control.
what do you suggest?
Erasing the Token.SKIP from the lineTerminators lexing rules, and modifying
all my parser rules to take care of lineTerminators? (looks like lot's of
work for me).
is possible a some kind of "lexical" predicates to make a solution for it?
or?
Cheers
césar
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list