]> gitweb.ps.run Git - toc/blob - antlr4-cpp-runtime-4.9.2-source/runtime/src/atn/ErrorInfo.h
add antlr source code and ReadMe
[toc] / antlr4-cpp-runtime-4.9.2-source / runtime / src / atn / ErrorInfo.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 "atn/DecisionEventInfo.h"
9
10 namespace antlr4 {
11 namespace atn {
12
13   /// <summary>
14   /// This class represents profiling event information for a syntax error
15   /// identified during prediction. Syntax errors occur when the prediction
16   /// algorithm is unable to identify an alternative which would lead to a
17   /// successful parse.
18   /// </summary>
19   /// <seealso cref= Parser#notifyErrorListeners(Token, String, RecognitionException) </seealso>
20   /// <seealso cref= ANTLRErrorListener#syntaxError
21   ///
22   /// @since 4.3 </seealso>
23   class ANTLR4CPP_PUBLIC ErrorInfo : public DecisionEventInfo {
24   public:
25     /// <summary>
26     /// Constructs a new instance of the <seealso cref="ErrorInfo"/> class with the
27     /// specified detailed syntax error information.
28     /// </summary>
29     /// <param name="decision"> The decision number </param>
30     /// <param name="configs"> The final configuration set reached during prediction
31     /// prior to reaching the <seealso cref="ATNSimulator#ERROR"/> state </param>
32     /// <param name="input"> The input token stream </param>
33     /// <param name="startIndex"> The start index for the current prediction </param>
34     /// <param name="stopIndex"> The index at which the syntax error was identified </param>
35     /// <param name="fullCtx"> {@code true} if the syntax error was identified during LL
36     /// prediction; otherwise, {@code false} if the syntax error was identified
37     /// during SLL prediction </param>
38     ErrorInfo(size_t decision, ATNConfigSet *configs, TokenStream *input, size_t startIndex, size_t stopIndex,
39               bool fullCtx);
40   };
41
42 } // namespace atn
43 } // namespace antlr4