Class RightParenExpNode

  • All Implemented Interfaces:
    ExpNode

    public class RightParenExpNode
    extends java.lang.Object
    implements ExpNode
    Represents a right paren when parsing an expression
    • Constructor Detail

      • RightParenExpNode

        public RightParenExpNode()
    • Method Detail

      • visit

        public <T> T visit​(ExpNodeVisitor<T> visitor)
        Description copied from interface: ExpNode
        Generic evaluation visitor
        Specified by:
        visit in interface ExpNode
        Returns:
      • precedence

        public int precedence()
        Description copied from interface: ExpNode
        Precedence of this expression node. Used to parse the expression into the correct tree. We use 0 to represent the highest precedence
        Specified by:
        precedence in interface ExpNode
        Returns:
      • popOperands

        public void popOperands​(java.util.Stack<ExpNode> stack)
        Description copied from interface: ExpNode
        Read the operands from the stack
        Specified by:
        popOperands in interface ExpNode
      • isRightParen

        public boolean isRightParen()
        Description copied from interface: ExpNode
        Is this expression node a right-paren
        Specified by:
        isRightParen in interface ExpNode
        Returns: