class Gherkin::RbLexer::Eo
: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/eo.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 = [ 16, 17, 18, 22, 27, 32, 2, 46, 50, 52, 53, 54, 55, 7, 58, 59, 60, 61, 62, 63, 5, 66, 67, 68, 69, 71, 76, 8, 89, 91, 92, 93, 94, 95, 7, 98, 99, 100, 101, 102, 103, 105, 106, 107, 108, 113, 114, 115, 117, 118, 119, 130, 132, 134, 136, 140, 142, 144, 146, 148, 150, 152, 156, 158, 160, 176, 178, 179, 180, 182, 183, 184, 185, 186, 187, 188, 190, 191, 192, 193, 194, 195, 196, 198, 199, 200, 201, 212, 214, 216, 220, 222, 224, 226, 228, 230, 232, 236, 238, 240, 242, 244, 247, 249, 253, 255, 257, 259, 261, 263, 266, 270, 272, 274, 276, 278, 281, 283, 285, 286, 287, 288, 289, 290, 291, 304, 306, 308, 310, 312, 314, 316, 320, 322, 324, 326, 328, 330, 332, 337, 339, 341, 343, 345, 347, 349, 354, 356, 358, 360, 362, 364, 366, 370, 372, 374, 376, 378, 380, 382, 386, 388, 390, 392, 394, 397, 400, 403, 404, 405, 406, 407, 408, 409, 420, 422, 424, 426, 428, 430, 432, 436, 438, 440, 442, 444, 446, 448, 452, 454, 456, 458, 460, 462, 464, 468, 470, 472, 474, 476, 478, 480, 484, 486, 488, 490, 492, 494, 498, 504, 509, 525, 527, 530, 532, 534, 538, 540, 542, 545, 547, 549, 551, 555, 557, 559, 561, 563, 565, 567, 571, 573, 575, 577, 579, 581, 583, 587, 590, 593 << self accessor :_lexer_trans_keys te :_lexer_trans_keys, :_lexer_trans_keys= lexer_trans_keys = [ 2, 34, 35, 37, 42, 64, 68, 0, 75, 83, 84, 124, 9, 13, 4, 10, 32, 9, 13, 10, 32, , 13, 10, 32, 34, 9, 13, 2, 34, 9, 13, 10, 32, 34, , 10, 32, 9, 13, 10, 32, , 10, 13, 10, 95, 70, 69, 4, 85, 82, 69, 95, 69, 78, 5, 37, 32, 10, 10, 13, 13, 4, 9, 10, 9, 10, 13, 32, 1, 12, 10, 32, 64, 9, 13, 32, 110, 105, 116, 97, -60, -75, 107, 122, 101, 109, 112, 108, 111, 58, 10, 10, 10, 32, 124, 9, 11, 110, 111, 58, 10, 10, 10, 5, 37, 42, 64, 68, 75, 83, , 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, 2, 34, 35, 37, 42, 64, 68, 0, 75, 83, 84, 124, 9, 13, 11, 106, 110, 116, 117, 114, 111, 00, 101, 32, 108, 97, 32, 115, 01, 110, 97, 114, 111, 58, 10, 0, 32, 35, 37, 42, 64, 68, 3, 9, 13, 10, 95, 10, 70, 9, 10, 65, 10, 84, 10, 85, 2, 10, 69, 10, 95, 10, 69, 8, 10, 68, 10, 95, 10, 37, 2, 10, 111, 10, 32, 110, 10, 10, 116, 10, 97, -60, 10, -75, 0, 111, 10, 97, 10, 106, 10, 01, 10, 101, 10, 110, 10, 97, 14, 10, 111, 10, 58, 10, 32, 99, 101, 101, 110, 97, 114, 111, 0, 10, 10, 32, 35, 37, 42, 8, 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, 32, 10, 111, 10, 32, 10, 105, 10, 116, 10, 97, -60, 75, 10, 10, 111, 10, 97, 111, 06, 10, 110, 10, 116, 10, 117, 14, 10, 111, 10, 32, 10, 100, 01, 10, 32, 10, 108, 10, 97, 2, 10, 115, 10, 99, 10, 101, 10, 10, 97, 10, 114, 10, 111, 8, 10, 99, 101, 10, 32, 100, 00, 114, 97, 106, 116, 111, 58, 0, 10, 32, 35, 37, 64, 70, 3, 9, 13, 10, 95, 10, 70, 9, 10, 65, 10, 84, 10, 85, 2, 10, 69, 10, 95, 10, 69, 8, 10, 68, 10, 95, 10, 37, 11, 10, 110, 10, 111, 10, 58, 11, 10, 110, 10, 116, 10, 117, 14, 10, 111, 10, 32, 10, 100, 01, 10, 32, 10, 108, 10, 97, 2, 10, 115, 10, 99, 10, 101, 10, 10, 97, 10, 114, 32, 124, , 10, 32, 124, 9, 13, 124, 2, 124, 9, 13, 10, 32, 34, 7, 42, 64, 68, 69, 70, 75, 4, 124, 9, 13, 10, 111, 10, 10, 10, 105, 10, 116, 10, 97, 10, -75, 10, 10, 111, 10, 97, 10, 106, 10, 110, 10, 116, 10, 10, 114, 10, 111, 10, 32, 10, 10, 101, 10, 32, 10, 108, 10, 0, 32, 10, 115, 10, 99, 10, 10, 110, 10, 97, 10, 114, 10, 10, 58, 10, 99, 101, 10, 32, 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, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 9, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 14, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 1, 1, 1, 1, 1, 1, 9, 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, 3, 3, 2, 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, 2, 2, 2, 2, 2, 2, 3, 14, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0 << 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, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 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, 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, 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, 1, 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 << self accessor :_lexer_index_offsets te :_lexer_index_offsets, :_lexer_index_offsets= lexer_index_offsets = [ 16, 18, 20, 24, 29, 34, 4, 48, 52, 55, 57, 59, 61, 5, 67, 69, 71, 73, 75, 77, 1, 83, 85, 87, 89, 92, 97, 109, 111, 114, 116, 118, 120, 122, 126, 128, 130, 132, 134, 136, 138, 142, 144, 146, 148, 153, 155, 157, 161, 163, 165, 176, 179, 182, 185, 191, 194, 197, 200, 203, 206, 209, 215, 218, 221, 237, 240, 242, 244, 248, 250, 252, 254, 256, 258, 260, 264, 266, 268, 270, 272, 274, 276, 280, 282, 284, 286, 297, 300, 303, 309, 312, 315, 318, 321, 324, 327, 333, 336, 339, 342, 345, 349, 352, 358, 361, 364, 367, 370, 373, 377, 383, 386, 389, 392, 395, 399, 402, 406, 408, 410, 412, 414, 416, 418, 432, 435, 438, 441, 444, 447, 450, 456, 459, 462, 465, 468, 471, 474, 481, 484, 487, 490, 493, 496, 499, 506, 509, 512, 515, 518, 521, 524, 530, 533, 536, 539, 542, 545, 548, 554, 557, 560, 563, 566, 570, 574, 579, 581, 583, 585, 587, 589, 591, 603, 606, 609, 612, 615, 618, 621, 627, 630, 633, 636, 639, 642, 645, 651, 654, 657, 660, 663, 666, 669, 675, 678, 681, 684, 687, 690, 693, 699, 702, 705, 708, 711, 714, 718, 725, 730, 746, 749, 753, 756, 759, 765, 768, 771, 775, 778, 781, 784, 790, 793, 796, 799, 802, 805, 808, 814, 817, 820, 823, 826, 829, 832, 838, 842, 846 << self accessor :_lexer_trans_targs te :_lexer_trans_targs, :_lexer_trans_targs= lexer_trans_targs = [ 2, 11, 13, 27, 30, 33, 3, 76, 134, 192, 238, 1, 0, 4, 0, 5, 4, 4, 0, 7, 6, 6, 6, 6, 7, 6, 6, 8, 6, 6, 6, 6, 6, 1, 10, 10, 0, , 10, 0, 1, 12, 11, 1, , 0, 15, 0, 16, 0, 17, , 0, 19, 0, 20, 0, 21, , 0, 23, 0, 24, 0, 25, , 0, 275, 0, 28, 0, 0, , 12, 29, 0, 0, 0, 0, 2, 1, 32, 32, 30, 31, 31, , 30, 32, 0, 34, 0, 28, , 36, 0, 37, 0, 38, 0, , 40, 0, 27, 0, 42, 0, , 44, 0, 45, 0, 46, 0, , 48, 0, 49, 0, 50, 0, 1, 52, 51, 52, 52, 1, 52, 4, 0, 55, 0, 56, 0, 57, , 58, 59, 58, 59, 59, 1, 4, 1, 243, 251, 273, 59, 58, 1, 58, 59, 62, 58, 59, 63, 9, 64, 58, 59, 65, 58, 59, 8, 59, 67, 58, 59, 68, 58, 9, 58, 59, 70, 58, 59, 71, 9, 72, 58, 59, 73, 58, 59, , 59, 75, 58, 1, 1, 2, 3, 27, 30, 33, 41, 53, 76, 192, 238, 1, 0, 77, 78, 0, , 79, 0, 80, 0, 81, 0, , 83, 0, 84, 0, 85, 0, , 87, 0, 88, 0, 89, 0, , 91, 0, 92, 0, 93, 0, , 95, 0, 96, 0, 97, 0, , 100, 99, 100, 99, 100, 100, 1, 115, 1, 116, 124, 126, 100, 00, 102, 99, 100, 103, 99, 100, 99, 100, 105, 99, 100, 106, 99, 107, 99, 100, 108, 99, 100, 109, 00, 110, 99, 100, 111, 99, 100, 99, 100, 113, 99, 100, 114, 99, 1, 99, 100, 75, 99, 100, 117, 00, 75, 118, 99, 100, 119, 99, 120, 99, 100, 121, 99, 122, 100, 23, 100, 99, 100, 115, 99, 100, 99, 100, 115, 99, 100, 127, 133, 00, 128, 99, 100, 129, 99, 100, 99, 100, 131, 99, 100, 132, 99, 75, 99, 100, 75, 115, 99, 135, 0, 136, 0, 137, 0, 138, 0, 0, 140, 0, 141, 0, 143, 142, 142, 143, 143, 1, 144, 158, 1, 167, 189, 143, 142, 143, 145, 142, 146, 142, 143, 147, 142, 143, 148, 143, 149, 142, 143, 150, 142, 143, 142, 143, 152, 142, 143, 153, 142, 154, 142, 143, 155, 142, 143, 156, 143, 157, 142, 143, 1, 142, 143, 42, 143, 160, 142, 143, 75, 161, 143, 162, 142, 143, 163, 142, 143, 142, 165, 143, 142, 166, 143, 142, 158, 142, 143, 168, 169, 142, 143, 142, 143, 170, 142, 143, 171, 142, 172, 142, 143, 173, 142, 143, 174, 143, 175, 142, 143, 176, 142, 143, 142, 143, 178, 142, 143, 179, 142, 180, 142, 143, 181, 142, 143, 182, 143, 183, 142, 143, 184, 142, 143, 142, 143, 186, 142, 143, 187, 142, 188, 142, 143, 75, 142, 143, 183, 142, 143, 75, 158, 142, 28, 27, 3, 0, 194, 0, 195, 0, 196, 7, 0, 198, 0, 200, 199, 200, 200, 200, 1, 201, 1, 215, 219, 200, 199, 200, 202, 199, 200, 203, 200, 204, 199, 200, 205, 199, 200, 199, 200, 207, 199, 200, 208, 199, 209, 199, 200, 210, 199, 200, 211, 200, 212, 199, 200, 213, 199, 200, 199, 200, 1, 199, 200, 216, 199, 217, 199, 200, 218, 199, 200, 75, 200, 220, 199, 200, 221, 199, 200, 199, 200, 223, 199, 200, 224, 199, 225, 199, 200, 226, 199, 200, 227, 200, 228, 199, 200, 229, 199, 200, 199, 200, 231, 199, 200, 232, 199, 233, 199, 200, 234, 199, 200, 235, 200, 236, 199, 200, 237, 199, 200, 199, 238, 239, 238, 0, 242, 241, 241, 240, 239, 240, 242, 241, 239, 240, 242, 242, 2, 11, 13, 27, 3, 41, 53, 76, 134, 192, 238, 0, 59, 244, 58, 59, 75, 245, 9, 246, 58, 59, 247, 58, 59, 58, 249, 59, 58, 250, 59, 58, 4, 58, 59, 252, 253, 58, 59, 8, 59, 254, 58, 59, 255, 58, 56, 58, 59, 257, 58, 59, 258, 9, 259, 58, 59, 260, 58, 59, 58, 59, 262, 58, 59, 263, 58, 64, 58, 59, 265, 58, 59, 266, 9, 267, 58, 59, 268, 58, 59, 58, 59, 270, 58, 59, 271, 58, 72, 58, 59, 75, 58, 59, 267, 58, 59, 75, 74, 58, 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, 29, 0, 37, , 0, 37, 45, 0, 0, 37, 39, 39, 39, 5, 109, 27, 27, , 109, 27, 27, 27, 0, 109, , 27, 0, 93, 7, 7, 37, , 0, 37, 101, 19, 0, 45, , 37, 0, 37, 0, 37, 0, , 37, 0, 37, 0, 37, 0, , 37, 0, 37, 0, 37, 0, , 37, 0, 37, 0, 37, 37, 7, 17, 0, 37, 37, 37, 37, , 105, 21, 21, 42, 21, 0, , 1, 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, 0, 37, 48, 45, 0, 45, 0, 72, 0, 37, 0, 37, 0, 37, 0, 22, 48, 45, 0, 45, 0, 63, 5, 63, 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, 11, 0, 113, 25, 51, 5, 54, 48, 54, 54, 54, 54, 4, 57, 25, 37, 0, 0, 37, , 0, 37, 0, 37, 0, 37, , 0, 37, 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, 45, 0, 7, 75, 69, 75, 75, 75, 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, 0, 0, 45, 0, 0, 5, 0, 45, 15, 0, 45, 0, , 15, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 0, 45, 45, 0, 45, 0, 0, 45, 45, 0, 0, 45, 0, 0, , 0, 0, 45, 0, 0, 45, 45, 0, 0, 45, 0, 0, 5, 0, 45, 15, 0, 0, 0, , 0, 37, 0, 37, 0, 37, , 0, 37, 0, 37, 122, 48, , 45, 0, 66, 27, 75, 66, 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, 13, 0, 45, , 45, 0, 0, 45, 13, 0, , 0, 0, 45, 0, 0, 45, 0, 45, 0, 0, 45, 0, , 0, 45, 0, 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, 0, , 0, 0, 45, 0, 0, 45, 45, 0, 0, 45, 0, 0, , 0, 45, 13, 0, 45, 0, 45, 13, 0, 0, 0, 0, , 37, 0, 37, 0, 37, 0, , 37, 0, 37, 122, 48, 45, , 0, 60, 27, 60, 75, 75, , 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, 9, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 9, , 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, 0, 0, 45, 0, 0, , 0, 45, 0, 0, 45, 0, , 0, 0, 45, 0, 0, 45, 0, 0, 0, 37, 45, 31, 1, 31, 33, 0, 45, 0, 33, 45, 0, 84, 81, 35, 87, 7, 87, 87, 87, 87, 87, 90, , 45, 0, 0, 45, 11, 0, , 0, 0, 45, 0, 0, 45, 0, 45, 0, 0, 45, 0, , 0, 45, 0, 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, 0, , 0, 0, 45, 0, 0, 45, 45, 0, 0, 45, 0, 0, , 0, 45, 11, 0, 45, 0, 45, 11, 0, 0, 0, 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 << self accessor :lexer_start exer_start = 1; << self accessor :lexer_first_final exer_first_final = 275; << self accessor :lexer_error exer_error = 0; << self accessor :lexer_en_main exer_en_main = 1; 130 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.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 588 "lib/gherkin/rb_lexer/eo.rb" 0 = data.length lexer_start 140 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" 597 "lib/gherkin/rb_lexer/eo.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/eo.rb.rl" n @content_start = p @current_line = @line_number end 9 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" then 14 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" n @current_line = @line_number @start_col = p - @last_newline end 14 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" then 19 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" n @content_start = p end 19 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" then 23 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.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/eo.rb.rl" then 28 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.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/eo.rb.rl" then 34 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.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/eo.rb.rl" then 40 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.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/eo.rb.rl" then 46 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.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/eo.rb.rl" then 52 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.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/eo.rb.rl" then 58 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.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/eo.rb.rl" 0 then 63 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.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/eo.rb.rl" 1 then 69 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.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/eo.rb.rl" 2 then 75 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" n @line_number += 1 end 75 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" 3 then 79 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" n @last_newline = p + 1 end 79 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" 4 then 83 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" n @keyword_start ||= p end 83 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" 5 then 87 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" n @keyword = data[@keyword_start...p].utf8_pack("c*").sub(/:$/,'') @keyword_start = nil end 87 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" 6 then 92 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" n @next_keyword_start = p end 92 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" 7 then 96 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" n p = p - 1 current_row = [] @current_line = @line_number end 96 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" 8 then 102 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" n @content_start = p end 102 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" 9 then 106 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" n con = data[@content_start...p].utf8_pack("c*").strip current_row << con end 106 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" 0 then 111 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" n @listener.row(current_row, @current_line) end 111 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.rb.rl" 1 then 115 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.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/eo.rb.rl" 858 "lib/gherkin/rb_lexer/eo.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/eo.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/eo.rb.rl" 898 "lib/gherkin/rb_lexer/eo.rb" # eof action switch rigger_goto oto_level <= _out k 141 "/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/eo.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