private MultiplicationDivisionEvaluator GetMultiplicationDivisionExprRight(ArithmValueEvaluator left, string oper)
        {
            var leftVal  = left;
            var rightVal = GetArithmValue();
            var op       = currentToken.code;

            if (Accept(TokenType.AsteriskOperator) || Accept(TokenType.SlashOperator))
            {
                leftVal = new ArithmValueEvaluator(new ArithmExprEvaluator(new MultiplicationDivisionEvaluator(leftVal, rightVal, oper)));
                return(GetMultiplicationDivisionExprRight(leftVal, op));
            }
            return(new MultiplicationDivisionEvaluator(leftVal, rightVal, oper));
        }
Beispiel #2
0
 public MultiplicationDivisionEvaluator(ArithmValueEvaluator l, ArithmValueEvaluator r, string op)
 {
     left           = l;
     right          = r;
     arithmOperator = op;
 }
Beispiel #3
0
 public MultiplicationDivisionEvaluator(MultiplicationDivisionEvaluator l, ArithmValueEvaluator r, string op)
 {
     left           = new ArithmValueEvaluator(new ArithmExprEvaluator(l));
     right          = r;
     arithmOperator = op;
 }
Beispiel #4
0
 public MultiplicationDivisionEvaluator(ArithmValueEvaluator l)
 {
     left           = l;
     right          = null;
     arithmOperator = null;
 }