From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: rx.el sexp regexp syntax Date: Thu, 31 May 2018 08:43:27 -0700 (PDT) Message-ID: References: <87h8mw3yoc.fsf@gmail.com> <20180525155126.GA4096@ACM> <87lgc7hebk.fsf@gmail.com> <87r2lzd375.fsf@ericabrahamsen.net> <8736ybpwhh.fsf@gmail.com> <87y3g1a9kv.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1527781482 21649 195.159.176.226 (31 May 2018 15:44:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 31 May 2018 15:44:42 +0000 (UTC) To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 31 17:44:38 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 1fOPkk-0005Vr-2p for ged-emacs-devel@m.gmane.org; Thu, 31 May 2018 17:44:38 +0200 Original-Received: from localhost ([::1]:44772 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOPmr-00040w-2Y for ged-emacs-devel@m.gmane.org; Thu, 31 May 2018 11:46:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOPmi-0003yP-M3 for emacs-devel@gnu.org; Thu, 31 May 2018 11:46:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOPmd-0006BF-Q8 for emacs-devel@gnu.org; Thu, 31 May 2018 11:46:40 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:42682) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fOPmd-00048o-Gk for emacs-devel@gnu.org; Thu, 31 May 2018 11:46:35 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4VFfbjq193943; Thu, 31 May 2018 15:44:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=ReKrKANLMuNiqmzPVWvBiUHV5ywiFCWCyaAG1JTAHQI=; b=EWYrMPP7kFGrP1wzEJf9V/Lnjl9pLQ570/CLDcUKdXckSPLB2N8QluRmgrnZpZpZl7Br p9vOKsDjasJoiKMuwQ4I56+g4r8p5Ni1HpRnVfNnucT9+xeRa77guZJmLkjJXvgOaEzq qfkLEdEzakfjzu/JGwHTUkJnWcEdyWCeyTZOxEu4EKjnIs9jZcdSLz9puUhKA7T5MIug QrYH2yCIV9hCciyyhljwNJV/8IEyxzML4AbTO/IoSULn2cA8o/o9Ik1ydIWLAOJC7jYk Zr8Q3QACayE5lIWVc07Qugvwdmhu1jElaHEjhMkAXDpHqjvO2x1VfK6VBhsgqdlH0gi/ Mg== Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2j9x4hcjj9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 31 May 2018 15:44:32 +0000 Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w4VFiVYm006267 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 31 May 2018 15:44:31 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w4VFiM8C011482; Thu, 31 May 2018 15:44:24 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4690.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8909 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=465 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1805310176 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.86 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:225854 Archived-At: > The verbosity for me is not so much in the identifier as in the "( ID > SPC ) SPC" and the need for quotation marks to surround actual > characters. So for example the string's single-char * turns into > a 5-char * in RX. >=20 > I really like the regularity, extensibility, and clear structure of RX, > but in practice it makes the regexps too long: short regexps are > simple enough that RX's advantages don't get a chance to shine, and more > complex regexps are made to spread too many lines for comfort. >=20 > That doesn't mean I don't like RX, by the way. Just that I expected I'd > really love it, and in the end I never use it because I never find it to > be significantly better (I do think it's significantly better when you > need to manipulate it programmatically, of course, which is why lex.el > takes an RX syntax as input). This summary applies for me, as well. Functions that transform a regexp string to an RX sexp and vice versa would be very helpful. Given such functions, I might use RX and the show-me-the-regexp function to create a regexp string, which I'd leave in the code, and I might use the show-me-the-RX function when I need to change such a string (or think about it).