From Macros to Reusable Generative Programming

  • Authors:
  • Shriram Krishnamurthi;Matthias Felleisen;Bruce F. Duba

  • Affiliations:
  • -;-;-

  • Venue:
  • GCSE '99 Proceedings of the First International Symposium on Generative and Component-Based Software Engineering
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

Generative programming is widely used both to develop new programming languages and to extend existing ones with domain-specific sub-languages. This paper describes McMicMac, a framework for generative programming. McMicMac uses tree-transforming macros as language specifications, and enhances them with inherited and synthesized attributes. The enhanced transformers can describe general compilation tasks. Families of these specifications are grouped into mixin-like collections called vocabularies. Programmers can define new languages by composing these vocabularies. We have implemented McMicMac for Scheme and used it to build several systems, including the DrScheme programming environment. The principles of McMicMac carry over to other languages and environments.