From 445ecce92307aa7ab70cf02b70078e860de17dc0 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 8 Sep 2018 16:55:32 +0200 Subject: gnu: nyacc: Update to 0.86.0. * gnu/packages/patches/nyacc-binary-literals.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/mes.scm (nyacc): Update to 0.86.0, add patch. --- gnu/packages/mes.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/mes.scm') diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm index 81d4145439..7bdad5e32f 100644 --- a/gnu/packages/mes.scm +++ b/gnu/packages/mes.scm @@ -39,15 +39,15 @@ (define-public nyacc (package (name "nyacc") - (version "0.83.3") + (version "0.86.0") (source (origin (method url-fetch) (uri (string-append "mirror://savannah/nyacc/" name "-" version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (patches (search-patches "nyacc-binary-literals.patch")) (sha256 (base32 - "0120n0mdb6r58c4jc024dhwqy5s8a20waknijfhqjc59a884lrd6")))) + "0lkd9lyspvhxlfs0496gsllwinh62jk9wij6gpadvx9gwz6yavd9")))) (build-system gnu-build-system) (native-inputs `(("guile" ,guile-2.2))) -- cgit 1.4.1 From c665774a1ca9431746b1d559b06e24c1b05625d8 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 8 Sep 2018 16:58:37 +0200 Subject: gnu: mes: Update to 0.17.1. * gnu/packages/patches/mes-nyacc-0.86.0.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/mes.scm (mes): Update to 0.17.1, depend on latest Nyacc 0.86.0. (nyacc-for-mes): Remove. --- gnu/local.mk | 1 + gnu/packages/mes.scm | 20 +-- gnu/packages/patches/mes-nyacc-0.86.0.patch | 197 ++++++++++++++++++++++++++++ 3 files changed, 202 insertions(+), 16 deletions(-) create mode 100644 gnu/packages/patches/mes-nyacc-0.86.0.patch (limited to 'gnu/packages/mes.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 847e45e8cc..278afbb257 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -953,6 +953,7 @@ dist_patch_DATA = \ %D%/packages/patches/mcrypt-CVE-2012-4409.patch \ %D%/packages/patches/mcrypt-CVE-2012-4426.patch \ %D%/packages/patches/mcrypt-CVE-2012-4527.patch \ + %D%/packages/patches/mes-nyacc-0.86.0.patch \ %D%/packages/patches/mesa-skip-disk-cache-test.patch \ %D%/packages/patches/meson-for-build-rpath.patch \ %D%/packages/patches/metabat-fix-compilation.patch \ diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm index 7bdad5e32f..63a8db449a 100644 --- a/gnu/packages/mes.scm +++ b/gnu/packages/mes.scm @@ -59,36 +59,24 @@ extensive examples, including parsers for the Javascript and C99 languages.") (home-page "https://savannah.nongnu.org/projects/nyacc") (license (list gpl3+ lgpl3+)))) -(define-public nyacc-for-mes - (package - (inherit nyacc) - (version "0.80.42") - (source (origin - (method url-fetch) - (uri (string-append "https://gitlab.com/janneke/nyacc" - "/-/archive/v" version - "/nyacc-" version ".tar.gz")) - (sha256 - (base32 - "0c8c8kxir0h2d4nxr131xbkfs7c80haipmkp2g6677sh14wn0b3y")))))) - (define-public mes (let ((triplet "i686-unknown-linux-gnu")) (package (name "mes") - (version "0.17") + (version "0.17.1") (source (origin (method url-fetch) (uri (string-append "http://alpha.gnu.org/gnu/mes/" "mes-" version ".tar.gz")) + (patches (search-patches "mes-nyacc-0.86.0.patch")) (sha256 (base32 - "1j32x4zqy2cqjlg9m35f2411mwac2b0p5ch4hm99gddmfbxzgyhg")))) + "02g8zig53ffd0ai8kqhv2zj7bj2366a8hr6ydkwakmi2d1amyrna")))) (build-system gnu-build-system) (supported-systems '("i686-linux" "x86_64-linux")) (propagated-inputs `(("mescc-tools" ,mescc-tools) - ("nyacc" ,nyacc-for-mes))) + ("nyacc" ,nyacc))) (native-inputs `(("guile" ,guile-2.2) ,@(if (not (string-prefix? "i686-linux" (or (%current-target-system) diff --git a/gnu/packages/patches/mes-nyacc-0.86.0.patch b/gnu/packages/patches/mes-nyacc-0.86.0.patch new file mode 100644 index 0000000000..58dfc5a46b --- /dev/null +++ b/gnu/packages/patches/mes-nyacc-0.86.0.patch @@ -0,0 +1,197 @@ +From 9e610736bf779f3295c1192e748cd19cbbe3be28 Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen +Date: Wed, 5 Sep 2018 20:28:06 +0200 +Subject: [PATCH 1/2] mes: Support Nyacc 0.85.3: Add char-set-copy. + +* mes/module/srfi/srfi-14.mes (char-set-copy): New function> +--- + mes/module/srfi/srfi-14.mes | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/mes/module/srfi/srfi-14.mes b/mes/module/srfi/srfi-14.mes +index 0be39b1e..a16d16ce 100644 +--- a/mes/module/srfi/srfi-14.mes ++++ b/mes/module/srfi/srfi-14.mes +@@ -52,3 +52,6 @@ + + (define (char-whitespace? c) + (char-set-contains? char-set:whitespace c)) ++ ++(define (char-set-copy cs) ++ (map identity cs)) +-- +2.18.0 + +From b952bdf44f11edbfc277600dc35236aae1769b54 Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen +Date: Wed, 5 Sep 2018 22:14:34 +0200 +Subject: [PATCH 2/2] mes: Support Nyacc 0.85.3: Integrate progress. + +* mes/module/nyacc/lang/sx-util.mes: New file. +* mes/module/nyacc/version.mes: New file. +* mes/module/nyacc/lang/c99/cpp.mes (nyacc): Include them. +* mes/module/nyacc/lang/c99/parser.mes (nyacc): Include them. +* module/mescc/preprocess.scm (need-progress): New function. +(progress): New function. +(insert-progress-monitors): Use them to Integrate progress. +--- + mes/module/mescc/preprocess.mes | 1 + + mes/module/nyacc/lang/c99/cpp.mes | 1 + + mes/module/nyacc/lang/c99/parser.mes | 1 + + mes/module/nyacc/lang/sx-util.mes | 27 +++++++++++++++++++++ + mes/module/nyacc/version.mes | 26 +++++++++++++++++++++ + module/mescc/preprocess.scm | 35 ++++++++++++++++++++++++++++ + 6 files changed, 91 insertions(+) + create mode 100644 mes/module/nyacc/lang/sx-util.mes + create mode 100644 mes/module/nyacc/version.mes + +diff --git a/mes/module/mescc/preprocess.mes b/mes/module/mescc/preprocess.mes +index c7c5fcaa..022a372c 100644 +--- a/mes/module/mescc/preprocess.mes ++++ b/mes/module/mescc/preprocess.mes +@@ -24,4 +24,5 @@ + (mes-use-module (srfi srfi-13)) + (mes-use-module (srfi srfi-26)) + (mes-use-module (nyacc lang c99 parser)) ++(mes-use-module (nyacc version)) + (include-from-path "mescc/preprocess.scm") +diff --git a/mes/module/nyacc/lang/c99/cpp.mes b/mes/module/nyacc/lang/c99/cpp.mes +index fad1dc55..b25c4a93 100644 +--- a/mes/module/nyacc/lang/c99/cpp.mes ++++ b/mes/module/nyacc/lang/c99/cpp.mes +@@ -28,5 +28,6 @@ + + (mes-use-module (nyacc parse)) + (mes-use-module (nyacc lex)) ++(mes-use-module (nyacc lang sx-util)) + (mes-use-module (nyacc lang util)) + (include-from-path "nyacc/lang/c99/cpp.scm") +diff --git a/mes/module/nyacc/lang/c99/parser.mes b/mes/module/nyacc/lang/c99/parser.mes +index c51552d6..1a9aaf73 100644 +--- a/mes/module/nyacc/lang/c99/parser.mes ++++ b/mes/module/nyacc/lang/c99/parser.mes +@@ -32,6 +32,7 @@ + + (mes-use-module (nyacc lex)) + (mes-use-module (nyacc parse)) ++(mes-use-module (nyacc lang sx-util)) + (mes-use-module (nyacc lang util)) + (mes-use-module (nyacc lang c99 cpp)) + +diff --git a/mes/module/nyacc/lang/sx-util.mes b/mes/module/nyacc/lang/sx-util.mes +new file mode 100644 +index 00000000..41ac5b4a +--- /dev/null ++++ b/mes/module/nyacc/lang/sx-util.mes +@@ -0,0 +1,27 @@ ++;;; -*-scheme-*- ++ ++;;; GNU Mes --- Maxwell Equations of Software ++;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen ++;;; ++;;; This file is part of GNU Mes. ++;;; ++;;; GNU Mes is free software; you can redistribute it and/or modify it ++;;; under the terms of the GNU General Public License as published by ++;;; the Free Software Foundation; either version 3 of the License, or (at ++;;; your option) any later version. ++;;; ++;;; GNU Mes is distributed in the hope that it will be useful, but ++;;; WITHOUT ANY WARRANTY; without even the implied warranty of ++;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++;;; GNU General Public License for more details. ++;;; ++;;; You should have received a copy of the GNU General Public License ++;;; along with GNU Mes. If not, see . ++ ++;;; Commentary: ++ ++;;; Code: ++ ++(mes-use-module (srfi srfi-1)) ++(mes-use-module (srfi srfi-16)) ++(include-from-path "nyacc/lang/sx-util.scm") +diff --git a/mes/module/nyacc/version.mes b/mes/module/nyacc/version.mes +new file mode 100644 +index 00000000..b9db628e +--- /dev/null ++++ b/mes/module/nyacc/version.mes +@@ -0,0 +1,26 @@ ++;;; -*-scheme-*- ++ ++;;; GNU Mes --- Maxwell Equations of Software ++;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen ++;;; ++;;; This file is part of GNU Mes. ++;;; ++;;; GNU Mes is free software; you can redistribute it and/or modify it ++;;; under the terms of the GNU General Public License as published by ++;;; the Free Software Foundation; either version 3 of the License, or (at ++;;; your option) any later version. ++;;; ++;;; GNU Mes is distributed in the hope that it will be useful, but ++;;; WITHOUT ANY WARRANTY; without even the implied warranty of ++;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++;;; GNU General Public License for more details. ++;;; ++;;; You should have received a copy of the GNU General Public License ++;;; along with GNU Mes. If not, see . ++ ++;;; Commentary: ++ ++;;; Code: ++ ++(include-from-path "nyacc/version.scm") ++(display "nyacc version\n") +diff --git a/module/mescc/preprocess.scm b/module/mescc/preprocess.scm +index 9e341cba..c2efb32c 100644 +--- a/module/mescc/preprocess.scm ++++ b/module/mescc/preprocess.scm +@@ -26,9 +26,44 @@ + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (nyacc lang c99 parser) ++ #:use-module (nyacc lang c99 parser) ++ #:use-module (nyacc version) + #:use-module (mes guile) + #:export (c99-input->ast)) + ++(format (current-error-port) "*nyacc-version*=~a\n" *nyacc-version*) ++;; list of which rules you want progress reported ++(define need-progress ++ (assoc-ref ++ '(("0.85.3" (1 2 3)) ++ ("0.86.0" (1 2 3))) ++ *nyacc-version*)) ++ ++(define (progress o) ++ (when (and o (getenv "NYACC_DEBUG")) ++ (display " :" (current-error-port)) ++ (display o (current-error-port)) ++ (display "\n" (current-error-port)))) ++ ++(define (insert-progress-monitors act-v len-v) ++ (let ((n (vector-length act-v))) ++ (let loop ((ix 0)) ++ (when (< ix n) ++ (if (memq ix need-progress) ++ (vector-set ++ act-v ix ++ (lambda args ++ (progress (list-ref args (1- (vector-ref len-v ix)))) ++ (apply (vector-ref act-v ix) args)))) ++ (loop (1+ ix)))))) ++ ++(cond-expand ++ (guile ++ (insert-progress-monitors (@@ (nyacc lang c99 parser) c99-act-v) ++ (@@ (nyacc lang c99 parser) c99-len-v))) ++ (mes ++ (insert-progress-monitors c99-act-v c99-len-v))) ++ + (define (logf port string . rest) + (apply format (cons* port string rest)) + (force-output port) +-- +2.18.0 + -- cgit 1.4.1 From 4a67079f71c264950aa7c43c5fdaa7611298a3c4 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 11 Sep 2018 22:29:39 +0200 Subject: gnu: mes: Oops, use mirror://gnu download url. * gnu/packages/mes.scm (mes): Oops, use mirror://gnu download url. --- gnu/packages/mes.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/mes.scm') diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm index 63a8db449a..880e140b80 100644 --- a/gnu/packages/mes.scm +++ b/gnu/packages/mes.scm @@ -66,7 +66,7 @@ extensive examples, including parsers for the Javascript and C99 languages.") (version "0.17.1") (source (origin (method url-fetch) - (uri (string-append "http://alpha.gnu.org/gnu/mes/" + (uri (string-append "mirror://gnu/mes/" "mes-" version ".tar.gz")) (patches (search-patches "mes-nyacc-0.86.0.patch")) (sha256 -- cgit 1.4.1 From 236fadf52868d3ced233b144f9d560b51dcecec1 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 7 Oct 2018 00:35:23 +0200 Subject: gnu: mes: Update to 0.18. * gnu/packages/patches/mes-nyacc-0.86.0.patch: Removef file. * gnu/local.mk (dist_patch_DATA): Remove entry. * gnu/packages/mes.scm (mes): Update to 0.18. --- gnu/local.mk | 1 - gnu/packages/mes.scm | 5 +- gnu/packages/patches/mes-nyacc-0.86.0.patch | 197 ---------------------------- 3 files changed, 2 insertions(+), 201 deletions(-) delete mode 100644 gnu/packages/patches/mes-nyacc-0.86.0.patch (limited to 'gnu/packages/mes.scm') diff --git a/gnu/local.mk b/gnu/local.mk index f1ce800dd5..8be91c3708 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -956,7 +956,6 @@ dist_patch_DATA = \ %D%/packages/patches/mcrypt-CVE-2012-4409.patch \ %D%/packages/patches/mcrypt-CVE-2012-4426.patch \ %D%/packages/patches/mcrypt-CVE-2012-4527.patch \ - %D%/packages/patches/mes-nyacc-0.86.0.patch \ %D%/packages/patches/mesa-skip-disk-cache-test.patch \ %D%/packages/patches/meson-for-build-rpath.patch \ %D%/packages/patches/metabat-fix-compilation.patch \ diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm index 880e140b80..6dc6dfb4cb 100644 --- a/gnu/packages/mes.scm +++ b/gnu/packages/mes.scm @@ -63,15 +63,14 @@ extensive examples, including parsers for the Javascript and C99 languages.") (let ((triplet "i686-unknown-linux-gnu")) (package (name "mes") - (version "0.17.1") + (version "0.18") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/mes/" "mes-" version ".tar.gz")) - (patches (search-patches "mes-nyacc-0.86.0.patch")) (sha256 (base32 - "02g8zig53ffd0ai8kqhv2zj7bj2366a8hr6ydkwakmi2d1amyrna")))) + "1dsaaqyanzsq9m5wrcd2bjhb3qd6928c9q97rg5r730pyqjwxyxf")))) (build-system gnu-build-system) (supported-systems '("i686-linux" "x86_64-linux")) (propagated-inputs diff --git a/gnu/packages/patches/mes-nyacc-0.86.0.patch b/gnu/packages/patches/mes-nyacc-0.86.0.patch deleted file mode 100644 index 58dfc5a46b..0000000000 --- a/gnu/packages/patches/mes-nyacc-0.86.0.patch +++ /dev/null @@ -1,197 +0,0 @@ -From 9e610736bf779f3295c1192e748cd19cbbe3be28 Mon Sep 17 00:00:00 2001 -From: Jan Nieuwenhuizen -Date: Wed, 5 Sep 2018 20:28:06 +0200 -Subject: [PATCH 1/2] mes: Support Nyacc 0.85.3: Add char-set-copy. - -* mes/module/srfi/srfi-14.mes (char-set-copy): New function> ---- - mes/module/srfi/srfi-14.mes | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/mes/module/srfi/srfi-14.mes b/mes/module/srfi/srfi-14.mes -index 0be39b1e..a16d16ce 100644 ---- a/mes/module/srfi/srfi-14.mes -+++ b/mes/module/srfi/srfi-14.mes -@@ -52,3 +52,6 @@ - - (define (char-whitespace? c) - (char-set-contains? char-set:whitespace c)) -+ -+(define (char-set-copy cs) -+ (map identity cs)) --- -2.18.0 - -From b952bdf44f11edbfc277600dc35236aae1769b54 Mon Sep 17 00:00:00 2001 -From: Jan Nieuwenhuizen -Date: Wed, 5 Sep 2018 22:14:34 +0200 -Subject: [PATCH 2/2] mes: Support Nyacc 0.85.3: Integrate progress. - -* mes/module/nyacc/lang/sx-util.mes: New file. -* mes/module/nyacc/version.mes: New file. -* mes/module/nyacc/lang/c99/cpp.mes (nyacc): Include them. -* mes/module/nyacc/lang/c99/parser.mes (nyacc): Include them. -* module/mescc/preprocess.scm (need-progress): New function. -(progress): New function. -(insert-progress-monitors): Use them to Integrate progress. ---- - mes/module/mescc/preprocess.mes | 1 + - mes/module/nyacc/lang/c99/cpp.mes | 1 + - mes/module/nyacc/lang/c99/parser.mes | 1 + - mes/module/nyacc/lang/sx-util.mes | 27 +++++++++++++++++++++ - mes/module/nyacc/version.mes | 26 +++++++++++++++++++++ - module/mescc/preprocess.scm | 35 ++++++++++++++++++++++++++++ - 6 files changed, 91 insertions(+) - create mode 100644 mes/module/nyacc/lang/sx-util.mes - create mode 100644 mes/module/nyacc/version.mes - -diff --git a/mes/module/mescc/preprocess.mes b/mes/module/mescc/preprocess.mes -index c7c5fcaa..022a372c 100644 ---- a/mes/module/mescc/preprocess.mes -+++ b/mes/module/mescc/preprocess.mes -@@ -24,4 +24,5 @@ - (mes-use-module (srfi srfi-13)) - (mes-use-module (srfi srfi-26)) - (mes-use-module (nyacc lang c99 parser)) -+(mes-use-module (nyacc version)) - (include-from-path "mescc/preprocess.scm") -diff --git a/mes/module/nyacc/lang/c99/cpp.mes b/mes/module/nyacc/lang/c99/cpp.mes -index fad1dc55..b25c4a93 100644 ---- a/mes/module/nyacc/lang/c99/cpp.mes -+++ b/mes/module/nyacc/lang/c99/cpp.mes -@@ -28,5 +28,6 @@ - - (mes-use-module (nyacc parse)) - (mes-use-module (nyacc lex)) -+(mes-use-module (nyacc lang sx-util)) - (mes-use-module (nyacc lang util)) - (include-from-path "nyacc/lang/c99/cpp.scm") -diff --git a/mes/module/nyacc/lang/c99/parser.mes b/mes/module/nyacc/lang/c99/parser.mes -index c51552d6..1a9aaf73 100644 ---- a/mes/module/nyacc/lang/c99/parser.mes -+++ b/mes/module/nyacc/lang/c99/parser.mes -@@ -32,6 +32,7 @@ - - (mes-use-module (nyacc lex)) - (mes-use-module (nyacc parse)) -+(mes-use-module (nyacc lang sx-util)) - (mes-use-module (nyacc lang util)) - (mes-use-module (nyacc lang c99 cpp)) - -diff --git a/mes/module/nyacc/lang/sx-util.mes b/mes/module/nyacc/lang/sx-util.mes -new file mode 100644 -index 00000000..41ac5b4a ---- /dev/null -+++ b/mes/module/nyacc/lang/sx-util.mes -@@ -0,0 +1,27 @@ -+;;; -*-scheme-*- -+ -+;;; GNU Mes --- Maxwell Equations of Software -+;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen -+;;; -+;;; This file is part of GNU Mes. -+;;; -+;;; GNU Mes is free software; you can redistribute it and/or modify it -+;;; under the terms of the GNU General Public License as published by -+;;; the Free Software Foundation; either version 3 of the License, or (at -+;;; your option) any later version. -+;;; -+;;; GNU Mes is distributed in the hope that it will be useful, but -+;;; WITHOUT ANY WARRANTY; without even the implied warranty of -+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+;;; GNU General Public License for more details. -+;;; -+;;; You should have received a copy of the GNU General Public License -+;;; along with GNU Mes. If not, see . -+ -+;;; Commentary: -+ -+;;; Code: -+ -+(mes-use-module (srfi srfi-1)) -+(mes-use-module (srfi srfi-16)) -+(include-from-path "nyacc/lang/sx-util.scm") -diff --git a/mes/module/nyacc/version.mes b/mes/module/nyacc/version.mes -new file mode 100644 -index 00000000..b9db628e ---- /dev/null -+++ b/mes/module/nyacc/version.mes -@@ -0,0 +1,26 @@ -+;;; -*-scheme-*- -+ -+;;; GNU Mes --- Maxwell Equations of Software -+;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen -+;;; -+;;; This file is part of GNU Mes. -+;;; -+;;; GNU Mes is free software; you can redistribute it and/or modify it -+;;; under the terms of the GNU General Public License as published by -+;;; the Free Software Foundation; either version 3 of the License, or (at -+;;; your option) any later version. -+;;; -+;;; GNU Mes is distributed in the hope that it will be useful, but -+;;; WITHOUT ANY WARRANTY; without even the implied warranty of -+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+;;; GNU General Public License for more details. -+;;; -+;;; You should have received a copy of the GNU General Public License -+;;; along with GNU Mes. If not, see . -+ -+;;; Commentary: -+ -+;;; Code: -+ -+(include-from-path "nyacc/version.scm") -+(display "nyacc version\n") -diff --git a/module/mescc/preprocess.scm b/module/mescc/preprocess.scm -index 9e341cba..c2efb32c 100644 ---- a/module/mescc/preprocess.scm -+++ b/module/mescc/preprocess.scm -@@ -26,9 +26,44 @@ - #:use-module (srfi srfi-1) - #:use-module (srfi srfi-26) - #:use-module (nyacc lang c99 parser) -+ #:use-module (nyacc lang c99 parser) -+ #:use-module (nyacc version) - #:use-module (mes guile) - #:export (c99-input->ast)) - -+(format (current-error-port) "*nyacc-version*=~a\n" *nyacc-version*) -+;; list of which rules you want progress reported -+(define need-progress -+ (assoc-ref -+ '(("0.85.3" (1 2 3)) -+ ("0.86.0" (1 2 3))) -+ *nyacc-version*)) -+ -+(define (progress o) -+ (when (and o (getenv "NYACC_DEBUG")) -+ (display " :" (current-error-port)) -+ (display o (current-error-port)) -+ (display "\n" (current-error-port)))) -+ -+(define (insert-progress-monitors act-v len-v) -+ (let ((n (vector-length act-v))) -+ (let loop ((ix 0)) -+ (when (< ix n) -+ (if (memq ix need-progress) -+ (vector-set -+ act-v ix -+ (lambda args -+ (progress (list-ref args (1- (vector-ref len-v ix)))) -+ (apply (vector-ref act-v ix) args)))) -+ (loop (1+ ix)))))) -+ -+(cond-expand -+ (guile -+ (insert-progress-monitors (@@ (nyacc lang c99 parser) c99-act-v) -+ (@@ (nyacc lang c99 parser) c99-len-v))) -+ (mes -+ (insert-progress-monitors c99-act-v c99-len-v))) -+ - (define (logf port string . rest) - (apply format (cons* port string rest)) - (force-output port) --- -2.18.0 - -- cgit 1.4.1