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