diff --git a/tool/test/org/antlr/v4/test/TestATNSerialization.java b/tool/test/org/antlr/v4/test/TestATNSerialization.java index bc9b8e9ff..c9e94cf02 100644 --- a/tool/test/org/antlr/v4/test/TestATNSerialization.java +++ b/tool/test/org/antlr/v4/test/TestATNSerialization.java @@ -105,7 +105,7 @@ public class TestATNSerialization extends BaseTest { @Test public void testNot() throws Exception { Grammar g = new Grammar( "parser grammar T;\n"+ - "tokens {A; B; C;}\n" + + "tokens {A, B, C}\n" + "a : ~A ;"); String expecting = "max type 3\n" + @@ -129,7 +129,7 @@ public class TestATNSerialization extends BaseTest { @Test public void testWildcard() throws Exception { Grammar g = new Grammar( "parser grammar T;\n"+ - "tokens {A; B; C;}\n" + + "tokens {A, B, C}\n" + "a : . ;"); String expecting = "max type 3\n" + diff --git a/tool/test/org/antlr/v4/test/TestAttributeChecks.java b/tool/test/org/antlr/v4/test/TestAttributeChecks.java index 137b451d4..ad3970502 100644 --- a/tool/test/org/antlr/v4/test/TestAttributeChecks.java +++ b/tool/test/org/antlr/v4/test/TestAttributeChecks.java @@ -9,7 +9,7 @@ public class TestAttributeChecks extends BaseTest { String attributeTemplate = "parser grammar A;\n"+ "@members {}\n" + - "tokens{ID;}\n" + + "tokens{ID}\n" + "a[int x] returns [int y]\n" + "@init {}\n" + " : id=ID ids+=ID lab=b[34] {\n" + diff --git a/tool/test/org/antlr/v4/test/TestCompositeGrammars.java b/tool/test/org/antlr/v4/test/TestCompositeGrammars.java index 1f772996f..4ebd74dbc 100644 --- a/tool/test/org/antlr/v4/test/TestCompositeGrammars.java +++ b/tool/test/org/antlr/v4/test/TestCompositeGrammars.java @@ -173,13 +173,13 @@ public class TestCompositeGrammars extends BaseTest { @Test public void testDelegatesSeeSameTokenType() throws Exception { String slave = "parser grammar S;\n" + // A, B, C token type order - "tokens { A; B; C; }\n" + + "tokens { A, B, C }\n" + "x : A {System.out.println(\"S.x\");} ;\n"; mkdir(tmpdir); writeFile(tmpdir, "S.g4", slave); String slave2 = "parser grammar T;\n" + - "tokens { C; B; A; }\n" + // reverse order + "tokens { C, B, A }\n" + // reverse order "y : A {System.out.println(\"T.y\");} ;\n"; mkdir(tmpdir); writeFile(tmpdir, "T.g4", slave2); @@ -212,13 +212,13 @@ public class TestCompositeGrammars extends BaseTest { ErrorQueue equeue = new ErrorQueue(); String slave = "parser grammar S;\n" + // A, B, C token type order - "tokens { A; B; C; }\n" + + "tokens { A, B, C }\n" + "x : A {System.out.println(\"S.x\");} ;\n"; mkdir(tmpdir); writeFile(tmpdir, "S.g4", slave); String slave2 = "parser grammar T;\n" + - "tokens { C; B; A; }\n" + // reverse order + "tokens { C, B, A }\n" + // reverse order "y : A {System.out.println(\"T.y\");} ;\n"; mkdir(tmpdir); writeFile(tmpdir, "T.g4", slave2); @@ -254,7 +254,7 @@ public class TestCompositeGrammars extends BaseTest { ErrorQueue equeue = new ErrorQueue(); String slave = "grammar S;\n" + // A, B, C token type order - "tokens { A; B; C; }\n" + + "tokens { A, B, C }\n" + "x : 'x' INT {System.out.println(\"S.x\");} ;\n" + "INT : '0'..'9'+ ;\n" + "WS : (' '|'\\n') {skip();} ;\n"; @@ -280,7 +280,7 @@ public class TestCompositeGrammars extends BaseTest { String slave = "parser grammar S;\n" + "options {tokenVocab=whatever;}\n" + - "tokens { A='a'; }\n" + + "tokens { A }\n" + "x : A {System.out.println(\"S.x\");} ;\n"; mkdir(tmpdir); writeFile(tmpdir, "S.g4", slave); @@ -374,7 +374,7 @@ public class TestCompositeGrammars extends BaseTest { String slave2 = "parser grammar T;\n" + - "tokens { A='x'; }\n" + + "tokens { A }\n" + "b : 'b' {System.out.println(\"T.b\");} ;\n"; writeFile(tmpdir, "T.g4", slave2); @@ -500,34 +500,34 @@ public class TestCompositeGrammars extends BaseTest { ErrorQueue equeue = new ErrorQueue(); String slave = "parser grammar T;\n" + - "tokens{T;}\n" + + "tokens{T}\n" + "x : T ;\n" ; mkdir(tmpdir); writeFile(tmpdir, "T.g4", slave); slave = "parser grammar S;\n" + "import T;\n" + - "tokens{S;}\n" + + "tokens{S}\n" + "y : S ;\n" ; mkdir(tmpdir); writeFile(tmpdir, "S.g4", slave); slave = "parser grammar C;\n" + - "tokens{C;}\n" + + "tokens{C}\n" + "i : C ;\n" ; mkdir(tmpdir); writeFile(tmpdir, "C.g4", slave); slave = "parser grammar B;\n" + - "tokens{B;}\n" + + "tokens{B}\n" + "j : B ;\n" ; mkdir(tmpdir); writeFile(tmpdir, "B.g4", slave); slave = "parser grammar A;\n" + "import B,C;\n" + - "tokens{A;}\n" + + "tokens{A}\n" + "k : A ;\n" ; mkdir(tmpdir); writeFile(tmpdir, "A.g4", slave); @@ -535,7 +535,7 @@ public class TestCompositeGrammars extends BaseTest { String master = "grammar M;\n" + "import S,A;\n" + - "tokens{M;}\n" + + "tokens{M}\n" + "a : M ;\n" ; writeFile(tmpdir, "M.g4", master); Grammar g = new Grammar(tmpdir+"/M.g4", master, equeue);