diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ATNSimulator.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ATNSimulator.java index 224cad6f6..39a3c3833 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/atn/ATNSimulator.java +++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ATNSimulator.java @@ -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