<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2>I still use version 103p and have a macro that
defines syntaxes by means of define-syntax. It works fine. As a simplified
example:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2><BR>(define-macro
syntax-maker<BR> (lambda (name . clauses)<BR> `(define-syntax
,name<BR> (syntax-rules ()<BR> ,@clauses<BR>
((,name x ...) ; catch all other patterns<BR> (list 'error "in
syntactic form:" '(,name 'x ...)))))))<BR>(syntax-maker monkey ((monkey x y ...)
'("monkey" x y ...)))<BR>(monkey 1 2 3) --> ("monkey" 1 2 3)<BR>(monkey)
--> (error "in syntactic form:" (monkey))</DIV>
<DIV> </DIV>
<DIV>This cannot be rewritten as:</DIV>
<DIV> </DIV>
<DIV>(define-syntax syntax-maker<BR> (syntax-rules ()<BR>
((syntax-maker name (pattern template) ...)<BR> (define-syntax
name<BR> (syntax-rules ()<BR> (pattern
template) ...<BR> ((name x ...); catch all other
patterns ; <=== wrong<BR> (list 'error
"in syntactic form:" '(,name 'x ...))) <=== wrong<BR>
)))))<BR>(syntax-maker monkey ((monkey x ...) (list "monkey" 'x
...)))<BR>(monkey 1 2 3) --> raises an error-exception, of course</DIV>
<DIV> </DIV>
<DIV>This is wrong because the outer define-syntax form wants to spline
the syntactic variable 'x' in the marked lines. Is there a work-around
(other than using define-macro for the outer form)? Id est, how can I insert an
ellipsis in the inner define-syntax form without the outer one noticing it? Or
is there a reason why I should not want it?</DIV>
<DIV> </DIV>
<DIV>Thanks in advance.</DIV>
<DIV>Jacob Koot.</FONT></DIV></BODY></HTML>