Authors
William Clinger, Jonathan Rees
Publication date
1991/1/3
Book
Proceedings of the 18th ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages
Pages
155-162
Description
This paper describes a modified form of Kohlbecker’s algorithm for reliably hygienic(capture-free) macro expansion in block-structured languages, where macros are source-tosource transformations specified using a high-level pattern language. Unlike previous algorithms, the modified algorithm runs in linear instead of quadratic time, copies few constants, does not assume that syntactic keywords(eg if) are reserved words, and allows 10CSJ (scoped) macros to refer to lexical variables in a referentially transparent manner. Syntactic closures have been advanced as an alternative to hygienic macro expansion. The problem with syntactic closures is that they are inherently low-level and therefore difficult to use correctly, especially when syntactic keywords are not reserved. It is impossible to construct a patternbased, automatically hygienic macro system on top of syntactic closures because the pattern interpreter must …
Total citations
19911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320245749346374410486410881057977753271142
Scholar articles
W Clinger, J Rees - Proceedings of the 18th ACM SIGPLAN-SIGACT …, 1991