X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/f3c0d7a59d99c2a94c6b8822291f0e42be3773c9..340931cb2e044a2141d11567dd0f782524e32994:/icuSources/data/brkitr/rules/sent.txt diff --git a/icuSources/data/brkitr/rules/sent.txt b/icuSources/data/brkitr/rules/sent.txt index 49970ee3..eb1224ea 100644 --- a/icuSources/data/brkitr/rules/sent.txt +++ b/icuSources/data/brkitr/rules/sent.txt @@ -1,6 +1,5 @@ -# -# Copyright (C) 2016 and later: Unicode, Inc. and others. -# License & terms of use: http://www.unicode.org/copyright.html#License +# Copyright (C) 2016 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html # # Copyright (C) 2002-2015, International Business Machines Corporation and others. # All Rights Reserved. @@ -9,9 +8,10 @@ # # ICU Sentence Break Rules # See Unicode Standard Annex #29. -# These rules are based on UAX #29 Revision 26 for Unicode Version 8.0 +# These rules are based on UAX #29 Revision 34 for Unicode Version 12.0 # +!!quoted_literals_only; # # Character categories as defined in TR 29 @@ -34,7 +34,7 @@ $Close = [\p{Sentence_Break = Close}]; # # Define extended forms of the character classes, # incorporate trailing Extend or Format chars. -# Rules 4 and 5. +# Rules 4 and 5. $SpEx = $Sp ($Extend | $Format)*; $LowerEx = $Lower ($Extend | $Format)*; @@ -50,7 +50,6 @@ $CloseEx = $Close ($Extend | $Format)*; ## ------------------------------------------------- !!chain; -!!forward; # Rule 3 - break after separators. Keep CR/LF together. # @@ -79,44 +78,6 @@ $ATermEx $CloseEx* $SpEx* $NotLettersEx* $Lower; #Rule 9, 10, 11 ($STermEx | $ATermEx) $CloseEx* $SpEx* ($Sep | $CR | $LF)?; -#Rule 12 +#Rule 998 [[^$STerm $ATerm $Close $Sp $Sep $LF $CR $Format $Extend]{bof}] ($Extend | $Format | $Close | $Sp)* .; [[^$STerm $ATerm $Close $Sp $Sep $LF $CR $Format $Extend]{bof}] ($Extend | $Format | $Close | $Sp)* ([$Sep $LF $CR {eof}] | $CR $LF){100}; - -## ------------------------------------------------- - -!!reverse; - -$SpEx_R = ($Extend | $Format)* $Sp; -$ATermEx_R = ($Extend | $Format)* $ATerm; -$STermEx_R = ($Extend | $Format)* $STerm; -$CloseEx_R = ($Extend | $Format)* $Close; - -# -# Reverse rules. -# For now, use the old style inexact reverse rules, which are easier -# to write, but less efficient. -# TODO: exact reverse rules. It appears that exact reverse rules -# may require improving support for look-ahead breaks in the -# builder. Needs more investigation. -# - -[{bof}] (.? | $LF $CR) [^$Sep $CR $LF]* [$Sep $CR $LF {eof}] ($SpEx_R* $CloseEx_R* ($STermEx_R | $ATermEx_R))*; -#.*; - -# Explanation for this rule: -# -# It needs to back over -# The $Sep at which we probably begin -# All of the non $Sep chars leading to the preceding $Sep -# The preceding $Sep, which will be the second one that the rule matches. -# Any immediately preceding STerm or ATerm sequences. We need to see these -# to get the correct rule status when moving forwards again. -# -# [{bof}] inhibit rule chaining. Without this, rule would loop on itself and match -# the entire string. -# -# (.? | $LF $CR) Match one $Sep instance. Use .? rather than $Sep because position might be -# at the beginning of the string at this point, and we don't want to fail. -# Can only use {eof} once, and it is used later. -#