]> gitweb.ps.run Git - toc/blob - antlr4-cpp-runtime-4.9.2-source/runtime/src/ConsoleErrorListener.h
add antlr source code and ReadMe
[toc] / antlr4-cpp-runtime-4.9.2-source / runtime / src / ConsoleErrorListener.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 "BaseErrorListener.h"
9
10 namespace antlr4 {
11
12   class ANTLR4CPP_PUBLIC ConsoleErrorListener : public BaseErrorListener {
13   public:
14     /**
15      * Provides a default instance of {@link ConsoleErrorListener}.
16      */
17     static ConsoleErrorListener INSTANCE;
18
19     /**
20      * {@inheritDoc}
21      *
22      * <p>
23      * This implementation prints messages to {@link System#err} containing the
24      * values of {@code line}, {@code charPositionInLine}, and {@code msg} using
25      * the following format.</p>
26      *
27      * <pre>
28      * line <em>line</em>:<em>charPositionInLine</em> <em>msg</em>
29      * </pre>
30      */
31     virtual void syntaxError(Recognizer *recognizer, Token * offendingSymbol, size_t line, size_t charPositionInLine,
32                              const std::string &msg, std::exception_ptr e) override;
33   };
34
35 } // namespace antlr4