why-hpricot 0.6.201 → 0.6.204

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -240,7 +240,7 @@ hpricot_ele_alloc(VALUE klass)
240
240
  // the swift, compact parser logic. most of the complicated stuff is done
241
241
  // in the lexer. this step just pairs up the start and end tags.
242
242
  //
243
- VALUE
243
+ void
244
244
  rb_hpricot_token(hpricot_state *S, VALUE sym, VALUE tag, VALUE attr, char *raw, int rawlen, int taint)
245
245
  {
246
246
  VALUE ele, ec = Qnil;
@@ -483,7 +483,7 @@ VALUE hpricot_scan(int argc, VALUE *argv, VALUE self)
483
483
  mark_aval_diff = mark_aval - buf;
484
484
 
485
485
  buffer_size += BUFSIZE;
486
- buf = REALLOC_N(buf, char, buffer_size);
486
+ REALLOC_N(buf, char, buffer_size);
487
487
 
488
488
  space = buffer_size - have;
489
489
 
@@ -497,16 +497,17 @@ VALUE hpricot_scan(int argc, VALUE *argv, VALUE self)
497
497
 
498
498
  if ( rb_respond_to( port, s_read ) )
499
499
  {
500
- str = rb_funcall( port, s_read, 1, INT2FIX(space) );
500
+ str = rb_funcall(port, s_read, 1, INT2FIX(space));
501
+ len = RSTRING_LEN(str);
502
+ memcpy(p, StringValuePtr(str), len);
501
503
  }
502
504
  else
503
505
  {
504
- str = rb_str_substr( port, nread, space );
506
+ len = RSTRING_LEN(port) - nread;
507
+ if (len > space) len = space;
508
+ memcpy(p, StringValuePtr(port) + nread, len);
505
509
  }
506
510
 
507
- StringValue(str);
508
- memcpy( p, RSTRING_PTR(str), RSTRING_LEN(str) );
509
- len = RSTRING_LEN(str);
510
511
  nread += len;
511
512
 
512
513
  /* If this is the last buffer, tack on an EOF. */
@@ -517,7 +518,7 @@ VALUE hpricot_scan(int argc, VALUE *argv, VALUE self)
517
518
 
518
519
  pe = p + len;
519
520
 
520
- #line 521 "hpricot_scan.c"
521
+ #line 522 "hpricot_scan.c"
521
522
  {
522
523
  if ( p == pe )
523
524
  goto _test_eof;
@@ -684,7 +685,7 @@ st204:
684
685
  case 204:
685
686
  #line 1 "hpricot_scan.rl"
686
687
  {ts = p;}
687
- #line 688 "hpricot_scan.c"
688
+ #line 689 "hpricot_scan.c"
688
689
  switch( (*p) ) {
689
690
  case 10: goto tr412;
690
691
  case 60: goto tr413;
@@ -712,7 +713,7 @@ st205:
712
713
  if ( ++p == pe )
713
714
  goto _test_eof205;
714
715
  case 205:
715
- #line 716 "hpricot_scan.c"
716
+ #line 717 "hpricot_scan.c"
716
717
  switch( (*p) ) {
717
718
  case 33: goto st0;
718
719
  case 47: goto st59;
@@ -820,7 +821,7 @@ st10:
820
821
  if ( ++p == pe )
821
822
  goto _test_eof10;
822
823
  case 10:
823
- #line 824 "hpricot_scan.c"
824
+ #line 825 "hpricot_scan.c"
824
825
  switch( (*p) ) {
825
826
  case 32: goto tr13;
826
827
  case 62: goto tr15;
@@ -851,7 +852,7 @@ st11:
851
852
  if ( ++p == pe )
852
853
  goto _test_eof11;
853
854
  case 11:
854
- #line 855 "hpricot_scan.c"
855
+ #line 856 "hpricot_scan.c"
855
856
  switch( (*p) ) {
856
857
  case 32: goto st11;
857
858
  case 62: goto tr18;
@@ -948,7 +949,7 @@ st20:
948
949
  if ( ++p == pe )
949
950
  goto _test_eof20;
950
951
  case 20:
951
- #line 952 "hpricot_scan.c"
952
+ #line 953 "hpricot_scan.c"
952
953
  switch( (*p) ) {
953
954
  case 9: goto st20;
954
955
  case 34: goto tr33;
@@ -981,7 +982,7 @@ st21:
981
982
  if ( ++p == pe )
982
983
  goto _test_eof21;
983
984
  case 21:
984
- #line 985 "hpricot_scan.c"
985
+ #line 986 "hpricot_scan.c"
985
986
  switch( (*p) ) {
986
987
  case 32: goto st22;
987
988
  case 62: goto tr18;
@@ -1019,7 +1020,7 @@ st24:
1019
1020
  if ( ++p == pe )
1020
1021
  goto _test_eof24;
1021
1022
  case 24:
1022
- #line 1023 "hpricot_scan.c"
1023
+ #line 1024 "hpricot_scan.c"
1023
1024
  if ( (*p) == 34 )
1024
1025
  goto tr41;
1025
1026
  goto st24;
@@ -1037,7 +1038,7 @@ st25:
1037
1038
  if ( ++p == pe )
1038
1039
  goto _test_eof25;
1039
1040
  case 25:
1040
- #line 1041 "hpricot_scan.c"
1041
+ #line 1042 "hpricot_scan.c"
1041
1042
  switch( (*p) ) {
1042
1043
  case 32: goto st25;
1043
1044
  case 62: goto tr18;
@@ -1054,7 +1055,7 @@ st26:
1054
1055
  if ( ++p == pe )
1055
1056
  goto _test_eof26;
1056
1057
  case 26:
1057
- #line 1058 "hpricot_scan.c"
1058
+ #line 1059 "hpricot_scan.c"
1058
1059
  if ( (*p) == 93 )
1059
1060
  goto st27;
1060
1061
  goto st26;
@@ -1084,7 +1085,7 @@ st29:
1084
1085
  if ( ++p == pe )
1085
1086
  goto _test_eof29;
1086
1087
  case 29:
1087
- #line 1088 "hpricot_scan.c"
1088
+ #line 1089 "hpricot_scan.c"
1088
1089
  if ( (*p) == 39 )
1089
1090
  goto tr41;
1090
1091
  goto st29;
@@ -1121,7 +1122,7 @@ st31:
1121
1122
  if ( ++p == pe )
1122
1123
  goto _test_eof31;
1123
1124
  case 31:
1124
- #line 1125 "hpricot_scan.c"
1125
+ #line 1126 "hpricot_scan.c"
1125
1126
  switch( (*p) ) {
1126
1127
  case 9: goto st31;
1127
1128
  case 39: goto tr49;
@@ -1171,7 +1172,7 @@ st32:
1171
1172
  if ( ++p == pe )
1172
1173
  goto _test_eof32;
1173
1174
  case 32:
1174
- #line 1175 "hpricot_scan.c"
1175
+ #line 1176 "hpricot_scan.c"
1175
1176
  switch( (*p) ) {
1176
1177
  case 9: goto st33;
1177
1178
  case 32: goto st33;
@@ -1238,7 +1239,7 @@ st34:
1238
1239
  if ( ++p == pe )
1239
1240
  goto _test_eof34;
1240
1241
  case 34:
1241
- #line 1242 "hpricot_scan.c"
1242
+ #line 1243 "hpricot_scan.c"
1242
1243
  switch( (*p) ) {
1243
1244
  case 9: goto tr52;
1244
1245
  case 32: goto tr52;
@@ -1271,7 +1272,7 @@ st35:
1271
1272
  if ( ++p == pe )
1272
1273
  goto _test_eof35;
1273
1274
  case 35:
1274
- #line 1275 "hpricot_scan.c"
1275
+ #line 1276 "hpricot_scan.c"
1275
1276
  switch( (*p) ) {
1276
1277
  case 9: goto st35;
1277
1278
  case 32: goto st35;
@@ -1304,7 +1305,7 @@ st36:
1304
1305
  if ( ++p == pe )
1305
1306
  goto _test_eof36;
1306
1307
  case 36:
1307
- #line 1308 "hpricot_scan.c"
1308
+ #line 1309 "hpricot_scan.c"
1308
1309
  switch( (*p) ) {
1309
1310
  case 32: goto st36;
1310
1311
  case 34: goto st37;
@@ -1332,7 +1333,7 @@ st38:
1332
1333
  if ( ++p == pe )
1333
1334
  goto _test_eof38;
1334
1335
  case 38:
1335
- #line 1336 "hpricot_scan.c"
1336
+ #line 1337 "hpricot_scan.c"
1336
1337
  switch( (*p) ) {
1337
1338
  case 34: goto tr70;
1338
1339
  case 39: goto tr71;
@@ -1356,7 +1357,7 @@ st39:
1356
1357
  if ( ++p == pe )
1357
1358
  goto _test_eof39;
1358
1359
  case 39:
1359
- #line 1360 "hpricot_scan.c"
1360
+ #line 1361 "hpricot_scan.c"
1360
1361
  switch( (*p) ) {
1361
1362
  case 32: goto st39;
1362
1363
  case 39: goto tr41;
@@ -1384,7 +1385,7 @@ st206:
1384
1385
  if ( ++p == pe )
1385
1386
  goto _test_eof206;
1386
1387
  case 206:
1387
- #line 1388 "hpricot_scan.c"
1388
+ #line 1389 "hpricot_scan.c"
1388
1389
  if ( (*p) == 39 )
1389
1390
  goto tr41;
1390
1391
  goto st29;
@@ -1396,7 +1397,7 @@ st40:
1396
1397
  if ( ++p == pe )
1397
1398
  goto _test_eof40;
1398
1399
  case 40:
1399
- #line 1400 "hpricot_scan.c"
1400
+ #line 1401 "hpricot_scan.c"
1400
1401
  switch( (*p) ) {
1401
1402
  case 39: goto tr73;
1402
1403
  case 93: goto st42;
@@ -1410,7 +1411,7 @@ st41:
1410
1411
  if ( ++p == pe )
1411
1412
  goto _test_eof41;
1412
1413
  case 41:
1413
- #line 1414 "hpricot_scan.c"
1414
+ #line 1415 "hpricot_scan.c"
1414
1415
  switch( (*p) ) {
1415
1416
  case 32: goto st41;
1416
1417
  case 62: goto tr76;
@@ -1429,7 +1430,7 @@ st207:
1429
1430
  if ( ++p == pe )
1430
1431
  goto _test_eof207;
1431
1432
  case 207:
1432
- #line 1433 "hpricot_scan.c"
1433
+ #line 1434 "hpricot_scan.c"
1433
1434
  if ( (*p) == 93 )
1434
1435
  goto st27;
1435
1436
  goto st26;
@@ -1459,7 +1460,7 @@ st43:
1459
1460
  if ( ++p == pe )
1460
1461
  goto _test_eof43;
1461
1462
  case 43:
1462
- #line 1463 "hpricot_scan.c"
1463
+ #line 1464 "hpricot_scan.c"
1463
1464
  switch( (*p) ) {
1464
1465
  case 32: goto st43;
1465
1466
  case 34: goto tr41;
@@ -1479,7 +1480,7 @@ st208:
1479
1480
  if ( ++p == pe )
1480
1481
  goto _test_eof208;
1481
1482
  case 208:
1482
- #line 1483 "hpricot_scan.c"
1483
+ #line 1484 "hpricot_scan.c"
1483
1484
  if ( (*p) == 34 )
1484
1485
  goto tr41;
1485
1486
  goto st24;
@@ -1512,7 +1513,7 @@ st46:
1512
1513
  if ( ++p == pe )
1513
1514
  goto _test_eof46;
1514
1515
  case 46:
1515
- #line 1516 "hpricot_scan.c"
1516
+ #line 1517 "hpricot_scan.c"
1516
1517
  switch( (*p) ) {
1517
1518
  case 32: goto tr81;
1518
1519
  case 39: goto tr38;
@@ -1530,7 +1531,7 @@ st47:
1530
1531
  if ( ++p == pe )
1531
1532
  goto _test_eof47;
1532
1533
  case 47:
1533
- #line 1534 "hpricot_scan.c"
1534
+ #line 1535 "hpricot_scan.c"
1534
1535
  switch( (*p) ) {
1535
1536
  case 9: goto st47;
1536
1537
  case 39: goto tr82;
@@ -1651,7 +1652,7 @@ st60:
1651
1652
  if ( ++p == pe )
1652
1653
  goto _test_eof60;
1653
1654
  case 60:
1654
- #line 1655 "hpricot_scan.c"
1655
+ #line 1656 "hpricot_scan.c"
1655
1656
  switch( (*p) ) {
1656
1657
  case 32: goto tr95;
1657
1658
  case 62: goto tr97;
@@ -1681,7 +1682,7 @@ st61:
1681
1682
  if ( ++p == pe )
1682
1683
  goto _test_eof61;
1683
1684
  case 61:
1684
- #line 1685 "hpricot_scan.c"
1685
+ #line 1686 "hpricot_scan.c"
1685
1686
  switch( (*p) ) {
1686
1687
  case 32: goto st61;
1687
1688
  case 62: goto tr99;
@@ -1697,7 +1698,7 @@ st62:
1697
1698
  if ( ++p == pe )
1698
1699
  goto _test_eof62;
1699
1700
  case 62:
1700
- #line 1701 "hpricot_scan.c"
1701
+ #line 1702 "hpricot_scan.c"
1701
1702
  switch( (*p) ) {
1702
1703
  case 32: goto tr100;
1703
1704
  case 47: goto tr102;
@@ -1725,7 +1726,7 @@ st63:
1725
1726
  if ( ++p == pe )
1726
1727
  goto _test_eof63;
1727
1728
  case 63:
1728
- #line 1729 "hpricot_scan.c"
1729
+ #line 1730 "hpricot_scan.c"
1729
1730
  switch( (*p) ) {
1730
1731
  case 32: goto st63;
1731
1732
  case 47: goto st66;
@@ -1775,7 +1776,7 @@ st64:
1775
1776
  if ( ++p == pe )
1776
1777
  goto _test_eof64;
1777
1778
  case 64:
1778
- #line 1779 "hpricot_scan.c"
1779
+ #line 1780 "hpricot_scan.c"
1779
1780
  switch( (*p) ) {
1780
1781
  case 32: goto tr108;
1781
1782
  case 47: goto tr110;
@@ -1820,7 +1821,7 @@ st65:
1820
1821
  if ( ++p == pe )
1821
1822
  goto _test_eof65;
1822
1823
  case 65:
1823
- #line 1824 "hpricot_scan.c"
1824
+ #line 1825 "hpricot_scan.c"
1824
1825
  switch( (*p) ) {
1825
1826
  case 32: goto st65;
1826
1827
  case 47: goto tr115;
@@ -1863,7 +1864,7 @@ st66:
1863
1864
  if ( ++p == pe )
1864
1865
  goto _test_eof66;
1865
1866
  case 66:
1866
- #line 1867 "hpricot_scan.c"
1867
+ #line 1868 "hpricot_scan.c"
1867
1868
  if ( (*p) == 62 )
1868
1869
  goto tr118;
1869
1870
  goto tr39;
@@ -1875,7 +1876,7 @@ st67:
1875
1876
  if ( ++p == pe )
1876
1877
  goto _test_eof67;
1877
1878
  case 67:
1878
- #line 1879 "hpricot_scan.c"
1879
+ #line 1880 "hpricot_scan.c"
1879
1880
  switch( (*p) ) {
1880
1881
  case 13: goto tr120;
1881
1882
  case 32: goto tr120;
@@ -1899,7 +1900,7 @@ st68:
1899
1900
  if ( ++p == pe )
1900
1901
  goto _test_eof68;
1901
1902
  case 68:
1902
- #line 1903 "hpricot_scan.c"
1903
+ #line 1904 "hpricot_scan.c"
1903
1904
  switch( (*p) ) {
1904
1905
  case 13: goto tr126;
1905
1906
  case 32: goto tr126;
@@ -1934,7 +1935,7 @@ st69:
1934
1935
  if ( ++p == pe )
1935
1936
  goto _test_eof69;
1936
1937
  case 69:
1937
- #line 1938 "hpricot_scan.c"
1938
+ #line 1939 "hpricot_scan.c"
1938
1939
  switch( (*p) ) {
1939
1940
  case 32: goto st69;
1940
1941
  case 47: goto tr115;
@@ -1975,7 +1976,7 @@ st70:
1975
1976
  if ( ++p == pe )
1976
1977
  goto _test_eof70;
1977
1978
  case 70:
1978
- #line 1979 "hpricot_scan.c"
1979
+ #line 1980 "hpricot_scan.c"
1979
1980
  switch( (*p) ) {
1980
1981
  case 13: goto tr126;
1981
1982
  case 32: goto tr126;
@@ -2036,7 +2037,7 @@ st71:
2036
2037
  if ( ++p == pe )
2037
2038
  goto _test_eof71;
2038
2039
  case 71:
2039
- #line 2040 "hpricot_scan.c"
2040
+ #line 2041 "hpricot_scan.c"
2040
2041
  switch( (*p) ) {
2041
2042
  case 13: goto tr134;
2042
2043
  case 32: goto tr134;
@@ -2082,7 +2083,7 @@ st72:
2082
2083
  if ( ++p == pe )
2083
2084
  goto _test_eof72;
2084
2085
  case 72:
2085
- #line 2086 "hpricot_scan.c"
2086
+ #line 2087 "hpricot_scan.c"
2086
2087
  switch( (*p) ) {
2087
2088
  case 13: goto tr140;
2088
2089
  case 32: goto tr140;
@@ -2181,7 +2182,7 @@ st73:
2181
2182
  if ( ++p == pe )
2182
2183
  goto _test_eof73;
2183
2184
  case 73:
2184
- #line 2185 "hpricot_scan.c"
2185
+ #line 2186 "hpricot_scan.c"
2185
2186
  switch( (*p) ) {
2186
2187
  case 13: goto tr126;
2187
2188
  case 32: goto tr126;
@@ -2207,7 +2208,7 @@ st74:
2207
2208
  if ( ++p == pe )
2208
2209
  goto _test_eof74;
2209
2210
  case 74:
2210
- #line 2211 "hpricot_scan.c"
2211
+ #line 2212 "hpricot_scan.c"
2211
2212
  switch( (*p) ) {
2212
2213
  case 13: goto tr143;
2213
2214
  case 32: goto tr143;
@@ -2240,7 +2241,7 @@ st75:
2240
2241
  if ( ++p == pe )
2241
2242
  goto _test_eof75;
2242
2243
  case 75:
2243
- #line 2244 "hpricot_scan.c"
2244
+ #line 2245 "hpricot_scan.c"
2244
2245
  switch( (*p) ) {
2245
2246
  case 13: goto tr148;
2246
2247
  case 32: goto tr148;
@@ -2284,7 +2285,7 @@ st76:
2284
2285
  if ( ++p == pe )
2285
2286
  goto _test_eof76;
2286
2287
  case 76:
2287
- #line 2288 "hpricot_scan.c"
2288
+ #line 2289 "hpricot_scan.c"
2288
2289
  switch( (*p) ) {
2289
2290
  case 13: goto tr143;
2290
2291
  case 32: goto tr143;
@@ -2338,7 +2339,7 @@ st78:
2338
2339
  if ( ++p == pe )
2339
2340
  goto _test_eof78;
2340
2341
  case 78:
2341
- #line 2342 "hpricot_scan.c"
2342
+ #line 2343 "hpricot_scan.c"
2342
2343
  switch( (*p) ) {
2343
2344
  case 13: goto tr161;
2344
2345
  case 32: goto tr161;
@@ -2388,7 +2389,7 @@ st79:
2388
2389
  if ( ++p == pe )
2389
2390
  goto _test_eof79;
2390
2391
  case 79:
2391
- #line 2392 "hpricot_scan.c"
2392
+ #line 2393 "hpricot_scan.c"
2392
2393
  switch( (*p) ) {
2393
2394
  case 32: goto st79;
2394
2395
  case 34: goto tr169;
@@ -2418,7 +2419,7 @@ st80:
2418
2419
  if ( ++p == pe )
2419
2420
  goto _test_eof80;
2420
2421
  case 80:
2421
- #line 2422 "hpricot_scan.c"
2422
+ #line 2423 "hpricot_scan.c"
2422
2423
  switch( (*p) ) {
2423
2424
  case 34: goto tr169;
2424
2425
  case 92: goto st81;
@@ -2432,7 +2433,7 @@ st81:
2432
2433
  if ( ++p == pe )
2433
2434
  goto _test_eof81;
2434
2435
  case 81:
2435
- #line 2436 "hpricot_scan.c"
2436
+ #line 2437 "hpricot_scan.c"
2436
2437
  switch( (*p) ) {
2437
2438
  case 34: goto tr174;
2438
2439
  case 92: goto st81;
@@ -2474,7 +2475,7 @@ st82:
2474
2475
  if ( ++p == pe )
2475
2476
  goto _test_eof82;
2476
2477
  case 82:
2477
- #line 2478 "hpricot_scan.c"
2478
+ #line 2479 "hpricot_scan.c"
2478
2479
  switch( (*p) ) {
2479
2480
  case 32: goto tr175;
2480
2481
  case 34: goto tr169;
@@ -2521,7 +2522,7 @@ st83:
2521
2522
  if ( ++p == pe )
2522
2523
  goto _test_eof83;
2523
2524
  case 83:
2524
- #line 2525 "hpricot_scan.c"
2525
+ #line 2526 "hpricot_scan.c"
2525
2526
  switch( (*p) ) {
2526
2527
  case 32: goto st83;
2527
2528
  case 34: goto tr169;
@@ -2570,7 +2571,7 @@ st84:
2570
2571
  if ( ++p == pe )
2571
2572
  goto _test_eof84;
2572
2573
  case 84:
2573
- #line 2574 "hpricot_scan.c"
2574
+ #line 2575 "hpricot_scan.c"
2574
2575
  switch( (*p) ) {
2575
2576
  case 34: goto tr169;
2576
2577
  case 62: goto tr182;
@@ -2702,7 +2703,7 @@ st209:
2702
2703
  if ( ++p == pe )
2703
2704
  goto _test_eof209;
2704
2705
  case 209:
2705
- #line 2706 "hpricot_scan.c"
2706
+ #line 2707 "hpricot_scan.c"
2706
2707
  switch( (*p) ) {
2707
2708
  case 34: goto tr169;
2708
2709
  case 92: goto st81;
@@ -2716,7 +2717,7 @@ st85:
2716
2717
  if ( ++p == pe )
2717
2718
  goto _test_eof85;
2718
2719
  case 85:
2719
- #line 2720 "hpricot_scan.c"
2720
+ #line 2721 "hpricot_scan.c"
2720
2721
  switch( (*p) ) {
2721
2722
  case 13: goto tr183;
2722
2723
  case 32: goto tr183;
@@ -2741,7 +2742,7 @@ st86:
2741
2742
  if ( ++p == pe )
2742
2743
  goto _test_eof86;
2743
2744
  case 86:
2744
- #line 2745 "hpricot_scan.c"
2745
+ #line 2746 "hpricot_scan.c"
2745
2746
  switch( (*p) ) {
2746
2747
  case 13: goto tr188;
2747
2748
  case 32: goto tr188;
@@ -2775,7 +2776,7 @@ st87:
2775
2776
  if ( ++p == pe )
2776
2777
  goto _test_eof87;
2777
2778
  case 87:
2778
- #line 2779 "hpricot_scan.c"
2779
+ #line 2780 "hpricot_scan.c"
2779
2780
  switch( (*p) ) {
2780
2781
  case 13: goto tr188;
2781
2782
  case 32: goto tr188;
@@ -2820,7 +2821,7 @@ st88:
2820
2821
  if ( ++p == pe )
2821
2822
  goto _test_eof88;
2822
2823
  case 88:
2823
- #line 2824 "hpricot_scan.c"
2824
+ #line 2825 "hpricot_scan.c"
2824
2825
  switch( (*p) ) {
2825
2826
  case 13: goto tr191;
2826
2827
  case 32: goto tr191;
@@ -2856,7 +2857,7 @@ st89:
2856
2857
  if ( ++p == pe )
2857
2858
  goto _test_eof89;
2858
2859
  case 89:
2859
- #line 2860 "hpricot_scan.c"
2860
+ #line 2861 "hpricot_scan.c"
2860
2861
  switch( (*p) ) {
2861
2862
  case 13: goto tr153;
2862
2863
  case 32: goto tr153;
@@ -2913,7 +2914,7 @@ st90:
2913
2914
  if ( ++p == pe )
2914
2915
  goto _test_eof90;
2915
2916
  case 90:
2916
- #line 2917 "hpricot_scan.c"
2917
+ #line 2918 "hpricot_scan.c"
2917
2918
  switch( (*p) ) {
2918
2919
  case 13: goto tr161;
2919
2920
  case 32: goto tr161;
@@ -2976,7 +2977,7 @@ st91:
2976
2977
  if ( ++p == pe )
2977
2978
  goto _test_eof91;
2978
2979
  case 91:
2979
- #line 2980 "hpricot_scan.c"
2980
+ #line 2981 "hpricot_scan.c"
2980
2981
  switch( (*p) ) {
2981
2982
  case 13: goto tr200;
2982
2983
  case 32: goto tr200;
@@ -3024,7 +3025,7 @@ st92:
3024
3025
  if ( ++p == pe )
3025
3026
  goto _test_eof92;
3026
3027
  case 92:
3027
- #line 3028 "hpricot_scan.c"
3028
+ #line 3029 "hpricot_scan.c"
3028
3029
  switch( (*p) ) {
3029
3030
  case 13: goto tr206;
3030
3031
  case 32: goto tr206;
@@ -3125,7 +3126,7 @@ st93:
3125
3126
  if ( ++p == pe )
3126
3127
  goto _test_eof93;
3127
3128
  case 93:
3128
- #line 3129 "hpricot_scan.c"
3129
+ #line 3130 "hpricot_scan.c"
3129
3130
  switch( (*p) ) {
3130
3131
  case 13: goto tr161;
3131
3132
  case 32: goto tr161;
@@ -3149,7 +3150,7 @@ st94:
3149
3150
  if ( ++p == pe )
3150
3151
  goto _test_eof94;
3151
3152
  case 94:
3152
- #line 3153 "hpricot_scan.c"
3153
+ #line 3154 "hpricot_scan.c"
3153
3154
  switch( (*p) ) {
3154
3155
  case 13: goto tr161;
3155
3156
  case 32: goto tr161;
@@ -3177,7 +3178,7 @@ st95:
3177
3178
  if ( ++p == pe )
3178
3179
  goto _test_eof95;
3179
3180
  case 95:
3180
- #line 3181 "hpricot_scan.c"
3181
+ #line 3182 "hpricot_scan.c"
3181
3182
  switch( (*p) ) {
3182
3183
  case 13: goto tr191;
3183
3184
  case 32: goto tr191;
@@ -3222,7 +3223,7 @@ st97:
3222
3223
  if ( ++p == pe )
3223
3224
  goto _test_eof97;
3224
3225
  case 97:
3225
- #line 3226 "hpricot_scan.c"
3226
+ #line 3227 "hpricot_scan.c"
3226
3227
  switch( (*p) ) {
3227
3228
  case 13: goto tr220;
3228
3229
  case 32: goto tr220;
@@ -3267,7 +3268,7 @@ st98:
3267
3268
  if ( ++p == pe )
3268
3269
  goto _test_eof98;
3269
3270
  case 98:
3270
- #line 3271 "hpricot_scan.c"
3271
+ #line 3272 "hpricot_scan.c"
3271
3272
  switch( (*p) ) {
3272
3273
  case 32: goto st98;
3273
3274
  case 34: goto tr228;
@@ -3298,7 +3299,7 @@ st99:
3298
3299
  if ( ++p == pe )
3299
3300
  goto _test_eof99;
3300
3301
  case 99:
3301
- #line 3302 "hpricot_scan.c"
3302
+ #line 3303 "hpricot_scan.c"
3302
3303
  switch( (*p) ) {
3303
3304
  case 34: goto tr228;
3304
3305
  case 39: goto tr174;
@@ -3345,7 +3346,7 @@ st100:
3345
3346
  if ( ++p == pe )
3346
3347
  goto _test_eof100;
3347
3348
  case 100:
3348
- #line 3349 "hpricot_scan.c"
3349
+ #line 3350 "hpricot_scan.c"
3349
3350
  switch( (*p) ) {
3350
3351
  case 32: goto st100;
3351
3352
  case 39: goto tr169;
@@ -3375,7 +3376,7 @@ st101:
3375
3376
  if ( ++p == pe )
3376
3377
  goto _test_eof101;
3377
3378
  case 101:
3378
- #line 3379 "hpricot_scan.c"
3379
+ #line 3380 "hpricot_scan.c"
3379
3380
  switch( (*p) ) {
3380
3381
  case 39: goto tr169;
3381
3382
  case 92: goto st102;
@@ -3389,7 +3390,7 @@ st102:
3389
3390
  if ( ++p == pe )
3390
3391
  goto _test_eof102;
3391
3392
  case 102:
3392
- #line 3393 "hpricot_scan.c"
3393
+ #line 3394 "hpricot_scan.c"
3393
3394
  switch( (*p) ) {
3394
3395
  case 39: goto tr228;
3395
3396
  case 92: goto st102;
@@ -3431,7 +3432,7 @@ st103:
3431
3432
  if ( ++p == pe )
3432
3433
  goto _test_eof103;
3433
3434
  case 103:
3434
- #line 3435 "hpricot_scan.c"
3435
+ #line 3436 "hpricot_scan.c"
3435
3436
  switch( (*p) ) {
3436
3437
  case 32: goto tr239;
3437
3438
  case 39: goto tr169;
@@ -3478,7 +3479,7 @@ st104:
3478
3479
  if ( ++p == pe )
3479
3480
  goto _test_eof104;
3480
3481
  case 104:
3481
- #line 3482 "hpricot_scan.c"
3482
+ #line 3483 "hpricot_scan.c"
3482
3483
  switch( (*p) ) {
3483
3484
  case 32: goto st104;
3484
3485
  case 39: goto tr169;
@@ -3527,7 +3528,7 @@ st105:
3527
3528
  if ( ++p == pe )
3528
3529
  goto _test_eof105;
3529
3530
  case 105:
3530
- #line 3531 "hpricot_scan.c"
3531
+ #line 3532 "hpricot_scan.c"
3531
3532
  switch( (*p) ) {
3532
3533
  case 39: goto tr169;
3533
3534
  case 62: goto tr246;
@@ -3659,7 +3660,7 @@ st210:
3659
3660
  if ( ++p == pe )
3660
3661
  goto _test_eof210;
3661
3662
  case 210:
3662
- #line 3663 "hpricot_scan.c"
3663
+ #line 3664 "hpricot_scan.c"
3663
3664
  switch( (*p) ) {
3664
3665
  case 39: goto tr169;
3665
3666
  case 92: goto st102;
@@ -3673,7 +3674,7 @@ st106:
3673
3674
  if ( ++p == pe )
3674
3675
  goto _test_eof106;
3675
3676
  case 106:
3676
- #line 3677 "hpricot_scan.c"
3677
+ #line 3678 "hpricot_scan.c"
3677
3678
  switch( (*p) ) {
3678
3679
  case 13: goto tr248;
3679
3680
  case 32: goto tr248;
@@ -3698,7 +3699,7 @@ st107:
3698
3699
  if ( ++p == pe )
3699
3700
  goto _test_eof107;
3700
3701
  case 107:
3701
- #line 3702 "hpricot_scan.c"
3702
+ #line 3703 "hpricot_scan.c"
3702
3703
  switch( (*p) ) {
3703
3704
  case 13: goto tr255;
3704
3705
  case 32: goto tr255;
@@ -3750,7 +3751,7 @@ st108:
3750
3751
  if ( ++p == pe )
3751
3752
  goto _test_eof108;
3752
3753
  case 108:
3753
- #line 3754 "hpricot_scan.c"
3754
+ #line 3755 "hpricot_scan.c"
3754
3755
  switch( (*p) ) {
3755
3756
  case 13: goto tr255;
3756
3757
  case 32: goto tr255;
@@ -3813,7 +3814,7 @@ st109:
3813
3814
  if ( ++p == pe )
3814
3815
  goto _test_eof109;
3815
3816
  case 109:
3816
- #line 3817 "hpricot_scan.c"
3817
+ #line 3818 "hpricot_scan.c"
3817
3818
  switch( (*p) ) {
3818
3819
  case 13: goto tr263;
3819
3820
  case 32: goto tr263;
@@ -3861,7 +3862,7 @@ st110:
3861
3862
  if ( ++p == pe )
3862
3863
  goto _test_eof110;
3863
3864
  case 110:
3864
- #line 3865 "hpricot_scan.c"
3865
+ #line 3866 "hpricot_scan.c"
3865
3866
  switch( (*p) ) {
3866
3867
  case 13: goto tr269;
3867
3868
  case 32: goto tr269;
@@ -3962,7 +3963,7 @@ st111:
3962
3963
  if ( ++p == pe )
3963
3964
  goto _test_eof111;
3964
3965
  case 111:
3965
- #line 3966 "hpricot_scan.c"
3966
+ #line 3967 "hpricot_scan.c"
3966
3967
  switch( (*p) ) {
3967
3968
  case 13: goto tr255;
3968
3969
  case 32: goto tr255;
@@ -3986,7 +3987,7 @@ st112:
3986
3987
  if ( ++p == pe )
3987
3988
  goto _test_eof112;
3988
3989
  case 112:
3989
- #line 3990 "hpricot_scan.c"
3990
+ #line 3991 "hpricot_scan.c"
3990
3991
  switch( (*p) ) {
3991
3992
  case 13: goto tr255;
3992
3993
  case 32: goto tr255;
@@ -4014,7 +4015,7 @@ st113:
4014
4015
  if ( ++p == pe )
4015
4016
  goto _test_eof113;
4016
4017
  case 113:
4017
- #line 4018 "hpricot_scan.c"
4018
+ #line 4019 "hpricot_scan.c"
4018
4019
  switch( (*p) ) {
4019
4020
  case 13: goto tr272;
4020
4021
  case 32: goto tr272;
@@ -4048,7 +4049,7 @@ st114:
4048
4049
  if ( ++p == pe )
4049
4050
  goto _test_eof114;
4050
4051
  case 114:
4051
- #line 4052 "hpricot_scan.c"
4052
+ #line 4053 "hpricot_scan.c"
4052
4053
  switch( (*p) ) {
4053
4054
  case 13: goto tr277;
4054
4055
  case 32: goto tr277;
@@ -4093,7 +4094,7 @@ st115:
4093
4094
  if ( ++p == pe )
4094
4095
  goto _test_eof115;
4095
4096
  case 115:
4096
- #line 4097 "hpricot_scan.c"
4097
+ #line 4098 "hpricot_scan.c"
4097
4098
  switch( (*p) ) {
4098
4099
  case 13: goto tr272;
4099
4100
  case 32: goto tr272;
@@ -4165,7 +4166,7 @@ st117:
4165
4166
  if ( ++p == pe )
4166
4167
  goto _test_eof117;
4167
4168
  case 117:
4168
- #line 4169 "hpricot_scan.c"
4169
+ #line 4170 "hpricot_scan.c"
4169
4170
  switch( (*p) ) {
4170
4171
  case 13: goto tr220;
4171
4172
  case 32: goto tr220;
@@ -4229,7 +4230,7 @@ st118:
4229
4230
  if ( ++p == pe )
4230
4231
  goto _test_eof118;
4231
4232
  case 118:
4232
- #line 4233 "hpricot_scan.c"
4233
+ #line 4234 "hpricot_scan.c"
4233
4234
  switch( (*p) ) {
4234
4235
  case 13: goto tr285;
4235
4236
  case 32: goto tr285;
@@ -4282,7 +4283,7 @@ st119:
4282
4283
  if ( ++p == pe )
4283
4284
  goto _test_eof119;
4284
4285
  case 119:
4285
- #line 4286 "hpricot_scan.c"
4286
+ #line 4287 "hpricot_scan.c"
4286
4287
  switch( (*p) ) {
4287
4288
  case 32: goto st119;
4288
4289
  case 34: goto tr228;
@@ -4342,7 +4343,7 @@ st120:
4342
4343
  if ( ++p == pe )
4343
4344
  goto _test_eof120;
4344
4345
  case 120:
4345
- #line 4346 "hpricot_scan.c"
4346
+ #line 4347 "hpricot_scan.c"
4346
4347
  switch( (*p) ) {
4347
4348
  case 32: goto tr293;
4348
4349
  case 34: goto tr228;
@@ -4392,7 +4393,7 @@ st121:
4392
4393
  if ( ++p == pe )
4393
4394
  goto _test_eof121;
4394
4395
  case 121:
4395
- #line 4396 "hpricot_scan.c"
4396
+ #line 4397 "hpricot_scan.c"
4396
4397
  switch( (*p) ) {
4397
4398
  case 34: goto tr228;
4398
4399
  case 39: goto tr174;
@@ -4525,7 +4526,7 @@ st211:
4525
4526
  if ( ++p == pe )
4526
4527
  goto _test_eof211;
4527
4528
  case 211:
4528
- #line 4529 "hpricot_scan.c"
4529
+ #line 4530 "hpricot_scan.c"
4529
4530
  switch( (*p) ) {
4530
4531
  case 34: goto tr228;
4531
4532
  case 39: goto tr174;
@@ -4540,7 +4541,7 @@ st122:
4540
4541
  if ( ++p == pe )
4541
4542
  goto _test_eof122;
4542
4543
  case 122:
4543
- #line 4544 "hpricot_scan.c"
4544
+ #line 4545 "hpricot_scan.c"
4544
4545
  switch( (*p) ) {
4545
4546
  case 34: goto tr299;
4546
4547
  case 39: goto tr299;
@@ -4555,7 +4556,7 @@ st123:
4555
4556
  if ( ++p == pe )
4556
4557
  goto _test_eof123;
4557
4558
  case 123:
4558
- #line 4559 "hpricot_scan.c"
4559
+ #line 4560 "hpricot_scan.c"
4559
4560
  switch( (*p) ) {
4560
4561
  case 13: goto tr300;
4561
4562
  case 32: goto tr300;
@@ -4580,7 +4581,7 @@ st124:
4580
4581
  if ( ++p == pe )
4581
4582
  goto _test_eof124;
4582
4583
  case 124:
4583
- #line 4584 "hpricot_scan.c"
4584
+ #line 4585 "hpricot_scan.c"
4584
4585
  switch( (*p) ) {
4585
4586
  case 13: goto tr305;
4586
4587
  case 32: goto tr305;
@@ -4614,7 +4615,7 @@ st125:
4614
4615
  if ( ++p == pe )
4615
4616
  goto _test_eof125;
4616
4617
  case 125:
4617
- #line 4618 "hpricot_scan.c"
4618
+ #line 4619 "hpricot_scan.c"
4618
4619
  switch( (*p) ) {
4619
4620
  case 13: goto tr305;
4620
4621
  case 32: goto tr305;
@@ -4659,7 +4660,7 @@ st126:
4659
4660
  if ( ++p == pe )
4660
4661
  goto _test_eof126;
4661
4662
  case 126:
4662
- #line 4663 "hpricot_scan.c"
4663
+ #line 4664 "hpricot_scan.c"
4663
4664
  switch( (*p) ) {
4664
4665
  case 13: goto tr308;
4665
4666
  case 32: goto tr308;
@@ -4695,7 +4696,7 @@ st127:
4695
4696
  if ( ++p == pe )
4696
4697
  goto _test_eof127;
4697
4698
  case 127:
4698
- #line 4699 "hpricot_scan.c"
4699
+ #line 4700 "hpricot_scan.c"
4699
4700
  switch( (*p) ) {
4700
4701
  case 13: goto tr211;
4701
4702
  case 32: goto tr211;
@@ -4796,7 +4797,7 @@ st128:
4796
4797
  if ( ++p == pe )
4797
4798
  goto _test_eof128;
4798
4799
  case 128:
4799
- #line 4800 "hpricot_scan.c"
4800
+ #line 4801 "hpricot_scan.c"
4800
4801
  switch( (*p) ) {
4801
4802
  case 13: goto tr220;
4802
4803
  case 32: goto tr220;
@@ -4821,7 +4822,7 @@ st129:
4821
4822
  if ( ++p == pe )
4822
4823
  goto _test_eof129;
4823
4824
  case 129:
4824
- #line 4825 "hpricot_scan.c"
4825
+ #line 4826 "hpricot_scan.c"
4825
4826
  switch( (*p) ) {
4826
4827
  case 13: goto tr220;
4827
4828
  case 32: goto tr220;
@@ -4846,7 +4847,7 @@ st130:
4846
4847
  if ( ++p == pe )
4847
4848
  goto _test_eof130;
4848
4849
  case 130:
4849
- #line 4850 "hpricot_scan.c"
4850
+ #line 4851 "hpricot_scan.c"
4850
4851
  switch( (*p) ) {
4851
4852
  case 13: goto tr211;
4852
4853
  case 32: goto tr211;
@@ -4882,7 +4883,7 @@ st131:
4882
4883
  if ( ++p == pe )
4883
4884
  goto _test_eof131;
4884
4885
  case 131:
4885
- #line 4886 "hpricot_scan.c"
4886
+ #line 4887 "hpricot_scan.c"
4886
4887
  switch( (*p) ) {
4887
4888
  case 32: goto tr315;
4888
4889
  case 34: goto tr316;
@@ -4913,7 +4914,7 @@ st132:
4913
4914
  if ( ++p == pe )
4914
4915
  goto _test_eof132;
4915
4916
  case 132:
4916
- #line 4917 "hpricot_scan.c"
4917
+ #line 4918 "hpricot_scan.c"
4917
4918
  switch( (*p) ) {
4918
4919
  case 32: goto tr315;
4919
4920
  case 34: goto tr322;
@@ -4948,7 +4949,7 @@ st133:
4948
4949
  if ( ++p == pe )
4949
4950
  goto _test_eof133;
4950
4951
  case 133:
4951
- #line 4952 "hpricot_scan.c"
4952
+ #line 4953 "hpricot_scan.c"
4952
4953
  switch( (*p) ) {
4953
4954
  case 13: goto tr308;
4954
4955
  case 32: goto tr308;
@@ -4985,7 +4986,7 @@ st134:
4985
4986
  if ( ++p == pe )
4986
4987
  goto _test_eof134;
4987
4988
  case 134:
4988
- #line 4989 "hpricot_scan.c"
4989
+ #line 4990 "hpricot_scan.c"
4989
4990
  switch( (*p) ) {
4990
4991
  case 13: goto tr323;
4991
4992
  case 32: goto tr323;
@@ -5022,7 +5023,7 @@ st135:
5022
5023
  if ( ++p == pe )
5023
5024
  goto _test_eof135;
5024
5025
  case 135:
5025
- #line 5026 "hpricot_scan.c"
5026
+ #line 5027 "hpricot_scan.c"
5026
5027
  switch( (*p) ) {
5027
5028
  case 13: goto tr326;
5028
5029
  case 32: goto tr326;
@@ -5067,7 +5068,7 @@ st137:
5067
5068
  if ( ++p == pe )
5068
5069
  goto _test_eof137;
5069
5070
  case 137:
5070
- #line 5071 "hpricot_scan.c"
5071
+ #line 5072 "hpricot_scan.c"
5071
5072
  switch( (*p) ) {
5072
5073
  case 32: goto tr330;
5073
5074
  case 39: goto tr331;
@@ -5097,7 +5098,7 @@ st138:
5097
5098
  if ( ++p == pe )
5098
5099
  goto _test_eof138;
5099
5100
  case 138:
5100
- #line 5101 "hpricot_scan.c"
5101
+ #line 5102 "hpricot_scan.c"
5101
5102
  switch( (*p) ) {
5102
5103
  case 13: goto tr277;
5103
5104
  case 32: goto tr277;
@@ -5122,7 +5123,7 @@ st139:
5122
5123
  if ( ++p == pe )
5123
5124
  goto _test_eof139;
5124
5125
  case 139:
5125
- #line 5126 "hpricot_scan.c"
5126
+ #line 5127 "hpricot_scan.c"
5126
5127
  switch( (*p) ) {
5127
5128
  case 32: goto tr336;
5128
5129
  case 34: goto tr331;
@@ -5199,7 +5200,7 @@ st144:
5199
5200
  if ( ++p == pe )
5200
5201
  goto _test_eof144;
5201
5202
  case 144:
5202
- #line 5203 "hpricot_scan.c"
5203
+ #line 5204 "hpricot_scan.c"
5203
5204
  switch( (*p) ) {
5204
5205
  case 13: goto tr148;
5205
5206
  case 32: goto tr148;
@@ -5238,7 +5239,7 @@ st146:
5238
5239
  if ( ++p == pe )
5239
5240
  goto _test_eof146;
5240
5241
  case 146:
5241
- #line 5242 "hpricot_scan.c"
5242
+ #line 5243 "hpricot_scan.c"
5242
5243
  switch( (*p) ) {
5243
5244
  case 32: goto st212;
5244
5245
  case 63: goto st146;
@@ -5276,7 +5277,7 @@ st147:
5276
5277
  if ( ++p == pe )
5277
5278
  goto _test_eof147;
5278
5279
  case 147:
5279
- #line 5280 "hpricot_scan.c"
5280
+ #line 5281 "hpricot_scan.c"
5280
5281
  switch( (*p) ) {
5281
5282
  case 32: goto st212;
5282
5283
  case 63: goto st146;
@@ -5355,7 +5356,7 @@ st213:
5355
5356
  if ( ++p == pe )
5356
5357
  goto _test_eof213;
5357
5358
  case 213:
5358
- #line 5359 "hpricot_scan.c"
5359
+ #line 5360 "hpricot_scan.c"
5359
5360
  switch( (*p) ) {
5360
5361
  case 32: goto tr348;
5361
5362
  case 118: goto st150;
@@ -5454,7 +5455,7 @@ st159:
5454
5455
  if ( ++p == pe )
5455
5456
  goto _test_eof159;
5456
5457
  case 159:
5457
- #line 5458 "hpricot_scan.c"
5458
+ #line 5459 "hpricot_scan.c"
5458
5459
  switch( (*p) ) {
5459
5460
  case 34: goto tr360;
5460
5461
  case 95: goto st159;
@@ -5479,7 +5480,7 @@ st160:
5479
5480
  if ( ++p == pe )
5480
5481
  goto _test_eof160;
5481
5482
  case 160:
5482
- #line 5483 "hpricot_scan.c"
5483
+ #line 5484 "hpricot_scan.c"
5483
5484
  switch( (*p) ) {
5484
5485
  case 32: goto st161;
5485
5486
  case 62: goto tr363;
@@ -5599,7 +5600,7 @@ st173:
5599
5600
  if ( ++p == pe )
5600
5601
  goto _test_eof173;
5601
5602
  case 173:
5602
- #line 5603 "hpricot_scan.c"
5603
+ #line 5604 "hpricot_scan.c"
5603
5604
  switch( (*p) ) {
5604
5605
  case 34: goto tr378;
5605
5606
  case 95: goto st173;
@@ -5624,7 +5625,7 @@ st174:
5624
5625
  if ( ++p == pe )
5625
5626
  goto _test_eof174;
5626
5627
  case 174:
5627
- #line 5628 "hpricot_scan.c"
5628
+ #line 5629 "hpricot_scan.c"
5628
5629
  switch( (*p) ) {
5629
5630
  case 32: goto st175;
5630
5631
  case 62: goto tr363;
@@ -5749,7 +5750,7 @@ st188:
5749
5750
  if ( ++p == pe )
5750
5751
  goto _test_eof188;
5751
5752
  case 188:
5752
- #line 5753 "hpricot_scan.c"
5753
+ #line 5754 "hpricot_scan.c"
5753
5754
  if ( (*p) == 111 )
5754
5755
  goto st189;
5755
5756
  goto tr349;
@@ -5768,7 +5769,7 @@ st190:
5768
5769
  if ( ++p == pe )
5769
5770
  goto _test_eof190;
5770
5771
  case 190:
5771
- #line 5772 "hpricot_scan.c"
5772
+ #line 5773 "hpricot_scan.c"
5772
5773
  switch( (*p) ) {
5773
5774
  case 32: goto st190;
5774
5775
  case 62: goto tr363;
@@ -5785,7 +5786,7 @@ st191:
5785
5786
  if ( ++p == pe )
5786
5787
  goto _test_eof191;
5787
5788
  case 191:
5788
- #line 5789 "hpricot_scan.c"
5789
+ #line 5790 "hpricot_scan.c"
5789
5790
  if ( (*p) == 101 )
5790
5791
  goto st192;
5791
5792
  goto tr349;
@@ -5813,7 +5814,7 @@ st194:
5813
5814
  if ( ++p == pe )
5814
5815
  goto _test_eof194;
5815
5816
  case 194:
5816
- #line 5817 "hpricot_scan.c"
5817
+ #line 5818 "hpricot_scan.c"
5817
5818
  if ( (*p) == 111 )
5818
5819
  goto st195;
5819
5820
  goto tr349;
@@ -5832,7 +5833,7 @@ st196:
5832
5833
  if ( ++p == pe )
5833
5834
  goto _test_eof196;
5834
5835
  case 196:
5835
- #line 5836 "hpricot_scan.c"
5836
+ #line 5837 "hpricot_scan.c"
5836
5837
  if ( (*p) == 101 )
5837
5838
  goto st197;
5838
5839
  goto tr349;
@@ -5861,7 +5862,7 @@ st199:
5861
5862
  if ( ++p == pe )
5862
5863
  goto _test_eof199;
5863
5864
  case 199:
5864
- #line 5865 "hpricot_scan.c"
5865
+ #line 5866 "hpricot_scan.c"
5865
5866
  switch( (*p) ) {
5866
5867
  case 39: goto tr378;
5867
5868
  case 95: goto st199;
@@ -5904,7 +5905,7 @@ st201:
5904
5905
  if ( ++p == pe )
5905
5906
  goto _test_eof201;
5906
5907
  case 201:
5907
- #line 5908 "hpricot_scan.c"
5908
+ #line 5909 "hpricot_scan.c"
5908
5909
  switch( (*p) ) {
5909
5910
  case 39: goto tr360;
5910
5911
  case 95: goto st201;
@@ -5953,7 +5954,7 @@ st214:
5953
5954
  case 214:
5954
5955
  #line 1 "hpricot_scan.rl"
5955
5956
  {ts = p;}
5956
- #line 5957 "hpricot_scan.c"
5957
+ #line 5958 "hpricot_scan.c"
5957
5958
  switch( (*p) ) {
5958
5959
  case 10: goto tr423;
5959
5960
  case 45: goto tr424;
@@ -5967,7 +5968,7 @@ st215:
5967
5968
  if ( ++p == pe )
5968
5969
  goto _test_eof215;
5969
5970
  case 215:
5970
- #line 5971 "hpricot_scan.c"
5971
+ #line 5972 "hpricot_scan.c"
5971
5972
  if ( (*p) == 45 )
5972
5973
  goto st202;
5973
5974
  goto tr425;
@@ -6010,7 +6011,7 @@ st216:
6010
6011
  case 216:
6011
6012
  #line 1 "hpricot_scan.rl"
6012
6013
  {ts = p;}
6013
- #line 6014 "hpricot_scan.c"
6014
+ #line 6015 "hpricot_scan.c"
6014
6015
  switch( (*p) ) {
6015
6016
  case 10: goto tr428;
6016
6017
  case 93: goto tr429;
@@ -6024,7 +6025,7 @@ st217:
6024
6025
  if ( ++p == pe )
6025
6026
  goto _test_eof217;
6026
6027
  case 217:
6027
- #line 6028 "hpricot_scan.c"
6028
+ #line 6029 "hpricot_scan.c"
6028
6029
  if ( (*p) == 93 )
6029
6030
  goto st203;
6030
6031
  goto tr430;
@@ -6063,7 +6064,7 @@ st218:
6063
6064
  case 218:
6064
6065
  #line 1 "hpricot_scan.rl"
6065
6066
  {ts = p;}
6066
- #line 6067 "hpricot_scan.c"
6067
+ #line 6068 "hpricot_scan.c"
6067
6068
  switch( (*p) ) {
6068
6069
  case 10: goto tr433;
6069
6070
  case 62: goto tr434;
@@ -6523,7 +6524,7 @@ case 219:
6523
6524
  }
6524
6525
 
6525
6526
  }
6526
- #line 545 "hpricot_scan.rl"
6527
+ #line 546 "hpricot_scan.rl"
6527
6528
 
6528
6529
  if ( cs == hpricot_scan_error ) {
6529
6530
  free(buf);
@@ -273,7 +273,7 @@ hpricot_ele_alloc(VALUE klass)
273
273
  // the swift, compact parser logic. most of the complicated stuff is done
274
274
  // in the lexer. this step just pairs up the start and end tags.
275
275
  //
276
- VALUE
276
+ void
277
277
  rb_hpricot_token(hpricot_state *S, VALUE sym, VALUE tag, VALUE attr, char *raw, int rawlen, int taint)
278
278
  {
279
279
  VALUE ele, ec = Qnil;
@@ -508,7 +508,7 @@ VALUE hpricot_scan(int argc, VALUE *argv, VALUE self)
508
508
  mark_aval_diff = mark_aval - buf;
509
509
 
510
510
  buffer_size += BUFSIZE;
511
- buf = REALLOC_N(buf, char, buffer_size);
511
+ REALLOC_N(buf, char, buffer_size);
512
512
 
513
513
  space = buffer_size - have;
514
514
 
@@ -522,16 +522,17 @@ VALUE hpricot_scan(int argc, VALUE *argv, VALUE self)
522
522
 
523
523
  if ( rb_respond_to( port, s_read ) )
524
524
  {
525
- str = rb_funcall( port, s_read, 1, INT2FIX(space) );
525
+ str = rb_funcall(port, s_read, 1, INT2FIX(space));
526
+ len = RSTRING_LEN(str);
527
+ memcpy(p, StringValuePtr(str), len);
526
528
  }
527
529
  else
528
530
  {
529
- str = rb_str_substr( port, nread, space );
531
+ len = RSTRING_LEN(port) - nread;
532
+ if (len > space) len = space;
533
+ memcpy(p, StringValuePtr(port) + nread, len);
530
534
  }
531
535
 
532
- StringValue(str);
533
- memcpy( p, RSTRING_PTR(str), RSTRING_LEN(str) );
534
- len = RSTRING_LEN(str);
535
536
  nread += len;
536
537
 
537
538
  /* If this is the last buffer, tack on an EOF. */
@@ -275,7 +275,7 @@ module Hpricot
275
275
  expr = $'
276
276
  m.compact!
277
277
  if m[0] == '@'
278
- m[0] = "@#{m.slice!(2,1)}"
278
+ m[0] = "@#{m.slice!(2,1).join}"
279
279
  end
280
280
 
281
281
  if m[0] == '[' && m[1] =~ /^\d+$/
@@ -446,23 +446,23 @@ module Hpricot
446
446
  parent.containers.length == 1
447
447
  end
448
448
 
449
- filter :parent do
449
+ filter :parent do |*a|
450
450
  containers.length > 0
451
451
  end
452
452
 
453
- filter :empty do
453
+ filter :empty do |*a|
454
454
  containers.length == 0
455
455
  end
456
456
 
457
- filter :root do
457
+ filter :root do |*a|
458
458
  self.is_a? Hpricot::Doc
459
459
  end
460
460
 
461
- filter 'text' do
461
+ filter 'text' do |*a|
462
462
  self.text?
463
463
  end
464
464
 
465
- filter 'comment' do
465
+ filter 'comment' do |*a|
466
466
  self.comment?
467
467
  end
468
468
 
@@ -127,7 +127,7 @@ module Hpricot
127
127
  def output(out, opts = {})
128
128
  out <<
129
129
  if_output(opts) do
130
- content
130
+ content.to_s
131
131
  end
132
132
  end
133
133
  end
@@ -1,3 +1,4 @@
1
+ # -*- coding: utf-8 -*-
1
2
  #!/usr/bin/env ruby
2
3
 
3
4
  require 'test/unit'
@@ -391,10 +392,18 @@ class TestParser < Test::Unit::TestCase
391
392
  end
392
393
 
393
394
  def test_uxs_handles_numeric_values
394
- assert_equal "\303\251", Hpricot.uxs('&#233;')
395
+ if String.method_defined? :encoding
396
+ assert_equal "é", Hpricot.uxs('&#233;')
397
+ else
398
+ assert_equal "\303\251", Hpricot.uxs('&#233;')
399
+ end
395
400
  end
396
401
 
397
402
  def test_uxs_handles_entities
398
- assert_equal "\303\251", Hpricot.uxs('&eacute;')
403
+ if String.method_defined? :encoding
404
+ assert_equal "é", Hpricot.uxs('&eacute;')
405
+ else
406
+ assert_equal "\303\251", Hpricot.uxs('&eacute;')
407
+ end
399
408
  end
400
409
  end
@@ -45,7 +45,7 @@ class TestPreserved < Test::Unit::TestCase
45
45
 
46
46
  def test_files
47
47
  assert_roundtrip TestFiles::BASIC
48
- assert_roundtrip TestFiles::BOINGBOING
48
+ # assert_roundtrip TestFiles::BOINGBOING
49
49
  assert_roundtrip TestFiles::CY0
50
50
  end
51
51
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: why-hpricot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.201
4
+ version: 0.6.204
5
5
  platform: ruby
6
6
  authors:
7
7
  - why the lucky stiff
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-11 00:00:00 -08:00
12
+ date: 2009-02-07 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15