blob: 72c4a44720cd2d5a3862401e7d329001cb45e7f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#
# Copyright (C) 2002-2003, International Business Machines Corporation and others.
# All Rights Reserved.
#
# file: char.txt
#
# ICU Character Break Rules, also known as Grapheme Cluster Boundaries
# See Unicode Standard Annex #29.
# These rules are based on TR29 Version 4.0.0
#
#
# Character Class Definitions.
# The names are those from TR29.
#
$CR = \r;
$LF = \n;
$Control = [[:Zl:] [:Zp:] [:Cc:] [:Cf:]];
# add Japanese Half Width voicing marks to $Extend
$VoiceMarks = [\uff9e\uff9f];
$cmcextend = [ \u0903 \u093e-\u0940 \u0949-\u094C \u09bf-\u09c0 \u09c7-\u09c8 \u09cb-\u09cc \u0bc1-\u0bc2 \u0bc6-\u0bc8 \u0bca-\u0bcc \u0c01-\u0c03 \u0c41-\u0c44];
$Extend = [[:Grapheme_Extend = TRUE:] $VoiceMarks $cmcextend];
#
# Korean Syllable Definitions
#
$L = [:Hangul_Syllable_Type = L:];
$V = [:Hangul_Syllable_Type = V:];
$T = [:Hangul_Syllable_Type = T:];
$LV = [:Hangul_Syllable_Type = LV:];
$LVT = [:Hangul_Syllable_Type = LVT:];
$HangulSyllable = $L+ | ($L* ($LV? $V+ | $LV | $LVT) $T*) | $T+;
#
# Forward Break Rules
#
$CR $LF;
([^$Control] | $HangulSyllable) $Extend*;
.;
#
# Reverse Rule, back up to the beginning of some preceding grapheme cluster.
#
! ($Extend | $V | $T )* ($LF $CR | ($LV | $LVT)?$L* | .);
|