2002-06-25 17:23:07 +00:00
|
|
|
#
|
2013-02-15 07:17:59 +00:00
|
|
|
# Copyright (C) 2002-2013, International Business Machines Corporation and others.
|
2002-08-09 03:14:43 +00:00
|
|
|
# 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
|
2003-05-30 16:07:39 +00:00
|
|
|
# See Unicode Standard Annex #29.
|
2012-08-28 23:37:10 +00:00
|
|
|
# These rules are based on UAX #29 Revision 20 for Unicode Version 6.2
|
2002-06-25 17:23:07 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Character Class Definitions.
|
|
|
|
#
|
2008-04-04 22:47:43 +00:00
|
|
|
$CR = [\p{Grapheme_Cluster_Break = CR}];
|
|
|
|
$LF = [\p{Grapheme_Cluster_Break = LF}];
|
|
|
|
$Control = [\p{Grapheme_Cluster_Break = Control}];
|
2011-12-08 22:37:24 +00:00
|
|
|
# TODO: Restore if the Prepend set becomes non-empty again: $Prepend = [\p{Grapheme_Cluster_Break = Prepend}];
|
2008-04-04 22:47:43 +00:00
|
|
|
$Extend = [\p{Grapheme_Cluster_Break = Extend}];
|
|
|
|
$SpacingMark = [\p{Grapheme_Cluster_Break = SpacingMark}];
|
2012-08-28 23:37:10 +00:00
|
|
|
$Regional_Indicator = [\p{Grapheme_Cluster_Break = Regional_Indicator}];
|
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
|
|
|
#
|
2005-04-22 21:49:52 +00:00
|
|
|
$L = [\p{Grapheme_Cluster_Break = L}];
|
|
|
|
$V = [\p{Grapheme_Cluster_Break = V}];
|
|
|
|
$T = [\p{Grapheme_Cluster_Break = T}];
|
2002-06-25 17:23:07 +00:00
|
|
|
|
2005-04-22 21:49:52 +00:00
|
|
|
$LV = [\p{Grapheme_Cluster_Break = LV}];
|
|
|
|
$LVT = [\p{Grapheme_Cluster_Break = LVT}];
|
2003-04-04 23:41:03 +00:00
|
|
|
|
2002-06-25 17:23:07 +00:00
|
|
|
|
2003-11-07 02:02:06 +00:00
|
|
|
## -------------------------------------------------
|
2008-04-04 22:47:43 +00:00
|
|
|
!!chain;
|
2003-11-07 02:02:06 +00:00
|
|
|
|
|
|
|
!!forward;
|
|
|
|
|
2002-06-25 17:23:07 +00:00
|
|
|
$CR $LF;
|
2008-04-04 22:47:43 +00:00
|
|
|
|
|
|
|
$L ($L | $V | $LV | $LVT);
|
|
|
|
($LV | $V) ($V | $T);
|
|
|
|
($LVT | $T) $T;
|
|
|
|
|
2012-08-28 23:37:10 +00:00
|
|
|
$Regional_Indicator $Regional_Indicator;
|
|
|
|
|
2008-04-04 22:47:43 +00:00
|
|
|
[^$Control $CR $LF] $Extend;
|
|
|
|
|
|
|
|
[^$Control $CR $LF] $SpacingMark;
|
2011-12-08 22:37:24 +00:00
|
|
|
# TODO: Restore if the Prepend set becomes non-empty again: $Prepend [^$Control $CR $LF];
|
2008-04-04 22:47:43 +00:00
|
|
|
|
2002-06-25 17:23:07 +00:00
|
|
|
|
2003-11-07 02:02:06 +00:00
|
|
|
## -------------------------------------------------
|
|
|
|
|
|
|
|
!!reverse;
|
2008-04-04 22:47:43 +00:00
|
|
|
$LF $CR;
|
|
|
|
($L | $V | $LV | $LVT) $L;
|
|
|
|
($V | $T) ($LV | $V);
|
|
|
|
$T ($LVT | $T);
|
|
|
|
|
2012-08-28 23:37:10 +00:00
|
|
|
$Regional_Indicator $Regional_Indicator;
|
|
|
|
|
2008-04-04 22:47:43 +00:00
|
|
|
$Extend [^$Control $CR $LF];
|
|
|
|
$SpacingMark [^$Control $CR $LF];
|
2011-12-08 22:37:24 +00:00
|
|
|
# TODO: Restore if the Prepend set becomes non-empty again: [^$Control $CR $LF] $Prepend;
|
2002-06-25 17:23:07 +00:00
|
|
|
|
2003-11-07 02:02:06 +00:00
|
|
|
|
|
|
|
## -------------------------------------------------
|
2013-02-15 07:17:59 +00:00
|
|
|
# We don't logically need safe char break rules, but if we don't provide any at all
|
|
|
|
# the engine for preceding() and following() will fall back to the
|
|
|
|
# old style inefficient algorithm.
|
2003-11-07 02:02:06 +00:00
|
|
|
|
|
|
|
!!safe_reverse;
|
2013-02-15 07:17:59 +00:00
|
|
|
$LF $CR;
|
2003-11-25 00:23:46 +00:00
|
|
|
|
2003-11-09 06:52:44 +00:00
|
|
|
## -------------------------------------------------
|
|
|
|
|
|
|
|
!!safe_forward;
|
2013-02-15 07:17:59 +00:00
|
|
|
$CR $LF;
|
2003-11-09 06:52:44 +00:00
|
|
|
|