From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.user Subject: Re: A macro containing a mini-macro? Date: Fri, 28 Sep 2018 20:58:05 -0400 Message-ID: <87pnwx5dcy.fsf@netris.org> References: <2093628.1NtSHukUaa@aleksandar-ixtreme-m5740> <87tvm95eq2.fsf@netris.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1538182652 10126 195.159.176.226 (29 Sep 2018 00:57:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 29 Sep 2018 00:57:32 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: guile-user@gnu.org To: HiPhish Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Sep 29 02:57:28 2018 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g63ZW-0002Vl-V8 for guile-user@m.gmane.org; Sat, 29 Sep 2018 02:57:27 +0200 Original-Received: from localhost ([::1]:48469 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g63bd-0002wg-6I for guile-user@m.gmane.org; Fri, 28 Sep 2018 20:59:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g63ax-0002vv-FL for guile-user@gnu.org; Fri, 28 Sep 2018 20:59:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g63am-0005Mt-RL for guile-user@gnu.org; Fri, 28 Sep 2018 20:58:50 -0400 Original-Received: from world.peace.net ([64.112.178.59]:33204) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g63aN-0004yQ-D7 for guile-user@gnu.org; Fri, 28 Sep 2018 20:58:40 -0400 Original-Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1g63aK-0003WR-U4; Fri, 28 Sep 2018 20:58:17 -0400 In-Reply-To: <87tvm95eq2.fsf@netris.org> (Mark H. Weaver's message of "Fri, 28 Sep 2018 20:28:37 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.112.178.59 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:14904 Archived-At: I wrote: > It turns out that pure 'syntax-rules' macros are turing complete, but > they are limited in the ways that they can inspect the syntax objects > given to them as operands. In particular, they cannot inspect atomic > expressions, except to compare them with the finite set of literals in > the first operand to 'syntax-rules'. This is not sufficient to > interpret an arbitrary integer literal. It could only be done with > 'syntax-rules' macros if the 'count' field were represented using a > finite set of literals and/or list structure. E.g. it could be done if > the count were represented as a list of decimal digits like (1 4 2) for > 142. Correction: the finite set of literals that can be recognized by 'syntax-rules' macros must be identifiers, so a representation with bare decimal digits like (1 4 2) would not work. Something like (_1 _4 _2) would be possible, though. Mark