// line 1 "ragel/i18n/zh_tw.java.rl"
package gherkin.lexer;
import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.ArrayList;
import java.util.regex.Pattern;
import gherkin.lexer.Lexer;
import gherkin.lexer.Listener;
import gherkin.lexer.LexingError;
public class Zh_tw implements Lexer {
// line 150 "ragel/i18n/zh_tw.java.rl"
private final Listener listener;
public Zh_tw(Listener listener) {
this.listener = listener;
}
// line 26 "java/src/main/java/gherkin/lexer/Zh_tw.java"
private static byte[] init__lexer_actions_0()
{
return new byte [] {
0, 1, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1,
5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1,
11, 1, 12, 1, 13, 1, 16, 1, 17, 1, 18, 1,
19, 1, 20, 1, 21, 1, 22, 1, 23, 2, 2, 18,
2, 3, 4, 2, 13, 0, 2, 14, 15, 2, 17, 0,
2, 17, 1, 2, 17, 16, 2, 17, 19, 2, 18, 6,
2, 18, 7, 2, 18, 8, 2, 18, 9, 2, 18, 10,
2, 18, 16, 2, 20, 21, 2, 22, 0, 2, 22, 1,
2, 22, 16, 2, 22, 19, 3, 4, 14, 15, 3, 5,
14, 15, 3, 11, 14, 15, 3, 12, 14, 15, 3, 13,
14, 15, 3, 14, 15, 18, 3, 17, 0, 11, 3, 17,
14, 15, 4, 2, 14, 15, 18, 4, 3, 4, 14, 15,
4, 17, 0, 14, 15, 5, 17, 0, 11, 14, 15
};
}
private static final byte _lexer_actions[] = init__lexer_actions_0();
private static short[] init__lexer_key_offsets_0()
{
return new short [] {
0, 0, 16, 19, 20, 21, 22, 23, 25, 27, 42, 46,
47, 49, 51, 52, 53, 54, 55, 57, 58, 59, 60, 62,
63, 64, 65, 66, 67, 68, 69, 70, 83, 86, 88, 90,
92, 94, 109, 110, 111, 113, 114, 115, 116, 117, 118, 119,
120, 121, 134, 137, 139, 141, 143, 145, 147, 149, 151, 153,
158, 160, 163, 166, 168, 170, 172, 174, 177, 179, 181, 183,
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, 246, 248, 250, 252, 254, 256,
258, 260, 262, 264, 266, 267, 268, 269, 270, 271, 272, 273,
275, 277, 282, 287, 292, 297, 301, 305, 307, 308, 309, 310,
311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
323, 328, 335, 340, 344, 350, 353, 355, 361, 376, 378, 380,
382, 384, 389, 391, 394, 397, 399, 401, 403, 405, 408, 410,
412, 414, 416, 418, 420, 422, 424, 426, 428, 430, 432, 434,
436, 438, 440, 442, 444, 446, 448, 450, 452, 454, 456, 458,
460, 462, 464, 466, 468, 470, 472, 474, 476, 478, 480, 482,
484, 485, 486, 499, 502, 504, 506, 508, 510, 512, 514, 516,
518, 523, 525, 528, 531, 533, 535, 537, 539, 542, 544, 546,
548, 551, 553, 555, 557, 559, 561, 563, 565, 567, 569, 571,
573, 575, 577, 579, 581, 583, 585, 587, 590, 592, 594, 596,
598, 600, 602, 604, 606, 608, 610, 612, 614, 616, 618, 620,
622, 624, 626, 628, 630, 632, 634, 636, 638, 640, 641, 642,
643, 644, 645, 646, 656, 658, 660, 662, 664, 666, 668, 671,
674, 676, 678, 680, 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,
746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757,
758, 759, 760, 761, 762, 763, 770, 772, 774, 776, 778, 780,
782, 783, 784
};
}
private static final short _lexer_key_offsets[] = init__lexer_key_offsets_0();
private static byte[] init__lexer_trans_keys_0()
{
return new byte [] {
-28, -27, -25, -24, -23, -17, 10, 32, 34, 35, 37, 42,
64, 124, 9, 13, -72, -67, -66, -90, -28, -72, -108, 10,
13, 10, 13, -28, -27, -25, -24, -23, 10, 32, 34, 35,
37, 42, 64, 124, 9, 13, -127, -118, -112, -96, -121, -27,
-24, -90, -82, -126, -102, -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, -112,
-96, 10, -121, 10, -27, -24, 10, -90, -82, 10, -126, 10,
-102, 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,
-116, 10, -26, 10, -103, 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, 13, 10,
13, 10, 32, 34, 9, 13, 10, 32, 34, 9, 13, 10,
32, 34, 9, 13, 10, 32, 34, 9, 13, 10, 32, 9,
13, 10, 32, 9, 13, 10, 13, 10, 95, 70, 69, 65,
84, 85, 82, 69, 95, 69, 78, 68, 95, 37, 32, 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, -112, -96, 10, -121, 10, -27, -24, 10, -90, -82,
10, -126, 10, -102, 10, -88, 10, -83, 10, -121, -97, 10,
-26, 10, -100, 10, -84, 10, 10, 58, -24, 10, -125, 10,
-67, 10, -116, 10, -26, 10, -103, 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, -112, -96, 10, -121, 10, -27, -24, 10,
-90, -82, 10, -126, 10, -102, 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, -116, 10, -26, 10, -103, 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, -116, -26, -103, -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, -69, -65, 0
};
}
private static final byte _lexer_trans_keys[] = init__lexer_trans_keys_0();
private static byte[] init__lexer_single_lengths_0()
{
return new byte [] {
0, 14, 3, 1, 1, 1, 1, 2, 2, 13, 4, 1,
2, 2, 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, 5,
2, 3, 3, 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, 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, 2,
2, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3, 5, 3, 2, 4, 3, 2, 4, 13, 2, 2, 2,
2, 5, 2, 3, 3, 2, 2, 2, 2, 3, 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, 11, 3, 2, 2, 2, 2, 2, 2, 2, 2,
5, 2, 3, 3, 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, 3, 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, 8, 2, 2, 2, 2, 2, 2, 3, 3,
2, 2, 2, 3, 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,
1, 1, 1, 1, 1, 5, 2, 2, 2, 2, 2, 2,
1, 1, 0
};
}
private static final byte _lexer_single_lengths[] = init__lexer_single_lengths_0();
private static byte[] init__lexer_range_lengths_0()
{
return new byte [] {
0, 1, 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, 1, 0, 0, 0, 0,
0, 1, 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, 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, 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, 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, 0, 0, 0, 0, 0, 0,
0, 0, 0
};
}
private static final byte _lexer_range_lengths[] = init__lexer_range_lengths_0();
private static short[] init__lexer_index_offsets_0()
{
return new short [] {
0, 0, 16, 20, 22, 24, 26, 28, 31, 34, 49, 54,
56, 59, 62, 64, 66, 68, 70, 73, 75, 77, 79, 82,
84, 86, 88, 90, 92, 94, 96, 98, 111, 115, 118, 121,
124, 127, 142, 144, 146, 149, 151, 153, 155, 157, 159, 161,
163, 165, 178, 182, 185, 188, 191, 194, 197, 200, 203, 206,
212, 215, 219, 223, 226, 229, 232, 235, 239, 242, 245, 248,
252, 255, 258, 261, 264, 267, 270, 273, 276, 279, 282, 285,
288, 291, 294, 297, 300, 303, 306, 309, 312, 315, 318, 321,
324, 327, 330, 333, 336, 339, 342, 345, 348, 351, 354, 357,
360, 363, 366, 369, 372, 374, 376, 378, 380, 382, 384, 386,
389, 392, 397, 402, 407, 412, 416, 420, 423, 425, 427, 429,
431, 433, 435, 437, 439, 441, 443, 445, 447, 449, 451, 453,
455, 460, 467, 472, 476, 482, 486, 489, 495, 510, 513, 516,
519, 522, 528, 531, 535, 539, 542, 545, 548, 551, 555, 558,
561, 564, 567, 570, 573, 576, 579, 582, 585, 588, 591, 594,
597, 600, 603, 606, 609, 612, 615, 618, 621, 624, 627, 630,
633, 636, 639, 642, 645, 648, 651, 654, 657, 660, 663, 666,
669, 671, 673, 686, 690, 693, 696, 699, 702, 705, 708, 711,
714, 720, 723, 727, 731, 734, 737, 740, 743, 747, 750, 753,
756, 760, 763, 766, 769, 772, 775, 778, 781, 784, 787, 790,
793, 796, 799, 802, 805, 808, 811, 814, 818, 821, 824, 827,
830, 833, 836, 839, 842, 845, 848, 851, 854, 857, 860, 863,
866, 869, 872, 875, 878, 881, 884, 887, 890, 893, 895, 897,
899, 901, 903, 905, 915, 918, 921, 924, 927, 930, 933, 937,
941, 944, 947, 950, 954, 957, 960, 963, 966, 969, 972, 975,
978, 981, 984, 987, 990, 993, 996, 999, 1002, 1005, 1008, 1011,
1014, 1017, 1020, 1023, 1026, 1029, 1032, 1035, 1038, 1041, 1044, 1047,
1049, 1051, 1053, 1055, 1057, 1059, 1061, 1063, 1065, 1067, 1069, 1071,
1073, 1075, 1077, 1079, 1081, 1083, 1090, 1093, 1096, 1099, 1102, 1105,
1108, 1110, 1112
};
}
private static final short _lexer_index_offsets[] = init__lexer_index_offsets_0();
private static short[] init__lexer_indicies_0()
{
return new short [] {
1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 11, 12,
13, 14, 7, 0, 15, 16, 17, 0, 18, 0, 19, 0,
20, 0, 21, 0, 23, 24, 22, 26, 27, 25, 1, 2,
3, 4, 5, 8, 7, 9, 10, 11, 12, 13, 14, 7,
0, 28, 29, 30, 31, 0, 32, 0, 33, 34, 0, 35,
36, 0, 21, 0, 21, 0, 37, 0, 21, 0, 38, 39,
0, 40, 0, 41, 0, 42, 0, 43, 44, 0, 45, 0,
46, 0, 47, 0, 48, 0, 49, 0, 50, 0, 52, 51,
54, 53, 55, 56, 57, 58, 59, 54, 60, 61, 62, 63,
61, 60, 53, 64, 65, 54, 53, 66, 54, 53, 67, 54,
53, 68, 54, 53, 69, 54, 53, 70, 71, 72, 73, 74,
76, 75, 77, 78, 79, 80, 81, 82, 75, 0, 83, 0,
21, 0, 84, 85, 0, 18, 0, 86, 0, 87, 0, 88,
0, 89, 0, 90, 0, 92, 91, 94, 93, 95, 96, 97,
98, 99, 94, 100, 101, 102, 103, 101, 100, 93, 104, 105,
94, 93, 106, 94, 93, 107, 94, 93, 108, 94, 93, 109,
94, 93, 110, 94, 93, 111, 94, 93, 112, 94, 93, 109,
94, 93, 113, 114, 115, 116, 94, 93, 117, 94, 93, 118,
119, 94, 93, 120, 121, 94, 93, 109, 94, 93, 109, 94,
93, 122, 94, 93, 109, 94, 93, 123, 124, 94, 93, 125,
94, 93, 126, 94, 93, 127, 94, 93, 128, 94, 109, 93,
129, 94, 93, 130, 94, 93, 131, 94, 93, 132, 94, 93,
133, 94, 93, 94, 109, 93, 134, 94, 93, 135, 94, 93,
133, 94, 93, 136, 94, 93, 137, 94, 93, 120, 94, 93,
138, 94, 93, 139, 94, 93, 140, 94, 93, 127, 94, 93,
141, 94, 93, 109, 94, 93, 142, 94, 93, 106, 94, 93,
143, 94, 93, 144, 94, 93, 145, 94, 93, 146, 94, 93,
109, 94, 93, 94, 147, 93, 94, 148, 93, 94, 149, 93,
94, 150, 93, 94, 151, 93, 94, 152, 93, 94, 153, 93,
94, 154, 93, 94, 155, 93, 94, 156, 93, 94, 157, 93,
94, 158, 93, 94, 159, 93, 94, 160, 93, 94, 109, 93,
161, 0, 162, 0, 163, 0, 164, 0, 21, 0, 165, 0,
166, 0, 168, 169, 167, 171, 172, 170, 175, 174, 176, 174,
173, 179, 178, 180, 178, 177, 179, 178, 181, 178, 177, 179,
178, 182, 178, 177, 184, 183, 183, 0, 8, 185, 185, 0,
187, 188, 186, 8, 0, 189, 0, 190, 0, 191, 0, 192,
0, 193, 0, 194, 0, 195, 0, 196, 0, 197, 0, 198,
0, 199, 0, 200, 0, 201, 0, 202, 0, 21, 0, 0,
0, 0, 0, 203, 204, 205, 204, 204, 207, 206, 203, 8,
208, 13, 208, 0, 209, 210, 209, 0, 213, 212, 214, 215,
212, 211, 0, 217, 218, 216, 0, 217, 216, 213, 219, 217,
218, 219, 216, 220, 221, 222, 223, 224, 213, 225, 226, 227,
228, 229, 230, 231, 225, 0, 232, 54, 53, 233, 54, 53,
234, 54, 53, 69, 54, 53, 235, 236, 237, 238, 54, 53,
239, 54, 53, 240, 241, 54, 53, 242, 243, 54, 53, 69,
54, 53, 69, 54, 53, 244, 54, 53, 69, 54, 53, 245,
246, 54, 53, 247, 54, 53, 248, 54, 53, 249, 54, 53,
54, 69, 53, 250, 54, 53, 251, 54, 53, 249, 54, 53,
252, 54, 53, 253, 54, 53, 242, 54, 53, 254, 54, 53,
255, 54, 53, 256, 54, 53, 249, 54, 53, 257, 54, 53,
69, 54, 53, 258, 54, 53, 66, 54, 53, 259, 54, 53,
260, 54, 53, 261, 54, 53, 262, 54, 53, 69, 54, 53,
54, 263, 53, 54, 264, 53, 54, 265, 53, 54, 266, 53,
54, 267, 53, 54, 268, 53, 54, 269, 53, 54, 270, 53,
54, 271, 53, 54, 272, 53, 54, 273, 53, 54, 274, 53,
54, 275, 53, 54, 276, 53, 54, 69, 53, 278, 277, 280,
279, 281, 282, 283, 284, 285, 280, 286, 287, 288, 289, 287,
286, 279, 290, 291, 280, 279, 292, 280, 279, 293, 280, 279,
294, 280, 279, 295, 280, 279, 296, 280, 279, 297, 280, 279,
298, 280, 279, 295, 280, 279, 299, 300, 301, 302, 280, 279,
303, 280, 279, 304, 305, 280, 279, 306, 307, 280, 279, 295,
280, 279, 295, 280, 279, 308, 280, 279, 295, 280, 279, 309,
310, 280, 279, 311, 280, 279, 312, 280, 279, 313, 280, 279,
314, 280, 295, 279, 315, 280, 279, 316, 280, 279, 317, 280,
279, 318, 280, 279, 319, 280, 279, 280, 295, 279, 320, 280,
279, 321, 280, 279, 319, 280, 279, 322, 280, 279, 323, 280,
279, 306, 280, 279, 324, 280, 279, 325, 280, 279, 326, 280,
279, 313, 280, 279, 327, 280, 279, 295, 280, 279, 328, 329,
280, 279, 292, 280, 279, 330, 280, 279, 331, 280, 279, 332,
280, 279, 319, 280, 279, 333, 280, 279, 334, 280, 279, 335,
280, 279, 336, 280, 279, 295, 280, 279, 280, 337, 279, 280,
338, 279, 280, 339, 279, 280, 340, 279, 280, 341, 279, 280,
342, 279, 280, 343, 279, 280, 344, 279, 280, 345, 279, 280,
346, 279, 280, 347, 279, 280, 348, 279, 280, 349, 279, 280,
350, 279, 280, 295, 279, 351, 0, 352, 0, 353, 0, 354,
0, 356, 355, 358, 357, 359, 360, 361, 358, 362, 363, 364,
363, 362, 357, 365, 358, 357, 366, 358, 357, 367, 358, 357,
368, 358, 357, 369, 358, 357, 358, 370, 357, 371, 372, 358,
357, 373, 374, 358, 357, 375, 358, 357, 376, 358, 357, 377,
358, 357, 378, 358, 370, 357, 379, 358, 357, 380, 358, 357,
381, 358, 357, 382, 358, 357, 369, 358, 357, 383, 358, 357,
384, 358, 357, 369, 358, 357, 385, 358, 357, 386, 358, 357,
387, 358, 357, 377, 358, 357, 388, 358, 357, 389, 358, 357,
390, 358, 357, 391, 358, 357, 369, 358, 357, 358, 392, 357,
358, 393, 357, 358, 394, 357, 358, 395, 357, 358, 396, 357,
358, 397, 357, 358, 398, 357, 358, 399, 357, 358, 400, 357,
358, 401, 357, 358, 402, 357, 358, 403, 357, 358, 404, 357,
358, 405, 357, 406, 0, 407, 0, 35, 0, 408, 0, 409,
0, 410, 0, 42, 0, 411, 0, 412, 0, 413, 0, 21,
0, 414, 0, 415, 0, 416, 0, 417, 0, 418, 0, 420,
419, 422, 421, 423, 422, 424, 425, 425, 424, 421, 426, 422,
421, 427, 422, 421, 428, 422, 421, 429, 422, 421, 430, 422,
421, 422, 431, 421, 432, 0, 7, 0, 433, 0
};
}
private static final short _lexer_indicies[] = init__lexer_indicies_0();
private static short[] init__lexer_trans_targs_0()
{
return new short [] {
0, 2, 10, 38, 40, 112, 348, 9, 9, 117, 127, 129,
143, 144, 147, 3, 330, 334, 4, 5, 6, 7, 8, 9,
128, 8, 9, 128, 11, 18, 323, 326, 12, 13, 16, 14,
15, 17, 19, 273, 20, 21, 22, 23, 204, 24, 25, 26,
27, 28, 29, 30, 31, 30, 31, 32, 157, 180, 182, 184,
31, 9, 189, 203, 33, 153, 34, 35, 36, 37, 2, 10,
38, 40, 112, 9, 9, 117, 127, 129, 143, 144, 147, 39,
41, 42, 43, 44, 45, 46, 47, 48, 49, 48, 49, 50,
59, 88, 90, 92, 49, 9, 97, 111, 51, 55, 52, 53,
54, 37, 56, 57, 58, 60, 67, 81, 84, 61, 62, 65,
63, 64, 66, 68, 78, 69, 70, 71, 72, 73, 74, 75,
76, 77, 79, 80, 82, 83, 85, 86, 87, 89, 91, 93,
94, 95, 96, 98, 99, 100, 101, 102, 103, 104, 105, 106,
107, 108, 109, 110, 9, 113, 114, 115, 116, 118, 119, 120,
121, 120, 120, 121, 120, 122, 122, 122, 123, 122, 122, 122,
123, 124, 125, 126, 9, 126, 127, 9, 128, 130, 131, 132,
133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 350, 145,
146, 9, 145, 144, 146, 147, 148, 149, 151, 152, 150, 148,
149, 150, 148, 151, 2, 10, 38, 40, 112, 152, 117, 127,
129, 143, 144, 147, 154, 155, 156, 158, 165, 173, 176, 159,
160, 163, 161, 162, 164, 166, 170, 167, 168, 169, 171, 172,
174, 175, 177, 178, 179, 181, 183, 185, 186, 187, 188, 190,
191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
9, 205, 206, 205, 206, 207, 216, 245, 247, 253, 206, 9,
258, 272, 208, 212, 209, 210, 211, 37, 213, 214, 215, 217,
224, 238, 241, 218, 219, 222, 220, 221, 223, 225, 235, 226,
227, 228, 229, 230, 231, 232, 233, 234, 236, 237, 239, 240,
242, 243, 244, 246, 248, 249, 250, 251, 252, 254, 255, 256,
257, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
270, 271, 9, 274, 275, 276, 277, 278, 279, 278, 279, 280,
286, 304, 279, 9, 309, 281, 282, 283, 284, 285, 37, 287,
300, 288, 297, 289, 290, 291, 292, 293, 294, 295, 296, 298,
299, 301, 302, 303, 305, 306, 307, 308, 310, 311, 312, 313,
314, 315, 316, 317, 318, 319, 320, 321, 322, 9, 324, 325,
327, 328, 329, 331, 332, 333, 335, 336, 337, 338, 339, 340,
341, 340, 341, 342, 341, 9, 343, 344, 345, 346, 347, 37,
349, 0
};
}
private static final short _lexer_trans_targs[] = init__lexer_trans_targs_0();
private static short[] init__lexer_trans_actions_0()
{
return new short [] {
43, 29, 29, 29, 29, 29, 0, 0, 54, 3, 1, 0,
29, 1, 35, 0, 0, 0, 0, 0, 0, 0, 57, 149,
126, 0, 110, 23, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 57, 144, 0, 54, 84, 84, 84, 84, 84,
0, 78, 33, 84, 0, 0, 0, 0, 0, 19, 63, 63,
63, 63, 63, 31, 130, 60, 57, 31, 63, 57, 66, 0,
0, 0, 0, 0, 0, 0, 0, 57, 144, 0, 54, 84,
84, 84, 84, 84, 0, 72, 33, 84, 0, 0, 0, 0,
0, 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, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 7,
139, 48, 0, 102, 9, 5, 45, 134, 45, 0, 33, 122,
33, 33, 0, 11, 106, 0, 0, 114, 25, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
27, 118, 27, 51, 0, 0, 0, 37, 37, 54, 37, 87,
0, 0, 39, 0, 96, 96, 96, 96, 96, 0, 93, 90,
41, 96, 90, 99, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19, 57, 144, 0, 54, 84, 84, 84, 84, 84, 0, 75,
33, 84, 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, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 17, 0, 0, 0, 0, 57, 144, 0, 54, 84,
84, 84, 0, 69, 33, 0, 0, 0, 0, 0, 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, 13, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57,
144, 0, 54, 84, 0, 81, 0, 0, 0, 0, 0, 21,
0, 0
};
}
private static final short _lexer_trans_actions[] = init__lexer_trans_actions_0();
private static short[] init__lexer_eof_actions_0()
{
return new short [] {
0, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43
};
}
private static final short _lexer_eof_actions[] = init__lexer_eof_actions_0();
static final int lexer_start = 1;
static final int lexer_first_final = 350;
static final int lexer_en_main = 1;
// line 159 "ragel/i18n/zh_tw.java.rl"
public void scan(String source) {
String input = source + "\n%_FEATURE_END_%";
byte[] data = null;
try {
data = input.getBytes("UTF-8");
} catch(UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
int cs, p = 0, pe = data.length;
int eof = pe;
int lineNumber = 1;
int lastNewline = 0;
int contentStart = -1;
int currentLine = -1;
int docstringContentTypeStart = -1;
int docstringContentTypeEnd = -1;
int startCol = -1;
int nextKeywordStart = -1;
int keywordStart = -1;
String keyword = null;
List<String> currentRow = null;
// line 546 "java/src/main/java/gherkin/lexer/Zh_tw.java"
{
cs = lexer_start;
}
// line 185 "ragel/i18n/zh_tw.java.rl"
// line 553 "java/src/main/java/gherkin/lexer/Zh_tw.java"
{
int _klen;
int _trans = 0;
int _acts;
int _nacts;
int _keys;
int _goto_targ = 0;
_goto: while (true) {
switch ( _goto_targ ) {
case 0:
if ( p == pe ) {
_goto_targ = 4;
continue _goto;
}
if ( cs == 0 ) {
_goto_targ = 5;
continue _goto;
}
case 1:
_match: do {
_keys = _lexer_key_offsets[cs];
_trans = _lexer_index_offsets[cs];
_klen = _lexer_single_lengths[cs];
if ( _klen > 0 ) {
int _lower = _keys;
int _mid;
int _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;
}
}
_keys += _klen;
_trans += _klen;
}
_klen = _lexer_range_lengths[cs];
if ( _klen > 0 ) {
int _lower = _keys;
int _mid;
int _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;
}
}
_trans += _klen;
}
} while (false);
_trans = _lexer_indicies[_trans];
cs = _lexer_trans_targs[_trans];
if ( _lexer_trans_actions[_trans] != 0 ) {
_acts = _lexer_trans_actions[_trans];
_nacts = (int) _lexer_actions[_acts++];
while ( _nacts-- > 0 )
{
switch ( _lexer_actions[_acts++] )
{
case 0:
// line 16 "ragel/i18n/zh_tw.java.rl"
{
contentStart = p;
currentLine = lineNumber;
if(keyword != null) {
startCol = p - lastNewline - (keyword.length() + 1);
}
}
break;
case 1:
// line 24 "ragel/i18n/zh_tw.java.rl"
{
currentLine = lineNumber;
startCol = p - lastNewline;
}
break;
case 2:
// line 29 "ragel/i18n/zh_tw.java.rl"
{
contentStart = p;
}
break;
case 3:
// line 33 "ragel/i18n/zh_tw.java.rl"
{
docstringContentTypeStart = p;
}
break;
case 4:
// line 37 "ragel/i18n/zh_tw.java.rl"
{
docstringContentTypeEnd = p;
}
break;
case 5:
// line 41 "ragel/i18n/zh_tw.java.rl"
{
String con = unindent(startCol, substring(data, contentStart, nextKeywordStart-1).replaceFirst("(\\r?\\n)?([\\t ])*\\Z", "").replace("\\\"\\\"\\\"", "\"\"\""));
String conType = substring(data, docstringContentTypeStart, docstringContentTypeEnd).trim();
listener.docString(conType, con, currentLine);
}
break;
case 6:
// line 47 "ragel/i18n/zh_tw.java.rl"
{
String[] nameDescription = nameAndUnindentedDescription(startCol, keywordContent(data, p, eof, nextKeywordStart, contentStart));
listener.feature(keyword, nameDescription[0], nameDescription[1], currentLine);
if(nextKeywordStart != -1) p = nextKeywordStart - 1;
nextKeywordStart = -1;
}
break;
case 7:
// line 54 "ragel/i18n/zh_tw.java.rl"
{
String[] nameDescription = nameAndUnindentedDescription(startCol, keywordContent(data, p, eof, nextKeywordStart, contentStart));
listener.background(keyword, nameDescription[0], nameDescription[1], currentLine);
if(nextKeywordStart != -1) p = nextKeywordStart - 1;
nextKeywordStart = -1;
}
break;
case 8:
// line 61 "ragel/i18n/zh_tw.java.rl"
{
String[] nameDescription = nameAndUnindentedDescription(startCol, keywordContent(data, p, eof, nextKeywordStart, contentStart));
listener.scenario(keyword, nameDescription[0], nameDescription[1], currentLine);
if(nextKeywordStart != -1) p = nextKeywordStart - 1;
nextKeywordStart = -1;
}
break;
case 9:
// line 68 "ragel/i18n/zh_tw.java.rl"
{
String[] nameDescription = nameAndUnindentedDescription(startCol, keywordContent(data, p, eof, nextKeywordStart, contentStart));
listener.scenarioOutline(keyword, nameDescription[0], nameDescription[1], currentLine);
if(nextKeywordStart != -1) p = nextKeywordStart - 1;
nextKeywordStart = -1;
}
break;
case 10:
// line 75 "ragel/i18n/zh_tw.java.rl"
{
String[] nameDescription = nameAndUnindentedDescription(startCol, keywordContent(data, p, eof, nextKeywordStart, contentStart));
listener.examples(keyword, nameDescription[0], nameDescription[1], currentLine);
if(nextKeywordStart != -1) p = nextKeywordStart - 1;
nextKeywordStart = -1;
}
break;
case 11:
// line 82 "ragel/i18n/zh_tw.java.rl"
{
listener.step(keyword, substring(data, contentStart, p).trim(), currentLine);
}
break;
case 12:
// line 86 "ragel/i18n/zh_tw.java.rl"
{
listener.comment(substring(data, contentStart, p).trim(), lineNumber);
keywordStart = -1;
}
break;
case 13:
// line 91 "ragel/i18n/zh_tw.java.rl"
{
listener.tag(substring(data, contentStart, p).trim(), currentLine);
keywordStart = -1;
}
break;
case 14:
// line 96 "ragel/i18n/zh_tw.java.rl"
{
lineNumber++;
}
break;
case 15:
// line 100 "ragel/i18n/zh_tw.java.rl"
{
lastNewline = p + 1;
}
break;
case 16:
// line 104 "ragel/i18n/zh_tw.java.rl"
{
if(keywordStart == -1) keywordStart = p;
}
break;
case 17:
// line 108 "ragel/i18n/zh_tw.java.rl"
{
keyword = substring(data, keywordStart, p).replaceFirst(":$","");
keywordStart = -1;
}
break;
case 18:
// line 113 "ragel/i18n/zh_tw.java.rl"
{
nextKeywordStart = p;
}
break;
case 19:
// line 117 "ragel/i18n/zh_tw.java.rl"
{
p = p - 1;
currentRow = new ArrayList<String>();
currentLine = lineNumber;
}
break;
case 20:
// line 123 "ragel/i18n/zh_tw.java.rl"
{
contentStart = p;
}
break;
case 21:
// line 127 "ragel/i18n/zh_tw.java.rl"
{
String con = substring(data, contentStart, p).trim();
currentRow.add(con
.replace("\\|", "|")
.replace("\\n", "\n")
.replace("\\\\", "\\")
);
}
break;
case 22:
// line 136 "ragel/i18n/zh_tw.java.rl"
{
listener.row(currentRow, currentLine);
}
break;
case 23:
// line 140 "ragel/i18n/zh_tw.java.rl"
{
if(cs < lexer_first_final) {
String content = currentLineContent(data, lastNewline);
throw new LexingError("Lexing error on line " + lineNumber + ": '" + content + "'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information.");
} else {
listener.eof();
}
}
break;
// line 814 "java/src/main/java/gherkin/lexer/Zh_tw.java"
}
}
}
case 2:
if ( cs == 0 ) {
_goto_targ = 5;
continue _goto;
}
if ( ++p != pe ) {
_goto_targ = 1;
continue _goto;
}
case 4:
if ( p == eof )
{
int __acts = _lexer_eof_actions[cs];
int __nacts = (int) _lexer_actions[__acts++];
while ( __nacts-- > 0 ) {
switch ( _lexer_actions[__acts++] ) {
case 23:
// line 140 "ragel/i18n/zh_tw.java.rl"
{
if(cs < lexer_first_final) {
String content = currentLineContent(data, lastNewline);
throw new LexingError("Lexing error on line " + lineNumber + ": '" + content + "'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information.");
} else {
listener.eof();
}
}
break;
// line 846 "java/src/main/java/gherkin/lexer/Zh_tw.java"
}
}
}
case 5:
}
break; }
}
// line 186 "ragel/i18n/zh_tw.java.rl"
}
private String keywordContent(byte[] data, int p, int eof, int nextKeywordStart, int contentStart) {
int endPoint = (nextKeywordStart == -1 || (p == eof)) ? p : nextKeywordStart;
return substring(data, contentStart, endPoint);
}
private String[] nameAndUnindentedDescription(int startCol, String text) {
String[] lines = text.split("\n");
String name = lines.length > 0 ? lines[0].trim() : "";
StringBuffer description = new StringBuffer();
for(int i = 1; i < lines.length; i++) {
description.append(lines[i]);
description.append("\n");
}
return new String[]{name, unindent(startCol+2, description.toString()).replaceAll("\\s+$", "")};
}
private String unindent(int startCol, String text) {
return Pattern.compile("^[\t ]{0," + startCol + "}", Pattern.MULTILINE).matcher(text).replaceAll("");
}
private String currentLineContent(byte[] data, int lastNewline) {
return substring(data, lastNewline, data.length).trim();
}
private String substring(byte[] data, int start, int end) {
try {
return new String(data, start, end-start, "utf-8");
} catch(java.io.UnsupportedEncodingException e) {
throw new RuntimeException("Internal error", e);
}
}
}