From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZw8c-0006q0-EF for guix-patches@gnu.org; Thu, 20 Dec 2018 06:05:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZw8a-0006Ox-6A for guix-patches@gnu.org; Thu, 20 Dec 2018 06:05:10 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:51258) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZw8Z-0006O3-Vp for guix-patches@gnu.org; Thu, 20 Dec 2018 06:05:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gZw8Z-0004H4-NH for guix-patches@gnu.org; Thu, 20 Dec 2018 06:05:07 -0500 Subject: [bug#33811] [PATCH 5/5] import: opam: Parse comments. Resent-Message-ID: From: Julien Lepiller Date: Thu, 20 Dec 2018 12:01:03 +0100 Message-Id: <20181220110103.4219-5-julien@lepiller.eu> In-Reply-To: <20181220110103.4219-1-julien@lepiller.eu> References: <20181220110103.4219-1-julien@lepiller.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33811@debbugs.gnu.org * guix/import/opam.scm: Add comment support in parser. --- guix/import/opam.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/import/opam.scm b/guix/import/opam.scm index b30d28561..c254db5f2 100644 --- a/guix/import/opam.scm +++ b/guix/import/opam.scm @@ -42,7 +42,8 @@ %opam-updater)) ;; Define a PEG parser for the opam format -(define-peg-pattern SP none (or " " "\n")) +(define-peg-pattern comment none (and "#" (* STRCHR) "\n")) +(define-peg-pattern SP none (or " " "\n" comment)) (define-peg-pattern SP2 body (or " " "\n")) (define-peg-pattern QUOTE none "\"") (define-peg-pattern QUOTE2 body "\"") -- 2.19.2