Advertisement

A compiler generator for attribute evaluation during LR parsing

  • Jorma Tarhio
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 371)

Abstract

A compiler generator called Metauncle is introduced. Metauncle produces one-pass compilers in which all attributes are evaluated in conjunction with LR parsing. The description of a language is given to Metauncle as an L-attributed grammar, and the system transforms it before generation of an evaluator to another attribute grammar satisfying the requirements for evaluation. The transformed grammar belongs to the class of so-called uncle-attributed grammars. Besides general information about the system, the definition of uncle-attributed grammars, the idea of the grammar transformation and the default rules of the specification language are presented.

References

  1. [ASU86]
    A. V. Aho, R. Sethi and J. D. Ullman: Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading, Mass., 1986.Google Scholar
  2. [JoM80]
    N. D. Jones and C. M. Madsen: Attribute-influenced LR Parsing. In: Aarhus Workshop on Semantics-Directed Compiler Generation (ed. N. D. Jones), Lecture Notes in Computer Science 94, Springer-Verlag, Berlin-Heidelberg-New York, 1980, 393–407.Google Scholar
  3. [KEL88]
    K. Koskimies, T. Elomaa, T. Lehtonen and J. Paakki: TOOLS/HLP84 report and user manual. Report A-1988-2. Department of Computer Science, University of Helsinki, 1988.Google Scholar
  4. [KNP88]
    K. Koskimies, O. Nurmi, J. Paakki and S. Sippu: The design of a language processor generator. Software Practice & Experience 18, 2 (1988), 107–135.Google Scholar
  5. [Mel84]
    B. Melichar: Evaluation of attributes during LR syntax analysis. In: Vorträge des Problemseminars Attributierte Grammatiken und ihre Anwendungen, Pruchten. WPU Rostock, 1984.Google Scholar
  6. [Poh83]
    W. Pohlmann: LR parsing for affix grammars. Acta Informatica 20, 4 (1983), 283–300.Google Scholar
  7. [Ran88]
    O. Rannisto: Revisions for the Metauncle system (in Finnish). Draft. Department of Computer Science, University of Helsinki, 1988.Google Scholar
  8. [SIN85]
    M. Sassa, H. Ishizuka and I. Nakata: A contribution to LR-attributed grammars. Journal of Information Processing 8, 3 (1985), 196–206.Google Scholar
  9. [Tar82]
    J. Tarhio: Attribute evaluation during LR parsing. Report A-1982-4. Department of Computer Science, University of Helsinki, 1982.Google Scholar
  10. [Tar88a]
    J. Tarhio: Attribute grammars for one-pass compilation. Report A-1988-11. Department of Computer Science, University of Helsinki, 1988.Google Scholar
  11. [Tar88b]
    J. Tarhio: The compiler generator Metauncle. Report C-1988-23, Department of Computer Science, University of Helsinki, 1988.Google Scholar
  12. [Tuu87]
    H. Tuuri: An attribute grammar checking the semantics of Pascal for the Metauncle metacompiler (in Finnish). Report C-1987-59. Department of Computer Science, University of Helsinki, 1987.Google Scholar
  13. [Wat77]
    D. A. Watt: The parsing problem for affix grammars. Acta Informatica 8, 1 (1977), 1–20.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1989

Authors and Affiliations

  • Jorma Tarhio
    • 1
  1. 1.Department of Computer ScienceUniversity of HelsinkiHelsinkiFinland

Personalised recommendations