UNPKG

gherkin

Version:

A fast Gherkin lexer/parser based on the Ragel State Machine Compiler.

926 lines (861 loc) 29 kB
/* line 1 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ ;(function() { /* line 117 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ /* line 11 "js/lib/gherkin/lexer/en_au.js" */ const _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, 2, 16, 2, 11, 0, 2, 12, 13, 2, 15, 0, 2, 15, 1, 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, 1, 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, 2, 12, 13, 16, 4, 15, 0, 12, 13 ]; const _lexer_key_offsets = [ 0, 0, 17, 33, 34, 35, 39, 44, 49, 54, 59, 63, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 88, 93, 100, 105, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 178, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 197, 199, 201, 203, 205, 207, 209, 210, 211, 212, 213, 214, 215, 216, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 254, 257, 259, 261, 263, 265, 267, 269, 271, 273, 275, 277, 279, 281, 283, 286, 288, 290, 292, 294, 296, 298, 300, 302, 304, 306, 308, 309, 310, 311, 312, 313, 314, 328, 330, 332, 334, 336, 338, 340, 342, 344, 346, 348, 350, 352, 354, 356, 358, 361, 363, 365, 367, 369, 371, 373, 375, 377, 379, 381, 383, 385, 387, 390, 392, 394, 396, 398, 400, 402, 404, 406, 408, 410, 412, 414, 416, 418, 421, 423, 425, 427, 429, 431, 433, 435, 437, 439, 441, 443, 444, 445, 446, 447, 448, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 465, 471, 474, 476, 482, 498, 500, 502, 504, 506, 508, 510, 513, 515, 517, 519, 521, 523, 525, 527, 529, 531, 533, 535, 537, 539, 541, 544, 546, 548, 550, 552, 554, 556, 558, 560, 562, 564, 566, 567, 568, 569, 570, 571, 572, 573, 586, 588, 590, 592, 594, 596, 598, 600, 602, 604, 606, 608, 610, 612, 614, 616, 619, 621, 623, 625, 627, 629, 631, 633, 635, 637, 639, 641, 643, 645, 647, 649, 652, 654, 656, 658, 660, 662, 664, 666, 668, 670, 672, 674, 675, 676 ]; const _lexer_trans_keys = [ 10, 32, 34, 35, 37, 42, 64, 66, 67, 77, 78, 87, 89, 124, 239, 9, 13, 10, 32, 34, 35, 37, 42, 64, 66, 67, 77, 78, 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, 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, 187, 191, 0 ]; const _lexer_single_lengths = [ 0, 15, 14, 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, 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, 1, 1, 0 ]; const _lexer_range_lengths = [ 0, 1, 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, 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, 0, 0 ]; const _lexer_index_offsets = [ 0, 0, 17, 33, 35, 37, 41, 46, 51, 56, 61, 65, 69, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 109, 114, 121, 126, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 165, 168, 171, 174, 177, 180, 183, 186, 189, 192, 195, 198, 201, 204, 207, 210, 226, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 255, 258, 261, 264, 267, 270, 273, 275, 277, 279, 281, 283, 285, 287, 297, 300, 303, 306, 309, 312, 315, 318, 321, 324, 327, 330, 333, 336, 339, 343, 346, 349, 352, 355, 358, 361, 364, 367, 370, 373, 376, 379, 382, 386, 389, 392, 395, 398, 401, 404, 407, 410, 413, 416, 419, 421, 423, 425, 427, 429, 431, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472, 475, 478, 481, 484, 487, 490, 494, 497, 500, 503, 506, 509, 512, 515, 518, 521, 524, 527, 530, 533, 537, 540, 543, 546, 549, 552, 555, 558, 561, 564, 567, 570, 573, 576, 579, 583, 586, 589, 592, 595, 598, 601, 604, 607, 610, 613, 616, 618, 620, 622, 624, 626, 629, 631, 633, 635, 637, 639, 641, 643, 645, 647, 649, 651, 655, 661, 665, 668, 674, 690, 693, 696, 699, 702, 705, 708, 712, 715, 718, 721, 724, 727, 730, 733, 736, 739, 742, 745, 748, 751, 754, 758, 761, 764, 767, 770, 773, 776, 779, 782, 785, 788, 791, 793, 795, 797, 799, 801, 803, 805, 818, 821, 824, 827, 830, 833, 836, 839, 842, 845, 848, 851, 854, 857, 860, 863, 867, 870, 873, 876, 879, 882, 885, 888, 891, 894, 897, 900, 903, 906, 909, 912, 916, 919, 922, 925, 928, 931, 934, 937, 940, 943, 946, 949, 951, 953 ]; const _lexer_indicies = [ 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 6, 11, 12, 13, 14, 1, 0, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 6, 11, 12, 13, 1, 0, 15, 0, 16, 0, 17, 16, 16, 0, 20, 19, 21, 19, 18, 24, 23, 25, 23, 22, 24, 23, 26, 23, 22, 24, 23, 27, 23, 22, 29, 28, 28, 0, 2, 30, 30, 0, 32, 33, 31, 2, 0, 34, 0, 35, 0, 36, 0, 37, 0, 38, 0, 39, 0, 40, 0, 41, 0, 42, 0, 43, 0, 44, 0, 45, 0, 46, 0, 47, 0, 48, 0, 0, 49, 51, 52, 50, 0, 0, 0, 0, 53, 54, 55, 54, 54, 57, 56, 53, 2, 58, 7, 58, 0, 59, 60, 0, 61, 0, 62, 0, 63, 0, 64, 0, 65, 0, 66, 0, 67, 0, 68, 0, 69, 0, 71, 70, 73, 72, 73, 74, 75, 76, 77, 75, 78, 79, 80, 77, 81, 82, 74, 72, 73, 83, 72, 73, 84, 72, 73, 85, 72, 73, 86, 72, 73, 87, 72, 73, 88, 72, 73, 89, 72, 73, 90, 72, 73, 91, 72, 73, 92, 72, 73, 93, 72, 73, 94, 72, 73, 95, 72, 73, 96, 72, 73, 97, 72, 99, 98, 100, 101, 102, 103, 104, 105, 106, 107, 103, 108, 109, 110, 98, 0, 111, 112, 113, 0, 114, 0, 115, 0, 116, 0, 117, 0, 118, 0, 119, 0, 120, 0, 122, 121, 124, 123, 124, 125, 126, 127, 126, 125, 123, 124, 128, 123, 124, 129, 123, 124, 130, 123, 124, 131, 123, 124, 132, 123, 124, 133, 123, 134, 0, 135, 0, 136, 0, 137, 0, 138, 0, 140, 139, 142, 141, 142, 143, 144, 145, 144, 146, 147, 148, 143, 141, 142, 149, 141, 142, 150, 141, 142, 151, 141, 142, 152, 141, 142, 153, 141, 142, 154, 141, 142, 155, 141, 142, 156, 141, 142, 157, 141, 142, 158, 141, 142, 159, 141, 142, 160, 141, 142, 161, 141, 142, 162, 141, 142, 163, 164, 141, 142, 165, 141, 142, 166, 141, 142, 167, 141, 142, 168, 141, 142, 169, 141, 142, 170, 141, 142, 171, 141, 142, 172, 141, 142, 173, 141, 142, 174, 141, 142, 175, 141, 142, 176, 141, 142, 172, 141, 142, 177, 178, 141, 142, 179, 141, 142, 180, 141, 142, 181, 141, 142, 172, 141, 142, 182, 141, 142, 183, 141, 142, 184, 141, 142, 172, 141, 142, 185, 141, 142, 186, 141, 142, 172, 141, 187, 0, 188, 0, 189, 0, 190, 0, 192, 191, 194, 193, 194, 195, 196, 197, 198, 196, 199, 200, 201, 198, 202, 203, 195, 193, 194, 204, 193, 194, 205, 193, 194, 206, 193, 194, 207, 193, 194, 208, 193, 194, 209, 193, 194, 210, 193, 194, 211, 193, 194, 212, 193, 194, 213, 193, 194, 214, 193, 194, 215, 193, 194, 216, 193, 194, 217, 193, 194, 218, 193, 194, 219, 220, 193, 194, 221, 193, 194, 222, 193, 194, 223, 193, 194, 224, 193, 194, 225, 193, 194, 226, 193, 194, 227, 193, 194, 228, 193, 194, 218, 193, 194, 229, 193, 194, 230, 193, 194, 231, 193, 194, 228, 193, 194, 232, 233, 193, 194, 234, 193, 194, 235, 193, 194, 236, 193, 194, 237, 193, 194, 238, 193, 194, 228, 193, 194, 239, 193, 194, 240, 193, 194, 228, 193, 194, 241, 193, 194, 242, 193, 194, 235, 193, 194, 243, 193, 194, 244, 193, 194, 245, 246, 193, 194, 247, 193, 194, 248, 193, 194, 249, 193, 194, 235, 193, 194, 250, 193, 194, 251, 193, 194, 252, 193, 194, 253, 193, 194, 254, 193, 194, 255, 193, 194, 235, 193, 256, 0, 257, 0, 115, 0, 258, 0, 259, 0, 260, 261, 0, 262, 0, 263, 0, 264, 0, 115, 0, 265, 0, 266, 0, 267, 0, 268, 0, 269, 0, 270, 0, 115, 0, 271, 272, 271, 0, 275, 274, 276, 277, 274, 273, 0, 279, 280, 278, 0, 279, 278, 275, 281, 279, 280, 281, 278, 275, 282, 283, 284, 285, 286, 287, 288, 289, 290, 286, 291, 292, 293, 282, 0, 73, 294, 72, 73, 295, 72, 73, 296, 72, 73, 297, 72, 73, 298, 72, 73, 97, 72, 73, 299, 300, 72, 73, 301, 72, 73, 302, 72, 73, 303, 72, 73, 304, 72, 73, 305, 72, 73, 298, 72, 73, 306, 72, 73, 307, 72, 73, 298, 72, 73, 308, 72, 73, 309, 72, 73, 302, 72, 73, 310, 72, 73, 311, 72, 73, 312, 313, 72, 73, 314, 72, 73, 315, 72, 73, 316, 72, 73, 302, 72, 73, 317, 72, 73, 318, 72, 73, 319, 72, 73, 320, 72, 73, 321, 72, 73, 322, 72, 73, 302, 72, 323, 0, 324, 0, 325, 0, 326, 0, 327, 0, 329, 328, 331, 330, 331, 332, 333, 334, 335, 333, 336, 337, 335, 338, 339, 332, 330, 331, 340, 330, 331, 341, 330, 331, 342, 330, 331, 343, 330, 331, 344, 330, 331, 345, 330, 331, 346, 330, 331, 347, 330, 331, 348, 330, 331, 349, 330, 331, 350, 330, 331, 351, 330, 331, 352, 330, 331, 353, 330, 331, 354, 330, 331, 355, 356, 330, 331, 357, 330, 331, 358, 330, 331, 359, 330, 331, 360, 330, 331, 361, 330, 331, 362, 330, 331, 354, 330, 331, 363, 330, 331, 364, 330, 331, 362, 330, 331, 365, 330, 331, 366, 330, 331, 358, 330, 331, 367, 330, 331, 368, 330, 331, 369, 370, 330, 331, 371, 330, 331, 372, 330, 331, 373, 330, 331, 358, 330, 331, 374, 330, 331, 375, 330, 331, 376, 330, 331, 377, 330, 331, 378, 330, 331, 379, 330, 331, 358, 330, 380, 0, 1, 0, 381, 0 ]; const _lexer_trans_targs = [ 0, 2, 2, 3, 12, 14, 28, 31, 34, 63, 128, 191, 194, 208, 298, 4, 5, 6, 7, 7, 7, 8, 7, 7, 7, 8, 9, 10, 11, 2, 11, 12, 2, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 300, 29, 30, 30, 2, 13, 32, 33, 2, 32, 31, 33, 35, 247, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 45, 46, 46, 2, 47, 61, 214, 220, 227, 230, 233, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 2, 62, 2, 2, 3, 12, 14, 28, 31, 34, 63, 128, 191, 194, 208, 64, 66, 80, 65, 28, 67, 68, 69, 70, 71, 72, 73, 72, 73, 73, 2, 74, 75, 76, 77, 78, 79, 62, 81, 82, 83, 84, 85, 86, 87, 86, 87, 87, 2, 88, 102, 116, 125, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 2, 103, 112, 104, 105, 106, 107, 108, 109, 110, 111, 62, 113, 114, 115, 117, 121, 118, 119, 120, 122, 123, 124, 126, 127, 129, 130, 131, 132, 133, 134, 133, 134, 134, 2, 135, 149, 150, 164, 171, 174, 177, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 2, 62, 151, 160, 152, 153, 154, 155, 156, 157, 158, 159, 161, 162, 163, 165, 167, 166, 149, 168, 169, 170, 172, 173, 175, 176, 178, 179, 180, 184, 181, 182, 183, 185, 186, 187, 188, 189, 190, 192, 193, 195, 196, 197, 201, 198, 199, 200, 202, 203, 204, 205, 206, 207, 208, 209, 210, 212, 213, 211, 209, 210, 211, 209, 212, 213, 3, 12, 14, 28, 31, 34, 63, 128, 191, 194, 208, 215, 216, 217, 218, 219, 221, 223, 222, 61, 224, 225, 226, 228, 229, 231, 232, 234, 235, 236, 240, 237, 238, 239, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 253, 254, 253, 254, 254, 2, 255, 269, 270, 278, 281, 284, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 2, 62, 271, 273, 272, 269, 274, 275, 276, 277, 279, 280, 282, 283, 285, 286, 287, 291, 288, 289, 290, 292, 293, 294, 295, 296, 297, 299, 0 ]; const _lexer_trans_actions = [ 39, 0, 47, 3, 1, 0, 25, 1, 25, 25, 25, 25, 25, 31, 0, 0, 0, 47, 5, 41, 119, 41, 0, 29, 111, 29, 29, 0, 7, 95, 0, 0, 103, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, 99, 19, 0, 23, 107, 23, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 124, 0, 47, 0, 65, 29, 77, 77, 77, 77, 77, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 27, 115, 53, 50, 27, 56, 50, 56, 56, 56, 56, 56, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 124, 0, 47, 0, 74, 77, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 50, 124, 0, 47, 0, 62, 29, 77, 77, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 124, 0, 47, 0, 68, 29, 77, 77, 77, 77, 77, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 47, 33, 80, 0, 0, 35, 0, 0, 86, 83, 37, 89, 83, 89, 89, 89, 89, 89, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 124, 0, 47, 0, 71, 29, 77, 77, 77, 77, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; const _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 ]; const lexer_start = 1; const lexer_first_final = 300; const lexer_error = 0; const lexer_en_main = 1; /* line 120 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ /* line 121 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ /* line 122 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ var Lexer = function(listener) { // Check that listener has the required functions var events = ['comment', 'tag', 'feature', 'background', 'scenario', 'scenario_outline', 'examples', 'step', 'doc_string', 'row', 'eof']; for(e in events) { var event = events[e]; if(typeof listener[event] != 'function') { "Error. No " + event + " function exists on " + JSON.stringify(listener); } } this.listener = listener; }; Lexer.prototype.scan = function(data) { var ending = "\n%_FEATURE_END_%"; if(typeof data == 'string') { data = this.stringToBytes(data + ending); } else if(typeof Buffer != 'undefined' && Buffer.isBuffer(data)) { // Node.js var buf = new Buffer(data.length + ending.length); data.copy(buf, 0, 0); new Buffer(ending).copy(buf, data.length, 0); data = buf; } var eof = pe = data.length; var p = 0; this.line_number = 1; this.last_newline = 0; /* line 593 "js/lib/gherkin/lexer/en_au.js" */ { this.cs = lexer_start; } /* JSCodeGen::writeInit */ /* line 153 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ /* line 600 "js/lib/gherkin/lexer/en_au.js" */ { var _klen, _trans, _keys, _ps, _widec, _acts, _nacts; var _goto_level, _resume, _eof_trans, _again, _test_eof; var _out; _klen = _trans = _keys = _acts = _nacts = null; _goto_level = 0; _resume = 10; _eof_trans = 15; _again = 20; _test_eof = 30; _out = 40; while (true) { _trigger_goto = false; if (_goto_level <= 0) { if (p == pe) { _goto_level = _test_eof; continue; } if ( this.cs == 0) { _goto_level = _out; continue; } } if (_goto_level <= _resume) { _keys = _lexer_key_offsets[ this.cs]; _trans = _lexer_index_offsets[ this.cs]; _klen = _lexer_single_lengths[ this.cs]; _break_match = false; do { if (_klen > 0) { _lower = _keys; _upper = _keys + _klen - 1; while (true) { if (_upper < _lower) { break; } _mid = _lower + ( (_upper - _lower) >> 1 ); if ( data[p] < _lexer_trans_keys[_mid]) { _upper = _mid - 1; } else if ( data[p] > _lexer_trans_keys[_mid]) { _lower = _mid + 1; } else { _trans += (_mid - _keys); _break_match = true; break; }; } /* while */ if (_break_match) { break; } _keys += _klen; _trans += _klen; } _klen = _lexer_range_lengths[ this.cs]; if (_klen > 0) { _lower = _keys; _upper = _keys + (_klen << 1) - 2; while (true) { if (_upper < _lower) { break; } _mid = _lower + (((_upper-_lower) >> 1) & ~1); if ( data[p] < _lexer_trans_keys[_mid]) { _upper = _mid - 2; } else if ( data[p] > _lexer_trans_keys[_mid+1]) { _lower = _mid + 2; } else { _trans += ((_mid - _keys) >> 1); _break_match = true; break; } } /* while */ if (_break_match) { break; } _trans += _klen } } while (false); _trans = _lexer_indicies[_trans]; this.cs = _lexer_trans_targs[_trans]; if (_lexer_trans_actions[_trans] != 0) { _acts = _lexer_trans_actions[_trans]; _nacts = _lexer_actions[_acts]; _acts += 1; while (_nacts > 0) { _nacts -= 1; _acts += 1; switch (_lexer_actions[_acts - 1]) { case 0: /* line 6 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ this.content_start = p; this.current_line = this.line_number; this.start_col = p - this.last_newline - (this.keyword+':').length; break; case 1: /* line 12 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ this.current_line = this.line_number; this.start_col = p - this.last_newline; break; case 2: /* line 17 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ this.content_start = p; break; case 3: /* line 21 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ var con = this.unindent( this.start_col, this.bytesToString(data.slice(this.content_start, this.next_keyword_start-1)).replace(/(\r?\n)?([\t ])*$/, '').replace(/\\\"\\\"\\\"/mg, '"""') ); this.listener.doc_string(con, this.current_line); break; case 4: /* line 29 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ p = this.store_keyword_content('feature', data, p, eof); break; case 5: /* line 33 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ p = this.store_keyword_content('background', data, p, eof); break; case 6: /* line 37 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ p = this.store_keyword_content('scenario', data, p, eof); break; case 7: /* line 41 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ p = this.store_keyword_content('scenario_outline', data, p, eof); break; case 8: /* line 45 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ p = this.store_keyword_content('examples', data, p, eof); break; case 9: /* line 49 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ var con = this.bytesToString(data.slice(this.content_start, p)).trim(); this.listener.step(this.keyword, con, this.current_line); break; case 10: /* line 54 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ var con = this.bytesToString(data.slice(this.content_start, p)).trim(); this.listener.comment(con, this.line_number); this.keyword_start = null; break; case 11: /* line 60 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ var con = this.bytesToString(data.slice(this.content_start, p)).trim(); this.listener.tag(con, this.line_number); this.keyword_start = null; break; case 12: /* line 66 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ this.line_number++; break; case 13: /* line 70 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ this.last_newline = p + 1; break; case 14: /* line 74 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ this.keyword_start = this.keyword_start || p; break; case 15: /* line 78 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ this.keyword = this.bytesToString(data.slice(this.keyword_start, p)).replace(/:$/, ''); this.keyword_start = null; break; case 16: /* line 83 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ this.next_keyword_start = p; break; case 17: /* line 87 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ p = p - 1; current_row = []; this.current_line = this.line_number; break; case 18: /* line 93 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ this.content_start = p; break; case 19: /* line 97 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ var con = this.bytesToString(data.slice(this.content_start, p)).trim(); current_row.push(con.replace(/\\\|/, "|").replace(/\\n/, "\n").replace(/\\\\/, "\\")); break; case 20: /* line 102 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ this.listener.row(current_row, this.current_line); break; case 21: /* line 106 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ if(this.cs < lexer_first_final) { var content = this.current_line_content(data, p); throw "Lexing error on line " + this.line_number + ": '" + content + "'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information."; } else { this.listener.eof(); } break; /* line 816 "js/lib/gherkin/lexer/en_au.js" */ } /* action switch */ } } if (_trigger_goto) { continue; } } if (_goto_level <= _again) { if ( this.cs == 0) { _goto_level = _out; continue; } p += 1; if (p != pe) { _goto_level = _resume; continue; } } if (_goto_level <= _test_eof) { if (p == eof) { __acts = _lexer_eof_actions[ this.cs]; __nacts = _lexer_actions[__acts]; __acts += 1; while (__nacts > 0) { __nacts -= 1; __acts += 1; switch (_lexer_actions[__acts - 1]) { case 21: /* line 106 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ if(this.cs < lexer_first_final) { var content = this.current_line_content(data, p); throw "Lexing error on line " + this.line_number + ": '" + content + "'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information."; } else { this.listener.eof(); } break; /* line 855 "js/lib/gherkin/lexer/en_au.js" */ } /* eof action switch */ } if (_trigger_goto) { continue; } } } if (_goto_level <= _out) { break; } } } /* line 154 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_au.js.rl" */ }; Lexer.prototype.bytesToString = function(bytes) { if(typeof bytes.write == 'function') { // Node.js return bytes.toString('utf-8'); } else { var result = ""; for(var b in bytes) { result += String.fromCharCode(bytes[b]); } return result; } }; Lexer.prototype.stringToBytes = function(string) { var bytes = []; for(var i = 0; i < string.length; i++) { bytes[i] = string.charCodeAt(i); } return bytes; }; Lexer.prototype.unindent = function(startcol, text) { startcol = startcol || 0; return text.replace(new RegExp('^[\t ]{0,' + startcol + '}', 'gm'), ''); }; Lexer.prototype.store_keyword_content = function(event, data, p, eof) { var end_point = (!this.next_keyword_start || (p == eof)) ? p : this.next_keyword_start; var content = this.unindent(this.start_col + 2, this.bytesToString(data.slice(this.content_start, end_point))).replace(/\s+$/,""); var content_lines = content.split("\n") var name = content_lines.shift() || ""; name = name.trim(); var description = content_lines.join("\n"); this.listener[event](this.keyword, name, description, this.current_line); var nks = this.next_keyword_start; this.next_keyword_start = null; return nks ? nks - 1 : p; }; Lexer.prototype.current_line_content = function(data, p) { var rest = data.slice(this.last_newline, -1); var end = rest.indexOf(10) || -1; return this.bytesToString(rest.slice(0, end)).trim(); }; // Node.js export if(typeof exports !== 'undefined') { exports.Lexer = Lexer; } // Require.js export if (typeof define !== 'undefined' && define.amd) { define('gherkin/lexer/en_au', [], function() {return Lexer}); } })();