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