Jack W. Crenshaw wrote the Let's Build a Compiler article series from 1988 - 1995. This document is a formatted version of that excellent non-technical introduction to compiler construction. These web pages were created in 2005, and port Mr. Crenshaw's original Pascal code for the 68000 under SK*OS to the Forth language on a 80x86 CPU, under Windows XP. The text files were downloaded from http://compilers.iecc.com/crenshaw/. They are highly recommended. In this transcript I have assumed a 32-bit, byte-addressing Forth, with 8-bit characters. Division is symmetric, not floored, and two's complement is assumed throughout. iForth works splendidly for it, but other Forths can do it too.
I enjoy writing and in addition to my published books I offer free Open Content material on this web page. I both enjoy and appreciate feedback on ideas for material and reporting any errors. I offer free web books on Java and artificial intelligence programming, Common Lisp programming, and a new but still incomplete book The Software Design and Development Book. I am also working on a Ruby AI book and a short paper on AI design patterns. I also have a link to an old paper on AI, Go and Consciousness (updated 1/25/2004) available here. I have a short paper Jumpstarting the Semantic Web available here (new version 1/14/2005). I am also starting to include my fiction (short stories) here in addition to computer science web books.
The Little Book of Semaphores is a free (in both senses of the word) textbook that introduces the principles of synchronization for concurrent programming. In most computer science curricula, synchronization is a module in an Operating Systems class. OS textbooks present a standard set of problems with a standard set of solutions, but most students don't get a good understanding of the material or the ability to solve similar problems. The approach of this book is to identify patterns that are useful for a variety of synchronization problems and then show how they can be assembled into solutions. After each problem, the book offers a hint before showing a solution, giving students a better chance of discovering solutions on their own. The book covers the classical problems, including "Readers-writers," "Producer-consumer", and "Dining Philosophers." In addition, it collects a number of not-so-classical problems