[antlr-interest] misunderstanding channel HIDDEN
    Ian Eyberg 
    ian at telematter.com
       
    Wed Aug 26 11:13:49 PDT 2009
    
    
  
Hi,
  I think I'm misunderstanding the usage of $channel = HIDDEN
or skip().
I have text that looks like:
  'b^@l^@a^@h^@'
(most of the time the text is simply 'blah')
and then it should come out like this:
  'blah'
my relevant rules are:
  startrule : BLAH;
  BLAH    : 'blah';
  UCODE   : '\u0000'{ $channel = HIDDEN; };
I'm reading in through antlrinputstream as "UTF8" as I do
want to support multi-byte chars and I have rules to help
that such as:
UNICODE : ('\u00a0'..'\uffff');
What am I doing wrong here?
Thanks,
Ian
    
    
More information about the antlr-interest
mailing list