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