# Welcome to Lark’s documentation!

Lark is a modern parsing library for Python. 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

## Install Lark

    $ pip install lark

## Syntax Highlighting

- Sublime Text & TextMate

- Visual Studio Code (Or install through the vscode plugin system)

- Intellij & PyCharm

- Vim

- Atom

## Resources

- Philosophy

- Features

- Examples

- Third-party examples

- Online IDE

- Tutorials

  - How to write a DSL - Implements a toy LOGO-like language with an interpreter

  - JSON parser - Tutorial - Teaches you how to use Lark

  - Unofficial

    - Program Synthesis is Possible - Creates a DSL for Z3

    - Using Lark to Parse Text - Robin Reynolds-Haertle (PyCascades 2023) (video presentation)

- Guides

  - How To Use Lark - Guide

  - How to develop Lark - Guide

- Reference

  - Grammar Reference

  - Tree Construction Reference

  - Transformers & Visitors

  - Working with the SPPF

  - API Reference

  - Tools (Stand-alone, Nearley)

  - Cheatsheet (PDF)

- Discussion

  - Gitter

  - Forum (Google Groups)