#line 1 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.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/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" /** Data **/ #line 89 "ext/gherkin_lexer_en_au/gherkin_lexer_en_au.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, 0, 11, 3, 17, 14, 15, 4, 1, 14, 15, 18, 4, 4, 5, 14, 15, 4, 17, 0, 14, 15, 5, 17, 0, 11, 14, 15 }; static const short _lexer_key_offsets[] = { 0, 0, 17, 18, 19, 35, 36, 37, 39, 41, 46, 51, 56, 61, 65, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89, 91, 96, 103, 108, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 181, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 200, 202, 204, 206, 208, 210, 212, 213, 214, 215, 216, 217, 218, 219, 229, 231, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 257, 260, 262, 264, 266, 268, 270, 272, 274, 276, 278, 280, 282, 284, 286, 289, 291, 293, 295, 297, 299, 301, 303, 305, 307, 309, 311, 312, 313, 314, 315, 316, 317, 331, 333, 335, 337, 339, 341, 343, 345, 347, 349, 351, 353, 355, 357, 359, 361, 364, 366, 368, 370, 372, 374, 376, 378, 380, 382, 384, 386, 388, 390, 393, 395, 397, 399, 401, 403, 405, 407, 409, 411, 413, 415, 417, 419, 421, 424, 426, 428, 430, 432, 434, 436, 438, 440, 442, 444, 446, 447, 448, 449, 450, 451, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 468, 474, 477, 479, 485, 501, 503, 505, 507, 509, 511, 513, 516, 518, 520, 522, 524, 526, 528, 530, 532, 534, 536, 538, 540, 542, 544, 547, 549, 551, 553, 555, 557, 559, 561, 563, 565, 567, 569, 570, 571, 572, 573, 574, 575, 576, 589, 591, 593, 595, 597, 599, 601, 603, 605, 607, 609, 611, 613, 615, 617, 619, 622, 624, 626, 628, 630, 632, 634, 636, 638, 640, 642, 644, 646, 648, 650, 652, 655, 657, 659, 661, 663, 665, 667, 669, 671, 673, 675, 677 }; static const char _lexer_trans_keys[] = { -17, 10, 32, 34, 35, 37, 42, 64, 66, 67, 77, 78, 87, 89, 124, 9, 13, -69, -65, 10, 32, 34, 35, 37, 42, 64, 66, 67, 77, 78, 87, 89, 124, 9, 13, 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, 10, 13, 10, 13, 13, 32, 64, 9, 10, 9, 10, 13, 32, 64, 11, 12, 10, 32, 64, 9, 13, 97, 108, 99, 107, 103, 114, 111, 117, 110, 100, 58, 10, 10, 10, 32, 35, 37, 42, 64, 66, 67, 77, 78, 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, 66, 67, 77, 78, 87, 89, 124, 9, 13, 101, 111, 114, 112, 116, 98, 98, 101, 114, 58, 10, 10, 10, 32, 35, 67, 124, 9, 13, 10, 114, 10, 105, 10, 107, 10, 101, 10, 121, 10, 58, 105, 107, 101, 121, 58, 10, 10, 10, 32, 35, 37, 64, 66, 67, 77, 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, 97, 108, 10, 99, 10, 107, 10, 103, 10, 114, 10, 111, 10, 117, 10, 110, 10, 100, 10, 58, 10, 111, 10, 107, 10, 101, 10, 115, 10, 111, 114, 10, 98, 10, 98, 10, 101, 10, 114, 10, 105, 10, 107, 10, 101, 10, 121, 10, 97, 10, 116, 10, 101, 97, 116, 101, 58, 10, 10, 10, 32, 35, 37, 42, 64, 66, 67, 77, 78, 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, 97, 108, 10, 99, 10, 107, 10, 103, 10, 114, 10, 111, 10, 117, 10, 110, 10, 100, 10, 58, 10, 111, 10, 107, 10, 101, 10, 115, 10, 101, 114, 10, 112, 10, 116, 10, 105, 10, 107, 10, 101, 10, 121, 10, 97, 10, 116, 10, 101, 10, 104, 10, 101, 10, 110, 10, 97, 10, 32, 10, 103, 107, 10, 111, 10, 116, 10, 116, 10, 97, 10, 110, 10, 111, 10, 119, 10, 32, 10, 104, 10, 111, 10, 119, 104, 101, 110, 97, 32, 103, 107, 111, 116, 116, 97, 110, 111, 119, 32, 104, 111, 119, 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, 66, 67, 77, 78, 87, 89, 124, 9, 13, 10, 108, 10, 111, 10, 107, 10, 101, 10, 115, 10, 58, 10, 101, 114, 10, 112, 10, 116, 10, 105, 10, 107, 10, 101, 10, 121, 10, 97, 10, 116, 10, 101, 10, 104, 10, 101, 10, 110, 10, 97, 10, 32, 10, 103, 107, 10, 111, 10, 116, 10, 116, 10, 97, 10, 110, 10, 111, 10, 119, 10, 32, 10, 104, 10, 111, 10, 119, 111, 107, 101, 115, 58, 10, 10, 10, 32, 35, 37, 42, 64, 67, 77, 78, 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, 101, 114, 10, 112, 10, 116, 10, 105, 10, 107, 10, 101, 10, 121, 10, 58, 10, 97, 10, 116, 10, 101, 10, 104, 10, 101, 10, 110, 10, 97, 10, 32, 10, 103, 107, 10, 111, 10, 116, 10, 116, 10, 97, 10, 110, 10, 111, 10, 119, 10, 32, 10, 104, 10, 111, 10, 119, 0 }; static const char _lexer_single_lengths[] = { 0, 15, 1, 1, 14, 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, 2, 2, 3, 5, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 14, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 8, 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, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 12, 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, 3, 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, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 3, 2, 4, 14, 2, 2, 2, 2, 2, 2, 3, 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, 1, 1, 1, 1, 1, 1, 1, 11, 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, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0 }; static const char _lexer_range_lengths[] = { 0, 1, 0, 0, 1, 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, 0, 0, 1, 1, 1, 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, 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, 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, 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, 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 }; static const short _lexer_index_offsets[] = { 0, 0, 17, 19, 21, 37, 39, 41, 44, 47, 52, 57, 62, 67, 71, 75, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 113, 116, 121, 128, 133, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 172, 175, 178, 181, 184, 187, 190, 193, 196, 199, 202, 205, 208, 211, 214, 217, 233, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 262, 265, 268, 271, 274, 277, 280, 282, 284, 286, 288, 290, 292, 294, 304, 307, 310, 313, 316, 319, 322, 325, 328, 331, 334, 337, 340, 343, 346, 350, 353, 356, 359, 362, 365, 368, 371, 374, 377, 380, 383, 386, 389, 393, 396, 399, 402, 405, 408, 411, 414, 417, 420, 423, 426, 428, 430, 432, 434, 436, 438, 452, 455, 458, 461, 464, 467, 470, 473, 476, 479, 482, 485, 488, 491, 494, 497, 501, 504, 507, 510, 513, 516, 519, 522, 525, 528, 531, 534, 537, 540, 544, 547, 550, 553, 556, 559, 562, 565, 568, 571, 574, 577, 580, 583, 586, 590, 593, 596, 599, 602, 605, 608, 611, 614, 617, 620, 623, 625, 627, 629, 631, 633, 636, 638, 640, 642, 644, 646, 648, 650, 652, 654, 656, 658, 662, 668, 672, 675, 681, 697, 700, 703, 706, 709, 712, 715, 719, 722, 725, 728, 731, 734, 737, 740, 743, 746, 749, 752, 755, 758, 761, 765, 768, 771, 774, 777, 780, 783, 786, 789, 792, 795, 798, 800, 802, 804, 806, 808, 810, 812, 825, 828, 831, 834, 837, 840, 843, 846, 849, 852, 855, 858, 861, 864, 867, 870, 874, 877, 880, 883, 886, 889, 892, 895, 898, 901, 904, 907, 910, 913, 916, 919, 923, 926, 929, 932, 935, 938, 941, 944, 947, 950, 953, 956 }; static const short _lexer_trans_targs[] = { 2, 4, 4, 5, 15, 17, 31, 34, 37, 66, 131, 31, 194, 197, 211, 4, 0, 3, 0, 4, 0, 4, 4, 5, 15, 17, 31, 34, 37, 66, 131, 31, 194, 197, 211, 4, 0, 6, 0, 7, 0, 9, 8, 8, 9, 8, 8, 10, 10, 11, 10, 10, 10, 10, 11, 10, 10, 10, 10, 12, 10, 10, 10, 10, 13, 10, 10, 4, 14, 14, 0, 4, 14, 14, 0, 4, 16, 15, 4, 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, 30, 0, 301, 0, 32, 0, 4, 16, 33, 4, 16, 33, 0, 0, 0, 0, 35, 36, 4, 36, 36, 34, 35, 35, 4, 36, 34, 36, 0, 38, 250, 0, 39, 0, 40, 0, 41, 0, 42, 0, 43, 0, 44, 0, 45, 0, 46, 0, 47, 0, 49, 48, 49, 48, 49, 49, 4, 50, 64, 4, 217, 223, 230, 64, 233, 236, 49, 48, 49, 51, 48, 49, 52, 48, 49, 53, 48, 49, 54, 48, 49, 55, 48, 49, 56, 48, 49, 57, 48, 49, 58, 48, 49, 59, 48, 49, 60, 48, 49, 61, 48, 49, 62, 48, 49, 63, 48, 49, 4, 48, 49, 65, 48, 4, 4, 5, 15, 17, 31, 34, 37, 66, 131, 31, 194, 197, 211, 4, 0, 67, 69, 83, 0, 68, 0, 31, 0, 70, 0, 71, 0, 72, 0, 73, 0, 74, 0, 76, 75, 76, 75, 76, 76, 4, 77, 4, 76, 75, 76, 78, 75, 76, 79, 75, 76, 80, 75, 76, 81, 75, 76, 82, 75, 76, 65, 75, 84, 0, 85, 0, 86, 0, 87, 0, 88, 0, 90, 89, 90, 89, 90, 90, 4, 91, 4, 105, 119, 128, 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, 115, 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, 65, 89, 90, 116, 89, 90, 117, 89, 90, 118, 89, 90, 114, 89, 90, 120, 124, 89, 90, 121, 89, 90, 122, 89, 90, 123, 89, 90, 114, 89, 90, 125, 89, 90, 126, 89, 90, 127, 89, 90, 114, 89, 90, 129, 89, 90, 130, 89, 90, 114, 89, 132, 0, 133, 0, 134, 0, 135, 0, 137, 136, 137, 136, 137, 137, 4, 138, 152, 4, 153, 167, 174, 152, 177, 180, 137, 136, 137, 139, 136, 137, 140, 136, 137, 141, 136, 137, 142, 136, 137, 143, 136, 137, 144, 136, 137, 145, 136, 137, 146, 136, 137, 147, 136, 137, 148, 136, 137, 149, 136, 137, 150, 136, 137, 151, 136, 137, 4, 136, 137, 65, 136, 137, 154, 163, 136, 137, 155, 136, 137, 156, 136, 137, 157, 136, 137, 158, 136, 137, 159, 136, 137, 160, 136, 137, 161, 136, 137, 162, 136, 137, 65, 136, 137, 164, 136, 137, 165, 136, 137, 166, 136, 137, 162, 136, 137, 168, 170, 136, 137, 169, 136, 137, 152, 136, 137, 171, 136, 137, 172, 136, 137, 173, 136, 137, 162, 136, 137, 175, 136, 137, 176, 136, 137, 162, 136, 137, 178, 136, 137, 179, 136, 137, 152, 136, 137, 181, 136, 137, 182, 136, 137, 183, 187, 136, 137, 184, 136, 137, 185, 136, 137, 186, 136, 137, 152, 136, 137, 188, 136, 137, 189, 136, 137, 190, 136, 137, 191, 136, 137, 192, 136, 137, 193, 136, 137, 152, 136, 195, 0, 196, 0, 31, 0, 198, 0, 199, 0, 200, 204, 0, 201, 0, 202, 0, 203, 0, 31, 0, 205, 0, 206, 0, 207, 0, 208, 0, 209, 0, 210, 0, 31, 0, 211, 212, 211, 0, 216, 215, 214, 212, 215, 213, 0, 214, 212, 213, 0, 214, 213, 216, 215, 214, 212, 215, 213, 216, 216, 5, 15, 17, 31, 34, 37, 66, 131, 31, 194, 197, 211, 216, 0, 49, 218, 48, 49, 219, 48, 49, 220, 48, 49, 221, 48, 49, 222, 48, 49, 65, 48, 49, 224, 226, 48, 49, 225, 48, 49, 64, 48, 49, 227, 48, 49, 228, 48, 49, 229, 48, 49, 222, 48, 49, 231, 48, 49, 232, 48, 49, 222, 48, 49, 234, 48, 49, 235, 48, 49, 64, 48, 49, 237, 48, 49, 238, 48, 49, 239, 243, 48, 49, 240, 48, 49, 241, 48, 49, 242, 48, 49, 64, 48, 49, 244, 48, 49, 245, 48, 49, 246, 48, 49, 247, 48, 49, 248, 48, 49, 249, 48, 49, 64, 48, 251, 0, 252, 0, 253, 0, 254, 0, 255, 0, 257, 256, 257, 256, 257, 257, 4, 258, 272, 4, 273, 281, 272, 284, 287, 257, 256, 257, 259, 256, 257, 260, 256, 257, 261, 256, 257, 262, 256, 257, 263, 256, 257, 264, 256, 257, 265, 256, 257, 266, 256, 257, 267, 256, 257, 268, 256, 257, 269, 256, 257, 270, 256, 257, 271, 256, 257, 4, 256, 257, 65, 256, 257, 274, 276, 256, 257, 275, 256, 257, 272, 256, 257, 277, 256, 257, 278, 256, 257, 279, 256, 257, 280, 256, 257, 65, 256, 257, 282, 256, 257, 283, 256, 257, 280, 256, 257, 285, 256, 257, 286, 256, 257, 272, 256, 257, 288, 256, 257, 289, 256, 257, 290, 294, 256, 257, 291, 256, 257, 292, 256, 257, 293, 256, 257, 272, 256, 257, 295, 256, 257, 296, 256, 257, 297, 256, 257, 298, 256, 257, 299, 256, 257, 300, 256, 257, 272, 256, 0, 0 }; static const unsigned char _lexer_trans_actions[] = { 0, 54, 0, 5, 1, 0, 29, 1, 29, 29, 29, 29, 29, 29, 35, 0, 43, 0, 43, 0, 43, 54, 0, 5, 1, 0, 29, 1, 29, 29, 29, 29, 29, 29, 35, 0, 43, 0, 43, 0, 43, 139, 48, 9, 106, 11, 0, 134, 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, 149, 126, 57, 110, 23, 0, 43, 43, 43, 43, 0, 27, 118, 27, 27, 51, 27, 0, 54, 0, 1, 0, 43, 0, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 144, 57, 54, 0, 54, 0, 72, 33, 84, 72, 84, 84, 84, 84, 84, 84, 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, 15, 0, 54, 15, 0, 130, 31, 60, 57, 31, 63, 57, 63, 63, 63, 63, 63, 63, 66, 31, 43, 0, 0, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 144, 57, 54, 0, 54, 0, 81, 84, 81, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 21, 0, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 144, 57, 54, 0, 54, 0, 69, 33, 69, 84, 84, 84, 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, 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, 13, 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, 0, 43, 0, 43, 0, 43, 0, 43, 144, 57, 54, 0, 54, 0, 75, 33, 84, 75, 84, 84, 84, 84, 84, 84, 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, 17, 0, 54, 17, 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, 17, 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, 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, 0, 43, 0, 43, 0, 43, 0, 43, 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, 0, 0, 43, 54, 37, 37, 87, 37, 37, 43, 0, 39, 0, 43, 0, 0, 54, 0, 0, 39, 0, 0, 54, 0, 93, 90, 41, 96, 90, 96, 96, 96, 96, 96, 96, 99, 0, 43, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 15, 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, 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, 0, 43, 0, 43, 0, 43, 0, 43, 0, 43, 144, 57, 54, 0, 54, 0, 78, 33, 84, 78, 84, 84, 84, 84, 84, 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, 19, 0, 54, 19, 0, 54, 0, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 0, 0, 54, 19, 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, 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, 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 }; static const int lexer_start = 1; static const int lexer_first_final = 301; static const int lexer_error = 0; static const int lexer_en_main = 1; #line 258 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.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 827 "ext/gherkin_lexer_en_au/gherkin_lexer_en_au.c" { cs = lexer_start; } #line 425 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" #line 834 "ext/gherkin_lexer_en_au/gherkin_lexer_en_au.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/github/gherkin/tasks/../ragel/i18n/en_au.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/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { MARK(content_start, p); } break; case 2: #line 93 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { lexer->current_line = lexer->line_number; lexer->start_col = p - data - lexer->last_newline; } break; case 3: #line 98 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.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/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { MARK(docstring_content_type_start, p); } break; case 5: #line 112 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { MARK(docstring_content_type_end, p); } break; case 6: #line 116 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { STORE_KW_END_CON(feature); } break; case 7: #line 120 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { STORE_KW_END_CON(background); } break; case 8: #line 124 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { STORE_KW_END_CON(scenario); } break; case 9: #line 128 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { STORE_KW_END_CON(scenario_outline); } break; case 10: #line 132 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { STORE_KW_END_CON(examples); } break; case 11: #line 136 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.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/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { STORE_ATTR(comment); lexer->mark = 0; } break; case 13: #line 148 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { STORE_ATTR(tag); lexer->mark = 0; } break; case 14: #line 153 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { lexer->line_number += 1; MARK(final_newline, p); } break; case 15: #line 158 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { MARK(last_newline, p + 1); } break; case 16: #line 162 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { if (lexer->mark == 0) { MARK(mark, p); } } break; case 17: #line 168 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.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/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { MARK(content_end, p); } break; case 19: #line 179 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { p = p - 1; lexer->current_line = lexer->line_number; current_row = rb_ary_new(); } break; case 20: #line 185 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { MARK(content_start, p); } break; case 21: #line 189 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.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/github/gherkin/tasks/../ragel/i18n/en_au.c.rl" { rb_funcall(listener, rb_intern("row"), 2, current_row, INT2FIX(lexer->current_line)); } break; case 23: #line 207 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.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 1124 "ext/gherkin_lexer_en_au/gherkin_lexer_en_au.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/github/gherkin/tasks/../ragel/i18n/en_au.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 1187 "ext/gherkin_lexer_en_au/gherkin_lexer_en_au.c" } } } _out: {} } #line 426 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/en_au.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_au() { 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_au", 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); }