C Compiler from Scratch
IMHO, you shouldn't write a compiler 'from scratch". You should write it using lots of libraries offering supporting functionality, such as:<p>* Grammar-based parsing<p>* Tree and graph representation, traversing<p>* (Possibly) A tree or graph grammar library<p>* Cross-platform filesystem support<p>* Combinatorial algorithm implementations (some of them may get used in various optimizers)<p>* terminal support (for formatted output)<p>and so on. And of course - there's the standard (C) library which one should also not count as "scratch".<p>Now, as an exercise, it is not-uninteresting to also implement parts of some of those, but it's not clear that "from scratch" is the most pedagogically-useful approach.