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