mirror of https://github.com/lark-parser/lark.git
1.7 KiB
1.7 KiB
Lark
A modern parsing library for Python
Overview
Lark can parse any context-free grammar.
Lark provides:
- Advanced grammar language, based on EBNF
- Three parsing algorithms to choose from: Earley, LALR(1) and CYK
- Automatic tree construction, inferred from your grammar
- Fast unicode lexer with regexp support, and automatic line-counting
Lark's code is hosted on Github: https://github.com/lark-parser/lark
Install
$ pip install lark-parser
Syntax Highlighting
- Sublime Text & TextMate
- Visual Studio Code (Or install through the vscode plugin system)
Documentation Index
- Philosophy & Design Choices
- Full List of Features
- Examples
- Tutorials
- How to write a DSL - Implements a toy LOGO-like language with an interpreter
- How to write a JSON parser - Teaches you how to use Lark
- Unofficial
- Program Synthesis is Possible - Creates a DSL for Z3
- Guides
- Reference
- Discussion