
Port of the ANTLR v4 runtime translating Java sources into a portable implementation, enabling ANTLR-generated parsers; runtime API parity work ongoing.
A Kotlin Multiplatform port of the ANTLR v4 runtime.
ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files. This repository ports the ANTLR runtime to Kotlin Multiplatform so that parsers generated against the ANTLR grammar tooling can run across every KMP target (JVM, Android, Android Native, iOS/tvOS/watchOS, macOS, Linux, Windows, JS, and Wasm).
Status: port in progress. The runtime is being translated from the upstream Java sources; the Kotlin Multiplatform target build gate is wired, but runtime API parity is still in progress.
kotlin {
sourceSets {
commonMain {
dependencies {
implementation("io.github.kotlinmania:antlr4-kotlin:0.1.2")
}
}
}
}The runtime is intended to stay almost entirely in commonMain. Platform
actual declarations are reserved for hardware or operating-system calls that
cannot be represented faithfully in common Kotlin.
All credit for ANTLR and its runtime design belongs to the upstream project. This is a derivative work; the algorithms, structure, and the overwhelming majority of the design are theirs.
Upstream project:
BSD 3-Clause, the same license as upstream ANTLR. The upstream copyright ("Copyright (c) 2012-2022 The ANTLR Project") is retained in LICENSE.txt alongside the port copyright. See LICENSE.txt for the full terms.
A Kotlin Multiplatform port of the ANTLR v4 runtime.
ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files. This repository ports the ANTLR runtime to Kotlin Multiplatform so that parsers generated against the ANTLR grammar tooling can run across every KMP target (JVM, Android, Android Native, iOS/tvOS/watchOS, macOS, Linux, Windows, JS, and Wasm).
Status: port in progress. The runtime is being translated from the upstream Java sources; the Kotlin Multiplatform target build gate is wired, but runtime API parity is still in progress.
kotlin {
sourceSets {
commonMain {
dependencies {
implementation("io.github.kotlinmania:antlr4-kotlin:0.1.2")
}
}
}
}The runtime is intended to stay almost entirely in commonMain. Platform
actual declarations are reserved for hardware or operating-system calls that
cannot be represented faithfully in common Kotlin.
All credit for ANTLR and its runtime design belongs to the upstream project. This is a derivative work; the algorithms, structure, and the overwhelming majority of the design are theirs.
Upstream project:
BSD 3-Clause, the same license as upstream ANTLR. The upstream copyright ("Copyright (c) 2012-2022 The ANTLR Project") is retained in LICENSE.txt alongside the port copyright. See LICENSE.txt for the full terms.