public GrammarDanglingStateMessage( DecisionProbe probe,
                                    DFAState problemState )
     : base(ErrorManager.MSG_DANGLING_STATE)
 {
     this.probe = probe;
     this.problemState = problemState;
 }
Exemplo n.º 2
0
 public GrammarDanglingStateMessage(DecisionProbe probe,
                                    DFAState problemState)
     : base(ErrorManager.MSG_DANGLING_STATE)
 {
     this.probe        = probe;
     this.problemState = problemState;
 }
Exemplo n.º 3
0
        public static void Nondeterminism(DecisionProbe probe,
                                          DFAState d)
        {
            GetErrorState().warnings++;
            Message msg = new GrammarNonDeterminismMessage(probe, d);

            GetErrorState().warningMsgIDs.Add(msg.msgID);
            GetErrorListener().Warning(msg);
        }
Exemplo n.º 4
0
        public static void InsufficientPredicates(DecisionProbe probe,
                                                  DFAState d,
                                                  IDictionary <int, ICollection <IToken> > altToUncoveredLocations)
        {
            GetErrorState().warnings++;
            Message msg = new GrammarInsufficientPredicatesMessage(probe, d, altToUncoveredLocations);

            GetErrorState().warningMsgIDs.Add(msg.msgID);
            GetErrorListener().Warning(msg);
        }
Exemplo n.º 5
0
 public GrammarNonDeterminismMessage(DecisionProbe probe,
                                     DFAState problemState)
     : base(ErrorManager.MSG_GRAMMAR_NONDETERMINISM)
 {
     this.probe        = probe;
     this.problemState = problemState;
     // flip msg ID if alts are actually token refs in Tokens rule
     if (probe.dfa.IsTokensRuleDecision)
     {
         MessageID = ErrorManager.MSG_TOKEN_NONDETERMINISM;
     }
 }
 public GrammarNonDeterminismMessage( DecisionProbe probe,
                                     DFAState problemState )
     : base(ErrorManager.MSG_GRAMMAR_NONDETERMINISM)
 {
     this.probe = probe;
     this.problemState = problemState;
     // flip msg ID if alts are actually token refs in Tokens rule
     if ( probe.dfa.IsTokensRuleDecision )
     {
         MessageID = ErrorManager.MSG_TOKEN_NONDETERMINISM;
     }
 }
Exemplo n.º 7
0
        public static void RecursionOverflow(DecisionProbe probe,
                                             DFAState sampleBadState,
                                             int alt,
                                             ICollection <string> targetRules,
                                             ICollection <ICollection <NFAState> > callSiteStates)
        {
            GetErrorState().errors++;
            Message msg = new RecursionOverflowMessage(probe, sampleBadState, alt,
                                                       targetRules, callSiteStates);

            GetErrorState().errorMsgIDs.Add(msg.msgID);
            GetErrorListener().Error(msg);
        }
Exemplo n.º 8
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);
            }
        }
Exemplo n.º 9
0
 public static void RecursionOverflow( DecisionProbe probe,
                                      DFAState sampleBadState,
                                      int alt,
                                      ICollection<string> targetRules,
                                      ICollection<ICollection<NFAState>> callSiteStates )
 {
     GetErrorState().errors++;
     Message msg = new RecursionOverflowMessage( probe, sampleBadState, alt,
                                      targetRules, callSiteStates );
     GetErrorState().errorMsgIDs.Add( msg.msgID );
     GetErrorListener().Error( msg );
 }
Exemplo n.º 10
0
 public static void Nondeterminism( DecisionProbe probe,
                                   DFAState d )
 {
     GetErrorState().warnings++;
     Message msg = new GrammarNonDeterminismMessage( probe, d );
     GetErrorState().warningMsgIDs.Add( msg.msgID );
     GetErrorListener().Warning( msg );
 }
Exemplo n.º 11
0
 public static void InsufficientPredicates( DecisionProbe probe,
                                           DFAState d,
                                           IDictionary<int, ICollection<IToken>> altToUncoveredLocations )
 {
     GetErrorState().warnings++;
     Message msg = new GrammarInsufficientPredicatesMessage( probe, d, altToUncoveredLocations );
     GetErrorState().warningMsgIDs.Add( msg.msgID );
     GetErrorListener().Warning( msg );
 }
Exemplo n.º 12
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 );
     }
 }