fix unit test

[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9544]
This commit is contained in:
parrt 2011-12-07 13:27:22 -08:00
parent 6c5f3655b9
commit 9173367a1e
1 changed files with 5 additions and 6 deletions

View File

@ -520,18 +520,17 @@ public class TestATNParserPrediction extends BaseTest {
// unambig state maybe. keep going.
LexerGrammar lg = new LexerGrammar(
"lexer grammar L;\n" +
"ID : 'a'..'z'+ ;\n" +
"ID : 'a'..'z' ;\n" + // one char
"SEMI : ';' ;\n"+
"INT : '0'..'9'+ ;\n" +
"WS : (' '|'\n'|'\t')+ {skip();} ;"
"INT : '0'..'9'+ ;\n"
);
Grammar g = new Grammar(
"parser grammar T;\n"+
"tokens {ID;SEMI;INT;WS;}\n" +
"a : (ID | ID ID?) ';' ;");
"tokens {ID;SEMI;INT;}\n" +
"a : (ID | ID ID?) SEMI ;");
int decision = 1;
checkPredictedAlt(lg, g, decision, "a;", 1);
checkPredictedAlt(lg, g, decision, "a b;", 2);
checkPredictedAlt(lg, g, decision, "ab;", 2);
// After matching these inputs for decision, what is DFA after each prediction?
// String[] inputs = {