Coco/R for Delphi is a (freeware) compiler compiler similar to the Lex/Yacc tools. Coco/R for Delphi accepts as input, an attributed, context-free EBNF grammar; as output it generates a recursive descent parser, a matching scanner, a Delphi component wrapper, and an optional test project. Coco/R grammars must conform, with some exceptions, to LL(1) restrictions.
The compiler component for Coco/R for Delphi is, of course, generated with Coco/R for Delphi.
I no longer maintain Coco/R for Delphi. I now code exclusively in C# for all of my personal development.
To learn more about Coco/R: The primary Coco/R web page is http://www.scifac.ru.ac.za/coco/. This site is maintained by Prof. Pat Terry. Prof. Terry's book, Compilers & Compiler Generators, has several chapters on Coco/R. Compilers & Compiler Generators is out of print; however, Prof. Terry maintains a PDF version on his web site.
Another (out of print) book on Coco by Hanspeter Mössenböck and Peter Rechenberg entitled "A Compiler Generator for Microcomputers" is based on an earlier version of Coco. This book may not be readily available; it took me over a year to locate my copy.
Coco/R References
- Mössenböck, Hanspeter, A Generator for Fast Compiler Front-Ends. Report 127, Dept. Informatik, ETH Zürich (1990)
- Mössenböck, Hanspeter, A generator for production quality compilers. Proc 3rd International Workshop on Compiler-Compilers, Schwerin FRG, 1990
- Terry, P.D., Compilers & Compiler Generators an Introduction With C++, London: International Thomson Computer Press, 1997. (Web Version)
- Rechenberg, Peter and Hanspeter Mössenböck, A Compiler Generator for Microcomputers, Hertfordshire, UK: Prentice Hall International (UK) Ltd., 1989.