예제 #1
0
        public Rule_Statements(Rule_Context pContext, NonterminalToken pToken) : base(pContext)
        {
            //<Statements> ::= <Statements> NewLine <Statement> | <Statement>

            if (pToken.Tokens.Length > 1)
            {
                NonterminalToken T;
                T = (NonterminalToken)pToken.Tokens[0];
                this.statements = new Rule_Statements(pContext, T);

                T = ((NonterminalToken)pToken.Tokens[2]);
                this.statement = new Rule_Statement(pContext, T);
            }
            else
            {
                NonterminalToken T;
                T = (NonterminalToken)pToken.Tokens[0];
                this.statement = new Rule_Statement(pContext, T);
            }
        }
예제 #2
0
        public Rule_Statements(Rule_Context pContext, NonterminalToken pToken)
            : base(pContext)
        {
            //<Statements> ::= <Statements> NewLine <Statement> | <Statement>

               if (pToken.Tokens.Length > 1)
               {
               NonterminalToken T;
               T = (NonterminalToken)pToken.Tokens[0];
               this.statements = new Rule_Statements(pContext, T);

               T = ((NonterminalToken)pToken.Tokens[2]);
               this.statement = new Rule_Statement(pContext, T);
               }
               else
               {
               NonterminalToken T;
               T = (NonterminalToken)pToken.Tokens[0];
               this.statement = new Rule_Statement(pContext, T);
               }
        }