From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: bug in syncase Date: 17 Nov 2002 12:11:11 +0000 Sender: guile-devel-admin@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1037536856 4874 80.91.224.249 (17 Nov 2002 12:40:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 17 Nov 2002 12:40:56 +0000 (UTC) Cc: Guile Development Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18DOjM-0001GC-00 for ; Sun, 17 Nov 2002 13:40:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18DOj7-0006mx-00; Sun, 17 Nov 2002 07:40:37 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18DOVS-0006kY-00 for guile-devel@gnu.org; Sun, 17 Nov 2002 07:26:30 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18DOVM-0006Yq-00 for guile-devel@gnu.org; Sun, 17 Nov 2002 07:26:27 -0500 Original-Received: from mail.uklinux.net ([80.84.72.21] helo=s1.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.10) id 18DOVK-0006Wo-00 for guile-devel@gnu.org; Sun, 17 Nov 2002 07:26:23 -0500 Original-Received: from laruns.ossau.uklinux.net (bts-0990.dialup.zetnet.co.uk [194.247.51.222]) by s1.uklinux.net (8.11.6/8.11.6) with ESMTP id gAHCQI710697; Sun, 17 Nov 2002 12:26:18 GMT Original-Received: from laruns.ossau.uklinux.net.ossau.uklinux.net (localhost [127.0.0.1]) by laruns.ossau.uklinux.net (Postfix on SuSE Linux 7.2 (i386)) with ESMTP id AD5FCDC12D; Sun, 17 Nov 2002 12:11:11 +0000 (GMT) Original-To: Dirk Herrmann In-Reply-To: Original-Lines: 46 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:1721 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1721 >>>>> "Dirk" == Dirk Herrmann writes: Dirk> Yes, I could need some help: What are the macros nil-cond Dirk> and @fop used for, and how are their macro transformers Dirk> supposed to work? nil-cond's macro transformer just replaces nil-cond by #@nil-cond. nil-cond is just a simplified cond, described in lang/elisp/primitives/syntax.scm as: ;;; NIL-COND expressions have the form: ;;; ;;; (nil-cond COND VAL COND VAL ... ELSEVAL) ;;; ;;; The CONDs are evaluated in order until one of them returns true ;;; (in the Elisp sense, so not including empty lists). If a COND ;;; returns true, its corresponding VAL is evaluated and returned, ;;; except if that VAL is the unspecified value, in which case the ;;; result of evaluating the COND is returned. If none of the COND's ;;; returns true, ELSEVAL is evaluated and its value returned. @fop is used to translate an Elisp application, and is complicated in two ways: - When the application is translated, we don't know whether the CAR of the application represents a function or a macro, and therefore whether the application arguments need to be translated. - The symbol in the CAR may need to be looked up recursively, for defalias support. The Scheme translation code translates (fn arg ...) to (@fop fn (transformer-macro arg ...)). Then, when (@fop ...) is memoized and evaluated, - scm_m_atfop changes it to (#@apply fnval (transformer-macro arg ...)) if fnval is a function, or (fnval arg ...) if fnval is a macro, where fnval is the function or macro obtained from looking up fn's symbol function slot (recursively if needed) - remaining evaluation of (#@apply fnval (transformer-macro arg ...)) or (fnval arg ...) is done by the evaluator. Does this help? Let me know if you need any more. Neil _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel