2002-06-25 17:23:07 +00:00
|
|
|
#
|
2002-08-09 03:14:43 +00:00
|
|
|
# Copyright (C) 2002, International Business Machines Corporation and others.
|
|
|
|
# All Rights Reserved.
|
2002-06-25 17:23:07 +00:00
|
|
|
#
|
2002-08-09 03:14:43 +00:00
|
|
|
# file: char.txt
|
|
|
|
#
|
|
|
|
# ICU Character Break Rules, also known as Grapheme Cluster Boundaries
|
|
|
|
# See Unicode Technical Report #29.
|
|
|
|
# These rules are based on the proposed draft dated 2002-08-06
|
2002-06-25 17:23:07 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Character Class Definitions.
|
|
|
|
# The names are those from TR29.
|
|
|
|
#
|
|
|
|
$CR = \r;
|
|
|
|
$LF = \n;
|
2002-08-09 03:14:43 +00:00
|
|
|
$Control = [[:Zl:] [:Zp:] [:Cc:] [:Cf:]];
|
2002-06-25 17:23:07 +00:00
|
|
|
|
2003-04-04 23:41:03 +00:00
|
|
|
$Extend = [[:Grapheme_Extend = TRUE:]];
|
2002-06-25 17:23:07 +00:00
|
|
|
|
|
|
|
#
|
2002-08-09 03:14:43 +00:00
|
|
|
# Korean Syllable Definitions
|
2002-06-25 17:23:07 +00:00
|
|
|
#
|
2003-04-04 23:41:03 +00:00
|
|
|
$L = [:Hangul_Syllable_Type = L:];
|
|
|
|
$V = [:Hangul_Syllable_Type = V:];
|
|
|
|
$T = [:Hangul_Syllable_Type = T:];
|
2002-06-25 17:23:07 +00:00
|
|
|
|
2003-04-04 23:41:03 +00:00
|
|
|
$LV = [:Hangul_Syllable_Type = LV:];
|
|
|
|
$LVT = [:Hangul_Syllable_Type = LVT:];
|
|
|
|
|
|
|
|
$HungulSyllable = $L+ | ($L* ($LV? $V+ | $LV | $LVT) $T*) | $T+;
|
2002-06-25 17:23:07 +00:00
|
|
|
|
|
|
|
$CR $LF;
|
2003-04-04 23:41:03 +00:00
|
|
|
([^$Control] | $HungulSyllable) $Extend*;
|
|
|
|
.;
|
2002-06-25 17:23:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
#
|
2002-08-09 03:14:43 +00:00
|
|
|
# Reverse Rule, back up to the beginning of some preceding grapheme cluster.
|
2002-06-25 17:23:07 +00:00
|
|
|
#
|
2003-04-04 23:41:03 +00:00
|
|
|
! ($Extend | $V | $T )* ($LF $CR | ($LV | $LVT)?$L* | .);
|