Building Little Languages With Macros

Matthias Felleisen*, Robert Bruce Findler, Matthew Flatt, Shriram Krishnamurthi

*Corresponding author for this work

Research output: Contribution to specialist publicationArticle

4 Scopus citations

Abstract

The C style pattern-based macros in scheme which can express interesting language extensions, such as a call-by-reference extension of a call-by-value language, are discussed. Pattern-based macro definitions include pattern variables that match syntax fragments in a macro use. To expand a macro use, each pattern variable in the macro's template is replaced by the matching syntax fragment. Using syntax-case, a Java-like class system for scheme, lex- and yac-like forms was implemented for building parsers. The ideas behind Scheme's pattern-matching macros provided a solid foundation for more elaborate macro systems.

Original languageEnglish (US)
Pages45-49
Number of pages5
Volume29
No4
Specialist publicationDr. Dobb's Journal
StatePublished - Apr 2004

ASJC Scopus subject areas

  • Software
  • Computer Networks and Communications

Fingerprint

Dive into the research topics of 'Building Little Languages With Macros'. Together they form a unique fingerprint.

Cite this