// line 1 "ragel/i18n/fa.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 Fa implements Lexer {
// line 150 "ragel/i18n/fa.java.rl"
private final Listener listener;
public Fa(Listener listener) {
this.listener = listener;
}
// line 26 "java/src/main/java/gherkin/lexer/Fa.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, 13, 18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 29, 31, 43, 46, 47, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 58, 59, 60, 61, 62, 69, 71, 73,
75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 105, 106,
107, 109, 111, 116, 121, 126, 131, 135, 139, 141, 142, 143,
144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
156, 161, 168, 173, 177, 183, 186, 188, 194, 206, 207, 208,
209, 210, 211, 212, 213, 214, 215, 216, 218, 219, 220, 221,
222, 223, 224, 225, 226, 227, 228, 229, 230, 239, 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, 306, 308, 310, 312, 314, 316, 318,
320, 322, 324, 326, 328, 330, 332, 334, 336, 338, 340, 342,
344, 346, 348, 350, 352, 354, 356, 358, 360, 362, 364, 366,
368, 370, 372, 374, 376, 378, 380, 381, 383, 384, 385, 386,
387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
399, 400, 401, 402, 403, 404, 405, 415, 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, 486, 489, 491, 493, 495, 497, 499,
501, 503, 505, 507, 509, 512, 514, 516, 518, 520, 522, 524,
526, 528, 530, 532, 534, 536, 538, 540, 542, 544, 546, 548,
550, 552, 554, 556, 558, 559, 560, 561, 562, 563, 564, 565,
566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577,
578, 579, 580, 590, 595, 597, 599, 601, 603, 605, 607, 609,
611, 613, 615, 618, 620, 622, 624, 626, 628, 630, 632, 634,
636, 638, 640, 642, 644, 646, 648, 650, 652, 654, 656, 658,
660, 662, 664, 666, 668, 670, 672, 674, 676, 678, 680, 683,
685, 687, 689, 691, 693, 695, 697, 699, 701, 703, 706, 708,
710, 712, 714, 716, 718, 720, 722, 724, 726, 728, 730, 732,
734, 736, 738, 740, 742, 744, 746, 748, 750, 752, 753, 754,
755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 775,
781, 783, 785, 787, 789, 791, 793, 795, 797, 799, 801, 804,
806, 808, 810, 812, 814, 816, 818, 820, 822, 824, 826, 828,
830, 832, 834, 836, 838, 840, 842, 844, 846, 848, 850, 852,
854, 856, 858, 860, 862, 864, 866, 868, 870, 872, 874, 876,
878, 880, 882, 885, 887, 889, 891, 893, 895, 897, 899, 901,
903, 905, 908, 910, 912, 914, 916, 918, 920, 922, 924, 926,
928, 930, 932, 934, 936, 938, 940, 942, 944, 946, 948, 950,
952, 954, 955, 956
};
}
private static final short _lexer_key_offsets[] = init__lexer_key_offsets_0();
private static byte[] init__lexer_trans_keys_0()
{
return new byte [] {
-40, -39, -17, 10, 32, 34, 35, 37, 42, 64, 124, 9,
13, -94, -89, -88, -78, -77, -39, -122, -38, -81, -40, -89,
-39, -121, 32, 10, 13, 10, 13, -40, -39, 10, 32, 34,
35, 37, 42, 64, 124, 9, 13, -122, -121, -120, -39, -123,
-39, -120, -39, -122, -39, -121, 32, -39, -121, -40, -89, 58,
10, 10, -39, 10, 32, 35, 124, 9, 13, -120, 10, -39,
10, -112, 10, -37, 10, -116, 10, -38, 10, -104, 10, -38,
10, -81, 10, -37, 10, -116, 10, 10, 58, -40, -39, 10,
32, 34, 35, 37, 42, 64, 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,
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, -40, -39, 10, 32, 34, 35, 37, 42, 64, 124,
9, 13, -39, -122, -38, -81, -40, -89, -39, -123, -37, -116,
-39, 32, -112, -37, -116, -38, -104, -38, -81, -37, -116, 58,
10, 10, -40, -39, 10, 32, 35, 37, 64, 9, 13, -89,
-78, -77, 10, -39, 10, -124, 10, -38, 10, -81, 10, -39,
10, -120, 10, -37, 10, -116, 10, 10, 32, -40, 10, -77,
10, -39, 10, -122, 10, -40, 10, -89, 10, -40, 10, -79,
10, -37, 10, -116, 10, -39, 10, -120, 10, 10, 58, -39,
10, -123, 10, -37, 10, -116, 10, -39, 10, -122, 10, -39,
10, -121, 10, -122, -120, 10, -39, 10, -123, 10, -39, 10,
-120, 10, -39, 10, -122, 10, -39, 10, -121, 10, 10, 32,
-39, 10, -121, 10, -40, 10, -89, 10, -39, 10, -112, 10,
-37, 10, -116, 10, -38, 10, -104, 10, -38, 10, -81, 10,
-37, 10, -116, 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, -39, -124, -123, -38,
-81, -39, -120, -37, -116, 32, -40, -77, -39, -122, -40, -89,
-40, -79, -37, -116, -39, -120, 58, 10, 10, -40, -39, 10,
32, 35, 37, 42, 64, 9, 13, -94, -89, -88, -77, 10,
-39, 10, -122, 10, -38, 10, -81, 10, -40, 10, -89, 10,
-39, 10, -121, 10, 10, 32, -39, 10, -123, 10, -40, 10,
-89, 10, -40, 10, -89, 10, 10, 32, -39, 10, -127, 10,
-40, 10, -79, 10, -40, 10, -74, 10, -39, 10, -122, 10,
-40, 10, -89, 10, -40, 10, -79, 10, -37, 10, -116, 10,
-39, 10, -120, 10, 10, 58, -121, -120, 10, -39, 10, -122,
10, -38, 10, -81, 10, -40, 10, -89, 10, -39, 10, -123,
10, -37, 10, -116, 10, -39, 10, 32, -112, 10, -37, 10,
-116, 10, -38, 10, -104, 10, -38, 10, -81, 10, -37, 10,
-116, 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, -40, -89, -40, -89, 32, -39,
-127, -40, -79, -40, -74, -39, -123, -37, -116, -39, -122, -39,
-121, 58, 10, 10, -40, -39, 10, 32, 35, 37, 42, 64,
9, 13, -94, -89, -88, -77, 10, -39, 10, -122, 10, -38,
10, -81, 10, -40, 10, -89, 10, -39, 10, -121, 10, 10,
32, -39, 10, -124, -123, 10, -38, 10, -81, 10, -39, 10,
-120, 10, -37, 10, -116, 10, 10, 32, -40, 10, -77, 10,
-39, 10, -122, 10, -40, 10, -89, 10, -40, 10, -79, 10,
-37, 10, -116, 10, -39, 10, -120, 10, 10, 58, -40, 10,
-89, 10, -40, 10, -89, 10, 10, 32, -39, 10, -127, 10,
-40, 10, -79, 10, -40, 10, -74, 10, -121, -120, 10, -39,
10, -122, 10, -38, 10, -81, 10, -40, 10, -89, 10, -39,
10, -123, 10, -37, 10, -116, 10, -39, 10, 32, -112, 10,
-37, 10, -116, 10, -38, 10, -104, 10, -38, 10, -81, 10,
-37, 10, -116, 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, -39, -122, -40, -89,
-40, -79, -37, -116, -39, -120, 58, 10, 10, -40, -39, 10,
32, 35, 37, 42, 64, 9, 13, -94, -89, -88, -78, -77,
10, -39, 10, -122, 10, -38, 10, -81, 10, -40, 10, -89,
10, -39, 10, -121, 10, 10, 32, -39, 10, -124, -123, 10,
-38, 10, -81, 10, -39, 10, -120, 10, -37, 10, -116, 10,
10, 32, -40, 10, -77, 10, -39, 10, -122, 10, -40, 10,
-89, 10, -40, 10, -79, 10, -37, 10, -116, 10, -39, 10,
-120, 10, 10, 58, -40, 10, -89, 10, -40, 10, -89, 10,
10, 32, -39, 10, -127, 10, -40, 10, -79, 10, -40, 10,
-74, 10, -39, 10, -123, 10, -37, 10, -116, 10, -39, 10,
-122, 10, -39, 10, -121, 10, -121, -120, 10, -39, 10, -122,
10, -38, 10, -81, 10, -40, 10, -89, 10, -39, 10, -123,
10, -37, 10, -116, 10, -39, 10, 32, -112, 10, -37, 10,
-116, 10, -38, 10, -104, 10, -38, 10, -81, 10, -37, 10,
-116, 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, -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, 11, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 2, 10, 3, 1, 1, 1, 1, 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, 10, 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,
3, 5, 3, 2, 4, 3, 2, 4, 10, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 7, 4, 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, 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, 1, 2, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 8, 5, 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, 3, 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, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 8, 5, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2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0()
{
return new short [] {
0, 0, 13, 19, 21, 23, 25, 27, 29, 31, 33, 35,
37, 40, 43, 55, 59, 61, 63, 65, 67, 69, 71, 73,
75, 77, 79, 81, 83, 85, 87, 89, 91, 98, 101, 104,
107, 110, 113, 116, 119, 122, 125, 128, 131, 134, 146, 148,
150, 153, 156, 161, 166, 171, 176, 180, 184, 187, 189, 191,
193, 195, 197, 199, 201, 203, 205, 207, 209, 211, 213, 215,
217, 222, 229, 234, 238, 244, 248, 251, 257, 269, 271, 273,
275, 277, 279, 281, 283, 285, 287, 289, 292, 294, 296, 298,
300, 302, 304, 306, 308, 310, 312, 314, 316, 325, 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, 424, 427, 430, 433, 436, 439, 442,
445, 448, 451, 454, 457, 460, 463, 466, 469, 472, 475, 478,
481, 484, 487, 490, 493, 496, 499, 502, 505, 508, 511, 514,
517, 520, 523, 526, 529, 532, 535, 537, 540, 542, 544, 546,
548, 550, 552, 554, 556, 558, 560, 562, 564, 566, 568, 570,
572, 574, 576, 578, 580, 582, 584, 594, 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, 675, 678, 681,
684, 687, 690, 693, 696, 699, 703, 706, 709, 712, 715, 718,
721, 724, 727, 730, 733, 737, 740, 743, 746, 749, 752, 755,
758, 761, 764, 767, 770, 773, 776, 779, 782, 785, 788, 791,
794, 797, 800, 803, 806, 808, 810, 812, 814, 816, 818, 820,
822, 824, 826, 828, 830, 832, 834, 836, 838, 840, 842, 844,
846, 848, 850, 860, 866, 869, 872, 875, 878, 881, 884, 887,
890, 893, 896, 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, 975, 978, 981, 984, 987, 990, 993, 997,
1000, 1003, 1006, 1009, 1012, 1015, 1018, 1021, 1024, 1027, 1031, 1034,
1037, 1040, 1043, 1046, 1049, 1052, 1055, 1058, 1061, 1064, 1067, 1070,
1073, 1076, 1079, 1082, 1085, 1088, 1091, 1094, 1097, 1100, 1102, 1104,
1106, 1108, 1110, 1112, 1114, 1116, 1118, 1120, 1122, 1124, 1126, 1136,
1143, 1146, 1149, 1152, 1155, 1158, 1161, 1164, 1167, 1170, 1173, 1177,
1180, 1183, 1186, 1189, 1192, 1195, 1198, 1201, 1204, 1207, 1210, 1213,
1216, 1219, 1222, 1225, 1228, 1231, 1234, 1237, 1240, 1243, 1246, 1249,
1252, 1255, 1258, 1261, 1264, 1267, 1270, 1273, 1276, 1279, 1282, 1285,
1288, 1291, 1294, 1298, 1301, 1304, 1307, 1310, 1313, 1316, 1319, 1322,
1325, 1328, 1332, 1335, 1338, 1341, 1344, 1347, 1350, 1353, 1356, 1359,
1362, 1365, 1368, 1371, 1374, 1377, 1380, 1383, 1386, 1389, 1392, 1395,
1398, 1401, 1403, 1405
};
}
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, 5, 4, 6, 7, 8, 9, 10, 11, 4,
0, 12, 13, 14, 15, 16, 0, 17, 0, 18, 0, 19,
0, 20, 0, 21, 0, 22, 0, 23, 0, 24, 0, 25,
0, 27, 28, 26, 30, 31, 29, 1, 2, 5, 4, 6,
7, 8, 9, 10, 11, 4, 0, 32, 33, 34, 0, 35,
0, 36, 0, 37, 0, 38, 0, 39, 0, 40, 0, 41,
0, 42, 0, 43, 0, 44, 0, 45, 0, 46, 0, 47,
0, 48, 0, 50, 49, 52, 51, 53, 52, 54, 55, 55,
54, 51, 56, 52, 51, 57, 52, 51, 58, 52, 51, 59,
52, 51, 60, 52, 51, 61, 52, 51, 62, 52, 51, 63,
52, 51, 64, 52, 51, 65, 52, 51, 66, 52, 51, 52,
67, 51, 68, 69, 71, 70, 72, 73, 74, 75, 76, 77,
70, 0, 78, 0, 79, 0, 81, 82, 80, 84, 85, 83,
88, 87, 89, 87, 86, 92, 91, 93, 91, 90, 92, 91,
94, 91, 90, 92, 91, 95, 91, 90, 97, 96, 96, 0,
5, 98, 98, 0, 100, 101, 99, 5, 0, 102, 0, 103,
0, 104, 0, 105, 0, 106, 0, 107, 0, 108, 0, 109,
0, 110, 0, 111, 0, 112, 0, 113, 0, 114, 0, 115,
0, 0, 0, 0, 0, 116, 117, 118, 117, 117, 120, 119,
116, 5, 121, 10, 121, 0, 122, 123, 122, 0, 126, 125,
127, 128, 125, 124, 0, 130, 131, 129, 0, 130, 129, 126,
132, 130, 131, 132, 129, 133, 134, 126, 135, 136, 137, 138,
139, 140, 141, 135, 0, 142, 0, 143, 0, 144, 0, 145,
0, 146, 0, 147, 0, 148, 0, 149, 0, 150, 0, 24,
0, 151, 25, 0, 152, 0, 153, 0, 154, 0, 155, 0,
156, 0, 157, 0, 158, 0, 159, 0, 160, 0, 161, 0,
163, 162, 165, 164, 166, 167, 165, 168, 169, 170, 169, 168,
164, 171, 172, 173, 165, 164, 174, 165, 164, 175, 165, 164,
176, 165, 164, 177, 165, 164, 178, 165, 164, 179, 165, 164,
180, 165, 164, 181, 165, 164, 165, 182, 164, 183, 165, 164,
173, 165, 164, 184, 165, 164, 185, 165, 164, 186, 165, 164,
187, 165, 164, 188, 165, 164, 189, 165, 164, 190, 165, 164,
191, 165, 164, 192, 165, 164, 193, 165, 164, 165, 194, 164,
195, 165, 164, 196, 165, 164, 197, 165, 164, 198, 165, 164,
199, 165, 164, 200, 165, 164, 201, 165, 164, 193, 165, 164,
202, 203, 165, 164, 204, 165, 164, 205, 165, 164, 206, 165,
164, 207, 165, 164, 208, 165, 164, 209, 165, 164, 210, 165,
164, 211, 165, 164, 165, 212, 164, 213, 165, 164, 214, 165,
164, 215, 165, 164, 193, 165, 164, 216, 165, 164, 217, 165,
164, 218, 165, 164, 219, 165, 164, 220, 165, 164, 221, 165,
164, 222, 165, 164, 223, 165, 164, 224, 165, 164, 193, 165,
164, 165, 225, 164, 165, 226, 164, 165, 227, 164, 165, 228,
164, 165, 229, 164, 165, 230, 164, 165, 231, 164, 165, 232,
164, 165, 233, 164, 165, 234, 164, 165, 235, 164, 165, 236,
164, 165, 237, 164, 165, 238, 164, 239, 0, 240, 241, 0,
242, 0, 243, 0, 244, 0, 245, 0, 246, 0, 247, 0,
248, 0, 249, 0, 250, 0, 251, 0, 252, 0, 253, 0,
254, 0, 255, 0, 256, 0, 257, 0, 258, 0, 259, 0,
260, 0, 261, 0, 263, 262, 265, 264, 266, 267, 265, 268,
269, 270, 271, 269, 268, 264, 272, 273, 274, 275, 265, 264,
276, 265, 264, 277, 265, 264, 278, 265, 264, 279, 265, 264,
280, 265, 264, 281, 265, 264, 282, 265, 264, 283, 265, 264,
265, 284, 264, 285, 265, 264, 286, 265, 264, 287, 265, 264,
283, 265, 264, 288, 265, 264, 289, 265, 264, 265, 290, 264,
291, 265, 264, 292, 265, 264, 293, 265, 264, 294, 265, 264,
295, 265, 264, 283, 265, 264, 296, 265, 264, 297, 265, 264,
298, 265, 264, 299, 265, 264, 300, 265, 264, 301, 265, 264,
302, 265, 264, 303, 265, 264, 304, 265, 264, 305, 265, 264,
265, 284, 264, 306, 307, 265, 264, 308, 265, 264, 309, 265,
264, 310, 265, 264, 311, 265, 264, 312, 265, 264, 313, 265,
264, 314, 265, 264, 315, 265, 264, 316, 265, 264, 283, 265,
264, 317, 265, 284, 264, 318, 265, 264, 319, 265, 264, 320,
265, 264, 321, 265, 264, 322, 265, 264, 323, 265, 264, 324,
265, 264, 325, 265, 264, 305, 265, 264, 265, 326, 264, 265,
327, 264, 265, 328, 264, 265, 329, 264, 265, 330, 264, 265,
331, 264, 265, 332, 264, 265, 333, 264, 265, 334, 264, 265,
335, 264, 265, 336, 264, 265, 337, 264, 265, 338, 264, 265,
339, 264, 340, 0, 24, 0, 341, 0, 342, 0, 343, 0,
344, 0, 345, 0, 346, 0, 347, 0, 348, 0, 24, 0,
349, 0, 350, 0, 351, 0, 352, 0, 353, 0, 354, 0,
355, 0, 356, 0, 357, 0, 359, 358, 361, 360, 362, 363,
361, 364, 365, 366, 367, 365, 364, 360, 368, 369, 370, 371,
361, 360, 372, 361, 360, 373, 361, 360, 374, 361, 360, 375,
361, 360, 376, 361, 360, 377, 361, 360, 378, 361, 360, 379,
361, 360, 361, 380, 360, 381, 361, 360, 382, 383, 361, 360,
384, 361, 360, 385, 361, 360, 386, 361, 360, 387, 361, 360,
388, 361, 360, 389, 361, 360, 361, 390, 360, 391, 361, 360,
371, 361, 360, 392, 361, 360, 393, 361, 360, 394, 361, 360,
395, 361, 360, 396, 361, 360, 397, 361, 360, 398, 361, 360,
399, 361, 360, 400, 361, 360, 401, 361, 360, 361, 380, 360,
402, 361, 360, 379, 361, 360, 403, 361, 360, 404, 361, 360,
361, 405, 360, 406, 361, 360, 407, 361, 360, 408, 361, 360,
409, 361, 360, 410, 361, 360, 379, 361, 360, 411, 412, 361,
360, 413, 361, 360, 414, 361, 360, 415, 361, 360, 416, 361,
360, 417, 361, 360, 418, 361, 360, 419, 361, 360, 420, 361,
360, 421, 361, 360, 379, 361, 360, 422, 361, 380, 360, 423,
361, 360, 424, 361, 360, 425, 361, 360, 426, 361, 360, 427,
361, 360, 428, 361, 360, 429, 361, 360, 430, 361, 360, 401,
361, 360, 361, 431, 360, 361, 432, 360, 361, 433, 360, 361,
434, 360, 361, 435, 360, 361, 436, 360, 361, 437, 360, 361,
438, 360, 361, 439, 360, 361, 440, 360, 361, 441, 360, 361,
442, 360, 361, 443, 360, 361, 444, 360, 445, 0, 446, 0,
447, 0, 448, 0, 449, 0, 450, 0, 451, 0, 452, 0,
453, 0, 454, 0, 455, 0, 457, 456, 459, 458, 460, 461,
459, 462, 463, 464, 465, 463, 462, 458, 466, 467, 468, 469,
470, 459, 458, 471, 459, 458, 472, 459, 458, 473, 459, 458,
474, 459, 458, 475, 459, 458, 476, 459, 458, 477, 459, 458,
478, 459, 458, 459, 479, 458, 480, 459, 458, 481, 482, 459,
458, 483, 459, 458, 484, 459, 458, 485, 459, 458, 486, 459,
458, 487, 459, 458, 488, 459, 458, 459, 489, 458, 490, 459,
458, 470, 459, 458, 491, 459, 458, 492, 459, 458, 493, 459,
458, 494, 459, 458, 495, 459, 458, 496, 459, 458, 497, 459,
458, 498, 459, 458, 499, 459, 458, 500, 459, 458, 459, 479,
458, 501, 459, 458, 478, 459, 458, 502, 459, 458, 503, 459,
458, 459, 504, 458, 505, 459, 458, 506, 459, 458, 507, 459,
458, 508, 459, 458, 509, 459, 458, 478, 459, 458, 510, 459,
458, 511, 459, 458, 512, 459, 458, 513, 459, 458, 514, 459,
458, 515, 459, 458, 516, 459, 458, 500, 459, 458, 517, 518,
459, 458, 519, 459, 458, 520, 459, 458, 521, 459, 458, 522,
459, 458, 523, 459, 458, 524, 459, 458, 525, 459, 458, 526,
459, 458, 527, 459, 458, 478, 459, 458, 528, 459, 479, 458,
529, 459, 458, 530, 459, 458, 531, 459, 458, 532, 459, 458,
533, 459, 458, 534, 459, 458, 535, 459, 458, 536, 459, 458,
500, 459, 458, 459, 537, 458, 459, 538, 458, 459, 539, 458,
459, 540, 458, 459, 541, 458, 459, 542, 458, 459, 543, 458,
459, 544, 458, 459, 545, 458, 459, 546, 458, 459, 547, 458,
459, 548, 458, 459, 549, 458, 459, 550, 458, 551, 0, 4,
0, 552, 0
};
}
private static final short _lexer_indicies[] = init__lexer_indicies_0();
private static short[] init__lexer_trans_targs_0()
{
return new short [] {
0, 2, 15, 469, 14, 14, 46, 56, 58, 11, 72, 75,
3, 174, 270, 279, 369, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 57, 13, 14, 57, 16, 81, 91, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 31, 32, 33, 32, 14, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 2, 15, 14, 14,
46, 56, 58, 11, 72, 75, 47, 48, 49, 50, 49, 49,
50, 49, 51, 51, 51, 52, 51, 51, 51, 52, 53, 54,
55, 14, 55, 56, 14, 57, 59, 60, 61, 62, 63, 64,
65, 66, 67, 68, 69, 70, 71, 471, 73, 74, 14, 73,
72, 74, 75, 76, 77, 79, 80, 78, 76, 77, 78, 76,
79, 2, 15, 80, 46, 56, 58, 11, 72, 75, 82, 83,
84, 85, 86, 87, 88, 89, 90, 92, 93, 94, 95, 96,
97, 98, 99, 100, 101, 102, 103, 104, 103, 104, 105, 136,
104, 14, 160, 106, 128, 117, 107, 108, 109, 110, 111, 112,
113, 114, 115, 116, 118, 119, 120, 121, 122, 123, 124, 125,
126, 127, 45, 129, 130, 131, 132, 133, 134, 135, 137, 150,
138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
151, 152, 153, 154, 155, 156, 157, 158, 159, 161, 162, 163,
164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 14, 175,
176, 268, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
197, 198, 199, 233, 198, 14, 254, 208, 200, 209, 213, 222,
201, 202, 203, 204, 205, 206, 207, 208, 45, 210, 211, 212,
214, 215, 216, 217, 218, 219, 220, 221, 223, 224, 225, 226,
227, 228, 229, 230, 231, 232, 234, 244, 235, 236, 237, 238,
239, 240, 241, 242, 243, 245, 246, 247, 248, 249, 250, 251,
252, 253, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 14, 269, 271, 272, 273, 274, 275, 276, 277,
278, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
289, 290, 291, 334, 290, 14, 355, 300, 292, 301, 325, 312,
293, 294, 295, 296, 297, 298, 299, 300, 45, 302, 303, 323,
304, 305, 306, 307, 308, 309, 310, 311, 313, 314, 315, 316,
317, 318, 319, 320, 321, 322, 324, 326, 327, 328, 329, 330,
331, 332, 333, 335, 345, 336, 337, 338, 339, 340, 341, 342,
343, 344, 346, 347, 348, 349, 350, 351, 352, 353, 354, 356,
357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
14, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
381, 382, 381, 382, 383, 434, 382, 14, 455, 392, 384, 393,
417, 426, 404, 385, 386, 387, 388, 389, 390, 391, 392, 45,
394, 395, 415, 396, 397, 398, 399, 400, 401, 402, 403, 405,
406, 407, 408, 409, 410, 411, 412, 413, 414, 416, 418, 419,
420, 421, 422, 423, 424, 425, 427, 428, 429, 430, 431, 432,
433, 435, 445, 436, 437, 438, 439, 440, 441, 442, 443, 444,
446, 447, 448, 449, 450, 451, 452, 453, 454, 456, 457, 458,
459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 14, 470,
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, 0, 0, 54, 3, 1, 0, 29, 1, 35,
0, 0, 0, 0, 0, 0, 0, 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, 57, 144, 0, 54, 84, 0, 81, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 21, 63, 63, 31, 130,
60, 57, 31, 63, 57, 66, 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, 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, 57, 144, 0, 54, 84, 84,
0, 69, 33, 0, 0, 0, 0, 0, 0, 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, 17, 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, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 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 = 471;
static final int lexer_en_main = 1;
// line 159 "ragel/i18n/fa.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 655 "java/src/main/java/gherkin/lexer/Fa.java"
{
cs = lexer_start;
}
// line 185 "ragel/i18n/fa.java.rl"
// line 662 "java/src/main/java/gherkin/lexer/Fa.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/fa.java.rl"
{
contentStart = p;
currentLine = lineNumber;
if(keyword != null) {
startCol = p - lastNewline - (keyword.length() + 1);
}
}
break;
case 1:
// line 24 "ragel/i18n/fa.java.rl"
{
currentLine = lineNumber;
startCol = p - lastNewline;
}
break;
case 2:
// line 29 "ragel/i18n/fa.java.rl"
{
contentStart = p;
}
break;
case 3:
// line 33 "ragel/i18n/fa.java.rl"
{
docstringContentTypeStart = p;
}
break;
case 4:
// line 37 "ragel/i18n/fa.java.rl"
{
docstringContentTypeEnd = p;
}
break;
case 5:
// line 41 "ragel/i18n/fa.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/fa.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/fa.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/fa.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/fa.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/fa.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/fa.java.rl"
{
listener.step(keyword, substring(data, contentStart, p).trim(), currentLine);
}
break;
case 12:
// line 86 "ragel/i18n/fa.java.rl"
{
listener.comment(substring(data, contentStart, p).trim(), lineNumber);
keywordStart = -1;
}
break;
case 13:
// line 91 "ragel/i18n/fa.java.rl"
{
listener.tag(substring(data, contentStart, p).trim(), currentLine);
keywordStart = -1;
}
break;
case 14:
// line 96 "ragel/i18n/fa.java.rl"
{
lineNumber++;
}
break;
case 15:
// line 100 "ragel/i18n/fa.java.rl"
{
lastNewline = p + 1;
}
break;
case 16:
// line 104 "ragel/i18n/fa.java.rl"
{
if(keywordStart == -1) keywordStart = p;
}
break;
case 17:
// line 108 "ragel/i18n/fa.java.rl"
{
keyword = substring(data, keywordStart, p).replaceFirst(":$","");
keywordStart = -1;
}
break;
case 18:
// line 113 "ragel/i18n/fa.java.rl"
{
nextKeywordStart = p;
}
break;
case 19:
// line 117 "ragel/i18n/fa.java.rl"
{
p = p - 1;
currentRow = new ArrayList<String>();
currentLine = lineNumber;
}
break;
case 20:
// line 123 "ragel/i18n/fa.java.rl"
{
contentStart = p;
}
break;
case 21:
// line 127 "ragel/i18n/fa.java.rl"
{
String con = substring(data, contentStart, p).trim();
currentRow.add(con
.replace("\\|", "|")
.replace("\\n", "\n")
.replace("\\\\", "\\")
);
}
break;
case 22:
// line 136 "ragel/i18n/fa.java.rl"
{
listener.row(currentRow, currentLine);
}
break;
case 23:
// line 140 "ragel/i18n/fa.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 923 "java/src/main/java/gherkin/lexer/Fa.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/fa.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 955 "java/src/main/java/gherkin/lexer/Fa.java"
}
}
}
case 5:
}
break; }
}
// line 186 "ragel/i18n/fa.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);
}
}
}