3 ms·
Write a compiler. It gives you great insights into parsing/tokenizing, building syntax trees, implementing syntax and Symantec checks and code generation. Obvio
by fahimulhaq 10y 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.
- dmlittle 10y agoI'd add writing compiler optimizations as well. Common subexpression elimination, dead code-elimination, copy propagation, register allocation to name a few.