]> gitweb.ps.run Git - toc/blob - antlr4-cpp-runtime-4.9.2-source/runtime/src/BaseErrorListener.h
add antlr source code and ReadMe
[toc] / antlr4-cpp-runtime-4.9.2-source / runtime / src / BaseErrorListener.h
1 /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
2  * Use of this file is governed by the BSD 3-clause license that
3  * can be found in the LICENSE.txt file in the project root.
4  */
5
6 #pragma once
7
8 #include "ANTLRErrorListener.h"
9
10 namespace antlrcpp {
11   class BitSet;
12 }
13
14 namespace antlr4 {
15
16   /**
17    * Provides an empty default implementation of {@link ANTLRErrorListener}. The
18    * default implementation of each method does nothing, but can be overridden as
19    * necessary.
20    */
21   class ANTLR4CPP_PUBLIC BaseErrorListener : public ANTLRErrorListener {
22
23     virtual void syntaxError(Recognizer *recognizer, Token * offendingSymbol, size_t line, size_t charPositionInLine,
24       const std::string &msg, std::exception_ptr e) override;
25
26     virtual void reportAmbiguity(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex, size_t stopIndex, bool exact,
27       const antlrcpp::BitSet &ambigAlts, atn::ATNConfigSet *configs) override;
28
29     virtual void reportAttemptingFullContext(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex, size_t stopIndex,
30       const antlrcpp::BitSet &conflictingAlts, atn::ATNConfigSet *configs) override;
31
32     virtual void reportContextSensitivity(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex, size_t stopIndex,
33       size_t prediction, atn::ATNConfigSet *configs) override;
34   };
35
36 } // namespace antlr4