From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Patch for lookaround assertion in regexp Date: Mon, 23 Jan 2012 10:31:52 -0500 Message-ID: References: <009001ccd9c0$9bde09f0$d39a1dd0$@cfraizer.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1327332743 32446 80.91.229.12 (23 Jan 2012 15:32:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 23 Jan 2012 15:32:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: Tom Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 23 16:32:19 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RpLsS-0000ua-LA for ged-emacs-devel@m.gmane.org; Mon, 23 Jan 2012 16:32:12 +0100 Original-Received: from localhost ([::1]:38392 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpLsS-00011U-6X for ged-emacs-devel@m.gmane.org; Mon, 23 Jan 2012 10:32:12 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:40347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpLsK-00010N-Hg for emacs-devel@gnu.org; Mon, 23 Jan 2012 10:32:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpLsE-00029R-PE for emacs-devel@gnu.org; Mon, 23 Jan 2012 10:32:04 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:7703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpLsE-00029K-CP for emacs-devel@gnu.org; Mon, 23 Jan 2012 10:31:58 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAEF8HU9MCos2/2dsb2JhbABCriaBBoFyAQEEAVYjBQsLNBIUGA0kiA+4K4wmBIg7mnOEVw X-IronPort-AV: E=Sophos;i="4.71,556,1320642000"; d="scan'208";a="158219498" Original-Received: from 76-10-139-54.dsl.teksavvy.com (HELO pastel.home) ([76.10.139.54]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Jan 2012 10:31:55 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 9135158D29; Mon, 23 Jan 2012 10:31:52 -0500 (EST) In-Reply-To: (Tom's message of "Mon, 23 Jan 2012 14:44:21 +0000 (UTC)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.183 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:147851 Archived-At: >> OTOH, noone has submitted code to replace the current regexp engine, and >> I don't forsee I'll have the time to write it myself, so maybe I should >> just give up on this plan. > Why not use simply PCRE with a bridge layer which translates from emacs > regexp format to PCRE? AFAIK the emacs regexes are more or less a subset > of PCRE, so the translation shouldn't be very difficult. AFAIK PCRE uses a backtracking implementation, so suffers from the same exponential blowup as the current code. > Why reinvent the wheel when PCRE is already there? I didn't mean to say that I want a fresh new engine written from scratch. But adding pcre to the list of libraries linked with Emacs is not nearly enough: someone has to write the bridge layer and it may turn out not to be as simple as it seems. Stefan