gherkin 2.12.2 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (333) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -15
  3. data/CONTRIBUTING.md +23 -0
  4. data/Gemfile +0 -3
  5. data/LICENSE +18 -17
  6. data/Makefile +65 -0
  7. data/README.md +9 -268
  8. data/Rakefile +17 -19
  9. data/bin/gherkin-generate-ast +21 -0
  10. data/bin/gherkin-generate-pickles +25 -0
  11. data/bin/gherkin-generate-tokens +12 -0
  12. data/gherkin-ruby.razor +218 -0
  13. data/gherkin.gemspec +22 -76
  14. data/lib/gherkin/ast_builder.rb +243 -0
  15. data/lib/gherkin/ast_node.rb +30 -0
  16. data/lib/gherkin/dialect.rb +58 -0
  17. data/lib/gherkin/errors.rb +45 -0
  18. data/lib/gherkin/gherkin-languages.json +2968 -0
  19. data/lib/gherkin/gherkin_line.rb +95 -0
  20. data/lib/gherkin/parser.rb +1910 -0
  21. data/lib/gherkin/pickles/compiler.rb +164 -0
  22. data/lib/gherkin/token.rb +18 -0
  23. data/lib/gherkin/token_formatter_builder.rb +39 -0
  24. data/lib/gherkin/token_matcher.rb +169 -0
  25. data/lib/gherkin/token_scanner.rb +40 -0
  26. data/spec/capture_warnings.rb +68 -0
  27. data/spec/coverage.rb +10 -0
  28. data/spec/gherkin/parser_spec.rb +146 -0
  29. metadata +60 -567
  30. data/.gitattributes +0 -2
  31. data/.mailmap +0 -2
  32. data/.rbenv-gemsets +0 -1
  33. data/.rspec +0 -1
  34. data/.ruby-gemset +0 -1
  35. data/.ruby-version +0 -1
  36. data/.yardopts +0 -5
  37. data/History.md +0 -881
  38. data/build_native_gems.sh +0 -7
  39. data/cucumber.yml +0 -5
  40. data/examples/parse_and_output_json.rb +0 -19
  41. data/ext/gherkin_lexer_ar/extconf.rb +0 -6
  42. data/ext/gherkin_lexer_ar/gherkin_lexer_ar.c +0 -1432
  43. data/ext/gherkin_lexer_bg/extconf.rb +0 -6
  44. data/ext/gherkin_lexer_bg/gherkin_lexer_bg.c +0 -1655
  45. data/ext/gherkin_lexer_bm/extconf.rb +0 -6
  46. data/ext/gherkin_lexer_bm/gherkin_lexer_bm.c +0 -1516
  47. data/ext/gherkin_lexer_ca/extconf.rb +0 -6
  48. data/ext/gherkin_lexer_ca/gherkin_lexer_ca.c +0 -1581
  49. data/ext/gherkin_lexer_cs/extconf.rb +0 -6
  50. data/ext/gherkin_lexer_cs/gherkin_lexer_cs.c +0 -1515
  51. data/ext/gherkin_lexer_cy_gb/extconf.rb +0 -6
  52. data/ext/gherkin_lexer_cy_gb/gherkin_lexer_cy_gb.c +0 -1282
  53. data/ext/gherkin_lexer_da/extconf.rb +0 -6
  54. data/ext/gherkin_lexer_da/gherkin_lexer_da.c +0 -1298
  55. data/ext/gherkin_lexer_de/extconf.rb +0 -6
  56. data/ext/gherkin_lexer_de/gherkin_lexer_de.c +0 -1425
  57. data/ext/gherkin_lexer_el/extconf.rb +0 -6
  58. data/ext/gherkin_lexer_el/gherkin_lexer_el.c +0 -1919
  59. data/ext/gherkin_lexer_en/extconf.rb +0 -6
  60. data/ext/gherkin_lexer_en/gherkin_lexer_en.c +0 -1418
  61. data/ext/gherkin_lexer_en_au/extconf.rb +0 -6
  62. data/ext/gherkin_lexer_en_au/gherkin_lexer_en_au.c +0 -1765
  63. data/ext/gherkin_lexer_en_lol/extconf.rb +0 -6
  64. data/ext/gherkin_lexer_en_lol/gherkin_lexer_en_lol.c +0 -1177
  65. data/ext/gherkin_lexer_en_old/extconf.rb +0 -6
  66. data/ext/gherkin_lexer_en_old/gherkin_lexer_en_old.c +0 -1309
  67. data/ext/gherkin_lexer_en_pirate/extconf.rb +0 -6
  68. data/ext/gherkin_lexer_en_pirate/gherkin_lexer_en_pirate.c +0 -1471
  69. data/ext/gherkin_lexer_en_scouse/extconf.rb +0 -6
  70. data/ext/gherkin_lexer_en_scouse/gherkin_lexer_en_scouse.c +0 -1634
  71. data/ext/gherkin_lexer_en_tx/extconf.rb +0 -6
  72. data/ext/gherkin_lexer_en_tx/gherkin_lexer_en_tx.c +0 -1265
  73. data/ext/gherkin_lexer_eo/extconf.rb +0 -6
  74. data/ext/gherkin_lexer_eo/gherkin_lexer_eo.c +0 -1241
  75. data/ext/gherkin_lexer_es/extconf.rb +0 -6
  76. data/ext/gherkin_lexer_es/gherkin_lexer_es.c +0 -1399
  77. data/ext/gherkin_lexer_et/extconf.rb +0 -6
  78. data/ext/gherkin_lexer_et/gherkin_lexer_et.c +0 -1236
  79. data/ext/gherkin_lexer_fa/extconf.rb +0 -6
  80. data/ext/gherkin_lexer_fa/gherkin_lexer_fa.c +0 -1475
  81. data/ext/gherkin_lexer_fi/extconf.rb +0 -6
  82. data/ext/gherkin_lexer_fi/gherkin_lexer_fi.c +0 -1215
  83. data/ext/gherkin_lexer_fr/extconf.rb +0 -6
  84. data/ext/gherkin_lexer_fr/gherkin_lexer_fr.c +0 -1493
  85. data/ext/gherkin_lexer_gl/extconf.rb +0 -6
  86. data/ext/gherkin_lexer_gl/gherkin_lexer_gl.c +0 -1374
  87. data/ext/gherkin_lexer_he/extconf.rb +0 -6
  88. data/ext/gherkin_lexer_he/gherkin_lexer_he.c +0 -1374
  89. data/ext/gherkin_lexer_hi/extconf.rb +0 -6
  90. data/ext/gherkin_lexer_hi/gherkin_lexer_hi.c +0 -1848
  91. data/ext/gherkin_lexer_hr/extconf.rb +0 -6
  92. data/ext/gherkin_lexer_hr/gherkin_lexer_hr.c +0 -1323
  93. data/ext/gherkin_lexer_hu/extconf.rb +0 -6
  94. data/ext/gherkin_lexer_hu/gherkin_lexer_hu.c +0 -1376
  95. data/ext/gherkin_lexer_id/extconf.rb +0 -6
  96. data/ext/gherkin_lexer_id/gherkin_lexer_id.c +0 -1208
  97. data/ext/gherkin_lexer_is/extconf.rb +0 -6
  98. data/ext/gherkin_lexer_is/gherkin_lexer_is.c +0 -1376
  99. data/ext/gherkin_lexer_it/extconf.rb +0 -6
  100. data/ext/gherkin_lexer_it/gherkin_lexer_it.c +0 -1340
  101. data/ext/gherkin_lexer_ja/extconf.rb +0 -6
  102. data/ext/gherkin_lexer_ja/gherkin_lexer_ja.c +0 -1699
  103. data/ext/gherkin_lexer_kn/extconf.rb +0 -6
  104. data/ext/gherkin_lexer_kn/gherkin_lexer_kn.c +0 -1965
  105. data/ext/gherkin_lexer_ko/extconf.rb +0 -6
  106. data/ext/gherkin_lexer_ko/gherkin_lexer_ko.c +0 -1360
  107. data/ext/gherkin_lexer_lt/extconf.rb +0 -6
  108. data/ext/gherkin_lexer_lt/gherkin_lexer_lt.c +0 -1296
  109. data/ext/gherkin_lexer_lu/extconf.rb +0 -6
  110. data/ext/gherkin_lexer_lu/gherkin_lexer_lu.c +0 -1389
  111. data/ext/gherkin_lexer_lv/extconf.rb +0 -6
  112. data/ext/gherkin_lexer_lv/gherkin_lexer_lv.c +0 -1425
  113. data/ext/gherkin_lexer_nl/extconf.rb +0 -6
  114. data/ext/gherkin_lexer_nl/gherkin_lexer_nl.c +0 -1368
  115. data/ext/gherkin_lexer_no/extconf.rb +0 -6
  116. data/ext/gherkin_lexer_no/gherkin_lexer_no.c +0 -1311
  117. data/ext/gherkin_lexer_pa/extconf.rb +0 -6
  118. data/ext/gherkin_lexer_pa/gherkin_lexer_pa.c +0 -2160
  119. data/ext/gherkin_lexer_pl/extconf.rb +0 -6
  120. data/ext/gherkin_lexer_pl/gherkin_lexer_pl.c +0 -1738
  121. data/ext/gherkin_lexer_pt/extconf.rb +0 -6
  122. data/ext/gherkin_lexer_pt/gherkin_lexer_pt.c +0 -1711
  123. data/ext/gherkin_lexer_ro/extconf.rb +0 -6
  124. data/ext/gherkin_lexer_ro/gherkin_lexer_ro.c +0 -1427
  125. data/ext/gherkin_lexer_ru/extconf.rb +0 -6
  126. data/ext/gherkin_lexer_ru/gherkin_lexer_ru.c +0 -2071
  127. data/ext/gherkin_lexer_sk/extconf.rb +0 -6
  128. data/ext/gherkin_lexer_sk/gherkin_lexer_sk.c +0 -1739
  129. data/ext/gherkin_lexer_sr_cyrl/extconf.rb +0 -6
  130. data/ext/gherkin_lexer_sr_cyrl/gherkin_lexer_sr_cyrl.c +0 -2112
  131. data/ext/gherkin_lexer_sr_latn/extconf.rb +0 -6
  132. data/ext/gherkin_lexer_sr_latn/gherkin_lexer_sr_latn.c +0 -1567
  133. data/ext/gherkin_lexer_sv/extconf.rb +0 -6
  134. data/ext/gherkin_lexer_sv/gherkin_lexer_sv.c +0 -1324
  135. data/ext/gherkin_lexer_th/extconf.rb +0 -6
  136. data/ext/gherkin_lexer_th/gherkin_lexer_th.c +0 -2840
  137. data/ext/gherkin_lexer_tl/extconf.rb +0 -6
  138. data/ext/gherkin_lexer_tl/gherkin_lexer_tl.c +0 -2021
  139. data/ext/gherkin_lexer_tr/extconf.rb +0 -6
  140. data/ext/gherkin_lexer_tr/gherkin_lexer_tr.c +0 -1347
  141. data/ext/gherkin_lexer_tt/extconf.rb +0 -6
  142. data/ext/gherkin_lexer_tt/gherkin_lexer_tt.c +0 -1936
  143. data/ext/gherkin_lexer_uk/extconf.rb +0 -6
  144. data/ext/gherkin_lexer_uk/gherkin_lexer_uk.c +0 -1941
  145. data/ext/gherkin_lexer_uz/extconf.rb +0 -6
  146. data/ext/gherkin_lexer_uz/gherkin_lexer_uz.c +0 -1651
  147. data/ext/gherkin_lexer_vi/extconf.rb +0 -6
  148. data/ext/gherkin_lexer_vi/gherkin_lexer_vi.c +0 -1458
  149. data/ext/gherkin_lexer_zh_cn/extconf.rb +0 -6
  150. data/ext/gherkin_lexer_zh_cn/gherkin_lexer_zh_cn.c +0 -1314
  151. data/ext/gherkin_lexer_zh_tw/extconf.rb +0 -6
  152. data/ext/gherkin_lexer_zh_tw/gherkin_lexer_zh_tw.c +0 -1307
  153. data/features/.cucumber/stepdefs.json +0 -244
  154. data/features/escaped_pipes.feature +0 -8
  155. data/features/feature_parser.feature +0 -237
  156. data/features/json_formatter.feature +0 -498
  157. data/features/json_parser.feature +0 -331
  158. data/features/native_lexer.feature +0 -19
  159. data/features/parser_with_native_lexer.feature +0 -205
  160. data/features/pretty_formatter.feature +0 -17
  161. data/features/step_definitions/eyeball_steps.rb +0 -3
  162. data/features/step_definitions/gherkin_steps.rb +0 -29
  163. data/features/step_definitions/json_formatter_steps.rb +0 -30
  164. data/features/step_definitions/json_parser_steps.rb +0 -21
  165. data/features/step_definitions/pretty_formatter_steps.rb +0 -85
  166. data/features/steps_parser.feature +0 -46
  167. data/features/support/env.rb +0 -41
  168. data/install_mingw_os_x.sh +0 -5
  169. data/js/.npmignore +0 -1
  170. data/js/lib/gherkin/lexer/.npmignore +0 -0
  171. data/lib/gherkin.rb +0 -2
  172. data/lib/gherkin/README.md +0 -7
  173. data/lib/gherkin/c_lexer.rb +0 -17
  174. data/lib/gherkin/formatter/ansi_escapes.rb +0 -97
  175. data/lib/gherkin/formatter/argument.rb +0 -16
  176. data/lib/gherkin/formatter/escaping.rb +0 -15
  177. data/lib/gherkin/formatter/filter_formatter.rb +0 -150
  178. data/lib/gherkin/formatter/hashable.rb +0 -25
  179. data/lib/gherkin/formatter/json_formatter.rb +0 -133
  180. data/lib/gherkin/formatter/line_filter.rb +0 -26
  181. data/lib/gherkin/formatter/model.rb +0 -281
  182. data/lib/gherkin/formatter/pretty_formatter.rb +0 -245
  183. data/lib/gherkin/formatter/regexp_filter.rb +0 -21
  184. data/lib/gherkin/formatter/step_printer.rb +0 -21
  185. data/lib/gherkin/formatter/tag_count_formatter.rb +0 -47
  186. data/lib/gherkin/formatter/tag_filter.rb +0 -19
  187. data/lib/gherkin/i18n.json +0 -786
  188. data/lib/gherkin/i18n.rb +0 -176
  189. data/lib/gherkin/json_parser.rb +0 -177
  190. data/lib/gherkin/lexer/ar.rb +0 -1170
  191. data/lib/gherkin/lexer/bg.rb +0 -1382
  192. data/lib/gherkin/lexer/bm.rb +0 -1250
  193. data/lib/gherkin/lexer/ca.rb +0 -1310
  194. data/lib/gherkin/lexer/cs.rb +0 -1246
  195. data/lib/gherkin/lexer/cy_gb.rb +0 -1032
  196. data/lib/gherkin/lexer/da.rb +0 -1048
  197. data/lib/gherkin/lexer/de.rb +0 -1166
  198. data/lib/gherkin/lexer/el.rb +0 -1628
  199. data/lib/gherkin/lexer/en.rb +0 -1156
  200. data/lib/gherkin/lexer/en_au.rb +0 -1486
  201. data/lib/gherkin/lexer/en_lol.rb +0 -934
  202. data/lib/gherkin/lexer/en_old.rb +0 -1037
  203. data/lib/gherkin/lexer/en_pirate.rb +0 -1210
  204. data/lib/gherkin/lexer/en_scouse.rb +0 -1362
  205. data/lib/gherkin/lexer/en_tx.rb +0 -1016
  206. data/lib/gherkin/lexer/encoding.rb +0 -41
  207. data/lib/gherkin/lexer/eo.rb +0 -995
  208. data/lib/gherkin/lexer/es.rb +0 -1140
  209. data/lib/gherkin/lexer/et.rb +0 -990
  210. data/lib/gherkin/lexer/fa.rb +0 -1214
  211. data/lib/gherkin/lexer/fi.rb +0 -969
  212. data/lib/gherkin/lexer/fr.rb +0 -1228
  213. data/lib/gherkin/lexer/gl.rb +0 -1117
  214. data/lib/gherkin/lexer/he.rb +0 -1118
  215. data/lib/gherkin/lexer/hi.rb +0 -1559
  216. data/lib/gherkin/lexer/hr.rb +0 -1066
  217. data/lib/gherkin/lexer/hu.rb +0 -1118
  218. data/lib/gherkin/lexer/i18n_lexer.rb +0 -48
  219. data/lib/gherkin/lexer/id.rb +0 -963
  220. data/lib/gherkin/lexer/is.rb +0 -1120
  221. data/lib/gherkin/lexer/it.rb +0 -1086
  222. data/lib/gherkin/lexer/ja.rb +0 -1418
  223. data/lib/gherkin/lexer/kn.rb +0 -1672
  224. data/lib/gherkin/lexer/ko.rb +0 -1102
  225. data/lib/gherkin/lexer/lt.rb +0 -1045
  226. data/lib/gherkin/lexer/lu.rb +0 -1132
  227. data/lib/gherkin/lexer/lv.rb +0 -1166
  228. data/lib/gherkin/lexer/nl.rb +0 -1115
  229. data/lib/gherkin/lexer/no.rb +0 -1060
  230. data/lib/gherkin/lexer/pa.rb +0 -1852
  231. data/lib/gherkin/lexer/pl.rb +0 -1457
  232. data/lib/gherkin/lexer/pt.rb +0 -1430
  233. data/lib/gherkin/lexer/ro.rb +0 -1164
  234. data/lib/gherkin/lexer/ru.rb +0 -1766
  235. data/lib/gherkin/lexer/sk.rb +0 -1452
  236. data/lib/gherkin/lexer/sr_cyrl.rb +0 -1803
  237. data/lib/gherkin/lexer/sr_latn.rb +0 -1294
  238. data/lib/gherkin/lexer/sv.rb +0 -1070
  239. data/lib/gherkin/lexer/th.rb +0 -2492
  240. data/lib/gherkin/lexer/tl.rb +0 -1726
  241. data/lib/gherkin/lexer/tr.rb +0 -1092
  242. data/lib/gherkin/lexer/tt.rb +0 -1643
  243. data/lib/gherkin/lexer/uk.rb +0 -1646
  244. data/lib/gherkin/lexer/uz.rb +0 -1376
  245. data/lib/gherkin/lexer/vi.rb +0 -1198
  246. data/lib/gherkin/lexer/zh_cn.rb +0 -1058
  247. data/lib/gherkin/lexer/zh_tw.rb +0 -1052
  248. data/lib/gherkin/listener/event.rb +0 -45
  249. data/lib/gherkin/listener/formatter_listener.rb +0 -150
  250. data/lib/gherkin/native.rb +0 -7
  251. data/lib/gherkin/native/java.rb +0 -72
  252. data/lib/gherkin/native/null.rb +0 -5
  253. data/lib/gherkin/native/therubyracer.rb +0 -41
  254. data/lib/gherkin/parser/meta.txt +0 -5
  255. data/lib/gherkin/parser/parser.rb +0 -166
  256. data/lib/gherkin/parser/root.txt +0 -11
  257. data/lib/gherkin/parser/steps.txt +0 -4
  258. data/lib/gherkin/platform.rb +0 -13
  259. data/lib/gherkin/rubify.rb +0 -31
  260. data/lib/gherkin/tag_expression.rb +0 -63
  261. data/ragel/lexer.c.rl.erb +0 -454
  262. data/ragel/lexer.java.rl.erb +0 -219
  263. data/ragel/lexer.js.rl.erb +0 -322
  264. data/ragel/lexer.rb.rl.erb +0 -179
  265. data/ragel/lexer_common.rl.erb +0 -50
  266. data/spec/gherkin/c_lexer_spec.rb +0 -22
  267. data/spec/gherkin/fixtures/1.feature +0 -8
  268. data/spec/gherkin/fixtures/comments_in_table.feature +0 -9
  269. data/spec/gherkin/fixtures/complex.feature +0 -45
  270. data/spec/gherkin/fixtures/complex.json +0 -139
  271. data/spec/gherkin/fixtures/complex_for_filtering.feature +0 -60
  272. data/spec/gherkin/fixtures/complex_with_tags.feature +0 -61
  273. data/spec/gherkin/fixtures/dos_line_endings.feature +0 -45
  274. data/spec/gherkin/fixtures/examples_with_only_header.feature +0 -14
  275. data/spec/gherkin/fixtures/hantu_pisang.feature +0 -35
  276. data/spec/gherkin/fixtures/i18n_fr.feature +0 -14
  277. data/spec/gherkin/fixtures/i18n_fr2.feature +0 -8
  278. data/spec/gherkin/fixtures/i18n_no.feature +0 -7
  279. data/spec/gherkin/fixtures/i18n_pt1.feature +0 -44
  280. data/spec/gherkin/fixtures/i18n_pt2.feature +0 -4
  281. data/spec/gherkin/fixtures/i18n_pt3.feature +0 -4
  282. data/spec/gherkin/fixtures/i18n_pt4.feature +0 -4
  283. data/spec/gherkin/fixtures/i18n_zh-CN.feature +0 -9
  284. data/spec/gherkin/fixtures/iso-8859-1.feature +0 -6
  285. data/spec/gherkin/fixtures/issue_145.feature +0 -22
  286. data/spec/gherkin/fixtures/scenario_outline_with_tags.feature +0 -13
  287. data/spec/gherkin/fixtures/scenario_without_steps.feature +0 -5
  288. data/spec/gherkin/fixtures/simple_with_comments.feature +0 -7
  289. data/spec/gherkin/fixtures/simple_with_tags.feature +0 -11
  290. data/spec/gherkin/fixtures/with_bom.feature +0 -3
  291. data/spec/gherkin/fixtures/with_bom_and_language_spec.feature +0 -4
  292. data/spec/gherkin/formatter/ansi_escapes_spec.rb +0 -32
  293. data/spec/gherkin/formatter/filter_formatter_spec.rb +0 -204
  294. data/spec/gherkin/formatter/json_formatter_spec.rb +0 -179
  295. data/spec/gherkin/formatter/model_spec.rb +0 -28
  296. data/spec/gherkin/formatter/pretty_formatter_spec.rb +0 -184
  297. data/spec/gherkin/formatter/spaces.feature +0 -9
  298. data/spec/gherkin/formatter/step_printer_spec.rb +0 -55
  299. data/spec/gherkin/formatter/tabs.feature +0 -9
  300. data/spec/gherkin/formatter/tag_count_formatter_spec.rb +0 -30
  301. data/spec/gherkin/i18n_spec.rb +0 -256
  302. data/spec/gherkin/java_lexer_spec.rb +0 -20
  303. data/spec/gherkin/json_parser_spec.rb +0 -165
  304. data/spec/gherkin/lexer/i18n_lexer_spec.rb +0 -65
  305. data/spec/gherkin/native_lexer_spec.rb +0 -29
  306. data/spec/gherkin/parser/parser_spec.rb +0 -16
  307. data/spec/gherkin/rubify_spec.rb +0 -23
  308. data/spec/gherkin/sexp_recorder.rb +0 -59
  309. data/spec/gherkin/shared/doc_string_group.rb +0 -161
  310. data/spec/gherkin/shared/encoding_group.rb +0 -48
  311. data/spec/gherkin/shared/lexer_group.rb +0 -589
  312. data/spec/gherkin/shared/row_group.rb +0 -123
  313. data/spec/gherkin/shared/tags_group.rb +0 -52
  314. data/spec/gherkin/tag_expression_spec.rb +0 -146
  315. data/spec/spec_helper.rb +0 -94
  316. data/tasks/apidoc.rake +0 -32
  317. data/tasks/bench.rake +0 -184
  318. data/tasks/bench/feature_builder.rb +0 -49
  319. data/tasks/bench/null_listener.rb +0 -4
  320. data/tasks/compile.rake +0 -83
  321. data/tasks/cucumber.rake +0 -23
  322. data/tasks/gems.rake +0 -46
  323. data/tasks/ikvm.rake +0 -126
  324. data/tasks/ragel_task.rb +0 -124
  325. data/tasks/release.rake +0 -34
  326. data/tasks/rspec.rake +0 -6
  327. data/tasks/yard/default/layout/html/bubble_32x32.png +0 -0
  328. data/tasks/yard/default/layout/html/bubble_48x48.png +0 -0
  329. data/tasks/yard/default/layout/html/footer.erb +0 -5
  330. data/tasks/yard/default/layout/html/index.erb +0 -1
  331. data/tasks/yard/default/layout/html/layout.erb +0 -25
  332. data/tasks/yard/default/layout/html/logo.erb +0 -1
  333. data/tasks/yard/default/layout/html/setup.rb +0 -4
