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