From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11728 invoked by alias); 29 Jan 2010 03:02:41 -0000 Received: (qmail 11636 invoked by uid 22791); 29 Jan 2010 03:02:39 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_00,DNS_FROM_RFC_BOGUSMX X-Spam-Check-By: sourceware.org Received: from sebabeach.org (HELO sebabeach.org) (64.165.110.50) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 29 Jan 2010 03:02:35 +0000 Received: by sebabeach.org (Postfix, from userid 500) id 4FF5D6E3DC; Thu, 28 Jan 2010 19:02:34 -0800 (PST) From: Doug Evans To: cgen@sourceware.org Subject: [commit] Implement %-prefixed pmacros. Message-Id: <20100129030234.4FF5D6E3DC@sebabeach.org> Date: Fri, 29 Jan 2010 03:02:00 -0000 X-IsSubscribed: yes Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org X-SW-Source: 2010-q1/txt/msg00010.txt.bz2 Hi. This patch implements %-prefixed pmacros. Support for .-prefixed pmacros will eventually go away, but obviously all the .cpu files will need to be changed first. To migrate, add (define-rtl-version 0 9) to the front of your .cpu file. [For reference, a reminder why I'm doing this: "." is not a valid first character in r6rs symbols.] 2010-01-28 Doug Evans * pmacros.scm (pmacros-init!): New arg rtl-version, all callers updated. Use %-prefix if rtl-version >= 0.9. * read.scm (/supported-rtl-versions): Add (0 9). (/rtl-version-valid?): New function. (/cmd-define-rtl-version): If new rtl version, reinvoke pmacros-init!. (/reader-expr): New function. (reader-process): New function. (/reader-process-with-loc!): Renamed from /reader-process!. Don't pre-expand `if' commands. (/cmd-if): Simplify. Pmacro-expand test, then, else clauses here. Handle rtl-version-equal?, rtl-version-at-least?. * testsuite/Makefile.am (clean-test-files): Remove *.test.cpu*. * testsuite/Makefile.in: Regenerate. * testsuite/pmacros-1.test: Test both . and % as prefixes. * testsuite/testsuite.cpu (/begin, /print, /dump): New pmacros. (newline, print-match, print-expr, print-thunk): Use them. (internal-verify): Update definition. * doc/rtl.texi (define-rtl-version): Document rtl version 0.9. (Top level conditionals): New node.