Fix bugs in character-set compilation. This code was confusing ASCII
authorChris Hanson <org/chris-hanson/cph>
Tue, 25 Sep 2001 05:07:50 +0000 (05:07 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 25 Sep 2001 05:07:50 +0000 (05:07 +0000)
fixnums and characters, which works only in compiled code.

v7/src/runtime/rgxcmp.scm

index 4d52a9e49e182fe584f306af1819c8ba6113bd72..b66c074db70dcbadaef742315de7c336a0f60607 100644 (file)
@@ -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
 ;;;
       (let loop
          ((chars
            (if (input-match? (input-peek) #\])
-               (begin (input-discard!) '(#\]))
+               (begin
+                 (input-discard!)
+                 (list (char->integer #\])))
                '())))
        (if (input-end?)
            (premature-end))
                   ((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