nyacc: Move (ice-9 syncase) into cond-expand.

* module/nyacc/lalr.scm: Move (ice-9 syncase) into cond-expand.  Fixes
  guile-2 deprecation messages.
* module/nyacc/lang/c99/cpp.scm: Likewise.
* module/nyacc/lang/c99/parser.scm: Likewise.
* module/nyacc/lex.scm: Likewise.
This commit is contained in:
Jan Nieuwenhuizen 2017-03-26 22:27:20 +02:00
parent 43a1774750
commit 1a58dbe3c6
5 changed files with 34 additions and 8 deletions

View file

@ -16,6 +16,13 @@
;;; License along with this library; if not, write to the Free Software ;;; License along with this library; if not, write to the Free Software
;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
(cond-expand
(guile-2)
(guile
(use-modules (ice-9 syncase))
(use-modules (ice-9 optargs)))
(mes))
;; I need to find way to preserve srconf, rrconf after hashify. ;; I need to find way to preserve srconf, rrconf after hashify.
;; compact needs to deal with it ... ;; compact needs to deal with it ...
@ -38,8 +45,6 @@
process-spec process-spec
reserved? reserved?
) )
#:use-module (ice-9 optargs)
#:use-module (ice-9 syncase)
#:use-module ((srfi srfi-1) #:select (fold fold-right remove lset-union #:use-module ((srfi srfi-1) #:select (fold fold-right remove lset-union
lset-intersection lset-difference)) lset-intersection lset-difference))
#:use-module ((srfi srfi-9) #:select (define-record-type)) #:use-module ((srfi srfi-9) #:select (define-record-type))

View file

@ -25,13 +25,18 @@
cpp-expand-text cpp-expand-text
expand-cpp-mref expand-cpp-mref
) )
#:use-module (ice-9 syncase)
#:use-module (nyacc parse) #:use-module (nyacc parse)
#:use-module (nyacc lex) #:use-module (nyacc lex)
#:use-module (nyacc lang util) #:use-module (nyacc lang util)
#:use-module (rnrs arithmetic bitwise) #:use-module (rnrs arithmetic bitwise)
) )
(cond-expand
(guile-2)
(guile
(use-modules (ice-9 syncase)))
(mes))
#| #|
#define #undef #include #if #ifdef #ifndef #else #endif #elif #define #undef #include #if #ifdef #ifndef #else #endif #elif
#line defined #-operator ##-operator #pragma #error #line defined #-operator ##-operator #pragma #error

View file

@ -19,8 +19,6 @@
(define-module (nyacc lang c99 parser) (define-module (nyacc lang c99 parser)
#:export (parse-c parse-c99 def-xdef? std-dict) #:export (parse-c parse-c99 def-xdef? std-dict)
#:use-module (ice-9 optargs)
#:use-module (ice-9 syncase)
#:use-module (nyacc lex) #:use-module (nyacc lex)
#:use-module (nyacc parse) #:use-module (nyacc parse)
#:use-module (nyacc lang util) #:use-module (nyacc lang util)
@ -29,6 +27,13 @@
#:use-module ((sxml xpath) #:select (sxpath)) #:use-module ((sxml xpath) #:select (sxpath))
) )
(cond-expand
(guile-2)
(guile
(use-modules (ice-9 syncase))
(use-modules (ice-9 optargs)))
(mes))
(include-from-path "nyacc/lang/c99/mach.d/c99tab.scm") (include-from-path "nyacc/lang/c99/mach.d/c99tab.scm")
(include-from-path "nyacc/lang/c99/body.scm") (include-from-path "nyacc/lang/c99/body.scm")
(include-from-path "nyacc/lang/c99/mach.d/c99act.scm") (include-from-path "nyacc/lang/c99/mach.d/c99act.scm")

View file

@ -21,10 +21,16 @@
;; for ??? ;; for ???
move-if-changed move-if-changed
fmterr) fmterr)
#:use-module (ice-9 optargs)
#:use-module ((srfi srfi-1) #:select(find)) #:use-module ((srfi srfi-1) #:select(find))
) )
(cond-expand
(guile-2)
(guile
(use-modules (ice-9 optargs))
(use-modules (ice-9 syncase)))
(mes))
;; This is a generic copyright/licence that will be printed in the output ;; This is a generic copyright/licence that will be printed in the output
;; of the examples/nyacc/lang/*/ actions.scm and tables.scm files. ;; of the examples/nyacc/lang/*/ actions.scm and tables.scm files.
(define lang-crn-lic "Copyright (C) 2015,2016 Matthew R. Wette (define lang-crn-lic "Copyright (C) 2015,2016 Matthew R. Wette

View file

@ -49,12 +49,17 @@
like-c-ident? like-c-ident?
filter-mt remove-mt map-mt make-ident-like-p filter-mt remove-mt map-mt make-ident-like-p
c:ws c:if c:ir) c:ws c:if c:ir)
#:use-module (ice-9 optargs)
#:use-module (ice-9 syncase)
#:use-module ((srfi srfi-1) #:select (remove append-reverse)) #:use-module ((srfi srfi-1) #:select (remove append-reverse))
#:use-module (ice-9 pretty-print) #:use-module (ice-9 pretty-print)
) )
(cond-expand
(guile-2)
(guile
(use-modules (ice-9 syncase))
(use-modules (ice-9 optargs)))
(mes))
;; @section Constructing Lexical Analyzers ;; @section Constructing Lexical Analyzers
;; The @code{lex} module provides a set of procedures to build lexical ;; The @code{lex} module provides a set of procedures to build lexical
;; analyzers. The approach is to first build a set of @defn{readers} for ;; analyzers. The approach is to first build a set of @defn{readers} for