+? works, had bad input

This commit is contained in:
Terence Parr 2012-11-03 11:01:23 -07:00
parent c8a9ed6d30
commit baa4dcf1b9
1 changed files with 3 additions and 3 deletions

View File

@ -79,10 +79,10 @@ public class TestLexerExec extends BaseTest {
"lexer grammar L;\n"
+ "STRING : '\"' ('\"\"' | .)+? '\"';";
String found = execLexer("L.g4", grammar, "L", "\"hi\"\"mom\"");
String found = execLexer("L.g4", grammar, "L", "\"\"\"mom\"");
assertEquals(
"[@0,0:3='\"hi\"\"mom\"',<1>,1:0]\n" +
"[@2,9:8='<EOF>',<-1>,1:9]\n", found);
"[@0,0:6='\"\"\"mom\"',<1>,1:0]\n" +
"[@1,7:6='<EOF>',<-1>,1:7]\n", found);
assertNull(stderrDuringParse);
}