diff --git a/runtime/Cpp/runtime/src/ANTLRErrorListener.h b/runtime/Cpp/runtime/src/ANTLRErrorListener.h index 7729b2537..888e4fa45 100755 --- a/runtime/Cpp/runtime/src/ANTLRErrorListener.h +++ b/runtime/Cpp/runtime/src/ANTLRErrorListener.h @@ -50,7 +50,7 @@ namespace antlr4 { /// the reporting of an error. It is null in the case where /// the parser was able to recover in line without exiting the /// surrounding rule. - virtual void syntaxError(IRecognizer *recognizer, Token *offendingSymbol, size_t line, + virtual void syntaxError(Recognizer *recognizer, Token *offendingSymbol, size_t line, size_t charPositionInLine, const std::string &msg, std::exception_ptr e) = 0; /** diff --git a/runtime/Cpp/runtime/src/BaseErrorListener.cpp b/runtime/Cpp/runtime/src/BaseErrorListener.cpp index 47ef00cbf..89b9510e1 100755 --- a/runtime/Cpp/runtime/src/BaseErrorListener.cpp +++ b/runtime/Cpp/runtime/src/BaseErrorListener.cpp @@ -8,7 +8,7 @@ using namespace antlr4; -void BaseErrorListener::syntaxError(IRecognizer * /*recognizer*/, Token * /*offendingSymbol*/, size_t /*line*/, +void BaseErrorListener::syntaxError(Recognizer * /*recognizer*/, Token * /*offendingSymbol*/, size_t /*line*/, size_t /*charPositionInLine*/, const std::string &/*msg*/, std::exception_ptr /*e*/) { } diff --git a/runtime/Cpp/runtime/src/BaseErrorListener.h b/runtime/Cpp/runtime/src/BaseErrorListener.h index 75aefc60a..069e8bd8f 100755 --- a/runtime/Cpp/runtime/src/BaseErrorListener.h +++ b/runtime/Cpp/runtime/src/BaseErrorListener.h @@ -20,7 +20,7 @@ namespace antlr4 { */ class ANTLR4CPP_PUBLIC BaseErrorListener : public ANTLRErrorListener { - virtual void syntaxError(IRecognizer *recognizer, Token * offendingSymbol, size_t line, size_t charPositionInLine, + virtual void syntaxError(Recognizer *recognizer, Token * offendingSymbol, size_t line, size_t charPositionInLine, const std::string &msg, std::exception_ptr e) override; virtual void reportAmbiguity(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex, size_t stopIndex, bool exact, diff --git a/runtime/Cpp/runtime/src/ConsoleErrorListener.cpp b/runtime/Cpp/runtime/src/ConsoleErrorListener.cpp index 3f06925f8..7ab242db2 100755 --- a/runtime/Cpp/runtime/src/ConsoleErrorListener.cpp +++ b/runtime/Cpp/runtime/src/ConsoleErrorListener.cpp @@ -9,7 +9,7 @@ using namespace antlr4; ConsoleErrorListener ConsoleErrorListener::INSTANCE; -void ConsoleErrorListener::syntaxError(IRecognizer * /*recognizer*/, Token * /*offendingSymbol*/, +void ConsoleErrorListener::syntaxError(Recognizer * /*recognizer*/, Token * /*offendingSymbol*/, size_t line, size_t charPositionInLine, const std::string &msg, std::exception_ptr /*e*/) { std::cerr << "line " << line << ":" << charPositionInLine << " " << msg << std::endl; } diff --git a/runtime/Cpp/runtime/src/ConsoleErrorListener.h b/runtime/Cpp/runtime/src/ConsoleErrorListener.h index a0869b6ad..4df9d6919 100755 --- a/runtime/Cpp/runtime/src/ConsoleErrorListener.h +++ b/runtime/Cpp/runtime/src/ConsoleErrorListener.h @@ -28,7 +28,7 @@ namespace antlr4 { * line line:charPositionInLine msg * */ - virtual void syntaxError(IRecognizer *recognizer, Token * offendingSymbol, size_t line, size_t charPositionInLine, + virtual void syntaxError(Recognizer *recognizer, Token * offendingSymbol, size_t line, size_t charPositionInLine, const std::string &msg, std::exception_ptr e) override; }; diff --git a/runtime/Cpp/runtime/src/ProxyErrorListener.cpp b/runtime/Cpp/runtime/src/ProxyErrorListener.cpp index 45ad43c22..b1f43d100 100755 --- a/runtime/Cpp/runtime/src/ProxyErrorListener.cpp +++ b/runtime/Cpp/runtime/src/ProxyErrorListener.cpp @@ -23,7 +23,7 @@ void ProxyErrorListener::removeErrorListeners() { _delegates.clear(); } -void ProxyErrorListener::syntaxError(IRecognizer *recognizer, Token *offendingSymbol, size_t line, +void ProxyErrorListener::syntaxError(Recognizer *recognizer, Token *offendingSymbol, size_t line, size_t charPositionInLine, const std::string &msg, std::exception_ptr e) { for (auto listener : _delegates) { diff --git a/runtime/Cpp/runtime/src/ProxyErrorListener.h b/runtime/Cpp/runtime/src/ProxyErrorListener.h index f2d8d47ea..2b0b43562 100755 --- a/runtime/Cpp/runtime/src/ProxyErrorListener.h +++ b/runtime/Cpp/runtime/src/ProxyErrorListener.h @@ -22,7 +22,7 @@ namespace antlr4 { void removeErrorListener(ANTLRErrorListener *listener); void removeErrorListeners(); - void syntaxError(IRecognizer *recognizer, Token *offendingSymbol, size_t line, size_t charPositionInLine, + void syntaxError(Recognizer *recognizer, Token *offendingSymbol, size_t line, size_t charPositionInLine, const std::string &msg, std::exception_ptr e) override; virtual void reportAmbiguity(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex, size_t stopIndex, bool exact, diff --git a/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.cpp b/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.cpp index aa678e833..089eec1d2 100755 --- a/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.cpp +++ b/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.cpp @@ -8,6 +8,6 @@ using namespace antlr4; using namespace antlr4::tree::xpath; -void XPathLexerErrorListener::syntaxError(IRecognizer * /*recognizer*/, Token * /*offendingSymbol*/, +void XPathLexerErrorListener::syntaxError(Recognizer * /*recognizer*/, Token * /*offendingSymbol*/, size_t /*line*/, size_t /*charPositionInLine*/, const std::string &/*msg*/, std::exception_ptr /*e*/) { } diff --git a/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.h b/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.h index f6c51cb93..dba7a5167 100755 --- a/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.h +++ b/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.h @@ -13,7 +13,7 @@ namespace xpath { class ANTLR4CPP_PUBLIC XPathLexerErrorListener : public BaseErrorListener { public: - virtual void syntaxError(IRecognizer *recognizer, Token *offendingSymbol, size_t line, + virtual void syntaxError(Recognizer *recognizer, Token *offendingSymbol, size_t line, size_t charPositionInLine, const std::string &msg, std::exception_ptr e) override; };