[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9102]
This commit is contained in:
parrt 2011-10-02 20:35:18 -08:00
parent 8508dd6da0
commit 48e292dcdd
1 changed files with 9 additions and 0 deletions

View File

@ -150,6 +150,15 @@ public class TestParseErrors extends BaseTest {
assertEquals(expecting, result);
}
@Test public void testSingleTokenDeletionDuringLoop() throws Exception {
String grammar =
"grammar T;\n" +
"a : 'a' 'b'* 'c' ;";
String found = execParser("T.g", grammar, "TParser", "TLexer", "a", "ababbc", false);
String expecting = "line 1:2 extraneous input 'a' expecting {'b', 'c'}\n";
String result = stderrDuringParse;
assertEquals(expecting, result);
}
@Test public void testLL1ErrorInfo() throws Exception {
String grammar =