net.esper.eql.parse
Class ParseHelper

java.lang.Object
  extended by net.esper.eql.parse.ParseHelper

public class ParseHelper
extends Object

Helper class for parsing an expression and walking a parse tree.


Constructor Summary
ParseHelper()
           
 
Method Summary
static antlr.collections.AST parse(String expression, ParseRuleSelector parseRuleSelector)
          Parse expression using the rule the ParseRuleSelector instance supplies.
static void walk(antlr.collections.AST ast, EQLBaseWalker walker, WalkRuleSelector walkRuleSelector, String expression)
          Walk parse tree starting at the rule the walkRuleSelector supplies.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParseHelper

public ParseHelper()
Method Detail

walk

public static void walk(antlr.collections.AST ast,
                        EQLBaseWalker walker,
                        WalkRuleSelector walkRuleSelector,
                        String expression)
Walk parse tree starting at the rule the walkRuleSelector supplies.

Parameters:
ast - - ast to walk
walker - - walker instance
walkRuleSelector - - walk rule
expression - - the expression we are walking in string form

parse

public static antlr.collections.AST parse(String expression,
                                          ParseRuleSelector parseRuleSelector)
                                   throws EPException
Parse expression using the rule the ParseRuleSelector instance supplies.

Parameters:
expression - - text to parse
parseRuleSelector - - parse rule to select
Returns:
AST - syntax tree
Throws:
EPException - when the AST could not be parsed