From: Julien Lepiller <julien@lepiller.eu>
To: 33811@debbugs.gnu.org
Subject: [bug#33811] [PATCH 5/5] import: opam: Parse comments.
Date: Thu, 20 Dec 2018 12:01:03 +0100 [thread overview]
Message-ID: <20181220110103.4219-5-julien@lepiller.eu> (raw)
In-Reply-To: <20181220110103.4219-1-julien@lepiller.eu>
* 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
next prev parent reply other threads:[~2018-12-20 11:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-20 10:41 [bug#33811] [PATCH] Opam importer improvements Julien Lepiller
2018-12-20 11:00 ` [bug#33811] [PATCH 1/5] gnu: Move coq packages from ocaml to coq Julien Lepiller
2018-12-20 11:01 ` [bug#33811] [PATCH 2/5] import: opam: Add recursive option Julien Lepiller
2018-12-20 11:01 ` [bug#33811] [PATCH 3/5] import: opam: Add updater Julien Lepiller
2018-12-20 11:01 ` [bug#33811] [PATCH 4/5] gnu: ocaml-graph: Add upstream-name Julien Lepiller
2018-12-20 11:01 ` Julien Lepiller [this message]
2018-12-27 8:30 ` [bug#33811] [PATCH] Opam importer improvements Julien Lepiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181220110103.4219-5-julien@lepiller.eu \
--to=julien@lepiller.eu \
--cc=33811@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).