public class ASTUtil
extends java.lang.Object
Constructor and Description |
---|
ASTUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
dumpAST(java.io.PrintWriter printer,
org.antlr.v4.runtime.tree.Tree ast,
int ident) |
static void |
dumpAST(org.antlr.v4.runtime.tree.Tree ast)
Dump the AST node to system.out.
|
protected static java.lang.String |
escapeDot(java.lang.String identifierToEscape)
Escape all unescape dot characters in the text (identifier only) passed in.
|
static int |
getAssertTerminatedTokenType(org.antlr.v4.runtime.tree.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(org.antlr.v4.runtime.tree.ParseTree tree) |
static java.lang.String |
getStreamNameUnescapedOptional(EsperEPL2GrammarParser.IdentOrTickedContext ctx) |
static boolean |
isRecursiveParentRule(org.antlr.v4.runtime.ParserRuleContext ctx,
java.util.Set<java.lang.Integer> rulesIds) |
static boolean |
isTerminatedOfType(org.antlr.v4.runtime.tree.Tree child,
int tokenType) |
static java.lang.String |
printNode(org.antlr.v4.runtime.tree.Tree node) |
static void |
printTokens(org.antlr.v4.runtime.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.
|
static java.lang.String |
unescapeSlashIdentifier(EsperEPL2GrammarParser.SlashIdentifierContext ctx) |
public static java.util.List<java.lang.String> getIdentList(EsperEPL2GrammarParser.ColumnListContext ctx)
public static boolean isTerminatedOfType(org.antlr.v4.runtime.tree.Tree child, int tokenType)
public static int getRuleIndexIfProvided(org.antlr.v4.runtime.tree.ParseTree tree)
public static int getAssertTerminatedTokenType(org.antlr.v4.runtime.tree.ParseTree child)
public static java.lang.String printNode(org.antlr.v4.runtime.tree.Tree node)
public static boolean isRecursiveParentRule(org.antlr.v4.runtime.ParserRuleContext ctx, java.util.Set<java.lang.Integer> rulesIds)
public static void dumpAST(org.antlr.v4.runtime.tree.Tree ast)
ast
- to dumppublic static void dumpAST(java.io.PrintWriter printer, org.antlr.v4.runtime.tree.Tree ast, int ident)
public static void printTokens(org.antlr.v4.runtime.CommonTokenStream tokens)
tokens
- to printprotected static java.lang.String escapeDot(java.lang.String identifierToEscape)
identifierToEscape
- text to escapepublic 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)
public static java.lang.String unescapeSlashIdentifier(EsperEPL2GrammarParser.SlashIdentifierContext ctx)
public static java.lang.String getStreamNameUnescapedOptional(EsperEPL2GrammarParser.IdentOrTickedContext ctx)