Class: Gherkin::Lexer::Ro

Inherits:
Object
  • Object
show all
Defined in:
lib/gherkin/lexer/ro.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(listener) ⇒ Ro

Returns a new instance of Ro.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
# File 'lib/gherkin/lexer/ro.rb', line 14

def initialize(listener)
  @listener = listener

  # Initialize ivars to avoid warnings
  @keyword = nil

  # line 21 "lib/gherkin/lexer/ro.rb"
  class << self
    attr_accessor :_lexer_actions
    private :_lexer_actions, :_lexer_actions=
  end
  self._lexer_actions = [
    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
  ]

  class << self
    attr_accessor :_lexer_key_offsets
    private :_lexer_key_offsets, :_lexer_key_offsets=
  end
  self._lexer_key_offsets = [
    0, 0, 19, 20, 21, 22, 24, 26,
    44, 45, 46, 47, 49, 51, 56, 61,
    66, 71, 75, 79, 81, 82, 83, 84,
    85, 86, 87, 88, 89, 90, 91, 92,
    93, 94, 95, 96, 101, 108, 113, 114,
    115, 116, 117, 120, 121, 122, 123, 124,
    125, 126, 127, 128, 129, 130, 131, 146,
    148, 150, 152, 170, 171, 175, 176, 177,
    178, 179, 180, 181, 182, 185, 186, 187,
    188, 189, 190, 191, 192, 193, 194, 201,
    203, 205, 207, 211, 213, 215, 217, 219,
    221, 223, 225, 227, 229, 231, 233, 235,
    237, 238, 239, 240, 243, 244, 245, 246,
    247, 248, 249, 250, 251, 252, 253, 254,
    255, 256, 257, 268, 270, 272, 274, 276,
    278, 280, 282, 284, 286, 288, 290, 292,
    294, 296, 298, 300, 302, 304, 306, 308,
    310, 312, 314, 316, 318, 320, 322, 324,
    326, 328, 332, 334, 336, 338, 340, 342,
    344, 346, 348, 350, 352, 354, 357, 359,
    361, 363, 365, 367, 369, 371, 373, 375,
    377, 379, 381, 384, 386, 388, 390, 392,
    393, 396, 397, 398, 399, 400, 401, 402,
    403, 404, 405, 420, 422, 424, 426, 428,
    430, 432, 434, 436, 438, 440, 442, 444,
    446, 448, 450, 452, 454, 456, 458, 460,
    462, 464, 468, 470, 472, 474, 476, 478,
    480, 482, 484, 486, 488, 493, 495, 497,
    499, 501, 503, 505, 507, 511, 513, 515,
    517, 521, 523, 525, 527, 529, 531, 533,
    535, 537, 539, 541, 543, 545, 549, 551,
    553, 555, 557, 559, 561, 563, 565, 567,
    569, 571, 573, 576, 578, 580, 582, 584,
    585, 586, 587, 588, 589, 590, 592, 593,
    594, 595, 596, 597, 598, 599, 600, 601,
    602, 603, 604, 605, 620, 622, 624, 626,
    628, 630, 632, 634, 636, 638, 640, 642,
    644, 646, 648, 650, 652, 654, 656, 658,
    660, 662, 664, 667, 669, 671, 673, 675,
    680, 682, 684, 686, 688, 690, 692, 694,
    698, 700, 702, 704, 708, 710, 712, 714,
    716, 718, 720, 722, 724, 726, 728, 730,
    732, 734, 737, 739, 741, 743, 745, 747,
    749, 753, 759, 762, 764, 770, 788, 790,
    792, 794, 796, 798, 800, 802, 804, 806,
    808, 810, 812, 814, 816, 818, 820, 822,
    824, 826, 829, 831, 833, 835, 837, 842,
    844, 846, 848, 850, 852, 854, 856, 860,
    862, 864, 866, 870, 872, 874, 876, 878,
    880, 882, 884, 886, 888, 890, 892, 894,
    896, 900, 902, 904, 906, 908, 910, 912,
    914, 916, 918, 920, 922, 924, 927, 929,
    931, 933, 935, 936, 937
  ]

  class << self
    attr_accessor :_lexer_trans_keys
    private :_lexer_trans_keys, :_lexer_trans_keys=
  end
  self._lexer_trans_keys = [
    -59, -56, -17, 10, 32, 34, 35, 37,
    42, 64, 65, 67, 68, 69, 70, 83,
    124, 9, 13, -98, 105, 32, 10, 13,
    10, 13, -59, -56, 10, 32, 34, 35,
    37, 42, 64, 65, 67, 68, 69, 70,
    83, 124, 9, 13, -104, 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, 117, 110, 99, -61, 97, 111,
    -94, 110, 100, 110, 116, 101, 120, 116,
    58, 10, 10, -59, -56, 10, 32, 35,
    37, 42, 64, 65, 67, 68, 70, 83,
    9, 13, -98, 10, 10, 105, 10, 32,
    -59, -56, 10, 32, 34, 35, 37, 42,
    64, 65, 67, 68, 69, 70, 83, 124,
    9, 13, 97, -59, -56, 114, 116, -93,
    105, 32, 102, 105, 105, -101, 32, 101,
    105, 120, 101, 109, 112, 108, 101, 58,
    10, 10, 10, 32, 35, 70, 124, 9,
    13, 10, 117, 10, 110, 10, 99, -59,
    -56, 10, 116, -93, 10, 10, 105, 10,
    111, 10, 110, 10, 97, 10, 108, 10,
    105, 10, 116, 10, 97, 10, 116, 10,
    101, 10, 58, -101, 10, 117, 110, 99,
    -59, -56, 116, -93, 105, 111, 110, 97,
    108, 105, 116, 97, 116, 101, 58, 10,
    10, 10, 32, 35, 37, 64, 67, 69,
    70, 83, 9, 13, 10, 95, 10, 70,
    10, 69, 10, 65, 10, 84, 10, 85,
    10, 82, 10, 69, 10, 95, 10, 69,
    10, 78, 10, 68, 10, 95, 10, 37,
    10, 111, 10, 110, 10, 116, 10, 101,
    10, 120, 10, 116, 10, 58, 10, 120,
    10, 101, 10, 109, 10, 112, 10, 108,
    10, 101, 10, 117, 10, 110, 10, 99,
    -59, -56, 10, 116, -93, 10, 10, 105,
    10, 111, 10, 110, 10, 97, 10, 108,
    10, 105, 10, 116, 10, 97, 10, 116,
    -101, 10, 10, 99, 116, 10, 101, 10,
    110, 10, 97, 10, 114, 10, 105, 10,
    117, 10, 114, 10, 117, 10, 99, 10,
    116, 10, 117, 10, 114, -60, 10, 97,
    -125, 10, 10, 32, 10, 115, 10, 99,
    -101, 99, 105, 116, 101, 110, 97, 114,
    105, 117, 58, 10, 10, -59, -56, 10,
    32, 35, 37, 42, 64, 65, 67, 68,
    70, 83, 9, 13, -98, 10, 10, 105,
    10, 32, -104, 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,
    10, 116, 10, 117, 10, 110, 10, 99,
    -61, 10, 97, 111, -94, 10, 10, 110,
    10, 100, 10, 110, 10, 116, 10, 101,
    10, 120, 10, 116, 10, 58, 10, 97,
    -59, -56, 10, 114, 116, -93, 10, 10,
    105, 10, 32, 10, 102, 10, 105, 10,
    105, -101, 10, 10, 32, 101, 105, 10,
    117, 10, 110, 10, 99, -59, -56, 10,
    116, -93, 10, 10, 105, 10, 111, 10,
    110, 10, 97, 10, 108, 10, 105, 10,
    116, 10, 97, 10, 116, 10, 101, -101,
    10, 10, 99, 105, 116, 10, 101, 10,
    110, 10, 97, 10, 114, 10, 105, 10,
    117, 10, 114, 10, 117, 10, 99, 10,
    116, 10, 117, 10, 114, -60, 10, 97,
    -125, 10, 10, 32, 10, 115, 10, 99,
    114, 117, 99, 116, 117, 114, -60, 97,
    -125, 32, 115, 99, 101, 110, 97, 114,
    105, 117, 58, 10, 10, -59, -56, 10,
    32, 35, 37, 42, 64, 65, 67, 68,
    70, 83, 9, 13, -98, 10, 10, 105,
    10, 32, -104, 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,
    10, 116, 10, 117, 10, 110, 10, 99,
    -61, 10, 97, -94, 10, 10, 110, 10,
    100, 10, 97, -59, -56, 10, 114, 116,
    -93, 10, 10, 105, 10, 32, 10, 102,
    10, 105, 10, 105, -101, 10, 10, 32,
    101, 105, 10, 117, 10, 110, 10, 99,
    -59, -56, 10, 116, -93, 10, 10, 105,
    10, 111, 10, 110, 10, 97, 10, 108,
    10, 105, 10, 116, 10, 97, 10, 116,
    10, 101, 10, 58, -101, 10, 10, 99,
    105, 10, 101, 10, 110, 10, 97, 10,
    114, 10, 105, 10, 117, 32, 124, 9,
    13, 10, 32, 92, 124, 9, 13, 10,
    92, 124, 10, 92, 10, 32, 92, 124,
    9, 13, -59, -56, 10, 32, 34, 35,
    37, 42, 64, 65, 67, 68, 69, 70,
    83, 124, 9, 13, -104, 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, 10, 116, 10, 117, 10, 110,
    10, 99, -61, 10, 97, -94, 10, 10,
    110, 10, 100, 10, 97, -59, -56, 10,
    114, 116, -93, 10, 10, 105, 10, 32,
    10, 102, 10, 105, 10, 105, -101, 10,
    10, 32, 101, 105, 10, 117, 10, 110,
    10, 99, -59, -56, 10, 116, -93, 10,
    10, 105, 10, 111, 10, 110, 10, 97,
    10, 108, 10, 105, 10, 116, 10, 97,
    10, 116, 10, 101, 10, 58, -101, 10,
    10, 99, 105, 116, 10, 101, 10, 110,
    10, 97, 10, 114, 10, 105, 10, 117,
    10, 114, 10, 117, 10, 99, 10, 116,
    10, 117, 10, 114, -60, 10, 97, -125,
    10, 10, 32, 10, 115, 10, 99, -69,
    -65, 0
  ]

  class << self
    attr_accessor :_lexer_single_lengths
    private :_lexer_single_lengths, :_lexer_single_lengths=
  end
  self._lexer_single_lengths = [
    0, 17, 1, 1, 1, 2, 2, 16,
    1, 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, 3, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 13, 2,
    2, 2, 16, 1, 4, 1, 1, 1,
    1, 1, 1, 1, 3, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 5, 2,
    2, 2, 4, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2,
    1, 1, 1, 3, 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, 2,
    2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2,
    2, 4, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 3, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 3, 2, 2, 2, 2, 1,
    3, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 13, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2,
    2, 4, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 5, 2, 2, 2,
    2, 2, 2, 2, 4, 2, 2, 2,
    4, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 4, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 3, 2, 2, 2, 2, 1,
    1, 1, 1, 1, 1, 2, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 13, 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, 5,
    2, 2, 2, 2, 2, 2, 2, 4,
    2, 2, 2, 4, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2,
    2, 3, 2, 2, 2, 2, 2, 2,
    2, 4, 3, 2, 4, 16, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2,
    2, 3, 2, 2, 2, 2, 5, 2,
    2, 2, 2, 2, 2, 2, 4, 2,
    2, 2, 4, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2,
    4, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 3, 2, 2,
    2, 2, 1, 1, 0
  ]

  class << self
    attr_accessor :_lexer_range_lengths
    private :_lexer_range_lengths, :_lexer_range_lengths=
  end
  self._lexer_range_lengths = [
    0, 1, 0, 0, 0, 0, 0, 1,
    0, 0, 0, 0, 0, 1, 1, 1,
    1, 1, 1, 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, 1, 0,
    0, 0, 1, 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, 1, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 1, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 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,
    1, 1, 0, 0, 1, 1, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0
  ]

  class << self
    attr_accessor :_lexer_index_offsets
    private :_lexer_index_offsets, :_lexer_index_offsets=
  end
  self._lexer_index_offsets = [
    0, 0, 19, 21, 23, 25, 28, 31,
    49, 51, 53, 55, 58, 61, 66, 71,
    76, 81, 85, 89, 92, 94, 96, 98,
    100, 102, 104, 106, 108, 110, 112, 114,
    116, 118, 120, 122, 127, 134, 139, 141,
    143, 145, 147, 151, 153, 155, 157, 159,
    161, 163, 165, 167, 169, 171, 173, 188,
    191, 194, 197, 215, 217, 222, 224, 226,
    228, 230, 232, 234, 236, 240, 242, 244,
    246, 248, 250, 252, 254, 256, 258, 265,
    268, 271, 274, 279, 282, 285, 288, 291,
    294, 297, 300, 303, 306, 309, 312, 315,
    318, 320, 322, 324, 328, 330, 332, 334,
    336, 338, 340, 342, 344, 346, 348, 350,
    352, 354, 356, 367, 370, 373, 376, 379,
    382, 385, 388, 391, 394, 397, 400, 403,
    406, 409, 412, 415, 418, 421, 424, 427,
    430, 433, 436, 439, 442, 445, 448, 451,
    454, 457, 462, 465, 468, 471, 474, 477,
    480, 483, 486, 489, 492, 495, 499, 502,
    505, 508, 511, 514, 517, 520, 523, 526,
    529, 532, 535, 539, 542, 545, 548, 551,
    553, 557, 559, 561, 563, 565, 567, 569,
    571, 573, 575, 590, 593, 596, 599, 602,
    605, 608, 611, 614, 617, 620, 623, 626,
    629, 632, 635, 638, 641, 644, 647, 650,
    653, 656, 661, 664, 667, 670, 673, 676,
    679, 682, 685, 688, 691, 697, 700, 703,
    706, 709, 712, 715, 718, 723, 726, 729,
    732, 737, 740, 743, 746, 749, 752, 755,
    758, 761, 764, 767, 770, 773, 778, 781,
    784, 787, 790, 793, 796, 799, 802, 805,
    808, 811, 814, 818, 821, 824, 827, 830,
    832, 834, 836, 838, 840, 842, 845, 847,
    849, 851, 853, 855, 857, 859, 861, 863,
    865, 867, 869, 871, 886, 889, 892, 895,
    898, 901, 904, 907, 910, 913, 916, 919,
    922, 925, 928, 931, 934, 937, 940, 943,
    946, 949, 952, 956, 959, 962, 965, 968,
    974, 977, 980, 983, 986, 989, 992, 995,
    1000, 1003, 1006, 1009, 1014, 1017, 1020, 1023,
    1026, 1029, 1032, 1035, 1038, 1041, 1044, 1047,
    1050, 1053, 1057, 1060, 1063, 1066, 1069, 1072,
    1075, 1079, 1085, 1089, 1092, 1098, 1116, 1119,
    1122, 1125, 1128, 1131, 1134, 1137, 1140, 1143,
    1146, 1149, 1152, 1155, 1158, 1161, 1164, 1167,
    1170, 1173, 1177, 1180, 1183, 1186, 1189, 1195,
    1198, 1201, 1204, 1207, 1210, 1213, 1216, 1221,
    1224, 1227, 1230, 1235, 1238, 1241, 1244, 1247,
    1250, 1253, 1256, 1259, 1262, 1265, 1268, 1271,
    1274, 1279, 1282, 1285, 1288, 1291, 1294, 1297,
    1300, 1303, 1306, 1309, 1312, 1315, 1319, 1322,
    1325, 1328, 1331, 1333, 1335
  ]

  class << self
    attr_accessor :_lexer_indicies
    private :_lexer_indicies, :_lexer_indicies=
  end
  self._lexer_indicies = [
    1, 2, 3, 5, 4, 6, 7, 8,
    9, 10, 11, 12, 13, 14, 15, 16,
    17, 4, 0, 18, 0, 19, 0, 20,
    0, 22, 23, 21, 25, 26, 24, 1,
    2, 5, 4, 6, 7, 8, 9, 10,
    11, 12, 13, 14, 15, 16, 17, 4,
    0, 18, 0, 27, 0, 28, 0, 30,
    31, 29, 33, 34, 32, 37, 36, 38,
    36, 35, 41, 40, 42, 40, 39, 41,
    40, 43, 40, 39, 41, 40, 44, 40,
    39, 46, 45, 45, 0, 5, 47, 47,
    0, 49, 50, 48, 5, 0, 51, 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, 0, 0, 0, 0, 65, 66,
    67, 66, 66, 69, 68, 65, 5, 70,
    10, 70, 0, 71, 0, 72, 0, 73,
    0, 18, 0, 74, 75, 76, 0, 75,
    0, 77, 0, 19, 0, 78, 0, 79,
    0, 80, 0, 81, 0, 82, 0, 83,
    0, 85, 84, 87, 86, 88, 89, 87,
    90, 91, 92, 93, 91, 94, 95, 96,
    97, 98, 90, 86, 99, 87, 86, 87,
    100, 86, 87, 101, 86, 102, 103, 105,
    104, 106, 107, 108, 109, 110, 111, 112,
    113, 114, 115, 116, 117, 104, 0, 118,
    0, 119, 120, 19, 121, 0, 122, 0,
    123, 0, 124, 0, 125, 0, 126, 0,
    75, 0, 122, 0, 124, 123, 123, 0,
    127, 0, 128, 0, 129, 0, 130, 0,
    131, 0, 132, 0, 133, 0, 135, 134,
    137, 136, 137, 138, 139, 140, 139, 138,
    136, 137, 141, 136, 137, 142, 136, 137,
    143, 136, 144, 145, 137, 146, 136, 146,
    137, 136, 137, 147, 136, 137, 148, 136,
    137, 149, 136, 137, 150, 136, 137, 151,
    136, 137, 152, 136, 137, 153, 136, 137,
    154, 136, 137, 155, 136, 137, 156, 136,
    137, 157, 136, 146, 137, 136, 158, 0,
    159, 0, 160, 0, 161, 162, 163, 0,
    163, 0, 164, 0, 165, 0, 166, 0,
    167, 0, 168, 0, 169, 0, 170, 0,
    171, 0, 172, 0, 173, 0, 174, 0,
    176, 175, 178, 177, 178, 179, 180, 181,
    180, 182, 183, 184, 185, 179, 177, 178,
    186, 177, 178, 187, 177, 178, 188, 177,
    178, 189, 177, 178, 190, 177, 178, 191,
    177, 178, 192, 177, 178, 193, 177, 178,
    194, 177, 178, 195, 177, 178, 196, 177,
    178, 197, 177, 178, 198, 177, 178, 199,
    177, 178, 200, 177, 178, 201, 177, 178,
    202, 177, 178, 203, 177, 178, 204, 177,
    178, 205, 177, 178, 206, 177, 178, 207,
    177, 178, 208, 177, 178, 209, 177, 178,
    210, 177, 178, 211, 177, 178, 205, 177,
    178, 212, 177, 178, 213, 177, 178, 214,
    177, 215, 216, 178, 217, 177, 217, 178,
    177, 178, 218, 177, 178, 219, 177, 178,
    220, 177, 178, 221, 177, 178, 222, 177,
    178, 223, 177, 178, 224, 177, 178, 225,
    177, 178, 211, 177, 217, 178, 177, 178,
    226, 227, 177, 178, 228, 177, 178, 229,
    177, 178, 230, 177, 178, 231, 177, 178,
    232, 177, 178, 205, 177, 178, 233, 177,
    178, 234, 177, 178, 235, 177, 178, 236,
    177, 178, 237, 177, 178, 238, 177, 239,
    178, 240, 177, 240, 178, 177, 178, 241,
    177, 178, 242, 177, 178, 226, 177, 163,
    0, 243, 19, 244, 0, 245, 0, 246,
    0, 247, 0, 248, 0, 249, 0, 250,
    0, 251, 0, 253, 252, 255, 254, 256,
    257, 255, 258, 259, 260, 261, 259, 262,
    263, 264, 265, 266, 258, 254, 267, 255,
    254, 255, 268, 254, 255, 269, 254, 267,
    255, 254, 255, 270, 254, 255, 271, 254,
    255, 272, 254, 255, 273, 254, 255, 274,
    254, 255, 275, 254, 255, 276, 254, 255,
    277, 254, 255, 278, 254, 255, 279, 254,
    255, 280, 254, 255, 281, 254, 255, 282,
    254, 255, 283, 254, 255, 284, 254, 255,
    285, 254, 255, 286, 254, 255, 267, 254,
    287, 255, 288, 289, 254, 288, 255, 254,
    255, 290, 254, 255, 268, 254, 255, 291,
    254, 255, 292, 254, 255, 293, 254, 255,
    294, 254, 255, 295, 254, 255, 269, 254,
    255, 296, 254, 297, 298, 255, 268, 299,
    254, 300, 255, 254, 255, 301, 254, 255,
    302, 254, 255, 303, 254, 255, 304, 254,
    255, 288, 254, 300, 255, 254, 255, 302,
    301, 301, 254, 255, 305, 254, 255, 306,
    254, 255, 307, 254, 308, 309, 255, 310,
    254, 310, 255, 254, 255, 311, 254, 255,
    312, 254, 255, 313, 254, 255, 314, 254,
    255, 315, 254, 255, 316, 254, 255, 317,
    254, 255, 318, 254, 255, 319, 254, 255,
    295, 254, 310, 255, 254, 255, 320, 268,
    321, 254, 255, 322, 254, 255, 323, 254,
    255, 324, 254, 255, 325, 254, 255, 326,
    254, 255, 295, 254, 255, 327, 254, 255,
    328, 254, 255, 329, 254, 255, 330, 254,
    255, 331, 254, 255, 332, 254, 333, 255,
    334, 254, 334, 255, 254, 255, 335, 254,
    255, 336, 254, 255, 320, 254, 337, 0,
    338, 0, 339, 0, 340, 0, 341, 0,
    342, 0, 343, 344, 0, 344, 0, 345,
    0, 346, 0, 347, 0, 348, 0, 349,
    0, 350, 0, 351, 0, 352, 0, 353,
    0, 354, 0, 356, 355, 358, 357, 359,
    360, 358, 361, 362, 363, 364, 362, 365,
    366, 367, 368, 369, 361, 357, 370, 358,
    357, 358, 371, 357, 358, 372, 357, 370,
    358, 357, 358, 373, 357, 358, 374, 357,
    358, 375, 357, 358, 376, 357, 358, 377,
    357, 358, 378, 357, 358, 379, 357, 358,
    380, 357, 358, 381, 357, 358, 382, 357,
    358, 383, 357, 358, 384, 357, 358, 385,
    357, 358, 386, 357, 358, 387, 357, 358,
    388, 357, 358, 389, 357, 358, 370, 357,
    390, 358, 391, 357, 391, 358, 357, 358,
    392, 357, 358, 371, 357, 358, 393, 357,
    394, 395, 358, 371, 396, 357, 397, 358,
    357, 358, 398, 357, 358, 399, 357, 358,
    400, 357, 358, 401, 357, 358, 391, 357,
    397, 358, 357, 358, 399, 398, 398, 357,
    358, 402, 357, 358, 403, 357, 358, 404,
    357, 405, 406, 358, 407, 357, 407, 358,
    357, 358, 408, 357, 358, 409, 357, 358,
    410, 357, 358, 411, 357, 358, 412, 357,
    358, 413, 357, 358, 414, 357, 358, 415,
    357, 358, 416, 357, 358, 417, 357, 358,
    372, 357, 407, 358, 357, 358, 418, 371,
    357, 358, 419, 357, 358, 420, 357, 358,
    421, 357, 358, 422, 357, 358, 423, 357,
    358, 417, 357, 424, 425, 424, 0, 428,
    427, 429, 430, 427, 426, 0, 432, 433,
    431, 0, 432, 431, 428, 434, 432, 433,
    434, 431, 435, 436, 428, 437, 438, 439,
    440, 441, 442, 443, 444, 445, 446, 447,
    448, 449, 437, 0, 99, 87, 86, 87,
    450, 86, 87, 451, 86, 87, 452, 86,
    87, 453, 86, 87, 454, 86, 87, 455,
    86, 87, 456, 86, 87, 457, 86, 87,
    458, 86, 87, 459, 86, 87, 460, 86,
    87, 461, 86, 87, 462, 86, 87, 463,
    86, 87, 464, 86, 87, 465, 86, 87,
    466, 86, 87, 99, 86, 467, 87, 468,
    86, 468, 87, 86, 87, 469, 86, 87,
    100, 86, 87, 470, 86, 471, 472, 87,
    100, 473, 86, 474, 87, 86, 87, 475,
    86, 87, 476, 86, 87, 477, 86, 87,
    478, 86, 87, 468, 86, 474, 87, 86,
    87, 476, 475, 475, 86, 87, 479, 86,
    87, 480, 86, 87, 481, 86, 482, 483,
    87, 484, 86, 484, 87, 86, 87, 485,
    86, 87, 486, 86, 87, 487, 86, 87,
    488, 86, 87, 489, 86, 87, 490, 86,
    87, 491, 86, 87, 492, 86, 87, 493,
    86, 87, 494, 86, 87, 101, 86, 484,
    87, 86, 87, 495, 100, 496, 86, 87,
    497, 86, 87, 498, 86, 87, 499, 86,
    87, 500, 86, 87, 501, 86, 87, 494,
    86, 87, 502, 86, 87, 503, 86, 87,
    504, 86, 87, 505, 86, 87, 506, 86,
    87, 507, 86, 508, 87, 509, 86, 509,
    87, 86, 87, 510, 86, 87, 511, 86,
    87, 495, 86, 512, 0, 4, 0, 513,
    0
  ]

  class << self
    attr_accessor :_lexer_trans_targs
    private :_lexer_trans_targs, :_lexer_trans_targs=
  end
  self._lexer_trans_targs = [
    0, 2, 8, 418, 7, 7, 9, 19,
    21, 4, 35, 38, 42, 59, 69, 96,
    176, 344, 3, 4, 5, 6, 7, 20,
    6, 7, 20, 10, 11, 12, 13, 12,
    12, 13, 12, 14, 14, 14, 15, 14,
    14, 14, 15, 16, 17, 18, 7, 18,
    19, 7, 20, 22, 23, 24, 25, 26,
    27, 28, 29, 30, 31, 32, 33, 34,
    420, 36, 37, 7, 36, 35, 37, 39,
    40, 41, 43, 44, 46, 45, 47, 48,
    49, 50, 51, 52, 53, 54, 53, 54,
    55, 350, 54, 7, 351, 57, 365, 369,
    373, 383, 400, 56, 57, 58, 2, 8,
    7, 7, 9, 19, 21, 4, 35, 38,
    42, 59, 69, 96, 176, 344, 60, 61,
    67, 68, 62, 63, 64, 65, 66, 70,
    71, 72, 73, 74, 75, 76, 77, 78,
    77, 78, 78, 7, 79, 80, 81, 82,
    83, 95, 84, 85, 86, 87, 88, 89,
    90, 91, 92, 93, 94, 58, 97, 98,
    99, 100, 175, 101, 102, 103, 104, 105,
    106, 107, 108, 109, 110, 111, 112, 113,
    114, 113, 114, 114, 7, 115, 129, 136,
    142, 157, 116, 117, 118, 119, 120, 121,
    122, 123, 124, 125, 126, 127, 128, 7,
    130, 131, 132, 133, 134, 135, 58, 137,
    138, 139, 140, 141, 143, 144, 145, 146,
    156, 147, 148, 149, 150, 151, 152, 153,
    154, 155, 158, 164, 159, 160, 161, 162,
    163, 165, 166, 167, 168, 169, 170, 171,
    172, 173, 174, 177, 263, 178, 179, 180,
    181, 182, 183, 184, 185, 186, 185, 186,
    187, 190, 186, 7, 191, 189, 205, 209,
    219, 229, 245, 188, 189, 58, 192, 193,
    194, 195, 196, 197, 198, 199, 200, 201,
    202, 203, 204, 7, 206, 207, 208, 210,
    211, 213, 212, 214, 215, 216, 217, 218,
    220, 221, 227, 228, 222, 223, 224, 225,
    226, 230, 231, 232, 233, 244, 234, 235,
    236, 237, 238, 239, 240, 241, 242, 243,
    246, 252, 247, 248, 249, 250, 251, 253,
    254, 255, 256, 257, 258, 259, 260, 261,
    262, 264, 265, 266, 267, 268, 269, 270,
    271, 272, 273, 274, 275, 276, 277, 278,
    279, 280, 281, 282, 283, 282, 283, 284,
    287, 283, 7, 288, 286, 302, 306, 310,
    320, 337, 285, 286, 58, 289, 290, 291,
    292, 293, 294, 295, 296, 297, 298, 299,
    300, 301, 7, 303, 304, 305, 307, 308,
    309, 311, 312, 318, 319, 313, 314, 315,
    316, 317, 321, 322, 323, 324, 336, 325,
    326, 327, 328, 329, 330, 331, 332, 333,
    334, 335, 338, 339, 340, 341, 342, 343,
    344, 345, 346, 348, 349, 347, 345, 346,
    347, 345, 348, 2, 8, 349, 9, 19,
    21, 4, 35, 38, 42, 59, 69, 96,
    176, 344, 352, 353, 354, 355, 356, 357,
    358, 359, 360, 361, 362, 363, 364, 7,
    366, 367, 368, 370, 371, 372, 374, 375,
    381, 382, 376, 377, 378, 379, 380, 384,
    385, 386, 387, 399, 388, 389, 390, 391,
    392, 393, 394, 395, 396, 397, 398, 401,
    407, 402, 403, 404, 405, 406, 408, 409,
    410, 411, 412, 413, 414, 415, 416, 417,
    419, 0
  ]

  class << self
    attr_accessor :_lexer_trans_actions
    private :_lexer_trans_actions, :_lexer_trans_actions=
  end
  self._lexer_trans_actions = [
    43, 29, 29, 0, 0, 54, 3, 1,
    0, 29, 1, 29, 29, 29, 29, 29,
    29, 35, 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, 84, 0, 72, 33, 84, 84, 84,
    84, 84, 84, 0, 0, 15, 63, 63,
    31, 130, 60, 57, 31, 63, 57, 63,
    63, 63, 63, 63, 63, 66, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 57, 144,
    0, 54, 0, 81, 84, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 21, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 57,
    144, 0, 54, 0, 69, 33, 84, 84,
    84, 84, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 13,
    0, 0, 0, 0, 0, 0, 13, 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, 57, 144, 0, 54,
    84, 84, 0, 75, 33, 84, 84, 84,
    84, 84, 84, 0, 0, 17, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 17, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 57, 144, 0, 54, 84,
    84, 0, 78, 33, 84, 84, 84, 84,
    84, 84, 0, 0, 19, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 19, 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, 37, 37, 54, 37, 87, 0,
    0, 39, 0, 96, 96, 0, 93, 90,
    41, 96, 90, 96, 96, 96, 96, 96,
    96, 99, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 15,
    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
  ]

  class << self
    attr_accessor :_lexer_eof_actions
    private :_lexer_eof_actions, :_lexer_eof_actions=
  end
  self._lexer_eof_actions = [
    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
  ]

  class << self
    attr_accessor :lexer_start
  end
  self.lexer_start = 1;
  class << self
    attr_accessor :lexer_first_final
  end
  self.lexer_first_final = 420;
  class << self
    attr_accessor :lexer_error
  end
  self.lexer_error = 0;

  class << self
    attr_accessor :lexer_en_main
  end
  self.lexer_en_main = 1;


  # line 133 "ragel/i18n/ro.rb.rl"
