[antlr-interest] Discarding characters in lexer

Gavin Lambert antlr at mirality.co.nz
Thu Mar 27 12:39:43 PDT 2008


At 08:24 28/03/2008, Darien Hager wrote:
>I wonder... Can you use the $channel=HIDDEN feature with fragment 
>lexer rules to achieve this effect?

No, you can't.  $channel only affects tokens generated by that 
rule, and fragment rules never generate a token.

You can't use $setText from a fragment rule either, for the same 
reason.



More information about the antlr-interest mailing list