bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Jean Abou Samra
Subject: bug#66057: (ice-9 match) allows invalid usages of ... or ..1
Date: Mon, 18 Sep 2023 11:28:31 +0200
User-agent: Evolution 3.48.4 (3.48.4-1.fc38)

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: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]