Changeset 234
- Timestamp:
- 05/09/2006 00:16:58 (3 years ago)
- Location:
- trunk
- Files:
-
- 5 modified
-
README (modified) (2 diffs)
-
ext/ruby/README (modified) (1 diff)
-
ext/ruby/ext/syck/rubyext.c (modified) (4 diffs)
-
lib/token.c (modified) (94 diffs)
-
lib/token.re (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/README
r226 r234 4 4 . syck . 5 5 6 [ version 0.6 0]6 [ version 0.65 ] 7 7 8 8 … … 61 61 You'll need to `make install' as described above. 62 62 63 ln -s lib include # or cp -r lib include 63 64 cd ext/php/ 64 sh make_module.sh 65 phpize 66 ./configure --with-syck=../.. 67 make 65 68 sudo make install 66 69 -
trunk/ext/ruby/README
r90 r234 20 20 --- %YAML:1.0 21 21 title: YAML.rb 22 version: 0.6 022 version: 0.65 23 23 author: [Why the Lucky Stiff, yaml-core@whytheluckystiff.net] 24 24 websites: [http://www.yaml.org, http://yaml4r.sf.net, http://sf.net/projects/yaml4r/] -
trunk/ext/ruby/ext/syck/rubyext.c
r233 r234 579 579 tmp = rb_ary_reverse( tmp ); 580 580 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 ); 582 582 obj = dup; 583 583 skip_aset = 1; … … 796 796 rb_ivar_set(self, s_options, options); 797 797 rb_ivar_set(self, s_input, Qnil); 798 rb_ivar_set(self, s_resolver, Qnil); 798 799 return self; 799 800 } … … 1014 1015 v = rb_ary_reverse( v ); 1015 1016 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 ); 1017 1018 obj = dup; 1018 1019 skip_aset = 1; … … 1183 1184 else if ( !NIL_P( obj ) && rb_obj_is_instance_of( val, rb_cHash ) ) 1184 1185 { 1185 rb_ block_call( val, s_each, 0, 0, syck_set_ivars, obj );1186 rb_iterate( rb_each, val, syck_set_ivars, obj ); 1186 1187 } 1187 1188 } -
trunk/lib/token.c
r233 r234 1 /* Generated by re2c 0.10.1 on Mon May 8 2 1:26:432006 */1 /* Generated by re2c 0.10.1 on Mon May 8 23:12:27 2006 */ 2 2 #line 1 "token.re" 3 3 /* … … 199 199 NEWLINE(indent); \ 200 200 } \ 201 else if ( *indent == '\t' ) \ 202 { \ 203 syckerror("TAB found in your indentation!"); \ 204 return 0; \ 205 } \ 201 206 } \ 202 207 ict = 0; \ … … 291 296 } 292 297 293 #line 3 15"token.re"298 #line 320 "token.re" 294 299 295 300 … … 304 309 305 310 306 #line 3 07"<stdout>"311 #line 312 "<stdout>" 307 312 { 308 313 YYCTYPE yych; … … 330 335 } 331 336 yy3: 332 #line 37 4"token.re"337 #line 379 "token.re" 333 338 { YYPOS(0); 334 339 goto Document; 335 340 } 336 #line 3 37"<stdout>"341 #line 342 "<stdout>" 337 342 yy4: 338 343 yyaccept = 0; … … 344 349 yy5: 345 350 ++YYCURSOR; 346 #line 3 56"token.re"351 #line 361 "token.re" 347 352 { eat_comments( parser ); 348 353 goto Header; 349 354 } 350 #line 35 1"<stdout>"355 #line 356 "<stdout>" 351 356 yy7: 352 357 ++YYCURSOR; 353 #line 36 0"token.re"358 #line 365 "token.re" 354 359 { SyckLevel *lvl = CURRENT_LEVEL(); 355 360 ENSURE_YAML_IEND(lvl, -1); … … 357 362 return 0; 358 363 } 359 #line 36 0"<stdout>"364 #line 365 "<stdout>" 360 365 yy9: 361 366 yyaccept = 1; … … 363 368 goto yy18; 364 369 yy10: 365 #line 3 66"token.re"370 #line 371 "token.re" 366 371 { GOBBLE_UP_YAML_INDENT( doc_level, YYTOKEN ); 367 372 goto Header; 368 373 } 369 #line 37 0"<stdout>"374 #line 375 "<stdout>" 370 375 yy11: 371 376 yych = *++YYCURSOR; … … 379 384 goto yy16; 380 385 yy13: 381 #line 37 0"token.re"386 #line 375 "token.re" 382 387 { doc_level = YYCURSOR - YYLINEPTR; 383 388 goto Header; 384 389 } 385 #line 3 86"<stdout>"390 #line 391 "<stdout>" 386 391 yy14: 387 392 yych = *++YYCURSOR; … … 404 409 yy18: 405 410 switch(yych){ 411 case 0x09: 406 412 case 0x0A: 407 413 case ' ': goto yy17; … … 440 446 ++YYCURSOR; 441 447 yy24: 442 #line 34 2"token.re"448 #line 347 "token.re" 443 449 { SyckLevel *lvl = CURRENT_LEVEL(); 444 450 if ( lvl->status == syck_lvl_header ) … … 454 460 return 0; 455 461 } 456 #line 4 57"<stdout>"462 #line 463 "<stdout>" 457 463 yy25: 458 464 ++YYCURSOR; … … 486 492 ++YYCURSOR; 487 493 yy31: 488 #line 3 28"token.re"494 #line 333 "token.re" 489 495 { SyckLevel *lvl = CURRENT_LEVEL(); 490 496 if ( lvl->status == syck_lvl_header ) … … 500 506 } 501 507 } 502 #line 50 3"<stdout>"508 #line 509 "<stdout>" 503 509 yy32: 504 510 ++YYCURSOR; … … 516 522 } 517 523 } 518 #line 3 78"token.re"524 #line 383 "token.re" 519 525 520 526 … … 530 536 531 537 532 #line 53 3"<stdout>"538 #line 539 "<stdout>" 533 539 { 534 540 YYCTYPE yych; … … 565 571 goto yy92; 566 572 yy38: 567 #line 39 2"token.re"573 #line 397 "token.re" 568 574 { /* Isolate spaces */ 569 575 int indt_len; … … 593 599 return YAML_INDENT; 594 600 } 595 #line 596"<stdout>"601 #line 602 "<stdout>" 596 602 yy39: 597 603 ++YYCURSOR; … … 601 607 } 602 608 yy40: 603 #line 50 0"token.re"609 #line 505 "token.re" 604 610 { ENSURE_YAML_IOPEN(lvl, doc_level, 1); 605 611 goto Plain; 606 612 } 607 #line 6 08"<stdout>"613 #line 614 "<stdout>" 608 614 yy41: 609 615 ++YYCURSOR; 610 #line 42 0"token.re"616 #line 425 "token.re" 611 617 { ENSURE_YAML_IOPEN(lvl, doc_level, 1); 612 618 lvl = CURRENT_LEVEL(); … … 614 620 return YYTOKEN[0]; 615 621 } 616 #line 6 17"<stdout>"622 #line 623 "<stdout>" 617 623 yy43: 618 624 ++YYCURSOR; 619 #line 4 26"token.re"625 #line 431 "token.re" 620 626 { ENSURE_YAML_IOPEN(lvl, doc_level, 1); 621 627 lvl = CURRENT_LEVEL(); … … 623 629 return YYTOKEN[0]; 624 630 } 625 #line 6 26"<stdout>"631 #line 632 "<stdout>" 626 632 yy45: 627 633 ++YYCURSOR; 628 #line 43 2"token.re"634 #line 437 "token.re" 629 635 { POP_LEVEL(); 630 636 return YYTOKEN[0]; 631 637 } 632 #line 63 3"<stdout>"638 #line 639 "<stdout>" 633 639 yy47: 634 640 yyaccept = 1; … … 789 795 yy51: 790 796 ++YYCURSOR; 791 #line 47 4"token.re"797 #line 479 "token.re" 792 798 { goto TransferMethod; } 793 #line 794"<stdout>"799 #line 800 "<stdout>" 794 800 yy53: 795 801 ++YYCURSOR; 796 #line 4 76"token.re"802 #line 481 "token.re" 797 803 { ENSURE_YAML_IOPEN(lvl, doc_level, 1); 798 804 goto SingleQuote; } 799 #line 80 0"<stdout>"805 #line 806 "<stdout>" 800 806 yy55: 801 807 ++YYCURSOR; 802 #line 4 79"token.re"808 #line 484 "token.re" 803 809 { ENSURE_YAML_IOPEN(lvl, doc_level, 1); 804 810 goto DoubleQuote; } 805 #line 8 06"<stdout>"811 #line 812 "<stdout>" 806 812 yy57: 807 813 yyaccept = 1; … … 827 833 yy58: 828 834 ++YYCURSOR; 829 #line 4 89"token.re"835 #line 494 "token.re" 830 836 { eat_comments( parser ); 831 837 goto Document; 832 838 } 833 #line 8 34"<stdout>"839 #line 840 "<stdout>" 834 840 yy60: 835 841 ++YYCURSOR; … … 837 843 goto yy66; 838 844 yy61: 839 #line 49 3"token.re"845 #line 498 "token.re" 840 846 { goto Document; } 841 #line 84 2"<stdout>"847 #line 848 "<stdout>" 842 848 yy62: 843 849 ++YYCURSOR; 844 #line 495"token.re"850 #line 500 "token.re" 845 851 { ENSURE_YAML_IEND(lvl, -1); 846 852 YYPOS(0); 847 853 return 0; 848 854 } 849 #line 85 0"<stdout>"855 #line 856 "<stdout>" 850 856 yy64: 851 857 yych = *++YYCURSOR; … … 892 898 ++YYCURSOR; 893 899 yy71: 894 #line 48 2"token.re"900 #line 487 "token.re" 895 901 { if ( is_newline( YYCURSOR - 1 ) ) 896 902 { … … 899 905 goto ScalarBlock; 900 906 } 901 #line 90 2"<stdout>"907 #line 908 "<stdout>" 902 908 yy72: 903 909 ++YYCURSOR; … … 986 992 } 987 993 yy77: 988 #line 4 69"token.re"994 #line 474 "token.re" 989 995 { ENSURE_YAML_IOPEN(lvl, doc_level, 1); 990 996 sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 ); 991 997 return YAML_ALIAS; 992 998 } 993 #line 994"<stdout>"999 #line 1000 "<stdout>" 994 1000 yy78: 995 1001 ++YYCURSOR; … … 1064 1070 } 1065 1071 yy80: 1066 #line 4 58"token.re"1072 #line 463 "token.re" 1067 1073 { sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 ); 1068 1074 … … 1075 1081 return YAML_ANCHOR; 1076 1082 } 1077 #line 10 78"<stdout>"1083 #line 1084 "<stdout>" 1078 1084 yy81: 1079 1085 ++YYCURSOR; 1080 1086 yy82: 1081 #line 44 4"token.re"1087 #line 449 "token.re" 1082 1088 { ENSURE_YAML_IOPEN(lvl, YYTOKEN - YYLINEPTR, 1); 1083 1089 FORCE_NEXT_TOKEN(YAML_IOPEN); … … 1093 1099 return YYTOKEN[0]; 1094 1100 } 1095 #line 1 096"<stdout>"1101 #line 1102 "<stdout>" 1096 1102 yy83: 1097 1103 ++YYCURSOR; … … 1111 1117 ++YYCURSOR; 1112 1118 yy87: 1113 #line 4 36"token.re"1119 #line 441 "token.re" 1114 1120 { if ( *YYTOKEN == ':' && lvl->status != syck_lvl_imap && lvl->status != syck_lvl_iseq ) 1115 1121 { … … 1119 1125 return YYTOKEN[0]; 1120 1126 } 1121 #line 112 2"<stdout>"1127 #line 1128 "<stdout>" 1122 1128 yy88: 1123 1129 ++YYCURSOR; … … 1141 1147 yy92: 1142 1148 switch(yych){ 1149 case 0x09: 1143 1150 case 0x0A: 1144 1151 case ' ': goto yy91; … … 1155 1162 } 1156 1163 } 1157 #line 50 4"token.re"1164 #line 509 "token.re" 1158 1165 1159 1166 } … … 1164 1171 1165 1172 1166 #line 11 67"<stdout>"1173 #line 1174 "<stdout>" 1167 1174 { 1168 1175 YYCTYPE yych; … … 1265 1272 } 1266 1273 yy98: 1267 #line 5 17"token.re"1274 #line 522 "token.re" 1268 1275 { YYCURSOR = YYTOKTMP; 1269 1276 return YAML_DOCSEP; 1270 1277 } 1271 #line 127 2"<stdout>"1278 #line 1279 "<stdout>" 1272 1279 yy99: 1273 1280 ++YYCURSOR; … … 1275 1282 goto yy103; 1276 1283 yy100: 1277 #line 5 15"token.re"1284 #line 520 "token.re" 1278 1285 { goto Directive; } 1279 #line 128 0"<stdout>"1286 #line 1287 "<stdout>" 1280 1287 yy101: 1281 1288 yych = *++YYCURSOR; … … 1539 1546 } 1540 1547 yy109: 1541 #line 51 3"token.re"1548 #line 518 "token.re" 1542 1549 { goto Directive; } 1543 #line 15 44"<stdout>"1550 #line 1551 "<stdout>" 1544 1551 } 1545 #line 52 0"token.re"1552 #line 525 "token.re" 1546 1553 1547 1554 … … 1566 1573 1567 1574 1568 #line 15 69"<stdout>"1575 #line 1576 "<stdout>" 1569 1576 { 1570 1577 YYCTYPE yych; … … 1589 1596 goto yy142; 1590 1597 yy113: 1591 #line 54 3"token.re"1598 #line 548 "token.re" 1592 1599 { int indt_len, nl_count = 0; 1593 1600 SyckLevel *lvl; … … 1625 1632 goto Plain2; 1626 1633 } 1627 #line 16 28"<stdout>"1634 #line 1635 "<stdout>" 1628 1635 yy114: 1629 1636 ++YYCURSOR; … … 1633 1640 } 1634 1641 yy115: 1635 #line 63 0"token.re"1642 #line 635 "token.re" 1636 1643 { QUOTECATS(qstr, qcapa, qidx, YYTOKEN, YYCURSOR - YYTOKEN); 1637 1644 goto Plain2; 1638 1645 } 1639 #line 164 0"<stdout>"1646 #line 1647 "<stdout>" 1640 1647 yy116: 1641 1648 yyaccept = 1; … … 1658 1665 yy118: 1659 1666 ++YYCURSOR; 1660 #line 59 2"token.re"1667 #line 597 "token.re" 1661 1668 { if ( plvl->status != syck_lvl_imap ) 1662 1669 { … … 1669 1676 RETURN_IMPLICIT(); 1670 1677 } 1671 #line 167 2"<stdout>"1678 #line 1679 "<stdout>" 1672 1679 yy120: 1673 1680 ++YYCURSOR; 1674 #line 60 3"token.re"1681 #line 608 "token.re" 1675 1682 { if ( plvl->status != syck_lvl_iseq ) 1676 1683 { … … 1683 1690 RETURN_IMPLICIT(); 1684 1691 } 1685 #line 16 86"<stdout>"1692 #line 1693 "<stdout>" 1686 1693 yy122: 1687 1694 ++YYCURSOR; … … 1691 1698 } 1692 1699 yy123: 1693 #line 62 0"token.re"1700 #line 625 "token.re" 1694 1701 { if ( qidx == 0 ) 1695 1702 { … … 1701 1708 } 1702 1709 } 1703 #line 17 04"<stdout>"1710 #line 1711 "<stdout>" 1704 1711 yy124: 1705 1712 ++YYCURSOR; 1706 #line 6 18"token.re"1713 #line 623 "token.re" 1707 1714 { RETURN_IMPLICIT(); } 1708 #line 17 09"<stdout>"1715 #line 1716 "<stdout>" 1709 1716 yy126: 1710 1717 yych = *++YYCURSOR; … … 1715 1722 yy128: 1716 1723 ++YYCURSOR; 1717 #line 61 4"token.re"1724 #line 619 "token.re" 1718 1725 { eat_comments( parser ); 1719 1726 RETURN_IMPLICIT(); 1720 1727 } 1721 #line 172 2"<stdout>"1728 #line 1729 "<stdout>" 1722 1729 yy130: 1723 1730 ++YYCURSOR; 1724 1731 yy131: 1725 #line 58 1"token.re"1732 #line 586 "token.re" 1726 1733 { if ( plvl->status != syck_lvl_iseq && plvl->status != syck_lvl_imap ) 1727 1734 { … … 1734 1741 RETURN_IMPLICIT(); 1735 1742 } 1736 #line 17 37"<stdout>"1743 #line 1744 "<stdout>" 1737 1744 yy132: 1738 1745 ++YYCURSOR; … … 1758 1765 ++YYCURSOR; 1759 1766 yy137: 1760 #line 5 79"token.re"1767 #line 584 "token.re" 1761 1768 { RETURN_IMPLICIT(); } 1762 #line 17 63"<stdout>"1769 #line 1770 "<stdout>" 1763 1770 yy138: 1764 1771 ++YYCURSOR; … … 1782 1789 yy142: 1783 1790 switch(yych){ 1791 case 0x09: 1784 1792 case 0x0A: 1785 1793 case ' ': goto yy141; … … 1796 1804 } 1797 1805 } 1798 #line 63 4"token.re"1806 #line 639 "token.re" 1799 1807 1800 1808 } … … 1810 1818 1811 1819 1812 #line 18 13"<stdout>"1820 #line 1821 "<stdout>" 1813 1821 { 1814 1822 YYCTYPE yych;