Exploiting Macros in Source-to-Source Compiler Implementation
Tero Hasu
Bergen Language Design Laboratory
Department of Informatics
University of Bergen, Norway
Abstract
A sufficiently feature-rich general-purpose programming language with an expressive macro system can play multiple roles in the implementation of a source-to-source compiler: it can host the language being compiled, and expose its own macro system to make the hosted language user extensible; it can embed macro-implemented language for the domain of program transformations; and its general-purpose features and libraries allow for the entire compiler to be implemented based on the same language technology. I discuss some potential uses of the “programmable programming language” Racket in the implementation of source-to-source compilers.
BibTeX
@inproceedings{hasu-14-exploiting, author = {Tero Hasu}, title = {Exploiting Macros in Source-to-Source Compiler Implementation}, booktitle = {1st International Joint Symposium on Program and Model Transformations (PAMT)}, year = 2014, editor = {Anya Helene Bagge and Yngve Lamo}, month = may, location = {Bergen, Norway} }
Scribble
(define hasu-14-exploiting (make-bib #:title "Exploiting Macros in Source-to-Source Compiler Implementation" #:author (authors "Tero Hasu") #:date "2014" #:location (proceedings-location "Intl. Joint Sym. Program and Model Transformations")))
Publication Details
- Paper
- preprint (as PDF)
- Proceedings URL
- http://rosacreative.nl/PAMT/data/uploads/proceedings-pamt14.pdf
- Workshop
- PAMT 2014 (1st International Joint Symposium on Program and Model Transformations)