示例#1
0
        private Rule_Name_Sequence Parse_Rule_Name_Sequence_1(Rule_Name_Sequence _self = null)
        {
            //"   "
            var _backtrack = _scanResult.CurrentReadIndex;

            var rule_name_1 = Parse_Rule_Name();
            var opt_whitespace_sequence_1 = Parse_Whitespace_Sequence();
            var pipe_1 = Parse_Pipe();
            var opt_whitespace_sequence_2 = Parse_Whitespace_Sequence();
            var rule_name_2 = Parse_Rule_Name();

            if (rule_name_1 != null && pipe_1 != null && rule_name_2 != null)
            {
                _self = new Rule_Name_Sequence(rule_name_1, opt_whitespace_sequence_1, pipe_1, opt_whitespace_sequence_2, rule_name_2, _self);
            }
            else
            {
                _self = null;
            }

            UpdateBacktrackIndex(_self, _backtrack);


            return(_self);
        }
示例#2
0
        private Rule_Name_Sequence Parse_Rule_Name_Sequence(Rule_Name_Sequence _self = null)
        {
            var _backtrack = _scanResult.CurrentReadIndex;

            var _rule_name_sequence_1 = Parse_Rule_Name_Sequence_1(_self);

            if (_rule_name_sequence_1 != null)
            {
                _self = Parse_Rule_Name_Sequence(_rule_name_sequence_1);
            }

            var _rule_name_sequence_2 = Parse_Rule_Name_Sequence_2(_self);

            if (_rule_name_sequence_2 != null)
            {
                _self = Parse_Rule_Name_Sequence(_rule_name_sequence_2);
            }                                                                                                // non-recursive

            var _rule_name_sequence_3 = Parse_Rule_Name_Sequence_3(_self);

            if (_rule_name_sequence_3 != null)
            {
                _self = Parse_Rule_Name_Sequence(_rule_name_sequence_3);
            }

            UpdateBacktrackIndex(_self, _backtrack);


            return(_self);
        }
示例#3
0
        public Rule_Name_Sequence(Whitespace_Sequence _opt_whitespace_sequence_1, Rule_Name _rule_name_1, Rule_Name_Sequence _self_rule_name_sequence)
        {
            // set values
            opt_whitespace_sequence_1 = _opt_whitespace_sequence_1;
            rule_name_1             = _rule_name_1;
            self_rule_name_sequence = _self_rule_name_sequence;
            // add to dictionary
            Add(opt_whitespace_sequence_1);
            Add(rule_name_1);
            Add(self_rule_name_sequence);

            // set properties
            UpdateProperties("Rule-Name-Sequence", RecursiveProperty.Right);
        }
示例#4
0
        public Production_Rule(Production_Name _production_name, Whitespace_Sequence _opt_whitespace_sequence_1, Rule_Name_Sequence _rule_name_sequence, Whitespace_Sequence _opt_whitespace_sequence_2, Semi_Colon _semi_colon, Whitespace_Sequence _opt_whitespace_sequence_3)
        {
            production_name           = _production_name;
            opt_whitespace_sequence_1 = _opt_whitespace_sequence_1;
            rule_name_sequence        = _rule_name_sequence;
            opt_whitespace_sequence_2 = _opt_whitespace_sequence_2;
            semi_colon = _semi_colon;
            opt_whitespace_sequence_3 = _opt_whitespace_sequence_3;

            Add(production_name);
            Add(opt_whitespace_sequence_1);
            Add(rule_name_sequence);
            Add(opt_whitespace_sequence_2);
            Add(semi_colon);
            Add(opt_whitespace_sequence_3);

            UpdateProperties("production-rule");
        }
示例#5
0
        public Rule_Name_Sequence(Rule_Name _rule_name_1, Whitespace_Sequence _opt_whitespace_sequence_1, Pipe _pipe_1, Whitespace_Sequence _opt_whitespace_sequence_2, Rule_Name _rule_name_2, Rule_Name_Sequence _self_rule_name_sequence = null)
        {
            // set values
            rule_name_1 = _rule_name_1;
            opt_whitespace_sequence_1 = _opt_whitespace_sequence_1;
            pipe_1 = _pipe_1;
            opt_whitespace_sequence_2 = _opt_whitespace_sequence_2;
            rule_name_2             = _rule_name_2;
            self_rule_name_sequence = _self_rule_name_sequence;

            // add to dictionary
            Add(rule_name_1);
            Add(opt_whitespace_sequence_1);
            Add(pipe_1);
            Add(opt_whitespace_sequence_2);
            Add(rule_name_2);
            Add(self_rule_name_sequence);


            // set properties
            UpdateProperties("Rule-Name-Sequence", RecursiveProperty.Right);
        }
示例#6
0
        private Rule_Name_Sequence Parse_Rule_Name_Sequence_2(Rule_Name_Sequence _self = null)
        {
            //"   "
            var _backtrack = _scanResult.CurrentReadIndex;

            var opt_whitespace_sequence_1 = Parse_Whitespace_Sequence();
            var rule_name_1 = Parse_Rule_Name();


            if (rule_name_1 != null)// && _self ==null
            {
                _self = new Rule_Name_Sequence(opt_whitespace_sequence_1, rule_name_1, _self);
            }
            else
            {
                _self = null;
            }

            UpdateBacktrackIndex(_self, _backtrack);


            return(_self);
        }