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