bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#64128: regexp parser zero-width assertion bugs


From: Paul Eggert
Subject: bug#64128: regexp parser zero-width assertion bugs
Date: Mon, 19 Jun 2023 13:40:06 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

On 2023-06-19 12:52, Mattias Engdegård wrote:

Sure, we can turn \b and \B into group B assertions, but the patch was more 
conservative in nature.

OK, but we still need to fix this, as \b and \B should not be a special case for following "*".

I think we have to preserve \`* meaning \`\* for compatibility, historical or 
not, because it's something we keep sighting in the wild.

That makes some sense, in that \` is like ^, and ^ is already a special case (this is true even in POSIX BREs).

In other words, how about if we change the groups from your list:

Group A: ^ $ \` \' \b \B
Group B: \< \> \_< \_> \=

to this:

Group A: ^ \`
Group B: $ \' \b \B \< \> \_< \_> \=

where "*" is ordinary after Group A, and special after Group B and there is no other squirrelly behavior. And similarly for the other repetition operators.

Attached is a proposed doc change for this, which I have not installed. Of course the code and etc/NEWS would need changing too.

Attachment: 0001-Document-proposed-regex-fix-bug-64128.patch
Description: Text Data


reply via email to

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