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

**Describe the bug** When attempting to compare a variable set to `None` with a Symbol, Lark's implementation of `__eq__` within the `Symbol` class raises an `AssertionError`. **To Reproduce** ```python from...

**Describe the bug** When a terminal is ignored but still used in the grammar, the behavior is different depending on the parser used. With LALR, the terminal is ignored, with...

bug
add to docs

I am trying to extract terminals in the Transform method. The way I have the rule set up is the following: `rel_op: "==" | "" | "=" | "!=" |...

question

**Describe the bug** If an `lalr` grammar is loaded from a cached file, and then the parser is passed to initialize a `Reconstructor(...)` class, initialization fails with the following error:...

### The Problem I am trying to apply a general grammar on various types of text files; specifically on code and documentation files in languages such as python, C, LaTeX......

enhancement

**Suggestion** 1. Use explicitly named decorators: `@wrap_every` (class level only), `@inline_children` (method level only) 2. Let `Transformer` decide which arguments to pass based on method signature: * If method has...

enhancement

**Suggestion** Add new method `Tree.find_type(typ: str) -> Iterator[Token]` as a companion for `Tree.find_data()`: ```python for term in tree.find_type('TERM'): ... ``` **Describe alternatives you've considered** Right now this can be achieved...

enhancement

**Suggestion** Add new method `Tree.has_data(data: str) -> bool` to determine whether there is a token with given data. **Describe alternatives you've considered** This can be achieved with `find_data()` method, but...

enhancement

**Describe the bug** Normally when you create a calculator you work merely with binary operations and everything is parenthesized internally like so (unless they transform it like I think I...