The output-store formal translator directed by LR parsing

  • Jan Janoušek
  • Bořivoj Melichar
Contributed Papers
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1338)


This paper presents a one-pass formal translator that can be constructed for each translation grammar with an LR(k) input grammar. The formal translator is the conventional LR parser whose operations are extended by actions performing both an output and a temporary storing of output symbols. The temporary storing of some symbols before their appending to the output string is implemented by using one synthesized attribute.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [AM91]
    Alblas, H., Melichar, B. (Eds.) Attribute Grammars, Applications and Systems. LNCS, vol 545, Springer-Verlag, Berlin, 1991.Google Scholar
  2. [ASU86]
    Aho, A.V., Sethi, R., Ullman, J.D. Compilers-Principles, Techniques and Tools. Addison-Wesley, Reading, Mass., 1986.Google Scholar
  3. [AU71]
    Aho, A.V., Ullman, J.D. The Theory of Parsing, Translation and Compiling. Vol.1: Parsing, Vol.2: Compiling, Prentice-Hall, New York, 1971, 1972.Google Scholar
  4. [DJ90]
    Deransart, P., Jourdan, M. (Eds.) Attribute Grammars and their Applications. LNCS, vol 461, Springer-Verlag, Berlin, 1990.Google Scholar
  5. [Ja97]
    Janoušek, J. Formal Translations Described by Translation Grammars with LR(k) Input Grammars. Postgraduate Study Report, Department of Computer Science and Engineering, CTU, Prague, September 1997.Google Scholar
  6. [Me92]
    Melichar, B. Syntax Directed Translation with LR Parsing. In: LNCS, vol 641 (Compiler Construction), Springer-Verlag, Berlin, pp. 30–36, 1992.Google Scholar
  7. [Me95]
    Melichar, B. LR Parsing and Formal Translation. Doctoral dissertation thesis, Department of Computer Science and Engineering, CTU, Prague, 1995.Google Scholar
  8. [MB96]
    Melichar, B., Bac, N.V. Transformations of Grammars and Translation Directed by LR Parsing. Research report DC-96-02, Department of Computer Science and Engineering, CTU, Prague, March 1996.Google Scholar
  9. [PB80]
    Purdom, P., Brown, C.A. Semantic Routines and LR(k) Parsers. Acta Informatica, Vol. 14, No. 4, pp. 229–315, 1980.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1997

Authors and Affiliations

  • Jan Janoušek
    • 1
  • Bořivoj Melichar
    • 1
  1. 1.Department of Computer Science and EngineeringCzech Technical UniversityPragueCzech Republic

Personalised recommendations