lark icon indicating copy to clipboard operation
lark copied to clipboard

Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.

Results 147 lark issues
Sort by recently updated
recently updated
newest added

I already have my tokens as a list of terminals, like this in a toy grammar: start: A B C A: "a" B: "b" C: "c" tokens = ["a", "b",...

question

Here lies a fix for Lark's standalone parser generation breaking when Lark is run through the black formatter. The fix simply entails stripping lines as they are iterated through in...

**Describe the bug** The functionality of Lark standalone parser generator breaks if lark codebase is run through the black formatter tool. This error is produced: ``` jaclang/vendor/lark/tools/standalone.py:217: in main gen_standalone(lark_inst,...

**Describe the bug** I want to keep a standalone parser in my repo, to make it easy to use without any dependencies. But even rebuilding exactly the same grammar produces...

## Short description When running the example `examples/advanced/reconstruct_python.py`, the code fails on `AssertionError` in approx 50% of cases. ``` Traceback (most recent call last): File "/home/zarnovic/git/lark/examples/advanced/reconstruct_python.py", line 86, in test()...

bug
Earley

**Describe the bug** After updated from Lark 1.1.5 to 1.1.7, the parser fails with (at least) two problems. These seem to be due to a rename of `ParseTree` to `Tree`...

This PR updates the Python grammar to be a bit more up-to-date and correct, and it suggests a set of tests that could be run, although I am not sure...

``` parser = Lark(r""" %ignore /[\t \f]+/ // WS start: d|c d: B c: A B A: "abc" B: /[^\W\d]\w*/ """, parser="lalr") input_str = 'abc' interactive = parser.parse_interactive(input_str) print(interactive.exhaust_lexer()) interactive.accepts()...

**Suggestion** Lark currently supports caching to disk for the LALR parser, but it would be great to support it for the Earley parser too. We have a project that has...

enhancement

**Describe the bug** In a contextual lexing setup, where numerous BasicLexer instances get spawned for the various contexts, many of these instances are being created with toxic "spam" terminals. In...

discussion