mirror of
https://github.com/irmen/prog8.git
synced 2024-11-22 00:31:56 +00:00
fix Antlr grammar build and convert final build.gradle to build.gradle.kts (kotlin DSL)
This commit is contained in:
parent
5c09dc10ae
commit
844c97930f
@ -4,13 +4,13 @@
|
|||||||
<option name="perGrammarGenerationSettings">
|
<option name="perGrammarGenerationSettings">
|
||||||
<list>
|
<list>
|
||||||
<PerGrammarGenerationSettings>
|
<PerGrammarGenerationSettings>
|
||||||
<option name="fileName" value="$PROJECT_DIR$/parser/antlr/Prog8ANTLR.g4" />
|
<option name="fileName" value="$PROJECT_DIR$/parser/src/main/antlr/Prog8ANTLR.g4" />
|
||||||
<option name="autoGen" value="true" />
|
<option name="autoGen" value="true" />
|
||||||
<option name="outputDir" value="$PROJECT_DIR$/parser/src/prog8/parser" />
|
<option name="outputDir" value="$PROJECT_DIR$/parser/src/prog8/parser" />
|
||||||
<option name="libDir" value="" />
|
<option name="libDir" value="" />
|
||||||
<option name="encoding" value="" />
|
<option name="encoding" value="" />
|
||||||
<option name="pkg" value="" />
|
<option name="pkg" value="" />
|
||||||
<option name="language" value="" />
|
<option name="language" value="Java" />
|
||||||
<option name="generateListener" value="false" />
|
<option name="generateListener" value="false" />
|
||||||
</PerGrammarGenerationSettings>
|
</PerGrammarGenerationSettings>
|
||||||
</list>
|
</list>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "org.jetbrains.kotlin.jvm" version "$kotlinVersion" apply false
|
kotlin("jvm") version "2.0.21"
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
@ -1,13 +0,0 @@
|
|||||||
ANTLR 4 License
|
|
||||||
[The BSD License]
|
|
||||||
Copyright (c) 2012 Terence Parr and Sam Harwell
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
||||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
||||||
Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
|
|
||||||
parser:
|
|
||||||
antlr4 -o ../src/prog8/parser -no-listener -no-visitor -Dlanguage=Java Prog8ANTLR.g4
|
|
@ -19,22 +19,19 @@ configurations.all {
|
|||||||
exclude(group = "com.ibm.icu", module = "icu4j")
|
exclude(group = "com.ibm.icu", module = "icu4j")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.compileJava {
|
|
||||||
dependsOn(tasks.withType<AntlrTask>())
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.generateGrammarSource {
|
tasks.generateGrammarSource {
|
||||||
outputDirectory = file("src/prog8/parser")
|
outputDirectory = file("src/prog8/parser")
|
||||||
arguments.addAll(listOf("-no-listener", "-no-visitor"))
|
arguments.addAll(listOf("-no-listener", "-no-visitor"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.compileJava {
|
||||||
|
dependsOn(tasks.generateGrammarSource)
|
||||||
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
java {
|
java {
|
||||||
srcDir("${project.projectDir}/src")
|
srcDir("${project.projectDir}/src")
|
||||||
}
|
}
|
||||||
antlr {
|
|
||||||
srcDirs(listOf("${project.projectDir}/antlr"))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user