public GrammarDanglingStateMessage( DecisionProbe probe, DFAState problemState ) : base(ErrorManager.MSG_DANGLING_STATE) { this.probe = probe; this.problemState = problemState; }
public GrammarDanglingStateMessage(DecisionProbe probe, DFAState problemState) : base(ErrorManager.MSG_DANGLING_STATE) { this.probe = probe; this.problemState = problemState; }
public static void Nondeterminism(DecisionProbe probe, DFAState d) { GetErrorState().warnings++; Message msg = new GrammarNonDeterminismMessage(probe, d); GetErrorState().warningMsgIDs.Add(msg.msgID); GetErrorListener().Warning(msg); }
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); }
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; } }
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); }
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); } }
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 ); }
public static void Nondeterminism( DecisionProbe probe, DFAState d ) { GetErrorState().warnings++; Message msg = new GrammarNonDeterminismMessage( probe, d ); GetErrorState().warningMsgIDs.Add( msg.msgID ); GetErrorListener().Warning( msg ); }
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 ); }
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 ); } }