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: Make peg.el a built-in library? Date: Sat, 09 Oct 2021 09:49:43 -0700 Message-ID: <87v926w3bs.fsf@ericabrahamsen.net> References: <875yvtbbn3.fsf@ericabrahamsen.net> <87a6jjc7c8.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16952"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Stefan Monnier , emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 09 18:50:44 2021 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 1mZFYZ-0004BM-MD for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Oct 2021 18:50:43 +0200 Original-Received: from localhost ([::1]:45986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZFYY-0001Rr-Ke for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Oct 2021 12:50:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34642) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZFXn-0000kT-Ij for emacs-devel@gnu.org; Sat, 09 Oct 2021 12:49:55 -0400 Original-Received: from mail.ericabrahamsen.net ([52.70.2.18]:52610) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZFXl-0003E8-I2 for emacs-devel@gnu.org; Sat, 09 Oct 2021 12:49:55 -0400 Original-Received: from localhost (c-71-197-232-156.hsd1.wa.comcast.net [71.197.232.156]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 1685DFA01F; Sat, 9 Oct 2021 16:49:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1633798185; bh=Tf+aarWrP57v4Ogi+tusFfEOZ2IjTKtGBxZLfj4oZ7o=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=SjEYlVlLm5lyRd7fhnkpX8FqmXLy/GrDrN58lU+NZU6kkX0F/8AeS6xRQk+b02tN7 Ae/qa8Tzr+xjQzgAZQLH2TmTTXn95LKLCFxsC/YbCRZI2F8B3BHe7FzNQtj49MOXpW ZlxffxYxjzOg2kuOQtJGT2HbJLTAdWlsTKtO6olg= In-Reply-To: <87a6jjc7c8.fsf@web.de> (Michael Heerdegen's message of "Sat, 09 Oct 2021 03:31:03 +0200") Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@ericabrahamsen.net; helo=mail.ericabrahamsen.net X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, 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.23 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" Xref: news.gmane.io gmane.emacs.devel:276620 Archived-At: Michael Heerdegen writes: > Eric Abrahamsen writes: > >> Hi all, >> >> In my on-again-off-again quest to not have to write text parsers myself, >> I was pointed towards the PEG library (in ELPA), which does pretty much >> exactly what I want (Parsing Expression Grammars). > > I like the idea, and I have some remarks: > > (1) Can we improve the introduction in the file header a bit? I would > add a link to the wikipedia page: > > https://en.wikipedia.org/wiki/Parsing_expression_grammar > > it explains some background. [...] > (4) How hard would it be to parse regexps (or translate `rx' forms) into > an equivalent peg? I had this idea as well -- we've already got "regexps that look like forms", it seems like it would be a natural to integrate this with rx. One thing we're not short of here is new ideas for code, but I do think this would make a lot of sense.