chumsky icon indicating copy to clipboard operation
chumsky copied to clipboard

Add a Pratt parsing combinator

Open zesterer opened this issue 3 years ago • 4 comments

zesterer avatar Dec 09 '21 17:12 zesterer

Would this allow a person to embedded a Pratt parser for algebraic expressions within in a parent parser for a programming language?

kevinbarabash avatar Apr 13 '22 02:04 kevinbarabash

Yes, that would be the goal.

zesterer avatar Apr 13 '22 09:04 zesterer

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.

kevinbarabash avatar Apr 16 '22 16:04 kevinbarabash

I've not really had too many thoughts about it yet, to be honest. Perhaps I'll try some experimenting next week.

zesterer avatar Apr 16 '22 23:04 zesterer

zero-copy is getting a pratt parser combinator. See #288.

zesterer avatar Feb 20 '23 22:02 zesterer

Closable with #464?

Zij-IT avatar Jul 09 '23 20:07 Zij-IT