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