Fix syntaxError prototype in order to use Recognizer instead of IRecognizer.

This commit is contained in:
thomasb8138 2017-02-26 20:11:08 +01:00
parent c3785ce89d
commit c668c931fd
9 changed files with 9 additions and 9 deletions

View File

@ -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. </param>
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;
/**

View File

@ -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*/) {
}

View File

@ -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,

View File

@ -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;
}

View File

@ -28,7 +28,7 @@ namespace antlr4 {
* line <em>line</em>:<em>charPositionInLine</em> <em>msg</em>
* </pre>
*/
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;
};

View File

@ -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) {

View File

@ -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,

View File

@ -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*/) {
}

View File

@ -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;
};