Interface Parser.ParsedTokenConsumer

All Known Implementing Classes:
CompileContext
Enclosing class:
Parser

public static interface Parser.ParsedTokenConsumer
Interface parser uses to emit operands and operators in RPN order.
  • Method Details

    • pushOperand

      void pushOperand(Parser.ParsedToken operand)
      Process a single operand (identifier, number or string)
      Parameters:
      operand - ParsedToken with operand
    • processOperator

      void processOperator(Parser.ParsedToken operator) throws ParseException
      Process a single operator.
      Parameters:
      operator - ParsedToken with operator
      Throws:
      ParseException - In case of parser or lexer error
    • processFunction

      void processFunction(int argumentCount) throws ParseException
      Process a function call.

      The function name precedes the arguments on operand stack.

      Parameters:
      argumentCount - number of arguments passed to function
      Throws:
      ParseException
    • processTuple

      void processTuple(Parser.ParsedToken openingToken, int argumentCount)
      Process a tuple.
      Parameters:
      argumentCount - number of arguments passed to function
    • done

      void done()
      Called when expression parsed completely.