From: HiPhish <hiphish@posteo.de>
To: rain1@airmail.cc
Cc: guile-user@gnu.org
Subject: Re: A macro containing a mini-macro?
Date: Sun, 16 Sep 2018 00:21:48 +0200 [thread overview]
Message-ID: <2851503.udm261mnLh@aleksandar-ixtreme-m5740> (raw)
In-Reply-To: <75b134ef995e81bb55db8e583f602a02@airmail.cc>
I don't quite follow; having a macro for the byte DSL is simple:
(define-syntax byte-dsl
(syntax-rules ()
((_ byte) (list byte))
((_ count byte) (make-list count byte byte))))
But this requires every byte specification to be written as `(byte-dsl 0x00)`,
which I want to avoid in my test-case DSL. I want to be able to write
(test-case 13 (#x01 #x02 (4 #xAB) #xFF))
This requires being able to match either `byte` or `(amount byte)` inside the
test-case pattern.
rain1@airmail.cc wrote:
> You can implement the DSL that transforms bytevector descriptions like
> (#xDC (16 #x00)) into a bytevector as a procedure, suppose we call it
> byte-dsl. Then you only need to change u8-list->bytevector with
> byte-dsl. This lets you do what you wanted without the difficult task of
> macros inside macros.
next prev parent reply other threads:[~2018-09-15 22:21 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 [this message]
2018-09-29 0:28 ` Mark H Weaver
2018-09-29 0:58 ` Mark H Weaver
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=2851503.udm261mnLh@aleksandar-ixtreme-m5740 \
--to=hiphish@posteo.de \
--cc=guile-user@gnu.org \
--cc=rain1@airmail.cc \
/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).