public final class ErrorCollector extends java.lang.Object implements ErrorListener
ErrorListener that collect and enhance the errors send by the CQL lexer and parser.| Constructor and Description |
|---|
ErrorCollector(java.lang.String query)
Creates a new
ErrorCollector instance to collect the syntax errors associated to the specified CQL
query. |
| Modifier and Type | Method and Description |
|---|---|
void |
syntaxError(org.antlr.runtime.BaseRecognizer recognizer,
java.lang.String errorMsg)
Invoked when a syntax error with a specified message occurs.
|
void |
syntaxError(org.antlr.runtime.BaseRecognizer recognizer,
java.lang.String[] tokenNames,
org.antlr.runtime.RecognitionException e)
Invoked when a syntax error occurs.
|
void |
throwFirstSyntaxError()
Throws the first syntax error found by the lexer or the parser if it exists.
|
public ErrorCollector(java.lang.String query)
ErrorCollector instance to collect the syntax errors associated to the specified CQL
query.query - the CQL query that will be parsedpublic void syntaxError(org.antlr.runtime.BaseRecognizer recognizer,
java.lang.String[] tokenNames,
org.antlr.runtime.RecognitionException e)
syntaxError in interface ErrorListenerrecognizer - the parser or lexer that emitted the errortokenNames - the token namese - the exceptionpublic void syntaxError(org.antlr.runtime.BaseRecognizer recognizer,
java.lang.String errorMsg)
syntaxError in interface ErrorListenerrecognizer - the parser or lexer that emitted the errorerrorMsg - the error messagepublic void throwFirstSyntaxError()
throws SyntaxException
SyntaxException - the syntax error.Copyright © 2016 The Apache Software Foundation