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: Regular expression libraries Date: Fri, 16 Dec 2016 15:06:13 -0500 Message-ID: <3b626acd-cb21-9208-a31d-1ee2a2a0fcba@gmail.com> References: <01d7e608-04d2-84a4-6143-e954bc9d569f@mit.edu> <2212c006-4a4d-a649-5857-01f4249d1e29@cs.ucla.edu> <874m24svia.fsf@linux-m68k.org> <460074d9-394a-5c0c-33f3-6be16e7082bb@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ivNIjNWlF0L9tCuklc9tbOkwhp7Qbp5c7" X-Trace: blaine.gmane.org 1481918801 20253 195.159.176.226 (16 Dec 2016 20:06:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Dec 2016 20:06:41 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 16 21:06:38 2016 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 1cHym5-0004XV-C7 for ged-emacs-devel@m.gmane.org; Fri, 16 Dec 2016 21:06:37 +0100 Original-Received: from localhost ([::1]:34130 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHym9-0002ft-Qo for ged-emacs-devel@m.gmane.org; Fri, 16 Dec 2016 15:06:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHym1-0002WV-GC for emacs-devel@gnu.org; Fri, 16 Dec 2016 15:06:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHylw-0006kd-He for emacs-devel@gnu.org; Fri, 16 Dec 2016 15:06:33 -0500 Original-Received: from mout.kundenserver.de ([212.227.17.13]:59968) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cHylw-0006ip-5U for emacs-devel@gnu.org; Fri, 16 Dec 2016 15:06:28 -0500 Original-Received: from [18.26.2.123] ([18.26.2.123]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.184]) with ESMTPSA (Nemesis) id 0LdVtC-1d0hWd1aPC-00ikhg; Fri, 16 Dec 2016 21:06:25 +0100 In-Reply-To: X-Provags-ID: V03:K0:khLVVojpdJH5EWxkpEh+pgqQ/NImB/qGrgRfLSyJZ8Byg/IRMTZ eIVTZ+WyhoK4fa8vYZPebAsvcD4C+/J6go1fVs+iuGLMQq0h0RksY+oDIq1enODP8heh0h0 6bDTNKzw1DKk1AzaTMrPL4EHvWH4QZF6xJoGQWyk9e1RVsarhnnymGBsoKSnrFKFK9ePSmN iKfH5HArn44Sdk1JyEtFA== X-UI-Out-Filterresults: notjunk:1;V01:K0:ZJLcARUygus=:Q1TbT9RUQnP8zpqJjtXryM GPB6Pxc7uPHiNpWy0aCI+ZWd4Ex9U4uaIxJ6NApp14aWVjv5gFvKeDgrutPz2RhuHJhpNUFo1 EMFX+xp15AJ2hg4exiuEjVw9ZJ8KFD4YdhEZ9wcvCDKd7FztDEzLxyAc8dGngShmxqLn5yZpQ LgxqTQYN5DnSKiybUBtvPoS7GZOfFGOlutWrsUrKqAmvPDrPobCT9yLKsj7DDuVAMz0A0UZ27 cIS4eNhCI7WY9hLVFohmX0/jmUWUZSYqvQDCuFcsr3sy9Gc75EgpDZn8bAS7tR3DOYfjCzxRe aCjWVjJ6Gev+rl6dyC2xwCOiP/8UmheFEo0+TmLWceSfaxpNV0YnpFNz5l6b4H2VUOVlzNHt6 Wryhgu6vZIk8xENhkjEv1pMzRAyzJ2fjtcJQ6dqrhmN4XRNGtu2ByALdUxWL1o5ing6TVnC0o 8ahJy5hSnhlzrctCh/PZuuMfBO1TLTwk1Rp0IvH/S2/ddOfHQ4HMcOQRET6WLVEDxNbE8vAWR vgtXnMNACOW2/c++xZKG1mXt9TKobjVYaCwYKhME4XrcypNtRyiw3omXobjkDwPSqRWdsAJQ3 bo4d+O8DPRnvjW+VMbzxOmEXV8UEjZ07+992k1vHTEpl21QFmWwpuK0a6CIXeB40EseukARLf Z2O5tMt2rYxPNAqQoQlkGP1IXgcc7iWKHdNSP0M4w+ElZXFQn0vM5PvYr+fGtTs1nhIY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.13 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:210539 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ivNIjNWlF0L9tCuklc9tbOkwhp7Qbp5c7 Content-Type: multipart/mixed; boundary="vki3qOTe1WpHvEvSFTOMQudC9E8v7Wwu5"; protected-headers="v1" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: Lars Ingebrigtsen Cc: emacs-devel@gnu.org Message-ID: <3b626acd-cb21-9208-a31d-1ee2a2a0fcba@gmail.com> Subject: Re: Regular expression libraries References: <01d7e608-04d2-84a4-6143-e954bc9d569f@mit.edu> <2212c006-4a4d-a649-5857-01f4249d1e29@cs.ucla.edu> <874m24svia.fsf@linux-m68k.org> <460074d9-394a-5c0c-33f3-6be16e7082bb@cs.ucla.edu> In-Reply-To: --vki3qOTe1WpHvEvSFTOMQudC9E8v7Wwu5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-12-16 10:42, Lars Ingebrigtsen wrote: > Cl=C3=A9ment Pit--Claudel writes: >=20 >> Wait, now I'm confused. The master branch of glibc *does* include the= following in regex.h: >> >> extern int __re_search_2 >> (struct re_pattern_buffer *buffer, const char *string1, >> int length1, const char *string2, int length2, >> int start, int range, struct re_registers *regs, int stop); >> >> =E2=80=A6 but the implementation just allocates a large buffer and con= catenates both strings? >=20 > Yes. If I remember correctly, a glibc developer popped up here a coupl= e > of years ago announcing that they were going to do that change (thereby= > making __re_search_2 incredibly slow, but retained for compatibility). I see, thanks. This code seems a bit beyond my abilities to easily exten= d :/ Eli started listing things that we would need from an external library be= fore we could move to it. AFAICT, there is: * Support for searching a gap buffer (essentially two strings). * Support for Emacs' internal utf-8 based encoding * Support for Emacs' regexp syntax (though we could imagine writing a tra= nslator) * Support for Emacs' syntax properties, and Emacs-specific extensions lik= e matching the position of the point, etc. An I missing anything else? Which ones of these things does gnulib alread= y have? Thanks! Cl=C3=A9ment. --vki3qOTe1WpHvEvSFTOMQudC9E8v7Wwu5-- --ivNIjNWlF0L9tCuklc9tbOkwhp7Qbp5c7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYVEk1AAoJEPqg+cTm90wjJgkQAJklGPFY9Tw7zuUNVHHky6xN TWw1AYjLu09RYfxuVICYq8v67de/ki9uKICm5to3e2+IXAX2VqnJ18JlSS3qHAQL pKCnp2fPb2Hwki5/1vKnJvVKrw3ZzllLgNS9pg/LNuSQxYTIWKoCyjSoMtC1WQIG jW+Thd9XKY4hEAGuu7qB4AiLlXlIfLk9ZGWei78fdMa+ZtNUHxWoJmrhVR5R77wt DoVHB8rkEkmcEXnYAQqWjc0msPwoRFJcjaZ2j+ldFR10OkGlTUWoT1pa9P4A6tZO HFnWcV807MINsYmQFyD89Q+fA80CDuQIejyLBOrtOjmkz3O5ufJrgARBx1xR5aDe ssxL3Ih/NL83+WAQHFBeqPk3s+0winAGj6FPmfK3juxdrO58M3jrNWgWOI3gYipe a7b49YGCqoX1uVILOLPU0AIkmartQAQYAiGbKJ9N8CvsIDl69MNrQckkj97sAry7 LIFJdsQcf1RB6c0JF7H/+ZN3fBKBDwi5yDhxcMd9BRAqWgOgbRporfDiVPHJ/sW3 81XRyahE5VQ76Qd7Baq7idgT/8x2wsNXLF2lCmn6gy4nAXgeKDz7cSl6MxlRMhDk MP/acb70eRMJIw/uuRluutx3VhHiZ2tzZP172rAGGBREgfeQVEiebC1MAp/Esaam Figt+zAVlgFHc0WSMRgd =uZJU -----END PGP SIGNATURE----- --ivNIjNWlF0L9tCuklc9tbOkwhp7Qbp5c7--