# lark-parser/lark

Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.

Repository: https://github.com/lark-parser/lark
Canonical: https://ross.abutalabs.com/products/lark
Language: Python
License: MIT
License Family: permissive
Topics: parser, parsing-library, parser-library, parsing-engine, earley, lalr, python, lark, cyk, grammar, parse, tree
Last push: 2026-08-26T19:56:53+00:00

## Health v2 (maintenance only)
Score: 79/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 42, longevity 100
- inputs: {"age_days": 3497, "days_push": 7, "days_rel": 310, "gap_med": 35, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5968, forks 512 (observed 2026-08-28T04:09:33.823467+00:00)

## What it is
Lark is a parsing toolkit for Python that can parse all context-free grammars using Earley, LALR(1), and CYK algorithms. It automatically builds annotated parse trees from a grammar and input, with no construction code required.

## Use cases
- parse a custom DSL in python
- build a json parser from a grammar
- parse config files into a syntax tree
- write a parser for a programming language
- handle ambiguous grammars gracefully
- generate a standalone parser for distribution
- build an AST from source code

## When to choose
- you need to parse any context-free grammar, including ambiguous ones
- you want automatic parse-tree construction without writing tree-building code
- you want a pure-python, dependency-free parser that runs on any Python interpreter
- you want to trade off parsing power and speed (Earley vs LALR)

## When to avoid
- you need maximum parsing speed in a performance-critical system (a compiled-language parser will be faster)
- you need a parser generator for languages other than Python
- your grammar requires context-sensitive parsing beyond context-free

## Facets
- artifact type: library
- maturity: stable
- function: parser, interpreter
- domain: parsers, programming-languages, developer-tools
- platform: python, cross-platform
- tags: earley, lalr, context-free-grammars, parse-tree, dsl, pure-python, standalone-parser-generation

## Member repositories
- lark-parser/lark (main) score 79

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:33.823467+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:50:09.440462+00:00, confidence not recorded.
  - readme: https://github.com/lark-parser/lark (fetched 2026-08-28T04:09:33.823467+00:00, sha 80b27ce1d169)
  - registry_pypi: https://pypi.org/pypi/lark/json (fetched 2026-08-29T08:46:03.943363+00:00, sha b5fb4fb121b5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
