Package io.debezium.antlr
Class ParsingErrorListener
- java.lang.Object
-
- org.antlr.v4.runtime.BaseErrorListener
-
- io.debezium.antlr.ParsingErrorListener
-
- All Implemented Interfaces:
org.antlr.v4.runtime.ANTLRErrorListener
public class ParsingErrorListener extends org.antlr.v4.runtime.BaseErrorListenerANTLR parsing error listener. This listener will collect all errors, which may appear during a construction of parsed tree.- Author:
- Roman Kuchár
.
-
-
Field Summary
Fields Modifier and Type Field Description private BiFunction<ParsingException,Collection<ParsingException>,Collection<ParsingException>>accumulateErrorprivate Collection<ParsingException>errorsprivate StringparsedDdl
-
Constructor Summary
Constructors Constructor Description ParsingErrorListener(String parsedDdl, BiFunction<ParsingException,Collection<ParsingException>,Collection<ParsingException>> accumulateError)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<ParsingException>getErrors()voidsyntaxError(org.antlr.v4.runtime.Recognizer<?,?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, org.antlr.v4.runtime.RecognitionException e)Parsing error listener, which will throw up an exception.
-
-
-
Field Detail
-
errors
private Collection<ParsingException> errors
-
accumulateError
private final BiFunction<ParsingException,Collection<ParsingException>,Collection<ParsingException>> accumulateError
-
parsedDdl
private final String parsedDdl
-
-
Constructor Detail
-
ParsingErrorListener
public ParsingErrorListener(String parsedDdl, BiFunction<ParsingException,Collection<ParsingException>,Collection<ParsingException>> accumulateError)
-
-
Method Detail
-
syntaxError
public void syntaxError(org.antlr.v4.runtime.Recognizer<?,?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, org.antlr.v4.runtime.RecognitionException e)Parsing error listener, which will throw up an exception.- Specified by:
syntaxErrorin interfaceorg.antlr.v4.runtime.ANTLRErrorListener- Overrides:
syntaxErrorin classorg.antlr.v4.runtime.BaseErrorListener
-
getErrors
public Collection<ParsingException> getErrors()
-
-