 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
+math.parser math.ranges memoize namespaces parser sequences
 sets simple-flat-file splitting unicode.categories
 unicode.categories.syntax unicode.data unicode.normalize
-unicode.normalize.private words ;
+unicode.normalize.private words words.constant ;
 FROM: sequences => change-nth ;
 IN: unicode.breaks
 
 <PRIVATE
+
 ! Grapheme breaks
-
+<<
 CONSTANT: Any 0
 CONSTANT: L 1
 CONSTANT: V 2

    { "ExtendNumLet" 12 }
}

: word-break-prop ( char -- word-break-prop )
    word-break-table get-global interval-at
    word-break-classes at [ wOther ] unless* ;

SYMBOL: check-letter-before
SYMBOL: check-letter-after
SYMBOL: check-number-before

    graphemes iota { SpacingMark } connect
    { Prepend } graphemes iota connect ;

"grapheme-table" create-in
graphemes init-table table
[ make-grapheme-table finish-table ] with-variable
define-constant
>>

: grapheme-break? ( class1 class2 -- ? )
    grapheme-table nth nth not ;

PRIVATE>

