Commit 908310ea authored by René Schöne's avatar René Schöne
Browse files

Update relast-preprocessor to newest version.

- remove mustache (reuse the submodule of the preprocessor)
- align attributes and build logic to changes in preprocessor
parent cd6f3644
Pipeline #9903 passed with stages
in 11 minutes and 18 seconds
[submodule "relast-preprocessor"]
path = relast-preprocessor
url = ../relast-preprocessor.git
branch = jastadd-fix-inc-param-debug
[submodule "ragconnect.base/src/main/jastadd/mustache"]
path = ragconnect.base/src/main/jastadd/mustache
url = ../mustache
branch = develop
......@@ -78,7 +78,7 @@ jar {
File preprocessorGrammar = file('../relast-preprocessor/src/main/jastadd/RelAst.relast')
File ragConnectGrammar = file('./src/main/jastadd/RagConnect.relast')
File intermediateGrammar = file('./src/main/jastadd/intermediate/MustacheNodes.relast')
File mustacheGrammar = file('./src/main/jastadd/mustache/Mustache.relast')
File mustacheGrammar = file('../relast-preprocessor/src/main/jastadd/mustache/Mustache.relast')
task relast(type: JavaExec) {
group = 'Build'
main = "-jar"
......@@ -220,3 +220,4 @@ publishing {
}
publish.dependsOn jar
jar.dependsOn ":relast-preprocessor:jar"
import java.util.List;
import java.util.ArrayList;
aspect Navigation {
aspect RagConnectNavigation {
// --- program ---
eq RagConnect.getChild().program() = getProgram();
......@@ -12,16 +12,27 @@ aspect Navigation {
eq RagConnect.getChild().ragconnect() = this;
eq MRagConnect.getChild().ragconnect() = getRagConnect();
// --- containedConnectSpecification ---
inh ConnectSpecification ASTNode.containedConnectSpecification();
eq RagConnect.getChild().containedConnectSpecification() = null;
eq MRagConnect.getChild().containedConnectSpecification() = null;
eq Document.getChild().containedConnectSpecification() = null;
eq Program.getChild().containedConnectSpecification() = null;
eq ConnectSpecification.getChild().containedConnectSpecification() = this;
// --- containedFile
eq Grammar.getChild().containedFile() = null;
eq RagConnect.getChild().containedFile() = null;
eq MRagConnect.getChild().containedFile() = null;
// --- containedFileName ---
eq Grammar.getChild().containedFileName() = null; // should be in PP
eq RagConnect.getChild().containedFileName() = null;
eq ConnectSpecificationFile.getChild().containedFileName() = getFileName();
eq MRagConnect.getChild().containedFileName() = null;
eq ConnectSpecificationFile.containedFileName() = getFileName();
refine Navigation eq ASTNode.containedFileName() {
if (containedFile() == null) {
return containedConnectSpecification().containedFileName();
}
return refined();
// return containedFile().getFileName();
}
//--- allEndpointDefinitionList ---
syn List<EndpointDefinition> RagConnect.allEndpointDefinitionList() {
......@@ -128,8 +139,6 @@ aspect Navigation {
// --- rootTypeComponents ---
syn JastAddList<MTypeComponent> MHandler.rootTypeComponents() = mragconnect().getRootTypeComponents();
// === for preprocessor ===
// --- isOptComponent ---
syn boolean TypeComponent.isOptComponent() = false;
eq OptComponent.isOptComponent() = true;
// --- isListComponent --- (defined in PP, but only on TypeComponent)
syn boolean Component.isListComponent() = false;
}
......@@ -206,5 +206,5 @@ aspect Navigation {
eq Document.getChild().program() = null;
eq Document.getChild().ragconnect() = null;
eq Document.getChild().containedFile() = null;
eq Document.getChild().containedFileName() = getFileName();
eq Document.containedFileName() = getFileName();
}
Subproject commit c10bed0d03e3fa18b8133ce1de48de7646899615
......@@ -21,8 +21,7 @@ public class RegressionTests {
String connectFile = "regression-tests/issue27/Test.connect";
grammarFile = ensureNoTrailingNewLine(grammarFile);
connectFile = ensureNoTrailingNewLine(connectFile);
// FIXME Once fixed in pre-processor, change expected return value from 1 to 0
TestUtils.runCompiler(grammarFile, Collections.singletonList(connectFile), "A", REGRESSION_TEST_OUTPUT_DIRECTORY, 1);
TestUtils.runCompiler(grammarFile, Collections.singletonList(connectFile), "A", REGRESSION_TEST_OUTPUT_DIRECTORY, 0);
}
private String ensureNoTrailingNewLine(String inputFileSuffix) throws IOException {
......
Subproject commit b538a7f709167c5f56fe65e6d9e9f02179cacaef
Subproject commit 02f8e35993dc3f62ab49e94f69a6dc27170660da
pluginManagement {
plugins {
id 'org.jastadd' version '1.13.3'
}
}
rootProject.name = 'ragconnect'
include 'relast-preprocessor'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment