-- Title -- Basic Syntax-rules Extensions -- Author -- Taylor Campbell -- Abstract -- This SRFI proposes two extensions to the R5RS[1] syntax-rules pattern language: the first allows syntax-rules macros to generate macros, where the macro-generated macros use ellipsis that is not used by the macro-generating macros; the second allows for 'tail patterns.' -- Rationale -- Macros that generate macros are fairly common and very useful in a variety of circumstances, e.g. in CPS macros[2] for local continuation macros. R5RS currently provides no mechanism for generating literal ellipsis in a syntax-rules clause's template -- all ellipsis in the template is processed by the macro. Macros that generate macros are thereby restricted, since the generated macros are unable to make use of ellipsis. This is a severe restriction that can be removed by a simple extension to the syntax-rules syntax. Additionally, it is often very convenient to be able to match a finite sequence of elements not only _before_ any ellipsis but also _after_ any ellipsis. Such 'tail patterns' are unsupported by R5RS in its specification of syntax-rules; thus, this SRFI proposes the simple addition of tail patterns to syntax-rules. -- Specification -- The syntax-rules syntax is extended so that there is an extra possible token before the literal identifier list: (SYNTAX-RULES [] ( ...) (