4 ms·
For a much smaller piece, this technical report contains a two-page compiler for a small Lisp to x86 assembly, from parsing to codegen, written as a series of P
by pjscott 11y ago
For a much smaller piece, this technical report contains a two-page compiler for a small Lisp to x86 assembly, from parsing to codegen, written as a series of Parsing Expression Grammar substitutions:
http://www.vpri.org/pdf/tr2010003_PEG.pdf http://www.vpri.org/pdf/tr2010003_PEG.pdf
I admit that it's probably not the best thing to learn from at first, but it's truly a thing of beauty.