|
|
@@ -1,18 +1,18 @@ |
|
|
|
# Lark - a modern parsing library for Python |
|
|
|
# Lark - a parsing toolkit for Python |
|
|
|
|
|
|
|
Lark is a parser built with a focus on ergonomics, performance and resilience. |
|
|
|
Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity. |
|
|
|
|
|
|
|
Lark can parse all context-free languages. That means it is capable of parsing almost any programming language out there, and to some degree most natural languages too. |
|
|
|
Lark can parse all context-free languages. To put it simply, it means that it is capable of parsing almost any programming language out there, and to some degree most natural languages too. |
|
|
|
|
|
|
|
**Who is it for?** |
|
|
|
|
|
|
|
- **Beginners**: Lark is very friendly for experimentation. It can parse any grammar you throw at it, no matter how complicated or ambiguous, and do so efficiently. It also constructs an annotated parse-tree for you, using only the grammar, and it gives you convienient and flexible tools to process that parse-tree. |
|
|
|
- **Beginners**: Lark is very friendly for experimentation. It can parse any grammar you throw at it, no matter how complicated or ambiguous, and do so efficiently. It also constructs an annotated parse-tree for you, using only the grammar and an input, and it gives you convienient and flexible tools to process that parse-tree. |
|
|
|
|
|
|
|
- **Experts**: Lark implements both Earley(SPPF) and LALR(1), and several different lexers, so you can trade-off power and speed, according to your requirements. It also provides a variety of sophisticated features and utilities. |
|
|
|
|
|
|
|
**What can it do?** |
|
|
|
|
|
|
|
- Parse all context-free grammars, and handle any ambiguity |
|
|
|
- Parse all context-free grammars, and handle any ambiguity gracefully |
|
|
|
- Build an annotated parse-tree automagically, no construction code required. |
|
|
|
- Provide first-rate performance in terms of both Big-O complexity and measured run-time (considering that this is Python ;) |
|
|
|
- Run on every Python interpreter (it's pure-python) |
|
|
|