Pratt parsing is a black box

16 points9 comments2 hours ago
e12e

I'd like to see a bit more about how compares to peg or something like ohm/ometa - am I correct assuming you pretty much give up the benefits of a readable grammar as documentation?

Maybe I just need to see something super simple like a calculator with expressions side by side to grasp the trade-off?

https://ohmjs.org/

vinipsmaker

Author here.

I was using Pratt parsing for almost a year in a macro-heavy language that I've been developing before finally sitting down on my chair to write my thoughts on Pratt parsing. Code is closed right now because I don't want LLMs training on my code before 0.1, but I'll open source it again later.

Happy to answer questions.

throwup238

> Traditional parsing techniques register semantic actions to production rules.

Are there any professional slop interpreters who can explain what this means?

show comments