Example #1
0
        public static void DanglingState(DecisionProbe probe,
                                         DFAState d)
        {
            GetErrorState().errors++;
            Message msg = new GrammarDanglingStateMessage(probe, d);

            GetErrorState().errorMsgIDs.Add(msg.msgID);
            ICollection <object> seen = (ICollection <object>)emitSingleError.get("danglingState");

            if (!seen.Contains(d.dfa.decisionNumber + "|" + d.AltSet))
            {
                GetErrorListener().Error(msg);
                // we've seen this decision and this alt set; never again
                seen.Add(d.dfa.decisionNumber + "|" + d.AltSet);
            }
        }
Example #2
0
 public static bool contains <T>(this ICollection <T> list, T value)
 {
     return(list.Contains(value));
 }
Example #3
0
 /// <inheritdoc/>
 bool ICollection <TValue> .Contains(TValue item)
 {
     return(_values.Contains(item));
 }
Example #4
0
 /// <inheritdoc/>
 bool ICollection <TKey> .Contains(TKey item)
 {
     return(_keys.Contains(item));
 }