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
!gradle/wrapper/gradle-wrapper.jar
!libs/*.jar
.project
.classpath
.idea/
......
......@@ -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 {
configureModuleBuild()
modules {
......@@ -68,10 +99,13 @@ jastadd {
}
jastadd {
basedir "src/main/jastadd/"
include "**/*.ast"
include "**/*.jadd"
include "**/*.jrag"
basedir "src/"
include "main/jastadd/**/*.ast"
include "main/jastadd/**/*.jadd"
include "main/jastadd/**/*.jrag"
include "gen/jastadd/**/*.ast"
include "gen/jastadd/**/*.jadd"
include "gen/jastadd/**/*.jrag"
}
scanner {
......@@ -112,3 +146,4 @@ jastadd {
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