00001 #pragma once
00002
00003 #include "expression.h"
00004 #include "expptr.h"
00005 #include "unsupportedopexception.h"
00006
00008 enum BOp
00009 {
00011 PLUS,
00013 MULTIPLY
00014 };
00015
00019 class BinaryExpression : public Expression
00020 {
00022 ExpPtr _left;
00024 ExpPtr _right;
00026 BOp _operation;
00027 public:
00035 BinaryExpression(BOp operation, const ExpPtr & left, const ExpPtr & right);
00036
00040 double eval();
00041
00042 };