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