scsh-users
[Top] [All Lists]

Re: Dirty macros with define-syntax? Re: An Advanced Syntax-Rules Primer

To: scsh@zurich.ai.mit.edu
Subject: Re: Dirty macros with define-syntax? Re: An Advanced Syntax-Rules Primer for the Mildly Insane
From: sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor])
Date: Tue, 05 Mar 2002 08:39:36 +0100
>>>>> "Brian" == Brian D Carlstrom <bdc@zurich.ai.mit.edu> writes:

Brian> Antti Karttunen writes:
>> I guess I will use scsh in my project, but unfortunately
>> it has only define-syntax, not define-macro.

Brian> define-syntax does not have to be used with syntax-rules. You can
Brian> provide a functon to do explicit s-exp based conversion.

Brian> A search with  
Brian>   find . -name '*.scm' | xargs grep rename | grep compare
Brian> gives some examples, like from scsh/cig/cig.scm:
Brian>   ;;; This section defines the Scheme-side macro processor.
Brian>   
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Brian>   ;;; (define-syntax define-foreign define-foreign-expander)
  
Brian>   (define (define-foreign-expander form rename compare)
Brian> I tried to find a simple example but...

There's documumentation at

ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/prop/exrename.ps.gz

which applies to Scheme 48/scsh as well, with the exception of the
TRANSFORMER keywords, which is omitted here.

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla

<Prev in Thread] Current Thread [Next in Thread>