stx::Grammar::PNUnaryArithmExpr Class Reference

Parse tree node representing an unary operator: '+', '-', '!' or "not". More...

Inheritance diagram for stx::Grammar::PNUnaryArithmExpr:

stx::ParseNode List of all members.

Public Member Functions

 PNUnaryArithmExpr (const ParseNode *_operand, char _op)
 Constructor from the parser: operand subnode and operator id.
virtual ~PNUnaryArithmExpr ()
 Recursively delete the parse tree.
virtual AnyScalar evaluate (const class SymbolTable &st) const
 Applies the operator to the recursively calculated value.
virtual bool evaluate_const (AnyScalar *dest) const
 Calculates subnodes and returns result if the operator can be applied.
virtual std::string toString () const
 Return the subnode's string with this operator prepended.

Private Attributes

const ParseNodeoperand
 Pointer to the single operand.
char op
 Arithmetic operation to perform: either '+', '-' or '!'.

Detailed Description

Parse tree node representing an unary operator: '+', '-', '!' or "not".

This node has one child.

Definition at line 463 of file ExpressionParser.cc.


Member Data Documentation

char stx::Grammar::PNUnaryArithmExpr::op [private]

Arithmetic operation to perform: either '+', '-' or '!'.

Further optimization would be to create an extra class for each op

Definition at line 471 of file ExpressionParser.cc.

Referenced by evaluate(), evaluate_const(), PNUnaryArithmExpr(), and toString().


The documentation for this class was generated from the following file:
Generated on Tue Jul 17 16:51:58 2007 for STX Expression Parser by  doxygen 1.5.2