From 1755a8783918d53719465fb211c0865d31fce545 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 25 Sep 2001 05:07:50 +0000 Subject: [PATCH] Fix bugs in character-set compilation. This code was confusing ASCII fixnums and characters, which works only in compiled code. --- v7/src/runtime/rgxcmp.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/v7/src/runtime/rgxcmp.scm b/v7/src/runtime/rgxcmp.scm index 4d52a9e49..b66c074db 100644 --- a/v7/src/runtime/rgxcmp.scm +++ b/v7/src/runtime/rgxcmp.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: rgxcmp.scm,v 1.115 2001/06/15 21:20:48 cph Exp $ +;;; $Id: rgxcmp.scm,v 1.116 2001/09/25 05:07:50 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-2001 Massachusetts Institute of Technology ;;; @@ -666,7 +666,9 @@ (let loop ((chars (if (input-match? (input-peek) #\]) - (begin (input-discard!) '(#\])) + (begin + (input-discard!) + (list (char->integer #\]))) '()))) (if (input-end?) (premature-end)) @@ -678,7 +680,9 @@ ((ucode-primitive re-char-set-adjoin!) charset (char->ascii char))) (char-set-members - (re-compile-char-set (list->string (reverse! chars)) #f)))) + (re-compile-char-set + (list->string (map ascii->char (reverse! chars))) + #f)))) (loop (cons char chars))))) (output-start! (if invert? re-code:not-char-set re-code:char-set)) ;; Discard any bitmap bytes that are all 0 at the end of -- 2.25.1