From d6e2e41c1f92e3f3fceac6948397b1aad2f9271d Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sun, 1 Apr 2012 14:28:58 -0500 Subject: [PATCH] Fix stop index --- .../Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java index 81250b5e7..d324e836b 100755 --- a/runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java +++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java @@ -397,7 +397,7 @@ public class ParserATNSimulator extends ATNSimulator { if ( dfa_debug && t>=0 ) System.out.println("no edge for "+parser.getTokenNames()[t]); int alt; if ( dfa_debug ) { - Interval interval = Interval.of(startIndex, parser.getTokenStream().size()-1); + Interval interval = Interval.of(startIndex, parser.getTokenStream().index()); System.out.println("ATN exec upon "+ parser.getTokenStream().getText(interval) + " at DFA state "+s.stateNumber);