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 194 lark issues
Sort by recently updated
recently updated
newest added

**Suggestion** I would be like to be able to use Lark to search for all substrings of a string matching some Lark grammar. e.g. something along the lines of the...

enhancement

**To Reproduce** ``` python3 ./outlines/examples/parsing.py ``` shows an error ``` /Users/gur/miniconda3/envs/jan25/lib/python3.10/site-packages/transformers/utils/generic.py:441: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. _torch_pytree._register_pytree_node( Traceback (most recent call last): File "/Users/gur/Documents/jan18/./outlines/examples/parsing.py", line 22, in...

The link in "How to write a DSL - Implements a toy LOGO-like language with an interpreter" (referenced here: https://github.com/lark-parser/lark/blob/master/docs/index.rst?plain=1#L118) seems to be broken as https://blog.erezsh.com doesn't load (for me...corp...

The JSON tutorial states: >The question-mark prefixing value (”?value”) tells the tree-builder to inline this branch if it has only one member. In this case, value will always have only...

I get the following error when I run the self-query function in langchain,which relis on lark. 1.lark.exceptions.UnexpectedCharacters: No terminal matches ',' in the current parser context, at line 1 col...

question

**Describe the bug** AssertionError ``` $ python parser.py Traceback (most recent call last): File "/home/user/Projects/project/parser.py", line 5, in parser = Lark.open("grammar.lark") ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/.config/nvim/venv/lib/python3.12/site-packages/lark/lark.py", line 580, in open return cls(f,...

bug

**Suggestion** The current `Token` class has signature of `Optional[int]` for column, line and positions. This means that you always need to ```python a: int = token.line #type : ignore ```...

enhancement

## Suggestion I suggest to add an option for user to exclude classes from being handled by transformer produced by [ast_utils.create_transformer](https://github.com/lark-parser/lark/blob/master/lark/ast_utils.py#L34) not only by underscoring class name, but with custom...

enhancement

A common way to write strings in python is to put a backslash at the end and continue in the next line, this makes code more readable as well. **To...

Is it possible to parse one token at a time, building a parse tree incrementally in the process? One could then also run a custom interpreter at each step. I...

question