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 language | English (US) |
---|---|
Pages | 45-49 |
Number of pages | 5 |
Volume | 29 |
No | 4 |
Specialist publication | Dr. Dobb's Journal |
State | Published - Apr 2004 |
ASJC Scopus subject areas
- Software
- Computer Networks and Communications