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