4 ms·
> Yes, examples of minimal ELF files are good starting points for getting the back end part up and running. Mmm, one of several components. > I'm not sure tha
by i336_ 9y ago
> Yes, examples of minimal ELF files are good starting points for getting the back end part up and running.
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 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 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