public static boolean hasSLLConflictTerminatingPrediction(PredictionMode mode, ATNConfigSet configs) {if (allConfigsInRuleStopStates(configs)) {return true;}if ( mode == PredictionMode.SLL ) {if ( configs.hasSemanticContext ) {ATNConfigSet dup = new ATNConfigSet();for (ATNConfig c : configs) {c = new ATNConfig(c,SemanticContext.NONE);dup.add(c);}configs = dup;}}Collection<BitSet> altsets = getConflictingAltSubsets(configs);boolean heuristic =hasConflictingAltSet(altsets) && !hasStateAssociatedWithOneAlt(configs);return heuristic;}
public static bool HasSLLConflictTerminatingPrediction(PredictionMode mode, ATNConfigSet configSet){if (AllConfigsInRuleStopStates(configSet.configs)){return true;}if (mode == PredictionMode.SLL){if (configSet.hasSemanticContext){ATNConfigSet dup = new ATNConfigSet();foreach (ATNConfig c in configSet.configs){dup.Add(new ATNConfig(c, SemanticContext.NONE));}configSet = dup;}}ICollection<BitSet> altsets = GetConflictingAltSubsets(configSet.configs);bool heuristic = HasConflictingAltSet(altsets) && !HasStateAssociatedWithOneAlt(configSet.configs);return heuristic;}