syntax-case

While many syntax transformers are succinctly expressed using the high-level syntax-rules form, others cannot be succinctly expressed. Still others are impossible to write, including transformers that introduce visible bindings for or references to identifiers that do not appear explicitly in the input form, transformers that maintain state or read from the file system, and transformers that construct new identifiers. The syntax-case system [10] allows the programmer to write transformers that perform these sorts of transformations, and arbitrary additional transformations, without sacrificing the default enforcement of hygiene or the high-level pattern-based syntax matching and template-based output construction provided by syntax-rules (report section on “Macro transformers”).