コード例 #1
0
        private void AcceptEvent(LALRParser parser, AcceptEventArgs args)
        {
            NonterminalToken nonterminalToken = (NonterminalToken)args.Token;

            RuleContext.EnterCheckCodeInterface = this.EnterCheckCodeInterface;

            RuleContext.ClearState();
            EnterRule program = EnterRule.BuildStatments(RuleContext, nonterminalToken);

            program.Execute();
            if (RuleContext.IsVariableValidationEnable)
            {
                RuleContext.CheckCommandVariables();
            }
        }
        private void AcceptEvent(LALRParser parser, AcceptEventArgs args)
        {
            //System.Console.WriteLine("AcceptEvent ");
            NonterminalToken T = (NonterminalToken)args.Token;


            /*
             * try
             * {
             *  Configuration.Load(Configuration.DefaultConfigurationPath);
             *  this.Context.module = new MemoryRegion();
             * }
             * catch (System.Exception ex)
             * {
             *  Configuration.CreateDefaultConfiguration();
             *  Configuration.Load(Configuration.DefaultConfigurationPath);
             *  this.Context.module = new MemoryRegion();
             * }*/



            mContext.EnterCheckCodeInterface = this.EnterCheckCodeInterface;

            mContext.ClearState();
            EnterRule program = EnterRule.BuildStatments(mContext, T);

            program.Execute();

            mContext.CheckAssignedVariables();

            /*
             * if (this.IsExecuteMode && this.host.IsExecutionEnabled)
             * {
             *  program.Execute();
             * }
             *
             * if (mContext.DefineVariablesCheckcode != null)
             * {
             *
             * }*/

            //this.ProgramStart
            //this.ProgramStart.Execute();
        }