Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
gherkin.lexer.Is Maven / Gradle / Ivy
// line 1 "ragel/i18n/is.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 Is implements Lexer {
// line 150 "ragel/i18n/is.java.rl"
private final Listener listener;
public Is(Listener listener) {
this.listener = listener;
}
// line 26 "java/src/main/java/gherkin/lexer/Is.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, 18, 19, 21, 22, 23, 25, 27, 44, 45, 46,
48, 50, 55, 60, 65, 70, 74, 78, 80, 81, 82, 83,
84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
100, 107, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
122, 123, 125, 126, 127, 141, 143, 146, 148, 150, 167, 168,
169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 192,
194, 197, 199, 201, 203, 205, 207, 209, 211, 213, 215, 217,
219, 221, 223, 225, 227, 229, 231, 233, 235, 237, 239, 241,
243, 245, 247, 249, 251, 253, 255, 257, 259, 263, 265, 267,
269, 271, 273, 275, 277, 279, 281, 283, 285, 287, 289, 291,
293, 296, 298, 300, 302, 304, 306, 308, 310, 312, 314, 316,
318, 320, 322, 324, 326, 328, 330, 332, 333, 334, 335, 336,
337, 338, 339, 346, 348, 350, 352, 354, 356, 358, 360, 362,
364, 366, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
379, 380, 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, 445, 447, 449, 451, 453, 455, 457, 459,
461, 463, 465, 467, 469, 471, 473, 475, 477, 479, 481, 483,
485, 487, 489, 491, 493, 495, 497, 499, 501, 503, 506, 508,
510, 512, 514, 516, 518, 520, 522, 524, 526, 528, 530, 532,
534, 536, 538, 539, 540, 541, 542, 543, 544, 545, 547, 548,
549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
561, 562, 563, 575, 577, 580, 582, 584, 586, 588, 590, 592,
594, 596, 598, 600, 602, 604, 606, 608, 610, 612, 614, 616,
618, 620, 622, 624, 626, 628, 630, 632, 634, 636, 638, 640,
642, 646, 648, 650, 652, 654, 656, 658, 660, 662, 664, 665,
666, 667, 668, 669, 673, 679, 682, 684, 690, 707, 709, 711,
713, 715, 717, 719, 721, 723, 725, 727, 729, 731, 733, 735,
737, 739, 741, 743, 745, 747, 749, 751, 753, 755, 757, 759,
761, 763, 765, 767, 769, 771, 773, 775, 777, 779, 781, 783,
787, 789, 791, 793, 795, 797, 799, 801, 803, 805, 807, 809,
811, 813, 815, 817, 820, 822, 824, 826, 828, 830, 832, 834,
836, 838, 840, 842, 844, 846, 848, 850, 852, 854, 855, 856,
857, 858, 859, 860
};
}
private static final short _lexer_key_offsets[] = init__lexer_key_offsets_0();
private static byte[] init__lexer_trans_keys_0()
{
return new byte [] {
-61, -17, 10, 32, 34, 35, 37, 42, 64, 65, 66, 68,
69, 76, 79, 124, 9, 13, -98, -61, 101, -95, 32, 10,
13, 10, 13, -61, 10, 32, 34, 35, 37, 42, 64, 65,
66, 68, 69, 76, 79, 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, 116, 98, 117, 114, -61, -80, 97, 114,
-61, -95, 115, 58, 105, 10, 10, -61, 10, 32, 35, 37,
42, 64, 65, 66, 69, 76, 79, 9, 13, -98, 10, -61,
10, 101, -95, 10, 10, 32, -61, 10, 32, 34, 35, 37,
42, 64, 65, 66, 68, 69, 76, 79, 124, 9, 13, 97,
107, 103, 114, 117, 110, 110, 117, 114, 58, 10, 10, -61,
10, 32, 35, 37, 42, 64, 65, 69, 76, 79, 9, 13,
-98, 10, -61, 10, 101, -95, 10, 10, 32, 10, 103, 10,
97, 10, 114, 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, 116, 10, 98, 10,
117, 10, 114, -61, 10, -80, 10, 10, 97, 10, 114, -61,
10, -95, 10, 10, 115, 10, 58, 10, 102, 105, 110, 10,
103, 10, 105, 10, 110, 10, 108, 10, 101, 10, 105, 10,
107, 10, 105, -61, 10, -67, 10, 10, 115, 10, 105, 10,
110, 10, 103, 10, 32, 10, 65, 68, 10, 116, 10, 98,
10, 117, 10, 114, -61, 10, -80, 10, 10, 97, 10, 114,
-61, 10, -95, 10, 10, 115, 10, 97, 10, 114, -61, 10,
-90, 10, 10, 109, 10, 97, 10, 103, -61, -90, 109, 105,
58, 10, 10, 10, 32, 35, 69, 124, 9, 13, 10, 105,
10, 103, 10, 105, 10, 110, 10, 108, 10, 101, 10, 105,
10, 107, 10, 105, 10, 58, 102, 105, 110, 103, 105, 110,
108, 101, 105, 107, 105, 58, 10, 10, 10, 32, 35, 37,
64, 65, 66, 68, 69, 76, 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, 116, 10, 98, 10, 117, 10, 114, -61, 10, -80, 10,
10, 97, 10, 114, -61, 10, -95, 10, 10, 115, 10, 58,
105, 10, 114, 10, 58, 10, 97, 10, 107, 10, 103, 10,
114, 10, 117, 10, 110, 10, 110, 10, 117, -61, 10, -90,
10, 10, 109, 10, 105, 10, 105, 10, 103, 10, 105, 10,
110, 10, 108, 10, 101, 10, 105, 10, 107, -61, 10, -67,
10, 10, 115, 10, 105, 10, 110, 10, 103, 10, 32, 10,
65, 68, 10, 116, 10, 98, 10, 117, 10, 114, -61, 10,
-80, 10, 10, 97, 10, 114, -61, 10, -95, 10, 10, 115,
10, 97, -61, 10, -90, 10, 10, 109, 10, 97, -61, -67,
115, 105, 110, 103, 32, 65, 68, 116, 98, 117, 114, -61,
-80, 97, 114, -61, -95, 115, 97, 114, 58, 10, 10, -61,
10, 32, 35, 37, 42, 64, 65, 69, 79, 9, 13, -98,
10, -61, 10, 101, -95, 10, 10, 32, 10, 103, 10, 97,
10, 114, 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, 116, 10, 98, 10, 117,
10, 114, -61, 10, -80, 10, 10, 97, 10, 114, -61, 10,
-95, 10, 10, 115, 10, 58, 10, 102, 105, 110, 10, 103,
10, 105, 10, 110, 10, 108, 10, 101, 10, 105, 10, 107,
10, 105, 10, 103, -61, -90, 109, 97, 103, 32, 124, 9,
13, 10, 32, 92, 124, 9, 13, 10, 92, 124, 10, 92,
10, 32, 92, 124, 9, 13, -61, 10, 32, 34, 35, 37,
42, 64, 65, 66, 68, 69, 76, 79, 124, 9, 13, 10,
103, 10, 97, 10, 114, 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, 116, 10,
98, 10, 117, 10, 114, -61, 10, -80, 10, 10, 97, 10,
114, -61, 10, -95, 10, 10, 115, 10, 58, 10, 97, 10,
107, 10, 103, 10, 114, 10, 117, 10, 110, 10, 110, 10,
117, 10, 114, 10, 102, 105, 110, 10, 103, 10, 105, 10,
110, 10, 108, 10, 101, 10, 105, 10, 107, 10, 105, -61,
10, -67, 10, 10, 115, 10, 105, 10, 110, 10, 103, 10,
32, 10, 65, 68, 10, 116, 10, 98, 10, 117, 10, 114,
-61, 10, -80, 10, 10, 97, 10, 114, -61, 10, -95, 10,
10, 115, 10, 97, -61, 10, -90, 10, 10, 109, 10, 97,
10, 103, 114, 103, 97, 114, -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, 16, 1, 2, 1, 1, 2, 2, 15, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 1, 1, 12, 2, 3, 2, 2, 15, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 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, 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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
};
}
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, 18, 20, 23, 25, 27, 30, 33, 50, 52, 54,
57, 60, 65, 70, 75, 80, 84, 88, 91, 93, 95, 97,
99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121,
126, 133, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156,
158, 160, 163, 165, 167, 181, 184, 188, 191, 194, 211, 213,
215, 217, 219, 221, 223, 225, 227, 229, 231, 233, 235, 248,
251, 255, 258, 261, 264, 267, 270, 273, 276, 279, 282, 285,
288, 291, 294, 297, 300, 303, 306, 309, 312, 315, 318, 321,
324, 327, 330, 333, 336, 339, 342, 345, 348, 353, 356, 359,
362, 365, 368, 371, 374, 377, 380, 383, 386, 389, 392, 395,
398, 402, 405, 408, 411, 414, 417, 420, 423, 426, 429, 432,
435, 438, 441, 444, 447, 450, 453, 456, 458, 460, 462, 464,
466, 468, 470, 477, 480, 483, 486, 489, 492, 495, 498, 501,
504, 507, 511, 513, 515, 517, 519, 521, 523, 525, 527, 529,
531, 533, 545, 548, 551, 554, 557, 560, 563, 566, 569, 572,
575, 578, 581, 584, 587, 590, 593, 596, 599, 602, 605, 608,
611, 614, 617, 620, 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, 702, 705, 708, 711, 715, 718,
721, 724, 727, 730, 733, 736, 739, 742, 745, 748, 751, 754,
757, 760, 763, 765, 767, 769, 771, 773, 775, 777, 780, 782,
784, 786, 788, 790, 792, 794, 796, 798, 800, 802, 804, 806,
808, 810, 812, 824, 827, 831, 834, 837, 840, 843, 846, 849,
852, 855, 858, 861, 864, 867, 870, 873, 876, 879, 882, 885,
888, 891, 894, 897, 900, 903, 906, 909, 912, 915, 918, 921,
924, 929, 932, 935, 938, 941, 944, 947, 950, 953, 956, 958,
960, 962, 964, 966, 970, 976, 980, 983, 989, 1006, 1009, 1012,
1015, 1018, 1021, 1024, 1027, 1030, 1033, 1036, 1039, 1042, 1045, 1048,
1051, 1054, 1057, 1060, 1063, 1066, 1069, 1072, 1075, 1078, 1081, 1084,
1087, 1090, 1093, 1096, 1099, 1102, 1105, 1108, 1111, 1114, 1117, 1120,
1125, 1128, 1131, 1134, 1137, 1140, 1143, 1146, 1149, 1152, 1155, 1158,
1161, 1164, 1167, 1170, 1174, 1177, 1180, 1183, 1186, 1189, 1192, 1195,
1198, 1201, 1204, 1207, 1210, 1213, 1216, 1219, 1222, 1225, 1227, 1229,
1231, 1233, 1235, 1237
};
}
private static final short _lexer_index_offsets[] = init__lexer_index_offsets_0();
private static short[] init__lexer_indicies_0()
{
return new short [] {
1, 2, 4, 3, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 3, 0, 17, 0, 18, 19, 0, 20,
0, 21, 0, 23, 24, 22, 26, 27, 25, 1, 4, 3,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
3, 0, 28, 0, 29, 0, 31, 32, 30, 34, 35, 33,
38, 37, 39, 37, 36, 42, 41, 43, 41, 40, 42, 41,
44, 41, 40, 42, 41, 45, 41, 40, 47, 46, 46, 0,
4, 48, 48, 0, 50, 51, 49, 4, 0, 52, 0, 53,
0, 54, 0, 55, 0, 56, 0, 57, 0, 58, 0, 59,
0, 60, 0, 61, 0, 62, 0, 63, 0, 64, 0, 65,
0, 0, 0, 0, 0, 66, 67, 68, 67, 67, 70, 69,
66, 4, 71, 9, 71, 0, 72, 0, 73, 0, 74, 0,
75, 0, 76, 0, 77, 0, 78, 0, 79, 0, 80, 0,
81, 0, 82, 0, 83, 84, 0, 86, 85, 88, 87, 89,
88, 90, 91, 92, 93, 91, 94, 95, 96, 97, 98, 90,
87, 99, 88, 87, 100, 88, 101, 87, 102, 88, 87, 88,
103, 87, 104, 106, 105, 107, 108, 109, 110, 111, 112, 113,
114, 115, 116, 117, 118, 105, 0, 119, 0, 120, 0, 121,
0, 122, 0, 123, 0, 124, 0, 125, 0, 126, 0, 127,
0, 128, 0, 130, 129, 132, 131, 133, 132, 134, 135, 136,
137, 135, 138, 139, 140, 141, 134, 131, 142, 132, 131, 143,
132, 144, 131, 145, 132, 131, 132, 146, 131, 132, 147, 131,
132, 148, 131, 132, 145, 131, 132, 149, 131, 132, 150, 131,
132, 151, 131, 132, 152, 131, 132, 153, 131, 132, 154, 131,
132, 155, 131, 132, 156, 131, 132, 157, 131, 132, 158, 131,
132, 159, 131, 132, 160, 131, 132, 161, 131, 132, 162, 131,
132, 163, 131, 132, 164, 131, 132, 165, 131, 132, 166, 131,
167, 132, 131, 168, 132, 131, 132, 169, 131, 132, 170, 131,
171, 132, 131, 172, 132, 131, 132, 173, 131, 132, 146, 131,
132, 145, 174, 145, 131, 132, 175, 131, 132, 176, 131, 132,
177, 131, 132, 178, 131, 132, 179, 131, 132, 180, 131, 132,
181, 131, 132, 173, 131, 182, 132, 131, 183, 132, 131, 132,
184, 131, 132, 185, 131, 132, 186, 131, 132, 187, 131, 132,
188, 131, 132, 189, 190, 131, 132, 191, 131, 132, 192, 131,
132, 193, 131, 132, 194, 131, 195, 132, 131, 196, 132, 131,
132, 197, 131, 132, 198, 131, 199, 132, 131, 200, 132, 131,
132, 201, 131, 132, 202, 131, 132, 173, 131, 203, 132, 131,
204, 132, 131, 132, 205, 131, 132, 173, 131, 132, 145, 131,
206, 0, 207, 0, 208, 0, 209, 0, 210, 0, 212, 211,
214, 213, 214, 215, 216, 217, 216, 215, 213, 214, 218, 213,
214, 219, 213, 214, 220, 213, 214, 221, 213, 214, 222, 213,
214, 223, 213, 214, 224, 213, 214, 225, 213, 214, 226, 213,
214, 227, 213, 20, 228, 20, 0, 229, 0, 230, 0, 231,
0, 232, 0, 233, 0, 234, 0, 235, 0, 236, 0, 237,
0, 239, 238, 241, 240, 241, 242, 243, 244, 243, 245, 246,
247, 248, 249, 242, 240, 241, 250, 240, 241, 251, 240, 241,
252, 240, 241, 253, 240, 241, 254, 240, 241, 255, 240, 241,
256, 240, 241, 257, 240, 241, 258, 240, 241, 259, 240, 241,
260, 240, 241, 261, 240, 241, 262, 240, 241, 263, 240, 241,
264, 240, 241, 265, 240, 241, 266, 240, 241, 267, 240, 268,
241, 240, 269, 241, 240, 241, 270, 240, 241, 271, 240, 272,
241, 240, 273, 241, 240, 241, 274, 240, 241, 275, 276, 240,
241, 277, 240, 241, 275, 240, 241, 278, 240, 241, 279, 240,
241, 280, 240, 241, 281, 240, 241, 282, 240, 241, 283, 240,
241, 284, 240, 241, 276, 240, 285, 241, 240, 286, 241, 240,
241, 287, 240, 241, 277, 240, 241, 288, 240, 241, 289, 240,
241, 290, 240, 241, 291, 240, 241, 292, 240, 241, 293, 240,
241, 294, 240, 241, 287, 240, 295, 241, 240, 296, 241, 240,
241, 297, 240, 241, 298, 240, 241, 299, 240, 241, 300, 240,
241, 301, 240, 241, 302, 303, 240, 241, 304, 240, 241, 305,
240, 241, 306, 240, 241, 307, 240, 308, 241, 240, 309, 241,
240, 241, 310, 240, 241, 311, 240, 312, 241, 240, 313, 241,
240, 241, 314, 240, 241, 276, 240, 315, 241, 240, 316, 241,
240, 241, 317, 240, 241, 277, 240, 318, 0, 319, 0, 320,
0, 321, 0, 322, 0, 323, 0, 324, 0, 325, 326, 0,
327, 0, 328, 0, 329, 0, 330, 0, 331, 0, 332, 0,
333, 0, 334, 0, 335, 0, 336, 0, 337, 0, 338, 0,
339, 0, 340, 0, 342, 341, 344, 343, 345, 344, 346, 347,
348, 349, 347, 350, 351, 352, 346, 343, 353, 344, 343, 354,
344, 355, 343, 356, 344, 343, 344, 357, 343, 344, 358, 343,
344, 359, 343, 344, 356, 343, 344, 360, 343, 344, 361, 343,
344, 362, 343, 344, 363, 343, 344, 364, 343, 344, 365, 343,
344, 366, 343, 344, 367, 343, 344, 368, 343, 344, 369, 343,
344, 370, 343, 344, 371, 343, 344, 372, 343, 344, 373, 343,
344, 374, 343, 344, 375, 343, 344, 376, 343, 344, 377, 343,
378, 344, 343, 379, 344, 343, 344, 380, 343, 344, 381, 343,
382, 344, 343, 383, 344, 343, 344, 384, 343, 344, 357, 343,
344, 356, 385, 356, 343, 344, 386, 343, 344, 387, 343, 344,
388, 343, 344, 389, 343, 344, 390, 343, 344, 391, 343, 344,
392, 343, 344, 384, 343, 344, 356, 343, 393, 0, 394, 0,
395, 0, 339, 0, 20, 0, 396, 397, 396, 0, 400, 399,
401, 402, 399, 398, 0, 404, 405, 403, 0, 404, 403, 400,
406, 404, 405, 406, 403, 407, 400, 408, 409, 410, 411, 412,
413, 414, 415, 416, 417, 418, 419, 420, 408, 0, 88, 421,
87, 88, 422, 87, 88, 102, 87, 88, 423, 87, 88, 424,
87, 88, 425, 87, 88, 426, 87, 88, 427, 87, 88, 428,
87, 88, 429, 87, 88, 430, 87, 88, 431, 87, 88, 432,
87, 88, 433, 87, 88, 434, 87, 88, 435, 87, 88, 436,
87, 88, 437, 87, 88, 438, 87, 88, 439, 87, 88, 440,
87, 441, 88, 87, 442, 88, 87, 88, 443, 87, 88, 444,
87, 445, 88, 87, 446, 88, 87, 88, 447, 87, 88, 103,
87, 88, 448, 87, 88, 449, 87, 88, 450, 87, 88, 451,
87, 88, 452, 87, 88, 453, 87, 88, 454, 87, 88, 455,
87, 88, 447, 87, 88, 102, 456, 102, 87, 88, 457, 87,
88, 458, 87, 88, 459, 87, 88, 460, 87, 88, 461, 87,
88, 462, 87, 88, 463, 87, 88, 447, 87, 464, 88, 87,
465, 88, 87, 88, 466, 87, 88, 467, 87, 88, 468, 87,
88, 469, 87, 88, 470, 87, 88, 471, 472, 87, 88, 473,
87, 88, 474, 87, 88, 475, 87, 88, 476, 87, 477, 88,
87, 478, 88, 87, 88, 479, 87, 88, 480, 87, 481, 88,
87, 482, 88, 87, 88, 483, 87, 88, 455, 87, 484, 88,
87, 485, 88, 87, 88, 486, 87, 88, 447, 87, 88, 102,
87, 209, 0, 487, 0, 488, 0, 20, 0, 489, 0, 3,
0, 490, 0
};
}
private static final short _lexer_indicies[] = init__lexer_indicies_0();
private static short[] init__lexer_trans_targs_0()
{
return new short [] {
0, 2, 397, 8, 8, 9, 19, 21, 5, 35, 38, 58,
139, 157, 242, 314, 315, 3, 4, 394, 5, 6, 7, 8,
20, 7, 8, 20, 10, 11, 12, 13, 12, 12, 13, 12,
14, 14, 14, 15, 14, 14, 14, 15, 16, 17, 18, 8,
18, 19, 8, 20, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 399, 36, 37, 8, 36, 35, 37,
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
393, 51, 52, 51, 52, 53, 52, 8, 324, 56, 338, 350,
359, 368, 392, 54, 55, 321, 56, 57, 2, 8, 8, 9,
19, 21, 5, 35, 38, 58, 139, 157, 242, 314, 315, 59,
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 69,
70, 71, 70, 8, 78, 74, 92, 104, 113, 138, 72, 73,
75, 74, 57, 76, 77, 79, 80, 81, 82, 83, 84, 85,
86, 87, 88, 89, 90, 91, 8, 93, 94, 95, 96, 97,
98, 99, 100, 101, 102, 103, 105, 106, 107, 108, 109, 110,
111, 112, 114, 115, 116, 117, 118, 119, 120, 121, 134, 122,
123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135,
136, 137, 140, 141, 142, 143, 144, 145, 146, 145, 146, 146,
8, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 57,
158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
168, 169, 169, 8, 170, 184, 198, 206, 210, 218, 171, 172,
173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 8,
185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 57,
196, 197, 199, 200, 201, 202, 203, 204, 205, 207, 208, 209,
211, 212, 213, 214, 215, 216, 217, 219, 220, 221, 222, 223,
224, 225, 226, 238, 227, 228, 229, 230, 231, 232, 233, 234,
235, 236, 237, 239, 240, 241, 243, 244, 245, 246, 247, 248,
249, 250, 310, 251, 252, 253, 254, 255, 256, 257, 258, 259,
260, 261, 262, 263, 264, 265, 266, 265, 266, 267, 266, 8,
274, 270, 288, 300, 309, 268, 269, 271, 270, 57, 272, 273,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
287, 8, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
299, 301, 302, 303, 304, 305, 306, 307, 308, 311, 312, 313,
315, 316, 317, 319, 320, 318, 316, 317, 318, 316, 319, 2,
320, 9, 19, 21, 5, 35, 38, 58, 139, 157, 242, 314,
315, 322, 323, 325, 326, 327, 328, 329, 330, 331, 332, 333,
334, 335, 336, 337, 8, 339, 340, 341, 342, 343, 344, 345,
346, 347, 348, 349, 351, 352, 353, 354, 355, 356, 357, 358,
360, 361, 362, 363, 364, 365, 366, 367, 369, 370, 371, 372,
373, 374, 375, 376, 388, 377, 378, 379, 380, 381, 382, 383,
384, 385, 386, 387, 389, 390, 391, 395, 396, 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, 29, 0, 0, 54, 3, 1, 0, 29, 1, 29, 29,
29, 29, 29, 29, 35, 0, 0, 0, 0, 0, 57, 149,
126, 0, 110, 23, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 57, 144, 0, 54, 84, 0, 75, 33, 84, 84, 84,
84, 84, 84, 0, 0, 0, 0, 17, 63, 31, 130, 60,
57, 31, 63, 57, 63, 63,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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
};
}
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
};
}
private static final short _lexer_eof_actions[] = init__lexer_eof_actions_0();
static final int lexer_start = 1;
static final int lexer_first_final = 399;
static final int lexer_en_main = 1;
// line 159 "ragel/i18n/is.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 currentRow = null;
// line 591 "java/src/main/java/gherkin/lexer/Is.java"
{
cs = lexer_start;
}
// line 185 "ragel/i18n/is.java.rl"
// line 598 "java/src/main/java/gherkin/lexer/Is.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/is.java.rl"
{
contentStart = p;
currentLine = lineNumber;
if(keyword != null) {
startCol = p - lastNewline - (keyword.length() + 1);
}
}
break;
case 1:
// line 24 "ragel/i18n/is.java.rl"
{
currentLine = lineNumber;
startCol = p - lastNewline;
}
break;
case 2:
// line 29 "ragel/i18n/is.java.rl"
{
contentStart = p;
}
break;
case 3:
// line 33 "ragel/i18n/is.java.rl"
{
docstringContentTypeStart = p;
}
break;
case 4:
// line 37 "ragel/i18n/is.java.rl"
{
docstringContentTypeEnd = p;
}
break;
case 5:
// line 41 "ragel/i18n/is.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/is.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/is.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/is.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/is.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/is.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/is.java.rl"
{
listener.step(keyword, substring(data, contentStart, p).trim(), currentLine);
}
break;
case 12:
// line 86 "ragel/i18n/is.java.rl"
{
listener.comment(substring(data, contentStart, p).trim(), lineNumber);
keywordStart = -1;
}
break;
case 13:
// line 91 "ragel/i18n/is.java.rl"
{
listener.tag(substring(data, contentStart, p).trim(), currentLine);
keywordStart = -1;
}
break;
case 14:
// line 96 "ragel/i18n/is.java.rl"
{
lineNumber++;
}
break;
case 15:
// line 100 "ragel/i18n/is.java.rl"
{
lastNewline = p + 1;
}
break;
case 16:
// line 104 "ragel/i18n/is.java.rl"
{
if(keywordStart == -1) keywordStart = p;
}
break;
case 17:
// line 108 "ragel/i18n/is.java.rl"
{
keyword = substring(data, keywordStart, p).replaceFirst(":$","");
keywordStart = -1;
}
break;
case 18:
// line 113 "ragel/i18n/is.java.rl"
{
nextKeywordStart = p;
}
break;
case 19:
// line 117 "ragel/i18n/is.java.rl"
{
p = p - 1;
currentRow = new ArrayList();
currentLine = lineNumber;
}
break;
case 20:
// line 123 "ragel/i18n/is.java.rl"
{
contentStart = p;
}
break;
case 21:
// line 127 "ragel/i18n/is.java.rl"
{
String con = substring(data, contentStart, p).trim();
currentRow.add(con
.replace("\\|", "|")
.replace("\\n", "\n")
.replace("\\\\", "\\")
);
}
break;
case 22:
// line 136 "ragel/i18n/is.java.rl"
{
listener.row(currentRow, currentLine);
}
break;
case 23:
// line 140 "ragel/i18n/is.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 859 "java/src/main/java/gherkin/lexer/Is.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/is.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 891 "java/src/main/java/gherkin/lexer/Is.java"
}
}
}
case 5:
}
break; }
}
// line 186 "ragel/i18n/is.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);
}
}
}