lark
lark copied to clipboard
Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
`%ignore` is the last domino before grammar composition is fully supported in Lark. We should be able to support it in both LALR and Earley. Robust grammar composition would be...
Hi, I've noticed an unexpected behaviour of rule priority in the default parser `"earley"`. I'm going to describe how to reproduce the issue step-by-step, by implementing a simple propositional calculus...
Can be signified with `$` Must be optional (grammars don't have to contain it to be correct) Need to make sure it works for both LALR and Earley, and with...
**What is your question?** I have a Lark grammar that has the following production: ``` !inneroperator : "has" | "=" | "" | "=" | "!=" ``` (The whole grammar...
**Describe the bug** I've written a transformer with the line `DECIMAL = float` (from `%import common.DECIMAL` in the grammar) and it seemed to work fine post-transforming an Earley-parsed tree –...
The present sphinx configuration leads to sources being included in the html build inside the `_sources` directory (because `html_copy_source` is set to `true` by default). Inside this directory the file...
**Describe the bug** When an input is exhausted, the earley parser raises `lark.errors.UnexpectedEOF(...)`, while the lalr parser raises `lark.errors.UnexpectedToken('$END', ...)`. For consistency sake, in lalr parsers, if the error raised...
**Suggestion** My use case is a bit odd: I'm not parsing text, I'm parsing rows in a database. Background: my employer provides network services to businesses (e.g. Internet access, dark...
Hey, it looks very interesting! You make this statement 2 times: "Trees are always simpler to work with than state-machines." Could you back this up with some resource or examples?...
**What is your question?** Try to be accurate and concise. **If you're having trouble with your code or grammar** Provide a small script that encapsulates your issue. Explain what you're...