Inheritance diagram for stx::Grammar::PNBinaryComparisonExpr:
Public Member Functions | |
PNBinaryComparisonExpr (const ParseNode *_left, const ParseNode *_right, std::string _op) | |
Constructor from the parser: both operand subnodes and the operator id. | |
virtual | ~PNBinaryComparisonExpr () |
Recursively delete parse tree. | |
virtual AnyScalar | evaluate (const class SymbolTable &st) const |
Applies the operator to the two recursive calculated values. | |
virtual bool | evaluate_const (AnyScalar *dest) const |
Returns false because this node isn't always constant. | |
virtual std::string | toString () const |
String (operandA op operandB). | |
Private Types | |
enum | { EQUAL, NOTEQUAL, LESS, GREATER, LESSEQUAL, GREATEREQUAL } |
Comparison operation to perform: left op right. More... | |
Private Attributes | |
const ParseNode * | left |
Pointers to the left of the two child parse trees. | |
const ParseNode * | right |
Pointers to the right of the two child parse trees. | |
enum stx::Grammar::PNBinaryComparisonExpr:: { ... } | op |
Comparison operation to perform: left op right. | |
std::string | opstr |
String saved for toString(). |
This node has two children.
Definition at line 682 of file ExpressionParser.cc.
anonymous enum [private] |
virtual AnyScalar stx::Grammar::PNBinaryComparisonExpr::evaluate | ( | const class SymbolTable & | st | ) | const [inline, virtual] |
Applies the operator to the two recursive calculated values.
The actual switching between types is handled by AnyScalar's operators. This result type of this processing node is always bool.
Implements stx::ParseNode.
Definition at line 731 of file ExpressionParser.cc.
References stx::AnyScalar::ATTRTYPE_BOOL, EQUAL, stx::AnyScalar::equal_to(), stx::ParseNode::evaluate(), stx::AnyScalar::greater(), GREATER, stx::AnyScalar::greater_equal(), GREATEREQUAL, left, stx::AnyScalar::less(), LESS, stx::AnyScalar::less_equal(), LESSEQUAL, stx::AnyScalar::not_equal_to(), NOTEQUAL, op, and right.