Abstract
Two compiler generators, both based on attribute grammars, have been used together in an attempt to generate almost all compiler phases.
Rie is a compiler generator based on a one-pass attribute grammar called ECLR-attributed grammar [Sassa 87]. The generated compiler evaluates attributes in parallel with LR parsing. It can be used to generate one-pass compilers or the front-end of multipass compilers.
Jun is a compiler generator which works on tree grammars. It is based on finitely recursive attribute grammars, a class of attribute grammars which allow circularities in attribute dependency [Farrow 86]. It overcomes the difficulty of circularities in the attribute dependency which often appear in data-flow equations of optimizers. The evaluator generated by Jun evaluates attributes on a tree, rather than a source program. This same formalism can be used to generate code generators and interpreters. So, the single Jun system can cover most of the compiler back-end.
By combining both Rie and Jun, the generation of almost all compiler phases may be possible.
This work was partially supported by the University of Tsukuba.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Aho, A.V., Sethi, R. and Ullman, J.D.: Compilers — Principles, Techniques, and Tools, Addison-Wesley, 1986.
Babich, W.A. and Jazayeri, M.: The Method of Attributes for Data Flow Analysis, Part I. Exhaustive Analysis, Acta Inf. 10, 245–264 (1978).
Cattell, R.G.G.: Automatic Derivation of Code Generators from Machine Descriptions, ACM TOPLAS, 2, 2, 173–190 (1980).
Farrow, R.: Generating a Production Compiler from an Attribute Grammar, IEEE Software, 1, 4, 77–93 (1984).
Farrow, R.: Automatic Generation of Fixed-Point-Finding Evaluator for Circular, but Well-Defined, Attribute Grammars, ACM SIGPLAN '86 Symp. on Compiler Construction, 85–98 (1986).
Ganapathi, M. and Fischer, C. N.: Affix Grammar Driven Code Generation, ACM TOPLAS, 7, 4, 560–599 (1985).
Ganzinger, H. and Giegerich, R.: A Truly Generative Semantics-Directed Compiler Generator, in Proc. SIGPLAN Symp. on Compiler Construction, SIGPLAN Notices, 17, 6, 172–184 (1982).
Glanville, R. S. and Graham, S. L.: A New Method for Compiler Code Generation, 5th ACM POPL, 231–240 (1978).
Goos,G. et al.: DIANA An Intermediate Language for Ada, revised version, Lec. Notes in Comp. Sci., Vol. 161, Springer, 1983.
Kastens, U., Hutt, B. and Zimmermann, E.: GAG: A Practical Compiler Generator, Lec. Notes in Comp. Sci., Vol. 141, Springer, 1982.
Knuth, D.E.: Semantics of Context-Free Languages, Math. Syst. Th., 2, 2, 127–145, 1968, correction ibid. 5, 1, 95–96 (1971).
Koskimies, K., et al.: The Design of a Language Processor Generator, Softw. Pract. Exper., 18, 2, 107–135 (1988).
Kuse, K., Sassa, M. and Nakata, I.: Modelling and Analysis of Concurrent Processes Connected by Streams, J. Inf. Process., 9, 3, 148–158 (1986).
Lesk, M.E.: Lex — A Lexical Analyzer Generator, Computer Science Tech. Rep. 39, AT&T Bell Lab., 1975.
Lipps, P. Möncke, U. and Wilhelm, R.: OPTRAN — A Language/System for the Specification of Program Transformations: System Overview and Experiences, Proc. 2nd CCHSC Workshop, Lec. Notes in Comp. Sci., Vol. 371, Springer, 1989.
Sassa, M., Ishizuka, H. and Nakata, I.: A Contribution to LR-attributed Grammars, J. Inf. Process., 8, 3, 196–206 (1985).
Sassa, M., Ishizuka, H. and Nakata, I.: ECLR-attributed Grammars: a Practical Class of LR-attributed Grammars, Inf. Process. Lett., 24, 31–41 (1987).
Sassa, M.: Incremental Attribute Evaluation and Parsing Based on ECLR-attributed Grammars, Report A-1988-9, Dept. of Computer Science, Univ. of Helsinki, 1988.
Sassa, M. Ishizuka, H. Sawatani, M. and Nakata, I.: Introduction to Rie and Rie User's Manual, Tech. Rep. ISE-TR-90-82, Inst. of Inf. Sci. & Elec., Univ. of Tsukuba, 1990.
Shapiro, E.Y.: Algorithmic Program Debugging, MIT Press, 1983.
Watt, D. A.: Executable Semantic Descriptions, Softw. Pract. Exper., 16, 13–43 (1986).
Yamashita, Y. and Nakata, I.: Programming in Gramp: a programming language based on CCFG, Tech. Rep. ISE-TR-88-73, Inst. of Inf. Sci. & Elec., Univ. Tsukuba, 1988.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Sassa, M. (1991). Rie and Jun: Towards the generation of all compiler phases. In: Hammer, D. (eds) Compiler Compilers. CC 1990. Lecture Notes in Computer Science, vol 477. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-53669-8_74
Download citation
DOI: https://doi.org/10.1007/3-540-53669-8_74
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-53669-7
Online ISBN: 978-3-540-46953-7
eBook Packages: Springer Book Archive