#line 1 "./tasks/../ragel/i18n/ru.c.rl" #include #include #if defined(_WIN32) #include #endif #ifdef HAVE_RUBY_RE_H #include #else #include #endif #ifdef HAVE_RUBY_ENCODING_H #include #define ENCODED_STR_NEW(ptr, len) \ rb_enc_str_new(ptr, len, rb_utf8_encoding()); #else #define ENCODED_STR_NEW(ptr, len) \ rb_str_new(ptr, len); #endif #ifndef RSTRING_PTR #define RSTRING_PTR(s) (RSTRING(s)->ptr) #endif #ifndef RSTRING_LEN #define RSTRING_LEN(s) (RSTRING(s)->len) #endif #define DATA_GET(FROM, TYPE, NAME) \ Data_Get_Struct(FROM, TYPE, NAME); \ if (NAME == NULL) { \ rb_raise(rb_eArgError, "NULL found for " # NAME " when it shouldn't be."); \ } typedef struct lexer_state { int content_len; int line_number; int current_line; int start_col; size_t mark; size_t keyword_start; size_t keyword_end; size_t next_keyword_start; size_t content_start; size_t content_end; size_t field_len; size_t query_start; size_t last_newline; size_t final_newline; } lexer_state; static VALUE mGherkin; static VALUE mLexer; static VALUE mCLexer; static VALUE cI18nLexer; static VALUE rb_eGherkinLexerError; #define LEN(AT, P) (P - data - lexer->AT) #define MARK(M, P) (lexer->M = (P) - data) #define PTR_TO(P) (data + lexer->P) #define STORE_KW_END_CON(EVENT) \ store_kw_con(listener, # EVENT, \ PTR_TO(keyword_start), LEN(keyword_start, PTR_TO(keyword_end - 1)), \ PTR_TO(content_start), LEN(content_start, PTR_TO(content_end)), \ lexer->current_line); \ if (lexer->content_end != 0) { \ p = PTR_TO(content_end - 1); \ } \ lexer->content_end = 0; #define STORE_ATTR(ATTR) \ store_attr(listener, # ATTR, \ PTR_TO(content_start), LEN(content_start, p), \ lexer->line_number); #line 239 "./tasks/../ragel/i18n/ru.c.rl" /** Data **/ #line 88 "ext/gherkin_lexer_ru/gherkin_lexer_ru.c" static const char _lexer_actions[] = { 0, 1, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 9, 1, 10, 1, 11, 1, 14, 1, 15, 1, 16, 1, 17, 1, 18, 1, 19, 1, 20, 1, 23, 2, 1, 16, 2, 12, 13, 2, 15, 0, 2, 15, 2, 2, 15, 14, 2, 15, 17, 2, 16, 4, 2, 16, 5, 2, 16, 6, 2, 16, 7, 2, 16, 8, 2, 16, 14, 2, 18, 19, 2, 21, 20, 2, 21, 22, 3, 3, 12, 13, 3, 9, 12, 13, 3, 10, 12, 13, 3, 11, 12, 13, 3, 12, 13, 16, 3, 15, 12, 13, 3, 21, 22, 0, 3, 21, 22, 2, 3, 21, 22, 14, 4, 1, 12, 13, 16, 4, 15, 0, 12, 13 }; static const short _lexer_key_offsets[] = { 0, 0, 11, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 116, 125, 127, 138, 139, 140, 144, 149, 154, 159, 164, 168, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 193, 200, 205, 209, 214, 215, 220, 231, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 257, 259, 261, 263, 265, 267, 269, 271, 273, 275, 277, 279, 281, 283, 285, 287, 289, 291, 293, 295, 297, 299, 301, 303, 305, 308, 310, 312, 314, 316, 318, 320, 322, 324, 326, 328, 330, 332, 334, 336, 338, 340, 342, 344, 346, 348, 350, 352, 354, 356, 358, 360, 362, 364, 366, 368, 370, 372, 374, 376, 378, 380, 382, 384, 386, 388, 390, 392, 394, 396, 398, 400, 402, 404, 406, 408, 410, 412, 414, 416, 418, 420, 422, 424, 425, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 470, 479, 481, 483, 485, 487, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, 509, 511, 513, 515, 517, 519, 521, 523, 525, 527, 529, 531, 533, 535, 537, 539, 541, 543, 545, 547, 549, 551, 553, 555, 557, 559, 561, 563, 565, 567, 569, 571, 573, 575, 577, 579, 581, 583, 585, 587, 589, 591, 593, 595, 597, 599, 601, 603, 605, 607, 609, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 635, 644, 646, 648, 650, 652, 654, 656, 658, 660, 662, 664, 666, 668, 670, 672, 674, 676, 678, 680, 682, 684, 686, 688, 690, 692, 694, 696, 698, 700, 702, 704, 706, 708, 710, 712, 714, 716, 718, 720, 723, 725, 727, 729, 731, 733, 735, 737, 739, 741, 743, 745, 747, 749, 751, 753, 755, 757, 759, 761, 763, 765, 767, 769, 771, 773, 775, 777, 779, 781, 783, 785, 787, 789, 791, 793, 795, 797, 799, 801, 803, 805, 807, 809, 811, 813, 815, 817, 819, 821, 823, 825, 827, 829, 831, 833, 835, 837, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 868, 871, 873, 875, 877, 879, 881, 883, 885, 887, 889, 891, 893, 895, 897, 899, 901, 903, 905, 907, 909, 911, 913, 915, 918, 920, 922, 924, 926, 928, 930, 932, 934, 936, 938, 940, 942, 944, 946, 948, 950, 952, 954, 956, 958, 960, 962, 964, 966, 968, 970, 972, 974, 976, 978, 980, 982, 984, 986, 988, 990, 992, 994, 996, 998, 1000, 1002, 1004, 1006, 1008, 1010, 1012, 1014, 1016, 1018, 1020 }; static const char _lexer_trans_keys[] = { -48, 10, 32, 34, 35, 37, 42, 64, 124, 9, 13, -112, -108, -107, -105, -104, -102, -99, -97, -95, -94, -92, 32, 10, 10, 13, -48, -66, -48, -65, -47, -125, -47, -127, -47, -126, -48, -72, -48, -68, -47, -127, -48, -69, -48, -72, -48, -67, -48, -80, -47, -121, -48, -75, -48, -67, -48, -72, -47, -113, 58, 10, 10, 10, 32, 124, 9, 13, 32, -47, -126, -48, -66, -48, -68, -47, -125, 32, -48, -74, -48, -75, -48, -66, -47, -128, -48, -75, -48, -76, -47, -117, -47, -127, -47, -126, -48, -66, -47, -128, -48, -72, -47, -113, 58, 10, 10, -48, 10, 32, 35, 37, 42, 64, 9, 13, -112, -108, -107, -104, -102, -99, -95, -94, 10, 10, 32, -48, 10, 32, 34, 35, 37, 42, 64, 124, 9, 13, 34, 34, 10, 32, 9, 13, 10, 32, 34, 9, 13, 10, 32, 34, 9, 13, 10, 32, 34, 9, 13, 10, 32, 34, 9, 13, 10, 32, 9, 13, 10, 32, 9, 13, 10, 13, 95, 70, 69, 65, 84, 85, 82, 69, 95, 69, 78, 68, 95, 37, 13, 32, 64, 9, 10, 9, 10, 13, 32, 64, 11, 12, 10, 32, 64, 9, 13, 32, 124, 9, 13, 10, 32, 124, 9, 13, 124, 10, 32, 124, 9, 13, -48, 10, 32, 34, 35, 37, 42, 64, 124, 9, 13, -48, 10, -66, 10, -48, 10, -65, 10, -47, 10, -125, 10, -47, 10, -127, 10, -47, 10, -126, 10, -48, 10, -72, 10, -48, 10, -68, 10, -47, 10, -127, 10, -48, 10, -69, 10, -48, 10, -72, 10, 10, 32, -47, 10, -126, 10, -48, 10, -66, 10, -48, 10, -68, 10, -47, 10, -125, 10, 10, 32, -48, 10, -74, 10, -48, 10, -75, 10, -48, 10, -66, 10, -47, 10, -126, -122, 10, -47, 10, -128, 10, -47, 10, -125, 10, -48, 10, -70, 10, -47, 10, -126, 10, -47, 10, -125, 10, -47, 10, -128, 10, -48, 10, -80, 10, 10, 32, -47, 10, -127, 10, -47, 10, -122, 10, -48, 10, -75, 10, -48, 10, -67, 10, -48, 10, -80, 10, -47, 10, -128, 10, -48, 10, -72, 10, -47, 10, -113, 10, 10, 58, -48, 10, -75, 10, -48, 10, -67, 10, -48, 10, -80, 10, -47, 10, -128, 10, -48, 10, -72, 10, -48, 10, -71, 10, 10, 95, 10, 70, 10, 69, 10, 65, 10, 84, 10, 85, 10, 82, 10, 69, 10, 95, 10, 69, 10, 78, 10, 68, 10, 95, 10, 37, -47, -126, -122, -47, -128, -47, -125, -48, -70, -47, -126, -47, -125, -47, -128, -48, -80, 32, -47, -127, -47, -122, -48, -75, -48, -67, -48, -80, -47, -128, -48, -72, -47, -113, 58, 10, 10, -48, 10, 32, 35, 37, 42, 64, 9, 13, -112, -108, -107, -104, -102, -99, -95, -94, 10, 10, 32, -48, 10, -66, 10, -48, 10, -65, 10, -47, 10, -125, 10, -47, 10, -127, 10, -47, 10, -126, 10, -48, 10, -72, 10, -48, 10, -68, 10, -47, 10, -127, 10, -48, 10, -69, 10, -48, 10, -72, 10, 10, 32, -47, 10, -126, 10, -48, 10, -66, 10, -48, 10, -68, 10, -47, 10, -125, 10, 10, 32, -48, 10, -74, 10, -48, 10, -75, 10, -48, 10, -66, 10, -47, 10, -122, 10, -48, 10, -75, 10, -48, 10, -67, 10, -48, 10, -80, 10, -47, 10, -128, 10, -48, 10, -72, 10, -48, 10, -71, 10, 10, 58, 10, 95, 10, 70, 10, 69, 10, 65, 10, 84, 10, 85, 10, 82, 10, 69, 10, 95, 10, 69, 10, 78, 10, 68, 10, 95, 10, 37, -48, -75, -48, -67, -48, -80, -47, -128, -48, -72, -48, -71, 58, 10, 10, -48, 10, 32, 35, 37, 42, 64, 9, 13, -112, -108, -107, -104, -102, -99, -95, -94, 10, 10, 32, -48, 10, -66, 10, -48, 10, -65, 10, -47, 10, -125, 10, -47, 10, -127, 10, -47, 10, -126, 10, -48, 10, -72, 10, -48, 10, -68, 10, -47, 10, -127, 10, -48, 10, -69, 10, -48, 10, -72, 10, 10, 32, -47, 10, -126, 10, -48, 10, -66, 10, -48, 10, -68, 10, -47, 10, -125, 10, 10, 32, -48, 10, -74, 10, -48, 10, -75, 10, -48, 10, -66, 10, -47, 10, -126, -122, 10, -47, 10, -128, 10, -47, 10, -125, 10, -48, 10, -70, 10, -47, 10, -126, 10, -47, 10, -125, 10, -47, 10, -128, 10, -48, 10, -80, 10, 10, 32, -47, 10, -127, 10, -47, 10, -122, 10, -48, 10, -75, 10, -48, 10, -67, 10, -48, 10, -80, 10, -47, 10, -128, 10, -48, 10, -72, 10, -47, 10, -113, 10, 10, 58, -48, 10, -75, 10, -48, 10, -67, 10, -48, 10, -80, 10, -47, 10, -128, 10, -48, 10, -72, 10, -48, 10, -71, 10, 10, 95, 10, 70, 10, 69, 10, 65, 10, 84, 10, 85, 10, 82, 10, 69, 10, 95, 10, 69, 10, 78, 10, 68, 10, 95, 10, 37, -47, -125, -48, -67, -48, -70, -47, -122, -48, -72, -48, -66, -48, -67, -48, -80, -48, -69, 58, 10, 10, -48, 10, 32, 35, 37, 64, 9, 13, -97, -95, 10, -47, 10, -128, 10, -48, 10, -75, 10, -48, 10, -76, 10, -47, 10, -117, 10, -47, 10, -127, 10, -47, 10, -126, 10, -48, 10, -66, 10, -47, 10, -128, 10, -48, 10, -72, 10, -47, 10, -113, 10, 10, 58, -47, 10, -126, -122, 10, -47, 10, -128, 10, -47, 10, -125, 10, -48, 10, -70, 10, -47, 10, -126, 10, -47, 10, -125, 10, -47, 10, -128, 10, -48, 10, -80, 10, 10, 32, -47, 10, -127, 10, -47, 10, -122, 10, -48, 10, -75, 10, -48, 10, -67, 10, -48, 10, -80, 10, -48, 10, -75, 10, -48, 10, -67, 10, -48, 10, -80, 10, -47, 10, -128, 10, -48, 10, -72, 10, -48, 10, -71, 10, 10, 95, 10, 70, 10, 69, 10, 65, 10, 84, 10, 85, 10, 82, 10, 69, 10, 95, 10, 69, 10, 78, 10, 68, 10, 95, 10, 37, 0 }; static const char _lexer_single_lengths[] = { 0, 9, 11, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const short _lexer_index_offsets[] = { 0, 0, 11, 23, 25, 27, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 196, 206, 209, 220, 222, 224, 228, 233, 238, 243, 248, 252, 256, 259, 261, 263, 265, 267, 269, 271, 273, 275, 277, 279, 281, 283, 285, 287, 292, 299, 304, 308, 313, 315, 320, 331, 334, 337, 340, 343, 346, 349, 352, 355, 358, 361, 364, 367, 370, 373, 376, 379, 382, 385, 388, 391, 394, 397, 400, 403, 406, 409, 412, 415, 418, 421, 424, 427, 430, 433, 436, 439, 442, 446, 449, 452, 455, 458, 461, 464, 467, 470, 473, 476, 479, 482, 485, 488, 491, 494, 497, 500, 503, 506, 509, 512, 515, 518, 521, 524, 527, 530, 533, 536, 539, 542, 545, 548, 551, 554, 557, 560, 563, 566, 569, 572, 575, 578, 581, 584, 587, 590, 593, 596, 599, 602, 605, 608, 611, 614, 617, 620, 622, 625, 627, 629, 631, 633, 635, 637, 639, 641, 643, 645, 647, 649, 651, 653, 655, 657, 659, 661, 663, 665, 667, 669, 671, 673, 675, 677, 679, 681, 683, 685, 687, 689, 691, 693, 702, 712, 715, 718, 721, 724, 727, 730, 733, 736, 739, 742, 745, 748, 751, 754, 757, 760, 763, 766, 769, 772, 775, 778, 781, 784, 787, 790, 793, 796, 799, 802, 805, 808, 811, 814, 817, 820, 823, 826, 829, 832, 835, 838, 841, 844, 847, 850, 853, 856, 859, 862, 865, 868, 871, 874, 877, 880, 883, 886, 889, 892, 895, 898, 901, 904, 907, 910, 912, 914, 916, 918, 920, 922, 924, 926, 928, 930, 932, 934, 936, 938, 940, 949, 959, 962, 965, 968, 971, 974, 977, 980, 983, 986, 989, 992, 995, 998, 1001, 1004, 1007, 1010, 1013, 1016, 1019, 1022, 1025, 1028, 1031, 1034, 1037, 1040, 1043, 1046, 1049, 1052, 1055, 1058, 1061, 1064, 1067, 1070, 1073, 1077, 1080, 1083, 1086, 1089, 1092, 1095, 1098, 1101, 1104, 1107, 1110, 1113, 1116, 1119, 1122, 1125, 1128, 1131, 1134, 1137, 1140, 1143, 1146, 1149, 1152, 1155, 1158, 1161, 1164, 1167, 1170, 1173, 1176, 1179, 1182, 1185, 1188, 1191, 1194, 1197, 1200, 1203, 1206, 1209, 1212, 1215, 1218, 1221, 1224, 1227, 1230, 1233, 1236, 1239, 1242, 1245, 1248, 1251, 1253, 1255, 1257, 1259, 1261, 1263, 1265, 1267, 1269, 1271, 1273, 1275, 1277, 1279, 1281, 1283, 1285, 1287, 1289, 1291, 1293, 1301, 1305, 1308, 1311, 1314, 1317, 1320, 1323, 1326, 1329, 1332, 1335, 1338, 1341, 1344, 1347, 1350, 1353, 1356, 1359, 1362, 1365, 1368, 1371, 1375, 1378, 1381, 1384, 1387, 1390, 1393, 1396, 1399, 1402, 1405, 1408, 1411, 1414, 1417, 1420, 1423, 1426, 1429, 1432, 1435, 1438, 1441, 1444, 1447, 1450, 1453, 1456, 1459, 1462, 1465, 1468, 1471, 1474, 1477, 1480, 1483, 1486, 1489, 1492, 1495, 1498, 1501, 1504, 1507, 1510, 1513, 1516, 1519, 1522, 1525, 1528 }; static const short _lexer_trans_targs[] = { 2, 1, 1, 87, 96, 97, 3, 111, 114, 1, 0, 3, 6, 20, 26, 3, 44, 58, 60, 215, 58, 433, 0, 4, 0, 0, 5, 1, 5, 5, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, 0, 19, 0, 3, 0, 21, 0, 22, 0, 23, 0, 24, 0, 25, 0, 3, 0, 27, 0, 28, 0, 29, 0, 30, 0, 31, 0, 32, 0, 33, 0, 34, 0, 35, 0, 36, 0, 37, 0, 38, 0, 39, 0, 40, 0, 41, 0, 43, 42, 43, 42, 43, 43, 1, 43, 42, 45, 0, 46, 0, 47, 0, 48, 0, 49, 0, 50, 0, 51, 0, 52, 0, 53, 0, 54, 0, 55, 0, 56, 0, 57, 0, 3, 0, 59, 0, 3, 0, 61, 0, 62, 0, 63, 0, 64, 0, 65, 0, 66, 0, 67, 0, 68, 0, 69, 0, 70, 0, 71, 0, 72, 0, 73, 0, 74, 0, 75, 0, 76, 0, 77, 0, 78, 0, 79, 0, 80, 0, 81, 0, 83, 82, 83, 82, 84, 83, 83, 1, 201, 85, 1, 83, 82, 85, 119, 133, 85, 139, 153, 155, 153, 83, 82, 83, 86, 82, 2, 1, 1, 87, 96, 97, 3, 111, 114, 1, 0, 88, 0, 89, 0, 90, 89, 89, 0, 91, 91, 92, 91, 91, 91, 91, 92, 91, 91, 91, 91, 93, 91, 91, 91, 91, 94, 91, 91, 1, 95, 95, 0, 1, 95, 95, 0, 1, 96, 96, 98, 0, 99, 0, 100, 0, 101, 0, 102, 0, 103, 0, 104, 0, 105, 0, 106, 0, 107, 0, 108, 0, 109, 0, 110, 0, 530, 0, 0, 0, 0, 0, 112, 113, 1, 113, 113, 111, 112, 112, 1, 113, 111, 113, 0, 114, 115, 114, 0, 118, 117, 115, 117, 116, 115, 116, 118, 117, 115, 117, 116, 2, 118, 118, 87, 96, 97, 3, 111, 115, 118, 0, 120, 83, 82, 121, 83, 82, 122, 83, 82, 123, 83, 82, 124, 83, 82, 125, 83, 82, 126, 83, 82, 127, 83, 82, 128, 83, 82, 129, 83, 82, 130, 83, 82, 131, 83, 82, 132, 83, 82, 85, 83, 82, 134, 83, 82, 135, 83, 82, 136, 83, 82, 137, 83, 82, 138, 83, 82, 85, 83, 82, 83, 140, 82, 141, 83, 82, 142, 83, 82, 143, 83, 82, 144, 83, 82, 145, 83, 82, 146, 83, 82, 147, 83, 82, 148, 83, 82, 83, 149, 82, 150, 83, 82, 151, 83, 82, 152, 83, 82, 85, 83, 82, 154, 83, 82, 85, 83, 82, 156, 83, 82, 157, 189, 83, 82, 158, 83, 82, 159, 83, 82, 160, 83, 82, 161, 83, 82, 162, 83, 82, 163, 83, 82, 164, 83, 82, 165, 83, 82, 166, 83, 82, 167, 83, 82, 168, 83, 82, 169, 83, 82, 170, 83, 82, 171, 83, 82, 83, 172, 82, 173, 83, 82, 174, 83, 82, 175, 83, 82, 176, 83, 82, 177, 83, 82, 178, 83, 82, 179, 83, 82, 180, 83, 82, 181, 83, 82, 182, 83, 82, 183, 83, 82, 184, 83, 82, 185, 83, 82, 186, 83, 82, 187, 83, 82, 188, 83, 82, 83, 86, 82, 190, 83, 82, 191, 83, 82, 192, 83, 82, 193, 83, 82, 194, 83, 82, 195, 83, 82, 196, 83, 82, 197, 83, 82, 198, 83, 82, 199, 83, 82, 200, 83, 82, 188, 83, 82, 83, 202, 82, 83, 203, 82, 83, 204, 82, 83, 205, 82, 83, 206, 82, 83, 207, 82, 83, 208, 82, 83, 209, 82, 83, 210, 82, 83, 211, 82, 83, 212, 82, 83, 213, 82, 83, 214, 82, 83, 1, 82, 216, 0, 217, 319, 0, 218, 0, 219, 0, 220, 0, 221, 0, 222, 0, 223, 0, 224, 0, 225, 0, 226, 0, 227, 0, 228, 0, 229, 0, 230, 0, 231, 0, 232, 0, 233, 0, 234, 0, 235, 0, 236, 0, 237, 0, 238, 0, 239, 0, 240, 0, 241, 0, 242, 0, 243, 0, 244, 0, 245, 0, 246, 0, 247, 0, 248, 0, 249, 0, 251, 250, 251, 250, 252, 251, 251, 1, 305, 253, 1, 251, 250, 253, 254, 268, 253, 274, 288, 290, 288, 251, 250, 251, 86, 250, 255, 251, 250, 256, 251, 250, 257, 251, 250, 258, 251, 250, 259, 251, 250, 260, 251, 250, 261, 251, 250, 262, 251, 250, 263, 251, 250, 264, 251, 250, 265, 251, 250, 266, 251, 250, 267, 251, 250, 253, 251, 250, 269, 251, 250, 270, 251, 250, 271, 251, 250, 272, 251, 250, 273, 251, 250, 253, 251, 250, 251, 275, 250, 276, 251, 250, 277, 251, 250, 278, 251, 250, 279, 251, 250, 280, 251, 250, 281, 251, 250, 282, 251, 250, 283, 251, 250, 251, 284, 250, 285, 251, 250, 286, 251, 250, 287, 251, 250, 253, 251, 250, 289, 251, 250, 253, 251, 250, 291, 251, 250, 292, 251, 250, 293, 251, 250, 294, 251, 250, 295, 251, 250, 296, 251, 250, 297, 251, 250, 298, 251, 250, 299, 251, 250, 300, 251, 250, 301, 251, 250, 302, 251, 250, 303, 251, 250, 304, 251, 250, 251, 86, 250, 251, 306, 250, 251, 307, 250, 251, 308, 250, 251, 309, 250, 251, 310, 250, 251, 311, 250, 251, 312, 250, 251, 313, 250, 251, 314, 250, 251, 315, 250, 251, 316, 250, 251, 317, 250, 251, 318, 250, 251, 1, 250, 320, 0, 321, 0, 322, 0, 323, 0, 324, 0, 325, 0, 326, 0, 327, 0, 328, 0, 329, 0, 330, 0, 331, 0, 332, 0, 334, 333, 334, 333, 335, 334, 334, 1, 419, 336, 1, 334, 333, 336, 337, 351, 336, 357, 371, 373, 371, 334, 333, 334, 86, 333, 338, 334, 333, 339, 334, 333, 340, 334, 333, 341, 334, 333, 342, 334, 333, 343, 334, 333, 344, 334, 333, 345, 334, 333, 346, 334, 333, 347, 334, 333, 348, 334, 333, 349, 334, 333, 350, 334, 333, 336, 334, 333, 352, 334, 333, 353, 334, 333, 354, 334, 333, 355, 334, 333, 356, 334, 333, 336, 334, 333, 334, 358, 333, 359, 334, 333, 360, 334, 333, 361, 334, 333, 362, 334, 333, 363, 334, 333, 364, 334, 333, 365, 334, 333, 366, 334, 333, 334, 367, 333, 368, 334, 333, 369, 334, 333, 370, 334, 333, 336, 334, 333, 372, 334, 333, 336, 334, 333, 374, 334, 333, 375, 407, 334, 333, 376, 334, 333, 377, 334, 333, 378, 334, 333, 379, 334, 333, 380, 334, 333, 381, 334, 333, 382, 334, 333, 383, 334, 333, 384, 334, 333, 385, 334, 333, 386, 334, 333, 387, 334, 333, 388, 334, 333, 389, 334, 333, 334, 390, 333, 391, 334, 333, 392, 334, 333, 393, 334, 333, 394, 334, 333, 395, 334, 333, 396, 334, 333, 397, 334, 333, 398, 334, 333, 399, 334, 333, 400, 334, 333, 401, 334, 333, 402, 334, 333, 403, 334, 333, 404, 334, 333, 405, 334, 333, 406, 334, 333, 334, 86, 333, 408, 334, 333, 409, 334, 333, 410, 334, 333, 411, 334, 333, 412, 334, 333, 413, 334, 333, 414, 334, 333, 415, 334, 333, 416, 334, 333, 417, 334, 333, 418, 334, 333, 406, 334, 333, 334, 420, 333, 334, 421, 333, 334, 422, 333, 334, 423, 333, 334, 424, 333, 334, 425, 333, 334, 426, 333, 334, 427, 333, 334, 428, 333, 334, 429, 333, 334, 430, 333, 334, 431, 333, 334, 432, 333, 334, 1, 333, 434, 0, 435, 0, 436, 0, 437, 0, 438, 0, 439, 0, 440, 0, 441, 0, 442, 0, 443, 0, 444, 0, 445, 0, 446, 0, 447, 0, 448, 0, 449, 0, 450, 0, 451, 0, 452, 0, 454, 453, 454, 453, 455, 454, 454, 1, 516, 1, 454, 453, 456, 477, 454, 453, 457, 454, 453, 458, 454, 453, 459, 454, 453, 460, 454, 453, 461, 454, 453, 462, 454, 453, 463, 454, 453, 464, 454, 453, 465, 454, 453, 466, 454, 453, 467, 454, 453, 468, 454, 453, 469, 454, 453, 470, 454, 453, 471, 454, 453, 472, 454, 453, 473, 454, 453, 474, 454, 453, 475, 454, 453, 476, 454, 453, 454, 86, 453, 478, 454, 453, 479, 504, 454, 453, 480, 454, 453, 481, 454, 453, 482, 454, 453, 483, 454, 453, 484, 454, 453, 485, 454, 453, 486, 454, 453, 487, 454, 453, 488, 454, 453, 489, 454, 453, 490, 454, 453, 491, 454, 453, 492, 454, 453, 493, 454, 453, 454, 494, 453, 495, 454, 453, 496, 454, 453, 497, 454, 453, 498, 454, 453, 499, 454, 453, 500, 454, 453, 501, 454, 453, 502, 454, 453, 503, 454, 453, 470, 454, 453, 505, 454, 453, 506, 454, 453, 507, 454, 453, 508, 454, 453, 509, 454, 453, 510, 454, 453, 511, 454, 453, 512, 454, 453, 513, 454, 453, 514, 454, 453, 515, 454, 453, 476, 454, 453, 454, 517, 453, 454, 518, 453, 454, 519, 453, 454, 520, 453, 454, 521, 453, 454, 522, 453, 454, 523, 453, 454, 524, 453, 454, 525, 453, 454, 526, 453, 454, 527, 453, 454, 528, 453, 454, 529, 453, 454, 1, 453, 0, 0 }; static const char _lexer_trans_actions[] = { 23, 42, 0, 5, 1, 0, 23, 0, 29, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 37, 37, 45, 88, 17, 0, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 125, 45, 42, 0, 42, 0, 69, 0, 0, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 125, 45, 42, 0, 72, 42, 0, 60, 27, 72, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 42, 11, 0, 51, 104, 25, 48, 45, 25, 51, 25, 54, 25, 37, 0, 37, 0, 37, 42, 0, 0, 37, 120, 39, 39, 39, 3, 100, 27, 27, 27, 0, 100, 27, 27, 27, 0, 100, 27, 0, 27, 0, 84, 7, 7, 37, 42, 0, 0, 37, 92, 19, 0, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 37, 37, 37, 37, 1, 21, 96, 21, 21, 21, 21, 0, 42, 0, 0, 0, 37, 0, 35, 0, 37, 42, 31, 75, 31, 31, 33, 0, 42, 0, 33, 0, 0, 116, 42, 0, 112, 108, 81, 116, 81, 78, 0, 37, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 42, 0, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 42, 0, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 42, 0, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 42, 11, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 11, 0, 0, 37, 0, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 125, 45, 42, 0, 72, 42, 0, 66, 27, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 42, 15, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 42, 0, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 42, 0, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 42, 15, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 15, 0, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 125, 45, 42, 0, 72, 42, 0, 63, 27, 72, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 42, 13, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 42, 0, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 42, 0, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 42, 0, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 42, 13, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 13, 0, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 0, 37, 125, 45, 42, 0, 72, 42, 0, 57, 27, 57, 0, 0, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 42, 9, 0, 0, 42, 0, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 42, 0, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 0, 0, 42, 9, 0, 0, 0 }; static const char _lexer_eof_actions[] = { 0, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37 }; static const int lexer_start = 1; static const int lexer_first_final = 530; static const int lexer_error = 0; static const int lexer_en_main = 1; #line 243 "./tasks/../ragel/i18n/ru.c.rl" static VALUE strip_i(VALUE str, VALUE ary) { rb_funcall(str, rb_intern("strip!"), 0); rb_ary_push(ary, str); return Qnil; } static VALUE multiline_strip(VALUE text) { VALUE map = rb_ary_new(); VALUE split = rb_str_split(text, "\n"); rb_iterate(rb_each, split, strip_i, map); return rb_ary_join(split, rb_str_new2("\n")); } static void store_kw_con(VALUE listener, const char * event_name, const char * keyword_at, size_t keyword_length, const char * at, size_t length, int current_line) { VALUE con = Qnil, kw = Qnil; kw = ENCODED_STR_NEW(keyword_at, keyword_length); con = ENCODED_STR_NEW(at, length); con = multiline_strip(con); rb_funcall(con, rb_intern("strip!"), 0); rb_funcall(kw, rb_intern("strip!"), 0); rb_funcall(listener, rb_intern(event_name), 3, kw, con, INT2FIX(current_line)); } static void store_attr(VALUE listener, const char * attr_type, const char * at, size_t length, int line) { VALUE val = ENCODED_STR_NEW(at, length); rb_funcall(listener, rb_intern(attr_type), 2, val, INT2FIX(line)); } static void store_pystring_content(VALUE listener, int start_col, const char *at, size_t length, int current_line) { VALUE con = ENCODED_STR_NEW(at, length); // Gherkin will crash gracefully if the string representation of start_col pushes the pattern past 32 characters char pat[32]; snprintf(pat, 32, "^ {0,%d}", start_col); VALUE re = rb_reg_regcomp(rb_str_new2(pat)); rb_funcall(con, rb_intern("gsub!"), 2, re, rb_str_new2("")); rb_funcall(listener, rb_intern("py_string"), 2, con, INT2FIX(current_line)); } static void raise_lexer_error(VALUE listener, const char * at, int line) { rb_raise(rb_eGherkinLexerError, "Lexing error on line %d: '%s'.", line, at); } static void lexer_init(lexer_state *lexer) { lexer->content_start = 0; lexer->content_end = 0; lexer->content_len = 0; lexer->mark = 0; lexer->field_len = 0; lexer->keyword_start = 0; lexer->keyword_end = 0; lexer->next_keyword_start = 0; lexer->line_number = 1; lexer->last_newline = 0; lexer->final_newline = 0; lexer->start_col = 0; } static VALUE CLexer_alloc(VALUE klass) { VALUE obj; lexer_state *lxr = ALLOC(lexer_state); lexer_init(lxr); obj = Data_Wrap_Struct(klass, NULL, -1, lxr); return obj; } static VALUE CLexer_init(VALUE self, VALUE listener) { rb_iv_set(self, "@listener", listener); lexer_state *lxr = NULL; DATA_GET(self, lexer_state, lxr); lexer_init(lxr); return self; } static VALUE CLexer_scan(VALUE self, VALUE input) { lexer_state *lexer = NULL; DATA_GET(self, lexer_state, lexer); VALUE input_copy = rb_str_dup(input); rb_str_append(input_copy, rb_str_new2("\n%_FEATURE_END_%")); char *data = RSTRING_PTR(input_copy); long len = RSTRING_LEN(input_copy); if (len == 0) { rb_raise(rb_eGherkinLexerError, "No content to lex."); } else { const char *p, *pe, *eof; int cs = 0; VALUE listener = rb_iv_get(self, "@listener"); VALUE rows = rb_ary_new(); VALUE current_row = rb_ary_new(); p = data; pe = data + len; eof = pe; assert(*pe == '\0' && "pointer does not end on NULL"); assert(pe - p == len && "pointers aren't same distance"); #line 1119 "ext/gherkin_lexer_ru/gherkin_lexer_ru.c" { cs = lexer_start; } #line 374 "./tasks/../ragel/i18n/ru.c.rl" #line 1126 "ext/gherkin_lexer_ru/gherkin_lexer_ru.c" { int _klen; unsigned int _trans; const char *_acts; unsigned int _nacts; const char *_keys; if ( p == pe ) goto _test_eof; if ( cs == 0 ) goto _out; _resume: _keys = _lexer_trans_keys + _lexer_key_offsets[cs]; _trans = _lexer_index_offsets[cs]; _klen = _lexer_single_lengths[cs]; if ( _klen > 0 ) { const char *_lower = _keys; const char *_mid; const char *_upper = _keys + _klen - 1; while (1) { if ( _upper < _lower ) break; _mid = _lower + ((_upper-_lower) >> 1); if ( (*p) < *_mid ) _upper = _mid - 1; else if ( (*p) > *_mid ) _lower = _mid + 1; else { _trans += (_mid - _keys); goto _match; } } _keys += _klen; _trans += _klen; } _klen = _lexer_range_lengths[cs]; if ( _klen > 0 ) { const char *_lower = _keys; const char *_mid; const char *_upper = _keys + (_klen<<1) - 2; while (1) { if ( _upper < _lower ) break; _mid = _lower + (((_upper-_lower) >> 1) & ~1); if ( (*p) < _mid[0] ) _upper = _mid - 2; else if ( (*p) > _mid[1] ) _lower = _mid + 2; else { _trans += ((_mid - _keys)>>1); goto _match; } } _trans += _klen; } _match: cs = _lexer_trans_targs[_trans]; if ( _lexer_trans_actions[_trans] == 0 ) goto _again; _acts = _lexer_actions + _lexer_trans_actions[_trans]; _nacts = (unsigned int) *_acts++; while ( _nacts-- > 0 ) { switch ( *_acts++ ) { case 0: #line 82 "./tasks/../ragel/i18n/ru.c.rl" { MARK(content_start, p); lexer->current_line = lexer->line_number; } break; case 1: #line 87 "./tasks/../ragel/i18n/ru.c.rl" { MARK(content_start, p); } break; case 2: #line 91 "./tasks/../ragel/i18n/ru.c.rl" { lexer->current_line = lexer->line_number; lexer->start_col = p - data - lexer->last_newline; } break; case 3: #line 96 "./tasks/../ragel/i18n/ru.c.rl" { int len = LEN(content_start, PTR_TO(final_newline)); if (len < 0) len = 0; store_pystring_content(listener, lexer->start_col, PTR_TO(content_start), len, lexer->current_line); } break; case 4: #line 104 "./tasks/../ragel/i18n/ru.c.rl" { STORE_KW_END_CON(feature) } break; case 5: #line 108 "./tasks/../ragel/i18n/ru.c.rl" { STORE_KW_END_CON(background) } break; case 6: #line 112 "./tasks/../ragel/i18n/ru.c.rl" { STORE_KW_END_CON(scenario) } break; case 7: #line 116 "./tasks/../ragel/i18n/ru.c.rl" { STORE_KW_END_CON(scenario_outline) } break; case 8: #line 120 "./tasks/../ragel/i18n/ru.c.rl" { STORE_KW_END_CON(examples) } break; case 9: #line 124 "./tasks/../ragel/i18n/ru.c.rl" { store_kw_con(listener, "step", PTR_TO(keyword_start), LEN(keyword_start, PTR_TO(keyword_end)), PTR_TO(content_start), LEN(content_start, p), lexer->current_line); } break; case 10: #line 131 "./tasks/../ragel/i18n/ru.c.rl" { STORE_ATTR(comment) lexer->mark = 0; } break; case 11: #line 136 "./tasks/../ragel/i18n/ru.c.rl" { STORE_ATTR(tag) lexer->mark = 0; } break; case 12: #line 141 "./tasks/../ragel/i18n/ru.c.rl" { lexer->line_number += 1; MARK(final_newline, p); } break; case 13: #line 146 "./tasks/../ragel/i18n/ru.c.rl" { MARK(last_newline, p + 1); } break; case 14: #line 150 "./tasks/../ragel/i18n/ru.c.rl" { if (lexer->mark == 0) { MARK(mark, p); } } break; case 15: #line 156 "./tasks/../ragel/i18n/ru.c.rl" { MARK(keyword_end, p); MARK(keyword_start, PTR_TO(mark)); MARK(content_start, p + 1); lexer->mark = 0; } break; case 16: #line 163 "./tasks/../ragel/i18n/ru.c.rl" { MARK(content_end, p); } break; case 17: #line 167 "./tasks/../ragel/i18n/ru.c.rl" { p = p - 1; lexer->current_line = lexer->line_number; rb_ary_clear(rows); rb_ary_clear(current_row); } break; case 18: #line 174 "./tasks/../ragel/i18n/ru.c.rl" { MARK(content_start, p); } break; case 19: #line 178 "./tasks/../ragel/i18n/ru.c.rl" { VALUE con = Qnil; con = ENCODED_STR_NEW(PTR_TO(content_start), LEN(content_start, p)); rb_funcall(con, rb_intern("strip!"), 0); rb_ary_push(current_row, con); } break; case 20: #line 186 "./tasks/../ragel/i18n/ru.c.rl" { current_row = rb_ary_new(); } break; case 21: #line 190 "./tasks/../ragel/i18n/ru.c.rl" { rb_ary_push(rows, current_row); } break; case 22: #line 194 "./tasks/../ragel/i18n/ru.c.rl" { rb_funcall(listener, rb_intern("table"), 2, rows, INT2FIX(lexer->current_line)); } break; case 23: #line 198 "./tasks/../ragel/i18n/ru.c.rl" { if (cs < lexer_first_final) { if (raise_lexer_error != NULL) { int count = 0; int newstr_count = 0; size_t len; const char *buff; if (lexer->last_newline != 0) { len = LEN(last_newline, eof); buff = PTR_TO(last_newline); } else { len = strlen(data); buff = data; } char newstr[len]; for (count = 0; count < len; count++) { if(buff[count] == 10) { newstr[newstr_count] = '\0'; // terminate new string at first newline found break; } else { if (buff[count] == '%') { newstr[newstr_count++] = buff[count]; newstr[newstr_count] = buff[count]; } else { newstr[newstr_count] = buff[count]; } } newstr_count++; } int line = lexer->line_number; lexer_init(lexer); // Re-initialize so we can scan again with the same lexer raise_lexer_error(listener, newstr, line); } } } break; #line 1402 "ext/gherkin_lexer_ru/gherkin_lexer_ru.c" } } _again: if ( cs == 0 ) goto _out; if ( ++p != pe ) goto _resume; _test_eof: {} if ( p == eof ) { const char *__acts = _lexer_actions + _lexer_eof_actions[cs]; unsigned int __nacts = (unsigned int) *__acts++; while ( __nacts-- > 0 ) { switch ( *__acts++ ) { case 23: #line 198 "./tasks/../ragel/i18n/ru.c.rl" { if (cs < lexer_first_final) { if (raise_lexer_error != NULL) { int count = 0; int newstr_count = 0; size_t len; const char *buff; if (lexer->last_newline != 0) { len = LEN(last_newline, eof); buff = PTR_TO(last_newline); } else { len = strlen(data); buff = data; } char newstr[len]; for (count = 0; count < len; count++) { if(buff[count] == 10) { newstr[newstr_count] = '\0'; // terminate new string at first newline found break; } else { if (buff[count] == '%') { newstr[newstr_count++] = buff[count]; newstr[newstr_count] = buff[count]; } else { newstr[newstr_count] = buff[count]; } } newstr_count++; } int line = lexer->line_number; lexer_init(lexer); // Re-initialize so we can scan again with the same lexer raise_lexer_error(listener, newstr, line); } } } break; #line 1459 "ext/gherkin_lexer_ru/gherkin_lexer_ru.c" } } } _out: {} } #line 375 "./tasks/../ragel/i18n/ru.c.rl" assert(p <= pe && "data overflow after parsing execute"); assert(lexer->content_start <= len && "content starts after data end"); assert(lexer->mark < len && "mark is after data end"); assert(lexer->field_len <= len && "field has length longer than the whole data"); // Reset lexer by re-initializing the whole thing lexer_init(lexer); if (cs == lexer_error) { rb_raise(rb_eGherkinLexerError, "Invalid format, lexing fails."); } else { return Qtrue; } } } void Init_gherkin_lexer_ru() { mGherkin = rb_define_module("Gherkin"); mLexer = rb_const_get(mGherkin, rb_intern("Lexer")); rb_eGherkinLexerError = rb_const_get(mLexer, rb_intern("LexingError")); mCLexer = rb_define_module_under(mGherkin, "CLexer"); cI18nLexer = rb_define_class_under(mCLexer, "Ru", rb_cObject); rb_define_alloc_func(cI18nLexer, CLexer_alloc); rb_define_method(cI18nLexer, "initialize", CLexer_init, 1); rb_define_method(cI18nLexer, "scan", CLexer_scan, 1); }