Affiliation:
1. University of Aarhus, Ny Munkegade, building 540 8000 Aarhus C, Denmark
Abstract
"From now on, a main goal in designing a language should be to plan for growth." Guy Steele: Growing a Language, OOPSLA '98 invited talk
.We present our experiences with a syntax macro language which we claim forms a general abstraction mechanism for growing (domain-specific) extensions of programming languages. Our syntax macro language is designed to guarantee
type safety
and
termination
.A concept of
metamorphisms
allows the arguments of a macro to be inductively defined in a
meta
level grammar and
morphed
into the host language. We also show how the metamorphisms can be made to operate simultaneously on multiple parse trees at once. The result is a highly flexible mechanism for growing new language constructs without resorting to compile-time programming. In fact, whole new languages can be defined at surprisingly low cost.This work is fully implemented as part of the
bigwig
system for defining interactive Web services, but could find use in many other languages.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
13 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献