gherkin 2.11.1 → 2.11.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/History.md +7 -0
  2. data/README.md +1 -1
  3. data/ext/gherkin_lexer_bm/gherkin_lexer_bm.c +392 -353
  4. data/ext/gherkin_lexer_ru/gherkin_lexer_ru.c +684 -671
  5. data/gherkin.gemspec +7 -7
  6. data/lib/gherkin/README.md +7 -0
  7. data/lib/gherkin/i18n.json +646 -0
  8. data/lib/gherkin/i18n.rb +5 -10
  9. data/lib/gherkin/native/therubyracer.rb +3 -2
  10. data/lib/gherkin/parser/parser.rb +12 -11
  11. data/ragel/lexer.java.rl.erb +3 -3
  12. data/ragel/lexer.js.rl.erb +5 -5
  13. data/ragel/lexer.rb.rl.erb +4 -2
  14. data/spec/gherkin/native_lexer_spec.rb +29 -0
  15. data/tasks/compile.rake +2 -39
  16. data/tasks/ragel_task.rb +15 -3
  17. metadata +19 -69
  18. data/lib/gherkin/i18n.yml +0 -613
  19. data/lib/gherkin/js_lexer.rb +0 -20
  20. data/lib/gherkin/rb_lexer.rb +0 -8
  21. data/lib/gherkin/rb_lexer/README.rdoc +0 -8
  22. data/lib/gherkin/rb_lexer/ar.rb +0 -1165
  23. data/lib/gherkin/rb_lexer/bg.rb +0 -1377
  24. data/lib/gherkin/rb_lexer/bm.rb +0 -1081
  25. data/lib/gherkin/rb_lexer/ca.rb +0 -1305
  26. data/lib/gherkin/rb_lexer/cs.rb +0 -1157
  27. data/lib/gherkin/rb_lexer/cy_gb.rb +0 -1027
  28. data/lib/gherkin/rb_lexer/da.rb +0 -1043
  29. data/lib/gherkin/rb_lexer/de.rb +0 -1151
  30. data/lib/gherkin/rb_lexer/en.rb +0 -1151
  31. data/lib/gherkin/rb_lexer/en_au.rb +0 -971
  32. data/lib/gherkin/rb_lexer/en_lol.rb +0 -929
  33. data/lib/gherkin/rb_lexer/en_pirate.rb +0 -1205
  34. data/lib/gherkin/rb_lexer/en_scouse.rb +0 -1357
  35. data/lib/gherkin/rb_lexer/en_tx.rb +0 -1011
  36. data/lib/gherkin/rb_lexer/eo.rb +0 -990
  37. data/lib/gherkin/rb_lexer/es.rb +0 -1135
  38. data/lib/gherkin/rb_lexer/et.rb +0 -985
  39. data/lib/gherkin/rb_lexer/fi.rb +0 -964
  40. data/lib/gherkin/rb_lexer/fr.rb +0 -1223
  41. data/lib/gherkin/rb_lexer/he.rb +0 -1113
  42. data/lib/gherkin/rb_lexer/hr.rb +0 -1061
  43. data/lib/gherkin/rb_lexer/hu.rb +0 -1113
  44. data/lib/gherkin/rb_lexer/id.rb +0 -958
  45. data/lib/gherkin/rb_lexer/is.rb +0 -1115
  46. data/lib/gherkin/rb_lexer/it.rb +0 -1081
  47. data/lib/gherkin/rb_lexer/ja.rb +0 -1413
  48. data/lib/gherkin/rb_lexer/ko.rb +0 -1097
  49. data/lib/gherkin/rb_lexer/lt.rb +0 -1040
  50. data/lib/gherkin/rb_lexer/lu.rb +0 -1127
  51. data/lib/gherkin/rb_lexer/lv.rb +0 -1161
  52. data/lib/gherkin/rb_lexer/nl.rb +0 -1110
  53. data/lib/gherkin/rb_lexer/no.rb +0 -1055
  54. data/lib/gherkin/rb_lexer/pl.rb +0 -1452
  55. data/lib/gherkin/rb_lexer/pt.rb +0 -1425
  56. data/lib/gherkin/rb_lexer/ro.rb +0 -1159
  57. data/lib/gherkin/rb_lexer/ru.rb +0 -1749
  58. data/lib/gherkin/rb_lexer/sk.rb +0 -1041
  59. data/lib/gherkin/rb_lexer/sr_cyrl.rb +0 -1798
  60. data/lib/gherkin/rb_lexer/sr_latn.rb +0 -1289
  61. data/lib/gherkin/rb_lexer/sv.rb +0 -1065
  62. data/lib/gherkin/rb_lexer/tr.rb +0 -1087
  63. data/lib/gherkin/rb_lexer/uk.rb +0 -1641
  64. data/lib/gherkin/rb_lexer/uz.rb +0 -1371
  65. data/lib/gherkin/rb_lexer/vi.rb +0 -1193
  66. data/lib/gherkin/rb_lexer/zh_cn.rb +0 -1053
  67. data/lib/gherkin/rb_lexer/zh_tw.rb +0 -1047
  68. data/spec/gherkin/js_lexer_spec.rb +0 -23
  69. data/spec/gherkin/rb_lexer_spec.rb +0 -20
