gherkin 2.11.1 → 2.11.2

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