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