[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-scsh ChangeLog Makefile.am README c...
From: |
Gary Houston |
Subject: |
guile/guile-scsh ChangeLog Makefile.am README c... |
Date: |
Sun, 29 Oct 2000 11:53:24 -0800 |
CVSROOT: /cvs
Module name: guile
Changes by: Gary Houston <address@hidden> 00/10/29 11:53:23
Modified files:
guile-scsh : ChangeLog Makefile.am README char-set.scm
defrec.scm errno.scm here.scm init.scm
jar-defrecord.scm loophole.scm rdelim.scm
rw.scm
guile-scsh/lib : string-lib.scm
guile-scsh/rx : cond-package.scm let-match.scm oldfuns.scm
parse.scm posixstr.scm re-fold.scm re-high.scm
re-low.scm re-subst.scm re-syntax.scm re.scm
rx-lib.scm simp.scm spencer.scm
Added files:
guile-scsh : USAGE ascii.scm define-foreign-syntax.scm
features.scm make-module-list primitives.scm
reading.scm
Log message:
2000-10-29 Gary Houston <address@hidden>
* rx/rx-lib.scm: define module (scsh rx rx-lib).
* rx/parse.scm: define module (scsh rx parse).
* rx/re-syntax.scm: define module (scsh rx re-syntax)
* rx/re-fold.scm: define module (scsh rx re-fold).
* errno.scm: define module (scsh errno).
* rw.scm: define module (scsh rw).
* rx/re-subst.scm: define module (scsh rx re-subst).
* rx/oldfuns.scm: define module (scsh rx oldfuns).
* init.scm: load new modules.
2000-10-28 Gary Houston <address@hidden>
* rx/re-syntax.scm (expand-rx): take rx and if-sre-form definitions
from init.scm.
2000-10-27 Gary Houston <address@hidden>
* rx/re-high.scm: define module (scsh rx re-high).
* rx/spencer.scm: define module (scsh rx spencer).
* lib/string-lib.scm: define module (scsh lib string-lib).
don't redefine string-null? or substring.
* rx/simp.scm: define module (scsh rx simp).
* rx/posixstr.scm: define module (scsh rx posixstr).
* rx/let-match.scm: define module (scsh rx let-match).
* init.scm: don't load rxspencer module. do it in rx/re-low.scm.
load new modules.
2000-10-25 Gary Houston <address@hidden>
* rx/cond-package.scm: define module (scsh rx cond-package).
* rx/re.scm: define module (scsh rx re)
* rx/re-low.scm: define module (scsh rx re-low).
* defrec.scm: define module: (scsh defrec).
* init.scm: load new modules.
2000-10-22 Gary Houston <address@hidden>
* USAGE: new file, partly generated from make-module-list output.
* make-module-list: new script: create the module exports list
for the USAGE file.
* Makefile.am (EXTRA_DIST): add USAGE, make-module-list.
* rdelim.scm: define module (scsh rdelim).
* init.scm: load new module.
2000-10-16 Gary Houston <address@hidden>
* jar-defrecord.scm: define module (scsh jar-defrecord).
* char-set.scm: define module (scsh char-set).
* here.scm: define module (scsh here).
* reading.scm: new file. take reading-error from init.scm.
define module (scsh reading).
* primitives.scm: new file. take unspecific from init.scm.
define module (scsh primitives).
* features.scm: new file. take immutable?, make-immutable! dummy
defs from init.scm. define module (scsh features).
* ascii.scm: new file. take ascii->char, char->ascii from init.scm.
define module (scsh ascii).
* define-foreign-syntax.scm: new file. take dummy definitions for
foreign-source and define-foreign from init.scm. define
(scsh define-foreign-syntax) module.
* init.scm: use new modules.
CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/USAGE.diff?r1=NONE&r2=1.1
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/ascii.scm.diff?r1=NONE&r2=1.1
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/define-foreign-syntax.scm.diff?r1=NONE&r2=1.1
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/features.scm.diff?r1=NONE&r2=1.1
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/make-module-list.diff?r1=NONE&r2=1.1
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/primitives.scm.diff?r1=NONE&r2=1.1
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/reading.scm.diff?r1=NONE&r2=1.1
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/ChangeLog.diff?r1=1.41&r2=1.42
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/Makefile.am.diff?r1=1.17&r2=1.18
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/README.diff?r1=1.8&r2=1.9
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/char-set.scm.diff?r1=1.2&r2=1.3
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/defrec.scm.diff?r1=1.3&r2=1.4
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/errno.scm.diff?r1=1.3&r2=1.4
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/here.scm.diff?r1=1.2&r2=1.3
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/init.scm.diff?r1=1.32&r2=1.33
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/jar-defrecord.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/loophole.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/rdelim.scm.diff?r1=1.4&r2=1.5
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/rw.scm.diff?r1=1.6&r2=1.7
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/lib/string-lib.scm.diff?r1=1.2&r2=1.3
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/rx/cond-package.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/rx/let-match.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/rx/oldfuns.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/rx/parse.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/rx/posixstr.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/rx/re-fold.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/rx/re-high.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/rx/re-low.scm.diff?r1=1.2&r2=1.3
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/rx/re-subst.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/rx/re-syntax.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/rx/re.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/rx/rx-lib.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/rx/simp.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/rx/spencer.scm.diff?r1=1.1&r2=1.2
Patches:
Index: guile/guile-scsh/ChangeLog
diff -u guile/guile-scsh/ChangeLog:1.41 guile/guile-scsh/ChangeLog:1.42
--- guile/guile-scsh/ChangeLog:1.41 Sun Oct 15 13:14:50 2000
+++ guile/guile-scsh/ChangeLog Sun Oct 29 11:53:23 2000
@@ -1,3 +1,76 @@
+2000-10-29 Gary Houston <address@hidden>
+
+ * rx/rx-lib.scm: define module (scsh rx rx-lib).
+ * rx/parse.scm: define module (scsh rx parse).
+ * rx/re-syntax.scm: define module (scsh rx re-syntax)
+ * rx/re-fold.scm: define module (scsh rx re-fold).
+ * errno.scm: define module (scsh errno).
+ * rw.scm: define module (scsh rw).
+ * rx/re-subst.scm: define module (scsh rx re-subst).
+ * rx/oldfuns.scm: define module (scsh rx oldfuns).
+ * init.scm: load new modules.
+
+2000-10-28 Gary Houston <address@hidden>
+
+ * rx/re-syntax.scm (expand-rx): take rx and if-sre-form definitions
+ from init.scm.
+
+2000-10-27 Gary Houston <address@hidden>
+
+ * rx/re-high.scm: define module (scsh rx re-high).
+ * rx/spencer.scm: define module (scsh rx spencer).
+ * lib/string-lib.scm: define module (scsh lib string-lib).
+ don't redefine string-null? or substring.
+ * rx/simp.scm: define module (scsh rx simp).
+ * rx/posixstr.scm: define module (scsh rx posixstr).
+ * rx/let-match.scm: define module (scsh rx let-match).
+ * init.scm: don't load rxspencer module. do it in rx/re-low.scm.
+ load new modules.
+
+2000-10-25 Gary Houston <address@hidden>
+
+ * rx/cond-package.scm: define module (scsh rx cond-package).
+ * rx/re.scm: define module (scsh rx re)
+ * rx/re-low.scm: define module (scsh rx re-low).
+ * defrec.scm: define module: (scsh defrec).
+ * init.scm: load new modules.
+
+2000-10-22 Gary Houston <address@hidden>
+
+ * USAGE: new file, partly generated from make-module-list output.
+ * make-module-list: new script: create the module exports list
+ for the USAGE file.
+ * Makefile.am (EXTRA_DIST): add USAGE, make-module-list.
+
+ * rdelim.scm: define module (scsh rdelim).
+ * init.scm: load new module.
+
+2000-10-16 Gary Houston <address@hidden>
+
+ * jar-defrecord.scm: define module (scsh jar-defrecord).
+
+ * char-set.scm: define module (scsh char-set).
+
+ * here.scm: define module (scsh here).
+
+ * reading.scm: new file. take reading-error from init.scm.
+ define module (scsh reading).
+
+ * primitives.scm: new file. take unspecific from init.scm.
+ define module (scsh primitives).
+
+ * features.scm: new file. take immutable?, make-immutable! dummy
+ defs from init.scm. define module (scsh features).
+
+ * ascii.scm: new file. take ascii->char, char->ascii from init.scm.
+ define module (scsh ascii).
+
+ * define-foreign-syntax.scm: new file. take dummy definitions for
+ foreign-source and define-foreign from init.scm. define
+ (scsh define-foreign-syntax) module.
+
+ * init.scm: use new modules.
+
2000-10-15 Gary Houston <address@hidden>
* bitwise.scm: define module (scsh bitwise).
Index: guile/guile-scsh/Makefile.am
diff -u guile/guile-scsh/Makefile.am:1.17 guile/guile-scsh/Makefile.am:1.18
--- guile/guile-scsh/Makefile.am:1.17 Sat Oct 11 13:53:22 1997
+++ guile/guile-scsh/Makefile.am Sun Oct 29 11:53:23 2000
@@ -15,4 +15,4 @@
syntax.scm syntax-helpers.scm syscalls.scm \
time.scm utilities.scm weak.scm
-EXTRA_DIST = $(scsh_DATA) INCOMPAT
+EXTRA_DIST = $(scsh_DATA) INCOMPAT USAGE make-module-list
Index: guile/guile-scsh/README
diff -u guile/guile-scsh/README:1.8 guile/guile-scsh/README:1.9
--- guile/guile-scsh/README:1.8 Sun Oct 15 13:14:50 2000
+++ guile/guile-scsh/README Sun Oct 29 11:53:23 2000
@@ -11,8 +11,6 @@
it doesn't.
2) The guilerxspencer module, available from http://arglist.com/guile/
-(FIXME: use modules, so that guilerxspencer is only needed if using
-the scsh regex stuff).
Please send bug reports to:
@@ -24,54 +22,17 @@
make
make install
-See the INSTALL file for more details.
-
For now, the configure prefix must match the one where Guile is installed.
(FIXME: use guile-config to find the installation directory).
+See the INSTALL file for more details.
+
Alternatively it's sufficient to rename (or link) the main guile-scsh
directory to "scsh" and place it somewhere in the guile load path (type
%load-path in an interactive Guile session to see the current
setting).
-
-The entire package can be loaded into a running Guile interpreter with:
-
-(load-from-path "scsh/init")
-
-Note that this will clobber various Guile definitions. It would be
-more useful to be able to import parts of scsh individually using the
-Guile module system, but this work is not yet complete. At present
-the following modules are defined:
-
-(scsh alt-syntax): define-syntax syntax-rules
-;; not compatible with (ice-9 syncase)
-
-(scsh receive): receive
-;; compatible with (ice-9 receive), which is not available in Guile 1.4
-
-(scsh module-system): define-structure structure-ref
-;; dummy definitions.
-
-(scsh let-opt): let-optionals let-optionals* :optional
-;; not compatible with (ice-9 optargs).
-
-(scsh loophole): loophole
-;; dummy definition.
-
-(scsh signals): syntax-error
-
-(scsh syntax-helpers): transcribe-process-form
-
-(scsh bitwise): arithmetic-shift bitwise-not bitwise-and bitwise-ior
- bitwise-xor
-
-(scsh utilities): del delete filter first first? nth fold fold-right
- any every mapv mapv! vector-every? copy-vector initialize-vector
- vector-append vfold vfold-right check-arg conjoin disjoin negate
- compose call/cc deprecated-proc deposit-bit-field
- real->exact-integer)
-;; "delete" is incompatile with guile primitive.
+See the USAGE file for notes on using the library.
FIXME: delete the autogenerated files from the repository and remove
the text below.
Index: guile/guile-scsh/char-set.scm
diff -u guile/guile-scsh/char-set.scm:1.2 guile/guile-scsh/char-set.scm:1.3
--- guile/guile-scsh/char-set.scm:1.2 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/char-set.scm Sun Oct 29 11:53:23 2000
@@ -39,6 +39,84 @@
;;; char-set-delete cset char -> cset
;;; char-set-delete! cset char -> cset
+(define-module (scsh char-set)
+ :use-module (scsh ascii)
+ :use-module (scsh utilities)
+ :use-module (scsh jar-defrecord))
+
+(export char:newline char:tab char:page char:return char:space char:vtab
+ char-ascii?
+
+ char-set?
+ char-set-copy
+ char-set=
+ char-set<=
+ char-set-size
+
+ char-set-adjoin char-set-delete
+ char-set-adjoin! char-set-delete!
+ char-set-for-each
+ char-set-fold reduce-char-set
+
+ char-set
+ chars->char-set
+ string->char-set
+ ascii-range->char-set
+ predicate->char-set
+ ->char-set
+
+ char-set-members
+ char-set-contains?
+
+ char-set-every?
+ char-set-any
+
+ char-set-invert
+ char-set-union
+ char-set-intersection
+ char-set-difference
+
+ char-set-invert!
+ char-set-union!
+ char-set-intersection!
+ char-set-difference!
+
+ char-set:lower-case
+ char-set:upper-case
+ char-set:alphabetic
+ char-set:numeric
+ char-set:alphanumeric
+ char-set:graphic
+ char-set:printing
+ char-set:whitespace
+ char-set:blank
+ char-set:control
+ char-set:punctuation
+ char-set:hex-digit
+ char-set:ascii
+ char-set:empty
+ char-set:full
+
+ char-lower-case?
+ char-upper-case?
+ char-alphabetic?
+ char-numeric?
+ char-alphanumeric?
+ char-graphic?
+ char-printing?
+ char-whitespace?
+ char-blank?
+ char-control?
+ char-punctuation?
+ char-hex-digit?
+ char-ascii?
+
+ ;; This is not properly part of the interface,
+ ;; and should be moved to an internals interface --
+ ;; it is used by rdelim.scm code.
+ char-set:s
+ )
+
(define char:newline (ascii->char 13))
(define char:tab (ascii->char 9))
(define char:vtab (ascii->char 11))
Index: guile/guile-scsh/defrec.scm
diff -u guile/guile-scsh/defrec.scm:1.3 guile/guile-scsh/defrec.scm:1.4
--- guile/guile-scsh/defrec.scm:1.3 Sun Oct 15 13:14:50 2000
+++ guile/guile-scsh/defrec.scm Sun Oct 29 11:53:23 2000
@@ -74,7 +74,15 @@
;;; - Code produced by the macro needs the RECORDS package.
;;; - Macro-expander code needs ERROR-PACKAGE and RECEIVING
-(defmacro define-record-discloser args #f) ;; guile.
+(define-module (scsh defrec)
+ :use-module (scsh alt-syntax)
+ :use-module (scsh receive)
+ :use-module (scsh utilities)
+)
+(export-syntax define-record-discloser define-record)
+
+;;; added for guile. perhaps use a separate module for rts/record.scm?
+(defmacro define-record-discloser args #f)
(define-syntax define-record
(lambda (form rename compare)
Index: guile/guile-scsh/errno.scm
diff -u guile/guile-scsh/errno.scm:1.3 guile/guile-scsh/errno.scm:1.4
--- guile/guile-scsh/errno.scm:1.3 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/errno.scm Sun Oct 29 11:53:23 2000
@@ -1,5 +1,8 @@
;;; define errno/perm for EPERM etc.
+(define-module (scsh errno))
+;; export list is generated below.
+
(defmacro maybe-define-eno (value)
(let ((scsh-name (string->symbol
(string-append "errno/"
@@ -7,8 +10,9 @@
(let ((str (symbol->string value)))
(substring str 1
(string-length str))))))))
- `(if (defined? ',value)
- (define ,scsh-name ,value))))
+ `(cond ((defined? ',value)
+ (define ,scsh-name ,value)
+ (export ,scsh-name)))))
(maybe-define-eno E2BIG)
(maybe-define-eno EACCES)
@@ -132,5 +136,3 @@
(maybe-define-eno EWOULDBLOCK)
(maybe-define-eno EXDEV)
(maybe-define-eno EXFULL)
-
-(undefine maybe-define-eno)
Index: guile/guile-scsh/here.scm
diff -u guile/guile-scsh/here.scm:1.2 guile/guile-scsh/here.scm:1.3
--- guile/guile-scsh/here.scm:1.2 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/here.scm Sun Oct 29 11:53:23 2000
@@ -71,6 +71,14 @@
;;; encountered before reading the end of the here string, an error is
;;; signalled.
+(define-module (scsh here)
+ :use-module (scsh reading)
+ :use-module (scsh features)
+ :use-module (scsh receive)
+ :use-module (scsh char-set)
+ :use-module (scsh rdelim))
+;; export nothing, just install a read macro.
+
(define (read-here-string port)
(make-immutable!
(let ((delim-char (read-char port)))
Index: guile/guile-scsh/init.scm
diff -u guile/guile-scsh/init.scm:1.32 guile/guile-scsh/init.scm:1.33
--- guile/guile-scsh/init.scm:1.32 Sun Oct 15 13:14:50 2000
+++ guile/guile-scsh/init.scm Sun Oct 29 11:53:23 2000
@@ -1,14 +1,3 @@
-(define (foreign-source . args) #f)
-(defmacro define-foreign args #f)
-
-(define ascii->char integer->char)
-(define char->ascii char->integer)
-(define (make-immutable! thing) thing)
-(define (immutable? thing) #f)
-(define (unspecific) (if #f #f))
-(define (reading-error port message . irritants)
- (apply error message (append irritants (list port))))
-
(use-modules (ice-9 format)
(scsh alt-syntax)
(scsh receive)
@@ -18,13 +7,46 @@
(scsh signals)
(scsh syntax-helpers)
(scsh bitwise)
- (scsh utilities) ;; replaces primitive "delete".
+ (scsh utilities) ; replaces primitive delete.
+ (scsh define-foreign-syntax)
+ (scsh ascii)
+ (scsh features)
+ (scsh primitives)
+ (scsh reading)
+ (scsh jar-defrecord)
+ (scsh char-set)
+ (scsh defrec)
+
+ ;; replaces:
+ ;; string-downcase string-downcase!
+ ;; string-upcase string-upcase! string-index
+ ;; string-fill! string-copy string->list
+ (scsh lib string-lib)
+
+ (scsh errno)
+ (scsh rw)
+
+ (scsh rx re-low)
+ (scsh rx cond-package)
+ (scsh rx let-match)
+ (scsh rx re) ; replaces regexp?
+ (scsh rx spencer)
+ (scsh rx simp)
+ (scsh rx posixstr)
+ (scsh rx re-high)
+ (scsh rx oldfuns)
+ (scsh rx re-subst)
+ (scsh rx re-fold)
+ (scsh rx re-syntax)
+ (scsh rx parse)
+ (scsh rx rx-lib)
+
+ (scsh rdelim)
+ (scsh here)
)
(load-from-path "scsh/scsh-version.scm")
(load-from-path "scsh/fname.scm")
-(load-from-path "scsh/errno.scm")
-(load-from-path "scsh/defrec.scm")
(load-from-path "scsh/enumconst.scm")
(load-from-path "scsh/weak.scm")
(load-from-path "scsh/fluid.scm")
@@ -32,51 +54,18 @@
(load-from-path "scsh/stringcoll.scm")
(load-from-path "scsh/condition.scm")
(load-from-path "scsh/scsh-condition.scm")
-(load-from-path "scsh/jar-defrecord.scm")
-(load-from-path "scsh/char-set.scm")
-(use-modules (regex spencer))
-
-(define guile-regexp? regexp?)
-(load-from-path "scsh/rx/re-low.scm")
-(load-from-path "scsh/rx/re-high.scm")
-(load-from-path "scsh/rx/let-match.scm")
-(load-from-path "scsh/rx/spencer.scm")
-(load-from-path "scsh/rx/oldfuns.scm")
-(load-from-path "scsh/rx/cond-package.scm")
-(load-from-path "scsh/rx/parse.scm")
-(load-from-path "scsh/rx/posixstr.scm")
-(load-from-path "scsh/rx/re-fold.scm")
-(load-from-path "scsh/rx/re-subst.scm")
-(load-from-path "scsh/rx/re-syntax.scm")
-(load-from-path "scsh/rx/rx-lib.scm")
-(load-from-path "scsh/rx/simp.scm")
-(load-from-path "scsh/rx/re.scm")
-
-(define-syntax rx expand-rx)
-(define-syntax if-sre-form
- (lambda (exp r c)
- (if (sre-form? (cadr exp) r c)
- (caddr exp)
- (cadddr exp))))
-
(load-from-path "scsh/lib/ccp.scm")
(load-from-path "scsh/lib/list-lib.scm")
-;; replaces string-downcase, string-downcase!, string-upcase, string-upcase!
-(load-from-path "scsh/lib/string-lib.scm")
-
(load-from-path "scsh/syscalls.scm")
(load-from-path "scsh/syntax.scm")
(load-from-path "scsh/fileinfo.scm")
(load-from-path "scsh/glob.scm")
(load-from-path "scsh/filemtch.scm")
(load-from-path "scsh/filesys.scm")
-(load-from-path "scsh/here.scm")
(load-from-path "scsh/time.scm")
(load-from-path "scsh/newports.scm")
-(load-from-path "scsh/rw.scm")
-(load-from-path "scsh/rdelim.scm")
(load-from-path "scsh/awk.scm")
(load-from-path "scsh/fr.scm")
(load-from-path "scsh/netconst.scm")
Index: guile/guile-scsh/jar-defrecord.scm
diff -u guile/guile-scsh/jar-defrecord.scm:1.1
guile/guile-scsh/jar-defrecord.scm:1.2
--- guile/guile-scsh/jar-defrecord.scm:1.1 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/jar-defrecord.scm Sun Oct 29 11:53:23 2000
@@ -12,6 +12,13 @@
; (y foo-y)
; (z foo-z set-foo-z!))
+;; original file: rts/jar-defrecord.scm.
+;; this should export
+(define-module (scsh jar-defrecord)
+ :use-module (scsh alt-syntax))
+;; define-accessor[s]
+(export-syntax define-record-type define-accessor define-accessors)
+
(define-syntax define-record-type
(syntax-rules ()
((define-record-type ?id ?type
Index: guile/guile-scsh/lib/string-lib.scm
diff -u guile/guile-scsh/lib/string-lib.scm:1.2
guile/guile-scsh/lib/string-lib.scm:1.3
--- guile/guile-scsh/lib/string-lib.scm:1.2 Sun Sep 17 02:03:22 2000
+++ guile/guile-scsh/lib/string-lib.scm Sun Oct 29 11:53:23 2000
@@ -88,6 +88,56 @@
;;; - The R5RS SUBSTRING function is accessed using the Scheme 48
;;; STRUCTURE-REF magic accessor.
+(define-module (scsh lib string-lib)
+ :use-module (scsh alt-syntax)
+ :use-module (scsh receive)
+ :use-module (scsh let-opt)
+ :use-module (scsh char-set)
+)
+(export string-map string-map!
+ string-fold string-unfold
+ string-fold-right string-unfold-right
+ string-tabulate
+ string-for-each string-iter
+ string-every string-any
+ string-compare string-compare-ci
+ substring-compare substring-compare-ci
+ string= string< string> string<= string>= string<>
+ string-ci= string-ci< string-ci> string-ci<= string-ci>= string-ci<>
+ substring= substring<> substring-ci= substring-ci<>
+ substring< substring> substring-ci< substring-ci>
+ substring<= substring>= substring-ci<= substring-ci>=
+ string-upper-case? string-lower-case?
+ capitalize-string capitalize-words string-downcase string-upcase
+ capitalize-string! capitalize-words! string-downcase! string-upcase!
+ string-take string-take-right
+ string-drop string-drop-right
+ string-pad string-pad-right
+ string-trim string-trim-right string-trim-both
+ string-filter string-delete
+ string-index string-index-right string-skip string-skip-right
+ string-prefix-count string-prefix-count-ci
+ string-suffix-count string-suffix-count-ci
+ substring-prefix-count substring-prefix-count-ci
+ substring-suffix-count substring-suffix-count-ci
+ string-prefix? string-prefix-ci?
+ string-suffix? string-suffix-ci?
+ substring-prefix? substring-prefix-ci?
+ substring-suffix? substring-suffix-ci?
+ substring? substring-ci?
+ string-fill! string-copy! string-copy ; substring
+ string-reverse string-reverse! reverse-list->string
+ string->list
+ string-concat string-concat/shared string-append/shared
+ xsubstring string-xcopy!
+ ; string-null?
+ join-strings
+
+ make-kmp-restart-vector
+ parse-final-start+end
+ parse-start+end
+ check-substring-spec
+)
;;; Support for START/END substring specs
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -146,10 +196,12 @@
;;; the code in this file uses the simple SUBSTRINGX, so you can
;;; easily port this code.
-(define substringx (structure-ref scheme substring)) ; Simple R5RS SUBSTRING
+;; guile's substring has optional 2nd arg.
+;(define substringx (structure-ref scheme substring)) ; Simple R5RS SUBSTRING
+(define substringx substring)
-(define (substring s start . maybe-end) ; Our SUBSTRING
- (substringx s start (:optional maybe-end (string-length s))))
+;(define (substring s start . maybe-end) ; Our SUBSTRING
+; (substringx s start (:optional maybe-end (string-length s))))
(define (string-copy s . maybe-start+end)
(let-start+end (start end) string-copy s maybe-start+end
@@ -1101,7 +1153,8 @@
;;; (string-reverse! s [start end])
;;; (string-null? s)
-(define (string-null? s) (zero? (string-length s)))
+; guile's got this.
+;(define (string-null? s) (zero? (string-length s)))
(define (string-reverse s . maybe-start+end)
(let-start+end (start end) string-reverse s maybe-start+end
Index: guile/guile-scsh/loophole.scm
diff -u guile/guile-scsh/loophole.scm:1.1 guile/guile-scsh/loophole.scm:1.2
--- guile/guile-scsh/loophole.scm:1.1 Sun Oct 15 13:14:50 2000
+++ guile/guile-scsh/loophole.scm Sun Oct 29 11:53:23 2000
@@ -4,6 +4,8 @@
(define-module (scsh loophole)
:use-module (scsh alt-syntax))
+(export-syntax loophole)
+
(define-syntax loophole
(syntax-rules ()
((loophole ?type ?form)
Index: guile/guile-scsh/rdelim.scm
diff -u guile/guile-scsh/rdelim.scm:1.4 guile/guile-scsh/rdelim.scm:1.5
--- guile/guile-scsh/rdelim.scm:1.4 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/rdelim.scm Sun Oct 29 11:53:23 2000
@@ -4,27 +4,36 @@
;;; read-line is redefined below.
;;; skip-char-set isn't mentioned in the scsh manual, but is used in fr.scm.
+(define-module (scsh rdelim)
+ :use-module (scsh char-set)
+ :use-module (scsh rx re-high)
+ :use-module (scsh rx re)
+ :use-module (scsh rx re-syntax)
+)
+
+(export read-line read-paragraph read-delimited read-delimited! skip-char-set)
+
(if (not (defined? 'guile-read-delimited))
(define guile-read-delimited read-delimited))
-(set! read-delimited
- (lambda (delims . args)
- (let ((rv
- (apply guile-read-delimited (list->string
- (char-set-members delims)) args)))
- (if (pair? rv)
- (values (car rv) (cdr rv))
- rv))))
+(define (read-delimited delims . args)
+ (let ((rv
+ (apply guile-read-delimited (list->string
+ (char-set-members delims)) args)))
+ (if (pair? rv)
+ (values (car rv) (cdr rv))
+ rv)))
+
(if (not (defined? 'guile-read-delimited!))
(define guile-read-delimited! read-delimited!))
-(set! read-delimited!
- (lambda (delims . args)
- (let ((rv
- (apply guile-read-delimited! (list->string
- (char-set-members delims)) args)))
- (if (pair? rv)
- (values (car rv) (cdr rv))
- rv))))
+
+(define (read-delimited! delims . args)
+ (let ((rv
+ (apply guile-read-delimited! (list->string
+ (char-set-members delims)) args)))
+ (if (pair? rv)
+ (values (car rv) (cdr rv))
+ rv)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; These procedures run their inner I/O loop in a C primitive, so they
Index: guile/guile-scsh/rw.scm
diff -u guile/guile-scsh/rw.scm:1.6 guile/guile-scsh/rw.scm:1.7
--- guile/guile-scsh/rw.scm:1.6 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/rw.scm Sun Oct 29 11:53:23 2000
@@ -3,6 +3,14 @@
;;; Note: read ops should check to see if their string args are mutable.
+(define-module (scsh rw)
+ :use-module (scsh errno)
+ :use-module (scsh let-opt)
+)
+(export bogus-substring-spec? read-string!/partial read-string/partial
+ read-string! read-string write-string write-string/partial)
+
+
(define (bogus-substring-spec? s start end)
(or (< start 0)
(< (string-length s) end)
@@ -136,4 +144,4 @@
(start 0)
(end (string-length s)))
(generic-write-string s start end
- uniform-array-write fd/port)))
+ uniform-array-write fd/port)))
Index: guile/guile-scsh/rx/cond-package.scm
diff -u guile/guile-scsh/rx/cond-package.scm:1.1
guile/guile-scsh/rx/cond-package.scm:1.2
--- guile/guile-scsh/rx/cond-package.scm:1.1 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/rx/cond-package.scm Sun Oct 29 11:53:23 2000
@@ -1,3 +1,9 @@
+(define-module (scsh rx cond-package)
+ :use-module (scsh module-system)
+ :use-module (scsh alt-syntax))
+(export-syntax define-simple-syntax when unless ? switchq switch prog0 land*)
+(export %switch %switchq)
+
(define-structure conditionals
(export (define-simple-syntax :syntax)
(when :syntax)
Index: guile/guile-scsh/rx/let-match.scm
diff -u guile/guile-scsh/rx/let-match.scm:1.1
guile/guile-scsh/rx/let-match.scm:1.2
--- guile/guile-scsh/rx/let-match.scm:1.1 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/rx/let-match.scm Sun Oct 29 11:53:23 2000
@@ -1,5 +1,10 @@
;;; These are some macros to support using regexp matching.
+(define-module (scsh rx let-match)
+ :use-module (scsh module-system)
+ :use-module (scsh alt-syntax))
+(export-syntax let-match if-match match-cond)
+
(define-structure let-match-package
(export (let-match :syntax)
(if-match :syntax)
Index: guile/guile-scsh/rx/oldfuns.scm
diff -u guile/guile-scsh/rx/oldfuns.scm:1.1 guile/guile-scsh/rx/oldfuns.scm:1.2
--- guile/guile-scsh/rx/oldfuns.scm:1.1 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/rx/oldfuns.scm Sun Oct 29 11:53:23 2000
@@ -2,6 +2,12 @@
;;; regexps over to SREs. They are retained for backwards compatibility.
;;; -Olin 8/98
+(define-module (scsh rx oldfuns)
+ :use-module (scsh rx re)
+ :use-module (scsh rx spencer)
+)
+(export ->regexp)
+
;(define (string-match re str . maybe-start)
; (apply regexp-search (->regexp re) str maybe-start))
Index: guile/guile-scsh/rx/parse.scm
diff -u guile/guile-scsh/rx/parse.scm:1.1 guile/guile-scsh/rx/parse.scm:1.2
--- guile/guile-scsh/rx/parse.scm:1.1 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/rx/parse.scm Sun Oct 29 11:53:23 2000
@@ -44,6 +44,18 @@
;;; -- the expander instead produces Scheme ADT constructors to build
;;; the regexp at run-time.
+(define-module (scsh rx parse)
+ :use-module (scsh utilities)
+ :use-module (scsh char-set)
+ :use-module (scsh receive)
+ :use-module (scsh ascii)
+ :use-module (scsh rx re-low)
+ :use-module (scsh rx re)
+ :use-module (scsh rx cond-package)
+ :use-module (scsh rx spencer)
+)
+(export static-regexp? sre->regexp parse-sre parse-sres regexp->scheme
+ char-set->in-pair)
;;; Parser
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Index: guile/guile-scsh/rx/posixstr.scm
diff -u guile/guile-scsh/rx/posixstr.scm:1.1
guile/guile-scsh/rx/posixstr.scm:1.2
--- guile/guile-scsh/rx/posixstr.scm:1.1 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/rx/posixstr.scm Sun Oct 29 11:53:23 2000
@@ -53,6 +53,18 @@
;;; Multiple-value return: VALUES RECEIVE CALL-WITH-VALUES
;;; SORT-LIST
+(define-module (scsh rx posixstr)
+ :use-module (scsh receive)
+ :use-module (scsh utilities)
+ :use-module (scsh char-set)
+ :use-module (scsh ascii)
+ :use-module (scsh rx re)
+ :use-module (scsh rx simp)
+ :use-module (scsh rx cond-package)
+ :use-module (scsh rx parse)
+ :use-module (scsh lib string-lib)
+)
+(export regexp->posix-string)
;;; Useful little utility -- pad vector V with
;;; PRE initial and POST following #f's.
Index: guile/guile-scsh/rx/re-fold.scm
diff -u guile/guile-scsh/rx/re-fold.scm:1.1 guile/guile-scsh/rx/re-fold.scm:1.2
--- guile/guile-scsh/rx/re-fold.scm:1.1 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/rx/re-fold.scm Sun Oct 29 11:53:23 2000
@@ -38,6 +38,14 @@
;;; where Ji is the index of the start of NMi, MTCHi is a match value
;;; describing Mi, and Q is the index of the beginning of NMlast.
+(define-module (scsh rx re-fold)
+ :use-module (scsh let-opt)
+ :use-module (scsh rx cond-package)
+ :use-module (scsh rx re-low)
+ :use-module (scsh rx re-high)
+)
+(export regexp-fold regexp-fold-right regexp-for-each)
+
(define (regexp-fold re kons knil s . maybe-finish+start)
(let-optionals maybe-finish+start ((finish (lambda (i x) x))
(start 0))
Index: guile/guile-scsh/rx/re-high.scm
diff -u guile/guile-scsh/rx/re-high.scm:1.1 guile/guile-scsh/rx/re-high.scm:1.2
--- guile/guile-scsh/rx/re-high.scm:1.1 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/rx/re-high.scm Sun Oct 29 11:53:23 2000
@@ -1,6 +1,15 @@
;;; Regular expression matching for scsh
;;; Copyright (c) 1998 by Olin Shivers.
+(define-module (scsh rx re-high)
+ :use-module (scsh receive)
+ :use-module (scsh let-opt)
+ :use-module (scsh rx cond-package)
+ :use-module (scsh rx re-low)
+ :use-module (scsh rx re)
+ :use-module (scsh rx posixstr)
+)
+(export compile-regexp regexp-search regexp-search?)
;;; Translates the re to a Posix string, and returns a CRE record,
;;; but doesn't actually compile the Posix string into a C regex_t struct.
Index: guile/guile-scsh/rx/re-low.scm
diff -u guile/guile-scsh/rx/re-low.scm:1.2 guile/guile-scsh/rx/re-low.scm:1.3
--- guile/guile-scsh/rx/re-low.scm:1.2 Thu Oct 12 11:58:28 2000
+++ guile/guile-scsh/rx/re-low.scm Sun Oct 29 11:53:23 2000
@@ -1,6 +1,16 @@
;;; Regular expression matching for scsh
;;; Copyright (c) 1994 by Olin Shivers.
+(define-module (scsh rx re-low)
+ :use-module (regex spencer)
+ :use-module (scsh define-foreign-syntax)
+ :use-module (scsh defrec)
+ :use-module (scsh let-opt)
+ :use-module (scsh utilities)
+)
+(export match:start match:end match:substring)
+(export new-cre cre-search cre-search? cre:string cre:tvec)
+
(foreign-source
"/* Make sure foreign-function stubs interface to the C funs correctly: */"
"#include <sys/types.h>"
Index: guile/guile-scsh/rx/re-subst.scm
diff -u guile/guile-scsh/rx/re-subst.scm:1.1
guile/guile-scsh/rx/re-subst.scm:1.2
--- guile/guile-scsh/rx/re-subst.scm:1.1 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/rx/re-subst.scm Sun Oct 29 11:53:23 2000
@@ -9,6 +9,15 @@
;;; a circular dependency in the modules: scsh-level-0 needs the regexp
;;; package which needs WRITE-STRING, which comes from the regexp package.
+(define-module (scsh rx re-subst)
+ :use-module (scsh utilities)
+ :use-module (scsh rw)
+ :use-module (scsh lib string-lib)
+ :use-module (scsh rx re-low)
+ :use-module (scsh rx re-high)
+)
+(export regexp-substitute)
+
(define (regexp-substitute port match . items)
(let* ((str (regexp-match:string match))
(sv (regexp-match:start match))
Index: guile/guile-scsh/rx/re-syntax.scm
diff -u guile/guile-scsh/rx/re-syntax.scm:1.1
guile/guile-scsh/rx/re-syntax.scm:1.2
--- guile/guile-scsh/rx/re-syntax.scm:1.1 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/rx/re-syntax.scm Sun Oct 29 11:53:23 2000
@@ -6,6 +6,16 @@
;;; Is the form an SRE expression?
;;; We only shallowly check the initial keyword of a compound form.
+(define-module (scsh rx re-syntax)
+ :use-module (scsh utilities)
+ :use-module (scsh alt-syntax)
+ :use-module (scsh rx simp)
+ :use-module (scsh rx parse)
+ :use-module (scsh rx re-high)
+)
+(export sre-form? expand-rx)
+(export-syntax if-sre-form rx)
+
(define (sre-form? exp r same?) ; An SRE is
(let ((kw? (lambda (x kw) (same? x (r kw)))))
(or (string? exp) ; "foo"
@@ -81,6 +91,11 @@
;;; (caddr exp)
;;; (cadddr exp))))
+(define-syntax if-sre-form
+ (lambda (exp r c)
+ (if (sre-form? (cadr exp) r c)
+ (caddr exp)
+ (cadddr exp))))
;;; (RX re ...)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -96,6 +111,7 @@
(regexp->scheme re r)))
+(define-syntax rx expand-rx)
;(define-syntax rx (syntax-rules () ((rx stuff ...) (really-rx stuff ...))))
;(define-syntax really-rx
Index: guile/guile-scsh/rx/re.scm
diff -u guile/guile-scsh/rx/re.scm:1.1 guile/guile-scsh/rx/re.scm:1.2
--- guile/guile-scsh/rx/re.scm:1.1 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/rx/re.scm Sun Oct 29 11:53:23 2000
@@ -14,6 +14,44 @@
;;; PRE-DSM come first as dead submatches, then the regexp BODY with its
;;; submatches, then POST-DSM as dead submatches.
+(define-module (scsh rx re)
+ :use-module (scsh defrec)
+ :use-module (scsh jar-defrecord)
+ :use-module (scsh rx re-low)
+ :use-module (scsh receive)
+ :use-module (scsh utilities)
+ :use-module (scsh char-set)
+ :use-module (scsh rx cond-package)
+ :use-module (scsh lib string-lib))
+
+(export %make-re-dsm %make-re-dsm/posix re-dsm? re-dsm:body re-dsm:pre-dsm
+ re-dsm:tsm re-dsm:posix set-re-dsm:posix re-dsm:post-dsm re-dsm
+ open-dsm)
+(export %make-re-seq %make-re-seq/posix re-seq? re-seq:elts re-seq:tsm
+ re-seq:posix set-re-seq:posix make-re-seq re-seq)
+(export %make-re-choice %make-re-choice/posix re-choice? re-choice:elts
+ re-choice:tsm re-choice:posix set-re-choice:posix make-re-choice
+ re-choice)
+(export %make-re-repeat %make-re-repeat/posix re-repeat? re-repeat:from
+ re-repeat:to re-repeat:body re-repeat:tsm re-repeat:posix
+ set-re-repeat:posix make-re-repeat re-repeat reduce-repeat)
+(export %make-re-submatch %make-re-submatch/posix re-submatch?
+ re-submatch:body re-submatch:pre-dsm re-submatch:tsm re-submatch:posix
+ set-re-submatch:posix re-submatch:post-dsm make-re-submatch
+ re-submatch)
+(export re-string:chars re-string:posix set-re-string:posix re-string
+ re-string? make-re-string make-re-string/posix)
+(export re-trivial re-trivial?)
+(export re-char-set:cset re-char-set:posix set-re-char-set:posix re-char-set?
+ re-char-set make-re-char-set make-re-char-set/posix)
+(export re-empty re-empty?)
+(export re-bos make-re-bos re-bos? re-eos make-re-eos re-eos?)
+(export re-bol make-re-bol re-bol? re-eol make-re-eol re-eol?)
+(export re-bow make-re-bow re-bow? re-eow make-re-eow re-eow?)
+(export re-any re-any? re-nonl regexp? re-tsm re-word flush-submatches
+ map/changed uncase uncase-char-set uncase-string char-set-full?
+ char-set-empty? static-char-class?)
+
(define-record-type re-dsm :re-dsm
(%%make-re-dsm body pre-dsm tsm posix)
re-dsm?
Index: guile/guile-scsh/rx/rx-lib.scm
diff -u guile/guile-scsh/rx/rx-lib.scm:1.1 guile/guile-scsh/rx/rx-lib.scm:1.2
--- guile/guile-scsh/rx/rx-lib.scm:1.1 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/rx/rx-lib.scm Sun Oct 29 11:53:23 2000
@@ -3,6 +3,15 @@
;;; In sexp syntax, a ,<exp> or ,@<exp> form may evaluate to a string, char,
;;; char-set, or regexp value. Coerce one of these to a regexp value.
+(define-module (scsh rx rx-lib)
+ :use-module (scsh utilities)
+ :use-module (scsh char-set)
+ :use-module (scsh ascii)
+ :use-module (scsh rx re)
+ :use-module (scsh rx cond-package)
+)
+(export coerce-dynamic-regexp spec->char-set)
+
(define (coerce-dynamic-regexp x)
(? ((string? x) (make-re-string x))
((char? x) (make-re-string (string x)))
Index: guile/guile-scsh/rx/simp.scm
diff -u guile/guile-scsh/rx/simp.scm:1.1 guile/guile-scsh/rx/simp.scm:1.2
--- guile/guile-scsh/rx/simp.scm:1.1 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/rx/simp.scm Sun Oct 29 11:53:23 2000
@@ -31,6 +31,14 @@
;;; This is useful because the RX macro can build such a regexp as part
;;; of its expansion process.
+(define-module (scsh rx simp)
+ :use-module (scsh receive)
+ :use-module (scsh rx re)
+ :use-module (scsh rx cond-package)
+ :use-module (scsh char-set)
+)
+(export simplify-regexp)
+
(define (simplify-regexp re)
(receive (simp-re pre-dsm) (simp-re re)
(re-dsm simp-re pre-dsm (- (re-tsm re) (+ (re-tsm simp-re) pre-dsm)))))
Index: guile/guile-scsh/rx/spencer.scm
diff -u guile/guile-scsh/rx/spencer.scm:1.1 guile/guile-scsh/rx/spencer.scm:1.2
--- guile/guile-scsh/rx/spencer.scm:1.1 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/rx/spencer.scm Sun Oct 29 11:53:23 2000
@@ -5,6 +5,13 @@
;;; Need better error checking on {m,n} brace parsing.
+(define-module (scsh rx spencer)
+ :use-module (scsh receive)
+ :use-module (scsh char-set)
+ :use-module (scsh ascii)
+ :use-module (scsh rx re))
+(export posix-string->regexp)
+
(define (parse-posix-regexp-string s)
(receive (re i) (parse-posix-exp s 0)
(if (= i (string-length s)) re
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- guile/guile-scsh ChangeLog Makefile.am README c...,
Gary Houston <=