Artifact
c6c9da30997462e76427ac3b38b2a7e5c4d92bd6:
- File
foof/irregex-utils.sls
— part of check-in
[112a40d018]
at
2016-09-01 08:27:10
on branch trunk
— various improvements, added lmdb , added license notices
(user:
ovenpasta@pizzahack.eu
size: 1266)
0000: 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b ;;;;;;;;;;;;;;;;
0010: 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b ;;;;;;;;;;;;;;;;
0020: 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b ;;;;;;;;;;;;;;;;
0030: 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b ;;;;;;;;;;;;;;;;
0040: 3b 3b 3b 3b 3b 3b 3b 3b 0a 3b 3b 3b 20 52 36 52 ;;;;;;;;.;;; R6R
0050: 53 20 57 72 61 70 70 69 6e 67 73 20 66 6f 72 20 S Wrappings for
0060: 41 6c 65 78 20 53 68 69 6e 6e 73 20 49 72 72 65 Alex Shinns Irre
0070: 67 65 78 20 55 74 69 6c 69 74 69 65 73 0a 3b 3b gex Utilities.;;
0080: 3b 20 0a 3b 3b 3b 20 43 6f 70 79 72 69 67 68 74 ; .;;; Copyright
0090: 20 28 63 29 20 32 30 30 39 20 41 61 72 6f 6e 20 (c) 2009 Aaron
00a0: 57 2e 20 48 73 75 20 3c 61 72 63 66 69 64 65 40 W. Hsu <arcfide@
00b0: 73 61 63 72 69 64 65 6f 2e 75 73 3e 0a 3b 3b 3b sacrideo.us>.;;;
00c0: 20 0a 3b 3b 3b 20 50 65 72 6d 69 73 73 69 6f 6e .;;; Permission
00d0: 20 74 6f 20 75 73 65 2c 20 63 6f 70 79 2c 20 6d to use, copy, m
00e0: 6f 64 69 66 79 2c 20 61 6e 64 20 64 69 73 74 72 odify, and distr
00f0: 69 62 75 74 65 20 74 68 69 73 20 73 6f 66 74 77 ibute this softw
0100: 61 72 65 20 66 6f 72 0a 3b 3b 3b 20 61 6e 79 20 are for.;;; any
0110: 70 75 72 70 6f 73 65 20 77 69 74 68 20 6f 72 20 purpose with or
0120: 77 69 74 68 6f 75 74 20 66 65 65 20 69 73 20 68 without fee is h
0130: 65 72 65 62 79 20 67 72 61 6e 74 65 64 2c 20 70 ereby granted, p
0140: 72 6f 76 69 64 65 64 20 74 68 61 74 20 74 68 65 rovided that the
0150: 0a 3b 3b 3b 20 61 62 6f 76 65 20 63 6f 70 79 72 .;;; above copyr
0160: 69 67 68 74 20 6e 6f 74 69 63 65 20 61 6e 64 20 ight notice and
0170: 74 68 69 73 20 70 65 72 6d 69 73 73 69 6f 6e 20 this permission
0180: 6e 6f 74 69 63 65 20 61 70 70 65 61 72 20 69 6e notice appear in
0190: 20 61 6c 6c 0a 3b 3b 3b 20 63 6f 70 69 65 73 2e all.;;; copies.
01a0: 0a 3b 3b 3b 20 0a 3b 3b 3b 20 54 48 45 20 53 4f .;;; .;;; THE SO
01b0: 46 54 57 41 52 45 20 49 53 20 50 52 4f 56 49 44 FTWARE IS PROVID
01c0: 45 44 20 22 41 53 20 49 53 22 20 41 4e 44 20 54 ED "AS IS" AND T
01d0: 48 45 20 41 55 54 48 4f 52 20 44 49 53 43 4c 41 HE AUTHOR DISCLA
01e0: 49 4d 53 20 41 4c 4c 0a 3b 3b 3b 20 57 41 52 52 IMS ALL.;;; WARR
01f0: 41 4e 54 49 45 53 20 57 49 54 48 20 52 45 47 41 ANTIES WITH REGA
0200: 52 44 20 54 4f 20 54 48 49 53 20 53 4f 46 54 57 RD TO THIS SOFTW
0210: 41 52 45 20 49 4e 43 4c 55 44 49 4e 47 20 41 4c ARE INCLUDING AL
0220: 4c 20 49 4d 50 4c 49 45 44 0a 3b 3b 3b 20 57 41 L IMPLIED.;;; WA
0230: 52 52 41 4e 54 49 45 53 20 4f 46 20 4d 45 52 43 RRANTIES OF MERC
0240: 48 41 4e 54 41 42 49 4c 49 54 59 20 41 4e 44 20 HANTABILITY AND
0250: 46 49 54 4e 45 53 53 2e 20 49 4e 20 4e 4f 20 45 FITNESS. IN NO E
0260: 56 45 4e 54 20 53 48 41 4c 4c 20 54 48 45 0a 3b VENT SHALL THE.;
0270: 3b 3b 20 41 55 54 48 4f 52 20 42 45 20 4c 49 41 ;; AUTHOR BE LIA
0280: 42 4c 45 20 46 4f 52 20 41 4e 59 20 53 50 45 43 BLE FOR ANY SPEC
0290: 49 41 4c 2c 20 44 49 52 45 43 54 2c 20 49 4e 44 IAL, DIRECT, IND
02a0: 49 52 45 43 54 2c 20 4f 52 20 43 4f 4e 53 45 51 IRECT, OR CONSEQ
02b0: 55 45 4e 54 49 41 4c 0a 3b 3b 3b 20 44 41 4d 41 UENTIAL.;;; DAMA
02c0: 47 45 53 20 4f 52 20 41 4e 59 20 44 41 4d 41 47 GES OR ANY DAMAG
02d0: 45 53 20 57 48 41 54 53 4f 45 56 45 52 20 52 45 ES WHATSOEVER RE
02e0: 53 55 4c 54 49 4e 47 20 46 52 4f 4d 20 4c 4f 53 SULTING FROM LOS
02f0: 53 20 4f 46 20 55 53 45 2c 20 44 41 54 41 0a 3b S OF USE, DATA.;
0300: 3b 3b 20 4f 52 20 50 52 4f 46 49 54 53 2c 20 57 ;; OR PROFITS, W
0310: 48 45 54 48 45 52 20 49 4e 20 41 4e 20 41 43 54 HETHER IN AN ACT
0320: 49 4f 4e 20 4f 46 20 43 4f 4e 54 52 41 43 54 2c ION OF CONTRACT,
0330: 20 4e 45 47 4c 49 47 45 4e 43 45 20 4f 52 20 4f NEGLIGENCE OR O
0340: 54 48 45 52 0a 3b 3b 3b 20 54 4f 52 54 49 4f 55 THER.;;; TORTIOU
0350: 53 20 41 43 54 49 4f 4e 2c 20 41 52 49 53 49 4e S ACTION, ARISIN
0360: 47 20 4f 55 54 20 4f 46 20 4f 52 20 49 4e 20 43 G OUT OF OR IN C
0370: 4f 4e 4e 45 43 54 49 4f 4e 20 57 49 54 48 20 54 ONNECTION WITH T
0380: 48 45 20 55 53 45 20 4f 52 0a 3b 3b 3b 20 50 45 HE USE OR.;;; PE
0390: 52 46 4f 52 4d 41 4e 43 45 20 4f 46 20 54 48 49 RFORMANCE OF THI
03a0: 53 20 53 4f 46 54 57 41 52 45 2e 0a 0a 28 6c 69 S SOFTWARE...(li
03b0: 62 72 61 72 79 20 28 66 6f 6f 66 20 69 72 72 65 brary (foof irre
03c0: 67 65 78 2d 75 74 69 6c 73 29 0a 20 20 28 65 78 gex-utils). (ex
03d0: 70 6f 72 74 20 0a 20 20 20 20 72 78 2d 73 70 65 port . rx-spe
03e0: 63 69 61 6c 2d 63 68 61 72 73 0a 20 20 20 20 69 cial-chars. i
03f0: 72 72 65 67 65 78 2d 71 75 6f 74 65 0a 20 20 20 rregex-quote.
0400: 20 69 72 72 65 67 65 78 2d 6f 70 74 0a 20 20 20 irregex-opt.
0410: 20 63 73 65 74 2d 3e 73 74 72 69 6e 67 0a 20 20 cset->string.
0420: 20 20 73 72 65 2d 3e 73 74 72 69 6e 67 29 0a 20 sre->string).
0430: 20 28 69 6d 70 6f 72 74 0a 20 20 20 20 28 65 78 (import. (ex
0440: 63 65 70 74 20 28 72 6e 72 73 20 62 61 73 65 29 cept (rnrs base)
0450: 20 65 72 72 6f 72 29 0a 20 20 20 20 28 6f 6e 6c error). (onl
0460: 79 20 28 73 63 68 65 6d 65 29 20 77 69 74 68 2d y (scheme) with-
0470: 6f 75 74 70 75 74 2d 74 6f 2d 73 74 72 69 6e 67 output-to-string
0480: 29 0a 20 20 20 20 28 66 6f 6f 66 20 69 72 72 65 ). (foof irre
0490: 67 65 78 29 0a 20 20 20 20 28 73 72 66 69 20 3a gex). (srfi :
04a0: 32 33 29 0a 20 20 20 20 28 73 72 66 69 20 70 72 23). (srfi pr
04b0: 69 76 61 74 65 20 69 6e 63 6c 75 64 65 29 29 0a ivate include)).
04c0: 0a 28 69 6e 63 6c 75 64 65 2f 72 65 73 6f 6c 76 .(include/resolv
04d0: 65 20 28 22 66 6f 6f 66 22 29 20 22 69 72 72 65 e ("foof") "irre
04e0: 67 65 78 2d 75 74 69 6c 73 2e 73 63 6d 22 29 0a gex-utils.scm").
04f0: 0a 29 .)