Re: Self compiling compiler

Thomas David Rivers <rivers@dignus.com>
Thu, 31 Mar 2016 14:16:49 -0400

          From comp.compilers

Related articles
Self compiling compiler ershc123@nyc.rr.com (ERSHC) (2016-03-31)
Re: Self compiling compiler 545-066-4921@kylheku.com (Kaz Kylheku) (2016-03-31)
Re: Self compiling compiler thomas.goorden@gmail.com (Thomas Goorden) (2016-03-31)
Re: Self compiling compiler nmh@t3x.org (Nils M Holm) (2016-03-31)
Re: Self compiling compiler rivers@dignus.com (Thomas David Rivers) (2016-03-31)
Re: Self compiling compiler alexfrunews@gmail.com (2016-03-31)
Re: Self compiling compiler jkallup@web.de (Jens Kallup) (2016-03-31)
Re: Self compiling compiler 545-066-4921@kylheku.com (Kaz Kylheku) (2016-04-03)
Re: Self compiling compiler ershc123@nyc.rr.com (ERSHC) (2016-04-02)
Re: Self compiling compiler nmh@t3x.org (Nils M Holm) (2016-04-04)
Re: Self compiling compiler federation2005@netzero.com (2016-05-25)
[2 later articles]
| List of all articles for this month |
From: Thomas David Rivers <rivers@dignus.com>
Newsgroups: comp.compilers
Date: Thu, 31 Mar 2016 14:16:49 -0400
Organization: Aioe.org NNTP Server
References: 16-03-013
Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="88891"; mail-complaints-to="abuse@iecc.com"
Keywords: tools
Posted-Date: 31 Mar 2016 15:59:44 EDT

ERSHC wrote:


>I'd like to teach an undergraduate class based on the Thompson hack
>(see Ken Thompson's Turing Award lecture). I don't want to write a
>"whole" compiler, so need a compiler that can compile itself,
>preferably one that runs under Linux and is reasonably small. Can
>anyone point me to something more appropriate than gcc (which is far
>from small)?


Nicklaus Wirth's "Compiler Construction" text (his 3rd in this genre)
describes the small language Oberon-0 and walks thru writing a compiler
for this.


The compiler targets a RISC architecture for which he provides an emulator.


And - Dr. Wirth made the book available for free - you can get it from:


      http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf


and - you can read an HTML version (as well as get a copy of the sources)
from:


        https://www.inf.ethz.ch/personal/wirth/CompilerConstruction/index.html


as with all of Dr. Wirth's code - it is very small and very elegant while
simulaneously touching on all the major topics. The text and the code
are very approachable to an undergraduate student.


      - Dave Rivers -


--
rivers@dignus.com Work: (919) 676-0847


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.