We have developed Tm, a template-based metacompiler. Given a set of data-structure definitions and a template, Tm generates files that instantiate the template for the given data structures. With this process, Tm is able to generate program code to manipulate these data structures. Since it uses templates, the generated code is not restricted to a specific programming language: any sufficiently powerful programming language can be targeted. Tm has been used for a wide variety of tasks and languages. However, it was designed to support compiler construction, and most applications have been in that area. In this paper we outline Tm, and describe our experiences with using it to construct a static compiler for Java. As we will show, it has significantly accelerated implementation of the compiler. Almost 75% of its source code is generated by Tm, allowing us to rapidly implement a much more robust and sophisticated compiler than would have been possible otherwise. © Springer-Verlag Berlin Heidelberg 2003.
CITATION STYLE
Van Reeuwijk, C. (2003). Rapid and robust compiler construction using template-based metacompilation. Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 2622, 247–261. https://doi.org/10.1007/3-540-36579-6_18
Mendeley helps you to discover research relevant for your work.