From: Mark H Weaver <mhw@netris.org>
To: HiPhish <hiphish@posteo.de>
Cc: guile-user@gnu.org
Subject: Re: A macro containing a mini-macro?
Date: Fri, 28 Sep 2018 20:58:05 -0400 [thread overview]
Message-ID: <87pnwx5dcy.fsf@netris.org> (raw)
In-Reply-To: <87tvm95eq2.fsf@netris.org> (Mark H. Weaver's message of "Fri, 28 Sep 2018 20:28:37 -0400")
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
next prev parent reply other threads:[~2018-09-29 0:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-13 22:04 A macro containing a mini-macro? HiPhish
2018-09-13 22:24 ` rain1
2018-09-15 22:21 ` HiPhish
2018-09-29 0:28 ` Mark H Weaver
2018-09-29 0:58 ` Mark H Weaver [this message]
2018-09-29 7:37 ` Arne Babenhauserheide
2018-11-02 22:32 ` HiPhish
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pnwx5dcy.fsf@netris.org \
--to=mhw@netris.org \
--cc=guile-user@gnu.org \
--cc=hiphish@posteo.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).