1 module antlr.v4.runtime.atn.PredictionModeConst;
2 
3 /**
4  * This enumeration defines the prediction modes available in ANTLR 4 along with
5  * utility methods for analyzing configuration sets for conflicts and/or
6  * ambiguities.
7  *******************
8  * SSL;
9  * The SLL(*) prediction mode. This prediction mode ignores the current
10  * parser context when making predictions. This is the fastest prediction
11  * mode, and provides correct results for many grammars. This prediction
12  * mode is more powerful than the prediction mode provided by ANTLR 3, but
13  * may result in syntax errors for grammar and input combinations which are
14  * not SLL.
15  *
16  * <p>
17  * When using this prediction mode, the parser will either return a correct
18  * parse tree (i.e. the same parse tree that would be returned with the
19  * {@link #LL} prediction mode), or it will report a syntax error. If a
20  * syntax error is encountered when using the {@link #SLL} prediction mode,
21  * it may be due to either an actual syntax error in the input or indicate
22  * that the particular combination of grammar and input requires the more
23  * powerful {@link #LL} prediction abilities to complete successfully.</p>
24  *
25  * <p>
26  * This prediction mode does not provide any guarantees for prediction
27  * behavior for syntactically-incorrect inputs.</p>
28  *
29  *******************
30  * LL;
31  * The LL(*) prediction mode. This prediction mode allows the current parser
32  * context to be used for resolving SLL conflicts that occur during
33  * prediction. This is the fastest prediction mode that guarantees correct
34  * parse results for all combinations of grammars with syntactically correct
35  * inputs.
36  *
37  * <p>
38  * When using this prediction mode, the parser will make correct decisions
39  * for all syntactically-correct grammar and input combinations. However, in
40  * cases where the grammar is truly ambiguous this prediction mode might not
41  * report a precise answer for <em>exactly which</em> alternatives are
42  * ambiguous.</p>
43  *
44  * <p>
45  * This prediction mode does not provide any guarantees for prediction
46  * behavior for syntactically-incorrect inputs.</p>
47  *
48  *******************
49  * LL_EXACT_AMBIG_DETECTION;
50  * The LL(*) prediction mode with exact ambiguity detection. In addition to
51  * the correctness guarantees provided by the {@link #LL} prediction mode,
52  * this prediction mode instructs the prediction algorithm to determine the
53  * complete and exact set of ambiguous alternatives for every ambiguous
54  * decision encountered while parsing.
55  *
56  * <p>
57  * This prediction mode may be used for diagnosing ambiguities during
58  * grammar development. Due to the performance overhead of calculating sets
59  * of ambiguous alternatives, this prediction mode should be avoided when
60  * the exact results are not necessary.</p>
61  *
62  * <p>
63  * This prediction mode does not provide any guarantees for prediction
64  * behavior for syntactically-incorrect inputs.</p>
65  */
66 enum PredictionModeConst
67 {
68     SLL,
69     LL,
70     LL_EXACT_AMBIG_DETECTION,
71 }