News for hackers. Stuff that matters.
Re:Pratt parsing is a black box by vinipsmaker on Wednesday November 04, 2026 @09:11AM (#50365774)
I'm not familiar with ohm/ometa, but yes, if your language is "simple" it's possible to design a framework that generates both the Pratt parsers + a grammar so you don't need to manually keep them in sync. The complexity toll will be spent on this framework though. Plus it's unlikely that you're gonna explore traits that are exclusive to Pratt parsing so Pratt parsing would be just an implementation detail that you don't need to even bother to learn. The only upside of adopting Pratt parsing here is that Pratt parsing is fast.
Re:Pratt parsing is a black box by e12e on Wednesday November 04, 2026 @03:26PM (#50371034)
I recommend having a quick look at https://ohmjs.org/ just because it's such a joyful project that present parsing in such a simple fashion.

As to benefits of Pratt, as best I can tell ohm is fast and lean - but handwriting a Pratt parser will be faster and leaner (esp lighter memory requirements).

Ohm does however handle left recursion, which could be considered a major feature of Pratt.