Syntax directed translation with LR parsing

  • Bořivoj Melichar
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 641)


A simple extension of the usual LR parser construction is made in order to build a translator. The LR parsing algorithm is extended by a facility to do output operations within the action shift and reduce. A class of translation grammars, called R-translation grammars, is introduced as an extension of the class of postfix translation grammars. Transformations called shaking-down and postponing of output symbols are used for transformation of some non-R-translation to R-translation ones.


  1. [1]
    Aho, A.V., Ullman, J.D. (1971,1972) The theory of parsing, translation and compiling. Vol.1: Parsing, Vol.2: Compiling, New York: Prentice-Hall.Google Scholar
  2. [2]
    Lewis, P.M., Stearns, R.E (1968) Syntax directed transductions. Journal of the ACM, Vol. 15, No. 3, pp. 465–488, July 1968.CrossRefGoogle Scholar
  3. [3]
    Lewis, P.M., Rosenkrantz, D.J., Stearns, R.E. (1976) Compiler design theory. London, Addison-Wesley.Google Scholar
  4. [4]
    Melichar, B. (1992) Formal translation directed by LR parsing. Kybernetika, Vol. 28, No.1, pp. 50–61, January 1992.Google Scholar
  5. [5]
    Melichar, B. (1992) Transformations of translation grammars. Kybernetika (to appear).Google Scholar
  6. [6]
    Purdom, P., Brown, C.A. (1980) Semantic routines and LR(k) parsers. Acta Informatica, Vol. 14, No. 4, pp. 229–315.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1992

Authors and Affiliations

  • Bořivoj Melichar
    • 1
  1. 1.Department of ComputersCzech Technical UniversityPragueCzechoslovakia

Personalised recommendations