// line 1 "ragel/i18n/lu.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 Lu implements Lexer {
// line 150 "ragel/i18n/lu.java.rl"
private final Listener listener;
public Lu(Listener listener) {
this.listener = listener;
}
// line 26 "java/src/main/java/gherkin/lexer/Lu.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, 21, 22, 23, 43, 44, 45, 47, 49, 54, 59,
64, 69, 73, 77, 79, 80, 81, 82, 83, 84, 85, 86,
87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 99, 104,
111, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
127, 128, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153,
155, 157, 159, 161, 163, 165, 167, 187, 188, 189, 190, 191,
192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
204, 205, 217, 219, 221, 223, 225, 227, 229, 231, 233, 235,
237, 239, 241, 243, 245, 247, 249, 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, 305, 307,
309, 311, 313, 315, 317, 319, 321, 323, 325, 327, 329, 331,
333, 335, 337, 339, 341, 343, 345, 347, 349, 350, 351, 352,
353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 378, 380,
382, 384, 386, 388, 390, 392, 394, 396, 398, 400, 402, 404,
406, 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, 478,
480, 482, 484, 486, 488, 490, 492, 494, 496, 498, 500, 502,
504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
516, 517, 518, 519, 520, 521, 522, 523, 524, 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, 605, 607, 609, 611, 613, 615,
619, 621, 623, 625, 627, 629, 631, 633, 635, 637, 639, 641,
643, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
672, 674, 676, 678, 680, 682, 684, 686, 688, 690, 692, 694,
696, 698, 700, 702, 704, 706, 708, 710, 712, 714, 716, 718,
720, 722, 724, 726, 728, 730, 732, 734, 736, 738, 740, 742,
744, 746, 748, 750, 752, 754, 756, 758, 760, 762, 764, 766,
768, 770, 772, 774, 776, 778, 780, 782, 784, 786, 788, 792,
794, 796, 798, 800, 802, 804, 806, 808, 810, 812, 814, 816,
818, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831,
832, 833, 834, 838, 844, 847, 849, 855, 875
};
}
private static final short _lexer_key_offsets[] = init__lexer_key_offsets_0();
private static byte[] init__lexer_trans_keys_0()
{
return new byte [] {
-17, 10, 32, 34, 35, 37, 42, 64, 66, 70, 72, 80,
83, 97, 100, 109, 117, 119, 124, 9, 13, -69, -65, 10,
32, 34, 35, 37, 42, 64, 66, 70, 72, 80, 83, 97,
100, 109, 117, 119, 124, 9, 13, 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, 10,
13, 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, 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, 19, 1, 1, 18, 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, 2, 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, 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, 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
};
}
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, 21, 23, 25, 45, 47, 49, 52, 55, 60, 65,
70, 75, 79, 83, 86, 88, 90, 92, 94, 96, 98, 100,
102, 104, 106, 108, 110, 112, 114, 116, 118, 121, 124, 129,
136, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161,
163, 165, 172, 175, 178, 181, 184, 187, 190, 193, 196, 199,
202, 205, 208, 211, 214, 217, 220, 240, 242, 244, 246, 248,
250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272,
274, 276, 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, 375, 378, 381, 384, 387,
390, 393, 396, 399, 402, 405, 408, 411, 414, 417, 420, 423,
426, 429, 432, 435, 438, 441, 444, 447, 450, 453, 456, 459,
462, 465, 468, 471, 474, 477, 480, 483, 486, 488, 490, 492,
494, 496, 498, 500, 502, 504, 506, 508, 510, 512, 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, 618, 621, 624, 627, 630, 633, 636, 639,
642, 645, 648, 651, 654, 657, 660, 663, 666, 669, 672, 677,
680, 683, 686, 689, 692, 695, 698, 701, 704, 707, 710, 713,
716, 718, 720, 722, 724, 726, 728, 730, 732, 734, 736, 738,
740, 742, 744, 746, 748, 750, 752, 754, 756, 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, 867, 870, 873, 876, 879, 882, 885,
890, 893, 896, 899, 902, 905, 908, 911, 914, 917, 920, 923,
926, 929, 931, 933, 935, 937, 939, 941, 943, 945, 947, 949,
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, 1050, 1053, 1056, 1059, 1062, 1065, 1068, 1071,
1074, 1077, 1080, 1083, 1086, 1089, 1092, 1095, 1098, 1101, 1104, 1107,
1110, 1113, 1116, 1119, 1122, 1125, 1128, 1131, 1134, 1137, 1140, 1145,
1148, 1151, 1154, 1157, 1160, 1163, 1166, 1169, 1172, 1175, 1178, 1181,
1184, 1188, 1190, 1192, 1194, 1196, 1198, 1200, 1202, 1204, 1206, 1208,
1210, 1212, 1214, 1218, 1224, 1228, 1231, 1237, 1257
};
}
private static final short _lexer_index_offsets[] = init__lexer_index_offsets_0();
private static short[] init__lexer_indicies_0()
{
return new short [] {
1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 15, 18, 2, 0, 19, 0, 2,
0, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 15, 18, 2, 0, 20, 0, 21,
0, 23, 24, 22, 26, 27, 25, 30, 29, 31, 29, 28,
34, 33, 35, 33, 32, 34, 33, 36, 33, 32, 34, 33,
37, 33, 32, 39, 38, 38, 0, 3, 40, 40, 0, 42,
43, 41, 3, 0, 44, 0, 45, 0, 46, 0, 47, 0,
48, 0, 49, 0, 50, 0, 51, 0, 52, 0, 53, 0,
54, 0, 55, 0, 56, 0, 57, 0, 58, 0, 60, 61,
59, 63, 64, 62, 0, 0, 0, 0, 65, 66, 67, 66,
66, 69, 68, 65, 3, 70, 8, 70, 0, 71, 0, 72,
0, 73, 0, 74, 0, 75, 0, 76, 0, 77, 0, 78,
0, 79, 0, 80, 0, 82, 81, 84, 83, 84, 85, 86,
87, 86, 85, 83, 84, 88, 83, 84, 89, 83, 84, 90,
83, 84, 91, 83, 84, 92, 83, 84, 93, 83, 84, 94,
83, 84, 95, 83, 84, 96, 83, 84, 97, 83, 84, 98,
83, 99, 84, 83, 100, 84, 83, 84, 101, 83, 84, 102,
83, 84, 103, 83, 105, 104, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, 117, 118, 119, 117, 120, 104, 0,
121, 0, 122, 0, 123, 0, 124, 0, 125, 0, 126, 0,
127, 0, 128, 0, 129, 0, 130, 0, 131, 0, 132, 0,
133, 0, 134, 0, 135, 0, 136, 0, 138, 137, 140, 139,
140, 141, 142, 143, 142, 144, 145, 146, 147, 148, 141, 139,
140, 149, 139, 140, 150, 139, 140, 151, 139, 140, 152, 139,
140, 153, 139, 140, 154, 139, 140, 155, 139, 140, 156, 139,
140, 157, 139, 140, 158, 139, 140, 159, 139, 140, 160, 139,
140, 161, 139, 140, 162, 139, 140, 163, 139, 140, 164, 139,
140, 165, 139, 140, 166, 139, 140, 167, 139, 140, 168, 139,
140, 169, 139, 140, 170, 139, 140, 171, 139, 140, 172, 139,
140, 173, 139, 140, 174, 139, 140, 175, 139, 140, 176, 139,
140, 177, 139, 140, 178, 139, 140, 179, 139, 140, 180, 139,
140, 181, 139, 140, 182, 139, 140, 183, 139, 184, 140, 139,
185, 140, 139, 140, 186, 139, 140, 171, 139, 140, 187, 139,
140, 188, 139, 140, 189, 139, 140, 190, 139, 140, 191, 139,
140, 192, 139, 140, 193, 139, 140, 194, 139, 140, 195, 139,
140, 171, 139, 140, 196, 139, 140, 197, 139, 140, 198, 139,
140, 199, 139, 140, 200, 139, 140, 201, 139, 140, 202, 139,
140, 203, 139, 140, 204, 139, 140, 205, 139, 140, 206, 139,
140, 207, 139, 140, 208, 139, 140, 209, 139, 140, 210, 139,
140, 211, 139, 140, 171, 139, 212, 0, 213, 0, 214, 0,
215, 0, 216, 0, 217, 0, 218, 0, 219, 0, 220, 0,
221, 0, 222, 0, 224, 223, 226, 225, 226, 227, 228, 229,
230, 228, 231, 232, 233, 234, 235, 236, 237, 235, 227, 225,
226, 238, 225, 226, 239, 225, 226, 240, 225, 226, 241, 225,
226, 242, 225, 226, 243, 225, 226, 244, 225, 226, 245, 225,
226, 246, 225, 226, 247, 225, 226, 248, 225, 226, 249, 225,
226, 250, 225, 226, 251, 225, 226, 252, 225, 226, 253, 225,
226, 254, 225, 226, 255, 225, 226, 256, 225, 226, 257, 225,
226, 258, 225, 226, 259, 225, 226, 260, 225, 226, 261, 225,
226, 262, 225, 226, 263, 225, 264, 226, 225, 265, 226, 225,
226, 266, 225, 226, 267, 225, 226, 252, 225, 226, 268, 225,
226, 269, 225, 226, 270, 225, 226, 271, 225, 226, 272, 225,
226, 273, 225, 226, 274, 225, 226, 275, 225, 226, 276, 225,
226, 277, 225, 226, 278, 225, 226, 279, 225, 226, 280, 225,
226, 281, 225, 226, 282, 225, 226, 283, 225, 226, 267, 225,
226, 252, 284, 285, 225, 226, 286, 225, 226, 284, 225, 226,
287, 225, 226, 288, 225, 226, 284, 225, 289, 226, 225, 284,
226, 225, 226, 290, 225, 226, 291, 225, 226, 292, 225, 226,
293, 225, 226, 294, 225, 226, 284, 225, 295, 0, 296, 0,
297, 0, 298, 0, 299, 0, 300, 0, 301, 0, 302, 0,
303, 0, 304, 0, 305, 0, 306, 0, 307, 0, 308, 0,
309, 0, 310, 0, 311, 0, 312, 0, 314, 313, 316, 315,
316, 317, 318, 319, 320, 318, 321, 322, 323, 324, 325, 326,
324, 317, 315, 316, 327, 315, 316, 328, 315, 316, 329, 315,
316, 330, 315, 316, 331, 315, 316, 332, 315, 316, 333, 315,
316, 334, 315, 316, 335, 315, 316, 336, 315, 316, 337, 315,
316, 338, 315, 316, 339, 315, 316, 340, 315, 316, 341, 315,
316, 342, 315, 316, 343, 315, 316, 344, 315, 316, 345, 315,
316, 346, 315, 316, 347, 315, 316, 348, 315, 316, 349, 315,
316, 350, 315, 316, 351, 315, 316, 352, 315, 353, 316, 315,
354, 316, 315, 316, 355, 315, 316, 356, 315, 316, 341, 315,
316, 357, 315, 316, 358, 315, 316, 359, 315, 316, 360, 315,
316, 361, 315, 316, 362, 315, 316, 356, 315, 316, 341, 363,
364, 315, 316, 365, 315, 316, 363, 315, 316, 366, 315, 316,
367, 315, 316, 363, 315, 368, 316, 315, 363, 316, 315, 316,
369, 315, 316, 370, 315, 316, 371, 315, 316, 372, 315, 316,
373, 315, 316, 363, 315, 374, 0, 375, 0, 376, 0, 377,
0, 378, 0, 379, 0, 380, 0, 381, 0, 383, 382, 385,
384, 385, 386, 387, 388, 389, 387, 390, 391, 392, 393, 394,
395, 396, 397, 395, 386, 384, 385, 398, 384, 385, 399, 384,
385, 400, 384, 385, 401, 384, 385, 402, 384, 385, 403, 384,
385, 404, 384, 385, 405, 384, 385, 406, 384, 385, 407, 384,
385, 408, 384, 385, 409, 384, 385, 410, 384, 385, 411, 384,
385, 412, 384, 385, 413, 384, 385, 414, 384, 385, 415, 384,
385, 416, 384, 385, 417, 384, 385, 418, 384, 385, 419, 384,
385, 420, 384, 385, 421, 384, 385, 422, 384, 385, 423, 384,
424, 385, 384, 425, 385, 384, 385, 426, 384, 385, 427, 384,
385, 412, 384, 385, 428, 384, 385, 429, 384, 385, 430, 384,
385, 431, 384, 385, 432, 384, 385, 433, 384, 385, 434, 384,
385, 435, 384, 385, 436, 384, 385, 427, 384, 385, 437, 384,
385, 438, 384, 385, 439, 384, 385, 440, 384, 385, 441, 384,
385, 442, 384, 385, 443, 384, 385, 444, 384, 385, 445, 384,
385, 446, 384, 385, 447, 384, 385, 448, 384, 385, 449, 384,
385, 450, 384, 385, 451, 384, 385, 452, 384, 385, 427, 384,
385, 412, 453, 454, 384, 385, 455, 384, 385, 453, 384, 385,
456, 384, 385, 457, 384, 385, 453, 384, 458, 385, 384, 453,
385, 384, 385, 459, 384, 385, 460, 384, 385, 461, 384, 385,
462, 384, 385, 463, 384, 385, 453, 384, 58, 464, 465, 0,
466, 0, 464, 0, 467, 0, 468, 0, 464, 0, 469, 0,
464, 0, 470, 0, 471, 0, 472, 0, 473, 0, 474, 0,
464, 0, 475, 476, 475, 0, 479, 478, 480, 481, 478, 477,
0, 483, 484, 482, 0, 483, 482, 479, 485, 483, 484, 485,
482, 479, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
496, 497, 498, 499, 500, 498, 501, 486, 0, 502, 0
};
}
private static final short _lexer_indicies[] = init__lexer_indicies_0();
private static short[] init__lexer_trans_targs_0()
{
return new short [] {
0, 2, 4, 4, 5, 15, 17, 31, 34, 37, 67, 152,
228, 301, 384, 387, 390, 392, 398, 3, 6, 7, 8, 9,
8, 8, 9, 8, 10, 10, 10, 11, 10, 10, 10, 11,
12, 13, 14, 4, 14, 15, 4, 16, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 404, 32, 33,
4, 16, 33, 4, 16, 35, 36, 4, 35, 34, 36, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 48,
49, 49, 4, 50, 51, 52, 53, 54, 55, 56, 57, 58,
59, 60, 61, 62, 63, 64, 65, 66, 4, 4, 5, 15,
17, 31, 34, 37, 67, 152, 228, 301, 384, 387, 390, 392,
398, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
79, 80, 81, 82, 83, 84, 85, 84, 85, 85, 4, 86,
100, 110, 125, 135, 145, 87, 88, 89, 90, 91, 92, 93,
94, 95, 96, 97, 98, 99, 4, 101, 102, 103, 104, 105,
106, 107, 108, 109, 66, 111, 112, 113, 114, 115, 116, 117,
118, 119, 120, 121, 122, 123, 124, 126, 127, 128, 129, 130,
131, 132, 133, 134, 136, 137, 138, 139, 140, 141, 142, 143,
144, 145, 146, 147, 148, 149, 150, 151, 153, 154, 155, 156,
157, 158, 159, 160, 161, 162, 163, 164, 165, 164, 165, 165,
4, 166, 180, 181, 197, 207, 214, 217, 220, 222, 167, 168,
169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 4,
66, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
193, 194, 195, 196, 198, 199, 200, 201, 202, 203, 204, 205,
206, 207, 208, 209, 210, 211, 212, 213, 180, 215, 216, 218,
219, 221, 223, 224, 225, 226, 227, 229, 230, 231, 232, 233,
234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
246, 247, 248, 247, 248, 248, 4, 249, 263, 264, 280, 287,
290, 293, 295, 250, 251, 252, 253, 254, 255, 256, 257, 258,
259, 260, 261, 262, 4, 66, 265, 266, 267, 268, 269, 270,
271, 272, 273, 274, 275, 276, 277, 278, 279, 281, 282, 283,
284, 285, 286, 263, 288, 289, 291, 292, 294, 296, 297, 298,
299, 300, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
310, 311, 311, 4, 312, 326, 327, 343, 353, 363, 370, 373,
376, 378, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
323, 324, 325, 4, 66, 328, 329, 330, 331, 332, 333, 334,
335, 336, 337, 338, 339, 340, 341, 342, 344, 345, 346, 347,
348, 349, 350, 351, 352, 354, 355, 356, 357, 358, 359, 360,
361, 362, 363, 364, 365, 366, 367, 368, 369, 326, 371, 372,
374, 375, 377, 379, 380, 381, 382, 383, 31, 385, 386, 388,
389, 391, 393, 394, 395, 396, 397, 398, 399, 400, 402, 403,
401, 399, 400, 401, 399, 402, 403, 5, 15, 17, 31, 34,
37, 67, 152, 228, 301, 384, 387, 390, 392, 398, 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, 0, 0, 54, 3, 1, 0, 29, 1, 29, 29, 29,
29, 29, 29, 29, 29, 29, 35, 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, 57,
149, 126, 0, 110, 23, 0, 27, 118, 27, 51, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 37, 54,
37, 87, 0, 0, 39, 0, 0, 93, 90, 41, 96, 90,
96, 96, 96, 96, 96, 96, 96, 96, 96, 99, 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, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 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 = 404;
static final int lexer_en_main = 1;
// line 159 "ragel/i18n/lu.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 595 "java/src/main/java/gherkin/lexer/Lu.java"
{
cs = lexer_start;
}
// line 185 "ragel/i18n/lu.java.rl"
// line 602 "java/src/main/java/gherkin/lexer/Lu.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/lu.java.rl"
{
contentStart = p;
currentLine = lineNumber;
if(keyword != null) {
startCol = p - lastNewline - (keyword.length() + 1);
}
}
break;
case 1:
// line 24 "ragel/i18n/lu.java.rl"
{
currentLine = lineNumber;
startCol = p - lastNewline;
}
break;
case 2:
// line 29 "ragel/i18n/lu.java.rl"
{
contentStart = p;
}
break;
case 3:
// line 33 "ragel/i18n/lu.java.rl"
{
docstringContentTypeStart = p;
}
break;
case 4:
// line 37 "ragel/i18n/lu.java.rl"
{
docstringContentTypeEnd = p;
}
break;
case 5:
// line 41 "ragel/i18n/lu.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/lu.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/lu.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/lu.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/lu.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/lu.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/lu.java.rl"
{
listener.step(keyword, substring(data, contentStart, p).trim(), currentLine);
}
break;
case 12:
// line 86 "ragel/i18n/lu.java.rl"
{
listener.comment(substring(data, contentStart, p).trim(), lineNumber);
keywordStart = -1;
}
break;
case 13:
// line 91 "ragel/i18n/lu.java.rl"
{
listener.tag(substring(data, contentStart, p).trim(), currentLine);
keywordStart = -1;
}
break;
case 14:
// line 96 "ragel/i18n/lu.java.rl"
{
lineNumber++;
}
break;
case 15:
// line 100 "ragel/i18n/lu.java.rl"
{
lastNewline = p + 1;
}
break;
case 16:
// line 104 "ragel/i18n/lu.java.rl"
{
if(keywordStart == -1) keywordStart = p;
}
break;
case 17:
// line 108 "ragel/i18n/lu.java.rl"
{
keyword = substring(data, keywordStart, p).replaceFirst(":$","");
keywordStart = -1;
}
break;
case 18:
// line 113 "ragel/i18n/lu.java.rl"
{
nextKeywordStart = p;
}
break;
case 19:
// line 117 "ragel/i18n/lu.java.rl"
{
p = p - 1;
currentRow = new ArrayList<String>();
currentLine = lineNumber;
}
break;
case 20:
// line 123 "ragel/i18n/lu.java.rl"
{
contentStart = p;
}
break;
case 21:
// line 127 "ragel/i18n/lu.java.rl"
{
String con = substring(data, contentStart, p).trim();
currentRow.add(con
.replace("\\|", "|")
.replace("\\n", "\n")
.replace("\\\\", "\\")
);
}
break;
case 22:
// line 136 "ragel/i18n/lu.java.rl"
{
listener.row(currentRow, currentLine);
}
break;
case 23:
// line 140 "ragel/i18n/lu.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 863 "java/src/main/java/gherkin/lexer/Lu.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/lu.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 895 "java/src/main/java/gherkin/lexer/Lu.java"
}
}
}
case 5:
}
break; }
}
// line 186 "ragel/i18n/lu.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);
}
}
}