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