Lark

Latest version: v1.1.9

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

Scan your dependencies

Page 7 of 9

0.6.6

(Points to the wrong commit, due to technical issues. Actually refers to commit 13ddc43782e9f3f34fc5331081682c3678df0598)

This release includes:

- Better error reporting

- Several bugfixes

- A new experimental feature: "maybe_placeholders", which replaces missing "maybe"s with a None, instead of removing them.

For example:
python
>>> p = Lark("""!start: "a"? "b"? "c"? """, maybe_placeholders=True)
>>> p.parse('b')
Tree(start, [None, Token(B, 'b'), None])
>>> p.parse('ac')
Tree(start, [Token(A, 'a'), None, Token(C, 'c')])

0.6.5

New features:

- Standalone parser now uses the contextual lexer

- Experimental support for importing rules in the grammar

Bugfixes:

- Fixed a hidden bug in the LALR algorithm (no, it probably doesn't affect you, see issue 250)
- Fixed v_args handling of staticmethod and classmethod (Issue 246, 249)
- Many fixes to the standalone parser
- Fixed propagate_positions (and added start_pos/end_pos attributes to Tree.Meta)
- Fixed automatic terminal naming
- EOF token now gets proper line/column number

Also improved error messages and documentation

0.6.4

- Several bugfixes
- Added MkDocs documentation (will replace github's wiki as official docs)

0.6.3

- Added support for relative imports: `%import .local_grammar.TERM` will look for `./local_grammar.lark`

- Added syntax for importing several terminals on one line: `%import common (NUMBER LETTER FLOAT)`

- Several bug-fixes

0.6.2

- Fixed a bug in PropagatePositions, that could occur when the user supplied Lark with a reducing transformer

- Added support for `v_args(tree=True)`, which supplies the decorated transformer method with the entire tree (instead of just the list of children)

0.6.1

- Lark grammars are now utf8 by default

- Added option to provide a custom lexer (with example)

- Fixed issue where Lark would throw RecursionError for huge grammars

- Improved error messages

Page 7 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.