diff --git a/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg b/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg index 4ab4e53f2..902563612 100644 --- a/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg +++ b/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg @@ -123,8 +123,8 @@ public abstract class extend =}; separator=", ", wrap, anchor>; public static final String[] tokenNames = { - "\", "\", "\", - }; separator=", ", wrap, anchor> + "\", + }; separator=", ", wrap, anchor> }; public static final int = }; separator=", ", wrap, anchor>; @@ -723,7 +723,7 @@ public abstract class extends }; public static final String[] tokenNames = { - "\", "\", "\", + "\", }; separator=", ", wrap, anchor> }; public static final String[] ruleNames = { diff --git a/tool/test/org/antlr/v4/test/TestATNInterpreter.java b/tool/test/org/antlr/v4/test/TestATNInterpreter.java index fd813435c..5a557ea50 100644 --- a/tool/test/org/antlr/v4/test/TestATNInterpreter.java +++ b/tool/test/org/antlr/v4/test/TestATNInterpreter.java @@ -80,7 +80,7 @@ public class TestATNInterpreter extends BaseTest { errorTokenType = re.getOffendingToken().getType(); } assertEquals(1, errorIndex); - assertEquals(errorTokenType, 5); + assertEquals(3, errorTokenType); } @Test public void testMustTrackPreviousGoodAlt2() throws Exception { @@ -106,7 +106,7 @@ public class TestATNInterpreter extends BaseTest { errorTokenType = re.getOffendingToken().getType(); } assertEquals(2, errorIndex); - assertEquals(errorTokenType, 6); + assertEquals(4, errorTokenType); } @Test public void testMustTrackPreviousGoodAlt3() throws Exception { @@ -129,7 +129,7 @@ public class TestATNInterpreter extends BaseTest { errorTokenType = re.getOffendingToken().getType(); } assertEquals(2, errorIndex); - assertEquals(errorTokenType, 6); + assertEquals(4, errorTokenType); } @Test public void testAmbigAltChooseFirst() throws Exception {