Lines Matching refs:state

115 #  define setTopLevel(state)                                                   \  argument
116 ((state)->handler \
117 = ((state)->documentEntity ? internalSubset : externalSubset1))
119 # define setTopLevel(state) ((state)->handler = internalSubset) argument
122 typedef int PTRCALL PROLOG_HANDLER(PROLOG_STATE *state, int tok,
138 static int FASTCALL common(PROLOG_STATE *state, int tok);
141 prolog0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in prolog0() argument
145 state->handler = prolog1; in prolog0()
148 state->handler = prolog1; in prolog0()
151 state->handler = prolog1; in prolog0()
154 state->handler = prolog1; in prolog0()
162 state->handler = doctype0; in prolog0()
165 state->handler = error; in prolog0()
168 return common(state, tok); in prolog0()
172 prolog1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in prolog1() argument
194 state->handler = doctype0; in prolog1()
197 state->handler = error; in prolog1()
200 return common(state, tok); in prolog1()
204 prolog2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in prolog2() argument
217 state->handler = error; in prolog2()
220 return common(state, tok); in prolog2()
224 doctype0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in doctype0() argument
234 state->handler = doctype1; in doctype0()
237 return common(state, tok); in doctype0()
241 doctype1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in doctype1() argument
247 state->handler = internalSubset; in doctype1()
250 state->handler = prolog2; in doctype1()
254 state->handler = doctype3; in doctype1()
258 state->handler = doctype2; in doctype1()
263 return common(state, tok); in doctype1()
267 doctype2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in doctype2() argument
276 state->handler = doctype3; in doctype2()
279 return common(state, tok); in doctype2()
283 doctype3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in doctype3() argument
292 state->handler = doctype4; in doctype3()
295 return common(state, tok); in doctype3()
299 doctype4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in doctype4() argument
308 state->handler = internalSubset; in doctype4()
311 state->handler = prolog2; in doctype4()
314 return common(state, tok); in doctype4()
318 doctype5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in doctype5() argument
327 state->handler = prolog2; in doctype5()
330 return common(state, tok); in doctype5()
334 internalSubset(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in internalSubset() argument
342 state->handler = entity0; in internalSubset()
347 state->handler = attlist0; in internalSubset()
352 state->handler = element0; in internalSubset()
357 state->handler = notation0; in internalSubset()
368 state->handler = doctype5; in internalSubset()
373 return common(state, tok); in internalSubset()
379 externalSubset0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in externalSubset0() argument
381 state->handler = externalSubset1; in externalSubset0()
384 return externalSubset1(state, tok, ptr, end, enc); in externalSubset0()
388 externalSubset1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in externalSubset1() argument
392 state->handler = condSect0; in externalSubset1()
395 if (state->includeLevel == 0) in externalSubset1()
397 state->includeLevel -= 1; in externalSubset1()
404 if (state->includeLevel) in externalSubset1()
408 return internalSubset(state, tok, ptr, end, enc); in externalSubset1()
410 return common(state, tok); in externalSubset1()
416 entity0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity0() argument
425 state->handler = entity1; in entity0()
428 state->handler = entity2; in entity0()
431 return common(state, tok); in entity0()
435 entity1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity1() argument
444 state->handler = entity7; in entity1()
447 return common(state, tok); in entity1()
451 entity2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity2() argument
458 state->handler = entity4; in entity2()
462 state->handler = entity3; in entity2()
467 state->handler = declClose; in entity2()
468 state->role_none = XML_ROLE_ENTITY_NONE; in entity2()
471 return common(state, tok); in entity2()
475 entity3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity3() argument
484 state->handler = entity4; in entity3()
487 return common(state, tok); in entity3()
491 entity4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity4() argument
500 state->handler = entity5; in entity4()
503 return common(state, tok); in entity4()
507 entity5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity5() argument
513 setTopLevel(state); in entity5()
517 state->handler = entity6; in entity5()
522 return common(state, tok); in entity5()
526 entity6(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity6() argument
535 state->handler = declClose; in entity6()
536 state->role_none = XML_ROLE_ENTITY_NONE; in entity6()
539 return common(state, tok); in entity6()
543 entity7(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity7() argument
550 state->handler = entity9; in entity7()
554 state->handler = entity8; in entity7()
559 state->handler = declClose; in entity7()
560 state->role_none = XML_ROLE_ENTITY_NONE; in entity7()
563 return common(state, tok); in entity7()
567 entity8(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity8() argument
576 state->handler = entity9; in entity8()
579 return common(state, tok); in entity8()
583 entity9(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity9() argument
592 state->handler = entity10; in entity9()
595 return common(state, tok); in entity9()
599 entity10(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity10() argument
608 setTopLevel(state); in entity10()
611 return common(state, tok); in entity10()
615 notation0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in notation0() argument
624 state->handler = notation1; in notation0()
627 return common(state, tok); in notation0()
631 notation1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in notation1() argument
638 state->handler = notation3; in notation1()
642 state->handler = notation2; in notation1()
647 return common(state, tok); in notation1()
651 notation2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in notation2() argument
660 state->handler = notation4; in notation2()
663 return common(state, tok); in notation2()
667 notation3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in notation3() argument
676 state->handler = declClose; in notation3()
677 state->role_none = XML_ROLE_NOTATION_NONE; in notation3()
680 return common(state, tok); in notation3()
684 notation4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in notation4() argument
693 state->handler = declClose; in notation4()
694 state->role_none = XML_ROLE_NOTATION_NONE; in notation4()
697 setTopLevel(state); in notation4()
700 return common(state, tok); in notation4()
704 attlist0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist0() argument
714 state->handler = attlist1; in attlist0()
717 return common(state, tok); in attlist0()
721 attlist1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist1() argument
730 setTopLevel(state); in attlist1()
734 state->handler = attlist2; in attlist1()
737 return common(state, tok); in attlist1()
741 attlist2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist2() argument
754 state->handler = attlist8; in attlist2()
759 state->handler = attlist5; in attlist2()
764 state->handler = attlist3; in attlist2()
767 return common(state, tok); in attlist2()
771 attlist3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist3() argument
782 state->handler = attlist4; in attlist3()
785 return common(state, tok); in attlist3()
789 attlist4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist4() argument
798 state->handler = attlist8; in attlist4()
801 state->handler = attlist3; in attlist4()
804 return common(state, tok); in attlist4()
808 attlist5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist5() argument
817 state->handler = attlist6; in attlist5()
820 return common(state, tok); in attlist5()
824 attlist6(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist6() argument
833 state->handler = attlist7; in attlist6()
836 return common(state, tok); in attlist6()
840 attlist7(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist7() argument
849 state->handler = attlist8; in attlist7()
852 state->handler = attlist6; in attlist7()
855 return common(state, tok); in attlist7()
860 attlist8(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist8() argument
868 state->handler = attlist1; in attlist8()
873 state->handler = attlist1; in attlist8()
878 state->handler = attlist9; in attlist8()
883 state->handler = attlist1; in attlist8()
886 return common(state, tok); in attlist8()
890 attlist9(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist9() argument
899 state->handler = attlist1; in attlist9()
902 return common(state, tok); in attlist9()
906 element0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in element0() argument
916 state->handler = element1; in element0()
919 return common(state, tok); in element0()
923 element1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in element1() argument
930 state->handler = declClose; in element1()
931 state->role_none = XML_ROLE_ELEMENT_NONE; in element1()
935 state->handler = declClose; in element1()
936 state->role_none = XML_ROLE_ELEMENT_NONE; in element1()
941 state->handler = element2; in element1()
942 state->level = 1; in element1()
945 return common(state, tok); in element1()
949 element2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in element2() argument
957 state->handler = element3; in element2()
962 state->level = 2; in element2()
963 state->handler = element6; in element2()
967 state->handler = element7; in element2()
970 state->handler = element7; in element2()
973 state->handler = element7; in element2()
976 state->handler = element7; in element2()
979 return common(state, tok); in element2()
983 element3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in element3() argument
992 state->handler = declClose; in element3()
993 state->role_none = XML_ROLE_ELEMENT_NONE; in element3()
996 state->handler = declClose; in element3()
997 state->role_none = XML_ROLE_ELEMENT_NONE; in element3()
1000 state->handler = element4; in element3()
1003 return common(state, tok); in element3()
1007 element4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in element4() argument
1017 state->handler = element5; in element4()
1020 return common(state, tok); in element4()
1024 element5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in element5() argument
1033 state->handler = declClose; in element5()
1034 state->role_none = XML_ROLE_ELEMENT_NONE; in element5()
1037 state->handler = element4; in element5()
1040 return common(state, tok); in element5()
1044 element6(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in element6() argument
1053 state->level += 1; in element6()
1057 state->handler = element7; in element6()
1060 state->handler = element7; in element6()
1063 state->handler = element7; in element6()
1066 state->handler = element7; in element6()
1069 return common(state, tok); in element6()
1073 element7(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in element7() argument
1082 state->level -= 1; in element7()
1083 if (state->level == 0) { in element7()
1084 state->handler = declClose; in element7()
1085 state->role_none = XML_ROLE_ELEMENT_NONE; in element7()
1089 state->level -= 1; in element7()
1090 if (state->level == 0) { in element7()
1091 state->handler = declClose; in element7()
1092 state->role_none = XML_ROLE_ELEMENT_NONE; in element7()
1096 state->level -= 1; in element7()
1097 if (state->level == 0) { in element7()
1098 state->handler = declClose; in element7()
1099 state->role_none = XML_ROLE_ELEMENT_NONE; in element7()
1103 state->level -= 1; in element7()
1104 if (state->level == 0) { in element7()
1105 state->handler = declClose; in element7()
1106 state->role_none = XML_ROLE_ELEMENT_NONE; in element7()
1110 state->handler = element6; in element7()
1113 state->handler = element6; in element7()
1116 return common(state, tok); in element7()
1122 condSect0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in condSect0() argument
1129 state->handler = condSect1; in condSect0()
1133 state->handler = condSect2; in condSect0()
1138 return common(state, tok); in condSect0()
1142 condSect1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in condSect1() argument
1151 state->handler = externalSubset1; in condSect1()
1152 state->includeLevel += 1; in condSect1()
1155 return common(state, tok); in condSect1()
1159 condSect2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in condSect2() argument
1168 state->handler = externalSubset1; in condSect2()
1171 return common(state, tok); in condSect2()
1177 declClose(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in declClose() argument
1184 return state->role_none; in declClose()
1186 setTopLevel(state); in declClose()
1187 return state->role_none; in declClose()
1189 return common(state, tok); in declClose()
1213 error(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in error() argument
1215 UNUSED_P(state); in error()
1225 common(PROLOG_STATE *state, int tok) { in common() argument
1227 if (! state->documentEntity && tok == XML_TOK_PARAM_ENTITY_REF) in common()
1232 state->handler = error; in common()
1237 XmlPrologStateInit(PROLOG_STATE *state) { in XmlPrologStateInit() argument
1238 state->handler = prolog0; in XmlPrologStateInit()
1240 state->documentEntity = 1; in XmlPrologStateInit()
1241 state->includeLevel = 0; in XmlPrologStateInit()
1242 state->inEntityValue = 0; in XmlPrologStateInit()
1249 XmlPrologStateInitExternalEntity(PROLOG_STATE *state) { in XmlPrologStateInitExternalEntity() argument
1250 state->handler = externalSubset0; in XmlPrologStateInitExternalEntity()
1251 state->documentEntity = 0; in XmlPrologStateInitExternalEntity()
1252 state->includeLevel = 0; in XmlPrologStateInitExternalEntity()