Class ExpressionLexer

java.lang.Object
edu.cmu.tetrad.calculator.parser.ExpressionLexer

public class ExpressionLexer extends Object
Parses the tokens of an expression.
Author:
Tyler Gibson
  • Constructor Details

    • ExpressionLexer

      public ExpressionLexer(CharSequence seq)
  • Method Details

    • nextToken

      public final Token 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

      public final Token nextTokenIncludingWhitespace()
    • getTokenString

      public String getTokenString()
      Returns:
      the string corresponding to the last token lexed.
    • getCurrentOffset

      public int getCurrentOffset()
      Returns:
      the previous offset, before the getModel token was read (i.e. the offset of the getModel token.
    • getNextOffset

      public int getNextOffset()
      Returns:
      the getModel offset.