|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A token, which is a part of a parsed text.
A token is a leaf of an abstract syntax tree.
Method Summary | |
int |
getColumn()
Returns the one-based column number in the source where this token begins. |
java.lang.String |
getImage()
Returns the string this token corresponds to. |
int |
getIndex()
Returns the zero-based index number in the source where this token begins. |
int |
getLine()
Returns the one-based line number in the source where this token begins. |
java.lang.String |
getSourceName()
Returns the source name this token coressponds to. |
int |
getSymbolID()
Returns the kind of this token. |
java.lang.String |
toString()
Returns the image and the parenthesized position of this token if supported. |
Methods inherited from interface parser.ExpressionParser.Node |
accept, getChildNodes, getParentNode, setParentNode |
Method Detail |
public int getSymbolID()
this
token.
The result value should be one of the followings:
value | described token |
---|---|
EOF_TOKEN |
<EOF> |
TOKEN_WHITE_SPACES |
WHITE_SPACES |
TOKEN_TRADITIONAL_COMMENT |
TRADITIONAL_COMMENT |
TOKEN_END_OF_LINE_COMMENT |
END_OF_LINE_COMMENT |
TOKEN_INTEGER |
INTEGER |
5 |
"(" |
6 |
")" |
7 |
"*" |
8 |
"+" |
9 |
"-" |
10 |
"/" |
this
token.public java.lang.String getImage()
this
token corresponds to.
this
token corresponds to.public java.lang.String getSourceName() throws java.lang.UnsupportedOperationException
this
token coressponds to.
this
token coressponds to. E.g. the canonical name of the file.
java.lang.UnsupportedOperationException
- if the method is not suported.public int getIndex() throws java.lang.UnsupportedOperationException
this
token begins.
this
token begins.
java.lang.UnsupportedOperationException
- if the method is not suported.public int getLine() throws java.lang.UnsupportedOperationException
this
token begins.
this
token begins.
java.lang.UnsupportedOperationException
- if the method is not suported.public int getColumn() throws java.lang.UnsupportedOperationException
this
token begins.
this
token begins.
java.lang.UnsupportedOperationException
- if the method is not suported.public java.lang.String toString()
this
token if supported.
E.g. "'identifier' (line 2, column 3)"
or "'identifier'"
.
toString
in class java.lang.Object
this
token.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |