Version 1.0! Big release with breaking changes
Over the last few years, Lark has grown to become a comprehensive toolkit for parsing structured text.
Today, I'm happy to announce the long anticipated version 1.0 of Lark, marking the API as stable.
We've made quite a few breaking changes, in order to achieve congruous API with as little "gotchas" as possible. Upgrading to version 1.0 might require a few changes to your project.
Dropped Python 2 support! Lark now only supports Python 3.6 and up.
Install lark using
pip install lark(instead of lark-parser ).
maybe_placeholdersis now True by default.
'standard'lexer option to
Default priority is now 0, for both terminals and rules (used to be 1 for terminals).
Discard mechanism is now done by returning Discard, instead of raising it as an exception.
UnexpectedInput.match_examples()is now True by default.
v_args(meta=True)now gives meta as the first argument. i.e.
- Better type annotations
- Support for terminal priorities for dynamic Earley
- Python3 grammar is now officially supported, and can be used via
%import python (...)
- New experimental feature: Tree Templates
- Various bugfixes
Many thanks to all our contributors and donors, who made this release possible. Special thanks goes to -