Compiling with C# and Java - Courseware

P.D. Terry, Rhodes University

(29 April 2021)

A complete revision of my earlier book (Compilers and Compiler Generators (1997)), using C# and Java and versions of the compiler generator Coco/R for those languages, was published as "Compiling with C# and Java" by Pearson Education on 5th November 2004. Following standard publisher practice, the book records a publication year of 2005, and the ISBN is 0-321-26360-X.

It is a pleasure to record the help and friendship of Hanspeter Mössenböck, developer of Coco/R, who has freely shared his software and expertise, and who carefully reviewed the manuscript.

This book is now out of print. A copy of the final draft as submitted to the publishers, along with associated software, may be read and downloaded from

The book has been used successfully for several years at Rhodes University. Over the years the material was modified, parts of the book were rewritten, and an abbreviated version was produced for student use.

A copy of this version, along with its associated software, may be read and downloaded from

The page you are looking at now has links to a mass of examples and courseware developed over the years. This has been made available "as is", with the caveat that, as time progressed and the version of Coco/R and the language and compiler for Parva described in the book changed, the later material inevitably shows minor inconsistencies with the earlier material.

This material may be viewed on-line, although it may be found more convenient to download and install the system onto your own computer.

In particular, a large collection of exercises, with their possible solutions worked in full, has been provided:

In addition, a website was developed incrementally for each year that the course was offered. By the end of the course this contained the practicals, tests and examinations which had been set for that year. This material is highly "context sensitive", but is recorded here for posterity!