Example #1
0
 private void AcceptEvent(LALRParser parser, AcceptEventArgs args)
 {
     /*** MODIFICAÇÕES ***/
     _mainForm.setLeituraState(true);
     _mainForm.setSyntaxState(_errorList.Count == 0);
     //MessageBox.Show("The file has been read succesfully");
     /*** MODIFICAÇÕES ***/
 }
Example #2
0
 private void AcceptEvent(LALRParser parser, AcceptEventArgs args)
 {
     //todo: Use your fully reduced args.Token.UserObject
     try
     {
         resultado = Convert.ToString(args.Token.UserObject);
     }
     catch
     {
     }
 }
Example #3
0
 private static void P_OnAccept(com.calitha.goldparser.LALRParser parser, com.calitha.goldparser.AcceptEventArgs args)
 {
     //   Console.WriteLine(args.Token.Rule.Lhs.Name);
     foreach (var t in args.Token.Tokens)
     {
         //var s= (find(t));
         FillTreeView(null, t);
         //     FillTreeView(args.Token,t);
     }
     //  Fx();
     // throw new NotImplementedException();
 }
Example #4
0
 private void AcceptEvent(LALRParser parser, AcceptEventArgs args)
 {
     MainForm.mainForm.ClearShowInputError();
     try
     {
         Expression exp = (Expression)args.Token.UserObject;
         MainForm.mainForm.WriteResult(exp.Evaluate().ToString());
     }
     catch (Exception e)
     {
         MainForm.mainForm.WriteResult(e.Message);
     }
 }
Example #5
0
 private void AcceptEvent(LALRParser parser, AcceptEventArgs args)
 {
     //todo: Use your fully reduced args.Token.UserObject
 }
        private void AcceptEvent(LALRParser parser, AcceptEventArgs args)
        {
            NonterminalToken T = (NonterminalToken)args.Token;
            mContext.AnalysisCheckCodeInterface = this.AnalysisCheckCodeInterface;
            this.Context.AnalysisInterpreterHost = this;
            AnalysisRule program = AnalysisRule.BuildStatments(mContext, T);

            if (this.IsExecuteMode)
            {
                program.Execute();
            }

            this.ProgramStart = null;
        }
Example #7
0
 void parser_OnAccept(LALRParser parser, AcceptEventArgs args)
 {
     //try
        //{
        //    generateCmdHasTable();
        Enabled = true;
       // Console.WriteLine("Parser Success!");
        //}
        //catch (Exception ex)
        //{
        //    Console.WriteLine("On_accept:" + ex.Message);
        //}
 }
Example #8
0
 private void AcceptEvent(LALRParser parser, AcceptEventArgs args)
 {
     //todo: Use your fully reduced args.Token.UserObject
 }
Example #9
0
 private void AcceptEvent(LALRParser parser, AcceptEventArgs args)
 {
     AddViewItem("Accept",null,"","","",4);
     FillTreeView(parseTreeView,args.Token);
     tabControl.SelectedIndex = 2;
 }
        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();

            RuleContext.CheckAssignedVariables();
        }
Example #11
0
 private void AcceptEvent(LALRParser parser, AcceptEventArgs args)
 {
     MainForm.mainForm.ClearShowInputError();
     try
     {
         Expression exp = (Expression)args.Token.UserObject;
         MainForm.mainForm.WriteResult(exp.Evaluate().ToString());
     }
     catch (Exception e)
     {
         MainForm.mainForm.WriteResult(e.Message);
     }
 }