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:
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With