forked from jasder/antlr
Fix syntaxError prototype in order to use Recognizer instead of IRecognizer.
This commit is contained in:
parent
c3785ce89d
commit
c668c931fd
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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*/) {
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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*/) {
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue