On Sun, 2007-06-24 at 09:33 +1000, Mark Greenaway wrote:

> Maybe I should give it another look, if you really think it's that  
> important. Holidays are coming up, and it would keep me off the  
> streets :)

Like everyone else I have Aho and Ullman dragon book "Principles of
Compiler Design" but it's not the best.

One term we had a unit who's name I can't recall but which was
essentially "how to write a yacc clone".  Except that we didn't really,
the exercises were all very tinker-toy-ish.  The assigned text was
Bornat "Understanding and Writing Compilers" which I still have.

So while working full time and attending Sydney "we don't have part time
students" University late afternoons and evenings, I decided to write a
yacc clone (at the time I had the source but it wasn't legal).  Only to
discover that there were numerous errors in the assigned text.  My most
memorable example which had a sentence "if the set of terminal tokens
_is_ the empty set then ..." should have read "if the set of sets of
terminal tokens _includes_ the empty set then ...".  You sure learn a
lot about a subject when debugging the textbook.  My yacc clone actually
worked, right up until I started reading papers on how to handle error
states... which Bornat gave whole a hand wavey paragraph and didn't
mention is as big as or bigger than the rest of the problem.

Anyway, I'm still using the methods used to build the tables for table
driven parsers.  All they are is push down stacks of state machines,
after all.  The most recent time was HTML compound element start and
finish processing to paper over the inadequacies of a stupid library API
that I had no choice about using.

I have yet to find a compiler book I actually like, but I only have
four, so there is hope yet.

Regards
Peter Miller <[EMAIL PROTECTED]>
/\/\*        http://miller.emu.id.au/pmiller/

PGP public key ID: 1024D/D0EDB64D
fingerprint = AD0A C5DF C426 4F03 5D53  2BDB 18D8 A4E2 D0ED B64D
See http://www.keyserver.net or any PGP keyserver for public key.

"The plural of anecdotes is not data." -- Lee Revell

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
coders mailing list
coders@slug.org.au
http://lists.slug.org.au/listinfo/coders

Reply via email to