Lark-parser

Latest version: v0.12.0

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

Scan your dependencies

Page 3 of 5

0.8.3

* Added the `g_regex_flags` option, to allow applying flags to all terminals.
* Fixed `end_pos` for Earley, when using `propagate_positions`
* Fixes for mypy
* Better docs

0.8.2

Changes in this version are:

- Added type stubs for all public APIs, in order to support type checking and completion using MyPy (or others)

- Added two new methods to the `Lark` class: `Lark.save()` and `Lark.load()`. Both methods pickle and unpickle (respectively) the class instance into/from file objects. These can be used to allow faster loading times. (future versions will implement an automatic caching feature)

- The standalone parser is now MPL2, instead of GPL. The Mozilla Public License is much less restrictive, so this shouldn't affect anyone who's already using the standalone parser. But it should make it easier for other users to adopt it.

0.8.1

* Reverted `maybe_placeholders` to False by default. It didn't obey the semantic versioning standard.

* Bugfix in standalone parser

0.8.0

**- Better LALR**

The biggest change to this release is a new LALR engine, that is capable of dealing with a few edge cases that the previous parser couldn't.

This parser is supposed to be fully backwards-compatible with the previous one, but that is hard to verify!

Thank you, Raekye, for this great contribution to Lark!

For more details, see issue 418

**- Transformers now visit tokens, as well as rules (an alternative to lexer_callbacks)**

Transformer now visit tokens, in addition to rules.

Simply define a method with the correct name (uppercase, of course), and the transformer will visit your tokens before the rules that contain them.

It's possible to disable this, for backwards compatibility, or for the slight performance gain.

**- Other Changes**

* Added `visit_topdown` methods to Visitor classes

* Lark now allows line comments in its rule definitions

* Better error messages

* Improvements to documentation

* Bugfixes

* `maybe_placeholders` is now the default (backwards-incompatible)** (REVERTED in 0.8.1)

0.7.8

* Improved error messages for EOF in Earley, recursive terminals, UnexpectedToken

* Bugfix for declared terminals, UnexpectedToken, unicode support in Python2,

0.7.7

- Fixed a bug in Earley where running it from different threads produced bad results

- Improved error reporting when using LALR

- Added 'edit_terminals' option, to allow programmatical manipulation of terminals, for example to support keywords in different languages.

Note: This release skips `0.7.6`, due to simple oversight on my part. Hopefully that shouldn't be a problem.

Page 3 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.