Пример #1
0
 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;
 }
Пример #2
0
 public parameter_sequence(arith_expression_sequence _arith_expression_sequence, parameter_sequence _self_parameter_sequence, comma _comma)
 {
     comma = _comma;
     arith_expression_sequence = _arith_expression_sequence;
     self_parameter_sequence   = _self_parameter_sequence;
     expression = self_parameter_sequence?.expression + comma?.expression + arith_expression_sequence.expression
                  /* expression = arith_expression.expression + comma?.expression  + self_arith_expression_sequence?.expression*/;
 }
Пример #3
0
        public arith_expression_sequence Parse_arith_expression_sequence(arith_expression_sequence _self = null)
        {
            var _external_array = Parse_external_array();

            if (_external_array != null)
            {
                var _parameter_sequence = new arith_expression_sequence(_external_array);
                _self = _parameter_sequence; // we cant have a recursive here
                return(_self);
            }



            var _pipe = Parse_pipe();

            if ((_self != null && _pipe == null) && _external_array == null)
            {
                return(_self);
            }
            //  very important - stops infinite loop basically we must have a "|number" following

            var _arith_expression = Parse_arith_expression();

            // RECURSION PROBLEM HERE USE "/" as an example math expression

            if (_arith_expression != null && _pipe == null)
            {
                var _arith_expression_sequence = new arith_expression_sequence(_arith_expression);
                _self = Parse_arith_expression_sequence(_arith_expression_sequence);
                return(_self);
            }

            if (_arith_expression != null && _pipe != null)
            {
                var _arith_expression_sequence = new arith_expression_sequence(_arith_expression, _self, _pipe);
                _self = Parse_arith_expression_sequence(_arith_expression_sequence);
                return(_self);
            }



            return(_self);
        }
Пример #4
0
 public parameter_sequence(arith_expression_sequence _arith_expression_sequence)
 {
     arith_expression_sequence = _arith_expression_sequence;
     expression = arith_expression_sequence.expression;
 }