From patchwork Wed Oct 31 06:11:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Vong X-Patchwork-Id: 65 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 C23641676A; Wed, 31 Oct 2018 06:12:14 +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,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) by mira.cbaines.net (Postfix) with ESMTPS id 5B8951675C for ; Wed, 31 Oct 2018 06:12:14 +0000 (GMT) Received: from localhost ([::1]:57504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHjjh-00049C-NR for patchwork@mira.cbaines.net; Wed, 31 Oct 2018 02:12:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHjja-00048n-8K for guix-patches@gnu.org; Wed, 31 Oct 2018 02:12:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHjjW-0003E0-63 for guix-patches@gnu.org; Wed, 31 Oct 2018 02:12:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51933) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHjjV-0003Dr-Vk for guix-patches@gnu.org; Wed, 31 Oct 2018 02:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gHjjV-0006kk-Qi for guix-patches@gnu.org; Wed, 31 Oct 2018 02:12:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#33215] [PATCH 07/11] gnu: Add clojure-instaparse. References: <87muquhcw3.fsf@gmail.com> In-Reply-To: <87muquhcw3.fsf@gmail.com> Resent-From: Alex Vong Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 31 Oct 2018 06:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33215 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33215@debbugs.gnu.org Received: via spool by 33215-submit@debbugs.gnu.org id=B33215.154096627525894 (code B ref 33215); Wed, 31 Oct 2018 06:12:01 +0000 Received: (at 33215) by debbugs.gnu.org; 31 Oct 2018 06:11:15 +0000 Received: from localhost ([127.0.0.1]:56188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjil-0006jZ-0a for submit@debbugs.gnu.org; Wed, 31 Oct 2018 02:11:15 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:34917) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjij-0006jM-Au for 33215@debbugs.gnu.org; Wed, 31 Oct 2018 02:11:13 -0400 Received: by mail-pl1-f194.google.com with SMTP id n4-v6so6175116plp.2 for <33215@debbugs.gnu.org>; Tue, 30 Oct 2018 23:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=+3YsHOZdmgrBt3ax7SZ48LRGWq4NysKeg5mkpP3ikBs=; b=ilo9tQbnQTIj9oWczt6b9ZA79+YP/8p1BUEuOjVQw8e2C9oY8cdVgJEBeV8VuFtkqk 9x8KT/rqa8AUVBbACrZzNYNJV+O2nHJIO8z499LfPVUOHE86IdP6t9vgfWLwRi5IaLn8 ner9q6U/szMDeTvlcR4NK2sGqE3gDM9rhHtgOt262x1b93eA8mWWy6i6h3DtCue+BsTp r371UIhCzbDT8A8DyBOqi+HhSS/siI9z4+rNHpR/pKqrd+reAwgqTyWsvC8QnNnm4cUW iIZd3xGtMss7sbOXjYj2ShWKv6uv9JFsSisG46CcEBrbZ6BQ8w29GhTGpvTXxP5Hzdh5 GfcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=+3YsHOZdmgrBt3ax7SZ48LRGWq4NysKeg5mkpP3ikBs=; b=O0WnTsmVNrrO8/fMyc/+9TJGH191++gCav+p/nr3ugh8kceD4XwhQ1pdzxSR/5kthW 9Y/T5qM+pNYtg8DTqNS2C1p1eVHp0oEmycZm0iQOJEpPb9KRzRSKW6MnguCq8ws+AEYT wKyX7gce/3O+cjHpCjaL+6OBvvxws6QCks+g7/BX+auffrRiCJBd8gLTf0J2/YSh4/ai DTprAWwfHuKhCyeThDNPBgnlcU+OsOwOSNCR+kFeePbyhjuna56D80ChME0qVMjy7t2E n5vBCqoaiBQNlGjtdlHgNOKzzFtPEIV4z4imc2lRfY89qHh8rmjwd3w5rNPFZgfvmchx 66wg== X-Gm-Message-State: AGRZ1gJcFs55o81ojzXanYN47JXFN0Rt1cZRoIR5FqR0aAAiEZWhox3u PnfDNhH56rwv6Vekyx7/J89atgCP X-Google-Smtp-Source: AJdET5dYd7EBSZVcUkTxcmsTY5wdSXGzapWdafZTz+HX1kMUrr8f4Yo43zwiuWjKFsy/U7KxITMNlA== X-Received: by 2002:a17:902:e20e:: with SMTP id ce14-v6mr1900765plb.226.1540966267838; Tue, 30 Oct 2018 23:11:07 -0700 (PDT) Received: from debian (42-3-197-089.static.netvigator.com. [42.3.197.89]) by smtp.gmail.com with ESMTPSA id 130-v6sm28830029pfz.174.2018.10.30.23.11.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Oct 2018 23:11:07 -0700 (PDT) From: Alex Vong Date: Wed, 31 Oct 2018 14:11:03 +0800 Message-ID: <87sh0mfxxk.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) 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: , Cc: alexvong1995@gmail.com Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From 835b431224da203bfefc984019529679495a64b5 Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Sun, 14 Oct 2018 04:17:14 +0800 Subject: [PATCH 07/11] gnu: Add clojure-instaparse. * gnu/packages/lisp.scm (clojure-instaparse): New public variable. --- gnu/packages/lisp.scm | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index ee43e5abf..3bb70c692 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -36,6 +36,7 @@ #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system ant) + #:use-module (guix build-system clojure) #:use-module (guix build-system asdf) #:use-module (guix build-system trivial) #:use-module (gnu packages admin) @@ -1603,6 +1604,58 @@ compressor. It works on data produced by @code{parse-js} to generate a ("sbcl-cl-uglify-js" ,sbcl-cl-uglify-js))) (synopsis "JavaScript compressor"))) +(define-public clojure-instaparse + (let ((commit "dcfffad5b065e750f0f5835f017cdd8188b8ca2e") + (version "1.4.9")) ; upstream forget to tag this release + (package + (name "clojure-instaparse") + (version version) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Engelberg/instaparse.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "002mrgin4z3dqy88r1lak7smd0m7x8d22vmliw0m6w6mh5pa17lk")))) + (build-system clojure-build-system) + (arguments + '(#:doc-dirs '("docs/"))) + (synopsis "No grammar left behind") + (description + "Instaparse aims to be the simplest way to build parsers in Clojure. + +@itemize +@item Turns @emph{standard EBNF or ABNF notation} for context-free grammars +into an executable parser that takes a string as an input and produces a parse +tree for that string. + +@item @dfn{No Grammar Left Behind}: Works for @emph{any} context-free grammar, +including @emph{left-recursive}, @emph{right-recursive}, and @emph{ambiguous} +grammars. + +@item Extends the power of context-free grammars with PEG-like syntax for +lookahead and negative lookahead. + +@item Supports both of Clojure's most popular tree formats (hiccup and enlive) +as output targets + +@item Detailed reporting of parse errors. + +@item Optionally produces lazy sequence of all parses (especially useful for +diagnosing and debugging ambiguous grammars). + +@item ``Total parsing'' mode where leftover string is embedded in the parse +tree. + +@item Optional combinator library for building grammars programmatically. + +@item Performant. +@end itemize") + (home-page "https://github.com/Engelberg/instaparse") + (license license:epl1.0)))) + (define-public confusion-mdl (let* ((commit "12a055581fc262225272df43287dae48281900f5")) (package -- 2.19.1