gherkin 2.3.5 → 2.3.6

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