Syntax directed translation with LR parsing
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.
- 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
- Lewis, P.M., Rosenkrantz, D.J., Stearns, R.E. (1976) Compiler design theory. London, Addison-Wesley.Google Scholar
- Melichar, B. (1992) Formal translation directed by LR parsing. Kybernetika, Vol. 28, No.1, pp. 50–61, January 1992.Google Scholar
- Melichar, B. (1992) Transformations of translation grammars. Kybernetika (to appear).Google Scholar
- Purdom, P., Brown, C.A. (1980) Semantic routines and LR(k) parsers. Acta Informatica, Vol. 14, No. 4, pp. 229–315.Google Scholar