public class ASTUtil
extends java.lang.Object
Constructor and Description |
---|
ASTUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
dumpAST(java.io.PrintWriter printer,
Tree ast,
int ident) |
static void |
dumpAST(Tree ast)
Dump the AST node to system.out.
|
static int |
getAssertTerminatedTokenType(ParseTree child) |
static java.util.List<java.lang.String> |
getIdentList(EsperEPL2GrammarParser.ColumnListContext ctx) |
static java.lang.String |
getPropertyName(EsperEPL2GrammarParser.EventPropertyContext ctx,
int startNode) |
static int |
getRuleIndexIfProvided(ParseTree tree) |
static boolean |
isRecursiveParentRule(ParserRuleContext ctx,
java.util.Set<java.lang.Integer> rulesIds) |
static boolean |
isTerminatedOfType(Tree child,
int tokenType) |
static java.lang.String |
printNode(Tree node) |
static void |
printTokens(CommonTokenStream tokens)
Print the token stream to the logger.
|
static java.lang.String |
unescapeBacktick(java.lang.String text) |
static java.lang.String |
unescapeClassIdent(EsperEPL2GrammarParser.ClassIdentifierContext classIdentCtx) |
static int |
unescapedIndexOfDot(java.lang.String identifier)
Find the index of an unescaped dot (.) character, or return -1 if none found.
|
static java.lang.String |
unescapeDot(java.lang.String identifierToUnescape)
Un-Escape all escaped dot characters in the text (identifier only) passed in.
|
public static java.util.List<java.lang.String> getIdentList(EsperEPL2GrammarParser.ColumnListContext ctx)
public static boolean isTerminatedOfType(Tree child, int tokenType)
public static int getRuleIndexIfProvided(ParseTree tree)
public static int getAssertTerminatedTokenType(ParseTree child)
public static java.lang.String printNode(Tree node)
public static boolean isRecursiveParentRule(ParserRuleContext ctx, java.util.Set<java.lang.Integer> rulesIds)
public static void dumpAST(Tree ast)
ast
- to dumppublic static void dumpAST(java.io.PrintWriter printer, Tree ast, int ident)
public static void printTokens(CommonTokenStream tokens)
tokens
- to printpublic static int unescapedIndexOfDot(java.lang.String identifier)
identifier
- text to find an un-escaped dot characterpublic static java.lang.String unescapeDot(java.lang.String identifierToUnescape)
identifierToUnescape
- text to un-escapepublic static java.lang.String getPropertyName(EsperEPL2GrammarParser.EventPropertyContext ctx, int startNode)
public static java.lang.String unescapeBacktick(java.lang.String text)
public static java.lang.String unescapeClassIdent(EsperEPL2GrammarParser.ClassIdentifierContext classIdentCtx)