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