From 8c289f05ca36c3def6a4e4ab2414b7469c03339e Mon Sep 17 00:00:00 2001 From: "Benjamin J. Culkin" Date: Sun, 21 Jul 2019 16:24:47 -0300 Subject: 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. --- src/main/java/bjc/rgens/parser/LoadOptions.java | 50 +++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/main/java/bjc/rgens/parser/LoadOptions.java (limited to 'src/main/java/bjc/rgens/parser/LoadOptions.java') 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; +} -- cgit v1.2.3