public interface Token
| Modifier and Type | Field and Description |
|---|---|
static int |
COMMENT
Token is a comment.
|
static int |
ERROR
Token is of unknown type.
|
static int |
IDENTIFIER
Token is an identifier (e.g.
|
static int |
LABEL
Token is an label identifier.
|
static int |
LITERAL
Token is a literal (e.g.
|
static int |
OPERATOR
Token is a operator (e.g.
|
static int |
PREPROCESSOR
Token is a preprocessor keyword.
|
static int |
REGISTER
Token is a CPU register.
|
static int |
RESERVED
Token is a reserved word.
|
static int |
SEPARATOR
Token is a separator (e.g.
|
static int |
TEOF
Token represents end-of-file.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getColumn()
Get 0-based starting column of token position.
|
String |
getErrorString()
Get error string for this token.
|
int |
getID()
Get token ID.
|
int |
getLength()
Get length of the token.
|
int |
getLine()
Get 0-based starting line (row) of token position.
|
int |
getOffset()
Get 0-based starting offset of token position.
|
String |
getText()
Get token value.
|
int |
getType()
Get token type.
|
boolean |
isInitialLexicalState()
Check if the token is in initial lexical state.
|
static final int RESERVED
static final int PREPROCESSOR
static final int REGISTER
static final int SEPARATOR
static final int OPERATOR
static final int COMMENT
static final int LITERAL
static final int IDENTIFIER
static final int LABEL
static final int ERROR
static final int TEOF
int getID()
int getType()
RESERVED,
PREPROCESSOR, etc.).int getLine()
int getColumn()
int getOffset()
int getLength()
String getErrorString()
String getText()
boolean isInitialLexicalState()
Copyright © 2017. All rights reserved.