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: Mattias Engdegård
Subject: bug#64128: regexp parser zero-width assertion bugs
Date: Mon, 19 Jun 2023 20:34:42 +0200

19 juni 2023 kl. 14.54 skrev Stefan Monnier <monnier@iro.umontreal.ca>:
> 
> I wish there was a way to emit warnings about oddball constructs
> (starting with the "* is literal when encountered at the beginning of
> a regexp").

I agree, but I'm more of a static analysis man. (And relint does complain about 
all these cases as long as the regexp is detected as such, so there probably 
aren't many of them left in the Emacs tree.)

Here is a reduced patch that only fixes the really silly behaviour reported 
earlier, by making sure that `laststart` is reset correctly for all group A 
assertions. This should be uncontroversial.
Maybe we should change group B assertions so that they work in the same way.

Attachment: regexp-zero-width-assertion-noquack.diff
Description: Binary data




reply via email to

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