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 AnalysisAborted(DecisionProbe probe) { GetErrorState().warnings++; Message msg = new GrammarAnalysisAbortedMessage(probe); GetErrorState().warningMsgIDs.Add(msg.msgID); GetErrorListener().Warning(msg); }
public static void NonLLStarDecision(DecisionProbe probe) { GetErrorState().errors++; Message msg = new NonRegularDecisionMessage(probe, probe.NonDeterministicAlts); GetErrorState().errorMsgIDs.Add(msg.msgID); GetErrorListener().Error(msg); }
public static void UnreachableAlts(DecisionProbe probe, IEnumerable <int> alts) { GetErrorState().errors++; Message msg = new GrammarUnreachableAltsMessage(probe, alts); 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); }
// TODO: we can remove I think. All detected now with cycles check. public static void LeftRecursion(DecisionProbe probe, int alt, ICollection targetRules, ICollection callSiteStates) { getErrorState().warnings++; Message msg = new LeftRecursionMessage(probe, alt, targetRules, callSiteStates); 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 GrammarUnreachableAltsMessage(DecisionProbe probe, IEnumerable <int> alts) : base(ErrorManager.MSG_UNREACHABLE_ALTS) { this.probe = probe; this.alts = alts.ToArray(); // flip msg ID if alts are actually token refs in Tokens rule if (probe.Dfa.IsTokensRuleDecision) { MessageID = ErrorManager.MSG_UNREACHABLE_TOKENS; } }
public GrammarUnreachableAltsMessage( DecisionProbe probe, IEnumerable<int> alts ) : base(ErrorManager.MSG_UNREACHABLE_ALTS) { this.probe = probe; this.alts = alts.ToArray(); // flip msg ID if alts are actually token refs in Tokens rule if ( probe.Dfa.IsTokensRuleDecision ) { MessageID = ErrorManager.MSG_UNREACHABLE_TOKENS; } }
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 Nondeterminism( DecisionProbe probe, DFAState d ) { GetErrorState().warnings++; Message msg = new GrammarNonDeterminismMessage( probe, d ); GetErrorState().warningMsgIDs.Add( msg.msgID ); GetErrorListener().Warning( msg ); }
public NonRegularDecisionMessage(DecisionProbe probe, ICollection <int> altsWithRecursion) : base(ErrorManager.MSG_NONREGULAR_DECISION) { this.probe = probe; this.altsWithRecursion = altsWithRecursion; }
public GrammarAnalysisAbortedMessage(DecisionProbe probe) : base(ErrorManager.MSG_ANALYSIS_ABORTED) { this.probe = probe; }
public NonRegularDecisionMessage( DecisionProbe probe, ICollection<int> altsWithRecursion ) : base(ErrorManager.MSG_NONREGULAR_DECISION) { this.probe = probe; this.altsWithRecursion = altsWithRecursion; }
public GrammarAnalysisAbortedMessage( DecisionProbe probe ) : base(ErrorManager.MSG_ANALYSIS_ABORTED) { this.probe = probe; }
public static void AnalysisAborted( DecisionProbe probe ) { GetErrorState().warnings++; Message msg = new GrammarAnalysisAbortedMessage( probe ); GetErrorState().warningMsgIDs.Add( msg.msgID ); GetErrorListener().Warning( msg ); }
public static void UnreachableAlts( DecisionProbe probe, IEnumerable<int> alts ) { GetErrorState().errors++; Message msg = new GrammarUnreachableAltsMessage( probe, alts ); GetErrorState().errorMsgIDs.Add( msg.msgID ); GetErrorListener().Error( msg ); }
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 NonLLStarDecision( DecisionProbe probe ) { GetErrorState().errors++; Message msg = new NonRegularDecisionMessage( probe, probe.NonDeterministicAlts ); GetErrorState().errorMsgIDs.Add( msg.msgID ); GetErrorListener().Error( 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 ); } }