Search code examples
antlr3

What happened to ANTLR3.1's HIDDEN Channel in ANTLR3.5?


An 3.1.1 grammar of ours contains (with target language C#) this snippet:

WHITESPACE 
  : ( '\t' | ' ' | '\r' | '\n'| '\u000C' )+     { $channel = HIDDEN; } 
  ;

When compiling, this now leads to a compile-time error. The Antlr3.Runtime of ANTLR3.5.2 is, of course, referenced in the project.

Can anyone tell me what changed here from 3.1.1 to 3.5.2? Thanks!


Solution

  • It changed along the way to conform with C#'s naming conventions into Hidden:

    { $channel = Hidden; }