         [ f ] if*
     ] [ t ] if ;
 
+: (format/extended?) ( class -- ? )
+    ${ wExtend wFormat } member? ; inline
+
 : format/extended? ( ch -- ? )
-    word-break-prop { 4 5 } member? ;
+    word-break-prop (format/extended?) ;
 
 : (walk-up) ( str i -- j )
     swap [ format/extended? not ] find-from drop ;

    } case ;

:: word-break-next ( old-class new-char i str -- next-class ? )
    new-char format/extended?
    [ old-class dup { 1 2 3 } member? ] [
        new-char word-break-prop old-class over word-table-nth
        [ str i ] dip word-break?
    ] if ;

PRIVATE>

: first-word ( str -- i )
    [ unclip-slice word-break-prop over <enum> ] keep
    '[ swap _ word-break-next ] assoc-find 2drop
    nip swap length or 1 + ;

: >words ( str -- words )

! Copyright (C) 2008 Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.syntax arrays assocs combinators
combinators.short-circuit compiler.units fry interval-maps io
io.encodings.ascii io.files kernel literals locals make math
math.parser math.ranges memoize namespaces sequences
sequences.private sets simple-flat-file splitting
unicode.categories unicode.categories.syntax unicode.data
unicode.normalize unicode.normalize.private values words ;
FROM: sequences => change-nth ;
IN: unicode.breaks

