This token stream provides access to all tokens by index or when calling methods like BufferedTokenStream.GetText() . The channel filtering is only used for code accessing tokens via the lookahead methods BufferedTokenStream.La(int) , Lt(int) , and Lb(int) .
By default, tokens are placed on the default channel ( TokenConstants.DefaultChannel ), but may be reassigned by using the ->channel(HIDDEN)
lexer command, or by using an embedded action to call Lexer.Channel .
Note: lexer rules which use the ->skip
lexer command or call Lexer.Skip() do not produce tokens at all, so input text matched by such a rule will not be available as part of the token stream, regardless of channel.