[[project @ 2000-10-29 19:53:23 by ghouston] ghouston**20001029195323 Ignore-this: 35faec864d1b6b50bbe8c39fda4cf7a3 2000-10-29 Gary Houston * 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 * rx/re-syntax.scm (expand-rx): take rx and if-sre-form definitions from init.scm. 2000-10-27 Gary Houston * 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 * 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 * 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 * 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. ] addfile ./USAGE addfile ./ascii.scm addfile ./define-foreign-syntax.scm addfile ./features.scm addfile ./make-module-list addfile ./primitives.scm addfile ./reading.scm hunk ./ChangeLog 1 +2000-10-29 Gary Houston + + * 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 + + * rx/re-syntax.scm (expand-rx): take rx and if-sre-form definitions + from init.scm. + +2000-10-27 Gary Houston + + * 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 + + * 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 + + * 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 + + * 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. + hunk ./Makefile.am 18 -EXTRA_DIST = $(scsh_DATA) INCOMPAT +EXTRA_DIST = $(scsh_DATA) INCOMPAT USAGE make-module-list hunk ./README 14 -(FIXME: use modules, so that guilerxspencer is only needed if using -the scsh regex stuff). hunk ./README 25 -See the INSTALL file for more details. - hunk ./README 28 +See the INSTALL file for more details. + hunk ./README 35 -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. hunk ./USAGE 1 +The entire guile-scsh package can be loaded into a running Guile +interpreter with: + +(load-from-path "scsh/init") + +Warning: this will take a while and will clobber various Guile +definitions. + +It's probably more useful to import parts of scsh individually using +the Guile module system, but this is not yet possible for all parts of +the library. + +The remainder of this file lists the modules and the exported symbols +for each. The modules don't necessarily correspond with scsh +structures, since the Guile module system requires a correspondence +between module names and files. It was considered desirable to leave +the scsh file layouts relatively intact, to simplify ungrading to +newer versions of scsh. + +This list was generated with help from the make-module-list script. + +(scsh alt-syntax) +;; not compatible with (ice-9 syncase) +(define-syntax syntax-rules) + +(scsh receive) +;; compatible with (ice-9 receive), which is not available in Guile 1.4 +(receive) + +(scsh module-system) +;; dummy definitions. +(define-structure structure-ref) + +(scsh let-opt) +;; not compatible with (ice-9 optargs). +(let-optionals let-optionals* :optional) + +(scsh loophole) +;; dummy definition. +(loophole) + +(scsh signals) +(syntax-error) + +(scsh syntax-helpers) +(transcribe-process-form) + +(scsh bitwise) +(arithmetic-shift bitwise-not bitwise-and bitwise-ior bitwise-xor) + +(scsh utilities) +;; "delete" is incompatile with guile primitive. +(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) + +(scsh define-foreign-syntax) +;; dummy definitions. +(foreign-source define-foreign) + +(scsh ascii) +(ascii->char char->ascii) + +(scsh features) +(immutable? make-immutable!) + +(scsh primitives) +(unspecific) + +(scsh reading) +(reading-error) + +(scsh jar-defrecord) +(define-record-type define-accessor define-accessors) + +(scsh char-set) +(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? char-set:s) + +(scsh defrec) +(define-record-discloser define-record) + +(scsh lib string-lib) +(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 string-reverse string-reverse! reverse-list->string string->list string-concat string-concat/shared string-append/shared xsubstring string-xcopy! join-strings make-kmp-restart-vector parse-final-start+end parse-start+end check-substring-spec) + +(scsh errno) +;; defines symbols such as errno/perm. +() + +(scsh rw) +(bogus-substring-spec? read-string!/partial read-string/partial read-string! read-string write-string write-string/partial) + +(scsh rx re-low) +(match:start match:end match:substring new-cre cre-search cre-search? cre:string cre:tvec) + +(scsh rx cond-package) +(define-simple-syntax when unless ? switchq switch prog0 land* %switch %switchq) + +(scsh rx let-match) +(let-match if-match match-cond) + +(scsh rx re) +;; redefines regexp? +(%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 %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 %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 %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 %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 re-string:chars re-string:posix set-re-string:posix re-string re-string? make-re-string make-re-string/posix re-trivial re-trivial? 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 re-empty re-empty? re-bos make-re-bos re-bos? re-eos make-re-eos re-eos? re-bol make-re-bol re-bol? re-eol make-re-eol re-eol? re-bow make-re-bow re-bow? re-eow make-re-eow re-eow? 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?) + +(scsh rx spencer) +(posix-string->regexp) + +(scsh rx simp) +(simplify-regexp) + +(scsh rx posixstr) +(regexp->posix-string) + +(scsh rx re-high) +(compile-regexp regexp-search regexp-search?) + +(scsh rx oldfuns) +(->regexp) + +(scsh rx re-subst) +(regexp-substitute) + +(scsh rx re-fold) +(regexp-fold regexp-fold-right regexp-for-each) + +(scsh rx re-syntax) +(sre-form? expand-rx if-sre-form rx) + +(scsh rx parse) +(static-regexp? sre->regexp parse-sre parse-sres regexp->scheme char-set->in-pair) + +(scsh rx rx-lib) +(coerce-dynamic-regexp spec->char-set) + +(scsh rdelim) +;; replaces guile procs: read-line, read-delimited, read-delimited! +(read-line read-paragraph read-delimited read-delimited! skip-char-set) + +(scsh here) +;; exports nothing, but installs a read macro for #< +() + hunk ./ascii.scm 1 +(define-module (scsh ascii)) +(export ascii->char char->ascii) + +;; used in char-set, network, rx/parse, rx/posixstr, rx/rx-lib, rx/spencer, +;; lib/ccp. +(define ascii->char integer->char) +(define char->ascii char->integer) ;; also in glob. hunk ./char-set.scm 42 +(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 + ) + hunk ./define-foreign-syntax.scm 1 +(define-module (scsh define-foreign-syntax)) +(export-syntax foreign-source define-foreign) + +;; used in network redelim rx/re-low, sighandlers, syscalls, time. +(define (foreign-source . args) #f) +(defmacro define-foreign args #f) hunk ./defrec.scm 77 -(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) hunk ./errno.scm 3 +(define-module (scsh errno)) +;; export list is generated below. + hunk ./errno.scm 13 - `(if (defined? ',value) - (define ,scsh-name ,value)))) + `(cond ((defined? ',value) + (define ,scsh-name ,value) + (export ,scsh-name))))) hunk ./errno.scm 139 - -(undefine maybe-define-eno) hunk ./features.scm 1 +(define-module (scsh features)) +(export immutable? make-immutable!) + +(define (make-immutable! thing) thing) + +(define (immutable? thing) #f) hunk ./here.scm 74 +(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. + hunk ./init.scm 1 -(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)))) - hunk ./init.scm 10 - (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) hunk ./init.scm 50 -(load-from-path "scsh/errno.scm") -(load-from-path "scsh/defrec.scm") hunk ./init.scm 57 -(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)))) hunk ./init.scm 61 -;; replaces string-downcase, string-downcase!, string-upcase, string-upcase! -(load-from-path "scsh/lib/string-lib.scm") - hunk ./init.scm 67 -(load-from-path "scsh/here.scm") hunk ./init.scm 69 -(load-from-path "scsh/rw.scm") -(load-from-path "scsh/rdelim.scm") hunk ./jar-defrecord.scm 15 +;; 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) + hunk ./lib/string-lib.scm 91 +(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 +) hunk ./lib/string-lib.scm 199 -(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) hunk ./lib/string-lib.scm 203 -(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)))) hunk ./lib/string-lib.scm 1156 -(define (string-null? s) (zero? (string-length s))) +; guile's got this. +;(define (string-null? s) (zero? (string-length s))) hunk ./loophole.scm 7 +(export-syntax loophole) + hunk ./make-module-list 1 +#!/usr/bin/guile -s +!# + +;; create a list of module exports for the documentation. + +(define files + (map (lambda (sym) + (string-append (symbol->string sym) ".scm")) +;; list of files to be scanned. + '(alt-syntax + receive + module-system + let-opt + loophole + signals + syntax-helpers + bitwise + utilities + define-foreign-syntax + ascii + features + primitives + reading + jar-defrecord + char-set + defrec + lib/string-lib + errno + rw + rx/re-low + rx/cond-package + rx/let-match + rx/re + rx/spencer + rx/simp + rx/posixstr + rx/re-high + rx/oldfuns + rx/re-subst + rx/re-fold + rx/re-syntax + rx/parse + rx/rx-lib + rdelim + here))) + +;; comments + + +;; if expr is a define-module form, return the name of the module +;; e.g., '(scsh alt-syntax). +;; otherwise return #f. +(define (module-name expr) + (if (and (pair? expr) (eq? (car expr) 'define-module)) + (cadr expr) + #f)) + +;; read expressions from a port until a define-module form is found. +;; return the name of the module. +(define (get-module-name port) + (let ((obj (read port))) + (if (eof-object? obj) + (error "EOF when looking for module name") + (or (module-name obj) + (get-module-name port))))) + +;; read expressions from a port until EOF, appending any symbols +;; that appear in top level export or export-syntax forms onto +;; the result list. return the result list. +(define (get-exports port result) + (let ((obj (read port))) + (if (eof-object? obj) + result + (if (and (pair? obj) + (or (eq? (car obj) 'export) + (eq? (car obj) 'export-syntax))) + (get-exports port (append result (cdr obj))) + (get-exports port result))))) + +;; helper for do-file. +(define (do-port port) + (cons (get-module-name port) (get-exports port '()))) + +;; return a pair containing module name and exported symbols for a given +;; file. +(define (get-module-exports file) + (let* ((port (open-input-file file)) + (result (do-port port))) + (close-port port) + result)) + +;; format a pair returned by get-module-exports for the output file. +(define (format-module-exports exports) + (write (car exports)) + (newline) + (write (cdr exports)) + (newline) + (newline)) + +(for-each format-module-exports + (map get-module-exports + files)) + +;; Local Variables: +;; mode:scheme +;; End: hunk ./primitives.scm 1 +(define-module (scsh primitives)) +(export unspecific) + +(define (unspecific) (if #f #f)) hunk ./rdelim.scm 7 +(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) + hunk ./rdelim.scm 18 -(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))) hunk ./rdelim.scm 29 -(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))) hunk ./reading.scm 1 +(define-module (scsh reading)) +(export reading-error) + +(define (reading-error port message . irritants) + (apply error message (append irritants (list port)))) hunk ./rw.scm 6 +(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) + + hunk ./rw.scm 147 - uniform-array-write fd/port))) + uniform-array-write fd/port))) hunk ./rx/cond-package.scm 1 +(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) + hunk ./rx/let-match.scm 3 +(define-module (scsh rx let-match) + :use-module (scsh module-system) + :use-module (scsh alt-syntax)) +(export-syntax let-match if-match match-cond) + hunk ./rx/oldfuns.scm 5 +(define-module (scsh rx oldfuns) + :use-module (scsh rx re) + :use-module (scsh rx spencer) +) +(export ->regexp) + hunk ./rx/parse.scm 47 +(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) hunk ./rx/posixstr.scm 56 +(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) hunk ./rx/re-fold.scm 41 +(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) + hunk ./rx/re-high.scm 4 +(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?) hunk ./rx/re-low.scm 4 +(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) + hunk ./rx/re-subst.scm 12 +(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) + hunk ./rx/re-syntax.scm 9 +(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) + hunk ./rx/re-syntax.scm 94 +(define-syntax if-sre-form + (lambda (exp r c) + (if (sre-form? (cadr exp) r c) + (caddr exp) + (cadddr exp)))) hunk ./rx/re-syntax.scm 114 +(define-syntax rx expand-rx) hunk ./rx/re.scm 17 +(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?) + hunk ./rx/rx-lib.scm 6 +(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) + hunk ./rx/simp.scm 34 +(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) + hunk ./rx/spencer.scm 8 +(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) +