Re:Show HN: A compiler for a small language into x86-64 asse...
by abnercoimbre on Friday May 01, 2020 @02:59AM
(#23039692)
You both should try "Compiler Construction: Principles and Practice" [0]. Theory is interleaved with substantial examples and exercises. You create an entire compiler for a tiny language called TINY (hah.) You write it in C and generate code for a portable virtual machine -- the book also goes into detail on the VM, with source code.
Lastly, the book's appendix has guidance for writing a compiler for a subset of the C language.
Lastly, the book's appendix has guidance for writing a compiler for a subset of the C language.
[0] https://www.cs.sjsu.edu/~louden/cmptext/