public class Token extends Node
| Constructor and Description |
|---|
Token(TokenPattern pattern,
java.lang.String image,
int line,
int col)
Creates a new token.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getEndColumn()
The column number of the last character in the token image.
|
int |
getEndLine()
The line number of the last character in the token image.
|
int |
getId()
Returns the token (pattern) id.
|
java.lang.String |
getImage()
Returns the token image.
|
java.lang.String |
getName()
Returns the token node name.
|
Token |
getNextToken()
Returns the next token.
|
Token |
getPreviousToken()
Returns the previuos token.
|
int |
getStartColumn()
The column number of the first character in the token image.
|
int |
getStartLine()
The line number of the first character in the token image.
|
java.lang.String |
toShortString()
Returns a short string representation of this token.
|
java.lang.String |
toString()
Returns a detailed string representation of this token.
|
addValue, addValues, addValues, getAllValues, getChildAt, getChildCount, getDescendantCount, getParent, getValue, getValueCount, printTo, printTo, removeAllValuespublic Token(TokenPattern pattern, java.lang.String image, int line, int col)
pattern - the token patternimage - the token image (i.e. characters)line - the line number of the first charactercol - the column number of the first characterpublic int getId()
public java.lang.String getName()
public java.lang.String getImage()
public int getStartLine()
getStartLine in class Nodepublic int getStartColumn()
getStartColumn in class Nodepublic int getEndLine()
getEndLine in class Nodepublic int getEndColumn()
getEndColumn in class Nodepublic Token getPreviousToken()
getNextToken(),
Tokenizer.getUseTokenList(),
Tokenizer.setUseTokenList(boolean)public Token getNextToken()
getPreviousToken(),
Tokenizer.getUseTokenList(),
Tokenizer.setUseTokenList(boolean)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public java.lang.String toShortString()