|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--Token
Class Token describes a lexical entity in the input. The following Token types are recognized:
| Field Summary | |
static int |
ASSIGN
Assignment Token type. |
static int |
COMMA
Comma Token type. |
static int |
IDENTIFIER
Identifier Token type. |
static int |
LEFT_PAREN
Left parenthesis Token type. |
static int |
RIGHT_PAREN
Right parenthesis Token type. |
static int |
SEMICOLON
Semicolon Token type. |
static int |
STRING
String Token type. |
protected int |
type
The type of this Token. |
static int |
UNKNOWN
Unknown Token type. |
protected String |
value
The (possibly empty) string value of this Token. |
| Constructor Summary | |
Token(int type,
String value)
Creates a new Token with the given type and value. |
|
| Method Summary | |
int |
getType()
Get the type of the Token. |
String |
getValue()
Get the value of the Token.. |
String |
toString()
Constructs a string representation of this Token. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int IDENTIFIER
public static final int STRING
public static final int LEFT_PAREN
public static final int RIGHT_PAREN
public static final int COMMA
public static final int SEMICOLON
public static final int ASSIGN
public static final int UNKNOWN
protected int type
protected String value
| Constructor Detail |
public Token(int type,
String value)
type - The type of the Token.value - The value of the Token. May be null or "".| Method Detail |
public int getType()
public String getValue()
public String toString()
toString in class Object
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||