From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: regex.c simplification Date: Sun, 17 Jun 2018 12:50:08 -0400 Message-ID: References: <83fu1mzq09.fsf@gnu.org> <87a7ru4nd8.fsf@igel.home> <20180616152728.2192f398@jabberwock.cb.piermont.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1529254126 13576 195.159.176.226 (17 Jun 2018 16:48:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 17 Jun 2018 16:48:46 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 17 18:48:42 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 1fUar3-0003Mm-Bh for ged-emacs-devel@m.gmane.org; Sun, 17 Jun 2018 18:48:41 +0200 Original-Received: from localhost ([::1]:55858 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUat8-0005gN-VQ for ged-emacs-devel@m.gmane.org; Sun, 17 Jun 2018 12:50:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUasW-0005fU-Qo for emacs-devel@gnu.org; Sun, 17 Jun 2018 12:50:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUasV-00035G-KU for emacs-devel@gnu.org; Sun, 17 Jun 2018 12:50:12 -0400 Original-Received: from mail-qt0-x22d.google.com ([2607:f8b0:400d:c0d::22d]:41593) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fUasV-00033x-GC for emacs-devel@gnu.org; Sun, 17 Jun 2018 12:50:11 -0400 Original-Received: by mail-qt0-x22d.google.com with SMTP id y20-v6so13293937qto.8 for ; Sun, 17 Jun 2018 09:50:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=udY93/CAly18qGpTTyNmkIzdiTOVhlt7EYumbW8BPm0=; b=uZo+bIc629GjgcKs9Vyo7k+Dv+VZdK7jlroYq+P1sq6Dcxp8H+PFueRMhX1egNOdkk nhMJLXJNJfO4Jb7MfXHvpbC5tBW6ApofgeF8H0DC13pELXST5mJhwpIx4V5RClOcU0EN EVEpHnT0O5ykBy735WdzvVCwkdHRrWSy3BD1ZRfuWecu1ciPK60ajDCtJMqWrUGzIcCO +jZ2AGvUdUva80aHOZrtTXRte325UI9Y1LSq7EHzV49vumV7FvymVuah5tkr5oPhk6tX Ejoca1hjYgAwn/u4yFoWpfzIi5L2d9PR/lYf+oT30aRnm9/hKXiqx8LyBuNvWfR2i6sr +nTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=udY93/CAly18qGpTTyNmkIzdiTOVhlt7EYumbW8BPm0=; b=tHhgFLQ8VLmKf9+nwegMBu0OTTU7g8SXTlIHD9D1yhyO7LYXNJykY4cfTAqw3OxUNR CUAegRvoQTnlzMlmrG9jorNPaFBw6hauq7DSnVTv1qw7037RAsSPy1mNbRZjBequbhwG hNgRECw/EN9llEqSkcQ1lDEtTl0X/z2mQ83hiy4IOVrPc7Huoai14hdKnBO+36V4E5Py GrmxdkKr5wa+jXOBu2C2ihourL7gmIiWBx34rAaBXBMlTZDF0l9z1Xjry/scMv53E/jY QqMtE5G/IcKp3eX53Q94Sk+spxMJVDntQaLvPZLSgEzI9TM5rxct6TbT0fGhKvaSTEic i/aA== X-Gm-Message-State: APt69E3UT2/amZ7Lc+zvGqM5R0ecg8/ZnTq5dR2GXj10VIZ6RqTdfMt/ I6dQeCgg7gA31HxsF3m/lHHVo6EK X-Google-Smtp-Source: ADUXVKLR+sbFar3Smf+hZb73DluTv9qTEF35FrZtiFV5Z99dRdtxuUX42yCLjgK+nr5K0icyWlcl3g== X-Received: by 2002:aed:3a29:: with SMTP id n38-v6mr8437055qte.108.1529254210449; Sun, 17 Jun 2018 09:50:10 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:543d:e155:4a97:f2c9? ([2601:184:4180:66e7:543d:e155:4a97:f2c9]) by smtp.gmail.com with ESMTPSA id l5-v6sm11243630qtl.58.2018.06.17.09.50.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Jun 2018 09:50:09 -0700 (PDT) In-Reply-To: <20180616152728.2192f398@jabberwock.cb.piermont.com> Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::22d 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:226414 Archived-At: On 2018-06-16 15:27, Perry E. Metzger wrote: > On Sat, 16 Jun 2018 20:06:43 +0200 Andreas Schwab > wrote: >> The problem is that none of the other regex implementations support >> a gap. > > Not quite. A couple of them (say TRE) support having a mechanism to > fetch the next character rather than assuming they're present in a > flat array or what have you, which would allow for dealing with a gap > buffer. Yeah, but TRE is unmaintained, and has open security issues on its tracker :/ PCRE *should* support a gap, but in practice it doesn't (suspending a search and resuming it in another buffer isn't guaranteed to give the same results as it would have on a single contiguous buffer). There's some relevant context at https://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00622.html Clément.