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