Advertisement

On the borderline between grammars and programs

  • C. H. A. Koster
  • J. G. Beney
Session: Grammars
Part of the Lecture Notes in Computer Science book series (LNCS, volume 528)

Abstract

We describe some of the engineering considerations and trade-offs in the design of a new Compiler Description Language, CDL3. The language is based on Extended Affix Grammars, where the affix rules are used to define tree types. The execution model is deterministic and depth-first, except that part of the work can be delayed until a second pass over the implicit parse tree. It is checked statically whether the program can indeed be executed in two passes without backtracking. A simple module structure allows separate compilation in a safe way.

As a running example, we treat the translation of a block-structured language.

Keywords

Parse Tree Attribute Grammar Read Buffer Recursive Descent Transient Parameter 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    J. G. Beney, L. Frecon, Langage et Systeme d'Ecriture de Traducteurs, RAIRO Informatique Vol. 14, No. 4, 379–394, 1980.Google Scholar
  2. [2]
    J. G. Beney, J. F. Boulicaut, An Affix-Based Compiler Compiler designed as a Logic Programming System, Proceedings of the CC'90, Schwerin, October 1990.Google Scholar
  3. [3]
    P. Y. Cunin, M. Griffiths, J. Voiron Comprendre la Compilation, Lecture Notes in Computer Science, Springer-Verlag, 1980.Google Scholar
  4. [4]
    P. Deransart, M. Jourdan, B. Lohro, A survey on Attribute Grammars, Lecture Notes in Computer Science 323, Springer-Verlag, 1988.Google Scholar
  5. [5]
    P. Deransart, M. Jourdan (Eds), Attribute Grammars and their Applications, Lecture Notes in Computer Science 461, Springer-Verlag, 1990.Google Scholar
  6. [6]
    H. Feuerhahn, C. H. A. Koster, Static Semantic Checks in an Openended Language, In: P. G. Hibbard and S. A. Schuman (Eds.), Constructing Quality Software, North Holland Publ. Cy., 1978.Google Scholar
  7. [7]
    M. Fokkinga, J. Jeuring, L. Meertens, E. Meijer, Translation of Attribute Grammars into Catamorphisms, to appear in The Squiggolist, 1991.Google Scholar
  8. [8]
    E. C. R. Hehner, S. A. Silverberg, Programming with Grammars: an Exercise in Methodology-directed Language Design, the Computer Journal, Vol 26 no 3, 1983.Google Scholar
  9. [9]
    M. Jourdan, D. Parigot, The FNC-2 System: Advances in Attribute Grammar Technology, RR-834 INRIA April 1988.Google Scholar
  10. [10]
    D. E, Knuth, Semantics of Context-Free Languages, Mathematical System Theory, Vol. 2, No. 2, pp 127–145, june 1968 and Vol. 5, pp 95–96, may 1971.Google Scholar
  11. [11]
    C. H. A. Koster, A Compiler Compiler, Report MR127/71, Mathematical Centre, Amsterdam, 1971.Google Scholar
  12. [12]
    C. H. A. Koster, Affix Grammars, In: J. E. L. Peck(Ed.), ALGOL 68 Implementation, North-Holland Publishing Co., Amsterdam 1971.Google Scholar
  13. [13]
    C. H. A. Koster, Affix Grammars for Natural Languages, Proceedings Summer School on Attribute Grammars and their Applications, Prague, June 1991.Google Scholar
  14. [14]
    J. Lewi, K. De Vlaminck, J. Huens, M. Huybrecht, Project LILA User's Manual, Report CW7, Applied Mathematics and Programming Division, Katholieke Universiteit Leuven, 1977.Google Scholar
  15. [15]
    H. Meijer, PROGRAMMAR: a Translator Generator, Ph.D. Thesis, University of Nijmegen, 1986.Google Scholar
  16. [16]
    H. Meijer, The Project on Extended Affix Grammars at Nijmegen, In: [5].Google Scholar
  17. [17]
    H. H. Metcalfe, A Parameterized Compiler based on Mechanical Linguistics, Planning Research Corporation, Los Angeles, Calif. 1963.Google Scholar
  18. [18]
    M. P. G. Moritz, Description and Analysis of Static Semantics by Fixed-Point Equations, Ph.d. Thesis, University of Nijmegen, 1989.Google Scholar
  19. [19]
    D. A. Watt, Analysis-oriented two-level Grammars, Ph.D. thesis, University of Glasgow, 1974.Google Scholar
  20. [20]
    A. van Wijngaarden et al. (Eds.), Revised Report on the Algorithmic Language ALGOL68, Acta Informatica 5, pp. 1–236, 1975; also SIGPLAN Notices 12(5), pp. 5–70, 1977.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1991

Authors and Affiliations

  • C. H. A. Koster
    • 1
  • J. G. Beney
    • 2
  1. 1.Informatics departmentUniversity of NijmegenThe Netherlands
  2. 2.Informatics departmentINSA de LyonFrance

Personalised recommendations