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