use of org.antlr.analysis.NFAState in project antlrworks by antlr.
the class ANTLRGrammarEngineImpl method computeRuleError.
private void computeRuleError(GrammarError error, NonRegularDecisionMessage message) {
NFAState state = message.probe.dfa.getNFADecisionStartState();
for (Object alt : message.altsWithRecursion) {
// Use currently the unreachable alt for display purpose only
error.addUnreachableAlt(state, (Integer) alt);
error.addStates(state);
error.addRule(state.enclosingRule.name);
}
}
use of org.antlr.analysis.NFAState in project antlrworks by antlr.
the class ANTLRGrammarEngineImpl method computeRuleError.
private void computeRuleError(GrammarError error, GrammarUnreachableAltsMessage message) {
NFAState state = message.probe.dfa.getNFADecisionStartState();
for (Object alt : message.alts) {
error.addUnreachableAlt(state, (Integer) alt);
error.addStates(state);
error.addRule(state.enclosingRule.name);
}
}
Aggregations