From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolai Weibull Newsgroups: gmane.emacs.devel Subject: Re: Patch for lookaround assertion in regexp Date: Tue, 24 Jan 2012 09:41:11 +0100 Message-ID: References: <009001ccd9c0$9bde09f0$d39a1dd0$@cfraizer.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1327394490 15263 80.91.229.12 (24 Jan 2012 08:41:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 24 Jan 2012 08:41:30 +0000 (UTC) Cc: emacs-devel@gnu.org, Colin Fraizer , t.matsuyama.pub@gmail.com To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 24 09:41:26 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 1RpbwT-0004qy-UB for ged-emacs-devel@m.gmane.org; Tue, 24 Jan 2012 09:41:26 +0100 Original-Received: from localhost ([::1]:43455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpbwS-0001Us-P7 for ged-emacs-devel@m.gmane.org; Tue, 24 Jan 2012 03:41:24 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:45665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpbwL-0001Sp-Px for emacs-devel@gnu.org; Tue, 24 Jan 2012 03:41:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpbwH-00009l-1R for emacs-devel@gnu.org; Tue, 24 Jan 2012 03:41:17 -0500 Original-Received: from mail-pz0-f41.google.com ([209.85.210.41]:55638) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpbwG-00009Z-S6 for emacs-devel@gnu.org; Tue, 24 Jan 2012 03:41:13 -0500 Original-Received: by dang27 with SMTP id g27so2493452dan.0 for ; Tue, 24 Jan 2012 00:41:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=SJQB66pmBExkybpV2Bh/zrAaSd7EpE2MSr1gOizypEI=; b=mpXAjxrxSpPhv7h6/s1qZvw05w7pTzaAtkESFHn0K2SAjCy3zwWeerUnNJUK6XAeMD yiQGp52ecUKecC6BoQtlvSK7JZESqzK0f14Tp7JKUgmG2sTqGv+M3rZ7kYdZP+YEZUVY g8VdKvkMJgS1NY+/OBOJFHLGOrFzDZLIVAyL8= Original-Received: by 10.68.197.73 with SMTP id is9mr3173147pbc.75.1327394471571; Tue, 24 Jan 2012 00:41:11 -0800 (PST) Original-Received: by 10.68.136.193 with HTTP; Tue, 24 Jan 2012 00:41:11 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: Ro9fqJyXIaXibqNGehaAtIIER7w X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.41 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:147869 Archived-At: On Mon, Jan 23, 2012 at 15:11, Stefan Monnier wr= ote: >> In 2009, Tomohiro Matsuyama sent a message to this list with a patch >> to add lookahead/lookbehind assertions to Emacs regular expressions >> (regexps). =C2=A0Is there any plan to incorporate this useful feature in= to >> an official release? > I'd like to replace the current regexp engine with one that does not > suffer from exponential blowup (i.e. using "Thompson's NFA"). > 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. As an alternative to PCRE, which, as has already been pointed out, doesn=E2=80=99t match any of these requirements, how about RE2? http://code.google.com/p/re2/ It=E2=80=99s written in C++, which is a minus, but it should be simple enou= gh to extend it with \c and \s.