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