#line 1 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.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 #define LF_FLAG 0 #define CRLF_FLAG 1 #define LF "\n" #define CRLF "\r\n" #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; int eol; 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 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->eol); \ 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 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" /** Data **/ #line 92 "ext/gherkin_lexer_ca/gherkin_lexer_ca.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, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 200, 201, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, 278, 280, 282, 284, 286, 288, 290, 292, 294, 296, 298, 300, 302, 304, 306, 308, 311, 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, 397, 398, 399, 401, 402, 404, 406, 407, 408, 409, 410, 411, 412, 413, 414, 431, 433, 435, 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, 457, 459, 461, 465, 467, 469, 471, 473, 475, 477, 479, 481, 483, 485, 487, 489, 491, 493, 495, 497, 499, 502, 504, 506, 508, 510, 513, 515, 517, 519, 521, 523, 525, 527, 529, 531, 533, 535, 537, 539, 541, 543, 546, 548, 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, 613, 615, 617, 619, 621, 623, 625, 627, 629, 631, 633, 635, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 674, 676, 678, 680, 682, 684, 686, 688, 690, 692, 694, 696, 698, 700, 702, 704, 707, 709, 711, 713, 715, 717, 719, 721, 724, 726, 728, 730, 732, 735, 737, 739, 741, 743, 745, 747, 749, 751, 753, 755, 757, 759, 761, 763, 765, 767, 770, 772, 774, 776, 778, 780, 782, 784, 786, 788, 790, 792, 794, 796, 798, 800, 802, 804, 806, 808, 810, 812, 814, 816, 818, 820, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 839, 841, 843, 845, 847, 849, 851, 853, 855, 857, 859, 861, 863, 865, 867, 869, 871, 873, 875, 877, 879, 881, 883, 885, 887, 889, 891, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 928, 931, 933, 939, 958, 961, 963, 965, 967, 969, 971, 973, 975, 978, 980, 982, 984, 986, 989, 991, 993, 995, 997, 999, 1001, 1003, 1005, 1007, 1009, 1011, 1013, 1015, 1017, 1019, 1021, 1024, 1026, 1029, 1031, 1033, 1035, 1037, 1039, 1041, 1043, 1045, 1047, 1049, 1051, 1053, 1055, 1057, 1059, 1061, 1063, 1065, 1067, 1069, 1071, 1073, 1075, 1077, 1079, 1081, 1083, 1085, 1087, 1089, 1091, 1093, 1095, 1097, 1099, 1101, 1103, 1105, 1106, 1107 }; static const char _lexer_trans_keys[] = { -17, 10, 32, 34, 35, 37, 42, 64, 65, 67, 68, 69, 70, 73, 80, 81, 82, 124, 9, 13, -69, -65, 10, 32, 34, 35, 37, 42, 64, 65, 67, 68, 69, 70, 73, 80, 81, 82, 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, 108, 110, 116, 101, 115, 104, 111, 114, 101, 115, 116, 101, 99, 101, 100, 101, 110, 116, 115, 58, 10, 10, 10, 32, 35, 37, 42, 64, 65, 67, 68, 69, 70, 73, 80, 81, 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, 67, 68, 69, 70, 73, 80, 81, 82, 124, 9, 13, 97, 108, 114, 97, 99, 116, 101, 114, -61, -83, 115, 116, 105, 99, 97, 58, 10, 10, 10, 32, 35, 37, 64, 65, 67, 69, 70, 82, 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, 110, 10, 116, 10, 101, 10, 99, 10, 101, 10, 100, 10, 101, 10, 110, 10, 116, 10, 115, 10, 58, 10, 97, 10, 114, 10, 97, 10, 99, 10, 116, 10, 101, 10, 114, -61, 10, -83, 10, 10, 115, 10, 116, 10, 105, 10, 99, 10, 97, 10, 115, 120, 10, 99, 113, 10, 101, 10, 110, 10, 97, 10, 114, 10, 105, 10, 117, 10, 101, 10, 109, 10, 97, 10, 32, 10, 100, 10, 101, 10, 32, 10, 108, 10, 39, 10, 101, 10, 115, 10, 99, 10, 101, 10, 109, 10, 112, 10, 108, 10, 101, 10, 117, 10, 110, 10, 99, 10, 105, 10, 111, 10, 110, 10, 97, 10, 108, 10, 105, 10, 116, 10, 97, 10, 116, 10, 101, 10, 114, 10, 101, 10, 102, 10, 111, 10, 110, 111, 110, 97, 100, 116, 97, 115, 120, 99, 113, 101, 110, 97, 114, 105, 58, 10, 10, 10, 32, 35, 37, 42, 64, 65, 67, 68, 69, 70, 73, 80, 81, 82, 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, 108, 110, 116, 10, 101, 10, 115, 10, 104, 10, 111, 10, 114, 10, 101, 10, 115, 10, 116, 10, 101, 10, 99, 10, 101, 10, 100, 10, 101, 10, 110, 10, 116, 10, 115, 10, 58, -61, 10, 101, -88, 10, 10, 115, 10, 97, 10, 97, 10, 108, 114, 10, 97, 10, 99, 10, 116, 10, 101, 10, 114, -61, 10, -83, 10, 10, 115, 10, 116, 10, 105, 10, 99, 10, 97, 10, 111, 10, 110, 10, 97, 10, 100, 116, 10, 115, 10, 99, 113, 10, 101, 10, 110, 10, 97, 10, 114, 10, 105, 10, 117, 10, 101, 10, 109, 10, 97, 10, 32, 10, 100, 10, 101, 10, 32, 10, 108, 10, 39, 10, 101, 10, 115, 10, 99, 10, 117, 10, 110, 10, 99, 10, 105, 10, 111, 10, 110, 10, 97, 10, 108, 10, 105, 10, 116, 10, 97, 10, 116, 10, 101, 10, 114, -61, 10, -78, 10, 10, 117, 10, 97, 10, 110, 10, 101, 10, 114, 10, 101, 10, 102, 10, 111, 10, 110, 117, 101, 109, 97, 32, 100, 101, 32, 108, 39, 101, 115, 99, 101, 110, 97, 114, 105, 58, 10, 10, 10, 32, 35, 37, 42, 64, 65, 67, 68, 69, 70, 73, 80, 81, 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, 108, 116, 10, 101, 10, 115, 10, 104, 10, 111, 10, 114, 10, 101, 10, 115, -61, 10, 101, -88, 10, 10, 115, 10, 97, 10, 97, 10, 108, 114, 10, 97, 10, 99, 10, 116, 10, 101, 10, 114, -61, 10, -83, 10, 10, 115, 10, 116, 10, 105, 10, 99, 10, 97, 10, 58, 10, 111, 10, 110, 10, 97, 10, 100, 116, 10, 115, 10, 99, 10, 101, 10, 110, 10, 97, 10, 114, 10, 105, 10, 117, 10, 110, 10, 99, 10, 105, 10, 111, 10, 110, 10, 97, 10, 108, 10, 105, 10, 116, 10, 97, 10, 116, 10, 101, 10, 114, -61, 10, -78, 10, 10, 117, 10, 97, 10, 110, 101, 109, 112, 108, 101, 115, 58, 10, 10, 10, 32, 35, 67, 70, 124, 9, 13, 10, 97, 10, 114, 10, 97, 10, 99, 10, 116, 10, 101, 10, 114, -61, 10, -83, 10, 10, 115, 10, 116, 10, 105, 10, 99, 10, 97, 10, 58, 10, 117, 10, 110, 10, 99, 10, 105, 10, 111, 10, 110, 10, 97, 10, 108, 10, 105, 10, 116, 10, 97, 10, 116, 117, 110, 99, 105, 111, 110, 97, 108, 105, 116, 97, 116, 101, 114, -61, -78, 117, 97, 110, 101, 114, 101, 102, 111, 110, 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, 67, 68, 69, 70, 73, 80, 81, 82, 124, 9, 13, 10, 108, 116, 10, 101, 10, 115, 10, 104, 10, 111, 10, 114, 10, 101, 10, 115, -61, 10, 101, -88, 10, 10, 115, 10, 97, 10, 97, 10, 108, 114, 10, 97, 10, 99, 10, 116, 10, 101, 10, 114, -61, 10, -83, 10, 10, 115, 10, 116, 10, 105, 10, 99, 10, 97, 10, 58, 10, 111, 10, 110, 10, 97, 10, 100, 116, 10, 115, 10, 99, 113, 10, 101, 10, 110, 10, 97, 10, 114, 10, 105, 10, 117, 10, 101, 10, 109, 10, 97, 10, 32, 10, 100, 10, 101, 10, 32, 10, 108, 10, 39, 10, 101, 10, 115, 10, 99, 10, 117, 10, 110, 10, 99, 10, 105, 10, 111, 10, 110, 10, 97, 10, 108, 10, 105, 10, 116, 10, 97, 10, 116, 10, 101, 10, 114, -61, 10, -78, 10, 10, 117, 10, 97, 10, 110, -61, 101, -88, 115, 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, 3, 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, 2, 1, 1, 1, 1, 1, 1, 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, 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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 15, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 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, 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, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 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, 1, 1, 2, 4, 3, 2, 4, 17, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 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, 1, 1, 0 }; static const char _lexer_range_lengths[] = { 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 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, 1, 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, 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, 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, 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, 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, 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, 20, 22, 24, 43, 45, 47, 51, 56, 61, 66, 71, 75, 79, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 119, 124, 131, 136, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 194, 197, 200, 203, 206, 209, 212, 215, 218, 221, 224, 227, 230, 233, 236, 239, 258, 260, 263, 265, 267, 269, 271, 273, 275, 277, 279, 281, 283, 285, 287, 289, 291, 293, 305, 308, 311, 314, 317, 320, 323, 326, 329, 332, 335, 338, 341, 344, 347, 350, 353, 356, 359, 362, 365, 368, 371, 374, 377, 380, 383, 386, 389, 392, 395, 398, 401, 404, 407, 410, 413, 416, 419, 422, 426, 430, 433, 436, 439, 442, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472, 475, 478, 481, 484, 487, 490, 493, 496, 499, 502, 505, 508, 511, 514, 517, 520, 523, 526, 529, 532, 535, 538, 541, 544, 547, 550, 553, 555, 557, 559, 562, 564, 567, 570, 572, 574, 576, 578, 580, 582, 584, 586, 603, 606, 609, 612, 615, 618, 621, 624, 627, 630, 633, 636, 639, 642, 645, 648, 653, 656, 659, 662, 665, 668, 671, 674, 677, 680, 683, 686, 689, 692, 695, 698, 701, 704, 708, 711, 714, 717, 720, 724, 727, 730, 733, 736, 739, 742, 745, 748, 751, 754, 757, 760, 763, 766, 769, 773, 776, 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, 894, 897, 900, 903, 906, 909, 911, 913, 915, 917, 919, 921, 923, 925, 927, 929, 931, 933, 935, 937, 939, 941, 943, 945, 947, 949, 951, 967, 970, 973, 976, 979, 982, 985, 988, 991, 994, 997, 1000, 1003, 1006, 1009, 1012, 1016, 1019, 1022, 1025, 1028, 1031, 1034, 1037, 1041, 1044, 1047, 1050, 1053, 1057, 1060, 1063, 1066, 1069, 1072, 1075, 1078, 1081, 1084, 1087, 1090, 1093, 1096, 1099, 1102, 1105, 1109, 1112, 1115, 1118, 1121, 1124, 1127, 1130, 1133, 1136, 1139, 1142, 1145, 1148, 1151, 1154, 1157, 1160, 1163, 1166, 1169, 1172, 1175, 1178, 1181, 1184, 1187, 1189, 1191, 1193, 1195, 1197, 1199, 1201, 1203, 1205, 1213, 1216, 1219, 1222, 1225, 1228, 1231, 1234, 1237, 1240, 1243, 1246, 1249, 1252, 1255, 1258, 1261, 1264, 1267, 1270, 1273, 1276, 1279, 1282, 1285, 1288, 1291, 1294, 1296, 1298, 1300, 1302, 1304, 1306, 1308, 1310, 1312, 1314, 1316, 1318, 1320, 1322, 1324, 1326, 1328, 1330, 1332, 1334, 1336, 1338, 1340, 1342, 1344, 1348, 1354, 1358, 1361, 1367, 1386, 1390, 1393, 1396, 1399, 1402, 1405, 1408, 1411, 1415, 1418, 1421, 1424, 1427, 1431, 1434, 1437, 1440, 1443, 1446, 1449, 1452, 1455, 1458, 1461, 1464, 1467, 1470, 1473, 1476, 1479, 1483, 1486, 1490, 1493, 1496, 1499, 1502, 1505, 1508, 1511, 1514, 1517, 1520, 1523, 1526, 1529, 1532, 1535, 1538, 1541, 1544, 1547, 1550, 1553, 1556, 1559, 1562, 1565, 1568, 1571, 1574, 1577, 1580, 1583, 1586, 1589, 1592, 1595, 1598, 1601, 1604, 1606, 1608 }; static const short _lexer_trans_targs[] = { 2, 4, 4, 5, 14, 16, 30, 33, 36, 73, 173, 178, 420, 30, 432, 436, 439, 445, 4, 0, 3, 0, 4, 0, 4, 4, 5, 14, 16, 30, 33, 36, 73, 173, 178, 420, 30, 432, 436, 439, 445, 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, 524, 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, 37, 44, 521, 0, 38, 0, 39, 0, 40, 0, 41, 0, 42, 0, 43, 0, 30, 0, 45, 0, 46, 0, 47, 0, 48, 0, 49, 0, 50, 0, 51, 0, 52, 0, 53, 0, 54, 0, 56, 55, 56, 55, 56, 56, 4, 57, 71, 4, 451, 463, 478, 482, 502, 71, 514, 518, 56, 55, 56, 58, 55, 56, 59, 55, 56, 60, 55, 56, 61, 55, 56, 62, 55, 56, 63, 55, 56, 64, 55, 56, 65, 55, 56, 66, 55, 56, 67, 55, 56, 68, 55, 56, 69, 55, 56, 70, 55, 56, 4, 55, 56, 72, 55, 4, 4, 5, 14, 16, 30, 33, 36, 73, 173, 178, 420, 30, 432, 436, 439, 445, 4, 0, 74, 0, 30, 75, 0, 76, 0, 77, 0, 78, 0, 79, 0, 80, 0, 81, 0, 82, 0, 83, 0, 84, 0, 85, 0, 86, 0, 87, 0, 88, 0, 90, 89, 90, 89, 90, 90, 4, 91, 4, 105, 116, 130, 155, 167, 90, 89, 90, 92, 89, 90, 93, 89, 90, 94, 89, 90, 95, 89, 90, 96, 89, 90, 97, 89, 90, 98, 89, 90, 99, 89, 90, 100, 89, 90, 101, 89, 90, 102, 89, 90, 103, 89, 90, 104, 89, 90, 4, 89, 90, 106, 89, 90, 107, 89, 90, 108, 89, 90, 109, 89, 90, 110, 89, 90, 111, 89, 90, 112, 89, 90, 113, 89, 90, 114, 89, 90, 115, 89, 90, 72, 89, 90, 117, 89, 90, 118, 89, 90, 119, 89, 90, 120, 89, 90, 121, 89, 90, 122, 89, 90, 123, 89, 124, 90, 89, 125, 90, 89, 90, 126, 89, 90, 127, 89, 90, 128, 89, 90, 129, 89, 90, 115, 89, 90, 131, 150, 89, 90, 132, 137, 89, 90, 133, 89, 90, 134, 89, 90, 135, 89, 90, 136, 89, 90, 115, 89, 90, 138, 89, 90, 139, 89, 90, 140, 89, 90, 141, 89, 90, 142, 89, 90, 143, 89, 90, 144, 89, 90, 145, 89, 90, 146, 89, 90, 147, 89, 90, 148, 89, 90, 149, 89, 90, 132, 89, 90, 151, 89, 90, 152, 89, 90, 153, 89, 90, 154, 89, 90, 114, 89, 90, 156, 89, 90, 157, 89, 90, 158, 89, 90, 159, 89, 90, 160, 89, 90, 161, 89, 90, 162, 89, 90, 163, 89, 90, 164, 89, 90, 165, 89, 90, 166, 89, 90, 115, 89, 90, 168, 89, 90, 169, 89, 90, 170, 89, 90, 171, 89, 90, 172, 89, 90, 114, 89, 174, 0, 175, 0, 176, 0, 177, 30, 0, 30, 0, 179, 383, 0, 180, 289, 0, 181, 0, 182, 0, 183, 0, 184, 0, 185, 0, 186, 0, 188, 187, 188, 187, 188, 188, 4, 189, 203, 4, 204, 226, 240, 244, 264, 203, 276, 280, 283, 188, 187, 188, 190, 187, 188, 191, 187, 188, 192, 187, 188, 193, 187, 188, 194, 187, 188, 195, 187, 188, 196, 187, 188, 197, 187, 188, 198, 187, 188, 199, 187, 188, 200, 187, 188, 201, 187, 188, 202, 187, 188, 4, 187, 188, 72, 187, 188, 205, 212, 222, 187, 188, 206, 187, 188, 207, 187, 188, 208, 187, 188, 209, 187, 188, 210, 187, 188, 211, 187, 188, 203, 187, 188, 213, 187, 188, 214, 187, 188, 215, 187, 188, 216, 187, 188, 217, 187, 188, 218, 187, 188, 219, 187, 188, 220, 187, 188, 221, 187, 188, 72, 187, 223, 188, 224, 187, 211, 188, 187, 188, 225, 187, 188, 203, 187, 188, 227, 187, 188, 203, 228, 187, 188, 229, 187, 188, 230, 187, 188, 231, 187, 188, 232, 187, 188, 233, 187, 234, 188, 187, 235, 188, 187, 188, 236, 187, 188, 237, 187, 188, 238, 187, 188, 239, 187, 188, 221, 187, 188, 241, 187, 188, 242, 187, 188, 243, 187, 188, 225, 203, 187, 188, 245, 187, 188, 246, 251, 187, 188, 247, 187, 188, 248, 187, 188, 249, 187, 188, 250, 187, 188, 221, 187, 188, 252, 187, 188, 253, 187, 188, 254, 187, 188, 255, 187, 188, 256, 187, 188, 257, 187, 188, 258, 187, 188, 259, 187, 188, 260, 187, 188, 261, 187, 188, 262, 187, 188, 263, 187, 188, 246, 187, 188, 265, 187, 188, 266, 187, 188, 267, 187, 188, 268, 187, 188, 269, 187, 188, 270, 187, 188, 271, 187, 188, 272, 187, 188, 273, 187, 188, 274, 187, 188, 275, 187, 188, 221, 187, 188, 277, 187, 188, 278, 187, 279, 188, 187, 203, 188, 187, 188, 281, 187, 188, 282, 187, 188, 203, 187, 188, 284, 187, 188, 285, 187, 188, 286, 187, 188, 287, 187, 188, 288, 187, 188, 220, 187, 290, 0, 291, 0, 292, 0, 293, 0, 294, 0, 295, 0, 296, 0, 297, 0, 298, 0, 299, 0, 300, 0, 301, 0, 302, 0, 303, 0, 304, 0, 305, 0, 306, 0, 307, 0, 308, 0, 310, 309, 310, 309, 310, 310, 4, 311, 325, 4, 326, 338, 353, 357, 364, 325, 376, 380, 310, 309, 310, 312, 309, 310, 313, 309, 310, 314, 309, 310, 315, 309, 310, 316, 309, 310, 317, 309, 310, 318, 309, 310, 319, 309, 310, 320, 309, 310, 321, 309, 310, 322, 309, 310, 323, 309, 310, 324, 309, 310, 4, 309, 310, 72, 309, 310, 327, 334, 309, 310, 328, 309, 310, 329, 309, 310, 330, 309, 310, 331, 309, 310, 332, 309, 310, 333, 309, 310, 325, 309, 335, 310, 336, 309, 333, 310, 309, 310, 337, 309, 310, 325, 309, 310, 339, 309, 310, 325, 340, 309, 310, 341, 309, 310, 342, 309, 310, 343, 309, 310, 344, 309, 310, 345, 309, 346, 310, 309, 347, 310, 309, 310, 348, 309, 310, 349, 309, 310, 350, 309, 310, 351, 309, 310, 352, 309, 310, 72, 309, 310, 354, 309, 310, 355, 309, 310, 356, 309, 310, 337, 325, 309, 310, 358, 309, 310, 359, 309, 310, 360, 309, 310, 361, 309, 310, 362, 309, 310, 363, 309, 310, 352, 309, 310, 365, 309, 310, 366, 309, 310, 367, 309, 310, 368, 309, 310, 369, 309, 310, 370, 309, 310, 371, 309, 310, 372, 309, 310, 373, 309, 310, 374, 309, 310, 375, 309, 310, 352, 309, 310, 377, 309, 310, 378, 309, 379, 310, 309, 325, 310, 309, 310, 381, 309, 310, 382, 309, 310, 325, 309, 384, 0, 385, 0, 386, 0, 387, 0, 388, 0, 389, 0, 390, 0, 392, 391, 392, 391, 392, 392, 4, 393, 408, 4, 392, 391, 392, 394, 391, 392, 395, 391, 392, 396, 391, 392, 397, 391, 392, 398, 391, 392, 399, 391, 392, 400, 391, 401, 392, 391, 402, 392, 391, 392, 403, 391, 392, 404, 391, 392, 405, 391, 392, 406, 391, 392, 407, 391, 392, 72, 391, 392, 409, 391, 392, 410, 391, 392, 411, 391, 392, 412, 391, 392, 413, 391, 392, 414, 391, 392, 415, 391, 392, 416, 391, 392, 417, 391, 392, 418, 391, 392, 419, 391, 392, 407, 391, 421, 0, 422, 0, 423, 0, 424, 0, 425, 0, 426, 0, 427, 0, 428, 0, 429, 0, 430, 0, 431, 0, 87, 0, 433, 0, 434, 0, 435, 0, 30, 0, 437, 0, 438, 0, 30, 0, 440, 0, 441, 0, 442, 0, 443, 0, 444, 0, 52, 0, 445, 446, 445, 0, 450, 449, 448, 446, 449, 447, 0, 448, 446, 447, 0, 448, 447, 450, 449, 448, 446, 449, 447, 450, 450, 5, 14, 16, 30, 33, 36, 73, 173, 178, 420, 30, 432, 436, 439, 445, 450, 0, 56, 452, 459, 55, 56, 453, 55, 56, 454, 55, 56, 455, 55, 56, 456, 55, 56, 457, 55, 56, 458, 55, 56, 71, 55, 460, 56, 461, 55, 458, 56, 55, 56, 462, 55, 56, 71, 55, 56, 464, 55, 56, 71, 465, 55, 56, 466, 55, 56, 467, 55, 56, 468, 55, 56, 469, 55, 56, 470, 55, 471, 56, 55, 472, 56, 55, 56, 473, 55, 56, 474, 55, 56, 475, 55, 56, 476, 55, 56, 477, 55, 56, 72, 55, 56, 479, 55, 56, 480, 55, 56, 481, 55, 56, 462, 71, 55, 56, 483, 55, 56, 484, 489, 55, 56, 485, 55, 56, 486, 55, 56, 487, 55, 56, 488, 55, 56, 477, 55, 56, 490, 55, 56, 491, 55, 56, 492, 55, 56, 493, 55, 56, 494, 55, 56, 495, 55, 56, 496, 55, 56, 497, 55, 56, 498, 55, 56, 499, 55, 56, 500, 55, 56, 501, 55, 56, 484, 55, 56, 503, 55, 56, 504, 55, 56, 505, 55, 56, 506, 55, 56, 507, 55, 56, 508, 55, 56, 509, 55, 56, 510, 55, 56, 511, 55, 56, 512, 55, 56, 513, 55, 56, 477, 55, 56, 515, 55, 56, 516, 55, 517, 56, 55, 71, 56, 55, 56, 519, 55, 56, 520, 55, 56, 71, 55, 522, 523, 0, 43, 0, 177, 0, 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, 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, 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, 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, 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, 9, 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, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 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, 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, 0, 39, 0, 39, 0, 0, 39, 0, 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, 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, 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, 0, 47, 0, 0, 0, 47, 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, 0, 47, 0, 0, 47, 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, 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, 47, 0, 0, 47, 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, 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, 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, 0, 47, 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, 0, 47, 0, 0, 47, 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, 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, 47, 0, 0, 47, 0, 0, 47, 0, 0, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 0, 39, 124, 50, 47, 0, 47, 0, 74, 77, 77, 74, 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, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 0, 0, 47, 17, 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, 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, 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, 0, 47, 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, 0, 47, 0, 0, 47, 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, 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, 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, 47, 0, 0, 47, 0, 0, 47, 0, 0, 0, 0, 39, 0, 39, 0, 39, 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 }; static const int lexer_start = 1; static const int lexer_first_final = 524; static const int lexer_error = 0; static const int lexer_en_main = 1; #line 243 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.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 split; } 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 eol) { VALUE con = Qnil, kw = Qnil, name = Qnil, desc = Qnil; kw = ENCODED_STR_NEW(keyword_at, keyword_length); con = ENCODED_STR_NEW(at, length); VALUE split = multiline_strip(con); name = rb_funcall(split, rb_intern("shift"), 0); desc = rb_ary_join(split, rb_str_new2( \ eol == CRLF_FLAG ? CRLF : LF )); 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("strip!"), 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 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, "^[\t ]{0,%d}", start_col); VALUE re = rb_reg_regcomp(rb_str_new2(pat)); VALUE re2 = rb_reg_regcomp(rb_str_new2("\r\\Z")); VALUE unescape_escaped_quotes = rb_reg_regcomp(rb_str_new2("\\\\\"\\\\\"\\\\\"")); rb_funcall(con, rb_intern("gsub!"), 2, re, 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 int count_char(char char_to_count, char *str) { int count = 0; int i = 0; while(str[i] != '\0') { if(str[i] == char_to_count) { count++; } i++; } return count; } 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; lexer->eol = LF_FLAG; } 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) { VALUE listener = rb_iv_get(self, "@listener"); 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); size_t len = RSTRING_LEN(input_copy); if (count_char('\r', data) > (count_char('\n', data) / 2)) { lexer->eol = CRLF_FLAG; } 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 1200 "ext/gherkin_lexer_ca/gherkin_lexer_ca.c" { cs = lexer_start; } #line 425 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" #line 1207 "ext/gherkin_lexer_ca/gherkin_lexer_ca.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 86 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { MARK(content_start, p); lexer->current_line = lexer->line_number; } break; case 1: #line 91 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { MARK(content_start, p); } break; case 2: #line 95 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { lexer->current_line = lexer->line_number; lexer->start_col = p - data - lexer->last_newline; } break; case 3: #line 100 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.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 108 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { STORE_KW_END_CON(feature); } break; case 5: #line 112 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { STORE_KW_END_CON(background); } break; case 6: #line 116 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { STORE_KW_END_CON(scenario); } break; case 7: #line 120 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { STORE_KW_END_CON(scenario_outline); } break; case 8: #line 124 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { STORE_KW_END_CON(examples); } break; case 9: #line 128 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.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 135 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { STORE_ATTR(comment); lexer->mark = 0; } break; case 11: #line 140 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { STORE_ATTR(tag); lexer->mark = 0; } break; case 12: #line 145 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { lexer->line_number += 1; MARK(final_newline, p); } break; case 13: #line 150 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { MARK(last_newline, p + 1); } break; case 14: #line 154 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { if (lexer->mark == 0) { MARK(mark, p); } } break; case 15: #line 160 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { MARK(keyword_end, p); MARK(keyword_start, PTR_TO(mark)); MARK(content_start, p + 1); lexer->mark = 0; } break; case 16: #line 167 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { MARK(content_end, p); } break; case 17: #line 171 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { p = p - 1; lexer->current_line = lexer->line_number; current_row = rb_ary_new(); } break; case 18: #line 177 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { MARK(content_start, p); } break; case 19: #line 181 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { VALUE con = ENCODED_STR_NEW(PTR_TO(content_start), LEN(content_start, p)); rb_funcall(con, rb_intern("strip!"), 0); VALUE re_pipe = rb_reg_regcomp(rb_str_new2("\\\\\\|")); VALUE 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_backslash, rb_str_new2("\\")); rb_ary_push(current_row, con); } break; case 20: #line 192 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { rb_funcall(listener, rb_intern("row"), 2, current_row, INT2FIX(lexer->current_line)); } break; case 21: #line 196 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { if (cs < lexer_first_final) { if (raise_lexer_error != NULL) { size_t 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(newstr, line); } } else { rb_funcall(listener, rb_intern("eof"), 0); } } break; #line 1475 "ext/gherkin_lexer_ca/gherkin_lexer_ca.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 196 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.c.rl" { if (cs < lexer_first_final) { if (raise_lexer_error != NULL) { size_t 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(newstr, line); } } else { rb_funcall(listener, rb_intern("eof"), 0); } } break; #line 1534 "ext/gherkin_lexer_ca/gherkin_lexer_ca.c" } } } _out: {} } #line 426 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ca.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_ca() { mGherkin = rb_define_module("Gherkin"); rb_eGherkinLexingError = rb_const_get(mGherkin, rb_intern("LexingError")); mCLexer = rb_define_module_under(mGherkin, "CLexer"); cI18nLexer = rb_define_class_under(mCLexer, "Ca", 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); }