#line 1 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.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 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 242 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" /** Data **/ #line 87 "ext/gherkin_lexer_en_scouse/gherkin_lexer_en_scouse.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, 14, 1, 15, 1, 16, 1, 17, 1, 18, 1, 19, 1, 20, 1, 21, 2, 1, 16, 2, 11, 0, 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, 20, 0, 2, 20, 2, 2, 20, 14, 2, 20, 17, 3, 3, 12, 13, 3, 9, 12, 13, 3, 10, 12, 13, 3, 11, 12, 13, 3, 12, 13, 16, 3, 15, 12, 13, 4, 1, 12, 13, 16, 4, 15, 0, 12, 13 }; static const short _lexer_key_offsets[] = { 0, 0, 20, 21, 22, 41, 42, 43, 47, 52, 57, 62, 67, 71, 75, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96, 101, 108, 113, 114, 115, 116, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 236, 238, 240, 242, 244, 246, 248, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 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, 345, 347, 349, 351, 353, 355, 357, 359, 361, 363, 365, 367, 369, 371, 373, 375, 377, 379, 381, 383, 385, 387, 389, 391, 393, 395, 397, 399, 401, 403, 405, 407, 409, 411, 413, 415, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 456, 458, 460, 462, 464, 466, 468, 470, 472, 474, 476, 478, 480, 482, 484, 486, 488, 490, 492, 496, 498, 500, 502, 504, 506, 508, 510, 512, 514, 516, 518, 520, 522, 524, 526, 528, 530, 532, 534, 536, 538, 540, 542, 544, 546, 548, 550, 552, 554, 556, 558, 560, 562, 564, 566, 568, 570, 572, 574, 576, 578, 580, 582, 584, 586, 588, 590, 592, 594, 596, 598, 600, 602, 604, 606, 608, 610, 612, 614, 617, 619, 621, 623, 625, 627, 629, 631, 633, 635, 637, 639, 641, 643, 645, 647, 649, 651, 653, 656, 658, 660, 662, 664, 666, 668, 670, 672, 674, 676, 678, 680, 682, 684, 686, 688, 690, 692, 694, 696, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 728, 730, 732, 734, 736, 738, 740, 742, 744, 746, 748, 750, 752, 754, 756, 758, 760, 762, 764, 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, 841, 843, 845, 847, 849, 851, 853, 855, 857, 859, 861, 863, 865, 867, 870, 872, 874, 876, 878, 880, 882, 884, 886, 888, 890, 892, 894, 896, 898, 900, 902, 904, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 946, 952, 955, 957, 963, 982, 984, 986, 988, 991, 993, 995, 997, 999, 1001, 1003, 1005, 1007, 1009, 1011, 1013, 1015, 1017, 1019, 1021, 1023, 1025, 1027, 1029, 1031, 1033, 1035, 1037, 1039, 1041, 1043, 1045, 1047, 1049, 1051, 1053, 1055, 1057, 1059, 1061, 1063, 1065, 1067, 1069, 1071, 1074, 1076, 1078, 1080, 1082, 1084, 1086, 1088, 1090, 1092, 1094, 1096, 1098, 1100, 1102, 1104, 1106, 1108, 1110, 1113, 1115, 1117, 1119, 1121, 1123, 1125, 1127, 1129, 1131, 1133, 1135, 1137, 1139, 1141, 1143, 1145, 1147, 1149, 1151, 1153 }; static const char _lexer_trans_keys[] = { -17, 10, 32, 34, 35, 37, 42, 64, 65, 66, 68, 69, 70, 71, 84, 87, 89, 124, 9, 13, -69, -65, 10, 32, 34, 35, 37, 42, 64, 65, 66, 68, 69, 70, 71, 84, 87, 89, 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, 10, 95, 70, 69, 65, 84, 85, 82, 69, 95, 69, 78, 68, 95, 37, 32, 10, 10, 13, 13, 32, 64, 9, 10, 9, 10, 13, 32, 64, 11, 12, 10, 32, 64, 9, 13, 110, 117, 104, 101, 105, 117, 110, 32, 121, 111, 117, 115, 101, 32, 103, 111, 116, 116, 97, 115, 32, 105, 115, 32, 119, 104, 97, 116, 32, 119, 101, 110, 116, 32, 100, 111, 119, 110, 58, 10, 10, 10, 32, 35, 37, 42, 64, 65, 66, 68, 70, 71, 84, 87, 89, 9, 13, 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, 10, 32, 34, 35, 37, 42, 64, 65, 66, 68, 69, 70, 71, 84, 87, 89, 124, 9, 13, 120, 97, 109, 112, 108, 101, 115, 58, 10, 10, 10, 32, 35, 70, 124, 9, 13, 10, 101, 10, 97, 10, 116, 10, 117, 10, 114, 10, 101, 10, 58, 101, 97, 116, 117, 114, 101, 58, 10, 10, 10, 32, 35, 37, 64, 68, 69, 70, 84, 87, 9, 13, 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, 105, 10, 115, 10, 32, 10, 105, 10, 115, 10, 32, 10, 119, 10, 104, 10, 97, 10, 116, 10, 32, 10, 119, 10, 101, 10, 110, 10, 116, 10, 32, 10, 100, 10, 111, 10, 119, 10, 110, 10, 58, 10, 120, 10, 97, 10, 109, 10, 112, 10, 108, 10, 101, 10, 115, 10, 101, 10, 97, 10, 116, 10, 117, 10, 114, 10, 101, 10, 104, 10, 101, 10, 32, 10, 116, 10, 104, 10, 105, 10, 110, 10, 103, 10, 32, 10, 111, 10, 102, 10, 32, 10, 105, 10, 116, 10, 32, 10, 105, 10, 104, 10, 97, 10, 114, 10, 114, 10, 105, 10, 109, 10, 101, 10, 97, 10, 110, 105, 118, 117, 104, 101, 32, 116, 104, 105, 110, 103, 32, 111, 102, 32, 105, 116, 32, 105, 115, 58, 10, 10, 10, 32, 35, 37, 42, 64, 65, 66, 68, 70, 71, 84, 87, 89, 9, 13, 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, 10, 110, 10, 117, 10, 104, 10, 101, 105, 117, 10, 110, 10, 32, 10, 121, 10, 111, 10, 117, 10, 115, 10, 101, 10, 32, 10, 103, 10, 111, 10, 116, 10, 116, 10, 97, 10, 115, 10, 32, 10, 105, 10, 115, 10, 32, 10, 119, 10, 104, 10, 97, 10, 116, 10, 32, 10, 119, 10, 101, 10, 110, 10, 116, 10, 32, 10, 100, 10, 111, 10, 119, 10, 110, 10, 58, 10, 101, 10, 97, 10, 116, 10, 117, 10, 114, 10, 101, 10, 105, 10, 118, 10, 117, 10, 104, 10, 101, 10, 32, 10, 116, 10, 104, 10, 105, 10, 110, 10, 103, 10, 32, 10, 111, 10, 102, 10, 32, 10, 105, 10, 116, 10, 32, 10, 105, 10, 115, 10, 104, 117, 10, 97, 10, 114, 10, 114, 10, 105, 10, 109, 10, 101, 10, 97, 10, 110, 10, 111, 10, 117, 10, 115, 10, 101, 10, 32, 10, 107, 10, 110, 10, 111, 10, 119, 10, 32, 10, 108, 119, 10, 105, 10, 107, 10, 101, 10, 32, 10, 119, 10, 104, 10, 101, 10, 104, 10, 101, 10, 110, 10, 32, 10, 121, 10, 111, 10, 117, 10, 115, 10, 101, 10, 32, 10, 103, 10, 111, 10, 116, 104, 117, 97, 114, 114, 105, 109, 101, 97, 110, 32, 105, 115, 58, 10, 10, 10, 32, 35, 37, 42, 64, 65, 66, 68, 70, 71, 84, 87, 89, 9, 13, 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, 10, 110, 10, 117, 10, 104, 10, 101, 117, 10, 110, 10, 32, 10, 121, 10, 111, 10, 117, 10, 115, 10, 101, 10, 32, 10, 103, 10, 111, 10, 116, 10, 116, 10, 97, 10, 101, 10, 97, 10, 116, 10, 117, 10, 114, 10, 101, 10, 58, 10, 105, 10, 118, 10, 117, 10, 104, 10, 101, 10, 32, 10, 116, 10, 104, 10, 105, 10, 110, 10, 103, 10, 32, 10, 111, 10, 102, 10, 32, 10, 105, 10, 116, 10, 32, 10, 105, 10, 115, 10, 111, 10, 117, 10, 115, 10, 101, 10, 32, 10, 107, 10, 110, 10, 111, 10, 119, 10, 32, 10, 108, 119, 10, 105, 10, 107, 10, 101, 10, 32, 10, 119, 10, 104, 10, 101, 10, 104, 10, 101, 10, 110, 10, 32, 10, 121, 10, 111, 10, 117, 10, 115, 10, 101, 10, 32, 10, 103, 10, 111, 10, 116, 111, 117, 115, 101, 32, 107, 110, 111, 119, 32, 108, 119, 105, 107, 101, 32, 119, 104, 101, 104, 101, 110, 32, 121, 111, 117, 115, 101, 32, 103, 111, 116, 32, 124, 9, 13, 10, 32, 92, 124, 9, 13, 10, 92, 124, 10, 92, 10, 32, 92, 124, 9, 13, 10, 32, 34, 35, 37, 42, 64, 65, 66, 68, 69, 70, 71, 84, 87, 89, 124, 9, 13, 10, 110, 10, 117, 10, 104, 10, 101, 117, 10, 110, 10, 32, 10, 121, 10, 111, 10, 117, 10, 115, 10, 101, 10, 32, 10, 103, 10, 111, 10, 116, 10, 116, 10, 97, 10, 101, 10, 97, 10, 116, 10, 117, 10, 114, 10, 101, 10, 58, 10, 105, 10, 118, 10, 117, 10, 104, 10, 101, 10, 32, 10, 116, 10, 104, 10, 105, 10, 110, 10, 103, 10, 32, 10, 111, 10, 102, 10, 32, 10, 105, 10, 116, 10, 32, 10, 105, 10, 115, 10, 104, 117, 10, 97, 10, 114, 10, 114, 10, 105, 10, 109, 10, 101, 10, 97, 10, 110, 10, 111, 10, 117, 10, 115, 10, 101, 10, 32, 10, 107, 10, 110, 10, 111, 10, 119, 10, 32, 10, 108, 119, 10, 105, 10, 107, 10, 101, 10, 32, 10, 119, 10, 104, 10, 101, 10, 104, 10, 101, 10, 110, 10, 32, 10, 121, 10, 111, 10, 117, 10, 115, 10, 101, 10, 32, 10, 103, 10, 111, 10, 116, 0 }; static const char _lexer_single_lengths[] = { 0, 18, 1, 1, 17, 1, 1, 2, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 5, 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 14, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 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,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164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 232, 235, 238, 241, 244, 247, 250, 253, 256, 259, 262, 265, 268, 271, 274, 277, 296, 298, 300, 302, 304, 306, 308, 310, 312, 314, 316, 323, 326, 329, 332, 335, 338, 341, 344, 346, 348, 350, 352, 354, 356, 358, 360, 362, 374, 377, 380, 383, 386, 389, 392, 395, 398, 401, 404, 407, 410, 413, 416, 419, 422, 425, 428, 431, 434, 437, 440, 443, 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, 595, 597, 599, 601, 603, 605, 607, 609, 611, 613, 615, 617, 619, 621, 623, 625, 627, 629, 631, 633, 635, 637, 639, 655, 658, 661, 664, 667, 670, 673, 676, 679, 682, 685, 688, 691, 694, 697, 700, 703, 706, 709, 714, 717, 720, 723, 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, 873, 876, 879, 882, 885, 888, 891, 895, 898, 901, 904, 907, 910, 913, 916, 919, 922, 925, 928, 931, 934, 937, 940, 943, 946, 949, 953, 956, 959, 962, 965, 968, 971, 974, 977, 980, 983, 986, 989, 992, 995, 998, 1001, 1004, 1007, 1010, 1013, 1016, 1018, 1020, 1022, 1024, 1026, 1028, 1030, 1032, 1034, 1036, 1038, 1040, 1042, 1044, 1060, 1063, 1066, 1069, 1072, 1075, 1078, 1081, 1084, 1087, 1090, 1093, 1096, 1099, 1102, 1105, 1108, 1111, 1114, 1118, 1121, 1124, 1127, 1130, 1133, 1136, 1139, 1142, 1145, 1148, 1151, 1154, 1157, 1160, 1163, 1166, 1169, 1172, 1175, 1178, 1181, 1184, 1187, 1190, 1193, 1196, 1199, 1202, 1205, 1208, 1211, 1214, 1217, 1220, 1223, 1226, 1229, 1232, 1235, 1238, 1241, 1244, 1247, 1250, 1253, 1256, 1259, 1262, 1265, 1268, 1272, 1275, 1278, 1281, 1284, 1287, 1290, 1293, 1296, 1299, 1302, 1305, 1308, 1311, 1314, 1317, 1320, 1323, 1326, 1329, 1332, 1334, 1336, 1338, 1340, 1342, 1344, 1346, 1348, 1350, 1352, 1355, 1357, 1359, 1361, 1363, 1365, 1367, 1369, 1371, 1373, 1375, 1377, 1379, 1381, 1383, 1385, 1387, 1389, 1391, 1393, 1395, 1399, 1405, 1409, 1412, 1418, 1437, 1440, 1443, 1446, 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, 1531, 1534, 1537, 1540, 1543, 1546, 1549, 1552, 1555, 1558, 1561, 1564, 1567, 1570, 1574, 1577, 1580, 1583, 1586, 1589, 1592, 1595, 1598, 1601, 1604, 1607, 1610, 1613, 1616, 1619, 1622, 1625, 1628, 1632, 1635, 1638, 1641, 1644, 1647, 1650, 1653, 1656, 1659, 1662, 1665, 1668, 1671, 1674, 1677, 1680, 1683, 1686, 1689, 1692 }; static const short _lexer_trans_targs[] = { 2, 4, 4, 5, 14, 16, 30, 33, 36, 37, 39, 92, 110, 193, 196, 335, 441, 472, 4, 0, 3, 0, 4, 0, 4, 4, 5, 14, 16, 30, 33, 36, 37, 39, 92, 110, 193, 196, 335, 441, 472, 4, 0, 6, 0, 7, 0, 8, 7, 7, 0, 9, 9, 10, 9, 9, 9, 9, 10, 9, 9, 9, 9, 11, 9, 9, 9, 9, 12, 9, 9, 4, 13, 13, 0, 4, 13, 13, 0, 4, 15, 14, 4, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, 22, 0, 23, 0, 24, 0, 25, 0, 26, 0, 27, 0, 28, 0, 29, 0, 562, 0, 31, 0, 0, 32, 4, 15, 32, 0, 0, 0, 0, 34, 35, 4, 35, 35, 33, 34, 34, 4, 35, 33, 35, 0, 30, 0, 38, 0, 30, 0, 40, 53, 36, 0, 41, 0, 42, 0, 43, 0, 44, 0, 45, 0, 46, 0, 47, 0, 48, 0, 49, 0, 50, 0, 51, 0, 52, 0, 30, 0, 54, 0, 55, 0, 56, 0, 57, 0, 58, 0, 59, 0, 60, 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, 75, 74, 75, 74, 75, 75, 4, 76, 90, 4, 478, 479, 481, 495, 502, 505, 522, 531, 75, 74, 75, 77, 74, 75, 78, 74, 75, 79, 74, 75, 80, 74, 75, 81, 74, 75, 82, 74, 75, 83, 74, 75, 84, 74, 75, 85, 74, 75, 86, 74, 75, 87, 74, 75, 88, 74, 75, 89, 74, 75, 4, 74, 75, 91, 74, 4, 4, 5, 14, 16, 30, 33, 36, 37, 39, 92, 110, 193, 196, 335, 441, 472, 4, 0, 93, 0, 94, 0, 95, 0, 96, 0, 97, 0, 98, 0, 99, 0, 100, 0, 102, 101, 102, 101, 102, 102, 4, 103, 4, 102, 101, 102, 104, 101, 102, 105, 101, 102, 106, 101, 102, 107, 101, 102, 108, 101, 102, 109, 101, 102, 91, 101, 111, 0, 112, 0, 113, 0, 114, 0, 115, 0, 116, 0, 117, 0, 119, 118, 119, 118, 119, 119, 4, 120, 4, 134, 155, 162, 168, 184, 119, 118, 119, 121, 118, 119, 122, 118, 119, 123, 118, 119, 124, 118, 119, 125, 118, 119, 126, 118, 119, 127, 118, 119, 128, 118, 119, 129, 118, 119, 130, 118, 119, 131, 118, 119, 132, 118, 119, 133, 118, 119, 4, 118, 119, 135, 118, 119, 136, 118, 119, 137, 118, 119, 138, 118, 119, 139, 118, 119, 140, 118, 119, 141, 118, 119, 142, 118, 119, 143, 118, 119, 144, 118, 119, 145, 118, 119, 146, 118, 119, 147, 118, 119, 148, 118, 119, 149, 118, 119, 150, 118, 119, 151, 118, 119, 152, 118, 119, 153, 118, 119, 154, 118, 119, 91, 118, 119, 156, 118, 119, 157, 118, 119, 158, 118, 119, 159, 118, 119, 160, 118, 119, 161, 118, 119, 154, 118, 119, 163, 118, 119, 164, 118, 119, 165, 118, 119, 166, 118, 119, 167, 118, 119, 154, 118, 119, 169, 118, 119, 170, 118, 119, 171, 118, 119, 172, 118, 119, 173, 118, 119, 174, 118, 119, 175, 118, 119, 176, 118, 119, 177, 118, 119, 178, 118, 119, 179, 118, 119, 180, 118, 119, 181, 118, 119, 182, 118, 119, 183, 118, 119, 161, 118, 119, 185, 118, 119, 186, 118, 119, 187, 118, 119, 188, 118, 119, 189, 118, 119, 190, 118, 119, 191, 118, 119, 192, 118, 119, 182, 118, 194, 0, 195, 0, 36, 0, 197, 0, 198, 0, 199, 0, 200, 0, 201, 0, 202, 0, 203, 0, 204, 0, 205, 0, 206, 0, 207, 0, 208, 0, 209, 0, 210, 0, 211, 0, 212, 0, 213, 0, 214, 0, 216, 215, 216, 215, 216, 216, 4, 217, 231, 4, 232, 233, 235, 269, 275, 278, 295, 304, 216, 215, 216, 218, 215, 216, 219, 215, 216, 220, 215, 216, 221, 215, 216, 222, 215, 216, 223, 215, 216, 224, 215, 216, 225, 215, 216, 226, 215, 216, 227, 215, 216, 228, 215, 216, 229, 215, 216, 230, 215, 216, 4, 215, 216, 91, 215, 216, 231, 215, 216, 234, 215, 216, 231, 215, 216, 236, 249, 232, 215, 216, 237, 215, 216, 238, 215, 216, 239, 215, 216, 240, 215, 216, 241, 215, 216, 242, 215, 216, 243, 215, 216, 244, 215, 216, 245, 215, 216, 246, 215, 216, 247, 215, 216, 248, 215, 216, 231, 215, 216, 250, 215, 216, 251, 215, 216, 252, 215, 216, 253, 215, 216, 254, 215, 216, 255, 215, 216, 256, 215, 216, 257, 215, 216, 258, 215, 216, 259, 215, 216, 260, 215, 216, 261, 215, 216, 262, 215, 216, 263, 215, 216, 264, 215, 216, 265, 215, 216, 266, 215, 216, 267, 215, 216, 268, 215, 216, 91, 215, 216, 270, 215, 216, 271, 215, 216, 272, 215, 216, 273, 215, 216, 274, 215, 216, 268, 215, 216, 276, 215, 216, 277, 215, 216, 232, 215, 216, 279, 215, 216, 280, 215, 216, 281, 215, 216, 282, 215, 216, 283, 215, 216, 284, 215, 216, 285, 215, 216, 286, 215, 216, 287, 215, 216, 288, 215, 216, 289, 215, 216, 290, 215, 216, 291, 215, 216, 292, 215, 216, 293, 215, 216, 294, 215, 216, 268, 215, 216, 296, 232, 215, 216, 297, 215, 216, 298, 215, 216, 299, 215, 216, 300, 215, 216, 301, 215, 216, 302, 215, 216, 303, 215, 216, 292, 215, 216, 305, 215, 216, 306, 215, 216, 307, 215, 216, 308, 215, 216, 309, 215, 216, 310, 215, 216, 311, 215, 216, 312, 215, 216, 313, 215, 216, 314, 215, 216, 315, 322, 215, 216, 316, 215, 216, 317, 215, 216, 318, 215, 216, 319, 215, 216, 320, 215, 216, 321, 215, 216, 232, 215, 216, 323, 215, 216, 324, 215, 216, 325, 215, 216, 326, 215, 216, 327, 215, 216, 328, 215, 216, 329, 215, 216, 330, 215, 216, 331, 215, 216, 332, 215, 216, 333, 215, 216, 334, 215, 216, 231, 215, 336, 36, 0, 337, 0, 338, 0, 339, 0, 340, 0, 341, 0, 342, 0, 343, 0, 344, 0, 345, 0, 346, 0, 347, 0, 348, 0, 350, 349, 350, 349, 350, 350, 4, 351, 365, 4, 366, 367, 369, 383, 390, 393, 392, 410, 350, 349, 350, 352, 349, 350, 353, 349, 350, 354, 349, 350, 355, 349, 350, 356, 349, 350, 357, 349, 350, 358, 349, 350, 359, 349, 350, 360, 349, 350, 361, 349, 350, 362, 349, 350, 363, 349, 350, 364, 349, 350, 4, 349, 350, 91, 349, 350, 365, 349, 350, 368, 349, 350, 365, 349, 350, 370, 366, 349, 350, 371, 349, 350, 372, 349, 350, 373, 349, 350, 374, 349, 350, 375, 349, 350, 376, 349, 350, 377, 349, 350, 378, 349, 350, 379, 349, 350, 380, 349, 350, 381, 349, 350, 382, 349, 350, 365, 349, 350, 384, 349, 350, 385, 349, 350, 386, 349, 350, 387, 349, 350, 388, 349, 350, 389, 349, 350, 91, 349, 350, 391, 349, 350, 392, 349, 350, 366, 349, 350, 394, 349, 350, 395, 349, 350, 396, 349, 350, 397, 349, 350, 398, 349, 350, 399, 349, 350, 400, 349, 350, 401, 349, 350, 402, 349, 350, 403, 349, 350, 404, 349, 350, 405, 349, 350, 406, 349, 350, 407, 349, 350, 408, 349, 350, 409, 349, 350, 389, 349, 350, 411, 349, 350, 412, 349, 350, 413, 349, 350, 414, 349, 350, 415, 349, 350, 416, 349, 350, 417, 349, 350, 418, 349, 350, 419, 349, 350, 420, 349, 350, 421, 428, 349, 350, 422, 349, 350, 423, 349, 350, 424, 349, 350, 425, 349, 350, 426, 349, 350, 427, 349, 350, 366, 349, 350, 429, 349, 350, 430, 349, 350, 431, 349, 350, 432, 349, 350, 433, 349, 350, 434, 349, 350, 435, 349, 350, 436, 349, 350, 437, 349, 350, 438, 349, 350, 439, 349, 350, 440, 349, 350, 365, 349, 442, 0, 443, 0, 444, 0, 445, 0, 446, 0, 447, 0, 448, 0, 449, 0, 450, 0, 451, 0, 452, 459, 0, 453, 0, 454, 0, 455, 0, 456, 0, 457, 0, 458, 0, 36, 0, 460, 0, 461, 0, 462, 0, 463, 0, 464, 0, 465, 0, 466, 0, 467, 0, 468, 0, 469, 0, 470, 0, 471, 0, 30, 0, 472, 473, 472, 0, 477, 476, 475, 473, 476, 474, 0, 475, 473, 474, 0, 475, 474, 477, 476, 475, 473, 476, 474, 477, 477, 5, 14, 16, 30, 33, 36, 37, 39, 92, 110, 193, 196, 335, 441, 472, 477, 0, 75, 90, 74, 75, 480, 74, 75, 90, 74, 75, 482, 478, 74, 75, 483, 74, 75, 484, 74, 75, 485, 74, 75, 486, 74, 75, 487, 74, 75, 488, 74, 75, 489, 74, 75, 490, 74, 75, 491, 74, 75, 492, 74, 75, 493, 74, 75, 494, 74, 75, 90, 74, 75, 496, 74, 75, 497, 74, 75, 498, 74, 75, 499, 74, 75, 500, 74, 75, 501, 74, 75, 91, 74, 75, 503, 74, 75, 504, 74, 75, 478, 74, 75, 506, 74, 75, 507, 74, 75, 508, 74, 75, 509, 74, 75, 510, 74, 75, 511, 74, 75, 512, 74, 75, 513, 74, 75, 514, 74, 75, 515, 74, 75, 516, 74, 75, 517, 74, 75, 518, 74, 75, 519, 74, 75, 520, 74, 75, 521, 74, 75, 501, 74, 75, 523, 478, 74, 75, 524, 74, 75, 525, 74, 75, 526, 74, 75, 527, 74, 75, 528, 74, 75, 529, 74, 75, 530, 74, 75, 519, 74, 75, 532, 74, 75, 533, 74, 75, 534, 74, 75, 535, 74, 75, 536, 74, 75, 537, 74, 75, 538, 74, 75, 539, 74, 75, 540, 74, 75, 541, 74, 75, 542, 549, 74, 75, 543, 74, 75, 544, 74, 75, 545, 74, 75, 546, 74, 75, 547, 74, 75, 548, 74, 75, 478, 74, 75, 550, 74, 75, 551, 74, 75, 552, 74, 75, 553, 74, 75, 554, 74, 75, 555, 74, 75, 556, 74, 75, 557, 74, 75, 558, 74, 75, 559, 74, 75, 560, 74, 75, 561, 74, 75, 90, 74, 0, 0 }; static const char _lexer_trans_actions[] = { 0, 47, 0, 5, 1, 0, 25, 1, 25, 25, 25, 25, 25, 25, 25, 25, 25, 31, 0, 39, 0, 39, 0, 39, 47, 0, 5, 1, 0, 25, 1, 25, 25, 25, 25, 25, 25, 25, 25, 25, 31, 0, 39, 0, 39, 0, 39, 47, 0, 0, 39, 119, 41, 41, 41, 3, 111, 29, 29, 29, 0, 111, 29, 29, 29, 0, 111, 29, 0, 29, 0, 95, 7, 7, 39, 47, 0, 0, 39, 103, 21, 0, 47, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 39, 50, 99, 19, 0, 39, 39, 39, 39, 0, 23, 107, 23, 23, 44, 23, 0, 47, 0, 1, 0, 39, 0, 39, 0, 39, 0, 39, 0, 0, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 124, 50, 47, 0, 47, 0, 65, 29, 77, 65, 77, 77, 77, 77, 77, 77, 77, 77, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 11, 0, 47, 11, 0, 115, 27, 53, 50, 27, 56, 50, 56, 56, 56, 56, 56, 56, 56, 56, 56, 59, 27, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 124, 50, 47, 0, 47, 0, 74, 77, 74, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 17, 0, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 124, 50, 47, 0, 47, 0, 62, 29, 62, 77, 77, 77, 77, 77, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 9, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 9, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 124, 50, 47, 0, 47, 0, 68, 29, 77, 68, 77, 77, 77, 77, 77, 77, 77, 77, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 13, 0, 47, 13, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 13, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 0, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 124, 50, 47, 0, 47, 0, 71, 29, 77, 71, 77, 77, 77, 77, 77, 77, 77, 77, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 15, 0, 47, 15, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 15, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 0, 0, 39, 47, 33, 33, 80, 33, 33, 39, 0, 35, 0, 39, 0, 0, 47, 0, 0, 35, 0, 0, 47, 0, 86, 83, 37, 89, 83, 89, 89, 89, 89, 89, 89, 89, 89, 89, 92, 0, 39, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 11, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 0, 0 }; static const char _lexer_eof_actions[] = { 0, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39 }; static const int lexer_start = 1; static const int lexer_first_final = 562; static const int lexer_error = 0; static const int lexer_en_main = 1; #line 246 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.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_pystring_content(VALUE listener, int start_col, const char *at, size_t length, int current_line) { VALUE re2; VALUE unescape_escaped_quotes; VALUE con = ENCODED_STR_NEW(at, 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, rb_intern("gsub!"), 2, unescape_escaped_quotes, rb_str_new2("\"\"\"")); rb_funcall(listener, rb_intern("py_string"), 2, 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/aslakhellesoy/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->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 1228 "ext/gherkin_lexer_en_scouse/gherkin_lexer_en_scouse.c" { cs = lexer_start; } #line 410 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" #line 1235 "ext/gherkin_lexer_en_scouse/gherkin_lexer_en_scouse.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 81 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.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 87 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" { MARK(content_start, p); } break; case 2: #line 91 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" { lexer->current_line = lexer->line_number; lexer->start_col = p - data - lexer->last_newline; } break; case 3: #line 96 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.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 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" { STORE_KW_END_CON(feature); } break; case 5: #line 108 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" { STORE_KW_END_CON(background); } break; case 6: #line 112 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" { STORE_KW_END_CON(scenario); } break; case 7: #line 116 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" { STORE_KW_END_CON(scenario_outline); } break; case 8: #line 120 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" { STORE_KW_END_CON(examples); } break; case 9: #line 124 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.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 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" { STORE_ATTR(comment); lexer->mark = 0; } break; case 11: #line 136 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" { STORE_ATTR(tag); lexer->mark = 0; } break; case 12: #line 141 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" { lexer->line_number += 1; MARK(final_newline, p); } break; case 13: #line 146 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" { MARK(last_newline, p + 1); } break; case 14: #line 150 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" { if (lexer->mark == 0) { MARK(mark, p); } } break; case 15: #line 156 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.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 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" { MARK(content_end, p); } break; case 17: #line 167 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" { p = p - 1; lexer->current_line = lexer->line_number; current_row = rb_ary_new(); } break; case 18: #line 173 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" { MARK(content_start, p); } break; case 19: #line 177 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.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 20: #line 191 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.c.rl" { rb_funcall(listener, rb_intern("row"), 2, current_row, INT2FIX(lexer->current_line)); } break; case 21: #line 195 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.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 1511 "ext/gherkin_lexer_en_scouse/gherkin_lexer_en_scouse.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 21: #line 195 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.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 1574 "ext/gherkin_lexer_en_scouse/gherkin_lexer_en_scouse.c" } } } _out: {} } #line 411 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_scouse.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_en_scouse() { 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, "En_scouse", 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); }