Let's Build a Compiler - revamped
- From: mhx@xxxxxx (Marcel Hendrix)
- Date: Tue, 27 Dec 2005 21:00:39 GMT
In 1988, the first installment of Jack W. Crenshaw's classic
"Let's Build a Compiler" article appeared. The last of this
16-part series was published in 1995.
I have started the conversion of Mr. Crenshaw's excellent
non-technical introduction to compiler construction into
Forth. That is, the original Turbo Pascal code for the 68000
under SK*OS is slowly getting transformed to Forth for a
80x86 CPU, running under Linux, Windows XP or MS-DOS.
The original text files can be downloaded from
http://compilers.iecc.com/crenshaw/. They are highly recommended.
At the moment, 10 of the 16 original articles are finished and
the HTML for the remaining 6 has been cleaned up. In the transcripts
a 32-bit, byte-addressing Forth with 8-bit characters is assumed.
Hopefully I am excused for using iForth, regrettably some work will be
needed for other Forths.
It is very tempting to completely rewrite the articles in Forth
style, but so far I have been able to resist. However, I do plan
to heavily modify the TINY language implementation that is used
Jack Crenshaw started, but apparently never finished completely.
I am only a few hairs removed from actually executing the compiled
code from within iForth (using the Forth assembler and Forth itself
as the RTL). It also seems very well possible to turn TINY into
an interpreter (by generating Forth instead of x86 code).
Maybe some people here would like to help with this project
(review & code suggestions). Given the popularity of the articles
it might be a nice Forth show-off to a broader audience.
I did not find any ports from the original 68K to x86 code, and
only one (unreadable) "C" project.
-marcel
.
- Follow-Ups:
- Let's Build a Compiler - revamped
- From: Marcel Hendrix
- Let's Build a Compiler - revamped
- Prev by Date: WHS MAIL ARRIVED
- Next by Date: Let's Build a Compiler - revamped
- Previous by thread: WHS MAIL ARRIVED
- Next by thread: Let's Build a Compiler - revamped
- Index(es):
Relevant Pages
|
Loading