© P.D. Terry, Rhodes University, 1996
NEW (1 February 2005)
The complete text of the book has been distilled into one PDF file (1MB) pdfvers.pdf, courtesy of Irwin Oppenheim of the Netherlands.
NEW (23 November 2004)
A complete revision of this book, using C# and Java and the versions of
Coco/R for those languages, was published by Pearson Education (Addison
Wesley) on 5th November 2004 under the title "Compiling with C# and Java"
A feature of this book is that it demonstrates the use of Coco/R to
implement compilers for the JVM and CLR platforms.
You can view the contents of the freely available
This contains the preface and table of contents, additional material that does
not appear in the published book, the source code for all the case studies,
and distributions of Coco/R for C# and Java.
You might also like to view the
Pearson Education catalogue entry for this book.
Order it from
A complete revision of this book, using C# and Java and the versions of Coco/R for those languages, was published by Pearson Education (Addison Wesley) on 5th November 2004 under the title "Compiling with C# and Java" (ISBN 032126360X).
A feature of this book is that it demonstrates the use of Coco/R to implement compilers for the JVM and CLR platforms.
You can view the contents of the freely available "Resource Kit". This contains the preface and table of contents, additional material that does not appear in the published book, the source code for all the case studies, and distributions of Coco/R for C# and Java.
You might also like to view the Pearson Education catalogue entry for this book.
Order it from www.amazon.co.uk
(February 2003) Local site reorganization:
A previous ftp server has been decommissioned.
Source files for the software in the book are now available from this site.
Pat Terry's home page is now at http://www.scifac.ru.ac.za/cspt/
Pat Terry's Coco/R home page is now at http://www.scifac.ru.ac.za/coco/
This site provides an on-line edition of the text and other material from my book "Compilers and Compiler Generators - an introduction with C++", published in 1997 by International Thomson Computer Press. The original edition is now out of print, and the copyright has reverted to me.
The home page for this site, with details of how to download up-to-date compressed versions of the text and its supporting software and courseware can be found at http://www.scifac.ru.ac.za/compilers/.
The text of the book is Copyright © PD Terry. Although you are free to make use of the material for study and academic purposes, please do not redistribute it without my knowledge or permission.
Comments, suggestions and questions to Pat Terry.
There are two editions of the text, as it makes use of mathematical symbols and Greek letters that are not part of the standard ASCII character sets. If your browser can support it, use the symbol font edition. Your browser will already be set up to support the symbol font if the next line displays the Greek alphabet:
My system, when running Win95, supports this font this with Internet Explorer® and with Netscape Navigator®. When running Linux, my system supported the font with Netscape after I added the line
to the .Xdefaults file.
If you cannot get your browser to render this font, you should use the GIF Font edition of the text. Check on the possibilities by following the links below.
|symbols.htm||Symbols font for special characters|
|symgifs.htm||GIF images for special characters|
There are two editions of the text. Follow the appropriate link below to reach the contents pages for the edition that suits you:
|conts.htm||Symbol Font Edition|
|contg.htm||GIF Font Edition|
The Wintel versions of these files have been compressed with the 32-bit version of Info-ZIP's compression utility. Info-ZIP's software (Zip, UnZip and related utilities) is free and can be obtained as source code or executables from various anonymous-ftp sites, including ftp://ftp.uu.net/pub/archiving/zip/.
|sversion.zip||Symbol Font edition (only)|
|gversion.zip||GIF Font edition (only)|
Versions compressed with tar and gzip suitable for directly installing on Unix© servers can be found in the files
|sversion.tgz||Symbol Font edition (only)|
|gversion.tgz||GIF Font edition (only)|
After downloading the appropriate file, unpack it to a suitable directory and point your browser at the index.html or index.htm file in the usual way. The files are held in a flat structure; some of the files in the restricted editions are common to both editions. All files are named so as to conform to the old MSDOS 8+3 convention, but use lower-case letters; however, two copies of the index page (index.html and index.htm) are supplied. You may have to configure your server software to be able to render file names with a .htm extension correctly.
After downloading this file, unpack it and then copy the required files directly to a printer with no intermediate filtering. For example, issue the DOS command
COPY /B BIBLIO.PCL PRN
and you should get the bibliography section - about 4 pages. That forms a useful check that the system is compatible. If, after that, you wish to print a copy of a particular chapter, the entire set of files can be obtained by anonymous ftp from http://www.scifac.ru.ac.za/compilers/longpcl.zip (about 750K)
Some people who have tried this complain that the pages are too long. If when you copy BIBLIO.PCL to your printer you get the (obvious) situation that the pages seem too long, make sure you have set the printer for A4 paper. If the results are still unsatisfactory, the file http://www.scifac.ru.ac.za/compilers/shortpcl.zip contains the text set for slightly shorter page length on A4 paper. At present (12 November 1999) the index for this version is out of kilter with the page numbers.
The text of the book is also available for download as a compressed set of files in Postscript format, which will allow you to view the text with Ghostscript/Ghostview or print it on a suitable printer. This version also boasts a better set of diagrams. The compressed file is about 1.2MB, but expands to require 18MB of storage.
|pversion.tgz||Version compressed with tar and gzip|
|pversion.zip||Version compressed with Info-ZIP utility|
The text of the book is also available for download as a compressed set of files in PDF format, which will allow you to view and/or print the text with Adobe Acrobat or Ghostview. This version was constructed from the Postscript version using the ps2pdf utility packaged as part of Ghostscript. The compressed file is about 1.2MB, but expands to require 8MB of storage.
|pdfvers.tgz||Version compressed with tar and gzip|
|pdfvers.zip||Version compressed with Info-ZIP utility|
|pdfvers.pdf||Complete text in one PDF file (1MB) courtesy of Irwin Oppenheim of the Netherlands.|
The latest versions of the software sources for the book are available for anonymous FTP using the links shown below. These files are currently supplied as self-extracting MS-DOS executables within a "zip" wrapper. These were created with the freely available program LHA.EXE, and incorporate corrections that have emerged since the book was published. They may also be decompressed using LHA on other systems.
cocorc.exe 103 Kb Minimal Coco/R for C (Updated 2002) cocorm.exe 76 Kb Minimal Coco/R for Modula-2 (Updated 2002) cocorp.exe 65 Kb Minimal Coco/R for Pascal (Updated 2002)
common.exe 93 Kb Files common to all languages (Updated November 1999) csources.exe 350 Kb C++ specific sources (Updated November 1999) msources.exe 345 Kb Modula-2 specific sources (Updated November 1999) psources.exe 312 Kb Pascal specific sources (Updated November 1999) fileio.exe 153 Kb Modula-2 FileIO module (Updated November 1999)
All of the sources above
lha213.exe 43 Kb LHArc decompressor readme.1st 11 Kb Installation and setup instructions
Details of how to install the software can be found in Appendix A.
This contains a collection of exercises, tutorials, tests, examinations, and so on. The material is supplied "as is" for external readers, and is a bit of a mixed bag that changes dynamically as the course proceeds.
Complete courseware for the last few years is available from this site on application to the author.