Package com.jogamp.gluegen.jcpp
Class Token
- java.lang.Object
-
- com.jogamp.gluegen.jcpp.Token
-
public final class Token extends Object
A Preprocessor token.- See Also:
Preprocessor
-
-
Field Summary
Fields Modifier and Type Field Description static int
AND_EQ
static int
ARROW
static int
CCOMMENT
static int
CHARACTER
static int
CPPCOMMENT
static int
DEC
static int
DIV_EQ
static int
ELLIPSIS
static int
EOF
static int
EQ
static int
GE
static int
HASH
static int
HEADER
static int
IDENTIFIER
static int
INC
static int
INVALID
static int
LAND
static int
LAND_EQ
static int
LE
static int
LITERAL
static int
LOR
static int
LOR_EQ
static int
LSH
static int
LSH_EQ
static int
M_ARG
static int
M_PASTE
static int
M_STRING
static int
MOD_EQ
static int
MULT_EQ
static int
NE
static int
NL
static int
NUMBER
static int
OR_EQ
static int
P_LINE
static int
PASTE
static int
PLUS_EQ
static int
RANGE
static int
RSH
static int
RSH_EQ
static int
SQSTRING
static int
STRING
static int
SUB_EQ
static int
WHITESPACE
static int
XOR_EQ
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Field Detail
-
AND_EQ
public static final int AND_EQ
- See Also:
- Constant Field Values
-
ARROW
public static final int ARROW
- See Also:
- Constant Field Values
-
CHARACTER
public static final int CHARACTER
- See Also:
- Constant Field Values
-
CCOMMENT
public static final int CCOMMENT
- See Also:
- Constant Field Values
-
CPPCOMMENT
public static final int CPPCOMMENT
- See Also:
- Constant Field Values
-
DEC
public static final int DEC
- See Also:
- Constant Field Values
-
DIV_EQ
public static final int DIV_EQ
- See Also:
- Constant Field Values
-
ELLIPSIS
public static final int ELLIPSIS
- See Also:
- Constant Field Values
-
EOF
public static final int EOF
- See Also:
- Constant Field Values
-
EQ
public static final int EQ
- See Also:
- Constant Field Values
-
GE
public static final int GE
- See Also:
- Constant Field Values
-
HASH
public static final int HASH
- See Also:
- Constant Field Values
-
HEADER
public static final int HEADER
- See Also:
- Constant Field Values
-
IDENTIFIER
public static final int IDENTIFIER
- See Also:
- Constant Field Values
-
INC
public static final int INC
- See Also:
- Constant Field Values
-
NUMBER
public static final int NUMBER
- See Also:
- Constant Field Values
-
LAND
public static final int LAND
- See Also:
- Constant Field Values
-
LAND_EQ
public static final int LAND_EQ
- See Also:
- Constant Field Values
-
LE
public static final int LE
- See Also:
- Constant Field Values
-
LITERAL
public static final int LITERAL
- See Also:
- Constant Field Values
-
LOR
public static final int LOR
- See Also:
- Constant Field Values
-
LOR_EQ
public static final int LOR_EQ
- See Also:
- Constant Field Values
-
LSH
public static final int LSH
- See Also:
- Constant Field Values
-
LSH_EQ
public static final int LSH_EQ
- See Also:
- Constant Field Values
-
MOD_EQ
public static final int MOD_EQ
- See Also:
- Constant Field Values
-
MULT_EQ
public static final int MULT_EQ
- See Also:
- Constant Field Values
-
NE
public static final int NE
- See Also:
- Constant Field Values
-
NL
public static final int NL
- See Also:
- Constant Field Values
-
OR_EQ
public static final int OR_EQ
- See Also:
- Constant Field Values
-
PASTE
public static final int PASTE
- See Also:
- Constant Field Values
-
PLUS_EQ
public static final int PLUS_EQ
- See Also:
- Constant Field Values
-
RANGE
public static final int RANGE
- See Also:
- Constant Field Values
-
RSH
public static final int RSH
- See Also:
- Constant Field Values
-
RSH_EQ
public static final int RSH_EQ
- See Also:
- Constant Field Values
-
SQSTRING
public static final int SQSTRING
- See Also:
- Constant Field Values
-
STRING
public static final int STRING
- See Also:
- Constant Field Values
-
SUB_EQ
public static final int SUB_EQ
- See Also:
- Constant Field Values
-
WHITESPACE
public static final int WHITESPACE
- See Also:
- Constant Field Values
-
XOR_EQ
public static final int XOR_EQ
- See Also:
- Constant Field Values
-
M_ARG
public static final int M_ARG
- See Also:
- Constant Field Values
-
M_PASTE
public static final int M_PASTE
- See Also:
- Constant Field Values
-
M_STRING
public static final int M_STRING
- See Also:
- Constant Field Values
-
P_LINE
public static final int P_LINE
- See Also:
- Constant Field Values
-
INVALID
public static final int INVALID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
public int getType()
Returns the semantic type of this token.
-
getLine
public int getLine()
Returns the line at which this token started. Lines are numbered from zero.
-
getColumn
public int getColumn()
Returns the column at which this token started. Columns are numbered from zero.
-
getText
public String getText()
Returns the original or generated text of this token. This is distinct from the semantic value of the token.- See Also:
getValue()
-
getValue
public Object getValue()
Returns the semantic value of this token. For strings, this is the parsed String. For integers, this is an Integer object. For other token types, as appropriate.- See Also:
getText()
-
toString
public String toString()
Returns a description of this token, for debugging purposes.
-
getTokenName
public static String getTokenName(int type)
Returns the descriptive name of the given token type. This is mostly used for stringification and debugging.
-
-