[antlr-interest] Using extra channels
Sam Harwell
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.
Sam
-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Sam
Barnett-Cormack
Sent: Monday, March 23, 2009 1:30 PM
To: ANTLR Interest Mailing List
Subject: [antlr-interest] Using extra channels
Hi all,
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?
Sam
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
More information about the antlr-interest
mailing list