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