chumsky
chumsky copied to clipboard
Add a Pratt parsing combinator
Would this allow a person to embedded a Pratt parser for algebraic expressions within in a parent parser for a programming language?
Yes, that would be the goal.
That sounds awesome. I'm curious if you had any thoughts on what the API might look like.
I wrote a Pratt parser factory in TypeScript a while ago. It's surprisingly short, but it also doesn't support post-fix operators and there's some hardcoded logic in it, e.g. checking for unmatched parens.
I'm still relatively new to rust, but would be interested in helping out with this issue.
I've not really had too many thoughts about it yet, to be honest. Perhaps I'll try some experimenting next week.
zero-copy is getting a pratt parser combinator. See #288.
Closable with #464?