From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel 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 Message-ID: <9a5f3904-8298-b5e3-cd97-b525f602cc63@dancol.org> References: <20180616204650.8423.73499@vcs0.savannah.gnu.org> <20180616204653.86AFC203CB@vcs0.savannah.gnu.org> <04e89d2beffedcc102b811863910c1ec.squirrel@dancol.org> <20180618115941.4f22a9d3@jabberwock.cb.piermont.com> <1de38eca2662563e9e08006c88a6d2e5.squirrel@dancol.org> <20180619094005.11465a87@jabberwock.cb.piermont.com> <20180619094442.41287e4b@jabberwock.cb.piermont.com> <20180619103002.4f000018@jabberwock.cb.piermont.com> <20180619103325.7d79befb@jabberwock.cb.piermont.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1529419604 30025 195.159.176.226 (19 Jun 2018 14:46:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 19 Jun 2018 14:46:44 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 Cc: Stefan Monnier , emacs-devel@gnu.org To: "Perry E. Metzger" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 19 16:46:39 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fVHu3-0007iO-Ms for ged-emacs-devel@m.gmane.org; Tue, 19 Jun 2018 16:46:39 +0200 Original-Received: from localhost ([::1]:43088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVHwA-0006Hn-La for ged-emacs-devel@m.gmane.org; Tue, 19 Jun 2018 10:48:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVHvv-0006GX-N6 for emacs-devel@gnu.org; Tue, 19 Jun 2018 10:48:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVHvu-0007uN-PD for emacs-devel@gnu.org; Tue, 19 Jun 2018 10:48:35 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:54450) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fVHvu-0007td-HF for emacs-devel@gnu.org; Tue, 19 Jun 2018 10:48:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=VURLKZ2irsWzkqj5yYrIvMdf8tBgWDCsyzXqZtpbS7k=; b=hNrDythzi/qRTXqG0IhpeotQSVRRb3I62KSqCBd1oW03UJgBGZa3crxYypQyacqTpx1u38ZscivTkdD60bDCB+SRisFj9jeSWWFnSYB2xXghhX6OGqRLI0jUdlm1KcjWEt3IA5ZuzqtwANkBYeBnETsojPPq64H2WXUfCYyLcGInpO9CDEBHpEkMyI0P0KmqgRN2R85JXo286DKEPGK+t4m3gOEyRA5aruMuSUGkYR9vFtjotAKlb8PPkUAlZj50eUoHaNaiehT8RBkLxIpLXyhWn0z6z6UrWIX1cwKFW2uxjkqac24n/ICcVHbbk2TdlHW7RrSkHS9cXu3XS8NKOw==; Original-Received: from [2604:4080:1321:8c20:d991:ea76:d225:59a1] by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1fVHvt-0002TW-OY; Tue, 19 Jun 2018 07:48:33 -0700 In-Reply-To: <20180619103325.7d79befb@jabberwock.cb.piermont.com> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226509 Archived-At: On 06/19/2018 07:33 AM, Perry E. Metzger wrote: > On Tue, 19 Jun 2018 10:30:02 -0400 "Perry E. Metzger" > 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.