🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.xerox
Article #309

INTERLISP-D TO COMMON LISP MACRO CONVERSION

#309
From: Tony Anderdson
Date: Mon, 19 Oct 1987 10:35
41 lines
2327 bytes
 
For the attention of : Anybody
 
      At  present I am converting a program from Interlisp-D to Common
lisp. The program uses a macro to define NLAMBDA functions, which  are
not  supported in Common lisp. A solution to the NLAMBDA problem is to
create a macro of the function name which places the data  in  a  list
and then calls the function, which is now under a different name. This
works,  however,  when  the  macro tries to define the calling macro I
have a problem. The calling macro requires a quote  comma  before  the
variable so that it is evaluated but this causes an error as the comma
is outside the scope of a back quote.
 
      My original code is :-
 
      (PUTPROPS DFEXPR MACRO (LIST (BQUOTE (LET (NAME)
            (SETQ NAME (DEFINEQ (, (CAR LIST)
                              (NLAMBDA , (CAADR LIST)
                                       ,@
                                       (CDDR LIST)))))
            (CAR NAME)
      )
 
      The Common lisp macro should define a calling macro like :-
 
      (defmacro function-name (&rest list)
        `(function-name-with-bit-added ',list))
 
      NOTE : The "`" symbol above is the back quote symbol.
 
      NOTE  :  The  comma after the "'" and before "list" in the above
defmacro is the comma I am having problems with.
 
      Can anybody give advice or help with a Common lisp version.
                                        
                                        Richard Relf
                                        Admiralty Research Establishment
                                        Portland
                                        Dorset
                                        UK
Technical Details
Message-ID: <19.OCT.1987.11:35:22.ADRE@UK.AC.RUTHERFORD.GEC-M>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!rutgers!gatech!hubcap!ncrcae!ncr-sd!hp-sdd!hplabs!ucbvax!gec-m.rutherford.ac.UK!ADRE

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!rutgers!gatech!hubcap!ncrcae!ncr-sd!hp-sdd!hplabs!ucbvax!gec-m.rutherford.ac.UK!ADRE
From: ADRE@gec-m.rutherford.ac.UK (Tony Anderdson)
Newsgroups: comp.sys.xerox
Subject: INTERLISP-D TO COMMON LISP MACRO CONVERSION
Message-ID: <19.OCT.1987.11:35:22.ADRE@UK.AC.RUTHERFORD.GEC-M>
Date: Mon, 19-Oct-87 06:35:00 EDT
Article-I.D.: UK.19.OCT.1987.11:35:22.ADRE
Posted: Mon Oct 19 06:35:00 1987
Date-Received: Tue, 20-Oct-87 06:03:55 EDT
Sender: usenet@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 41