end

Instance Method Details

#current_line_content(data, p) ⇒ Object



1148
1149
1150
1151
# File 'lib/gherkin/lexer/ro.rb', line 1148

def current_line_content(data, p)
  rest = data[@last_newline..-1]
  utf8_pack(rest[0..rest.index(10)||-1]).strip # 10 is \n
end

#scan(data) ⇒ Object



814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
# File 'lib/gherkin/lexer/ro.rb', line 814

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


  # line 823 "lib/gherkin/lexer/ro.rb"
  begin
    p ||= 0
    pe ||= data.length
    cs = lexer_start
  end

  # line 143 "ragel/i18n/ro.rb.rl"

  # line 832 "lib/gherkin/lexer/ro.rb"
  begin
    _klen, _trans, _keys, _acts, _nacts = nil
    _goto_level = 0
    _resume = 10
    _eof_trans = 15
    _again = 20
    _test_eof = 30
    _out = 40
    while true
      _trigger_goto = false
      if _goto_level <= 0
        if p == pe
          _goto_level = _test_eof
          next
        end
        if cs == 0
          _goto_level = _out
          next
        end
      end
      if _goto_level <= _resume
        _keys = _lexer_key_offsets[cs]
        _trans = _lexer_index_offsets[cs]
        _klen = _lexer_single_lengths[cs]
        _break_match = false

        begin
          if _klen > 0
            _lower = _keys
            _upper = _keys + _klen - 1

            loop do
              break if _upper < _lower
              _mid = _lower + ( (_upper - _lower) >> 1 )

              if data[p].ord < _lexer_trans_keys[_mid]
                _upper = _mid - 1
              elsif data[p].ord > _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
          end
          _klen = _lexer_range_lengths[cs]
          if _klen > 0
            _lower = _keys
            _upper = _keys + (_klen << 1) - 2
            loop do
              break if _upper < _lower
              _mid = _lower + (((_upper-_lower) >> 1) & ~1)
              if data[p].ord < _lexer_trans_keys[_mid]
                _upper = _mid - 2
              elsif data[p].ord > _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
          end
        end while false
        _trans = _lexer_indicies[_trans]
        cs = _lexer_trans_targs[_trans]
        if _lexer_trans_actions[_trans] != 0
          _acts = _lexer_trans_actions[_trans]
          _nacts = _lexer_actions[_acts]
          _acts += 1
          while _nacts > 0
            _nacts -= 1
            _acts += 1
            case _lexer_actions[_acts - 1]
            when 0 then
              # line 11 "ragel/i18n/ro.rb.rl"
              begin

                @content_start = p
                @current_line = @line_number
                @start_col = p - @last_newline - "#{@keyword}:".length
              end
            when 1 then
              # line 17 "ragel/i18n/ro.rb.rl"
              begin

                @current_line = @line_number
                @start_col = p - @last_newline
              end
            when 2 then
              # line 22 "ragel/i18n/ro.rb.rl"
              begin

                @content_start = p
              end
            when 3 then
              # line 26 "ragel/i18n/ro.rb.rl"
              begin

                @docstring_content_type_start = p
              end
            when 4 then
              # line 29 "ragel/i18n/ro.rb.rl"
              begin

                @docstring_content_type_end = p
              end
            when 5 then
              # line 33 "ragel/i18n/ro.rb.rl"
              begin

                con = unindent(@start_col, utf8_pack(data[@content_start...@next_keyword_start-1]).sub(/(\r?\n)?([\t ])*\Z/, '').gsub(/\\"\\"\\"/, '"""'))
                con_type = utf8_pack(data[@docstring_content_type_start...@docstring_content_type_end]).strip
                @listener.doc_string(con_type, con, @current_line)
              end
            when 6 then
              # line 38 "ragel/i18n/ro.rb.rl"
              begin

                p = store_keyword_content(:feature, data, p, eof)
              end
            when 7 then
              # line 42 "ragel/i18n/ro.rb.rl"
              begin

                p = store_keyword_content(:background, data, p, eof)
              end
            when 8 then
              # line 46 "ragel/i18n/ro.rb.rl"
              begin

                p = store_keyword_content(:scenario, data, p, eof)
              end
            when 9 then
              # line 50 "ragel/i18n/ro.rb.rl"
              begin

                p = store_keyword_content(:scenario_outline, data, p, eof)
              end
            when 10 then
              # line 54 "ragel/i18n/ro.rb.rl"
              begin

                p = store_keyword_content(:examples, data, p, eof)
              end
            when 11 then
              # line 58 "ragel/i18n/ro.rb.rl"
              begin

                con = utf8_pack(data[@content_start...p]).strip
                @listener.step(@keyword, con, @current_line)
              end
            when 12 then
              # line 63 "ragel/i18n/ro.rb.rl"
              begin

                con = utf8_pack(data[@content_start...p]).strip
                @listener.comment(con, @line_number)
                @keyword_start = nil
              end
            when 13 then
              # line 69 "ragel/i18n/ro.rb.rl"
              begin

                con = utf8_pack(data[@content_start...p]).strip
                @listener.tag(con, @current_line)
                @keyword_start = nil
              end
            when 14 then
              # line 75 "ragel/i18n/ro.rb.rl"
              begin

                @line_number += 1
              end
            when 15 then
              # line 79 "ragel/i18n/ro.rb.rl"
              begin

                @last_newline = p + 1
              end
            when 16 then
              # line 83 "ragel/i18n/ro.rb.rl"
              begin

                @keyword_start ||= p
              end
            when 17 then
              # line 87 "ragel/i18n/ro.rb.rl"
              begin

                @keyword = utf8_pack(data[@keyword_start...p]).sub(/:$/,'')
                @keyword_start = nil
              end
            when 18 then
              # line 92 "ragel/i18n/ro.rb.rl"
              begin

                @next_keyword_start = p
              end
            when 19 then
              # line 96 "ragel/i18n/ro.rb.rl"
              begin

                p = p - 1
                current_row = []
                @current_line = @line_number
              end
            when 20 then
              # line 102 "ragel/i18n/ro.rb.rl"
              begin

                @content_start = p
              end
            when 21 then
              # line 106 "ragel/i18n/ro.rb.rl"
              begin

                con = utf8_pack(data[@content_start...p]).strip
                current_row << con.gsub(/\\\|/, "|").gsub(/\\n/, "\n").gsub(/\\\\/, "\\")
              end
            when 22 then
              # line 111 "ragel/i18n/ro.rb.rl"
              begin

                @listener.row(current_row, @current_line)
              end
            when 23 then
              # line 115 "ragel/i18n/ro.rb.rl"
              begin

                if cs < lexer_first_final
                  content = current_line_content(data, p)
                  raise Gherkin::Lexer::LexingError.new("Lexing error on line %d: '%s'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information." % [@line_number, content])
                else
                  @listener.eof
                end
              end
              # line 1076 "lib/gherkin/lexer/ro.rb"
            end # action switch
          end
        end
        if _trigger_goto
          next
        end
      end
      if _goto_level <= _again
        if cs == 0
          _goto_level = _out
          next
        end
        p += 1
        if p != pe
          _goto_level = _resume
          next
        end
      end
      if _goto_level <= _test_eof
        if p == eof
          __acts = _lexer_eof_actions[cs]
          __nacts =  _lexer_actions[__acts]
          __acts += 1
          while __nacts > 0
            __nacts -= 1
            __acts += 1
            case _lexer_actions[__acts - 1]
            when 23 then
              # line 115 "ragel/i18n/ro.rb.rl"
              begin

                if cs < lexer_first_final
                  content = current_line_content(data, p)
                  raise Gherkin::Lexer::LexingError.new("Lexing error on line %d: '%s'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information." % [@line_number, content])
                else
                  @listener.eof
                end
              end
              # line 1115 "lib/gherkin/lexer/ro.rb"
            end # eof action switch
          end
          if _trigger_goto
            next
          end
        end
      end
      if _goto_level <= _out
        break
      end
    end
  end

  # line 144 "ragel/i18n/ro.rb.rl"
end

#store_keyword_content(event, data, p, eof) ⇒ Object



1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
# File 'lib/gherkin/lexer/ro.rb', line 1135

def store_keyword_content(event, data, p, eof)
  end_point = (!@next_keyword_start or (p == eof)) ? p : @next_keyword_start
  content = unindent(@start_col + 2, utf8_pack(data[@content_start...end_point])).rstrip
  content_lines = content.split("\n")
  name = content_lines.shift || ""
  name.strip!
  description = content_lines.join("\n")
  @listener.__send__(event, @keyword, name, description, @current_line)
  @next_keyword_start ? @next_keyword_start - 1 : p
ensure
  @next_keyword_start = nil
end

#unindent(startcol, text) ⇒ Object



1131
1132
1133
# File 'lib/gherkin/lexer/ro.rb', line 1131

def unindent(startcol, text)
  text.gsub(/^[\t ]{0,#{startcol}}/, "")
end

#utf8_pack(array) ⇒ Object



1154
1155
1156
# File 'lib/gherkin/lexer/ro.rb', line 1154

def utf8_pack(array)
  array.pack("c*").force_encoding("UTF-8")
end