GNU bug report logs - #66057
(ice-9 match) allows invalid usages of ... or ..1

Previous Next

Package: guile;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Sun, 17 Sep 2023 18:18:01 UTC

Severity: normal

Full log


Message #14 received at 66057 <at> debbugs.gnu.org (full text, mbox):

From: Jean Abou Samra <jean <at> abou-samra.fr>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 66057 <at> debbugs.gnu.org
Subject: Re: bug#66057: (ice-9 match) allows invalid usages of ... or ..1
Date: Mon, 18 Sep 2023 11:28:31 +0200
[Message part 1 (text/plain, inline)]
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.
[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.