|
||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.ObjectTopLevelClass.Default.Node
TopLevelClass.Default.Token
public static class TopLevelClass.Default.Token
Provides a simple implementation of TopLevelClass.Token
.
コンストラクタの概要 | |
---|---|
TopLevelClass.Default.Token(int symbolID,
java.lang.String image)
Constructs a token. |
|
TopLevelClass.Default.Token(int symbolID,
java.lang.String image,
java.lang.String originalImage,
java.lang.String sourceName,
int index,
int line,
int column)
Constructs a token. |
|
TopLevelClass.Default.Token(int symbolID,
java.lang.String image,
java.lang.String originalImage,
TopLevelClass.Token token)
Constructs a token. |
メソッドの概要 | |
---|---|
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 |
getOriginalImage()
Returns the string this token corresponds to. |
java.lang.String |
getSourceName()
Returns the source name this token coressponds to. |
int |
getSymbolID()
Returns the kind of this token. |
boolean |
isWhite()
Returnds true if this is a white token. |
java.lang.String |
toString()
Returns the image and the position of this token if supported. |
クラス TopLevelClass.Default.Node から継承されたメソッド |
---|
getChildNodes, replaceChild |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
インタフェース TopLevelClass.Node から継承されたメソッド |
---|
getChildNodes |
コンストラクタの詳細 |
---|
public TopLevelClass.Default.Token(int symbolID,
java.lang.String image)
symbolID
- the symbol ID of the token, returned by getSymbolID
.image
- the image string, returned by getImage
and getOriginalImage
.
public TopLevelClass.Default.Token(int symbolID,
java.lang.String image,
java.lang.String originalImage,
java.lang.String sourceName,
int index,
int line,
int column)
symbolID
- the symbol ID of the token, returned by getSymbolID
.image
- the image string, returned by getImage
.originalImage
- the image string, returned by getOriginalImage
.sourceName
- the source name returned by getSourceName
, or null
if not supported.index
- the index returned by getIndex
, or -1
if not supported.line
- the line number returned by getLine
, or -1
if not supported.column
- the column number returned by getColumn
, or -1
if not supported.public TopLevelClass.Default.Token(int symbolID, java.lang.String image, java.lang.String originalImage, TopLevelClass.Token token)
symbolID
- the symbol ID of the token, returned by getSymbolID
.image
- the image string, returned by getImage
.originalImage
- the image string, returned by getOriginalImage
.token
- a token that gives the returned value of getSourceName
, getIndex
, getLine
and getColumn
.メソッドの詳細 |
---|
public int getSymbolID()
TopLevelClass.Token
の記述: this
token.
The result value should be one of the following:
value | described token |
---|---|
TopLevelClass.EOF_TOKEN |
<EOF> |
TopLevelClass.TOKEN_TERMINAL |
TERMINAL |
others | an instance of a terminal defined by STRING |
TopLevelClass.Token
内の getSymbolID
this
token.public boolean isWhite()
TopLevelClass.Token
の記述: true
if this
is a white token.
TopLevelClass.Token
内の isWhite
true
if this
is a while token.public java.lang.String getImage()
TopLevelClass.Token
の記述: this
token corresponds to.
If the string contains some meta notation like Unicode escapes, the returned value is the represented string (e.g., A) rather than the representation (e.g., \u0041). If not, the returned value is the same as TopLevelClass.Token.getOriginalImage()
.
TopLevelClass.Token
内の getImage
this
token corresponds to.TopLevelClass.Token.getOriginalImage()
public java.lang.String getOriginalImage()
TopLevelClass.Token
の記述: this
token corresponds to.
If the string contains some meta notation like Unicode escapes, the returned value is the representation (e.g., \u0041) rather than the represented string (e.g., A). If not, the returned value is the same as TopLevelClass.Token.getImage()
.
TopLevelClass.Token
内の getOriginalImage
this
token corresponds to.TopLevelClass.Token.getImage()
public java.lang.String getSourceName() throws java.lang.UnsupportedOperationException
TopLevelClass.Token
の記述: this
token coressponds to.
TopLevelClass.Token
内の getSourceName
this
token coressponds to.
java.lang.UnsupportedOperationException
- if the method is not suported.public int getIndex() throws java.lang.UnsupportedOperationException
TopLevelClass.Token
の記述: this
token begins.
TopLevelClass.Token
内の getIndex
this
token begins.
java.lang.UnsupportedOperationException
- if the method is not suported.public int getLine() throws java.lang.UnsupportedOperationException
TopLevelClass.Token
の記述: this
token begins.
TopLevelClass.Token
内の getLine
this
token begins.
java.lang.UnsupportedOperationException
- if the method is not suported.public int getColumn() throws java.lang.UnsupportedOperationException
TopLevelClass.Token
の記述: this
token begins.
TopLevelClass.Token
内の getColumn
this
token begins.
java.lang.UnsupportedOperationException
- if the method is not suported.public java.lang.String toString()
TopLevelClass.Token
の記述: this
token if supported.
For instance, `identifier' (line 2, column 3)
or `identifier'
.
The format is not specified strictly.
TopLevelClass.Token
内の toString
TopLevelClass.Default.Node
内の toString
this
token.
|
||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |