public class CommonTokenStream extends BufferedTokenStream
BufferedTokenStream superclass
  is that this stream knows how to ignore off channel tokens. There may be
  a performance advantage to using the superclass if you don't pass
  whitespace and comments etc. to the parser on a hidden channel (i.e.,
  you set $channel instead of calling skip() in lexer rules.)UnbufferedTokenStream, 
BufferedTokenStream| Modifier and Type | Field and Description | 
|---|---|
protected int | 
channel
Skip tokens on any channel but this one; this is how we skip whitespace... 
 | 
fetchedEOF, p, tokens, tokenSourceEOF, UNKNOWN_SOURCE_NAME| Constructor and Description | 
|---|
CommonTokenStream(TokenSource tokenSource)  | 
CommonTokenStream(TokenSource tokenSource,
                 int channel)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected int | 
adjustSeekIndex(int i)
Allowed derived classes to modify the behavior of operations which change
 the current stream position by adjusting the target token index of a seek
 operation. 
 | 
int | 
getNumberOfOnChannelTokens()
Count EOF just once. 
 | 
protected Token | 
LB(int k)  | 
Token | 
LT(int k)
 | 
consume, fetch, fill, filterForChannel, get, get, getHiddenTokensToLeft, getHiddenTokensToLeft, getHiddenTokensToRight, getHiddenTokensToRight, getSourceName, getText, getText, getText, getText, getTokens, getTokens, getTokens, getTokens, getTokenSource, index, LA, lazyInit, mark, nextTokenOnChannel, previousTokenOnChannel, release, reset, seek, setTokenSource, setup, size, syncprotected int channel
public CommonTokenStream(TokenSource tokenSource)
public CommonTokenStream(TokenSource tokenSource, int channel)
protected int adjustSeekIndex(int i)
BufferedTokenStreami. If an
 exception is thrown in this method, the current stream index should not be
 changed.
 
 For example, CommonTokenStream overrides this method to ensure that
 the seek target is always an on-channel token.adjustSeekIndex in class BufferedTokenStreami - The target token index.protected Token LB(int k)
LB in class BufferedTokenStreampublic Token LT(int k)
TokenStreamToken instance associated with the value returned by
 LA(k). This method has the same pre- and post-conditions as
 IntStream.LA(int). In addition, when the preconditions of this method
 are met, the return value is non-null and the value of
 LT(k).getType()==LA(k).LT in interface TokenStreamLT in class BufferedTokenStreamIntStream.LA(int)public int getNumberOfOnChannelTokens()
Copyright © 1992-2013 ANTLR. All Rights Reserved.