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