Skip to content

Commit

Permalink
Migrated to the grammar-kit plugin 2022.3.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hurricup committed Apr 5, 2024
1 parent f3dcfae commit 3547fc8
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Expand Up @@ -35,7 +35,7 @@ plugins {
id("idea")
id("jacoco")
id("org.jetbrains.intellij") version "1.17.3"
id("org.jetbrains.grammarkit") version "2022.3.2.1"
id("org.jetbrains.grammarkit") version "2022.3.2.2"
id("com.github.kt3k.coveralls") version "2.12.2"
id("org.sonarqube") version "5.0.0.4638"
id("org.jetbrains.qodana") version "0.1.13"
Expand Down
3 changes: 1 addition & 2 deletions embedded/core/build.gradle.kts
Expand Up @@ -37,8 +37,7 @@ dependencies {
tasks {
val generateLexerTask = register<GenerateLexerTask>("generateEmbeddedPerlLexer") {
sourceFile.set(file("grammar/EmbeddedPerl.flex"))
targetDir.set("src/main/gen/com/perl5/lang/embedded/lexer/")
targetClass.set("EmbeddedPerlLexer")
targetOutputDir.set(file("src/main/gen/com/perl5/lang/embedded/lexer/"))
skeleton.set(rootProject.file(properties("templating_lexer_skeleton").get()))
purgeOldFiles.set(true)
}
Expand Down
3 changes: 1 addition & 2 deletions mason/htmlmason/core/build.gradle.kts
Expand Up @@ -38,8 +38,7 @@ dependencies {
tasks {
val generateLexerTask = register<GenerateLexerTask>("generateHTMLMasonLexer") {
sourceFile.set(file("grammar/HTMLMason.flex"))
targetDir.set("src/main/gen/com/perl5/lang/htmlmason/lexer/")
targetClass.set("HTMLMasonLexer")
targetOutputDir.set(file("src/main/gen/com/perl5/lang/htmlmason/lexer/"))
skeleton.set(rootProject.file(properties("templating_lexer_skeleton").get()))
purgeOldFiles.set(true)
}
Expand Down
3 changes: 1 addition & 2 deletions mason/mason2/core/build.gradle.kts
Expand Up @@ -38,8 +38,7 @@ dependencies {
tasks {
val generateLexerTask = register<GenerateLexerTask>("generateMason2Lexer") {
sourceFile.set(file("grammar/Mason2.flex"))
targetDir.set("src/main/gen/com/perl5/lang/mason2/lexer/")
targetClass.set("Mason2TemplatingLexer")
targetOutputDir.set(file("src/main/gen/com/perl5/lang/mason2/lexer/"))
skeleton.set(rootProject.file(properties("templating_lexer_skeleton").get()))
purgeOldFiles.set(true)
}
Expand Down
3 changes: 1 addition & 2 deletions mojo/core/build.gradle.kts
Expand Up @@ -38,8 +38,7 @@ dependencies {
tasks {
val generateLexerTask = register<GenerateLexerTask>("generateMojoliciousLexer") {
sourceFile.set(file("grammar/Mojolicious.flex"))
targetDir.set("src/main/gen/com/perl5/lang/mojolicious/lexer/")
targetClass.set("MojoliciousLexer")
targetOutputDir.set(file("src/main/gen/com/perl5/lang/mojolicious/lexer/"))
skeleton.set(rootProject.file(properties("templating_lexer_skeleton").get()))
purgeOldFiles.set(true)
}
Expand Down
8 changes: 3 additions & 5 deletions plugin/core/build.gradle.kts
Expand Up @@ -43,15 +43,13 @@ tasks {

val generatePerlLexerTask = register<GenerateLexerTask>("generatePerlLexer") {
sourceFile.set(file("grammar/Perl.flex"))
targetDir.set("src/main/gen/com/perl5/lang/perl/lexer/")
targetClass.set("PerlLexer")
targetOutputDir.set(file("src/main/gen/com/perl5/lang/perl/lexer/"))

dependsOn(generatePerlParserTask)
}
val generatePodLexerTask = register<GenerateLexerTask>("generatePodLexer") {
sourceFile.set(file("grammar/Pod.flex"))
targetDir.set("src/main/gen/com/perl5/lang/pod/lexer/")
targetClass.set("PodLexerGenerated")
targetOutputDir.set(file("src/main/gen/com/perl5/lang/pod/lexer/"))

dependsOn(generatePodParserTask)
}
Expand All @@ -66,7 +64,7 @@ tasks {
}

withType<GenerateParserTask> {
targetRoot.set(genRoot.canonicalPath)
targetRootOutputDir.set(genRoot)
purgeOldFiles.set(true)
}

Expand Down
5 changes: 2 additions & 3 deletions tt2/core/build.gradle.kts
Expand Up @@ -41,14 +41,13 @@ tasks {
sourceFile.set(file("grammar/TemplateToolkit.bnf"))
pathToParser.set("/com/perl5/lang/tt2/parser/TemplateToolkitParserGenerated.java")
pathToPsiRoot.set("/com/perl5/lang/tt2/psi")
targetRoot.set(genRoot.canonicalPath)
targetRootOutputDir.set(genRoot)
purgeOldFiles.set(true)
}

val generateLexerTask = register<GenerateLexerTask>("generateTT2Lexer") {
sourceFile.set(file("grammar/TemplateToolkit.flex"))
targetDir.set("src/main/gen/com/perl5/lang/tt2/lexer/")
targetClass.set("TemplateToolkitLexerGenerated")
targetOutputDir.set(file("src/main/gen/com/perl5/lang/tt2/lexer/"))
skeleton.set(rootProject.file(properties("lexer_skeleton").get()))
purgeOldFiles.set(true)

Expand Down

0 comments on commit 3547fc8

Please sign in to comment.