summaryrefslogtreecommitdiff
path: root/src/main/java/bjc/rgens/parser/RGrammarSet.java
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2019-07-21 15:52:00 -0400
committerbculkin2442 <bjculkin@mix.wvu.edu>2019-07-21 15:52:00 -0400
commit6b810efa8765047a669be0e9ff6501ddda5c49a9 (patch)
tree0e65344afe3a58efdc662a22867bc8ab2948f3e6 /src/main/java/bjc/rgens/parser/RGrammarSet.java
parentdd4bdab11c715fa2dcc438f287806b50f8467fd3 (diff)
parenta4d1507727e9aeeea0982ebbda785a961902d46c (diff)
Merge cleanups
Diffstat (limited to 'src/main/java/bjc/rgens/parser/RGrammarSet.java')
-rwxr-xr-xsrc/main/java/bjc/rgens/parser/RGrammarSet.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/bjc/rgens/parser/RGrammarSet.java b/src/main/java/bjc/rgens/parser/RGrammarSet.java
index f827e1f..ed09bdf 100755
--- a/src/main/java/bjc/rgens/parser/RGrammarSet.java
+++ b/src/main/java/bjc/rgens/parser/RGrammarSet.java
@@ -29,17 +29,20 @@ public class RGrammarSet {
public Map<String, String> loadedFrom;
/* @NOTE These are replaced by the logging setup */
- public static final boolean PERF = true;
- public static final boolean DEBUG = true;
+ public static final boolean PERF = true;
/** Create a new set of randomized grammars. */
public RGrammarSet() {
+ this(false);
+ }
+
+ public RGrammarSet(boolean orderExports) {
grammars = new HashMap<>();
// @NOTE
// Swap which line is commented to toggle ordering of exports
- //exportedRules = new TreeMap<>();
- exportedRules = new HashMap<>();
+ if (orderExports) exportedRules = new TreeMap<>();
+ else exportedRules = new HashMap<>();
loadedFrom = new HashMap<>();
@@ -78,8 +81,7 @@ public class RGrammarSet {
exportedRules.put(export.name, export);
- if(DEBUG)
- debug("%s (%d cases) exported from %s", export.name, export.getCases().getSize(), grammarName);
+ debug("%s (%d cases) exported from %s", export.name, export.getCases().getSize(), grammarName);
}
/* Add exports to grammar. */