Scheme and its Implementation (was Re: Want to get started)

wilson@cs.utexas.edu (Paul Wilson)
14 Nov 1996 21:56:29 -0500

          From comp.compilers

Related articles
Want to get started - would like to write a simple interpreter ravenpub@southwind.net (1996-11-01)
Scheme and its Implementation (was Re: Want to get started) wilson@cs.utexas.edu (1996-11-14)
| List of all articles for this month |

From: wilson@cs.utexas.edu (Paul Wilson)
Newsgroups: comp.compilers
Date: 14 Nov 1996 21:56:29 -0500
Organization: CS Dept, University of Texas at Austin
References: 96-11-018
Keywords: interpreter, Scheme

Carl D. Cravens <ravenpub@southwind.net> wrote:
>I'm 28, have been programming since I was 14, am in the tail end of my
>junior year as a CS major... but I've never really encountered the
>material necessary to learning how to write my own interpreter or
>compiler. (A class I'm taking now is about 'generic' theory of how
>programming languages work, and though it's applicable here, it
>doesn't have any practical, hands-on stuff.)


You might have a look at my course notes/book-in-progress/html doc,
An Introduction to Scheme and its Implementation, available from


    http://www.cs.utexas.edu/users/oops.


(NOTE: start with the html document, not the ASCII course notes, most
of which have been incorporated into the html document in improved
form.)


I take a fairly traditional approach to presenting a Scheme interpreter
and compiler, in Scheme. Like Abelson and Sussman's _Structure_and_
_Interpretation_of_Computer_Programs_, I introduce the language
and then an interpreter and then a compiler, although not in distinct
phases. (Each is used to reinforce the understanding of the other.)


You might also look at Friedman et al.'s _Essentials_of_Programming_
_Languages_.


Advantages of my book are:


    1. I give a pretty thorough introduction to the Scheme language
          so you'll know what it is you're interpreting,


    2. I have a bunch of pictures that show the crucial data structures
          and how they evolve,


    3. It's a browsable html document, so you can cut code examples out
          and paste them into an interpreter to run them.


    4. For the moment, at least, it's free.


Disadvantage:


      1. it's not quite finished (but people have found it usable and
            helpful in its current form).


In general, the Scheme literature is pretty good at explaining
interpreters and compilers.


You find out pretty quickly that it's easy to write a toy interpreter
for Scheme, and that a simple compiler isn't much harder.


Also, my web site has a bunch of other papers on language implementation,
including a couple of surveys on garbage collectors, and a survey on
memory allocators.


--
| Paul R. Wilson, Comp. Sci. Dept., U of Texas @ Austin (wilson@cs.utexas.edu)
| Papers on memory allocators, garbage collection, memory hierarchies,
| persistence and Scheme interpreters and compilers available via ftp from
| ftp.cs.utexas.edu, in pub/garbage (or http://www.cs.utexas.edu/users/wilson/)
--


Post a followup to this message

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