Change code generator for boolean sets to use standard names.
authorChris Hanson <org/chris-hanson/cph>
Sun, 12 Feb 2017 01:20:17 +0000 (17:20 -0800)
committerChris Hanson <org/chris-hanson/cph>
Sun, 12 Feb 2017 01:20:17 +0000 (17:20 -0800)
src/etc/ucd-converter.scm
src/runtime/runtime.pkg
src/runtime/ucd-glue.scm
src/runtime/ucd-table-alpha.scm
src/runtime/ucd-table-lower.scm
src/runtime/ucd-table-upper.scm
src/runtime/ucd-table-wspace.scm

index 32c9cf5c4b66d816c60ca8277c642109195e4f60..e8f890ca9f85c80880ee71a3c90a2542ffb524b8 100644 (file)
@@ -459,8 +459,10 @@ USA.
          (else (error "Unsupported metadata:" metadata)))))
 
 (define (code-generator:boolean prop-name metadata prop-alist proc-name)
-  (let ((char-set-name (symbol "char-set:" (metadata-full-name metadata))))
-    `((define (,proc-name char)
+  (declare (ignore proc-name))
+  (let* ((full-name (metadata-full-name metadata))
+        (char-set-name (symbol "char-set:" full-name)))
+    `((define (,(symbol "char-" full-name "?") char)
        (char-in-set? char ,char-set-name))
       (define-deferred ,char-set-name
        (char-set*
index e0ba2d26885b285a4f90e1c60506f92759295aeb..c96e3fb89b77c84636e30e162913f21e74b6b171 100644 (file)
@@ -1422,6 +1422,10 @@ USA.
         "ucd-table-wspace")
   (parent (runtime))
   (export ()
+         char-alphabetic?
+         char-lower-case?
+         char-upper-case?
+         char-whitespace?
          char-set:alphabetic
          char-set:lower-case
          char-set:upper-case
@@ -1443,9 +1447,7 @@ USA.
   (files "ucd-glue")
   (parent (runtime))
   (export ()
-         char-alphabetic?
          char-alphanumeric?
-         char-lower-case?
          char-numeric?
          char-set:alphanumeric
          char-set:not-alphabetic
@@ -1456,9 +1458,7 @@ USA.
          char-set:not-whitespace
          char-set:numeric
          char-set:symbol-constituent
-         char-set:symbol-initial
-         char-upper-case?
-         char-whitespace?))
+         char-set:symbol-initial))
 
 (define-package (runtime character-set)
   (files "chrset")
index bb73db067ac0711c5723b162376e7b6e4cdd3b2e..767717077fb15b7e481f44a381e89f4a05b52f0f 100644 (file)
@@ -34,27 +34,15 @@ USA.
    (lambda (sv)
      (eq? 'decimal (ucd-nt-value (integer->char sv))))))
 
+(define-deferred char-numeric?
+  (char-set-predicate char-set:numeric))
+
 (define-deferred char-set:alphanumeric
   (char-set-union char-set:alphabetic char-set:numeric))
 
-(define-deferred char-alphabetic?
-  (char-set-predicate char-set:alphabetic))
-
 (define-deferred char-alphanumeric?
   (char-set-predicate char-set:alphanumeric))
 
-(define-deferred char-lower-case?
-  (char-set-predicate char-set:lower-case))
-
-(define-deferred char-numeric?
-  (char-set-predicate char-set:numeric))
-
-(define-deferred char-upper-case?
-  (char-set-predicate char-set:upper-case))
-
-(define-deferred char-whitespace?
-  (char-set-predicate char-set:whitespace))
-
 (define-deferred char-set:not-alphabetic
   (char-set-invert char-set:alphabetic))
 
index fac5f37299c9b6bcde3d94f0762e4cb4fa1733c7..331e75f24cea2dda4aefbddc1e5d65e33139cae5 100644 (file)
@@ -30,7 +30,7 @@ USA.
 
 (declare (usual-integrations))
 \f
-(define (ucd-alpha-value char)
+(define (char-alphabetic? char)
   (char-in-set? char char-set:alphabetic))
 
 (define-deferred char-set:alphabetic
index 68d745bff405c10e21c95f3205c93b5da2c6ae69..fe0f710ac6f496c8f8a717bbbfdc243af0f2cb0e 100644 (file)
@@ -30,7 +30,7 @@ USA.
 
 (declare (usual-integrations))
 \f
-(define (ucd-lower-value char)
+(define (char-lower-case? char)
   (char-in-set? char char-set:lower-case))
 
 (define-deferred char-set:lower-case
index 17afbeb4698208ecbeccdeb5f046e0b1b76f080a..722170fd5afa76fa9e821ae1296f6050ed2cdc3b 100644 (file)
@@ -30,7 +30,7 @@ USA.
 
 (declare (usual-integrations))
 \f
-(define (ucd-upper-value char)
+(define (char-upper-case? char)
   (char-in-set? char char-set:upper-case))
 
 (define-deferred char-set:upper-case
index 3a586a513b1b78ea8efa9afecce5ea4307a95075..e83e9e70997eba0ea16428b391f8c7384253f474 100644 (file)
@@ -30,7 +30,7 @@ USA.
 
 (declare (usual-integrations))
 \f
-(define (ucd-wspace-value char)
+(define (char-whitespace? char)
   (char-in-set? char char-set:whitespace))
 
 (define-deferred char-set:whitespace