/[suikacvs]/markup/html/whatpm/Whatpm/HTML.pm.src
Suika

Diff of /markup/html/whatpm/Whatpm/HTML.pm.src

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.140 by wakaba, Sat May 24 09:59:52 2008 UTC revision 1.141 by wakaba, Sat May 24 10:18:26 2008 UTC
# Line 1827  sub _get_next_token ($) { Line 1827  sub _get_next_token ($) {
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');
# Line 1859  sub _get_next_token ($) { Line 1879  sub _get_next_token ($) {
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');

Legend:
Removed from v.1.140  
changed lines
  Added in v.1.141

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24