|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.computing.ai.expertsystem.compiler.parser.Token
public class Token
Class used to store the tokens read from the rules file. It's returned by the scanner to the parser of the rules.
| Field Summary | |
|---|---|
static Token |
EOF_TOKEN
The EOF token. |
| Fields inherited from interface org.jscience.computing.ai.expertsystem.compiler.parser.TokenConstants |
|---|
ACTIONS, ASTERISK, CLOSE_CURLY_BRACKET, COMMA, COMMENT, CONDITIONS, DECLARATIONS, DOT, EOF, EQUALS, ERROR, EXTENDS, IDENT, IMPLEMENTS, IMPORT, LOCALDECL, NONE_ABOVE, OPEN_CURLY_BRACKET, PACKAGE, PUBLIC, RULE, RULE_BASE, SEMICOLON, STRING, WHITE_SPACE |
| Constructor Summary | |
|---|---|
Token(int type,
java.lang.String lexeme)
Class constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
getLexeme()
Returns the lexeme associated with this token. |
int |
getTokenType()
Returns the type of this token. |
java.lang.String |
toString()
Returns a string representing this token. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Token EOF_TOKEN
| Constructor Detail |
|---|
public Token(int type,
java.lang.String lexeme)
type - the type of this token.lexeme - the lexeme associated with this token.| Method Detail |
|---|
public java.lang.String getLexeme()
public int getTokenType()
TokenConstantspublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||