News for hackers. Stuff that matters.
Re:Pratt Parsers: Expression Parsing Made Easy (2011) by zevv on Saturday January 20, 2024 @07:35AM (#39067030)
Ha, nice to see this on HN: this article was pretty helpful to me to understand the concept a few years back when extending my PEG parsing library [1] with a Pratt parser; this mitigates the problem of PEG parsers not allowing left recursion and allows for a much more concise notation of grammars with operator precedence. Thank you Bob:

1. https://github.com/zevv/npeg#precedence-operators

Re:Pratt Parsers: Expression Parsing Made Easy (2011) by vidarh on Saturday January 20, 2024 @10:34AM (#39068567)
I love that way of embedding precedence tables without the "classic" repetitive EBNF pattern. I will shamelessly steal this for my next parser library. Also, your documentation is outstanding.

(tiny typo - "Pratt" is spelled "Prett" in one sentence on your page)

Re:Pratt Parsers: Expression Parsing Made Easy (2011) by kragen on Saturday January 20, 2024 @11:30AM (#39069237)
did you try warth's left-recursion hack for packrat parsers? i'm curious what your experience was with it if so