[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sxml-match bad pattern syntax
From: |
Thien-Thi Nguyen |
Subject: |
Re: sxml-match bad pattern syntax |
Date: |
Tue, 28 Dec 2021 04:21:39 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
() <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
signature.asc
Description: PGP signature