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

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

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

revision 1.32 by wakaba, Sat Sep 5 09:57:55 2009 UTC revision 1.33 by wakaba, Sat Sep 5 10:41:07 2009 UTC
# Line 862  sub _get_next_token ($) { Line 862  sub _get_next_token ($) {
862          $self->{s_kwd} = '';          $self->{s_kwd} = '';
863          # reconsume          # reconsume
864    
865          !!!emit ($self->{ct}); # start tag or end tag          ## Discard the token.
866            #!!!emit ($self->{ct}); # start tag or end tag
867    
868          redo A;          redo A;
869        } elsif ($self->{nc} == 0x002F) { # /        } elsif ($self->{nc} == 0x002F) { # /
# Line 943  sub _get_next_token ($) { Line 944  sub _get_next_token ($) {
944          $self->{s_kwd} = '';          $self->{s_kwd} = '';
945          # reconsume          # reconsume
946    
947          !!!emit ($self->{ct}); # start tag or end tag          ## Discard the token.
948            #!!!emit ($self->{ct}); # start tag or end tag
949    
950          redo A;          redo A;
951        } else {        } else {
# Line 1069  sub _get_next_token ($) { Line 1071  sub _get_next_token ($) {
1071          $self->{s_kwd} = '';          $self->{s_kwd} = '';
1072          # reconsume          # reconsume
1073    
1074          !!!emit ($self->{ct}); # start tag or end tag          ## Discard the token.
1075            #!!!emit ($self->{ct}); # start tag or end tag
1076    
1077          redo A;          redo A;
1078        } else {        } else {
# Line 1176  sub _get_next_token ($) { Line 1179  sub _get_next_token ($) {
1179          $self->{state} = DATA_STATE;          $self->{state} = DATA_STATE;
1180          # reconsume          # reconsume
1181    
1182          !!!emit ($self->{ct}); # start tag or end tag          ## Discard the token.
1183            #!!!emit ($self->{ct}); # start tag or end tag
1184    
1185          redo A;          redo A;
1186        } else {        } else {
# Line 1275  sub _get_next_token ($) { Line 1279  sub _get_next_token ($) {
1279          $self->{s_kwd} = '';          $self->{s_kwd} = '';
1280          ## reconsume          ## reconsume
1281    
1282          !!!emit ($self->{ct}); # start tag or end tag          ## Discard the token.
1283            #!!!emit ($self->{ct}); # start tag or end tag
1284    
1285          redo A;          redo A;
1286        } else {        } else {
# Line 1356  sub _get_next_token ($) { Line 1361  sub _get_next_token ($) {
1361            $self->{state} = DATA_STATE;            $self->{state} = DATA_STATE;
1362            $self->{s_kwd} = '';            $self->{s_kwd} = '';
1363            ## reconsume            ## reconsume
1364            !!!emit ($self->{ct}); # end tag  
1365              ## Discard the token.
1366              #!!!emit ($self->{ct}); # end tag
1367    
1368            redo A;            redo A;
1369          } elsif ($self->{ct}->{type} == ATTLIST_TOKEN) {          } elsif ($self->{ct}->{type} == ATTLIST_TOKEN) {
1370            ## XML5: No parse error above; not defined yet.            ## XML5: No parse error above; not defined yet.
1371            push @{$self->{ct}->{attrdefs}}, $self->{ca};            push @{$self->{ct}->{attrdefs}}, $self->{ca};
1372            $self->{state} = DOCTYPE_INTERNAL_SUBSET_STATE;            $self->{state} = DOCTYPE_INTERNAL_SUBSET_STATE;
1373            ## Reconsume.            ## Reconsume.
1374            !!!emit ($self->{ct}); # ATTLIST  
1375              ## Discard the token.
1376              #!!!emit ($self->{ct}); # ATTLIST
1377    
1378            redo A;            redo A;
1379          } else {          } else {
1380            die "$0: $self->{ct}->{type}: Unknown token type";            die "$0: $self->{ct}->{type}: Unknown token type";
# Line 1432  sub _get_next_token ($) { Line 1443  sub _get_next_token ($) {
1443            $self->{state} = DATA_STATE;            $self->{state} = DATA_STATE;
1444            $self->{s_kwd} = '';            $self->{s_kwd} = '';
1445            ## reconsume            ## reconsume
1446            !!!emit ($self->{ct}); # start tag  
1447              ## Discard the token.
1448              #!!!emit ($self->{ct}); # start tag
1449    
1450            redo A;            redo A;
1451          } elsif ($self->{ct}->{type} == END_TAG_TOKEN) {          } elsif ($self->{ct}->{type} == END_TAG_TOKEN) {
1452            $self->{content_model} = PCDATA_CONTENT_MODEL; # MUST            $self->{content_model} = PCDATA_CONTENT_MODEL; # MUST
# Line 1447  sub _get_next_token ($) { Line 1461  sub _get_next_token ($) {
1461            $self->{state} = DATA_STATE;            $self->{state} = DATA_STATE;
1462            $self->{s_kwd} = '';            $self->{s_kwd} = '';
1463            ## reconsume            ## reconsume
1464            !!!emit ($self->{ct}); # end tag  
1465              ## Discard the token.
1466              #!!!emit ($self->{ct}); # end tag
1467    
1468            redo A;            redo A;
1469          } elsif ($self->{ct}->{type} == ATTLIST_TOKEN) {          } elsif ($self->{ct}->{type} == ATTLIST_TOKEN) {
1470            ## XML5: No parse error above; not defined yet.            ## XML5: No parse error above; not defined yet.
1471            push @{$self->{ct}->{attrdefs}}, $self->{ca};            push @{$self->{ct}->{attrdefs}}, $self->{ca};
1472            $self->{state} = DOCTYPE_INTERNAL_SUBSET_STATE;            $self->{state} = DOCTYPE_INTERNAL_SUBSET_STATE;
1473            ## Reconsume.            ## Reconsume.
1474            !!!emit ($self->{ct}); # ATTLIST  
1475              ## Discard the token.
1476              #!!!emit ($self->{ct}); # ATTLIST
1477    
1478            redo A;            redo A;
1479          } else {          } else {
1480            die "$0: $self->{ct}->{type}: Unknown token type";            die "$0: $self->{ct}->{type}: Unknown token type";
# Line 1549  sub _get_next_token ($) { Line 1569  sub _get_next_token ($) {
1569            $self->{state} = DATA_STATE;            $self->{state} = DATA_STATE;
1570            $self->{s_kwd} = '';            $self->{s_kwd} = '';
1571            ## reconsume            ## reconsume
1572            !!!emit ($self->{ct}); # start tag  
1573              ## Discard the token.
1574              #!!!emit ($self->{ct}); # start tag
1575              
1576            redo A;            redo A;
1577          } elsif ($self->{ct}->{type} == END_TAG_TOKEN) {          } elsif ($self->{ct}->{type} == END_TAG_TOKEN) {
1578            !!!parse-error (type => 'unclosed tag');            !!!parse-error (type => 'unclosed tag');
# Line 1565  sub _get_next_token ($) { Line 1588  sub _get_next_token ($) {
1588            $self->{state} = DATA_STATE;            $self->{state} = DATA_STATE;
1589            $self->{s_kwd} = '';            $self->{s_kwd} = '';
1590            ## reconsume            ## reconsume
1591            !!!emit ($self->{ct}); # end tag  
1592              ## Discard the token.
1593              #!!!emit ($self->{ct}); # end tag
1594    
1595            redo A;            redo A;
1596          } elsif ($self->{ct}->{type} == ATTLIST_TOKEN) {          } elsif ($self->{ct}->{type} == ATTLIST_TOKEN) {
1597            !!!parse-error (type => 'unclosed md'); ## TODO: type            !!!parse-error (type => 'unclosed md'); ## TODO: type
1598            push @{$self->{ct}->{attrdefs}}, $self->{ca};            push @{$self->{ct}->{attrdefs}}, $self->{ca};
1599            $self->{state} = DOCTYPE_INTERNAL_SUBSET_STATE;            $self->{state} = DOCTYPE_INTERNAL_SUBSET_STATE;
1600            ## Reconsume.            ## Reconsume.
1601            !!!emit ($self->{ct}); # ATTLIST  
1602              ## Discard the token.
1603              #!!!emit ($self->{ct}); # ATTLIST
1604    
1605            redo A;            redo A;
1606          } else {          } else {
1607            die "$0: $self->{ct}->{type}: Unknown token type";            die "$0: $self->{ct}->{type}: Unknown token type";
# Line 1652  sub _get_next_token ($) { Line 1681  sub _get_next_token ($) {
1681          $self->{state} = DATA_STATE;          $self->{state} = DATA_STATE;
1682          $self->{s_kwd} = '';          $self->{s_kwd} = '';
1683          ## Reconsume.          ## Reconsume.
1684          !!!emit ($self->{ct}); # start tag or end tag  
1685            ## Discard the token.
1686            #!!!emit ($self->{ct}); # start tag or end tag
1687    
1688          redo A;          redo A;
1689        } else {        } else {
1690          !!!cp ('124.1');          !!!cp ('124.1');
# Line 1709  sub _get_next_token ($) { Line 1741  sub _get_next_token ($) {
1741          $self->{state} = DATA_STATE;          $self->{state} = DATA_STATE;
1742          $self->{s_kwd} = '';          $self->{s_kwd} = '';
1743          ## Reconsume.          ## Reconsume.
1744          !!!emit ($self->{ct}); # start tag or end tag  
1745            ## Discard the token.
1746            #!!!emit ($self->{ct}); # start tag or end tag
1747    
1748          redo A;          redo A;
1749        } else {        } else {
1750          !!!cp ('124.4');          !!!cp ('124.4');

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24