gherkin 2.11.1 → 2.11.2

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