From d1795d205f65e966f5143c501699eaec32d9201f Mon Sep 17 00:00:00 2001 From: Terence Parr Date: Sat, 3 Nov 2012 17:34:34 -0700 Subject: [PATCH] Revert "add option -exact-ambiguities to TestRig" This reverts commit 400b58d4a02a28f0b7dc2ac10dddafecf9d181e6. --- CHANGES.txt | 4 ---- .../Java/src/org/antlr/v4/runtime/misc/TestRig.java | 12 +++--------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index c27574307..76cc430a7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,9 +1,5 @@ ANTLR v4 Honey Badger -November 3, 2012 - -* add option -exact-ambiguities to TestRig - October 29, 2012 * Sam fixes nongreedy more. diff --git a/runtime/Java/src/org/antlr/v4/runtime/misc/TestRig.java b/runtime/Java/src/org/antlr/v4/runtime/misc/TestRig.java index 226622ea9..e8dc5cc9d 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/misc/TestRig.java +++ b/runtime/Java/src/org/antlr/v4/runtime/misc/TestRig.java @@ -36,6 +36,7 @@ import org.antlr.v4.runtime.DiagnosticErrorListener; import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.Parser; import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.TokenStream; import org.antlr.v4.runtime.atn.PredictionMode; @@ -74,7 +75,6 @@ public class TestRig { static boolean diagnostics = false; static String encoding = null; static boolean SLL = false; - static boolean exactAmbigDetection = false; public static final String LEXER_START_RULE_NAME = "tokens"; @@ -83,7 +83,7 @@ public class TestRig { if ( args.length < 2 ) { System.err.println("java org.antlr.v4.runtime.misc.TestRig GrammarName startRuleName\n" + " [-tokens] [-tree] [-gui] [-ps file.ps] [-encoding encodingname]\n" + - " [-trace] [-diagnostics] [-SLL] [-exact-ambiguities]\n"+ + " [-trace] [-diagnostics] [-SLL]\n"+ " [input-filename(s)]"); System.err.println("Use startRuleName='tokens' if GrammarName is a lexer grammar."); System.err.println("Omitting input-filename makes rig read from stdin."); @@ -116,9 +116,6 @@ public class TestRig { else if ( arg.equals("-SLL") ) { SLL = true; } - else if ( arg.equals("-exact-ambiguities") ) { - exactAmbigDetection = true; - } else if ( arg.equals("-diagnostics") ) { diagnostics = true; } @@ -227,10 +224,7 @@ public class TestRig { parser.setBuildParseTree(true); } - if ( exactAmbigDetection ) { - parser.getInterpreter().setPredictionMode(PredictionMode.LL_EXACT_AMBIG_DETECTION); - } - if ( SLL ) { // overrides exactAmbigDetection + if ( SLL ) { parser.getInterpreter().setPredictionMode(PredictionMode.SLL); }