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,6 +0,0 @@
1
- require 'mkmf'
2
- CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
- dir_config("gherkin_lexer_ro")
5
- have_library("c", "main")
6
- create_makefile("gherkin_lexer_ro")
@@ -1,1427 +0,0 @@
1
-
2
- #line 1 "ragel/i18n/ro.c.rl"
3
- #include <assert.h>
4
- #include <ruby.h>
5
-
6
- #if defined(_WIN32)
7
- #include <stddef.h>
8
- #endif
9
-
10
- #ifdef HAVE_RUBY_RE_H
11
- #include <ruby/re.h>
12
- #else
13
- #include <re.h>
14
- #endif
15
-
16
- #ifdef HAVE_RUBY_ENCODING_H
17
- #include <ruby/encoding.h>
18
- #define ENCODED_STR_NEW(ptr, len) \
19
- rb_enc_str_new(ptr, len, rb_utf8_encoding())
20
- #else
21
- #define ENCODED_STR_NEW(ptr, len) \
22
- rb_str_new(ptr, len)
23
- #endif
24
-
25
- #ifndef RSTRING_PTR
26
- #define RSTRING_PTR(s) (RSTRING(s)->ptr)
27
- #endif
28
-
29
- #ifndef RSTRING_LEN
30
- #define RSTRING_LEN(s) (RSTRING(s)->len)
31
- #endif
32
-
33
- #define DATA_GET(FROM, TYPE, NAME) \
34
- Data_Get_Struct(FROM, TYPE, NAME); \
35
- if (NAME == NULL) { \
36
- rb_raise(rb_eArgError, "NULL found for " # NAME " when it shouldn't be."); \
37
- }
38
-
39
- typedef struct lexer_state {
40
- int content_len;
41
- int line_number;
42
- int current_line;
43
- int start_col;
44
- size_t mark;
45
- size_t keyword_start;
46
- size_t keyword_end;
47
- size_t next_keyword_start;
48
- size_t content_start;
49
- size_t content_end;
50
- size_t docstring_content_type_start;
51
- size_t docstring_content_type_end;
52
- size_t query_start;
53
- size_t last_newline;
54
- size_t final_newline;
55
- } lexer_state;
56
-
57
- static VALUE mGherkin;
58
- static VALUE mGherkinLexer;
59
- static VALUE mCLexer;
60
- static VALUE cI18nLexer;
61
- static VALUE rb_eGherkinLexingError;
62
-
63
- #define LEN(AT, P) (P - data - lexer->AT)
64
- #define MARK(M, P) (lexer->M = (P) - data)
65
- #define PTR_TO(P) (data + lexer->P)
66
-
67
- #define STORE_KW_END_CON(EVENT) \
68
- store_multiline_kw_con(listener, # EVENT, \
69
- PTR_TO(keyword_start), LEN(keyword_start, PTR_TO(keyword_end - 1)), \
70
- PTR_TO(content_start), LEN(content_start, PTR_TO(content_end)), \
71
- lexer->current_line, lexer->start_col); \
72
- if (lexer->content_end != 0) { \
73
- p = PTR_TO(content_end - 1); \
74
- } \
75
- lexer->content_end = 0
76
-
77
- #define STORE_ATTR(ATTR) \
78
- store_attr(listener, # ATTR, \
79
- PTR_TO(content_start), LEN(content_start, p), \
80
- lexer->line_number)
81
-
82
-
83
- #line 254 "ragel/i18n/ro.c.rl"
84
-
85
-
86
- /** Data **/
87
-
88
- #line 89 "ext/gherkin_lexer_ro/gherkin_lexer_ro.c"
89
- static const char _lexer_actions[] = {
90
- 0, 1, 0, 1, 1, 1, 2, 1,
91
- 3, 1, 4, 1, 5, 1, 6, 1,
92
- 7, 1, 8, 1, 9, 1, 10, 1,
93
- 11, 1, 12, 1, 13, 1, 16, 1,
94
- 17, 1, 18, 1, 19, 1, 20, 1,
95
- 21, 1, 22, 1, 23, 2, 1, 18,
96
- 2, 4, 5, 2, 13, 0, 2, 14,
97
- 15, 2, 17, 0, 2, 17, 2, 2,
98
- 17, 16, 2, 17, 19, 2, 18, 6,
99
- 2, 18, 7, 2, 18, 8, 2, 18,
100
- 9, 2, 18, 10, 2, 18, 16, 2,
101
- 20, 21, 2, 22, 0, 2, 22, 2,
102
- 2, 22, 16, 2, 22, 19, 3, 3,
103
- 14, 15, 3, 5, 14, 15, 3, 11,
104
- 14, 15, 3, 12, 14, 15, 3, 13,
105
- 14, 15, 3, 14, 15, 18, 3, 17,
106
- 0, 11, 3, 17, 14, 15, 4, 1,
107
- 14, 15, 18, 4, 4, 5, 14, 15,
108
- 4, 17, 0, 14, 15, 5, 17, 0,
109
- 11, 14, 15
110
- };
111
-
112
- static const short _lexer_key_offsets[] = {
113
- 0, 0, 19, 20, 21, 22, 24, 26,
114
- 44, 45, 46, 47, 49, 51, 56, 61,
115
- 66, 71, 75, 79, 81, 82, 83, 84,
116
- 85, 86, 87, 88, 89, 90, 91, 92,
117
- 93, 94, 95, 96, 101, 108, 113, 114,
118
- 115, 116, 117, 120, 121, 122, 123, 124,
119
- 125, 126, 127, 128, 129, 130, 131, 146,
120
- 148, 150, 152, 170, 171, 175, 176, 177,
121
- 178, 179, 180, 181, 182, 185, 186, 187,
122
- 188, 189, 190, 191, 192, 193, 194, 201,
123
- 203, 205, 207, 211, 213, 215, 217, 219,
124
- 221, 223, 225, 227, 229, 231, 233, 235,
125
- 237, 238, 239, 240, 243, 244, 245, 246,
126
- 247, 248, 249, 250, 251, 252, 253, 254,
127
- 255, 256, 257, 268, 270, 272, 274, 276,
128
- 278, 280, 282, 284, 286, 288, 290, 292,
129
- 294, 296, 298, 300, 302, 304, 306, 308,
130
- 310, 312, 314, 316, 318, 320, 322, 324,
131
- 326, 328, 332, 334, 336, 338, 340, 342,
132
- 344, 346, 348, 350, 352, 354, 357, 359,
133
- 361, 363, 365, 367, 369, 371, 373, 375,
134
- 377, 379, 381, 384, 386, 388, 390, 392,
135
- 393, 396, 397, 398, 399, 400, 401, 402,
136
- 403, 404, 405, 420, 422, 424, 426, 428,
137
- 430, 432, 434, 436, 438, 440, 442, 444,
138
- 446, 448, 450, 452, 454, 456, 458, 460,
139
- 462, 464, 468, 470, 472, 474, 476, 478,
140
- 480, 482, 484, 486, 488, 493, 495, 497,
141
- 499, 501, 503, 505, 507, 511, 513, 515,
142
- 517, 521, 523, 525, 527, 529, 531, 533,
143
- 535, 537, 539, 541, 543, 545, 549, 551,
144
- 553, 555, 557, 559, 561, 563, 565, 567,
145
- 569, 571, 573, 576, 578, 580, 582, 584,
146
- 585, 586, 587, 588, 589, 590, 592, 593,
147
- 594, 595, 596, 597, 598, 599, 600, 601,
148
- 602, 603, 604, 605, 620, 622, 624, 626,
149
- 628, 630, 632, 634, 636, 638, 640, 642,
150
- 644, 646, 648, 650, 652, 654, 656, 658,
151
- 660, 662, 664, 667, 669, 671, 673, 675,
152
- 680, 682, 684, 686, 688, 690, 692, 694,
153
- 698, 700, 702, 704, 708, 710, 712, 714,
154
- 716, 718, 720, 722, 724, 726, 728, 730,
155
- 732, 734, 737, 739, 741, 743, 745, 747,
156
- 749, 753, 759, 762, 764, 770, 788, 790,
157
- 792, 794, 796, 798, 800, 802, 804, 806,
158
- 808, 810, 812, 814, 816, 818, 820, 822,
159
- 824, 826, 829, 831, 833, 835, 837, 842,
160
- 844, 846, 848, 850, 852, 854, 856, 860,
161
- 862, 864, 866, 870, 872, 874, 876, 878,
162
- 880, 882, 884, 886, 888, 890, 892, 894,
163
- 896, 900, 902, 904, 906, 908, 910, 912,
164
- 914, 916, 918, 920, 922, 924, 927, 929,
165
- 931, 933, 935, 936, 937
166
- };
167
-
168
- static const char _lexer_trans_keys[] = {
169
- -59, -56, -17, 10, 32, 34, 35, 37,
170
- 42, 64, 65, 67, 68, 69, 70, 83,
171
- 124, 9, 13, -98, 105, 32, 10, 13,
172
- 10, 13, -59, -56, 10, 32, 34, 35,
173
- 37, 42, 64, 65, 67, 68, 69, 70,
174
- 83, 124, 9, 13, -104, 34, 34, 10,
175
- 13, 10, 13, 10, 32, 34, 9, 13,
176
- 10, 32, 34, 9, 13, 10, 32, 34,
177
- 9, 13, 10, 32, 34, 9, 13, 10,
178
- 32, 9, 13, 10, 32, 9, 13, 10,
179
- 13, 10, 95, 70, 69, 65, 84, 85,
180
- 82, 69, 95, 69, 78, 68, 95, 37,
181
- 13, 32, 64, 9, 10, 9, 10, 13,
182
- 32, 64, 11, 12, 10, 32, 64, 9,
183
- 13, 116, 117, 110, 99, -61, 97, 111,
184
- -94, 110, 100, 110, 116, 101, 120, 116,
185
- 58, 10, 10, -59, -56, 10, 32, 35,
186
- 37, 42, 64, 65, 67, 68, 70, 83,
187
- 9, 13, -98, 10, 10, 105, 10, 32,
188
- -59, -56, 10, 32, 34, 35, 37, 42,
189
- 64, 65, 67, 68, 69, 70, 83, 124,
190
- 9, 13, 97, -59, -56, 114, 116, -93,
191
- 105, 32, 102, 105, 105, -101, 32, 101,
192
- 105, 120, 101, 109, 112, 108, 101, 58,
193
- 10, 10, 10, 32, 35, 70, 124, 9,
194
- 13, 10, 117, 10, 110, 10, 99, -59,
195
- -56, 10, 116, -93, 10, 10, 105, 10,
196
- 111, 10, 110, 10, 97, 10, 108, 10,
197
- 105, 10, 116, 10, 97, 10, 116, 10,
198
- 101, 10, 58, -101, 10, 117, 110, 99,
199
- -59, -56, 116, -93, 105, 111, 110, 97,
200
- 108, 105, 116, 97, 116, 101, 58, 10,
201
- 10, 10, 32, 35, 37, 64, 67, 69,
202
- 70, 83, 9, 13, 10, 95, 10, 70,
203
- 10, 69, 10, 65, 10, 84, 10, 85,
204
- 10, 82, 10, 69, 10, 95, 10, 69,
205
- 10, 78, 10, 68, 10, 95, 10, 37,
206
- 10, 111, 10, 110, 10, 116, 10, 101,
207
- 10, 120, 10, 116, 10, 58, 10, 120,
208
- 10, 101, 10, 109, 10, 112, 10, 108,
209
- 10, 101, 10, 117, 10, 110, 10, 99,
210
- -59, -56, 10, 116, -93, 10, 10, 105,
211
- 10, 111, 10, 110, 10, 97, 10, 108,
212
- 10, 105, 10, 116, 10, 97, 10, 116,
213
- -101, 10, 10, 99, 116, 10, 101, 10,
214
- 110, 10, 97, 10, 114, 10, 105, 10,
215
- 117, 10, 114, 10, 117, 10, 99, 10,
216
- 116, 10, 117, 10, 114, -60, 10, 97,
217
- -125, 10, 10, 32, 10, 115, 10, 99,
218
- -101, 99, 105, 116, 101, 110, 97, 114,
219
- 105, 117, 58, 10, 10, -59, -56, 10,
220
- 32, 35, 37, 42, 64, 65, 67, 68,
221
- 70, 83, 9, 13, -98, 10, 10, 105,
222
- 10, 32, -104, 10, 10, 95, 10, 70,
223
- 10, 69, 10, 65, 10, 84, 10, 85,
224
- 10, 82, 10, 69, 10, 95, 10, 69,
225
- 10, 78, 10, 68, 10, 95, 10, 37,
226
- 10, 116, 10, 117, 10, 110, 10, 99,
227
- -61, 10, 97, 111, -94, 10, 10, 110,
228
- 10, 100, 10, 110, 10, 116, 10, 101,
229
- 10, 120, 10, 116, 10, 58, 10, 97,
230
- -59, -56, 10, 114, 116, -93, 10, 10,
231
- 105, 10, 32, 10, 102, 10, 105, 10,
232
- 105, -101, 10, 10, 32, 101, 105, 10,
233
- 117, 10, 110, 10, 99, -59, -56, 10,
234
- 116, -93, 10, 10, 105, 10, 111, 10,
235
- 110, 10, 97, 10, 108, 10, 105, 10,
236
- 116, 10, 97, 10, 116, 10, 101, -101,
237
- 10, 10, 99, 105, 116, 10, 101, 10,
238
- 110, 10, 97, 10, 114, 10, 105, 10,
239
- 117, 10, 114, 10, 117, 10, 99, 10,
240
- 116, 10, 117, 10, 114, -60, 10, 97,
241
- -125, 10, 10, 32, 10, 115, 10, 99,
242
- 114, 117, 99, 116, 117, 114, -60, 97,
243
- -125, 32, 115, 99, 101, 110, 97, 114,
244
- 105, 117, 58, 10, 10, -59, -56, 10,
245
- 32, 35, 37, 42, 64, 65, 67, 68,
246
- 70, 83, 9, 13, -98, 10, 10, 105,
247
- 10, 32, -104, 10, 10, 95, 10, 70,
248
- 10, 69, 10, 65, 10, 84, 10, 85,
249
- 10, 82, 10, 69, 10, 95, 10, 69,
250
- 10, 78, 10, 68, 10, 95, 10, 37,
251
- 10, 116, 10, 117, 10, 110, 10, 99,
252
- -61, 10, 97, -94, 10, 10, 110, 10,
253
- 100, 10, 97, -59, -56, 10, 114, 116,
254
- -93, 10, 10, 105, 10, 32, 10, 102,
255
- 10, 105, 10, 105, -101, 10, 10, 32,
256
- 101, 105, 10, 117, 10, 110, 10, 99,
257
- -59, -56, 10, 116, -93, 10, 10, 105,
258
- 10, 111, 10, 110, 10, 97, 10, 108,
259
- 10, 105, 10, 116, 10, 97, 10, 116,
260
- 10, 101, 10, 58, -101, 10, 10, 99,
261
- 105, 10, 101, 10, 110, 10, 97, 10,
262
- 114, 10, 105, 10, 117, 32, 124, 9,
263
- 13, 10, 32, 92, 124, 9, 13, 10,
264
- 92, 124, 10, 92, 10, 32, 92, 124,
265
- 9, 13, -59, -56, 10, 32, 34, 35,
266
- 37, 42, 64, 65, 67, 68, 69, 70,
267
- 83, 124, 9, 13, -104, 10, 10, 95,
268
- 10, 70, 10, 69, 10, 65, 10, 84,
269
- 10, 85, 10, 82, 10, 69, 10, 95,
270
- 10, 69, 10, 78, 10, 68, 10, 95,
271
- 10, 37, 10, 116, 10, 117, 10, 110,
272
- 10, 99, -61, 10, 97, -94, 10, 10,
273
- 110, 10, 100, 10, 97, -59, -56, 10,
274
- 114, 116, -93, 10, 10, 105, 10, 32,
275
- 10, 102, 10, 105, 10, 105, -101, 10,
276
- 10, 32, 101, 105, 10, 117, 10, 110,
277
- 10, 99, -59, -56, 10, 116, -93, 10,
278
- 10, 105, 10, 111, 10, 110, 10, 97,
279
- 10, 108, 10, 105, 10, 116, 10, 97,
280
- 10, 116, 10, 101, 10, 58, -101, 10,
281
- 10, 99, 105, 116, 10, 101, 10, 110,
282
- 10, 97, 10, 114, 10, 105, 10, 117,
283
- 10, 114, 10, 117, 10, 99, 10, 116,
284
- 10, 117, 10, 114, -60, 10, 97, -125,
285
- 10, 10, 32, 10, 115, 10, 99, -69,
286
- -65, 0
287
- };
288
-
289
- static const char _lexer_single_lengths[] = {
290
- 0, 17, 1, 1, 1, 2, 2, 16,
291
- 1, 1, 1, 2, 2, 3, 3, 3,
292
- 3, 2, 2, 2, 1, 1, 1, 1,
293
- 1, 1, 1, 1, 1, 1, 1, 1,
294
- 1, 1, 1, 3, 5, 3, 1, 1,
295
- 1, 1, 3, 1, 1, 1, 1, 1,
296
- 1, 1, 1, 1, 1, 1, 13, 2,
297
- 2, 2, 16, 1, 4, 1, 1, 1,
298
- 1, 1, 1, 1, 3, 1, 1, 1,
299
- 1, 1, 1, 1, 1, 1, 5, 2,
300
- 2, 2, 4, 2, 2, 2, 2, 2,
301
- 2, 2, 2, 2, 2, 2, 2, 2,
302
- 1, 1, 1, 3, 1, 1, 1, 1,
303
- 1, 1, 1, 1, 1, 1, 1, 1,
304
- 1, 1, 9, 2, 2, 2, 2, 2,
305
- 2, 2, 2, 2, 2, 2, 2, 2,
306
- 2, 2, 2, 2, 2, 2, 2, 2,
307
- 2, 2, 2, 2, 2, 2, 2, 2,
308
- 2, 4, 2, 2, 2, 2, 2, 2,
309
- 2, 2, 2, 2, 2, 3, 2, 2,
310
- 2, 2, 2, 2, 2, 2, 2, 2,
311
- 2, 2, 3, 2, 2, 2, 2, 1,
312
- 3, 1, 1, 1, 1, 1, 1, 1,
313
- 1, 1, 13, 2, 2, 2, 2, 2,
314
- 2, 2, 2, 2, 2, 2, 2, 2,
315
- 2, 2, 2, 2, 2, 2, 2, 2,
316
- 2, 4, 2, 2, 2, 2, 2, 2,
317
- 2, 2, 2, 2, 5, 2, 2, 2,
318
- 2, 2, 2, 2, 4, 2, 2, 2,
319
- 4, 2, 2, 2, 2, 2, 2, 2,
320
- 2, 2, 2, 2, 2, 4, 2, 2,
321
- 2, 2, 2, 2, 2, 2, 2, 2,
322
- 2, 2, 3, 2, 2, 2, 2, 1,
323
- 1, 1, 1, 1, 1, 2, 1, 1,
324
- 1, 1, 1, 1, 1, 1, 1, 1,
325
- 1, 1, 1, 13, 2, 2, 2, 2,
326
- 2, 2, 2, 2, 2, 2, 2, 2,
327
- 2, 2, 2, 2, 2, 2, 2, 2,
328
- 2, 2, 3, 2, 2, 2, 2, 5,
329
- 2, 2, 2, 2, 2, 2, 2, 4,
330
- 2, 2, 2, 4, 2, 2, 2, 2,
331
- 2, 2, 2, 2, 2, 2, 2, 2,
332
- 2, 3, 2, 2, 2, 2, 2, 2,
333
- 2, 4, 3, 2, 4, 16, 2, 2,
334
- 2, 2, 2, 2, 2, 2, 2, 2,
335
- 2, 2, 2, 2, 2, 2, 2, 2,
336
- 2, 3, 2, 2, 2, 2, 5, 2,
337
- 2, 2, 2, 2, 2, 2, 4, 2,
338
- 2, 2, 4, 2, 2, 2, 2, 2,
339
- 2, 2, 2, 2, 2, 2, 2, 2,
340
- 4, 2, 2, 2, 2, 2, 2, 2,
341
- 2, 2, 2, 2, 2, 3, 2, 2,
342
- 2, 2, 1, 1, 0
343
- };
344
-
345
- static const char _lexer_range_lengths[] = {
346
- 0, 1, 0, 0, 0, 0, 0, 1,
347
- 0, 0, 0, 0, 0, 1, 1, 1,
348
- 1, 1, 1, 0, 0, 0, 0, 0,
349
- 0, 0, 0, 0, 0, 0, 0, 0,
350
- 0, 0, 0, 1, 1, 1, 0, 0,
351
- 0, 0, 0, 0, 0, 0, 0, 0,
352
- 0, 0, 0, 0, 0, 0, 1, 0,
353
- 0, 0, 1, 0, 0, 0, 0, 0,
354
- 0, 0, 0, 0, 0, 0, 0, 0,
355
- 0, 0, 0, 0, 0, 0, 1, 0,
356
- 0, 0, 0, 0, 0, 0, 0, 0,
357
- 0, 0, 0, 0, 0, 0, 0, 0,
358
- 0, 0, 0, 0, 0, 0, 0, 0,
359
- 0, 0, 0, 0, 0, 0, 0, 0,
360
- 0, 0, 1, 0, 0, 0, 0, 0,
361
- 0, 0, 0, 0, 0, 0, 0, 0,
362
- 0, 0, 0, 0, 0, 0, 0, 0,
363
- 0, 0, 0, 0, 0, 0, 0, 0,
364
- 0, 0, 0, 0, 0, 0, 0, 0,
365
- 0, 0, 0, 0, 0, 0, 0, 0,
366
- 0, 0, 0, 0, 0, 0, 0, 0,
367
- 0, 0, 0, 0, 0, 0, 0, 0,
368
- 0, 0, 0, 0, 0, 0, 0, 0,
369
- 0, 0, 1, 0, 0, 0, 0, 0,
370
- 0, 0, 0, 0, 0, 0, 0, 0,
371
- 0, 0, 0, 0, 0, 0, 0, 0,
372
- 0, 0, 0, 0, 0, 0, 0, 0,
373
- 0, 0, 0, 0, 0, 0, 0, 0,
374
- 0, 0, 0, 0, 0, 0, 0, 0,
375
- 0, 0, 0, 0, 0, 0, 0, 0,
376
- 0, 0, 0, 0, 0, 0, 0, 0,
377
- 0, 0, 0, 0, 0, 0, 0, 0,
378
- 0, 0, 0, 0, 0, 0, 0, 0,
379
- 0, 0, 0, 0, 0, 0, 0, 0,
380
- 0, 0, 0, 0, 0, 0, 0, 0,
381
- 0, 0, 0, 1, 0, 0, 0, 0,
382
- 0, 0, 0, 0, 0, 0, 0, 0,
383
- 0, 0, 0, 0, 0, 0, 0, 0,
384
- 0, 0, 0, 0, 0, 0, 0, 0,
385
- 0, 0, 0, 0, 0, 0, 0, 0,
386
- 0, 0, 0, 0, 0, 0, 0, 0,
387
- 0, 0, 0, 0, 0, 0, 0, 0,
388
- 0, 0, 0, 0, 0, 0, 0, 0,
389
- 1, 1, 0, 0, 1, 1, 0, 0,
390
- 0, 0, 0, 0, 0, 0, 0, 0,
391
- 0, 0, 0, 0, 0, 0, 0, 0,
392
- 0, 0, 0, 0, 0, 0, 0, 0,
393
- 0, 0, 0, 0, 0, 0, 0, 0,
394
- 0, 0, 0, 0, 0, 0, 0, 0,
395
- 0, 0, 0, 0, 0, 0, 0, 0,
396
- 0, 0, 0, 0, 0, 0, 0, 0,
397
- 0, 0, 0, 0, 0, 0, 0, 0,
398
- 0, 0, 0, 0, 0
399
- };
400
-
401
- static const short _lexer_index_offsets[] = {
402
- 0, 0, 19, 21, 23, 25, 28, 31,
403
- 49, 51, 53, 55, 58, 61, 66, 71,
404
- 76, 81, 85, 89, 92, 94, 96, 98,
405
- 100, 102, 104, 106, 108, 110, 112, 114,
406
- 116, 118, 120, 122, 127, 134, 139, 141,
407
- 143, 145, 147, 151, 153, 155, 157, 159,
408
- 161, 163, 165, 167, 169, 171, 173, 188,
409
- 191, 194, 197, 215, 217, 222, 224, 226,
410
- 228, 230, 232, 234, 236, 240, 242, 244,
411
- 246, 248, 250, 252, 254, 256, 258, 265,
412
- 268, 271, 274, 279, 282, 285, 288, 291,
413
- 294, 297, 300, 303, 306, 309, 312, 315,
414
- 318, 320, 322, 324, 328, 330, 332, 334,
415
- 336, 338, 340, 342, 344, 346, 348, 350,
416
- 352, 354, 356, 367, 370, 373, 376, 379,
417
- 382, 385, 388, 391, 394, 397, 400, 403,
418
- 406, 409, 412, 415, 418, 421, 424, 427,
419
- 430, 433, 436, 439, 442, 445, 448, 451,
420
- 454, 457, 462, 465, 468, 471, 474, 477,
421
- 480, 483, 486, 489, 492, 495, 499, 502,
422
- 505, 508, 511, 514, 517, 520, 523, 526,
423
- 529, 532, 535, 539, 542, 545, 548, 551,
424
- 553, 557, 559, 561, 563, 565, 567, 569,
425
- 571, 573, 575, 590, 593, 596, 599, 602,
426
- 605, 608, 611, 614, 617, 620, 623, 626,
427
- 629, 632, 635, 638, 641, 644, 647, 650,
428
- 653, 656, 661, 664, 667, 670, 673, 676,
429
- 679, 682, 685, 688, 691, 697, 700, 703,
430
- 706, 709, 712, 715, 718, 723, 726, 729,
431
- 732, 737, 740, 743, 746, 749, 752, 755,
432
- 758, 761, 764, 767, 770, 773, 778, 781,
433
- 784, 787, 790, 793, 796, 799, 802, 805,
434
- 808, 811, 814, 818, 821, 824, 827, 830,
435
- 832, 834, 836, 838, 840, 842, 845, 847,
436
- 849, 851, 853, 855, 857, 859, 861, 863,
437
- 865, 867, 869, 871, 886, 889, 892, 895,
438
- 898, 901, 904, 907, 910, 913, 916, 919,
439
- 922, 925, 928, 931, 934, 937, 940, 943,
440
- 946, 949, 952, 956, 959, 962, 965, 968,
441
- 974, 977, 980, 983, 986, 989, 992, 995,
442
- 1000, 1003, 1006, 1009, 1014, 1017, 1020, 1023,
443
- 1026, 1029, 1032, 1035, 1038, 1041, 1044, 1047,
444
- 1050, 1053, 1057, 1060, 1063, 1066, 1069, 1072,
445
- 1075, 1079, 1085, 1089, 1092, 1098, 1116, 1119,
446
- 1122, 1125, 1128, 1131, 1134, 1137, 1140, 1143,
447
- 1146, 1149, 1152, 1155, 1158, 1161, 1164, 1167,
448
- 1170, 1173, 1177, 1180, 1183, 1186, 1189, 1195,
449
- 1198, 1201, 1204, 1207, 1210, 1213, 1216, 1221,
450
- 1224, 1227, 1230, 1235, 1238, 1241, 1244, 1247,
451
- 1250, 1253, 1256, 1259, 1262, 1265, 1268, 1271,
452
- 1274, 1279, 1282, 1285, 1288, 1291, 1294, 1297,
453
- 1300, 1303, 1306, 1309, 1312, 1315, 1319, 1322,
454
- 1325, 1328, 1331, 1333, 1335
455
- };
456
-
457
- static const short _lexer_trans_targs[] = {
458
- 2, 8, 418, 7, 7, 9, 19, 21,
459
- 4, 35, 38, 42, 59, 69, 96, 176,
460
- 344, 7, 0, 3, 0, 4, 0, 5,
461
- 0, 7, 20, 6, 7, 20, 6, 2,
462
- 8, 7, 7, 9, 19, 21, 4, 35,
463
- 38, 42, 59, 69, 96, 176, 344, 7,
464
- 0, 3, 0, 10, 0, 11, 0, 13,
465
- 12, 12, 13, 12, 12, 14, 14, 15,
466
- 14, 14, 14, 14, 15, 14, 14, 14,
467
- 14, 16, 14, 14, 14, 14, 17, 14,
468
- 14, 7, 18, 18, 0, 7, 18, 18,
469
- 0, 7, 20, 19, 7, 0, 22, 0,
470
- 23, 0, 24, 0, 25, 0, 26, 0,
471
- 27, 0, 28, 0, 29, 0, 30, 0,
472
- 31, 0, 32, 0, 33, 0, 34, 0,
473
- 420, 0, 0, 0, 0, 0, 36, 37,
474
- 7, 37, 37, 35, 36, 36, 7, 37,
475
- 35, 37, 0, 39, 0, 40, 0, 41,
476
- 0, 3, 0, 43, 44, 46, 0, 44,
477
- 0, 45, 0, 4, 0, 47, 0, 48,
478
- 0, 49, 0, 50, 0, 51, 0, 52,
479
- 0, 54, 53, 54, 53, 55, 350, 54,
480
- 54, 7, 351, 57, 7, 365, 369, 373,
481
- 383, 400, 54, 53, 56, 54, 53, 54,
482
- 57, 53, 54, 58, 53, 2, 8, 7,
483
- 7, 9, 19, 21, 4, 35, 38, 42,
484
- 59, 69, 96, 176, 344, 7, 0, 60,
485
- 0, 61, 67, 4, 68, 0, 62, 0,
486
- 63, 0, 64, 0, 65, 0, 66, 0,
487
- 44, 0, 62, 0, 64, 63, 63, 0,
488
- 70, 0, 71, 0, 72, 0, 73, 0,
489
- 74, 0, 75, 0, 76, 0, 78, 77,
490
- 78, 77, 78, 78, 7, 79, 7, 78,
491
- 77, 78, 80, 77, 78, 81, 77, 78,
492
- 82, 77, 83, 95, 78, 84, 77, 84,
493
- 78, 77, 78, 85, 77, 78, 86, 77,
494
- 78, 87, 77, 78, 88, 77, 78, 89,
495
- 77, 78, 90, 77, 78, 91, 77, 78,
496
- 92, 77, 78, 93, 77, 78, 94, 77,
497
- 78, 58, 77, 84, 78, 77, 97, 0,
498
- 98, 0, 99, 0, 100, 175, 101, 0,
499
- 101, 0, 102, 0, 103, 0, 104, 0,
500
- 105, 0, 106, 0, 107, 0, 108, 0,
501
- 109, 0, 110, 0, 111, 0, 112, 0,
502
- 114, 113, 114, 113, 114, 114, 7, 115,
503
- 7, 129, 136, 142, 157, 114, 113, 114,
504
- 116, 113, 114, 117, 113, 114, 118, 113,
505
- 114, 119, 113, 114, 120, 113, 114, 121,
506
- 113, 114, 122, 113, 114, 123, 113, 114,
507
- 124, 113, 114, 125, 113, 114, 126, 113,
508
- 114, 127, 113, 114, 128, 113, 114, 7,
509
- 113, 114, 130, 113, 114, 131, 113, 114,
510
- 132, 113, 114, 133, 113, 114, 134, 113,
511
- 114, 135, 113, 114, 58, 113, 114, 137,
512
- 113, 114, 138, 113, 114, 139, 113, 114,
513
- 140, 113, 114, 141, 113, 114, 135, 113,
514
- 114, 143, 113, 114, 144, 113, 114, 145,
515
- 113, 146, 156, 114, 147, 113, 147, 114,
516
- 113, 114, 148, 113, 114, 149, 113, 114,
517
- 150, 113, 114, 151, 113, 114, 152, 113,
518
- 114, 153, 113, 114, 154, 113, 114, 155,
519
- 113, 114, 141, 113, 147, 114, 113, 114,
520
- 158, 164, 113, 114, 159, 113, 114, 160,
521
- 113, 114, 161, 113, 114, 162, 113, 114,
522
- 163, 113, 114, 135, 113, 114, 165, 113,
523
- 114, 166, 113, 114, 167, 113, 114, 168,
524
- 113, 114, 169, 113, 114, 170, 113, 171,
525
- 114, 172, 113, 172, 114, 113, 114, 173,
526
- 113, 114, 174, 113, 114, 158, 113, 101,
527
- 0, 177, 4, 263, 0, 178, 0, 179,
528
- 0, 180, 0, 181, 0, 182, 0, 183,
529
- 0, 184, 0, 186, 185, 186, 185, 187,
530
- 190, 186, 186, 7, 191, 189, 7, 205,
531
- 209, 219, 229, 245, 186, 185, 188, 186,
532
- 185, 186, 189, 185, 186, 58, 185, 188,
533
- 186, 185, 186, 192, 185, 186, 193, 185,
534
- 186, 194, 185, 186, 195, 185, 186, 196,
535
- 185, 186, 197, 185, 186, 198, 185, 186,
536
- 199, 185, 186, 200, 185, 186, 201, 185,
537
- 186, 202, 185, 186, 203, 185, 186, 204,
538
- 185, 186, 7, 185, 186, 206, 185, 186,
539
- 207, 185, 186, 208, 185, 186, 188, 185,
540
- 210, 186, 211, 213, 185, 211, 186, 185,
541
- 186, 212, 185, 186, 189, 185, 186, 214,
542
- 185, 186, 215, 185, 186, 216, 185, 186,
543
- 217, 185, 186, 218, 185, 186, 58, 185,
544
- 186, 220, 185, 221, 227, 186, 189, 228,
545
- 185, 222, 186, 185, 186, 223, 185, 186,
546
- 224, 185, 186, 225, 185, 186, 226, 185,
547
- 186, 211, 185, 222, 186, 185, 186, 224,
548
- 223, 223, 185, 186, 230, 185, 186, 231,
549
- 185, 186, 232, 185, 233, 244, 186, 234,
550
- 185, 234, 186, 185, 186, 235, 185, 186,
551
- 236, 185, 186, 237, 185, 186, 238, 185,
552
- 186, 239, 185, 186, 240, 185, 186, 241,
553
- 185, 186, 242, 185, 186, 243, 185, 186,
554
- 218, 185, 234, 186, 185, 186, 246, 189,
555
- 252, 185, 186, 247, 185, 186, 248, 185,
556
- 186, 249, 185, 186, 250, 185, 186, 251,
557
- 185, 186, 218, 185, 186, 253, 185, 186,
558
- 254, 185, 186, 255, 185, 186, 256, 185,
559
- 186, 257, 185, 186, 258, 185, 259, 186,
560
- 260, 185, 260, 186, 185, 186, 261, 185,
561
- 186, 262, 185, 186, 246, 185, 264, 0,
562
- 265, 0, 266, 0, 267, 0, 268, 0,
563
- 269, 0, 270, 271, 0, 271, 0, 272,
564
- 0, 273, 0, 274, 0, 275, 0, 276,
565
- 0, 277, 0, 278, 0, 279, 0, 280,
566
- 0, 281, 0, 283, 282, 283, 282, 284,
567
- 287, 283, 283, 7, 288, 286, 7, 302,
568
- 306, 310, 320, 337, 283, 282, 285, 283,
569
- 282, 283, 286, 282, 283, 58, 282, 285,
570
- 283, 282, 283, 289, 282, 283, 290, 282,
571
- 283, 291, 282, 283, 292, 282, 283, 293,
572
- 282, 283, 294, 282, 283, 295, 282, 283,
573
- 296, 282, 283, 297, 282, 283, 298, 282,
574
- 283, 299, 282, 283, 300, 282, 283, 301,
575
- 282, 283, 7, 282, 283, 303, 282, 283,
576
- 304, 282, 283, 305, 282, 283, 285, 282,
577
- 307, 283, 308, 282, 308, 283, 282, 283,
578
- 309, 282, 283, 286, 282, 283, 311, 282,
579
- 312, 318, 283, 286, 319, 282, 313, 283,
580
- 282, 283, 314, 282, 283, 315, 282, 283,
581
- 316, 282, 283, 317, 282, 283, 308, 282,
582
- 313, 283, 282, 283, 315, 314, 314, 282,
583
- 283, 321, 282, 283, 322, 282, 283, 323,
584
- 282, 324, 336, 283, 325, 282, 325, 283,
585
- 282, 283, 326, 282, 283, 327, 282, 283,
586
- 328, 282, 283, 329, 282, 283, 330, 282,
587
- 283, 331, 282, 283, 332, 282, 283, 333,
588
- 282, 283, 334, 282, 283, 335, 282, 283,
589
- 58, 282, 325, 283, 282, 283, 338, 286,
590
- 282, 283, 339, 282, 283, 340, 282, 283,
591
- 341, 282, 283, 342, 282, 283, 343, 282,
592
- 283, 335, 282, 344, 345, 344, 0, 349,
593
- 348, 347, 345, 348, 346, 0, 347, 345,
594
- 346, 0, 347, 346, 349, 348, 347, 345,
595
- 348, 346, 2, 8, 349, 349, 9, 19,
596
- 21, 4, 35, 38, 42, 59, 69, 96,
597
- 176, 344, 349, 0, 56, 54, 53, 54,
598
- 352, 53, 54, 353, 53, 54, 354, 53,
599
- 54, 355, 53, 54, 356, 53, 54, 357,
600
- 53, 54, 358, 53, 54, 359, 53, 54,
601
- 360, 53, 54, 361, 53, 54, 362, 53,
602
- 54, 363, 53, 54, 364, 53, 54, 7,
603
- 53, 54, 366, 53, 54, 367, 53, 54,
604
- 368, 53, 54, 56, 53, 370, 54, 371,
605
- 53, 371, 54, 53, 54, 372, 53, 54,
606
- 57, 53, 54, 374, 53, 375, 381, 54,
607
- 57, 382, 53, 376, 54, 53, 54, 377,
608
- 53, 54, 378, 53, 54, 379, 53, 54,
609
- 380, 53, 54, 371, 53, 376, 54, 53,
610
- 54, 378, 377, 377, 53, 54, 384, 53,
611
- 54, 385, 53, 54, 386, 53, 387, 399,
612
- 54, 388, 53, 388, 54, 53, 54, 389,
613
- 53, 54, 390, 53, 54, 391, 53, 54,
614
- 392, 53, 54, 393, 53, 54, 394, 53,
615
- 54, 395, 53, 54, 396, 53, 54, 397,
616
- 53, 54, 398, 53, 54, 58, 53, 388,
617
- 54, 53, 54, 401, 57, 407, 53, 54,
618
- 402, 53, 54, 403, 53, 54, 404, 53,
619
- 54, 405, 53, 54, 406, 53, 54, 398,
620
- 53, 54, 408, 53, 54, 409, 53, 54,
621
- 410, 53, 54, 411, 53, 54, 412, 53,
622
- 54, 413, 53, 414, 54, 415, 53, 415,
623
- 54, 53, 54, 416, 53, 54, 417, 53,
624
- 54, 401, 53, 419, 0, 7, 0, 0,
625
- 0
626
- };
627
-
628
- static const unsigned char _lexer_trans_actions[] = {
629
- 29, 29, 0, 54, 0, 5, 1, 0,
630
- 29, 1, 29, 29, 29, 29, 29, 29,
631
- 35, 0, 43, 0, 43, 0, 43, 0,
632
- 43, 149, 126, 57, 110, 23, 0, 29,
633
- 29, 54, 0, 5, 1, 0, 29, 1,
634
- 29, 29, 29, 29, 29, 29, 35, 0,
635
- 43, 0, 43, 0, 43, 0, 43, 139,
636
- 48, 9, 106, 11, 0, 134, 45, 45,
637
- 45, 3, 122, 33, 33, 33, 0, 122,
638
- 33, 33, 33, 0, 122, 33, 0, 33,
639
- 0, 102, 7, 7, 43, 54, 0, 0,
640
- 43, 114, 25, 0, 54, 43, 0, 43,
641
- 0, 43, 0, 43, 0, 43, 0, 43,
642
- 0, 43, 0, 43, 0, 43, 0, 43,
643
- 0, 43, 0, 43, 0, 43, 0, 43,
644
- 0, 43, 43, 43, 43, 43, 0, 27,
645
- 118, 27, 27, 51, 27, 0, 54, 0,
646
- 1, 0, 43, 0, 43, 0, 43, 0,
647
- 43, 0, 43, 0, 0, 0, 43, 0,
648
- 43, 0, 43, 0, 43, 0, 43, 0,
649
- 43, 0, 43, 0, 43, 0, 43, 0,
650
- 43, 144, 57, 54, 0, 84, 84, 54,
651
- 0, 72, 33, 84, 72, 84, 84, 84,
652
- 84, 84, 0, 0, 0, 54, 0, 54,
653
- 0, 0, 54, 15, 0, 63, 63, 130,
654
- 31, 60, 57, 31, 63, 57, 63, 63,
655
- 63, 63, 63, 63, 66, 31, 43, 0,
656
- 43, 0, 0, 0, 0, 43, 0, 43,
657
- 0, 43, 0, 43, 0, 43, 0, 43,
658
- 0, 43, 0, 43, 0, 0, 0, 43,
659
- 0, 43, 0, 43, 0, 43, 0, 43,
660
- 0, 43, 0, 43, 0, 43, 144, 57,
661
- 54, 0, 54, 0, 81, 84, 81, 0,
662
- 0, 54, 0, 0, 54, 0, 0, 54,
663
- 0, 0, 0, 0, 54, 0, 0, 0,
664
- 54, 0, 54, 0, 0, 54, 0, 0,
665
- 54, 0, 0, 54, 0, 0, 54, 0,
666
- 0, 54, 0, 0, 54, 0, 0, 54,
667
- 0, 0, 54, 0, 0, 54, 0, 0,
668
- 54, 21, 0, 0, 54, 0, 0, 43,
669
- 0, 43, 0, 43, 0, 0, 0, 43,
670
- 0, 43, 0, 43, 0, 43, 0, 43,
671
- 0, 43, 0, 43, 0, 43, 0, 43,
672
- 0, 43, 0, 43, 0, 43, 0, 43,
673
- 144, 57, 54, 0, 54, 0, 69, 33,
674
- 69, 84, 84, 84, 84, 0, 0, 54,
675
- 0, 0, 54, 0, 0, 54, 0, 0,
676
- 54, 0, 0, 54, 0, 0, 54, 0,
677
- 0, 54, 0, 0, 54, 0, 0, 54,
678
- 0, 0, 54, 0, 0, 54, 0, 0,
679
- 54, 0, 0, 54, 0, 0, 54, 13,
680
- 0, 54, 0, 0, 54, 0, 0, 54,
681
- 0, 0, 54, 0, 0, 54, 0, 0,
682
- 54, 0, 0, 54, 13, 0, 54, 0,
683
- 0, 54, 0, 0, 54, 0, 0, 54,
684
- 0, 0, 54, 0, 0, 54, 0, 0,
685
- 54, 0, 0, 54, 0, 0, 54, 0,
686
- 0, 0, 0, 54, 0, 0, 0, 54,
687
- 0, 54, 0, 0, 54, 0, 0, 54,
688
- 0, 0, 54, 0, 0, 54, 0, 0,
689
- 54, 0, 0, 54, 0, 0, 54, 0,
690
- 0, 54, 0, 0, 0, 54, 0, 54,
691
- 0, 0, 0, 54, 0, 0, 54, 0,
692
- 0, 54, 0, 0, 54, 0, 0, 54,
693
- 0, 0, 54, 0, 0, 54, 0, 0,
694
- 54, 0, 0, 54, 0, 0, 54, 0,
695
- 0, 54, 0, 0, 54, 0, 0, 0,
696
- 54, 0, 0, 0, 54, 0, 54, 0,
697
- 0, 54, 0, 0, 54, 0, 0, 0,
698
- 43, 0, 0, 0, 43, 0, 43, 0,
699
- 43, 0, 43, 0, 43, 0, 43, 0,
700
- 43, 0, 43, 144, 57, 54, 0, 84,
701
- 84, 54, 0, 75, 33, 84, 75, 84,
702
- 84, 84, 84, 84, 0, 0, 0, 54,
703
- 0, 54, 0, 0, 54, 17, 0, 0,
704
- 54, 0, 54, 0, 0, 54, 0, 0,
705
- 54, 0, 0, 54, 0, 0, 54, 0,
706
- 0, 54, 0, 0, 54, 0, 0, 54,
707
- 0, 0, 54, 0, 0, 54, 0, 0,
708
- 54, 0, 0, 54, 0, 0, 54, 0,
709
- 0, 54, 17, 0, 54, 0, 0, 54,
710
- 0, 0, 54, 0, 0, 54, 0, 0,
711
- 0, 54, 0, 0, 0, 0, 54, 0,
712
- 54, 0, 0, 54, 0, 0, 54, 0,
713
- 0, 54, 0, 0, 54, 0, 0, 54,
714
- 0, 0, 54, 0, 0, 54, 17, 0,
715
- 54, 0, 0, 0, 0, 54, 0, 0,
716
- 0, 0, 54, 0, 54, 0, 0, 54,
717
- 0, 0, 54, 0, 0, 54, 0, 0,
718
- 54, 0, 0, 0, 54, 0, 54, 0,
719
- 0, 0, 0, 54, 0, 0, 54, 0,
720
- 0, 54, 0, 0, 0, 0, 54, 0,
721
- 0, 0, 54, 0, 54, 0, 0, 54,
722
- 0, 0, 54, 0, 0, 54, 0, 0,
723
- 54, 0, 0, 54, 0, 0, 54, 0,
724
- 0, 54, 0, 0, 54, 0, 0, 54,
725
- 0, 0, 0, 54, 0, 54, 0, 0,
726
- 0, 0, 54, 0, 0, 54, 0, 0,
727
- 54, 0, 0, 54, 0, 0, 54, 0,
728
- 0, 54, 0, 0, 54, 0, 0, 54,
729
- 0, 0, 54, 0, 0, 54, 0, 0,
730
- 54, 0, 0, 54, 0, 0, 0, 54,
731
- 0, 0, 0, 54, 0, 54, 0, 0,
732
- 54, 0, 0, 54, 0, 0, 0, 43,
733
- 0, 43, 0, 43, 0, 43, 0, 43,
734
- 0, 43, 0, 0, 43, 0, 43, 0,
735
- 43, 0, 43, 0, 43, 0, 43, 0,
736
- 43, 0, 43, 0, 43, 0, 43, 0,
737
- 43, 0, 43, 144, 57, 54, 0, 84,
738
- 84, 54, 0, 78, 33, 84, 78, 84,
739
- 84, 84, 84, 84, 0, 0, 0, 54,
740
- 0, 54, 0, 0, 54, 19, 0, 0,
741
- 54, 0, 54, 0, 0, 54, 0, 0,
742
- 54, 0, 0, 54, 0, 0, 54, 0,
743
- 0, 54, 0, 0, 54, 0, 0, 54,
744
- 0, 0, 54, 0, 0, 54, 0, 0,
745
- 54, 0, 0, 54, 0, 0, 54, 0,
746
- 0, 54, 19, 0, 54, 0, 0, 54,
747
- 0, 0, 54, 0, 0, 54, 0, 0,
748
- 0, 54, 0, 0, 0, 54, 0, 54,
749
- 0, 0, 54, 0, 0, 54, 0, 0,
750
- 0, 0, 54, 0, 0, 0, 0, 54,
751
- 0, 54, 0, 0, 54, 0, 0, 54,
752
- 0, 0, 54, 0, 0, 54, 0, 0,
753
- 0, 54, 0, 54, 0, 0, 0, 0,
754
- 54, 0, 0, 54, 0, 0, 54, 0,
755
- 0, 0, 0, 54, 0, 0, 0, 54,
756
- 0, 54, 0, 0, 54, 0, 0, 54,
757
- 0, 0, 54, 0, 0, 54, 0, 0,
758
- 54, 0, 0, 54, 0, 0, 54, 0,
759
- 0, 54, 0, 0, 54, 0, 0, 54,
760
- 19, 0, 0, 54, 0, 54, 0, 0,
761
- 0, 54, 0, 0, 54, 0, 0, 54,
762
- 0, 0, 54, 0, 0, 54, 0, 0,
763
- 54, 0, 0, 0, 0, 0, 43, 54,
764
- 37, 37, 87, 37, 37, 43, 0, 39,
765
- 0, 43, 0, 0, 54, 0, 0, 39,
766
- 0, 0, 96, 96, 54, 0, 93, 90,
767
- 41, 96, 90, 96, 96, 96, 96, 96,
768
- 96, 99, 0, 43, 0, 54, 0, 54,
769
- 0, 0, 54, 0, 0, 54, 0, 0,
770
- 54, 0, 0, 54, 0, 0, 54, 0,
771
- 0, 54, 0, 0, 54, 0, 0, 54,
772
- 0, 0, 54, 0, 0, 54, 0, 0,
773
- 54, 0, 0, 54, 0, 0, 54, 15,
774
- 0, 54, 0, 0, 54, 0, 0, 54,
775
- 0, 0, 54, 0, 0, 0, 54, 0,
776
- 0, 0, 54, 0, 54, 0, 0, 54,
777
- 0, 0, 54, 0, 0, 0, 0, 54,
778
- 0, 0, 0, 0, 54, 0, 54, 0,
779
- 0, 54, 0, 0, 54, 0, 0, 54,
780
- 0, 0, 54, 0, 0, 0, 54, 0,
781
- 54, 0, 0, 0, 0, 54, 0, 0,
782
- 54, 0, 0, 54, 0, 0, 0, 0,
783
- 54, 0, 0, 0, 54, 0, 54, 0,
784
- 0, 54, 0, 0, 54, 0, 0, 54,
785
- 0, 0, 54, 0, 0, 54, 0, 0,
786
- 54, 0, 0, 54, 0, 0, 54, 0,
787
- 0, 54, 0, 0, 54, 15, 0, 0,
788
- 54, 0, 54, 0, 0, 0, 0, 54,
789
- 0, 0, 54, 0, 0, 54, 0, 0,
790
- 54, 0, 0, 54, 0, 0, 54, 0,
791
- 0, 54, 0, 0, 54, 0, 0, 54,
792
- 0, 0, 54, 0, 0, 54, 0, 0,
793
- 54, 0, 0, 0, 54, 0, 0, 0,
794
- 54, 0, 54, 0, 0, 54, 0, 0,
795
- 54, 0, 0, 0, 43, 0, 43, 0,
796
- 0
797
- };
798
-
799
- static const unsigned char _lexer_eof_actions[] = {
800
- 0, 43, 43, 43, 43, 43, 43, 43,
801
- 43, 43, 43, 43, 43, 43, 43, 43,
802
- 43, 43, 43, 43, 43, 43, 43, 43,
803
- 43, 43, 43, 43, 43, 43, 43, 43,
804
- 43, 43, 43, 43, 43, 43, 43, 43,
805
- 43, 43, 43, 43, 43, 43, 43, 43,
806
- 43, 43, 43, 43, 43, 43, 43, 43,
807
- 43, 43, 43, 43, 43, 43, 43, 43,
808
- 43, 43, 43, 43, 43, 43, 43, 43,
809
- 43, 43, 43, 43, 43, 43, 43, 43,
810
- 43, 43, 43, 43, 43, 43, 43, 43,
811
- 43, 43, 43, 43, 43, 43, 43, 43,
812
- 43, 43, 43, 43, 43, 43, 43, 43,
813
- 43, 43, 43, 43, 43, 43, 43, 43,
814
- 43, 43, 43, 43, 43, 43, 43, 43,
815
- 43, 43, 43, 43, 43, 43, 43, 43,
816
- 43, 43, 43, 43, 43, 43, 43, 43,
817
- 43, 43, 43, 43, 43, 43, 43, 43,
818
- 43, 43, 43, 43, 43, 43, 43, 43,
819
- 43, 43, 43, 43, 43, 43, 43, 43,
820
- 43, 43, 43, 43, 43, 43, 43, 43,
821
- 43, 43, 43, 43, 43, 43, 43, 43,
822
- 43, 43, 43, 43, 43, 43, 43, 43,
823
- 43, 43, 43, 43, 43, 43, 43, 43,
824
- 43, 43, 43, 43, 43, 43, 43, 43,
825
- 43, 43, 43, 43, 43, 43, 43, 43,
826
- 43, 43, 43, 43, 43, 43, 43, 43,
827
- 43, 43, 43, 43, 43, 43, 43, 43,
828
- 43, 43, 43, 43, 43, 43, 43, 43,
829
- 43, 43, 43, 43, 43, 43, 43, 43,
830
- 43, 43, 43, 43, 43, 43, 43, 43,
831
- 43, 43, 43, 43, 43, 43, 43, 43,
832
- 43, 43, 43, 43, 43, 43, 43, 43,
833
- 43, 43, 43, 43, 43, 43, 43, 43,
834
- 43, 43, 43, 43, 43, 43, 43, 43,
835
- 43, 43, 43, 43, 43, 43, 43, 43,
836
- 43, 43, 43, 43, 43, 43, 43, 43,
837
- 43, 43, 43, 43, 43, 43, 43, 43,
838
- 43, 43, 43, 43, 43, 43, 43, 43,
839
- 43, 43, 43, 43, 43, 43, 43, 43,
840
- 43, 43, 43, 43, 43, 43, 43, 43,
841
- 43, 43, 43, 43, 43, 43, 43, 43,
842
- 43, 43, 43, 43, 43, 43, 43, 43,
843
- 43, 43, 43, 43, 43, 43, 43, 43,
844
- 43, 43, 43, 43, 43, 43, 43, 43,
845
- 43, 43, 43, 43, 43, 43, 43, 43,
846
- 43, 43, 43, 43, 43, 43, 43, 43,
847
- 43, 43, 43, 43, 43, 43, 43, 43,
848
- 43, 43, 43, 43, 43, 43, 43, 43,
849
- 43, 43, 43, 43, 43, 43, 43, 43,
850
- 43, 43, 43, 43, 43, 43, 43, 43,
851
- 43, 43, 43, 43, 43, 43, 43, 43,
852
- 43, 43, 43, 43, 43
853
- };
854
-
855
- static const int lexer_start = 1;
856
- static const int lexer_first_final = 420;
857
- static const int lexer_error = 0;
858
-
859
- static const int lexer_en_main = 1;
860
-
861
-
862
- #line 258 "ragel/i18n/ro.c.rl"
863
-
864
- static VALUE
865
- unindent(VALUE con, int start_col)
866
- {
867
- VALUE re;
868
- /* Gherkin will crash gracefully if the string representation of start_col pushes the pattern past 32 characters */
869
- char pat[32];
870
- snprintf(pat, 32, "^[\t ]{0,%d}", start_col);
871
- re = rb_reg_regcomp(rb_str_new2(pat));
872
- rb_funcall(con, rb_intern("gsub!"), 2, re, rb_str_new2(""));
873
-
874
- return Qnil;
875
-
876
- }
877
-
878
- static void
879
- store_kw_con(VALUE listener, const char * event_name,
880
- const char * keyword_at, size_t keyword_length,
881
- const char * at, size_t length,
882
- int current_line)
883
- {
884
- VALUE con = Qnil, kw = Qnil;
885
- kw = ENCODED_STR_NEW(keyword_at, keyword_length);
886
- con = ENCODED_STR_NEW(at, length);
887
- rb_funcall(con, rb_intern("strip!"), 0);
888
- rb_funcall(listener, rb_intern(event_name), 3, kw, con, INT2FIX(current_line));
889
- }
890
-
891
- static void
892
- store_multiline_kw_con(VALUE listener, const char * event_name,
893
- const char * keyword_at, size_t keyword_length,
894
- const char * at, size_t length,
895
- int current_line, int start_col)
896
- {
897
- VALUE split;
898
- VALUE con = Qnil, kw = Qnil, name = Qnil, desc = Qnil;
899
-
900
- kw = ENCODED_STR_NEW(keyword_at, keyword_length);
901
- con = ENCODED_STR_NEW(at, length);
902
-
903
- unindent(con, start_col);
904
-
905
- split = rb_str_split(con, "\n");
906
-
907
- name = rb_funcall(split, rb_intern("shift"), 0);
908
- desc = rb_ary_join(split, rb_str_new2( "\n" ));
909
-
910
- if( name == Qnil )
911
- {
912
- name = rb_str_new2("");
913
- }
914
- if( rb_funcall(desc, rb_intern("size"), 0) == 0)
915
- {
916
- desc = rb_str_new2("");
917
- }
918
- rb_funcall(name, rb_intern("strip!"), 0);
919
- rb_funcall(desc, rb_intern("rstrip!"), 0);
920
- rb_funcall(listener, rb_intern(event_name), 4, kw, name, desc, INT2FIX(current_line));
921
- }
922
-
923
- static void
924
- store_attr(VALUE listener, const char * attr_type,
925
- const char * at, size_t length,
926
- int line)
927
- {
928
- VALUE val = ENCODED_STR_NEW(at, length);
929
- rb_funcall(listener, rb_intern(attr_type), 2, val, INT2FIX(line));
930
- }
931
- static void
932
- store_docstring_content(VALUE listener,
933
- int start_col,
934
- const char *type_at, size_t type_length,
935
- const char *at, size_t length,
936
- int current_line)
937
- {
938
- VALUE re2;
939
- VALUE unescape_escaped_quotes;
940
- VALUE con = ENCODED_STR_NEW(at, length);
941
- VALUE con_type = ENCODED_STR_NEW(type_at, type_length);
942
-
943
- unindent(con, start_col);
944
-
945
- re2 = rb_reg_regcomp(rb_str_new2("\r\\Z"));
946
- unescape_escaped_quotes = rb_reg_regcomp(rb_str_new2("\\\\\"\\\\\"\\\\\""));
947
- rb_funcall(con, rb_intern("sub!"), 2, re2, rb_str_new2(""));
948
- rb_funcall(con_type, rb_intern("strip!"), 0);
949
- rb_funcall(con, rb_intern("gsub!"), 2, unescape_escaped_quotes, rb_str_new2("\"\"\""));
950
- rb_funcall(listener, rb_intern("doc_string"), 3, con_type, con, INT2FIX(current_line));
951
- }
952
- static void
953
- raise_lexer_error(const char * at, int line)
954
- {
955
- rb_raise(rb_eGherkinLexingError, "Lexing error on line %d: '%s'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information.", line, at);
956
- }
957
-
958
- static void lexer_init(lexer_state *lexer) {
959
- lexer->content_start = 0;
960
- lexer->content_end = 0;
961
- lexer->content_len = 0;
962
- lexer->docstring_content_type_start = 0;
963
- lexer->docstring_content_type_end = 0;
964
- lexer->mark = 0;
965
- lexer->keyword_start = 0;
966
- lexer->keyword_end = 0;
967
- lexer->next_keyword_start = 0;
968
- lexer->line_number = 1;
969
- lexer->last_newline = 0;
970
- lexer->final_newline = 0;
971
- lexer->start_col = 0;
972
- }
973
-
974
- static VALUE CLexer_alloc(VALUE klass)
975
- {
976
- VALUE obj;
977
- lexer_state *lxr = ALLOC(lexer_state);
978
- lexer_init(lxr);
979
-
980
- obj = Data_Wrap_Struct(klass, NULL, -1, lxr);
981
-
982
- return obj;
983
- }
984
-
985
- static VALUE CLexer_init(VALUE self, VALUE listener)
986
- {
987
- lexer_state *lxr;
988
- rb_iv_set(self, "@listener", listener);
989
-
990
- lxr = NULL;
991
- DATA_GET(self, lexer_state, lxr);
992
- lexer_init(lxr);
993
-
994
- return self;
995
- }
996
-
997
- static VALUE CLexer_scan(VALUE self, VALUE input)
998
- {
999
- VALUE input_copy;
1000
- char *data;
1001
- size_t len;
1002
- VALUE listener = rb_iv_get(self, "@listener");
1003
-
1004
- lexer_state *lexer;
1005
- lexer = NULL;
1006
- DATA_GET(self, lexer_state, lexer);
1007
-
1008
- input_copy = rb_str_dup(input);
1009
-
1010
- rb_str_append(input_copy, rb_str_new2("\n%_FEATURE_END_%"));
1011
- data = RSTRING_PTR(input_copy);
1012
- len = RSTRING_LEN(input_copy);
1013
-
1014
- if (len == 0) {
1015
- rb_raise(rb_eGherkinLexingError, "No content to lex.");
1016
- } else {
1017
-
1018
- const char *p, *pe, *eof;
1019
- int cs = 0;
1020
-
1021
- VALUE current_row = Qnil;
1022
-
1023
- p = data;
1024
- pe = data + len;
1025
- eof = pe;
1026
-
1027
- assert(*pe == '\0' && "pointer does not end on NULL");
1028
-
1029
-
1030
- #line 1031 "ext/gherkin_lexer_ro/gherkin_lexer_ro.c"
1031
- {
1032
- cs = lexer_start;
1033
- }
1034
-
1035
- #line 425 "ragel/i18n/ro.c.rl"
1036
-
1037
- #line 1038 "ext/gherkin_lexer_ro/gherkin_lexer_ro.c"
1038
- {
1039
- int _klen;
1040
- unsigned int _trans;
1041
- const char *_acts;
1042
- unsigned int _nacts;
1043
- const char *_keys;
1044
-
1045
- if ( p == pe )
1046
- goto _test_eof;
1047
- if ( cs == 0 )
1048
- goto _out;
1049
- _resume:
1050
- _keys = _lexer_trans_keys + _lexer_key_offsets[cs];
1051
- _trans = _lexer_index_offsets[cs];
1052
-
1053
- _klen = _lexer_single_lengths[cs];
1054
- if ( _klen > 0 ) {
1055
- const char *_lower = _keys;
1056
- const char *_mid;
1057
- const char *_upper = _keys + _klen - 1;
1058
- while (1) {
1059
- if ( _upper < _lower )
1060
- break;
1061
-
1062
- _mid = _lower + ((_upper-_lower) >> 1);
1063
- if ( (*p) < *_mid )
1064
- _upper = _mid - 1;
1065
- else if ( (*p) > *_mid )
1066
- _lower = _mid + 1;
1067
- else {
1068
- _trans += (unsigned int)(_mid - _keys);
1069
- goto _match;
1070
- }
1071
- }
1072
- _keys += _klen;
1073
- _trans += _klen;
1074
- }
1075
-
1076
- _klen = _lexer_range_lengths[cs];
1077
- if ( _klen > 0 ) {
1078
- const char *_lower = _keys;
1079
- const char *_mid;
1080
- const char *_upper = _keys + (_klen<<1) - 2;
1081
- while (1) {
1082
- if ( _upper < _lower )
1083
- break;
1084
-
1085
- _mid = _lower + (((_upper-_lower) >> 1) & ~1);
1086
- if ( (*p) < _mid[0] )
1087
- _upper = _mid - 2;
1088
- else if ( (*p) > _mid[1] )
1089
- _lower = _mid + 2;
1090
- else {
1091
- _trans += (unsigned int)((_mid - _keys)>>1);
1092
- goto _match;
1093
- }
1094
- }
1095
- _trans += _klen;
1096
- }
1097
-
1098
- _match:
1099
- cs = _lexer_trans_targs[_trans];
1100
-
1101
- if ( _lexer_trans_actions[_trans] == 0 )
1102
- goto _again;
1103
-
1104
- _acts = _lexer_actions + _lexer_trans_actions[_trans];
1105
- _nacts = (unsigned int) *_acts++;
1106
- while ( _nacts-- > 0 )
1107
- {
1108
- switch ( *_acts++ )
1109
- {
1110
- case 0:
1111
- #line 83 "ragel/i18n/ro.c.rl"
1112
- {
1113
- MARK(content_start, p);
1114
- lexer->current_line = lexer->line_number;
1115
- lexer->start_col = lexer->content_start - lexer->last_newline - (lexer->keyword_end - lexer->keyword_start) + 2;
1116
- }
1117
- break;
1118
- case 1:
1119
- #line 89 "ragel/i18n/ro.c.rl"
1120
- {
1121
- MARK(content_start, p);
1122
- }
1123
- break;
1124
- case 2:
1125
- #line 93 "ragel/i18n/ro.c.rl"
1126
- {
1127
- lexer->current_line = lexer->line_number;
1128
- lexer->start_col = p - data - lexer->last_newline;
1129
- }
1130
- break;
1131
- case 3:
1132
- #line 98 "ragel/i18n/ro.c.rl"
1133
- {
1134
- int len = LEN(content_start, PTR_TO(final_newline));
1135
- int type_len = LEN(docstring_content_type_start, PTR_TO(docstring_content_type_end));
1136
-
1137
- if (len < 0) len = 0;
1138
- if (type_len < 0) len = 0;
1139
-
1140
- store_docstring_content(listener, lexer->start_col, PTR_TO(docstring_content_type_start), type_len, PTR_TO(content_start), len, lexer->current_line);
1141
- }
1142
- break;
1143
- case 4:
1144
- #line 108 "ragel/i18n/ro.c.rl"
1145
- {
1146
- MARK(docstring_content_type_start, p);
1147
- }
1148
- break;
1149
- case 5:
1150
- #line 112 "ragel/i18n/ro.c.rl"
1151
- {
1152
- MARK(docstring_content_type_end, p);
1153
- }
1154
- break;
1155
- case 6:
1156
- #line 116 "ragel/i18n/ro.c.rl"
1157
- {
1158
- STORE_KW_END_CON(feature);
1159
- }
1160
- break;
1161
- case 7:
1162
- #line 120 "ragel/i18n/ro.c.rl"
1163
- {
1164
- STORE_KW_END_CON(background);
1165
- }
1166
- break;
1167
- case 8:
1168
- #line 124 "ragel/i18n/ro.c.rl"
1169
- {
1170
- STORE_KW_END_CON(scenario);
1171
- }
1172
- break;
1173
- case 9:
1174
- #line 128 "ragel/i18n/ro.c.rl"
1175
- {
1176
- STORE_KW_END_CON(scenario_outline);
1177
- }
1178
- break;
1179
- case 10:
1180
- #line 132 "ragel/i18n/ro.c.rl"
1181
- {
1182
- STORE_KW_END_CON(examples);
1183
- }
1184
- break;
1185
- case 11:
1186
- #line 136 "ragel/i18n/ro.c.rl"
1187
- {
1188
- store_kw_con(listener, "step",
1189
- PTR_TO(keyword_start), LEN(keyword_start, PTR_TO(keyword_end)),
1190
- PTR_TO(content_start), LEN(content_start, p),
1191
- lexer->current_line);
1192
- }
1193
- break;
1194
- case 12:
1195
- #line 143 "ragel/i18n/ro.c.rl"
1196
- {
1197
- STORE_ATTR(comment);
1198
- lexer->mark = 0;
1199
- }
1200
- break;
1201
- case 13:
1202
- #line 148 "ragel/i18n/ro.c.rl"
1203
- {
1204
- STORE_ATTR(tag);
1205
- lexer->mark = 0;
1206
- }
1207
- break;
1208
- case 14:
1209
- #line 153 "ragel/i18n/ro.c.rl"
1210
- {
1211
- lexer->line_number += 1;
1212
- MARK(final_newline, p);
1213
- }
1214
- break;
1215
- case 15:
1216
- #line 158 "ragel/i18n/ro.c.rl"
1217
- {
1218
- MARK(last_newline, p + 1);
1219
- }
1220
- break;
1221
- case 16:
1222
- #line 162 "ragel/i18n/ro.c.rl"
1223
- {
1224
- if (lexer->mark == 0) {
1225
- MARK(mark, p);
1226
- }
1227
- }
1228
- break;
1229
- case 17:
1230
- #line 168 "ragel/i18n/ro.c.rl"
1231
- {
1232
- MARK(keyword_end, p);
1233
- MARK(keyword_start, PTR_TO(mark));
1234
- MARK(content_start, p + 1);
1235
- lexer->mark = 0;
1236
- }
1237
- break;
1238
- case 18:
1239
- #line 175 "ragel/i18n/ro.c.rl"
1240
- {
1241
- MARK(content_end, p);
1242
- }
1243
- break;
1244
- case 19:
1245
- #line 179 "ragel/i18n/ro.c.rl"
1246
- {
1247
- p = p - 1;
1248
- lexer->current_line = lexer->line_number;
1249
- current_row = rb_ary_new();
1250
- }
1251
- break;
1252
- case 20:
1253
- #line 185 "ragel/i18n/ro.c.rl"
1254
- {
1255
- MARK(content_start, p);
1256
- }
1257
- break;
1258
- case 21:
1259
- #line 189 "ragel/i18n/ro.c.rl"
1260
- {
1261
- VALUE re_pipe, re_newline, re_backslash;
1262
- VALUE con = ENCODED_STR_NEW(PTR_TO(content_start), LEN(content_start, p));
1263
- rb_funcall(con, rb_intern("strip!"), 0);
1264
- re_pipe = rb_reg_regcomp(rb_str_new2("\\\\\\|"));
1265
- re_newline = rb_reg_regcomp(rb_str_new2("\\\\n"));
1266
- re_backslash = rb_reg_regcomp(rb_str_new2("\\\\\\\\"));
1267
- rb_funcall(con, rb_intern("gsub!"), 2, re_pipe, rb_str_new2("|"));
1268
- rb_funcall(con, rb_intern("gsub!"), 2, re_newline, rb_str_new2("\n"));
1269
- rb_funcall(con, rb_intern("gsub!"), 2, re_backslash, rb_str_new2("\\"));
1270
-
1271
- rb_ary_push(current_row, con);
1272
- }
1273
- break;
1274
- case 22:
1275
- #line 203 "ragel/i18n/ro.c.rl"
1276
- {
1277
- rb_funcall(listener, rb_intern("row"), 2, current_row, INT2FIX(lexer->current_line));
1278
- }
1279
- break;
1280
- case 23:
1281
- #line 207 "ragel/i18n/ro.c.rl"
1282
- {
1283
- int line;
1284
- if (cs < lexer_first_final) {
1285
- size_t count = 0;
1286
- VALUE newstr_val;
1287
- char *newstr;
1288
- int newstr_count = 0;
1289
- size_t len;
1290
- const char *buff;
1291
- if (lexer->last_newline != 0) {
1292
- len = LEN(last_newline, eof);
1293
- buff = PTR_TO(last_newline);
1294
- } else {
1295
- len = strlen(data);
1296
- buff = data;
1297
- }
1298
-
1299
- /* Allocate as a ruby string so that it gets cleaned up by GC */
1300
- newstr_val = rb_str_new(buff, len);
1301
- newstr = RSTRING_PTR(newstr_val);
1302
-
1303
-
1304
- for (count = 0; count < len; count++) {
1305
- if(buff[count] == 10) {
1306
- newstr[newstr_count] = '\0'; /* terminate new string at first newline found */
1307
- break;
1308
- } else {
1309
- if (buff[count] == '%') {
1310
- newstr[newstr_count++] = buff[count];
1311
- newstr[newstr_count] = buff[count];
1312
- } else {
1313
- newstr[newstr_count] = buff[count];
1314
- }
1315
- }
1316
- newstr_count++;
1317
- }
1318
-
1319
- line = lexer->line_number;
1320
- lexer_init(lexer); /* Re-initialize so we can scan again with the same lexer */
1321
- raise_lexer_error(newstr, line);
1322
- } else {
1323
- rb_funcall(listener, rb_intern("eof"), 0);
1324
- }
1325
- }
1326
- break;
1327
- #line 1328 "ext/gherkin_lexer_ro/gherkin_lexer_ro.c"
1328
- }
1329
- }
1330
-
1331
- _again:
1332
- if ( cs == 0 )
1333
- goto _out;
1334
- if ( ++p != pe )
1335
- goto _resume;
1336
- _test_eof: {}
1337
- if ( p == eof )
1338
- {
1339
- const char *__acts = _lexer_actions + _lexer_eof_actions[cs];
1340
- unsigned int __nacts = (unsigned int) *__acts++;
1341
- while ( __nacts-- > 0 ) {
1342
- switch ( *__acts++ ) {
1343
- case 23:
1344
- #line 207 "ragel/i18n/ro.c.rl"
1345
- {
1346
- int line;
1347
- if (cs < lexer_first_final) {
1348
- size_t count = 0;
1349
- VALUE newstr_val;
1350
- char *newstr;
1351
- int newstr_count = 0;
1352
- size_t len;
1353
- const char *buff;
1354
- if (lexer->last_newline != 0) {
1355
- len = LEN(last_newline, eof);
1356
- buff = PTR_TO(last_newline);
1357
- } else {
1358
- len = strlen(data);
1359
- buff = data;
1360
- }
1361
-
1362
- /* Allocate as a ruby string so that it gets cleaned up by GC */
1363
- newstr_val = rb_str_new(buff, len);
1364
- newstr = RSTRING_PTR(newstr_val);
1365
-
1366
-
1367
- for (count = 0; count < len; count++) {
1368
- if(buff[count] == 10) {
1369
- newstr[newstr_count] = '\0'; /* terminate new string at first newline found */
1370
- break;
1371
- } else {
1372
- if (buff[count] == '%') {
1373
- newstr[newstr_count++] = buff[count];
1374
- newstr[newstr_count] = buff[count];
1375
- } else {
1376
- newstr[newstr_count] = buff[count];
1377
- }
1378
- }
1379
- newstr_count++;
1380
- }
1381
-
1382
- line = lexer->line_number;
1383
- lexer_init(lexer); /* Re-initialize so we can scan again with the same lexer */
1384
- raise_lexer_error(newstr, line);
1385
- } else {
1386
- rb_funcall(listener, rb_intern("eof"), 0);
1387
- }
1388
- }
1389
- break;
1390
- #line 1391 "ext/gherkin_lexer_ro/gherkin_lexer_ro.c"
1391
- }
1392
- }
1393
- }
1394
-
1395
- _out: {}
1396
- }
1397
-
1398
- #line 426 "ragel/i18n/ro.c.rl"
1399
-
1400
- assert(p <= pe && "data overflow after parsing execute");
1401
- assert(lexer->content_start <= len && "content starts after data end");
1402
- assert(lexer->mark < len && "mark is after data end");
1403
-
1404
- /* Reset lexer by re-initializing the whole thing */
1405
- lexer_init(lexer);
1406
-
1407
- if (cs == lexer_error) {
1408
- rb_raise(rb_eGherkinLexingError, "Invalid format, lexing fails.");
1409
- } else {
1410
- return Qtrue;
1411
- }
1412
- }
1413
- }
1414
-
1415
- void Init_gherkin_lexer_ro()
1416
- {
1417
- mGherkin = rb_define_module("Gherkin");
1418
- mGherkinLexer = rb_define_module_under(mGherkin, "Lexer");
1419
- rb_eGherkinLexingError = rb_const_get(mGherkinLexer, rb_intern("LexingError"));
1420
-
1421
- mCLexer = rb_define_module_under(mGherkin, "CLexer");
1422
- cI18nLexer = rb_define_class_under(mCLexer, "Ro", rb_cObject);
1423
- rb_define_alloc_func(cI18nLexer, CLexer_alloc);
1424
- rb_define_method(cI18nLexer, "initialize", CLexer_init, 1);
1425
- rb_define_method(cI18nLexer, "scan", CLexer_scan, 1);
1426
- }
1427
-