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