This fork publishes the grammar to PyPI as
tree-sitter-lpc(prebuilt wheels for Linux, macOS and Windows). The grammar itself comes from cpu/tree-sitter-lpc.
A tree-sitter grammar for the
LDMud dialect of LPC, built rule-by-rule against the
canonical bison grammar in
ldmud/src/prolang.y.
Structural limits the grammar deliberately doesn't model are documented in
limitations.md.
tree-sitter generate # regenerate src/parser.c from grammar.js
tree-sitter test # run test/corpus/*.txt
tree-sitter parse <file> # parse a file, print the CSTA Nix dev shell with tree-sitter, nodejs, and gcc is wired up via
flake.nix + .envrc; direnv allow once and the shell auto-loads.
The generated parser is committed to src/, so consumers don't need the
tree-sitter CLI. Language bindings ship under bindings/:
- C (
bindings/c/) —tree_sitter_lpc()symbol exported viatree-sitter-lpc.h. Link withsrc/parser.c. - Rust (
bindings/rust/) — published as thetree-sitter-lpccrate; exposesLANGUAGEfor use withtree-sitter. - Go (
bindings/go/) —Language()returns the*sitter.Languageforgo-tree-sitter. - Python (
bindings/python/) —tree_sitter_lpc.language()returns atree_sitter.Languagefor thetree-sitterPython package. - Node.js (
bindings/node/) — default export is a binding object whoselanguageproperty plugs into thetree-sitternpm package.
See CONTRIBUTING.md for the dev environment,
grammar workflow, and per-binding test invocations.
MIT.