Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / icu / source / data / brkitr / line.txt
1 # Copyright (c) 2002-2013  International Business Machines Corporation and
2 # others. All Rights Reserved.
3 #
4 #  file:  line.txt
5 #
6 #         Line Breaking Rules
7 #         Implement default line breaking as defined by 
8 #         Unicode Standard Annex #14 Revision 29 for Unicode 6.2
9 #         http://www.unicode.org/reports/tr14/
10 #
11 #         TODO:  Rule LB 8 remains as it was in Unicode 5.2
12 #         This is only because of a limitation of ICU break engine implementation,
13 #         not because the older behavior is desirable.
14
15 # CHROME: 1. Use line_ja.txt to apply small kana rules in all locales.
16 #         2. Adjust CL, OP, and IS to handle 'comma-variants' consistently.
17
18 !!chain;
19 !!LBCMNoChain;
20
21
22 !!lookAheadHardBreak;
23 #
24 #  !!lookAheadHardBreak    Described here because it is (as yet) undocumented elsewhere
25 #                          and only used for the line break rules.
26 #
27 #           It is used in the implementation of rule LB 10
28 #           which says to treat any combining mark that is not attached to a base
29 #           character as if it were of class AL  (alphabetic).
30 #
31 #           The problem occurs in the reverse rules.
32 #
33 #           Consider a sequence like, with correct breaks as shown
34 #               LF  ID  CM  AL  AL
35 #                  ^       ^       ^
36 #           Then consider the sequence without the initial ID (ideographic)
37 #                 LF  CM  AL  AL
38 #                    ^           ^
39 #           Our CM, which in the first example was attached to the ideograph,
40 #           is now unattached, becomes an alpha, and joins in with the other
41 #           alphas.
42 #
43 #           When iterating forwards, these sequences do not present any problems
44 #           When iterating backwards, we need to look ahead when encountering
45 #           a CM to see whether it attaches to something further on or not.
46 #           (Look-ahead in a reverse rule is looking towards the start)
47 #
48 #           If the CM is unattached, we need to force a break.
49 #
50 #           !!lookAheadHardBreak forces the run time state machine to
51 #           stop immediately when a look ahead rule ( '/' operator) matches,
52 #           and set the match position to that of the look-ahead operator,
53 #           no matter what other rules may be in play at the time.
54 #
55 #           See rule LB 19 for an example.
56 #
57
58 $AI = [:LineBreak =  Ambiguous:];
59 $AL = [[:LineBreak =  Alphabetic:] - [\u23B4\u23B5]];
60 $BA = [:LineBreak =  Break_After:];
61 $BB = [:LineBreak =  Break_Before:];
62 $BK = [:LineBreak =  Mandatory_Break:];
63 $B2 = [:LineBreak =  Break_Both:];
64 $CB = [:LineBreak =  Contingent_Break:];
65 $CJ = [:LineBreak =  Conditional_Japanese_Starter:];
66 $CL = [[:LineBreak =  Close_Punctuation:] [\uFE51\uFE10\u23B5]];
67 $CM = [:LineBreak =  Combining_Mark:];
68 $CP = [:LineBreak =  Close_Parenthesis:];
69 $CR = [:LineBreak =  Carriage_Return:];
70 $EX = [:LineBreak =  Exclamation:];
71 $GL = [:LineBreak =  Glue:];
72 $HL = [:LineBreak =  Hebrew_Letter:];
73 $HY = [:LineBreak =  Hyphen:];
74 $H2 = [:LineBreak =  H2:];
75 $H3 = [:LineBreak =  H3:];
76 $ID = [[[:LineBreak =  Ideographic:] $CJ] - [\uFE51]];
77 $IN = [:LineBreak =  Inseperable:];
78 $IS = [[:LineBreak =  Infix_Numeric:] - [\uFE10]];
79 $JL = [:LineBreak =  JL:];
80 $JV = [:LineBreak =  JV:];
81 $JT = [:LineBreak =  JT:];
82 $LF = [:LineBreak =  Line_Feed:];
83 $NL = [:LineBreak =  Next_Line:];
84 $NS = [:LineBreak =  Nonstarter:];
85 $NU = [:LineBreak =  Numeric:];
86 $OP = [[:LineBreak =  Open_Punctuation:] \u23B4];
87 $PO = [:LineBreak =  Postfix_Numeric:];
88 $PR = [:LineBreak =  Prefix_Numeric:];
89 $QU = [:LineBreak =  Quotation:];
90 $RI = [:LineBreak =  Regional_Indicator:];
91 $SA = [:LineBreak =  Complex_Context:];
92 $SG = [:LineBreak =  Surrogate:];
93 $SP = [:LineBreak =  Space:];
94 $SY = [:LineBreak =  Break_Symbols:];
95 $WJ = [:LineBreak =  Word_Joiner:];
96 $XX = [:LineBreak =  Unknown:];
97 $ZW = [:LineBreak =  ZWSpace:];
98
99 #   Dictionary character set, for triggering language-based break engines. Currently
100 #   limited to LineBreak=Complex_Context. Note that this set only works in Unicode
101 #   5.0 or later as the definition of Complex_Context was corrected to include all
102 #   characters requiring dictionary break.
103
104 $dictionary = [:LineBreak = Complex_Context:];
105
106 #
107 #  Rule LB1.  By default, treat AI  (characters with ambiguous east Asian width),
108 #                               SA  (South East Asian: Thai, Lao, Khmer)
109 #                               SG  (Unpaired Surrogates)
110 #                               XX  (Unknown, unassigned)
111 #                         as $AL  (Alphabetic)
112 #
113 $ALPlus = [$AL $AI $SA $SG $XX];
114
115 #
116 #  Combining Marks.   X $CM*  behaves as if it were X.  Rule LB6.
117 #
118 $ALcm = $ALPlus $CM*;
119 $BAcm = $BA $CM*;
120 $BBcm = $BB $CM*;
121 $B2cm = $B2 $CM*;
122 $CLcm = $CL $CM*;
123 $CPcm = $CP $CM*;
124 $EXcm = $EX $CM*;
125 $GLcm = $GL $CM*;
126 $HLcm = $HL $CM*;
127 $HYcm = $HY $CM*;
128 $H2cm = $H2 $CM*;
129 $H3cm = $H3 $CM*;
130 $IDcm = $ID $CM*;
131 $INcm = $IN $CM*;
132 $IScm = $IS $CM*;
133 $JLcm = $JL $CM*;
134 $JVcm = $JV $CM*;
135 $JTcm = $JT $CM*;
136 $NScm = $NS $CM*;
137 $NUcm = $NU $CM*;
138 $OPcm = $OP $CM*;
139 $POcm = $PO $CM*;
140 $PRcm = $PR $CM*;
141 $QUcm = $QU $CM*;
142 $RIcm = $RI $CM*;
143 $SYcm = $SY $CM*;
144 $WJcm = $WJ $CM*;
145
146 ## -------------------------------------------------
147
148 !!forward;
149
150 #
151 #  Each class of character can stand by itself as an unbroken token, with trailing combining stuff
152 #
153 $ALPlus $CM+;
154 $BA $CM+;
155 $BB $CM+;
156 $B2 $CM+;
157 $CL $CM+;
158 $CP $CM+;
159 $EX $CM+;
160 $GL $CM+;
161 $HL $CM+;
162 $HY $CM+;
163 $H2 $CM+;
164 $H3 $CM+;
165 $ID $CM+;
166 $IN $CM+;
167 $IS $CM+;
168 $JL $CM+;
169 $JV $CM+;
170 $JT $CM+;
171 $NS $CM+;
172 $NU $CM+;
173 $OP $CM+;
174 $PO $CM+;
175 $PR $CM+;
176 $QU $CM+;
177 $RI $CM+;
178 $SY $CM+;
179 $WJ $CM+;
180
181 #
182 # CAN_CM  is the set of characters that may combine with CM combining chars.
183 #         Note that Linebreak UAX 14's concept of a combining char and the rules
184 #         for what they can combine with are _very_ different from the rest of Unicode.
185 #
186 #         Note that $CM itself is left out of this set.  If CM is needed as a base
187 #         it must be listed separately in the rule.
188 #
189 $CAN_CM  = [^$SP $BK $CR $LF $NL $ZW $CM];       # Bases that can   take CMs
190 $CANT_CM = [ $SP $BK $CR $LF $NL $ZW $CM];       # Bases that can't take CMs
191
192 #
193 # AL_FOLLOW  set of chars that can unconditionally follow an AL
194 #            Needed in rules where stand-alone $CM s are treated as AL.
195 #            Chaining is disabled with CM because it causes other failures,
196 #            so for this one case we need to manually list out longer sequences.
197 #
198 $AL_FOLLOW_NOCM = [$BK $CR $LF $NL $ZW $SP];
199 $AL_FOLLOW_CM   = [$CL $CP $EX $HL $IS $SY $WJ $GL $OP $QU $BA $HY $NS $IN $NU $ALPlus];
200 $AL_FOLLOW      = [$AL_FOLLOW_NOCM $AL_FOLLOW_CM];
201
202
203 #
204 #  Rule LB 4, 5    Mandatory (Hard) breaks.
205 #
206 $LB4Breaks    = [$BK $CR $LF $NL];
207 $LB4NonBreaks = [^$BK $CR $LF $NL];
208 $CR $LF {100};
209
210 #
211 #  LB 6    Do not break before hard line breaks.
212 #
213 $LB4NonBreaks?  $LB4Breaks {100};    # LB 5  do not break before hard breaks.
214 $CAN_CM $CM*    $LB4Breaks {100};
215 $CM+            $LB4Breaks {100};
216
217 # LB 7         x SP
218 #              x ZW
219 $LB4NonBreaks [$SP $ZW];
220 $CAN_CM $CM*  [$SP $ZW];
221 $CM+          [$SP $ZW];
222
223 #
224 # LB 8         Break after zero width space
225 #              TODO:  ZW SP* <break>
226 #              An engine change is required to write the reverse rule for this.
227 #              For now, leave the Unicode 5.2 rule, ZW <break>
228 #
229 $LB8Breaks    = [$LB4Breaks $ZW];
230 $LB8NonBreaks = [[$LB4NonBreaks] - [$ZW]];
231
232
233 # LB 9     Combining marks.      X   $CM needs to behave like X, where X is not $SP, $BK $CR $LF $NL 
234 #                                $CM not covered by the above needs to behave like $AL   
235 #                                See definition of $CAN_CM.
236
237 $CAN_CM $CM+;                   #  Stick together any combining sequences that don't match other rules.
238 $CM+;
239
240 #
241 # LB 11  Do not break before or after WORD JOINER & related characters.
242 #
243 $CAN_CM $CM*  $WJcm;
244 $LB8NonBreaks $WJcm;
245 $CM+          $WJcm;
246
247 $WJcm $CANT_CM;
248 $WJcm $CAN_CM $CM*;
249
250 #
251 # LB 12  Do not break after NBSP and related characters.
252 #         GL  x
253 #
254 $GLcm $CAN_CM $CM*;
255 $GLcm $CANT_CM;
256  
257 #
258 # LB 12a  Do not break before NBSP and related characters ...
259 #            [^SP BA HY] x GL
260 #
261 [[$LB8NonBreaks] - [$SP $BA $HY]] $CM* $GLcm;
262 $CM+ GLcm;
263
264
265
266 #
267 # LB 13   Don't break before ']' or '!' or ';' or '/', even after spaces.
268 #
269 $LB8NonBreaks $CL;
270 $CAN_CM $CM*  $CL;
271 $CM+          $CL;              # by rule 10, stand-alone CM behaves as AL
272
273 $LB8NonBreaks $CP;
274 $CAN_CM $CM*  $CP;
275 $CM+          $CP;              # by rule 10, stand-alone CM behaves as AL
276
277 $LB8NonBreaks $EX;
278 $CAN_CM $CM*  $EX;
279 $CM+          $EX;              # by rule 10, stand-alone CM behaves as AL
280
281 $LB8NonBreaks $IS;
282 $CAN_CM $CM*  $IS;
283 $CM+          $IS;              # by rule 10, stand-alone CM behaves as AL
284
285 $LB8NonBreaks $SY;
286 $CAN_CM $CM*  $SY;
287 $CM+          $SY;              # by rule 10, stand-alone CM behaves as AL
288
289
290 #
291 # LB 14  Do not break after OP, even after spaces
292 #
293 $OPcm $SP* $CAN_CM $CM*;
294 $OPcm $SP* $CANT_CM;
295
296 $OPcm $SP+ $CM+ $AL_FOLLOW?;    # by rule 10, stand-alone CM behaves as AL
297
298 # LB 15
299 $QUcm $SP* $OPcm;
300
301 # LB 16
302 ($CLcm | $CPcm) $SP* $NScm;
303
304 # LB 17
305 $B2cm $SP* $B2cm;
306
307 #
308 # LB 18  Break after spaces.
309 #
310 $LB18NonBreaks = [$LB8NonBreaks - [$SP]];
311 $LB18Breaks    = [$LB8Breaks $SP];
312
313
314 # LB 19
315 #         x QU
316 $LB18NonBreaks $CM* $QUcm;
317 $CM+                $QUcm;
318
319 #         QU  x
320 $QUcm .?;
321 $QUcm $LB18NonBreaks $CM*;    # Don't let a combining mark go onto $CR, $BK, etc.
322                               #  TODO:  I don't think this rule is needed.
323
324
325 # LB 20
326 #        <break>  $CB
327 #        $CB   <break>
328
329 $LB20NonBreaks = [$LB18NonBreaks - $CB];
330
331 # LB 21        x   (BA | HY | NS)
332 #           BB x
333 #
334 $LB20NonBreaks $CM* ($BAcm | $HYcm | $NScm); 
335
336 $BBcm [^$CB];                                  #  $BB  x
337 $BBcm $LB20NonBreaks $CM*;
338
339 # LB 21a Don't break after Hebrew + Hyphen
340 #   HL (HY | BA) x
341 #  
342 $HLcm ($HYcm | $BAcm) [^$CB]?;
343
344 # LB 21b (forward) Don't break between SY and HL
345 # (break between HL and SY already disallowed by LB 13 above)
346 $SYcm $HLcm;
347
348 # LB 22
349 ($ALcm | $HLcm) $INcm;
350 $CM+     $INcm;     #  by rule 10, any otherwise unattached CM behaves as AL
351 $IDcm    $INcm;
352 $INcm    $INcm;
353 $NUcm    $INcm;
354
355
356 # $LB 23
357 $IDcm  $POcm;
358 $ALcm  $NUcm;       # includes $LB19
359 $HLcm  $NUcm;
360 $CM+   $NUcm;       # Rule 10, any otherwise unattached CM behaves as AL
361 $NUcm  $ALcm;
362 $NUcm  $HLcm;
363
364 #
365 # LB 24
366 #
367 $PRcm $IDcm;
368 $PRcm ($ALcm | $HLcm);
369 $POcm ($ALcm | $HLcm);
370
371 #
372 # LB 25   Numbers.
373 #
374 ($PRcm | $POcm)? ($OPcm | $HYcm)? $NUcm ($NUcm | $SYcm | $IScm)* ($CLcm | $CPcm)? ($PRcm | $POcm)?;
375
376 # LB 26  Do not break a Korean syllable
377 #
378 $JLcm ($JLcm | $JVcm | $H2cm | $H3cm);
379 ($JVcm | $H2cm) ($JVcm | $JTcm);
380 ($JTcm | $H3cm) $JTcm;
381
382 # LB 27  Treat korean Syllable Block the same as ID  (don't break it)
383 ($JLcm | $JVcm | $JTcm | $H2cm | $H3cm) $INcm;
384 ($JLcm | $JVcm | $JTcm | $H2cm | $H3cm) $POcm;
385 $PRcm ($JLcm | $JVcm | $JTcm | $H2cm | $H3cm);
386
387
388 # LB 28   Do not break between alphabetics
389 #
390 ($ALcm | $HLcm) ($ALcm | $HLcm);
391 $CM+ ($ALcm | $HLcm);      # The $CM+ is from rule 10, an unattached CM is treated as AL
392
393 # LB 29
394 $IScm ($ALcm | $HLcm);
395
396 # LB 30
397 ($ALcm | $HLcm | $NUcm) $OPcm;
398 $CM+ $OPcm;         # The $CM+ is from rule 10, an unattached CM is treated as AL.          
399 $CPcm ($ALcm | $HLcm | $NUcm);
400
401 # LB 30a  Do not break between regional indicators.
402 $RIcm $RIcm;
403
404 #
405 #  Reverse Rules.
406 #
407 ## -------------------------------------------------
408
409 !!reverse;
410
411 $CM+ $ALPlus;
412 $CM+ $BA;
413 $CM+ $BB;
414 $CM+ $B2;
415 $CM+ $CL;
416 $CM+ $CP;
417 $CM+ $EX;
418 $CM+ $GL;
419 $CM+ $HL;
420 $CM+ $HY;
421 $CM+ $H2;
422 $CM+ $H3;
423 $CM+ $ID;
424 $CM+ $IN;
425 $CM+ $IS;
426 $CM+ $JL;
427 $CM+ $JV;
428 $CM+ $JT;
429 $CM+ $NS;
430 $CM+ $NU;
431 $CM+ $OP;
432 $CM+ $PO;
433 $CM+ $PR;
434 $CM+ $QU;
435 $CM+ $RI;
436 $CM+ $SY;
437 $CM+ $WJ;
438 $CM+;
439
440
441 #
442 #  Sequences of the form  (shown forwards)
443 #      [CANT_CM]  <break>  [CM]  [whatever]
444 #  The CM needs to behave as an AL
445 #
446 $AL_FOLLOW $CM+ / (
447           [$BK $CR $LF $NL $ZW {eof}] |
448           $SP+ $CM+ $SP |
449           $SP+ $CM* ([^$OP $CM $SP] | [$AL {eof}]));   # if LB 14 will match, need to surpress this break.
450                                                #  LB14 says    OP SP* x .        
451                                                #    becomes    OP SP* x AL
452                                                #    becomes    OP SP* x CM+ AL_FOLLOW
453                                                #
454                                                # Further note:  the $AL in [$AL {eof}] is only to work around
455                                                #                a rule compiler bug which complains about
456                                                #                empty sets otherwise.
457           
458 #
459 #  Sequences of the form  (shown forwards)
460 #      [CANT_CM]  <break> [CM]  <break>  [PR]
461 #  The CM needs to behave as an AL
462 #  This rule is concerned about getting the second of the two <breaks> in place.
463 #
464
465 [$PR   ] / $CM+ [$BK $CR $LF $NL $ZW $SP {eof}];
466
467
468
469 # LB 4, 5, 5
470
471 $LB4Breaks [$LB4NonBreaks-$CM];
472 $LB4Breaks $CM+ $CAN_CM;
473 $LF $CR;
474
475
476 # LB 7         x SP
477 #              x ZW
478 [$SP $ZW] [$LB4NonBreaks-$CM];
479 [$SP $ZW] $CM+ $CAN_CM;
480
481 # LB 8 ZW SP* <break>
482 #     TODO: to implement this, we need more than one look-ahead hard break in play at a time.
483 #           Requires an engine enhancement.
484 #   / $SP* $ZW
485
486 # LB 9,10  Combining marks.
487 #    X   $CM needs to behave like X, where X is not $SP or controls.
488 #    $CM not covered by the above needs to behave like $AL
489 # Stick together any combining sequences that don't match other rules.
490 $CM+ $CAN_CM;
491
492
493 # LB 11
494 $CM* $WJ $CM* $CAN_CM;
495 $CM* $WJ      [$LB8NonBreaks-$CM];
496
497      $CANT_CM $CM* $WJ;
498 $CM* $CAN_CM  $CM* $WJ;
499
500 # LB 12a
501 #      [^SP BA HY] x GL
502 #
503 $CM* $GL $CM* [$LB8NonBreaks-[$CM $SP $BA $HY]];
504
505 # LB 12
506 #     GL  x
507 #
508 $CANT_CM $CM* $GL;
509 $CM* $CAN_CM $CM* $GL;
510
511
512 # LB 13
513 $CL $CM+ $CAN_CM;
514 $CP $CM+ $CAN_CM;
515 $EX $CM+ $CAN_CM;
516 $IS $CM+ $CAN_CM;
517 $SY $CM+ $CAN_CM;
518
519 $CL [$LB8NonBreaks-$CM];
520 $CP [$LB8NonBreaks-$CM];
521 $EX [$LB8NonBreaks-$CM];
522 $IS [$LB8NonBreaks-$CM];
523 $SY [$LB8NonBreaks-$CM];
524
525 # Rule 13 & 14 taken together for an edge case.
526 #   Match this, shown forward
527 #     OP SP+  ($CM+ behaving as $AL) (CL | CP | EX | IS | IY)
528 #   This really wants to chain at the $CM+ (which is acting as an $AL)
529 #   except for $CM chaining being disabled.
530 [$CL $CP $EX $IS $SY] $CM+ $SP+ $CM* $OP;  
531
532 # LB 14    OP SP* x
533 #
534 $CM* $CAN_CM    $SP* $CM* $OP;
535      $CANT_CM   $SP* $CM* $OP;
536 $AL_FOLLOW? $CM+  $SP $SP* $CM* $OP;     #  by LB 10, behaves like $AL_FOLLOW? $AL $SP* $CM* $OP
537      
538      $AL_FOLLOW_NOCM $CM+ $SP+ $CM* $OP;
539 $CM* $AL_FOLLOW_CM   $CM+ $SP+ $CM* $OP;
540 $SY $CM $SP+ $OP;   # TODO:  Experiment.  Remove.
541
542
543
544 # LB 15
545 $CM* $OP $SP* $CM* $QU;
546
547 # LB 16
548 $CM* $NS $SP* $CM* ($CL | $CP);
549
550 # LB 17
551 $CM* $B2 $SP* $CM* $B2;
552
553 # LB 18  break after spaces
554 #        Nothing explicit needed here.
555
556
557 #
558 # LB 19
559 #
560 $CM* $QU $CM* $CAN_CM;                                #   . x QU
561 $CM* $QU      $LB18NonBreaks;
562
563
564 $CM* $CAN_CM  $CM* $QU;                               #   QU x .
565      $CANT_CM $CM* $QU;
566      
567 #
568 #  LB 20  Break before and after CB.
569 #         nothing needed here.
570 #
571
572 # LB 21
573 $CM* ($BA | $HY | $NS) $CM* [$LB20NonBreaks-$CM];     #  . x (BA | HY | NS)
574
575 $CM* [$LB20NonBreaks-$CM] $CM* $BB;                   #  BB x .
576 [^$CB] $CM* $BB;                                      # 
577
578 # LB21a
579 [^$CB] $CM* ($HY | $BA) $CM* $HL;
580
581 # LB21b (reverse)
582 $CM* $HL $CM* $SY;
583
584 # LB 22
585 $CM* $IN $CM* ($ALPlus | $HL);
586 $CM* $IN $CM* $ID;
587 $CM* $IN $CM* $IN;
588 $CM* $IN $CM* $NU;
589
590 # LB 23
591 $CM* $PO $CM* $ID;
592 $CM* $NU $CM* ($ALPlus | $HL);
593 $CM* ($ALPlus | $HL) $CM* $NU;
594
595 # LB 24
596 $CM* $ID $CM* $PR;
597 $CM* ($ALPlus | $HL) $CM* $PR;
598 $CM* ($ALPlus | $HL) $CM* $PO;
599
600
601 # LB 25
602 ($CM* ($PR | $PO))? ($CM* ($CL | $CP))? ($CM* ($NU | $IS | $SY))* $CM* $NU ($CM* ($OP | $HY))? ($CM* ($PR | $PO))?;
603
604 # LB 26
605 $CM* ($H3 | $H2 | $JV | $JL) $CM* $JL;
606 $CM* ($JT | $JV) $CM* ($H2 | $JV);
607 $CM* $JT $CM* ($H3 | $JT);
608
609 # LB 27
610 $CM* $IN $CM* ($H3 | $H2 | $JT | $JV | $JL);
611 $CM* $PO $CM* ($H3 | $H2 | $JT | $JV | $JL);
612 $CM* ($H3 | $H2 | $JT | $JV | $JL) $CM* $PR;
613
614 # LB 28
615 $CM* ($ALPlus | $HL) $CM* ($ALPlus | $HL);
616
617
618 # LB 29
619 $CM* ($ALPlus | $HL) $CM* $IS;
620
621 # LB 30
622 $CM* $OP $CM* ($ALPlus | $HL | $NU);
623 $CM* ($ALPlus | $HL | $NU) $CM* $CP;
624
625 # LB 30a
626 $CM* $RI $CM* $RI;
627
628 ## -------------------------------------------------
629
630 !!safe_reverse;
631
632 # LB 9
633 $CM+ [^$CM $BK $CR $LF $NL $ZW $SP];
634 $CM+ $SP / .;
635
636 # LB 14
637 $SP+ $CM* $OP;
638
639 # LB 15
640 $SP+ $CM* $QU;
641
642 # LB 16
643 $SP+ $CM* ($CL | $CP);
644
645 # LB 17
646 $SP+ $CM* $B2;
647
648 # LB 21
649 $CM* ($HY | $BA) $CM* $HL;
650
651 # LB 25
652 ($CM* ($IS | $SY))+ $CM* $NU;
653 ($CL | $CP) $CM* ($NU | $IS | $SY);
654
655 # For dictionary-based break
656 $dictionary $dictionary;
657
658 ## -------------------------------------------------
659
660 !!safe_forward;
661
662 # Skip forward over all character classes that are involved in
663 #   rules containing patterns with possibly more than one char
664 #   of context.
665 #
666 #  It might be slightly more efficient to have specific rules
667 #  instead of one generic one, but only if we could
668 #  turn off rule chaining.  We don't want to move more
669 #  than necessary.
670 #
671 [$CM $OP $QU $CL $CP $B2 $PR $HY $BA $SP $dictionary]+ [^$CM $OP $QU $CL $CP $B2 $PR $HY $BA $dictionary];
672 $dictionary $dictionary;
673