a modern parsing library
Project Links
Meta
Author: Erez Shinan
Requires Python: >=3.8
Classifiers
Development Status
- 5 - Production/Stable
Intended Audience
- Developers
Programming Language
- Python :: 3
Topic
- Software Development :: Libraries :: Python Modules
- Text Processing :: General
- Text Processing :: Linguistic
License
- OSI Approved :: MIT License
Lark is a modern general-purpose parsing library for Python. With Lark, you can parse any context-free grammar, efficiently, with very little code. Main Features:
- Builds a parse-tree (AST) automagically, based on the structure of the grammar
- Earley parser
- Can parse all context-free grammars
- Full support for ambiguous grammars
- LALR(1) parser
- Fast and light, competitive with PLY
- Can generate a stand-alone parser
- CYK parser, for highly ambiguous grammars
- EBNF grammar
- Unicode fully supported
- Automatic line & column tracking
- Standard library of terminals (strings, numbers, names, etc.)
- Import grammars from Nearley.js
- Extensive test suite
- And much more! Since version 1.2, only Python versions 3.8 and up are supported.
Sep 22, 2025
1.3.0
Aug 13, 2024
1.2.2
Aug 13, 2024
1.2.1
Jan 10, 2024
1.1.9
Oct 23, 2023
1.1.8
Jul 20, 2023
1.1.7
Jul 17, 2023
1.1.6
Dec 06, 2022
1.1.5
Nov 02, 2022
1.1.4
Oct 11, 2022
1.1.3
Mar 01, 2022
1.1.2
Feb 08, 2022
1.1.1
Feb 07, 2022
1.1.0
Nov 15, 2021
1.0.0
Nov 12, 2021
0.12.0
May 03, 2021
0.11.3
Nov 16, 2020
0.11.1
Nov 16, 2020
0.11.0
Oct 13, 2020
0.10.1