Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

463 lines
15 KiB

  1. /*===========================================================================
  2. xmldef.h
  3. definitions, macros and function prototypes for parsifal.c
  4. see parsifal.h for copyright info
  5. ===========================================================================*/
  6. #ifndef XMLDEF__H
  7. #define XMLDEF__H
  8. #include <assert.h>
  9. #ifdef _MSC_VER
  10. #ifdef _DEBUG
  11. #include <crtdbg.h>
  12. #define _CRTDBG_MAP_ALLOC
  13. #endif
  14. #define vsnprintf _vsnprintf
  15. #endif
  16. #define TOK_XMLNS "xmlns"
  17. #define TOK_XML "xml"
  18. #define UTF8_2BYTES 0xc0
  19. #define UTF8_3BYTES 0xe0
  20. #define UTF8_4BYTES 0xf0
  21. #define UTF8LEN(c,o) \
  22. if (!(*c & 0x80)) o = 1; \
  23. else if ((unsigned int)*c <= 0xdf) o = 2; \
  24. else if ((unsigned int)*c <= 0xef) o = 3; \
  25. else if ((unsigned int)*c <= 0xf7) o = 4; \
  26. else if ((unsigned int)*c <= 0xfb) o = 5; \
  27. else o = 6;
  28. #define XMLATT_NORMAL 0
  29. #define XMLATT_WITHNS 1
  30. #define XMLATT_PREFIXDECL 2
  31. #define XMLATT_DEFAULTDECL 3
  32. #define XMLATT_XMLPREFIXDECL 4
  33. /* isspace gives us trouble trimming some utf-8 trailbytes... */
  34. #ifdef isspace
  35. #undef isspace
  36. #endif
  37. #define isspace(c) (ISMAPCH(whitespace, (c)))
  38. #define SAFE_FREESTR(s) if (s) { free(s); s = (XMLCH*)NULL; }
  39. /* BUFTOSTR. similar to BufferedIStream_ToString, but modifies
  40. (nul terminates) actual buffer. There's no bounds checking like in _ToString,
  41. also must be sure that returned string stays valid (no _Read operations)
  42. Note that like in _ToString, last param is endPos, not length.
  43. macro can be used when BufferedIStream is in pos ?> for example
  44. and we can replace ? with \0 and use buffer as a string and
  45. avoid memory/time consuming _ToString call. */
  46. #define BUFTOSTR(buf,startPos,endPos) \
  47. ((!(startPos)) ? (*((buf)+(endPos))='\0', (buf)) : \
  48. (*((buf)+(endPos))='\0', ((buf)+(startPos))) )
  49. /* ISMAPCH macro for comparing ascii map char */
  50. #define ISMAPCH(map, byte) ((map)[(byte) >> 3] & (1 << ((byte) & 7)))
  51. #define ISILLBYTE(c) (c < 32 && ISMAPCH(illByte, (c)))
  52. /*
  53. The code points U+D800 to U+DFFF will never be assigned to characters.
  54. Other invalid sequences are code points 0xFFFF and 0xFFFE
  55. (EF,BF,BF and EF,BF,BE)
  56. 5.1 Single UTF-16 surrogates
  57. 5.1.1 U+D800 = ed a0 80
  58. 5.1.2 U+DB7F = ed ad bf
  59. 5.1.3 U+DB80 = ed ae 80
  60. 5.1.4 U+DBFF = ed af bf
  61. 5.1.5 U+DC00 = ed b0 80
  62. 5.1.6 U+DF80 = ed be 80
  63. 5.1.7 U+DFFF = ed bf bf
  64. 5.3 Other illegal code positions
  65. 5.3.1 U+FFFE = ef bf be
  66. 5.3.2 U+FFFF = ef bf bf
  67. note:
  68. sequence bytes c[1]-c[3] can never be < 0x80 (10000000)
  69. and last byte can never be > 0xBF (10111111)
  70. these are ensured in UTF-8 conversion */
  71. #define UTF8_ISILL3(c) \
  72. ((*c) == 0xEF && (c)[1] == 0xBF ? (c)[2] > 0xBD : \
  73. (*c) == 0xED && (c)[1] > 0x9F)
  74. /* see http://www.unicode.org/unicode/reports/tr28/ table 3.1B */
  75. #define UTF8_ISILL4(c) ((*c) == 0xF4 && (c)[1] > 0x8F)
  76. /* BISREADERDATA is put into parser->reader->userdata.
  77. Each parsed entity has its own reader and its own
  78. BISREADERDATA. The "main parser"'s
  79. BISREADERDATA is allocated in Parser_Create and
  80. initialized in Parser_Parse (see also InitEntityReader) */
  81. typedef struct tagBISREADERDATA
  82. {
  83. LPXMLPARSER parser;
  84. LPXMLENTITY curEnt; /* current entity (NULL for doc entity and internal entities) */
  85. int iCurPE;
  86. int line;
  87. int col;
  88. int stackLevel;
  89. int lEndian; /* flag to indicate that parser's using little-endian encoding, might
  90. not be correct when byte order mark isn't present */
  91. int context; /* reader specific context flags */
  92. XMLCH EncodingName[20];
  93. } BISREADERDATA, *LPBISREADERDATA;
  94. #define XMLREADERCTX_PE_SPACE 0x1
  95. /* DECLATT represents DTD declared attribute. Array of DECLATTs
  96. is stored in declAttTable hashtable for expansion of default attribute
  97. values (value member !NULL) or special normalization rules; if type
  98. isn't CDATA normalization follow rules specified in XMLSPEC
  99. 3.3.3 Attribute-Value Normalization */
  100. struct tagDECLATT
  101. {
  102. XMLCH *name, *value;
  103. int nameLen, prefixLen, valueLen, type, defaultDecl;
  104. };
  105. struct tagDTD
  106. {
  107. int expandPEs, expandPEsaved, inLiteral, inclSect;
  108. LPXMLVECTOR peStack;
  109. XMLSTRINGBUF sbuf;
  110. XMLRUNTIMEATT att;
  111. LPBUFFEREDISTREAM refReader;
  112. LPXMLPOOL pePool;
  113. };
  114. /* STACK macro wrapper around Vector; can be used as tag stack in our
  115. case, even though Vector is optimized for sequential index access.
  116. Tag stack isn't likely to grow/shrink that much in xml parsing when
  117. using CapacityIncrement 16 x RUNTIMETAG (tag nesting level).
  118. STACK_POP always removes last item from Vector and that is efficient
  119. too. Note: Vector handles bounds checking in _Get and in _Remove */
  120. #define STACK_PUSH(stack,item) (XMLVector_Append((stack), (item)))
  121. #define STACK_PEEK(stack) (XMLVector_Get((stack),(stack)->length-1))
  122. #define STACK_REMOVE(stack) (XMLVector_Remove((stack), (stack)->length-1))
  123. #define STACK_POP(stack,item) \
  124. ( ((stack)->length) ? (memcpy((item), STACK_PEEK((stack)), (stack)->itemSize), \
  125. STACK_REMOVE((stack)), (item)) : NULL)
  126. extern size_t Latin1ToUtf8 (LPBUFFEREDISTREAM r, const BYTE **inbuf, size_t *inbytesleft, BYTE **outbuf, size_t *outbytesleft);
  127. extern size_t Utf8ToUtf8 (LPBUFFEREDISTREAM r, const BYTE **inbuf, size_t *inbytesleft, BYTE **outbuf, size_t *outbytesleft);
  128. #ifdef ICONV_SUPPORT
  129. extern size_t iconvWrapper (LPBUFFEREDISTREAM r, const BYTE **inbuf, size_t *inbytesleft, BYTE **outbuf, size_t *outbytesleft);
  130. #endif
  131. static XMLCH EmptyStr[1] = {'\0'};
  132. static XMLCH *uriXMLNS = "http://www.w3.org/2000/xmlns/";
  133. static XMLCH *uriXML = "http://www.w3.org/XML/1998/namespace";
  134. #define EINPUT(r) (((r) < -2) ? (SetReaderFatal(((LPXMLPARSER)parser), (r)), 1) : 0)
  135. #define ISXMLPREFIX(s) ((*(s) == 'x' && s[1] == 'm' && s[2] == 'l'))
  136. #define ISXMLNSPREFIX(s) ((ISXMLPREFIX((s)) && s[3] == 'n' && s[4] == 's'))
  137. #define ISQUOTE(c) ((c)=='\"' || (c)=='\'')
  138. #define REQUIRE_WS(r) (((r = SkipWS(parser))==0) ? \
  139. ErP_(parser, ERR_XMLP_WS_REQUIRED, 0) : ((r==-1) ? 0 : r))
  140. #define DPOS(bytes) \
  141. PREADER->pos-=(bytes); \
  142. PREADERDATA->col-=(bytes);
  143. #define IPOS(bytes) \
  144. PREADER->pos+=(bytes); \
  145. PREADERDATA->col+=(bytes);
  146. #define DPOS_LF(bytes) \
  147. if (PREADER->buf[PREADER->pos-1] == 0x0A) \
  148. PREADERDATA->line--; \
  149. DPOS(bytes);
  150. #define DTDTOK_START(PEs) (\
  151. RT->dtd->expandPEsaved = RT->dtd->expandPEs, \
  152. RT->dtd->expandPEs = PEs \
  153. )
  154. #define DTDTOK_END \
  155. if (RT->dtd->expandPEs != RT->dtd->expandPEsaved) \
  156. RT->dtd->expandPEs = RT->dtd->expandPEsaved
  157. /* some shortcuts: */
  158. #define RT parser->prt
  159. #define PREADER ((LPBUFFEREDISTREAM)parser->reader)
  160. #define PREADERDATA ((LPBISREADERDATA)PREADER->userdata)
  161. #define HANDLER(n) parser->n##Handler
  162. #define PEEKINPUT(str,len) BufferedIStream_Peek(PREADER,(str),(len),0)
  163. #define CURCHAR (assert(PREADER->pos<PREADER->bytesavail), PREADER->buf[PREADER->pos])
  164. /* programmatically generated trie tables (reTRIEval algorithm). Trie algo
  165. suits our needs very well - brute force strcmp can infact
  166. be more efficient for small dictionarys (usually strcmp is well optimized and
  167. fast) but since we must use ReadCh (in TrieTok()) and memcmp (in TrieRaw()
  168. via BufferedIStream_Peek) we're getting perfomance gain. Especially DTD token
  169. parsing benefits from tries - no excessive ReadCh calls and UTF-8 checks
  170. anymore etc. See TrieTok and TrieRaw */
  171. struct trie {
  172. const char c; /* current char to test */
  173. const struct trie *n; /* next char/trie or token number if c is '\0' */
  174. const struct trie *sib; /* choice or NULL if there is none */
  175. };
  176. #define T_N_ TRxmlTok
  177. static struct trie const T_N_[] = {
  178. /* 0 */ {'!', T_N_+1, T_N_+9},
  179. /* 1 */ {'[', T_N_+2, T_N_+11},
  180. /* 2 */ {'C', T_N_+3, NULL},
  181. /* 3 */ {'D', T_N_+4, NULL},
  182. /* 4 */ {'A', T_N_+5, NULL},
  183. /* 5 */ {'T', T_N_+6, NULL},
  184. /* 6 */ {'A', T_N_+7, NULL},
  185. /* 7 */ {'[', T_N_+8, NULL},
  186. /* 8 */ {'\0', (struct trie*)1, NULL},
  187. /* 9 */ {'?', T_N_+10, T_N_+14},
  188. /* 10 */ {'\0', (struct trie*)2, NULL},
  189. /* 11 */ {'-', T_N_+12, T_N_+16},
  190. /* 12 */ {'-', T_N_+13, NULL},
  191. /* 13 */ {'\0', (struct trie*)3, NULL},
  192. /* 14 */ {'/', T_N_+15, NULL},
  193. /* 15 */ {'\0', (struct trie*)4, NULL},
  194. /* 16 */ {'D', T_N_+17, NULL},
  195. /* 17 */ {'O', T_N_+18, NULL},
  196. /* 18 */ {'C', T_N_+19, NULL},
  197. /* 19 */ {'T', T_N_+20, NULL},
  198. /* 20 */ {'Y', T_N_+21, NULL},
  199. /* 21 */ {'P', T_N_+22, NULL},
  200. /* 22 */ {'E', T_N_+23, NULL},
  201. /* 23 */ {'\0', (struct trie*)5, NULL}
  202. };
  203. #undef T_N_
  204. #define T_N_ TRstdEnt
  205. static struct trie const T_N_[] = {
  206. /* 0 */ {'g', T_N_+1, T_N_+4},
  207. /* 1 */ {'t', T_N_+2, NULL},
  208. /* 2 */ {';', T_N_+3, NULL},
  209. /* 3 */ {'\0', (struct trie*)1, NULL},
  210. /* 4 */ {'l', T_N_+5, T_N_+8},
  211. /* 5 */ {'t', T_N_+6, NULL},
  212. /* 6 */ {';', T_N_+7, NULL},
  213. /* 7 */ {'\0', (struct trie*)2, NULL},
  214. /* 8 */ {'a', T_N_+9, T_N_+18},
  215. /* 9 */ {'m', T_N_+10, T_N_+13},
  216. /* 10 */ {'p', T_N_+11, NULL},
  217. /* 11 */ {';', T_N_+12, NULL},
  218. /* 12 */ {'\0', (struct trie*)3, NULL},
  219. /* 13 */ {'p', T_N_+14, NULL},
  220. /* 14 */ {'o', T_N_+15, NULL},
  221. /* 15 */ {'s', T_N_+16, NULL},
  222. /* 16 */ {';', T_N_+17, NULL},
  223. /* 17 */ {'\0', (struct trie*)4, NULL},
  224. /* 18 */ {'q', T_N_+19, NULL},
  225. /* 19 */ {'u', T_N_+20, NULL},
  226. /* 20 */ {'o', T_N_+21, NULL},
  227. /* 21 */ {'t', T_N_+22, NULL},
  228. /* 22 */ {';', T_N_+23, NULL},
  229. /* 23 */ {'\0', (struct trie*)5, NULL}
  230. };
  231. #undef T_N_
  232. #define T_N_ TRxmlDecl
  233. static struct trie const T_N_[] = {
  234. /* 0 */ {'v', T_N_+1, T_N_+8},
  235. /* 1 */ {'e', T_N_+2, NULL},
  236. /* 2 */ {'r', T_N_+3, NULL},
  237. /* 3 */ {'s', T_N_+4, NULL},
  238. /* 4 */ {'i', T_N_+5, NULL},
  239. /* 5 */ {'o', T_N_+6, NULL},
  240. /* 6 */ {'n', T_N_+7, NULL},
  241. /* 7 */ {'\0', (struct trie*)1, NULL},
  242. /* 8 */ {'e', T_N_+9, T_N_+17},
  243. /* 9 */ {'n', T_N_+10, NULL},
  244. /* 10 */ {'c', T_N_+11, NULL},
  245. /* 11 */ {'o', T_N_+12, NULL},
  246. /* 12 */ {'d', T_N_+13, NULL},
  247. /* 13 */ {'i', T_N_+14, NULL},
  248. /* 14 */ {'n', T_N_+15, NULL},
  249. /* 15 */ {'g', T_N_+16, NULL},
  250. /* 16 */ {'\0', (struct trie*)2, NULL},
  251. /* 17 */ {'s', T_N_+18, NULL},
  252. /* 18 */ {'t', T_N_+19, NULL},
  253. /* 19 */ {'a', T_N_+20, NULL},
  254. /* 20 */ {'n', T_N_+21, NULL},
  255. /* 21 */ {'d', T_N_+22, NULL},
  256. /* 22 */ {'a', T_N_+23, NULL},
  257. /* 23 */ {'l', T_N_+24, NULL},
  258. /* 24 */ {'o', T_N_+25, NULL},
  259. /* 25 */ {'n', T_N_+26, NULL},
  260. /* 26 */ {'e', T_N_+27, NULL},
  261. /* 27 */ {'\0', (struct trie*)3, NULL}
  262. };
  263. #undef T_N_
  264. #define T_N_ TRexternalID
  265. struct trie T_N_[] = {
  266. /* 0 */ {'P', T_N_+1, T_N_+7},
  267. /* 1 */ {'U', T_N_+2, NULL},
  268. /* 2 */ {'B', T_N_+3, NULL},
  269. /* 3 */ {'L', T_N_+4, NULL},
  270. /* 4 */ {'I', T_N_+5, NULL},
  271. /* 5 */ {'C', T_N_+6, NULL},
  272. /* 6 */ {'\0', (struct trie*)1, NULL},
  273. /* 7 */ {'S', T_N_+8, NULL},
  274. /* 8 */ {'Y', T_N_+9, NULL},
  275. /* 9 */ {'S', T_N_+10, NULL},
  276. /* 10 */ {'T', T_N_+11, NULL},
  277. /* 11 */ {'E', T_N_+12, NULL},
  278. /* 12 */ {'M', T_N_+13, NULL},
  279. /* 13 */ {'\0', (struct trie*)2, NULL}
  280. };
  281. #undef T_N_
  282. #ifdef DTD_SUPPORT
  283. #define T_N_ TRdtdTok
  284. static struct trie const T_N_[] = {
  285. /* 0 */ {'<', T_N_+1, NULL},
  286. /* 1 */ {'!', T_N_+2, T_N_+7},
  287. /* 2 */ {'-', T_N_+3, T_N_+5},
  288. /* 3 */ {'-', T_N_+4, NULL},
  289. /* 4 */ {'\0', (struct trie*)1, NULL},
  290. /* 5 */ {'[', T_N_+6, T_N_+9},
  291. /* 6 */ {'\0', (struct trie*)2, NULL},
  292. /* 7 */ {'?', T_N_+8, NULL},
  293. /* 8 */ {'\0', (struct trie*)3, NULL},
  294. /* 9 */ {'E', T_N_+10, T_N_+23},
  295. /* 10 */ {'N', T_N_+11, T_N_+16},
  296. /* 11 */ {'T', T_N_+12, NULL},
  297. /* 12 */ {'I', T_N_+13, NULL},
  298. /* 13 */ {'T', T_N_+14, NULL},
  299. /* 14 */ {'Y', T_N_+15, NULL},
  300. /* 15 */ {'\0', (struct trie*)4, NULL},
  301. /* 16 */ {'L', T_N_+17, NULL},
  302. /* 17 */ {'E', T_N_+18, NULL},
  303. /* 18 */ {'M', T_N_+19, NULL},
  304. /* 19 */ {'E', T_N_+20, NULL},
  305. /* 20 */ {'N', T_N_+21, NULL},
  306. /* 21 */ {'T', T_N_+22, NULL},
  307. /* 22 */ {'\0', (struct trie*)5, NULL},
  308. /* 23 */ {'A', T_N_+24, T_N_+31},
  309. /* 24 */ {'T', T_N_+25, NULL},
  310. /* 25 */ {'T', T_N_+26, NULL},
  311. /* 26 */ {'L', T_N_+27, NULL},
  312. /* 27 */ {'I', T_N_+28, NULL},
  313. /* 28 */ {'S', T_N_+29, NULL},
  314. /* 29 */ {'T', T_N_+30, NULL},
  315. /* 30 */ {'\0', (struct trie*)6, NULL},
  316. /* 31 */ {'N', T_N_+32, NULL},
  317. /* 32 */ {'O', T_N_+33, NULL},
  318. /* 33 */ {'T', T_N_+34, NULL},
  319. /* 34 */ {'A', T_N_+35, NULL},
  320. /* 35 */ {'T', T_N_+36, NULL},
  321. /* 36 */ {'I', T_N_+37, NULL},
  322. /* 37 */ {'O', T_N_+38, NULL},
  323. /* 38 */ {'N', T_N_+39, NULL},
  324. /* 39 */ {'\0', (struct trie*)7, NULL}
  325. };
  326. #undef T_N_
  327. #define T_N_ TRattType
  328. static struct trie const T_N_[] = {
  329. /* 0 */ {'C', T_N_+1, T_N_+6},
  330. /* 1 */ {'D', T_N_+2, NULL},
  331. /* 2 */ {'A', T_N_+3, NULL},
  332. /* 3 */ {'T', T_N_+4, NULL},
  333. /* 4 */ {'A', T_N_+5, NULL},
  334. /* 5 */ {'\0', (struct trie*)1, NULL},
  335. /* 6 */ {'I', T_N_+7, T_N_+15},
  336. /* 7 */ {'D', T_N_+8, NULL},
  337. /* 8 */ {'\0', (struct trie*)2, T_N_+9},
  338. /* 9 */ {'R', T_N_+10, NULL},
  339. /* 10 */ {'E', T_N_+11, NULL},
  340. /* 11 */ {'F', T_N_+12, NULL},
  341. /* 12 */ {'\0', (struct trie*)3, T_N_+13},
  342. /* 13 */ {'S', T_N_+14, NULL},
  343. /* 14 */ {'\0', (struct trie*)4, NULL},
  344. /* 15 */ {'E', T_N_+16, T_N_+26},
  345. /* 16 */ {'N', T_N_+17, NULL},
  346. /* 17 */ {'T', T_N_+18, NULL},
  347. /* 18 */ {'I', T_N_+19, NULL},
  348. /* 19 */ {'T', T_N_+20, NULL},
  349. /* 20 */ {'Y', T_N_+21, T_N_+22},
  350. /* 21 */ {'\0', (struct trie*)5, NULL},
  351. /* 22 */ {'I', T_N_+23, NULL},
  352. /* 23 */ {'E', T_N_+24, NULL},
  353. /* 24 */ {'S', T_N_+25, NULL},
  354. /* 25 */ {'\0', (struct trie*)6, NULL},
  355. /* 26 */ {'N', T_N_+27, NULL},
  356. /* 27 */ {'M', T_N_+28, T_N_+36},
  357. /* 28 */ {'T', T_N_+29, NULL},
  358. /* 29 */ {'O', T_N_+30, NULL},
  359. /* 30 */ {'K', T_N_+31, NULL},
  360. /* 31 */ {'E', T_N_+32, NULL},
  361. /* 32 */ {'N', T_N_+33, NULL},
  362. /* 33 */ {'\0', (struct trie*)7, T_N_+34},
  363. /* 34 */ {'S', T_N_+35, NULL},
  364. /* 35 */ {'\0', (struct trie*)8, NULL},
  365. /* 36 */ {'O', T_N_+37, NULL},
  366. /* 37 */ {'T', T_N_+38, NULL},
  367. /* 38 */ {'A', T_N_+39, NULL},
  368. /* 39 */ {'T', T_N_+40, NULL},
  369. /* 40 */ {'I', T_N_+41, NULL},
  370. /* 41 */ {'O', T_N_+42, NULL},
  371. /* 42 */ {'N', T_N_+43, NULL},
  372. /* 43 */ {'\0', (struct trie*)9, NULL}
  373. };
  374. #undef T_N_
  375. #define T_N_ TRdefDecls
  376. static struct trie const T_N_[] = {
  377. /* 0 */ {'#', T_N_+1, NULL},
  378. /* 1 */ {'F', T_N_+2, T_N_+7},
  379. /* 2 */ {'I', T_N_+3, NULL},
  380. /* 3 */ {'X', T_N_+4, NULL},
  381. /* 4 */ {'E', T_N_+5, NULL},
  382. /* 5 */ {'D', T_N_+6, NULL},
  383. /* 6 */ {'\0', (struct trie*)1, NULL},
  384. /* 7 */ {'R', T_N_+8, T_N_+16},
  385. /* 8 */ {'E', T_N_+9, NULL},
  386. /* 9 */ {'Q', T_N_+10, NULL},
  387. /* 10 */ {'U', T_N_+11, NULL},
  388. /* 11 */ {'I', T_N_+12, NULL},
  389. /* 12 */ {'R', T_N_+13, NULL},
  390. /* 13 */ {'E', T_N_+14, NULL},
  391. /* 14 */ {'D', T_N_+15, NULL},
  392. /* 15 */ {'\0', (struct trie*)2, NULL},
  393. /* 16 */ {'I', T_N_+17, NULL},
  394. /* 17 */ {'M', T_N_+18, NULL},
  395. /* 18 */ {'P', T_N_+19, NULL},
  396. /* 19 */ {'L', T_N_+20, NULL},
  397. /* 20 */ {'I', T_N_+21, NULL},
  398. /* 21 */ {'E', T_N_+22, NULL},
  399. /* 22 */ {'D', T_N_+23, NULL},
  400. /* 23 */ {'\0', (struct trie*)3, NULL}
  401. };
  402. #undef T_N_
  403. #define T_N_ TRelTypes
  404. static struct trie const T_N_[] = {
  405. /* 0 */ {'E', T_N_+1, T_N_+6},
  406. /* 1 */ {'M', T_N_+2, NULL},
  407. /* 2 */ {'P', T_N_+3, NULL},
  408. /* 3 */ {'T', T_N_+4, NULL},
  409. /* 4 */ {'Y', T_N_+5, NULL},
  410. /* 5 */ {'\0', (struct trie*)1, NULL},
  411. /* 6 */ {'A', T_N_+7, T_N_+10},
  412. /* 7 */ {'N', T_N_+8, NULL},
  413. /* 8 */ {'Y', T_N_+9, NULL},
  414. /* 9 */ {'\0', (struct trie*)2, NULL},
  415. /* 10 */ {'(', T_N_+11, NULL},
  416. /* 11 */ {'\0', (struct trie*)3, NULL}
  417. };
  418. #undef T_N_
  419. #endif /* ifdef DTD_SUPPORT */
  420. #endif /* XMLDEF__H */