gherkin 2.3.5-x86-mingw32 → 2.3.6-x86-mingw32

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