| 108 |
$self->{change_encoding} = sub { |
$self->{change_encoding} = sub { |
| 109 |
my $self = shift; |
my $self = shift; |
| 110 |
my $charset = lc shift; |
my $charset = lc shift; |
| 111 |
|
my $token = shift; |
| 112 |
## TODO: if $charset is supported |
## TODO: if $charset is supported |
| 113 |
## TODO: normalize charset name |
## TODO: normalize charset name |
| 114 |
|
|
| 127 |
} |
} |
| 128 |
|
|
| 129 |
!!!parse-error (type => 'charset label detected:'.$self->{input_encoding}. |
!!!parse-error (type => 'charset label detected:'.$self->{input_encoding}. |
| 130 |
':'.$charset, level => 'w'); |
':'.$charset, level => 'w', token => $token); |
| 131 |
|
|
| 132 |
## Step 3 |
## Step 3 |
| 133 |
# if (can) { |
# if (can) { |
| 545 |
redo A; |
redo A; |
| 546 |
} elsif ($self->{next_char} == 0x003E) { # > |
} elsif ($self->{next_char} == 0x003E) { # > |
| 547 |
!!!cp (21); |
!!!cp (21); |
| 548 |
!!!parse-error (type => 'empty start tag'); |
!!!parse-error (type => 'empty start tag', |
| 549 |
|
line => $self->{line_prev}, |
| 550 |
|
column => $self->{column_prev}); |
| 551 |
$self->{state} = DATA_STATE; |
$self->{state} = DATA_STATE; |
| 552 |
!!!next-input-character; |
!!!next-input-character; |
| 553 |
|
|
| 558 |
redo A; |
redo A; |
| 559 |
} elsif ($self->{next_char} == 0x003F) { # ? |
} elsif ($self->{next_char} == 0x003F) { # ? |
| 560 |
!!!cp (22); |
!!!cp (22); |
| 561 |
!!!parse-error (type => 'pio'); |
!!!parse-error (type => 'pio', |
| 562 |
|
line => $self->{line_prev}, |
| 563 |
|
column => $self->{column_prev}); |
| 564 |
$self->{state} = BOGUS_COMMENT_STATE; |
$self->{state} = BOGUS_COMMENT_STATE; |
| 565 |
$self->{current_token} = {type => COMMENT_TOKEN, data => '', |
$self->{current_token} = {type => COMMENT_TOKEN, data => '', |
| 566 |
line => $self->{line_prev}, |
line => $self->{line_prev}, |
| 583 |
die "$0: $self->{content_model} in tag open"; |
die "$0: $self->{content_model} in tag open"; |
| 584 |
} |
} |
| 585 |
} elsif ($self->{state} == CLOSE_TAG_OPEN_STATE) { |
} elsif ($self->{state} == CLOSE_TAG_OPEN_STATE) { |
| 586 |
my ($l, $c) = ($self->{line_prev}, $self->{column_prev}); |
my ($l, $c) = ($self->{line_prev}, $self->{column_prev} - 1); # "<"of"</" |
| 587 |
if ($self->{content_model} & CM_LIMITED_MARKUP) { # RCDATA | CDATA |
if ($self->{content_model} & CM_LIMITED_MARKUP) { # RCDATA | CDATA |
| 588 |
if (defined $self->{last_emitted_start_tag_name}) { |
if (defined $self->{last_emitted_start_tag_name}) { |
| 589 |
|
|
| 664 |
redo A; |
redo A; |
| 665 |
} elsif ($self->{next_char} == 0x003E) { # > |
} elsif ($self->{next_char} == 0x003E) { # > |
| 666 |
!!!cp (31); |
!!!cp (31); |
| 667 |
!!!parse-error (type => 'empty end tag'); |
!!!parse-error (type => 'empty end tag', |
| 668 |
|
line => $self->{line_prev}, ## "<" in "</>" |
| 669 |
|
column => $self->{column_prev} - 1); |
| 670 |
$self->{state} = DATA_STATE; |
$self->{state} = DATA_STATE; |
| 671 |
!!!next-input-character; |
!!!next-input-character; |
| 672 |
redo A; |
redo A; |
| 1658 |
redo A; |
redo A; |
| 1659 |
} elsif ($self->{next_char} == 0x002D) { # - |
} elsif ($self->{next_char} == 0x002D) { # - |
| 1660 |
!!!cp (152); |
!!!cp (152); |
| 1661 |
!!!parse-error (type => 'dash in comment'); |
!!!parse-error (type => 'dash in comment', |
| 1662 |
|
line => $self->{line_prev}, |
| 1663 |
|
column => $self->{column_prev}); |
| 1664 |
$self->{current_token}->{data} .= '-'; # comment |
$self->{current_token}->{data} .= '-'; # comment |
| 1665 |
## Stay in the state |
## Stay in the state |
| 1666 |
!!!next-input-character; |
!!!next-input-character; |
| 1676 |
redo A; |
redo A; |
| 1677 |
} else { |
} else { |
| 1678 |
!!!cp (154); |
!!!cp (154); |
| 1679 |
!!!parse-error (type => 'dash in comment'); |
!!!parse-error (type => 'dash in comment', |
| 1680 |
|
line => $self->{line_prev}, |
| 1681 |
|
column => $self->{column_prev}); |
| 1682 |
$self->{current_token}->{data} .= '--' . chr ($self->{next_char}); # comment |
$self->{current_token}->{data} .= '--' . chr ($self->{next_char}); # comment |
| 1683 |
$self->{state} = COMMENT_STATE; |
$self->{state} = COMMENT_STATE; |
| 1684 |
!!!next-input-character; |
!!!next-input-character; |
| 2522 |
defined $token->{public_identifier} or |
defined $token->{public_identifier} or |
| 2523 |
defined $token->{system_identifier}) { |
defined $token->{system_identifier}) { |
| 2524 |
!!!cp ('t1'); |
!!!cp ('t1'); |
| 2525 |
!!!parse-error (type => 'not HTML5'); |
!!!parse-error (type => 'not HTML5', token => $token); |
| 2526 |
} elsif ($doctype_name ne 'HTML') { |
} elsif ($doctype_name ne 'HTML') { |
| 2527 |
!!!cp ('t2'); |
!!!cp ('t2'); |
| 2528 |
## ISSUE: ASCII case-insensitive? (in fact it does not matter) |
## ISSUE: ASCII case-insensitive? (in fact it does not matter) |
| 2529 |
!!!parse-error (type => 'not HTML5'); |
!!!parse-error (type => 'not HTML5', token => $token); |
| 2530 |
} else { |
} else { |
| 2531 |
!!!cp ('t3'); |
!!!cp ('t3'); |
| 2532 |
} |
} |
| 2665 |
END_OF_FILE_TOKEN, 1, |
END_OF_FILE_TOKEN, 1, |
| 2666 |
}->{$token->{type}}) { |
}->{$token->{type}}) { |
| 2667 |
!!!cp ('t14'); |
!!!cp ('t14'); |
| 2668 |
!!!parse-error (type => 'no DOCTYPE'); |
!!!parse-error (type => 'no DOCTYPE', token => $token); |
| 2669 |
$self->{document}->manakai_compat_mode ('quirks'); |
$self->{document}->manakai_compat_mode ('quirks'); |
| 2670 |
## Go to the "before html" insertion mode. |
## Go to the "before html" insertion mode. |
| 2671 |
## reprocess |
## reprocess |
| 2686 |
!!!cp ('t17'); |
!!!cp ('t17'); |
| 2687 |
} |
} |
| 2688 |
|
|
| 2689 |
!!!parse-error (type => 'no DOCTYPE'); |
!!!parse-error (type => 'no DOCTYPE', token => $token); |
| 2690 |
$self->{document}->manakai_compat_mode ('quirks'); |
$self->{document}->manakai_compat_mode ('quirks'); |
| 2691 |
## Go to the "before html" insertion mode. |
## Go to the "before html" insertion mode. |
| 2692 |
## reprocess |
## reprocess |
| 2715 |
B: { |
B: { |
| 2716 |
if ($token->{type} == DOCTYPE_TOKEN) { |
if ($token->{type} == DOCTYPE_TOKEN) { |
| 2717 |
!!!cp ('t19'); |
!!!cp ('t19'); |
| 2718 |
!!!parse-error (type => 'in html:#DOCTYPE'); |
!!!parse-error (type => 'in html:#DOCTYPE', token => $token); |
| 2719 |
## Ignore the token |
## Ignore the token |
| 2720 |
## Stay in the insertion mode. |
## Stay in the insertion mode. |
| 2721 |
!!!next-token; |
!!!next-token; |
| 3011 |
## NOTE: An end-of-file token. |
## NOTE: An end-of-file token. |
| 3012 |
if ($content_model_flag == CDATA_CONTENT_MODEL) { |
if ($content_model_flag == CDATA_CONTENT_MODEL) { |
| 3013 |
!!!cp ('t43'); |
!!!cp ('t43'); |
| 3014 |
!!!parse-error (type => 'in CDATA:#'.$token->{type}); |
!!!parse-error (type => 'in CDATA:#'.$token->{type}, token => $token); |
| 3015 |
} elsif ($content_model_flag == RCDATA_CONTENT_MODEL) { |
} elsif ($content_model_flag == RCDATA_CONTENT_MODEL) { |
| 3016 |
!!!cp ('t44'); |
!!!cp ('t44'); |
| 3017 |
!!!parse-error (type => 'in RCDATA:#'.$token->{type}); |
!!!parse-error (type => 'in RCDATA:#'.$token->{type}, token => $token); |
| 3018 |
} else { |
} else { |
| 3019 |
die "$0: $content_model_flag in parse_rcdata"; |
die "$0: $content_model_flag in parse_rcdata"; |
| 3020 |
} |
} |
| 3050 |
## Ignore the token |
## Ignore the token |
| 3051 |
} else { |
} else { |
| 3052 |
!!!cp ('t48'); |
!!!cp ('t48'); |
| 3053 |
!!!parse-error (type => 'in CDATA:#'.$token->{type}); |
!!!parse-error (type => 'in CDATA:#'.$token->{type}, token => $token); |
| 3054 |
## ISSUE: And ignore? |
## ISSUE: And ignore? |
| 3055 |
## TODO: mark as "already executed" |
## TODO: mark as "already executed" |
| 3056 |
} |
} |
| 3078 |
my $open_tables = [[$self->{open_elements}->[0]->[0]]]; |
my $open_tables = [[$self->{open_elements}->[0]->[0]]]; |
| 3079 |
|
|
| 3080 |
my $formatting_end_tag = sub { |
my $formatting_end_tag = sub { |
| 3081 |
my $tag_name = shift; |
my $end_tag_token = shift; |
| 3082 |
|
my $tag_name = $end_tag_token->{tag_name}; |
| 3083 |
|
|
| 3084 |
## NOTE: The adoption agency algorithm (AAA). |
## NOTE: The adoption agency algorithm (AAA). |
| 3085 |
|
|
| 3100 |
} # AFE |
} # AFE |
| 3101 |
unless (defined $formatting_element) { |
unless (defined $formatting_element) { |
| 3102 |
!!!cp ('t53'); |
!!!cp ('t53'); |
| 3103 |
!!!parse-error (type => 'unmatched end tag:'.$tag_name); |
!!!parse-error (type => 'unmatched end tag:'.$tag_name, token => $end_tag_token); |
| 3104 |
## Ignore the token |
## Ignore the token |
| 3105 |
!!!next-token; |
!!!next-token; |
| 3106 |
return; |
return; |
| 3117 |
last INSCOPE; |
last INSCOPE; |
| 3118 |
} else { # in open elements but not in scope |
} else { # in open elements but not in scope |
| 3119 |
!!!cp ('t55'); |
!!!cp ('t55'); |
| 3120 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, |
| 3121 |
|
token => $end_tag_token); |
| 3122 |
## Ignore the token |
## Ignore the token |
| 3123 |
!!!next-token; |
!!!next-token; |
| 3124 |
return; |
return; |
| 3133 |
} # INSCOPE |
} # INSCOPE |
| 3134 |
unless (defined $formatting_element_i_in_open) { |
unless (defined $formatting_element_i_in_open) { |
| 3135 |
!!!cp ('t57'); |
!!!cp ('t57'); |
| 3136 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, |
| 3137 |
|
token => $end_tag_token); |
| 3138 |
pop @$active_formatting_elements; # $formatting_element |
pop @$active_formatting_elements; # $formatting_element |
| 3139 |
!!!next-token; ## TODO: ok? |
!!!next-token; ## TODO: ok? |
| 3140 |
return; |
return; |
| 3141 |
} |
} |
| 3142 |
if (not $self->{open_elements}->[-1]->[0] eq $formatting_element->[0]) { |
if (not $self->{open_elements}->[-1]->[0] eq $formatting_element->[0]) { |
| 3143 |
!!!cp ('t58'); |
!!!cp ('t58'); |
| 3144 |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1]); |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1], |
| 3145 |
|
token => $end_tag_token); |
| 3146 |
} |
} |
| 3147 |
|
|
| 3148 |
## Step 2 |
## Step 2 |
| 3353 |
B: { |
B: { |
| 3354 |
if ($token->{type} == DOCTYPE_TOKEN) { |
if ($token->{type} == DOCTYPE_TOKEN) { |
| 3355 |
!!!cp ('t73'); |
!!!cp ('t73'); |
| 3356 |
!!!parse-error (type => 'DOCTYPE in the middle'); |
!!!parse-error (type => 'DOCTYPE in the middle', token => $token); |
| 3357 |
## Ignore the token |
## Ignore the token |
| 3358 |
## Stay in the phase |
## Stay in the phase |
| 3359 |
!!!next-token; |
!!!next-token; |
| 3362 |
$token->{tag_name} eq 'html') { |
$token->{tag_name} eq 'html') { |
| 3363 |
if ($self->{insertion_mode} == AFTER_HTML_BODY_IM) { |
if ($self->{insertion_mode} == AFTER_HTML_BODY_IM) { |
| 3364 |
!!!cp ('t79'); |
!!!cp ('t79'); |
| 3365 |
!!!parse-error (type => 'after html:html'); |
!!!parse-error (type => 'after html:html', token => $token); |
| 3366 |
$self->{insertion_mode} = AFTER_BODY_IM; |
$self->{insertion_mode} = AFTER_BODY_IM; |
| 3367 |
} elsif ($self->{insertion_mode} == AFTER_HTML_FRAMESET_IM) { |
} elsif ($self->{insertion_mode} == AFTER_HTML_FRAMESET_IM) { |
| 3368 |
!!!cp ('t80'); |
!!!cp ('t80'); |
| 3369 |
!!!parse-error (type => 'after html:html'); |
!!!parse-error (type => 'after html:html', token => $token); |
| 3370 |
$self->{insertion_mode} = AFTER_FRAMESET_IM; |
$self->{insertion_mode} = AFTER_FRAMESET_IM; |
| 3371 |
} else { |
} else { |
| 3372 |
!!!cp ('t81'); |
!!!cp ('t81'); |
| 3373 |
} |
} |
| 3374 |
|
|
| 3375 |
!!!cp ('t82'); |
!!!cp ('t82'); |
| 3376 |
!!!parse-error (type => 'not first start tag'); |
!!!parse-error (type => 'not first start tag', token => $token); |
| 3377 |
my $top_el = $self->{open_elements}->[0]->[0]; |
my $top_el = $self->{open_elements}->[0]->[0]; |
| 3378 |
for my $attr_name (keys %{$token->{attributes}}) { |
for my $attr_name (keys %{$token->{attributes}}) { |
| 3379 |
unless ($top_el->has_attribute_ns (undef, $attr_name)) { |
unless ($top_el->has_attribute_ns (undef, $attr_name)) { |
| 3433 |
!!!cp ('t90'); |
!!!cp ('t90'); |
| 3434 |
## As if </noscript> |
## As if </noscript> |
| 3435 |
pop @{$self->{open_elements}}; |
pop @{$self->{open_elements}}; |
| 3436 |
!!!parse-error (type => 'in noscript:#character'); |
!!!parse-error (type => 'in noscript:#character', token => $token); |
| 3437 |
|
|
| 3438 |
## Reprocess in the "in head" insertion mode... |
## Reprocess in the "in head" insertion mode... |
| 3439 |
## As if </head> |
## As if </head> |
| 3470 |
# |
# |
| 3471 |
} else { |
} else { |
| 3472 |
!!!cp ('t95'); |
!!!cp ('t95'); |
| 3473 |
!!!parse-error (type => 'in head:head'); # or in head noscript |
!!!parse-error (type => 'in head:head', token => $token); # or in head noscript |
| 3474 |
## Ignore the token |
## Ignore the token |
| 3475 |
!!!next-token; |
!!!next-token; |
| 3476 |
redo B; |
redo B; |
| 3493 |
!!!cp ('t98'); |
!!!cp ('t98'); |
| 3494 |
## As if </noscript> |
## As if </noscript> |
| 3495 |
pop @{$self->{open_elements}}; |
pop @{$self->{open_elements}}; |
| 3496 |
!!!parse-error (type => 'in noscript:base'); |
!!!parse-error (type => 'in noscript:base', token => $token); |
| 3497 |
|
|
| 3498 |
$self->{insertion_mode} = IN_HEAD_IM; |
$self->{insertion_mode} = IN_HEAD_IM; |
| 3499 |
## Reprocess in the "in head" insertion mode... |
## Reprocess in the "in head" insertion mode... |
| 3504 |
## NOTE: There is a "as if in head" code clone. |
## NOTE: There is a "as if in head" code clone. |
| 3505 |
if ($self->{insertion_mode} == AFTER_HEAD_IM) { |
if ($self->{insertion_mode} == AFTER_HEAD_IM) { |
| 3506 |
!!!cp ('t100'); |
!!!cp ('t100'); |
| 3507 |
!!!parse-error (type => 'after head:'.$token->{tag_name}); |
!!!parse-error (type => 'after head:'.$token->{tag_name}, token => $token); |
| 3508 |
push @{$self->{open_elements}}, [$self->{head_element}, 'head']; |
push @{$self->{open_elements}}, [$self->{head_element}, 'head']; |
| 3509 |
} else { |
} else { |
| 3510 |
!!!cp ('t101'); |
!!!cp ('t101'); |
| 3519 |
## NOTE: There is a "as if in head" code clone. |
## NOTE: There is a "as if in head" code clone. |
| 3520 |
if ($self->{insertion_mode} == AFTER_HEAD_IM) { |
if ($self->{insertion_mode} == AFTER_HEAD_IM) { |
| 3521 |
!!!cp ('t102'); |
!!!cp ('t102'); |
| 3522 |
!!!parse-error (type => 'after head:'.$token->{tag_name}); |
!!!parse-error (type => 'after head:'.$token->{tag_name}, token => $token); |
| 3523 |
push @{$self->{open_elements}}, [$self->{head_element}, 'head']; |
push @{$self->{open_elements}}, [$self->{head_element}, 'head']; |
| 3524 |
} else { |
} else { |
| 3525 |
!!!cp ('t103'); |
!!!cp ('t103'); |
| 3534 |
## NOTE: There is a "as if in head" code clone. |
## NOTE: There is a "as if in head" code clone. |
| 3535 |
if ($self->{insertion_mode} == AFTER_HEAD_IM) { |
if ($self->{insertion_mode} == AFTER_HEAD_IM) { |
| 3536 |
!!!cp ('t104'); |
!!!cp ('t104'); |
| 3537 |
!!!parse-error (type => 'after head:'.$token->{tag_name}); |
!!!parse-error (type => 'after head:'.$token->{tag_name}, token => $token); |
| 3538 |
push @{$self->{open_elements}}, [$self->{head_element}, 'head']; |
push @{$self->{open_elements}}, [$self->{head_element}, 'head']; |
| 3539 |
} else { |
} else { |
| 3540 |
!!!cp ('t105'); |
!!!cp ('t105'); |
| 3546 |
if ($token->{attributes}->{charset}) { ## TODO: And if supported |
if ($token->{attributes}->{charset}) { ## TODO: And if supported |
| 3547 |
!!!cp ('t106'); |
!!!cp ('t106'); |
| 3548 |
$self->{change_encoding} |
$self->{change_encoding} |
| 3549 |
->($self, $token->{attributes}->{charset}->{value}); |
->($self, $token->{attributes}->{charset}->{value}, |
| 3550 |
|
$token); |
| 3551 |
|
|
| 3552 |
$meta_el->[0]->get_attribute_node_ns (undef, 'charset') |
$meta_el->[0]->get_attribute_node_ns (undef, 'charset') |
| 3553 |
->set_user_data (manakai_has_reference => |
->set_user_data (manakai_has_reference => |
| 3562 |
([^"'\x09-\x0D\x20][^\x09-\x0D\x20]*))/x) { |
([^"'\x09-\x0D\x20][^\x09-\x0D\x20]*))/x) { |
| 3563 |
!!!cp ('t107'); |
!!!cp ('t107'); |
| 3564 |
$self->{change_encoding} |
$self->{change_encoding} |
| 3565 |
->($self, defined $1 ? $1 : defined $2 ? $2 : $3); |
->($self, defined $1 ? $1 : defined $2 ? $2 : $3, |
| 3566 |
|
$token); |
| 3567 |
$meta_el->[0]->get_attribute_node_ns (undef, 'content') |
$meta_el->[0]->get_attribute_node_ns (undef, 'content') |
| 3568 |
->set_user_data (manakai_has_reference => |
->set_user_data (manakai_has_reference => |
| 3569 |
$token->{attributes}->{content} |
$token->{attributes}->{content} |
| 3598 |
!!!cp ('t111'); |
!!!cp ('t111'); |
| 3599 |
## As if </noscript> |
## As if </noscript> |
| 3600 |
pop @{$self->{open_elements}}; |
pop @{$self->{open_elements}}; |
| 3601 |
!!!parse-error (type => 'in noscript:title'); |
!!!parse-error (type => 'in noscript:title', token => $token); |
| 3602 |
|
|
| 3603 |
$self->{insertion_mode} = IN_HEAD_IM; |
$self->{insertion_mode} = IN_HEAD_IM; |
| 3604 |
## Reprocess in the "in head" insertion mode... |
## Reprocess in the "in head" insertion mode... |
| 3605 |
} elsif ($self->{insertion_mode} == AFTER_HEAD_IM) { |
} elsif ($self->{insertion_mode} == AFTER_HEAD_IM) { |
| 3606 |
!!!cp ('t112'); |
!!!cp ('t112'); |
| 3607 |
!!!parse-error (type => 'after head:'.$token->{tag_name}); |
!!!parse-error (type => 'after head:'.$token->{tag_name}, token => $token); |
| 3608 |
push @{$self->{open_elements}}, [$self->{head_element}, 'head']; |
push @{$self->{open_elements}}, [$self->{head_element}, 'head']; |
| 3609 |
} else { |
} else { |
| 3610 |
!!!cp ('t113'); |
!!!cp ('t113'); |
| 3623 |
## NOTE: There is a "as if in head" code clone. |
## NOTE: There is a "as if in head" code clone. |
| 3624 |
if ($self->{insertion_mode} == AFTER_HEAD_IM) { |
if ($self->{insertion_mode} == AFTER_HEAD_IM) { |
| 3625 |
!!!cp ('t114'); |
!!!cp ('t114'); |
| 3626 |
!!!parse-error (type => 'after head:'.$token->{tag_name}); |
!!!parse-error (type => 'after head:'.$token->{tag_name}, token => $token); |
| 3627 |
push @{$self->{open_elements}}, [$self->{head_element}, 'head']; |
push @{$self->{open_elements}}, [$self->{head_element}, 'head']; |
| 3628 |
} else { |
} else { |
| 3629 |
!!!cp ('t115'); |
!!!cp ('t115'); |
| 3642 |
redo B; |
redo B; |
| 3643 |
} elsif ($self->{insertion_mode} == IN_HEAD_NOSCRIPT_IM) { |
} elsif ($self->{insertion_mode} == IN_HEAD_NOSCRIPT_IM) { |
| 3644 |
!!!cp ('t117'); |
!!!cp ('t117'); |
| 3645 |
!!!parse-error (type => 'in noscript:noscript'); |
!!!parse-error (type => 'in noscript:noscript', token => $token); |
| 3646 |
## Ignore the token |
## Ignore the token |
| 3647 |
!!!next-token; |
!!!next-token; |
| 3648 |
redo B; |
redo B; |
| 3655 |
!!!cp ('t119'); |
!!!cp ('t119'); |
| 3656 |
## As if </noscript> |
## As if </noscript> |
| 3657 |
pop @{$self->{open_elements}}; |
pop @{$self->{open_elements}}; |
| 3658 |
!!!parse-error (type => 'in noscript:script'); |
!!!parse-error (type => 'in noscript:script', token => $token); |
| 3659 |
|
|
| 3660 |
$self->{insertion_mode} = IN_HEAD_IM; |
$self->{insertion_mode} = IN_HEAD_IM; |
| 3661 |
## Reprocess in the "in head" insertion mode... |
## Reprocess in the "in head" insertion mode... |
| 3662 |
} elsif ($self->{insertion_mode} == AFTER_HEAD_IM) { |
} elsif ($self->{insertion_mode} == AFTER_HEAD_IM) { |
| 3663 |
!!!cp ('t120'); |
!!!cp ('t120'); |
| 3664 |
!!!parse-error (type => 'after head:'.$token->{tag_name}); |
!!!parse-error (type => 'after head:'.$token->{tag_name}, token => $token); |
| 3665 |
push @{$self->{open_elements}}, [$self->{head_element}, 'head']; |
push @{$self->{open_elements}}, [$self->{head_element}, 'head']; |
| 3666 |
} else { |
} else { |
| 3667 |
!!!cp ('t121'); |
!!!cp ('t121'); |
| 3678 |
!!!cp ('t122'); |
!!!cp ('t122'); |
| 3679 |
## As if </noscript> |
## As if </noscript> |
| 3680 |
pop @{$self->{open_elements}}; |
pop @{$self->{open_elements}}; |
| 3681 |
!!!parse-error (type => 'in noscript:'.$token->{tag_name}); |
!!!parse-error (type => 'in noscript:'.$token->{tag_name}, token => $token); |
| 3682 |
|
|
| 3683 |
## Reprocess in the "in head" insertion mode... |
## Reprocess in the "in head" insertion mode... |
| 3684 |
## As if </head> |
## As if </head> |
| 3716 |
!!!cp ('t129'); |
!!!cp ('t129'); |
| 3717 |
## As if </noscript> |
## As if </noscript> |
| 3718 |
pop @{$self->{open_elements}}; |
pop @{$self->{open_elements}}; |
| 3719 |
!!!parse-error (type => 'in noscript:/'.$token->{tag_name}); |
!!!parse-error (type => 'in noscript:/'.$token->{tag_name}, token => $token); |
| 3720 |
|
|
| 3721 |
## Reprocess in the "in head" insertion mode... |
## Reprocess in the "in head" insertion mode... |
| 3722 |
## As if </head> |
## As if </head> |
| 3757 |
!!!cp ('t133'); |
!!!cp ('t133'); |
| 3758 |
## As if </noscript> |
## As if </noscript> |
| 3759 |
pop @{$self->{open_elements}}; |
pop @{$self->{open_elements}}; |
| 3760 |
!!!parse-error (type => 'in noscript:/head'); |
!!!parse-error (type => 'in noscript:/head', token => $token); |
| 3761 |
|
|
| 3762 |
## Reprocess in the "in head" insertion mode... |
## Reprocess in the "in head" insertion mode... |
| 3763 |
pop @{$self->{open_elements}}; |
pop @{$self->{open_elements}}; |
| 3783 |
redo B; |
redo B; |
| 3784 |
} elsif ($self->{insertion_mode} == BEFORE_HEAD_IM) { |
} elsif ($self->{insertion_mode} == BEFORE_HEAD_IM) { |
| 3785 |
!!!cp ('t137'); |
!!!cp ('t137'); |
| 3786 |
!!!parse-error (type => 'unmatched end tag:noscript'); |
!!!parse-error (type => 'unmatched end tag:noscript', token => $token); |
| 3787 |
## Ignore the token ## ISSUE: An issue in the spec. |
## Ignore the token ## ISSUE: An issue in the spec. |
| 3788 |
!!!next-token; |
!!!next-token; |
| 3789 |
redo B; |
redo B; |
| 3805 |
## Reprocess in the "in head" insertion mode... |
## Reprocess in the "in head" insertion mode... |
| 3806 |
} elsif ($self->{insertion_mode} == IN_HEAD_NOSCRIPT_IM) { |
} elsif ($self->{insertion_mode} == IN_HEAD_NOSCRIPT_IM) { |
| 3807 |
!!!cp ('t140'); |
!!!cp ('t140'); |
| 3808 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 3809 |
## Ignore the token |
## Ignore the token |
| 3810 |
!!!next-token; |
!!!next-token; |
| 3811 |
redo B; |
redo B; |
| 3837 |
# |
# |
| 3838 |
} else { |
} else { |
| 3839 |
!!!cp ('t145'); |
!!!cp ('t145'); |
| 3840 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 3841 |
## Ignore the token |
## Ignore the token |
| 3842 |
!!!next-token; |
!!!next-token; |
| 3843 |
redo B; |
redo B; |
| 3848 |
!!!cp ('t146'); |
!!!cp ('t146'); |
| 3849 |
## As if </noscript> |
## As if </noscript> |
| 3850 |
pop @{$self->{open_elements}}; |
pop @{$self->{open_elements}}; |
| 3851 |
!!!parse-error (type => 'in noscript:/'.$token->{tag_name}); |
!!!parse-error (type => 'in noscript:/'.$token->{tag_name}, token => $token); |
| 3852 |
|
|
| 3853 |
## Reprocess in the "in head" insertion mode... |
## Reprocess in the "in head" insertion mode... |
| 3854 |
## As if </head> |
## As if </head> |
| 3864 |
} elsif ($self->{insertion_mode} == BEFORE_HEAD_IM) { |
} elsif ($self->{insertion_mode} == BEFORE_HEAD_IM) { |
| 3865 |
## ISSUE: This case cannot be reached? |
## ISSUE: This case cannot be reached? |
| 3866 |
!!!cp ('t148'); |
!!!cp ('t148'); |
| 3867 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 3868 |
## Ignore the token ## ISSUE: An issue in the spec. |
## Ignore the token ## ISSUE: An issue in the spec. |
| 3869 |
!!!next-token; |
!!!next-token; |
| 3870 |
redo B; |
redo B; |
| 3908 |
} elsif ($self->{insertion_mode} == IN_HEAD_NOSCRIPT_IM) { |
} elsif ($self->{insertion_mode} == IN_HEAD_NOSCRIPT_IM) { |
| 3909 |
!!!cp ('t149.3'); |
!!!cp ('t149.3'); |
| 3910 |
|
|
| 3911 |
!!!parse-error (type => 'in noscript:#eof'); |
!!!parse-error (type => 'in noscript:#eof', token => $token); |
| 3912 |
|
|
| 3913 |
## As if </noscript> |
## As if </noscript> |
| 3914 |
pop @{$self->{open_elements}}; |
pop @{$self->{open_elements}}; |
| 3960 |
|
|
| 3961 |
## Close the cell |
## Close the cell |
| 3962 |
!!!back-token; # <?> |
!!!back-token; # <?> |
| 3963 |
$token = {type => END_TAG_TOKEN, tag_name => $node->[1]}; |
$token = {type => END_TAG_TOKEN, tag_name => $node->[1], |
| 3964 |
|
line => $token->{line}, |
| 3965 |
|
column => $token->{column}}; |
| 3966 |
redo B; |
redo B; |
| 3967 |
} elsif ({ |
} elsif ({ |
| 3968 |
table => 1, html => 1, |
table => 1, html => 1, |
| 3975 |
|
|
| 3976 |
!!!cp ('t153'); |
!!!cp ('t153'); |
| 3977 |
!!!parse-error (type => 'start tag not allowed', |
!!!parse-error (type => 'start tag not allowed', |
| 3978 |
value => $token->{tag_name}); |
value => $token->{tag_name}, token => $token); |
| 3979 |
## Ignore the token |
## Ignore the token |
| 3980 |
!!!next-token; |
!!!next-token; |
| 3981 |
redo B; |
redo B; |
| 3982 |
} elsif ($self->{insertion_mode} == IN_CAPTION_IM) { |
} elsif ($self->{insertion_mode} == IN_CAPTION_IM) { |
| 3983 |
!!!parse-error (type => 'not closed:caption'); |
!!!parse-error (type => 'not closed:caption', token => $token); |
| 3984 |
|
|
| 3985 |
## NOTE: As if </caption>. |
## NOTE: As if </caption>. |
| 3986 |
## have a table element in table scope |
## have a table element in table scope |
| 4002 |
|
|
| 4003 |
!!!cp ('t157'); |
!!!cp ('t157'); |
| 4004 |
!!!parse-error (type => 'start tag not allowed', |
!!!parse-error (type => 'start tag not allowed', |
| 4005 |
value => $token->{tag_name}); |
value => $token->{tag_name}, token => $token); |
| 4006 |
## Ignore the token |
## Ignore the token |
| 4007 |
!!!next-token; |
!!!next-token; |
| 4008 |
redo B; |
redo B; |
| 4018 |
|
|
| 4019 |
if ($self->{open_elements}->[-1]->[1] ne 'caption') { |
if ($self->{open_elements}->[-1]->[1] ne 'caption') { |
| 4020 |
!!!cp ('t159'); |
!!!cp ('t159'); |
| 4021 |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1]); |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1], token => $token); |
| 4022 |
} else { |
} else { |
| 4023 |
!!!cp ('t160'); |
!!!cp ('t160'); |
| 4024 |
} |
} |
| 4059 |
} # INSCOPE |
} # INSCOPE |
| 4060 |
unless (defined $i) { |
unless (defined $i) { |
| 4061 |
!!!cp ('t165'); |
!!!cp ('t165'); |
| 4062 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 4063 |
## Ignore the token |
## Ignore the token |
| 4064 |
!!!next-token; |
!!!next-token; |
| 4065 |
redo B; |
redo B; |
| 4075 |
|
|
| 4076 |
if ($self->{open_elements}->[-1]->[1] ne $token->{tag_name}) { |
if ($self->{open_elements}->[-1]->[1] ne $token->{tag_name}) { |
| 4077 |
!!!cp ('t167'); |
!!!cp ('t167'); |
| 4078 |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1]); |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1], token => $token); |
| 4079 |
} else { |
} else { |
| 4080 |
!!!cp ('t168'); |
!!!cp ('t168'); |
| 4081 |
} |
} |
| 4090 |
redo B; |
redo B; |
| 4091 |
} elsif ($self->{insertion_mode} == IN_CAPTION_IM) { |
} elsif ($self->{insertion_mode} == IN_CAPTION_IM) { |
| 4092 |
!!!cp ('t169'); |
!!!cp ('t169'); |
| 4093 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 4094 |
## Ignore the token |
## Ignore the token |
| 4095 |
!!!next-token; |
!!!next-token; |
| 4096 |
redo B; |
redo B; |
| 4119 |
|
|
| 4120 |
!!!cp ('t173'); |
!!!cp ('t173'); |
| 4121 |
!!!parse-error (type => 'unmatched end tag', |
!!!parse-error (type => 'unmatched end tag', |
| 4122 |
value => $token->{tag_name}); |
value => $token->{tag_name}, token => $token); |
| 4123 |
## Ignore the token |
## Ignore the token |
| 4124 |
!!!next-token; |
!!!next-token; |
| 4125 |
redo B; |
redo B; |
| 4135 |
|
|
| 4136 |
if ($self->{open_elements}->[-1]->[1] ne 'caption') { |
if ($self->{open_elements}->[-1]->[1] ne 'caption') { |
| 4137 |
!!!cp ('t175'); |
!!!cp ('t175'); |
| 4138 |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1]); |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1], token => $token); |
| 4139 |
} else { |
} else { |
| 4140 |
!!!cp ('t176'); |
!!!cp ('t176'); |
| 4141 |
} |
} |
| 4150 |
redo B; |
redo B; |
| 4151 |
} elsif ($self->{insertion_mode} == IN_CELL_IM) { |
} elsif ($self->{insertion_mode} == IN_CELL_IM) { |
| 4152 |
!!!cp ('t177'); |
!!!cp ('t177'); |
| 4153 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 4154 |
## Ignore the token |
## Ignore the token |
| 4155 |
!!!next-token; |
!!!next-token; |
| 4156 |
redo B; |
redo B; |
| 4175 |
|
|
| 4176 |
## Close the cell |
## Close the cell |
| 4177 |
!!!back-token; # </?> |
!!!back-token; # </?> |
| 4178 |
$token = {type => END_TAG_TOKEN, tag_name => $tn}; |
$token = {type => END_TAG_TOKEN, tag_name => $tn, |
| 4179 |
|
line => $token->{line}, |
| 4180 |
|
column => $token->{column}}; |
| 4181 |
redo B; |
redo B; |
| 4182 |
} elsif ($node->[1] eq 'td' or $node->[1] eq 'th') { |
} elsif ($node->[1] eq 'td' or $node->[1] eq 'th') { |
| 4183 |
!!!cp ('t180'); |
!!!cp ('t180'); |
| 4195 |
|
|
| 4196 |
!!!cp ('t182'); |
!!!cp ('t182'); |
| 4197 |
!!!parse-error (type => 'unmatched end tag', |
!!!parse-error (type => 'unmatched end tag', |
| 4198 |
value => $token->{tag_name}); |
value => $token->{tag_name}, token => $token); |
| 4199 |
## Ignore the token |
## Ignore the token |
| 4200 |
!!!next-token; |
!!!next-token; |
| 4201 |
redo B; |
redo B; |
| 4202 |
} # INSCOPE |
} # INSCOPE |
| 4203 |
} elsif ($token->{tag_name} eq 'table' and |
} elsif ($token->{tag_name} eq 'table' and |
| 4204 |
$self->{insertion_mode} == IN_CAPTION_IM) { |
$self->{insertion_mode} == IN_CAPTION_IM) { |
| 4205 |
!!!parse-error (type => 'not closed:caption'); |
!!!parse-error (type => 'not closed:caption', token => $token); |
| 4206 |
|
|
| 4207 |
## As if </caption> |
## As if </caption> |
| 4208 |
## have a table element in table scope |
## have a table element in table scope |
| 4222 |
} # INSCOPE |
} # INSCOPE |
| 4223 |
unless (defined $i) { |
unless (defined $i) { |
| 4224 |
!!!cp ('t186'); |
!!!cp ('t186'); |
| 4225 |
!!!parse-error (type => 'unmatched end tag:caption'); |
!!!parse-error (type => 'unmatched end tag:caption', token => $token); |
| 4226 |
## Ignore the token |
## Ignore the token |
| 4227 |
!!!next-token; |
!!!next-token; |
| 4228 |
redo B; |
redo B; |
| 4238 |
|
|
| 4239 |
if ($self->{open_elements}->[-1]->[1] ne 'caption') { |
if ($self->{open_elements}->[-1]->[1] ne 'caption') { |
| 4240 |
!!!cp ('t188'); |
!!!cp ('t188'); |
| 4241 |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1]); |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1], token => $token); |
| 4242 |
} else { |
} else { |
| 4243 |
!!!cp ('t189'); |
!!!cp ('t189'); |
| 4244 |
} |
} |
| 4256 |
}->{$token->{tag_name}}) { |
}->{$token->{tag_name}}) { |
| 4257 |
if ($self->{insertion_mode} & BODY_TABLE_IMS) { |
if ($self->{insertion_mode} & BODY_TABLE_IMS) { |
| 4258 |
!!!cp ('t190'); |
!!!cp ('t190'); |
| 4259 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 4260 |
## Ignore the token |
## Ignore the token |
| 4261 |
!!!next-token; |
!!!next-token; |
| 4262 |
redo B; |
redo B; |
| 4270 |
}->{$token->{tag_name}} and |
}->{$token->{tag_name}} and |
| 4271 |
$self->{insertion_mode} == IN_CAPTION_IM) { |
$self->{insertion_mode} == IN_CAPTION_IM) { |
| 4272 |
!!!cp ('t192'); |
!!!cp ('t192'); |
| 4273 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 4274 |
## Ignore the token |
## Ignore the token |
| 4275 |
!!!next-token; |
!!!next-token; |
| 4276 |
redo B; |
redo B; |
| 4285 |
th => 1, thead => 1, tr => 1, body => 1, html => 1, |
th => 1, thead => 1, tr => 1, body => 1, html => 1, |
| 4286 |
}->{$entry->[1]}) { |
}->{$entry->[1]}) { |
| 4287 |
!!!cp ('t75'); |
!!!cp ('t75'); |
| 4288 |
!!!parse-error (type => 'in body:#eof'); |
!!!parse-error (type => 'in body:#eof', token => $token); |
| 4289 |
last; |
last; |
| 4290 |
} |
} |
| 4291 |
} |
} |
| 4313 |
} |
} |
| 4314 |
} |
} |
| 4315 |
|
|
| 4316 |
!!!parse-error (type => 'in table:#character'); |
!!!parse-error (type => 'in table:#character', token => $token); |
| 4317 |
|
|
| 4318 |
## As if in body, but insert into foster parent element |
## As if in body, but insert into foster parent element |
| 4319 |
## ISSUE: Spec says that "whenever a node would be inserted |
## ISSUE: Spec says that "whenever a node would be inserted |
| 4387 |
if ($self->{insertion_mode} == IN_TABLE_BODY_IM) { |
if ($self->{insertion_mode} == IN_TABLE_BODY_IM) { |
| 4388 |
unless ($token->{tag_name} eq 'tr') { |
unless ($token->{tag_name} eq 'tr') { |
| 4389 |
!!!cp ('t202'); |
!!!cp ('t202'); |
| 4390 |
!!!parse-error (type => 'missing start tag:tr'); |
!!!parse-error (type => 'missing start tag:tr', token => $token); |
| 4391 |
} |
} |
| 4392 |
|
|
| 4393 |
## Clear back to table body context |
## Clear back to table body context |
| 4457 |
unless (defined $i) { |
unless (defined $i) { |
| 4458 |
!!!cp ('t210'); |
!!!cp ('t210'); |
| 4459 |
## TODO: This type is wrong. |
## TODO: This type is wrong. |
| 4460 |
!!!parse-error (type => 'unmacthed end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmacthed end tag:'.$token->{tag_name}, token => $token); |
| 4461 |
## Ignore the token |
## Ignore the token |
| 4462 |
!!!next-token; |
!!!next-token; |
| 4463 |
redo B; |
redo B; |
| 4505 |
unless (defined $i) { |
unless (defined $i) { |
| 4506 |
!!!cp ('t216'); |
!!!cp ('t216'); |
| 4507 |
## TODO: This erorr type ios wrong. |
## TODO: This erorr type ios wrong. |
| 4508 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 4509 |
## Ignore the token |
## Ignore the token |
| 4510 |
!!!next-token; |
!!!next-token; |
| 4511 |
redo B; |
redo B; |
| 4577 |
die "$0: in table: <>: $token->{tag_name}"; |
die "$0: in table: <>: $token->{tag_name}"; |
| 4578 |
} |
} |
| 4579 |
} elsif ($token->{tag_name} eq 'table') { |
} elsif ($token->{tag_name} eq 'table') { |
| 4580 |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1]); |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1], token => $token); |
| 4581 |
|
|
| 4582 |
## As if </table> |
## As if </table> |
| 4583 |
## have a table element in table scope |
## have a table element in table scope |
| 4599 |
unless (defined $i) { |
unless (defined $i) { |
| 4600 |
!!!cp ('t223'); |
!!!cp ('t223'); |
| 4601 |
## TODO: The following is wrong, maybe. |
## TODO: The following is wrong, maybe. |
| 4602 |
!!!parse-error (type => 'unmatched end tag:table'); |
!!!parse-error (type => 'unmatched end tag:table', token => $token); |
| 4603 |
## Ignore tokens </table><table> |
## Ignore tokens </table><table> |
| 4604 |
!!!next-token; |
!!!next-token; |
| 4605 |
redo B; |
redo B; |
| 4617 |
if ($self->{open_elements}->[-1]->[1] ne 'table') { |
if ($self->{open_elements}->[-1]->[1] ne 'table') { |
| 4618 |
!!!cp ('t225'); |
!!!cp ('t225'); |
| 4619 |
## ISSUE: Can this case be reached? |
## ISSUE: Can this case be reached? |
| 4620 |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1]); |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1], token => $token); |
| 4621 |
} else { |
} else { |
| 4622 |
!!!cp ('t226'); |
!!!cp ('t226'); |
| 4623 |
} |
} |
| 4655 |
my $type = lc $token->{attributes}->{type}->{value}; |
my $type = lc $token->{attributes}->{type}->{value}; |
| 4656 |
if ($type eq 'hidden') { |
if ($type eq 'hidden') { |
| 4657 |
!!!cp ('t227.3'); |
!!!cp ('t227.3'); |
| 4658 |
!!!parse-error (type => 'in table:'.$token->{tag_name}); |
!!!parse-error (type => 'in table:'.$token->{tag_name}, token => $token); |
| 4659 |
|
|
| 4660 |
!!!insert-element ($token->{tag_name}, $token->{attributes}); |
!!!insert-element ($token->{tag_name}, $token->{attributes}); |
| 4661 |
|
|
| 4682 |
# |
# |
| 4683 |
} |
} |
| 4684 |
|
|
| 4685 |
!!!parse-error (type => 'in table:'.$token->{tag_name}); |
!!!parse-error (type => 'in table:'.$token->{tag_name}, token => $token); |
| 4686 |
|
|
| 4687 |
$insert = $insert_to_foster; |
$insert = $insert_to_foster; |
| 4688 |
# |
# |
| 4706 |
} # INSCOPE |
} # INSCOPE |
| 4707 |
unless (defined $i) { |
unless (defined $i) { |
| 4708 |
!!!cp ('t230'); |
!!!cp ('t230'); |
| 4709 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 4710 |
## Ignore the token |
## Ignore the token |
| 4711 |
!!!next-token; |
!!!next-token; |
| 4712 |
redo B; |
redo B; |
| 4748 |
unless (defined $i) { |
unless (defined $i) { |
| 4749 |
!!!cp ('t235'); |
!!!cp ('t235'); |
| 4750 |
## TODO: The following is wrong. |
## TODO: The following is wrong. |
| 4751 |
!!!parse-error (type => 'unmatched end tag:'.$token->{type}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{type}, token => $token); |
| 4752 |
## Ignore the token |
## Ignore the token |
| 4753 |
!!!next-token; |
!!!next-token; |
| 4754 |
redo B; |
redo B; |
| 4788 |
} # INSCOPE |
} # INSCOPE |
| 4789 |
unless (defined $i) { |
unless (defined $i) { |
| 4790 |
!!!cp ('t239'); |
!!!cp ('t239'); |
| 4791 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 4792 |
## Ignore the token |
## Ignore the token |
| 4793 |
!!!next-token; |
!!!next-token; |
| 4794 |
redo B; |
redo B; |
| 4836 |
} # INSCOPE |
} # INSCOPE |
| 4837 |
unless (defined $i) { |
unless (defined $i) { |
| 4838 |
!!!cp ('t243'); |
!!!cp ('t243'); |
| 4839 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 4840 |
## Ignore the token |
## Ignore the token |
| 4841 |
!!!next-token; |
!!!next-token; |
| 4842 |
redo B; |
redo B; |
| 4871 |
} # INSCOPE |
} # INSCOPE |
| 4872 |
unless (defined $i) { |
unless (defined $i) { |
| 4873 |
!!!cp ('t249'); |
!!!cp ('t249'); |
| 4874 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 4875 |
## Ignore the token |
## Ignore the token |
| 4876 |
!!!next-token; |
!!!next-token; |
| 4877 |
redo B; |
redo B; |
| 4895 |
} # INSCOPE |
} # INSCOPE |
| 4896 |
unless (defined $i) { |
unless (defined $i) { |
| 4897 |
!!!cp ('t252'); |
!!!cp ('t252'); |
| 4898 |
!!!parse-error (type => 'unmatched end tag:tr'); |
!!!parse-error (type => 'unmatched end tag:tr', token => $token); |
| 4899 |
## Ignore the token |
## Ignore the token |
| 4900 |
!!!next-token; |
!!!next-token; |
| 4901 |
redo B; |
redo B; |
| 4932 |
} # INSCOPE |
} # INSCOPE |
| 4933 |
unless (defined $i) { |
unless (defined $i) { |
| 4934 |
!!!cp ('t256'); |
!!!cp ('t256'); |
| 4935 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 4936 |
## Ignore the token |
## Ignore the token |
| 4937 |
!!!next-token; |
!!!next-token; |
| 4938 |
redo B; |
redo B; |
| 4958 |
tbody => 1, tfoot => 1, thead => 1, # $self->{insertion_mode} == IN_TABLE_IM |
tbody => 1, tfoot => 1, thead => 1, # $self->{insertion_mode} == IN_TABLE_IM |
| 4959 |
}->{$token->{tag_name}}) { |
}->{$token->{tag_name}}) { |
| 4960 |
!!!cp ('t258'); |
!!!cp ('t258'); |
| 4961 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 4962 |
## Ignore the token |
## Ignore the token |
| 4963 |
!!!next-token; |
!!!next-token; |
| 4964 |
redo B; |
redo B; |
| 4965 |
} else { |
} else { |
| 4966 |
!!!cp ('t259'); |
!!!cp ('t259'); |
| 4967 |
!!!parse-error (type => 'in table:/'.$token->{tag_name}); |
!!!parse-error (type => 'in table:/'.$token->{tag_name}, token => $token); |
| 4968 |
|
|
| 4969 |
$insert = $insert_to_foster; |
$insert = $insert_to_foster; |
| 4970 |
# |
# |
| 4972 |
} elsif ($token->{type} == END_OF_FILE_TOKEN) { |
} elsif ($token->{type} == END_OF_FILE_TOKEN) { |
| 4973 |
unless ($self->{open_elements}->[-1]->[1] eq 'html' and |
unless ($self->{open_elements}->[-1]->[1] eq 'html' and |
| 4974 |
@{$self->{open_elements}} == 1) { # redundant, maybe |
@{$self->{open_elements}} == 1) { # redundant, maybe |
| 4975 |
!!!parse-error (type => 'in body:#eof'); |
!!!parse-error (type => 'in body:#eof', token => $token); |
| 4976 |
!!!cp ('t259.1'); |
!!!cp ('t259.1'); |
| 4977 |
# |
# |
| 4978 |
} else { |
} else { |
| 5013 |
if ($token->{tag_name} eq 'colgroup') { |
if ($token->{tag_name} eq 'colgroup') { |
| 5014 |
if ($self->{open_elements}->[-1]->[1] eq 'html') { |
if ($self->{open_elements}->[-1]->[1] eq 'html') { |
| 5015 |
!!!cp ('t264'); |
!!!cp ('t264'); |
| 5016 |
!!!parse-error (type => 'unmatched end tag:colgroup'); |
!!!parse-error (type => 'unmatched end tag:colgroup', token => $token); |
| 5017 |
## Ignore the token |
## Ignore the token |
| 5018 |
!!!next-token; |
!!!next-token; |
| 5019 |
redo B; |
redo B; |
| 5026 |
} |
} |
| 5027 |
} elsif ($token->{tag_name} eq 'col') { |
} elsif ($token->{tag_name} eq 'col') { |
| 5028 |
!!!cp ('t266'); |
!!!cp ('t266'); |
| 5029 |
!!!parse-error (type => 'unmatched end tag:col'); |
!!!parse-error (type => 'unmatched end tag:col', token => $token); |
| 5030 |
## Ignore the token |
## Ignore the token |
| 5031 |
!!!next-token; |
!!!next-token; |
| 5032 |
redo B; |
redo B; |
| 5056 |
if ($self->{open_elements}->[-1]->[1] eq 'html') { |
if ($self->{open_elements}->[-1]->[1] eq 'html') { |
| 5057 |
!!!cp ('t269'); |
!!!cp ('t269'); |
| 5058 |
## TODO: Wrong error type? |
## TODO: Wrong error type? |
| 5059 |
!!!parse-error (type => 'unmatched end tag:colgroup'); |
!!!parse-error (type => 'unmatched end tag:colgroup', token => $token); |
| 5060 |
## Ignore the token |
## Ignore the token |
| 5061 |
!!!next-token; |
!!!next-token; |
| 5062 |
redo B; |
redo B; |
| 5115 |
tr => 1, td => 1, th => 1, |
tr => 1, td => 1, th => 1, |
| 5116 |
}->{$token->{tag_name}})) { |
}->{$token->{tag_name}})) { |
| 5117 |
## TODO: The type below is not good - <select> is replaced by </select> |
## TODO: The type below is not good - <select> is replaced by </select> |
| 5118 |
!!!parse-error (type => 'not closed:select'); |
!!!parse-error (type => 'not closed:select', token => $token); |
| 5119 |
## NOTE: As if the token were </select> (<select> case) or |
## NOTE: As if the token were </select> (<select> case) or |
| 5120 |
## as if there were </select> (otherwise). |
## as if there were </select> (otherwise). |
| 5121 |
## have an element in table scope |
## have an element in table scope |
| 5135 |
} # INSCOPE |
} # INSCOPE |
| 5136 |
unless (defined $i) { |
unless (defined $i) { |
| 5137 |
!!!cp ('t280'); |
!!!cp ('t280'); |
| 5138 |
!!!parse-error (type => 'unmatched end tag:select'); |
!!!parse-error (type => 'unmatched end tag:select', token => $token); |
| 5139 |
## Ignore the token |
## Ignore the token |
| 5140 |
!!!next-token; |
!!!next-token; |
| 5141 |
redo B; |
redo B; |
| 5157 |
} |
} |
| 5158 |
} else { |
} else { |
| 5159 |
!!!cp ('t282'); |
!!!cp ('t282'); |
| 5160 |
!!!parse-error (type => 'in select:'.$token->{tag_name}); |
!!!parse-error (type => 'in select:'.$token->{tag_name}, token => $token); |
| 5161 |
## Ignore the token |
## Ignore the token |
| 5162 |
!!!next-token; |
!!!next-token; |
| 5163 |
redo B; |
redo B; |
| 5174 |
pop @{$self->{open_elements}}; |
pop @{$self->{open_elements}}; |
| 5175 |
} else { |
} else { |
| 5176 |
!!!cp ('t285'); |
!!!cp ('t285'); |
| 5177 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 5178 |
## Ignore the token |
## Ignore the token |
| 5179 |
} |
} |
| 5180 |
!!!next-token; |
!!!next-token; |
| 5185 |
pop @{$self->{open_elements}}; |
pop @{$self->{open_elements}}; |
| 5186 |
} else { |
} else { |
| 5187 |
!!!cp ('t287'); |
!!!cp ('t287'); |
| 5188 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 5189 |
## Ignore the token |
## Ignore the token |
| 5190 |
} |
} |
| 5191 |
!!!next-token; |
!!!next-token; |
| 5208 |
} # INSCOPE |
} # INSCOPE |
| 5209 |
unless (defined $i) { |
unless (defined $i) { |
| 5210 |
!!!cp ('t290'); |
!!!cp ('t290'); |
| 5211 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 5212 |
## Ignore the token |
## Ignore the token |
| 5213 |
!!!next-token; |
!!!next-token; |
| 5214 |
redo B; |
redo B; |
| 5227 |
tfoot => 1, thead => 1, tr => 1, td => 1, th => 1, |
tfoot => 1, thead => 1, tr => 1, td => 1, th => 1, |
| 5228 |
}->{$token->{tag_name}}) { |
}->{$token->{tag_name}}) { |
| 5229 |
## TODO: The following is wrong? |
## TODO: The following is wrong? |
| 5230 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 5231 |
|
|
| 5232 |
## have an element in table scope |
## have an element in table scope |
| 5233 |
my $i; |
my $i; |
| 5271 |
unless (defined $i) { |
unless (defined $i) { |
| 5272 |
!!!cp ('t297'); |
!!!cp ('t297'); |
| 5273 |
## TODO: The following error type is correct? |
## TODO: The following error type is correct? |
| 5274 |
!!!parse-error (type => 'unmatched end tag:select'); |
!!!parse-error (type => 'unmatched end tag:select', token => $token); |
| 5275 |
## Ignore the </select> token |
## Ignore the </select> token |
| 5276 |
!!!next-token; ## TODO: ok? |
!!!next-token; ## TODO: ok? |
| 5277 |
redo B; |
redo B; |
| 5286 |
redo B; |
redo B; |
| 5287 |
} else { |
} else { |
| 5288 |
!!!cp ('t299'); |
!!!cp ('t299'); |
| 5289 |
!!!parse-error (type => 'in select:/'.$token->{tag_name}); |
!!!parse-error (type => 'in select:/'.$token->{tag_name}, token => $token); |
| 5290 |
## Ignore the token |
## Ignore the token |
| 5291 |
!!!next-token; |
!!!next-token; |
| 5292 |
redo B; |
redo B; |
| 5295 |
unless ($self->{open_elements}->[-1]->[1] eq 'html' and |
unless ($self->{open_elements}->[-1]->[1] eq 'html' and |
| 5296 |
@{$self->{open_elements}} == 1) { # redundant, maybe |
@{$self->{open_elements}} == 1) { # redundant, maybe |
| 5297 |
!!!cp ('t299.1'); |
!!!cp ('t299.1'); |
| 5298 |
!!!parse-error (type => 'in body:#eof'); |
!!!parse-error (type => 'in body:#eof', token => $token); |
| 5299 |
} else { |
} else { |
| 5300 |
!!!cp ('t299.2'); |
!!!cp ('t299.2'); |
| 5301 |
} |
} |
| 5323 |
|
|
| 5324 |
if ($self->{insertion_mode} == AFTER_HTML_BODY_IM) { |
if ($self->{insertion_mode} == AFTER_HTML_BODY_IM) { |
| 5325 |
!!!cp ('t301'); |
!!!cp ('t301'); |
| 5326 |
!!!parse-error (type => 'after html:#character'); |
!!!parse-error (type => 'after html:#character', token => $token); |
| 5327 |
|
|
| 5328 |
## Reprocess in the "after body" insertion mode. |
## Reprocess in the "after body" insertion mode. |
| 5329 |
} else { |
} else { |
| 5331 |
} |
} |
| 5332 |
|
|
| 5333 |
## "after body" insertion mode |
## "after body" insertion mode |
| 5334 |
!!!parse-error (type => 'after body:#character'); |
!!!parse-error (type => 'after body:#character', token => $token); |
| 5335 |
|
|
| 5336 |
$self->{insertion_mode} = IN_BODY_IM; |
$self->{insertion_mode} = IN_BODY_IM; |
| 5337 |
## reprocess |
## reprocess |
| 5339 |
} elsif ($token->{type} == START_TAG_TOKEN) { |
} elsif ($token->{type} == START_TAG_TOKEN) { |
| 5340 |
if ($self->{insertion_mode} == AFTER_HTML_BODY_IM) { |
if ($self->{insertion_mode} == AFTER_HTML_BODY_IM) { |
| 5341 |
!!!cp ('t303'); |
!!!cp ('t303'); |
| 5342 |
!!!parse-error (type => 'after html:'.$token->{tag_name}); |
!!!parse-error (type => 'after html:'.$token->{tag_name}, token => $token); |
| 5343 |
|
|
| 5344 |
## Reprocess in the "after body" insertion mode. |
## Reprocess in the "after body" insertion mode. |
| 5345 |
} else { |
} else { |
| 5347 |
} |
} |
| 5348 |
|
|
| 5349 |
## "after body" insertion mode |
## "after body" insertion mode |
| 5350 |
!!!parse-error (type => 'after body:'.$token->{tag_name}); |
!!!parse-error (type => 'after body:'.$token->{tag_name}, token => $token); |
| 5351 |
|
|
| 5352 |
$self->{insertion_mode} = IN_BODY_IM; |
$self->{insertion_mode} = IN_BODY_IM; |
| 5353 |
## reprocess |
## reprocess |
| 5355 |
} elsif ($token->{type} == END_TAG_TOKEN) { |
} elsif ($token->{type} == END_TAG_TOKEN) { |
| 5356 |
if ($self->{insertion_mode} == AFTER_HTML_BODY_IM) { |
if ($self->{insertion_mode} == AFTER_HTML_BODY_IM) { |
| 5357 |
!!!cp ('t305'); |
!!!cp ('t305'); |
| 5358 |
!!!parse-error (type => 'after html:/'.$token->{tag_name}); |
!!!parse-error (type => 'after html:/'.$token->{tag_name}, token => $token); |
| 5359 |
|
|
| 5360 |
$self->{insertion_mode} = AFTER_BODY_IM; |
$self->{insertion_mode} = AFTER_BODY_IM; |
| 5361 |
## Reprocess in the "after body" insertion mode. |
## Reprocess in the "after body" insertion mode. |
| 5367 |
if ($token->{tag_name} eq 'html') { |
if ($token->{tag_name} eq 'html') { |
| 5368 |
if (defined $self->{inner_html_node}) { |
if (defined $self->{inner_html_node}) { |
| 5369 |
!!!cp ('t307'); |
!!!cp ('t307'); |
| 5370 |
!!!parse-error (type => 'unmatched end tag:html'); |
!!!parse-error (type => 'unmatched end tag:html', token => $token); |
| 5371 |
## Ignore the token |
## Ignore the token |
| 5372 |
!!!next-token; |
!!!next-token; |
| 5373 |
redo B; |
redo B; |
| 5379 |
} |
} |
| 5380 |
} else { |
} else { |
| 5381 |
!!!cp ('t309'); |
!!!cp ('t309'); |
| 5382 |
!!!parse-error (type => 'after body:/'.$token->{tag_name}); |
!!!parse-error (type => 'after body:/'.$token->{tag_name}, token => $token); |
| 5383 |
|
|
| 5384 |
$self->{insertion_mode} = IN_BODY_IM; |
$self->{insertion_mode} = IN_BODY_IM; |
| 5385 |
## reprocess |
## reprocess |
| 5407 |
if ($token->{data} =~ s/^[^\x09\x0A\x0B\x0C\x20]+//) { |
if ($token->{data} =~ s/^[^\x09\x0A\x0B\x0C\x20]+//) { |
| 5408 |
if ($self->{insertion_mode} == IN_FRAMESET_IM) { |
if ($self->{insertion_mode} == IN_FRAMESET_IM) { |
| 5409 |
!!!cp ('t311'); |
!!!cp ('t311'); |
| 5410 |
!!!parse-error (type => 'in frameset:#character'); |
!!!parse-error (type => 'in frameset:#character', token => $token); |
| 5411 |
} elsif ($self->{insertion_mode} == AFTER_FRAMESET_IM) { |
} elsif ($self->{insertion_mode} == AFTER_FRAMESET_IM) { |
| 5412 |
!!!cp ('t312'); |
!!!cp ('t312'); |
| 5413 |
!!!parse-error (type => 'after frameset:#character'); |
!!!parse-error (type => 'after frameset:#character', token => $token); |
| 5414 |
} else { # "after html frameset" |
} else { # "after html frameset" |
| 5415 |
!!!cp ('t313'); |
!!!cp ('t313'); |
| 5416 |
!!!parse-error (type => 'after html:#character'); |
!!!parse-error (type => 'after html:#character', token => $token); |
| 5417 |
|
|
| 5418 |
$self->{insertion_mode} = AFTER_FRAMESET_IM; |
$self->{insertion_mode} = AFTER_FRAMESET_IM; |
| 5419 |
## Reprocess in the "after frameset" insertion mode. |
## Reprocess in the "after frameset" insertion mode. |
| 5420 |
!!!parse-error (type => 'after frameset:#character'); |
!!!parse-error (type => 'after frameset:#character', token => $token); |
| 5421 |
} |
} |
| 5422 |
|
|
| 5423 |
## Ignore the token. |
## Ignore the token. |
| 5435 |
} elsif ($token->{type} == START_TAG_TOKEN) { |
} elsif ($token->{type} == START_TAG_TOKEN) { |
| 5436 |
if ($self->{insertion_mode} == AFTER_HTML_FRAMESET_IM) { |
if ($self->{insertion_mode} == AFTER_HTML_FRAMESET_IM) { |
| 5437 |
!!!cp ('t316'); |
!!!cp ('t316'); |
| 5438 |
!!!parse-error (type => 'after html:'.$token->{tag_name}); |
!!!parse-error (type => 'after html:'.$token->{tag_name}, token => $token); |
| 5439 |
|
|
| 5440 |
$self->{insertion_mode} = AFTER_FRAMESET_IM; |
$self->{insertion_mode} = AFTER_FRAMESET_IM; |
| 5441 |
## Process in the "after frameset" insertion mode. |
## Process in the "after frameset" insertion mode. |
| 5464 |
} else { |
} else { |
| 5465 |
if ($self->{insertion_mode} == IN_FRAMESET_IM) { |
if ($self->{insertion_mode} == IN_FRAMESET_IM) { |
| 5466 |
!!!cp ('t321'); |
!!!cp ('t321'); |
| 5467 |
!!!parse-error (type => 'in frameset:'.$token->{tag_name}); |
!!!parse-error (type => 'in frameset:'.$token->{tag_name}, token => $token); |
| 5468 |
} else { |
} else { |
| 5469 |
!!!cp ('t322'); |
!!!cp ('t322'); |
| 5470 |
!!!parse-error (type => 'after frameset:'.$token->{tag_name}); |
!!!parse-error (type => 'after frameset:'.$token->{tag_name}, token => $token); |
| 5471 |
} |
} |
| 5472 |
## Ignore the token |
## Ignore the token |
| 5473 |
!!!next-token; |
!!!next-token; |
| 5476 |
} elsif ($token->{type} == END_TAG_TOKEN) { |
} elsif ($token->{type} == END_TAG_TOKEN) { |
| 5477 |
if ($self->{insertion_mode} == AFTER_HTML_FRAMESET_IM) { |
if ($self->{insertion_mode} == AFTER_HTML_FRAMESET_IM) { |
| 5478 |
!!!cp ('t323'); |
!!!cp ('t323'); |
| 5479 |
!!!parse-error (type => 'after html:/'.$token->{tag_name}); |
!!!parse-error (type => 'after html:/'.$token->{tag_name}, token => $token); |
| 5480 |
|
|
| 5481 |
$self->{insertion_mode} = AFTER_FRAMESET_IM; |
$self->{insertion_mode} = AFTER_FRAMESET_IM; |
| 5482 |
## Process in the "after frameset" insertion mode. |
## Process in the "after frameset" insertion mode. |
| 5489 |
if ($self->{open_elements}->[-1]->[1] eq 'html' and |
if ($self->{open_elements}->[-1]->[1] eq 'html' and |
| 5490 |
@{$self->{open_elements}} == 1) { |
@{$self->{open_elements}} == 1) { |
| 5491 |
!!!cp ('t325'); |
!!!cp ('t325'); |
| 5492 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 5493 |
## Ignore the token |
## Ignore the token |
| 5494 |
!!!next-token; |
!!!next-token; |
| 5495 |
} else { |
} else { |
| 5515 |
} else { |
} else { |
| 5516 |
if ($self->{insertion_mode} == IN_FRAMESET_IM) { |
if ($self->{insertion_mode} == IN_FRAMESET_IM) { |
| 5517 |
!!!cp ('t330'); |
!!!cp ('t330'); |
| 5518 |
!!!parse-error (type => 'in frameset:/'.$token->{tag_name}); |
!!!parse-error (type => 'in frameset:/'.$token->{tag_name}, token => $token); |
| 5519 |
} else { |
} else { |
| 5520 |
!!!cp ('t331'); |
!!!cp ('t331'); |
| 5521 |
!!!parse-error (type => 'after frameset:/'.$token->{tag_name}); |
!!!parse-error (type => 'after frameset:/'.$token->{tag_name}, token => $token); |
| 5522 |
} |
} |
| 5523 |
## Ignore the token |
## Ignore the token |
| 5524 |
!!!next-token; |
!!!next-token; |
| 5528 |
unless ($self->{open_elements}->[-1]->[1] eq 'html' and |
unless ($self->{open_elements}->[-1]->[1] eq 'html' and |
| 5529 |
@{$self->{open_elements}} == 1) { # redundant, maybe |
@{$self->{open_elements}} == 1) { # redundant, maybe |
| 5530 |
!!!cp ('t331.1'); |
!!!cp ('t331.1'); |
| 5531 |
!!!parse-error (type => 'in body:#eof'); |
!!!parse-error (type => 'in body:#eof', token => $token); |
| 5532 |
} else { |
} else { |
| 5533 |
!!!cp ('t331.2'); |
!!!cp ('t331.2'); |
| 5534 |
} |
} |
| 5574 |
if ($token->{attributes}->{charset}) { ## TODO: And if supported |
if ($token->{attributes}->{charset}) { ## TODO: And if supported |
| 5575 |
!!!cp ('t335'); |
!!!cp ('t335'); |
| 5576 |
$self->{change_encoding} |
$self->{change_encoding} |
| 5577 |
->($self, $token->{attributes}->{charset}->{value}); |
->($self, $token->{attributes}->{charset}->{value}, $token); |
| 5578 |
|
|
| 5579 |
$meta_el->[0]->get_attribute_node_ns (undef, 'charset') |
$meta_el->[0]->get_attribute_node_ns (undef, 'charset') |
| 5580 |
->set_user_data (manakai_has_reference => |
->set_user_data (manakai_has_reference => |
| 5589 |
([^"'\x09-\x0D\x20][^\x09-\x0D\x20]*))/x) { |
([^"'\x09-\x0D\x20][^\x09-\x0D\x20]*))/x) { |
| 5590 |
!!!cp ('t336'); |
!!!cp ('t336'); |
| 5591 |
$self->{change_encoding} |
$self->{change_encoding} |
| 5592 |
->($self, defined $1 ? $1 : defined $2 ? $2 : $3); |
->($self, defined $1 ? $1 : defined $2 ? $2 : $3, $token); |
| 5593 |
$meta_el->[0]->get_attribute_node_ns (undef, 'content') |
$meta_el->[0]->get_attribute_node_ns (undef, 'content') |
| 5594 |
->set_user_data (manakai_has_reference => |
->set_user_data (manakai_has_reference => |
| 5595 |
$token->{attributes}->{content} |
$token->{attributes}->{content} |
| 5621 |
$parse_rcdata->(RCDATA_CONTENT_MODEL); |
$parse_rcdata->(RCDATA_CONTENT_MODEL); |
| 5622 |
redo B; |
redo B; |
| 5623 |
} elsif ($token->{tag_name} eq 'body') { |
} elsif ($token->{tag_name} eq 'body') { |
| 5624 |
!!!parse-error (type => 'in body:body'); |
!!!parse-error (type => 'in body:body', token => $token); |
| 5625 |
|
|
| 5626 |
if (@{$self->{open_elements}} == 1 or |
if (@{$self->{open_elements}} == 1 or |
| 5627 |
$self->{open_elements}->[1]->[1] ne 'body') { |
$self->{open_elements}->[1]->[1] ne 'body') { |
| 5652 |
}->{$token->{tag_name}}) { |
}->{$token->{tag_name}}) { |
| 5653 |
if ($token->{tag_name} eq 'form' and defined $self->{form_element}) { |
if ($token->{tag_name} eq 'form' and defined $self->{form_element}) { |
| 5654 |
!!!cp ('t350'); |
!!!cp ('t350'); |
| 5655 |
!!!parse-error (type => 'in form:form'); |
!!!parse-error (type => 'in form:form', token => $token); |
| 5656 |
## Ignore the token |
## Ignore the token |
| 5657 |
!!!next-token; |
!!!next-token; |
| 5658 |
redo B; |
redo B; |
| 5663 |
if ($_->[1] eq 'p') { |
if ($_->[1] eq 'p') { |
| 5664 |
!!!cp ('t344'); |
!!!cp ('t344'); |
| 5665 |
!!!back-token; |
!!!back-token; |
| 5666 |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
$token = {type => END_TAG_TOKEN, tag_name => 'p', |
| 5667 |
|
line => $token->{line}, column => $token->{column}}; |
| 5668 |
redo B; |
redo B; |
| 5669 |
} elsif ({ |
} elsif ({ |
| 5670 |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
| 5717 |
if ($_->[1] eq 'p') { |
if ($_->[1] eq 'p') { |
| 5718 |
!!!cp ('t353'); |
!!!cp ('t353'); |
| 5719 |
!!!back-token; |
!!!back-token; |
| 5720 |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
$token = {type => END_TAG_TOKEN, tag_name => 'p', |
| 5721 |
|
line => $token->{line}, column => $token->{column}}; |
| 5722 |
redo B; |
redo B; |
| 5723 |
} elsif ({ |
} elsif ({ |
| 5724 |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
| 5741 |
if ($i != -1) { |
if ($i != -1) { |
| 5742 |
!!!cp ('t355'); |
!!!cp ('t355'); |
| 5743 |
!!!parse-error (type => 'end tag missing:'. |
!!!parse-error (type => 'end tag missing:'. |
| 5744 |
$self->{open_elements}->[-1]->[1]); |
$self->{open_elements}->[-1]->[1], token => $token); |
| 5745 |
} else { |
} else { |
| 5746 |
!!!cp ('t356'); |
!!!cp ('t356'); |
| 5747 |
} |
} |
| 5777 |
if ($_->[1] eq 'p') { |
if ($_->[1] eq 'p') { |
| 5778 |
!!!cp ('t367'); |
!!!cp ('t367'); |
| 5779 |
!!!back-token; |
!!!back-token; |
| 5780 |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
$token = {type => END_TAG_TOKEN, tag_name => 'p', |
| 5781 |
|
line => $token->{line}, column => $token->{column}}; |
| 5782 |
redo B; |
redo B; |
| 5783 |
} elsif ({ |
} elsif ({ |
| 5784 |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
| 5800 |
my $node = $active_formatting_elements->[$i]; |
my $node = $active_formatting_elements->[$i]; |
| 5801 |
if ($node->[1] eq 'a') { |
if ($node->[1] eq 'a') { |
| 5802 |
!!!cp ('t371'); |
!!!cp ('t371'); |
| 5803 |
!!!parse-error (type => 'in a:a'); |
!!!parse-error (type => 'in a:a', token => $token); |
| 5804 |
|
|
| 5805 |
!!!back-token; |
!!!back-token; |
| 5806 |
$token = {type => END_TAG_TOKEN, tag_name => 'a'}; |
$token = {type => END_TAG_TOKEN, tag_name => 'a', |
| 5807 |
$formatting_end_tag->($token->{tag_name}); |
line => $token->{line}, column => $token->{column}}; |
| 5808 |
|
$formatting_end_tag->($token); |
| 5809 |
|
|
| 5810 |
AFE2: for (reverse 0..$#$active_formatting_elements) { |
AFE2: for (reverse 0..$#$active_formatting_elements) { |
| 5811 |
if ($active_formatting_elements->[$_]->[0] eq $node->[0]) { |
if ($active_formatting_elements->[$_]->[0] eq $node->[0]) { |
| 5843 |
my $node = $self->{open_elements}->[$_]; |
my $node = $self->{open_elements}->[$_]; |
| 5844 |
if ($node->[1] eq 'nobr') { |
if ($node->[1] eq 'nobr') { |
| 5845 |
!!!cp ('t376'); |
!!!cp ('t376'); |
| 5846 |
!!!parse-error (type => 'in nobr:nobr'); |
!!!parse-error (type => 'in nobr:nobr', token => $token); |
| 5847 |
!!!back-token; |
!!!back-token; |
| 5848 |
$token = {type => END_TAG_TOKEN, tag_name => 'nobr'}; |
$token = {type => END_TAG_TOKEN, tag_name => 'nobr', |
| 5849 |
|
line => $token->{line}, column => $token->{column}}; |
| 5850 |
redo B; |
redo B; |
| 5851 |
} elsif ({ |
} elsif ({ |
| 5852 |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
| 5868 |
my $node = $self->{open_elements}->[$_]; |
my $node = $self->{open_elements}->[$_]; |
| 5869 |
if ($node->[1] eq 'button') { |
if ($node->[1] eq 'button') { |
| 5870 |
!!!cp ('t378'); |
!!!cp ('t378'); |
| 5871 |
!!!parse-error (type => 'in button:button'); |
!!!parse-error (type => 'in button:button', token => $token); |
| 5872 |
!!!back-token; |
!!!back-token; |
| 5873 |
$token = {type => END_TAG_TOKEN, tag_name => 'button'}; |
$token = {type => END_TAG_TOKEN, tag_name => 'button', |
| 5874 |
|
line => $token->{line}, column => $token->{column}}; |
| 5875 |
redo B; |
redo B; |
| 5876 |
} elsif ({ |
} elsif ({ |
| 5877 |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
| 5909 |
$parse_rcdata->(CDATA_CONTENT_MODEL); |
$parse_rcdata->(CDATA_CONTENT_MODEL); |
| 5910 |
redo B; |
redo B; |
| 5911 |
} elsif ($token->{tag_name} eq 'isindex') { |
} elsif ($token->{tag_name} eq 'isindex') { |
| 5912 |
!!!parse-error (type => 'isindex'); |
!!!parse-error (type => 'isindex', token => $token); |
| 5913 |
|
|
| 5914 |
if (defined $self->{form_element}) { |
if (defined $self->{form_element}) { |
| 5915 |
!!!cp ('t389'); |
!!!cp ('t389'); |
| 5926 |
delete $at->{prompt}; |
delete $at->{prompt}; |
| 5927 |
my @tokens = ( |
my @tokens = ( |
| 5928 |
{type => START_TAG_TOKEN, tag_name => 'form', |
{type => START_TAG_TOKEN, tag_name => 'form', |
| 5929 |
attributes => $form_attrs}, |
attributes => $form_attrs, |
| 5930 |
{type => START_TAG_TOKEN, tag_name => 'hr'}, |
line => $token->{line}, column => $token->{column}}, |
| 5931 |
{type => START_TAG_TOKEN, tag_name => 'p'}, |
{type => START_TAG_TOKEN, tag_name => 'hr', |
| 5932 |
{type => START_TAG_TOKEN, tag_name => 'label'}, |
line => $token->{line}, column => $token->{column}}, |
| 5933 |
|
{type => START_TAG_TOKEN, tag_name => 'p', |
| 5934 |
|
line => $token->{line}, column => $token->{column}}, |
| 5935 |
|
{type => START_TAG_TOKEN, tag_name => 'label', |
| 5936 |
|
line => $token->{line}, column => $token->{column}}, |
| 5937 |
); |
); |
| 5938 |
if ($prompt_attr) { |
if ($prompt_attr) { |
| 5939 |
!!!cp ('t390'); |
!!!cp ('t390'); |
| 5940 |
push @tokens, {type => CHARACTER_TOKEN, data => $prompt_attr->{value}}; |
push @tokens, {type => CHARACTER_TOKEN, data => $prompt_attr->{value}, |
| 5941 |
|
line => $token->{line}, column => $token->{column}}; |
| 5942 |
} else { |
} else { |
| 5943 |
!!!cp ('t391'); |
!!!cp ('t391'); |
| 5944 |
push @tokens, {type => CHARACTER_TOKEN, |
push @tokens, {type => CHARACTER_TOKEN, |
| 5945 |
data => 'This is a searchable index. Insert your search keywords here: '}; # SHOULD |
data => 'This is a searchable index. Insert your search keywords here: ', |
| 5946 |
|
line => $token->{line}, column => $token->{column}}; # SHOULD |
| 5947 |
## TODO: make this configurable |
## TODO: make this configurable |
| 5948 |
} |
} |
| 5949 |
push @tokens, |
push @tokens, |
| 5950 |
{type => START_TAG_TOKEN, tag_name => 'input', attributes => $at}, |
{type => START_TAG_TOKEN, tag_name => 'input', attributes => $at, |
| 5951 |
|
line => $token->{line}, column => $token->{column}}, |
| 5952 |
#{type => CHARACTER_TOKEN, data => ''}, # SHOULD |
#{type => CHARACTER_TOKEN, data => ''}, # SHOULD |
| 5953 |
{type => END_TAG_TOKEN, tag_name => 'label'}, |
{type => END_TAG_TOKEN, tag_name => 'label', |
| 5954 |
{type => END_TAG_TOKEN, tag_name => 'p'}, |
line => $token->{line}, column => $token->{column}}, |
| 5955 |
{type => START_TAG_TOKEN, tag_name => 'hr'}, |
{type => END_TAG_TOKEN, tag_name => 'p', |
| 5956 |
{type => END_TAG_TOKEN, tag_name => 'form'}; |
line => $token->{line}, column => $token->{column}}, |
| 5957 |
|
{type => START_TAG_TOKEN, tag_name => 'hr', |
| 5958 |
|
line => $token->{line}, column => $token->{column}}, |
| 5959 |
|
{type => END_TAG_TOKEN, tag_name => 'form', |
| 5960 |
|
line => $token->{line}, column => $token->{column}}; |
| 5961 |
$token = shift @tokens; |
$token = shift @tokens; |
| 5962 |
!!!back-token (@tokens); |
!!!back-token (@tokens); |
| 5963 |
redo B; |
redo B; |
| 6004 |
## Ignore the token |
## Ignore the token |
| 6005 |
} else { |
} else { |
| 6006 |
!!!cp ('t398'); |
!!!cp ('t398'); |
| 6007 |
!!!parse-error (type => 'in RCDATA:#'.$token->{type}); |
!!!parse-error (type => 'in RCDATA:#'.$token->{type}, token => $token); |
| 6008 |
} |
} |
| 6009 |
!!!next-token; |
!!!next-token; |
| 6010 |
redo B; |
redo B; |
| 6015 |
thead => 1, tr => 1, |
thead => 1, tr => 1, |
| 6016 |
}->{$token->{tag_name}}) { |
}->{$token->{tag_name}}) { |
| 6017 |
!!!cp ('t401'); |
!!!cp ('t401'); |
| 6018 |
!!!parse-error (type => 'in body:'.$token->{tag_name}); |
!!!parse-error (type => 'in body:'.$token->{tag_name}, token => $token); |
| 6019 |
## Ignore the token |
## Ignore the token |
| 6020 |
!!!next-token; |
!!!next-token; |
| 6021 |
redo B; |
redo B; |
| 6024 |
} else { |
} else { |
| 6025 |
if ($token->{tag_name} eq 'image') { |
if ($token->{tag_name} eq 'image') { |
| 6026 |
!!!cp ('t384'); |
!!!cp ('t384'); |
| 6027 |
!!!parse-error (type => 'image'); |
!!!parse-error (type => 'image', token => $token); |
| 6028 |
$token->{tag_name} = 'img'; |
$token->{tag_name} = 'img'; |
| 6029 |
} else { |
} else { |
| 6030 |
!!!cp ('t385'); |
!!!cp ('t385'); |
| 6097 |
} |
} |
| 6098 |
|
|
| 6099 |
!!!parse-error (type => 'start tag not allowed', |
!!!parse-error (type => 'start tag not allowed', |
| 6100 |
value => $token->{tag_name}); |
value => $token->{tag_name}, token => $token); |
| 6101 |
## NOTE: Ignore the token. |
## NOTE: Ignore the token. |
| 6102 |
!!!next-token; |
!!!next-token; |
| 6103 |
redo B; |
redo B; |
| 6110 |
tbody => 1, tfoot => 1, thead => 1, |
tbody => 1, tfoot => 1, thead => 1, |
| 6111 |
}->{$_->[1]}) { |
}->{$_->[1]}) { |
| 6112 |
!!!cp ('t403'); |
!!!cp ('t403'); |
| 6113 |
!!!parse-error (type => 'not closed:'.$_->[1]); |
!!!parse-error (type => 'not closed:'.$_->[1], token => $token); |
| 6114 |
last; |
last; |
| 6115 |
} else { |
} else { |
| 6116 |
!!!cp ('t404'); |
!!!cp ('t404'); |
| 6125 |
## ISSUE: There is an issue in the spec. |
## ISSUE: There is an issue in the spec. |
| 6126 |
if ($self->{open_elements}->[-1]->[1] ne 'body') { |
if ($self->{open_elements}->[-1]->[1] ne 'body') { |
| 6127 |
!!!cp ('t406'); |
!!!cp ('t406'); |
| 6128 |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[1]->[1]); |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[1]->[1], token => $token); |
| 6129 |
} else { |
} else { |
| 6130 |
!!!cp ('t407'); |
!!!cp ('t407'); |
| 6131 |
} |
} |
| 6134 |
redo B; |
redo B; |
| 6135 |
} else { |
} else { |
| 6136 |
!!!cp ('t408'); |
!!!cp ('t408'); |
| 6137 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 6138 |
## Ignore the token |
## Ignore the token |
| 6139 |
!!!next-token; |
!!!next-token; |
| 6140 |
redo B; |
redo B; |
| 6165 |
|
|
| 6166 |
unless (defined $i) { # has an element in scope |
unless (defined $i) { # has an element in scope |
| 6167 |
!!!cp ('t413'); |
!!!cp ('t413'); |
| 6168 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 6169 |
} else { |
} else { |
| 6170 |
## Step 1. generate implied end tags |
## Step 1. generate implied end tags |
| 6171 |
while ({ |
while ({ |
| 6181 |
## Step 2. |
## Step 2. |
| 6182 |
if ($self->{open_elements}->[-1]->[1] ne $token->{tag_name}) { |
if ($self->{open_elements}->[-1]->[1] ne $token->{tag_name}) { |
| 6183 |
!!!cp ('t412'); |
!!!cp ('t412'); |
| 6184 |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1]); |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1], token => $token); |
| 6185 |
} else { |
} else { |
| 6186 |
!!!cp ('t414'); |
!!!cp ('t414'); |
| 6187 |
} |
} |
| 6219 |
|
|
| 6220 |
unless (defined $i) { # has an element in scope |
unless (defined $i) { # has an element in scope |
| 6221 |
!!!cp ('t421'); |
!!!cp ('t421'); |
| 6222 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 6223 |
} else { |
} else { |
| 6224 |
## Step 1. generate implied end tags |
## Step 1. generate implied end tags |
| 6225 |
while ({ |
while ({ |
| 6232 |
## Step 2. |
## Step 2. |
| 6233 |
if ($self->{open_elements}->[-1]->[1] ne $token->{tag_name}) { |
if ($self->{open_elements}->[-1]->[1] ne $token->{tag_name}) { |
| 6234 |
!!!cp ('t417.1'); |
!!!cp ('t417.1'); |
| 6235 |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1]); |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1], token => $token); |
| 6236 |
} else { |
} else { |
| 6237 |
!!!cp ('t420'); |
!!!cp ('t420'); |
| 6238 |
} |
} |
| 6267 |
|
|
| 6268 |
unless (defined $i) { # has an element in scope |
unless (defined $i) { # has an element in scope |
| 6269 |
!!!cp ('t425.1'); |
!!!cp ('t425.1'); |
| 6270 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 6271 |
} else { |
} else { |
| 6272 |
## Step 1. generate implied end tags |
## Step 1. generate implied end tags |
| 6273 |
while ({ |
while ({ |
| 6280 |
## Step 2. |
## Step 2. |
| 6281 |
if ($self->{open_elements}->[-1]->[1] ne $token->{tag_name}) { |
if ($self->{open_elements}->[-1]->[1] ne $token->{tag_name}) { |
| 6282 |
!!!cp ('t425'); |
!!!cp ('t425'); |
| 6283 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 6284 |
} else { |
} else { |
| 6285 |
!!!cp ('t426'); |
!!!cp ('t426'); |
| 6286 |
} |
} |
| 6312 |
if (defined $i) { |
if (defined $i) { |
| 6313 |
if ($self->{open_elements}->[-1]->[1] ne $token->{tag_name}) { |
if ($self->{open_elements}->[-1]->[1] ne $token->{tag_name}) { |
| 6314 |
!!!cp ('t412.1'); |
!!!cp ('t412.1'); |
| 6315 |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1]); |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1], token => $token); |
| 6316 |
} else { |
} else { |
| 6317 |
!!!cp ('t414.1'); |
!!!cp ('t414.1'); |
| 6318 |
} |
} |
| 6320 |
splice @{$self->{open_elements}}, $i; |
splice @{$self->{open_elements}}, $i; |
| 6321 |
} else { |
} else { |
| 6322 |
!!!cp ('t413.1'); |
!!!cp ('t413.1'); |
| 6323 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 6324 |
|
|
| 6325 |
!!!cp ('t415.1'); |
!!!cp ('t415.1'); |
| 6326 |
## As if <p>, then reprocess the current token |
## As if <p>, then reprocess the current token |
| 6339 |
strong => 1, tt => 1, u => 1, |
strong => 1, tt => 1, u => 1, |
| 6340 |
}->{$token->{tag_name}}) { |
}->{$token->{tag_name}}) { |
| 6341 |
!!!cp ('t427'); |
!!!cp ('t427'); |
| 6342 |
$formatting_end_tag->($token->{tag_name}); |
$formatting_end_tag->($token); |
| 6343 |
redo B; |
redo B; |
| 6344 |
} elsif ($token->{tag_name} eq 'br') { |
} elsif ($token->{tag_name} eq 'br') { |
| 6345 |
!!!cp ('t428'); |
!!!cp ('t428'); |
| 6346 |
!!!parse-error (type => 'unmatched end tag:br'); |
!!!parse-error (type => 'unmatched end tag:br', token => $token); |
| 6347 |
|
|
| 6348 |
## As if <br> |
## As if <br> |
| 6349 |
$reconstruct_active_formatting_elements->($insert_to_current); |
$reconstruct_active_formatting_elements->($insert_to_current); |
| 6368 |
noscript => 0, ## TODO: if scripting is enabled |
noscript => 0, ## TODO: if scripting is enabled |
| 6369 |
}->{$token->{tag_name}}) { |
}->{$token->{tag_name}}) { |
| 6370 |
!!!cp ('t429'); |
!!!cp ('t429'); |
| 6371 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 6372 |
## Ignore the token |
## Ignore the token |
| 6373 |
!!!next-token; |
!!!next-token; |
| 6374 |
redo B; |
redo B; |
| 6397 |
if ($token->{tag_name} ne $self->{open_elements}->[-1]->[1]) { |
if ($token->{tag_name} ne $self->{open_elements}->[-1]->[1]) { |
| 6398 |
!!!cp ('t431'); |
!!!cp ('t431'); |
| 6399 |
## NOTE: <x><y></x> |
## NOTE: <x><y></x> |
| 6400 |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1]); |
!!!parse-error (type => 'not closed:'.$self->{open_elements}->[-1]->[1], token => $token); |
| 6401 |
} else { |
} else { |
| 6402 |
!!!cp ('t432'); |
!!!cp ('t432'); |
| 6403 |
} |
} |
| 6414 |
($special_category->{$node->[1]} or |
($special_category->{$node->[1]} or |
| 6415 |
$scoping_category->{$node->[1]})) { |
$scoping_category->{$node->[1]})) { |
| 6416 |
!!!cp ('t433'); |
!!!cp ('t433'); |
| 6417 |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}); |
!!!parse-error (type => 'unmatched end tag:'.$token->{tag_name}, token => $token); |
| 6418 |
## Ignore the token |
## Ignore the token |
| 6419 |
!!!next-token; |
!!!next-token; |
| 6420 |
last S2; |
last S2; |