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