From patchwork Mon Dec 13 18:41:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacob MacDonald X-Patchwork-Id: 35206 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 052B427BBEA; Mon, 13 Dec 2021 18:48:40 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 837A127BBE9 for ; Mon, 13 Dec 2021 18:48:39 +0000 (GMT) Received: from localhost ([::1]:57280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwqNK-0000Ho-N6 for patchwork@mira.cbaines.net; Mon, 13 Dec 2021 13:48:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwqGw-0003Su-Jv for guix-patches@gnu.org; Mon, 13 Dec 2021 13:42:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45220) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwqGw-0007Uy-6L for guix-patches@gnu.org; Mon, 13 Dec 2021 13:42:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mwqGw-0001XI-5O for guix-patches@gnu.org; Mon, 13 Dec 2021 13:42:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52387] [PATCH 1/5] gnu: Add cl-maxpc. References: In-Reply-To: Resent-From: Jacob MacDonald Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Dec 2021 18:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52387 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52387@debbugs.gnu.org Received: via spool by 52387-submit@debbugs.gnu.org id=B52387.16394209015857 (code B ref 52387); Mon, 13 Dec 2021 18:42:02 +0000 Received: (at 52387) by debbugs.gnu.org; 13 Dec 2021 18:41:41 +0000 Received: from localhost ([127.0.0.1]:56762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwqGR-0001WD-8N for submit@debbugs.gnu.org; Mon, 13 Dec 2021 13:41:41 -0500 Received: from mail-qt1-f171.google.com ([209.85.160.171]:42989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwqGK-0001Vs-8f for 52387@debbugs.gnu.org; Mon, 13 Dec 2021 13:41:29 -0500 Received: by mail-qt1-f171.google.com with SMTP id z9so16126532qtj.9 for <52387@debbugs.gnu.org>; Mon, 13 Dec 2021 10:41:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=aJZ1yuz96pUWe3Pp5jCoO8dP6GLGPMTX4Hz3L14q0Dk=; b=XCiYZuiTeO/FdRkhnLLYu2RUzVic+NXc7bPeAYr22KhJaJfpI7cmnMtxSoBx/UJMzi p4XGGP1ISfvwLflTLaR/fZ3Ip+XCuJRXRxLmJZxuJTN+VgU4kmg+iMAz9SD8MHPUydSl ocZlMfm0+gqEtN2TlBMaV2CaWFcaioIG7UaDgjQ7ihQfdzS96/eY98TayM2Eyldb9oev WU9JG0lMDynywPc7+5I/ADmp+cXOPsG2lp8Nae3kxnjXpe2ctEeot7orLkVR7ANNHNi/ Q/PqfVFK39nQxAaPsxk7nHSLBZUwLH7JcVYFSsjGz1cGFQCTgPyYtODPjf4POhBNAt65 hCxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=aJZ1yuz96pUWe3Pp5jCoO8dP6GLGPMTX4Hz3L14q0Dk=; b=XaMi0C3QUs87J0M2k6l/InXt5dnLgNcbvcPXkjFibnCUaAUum0yyJasQLWjFNthPRy iCVlmObUgPdx5weXielkx1RrxyOHscMgLaTRj4Qj0Y8eR4Cm75OAihmnpOBk4E2tU8ls U0+MpZvwFqxzx4ldQCni4y6doNAETYqrXh/DztW2PCWN1A50ImDZKecFd/PntetrpMSO rK6NrkOggv2G5TymQkN6dN2Ru4eJaJUzs8sv2yj5Kiwz3GEqqZ0Ej/jKUAm8iq6FXvx2 SlS+2L/dC0DU1NbXBs3HfGqIdqAmHy0CZLJoKC1Gr8QXj9ZoievUFp9WG2GH3vkhP1mQ hAgw== X-Gm-Message-State: AOAM532E5KVAt7fHQ+n/LH5OwPHw8I9v7ULAV+6VguK7P/idF29nsWjX E+MWNo3Xc/b1M/RjUSIOeklgcjc9ncGy6AVURH6fI6VT X-Google-Smtp-Source: ABdhPJwpugjLDhPZ0L+E/W47Ck7oubt2k9dKXwZeu3X+YOeMV+17FY5ElnkyjCYz02/g5XhWUN1IlrYRp/0vZfdi8+Q= X-Received: by 2002:a05:622a:248:: with SMTP id c8mr98223qtx.248.1639420878732; Mon, 13 Dec 2021 10:41:18 -0800 (PST) MIME-Version: 1.0 From: Jacob MacDonald Date: Mon, 13 Dec 2021 12:41:07 -0600 Message-ID: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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 From 8e3384c13c54c6e4c559c51c39763ffbef19c60a Mon Sep 17 00:00:00 2001 From: Jacob MacDonald Date: Wed, 8 Dec 2021 21:53:39 -0600 Subject: [PATCH 1/5] gnu: Add cl-maxpc. * gnu/packages/lisp-xyz.scm (sbcl-maxpc, cl-maxpc, ecl-maxpc): New variables. --- gnu/packages/lisp-xyz.scm | 48 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm index e25d0f5488..9cfd67d591 100644 --- a/gnu/packages/lisp-xyz.scm +++ b/gnu/packages/lisp-xyz.scm @@ -20245,3 +20245,51 @@ (define-public sbcl-cl-https-everywhere (define-public cl-https-everywhere (sbcl-package->cl-source-package sbcl-cl-https-everywhere)) + +(define-public sbcl-maxpc + (let ((commit "e5e58d053039517d30fd59ab2d128256b87790d5") + (revision "1")) + (package + (name "sbcl-maxpc") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/eugeneia/maxpc") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "15wrjbr2js6j67c1dd4p2qxj49q9iqv1lhb7cwdcwpn79crr39gf")))) + (build-system asdf-build-system/sbcl) + (home-page "https://mr.gy/software/maxpc/api.html") + (synopsis "Library for writing parsers and lexers based on combinatory parsing") + (description + "@emph{Max’s Parser Combinators} is a simple and pragmatic library for +writing parsers and lexers based on combinatory parsing. MaxPC is capable of +parsing deterministic, context-free languages, provides powerful tools for +parse tree transformation and error handling, and can operate on +@dfn{sequences} and @dfn{streams}. It supports unlimited backtracking, but +does not implement @url{http://pdos.csail.mit.edu/~baford/packrat/thesis/, +Packrat Parsing}. Instead, MaxPC achieves good performance through its +optimized primitives, and explicit separation of matching and capturing input. +In practice, MaxPC parsers perform better on typical computer languages—when +compared to Packrat parsers—at the expense of not producing linear-time +parsers. + +@enumerate +@item +MaxPC is a complete rewrite of @url{https://github.com/eugeneia/mpc, MPC} with +was in turn a fork of Drew Crampsie’s @url{http://smug.drewc.ca/, Smug}. +@item +See @url{https://mr.gy/blog/maxpc.html#section-3-1, +MaxPC: Why? How? / Packrat Parsing} on why the book keeping costs of Packrat +parsing diminish the gain in execution time for typical grammars and workloads. +@end enumerate") + (license license:agpl3)))) + +(define-public cl-maxpc + (sbcl-package->cl-source-package sbcl-maxpc)) + +(define-public ecl-maxpc + (sbcl-package->ecl-package sbcl-maxpc)) -- 2.34.0