~ chicken-core (chicken-5) 591bc953400af200c4bbfcb76736171f1752f462
commit 591bc953400af200c4bbfcb76736171f1752f462
Author: Evan Hanson <evhan@foldling.org>
AuthorDate: Thu Feb 12 17:44:54 2015 +1300
Commit: Evan Hanson <evhan@foldling.org>
CommitDate: Thu Feb 12 17:44:54 2015 +1300
Convert the irregex unit into a module
diff --git a/README b/README
index 8ea79754..38e27b9a 100644
--- a/README
+++ b/README
@@ -288,13 +288,13 @@
| | |-- chicken.extras.import.so
| | |-- chicken.files.import.so
| | |-- chicken.lolevel.import.so
+ | | |-- chicken.irregex.import.so
| | |-- chicken.ports.import.so
| | |-- chicken.posix.import.so
| | |-- chicken.tcp.import.so
| | |-- chicken.utils.import.so
| | |-- csi.import.so
| | |-- foreign.import.so
- | | |-- irregex.import.so
| | |-- modules.db
| | |-- setup-api.import.so
| | |-- setup-api.so
diff --git a/chicken-install.scm b/chicken-install.scm
index 9560154a..9f7f8b50 100644
--- a/chicken-install.scm
+++ b/chicken-install.scm
@@ -29,13 +29,14 @@
(module main ()
- (import scheme chicken irregex)
+ (import scheme chicken)
(import setup-download setup-api)
(import foreign)
(import chicken.data-structures
chicken.extras
chicken.files
+ chicken.irregex
chicken.ports
chicken.posix
chicken.utils)
@@ -50,6 +51,7 @@
"chicken.data-structures.import.so"
"chicken.extras.import.so"
"chicken.files.import.so"
+ "chicken.irregex.import.so"
"chicken.lolevel.import.so"
"chicken.ports.import.so"
"chicken.posix.import.so"
@@ -59,7 +61,6 @@
"srfi-4.import.so"
"foreign.import.so"
"csi.import.so"
- "irregex.import.so"
"types.db"))
(define-constant +defaults-version+ 1)
diff --git a/chicken-status.scm b/chicken-status.scm
index 4b602f61..62f6c9b2 100644
--- a/chicken-status.scm
+++ b/chicken-status.scm
@@ -30,10 +30,11 @@
(module main ()
(import scheme chicken foreign)
- (import irregex setup-api)
+ (import setup-api)
(import chicken.data-structures
chicken.extras
chicken.files
+ chicken.irregex
chicken.ports
chicken.posix)
diff --git a/chicken-uninstall.scm b/chicken-uninstall.scm
index e4e90212..d9181383 100644
--- a/chicken-uninstall.scm
+++ b/chicken-uninstall.scm
@@ -33,9 +33,9 @@
(import scheme chicken foreign)
(import setup-api)
- (import irregex)
(import chicken.data-structures
chicken.files
+ chicken.irregex
chicken.ports
chicken.posix
chicken.utils)
diff --git a/defaults.make b/defaults.make
index d99865a5..92808c2c 100644
--- a/defaults.make
+++ b/defaults.make
@@ -268,10 +268,10 @@ CHICKEN_PROGRAM_OPTIONS += $(if $(PROFILE_OBJECTS),-profile)
# import libraries
PRIMITIVE_IMPORT_LIBRARIES = chicken srfi-4
-PRIMITIVE_IMPORT_LIBRARIES += foreign csi irregex
+PRIMITIVE_IMPORT_LIBRARIES += foreign csi
PRIMITIVE_IMPORT_LIBRARIES += setup-api setup-download
POSIX_IMPORT_LIBRARY = posix
-DYNAMIC_IMPORT_LIBRARIES = data-structures extras files lolevel ports tcp utils
+DYNAMIC_IMPORT_LIBRARIES = data-structures extras files irregex lolevel ports tcp utils
# targets
diff --git a/distribution/manifest b/distribution/manifest
index cae1947a..f783792f 100644
--- a/distribution/manifest
+++ b/distribution/manifest
@@ -244,6 +244,8 @@ chicken.extras.import.scm
chicken.extras.import.c
chicken.files.import.scm
chicken.files.import.c
+chicken.irregex.import.scm
+chicken.irregex.import.c
chicken.lolevel.import.scm
chicken.lolevel.import.c
chicken.ports.import.scm
@@ -257,9 +259,7 @@ chicken.utils.import.c
foreign.import.scm
foreign.import.c
srfi-4.import.scm
-irregex.import.scm
srfi-4.import.c
-irregex.import.c
csi.import.scm
csi.import.c
setup-download.scm
diff --git a/files.scm b/files.scm
index 685a9542..2beab6d3 100644
--- a/files.scm
+++ b/files.scm
@@ -36,7 +36,7 @@
(declare
(unit files)
- (uses extras irregex data-structures)
+ (uses data-structures extras irregex)
(fixnum)
(disable-interrupts)
(foreign-declare #<<EOF
@@ -61,9 +61,9 @@ EOF
pathname-strip-extension normalize-pathname)
(import scheme chicken foreign)
-(import irregex)
(import chicken.data-structures
- chicken.extras)
+ chicken.extras
+ chicken.irregex)
(include "common-declarations.scm")
diff --git a/irregex.import.scm b/irregex.import.scm
deleted file mode 100644
index a3010cf7..00000000
--- a/irregex.import.scm
+++ /dev/null
@@ -1,73 +0,0 @@
-;;;; irregex.import.scm - import library for "regex" module (irregex API)
-;
-; Copyright (c) 2008-2015, The CHICKEN Team
-; All rights reserved.
-;
-; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
-; conditions are met:
-;
-; Redistributions of source code must retain the above copyright notice, this list of conditions and the following
-; disclaimer.
-; Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
-; disclaimer in the documentation and/or other materials provided with the distribution.
-; Neither the name of the author nor the names of its contributors may be used to endorse or promote
-; products derived from this software without specific prior written permission.
-;
-; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
-; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-; AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
-; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-; OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-; POSSIBILITY OF SUCH DAMAGE.
-
-
-(##sys#register-primitive-module
- 'irregex
- '(irregex
- irregex-apply-match
- irregex-dfa
- irregex-dfa/extract
- irregex-dfa/search
- irregex-extract
- irregex-flags
- irregex-fold
- irregex-fold/chunked
- irregex-lengths
- irregex-match
- irregex-match?
- irregex-match-data?
- irregex-match-end-chunk
- irregex-match-end-index
- irregex-match-names
- irregex-match-num-submatches
- irregex-match-start-chunk
- irregex-match-start-index
- irregex-match-string
- irregex-match-subchunk
- irregex-match-substring
- irregex-match-valid-index?
- irregex-match/chunked
- irregex-names
- irregex-new-matches
- irregex-nfa
- irregex-num-submatches
- irregex-opt
- irregex-quote
- irregex-replace
- irregex-replace/all
- irregex-reset-matches!
- irregex-search
- irregex-search/chunked
- irregex-search/matches
- irregex-split
- irregex?
- make-irregex-chunker
- maybe-string->sre
- sre->irregex
- sre->string
- string->irregex
- string->sre
- ))
diff --git a/irregex.scm b/irregex.scm
index d43a9d35..347bc8a8 100644
--- a/irregex.scm
+++ b/irregex.scm
@@ -25,58 +25,27 @@
-(declare (unit irregex))
-
(declare
+ (unit irregex)
(no-procedure-checks)
- (fixnum)
- (export
- ##sys#glob->regexp
- irregex
- irregex-apply-match
- irregex-dfa
- irregex-dfa/extract
- irregex-dfa/search
- irregex-extract
- irregex-flags
- irregex-fold
- irregex-fold/chunked
- irregex-lengths
- irregex-match
- irregex-match?
- irregex-match-data?
- irregex-match-end-chunk
- irregex-match-end-index
- irregex-match-names
- irregex-match-num-submatches
- irregex-match-start-chunk
- irregex-match-start-index
- irregex-match-subchunk
- irregex-match-substring
- irregex-match-valid-index?
- irregex-match/chunked
- irregex-names
- irregex-new-matches
- irregex-nfa
- irregex-num-submatches
- irregex-opt
- irregex-quote
- irregex-replace
- irregex-replace/all
- irregex-reset-matches!
- irregex-search
- irregex-search/chunked
- irregex-search/matches
- irregex-split
- irregex?
- make-irregex-chunker
- maybe-string->sre
- irregex-search/chunked
- sre->irregex
- sre->string
- string->irregex
- string->sre
- ))
+ (fixnum))
+
+(module chicken.irregex
+ (irregex irregex-apply-match irregex-dfa irregex-dfa/search
+ irregex-extract irregex-flags irregex-fold irregex-fold/chunked
+ irregex-lengths irregex-match irregex-match? irregex-match-data?
+ irregex-match-end-chunk irregex-match-end-index irregex-match-names
+ irregex-match-num-submatches irregex-match-start-chunk
+ irregex-match-start-index irregex-match-subchunk
+ irregex-match-substring irregex-match-valid-index?
+ irregex-match/chunked irregex-names irregex-new-matches irregex-nfa
+ irregex-num-submatches irregex-opt irregex-quote irregex-replace
+ irregex-replace/all irregex-reset-matches! irregex-search
+ irregex-search/chunked irregex-search/matches irregex-split irregex?
+ make-irregex-chunker maybe-string->sre sre->irregex sre->string
+ string->irregex string->sre)
+
+(import scheme chicken)
(include "common-declarations.scm")
@@ -288,3 +257,5 @@
(loop2 (cdr rest) (cons (car rest) s))))))
(else (cons c (loop rest (memq c '(#\\ #\/))))))))))))
(if sre? sre (irregex sre))))))
+
+)
diff --git a/modules.scm b/modules.scm
index d732e880..49f558f7 100644
--- a/modules.scm
+++ b/modules.scm
@@ -916,6 +916,7 @@
(##sys#register-module-alias 'data-structures 'chicken.data-structures)
(##sys#register-module-alias 'extras 'chicken.extras)
(##sys#register-module-alias 'files 'chicken.files)
+(##sys#register-module-alias 'irregex 'chicken.irregex)
(##sys#register-module-alias 'lolevel 'chicken.lolevel)
(##sys#register-module-alias 'ports 'chicken.ports)
(##sys#register-module-alias 'posix 'chicken.posix)
diff --git a/posixunix.scm b/posixunix.scm
index faec6fad..b613371a 100644
--- a/posixunix.scm
+++ b/posixunix.scm
@@ -86,8 +86,9 @@
terminal-port? terminal-size time->string unsetenv user-information
utc-time->seconds with-input-from-pipe with-output-to-pipe)
-(import scheme chicken foreign irregex)
+(import scheme chicken foreign)
(import chicken.files
+ chicken.irregex
chicken.ports)
(include "posix-common.scm")
diff --git a/posixwin.scm b/posixwin.scm
index 27abd49b..834c3f42 100644
--- a/posixwin.scm
+++ b/posixwin.scm
@@ -711,10 +711,11 @@ EOF
terminal-port? terminal-size time->string unsetenv user-information
utc-time->seconds with-input-from-pipe with-output-to-pipe)
-(import scheme chicken foreign irregex)
+(import scheme chicken foreign)
(import chicken.data-structures
chicken.extras
chicken.files
+ chicken.irregex
chicken.ports)
(include "posix-common.scm")
diff --git a/rules.make b/rules.make
index addef24d..9aac7379 100644
--- a/rules.make
+++ b/rules.make
@@ -586,6 +586,7 @@ chicken-status.c: chicken-status.scm \
chicken.data-structures.import.scm \
chicken.extras.import.scm \
chicken.files.import.scm \
+ chicken.irregex.import.scm \
chicken.ports.import.scm \
chicken.posix.import.scm \
setup-api.import.scm
@@ -593,6 +594,7 @@ chicken-install.c: chicken-install.scm \
chicken.data-structures.import.scm \
chicken.extras.import.scm \
chicken.files.import.scm \
+ chicken.irregex.import.scm \
chicken.ports.import.scm \
chicken.posix.import.scm \
chicken.utils.import.scm \
@@ -601,6 +603,7 @@ chicken-install.c: chicken-install.scm \
chicken-uninstall.c: chicken-uninstall.scm \
chicken.data-structures.import.scm \
chicken.files.import.scm \
+ chicken.irregex.import.scm \
chicken.ports.import.scm \
chicken.posix.import.scm \
chicken.utils.import.scm \
@@ -609,6 +612,7 @@ setup-api.c: setup-api.scm \
chicken.data-structures.import.scm \
chicken.extras.import.scm \
chicken.files.import.scm \
+ chicken.irregex.import.scm \
chicken.ports.import.scm \
chicken.posix.import.scm \
chicken.utils.import.scm
@@ -616,6 +620,7 @@ setup-download.c: setup-download.scm \
chicken.data-structures.import.scm \
chicken.extras.import.scm \
chicken.files.import.scm \
+ chicken.irregex.import.scm \
chicken.ports.import.scm \
chicken.posix.import.scm \
chicken.tcp.import.scm \
@@ -623,15 +628,18 @@ setup-download.c: setup-download.scm \
setup-api.import.scm
posixunix.c: posixunix.scm \
chicken.files.import.scm \
+ chicken.irregex.import.scm \
chicken.ports.import.scm
posixwin.c: posixwin.scm \
chicken.files.import.scm \
+ chicken.irregex.import.scm \
chicken.ports.import.scm
extras.c: extras.scm \
chicken.data-structures.import.scm
files.c: files.scm \
chicken.data-structures.import.scm \
- chicken.extras.import.scm
+ chicken.extras.import.scm \
+ chicken.irregex.import.scm
ports.c: ports.scm \
chicken.extras.import.scm
tcp.c: tcp.scm \
@@ -640,7 +648,8 @@ utils.c: utils.scm \
chicken.data-structures.import.scm \
chicken.extras.import.scm \
chicken.files.import.scm \
- chicken.posix.import.scm
+ chicken.posix.import.scm \
+ chicken.irregex.import.scm
define profile-flags
$(if $(filter $(basename $(1)),$(PROFILE_OBJECTS)),-profile)
@@ -663,7 +672,7 @@ posixunix.c: $(SRCDIR)posixunix.scm $(SRCDIR)posix-common.scm $(SRCDIR)common-de
posixwin.c: $(SRCDIR)posixwin.scm $(SRCDIR)posix-common.scm $(SRCDIR)common-declarations.scm
$(bootstrap-lib) -emit-import-library chicken.posix
irregex.c: $(SRCDIR)irregex.scm $(SRCDIR)irregex-core.scm $(SRCDIR)irregex-utils.scm $(SRCDIR)common-declarations.scm
- $(bootstrap-lib)
+ $(bootstrap-lib) -emit-import-library chicken.irregex
chicken-syntax.c: $(SRCDIR)chicken-syntax.scm $(SRCDIR)common-declarations.scm $(SRCDIR)mini-srfi-1.scm
$(bootstrap-lib)
chicken-ffi-syntax.c: $(SRCDIR)chicken-ffi-syntax.scm $(SRCDIR)common-declarations.scm $(SRCDIR)mini-srfi-1.scm
diff --git a/setup-api.scm b/setup-api.scm
index cd10c283..ae5bec13 100644
--- a/setup-api.scm
+++ b/setup-api.scm
@@ -66,12 +66,12 @@
setup-error-handling)
(import scheme chicken foreign
- irregex
chicken.data-structures
chicken.extras
chicken.files
chicken.ports
chicken.posix
+ chicken.irregex
chicken.utils)
(include "mini-srfi-1.scm")
diff --git a/setup-download.scm b/setup-download.scm
index de8ffb28..6bdf552c 100644
--- a/setup-download.scm
+++ b/setup-download.scm
@@ -37,11 +37,11 @@
temporary-directory)
(import scheme chicken foreign)
- (import irregex
- setup-api
+ (import setup-api
chicken.data-structures
chicken.extras
chicken.files
+ chicken.irregex
chicken.posix
chicken.tcp
chicken.utils)
diff --git a/tests/runtests.sh b/tests/runtests.sh
index a1f2af05..6fed1e9c 100755
--- a/tests/runtests.sh
+++ b/tests/runtests.sh
@@ -41,9 +41,10 @@ for x in setup-api.so setup-api.import.so setup-download.so \
chicken.ports.import.so chicken.utils.import.so chicken.files.import.so \
chicken.posix.import.so \
chicken.extras.import.so \
- irregex.import.so chicken.tcp.import.so \
+ chicken.irregex.import.so \
+ chicken.tcp.import.so \
foreign.import.so \
- csi.import.so irregex.import.so types.db; do
+ csi.import.so types.db; do
cp ../$x test-repository
done
diff --git a/types.db b/types.db
index f951c502..1cc08385 100644
--- a/types.db
+++ b/types.db
@@ -1542,7 +1542,7 @@
;; irregex
-(irregex (#(procedure #:clean) irregex (#!rest) (struct regexp)))
+(chicken.irregex#irregex (#(procedure #:clean) chicken.irregex#irregex (#!rest) (struct regexp)))
;; Both of these DFA accessors return either #f or a DFA vector.
;; TODO: Should we spec out the entire DFA type layout? It's plenty complex, so we don't
@@ -1551,100 +1551,99 @@
;; the car of each list is a number (for init-state), false or an alist;
;; the cdr is a list of alists, which contains a char (or vector) and two alists
;; These alists have types themselves, of course...
-(irregex-dfa (#(procedure #:clean #:enforce) irregex-dfa ((struct regexp)) (or false vector))
+(chicken.irregex#irregex-dfa (#(procedure #:clean #:enforce) chicken.irregex#irregex-dfa ((struct regexp)) (or false vector))
(((struct regexp)) (##sys#slot #(1) '1)))
-(irregex-dfa/search (#(procedure #:clean #:enforce) irregex-dfa/search ((struct regexp)) (or false vector))
+(chicken.irregex#irregex-dfa/search (#(procedure #:clean #:enforce) chicken.irregex#irregex-dfa/search ((struct regexp)) (or false vector))
(((struct regexp)) (##sys#slot #(1) '2)))
;; Procedure type returned by irregex-nfa is a matcher type (it is misnamed)
;; which is another complex procedure type.
-(irregex-nfa (#(procedure #:clean #:enforce) irregex-nfa ((struct regexp)) (or false procedure))
+(chicken.irregex#irregex-nfa (#(procedure #:clean #:enforce) chicken.irregex#irregex-nfa ((struct regexp)) (or false procedure))
(((struct regexp)) (##sys#slot #(1) '3)))
-(irregex-flags (#(procedure #:clean #:enforce) irregex-flags ((struct regexp)) fixnum)
+(chicken.irregex#irregex-flags (#(procedure #:clean #:enforce) chicken.irregex#irregex-flags ((struct regexp)) fixnum)
(((struct regexp)) (##sys#slot #(1) '4)))
-(irregex-num-submatches (#(procedure #:clean #:enforce) irregex-num-submatches ((struct regexp))
+(chicken.irregex#irregex-num-submatches (#(procedure #:clean #:enforce) chicken.irregex#irregex-num-submatches ((struct regexp))
fixnum)
(((struct regexp)) (##sys#slot #(1) '5)))
-(irregex-lengths (#(procedure #:clean #:enforce) irregex-lengths ((struct regexp))
+(chicken.irregex#irregex-lengths (#(procedure #:clean #:enforce) chicken.irregex#irregex-lengths ((struct regexp))
(vector-of (or false pair)))
(((struct regexp)) (##sys#slot #(1) '6)))
;; XXX: Submatch names ought to be symbols according to the docs, but this is
;; not enforced anywhere, so we can't assume it in the return type here.
-(irregex-names (#(procedure #:clean #:enforce) irregex-names ((struct regexp))
+(chicken.irregex#irregex-names (#(procedure #:clean #:enforce) chicken.irregex#irregex-names ((struct regexp))
(list-of (pair * fixnum)))
(((struct regexp)) (##sys#slot #(1) '7)))
;; XXX: specialize these? (how?)
-(irregex-extract (#(procedure #:clean #:enforce) irregex-extract (* string #!optional fixnum fixnum)
+(chicken.irregex#irregex-extract (#(procedure #:clean #:enforce) chicken.irregex#irregex-extract (* string #!optional fixnum fixnum)
(list-of string)))
-(irregex-split (#(procedure #:clean #:enforce) irregex-split (* string #!optional fixnum fixnum)
+(chicken.irregex#irregex-split (#(procedure #:clean #:enforce) chicken.irregex#irregex-split (* string #!optional fixnum fixnum)
(list-of string)))
-(irregex-fold (forall (a) (#(procedure #:enforce) irregex-fold (* (procedure (fixnum (struct regexp-match) a) a) a string #!optional (procedure (fixnum *) *) fixnum fixnum) a)))
+(chicken.irregex#irregex-fold (forall (a) (#(procedure #:enforce) chicken.irregex#irregex-fold (* (procedure (fixnum (struct regexp-match) a) a) a string #!optional (procedure (fixnum *) *) fixnum fixnum) a)))
;; XXX TODO: chunker is a plain vector
-(irregex-fold/chunked (forall (a c) (#(procedure #:enforce) irregex-fold/chunked (* (procedure (c fixnum (struct regexp-match) a) a) a vector c #!optional (procedure (c fixnum a) a) fixnum fixnum) a)))
-(irregex-reset-matches! (procedure irregex-reset-matches! ((struct regexp-match))
+(chicken.irregex#irregex-fold/chunked (forall (a c) (#(procedure #:enforce) chicken.irregex#irregex-fold/chunked (* (procedure (c fixnum (struct regexp-match) a) a) a vector c #!optional (procedure (c fixnum a) a) fixnum fixnum) a)))
+(chicken.irregex#irregex-reset-matches! (procedure chicken.irregex#irregex-reset-matches! ((struct regexp-match))
(struct regexp-match)))
;; A silly procedure, but at least we can "inline" it like this
-(irregex-match? (#(procedure #:clean #:enforce) irregex-match? (* string #!optional fixnum fixnum)
- boolean)
+(chicken.irregex#irregex-match? (#(procedure #:clean #:enforce) chicken.irregex#irregex-match? (* string #!optional fixnum fixnum) boolean)
((* string) (and (irregex-match #(1) #(2)) '#t))
((* string fixnum) (and (irregex-match #(1) #(2) #(3)) '#t))
((* string fixnum fixnum) (and (irregex-match #(1) #(2) #(3) #(4)) '#t)))
;; These two return #f or a match object
-(irregex-match (#(procedure #:clean #:enforce) irregex-match (* string #!optional fixnum fixnum)
+(chicken.irregex#irregex-match (#(procedure #:clean #:enforce) chicken.irregex#irregex-match (* string #!optional fixnum fixnum)
(or false (struct regexp-match))))
;; XXX chunker is a plain vector
;; Not marked clean because we don't know what chunker procedures will do
-(irregex-match/chunked (#(procedure #:enforce) irregex-match/chunked (* vector * #!optional fixnum)
+(chicken.irregex#irregex-match/chunked (#(procedure #:enforce) chicken.irregex#irregex-match/chunked (* vector * #!optional fixnum)
(or false (struct regexp-match))))
-(irregex-match-data? (#(procedure #:pure #:predicate (struct regexp-match)) irregex-match-data? (*) boolean))
+(chicken.irregex#irregex-match-data? (#(procedure #:pure #:predicate (struct regexp-match)) chicken.irregex#irregex-match-data? (*) boolean))
-(irregex-match-end-index (#(procedure #:clean #:enforce) irregex-match-end-index ((struct regexp-match) #!optional *) fixnum))
-(irregex-match-end-chunk (#(procedure #:clean #:enforce) irregex-match-end-chunk ((struct regexp-match) #!optional *) *))
-(irregex-match-start-index (#(procedure #:clean #:enforce) irregex-match-start-index ((struct regexp-match) #!optional *) fixnum))
-(irregex-match-start-chunk (#(procedure #:clean #:enforce) irregex-match-start-chunk ((struct regexp-match) #!optional *) *))
-(irregex-match-substring (#(procedure #:clean #:enforce) irregex-match-substring ((struct regexp-match) #!optional *) *))
-(irregex-match-subchunk (#(procedure #:clean #:enforce) irregex-match-subchunk ((struct regexp-match) #!optional *) *))
+(chicken.irregex#irregex-match-end-index (#(procedure #:clean #:enforce) chicken.irregex#irregex-match-end-index ((struct regexp-match) #!optional *) fixnum))
+(chicken.irregex#irregex-match-end-chunk (#(procedure #:clean #:enforce) chicken.irregex#irregex-match-end-chunk ((struct regexp-match) #!optional *) *))
+(chicken.irregex#irregex-match-start-index (#(procedure #:clean #:enforce) chicken.irregex#irregex-match-start-index ((struct regexp-match) #!optional *) fixnum))
+(chicken.irregex#irregex-match-start-chunk (#(procedure #:clean #:enforce) chicken.irregex#irregex-match-start-chunk ((struct regexp-match) #!optional *) *))
+(chicken.irregex#irregex-match-substring (#(procedure #:clean #:enforce) chicken.irregex#irregex-match-substring ((struct regexp-match) #!optional *) *))
+(chicken.irregex#irregex-match-subchunk (#(procedure #:clean #:enforce) chicken.irregex#irregex-match-subchunk ((struct regexp-match) #!optional *) *))
-(irregex-match-names (#(procedure #:clean #:enforce) irregex-match-names ((struct regexp-match)) list)
+(chicken.irregex#irregex-match-names (#(procedure #:clean #:enforce) chicken.irregex#irregex-match-names ((struct regexp-match)) list)
(((struct regexp-match)) (##sys#slot #(1) '2)))
-(irregex-match-num-submatches (#(procedure #:enforce) irregex-match-num-submatches ((struct regexp-match)) fixnum)
+(chicken.irregex#irregex-match-num-submatches (#(procedure #:enforce) chicken.irregex#irregex-match-num-submatches ((struct regexp-match)) fixnum)
(((struct regexp-match))
(fx- (fx/ (##sys#size (##sys#slot #(1) '1)) '4) '2)))
-(irregex-new-matches (procedure irregex-new-matches (*) *)) ; really only for internal use..
-(irregex-opt (#(procedure #:clean #:enforce) irregex-opt (list) *))
-(irregex-quote (#(procedure #:clean #:enforce) irregex-quote (string) string))
+(chicken.irregex#irregex-new-matches (procedure chicken.irregex#irregex-new-matches (*) *)) ; really only for internal use..
+(chicken.irregex#irregex-opt (#(procedure #:clean #:enforce) chicken.irregex#irregex-opt (list) *))
+(chicken.irregex#irregex-quote (#(procedure #:clean #:enforce) chicken.irregex#irregex-quote (string) string))
-(irregex-replace (#(procedure #:enforce) irregex-replace (* string #!rest) string))
-(irregex-replace/all (#(procedure #:enforce) irregex-replace/all (* string #!rest) string))
+(chicken.irregex#irregex-replace (#(procedure #:enforce) chicken.irregex#irregex-replace (* string #!rest) string))
+(chicken.irregex#irregex-replace/all (#(procedure #:enforce) chicken.irregex#irregex-replace/all (* string #!rest) string))
;; Returns a list of strings, but *only* when all user-procedures do
-(irregex-apply-match (procedure ((struct regexp-match) list) list)) ; internal use
+(chicken.irregex#irregex-apply-match (procedure ((struct regexp-match) list) list)) ; internal use
;; These return #f or a match object
-(irregex-search (#(procedure #:clean #:enforce) irregex-search (* string #!optional fixnum fixnum)
+(chicken.irregex#irregex-search (#(procedure #:clean #:enforce) chicken.irregex#irregex-search (* string #!optional fixnum fixnum)
(or false (struct regexp-match))))
;; XXX chunker is a plain vector
-(irregex-search/chunked (#(procedure #:enforce) irregex-search/chunked (* vector * #!optional fixnum *)
+(chicken.irregex#irregex-search/chunked (#(procedure #:enforce) chicken.irregex#irregex-search/chunked (* vector * #!optional fixnum *)
(or false (struct regexp-match))))
-(irregex-search/matches (#(procedure #:enforce) irregex-search/matches (* vector * * fixnum (struct regexp-match))
+(chicken.irregex#irregex-search/matches (#(procedure #:enforce) chicken.irregex#irregex-search/matches (* vector * * fixnum (struct regexp-match))
(or false (struct regexp-match))))
-(irregex-match-valid-index?
- (#(procedure #:clean #:enforce) irregex-match-valid-index? ((struct regexp-match) *) boolean))
+(chicken.irregex#irregex-match-valid-index?
+ (#(procedure #:clean #:enforce) chicken.irregex#irregex-match-valid-index? ((struct regexp-match) *) boolean))
-(irregex? (#(procedure #:pure #:predicate (struct regexp)) irregex? (*) boolean))
+(chicken.irregex#irregex? (#(procedure #:pure #:predicate (struct regexp)) chicken.irregex#irregex? (*) boolean))
-(make-irregex-chunker
- (#(procedure #:enforce) make-irregex-chunker
+(chicken.irregex#make-irregex-chunker
+ (#(procedure #:enforce) chicken.irregex#make-irregex-chunker
((procedure (*) *)
(procedure (*) *)
#!optional
@@ -1653,10 +1652,10 @@
(procedure (* fixnum * fixnum) string)
(procedure (* fixnum * fixnum) *))
*))
-(maybe-string->sre (#(procedure #:clean) maybe-string->sre (*) *))
-(sre->irregex (#(procedure #:clean) sre->irregex (#!rest) *))
-(string->irregex (#(procedure #:clean #:enforce) string->irregex (string #!rest) *))
-(string->sre (#(procedure #:clean #:enforce) string->sre (string #!rest) *))
+(chicken.irregex#maybe-string->sre (#(procedure #:clean) chicken.irregex#maybe-string->sre (*) *))
+(chicken.irregex#sre->irregex (#(procedure #:clean) chicken.irregex#sre->irregex (#!rest) *))
+(chicken.irregex#string->irregex (#(procedure #:clean #:enforce) chicken.irregex#string->irregex (string #!rest) *))
+(chicken.irregex#string->sre (#(procedure #:clean #:enforce) chicken.irregex#string->sre (string #!rest) *))
;; lolevel
diff --git a/utils.scm b/utils.scm
index 3a821bec..c3bb2827 100644
--- a/utils.scm
+++ b/utils.scm
@@ -41,11 +41,12 @@
qs)
(import scheme chicken)
-(import foreign irregex)
+(import foreign)
(import chicken.data-structures
chicken.extras
chicken.files
- chicken.posix)
+ chicken.posix
+ chicken.irregex)
(include "common-declarations.scm")
Trap