protected List<Token> filterForChannel(int from, int to, int channel) {
		List<Token> hidden = new ArrayList<Token>();
		for (int i=from; i<=to; i++) {
			Token t = tokens.get(i);
			if ( channel==-1 ) {
				if ( t.getChannel()!= Lexer.DEFAULT_TOKEN_CHANNEL ) hidden.add(t);
			}
			else {
				if ( t.getChannel()==channel ) hidden.add(t);
			}
		}
		if ( hidden.size()==0 ) return null;
		return hidden;
	}
Collect all hidden tokens (any off-default channel) to the left of
 the current token up until we see a token on DEFAULT_TOKEN_CHANNEL.
runtime/Java/src/org/antlr/v4/runtime/BufferedTokenStream.java