guix-commits
[Top][All Lists]
Advanced

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

02/03: gnu: Add guile-packrat.


From: guix-commits
Subject: 02/03: gnu: Add guile-packrat.
Date: Sun, 3 May 2020 12:27:16 -0400 (EDT)

civodul pushed a commit to branch core-updates
in repository guix.

commit 60c9264b30d64527e2ab395b60a076fe070d0baf
Author: Ludovic Courtès <address@hidden>
AuthorDate: Sun May 3 17:30:42 2020 +0200

    gnu: Add guile-packrat.
    
    * gnu/packages/guile-xyz.scm (guile-packrat): New variable.
---
 gnu/packages/guile-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index d97aacd..a75088e 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3186,6 +3186,42 @@ SHA-512).")
 (define-public guile3.0-hashing
   (deprecated-package "guile3.0-hashing" guile-hashing))
 
+(define-public guile-packrat
+  (package
+    (name "guile-packrat")
+    (version "0.1.1")
+    (home-page "https://github.com/weinholt/packrat";)
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url home-page)
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1aga17164fkhbgllqc7ni6fk5zl8mkmgkl5zcsy67x7ngpyalbby"))))
+    (build-system guile-build-system)
+    (arguments
+     `(#:implicit-inputs? #f                      ;needs nothing but Guile
+       #:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
+       #:not-compiled-file-regexp "/extensible\\.scm$"
+       #:phases (modify-phases %standard-phases
+                  (add-before 'build 'no-srfi-23
+                    (lambda _
+                      (substitute* "packrat.sls"
+                        (("\\(srfi :23 error\\)")
+                         (object->string '(only (guile) error))))
+                      #t)))))
+    (native-inputs
+     `(("guile" ,guile-3.0)))
+    (synopsis "Packrat parser library in R6RS Scheme")
+    (description
+     "This is an R6RS Scheme adaptation of the
+@uref{https://bford.info/packrat/, packrat parsing}.  Packrat parsing is a
+memoizing, backtracking, recursive-descent parsing technique that runs in time
+and space linear in the size of the input text.")
+    (license license:expat)))
+
 (define-public guile-webutils
   (let ((commit "8541904f761066dc9c27b1153e9a838be9a55299")
         (revision "0"))



reply via email to

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