2019-01-12 12:44:57 +00:00
|
|
|
# Main Features
|
2019-02-04 23:38:39 +00:00
|
|
|
- Earley parser, capable of parsing any context-free grammar
|
|
|
|
- Implements SPPF, for efficient parsing and storing of ambiguous grammars.
|
2019-03-28 13:53:28 +00:00
|
|
|
- LALR(1) parser, limited in power of expression, but very efficient in space and performance (O(n)).
|
|
|
|
- Implements a parse-aware lexer that provides a better power of expression than traditional LALR implementations (such as ply).
|
2018-08-03 06:08:37 +00:00
|
|
|
- EBNF-inspired grammar, with extra features (See: [Grammar Reference](grammar.md))
|
2018-12-20 23:41:35 +00:00
|
|
|
- Builds a parse-tree (AST) automagically based on the grammar
|
2018-08-03 06:08:37 +00:00
|
|
|
- Stand-alone parser generator - create a small independent parser to embed in your project.
|
|
|
|
- Automatic line & column tracking
|
|
|
|
- Automatic terminal collision resolution
|
|
|
|
- Standard library of terminals (strings, numbers, names, etc.)
|
|
|
|
- Unicode fully supported
|
|
|
|
- Extensive test suite
|
|
|
|
- Python 2 & Python 3 compatible
|
|
|
|
- Pure-Python implementation
|
|
|
|
|
2019-02-04 23:38:39 +00:00
|
|
|
[Read more about the parsers](parsers.md)
|
2018-08-03 06:08:37 +00:00
|
|
|
|
2019-01-12 12:44:57 +00:00
|
|
|
# Extra features
|
2018-08-03 06:08:37 +00:00
|
|
|
|
2019-01-12 12:44:57 +00:00
|
|
|
- Import rules and tokens from other Lark grammars, for code reuse and modularity.
|
2018-08-03 06:08:37 +00:00
|
|
|
- Import grammars from Nearley.js
|
2019-02-04 23:38:39 +00:00
|
|
|
- CYK parser
|
2018-08-03 06:08:37 +00:00
|
|
|
|
|
|
|
### Experimental features
|
|
|
|
- Automatic reconstruction of input from parse-tree (see examples)
|
|
|
|
|
|
|
|
### Planned features (not implemented yet)
|
|
|
|
- Generate code in other languages than Python
|
|
|
|
- Grammar composition
|
|
|
|
- LALR(k) parser
|
|
|
|
- Full regexp-collision support using NFAs
|