5#if defined(__clang__) || defined(__GNUC__)
6#pragma GCC diagnostic ignored "-Wunused-parameter"
11#ifdef COMPILED_FROM_DSP
13#elif defined(MACOS_CLASSIC)
15#elif defined(__amigaos__)
17#elif defined(__WATCOMC__)
18#include "watcomconfig.h"
20#ifdef HAVE_EXPAT_CONFIG_H
37static const char KW_ANY[] = {
39static const char KW_ATTLIST[] = {
41static const char KW_CDATA[] = {
43static const char KW_DOCTYPE[] = {
45static const char KW_ELEMENT[] = {
47static const char KW_EMPTY[] = {
49static const char KW_ENTITIES[] = {
52static const char KW_ENTITY[] = {
54static const char KW_FIXED[] = {
56static const char KW_ID[] = {
58static const char KW_IDREF[] = {
60static const char KW_IDREFS[] = {
63static const char KW_IGNORE[] = {
66static const char KW_IMPLIED[] = {
69static const char KW_INCLUDE[] = {
72static const char KW_NDATA[] = {
74static const char KW_NMTOKEN[] = {
76static const char KW_NMTOKENS[] = {
79static const char KW_NOTATION[] =
82static const char KW_PCDATA[] = {
84static const char KW_PUBLIC[] = {
86static const char KW_REQUIRED[] = {
89static const char KW_SYSTEM[] = {
92#ifndef MIN_BYTES_PER_CHAR
93#define MIN_BYTES_PER_CHAR(enc) ((enc)->minBytesPerChar)
97#define setTopLevel(state) \
98 ((state)->handler = ((state)->documentEntity \
102#define setTopLevel(state) ((state)->handler = internalSubset)
112 prolog0, prolog1, prolog2,
113 doctype0, doctype1, doctype2, doctype3, doctype4, doctype5,
115 entity0, entity1, entity2, entity3, entity4, entity5, entity6,
116 entity7, entity8, entity9, entity10,
117 notation0, notation1, notation2, notation3, notation4,
118 attlist0, attlist1, attlist2, attlist3, attlist4, attlist5, attlist6,
119 attlist7, attlist8, attlist9,
120 element0, element1, element2, element3, element4, element5, element6,
123 externalSubset0, externalSubset1,
124 condSect0, condSect1, condSect2,
140 state->handler = prolog1;
143 state->handler = prolog1;
146 state->handler = prolog1;
149 state->handler = prolog1;
159 state->handler = doctype0;
162 state->handler = error;
165 return common(state, tok);
190 state->handler = doctype0;
193 state->handler = error;
196 return common(state, tok);
214 state->handler = error;
217 return common(state, tok);
232 state->handler = doctype1;
235 return common(state, tok);
249 state->handler = internalSubset;
252 state->handler = prolog2;
256 state->handler = doctype3;
260 state->handler = doctype2;
265 return common(state, tok);
279 state->handler = doctype3;
282 return common(state, tok);
296 state->handler = doctype4;
299 return common(state, tok);
313 state->handler = internalSubset;
316 state->handler = prolog2;
319 return common(state, tok);
333 state->handler = prolog2;
336 return common(state, tok);
354 state->handler = entity0;
361 state->handler = attlist0;
368 state->handler = element0;
375 state->handler = notation0;
386 state->handler = doctype5;
391 return common(state, tok);
403 state->handler = externalSubset1;
405 return XML_ROLE_TEXT_DECL;
406 return externalSubset1(state, tok, ptr, end, enc);
418 state->handler = condSect0;
421 if (state->includeLevel == 0)
423 state->includeLevel -= 1;
430 if (state->includeLevel)
434 return internalSubset(state, tok, ptr, end, enc);
436 return common(state, tok);
452 state->handler = entity1;
455 state->handler = entity2;
458 return common(state, tok);
472 state->handler = entity7;
475 return common(state, tok);
490 state->handler = entity4;
494 state->handler = entity3;
499 state->handler = declClose;
503 return common(state, tok);
517 state->handler = entity4;
520 return common(state, tok);
534 state->handler = entity5;
537 return common(state, tok);
555 state->handler = entity6;
560 return common(state, tok);
574 state->handler = declClose;
578 return common(state, tok);
593 state->handler = entity9;
597 state->handler = entity8;
602 state->handler = declClose;
606 return common(state, tok);
620 state->handler = entity9;
623 return common(state, tok);
637 state->handler = entity10;
640 return common(state, tok);
657 return common(state, tok);
671 state->handler = notation1;
674 return common(state, tok);
689 state->handler = notation3;
693 state->handler = notation2;
698 return common(state, tok);
712 state->handler = notation4;
715 return common(state, tok);
729 state->handler = declClose;
733 return common(state, tok);
747 state->handler = declClose;
754 return common(state, tok);
769 state->handler = attlist1;
772 return common(state, tok);
790 state->handler = attlist2;
793 return common(state, tok);
808 static const char *
const types[] = {
819 for (i = 0; i < (int)(
sizeof(types)/
sizeof(types[0])); i++)
821 state->handler = attlist8;
826 state->handler = attlist5;
831 state->handler = attlist3;
834 return common(state, tok);
850 state->handler = attlist4;
853 return common(state, tok);
867 state->handler = attlist8;
870 state->handler = attlist3;
873 return common(state, tok);
887 state->handler = attlist6;
890 return common(state, tok);
904 state->handler = attlist7;
907 return common(state, tok);
921 state->handler = attlist8;
924 state->handler = attlist6;
927 return common(state, tok);
946 state->handler = attlist1;
953 state->handler = attlist1;
960 state->handler = attlist9;
965 state->handler = attlist1;
968 return common(state, tok);
982 state->handler = attlist1;
985 return common(state, tok);
1000 state->handler = element1;
1003 return common(state, tok);
1018 state->handler = declClose;
1023 state->handler = declClose;
1029 state->handler = element2;
1033 return common(state, tok);
1051 state->handler = element3;
1057 state->handler = element6;
1061 state->handler = element7;
1064 state->handler = element7;
1067 state->handler = element7;
1070 state->handler = element7;
1073 return common(state, tok);
1087 state->handler = declClose;
1091 state->handler = declClose;
1095 state->handler = element4;
1098 return common(state, tok);
1113 state->handler = element5;
1116 return common(state, tok);
1130 state->handler = declClose;
1134 state->handler = element4;
1137 return common(state, tok);
1155 state->handler = element7;
1158 state->handler = element7;
1161 state->handler = element7;
1164 state->handler = element7;
1167 return common(state, tok);
1182 if (state->
level == 0) {
1183 state->handler = declClose;
1189 if (state->
level == 0) {
1190 state->handler = declClose;
1196 if (state->
level == 0) {
1197 state->handler = declClose;
1203 if (state->
level == 0) {
1204 state->handler = declClose;
1209 state->handler = element6;
1212 state->handler = element6;
1215 return common(state, tok);
1232 state->handler = condSect1;
1236 state->handler = condSect2;
1241 return common(state, tok);
1255 state->handler = externalSubset1;
1256 state->includeLevel += 1;
1259 return common(state, tok);
1273 state->handler = externalSubset1;
1274 return XML_ROLE_IGNORE_SECT;
1276 return common(state, tok);
1295 return common(state, tok);
1313 return XML_ROLE_INNER_PARAM_ENTITY_REF;
1315 state->handler = error;
1322 state->handler = prolog0;
1324 state->documentEntity = 1;
1325 state->includeLevel = 0;
1326 state->inEntityValue = 0;
1335 state->handler = externalSubset0;
1336 state->documentEntity = 0;
1337 state->includeLevel = 0;
#define setTopLevel(state)
int PTRCALL PROLOG_HANDLER(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc)
void XmlPrologStateInit(PROLOG_STATE *state)
#define MIN_BYTES_PER_CHAR(enc)
@ XML_ROLE_NOTATION_PUBLIC_ID
@ XML_ROLE_GROUP_CLOSE_REP
@ XML_ROLE_CONTENT_PCDATA
@ XML_ROLE_CONTENT_ELEMENT_REP
@ XML_ROLE_ENTITY_COMPLETE
@ XML_ROLE_DOCTYPE_INTERNAL_SUBSET
@ XML_ROLE_NOTATION_NO_SYSTEM_ID
@ XML_ROLE_PARAM_ENTITY_REF
@ XML_ROLE_ENTITY_NOTATION_NAME
@ XML_ROLE_GROUP_SEQUENCE
@ XML_ROLE_ATTLIST_ELEMENT_NAME
@ XML_ROLE_GROUP_CLOSE_OPT
@ XML_ROLE_IMPLIED_ATTRIBUTE_VALUE
@ XML_ROLE_ATTRIBUTE_TYPE_CDATA
@ XML_ROLE_ATTRIBUTE_ENUM_VALUE
@ XML_ROLE_ENTITY_SYSTEM_ID
@ XML_ROLE_CONTENT_ELEMENT
@ XML_ROLE_ATTRIBUTE_NOTATION_VALUE
@ XML_ROLE_DOCTYPE_SYSTEM_ID
@ XML_ROLE_NOTATION_SYSTEM_ID
@ XML_ROLE_ATTRIBUTE_NAME
@ XML_ROLE_ENTITY_PUBLIC_ID
@ XML_ROLE_INSTANCE_START
@ XML_ROLE_CONTENT_ELEMENT_PLUS
@ XML_ROLE_GENERAL_ENTITY_NAME
@ XML_ROLE_PARAM_ENTITY_NAME
@ XML_ROLE_DEFAULT_ATTRIBUTE_VALUE
@ XML_ROLE_GROUP_CLOSE_PLUS
@ XML_ROLE_REQUIRED_ATTRIBUTE_VALUE
@ XML_ROLE_FIXED_ATTRIBUTE_VALUE
@ XML_ROLE_CONTENT_ELEMENT_OPT
@ XML_ROLE_DOCTYPE_PUBLIC_ID
#define XML_TOK_CLOSE_PAREN_ASTERISK
#define XML_TOK_DECL_OPEN
#define XML_TOK_PREFIXED_NAME
#define XML_TOK_OPEN_PAREN
#define XML_TOK_OPEN_BRACKET
#define XML_TOK_CLOSE_PAREN_PLUS
#define XML_TOK_CLOSE_PAREN
#define XML_TOK_NAME_ASTERISK
#define XML_TOK_DECL_CLOSE
#define XML_TOK_NAME_PLUS
#define XML_TOK_NAME_QUESTION
#define XML_TOK_COND_SECT_CLOSE
#define XML_TOK_COND_SECT_OPEN
#define XML_TOK_POUND_NAME
#define XML_TOK_PARAM_ENTITY_REF
#define XML_TOK_CLOSE_BRACKET
#define XmlNameMatchesAscii(enc, ptr1, end1, ptr2)
#define XML_TOK_INSTANCE_START
#define XML_TOK_CLOSE_PAREN_QUESTION