org.jacorb.notification.filter.etcl
Class BinaryOperator

java.lang.Object
  extended byantlr.BaseAST
      extended byorg.jacorb.notification.filter.etcl.AbstractTCLNode
          extended byorg.jacorb.notification.filter.etcl.UnaryOperator
              extended byorg.jacorb.notification.filter.etcl.BinaryOperator
All Implemented Interfaces:
antlr.collections.AST, java.io.Serializable, TCLParserTokenTypes
Direct Known Subclasses:
DivOperator, EqOperator, GteOperator, GtOperator, InOperator, LteOperator, LtOperator, MultOperator, NeqOperator, SubstrOperator

public abstract class BinaryOperator
extends org.jacorb.notification.filter.etcl.UnaryOperator

Version:
$Id: BinaryOperator.java,v 1.2 2005/02/14 00:07:08 alphonse.bendt Exp $
Author:
Alphonse Bendt
See Also:
Serialized Form

Field Summary
 
Fields inherited from class antlr.BaseAST
down, right
 
Fields inherited from interface org.jacorb.notification.filter.etcl.TCLParserTokenTypes
AND, ARRAY, ASSOC, DEFAULT, DISCRIM, DIV, DOLLAR, DOT, EOF, EQ, EXIST, FALSE, FIRST, GT, GTE, IDENTIFIER, IMPLICIT, IN, LBRACKET, LENGTH, LPAREN, LT, LTE, MAX, MIN, MINUS, MULT, NEQ, NOT, NULL_TREE_LOOKAHEAD, NUM_FLOAT, NUMBER, OR, PLUS, RANDOM, RBRACKET, REPO_ID, RPAREN, RUNTIME_VAR, STRING, SUBSTR, TRUE, TYPE, TYPE_ID, UNARY_MINUS, UNARY_PLUS, UNION_POS, WITH, WS
 
Constructor Summary
BinaryOperator(antlr.Token tok)
           
 
Method Summary
 EvaluationResult evaluate(EvaluationContext context)
          Evaluate this Node.
protected  EvaluationResult evaluate(EvaluationContext context, EvaluationResult left)
           
protected abstract  EvaluationResult evaluate(EvaluationContext context, EvaluationResult left, EvaluationResult right)
           
 
Methods inherited from class org.jacorb.notification.filter.etcl.AbstractTCLNode
acceptInOrder, acceptPostOrder, acceptPreOrder, getName, getNameForType, getType, hasNextSibling, initialize, initialize, initialize, isBoolean, isNumber, isStatic, isString, left, printToStringBuffer, right, setType, toStringTree
 
Methods inherited from class antlr.BaseAST
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getColumn, getFirstChild, getLine, getNextSibling, getNumberOfChildren, getText, getTokenNames, removeChildren, setFirstChild, setNextSibling, setText, setVerboseStringConversion, toString, toStringList, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BinaryOperator

public BinaryOperator(antlr.Token tok)
Method Detail

evaluate

protected final EvaluationResult evaluate(EvaluationContext context,
                                          EvaluationResult left)
                                   throws EvaluationException
Throws:
EvaluationException

evaluate

protected abstract EvaluationResult evaluate(EvaluationContext context,
                                             EvaluationResult left,
                                             EvaluationResult right)
                                      throws EvaluationException
Throws:
EvaluationException

evaluate

public final EvaluationResult evaluate(EvaluationContext context)
                                throws EvaluationException
Description copied from class: AbstractTCLNode
Evaluate this Node.

Overrides:
evaluate in class AbstractTCLNode
Parameters:
context - an EvaluationContext value contains all context information necessary for the evaluation
Returns:
an EvaluationResult value
Throws:
EvaluationException - occurs if e.g. an expression contains a reference to a non-existent struct member or if it is tried to add a string and a number