Remove code to explicitly add EOF transitions to rule stop states with no outgoing edges

This commit is contained in:
Sam Harwell 2012-11-03 15:44:11 -05:00
parent fbaac8194b
commit 28e29e39dc
1 changed files with 0 additions and 11 deletions

View File

@ -103,9 +103,6 @@ public abstract class ATNSimulator {
atn.grammarType = toInt(data[p++]);
atn.maxTokenType = toInt(data[p++]);
// Set up target of all EOF edges emanating from rule stop states
ATNState eofTarget = new ATNState();
//
// STATES
//
@ -237,14 +234,6 @@ public abstract class ATNSimulator {
}
}
// If no edges out of stop state, add EOF transition
for (RuleStopState ruleStopState : atn.ruleToStopState) {
if ( ruleStopState.getNumberOfTransitions()==0 ) {
Transition t = new AtomTransition(eofTarget, Token.EOF);
ruleStopState.addTransition(t);
}
}
for (ATNState state : atn.states) {
if (state instanceof BlockStartState) {
// we need to know the end state to set its start state