2 # Copyright (C) 2002-2006, 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 5.0.0
10 # Includes post-5.0 change to treat Japanese half width voicing marks
15 # Character Class Definitions.
17 $CR = [\p{Grapheme_Cluster_Break = CR}];
18 $LF = [\p{Grapheme_Cluster_Break = LF}];
19 $Control = [\p{Grapheme_Cluster_Break = Control}];
21 # add Japanese Half Width voicing marks to $Extend
22 $VoiceMarks = [\uff9e\uff9f];
23 $Extend = [\p{Grapheme_Cluster_Break = Extend} $VoiceMarks];
26 # Korean Syllable Definitions
28 $L = [\p{Grapheme_Cluster_Break = L}];
29 $V = [\p{Grapheme_Cluster_Break = V}];
30 $T = [\p{Grapheme_Cluster_Break = T}];
32 $LV = [\p{Grapheme_Cluster_Break = LV}];
33 $LVT = [\p{Grapheme_Cluster_Break = LVT}];
35 $HangulSyllable = $L+ | ($L* ($LV? $V+ | $LV | $LVT) $T*) | $T+;
37 ## -------------------------------------------------
42 ([^$Control $CR $LF] | $HangulSyllable) $Extend*;
44 ## -------------------------------------------------
48 $BackHangulSyllable = $L+ | ($T* ($V+$LV? | $LV | $LVT) $L*) | $T+;
49 $BackOneCluster = ($LF $CR) | ($Extend* ([^$Control $CR $LF] | $BackHangulSyllable));
52 ## -------------------------------------------------
59 ## -------------------------------------------------