Stack overflow with mutually recursive rules #70
Answered
by
zesterer
nrabulinski
asked this question in
Q&A
-
Hi! I'm creating a parser for a rust-like language and I'm a little bit stuck. This is roughly my simplified grammar which causes me the headache:
I tried different approaches at simplifying it or implementing it with chumsky in different ways but I always end up panicking and I'm not sure how I can approach this problem |
Beta Was this translation helpful? Give feedback.
Answered by
zesterer
Jan 9, 2022
Replies: 1 comment 3 replies
-
That sounds like you're hitting left recursion. Chumsky is a recursive decent PEG parser, so you'll need to restate your left-recursive rules as right-recursive ones. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
nrabulinski
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That sounds like you're hitting left recursion. Chumsky is a recursive decent PEG parser, so you'll need to restate your left-recursive rules as right-recursive ones.