|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.anarres.cpp.Token
public final class Token
A Preprocessor token.
Preprocessor
Field Summary | |
---|---|
static int |
_TOKENS
The number of possible semantic token types. |
static int |
AND_EQ
The token type AND_EQ. |
static int |
ARROW
The token type ARROW. |
static int |
CCOMMENT
The token type CCOMMENT. |
static int |
CHARACTER
The token type CHARACTER. |
static int |
CPPCOMMENT
The token type CPPCOMMENT. |
static int |
DEC
The token type DEC. |
static int |
DIV_EQ
The token type DIV_EQ. |
static int |
ELLIPSIS
The token type ELLIPSIS. |
static int |
EOF
The token type EOF. |
static int |
EQ
The token type EQ. |
static int |
GE
The token type GE. |
static int |
HASH
The token type HASH. |
static int |
HEADER
The token type HEADER. |
static int |
IDENTIFIER
The token type IDENTIFIER. |
static int |
INC
The token type INC. |
static int |
INTEGER
The token type INTEGER. |
static int |
INVALID
The token type INVALID. |
static int |
LAND
The token type LAND. |
static int |
LAND_EQ
The token type LAND_EQ. |
static int |
LE
The token type LE. |
static int |
LITERAL
The token type LITERAL. |
static int |
LOR
The token type LOR. |
static int |
LOR_EQ
The token type LOR_EQ. |
static int |
LSH
The token type LSH. |
static int |
LSH_EQ
The token type LSH_EQ. |
static int |
M_ARG
The token type M_ARG. |
static int |
M_PASTE
The token type M_PASTE. |
static int |
M_STRING
The token type M_STRING. |
static int |
MOD_EQ
The token type MOD_EQ. |
static int |
MULT_EQ
The token type MULT_EQ. |
static int |
NE
The token type NE. |
static int |
NL
The token type NL. |
static int |
OR_EQ
The token type OR_EQ. |
static int |
P_LINE
The token type P_LINE. |
static int |
PASTE
The token type PASTE. |
static int |
PLUS_EQ
The token type PLUS_EQ. |
static int |
RANGE
The token type RANGE. |
static int |
RSH
The token type RSH. |
static int |
RSH_EQ
The token type RSH_EQ. |
static int |
STRING
The token type STRING. |
static int |
SUB_EQ
The token type SUB_EQ. |
static int |
WHITESPACE
The token type WHITESPACE. |
static int |
XOR_EQ
The token type XOR_EQ. |
Constructor Summary | |
---|---|
Token(int type,
int line,
int column,
String text)
|
|
Token(int type,
int line,
int column,
String text,
Object value)
|
Method Summary | |
---|---|
int |
getColumn()
Returns the column at which this token started. |
int |
getLine()
Returns the line at which this token started. |
String |
getText()
Returns the original or generated text of this token. |
static String |
getTokenName(int type)
Returns the descriptive name of the given token type. |
int |
getType()
Returns the semantic type of this token. |
Object |
getValue()
Returns the semantic value of this token. |
String |
toString()
Returns a description of this token, for debugging purposes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int AND_EQ
public static final int ARROW
public static final int CHARACTER
public static final int CCOMMENT
public static final int CPPCOMMENT
public static final int DEC
public static final int DIV_EQ
public static final int ELLIPSIS
public static final int EOF
public static final int EQ
public static final int GE
public static final int HASH
public static final int HEADER
public static final int IDENTIFIER
public static final int INC
public static final int INTEGER
public static final int LAND
public static final int LAND_EQ
public static final int LE
public static final int LITERAL
public static final int LOR
public static final int LOR_EQ
public static final int LSH
public static final int LSH_EQ
public static final int MOD_EQ
public static final int MULT_EQ
public static final int NE
public static final int NL
public static final int OR_EQ
public static final int PASTE
public static final int PLUS_EQ
public static final int RANGE
public static final int RSH
public static final int RSH_EQ
public static final int STRING
public static final int SUB_EQ
public static final int WHITESPACE
public static final int XOR_EQ
public static final int M_ARG
public static final int M_PASTE
public static final int M_STRING
public static final int P_LINE
public static final int INVALID
public static final int _TOKENS
Constructor Detail |
---|
public Token(int type, int line, int column, String text, Object value)
public Token(int type, int line, int column, String text)
Method Detail |
---|
public int getType()
public int getLine()
public int getColumn()
public String getText()
getValue()
public Object getValue()
getText()
public String toString()
toString
in class Object
public static final String getTokenName(int type)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |