
Line-by-line transliteration of a mature parser-generator, enabling compact readable grammars, reusable grammar macros, operator and type-inference support, compact defaults, and LR(1)/LALR(1) parsing.
This is a Kotlin Multiplatform line-by-line transliteration port of lalrpop/lalrpop.
Original Project: This port is based on lalrpop/lalrpop. All design credit and project intent belong to the upstream authors; this repository is a faithful port to Kotlin Multiplatform with no behavioural changes intended.
This is an in-progress port. The goal is feature parity with the upstream Rust crate while providing a native Kotlin Multiplatform API. Every Kotlin file carries a // port-lint: source <path> header naming its upstream Rust counterpart so the AST-distance tool can track provenance.
The text below is reproduced and lightly edited from
https://github.com/lalrpop/lalrpop. It is the upstream project's own description and remains under the upstream authors' authorship; links have been rewritten to absolute upstream URLs so they continue to resolve from this repository.
LALRPOP is a Rust parser generator framework with usability as its primary goal. You should be able to write compact, DRY, readable grammars. To this end, LALRPOP offers a number of nifty features:
Id* and define
things like Comma<Id> for a comma-separated list of identifiers.Expr<"all"> to represent the full range of expressions, but
Expr<"if"> to represent the subset of expressions that can appear
in an if expression.* and ?.Despite its name, LALRPOP in fact uses LR(1) by default (though you can opt for LALR(1)), and really I hope to eventually move to something general that can handle all CFGs (like GLL, GLR, LL(*), etc).
The LALRPOP book covers all things LALRPOP -- or at least it intends to! Here are some tips:
Cargo.toml.You really should read CONTRIBUTING.md if you intend to change LALRPOP's own grammar.
dependencies {
implementation("io.github.kotlinmania:lalrpop-util-kotlin:0.1.1")
}./gradlew build
./gradlew testSee AGENTS.md and CLAUDE.md for translator discipline, port-lint header convention, and Rust → Kotlin idiom mapping.
This Kotlin port is distributed under the same Apache-2.0 license as the upstream lalrpop/lalrpop. See LICENSE (and any sibling LICENSE-* / NOTICE files mirrored from upstream) for the full text.
Original work copyrighted by the lalrpop authors.
Kotlin port: Copyright (c) 2026 Sydney Renee and The Solace Project.
Thanks to the lalrpop/lalrpop maintainers and contributors for the original Rust implementation. This port reproduces their work in Kotlin Multiplatform; bug reports about upstream design or behavior should go to the upstream repository.
This is a Kotlin Multiplatform line-by-line transliteration port of lalrpop/lalrpop.
Original Project: This port is based on lalrpop/lalrpop. All design credit and project intent belong to the upstream authors; this repository is a faithful port to Kotlin Multiplatform with no behavioural changes intended.
This is an in-progress port. The goal is feature parity with the upstream Rust crate while providing a native Kotlin Multiplatform API. Every Kotlin file carries a // port-lint: source <path> header naming its upstream Rust counterpart so the AST-distance tool can track provenance.
The text below is reproduced and lightly edited from
https://github.com/lalrpop/lalrpop. It is the upstream project's own description and remains under the upstream authors' authorship; links have been rewritten to absolute upstream URLs so they continue to resolve from this repository.
LALRPOP is a Rust parser generator framework with usability as its primary goal. You should be able to write compact, DRY, readable grammars. To this end, LALRPOP offers a number of nifty features:
Id* and define
things like Comma<Id> for a comma-separated list of identifiers.Expr<"all"> to represent the full range of expressions, but
Expr<"if"> to represent the subset of expressions that can appear
in an if expression.* and ?.Despite its name, LALRPOP in fact uses LR(1) by default (though you can opt for LALR(1)), and really I hope to eventually move to something general that can handle all CFGs (like GLL, GLR, LL(*), etc).
The LALRPOP book covers all things LALRPOP -- or at least it intends to! Here are some tips:
Cargo.toml.You really should read CONTRIBUTING.md if you intend to change LALRPOP's own grammar.
dependencies {
implementation("io.github.kotlinmania:lalrpop-util-kotlin:0.1.1")
}./gradlew build
./gradlew testSee AGENTS.md and CLAUDE.md for translator discipline, port-lint header convention, and Rust → Kotlin idiom mapping.
This Kotlin port is distributed under the same Apache-2.0 license as the upstream lalrpop/lalrpop. See LICENSE (and any sibling LICENSE-* / NOTICE files mirrored from upstream) for the full text.
Original work copyrighted by the lalrpop authors.
Kotlin port: Copyright (c) 2026 Sydney Renee and The Solace Project.
Thanks to the lalrpop/lalrpop maintainers and contributors for the original Rust implementation. This port reproduces their work in Kotlin Multiplatform; bug reports about upstream design or behavior should go to the upstream repository.