xsd-regexp.el 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110
  1. ;;; xsd-regexp.el --- translate W3C XML Schema regexps to Emacs regexps -*- lexical-binding:t -*-
  2. ;; Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc.
  3. ;; Author: James Clark
  4. ;; Keywords: wp, hypermedia, languages, XML, regexp
  5. ;; This file is part of GNU Emacs.
  6. ;; GNU Emacs is free software: you can redistribute it and/or modify
  7. ;; it under the terms of the GNU General Public License as published by
  8. ;; the Free Software Foundation, either version 3 of the License, or
  9. ;; (at your option) any later version.
  10. ;; GNU Emacs is distributed in the hope that it will be useful,
  11. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ;; GNU General Public License for more details.
  14. ;; You should have received a copy of the GNU General Public License
  15. ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  16. ;;; Commentary:
  17. ;; This handles the regular expressions in the syntax defined by:
  18. ;; W3C XML Schema Part 2: Datatypes
  19. ;; <http://www.w3.org/TR/xmlschema-2/#regexs>
  20. ;;
  21. ;; The main entry point is `xsdre-translate'.
  22. ;;
  23. ;; The features of XSD regexps that make this non-trivial are:
  24. ;;
  25. ;; - \p{PROP} escape for matching characters that have various
  26. ;; Unicode-defined properties
  27. ;; - character class subtraction:, e.g. [\p{L}-[abc]] matches
  28. ;; any character in the L category other than a, b and c.
  29. ;;
  30. ;; We compute the set of Unicode characters denoted by each XSD
  31. ;; char-class as a list of ranges. The regexp generated for a
  32. ;; single escape can be large (several thousand characters).
  33. ;;
  34. ;; XSD has non-traditional rules about when characters must be
  35. ;; and can be quoted with \. These are quite different from
  36. ;; the Emacs rules.
  37. ;;
  38. ;; The semantics of XSD regexps are defined in terms of Unicode.
  39. ;; Non-Unicode characters are not allowed in regular expressions and
  40. ;; will not match against the generated regular expressions. A
  41. ;; Unicode character means a character in one of the Mule charsets
  42. ;; ascii, latin-iso8859-1, mule-unicode-0100-24ff,
  43. ;; mule-unicode-2500-33ff, mule-unicode-e000-ffff, eight-bit-control
  44. ;; or a character translatable to such a character (i.e a character
  45. ;; for which `encode-char' will return non-nil).
  46. ;;
  47. ;; Using unify-8859-on-decoding-mode is probably a good idea here
  48. ;; (and generally with XML and other Unicode-oriented formats).
  49. ;;
  50. ;; Unfortunately, this means that this package is currently useless
  51. ;; for CJK characters, since there's no mule-unicode charset for the
  52. ;; CJK ranges of Unicode. We should devise a workaround for this
  53. ;; until the fabled Unicode version of Emacs makes an appearance.
  54. ;;; Code:
  55. (defun xsdre-translate (regexp)
  56. "Translate a W3C XML Schema Datatypes regexp to an Emacs regexp.
  57. Returns a string. REGEXP is a string. If REGEXP is not a valid XSD
  58. regexp, signal an `xsdre-invalid-regexp' condition."
  59. (xsdre-from-symbolic
  60. (xsdre-to-symbolic regexp)))
  61. (defvar xsdre-test-history nil)
  62. (defun xsdre-test-regexp ()
  63. (interactive)
  64. (while
  65. (let* ((str (read-from-minibuffer "Regexp: "
  66. nil
  67. nil
  68. nil
  69. 'xsdre-test-history))
  70. (symbolic
  71. (xsdre-to-symbolic str)))
  72. (with-output-to-temp-buffer "*XSD Regexp Test*"
  73. (princ "XSD regexp: ")
  74. (princ str)
  75. (princ "\n")
  76. (princ "Symbolic: ")
  77. (princ "\n")
  78. (pp symbolic)
  79. (princ "\n")
  80. (princ "Emacs regexp: ")
  81. (princ (xsdre-from-symbolic symbolic)))
  82. t)))
  83. ;;; Range lists
  84. (defsubst xsdre-make-range (first last)
  85. "Return a representation of a range of integers.
  86. If the range contains a single integer, it is represented by that integer.
  87. Otherwise, it is represented by a (FIRST . LAST) pair."
  88. (if (= first last)
  89. first
  90. (cons first last)))
  91. (defsubst xsdre-range-first (r)
  92. "Return the first integer in a range."
  93. (if (consp r) (car r) r))
  94. (defsubst xsdre-range-last (r)
  95. "Return the last integer in a range."
  96. (if (consp r) (cdr r) r))
  97. (defun xsdre-make-range-list (list)
  98. "Make a range-list from a list of ranges.
  99. A range-list represents a set of integers by a list of ranges in a
  100. canonical form, in which ranges are in increasing order, and adjacent
  101. ranges are merged wherever possible."
  102. (when list
  103. (setq list
  104. (sort list 'xsdre-range-less-than))
  105. (let* ((next (cdr list))
  106. (tail list)
  107. (head (car list))
  108. (first (xsdre-range-first head))
  109. (last (xsdre-range-last head)))
  110. (while next
  111. (setq head (car next))
  112. (when (> (xsdre-range-last head) last)
  113. (if (<= (xsdre-range-first head) (1+ last))
  114. (setq last (xsdre-range-last head))
  115. (setcar tail (xsdre-make-range first last))
  116. (setcdr tail next)
  117. (setq tail next)
  118. (setq first (xsdre-range-first head))
  119. (setq last (xsdre-range-last head))))
  120. (setq next (cdr next)))
  121. (setcar tail (xsdre-make-range first last))
  122. (setcdr tail nil)
  123. list)))
  124. (defun xsdre-range-list-union (range-lists)
  125. "Return a range-list, the union of a list of range-lists."
  126. (xsdre-make-range-list (apply 'append range-lists)))
  127. (defun xsdre-range-list-difference (orig subtract)
  128. "Return a range-list for the difference of two range-lists."
  129. (when orig
  130. (let (new head first last)
  131. (while orig
  132. (setq head (car orig))
  133. (setq first (xsdre-range-first head))
  134. (setq last (xsdre-range-last head))
  135. (while (and subtract
  136. (< (xsdre-range-last (car subtract)) first))
  137. (setq subtract (cdr subtract)))
  138. (while (and subtract
  139. (<= first last)
  140. (<= (xsdre-range-first (car subtract)) last))
  141. (when (< first (xsdre-range-first (car subtract)))
  142. (setq new
  143. (cons (xsdre-make-range
  144. first
  145. (1- (xsdre-range-first (car subtract))))
  146. new)))
  147. (if (< (xsdre-range-last (car subtract)) last)
  148. (progn
  149. (setq first (1+ (xsdre-range-last (car subtract))))
  150. (setq subtract (cdr subtract)))
  151. (setq first (1+ last))))
  152. (when (<= first last)
  153. (setq new (cons (xsdre-make-range first last) new)))
  154. (setq orig (cdr orig)))
  155. (nreverse new))))
  156. (defun xsdre-range-less-than (r1 r2)
  157. "Return non-nil if range R1 is less than range R2."
  158. (or (< (xsdre-range-first r1) (xsdre-range-first r2))
  159. (and (= (xsdre-range-first r1) (xsdre-range-first r2))
  160. (< (xsdre-range-last r1) (xsdre-range-last r2)))))
  161. (defun xsdre-check-range-list (range-list)
  162. "Check that RANGE-LIST is a range-list.
  163. Signal an error if it is not."
  164. (let ((last nil))
  165. (while range-list
  166. (unless (consp range-list)
  167. (error "Range list not a list"))
  168. (let ((head (car range-list)))
  169. (unless (or (integerp head)
  170. (and (consp head)
  171. (integerp (car head))
  172. (integerp (cdr head))))
  173. (error "Bad range %s" head))
  174. (when (and last
  175. (not (< (1+ last) (xsdre-range-first head))))
  176. (error "Ranges not strictly increasing"))
  177. (setq last (xsdre-range-last head)))
  178. (setq range-list (cdr range-list))))
  179. t)
  180. ;;; Compiling symbolic regexps to Emacs regexps
  181. (defun xsdre-from-symbolic (re)
  182. "Return an Emacs regexp for the symbolic regexp RE."
  183. (apply 'concat
  184. (nreverse (xsdre-compile-regexp re nil))))
  185. (defun xsdre-compile-regexp (re accum)
  186. "Return a Emacs regular expression for the symbolic regexp RE.
  187. Returns a list of strings whose head is the regexp for RE
  188. and whose tail is ACCUM."
  189. (cond ((not (consp re))
  190. (xsdre-compile-char-class re accum))
  191. ((eq (car re) 'choice)
  192. (setq accum (cons "\\(?:" accum))
  193. (let ((choices (cdr re)))
  194. (while choices
  195. (setq accum
  196. (xsdre-compile-regexp (car choices)
  197. accum))
  198. (setq choices (cdr choices))
  199. (when choices
  200. (setq accum
  201. (cons "\\|" accum)))))
  202. (cons "\\)" accum))
  203. ((eq (car re) 'sequence)
  204. (let ((members (cdr re)))
  205. (while members
  206. (setq accum (xsdre-compile-regexp (car members)
  207. accum))
  208. (setq members (cdr members))))
  209. accum)
  210. ((eq (car re) 'repeat)
  211. (let* ((sub (nth 1 re))
  212. (lower (nth 2 re))
  213. (upper (nth 3 re))
  214. (need-paren (and (consp sub)
  215. (eq (car sub) 'sequence))))
  216. (when need-paren
  217. (setq accum (cons "\\(?:" accum)))
  218. (setq accum
  219. (xsdre-compile-regexp sub accum))
  220. (when need-paren
  221. (setq accum (cons "\\)" accum)))
  222. (cond ((not upper)
  223. (cond ((eq lower 0)
  224. (cons "*" accum))
  225. ((eq lower 1)
  226. (cons "+" accum))
  227. (t
  228. (cons (concat "\\{"
  229. (number-to-string lower)
  230. ",\\}")
  231. accum))))
  232. ((eq lower upper)
  233. (cons (concat "\\{"
  234. (number-to-string lower)
  235. "\\}")
  236. accum))
  237. ((and (eq lower 0) (eq upper 1))
  238. (cons "?" accum))
  239. (t
  240. (cons (concat "\\{"
  241. (number-to-string lower)
  242. ","
  243. (number-to-string upper)
  244. "\\}")
  245. accum)))))
  246. (t (xsdre-compile-char-class re accum))))
  247. (defun xsdre-compile-char-class (cc accum)
  248. "Return a Emacs regular expression for the symbolic character class CC.
  249. Returns a list of strings whose head is the regexp for CC
  250. and whose tail is ACCUM."
  251. (cons (if (integerp cc)
  252. (xsdre-compile-single-char cc)
  253. (let ((ranges (xsdre-range-list-mule-intersection
  254. (xsdre-char-class-to-range-list cc))))
  255. (cond ((null ranges) "\001-\000")
  256. ((and (null (cdr ranges))
  257. (= (xsdre-range-first (car ranges))
  258. (xsdre-range-last (car ranges))))
  259. (xsdre-compile-single-char
  260. (xsdre-range-first (car ranges))))
  261. (t (xsdre-range-list-to-char-alternative ranges)))))
  262. accum))
  263. (defun xsdre-compile-single-char (ch)
  264. (if (memq ch '(?. ?* ?+ ?? ?\[ ?\] ?^ ?$ ?\\))
  265. (string ?\\ ch)
  266. (string (decode-char 'ucs ch))))
  267. (defun xsdre-char-class-to-range-list (cc)
  268. "Return a range-list for a symbolic char-class CC."
  269. (cond ((integerp cc) (list cc))
  270. ((symbolp cc)
  271. (or (get cc 'xsdre-ranges)
  272. (xsdre-char-class-to-range-list (get cc 'xsdre-char-class))))
  273. ((integerp (car cc))
  274. (if (= (car cc) (cdr cc))
  275. (car cc)
  276. cc))
  277. ((eq (car cc) 'union)
  278. (xsdre-range-list-union (mapcar 'xsdre-char-class-to-range-list
  279. (cdr cc))))
  280. ((eq (car cc) 'difference)
  281. (xsdre-range-list-difference
  282. (xsdre-char-class-to-range-list (nth 1 cc))
  283. (xsdre-char-class-to-range-list (nth 2 cc))))
  284. ((eq (car cc) 'range)
  285. (list (xsdre-make-range (nth 1 cc) (nth 2 cc))))
  286. (t (error "Internal error in XSD regexp compilation: \
  287. unknown char-class %s" cc))))
  288. (defconst xsdre-mule-char-set-ranges
  289. '((0 . 127)
  290. (128 . 159)
  291. (160 . 255)
  292. (#x0100 . #x24ff)
  293. (#x2500 . #x33ff)
  294. (#xe000 . #xffff))
  295. "List of ranges for the Mule character sets containing Unicode characters.")
  296. (defun xsdre-range-list-mule-intersection (range-list)
  297. "Return the intersection of RANGE-LIST with the mule-supported ranges.
  298. Also split ranges so that no range spans more that one mule charset."
  299. (when range-list
  300. (let* ((char-set-ranges (cdr xsdre-mule-char-set-ranges))
  301. (mule-ranges nil)
  302. (char-set-first (caar xsdre-mule-char-set-ranges))
  303. (char-set-last (cdar xsdre-mule-char-set-ranges))
  304. (range (car range-list))
  305. (first (xsdre-range-first range))
  306. (last (xsdre-range-last range)))
  307. (setq range-list (cdr range-list))
  308. (while (progn
  309. (cond ((> first last)
  310. (if (null range-list)
  311. nil
  312. (setq range (car range-list))
  313. (setq first (xsdre-range-first range))
  314. (setq last (xsdre-range-last range))
  315. (setq range-list (cdr range-list))
  316. t))
  317. ((< char-set-last first)
  318. (if (null char-set-ranges)
  319. nil
  320. (setq char-set-first (caar char-set-ranges))
  321. (setq char-set-last (cdar char-set-ranges))
  322. (setq char-set-ranges (cdr char-set-ranges))
  323. t))
  324. ((< first char-set-first)
  325. (setq first char-set-first))
  326. ;; Now we know that
  327. ;; first <= last
  328. ;; first <= char-set-last
  329. ;; first >= char-set-first
  330. ((<= last char-set-last)
  331. (setq mule-ranges
  332. (cons (xsdre-make-range first last)
  333. mule-ranges))
  334. (setq first (1+ last))
  335. t)
  336. (t
  337. (setq mule-ranges
  338. (cons (xsdre-make-range first char-set-last)
  339. mule-ranges))
  340. (setq first (1+ char-set-last))
  341. t))))
  342. (nreverse mule-ranges))))
  343. (defun xsdre-range-list-to-char-alternative (range-list)
  344. "Return a char alternative for a range-list.
  345. RANGE-LIST must contain more than integer.
  346. The char alternative is a string containing an Emacs regexp
  347. consisting of a single char alternative delimited with []."
  348. (let (range caret close-bracket hyphen chars first last)
  349. (while range-list
  350. (setq range (car range-list))
  351. (setq first (xsdre-range-first range))
  352. (setq last (xsdre-range-last range))
  353. (while (and (cond ((eq first ?^)
  354. (setq caret t)
  355. (setq first (1+ first)))
  356. ((eq first ?-)
  357. (setq hyphen t)
  358. (setq first (1+ first)))
  359. ((eq first ?\])
  360. (setq close-bracket t)
  361. (setq first (1+ first))))
  362. (<= first last)))
  363. (when (<= first last)
  364. (setq chars
  365. (cons first chars))
  366. (when (< first last)
  367. (setq chars
  368. (if (and (eq last (1+ first))
  369. (not (eq last ?-)))
  370. (cons last chars)
  371. (cons last (cons ?- chars))))))
  372. (setq range-list (cdr range-list)))
  373. (setq chars
  374. (mapcar (lambda (c)
  375. (decode-char 'ucs c))
  376. chars))
  377. (when caret
  378. (setq chars (cons ?^ chars)))
  379. (when hyphen
  380. (setq chars (cons ?- chars)))
  381. (setq chars (cons ?\] chars))
  382. (setq chars (nreverse chars))
  383. (when close-bracket
  384. (setq chars (cons ?\] chars)))
  385. (when (equal chars '(?^ ?- ?\]))
  386. (setq chars '(?- ?^ ?\])))
  387. (setq chars (cons ?\[ chars))
  388. (apply 'string chars)))
  389. ;;; Parsing
  390. (defvar xsdre-current-regexp nil
  391. "List of characters remaining to be parsed. Dynamically bound.")
  392. (defun xsdre-to-symbolic (str)
  393. "Convert a W3C XML Schema datatypes regexp to a symbolic form.
  394. The symbolic form has the following structure:
  395. REGEXP ::=
  396. (sequence REGEXP ...)
  397. | (choice REGEXP ...)
  398. | (repeat REGEXP MIN MAX)
  399. | CHAR-CLASS
  400. CHAR-CLASS ::=
  401. CHAR
  402. | SYMBOLIC-CHAR-CLASS
  403. | RANGE
  404. | (union CHAR-CLASS ...)
  405. | (difference CHAR-CLASS CHAR-CLASS)
  406. RANGE ::= (range LOWER UPPER)
  407. MIN ::= INTEGER
  408. MAX ::= INTEGER | nil
  409. CHAR ::= UNICODE
  410. LOWER ::= UNICODE
  411. UPPER ::= UNICODE
  412. SYMBOLIC-CHAR-CLASS ::= SYMBOL
  413. where UNICODE is a integer specifying a Unicode code-point and
  414. SYMBOLIC-CHAR-CLASS is a symbol which has either a `xsdre-char-class'
  415. property whose value is a CHAR-CLASS, or a `xsdre-ranges' property
  416. whose value is a range-list."
  417. (let ((xsdre-current-regexp (string-to-list str)))
  418. (condition-case err
  419. (let ((symbolic (xsdre-parse-regexp)))
  420. (if xsdre-current-regexp
  421. (xsdre-parse-error "Unexpected %c" (car xsdre-current-regexp))
  422. symbolic))
  423. (xsdre-parse-error
  424. (signal 'xsdre-invalid-regexp
  425. (list (apply 'format (cdr err))
  426. (- (length str)
  427. (length xsdre-current-regexp))))))))
  428. (define-error 'xsdre-invalid-regexp
  429. "Invalid W3C XML Schema Datatypes regular expression")
  430. (defun xsdre-parse-regexp ()
  431. (let ((branches nil))
  432. (while (progn
  433. (setq branches (cons (xsdre-parse-branch) branches))
  434. (when (eq (car xsdre-current-regexp) ?|)
  435. (xsdre-advance)
  436. t)))
  437. (if (null (cdr branches))
  438. (car branches)
  439. (cons 'choice (nreverse branches)))))
  440. (defun xsdre-parse-branch ()
  441. (let (items)
  442. (while (let ((item (xsdre-try-parse-atom)))
  443. (when item
  444. (let ((quantifier (xsdre-try-parse-quantifier)))
  445. (when quantifier
  446. (setq item
  447. (list 'repeat
  448. item
  449. (car quantifier)
  450. (cdr quantifier)))))
  451. (setq items (cons item items)))))
  452. (cond ((null items) '(sequence))
  453. ((null (cdr items)) (car items))
  454. (t (cons 'sequence (nreverse items))))))
  455. (defun xsdre-try-parse-quantifier ()
  456. (let ((ch (car xsdre-current-regexp)))
  457. (cond ((eq ch ?*) (xsdre-advance) '(0 . nil))
  458. ((eq ch ?+) (xsdre-advance) '(1 . nil))
  459. ((eq ch ??) (xsdre-advance) '(0 . 1))
  460. ((eq ch ?{)
  461. (xsdre-advance)
  462. (let ((lower (xsdre-parse-bound)))
  463. (setq ch (car xsdre-current-regexp))
  464. (cond ((eq ch ?})
  465. (xsdre-advance)
  466. (cons lower lower))
  467. ((eq ch ?,)
  468. (xsdre-advance)
  469. (cond ((eq (car xsdre-current-regexp) ?})
  470. (xsdre-advance)
  471. (cons lower nil))
  472. (t
  473. (let ((upper (xsdre-parse-bound)))
  474. (xsdre-expect ?})
  475. (cons lower upper)))))
  476. (t (xsdre-parse-error "Expected , or }")))))
  477. (t nil))))
  478. (defun xsdre-parse-bound ()
  479. (let ((n 0))
  480. (while (progn
  481. (let* ((ch (car xsdre-current-regexp))
  482. (digit (memq ch '(?9 ?8 ?7 ?6 ?5 ?4 ?3 ?2 ?1 ?0))))
  483. (unless digit
  484. (xsdre-parse-error "Expected a digit"))
  485. (setq n (+ (* n 10)
  486. (length (cdr digit)))))
  487. (xsdre-advance)
  488. (not (memq (car xsdre-current-regexp) '(?} ?,)))))
  489. n))
  490. (defun xsdre-try-parse-atom ()
  491. (let ((ch (car xsdre-current-regexp)))
  492. (cond ((memq ch '(nil ?? ?* ?+ ?\) ?\{ ?\} ?| ?\])) nil)
  493. ((eq ch ?\\)
  494. (xsdre-advance)
  495. (xsdre-parse-escape))
  496. ((eq ch ?\()
  497. (xsdre-advance)
  498. (let ((ret (xsdre-parse-regexp)))
  499. (xsdre-expect ?\))
  500. ret))
  501. ((eq ch ?\[)
  502. (xsdre-parse-char-class))
  503. ((eq ch ?.)
  504. (xsdre-advance)
  505. 'dot)
  506. (t
  507. (let ((uc (encode-char ch 'ucs)))
  508. (unless uc
  509. (xsdre-parse-error "%c is not a Unicode character" ch))
  510. (xsdre-advance) uc)))))
  511. (defun xsdre-parse-char-class ()
  512. (xsdre-advance)
  513. (let (compl members ret)
  514. (when (eq (car xsdre-current-regexp) ?^)
  515. (setq compl t)
  516. (xsdre-advance))
  517. (while (let ((member (xsdre-parse-char-class-member))
  518. uc1 uc2)
  519. (cond ((eq (car xsdre-current-regexp) ?\-)
  520. (xsdre-advance)
  521. (cond ((eq (car xsdre-current-regexp) ?\[)
  522. (setq members (cons member members))
  523. nil)
  524. ((not (integerp member))
  525. (xsdre-parse-error "Lower bound is not a single character"))
  526. ((not (setq uc1
  527. (encode-char member 'ucs)))
  528. (xsdre-parse-error "Lower bound %c is not a Unicode character"
  529. member))
  530. (t
  531. (let ((upper (xsdre-parse-char-class-member)))
  532. (unless (integerp upper)
  533. (xsdre-parse-error "Upper bound is not a single character"))
  534. (unless (setq uc2
  535. (encode-char upper 'ucs))
  536. (xsdre-parse-error "Upper bound %c is not a Unicode character" upper))
  537. (setq members
  538. (cons (list 'range uc1 uc2)
  539. members)))
  540. (not (eq (car xsdre-current-regexp) ?\])))))
  541. (t (setq members (cons member members))
  542. (not (eq (car xsdre-current-regexp) ?\]))))))
  543. (setq members (nreverse members))
  544. (if (null (cdr members))
  545. (setq ret (car members))
  546. (setq ret (cons 'union members)))
  547. (when compl
  548. (setq ret (list 'difference 'any ret)))
  549. (when (eq (car xsdre-current-regexp) ?\[)
  550. (setq ret
  551. (list 'difference ret (xsdre-parse-char-class))))
  552. (xsdre-expect ?\])
  553. ret))
  554. (defun xsdre-parse-char-class-member ()
  555. (let ((ch (car xsdre-current-regexp)))
  556. (cond ((null ch)
  557. (xsdre-parse-error "Expected ]"))
  558. ((eq ch ?\\)
  559. (xsdre-advance)
  560. (xsdre-parse-escape))
  561. ((memq ch '(?\[ ?\] ?-))
  562. (xsdre-parse-error "%c must be quoted in a character class" ch))
  563. (t (xsdre-advance) ch))))
  564. (defconst xsdre-single-escape
  565. '((?s . space)
  566. (?i . name-initial)
  567. (?c . name-continue)
  568. (?d . digit)
  569. (?w . word)))
  570. (defun xsdre-parse-escape ()
  571. (let ((ch (car xsdre-current-regexp)))
  572. (xsdre-advance)
  573. (cond ((memq ch '(?\\ ?| ?. ?- ?^ ?* ?+ ?\( ?\) ?{ ?} ?\[ ?\])) ch)
  574. ((eq ch ?r) ?\r)
  575. ((eq ch ?n) ?\n)
  576. ((eq ch ?t) ?\t)
  577. ((cdr (assq ch xsdre-single-escape)))
  578. ((let ((positive
  579. (cdr (assq (downcase ch) xsdre-single-escape))))
  580. (and positive
  581. (list 'difference 'any positive))))
  582. ((eq ch ?p) (xsdre-parse-prop))
  583. ((eq ch ?P) (list 'difference 'any (xsdre-parse-prop)))
  584. (t (if ch
  585. (xsdre-parse-error "Missing char after \\")
  586. (xsdre-parse-error "Bad escape %c" ch))))))
  587. (defun xsdre-parse-prop ()
  588. (xsdre-expect ?{)
  589. (let ((name nil))
  590. (while (not (eq (car xsdre-current-regexp) ?\}))
  591. (unless xsdre-current-regexp
  592. (xsdre-parse-error "Expected ?"))
  593. (setq name (cons (car xsdre-current-regexp)
  594. name))
  595. (xsdre-advance))
  596. (xsdre-advance)
  597. (setq name (nreverse name))
  598. (cond ((null name) (xsdre-parse-error "Empty property name"))
  599. ((null (cdr name))
  600. (let ((category (intern (string (car name)))))
  601. (unless (get category 'xsdre-unicode-category)
  602. (xsdre-parse-error "%s is not a category" category))
  603. category))
  604. ((null (cddr name))
  605. (let ((category (intern (string (car name) (cadr name)))))
  606. (unless (get category 'xsdre-unicode-category)
  607. (xsdre-parse-error "%s is not a category" category))
  608. category))
  609. ((not (and (eq (car name) ?I)
  610. (eq (cadr name) ?s)))
  611. (xsdre-parse-error "Block name does not start with Is"))
  612. (t
  613. (let ((block (intern (apply 'string (cddr name)))))
  614. (unless (get block 'xsdre-unicode-block)
  615. (xsdre-parse-error "%s is not a block name" block))
  616. block)))))
  617. (defun xsdre-expect (ch)
  618. (if (eq (car xsdre-current-regexp) ch)
  619. (xsdre-advance)
  620. (xsdre-parse-error "Expected %c" ch)))
  621. (defun xsdre-advance ()
  622. (setq xsdre-current-regexp
  623. (cdr xsdre-current-regexp)))
  624. (defun xsdre-parse-error (&rest args)
  625. (signal 'xsdre-parse-error args))
  626. ;; This error condition is used only internally.
  627. (define-error 'xsdre-parse-error "Internal error in parsing XSD regexp")
  628. ;;; Character class data
  629. (put 'dot 'xsdre-char-class '(difference any (union #xA #xD)))
  630. (put 'digit 'xsdre-char-class 'Nd)
  631. (put 'word 'xsdre-char-class '(difference any (union P Z C)))
  632. (put 'space 'xsdre-char-class '(union #x9 #xA #xD #x20))
  633. (put 'any 'xsdre-ranges '((#x0 . #x10FFFF)))
  634. (defconst xsdre-gen-categories
  635. '(Lu Ll Lt Lm Lo Mn Mc Me Nd Nl No Pc Pd
  636. Ps Pe Pi Pf Po Zs Zl Zp Sm Sc Sk So Cc Cf Co))
  637. (defun xsdre-gen-categories (file)
  638. "Use a UnicodeData file to generate code to initialize Unicode categories.
  639. Code is inserted into the current buffer."
  640. (interactive "fUnicodeData file: ")
  641. (with-current-buffer (find-file-noselect file)
  642. (goto-char (point-min))
  643. (mapc (lambda (x) (put x 'xsdre-ranges nil)) xsdre-gen-categories)
  644. (while (re-search-forward "^\\([0-9A-Fa-f]*\\);[^;]*;\\([A-Z][a-z]\\);"
  645. nil
  646. t)
  647. (let* ((sym (intern (match-string-no-properties 2)))
  648. (code (string-to-number (match-string-no-properties 1)
  649. 16))
  650. (ranges (get sym 'xsdre-ranges))
  651. (last-range (car ranges))
  652. (forced-range (string= (buffer-substring-no-properties
  653. (- (match-beginning 2) 6)
  654. (1- (match-beginning 2)))
  655. "Last>")))
  656. (cond ((and (integerp last-range)
  657. (or forced-range
  658. (eq code (1+ last-range))))
  659. (put sym
  660. 'xsdre-ranges
  661. (cons (cons last-range code)
  662. (cdr ranges))))
  663. ((and (consp last-range)
  664. (or forced-range
  665. (eq code (1+ (cdr last-range)))))
  666. (put sym
  667. 'xsdre-ranges
  668. (cons (cons (car last-range) code)
  669. (cdr ranges))))
  670. (t
  671. (put sym 'xsdre-ranges (cons code ranges))))))
  672. (mapc (lambda (x)
  673. (put x
  674. 'xsdre-ranges
  675. (nreverse (get x 'xsdre-ranges)))
  676. nil)
  677. xsdre-gen-categories))
  678. (mapc (lambda (x)
  679. (let ((start (point)))
  680. (pp (list 'xsdre-def-primitive-category
  681. (list 'quote x)
  682. (list 'quote (get x 'xsdre-ranges)))
  683. (current-buffer))
  684. (save-excursion
  685. (goto-char start)
  686. (down-list 2)
  687. (while (condition-case nil
  688. (progn
  689. (forward-sexp)
  690. t)
  691. (error nil))
  692. (when (and (< 70 (current-column))
  693. (not (looking-at ")")))
  694. (insert "\n")
  695. (lisp-indent-line))))))
  696. xsdre-gen-categories))
  697. (defun xsdre-def-primitive-category (sym ranges)
  698. (put sym 'xsdre-ranges ranges)
  699. (put sym 'xsdre-unicode-category t))
  700. ;;; Blocks
  701. (defun xsdre-def-block (sym ranges)
  702. (put sym 'xsdre-ranges ranges)
  703. (put sym 'xsdre-unicode-block t))
  704. (xsdre-def-block 'BasicLatin '((#x0000 . #x007F)))
  705. (xsdre-def-block 'Latin-1Supplement '((#x0080 . #x00FF)))
  706. (xsdre-def-block 'LatinExtended-A '((#x0100 . #x017F)))
  707. (xsdre-def-block 'LatinExtended-B '((#x0180 . #x024F)))
  708. (xsdre-def-block 'IPAExtensions '((#x0250 . #x02AF)))
  709. (xsdre-def-block 'SpacingModifierLetters '((#x02B0 . #x02FF)))
  710. (xsdre-def-block 'CombiningDiacriticalMarks '((#x0300 . #x036F)))
  711. (xsdre-def-block 'Greek '((#x0370 . #x03FF)))
  712. (xsdre-def-block 'Cyrillic '((#x0400 . #x04FF)))
  713. (xsdre-def-block 'Armenian '((#x0530 . #x058F)))
  714. (xsdre-def-block 'Hebrew '((#x0590 . #x05FF)))
  715. (xsdre-def-block 'Arabic '((#x0600 . #x06FF)))
  716. (xsdre-def-block 'Syriac '((#x0700 . #x074F)))
  717. (xsdre-def-block 'Thaana '((#x0780 . #x07BF)))
  718. (xsdre-def-block 'Devanagari '((#x0900 . #x097F)))
  719. (xsdre-def-block 'Bengali '((#x0980 . #x09FF)))
  720. (xsdre-def-block 'Gurmukhi '((#x0A00 . #x0A7F)))
  721. (xsdre-def-block 'Gujarati '((#x0A80 . #x0AFF)))
  722. (xsdre-def-block 'Oriya '((#x0B00 . #x0B7F)))
  723. (xsdre-def-block 'Tamil '((#x0B80 . #x0BFF)))
  724. (xsdre-def-block 'Telugu '((#x0C00 . #x0C7F)))
  725. (xsdre-def-block 'Kannada '((#x0C80 . #x0CFF)))
  726. (xsdre-def-block 'Malayalam '((#x0D00 . #x0D7F)))
  727. (xsdre-def-block 'Sinhala '((#x0D80 . #x0DFF)))
  728. (xsdre-def-block 'Thai '((#x0E00 . #x0E7F)))
  729. (xsdre-def-block 'Lao '((#x0E80 . #x0EFF)))
  730. (xsdre-def-block 'Tibetan '((#x0F00 . #x0FFF)))
  731. (xsdre-def-block 'Myanmar '((#x1000 . #x109F)))
  732. (xsdre-def-block 'Georgian '((#x10A0 . #x10FF)))
  733. (xsdre-def-block 'HangulJamo '((#x1100 . #x11FF)))
  734. (xsdre-def-block 'Ethiopic '((#x1200 . #x137F)))
  735. (xsdre-def-block 'Cherokee '((#x13A0 . #x13FF)))
  736. (xsdre-def-block 'UnifiedCanadianAboriginalSyllabics '((#x1400 . #x167F)))
  737. (xsdre-def-block 'Ogham '((#x1680 . #x169F)))
  738. (xsdre-def-block 'Runic '((#x16A0 . #x16FF)))
  739. (xsdre-def-block 'Khmer '((#x1780 . #x17FF)))
  740. (xsdre-def-block 'Mongolian '((#x1800 . #x18AF)))
  741. (xsdre-def-block 'LatinExtendedAdditional '((#x1E00 . #x1EFF)))
  742. (xsdre-def-block 'GreekExtended '((#x1F00 . #x1FFF)))
  743. (xsdre-def-block 'GeneralPunctuation '((#x2000 . #x206F)))
  744. (xsdre-def-block 'SuperscriptsandSubscripts '((#x2070 . #x209F)))
  745. (xsdre-def-block 'CurrencySymbols '((#x20A0 . #x20CF)))
  746. (xsdre-def-block 'CombiningMarksforSymbols '((#x20D0 . #x20FF)))
  747. (xsdre-def-block 'LetterlikeSymbols '((#x2100 . #x214F)))
  748. (xsdre-def-block 'NumberForms '((#x2150 . #x218F)))
  749. (xsdre-def-block 'Arrows '((#x2190 . #x21FF)))
  750. (xsdre-def-block 'MathematicalOperators '((#x2200 . #x22FF)))
  751. (xsdre-def-block 'MiscellaneousTechnical '((#x2300 . #x23FF)))
  752. (xsdre-def-block 'ControlPictures '((#x2400 . #x243F)))
  753. (xsdre-def-block 'OpticalCharacterRecognition '((#x2440 . #x245F)))
  754. (xsdre-def-block 'EnclosedAlphanumerics '((#x2460 . #x24FF)))
  755. (xsdre-def-block 'BoxDrawing '((#x2500 . #x257F)))
  756. (xsdre-def-block 'BlockElements '((#x2580 . #x259F)))
  757. (xsdre-def-block 'GeometricShapes '((#x25A0 . #x25FF)))
  758. (xsdre-def-block 'MiscellaneousSymbols '((#x2600 . #x26FF)))
  759. (xsdre-def-block 'Dingbats '((#x2700 . #x27BF)))
  760. (xsdre-def-block 'BraillePatterns '((#x2800 . #x28FF)))
  761. (xsdre-def-block 'CJKRadicalsSupplement '((#x2E80 . #x2EFF)))
  762. (xsdre-def-block 'KangxiRadicals '((#x2F00 . #x2FDF)))
  763. (xsdre-def-block 'IdeographicDescriptionCharacters '((#x2FF0 . #x2FFF)))
  764. (xsdre-def-block 'CJKSymbolsandPunctuation '((#x3000 . #x303F)))
  765. (xsdre-def-block 'Hiragana '((#x3040 . #x309F)))
  766. (xsdre-def-block 'Katakana '((#x30A0 . #x30FF)))
  767. (xsdre-def-block 'Bopomofo '((#x3100 . #x312F)))
  768. (xsdre-def-block 'HangulCompatibilityJamo '((#x3130 . #x318F)))
  769. (xsdre-def-block 'Kanbun '((#x3190 . #x319F)))
  770. (xsdre-def-block 'BopomofoExtended '((#x31A0 . #x31BF)))
  771. (xsdre-def-block 'EnclosedCJKLettersandMonths '((#x3200 . #x32FF)))
  772. (xsdre-def-block 'CJKCompatibility '((#x3300 . #x33FF)))
  773. (xsdre-def-block 'CJKUnifiedIdeographsExtensionA '((#x3400 . #x4DB5)))
  774. (xsdre-def-block 'CJKUnifiedIdeographs '((#x4E00 . #x9FFF)))
  775. (xsdre-def-block 'YiSyllables '((#xA000 . #xA48F)))
  776. (xsdre-def-block 'YiRadicals '((#xA490 . #xA4CF)))
  777. (xsdre-def-block 'HangulSyllables '((#xAC00 . #xD7A3)))
  778. ;;(xsdre-def-block 'HighSurrogates '((#xD800 . #xDB7F)))
  779. ;;(xsdre-def-block 'HighPrivateUseSurrogates '((#xDB80 . #xDBFF)))
  780. ;;(xsdre-def-block 'LowSurrogates '((#xDC00 . #xDFFF)))
  781. (xsdre-def-block 'CJKCompatibilityIdeographs '((#xF900 . #xFAFF)))
  782. (xsdre-def-block 'AlphabeticPresentationForms '((#xFB00 . #xFB4F)))
  783. (xsdre-def-block 'ArabicPresentationForms-A '((#xFB50 . #xFDFF)))
  784. (xsdre-def-block 'CombiningHalfMarks '((#xFE20 . #xFE2F)))
  785. (xsdre-def-block 'CJKCompatibilityForms '((#xFE30 . #xFE4F)))
  786. (xsdre-def-block 'SmallFormVariants '((#xFE50 . #xFE6F)))
  787. (xsdre-def-block 'ArabicPresentationForms-B '((#xFE70 . #xFEFE)))
  788. (xsdre-def-block 'Specials '((#xFEFF . #xFEFF)))
  789. (xsdre-def-block 'HalfwidthandFullwidthForms '((#xFF00 . #xFFEF)))
  790. (xsdre-def-block 'Specials '((#xFFF0 . #xFFFD)))
  791. (xsdre-def-block 'OldItalic '((#x10300 . #x1032F)))
  792. (xsdre-def-block 'Gothic '((#x10330 . #x1034F)))
  793. (xsdre-def-block 'Deseret '((#x10400 . #x1044F)))
  794. (xsdre-def-block 'ByzantineMusicalSymbols '((#x1D000 . #x1D0FF)))
  795. (xsdre-def-block 'MusicalSymbols '((#x1D100 . #x1D1FF)))
  796. (xsdre-def-block 'MathematicalAlphanumericSymbols '((#x1D400 . #x1D7FF)))
  797. (xsdre-def-block 'CJKUnifiedIdeographsExtensionB '((#x20000 . #x2A6D6)))
  798. (xsdre-def-block 'CJKCompatibilityIdeographsSupplement '((#x2F800 . #x2FA1F)))
  799. (xsdre-def-block 'Tags '((#xE0000 . #xE007F)))
  800. (xsdre-def-block 'PrivateUse '((#xE000 . #xF8FF)
  801. (#xF0000 . #xFFFFD)
  802. (#x100000 . #x10FFFD)))
  803. ;;; Categories
  804. ;;; Derived categories
  805. (defun xsdre-def-derived-category (sym char-class)
  806. (put sym 'xsdre-char-class char-class)
  807. (put sym 'xsdre-unicode-category t))
  808. (xsdre-def-derived-category 'L '(union Lu Ll Lt Lm Lo))
  809. (xsdre-def-derived-category 'M '(union Mn Mc Me))
  810. (xsdre-def-derived-category 'N '(union Nd Nl No))
  811. (xsdre-def-derived-category 'P '(union Pc Pd Ps Pe Pi Pf Po))
  812. (xsdre-def-derived-category 'Z '(union Zs Zl Zp))
  813. (xsdre-def-derived-category 'S '(union Sm Sc Sk So))
  814. (xsdre-def-derived-category 'C '(union Cc Cf Co Cn))
  815. (xsdre-def-derived-category 'Cn '(difference any
  816. (union L M N P Z S Cc Cf Co)))
  817. (xsdre-def-primitive-category
  818. 'name-initial
  819. '(#x003a
  820. (#x0041 . #x005a)
  821. #x005f
  822. (#x0061 . #x007a)
  823. (#x00c0 . #x00d6)
  824. (#x00d8 . #x00f6)
  825. (#x00f8 . #x0131)
  826. (#x0134 . #x013e)
  827. (#x0141 . #x0148)
  828. (#x014a . #x017e)
  829. (#x0180 . #x01c3)
  830. (#x01cd . #x01f0)
  831. (#x01f4 . #x01f5)
  832. (#x01fa . #x0217)
  833. (#x0250 . #x02a8)
  834. (#x02bb . #x02c1)
  835. #x0386
  836. (#x0388 . #x038a)
  837. #x038c
  838. (#x038e . #x03a1)
  839. (#x03a3 . #x03ce)
  840. (#x03d0 . #x03d6)
  841. #x03da
  842. #x03dc
  843. #x03de
  844. #x03e0
  845. (#x03e2 . #x03f3)
  846. (#x0401 . #x040c)
  847. (#x040e . #x044f)
  848. (#x0451 . #x045c)
  849. (#x045e . #x0481)
  850. (#x0490 . #x04c4)
  851. (#x04c7 . #x04c8)
  852. (#x04cb . #x04cc)
  853. (#x04d0 . #x04eb)
  854. (#x04ee . #x04f5)
  855. (#x04f8 . #x04f9)
  856. (#x0531 . #x0556)
  857. #x0559
  858. (#x0561 . #x0586)
  859. (#x05d0 . #x05ea)
  860. (#x05f0 . #x05f2)
  861. (#x0621 . #x063a)
  862. (#x0641 . #x064a)
  863. (#x0671 . #x06b7)
  864. (#x06ba . #x06be)
  865. (#x06c0 . #x06ce)
  866. (#x06d0 . #x06d3)
  867. #x06d5
  868. (#x06e5 . #x06e6)
  869. (#x0905 . #x0939)
  870. #x093d
  871. (#x0958 . #x0961)
  872. (#x0985 . #x098c)
  873. (#x098f . #x0990)
  874. (#x0993 . #x09a8)
  875. (#x09aa . #x09b0)
  876. #x09b2
  877. (#x09b6 . #x09b9)
  878. (#x09dc . #x09dd)
  879. (#x09df . #x09e1)
  880. (#x09f0 . #x09f1)
  881. (#x0a05 . #x0a0a)
  882. (#x0a0f . #x0a10)
  883. (#x0a13 . #x0a28)
  884. (#x0a2a . #x0a30)
  885. (#x0a32 . #x0a33)
  886. (#x0a35 . #x0a36)
  887. (#x0a38 . #x0a39)
  888. (#x0a59 . #x0a5c)
  889. #x0a5e
  890. (#x0a72 . #x0a74)
  891. (#x0a85 . #x0a8b)
  892. #x0a8d
  893. (#x0a8f . #x0a91)
  894. (#x0a93 . #x0aa8)
  895. (#x0aaa . #x0ab0)
  896. (#x0ab2 . #x0ab3)
  897. (#x0ab5 . #x0ab9)
  898. #x0abd
  899. #x0ae0
  900. (#x0b05 . #x0b0c)
  901. (#x0b0f . #x0b10)
  902. (#x0b13 . #x0b28)
  903. (#x0b2a . #x0b30)
  904. (#x0b32 . #x0b33)
  905. (#x0b36 . #x0b39)
  906. #x0b3d
  907. (#x0b5c . #x0b5d)
  908. (#x0b5f . #x0b61)
  909. (#x0b85 . #x0b8a)
  910. (#x0b8e . #x0b90)
  911. (#x0b92 . #x0b95)
  912. (#x0b99 . #x0b9a)
  913. #x0b9c
  914. (#x0b9e . #x0b9f)
  915. (#x0ba3 . #x0ba4)
  916. (#x0ba8 . #x0baa)
  917. (#x0bae . #x0bb5)
  918. (#x0bb7 . #x0bb9)
  919. (#x0c05 . #x0c0c)
  920. (#x0c0e . #x0c10)
  921. (#x0c12 . #x0c28)
  922. (#x0c2a . #x0c33)
  923. (#x0c35 . #x0c39)
  924. (#x0c60 . #x0c61)
  925. (#x0c85 . #x0c8c)
  926. (#x0c8e . #x0c90)
  927. (#x0c92 . #x0ca8)
  928. (#x0caa . #x0cb3)
  929. (#x0cb5 . #x0cb9)
  930. #x0cde
  931. (#x0ce0 . #x0ce1)
  932. (#x0d05 . #x0d0c)
  933. (#x0d0e . #x0d10)
  934. (#x0d12 . #x0d28)
  935. (#x0d2a . #x0d39)
  936. (#x0d60 . #x0d61)
  937. (#x0e01 . #x0e2e)
  938. #x0e30
  939. (#x0e32 . #x0e33)
  940. (#x0e40 . #x0e45)
  941. (#x0e81 . #x0e82)
  942. #x0e84
  943. (#x0e87 . #x0e88)
  944. #x0e8a
  945. #x0e8d
  946. (#x0e94 . #x0e97)
  947. (#x0e99 . #x0e9f)
  948. (#x0ea1 . #x0ea3)
  949. #x0ea5
  950. #x0ea7
  951. (#x0eaa . #x0eab)
  952. (#x0ead . #x0eae)
  953. #x0eb0
  954. (#x0eb2 . #x0eb3)
  955. #x0ebd
  956. (#x0ec0 . #x0ec4)
  957. (#x0f40 . #x0f47)
  958. (#x0f49 . #x0f69)
  959. (#x10a0 . #x10c5)
  960. (#x10d0 . #x10f6)
  961. #x1100
  962. (#x1102 . #x1103)
  963. (#x1105 . #x1107)
  964. #x1109
  965. (#x110b . #x110c)
  966. (#x110e . #x1112)
  967. #x113c
  968. #x113e
  969. #x1140
  970. #x114c
  971. #x114e
  972. #x1150
  973. (#x1154 . #x1155)
  974. #x1159
  975. (#x115f . #x1161)
  976. #x1163
  977. #x1165
  978. #x1167
  979. #x1169
  980. (#x116d . #x116e)
  981. (#x1172 . #x1173)
  982. #x1175
  983. #x119e
  984. #x11a8
  985. #x11ab
  986. (#x11ae . #x11af)
  987. (#x11b7 . #x11b8)
  988. #x11ba
  989. (#x11bc . #x11c2)
  990. #x11eb
  991. #x11f0
  992. #x11f9
  993. (#x1e00 . #x1e9b)
  994. (#x1ea0 . #x1ef9)
  995. (#x1f00 . #x1f15)
  996. (#x1f18 . #x1f1d)
  997. (#x1f20 . #x1f45)
  998. (#x1f48 . #x1f4d)
  999. (#x1f50 . #x1f57)
  1000. #x1f59
  1001. #x1f5b
  1002. #x1f5d
  1003. (#x1f5f . #x1f7d)
  1004. (#x1f80 . #x1fb4)
  1005. (#x1fb6 . #x1fbc)
  1006. #x1fbe
  1007. (#x1fc2 . #x1fc4)
  1008. (#x1fc6 . #x1fcc)
  1009. (#x1fd0 . #x1fd3)
  1010. (#x1fd6 . #x1fdb)
  1011. (#x1fe0 . #x1fec)
  1012. (#x1ff2 . #x1ff4)
  1013. (#x1ff6 . #x1ffc)
  1014. #x2126
  1015. (#x212a . #x212b)
  1016. #x212e
  1017. (#x2180 . #x2182)
  1018. #x3007
  1019. (#x3021 . #x3029)
  1020. (#x3041 . #x3094)
  1021. (#x30a1 . #x30fa)
  1022. (#x3105 . #x312c)
  1023. (#x4e00 . #x9fa5)
  1024. (#xac00 . #xd7a3)))
  1025. (xsdre-def-derived-category 'name-continue '(union name-initial
  1026. name-continue-not-initial))
  1027. (xsdre-def-primitive-category
  1028. 'name-continue-not-initial
  1029. '((#x002d . #x002e)
  1030. (#x0030 . #x0039)
  1031. #x00b7
  1032. (#x02d0 . #x02d1)
  1033. (#x0300 . #x0345)
  1034. (#x0360 . #x0361)
  1035. #x0387
  1036. (#x0483 . #x0486)
  1037. (#x0591 . #x05a1)
  1038. (#x05a3 . #x05b9)
  1039. (#x05bb . #x05bd)
  1040. #x05bf
  1041. (#x05c1 . #x05c2)
  1042. #x05c4
  1043. #x0640
  1044. (#x064b . #x0652)
  1045. (#x0660 . #x0669)
  1046. #x0670
  1047. (#x06d6 . #x06dc)
  1048. (#x06dd . #x06df)
  1049. (#x06e0 . #x06e4)
  1050. (#x06e7 . #x06e8)
  1051. (#x06ea . #x06ed)
  1052. (#x06f0 . #x06f9)
  1053. (#x0901 . #x0903)
  1054. #x093c
  1055. (#x093e . #x094c)
  1056. #x094d
  1057. (#x0951 . #x0954)
  1058. (#x0962 . #x0963)
  1059. (#x0966 . #x096f)
  1060. (#x0981 . #x0983)
  1061. #x09bc
  1062. (#x09be . #x09bf)
  1063. (#x09c0 . #x09c4)
  1064. (#x09c7 . #x09c8)
  1065. (#x09cb . #x09cd)
  1066. #x09d7
  1067. (#x09e2 . #x09e3)
  1068. (#x09e6 . #x09ef)
  1069. #x0a02
  1070. #x0a3c
  1071. (#x0a3e . #x0a42)
  1072. (#x0a47 . #x0a48)
  1073. (#x0a4b . #x0a4d)
  1074. (#x0a66 . #x0a6f)
  1075. (#x0a70 . #x0a71)
  1076. (#x0a81 . #x0a83)
  1077. #x0abc
  1078. (#x0abe . #x0ac5)
  1079. (#x0ac7 . #x0ac9)
  1080. (#x0acb . #x0acd)
  1081. (#x0ae6 . #x0aef)
  1082. (#x0b01 . #x0b03)
  1083. #x0b3c
  1084. (#x0b3e . #x0b43)
  1085. (#x0b47 . #x0b48)
  1086. (#x0b4b . #x0b4d)
  1087. (#x0b56 . #x0b57)
  1088. (#x0b66 . #x0b6f)
  1089. (#x0b82 . #x0b83)
  1090. (#x0bbe . #x0bc2)
  1091. (#x0bc6 . #x0bc8)
  1092. (#x0bca . #x0bcd)
  1093. #x0bd7
  1094. (#x0be7 . #x0bef)
  1095. (#x0c01 . #x0c03)
  1096. (#x0c3e . #x0c44)
  1097. (#x0c46 . #x0c48)
  1098. (#x0c4a . #x0c4d)
  1099. (#x0c55 . #x0c56)
  1100. (#x0c66 . #x0c6f)
  1101. (#x0c82 . #x0c83)
  1102. (#x0cbe . #x0cc4)
  1103. (#x0cc6 . #x0cc8)
  1104. (#x0cca . #x0ccd)
  1105. (#x0cd5 . #x0cd6)
  1106. (#x0ce6 . #x0cef)
  1107. (#x0d02 . #x0d03)
  1108. (#x0d3e . #x0d43)
  1109. (#x0d46 . #x0d48)
  1110. (#x0d4a . #x0d4d)
  1111. #x0d57
  1112. (#x0d66 . #x0d6f)
  1113. #x0e31
  1114. (#x0e34 . #x0e3a)
  1115. (#x0e46 . #x0e4e)
  1116. (#x0e50 . #x0e59)
  1117. #x0eb1
  1118. (#x0eb4 . #x0eb9)
  1119. (#x0ebb . #x0ebc)
  1120. #x0ec6
  1121. (#x0ec8 . #x0ecd)
  1122. (#x0ed0 . #x0ed9)
  1123. (#x0f18 . #x0f19)
  1124. (#x0f20 . #x0f29)
  1125. #x0f35
  1126. #x0f37
  1127. #x0f39
  1128. (#x0f3e . #x0f3f)
  1129. (#x0f71 . #x0f84)
  1130. (#x0f86 . #x0f8b)
  1131. (#x0f90 . #x0f95)
  1132. #x0f97
  1133. (#x0f99 . #x0fad)
  1134. (#x0fb1 . #x0fb7)
  1135. #x0fb9
  1136. (#x20d0 . #x20dc)
  1137. #x20e1
  1138. #x3005
  1139. (#x302a . #x302f)
  1140. (#x3031 . #x3035)
  1141. #x3099
  1142. #x309a
  1143. (#x309d . #x309e)
  1144. (#x30fc . #x30fe)))
  1145. ;;; Auto-generated section.
  1146. ;; The rest of the file was auto-generated by doing M-x xsdre-gen-categories
  1147. ;; on UnicodeData-3.1.0.txt available from
  1148. ;; http://www.unicode.org/Public/3.1-Update/UnicodeData-3.1.0.txt
  1149. (xsdre-def-primitive-category 'Lu
  1150. '((65 . 90)
  1151. (192 . 214)
  1152. (216 . 222)
  1153. 256 258 260 262 264 266 268 270 272 274 276
  1154. 278 280 282 284 286 288 290 292 294 296 298
  1155. 300 302 304 306 308 310 313 315 317 319 321
  1156. 323 325 327 330 332 334 336 338 340 342 344
  1157. 346 348 350 352 354 356 358 360 362 364 366
  1158. 368 370 372 374
  1159. (376 . 377)
  1160. 379 381
  1161. (385 . 386)
  1162. 388
  1163. (390 . 391)
  1164. (393 . 395)
  1165. (398 . 401)
  1166. (403 . 404)
  1167. (406 . 408)
  1168. (412 . 413)
  1169. (415 . 416)
  1170. 418 420
  1171. (422 . 423)
  1172. 425 428
  1173. (430 . 431)
  1174. (433 . 435)
  1175. 437
  1176. (439 . 440)
  1177. 444 452 455 458 461 463 465 467 469 471 473
  1178. 475 478 480 482 484 486 488 490 492 494 497
  1179. 500
  1180. (502 . 504)
  1181. 506 508 510 512 514 516 518 520 522 524 526
  1182. 528 530 532 534 536 538 540 542 546 548 550
  1183. 552 554 556 558 560 562 902
  1184. (904 . 906)
  1185. 908
  1186. (910 . 911)
  1187. (913 . 929)
  1188. (931 . 939)
  1189. (978 . 980)
  1190. 986 988 990 992 994 996 998 1000 1002 1004
  1191. 1006 1012
  1192. (1024 . 1071)
  1193. 1120 1122 1124 1126 1128 1130 1132 1134 1136
  1194. 1138 1140 1142 1144 1146 1148 1150 1152 1164
  1195. 1166 1168 1170 1172 1174 1176 1178 1180 1182
  1196. 1184 1186 1188 1190 1192 1194 1196 1198 1200
  1197. 1202 1204 1206 1208 1210 1212 1214
  1198. (1216 . 1217)
  1199. 1219 1223 1227 1232 1234 1236 1238 1240 1242
  1200. 1244 1246 1248 1250 1252 1254 1256 1258 1260
  1201. 1262 1264 1266 1268 1272
  1202. (1329 . 1366)
  1203. (4256 . 4293)
  1204. 7680 7682 7684 7686 7688 7690 7692 7694 7696
  1205. 7698 7700 7702 7704 7706 7708 7710 7712 7714
  1206. 7716 7718 7720 7722 7724 7726 7728 7730 7732
  1207. 7734 7736 7738 7740 7742 7744 7746 7748 7750
  1208. 7752 7754 7756 7758 7760 7762 7764 7766 7768
  1209. 7770 7772 7774 7776 7778 7780 7782 7784 7786
  1210. 7788 7790 7792 7794 7796 7798 7800 7802 7804
  1211. 7806 7808 7810 7812 7814 7816 7818 7820 7822
  1212. 7824 7826 7828 7840 7842 7844 7846 7848 7850
  1213. 7852 7854 7856 7858 7860 7862 7864 7866 7868
  1214. 7870 7872 7874 7876 7878 7880 7882 7884 7886
  1215. 7888 7890 7892 7894 7896 7898 7900 7902 7904
  1216. 7906 7908 7910 7912 7914 7916 7918 7920 7922
  1217. 7924 7926 7928
  1218. (7944 . 7951)
  1219. (7960 . 7965)
  1220. (7976 . 7983)
  1221. (7992 . 7999)
  1222. (8008 . 8013)
  1223. 8025 8027 8029 8031
  1224. (8040 . 8047)
  1225. (8120 . 8123)
  1226. (8136 . 8139)
  1227. (8152 . 8155)
  1228. (8168 . 8172)
  1229. (8184 . 8187)
  1230. 8450 8455
  1231. (8459 . 8461)
  1232. (8464 . 8466)
  1233. 8469
  1234. (8473 . 8477)
  1235. 8484 8486 8488
  1236. (8490 . 8493)
  1237. (8496 . 8497)
  1238. 8499
  1239. (65313 . 65338)
  1240. (66560 . 66597)
  1241. (119808 . 119833)
  1242. (119860 . 119885)
  1243. (119912 . 119937)
  1244. 119964
  1245. (119966 . 119967)
  1246. 119970
  1247. (119973 . 119974)
  1248. (119977 . 119980)
  1249. (119982 . 119989)
  1250. (120016 . 120041)
  1251. (120068 . 120069)
  1252. (120071 . 120074)
  1253. (120077 . 120084)
  1254. (120086 . 120092)
  1255. (120120 . 120121)
  1256. (120123 . 120126)
  1257. (120128 . 120132)
  1258. 120134
  1259. (120138 . 120144)
  1260. (120172 . 120197)
  1261. (120224 . 120249)
  1262. (120276 . 120301)
  1263. (120328 . 120353)
  1264. (120380 . 120405)
  1265. (120432 . 120457)
  1266. (120488 . 120512)
  1267. (120546 . 120570)
  1268. (120604 . 120628)
  1269. (120662 . 120686)
  1270. (120720 . 120744)))
  1271. (xsdre-def-primitive-category 'Ll
  1272. '((97 . 122)
  1273. 170 181 186
  1274. (223 . 246)
  1275. (248 . 255)
  1276. 257 259 261 263 265 267 269 271 273 275 277
  1277. 279 281 283 285 287 289 291 293 295 297 299
  1278. 301 303 305 307 309
  1279. (311 . 312)
  1280. 314 316 318 320 322 324 326
  1281. (328 . 329)
  1282. 331 333 335 337 339 341 343 345 347 349 351
  1283. 353 355 357 359 361 363 365 367 369 371 373
  1284. 375 378 380
  1285. (382 . 384)
  1286. 387 389 392
  1287. (396 . 397)
  1288. 402 405
  1289. (409 . 411)
  1290. 414 417 419 421 424
  1291. (426 . 427)
  1292. 429 432 436 438
  1293. (441 . 442)
  1294. (445 . 447)
  1295. 454 457 460 462 464 466 468 470 472 474
  1296. (476 . 477)
  1297. 479 481 483 485 487 489 491 493
  1298. (495 . 496)
  1299. 499 501 505 507 509 511 513 515 517 519 521
  1300. 523 525 527 529 531 533 535 537 539 541 543
  1301. 547 549 551 553 555 557 559 561 563
  1302. (592 . 685)
  1303. 912
  1304. (940 . 974)
  1305. (976 . 977)
  1306. (981 . 983)
  1307. 987 989 991 993 995 997 999 1001 1003 1005
  1308. (1007 . 1011)
  1309. 1013
  1310. (1072 . 1119)
  1311. 1121 1123 1125 1127 1129 1131 1133 1135 1137
  1312. 1139 1141 1143 1145 1147 1149 1151 1153 1165
  1313. 1167 1169 1171 1173 1175 1177 1179 1181 1183
  1314. 1185 1187 1189 1191 1193 1195 1197 1199 1201
  1315. 1203 1205 1207 1209 1211 1213 1215 1218 1220
  1316. 1224 1228 1233 1235 1237 1239 1241 1243 1245
  1317. 1247 1249 1251 1253 1255 1257 1259 1261 1263
  1318. 1265 1267 1269 1273
  1319. (1377 . 1415)
  1320. 7681 7683 7685 7687 7689 7691 7693 7695 7697
  1321. 7699 7701 7703 7705 7707 7709 7711 7713 7715
  1322. 7717 7719 7721 7723 7725 7727 7729 7731 7733
  1323. 7735 7737 7739 7741 7743 7745 7747 7749 7751
  1324. 7753 7755 7757 7759 7761 7763 7765 7767 7769
  1325. 7771 7773 7775 7777 7779 7781 7783 7785 7787
  1326. 7789 7791 7793 7795 7797 7799 7801 7803 7805
  1327. 7807 7809 7811 7813 7815 7817 7819 7821 7823
  1328. 7825 7827
  1329. (7829 . 7835)
  1330. 7841 7843 7845 7847 7849 7851 7853 7855 7857
  1331. 7859 7861 7863 7865 7867 7869 7871 7873 7875
  1332. 7877 7879 7881 7883 7885 7887 7889 7891 7893
  1333. 7895 7897 7899 7901 7903 7905 7907 7909 7911
  1334. 7913 7915 7917 7919 7921 7923 7925 7927 7929
  1335. (7936 . 7943)
  1336. (7952 . 7957)
  1337. (7968 . 7975)
  1338. (7984 . 7991)
  1339. (8000 . 8005)
  1340. (8016 . 8023)
  1341. (8032 . 8039)
  1342. (8048 . 8061)
  1343. (8064 . 8071)
  1344. (8080 . 8087)
  1345. (8096 . 8103)
  1346. (8112 . 8116)
  1347. (8118 . 8119)
  1348. 8126
  1349. (8130 . 8132)
  1350. (8134 . 8135)
  1351. (8144 . 8147)
  1352. (8150 . 8151)
  1353. (8160 . 8167)
  1354. (8178 . 8180)
  1355. (8182 . 8183)
  1356. 8319 8458
  1357. (8462 . 8463)
  1358. 8467 8495 8500 8505
  1359. (64256 . 64262)
  1360. (64275 . 64279)
  1361. (65345 . 65370)
  1362. (66600 . 66637)
  1363. (119834 . 119859)
  1364. (119886 . 119892)
  1365. (119894 . 119911)
  1366. (119938 . 119963)
  1367. (119990 . 119993)
  1368. 119995
  1369. (119997 . 120000)
  1370. (120002 . 120003)
  1371. (120005 . 120015)
  1372. (120042 . 120067)
  1373. (120094 . 120119)
  1374. (120146 . 120171)
  1375. (120198 . 120223)
  1376. (120250 . 120275)
  1377. (120302 . 120327)
  1378. (120354 . 120379)
  1379. (120406 . 120431)
  1380. (120458 . 120483)
  1381. (120514 . 120538)
  1382. (120540 . 120545)
  1383. (120572 . 120596)
  1384. (120598 . 120603)
  1385. (120630 . 120654)
  1386. (120656 . 120661)
  1387. (120688 . 120712)
  1388. (120714 . 120719)
  1389. (120746 . 120770)
  1390. (120772 . 120777)))
  1391. (xsdre-def-primitive-category 'Lt
  1392. '(453 456 459 498
  1393. (8072 . 8079)
  1394. (8088 . 8095)
  1395. (8104 . 8111)
  1396. 8124 8140 8188))
  1397. (xsdre-def-primitive-category 'Lm
  1398. '((688 . 696)
  1399. (699 . 705)
  1400. (720 . 721)
  1401. (736 . 740)
  1402. 750 890 1369 1600
  1403. (1765 . 1766)
  1404. 3654 3782 6211 12293
  1405. (12337 . 12341)
  1406. (12445 . 12446)
  1407. (12540 . 12542)
  1408. 65392
  1409. (65438 . 65439)))
  1410. (xsdre-def-primitive-category 'Lo
  1411. '(443
  1412. (448 . 451)
  1413. (1488 . 1514)
  1414. (1520 . 1522)
  1415. (1569 . 1594)
  1416. (1601 . 1610)
  1417. (1649 . 1747)
  1418. 1749
  1419. (1786 . 1788)
  1420. 1808
  1421. (1810 . 1836)
  1422. (1920 . 1957)
  1423. (2309 . 2361)
  1424. 2365 2384
  1425. (2392 . 2401)
  1426. (2437 . 2444)
  1427. (2447 . 2448)
  1428. (2451 . 2472)
  1429. (2474 . 2480)
  1430. 2482
  1431. (2486 . 2489)
  1432. (2524 . 2525)
  1433. (2527 . 2529)
  1434. (2544 . 2545)
  1435. (2565 . 2570)
  1436. (2575 . 2576)
  1437. (2579 . 2600)
  1438. (2602 . 2608)
  1439. (2610 . 2611)
  1440. (2613 . 2614)
  1441. (2616 . 2617)
  1442. (2649 . 2652)
  1443. 2654
  1444. (2674 . 2676)
  1445. (2693 . 2699)
  1446. 2701
  1447. (2703 . 2705)
  1448. (2707 . 2728)
  1449. (2730 . 2736)
  1450. (2738 . 2739)
  1451. (2741 . 2745)
  1452. 2749 2768 2784
  1453. (2821 . 2828)
  1454. (2831 . 2832)
  1455. (2835 . 2856)
  1456. (2858 . 2864)
  1457. (2866 . 2867)
  1458. (2870 . 2873)
  1459. 2877
  1460. (2908 . 2909)
  1461. (2911 . 2913)
  1462. (2949 . 2954)
  1463. (2958 . 2960)
  1464. (2962 . 2965)
  1465. (2969 . 2970)
  1466. 2972
  1467. (2974 . 2975)
  1468. (2979 . 2980)
  1469. (2984 . 2986)
  1470. (2990 . 2997)
  1471. (2999 . 3001)
  1472. (3077 . 3084)
  1473. (3086 . 3088)
  1474. (3090 . 3112)
  1475. (3114 . 3123)
  1476. (3125 . 3129)
  1477. (3168 . 3169)
  1478. (3205 . 3212)
  1479. (3214 . 3216)
  1480. (3218 . 3240)
  1481. (3242 . 3251)
  1482. (3253 . 3257)
  1483. 3294
  1484. (3296 . 3297)
  1485. (3333 . 3340)
  1486. (3342 . 3344)
  1487. (3346 . 3368)
  1488. (3370 . 3385)
  1489. (3424 . 3425)
  1490. (3461 . 3478)
  1491. (3482 . 3505)
  1492. (3507 . 3515)
  1493. 3517
  1494. (3520 . 3526)
  1495. (3585 . 3632)
  1496. (3634 . 3635)
  1497. (3648 . 3653)
  1498. (3713 . 3714)
  1499. 3716
  1500. (3719 . 3720)
  1501. 3722 3725
  1502. (3732 . 3735)
  1503. (3737 . 3743)
  1504. (3745 . 3747)
  1505. 3749 3751
  1506. (3754 . 3755)
  1507. (3757 . 3760)
  1508. (3762 . 3763)
  1509. 3773
  1510. (3776 . 3780)
  1511. (3804 . 3805)
  1512. 3840
  1513. (3904 . 3911)
  1514. (3913 . 3946)
  1515. (3976 . 3979)
  1516. (4096 . 4129)
  1517. (4131 . 4135)
  1518. (4137 . 4138)
  1519. (4176 . 4181)
  1520. (4304 . 4342)
  1521. (4352 . 4441)
  1522. (4447 . 4514)
  1523. (4520 . 4601)
  1524. (4608 . 4614)
  1525. (4616 . 4678)
  1526. 4680
  1527. (4682 . 4685)
  1528. (4688 . 4694)
  1529. 4696
  1530. (4698 . 4701)
  1531. (4704 . 4742)
  1532. 4744
  1533. (4746 . 4749)
  1534. (4752 . 4782)
  1535. 4784
  1536. (4786 . 4789)
  1537. (4792 . 4798)
  1538. 4800
  1539. (4802 . 4805)
  1540. (4808 . 4814)
  1541. (4816 . 4822)
  1542. (4824 . 4846)
  1543. (4848 . 4878)
  1544. 4880
  1545. (4882 . 4885)
  1546. (4888 . 4894)
  1547. (4896 . 4934)
  1548. (4936 . 4954)
  1549. (5024 . 5108)
  1550. (5121 . 5740)
  1551. (5743 . 5750)
  1552. (5761 . 5786)
  1553. (5792 . 5866)
  1554. (6016 . 6067)
  1555. (6176 . 6210)
  1556. (6212 . 6263)
  1557. (6272 . 6312)
  1558. (8501 . 8504)
  1559. 12294
  1560. (12353 . 12436)
  1561. (12449 . 12538)
  1562. (12549 . 12588)
  1563. (12593 . 12686)
  1564. (12704 . 12727)
  1565. (13312 . 19893)
  1566. (19968 . 40869)
  1567. (40960 . 42124)
  1568. (44032 . 55203)
  1569. (63744 . 64045)
  1570. 64285
  1571. (64287 . 64296)
  1572. (64298 . 64310)
  1573. (64312 . 64316)
  1574. 64318
  1575. (64320 . 64321)
  1576. (64323 . 64324)
  1577. (64326 . 64433)
  1578. (64467 . 64829)
  1579. (64848 . 64911)
  1580. (64914 . 64967)
  1581. (65008 . 65019)
  1582. (65136 . 65138)
  1583. 65140
  1584. (65142 . 65276)
  1585. (65382 . 65391)
  1586. (65393 . 65437)
  1587. (65440 . 65470)
  1588. (65474 . 65479)
  1589. (65482 . 65487)
  1590. (65490 . 65495)
  1591. (65498 . 65500)
  1592. (66304 . 66334)
  1593. (66352 . 66377)
  1594. (131072 . 173782)
  1595. (194560 . 195101)))
  1596. (xsdre-def-primitive-category 'Mn
  1597. '((768 . 846)
  1598. (864 . 866)
  1599. (1155 . 1158)
  1600. (1425 . 1441)
  1601. (1443 . 1465)
  1602. (1467 . 1469)
  1603. 1471
  1604. (1473 . 1474)
  1605. 1476
  1606. (1611 . 1621)
  1607. 1648
  1608. (1750 . 1756)
  1609. (1759 . 1764)
  1610. (1767 . 1768)
  1611. (1770 . 1773)
  1612. 1809
  1613. (1840 . 1866)
  1614. (1958 . 1968)
  1615. (2305 . 2306)
  1616. 2364
  1617. (2369 . 2376)
  1618. 2381
  1619. (2385 . 2388)
  1620. (2402 . 2403)
  1621. 2433 2492
  1622. (2497 . 2500)
  1623. 2509
  1624. (2530 . 2531)
  1625. 2562 2620
  1626. (2625 . 2626)
  1627. (2631 . 2632)
  1628. (2635 . 2637)
  1629. (2672 . 2673)
  1630. (2689 . 2690)
  1631. 2748
  1632. (2753 . 2757)
  1633. (2759 . 2760)
  1634. 2765 2817 2876 2879
  1635. (2881 . 2883)
  1636. 2893 2902 2946 3008 3021
  1637. (3134 . 3136)
  1638. (3142 . 3144)
  1639. (3146 . 3149)
  1640. (3157 . 3158)
  1641. 3263 3270
  1642. (3276 . 3277)
  1643. (3393 . 3395)
  1644. 3405 3530
  1645. (3538 . 3540)
  1646. 3542 3633
  1647. (3636 . 3642)
  1648. (3655 . 3662)
  1649. 3761
  1650. (3764 . 3769)
  1651. (3771 . 3772)
  1652. (3784 . 3789)
  1653. (3864 . 3865)
  1654. 3893 3895 3897
  1655. (3953 . 3966)
  1656. (3968 . 3972)
  1657. (3974 . 3975)
  1658. (3984 . 3991)
  1659. (3993 . 4028)
  1660. 4038
  1661. (4141 . 4144)
  1662. 4146
  1663. (4150 . 4151)
  1664. 4153
  1665. (4184 . 4185)
  1666. (6071 . 6077)
  1667. 6086
  1668. (6089 . 6099)
  1669. 6313
  1670. (8400 . 8412)
  1671. 8417
  1672. (12330 . 12335)
  1673. (12441 . 12442)
  1674. 64286
  1675. (65056 . 65059)
  1676. (119143 . 119145)
  1677. (119163 . 119170)
  1678. (119173 . 119179)
  1679. (119210 . 119213)))
  1680. (xsdre-def-primitive-category 'Mc
  1681. '(2307
  1682. (2366 . 2368)
  1683. (2377 . 2380)
  1684. (2434 . 2435)
  1685. (2494 . 2496)
  1686. (2503 . 2504)
  1687. (2507 . 2508)
  1688. 2519
  1689. (2622 . 2624)
  1690. 2691
  1691. (2750 . 2752)
  1692. 2761
  1693. (2763 . 2764)
  1694. (2818 . 2819)
  1695. 2878 2880
  1696. (2887 . 2888)
  1697. (2891 . 2892)
  1698. 2903 2947
  1699. (3006 . 3007)
  1700. (3009 . 3010)
  1701. (3014 . 3016)
  1702. (3018 . 3020)
  1703. 3031
  1704. (3073 . 3075)
  1705. (3137 . 3140)
  1706. (3202 . 3203)
  1707. 3262
  1708. (3264 . 3268)
  1709. (3271 . 3272)
  1710. (3274 . 3275)
  1711. (3285 . 3286)
  1712. (3330 . 3331)
  1713. (3390 . 3392)
  1714. (3398 . 3400)
  1715. (3402 . 3404)
  1716. 3415
  1717. (3458 . 3459)
  1718. (3535 . 3537)
  1719. (3544 . 3551)
  1720. (3570 . 3571)
  1721. (3902 . 3903)
  1722. 3967 4140 4145 4152
  1723. (4182 . 4183)
  1724. (6068 . 6070)
  1725. (6078 . 6085)
  1726. (6087 . 6088)
  1727. (119141 . 119142)
  1728. (119149 . 119154)))
  1729. (xsdre-def-primitive-category 'Me
  1730. '((1160 . 1161)
  1731. (1757 . 1758)
  1732. (8413 . 8416)
  1733. (8418 . 8419)))
  1734. (xsdre-def-primitive-category 'Nd
  1735. '((48 . 57)
  1736. (1632 . 1641)
  1737. (1776 . 1785)
  1738. (2406 . 2415)
  1739. (2534 . 2543)
  1740. (2662 . 2671)
  1741. (2790 . 2799)
  1742. (2918 . 2927)
  1743. (3047 . 3055)
  1744. (3174 . 3183)
  1745. (3302 . 3311)
  1746. (3430 . 3439)
  1747. (3664 . 3673)
  1748. (3792 . 3801)
  1749. (3872 . 3881)
  1750. (4160 . 4169)
  1751. (4969 . 4977)
  1752. (6112 . 6121)
  1753. (6160 . 6169)
  1754. (65296 . 65305)
  1755. (120782 . 120831)))
  1756. (xsdre-def-primitive-category 'Nl
  1757. '((5870 . 5872)
  1758. (8544 . 8579)
  1759. 12295
  1760. (12321 . 12329)
  1761. (12344 . 12346)
  1762. 66378))
  1763. (xsdre-def-primitive-category 'No
  1764. '((178 . 179)
  1765. 185
  1766. (188 . 190)
  1767. (2548 . 2553)
  1768. (3056 . 3058)
  1769. (3882 . 3891)
  1770. (4978 . 4988)
  1771. 8304
  1772. (8308 . 8313)
  1773. (8320 . 8329)
  1774. (8531 . 8543)
  1775. (9312 . 9371)
  1776. 9450
  1777. (10102 . 10131)
  1778. (12690 . 12693)
  1779. (12832 . 12841)
  1780. (12928 . 12937)
  1781. (66336 . 66339)))
  1782. (xsdre-def-primitive-category 'Pc
  1783. '(95
  1784. (8255 . 8256)
  1785. 12539
  1786. (65075 . 65076)
  1787. (65101 . 65103)
  1788. 65343 65381))
  1789. (xsdre-def-primitive-category 'Pd
  1790. '(45 173 1418 6150
  1791. (8208 . 8213)
  1792. 12316 12336
  1793. (65073 . 65074)
  1794. 65112 65123 65293))
  1795. (xsdre-def-primitive-category 'Ps
  1796. '(40 91 123 3898 3900 5787 8218 8222 8261 8317
  1797. 8333 9001 12296 12298 12300 12302 12304
  1798. 12308 12310 12312 12314 12317 64830 65077
  1799. 65079 65081 65083 65085 65087 65089 65091
  1800. 65113 65115 65117 65288 65339 65371 65378))
  1801. (xsdre-def-primitive-category 'Pe
  1802. '(41 93 125 3899 3901 5788 8262 8318 8334 9002
  1803. 12297 12299 12301 12303 12305 12309 12311
  1804. 12313 12315
  1805. (12318 . 12319)
  1806. 64831 65078 65080 65082 65084 65086 65088
  1807. 65090 65092 65114 65116 65118 65289 65341
  1808. 65373 65379))
  1809. (xsdre-def-primitive-category 'Pi
  1810. '(171 8216
  1811. (8219 . 8220)
  1812. 8223 8249))
  1813. (xsdre-def-primitive-category 'Pf
  1814. '(187 8217 8221 8250))
  1815. (xsdre-def-primitive-category 'Po
  1816. '((33 . 35)
  1817. (37 . 39)
  1818. 42 44
  1819. (46 . 47)
  1820. (58 . 59)
  1821. (63 . 64)
  1822. 92 161 183 191 894 903
  1823. (1370 . 1375)
  1824. 1417 1470 1472 1475
  1825. (1523 . 1524)
  1826. 1548 1563 1567
  1827. (1642 . 1645)
  1828. 1748
  1829. (1792 . 1805)
  1830. (2404 . 2405)
  1831. 2416 3572 3663
  1832. (3674 . 3675)
  1833. (3844 . 3858)
  1834. 3973
  1835. (4170 . 4175)
  1836. 4347
  1837. (4961 . 4968)
  1838. (5741 . 5742)
  1839. (5867 . 5869)
  1840. (6100 . 6106)
  1841. 6108
  1842. (6144 . 6149)
  1843. (6151 . 6154)
  1844. (8214 . 8215)
  1845. (8224 . 8231)
  1846. (8240 . 8248)
  1847. (8251 . 8254)
  1848. (8257 . 8259)
  1849. (8264 . 8269)
  1850. (12289 . 12291)
  1851. 65072
  1852. (65097 . 65100)
  1853. (65104 . 65106)
  1854. (65108 . 65111)
  1855. (65119 . 65121)
  1856. 65128
  1857. (65130 . 65131)
  1858. (65281 . 65283)
  1859. (65285 . 65287)
  1860. 65290 65292
  1861. (65294 . 65295)
  1862. (65306 . 65307)
  1863. (65311 . 65312)
  1864. 65340 65377 65380))
  1865. (xsdre-def-primitive-category 'Zs
  1866. '(32 160 5760
  1867. (8192 . 8203)
  1868. 8239 12288))
  1869. (xsdre-def-primitive-category 'Zl
  1870. '(8232))
  1871. (xsdre-def-primitive-category 'Zp
  1872. '(8233))
  1873. (xsdre-def-primitive-category 'Sm
  1874. '(43
  1875. (60 . 62)
  1876. 124 126 172 177 215 247 8260
  1877. (8314 . 8316)
  1878. (8330 . 8332)
  1879. (8592 . 8596)
  1880. (8602 . 8603)
  1881. 8608 8611 8614 8622
  1882. (8654 . 8655)
  1883. 8658 8660
  1884. (8704 . 8945)
  1885. (8968 . 8971)
  1886. (8992 . 8993)
  1887. 9655 9665 9839 64297 65122
  1888. (65124 . 65126)
  1889. 65291
  1890. (65308 . 65310)
  1891. 65372 65374 65506
  1892. (65513 . 65516)
  1893. 120513 120539 120571 120597 120629 120655
  1894. 120687 120713 120745 120771))
  1895. (xsdre-def-primitive-category 'Sc
  1896. '(36
  1897. (162 . 165)
  1898. (2546 . 2547)
  1899. 3647 6107
  1900. (8352 . 8367)
  1901. 65129 65284
  1902. (65504 . 65505)
  1903. (65509 . 65510)))
  1904. (xsdre-def-primitive-category 'Sk
  1905. '(94 96 168 175 180 184
  1906. (697 . 698)
  1907. (706 . 719)
  1908. (722 . 735)
  1909. (741 . 749)
  1910. (884 . 885)
  1911. (900 . 901)
  1912. 8125
  1913. (8127 . 8129)
  1914. (8141 . 8143)
  1915. (8157 . 8159)
  1916. (8173 . 8175)
  1917. (8189 . 8190)
  1918. (12443 . 12444)
  1919. 65342 65344 65507))
  1920. (xsdre-def-primitive-category 'So
  1921. '((166 . 167)
  1922. 169 174 176 182 1154 1769
  1923. (1789 . 1790)
  1924. 2554 2928
  1925. (3841 . 3843)
  1926. (3859 . 3863)
  1927. (3866 . 3871)
  1928. 3892 3894 3896
  1929. (4030 . 4037)
  1930. (4039 . 4044)
  1931. 4047
  1932. (8448 . 8449)
  1933. (8451 . 8454)
  1934. (8456 . 8457)
  1935. 8468
  1936. (8470 . 8472)
  1937. (8478 . 8483)
  1938. 8485 8487 8489 8494 8498 8506
  1939. (8597 . 8601)
  1940. (8604 . 8607)
  1941. (8609 . 8610)
  1942. (8612 . 8613)
  1943. (8615 . 8621)
  1944. (8623 . 8653)
  1945. (8656 . 8657)
  1946. 8659
  1947. (8661 . 8691)
  1948. (8960 . 8967)
  1949. (8972 . 8991)
  1950. (8994 . 9000)
  1951. (9003 . 9083)
  1952. (9085 . 9114)
  1953. (9216 . 9254)
  1954. (9280 . 9290)
  1955. (9372 . 9449)
  1956. (9472 . 9621)
  1957. (9632 . 9654)
  1958. (9656 . 9664)
  1959. (9666 . 9719)
  1960. (9728 . 9747)
  1961. (9753 . 9838)
  1962. (9840 . 9841)
  1963. (9985 . 9988)
  1964. (9990 . 9993)
  1965. (9996 . 10023)
  1966. (10025 . 10059)
  1967. 10061
  1968. (10063 . 10066)
  1969. 10070
  1970. (10072 . 10078)
  1971. (10081 . 10087)
  1972. 10132
  1973. (10136 . 10159)
  1974. (10161 . 10174)
  1975. (10240 . 10495)
  1976. (11904 . 11929)
  1977. (11931 . 12019)
  1978. (12032 . 12245)
  1979. (12272 . 12283)
  1980. 12292
  1981. (12306 . 12307)
  1982. 12320
  1983. (12342 . 12343)
  1984. (12350 . 12351)
  1985. (12688 . 12689)
  1986. (12694 . 12703)
  1987. (12800 . 12828)
  1988. (12842 . 12867)
  1989. (12896 . 12923)
  1990. 12927
  1991. (12938 . 12976)
  1992. (12992 . 13003)
  1993. (13008 . 13054)
  1994. (13056 . 13174)
  1995. (13179 . 13277)
  1996. (13280 . 13310)
  1997. (42128 . 42145)
  1998. (42148 . 42163)
  1999. (42165 . 42176)
  2000. (42178 . 42180)
  2001. 42182 65508 65512
  2002. (65517 . 65518)
  2003. (65532 . 65533)
  2004. (118784 . 119029)
  2005. (119040 . 119078)
  2006. (119082 . 119140)
  2007. (119146 . 119148)
  2008. (119171 . 119172)
  2009. (119180 . 119209)
  2010. (119214 . 119261)))
  2011. (xsdre-def-primitive-category 'Cc
  2012. '((0 . 31)
  2013. (127 . 159)))
  2014. (xsdre-def-primitive-category 'Cf
  2015. '(1807
  2016. (6155 . 6158)
  2017. (8204 . 8207)
  2018. (8234 . 8238)
  2019. (8298 . 8303)
  2020. 65279
  2021. (65529 . 65531)
  2022. (119155 . 119162)
  2023. 917505
  2024. (917536 . 917631)))
  2025. (xsdre-def-primitive-category 'Co
  2026. '((57344 . 63743)
  2027. (983040 . 1048573)
  2028. (1048576 . 1114109)))
  2029. (provide 'xsd-regexp)
  2030. ;;; xsd-regexp.el ends here