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"
13 /// This class represents profiling event information for tracking the lookahead
14 /// depth required in order to make a prediction.
15 class ANTLR4CPP_PUBLIC LookaheadEventInfo : public DecisionEventInfo {
17 /// The alternative chosen by adaptivePredict(), not necessarily
18 /// the outermost alt shown for a rule; left-recursive rules have
19 /// user-level alts that differ from the rewritten rule with a (...) block
21 size_t predictedAlt = 0;
24 /// Constructs a new instance of the <seealso cref="LookaheadEventInfo"/> class with
25 /// the specified detailed lookahead information.
27 /// <param name="decision"> The decision number </param>
28 /// <param name="configs"> The final configuration set containing the necessary
29 /// information to determine the result of a prediction, or {@code null} if
30 /// the final configuration set is not available </param>
31 /// <param name="input"> The input token stream </param>
32 /// <param name="startIndex"> The start index for the current prediction </param>
33 /// <param name="stopIndex"> The index at which the prediction was finally made </param>
34 /// <param name="fullCtx"> {@code true} if the current lookahead is part of an LL
35 /// prediction; otherwise, {@code false} if the current lookahead is part of
36 /// an SLL prediction </param>
37 LookaheadEventInfo(size_t decision, ATNConfigSet *configs, size_t predictedAlt, TokenStream *input, size_t startIndex,
38 size_t stopIndex, bool fullCtx);