|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.upb.swt.mcie.parser.token.Token
public abstract class Token
Implementation the common structure of all tokens. In particular, it deals with the position of the token in the scanned text as well as the text parsed for identifying it.
Field Summary | |
---|---|
private int |
column
The column in the character sequence at which the token starts. |
private int |
line
The line in the character sequence at which the token starts. |
private java.lang.CharSequence |
text
The text corresponding to this token. |
Constructor Summary | |
---|---|
Token()
|
Method Summary | |
---|---|
void |
setReference(java.lang.CharSequence text,
int line,
int column)
Defines the reference of this token to the character sequence at which this token was encountered. |
java.lang.String |
toString()
Returns the string representation of this token. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private int line
private int column
private java.lang.CharSequence text
Constructor Detail |
---|
public Token()
Method Detail |
---|
public void setReference(java.lang.CharSequence text, int line, int column)
text
- the textual representation of the tokenline
- the linecolumn
- the columnpublic 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 |