3 ms·
I have read Crenshaw's series (the first one that is recommended), and found it eye-opening how easy it is to write simple parsers and compilers. That said he
by perlgeek 15y ago
I have read Crenshaw's series (the first one that is recommended), and found it eye-opening how easy it is to write simple parsers and compilers.
That said he does use some obscure assembly of which I hadn't heard before, so I'd really love to see an update to a more mainstream platform.
- narag 15y agoIIRC there was a version of the code for x86.
- telemachos 15y agoA bit of Googling found this blog post[1] which lists a number of Crenshaw-based variants. Two other quick finds: a more readable pdf version of the Crenshaw tutorial itself[2], and "an x86 compiler written in Ruby"[3] made by following along in the Crenshaw tutorial. [1] http://blog.spacesocket.com/2011/06/24/lets-build-a-compiler/ http://blog.spacesocket.com/2011/06/24/lets-build-a-compiler... [2] http://www.stack.nl/~marcov/compiler.pdf http://www.stack.nl/~marcov/compiler.pdf [3] https://github.com/samsonjs/compiler https://github.com/samsonjs/compiler