4 ms·
The book "The AWK Programming Language" by Aho, Weinberger and Kernighan is a real gem. Chapter 6 is "Little Languages", it shows you how to write interpreters
by credit_guy 6y ago
The book "The AWK Programming Language" by Aho, Weinberger and Kernighan is a real gem. Chapter 6 is "Little Languages", it shows you how to write interpreters and compilers using AWK. In particular it even shows how to start a bootstrap: you write a compiler to a subset of AWK that writes down C code. You don't need to read all the 5 chapters before, only Chapter 1 is enough.
- deleted 6y ago[deleted]
- dfjsk 6y agoGenerally when a compiler produces C code (or assembly, or whatever) it is described as emitting C code. "A compiler for a subset of AWK that emits C code"