[antlr-interest] Switching lexers and skipping tokens
Paul J. Lucas
dude at darkfigure.org
Thu Jun 26 20:24:41 PDT 2003
If I have a lexer rule:
PRAGMA_START
: "(::" {
// Push a new Lexer onto the token
// stream selector.
$setType( Token.SKIP );
}
;
What I want is to switch to using a different lexer, but I also
want the "(::" token to be skipped, i.e., be invisible to the
parser just like a comment would be.
But when I do the above, it never seems to actually switch to
using the new lexer since it is matching rules in the main
lexer.
Any ideas why it's not switching? Does the Token.SKIP make a
difference? How can I do what I want?
- Paul
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list