示例#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);
            }
        }
示例#2
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;
     emitSingleError.TryGetValue("danglingState", out seen);
     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 );
     }
 }