Abstract
This paper presents a compiler description language and its implementation Coco/R (Compiler Compiler for Recursive Descent). Coco/R reads an attributed EBNF grammar of a language and translates it into a recursive descent parser and a scanner for that language. The programmer has to supply a main program that calls the parser and semantic modules that are called from within the parser. Coco/R evolved from two predecessors: the scanner generator Alex [Möss86] and the parser generator Coco [ReMö89]. Their input languages were merged and simplified due to our experiences with these tools over several years (a similar tool with a slightly different motivation also emerged from Alex and Coco [DoPi90]). Using Coco/R, compilers can be generated that are as efficient as hand-coded and carefully optimized production quality compilers. Almost as important as efficiency is the simplicity and adequacy of the system. Programmers are not willing to use a tool if it does not come in handy to their work, if it uses an arcane notation or a bulk of options and special cases. Coco/R puts simplicity and efficiency over power.
Chapter PDF
Similar content being viewed by others
References
A.V.Aho, R.Sethi, J.D.Ullman: Compilers. Addison-Wesley, 1986.
H.Dobler, K.Pirklbauer: Coco-2 — A New Compiler Compiler. Technical report 90/1, Institut für Informatik, Universität Linz, 1990.
D.E.Knuth: Semantics of Context-Free Languages. Math.Systems Theory 2, 1968.
H.Mössenböck: Alex — A Simple and Efficient Scanner Generator. SIGPLAN Notices, Vol.21 (5), May 1986.
H.Mössenböck: Compilererzeugende Systeme für Mikrocomputer. Dissertation, Institut für Informatik, Universität Linz, 1987.
H.Mössenböck: Coco/R — A Generator for Fast Compiler Front-Ends. Report 127, Institut für Computersysteme, ETH Zürich, 1990.
P.Rechenberg, H.Mössenböck: A Compiler-Generator for Microcomputers. Prentice-Hall, 1989.
W.M.Waite: The Cost of Lexical Analysis. SOFTWARE Practice & Experience, Vol.16 (5), May 1986.
N.Wirth: Algorithms + Data Structures = Programs. Prentice-Hall, 1976.
N.Wirth: Compilerbau. Teubner Studienbücher, 1986.
N.Wirth: The Programming Language Oberon. SOFTWARE Practice & Experience, Vol.18 (7), July 1988.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Mössenböck, H. (1991). A generator for production quality compilers. In: Hammer, D. (eds) Compiler Compilers. CC 1990. Lecture Notes in Computer Science, vol 477. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-53669-8_73
Download citation
DOI: https://doi.org/10.1007/3-540-53669-8_73
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-53669-7
Online ISBN: 978-3-540-46953-7
eBook Packages: Springer Book Archive