|
From: | Paul Eggert |
Subject: | bug#64128: regexp parser zero-width assertion bugs |
Date: | Sat, 17 Jun 2023 15:18:00 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 |
On 2023-06-17 13:07, Mattias Engdegård wrote:
17 juni 2023 kl. 20.44 skrev Stefan Monnier <monnier@iro.umontreal.ca>:I think the behavior that makes most sense is to signal an error when compiling the regexp.Clearly, but some behaviour needs to be preserved for compatibility. Regexps like "^*" aren't uncommon. Can it be generalised in a useful way?
doc/lispref/searching.texi says that "*" is treated as an ordinary character if it is in a context where its special meaning makes no sense, giving "*foo" as an example. If we break with this tradition by making "\b*" an error instead of being equivalent to "\b\*", we should update that part of the manual.
One possible way forward is to update doc/lispref/searching.texi to specify what we want. Then we can modify the code to match the updated documentation.
In my experience, modifying the doc is often the hard part, so I took a crack at that in the draft proposed patch, which I have not installed.
Comments?
0001-Document-that-b-etc-are-now-invalid-regexps.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |