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