|
From: | Daniel Colascione |
Subject: | Re: [Emacs-diffs] master 938d252 4/4: Make regex matching reentrant; update syntax during match |
Date: | Tue, 19 Jun 2018 07:48:28 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 06/19/2018 07:33 AM, Perry E. Metzger wrote:
On Tue, 19 Jun 2018 10:30:02 -0400 "Perry E. Metzger" <address@hidden> wrote:Oh, and re2 isn't built for POSIX compliance. It has no constructs that require backtracking etc.No DFA engine can do backtracking.Correct, but there are regexp libraries that will switch between DFA and non-DFA implementations depending on whether the regexp has constructs in it that require backtracking.Just to be explicit: TRE does this, IIRC. It certainly implements backreferences, which re2 does not. (And, it has provisions in its API for handling things like gap buffers. The main problem is it is unmaintained.)
If we did want to adopt TRE, we'd have to add supports for PCRE-like callouts for implementing Emacs-specific assertions. (PCRE itself has the opposite problem: explicit support for pluggable callouts, but no support for an iterator API.)
I'd also like to better understand the specific remaining differences between POSIX regular expression semantics and what TRE implements, whether this difference is intentional or not. And I'd also like to understand how we can give the engine Emacs-regex semantics instead of POSIX ones. (Very few people use the POSIX mode of Emacs regex matching.)
I'm also not sure how copyright assignment would work for abandonware.
[Prev in Thread] | Current Thread | [Next in Thread] |