#line 1 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.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 docstring_content_type_start; size_t docstring_content_type_end; size_t query_start; size_t last_newline; size_t final_newline; } lexer_state; static VALUE mGherkin; static VALUE mGherkinLexer; static VALUE mCLexer; static VALUE cI18nLexer; static VALUE rb_eGherkinLexingError; #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_multiline_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, lexer->start_col); \ 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 254 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" /** Data **/ #line 89 "ext/gherkin_lexer_ja/gherkin_lexer_ja.c" static const char _lexer_actions[] = { 0, 1, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1, 12, 1, 13, 1, 16, 1, 17, 1, 18, 1, 19, 1, 20, 1, 21, 1, 22, 1, 23, 2, 1, 18, 2, 4, 5, 2, 13, 0, 2, 14, 15, 2, 17, 0, 2, 17, 2, 2, 17, 16, 2, 17, 19, 2, 18, 6, 2, 18, 7, 2, 18, 8, 2, 18, 9, 2, 18, 10, 2, 18, 16, 2, 20, 21, 2, 22, 0, 2, 22, 2, 2, 22, 16, 2, 22, 19, 3, 3, 14, 15, 3, 5, 14, 15, 3, 11, 14, 15, 3, 12, 14, 15, 3, 13, 14, 15, 3, 14, 15, 18, 3, 17, 14, 15, 4, 1, 14, 15, 18, 4, 4, 5, 14, 15, 4, 17, 0, 14, 15 }; static const short _lexer_key_offsets[] = { 0, 0, 16, 19, 23, 24, 25, 26, 27, 29, 44, 46, 47, 48, 49, 50, 51, 52, 53, 54, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 131, 134, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 178, 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233, 236, 238, 240, 242, 244, 246, 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, 307, 309, 311, 313, 315, 317, 319, 321, 323, 325, 327, 329, 331, 333, 335, 337, 339, 341, 343, 344, 345, 346, 347, 348, 349, 350, 351, 363, 367, 372, 374, 376, 378, 380, 382, 384, 386, 388, 390, 392, 394, 396, 398, 400, 402, 404, 406, 408, 411, 413, 415, 417, 419, 421, 423, 425, 427, 429, 432, 435, 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 467, 469, 471, 473, 475, 477, 479, 481, 483, 485, 487, 489, 492, 494, 496, 498, 500, 502, 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, 602, 603, 605, 607, 612, 617, 622, 627, 631, 635, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 658, 665, 670, 674, 680, 683, 685, 691, 706, 708, 710, 712, 714, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 751, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 784, 788, 793, 795, 797, 799, 801, 803, 805, 807, 809, 811, 813, 815, 817, 819, 821, 823, 825, 827, 829, 832, 834, 836, 838, 840, 842, 844, 846, 848, 850, 852, 854, 856, 858, 860, 862, 864, 866, 868, 870, 872, 874, 876, 878, 880, 882, 884, 886, 888, 890, 892, 894, 896, 898, 900, 902, 904, 906, 908, 910, 912, 914, 916, 918, 920, 922, 924, 926, 928, 930, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 944, 945, 946, 947, 948, 949, 950, 951, 964, 968, 973, 975, 977, 979, 981, 983, 985, 987, 989, 991, 993, 995, 997, 999, 1001, 1003, 1005, 1007, 1009, 1012, 1014, 1016, 1018, 1020, 1022, 1024, 1026, 1028, 1030, 1033, 1036, 1038, 1040, 1042, 1044, 1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, 1064, 1066, 1068, 1070, 1072, 1074, 1076, 1078, 1080, 1082, 1084, 1086, 1088, 1090, 1093, 1095, 1097, 1099, 1101, 1103, 1106, 1108, 1110, 1112, 1114, 1116, 1118, 1120, 1122, 1124, 1126, 1128, 1130, 1132, 1134, 1136, 1138, 1140, 1142, 1144, 1146, 1148, 1150, 1152, 1154, 1156, 1158, 1160, 1162, 1164, 1166, 1168, 1170, 1172, 1174, 1176, 1178, 1180, 1182, 1184, 1186, 1188, 1190, 1192, 1194, 1196, 1198, 1200, 1202, 1204, 1206, 1208, 1210, 1212, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237 }; static const char _lexer_trans_keys[] = { -29, -28, -27, -26, -24, -17, 10, 32, 34, 35, 37, 42, 64, 124, 9, 13, -127, -126, -125, -117, -105, -97, -86, -29, -127, -92, 10, 10, 13, -29, -28, -27, -26, -24, 10, 32, 34, 35, 37, 42, 64, 124, 9, 13, -67, -66, -122, -29, -127, -105, -117, 58, 10, 10, -29, -26, 10, 32, 35, 124, 9, 13, -125, 10, -107, 10, -29, 10, -126, 10, -93, 10, -29, 10, -125, 10, -68, 10, -29, 10, -125, 10, -127, 10, -29, 10, -125, 10, -93, 10, 10, 58, -29, -28, -27, -26, -24, 10, 32, 34, 35, 37, 42, 64, 124, 9, 13, -119, -115, -26, -113, -112, -87, -97, -24, -125, -67, 58, 10, 10, -29, -28, -26, -24, 10, 32, 35, 37, 64, 9, 13, -126, -125, 10, -75, -73, 10, -29, 10, -125, 10, -77, 10, -29, 10, -125, 10, -105, 10, -29, 10, -125, 10, -85, 10, 10, 58, -29, 10, -125, 10, -118, 10, -29, 10, -125, 10, -86, 10, -29, 10, -126, 10, -86, 10, -29, 10, 58, -126, -125, 10, -94, 10, -29, 10, -126, 10, -90, 10, -29, 10, -125, 10, -120, 10, -29, 10, -125, 10, -87, 10, -29, 10, -126, 10, -92, 10, -29, 10, -125, 10, -77, 10, -122, 10, -29, 10, -125, 10, -77, 10, -29, 10, -125, 10, -105, 10, -29, 10, -125, 10, -84, 10, -29, 10, 58, -125, 10, -68, 10, -29, 10, -125, 10, -120, 10, -122, -107, 10, -29, 10, -125, 10, -77, 10, -29, 10, -125, 10, -105, 10, -29, 10, -125, 10, -84, 10, -29, 10, -126, 10, -93, 10, -29, 10, -125, 10, -68, 10, -29, 10, -125, 10, -127, 10, -29, 10, -125, 10, -93, 10, -66, 10, -117, 10, -87, 10, -97, 10, -24, 10, -125, 10, -67, 10, -125, 10, -116, 10, -26, 10, -103, 10, -81, 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, -125, -116, -26, -103, -81, 58, 10, 10, -29, -28, -27, -26, 10, 32, 35, 37, 42, 64, 9, 13, -127, -126, -125, 10, -117, -105, -97, -86, 10, -29, 10, -127, 10, -92, 10, -29, 10, -127, 10, -117, 10, -29, 10, -127, 10, -105, 10, -29, 10, -127, 10, -96, 10, -29, 10, -126, 10, -119, 10, -29, 10, -127, 10, -80, 10, -126, -73, 10, -29, 10, -125, 10, -118, 10, -29, 10, -125, 10, -86, 10, -29, 10, -126, 10, -86, 10, -29, 10, 58, -126, -125, 10, -94, 10, -29, 10, -126, 10, -90, 10, -29, 10, -125, 10, -120, 10, -29, 10, -125, 10, -87, 10, -29, 10, -126, 10, -92, 10, -29, 10, -125, 10, -77, 10, 10, 58, -122, 10, -29, 10, -125, 10, -77, 10, -29, 10, -125, 10, -105, 10, -29, 10, -125, 10, -84, 10, -29, 10, 58, -125, 10, -68, 10, -29, 10, -125, 10, -120, 10, -122, -107, 10, -29, 10, -125, 10, -77, 10, -29, 10, -125, 10, -105, 10, -29, 10, -125, 10, -84, 10, -29, 10, -126, 10, -93, 10, -29, 10, -125, 10, -68, 10, -29, 10, -125, 10, -127, 10, -29, 10, -125, 10, -93, 10, -67, 10, -122, 10, -119, 10, -115, 10, -26, 10, -113, 10, -112, 10, -87, 10, -97, 10, -24, 10, -125, 10, -67, 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, 10, 32, 34, 34, 10, 13, 10, 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, 10, 95, 70, 69, 65, 84, 85, 82, 69, 95, 69, 78, 68, 95, 37, 32, 13, 32, 64, 9, 10, 9, 10, 13, 32, 64, 11, 12, 10, 32, 64, 9, 13, 32, 124, 9, 13, 10, 32, 92, 124, 9, 13, 10, 92, 124, 10, 92, 10, 32, 92, 124, 9, 13, -29, -28, -27, -26, -24, 10, 32, 34, 35, 37, 42, 64, 124, 9, 13, -87, 10, -97, 10, -24, 10, -125, 10, -67, 10, -29, -127, -117, -29, -127, -96, -29, -126, -119, -29, -127, -80, -126, -75, -73, -29, -125, -77, -29, -125, -105, -29, -125, -85, -29, -125, -118, -29, -125, -86, -29, -126, -86, -29, 58, -126, -125, -94, -29, -126, -90, -29, -125, -120, -29, -125, -87, -29, -126, -92, -29, -125, -77, 58, 10, 10, -29, -28, -27, -26, 10, 32, 35, 37, 42, 64, 9, 13, -127, -126, -125, 10, -117, -105, -97, -86, 10, -29, 10, -127, 10, -92, 10, -29, 10, -127, 10, -117, 10, -29, 10, -127, 10, -105, 10, -29, 10, -127, 10, -96, 10, -29, 10, -126, 10, -119, 10, -29, 10, -127, 10, -80, 10, -126, -73, 10, -29, 10, -125, 10, -118, 10, -29, 10, -125, 10, -86, 10, -29, 10, -126, 10, -86, 10, 10, 58, -107, 10, -29, 10, -126, 10, -93, 10, -29, 10, -125, 10, -68, 10, -29, 10, -125, 10, -127, 10, -29, 10, -125, 10, -93, 10, -67, 10, -122, 10, -119, 10, -115, 10, -26, 10, -113, 10, -112, 10, -87, 10, -97, 10, -24, 10, -125, 10, -67, 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, 10, 32, -122, -29, -125, -77, -29, -125, -105, -29, -125, -84, -29, 58, -125, -68, -29, -125, -120, 10, 10, -29, -28, -27, -26, -24, 10, 32, 35, 37, 42, 64, 9, 13, -127, -126, -125, 10, -117, -105, -97, -86, 10, -29, 10, -127, 10, -92, 10, -29, 10, -127, 10, -117, 10, -29, 10, -127, 10, -105, 10, -29, 10, -127, 10, -96, 10, -29, 10, -126, 10, -119, 10, -29, 10, -127, 10, -80, 10, -126, -73, 10, -29, 10, -125, 10, -118, 10, -29, 10, -125, 10, -86, 10, -29, 10, -126, 10, -86, 10, -29, 10, 58, -126, -125, 10, -94, 10, -29, 10, -126, 10, -90, 10, -29, 10, -125, 10, -120, 10, -29, 10, -125, 10, -87, 10, -29, 10, -126, 10, -92, 10, -29, 10, -125, 10, -77, 10, 10, 58, -122, 10, -29, 10, -125, 10, -77, 10, -29, 10, -125, 10, -105, 10, -29, 10, -125, 10, -84, 10, -29, 10, 58, -125, 10, -68, 10, -29, 10, -125, 10, -120, 10, -122, -107, 10, -29, 10, -125, 10, -77, 10, -29, 10, -125, 10, -105, 10, -29, 10, -125, 10, -84, 10, -29, 10, -126, 10, -93, 10, -29, 10, -125, 10, -68, 10, -29, 10, -125, 10, -127, 10, -29, 10, -125, 10, -93, 10, -67, 10, -122, 10, -119, 10, -115, 10, -26, 10, -113, 10, -112, 10, -87, 10, -97, 10, -24, 10, -125, 10, -67, 10, -125, 10, -116, 10, -26, 10, -103, 10, -81, 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, 10, 32, -122, -107, -29, -125, -77, -29, -125, -105, -29, -125, -84, -29, -126, -93, -29, -125, -68, -29, -125, -127, -29, -125, -93, -69, -65, 0 }; static const char _lexer_single_lengths[] = { 0, 14, 3, 4, 1, 1, 1, 1, 2, 13, 2, 1, 1, 1, 1, 1, 1, 1, 1, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 10, 4, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 3, 2, 4, 3, 2, 4, 13, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 4, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 11, 4, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; static const char _lexer_range_lengths[] = { 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 16, 20, 25, 27, 29, 31, 33, 36, 51, 54, 56, 58, 60, 62, 64, 66, 68, 70, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, 123, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 175, 179, 183, 186, 189, 192, 195, 198, 201, 204, 207, 210, 213, 216, 219, 222, 225, 228, 231, 234, 237, 240, 244, 248, 251, 254, 257, 260, 263, 266, 269, 272, 275, 278, 281, 284, 287, 290, 293, 296, 299, 302, 305, 308, 311, 314, 317, 320, 323, 326, 330, 333, 336, 339, 342, 345, 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, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472, 475, 478, 481, 484, 487, 490, 492, 494, 496, 498, 500, 502, 504, 506, 518, 523, 529, 532, 535, 538, 541, 544, 547, 550, 553, 556, 559, 562, 565, 568, 571, 574, 577, 580, 583, 587, 590, 593, 596, 599, 602, 605, 608, 611, 614, 618, 622, 625, 628, 631, 634, 637, 640, 643, 646, 649, 652, 655, 658, 661, 664, 667, 670, 673, 676, 679, 682, 685, 688, 691, 694, 697, 700, 703, 707, 710, 713, 716, 719, 722, 726, 729, 732, 735, 738, 741, 744, 747, 750, 753, 756, 759, 762, 765, 768, 771, 774, 777, 780, 783, 786, 789, 792, 795, 798, 801, 804, 807, 810, 813, 816, 819, 822, 825, 828, 831, 834, 837, 840, 843, 846, 849, 852, 855, 858, 861, 864, 867, 870, 872, 874, 877, 880, 885, 890, 895, 900, 904, 908, 911, 913, 915, 917, 919, 921, 923, 925, 927, 929, 931, 933, 935, 937, 939, 941, 943, 948, 955, 960, 964, 970, 974, 977, 983, 998, 1001, 1004, 1007, 1010, 1013, 1015, 1017, 1019, 1021, 1023, 1025, 1027, 1029, 1031, 1033, 1035, 1037, 1041, 1043, 1045, 1047, 1049, 1051, 1053, 1055, 1057, 1059, 1061, 1063, 1065, 1067, 1069, 1071, 1073, 1075, 1077, 1080, 1083, 1085, 1087, 1089, 1091, 1093, 1095, 1097, 1099, 1101, 1103, 1105, 1107, 1109, 1111, 1113, 1115, 1117, 1119, 1121, 1133, 1138, 1144, 1147, 1150, 1153, 1156, 1159, 1162, 1165, 1168, 1171, 1174, 1177, 1180, 1183, 1186, 1189, 1192, 1195, 1198, 1202, 1205, 1208, 1211, 1214, 1217, 1220, 1223, 1226, 1229, 1232, 1235, 1238, 1241, 1244, 1247, 1250, 1253, 1256, 1259, 1262, 1265, 1268, 1271, 1274, 1277, 1280, 1283, 1286, 1289, 1292, 1295, 1298, 1301, 1304, 1307, 1310, 1313, 1316, 1319, 1322, 1325, 1328, 1331, 1334, 1337, 1340, 1343, 1346, 1349, 1352, 1354, 1356, 1358, 1360, 1362, 1364, 1366, 1368, 1370, 1372, 1375, 1377, 1379, 1381, 1383, 1385, 1387, 1389, 1402, 1407, 1413, 1416, 1419, 1422, 1425, 1428, 1431, 1434, 1437, 1440, 1443, 1446, 1449, 1452, 1455, 1458, 1461, 1464, 1467, 1471, 1474, 1477, 1480, 1483, 1486, 1489, 1492, 1495, 1498, 1502, 1506, 1509, 1512, 1515, 1518, 1521, 1524, 1527, 1530, 1533, 1536, 1539, 1542, 1545, 1548, 1551, 1554, 1557, 1560, 1563, 1566, 1569, 1572, 1575, 1578, 1581, 1584, 1587, 1591, 1594, 1597, 1600, 1603, 1606, 1610, 1613, 1616, 1619, 1622, 1625, 1628, 1631, 1634, 1637, 1640, 1643, 1646, 1649, 1652, 1655, 1658, 1661, 1664, 1667, 1670, 1673, 1676, 1679, 1682, 1685, 1688, 1691, 1694, 1697, 1700, 1703, 1706, 1709, 1712, 1715, 1718, 1721, 1724, 1727, 1730, 1733, 1736, 1739, 1742, 1745, 1748, 1751, 1754, 1757, 1760, 1763, 1766, 1769, 1772, 1774, 1776, 1778, 1780, 1782, 1784, 1786, 1788, 1790, 1792, 1794, 1796, 1798, 1800, 1802, 1804, 1806, 1808, 1810, 1812, 1814, 1816, 1818 }; static const short _lexer_trans_targs[] = { 2, 10, 36, 41, 153, 601, 9, 9, 276, 286, 288, 302, 303, 306, 9, 0, 3, 329, 579, 0, 4, 317, 320, 323, 0, 5, 0, 6, 0, 7, 0, 0, 8, 9, 287, 8, 2, 10, 36, 41, 153, 9, 9, 276, 286, 288, 302, 303, 306, 9, 0, 11, 15, 0, 12, 0, 13, 0, 14, 0, 7, 0, 16, 0, 17, 0, 19, 18, 19, 18, 20, 312, 19, 19, 9, 9, 19, 18, 21, 19, 18, 22, 19, 18, 23, 19, 18, 24, 19, 18, 25, 19, 18, 26, 19, 18, 27, 19, 18, 28, 19, 18, 29, 19, 18, 30, 19, 18, 31, 19, 18, 32, 19, 18, 33, 19, 18, 34, 19, 18, 19, 35, 18, 2, 10, 36, 41, 153, 9, 9, 276, 286, 288, 302, 303, 306, 9, 0, 37, 0, 38, 0, 39, 0, 40, 0, 7, 0, 42, 0, 43, 0, 44, 0, 45, 0, 46, 0, 47, 0, 49, 48, 49, 48, 50, 127, 129, 134, 49, 49, 9, 139, 9, 49, 48, 51, 105, 49, 48, 52, 62, 49, 48, 53, 49, 48, 54, 49, 48, 55, 49, 48, 56, 49, 48, 57, 49, 48, 58, 49, 48, 59, 49, 48, 60, 49, 48, 61, 49, 48, 49, 35, 48, 63, 49, 48, 64, 49, 48, 65, 49, 48, 66, 49, 48, 67, 49, 48, 68, 49, 48, 69, 49, 48, 70, 49, 48, 71, 49, 48, 72, 49, 35, 48, 73, 89, 49, 48, 74, 49, 48, 75, 49, 48, 76, 49, 48, 77, 49, 48, 78, 49, 48, 79, 49, 48, 80, 49, 48, 81, 49, 48, 82, 49, 48, 83, 49, 48, 84, 49, 48, 85, 49, 48, 86, 49, 48, 87, 49, 48, 88, 49, 48, 61, 49, 48, 90, 49, 48, 91, 49, 48, 92, 49, 48, 93, 49, 48, 94, 49, 48, 95, 49, 48, 96, 49, 48, 97, 49, 48, 98, 49, 48, 99, 49, 48, 100, 49, 35, 48, 101, 49, 48, 102, 49, 48, 103, 49, 48, 104, 49, 48, 61, 49, 48, 106, 115, 49, 48, 107, 49, 48, 108, 49, 48, 109, 49, 48, 110, 49, 48, 111, 49, 48, 112, 49, 48, 113, 49, 48, 114, 49, 48, 61, 49, 48, 116, 49, 48, 117, 49, 48, 118, 49, 48, 119, 49, 48, 120, 49, 48, 121, 49, 48, 122, 49, 48, 123, 49, 48, 124, 49, 48, 125, 49, 48, 126, 49, 48, 61, 49, 48, 128, 49, 48, 61, 49, 48, 130, 49, 48, 131, 49, 48, 132, 49, 48, 133, 49, 48, 61, 49, 48, 135, 49, 48, 136, 49, 48, 137, 49, 48, 138, 49, 48, 61, 49, 48, 49, 140, 48, 49, 141, 48, 49, 142, 48, 49, 143, 48, 49, 144, 48, 49, 145, 48, 49, 146, 48, 49, 147, 48, 49, 148, 48, 49, 149, 48, 49, 150, 48, 49, 151, 48, 49, 152, 48, 49, 9, 48, 154, 0, 155, 0, 156, 0, 157, 0, 158, 0, 159, 0, 161, 160, 161, 160, 162, 249, 251, 256, 161, 161, 9, 261, 275, 9, 161, 160, 163, 182, 227, 161, 160, 164, 167, 173, 176, 161, 160, 165, 161, 160, 166, 161, 160, 35, 161, 160, 168, 161, 160, 169, 161, 160, 170, 161, 160, 171, 161, 160, 172, 161, 160, 35, 161, 160, 174, 161, 160, 175, 161, 160, 170, 161, 160, 177, 161, 160, 178, 161, 160, 179, 161, 160, 180, 161, 160, 181, 161, 160, 35, 161, 160, 170, 183, 161, 160, 184, 161, 160, 185, 161, 160, 186, 161, 160, 187, 161, 160, 188, 161, 160, 189, 161, 160, 190, 161, 160, 191, 161, 160, 192, 161, 160, 193, 161, 35, 160, 194, 211, 161, 160, 195, 161, 160, 196, 161, 160, 197, 161, 160, 198, 161, 160, 199, 161, 160, 200, 161, 160, 201, 161, 160, 202, 161, 160, 203, 161, 160, 204, 161, 160, 205, 161, 160, 206, 161, 160, 207, 161, 160, 208, 161, 160, 209, 161, 160, 210, 161, 160, 161, 35, 160, 212, 161, 160, 213, 161, 160, 214, 161, 160, 215, 161, 160, 216, 161, 160, 217, 161, 160, 218, 161, 160, 219, 161, 160, 220, 161, 160, 221, 161, 160, 222, 161, 35, 160, 223, 161, 160, 224, 161, 160, 225, 161, 160, 226, 161, 160, 210, 161, 160, 228, 237, 161, 160, 229, 161, 160, 230, 161, 160, 231, 161, 160, 232, 161, 160, 233, 161, 160, 234, 161, 160, 235, 161, 160, 236, 161, 160, 210, 161, 160, 238, 161, 160, 239, 161, 160, 240, 161, 160, 241, 161, 160, 242, 161, 160, 243, 161, 160, 244, 161, 160, 245, 161, 160, 246, 161, 160, 247, 161, 160, 248, 161, 160, 210, 161, 160, 250, 161, 160, 170, 161, 160, 252, 161, 160, 253, 161, 160, 254, 161, 160, 255, 161, 160, 35, 161, 160, 257, 161, 160, 258, 161, 160, 259, 161, 160, 260, 161, 160, 210, 161, 160, 161, 262, 160, 161, 263, 160, 161, 264, 160, 161, 265, 160, 161, 266, 160, 161, 267, 160, 161, 268, 160, 161, 269, 160, 161, 270, 160, 161, 271, 160, 161, 272, 160, 161, 273, 160, 161, 274, 160, 161, 9, 160, 161, 35, 160, 277, 0, 278, 0, 280, 279, 279, 280, 279, 279, 281, 281, 282, 281, 281, 281, 281, 282, 281, 281, 281, 281, 283, 281, 281, 281, 281, 284, 281, 281, 9, 285, 285, 0, 9, 285, 285, 0, 9, 287, 286, 9, 0, 289, 0, 290, 0, 291, 0, 292, 0, 293, 0, 294, 0, 295, 0, 296, 0, 297, 0, 298, 0, 299, 0, 300, 0, 301, 0, 603, 0, 7, 0, 0, 0, 0, 0, 304, 305, 9, 305, 305, 303, 304, 304, 9, 305, 303, 305, 0, 306, 307, 306, 0, 311, 310, 309, 307, 310, 308, 0, 309, 307, 308, 0, 309, 308, 311, 310, 309, 307, 310, 308, 2, 10, 36, 41, 153, 311, 311, 276, 286, 288, 302, 303, 306, 311, 0, 313, 19, 18, 314, 19, 18, 315, 19, 18, 316, 19, 18, 34, 19, 18, 318, 0, 319, 0, 12, 0, 321, 0, 322, 0, 12, 0, 324, 0, 325, 0, 326, 0, 327, 0, 328, 0, 7, 0, 12, 330, 339, 0, 331, 0, 332, 0, 333, 0, 334, 0, 335, 0, 336, 0, 337, 0, 338, 0, 16, 0, 340, 0, 341, 0, 342, 0, 343, 0, 344, 0, 345, 0, 346, 0, 347, 0, 348, 0, 349, 457, 0, 350, 441, 0, 351, 0, 352, 0, 353, 0, 354, 0, 355, 0, 356, 0, 357, 0, 358, 0, 359, 0, 360, 0, 361, 0, 362, 0, 363, 0, 364, 0, 365, 0, 366, 0, 367, 0, 369, 368, 369, 368, 370, 414, 416, 421, 369, 369, 9, 426, 440, 9, 369, 368, 371, 390, 401, 369, 368, 372, 375, 381, 384, 369, 368, 373, 369, 368, 374, 369, 368, 35, 369, 368, 376, 369, 368, 377, 369, 368, 378, 369, 368, 379, 369, 368, 380, 369, 368, 35, 369, 368, 382, 369, 368, 383, 369, 368, 378, 369, 368, 385, 369, 368, 386, 369, 368, 387, 369, 368, 388, 369, 368, 389, 369, 368, 35, 369, 368, 378, 391, 369, 368, 392, 369, 368, 393, 369, 368, 394, 369, 368, 395, 369, 368, 396, 369, 368, 397, 369, 368, 398, 369, 368, 399, 369, 368, 400, 369, 368, 369, 35, 368, 402, 369, 368, 403, 369, 368, 404, 369, 368, 405, 369, 368, 406, 369, 368, 407, 369, 368, 408, 369, 368, 409, 369, 368, 410, 369, 368, 411, 369, 368, 412, 369, 368, 413, 369, 368, 400, 369, 368, 415, 369, 368, 378, 369, 368, 417, 369, 368, 418, 369, 368, 419, 369, 368, 420, 369, 368, 35, 369, 368, 422, 369, 368, 423, 369, 368, 424, 369, 368, 425, 369, 368, 400, 369, 368, 369, 427, 368, 369, 428, 368, 369, 429, 368, 369, 430, 368, 369, 431, 368, 369, 432, 368, 369, 433, 368, 369, 434, 368, 369, 435, 368, 369, 436, 368, 369, 437, 368, 369, 438, 368, 369, 439, 368, 369, 9, 368, 369, 35, 368, 442, 0, 443, 0, 444, 0, 445, 0, 446, 0, 447, 0, 448, 0, 449, 0, 450, 0, 451, 0, 452, 367, 0, 453, 0, 454, 0, 455, 0, 456, 0, 366, 0, 459, 458, 459, 458, 460, 547, 549, 554, 559, 459, 459, 9, 564, 578, 9, 459, 458, 461, 480, 525, 459, 458, 462, 465, 471, 474, 459, 458, 463, 459, 458, 464, 459, 458, 35, 459, 458, 466, 459, 458, 467, 459, 458, 468, 459, 458, 469, 459, 458, 470, 459, 458, 35, 459, 458, 472, 459, 458, 473, 459, 458, 468, 459, 458, 475, 459, 458, 476, 459, 458, 477, 459, 458, 478, 459, 458, 479, 459, 458, 35, 459, 458, 468, 481, 459, 458, 482, 459, 458, 483, 459, 458, 484, 459, 458, 485, 459, 458, 486, 459, 458, 487, 459, 458, 488, 459, 458, 489, 459, 458, 490, 459, 458, 491, 459, 35, 458, 492, 509, 459, 458, 493, 459, 458, 494, 459, 458, 495, 459, 458, 496, 459, 458, 497, 459, 458, 498, 459, 458, 499, 459, 458, 500, 459, 458, 501, 459, 458, 502, 459, 458, 503, 459, 458, 504, 459, 458, 505, 459, 458, 506, 459, 458, 507, 459, 458, 508, 459, 458, 459, 35, 458, 510, 459, 458, 511, 459, 458, 512, 459, 458, 513, 459, 458, 514, 459, 458, 515, 459, 458, 516, 459, 458, 517, 459, 458, 518, 459, 458, 519, 459, 458, 520, 459, 35, 458, 521, 459, 458, 522, 459, 458, 523, 459, 458, 524, 459, 458, 508, 459, 458, 526, 535, 459, 458, 527, 459, 458, 528, 459, 458, 529, 459, 458, 530, 459, 458, 531, 459, 458, 532, 459, 458, 533, 459, 458, 534, 459, 458, 508, 459, 458, 536, 459, 458, 537, 459, 458, 538, 459, 458, 539, 459, 458, 540, 459, 458, 541, 459, 458, 542, 459, 458, 543, 459, 458, 544, 459, 458, 545, 459, 458, 546, 459, 458, 508, 459, 458, 548, 459, 458, 468, 459, 458, 550, 459, 458, 551, 459, 458, 552, 459, 458, 553, 459, 458, 35, 459, 458, 555, 459, 458, 556, 459, 458, 557, 459, 458, 558, 459, 458, 508, 459, 458, 560, 459, 458, 561, 459, 458, 562, 459, 458, 563, 459, 458, 508, 459, 458, 459, 565, 458, 459, 566, 458, 459, 567, 458, 459, 568, 458, 459, 569, 458, 459, 570, 458, 459, 571, 458, 459, 572, 458, 459, 573, 458, 459, 574, 458, 459, 575, 458, 459, 576, 458, 459, 577, 458, 459, 9, 458, 459, 35, 458, 580, 589, 0, 581, 0, 582, 0, 583, 0, 584, 0, 585, 0, 586, 0, 587, 0, 588, 0, 366, 0, 590, 0, 591, 0, 592, 0, 593, 0, 594, 0, 595, 0, 596, 0, 597, 0, 598, 0, 599, 0, 600, 0, 46, 0, 602, 0, 9, 0, 0, 0 }; static const unsigned char _lexer_trans_actions[] = { 29, 29, 29, 29, 29, 0, 54, 0, 5, 1, 0, 29, 1, 35, 0, 43, 0, 0, 0, 43, 0, 0, 0, 0, 43, 0, 43, 0, 43, 0, 43, 43, 57, 110, 23, 0, 29, 29, 29, 29, 29, 54, 0, 5, 1, 0, 29, 1, 35, 0, 43, 0, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 140, 57, 54, 0, 84, 84, 54, 0, 81, 81, 0, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 54, 21, 0, 63, 63, 63, 63, 63, 126, 31, 60, 57, 31, 63, 57, 66, 31, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 140, 57, 54, 0, 84, 84, 84, 84, 54, 0, 69, 33, 69, 0, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 54, 13, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 13, 0, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 13, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 13, 0, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 140, 57, 54, 0, 84, 84, 84, 84, 54, 0, 72, 33, 84, 72, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 15, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 15, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 15, 54, 0, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 15, 0, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 54, 15, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 15, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 15, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 15, 0, 54, 15, 0, 0, 43, 0, 43, 135, 48, 9, 106, 11, 0, 130, 45, 45, 45, 3, 122, 33, 33, 33, 0, 122, 33, 33, 33, 0, 122, 33, 0, 33, 0, 102, 7, 7, 43, 54, 0, 0, 43, 114, 25, 0, 54, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 43, 43, 43, 43, 0, 27, 118, 27, 27, 51, 27, 0, 54, 0, 1, 0, 43, 0, 0, 0, 43, 54, 37, 37, 87, 37, 37, 43, 0, 39, 0, 43, 0, 0, 54, 0, 0, 39, 0, 0, 96, 96, 96, 96, 96, 54, 0, 93, 90, 41, 96, 90, 99, 0, 43, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 0, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 0, 43, 0, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 140, 57, 54, 0, 84, 84, 84, 84, 54, 0, 78, 33, 84, 78, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 19, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 19, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 19, 54, 0, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 54, 19, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 19, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 19, 0, 54, 19, 0, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 140, 57, 54, 0, 84, 84, 84, 84, 84, 54, 0, 75, 33, 84, 75, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 17, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 17, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 17, 54, 0, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 17, 0, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 54, 17, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 17, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 17, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 17, 0, 54, 17, 0, 0, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 0 }; static const unsigned char _lexer_eof_actions[] = { 0, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43 }; static const int lexer_start = 1; static const int lexer_first_final = 603; static const int lexer_error = 0; static const int lexer_en_main = 1; #line 258 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" static VALUE unindent(VALUE con, int start_col) { VALUE re; // Gherkin will crash gracefully if the string representation of start_col pushes the pattern past 32 characters char pat[32]; snprintf(pat, 32, "^[\t ]{0,%d}", start_col); re = rb_reg_regcomp(rb_str_new2(pat)); rb_funcall(con, rb_intern("gsub!"), 2, re, rb_str_new2("")); return Qnil; } 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); rb_funcall(con, rb_intern("strip!"), 0); rb_funcall(listener, rb_intern(event_name), 3, kw, con, INT2FIX(current_line)); } static void store_multiline_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, int start_col) { VALUE split; VALUE con = Qnil, kw = Qnil, name = Qnil, desc = Qnil; kw = ENCODED_STR_NEW(keyword_at, keyword_length); con = ENCODED_STR_NEW(at, length); unindent(con, start_col); split = rb_str_split(con, "\n"); name = rb_funcall(split, rb_intern("shift"), 0); desc = rb_ary_join(split, rb_str_new2( "\n" )); if( name == Qnil ) { name = rb_str_new2(""); } if( rb_funcall(desc, rb_intern("size"), 0) == 0) { desc = rb_str_new2(""); } rb_funcall(name, rb_intern("strip!"), 0); rb_funcall(desc, rb_intern("rstrip!"), 0); rb_funcall(listener, rb_intern(event_name), 4, kw, name, desc, 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_docstring_content(VALUE listener, int start_col, const char *type_at, size_t type_length, const char *at, size_t length, int current_line) { VALUE re2; VALUE unescape_escaped_quotes; VALUE con = ENCODED_STR_NEW(at, length); VALUE con_type = ENCODED_STR_NEW(type_at, type_length); unindent(con, start_col); re2 = rb_reg_regcomp(rb_str_new2("\r\\Z")); unescape_escaped_quotes = rb_reg_regcomp(rb_str_new2("\\\\\"\\\\\"\\\\\"")); rb_funcall(con, rb_intern("sub!"), 2, re2, rb_str_new2("")); rb_funcall(con_type, rb_intern("strip!"), 0); rb_funcall(con, rb_intern("gsub!"), 2, unescape_escaped_quotes, rb_str_new2("\"\"\"")); rb_funcall(listener, rb_intern("doc_string"), 3, con_type, con, INT2FIX(current_line)); } static void raise_lexer_error(const char * at, int line) { rb_raise(rb_eGherkinLexingError, "Lexing error on line %d: '%s'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information.", line, at); } static void lexer_init(lexer_state *lexer) { lexer->content_start = 0; lexer->content_end = 0; lexer->content_len = 0; lexer->docstring_content_type_start = 0; lexer->docstring_content_type_end = 0; lexer->mark = 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) { lexer_state *lxr; rb_iv_set(self, "@listener", listener); lxr = NULL; DATA_GET(self, lexer_state, lxr); lexer_init(lxr); return self; } static VALUE CLexer_scan(VALUE self, VALUE input) { VALUE input_copy; char *data; size_t len; VALUE listener = rb_iv_get(self, "@listener"); lexer_state *lexer; lexer = NULL; DATA_GET(self, lexer_state, lexer); input_copy = rb_str_dup(input); rb_str_append(input_copy, rb_str_new2("\n%_FEATURE_END_%")); data = RSTRING_PTR(input_copy); len = RSTRING_LEN(input_copy); if (len == 0) { rb_raise(rb_eGherkinLexingError, "No content to lex."); } else { const char *p, *pe, *eof; int cs = 0; VALUE current_row = Qnil; p = data; pe = data + len; eof = pe; assert(*pe == '\0' && "pointer does not end on NULL"); #line 1302 "ext/gherkin_lexer_ja/gherkin_lexer_ja.c" { cs = lexer_start; } #line 425 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" #line 1309 "ext/gherkin_lexer_ja/gherkin_lexer_ja.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 83 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { MARK(content_start, p); lexer->current_line = lexer->line_number; lexer->start_col = lexer->content_start - lexer->last_newline - (lexer->keyword_end - lexer->keyword_start) + 2; } break; case 1: #line 89 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { MARK(content_start, p); } break; case 2: #line 93 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { lexer->current_line = lexer->line_number; lexer->start_col = p - data - lexer->last_newline; } break; case 3: #line 98 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { int len = LEN(content_start, PTR_TO(final_newline)); int type_len = LEN(docstring_content_type_start, PTR_TO(docstring_content_type_end)); if (len < 0) len = 0; if (type_len < 0) len = 0; store_docstring_content(listener, lexer->start_col, PTR_TO(docstring_content_type_start), type_len, PTR_TO(content_start), len, lexer->current_line); } break; case 4: #line 108 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { MARK(docstring_content_type_start, p); } break; case 5: #line 112 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { MARK(docstring_content_type_end, p); } break; case 6: #line 116 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { STORE_KW_END_CON(feature); } break; case 7: #line 120 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { STORE_KW_END_CON(background); } break; case 8: #line 124 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { STORE_KW_END_CON(scenario); } break; case 9: #line 128 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { STORE_KW_END_CON(scenario_outline); } break; case 10: #line 132 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { STORE_KW_END_CON(examples); } break; case 11: #line 136 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.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 12: #line 143 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { STORE_ATTR(comment); lexer->mark = 0; } break; case 13: #line 148 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { STORE_ATTR(tag); lexer->mark = 0; } break; case 14: #line 153 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { lexer->line_number += 1; MARK(final_newline, p); } break; case 15: #line 158 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { MARK(last_newline, p + 1); } break; case 16: #line 162 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { if (lexer->mark == 0) { MARK(mark, p); } } break; case 17: #line 168 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { MARK(keyword_end, p); MARK(keyword_start, PTR_TO(mark)); MARK(content_start, p + 1); lexer->mark = 0; } break; case 18: #line 175 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { MARK(content_end, p); } break; case 19: #line 179 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { p = p - 1; lexer->current_line = lexer->line_number; current_row = rb_ary_new(); } break; case 20: #line 185 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { MARK(content_start, p); } break; case 21: #line 189 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { VALUE re_pipe, re_newline, re_backslash; VALUE con = ENCODED_STR_NEW(PTR_TO(content_start), LEN(content_start, p)); rb_funcall(con, rb_intern("strip!"), 0); re_pipe = rb_reg_regcomp(rb_str_new2("\\\\\\|")); re_newline = rb_reg_regcomp(rb_str_new2("\\\\n")); re_backslash = rb_reg_regcomp(rb_str_new2("\\\\\\\\")); rb_funcall(con, rb_intern("gsub!"), 2, re_pipe, rb_str_new2("|")); rb_funcall(con, rb_intern("gsub!"), 2, re_newline, rb_str_new2("\n")); rb_funcall(con, rb_intern("gsub!"), 2, re_backslash, rb_str_new2("\\")); rb_ary_push(current_row, con); } break; case 22: #line 203 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { rb_funcall(listener, rb_intern("row"), 2, current_row, INT2FIX(lexer->current_line)); } break; case 23: #line 207 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { int line; if (cs < lexer_first_final) { size_t count = 0; VALUE newstr_val; char *newstr; 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; } // Allocate as a ruby string so that it gets cleaned up by GC newstr_val = rb_str_new(buff, len); newstr = RSTRING_PTR(newstr_val); 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++; } line = lexer->line_number; lexer_init(lexer); // Re-initialize so we can scan again with the same lexer raise_lexer_error(newstr, line); } else { rb_funcall(listener, rb_intern("eof"), 0); } } break; #line 1599 "ext/gherkin_lexer_ja/gherkin_lexer_ja.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 207 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.c.rl" { int line; if (cs < lexer_first_final) { size_t count = 0; VALUE newstr_val; char *newstr; 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; } // Allocate as a ruby string so that it gets cleaned up by GC newstr_val = rb_str_new(buff, len); newstr = RSTRING_PTR(newstr_val); 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++; } line = lexer->line_number; lexer_init(lexer); // Re-initialize so we can scan again with the same lexer raise_lexer_error(newstr, line); } else { rb_funcall(listener, rb_intern("eof"), 0); } } break; #line 1662 "ext/gherkin_lexer_ja/gherkin_lexer_ja.c" } } } _out: {} } #line 426 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/ja.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"); // Reset lexer by re-initializing the whole thing lexer_init(lexer); if (cs == lexer_error) { rb_raise(rb_eGherkinLexingError, "Invalid format, lexing fails."); } else { return Qtrue; } } } void Init_gherkin_lexer_ja() { mGherkin = rb_define_module("Gherkin"); mGherkinLexer = rb_define_module_under(mGherkin, "Lexer"); rb_eGherkinLexingError = rb_const_get(mGherkinLexer, rb_intern("LexingError")); mCLexer = rb_define_module_under(mGherkin, "CLexer"); cI18nLexer = rb_define_class_under(mCLexer, "Ja", 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); }