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.
8 #include "atn/DecisionEventInfo.h"
14 /// This class represents profiling event information for a context sensitivity.
15 /// Context sensitivities are decisions where a particular input resulted in an
16 /// SLL conflict, but LL prediction produced a single unique alternative.
19 /// In some cases, the unique alternative identified by LL prediction is not
20 /// equal to the minimum represented alternative in the conflicting SLL
21 /// configuration set. Grammars and inputs which result in this scenario are
22 /// unable to use <seealso cref="PredictionMode#SLL"/>, which in turn means they cannot use
23 /// the two-stage parsing strategy to improve parsing performance for that
26 /// <seealso cref= ParserATNSimulator#reportContextSensitivity </seealso>
27 /// <seealso cref= ANTLRErrorListener#reportContextSensitivity
29 /// @since 4.3 </seealso>
30 class ANTLR4CPP_PUBLIC ContextSensitivityInfo : public DecisionEventInfo {
33 /// Constructs a new instance of the <seealso cref="ContextSensitivityInfo"/> class
34 /// with the specified detailed context sensitivity information.
36 /// <param name="decision"> The decision number </param>
37 /// <param name="configs"> The final configuration set containing the unique
38 /// alternative identified by full-context prediction </param>
39 /// <param name="input"> The input token stream </param>
40 /// <param name="startIndex"> The start index for the current prediction </param>
41 /// <param name="stopIndex"> The index at which the context sensitivity was
42 /// identified during full-context prediction </param>
43 ContextSensitivityInfo(size_t decision, ATNConfigSet *configs, TokenStream *input, size_t startIndex, size_t stopIndex);