From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: guile-user@gnu.org
Subject: Re: sxml-match bad pattern syntax
Date: Tue, 28 Dec 2021 04:21:39 -0500 [thread overview]
Message-ID: <875yr9dqzg.fsf@gnuvola.org> (raw)
In-Reply-To: <YcrKsJE0PIYVA/5C@tuxteam.de> (tomas@tuxteam.de's message of "Tue, 28 Dec 2021 09:28:32 +0100")
[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]
() <tomas@tuxteam.de>
() Tue, 28 Dec 2021 09:28:32 +0100
> Ah, right! The ellipses are a tail that need to follow a
> head.
No, the ellipses tell the matcher that the symbol to its left
acutally stands for "zero or more of this". Consequently, you
have to somehow [1] use those ellipses on the right hand side
(aka template) whenever you use them on the left hand side
(aka pattern) and vice versa.
I think we're saying the same thing, but in any case, i
understand what you're saying.
> I guess i was confused by the documentation's use of
> ellipses in the conventional sense rather than the literal
> sense:
I think of the ellipses as a kind of funny Kleene star. Not
really at home in any world: in the regular world, because it
isn't a star, in the Scheme world, because it is postfix.
That's a really good analogy, IMHO. It's an operator of sorts.
[examples]
Yes, it's becoming more clear to me now.
For the idiomatic part, I'll have to defer to those with more
chevrons ;-)
:-D
I think the ‘otherwise’ clause is a bit unwieldy; it presumes
normal form 3 (attribute lists always present). However, i
couldn't find a way to match "any element". ISTM the element
portion (first symbol in the form) MUST be non-variable.
--
Thien-Thi Nguyen -----------------------------------------------
(defun responsep (query) ; (2021) Software Libero
(pcase (context query) ; = Dissenso Etico
(`(technical ,ml) (correctp ml))
...)) 748E A0E8 1CB8 A748 9BFA
--------------------------------------- 6CE4 6703 2224 4C80 7502
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 219 bytes --]
next prev parent reply other threads:[~2021-12-28 9:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-28 6:21 sxml-match bad pattern syntax Thien-Thi Nguyen
2021-12-28 7:19 ` tomas
2021-12-28 7:58 ` Thien-Thi Nguyen
2021-12-28 8:28 ` tomas
2021-12-28 9:21 ` Thien-Thi Nguyen [this message]
2021-12-28 10:06 ` tomas
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=875yr9dqzg.fsf@gnuvola.org \
--to=ttn@gnuvola.org \
--cc=guile-user@gnu.org \
/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).