Abstract
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.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Alblas, H., Melichar, B. (Eds.) Attribute Grammars, Applications and Systems. LNCS, vol 545, Springer-Verlag, Berlin, 1991.
Aho, A.V., Sethi, R., Ullman, J.D. Compilers-Principles, Techniques and Tools. Addison-Wesley, Reading, Mass., 1986.
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.
Deransart, P., Jourdan, M. (Eds.) Attribute Grammars and their Applications. LNCS, vol 461, Springer-Verlag, Berlin, 1990.
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.
Melichar, B. Syntax Directed Translation with LR Parsing. In: LNCS, vol 641 (Compiler Construction), Springer-Verlag, Berlin, pp. 30–36, 1992.
Melichar, B. LR Parsing and Formal Translation. Doctoral dissertation thesis, Department of Computer Science and Engineering, CTU, Prague, 1995.
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.
Purdom, P., Brown, C.A. Semantic Routines and LR(k) Parsers. Acta Informatica, Vol. 14, No. 4, pp. 229–315, 1980.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1997 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Janoušek, J., Melichar, B. (1997). The output-store formal translator directed by LR parsing. In: Plášil, F., Jeffery, K.G. (eds) SOFSEM'97: Theory and Practice of Informatics. SOFSEM 1997. Lecture Notes in Computer Science, vol 1338. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-63774-5_123
Download citation
DOI: https://doi.org/10.1007/3-540-63774-5_123
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-63774-5
Online ISBN: 978-3-540-69645-2
eBook Packages: Springer Book Archive