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