Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #1689

Re: Self compiling compiler

From Thomas David Rivers <rivers@dignus.com>
Newsgroups comp.compilers
Subject Re: Self compiling compiler
Date 2016-03-31 14:16 -0400
Organization Aioe.org NNTP Server
Message-ID <16-03-017@comp.compilers> (permalink)
References <16-03-013@comp.compilers>

Show all headers | View raw


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

Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Self compiling compiler ERSHC <ershc123@nyc.rr.com> - 2016-03-31 03:54 +0000
  Re: Self compiling compiler Kaz Kylheku <545-066-4921@kylheku.com> - 2016-03-31 15:01 +0000
  Re: Self compiling compiler Thomas Goorden <thomas.goorden@gmail.com> - 2016-03-31 17:50 +0200
  Re: Self compiling compiler "Nils M Holm" <nmh@t3x.org> - 2016-03-31 19:41 +0200
    Re: Self compiling compiler Kaz Kylheku <545-066-4921@kylheku.com> - 2016-04-03 10:34 -0400
      Re: Self compiling compiler Nils M Holm <nmh@t3x.org> - 2016-04-04 12:54 +0000
  Re: Self compiling compiler Thomas David Rivers <rivers@dignus.com> - 2016-03-31 14:16 -0400
  Re: Self compiling compiler alexfrunews@gmail.com - 2016-03-31 12:27 -0700
  Re: Self compiling compiler Jens Kallup <jkallup@web.de> - 2016-03-31 21:29 +0200
  Re: Self compiling compiler ERSHC <ershc123@nyc.rr.com> - 2016-04-02 20:58 +0000
  Re: Self compiling compiler federation2005@netzero.com - 2016-05-25 16:41 -0700
    Re: Self compiling compiler federation2005@netzero.com - 2016-05-28 14:49 -0700
      Re: Self compiling compiler rockbrentwood@gmail.com - 2016-08-22 15:56 -0700

csiph-web