Fix bug: regular-expression compiler is breaking the character-set
authorChris Hanson <org/chris-hanson/cph>
Fri, 15 Jun 2001 21:20:53 +0000 (21:20 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 15 Jun 2001 21:20:53 +0000 (21:20 +0000)
abstraction.

v7/src/runtime/rgxcmp.scm
v7/src/runtime/runtime.pkg

index 1178e858631087f504ed1d10c1e4ca314491f1db..4d52a9e49e182fe584f306af1819c8ba6113bd72 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: rgxcmp.scm,v 1.114 2001/03/21 05:42:20 cph Exp $
+;;; $Id: rgxcmp.scm,v 1.115 2001/06/15 21:20:48 cph Exp $
 ;;;
 ;;; Copyright (c) 1986, 1989-2001 Massachusetts Institute of Technology
 ;;;
 
 (define (re-compile-char-set pattern negate?)
   (let ((length (string-length pattern))
-       (char-set (string-allocate 256)))
+       (table (string-allocate 256)))
     (let ((kernel
           (lambda (start background foreground)
             (let ((adjoin!
                    (lambda (ascii)
-                     (vector-8b-set! char-set ascii foreground))))
-              (vector-8b-fill! char-set 0 256 background)
+                     (vector-8b-set! table ascii foreground))))
+              (vector-8b-fill! table 0 256 background)
               (let loop
                   ((pattern (substring->list pattern start length)))
                 (if (pair? pattern)
                                 ((index (char->ascii (car pattern))))
                               (if (fix:<= index end)
                                   (begin
-                                    (vector-8b-set! char-set
+                                    (vector-8b-set! table
                                                     index
                                                     foreground)
                                     (loop (fix:+ index 1))))))
          (if negate?
              (kernel 0 1 0)
              (kernel 0 0 1))))
-    char-set))
+    (make-char-set table)))
 \f
 ;;;; Translation Tables
 
index 95c884e6301052dfb54156ba559892d3056931b2..a577625a6327e75ca3b357239bfdd30d1fc376ad 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: runtime.pkg,v 14.369 2001/06/15 20:38:40 cph Exp $
+$Id: runtime.pkg,v 14.370 2001/06/15 21:20:53 cph Exp $
 
 Copyright (c) 1988-2001 Massachusetts Institute of Technology
 
@@ -347,6 +347,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
          string->char-set)
   (export (runtime string)
          char-set-table)
+  (export (runtime regular-expression-compiler)
+         make-char-set)
   (initialization (initialize-package!)))
 
 (define-package (runtime compiler-info)