From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Pierre Neidhardt Newsgroups: gmane.emacs.devel Subject: Re: rx.el sexp regexp syntax Date: Mon, 04 Jun 2018 17:44:39 +0200 Message-ID: <87h8miv9nc.fsf@gmail.com> References: <87h8mw3yoc.fsf@gmail.com> <20180525155126.GA4096@ACM> <87lgc7hebk.fsf@gmail.com> <87r2lzd375.fsf@ericabrahamsen.net> <87lgbx2dc1.fsf@ericabrahamsen.net> <87in6z6gwa.fsf@ericabrahamsen.net> <6d1f1246-a1ed-4401-9ab5-c9bb0451a510@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1528128350 15542 195.159.176.226 (4 Jun 2018 16:05:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 4 Jun 2018 16:05:50 +0000 (UTC) User-Agent: mu4e 1.0; emacs 26.1 Cc: Stefan Monnier , emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 04 18:05:46 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 1fPrzL-0003sG-OP for ged-emacs-devel@m.gmane.org; Mon, 04 Jun 2018 18:05:43 +0200 Original-Received: from localhost ([::1]:40710 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPs1S-000080-Tr for ged-emacs-devel@m.gmane.org; Mon, 04 Jun 2018 12:07:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrf7-0006IO-Jt for emacs-devel@gnu.org; Mon, 04 Jun 2018 11:44:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrf5-00029L-1L for emacs-devel@gnu.org; Mon, 04 Jun 2018 11:44:49 -0400 Original-Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:33262) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrf4-00028V-QM for emacs-devel@gnu.org; Mon, 04 Jun 2018 11:44:46 -0400 Original-Received: by mail-wm0-x22a.google.com with SMTP id z6-v6so14200651wma.0 for ; Mon, 04 Jun 2018 08:44:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=VVGoNXeTW4dudaW+XWfflvWS8lwsWTQIAs7r2zNDlCk=; b=oE4pZyZlKfflVjMvzWdlXo72XmXurwqaZO1+c2LlTB3Cv/0fpCbK+kfe6Vfefq4b9e hs+lsU42CP2xSTSK8yVL3ZZSNjVRTpBf/ni8hrlfYvyE7CP+FMykx3IKJmHykXsfqL0p eMYxr+SCravlNnCqnNFYu6rBTGK6cvyD1sRuz4CJX8MFswGKdacSahFD2PpIHGOQLNqM 26BG3Y3uwHOQOxxJV/RBIGhagWiyy69sClA8bMMtAEV/OLVet1yP6alBFUNlWcT+q3BM PrGEmoeBgxLL4Do2i8RexYyZWNGRyIoHqF4qoukixMo0gMmIcu1Pj7UfGNVfgM6Ka8td AaRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=VVGoNXeTW4dudaW+XWfflvWS8lwsWTQIAs7r2zNDlCk=; b=qQIrLXzUa/wgdD4ft9gKuwNlQcMEZJgjQmY/TnED2ccRm73eZqRWdrP+mb+Shkrhot FRKKZF4f4HsMmktrVBFnBgKVoSghAXz6izcQuZ0hKvrd8NHf/Y4k+N7wOai1MiP7UD0u aXaiul1bUwR4k4TAp159UTibdLjVKDLbcrACD/G/yXXPLgeYbMmMVwqrgQvmZJUAHX0R i7j77l6D75e6vQNxbUSp3MWjQyO0EYWK+o7P7znIH/RuUrxwvvd2BKdTg9YBl5lOapBh CkWQ4NPgtX4JLj7RJeC4X90U1Ob4V836U5kXsIaY7gAhk1mlV33CHpD9kwdDgMJQ/IiE Eegw== X-Gm-Message-State: APt69E1J7MhJF48iA+6mYBPpUW6xMna9EvJCwLND35EdY9TsnVL6seim mi9DFsLFUiwWLBot/VsI7PvzI5u+ X-Google-Smtp-Source: ADUXVKKKDZiTGwNSBJZ/tq/zi9yts4jTkJ7H3u/+rUxPxSShpkfjjwi7wdhMJtX3sc18GmYr081DQw== X-Received: by 2002:a1c:992:: with SMTP id 140-v6mr3733054wmj.86.1528127085036; Mon, 04 Jun 2018 08:44:45 -0700 (PDT) Original-Received: from mimimi ([37.173.6.187]) by smtp.gmail.com with ESMTPSA id l84-v6sm691168wmi.3.2018.06.04.08.44.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Jun 2018 08:44:44 -0700 (PDT) In-reply-to: <6d1f1246-a1ed-4401-9ab5-c9bb0451a510@default> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22a 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:226003 Archived-At: --=-=-= Content-Type: text/plain Drew Adams writes: >> For such regexps, the exact syntax (PCRE, BRE, ERE, RX, ...) in use has >> fairly little importance: if written "raw" as above, it will be >> indecipherable in any case. >> >> To make it readable, you need to add human-level explanations >> e.g. by adding comments and naming sub-elements. Which is indeed what >> is done in the source code:... > > Agreed. The rx language seems to have space to add support for variables. Then rx would really shine for such expressions: it would make it very natural to explicitly name expressions and re-use them. -- Pierre Neidhardt --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlsVXmcACgkQm9z0l6S7 zH87iQgAgcxIG4MEDvnfmMLAXq4P3JeEbpmCdNmMh7qIEGJr+Laemf/R2+H+hZw0 u0qc8h+/f4xr3iYwa/avl0BsGif7Ju9TG5hiSy8AhCqDhHUJXc5tsklkSzkza9f7 C1q5KBK1oF5ihqCK2Izgp9za+ru3NuTFFPcyW2N9jYsVbl2Suu15fR377d4fDRpQ C8Ji8nCkR4MvXY3alBwyAtJbJyddP7VMaUS6eqauIxZnBWAKhqDxIfwqgXMfcRW6 x4lGBSp/TrF/NpM4yhet6C5s9EiuhmLvKWLyoqk09qtxNpr+3TXD64pCx4uN4KeP IiQ0rf6WXw35f8gfF746WKkg4NQWPQ== =rLEA -----END PGP SIGNATURE----- --=-=-=--