Lines Matching refs:state
118 # define setTopLevel(state) \ argument
119 ((state)->handler \
120 = ((state)->documentEntity ? internalSubset : externalSubset1))
122 # define setTopLevel(state) ((state)->handler = internalSubset) argument
125 typedef int PTRCALL PROLOG_HANDLER(PROLOG_STATE *state, int tok,
141 static int FASTCALL common(PROLOG_STATE *state, int tok);
144 prolog0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in prolog0() argument
148 state->handler = prolog1; in prolog0()
151 state->handler = prolog1; in prolog0()
154 state->handler = prolog1; in prolog0()
157 state->handler = prolog1; in prolog0()
165 state->handler = doctype0; in prolog0()
168 state->handler = error; in prolog0()
171 return common(state, tok); in prolog0()
175 prolog1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in prolog1() argument
197 state->handler = doctype0; in prolog1()
200 state->handler = error; in prolog1()
203 return common(state, tok); in prolog1()
207 prolog2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in prolog2() argument
220 state->handler = error; in prolog2()
223 return common(state, tok); in prolog2()
227 doctype0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in doctype0() argument
237 state->handler = doctype1; in doctype0()
240 return common(state, tok); in doctype0()
244 doctype1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in doctype1() argument
250 state->handler = internalSubset; in doctype1()
253 state->handler = prolog2; in doctype1()
257 state->handler = doctype3; in doctype1()
261 state->handler = doctype2; in doctype1()
266 return common(state, tok); in doctype1()
270 doctype2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in doctype2() argument
279 state->handler = doctype3; in doctype2()
282 return common(state, tok); in doctype2()
286 doctype3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in doctype3() argument
295 state->handler = doctype4; in doctype3()
298 return common(state, tok); in doctype3()
302 doctype4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in doctype4() argument
311 state->handler = internalSubset; in doctype4()
314 state->handler = prolog2; in doctype4()
317 return common(state, tok); in doctype4()
321 doctype5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in doctype5() argument
330 state->handler = prolog2; in doctype5()
333 return common(state, tok); in doctype5()
337 internalSubset(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in internalSubset() argument
345 state->handler = entity0; in internalSubset()
350 state->handler = attlist0; in internalSubset()
355 state->handler = element0; in internalSubset()
360 state->handler = notation0; in internalSubset()
371 state->handler = doctype5; in internalSubset()
376 return common(state, tok); in internalSubset()
382 externalSubset0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in externalSubset0() argument
384 state->handler = externalSubset1; in externalSubset0()
387 return externalSubset1(state, tok, ptr, end, enc); in externalSubset0()
391 externalSubset1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in externalSubset1() argument
395 state->handler = condSect0; in externalSubset1()
398 if (state->includeLevel == 0) in externalSubset1()
400 state->includeLevel -= 1; in externalSubset1()
407 if (state->includeLevel) in externalSubset1()
411 return internalSubset(state, tok, ptr, end, enc); in externalSubset1()
413 return common(state, tok); in externalSubset1()
419 entity0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity0() argument
428 state->handler = entity1; in entity0()
431 state->handler = entity2; in entity0()
434 return common(state, tok); in entity0()
438 entity1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity1() argument
447 state->handler = entity7; in entity1()
450 return common(state, tok); in entity1()
454 entity2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity2() argument
461 state->handler = entity4; in entity2()
465 state->handler = entity3; in entity2()
470 state->handler = declClose; in entity2()
471 state->role_none = XML_ROLE_ENTITY_NONE; in entity2()
474 return common(state, tok); in entity2()
478 entity3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity3() argument
487 state->handler = entity4; in entity3()
490 return common(state, tok); in entity3()
494 entity4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity4() argument
503 state->handler = entity5; in entity4()
506 return common(state, tok); in entity4()
510 entity5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity5() argument
516 setTopLevel(state); in entity5()
520 state->handler = entity6; in entity5()
525 return common(state, tok); in entity5()
529 entity6(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity6() argument
538 state->handler = declClose; in entity6()
539 state->role_none = XML_ROLE_ENTITY_NONE; in entity6()
542 return common(state, tok); in entity6()
546 entity7(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity7() argument
553 state->handler = entity9; in entity7()
557 state->handler = entity8; in entity7()
562 state->handler = declClose; in entity7()
563 state->role_none = XML_ROLE_ENTITY_NONE; in entity7()
566 return common(state, tok); in entity7()
570 entity8(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity8() argument
579 state->handler = entity9; in entity8()
582 return common(state, tok); in entity8()
586 entity9(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity9() argument
595 state->handler = entity10; in entity9()
598 return common(state, tok); in entity9()
602 entity10(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in entity10() argument
611 setTopLevel(state); in entity10()
614 return common(state, tok); in entity10()
618 notation0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in notation0() argument
627 state->handler = notation1; in notation0()
630 return common(state, tok); in notation0()
634 notation1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in notation1() argument
641 state->handler = notation3; in notation1()
645 state->handler = notation2; in notation1()
650 return common(state, tok); in notation1()
654 notation2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in notation2() argument
663 state->handler = notation4; in notation2()
666 return common(state, tok); in notation2()
670 notation3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in notation3() argument
679 state->handler = declClose; in notation3()
680 state->role_none = XML_ROLE_NOTATION_NONE; in notation3()
683 return common(state, tok); in notation3()
687 notation4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in notation4() argument
696 state->handler = declClose; in notation4()
697 state->role_none = XML_ROLE_NOTATION_NONE; in notation4()
700 setTopLevel(state); in notation4()
703 return common(state, tok); in notation4()
707 attlist0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist0() argument
717 state->handler = attlist1; in attlist0()
720 return common(state, tok); in attlist0()
724 attlist1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist1() argument
733 setTopLevel(state); in attlist1()
737 state->handler = attlist2; in attlist1()
740 return common(state, tok); in attlist1()
744 attlist2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist2() argument
757 state->handler = attlist8; in attlist2()
762 state->handler = attlist5; in attlist2()
767 state->handler = attlist3; in attlist2()
770 return common(state, tok); in attlist2()
774 attlist3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist3() argument
785 state->handler = attlist4; in attlist3()
788 return common(state, tok); in attlist3()
792 attlist4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist4() argument
801 state->handler = attlist8; in attlist4()
804 state->handler = attlist3; in attlist4()
807 return common(state, tok); in attlist4()
811 attlist5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist5() argument
820 state->handler = attlist6; in attlist5()
823 return common(state, tok); in attlist5()
827 attlist6(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist6() argument
836 state->handler = attlist7; in attlist6()
839 return common(state, tok); in attlist6()
843 attlist7(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist7() argument
852 state->handler = attlist8; in attlist7()
855 state->handler = attlist6; in attlist7()
858 return common(state, tok); in attlist7()
863 attlist8(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist8() argument
871 state->handler = attlist1; in attlist8()
876 state->handler = attlist1; in attlist8()
881 state->handler = attlist9; in attlist8()
886 state->handler = attlist1; in attlist8()
889 return common(state, tok); in attlist8()
893 attlist9(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in attlist9() argument
902 state->handler = attlist1; in attlist9()
905 return common(state, tok); in attlist9()
909 element0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in element0() argument
919 state->handler = element1; in element0()
922 return common(state, tok); in element0()
926 element1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in element1() argument
933 state->handler = declClose; in element1()
934 state->role_none = XML_ROLE_ELEMENT_NONE; in element1()
938 state->handler = declClose; in element1()
939 state->role_none = XML_ROLE_ELEMENT_NONE; in element1()
944 state->handler = element2; in element1()
945 state->level = 1; in element1()
948 return common(state, tok); in element1()
952 element2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in element2() argument
960 state->handler = element3; in element2()
965 state->level = 2; in element2()
966 state->handler = element6; in element2()
970 state->handler = element7; in element2()
973 state->handler = element7; in element2()
976 state->handler = element7; in element2()
979 state->handler = element7; in element2()
982 return common(state, tok); in element2()
986 element3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in element3() argument
995 state->handler = declClose; in element3()
996 state->role_none = XML_ROLE_ELEMENT_NONE; in element3()
999 state->handler = declClose; in element3()
1000 state->role_none = XML_ROLE_ELEMENT_NONE; in element3()
1003 state->handler = element4; in element3()
1006 return common(state, tok); in element3()
1010 element4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in element4() argument
1020 state->handler = element5; in element4()
1023 return common(state, tok); in element4()
1027 element5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in element5() argument
1036 state->handler = declClose; in element5()
1037 state->role_none = XML_ROLE_ELEMENT_NONE; in element5()
1040 state->handler = element4; in element5()
1043 return common(state, tok); in element5()
1047 element6(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in element6() argument
1056 state->level += 1; in element6()
1060 state->handler = element7; in element6()
1063 state->handler = element7; in element6()
1066 state->handler = element7; in element6()
1069 state->handler = element7; in element6()
1072 return common(state, tok); in element6()
1076 element7(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in element7() argument
1085 state->level -= 1; in element7()
1086 if (state->level == 0) { in element7()
1087 state->handler = declClose; in element7()
1088 state->role_none = XML_ROLE_ELEMENT_NONE; in element7()
1092 state->level -= 1; in element7()
1093 if (state->level == 0) { in element7()
1094 state->handler = declClose; in element7()
1095 state->role_none = XML_ROLE_ELEMENT_NONE; in element7()
1099 state->level -= 1; in element7()
1100 if (state->level == 0) { in element7()
1101 state->handler = declClose; in element7()
1102 state->role_none = XML_ROLE_ELEMENT_NONE; in element7()
1106 state->level -= 1; in element7()
1107 if (state->level == 0) { in element7()
1108 state->handler = declClose; in element7()
1109 state->role_none = XML_ROLE_ELEMENT_NONE; in element7()
1113 state->handler = element6; in element7()
1116 state->handler = element6; in element7()
1119 return common(state, tok); in element7()
1125 condSect0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in condSect0() argument
1132 state->handler = condSect1; in condSect0()
1136 state->handler = condSect2; in condSect0()
1141 return common(state, tok); in condSect0()
1145 condSect1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in condSect1() argument
1154 state->handler = externalSubset1; in condSect1()
1155 state->includeLevel += 1; in condSect1()
1158 return common(state, tok); in condSect1()
1162 condSect2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in condSect2() argument
1171 state->handler = externalSubset1; in condSect2()
1174 return common(state, tok); in condSect2()
1180 declClose(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in declClose() argument
1187 return state->role_none; in declClose()
1189 setTopLevel(state); in declClose()
1190 return state->role_none; in declClose()
1192 return common(state, tok); in declClose()
1216 error(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in error() argument
1218 UNUSED_P(state); in error()
1228 common(PROLOG_STATE *state, int tok) { in common() argument
1230 if (! state->documentEntity && tok == XML_TOK_PARAM_ENTITY_REF) in common()
1235 state->handler = error; in common()
1240 XmlPrologStateInit(PROLOG_STATE *state) { in XmlPrologStateInit() argument
1241 state->handler = prolog0; in XmlPrologStateInit()
1243 state->documentEntity = 1; in XmlPrologStateInit()
1244 state->includeLevel = 0; in XmlPrologStateInit()
1245 state->inEntityValue = 0; in XmlPrologStateInit()
1252 XmlPrologStateInitExternalEntity(PROLOG_STATE *state) { in XmlPrologStateInitExternalEntity() argument
1253 state->handler = externalSubset0; in XmlPrologStateInitExternalEntity()
1254 state->documentEntity = 0; in XmlPrologStateInitExternalEntity()
1255 state->includeLevel = 0; in XmlPrologStateInitExternalEntity()