A couple of release problems, no real code bugs.

- The LET-MATCH, IF-MATCH, MATCH-COND macros weren't exported,
  and the source wasn't even loaded.
- Similarly, the entire SRE-SYNTAX-TOOLS package wasn't exported.
- The SIMPLIFY-REGEXP proc wasn't exported.

I hacked packages.scm to do the right package defining & exporting.
I also renamed let-match.scm to re-match-syntax.scm and moved the enclosing
module code from the file over to packages.scm.
    -Olin
This commit is contained in:
shivers 2000-02-15 15:49:13 +00:00
parent bdf729c8a4
commit 983662c680
2 changed files with 38 additions and 26 deletions

View File

@ -174,17 +174,19 @@
:boolean))
(sre->regexp (proc (:value) :value))
(regexp->sre (proc (:value) :value))
(simplify-regexp (proc (:value) :value))
)))
(define-structures ((re-level-0 re-level-0-interface)
(re-match-internals re-match-internals-interface)
(re-internals re-internals-interface)
(sre-syntax-tools (export expand-rx static-regexp?
(sre-syntax-tools (export (if-sre-form :syntax)
sre-form?
parse-sre parse-sres
sre->regexp regexp->sre
regexp->scheme)))
regexp->scheme
static-regexp?))
(sre-internal-syntax-tools (export expand-rx)))
(open scsh-utilities
defrec-package
define-foreign-syntax
@ -201,8 +203,16 @@
ascii
string-lib ; string-fold
scheme)
(files re-low re simp re-high
parse posixstr spencer re-syntax)
(begin (define-syntax if-sre-form
(lambda (exp r c)
(if (sre-form? (cadr exp) r c)
(caddr exp)
(cadddr exp)))))
(optimize auto-integrate)
)
@ -235,23 +245,33 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-interface rx-syntax-interface (export (rx :syntax)
(if-sre-form :syntax)))
(define-interface rx-syntax-interface (export (rx :syntax)))
(define-structure rx-syntax rx-syntax-interface
(open re-level-0
char-set-package
rx-lib
scheme)
(for-syntax (open sre-syntax-tools scheme))
(begin (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)))))
(for-syntax (open sre-internal-syntax-tools scheme))
(begin (define-syntax rx expand-rx))
(optimize auto-integrate))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-interface re-match-syntax-interface
(export (let-match :syntax)
(if-match :syntax)
(match-cond :syntax)))
(define-structure re-match-syntax re-match-syntax-interface
(for-syntax (open scheme
signals)) ; For ERROR
(open re-level-0 scheme)
(access signals) ; for ERROR
(files re-match-syntax))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-structure re-old-funs re-old-funs-interface
@ -282,10 +302,15 @@
(compound-interface re-level-0-interface
rx-syntax-interface
re-subst-interface
re-match-syntax-interface
re-folders-interface))
(define-structure re-exports re-exports-interface
(open rx-syntax re-level-0 re-subst re-folders)
(open rx-syntax
re-level-0
re-subst
re-match-syntax
re-folders)
(optimize auto-integrate))

View File

@ -1,17 +1,5 @@
;;; These are some macros to support using regexp matching.
(define-structure regexp-match-syntax
(export (let-match :syntax)
(if-match :syntax)
(match-cond :syntax))
(for-syntax (open scheme
signals)) ; For ERROR
(open scsh scheme)
(access signals) ; for ERROR
(begin
;;; (let-match m mvars body ...)
;;; Bind the vars in MVARS to the match & submatch strings of match data M,
;;; and eval the body forms. #F is allowed in the MVARS list, as a don't-care
@ -118,4 +106,3 @@
(let-match m mvars
body ...))))
clause2 ...))))
))