parser
Class ExpressionParser.Default.LexicalAnalyzer

java.lang.Object
  |
  +--parser.ExpressionParser.LexicalAnalyzer
        |
        +--parser.ExpressionParser.Default.LexicalAnalyzer
Enclosing class:
ExpressionParser.Default

public static class ExpressionParser.Default.LexicalAnalyzer
extends ExpressionParser.LexicalAnalyzer


Field Summary
protected  int column
          The zero-based column number the next token begins at.
protected  int index
          The zero-based index the next token begins at.
protected  int length
          The length of the text.
protected  int line
          The zero-based line number the next token begins at.
protected  String sourceName
          The sourceName given to the constructor.
protected  int tabStop
          The tabStop given to the constructor.
protected  CharSequence text
          The text given to the constructor.
 
Constructor Summary
ExpressionParser.Default.LexicalAnalyzer(String sourceName, CharSequence text, int tabStop)
          Constructs a lexical analyzer with a given table.
 
Method Summary
 ExpressionParser.Token next()
          Returns the next token in the sequence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sourceName

protected final String sourceName
The sourceName given to the constructor.


text

protected final CharSequence text
The text given to the constructor.


length

protected final int length
The length of the text.


tabStop

protected final int tabStop
The tabStop given to the constructor.


index

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


line

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


column

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

Constructor Detail

ExpressionParser.Default.LexicalAnalyzer

public ExpressionParser.Default.LexicalAnalyzer(String sourceName,
                                                CharSequence text,
                                                int tabStop)
Constructs a lexical analyzer with a given table.

Parameters:
sourceName - the name of the text.
text - the text to parse.
tabStop - the count of columns the tab character expands to.
Since:
notavaCC 1.0
Method Detail

next

public ExpressionParser.Token next()
                            throws ExpressionParser.ParseException
Description copied from class: ExpressionParser.LexicalAnalyzer
Returns the next token in the sequence. If there is no tokens, the symbol ID of the returned value should be ExpressionParser.EOF_TOKEN, but the image or the index etc. are not specified (may be unsupported).

Specified by:
next in class ExpressionParser.LexicalAnalyzer
Returns:
the next token in the sequence.
ExpressionParser.ParseException