Home | History | Annotate | Download | only in expat

Lines Matching refs:state

87 #define setTopLevel(state) \

88 ((state)->handler = ((state)->documentEntity \
92 #define setTopLevel(state) ((state)->handler = internalSubset)
95 typedef int PTRCALL PROLOG_HANDLER(PROLOG_STATE *state,
119 static int FASTCALL common(PROLOG_STATE *state, int tok);
122 prolog0(PROLOG_STATE *state,
130 state->handler = prolog1;
133 state->handler = prolog1;
136 state->handler = prolog1;
139 state->handler = prolog1;
149 state->handler = doctype0;
152 state->handler = error;
155 return common(state, tok);
159 prolog1(PROLOG_STATE *state,
180 state->handler = doctype0;
183 state->handler = error;
186 return common(state, tok);
190 prolog2(PROLOG_STATE *state,
204 state->handler = error;
207 return common(state, tok);
211 doctype0(PROLOG_STATE *state,
222 state->handler = doctype1;
225 return common(state, tok);
229 doctype1(PROLOG_STATE *state,
239 state->handler = internalSubset;
242 state->handler = prolog2;
246 state->handler = doctype3;
250 state->handler = doctype2;
255 return common(state, tok);
259 doctype2(PROLOG_STATE *state,
269 state->handler = doctype3;
272 return common(state, tok);
276 doctype3(PROLOG_STATE *state,
286 state->handler = doctype4;
289 return common(state, tok);
293 doctype4(PROLOG_STATE *state,
303 state->handler = internalSubset;
306 state->handler = prolog2;
309 return common(state, tok);
313 doctype5(PROLOG_STATE *state,
323 state->handler = prolog2;
326 return common(state, tok);
330 internalSubset(PROLOG_STATE *state,
344 state->handler = entity0;
351 state->handler = attlist0;
358 state->handler = element0;
365 state->handler = notation0;
376 state->handler = doctype5;
381 return common(state, tok);
387 externalSubset0(PROLOG_STATE *state,
393 state->handler = externalSubset1;
396 return externalSubset1(state, tok, ptr, end, enc);
400 externalSubset1(PROLOG_STATE *state,
408 state->handler = condSect0;
411 if (state->includeLevel == 0)
413 state->includeLevel -= 1;
420 if (state->includeLevel)
424 return internalSubset(state, tok, ptr, end, enc);
426 return common(state, tok);
432 entity0(PROLOG_STATE *state,
442 state->handler = entity1;
445 state->handler = entity2;
448 return common(state, tok);
452 entity1(PROLOG_STATE *state,
462 state->handler = entity7;
465 return common(state, tok);
469 entity2(PROLOG_STATE *state,
480 state->handler = entity4;
484 state->handler = entity3;
489 state->handler = declClose;
490 state->role_none = XML_ROLE_ENTITY_NONE;
493 return common(state, tok);
497 entity3(PROLOG_STATE *state,
507 state->handler = entity4;
510 return common(state, tok);
514 entity4(PROLOG_STATE *state,
524 state->handler = entity5;
527 return common(state, tok);
531 entity5(PROLOG_STATE *state,
541 setTopLevel(state);
545 state->handler = entity6;
550 return common(state, tok);
554 entity6(PROLOG_STATE *state,
564 state->handler = declClose;
565 state->role_none = XML_ROLE_ENTITY_NONE;
568 return common(state, tok);
572 entity7(PROLOG_STATE *state,
583 state->handler = entity9;
587 state->handler = entity8;
592 state->handler = declClose;
593 state->role_none = XML_ROLE_ENTITY_NONE;
596 return common(state, tok);
600 entity8(PROLOG_STATE *state,
610 state
613 return common(state, tok);
617 entity9(PROLOG_STATE *state,
627 state->handler = entity10;
630 return common(state, tok);
634 entity10(PROLOG_STATE *state,
644 setTopLevel(state);
647 return common(state, tok);
651 notation0(PROLOG_STATE *state,
661 state->handler = notation1;
664 return common(state, tok);
668 notation1(PROLOG_STATE *state,
679 state->handler = notation3;
683 state->handler = notation2;
688 return common(state, tok);
692 notation2(PROLOG_STATE *state,
702 state->handler = notation4;
705 return common(state, tok);
709 notation3(PROLOG_STATE *state,
719 state->handler = declClose;
720 state->role_none = XML_ROLE_NOTATION_NONE;
723 return common(state, tok);
727 notation4(PROLOG_STATE *state,
737 state->handler = declClose;
738 state->role_none = XML_ROLE_NOTATION_NONE;
741 setTopLevel(state);
744 return common(state, tok);
748 attlist0(PROLOG_STATE *state,
759 state->handler = attlist1;
762 return common(state, tok);
766 attlist1(PROLOG_STATE *state,
776 setTopLevel(state);
780 state->handler = attlist2;
783 return common(state, tok);
787 attlist2(PROLOG_STATE *state,
811 state->handler = attlist8;
816 state->handler = attlist5;
821 state->handler = attlist3;
824 return common(state, tok);
828 attlist3(PROLOG_STATE *state,
840 state->handler = attlist4;
843 return common(state, tok);
847 attlist4(PROLOG_STATE *state,
857 state->handler = attlist8;
860 state->handler = attlist3;
863 return common(state, tok);
867 attlist5(PROLOG_STATE *state,
877 state->handler = attlist6;
880 return common(state, tok);
884 attlist6(PROLOG_STATE *state,
894 state->handler = attlist7;
897 return common(state, tok);
901 attlist7(PROLOG_STATE *state,
911 state->handler = attlist8;
914 state->handler = attlist6;
917 return common(state, tok);
922 attlist8(PROLOG_STATE *state,
936 state->handler = attlist1;
943 state->handler = attlist1;
950 state->handler = attlist9;
955 state->handler = attlist1;
958 return common(state, tok);
962 attlist9(PROLOG_STATE *state,
972 state->handler = attlist1;
975 return common(state, tok);
979 element0(PROLOG_STATE *state,
990 state->handler = element1;
993 return common(state, tok);
997 element1(PROLOG_STATE *state,
1008 state->handler = declClose;
1009 state->role_none = XML_ROLE_ELEMENT_NONE;
1013 state->handler = declClose;
1014 state->role_none = XML_ROLE_ELEMENT_NONE;
1019 state->handler = element2;
1020 state->level = 1;
1023 return common(state, tok);
1027 element2(PROLOG_STATE *state,
1041 state->handler = element3;
1046 state->level = 2;
1047 state->handler = element6;
1051 state->handler = element7;
1054 state->handler = element7;
1057 state->handler = element7;
1060 state->handler = element7;
1063 return common(state, tok);
1067 element3(PROLOG_STATE *state,
1077 state->handler = declClose;
1078 state->role_none = XML_ROLE_ELEMENT_NONE;
1081 state->handler = declClose;
1082 state->role_none = XML_ROLE_ELEMENT_NONE;
1085 state->handler = element4;
1088 return common(state, tok);
1092 element4(PROLOG_STATE *state,
1103 state->handler = element5;
1106 return common(state, tok);
1110 element5(PROLOG_STATE *state,
1120 state->handler = declClose;
1121 state->role_none = XML_ROLE_ELEMENT_NONE;
1124 state->handler = element4;
1127 return common(state, tok);
1131 element6(PROLOG_STATE *state,
1141 state->level += 1;
1145 state->handler = element7;
1148 state->handler = element7;
1151 state->handler = element7;
1154 state->handler = element7;
1157 return common(state, tok);
1161 element7(PROLOG_STATE *state,
1171 state->level -= 1;
1172 if (state->level == 0) {
1173 state->handler = declClose;
1174 state->role_none = XML_ROLE_ELEMENT_NONE;
1178 state->level -= 1;
1179 if (state->level == 0) {
1180 state->handler = declClose;
1181 state->role_none = XML_ROLE_ELEMENT_NONE;
1185 state->level -= 1;
1186 if (state->level == 0) {
1187 state->handler = declClose;
1188 state->role_none = XML_ROLE_ELEMENT_NONE;
1192 state->level -= 1;
1193 if (state->level == 0) {
1194 state->handler = declClose;
1195 state->role_none = XML_ROLE_ELEMENT_NONE;
1199 state->handler = element6;
1202 state->handler = element6;
1205 return common(state, tok);
1211 condSect0(PROLOG_STATE *state,
1222 state->handler = condSect1;
1226 state->handler = condSect2;
1231 return common(state, tok);
1235 condSect1(PROLOG_STATE *state,
1245 state->handler = externalSubset1;
1246 state->includeLevel += 1;
1249 return common(state, tok);
1253 condSect2(PROLOG_STATE *state,
1263 state->handler = externalSubset1;
1266 return common(state, tok);
1272 declClose(PROLOG_STATE *state,
1280 return state->role_none;
1282 setTopLevel(state);
1283 return state->role_none;
1285 return common(state, tok);
1289 error(PROLOG_STATE *state,
1299 common(PROLOG_STATE *state, int tok)
1302 if (!state->documentEntity && tok == XML_TOK_PARAM_ENTITY_REF)
1305 state->handler = error;
1310 XmlPrologStateInit(PROLOG_STATE *state)
1312 state->handler = prolog0;
1314 state->documentEntity = 1;
1315 state->includeLevel = 0;
1316 state->inEntityValue = 0;
1323 XmlPrologStateInitExternalEntity(PROLOG_STATE *state)
1325 state->handler = externalSubset0;
1326 state->documentEntity = 0;
1327 state->includeLevel = 0;