Example usage for Java org.antlr.v4.runtime Token fields, constructors, methods, implement or subclass
The text is from its open source code.
int | INVALID_TYPE |
int | EPSILON During lookahead operations, this "token" signifies we hit rule end ATN state and did not follow it despite needing to. |
int | MIN_USER_TOKEN_TYPE |
int | EOF |
int | DEFAULT_CHANNEL All tokens go to the parser (unless skip() is called in that rule) on a particular "channel". |
int | HIDDEN_CHANNEL Anything on different channel than DEFAULT_CHANNEL is not parsed by parser. |
int | getChannel() Return the channel this token. |
int | getCharPositionInLine() The index of the first character of this token relative to the beginning of the line at which it occurs, 0..n-1 |
CharStream | getInputStream() Gets the CharStream from which this token was derived. |
int | getLine() The line number on which the 1st character of this token was matched, line=1..n |
int | getStartIndex() The starting character index of the token This method is optional; return -1 if not implemented. |
int | getStopIndex() The last character index of the token. |
String | getText() Get the text of the token. |
int | getTokenIndex() An index from 0..n-1 of the token object in the input stream. |
TokenSource | getTokenSource() Gets the TokenSource which created this token. |
int | getType() Get the token type of the token |