forked from jasder/antlr
Remove code to explicitly add EOF transitions to rule stop states with no outgoing edges
This commit is contained in:
parent
fbaac8194b
commit
28e29e39dc
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue