Changeset 234

Show
Ignore:
Timestamp:
05/09/2006 00:16:58 (3 years ago)
Author:
why
Message:
  • ext/ruby/ext/syck/rubyext.c: go back to using rb_iterate, since trunk always supports the latest version of Ruby.
  • lib/token.re: readable error for TABs in indentation.
  • README: updated PHP instructions, version 0.65.
Location:
trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/README

    r226 r234  
    44                             . syck . 
    55 
    6                          [ version 0.60 ] 
     6                         [ version 0.65 ] 
    77 
    88 
     
    6161You'll need to `make install' as described above. 
    6262 
     63   ln -s lib include    # or cp -r lib include 
    6364   cd ext/php/ 
    64    sh make_module.sh 
     65   phpize 
     66   ./configure --with-syck=../.. 
     67   make 
    6568   sudo make install 
    6669 
  • trunk/ext/ruby/README

    r90 r234  
    2020--- %YAML:1.0 
    2121title: YAML.rb 
    22 version: 0.60 
     22version: 0.65 
    2323author: [Why the Lucky Stiff, yaml-core@whytheluckystiff.net] 
    2424websites: [http://www.yaml.org, http://yaml4r.sf.net, http://sf.net/projects/yaml4r/] 
  • trunk/ext/ruby/ext/syck/rubyext.c

    r233 r234  
    579579                            tmp = rb_ary_reverse( tmp ); 
    580580                            rb_ary_push( tmp, obj ); 
    581                             rb_block_call( tmp, s_each, 0, 0, syck_merge_i, dup ); 
     581                            rb_iterate( rb_each, tmp, syck_merge_i, dup ); 
    582582                            obj = dup; 
    583583                            skip_aset = 1; 
     
    796796    rb_ivar_set(self, s_options, options); 
    797797    rb_ivar_set(self, s_input, Qnil); 
     798    rb_ivar_set(self, s_resolver, Qnil); 
    798799    return self; 
    799800} 
     
    10141015                            v = rb_ary_reverse( v ); 
    10151016                            rb_ary_push( v, obj ); 
    1016                             rb_block_call( v, s_each, 0, 0, syck_merge_i, dup ); 
     1017                            rb_iterate( rb_each, v, syck_merge_i, dup ); 
    10171018                            obj = dup; 
    10181019                            skip_aset = 1; 
     
    11831184                else if ( !NIL_P( obj ) && rb_obj_is_instance_of( val, rb_cHash ) ) 
    11841185                { 
    1185                     rb_block_call( val, s_each, 0, 0, syck_set_ivars, obj ); 
     1186                    rb_iterate( rb_each, val, syck_set_ivars, obj ); 
    11861187                } 
    11871188            } 
  • trunk/lib/token.c

    r233 r234  
    1 /* Generated by re2c 0.10.1 on Mon May  8 21:26:43 2006 */ 
     1/* Generated by re2c 0.10.1 on Mon May  8 23:12:27 2006 */ 
    22#line 1 "token.re" 
    33/* 
     
    199199            NEWLINE(indent); \ 
    200200        } \ 
     201        else if ( *indent == '\t' ) \ 
     202        { \ 
     203            syckerror("TAB found in your indentation!"); \ 
     204            return 0; \ 
     205        } \ 
    201206    } \ 
    202207    ict = 0; \ 
     
    291296    } 
    292297 
    293 #line 315 "token.re" 
     298#line 320 "token.re" 
    294299 
    295300 
     
    304309 
    305310 
    306 #line 307 "<stdout>" 
     311#line 312 "<stdout>" 
    307312{ 
    308313        YYCTYPE yych; 
     
    330335        } 
    331336yy3: 
    332 #line 374 "token.re" 
     337#line 379 "token.re" 
    333338        {   YYPOS(0); 
    334339                        goto Document;  
    335340                    } 
    336 #line 337 "<stdout>" 
     341#line 342 "<stdout>" 
    337342yy4: 
    338343        yyaccept = 0; 
     
    344349yy5: 
    345350        ++YYCURSOR; 
    346 #line 356 "token.re" 
     351#line 361 "token.re" 
    347352        {   eat_comments( parser );  
    348353                        goto Header; 
    349354                    } 
    350 #line 351 "<stdout>" 
     355#line 356 "<stdout>" 
    351356yy7: 
    352357        ++YYCURSOR; 
    353 #line 360 "token.re" 
     358#line 365 "token.re" 
    354359        {   SyckLevel *lvl = CURRENT_LEVEL(); 
    355360                        ENSURE_YAML_IEND(lvl, -1); 
     
    357362                        return 0;  
    358363                    } 
    359 #line 360 "<stdout>" 
     364#line 365 "<stdout>" 
    360365yy9: 
    361366        yyaccept = 1; 
     
    363368        goto yy18; 
    364369yy10: 
    365 #line 366 "token.re" 
     370#line 371 "token.re" 
    366371        {   GOBBLE_UP_YAML_INDENT( doc_level, YYTOKEN ); 
    367372                        goto Header;  
    368373                    } 
    369 #line 370 "<stdout>" 
     374#line 375 "<stdout>" 
    370375yy11: 
    371376        yych = *++YYCURSOR; 
     
    379384        goto yy16; 
    380385yy13: 
    381 #line 370 "token.re" 
     386#line 375 "token.re" 
    382387        {   doc_level = YYCURSOR - YYLINEPTR; 
    383388                        goto Header; 
    384389                    } 
    385 #line 386 "<stdout>" 
     390#line 391 "<stdout>" 
    386391yy14: 
    387392        yych = *++YYCURSOR; 
     
    404409yy18: 
    405410        switch(yych){ 
     411        case 0x09: 
    406412        case 0x0A: 
    407413        case ' ':       goto yy17; 
     
    440446        ++YYCURSOR; 
    441447yy24: 
    442 #line 342 "token.re" 
     448#line 347 "token.re" 
    443449        {   SyckLevel *lvl = CURRENT_LEVEL(); 
    444450                        if ( lvl->status == syck_lvl_header ) 
     
    454460                        return 0;  
    455461                    } 
    456 #line 457 "<stdout>" 
     462#line 463 "<stdout>" 
    457463yy25: 
    458464        ++YYCURSOR; 
     
    486492        ++YYCURSOR; 
    487493yy31: 
    488 #line 328 "token.re" 
     494#line 333 "token.re" 
    489495        {   SyckLevel *lvl = CURRENT_LEVEL(); 
    490496                        if ( lvl->status == syck_lvl_header ) 
     
    500506                        } 
    501507                    } 
    502 #line 503 "<stdout>" 
     508#line 509 "<stdout>" 
    503509yy32: 
    504510        ++YYCURSOR; 
     
    516522        } 
    517523} 
    518 #line 378 "token.re" 
     524#line 383 "token.re" 
    519525 
    520526 
     
    530536 
    531537 
    532 #line 533 "<stdout>" 
     538#line 539 "<stdout>" 
    533539{ 
    534540        YYCTYPE yych; 
     
    565571        goto yy92; 
    566572yy38: 
    567 #line 392 "token.re" 
     573#line 397 "token.re" 
    568574        {   /* Isolate spaces */ 
    569575                        int indt_len; 
     
    593599                        return YAML_INDENT; 
    594600                    } 
    595 #line 596 "<stdout>" 
     601#line 602 "<stdout>" 
    596602yy39: 
    597603        ++YYCURSOR; 
     
    601607        } 
    602608yy40: 
    603 #line 500 "token.re" 
     609#line 505 "token.re" 
    604610        {   ENSURE_YAML_IOPEN(lvl, doc_level, 1); 
    605611                        goto Plain;  
    606612                    } 
    607 #line 608 "<stdout>" 
     613#line 614 "<stdout>" 
    608614yy41: 
    609615        ++YYCURSOR; 
    610 #line 420 "token.re" 
     616#line 425 "token.re" 
    611617        {   ENSURE_YAML_IOPEN(lvl, doc_level, 1); 
    612618                        lvl = CURRENT_LEVEL(); 
     
    614620                        return YYTOKEN[0];  
    615621                    } 
    616 #line 617 "<stdout>" 
     622#line 623 "<stdout>" 
    617623yy43: 
    618624        ++YYCURSOR; 
    619 #line 426 "token.re" 
     625#line 431 "token.re" 
    620626        {   ENSURE_YAML_IOPEN(lvl, doc_level, 1); 
    621627                        lvl = CURRENT_LEVEL(); 
     
    623629                        return YYTOKEN[0];  
    624630                    } 
    625 #line 626 "<stdout>" 
     631#line 632 "<stdout>" 
    626632yy45: 
    627633        ++YYCURSOR; 
    628 #line 432 "token.re" 
     634#line 437 "token.re" 
    629635        {   POP_LEVEL(); 
    630636                        return YYTOKEN[0];  
    631637                    } 
    632 #line 633 "<stdout>" 
     638#line 639 "<stdout>" 
    633639yy47: 
    634640        yyaccept = 1; 
     
    789795yy51: 
    790796        ++YYCURSOR; 
    791 #line 474 "token.re" 
     797#line 479 "token.re" 
    792798        {   goto TransferMethod; } 
    793 #line 794 "<stdout>" 
     799#line 800 "<stdout>" 
    794800yy53: 
    795801        ++YYCURSOR; 
    796 #line 476 "token.re" 
     802#line 481 "token.re" 
    797803        {   ENSURE_YAML_IOPEN(lvl, doc_level, 1); 
    798804                        goto SingleQuote; } 
    799 #line 800 "<stdout>" 
     805#line 806 "<stdout>" 
    800806yy55: 
    801807        ++YYCURSOR; 
    802 #line 479 "token.re" 
     808#line 484 "token.re" 
    803809        {   ENSURE_YAML_IOPEN(lvl, doc_level, 1); 
    804810                        goto DoubleQuote; } 
    805 #line 806 "<stdout>" 
     811#line 812 "<stdout>" 
    806812yy57: 
    807813        yyaccept = 1; 
     
    827833yy58: 
    828834        ++YYCURSOR; 
    829 #line 489 "token.re" 
     835#line 494 "token.re" 
    830836        {   eat_comments( parser );  
    831837                        goto Document; 
    832838                    } 
    833 #line 834 "<stdout>" 
     839#line 840 "<stdout>" 
    834840yy60: 
    835841        ++YYCURSOR; 
     
    837843        goto yy66; 
    838844yy61: 
    839 #line 493 "token.re" 
     845#line 498 "token.re" 
    840846        {   goto Document; } 
    841 #line 842 "<stdout>" 
     847#line 848 "<stdout>" 
    842848yy62: 
    843849        ++YYCURSOR; 
    844 #line 495 "token.re" 
     850#line 500 "token.re" 
    845851        {   ENSURE_YAML_IEND(lvl, -1); 
    846852                        YYPOS(0); 
    847853                        return 0;  
    848854                    } 
    849 #line 850 "<stdout>" 
     855#line 856 "<stdout>" 
    850856yy64: 
    851857        yych = *++YYCURSOR; 
     
    892898        ++YYCURSOR; 
    893899yy71: 
    894 #line 482 "token.re" 
     900#line 487 "token.re" 
    895901        {   if ( is_newline( YYCURSOR - 1 ) )  
    896902                        { 
     
    899905                        goto ScalarBlock;  
    900906                    } 
    901 #line 902 "<stdout>" 
     907#line 908 "<stdout>" 
    902908yy72: 
    903909        ++YYCURSOR; 
     
    986992        } 
    987993yy77: 
    988 #line 469 "token.re" 
     994#line 474 "token.re" 
    989995        {   ENSURE_YAML_IOPEN(lvl, doc_level, 1); 
    990996                        sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 ); 
    991997                        return YAML_ALIAS; 
    992998                    } 
    993 #line 994 "<stdout>" 
     999#line 1000 "<stdout>" 
    9941000yy78: 
    9951001        ++YYCURSOR; 
     
    10641070        } 
    10651071yy80: 
    1066 #line 458 "token.re" 
     1072#line 463 "token.re" 
    10671073        {   sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 ); 
    10681074 
     
    10751081                        return YAML_ANCHOR; 
    10761082                    } 
    1077 #line 1078 "<stdout>" 
     1083#line 1084 "<stdout>" 
    10781084yy81: 
    10791085        ++YYCURSOR; 
    10801086yy82: 
    1081 #line 444 "token.re" 
     1087#line 449 "token.re" 
    10821088        {   ENSURE_YAML_IOPEN(lvl, YYTOKEN - YYLINEPTR, 1); 
    10831089                        FORCE_NEXT_TOKEN(YAML_IOPEN); 
     
    10931099                        return YYTOKEN[0];  
    10941100                    } 
    1095 #line 1096 "<stdout>" 
     1101#line 1102 "<stdout>" 
    10961102yy83: 
    10971103        ++YYCURSOR; 
     
    11111117        ++YYCURSOR; 
    11121118yy87: 
    1113 #line 436 "token.re" 
     1119#line 441 "token.re" 
    11141120        {   if ( *YYTOKEN == ':' && lvl->status != syck_lvl_imap && lvl->status != syck_lvl_iseq ) 
    11151121                        { 
     
    11191125                        return YYTOKEN[0];  
    11201126                    } 
    1121 #line 1122 "<stdout>" 
     1127#line 1128 "<stdout>" 
    11221128yy88: 
    11231129        ++YYCURSOR; 
     
    11411147yy92: 
    11421148        switch(yych){ 
     1149        case 0x09: 
    11431150        case 0x0A: 
    11441151        case ' ':       goto yy91; 
     
    11551162        } 
    11561163} 
    1157 #line 504 "token.re" 
     1164#line 509 "token.re" 
    11581165 
    11591166    } 
     
    11641171 
    11651172 
    1166 #line 1167 "<stdout>" 
     1173#line 1174 "<stdout>" 
    11671174{ 
    11681175        YYCTYPE yych; 
     
    12651272        } 
    12661273yy98: 
    1267 #line 517 "token.re" 
     1274#line 522 "token.re" 
    12681275        {   YYCURSOR = YYTOKTMP; 
    12691276                        return YAML_DOCSEP; 
    12701277                    } 
    1271 #line 1272 "<stdout>" 
     1278#line 1279 "<stdout>" 
    12721279yy99: 
    12731280        ++YYCURSOR; 
     
    12751282        goto yy103; 
    12761283yy100: 
    1277 #line 515 "token.re" 
     1284#line 520 "token.re" 
    12781285        {   goto Directive; } 
    1279 #line 1280 "<stdout>" 
     1286#line 1287 "<stdout>" 
    12801287yy101: 
    12811288        yych = *++YYCURSOR; 
     
    15391546        } 
    15401547yy109: 
    1541 #line 513 "token.re" 
     1548#line 518 "token.re" 
    15421549        {   goto Directive; } 
    1543 #line 1544 "<stdout>" 
     1550#line 1551 "<stdout>" 
    15441551} 
    1545 #line 520 "token.re" 
     1552#line 525 "token.re" 
    15461553 
    15471554 
     
    15661573 
    15671574 
    1568 #line 1569 "<stdout>" 
     1575#line 1576 "<stdout>" 
    15691576{ 
    15701577        YYCTYPE yych; 
     
    15891596        goto yy142; 
    15901597yy113: 
    1591 #line 543 "token.re" 
     1598#line 548 "token.re" 
    15921599        {   int indt_len, nl_count = 0; 
    15931600                        SyckLevel *lvl; 
     
    16251632                        goto Plain2;  
    16261633                    } 
    1627 #line 1628 "<stdout>" 
     1634#line 1635 "<stdout>" 
    16281635yy114: 
    16291636        ++YYCURSOR; 
     
    16331640        } 
    16341641yy115: 
    1635 #line 630 "token.re" 
     1642#line 635 "token.re" 
    16361643        {   QUOTECATS(qstr, qcapa, qidx, YYTOKEN, YYCURSOR - YYTOKEN); 
    16371644                        goto Plain2; 
    16381645                    } 
    1639 #line 1640 "<stdout>" 
     1646#line 1647 "<stdout>" 
    16401647yy116: 
    16411648        yyaccept = 1; 
     
    16581665yy118: 
    16591666        ++YYCURSOR; 
    1660 #line 592 "token.re" 
     1667#line 597 "token.re" 
    16611668        {   if ( plvl->status != syck_lvl_imap ) 
    16621669                        { 
     
    16691676                        RETURN_IMPLICIT(); 
    16701677                    } 
    1671 #line 1672 "<stdout>" 
     1678#line 1679 "<stdout>" 
    16721679yy120: 
    16731680        ++YYCURSOR; 
    1674 #line 603 "token.re" 
     1681#line 608 "token.re" 
    16751682        {   if ( plvl->status != syck_lvl_iseq ) 
    16761683                        { 
     
    16831690                        RETURN_IMPLICIT(); 
    16841691                    } 
    1685 #line 1686 "<stdout>" 
     1692#line 1693 "<stdout>" 
    16861693yy122: 
    16871694        ++YYCURSOR; 
     
    16911698        } 
    16921699yy123: 
    1693 #line 620 "token.re" 
     1700#line 625 "token.re" 
    16941701        {   if ( qidx == 0 )  
    16951702                        { 
     
    17011708                        } 
    17021709                    } 
    1703 #line 1704 "<stdout>" 
     1710#line 1711 "<stdout>" 
    17041711yy124: 
    17051712        ++YYCURSOR; 
    1706 #line 618 "token.re" 
     1713#line 623 "token.re" 
    17071714        {   RETURN_IMPLICIT(); } 
    1708 #line 1709 "<stdout>" 
     1715#line 1716 "<stdout>" 
    17091716yy126: 
    17101717        yych = *++YYCURSOR; 
     
    17151722yy128: 
    17161723        ++YYCURSOR; 
    1717 #line 614 "token.re" 
     1724#line 619 "token.re" 
    17181725        {   eat_comments( parser );  
    17191726                        RETURN_IMPLICIT(); 
    17201727                    } 
    1721 #line 1722 "<stdout>" 
     1728#line 1729 "<stdout>" 
    17221729yy130: 
    17231730        ++YYCURSOR; 
    17241731yy131: 
    1725 #line 581 "token.re" 
     1732#line 586 "token.re" 
    17261733        {   if ( plvl->status != syck_lvl_iseq && plvl->status != syck_lvl_imap ) 
    17271734                        { 
     
    17341741                        RETURN_IMPLICIT(); 
    17351742                    } 
    1736 #line 1737 "<stdout>" 
     1743#line 1744 "<stdout>" 
    17371744yy132: 
    17381745        ++YYCURSOR; 
     
    17581765        ++YYCURSOR; 
    17591766yy137: 
    1760 #line 579 "token.re" 
     1767#line 584 "token.re" 
    17611768        {   RETURN_IMPLICIT(); } 
    1762 #line 1763 "<stdout>" 
     1769#line 1770 "<stdout>" 
    17631770yy138: 
    17641771        ++YYCURSOR; 
     
    17821789yy142: 
    17831790        switch(yych){ 
     1791        case 0x09: 
    17841792        case 0x0A: 
    17851793        case ' ':       goto yy141; 
     
    17961804        } 
    17971805} 
    1798 #line 634 "token.re" 
     1806#line 639 "token.re" 
    17991807 
    18001808    } 
     
    18101818 
    18111819 
    1812 #line 1813 "<stdout>" 
     1820#line 1821 "<stdout>" 
    18131821{ 
    18141822        YYCTYPE yych;