gherkin
Version:
A fast Gherkin lexer/parser based on the Ragel State Machine Compiler.
982 lines (917 loc) • 30.9 kB
JavaScript
/* line 1 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.js.rl" */
;(function() {
/* line 117 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.js.rl" */
/* line 11 "js/lib/gherkin/lexer/cy_gb.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, 18, 35, 36, 37, 41, 46,
51, 56, 61, 65, 69, 71, 72, 73,
74, 75, 76, 77, 78, 79, 80, 81,
82, 83, 84, 85, 86, 87, 88, 90,
95, 102, 107, 110, 111, 112, 113, 114,
115, 116, 117, 118, 119, 120, 121, 122,
123, 124, 125, 126, 127, 138, 140, 142,
144, 146, 148, 150, 152, 154, 156, 158,
160, 162, 164, 166, 168, 170, 172, 174,
176, 178, 195, 196, 197, 198, 199, 200,
201, 202, 203, 204, 217, 219, 221, 223,
225, 227, 229, 231, 233, 235, 237, 239,
241, 243, 245, 247, 251, 253, 255, 257,
259, 261, 263, 265, 267, 269, 271, 273,
275, 277, 279, 281, 283, 285, 287, 289,
291, 293, 295, 297, 299, 301, 303, 306,
308, 310, 312, 314, 316, 318, 320, 322,
324, 326, 328, 329, 330, 331, 332, 333,
334, 335, 336, 337, 338, 339, 340, 341,
342, 343, 350, 352, 354, 356, 358, 360,
362, 363, 364, 365, 366, 367, 368, 369,
370, 371, 372, 373, 375, 376, 377, 378,
379, 380, 381, 382, 383, 384, 385, 386,
387, 388, 401, 403, 405, 407, 409, 411,
413, 415, 417, 419, 421, 423, 425, 427,
429, 431, 435, 437, 439, 441, 443, 445,
447, 449, 451, 453, 455, 457, 459, 461,
463, 465, 467, 469, 471, 473, 475, 477,
479, 481, 483, 485, 487, 489, 490, 491,
505, 507, 509, 511, 513, 515, 517, 519,
521, 523, 525, 527, 529, 531, 533, 535,
539, 541, 543, 545, 547, 549, 551, 553,
555, 557, 559, 561, 563, 565, 567, 569,
571, 573, 575, 577, 579, 581, 583, 585,
587, 589, 591, 593, 595, 597, 599, 601,
603, 606, 608, 610, 612, 614, 616, 618,
620, 622, 624, 626, 628, 629, 633, 639,
642, 644, 650, 667, 669, 671, 673, 675,
677, 679, 681, 683, 685, 687, 689, 691,
693, 695, 697, 699, 701, 703, 705, 707,
709, 711, 713, 715, 717, 720, 722, 724,
726, 728, 730, 732, 734, 736, 738, 740,
741, 742
];
const _lexer_trans_keys = [
10, 32, 34, 35, 37, 42, 64, 65,
67, 69, 79, 80, 83, 89, 124, 239,
9, 13, 10, 32, 34, 35, 37, 42,
64, 65, 67, 69, 79, 80, 83, 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, 32, 110, 114, 114, 104,
101, 103, 101, 100, 105, 103, 32, 97,
119, 101, 100, 100, 58, 10, 10, 10,
32, 35, 37, 64, 65, 67, 69, 83,
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, 114,
10, 119, 10, 101, 10, 100, 10, 100,
10, 58, 10, 32, 34, 35, 37, 42,
64, 65, 67, 69, 79, 80, 83, 89,
124, 9, 13, 101, 102, 110, 100, 105,
114, 58, 10, 10, 10, 32, 35, 37,
42, 64, 65, 79, 80, 83, 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, 110, 114, 10, 114, 10, 104, 10,
101, 10, 103, 10, 101, 10, 100, 10,
105, 10, 103, 10, 32, 10, 97, 10,
119, 10, 101, 10, 100, 10, 100, 10,
58, 10, 110, 10, 100, 10, 114, 10,
121, 10, 99, 10, 101, 10, 110, 10,
97, 10, 114, 10, 105, 10, 111, 10,
32, 58, 10, 65, 10, 109, 10, 108,
10, 105, 10, 110, 10, 101, 10, 108,
10, 108, 10, 111, 10, 108, 10, 110,
110, 103, 104, 114, 101, 105, 102, 102,
116, 105, 97, 117, 58, 10, 10, 10,
32, 35, 65, 124, 9, 13, 10, 114,
10, 119, 10, 101, 10, 100, 10, 100,
10, 58, 110, 100, 114, 121, 99, 101,
110, 97, 114, 105, 111, 32, 58, 65,
109, 108, 105, 110, 101, 108, 108, 111,
108, 58, 10, 10, 10, 32, 35, 37,
42, 64, 65, 79, 80, 83, 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, 110, 114, 10, 114, 10, 104, 10,
101, 10, 103, 10, 101, 10, 100, 10,
105, 10, 103, 10, 32, 10, 97, 10,
119, 10, 101, 10, 100, 10, 100, 10,
58, 10, 110, 10, 100, 10, 114, 10,
121, 10, 99, 10, 101, 10, 110, 10,
97, 10, 114, 10, 105, 10, 111, 10,
110, 10, 10, 10, 32, 35, 37, 42,
64, 65, 67, 79, 80, 83, 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, 110, 114, 10, 114, 10, 104, 10,
101, 10, 103, 10, 101, 10, 100, 10,
105, 10, 103, 10, 32, 10, 97, 10,
119, 10, 101, 10, 100, 10, 100, 10,
58, 10, 101, 10, 102, 10, 110, 10,
100, 10, 105, 10, 114, 10, 110, 10,
100, 10, 114, 10, 121, 10, 99, 10,
101, 10, 110, 10, 97, 10, 114, 10,
105, 10, 111, 10, 32, 58, 10, 65,
10, 109, 10, 108, 10, 105, 10, 110,
10, 101, 10, 108, 10, 108, 10, 111,
10, 108, 10, 110, 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, 69, 79, 80, 83, 89,
124, 9, 13, 10, 101, 10, 102, 10,
110, 10, 100, 10, 105, 10, 114, 10,
110, 10, 103, 10, 104, 10, 114, 10,
101, 10, 105, 10, 102, 10, 102, 10,
116, 10, 105, 10, 97, 10, 117, 10,
99, 10, 101, 10, 110, 10, 97, 10,
114, 10, 105, 10, 111, 10, 32, 58,
10, 65, 10, 109, 10, 108, 10, 105,
10, 110, 10, 101, 10, 108, 10, 108,
10, 111, 10, 108, 187, 191, 0
];
const _lexer_single_lengths = [
0, 16, 15, 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, 9, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,
2, 15, 1, 1, 1, 1, 1, 1,
1, 1, 1, 11, 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, 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, 1, 1, 1, 1, 1, 1, 1,
1, 5, 2, 2, 2, 2, 2, 2,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 2, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 11, 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, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 1, 1, 12,
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, 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, 2, 4, 3,
2, 4, 15, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 3, 2, 2, 2,
2, 2, 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, 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, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 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, 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, 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, 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
];
const _lexer_index_offsets = [
0, 0, 18, 35, 37, 39, 43, 48,
53, 58, 63, 67, 71, 74, 76, 78,
80, 82, 84, 86, 88, 90, 92, 94,
96, 98, 100, 102, 104, 106, 108, 111,
116, 123, 128, 132, 134, 136, 138, 140,
142, 144, 146, 148, 150, 152, 154, 156,
158, 160, 162, 164, 166, 177, 180, 183,
186, 189, 192, 195, 198, 201, 204, 207,
210, 213, 216, 219, 222, 225, 228, 231,
234, 237, 254, 256, 258, 260, 262, 264,
266, 268, 270, 272, 285, 288, 291, 294,
297, 300, 303, 306, 309, 312, 315, 318,
321, 324, 327, 330, 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, 417,
420, 423, 426, 429, 432, 435, 438, 441,
444, 447, 450, 452, 454, 456, 458, 460,
462, 464, 466, 468, 470, 472, 474, 476,
478, 480, 487, 490, 493, 496, 499, 502,
505, 507, 509, 511, 513, 515, 517, 519,
521, 523, 525, 527, 530, 532, 534, 536,
538, 540, 542, 544, 546, 548, 550, 552,
554, 556, 569, 572, 575, 578, 581, 584,
587, 590, 593, 596, 599, 602, 605, 608,
611, 614, 619, 622, 625, 628, 631, 634,
637, 640, 643, 646, 649, 652, 655, 658,
661, 664, 667, 670, 673, 676, 679, 682,
685, 688, 691, 694, 697, 700, 702, 704,
718, 721, 724, 727, 730, 733, 736, 739,
742, 745, 748, 751, 754, 757, 760, 763,
768, 771, 774, 777, 780, 783, 786, 789,
792, 795, 798, 801, 804, 807, 810, 813,
816, 819, 822, 825, 828, 831, 834, 837,
840, 843, 846, 849, 852, 855, 858, 861,
864, 868, 871, 874, 877, 880, 883, 886,
889, 892, 895, 898, 901, 903, 907, 913,
917, 920, 926, 943, 946, 949, 952, 955,
958, 961, 964, 967, 970, 973, 976, 979,
982, 985, 988, 991, 994, 997, 1000, 1003,
1006, 1009, 1012, 1015, 1018, 1022, 1025, 1028,
1031, 1034, 1037, 1040, 1043, 1046, 1049, 1052,
1054, 1056
];
const _lexer_indicies = [
2, 1, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16,
1, 0, 2, 1, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14,
15, 1, 0, 17, 0, 18, 0, 19,
18, 18, 0, 22, 21, 23, 21, 20,
26, 25, 27, 25, 24, 26, 25, 28,
25, 24, 26, 25, 29, 25, 24, 31,
30, 30, 0, 2, 32, 32, 0, 34,
35, 33, 2, 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, 49, 0,
50, 0, 0, 51, 53, 54, 52, 0,
0, 0, 0, 55, 56, 57, 56, 56,
59, 58, 55, 2, 60, 7, 60, 0,
50, 61, 62, 0, 63, 0, 64, 0,
65, 0, 66, 0, 67, 0, 68, 0,
69, 0, 70, 0, 71, 0, 72, 0,
73, 0, 74, 0, 75, 0, 76, 0,
77, 0, 79, 78, 81, 80, 81, 82,
83, 84, 83, 85, 86, 87, 88, 82,
80, 81, 89, 80, 81, 90, 80, 81,
91, 80, 81, 92, 80, 81, 93, 80,
81, 94, 80, 81, 95, 80, 81, 96,
80, 81, 97, 80, 81, 98, 80, 81,
99, 80, 81, 100, 80, 81, 101, 80,
81, 102, 80, 81, 103, 80, 81, 104,
80, 81, 105, 80, 81, 106, 80, 81,
107, 80, 81, 108, 80, 110, 109, 111,
112, 113, 114, 115, 116, 117, 118, 119,
120, 121, 122, 123, 109, 0, 124, 0,
125, 0, 126, 0, 127, 0, 128, 0,
129, 0, 130, 0, 132, 131, 134, 133,
134, 135, 136, 137, 138, 136, 139, 140,
141, 142, 143, 135, 133, 134, 144, 133,
134, 145, 133, 134, 146, 133, 134, 147,
133, 134, 148, 133, 134, 149, 133, 134,
150, 133, 134, 151, 133, 134, 152, 133,
134, 153, 133, 134, 154, 133, 134, 155,
133, 134, 156, 133, 134, 157, 133, 134,
158, 133, 134, 158, 159, 160, 133, 134,
161, 133, 134, 162, 133, 134, 163, 133,
134, 164, 133, 134, 165, 133, 134, 166,
133, 134, 167, 133, 134, 168, 133, 134,
169, 133, 134, 170, 133, 134, 171, 133,
134, 172, 133, 134, 173, 133, 134, 174,
133, 134, 158, 133, 134, 175, 133, 134,
170, 133, 134, 176, 133, 134, 175, 133,
134, 177, 133, 134, 178, 133, 134, 179,
133, 134, 180, 133, 134, 181, 133, 134,
182, 133, 134, 183, 133, 134, 184, 158,
133, 134, 185, 133, 134, 186, 133, 134,
187, 133, 134, 188, 133, 134, 189, 133,
134, 190, 133, 134, 191, 133, 134, 192,
133, 134, 193, 133, 134, 174, 133, 134,
169, 133, 194, 0, 195, 0, 196, 0,
197, 0, 198, 0, 199, 0, 200, 0,
201, 0, 202, 0, 203, 0, 204, 0,
205, 0, 206, 0, 208, 207, 210, 209,
210, 211, 212, 213, 212, 211, 209, 210,
214, 209, 210, 215, 209, 210, 216, 209,
210, 217, 209, 210, 218, 209, 210, 219,
209, 220, 0, 72, 0, 221, 0, 220,
0, 222, 0, 223, 0, 224, 0, 225,
0, 226, 0, 227, 0, 228, 0, 229,
230, 0, 231, 0, 232, 0, 233, 0,
234, 0, 235, 0, 236, 0, 237, 0,
238, 0, 239, 0, 240, 0, 241, 0,
243, 242, 245, 244, 245, 246, 247, 248,
249, 247, 250, 251, 252, 253, 254, 246,
244, 245, 255, 244, 245, 256, 244, 245,
257, 244, 245, 258, 244, 245, 259, 244,
245, 260, 244, 245, 261, 244, 245, 262,
244, 245, 263, 244, 245, 264, 244, 245,
265, 244, 245, 266, 244, 245, 267, 244,
245, 268, 244, 245, 269, 244, 245, 269,
270, 271, 244, 245, 272, 244, 245, 273,
244, 245, 274, 244, 245, 275, 244, 245,
276, 244, 245, 277, 244, 245, 278, 244,
245, 279, 244, 245, 280, 244, 245, 281,
244, 245, 282, 244, 245, 283, 244, 245,
284, 244, 245, 285, 244, 245, 269, 244,
245, 286, 244, 245, 281, 244, 245, 287,
244, 245, 286, 244, 245, 288, 244, 245,
289, 244, 245, 290, 244, 245, 291, 244,
245, 292, 244, 245, 293, 244, 245, 285,
244, 245, 280, 244, 295, 294, 297, 296,
297, 298, 299, 300, 301, 299, 302, 303,
304, 305, 306, 307, 298, 296, 297, 308,
296, 297, 309, 296, 297, 310, 296, 297,
311, 296, 297, 312, 296, 297, 313, 296,
297, 314, 296, 297, 315, 296, 297, 316,
296, 297, 317, 296, 297, 318, 296, 297,
319, 296, 297, 320, 296, 297, 321, 296,
297, 322, 296, 297, 322, 323, 324, 296,
297, 325, 296, 297, 326, 296, 297, 327,
296, 297, 328, 296, 297, 329, 296, 297,
330, 296, 297, 331, 296, 297, 332, 296,
297, 333, 296, 297, 334, 296, 297, 335,
296, 297, 336, 296, 297, 337, 296, 297,
338, 296, 297, 322, 296, 297, 339, 296,
297, 340, 296, 297, 341, 296, 297, 342,
296, 297, 343, 296, 297, 338, 296, 297,
344, 296, 297, 334, 296, 297, 345, 296,
297, 344, 296, 297, 346, 296, 297, 347,
296, 297, 348, 296, 297, 349, 296, 297,
350, 296, 297, 351, 296, 297, 352, 296,
297, 353, 322, 296, 297, 354, 296, 297,
355, 296, 297, 356, 296, 297, 357, 296,
297, 358, 296, 297, 359, 296, 297, 360,
296, 297, 361, 296, 297, 362, 296, 297,
338, 296, 297, 333, 296, 71, 0, 363,
364, 363, 0, 367, 366, 368, 369, 366,
365, 0, 371, 372, 370, 0, 371, 370,
367, 373, 371, 372, 373, 370, 367, 374,
375, 376, 377, 378, 379, 380, 381, 382,
383, 384, 385, 386, 387, 374, 0, 81,
388, 80, 81, 389, 80, 81, 390, 80,
81, 391, 80, 81, 392, 80, 81, 107,
80, 81, 393, 80, 81, 394, 80, 81,
395, 80, 81, 396, 80, 81, 397, 80,
81, 398, 80, 81, 399, 80, 81, 400,
80, 81, 401, 80, 81, 402, 80, 81,
403, 80, 81, 107, 80, 81, 404, 80,
81, 405, 80, 81, 406, 80, 81, 407,
80, 81, 408, 80, 81, 409, 80, 81,
410, 80, 81, 411, 108, 80, 81, 412,
80, 81, 413, 80, 81, 414, 80, 81,
415, 80, 81, 416, 80, 81, 417, 80,
81, 418, 80, 81, 419, 80, 81, 420,
80, 81, 107, 80, 421, 0, 1, 0,
422, 0
];
const _lexer_trans_targs = [
0, 2, 2, 3, 12, 14, 28, 31,
34, 74, 138, 160, 162, 164, 292, 293,
335, 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, 337, 29, 30, 30, 2, 13, 32,
33, 2, 32, 31, 33, 35, 45, 36,
37, 38, 39, 40, 41, 42, 43, 44,
28, 46, 47, 48, 49, 50, 51, 52,
51, 52, 52, 2, 53, 67, 299, 305,
317, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 2, 68,
69, 70, 71, 72, 73, 2, 2, 3,
12, 14, 28, 31, 34, 74, 138, 160,
162, 164, 292, 293, 75, 76, 77, 78,
79, 80, 81, 82, 83, 82, 83, 83,
2, 84, 98, 99, 115, 117, 119, 137,
85, 86, 87, 88, 89, 90, 91, 92,
93, 94, 95, 96, 97, 2, 73, 100,
110, 101, 102, 103, 104, 105, 106, 107,
108, 109, 98, 111, 112, 113, 114, 116,
118, 120, 121, 122, 123, 124, 125, 126,
127, 128, 129, 130, 131, 132, 133, 134,
135, 136, 139, 140, 141, 142, 143, 144,
145, 146, 147, 148, 149, 150, 151, 152,
153, 152, 153, 153, 2, 154, 155, 156,
157, 158, 159, 73, 161, 163, 165, 166,
167, 168, 169, 170, 171, 172, 229, 173,
174, 175, 176, 177, 178, 179, 180, 181,
182, 183, 184, 185, 184, 185, 185, 2,
186, 200, 201, 217, 219, 221, 228, 187,
188, 189, 190, 191, 192, 193, 194, 195,
196, 197, 198, 199, 2, 73, 202, 212,
203, 204, 205, 206, 207, 208, 209, 210,
211, 200, 213, 214, 215, 216, 218, 220,
222, 223, 224, 225, 226, 227, 230, 231,
230, 231, 231, 2, 232, 246, 247, 263,
269, 271, 273, 291, 233, 234, 235, 236,
237, 238, 239, 240, 241, 242, 243, 244,
245, 2, 73, 248, 258, 249, 250, 251,
252, 253, 254, 255, 256, 257, 246, 259,
260, 261, 262, 264, 265, 266, 267, 268,
270, 272, 274, 275, 276, 277, 278, 279,
280, 281, 282, 283, 284, 285, 286, 287,
288, 289, 290, 293, 294, 295, 297, 298,
296, 294, 295, 296, 294, 297, 298, 3,
12, 14, 28, 31, 34, 74, 138, 160,
162, 164, 292, 293, 300, 301, 302, 303,
304, 306, 307, 308, 309, 310, 311, 312,
313, 314, 315, 316, 318, 319, 320, 321,
322, 323, 324, 325, 326, 327, 328, 329,
330, 331, 332, 333, 334, 336, 0
];
const _lexer_trans_actions = [
39, 0, 47, 3, 1, 0, 25, 1,
25, 25, 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,
0, 0, 0, 0, 0, 0, 50, 124,
0, 47, 0, 62, 29, 77, 77, 77,
77, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 9, 0,
0, 0, 0, 0, 9, 27, 115, 53,
50, 27, 56, 50, 56, 56, 56, 56,
56, 56, 56, 59, 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, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 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, 74, 77, 0, 0,
0, 0, 0, 17, 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, 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, 50, 124,
0, 47, 0, 68, 29, 77, 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, 33, 33, 47,
33, 80, 0, 0, 35, 0, 0, 86,
83, 37, 89, 83, 89, 89, 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, 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, 39, 39, 39,
39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 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 = 337;
const lexer_error = 0;
const lexer_en_main = 1;
/* line 120 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.js.rl" */
/* line 121 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.js.rl" */
/* line 122 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.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 649 "js/lib/gherkin/lexer/cy_gb.js" */
{
this.cs = lexer_start;
} /* JSCodeGen::writeInit */
/* line 153 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.js.rl" */
/* line 656 "js/lib/gherkin/lexer/cy_gb.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/cy_gb.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/cy_gb.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/cy_gb.js.rl" */
this.content_start = p;
break;
case 3:
/* line 21 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.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/cy_gb.js.rl" */
p = this.store_keyword_content('feature', data, p, eof);
break;
case 5:
/* line 33 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.js.rl" */
p = this.store_keyword_content('background', data, p, eof);
break;
case 6:
/* line 37 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.js.rl" */
p = this.store_keyword_content('scenario', data, p, eof);
break;
case 7:
/* line 41 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.js.rl" */
p = this.store_keyword_content('scenario_outline', data, p, eof);
break;
case 8:
/* line 45 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.js.rl" */
p = this.store_keyword_content('examples', data, p, eof);
break;
case 9:
/* line 49 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.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/cy_gb.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/cy_gb.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/cy_gb.js.rl" */
this.line_number++;
break;
case 13:
/* line 70 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.js.rl" */
this.last_newline = p + 1;
break;
case 14:
/* line 74 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.js.rl" */
this.keyword_start = this.keyword_start || p;
break;
case 15:
/* line 78 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.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/cy_gb.js.rl" */
this.next_keyword_start = p;
break;
case 17:
/* line 87 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.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/cy_gb.js.rl" */
this.content_start = p;
break;
case 19:
/* line 97 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.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/cy_gb.js.rl" */
this.listener.row(current_row, this.current_line);
break;
case 21:
/* line 106 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.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 872 "js/lib/gherkin/lexer/cy_gb.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/cy_gb.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 911 "js/lib/gherkin/lexer/cy_gb.js" */
} /* eof action switch */
}
if (_trigger_goto) {
continue;
}
}
}
if (_goto_level <= _out) {
break;
}
}
}
/* line 154 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/cy_gb.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/cy_gb', [], function() {return Lexer});
}
})();