You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I'd like to start working on adding support for left-recursive rules, which are of the form:
rule sum() -> Expression = sum() + number()
What do you guys think? Would you be interested in a PR?
The main motivation behind this is to parse the new syntax introduced by CPython 3.9/3.10. Guido has already described an approach that looks promising, following that would be my first go.
The text was updated successfully, but these errors were encountered:
I've only skimmed the linked post, but it looks like a better explanation or simpler version of the approach used by OMeta. The drawback is that it's tied to packrat parsing / memoization, which rust-peg has some support for with #[cache], but I've not found it to be a performance win in practice, and is not often enabled. I tend to write peg grammars as a shorthand for how I'd hand-code a recursive descent parser, and avoid code that needs to repeatedly re-parse the same input.
But if you can make straightforward extension to #[cache] (#[cache_left_rec]?), to enable left recursion, I'd accept that PR. The code that implements #[cache] is pretty gross, though...
Hey, I'd like to start working on adding support for left-recursive rules, which are of the form:
What do you guys think? Would you be interested in a PR?
The main motivation behind this is to parse the new syntax introduced by CPython 3.9/3.10. Guido has already described an approach that looks promising, following that would be my first go.
The text was updated successfully, but these errors were encountered: