Package io.debezium.antlr
Class ProxyParseTreeListenerUtil
- java.lang.Object
-
- io.debezium.antlr.ProxyParseTreeListenerUtil
-
public class ProxyParseTreeListenerUtil extends Object
Utility class that implements a helper method for achieving a delegation of parsed rules to multiple listeners. For example implementation of proxy parse tree listener see ANTLR issue about it.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateProxyParseTreeListenerUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddelegateEnterRule(org.antlr.v4.runtime.ParserRuleContext ctx, Collection<org.antlr.v4.runtime.tree.ParseTreeListener> listeners, Collection<ParsingException> errors)Delegates enter rule event to collection of parsing listeners and captures parsing exceptions that may appear.static voiddelegateExitRule(org.antlr.v4.runtime.ParserRuleContext ctx, Collection<org.antlr.v4.runtime.tree.ParseTreeListener> listeners, Collection<ParsingException> errors)Delegates exit rule event to collection of parsing listeners and captures parsing exceptions that may appear.static voidvisitErrorNode(org.antlr.v4.runtime.tree.ErrorNode node, Collection<org.antlr.v4.runtime.tree.ParseTreeListener> listeners, Collection<ParsingException> errors)Delegates visit error node event to collection of parsing listeners and captures parsing exceptions that may appear.static voidvisitTerminal(org.antlr.v4.runtime.tree.TerminalNode node, Collection<org.antlr.v4.runtime.tree.ParseTreeListener> listeners, Collection<ParsingException> errors)Delegates visit terminal event to collection of parsing listeners and captures parsing exceptions that may appear.
-
-
-
Method Detail
-
delegateEnterRule
public static void delegateEnterRule(org.antlr.v4.runtime.ParserRuleContext ctx, Collection<org.antlr.v4.runtime.tree.ParseTreeListener> listeners, Collection<ParsingException> errors)Delegates enter rule event to collection of parsing listeners and captures parsing exceptions that may appear.- Parameters:
ctx- enter rule context; may not be nulllisteners- collection of listeners; may not be nullerrors- collection of errors; may not be null
-
delegateExitRule
public static void delegateExitRule(org.antlr.v4.runtime.ParserRuleContext ctx, Collection<org.antlr.v4.runtime.tree.ParseTreeListener> listeners, Collection<ParsingException> errors)Delegates exit rule event to collection of parsing listeners and captures parsing exceptions that may appear.- Parameters:
ctx- exit rule context; may not be nulllisteners- collection of listeners; may not be nullerrors- collection of errors; may not be null
-
visitErrorNode
public static void visitErrorNode(org.antlr.v4.runtime.tree.ErrorNode node, Collection<org.antlr.v4.runtime.tree.ParseTreeListener> listeners, Collection<ParsingException> errors)Delegates visit error node event to collection of parsing listeners and captures parsing exceptions that may appear.- Parameters:
node- error node; may not be nulllisteners- collection of listeners; may not be nullerrors- collection of errors; may not be null
-
visitTerminal
public static void visitTerminal(org.antlr.v4.runtime.tree.TerminalNode node, Collection<org.antlr.v4.runtime.tree.ParseTreeListener> listeners, Collection<ParsingException> errors)Delegates visit terminal event to collection of parsing listeners and captures parsing exceptions that may appear.- Parameters:
node- terminal node; may not be nulllisteners- collection of listeners; may not be nullerrors- collection of errors; may not be null
-
-