Re: the long way to the development of a compiler

Matthew J.Lockner <lockner@chaos.cns.uni.edu>
1 Jul 2001 23:42:03 -0400

          From comp.compilers

Related articles
the long way to the development of a compiler stf@apl.it (Stefano Lanzavecchia) (2001-06-28)
Re: the long way to the development of a compiler lockner@chaos.cns.uni.edu (Matthew J.Lockner) (2001-07-01)
Re: the long way to the development of a compiler neelk@alum.mit.edu (2001-07-02)
Re: the long way to the development of a compiler dlindauer@notifier-is.net (david lindauer) (2001-07-02)
Re: the long way to the development of a compiler walter@nospamm-digitalmars.com (walter) (2001-07-02)
Re: the long way to the development of a compiler stf@apl.it (Stefano Lanzavecchia) (2001-07-02)
Re: the long way to the development of a compiler christian.bau@isltd.insignia.com (Christian Bau) (2001-07-02)
Re: the long way to the development of a compiler aleksey+@cs.cmu.edu (Aleksey Kliger) (2001-07-03)
[4 later articles]
| List of all articles for this month |

From: Matthew J.Lockner <lockner@chaos.cns.uni.edu>
Newsgroups: comp.compilers
Date: 1 Jul 2001 23:42:03 -0400
Organization: University of Northern Iowa
References: 01-06-071
Keywords: design
Posted-Date: 01 Jul 2001 23:42:03 EDT

It's probably not what you had in mind, but I feel compelled to refer you
to the textbook for my compiler course: Modern Compiler Implementation in
(C|Java|ML) by Andrew Appel. While the general student opinion seems to
have been thumbs-down for this series, I thought it did an excellent job of
explaining the finer issues of "real" compiling in the context of a fairly
simple ML-like, C-like language (Tiger). The book's approach is to keep
the compiler modules up to instruction selection free of architecture
details. One of my planned projects on the horizon might be to see how
well the book's methods stack up to the 6502 (I have an old C128 that has
sadly fallen into disuse). The book is geared toward the RISC believer,
but I made my backend generate Intel code and found the approaches to adapt
quite well.


The book's website has plenty of downloadable code; not nearly enough to
build the working compiler, though-- it is a student project, after all.


There are chapters devoted to implementing functional languages, garbage
collectors, and SSA form, as well as optimizations and fun with the cache,
if that is your thing.


I found the code in the Java version most readable, although the ML version
was respectable as well. If you need lots of example code, you might try
the Holub book (I forget the title right now..)


Of course it is all just a student's testimonial. But I find there is
little greater satisfaction than watching native binaries generated by your
own compiler run, and this book helped a lot.


M. Lockner


Stefano Lanzavecchia wrote:


> I guess what I am really looking for is a set of reasonably well
> documented sample programs, that implement simple compilers with
> simple, but working back-ends (but a recommendation for a book would
> be equally good).


Post a followup to this message

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