• Home
  • Raw
  • Download

Lines Matching refs:parser

36 static XML_Parser parser;  variable
42 parser = XML_ParserCreate(NULL); in basic_setup()
43 if (parser == NULL) in basic_setup()
50 if (parser != NULL) in basic_teardown()
51 XML_ParserFree(parser); in basic_teardown()
59 _xml_failure(XML_Parser parser, const char *file, int line) in _xml_failure() argument
62 enum XML_Error err = XML_GetErrorCode(parser); in _xml_failure()
68 XML_GetCurrentLineNumber(parser), in _xml_failure()
69 XML_GetCurrentColumnNumber(parser), in _xml_failure()
75 _XML_Parse_SINGLE_BYTES(XML_Parser parser, const char *s, int len, int isFinal) in _XML_Parse_SINGLE_BYTES() argument
81 return XML_Parse(parser, s, len, isFinal); in _XML_Parse_SINGLE_BYTES()
87 res = XML_Parse(parser, &c, sizeof(char), innerIsFinal); in _XML_Parse_SINGLE_BYTES()
95 #define xml_failure(parser) _xml_failure((parser), __FILE__, __LINE__) argument
101 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_OK) in _expect_failure()
105 if (XML_GetErrorCode(parser) != errorCode) in _expect_failure()
106 _xml_failure(parser, file, lineno); in _expect_failure()
187 if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text) - 1, XML_TRUE) == XML_STATUS_OK) in START_TEST()
189 if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN) in START_TEST()
190 xml_failure(parser); in START_TEST()
209 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
210 xml_failure(parser); in START_TEST()
218 if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1, XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
219 xml_failure(parser); in START_TEST()
227 if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1, XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
228 xml_failure(parser); in START_TEST()
257 XML_SetUserData(parser, &storage); in _run_character_check()
258 XML_SetCharacterDataHandler(parser, accumulate_characters); in _run_character_check()
259 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in _run_character_check()
260 _xml_failure(parser, file, line); in _run_character_check()
274 XML_SetUserData(parser, &storage); in _run_attribute_check()
275 XML_SetStartElementHandler(parser, accumulate_attribute); in _run_attribute_check()
276 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in _run_attribute_check()
277 _xml_failure(parser, file, line); in _run_attribute_check()
360 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_OK) { in START_TEST()
366 else if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN) in START_TEST()
367 xml_failure(parser); in START_TEST()
369 XML_ParserReset(parser, NULL); in START_TEST()
449 if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1, XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
450 xml_failure(parser); in START_TEST()
464 if ( _XML_Parse_SINGLE_BYTES(parser, text, first_chunk_bytes, XML_FALSE) in START_TEST()
466 xml_failure(parser); in START_TEST()
469 rc = _XML_Parse_SINGLE_BYTES(parser, text + first_chunk_bytes, in START_TEST()
472 xml_failure(parser); in START_TEST()
489 XML_ParserReset(parser, NULL); in START_TEST()
503 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_FALSE) == XML_STATUS_ERROR) in START_TEST()
504 xml_failure(parser); in START_TEST()
505 lineno = XML_GetCurrentLineNumber(parser); in START_TEST()
521 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_FALSE) == XML_STATUS_ERROR) in START_TEST()
522 xml_failure(parser); in START_TEST()
523 colno = XML_GetCurrentColumnNumber(parser); in START_TEST()
543 XML_GetCurrentColumnNumber(parser), in start_element_event_handler2()
544 XML_GetCurrentLineNumber(parser)); in start_element_event_handler2()
557 XML_GetCurrentColumnNumber(parser), in end_element_event_handler2()
558 XML_GetCurrentLineNumber(parser)); in end_element_event_handler2()
588 XML_SetUserData(parser, &storage); in START_TEST()
589 XML_SetStartElementHandler(parser, start_element_event_handler2); in START_TEST()
590 XML_SetEndElementHandler(parser, end_element_event_handler2); in START_TEST()
591 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
592 xml_failure(parser); in START_TEST()
606 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_FALSE) != XML_STATUS_ERROR) in START_TEST()
609 lineno = XML_GetCurrentLineNumber(parser); in START_TEST()
626 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_FALSE) != XML_STATUS_ERROR) in START_TEST()
629 colno = XML_GetCurrentColumnNumber(parser); in START_TEST()
669 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
670 xml_failure(parser); in START_TEST()
694 XML_SetUserData(parser, &storage); in START_TEST()
695 XML_SetEndElementHandler(parser, end_element_event_handler); in START_TEST()
696 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
697 xml_failure(parser); in START_TEST()
807 XML_SetStartElementHandler(parser, in START_TEST()
809 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
810 xml_failure(parser); in START_TEST()
852 XML_SetUnknownEncodingHandler(parser, UnknownEncodingHandler, NULL); in START_TEST()
853 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
854 xml_failure(parser); in START_TEST()
860 external_entity_loader_set_encoding(XML_Parser parser, in external_entity_loader_set_encoding() argument
874 extparser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_loader_set_encoding()
881 xml_failure(parser); in external_entity_loader_set_encoding()
895 XML_SetExternalEntityRefHandler(parser, in START_TEST()
909 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
910 xml_failure(parser); in START_TEST()
940 external_entity_loader(XML_Parser parser, in external_entity_loader() argument
946 char *text = (char *)XML_GetUserData(parser); in external_entity_loader()
949 extparser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_loader()
954 xml_failure(parser); in external_entity_loader()
971 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
972 XML_SetUserData(parser, foo_text); in START_TEST()
973 XML_SetExternalEntityRefHandler(parser, external_entity_loader); in START_TEST()
991 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
992 XML_SetUserData(parser, foo_text); in START_TEST()
993 XML_SetExternalEntityRefHandler(parser, external_entity_loader); in START_TEST()
994 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
995 xml_failure(parser); in START_TEST()
1026 XML_SetDefaultHandler(parser, accumulate_characters); in START_TEST()
1027 XML_SetDoctypeDeclHandler(parser, in START_TEST()
1030 XML_SetEntityDeclHandler(parser, dummy_entity_decl_handler); in START_TEST()
1031 XML_SetNotationDeclHandler(parser, dummy_notation_decl_handler); in START_TEST()
1032 XML_SetElementDeclHandler(parser, dummy_element_decl_handler); in START_TEST()
1033 XML_SetAttlistDeclHandler(parser, dummy_attlist_decl_handler); in START_TEST()
1034 XML_SetProcessingInstructionHandler(parser, dummy_pi_handler); in START_TEST()
1035 XML_SetCommentHandler(parser, dummy_comment_handler); in START_TEST()
1053 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
1054 xml_failure(parser); in START_TEST()
1071 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
1072 xml_failure(parser); in START_TEST()
1106 XML_StopParser(parser, resumable); in clearing_aborting_character_handler()
1107 XML_SetCharacterDataHandler(parser, NULL); in clearing_aborting_character_handler()
1122 XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler); in START_TEST()
1124 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR) in START_TEST()
1125 xml_failure(parser); in START_TEST()
1126 if (XML_GetErrorCode(parser) != XML_ERROR_ABORTED) in START_TEST()
1127 xml_failure(parser); in START_TEST()
1143 XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler); in START_TEST()
1145 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) != XML_STATUS_SUSPENDED) in START_TEST()
1146 xml_failure(parser); in START_TEST()
1147 if (XML_GetErrorCode(parser) != XML_ERROR_NONE) in START_TEST()
1148 xml_failure(parser); in START_TEST()
1159 XML_SetUserData(parser, &storage); in START_TEST()
1160 XML_SetCharacterDataHandler(parser, accumulate_characters); in START_TEST()
1162 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
1163 xml_failure(parser); in START_TEST()
1184 XML_SetUserData(parser, &storage); in START_TEST()
1185 XML_SetCharacterDataHandler(parser, accumulate_characters); in START_TEST()
1187 if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text) - 1, XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
1188 xml_failure(parser); in START_TEST()
1230 parser, cases[i].text, strlen(cases[i].text), XML_TRUE); in START_TEST()
1231 const enum XML_Error actualError = XML_GetErrorCode(parser); in START_TEST()
1242 XML_ParserReset(parser, NULL); in START_TEST()
1255 parser = XML_ParserCreateNS(NULL, ' '); in namespace_setup()
1256 if (parser == NULL) in namespace_setup()
1311 XML_SetReturnNSTriplet(parser, XML_TRUE); in START_TEST()
1312 XML_SetUserData(parser, elemstr); in START_TEST()
1313 XML_SetElementHandler(parser, triplet_start_checker, triplet_end_checker); in START_TEST()
1314 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
1315 xml_failure(parser); in START_TEST()
1348 XML_SetUserData(parser, &storage); in run_ns_tagname_overwrite_test()
1349 XML_SetElementHandler(parser, in run_ns_tagname_overwrite_test()
1351 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in run_ns_tagname_overwrite_test()
1352 xml_failure(parser); in run_ns_tagname_overwrite_test()
1394 XML_SetReturnNSTriplet(parser, XML_TRUE); in START_TEST()
1425 XML_SetStartElementHandler(parser, start_element_fail); in START_TEST()
1426 XML_SetStartNamespaceDeclHandler(parser, start_ns_clearing_start_element); in START_TEST()
1427 XML_UseParserAsHandlerArg(parser); in START_TEST()
1428 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
1429 xml_failure(parser); in START_TEST()
1435 external_entity_handler(XML_Parser parser, in external_entity_handler() argument
1441 intptr_t callno = 1 + (intptr_t)XML_GetUserData(parser); in external_entity_handler()
1453 XML_SetUserData(parser, (void *) callno); in external_entity_handler()
1454 p2 = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_handler()
1474 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
1475 XML_SetExternalEntityRefHandler(parser, external_entity_handler); in START_TEST()
1477 XML_SetStartElementHandler(parser, dummy_start_element); in START_TEST()
1478 XML_SetUserData(parser, NULL); in START_TEST()
1479 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
1480 xml_failure(parser); in START_TEST()
1545 XML_SetReturnNSTriplet(parser, XML_TRUE); in START_TEST()
1546 XML_SetUserData(parser, elemstr); in START_TEST()
1547 XML_SetEndElementHandler(parser, triplet_end_checker); in START_TEST()
1548 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
1549 xml_failure(parser); in START_TEST()
1559 if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
1560 xml_failure(parser); in START_TEST()