[antlr-interest] Using extra channels
sharwell at pixelminegames.com
Mon Mar 23 11:34:57 PDT 2009
Yes, you can. If you want to work with those tokens, just pass your
channel number to the CommonTokenStream constructor.
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Sam
Sent: Monday, March 23, 2009 1:30 PM
To: ANTLR Interest Mailing List
Subject: [antlr-interest] Using extra channels
We all (generally) use the default and hidden channels. What if I wanted
there to be another channel which, usually, doesn't get used, but if I
want to tune to it as well I won't get the actual whitespace? Say for
tokens that you mostly won't be interested in, but may want to
programmatically choose to be interested in.
Can I literally just define a new constant, MYCHANNEL, that's an int not
of the same value as HIDDEN or whatever the default one is called, and
use it as I would either of those?
More information about the antlr-interest