Lark

Latest version: v1.1.9

Safety actively analyzes 638681 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 8 of 9

0.6.0

Breaking changes:

* Changes to Tree: Added `meta` attribute, in addition to `data` and `children`. Line & column attributes, when using `propagate_positions`, moved to meta (i.e. `tree.meta.line`)

* Revised transformers and visitors. Added `v_args`. `inline_args` and `InlineTransformer` are now deprecated. Instead, use `v_args(inline=True)` as a decorator on transformer methods and class definition.

* Changed default Earley lexing behavior - now returns the maximum match only. The original behavior, that attempts to match all appearances of a terminal, has been moved to the "dynamic_complete" lexer. (commit 6ea4588)

* Restructured exceptions - UnexpectedInput is now superclass of UnexpectedToken and UnexpectedCharacters, all of which support the get_context() and match_examples() methods. (commit 5c6df8e)

* Columns now start at 1 (instead of 0)

* Default LALR lexer in now contextual

* Removed "scanless parsing" mode (wasn't useful)

Other changes:

* Added `%declare` directive for plugin support.

* Default extension for Lark grammars is now `.lark` (with syntax highlighting for popular editors)

* Improved error reporting

* Lots of bugfixes, better performance, and cleaner code.

0.5.6

- Bugfix in Earley prioritization
- Bugfix: A tree builder optimization clashed with explicit ambiguity
- Bugfix in standalone parser
- Ensure Tokens can be pickled correctly

Also better error messages (there's still much to do in that regard)

0.5.5

* Fixed an inefficiency in the tree builder, significant for big inputs
* More bugfixes and optimizations

0.5.4

* Fixed propagate positions feature.

* Added support for ranged-repeat (see commit for details)

* Reconstruct now working again (experimental module)

* A few bugfixes and refactors

0.5.3

Also contains several usability fixes

0.5.2

Added a tool to generate standalone parsers for LALR(1)

Page 8 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.