unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Jean Abou Samra <jean@abou-samra.fr>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 66057@debbugs.gnu.org
Subject: bug#66057: (ice-9 match) allows invalid usages of ... or ..1
Date: Mon, 18 Sep 2023 11:28:31 +0200	[thread overview]
Message-ID: <aecd361b4b4f982709823cfcce1a1f2329394698.camel@abou-samra.fr> (raw)
In-Reply-To: <8734zc70us.fsf@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 783 bytes --]

Le dimanche 17 septembre 2023 à 20:59 -0400, Maxim Cournoyer a écrit :
> It's mentioned in the Guile Reference manual; see info "(guile) Pattern
> Matching":
> > 
> > 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.
> 
> Unless I misread the doc, it should '..1' is a special case '...', which
> means "one or more" instead of "zero or more".


OK, my bad, I didn't know that. You're right that "..1" is mistreated here, it
should be compiled as "one or more repetitions" but instead gets compiled as a
pattern variable. That's a bug, indeed — I believe the expected behavior is that
"..1" behaves like "...", namely being allowed in the middle of a list.

[-- Attachment #1.2: Type: text/html, Size: 1429 bytes --]

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2023-09-18  9:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-17 18:17 bug#66057: (ice-9 match) allows invalid usages of ... or ..1 Maxim Cournoyer
2023-09-17 18:36 ` Jean Abou Samra
2023-09-18  0:59   ` Maxim Cournoyer
2023-09-18  9:28     ` Jean Abou Samra [this message]

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=aecd361b4b4f982709823cfcce1a1f2329394698.camel@abou-samra.fr \
    --to=jean@abou-samra.fr \
    --cc=66057@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /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).