From cb3151fce425a387318b6e03afe52b336b83fff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ronny=20B=C3=B6ttger?= <s6013406@mail.zih.tu-dresden.de> Date: Fri, 29 Oct 2021 15:26:48 +0200 Subject: [PATCH] RoleRag with added EmptyDeclaration --- build.gradle | 3 ++- relast.preprocessor | 2 +- src/main/java/org/jastadd/preprocessor/Main.java | 2 ++ src/test/resources/AddEmptyDeclaration/config.yaml | 2 -- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 077532e..613dfdf 100644 --- a/build.gradle +++ b/build.gradle @@ -41,7 +41,7 @@ jar { } from { - configurations.runtimeClasspath.collect { return (it.exists() && !it.toString().endsWith("model.jar")) ? (it.isDirectory() ? it : zipTree(it)) : null } + configurations.runtimeClasspath.collect { return (it.exists() && (!it.toString().contains("/build/libs/")|| it.toString().contains("-base-"))) ? (it.isDirectory() ? it : zipTree(it)) : null } } } @@ -143,3 +143,4 @@ jastadd { clean.dependsOn(cleanGen) generateAst.dependsOn(relast) +jar.dependsOn("relast.preprocessor:jar") // the jar is a fat jar that contains the jar of the preprocessor \ No newline at end of file diff --git a/relast.preprocessor b/relast.preprocessor index b4fe30b..4b4b779 160000 --- a/relast.preprocessor +++ b/relast.preprocessor @@ -1 +1 @@ -Subproject commit b4fe30b62b9e891c20497af3e92614dd07c8d8b1 +Subproject commit 4b4b7798e65fae598958afb4e33a1d9b0938be58 diff --git a/src/main/java/org/jastadd/preprocessor/Main.java b/src/main/java/org/jastadd/preprocessor/Main.java index 4830eb1..66005eb 100644 --- a/src/main/java/org/jastadd/preprocessor/Main.java +++ b/src/main/java/org/jastadd/preprocessor/Main.java @@ -88,6 +88,7 @@ public class Main extends org.jastadd.relast.compiler.RelAstProcessor { } } + Document navigation = program.toNavigation(useExceptions, useOptionals, exceptionName); Path yamlFile = outputBasePath.resolve(navigation.getFileName()); @@ -103,6 +104,7 @@ public class Main extends org.jastadd.relast.compiler.RelAstProcessor { throw new CompilerException("Unable to expand template", e); } + for (GrammarFile grammarFile : program.getGrammarFileList()) { printMessage("Writing output file " + grammarFile.getFileName()); // TODO decide and document what the file name should be, the full path or a simple name? diff --git a/src/test/resources/AddEmptyDeclaration/config.yaml b/src/test/resources/AddEmptyDeclaration/config.yaml index 17e4646..50f2c52 100644 --- a/src/test/resources/AddEmptyDeclaration/config.yaml +++ b/src/test/resources/AddEmptyDeclaration/config.yaml @@ -3,6 +3,4 @@ args: - "--inputBaseDir=in" - "--outputBaseDir=out" - - "--errorHandling=null" - "Example.relast" - - "EmptyDeclaration.relast" -- GitLab