ICU-2555 RBBI line break reverse rule modified for better performance

X-SVN-Rev: 10562
This commit is contained in:
Andy Heninger 2002-12-09 22:36:10 +00:00
parent 8745b2cda9
commit cb90bfba0f

View File

@ -376,8 +376,12 @@ $Openings $GluedWord $Closings $paiyannoi /
#
# Reverse Rules.
#
# Back up to a hard break.
# TODO: make smarter reverse rules for better efficiency
# Back up to a hard break or a space that will cause a boundary.
# Not all spaces cause line breaks. $SpaceGlue represents a sequence
# containing a space that may inhibit a break from occuring.
#
! . . [^$BK | $CR | $LF]* (. | $LF $CR);
! .*;
$SpaceGlue = ([$ZW $CL $IS $NS $OP] ($Extend* $SP)) | (($Extend* $SP)+ $OP);
$ClumpingChars = [^$SP $BK $CR $LF];
!. . $ClumpingChars* ($SpaceGlue $ClumpingChars*)* (. | $LF $CR);