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