Branch Coverage

hparser.c
Criterion Covered Total %
branch 851 1092 77.9


line true false branch
140 4 43761 if (p_state->eof)
184 0 43761 if (p_state->pending_end_tag && event != E_TEXT && event != E_COMMENT) {
0 0 if (p_state->pending_end_tag && event != E_TEXT && event != E_COMMENT) {
0 0 if (p_state->pending_end_tag && event != E_TEXT && event != E_COMMENT) {
195 154 43607 p_state->offset += CHR_DIST(end, beg);
196 122 43639 if (line) {
199 718 122 while (s < end) {
200 31 687 if (*s == '\n') {
206 27 95 if (nl)
207 10 17 p_state->column = CHR_DIST(end, nl) - 1;
209 22 73 p_state->column += CHR_DIST(end, beg);
212 32 43729 if (event == E_NONE)
216 4 43725 if (p_state->ms == MS_IGNORE)
221 43595 130 if (p_state->ignore_tags || p_state->report_tags || p_state->ignore_elements) {
43509 86 if (p_state->ignore_tags || p_state->report_tags || p_state->ignore_elements) {
197 43312 if (p_state->ignore_tags || p_state->report_tags || p_state->ignore_elements) {
223 308 105 if (event == E_START || event == E_END) {
62 246 if (event == E_START || event == E_END) {
228 38 129 if (utf8)
232 159 8 if (!CASE_SENSITIVE(p_state))
155 4 if (!CASE_SENSITIVE(p_state))
235 7 160 if (p_state->ignoring_element) {
236 7 0 if (sv_eq(p_state->ignoring_element, tagname)) {
237 0 7 if (event == E_START)
239 7 0 else if (--p_state->ignore_depth == 0) {
250 7 1 if (event == E_START) {
268 7 239 else if (p_state->ignoring_element) {
274 3286 40385 if (!h->cb) {
277 2178 1108 if (!h->cb)
281 28050 13443 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
28050 0 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
0 28050 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
0 0 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
0 28050 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
0 0 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
0 0 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
27540 510 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
27540 0 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
5 27535 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
0 5 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
0 0 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
5 27535 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
2 508 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
2 0 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
2 0 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
0 2 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
0 0 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
2 0 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
0 508 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
286 8981 32505 if (p_state->unbroken_text && event == E_TEXT) {
4510 4471 if (p_state->unbroken_text && event == E_TEXT) {
288 16 4494 if (!p_state->pend_text)
290 4356 154 if (SvOK(p_state->pend_text)) {
4356 0 if (SvOK(p_state->pend_text)) {
0 4356 if (SvOK(p_state->pend_text)) {
291 2 152 if (p_state->is_cdata != p_state->pend_text_is_cdata) {
304 4358 0 if (!utf8)
307 0 4510 if (utf8 && !SvUTF8(p_state->pend_text))
0 0 if (utf8 && !SvUTF8(p_state->pend_text))
309 4510 0 if (utf8 || !SvUTF8(p_state->pend_text)) {
4510 0 if (utf8 || !SvUTF8(p_state->pend_text)) {
320 4458 32518 else if (p_state->pend_text && SvOK(p_state->pend_text)) {
164 4294 else if (p_state->pend_text && SvOK(p_state->pend_text)) {
164 0 else if (p_state->pend_text && SvOK(p_state->pend_text)) {
0 164 else if (p_state->pend_text && SvOK(p_state->pend_text)) {
327 36975 1 argspec = h->argspec ? SvPV(h->argspec, my_na) : "";
36975 0 argspec = h->argspec ? SvPV(h->argspec, my_na) : "";
329 8945 28031 if (SvTYPE(h->cb) == SVt_PVAV) {
331 502 8443 if (*argspec == ARG_FLAG_FLAT_ARRAY) {
342 0 28031 if (*argspec == ARG_FLAG_FLAT_ARRAY)
348 0 28031 PUSHMARK(SP);
351 122020 36976 for (s = argspec; *s; s++) {
363 97 17 if (num_tokens >= 1) {
368 434 97 for (i = 0; i < num_tokens; i++) {
369 434 0 if (tokens[i].beg) {
371 0 434 if (utf8)
376 0 0 av_push(av, p_state->bool_attr_val
386 33 51 if (num_tokens >= 1 && tokens[0].beg >= beg) {
32 1 if (num_tokens >= 1 && tokens[0].beg >= beg) {
390 369 32 for (i = 0; i < num_tokens; i++) {
391 367 2 if (tokens[i].beg) {
392 13 354 av_push(av, newSViv(CHR_DIST(tokens[i].beg, beg)));
393 13 354 av_push(av, newSViv(CHR_DIST(tokens[i].end, tokens[i].beg)));
409 8271 68 if (num_tokens >= 1) {
412 29 8242 if (utf8)
414 8210 61 if (!CASE_SENSITIVE(p_state) && argcode != ARG_TOKEN0)
8205 5 if (!CASE_SENSITIVE(p_state) && argcode != ARG_TOKEN0)
8104 101 if (!CASE_SENSITIVE(p_state) && argcode != ARG_TOKEN0)
416 21 8250 if (argcode == ARG_TAG && event != E_START) {
10 11 if (argcode == ARG_TAG && event != E_START) {
425 5892 92 if (event == E_START) {
428 5883 9 if (argcode == ARG_ATTR) {
440 19557 5892 for (i = 1; i < num_tokens; i += 2) {
445 37 19520 if (utf8)
447 4432 15125 if (tokens[i+1].beg) {
450 4264 168 if (*beg == '"' || *beg == '\'' || (*beg == '`' && p_state->backquote)) {
2216 2048 if (*beg == '"' || *beg == '\'' || (*beg == '`' && p_state->backquote)) {
10 2206 if (*beg == '"' || *beg == '\'' || (*beg == '`' && p_state->backquote)) {
1 9 if (*beg == '"' || *beg == '\'' || (*beg == '`' && p_state->backquote)) {
455 34 4398 if (utf8)
457 4430 2 if (!p_state->attr_encoded) {
458 20 4410 if (p_state->utf8_mode) {
463 20 4410 if (p_state->utf8_mode)
468 0 15125 if (p_state->bool_attr_val)
474 19544 13 if (!CASE_SENSITIVE(p_state))
19540 4 if (!CASE_SENSITIVE(p_state))
477 19549 8 if (argcode == ARG_ATTR) {
485 4 4 if (array) {
490 0 4 mXPUSHs(attrname);
491 0 4 mXPUSHs(attrval);
496 18 74 else if (argcode == ARG_ATTRARR) {
502 5782 25 if (event == E_START) {
505 19441 5782 for (i = 1; i < num_tokens; i += 2) {
508 0 19441 if (utf8)
510 19431 10 if (!CASE_SENSITIVE(p_state))
19427 4 if (!CASE_SENSITIVE(p_state))
520 115 36539 if (utf8)
525 79 77 if (event == E_TEXT) {
527 23 56 if (utf8)
529 71 8 if (!p_state->is_cdata) {
530 8 63 if (p_state->utf8_mode) {
535 8 63 if (p_state->utf8_mode)
542 27693 53 if (event == E_TEXT) {
543 7 27686 arg = boolSV(p_state->is_cdata);
557 16 58 arg = sv_2mortal(newSViv(offset + CHR_DIST(end, beg)));
561 16 85 arg = sv_2mortal(newSViv(CHR_DIST(end, beg)));
581 0 8319 if (SvUTF8(h->argspec))
596 121993 27 if (push_arg) {
597 366 121627 if (!arg)
600 31113 90880 if (array) {
607 0 90880 XPUSHs(arg);
612 8945 28031 if (array) {
613 8443 502 if (array != (AV*)h->cb)
619 27634 397 if ((enum argcode)*argspec == ARG_SELF && !SvROK(h->cb)) {
27535 99 if ((enum argcode)*argspec == ARG_SELF && !SvROK(h->cb)) {
620 27535 0 char *method = SvPV(h->cb, my_na);
627 28031 0 if (SvTRUE(ERRSV)) {
28031 0 if (SvTRUE(ERRSV)) {
28031 0 if (SvTRUE(ERRSV)) {
0 28031 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
28031 0 if (SvTRUE(ERRSV)) {
0 28031 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
28031 0 if (SvTRUE(ERRSV)) {
28031 0 if (SvTRUE(ERRSV)) {
28031 0 if (SvTRUE(ERRSV)) {
28031 0 if (SvTRUE(ERRSV)) {
28031 0 if (SvTRUE(ERRSV)) {
28030 1 if (SvTRUE(ERRSV)) {
28030 0 if (SvTRUE(ERRSV)) {
0 28030 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
1 28030 if (SvTRUE(ERRSV)) {
631 28026 4 FREETMPS;
634 14 36961 if (p_state->skipped_text)
639 38 2230 if (p_state->skipped_text) {
640 20 18 if (event != E_TEXT && p_state->pend_text && SvOK(p_state->pend_text))
2 18 if (event != E_TEXT && p_state->pend_text && SvOK(p_state->pend_text))
0 2 if (event != E_TEXT && p_state->pend_text && SvOK(p_state->pend_text))
0 0 if (event != E_TEXT && p_state->pend_text && SvOK(p_state->pend_text))
0 0 if (event != E_TEXT && p_state->pend_text && SvOK(p_state->pend_text))
642 2 36 if (utf8 && !SvUTF8(p_state->skipped_text))
1 1 if (utf8 && !SvUTF8(p_state->skipped_text))
644 36 2 if (utf8 || !SvUTF8(p_state->skipped_text)) {
35 1 if (utf8 || !SvUTF8(p_state->skipped_text)) {
665 463 0 char *s = SvPV(src, len);
668 0 463 if (SvUTF8(src))
671 0 463 while (isHSPACE(*s))
674 7 456 if (*s == '@') {
677 0 7 while (isHSPACE(*tmp))
679 7 0 if (*tmp == '{') {
683 0 7 while (isHSPACE(*tmp))
688 1267 4 while (s < end) {
689 71 1196 if (isHNAME_FIRST(*s) || *s == '@') {
4 67 if (isHNAME_FIRST(*s) || *s == '@') {
695 4876 1200 while (isHNAME_CHAR(*s))
699 7620 2 for ( arg_name = argname; a < ARG_LITERAL ; ++a, ++arg_name ) {
700 1202 6418 if (strnEQ(*arg_name, name, s - name) &&
1198 4 if (strnEQ(*arg_name, name, s - name) &&
704 1198 2 if (a < ARG_LITERAL) {
708 1194 4 if (a == ARG_LINE || a == ARG_COLUMN) {
5 1189 if (a == ARG_LINE || a == ARG_COLUMN) {
709 5 4 if (!p_state->line)
712 7 1191 if (a == ARG_SKIPPED_TEXT) {
713 5 2 if (!p_state->skipped_text) {
717 1120 78 if (a == ARG_ATTR || a == ARG_ATTRARR) {
4 1116 if (a == ARG_ATTR || a == ARG_ATTRARR) {
718 80 2 if (p_state->argspec_entity_decode != ARG_DTEXT)
721 10 1106 else if (a == ARG_DTEXT) {
729 61 6 else if (*s == '"' || *s == '\'') {
61 0 else if (*s == '"' || *s == '\'') {
732 655 1 while (s < end && *s != *string_beg && *s != '\\')
590 65 while (s < end && *s != *string_beg && *s != '\\')
589 1 while (s < end && *s != *string_beg && *s != '\\')
734 65 2 if (*s == *string_beg) {
738 1 64 if (len > 255)
746 1 1 else if (*s == '\\') {
757 1 1262 while (isHSPACE(*s))
760 7 1255 if (*s == '}' && SvPVX(argspec)[0] == ARG_FLAG_FLAT_ARRAY) {
7 0 if (*s == '}' && SvPVX(argspec)[0] == ARG_FLAG_FLAT_ARRAY) {
763 0 7 while (isHSPACE(*s))
765 0 7 if (s < end)
769 453 809 if (s == end)
771 1 808 if (*s != ',') {
775 32 808 while (isHSPACE(*s))
805 0 4358 SvOK_off(old_pend_text);
822 20832 72 while (s < end) {
823 20801 31 if (!quote && *s == '>')
2923 17878 if (!quote && *s == '>')
825 17823 86 if (*s == '"' || *s == '\'') {
66 17757 if (*s == '"' || *s == '\'') {
826 6 146 if (*s == quote) {
829 146 0 else if (!quote && (prev == ' ' || prev == '=')) {
140 6 else if (!quote && (prev == ' ' || prev == '=')) {
0 140 else if (!quote && (prev == ' ' || prev == '=')) {
843 6 171 if (p_state->strict_comment) {
851 125 0 while (s < end && *s != '-' && *s != '>')
112 13 while (s < end && *s != '-' && *s != '>')
104 8 while (s < end && *s != '-' && *s != '>')
854 0 21 if (s == end) {
855 0 0 FREE_TOKENS;
859 8 13 if (*s == '>') {
861 2 6 if (start_com)
869 0 6 FREE_TOKENS;
875 0 13 if (s == end) {
876 0 0 FREE_TOKENS;
880 12 1 if (*s == '-') {
884 9 3 if (start_com) {
885 0 9 PUSH_TOKEN(start_com, s-2);
894 2 169 else if (p_state->no_dash_dash_comment_end) {
898 16 0 while (s < end && *s != '>')
14 2 while (s < end && *s != '>')
901 2 0 if (s < end) {
915 2226 104 while (s < end && *s != '-')
2131 95 while (s < end && *s != '-')
918 95 104 if (s < end) {
920 78 17 if (*s == '-') {
922 15 78 while (isHSPACE(*s))
924 48 30 if (*s == '>') {
931 30 17 if (s < end) {
937 121 0 if (s == end)
955 32 0 if (ms_stack) {
958 18 32 for (stack_idx = 0; stack_idx <= stack_len; stack_idx++) {
960 18 0 if (svp) {
965 25 18 for (i = 0; i <= tokens_len; i++) {
967 25 0 if (svp) {
969 25 0 char *token_str = SvPV(*svp, len);
971 11 14 if (strEQ(token_str, "include"))
973 4 10 else if (strEQ(token_str, "rcdata"))
975 7 3 else if (strEQ(token_str, "cdata"))
977 2 1 else if (strEQ(token_str, "ignore"))
981 24 1 if (p_state->ms < token)
1001 0 16 if (!p_state->marked_sections)
1010 5 17 while (isHSPACE(*s))
1012 20 17 while (isHNAME_FIRST(*s)) {
1017 97 20 while (isHNAME_CHAR(*s))
1020 19 20 while (isHSPACE(*s))
1022 0 20 if (s == end)
1025 13 7 if (!tokens)
1028 1 19 if (utf8)
1032 1 16 if (*s == '-') {
1034 1 0 if (*s == '-') {
1038 9 0 while (s < end && *s != '-')
8 1 while (s < end && *s != '-')
1040 0 1 if (s == end)
1044 1 0 if (*s == '-') {
1055 16 0 if (*s == '[') {
1059 3 13 if (!tokens) {
1064 4 12 if (!p_state->ms_stack)
1088 185 394 if (*s == '-') {
1093 6 179 if (s == end)
1096 2 177 if (*s != '-')
1103 121 56 return (tmp == s) ? beg : tmp;
1107 16 378 if (*s == '[') {
1111 0 16 if (!tmp)
1117 1 377 if (*s == '>') {
1127 308 69 if (isALPHA(*s)) {
1134 1970 16 while (s < end && isHNAME_CHAR(*s))
1678 292 while (s < end && isHNAME_CHAR(*s))
1137 16 292 if (s == end)
1141 4 23 if (!((decl_id_len == 7 &&
1142 266 0 strnEQx(decl_id, "DOCTYPE", 7, !CASE_SENSITIVE(p_state))) ||
266 0 strnEQx(decl_id, "DOCTYPE", 7, !CASE_SENSITIVE(p_state))) ||
1143 4 0 (decl_id_len == 6 &&
1144 3 1 strnEQx(decl_id, "ENTITY", 6, !CASE_SENSITIVE(p_state)))
3 0 strnEQx(decl_id, "ENTITY", 6, !CASE_SENSITIVE(p_state)))
1152 0 269 PUSH_TOKEN(decl_id, s);
1155 50567 165 while (s < end && isHSPACE(*s))
25413 25154 while (s < end && isHSPACE(*s))
1158 165 25154 if (s == end)
1161 25025 129 if (*s == '"' || *s == '\'' || (*s == '`' && p_state->backquote)) {
25025 0 if (*s == '"' || *s == '\'' || (*s == '`' && p_state->backquote)) {
0 25025 if (*s == '"' || *s == '\'' || (*s == '`' && p_state->backquote)) {
0 0 if (*s == '"' || *s == '\'' || (*s == '`' && p_state->backquote)) {
1164 2849 65 while (s < end && *s != *str_beg)
2785 64 while (s < end && *s != *str_beg)
1166 65 64 if (s == end)
1169 0 64 PUSH_TOKEN(str_beg, s);
1171 12405 12620 else if (*s == '-') {
1175 0 12405 if (s == end)
1177 0 12405 if (*s != '-')
1182 62054 0 while (s < end && *s != '-')
49647 12407 while (s < end && *s != '-')
1184 0 12407 if (s == end)
1187 0 12407 if (s == end)
1189 12405 2 if (*s == '-') {
1191 0 12405 PUSH_TOKEN(com_beg, s);
1196 12598 22 else if (*s != '>') {
1200 25705 17 while (s < end && isHNOT_SPACE_GT(*s))
13124 12581 while (s < end && isHNOT_SPACE_GT(*s))
1202 17 12581 if (s == end)
1204 696 11885 PUSH_TOKEN(word_beg, s);
1211 0 22 if (s == end)
1213 22 0 if (*s == '>') {
1216 1 21 FREE_TOKENS;
1221 0 23 FREE_TOKENS;
1225 153 110 FREE_TOKENS;
1231 0 94 if (p_state->strict_comment)
1235 15788 27 while (s < end && *s != '>')
15721 67 while (s < end && *s != '>')
1237 67 27 if (s < end) {
1261 8962 20 if (STRICT_NAMES(p_state)) {
0 8962 if (STRICT_NAMES(p_state)) {
1273 190196 310 while (s < end && isHCTYPE(*s, tag_name_char)) {
181524 8672 while (s < end && isHCTYPE(*s, tag_name_char)) {
1274 706 180818 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
706 0 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
0 706 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
1275 0 0 if ((s + 1) == end)
1277 0 0 if (*(s + 1) == '>')
1282 0 8982 PUSH_TOKEN(beg+1, s); /* tagname */
1284 7532 8982 while (isHSPACE(*s))
1286 337 8645 if (s == end)
1289 40368 6683 while (isHCTYPE(*s, attr_name_first)) {
1293 131 40237 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
131 0 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
4 127 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
1294 0 4 if ((s + 1) == end)
1296 4 0 if (*(s + 1) == '>')
1300 810867 1232 while (s < end && isHCTYPE(*s, attr_name_char)) {
771735 39132 while (s < end && isHCTYPE(*s, attr_name_char)) {
1301 2993 768742 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
2993 0 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
0 2993 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
1302 0 0 if ((s + 1) == end)
1304 0 0 if (*(s + 1) == '>')
1309 1232 39132 if (s == end)
1313 1877 37255 PUSH_TOKEN(attr_name_beg, attr_name_end); /* attr name */
1315 18463 39132 while (isHSPACE(*s))
1317 34 39098 if (s == end)
1320 18620 20478 if (*s == '=') {
1323 73 18620 while (isHSPACE(*s))
1325 35 18585 if (s == end)
1327 18 18567 if (*s == '>') {
1329 0 18 PUSH_TOKEN(s, s);
1332 17719 848 if (*s == '"' || *s == '\'' || (*s == '`' && p_state->backquote)) {
15559 2160 if (*s == '"' || *s == '\'' || (*s == '`' && p_state->backquote)) {
15 15544 if (*s == '"' || *s == '\'' || (*s == '`' && p_state->backquote)) {
1 14 if (*s == '"' || *s == '\'' || (*s == '`' && p_state->backquote)) {
1335 37157 285 while (s < end && *s != *str_beg)
34433 2724 while (s < end && *s != *str_beg)
1337 285 2724 if (s == end)
1340 0 2724 PUSH_TOKEN(str_beg, s);
1344 140929 158 while (s < end && isHNOT_SPACE_GT(*s)) {
125531 15398 while (s < end && isHNOT_SPACE_GT(*s)) {
1345 450 125081 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
449 1 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
1 448 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
1346 0 2 if ((s + 1) == end)
1348 2 0 if (*(s + 1) == '>')
1353 158 15400 if (s == end)
1355 0 15400 PUSH_TOKEN(word_start, s);
1357 15287 18124 while (isHSPACE(*s))
1359 196 17928 if (s == end)
1363 0 20478 PUSH_TOKEN(0, 0); /* boolean attr value */
1367 6685 20 if (ALLOW_EMPTY_TAG(p_state) && *s == '/') {
605 6080 if (ALLOW_EMPTY_TAG(p_state) && *s == '/') {
7 618 if (ALLOW_EMPTY_TAG(p_state) && *s == '/') {
1369 0 7 if (s == end)
1374 6705 0 if (*s == '>') {
1378 7 6698 if (empty_tag) {
1381 6681 17 else if (!p_state->xml_mode) {
1387 46584 6576 for (i = 0; literal_mode_elem[i].len; i++) {
1388 852 45732 if (tag_len == literal_mode_elem[i].len) {
1393 1320 0 while (len) {
1394 329 991 if (toLOWER(*s) != *t)
747 573 if (toLOWER(*s) != *t)
1398 105 468 if (!--len) {
1412 808 5897 FREE_TOKENS;
1416 0 0 FREE_TOKENS;
1420 435 1842 FREE_TOKENS;
1431 2978 17 if (STRICT_NAMES(p_state)) {
0 2978 if (STRICT_NAMES(p_state)) {
1439 2992 3 if (isHCTYPE(*s, name_first)) {
1443 7222 50 while (s < end && isHCTYPE(*s, name_char))
4280 2942 while (s < end && isHCTYPE(*s, name_char))
1447 0 2992 if (p_state->strict_end) {
1448 0 0 while (isHSPACE(*s))
1454 2920 72 if (s < end) {
1455 2920 0 if (*s == '>') {
1466 3 0 else if (!p_state->strict_comment) {
1468 3 0 if (s < end) {
1492 23761 43 while (s < end) {
1493 99 23662 if (*s == '>') {
1497 93 6 if (p_state->xml_mode || p_state->xml_pic) {
2 91 if (p_state->xml_mode || p_state->xml_pic) {
1499 8 0 if (s - beg < 4 || s[-2] != '?')
2 6 if (s - beg < 4 || s[-2] != '?')
1534 35539 6 while (!p_state->eof) {
1541 287 35420 while (p_state->literal_mode) {
1545 2585 119 while (s < end && *s != '<') {
2417 168 while (s < end && *s != '<') {
1549 119 168 if (s == end) {
1558 147 21 if (*s == '/') {
1560 666 111 while (*l && toLOWER(*s) == *l) {
15 651 while (*l && toLOWER(*s) == *l) {
630 36 while (*l && toLOWER(*s) == *l) {
1565 111 36 if (!*l && (strNE(p_state->literal_mode, "plaintext") || p_state->closing_plaintext)) {
2 109 if (!*l && (strNE(p_state->literal_mode, "plaintext") || p_state->closing_plaintext)) {
1 1 if (!*l && (strNE(p_state->literal_mode, "plaintext") || p_state->closing_plaintext)) {
1571 0 110 while (isHSPACE(*s))
1573 101 9 if (*s == '>') {
1575 101 0 if (t != end_text)
1589 8 35421 while (p_state->ms == MS_CDATA || p_state->ms == MS_RCDATA) {
2 35419 while (p_state->ms == MS_CDATA || p_state->ms == MS_RCDATA) {
1590 115 1 while (s < end && *s != ']')
106 9 while (s < end && *s != ']')
1592 9 1 if (*s == ']') {
1595 9 0 if (*s == ']' && *(s + 1) == '>') {
8 1 if (*s == ']' && *(s + 1) == '>') {
1598 8 0 if (t != end_text)
1608 1 1 if (s == end) {
1616 3937094 7952 while (s < end && *s != '<') {
3909627 27467 while (s < end && *s != '<') {
1618 65 3909562 if (p_state->ms && *s == ']') {
8 57 if (p_state->ms && *s == ']') {
1621 8 0 if (*s == ']') {
1623 8 0 if (*s == '>') {
1639 30349 5070 if (s != t) {
1640 22562 7787 if (*s == '<') {
1646 440 7347 if (isHSPACE(*s)) {
1648 810 133 while (s >= t && isHSPACE(*s))
503 307 while (s >= t && isHSPACE(*s))
1653 248619 1242 while (s >= t && !isHSPACE(*s))
242514 6105 while (s >= t && !isHSPACE(*s))
1655 12116 1494 while (s >= t && isHSPACE(*s))
6263 5853 while (s >= t && isHSPACE(*s))
1659 6160 1627 if (s != t)
1665 400 27232 if (end - s < 3)
1674 8982 18250 if (isHNAME_FIRST(*s))
1676 2995 15255 else if (*s == '/')
1678 579 14676 else if (*s == '!')
1680 140 14536 else if (*s == '?')
1686 12695 14536 if (new_pos) {
1687 2809 9886 if (new_pos == t) {
1716 211 11110 if (!p_state->start_document) {
1722 197 11124 if (!chunk) {
1725 151 46 if (p_state->buf && SvOK(p_state->buf)) {
2 149 if (p_state->buf && SvOK(p_state->buf)) {
2 0 if (p_state->buf && SvOK(p_state->buf)) {
0 2 if (p_state->buf && SvOK(p_state->buf)) {
1727 149 0 s = SvPV(p_state->buf, len);
1732 152 0 while (s < end) {
1733 2 150 if (p_state->literal_mode) {
1734 0 2 if (strEQ(p_state->literal_mode, "plaintext") ||
0 0 if (strEQ(p_state->literal_mode, "plaintext") ||
1735 0 0 strEQ(p_state->literal_mode, "xmp") ||
1736 0 0 strEQ(p_state->literal_mode, "iframe") ||
1742 0 0 if (strEQ(p_state->literal_mode, "script") ||
0 0 if (strEQ(p_state->literal_mode, "script") ||
1760 135 15 if (!p_state->strict_comment && !p_state->no_dash_dash_comment_end && *s == '<') {
132 3 if (!p_state->strict_comment && !p_state->no_dash_dash_comment_end && *s == '<') {
3 129 if (!p_state->strict_comment && !p_state->no_dash_dash_comment_end && *s == '<') {
1766 132 15 if (!p_state->strict_comment && *s == '<') {
3 129 if (!p_state->strict_comment && *s == '<') {
1768 2 1 if (s1 == end || isHNAME_FIRST(*s1) || *s1 == '/' || *s1 == '!' || *s1 == '?') {
1 1 if (s1 == end || isHNAME_FIRST(*s1) || *s1 == '/' || *s1 == '!' || *s1 == '?') {
1 0 if (s1 == end || isHNAME_FIRST(*s1) || *s1 == '/' || *s1 == '!' || *s1 == '?') {
1 0 if (s1 == end || isHNAME_FIRST(*s1) || *s1 == '/' || *s1 == '!' || *s1 == '?') {
0 1 if (s1 == end || isHNAME_FIRST(*s1) || *s1 == '/' || *s1 == '!' || *s1 == '?') {
1781 147 2 if (s < end) {
1789 60 137 if (p_state->pend_text && SvOK(p_state->pend_text))
0 60 if (p_state->pend_text && SvOK(p_state->pend_text))
0 0 if (p_state->pend_text && SvOK(p_state->pend_text))
0 0 if (p_state->pend_text && SvOK(p_state->pend_text))
1792 0 197 if (p_state->ignoring_element) {
1801 10 187 if (p_state->line)
1810 5 11119 if (p_state->utf8_mode)
1813 10893 231 if (p_state->buf && SvOK(p_state->buf)) {
104 10789 if (p_state->buf && SvOK(p_state->buf)) {
104 0 if (p_state->buf && SvOK(p_state->buf)) {
0 104 if (p_state->buf && SvOK(p_state->buf)) {
1815 10789 0 beg = SvPV(p_state->buf, len);
1819 318 17 beg = SvPV(chunk, len);
1821 211 124 if (p_state->offset == 0 && DOWARN) {
15 196 if (p_state->offset == 0 && DOWARN) {
1823 14 1 if (p_state->argspec_entity_decode &&
1 13 if (p_state->argspec_entity_decode &&
1824 0 1 !(p_state->attr_encoded && p_state->argspec_entity_decode == ARG_ATTR) &&
10 3 !(p_state->attr_encoded && p_state->argspec_entity_decode == ARG_ATTR) &&
1825 7 3 !p_state->utf8_mode && (
1826 7 0 (!utf8 && len >= 3 && strnEQ(beg, "\xEF\xBB\xBF", 3)) ||
5 2 (!utf8 && len >= 3 && strnEQ(beg, "\xEF\xBB\xBF", 3)) ||
3 5 (!utf8 && len >= 3 && strnEQ(beg, "\xEF\xBB\xBF", 3)) ||
1827 3 0 (utf8 && len >= 6 && strnEQ(beg, "\xC3\xAF\xC2\xBB\xC2\xBF", 6)) ||
2 1 (utf8 && len >= 6 && strnEQ(beg, "\xC3\xAF\xC2\xBB\xC2\xBF", 6)) ||
5 2 (utf8 && len >= 6 && strnEQ(beg, "\xC3\xAF\xC2\xBB\xC2\xBF", 6)) ||
1828 1 4 (!utf8 && probably_utf8_chunk(aTHX_ beg, len))
1834 3 12 if (utf8 && len >= 2 && strnEQ(beg, "\xFF\xFE", 2)) {
3 0 if (utf8 && len >= 2 && strnEQ(beg, "\xFF\xFE", 2)) {
0 3 if (utf8 && len >= 2 && strnEQ(beg, "\xFF\xFE", 2)) {
1837 12 3 if (!utf8 && len >= 4 &&
12 0 if (!utf8 && len >= 4 &&
11 1 if (!utf8 && len >= 4 &&
1838 1 10 (strnEQ(beg, "\x00\x00\xFE\xFF", 4) ||
1844 10 3 else if (!utf8 && len >= 2 &&
10 0 else if (!utf8 && len >= 2 &&
9 1 else if (!utf8 && len >= 2 &&
1845 1 8 (strnEQ(beg, "\xFE\xFF", 2) || strnEQ(beg, "\xFF\xFE", 2))
1853 4 11120 if (!len)
1859 10948 171 if (s == end || p_state->eof) {
8 10940 if (s == end || p_state->eof) {
1860 109 70 if (p_state->buf) {
1861 43 66 SvOK_off(p_state->buf);
1866 10784 156 if (p_state->buf) {
1868 90 10694 if (SvOK(p_state->buf)) {
90 0 if (SvOK(p_state->buf)) {
0 90 if (SvOK(p_state->buf)) {
1873 16 74 if (utf8)
1881 8 148 if (utf8)