Abstract
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.
Chapter PDF
Similar content being viewed by others
References
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.
Lewis, P.M., Stearns, R.E (1968) Syntax directed transductions. Journal of the ACM, Vol. 15, No. 3, pp. 465–488, July 1968.
Lewis, P.M., Rosenkrantz, D.J., Stearns, R.E. (1976) Compiler design theory. London, Addison-Wesley.
Melichar, B. (1992) Formal translation directed by LR parsing. Kybernetika, Vol. 28, No.1, pp. 50–61, January 1992.
Melichar, B. (1992) Transformations of translation grammars. Kybernetika (to appear).
Purdom, P., Brown, C.A. (1980) Semantic routines and LR(k) parsers. Acta Informatica, Vol. 14, No. 4, pp. 229–315.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Melichar, B. (1992). Syntax directed translation with LR parsing. In: Kastens, U., Pfahler, P. (eds) Compiler Construction. CC 1992. Lecture Notes in Computer Science, vol 641. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55984-1_3
Download citation
DOI: https://doi.org/10.1007/3-540-55984-1_3
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55984-9
Online ISBN: 978-3-540-47335-0
eBook Packages: Springer Book Archive