compiler books

zp4@semaphorecorp.com (Semaphore Corporation)
8 Jun 1996 18:22:22 -0400

          From comp.compilers

Related articles
Compiler books martin_filteau@yahoo.ca (Martin Filteau) (2006-08-29)
Re: Compiler books tommy.thorn@gmail.com (Tommy Thorn) (2006-08-30)
Re: Compiler books Trevor.Jenkins@suneidesis.com (2006-08-30)
Re: Compiler books cbarron413@adelphia.net (Carl Barron) (2006-08-31)
Re: Compiler books ang.usenet@gmail.com (Aaron Gray) (2006-09-03)
Re: Compiler books rmathew@gmail.com (Ranjit Mathew) (2006-09-08)
compiler books meulenbr@prl.philips.nl (1994-03-22)
compiler books zp4@semaphorecorp.com (1996-06-08)
| List of all articles for this month |

From: zp4@semaphorecorp.com (Semaphore Corporation)
Newsgroups: comp.compilers
Date: 8 Jun 1996 18:22:22 -0400
Organization: Compilers Central
Keywords: books

Here are my two favorite compiler books (plus one other book), which you
might like to include in your faq. They are not mentioned in message
93-01-155.


"Programming a Personal Computer" by Per Brinch Hansen
Prentice-Hall 1982 ISBN 0-13-730283-5


This unfortunately-titled book explains the design and creation of a
single-user programming environment for micros, using a Pascal-like
language called Edison. The author presents all source code and
explanations for the step-by-step implementation of an Edison compiler and
simple supporting operating system, all written in Edison itself (except
for a small supporting kernel written in a symbolic assembler for PDP
11/23; the complete source can also be ordered for the IBM PC).


The most interesting things about this book are: 1) its ability to
demonstrate how to create a complete, self-contained, self-maintaining,
useful compiler and operating system, and 2) the interesting discussion of
language design and specification problems and trade-offs in Chapter 2.




"Brinch Hansen on Pascal Compilers" by Per Brinch Hansen
Prentice-Hall 1985 ISBN 0-13-083098-4


Another light-on-theory heavy-on-pragmatics here's-how-to-code-it book.
The author presents the design, implementation, and complete source code
for a compiler and p-code interpreter for Pascal- (Pascal "minus"), a
Pascal subset with boolean and integer types (but no characters, reals,
subranged or enumerated types), constant and variable definitions and array
and record types (but no packed, variant, set, pointer, nameless, renamed,
or file types), expressions, assignment statements, nested procedure
definitions with value and variable parameters, if statements, while
statements, and begin-end blocks (but no function definitions, procedural
parameters, goto statements and lables, case statements, repeat statements,
for statements, and with statements).


The compiler and interpreter are written in Pascal* (Pascal "star"), a
Pascal subset extended with some Edison-style features for creating
software development systems. A Pascal* compiler for the IBM PC is sold by
the author, but it's easy to port the book's Pascal- compiler to any
convenient Pascal platform.


This book makes the design and implementation of a compiler look easy. I
particularly like the way the author is concerned with quality,
reliability, and testing. The compiler and interpreter can easily be used
as the basis for a more involved language or compiler project, especially
if you're pressed to quickly get something up and running.




"A Model Implementation of Standard Pascal" by Jim Welsh & Atholl Hay
Prentice-Hall 1986 ISBN 0-13-586454-2


This book is only really useful if you need to implement a COMPLETE version
of a platform-independent Pascal, but I find it interesting because the 483
pages consist entirely of the source code listing for the compiler and
p-code interpreter, including copious {comments} to explain the code. The
code eagerly delves into the horrible minutia necessary when implementing a
complete language, and proves that no language designer should be allowed
to present his design until AFTER being forced to write a complete compiler
for the language.


Joe Snyder
joe@semaphorecorp.com
[Thanks. I will indeed add them to the FAQ. -John]


--


Post a followup to this message

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