/[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.29 by wakaba, Mon Jun 25 11:05:57 2007 UTC revision 1.30 by wakaba, Sat Jun 30 13:12:32 2007 UTC
# Line 327  sub _get_next_token ($) { Line 327  sub _get_next_token ($) {
327        if ($self->{content_model_flag} eq 'RCDATA' or        if ($self->{content_model_flag} eq 'RCDATA' or
328            $self->{content_model_flag} eq 'CDATA') {            $self->{content_model_flag} eq 'CDATA') {
329          if (defined $self->{last_emitted_start_tag_name}) {          if (defined $self->{last_emitted_start_tag_name}) {
330              ## NOTE: <http://krijnhoetmer.nl/irc-logs/whatwg/20070626#l-564>
331            my @next_char;            my @next_char;
332            TAGNAME: for (my $i = 0; $i < length $self->{last_emitted_start_tag_name}; $i++) {            TAGNAME: for (my $i = 0; $i < length $self->{last_emitted_start_tag_name}; $i++) {
333              push @next_char, $self->{next_input_character};              push @next_char, $self->{next_input_character};
# Line 1018  sub _get_next_token ($) { Line 1019  sub _get_next_token ($) {
1019          }          }
1020        }        }
1021    
1022        !!!parse-error (type => 'bogus comment open');        !!!parse-error (type => 'bogus comment');
1023        $self->{next_input_character} = shift @next_char;        $self->{next_input_character} = shift @next_char;
1024        !!!back-next-input-character (@next_char);        !!!back-next-input-character (@next_char);
1025        $self->{state} = 'bogus comment';        $self->{state} = 'bogus comment';
# Line 1487  sub _get_next_token ($) { Line 1488  sub _get_next_token ($) {
1488    
1489          redo A;          redo A;
1490        } else {        } else {
1491          !!!parse-error (type => 'string after PUBLIC literal');          !!!parse-error (type => 'string after SYSTEM');
1492          $self->{state} = 'bogus DOCTYPE';          $self->{state} = 'bogus DOCTYPE';
1493          !!!next-input-character;          !!!next-input-character;
1494          redo A;          redo A;
# Line 1655  sub _tokenize_attempt_to_consume_an_enti Line 1656  sub _tokenize_attempt_to_consume_an_enti
1656            !!!parse-error (type => 'CR character reference');            !!!parse-error (type => 'CR character reference');
1657            $code = 0x000A;            $code = 0x000A;
1658          } elsif (0x80 <= $code and $code <= 0x9F) {          } elsif (0x80 <= $code and $code <= 0x9F) {
1659            !!!parse-error (type => sprintf 'c1 entity:U+%04X', $code);            !!!parse-error (type => sprintf 'C1 character reference:U+%04X', $code);
1660            $code = $c1_entity_char->{$code};            $code = $c1_entity_char->{$code};
1661          }          }
1662    
# Line 1690  sub _tokenize_attempt_to_consume_an_enti Line 1691  sub _tokenize_attempt_to_consume_an_enti
1691          !!!parse-error (type => 'CR character reference');          !!!parse-error (type => 'CR character reference');
1692          $code = 0x000A;          $code = 0x000A;
1693        } elsif (0x80 <= $code and $code <= 0x9F) {        } elsif (0x80 <= $code and $code <= 0x9F) {
1694          !!!parse-error (type => sprintf 'c1 entity:U+%04X', $code);          !!!parse-error (type => sprintf 'C1 character reference:U+%04X', $code);
1695          $code = $c1_entity_char->{$code};          $code = $c1_entity_char->{$code};
1696        }        }
1697                
# Line 1744  sub _tokenize_attempt_to_consume_an_enti Line 1745  sub _tokenize_attempt_to_consume_an_enti
1745      if ($match > 0) {      if ($match > 0) {
1746        return {type => 'character', data => $value};        return {type => 'character', data => $value};
1747      } elsif ($match < 0) {      } elsif ($match < 0) {
1748        !!!parse-error (type => 'refc');        !!!parse-error (type => 'no refc');
1749        return {type => 'character', data => $value};        return {type => 'character', data => $value};
1750      } else {      } else {
1751        !!!parse-error (type => 'bare ero');        !!!parse-error (type => 'bare ero');
# Line 3434  sub _tree_construction_main ($) { Line 3435  sub _tree_construction_main ($) {
3435                  !!!next-token;                  !!!next-token;
3436                  redo B;                  redo B;
3437                } elsif ($self->{insertion_mode} eq 'in head noscript') {                } elsif ($self->{insertion_mode} eq 'in head noscript') {
3438                  !!!parse-error (type => 'noscript in noscript');                  !!!parse-error (type => 'in noscript:noscript');
3439                  ## Ignore the token                  ## Ignore the token
3440                  redo B;                  redo B;
3441                } else {                } else {
# Line 5025  sub _tree_construction_main ($) { Line 5026  sub _tree_construction_main ($) {
5026            }            }
5027                        
5028            if (defined $token->{tag_name}) {            if (defined $token->{tag_name}) {
5029              !!!parse-error (type => 'in frameset:'.$token->{tag_name});              !!!parse-error (type => 'in frameset:'.($token->{type} eq 'end tag' ? '/' : '').$token->{tag_name});
5030            } else {            } else {
5031              !!!parse-error (type => 'in frameset:#'.$token->{type});              !!!parse-error (type => 'in frameset:#'.$token->{type});
5032            }            }
# Line 5069  sub _tree_construction_main ($) { Line 5070  sub _tree_construction_main ($) {
5070            }            }
5071                        
5072            if (defined $token->{tag_name}) {            if (defined $token->{tag_name}) {
5073              !!!parse-error (type => 'after frameset:'.$token->{tag_name});              !!!parse-error (type => 'after frameset:'.($token->{tag_name} eq 'end tag' ? '/' : '').$token->{tag_name});
5074            } else {            } else {
5075              !!!parse-error (type => 'after frameset:#'.$token->{type});              !!!parse-error (type => 'after frameset:#'.$token->{type});
5076            }            }
# Line 5119  sub _tree_construction_main ($) { Line 5120  sub _tree_construction_main ($) {
5120          redo B;          redo B;
5121        } elsif ($token->{type} eq 'start tag' or        } elsif ($token->{type} eq 'start tag' or
5122                 $token->{type} eq 'end tag') {                 $token->{type} eq 'end tag') {
5123          !!!parse-error (type => 'after html:'.$token->{tag_name});          !!!parse-error (type => 'after html:'.($token->{type} eq 'end tag' ? '/' : '').$token->{tag_name});
5124          $phase = 'main';          $phase = 'main';
5125          ## reprocess          ## reprocess
5126          redo B;          redo B;

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

[email protected]
ViewVC Help
Powered by ViewVC 1.1.24