gherkin
Version:
A fast Gherkin lexer/parser based on the Ragel State Machine Compiler.
964 lines (899 loc) • 30.4 kB
JavaScript
/* line 1 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.js.rl" */
;(function() {
/* line 117 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.js.rl" */
/* line 11 "js/lib/gherkin/lexer/zh_tw.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, 16, 19, 20, 21, 22, 23,
24, 26, 41, 44, 45, 46, 47, 48,
50, 51, 52, 53, 55, 56, 57, 58,
59, 60, 61, 62, 63, 76, 79, 81,
83, 85, 87, 102, 103, 104, 106, 107,
108, 109, 110, 111, 112, 113, 114, 127,
130, 132, 134, 136, 138, 140, 142, 144,
146, 150, 152, 154, 156, 158, 161, 163,
165, 167, 170, 172, 174, 176, 178, 180,
182, 184, 186, 188, 190, 192, 194, 196,
198, 200, 202, 204, 206, 208, 210, 212,
214, 216, 218, 220, 222, 224, 226, 228,
230, 232, 234, 236, 238, 240, 242, 244,
245, 246, 247, 248, 249, 250, 251, 255,
260, 265, 270, 275, 279, 283, 285, 286,
287, 288, 289, 290, 291, 292, 293, 294,
295, 296, 297, 298, 299, 300, 301, 306,
313, 318, 322, 328, 331, 333, 339, 354,
356, 358, 360, 362, 366, 368, 370, 372,
374, 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, 448, 449, 462,
465, 467, 469, 471, 473, 475, 477, 479,
481, 485, 487, 489, 491, 493, 496, 498,
500, 502, 505, 507, 509, 511, 513, 515,
517, 519, 521, 523, 525, 527, 529, 531,
533, 535, 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, 589, 590, 591, 592,
593, 594, 604, 606, 608, 610, 612, 614,
616, 619, 622, 624, 626, 628, 631, 633,
635, 637, 639, 641, 643, 645, 647, 649,
651, 653, 655, 657, 659, 661, 663, 665,
667, 669, 671, 673, 675, 677, 679, 681,
683, 685, 687, 689, 691, 693, 694, 695,
696, 697, 698, 699, 700, 701, 702, 703,
704, 705, 706, 707, 708, 715, 717, 719,
721, 723, 725, 727, 728, 729
];
const _lexer_trans_keys = [
-28, -27, -25, -24, -23, 10, 32, 34,
35, 37, 42, 64, 124, 239, 9, 13,
-72, -67, -66, -90, -28, -72, -108, 10,
10, 13, -28, -27, -25, -24, -23, 10,
32, 34, 35, 37, 42, 64, 124, 9,
13, -127, -118, -96, -121, -24, -88, -83,
-121, -97, -26, -100, -84, -27, 58, -92,
-89, -25, -74, -79, 58, 10, 10, -28,
-27, -25, -24, -23, 10, 32, 35, 37,
42, 64, 9, 13, -72, -67, 10, -90,
10, -28, 10, -72, 10, -108, 10, -28,
-27, -25, -24, -23, 10, 32, 34, 35,
37, 42, 64, 124, 9, 13, -107, -74,
-128, -125, -116, -116, -26, -103, -81, 58,
10, 10, -28, -27, -25, -24, -23, 10,
32, 35, 37, 42, 64, 9, 13, -72,
-67, 10, -90, 10, -28, 10, -72, 10,
-108, 10, -122, 10, -26, 10, -104, 10,
-81, 10, -127, -118, -96, 10, -121, 10,
-24, 10, -88, 10, -83, 10, -121, -97,
10, -26, 10, -100, 10, -84, 10, -27,
10, 58, -92, 10, -89, 10, -25, 10,
-74, 10, -79, 10, 10, 58, -24, 10,
-125, 10, -67, 10, -76, 10, -26, 10,
-103, 10, -81, 10, -107, 10, -74, 10,
-128, 10, -116, 10, -126, 10, -93, 10,
-23, 10, -70, 10, -68, 10, 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, -126, -93, -23, -70,
-68, 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, 13, 32, 64,
9, 10, 9, 10, 13, 32, 64, 11,
12, 10, 32, 64, 9, 13, 32, 124,
9, 13, 10, 32, 92, 124, 9, 13,
10, 92, 124, 10, 92, 10, 32, 92,
124, 9, 13, -28, -27, -25, -24, -23,
10, 32, 34, 35, 37, 42, 64, 124,
9, 13, -122, 10, -26, 10, -104, 10,
-81, 10, -127, -118, -96, 10, -121, 10,
-24, 10, -88, 10, -83, 10, -121, -97,
10, -26, 10, -100, 10, -84, 10, 10,
58, -24, 10, -125, 10, -67, 10, -76,
10, -26, 10, -103, 10, -81, 10, -107,
10, -74, 10, -128, 10, -116, 10, -126,
10, -93, 10, -23, 10, -70, 10, -68,
10, 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,
10, -28, -27, -25, -24, -23, 10, 32,
35, 37, 42, 64, 9, 13, -72, -67,
10, -90, 10, -28, 10, -72, 10, -108,
10, -122, 10, -26, 10, -104, 10, -81,
10, -127, -118, -96, 10, -121, 10, -24,
10, -88, 10, -83, 10, -121, -97, 10,
-26, 10, -100, 10, -84, 10, -27, 10,
58, -92, 10, -89, 10, -25, 10, -74,
10, -79, 10, 10, 58, -24, 10, -125,
10, -67, 10, -76, 10, -26, 10, -103,
10, -81, 10, -107, 10, -74, 10, -128,
-125, 10, -116, 10, -116, 10, -26, 10,
-103, 10, -81, 10, -126, 10, -93, 10,
-23, 10, -70, 10, -68, 10, 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, -24, -125, -67, 58,
10, 10, -28, -27, -24, 10, 32, 35,
37, 64, 9, 13, -66, 10, -117, 10,
-27, 10, -83, 10, -112, 10, 10, 58,
-118, -96, 10, -121, -97, 10, -26, 10,
-100, 10, -84, 10, -27, 10, 58, -92,
10, -89, 10, -25, 10, -74, 10, -79,
10, -24, 10, -125, 10, -67, 10, -76,
10, -26, 10, -103, 10, -81, 10, -125,
10, -116, 10, -26, 10, -103, 10, -81,
10, 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, -76, -26, -103,
-81, -122, -26, -104, -81, -117, -27, -83,
-112, 58, 10, 10, -27, 10, 32, 35,
124, 9, 13, -118, 10, -97, 10, -24,
10, -125, 10, -67, 10, 10, 58, 187,
191, 0
];
const _lexer_single_lengths = [
0, 14, 3, 1, 1, 1, 1, 1,
2, 13, 3, 1, 1, 1, 1, 2,
1, 1, 1, 2, 1, 1, 1, 1,
1, 1, 1, 1, 11, 3, 2, 2,
2, 2, 13, 1, 1, 2, 1, 1,
1, 1, 1, 1, 1, 1, 11, 3,
2, 2, 2, 2, 2, 2, 2, 2,
4, 2, 2, 2, 2, 3, 2, 2,
2, 3, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2,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0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 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, 1, 1,
1, 1, 1, 0, 0, 1, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 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, 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, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0
];
const _lexer_index_offsets = [
0, 0, 16, 20, 22, 24, 26, 28,
30, 33, 48, 52, 54, 56, 58, 60,
63, 65, 67, 69, 72, 74, 76, 78,
80, 82, 84, 86, 88, 101, 105, 108,
111, 114, 117, 132, 134, 136, 139, 141,
143, 145, 147, 149, 151, 153, 155, 168,
172, 175, 178, 181, 184, 187, 190, 193,
196, 201, 204, 207, 210, 213, 217, 220,
223, 226, 230, 233, 236, 239, 242, 245,
248, 251, 254, 257, 260, 263, 266, 269,
272, 275, 278, 281, 284, 287, 290, 293,
296, 299, 302, 305, 308, 311, 314, 317,
320, 323, 326, 329, 332, 335, 338, 341,
343, 345, 347, 349, 351, 353, 355, 359,
364, 369, 374, 379, 383, 387, 390, 392,
394, 396, 398, 400, 402, 404, 406, 408,
410, 412, 414, 416, 418, 420, 422, 427,
434, 439, 443, 449, 453, 456, 462, 477,
480, 483, 486, 489, 494, 497, 500, 503,
506, 510, 513, 516, 519, 522, 525, 528,
531, 534, 537, 540, 543, 546, 549, 552,
555, 558, 561, 564, 567, 570, 573, 576,
579, 582, 585, 588, 591, 594, 597, 600,
603, 606, 609, 612, 615, 617, 619, 632,
636, 639, 642, 645, 648, 651, 654, 657,
660, 665, 668, 671, 674, 677, 681, 684,
687, 690, 694, 697, 700, 703, 706, 709,
712, 715, 718, 721, 724, 727, 730, 733,
736, 739, 743, 746, 749, 752, 755, 758,
761, 764, 767, 770, 773, 776, 779, 782,
785, 788, 791, 794, 797, 800, 803, 806,
809, 812, 815, 818, 820, 822, 824, 826,
828, 830, 840, 843, 846, 849, 852, 855,
858, 862, 866, 869, 872, 875, 879, 882,
885, 888, 891, 894, 897, 900, 903, 906,
909, 912, 915, 918, 921, 924, 927, 930,
933, 936, 939, 942, 945, 948, 951, 954,
957, 960, 963, 966, 969, 972, 974, 976,
978, 980, 982, 984, 986, 988, 990, 992,
994, 996, 998, 1000, 1002, 1009, 1012, 1015,
1018, 1021, 1024, 1027, 1029, 1031
];
const _lexer_indicies = [
1, 2, 3, 4, 5, 7, 6, 8,
9, 10, 11, 12, 13, 14, 6, 0,
15, 16, 17, 0, 18, 0, 19, 0,
20, 0, 21, 0, 0, 22, 24, 25,
23, 1, 2, 3, 4, 5, 7, 6,
8, 9, 10, 11, 12, 13, 6, 0,
26, 27, 28, 0, 29, 0, 30, 0,
31, 0, 21, 0, 32, 33, 0, 34,
0, 35, 0, 36, 0, 37, 38, 0,
39, 0, 40, 0, 41, 0, 42, 0,
43, 0, 44, 0, 46, 45, 48, 47,
49, 50, 51, 52, 53, 48, 54, 55,
56, 57, 55, 54, 47, 58, 59, 48,
47, 60, 48, 47, 61, 48, 47, 62,
48, 47, 63, 48, 47, 64, 65, 66,
67, 68, 70, 69, 71, 72, 73, 74,
75, 76, 69, 0, 77, 0, 21, 0,
78, 79, 0, 18, 0, 80, 0, 81,
0, 82, 0, 83, 0, 84, 0, 86,
85, 88, 87, 89, 90, 91, 92, 93,
88, 94, 95, 96, 97, 95, 94, 87,
98, 99, 88, 87, 100, 88, 87, 101,
88, 87, 102, 88, 87, 103, 88, 87,
104, 88, 87, 105, 88, 87, 106, 88,
87, 103, 88, 87, 107, 108, 109, 88,
87, 110, 88, 87, 111, 88, 87, 112,
88, 87, 103, 88, 87, 113, 114, 88,
87, 115, 88, 87, 116, 88, 87, 117,
88, 87, 118, 88, 103, 87, 119, 88,
87, 120, 88, 87, 121, 88, 87, 122,
88, 87, 123, 88, 87, 88, 103, 87,
124, 88, 87, 125, 88, 87, 123, 88,
87, 126, 88, 87, 127, 88, 87, 128,
88, 87, 117, 88, 87, 129, 88, 87,
103, 88, 87, 130, 88, 87, 100, 88,
87, 131, 88, 87, 132, 88, 87, 133,
88, 87, 134, 88, 87, 103, 88, 87,
88, 135, 87, 88, 136, 87, 88, 137,
87, 88, 138, 87, 88, 139, 87, 88,
140, 87, 88, 141, 87, 88, 142, 87,
88, 143, 87, 88, 144, 87, 88, 145,
87, 88, 146, 87, 88, 147, 87, 88,
148, 87, 88, 103, 87, 149, 0, 150,
0, 151, 0, 152, 0, 21, 0, 153,
0, 154, 0, 155, 154, 154, 0, 158,
157, 159, 157, 156, 162, 161, 163, 161,
160, 162, 161, 164, 161, 160, 162, 161,
165, 161, 160, 167, 166, 166, 0, 7,
168, 168, 0, 170, 171, 169, 7, 0,
172, 0, 173, 0, 174, 0, 175, 0,
176, 0, 177, 0, 178, 0, 179, 0,
180, 0, 181, 0, 182, 0, 183, 0,
184, 0, 185, 0, 21, 0, 0, 0,
0, 0, 186, 187, 188, 187, 187, 190,
189, 186, 7, 191, 12, 191, 0, 192,
193, 192, 0, 196, 195, 197, 198, 195,
194, 0, 200, 201, 199, 0, 200, 199,
196, 202, 200, 201, 202, 199, 203, 204,
205, 206, 207, 196, 208, 209, 210, 211,
212, 213, 214, 208, 0, 215, 48, 47,
216, 48, 47, 217, 48, 47, 63, 48,
47, 218, 219, 220, 48, 47, 221, 48,
47, 222, 48, 47, 223, 48, 47, 63,
48, 47, 224, 225, 48, 47, 226, 48,
47, 227, 48, 47, 228, 48, 47, 48,
63, 47, 229, 48, 47, 230, 48, 47,
228, 48, 47, 231, 48, 47, 232, 48,
47, 233, 48, 47, 228, 48, 47, 234,
48, 47, 63, 48, 47, 235, 48, 47,
60, 48, 47, 236, 48, 47, 237, 48,
47, 238, 48, 47, 239, 48, 47, 63,
48, 47, 48, 240, 47, 48, 241, 47,
48, 242, 47, 48, 243, 47, 48, 244,
47, 48, 245, 47, 48, 246, 47, 48,
247, 47, 48, 248, 47, 48, 249, 47,
48, 250, 47, 48, 251, 47, 48, 252,
47, 48, 253, 47, 48, 63, 47, 255,
254, 257, 256, 258, 259, 260, 261, 262,
257, 263, 264, 265, 266, 264, 263, 256,
267, 268, 257, 256, 269, 257, 256, 270,
257, 256, 271, 257, 256, 272, 257, 256,
273, 257, 256, 274, 257, 256, 275, 257,
256, 272, 257, 256, 276, 277, 278, 257,
256, 279, 257, 256, 280, 257, 256, 281,
257, 256, 272, 257, 256, 282, 283, 257,
256, 284, 257, 256, 285, 257, 256, 286,
257, 256, 287, 257, 272, 256, 288, 257,
256, 289, 257, 256, 290, 257, 256, 291,
257, 256, 292, 257, 256, 257, 272, 256,
293, 257, 256, 294, 257, 256, 292, 257,
256, 295, 257, 256, 296, 257, 256, 297,
257, 256, 286, 257, 256, 298, 257, 256,
272, 257, 256, 299, 300, 257, 256, 269,
257, 256, 301, 257, 256, 302, 257, 256,
303, 257, 256, 292, 257, 256, 304, 257,
256, 305, 257, 256, 306, 257, 256, 307,
257, 256, 272, 257, 256, 257, 308, 256,
257, 309, 256, 257, 310, 256, 257, 311,
256, 257, 312, 256, 257, 313, 256, 257,
314, 256, 257, 315, 256, 257, 316, 256,
257, 317, 256, 257, 318, 256, 257, 319,
256, 257, 320, 256, 257, 321, 256, 257,
272, 256, 322, 0, 323, 0, 324, 0,
325, 0, 327, 326, 329, 328, 330, 331,
332, 329, 333, 334, 335, 334, 333, 328,
336, 329, 328, 337, 329, 328, 338, 329,
328, 339, 329, 328, 340, 329, 328, 329,
341, 328, 342, 343, 329, 328, 344, 345,
329, 328, 346, 329, 328, 347, 329, 328,
348, 329, 328, 349, 329, 341, 328, 350,
329, 328, 351, 329, 328, 352, 329, 328,
353, 329, 328, 340, 329, 328, 354, 329,
328, 355, 329, 328, 340, 329, 328, 356,
329, 328, 357, 329, 328, 358, 329, 328,
348, 329, 328, 359, 329, 328, 360, 329,
328, 361, 329, 328, 362, 329, 328, 340,
329, 328, 329, 363, 328, 329, 364, 328,
329, 365, 328, 329, 366, 328, 329, 367,
328, 329, 368, 328, 329, 369, 328, 329,
370, 328, 329, 371, 328, 329, 372, 328,
329, 373, 328, 329, 374, 328, 329, 375,
328, 329, 376, 328, 377, 0, 378, 0,
379, 0, 36, 0, 380, 0, 381, 0,
382, 0, 21, 0, 383, 0, 384, 0,
385, 0, 386, 0, 387, 0, 389, 388,
391, 390, 392, 391, 393, 394, 394, 393,
390, 395, 391, 390, 396, 391, 390, 397,
391, 390, 398, 391, 390, 399, 391, 390,
391, 400, 390, 401, 0, 6, 0, 402,
0
];
const _lexer_trans_targs = [
0, 2, 10, 35, 37, 103, 9, 9,
108, 117, 119, 133, 134, 137, 323, 3,
305, 309, 4, 5, 6, 7, 8, 8,
9, 118, 11, 15, 301, 12, 13, 14,
16, 251, 17, 18, 19, 20, 188, 21,
22, 23, 24, 25, 26, 27, 28, 27,
28, 29, 147, 164, 166, 168, 28, 9,
173, 187, 30, 143, 31, 32, 33, 34,
2, 10, 35, 37, 103, 9, 9, 108,
117, 119, 133, 134, 137, 36, 38, 39,
40, 41, 42, 43, 44, 45, 46, 45,
46, 47, 56, 79, 81, 83, 46, 9,
88, 102, 48, 52, 49, 50, 51, 34,
53, 54, 55, 57, 61, 75, 58, 59,
60, 62, 72, 63, 64, 65, 66, 67,
68, 69, 70, 71, 73, 74, 76, 77,
78, 80, 82, 84, 85, 86, 87, 89,
90, 91, 92, 93, 94, 95, 96, 97,
98, 99, 100, 101, 9, 104, 105, 106,
107, 109, 110, 111, 112, 112, 112, 113,
112, 112, 112, 113, 114, 115, 116, 9,
116, 117, 9, 118, 120, 121, 122, 123,
124, 125, 126, 127, 128, 129, 130, 131,
132, 325, 135, 136, 9, 135, 134, 136,
137, 138, 139, 141, 142, 140, 138, 139,
140, 138, 141, 2, 10, 35, 37, 103,
142, 108, 117, 119, 133, 134, 137, 144,
145, 146, 148, 152, 160, 149, 150, 151,
153, 157, 154, 155, 156, 158, 159, 161,
162, 163, 165, 167, 169, 170, 171, 172,
174, 175, 176, 177, 178, 179, 180, 181,
182, 183, 184, 185, 186, 9, 189, 190,
189, 190, 191, 200, 223, 225, 231, 190,
9, 236, 250, 192, 196, 193, 194, 195,
34, 197, 198, 199, 201, 205, 219, 202,
203, 204, 206, 216, 207, 208, 209, 210,
211, 212, 213, 214, 215, 217, 218, 220,
221, 222, 224, 226, 227, 228, 229, 230,
232, 233, 234, 235, 237, 238, 239, 240,
241, 242, 243, 244, 245, 246, 247, 248,
249, 9, 252, 253, 254, 255, 256, 257,
256, 257, 258, 264, 282, 257, 9, 287,
259, 260, 261, 262, 263, 34, 265, 278,
266, 275, 267, 268, 269, 270, 271, 272,
273, 274, 276, 277, 279, 280, 281, 283,
284, 285, 286, 288, 289, 290, 291, 292,
293, 294, 295, 296, 297, 298, 299, 300,
9, 302, 303, 304, 306, 307, 308, 310,
311, 312, 313, 314, 315, 316, 315, 316,
317, 316, 9, 318, 319, 320, 321, 322,
34, 324, 0
];
const _lexer_trans_actions = [
39, 25, 25, 25, 25, 25, 0, 47,
3, 1, 0, 25, 1, 31, 0, 0,
0, 0, 0, 0, 0, 0, 50, 0,
99, 19, 0, 0, 0, 0, 0, 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, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 50, 124, 0, 47,
77, 0, 74, 0, 0, 0, 0, 0,
17, 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
];
const lexer_start = 1;
const lexer_first_final = 325;
const lexer_error = 0;
const lexer_en_main = 1;
/* line 120 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.js.rl" */
/* line 121 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.js.rl" */
/* line 122 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.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 631 "js/lib/gherkin/lexer/zh_tw.js" */
{
this.cs = lexer_start;
} /* JSCodeGen::writeInit */
/* line 153 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.js.rl" */
/* line 638 "js/lib/gherkin/lexer/zh_tw.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/zh_tw.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/zh_tw.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/zh_tw.js.rl" */
this.content_start = p;
break;
case 3:
/* line 21 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.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/zh_tw.js.rl" */
p = this.store_keyword_content('feature', data, p, eof);
break;
case 5:
/* line 33 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.js.rl" */
p = this.store_keyword_content('background', data, p, eof);
break;
case 6:
/* line 37 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.js.rl" */
p = this.store_keyword_content('scenario', data, p, eof);
break;
case 7:
/* line 41 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.js.rl" */
p = this.store_keyword_content('scenario_outline', data, p, eof);
break;
case 8:
/* line 45 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.js.rl" */
p = this.store_keyword_content('examples', data, p, eof);
break;
case 9:
/* line 49 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.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/zh_tw.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/zh_tw.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/zh_tw.js.rl" */
this.line_number++;
break;
case 13:
/* line 70 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.js.rl" */
this.last_newline = p + 1;
break;
case 14:
/* line 74 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.js.rl" */
this.keyword_start = this.keyword_start || p;
break;
case 15:
/* line 78 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.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/zh_tw.js.rl" */
this.next_keyword_start = p;
break;
case 17:
/* line 87 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.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/zh_tw.js.rl" */
this.content_start = p;
break;
case 19:
/* line 97 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.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/zh_tw.js.rl" */
this.listener.row(current_row, this.current_line);
break;
case 21:
/* line 106 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.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 854 "js/lib/gherkin/lexer/zh_tw.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/zh_tw.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 893 "js/lib/gherkin/lexer/zh_tw.js" */
} /* eof action switch */
}
if (_trigger_goto) {
continue;
}
}
}
if (_goto_level <= _out) {
break;
}
}
}
/* line 154 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.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/zh_tw', [], function() {return Lexer});
}
})();