|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<Tokenizer.TokenType>
edu.cornell.cs.sam.io.Tokenizer.TokenType
public static enum Tokenizer.TokenType
Represents the type of a tokenizer token
Enum Constant Summary | |
---|---|
CHARACTER
CHARACTER: A single character between two apostrophes. |
|
COMMENT
COMMENT: The text following // on a single line |
|
EOF
EOF: The end of file |
|
FLOAT
FLOAT: a sequence of digits starting with either a period, or a digit and containing only digits and one period after the first digit. |
|
INTEGER
INT: a sequence of digits with only digits after the first digit. |
|
OPERATOR
OPERATOR: Any non-alphanumeric character |
|
STRING
STRING: If string processing is turned on, a word is anything between two quotation signs. |
|
WORD
WORD: a letter followed by a sequence of alphanumeric characters or underscores (_) without any whitespace. |
Method Summary | |
---|---|
static Tokenizer.TokenType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Tokenizer.TokenType[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Tokenizer.TokenType INTEGER
public static final Tokenizer.TokenType FLOAT
public static final Tokenizer.TokenType WORD
public static final Tokenizer.TokenType STRING
public static final Tokenizer.TokenType CHARACTER
public static final Tokenizer.TokenType OPERATOR
public static final Tokenizer.TokenType COMMENT
public static final Tokenizer.TokenType EOF
Method Detail |
---|
public static final Tokenizer.TokenType[] values()
for(Tokenizer.TokenType c : Tokenizer.TokenType.values()) System.out.println(c);
public static Tokenizer.TokenType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |