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