Пример #1
0
        public void Parse(string source)
        {
            NonterminalToken token = parser.Parse(source);

            if (token != null)
            {
                Object obj = CreateObject(token);
                //todo: Use your object any way you like
            }
        }
Пример #2
0
        public void Parse(string source)
        {
            NonterminalToken token = parser.Parse(source);

            if (token != null)
            {
                MainForm.mainForm.ClearShowInputError();
                Expression exp = (Expression)CreateObject(token);
                MainForm.mainForm.WriteResult(exp.Evaluate().ToString());
            }
        }
Пример #3
0
        public void Parser_Token(string code, Action <calitha.goldparser.NonterminalToken> callback)
        {
            if (!is_init)
            {
                parser.OnAccept += Parser_OnAccept;
                parser.OnShift  += Parser_OnShift;
                is_init          = true;
            }
            //   action += callback;

            parser.Parse(code);
        }
Пример #4
0
 public void Parse(string source)
 {
     parser.Parse(source);
 }
Пример #5
0
 public object Parse(string source)
 {
     return(parser.Parse(source).UserObject);
 }