From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Regular expression creation [was: Re: Emacs Lisp's future] Date: Fri, 19 Sep 2014 11:04:41 -0700 Message-ID: <541C7039.5040605@dancol.org> References: <87wq97i78i.fsf@earlgrey.lan> <20140917202418.240bbd2c@forcix> <87egv9y5m6.fsf@gmail.com> <541B0AFC.9080501@dancol.org> <87zjdwwpab.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6lsVT7Cvl0g6XoQ9wop74wSWIPCPTS1CR" X-Trace: ger.gmane.org 1411149911 31993 80.91.229.3 (19 Sep 2014 18:05:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Sep 2014 18:05:11 +0000 (UTC) To: Alexis , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 19 20:05:05 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XV2YL-0004j4-Fw for ged-emacs-devel@m.gmane.org; Fri, 19 Sep 2014 20:05:05 +0200 Original-Received: from localhost ([::1]:59783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XV2YL-0008Tl-1j for ged-emacs-devel@m.gmane.org; Fri, 19 Sep 2014 14:05:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XV2YG-0008Qn-IB for emacs-devel@gnu.org; Fri, 19 Sep 2014 14:05:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XV2YF-0001Ue-ET for emacs-devel@gnu.org; Fri, 19 Sep 2014 14:05:00 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:41563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XV2YF-0001UI-56 for emacs-devel@gnu.org; Fri, 19 Sep 2014 14:04:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:To:MIME-Version:From:Date:Message-ID; bh=mHqeZskp/Mac7eEWwUaT1gKY1I6QUzLdHiR0SvsR3+I=; b=kSxV8qFtyzQK/kPONk5nkEulPmzjQHKKjCacKoDJg4OCTnqNx4bhHUy7Bhypf7fg9dGFL7YnjdlIlR+EMwm0+pwU9prMyh7I6wQDgsNhkbmkU84zwO09fHEnPWNIcHFI5NPhAGDKDq561e2SaWawJT8DB8WTRE6cr2QJSDjC8479r1J94NntvD4huGJqV3CloUXF+5BN/IBwiUGg4VHpeeRloFYvt/TsNPrjINYPebUMy59oRYyEe2IDTo/R0+3fNt9MgBDQyp6AlxTQgi8pxjP9LVgUnmr+9475Gw3yf1EyQ1At1FNZxUiu+Ev9ERhLpW1IUclL3L39bk+eTrWpWQ==; Original-Received: from [2620:10d:c082:1010:de9b:9cff:feee:b4f1] by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_RC2) (envelope-from ) id 1XV2Y4-0003rt-1q; Fri, 19 Sep 2014 11:04:48 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 In-Reply-To: <87zjdwwpab.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:174572 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --6lsVT7Cvl0g6XoQ9wop74wSWIPCPTS1CR Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 09/18/2014 02:54 PM, Alexis wrote: >=20 > Daniel Colascione writes: >=20 >> On 09/17/2014 07:07 PM, Alexis wrote: >>> i like this suggestion. i'm rather comfortable with Perl5 REs, and ca= n >>> find myself frustrated trying to create REs in ELisp. Having said tha= t, >>> the issue is not usually the syntax of ELisp REs per se (e.g. needing= to >>> escape things like capturing parentheses or the alternatives pipe); i= t's >>> needing to escape various things /further/ because REs can only be >>> specified in the form of a standard ELisp string. On several occasion= s >>> i've ended up using a combination of pcre-to-elisp and re-builder to = try >>> to work out if the problem is too few backslashes, too many backslash= es, >>> or both. >> >> That's why we have rx. >=20 > i find rx .... unwieldy. For me, rx is to PCREs as a putative function > 'apply-function-to-each-element-of-sequence' is to 'mapcar'. i don't > want an English-language wrapper for regular expressions; i want regula= r > expressions that don't suffer from backslashitis. And, given the severa= l > discussions by a number of people over the last several months - > including recently - about alternatives to the current RE-creation > system in Emacs, it seems to me that rx is hardly the final piece of th= e > Emacs Lisp RE puzzle. rx is sometimes awkward for small patterns, but it's a boon for larger ones: see the work I did in compile.el, which involved rewriting the "gnu" pattern with rx. It's also pretty easy to embed string regular expressions inside rx forms. Anyway, I'd love to see pcre2el or equivalent in core. It's a nice packing for converting between regular expression formats. --6lsVT7Cvl0g6XoQ9wop74wSWIPCPTS1CR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJUHHA5AAoJEN4WImmbpWBlucAP/0eqf4SOiBqYLzKJ7SUxlJ0x SPvMVvtYY3CJCIw72HQd2tJrJou5JRLbxkU2nmtvo+zBor+ZGwL8wcAzwhe8JNeg +85pY324HvXrQLABbWw+OEAhW5sQjVibIeeCFbV3lMun4r42UxDkaiy3XaB/fC9a CygkAAUfFNgLcifVY6qe8Pi6G6xEqMS1EXiopO8hirF9cToThxvp1WY2oOyRLa7d Y4TMaAhE6O3iDsR0Z8A+zXugzkh6bpVhTK1JHdBX7qFNyvFdA73TlLYgHFdMW7KI LtJ/MLvkO0Cew5UEEHvkI+f8MvOwNz0cYZb3uf9pvb4AwpiJH5E3Sy2FPv+Lyhfm jwnpno0PIdiBnj2qFkDKckMwQskP9j9cUdmXxDGMRBWYGMnnjKECvwwF4NpchVJc T4THExVRnWtUUggW3GP4FiVbs1G725BQFzyKeVoRYcc2E3nZ/tu76oqkYQ5YvhNS Qtjf/eJUl+nPUi4vJTWoHlfSDR+ABMm/yVF6m3cSmNh8uunlIkETPG8tSO3C/DRa SMedl9P2TIpDvBx/DRDgOBHViH/SZI7+7qG6LR+7UekB8Z0vSndRXwgsUHSw732H fwuEgl3EpmSJXWuQCbaHZYjXw6KnDo1watpxFDgQ/2yZJI1bIouKu0x2hd5JLiyX Zd3gd4x6dkhLhTqFcDHq =CsUn -----END PGP SIGNATURE----- --6lsVT7Cvl0g6XoQ9wop74wSWIPCPTS1CR--