Advertisement

Coupling evaluators for attribute coupled grammars

  • Gilles Roussel
  • Didier Parigot
  • Martin Jourdan
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 786)

Abstract

Some years ago, the notion of attribute coupled grammars was introduced by Ganzinger and Giegerich [4], together with descriptional composition. The latter works essentially at the specification level, i.e., it produces an attribute grammar which specifies the composition of two attribute coupled grammars.

We introduce a new approach to this composition of attribute coupled grammars. This composition no longer works at the specification level but at the evaluator level. It produces a special kind of attribute evaluator. For this purpose we have introduced the notion of coupling evaluator. The main advantage of this new approach, compared with descriptional composition, is that it is possible to build separately the coupling evaluator of each attribute coupled grammar; in other words it allows real separate compilation of AG modules.

Another important advantage is that we do not need to check the attribute grammar class in order to construct the final sequence of evaluators; thus, this construction produces a new sort of evaluator.

References

  1. 1.
    Deransart, P., Jourdan, M. and Lorho, B. Attribute Grammars: Definitions, Systems and Bibliography. Lect. Notes in Comp. Sci., vol. 323, Springer-Verlag, New York-Heidelberg-Berlin, Aug. 1988.Google Scholar
  2. 2.
    Engelfriet, J. and Filè, G. Simple Multi-Visit Attribute Grammars. J. Comput. System Sci. 24, 3 (June 1982), 283–314.CrossRefGoogle Scholar
  3. 3.
    Farrow, R., Marlowe, T. J. and Yellin, D. M. Composable Attribute Grammars: Support for Modularity in Translator Design and Implementation. In 19th ACM Symp. on Principles of Progr. Languages (Albuquerque, NM, Jan. 1992). pp. 223–234.Google Scholar
  4. 4.
    Ganzinger, H. and Giegerich, R. Attribute Coupled Grammars. In ACM SIGPLAN '84 Symp. on Compiler Construction (Montréal, June 1984). ACM SIGPLAN Notices 19, 6 (June 1984), 157–170.Google Scholar
  5. 5.
    Ganzinger, H., Giegerich, R. and Vach, M. Marvin: a Tool for Applicative and Modular Compiler Specifications. Forschungsbericht 220, Fachbereich Informatik, Univ. Dortmund, July 1986.Google Scholar
  6. 6.
    Giegerich, R. Composition and Evaluation of Attribute Coupled Grammars. Acta Inform. 25 (1988), 355–423.Google Scholar
  7. 7.
    Jourdan, M., Le Bellec, C, Parigot, D. and Roussel, G. Specification and Implementation of Grammar Couplings using Attribute Grammars. In Programming Languages Implementation and Logic Programming (Tallinn, Aug. 1993), M. Bruynooghe and J. Penjam, Eds. Lect. Notes in Comp. Sci., vol. 714, Springer-Verlag, New York-Heidelberg-Berlin, pp. 123–136.Google Scholar
  8. 8.
    Jourdan, M. and Parigot, D. Application Development with the FNC-2 Attribute Grammar System. In Compiler Compilers '90 (Schwerin, Oct. 1990), D. Hammer, Ed. Lect. Notes in Comp. Sci., vol. 477, Springer-Verlag, New York-Heidelberg-Berlin, pp. 11–25.Google Scholar
  9. 9.
    Jourdan, M., Parigot, D., Julié, C, Le Bellec, C. and Durin, O. Design, Implementation and Evaluation of the FNC-2 Attribute Grammar System. In ACM SIGPLAN '90 Conf. on Progr. Languages Design and Implementation (White Plains, NY, July 1990). ACM SIGPLAN Notices, vol. 25, no. 6, pp. 209–222.Google Scholar
  10. 10.
    Knuth, D. E. Semantics of Context-free Languages. Math. Systems Theory 2, 2 (June 1968), 127–145. Correction: Math. Systems Theory 5, 1, pp. 95–96 (Mar. 1971).CrossRefGoogle Scholar
  11. 11.
    Le Bellec, C. La généricité et les grammaires attribuées. Thèse de doctorat, Dépt. d'Informatique, Univ. d'Orléans, June 1993.Google Scholar
  12. 12.
    Roussel, G. A Transformation of Attribute Grammars for Eliminating Useless Copy ules. Research report to appear, INRIA, 1994.Google Scholar
  13. 13.
    Roussel, G. Différentes transformations de grammaires attribuées. Thèse de doctorat, Dépt. d'Informatique, Univ. de Paris VI, Mar. 1994.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1994

Authors and Affiliations

  • Gilles Roussel
    • 1
  • Didier Parigot
    • 1
  • Martin Jourdan
    • 1
  1. 1.Projet “ChLoE”, Bât. 13INRIALE Chesnay CedexFrance

Personalised recommendations