@@ -1,176 +0,0 @@
1
- require 'gherkin/rubify'
2
- require 'gherkin/native'
3
- require 'multi_json'
4
-
5
- module Gherkin
6
- class I18n
7
- LexerNotFound = Class.new(LoadError)
8
-
9
- native_impl('gherkin') unless defined?(BYPASS_NATIVE_IMPL)
10
-
11
- FEATURE_ELEMENT_KEYS = %w{feature background scenario scenario_outline examples}
12
- STEP_KEYWORD_KEYS = %w{given when then and but}
13
- KEYWORD_KEYS = FEATURE_ELEMENT_KEYS + STEP_KEYWORD_KEYS
14
- LANGUAGES = MultiJson.load(File.open(File.dirname(__FILE__) + '/i18n.json', 'r:utf-8').read)
15
-
16
- class << self
17
- include Rubify
18
-
19
- # Used by code generators for other lexer tools like pygments lexer and textmate bundle
20
- def all
21
- LANGUAGES.keys.sort.map{|iso_code| get(iso_code)}
22
- end
23
-
24
- def get(iso_code)
25
- languages[iso_code] ||= new(iso_code)
26
- end
27
-
28
- # Returns all keyword translations and aliases of +keywords+, escaped and joined with <tt>|</tt>.
29
- # This method is convenient for editor support and syntax highlighting engines for Gherkin, where
30
- # there is typically a code generation tool to generate regular expressions for recognising the
31
- # various I18n translations of Gherkin's keywords.
32
- #
33
- # The +keywords+ arguments can be one of <tt>:feature</tt>, <tt>:background</tt>, <tt>:scenario</tt>,
34
- # <tt>:scenario_outline</tt>, <tt>:examples</tt>, <tt>:step</tt>.
35
- def keyword_regexp(*keywords)
36
- unique_keywords = all.map do |i18n|
37
- keywords.map do |keyword|
38
- if keyword.to_s == 'step'
39
- i18n.step_keywords.to_a
40
- else
41
- i18n.keywords(keyword).to_a
42
- end
43
- end
44
- end
45
-
46
- unique_keywords.flatten.compact.map{|kw| kw.to_s}.sort.reverse.uniq.join('|').gsub(/\*/, '\*')
47
- end
48
-
49
- def code_keywords
50
- rubify(all.map{|i18n| i18n.code_keywords}).flatten.uniq.sort
51
- end
52
-
53
- def code_keyword_for(gherkin_keyword)
54
- gherkin_keyword.gsub(/[\s',!]/, '').strip
55
- end
56
-
57
- def language_table
58
- require 'stringio'
59
- require 'gherkin/formatter/pretty_formatter'
60
- require 'gherkin/formatter/model'
61
- io = StringIO.new
62
- pf = Gherkin::Formatter::PrettyFormatter.new(io, true, false)
63
- table = all.map do |i18n|
64
- Formatter::Model::DataTableRow.new([], [i18n.iso_code, i18n.keywords('name')[0], i18n.keywords('native')[0]], nil)
65
- end
66
- pf.table(table)
67
- io.string
68
- end
69
-
70
- def unicode_escape(word, prefix="\\u")
71
- word = word.unpack("U*").map do |c|
72
- if c > 127 || c == 32
73
- "#{prefix}%04x" % c
74
- else
75
- c.chr
76
- end
77
- end.join
78
- end
79
-
80
- private
81
-
82
- def languages
83
- @languages ||= {}
84
- end
85
- end
86
-
87
- attr_reader :iso_code
88
-
89
- def initialize(iso_code)
90
- @iso_code = iso_code
91
- @keywords = LANGUAGES[iso_code]
92
- raise "Language not supported: #{iso_code.inspect}" if @iso_code.nil?
93
- @keywords['grammar_name'] = @keywords['name'].gsub(/\s/, '')
94
- end
95
-
96
- def lexer(listener, force_ruby=false)
97
- if force_ruby || ENV['GHERKIN_RUBY'] =~ /true/i
98
- rb(listener)
99
- else
100
- begin
101
- c(listener)
102
- rescue NameError, LoadError => e
103
- warn("WARNING: #{e.message}. Reverting to Ruby lexer.")
104
- rb(listener)
105
- end
106
- end
107
- rescue LoadError => e
108
- raise LexerNotFound, "No lexer was found for #{iso_code} (#{e.message}). Supported languages are listed in gherkin/i18n.json."
109
- end
110
-
111
- def c(listener)
112
- require 'gherkin/c_lexer'
113
- CLexer[underscored_iso_code].new(listener)
114
- end
115
-
116
- def rb(listener)
117
- require "gherkin/lexer/#{underscored_iso_code}"
118
- Lexer.const_get(underscored_iso_code.capitalize).new(listener)
119
- end
120
-
121
- def underscored_iso_code
122
- @iso_code.gsub(/[\s-]/, '_').downcase
123
- end
124
-
125
- # Keywords that can be used in Gherkin source
126
- def step_keywords
127
- STEP_KEYWORD_KEYS.map{|iso_code| keywords(iso_code)}.flatten.uniq
128
- end
129
-
130
- # Keywords that can be used in code
131
- def code_keywords
132
- result = step_keywords.map{|keyword| self.class.code_keyword_for(keyword)}
133
- result.delete('*')
134
- result.delete_if {|kw| kw =~ /^\d/}
135
- result
136
- end
137
-
138
- def keywords(key)
139
- key = key.to_s
140
- raise "No #{key.inspect} in #{@keywords.inspect}" if @keywords[key].nil?
141
- @keywords[key].split('|').map{|keyword| real_keyword(key, keyword)}
142
- end
143
-
144
- def keyword_table
145
- require 'stringio'
146
- require 'gherkin/formatter/pretty_formatter'
147
- require 'gherkin/formatter/model'
148
- io = StringIO.new
149
- pf = Gherkin::Formatter::PrettyFormatter.new(io, false, false)
150
-
151
- gherkin_keyword_table = KEYWORD_KEYS.map do |key|
152
- Formatter::Model::Row.new([], [key, keywords(key).map{|keyword| %{"#{keyword}"}}.join(', ')], nil)
153
- end
154
-
155
- code_keyword_table = STEP_KEYWORD_KEYS.map do |key|
156
- code_keywords = keywords(key).reject{|keyword| keyword == '* '}.map do |keyword|
157
- %{"#{self.class.code_keyword_for(keyword)}"}
158
- end.join(', ')
159
- Formatter::Model::Row.new([], ["#{key} (code)", code_keywords], nil)
160
- end
161
-
162
- pf.table(gherkin_keyword_table + code_keyword_table)
163
- io.string
164
- end
165
-
166
- private
167
-
168
- def real_keyword(key, keyword)
169
- if(STEP_KEYWORD_KEYS.index(key))
170
- (keyword + ' ').sub(/< $/, '')
171
- else
172
- keyword
173
- end
174
- end
175
- end
176
- end
@@ -1,177 +0,0 @@
1
- require 'base64'
2
- require 'gherkin/formatter/argument'
3
- require 'gherkin/formatter/model'
4
- require 'gherkin/native'
5
- require 'multi_json'
6
-
7
- module Gherkin
8
- class JSONParser
9
- native_impl('gherkin')
10
-
11
- include Base64
12
-
13
- def initialize(reporter, formatter)
14
- @reporter, @formatter = reporter, formatter
15
- end
16
-
17
- # Parse a gherkin object +o+, which can either be a JSON String,
18
- # or a Hash (from a parsed JSON String).
19
- def parse(o)
20
- o = MultiJson.load(o) if String === o
21
-
22
- o.each do |f|
23
- @formatter.uri(f['uri'])
24
- Formatter::Model::Feature.new(comments(f), tags(f), keyword(f), name(f), description(f), line(f), id(f)).replay(@formatter)
25
- (f["elements"] || []).each do |feature_element|
26
- feature_element(feature_element).replay(@formatter)
27
-
28
- (feature_element["before"] || []).each do |hook|
29
- before(hook)
30
- end
31
-
32
- (feature_element["steps"] || []).each do |step|
33
- step(step).replay(@formatter)
34
- match(step)
35
- result(step)
36
- embeddings(step)
37
- output(step)
38
- end
39
-
40
- (feature_element["after"] || []).each do |hook|
41
- after(hook)
42
- end
43
-
44
- (feature_element["examples"] || []).each do |eo|
45
- Formatter::Model::Examples.new(comments(eo), tags(eo), keyword(eo), name(eo), description(eo), line(eo), id(eo), examples_rows(eo['rows'])).replay(@formatter)
46
- end
47
- end
48
- end
49
-
50
- @formatter.eof
51
- end
52
-
53
- private
54
-
55
- def feature_element(o)
56
- case o['type']
57
- when 'background'
58
- Formatter::Model::Background.new(comments(o), keyword(o), name(o), description(o), line(o))
59
- when 'scenario'
60
- Formatter::Model::Scenario.new(comments(o), tags(o), keyword(o), name(o), description(o), line(o), id(o))
61
- when 'scenario_outline'
62
- Formatter::Model::ScenarioOutline.new(comments(o), tags(o), keyword(o), name(o), description(o), line(o), id(o))
63
- end
64
- end
65
-
66
- def step(o)
67
- builder = Formatter::Model::Step::Builder.new(comments(o), keyword(o), name(o), line(o))
68
-
69
- (o['rows'] || []).each do |row|
70
- builder.row comments(row), row['cells'], row['line'], nil
71
- end
72
-
73
- if(o['doc_string'])
74
- ds = o['doc_string']
75
- builder.doc_string ds['value'], ds['content_type'].to_s, ds['line']
76
- end
77
-
78
- builder.build
79
- end
80
-
81
- def match(o)
82
- if(m = o['match'])
83
- Formatter::Model::Match.new(arguments(m), location(m)).replay(@reporter)
84
- end
85
- end
86
-
87
- def result(o)
88
- if(r = o['result'])
89
- Formatter::Model::Result.new(status(r), duration(r), error_message(r)).replay(@reporter)
90
- end
91
- end
92
-
93
- def before(o)
94
- m = o['match']
95
- match = Formatter::Model::Match.new([], location(m))
96
- r = o['result']
97
- result = Formatter::Model::Result.new(status(r), duration(r), error_message(r))
98
- @reporter.before(match, result)
99
- end
100
-
101
- def after(o)
102
- m = o['match']
103
- match = Formatter::Model::Match.new([], location(m))
104
- r = o['result']
105
- result = Formatter::Model::Result.new(status(r), duration(r), error_message(r))
106
- @reporter.after(match, result)
107
- end
108
-
109
- def embeddings(o)
110
- (o['embeddings'] || []).each do |embedding|
111
- @reporter.embedding(embedding['mime_type'], Base64::decode64(embedding['data']))
112
- end
113
- end
114
-
115
- def output(o)
116
- (o['output'] || []).each do |text|
117
- @reporter.write(text)
118
- end
119
- end
120
-
121
- def examples_rows(o)
122
- o.map{|row| Formatter::Model::ExamplesTableRow.new(comments(row), row['cells'], row['line'], row['id'])}
123
- end
124
-
125
- def comments(o)
126
- (o['comments'] || []).map do |comment|
127
- Formatter::Model::Comment.new(comment['value'], comment['line'])
128
- end
129
- end
130
-
131
- def tags(o)
132
- (o['tags'] || []).map do |tag|
133
- Formatter::Model::Tag.new(tag['name'], tag['line'])
134
- end
135
- end
136
-
137
- def keyword(o)
138
- o['keyword']
139
- end
140
-
141
- def name(o)
142
- o['name']
143
- end
144
-
145
- def description(o)
146
- o['description']
147
- end
148
-
149
- def line(o)
150
- o['line']
151
- end
152
-
153
- def id(o)
154
- o['id']
155
- end
156
-
157
- def arguments(m)
158
- m['arguments'].map{|a| Formatter::Argument.new(a['offset'], a['val'])}
159
- end
160
-
161
- def location(m)
162
- m['location']
163
- end
164
-
165
- def status(r)
166
- r['status']
167
- end
168
-
169
- def duration(r)
170
- r['duration']
171
- end
172
-
173
- def error_message(r)
174
- r['error_message']
175
- end
176
- end
177
- end
@@ -1,1170 +0,0 @@
1
-
2
- # line 1 "ragel/i18n/ar.rb.rl"
3
- require 'gherkin/native'
4
-
5
- module Gherkin
6
- module Lexer
7
- class Ar #:nodoc:
8
- native_impl('gherkin')
9
-
10
-
11
- # line 125 "ragel/i18n/ar.rb.rl"
12
-
13
-
14
- def initialize(listener)
15
- @listener = listener
16
-
17
- # Initialize ivars to avoid warnings
18
- @keyword = nil
19
-
20
- # line 21 "lib/gherkin/lexer/ar.rb"
21
- class << self
22
- attr_accessor :_lexer_actions
23
- private :_lexer_actions, :_lexer_actions=
24
- end
25
- self._lexer_actions = [
26
- 0, 1, 0, 1, 1, 1, 2, 1,
27
- 3, 1, 4, 1, 5, 1, 6, 1,
28
- 7, 1, 8, 1, 9, 1, 10, 1,
29
- 11, 1, 12, 1, 13, 1, 16, 1,
30
- 17, 1, 18, 1, 19, 1, 20, 1,
31
- 21, 1, 22, 1, 23, 2, 2, 18,
32
- 2, 3, 4, 2, 13, 0, 2, 14,
33
- 15, 2, 17, 0, 2, 17, 1, 2,
34
- 17, 16, 2, 17, 19, 2, 18, 6,
35
- 2, 18, 7, 2, 18, 8, 2, 18,
36
- 9, 2, 18, 10, 2, 18, 16, 2,
37
- 20, 21, 2, 22, 0, 2, 22, 1,
38
- 2, 22, 16, 2, 22, 19, 3, 4,
39
- 14, 15, 3, 5, 14, 15, 3, 11,
40
- 14, 15, 3, 12, 14, 15, 3, 13,
41
- 14, 15, 3, 14, 15, 18, 3, 17,
42
- 0, 11, 3, 17, 14, 15, 4, 2,
43
- 14, 15, 18, 4, 3, 4, 14, 15,
44
- 4, 17, 0, 14, 15, 5, 17, 0,
45
- 11, 14, 15
46
- ]
47
-
48
- class << self
49
- attr_accessor :_lexer_key_offsets
50
- private :_lexer_key_offsets, :_lexer_key_offsets=
51
- end
52
- self._lexer_key_offsets = [
53
- 0, 0, 13, 19, 21, 22, 23, 24,
54
- 25, 26, 27, 29, 31, 43, 46, 47,
55
- 48, 49, 50, 51, 52, 53, 54, 55,
56
- 56, 58, 60, 65, 70, 75, 80, 84,
57
- 88, 90, 91, 92, 93, 94, 95, 96,
58
- 97, 98, 99, 100, 101, 102, 103, 104,
59
- 105, 110, 117, 122, 126, 132, 135, 137,
60
- 143, 155, 157, 158, 159, 160, 161, 162,
61
- 163, 164, 165, 166, 167, 168, 169, 170,
62
- 180, 187, 189, 191, 193, 195, 197, 199,
63
- 201, 213, 215, 217, 219, 221, 223, 225,
64
- 227, 229, 231, 233, 235, 237, 239, 241,
65
- 243, 245, 247, 249, 251, 253, 255, 257,
66
- 259, 261, 263, 265, 267, 269, 271, 274,
67
- 276, 278, 280, 282, 284, 286, 288, 290,
68
- 292, 294, 296, 298, 300, 302, 304, 306,
69
- 310, 312, 314, 316, 318, 320, 322, 324,
70
- 326, 328, 330, 332, 334, 336, 338, 340,
71
- 342, 344, 346, 348, 350, 352, 354, 355,
72
- 356, 357, 358, 359, 360, 361, 362, 363,
73
- 370, 372, 374, 376, 378, 380, 382, 384,
74
- 386, 388, 390, 391, 392, 393, 394, 395,
75
- 396, 397, 398, 399, 400, 401, 402, 403,
76
- 404, 405, 406, 407, 408, 409, 417, 421,
77
- 423, 426, 428, 430, 432, 434, 436, 438,
78
- 440, 442, 444, 446, 448, 450, 452, 454,
79
- 456, 458, 460, 462, 464, 466, 468, 470,
80
- 472, 474, 476, 478, 480, 482, 484, 486,
81
- 488, 491, 493, 495, 497, 499, 501, 503,
82
- 505, 507, 509, 511, 513, 515, 517, 519,
83
- 521, 523, 525, 527, 529, 531, 533, 535,
84
- 536, 537, 538, 539, 540, 541, 542, 543,
85
- 544, 545, 546, 547, 549, 550, 551, 552,
86
- 553, 554, 555, 556, 557, 558, 559, 560,
87
- 570, 577, 579, 581, 583, 585, 587, 589,
88
- 591, 593, 595, 597, 599, 601, 603, 605,
89
- 607, 609, 611, 613, 615, 617, 619, 621,
90
- 623, 625, 627, 629, 631, 633, 635, 637,
91
- 639, 641, 643, 645, 647, 649, 651, 653,
92
- 655, 657, 659, 661, 663, 665, 669, 671,
93
- 673, 675, 677, 679, 681, 683, 685, 687,
94
- 689, 691, 693, 695, 697, 699, 701, 703,
95
- 705, 707, 709, 711, 713, 714, 715, 725,
96
- 732, 735, 737, 739, 741, 743, 745, 747,
97
- 749, 751, 753, 755, 757, 759, 761, 763,
98
- 765, 767, 769, 771, 773, 775, 777, 779,
99
- 781, 783, 785, 787, 789, 791, 793, 795,
100
- 797, 799, 801, 803, 805, 807, 809, 811,
101
- 813, 815, 817, 819, 822, 824, 826, 828,
102
- 830, 832, 834, 836, 838, 840, 842, 844,
103
- 846, 848, 850, 852, 854, 858, 860, 862,
104
- 864, 866, 868, 870, 872, 874, 876, 878,
105
- 880, 882, 884, 886, 888, 890, 892, 894,
106
- 896, 898, 900, 902, 903, 904, 905, 906,
107
- 907, 908, 909, 910, 911, 912
108
- ]
109
-
110
- class << self
111
- attr_accessor :_lexer_trans_keys
112
- private :_lexer_trans_keys, :_lexer_trans_keys=
113
- end
114
- self._lexer_trans_keys = [
115
- -40, -39, -17, 10, 32, 34, 35, 37,
116
- 42, 64, 124, 9, 13, -89, -88, -85,
117
- -82, -77, -71, -40, -39, -80, -40, -89,
118
- -39, -117, 32, 10, 13, 10, 13, -40,
119
- -39, 10, 32, 34, 35, 37, 42, 64,
120
- 124, 9, 13, -124, -123, -120, -39, -125,
121
- -39, -122, -40, -86, -39, -119, 34, 34,
122
- 10, 13, 10, 13, 10, 32, 34, 9,
123
- 13, 10, 32, 34, 9, 13, 10, 32,
124
- 34, 9, 13, 10, 32, 34, 9, 13,
125
- 10, 32, 9, 13, 10, 32, 9, 13,
126
- 10, 13, 10, 95, 70, 69, 65, 84,
127
- 85, 82, 69, 95, 69, 78, 68, 95,
128
- 37, 13, 32, 64, 9, 10, 9, 10,
129
- 13, 32, 64, 11, 12, 10, 32, 64,
130
- 9, 13, 32, 124, 9, 13, 10, 32,
131
- 92, 124, 9, 13, 10, 92, 124, 10,
132
- 92, 10, 32, 92, 124, 9, 13, -40,
133
- -39, 10, 32, 34, 35, 37, 42, 64,
134
- 124, 9, 13, -124, -123, -40, -82, -39,
135
- -124, -39, -127, -39, -118, -40, -87, 58,
136
- 10, 10, -40, -39, 10, 32, 35, 37,
137
- 42, 64, 9, 13, -89, -88, -85, -82,
138
- -77, -71, 10, -40, 10, -80, 10, -40,
139
- 10, -89, 10, -39, 10, -117, 10, 10,
140
- 32, -40, -39, 10, 32, 34, 35, 37,
141
- 42, 64, 124, 9, 13, -39, 10, -127,
142
- 10, -40, 10, -79, 10, -40, 10, -74,
143
- 10, -39, 10, -123, 10, -40, 10, -89,
144
- 10, -40, 10, -75, 10, -39, 10, -118,
145
- 10, -40, 10, -87, 10, 10, 58, -39,
146
- 10, -118, 10, -39, 10, -122, 10, -40,
147
- 10, -89, 10, -40, 10, -79, 10, -39,
148
- 10, -118, 10, -39, 10, -120, 10, 10,
149
- 32, 58, -39, 10, -123, 10, -40, 10,
150
- -82, 10, -40, 10, -73, 10, -40, 10,
151
- -73, 10, -39, 10, -122, 10, -40, 10,
152
- -81, 10, -39, 10, -123, 10, -40, 10,
153
- -89, 10, -124, -123, -120, 10, -39, 10,
154
- -125, 10, -39, 10, -122, 10, -40, 10,
155
- -86, 10, -39, 10, -119, 10, 10, 95,
156
- 10, 70, 10, 69, 10, 65, 10, 84,
157
- 10, 85, 10, 82, 10, 69, 10, 95,
158
- 10, 69, 10, 78, 10, 68, 10, 95,
159
- 10, 37, -40, -85, -39, -124, -40, -87,
160
- 58, 10, 10, -40, 10, 32, 35, 124,
161
- 9, 13, -82, 10, -40, 10, -89, 10,
162
- -40, 10, -75, 10, -39, 10, -118, 10,
163
- -40, 10, -87, 10, 10, 58, -39, -127,
164
- -40, -79, -40, -74, -39, -123, -40, -89,
165
- -40, -75, -39, -118, -40, -87, 58, 10,
166
- 10, -40, 10, 32, 35, 37, 64, 9,
167
- 13, -89, -82, -77, 10, -39, 10, -124,
168
- -123, 10, -40, 10, -82, 10, -39, 10,
169
- -124, 10, -39, 10, -127, 10, -39, 10,
170
- -118, 10, -40, 10, -87, 10, 10, 58,
171
- -40, 10, -85, 10, -39, 10, -124, 10,
172
- -40, 10, -89, 10, -40, 10, -75, 10,
173
- -39, 10, -118, 10, -39, 10, -122, 10,
174
- -40, 10, -89, 10, -40, 10, -79, 10,
175
- -39, 10, -118, 10, -39, 10, -120, 10,
176
- 10, 32, 58, -39, 10, -123, 10, -40,
177
- 10, -82, 10, -40, 10, -73, 10, -40,
178
- 10, -73, 10, 10, 95, 10, 70, 10,
179
- 69, 10, 65, 10, 84, 10, 85, 10,
180
- 82, 10, 69, 10, 95, 10, 69, 10,
181
- 78, 10, 68, 10, 95, 10, 37, -39,
182
- -118, -39, -122, -40, -89, -40, -79, -39,
183
- -118, -39, -120, 32, 58, -39, -123, -40,
184
- -82, -40, -73, -40, -73, 58, 10, 10,
185
- -40, -39, 10, 32, 35, 37, 42, 64,
186
- 9, 13, -89, -88, -85, -82, -77, -71,
187
- 10, -40, 10, -80, 10, -40, 10, -89,
188
- 10, -39, 10, -117, 10, 10, 32, -39,
189
- 10, -127, 10, -40, 10, -79, 10, -40,
190
- 10, -74, 10, -39, 10, -123, 10, -40,
191
- 10, -89, 10, -40, 10, -75, 10, -39,
192
- 10, -118, 10, -40, 10, -87, 10, 10,
193
- 58, -39, 10, -118, 10, -39, 10, -122,
194
- 10, -40, 10, -89, 10, -40, 10, -79,
195
- 10, -39, 10, -118, 10, -39, 10, -120,
196
- 10, -39, 10, -122, 10, -40, 10, -81,
197
- 10, -39, 10, -123, 10, -40, 10, -89,
198
- 10, -124, -123, -120, 10, -39, 10, -125,
199
- 10, -39, 10, -122, 10, -40, 10, -86,
200
- 10, -39, 10, -119, 10, 10, 95, 10,
201
- 70, 10, 69, 10, 65, 10, 84, 10,
202
- 85, 10, 82, 10, 69, 10, 95, 10,
203
- 69, 10, 78, 10, 68, 10, 95, 10,
204
- 37, 10, 10, -40, -39, 10, 32, 35,
205
- 37, 42, 64, 9, 13, -89, -88, -85,
206
- -82, -77, -71, 10, -40, -39, 10, -80,
207
- 10, -40, 10, -89, 10, -39, 10, -117,
208
- 10, 10, 32, -124, 10, -40, 10, -82,
209
- 10, -39, 10, -124, 10, -39, 10, -127,
210
- 10, -39, 10, -118, 10, -40, 10, -87,
211
- 10, 10, 58, -39, 10, -127, 10, -40,
212
- 10, -79, 10, -40, 10, -74, 10, -39,
213
- 10, -123, 10, -40, 10, -89, 10, -40,
214
- 10, -75, 10, -39, 10, -118, 10, -39,
215
- 10, -122, 10, -40, 10, -89, 10, -40,
216
- 10, -79, 10, -39, 10, -118, 10, -39,
217
- 10, -120, 10, 10, 32, 58, -39, 10,
218
- -123, 10, -40, 10, -82, 10, -40, 10,
219
- -73, 10, -40, 10, -73, 10, -39, 10,
220
- -122, 10, -40, 10, -81, 10, -39, 10,
221
- -123, 10, -40, 10, -89, 10, -124, -123,
222
- -120, 10, -39, 10, -125, 10, -39, 10,
223
- -122, 10, -40, 10, -86, 10, -39, 10,
224
- -119, 10, 10, 95, 10, 70, 10, 69,
225
- 10, 65, 10, 84, 10, 85, 10, 82,
226
- 10, 69, 10, 95, 10, 69, 10, 78,
227
- 10, 68, 10, 95, 10, 37, -39, -122,
228
- -40, -81, -39, -123, -40, -89, -69, -65,
229
- 0
230
- ]
231
-
232
- class << self
233
- attr_accessor :_lexer_single_lengths
234
- private :_lexer_single_lengths, :_lexer_single_lengths=
235
- end
236
- self._lexer_single_lengths = [
237
- 0, 11, 6, 2, 1, 1, 1, 1,
238
- 1, 1, 2, 2, 10, 3, 1, 1,
239
- 1, 1, 1, 1, 1, 1, 1, 1,
240
- 2, 2, 3, 3, 3, 3, 2, 2,
241
- 2, 1, 1, 1, 1, 1, 1, 1,
242
- 1, 1, 1, 1, 1, 1, 1, 1,
243
- 3, 5, 3, 2, 4, 3, 2, 4,
244
- 10, 2, 1, 1, 1, 1, 1, 1,
245
- 1, 1, 1, 1, 1, 1, 1, 8,
246
- 7, 2, 2, 2, 2, 2, 2, 2,
247
- 10, 2, 2, 2, 2, 2, 2, 2,
248
- 2, 2, 2, 2, 2, 2, 2, 2,
249
- 2, 2, 2, 2, 2, 2, 2, 2,
250
- 2, 2, 2, 2, 2, 2, 3, 2,
251
- 2, 2, 2, 2, 2, 2, 2, 2,
252
- 2, 2, 2, 2, 2, 2, 2, 4,
253
- 2, 2, 2, 2, 2, 2, 2, 2,
254
- 2, 2, 2, 2, 2, 2, 2, 2,
255
- 2, 2, 2, 2, 2, 2, 1, 1,
256
- 1, 1, 1, 1, 1, 1, 1, 5,
257
- 2, 2, 2, 2, 2, 2, 2, 2,
258
- 2, 2, 1, 1, 1, 1, 1, 1,
259
- 1, 1, 1, 1, 1, 1, 1, 1,
260
- 1, 1, 1, 1, 1, 6, 4, 2,
261
- 3, 2, 2, 2, 2, 2, 2, 2,
262
- 2, 2, 2, 2, 2, 2, 2, 2,
263
- 2, 2, 2, 2, 2, 2, 2, 2,
264
- 2, 2, 2, 2, 2, 2, 2, 2,
265
- 3, 2, 2, 2, 2, 2, 2, 2,
266
- 2, 2, 2, 2, 2, 2, 2, 2,
267
- 2, 2, 2, 2, 2, 2, 2, 1,
268
- 1, 1, 1, 1, 1, 1, 1, 1,
269
- 1, 1, 1, 2, 1, 1, 1, 1,
270
- 1, 1, 1, 1, 1, 1, 1, 8,
271
- 7, 2, 2, 2, 2, 2, 2, 2,
272
- 2, 2, 2, 2, 2, 2, 2, 2,
273
- 2, 2, 2, 2, 2, 2, 2, 2,
274
- 2, 2, 2, 2, 2, 2, 2, 2,
275
- 2, 2, 2, 2, 2, 2, 2, 2,
276
- 2, 2, 2, 2, 2, 4, 2, 2,
277
- 2, 2, 2, 2, 2, 2, 2, 2,
278
- 2, 2, 2, 2, 2, 2, 2, 2,
279
- 2, 2, 2, 2, 1, 1, 8, 7,
280
- 3, 2, 2, 2, 2, 2, 2, 2,
281
- 2, 2, 2, 2, 2, 2, 2, 2,
282
- 2, 2, 2, 2, 2, 2, 2, 2,
283
- 2, 2, 2, 2, 2, 2, 2, 2,
284
- 2, 2, 2, 2, 2, 2, 2, 2,
285
- 2, 2, 2, 3, 2, 2, 2, 2,
286
- 2, 2, 2, 2, 2, 2, 2, 2,
287
- 2, 2, 2, 2, 4, 2, 2, 2,
288
- 2, 2, 2, 2, 2, 2, 2, 2,
289
- 2, 2, 2, 2, 2, 2, 2, 2,
290
- 2, 2, 2, 1, 1, 1, 1, 1,
291
- 1, 1, 1, 1, 1, 0
292
- ]
293
-
294
- class << self
295
- attr_accessor :_lexer_range_lengths
296
- private :_lexer_range_lengths, :_lexer_range_lengths=
297
- end
298
- self._lexer_range_lengths = [
299
- 0, 1, 0, 0, 0, 0, 0, 0,
300
- 0, 0, 0, 0, 1, 0, 0, 0,
301
- 0, 0, 0, 0, 0, 0, 0, 0,
302
- 0, 0, 1, 1, 1, 1, 1, 1,
303
- 0, 0, 0, 0, 0, 0, 0, 0,
304
- 0, 0, 0, 0, 0, 0, 0, 0,
305
- 1, 1, 1, 1, 1, 0, 0, 1,
306
- 1, 0, 0, 0, 0, 0, 0, 0,
307
- 0, 0, 0, 0, 0, 0, 0, 1,
308
- 0, 0, 0, 0, 0, 0, 0, 0,
309
- 1, 0, 0, 0, 0, 0, 0, 0,
310
- 0, 0, 0, 0, 0, 0, 0, 0,
311
- 0, 0, 0, 0, 0, 0, 0, 0,
312
- 0, 0, 0, 0, 0, 0, 0, 0,
313
- 0, 0, 0, 0, 0, 0, 0, 0,
314
- 0, 0, 0, 0, 0, 0, 0, 0,
315
- 0, 0, 0, 0, 0, 0, 0, 0,
316
- 0, 0, 0, 0, 0, 0, 0, 0,
317
- 0, 0, 0, 0, 0, 0, 0, 0,
318
- 0, 0, 0, 0, 0, 0, 0, 1,
319
- 0, 0, 0, 0, 0, 0, 0, 0,
320
- 0, 0, 0, 0, 0, 0, 0, 0,
321
- 0, 0, 0, 0, 0, 0, 0, 0,
322
- 0, 0, 0, 0, 0, 1, 0, 0,
323
- 0, 0, 0, 0, 0, 0, 0, 0,
324
- 0, 0, 0, 0, 0, 0, 0, 0,
325
- 0, 0, 0, 0, 0, 0, 0, 0,
326
- 0, 0, 0, 0, 0, 0, 0, 0,
327
- 0, 0, 0, 0, 0, 0, 0, 0,
328
- 0, 0, 0, 0, 0, 0, 0, 0,
329
- 0, 0, 0, 0, 0, 0, 0, 0,
330
- 0, 0, 0, 0, 0, 0, 0, 0,
331
- 0, 0, 0, 0, 0, 0, 0, 0,
332
- 0, 0, 0, 0, 0, 0, 0, 1,
333
- 0, 0, 0, 0, 0, 0, 0, 0,
334
- 0, 0, 0, 0, 0, 0, 0, 0,
335
- 0, 0, 0, 0, 0, 0, 0, 0,
336
- 0, 0, 0, 0, 0, 0, 0, 0,
337
- 0, 0, 0, 0, 0, 0, 0, 0,
338
- 0, 0, 0, 0, 0, 0, 0, 0,
339
- 0, 0, 0, 0, 0, 0, 0, 0,
340
- 0, 0, 0, 0, 0, 0, 0, 0,
341
- 0, 0, 0, 0, 0, 0, 1, 0,
342
- 0, 0, 0, 0, 0, 0, 0, 0,
343
- 0, 0, 0, 0, 0, 0, 0, 0,
344
- 0, 0, 0, 0, 0, 0, 0, 0,
345
- 0, 0, 0, 0, 0, 0, 0, 0,
346
- 0, 0, 0, 0, 0, 0, 0, 0,
347
- 0, 0, 0, 0, 0, 0, 0, 0,
348
- 0, 0, 0, 0, 0, 0, 0, 0,
349
- 0, 0, 0, 0, 0, 0, 0, 0,
350
- 0, 0, 0, 0, 0, 0, 0, 0,
351
- 0, 0, 0, 0, 0, 0, 0, 0,
352
- 0, 0, 0, 0, 0, 0, 0, 0,
353
- 0, 0, 0, 0, 0, 0
354
- ]
355
-
356
- class << self
357
- attr_accessor :_lexer_index_offsets
358
- private :_lexer_index_offsets, :_lexer_index_offsets=
359
- end
360
- self._lexer_index_offsets = [
361
- 0, 0, 13, 20, 23, 25, 27, 29,
362
- 31, 33, 35, 38, 41, 53, 57, 59,
363
- 61, 63, 65, 67, 69, 71, 73, 75,
364
- 77, 80, 83, 88, 93, 98, 103, 107,
365
- 111, 114, 116, 118, 120, 122, 124, 126,
366
- 128, 130, 132, 134, 136, 138, 140, 142,
367
- 144, 149, 156, 161, 165, 171, 175, 178,
368
- 184, 196, 199, 201, 203, 205, 207, 209,
369
- 211, 213, 215, 217, 219, 221, 223, 225,
370
- 235, 243, 246, 249, 252, 255, 258, 261,
371
- 264, 276, 279, 282, 285, 288, 291, 294,
372
- 297, 300, 303, 306, 309, 312, 315, 318,
373
- 321, 324, 327, 330, 333, 336, 339, 342,
374
- 345, 348, 351, 354, 357, 360, 363, 367,
375
- 370, 373, 376, 379, 382, 385, 388, 391,
376
- 394, 397, 400, 403, 406, 409, 412, 415,
377
- 420, 423, 426, 429, 432, 435, 438, 441,
378
- 444, 447, 450, 453, 456, 459, 462, 465,
379
- 468, 471, 474, 477, 480, 483, 486, 488,
380
- 490, 492, 494, 496, 498, 500, 502, 504,
381
- 511, 514, 517, 520, 523, 526, 529, 532,
382
- 535, 538, 541, 543, 545, 547, 549, 551,
383
- 553, 555, 557, 559, 561, 563, 565, 567,
384
- 569, 571, 573, 575, 577, 579, 587, 592,
385
- 595, 599, 602, 605, 608, 611, 614, 617,
386
- 620, 623, 626, 629, 632, 635, 638, 641,
387
- 644, 647, 650, 653, 656, 659, 662, 665,
388
- 668, 671, 674, 677, 680, 683, 686, 689,
389
- 692, 696, 699, 702, 705, 708, 711, 714,
390
- 717, 720, 723, 726, 729, 732, 735, 738,
391
- 741, 744, 747, 750, 753, 756, 759, 762,
392
- 764, 766, 768, 770, 772, 774, 776, 778,
393
- 780, 782, 784, 786, 789, 791, 793, 795,
394
- 797, 799, 801, 803, 805, 807, 809, 811,
395
- 821, 829, 832, 835, 838, 841, 844, 847,
396
- 850, 853, 856, 859, 862, 865, 868, 871,
397
- 874, 877, 880, 883, 886, 889, 892, 895,
398
- 898, 901, 904, 907, 910, 913, 916, 919,
399
- 922, 925, 928, 931, 934, 937, 940, 943,
400
- 946, 949, 952, 955, 958, 961, 966, 969,
401
- 972, 975, 978, 981, 984, 987, 990, 993,
402
- 996, 999, 1002, 1005, 1008, 1011, 1014, 1017,
403
- 1020, 1023, 1026, 1029, 1032, 1034, 1036, 1046,
404
- 1054, 1058, 1061, 1064, 1067, 1070, 1073, 1076,
405
- 1079, 1082, 1085, 1088, 1091, 1094, 1097, 1100,
406
- 1103, 1106, 1109, 1112, 1115, 1118, 1121, 1124,
407
- 1127, 1130, 1133, 1136, 1139, 1142, 1145, 1148,
408
- 1151, 1154, 1157, 1160, 1163, 1166, 1169, 1172,
409
- 1175, 1178, 1181, 1184, 1188, 1191, 1194, 1197,
410
- 1200, 1203, 1206, 1209, 1212, 1215, 1218, 1221,
411
- 1224, 1227, 1230, 1233, 1236, 1241, 1244, 1247,
412
- 1250, 1253, 1256, 1259, 1262, 1265, 1268, 1271,
413
- 1274, 1277, 1280, 1283, 1286, 1289, 1292, 1295,
414
- 1298, 1301, 1304, 1307, 1309, 1311, 1313, 1315,
415
- 1317, 1319, 1321, 1323, 1325, 1327
416
- ]
417
-
418
- class << self
419
- attr_accessor :_lexer_indicies
420
- private :_lexer_indicies, :_lexer_indicies=
421
- end
422
- self._lexer_indicies = [
423
- 1, 2, 3, 5, 4, 6, 7, 8,
424
- 9, 10, 11, 4, 0, 12, 13, 14,
425
- 15, 16, 17, 0, 18, 19, 0, 20,
426
- 0, 21, 0, 22, 0, 23, 0, 24,
427
- 0, 25, 0, 27, 28, 26, 30, 31,
428
- 29, 1, 2, 5, 4, 6, 7, 8,
429
- 9, 10, 11, 4, 0, 32, 33, 24,
430
- 0, 34, 0, 35, 0, 36, 0, 24,
431
- 0, 37, 0, 38, 0, 39, 0, 24,
432
- 0, 40, 0, 41, 0, 43, 44, 42,
433
- 46, 47, 45, 50, 49, 51, 49, 48,
434
- 54, 53, 55, 53, 52, 54, 53, 56,
435
- 53, 52, 54, 53, 57, 53, 52, 59,
436
- 58, 58, 0, 5, 60, 60, 0, 62,
437
- 63, 61, 5, 0, 64, 0, 65, 0,
438
- 66, 0, 67, 0, 68, 0, 69, 0,
439
- 70, 0, 71, 0, 72, 0, 73, 0,
440
- 74, 0, 75, 0, 76, 0, 77, 0,
441
- 0, 0, 0, 0, 78, 79, 80, 79,
442
- 79, 82, 81, 78, 5, 83, 10, 83,
443
- 0, 84, 85, 84, 0, 88, 87, 89,
444
- 90, 87, 86, 0, 92, 93, 91, 0,
445
- 92, 91, 88, 94, 92, 93, 94, 91,
446
- 95, 96, 88, 97, 98, 99, 100, 101,
447
- 102, 103, 97, 0, 104, 105, 0, 106,
448
- 0, 107, 0, 108, 0, 109, 0, 110,
449
- 0, 111, 0, 112, 0, 113, 0, 114,
450
- 0, 115, 0, 116, 0, 118, 117, 120,
451
- 119, 121, 122, 120, 123, 124, 125, 126,
452
- 124, 123, 119, 127, 128, 129, 130, 131,
453
- 132, 120, 119, 133, 120, 119, 134, 120,
454
- 119, 135, 120, 119, 136, 120, 119, 137,
455
- 120, 119, 138, 120, 119, 120, 139, 119,
456
- 140, 141, 143, 142, 144, 145, 146, 147,
457
- 148, 149, 142, 0, 150, 120, 119, 151,
458
- 120, 119, 152, 120, 119, 153, 120, 119,
459
- 154, 120, 119, 138, 120, 119, 155, 120,
460
- 119, 138, 120, 119, 156, 120, 119, 157,
461
- 120, 119, 158, 120, 119, 159, 120, 119,
462
- 160, 120, 119, 161, 120, 119, 162, 120,
463
- 119, 163, 120, 119, 120, 139, 119, 164,
464
- 120, 119, 165, 120, 119, 166, 120, 119,
465
- 167, 120, 119, 168, 120, 119, 169, 120,
466
- 119, 170, 120, 119, 171, 120, 119, 172,
467
- 120, 119, 173, 120, 119, 174, 120, 119,
468
- 175, 120, 119, 120, 176, 139, 119, 177,
469
- 120, 119, 178, 120, 119, 179, 120, 119,
470
- 180, 120, 119, 181, 120, 119, 182, 120,
471
- 119, 183, 120, 119, 163, 120, 119, 184,
472
- 120, 119, 185, 120, 119, 186, 120, 119,
473
- 187, 120, 119, 188, 120, 119, 189, 120,
474
- 119, 190, 120, 119, 138, 120, 119, 191,
475
- 192, 138, 120, 119, 193, 120, 119, 194,
476
- 120, 119, 195, 120, 119, 138, 120, 119,
477
- 196, 120, 119, 197, 120, 119, 198, 120,
478
- 119, 138, 120, 119, 120, 199, 119, 120,
479
- 200, 119, 120, 201, 119, 120, 202, 119,
480
- 120, 203, 119, 120, 204, 119, 120, 205,
481
- 119, 120, 206, 119, 120, 207, 119, 120,
482
- 208, 119, 120, 209, 119, 120, 210, 119,
483
- 120, 211, 119, 120, 212, 119, 213, 0,
484
- 214, 0, 215, 0, 216, 0, 217, 0,
485
- 218, 0, 219, 0, 221, 220, 223, 222,
486
- 224, 223, 225, 226, 226, 225, 222, 227,
487
- 223, 222, 228, 223, 222, 229, 223, 222,
488
- 230, 223, 222, 231, 223, 222, 232, 223,
489
- 222, 233, 223, 222, 234, 223, 222, 235,
490
- 223, 222, 223, 236, 222, 237, 0, 238,
491
- 0, 239, 0, 240, 0, 241, 0, 24,
492
- 0, 242, 0, 24, 0, 243, 0, 244,
493
- 0, 245, 0, 246, 0, 247, 0, 248,
494
- 0, 249, 0, 250, 0, 251, 0, 253,
495
- 252, 255, 254, 256, 255, 257, 258, 259,
496
- 258, 257, 254, 260, 261, 262, 255, 254,
497
- 263, 255, 254, 264, 265, 255, 254, 266,
498
- 255, 254, 267, 255, 254, 268, 255, 254,
499
- 269, 255, 254, 270, 255, 254, 271, 255,
500
- 254, 272, 255, 254, 273, 255, 254, 274,
501
- 255, 254, 275, 255, 254, 255, 276, 254,
502
- 277, 255, 254, 278, 255, 254, 279, 255,
503
- 254, 273, 255, 254, 280, 255, 254, 281,
504
- 255, 254, 282, 255, 254, 271, 255, 254,
505
- 283, 255, 254, 284, 255, 254, 285, 255,
506
- 254, 286, 255, 254, 287, 255, 254, 288,
507
- 255, 254, 289, 255, 254, 290, 255, 254,
508
- 291, 255, 254, 292, 255, 254, 293, 255,
509
- 254, 294, 255, 254, 255, 295, 276, 254,
510
- 296, 255, 254, 297, 255, 254, 298, 255,
511
- 254, 299, 255, 254, 300, 255, 254, 301,
512
- 255, 254, 302, 255, 254, 275, 255, 254,
513
- 255, 303, 254, 255, 304, 254, 255, 305,
514
- 254, 255, 306, 254, 255, 307, 254, 255,
515
- 308, 254, 255, 309, 254, 255, 310, 254,
516
- 255, 311, 254, 255, 312, 254, 255, 313,
517
- 254, 255, 314, 254, 255, 315, 254, 255,
518
- 316, 254, 317, 0, 318, 0, 319, 0,
519
- 320, 0, 321, 0, 322, 0, 323, 0,
520
- 324, 0, 325, 0, 326, 0, 327, 0,
521
- 328, 0, 329, 330, 0, 331, 0, 332,
522
- 0, 333, 0, 334, 0, 335, 0, 336,
523
- 0, 337, 0, 338, 0, 339, 0, 341,
524
- 340, 343, 342, 344, 345, 343, 346, 347,
525
- 348, 349, 347, 346, 342, 350, 351, 352,
526
- 353, 354, 355, 343, 342, 356, 343, 342,
527
- 357, 343, 342, 358, 343, 342, 359, 343,
528
- 342, 360, 343, 342, 361, 343, 342, 343,
529
- 362, 342, 363, 343, 342, 364, 343, 342,
530
- 365, 343, 342, 366, 343, 342, 367, 343,
531
- 342, 361, 343, 342, 368, 343, 342, 361,
532
- 343, 342, 369, 343, 342, 370, 343, 342,
533
- 371, 343, 342, 372, 343, 342, 373, 343,
534
- 342, 374, 343, 342, 375, 343, 342, 376,
535
- 343, 342, 343, 362, 342, 377, 343, 342,
536
- 378, 343, 342, 379, 343, 342, 380, 343,
537
- 342, 381, 343, 342, 382, 343, 342, 383,
538
- 343, 342, 384, 343, 342, 385, 343, 342,
539
- 386, 343, 342, 387, 343, 342, 376, 343,
540
- 342, 388, 343, 342, 389, 343, 342, 390,
541
- 343, 342, 391, 343, 342, 392, 343, 342,
542
- 393, 343, 342, 394, 343, 342, 361, 343,
543
- 342, 395, 396, 361, 343, 342, 397, 343,
544
- 342, 398, 343, 342, 399, 343, 342, 361,
545
- 343, 342, 400, 343, 342, 401, 343, 342,
546
- 402, 343, 342, 361, 343, 342, 343, 403,
547
- 342, 343, 404, 342, 343, 405, 342, 343,
548
- 406, 342, 343, 407, 342, 343, 408, 342,
549
- 343, 409, 342, 343, 410, 342, 343, 411,
550
- 342, 343, 412, 342, 343, 413, 342, 343,
551
- 414, 342, 343, 415, 342, 343, 416, 342,
552
- 418, 417, 420, 419, 421, 422, 420, 423,
553
- 424, 425, 426, 424, 423, 419, 427, 428,
554
- 429, 430, 431, 432, 420, 419, 433, 434,
555
- 420, 419, 435, 420, 419, 436, 420, 419,
556
- 437, 420, 419, 438, 420, 419, 439, 420,
557
- 419, 420, 440, 419, 441, 420, 419, 442,
558
- 420, 419, 443, 420, 419, 444, 420, 419,
559
- 445, 420, 419, 446, 420, 419, 447, 420,
560
- 419, 448, 420, 419, 449, 420, 419, 450,
561
- 420, 419, 451, 420, 419, 420, 440, 419,
562
- 452, 420, 419, 453, 420, 419, 454, 420,
563
- 419, 455, 420, 419, 456, 420, 419, 439,
564
- 420, 419, 457, 420, 419, 439, 420, 419,
565
- 458, 420, 419, 459, 420, 419, 460, 420,
566
- 419, 447, 420, 419, 461, 420, 419, 462,
567
- 420, 419, 463, 420, 419, 464, 420, 419,
568
- 465, 420, 419, 466, 420, 419, 467, 420,
569
- 419, 468, 420, 419, 469, 420, 419, 470,
570
- 420, 419, 471, 420, 419, 472, 420, 419,
571
- 420, 473, 440, 419, 474, 420, 419, 475,
572
- 420, 419, 476, 420, 419, 477, 420, 419,
573
- 478, 420, 419, 479, 420, 419, 480, 420,
574
- 419, 451, 420, 419, 481, 420, 419, 482,
575
- 420, 419, 483, 420, 419, 484, 420, 419,
576
- 485, 420, 419, 486, 420, 419, 487, 420,
577
- 419, 439, 420, 419, 488, 489, 439, 420,
578
- 419, 490, 420, 419, 491, 420, 419, 492,
579
- 420, 419, 439, 420, 419, 493, 420, 419,
580
- 494, 420, 419, 495, 420, 419, 439, 420,
581
- 419, 420, 496, 419, 420, 497, 419, 420,
582
- 498, 419, 420, 499, 419, 420, 500, 419,
583
- 420, 501, 419, 420, 502, 419, 420, 503,
584
- 419, 420, 504, 419, 420, 505, 419, 420,
585
- 506, 419, 420, 507, 419, 420, 508, 419,
586
- 420, 509, 419, 510, 0, 511, 0, 512,
587
- 0, 513, 0, 514, 0, 515, 0, 516,
588
- 0, 24, 0, 517, 0, 4, 0, 518,
589
- 0
590
- ]
591
-
592
- class << self
593
- attr_accessor :_lexer_trans_targs
594
- private :_lexer_trans_targs, :_lexer_trans_targs=
595
- end
596
- self._lexer_trans_targs = [
597
- 0, 2, 13, 435, 12, 12, 22, 32,
598
- 34, 9, 48, 51, 3, 170, 176, 178,
599
- 247, 427, 4, 57, 5, 6, 7, 8,
600
- 9, 10, 11, 12, 33, 11, 12, 33,
601
- 14, 18, 15, 16, 17, 19, 20, 21,
602
- 23, 24, 25, 26, 25, 25, 26, 25,
603
- 27, 27, 27, 28, 27, 27, 27, 28,
604
- 29, 30, 31, 12, 31, 32, 12, 33,
605
- 35, 36, 37, 38, 39, 40, 41, 42,
606
- 43, 44, 45, 46, 47, 437, 49, 50,
607
- 12, 49, 48, 50, 51, 52, 53, 55,
608
- 56, 54, 52, 53, 54, 52, 55, 2,
609
- 13, 56, 22, 32, 34, 9, 48, 51,
610
- 58, 150, 59, 60, 61, 62, 63, 64,
611
- 65, 66, 67, 68, 69, 70, 71, 70,
612
- 71, 72, 127, 71, 12, 136, 79, 73,
613
- 81, 87, 89, 98, 119, 74, 75, 76,
614
- 77, 78, 79, 80, 2, 13, 12, 12,
615
- 22, 32, 34, 9, 48, 51, 82, 83,
616
- 84, 85, 86, 88, 90, 91, 92, 93,
617
- 94, 95, 96, 97, 99, 100, 101, 102,
618
- 103, 104, 105, 106, 107, 108, 109, 110,
619
- 111, 112, 113, 114, 115, 116, 117, 118,
620
- 120, 121, 122, 123, 124, 125, 126, 128,
621
- 132, 129, 130, 131, 133, 134, 135, 137,
622
- 138, 139, 140, 141, 142, 143, 144, 145,
623
- 146, 147, 148, 149, 12, 151, 152, 153,
624
- 154, 155, 156, 157, 158, 159, 158, 159,
625
- 160, 159, 12, 161, 162, 163, 164, 165,
626
- 166, 167, 168, 169, 80, 171, 172, 173,
627
- 174, 175, 177, 179, 180, 181, 182, 183,
628
- 184, 185, 186, 187, 188, 189, 188, 189,
629
- 190, 189, 12, 233, 191, 208, 212, 192,
630
- 193, 204, 194, 195, 196, 197, 198, 199,
631
- 200, 201, 202, 203, 80, 205, 206, 207,
632
- 209, 210, 211, 213, 214, 215, 216, 217,
633
- 218, 219, 220, 221, 222, 223, 224, 225,
634
- 226, 227, 228, 229, 230, 231, 232, 234,
635
- 235, 236, 237, 238, 239, 240, 241, 242,
636
- 243, 244, 245, 246, 12, 248, 249, 250,
637
- 251, 252, 253, 254, 255, 256, 257, 258,
638
- 259, 260, 340, 261, 262, 263, 264, 265,
639
- 266, 267, 268, 269, 270, 271, 270, 271,
640
- 272, 317, 271, 12, 326, 279, 273, 280,
641
- 286, 288, 297, 309, 274, 275, 276, 277,
642
- 278, 279, 80, 281, 282, 283, 284, 285,
643
- 287, 289, 290, 291, 292, 293, 294, 295,
644
- 296, 298, 299, 300, 301, 302, 303, 304,
645
- 305, 306, 307, 308, 310, 311, 312, 313,
646
- 314, 315, 316, 318, 322, 319, 320, 321,
647
- 323, 324, 325, 327, 328, 329, 330, 331,
648
- 332, 333, 334, 335, 336, 337, 338, 339,
649
- 12, 341, 342, 341, 342, 343, 404, 342,
650
- 12, 413, 350, 344, 363, 369, 371, 375,
651
- 396, 345, 351, 346, 347, 348, 349, 350,
652
- 80, 352, 353, 354, 355, 356, 357, 358,
653
- 359, 360, 361, 362, 364, 365, 366, 367,
654
- 368, 370, 372, 373, 374, 376, 377, 378,
655
- 379, 380, 381, 382, 383, 384, 385, 386,
656
- 387, 388, 389, 390, 391, 392, 393, 394,
657
- 395, 397, 398, 399, 400, 401, 402, 403,
658
- 405, 409, 406, 407, 408, 410, 411, 412,
659
- 414, 415, 416, 417, 418, 419, 420, 421,
660
- 422, 423, 424, 425, 426, 12, 428, 429,
661
- 430, 431, 432, 433, 434, 436, 0
662
- ]
663
-
664
- class << self
665
- attr_accessor :_lexer_trans_actions
666
- private :_lexer_trans_actions, :_lexer_trans_actions=
667
- end
668
- self._lexer_trans_actions = [
669
- 43, 29, 29, 0, 0, 54, 3, 1,
670
- 0, 29, 1, 35, 0, 0, 0, 0,
671
- 0, 0, 0, 0, 0, 0, 0, 0,
672
- 0, 0, 57, 149, 126, 0, 110, 23,
673
- 0, 0, 0, 0, 0, 0, 0, 0,
674
- 0, 0, 7, 139, 48, 0, 102, 9,
675
- 5, 45, 134, 45, 0, 33, 122, 33,
676
- 33, 0, 11, 106, 0, 0, 114, 25,
677
- 0, 0, 0, 0, 0, 0, 0, 0,
678
- 0, 0, 0, 0, 0, 0, 0, 27,
679
- 118, 27, 51, 0, 0, 0, 37, 37,
680
- 54, 37, 87, 0, 0, 39, 0, 96,
681
- 96, 0, 93, 90, 41, 96, 90, 99,
682
- 0, 0, 0, 0, 0, 0, 0, 0,
683
- 0, 0, 0, 0, 0, 57, 144, 0,
684
- 54, 84, 84, 0, 72, 33, 84, 0,
685
- 0, 0, 0, 0, 0, 0, 0, 0,
686
- 0, 0, 0, 15, 63, 63, 31, 130,
687
- 60, 57, 31, 63, 57, 66, 0, 0,
688
- 0, 0, 0, 0, 0, 0, 0, 0,
689
- 0, 0, 0, 0, 0, 0, 0, 0,
690
- 0, 0, 0, 0, 0, 0, 0, 0,
691
- 0, 0, 0, 0, 0, 0, 0, 0,
692
- 0, 0, 0, 0, 0, 0, 0, 0,
693
- 0, 0, 0, 0, 0, 0, 0, 0,
694
- 0, 0, 0, 0, 0, 0, 0, 0,
695
- 0, 0, 0, 0, 15, 0, 0, 0,
696
- 0, 0, 0, 0, 57, 144, 0, 54,
697
- 84, 0, 81, 0, 0, 0, 0, 0,
698
- 0, 0, 0, 0, 21, 0, 0, 0,
699
- 0, 0, 0, 0, 0, 0, 0, 0,
700
- 0, 0, 0, 0, 57, 144, 0, 54,
701
- 84, 0, 69, 33, 0, 0, 0, 0,
702
- 0, 0, 0, 0, 0, 0, 0, 0,
703
- 0, 0, 0, 0, 13, 0, 0, 0,
704
- 0, 0, 0, 0, 0, 0, 0, 0,
705
- 0, 0, 0, 0, 0, 0, 0, 0,
706
- 0, 0, 0, 0, 0, 0, 0, 0,
707
- 0, 0, 0, 0, 0, 0, 0, 0,
708
- 0, 0, 0, 0, 13, 0, 0, 0,
709
- 0, 0, 0, 0, 0, 0, 0, 0,
710
- 0, 0, 0, 0, 0, 0, 0, 0,
711
- 0, 0, 0, 0, 57, 144, 0, 54,
712
- 84, 84, 0, 78, 33, 84, 0, 0,
713
- 0, 0, 0, 0, 0, 0, 0, 0,
714
- 0, 0, 19, 0, 0, 0, 0, 0,
715
- 0, 0, 0, 0, 0, 0, 0, 0,
716
- 0, 0, 0, 0, 0, 0, 0, 0,
717
- 0, 0, 0, 0, 0, 0, 0, 0,
718
- 0, 0, 0, 0, 0, 0, 0, 0,
719
- 0, 0, 0, 0, 0, 0, 0, 0,
720
- 0, 0, 0, 0, 0, 0, 0, 0,
721
- 19, 57, 144, 0, 54, 84, 84, 0,
722
- 75, 33, 84, 0, 0, 0, 0, 0,
723
- 0, 0, 0, 0, 0, 0, 0, 0,
724
- 17, 0, 0, 0, 0, 0, 0, 0,
725
- 0, 0, 0, 0, 0, 0, 0, 0,
726
- 0, 0, 0, 0, 0, 0, 0, 0,
727
- 0, 0, 0, 0, 0, 0, 0, 0,
728
- 0, 0, 0, 0, 0, 0, 0, 0,
729
- 0, 0, 0, 0, 0, 0, 0, 0,
730
- 0, 0, 0, 0, 0, 0, 0, 0,
731
- 0, 0, 0, 0, 0, 0, 0, 0,
732
- 0, 0, 0, 0, 0, 17, 0, 0,
733
- 0, 0, 0, 0, 0, 0, 0
734
- ]
735
-
736
- class << self
737
- attr_accessor :_lexer_eof_actions
738
- private :_lexer_eof_actions, :_lexer_eof_actions=
739
- end
740
- self._lexer_eof_actions = [
741
- 0, 43, 43, 43, 43, 43, 43, 43,
742
- 43, 43, 43, 43, 43, 43, 43, 43,
743
- 43, 43, 43, 43, 43, 43, 43, 43,
744
- 43, 43, 43, 43, 43, 43, 43, 43,
745
- 43, 43, 43, 43, 43, 43, 43, 43,
746
- 43, 43, 43, 43, 43, 43, 43, 43,
747
- 43, 43, 43, 43, 43, 43, 43, 43,
748
- 43, 43, 43, 43, 43, 43, 43, 43,
749
- 43, 43, 43, 43, 43, 43, 43, 43,
750
- 43, 43, 43, 43, 43, 43, 43, 43,
751
- 43, 43, 43, 43, 43, 43, 43, 43,
752
- 43, 43, 43, 43, 43, 43, 43, 43,
753
- 43, 43, 43, 43, 43, 43, 43, 43,
754
- 43, 43, 43, 43, 43, 43, 43, 43,
755
- 43, 43, 43, 43, 43, 43, 43, 43,
756
- 43, 43, 43, 43, 43, 43, 43, 43,
757
- 43, 43, 43, 43, 43, 43, 43, 43,
758
- 43, 43, 43, 43, 43, 43, 43, 43,
759
- 43, 43, 43, 43, 43, 43, 43, 43,
760
- 43, 43, 43, 43, 43, 43, 43, 43,
761
- 43, 43, 43, 43, 43, 43, 43, 43,
762
- 43, 43, 43, 43, 43, 43, 43, 43,
763
- 43, 43, 43, 43, 43, 43, 43, 43,
764
- 43, 43, 43, 43, 43, 43, 43, 43,
765
- 43, 43, 43, 43, 43, 43, 43, 43,
766
- 43, 43, 43, 43, 43, 43, 43, 43,
767
- 43, 43, 43, 43, 43, 43, 43, 43,
768
- 43, 43, 43, 43, 43, 43, 43, 43,
769
- 43, 43, 43, 43, 43, 43, 43, 43,
770
- 43, 43, 43, 43, 43, 43, 43, 43,
771
- 43, 43, 43, 43, 43, 43, 43, 43,
772
- 43, 43, 43, 43, 43, 43, 43, 43,
773
- 43, 43, 43, 43, 43, 43, 43, 43,
774
- 43, 43, 43, 43, 43, 43, 43, 43,
775
- 43, 43, 43, 43, 43, 43, 43, 43,
776
- 43, 43, 43, 43, 43, 43, 43, 43,
777
- 43, 43, 43, 43, 43, 43, 43, 43,
778
- 43, 43, 43, 43, 43, 43, 43, 43,
779
- 43, 43, 43, 43, 43, 43, 43, 43,
780
- 43, 43, 43, 43, 43, 43, 43, 43,
781
- 43, 43, 43, 43, 43, 43, 43, 43,
782
- 43, 43, 43, 43, 43, 43, 43, 43,
783
- 43, 43, 43, 43, 43, 43, 43, 43,
784
- 43, 43, 43, 43, 43, 43, 43, 43,
785
- 43, 43, 43, 43, 43, 43, 43, 43,
786
- 43, 43, 43, 43, 43, 43, 43, 43,
787
- 43, 43, 43, 43, 43, 43, 43, 43,
788
- 43, 43, 43, 43, 43, 43, 43, 43,
789
- 43, 43, 43, 43, 43, 43, 43, 43,
790
- 43, 43, 43, 43, 43, 43, 43, 43,
791
- 43, 43, 43, 43, 43, 43, 43, 43,
792
- 43, 43, 43, 43, 43, 43, 43, 43,
793
- 43, 43, 43, 43, 43, 43, 43, 43,
794
- 43, 43, 43, 43, 43, 43, 43, 43,
795
- 43, 43, 43, 43, 43, 43
796
- ]
797
-
798
- class << self
799
- attr_accessor :lexer_start
800
- end
801
- self.lexer_start = 1;
802
- class << self
803
- attr_accessor :lexer_first_final
804
- end
805
- self.lexer_first_final = 437;
806
- class << self
807
- attr_accessor :lexer_error
808
- end
809
- self.lexer_error = 0;
810
-
811
- class << self
812
- attr_accessor :lexer_en_main
813
- end
814
- self.lexer_en_main = 1;
815
-
816
-
817
- # line 133 "ragel/i18n/ar.rb.rl"
818
- end
819
-
820
- def scan(data)
821
- data = (data + "\n%_FEATURE_END_%").unpack("c*") # Explicit EOF simplifies things considerably
822
- eof = pe = data.length
823
-
824
- @line_number = 1
825
- @last_newline = 0
826
-
827
-
828
- # line 829 "lib/gherkin/lexer/ar.rb"
829
- begin
830
- p ||= 0
831
- pe ||= data.length
832
- cs = lexer_start
833
- end
834
-
835
- # line 143 "ragel/i18n/ar.rb.rl"
836
-
837
- # line 838 "lib/gherkin/lexer/ar.rb"
838
- begin
839
- _klen, _trans, _keys, _acts, _nacts = nil
840
- _goto_level = 0
841
- _resume = 10
842
- _eof_trans = 15
843
- _again = 20
844
- _test_eof = 30
845
- _out = 40
846
- while true
847
- _trigger_goto = false
848
- if _goto_level <= 0
849
- if p == pe
850
- _goto_level = _test_eof
851
- next
852
- end
853
- if cs == 0
854
- _goto_level = _out
855
- next
856
- end
857
- end
858
- if _goto_level <= _resume
859
- _keys = _lexer_key_offsets[cs]
860
- _trans = _lexer_index_offsets[cs]
861
- _klen = _lexer_single_lengths[cs]
862
- _break_match = false
863
-
864
- begin
865
- if _klen > 0
866
- _lower = _keys
867
- _upper = _keys + _klen - 1
868
-
869
- loop do
870
- break if _upper < _lower
871
- _mid = _lower + ( (_upper - _lower) >> 1 )
872
-
873
- if data[p].ord < _lexer_trans_keys[_mid]
874
- _upper = _mid - 1
875
- elsif data[p].ord > _lexer_trans_keys[_mid]
876
- _lower = _mid + 1
877
- else
878
- _trans += (_mid - _keys)
879
- _break_match = true
880
- break
881
- end
882
- end # loop
883
- break if _break_match
884
- _keys += _klen
885
- _trans += _klen
886
- end
887
- _klen = _lexer_range_lengths[cs]
888
- if _klen > 0
889
- _lower = _keys
890
- _upper = _keys + (_klen << 1) - 2
891
- loop do
892
- break if _upper < _lower
893
- _mid = _lower + (((_upper-_lower) >> 1) & ~1)
894
- if data[p].ord < _lexer_trans_keys[_mid]
895
- _upper = _mid - 2
896
- elsif data[p].ord > _lexer_trans_keys[_mid+1]
897
- _lower = _mid + 2
898
- else
899
- _trans += ((_mid - _keys) >> 1)
900
- _break_match = true
901
- break
902
- end
903
- end # loop
904
- break if _break_match
905
- _trans += _klen
906
- end
907
- end while false
908
- _trans = _lexer_indicies[_trans]
909
- cs = _lexer_trans_targs[_trans]
910
- if _lexer_trans_actions[_trans] != 0
911
- _acts = _lexer_trans_actions[_trans]
912
- _nacts = _lexer_actions[_acts]
913
- _acts += 1
914
- while _nacts > 0
915
- _nacts -= 1
916
- _acts += 1
917
- case _lexer_actions[_acts - 1]
918
- when 0 then
919
- # line 11 "ragel/i18n/ar.rb.rl"
920
- begin
921
-
922
- @content_start = p
923
- @current_line = @line_number
924
- @start_col = p - @last_newline - "#{@keyword}:".length
925
- end
926
- when 1 then
927
- # line 17 "ragel/i18n/ar.rb.rl"
928
- begin
929
-
930
- @current_line = @line_number
931
- @start_col = p - @last_newline
932
- end
933
- when 2 then
934
- # line 22 "ragel/i18n/ar.rb.rl"
935
- begin
936
-
937
- @content_start = p
938
- end
939
- when 3 then
940
- # line 26 "ragel/i18n/ar.rb.rl"
941
- begin
942
-
943
- @docstring_content_type_start = p
944
- end
945
- when 4 then
946
- # line 29 "ragel/i18n/ar.rb.rl"
947
- begin
948
-
949
- @docstring_content_type_end = p
950
- end
951
- when 5 then
952
- # line 33 "ragel/i18n/ar.rb.rl"
953
- begin
954
-
955
- con = unindent(@start_col, utf8_pack(data[@content_start...@next_keyword_start-1]).sub(/(\r?\n)?([\t ])*\Z/, '').gsub(/\\"\\"\\"/, '"""'))
956
- con_type = utf8_pack(data[@docstring_content_type_start...@docstring_content_type_end]).strip
957
- @listener.doc_string(con_type, con, @current_line)
958
- end
959
- when 6 then
960
- # line 38 "ragel/i18n/ar.rb.rl"
961
- begin
962
-
963
- p = store_keyword_content(:feature, data, p, eof)
964
- end
965
- when 7 then
966
- # line 42 "ragel/i18n/ar.rb.rl"
967
- begin
968
-
969
- p = store_keyword_content(:background, data, p, eof)
970
- end
971
- when 8 then
972
- # line 46 "ragel/i18n/ar.rb.rl"
973
- begin
974
-
975
- p = store_keyword_content(:scenario, data, p, eof)
976
- end
977
- when 9 then
978
- # line 50 "ragel/i18n/ar.rb.rl"
979
- begin
980
-
981
- p = store_keyword_content(:scenario_outline, data, p, eof)
982
- end
983
- when 10 then
984
- # line 54 "ragel/i18n/ar.rb.rl"
985
- begin
986
-
987
- p = store_keyword_content(:examples, data, p, eof)
988
- end
989
- when 11 then
990
- # line 58 "ragel/i18n/ar.rb.rl"
991
- begin
992
-
993
- con = utf8_pack(data[@content_start...p]).strip
994
- @listener.step(@keyword, con, @current_line)
995
- end
996
- when 12 then
997
- # line 63 "ragel/i18n/ar.rb.rl"
998
- begin
999
-
1000
- con = utf8_pack(data[@content_start...p]).strip
1001
- @listener.comment(con, @line_number)
1002
- @keyword_start = nil
1003
- end
1004
- when 13 then
1005
- # line 69 "ragel/i18n/ar.rb.rl"
1006
- begin
1007
-
1008
- con = utf8_pack(data[@content_start...p]).strip
1009
- @listener.tag(con, @current_line)
1010
- @keyword_start = nil
1011
- end
1012
- when 14 then
1013
- # line 75 "ragel/i18n/ar.rb.rl"
1014
- begin
1015
-
1016
- @line_number += 1
1017
- end
1018
- when 15 then
1019
- # line 79 "ragel/i18n/ar.rb.rl"
1020
- begin
1021
-
1022
- @last_newline = p + 1
1023
- end
1024
- when 16 then
1025
- # line 83 "ragel/i18n/ar.rb.rl"
1026
- begin
1027
-
1028
- @keyword_start ||= p
1029
- end
1030
- when 17 then
1031
- # line 87 "ragel/i18n/ar.rb.rl"
1032
- begin
1033
-
1034
- @keyword = utf8_pack(data[@keyword_start...p]).sub(/:$/,'')
1035
- @keyword_start = nil
1036
- end
1037
- when 18 then
1038
- # line 92 "ragel/i18n/ar.rb.rl"
1039
- begin
1040
-
1041
- @next_keyword_start = p
1042
- end
1043
- when 19 then
1044
- # line 96 "ragel/i18n/ar.rb.rl"
1045
- begin
1046
-
1047
- p = p - 1
1048
- current_row = []
1049
- @current_line = @line_number
1050
- end
1051
- when 20 then
1052
- # line 102 "ragel/i18n/ar.rb.rl"
1053
- begin
1054
-
1055
- @content_start = p
1056
- end
1057
- when 21 then
1058
- # line 106 "ragel/i18n/ar.rb.rl"
1059
- begin
1060
-
1061
- con = utf8_pack(data[@content_start...p]).strip
1062
- current_row << con.gsub(/\\\|/, "|").gsub(/\\n/, "\n").gsub(/\\\\/, "\\")
1063
- end
1064
- when 22 then
1065
- # line 111 "ragel/i18n/ar.rb.rl"
1066
- begin
1067
-
1068
- @listener.row(current_row, @current_line)
1069
- end
1070
- when 23 then
1071
- # line 115 "ragel/i18n/ar.rb.rl"
1072
- begin
1073
-
1074
- if cs < lexer_first_final
1075
- content = current_line_content(data, p)
1076
- raise Gherkin::Lexer::LexingError.new("Lexing error on line %d: '%s'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information." % [@line_number, content])
1077
- else
1078
- @listener.eof
1079
- end
1080
- end
1081
- # line 1082 "lib/gherkin/lexer/ar.rb"
1082
- end # action switch
1083
- end
1084
- end
1085
- if _trigger_goto
1086
- next
1087
- end
1088
- end
1089
- if _goto_level <= _again
1090
- if cs == 0
1091
- _goto_level = _out
1092
- next
1093
- end
1094
- p += 1
1095
- if p != pe
1096
- _goto_level = _resume
1097
- next
1098
- end
1099
- end
1100
- if _goto_level <= _test_eof
1101
- if p == eof
1102
- __acts = _lexer_eof_actions[cs]
1103
- __nacts = _lexer_actions[__acts]
1104
- __acts += 1
1105
- while __nacts > 0
1106
- __nacts -= 1
1107
- __acts += 1
1108
- case _lexer_actions[__acts - 1]
1109
- when 23 then
1110
- # line 115 "ragel/i18n/ar.rb.rl"
1111
- begin
1112
-
1113
- if cs < lexer_first_final
1114
- content = current_line_content(data, p)
1115
- raise Gherkin::Lexer::LexingError.new("Lexing error on line %d: '%s'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information." % [@line_number, content])
1116
- else
1117
- @listener.eof
1118
- end
1119
- end
1120
- # line 1121 "lib/gherkin/lexer/ar.rb"
1121
- end # eof action switch
1122
- end
1123
- if _trigger_goto
1124
- next
1125
- end
1126
- end
1127
- end
1128
- if _goto_level <= _out
1129
- break
1130
- end
1131
- end
1132
- end
1133
-
1134
- # line 144 "ragel/i18n/ar.rb.rl"
1135
- end
1136
-
1137
- def unindent(startcol, text)
1138
- text.gsub(/^[\t ]{0,#{startcol}}/, "")
1139
- end
1140
-
1141
- def store_keyword_content(event, data, p, eof)
1142
- end_point = (!@next_keyword_start or (p == eof)) ? p : @next_keyword_start
1143
- content = unindent(@start_col + 2, utf8_pack(data[@content_start...end_point])).rstrip
1144
- content_lines = content.split("\n")
1145
- name = content_lines.shift || ""
1146
- name.strip!
1147
- description = content_lines.join("\n")
1148
- @listener.__send__(event, @keyword, name, description, @current_line)
1149
- @next_keyword_start ? @next_keyword_start - 1 : p
1150
- ensure
1151
- @next_keyword_start = nil
1152
- end
1153
-
1154
- def current_line_content(data, p)
1155
- rest = data[@last_newline..-1]
1156
- utf8_pack(rest[0..rest.index(10)||-1]).strip # 10 is \n
1157
- end
1158
-
1159
- if (RUBY_VERSION =~ /^1\.9|2\.0/)
1160
- def utf8_pack(array)
1161
- array.pack("c*").force_encoding("UTF-8")
1162
- end
1163
- else
1164
- def utf8_pack(array)
1165
- array.pack("c*")
1166
- end
1167
- end
1168
- end
1169
- end
1170
- end