| OLD | NEW |
| 1 # Copyright (c) 2002-2010 International Business Machines Corporation and | 1 # Copyright (c) 2002-2010 International Business Machines Corporation and |
| 2 # others. All Rights Reserved. | 2 # others. All Rights Reserved. |
| 3 # | 3 # |
| 4 # file: line.txt | 4 # file: line.txt |
| 5 # | 5 # |
| 6 # Line Breaking Rules | 6 # Line Breaking Rules |
| 7 # Implement default line breaking as defined by | 7 # Implement default line breaking as defined by |
| 8 # Unicode Standard Annex #14 Revision 24 for Unicode 6.0 | 8 # Unicode Standard Annex #14 Revision 24 for Unicode 6.0 |
| 9 # http://www.unicode.org/reports/tr14/ | 9 # http://www.unicode.org/reports/tr14/ |
| 10 # | 10 # |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 # | 51 # |
| 52 # If the CM is unattached, we need to force a break. | 52 # If the CM is unattached, we need to force a break. |
| 53 # | 53 # |
| 54 # !!lookAheadHardBreak forces the run time state machine to | 54 # !!lookAheadHardBreak forces the run time state machine to |
| 55 # stop immediately when a look ahead rule ( '/' operator) matches, | 55 # stop immediately when a look ahead rule ( '/' operator) matches, |
| 56 # and set the match position to that of the look-ahead operator, | 56 # and set the match position to that of the look-ahead operator, |
| 57 # no matter what other rules may be in play at the time. | 57 # no matter what other rules may be in play at the time. |
| 58 # | 58 # |
| 59 # See rule LB 19 for an example. | 59 # See rule LB 19 for an example. |
| 60 # | 60 # |
| 61 $SmallHira = [\u3041 \u3043 \u3045 \u3047 \u3049 \u3063 \u3083 \u3085 \u3087 \u3
08E \u3095 \u3096]; |
| 62 $SmallKata = [\u30A1 \u30A3 \u30A5 \u30A7 \u30A9 \u30C3 \u30E3 \u30E5 \u30E7 \u3
0EE \u30F5 \u30F6]; |
| 63 $SmallKataExt = [\u31F0 \u31F1 \u31F2 \u31F3 \u31F4 \u31F5 \u31F6 \u31F7 \u31F8
\u31F9 \u31FA \u31FB \u31FC \u31FD \u31FE \u31FF]; |
| 64 $SmallKanaAndProlongedMark = [[$SmallHira] [$SmallKata] [$SmallKataExt] [\u30FC]
]; |
| 65 |
| 61 | 66 |
| 62 $AI = [:LineBreak = Ambiguous:]; | 67 $AI = [:LineBreak = Ambiguous:]; |
| 63 $AL = [[:LineBreak = Alphabetic:] - [[:Hebrew:] & [:Letter:]] - [\u23B4\u23B5]]
; | 68 $AL = [[:LineBreak = Alphabetic:] - [[:Hebrew:] & [:Letter:]] - [\u23B4\u23B5]]
; |
| 64 $HL = [[:Hebrew:] & [:Letter:]]; | 69 $HL = [[:Hebrew:] & [:Letter:]]; |
| 65 $BA = [[:LineBreak = Break_After:] - [\u2010]]; | 70 $BA = [[:LineBreak = Break_After:] - [\u2010]]; |
| 66 $HH = [\u2010]; | 71 $HH = [\u2010]; |
| 67 $BB = [:LineBreak = Break_Before:]; | 72 $BB = [:LineBreak = Break_Before:]; |
| 68 $BK = [:LineBreak = Mandatory_Break:]; | 73 $BK = [:LineBreak = Mandatory_Break:]; |
| 69 $B2 = [:LineBreak = Break_Both:]; | 74 $B2 = [:LineBreak = Break_Both:]; |
| 70 $CB = [:LineBreak = Contingent_Break:]; | 75 $CB = [:LineBreak = Contingent_Break:]; |
| 71 $CL = [[:LineBreak = Close_Punctuation:] [\uFE51\uFE10\u23B5]]; | 76 $CL = [[:LineBreak = Close_Punctuation:] [\uFE51\uFE10\u23B5]]; |
| 72 $CM = [:LineBreak = Combining_Mark:]; | 77 $CM = [:LineBreak = Combining_Mark:]; |
| 73 $CP = [:LineBreak = Close_Parenthesis:]; | 78 $CP = [:LineBreak = Close_Parenthesis:]; |
| 74 $CR = [:LineBreak = Carriage_Return:]; | 79 $CR = [:LineBreak = Carriage_Return:]; |
| 75 $EX = [:LineBreak = Exclamation:]; | 80 $EX = [:LineBreak = Exclamation:]; |
| 76 $GL = [:LineBreak = Glue:]; | 81 $GL = [:LineBreak = Glue:]; |
| 77 $HY = [:LineBreak = Hyphen:]; | 82 $HY = [:LineBreak = Hyphen:]; |
| 78 $H2 = [:LineBreak = H2:]; | 83 $H2 = [:LineBreak = H2:]; |
| 79 $H3 = [:LineBreak = H3:]; | 84 $H3 = [:LineBreak = H3:]; |
| 80 $ID = [[:LineBreak = Ideographic:] - [\uFE51]]; | 85 $ID = [[[:LineBreak = Ideographic:] - [\uFE51]] [$SmallKanaAndProlongedMark]]; |
| 81 $IN = [:LineBreak = Inseperable:]; | 86 $IN = [:LineBreak = Inseperable:]; |
| 82 $IS = [[:LineBreak = Infix_Numeric:] - [\uFE10]]; | 87 $IS = [[:LineBreak = Infix_Numeric:] - [\uFE10]]; |
| 83 $JL = [:LineBreak = JL:]; | 88 $JL = [:LineBreak = JL:]; |
| 84 $JV = [:LineBreak = JV:]; | 89 $JV = [:LineBreak = JV:]; |
| 85 $JT = [:LineBreak = JT:]; | 90 $JT = [:LineBreak = JT:]; |
| 86 $LF = [:LineBreak = Line_Feed:]; | 91 $LF = [:LineBreak = Line_Feed:]; |
| 87 $NL = [:LineBreak = Next_Line:]; | 92 $NL = [:LineBreak = Next_Line:]; |
| 88 $NS = [:LineBreak = Nonstarter:]; | 93 $NS = [[:LineBreak = Nonstarter:] - [$SmallKanaAndProlongedMark]]; |
| 89 $NU = [:LineBreak = Numeric:]; | 94 $NU = [:LineBreak = Numeric:]; |
| 90 $OP = [[:LineBreak = Open_Punctuation:] \u23B4]; | 95 $OP = [[:LineBreak = Open_Punctuation:] \u23B4]; |
| 91 $PO = [:LineBreak = Postfix_Numeric:]; | 96 $PO = [:LineBreak = Postfix_Numeric:]; |
| 92 $PR = [:LineBreak = Prefix_Numeric:]; | 97 $PR = [:LineBreak = Prefix_Numeric:]; |
| 93 $QU = [:LineBreak = Quotation:]; | 98 $QU = [:LineBreak = Quotation:]; |
| 94 $SA = [:LineBreak = Complex_Context:]; | 99 $SA = [:LineBreak = Complex_Context:]; |
| 95 $SG = [:LineBreak = Surrogate:]; | 100 $SG = [:LineBreak = Surrogate:]; |
| 96 $SP = [:LineBreak = Space:]; | 101 $SP = [:LineBreak = Space:]; |
| 97 $SY = [:LineBreak = Break_Symbols:]; | 102 $SY = [:LineBreak = Break_Symbols:]; |
| 98 $WJ = [:LineBreak = Word_Joiner:]; | 103 $WJ = [:LineBreak = Word_Joiner:]; |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 # of context. | 652 # of context. |
| 648 # | 653 # |
| 649 # It might be slightly more efficient to have specific rules | 654 # It might be slightly more efficient to have specific rules |
| 650 # instead of one generic one, but only if we could | 655 # instead of one generic one, but only if we could |
| 651 # turn off rule chaining. We don't want to move more | 656 # turn off rule chaining. We don't want to move more |
| 652 # than necessary. | 657 # than necessary. |
| 653 # | 658 # |
| 654 [$CM $OP $QU $CL $CP $B2 $PR $HY $SP $dictionary]+ [^$CM $OP $QU $CL $CP $B2 $PR
$HY $dictionary]; | 659 [$CM $OP $QU $CL $CP $B2 $PR $HY $SP $dictionary]+ [^$CM $OP $QU $CL $CP $B2 $PR
$HY $dictionary]; |
| 655 $dictionary $dictionary; | 660 $dictionary $dictionary; |
| 656 | 661 |
| OLD | NEW |