diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2018-08-10 10:58:22 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2018-08-10 10:58:22 -0300 |
| commit | 2acee8f9acf53fd8c1f97f8d40bf0bd6fd53148a (patch) | |
| tree | 8030a0d292218d1205b9f905945917641dc7eb73 /src/main/java/bjc/rgens/parser/RGrammarSet.java | |
| parent | 22ab7a4dd6e608b5ef4d30b1d2ba2816a382dd52 (diff) | |
Update logging
Logging now uses the RGrammarLogging system so as to allow for better
customizability of how the logging works
Diffstat (limited to 'src/main/java/bjc/rgens/parser/RGrammarSet.java')
| -rwxr-xr-x | src/main/java/bjc/rgens/parser/RGrammarSet.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/bjc/rgens/parser/RGrammarSet.java b/src/main/java/bjc/rgens/parser/RGrammarSet.java index 783ca26..30f08a4 100755 --- a/src/main/java/bjc/rgens/parser/RGrammarSet.java +++ b/src/main/java/bjc/rgens/parser/RGrammarSet.java @@ -5,6 +5,8 @@ import java.util.Map; import java.util.TreeMap; import java.util.Set; +import static bjc.rgens.parser.RGrammarLogging.*; + /** * Represents a set of grammars that can share rules via exports. * @@ -26,6 +28,7 @@ public class RGrammarSet { /* Contains which file a grammar was loaded from. */ 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; @@ -71,12 +74,12 @@ public class RGrammarSet { /* Process exports from the grammar. */ for (Rule export : gram.getExportedRules()) { if(exportedRules.containsKey(export.name)) - System.err.printf("WARN: Shadowing rule %s in %s from %s\n", export.name, export.belongsTo.name, grammarName); + warn("Shadowing rule %s in %s from %s", export.name, export.belongsTo.name, grammarName); exportedRules.put(export.name, export); if(DEBUG) - System.err.printf("\t\tDEBUG: %s (%d cases) exported from %s\n", export.name, export.getCases().getSize(), grammarName); + debug("%s (%d cases) exported from %s", export.name, export.getCases().getSize(), grammarName); } /* Add exports to grammar. */ |
