From 9173367a1e664e88a54d705eecd9c98efbe2da42 Mon Sep 17 00:00:00 2001 From: parrt Date: Wed, 7 Dec 2011 13:27:22 -0800 Subject: [PATCH] fix unit test [git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9544] --- .../org/antlr/v4/test/TestATNParserPrediction.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tool/test/org/antlr/v4/test/TestATNParserPrediction.java b/tool/test/org/antlr/v4/test/TestATNParserPrediction.java index f361927e6..f7d9c95c1 100644 --- a/tool/test/org/antlr/v4/test/TestATNParserPrediction.java +++ b/tool/test/org/antlr/v4/test/TestATNParserPrediction.java @@ -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 = {