lark
lark copied to clipboard
Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
**Describe the bug** I'm trying to upgrade commentjson to be able use it with latest `lark`. Looks like something is wrong with `lark` code because `commentjson` 0.9.0 documentation prints call...
**Suggestion** Sometimes we need to parse and transform a very large stream that can't be fit into memory all at once. Lark has a way of transforming a tree from...
For trees the position information is placed inside the `meta` attribute. When using `Token` the information is directly stored in attributes. This makes it hard to write code which accepts...
Over on SO someone asked this question: https://stackoverflow.com/questions/76366280/parsing-formulas-using-lark-ebnf/76381256 As far as I can tell, it shows a bug in the earley parser where it duplicates some Tokens because of enormous...
``` ERROR:root:parser raised exception Traceback (most recent call last): File "/home/aspizu/Projects/goboscript-lsp/goboscript-lsp/diag.py", line 32, in get_diagnostics parser.parse(doctext, on_error=on_error) File "/usr/lib/python3.11/site-packages/lark/lark.py", line 645, in parse return self.parser.parse(text, start=start, on_error=on_error) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/lark/parser_frontends.py",...
I'm writing a simple assembly-like language and I'm using Lark to parse it's AST, but I'm having trouble with ambiguity. Here's a boiled-down MinRe: ```python grammar =""" program: statement* //...
A generated standalone parser contains the user's dumped grammar data plus code extracted from Lark which is otherwise under the MIT license. Given that, how is the generated parser licenced...
Considering the following input string `input_str = "C(x) :: B(x) & A(x)"`. I have the following grammar : ``` my_grammar = u""" start: expressions expressions : (expression)+ ?expression : my_rule...
When attempting to package my application using PyInstaller, I encounter an error related to the "lark" library. When trying to initiate the SelfQueryRetriever from langchain, I encounter the following problem:...
**Suggestion** Requesting a constructor option to disable the "double underscore" prefixing of targets based on grammar module names. Consider grammar file `main.lark`: ``` %import foo.target_in_foo ... start: sometarget sometarget: othertarget...