Commit b49db15d authored by Johannes Mey's avatar Johannes Mey
Browse files

use relast

parent 6e0686df
Pipeline #6209 passed with stage
in 1 minute and 27 seconds
*.jar *.jar
!gradle/wrapper/gradle-wrapper.jar !gradle/wrapper/gradle-wrapper.jar
!libs/*.jar
.project .project
.classpath .classpath
.idea/ .idea/
......
...@@ -55,6 +55,37 @@ jar { ...@@ -55,6 +55,37 @@ jar {
} }
} }
task preprocess(type: JavaExec) {
group = 'Build'
main = "-jar"
doFirst {
delete "./src/gen/jastadd/*.ast"
delete "./src/gen/jastadd/RelAst.jadd"
delete "./src/gen/jastadd/RelAstRefResolver.jadd"
delete "./src/gen/jastadd/RelAstResolverStubs.jrag"
mkdir "src/gen/jastadd/"
}
args = [
"libs/relast.jar",
"./src/main/jastadd/RelAst.relast",
"--listClass=java.util.ArrayList",
"--jastAddList=JastAddList",
"--useJastAddNames",
"--file",
"--resolverHelper",
"--grammarName=./src/gen/jastadd/RelAST"
]
inputs.files file("./src/main/jastadd/RelAST.relast"),
file("./libs/relast.jar")
outputs.files file("./src/gen/jastadd/RelAst.ast"),
file("./src/gen/jastadd/RelAst.jadd"),
file("./src/gen/jastadd/RelAstRefResolver.jadd"),
file('./src/gen/jastadd/RelAstResolverStubs.jrag')
}
jastadd { jastadd {
configureModuleBuild() configureModuleBuild()
modules { modules {
...@@ -68,10 +99,13 @@ jastadd { ...@@ -68,10 +99,13 @@ jastadd {
} }
jastadd { jastadd {
basedir "src/main/jastadd/" basedir "src/"
include "**/*.ast" include "main/jastadd/**/*.ast"
include "**/*.jadd" include "main/jastadd/**/*.jadd"
include "**/*.jrag" include "main/jastadd/**/*.jrag"
include "gen/jastadd/**/*.ast"
include "gen/jastadd/**/*.jadd"
include "gen/jastadd/**/*.jrag"
} }
scanner { scanner {
...@@ -112,3 +146,4 @@ jastadd { ...@@ -112,3 +146,4 @@ jastadd {
jastaddOptions = ["--lineColumnNumbers", "--safeLazy", "--visitCheck=true", "--rewrite=cnta", "--cache=all"] jastaddOptions = ["--lineColumnNumbers", "--safeLazy", "--visitCheck=true", "--rewrite=cnta", "--cache=all"]
} }
generateAst.dependsOn preprocess
File added
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