public class ParseHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
newline
Newline.
|
Constructor and Description |
---|
ParseHelper() |
Modifier and Type | Method and Description |
---|---|
static EsperEPL2GrammarLexer |
newLexer(CharStream input) |
static EsperEPL2GrammarParser |
newParser(CommonTokenStream tokens) |
static ParseResult |
parse(java.lang.String expression,
java.lang.String eplStatementErrorMsg,
boolean addPleaseCheck,
ParseRuleSelector parseRuleSelector,
boolean rewriteScript)
Parse expression using the rule the ParseRuleSelector instance supplies.
|
static void |
walk(Tree ast,
EPLTreeWalkerListener listener,
java.lang.String expression,
java.lang.String eplStatementForErrorMsg)
Walk parse tree starting at the rule the walkRuleSelector supplies.
|
public static void walk(Tree ast, EPLTreeWalkerListener listener, java.lang.String expression, java.lang.String eplStatementForErrorMsg)
ast
- - ast to walklistener
- - walker instanceexpression
- - the expression we are walking in string formeplStatementForErrorMsg
- - statement text for error messagespublic static ParseResult parse(java.lang.String expression, java.lang.String eplStatementErrorMsg, boolean addPleaseCheck, ParseRuleSelector parseRuleSelector, boolean rewriteScript) throws EPException
expression
- - text to parseparseRuleSelector
- - parse rule to selectaddPleaseCheck
- - true to include depth paraphraseeplStatementErrorMsg
- - text for errorEPException
- when the AST could not be parsedpublic static EsperEPL2GrammarLexer newLexer(CharStream input)
public static EsperEPL2GrammarParser newParser(CommonTokenStream tokens)