1827 |
$self->{state} = SELF_CLOSING_START_TAG_STATE; |
$self->{state} = SELF_CLOSING_START_TAG_STATE; |
1828 |
!!!next-input-character; |
!!!next-input-character; |
1829 |
redo A; |
redo A; |
1830 |
|
} elsif ($self->{next_char} == -1) { |
1831 |
|
!!!parse-error (type => 'unclosed tag'); |
1832 |
|
if ($self->{current_token}->{type} == START_TAG_TOKEN) { |
1833 |
|
!!!cp (122.3); |
1834 |
|
$self->{last_emitted_start_tag_name} = $self->{current_token}->{tag_name}; |
1835 |
|
} elsif ($self->{current_token}->{type} == END_TAG_TOKEN) { |
1836 |
|
if ($self->{current_token}->{attributes}) { |
1837 |
|
!!!cp (122.1); |
1838 |
|
!!!parse-error (type => 'end tag attribute'); |
1839 |
|
} else { |
1840 |
|
## NOTE: This state should never be reached. |
1841 |
|
!!!cp (122.2); |
1842 |
|
} |
1843 |
|
} else { |
1844 |
|
die "$0: $self->{current_token}->{type}: Unknown token type"; |
1845 |
|
} |
1846 |
|
$self->{state} = DATA_STATE; |
1847 |
|
## Reconsume. |
1848 |
|
!!!emit ($self->{current_token}); # start tag or end tag |
1849 |
|
redo A; |
1850 |
} else { |
} else { |
1851 |
!!!cp ('124.1'); |
!!!cp ('124.1'); |
1852 |
!!!parse-error (type => 'no space between attributes'); |
!!!parse-error (type => 'no space between attributes'); |
1879 |
!!!emit ($self->{current_token}); # start tag or end tag |
!!!emit ($self->{current_token}); # start tag or end tag |
1880 |
|
|
1881 |
redo A; |
redo A; |
1882 |
|
} elsif ($self->{next_char} == -1) { |
1883 |
|
!!!parse-error (type => 'unclosed tag'); |
1884 |
|
if ($self->{current_token}->{type} == START_TAG_TOKEN) { |
1885 |
|
!!!cp (124.7); |
1886 |
|
$self->{last_emitted_start_tag_name} = $self->{current_token}->{tag_name}; |
1887 |
|
} elsif ($self->{current_token}->{type} == END_TAG_TOKEN) { |
1888 |
|
if ($self->{current_token}->{attributes}) { |
1889 |
|
!!!cp (124.5); |
1890 |
|
!!!parse-error (type => 'end tag attribute'); |
1891 |
|
} else { |
1892 |
|
## NOTE: This state should never be reached. |
1893 |
|
!!!cp (124.6); |
1894 |
|
} |
1895 |
|
} else { |
1896 |
|
die "$0: $self->{current_token}->{type}: Unknown token type"; |
1897 |
|
} |
1898 |
|
$self->{state} = DATA_STATE; |
1899 |
|
## Reconsume. |
1900 |
|
!!!emit ($self->{current_token}); # start tag or end tag |
1901 |
|
redo A; |
1902 |
} else { |
} else { |
1903 |
!!!cp ('124.4'); |
!!!cp ('124.4'); |
1904 |
!!!parse-error (type => 'nestc'); |
!!!parse-error (type => 'nestc'); |