// line 1 "ragel/i18n/lv.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 Lv implements Lexer {
// line 150 "ragel/i18n/lv.java.rl"
private final Listener listener;
public Lv(Listener listener) {
this.listener = listener;
}
// line 26 "java/src/main/java/gherkin/lexer/Lv.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, 19, 20, 21, 39, 40, 41, 43, 45, 50, 55,
60, 65, 69, 73, 75, 76, 77, 78, 79, 80, 81, 82,
83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 95, 100,
107, 112, 113, 114, 116, 117, 118, 119, 120, 121, 122, 123,
134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156,
158, 160, 162, 165, 167, 169, 171, 173, 175, 193, 194, 196,
197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 222,
224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246,
248, 250, 252, 254, 256, 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, 324, 326, 328, 330, 332, 334, 336, 338, 340, 342, 344,
346, 348, 350, 351, 352, 353, 354, 355, 356, 357, 358, 365,
368, 370, 372, 374, 376, 378, 380, 382, 384, 386, 388, 390,
392, 394, 396, 398, 400, 402, 404, 406, 407, 408, 409, 410,
411, 412, 414, 415, 416, 417, 418, 419, 420, 421, 422, 424,
425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
437, 438, 439, 454, 456, 458, 460, 462, 464, 466, 468, 470,
472, 474, 476, 478, 480, 482, 484, 486, 488, 491, 493, 495,
497, 499, 501, 503, 505, 507, 509, 511, 513, 515, 517, 519,
521, 523, 525, 527, 529, 531, 533, 535, 537, 539, 541, 543,
545, 547, 549, 551, 553, 555, 556, 557, 572, 574, 576, 578,
580, 582, 584, 586, 588, 590, 592, 594, 596, 598, 600, 602,
604, 606, 609, 611, 613, 615, 617, 619, 621, 623, 625, 627,
629, 631, 633, 635, 637, 639, 641, 643, 645, 647, 649, 652,
654, 656, 658, 660, 662, 664, 666, 668, 671, 673, 675, 677,
679, 681, 683, 685, 687, 690, 692, 694, 696, 698, 700, 702,
704, 706, 708, 710, 712, 714, 716, 718, 720, 722, 724, 726,
728, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
744, 750, 753, 755, 761, 779, 781, 783, 785, 787, 789, 791,
793, 795, 797, 799, 801, 803, 805, 807, 809, 811, 813, 815,
817, 819, 821, 823, 826, 828, 830, 832, 834, 836, 838, 840,
842, 844, 846, 849, 851, 853, 855, 857, 859, 861, 863, 865,
868, 870, 872, 874, 876, 878, 880, 882, 884, 886, 888, 890,
892, 894, 896, 898, 900, 902, 904, 905, 906, 907, 908, 909,
910, 911, 912, 913, 914, 915, 916, 917, 918
};
}
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, 74, 75,
80, 83, 84, 85, 124, 9, 13, -69, -65, 10, 32, 34,
35, 37, 42, 64, 66, 70, 74, 75, 80, 83, 84, 85,
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, 116, -60, 117, -85, -60, -115, 97,
58, 10, 10, 10, 32, 35, 37, 64, 70, 75, 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, -60, 10, 117, -85, 10, -60,
10, -115, 10, 10, 97, 10, 58, 10, 32, 34, 35, 37,
42, 64, 66, 70, 74, 75, 80, 83, 84, 85, 124, 9,
13, 97, 97, 111, 100, 110, 116, 101, 107, 115, 116, 115,
58, 10, 10, 10, 32, 35, 37, 42, 64, 66, 70, 74,
75, 83, 84, 85, 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, 101, 10, 116, -60, 10, 117, -85, 10, -60, 10, -115,
10, 10, 97, 10, 58, 10, 110, 10, 107, 10, 99, 10,
105, 10, 111, 10, 110, 10, 97, 10, 108, 10, 105, 10,
116, -60, 10, -127, 10, 10, 116, 10, 101, 10, 97, 10,
97, 10, 100, 10, 99, 10, 101, 10, 110, -60, 10, -127,
10, 10, 114, 10, 105, 10, 106, 10, 115, 10, 32, 58,
10, 112, -60, 10, -109, 10, 10, 99, 10, 32, 10, 112,
10, 97, 10, 114, 10, 97, 10, 117, 10, 103, 10, 110,
97, 105, 114, 97, 117, 103, 115, 58, 10, 10, 10, 32,
35, 70, 124, 9, 13, -60, 10, 117, -85, 10, -60, 10,
-115, 10, 10, 97, 10, 58, 10, 110, 10, 107, 10, 99,
10, 105, 10, 111, 10, 110, 10, 97, 10, 108, 10, 105,
10, 116, -60, 10, -127, 10, 10, 116, 10, 101, 101, 109,
-60, -109, 114, 105, 99, 105, 101, 110, -60, -127, 114, 105,
106, 115, 32, 58, 112, -60, -109, 99, 32, 112, 97, 114,
97, 117, 103, 97, 58, 10, 10, 10, 32, 35, 37, 42,
64, 66, 70, 74, 75, 83, 84, 85, 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, 101, 10, 116, -60, 10, 117, -85,
10, -60, 10, -115, 10, 10, 97, 10, 58, 10, 110, 10,
107, 10, 99, 10, 105, 10, 111, 10, 110, 10, 97, 10,
108, 10, 105, 10, 116, -60, 10, -127, 10, 10, 116, 10,
101, 10, 97, 10, 97, 10, 100, 10, 99, 10, 101, 10,
110, -60, 10, -127, 10, 10, 114, 10, 105, 10, 106, 10,
115, 10, 110, 10, 10, 10, 32, 35, 37, 42, 64, 66,
70, 74, 75, 83, 84, 85, 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, 101, 10, 116, -60, 10, 117, -85, 10, -60,
10, -115, 10, 10, 97, 10, 58, 10, 110, 10, 107, 10,
99, 10, 105, 10, 111, 10, 110, 10, 97, 10, 108, 10,
105, 10, 116, -60, 10, -127, 10, 10, 116, 10, 101, 10,
97, 10, 97, 111, 10, 100, 10, 110, 10, 116, 10, 101,
10, 107, 10, 115, 10, 116, 10, 115, 10, 99, 105, 10,
101, 10, 110, -60, 10, -127, 10, 10, 114, 10, 105, 10,
106, 10, 115, 10, 32, 58, 10, 112, -60, 10, -109, 10,
10, 99, 10, 32, 10, 112, 10, 97, 10, 114, 10, 97,
10, 117, 10, 103, 10, 116, 10, 117, -60, 10, -127, 10,
10, 99, 10, 105, 10, 106, 10, 97, 10, 110, 116, 117,
-60, -127, 99, 105, 106, 97, 97, 110, 32, 124, 9, 13,
10, 32, 92, 124, 9, 13, 10, 92, 124, 10, 92, 10,
32, 92, 124, 9, 13, 10, 32, 34, 35, 37, 42, 64,
66, 70, 74, 75, 80, 83, 84, 85, 124, 9, 13, 10,
110, 10, 107, 10, 99, 10, 105, 10, 111, 10, 110, 10,
97, 10, 108, 10, 105, 10, 116, -60, 10, -127, 10, 10,
116, 10, 101, 10, 111, 10, 110, 10, 116, 10, 101, 10,
107, 10, 115, 10, 116, 10, 115, 10, 97, 105, 10, 114,
10, 97, 10, 117, 10, 103, 10, 101, 10, 109, -60, 10,
-109, 10, 10, 114, 10, 105, 10, 99, 105, 10, 101, 10,
110, -60, 10, -127, 10, 10, 114, 10, 105, 10, 106, 10,
115, 10, 32, 58, 10, 112, -60, 10, -109, 10, 10, 99,
10, 32, 10, 112, 10, 97, 10, 114, 10, 97, 10, 117,
10, 103, 10, 116, 10, 117, -60, 10, -127, 10, 10, 99,
10, 105, 10, 106, 110, 107, 99, 105, 111, 110, 97, 108,
105, 116, -60, -127, 116, 101, 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, 17, 1, 1, 16, 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, 2, 1, 1, 1, 1, 1, 1, 1, 9,
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, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
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, 19, 21, 23, 41, 43, 45, 48, 51, 56, 61,
66, 71, 75, 79, 82, 84, 86, 88, 90, 92, 94, 96,
98, 100, 102, 104, 106, 108, 110, 112, 114, 117, 120, 125,
132, 137, 139, 141, 144, 146, 148, 150, 152, 154, 156, 158,
169, 172, 175, 178, 181, 184, 187, 190, 193, 196, 199, 202,
205, 208, 211, 215, 218, 221, 224, 227, 230, 248, 250, 253,
255, 257, 259, 261, 263, 265, 267, 269, 271, 273, 275, 290,
293, 296, 299, 302, 305, 308, 311, 314, 317, 320, 323, 326,
329, 332, 335, 338, 341, 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, 442, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472,
475, 478, 481, 483, 485, 487, 489, 491, 493, 495, 497, 504,
508, 511, 514, 517, 520, 523, 526, 529, 532, 535, 538, 541,
544, 547, 550, 553, 556, 559, 562, 565, 567, 569, 571, 573,
575, 577, 580, 582, 584, 586, 588, 590, 592, 594, 596, 599,
601, 603, 605, 607, 609, 611, 613, 615, 617, 619, 621, 623,
625, 627, 629, 644, 647, 650, 653, 656, 659, 662, 665, 668,
671, 674, 677, 680, 683, 686, 689, 692, 695, 699, 702, 705,
708, 711, 714, 717, 720, 723, 726, 729, 732, 735, 738, 741,
744, 747, 750, 753, 756, 759, 762, 765, 768, 771, 774, 777,
780, 783, 786, 789, 792, 795, 797, 799, 814, 817, 820, 823,
826, 829, 832, 835, 838, 841, 844, 847, 850, 853, 856, 859,
862, 865, 869, 872, 875, 878, 881, 884, 887, 890, 893, 896,
899, 902, 905, 908, 911, 914, 917, 920, 923, 926, 929, 933,
936, 939, 942, 945, 948, 951, 954, 957, 961, 964, 967, 970,
973, 976, 979, 982, 985, 989, 992, 995, 998, 1001, 1004, 1007,
1010, 1013, 1016, 1019, 1022, 1025, 1028, 1031, 1034, 1037, 1040, 1043,
1046, 1049, 1051, 1053, 1055, 1057, 1059, 1061, 1063, 1065, 1067, 1069,
1073, 1079, 1083, 1086, 1092, 1110, 1113, 1116, 1119, 1122, 1125, 1128,
1131, 1134, 1137, 1140, 1143, 1146, 1149, 1152, 1155, 1158, 1161, 1164,
1167, 1170, 1173, 1176, 1180, 1183, 1186, 1189, 1192, 1195, 1198, 1201,
1204, 1207, 1210, 1214, 1217, 1220, 1223, 1226, 1229, 1232, 1235, 1238,
1242, 1245, 1248, 1251, 1254, 1257, 1260, 1263, 1266, 1269, 1272, 1275,
1278, 1281, 1284, 1287, 1290, 1293, 1296, 1298, 1300, 1302, 1304, 1306,
1308, 1310, 1312, 1314, 1316, 1318, 1320, 1322, 1324
};
}
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, 2, 0, 18, 0, 2, 0, 3,
2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 2, 0, 19, 0, 20, 0, 22, 23, 21,
25, 26, 24, 29, 28, 30, 28, 27, 33, 32, 34, 32,
31, 33, 32, 35, 32, 31, 33, 32, 36, 32, 31, 38,
37, 37, 0, 3, 39, 39, 0, 41, 42, 40, 3, 0,
43, 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, 59, 60, 58, 62, 63, 61,
0, 0, 0, 0, 64, 65, 66, 65, 65, 68, 67, 64,
3, 69, 8, 69, 0, 70, 0, 71, 0, 72, 73, 0,
74, 0, 75, 0, 76, 0, 77, 0, 78, 0, 80, 79,
82, 81, 82, 83, 84, 85, 84, 86, 87, 88, 89, 83,
81, 82, 90, 81, 82, 91, 81, 82, 92, 81, 82, 93,
81, 82, 94, 81, 82, 95, 81, 82, 96, 81, 82, 97,
81, 82, 98, 81, 82, 99, 81, 82, 100, 81, 82, 101,
81, 82, 102, 81, 82, 103, 81, 104, 82, 105, 81, 106,
82, 81, 107, 82, 81, 108, 82, 81, 82, 109, 81, 82,
110, 81, 112, 111, 113, 114, 115, 116, 117, 118, 119, 120,
121, 122, 123, 124, 125, 126, 111, 0, 71, 0, 127, 128,
0, 71, 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, 144, 142, 145, 146, 147, 148, 149, 148, 150,
141, 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, 168, 140, 169, 139, 170, 140, 139,
171, 140, 139, 172, 140, 139, 140, 173, 139, 140, 165, 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, 173, 139, 140, 167, 139, 140, 187, 139,
140, 167, 139, 140, 188, 139, 140, 189, 139, 140, 190, 139,
191, 140, 139, 192, 140, 139, 140, 193, 139, 140, 194, 139,
140, 195, 139, 140, 196, 139, 140, 197, 165, 139, 140, 198,
139, 199, 140, 139, 200, 140, 139, 140, 201, 139, 140, 202,
139, 140, 203, 139, 140, 204, 139, 140, 205, 139, 140, 206,
139, 140, 207, 139, 140, 172, 139, 140, 167, 139, 208, 209,
0, 210, 0, 211, 0, 212, 0, 213, 0, 214, 0, 215,
0, 217, 216, 219, 218, 219, 220, 221, 222, 221, 220, 218,
223, 219, 224, 218, 225, 219, 218, 226, 219, 218, 227, 219,
218, 219, 228, 218, 219, 229, 218, 219, 230, 218, 219, 231,
218, 219, 232, 218, 219, 233, 218, 219, 234, 218, 219, 235,
218, 219, 236, 218, 219, 237, 218, 219, 238, 218, 219, 239,
218, 240, 219, 218, 241, 219, 218, 219, 242, 218, 219, 228,
218, 243, 0, 244, 0, 245, 0, 246, 0, 247, 0, 214,
0, 248, 249, 0, 250, 0, 251, 0, 252, 0, 253, 0,
254, 0, 255, 0, 256, 0, 257, 0, 258, 259, 0, 260,
0, 261, 0, 262, 0, 263, 0, 264, 0, 265, 0, 266,
0, 267, 0, 268, 0, 269, 0, 270, 0, 271, 0, 272,
0, 274, 273, 276, 275, 276, 277, 278, 279, 280, 278, 281,
282, 283, 284, 285, 284, 286, 277, 275, 276, 287, 275, 276,
288, 275, 276, 289, 275, 276, 290, 275, 276, 291, 275, 276,
292, 275, 276, 293, 275, 276, 294, 275, 276, 295, 275, 276,
296, 275, 276, 297, 275, 276, 298, 275, 276, 299, 275, 276,
300, 275, 276, 301, 275, 276, 302, 275, 276, 303, 275, 304,
276, 305, 275, 306, 276, 275, 307, 276, 275, 308, 276, 275,
276, 309, 275, 276, 301, 275, 276, 310, 275, 276, 311, 275,
276, 312, 275, 276, 313, 275, 276, 314, 275, 276, 315, 275,
276, 316, 275, 276, 317, 275, 276, 318, 275, 276, 319, 275,
320, 276, 275, 321, 276, 275, 276, 322, 275, 276, 309, 275,
276, 303, 275, 276, 323, 275, 276, 303, 275, 276, 324, 275,
276, 325, 275, 276, 326, 275, 327, 276, 275, 328, 276, 275,
276, 329, 275, 276, 330, 275, 276, 331, 275, 276, 309, 275,
276, 303, 275, 333, 332, 335, 334, 335, 336, 337, 338, 339,
337, 340, 341, 342, 343, 344, 345, 346, 336, 334, 335, 347,
334, 335, 348, 334, 335, 349, 334, 335, 350, 334, 335, 351,
334, 335, 352, 334, 335, 353, 334, 335, 354, 334, 335, 355,
334, 335, 356, 334, 335, 357, 334, 335, 358, 334, 335, 359,
334, 335, 360, 334, 335, 361, 334, 335, 362, 334, 335, 363,
334, 364, 335, 365, 334, 366, 335, 334, 367, 335, 334, 368,
335, 334, 335, 369, 334, 335, 361, 334, 335, 370, 334, 335,
371, 334, 335, 372, 334, 335, 373, 334, 335, 374, 334, 335,
375, 334, 335, 376, 334, 335, 377, 334, 335, 378, 334, 335,
379, 334, 380, 335, 334, 381, 335, 334, 335, 382, 334, 335,
369, 334, 335, 363, 334, 335, 383, 384, 334, 335, 363, 334,
335, 385, 334, 335, 386, 334, 335, 387, 334, 335, 388, 334,
335, 389, 334, 335, 390, 334, 335, 369, 334, 335, 391, 392,
334, 335, 393, 334, 335, 394, 334, 395, 335, 334, 396, 335,
334, 335, 397, 334, 335, 398, 334, 335, 399, 334, 335, 400,
334, 335, 401, 361, 334, 335, 402, 334, 403, 335, 334, 404,
335, 334, 335, 405, 334, 335, 406, 334, 335, 407, 334, 335,
408, 334, 335, 409, 334, 335, 410, 334, 335, 411, 334, 335,
368, 334, 335, 412, 334, 335, 413, 334, 414, 335, 334, 415,
335, 334, 335, 416, 334, 335, 417, 334, 335, 368, 334, 335,
383, 334, 335, 363, 334, 418, 0, 419, 0, 420, 0, 421,
0, 422, 0, 423, 0, 424, 0, 135, 0, 127, 0, 71,
0, 425, 426, 425, 0, 429, 428, 430, 431, 428, 427, 0,
433, 434, 432, 0, 433, 432, 429, 435, 433, 434, 435, 432,
429, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
447, 448, 449, 450, 436, 0, 82, 451, 81, 82, 452, 81,
82, 453, 81, 82, 454, 81, 82, 455, 81, 82, 456, 81,
82, 457, 81, 82, 458, 81, 82, 459, 81, 82, 460, 81,
461, 82, 81, 462, 82, 81, 82, 463, 81, 82, 109, 81,
82, 464, 81, 82, 465, 81, 82, 466, 81, 82, 467, 81,
82, 468, 81, 82, 469, 81, 82, 470, 81, 82, 109, 81,
82, 471, 472, 81, 82, 473, 81, 82, 474, 81, 82, 475,
81, 82, 470, 81, 82, 476, 81, 82, 477, 81, 478, 82,
81, 479, 82, 81, 82, 480, 81, 82, 109, 81, 82, 481,
482, 81, 82, 483, 81, 82, 484, 81, 485, 82, 81, 486,
82, 81, 82, 487, 81, 82, 488, 81, 82, 489, 81, 82,
490, 81, 82, 491, 110, 81, 82, 492, 81, 493, 82, 81,
494, 82, 81, 82, 495, 81, 82, 496, 81, 82, 497, 81,
82, 498, 81, 82, 499, 81, 82, 500, 81, 82, 501, 81,
82, 108, 81, 82, 502, 81, 82, 503, 81, 504, 82, 81,
505, 82, 81, 82, 506, 81, 82, 507, 81, 82, 108, 81,
508, 0, 509, 0, 510, 0, 511, 0, 512, 0, 513, 0,
514, 0, 515, 0, 516, 0, 517, 0, 518, 0, 519, 0,
520, 0, 77, 0, 521, 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, 39, 69,
70, 145, 181, 345, 346, 347, 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, 428, 32, 33, 4,
16, 33, 4, 16, 35, 36, 4, 35, 34, 36, 38, 31,
40, 414, 41, 42, 43, 44, 45, 46, 47, 46, 47, 47,
4, 48, 62, 367, 375, 386, 49, 50, 51, 52, 53, 54,
55, 56, 57, 58, 59, 60, 61, 4, 63, 353, 64, 65,
66, 67, 68, 4, 4, 5, 15, 17, 31, 34, 37, 39,
69, 70, 145, 181, 345, 346, 347, 71, 72, 73, 74, 75,
76, 77, 78, 79, 80, 81, 82, 81, 82, 82, 4, 83,
97, 98, 100, 120, 121, 123, 144, 84, 85, 86, 87, 88,
89, 90, 91, 92, 93, 94, 95, 96, 4, 68, 99, 97,
101, 106, 102, 103, 104, 105, 107, 108, 109, 110, 111, 112,
113, 114, 115, 116, 117, 118, 119, 122, 124, 125, 126, 127,
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
140, 141, 142, 143, 146, 175, 147, 148, 149, 150, 151, 152,
153, 154, 153, 154, 154, 4, 155, 156, 161, 157, 158, 159,
160, 68, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
172, 173, 174, 176, 177, 178, 179, 180, 182, 337, 183, 184,
185, 186, 187, 188, 189, 190, 191, 257, 192, 193, 194, 195,
196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 205,
206, 206, 4, 207, 221, 222, 224, 244, 245, 247, 256, 208,
209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,
4, 68, 223, 221, 225, 230, 226, 227, 228, 229, 231, 232,
233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 246,
248, 249, 250, 251, 252, 253, 254, 255, 258, 259, 258, 259,
259, 4, 260, 274, 275, 277, 297, 298, 307, 335, 336, 261,
262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
4, 68, 276, 274, 278, 283, 279, 280, 281, 282, 284, 285,
286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 299,
300, 301, 302, 303, 304, 305, 306, 308, 328, 309, 310, 311,
312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
324, 325, 326, 327, 329, 330, 331, 332, 333, 334, 338, 339,
340, 341, 342, 343, 344, 347, 348, 349, 351, 352, 350, 348,
349, 350, 348, 351, 352, 5, 15, 17, 31, 34, 37, 39,
69, 70, 145, 181, 345, 346, 347, 354, 355, 356, 357, 358,
359, 360, 361, 362, 363, 364, 365, 366, 368, 369, 370, 371,
372, 373, 374, 376, 380, 377, 378, 379, 381, 382, 383, 384,
385, 387, 407, 388, 389, 390, 391, 392, 393, 394, 395, 396,
397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 408, 409,
410, 411, 412, 413, 415, 416, 417, 418, 419, 420, 421, 422,
423, 424, 425, 426, 427, 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, 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, 57, 144, 0, 54, 0,
69, 33, 84, 84, 84, 84, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0,
0, 0, 13, 31, 130, 60, 57, 31, 63, 57, 63, 63,
63, 63, 63, 63, 63, 63, 66, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 57, 144, 0, 54, 0, 72, 33,
84, 84, 84, 84, 84, 84, 84, 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,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__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, 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 = 428;
static final int lexer_en_main = 1;
// line 159 "ragel/i18n/lv.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 619 "java/src/main/java/gherkin/lexer/Lv.java"
{
cs = lexer_start;
}
// line 185 "ragel/i18n/lv.java.rl"
// line 626 "java/src/main/java/gherkin/lexer/Lv.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/lv.java.rl"
{
contentStart = p;
currentLine = lineNumber;
if(keyword != null) {
startCol = p - lastNewline - (keyword.length() + 1);
}
}
break;
case 1:
// line 24 "ragel/i18n/lv.java.rl"
{
currentLine = lineNumber;
startCol = p - lastNewline;
}
break;
case 2:
// line 29 "ragel/i18n/lv.java.rl"
{
contentStart = p;
}
break;
case 3:
// line 33 "ragel/i18n/lv.java.rl"
{
docstringContentTypeStart = p;
}
break;
case 4:
// line 37 "ragel/i18n/lv.java.rl"
{
docstringContentTypeEnd = p;
}
break;
case 5:
// line 41 "ragel/i18n/lv.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/lv.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/lv.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/lv.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/lv.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/lv.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/lv.java.rl"
{
listener.step(keyword, substring(data, contentStart, p).trim(), currentLine);
}
break;
case 12:
// line 86 "ragel/i18n/lv.java.rl"
{
listener.comment(substring(data, contentStart, p).trim(), lineNumber);
keywordStart = -1;
}
break;
case 13:
// line 91 "ragel/i18n/lv.java.rl"
{
listener.tag(substring(data, contentStart, p).trim(), currentLine);
keywordStart = -1;
}
break;
case 14:
// line 96 "ragel/i18n/lv.java.rl"
{
lineNumber++;
}
break;
case 15:
// line 100 "ragel/i18n/lv.java.rl"
{
lastNewline = p + 1;
}
break;
case 16:
// line 104 "ragel/i18n/lv.java.rl"
{
if(keywordStart == -1) keywordStart = p;
}
break;
case 17:
// line 108 "ragel/i18n/lv.java.rl"
{
keyword = substring(data, keywordStart, p).replaceFirst(":$","");
keywordStart = -1;
}
break;
case 18:
// line 113 "ragel/i18n/lv.java.rl"
{
nextKeywordStart = p;
}
break;
case 19:
// line 117 "ragel/i18n/lv.java.rl"
{
p = p - 1;
currentRow = new ArrayList<String>();
currentLine = lineNumber;
}
break;
case 20:
// line 123 "ragel/i18n/lv.java.rl"
{
contentStart = p;
}
break;
case 21:
// line 127 "ragel/i18n/lv.java.rl"
{
String con = substring(data, contentStart, p).trim();
currentRow.add(con
.replace("\\|", "|")
.replace("\\n", "\n")
.replace("\\\\", "\\")
);
}
break;
case 22:
// line 136 "ragel/i18n/lv.java.rl"
{
listener.row(currentRow, currentLine);
}
break;
case 23:
// line 140 "ragel/i18n/lv.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 887 "java/src/main/java/gherkin/lexer/Lv.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/lv.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 919 "java/src/main/java/gherkin/lexer/Lv.java"
}
}
}
case 5:
}
break; }
}
// line 186 "ragel/i18n/lv.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);
}
}
}