xsd-regexp.el 54 KB

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