Subject: bug#64128: regexp parser zero-width assertion bugs

From: Mattias Engdegård <[email-masked]>
Date: Mon, 19 Jun 2023 20:34:42 +0200

19 juni 2023 kl. 14.54 skrev Stefan Monnier <[email-masked]>:
> 
> 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.