Chapter

Generative Programming and Component Engineering

Volume 2487 of the series Lecture Notes in Computer Science pp 299-315

Date:

Meta-programming with Concrete Object Syntax

  • Eelco VisserAffiliated withInstitute of Information and Computing Sciences, Universiteit Utrecht

Abstract

Meta programs manipulate structured representations, i.e., abstract syntax trees, of programs. The conceptual distance between the concrete syntax meta-programmers use to reason about programs and the notation for abstract syntax manipulation provided by general purpose (meta-) programming languages is too great for many applications. In this paper it is shown how the syntax definition formalism SDF can be employed to fit any meta-programming language with concrete syntax notation for composing and analyzing object programs. As a case study, the addition of concrete syntax to the program transformation language Stratego is presented. The approach is then generalized to arbitrary meta-languages.