     ] with-compilation-unit ;
 
 : process-script ( ranges -- )
-    [ values prune \ num>name-table set-value ]
-    [ make-char>num \ char>num-table set-value ] bi
-    num>name-table >symbols \ num>name-table set-value ;
+    dup values prune >symbols interned [
+        expand-ranges \ script-table set-value
+    ] with-variable ;
 
 : load-script ( -- )
     "resource:extra/unicode/script/Scripts.txt"

load-script
PRIVATE>

: script-of ( char -- script )
    char>num-table nth num>name-table nth ;

USING: unicode.syntax.backend kernel sequences assocs io.files
io.encodings ascii math.ranges io splitting math.parser 
namespaces byte-arrays locals math sets io.encodings.ascii
words compiler.units arrays interval-maps ;
IN: unicode.script

<PRIVATE
VALUE: script-table
SYMBOL: interned

: parse-script ( stream -- assoc )
    ! assoc is code point/range => name
