Let’s Build a Compiler

I decided to LaTeX-ify Jack Crenshaws ‘Let’s Build a Compiler‘ series. Between 1988 and 1995 Jack Crenshaw wrote a sixteen-part series on how to build a compiler. This was a non-technical introduction (No Dragon book necessary) and appears to have encouraged many people to try their hand at developing a compiler.

The entire series does not seem to be available now on the original web site but I tracked down a word doc that I used as the basis for this LaTeX version. You can download a pdf copy here. There may still be some tuning of the formatting but the document is in a decent shape. For Delphi users, the compiler series used Pascal.

Download pdf

For those interested in writing interpreters, I would also highly recommend the book by Kernighan and Pike where the authors introduce yacc, lex and the programming language hoc. This is one of the easiest introductions to writing an interpreter I have come across (apart perhaps from the book by Brown). What is nice about hoc is how the authors introduce the interpreter step by step. Both books can be bought very cheaply on the second-hand market.

Kernighan, Brian W.; Pike, Rob (1984). The Unix Programming Environment. Prentice Hall. ISBN 013937681X.

Brown, P.J (1992) Writing Interactive Compilers and Interpreters John Wiley & Sons Inc, ISBN 10: 0471100722

 

 

This entry was posted in General Science Interest. Bookmark the permalink.

One Response to Let’s Build a Compiler

  1. Dan Rzeppa says:

    The book “Compiler Construction” by Niklaus Wirth is an excellent introduction to compiler writing. A new copy is a little expensive, however it can be purchased used on Amazon for a reasonable price.

Leave a Reply

Your email address will not be published.