GNU bug report logs -
#66057
(ice-9 match) allows invalid usages of ... or ..1
Previous Next
Full log
Message #8 received at 66057 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Le dimanche 17 septembre 2023 à 14:17 -0400, Maxim Cournoyer a écrit :
> Hi,
>
> After attempting the following:
>
> --8<---------------cut here---------------start------------->8---
> (match (string-split "./Bootloaders/Printer/Documentation/html" #\/)
> (("." path ..1 "Documentation" "html")
For a start, where does that "..1" syntax come from? To my knowledge, no such
syntax is supported by Guile's pattern matcher, which AFAIK is the one described
in SRFI-204.
https://srfi.schemers.org/srfi-204/srfi-204.html
So your example is just binding the string "Printer" to the variable "..1":
since "..1" doesn't have any special meaning, it's just a pattern variable.
> (pk 'path path)))
>
> => ;;; (path "Bootloaders")
>
> Expected (and works with '...'):
> ;;; (path "Bootloaders" "Printer")
> --8<---------------cut here---------------end--------------->8---
>
> and asking about it in #scheme or #guile, it seems the '..1' and '...'
> patterns *must* be used strictly to match at the end of lists,
??
This is not what SRFI 204 says, and it's not consistent with syntax-rules and
syntax-case patterns either.
[Message part 2 (text/html, inline)]
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 1 year and 269 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.