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