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