Example usage for Java org.antlr.v4.runtime CommonTokenStream fields, constructors, methods, implement or subclass
The text is from its open source code.
CommonTokenStream(TokenSource tokenSource) Constructs a new CommonTokenStream using the specified token source and the default token channel ( Token#DEFAULT_CHANNEL ). | |
CommonTokenStream(TokenSource tokenSource, int channel) Constructs a new CommonTokenStream using the specified token source and filtering tokens to the specified channel. |
void | consume() |
void | fill() Get all tokens from lexer until EOF |
Token | get(int i) |
List | getHiddenTokensToLeft(int tokenIndex) 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. |
String | getText(Interval interval) |
String | getText() Get the text of all tokens in this buffer. |
List | getTokens() |
TokenSource | getTokenSource() |
int | index() |
int | LA(int i) |
Token | LT(int k) |
void | reset() This method resets the token stream back to the first token in the buffer. |
void | seek(int index) |
void | setTokenSource(TokenSource tokenSource) Reset this token stream by setting its token source. |
int | size() |