emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 938d252 4/4: Make regex matching reentrant; upd


From: Stefan Monnier
Subject: Re: [Emacs-diffs] master 938d252 4/4: Make regex matching reentrant; update syntax during match
Date: Sun, 17 Jun 2018 15:30:42 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> Good idea. My reading of the "smart jump" stuff in regex.c suggested that
> we use the optimization for _all_ greedy Kleene star constructs though,
> not just the bounded ones. Am I wrong?

Oh, right, I forgot about that lazy optimization.  We'd need to fix this
so the optimization is performed eagerly.

> But anyway, I think the regex code needs a major overhaul.

Yes, but it's a fairly major project.

> I was actually thinking about forking and vendoring RE2.  Granted,
> having done that, you'd need a C++ compiler to build Emacs, but it's
> probably one of the better actively-maintained DFA-based regex
> engines around.

Yes, it's a nice library, but we'd need to add support for
back-references, which doesn't seem straightforward (I think the
easiest would be to fallback on the old regex engine when backrefs are
present, but keeping two completely different regexp engines is a real
PITA).


        Stefan



reply via email to

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