From de777b1308a9a18b8f5189dc085fa81ed08c4f55 Mon Sep 17 00:00:00 2001 From: Ferenc Boldog Date: Tue, 29 Jan 2019 12:08:21 +0100 Subject: [PATCH] initial version of compiler and parser gradle module --- compiler/build.gradle | 21 +++++++++++++++++++++ parser/build.gradle | 21 +++++++++++++++++++++ settings.gradle | 2 ++ 3 files changed, 44 insertions(+) create mode 100644 compiler/build.gradle create mode 100644 parser/build.gradle create mode 100644 settings.gradle diff --git a/compiler/build.gradle b/compiler/build.gradle new file mode 100644 index 000000000..25c4afc4d --- /dev/null +++ b/compiler/build.gradle @@ -0,0 +1,21 @@ +plugins { + id "org.jetbrains.kotlin.jvm" version "1.3.20" +} + +repositories { + mavenCentral() + jcenter() +} + +def kotlinVersion = '1.3.20' + +dependencies { + implementation project(':parser') + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion" + runtime "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion" + + testImplementation "org.jetbrains.kotlin:kotlin-test-junit5:$kotlinVersion" + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.2' + testImplementation 'org.hamcrest:hamcrest-junit:2.0.0.0' +} + diff --git a/parser/build.gradle b/parser/build.gradle new file mode 100644 index 000000000..3cc9417fb --- /dev/null +++ b/parser/build.gradle @@ -0,0 +1,21 @@ +plugins { + id 'antlr' + id 'java' +} + +repositories { + mavenCentral() +} + +dependencies { + antlr 'org.antlr:antlr4:4.7.2' +} + +compileJava { + dependsOn tasks.withType(AntlrTask) +} + +generateGrammarSource { + outputDirectory = file("src/prog8/parser") + arguments += ["-no-listener","-no-visitor"] +} diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 000000000..9eb378fba --- /dev/null +++ b/settings.gradle @@ -0,0 +1,2 @@ +include ':parser' +include ':compiler' \ No newline at end of file