You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Breaking changes
Dropped Python 2 support! Lark now only supports Python 3.6 and up.
Install lark using pip install lark (instead of lark-parser )
maybe_placeholders is now True by default
Renamed TraditionalLexer to BasicLexer, and 'standard' lexer option to 'basic'
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.
use_accepts in UnexpectedInput.match_examples() is now True by default
v_args(meta=True) now gives meta as the first argument. i.e. (meta, children)
Improvments
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
Acknowledgements
Many thanks to all our contributors and donors, who made this release possible. Special thanks goes to -
@MegaIng, for innumerous features, bugfixes, and code-reviews.
@chanicpanic, for his immense and continual contributions to the Earley parser, and for helping with the v1.0 effort.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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.
Breaking changes
Dropped Python 2 support! Lark now only supports Python 3.6 and up.
Install lark using
pip install lark
(instead of lark-parser )maybe_placeholders
is now True by defaultRenamed TraditionalLexer to BasicLexer, and 'standard' lexer option to 'basic'
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.
use_accepts
inUnexpectedInput.match_examples()
is now True by defaultv_args(meta=True)
now gives meta as the first argument. i.e.(meta, children)
Improvments
%import python (...)
Acknowledgements
Many thanks to all our contributors and donors, who made this release possible. Special thanks goes to -
This discussion was created from the release Version 1.0! Big release with breaking changes.
Beta Was this translation helpful? Give feedback.
All reactions