From 97e658fc17bf4ddb01471d446fea63c21287222c Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sun, 18 May 2014 22:50:03 -0700 Subject: [PATCH] unicode.data: using interval-sets. --- basis/unicode/data/data.factor | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/basis/unicode/data/data.factor b/basis/unicode/data/data.factor index fe60acc840..e0fb579fb8 100644 --- a/basis/unicode/data/data.factor +++ b/basis/unicode/data/data.factor @@ -1,10 +1,11 @@ ! Copyright (C) 2008, 2009 Daniel Ehrenberg. ! See http://factorcode.org/license.txt for BSD license. USING: arrays ascii assocs byte-arrays combinators -combinators.short-circuit grouping hashtables interval-maps +combinators.short-circuit grouping hashtables interval-sets io.encodings.utf8 io.files kernel locals make math math.bitwise math.order math.parser math.ranges memoize namespaces sequences sets simple-flat-file sorting splitting strings.parser ; +QUALIFIED: interval-sets IN: unicode.data char ( name -- char ) name-map at ; inline : char>name ( char -- name ) name-map value-at ; inline : property ( property -- interval-map ) properties at ; foldable -: property? ( char property -- ? ) property interval-key? ; inline +: property? ( char property -- ? ) property interval-sets:in? ; inline : ch>lower ( ch -- lower ) simple-lower ?at drop ; inline : ch>upper ( ch -- upper ) simple-upper ?at drop ; inline : ch>title ( ch -- title ) simple-title ?at drop ; inline