Gerbil Parser is a programmable syntax engine for Gerbil Scheme. Define a grammar with Scheme macros, compose language services with POO, and parse into source-preserving syntax artifacts. Generated Rust parsers and a C ABI provide integration paths for other hosts.
The repository includes Arithmetic, Bash, Cypher, FHIRPath, GQL, HCL, HL7, and TLA+ packs. Each pack documents the syntax and backends it qualifies.
From a checkout with Gerbil and its C toolchain on your path:
gerbil deps --install
gerbil build
just test-all
cargo test --workspace --all-features --lockedThe Scheme acceptance entry prepares its declared fixtures and runs the full source suite. See the qualification guide for host prerequisites, focused checks, and generated-product verification.
For example, a Gerbil module can call the arithmetic parser:
(import (only-in :gerbil-parser/languages/arithmetic/parser parse-arithmetic))
(parse-arithmetic "1 + 2")See the language pack guide for grammar declarations, loader composition, and fixtures. The parse artifact contract defines the result boundary.
| Directory | Responsibility |
|---|---|
src/ | Grammar, compiler, runtime, and public service implementations |
languages/ | Language declarations, parser entries, and language fixtures |
rust/ | Rust runtime, generated artifacts, and C ABI integration |
t/ | Scheme tests, fixtures, benchmarks, and qualification |
formal/ | Lean proofs, Quint models, and source-bound evidence |
docs/ | Architecture, language authoring, and performance research |
Start with the compiler architecture, Rust AOT design, or research index.
See LICENSE.