예제 #1
0
        /// <summary>
        /// Walk parse tree starting at the rule the walkRuleSelector supplies.
        /// </summary>
        /// <param name="ast">ast to walk</param>
        /// <param name="listener">walker instance</param>
        /// <param name="expression">the expression we are walking in string form</param>
        /// <param name="eplStatementForErrorMsg">statement text for error messages</param>
        public static void Walk(
            ITree ast,
            EPLTreeWalkerListener listener,
            string expression,
            string eplStatementForErrorMsg)
        {
            // Walk tree
            if (Log.IsDebugEnabled)
            {
                Log.Debug(".walk Walking AST using walker " + listener.GetType().Name);
            }

            var walker = new ParseTreeWalker();
            walker.Walk(listener, (IParseTree) ast);
            listener.End();
        }
예제 #2
0
 /// <summary>
 /// Walk parse tree starting at the rule the walkRuleSelector supplies.
 /// </summary>
 /// <param name="ast">ast to walk</param>
 /// <param name="listener">walker instance</param>
 /// <param name="expression">the expression we are walking in string form</param>
 /// <param name="eplStatementForErrorMsg">statement text for error messages</param>
 public static void Walk(ITree ast, EPLTreeWalkerListener listener, String expression, String eplStatementForErrorMsg)
 {
     // Walk tree
     try
     {
         if (Log.IsDebugEnabled)
         {
             Log.Debug(".walk Walking AST using walker " + listener.GetType().FullName);
         }
         var walker = new ParseTreeWalker();
         walker.Walk(listener, (IParseTree)ast);
         listener.End();
     }
     catch (Exception e)
     {
         Log.Info("Error walking statement [" + expression + "]", e);
         throw;
     }
 }