Class ASTUtil
java.lang.Object
com.espertech.esper.compiler.internal.parse.ASTUtil
Utility class for AST node handling.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
dumpAST
(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.static int
getAssertTerminatedTokenType
(org.antlr.v4.runtime.tree.ParseTree child) static String
getPropertyName
(EsperEPL2GrammarParser.ChainableContext ctx, int startNode) static int
getRuleIndexIfProvided
(org.antlr.v4.runtime.tree.ParseTree tree) static String
static boolean
isRecursiveParentRule
(org.antlr.v4.runtime.ParserRuleContext ctx, Set<Integer> rulesIds) static boolean
isTerminatedOfType
(org.antlr.v4.runtime.tree.Tree child, int tokenType) static 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 String
unescapeClassIdent
(EsperEPL2GrammarParser.ClassIdentifierContext classIdentCtx) static String
-
Constructor Details
-
ASTUtil
public ASTUtil()
-
-
Method Details
-
getIdentList
-
getIdentList
-
isTerminatedOfType
public static boolean isTerminatedOfType(org.antlr.v4.runtime.tree.Tree child, int tokenType) -
getRuleIndexIfProvided
public static int getRuleIndexIfProvided(org.antlr.v4.runtime.tree.ParseTree tree) -
getAssertTerminatedTokenType
public static int getAssertTerminatedTokenType(org.antlr.v4.runtime.tree.ParseTree child) -
printNode
-
isRecursiveParentRule
-
dumpAST
public static void dumpAST(org.antlr.v4.runtime.tree.Tree ast) Dump the AST node to system.out.- Parameters:
ast
- to dump
-
dumpAST
-
printTokens
public static void printTokens(org.antlr.v4.runtime.CommonTokenStream tokens) Print the token stream to the logger.- Parameters:
tokens
- to print
-
getPropertyName
-
unescapeClassIdent
public static String unescapeClassIdent(EsperEPL2GrammarParser.ClassIdentifierContext classIdentCtx) -
unescapeSlashIdentifier
public static String unescapeSlashIdentifier(EsperEPL2GrammarParser.SubstitutionSlashIdentContext ctx) -
getStreamNameUnescapedOptional
public static String getStreamNameUnescapedOptional(EsperEPL2GrammarParser.IdentOrTickedContext ctx)
-