summaryrefslogtreecommitdiff
path: root/src/main/java/bjc/rgens/parser/LoadOptions.java
diff options
context:
space:
mode:
authorBenjamin J. Culkin <bjculkin@mix.wvu.edu>2019-07-21 16:24:47 -0300
committerBenjamin J. Culkin <bjculkin@mix.wvu.edu>2019-07-21 16:24:47 -0300
commit8c289f05ca36c3def6a4e4ab2414b7469c03339e (patch)
tree9e97b6ea73b94ad831258b9bede0136a43530a39 /src/main/java/bjc/rgens/parser/LoadOptions.java
parent89668d36167846e002d0f6dcdc1034b5fee44ce3 (diff)
Refactor front-end error-handling
This refactors the front-end to use a tree for capturing errors, instead of throwing exceptions. This has the benefit that you will receive notifications about all of the error messages you have, instead of only the first. I'm a bit fuzzy on the details, since it's been a while since I wrote these changes.
Diffstat (limited to 'src/main/java/bjc/rgens/parser/LoadOptions.java')
-rw-r--r--src/main/java/bjc/rgens/parser/LoadOptions.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/main/java/bjc/rgens/parser/LoadOptions.java b/src/main/java/bjc/rgens/parser/LoadOptions.java
new file mode 100644
index 0000000..1af0923
--- /dev/null
+++ b/src/main/java/bjc/rgens/parser/LoadOptions.java
@@ -0,0 +1,50 @@
+package bjc.rgens.parser;
+
+import java.nio.file.Path;
+
+/**
+ * Options used during the loading of config sets and config set related things.
+ *
+ * @author Ben Culkin.
+ */
+public class LoadOptions {
+ /**
+ * Should timings be tracked?
+ */
+ public boolean doPerf;
+
+ /**
+ * Should debug stats be tracked?
+ */
+ public boolean doDebug;
+
+ /**
+ * Should trace stats be tracked?
+ */
+ public boolean doTrace;
+
+ /**
+ * The default grammar set name.
+ */
+ public String defName;
+
+ /**
+ * The path the current file is in.
+ */
+ public Path parent;
+
+ /**
+ * The file the current config set is being loaded from.
+ */
+ public Path cfgFile;
+
+ /**
+ * The config set being loaded.
+ */
+ public ConfigSet cfgSet;
+
+ /**
+ * The grammar set being loaded.
+ */
+ public RGrammarSet gramSet;
+}