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