+$LB8NonBreaks $SY;
+$CAN_CM $CM* $SY;
+$CM+ $SY; # by rule 10, stand-alone CM behaves as AL
+
+
+#
+# LB 14 Do not break after OP, even after spaces
+#
+$OPcm $SP* $CAN_CM $CM*;
+$OPcm $SP* $CANT_CM;
+
+$OPcm $SP+ $CM+ $AL_FOLLOW?; # by rule 10, stand-alone CM behaves as AL
+
+# LB 15
+$QUcm $SP* $OPcm;
+
+# LB 16
+($CLcm | $CPcm) $SP* $NScm;
+
+# LB 17
+$B2cm $SP* $B2cm;
+
+#
+# LB 18 Break after spaces.
+#
+$LB18NonBreaks = [$LB8NonBreaks - [$SP]];
+$LB18Breaks = [$LB8Breaks $SP];
+
+
+# LB 19
+# x QU
+$LB18NonBreaks $CM* $QUcm;
+$CM+ $QUcm;
+
+# QU x
+$QUcm .?;
+$QUcm $LB18NonBreaks $CM*; # Don't let a combining mark go onto $CR, $BK, etc.
+ # TODO: I don't think this rule is needed.
+
+
+# LB 20
+# <break> $CB
+# $CB <break>
+
+$LB20NonBreaks = [$LB18NonBreaks - $CB];
+
+# LB 21 x (BA | HY | NS)
+# BB x
+#
+$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 21b (forward) Don't break between SY and HL
+# (break between HL and SY already disallowed by LB 13 above)
+$SYcm $HLcm;
+
+# LB 22
+($ALcm | $HLcm) $INcm;
+$CM+ $INcm; # by rule 10, any otherwise unattached CM behaves as AL
+$IDcm $INcm;
+$INcm $INcm;
+$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 | $HLcm);
+$POcm ($ALcm | $HLcm);
+
+#
+# LB 25 Numbers.
+#
+($PRcm | $POcm)? ($OPcm | $HYcm)? $NUcm ($NUcm | $SYcm | $IScm)* ($CLcm | $CPcm)? ($PRcm | $POcm)?;
+
+# LB 26 Do not break a Korean syllable
+#
+$JLcm ($JLcm | $JVcm | $H2cm | $H3cm);
+($JVcm | $H2cm) ($JVcm | $JTcm);
+($JTcm | $H3cm) $JTcm;
+
+# LB 27 Treat korean Syllable Block the same as ID (don't break it)
+($JLcm | $JVcm | $JTcm | $H2cm | $H3cm) $INcm;
+($JLcm | $JVcm | $JTcm | $H2cm | $H3cm) $POcm;
+$PRcm ($JLcm | $JVcm | $JTcm | $H2cm | $H3cm);
+
+
+# LB 28 Do not break between alphabetics
+#
+($ALcm | $HLcm) ($ALcm | $HLcm);
+$CM+ ($ALcm | $HLcm); # The $CM+ is from rule 10, an unattached CM is treated as AL
+
+# LB 29
+$IScm ($ALcm | $HLcm);
+
+# LB 30
+($ALcm | $HLcm | $NUcm) $OPcm;
+$CM+ $OPcm; # The $CM+ is from rule 10, an unattached CM is treated as AL.
+$CPcm ($ALcm | $HLcm | $NUcm);
+
+# LB 30a Do not break between regional indicators.
+$RIcm $RIcm;