Re: Self compiling compiler

"Nils M Holm" <nmh@t3x.org>
Thu, 31 Mar 2016 19:41:24 +0200

          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)
[3 later articles]
| List of all articles for this month |
From: "Nils M Holm" <nmh@t3x.org>
Newsgroups: comp.compilers
Date: Thu, 31 Mar 2016 19:41:24 +0200
Organization: Compilers Central
References: 16-03-013
Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="88661"; mail-complaints-to="abuse@iecc.com"
Keywords: C, tools
Posted-Date: 31 Mar 2016 15:59:14 EDT

ERSHC <ershc123@nyc.rr.com> 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)?


For something really small, check out Lindberg's Foogol. Here's a version
I converted to C89: http://www.t3x.org/files/foogol5.shar.Z


For something more complete, but still much simpler than GCC, have a look
at SubC: http://www.t3x.org/subc/index.html There's also a book describing
its internals: http://www.t3x.org/reload/index.html (Yes, I'm the author!)


There are various other small compilers, from very simple ones to
multi-platform optimizing compilers on my home page. Feel free to
look around!


--
Nils M Holm < n m h @ t 3 x . o r g > www.t3x.org



Post a followup to this message

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