7 #ifdef COMPILED_FROM_DSP
9 #elif defined(MACOS_CLASSIC)
11 #elif defined(__amigaos4__)
13 #elif defined(__WATCOMC__)
14 #include "watcomconfig.h"
16 #ifdef HAVE_EXPAT_CONFIG_H
33 static const char KW_ANY[] = {
35 static const char KW_ATTLIST[] = {
37 static const char KW_CDATA[] = {
39 static const char KW_DOCTYPE[] = {
41 static const char KW_ELEMENT[] = {
43 static const char KW_EMPTY[] = {
45 static const char KW_ENTITIES[] = {
48 static const char KW_ENTITY[] = {
50 static const char KW_FIXED[] = {
52 static const char KW_ID[] = {
54 static const char KW_IDREF[] = {
56 static const char KW_IDREFS[] = {
59 static const char KW_IGNORE[] = {
62 static const char KW_IMPLIED[] = {
65 static const char KW_INCLUDE[] = {
68 static const char KW_NDATA[] = {
70 static const char KW_NMTOKEN[] = {
72 static const char KW_NMTOKENS[] = {
75 static const char KW_NOTATION[] =
78 static const char KW_PCDATA[] = {
80 static const char KW_PUBLIC[] = {
82 static const char KW_REQUIRED[] = {
85 static const char KW_SYSTEM[] = {
88 #ifndef MIN_BYTES_PER_CHAR
89 #define MIN_BYTES_PER_CHAR(enc) ((enc)->minBytesPerChar)
93 #define setTopLevel(state) \
94 ((state)->handler = ((state)->documentEntity \
98 #define setTopLevel(state) ((state)->handler = internalSubset)
108 prolog0, prolog1, prolog2,
109 doctype0, doctype1, doctype2, doctype3, doctype4, doctype5,
111 entity0, entity1, entity2, entity3, entity4, entity5, entity6,
112 entity7, entity8, entity9, entity10,
113 notation0, notation1, notation2, notation3, notation4,
114 attlist0, attlist1, attlist2, attlist3, attlist4, attlist5, attlist6,
115 attlist7, attlist8, attlist9,
116 element0, element1, element2, element3, element4, element5, element6,
119 externalSubset0, externalSubset1,
120 condSect0, condSect1, condSect2,
136 state->handler = prolog1;
139 state->handler = prolog1;
142 state->handler = prolog1;
145 state->handler = prolog1;
155 state->handler = doctype0;
158 state->handler = error;
161 return common(state, tok);
186 state->handler = doctype0;
189 state->handler = error;
192 return common(state, tok);
210 state->handler = error;
213 return common(state, tok);
228 state->handler = doctype1;
231 return common(state, tok);
245 state->handler = internalSubset;
248 state->handler = prolog2;
252 state->handler = doctype3;
256 state->handler = doctype2;
261 return common(state, tok);
275 state->handler = doctype3;
278 return common(state, tok);
292 state->handler = doctype4;
295 return common(state, tok);
309 state->handler = internalSubset;
312 state->handler = prolog2;
315 return common(state, tok);
329 state->handler = prolog2;
332 return common(state, tok);
350 state->handler = entity0;
357 state->handler = attlist0;
364 state->handler = element0;
371 state->handler = notation0;
382 state->handler = doctype5;
387 return common(state, tok);
399 state->handler = externalSubset1;
401 return XML_ROLE_TEXT_DECL;
402 return externalSubset1(state, tok, ptr, end, enc);
414 state->handler = condSect0;
417 if (state->includeLevel == 0)
419 state->includeLevel -= 1;
426 if (state->includeLevel)
430 return internalSubset(state, tok, ptr, end, enc);
432 return common(state, tok);
448 state->handler = entity1;
451 state->handler = entity2;
454 return common(state, tok);
468 state->handler = entity7;
471 return common(state, tok);
486 state->handler = entity4;
490 state->handler = entity3;
495 state->handler = declClose;
499 return common(state, tok);
513 state->handler = entity4;
516 return common(state, tok);
530 state->handler = entity5;
533 return common(state, tok);
551 state->handler = entity6;
556 return common(state, tok);
570 state->handler = declClose;
574 return common(state, tok);
589 state->handler = entity9;
593 state->handler = entity8;
598 state->handler = declClose;
602 return common(state, tok);
616 state->handler = entity9;
619 return common(state, tok);
633 state->handler = entity10;
636 return common(state, tok);
653 return common(state, tok);
667 state->handler = notation1;
670 return common(state, tok);
685 state->handler = notation3;
689 state->handler = notation2;
694 return common(state, tok);
708 state->handler = notation4;
711 return common(state, tok);
725 state->handler = declClose;
729 return common(state, tok);
743 state->handler = declClose;
750 return common(state, tok);
765 state->handler = attlist1;
768 return common(state, tok);
786 state->handler = attlist2;
789 return common(state, tok);
804 static const char *
const types[] = {
815 for (i = 0; i < (
int)(
sizeof(types)/
sizeof(types[0])); i++)
817 state->handler = attlist8;
822 state->handler = attlist5;
827 state->handler = attlist3;
830 return common(state, tok);
846 state->handler = attlist4;
849 return common(state, tok);
863 state->handler = attlist8;
866 state->handler = attlist3;
869 return common(state, tok);
883 state->handler = attlist6;
886 return common(state, tok);
900 state->handler = attlist7;
903 return common(state, tok);
917 state->handler = attlist8;
920 state->handler = attlist6;
923 return common(state, tok);
942 state->handler = attlist1;
949 state->handler = attlist1;
956 state->handler = attlist9;
961 state->handler = attlist1;
964 return common(state, tok);
978 state->handler = attlist1;
981 return common(state, tok);
996 state->handler = element1;
999 return common(state, tok);
1014 state->handler = declClose;
1019 state->handler = declClose;
1025 state->handler = element2;
1029 return common(state, tok);
1047 state->handler = element3;
1053 state->handler = element6;
1057 state->handler = element7;
1060 state->handler = element7;
1063 state->handler = element7;
1066 state->handler = element7;
1069 return common(state, tok);
1083 state->handler = declClose;
1087 state->handler = declClose;
1091 state->handler = element4;
1094 return common(state, tok);
1109 state->handler = element5;
1112 return common(state, tok);
1126 state->handler = declClose;
1130 state->handler = element4;
1133 return common(state, tok);
1151 state->handler = element7;
1154 state->handler = element7;
1157 state->handler = element7;
1160 state->handler = element7;
1163 return common(state, tok);
1178 if (state->
level == 0) {
1179 state->handler = declClose;
1185 if (state->
level == 0) {
1186 state->handler = declClose;
1192 if (state->
level == 0) {
1193 state->handler = declClose;
1199 if (state->
level == 0) {
1200 state->handler = declClose;
1205 state->handler = element6;
1208 state->handler = element6;
1211 return common(state, tok);
1228 state->handler = condSect1;
1232 state->handler = condSect2;
1237 return common(state, tok);
1251 state->handler = externalSubset1;
1252 state->includeLevel += 1;
1255 return common(state, tok);
1269 state->handler = externalSubset1;
1270 return XML_ROLE_IGNORE_SECT;
1272 return common(state, tok);
1291 return common(state, tok);
1309 return XML_ROLE_INNER_PARAM_ENTITY_REF;
1311 state->handler = error;
1318 state->handler = prolog0;
1320 state->documentEntity = 1;
1321 state->includeLevel = 0;
1322 state->inEntityValue = 0;
1331 state->handler = externalSubset0;
1332 state->documentEntity = 0;
1333 state->includeLevel = 0;
void XmlPrologStateInit(PROLOG_STATE *)
#define XML_TOK_NAME_ASTERISK
#define XML_TOK_CLOSE_PAREN
#define XML_TOK_OPEN_PAREN
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
#define setTopLevel(state)
int PTRCALL PROLOG_HANDLER(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc)
#define XML_TOK_PREFIXED_NAME
#define XML_TOK_COND_SECT_OPEN
#define MIN_BYTES_PER_CHAR(enc)
#define XML_TOK_CLOSE_PAREN_ASTERISK
#define XML_TOK_POUND_NAME
#define XML_TOK_DECL_CLOSE
#define XML_TOK_COND_SECT_CLOSE
#define XML_TOK_CLOSE_PAREN_PLUS
#define XML_TOK_NAME_QUESTION
#define XML_TOK_CLOSE_PAREN_QUESTION
#define XML_TOK_PARAM_ENTITY_REF
#define XmlNameMatchesAscii(enc, ptr1, end1, ptr2)
#define XML_TOK_CLOSE_BRACKET
#define XML_TOK_NAME_PLUS
#define XML_TOK_INSTANCE_START
#define XML_TOK_OPEN_BRACKET
#define XML_TOK_DECL_OPEN