From patchwork Thu Jan 3 07:26:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Hondet X-Patchwork-Id: 667 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 61E52169C4; Sat, 5 Jan 2019 09:32:12 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from listsout.gnu.org (listsout.gnu.org [208.118.235.17]) by mira.cbaines.net (Postfix) with ESMTP id F3BDE16986 for ; Sat, 5 Jan 2019 09:32:11 +0000 (GMT) Received: from localhost ([127.0.0.1]:50824 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfiJP-0004JZ-K8 for patchwork@mira.cbaines.net; Sat, 05 Jan 2019 04:32:11 -0500 Received: from eggsout.gnu.org ([209.51.188.92]:49664 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfiJK-0004JU-DA for guix-patches@gnu.org; Sat, 05 Jan 2019 04:32:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfiJH-00031P-4G for guix-patches@gnu.org; Sat, 05 Jan 2019 04:32:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:48022) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gfiJG-00031F-Ih for guix-patches@gnu.org; Sat, 05 Jan 2019 04:32:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gfiJG-0000K6-Ec for guix-patches@gnu.org; Sat, 05 Jan 2019 04:32:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#33986] [PATCH 2/9] gnu: Add ocaml-parsexp. References: <87lg3z8nc2.fsf@gmail.com> In-Reply-To: <87lg3z8nc2.fsf@gmail.com> Resent-From: Gabriel Hondet Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 05 Jan 2019 09:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33986 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33986@debbugs.gnu.org Received: via spool by 33986-submit@debbugs.gnu.org id=B33986.15466807091223 (code B ref 33986); Sat, 05 Jan 2019 09:32:02 +0000 Received: (at 33986) by debbugs.gnu.org; 5 Jan 2019 09:31:49 +0000 Received: from localhost ([127.0.0.1]:47233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfiJ2-0000Jf-Ki for submit@debbugs.gnu.org; Sat, 05 Jan 2019 04:31:48 -0500 Received: from mail-ed1-f48.google.com ([209.85.208.48]:39975) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfiJ1-0000JS-Ah for 33986@debbugs.gnu.org; Sat, 05 Jan 2019 04:31:47 -0500 Received: by mail-ed1-f48.google.com with SMTP id g22so33676720edr.7 for <33986@debbugs.gnu.org>; Sat, 05 Jan 2019 01:31:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=5On0+IBXekAv0M2rMlr00PZctibfa73Kmp20GYZihdA=; b=K7Kd66CQM+Db4w0EjZc3e8+VuyLyyvyjUIf+IEYHLQn46XxDiIuxc1lQk1qBAN++sp qAIhgWIzZ1cRTzI26ZdAKUj2cqE+QK1Firr1zXAr4pfP7+tw0ODcmIzG3CWLzifghgin OuTv2P/RWxyEpCTGfNOXDET/+E65lH1t5V9BefVZ9rq9KyIO2vg2Fr4w77IJGXscxya7 11gkzfsR2BJ4Padn8M5feH8j9i5glCVtbAsA38kmzhoxAbp0uqpS42kAELbJDmQWVFN1 /j8MJPFA5o9Cvoze3YRbIBnoqAGEI5wSK8to4oR7iUv9twQ6Uq3WHlbXKSGOezYVNMoc AJtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=5On0+IBXekAv0M2rMlr00PZctibfa73Kmp20GYZihdA=; b=oV4JBSuQA12Kdm/9Mg3H+TunhSfJGNHvcse5h+rkS/gyKuhOFHU4F3/s3bxGDPbM8Z BvmL87qZA/h76GbB5c/UuCPHu6ksdKgrnFWzuVpY1md8aPbcevog0UyD75Kh4+IWx1Ew iNaZnq6hvma7Jgua1FCfO8K5a0WgMCDNYEBXbyjasVP0sTVHVznQ+ajTzoJ1kqcZDX88 unbfUTUG7GTqdqd8lsj+5IDJV3EX3LIDNqg9uz6q88UZVBiTHKIaeA9KAatrxFZyl8Z+ 7Dpd2vWajxN0WsfEIjaTvvhARv+ucEF78sI69zhMY/jhor7DSza/n3oBqR6S7RbPbCx/ 1MUw== X-Gm-Message-State: AA+aEWZjW+/SH78gWzWoMvfWkrGelRZspUaCpajSNeSY5+59xl+ud7fm 0/LntewyEbbTM5NEKDrkZClY3vUA X-Google-Smtp-Source: AFSGD/XbklJq/Qt+AedpVExGxw17yJyFtaqTTrUrORsVRFbpvNbUC7OcuV4BvDy2mCYWAa4KrDsthQ== X-Received: by 2002:a50:88a4:: with SMTP id d33mr49066604edd.261.1546680701362; Sat, 05 Jan 2019 01:31:41 -0800 (PST) Received: from glht-x240.gmail.com (2a01cb04062c860044e3e8429e102378.ipv6.abo.wanadoo.fr. [2a01:cb04:62c:8600:44e3:e842:9e10:2378]) by smtp.gmail.com with ESMTPSA id g21sm28775643edc.63.2019.01.05.01.31.40 for <33986@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 Jan 2019 01:31:40 -0800 (PST) User-agent: mu4e 1.0; emacs 26.1 From: Gabriel Hondet Date: Thu, 3 Jan 2019 08:26:51 +0100 Message-ID: <87k1jj8n7n.fsf@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/ocaml.scm (ocaml-parsexp): New variable. --- gnu/packages/ocaml.scm | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index bece14477..7876c69a7 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -5130,3 +5130,49 @@ base converters") libraries is an industrial strength alternative to OCaml's standard library that was developed by Jane Street, the largest industrial user of OCaml.") (license license:expat))) + +(define-public ocaml-parsexp + (package + (name "ocaml-parsexp") + (version "0.11.0") + (home-page "https://github.com/janestreet/parsexp") + (source + (origin + (method git-fetch) + (uri (git-reference + (url (string-append home-page ".git")) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1nyq23s5igd8cf3n4qxprjvhbmb6ighb3fy5mw7hxl0mdgsw5fvz")))) + (build-system dune-build-system) + (inputs + `(("ocaml-sexplib0" ,ocaml-sexplib0))) + (synopsis "S-expression parsing library") + (description + "This library provides generic parsers for parsing S-expressions from +strings or other medium. + +The library is focused on performances but still provide full generic +parsers that can be used with strings, bigstrings, lexing buffers, +character streams or any other sources effortlessly. + +It provides three different class of parsers: +@itemize +@item +the normal parsers, producing [Sexp.t] or [Sexp.t list] values +@item +the parsers with positions, building compact position sequences so +that one can recover original positions in order to report properly +located errors at little cost +@item +the Concrete Syntax Tree parsers, produce values of type +[Parsexp.Cst.t] which record the concrete layout of the s-expression +syntax, including comments +@end itemize + +This library is portable and doesn't provide IO functions. To read +s-expressions from files or other external sources, you should use +parsexp_io.") + (license license:expat)))