|
||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.ObjectTopLevelClass.LexicalAnalyzer
TopLevelClass.Default.LexicalAnalyzer
public static class TopLevelClass.Default.LexicalAnalyzer
The default TopLevelClass.LexicalAnalyzer
.
フィールドの概要 | |
---|---|
protected int |
column
The zero-based column number the next token begins at. |
protected int |
end
The exclusive end index of the target text region. |
protected int |
index
The zero-based index the next token begins at. |
protected int |
line
The zero-based line number the next token begins at. |
protected java.lang.String |
sourceName
The sourceName given to the constructor. |
protected int |
tabStop
The tabStop given to the constructor. |
protected java.lang.CharSequence |
text
The text given to the constructor. |
コンストラクタの概要 | |
---|---|
TopLevelClass.Default.LexicalAnalyzer(java.lang.String sourceName,
java.lang.CharSequence text,
int tabStop)
Constructs a lexical analyzer. |
|
TopLevelClass.Default.LexicalAnalyzer(java.lang.String sourceName,
java.lang.CharSequence text,
int tabStop,
int start,
int end,
int line,
int column)
Constructs a lexical analyzer that analyze a part of a text. |
メソッドの概要 | |
---|---|
TopLevelClass.Token |
next()
Returns the next token in the sequence. |
protected char |
nextChar()
Returns the next character in the text . |
protected char |
nextUnicodeEscapedChar()
Returns the next character in the text based on the Unicode escapes. |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
protected final java.lang.String sourceName
sourceName
given to the constructor.
protected final java.lang.CharSequence text
text
given to the constructor.
protected final int end
text
region.
protected final int tabStop
tabStop
given to the constructor.
protected int index
protected int line
protected int column
コンストラクタの詳細 |
---|
public TopLevelClass.Default.LexicalAnalyzer(java.lang.String sourceName,
java.lang.CharSequence text,
int tabStop)
sourceName
- the name of the source, used only to set the result of TopLevelClass.Token.getSourceName()
.text
- the text to parse.tabStop
- the number that the tab character advances the cursor to the next column that is a multiple of. tabStop
is used only to set the result of TopLevelClass.Token.getColumn()
.
public TopLevelClass.Default.LexicalAnalyzer(java.lang.String sourceName,
java.lang.CharSequence text,
int tabStop,
int start,
int end,
int line,
int column)
sourceName
- the name of the source, used only to set the result of TopLevelClass.Token.getSourceName()
.text
- the text to parse.tabStop
- the number that the tab character advances the cursor to the next column that is a multiple of. tabStop
is used only to set the result of TopLevelClass.Token.getColumn()
.start
- the inclusive start index of the text region to analyze.end
- the exclusive end index of the text region to analyze.line
- the zero-based line number of the start
index.column
- the zero-based column number of the start
index.メソッドの詳細 |
---|
public TopLevelClass.Token next() throws TopLevelClass.ParseException
TopLevelClass.LexicalAnalyzer
の記述:
If there is no tokens, the symbol ID of the returned value should be TopLevelClass.EOF_TOKEN
, but the image or the index etc. are not specified (may be unsupported).
TopLevelClass.LexicalAnalyzer
内の next
TopLevelClass.ParseException
protected char nextChar()
throws TopLevelClass.ParseException,
java.lang.IndexOutOfBoundsException
text
.
This method returns the character starting at index
in the sequence and updates index
, line
, and column
to point the next character of the returned character. This method is overridden in order to deal with a string as a character through the input sequence like Unicode escapes of Java.
java.lang.IndexOutOfBoundsException
- if index >= end
TopLevelClass.ParseException
protected final char nextUnicodeEscapedChar()
throws TopLevelClass.ParseException,
java.lang.IndexOutOfBoundsException
text
based on the Unicode escapes.
TopLevelClass.ParseException
- for a illegal escape.
java.lang.IndexOutOfBoundsException
- if index >= end
|
||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |