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