Learning Resources on Parsers, Interpreters, and Compilers [closed]
I've been wanting to play around with writing my own language for a while now (ostensibly for the learning experience) and as such need to be relatively grounded in the construction of Parsers, Interpreters, and Compilers. So:
- Does anyone know of any good resources on constructing Parsers, Interpreters, and Compilers?
EDIT: I'm not looking for compiler-compilers/parser-compilers such as Lex, Yacc and Bison...
The best paper I ever read on compilers is dated 1964 "META II a syntax-oriented compiler writing language" by Val Schorre. (http://doi.acm.org/10.1145/800257.808896)
In 10 pages, he shows you how to build an astoundingly simple but very effective compiler-compiler, provides you with with the compiler-compiler grammar and provides you with enough details for you to hand implement it in an afternoon (with one astonishing conceptual moment when you realize how it recurses), and just for grins implements an ALGOL-like language. The paper is a complete gas and really should be required reading for anybody working with compiler technology.
Here's a link to play with an great tutorial on metacompiling, based on the paper. http://www.bayfronttechnologies.com/mc_tutorial.html
This highly-entertaining blog post by Steve Yegge (Rich Programmer Food) won't tell you everything you need to know about how to build a compiler (although it does include a fair amount of good insight), but it does a great job of explaining why you want to understand compliers.
Heck, that post almost got me to start studying compilers, and I have a full-time job, a 3-year-old at home, and about -1.5 free hours per day on average.