gherkin
Version:
A fast Gherkin lexer/parser based on the Ragel State Machine Compiler.
1,081 lines (1,016 loc) • 34.7 kB
JavaScript
/* line 1 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.js.rl" */
;(function() {
/* line 117 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.js.rl" */
/* line 11 "js/lib/gherkin/lexer/lu.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, 21, 41, 42, 43, 47, 52,
57, 62, 67, 71, 75, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87,
88, 89, 90, 91, 92, 93, 94, 96,
101, 108, 113, 114, 115, 116, 117, 118,
119, 120, 121, 122, 123, 124, 125, 132,
134, 136, 138, 140, 142, 144, 146, 148,
150, 152, 154, 156, 158, 160, 162, 164,
184, 185, 186, 187, 188, 189, 190, 191,
192, 193, 194, 195, 196, 197, 198, 199,
200, 201, 202, 214, 216, 218, 220, 222,
224, 226, 228, 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, 310, 312, 314, 316, 318,
320, 322, 324, 326, 328, 330, 332, 334,
336, 338, 340, 342, 344, 346, 347, 348,
349, 350, 351, 352, 353, 354, 355, 356,
357, 358, 359, 375, 377, 379, 381, 383,
385, 387, 389, 391, 393, 395, 397, 399,
401, 403, 405, 407, 409, 411, 413, 415,
417, 419, 421, 423, 425, 427, 429, 431,
433, 435, 437, 439, 441, 443, 445, 447,
449, 451, 453, 455, 457, 459, 461, 463,
465, 467, 469, 471, 475, 477, 479, 481,
483, 485, 487, 489, 491, 493, 495, 497,
499, 501, 502, 503, 504, 505, 506, 507,
508, 509, 510, 511, 512, 513, 514, 515,
516, 517, 518, 519, 520, 521, 536, 538,
540, 542, 544, 546, 548, 550, 552, 554,
556, 558, 560, 562, 564, 566, 568, 570,
572, 574, 576, 578, 580, 582, 584, 586,
588, 590, 592, 594, 596, 598, 600, 602,
604, 606, 608, 610, 612, 616, 618, 620,
622, 624, 626, 628, 630, 632, 634, 636,
638, 640, 642, 643, 644, 645, 646, 647,
648, 649, 650, 651, 652, 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, 719, 721,
723, 725, 727, 729, 731, 733, 735, 737,
739, 741, 743, 745, 747, 749, 751, 753,
755, 757, 759, 761, 763, 765, 767, 769,
771, 773, 775, 777, 779, 781, 783, 785,
789, 791, 793, 795, 797, 799, 801, 803,
805, 807, 809, 811, 813, 815, 818, 819,
820, 821, 822, 823, 824, 825, 826, 827,
828, 829, 830, 831, 835, 841, 844, 846,
852, 872, 873, 874
];
const _lexer_trans_keys = [
10, 32, 34, 35, 37, 42, 64, 66,
70, 72, 80, 83, 97, 100, 109, 117,
119, 124, 239, 9, 13, 10, 32, 34,
35, 37, 42, 64, 66, 70, 72, 80,
83, 97, 100, 109, 117, 119, 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, 101, 105, 115, 112, 105, 108, 108,
101, 114, 58, 10, 10, 10, 32, 35,
70, 124, 9, 13, 10, 117, 10, 110,
10, 107, 10, 116, 10, 105, 10, 111,
10, 110, 10, 97, 10, 108, 10, 105,
10, 116, -61, 10, -87, 10, 10, 105,
10, 116, 10, 58, 10, 32, 34, 35,
37, 42, 64, 66, 70, 72, 80, 83,
97, 100, 109, 117, 119, 124, 9, 13,
117, 110, 107, 116, 105, 111, 110, 97,
108, 105, 116, -61, -87, 105, 116, 58,
10, 10, 10, 32, 35, 37, 64, 66,
70, 72, 80, 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, 101, 10, 105, 10, 115,
10, 112, 10, 105, 10, 108, 10, 108,
10, 101, 10, 114, 10, 58, 10, 117,
10, 110, 10, 107, 10, 116, 10, 105,
10, 111, 10, 110, 10, 97, 10, 108,
10, 105, 10, 116, -61, 10, -87, 10,
10, 105, 10, 116, 10, 97, 10, 110,
10, 110, 10, 101, 10, 114, 10, 103,
10, 114, 10, 111, 10, 110, 10, 100,
10, 108, 10, 97, 10, 110, 10, 103,
10, 32, 10, 118, 10, 117, 10, 109,
10, 32, 10, 83, 10, 122, 10, 101,
10, 110, 10, 97, 10, 114, 10, 105,
10, 111, 97, 110, 110, 101, 114, 103,
114, 111, 110, 100, 58, 10, 10, 10,
32, 35, 37, 42, 64, 70, 80, 83,
97, 100, 109, 117, 119, 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, 117, 10,
110, 10, 107, 10, 116, 10, 105, 10,
111, 10, 110, 10, 97, 10, 108, 10,
105, 10, 116, -61, 10, -87, 10, 10,
105, 10, 116, 10, 58, 10, 108, 10,
97, 10, 110, 10, 103, 10, 32, 10,
118, 10, 117, 10, 109, 10, 32, 10,
83, 10, 122, 10, 101, 10, 110, 10,
97, 10, 114, 10, 105, 10, 111, 10,
32, 110, 119, 10, 101, 10, 114, 10,
97, 10, 110, 10, 110, -61, 10, -92,
10, 10, 103, 10, 101, 10, 104, 10,
111, 10, 108, 10, 108, 108, 97, 110,
103, 32, 118, 117, 109, 32, 83, 122,
101, 110, 97, 114, 105, 111, 58, 10,
10, 10, 32, 35, 37, 42, 64, 70,
83, 97, 100, 109, 117, 119, 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, 117,
10, 110, 10, 107, 10, 116, 10, 105,
10, 111, 10, 110, 10, 97, 10, 108,
10, 105, 10, 116, -61, 10, -87, 10,
10, 105, 10, 116, 10, 58, 10, 122,
10, 101, 10, 110, 10, 97, 10, 114,
10, 105, 10, 111, 10, 32, 110, 119,
10, 101, 10, 114, 10, 97, 10, 110,
10, 110, -61, 10, -92, 10, 10, 103,
10, 101, 10, 104, 10, 111, 10, 108,
10, 108, 122, 101, 110, 97, 114, 105,
111, 58, 10, 10, 10, 32, 35, 37,
42, 64, 70, 72, 80, 83, 97, 100,
109, 117, 119, 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, 117, 10, 110, 10,
107, 10, 116, 10, 105, 10, 111, 10,
110, 10, 97, 10, 108, 10, 105, 10,
116, -61, 10, -87, 10, 10, 105, 10,
116, 10, 58, 10, 97, 10, 110, 10,
110, 10, 101, 10, 114, 10, 103, 10,
114, 10, 111, 10, 110, 10, 100, 10,
108, 10, 97, 10, 110, 10, 103, 10,
32, 10, 118, 10, 117, 10, 109, 10,
32, 10, 83, 10, 122, 10, 101, 10,
110, 10, 97, 10, 114, 10, 105, 10,
111, 10, 32, 110, 119, 10, 101, 10,
114, 10, 97, 10, 110, 10, 110, -61,
10, -92, 10, 10, 103, 10, 101, 10,
104, 10, 111, 10, 108, 10, 108, 32,
110, 119, 101, 114, 97, 110, 110, -61,
-92, 103, 101, 104, 111, 108, 108, 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, 70, 72, 80, 83,
97, 100, 109, 117, 119, 124, 9, 13,
187, 191, 0
];
const _lexer_single_lengths = [
0, 19, 18, 1, 1, 2, 3, 3,
3, 3, 2, 2, 2, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 2, 3,
5, 3, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 5, 2,
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 18,
1, 1, 1, 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, 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, 14, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 4, 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, 13, 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, 4, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 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, 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, 4,
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 3, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 2, 4, 3, 2, 4,
18, 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, 0, 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, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 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, 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, 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, 1, 1, 0, 0, 1,
1, 0, 0, 0
];
const _lexer_index_offsets = [
0, 0, 21, 41, 43, 45, 49, 54,
59, 64, 69, 73, 77, 80, 82, 84,
86, 88, 90, 92, 94, 96, 98, 100,
102, 104, 106, 108, 110, 112, 114, 117,
122, 129, 134, 136, 138, 140, 142, 144,
146, 148, 150, 152, 154, 156, 158, 165,
168, 171, 174, 177, 180, 183, 186, 189,
192, 195, 198, 201, 204, 207, 210, 213,
233, 235, 237, 239, 241, 243, 245, 247,
249, 251, 253, 255, 257, 259, 261, 263,
265, 267, 269, 281, 284, 287, 290, 293,
296, 299, 302, 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, 425, 428, 431, 434, 437,
440, 443, 446, 449, 452, 455, 458, 461,
464, 467, 470, 473, 476, 479, 481, 483,
485, 487, 489, 491, 493, 495, 497, 499,
501, 503, 505, 521, 524, 527, 530, 533,
536, 539, 542, 545, 548, 551, 554, 557,
560, 563, 566, 569, 572, 575, 578, 581,
584, 587, 590, 593, 596, 599, 602, 605,
608, 611, 614, 617, 620, 623, 626, 629,
632, 635, 638, 641, 644, 647, 650, 653,
656, 659, 662, 665, 670, 673, 676, 679,
682, 685, 688, 691, 694, 697, 700, 703,
706, 709, 711, 713, 715, 717, 719, 721,
723, 725, 727, 729, 731, 733, 735, 737,
739, 741, 743, 745, 747, 749, 764, 767,
770, 773, 776, 779, 782, 785, 788, 791,
794, 797, 800, 803, 806, 809, 812, 815,
818, 821, 824, 827, 830, 833, 836, 839,
842, 845, 848, 851, 854, 857, 860, 863,
866, 869, 872, 875, 878, 883, 886, 889,
892, 895, 898, 901, 904, 907, 910, 913,
916, 919, 922, 924, 926, 928, 930, 932,
934, 936, 938, 940, 942, 959, 962, 965,
968, 971, 974, 977, 980, 983, 986, 989,
992, 995, 998, 1001, 1004, 1007, 1010, 1013,
1016, 1019, 1022, 1025, 1028, 1031, 1034, 1037,
1040, 1043, 1046, 1049, 1052, 1055, 1058, 1061,
1064, 1067, 1070, 1073, 1076, 1079, 1082, 1085,
1088, 1091, 1094, 1097, 1100, 1103, 1106, 1109,
1112, 1115, 1118, 1121, 1124, 1127, 1130, 1133,
1138, 1141, 1144, 1147, 1150, 1153, 1156, 1159,
1162, 1165, 1168, 1171, 1174, 1177, 1181, 1183,
1185, 1187, 1189, 1191, 1193, 1195, 1197, 1199,
1201, 1203, 1205, 1207, 1211, 1217, 1221, 1224,
1230, 1250, 1252, 1254
];
const _lexer_indicies = [
2, 1, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16,
14, 17, 18, 1, 0, 2, 1, 3,
4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 14, 17, 1,
0, 19, 0, 20, 0, 21, 20, 20,
0, 24, 23, 25, 23, 22, 28, 27,
29, 27, 26, 28, 27, 30, 27, 26,
28, 27, 31, 27, 26, 33, 32, 32,
0, 2, 34, 34, 0, 36, 37, 35,
2, 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, 51, 0, 52, 0,
0, 53, 55, 56, 54, 0, 0, 0,
0, 57, 58, 59, 58, 58, 61, 60,
57, 2, 62, 7, 62, 0, 63, 0,
64, 0, 65, 0, 66, 0, 67, 0,
68, 0, 69, 0, 70, 0, 71, 0,
72, 0, 74, 73, 76, 75, 76, 77,
78, 79, 78, 77, 75, 76, 80, 75,
76, 81, 75, 76, 82, 75, 76, 83,
75, 76, 84, 75, 76, 85, 75, 76,
86, 75, 76, 87, 75, 76, 88, 75,
76, 89, 75, 76, 90, 75, 91, 76,
75, 92, 76, 75, 76, 93, 75, 76,
94, 75, 76, 95, 75, 97, 96, 98,
99, 100, 101, 102, 103, 104, 105, 106,
107, 108, 109, 110, 111, 109, 112, 96,
0, 113, 0, 114, 0, 115, 0, 116,
0, 117, 0, 118, 0, 119, 0, 120,
0, 121, 0, 122, 0, 123, 0, 124,
0, 125, 0, 126, 0, 127, 0, 128,
0, 130, 129, 132, 131, 132, 133, 134,
135, 134, 136, 137, 138, 139, 140, 133,
131, 132, 141, 131, 132, 142, 131, 132,
143, 131, 132, 144, 131, 132, 145, 131,
132, 146, 131, 132, 147, 131, 132, 148,
131, 132, 149, 131, 132, 150, 131, 132,
151, 131, 132, 152, 131, 132, 153, 131,
132, 154, 131, 132, 155, 131, 132, 156,
131, 132, 157, 131, 132, 158, 131, 132,
159, 131, 132, 160, 131, 132, 161, 131,
132, 162, 131, 132, 163, 131, 132, 164,
131, 132, 165, 131, 132, 166, 131, 132,
167, 131, 132, 168, 131, 132, 169, 131,
132, 170, 131, 132, 171, 131, 132, 172,
131, 132, 173, 131, 132, 174, 131, 132,
175, 131, 176, 132, 131, 177, 132, 131,
132, 178, 131, 132, 163, 131, 132, 179,
131, 132, 180, 131, 132, 181, 131, 132,
182, 131, 132, 183, 131, 132, 184, 131,
132, 185, 131, 132, 186, 131, 132, 187,
131, 132, 163, 131, 132, 188, 131, 132,
189, 131, 132, 190, 131, 132, 191, 131,
132, 192, 131, 132, 193, 131, 132, 194,
131, 132, 195, 131, 132, 196, 131, 132,
197, 131, 132, 198, 131, 132, 199, 131,
132, 200, 131, 132, 201, 131, 132, 202,
131, 132, 203, 131, 132, 163, 131, 204,
0, 205, 0, 206, 0, 207, 0, 208,
0, 209, 0, 210, 0, 211, 0, 212,
0, 213, 0, 214, 0, 216, 215, 218,
217, 218, 219, 220, 221, 222, 220, 223,
224, 225, 226, 227, 228, 229, 227, 219,
217, 218, 230, 217, 218, 231, 217, 218,
232, 217, 218, 233, 217, 218, 234, 217,
218, 235, 217, 218, 236, 217, 218, 237,
217, 218, 238, 217, 218, 239, 217, 218,
240, 217, 218, 241, 217, 218, 242, 217,
218, 243, 217, 218, 244, 217, 218, 245,
217, 218, 246, 217, 218, 247, 217, 218,
248, 217, 218, 249, 217, 218, 250, 217,
218, 251, 217, 218, 252, 217, 218, 253,
217, 218, 254, 217, 218, 255, 217, 256,
218, 217, 257, 218, 217, 218, 258, 217,
218, 259, 217, 218, 244, 217, 218, 260,
217, 218, 261, 217, 218, 262, 217, 218,
263, 217, 218, 264, 217, 218, 265, 217,
218, 266, 217, 218, 267, 217, 218, 268,
217, 218, 269, 217, 218, 270, 217, 218,
271, 217, 218, 272, 217, 218, 273, 217,
218, 274, 217, 218, 275, 217, 218, 259,
217, 218, 244, 276, 277, 217, 218, 278,
217, 218, 276, 217, 218, 279, 217, 218,
280, 217, 218, 276, 217, 281, 218, 217,
276, 218, 217, 218, 282, 217, 218, 283,
217, 218, 284, 217, 218, 285, 217, 218,
286, 217, 218, 276, 217, 287, 0, 288,
0, 289, 0, 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, 306, 305, 308, 307, 308, 309, 310,
311, 312, 310, 313, 314, 315, 316, 317,
318, 316, 309, 307, 308, 319, 307, 308,
320, 307, 308, 321, 307, 308, 322, 307,
308, 323, 307, 308, 324, 307, 308, 325,
307, 308, 326, 307, 308, 327, 307, 308,
328, 307, 308, 329, 307, 308, 330, 307,
308, 331, 307, 308, 332, 307, 308, 333,
307, 308, 334, 307, 308, 335, 307, 308,
336, 307, 308, 337, 307, 308, 338, 307,
308, 339, 307, 308, 340, 307, 308, 341,
307, 308, 342, 307, 308, 343, 307, 308,
344, 307, 345, 308, 307, 346, 308, 307,
308, 347, 307, 308, 348, 307, 308, 333,
307, 308, 349, 307, 308, 350, 307, 308,
351, 307, 308, 352, 307, 308, 353, 307,
308, 354, 307, 308, 348, 307, 308, 333,
355, 356, 307, 308, 357, 307, 308, 355,
307, 308, 358, 307, 308, 359, 307, 308,
355, 307, 360, 308, 307, 355, 308, 307,
308, 361, 307, 308, 362, 307, 308, 363,
307, 308, 364, 307, 308, 365, 307, 308,
355, 307, 366, 0, 367, 0, 368, 0,
369, 0, 370, 0, 371, 0, 372, 0,
373, 0, 375, 374, 377, 376, 377, 378,
379, 380, 381, 379, 382, 383, 384, 385,
386, 387, 388, 389, 387, 378, 376, 377,
390, 376, 377, 391, 376, 377, 392, 376,
377, 393, 376, 377, 394, 376, 377, 395,
376, 377, 396, 376, 377, 397, 376, 377,
398, 376, 377, 399, 376, 377, 400, 376,
377, 401, 376, 377, 402, 376, 377, 403,
376, 377, 404, 376, 377, 405, 376, 377,
406, 376, 377, 407, 376, 377, 408, 376,
377, 409, 376, 377, 410, 376, 377, 411,
376, 377, 412, 376, 377, 413, 376, 377,
414, 376, 377, 415, 376, 416, 377, 376,
417, 377, 376, 377, 418, 376, 377, 419,
376, 377, 404, 376, 377, 420, 376, 377,
421, 376, 377, 422, 376, 377, 423, 376,
377, 424, 376, 377, 425, 376, 377, 426,
376, 377, 427, 376, 377, 428, 376, 377,
419, 376, 377, 429, 376, 377, 430, 376,
377, 431, 376, 377, 432, 376, 377, 433,
376, 377, 434, 376, 377, 435, 376, 377,
436, 376, 377, 437, 376, 377, 438, 376,
377, 439, 376, 377, 440, 376, 377, 441,
376, 377, 442, 376, 377, 443, 376, 377,
444, 376, 377, 419, 376, 377, 404, 445,
446, 376, 377, 447, 376, 377, 445, 376,
377, 448, 376, 377, 449, 376, 377, 445,
376, 450, 377, 376, 445, 377, 376, 377,
451, 376, 377, 452, 376, 377, 453, 376,
377, 454, 376, 377, 455, 376, 377, 445,
376, 52, 456, 457, 0, 458, 0, 456,
0, 459, 0, 460, 0, 456, 0, 461,
0, 456, 0, 462, 0, 463, 0, 464,
0, 465, 0, 466, 0, 456, 0, 467,
468, 467, 0, 471, 470, 472, 473, 470,
469, 0, 475, 476, 474, 0, 475, 474,
471, 477, 475, 476, 477, 474, 471, 478,
479, 480, 481, 482, 483, 484, 485, 486,
487, 488, 489, 490, 491, 492, 490, 493,
478, 0, 494, 0, 1, 0, 495, 0
];
const _lexer_trans_targs = [
0, 2, 2, 3, 12, 14, 28, 31,
34, 64, 149, 225, 298, 381, 384, 387,
389, 395, 401, 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, 403, 29, 30, 30, 2,
13, 32, 33, 2, 32, 31, 33, 35,
36, 37, 38, 39, 40, 41, 42, 43,
44, 45, 46, 45, 46, 46, 2, 47,
48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63,
2, 2, 3, 12, 14, 28, 31, 34,
64, 149, 225, 298, 381, 384, 387, 389,
395, 65, 66, 67, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 81, 82, 82, 2, 83,
97, 107, 122, 132, 142, 84, 85, 86,
87, 88, 89, 90, 91, 92, 93, 94,
95, 96, 2, 98, 99, 100, 101, 102,
103, 104, 105, 106, 63, 108, 109, 110,
111, 112, 113, 114, 115, 116, 117, 118,
119, 120, 121, 123, 124, 125, 126, 127,
128, 129, 130, 131, 133, 134, 135, 136,
137, 138, 139, 140, 141, 142, 143, 144,
145, 146, 147, 148, 150, 151, 152, 153,
154, 155, 156, 157, 158, 159, 160, 161,
162, 161, 162, 162, 2, 163, 177, 178,
194, 204, 211, 214, 217, 219, 164, 165,
166, 167, 168, 169, 170, 171, 172, 173,
174, 175, 176, 2, 63, 179, 180, 181,
182, 183, 184, 185, 186, 187, 188, 189,
190, 191, 192, 193, 195, 196, 197, 198,
199, 200, 201, 202, 203, 204, 205, 206,
207, 208, 209, 210, 177, 212, 213, 215,
216, 218, 220, 221, 222, 223, 224, 226,
227, 228, 229, 230, 231, 232, 233, 234,
235, 236, 237, 238, 239, 240, 241, 242,
243, 244, 245, 244, 245, 245, 2, 246,
260, 261, 277, 284, 287, 290, 292, 247,
248, 249, 250, 251, 252, 253, 254, 255,
256, 257, 258, 259, 2, 63, 262, 263,
264, 265, 266, 267, 268, 269, 270, 271,
272, 273, 274, 275, 276, 278, 279, 280,
281, 282, 283, 260, 285, 286, 288, 289,
291, 293, 294, 295, 296, 297, 299, 300,
301, 302, 303, 304, 305, 306, 307, 308,
307, 308, 308, 2, 309, 323, 324, 340,
350, 360, 367, 370, 373, 375, 310, 311,
312, 313, 314, 315, 316, 317, 318, 319,
320, 321, 322, 2, 63, 325, 326, 327,
328, 329, 330, 331, 332, 333, 334, 335,
336, 337, 338, 339, 341, 342, 343, 344,
345, 346, 347, 348, 349, 351, 352, 353,
354, 355, 356, 357, 358, 359, 360, 361,
362, 363, 364, 365, 366, 323, 368, 369,
371, 372, 374, 376, 377, 378, 379, 380,
28, 382, 383, 385, 386, 388, 390, 391,
392, 393, 394, 395, 396, 397, 399, 400,
398, 396, 397, 398, 396, 399, 400, 3,
12, 14, 28, 31, 34, 64, 149, 225,
298, 381, 384, 387, 389, 395, 402, 0
];
const _lexer_trans_actions = [
39, 0, 47, 3, 1, 0, 25, 1,
25, 25, 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, 50, 124, 0, 47, 0, 74, 77,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 17,
27, 115, 53, 50, 27, 56, 50, 56,
56, 56, 56, 56, 56, 56, 56, 56,
59, 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, 77, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 9, 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, 0, 0,
0, 0, 0, 0, 0, 0, 0, 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, 65, 29, 77, 77,
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, 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, 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, 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, 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, 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, 89, 89, 92, 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, 39, 39, 39, 39, 39, 39,
39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 39, 39, 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 = 403;
const lexer_error = 0;
const lexer_en_main = 1;
/* line 120 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.js.rl" */
/* line 121 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.js.rl" */
/* line 122 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.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 748 "js/lib/gherkin/lexer/lu.js" */
{
this.cs = lexer_start;
} /* JSCodeGen::writeInit */
/* line 153 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.js.rl" */
/* line 755 "js/lib/gherkin/lexer/lu.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/lu.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/lu.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/lu.js.rl" */
this.content_start = p;
break;
case 3:
/* line 21 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.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/lu.js.rl" */
p = this.store_keyword_content('feature', data, p, eof);
break;
case 5:
/* line 33 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.js.rl" */
p = this.store_keyword_content('background', data, p, eof);
break;
case 6:
/* line 37 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.js.rl" */
p = this.store_keyword_content('scenario', data, p, eof);
break;
case 7:
/* line 41 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.js.rl" */
p = this.store_keyword_content('scenario_outline', data, p, eof);
break;
case 8:
/* line 45 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.js.rl" */
p = this.store_keyword_content('examples', data, p, eof);
break;
case 9:
/* line 49 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.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/lu.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/lu.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/lu.js.rl" */
this.line_number++;
break;
case 13:
/* line 70 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.js.rl" */
this.last_newline = p + 1;
break;
case 14:
/* line 74 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.js.rl" */
this.keyword_start = this.keyword_start || p;
break;
case 15:
/* line 78 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.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/lu.js.rl" */
this.next_keyword_start = p;
break;
case 17:
/* line 87 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.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/lu.js.rl" */
this.content_start = p;
break;
case 19:
/* line 97 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.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/lu.js.rl" */
this.listener.row(current_row, this.current_line);
break;
case 21:
/* line 106 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.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 971 "js/lib/gherkin/lexer/lu.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/lu.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 1010 "js/lib/gherkin/lexer/lu.js" */
} /* eof action switch */
}
if (_trigger_goto) {
continue;
}
}
}
if (_goto_level <= _out) {
break;
}
}
}
/* line 154 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/lu.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/lu', [], function() {return Lexer});
}
})();