documentation update
[cxml-rng.git] / unicode.lisp
bloba6b04544912776e92fde458a4397bcc6fdb42ee4
1 ;;; -*- show-trailing-whitespace: t; indent-tabs: nil -*-
3 ;;; Copyright (c) 2007 David Lichteblau. All rights reserved.
5 ;;; Redistribution and use in source and binary forms, with or without
6 ;;; modification, are permitted provided that the following conditions
7 ;;; are met:
8 ;;;
9 ;;; * Redistributions of source code must retain the above copyright
10 ;;; notice, this list of conditions and the following disclaimer.
11 ;;;
12 ;;; * Redistributions in binary form must reproduce the above
13 ;;; copyright notice, this list of conditions and the following
14 ;;; disclaimer in the documentation and/or other materials
15 ;;; provided with the distribution.
16 ;;;
17 ;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
18 ;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 ;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 ;;; ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
21 ;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 ;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
23 ;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 ;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 ;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 ;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 ;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 (in-package :cxml-types)
31 ;;; FIXME: On Lisps using UTF-16 characters, we are unable to recognize
32 ;;; ranges including code points above #x10000. To do so, we would have
33 ;;; to check for substrings of up to two characters rather than indiviual
34 ;;; characters.
36 (eval-when (:compile-toplevel :load-toplevel :execute)
37 (defconstant +limit-1+ (1- cl-ppcre::*regex-char-code-limit*)))
39 (defconstant +1+ (code-char 1))
41 (defmacro defranges (name form)
42 `(progn
43 (defparameter ,name ,form)
44 (setf (cl-ppcre:parse-tree-synonym ',name) (cons :char-class ,name))))
46 (defmacro defblock (name min max)
47 `(defranges ,name '((:range ,(code-char min) ,(code-char max)))))
49 (defun massage-ranges (l)
50 (mapcar (lambda (x)
51 (list :range (code-char (car x)) (code-char (cadr x))))
52 l))
54 (defun range- (a b)
55 (destructuring-bind (amin amax) (mapcar #'char-code (cdr a))
56 (destructuring-bind (bmin bmax) (mapcar #'char-code (cdr b))
57 (incf amax)
58 (incf bmax)
59 (let ((result nil))
60 (labels ((range* (min max)
61 (when (and (< min max)
62 #-rune-is-utf-16
63 (not (or (<= #xD800 min #xDFFF)
64 (<= #xD800 (1- max) #xDFFF)))
65 #+rune-is-utf-16
66 ;; FIXME: See surrogate comment above.
67 (not (>= max #x10000)))
68 (push (list :range (code-char min) (code-char (1- max)))
69 result))))
70 (range* amin (min bmin amax))
71 (range* (max amin bmax) amax))
72 result))))
74 (defun ranges-range (aa b)
75 (mapcan (lambda (a) (range- a b)) aa))
77 (defun ranges- (aa &rest bb)
78 (dolist (b bb)
79 (dolist (l b)
80 (setf aa (ranges-range aa l))))
81 aa)
83 (defblock |p{isBasicLatin}| 0 127)
84 (defblock |p{isLatin-1Supplement}| 128 255)
85 (defblock |p{isLatinExtended-A}| 256 383)
86 (defblock |p{isLatinExtended-B}| 384 591)
87 (defblock |p{isIPAExtensions}| 592 687)
88 (defblock |p{isSpacingModifierLetters}| 688 767)
89 (defblock |p{isCombiningDiacriticalMarks}| 768 879)
90 (defblock |p{isGreek}| 880 1023)
91 (defblock |p{isCyrillic}| 1024 1279)
92 (defblock |p{isArmenian}| 1328 1423)
93 (defblock |p{isHebrew}| 1424 1535)
94 (defblock |p{isArabic}| 1536 1791)
95 (defblock |p{isSyriac}| 1792 1871)
96 (defblock |p{isThaana}| 1920 1983)
97 (defblock |p{isDevanagari}| 2304 2431)
98 (defblock |p{isBengali}| 2432 2559)
99 (defblock |p{isGurmukhi}| 2560 2687)
100 (defblock |p{isGujarati}| 2688 2815)
101 (defblock |p{isOriya}| 2816 2943)
102 (defblock |p{isTamil}| 2944 3071)
103 (defblock |p{isTelugu}| 3072 3199)
104 (defblock |p{isKannada}| 3200 3327)
105 (defblock |p{isMalayalam}| 3328 3455)
106 (defblock |p{isSinhala}| 3456 3583)
107 (defblock |p{isThai}| 3584 3711)
108 (defblock |p{isLao}| 3712 3839)
109 (defblock |p{isTibetan}| 3840 4095)
110 (defblock |p{isMyanmar}| 4096 4255)
111 (defblock |p{isGeorgian}| 4256 4351)
112 (defblock |p{isHangulJamo}| 4352 4607)
113 (defblock |p{isEthiopic}| 4608 4991)
114 (defblock |p{isCherokee}| 5024 5119)
115 (defblock |p{isUnifiedCanadianAboriginalSyllabics}| 5120 5759)
116 (defblock |p{isOgham}| 5760 5791)
117 (defblock |p{isRunic}| 5792 5887)
118 (defblock |p{isKhmer}| 6016 6143)
119 (defblock |p{isMongolian}| 6144 6319)
120 (defblock |p{isLatinExtendedAdditional}| 7680 7935)
121 (defblock |p{isGreekExtended}| 7936 8191)
122 (defblock |p{isGeneralPunctuation}| 8192 8303)
123 (defblock |p{isSuperscriptsandSubscripts}| 8304 8351)
124 (defblock |p{isCurrencySymbols}| 8352 8399)
125 (defblock |p{isCombiningMarksforSymbols}| 8400 8447)
126 (defblock |p{isLetterlikeSymbols}| 8448 8527)
127 (defblock |p{isNumberForms}| 8528 8591)
128 (defblock |p{isArrows}| 8592 8703)
129 (defblock |p{isMathematicalOperators}| 8704 8959)
130 (defblock |p{isMiscellaneousTechnical}| 8960 9215)
131 (defblock |p{isControlPictures}| 9216 9279)
132 (defblock |p{isOpticalCharacterRecognition}| 9280 9311)
133 (defblock |p{isEnclosedAlphanumerics}| 9312 9471)
134 (defblock |p{isBoxDrawing}| 9472 9599)
135 (defblock |p{isBlockElements}| 9600 9631)
136 (defblock |p{isGeometricShapes}| 9632 9727)
137 (defblock |p{isMiscellaneousSymbols}| 9728 9983)
138 (defblock |p{isDingbats}| 9984 10175)
139 (defblock |p{isBraillePatterns}| 10240 10495)
140 (defblock |p{isCJKRadicalsSupplement}| 11904 12031)
141 (defblock |p{isKangxiRadicals}| 12032 12255)
142 (defblock |p{isIdeographicDescriptionCharacters}| 12272 12287)
143 (defblock |p{isCJKSymbolsandPunctuation}| 12288 12351)
144 (defblock |p{isHiragana}| 12352 12447)
145 (defblock |p{isKatakana}| 12448 12543)
146 (defblock |p{isBopomofo}| 12544 12591)
147 (defblock |p{isHangulCompatibilityJamo}| 12592 12687)
148 (defblock |p{isKanbun}| 12688 12703)
149 (defblock |p{isBopomofoExtended}| 12704 12735)
150 (defblock |p{isEnclosedCJKLettersandMonths}| 12800 13055)
151 (defblock |p{isCJKCompatibility}| 13056 13311)
152 (defblock |p{isCJKUnifiedIdeographsExtensionA}| 13312 19893)
153 (defblock |p{isCJKUnifiedIdeographs}| 19968 40959)
154 (defblock |p{isYiSyllables}| 40960 42127)
155 (defblock |p{isYiRadicals}| 42128 42191)
156 (defblock |p{isHangulSyllables}| 44032 55203)
157 (defblock |p{isPrivateUse}| 57344 63743)
158 (defblock |p{isCJKCompatibilityIdeographs}| 63744 64255)
159 (defblock |p{isAlphabeticPresentationForms}| 64256 64335)
160 (defblock |p{isArabicPresentationForms-A}| 64336 65023)
161 (defblock |p{isCombiningHalfMarks}| 65056 65071)
162 (defblock |p{isCJKCompatibilityForms}| 65072 65103)
163 (defblock |p{isSmallFormVariants}| 65104 65135)
164 (defblock |p{isArabicPresentationForms-B}| 65136 65278)
165 (defblock |p{isSpecials}| 65279 65279)
166 (defblock |p{isHalfwidthandFullwidthForms}| 65280 65519)
167 (defblock |p{isSpecials}| 65520 65533)
169 (DEFRANGES |p{Lu}|
170 (MASSAGE-RANGES
171 '((65 90) (192 214) (216 222) (256 256) (258 258) (260 260) (262 262)
172 (264 264) (266 266) (268 268) (270 270) (272 272) (274 274) (276 276)
173 (278 278) (280 280) (282 282) (284 284) (286 286) (288 288) (290 290)
174 (292 292) (294 294) (296 296) (298 298) (300 300) (302 302) (304 304)
175 (306 306) (308 308) (310 310) (313 313) (315 315) (317 317) (319 319)
176 (321 321) (323 323) (325 325) (327 327) (330 330) (332 332) (334 334)
177 (336 336) (338 338) (340 340) (342 342) (344 344) (346 346) (348 348)
178 (350 350) (352 352) (354 354) (356 356) (358 358) (360 360) (362 362)
179 (364 364) (366 366) (368 368) (370 370) (372 372) (374 374) (376 377)
180 (379 379) (381 381) (385 386) (388 388) (390 391) (393 395) (398 401)
181 (403 404) (406 408) (412 413) (415 416) (418 418) (420 420) (422 423)
182 (425 425) (428 428) (430 431) (433 435) (437 437) (439 440) (444 444)
183 (452 452) (455 455) (458 458) (461 461) (463 463) (465 465) (467 467)
184 (469 469) (471 471) (473 473) (475 475) (478 478) (480 480) (482 482)
185 (484 484) (486 486) (488 488) (490 490) (492 492) (494 494) (497 497)
186 (500 500) (502 504) (506 506) (508 508) (510 510) (512 512) (514 514)
187 (516 516) (518 518) (520 520) (522 522) (524 524) (526 526) (528 528)
188 (530 530) (532 532) (534 534) (536 536) (538 538) (540 540) (542 542)
189 (546 546) (548 548) (550 550) (552 552) (554 554) (556 556) (558 558)
190 (560 560) (562 562) (902 902) (904 906) (908 908) (910 911) (913 929)
191 (931 939) (978 980) (986 986) (988 988) (990 990) (992 992) (994 994)
192 (996 996) (998 998) (1000 1000) (1002 1002) (1004 1004) (1006 1006)
193 (1012 1012) (1024 1071) (1120 1120) (1122 1122) (1124 1124)
194 (1126 1126) (1128 1128) (1130 1130) (1132 1132) (1134 1134)
195 (1136 1136) (1138 1138) (1140 1140) (1142 1142) (1144 1144)
196 (1146 1146) (1148 1148) (1150 1150) (1152 1152) (1164 1164)
197 (1166 1166) (1168 1168) (1170 1170) (1172 1172) (1174 1174)
198 (1176 1176) (1178 1178) (1180 1180) (1182 1182) (1184 1184)
199 (1186 1186) (1188 1188) (1190 1190) (1192 1192) (1194 1194)
200 (1196 1196) (1198 1198) (1200 1200) (1202 1202) (1204 1204)
201 (1206 1206) (1208 1208) (1210 1210) (1212 1212) (1214 1214)
202 (1216 1217) (1219 1219) (1223 1223) (1227 1227) (1232 1232)
203 (1234 1234) (1236 1236) (1238 1238) (1240 1240) (1242 1242)
204 (1244 1244) (1246 1246) (1248 1248) (1250 1250) (1252 1252)
205 (1254 1254) (1256 1256) (1258 1258) (1260 1260) (1262 1262)
206 (1264 1264) (1266 1266) (1268 1268) (1272 1272) (1329 1366)
207 (4256 4293) (7680 7680) (7682 7682) (7684 7684) (7686 7686)
208 (7688 7688) (7690 7690) (7692 7692) (7694 7694) (7696 7696)
209 (7698 7698) (7700 7700) (7702 7702) (7704 7704) (7706 7706)
210 (7708 7708) (7710 7710) (7712 7712) (7714 7714) (7716 7716)
211 (7718 7718) (7720 7720) (7722 7722) (7724 7724) (7726 7726)
212 (7728 7728) (7730 7730) (7732 7732) (7734 7734) (7736 7736)
213 (7738 7738) (7740 7740) (7742 7742) (7744 7744) (7746 7746)
214 (7748 7748) (7750 7750) (7752 7752) (7754 7754) (7756 7756)
215 (7758 7758) (7760 7760) (7762 7762) (7764 7764) (7766 7766)
216 (7768 7768) (7770 7770) (7772 7772) (7774 7774) (7776 7776)
217 (7778 7778) (7780 7780) (7782 7782) (7784 7784) (7786 7786)
218 (7788 7788) (7790 7790) (7792 7792) (7794 7794) (7796 7796)
219 (7798 7798) (7800 7800) (7802 7802) (7804 7804) (7806 7806)
220 (7808 7808) (7810 7810) (7812 7812) (7814 7814) (7816 7816)
221 (7818 7818) (7820 7820) (7822 7822) (7824 7824) (7826 7826)
222 (7828 7828) (7840 7840) (7842 7842) (7844 7844) (7846 7846)
223 (7848 7848) (7850 7850) (7852 7852) (7854 7854) (7856 7856)
224 (7858 7858) (7860 7860) (7862 7862) (7864 7864) (7866 7866)
225 (7868 7868) (7870 7870) (7872 7872) (7874 7874) (7876 7876)
226 (7878 7878) (7880 7880) (7882 7882) (7884 7884) (7886 7886)
227 (7888 7888) (7890 7890) (7892 7892) (7894 7894) (7896 7896)
228 (7898 7898) (7900 7900) (7902 7902) (7904 7904) (7906 7906)
229 (7908 7908) (7910 7910) (7912 7912) (7914 7914) (7916 7916)
230 (7918 7918) (7920 7920) (7922 7922) (7924 7924) (7926 7926)
231 (7928 7928) (7944 7951) (7960 7965) (7976 7983) (7992 7999)
232 (8008 8013) (8025 8025) (8027 8027) (8029 8029) (8031 8031)
233 (8040 8047) (8120 8123) (8136 8139) (8152 8155) (8168 8172)
234 (8184 8187) (8450 8450) (8455 8455) (8459 8461) (8464 8466)
235 (8469 8469) (8473 8477) (8484 8484) (8486 8486) (8488 8488)
236 (8490 8493) (8496 8497) (8499 8499) (65313 65338) (66560 66597)
237 (119808 119833) (119860 119885) (119912 119937) (119964 119964)
238 (119966 119967) (119970 119970) (119973 119974) (119977 119980)
239 (119982 119989) (120016 120041) (120068 120069) (120071 120074)
240 (120077 120084) (120086 120092) (120120 120121) (120123 120126)
241 (120128 120132) (120134 120134) (120138 120144) (120172 120197)
242 (120224 120249) (120276 120301) (120328 120353) (120380 120405)
243 (120432 120457) (120488 120512) (120546 120570) (120604 120628)
244 (120662 120686) (120720 120744))))
246 (DEFRANGES |p{Ll}|
247 (MASSAGE-RANGES
248 '((97 122) (170 170) (181 181) (186 186) (223 246) (248 255) (257 257)
249 (259 259) (261 261) (263 263) (265 265) (267 267) (269 269) (271 271)
250 (273 273) (275 275) (277 277) (279 279) (281 281) (283 283) (285 285)
251 (287 287) (289 289) (291 291) (293 293) (295 295) (297 297) (299 299)
252 (301 301) (303 303) (305 305) (307 307) (309 309) (311 312) (314 314)
253 (316 316) (318 318) (320 320) (322 322) (324 324) (326 326) (328 329)
254 (331 331) (333 333) (335 335) (337 337) (339 339) (341 341) (343 343)
255 (345 345) (347 347) (349 349) (351 351) (353 353) (355 355) (357 357)
256 (359 359) (361 361) (363 363) (365 365) (367 367) (369 369) (371 371)
257 (373 373) (375 375) (378 378) (380 380) (382 384) (387 387) (389 389)
258 (392 392) (396 397) (402 402) (405 405) (409 411) (414 414) (417 417)
259 (419 419) (421 421) (424 424) (426 427) (429 429) (432 432) (436 436)
260 (438 438) (441 442) (445 447) (454 454) (457 457) (460 460) (462 462)
261 (464 464) (466 466) (468 468) (470 470) (472 472) (474 474) (476 477)
262 (479 479) (481 481) (483 483) (485 485) (487 487) (489 489) (491 491)
263 (493 493) (495 496) (499 499) (501 501) (505 505) (507 507) (509 509)
264 (511 511) (513 513) (515 515) (517 517) (519 519) (521 521) (523 523)
265 (525 525) (527 527) (529 529) (531 531) (533 533) (535 535) (537 537)
266 (539 539) (541 541) (543 543) (547 547) (549 549) (551 551) (553 553)
267 (555 555) (557 557) (559 559) (561 561) (563 563) (592 685) (912 912)
268 (940 974) (976 977) (981 983) (987 987) (989 989) (991 991) (993 993)
269 (995 995) (997 997) (999 999) (1001 1001) (1003 1003) (1005 1005)
270 (1007 1011) (1013 1013) (1072 1119) (1121 1121) (1123 1123)
271 (1125 1125) (1127 1127) (1129 1129) (1131 1131) (1133 1133)
272 (1135 1135) (1137 1137) (1139 1139) (1141 1141) (1143 1143)
273 (1145 1145) (1147 1147) (1149 1149) (1151 1151) (1153 1153)
274 (1165 1165) (1167 1167) (1169 1169) (1171 1171) (1173 1173)
275 (1175 1175) (1177 1177) (1179 1179) (1181 1181) (1183 1183)
276 (1185 1185) (1187 1187) (1189 1189) (1191 1191) (1193 1193)
277 (1195 1195) (1197 1197) (1199 1199) (1201 1201) (1203 1203)
278 (1205 1205) (1207 1207) (1209 1209) (1211 1211) (1213 1213)
279 (1215 1215) (1218 1218) (1220 1220) (1224 1224) (1228 1228)
280 (1233 1233) (1235 1235) (1237 1237) (1239 1239) (1241 1241)
281 (1243 1243) (1245 1245) (1247 1247) (1249 1249) (1251 1251)
282 (1253 1253) (1255 1255) (1257 1257) (1259 1259) (1261 1261)
283 (1263 1263) (1265 1265) (1267 1267) (1269 1269) (1273 1273)
284 (1377 1415) (7681 7681) (7683 7683) (7685 7685) (7687 7687)
285 (7689 7689) (7691 7691) (7693 7693) (7695 7695) (7697 7697)
286 (7699 7699) (7701 7701) (7703 7703) (7705 7705) (7707 7707)
287 (7709 7709) (7711 7711) (7713 7713) (7715 7715) (7717 7717)
288 (7719 7719) (7721 7721) (7723 7723) (7725 7725) (7727 7727)
289 (7729 7729) (7731 7731) (7733 7733) (7735 7735) (7737 7737)
290 (7739 7739) (7741 7741) (7743 7743) (7745 7745) (7747 7747)
291 (7749 7749) (7751 7751) (7753 7753) (7755 7755) (7757 7757)
292 (7759 7759) (7761 7761) (7763 7763) (7765 7765) (7767 7767)
293 (7769 7769) (7771 7771) (7773 7773) (7775 7775) (7777 7777)
294 (7779 7779) (7781 7781) (7783 7783) (7785 7785) (7787 7787)
295 (7789 7789) (7791 7791) (7793 7793) (7795 7795) (7797 7797)
296 (7799 7799) (7801 7801) (7803 7803) (7805 7805) (7807 7807)
297 (7809 7809) (7811 7811) (7813 7813) (7815 7815) (7817 7817)
298 (7819 7819) (7821 7821) (7823 7823) (7825 7825) (7827 7827)
299 (7829 7835) (7841 7841) (7843 7843) (7845 7845) (7847 7847)
300 (7849 7849) (7851 7851) (7853 7853) (7855 7855) (7857 7857)
301 (7859 7859) (7861 7861) (7863 7863) (7865 7865) (7867 7867)
302 (7869 7869) (7871 7871) (7873 7873) (7875 7875) (7877 7877)
303 (7879 7879) (7881 7881) (7883 7883) (7885 7885) (7887 7887)
304 (7889 7889) (7891 7891) (7893 7893) (7895 7895) (7897 7897)
305 (7899 7899) (7901 7901) (7903 7903) (7905 7905) (7907 7907)
306 (7909 7909) (7911 7911) (7913 7913) (7915 7915) (7917 7917)
307 (7919 7919) (7921 7921) (7923 7923) (7925 7925) (7927 7927)
308 (7929 7929) (7936 7943) (7952 7957) (7968 7975) (7984 7991)
309 (8000 8005) (8016 8023) (8032 8039) (8048 8061) (8064 8071)
310 (8080 8087) (8096 8103) (8112 8116) (8118 8119) (8126 8126)
311 (8130 8132) (8134 8135) (8144 8147) (8150 8151) (8160 8167)
312 (8178 8180) (8182 8183) (8319 8319) (8458 8458) (8462 8463)
313 (8467 8467) (8495 8495) (8500 8500) (8505 8505) (64256 64262)
314 (64275 64279) (65345 65370) (66600 66637) (119834 119859)
315 (119886 119892) (119894 119911) (119938 119963) (119990 119993)
316 (119995 119995) (119997 120000) (120002 120003) (120005 120015)
317 (120042 120067) (120094 120119) (120146 120171) (120198 120223)
318 (120250 120275) (120302 120327) (120354 120379) (120406 120431)
319 (120458 120483) (120514 120538) (120540 120545) (120572 120596)
320 (120598 120603) (120630 120654) (120656 120661) (120688 120712)
321 (120714 120719) (120746 120770) (120772 120777))))
323 (DEFRANGES |p{Lt}|
324 (MASSAGE-RANGES
325 '((453 453) (456 456) (459 459) (498 498) (8072 8079) (8088 8095)
326 (8104 8111) (8124 8124) (8140 8140) (8188 8188))))
328 (DEFRANGES |p{Lm}|
329 (MASSAGE-RANGES
330 '((688 696) (699 705) (720 721) (736 740) (750 750) (890 890)
331 (1369 1369) (1600 1600) (1765 1766) (3654 3654) (3782 3782)
332 (6211 6211) (12293 12293) (12337 12341) (12445 12446) (12540 12542)
333 (65392 65392) (65438 65439))))
335 (DEFRANGES |p{Lo}|
336 (MASSAGE-RANGES
337 '((443 443) (448 451) (1488 1514) (1520 1522) (1569 1594) (1601 1610)
338 (1649 1747) (1749 1749) (1786 1788) (1808 1808) (1810 1836)
339 (1920 1957) (2309 2361) (2365 2365) (2384 2384) (2392 2401)
340 (2437 2444) (2447 2448) (2451 2472) (2474 2480) (2482 2482)
341 (2486 2489) (2524 2525) (2527 2529) (2544 2545) (2565 2570)
342 (2575 2576) (2579 2600) (2602 2608) (2610 2611) (2613 2614)
343 (2616 2617) (2649 2652) (2654 2654) (2674 2676) (2693 2699)
344 (2701 2701) (2703 2705) (2707 2728) (2730 2736) (2738 2739)
345 (2741 2745) (2749 2749) (2768 2768) (2784 2784) (2821 2828)
346 (2831 2832) (2835 2856) (2858 2864) (2866 2867) (2870 2873)
347 (2877 2877) (2908 2909) (2911 2913) (2949 2954) (2958 2960)
348 (2962 2965) (2969 2970) (2972 2972) (2974 2975) (2979 2980)
349 (2984 2986) (2990 2997) (2999 3001) (3077 3084) (3086 3088)
350 (3090 3112) (3114 3123) (3125 3129) (3168 3169) (3205 3212)
351 (3214 3216) (3218 3240) (3242 3251) (3253 3257) (3294 3294)
352 (3296 3297) (3333 3340) (3342 3344) (3346 3368) (3370 3385)
353 (3424 3425) (3461 3478) (3482 3505) (3507 3515) (3517 3517)
354 (3520 3526) (3585 3632) (3634 3635) (3648 3653) (3713 3714)
355 (3716 3716) (3719 3720) (3722 3722) (3725 3725) (3732 3735)
356 (3737 3743) (3745 3747) (3749 3749) (3751 3751) (3754 3755)
357 (3757 3760) (3762 3763) (3773 3773) (3776 3780) (3804 3805)
358 (3840 3840) (3904 3911) (3913 3946) (3976 3979) (4096 4129)
359 (4131 4135) (4137 4138) (4176 4181) (4304 4342) (4352 4441)
360 (4447 4514) (4520 4601) (4608 4614) (4616 4678) (4680 4680)
361 (4682 4685) (4688 4694) (4696 4696) (4698 4701) (4704 4742)
362 (4744 4744) (4746 4749) (4752 4782) (4784 4784) (4786 4789)
363 (4792 4798) (4800 4800) (4802 4805) (4808 4814) (4816 4822)
364 (4824 4846) (4848 4878) (4880 4880) (4882 4885) (4888 4894)
365 (4896 4934) (4936 4954) (5024 5108) (5121 5740) (5743 5750)
366 (5761 5786) (5792 5866) (6016 6067) (6176 6210) (6212 6263)
367 (6272 6312) (8501 8504) (12294 12294) (12353 12436) (12449 12538)
368 (12549 12588) (12593 12686) (12704 12727) (13312 19893) (19968 40869)
369 (40960 42124) (44032 55203) (63744 64045) (64285 64285) (64287 64296)
370 (64298 64310) (64312 64316) (64318 64318) (64320 64321) (64323 64324)
371 (64326 64433) (64467 64829) (64848 64911) (64914 64967) (65008 65019)
372 (65136 65138) (65140 65140) (65142 65276) (65382 65391) (65393 65437)
373 (65440 65470) (65474 65479) (65482 65487) (65490 65495) (65498 65500)
374 (66304 66334) (66352 66377) (131072 173782) (194560 195101))))
376 (DEFRANGES |p{Mn}|
377 (MASSAGE-RANGES
378 '((768 846) (864 866) (1155 1158) (1425 1441) (1443 1465) (1467 1469)
379 (1471 1471) (1473 1474) (1476 1476) (1611 1621) (1648 1648)
380 (1750 1756) (1759 1764) (1767 1768) (1770 1773) (1809 1809)
381 (1840 1866) (1958 1968) (2305 2306) (2364 2364) (2369 2376)
382 (2381 2381) (2385 2388) (2402 2403) (2433 2433) (2492 2492)
383 (2497 2500) (2509 2509) (2530 2531) (2562 2562) (2620 2620)
384 (2625 2626) (2631 2632) (2635 2637) (2672 2673) (2689 2690)
385 (2748 2748) (2753 2757) (2759 2760) (2765 2765) (2817 2817)
386 (2876 2876) (2879 2879) (2881 2883) (2893 2893) (2902 2902)
387 (2946 2946) (3008 3008) (3021 3021) (3134 3136) (3142 3144)
388 (3146 3149) (3157 3158) (3263 3263) (3270 3270) (3276 3277)
389 (3393 3395) (3405 3405) (3530 3530) (3538 3540) (3542 3542)
390 (3633 3633) (3636 3642) (3655 3662) (3761 3761) (3764 3769)
391 (3771 3772) (3784 3789) (3864 3865) (3893 3893) (3895 3895)
392 (3897 3897) (3953 3966) (3968 3972) (3974 3975) (3984 3991)
393 (3993 4028) (4038 4038) (4141 4144) (4146 4146) (4150 4151)
394 (4153 4153) (4184 4185) (6071 6077) (6086 6086) (6089 6099)
395 (6313 6313) (8400 8412) (8417 8417) (12330 12335) (12441 12442)
396 (64286 64286) (65056 65059) (119143 119145) (119163 119170)
397 (119173 119179) (119210 119213))))
399 (DEFRANGES |p{Mc}|
400 (MASSAGE-RANGES
401 '((2307 2307) (2366 2368) (2377 2380) (2434 2435) (2494 2496)
402 (2503 2504) (2507 2508) (2519 2519) (2622 2624) (2691 2691)
403 (2750 2752) (2761 2761) (2763 2764) (2818 2819) (2878 2878)
404 (2880 2880) (2887 2888) (2891 2892) (2903 2903) (2947 2947)
405 (3006 3007) (3009 3010) (3014 3016) (3018 3020) (3031 3031)
406 (3073 3075) (3137 3140) (3202 3203) (3262 3262) (3264 3268)
407 (3271 3272) (3274 3275) (3285 3286) (3330 3331) (3390 3392)
408 (3398 3400) (3402 3404) (3415 3415) (3458 3459) (3535 3537)
409 (3544 3551) (3570 3571) (3902 3903) (3967 3967) (4140 4140)
410 (4145 4145) (4152 4152) (4182 4183) (6068 6070) (6078 6085)
411 (6087 6088) (119141 119142) (119149 119154))))
413 (DEFRANGES |p{Me}|
414 (MASSAGE-RANGES '((1160 1161) (1757 1758) (8413 8416) (8418 8419))))
416 (DEFRANGES |p{Nd}|
417 (MASSAGE-RANGES
418 '((48 57) (1632 1641) (1776 1785) (2406 2415) (2534 2543) (2662 2671)
419 (2790 2799) (2918 2927) (3047 3055) (3174 3183) (3302 3311)
420 (3430 3439) (3664 3673) (3792 3801) (3872 3881) (4160 4169)
421 (4969 4977) (6112 6121) (6160 6169) (65296 65305) (120782 120831))))
423 (DEFRANGES |p{Nl}|
424 (MASSAGE-RANGES
425 '((5870 5872) (8544 8579) (12295 12295) (12321 12329) (12344 12346)
426 (66378 66378))))
428 (DEFRANGES |p{No}|
429 (MASSAGE-RANGES
430 '((178 179) (185 185) (188 190) (2548 2553) (3056 3058) (3882 3891)
431 (4978 4988) (8304 8304) (8308 8313) (8320 8329) (8531 8543)
432 (9312 9371) (9450 9450) (10102 10131) (12690 12693) (12832 12841)
433 (12928 12937) (66336 66339))))
435 (DEFRANGES |p{Pc}|
436 (MASSAGE-RANGES
437 '((95 95) (8255 8256) (12539 12539) (65075 65076) (65101 65103)
438 (65343 65343) (65381 65381))))
440 (DEFRANGES |p{Pd}|
441 (MASSAGE-RANGES
442 '((45 45) (173 173) (1418 1418) (6150 6150) (8208 8213) (12316 12316)
443 (12336 12336) (65073 65074) (65112 65112) (65123 65123)
444 (65293 65293))))
446 (DEFRANGES |p{Ps}|
447 (MASSAGE-RANGES
448 '((40 40) (91 91) (123 123) (3898 3898) (3900 3900) (5787 5787)
449 (8218 8218) (8222 8222) (8261 8261) (8317 8317) (8333 8333)
450 (9001 9001) (12296 12296) (12298 12298) (12300 12300) (12302 12302)
451 (12304 12304) (12308 12308) (12310 12310) (12312 12312) (12314 12314)
452 (12317 12317) (64830 64830) (65077 65077) (65079 65079) (65081 65081)
453 (65083 65083) (65085 65085) (65087 65087) (65089 65089) (65091 65091)
454 (65113 65113) (65115 65115) (65117 65117) (65288 65288) (65339 65339)
455 (65371 65371) (65378 65378))))
457 (DEFRANGES |p{Pe}|
458 (MASSAGE-RANGES
459 '((41 41) (93 93) (125 125) (3899 3899) (3901 3901) (5788 5788)
460 (8262 8262) (8318 8318) (8334 8334) (9002 9002) (12297 12297)
461 (12299 12299) (12301 12301) (12303 12303) (12305 12305) (12309 12309)
462 (12311 12311) (12313 12313) (12315 12315) (12318 12319) (64831 64831)
463 (65078 65078) (65080 65080) (65082 65082) (65084 65084) (65086 65086)
464 (65088 65088) (65090 65090) (65092 65092) (65114 65114) (65116 65116)
465 (65118 65118) (65289 65289) (65341 65341) (65373 65373)
466 (65379 65379))))
468 (DEFRANGES |p{Pi}|
469 (MASSAGE-RANGES
470 '((171 171) (8216 8216) (8219 8220) (8223 8223) (8249 8249))))
472 (DEFRANGES |p{Pf}|
473 (MASSAGE-RANGES '((187 187) (8217 8217) (8221 8221) (8250 8250))))
475 (DEFRANGES |p{Po}|
476 (MASSAGE-RANGES
477 '((33 35) (37 39) (42 42) (44 44) (46 47) (58 59) (63 64) (92 92)
478 (161 161) (183 183) (191 191) (894 894) (903 903) (1370 1375)
479 (1417 1417) (1470 1470) (1472 1472) (1475 1475) (1523 1524)
480 (1548 1548) (1563 1563) (1567 1567) (1642 1645) (1748 1748)
481 (1792 1805) (2404 2405) (2416 2416) (3572 3572) (3663 3663)
482 (3674 3675) (3844 3858) (3973 3973) (4170 4175) (4347 4347)
483 (4961 4968) (5741 5742) (5867 5869) (6100 6106) (6108 6108)
484 (6144 6149) (6151 6154) (8214 8215) (8224 8231) (8240 8248)
485 (8251 8254) (8257 8259) (8264 8269) (12289 12291) (65072 65072)
486 (65097 65100) (65104 65106) (65108 65111) (65119 65121) (65128 65128)
487 (65130 65131) (65281 65283) (65285 65287) (65290 65290) (65292 65292)
488 (65294 65295) (65306 65307) (65311 65312) (65340 65340) (65377 65377)
489 (65380 65380))))
491 (DEFRANGES |p{Zs}|
492 (MASSAGE-RANGES
493 '((32 32) (160 160) (5760 5760) (8192 8203) (8239 8239) (12288 12288))))
495 (DEFRANGES |p{Zl}| (MASSAGE-RANGES '((8232 8232))))
497 (DEFRANGES |p{Zp}| (MASSAGE-RANGES '((8233 8233))))
499 (DEFRANGES |p{Sm}|
500 (MASSAGE-RANGES
501 '((43 43) (60 62) (124 124) (126 126) (172 172) (177 177) (215 215)
502 (247 247) (8260 8260) (8314 8316) (8330 8332) (8592 8596) (8602 8603)
503 (8608 8608) (8611 8611) (8614 8614) (8622 8622) (8654 8655)
504 (8658 8658) (8660 8660) (8704 8945) (8968 8971) (8992 8993)
505 (9655 9655) (9665 9665) (9839 9839) (64297 64297) (65122 65122)
506 (65124 65126) (65291 65291) (65308 65310) (65372 65372) (65374 65374)
507 (65506 65506) (65513 65516) (120513 120513) (120539 120539)
508 (120571 120571) (120597 120597) (120629 120629) (120655 120655)
509 (120687 120687) (120713 120713) (120745 120745) (120771 120771))))
511 (DEFRANGES |p{Sc}|
512 (MASSAGE-RANGES
513 '((36 36) (162 165) (2546 2547) (3647 3647) (6107 6107) (8352 8367)
514 (65129 65129) (65284 65284) (65504 65505) (65509 65510))))
516 (DEFRANGES |p{Sk}|
517 (MASSAGE-RANGES
518 '((94 94) (96 96) (168 168) (175 175) (180 180) (184 184) (697 698)
519 (706 719) (722 735) (741 749) (884 885) (900 901) (8125 8125)
520 (8127 8129) (8141 8143) (8157 8159) (8173 8175) (8189 8190)
521 (12443 12444) (65342 65342) (65344 65344) (65507 65507))))
523 (DEFRANGES |p{So}|
524 (MASSAGE-RANGES
525 '((166 167) (169 169) (174 174) (176 176) (182 182) (1154 1154)
526 (1769 1769) (1789 1790) (2554 2554) (2928 2928) (3841 3843)
527 (3859 3863) (3866 3871) (3892 3892) (3894 3894) (3896 3896)
528 (4030 4037) (4039 4044) (4047 4047) (8448 8449) (8451 8454)
529 (8456 8457) (8468 8468) (8470 8472) (8478 8483) (8485 8485)
530 (8487 8487) (8489 8489) (8494 8494) (8498 8498) (8506 8506)
531 (8597 8601) (8604 8607) (8609 8610) (8612 8613) (8615 8621)
532 (8623 8653) (8656 8657) (8659 8659) (8661 8691) (8960 8967)
533 (8972 8991) (8994 9000) (9003 9083) (9085 9114) (9216 9254)
534 (9280 9290) (9372 9449) (9472 9621) (9632 9654) (9656 9664)
535 (9666 9719) (9728 9747) (9753 9838) (9840 9841) (9985 9988)
536 (9990 9993) (9996 10023) (10025 10059) (10061 10061) (10063 10066)
537 (10070 10070) (10072 10078) (10081 10087) (10132 10132) (10136 10159)
538 (10161 10174) (10240 10495) (11904 11929) (11931 12019) (12032 12245)
539 (12272 12283) (12292 12292) (12306 12307) (12320 12320) (12342 12343)
540 (12350 12351) (12688 12689) (12694 12703) (12800 12828) (12842 12867)
541 (12896 12923) (12927 12927) (12938 12976) (12992 13003) (13008 13054)
542 (13056 13174) (13179 13277) (13280 13310) (42128 42145) (42148 42163)
543 (42165 42176) (42178 42180) (42182 42182) (65508 65508) (65512 65512)
544 (65517 65518) (65532 65533) (118784 119029) (119040 119078)
545 (119082 119140) (119146 119148) (119171 119172) (119180 119209)
546 (119214 119261))))
548 (DEFRANGES |p{Cc}| (MASSAGE-RANGES '((0 31) (127 159))))
550 (DEFRANGES |p{Cf}|
551 (MASSAGE-RANGES
552 '((1807 1807) (6155 6158) (8204 8207) (8234 8238) (8298 8303)
553 (65279 65279) (65529 65531) (119155 119162) (917505 917505)
554 (917536 917631))))
556 (DEFRANGES |p{Co}|
557 (MASSAGE-RANGES '((57344 63743) (983040 1048573) (1048576 1114109))))
559 (defranges |p{L}| (append |p{Lu}| |p{Ll}| |p{Lt}| |p{Lm}| |p{Lo}|))
560 (defranges |p{M}| (append |p{Mn}| |p{Mc}| |p{Me}|))
561 (defranges |p{N}| (append |p{Nd}| |p{Nl}| |p{No}|))
562 (defranges |p{P}| (append |p{Pc}| |p{Pd}| |p{Ps}| |p{Pe}| |p{Pi}| |p{Pf}|
563 |p{Po}|))
564 (defranges |p{Z}| (append |p{Zs}| |p{Zl}| |p{Zp}|))
565 (defranges |p{S}| (append |p{Sm}| |p{Sc}| |p{Sk}| |p{So}|))
566 (defranges |p{Cn}| (ranges- (massage-ranges '((0 #.+limit-1+)))
567 |p{L}| |p{M}| |p{N}| |p{P}| |p{Z}| |p{S}|
568 |p{Cc}| |p{Cf}| |p{Co}|))
569 (defranges |p{C}| (append |p{Cc}| |p{Cf}| |p{Co}| |p{Cn}|))
572 (defranges \\i
573 (massage-ranges '((58 58) (65 90) (95 95) (97 122)
574 (192 214) (216 246) (248 255) (256 305)
575 (308 318) (321 328) (330 382) (384 451)
576 (461 496) (500 501) (506 535) (592 680)
577 (699 705) (902 902) (904 906) (908 908)
578 (910 929) (931 974) (976 982) (986 986)
579 (988 988) (990 990) (992 992) (994 1011)
580 (1025 1036) (1038 1103) (1105 1116) (1118 1153)
581 (1168 1220) (1223 1224) (1227 1228) (1232 1259)
582 (1262 1269) (1272 1273) (1329 1366) (1369 1369)
583 (1377 1414) (1488 1514) (1520 1522) (1569 1594)
584 (1601 1610) (1649 1719) (1722 1726) (1728 1742)
585 (1744 1747) (1749 1749) (1765 1766) (2309 2361)
586 (2365 2365) (2392 2401) (2437 2444) (2447 2448)
587 (2451 2472) (2474 2480) (2482 2482) (2486 2489)
588 (2524 2525) (2527 2529) (2544 2545) (2565 2570)
589 (2575 2576) (2579 2600) (2602 2608) (2610 2611)
590 (2613 2614) (2616 2617) (2649 2652) (2654 2654)
591 (2674 2676) (2693 2699) (2701 2701) (2703 2705)
592 (2707 2728) (2730 2736) (2738 2739) (2741 2745)
593 (2749 2749) (2784 2784) (2821 2828) (2831 2832)
594 (2835 2856) (2858 2864) (2866 2867) (2870 2873)
595 (2877 2877) (2908 2909) (2911 2913) (2949 2954)
596 (2958 2960) (2962 2965) (2969 2970) (2972 2972)
597 (2974 2975) (2979 2980) (2984 2986) (2990 2997)
598 (2999 3001) (3077 3084) (3086 3088) (3090 3112)
599 (3114 3123) (3125 3129) (3168 3169) (3205 3212)
600 (3214 3216) (3218 3240) (3242 3251) (3253 3257)
601 (3294 3294) (3296 3297) (3333 3340) (3342 3344)
602 (3346 3368) (3370 3385) (3424 3425) (3585 3630)
603 (3632 3632) (3634 3635) (3648 3653) (3713 3714)
604 (3716 3716) (3719 3720) (3722 3722) (3725 3725)
605 (3732 3735) (3737 3743) (3745 3747) (3749 3749)
606 (3751 3751) (3754 3755) (3757 3758) (3760 3760)
607 (3762 3763) (3773 3773) (3776 3780) (3904 3911)
608 (3913 3945) (4256 4293) (4304 4342) (4352 4352)
609 (4354 4355) (4357 4359) (4361 4361) (4363 4364)
610 (4366 4370) (4412 4412) (4414 4414) (4416 4416)
611 (4428 4428) (4430 4430) (4432 4432) (4436 4437)
612 (4441 4441) (4447 4449) (4451 4451) (4453 4453)
613 (4455 4455) (4457 4457) (4461 4462) (4466 4467)
614 (4469 4469) (4510 4510) (4520 4520) (4523 4523)
615 (4526 4527) (4535 4536) (4538 4538) (4540 4546)
616 (4587 4587) (4592 4592) (4601 4601) (7680 7835)
617 (7840 7929) (7936 7957) (7960 7965) (7968 8005)
618 (8008 8013) (8016 8023) (8025 8025) (8027 8027)
619 (8029 8029) (8031 8061) (8064 8116) (8118 8124)
620 (8126 8126) (8130 8132) (8134 8140) (8144 8147)
621 (8150 8155) (8160 8172) (8178 8180) (8182 8188)
622 (8486 8486) (8490 8491) (8494 8494) (8576 8578)
623 (12295 12295) (12321 12329) (12353 12436)
624 (12449 12538) (12549 12588) (19968 40869)
625 (44032 55203))))
627 (defranges \\c
628 (append \\i
629 (massage-ranges '((45 45) (46 46) (48 57) (183 183)
630 (720 720) (721 721) (768 837) (864 865)
631 (903 903) (1155 1158) (1425 1441)
632 (1443 1465) (1467 1469) (1471 1471)
633 (1473 1474) (1476 1476) (1600 1600)
634 (1611 1618) (1632 1641) (1648 1648)
635 (1750 1756) (1757 1759) (1760 1764)
636 (1767 1768) (1770 1773) (1776 1785)
637 (2305 2307) (2364 2364) (2366 2380)
638 (2381 2381) (2385 2388) (2402 2403)
639 (2406 2415) (2433 2435) (2492 2492)
640 (2494 2494) (2495 2495) (2496 2500)
641 (2503 2504) (2507 2509) (2519 2519)
642 (2530 2531) (2534 2543) (2562 2562)
643 (2620 2620) (2622 2622) (2623 2623)
644 (2624 2626) (2631 2632) (2635 2637)
645 (2662 2671) (2672 2673) (2689 2691)
646 (2748 2748) (2750 2757) (2759 2761)
647 (2763 2765) (2790 2799) (2817 2819)
648 (2876 2876) (2878 2883) (2887 2888)
649 (2891 2893) (2902 2903) (2918 2927)
650 (2946 2947) (3006 3010) (3014 3016)
651 (3018 3021) (3031 3031) (3047 3055)
652 (3073 3075) (3134 3140) (3142 3144)
653 (3146 3149) (3157 3158) (3174 3183)
654 (3202 3203) (3262 3268) (3270 3272)
655 (3274 3277) (3285 3286) (3302 3311)
656 (3330 3331) (3390 3395) (3398 3400)
657 (3402 3405) (3415 3415) (3430 3439)
658 (3633 3633) (3636 3642) (3654 3654)
659 (3655 3662) (3664 3673) (3761 3761)
660 (3764 3769) (3771 3772) (3782 3782)
661 (3784 3789) (3792 3801) (3864 3865)
662 (3872 3881) (3893 3893) (3895 3895)
663 (3897 3897) (3902 3902) (3903 3903)
664 (3953 3972) (3974 3979) (3984 3989)
665 (3991 3991) (3993 4013) (4017 4023)
666 (4025 4025) (8400 8412) (8417 8417)
667 (12293 12293) (12330 12335) (12337 12341)
668 (12441 12441) (12442 12442) (12445 12446)
669 (12540 12542)))))
671 (defranges \.
672 (massage-ranges
673 '((0 9)
674 ;; 10 newline
675 (11 12)
676 ;; 13 return
677 (14 #.+limit-1+))))
679 (defranges \\s
680 (massage-ranges
681 '((0 8)
682 ;; 9 tab
683 ;; 10 newline
684 (11 12)
685 ;; 13 return
686 (14 31)
687 ;; 32 space
688 (33 #.+limit-1+))))
690 (defranges \\d |p{Nd}|)
692 (defranges \\w (ranges- (massage-ranges '((0 #.+limit-1+)))
693 |p{P}|
694 |p{Z}|
695 |p{C}|))
697 (defranges ^s (ranges- (massage-ranges '((0 #.+limit-1+))) \\s))
698 (defranges ^i (ranges- (massage-ranges '((0 #.+limit-1+))) \\i))
699 (defranges ^c (ranges- (massage-ranges '((0 #.+limit-1+))) \\c))
700 (defranges ^d (ranges- (massage-ranges '((0 #.+limit-1+))) \\d))
701 (defranges ^w (ranges- (massage-ranges '((0 #.+limit-1+))) \\w))