Interface ExpNode

    • Method Detail

      • visit

        <T> T visit​(ExpNodeVisitor<T> visitor)
        Generic evaluation visitor
        Type Parameters:
        T -
        Parameters:
        visitor -
        Returns:
      • precedence

        int precedence()
        Precedence of this expression node. Used to parse the expression into the correct tree. We use 0 to represent the highest precedence
        Returns:
      • isOperator

        default boolean isOperator()
        Is this expression node an operator
        Returns:
      • isOperand

        default boolean isOperand()
        Is this expression node an operand
        Returns:
      • isLeftParen

        default boolean isLeftParen()
        Is this expression node a left-paren
        Returns:
      • isRightParen

        default boolean isRightParen()
        Is this expression node a right-paren
        Returns:
      • popOperands

        void popOperands​(java.util.Stack<ExpNode> stack)
        Read the operands from the stack
        Parameters:
        stack -