class Gherkin::RbLexer::Lv
:nodoc:
def current_line_content(data, p)
def current_line_content(data, p) rest = data[@last_newline..-1] rest[0..rest.index(10)||-1].utf8_pack("c*").strip end
def initialize(listener)
def initialize(listener) @listener = listener 16 "lib/gherkin/rb_lexer/lv.rb" << self accessor :_lexer_actions te :_lexer_actions, :_lexer_actions= lexer_actions = [ 0, 1, 1, 1, 2, 1, 4, 1, 5, 1, 6, 1, 9, 1, 10, 1, 11, 1, , 15, 1, 16, 1, 17, 1, , 19, 1, 20, 1, 21, 2, , 2, 11, 0, 2, 12, 13, , 0, 2, 15, 1, 2, 15, , 15, 17, 2, 16, 4, 2, , 2, 16, 6, 2, 16, 7, , 8, 2, 16, 14, 2, 18, , 20, 0, 2, 20, 1, 2, 4, 2, 20, 17, 3, 3, 12, , 9, 12, 13, 3, 10, 12, , 11, 12, 13, 3, 12, 13, , 15, 12, 13, 4, 2, 12, 6, 4, 15, 0, 12, 13 << self accessor :_lexer_key_offsets te :_lexer_key_offsets, :_lexer_key_offsets= lexer_key_offsets = [ 18, 19, 20, 24, 29, 34, 4, 48, 52, 54, 55, 56, 57, 9, 60, 61, 62, 63, 64, 65, 7, 68, 69, 70, 71, 73, 78, 0, 91, 92, 94, 95, 96, 97, 9, 100, 101, 110, 112, 114, 116, 120, 122, 124, 126, 128, 130, 132, 136, 138, 140, 142, 144, 146, 148, 152, 154, 156, 174, 175, 177, 178, 180, 181, 182, 183, 184, 185, 186, 188, 202, 204, 206, 208, 210, 212, 216, 218, 220, 222, 224, 226, 228, 232, 234, 236, 238, 240, 242, 244, 248, 250, 252, 254, 256, 258, 260, 265, 267, 269, 271, 273, 275, 277, 281, 283, 285, 287, 289, 291, 293, 295, 296, 297, 298, 299, 300, 301, 307, 308, 309, 310, 311, 312, 314, 316, 317, 318, 319, 320, 321, 322, 325, 326, 327, 328, 329, 330, 331, 333, 334, 335, 336, 337, 338, 339, 355, 357, 359, 361, 363, 365, 367, 371, 373, 375, 377, 379, 381, 383, 387, 389, 391, 393, 395, 397, 399, 403, 405, 407, 409, 411, 413, 415, 417, 431, 433, 435, 437, 439, 441, 445, 447, 449, 451, 453, 455, 457, 461, 463, 465, 467, 469, 471, 473, 477, 479, 481, 483, 485, 487, 489, 494, 496, 498, 500, 502, 504, 506, 510, 512, 514, 516, 518, 520, 521, 523, 524, 525, 526, 527, 528, 529, 534, 539, 540, 545, 563, 566, 568, 572, 574, 576, 578, 580, 582, 585, 589, 591, 593, 595, 597, 599, 601, 605, 607, 609, 611, 613, 615, 617, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 635, 636, << self accessor :_lexer_trans_keys te :_lexer_trans_keys, :_lexer_trans_keys= lexer_trans_keys = [ 2, 34, 35, 37, 42, 64, 66, 4, 75, 80, 83, 84, 85, 124, , 34, 34, 10, 32, 9, 13, 2, 34, 9, 13, 10, 32, 34, , 10, 32, 34, 9, 13, 10, 4, 9, 13, 10, 32, 9, 13, 2, 9, 13, 10, 13, 10, 95, 9, 65, 84, 85, 82, 69, 95, 8, 68, 95, 37, 32, 10, 10, 3, 32, 64, 9, 10, 9, 10, 2, 64, 11, 12, 10, 32, 64, , 101, 116, -60, 117, -85, -60, 97, 58, 10, 10, 10, 32, 35, 4, 75, 83, 9, 13, 10, 95, 0, 10, 69, 10, 65, 10, 84, 5, 10, 82, 10, 69, 10, 95, 9, 10, 78, 10, 68, 10, 95, 7, 10, 111, 10, 110, 10, 116, 01, 10, 107, 10, 115, 10, 116, 15, 10, 58, 10, 32, 34, 35, 2, 64, 66, 70, 74, 75, 80, 4, 85, 124, 9, 13, 97, 97, 100, 110, 116, 101, 107, 115, 116, 58, 10, 10, 10, 32, 35, 37, 4, 66, 74, 75, 83, 84, 85, , 10, 95, 10, 70, 10, 69, 5, 10, 84, 10, 85, 10, 82, 9, 10, 95, 10, 69, 10, 78, 8, 10, 95, 10, 37, 10, 32, 01, 10, 116, 10, 97, 10, 97, 00, 10, 99, 10, 101, 10, 110, 10, -127, 10, 10, 114, 10, 105, 06, 10, 115, 10, 32, 58, 10, -60, 10, -109, 10, 10, 99, 10, 0, 112, 10, 97, 10, 114, 10, 0, 117, 10, 103, 10, 97, 10, 0, 110, 97, 105, 114, 97, 117, 115, 58, 10, 10, 10, 32, 124, , 101, 109, -60, -109, 114, 105, 05, 101, 110, -60, -127, 114, 105, 115, 32, 58, 112, -60, -109, 99, 12, 97, 114, 97, 117, 103, 97, 0, 10, 10, 32, 35, 37, 42, 6, 74, 75, 83, 84, 85, 9, 0, 95, 10, 70, 10, 69, 10, 0, 84, 10, 85, 10, 82, 10, 0, 95, 10, 69, 10, 78, 10, 0, 95, 10, 37, 10, 32, 10, 10, 116, 10, 97, 10, 97, 10, 10, 99, 10, 101, 10, 110, -60, 127, 10, 10, 114, 10, 105, 10, 10, 115, 10, 58, 10, 110, 10, 0, 32, 35, 37, 42, 64, 66, 5, 83, 84, 85, 9, 13, 10, 0, 70, 10, 69, 10, 65, 10, 0, 85, 10, 82, 10, 69, 10, 0, 69, 10, 78, 10, 68, 10, 0, 37, 10, 32, 10, 101, 10, 10, 97, 10, 97, 10, 100, 10, 0, 101, 10, 110, -60, 10, -127, 0, 114, 10, 105, 10, 106, 10, 10, 32, 58, 10, 112, -60, 10, 10, 10, 99, 10, 32, 10, 112, 7, 10, 114, 10, 97, 10, 117, 03, 10, 97, 10, 58, 10, 110, 117, -60, -127, 99, 105, 106, 97, 10, 32, 124, 9, 13, 10, 32, 9, 13, 124, 10, 32, 124, 9, 0, 32, 34, 35, 37, 42, 64, 0, 74, 75, 80, 83, 84, 85, 9, 13, 10, 99, 105, 10, 101, 10, -60, 10, -127, 10, 10, 114, 05, 10, 106, 10, 115, 10, 32, 0, 112, -60, 10, -109, 10, 10, 0, 32, 10, 112, 10, 97, 10, 10, 97, 10, 117, 10, 103, 10, 0, 116, 10, 117, -60, 10, -127, 0, 99, 10, 105, 10, 106, 110, 99, 105, 111, 110, 97, 108, 105, -60, -127, 116, 101, 0 << self accessor :_lexer_single_lengths te :_lexer_single_lengths, :_lexer_single_lengths= lexer_single_lengths = [ , 1, 1, 2, 3, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 5, 1, 2, 1, 1, 1, 1, 1, 7, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, , 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, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 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, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 16, 3, 2, 2, 2, 2, 2, 2, 3, 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, << self accessor :_lexer_range_lengths te :_lexer_range_lengths, :_lexer_range_lengths= lexer_range_lengths = [ 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, << self accessor :_lexer_index_offsets te :_lexer_index_offsets, :_lexer_index_offsets= lexer_index_offsets = [ 18, 20, 22, 26, 31, 36, 6, 50, 54, 57, 59, 61, 63, 7, 69, 71, 73, 75, 77, 79, 3, 85, 87, 89, 91, 94, 99, 111, 113, 115, 118, 120, 122, 124, 128, 130, 132, 141, 144, 147, 150, 156, 159, 162, 165, 168, 171, 174, 180, 183, 186, 189, 192, 195, 198, 204, 207, 210, 228, 230, 233, 235, 239, 241, 243, 245, 247, 249, 251, 255, 269, 272, 275, 278, 281, 284, 290, 293, 296, 299, 302, 305, 308, 314, 317, 320, 323, 326, 329, 332, 338, 341, 344, 347, 350, 353, 356, 363, 366, 369, 372, 375, 378, 381, 387, 390, 393, 396, 399, 402, 405, 409, 411, 413, 415, 417, 419, 421, 428, 430, 432, 434, 436, 438, 441, 445, 447, 449, 451, 453, 455, 457, 462, 464, 466, 468, 470, 472, 474, 478, 480, 482, 484, 486, 488, 490, 507, 510, 513, 516, 519, 522, 525, 531, 534, 537, 540, 543, 546, 549, 555, 558, 561, 564, 567, 570, 573, 579, 582, 585, 588, 591, 594, 597, 601, 615, 618, 621, 624, 627, 630, 636, 639, 642, 645, 648, 651, 654, 660, 663, 666, 669, 672, 675, 678, 684, 687, 690, 693, 696, 699, 702, 709, 712, 715, 718, 721, 724, 727, 733, 736, 739, 742, 745, 748, 750, 754, 756, 758, 760, 762, 764, 766, 772, 777, 779, 784, 802, 806, 809, 815, 818, 821, 824, 827, 830, 834, 840, 843, 846, 849, 852, 855, 858, 864, 867, 870, 873, 876, 879, 882, 888, 891, 893, 895, 897, 899, 901, 905, 907, 909, 911, 913, 915, 917, << self accessor :_lexer_trans_targs te :_lexer_trans_targs, :_lexer_trans_targs= lexer_trans_targs = [ 2, 11, 13, 27, 30, 33, 8, 69, 126, 142, 254, 255, 256, 3, 0, 4, 0, 5, 4, 6, 6, 7, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 9, 6, 6, 1, 10, , 1, 10, 10, 0, 1, 12, , 0, 14, 0, 15, 0, 16, , 0, 18, 0, 19, 0, 20, , 0, 22, 0, 23, 0, 24, , 0, 26, 0, 304, 0, 28, 29, 1, 12, 29, 0, 0, 31, 32, 1, 32, 32, 30, 1, 1, 32, 30, 32, 0, 34, , 0, 36, 290, 0, 37, 0, , 39, 0, 40, 0, 41, 0, 2, 43, 42, 43, 43, 1, 44, , 261, 43, 42, 43, 45, 42, 6, 42, 43, 47, 42, 43, 48, 3, 49, 42, 43, 50, 42, 43, 2, 43, 52, 42, 43, 53, 42, 4, 42, 43, 55, 42, 43, 56, 3, 57, 42, 43, 1, 42, 43, 2, 43, 60, 42, 43, 61, 42, 2, 42, 43, 63, 42, 43, 64, 3, 65, 42, 43, 66, 42, 43, 2, 1, 1, 2, 11, 13, 27, 3, 35, 68, 69, 126, 142, 254, 256, 1, 0, 27, 0, 70, 71, , 0, 72, 0, 73, 0, 74, , 0, 76, 0, 77, 0, 78, , 0, 81, 80, 81, 80, 81, , 82, 96, 1, 97, 99, 100, 100, 125, 81, 80, 81, 83, 80, 4, 80, 81, 85, 80, 81, 86, 1, 87, 80, 81, 88, 80, 81, 0, 81, 90, 80, 81, 91, 80, 2, 80, 81, 93, 80, 81, 94, 1, 95, 80, 81, 1, 80, 81, 0, 81, 98, 80, 81, 96, 80, 6, 80, 81, 101, 80, 81, 96, 1, 103, 80, 81, 104, 80, 81, 80, 106, 81, 80, 107, 81, 80, 08, 80, 81, 109, 80, 81, 110, 1, 111, 80, 81, 112, 67, 80, 13, 80, 114, 81, 80, 115, 81, 1, 116, 80, 81, 117, 80, 81, 80, 81, 119, 80, 81, 120, 80, 21, 80, 81, 122, 80, 81, 123, 1, 124, 80, 81, 67, 80, 81, 0, 127, 136, 0, 128, 0, 129, 0, 0, 131, 0, 132, 0, 133, 5, 134, 135, 134, 135, 135, 1, 134, 137, 0, 138, 0, 139, 0, 0, 141, 0, 132, 0, 143, 246, 4, 0, 145, 0, 146, 0, 147, 8, 0, 149, 0, 150, 0, 151, 2, 199, 0, 153, 0, 154, 0, 0, 156, 0, 157, 0, 158, 0, 0, 160, 0, 161, 0, 162, 0, 0, 164, 0, 165, 0, 167, 166, 166, 167, 167, 1, 168, 182, 1, 185, 186, 188, 186, 198, 167, 166, 169, 166, 167, 170, 166, 167, 171, 167, 172, 166, 167, 173, 166, 167, 166, 167, 175, 166, 167, 176, 166, 177, 166, 167, 178, 166, 167, 179, 167, 180, 166, 167, 181, 166, 167, 6, 167, 67, 166, 167, 184, 166, 182, 166, 167, 182, 166, 167, 187, 167, 182, 166, 167, 189, 166, 167, 166, 167, 191, 166, 192, 167, 166, 167, 166, 167, 194, 166, 167, 195, 167, 196, 166, 167, 197, 166, 167, 66, 167, 182, 166, 201, 200, 201, 201, 201, 1, 202, 216, 1, 217, 220, 222, 220, 245, 201, 200, 201, 200, 201, 204, 200, 201, 205, 200, 206, 200, 201, 207, 200, 201, 208, 201, 209, 200, 201, 210, 200, 201, 200, 201, 212, 200, 201, 213, 200, 214, 200, 201, 215, 200, 201, 1, 201, 67, 200, 201, 218, 200, 201, 200, 201, 216, 200, 201, 221, 200, 216, 200, 201, 223, 200, 201, 224, 201, 225, 200, 226, 201, 200, 227, 200, 201, 228, 200, 201, 229, 200, 230, 200, 201, 231, 200, 201, 232, 00, 201, 233, 200, 234, 201, 200, 201, 200, 201, 236, 200, 201, 237, 201, 238, 200, 201, 239, 200, 201, 200, 201, 241, 200, 201, 242, 200, 243, 200, 201, 244, 200, 201, 67, 201, 216, 200, 247, 0, 248, 0, 0, 250, 0, 251, 0, 252, 0, 0, 78, 0, 70, 0, 27, 0, 257, 256, 0, 260, 259, 257, 259, 257, 258, 260, 259, 257, 259, 258, 260, 2, 11, 13, 27, 30, 33, 8, 69, 126, 142, 254, 255, 256, 0, 43, 262, 283, 42, 43, 263, 3, 264, 42, 265, 43, 42, 266, 2, 43, 267, 42, 43, 268, 42, 69, 42, 43, 270, 42, 43, 271, 2, 43, 272, 42, 273, 43, 42, 43, 42, 43, 275, 42, 43, 276, 3, 277, 42, 43, 278, 42, 43, 42, 43, 280, 42, 43, 281, 42, 82, 42, 43, 66, 42, 43, 284, 3, 285, 42, 286, 43, 42, 287, 2, 43, 288, 42, 43, 289, 42, 82, 42, 291, 0, 292, 0, 293, 4, 0, 295, 0, 296, 0, 297, 8, 0, 299, 0, 300, 0, 301, 2, 0, 303, 0, 40, 0, 0, << self accessor :_lexer_trans_actions te :_lexer_trans_actions, :_lexer_trans_actions= lexer_trans_actions = [ , 3, 1, 0, 23, 1, 23, 3, 23, 23, 23, 23, 23, 29, , 0, 37, 0, 37, 45, 0, , 117, 39, 39, 39, 5, 109, 7, 27, 0, 109, 27, 27, 27, 9, 27, 0, 27, 0, 93, 7, , 45, 0, 0, 37, 101, 19, , 37, 0, 37, 0, 37, 0, , 37, 0, 37, 0, 37, 0, , 37, 0, 37, 0, 37, 0, , 37, 0, 37, 0, 37, 0, 7, 48, 97, 17, 0, 37, 37, 7, 0, 21, 105, 21, 21, 42, , 45, 0, 1, 0, 37, 0, , 37, 0, 0, 37, 0, 37, , 0, 37, 0, 37, 0, 37, 48, 45, 0, 45, 0, 60, 27, 5, 75, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 45, 0, 0, 45, 45, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 45, 9, 0, 45, 45, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 45, 0, 0, 45, 113, 25, 51, 48, 25, 54, 4, 54, 54, 54, 54, 54, 54, 7, 25, 37, 0, 37, 0, 0, , 37, 0, 37, 0, 37, 0, , 37, 0, 37, 0, 37, 0, , 37, 122, 48, 45, 0, 45, , 27, 75, 63, 75, 75, 75, 5, 75, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 45, 0, 0, 45, 45, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 45, 11, 0, 45, , 45, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 45, 0, 0, 45, 0, 45, 0, 0, 45, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 45, 0, 11, 0, , 0, 0, 45, 0, 0, 45, , 0, 0, 45, 0, 0, 45, 45, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 45, 11, 0, 45, 0, 0, 37, 0, 37, 0, , 37, 0, 37, 0, 37, 0, 22, 48, 45, 0, 45, 0, 72, 0, 37, 0, 37, 0, 37, , 0, 37, 0, 37, 0, 0, , 37, 0, 37, 0, 37, 0, , 37, 0, 37, 0, 37, 0, , 0, 37, 0, 37, 0, 37, , 0, 37, 0, 37, 0, 37, , 0, 37, 0, 37, 0, 37, , 0, 37, 0, 37, 122, 48, , 45, 0, 69, 27, 75, 69, 5, 75, 75, 75, 75, 0, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 45, 0, 0, 45, 45, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 45, 0, 0, 45, , 45, 15, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 45, 0, 0, 45, 45, 0, 0, 0, 45, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 45, 0, 0, 45, , 45, 0, 0, 122, 48, 45, , 0, 66, 27, 75, 66, 75, 5, 75, 75, 75, 0, 0, 45, 45, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 45, 0, 0, 45, 45, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 13, , 13, 0, 45, 0, 0, 45, 45, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 0, 45, 0, 0, , 45, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 0, , 45, 0, 0, 0, 45, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 45, 0, 0, 45, 45, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 13, , 0, 0, 0, 37, 0, 37, , 0, 37, 0, 37, 0, 37, , 0, 37, 0, 37, 0, 37, 0, 37, 45, 31, 78, 31, 3, 0, 45, 0, 33, 0, 0, , 84, 81, 35, 87, 81, 87, 7, 87, 87, 87, 87, 87, 90, , 45, 0, 0, 0, 45, 0, , 0, 0, 0, 45, 0, 0, , 45, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 0, 45, 0, 0, 0, 45, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 45, 0, 0, 45, 45, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 0, 45, 0, 0, , 45, 0, 0, 45, 0, 0, , 0, 0, 37, 0, 37, 0, , 37, 0, 37, 0, 37, 0, , 37, 0, 37, 0, 37, 0, , 37, 0, 37, 0, 37, 0, << self accessor :_lexer_eof_actions te :_lexer_eof_actions, :_lexer_eof_actions= lexer_eof_actions = [ , 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, 7, 37, 37, 37, 37, 37, 37, << self accessor :lexer_start exer_start = 1; << self accessor :lexer_first_final exer_first_final = 304; << self accessor :lexer_error exer_error = 0; << self accessor :lexer_en_main exer_en_main = 1; 130 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" end
def multiline_strip(text)
def multiline_strip(text) crlf_count = text.scan(CRLF_RE).size lf_count = text.scan(LF_RE).size eol = crlf_count > lf_count ? CRLF : LF text.split(/\r?\n/).map{|s| s.strip}.join(eol).strip end
def scan(data)
def scan(data) data = (data + "\n%_FEATURE_END_%").unpack("c*") # Explicit EOF simplifies things considerably eof = pe = data.length @line_number = 1 @last_newline = 0 633 "lib/gherkin/rb_lexer/lv.rb" 0 = data.length lexer_start 140 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" 642 "lib/gherkin/rb_lexer/lv.rb" , _trans, _keys, _acts, _nacts = nil _level = 0 me = 10 trans = 15 n = 20 _eof = 30 = 40 true ger_goto = false oto_level <= 0 == pe o_level = _test_eof == 0 o_level = _out oto_level <= _resume = _lexer_key_offsets[cs] s = _lexer_index_offsets[cs] = _lexer_single_lengths[cs] k_match = false _klen > 0 _lower = _keys _upper = _keys + _klen - 1 loop do break if _upper < _lower _mid = _lower + ( (_upper - _lower) >> 1 ) if data[p] < _lexer_trans_keys[_mid] _upper = _mid - 1 elsif data[p] > _lexer_trans_keys[_mid] _lower = _mid + 1 else _trans += (_mid - _keys) _break_match = true break end end # loop break if _break_match _keys += _klen _trans += _klen en = _lexer_range_lengths[cs] _klen > 0 _lower = _keys _upper = _keys + (_klen << 1) - 2 loop do break if _upper < _lower _mid = _lower + (((_upper-_lower) >> 1) & ~1) if data[p] < _lexer_trans_keys[_mid] _upper = _mid - 2 elsif data[p] > _lexer_trans_keys[_mid+1] _lower = _mid + 2 else _trans += ((_mid - _keys) >> 1) _break_match = true break end end # loop break if _break_match _trans += _klen hile false _lexer_trans_targs[_trans] exer_trans_actions[_trans] != 0 s = _lexer_trans_actions[_trans] ts = _lexer_actions[_acts] s += 1 e _nacts > 0 cts -= 1 ts += 1 e _lexer_actions[_acts - 1] then 9 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n @content_start = p @current_line = @line_number end 9 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" then 14 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n @current_line = @line_number @start_col = p - @last_newline end 14 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" then 19 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n @content_start = p end 19 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" then 23 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n con = unindent(@start_col, data[@content_start...@next_keyword_start-1].utf8_pack("c*").sub(/(\r?\n)?( )*\Z/, '').gsub(/\\"\\"\\"/, '"""')) @listener.py_string(con, @current_line) end 23 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" then 28 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n store_keyword_content(:feature, data, p, eof) { |con| multiline_strip(con) } p = @next_keyword_start - 1 if @next_keyword_start @next_keyword_start = nil end 28 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" then 34 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n store_keyword_content(:background, data, p, eof) { |con| multiline_strip(con) } p = @next_keyword_start - 1 if @next_keyword_start @next_keyword_start = nil end 34 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" then 40 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n store_keyword_content(:scenario, data, p, eof) { |con| multiline_strip(con) } p = @next_keyword_start - 1 if @next_keyword_start @next_keyword_start = nil end 40 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" then 46 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n store_keyword_content(:scenario_outline, data, p, eof) { |con| multiline_strip(con) } p = @next_keyword_start - 1 if @next_keyword_start @next_keyword_start = nil end 46 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" then 52 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n store_keyword_content(:examples, data, p, eof) { |con| multiline_strip(con) } p = @next_keyword_start - 1 if @next_keyword_start @next_keyword_start = nil end 52 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" then 58 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n con = data[@content_start...p].utf8_pack("c*").strip @listener.step(@keyword, con, @current_line) end 58 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" 0 then 63 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n con = data[@content_start...p].utf8_pack("c*").strip @listener.comment(con, @line_number) @keyword_start = nil end 63 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" 1 then 69 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n con = data[@content_start...p].utf8_pack("c*").strip @listener.tag(con, @current_line) @keyword_start = nil end 69 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" 2 then 75 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n @line_number += 1 end 75 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" 3 then 79 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n @last_newline = p + 1 end 79 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" 4 then 83 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n @keyword_start ||= p end 83 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" 5 then 87 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n @keyword = data[@keyword_start...p].utf8_pack("c*").sub(/:$/,'') @keyword_start = nil end 87 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" 6 then 92 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n @next_keyword_start = p end 92 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" 7 then 96 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n p = p - 1 current_row = [] @current_line = @line_number end 96 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" 8 then 102 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n @content_start = p end 102 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" 9 then 106 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n con = data[@content_start...p].utf8_pack("c*").strip current_row << con end 106 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" 0 then 111 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n @listener.row(current_row, @current_line) end 111 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" 1 then 115 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n if cs < lexer_first_final content = current_line_content(data, p) raise LexingError.new("Lexing error on line %d: '%s'." % [@line_number, content]) else @listener.eof end end 115 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" 903 "lib/gherkin/rb_lexer/lv.rb" # action switch rigger_goto oto_level <= _again == 0 o_level = _out 1 != pe o_level = _resume oto_level <= _test_eof == eof s = _lexer_eof_actions[cs] ts = _lexer_actions[__acts] s += 1 __nacts > 0 cts -= 1 ts += 1 _lexer_actions[__acts - 1] 1 then 115 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" n if cs < lexer_first_final content = current_line_content(data, p) raise LexingError.new("Lexing error on line %d: '%s'." % [@line_number, content]) else @listener.eof end end 115 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" 943 "lib/gherkin/rb_lexer/lv.rb" # eof action switch rigger_goto oto_level <= _out k 141 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/lv.rb.rl" end
def store_keyword_content(event, data, p, eof)
def store_keyword_content(event, data, p, eof) end_point = (!@next_keyword_start or (p == eof)) ? p : @next_keyword_start con = yield data[@content_start...end_point].utf8_pack("c*") @listener.send(event, @keyword, con, @current_line) end
def unindent(startcol, text)
def unindent(startcol, text) text.gsub(/^ {0,#{startcol}}/, "") end