Hacker News new | ask | show | jobs
by fahimulhaq 3694 days ago
Write a compiler. It gives you great insights into parsing/tokenizing, building syntax trees, implementing syntax and Symantec checks and code generation. Obviously, you would have to pick a toy language (typically a subset of a known programming language) and your generated code will be inefficient. Still, you would learn a lot.
1 comments

I'd add writing compiler optimizations as well. Common subexpression elimination, dead code-elimination, copy propagation, register allocation to name a few.