forked from jasder/antlr
Update generated test source
This commit is contained in:
parent
09588d2936
commit
0c29b54fcb
|
@ -370,6 +370,24 @@ public class TestParserErrors extends BaseTest {
|
|||
|
||||
assertEquals("line 1:1 extraneous input 'a' expecting 'b'\n", this.stderrDuringParse);
|
||||
|
||||
}
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
public void testSingleTokenDeletionBeforeAlt() throws Exception {
|
||||
mkdir(tmpdir);
|
||||
StringBuilder grammarBuilder = new StringBuilder(38);
|
||||
grammarBuilder.append("grammar T;\n");
|
||||
grammarBuilder.append("a : ('b' | 'c')\n");
|
||||
grammarBuilder.append(";\n");
|
||||
grammarBuilder.append("q : 'a'\n");
|
||||
grammarBuilder.append(";");
|
||||
String grammar = grammarBuilder.toString();
|
||||
String input ="ac";
|
||||
String found = execParser("T.g4", grammar, "TParser", "TLexer", "a", input, false);
|
||||
assertEquals("", found);
|
||||
|
||||
assertEquals("line 1:0 extraneous input 'a' expecting {'b', 'c'}\n", this.stderrDuringParse);
|
||||
|
||||
}
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
|
@ -404,6 +422,24 @@ public class TestParserErrors extends BaseTest {
|
|||
"line 1:1 extraneous input 'a' expecting {<EOF>, 'b', 'z'}\n" +
|
||||
"line 1:3 token recognition error at: 'c'\n", this.stderrDuringParse);
|
||||
|
||||
}
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
public void testSingleTokenDeletionBeforePredict() throws Exception {
|
||||
mkdir(tmpdir);
|
||||
StringBuilder grammarBuilder = new StringBuilder(48);
|
||||
grammarBuilder.append("grammar T;\n");
|
||||
grammarBuilder.append("a : 'a'+ 'b'\n");
|
||||
grammarBuilder.append(" | 'a'+ 'c'\n");
|
||||
grammarBuilder.append(";\n");
|
||||
grammarBuilder.append("q : 'e' ;");
|
||||
String grammar = grammarBuilder.toString();
|
||||
String input ="caaab";
|
||||
String found = execParser("T.g4", grammar, "TParser", "TLexer", "a", input, false);
|
||||
assertEquals("", found);
|
||||
|
||||
assertEquals("line 1:0 extraneous input 'c' expecting 'a'\n", this.stderrDuringParse);
|
||||
|
||||
}
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
|
|
|
@ -456,6 +456,28 @@ public class TestParserErrors extends BaseTest {
|
|||
|
||||
}
|
||||
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
public void testSingleTokenDeletionBeforeAlt() throws Exception {
|
||||
mkdir(tmpdir);
|
||||
|
||||
StringBuilder grammarBuilder = new StringBuilder(38);
|
||||
grammarBuilder.append("grammar T;\n");
|
||||
grammarBuilder.append("a : ('b' | 'c')\n");
|
||||
grammarBuilder.append(";\n");
|
||||
grammarBuilder.append("q : 'a'\n");
|
||||
grammarBuilder.append(";");
|
||||
String grammar = grammarBuilder.toString();
|
||||
|
||||
|
||||
String input ="ac";
|
||||
String found = execParser("T.g4", grammar, "TParser", "TLexer", "a", input, false);
|
||||
assertEquals("", found);
|
||||
|
||||
assertEquals("line 1:0 extraneous input 'a' expecting {'b', 'c'}\n", this.stderrDuringParse);
|
||||
|
||||
}
|
||||
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
public void testSingleTokenDeletionBeforeLoop() throws Exception {
|
||||
|
@ -498,6 +520,28 @@ public class TestParserErrors extends BaseTest {
|
|||
|
||||
}
|
||||
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
public void testSingleTokenDeletionBeforePredict() throws Exception {
|
||||
mkdir(tmpdir);
|
||||
|
||||
StringBuilder grammarBuilder = new StringBuilder(48);
|
||||
grammarBuilder.append("grammar T;\n");
|
||||
grammarBuilder.append("a : 'a'+ 'b'\n");
|
||||
grammarBuilder.append(" | 'a'+ 'c'\n");
|
||||
grammarBuilder.append(";\n");
|
||||
grammarBuilder.append("q : 'e' ;");
|
||||
String grammar = grammarBuilder.toString();
|
||||
|
||||
|
||||
String input ="caaab";
|
||||
String found = execParser("T.g4", grammar, "TParser", "TLexer", "a", input, false);
|
||||
assertEquals("", found);
|
||||
|
||||
assertEquals("line 1:0 extraneous input 'c' expecting 'a'\n", this.stderrDuringParse);
|
||||
|
||||
}
|
||||
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
public void testSingleTokenDeletionConsumption() throws Exception {
|
||||
|
|
|
@ -414,6 +414,26 @@ public class TestParserErrors extends BaseTest {
|
|||
|
||||
assertEquals("line 1:1 extraneous input 'a' expecting 'b'\n", this.stderrDuringParse);
|
||||
|
||||
}
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
public void testSingleTokenDeletionBeforeAlt() throws Exception {
|
||||
mkdir(tmpdir);
|
||||
StringBuilder grammarBuilder = new StringBuilder(38);
|
||||
grammarBuilder.append("grammar T;\n");
|
||||
grammarBuilder.append("a : ('b' | 'c')\n");
|
||||
grammarBuilder.append(";\n");
|
||||
grammarBuilder.append("q : 'a'\n");
|
||||
grammarBuilder.append(";");
|
||||
String grammar = grammarBuilder.toString();
|
||||
String input ="ac";
|
||||
String found = execParser("T.g4", grammar, "TParser", "TLexer",
|
||||
"TListener", "TVisitor",
|
||||
"a", input, false);
|
||||
assertEquals("", found);
|
||||
|
||||
assertEquals("line 1:0 extraneous input 'a' expecting {'b', 'c'}\n", this.stderrDuringParse);
|
||||
|
||||
}
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
|
@ -452,6 +472,26 @@ public class TestParserErrors extends BaseTest {
|
|||
"line 1:1 extraneous input 'a' expecting {<EOF>, 'b', 'z'}\n" +
|
||||
"line 1:3 token recognition error at: 'c'\n", this.stderrDuringParse);
|
||||
|
||||
}
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
public void testSingleTokenDeletionBeforePredict() throws Exception {
|
||||
mkdir(tmpdir);
|
||||
StringBuilder grammarBuilder = new StringBuilder(48);
|
||||
grammarBuilder.append("grammar T;\n");
|
||||
grammarBuilder.append("a : 'a'+ 'b'\n");
|
||||
grammarBuilder.append(" | 'a'+ 'c'\n");
|
||||
grammarBuilder.append(";\n");
|
||||
grammarBuilder.append("q : 'e' ;");
|
||||
String grammar = grammarBuilder.toString();
|
||||
String input ="caaab";
|
||||
String found = execParser("T.g4", grammar, "TParser", "TLexer",
|
||||
"TListener", "TVisitor",
|
||||
"a", input, false);
|
||||
assertEquals("", found);
|
||||
|
||||
assertEquals("line 1:0 extraneous input 'c' expecting 'a'\n", this.stderrDuringParse);
|
||||
|
||||
}
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
|
|
|
@ -476,6 +476,29 @@ public class TestParserErrors extends BasePython2Test {
|
|||
|
||||
}
|
||||
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
public void testSingleTokenDeletionBeforeAlt() throws Exception {
|
||||
mkdir(tmpdir);
|
||||
|
||||
StringBuilder grammarBuilder = new StringBuilder(38);
|
||||
grammarBuilder.append("grammar T;\n");
|
||||
grammarBuilder.append("a : ('b' | 'c')\n");
|
||||
grammarBuilder.append(";\n");
|
||||
grammarBuilder.append("q : 'a'\n");
|
||||
grammarBuilder.append(";");
|
||||
String grammar = grammarBuilder.toString();
|
||||
|
||||
|
||||
String input ="ac";
|
||||
String found = execParser("T.g4", grammar, "TParser", "TLexer", "TListener", "TVisitor", "a", input, false);
|
||||
|
||||
assertEquals("", found);
|
||||
|
||||
assertEquals("line 1:0 extraneous input 'a' expecting {'b', 'c'}\n", this.stderrDuringParse);
|
||||
|
||||
}
|
||||
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
public void testSingleTokenDeletionBeforeLoop() throws Exception {
|
||||
|
@ -520,6 +543,29 @@ public class TestParserErrors extends BasePython2Test {
|
|||
|
||||
}
|
||||
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
public void testSingleTokenDeletionBeforePredict() throws Exception {
|
||||
mkdir(tmpdir);
|
||||
|
||||
StringBuilder grammarBuilder = new StringBuilder(48);
|
||||
grammarBuilder.append("grammar T;\n");
|
||||
grammarBuilder.append("a : 'a'+ 'b'\n");
|
||||
grammarBuilder.append(" | 'a'+ 'c'\n");
|
||||
grammarBuilder.append(";\n");
|
||||
grammarBuilder.append("q : 'e' ;");
|
||||
String grammar = grammarBuilder.toString();
|
||||
|
||||
|
||||
String input ="caaab";
|
||||
String found = execParser("T.g4", grammar, "TParser", "TLexer", "TListener", "TVisitor", "a", input, false);
|
||||
|
||||
assertEquals("", found);
|
||||
|
||||
assertEquals("line 1:0 extraneous input 'c' expecting 'a'\n", this.stderrDuringParse);
|
||||
|
||||
}
|
||||
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
public void testSingleTokenDeletionConsumption() throws Exception {
|
||||
|
|
|
@ -476,6 +476,29 @@ public class TestParserErrors extends BasePython3Test {
|
|||
|
||||
}
|
||||
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
public void testSingleTokenDeletionBeforeAlt() throws Exception {
|
||||
mkdir(tmpdir);
|
||||
|
||||
StringBuilder grammarBuilder = new StringBuilder(38);
|
||||
grammarBuilder.append("grammar T;\n");
|
||||
grammarBuilder.append("a : ('b' | 'c')\n");
|
||||
grammarBuilder.append(";\n");
|
||||
grammarBuilder.append("q : 'a'\n");
|
||||
grammarBuilder.append(";");
|
||||
String grammar = grammarBuilder.toString();
|
||||
|
||||
|
||||
String input ="ac";
|
||||
String found = execParser("T.g4", grammar, "TParser", "TLexer", "TListener", "TVisitor", "a", input, false);
|
||||
|
||||
assertEquals("", found);
|
||||
|
||||
assertEquals("line 1:0 extraneous input 'a' expecting {'b', 'c'}\n", this.stderrDuringParse);
|
||||
|
||||
}
|
||||
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
public void testSingleTokenDeletionBeforeLoop() throws Exception {
|
||||
|
@ -520,6 +543,29 @@ public class TestParserErrors extends BasePython3Test {
|
|||
|
||||
}
|
||||
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
public void testSingleTokenDeletionBeforePredict() throws Exception {
|
||||
mkdir(tmpdir);
|
||||
|
||||
StringBuilder grammarBuilder = new StringBuilder(48);
|
||||
grammarBuilder.append("grammar T;\n");
|
||||
grammarBuilder.append("a : 'a'+ 'b'\n");
|
||||
grammarBuilder.append(" | 'a'+ 'c'\n");
|
||||
grammarBuilder.append(";\n");
|
||||
grammarBuilder.append("q : 'e' ;");
|
||||
String grammar = grammarBuilder.toString();
|
||||
|
||||
|
||||
String input ="caaab";
|
||||
String found = execParser("T.g4", grammar, "TParser", "TLexer", "TListener", "TVisitor", "a", input, false);
|
||||
|
||||
assertEquals("", found);
|
||||
|
||||
assertEquals("line 1:0 extraneous input 'c' expecting 'a'\n", this.stderrDuringParse);
|
||||
|
||||
}
|
||||
|
||||
/* This file and method are generated by TestGenerator, any edits will be overwritten by the next generation. */
|
||||
@Test
|
||||
public void testSingleTokenDeletionConsumption() throws Exception {
|
||||
|
|
Loading…
Reference in New Issue