3 ms·
Thorsten Ball’s “Writing an Interpreter in Go” has a very in-depth walkthrough of building a Pratt parser. It’s a very good read/tutorial. Maybe it’s just me b
by wirthjason 6y ago
Thorsten Ball’s “Writing an Interpreter in Go” has a very in-depth walkthrough of building a Pratt parser. It’s a very good read/tutorial.
Maybe it’s just me but it seems there’s a lot of language design coming out recently. E.g. Bob Nystrom has “Crafting Interpreters.” It really like that language design and parsing gets more attention, which is great because it’s fascinating stuff.
- mamp 6y agoMy favourite article on Pratt parsing, it’s in Rust but easy to port to any language: https://matklad.github.io/2020/04/13/simple-but-powerful-pratt-parsing.html https://matklad.github.io/2020/04/13/simple-but-powerful-pra...
- RobertJacobson 6y agoMatklad follows Norvell's excellent exposition in these two articles pretty closely: http://www.engr.mun.ca/~theo/Misc/exp_parsing.htm http://www.engr.mun.ca/~theo/Misc/exp_parsing.htm http://www.engr.mun.ca/~theo/Misc/pratt_parsing.htm http://www.engr.mun.ca/~theo/Misc/pratt_parsing.htm Matklad's stuff is really great. I wish he had cited Norvell, though.