Then, books. I'll make a list some day, I promise! ;) From the top of my head: Wirth's "Compiler Construction", Richard's "BCPL, the Language and its Compiler", and - shameless plug - "Practical Compiler Construction" by myself. I have also read the Dragon Book back then - it's good, but too heavy on theory for a beginner.
Mmm, one of several components.
> I'm not sure that reading real-life code will get you very far, because it often deals with lots of edge cases and attempts to be efficient and generate clever code.
Very good point. It takes a bit more time and effort to build a proper mental map, but there's really no worthwhile alternative.
> However, there are compilers that have been made as educational tools or with simplicity as a major design goal. I would stick to those in the beginning.
I agree! These help a lot, and make study almost (if not very) fun :)
> See my home page (http://t3x.org) for lots of examples!
Will do, thanks!
> Then, books. I'll make a list some day, I promise! ;) From the top of my head: Wirth's "Compiler Construction", Richard's "BCPL, the Language and its Compiler", and - shameless plug - "Practical Compiler Construction" by myself. I have also read the Dragon Book back then - it's good, but too heavy on theory for a beginner.
Interesting. I actually stumbled on a copy of the Dragon Book while at an op-shop some time ago. I didn't actually know what I was grabbing at the time, just that it looked like a really good idea to prioritize getting it. I'm very happy to have it, and hope to be able to make sense of it at some point :)
Looks like Wirth's Compiler Construction can be found at http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf
BCPL, the Language and its Compiler and Practical Compiler Construction don't seem to have free options; that's fine, I've added these (and your other books!) to my (burgeoning) wishlist :P
For example, http://www.muppetlabs.com/~breadbox/software/tiny/teensy.htm... is extremely interesting, but a lot of it is over my head.
I guess at the end of the day there's no real alternative to "just dive into the source code for a while" with these sorts of things - hence the importance of having "decades of experience" under your belt - but I'm curious if there's anywhere in particular that you might recommend as a startpoint.