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