From 98d2c394d9060fc92e7656d18abd8f23070a4e2f Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Sun, 11 Apr 2021 10:52:00 -0400 Subject: Tweak a thing --- src/main/java/bjc/rgens/parser/ConfigLoader.java | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/bjc/rgens/parser/ConfigLoader.java b/src/main/java/bjc/rgens/parser/ConfigLoader.java index 89d12be..718658a 100644 --- a/src/main/java/bjc/rgens/parser/ConfigLoader.java +++ b/src/main/java/bjc/rgens/parser/ConfigLoader.java @@ -39,8 +39,7 @@ public class ConfigLoader { * * @return The grammar set created by the configuration file. * - * @throws IOException - * If something goes wrong during configuration loading. + * @throws IOException If something goes wrong during configuration loading. */ public static ConfigSet fromConfigFile(Path cfgFile, LoadOptions lopts) throws IOException { @@ -54,18 +53,13 @@ public class ConfigLoader { /** * Load a grammar set from a configuration file. * - * @param cfgFile - * The configuration file to load from. - * @param lopts - * Options used during loading. - * - * @param errs - * A place to add errors that occur during loading. + * @param cfgFile The configuration file to load from. + * @param lopts Options used during loading. + * @param errs A place to add errors that occur during loading. * * @return The grammar set created by the configuration file. * - * @throws IOException - * If something goes wrong during configuration loading. + * @throws IOException If something goes wrong during configuration loading. */ public static ConfigSet fromConfigFile(Path cfgFile, LoadOptions lopts, Tree errs) throws IOException { @@ -88,7 +82,7 @@ public class ConfigLoader { String ln = scn.nextLine().trim(); // Ignore blank/comment lines. - if (ln.equals("")) continue; + if (ln.equals("")) continue; if (ln.startsWith("#")) { // Eat up line-continued comments while (ln.endsWith("\\")) { @@ -103,8 +97,9 @@ public class ConfigLoader { ln = ln + newLn; } - Tree header - = new SimpleTree<>(String.format("INFO: Processing line %d", lnr.getLineNumber())); + String lnMsg = String.format( + "INFO: Processing line %d", lnr.getLineNumber()); + Tree header = new SimpleTree<>(lnMsg); List partList = StringUtils.levelSplit(ln, " ", "\t"); // Remove blank strings, since levelSplit doesn't filter out -- cgit v1.2.3