Sciweavers

CC
2003
Springer

Rapid and Robust Compiler Construction Using Template-Based Metacompilation

14 years 4 months ago
Rapid and Robust Compiler Construction Using Template-Based Metacompilation
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.
Kees van Reeuwijk
Added 06 Jul 2010
Updated 06 Jul 2010
Type Conference
Year 2003
Where CC
Authors Kees van Reeuwijk
Comments (0)