From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 06:31:45 2020 Received: (at submit) by debbugs.gnu.org; 6 Jan 2020 11:31:45 +0000 Received: from localhost ([127.0.0.1]:45255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioQbl-0007rA-Fl for submit@debbugs.gnu.org; Mon, 06 Jan 2020 06:31:45 -0500 Received: from lists.gnu.org ([209.51.188.17]:41847) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioQbh-0007r0-Pz for submit@debbugs.gnu.org; Mon, 06 Jan 2020 06:31:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33841) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioQbe-0002sz-QG for guix-patches@gnu.org; Mon, 06 Jan 2020 06:31:37 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ioQbb-0000x5-8Q for guix-patches@gnu.org; Mon, 06 Jan 2020 06:31:34 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:57749) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ioQba-0000v3-KL for guix-patches@gnu.org; Mon, 06 Jan 2020 06:31:31 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 25D4F21FE6; Mon, 6 Jan 2020 06:31:27 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 06 Jan 2020 06:31:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inv.alid.pw; h= from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=fm2; bh=l4utofs1wUGZAsy9Kf4c0VdB2z SSTA+waYuMqnhlMBc=; b=LtO8XkihXObtqU+zV3xutlz2FkYUNmw09rbAHYTumZ zDFRKnJkL2bs6ZUK5UavTzec7DfDRmwFJ5/CUsuA7UpNLcGxNlc0VVCTJISsahw1 0OEupkKvxUva83jJvGuNIQ2/HwQLBpQB/ms9cbcpJd/y8jd1aOjcP0jPHFVkl1fN VQnvHQRRBPsC1wEjubnU4YdaZv1gNT/jex7XaVs+tkqPvVvZF0PkTkf+C4vp9MOm 7PK726yhne+SvBBX2wQBxo5yijYIPPw0Yu7rFtvbzUL/n00Io5mZrKEy/hrW58Td VT2hmaSBKw0QX/ZR/BTRS21F0/QfTh7mqppfavy1MtJg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=l4utof s1wUGZAsy9Kf4c0VdB2zSSTA+waYuMqnhlMBc=; b=miYZNUvZ9j6evxVZtgwv2W 32kIBOEKk9E5Xsw0lphzySx0EeIb6lsVLio+AqHtwFE2u6xEn0i3z8EkCXO9GUSU ufMBRtB3WghVsj2ohr203ExsrFR4vrzEe0RsDyp9Jd0Wgs8nyjT6g5YtKD7UYnUX xeJd2T6o1T6u1pW8rN12gHFz4A+LHqhFTn0P5tjU+2/1j+/1pY2CszKtUoh0fasM LO9ugjpBrZHaGAdhg3q4ZRUC6PpzbdeqR3klBM0qPTBRH/iHqWsmYqsNBbyk2ppn PZ63txSSdES2Q/Vk4sCksvp6gtwLoU/Ov+q2cvTQBCFi8HGEF/eyKLdAVWVeQofA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdehtddgfedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdluddtmdenucfjughrpefhvf fufffkofggtgfgsehtkeertdertdejnecuhfhrohhmpeflohhshhcujfholhhlrghnugcu oehjohhshhesihhnvhdrrghlihgurdhpfieqnecuffhomhgrihhnpehpihhumhgrrhhtrg drtghomhdpghhnuhdrohhrghenucfkphepkeehrdduudelrdekfedrvdeinecurfgrrhgr mhepmhgrihhlfhhrohhmpehjohhshhesihhnvhdrrghlihgurdhpfienucevlhhushhtvg hrufhiiigvpedt X-ME-Proxy: Received: from sirius.localdomain (procyon.chrys.alid.pw [85.119.83.26]) by mail.messagingengine.com (Postfix) with ESMTPA id 553E130607B0; Mon, 6 Jan 2020 06:31:26 -0500 (EST) From: Josh Holland To: guix-patches@gnu.org Subject: [PATCH] gnu: Add peg. Date: Mon, 6 Jan 2020 11:30:43 +0000 Message-Id: <20200106113042.33516-1-josh@inv.alid.pw> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.27 X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit Cc: Josh Holland X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) * gnu/packages/parser.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/local.mk | 2 ++ gnu/packages/parser.scm | 55 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 gnu/packages/parser.scm diff --git a/gnu/local.mk b/gnu/local.mk index b7fa503257..c4f75ec775 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -26,6 +26,7 @@ # Copyright © 2019 Evan Straw # Copyright © 2019 Brett Gilio # Copyright © 2019 Amin Bandali +# Copyright © 2020 Josh Holland # # This file is part of GNU Guix. # @@ -384,6 +385,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/ots.scm \ %D%/packages/package-management.scm \ %D%/packages/parallel.scm \ + %D%/packages/parser.scm \ %D%/packages/password-utils.scm \ %D%/packages/patchutils.scm \ %D%/packages/pciutils.scm \ diff --git a/gnu/packages/parser.scm b/gnu/packages/parser.scm new file mode 100644 index 0000000000..40a16915df --- /dev/null +++ b/gnu/packages/parser.scm @@ -0,0 +1,55 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Josh Holland +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages parser) + #:use-module (guix build-system gnu) + #:use-module (guix download) + #:use-module (guix licenses) + #:use-module (guix packages)) + +(define-public peg + (package + (name "peg") + (version "0.1.18") + (source (origin + (method url-fetch) + (uri (string-append + "https://www.piumarta.com/software/peg/peg-" + version ".tar.gz")) + (sha256 + (base32 + "114h1y4k8fwcq9m0hfk33dsp7ah8zxzjjzlk71x4iirzczfkn690")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags (list "CC=gcc" + (string-append "PREFIX=" (assoc-ref %outputs "out"))) + #:phases (modify-phases %standard-phases + (delete 'configure)))) + (synopsis "Parser generators for Parsing Expression Grammars (PEGs)") + (description "peg and leg are tools for generating recursive-descent +parsers: programs that perform pattern matching on text. They processes a +Parsing Expression Grammar (PEG) [Ford 2004] to produce a program that +recognises legal sentences of that grammar. peg processes PEGs written using +the original syntax described by Ford; leg processes PEGs written using +slightly different syntax and conventions that are intended to make it an +attractive replacement for parsers built with lex and yacc. Unlike lex and +yacc, peg and leg support unlimited backtracking, provide ordered choice as a +means for disambiguation, and can combine scanning (lexical analysis) and +parsing (syntactic analysis) into a single activity.") + (home-page "https://www.piumarta.com/software/peg/") + (license (x11-style "file://LICENSE.txt")))) -- 2.24.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 06:34:28 2020 Received: (at 38986) by debbugs.gnu.org; 6 Jan 2020 11:34:28 +0000 Received: from localhost ([127.0.0.1]:45262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioQeS-0007ve-E3 for submit@debbugs.gnu.org; Mon, 06 Jan 2020 06:34:28 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:37569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioQeQ-0007vR-RE for 38986@debbugs.gnu.org; Mon, 06 Jan 2020 06:34:27 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id A8CC3216DB for <38986@debbugs.gnu.org>; Mon, 6 Jan 2020 06:34:21 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 06 Jan 2020 06:34:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inv.alid.pw; h= references:from:to:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm2; bh=XdZQChlqydsJaq4L5JmoF2VlI3 EieNgoiWluEkmWz80=; b=bFINsP5NDgQ1Gc33ZT3fsz1pnUVeacMrK8V0/bA8x1 VfbC9+cmu9I2BQKRm6VZkLNYJU4eFti1bVMrUotMCsWiaCjRXv1fOZHN+A1zll8T uF29H2yrXsfzPfE5Q10MDccd0LSvom7mOUHzr9YOwcLR5YuQz0e35/xmdVPG+9N8 HvpR0ZL/+YMye0aH0xKEVia1Y5NZh4VTaT/DV0p4XoOUhnk681mWy/6xekeEKBVR OPKH3CZ/dNHlAsXId/MEbsatEGY4IEhC+p5VP/8jMjC9Pya+tReHxqRdz1UYGyER qjJ6FkdHPQYFi7EU+zHPrArmRfdM/Uzx9UkbSDo05Usg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=XdZQCh lqydsJaq4L5JmoF2VlI3EieNgoiWluEkmWz80=; b=w218lqpU+BMmHiuykMt/0A NGKHeN8hocVhxfoSrNlgoKV+fCCVFan1hv8QuR5Ftl3v3IKeINjxCs5KoZkBhfKr kHXIZSw50tGbjCa/pFahvgmMvmooM31mJpOdYWcRLS4hG33Vd+8J6gA1LyhS81wJ KycPzsPGl1x5nxd6N6R/LmvV5vE38pKQKV4UJnMR9TE+TKPSvicCR7zUQ3VuY0Py txKi8apMzYzQKTLrpsiu2SIxMeH/T6/rxOAT3X3GMKzfnsEk9GGv9FRnbG1EK2eo UisJcnNLGBiaDbiYvrUVXfogNM6n54c/3aqF4eKnUqPnaGiCqieyXpYkixLQ34eA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdehtddgfeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdlfedtmdenucfjughrpehffg fhvffujgffkfggtgesthdtredttdertdenucfhrhhomheplfhoshhhucfjohhllhgrnhgu uceojhhoshhhsehinhhvrdgrlhhiugdrphifqeenucfkphepkeehrdduudelrdekfedrvd einecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhshhesihhnvhdrrghlihgurdhpfien ucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from sirius (procyon.chrys.alid.pw [85.119.83.26]) by mail.messagingengine.com (Postfix) with ESMTPA id 19E2D30600A8 for <38986@debbugs.gnu.org>; Mon, 6 Jan 2020 06:34:20 -0500 (EST) References: <20200106113042.33516-1-josh@inv.alid.pw> User-agent: mu4e 1.2.0; emacs 26.3 From: Josh Holland To: 38986@debbugs.gnu.org Subject: Re: bug#38986: Acknowledgement ([PATCH] gnu: Add peg.) In-reply-to: Date: Mon, 06 Jan 2020 11:34:21 +0000 Message-ID: <87imlo7r9e.fsf@inv.alid.pw> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 38986 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) FWIW, if maintainers prefer, this package could also justifiably be named `pegleg`. I stuck with the upstream tarball name for now. -- Josh Holland From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 15 06:07:14 2020 Received: (at 38986) by debbugs.gnu.org; 15 Feb 2020 11:07:14 +0000 Received: from localhost ([127.0.0.1]:35047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2vI2-0003kF-91 for submit@debbugs.gnu.org; Sat, 15 Feb 2020 06:07:14 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:57502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2vHx-0003k3-Pv for 38986@debbugs.gnu.org; Sat, 15 Feb 2020 06:07:13 -0500 Received: (qmail 30680 invoked by uid 1009); 15 Feb 2020 12:07:07 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25723. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.02466 secs); 15 Feb 2020 11:07:07 -0000 Received: from unknown (HELO gravity) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 15 Feb 2020 12:07:07 +0100 Date: Sat, 15 Feb 2020 12:07:44 +0100 From: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= To: Josh Holland Subject: Re: [PATCH] gnu: Add peg. Message-ID: <20200215110744.wijpaboho72a574h@gravity> References: <20200106113042.33516-1-josh@inv.alid.pw> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ba6hp2s6oupevhaz" Content-Disposition: inline In-Reply-To: <20200106113042.33516-1-josh@inv.alid.pw> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38986 Cc: 38986@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --ba6hp2s6oupevhaz Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 06, 2020 at 11:30:43AM +0000, Josh Holland wrote: > * gnu/packages/parser.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > --- > gnu/local.mk | 2 ++ > gnu/packages/parser.scm | 55 +++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 57 insertions(+) > create mode 100644 gnu/packages/parser.scm Hi Josh, it seems that PEG doesn't build fully from source, src/peg.peg-c is a pre-generated file that's pretty much not human-readable. While bootstrapping fully from source is not a hard requirement, sidestepping it is usually reserved to highly-desirable packages. Could you take a look at the possibility of generating src/peg.peg-c during build? Meanwhile, I have fixed up the description a bit (texinfo markup, grammar): (description "@command{peg} and @command{leg} are tools for generating recursive-descent parsers: programs that perform pattern matching on text. They process a Parsing Expression Grammar (PEG) to produce a program that recognises legal sentences of that grammar. @command{peg} processes PEGs written using the original syntax described by Ford; @command{leg} processes PEGs written using slightly different syntax and conventions that are inten= ded to make it an attractive replacement for parsers built with @command{lex} and @command{yacc}. Unlike @command{lex} and @command{yacc}, @command{peg} and @command{leg} support unlimited backtracking, provide ordered choice as a means for disambiguation, and can combine scanning (lexical analysis) = and parsing (syntactic analysis) into a single activity.") Regards, Jakub K=C4=85dzio=C5=82ka --ba6hp2s6oupevhaz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl5H0PwACgkQ4xWnWEYT FWSV0A/6Azdown2PF+4H5+fs25Out3lF77iYhAMOPvZ1oP8EvYqK1HsdQ4xSbj4q IFNNUDyKwWR2MHO39JqE7018bnY+qU5tTVz3i5z3xpenNwntuybjn13xZbFt2P+I E23R6pO97In9E0XJoJrKmICVg3PgnT/RHiPAMHN7fYvSpKxAwGAgbi3tOSsltTQl ok335l8kxWLIy7+0QztzvWvZlU/WAuEfhqoKAKQuo4KZMu6QtY67QW40XZLN7lf5 lg3rmVBvtcg1r/3IWTvmcbDbIsT50+49M4MLFsJRobSV+iAp6zicAj89IdxgUjbc FyaiKs1lJfiyCi7CuzbNc4KjRnHjATYEu61ZXpf5103YAJAUSEolMtBIk9U5Act2 eZ17sptJUk50y13xPfDnD7TaXIzjJWr+KviewYhC2r+HsPLcKnW2DSWfiGiq/Go5 VU7Ud9H+j1rTvQp1EnRhR7/ujX0jAyUmsBc4mqnmNJj2TgBP9jd9XCu6lz759/xG jTAOzhxSF4TDvfv5BQD+rJ2XYdAXLcXQ/O0ratR+ZGe9/2duEKlzdUT3VI/nzoy6 CeFiZWi0R6621LQ1tns+ytCuka2fCHCY52vc6NKwbq6STPpOTOlJ5AYY9zaSddit crZUqVVo8zud4i1+iowls1WW+lRaT7Lz7bgFcyDkMcKkXHcynps= =0qDb -----END PGP SIGNATURE----- --ba6hp2s6oupevhaz--