Home | History | Annotate | Download | only in expat

Lines Matching refs:state

93 #define setTopLevel(state) \
94 ((state)->handler = ((state)->documentEntity \
98 #define setTopLevel(state) ((state)->handler = internalSubset)
101 typedef int PTRCALL PROLOG_HANDLER(PROLOG_STATE *state,
125 static int FASTCALL common(PROLOG_STATE *state, int tok);
128 prolog0(PROLOG_STATE *state,
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);
165 prolog1(PROLOG_STATE *state,
186 state->handler = doctype0;
189 state->handler = error;
192 return common(state, tok);
196 prolog2(PROLOG_STATE *state,
210 state->handler = error;
213 return common(state, tok);
217 doctype0(PROLOG_STATE *state,
228 state->handler = doctype1;
231 return common(state, tok);
235 doctype1(PROLOG_STATE *state,
245 state->handler = internalSubset;
248 state->handler = prolog2;
252 state->handler = doctype3;
256 state->handler = doctype2;
261 return common(state, tok);
265 doctype2(PROLOG_STATE *state,
275 state->handler = doctype3;
278 return common(state, tok);
282 doctype3(PROLOG_STATE *state,
292 state->handler = doctype4;
295 return common(state, tok);
299 doctype4(PROLOG_STATE *state,
309 state->handler = internalSubset;
312 state->handler = prolog2;
315 return common(state, tok);
319 doctype5(PROLOG_STATE *state,
329 state->handler = prolog2;
332 return common(state, tok);
336 internalSubset(PROLOG_STATE *state,
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);
393 externalSubset0(PROLOG_STATE *state,
399 state->handler = externalSubset1;
402 return externalSubset1(state, tok, ptr, end, enc);
406 externalSubset1(PROLOG_STATE *state,
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);
438 entity0(PROLOG_STATE *state,
448 state->handler = entity1;
451 state->handler = entity2;
454 return common(state, tok);
458 entity1(PROLOG_STATE *state,
468 state->handler = entity7;
471 return common(state, tok);
475 entity2(PROLOG_STATE *state,
486 state->handler = entity4;
490 state->handler = entity3;
495 state->handler = declClose;
496 state->role_none = XML_ROLE_ENTITY_NONE;
499 return common(state, tok);
503 entity3(PROLOG_STATE *state,
513 state->handler = entity4;
516 return common(state, tok);
520 entity4(PROLOG_STATE *state,
530 state->handler = entity5;
533 return common(state, tok);
537 entity5(PROLOG_STATE *state,
547 setTopLevel(state);
551 state->handler = entity6;
556 return common(state, tok);
560 entity6(PROLOG_STATE *state,
570 state->handler = declClose;
571 state->role_none = XML_ROLE_ENTITY_NONE;
574 return common(state, tok);
578 entity7(PROLOG_STATE *state,
589 state->handler = entity9;
593 state->handler = entity8;
598 state->handler = declClose;
599 state->role_none = XML_ROLE_ENTITY_NONE;
602 return common(state, tok);
606 entity8(PROLOG_STATE *state,
616 state->handler = entity9;
619 return common(state, tok);
623 entity9(PROLOG_STATE *state,
633 state->handler = entity10;
636 return common(state, tok);
640 entity10(PROLOG_STATE *state,
650 setTopLevel(state);
653 return common(state, tok);
657 notation0(PROLOG_STATE *state,
667 state->handler = notation1;
670 return common(state, tok);
674 notation1(PROLOG_STATE *state,
685 state->handler = notation3;
689 state->handler = notation2;
694 return common(state, tok);
698 notation2(PROLOG_STATE *state,
708 state->handler = notation4;
711 return common(state, tok);
715 notation3(PROLOG_STATE *state,
725 state->handler = declClose;
726 state->role_none = XML_ROLE_NOTATION_NONE;
729 return common(state, tok);
733 notation4(PROLOG_STATE *state,
743 state->handler = declClose;
744 state->role_none = XML_ROLE_NOTATION_NONE;
747 setTopLevel(state);
750 return common(state, tok);
754 attlist0(PROLOG_STATE *state,
765 state->handler = attlist1;
768 return common(state, tok);
772 attlist1(PROLOG_STATE *state,
782 setTopLevel(state);
786 state->handler = attlist2;
789 return common(state, tok);
793 attlist2(PROLOG_STATE *state,
817 state->handler = attlist8;
822 state->handler = attlist5;
827 state->handler = attlist3;
830 return common(state, tok);
834 attlist3(PROLOG_STATE *state,
846 state->handler = attlist4;
849 return common(state, tok);
853 attlist4(PROLOG_STATE *state,
863 state->handler = attlist8;
866 state->handler = attlist3;
869 return common(state, tok);
873 attlist5(PROLOG_STATE *state,
883 state->handler = attlist6;
886 return common(state, tok);
890 attlist6(PROLOG_STATE *state,
900 state->handler = attlist7;
903 return common(state, tok);
907 attlist7(PROLOG_STATE *state,
917 state->handler = attlist8;
920 state->handler = attlist6;
923 return common(state, tok);
928 attlist8(PROLOG_STATE *state,
942 state->handler = attlist1;
949 state->handler = attlist1;
956 state->handler = attlist9;
961 state->handler = attlist1;
964 return common(state, tok);
968 attlist9(PROLOG_STATE *state,
978 state->handler = attlist1;
981 return common(state, tok);
985 element0(PROLOG_STATE *state,
996 state->handler = element1;
999 return common(state, tok);
1003 element1(PROLOG_STATE *state,
1014 state->handler = declClose;
1015 state->role_none = XML_ROLE_ELEMENT_NONE;
1019 state->handler = declClose;
1020 state->role_none = XML_ROLE_ELEMENT_NONE;
1025 state->handler = element2;
1026 state->level = 1;
1029 return common(state, tok);
1033 element2(PROLOG_STATE *state,
1047 state->handler = element3;
1052 state->level = 2;
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);
1073 element3(PROLOG_STATE *state,
1083 state->handler = declClose;
1084 state->role_none = XML_ROLE_ELEMENT_NONE;
1087 state->handler = declClose;
1088 state->role_none = XML_ROLE_ELEMENT_NONE;
1091 state->handler = element4;
1094 return common(state, tok);
1098 element4(PROLOG_STATE *state,
1109 state->handler = element5;
1112 return common(state, tok);
1116 element5(PROLOG_STATE *state,
1126 state->handler = declClose;
1127 state->role_none = XML_ROLE_ELEMENT_NONE;
1130 state->handler = element4;
1133 return common(state, tok);
1137 element6(PROLOG_STATE *state,
1147 state->level += 1;
1151 state->handler = element7;
1154 state->handler = element7;
1157 state->handler = element7;
1160 state->handler = element7;
1163 return common(state, tok);
1167 element7(PROLOG_STATE *state,
1177 state->level -= 1;
1178 if (state->level == 0) {
1179 state->handler = declClose;
1180 state->role_none = XML_ROLE_ELEMENT_NONE;
1184 state->level -= 1;
1185 if (state->level == 0) {
1186 state->handler = declClose;
1187 state->role_none = XML_ROLE_ELEMENT_NONE;
1191 state->level -= 1;
1192 if (state->level == 0) {
1193 state->handler = declClose;
1194 state->role_none = XML_ROLE_ELEMENT_NONE;
1198 state->level -= 1;
1199 if (state->level == 0) {
1200 state->handler = declClose;
1201 state->role_none = XML_ROLE_ELEMENT_NONE;
1205 state->handler = element6;
1208 state->handler = element6;
1211 return common(state, tok);
1217 condSect0(PROLOG_STATE *state,
1228 state->handler = condSect1;
1232 state->handler = condSect2;
1237 return common(state, tok);
1241 condSect1(PROLOG_STATE *state,
1251 state->handler = externalSubset1;
1252 state->includeLevel += 1;
1255 return common(state, tok);
1259 condSect2(PROLOG_STATE *state,
1269 state->handler = externalSubset1;
1272 return common(state, tok);
1278 declClose(PROLOG_STATE *state,
1286 return state->role_none;
1288 setTopLevel(state);
1289 return state->role_none;
1291 return common(state, tok);
1295 error(PROLOG_STATE *state,
1305 common(PROLOG_STATE *state, int tok)
1308 if (!state->documentEntity && tok == XML_TOK_PARAM_ENTITY_REF)
1311 state->handler = error;
1316 XmlPrologStateInit(PROLOG_STATE *state)
1318 state->handler = prolog0;
1320 state->documentEntity = 1;
1321 state->includeLevel = 0;
1322 state->inEntityValue = 0;
1329 XmlPrologStateInitExternalEntity(PROLOG_STATE *state)
1331 state->handler = externalSubset0;
1332 state->documentEntity = 0;
1333 state->includeLevel = 0;