From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Re: Make peg.el a built-in library? Date: Sat, 26 Nov 2022 17:46:04 -0800 Message-ID: <878rjxkw4j.fsf@ericabrahamsen.net> References: <875yvtbbn3.fsf@ericabrahamsen.net> <877d07a16u.fsf@localhost> <87tu3asg2r.fsf@ericabrahamsen.net> <87edud25ov.fsf@localhost> <87a6511ku0.fsf@ericabrahamsen.net> <87wn85z0zl.fsf@ericabrahamsen.net> <87leobplpv.fsf_-_@ericabrahamsen.net> <87bkp7ct7f.fsf@localhost> <875yfe7ols.fsf@ericabrahamsen.net> <87a64pbwkl.fsf@localhost> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24624"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 27 02:47:11 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oz6lD-0006CM-5B for ged-emacs-devel@m.gmane-mx.org; Sun, 27 Nov 2022 02:47:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oz6kX-0005cr-SW; Sat, 26 Nov 2022 20:46:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oz6kV-0005cP-VA for emacs-devel@gnu.org; Sat, 26 Nov 2022 20:46:27 -0500 Original-Received: from mail.ericabrahamsen.net ([52.70.2.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oz6kL-0007z9-8b for emacs-devel@gnu.org; Sat, 26 Nov 2022 20:46:27 -0500 Original-Received: from localhost (c-71-197-232-41.hsd1.wa.comcast.net [71.197.232.41]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id B0D21FA08D; Sun, 27 Nov 2022 01:46:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1669513567; bh=phh8Il6fX0AIcjTCvU5diSKvWOwh7/SLYmOzOFOLzKo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=SjRURbmBCfXgpraUx/DRiXbbJs+zoE/WliW5AXMOTEtZ/GZyX4lmJiQg5EOWNokXS znrOuF09w/B0FmHI9URKsr7DcPI8VU/IEiRUj8txQxRBsdwWZKqRtjZdleKqahoGuM PwDFrzGPHtnnHpfrZlBSqj9x8fx5AOKA0rG2XuUE= In-Reply-To: <87a64pbwkl.fsf@localhost> (Ihor Radchenko's message of "Thu, 17 Nov 2022 12:21:46 +0000") Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@ericabrahamsen.net; helo=mail.ericabrahamsen.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300607 Archived-At: --=-=-= Content-Type: text/plain Ihor Radchenko writes: > Eric Abrahamsen writes: > >>>> +@item (* E) >>>> +Zero or more of an expression, as the regexp ``*''. >>>> + >>>> +@item (+ E) >>>> +One or more of an expression, as the regexp ``+''. >>> >>> It is worth highlighting the greedy part here and referring to &A and >>> !A. >> >> I don't believe there is separate syntax for &A and !A -- those are >> written (if A) and (not A). > > Indeed. I just felt lazy to write (if A) and (not A) and wrote &A and !A :) > > The comment is suggesting to add reference to the (if A)/(not A) and the > "Writing PEGs" section. > >>> Actions are only run when the expression matches; with point moved after >>> the match, right? What about &A and !A? >> >> That's right, actions only run if the parsing succeeds, and they run all >> at once at the end. Maybe I can move all discussons of parsing success >> vs failure into one place. > > I think that there might be confusion here because people are used to > full success/full failure but not to partial success. > > And (if A) feels even more confusing because it does not actually move > point and does not advance the parser. So, it is unclear what success > means and what is the buffer/stack context when action is executed. Here's a new version, that I hope clarifies these questions (instead of doing the opposite). Note that there's an open peg.el bug now (#59345), about whether the "syntax-class" PEX is supposed to advance point or not -- you'd think that it would, but it doesn't. No word from the author yet. Lastly, nobody with a maintainer's hat on has actually given the green light on this, and I assume we'll want to hold off until the next version of Emacs is released; anyway it would be good to know what Eli/Lars think. I haven't done any NEWS additions or anything, either. Thanks! Eric --=-=-= Content-Type: application/x-texinfo Content-Disposition: attachment; filename=peg.texi Content-Transfer-Encoding: base64 QGMgLSotdGV4aW5mby0qLQpAYyBUaGlzIGlzIHBhcnQgb2YgdGhlIEdOVSBFbWFjcyBMaXNwIFJl ZmVyZW5jZSBNYW51YWwuCkBjIENvcHlyaWdodCAoQykgMTk5MC0tMTk5NSwgMTk5OC0tMTk5OSwg MjAwMS0tMjAyMiBGcmVlIFNvZnR3YXJlCkBjIEZvdW5kYXRpb24sIElu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