lark-js
An extension to Lark that generates a Javascript standalone
What it is and what it does
Lark-js is a Python package that acts as a command-line compiler for Lark grammars, converting `.lark` grammar files into standalone Javascript parsers. It is a port of the Lark parsing toolkit from Python to Javascript, using LALR(1) parsing to guarantee linear-time performance. The generated parsers build parse trees automatically and work in both Node.js and browsers.
The package is primarily a build tool: you install it on Python, write or reuse a Lark grammar file (which is language-agnostic EBNF), and run the `lark-js` command to produce a ready-to-use Javascript parser. The grammar syntax is portable across Python, Javascript, and Julia implementations of Lark, so you can share grammar definitions across projects in different languages.
Use it for:
- Generate a Javascript parser from an existing Lark grammar to embed parsing logic in a web application or Node.js service
- Port a Python project that uses Lark to Javascript while reusing the same grammar file unchanged
- Build a domain-specific language (DSL) parser in Javascript without hand-coding the parser logic
- Create interactive parsing tools or IDE-like features in the browser using Lark's step-by-step parsing capability
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Lark-js is a command-line tool that generates standalone LALR(1) parsers in Javascript from Lark grammar files, enabling portable grammar-based parsing across Python, Javascript, and Julia.
Yes, if you need to generate a Javascript parser from a Lark grammar and are comfortable with a dormant package. The tool is stable (Beta status, no known vulnerabilities), has low install friction, and solves a specific problem well. The 1551-day gap since last release is a concern for long-term maintenance, but the repository is not archived and the transpilation approach means it inherits Lark's stability. Install only if you actively need grammar-based parsing in Javascript.
Install
lark-js on PyPI
pip
pip install lark-jsuv
uv add lark-jspoetry
poetry add lark-jsInstalling lark-js
Before you install
Low install friction with a single pure-Python dependency. The package is dormant (last release 2022-05-16, 1551 days ago) but the repository remains active and unarchived; maintenance is minimal but not abandoned.
License in practice
MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you retain the license notice.
Quickstart
pip install lark-js
lark-js my_grammar.lark -o my_parser.js
Verify before relying
- Whether the transpiled Javascript output remains compatible with current Node.js and browser environments
- Current state of the 98% auto-transpilation claim and whether Python-side Lark updates actually sync to this package
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — lark |
| Maintenance | dormant — 1,551 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 74,014/month — #14,890 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: Lark_js-0.1.4-py2.py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
lark-parserLark is a parsing library that builds abstract…
permissive · top 5,000 on PyPI
pycep-parserParses Azure Bicep infrastructure-as-code files…
permissive · top 5,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
pyleriPyleri is a left-right parser generator that…
permissive · top 15,000 on PyPI
lark-oapiPython SDK for the Feishu Open Platform that…
permissive · top 5,000 on PyPI
spark-parserImplements an Earley algorithm parser for…
permissive · top 15,000 on PyPI
textparserA fast text parser library that lets you define…
permissive · top 5,000 on PyPI
python-hcl2Parses HCL2 configuration files (used by…
permissive · top 5,000 on PyPI
tree-sitter-javascriptProvides a JavaScript and JSX parser grammar…
permissive · top 5,000 on PyPI
tree-sitter-typescriptProvides TypeScript and TSX language grammars…
permissive · top 5,000 on PyPI