From 524c2a01e6a7ecf35720b8305996e9bd79d7c67e Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 15 Jun 2001 21:20:53 +0000 Subject: [PATCH] Fix bug: regular-expression compiler is breaking the character-set abstraction. --- v7/src/runtime/rgxcmp.scm | 12 ++++++------ v7/src/runtime/runtime.pkg | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/v7/src/runtime/rgxcmp.scm b/v7/src/runtime/rgxcmp.scm index 1178e8586..4d52a9e49 100644 --- a/v7/src/runtime/rgxcmp.scm +++ b/v7/src/runtime/rgxcmp.scm @@ -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 ;;; @@ -248,13 +248,13 @@ (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) @@ -267,7 +267,7 @@ ((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)))))) @@ -283,7 +283,7 @@ (if negate? (kernel 0 1 0) (kernel 0 0 1)))) - char-set)) + (make-char-set table))) ;;;; Translation Tables diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 95c884e63..a577625a6 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -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) -- 2.25.1