@@ -1,1040 +0,0 @@
1
-
2
- # line 1 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
3
- require 'gherkin/lexer/i18n_lexer'
4
-
5
- module Gherkin
6
- module RbLexer
7
- class Lt #:nodoc:
8
-
9
- # line 123 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
10
-
11
-
12
- def initialize(listener)
13
- @listener = listener
14
-
15
- # line 16 "lib/gherkin/rb_lexer/lt.rb"
16
- class << self
17
- attr_accessor :_lexer_actions
18
- private :_lexer_actions, :_lexer_actions=
19
- end
20
- self._lexer_actions = [
21
- 0, 1, 0, 1, 1, 1, 2, 1,
22
- 3, 1, 4, 1, 5, 1, 6, 1,
23
- 7, 1, 8, 1, 9, 1, 10, 1,
24
- 11, 1, 12, 1, 13, 1, 16, 1,
25
- 17, 1, 18, 1, 19, 1, 20, 1,
26
- 21, 1, 22, 1, 23, 2, 2, 18,
27
- 2, 3, 4, 2, 13, 0, 2, 14,
28
- 15, 2, 17, 0, 2, 17, 1, 2,
29
- 17, 16, 2, 17, 19, 2, 18, 6,
30
- 2, 18, 7, 2, 18, 8, 2, 18,
31
- 9, 2, 18, 10, 2, 18, 16, 2,
32
- 20, 21, 2, 22, 0, 2, 22, 1,
33
- 2, 22, 16, 2, 22, 19, 3, 4,
34
- 14, 15, 3, 5, 14, 15, 3, 11,
35
- 14, 15, 3, 12, 14, 15, 3, 13,
36
- 14, 15, 3, 14, 15, 18, 3, 17,
37
- 0, 11, 3, 17, 14, 15, 4, 2,
38
- 14, 15, 18, 4, 3, 4, 14, 15,
39
- 4, 17, 0, 14, 15, 5, 17, 0,
40
- 11, 14, 15
41
- ]
42
-
43
- class << self
44
- attr_accessor :_lexer_key_offsets
45
- private :_lexer_key_offsets, :_lexer_key_offsets=
46
- end
47
- self._lexer_key_offsets = [
48
- 0, 0, 19, 20, 21, 39, 40, 41,
49
- 43, 45, 50, 55, 60, 65, 69, 73,
50
- 75, 76, 77, 78, 79, 80, 81, 82,
51
- 83, 84, 85, 86, 87, 88, 89, 90,
52
- 91, 93, 95, 100, 107, 112, 113, 114,
53
- 115, 116, 117, 118, 119, 121, 122, 123,
54
- 124, 125, 126, 127, 128, 129, 130, 131,
55
- 132, 133, 147, 149, 151, 153, 155, 157,
56
- 159, 161, 163, 165, 167, 169, 171, 173,
57
- 175, 177, 195, 196, 197, 198, 199, 200,
58
- 201, 202, 203, 204, 205, 206, 207, 208,
59
- 215, 217, 219, 221, 223, 225, 227, 229,
60
- 231, 232, 233, 234, 235, 236, 237, 238,
61
- 239, 250, 252, 254, 256, 258, 260, 262,
62
- 264, 266, 268, 270, 272, 274, 276, 278,
63
- 280, 282, 284, 286, 288, 290, 292, 294,
64
- 296, 298, 300, 302, 304, 306, 308, 310,
65
- 312, 314, 316, 318, 321, 323, 325, 327,
66
- 329, 331, 333, 335, 337, 339, 341, 343,
67
- 346, 349, 351, 353, 355, 357, 359, 361,
68
- 363, 365, 367, 369, 371, 373, 375, 377,
69
- 379, 380, 381, 382, 383, 384, 385, 387,
70
- 389, 390, 391, 392, 393, 394, 395, 396,
71
- 397, 398, 399, 400, 401, 402, 403, 417,
72
- 419, 421, 423, 425, 427, 429, 431, 433,
73
- 435, 437, 439, 441, 443, 445, 447, 449,
74
- 451, 453, 455, 457, 459, 461, 463, 465,
75
- 468, 470, 472, 474, 476, 478, 480, 482,
76
- 484, 486, 488, 490, 492, 494, 496, 498,
77
- 500, 501, 502, 503, 504, 518, 520, 522,
78
- 524, 526, 528, 530, 532, 534, 536, 538,
79
- 540, 542, 544, 546, 548, 550, 552, 554,
80
- 556, 558, 560, 562, 565, 567, 569, 571,
81
- 573, 575, 577, 579, 581, 583, 585, 588,
82
- 590, 592, 594, 596, 598, 600, 602, 604,
83
- 606, 608, 610, 613, 615, 617, 619, 621,
84
- 623, 625, 627, 629, 631, 633, 635, 637,
85
- 638, 639, 640, 641, 642, 643, 644, 645,
86
- 649, 655, 658, 660, 666, 684, 686, 688,
87
- 690, 692, 694, 696, 698, 700, 702, 705,
88
- 707, 709, 711, 713, 715, 717, 719, 721,
89
- 723, 725, 727, 729, 732, 734, 736, 738,
90
- 740, 742, 744, 746, 748, 750, 752, 754,
91
- 756, 758, 760
92
- ]
93
-
94
- class << self
95
- attr_accessor :_lexer_trans_keys
96
- private :_lexer_trans_keys, :_lexer_trans_keys=
97
- end
98
- self._lexer_trans_keys = [
99
- -17, 10, 32, 34, 35, 37, 42, 64,
100
- 66, 68, 73, 75, 80, 83, 84, 86,
101
- 124, 9, 13, -69, -65, 10, 32, 34,
102
- 35, 37, 42, 64, 66, 68, 73, 75,
103
- 80, 83, 84, 86, 124, 9, 13, 34,
104
- 34, 10, 13, 10, 13, 10, 32, 34,
105
- 9, 13, 10, 32, 34, 9, 13, 10,
106
- 32, 34, 9, 13, 10, 32, 34, 9,
107
- 13, 10, 32, 9, 13, 10, 32, 9,
108
- 13, 10, 13, 10, 95, 70, 69, 65,
109
- 84, 85, 82, 69, 95, 69, 78, 68,
110
- 95, 37, 32, 10, 13, 10, 13, 13,
111
- 32, 64, 9, 10, 9, 10, 13, 32,
112
- 64, 11, 12, 10, 32, 64, 9, 13,
113
- 101, 116, 117, 111, 116, 97, 114, 97,
114
- 111, 105, 110, 116, 101, 107, 115, 116,
115
- 97, 115, 58, 10, 10, 10, 32, 35,
116
- 37, 42, 64, 66, 68, 73, 75, 83,
117
- 84, 9, 13, 10, 95, 10, 70, 10,
118
- 69, 10, 65, 10, 84, 10, 85, 10,
119
- 82, 10, 69, 10, 95, 10, 69, 10,
120
- 78, 10, 68, 10, 95, 10, 37, 10,
121
- 32, 10, 32, 34, 35, 37, 42, 64,
122
- 66, 68, 73, 75, 80, 83, 84, 86,
123
- 124, 9, 13, 97, 118, 121, 122, 100,
124
- -59, -66, 105, 97, 105, 58, 10, 10,
125
- 10, 32, 35, 83, 124, 9, 13, 10,
126
- 97, 10, 118, 10, 121, 10, 98, -60,
127
- 10, -105, 10, 10, 58, 97, 99, 118,
128
- 121, 98, -60, -105, 58, 10, 10, 10,
129
- 32, 35, 37, 64, 75, 80, 83, 86,
130
- 9, 13, 10, 95, 10, 70, 10, 69,
131
- 10, 65, 10, 84, 10, 85, 10, 82,
132
- 10, 69, 10, 95, 10, 69, 10, 78,
133
- 10, 68, 10, 95, 10, 37, 10, 111,
134
- 10, 110, 10, 116, 10, 101, 10, 107,
135
- 10, 115, 10, 116, 10, 97, 10, 115,
136
- 10, 58, 10, 97, 10, 118, 10, 121,
137
- 10, 122, 10, 100, -59, 10, -66, 10,
138
- 10, 105, 10, 97, 10, 105, 10, 97,
139
- 99, 10, 118, 10, 121, 10, 98, -60,
140
- 10, -105, 10, 10, 101, 10, 110, 10,
141
- 97, 10, 114, 10, 105, 10, 106, 10,
142
- 97, 117, 10, 105, 117, 10, 115, 10,
143
- 32, -59, 10, -95, 10, 10, 97, 10,
144
- 98, 10, 108, 10, 111, 10, 110, 10,
145
- 97, 10, 114, 10, 105, 10, 97, 10,
146
- 110, 10, 116, 101, 110, 97, 114, 105,
147
- 106, 97, 117, 105, 117, 115, 32, -59,
148
- -95, 97, 98, 108, 111, 110, 97, 115,
149
- 58, 10, 10, 10, 32, 35, 37, 42,
150
- 64, 66, 68, 73, 75, 83, 84, 9,
151
- 13, 10, 95, 10, 70, 10, 69, 10,
152
- 65, 10, 84, 10, 85, 10, 82, 10,
153
- 69, 10, 95, 10, 69, 10, 78, 10,
154
- 68, 10, 95, 10, 37, 10, 32, 10,
155
- 101, 10, 116, 10, 117, 10, 111, 10,
156
- 116, 10, 97, 10, 114, 10, 97, 10,
157
- 105, 10, 97, 99, 10, 118, 10, 121,
158
- 10, 98, -60, 10, -105, 10, 10, 58,
159
- 10, 101, 10, 110, 10, 97, 10, 114,
160
- 10, 105, 10, 106, 10, 117, 10, 115,
161
- 10, 97, 10, 100, 115, 58, 10, 10,
162
- 10, 32, 35, 37, 42, 64, 66, 68,
163
- 73, 75, 83, 84, 9, 13, 10, 95,
164
- 10, 70, 10, 69, 10, 65, 10, 84,
165
- 10, 85, 10, 82, 10, 69, 10, 95,
166
- 10, 69, 10, 78, 10, 68, 10, 95,
167
- 10, 37, 10, 32, 10, 101, 10, 116,
168
- 10, 117, 10, 111, 10, 116, 10, 97,
169
- 10, 114, 10, 97, 111, 10, 105, 10,
170
- 110, 10, 116, 10, 101, 10, 107, 10,
171
- 115, 10, 116, 10, 97, 10, 115, 10,
172
- 58, 10, 97, 99, 10, 118, 10, 121,
173
- 10, 98, -60, 10, -105, 10, 10, 101,
174
- 10, 110, 10, 97, 10, 114, 10, 105,
175
- 10, 106, 10, 97, 117, 10, 117, 10,
176
- 115, 10, 32, -59, 10, -95, 10, 10,
177
- 97, 10, 98, 10, 108, 10, 111, 10,
178
- 110, 10, 97, 10, 100, 97, 100, 97,
179
- 114, 105, 97, 110, 116, 32, 124, 9,
180
- 13, 10, 32, 92, 124, 9, 13, 10,
181
- 92, 124, 10, 92, 10, 32, 92, 124,
182
- 9, 13, 10, 32, 34, 35, 37, 42,
183
- 64, 66, 68, 73, 75, 80, 83, 84,
184
- 86, 124, 9, 13, 10, 101, 10, 116,
185
- 10, 117, 10, 111, 10, 116, 10, 97,
186
- 10, 114, 10, 97, 10, 105, 10, 97,
187
- 99, 10, 118, 10, 121, 10, 98, -60,
188
- 10, -105, 10, 10, 58, 10, 101, 10,
189
- 110, 10, 97, 10, 114, 10, 105, 10,
190
- 106, 10, 97, 117, 10, 117, 10, 115,
191
- 10, 32, -59, 10, -95, 10, 10, 97,
192
- 10, 98, 10, 108, 10, 111, 10, 110,
193
- 10, 97, 10, 115, 10, 97, 10, 100,
194
- 0
195
- ]
196
-
197
- class << self
198
- attr_accessor :_lexer_single_lengths
199
- private :_lexer_single_lengths, :_lexer_single_lengths=
200
- end
201
- self._lexer_single_lengths = [
202
- 0, 17, 1, 1, 16, 1, 1, 2,
203
- 2, 3, 3, 3, 3, 2, 2, 2,
204
- 1, 1, 1, 1, 1, 1, 1, 1,
205
- 1, 1, 1, 1, 1, 1, 1, 1,
206
- 2, 2, 3, 5, 3, 1, 1, 1,
207
- 1, 1, 1, 1, 2, 1, 1, 1,
208
- 1, 1, 1, 1, 1, 1, 1, 1,
209
- 1, 12, 2, 2, 2, 2, 2, 2,
210
- 2, 2, 2, 2, 2, 2, 2, 2,
211
- 2, 16, 1, 1, 1, 1, 1, 1,
212
- 1, 1, 1, 1, 1, 1, 1, 5,
213
- 2, 2, 2, 2, 2, 2, 2, 2,
214
- 1, 1, 1, 1, 1, 1, 1, 1,
215
- 9, 2, 2, 2, 2, 2, 2, 2,
216
- 2, 2, 2, 2, 2, 2, 2, 2,
217
- 2, 2, 2, 2, 2, 2, 2, 2,
218
- 2, 2, 2, 2, 2, 2, 2, 2,
219
- 2, 2, 2, 3, 2, 2, 2, 2,
220
- 2, 2, 2, 2, 2, 2, 2, 3,
221
- 3, 2, 2, 2, 2, 2, 2, 2,
222
- 2, 2, 2, 2, 2, 2, 2, 2,
223
- 1, 1, 1, 1, 1, 1, 2, 2,
224
- 1, 1, 1, 1, 1, 1, 1, 1,
225
- 1, 1, 1, 1, 1, 1, 12, 2,
226
- 2, 2, 2, 2, 2, 2, 2, 2,
227
- 2, 2, 2, 2, 2, 2, 2, 2,
228
- 2, 2, 2, 2, 2, 2, 2, 3,
229
- 2, 2, 2, 2, 2, 2, 2, 2,
230
- 2, 2, 2, 2, 2, 2, 2, 2,
231
- 1, 1, 1, 1, 12, 2, 2, 2,
232
- 2, 2, 2, 2, 2, 2, 2, 2,
233
- 2, 2, 2, 2, 2, 2, 2, 2,
234
- 2, 2, 2, 3, 2, 2, 2, 2,
235
- 2, 2, 2, 2, 2, 2, 3, 2,
236
- 2, 2, 2, 2, 2, 2, 2, 2,
237
- 2, 2, 3, 2, 2, 2, 2, 2,
238
- 2, 2, 2, 2, 2, 2, 2, 1,
239
- 1, 1, 1, 1, 1, 1, 1, 2,
240
- 4, 3, 2, 4, 16, 2, 2, 2,
241
- 2, 2, 2, 2, 2, 2, 3, 2,
242
- 2, 2, 2, 2, 2, 2, 2, 2,
243
- 2, 2, 2, 3, 2, 2, 2, 2,
244
- 2, 2, 2, 2, 2, 2, 2, 2,
245
- 2, 2, 0
246
- ]
247
-
248
- class << self
249
- attr_accessor :_lexer_range_lengths
250
- private :_lexer_range_lengths, :_lexer_range_lengths=
251
- end
252
- self._lexer_range_lengths = [
253
- 0, 1, 0, 0, 1, 0, 0, 0,
254
- 0, 1, 1, 1, 1, 1, 1, 0,
255
- 0, 0, 0, 0, 0, 0, 0, 0,
256
- 0, 0, 0, 0, 0, 0, 0, 0,
257
- 0, 0, 1, 1, 1, 0, 0, 0,
258
- 0, 0, 0, 0, 0, 0, 0, 0,
259
- 0, 0, 0, 0, 0, 0, 0, 0,
260
- 0, 1, 0, 0, 0, 0, 0, 0,
261
- 0, 0, 0, 0, 0, 0, 0, 0,
262
- 0, 1, 0, 0, 0, 0, 0, 0,
263
- 0, 0, 0, 0, 0, 0, 0, 1,
264
- 0, 0, 0, 0, 0, 0, 0, 0,
265
- 0, 0, 0, 0, 0, 0, 0, 0,
266
- 1, 0, 0, 0, 0, 0, 0, 0,
267
- 0, 0, 0, 0, 0, 0, 0, 0,
268
- 0, 0, 0, 0, 0, 0, 0, 0,
269
- 0, 0, 0, 0, 0, 0, 0, 0,
270
- 0, 0, 0, 0, 0, 0, 0, 0,
271
- 0, 0, 0, 0, 0, 0, 0, 0,
272
- 0, 0, 0, 0, 0, 0, 0, 0,
273
- 0, 0, 0, 0, 0, 0, 0, 0,
274
- 0, 0, 0, 0, 0, 0, 0, 0,
275
- 0, 0, 0, 0, 0, 0, 0, 0,
276
- 0, 0, 0, 0, 0, 0, 1, 0,
277
- 0, 0, 0, 0, 0, 0, 0, 0,
278
- 0, 0, 0, 0, 0, 0, 0, 0,
279
- 0, 0, 0, 0, 0, 0, 0, 0,
280
- 0, 0, 0, 0, 0, 0, 0, 0,
281
- 0, 0, 0, 0, 0, 0, 0, 0,
282
- 0, 0, 0, 0, 1, 0, 0, 0,
283
- 0, 0, 0, 0, 0, 0, 0, 0,
284
- 0, 0, 0, 0, 0, 0, 0, 0,
285
- 0, 0, 0, 0, 0, 0, 0, 0,
286
- 0, 0, 0, 0, 0, 0, 0, 0,
287
- 0, 0, 0, 0, 0, 0, 0, 0,
288
- 0, 0, 0, 0, 0, 0, 0, 0,
289
- 0, 0, 0, 0, 0, 0, 0, 0,
290
- 0, 0, 0, 0, 0, 0, 0, 1,
291
- 1, 0, 0, 1, 1, 0, 0, 0,
292
- 0, 0, 0, 0, 0, 0, 0, 0,
293
- 0, 0, 0, 0, 0, 0, 0, 0,
294
- 0, 0, 0, 0, 0, 0, 0, 0,
295
- 0, 0, 0, 0, 0, 0, 0, 0,
296
- 0, 0, 0
297
- ]
298
-
299
- class << self
300
- attr_accessor :_lexer_index_offsets
301
- private :_lexer_index_offsets, :_lexer_index_offsets=
302
- end
303
- self._lexer_index_offsets = [
304
- 0, 0, 19, 21, 23, 41, 43, 45,
305
- 48, 51, 56, 61, 66, 71, 75, 79,
306
- 82, 84, 86, 88, 90, 92, 94, 96,
307
- 98, 100, 102, 104, 106, 108, 110, 112,
308
- 114, 117, 120, 125, 132, 137, 139, 141,
309
- 143, 145, 147, 149, 151, 154, 156, 158,
310
- 160, 162, 164, 166, 168, 170, 172, 174,
311
- 176, 178, 192, 195, 198, 201, 204, 207,
312
- 210, 213, 216, 219, 222, 225, 228, 231,
313
- 234, 237, 255, 257, 259, 261, 263, 265,
314
- 267, 269, 271, 273, 275, 277, 279, 281,
315
- 288, 291, 294, 297, 300, 303, 306, 309,
316
- 312, 314, 316, 318, 320, 322, 324, 326,
317
- 328, 339, 342, 345, 348, 351, 354, 357,
318
- 360, 363, 366, 369, 372, 375, 378, 381,
319
- 384, 387, 390, 393, 396, 399, 402, 405,
320
- 408, 411, 414, 417, 420, 423, 426, 429,
321
- 432, 435, 438, 441, 445, 448, 451, 454,
322
- 457, 460, 463, 466, 469, 472, 475, 478,
323
- 482, 486, 489, 492, 495, 498, 501, 504,
324
- 507, 510, 513, 516, 519, 522, 525, 528,
325
- 531, 533, 535, 537, 539, 541, 543, 546,
326
- 549, 551, 553, 555, 557, 559, 561, 563,
327
- 565, 567, 569, 571, 573, 575, 577, 591,
328
- 594, 597, 600, 603, 606, 609, 612, 615,
329
- 618, 621, 624, 627, 630, 633, 636, 639,
330
- 642, 645, 648, 651, 654, 657, 660, 663,
331
- 667, 670, 673, 676, 679, 682, 685, 688,
332
- 691, 694, 697, 700, 703, 706, 709, 712,
333
- 715, 717, 719, 721, 723, 737, 740, 743,
334
- 746, 749, 752, 755, 758, 761, 764, 767,
335
- 770, 773, 776, 779, 782, 785, 788, 791,
336
- 794, 797, 800, 803, 807, 810, 813, 816,
337
- 819, 822, 825, 828, 831, 834, 837, 841,
338
- 844, 847, 850, 853, 856, 859, 862, 865,
339
- 868, 871, 874, 878, 881, 884, 887, 890,
340
- 893, 896, 899, 902, 905, 908, 911, 914,
341
- 916, 918, 920, 922, 924, 926, 928, 930,
342
- 934, 940, 944, 947, 953, 971, 974, 977,
343
- 980, 983, 986, 989, 992, 995, 998, 1002,
344
- 1005, 1008, 1011, 1014, 1017, 1020, 1023, 1026,
345
- 1029, 1032, 1035, 1038, 1042, 1045, 1048, 1051,
346
- 1054, 1057, 1060, 1063, 1066, 1069, 1072, 1075,
347
- 1078, 1081, 1084
348
- ]
349
-
350
- class << self
351
- attr_accessor :_lexer_indicies
352
- private :_lexer_indicies, :_lexer_indicies=
353
- end
354
- self._lexer_indicies = [
355
- 1, 3, 2, 4, 5, 6, 7, 8,
356
- 9, 10, 11, 12, 13, 14, 15, 16,
357
- 17, 2, 0, 18, 0, 2, 0, 3,
358
- 2, 4, 5, 6, 7, 8, 9, 10,
359
- 11, 12, 13, 14, 15, 16, 17, 2,
360
- 0, 19, 0, 20, 0, 22, 23, 21,
361
- 25, 26, 24, 29, 28, 30, 28, 27,
362
- 33, 32, 34, 32, 31, 33, 32, 35,
363
- 32, 31, 33, 32, 36, 32, 31, 38,
364
- 37, 37, 0, 3, 39, 39, 0, 41,
365
- 42, 40, 3, 0, 43, 0, 44, 0,
366
- 45, 0, 46, 0, 47, 0, 48, 0,
367
- 49, 0, 50, 0, 51, 0, 52, 0,
368
- 53, 0, 54, 0, 55, 0, 56, 0,
369
- 57, 0, 59, 60, 58, 62, 63, 61,
370
- 0, 0, 0, 0, 64, 65, 66, 65,
371
- 65, 68, 67, 64, 3, 69, 8, 69,
372
- 0, 70, 0, 71, 0, 72, 0, 73,
373
- 0, 74, 0, 71, 0, 71, 0, 75,
374
- 76, 0, 71, 0, 77, 0, 78, 0,
375
- 79, 0, 80, 0, 81, 0, 82, 0,
376
- 83, 0, 84, 0, 85, 0, 87, 86,
377
- 89, 88, 89, 90, 91, 92, 93, 91,
378
- 94, 95, 96, 97, 98, 99, 90, 88,
379
- 89, 100, 88, 89, 101, 88, 89, 102,
380
- 88, 89, 103, 88, 89, 104, 88, 89,
381
- 105, 88, 89, 106, 88, 89, 107, 88,
382
- 89, 108, 88, 89, 109, 88, 89, 110,
383
- 88, 89, 111, 88, 89, 112, 88, 89,
384
- 113, 88, 89, 114, 88, 116, 115, 117,
385
- 118, 119, 120, 121, 122, 123, 124, 125,
386
- 126, 127, 128, 129, 130, 115, 0, 131,
387
- 0, 132, 0, 133, 0, 134, 0, 135,
388
- 0, 136, 0, 137, 0, 138, 0, 139,
389
- 0, 140, 0, 141, 0, 143, 142, 145,
390
- 144, 145, 146, 147, 148, 147, 146, 144,
391
- 145, 149, 144, 145, 150, 144, 145, 151,
392
- 144, 145, 152, 144, 153, 145, 144, 154,
393
- 145, 144, 145, 155, 144, 156, 157, 0,
394
- 158, 0, 159, 0, 160, 0, 161, 0,
395
- 162, 0, 163, 0, 165, 164, 167, 166,
396
- 167, 168, 169, 170, 169, 171, 172, 173,
397
- 174, 168, 166, 167, 175, 166, 167, 176,
398
- 166, 167, 177, 166, 167, 178, 166, 167,
399
- 179, 166, 167, 180, 166, 167, 181, 166,
400
- 167, 182, 166, 167, 183, 166, 167, 184,
401
- 166, 167, 185, 166, 167, 186, 166, 167,
402
- 187, 166, 167, 188, 166, 167, 189, 166,
403
- 167, 190, 166, 167, 191, 166, 167, 192,
404
- 166, 167, 193, 166, 167, 194, 166, 167,
405
- 195, 166, 167, 196, 166, 167, 197, 166,
406
- 167, 198, 166, 167, 199, 166, 167, 200,
407
- 166, 167, 201, 166, 167, 202, 166, 167,
408
- 203, 166, 204, 167, 166, 205, 167, 166,
409
- 167, 206, 166, 167, 207, 166, 167, 197,
410
- 166, 167, 208, 209, 166, 167, 210, 166,
411
- 167, 211, 166, 167, 212, 166, 213, 167,
412
- 166, 197, 167, 166, 167, 214, 166, 167,
413
- 215, 166, 167, 216, 166, 167, 217, 166,
414
- 167, 218, 166, 167, 219, 166, 167, 220,
415
- 196, 166, 167, 197, 221, 166, 167, 222,
416
- 166, 167, 223, 166, 224, 167, 166, 225,
417
- 167, 166, 167, 226, 166, 167, 227, 166,
418
- 167, 228, 166, 167, 229, 166, 167, 195,
419
- 166, 167, 230, 166, 167, 231, 166, 167,
420
- 232, 166, 167, 233, 166, 167, 234, 166,
421
- 167, 206, 166, 235, 0, 236, 0, 237,
422
- 0, 238, 0, 239, 0, 240, 0, 241,
423
- 242, 0, 140, 243, 0, 244, 0, 245,
424
- 0, 246, 0, 247, 0, 248, 0, 249,
425
- 0, 250, 0, 251, 0, 252, 0, 253,
426
- 0, 254, 0, 255, 0, 257, 256, 259,
427
- 258, 259, 260, 261, 262, 263, 261, 264,
428
- 265, 266, 267, 268, 269, 260, 258, 259,
429
- 270, 258, 259, 271, 258, 259, 272, 258,
430
- 259, 273, 258, 259, 274, 258, 259, 275,
431
- 258, 259, 276, 258, 259, 277, 258, 259,
432
- 278, 258, 259, 279, 258, 259, 280, 258,
433
- 259, 281, 258, 259, 282, 258, 259, 283,
434
- 258, 259, 284, 258, 259, 285, 258, 259,
435
- 286, 258, 259, 287, 258, 259, 288, 258,
436
- 259, 289, 258, 259, 286, 258, 259, 286,
437
- 258, 259, 290, 258, 259, 286, 258, 259,
438
- 291, 292, 258, 259, 293, 258, 259, 294,
439
- 258, 259, 295, 258, 296, 259, 258, 297,
440
- 259, 258, 259, 284, 258, 259, 298, 258,
441
- 259, 299, 258, 259, 300, 258, 259, 301,
442
- 258, 259, 302, 258, 259, 303, 258, 259,
443
- 304, 258, 259, 297, 258, 259, 305, 258,
444
- 259, 289, 258, 306, 0, 307, 0, 309,
445
- 308, 311, 310, 311, 312, 313, 314, 315,
446
- 313, 316, 317, 318, 319, 320, 321, 312,
447
- 310, 311, 322, 310, 311, 323, 310, 311,
448
- 324, 310, 311, 325, 310, 311, 326, 310,
449
- 311, 327, 310, 311, 328, 310, 311, 329,
450
- 310, 311, 330, 310, 311, 331, 310, 311,
451
- 332, 310, 311, 333, 310, 311, 334, 310,
452
- 311, 335, 310, 311, 336, 310, 311, 337,
453
- 310, 311, 338, 310, 311, 339, 310, 311,
454
- 340, 310, 311, 341, 310, 311, 338, 310,
455
- 311, 338, 310, 311, 342, 343, 310, 311,
456
- 338, 310, 311, 344, 310, 311, 345, 310,
457
- 311, 346, 310, 311, 347, 310, 311, 348,
458
- 310, 311, 349, 310, 311, 350, 310, 311,
459
- 351, 310, 311, 336, 310, 311, 352, 353,
460
- 310, 311, 354, 310, 311, 355, 310, 311,
461
- 356, 310, 357, 311, 310, 351, 311, 310,
462
- 311, 358, 310, 311, 359, 310, 311, 360,
463
- 310, 311, 361, 310, 311, 362, 310, 311,
464
- 363, 310, 311, 364, 350, 310, 311, 365,
465
- 310, 311, 366, 310, 311, 367, 310, 368,
466
- 311, 310, 369, 311, 310, 311, 370, 310,
467
- 311, 371, 310, 311, 372, 310, 311, 373,
468
- 310, 311, 349, 310, 311, 374, 310, 311,
469
- 341, 310, 375, 0, 74, 0, 376, 0,
470
- 377, 0, 378, 0, 379, 0, 380, 0,
471
- 138, 0, 381, 382, 381, 0, 385, 384,
472
- 386, 387, 384, 383, 0, 389, 390, 388,
473
- 0, 389, 388, 385, 391, 389, 390, 391,
474
- 388, 385, 392, 393, 394, 395, 396, 397,
475
- 398, 399, 400, 401, 402, 403, 404, 405,
476
- 406, 392, 0, 89, 407, 88, 89, 408,
477
- 88, 89, 409, 88, 89, 410, 88, 89,
478
- 411, 88, 89, 408, 88, 89, 408, 88,
479
- 89, 412, 88, 89, 408, 88, 89, 413,
480
- 414, 88, 89, 415, 88, 89, 416, 88,
481
- 89, 417, 88, 418, 89, 88, 419, 89,
482
- 88, 89, 114, 88, 89, 420, 88, 89,
483
- 421, 88, 89, 422, 88, 89, 423, 88,
484
- 89, 424, 88, 89, 425, 88, 89, 426,
485
- 427, 88, 89, 428, 88, 89, 429, 88,
486
- 89, 430, 88, 431, 89, 88, 432, 89,
487
- 88, 89, 433, 88, 89, 434, 88, 89,
488
- 435, 88, 89, 436, 88, 89, 437, 88,
489
- 89, 427, 88, 89, 419, 88, 89, 438,
490
- 88, 89, 411, 88, 439, 0
491
- ]
492
-
493
- class << self
494
- attr_accessor :_lexer_trans_targs
495
- private :_lexer_trans_targs, :_lexer_trans_targs=
496
- end
497
- self._lexer_trans_targs = [
498
- 0, 2, 4, 4, 5, 15, 17, 31,
499
- 34, 37, 39, 43, 44, 74, 95, 295,
500
- 297, 303, 3, 6, 7, 8, 9, 8,
501
- 8, 9, 8, 10, 10, 10, 11, 10,
502
- 10, 10, 11, 12, 13, 14, 4, 14,
503
- 15, 4, 16, 18, 19, 20, 21, 22,
504
- 23, 24, 25, 26, 27, 28, 29, 30,
505
- 346, 32, 33, 4, 16, 33, 4, 16,
506
- 35, 36, 4, 35, 34, 36, 38, 31,
507
- 40, 41, 42, 45, 46, 47, 48, 49,
508
- 50, 51, 52, 53, 54, 55, 56, 57,
509
- 56, 57, 57, 4, 58, 72, 309, 311,
510
- 315, 316, 318, 344, 59, 60, 61, 62,
511
- 63, 64, 65, 66, 67, 68, 69, 70,
512
- 71, 4, 73, 4, 4, 5, 15, 17,
513
- 31, 34, 37, 39, 43, 44, 74, 95,
514
- 295, 297, 303, 75, 76, 77, 78, 79,
515
- 80, 81, 82, 83, 84, 85, 86, 87,
516
- 86, 87, 87, 4, 88, 89, 90, 91,
517
- 92, 93, 94, 73, 96, 168, 97, 98,
518
- 99, 100, 101, 102, 103, 104, 103, 104,
519
- 104, 4, 105, 119, 129, 139, 162, 106,
520
- 107, 108, 109, 110, 111, 112, 113, 114,
521
- 115, 116, 117, 118, 4, 120, 121, 122,
522
- 123, 124, 125, 126, 127, 128, 73, 130,
523
- 131, 132, 133, 134, 135, 136, 137, 138,
524
- 140, 145, 141, 142, 143, 144, 146, 147,
525
- 148, 149, 150, 151, 152, 153, 154, 155,
526
- 156, 157, 158, 159, 160, 161, 163, 164,
527
- 165, 166, 167, 169, 170, 171, 172, 173,
528
- 174, 175, 232, 176, 177, 178, 179, 180,
529
- 181, 182, 183, 184, 185, 186, 187, 188,
530
- 189, 190, 189, 190, 190, 4, 191, 205,
531
- 206, 208, 212, 213, 215, 230, 192, 193,
532
- 194, 195, 196, 197, 198, 199, 200, 201,
533
- 202, 203, 204, 4, 73, 207, 205, 209,
534
- 210, 211, 214, 216, 222, 217, 218, 219,
535
- 220, 221, 223, 224, 225, 226, 227, 228,
536
- 229, 231, 233, 234, 235, 236, 235, 236,
537
- 236, 4, 237, 251, 252, 254, 258, 259,
538
- 270, 293, 238, 239, 240, 241, 242, 243,
539
- 244, 245, 246, 247, 248, 249, 250, 4,
540
- 73, 253, 251, 255, 256, 257, 260, 261,
541
- 262, 263, 264, 265, 266, 267, 268, 269,
542
- 271, 276, 272, 273, 274, 275, 277, 278,
543
- 279, 280, 281, 282, 283, 284, 285, 286,
544
- 287, 288, 289, 290, 291, 292, 294, 296,
545
- 298, 299, 300, 301, 302, 303, 304, 305,
546
- 307, 308, 306, 304, 305, 306, 304, 307,
547
- 308, 5, 15, 17, 31, 34, 37, 39,
548
- 43, 44, 74, 95, 295, 297, 303, 310,
549
- 72, 312, 313, 314, 317, 319, 325, 320,
550
- 321, 322, 323, 324, 326, 327, 328, 329,
551
- 330, 331, 332, 343, 333, 334, 335, 336,
552
- 337, 338, 339, 340, 341, 342, 345, 0
553
- ]
554
-
555
- class << self
556
- attr_accessor :_lexer_trans_actions
557
- private :_lexer_trans_actions, :_lexer_trans_actions=
558
- end
559
- self._lexer_trans_actions = [
560
- 43, 0, 0, 54, 3, 1, 0, 29,
561
- 1, 29, 29, 29, 29, 29, 29, 29,
562
- 29, 35, 0, 0, 0, 7, 139, 48,
563
- 0, 102, 9, 5, 45, 134, 45, 0,
564
- 33, 122, 33, 33, 0, 11, 106, 0,
565
- 0, 114, 25, 0, 0, 0, 0, 0,
566
- 0, 0, 0, 0, 0, 0, 0, 0,
567
- 0, 0, 57, 149, 126, 0, 110, 23,
568
- 0, 27, 118, 27, 51, 0, 0, 0,
569
- 0, 0, 0, 0, 0, 0, 0, 0,
570
- 0, 0, 0, 0, 0, 0, 57, 144,
571
- 0, 54, 0, 72, 33, 84, 84, 84,
572
- 84, 84, 84, 84, 0, 0, 0, 0,
573
- 0, 0, 0, 0, 0, 0, 0, 0,
574
- 0, 15, 15, 31, 130, 60, 57, 31,
575
- 63, 57, 63, 63, 63, 63, 63, 63,
576
- 63, 63, 66, 0, 0, 0, 0, 0,
577
- 0, 0, 0, 0, 0, 0, 57, 144,
578
- 0, 54, 0, 81, 84, 0, 0, 0,
579
- 0, 0, 0, 21, 0, 0, 0, 0,
580
- 0, 0, 0, 0, 57, 144, 0, 54,
581
- 0, 69, 33, 84, 84, 84, 84, 0,
582
- 0, 0, 0, 0, 0, 0, 0, 0,
583
- 0, 0, 0, 0, 13, 0, 0, 0,
584
- 0, 0, 0, 0, 0, 0, 13, 0,
585
- 0, 0, 0, 0, 0, 0, 0, 0,
586
- 0, 0, 0, 0, 0, 0, 0, 0,
587
- 0, 0, 0, 0, 0, 0, 0, 0,
588
- 0, 0, 0, 0, 0, 0, 0, 0,
589
- 0, 0, 0, 0, 0, 0, 0, 0,
590
- 0, 0, 0, 0, 0, 0, 0, 0,
591
- 0, 0, 0, 0, 0, 0, 0, 0,
592
- 57, 144, 0, 54, 0, 78, 33, 84,
593
- 84, 84, 84, 84, 84, 84, 0, 0,
594
- 0, 0, 0, 0, 0, 0, 0, 0,
595
- 0, 0, 0, 19, 19, 0, 0, 0,
596
- 0, 0, 0, 0, 0, 0, 0, 0,
597
- 0, 0, 0, 0, 0, 0, 0, 0,
598
- 0, 0, 0, 0, 57, 144, 0, 54,
599
- 0, 75, 33, 84, 84, 84, 84, 84,
600
- 84, 84, 0, 0, 0, 0, 0, 0,
601
- 0, 0, 0, 0, 0, 0, 0, 17,
602
- 17, 0, 0, 0, 0, 0, 0, 0,
603
- 0, 0, 0, 0, 0, 0, 0, 0,
604
- 0, 0, 0, 0, 0, 0, 0, 0,
605
- 0, 0, 0, 0, 0, 0, 0, 0,
606
- 0, 0, 0, 0, 0, 0, 0, 0,
607
- 0, 0, 0, 0, 0, 0, 0, 37,
608
- 37, 54, 37, 87, 0, 0, 39, 0,
609
- 0, 93, 90, 41, 96, 90, 96, 96,
610
- 96, 96, 96, 96, 96, 96, 99, 0,
611
- 0, 0, 0, 0, 0, 0, 0, 0,
612
- 0, 0, 0, 0, 0, 0, 0, 0,
613
- 0, 0, 0, 0, 0, 0, 0, 0,
614
- 0, 0, 0, 0, 0, 0, 0, 0
615
- ]
616
-
617
- class << self
618
- attr_accessor :_lexer_eof_actions
619
- private :_lexer_eof_actions, :_lexer_eof_actions=
620
- end
621
- self._lexer_eof_actions = [
622
- 0, 43, 43, 43, 43, 43, 43, 43,
623
- 43, 43, 43, 43, 43, 43, 43, 43,
624
- 43, 43, 43, 43, 43, 43, 43, 43,
625
- 43, 43, 43, 43, 43, 43, 43, 43,
626
- 43, 43, 43, 43, 43, 43, 43, 43,
627
- 43, 43, 43, 43, 43, 43, 43, 43,
628
- 43, 43, 43, 43, 43, 43, 43, 43,
629
- 43, 43, 43, 43, 43, 43, 43, 43,
630
- 43, 43, 43, 43, 43, 43, 43, 43,
631
- 43, 43, 43, 43, 43, 43, 43, 43,
632
- 43, 43, 43, 43, 43, 43, 43, 43,
633
- 43, 43, 43, 43, 43, 43, 43, 43,
634
- 43, 43, 43, 43, 43, 43, 43, 43,
635
- 43, 43, 43, 43, 43, 43, 43, 43,
636
- 43, 43, 43, 43, 43, 43, 43, 43,
637
- 43, 43, 43, 43, 43, 43, 43, 43,
638
- 43, 43, 43, 43, 43, 43, 43, 43,
639
- 43, 43, 43, 43, 43, 43, 43, 43,
640
- 43, 43, 43, 43, 43, 43, 43, 43,
641
- 43, 43, 43, 43, 43, 43, 43, 43,
642
- 43, 43, 43, 43, 43, 43, 43, 43,
643
- 43, 43, 43, 43, 43, 43, 43, 43,
644
- 43, 43, 43, 43, 43, 43, 43, 43,
645
- 43, 43, 43, 43, 43, 43, 43, 43,
646
- 43, 43, 43, 43, 43, 43, 43, 43,
647
- 43, 43, 43, 43, 43, 43, 43, 43,
648
- 43, 43, 43, 43, 43, 43, 43, 43,
649
- 43, 43, 43, 43, 43, 43, 43, 43,
650
- 43, 43, 43, 43, 43, 43, 43, 43,
651
- 43, 43, 43, 43, 43, 43, 43, 43,
652
- 43, 43, 43, 43, 43, 43, 43, 43,
653
- 43, 43, 43, 43, 43, 43, 43, 43,
654
- 43, 43, 43, 43, 43, 43, 43, 43,
655
- 43, 43, 43, 43, 43, 43, 43, 43,
656
- 43, 43, 43, 43, 43, 43, 43, 43,
657
- 43, 43, 43, 43, 43, 43, 43, 43,
658
- 43, 43, 43, 43, 43, 43, 43, 43,
659
- 43, 43, 43, 43, 43, 43, 43, 43,
660
- 43, 43, 43, 43, 43, 43, 43, 43,
661
- 43, 43, 43, 43, 43, 43, 43, 43,
662
- 43, 43, 43, 43, 43, 43, 43, 43,
663
- 43, 43, 43, 43, 43, 43, 43, 43,
664
- 43, 43, 43, 43, 43, 43, 43, 43,
665
- 43, 43, 43
666
- ]
667
-
668
- class << self
669
- attr_accessor :lexer_start
670
- end
671
- self.lexer_start = 1;
672
- class << self
673
- attr_accessor :lexer_first_final
674
- end
675
- self.lexer_first_final = 346;
676
- class << self
677
- attr_accessor :lexer_error
678
- end
679
- self.lexer_error = 0;
680
-
681
- class << self
682
- attr_accessor :lexer_en_main
683
- end
684
- self.lexer_en_main = 1;
685
-
686
-
687
- # line 128 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
688
- end
689
-
690
- def scan(data)
691
- data = (data + "\n%_FEATURE_END_%").unpack("c*") # Explicit EOF simplifies things considerably
692
- eof = pe = data.length
693
-
694
- @line_number = 1
695
- @last_newline = 0
696
-
697
-
698
- # line 699 "lib/gherkin/rb_lexer/lt.rb"
699
- begin
700
- p ||= 0
701
- pe ||= data.length
702
- cs = lexer_start
703
- end
704
-
705
- # line 138 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
706
-
707
- # line 708 "lib/gherkin/rb_lexer/lt.rb"
708
- begin
709
- _klen, _trans, _keys, _acts, _nacts = nil
710
- _goto_level = 0
711
- _resume = 10
712
- _eof_trans = 15
713
- _again = 20
714
- _test_eof = 30
715
- _out = 40
716
- while true
717
- _trigger_goto = false
718
- if _goto_level <= 0
719
- if p == pe
720
- _goto_level = _test_eof
721
- next
722
- end
723
- if cs == 0
724
- _goto_level = _out
725
- next
726
- end
727
- end
728
- if _goto_level <= _resume
729
- _keys = _lexer_key_offsets[cs]
730
- _trans = _lexer_index_offsets[cs]
731
- _klen = _lexer_single_lengths[cs]
732
- _break_match = false
733
-
734
- begin
735
- if _klen > 0
736
- _lower = _keys
737
- _upper = _keys + _klen - 1
738
-
739
- loop do
740
- break if _upper < _lower
741
- _mid = _lower + ( (_upper - _lower) >> 1 )
742
-
743
- if data[p] < _lexer_trans_keys[_mid]
744
- _upper = _mid - 1
745
- elsif data[p] > _lexer_trans_keys[_mid]
746
- _lower = _mid + 1
747
- else
748
- _trans += (_mid - _keys)
749
- _break_match = true
750
- break
751
- end
752
- end # loop
753
- break if _break_match
754
- _keys += _klen
755
- _trans += _klen
756
- end
757
- _klen = _lexer_range_lengths[cs]
758
- if _klen > 0
759
- _lower = _keys
760
- _upper = _keys + (_klen << 1) - 2
761
- loop do
762
- break if _upper < _lower
763
- _mid = _lower + (((_upper-_lower) >> 1) & ~1)
764
- if data[p] < _lexer_trans_keys[_mid]
765
- _upper = _mid - 2
766
- elsif data[p] > _lexer_trans_keys[_mid+1]
767
- _lower = _mid + 2
768
- else
769
- _trans += ((_mid - _keys) >> 1)
770
- _break_match = true
771
- break
772
- end
773
- end # loop
774
- break if _break_match
775
- _trans += _klen
776
- end
777
- end while false
778
- _trans = _lexer_indicies[_trans]
779
- cs = _lexer_trans_targs[_trans]
780
- if _lexer_trans_actions[_trans] != 0
781
- _acts = _lexer_trans_actions[_trans]
782
- _nacts = _lexer_actions[_acts]
783
- _acts += 1
784
- while _nacts > 0
785
- _nacts -= 1
786
- _acts += 1
787
- case _lexer_actions[_acts - 1]
788
- when 0 then
789
- # line 9 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
790
- begin
791
-
792
- @content_start = p
793
- @current_line = @line_number
794
- @start_col = p - @last_newline - "#{@keyword}:".length
795
- end
796
- when 1 then
797
- # line 15 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
798
- begin
799
-
800
- @current_line = @line_number
801
- @start_col = p - @last_newline
802
- end
803
- when 2 then
804
- # line 20 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
805
- begin
806
-
807
- @content_start = p
808
- end
809
- when 3 then
810
- # line 24 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
811
- begin
812
-
813
- @docstring_content_type_start = p
814
- end
815
- when 4 then
816
- # line 27 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
817
- begin
818
-
819
- @docstring_content_type_end = p
820
- end
821
- when 5 then
822
- # line 31 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
823
- begin
824
-
825
- con = unindent(@start_col, utf8_pack(data[@content_start...@next_keyword_start-1]).sub(/(\r?\n)?([\t ])*\Z/, '').gsub(/\\"\\"\\"/, '"""'))
826
- con_type = utf8_pack(data[@docstring_content_type_start...@docstring_content_type_end]).strip
827
- @listener.doc_string(con_type, con, @current_line)
828
- end
829
- when 6 then
830
- # line 36 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
831
- begin
832
-
833
- p = store_keyword_content(:feature, data, p, eof)
834
- end
835
- when 7 then
836
- # line 40 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
837
- begin
838
-
839
- p = store_keyword_content(:background, data, p, eof)
840
- end
841
- when 8 then
842
- # line 44 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
843
- begin
844
-
845
- p = store_keyword_content(:scenario, data, p, eof)
846
- end
847
- when 9 then
848
- # line 48 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
849
- begin
850
-
851
- p = store_keyword_content(:scenario_outline, data, p, eof)
852
- end
853
- when 10 then
854
- # line 52 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
855
- begin
856
-
857
- p = store_keyword_content(:examples, data, p, eof)
858
- end
859
- when 11 then
860
- # line 56 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
861
- begin
862
-
863
- con = utf8_pack(data[@content_start...p]).strip
864
- @listener.step(@keyword, con, @current_line)
865
- end
866
- when 12 then
867
- # line 61 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
868
- begin
869
-
870
- con = utf8_pack(data[@content_start...p]).strip
871
- @listener.comment(con, @line_number)
872
- @keyword_start = nil
873
- end
874
- when 13 then
875
- # line 67 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
876
- begin
877
-
878
- con = utf8_pack(data[@content_start...p]).strip
879
- @listener.tag(con, @current_line)
880
- @keyword_start = nil
881
- end
882
- when 14 then
883
- # line 73 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
884
- begin
885
-
886
- @line_number += 1
887
- end
888
- when 15 then
889
- # line 77 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
890
- begin
891
-
892
- @last_newline = p + 1
893
- end
894
- when 16 then
895
- # line 81 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
896
- begin
897
-
898
- @keyword_start ||= p
899
- end
900
- when 17 then
901
- # line 85 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
902
- begin
903
-
904
- @keyword = utf8_pack(data[@keyword_start...p]).sub(/:$/,'')
905
- @keyword_start = nil
906
- end
907
- when 18 then
908
- # line 90 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
909
- begin
910
-
911
- @next_keyword_start = p
912
- end
913
- when 19 then
914
- # line 94 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
915
- begin
916
-
917
- p = p - 1
918
- current_row = []
919
- @current_line = @line_number
920
- end
921
- when 20 then
922
- # line 100 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
923
- begin
924
-
925
- @content_start = p
926
- end
927
- when 21 then
928
- # line 104 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
929
- begin
930
-
931
- con = utf8_pack(data[@content_start...p]).strip
932
- current_row << con.gsub(/\\\|/, "|").gsub(/\\n/, "\n").gsub(/\\\\/, "\\")
933
- end
934
- when 22 then
935
- # line 109 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
936
- begin
937
-
938
- @listener.row(current_row, @current_line)
939
- end
940
- when 23 then
941
- # line 113 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
942
- begin
943
-
944
- if cs < lexer_first_final
945
- content = current_line_content(data, p)
946
- 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])
947
- else
948
- @listener.eof
949
- end
950
- end
951
- # line 952 "lib/gherkin/rb_lexer/lt.rb"
952
- end # action switch
953
- end
954
- end
955
- if _trigger_goto
956
- next
957
- end
958
- end
959
- if _goto_level <= _again
960
- if cs == 0
961
- _goto_level = _out
962
- next
963
- end
964
- p += 1
965
- if p != pe
966
- _goto_level = _resume
967
- next
968
- end
969
- end
970
- if _goto_level <= _test_eof
971
- if p == eof
972
- __acts = _lexer_eof_actions[cs]
973
- __nacts = _lexer_actions[__acts]
974
- __acts += 1
975
- while __nacts > 0
976
- __nacts -= 1
977
- __acts += 1
978
- case _lexer_actions[__acts - 1]
979
- when 23 then
980
- # line 113 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
981
- begin
982
-
983
- if cs < lexer_first_final
984
- content = current_line_content(data, p)
985
- 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])
986
- else
987
- @listener.eof
988
- end
989
- end
990
- # line 991 "lib/gherkin/rb_lexer/lt.rb"
991
- end # eof action switch
992
- end
993
- if _trigger_goto
994
- next
995
- end
996
- end
997
- end
998
- if _goto_level <= _out
999
- break
1000
- end
1001
- end
1002
- end
1003
-
1004
- # line 139 "/Users/ahellesoy/github/gherkin/tasks/../ragel/i18n/lt.rb.rl"
1005
- end
1006
-
1007
- def unindent(startcol, text)
1008
- text.gsub(/^[\t ]{0,#{startcol}}/, "")
1009
- end
1010
-
1011
- def store_keyword_content(event, data, p, eof)
1012
- end_point = (!@next_keyword_start or (p == eof)) ? p : @next_keyword_start
1013
- content = unindent(@start_col + 2, utf8_pack(data[@content_start...end_point])).rstrip
1014
- content_lines = content.split("\n")
1015
- name = content_lines.shift || ""
1016
- name.strip!
1017
- description = content_lines.join("\n")
1018
- @listener.__send__(event, @keyword, name, description, @current_line)
1019
- @next_keyword_start ? @next_keyword_start - 1 : p
1020
- ensure
1021
- @next_keyword_start = nil
1022
- end
1023
-
1024
- def current_line_content(data, p)
1025
- rest = data[@last_newline..-1]
1026
- utf8_pack(rest[0..rest.index(10)||-1]).strip # 10 is \n
1027
- end
1028
-
1029
- if (RUBY_VERSION =~ /^1\.9/)
1030
- def utf8_pack(array)
1031
- array.pack("c*").force_encoding("UTF-8")
1032
- end
1033
- else
1034
- def utf8_pack(array)
1035
- array.pack("c*")
1036
- end
1037
- end
1038
- end
1039
- end
1040
- end