--- id: lark-js version: "0.1.4" license: MIT license_treatment: permissive maintenance: dormant --- # lark-js — An extension to Lark that generates a Javascript standalone License: permissive · Maintenance: dormant · Downloads: 74.0K/mo ## 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 above — 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 pip install lark-js uv add lark-js poetry add lark-js ## Installing 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: unspecified - Install friction: low - Maintenance: dormant - Downloads: 74.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags javascript parser generator, lalr parser from grammar, lark grammar to javascript, ebnf parser compiler, portable parsing toolkit, parser-generator, grammar-compiler [View on SkillFed](https://skillfed.io/packages/lark-js) · [View on PyPI](https://pypi.org/project/lark-js/)