Compiling with C# and Java

P.D. Terry, Rhodes University

(Last updated 9 June 2005)

Compiling with C# and Java, an introductory text on compiler construction using C# and Java, was published 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.

The book may be ordered from various stores, including www.amazon.co.uk

For reasons best known to Pearson Education, the book was not distributed initially in the USA, and in particular was not available from http://www.amazon.com for a long time. This seems to have been fixed recently.

See the Pearson Education catalogue entry for this book.

A feature of the book is that it demonstrates the use of the compiler generator Coco/R to implement compilers for the JVM and CLR platforms.

This website contains the "Resource Kit" for the book - a collection that includes the source code for all the case studies in the book, links to useful sites, ancillary documents, and instructions for downloading and installing the components of the Resource Kit on a reader's own computer.

Since the book was published, Hanspeter Mössenböck has developed new versions of Coco/R that allow for the generation of parser and scanner classes that need to be instantiated, rather than the user relying on static methods of the sort described in the book.

This version of the Resource Kit is designed for case studies that would match the "static" release of Coco/R. In that release, the generated classes export static methods only, as is the case for nearly all the case studies discussed in the text book.

A version of the Resource Kit for the "instantiable" version of Coco/R may be obtained from http://www.scifac.ru.ac.za/resourcekitnew

In many cases the differences are fairly minor, and the code has been written to minimize the differences.

In some respects the book is effectively a complete revision of an earlier (1997) book Compilers and Compiler Generators, which used C++, and which is now freely available on the WWW at http://www.scifac.ru.ac.za/compilers/


You can currently view the following sections - it is anticipated that more material will be added at a later stage:


Acknowledgements

This project was completed largely during a period of sabbatical leave from Rhodes University, and I am grateful to the University for granting me this leave, and for financial support.

I am also deeply grateful to the Queensland University of Technology in Brisbane for funding a visit to the Programming Languages and Systems group in the Faculty of Information Technology during my leave period from Rhodes University

Much of this material was developed using software released under Microsoft's SSCLI "Rotor" project, and it is a pleasure to thank Microsoft for financial and software support.

Finally, 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.

Disclaimer

While every attempt has been made to ensure that the material in this distribution performs properly, the author can accept no liability for any damage or loss, including special, incidental, or consequential, caused by the use of the software, directly or indirectly.

However, please bring any problems that you may experience to the attention of the author.

Pat Terry
Computer Science Department
Rhodes University
GRAHAMSTOWN 6140
South Africa
Tel: +27-46-603-8292
FAX: +27-46-636-1915
e-mail: p.terry@ru.ac.za