public arith_expression_sequence(arith_expression _arith_expression, arith_expression_sequence _arith_expression_sequence, pipe _pipe)
 {
     pipe             = _pipe;
     arith_expression = _arith_expression;
     self_arith_expression_sequence = _arith_expression_sequence;
     expression = self_arith_expression_sequence?.expression + pipe?.expression + arith_expression.expression;
 }
Exemple #2
0
 public ArithmeticParser(IList <SpecialToken> tokens, ref int index)
 {
     _tokens          = tokens;
     _index           = index;
     arith_expression = Parse_arith_expression();
     index            = _index;
     result           = new Result(arith_expression);
 }
Exemple #3
0
        private arith_expression Parse_arith_expression()
        {
            arith_expression _self = null;


            var _term = Parse_term();

            if (_term != null)
            {
                _self = new arith_expression(_term);
            }


            var _term_sequence = Parse_term_sequence();

            if (_term != null && _term_sequence != null)
            {
                _self = new arith_expression(_term, _term_sequence);
            }



            return(_self);
        }
 public arith_expression_sequence(arith_expression _arith_expression)
 {
     arith_expression = _arith_expression;
     expression       = arith_expression.expression;
 }