2 # Copyright (C) 2002-2003, International Business Machines Corporation and others.
7 # ICU Character Break Rules, also known as Grapheme Cluster Boundaries
8 # See Unicode Standard Annex #29.
9 # These rules are based on TR29 Version 4.0.0
13 # Character Class Definitions.
14 # The names are those from TR29.
18 $Control = [[:Zl:] [:Zp:] [:Cc:] [:Cf:]];
20 # add Japanese Half Width voicing marks to $Extend
21 $VoiceMarks = [\uff9e\uff9f];
22 $cmcextend = [ \u0903 \u093e-\u0940 \u0949-\u094C \u09bf-\u09c0 \u09c7-\u09c8 \u09cb-\u09cc \u0bc1-\u0bc2 \u0bc6-\u0bc8 \u0bca-\u0bcc \u0c01-\u0c03 \u0c41-\u0c44];
23 $Extend = [[:Grapheme_Extend = TRUE:] $VoiceMarks $cmcextend];
26 # Korean Syllable Definitions
28 $L = [:Hangul_Syllable_Type = L:];
29 $V = [:Hangul_Syllable_Type = V:];
30 $T = [:Hangul_Syllable_Type = T:];
32 $LV = [:Hangul_Syllable_Type = LV:];
33 $LVT = [:Hangul_Syllable_Type = LVT:];
35 $HangulSyllable = $L+ | ($L* ($LV? $V+ | $LV | $LVT) $T*) | $T+;
41 ([^$Control] | $HangulSyllable) $Extend*;
46 # Reverse Rule, back up to the beginning of some preceding grapheme cluster.
48 ! ($Extend | $V | $T )* ($LF $CR | ($LV | $LVT)?$L* | .);