Re: textbook recommendations (Trevor Jenkins)
Wed, 4 Aug 1993 19:52:08 GMT

          From comp.compilers

Related articles
textbook recommendations (1993-08-03)
Re: textbook recommendations (1993-08-04)
Re: textbook recommendations (1993-08-04)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Trevor Jenkins)
Keywords: books
Organization: Trivia R me
References: 93-08-016
Date: Wed, 4 Aug 1993 19:52:08 GMT writes:

>The Tremblay and Sorenson book mentioned in the FAQ has a companion volume
>entitled "An Implementation Guide to Compiler Writing". Does anybody have
>comments about how it works, or how they work together?

The ``Implementation guide'' came out several years before the text book
itself. Surprisingly the references are from Guide to book and NOT the
other way round. The ``guide'' also uses a variant of PL/I. I have a copy
of both ``parts'' but I would not use it as a primary text book for
teaching a compiler course but let me hasten to add that I am not an
academic. If I were such AND had to teach a compilers course I would use
Bornat's ``Understanding and Writing Compilers'' (ISBN 0-333-21732-2).

Whilst Bornat's book is over 10 years old the emphasis is very different
from most other books. He starts by consider the code fragments required by
particular programming constucts and how by using a ``tree-walking''
algorithm these fragments can be generated from an intermediate form (which
is a sytax tree). Many of the examples use _real_ machine instructions
rather than an idealised architecture that others do. (Okay, _he_ claims
that it IS an idealised machine but those of us who wrote in MACRO-10 will
recognise the instruction set as being that of the DEC-10.)

Just for comparison T&S has been out for eight years and follows the
traditional lead of Aho et al in the Dragon books by starting with syntax
analysis and then considers code (optimisation and) generation. For my
taste the pace of T&S is ponderous where as Bornat's is very readable. The
one thing I have against Bornat's explanation is that his description of
LR(k) parsing is radically different from everybodyelse's; so much so that
I wouldn't use it if I had to teach LR(k) (or deriatives) as the only
parsing scheme. But to teach LR(k) to the exclusion of all others is like
insisting that programming can only be conducted in C. :-|

>Any other suggestions would be heartily appreciated, especially this
>week. Thanks,

I'd also use Hopgood's ``Compiling Techniques''. Okay so it's over 20 years
old now but it was the very first compiler book I ever read and many years
later I had the privilege of Bob Hopgood teach the compilers option on the
Masters course I was on. Much of his stuff about code generation is valid
today. Also, his ideas about hash tables are some much more practical than
those espoused by Maurer, Aho and the rest.

I am biased of course as both Bornat and Hopgood are on the right side of
the pond. :-)


Regards, Trevor.

Trevor Jenkins
134 Frankland Rd, Croxley Green, RICKMANSWORTH, WD3 3AU, England
email: phone: +44 (0)923 776436 radio: G6AJG

Post a followup to this message

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