|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.neoworks.rdc.Token
A class to represent tokens passed by the lexer.
Constructor Summary | |
Token(int tokenType,
int tokenValue,
java.lang.String lexeme)
Construct the class by setting the values to the arguments passed. |
|
Token(int tokenType,
int tokenValue,
java.lang.String lexeme,
int tokenStart)
Construct the class by setting the values to the arguments passed. |
|
Token(Token copyToken)
Copy constructor to create a token from another token. |
|
Token(Token copyToken,
int tokenStart)
Copy constructor to create a token from another token. |
Method Summary | |
java.lang.String |
getLexeme()
Return the lexeme of the token |
int |
getStart()
Return the start index of the token |
int |
getTokenType()
Return the type of the token |
int |
getTokenValue()
Return the value of the token |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Token(int tokenType, int tokenValue, java.lang.String lexeme)
tokenType
- The type of the tokentokenValue
- The value of the tokenlexeme
- The text of the tokenpublic Token(int tokenType, int tokenValue, java.lang.String lexeme, int tokenStart)
tokenType
- The type of the tokentokenValue
- The value of the tokenlexeme
- The text of the tokentokenStart
- The offset into the input stringpublic Token(Token copyToken)
copyToken
- The token to copy into this onepublic Token(Token copyToken, int tokenStart)
copyToken
- The token to copy into this onetokenStart
- The new token start valueMethod Detail |
public int getTokenType()
public int getTokenValue()
public java.lang.String getLexeme()
public int getStart()
public 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 |