X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/b25be06635768807f8f693286fa73bb2297bb06c..4388f060552cc537e71e957d32f35e9d75a61233:/icuSources/data/brkitr/line.txt diff --git a/icuSources/data/brkitr/line.txt b/icuSources/data/brkitr/line.txt index bd27b5e0..dcad39bd 100644 --- a/icuSources/data/brkitr/line.txt +++ b/icuSources/data/brkitr/line.txt @@ -1,11 +1,11 @@ -# Copyright (c) 2002-2010 International Business Machines Corporation and +# Copyright (c) 2002-2011 International Business Machines Corporation and # others. All Rights Reserved. # # file: line.txt # # Line Breaking Rules # Implement default line breaking as defined by -# Unicode Standard Annex #14 Revision 24 for Unicode 6.0 +# Unicode Standard Annex #14 Revision 28 for Unicode 6.1 # http://www.unicode.org/reports/tr14/ # # TODO: Rule LB 8 remains as it was in Unicode 5.2 @@ -63,12 +63,14 @@ $BB = [:LineBreak = Break_Before:]; $BK = [:LineBreak = Mandatory_Break:]; $B2 = [:LineBreak = Break_Both:]; $CB = [:LineBreak = Contingent_Break:]; +$CJ = [:LineBreak = Conditional_Japanese_Starter:]; $CL = [:LineBreak = Close_Punctuation:]; $CM = [:LineBreak = Combining_Mark:]; $CP = [:LineBreak = Close_Parenthesis:]; $CR = [:LineBreak = Carriage_Return:]; $EX = [:LineBreak = Exclamation:]; $GL = [:LineBreak = Glue:]; +$HL = [:LineBreak = Hebrew_Letter:]; $HY = [:LineBreak = Hyphen:]; $H2 = [:LineBreak = H2:]; $H3 = [:LineBreak = H3:]; @@ -80,7 +82,7 @@ $JV = [:LineBreak = JV:]; $JT = [:LineBreak = JT:]; $LF = [:LineBreak = Line_Feed:]; $NL = [:LineBreak = Next_Line:]; -$NS = [:LineBreak = Nonstarter:]; +$NS = [[:LineBreak = Nonstarter:] $CJ]; $NU = [:LineBreak = Numeric:]; $OP = [:LineBreak = Open_Punctuation:]; $PO = [:LineBreak = Postfix_Numeric:]; @@ -121,6 +123,7 @@ $CLcm = $CL $CM*; $CPcm = $CP $CM*; $EXcm = $EX $CM*; $GLcm = $GL $CM*; +$HLcm = $HL $CM*; $HYcm = $HY $CM*; $H2cm = $H2 $CM*; $H3cm = $H3 $CM*; @@ -154,6 +157,7 @@ $CL $CM+; $CP $CM+; $EX $CM+; $GL $CM+; +$HL $CM+; $HY $CM+; $H2 $CM+; $H3 $CM+; @@ -190,7 +194,7 @@ $CANT_CM = [ $SP $BK $CR $LF $NL $ZW $CM]; # Bases that can't take CMs # so for this one case we need to manually list out longer sequences. # $AL_FOLLOW_NOCM = [$BK $CR $LF $NL $ZW $SP]; -$AL_FOLLOW_CM = [$CL $CP $EX $IS $SY $WJ $GL $OP $QU $BA $HY $NS $IN $NU $ALPlus]; +$AL_FOLLOW_CM = [$CL $CP $EX $HL $IS $SY $WJ $GL $OP $QU $BA $HY $NS $IN $NU $ALPlus]; $AL_FOLLOW = [$AL_FOLLOW_NOCM $AL_FOLLOW_CM]; @@ -330,8 +334,13 @@ $LB20NonBreaks $CM* ($BAcm | $HYcm | $NScm); $BBcm [^$CB]; # $BB x $BBcm $LB20NonBreaks $CM*; +# LB 21a Don't break after Hebrew + Hyphen +# HL (HY | BA) x +# +$HLcm ($HYcm | $BAcm) [^$CB]?; + # LB 22 -$ALcm $INcm; +($ALcm | $HLcm) $INcm; $CM+ $INcm; # by rule 10, any otherwise unattached CM behaves as AL $IDcm $INcm; $INcm $INcm; @@ -341,15 +350,17 @@ $NUcm $INcm; # $LB 23 $IDcm $POcm; $ALcm $NUcm; # includes $LB19 +$HLcm $NUcm; $CM+ $NUcm; # Rule 10, any otherwise unattached CM behaves as AL $NUcm $ALcm; +$NUcm $HLcm; # # LB 24 # $PRcm $IDcm; -$PRcm $ALcm; -$POcm $ALcm; +$PRcm ($ALcm | $HLcm); +$POcm ($ALcm | $HLcm); # # LB 25 Numbers. @@ -370,16 +381,16 @@ $PRcm ($JLcm | $JVcm | $JTcm | $H2cm | $H3cm); # LB 28 Do not break between alphabetics # -$ALcm $ALcm; -$CM+ $ALcm; # The $CM+ is from rule 10, an unattached CM is treated as AL +($ALcm | $HLcm) ($ALcm | $HLcm); +$CM+ ($ALcm | $HLcm); # The $CM+ is from rule 10, an unattached CM is treated as AL # LB 29 -$IScm $ALcm; +$IScm ($ALcm | $HLcm); # LB 30 -($ALcm | $NUcm) $OPcm; +($ALcm | $HLcm | $NUcm) $OPcm; $CM+ $OPcm; # The $CM+ is from rule 10, an unattached CM is treated as AL. -$CPcm ($ALcm | $NUcm); +$CPcm ($ALcm | $HLcm | $NUcm); # @@ -397,6 +408,7 @@ $CM+ $CL; $CM+ $CP; $CM+ $EX; $CM+ $GL; +$CM+ $HL; $CM+ $HY; $CM+ $H2; $CM+ $H3; @@ -554,23 +566,25 @@ $CM* ($BA | $HY | $NS) $CM* [$LB20NonBreaks-$CM]; # . x (BA | HY | NS) $CM* [$LB20NonBreaks-$CM] $CM* $BB; # BB x . [^$CB] $CM* $BB; # +# LB21a +[^$CB] $CM* ($HY | $BA) $CM* $HL; # LB 22 -$CM* $IN $CM* $ALPlus; +$CM* $IN $CM* ($ALPlus | $HL); $CM* $IN $CM* $ID; $CM* $IN $CM* $IN; $CM* $IN $CM* $NU; # LB 23 $CM* $PO $CM* $ID; -$CM* $NU $CM* $ALPlus; -$CM* $ALPlus $CM* $NU; +$CM* $NU $CM* ($ALPlus | $HL); +$CM* ($ALPlus | $HL) $CM* $NU; # LB 24 $CM* $ID $CM* $PR; -$CM* $ALPlus $CM* $PR; -$CM* $ALPlus $CM* $PO; +$CM* ($ALPlus | $HL) $CM* $PR; +$CM* ($ALPlus | $HL) $CM* $PO; # LB 25 @@ -587,15 +601,15 @@ $CM* $PO $CM* ($H3 | $H2 | $JT | $JV | $JL); $CM* ($H3 | $H2 | $JT | $JV | $JL) $CM* $PR; # LB 28 -$CM* $ALPlus $CM* $ALPlus; +$CM* ($ALPlus | $HL) $CM* ($ALPlus | $HL); # LB 29 -$CM* $ALPlus $CM* $IS; +$CM* ($ALPlus | $HL) $CM* $IS; # LB 30 -$CM* $OP $CM* ($ALPlus | $NU); -$CM* ($ALPlus | $NU) $CM* $CP; +$CM* $OP $CM* ($ALPlus | $HL | $NU); +$CM* ($ALPlus | $HL | $NU) $CM* $CP; ## ------------------------------------------------- @@ -618,6 +632,9 @@ $SP+ $CM* ($CL | $CP); # LB 17 $SP+ $CM* $B2; +# LB 21 +$CM* ($HY | $BA) $CM* $HL; + # LB 25 ($CM* ($IS | $SY))+ $CM* $NU; ($CL | $CP) $CM* ($NU | $IS | $SY); @@ -638,6 +655,6 @@ $dictionary $dictionary; # turn off rule chaining. We don't want to move more # than necessary. # -[$CM $OP $QU $CL $CP $B2 $PR $HY $SP $dictionary]+ [^$CM $OP $QU $CL $CP $B2 $PR $HY $dictionary]; +[$CM $OP $QU $CL $CP $B2 $PR $HY $BA $SP $dictionary]+ [^$CM $OP $QU $CL $CP $B2 $PR $HY $BA $dictionary]; $dictionary $dictionary;