guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#33215] [PATCH 07/11] gnu: Add clojure-instaparse.


From: Alex Vong
Subject: [bug#33215] [PATCH 07/11] gnu: Add clojure-instaparse.
Date: Wed, 31 Oct 2018 14:11:03 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

From 835b431224da203bfefc984019529679495a64b5 Mon Sep 17 00:00:00 2001
From: Alex Vong <address@hidden>
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.
+
address@hidden
address@hidden 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.
+
address@hidden @dfn{No Grammar Left Behind}: Works for @emph{any} context-free 
grammar,
+including @emph{left-recursive}, @emph{right-recursive}, and @emph{ambiguous}
+grammars.
+
address@hidden Extends the power of context-free grammars with PEG-like syntax 
for
+lookahead and negative lookahead.
+
address@hidden Supports both of Clojure's most popular tree formats (hiccup and 
enlive)
+as output targets
+
address@hidden Detailed reporting of parse errors.
+
address@hidden Optionally produces lazy sequence of all parses (especially 
useful for
+diagnosing and debugging ambiguous grammars).
+
address@hidden ``Total parsing'' mode where leftover string is embedded in the 
parse
+tree.
+
address@hidden Optional combinator library for building grammars 
programmatically.
+
address@hidden Performant.
address@hidden itemize")
+      (home-page "https://github.com/Engelberg/instaparse";)
+      (license license:epl1.0))))
+
 (define-public confusion-mdl
   (let* ((commit "12a055581fc262225272df43287dae48281900f5"))
     (package
-- 
2.19.1

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]