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