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