parsing parameters
From: ctu (cturle_at_nospam.com)
Date: 08/24/04
- Next message: Pascal Bourguignon: "Re: parsing parameters"
- Previous message: Jesper Harder: "Re: tools for creating documentation for lisp?"
- Next in thread: Pascal Bourguignon: "Re: parsing parameters"
- Reply: Pascal Bourguignon: "Re: parsing parameters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 24 Aug 2004 00:41:08 +0200
Hi all,
I have some troubles defining the parameters of my 'types-match-bind'.
The problem is that keywords parameters are handle at the end, so i can't
have a "body" after them. I was first searching for a solution using the
macro destructuring facility, but i'm afraid it's not possible. some ideas ?
(defmacro compilation-unit (&rest args)
(types-match-bind :vars (package import-declarations
type-declarations)
:expr args
:pattern ((package 0-1) (import-declaration 0-*)
(type-declaration 0-*))
`(make-compilation-unit
:package ,package
:import-declarations (list ,@import-declarations)
:type-declarations (list ,@type-declarations) )))
;;; my last bad attempt !
(defmacro types-match-bind ((&key vars expr pattern) . body )
;; code will lie here when the parameters parsing will be ok.
(list vars expr pattern body) ; just to check the parameters.
)
__________________________________________
Christophe Turle.
(format nil "~S@~S.~S" 'cturle 'free 'fr)
- Next message: Pascal Bourguignon: "Re: parsing parameters"
- Previous message: Jesper Harder: "Re: tools for creating documentation for lisp?"
- Next in thread: Pascal Bourguignon: "Re: parsing parameters"
- Reply: Pascal Bourguignon: "Re: parsing parameters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]