| |
|
| org.antlr.runtime.Token
All known Subclasses: org.antlr.runtime.CommonToken, org.antlr.runtime.ClassicToken,
Token | public interface Token (Code) | | |
Field Summary | |
final public static int | DEFAULT_CHANNEL All tokens go to the parser (unless skip() is called in that rule)
on a particular "channel". | final public static int | DOWN | final public static int | EOF | final public static Token | EOF_TOKEN | final public static int | EOR_TOKEN_TYPE | final public static int | HIDDEN_CHANNEL Anything on different channel than DEFAULT_CHANNEL is not parsed
by parser. | final public static Token | INVALID_TOKEN | final public static int | INVALID_TOKEN_TYPE | final public static int | MIN_TOKEN_TYPE | final public static Token | SKIP_TOKEN In an action, a lexer rule can set token to this SKIP_TOKEN and ANTLR
will avoid creating a token for this symbol and try to fetch another. | final public static int | UP |
DEFAULT_CHANNEL | final public static int DEFAULT_CHANNEL(Code) | | All tokens go to the parser (unless skip() is called in that rule)
on a particular "channel". The parser tunes to a particular channel
so that whitespace etc... can go to the parser on a "hidden" channel.
|
DOWN | final public static int DOWN(Code) | | imaginary tree navigation type; traverse "get child" link
|
EOF | final public static int EOF(Code) | | |
EOR_TOKEN_TYPE | final public static int EOR_TOKEN_TYPE(Code) | | |
HIDDEN_CHANNEL | final public static int HIDDEN_CHANNEL(Code) | | Anything on different channel than DEFAULT_CHANNEL is not parsed
by parser.
|
INVALID_TOKEN | final public static Token INVALID_TOKEN(Code) | | |
INVALID_TOKEN_TYPE | final public static int INVALID_TOKEN_TYPE(Code) | | |
MIN_TOKEN_TYPE | final public static int MIN_TOKEN_TYPE(Code) | | |
SKIP_TOKEN | final public static Token SKIP_TOKEN(Code) | | In an action, a lexer rule can set token to this SKIP_TOKEN and ANTLR
will avoid creating a token for this symbol and try to fetch another.
|
UP | final public static int UP(Code) | | imaginary tree navigation type; finish with a child list
|
getChannel | abstract public int getChannel()(Code) | | |
getCharPositionInLine | abstract public int getCharPositionInLine()(Code) | | The index of the first character relative to the beginning of the line 0..n-1
|
getLine | abstract public int getLine()(Code) | | The line number on which this token was matched; line=1..n
|
getText | abstract public String getText()(Code) | | Get the text of the token
|
getTokenIndex | abstract public int getTokenIndex()(Code) | | An index from 0..n-1 of the token object in the input stream.
This must be valid in order to use the ANTLRWorks debugger.
|
getType | abstract public int getType()(Code) | | |
setChannel | abstract public void setChannel(int channel)(Code) | | |
setCharPositionInLine | abstract public void setCharPositionInLine(int pos)(Code) | | |
setLine | abstract public void setLine(int line)(Code) | | |
setTokenIndex | abstract public void setTokenIndex(int index)(Code) | | |
setType | abstract public void setType(int ttype)(Code) | | |
|
|
|