|
|
|
|
|
by userbinator
2533 days ago
|
|
This looks like something similar to Crenshaw's excellent tutorial of the same name: https://compilers.iecc.com/crenshaw/ and its x86 port: https://github.com/lotabout/Let-s-build-a-compiler As interesting as Lisp-family languages are, I still think it's better to use something with more traditional syntax and start with parsing, because that both reaches a much wider audience and gives a very early introduction to thinking recursively --- the latter being particularly important for understanding of the process in general. A simple expression evaluator, that you can later turn into a JIT and then a compiler, is always a good first exercise. |
|
Not everything needs to be on a so-you-have-never-programmed-before level. This series explicitly assumes "some knowledge of native-code build processes, Lisp, C, and x86 assembly language". People who know Lisp should have had an introduction to thinking recursively already.
Parsing would be a useless distraction for someone interested in writing a Scheme compiler in Scheme.