[antlr-interest] Dropping keywords in lexer
Terence Parr
parrt at cs.usfca.edu
Wed Sep 13 19:02:41 PDT 2006
try action {skip();}
Ter
On Sep 13, 2006, at 4:40 PM, Sean Walton wrote:
> I am trying to drop the keyword '__extension__' found in gcc. This
> is essentially a "do-nothing" keyword and it is getting in the way
> of some of my parsing. Is there a way to create a Lexer rule that
> will absorb the token and toss it? I tried:
> TOSSERS
> : '__extension__' {channel=99;}
> ;
> But, I get an "unreachable definition" error.
> Ideas?
> -Sean Walton
More information about the antlr-interest
mailing list