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