15 #ifndef Om_Language_Evaluation_
26 Om::Language::Evaluation
30 inline Type_::~Evaluation() {
32 this->thisExpression.IsEmpty() &&
33 "The Evaluation was not fully consumed."
37 inline Type_::Evaluation(Evaluator & theEvaluator):
39 thisEvaluator(theEvaluator) {}
42 return this->thisEvaluator.GetTranslator();
45 inline bool Type_::GiveTerm(Evaluator & theEvaluator) {
47 this->thisExpression.IsEmpty()
51 Expression::FormRange<Form> theFormRange(this->thisExpression);
54 theFormRange->GetOperator().IsEmpty()
58 Form::OperandRange<Operand> theOperandRange(*theFormRange);
59 assert(theOperandRange);
60 theOperand.Swap(*theOperandRange);
62 this->thisExpression.FrontPopTerm();
63 theEvaluator.TakeOperand(
69 this->thisExpression.FrontGiveTerm(theOperator);
70 theEvaluator.TakeOperator(
78 template <
typename TheOperand>
79 inline void Type_::TakeOperand(TheOperand & theOperand) {
83 this->thisExpression.FrontTakeOperand(theOperand);
86 template <
typename TheOperation>
87 inline void Type_::TakeOperation(
88 std::auto_ptr<TheOperation> theOperation
90 this->thisEvaluator.TakeOperation(theOperation);
93 template <
typename TheOperator>
94 inline void Type_::TakeOperator(TheOperator & theOperator) {
96 !theOperator.IsEmpty()
98 this->thisExpression.FrontTakeOperator(theOperator);
101 template <
typename TheProducer>
102 inline void Type_::TakeQuotedProducer(TheProducer & theProducer) {
103 this->thisExpression.FrontTakeQuotedProducer(theProducer);
106 template <
typename TheProducer>
107 inline void Type_::TakeProducer(TheProducer & theProducer) {
108 Expression theExpression;
109 theExpression.TakeElements(theProducer);
110 theExpression.TakeElements(this->thisExpression);
111 this->thisExpression.Swap(theExpression);
An Operator lookup for use by an Evaluator.