No. The “skip” command completely suppresses even the generation of the token. If you want to generate the Token but hide it from the parser, use the following command instead:
COMMENT : ('*'|'!'|'.') (.)*? '\n' -> channel(HIDDEN);
Also, you should be aware that your current rule will not allow a COMMENT to appear at the end of a file which does not contain a final newline character. You might consider the following rule instead:
COMMENT : ('*'|'!'|'.') ~'\n'* -> channel(HIDDEN);
Thank you,
--
Sam Harwell
Owner, Lead Developer
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.