ast
Class BinaryCompExpr

java.lang.Object
  extended by ast.ASTNode
      extended by ast.Expr
          extended by ast.BinaryExpr
              extended by ast.BinaryCompExpr
Direct Known Subclasses:
BinaryCompEqExpr, BinaryCompGeqExpr, BinaryCompGtExpr, BinaryCompLeqExpr, BinaryCompLtExpr, BinaryCompNeExpr

public abstract class BinaryCompExpr
extends BinaryExpr

The abstract BinaryCompExpr class represents comparison expressions. It can be either an equivalence ('==' or '!=') or an inequality ('<', '>', '<=', '>='). It extends BinaryExpr and contains a lefthand expression and a righthand expression. Most of the functionality can be implemented within the visitor method for BinaryExpr, however, some functionality may need to be implemented in the visitor method for each subclass.

See Also:
ASTNode, BinaryExpr

Field Summary
 
Fields inherited from class ast.BinaryExpr
leftExpr, rightExpr
 
Fields inherited from class ast.ASTNode
charNum, lineNum, lineStr
 
Constructor Summary
BinaryCompExpr(int lineNum, Expr leftExpr, Expr rightExpr)
          BinaryCompExpr constructor
 
Method Summary
abstract  java.lang.Object accept(visitor.Visitor v, java.lang.Object o)
          Visitor method
 
Methods inherited from class ast.BinaryExpr
getLeftExpr, getOperandType, getOpName, getOpType, getRightExpr
 
Methods inherited from class ast.Expr
getExprType, setExprType
 
Methods inherited from class ast.ASTNode
getLineNum
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryCompExpr

public BinaryCompExpr(int lineNum,
                      Expr leftExpr,
                      Expr rightExpr)
BinaryCompExpr constructor

Parameters:
lineNum - source line number corresponding to this AST node
leftExpr - left operand expression
rightExpr - right operand expression
Method Detail

accept

public abstract java.lang.Object accept(visitor.Visitor v,
                                        java.lang.Object o)
Visitor method

Specified by:
accept in class BinaryExpr
Parameters:
v - visitor object
o - object to pass down
Returns:
result of visiting this node
See Also:
Visitor