geneseo.cs.miniml
Class LEqNode
java.lang.Object
|
+--geneseo.cs.miniml.MinimLParseNode
|
+--geneseo.cs.miniml.LEqNode
- All Implemented Interfaces:
- ParseNode
- public class LEqNode
- extends MinimLParseNode
Represents nodes in MinimL syntax trees for less-than-or-equal comparisons.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LEqNode
public LEqNode(MinimLParseNode left,
MinimLParseNode right)
- Initializes a less-than-or-equal node.
- Parameters:
left
- The root of the syntax tree for the left operand.right
- The root of the syntax tree for the right operand.
getLeft
public MinimLParseNode getLeft()
- Retrieve the left operand of a less-than-or-equal node.
- Returns:
- The root of the syntax tree for the left operand.
setLeft
public void setLeft(MinimLParseNode newLeft)
- Change a less-than-or-equal node's left operand.
- Parameters:
newLeft
- The root of the syntax tree for the new left operand.
getRight
public MinimLParseNode getRight()
- Retrieve a less-than-or-equal node's right operand.
- Returns:
- The root of the syntax tree for the right operand.
setRight
public void setRight(MinimLParseNode newRight)
- Change a less-than-or-equal node's right operand.
- Parameters:
newRight
- The root of the syntax tree for the new right operand.
acceptVisit
public void acceptVisit(MinimLParseVisitor visitor)
throws CompilerException
- Allow a visitor object to process a less-than-or-equal node in some way.
Exactly how the visitor processes the node is up to the visitor.
- Overrides:
acceptVisit
in class MinimLParseNode
- Parameters:
visitor
- The visitor object that wishes to process the comparison node.- Throws:
CompilerException
- If thrown by the visitor.- See Also:
MinimLParseVisitor
toString
public java.lang.String toString()
- Generate a string representation of a less-than-or-equal node.
- Overrides:
toString
in class java.lang.Object
- Returns:
- A string that indicates the presence of a less-than-or-equal comparison.