クラス TopLevelClass.Default.LexicalAnalyzer

java.lang.Object
  上位を拡張 TopLevelClass.LexicalAnalyzer
      上位を拡張 TopLevelClass.Default.LexicalAnalyzer
含まれているインタフェース:
TopLevelClass.Default

public static class TopLevelClass.Default.LexicalAnalyzer
extends TopLevelClass.LexicalAnalyzer

The default TopLevelClass.LexicalAnalyzer.

導入されたバージョン:
notavaCC 1.0

フィールドの概要
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
 

フィールドの詳細

sourceName

protected final java.lang.String sourceName
The sourceName given to the constructor.

導入されたバージョン:
notavaCC 1.0

text

protected final java.lang.CharSequence text
The text given to the constructor.

導入されたバージョン:
notavaCC 1.0

end

protected final int end
The exclusive end index of the target text region.

導入されたバージョン:
notavaCC 1.0

tabStop

protected final int tabStop
The tabStop given to the constructor.

導入されたバージョン:
notavaCC 1.0

index

protected int index
The zero-based index the next token begins at.

導入されたバージョン:
notavaCC 1.0

line

protected int line
The zero-based line number the next token begins at.

導入されたバージョン:
notavaCC 1.0

column

protected int column
The zero-based column number the next token begins at.

導入されたバージョン:
notavaCC 1.0
コンストラクタの詳細

TopLevelClass.Default.LexicalAnalyzer

public TopLevelClass.Default.LexicalAnalyzer(java.lang.String sourceName,
                                             java.lang.CharSequence text,
                                             int tabStop)
Constructs a lexical analyzer.

パラメータ:
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().
導入されたバージョン:
notavaCC 1.0

TopLevelClass.Default.LexicalAnalyzer

public 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.

パラメータ:
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.
導入されたバージョン:
notavaCC 1.0
メソッドの詳細

next

public TopLevelClass.Token next()
                         throws TopLevelClass.ParseException
クラス TopLevelClass.LexicalAnalyzer の記述:
Returns the next token in the sequence.

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
戻り値:
the next token in the sequence.
例外:
TopLevelClass.ParseException

nextChar

protected char nextChar()
                 throws TopLevelClass.ParseException,
                        java.lang.IndexOutOfBoundsException
Returns the next character in the 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.

戻り値:
the next character in the sequence.
例外:
java.lang.IndexOutOfBoundsException - if index >= end
TopLevelClass.ParseException
導入されたバージョン:
notavaCC 1.0

nextUnicodeEscapedChar

protected final char nextUnicodeEscapedChar()
                                     throws TopLevelClass.ParseException,
                                            java.lang.IndexOutOfBoundsException
Returns the next character in the text based on the Unicode escapes.

戻り値:
the next character in the sequence.
例外:
TopLevelClass.ParseException - for a illegal escape.
java.lang.IndexOutOfBoundsException - if index >= end
導入されたバージョン:
notavaCC 1.0