diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2018-10-11 22:11:20 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2018-10-11 22:11:20 -0300 |
| commit | 89668d36167846e002d0f6dcdc1034b5fee44ce3 (patch) | |
| tree | e687080178c00abc28d6ce9fcef88fd2701a371e /src/main/java/bjc/rgens/parser/RGrammarSet.java | |
| parent | a30e080781d5f536d09aa2127a06ffb17fc1cdc0 (diff) | |
Update
Diffstat (limited to 'src/main/java/bjc/rgens/parser/RGrammarSet.java')
| -rwxr-xr-x | src/main/java/bjc/rgens/parser/RGrammarSet.java | 14 |
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 30f08a4..56ed1c8 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. */ |
