@@ -1518,7 +1518,7 @@ High16 and High32: the highest bit is always one
15181518The items are ordered in increasing order, so binary search can be
15191519used to find the lower bound of an input character. The lower bound
15201520is the highest item, which value is less or equal than the input
1521- character. If the lower bit of the item is cleard , or the character
1521+ character. If the lower bit of the item is cleared , or the character
15221522stored in the item equals to the input character, the input
15231523character is in the character list. */
15241524
@@ -1539,14 +1539,19 @@ character is in the character list. */
15391539#define XCL_CHAR_LIST_HIGH_32_END 0xffffffff
15401540#define XCL_CHAR_LIST_HIGH_32_ADD 0x80000000
15411541
1542- /* Mask for getting the descriptors of character list ranges.
1543- Each descriptor has XCL_TYPE_BIT_LEN bits, and can be processed
1544- by XCL_BEGIN_WITH_RANGE and XCL_ITEM_COUNT_MASK macros. */
1542+ /* Mask and length values for getting the descriptors of
1543+ all character list ranges. The bit length of each descriptor
1544+ is XCL_TYPE_BIT_LEN so the total size is 4*XCL_TYPE_BIT_LEN
1545+ (currently 12 bit). This data is stored for all four character
1546+ lists, even if no characters are present in a list. */
15451547#define XCL_TYPE_MASK 0xfff
15461548#define XCL_TYPE_BIT_LEN 3
1547- /* If this bit is set, the first item of the character list is the
1548- end of a range, which started before the starting character of the
1549- character list. */
1549+ /* If this bit is set for a character class, the first item of the
1550+ character list is the end of a range, which started before the
1551+ starting character of the character list. If this bit is set, and
1552+ no characters are present in the list, the whole character class
1553+ is part of a range. E.g: [\x{500}-\x{12000}] covers the entire
1554+ 0x8000-0xffff range. */
15501555#define XCL_BEGIN_WITH_RANGE 0x4
15511556/* Number of items in the character list: 0, 1, or 2. The value 3
15521557represents that the item count is stored at the begining of the
0 commit comments