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)|
|Number of pages||5|
|Specialist publication||Dr. Dobb's Journal|
|State||Published - Apr 1 2004|
ASJC Scopus subject areas
- Computer Networks and Communications