Package edu.cmu.tetrad.calculator.parser
Class ExpressionLexer
java.lang.Object
edu.cmu.tetrad.calculator.parser.ExpressionLexer
Parses the tokens of an expression.
- Version:
- $Id: $Id
- Author:
- Tyler Gibson
-
Constructor Details
-
ExpressionLexer
Constructor for ExpressionLexer.
- Parameters:
seq
- aCharSequence
object
-
-
Method Details
-
nextToken
nextToken.
- Returns:
- the type of the next token. For words and quoted charSequence tokens, the charSequence that the token represents can be fetched by calling the getString method.
-
nextTokenIncludingWhitespace
-
getTokenString
getTokenString.
- Returns:
- the string corresponding to the last token lexed.
-
getCurrentOffset
public int getCurrentOffset()Getter for the field
currentOffset
.- Returns:
- the previous offset, before the getModel token was read (i.e. the offset of the getModel token.
-
getNextOffset
public int getNextOffset()Getter for the field
nextOffset
.- Returns:
- the getModel offset.
-