Пример #1
0
        /// <summary>
        /// 检查语法
        /// </summary>
        /// <returns></returns>
        public bool Check(ref string mes)
        {
            bool result = false;

            try
            {
                Analyze();
                SyntaxAnalyzer a    = new SyntaxAnalyzer();
                EDataType      type = a.Execute(_link_OP.Head, _link_OP.Tail);
                mes    = "Success!";
                result = true;
            }
            catch (Exception ex)
            {
                mes = ex.Message;
            }

            return(result);
        }
Пример #2
0
 public GrammarAnalyzer(SyntaxAnalyzer analyze)
 {
     _analyze = analyze;
 }