-- 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[1] 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. It is often very convenient to be able to match the _last_ elements of a list or vector in a pattern instead of just the _first_, but R5RS[1] does not provide these 'tail patterns' in its specification of syntax-rules. -- Specification -- The syntax-rules syntax is extended so that there is an extra possible token before the literal identifier list: (SYNTAX-RULES [] ( ...) (