@port-labs/jq-node-bindings 1.0.4 → 1.1.0-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (352) hide show
  1. package/.claude/settings.local.json +12 -0
  2. package/configure +6 -5
  3. package/deps/jq/.claude/settings.local.json +7 -0
  4. package/deps/jq/.gitattributes +1 -3
  5. package/deps/jq/AUTHORS +55 -1
  6. package/deps/jq/COPYING +40 -0
  7. package/deps/jq/Makefile.am +40 -36
  8. package/deps/jq/NEWS.md +277 -2
  9. package/deps/jq/README.md +23 -5
  10. package/deps/jq/compile-ios.sh +1 -1
  11. package/deps/jq/config/m4/check-math-func.m4 +2 -2
  12. package/deps/jq/config/m4/find-func-no-libs2.m4 +3 -3
  13. package/deps/jq/configure.ac +10 -18
  14. package/deps/jq/docs/Pipfile.lock +368 -313
  15. package/deps/jq/docs/README.md +3 -4
  16. package/deps/jq/docs/build_manpage.py +1 -1
  17. package/deps/jq/docs/build_mantests.py +1 -1
  18. package/deps/jq/docs/build_website.py +1 -8
  19. package/deps/jq/docs/content/download/default.yml +49 -9
  20. package/deps/jq/docs/content/index.yml +9 -0
  21. package/deps/jq/docs/content/manual/{manual.yml → dev/manual.yml} +218 -61
  22. package/deps/jq/docs/content/manual/v1.3/manual.yml +0 -5
  23. package/deps/jq/docs/content/manual/v1.4/manual.yml +0 -5
  24. package/deps/jq/docs/content/manual/v1.5/manual.yml +3 -8
  25. package/deps/jq/docs/content/manual/v1.6/manual.yml +3 -8
  26. package/deps/jq/docs/content/manual/v1.7/manual.yml +499 -500
  27. package/deps/jq/docs/content/manual/v1.8/manual.yml +3858 -0
  28. package/deps/jq/docs/content/tutorial/default.yml +3 -3
  29. package/deps/jq/docs/manual_schema.yml +0 -3
  30. package/deps/jq/docs/public/CNAME +1 -0
  31. package/deps/jq/docs/templates/index.html.j2 +10 -10
  32. package/deps/jq/docs/templates/manual.html.j2 +14 -3
  33. package/deps/jq/docs/templates/shared/_head.html.j2 +8 -3
  34. package/deps/jq/docs/templates/shared/_navbar.html.j2 +4 -4
  35. package/deps/jq/jq.1.prebuilt +219 -44
  36. package/deps/jq/jq.spec +2 -2
  37. package/deps/jq/libjq.pc.in +1 -1
  38. package/deps/jq/scripts/version +1 -1
  39. package/deps/jq/sig/v1.7.1/jq-1.7.1.tar.gz.asc +16 -0
  40. package/deps/jq/sig/v1.7.1/jq-1.7.1.zip.asc +16 -0
  41. package/deps/jq/sig/v1.7.1/jq-linux-amd64.asc +16 -0
  42. package/deps/jq/sig/v1.7.1/jq-linux-arm64.asc +16 -0
  43. package/deps/jq/sig/v1.7.1/jq-linux-armel.asc +16 -0
  44. package/deps/jq/sig/v1.7.1/jq-linux-armhf.asc +16 -0
  45. package/deps/jq/sig/v1.7.1/jq-linux-i386.asc +16 -0
  46. package/deps/jq/sig/v1.7.1/jq-linux-mips.asc +16 -0
  47. package/deps/jq/sig/v1.7.1/jq-linux-mips64.asc +16 -0
  48. package/deps/jq/sig/v1.7.1/jq-linux-mips64el.asc +16 -0
  49. package/deps/jq/sig/v1.7.1/jq-linux-mips64r6.asc +16 -0
  50. package/deps/jq/sig/v1.7.1/jq-linux-mips64r6el.asc +16 -0
  51. package/deps/jq/sig/v1.7.1/jq-linux-mipsel.asc +16 -0
  52. package/deps/jq/sig/v1.7.1/jq-linux-mipsr6.asc +16 -0
  53. package/deps/jq/sig/v1.7.1/jq-linux-mipsr6el.asc +16 -0
  54. package/deps/jq/sig/v1.7.1/jq-linux-powerpc.asc +16 -0
  55. package/deps/jq/sig/v1.7.1/jq-linux-ppc64el.asc +16 -0
  56. package/deps/jq/sig/v1.7.1/jq-linux-riscv64.asc +16 -0
  57. package/deps/jq/sig/v1.7.1/jq-linux-s390x.asc +16 -0
  58. package/deps/jq/sig/v1.7.1/jq-linux64.asc +16 -0
  59. package/deps/jq/sig/v1.7.1/jq-macos-amd64.asc +16 -0
  60. package/deps/jq/sig/v1.7.1/jq-macos-arm64.asc +16 -0
  61. package/deps/jq/sig/v1.7.1/jq-osx-amd64.asc +16 -0
  62. package/deps/jq/sig/v1.7.1/jq-win64.exe.asc +16 -0
  63. package/deps/jq/sig/v1.7.1/jq-windows-amd64.exe.asc +16 -0
  64. package/deps/jq/sig/v1.7.1/jq-windows-i386.exe.asc +16 -0
  65. package/deps/jq/sig/v1.7.1/sha256sum.txt +26 -0
  66. package/deps/jq/sig/v1.8.0/jq-1.8.0.tar.gz.asc +16 -0
  67. package/deps/jq/sig/v1.8.0/jq-1.8.0.zip.asc +16 -0
  68. package/deps/jq/sig/v1.8.0/jq-linux-amd64.asc +16 -0
  69. package/deps/jq/sig/v1.8.0/jq-linux-arm64.asc +16 -0
  70. package/deps/jq/sig/v1.8.0/jq-linux-armel.asc +16 -0
  71. package/deps/jq/sig/v1.8.0/jq-linux-armhf.asc +16 -0
  72. package/deps/jq/sig/v1.8.0/jq-linux-i386.asc +16 -0
  73. package/deps/jq/sig/v1.8.0/jq-linux-mips.asc +16 -0
  74. package/deps/jq/sig/v1.8.0/jq-linux-mips64.asc +16 -0
  75. package/deps/jq/sig/v1.8.0/jq-linux-mips64el.asc +16 -0
  76. package/deps/jq/sig/v1.8.0/jq-linux-mips64r6.asc +16 -0
  77. package/deps/jq/sig/v1.8.0/jq-linux-mips64r6el.asc +16 -0
  78. package/deps/jq/sig/v1.8.0/jq-linux-mipsel.asc +16 -0
  79. package/deps/jq/sig/v1.8.0/jq-linux-mipsr6.asc +16 -0
  80. package/deps/jq/sig/v1.8.0/jq-linux-mipsr6el.asc +16 -0
  81. package/deps/jq/sig/v1.8.0/jq-linux-powerpc.asc +16 -0
  82. package/deps/jq/sig/v1.8.0/jq-linux-ppc64el.asc +16 -0
  83. package/deps/jq/sig/v1.8.0/jq-linux-riscv64.asc +16 -0
  84. package/deps/jq/sig/v1.8.0/jq-linux-s390x.asc +16 -0
  85. package/deps/jq/sig/v1.8.0/jq-linux64.asc +16 -0
  86. package/deps/jq/sig/v1.8.0/jq-macos-amd64.asc +16 -0
  87. package/deps/jq/sig/v1.8.0/jq-macos-arm64.asc +16 -0
  88. package/deps/jq/sig/v1.8.0/jq-osx-amd64.asc +16 -0
  89. package/deps/jq/sig/v1.8.0/jq-win64.exe.asc +16 -0
  90. package/deps/jq/sig/v1.8.0/jq-windows-amd64.exe.asc +16 -0
  91. package/deps/jq/sig/v1.8.0/jq-windows-i386.exe.asc +16 -0
  92. package/deps/jq/sig/v1.8.0/sha256sum.txt +26 -0
  93. package/deps/jq/src/builtin.c +446 -271
  94. package/deps/jq/src/builtin.jq +25 -60
  95. package/deps/jq/src/bytecode.h +8 -3
  96. package/deps/jq/src/compile.c +22 -43
  97. package/deps/jq/src/compile.h +1 -1
  98. package/deps/jq/src/execute.c +20 -25
  99. package/deps/jq/src/jq_test.c +113 -44
  100. package/deps/jq/src/jv.c +134 -42
  101. package/deps/jq/src/jv.h +10 -3
  102. package/deps/jq/src/jv_alloc.c +8 -5
  103. package/deps/jq/src/jv_alloc.h +0 -1
  104. package/deps/jq/src/jv_aux.c +41 -8
  105. package/deps/jq/src/jv_dtoa.c +4 -12
  106. package/deps/jq/src/jv_dtoa_tsd.c +5 -4
  107. package/deps/jq/src/jv_dtoa_tsd.h +1 -1
  108. package/deps/jq/src/jv_parse.c +5 -3
  109. package/deps/jq/src/jv_print.c +87 -65
  110. package/deps/jq/src/jv_unicode.c +18 -0
  111. package/deps/jq/src/jv_unicode.h +2 -0
  112. package/deps/jq/src/lexer.c +303 -278
  113. package/deps/jq/src/lexer.h +5 -4
  114. package/deps/jq/src/lexer.l +8 -2
  115. package/deps/jq/src/libm.h +15 -5
  116. package/deps/jq/src/linker.c +6 -4
  117. package/deps/jq/src/locfile.c +12 -12
  118. package/deps/jq/src/main.c +204 -270
  119. package/deps/jq/src/parser.c +1105 -1273
  120. package/deps/jq/src/parser.y +149 -181
  121. package/deps/jq/src/util.c +46 -48
  122. package/deps/jq/src/util.h +1 -1
  123. package/deps/jq/tests/base64.test +12 -0
  124. package/deps/jq/tests/jq.test +429 -37
  125. package/deps/jq/tests/jq_fuzz_load_file.c +1 -0
  126. package/deps/jq/tests/man.test +46 -13
  127. package/deps/jq/tests/manonig.test +13 -0
  128. package/deps/jq/tests/onig.test +40 -2
  129. package/deps/jq/tests/optional.test +4 -12
  130. package/deps/jq/tests/setup +5 -1
  131. package/deps/jq/tests/shtest +358 -130
  132. package/deps/jq/tests/uri.test +38 -0
  133. package/deps/jq/tests/uritest +5 -0
  134. package/deps/jq/{src → vendor}/decNumber/decBasic.c +1 -1
  135. package/deps/jq/{src → vendor}/decNumber/decCommon.c +1 -1
  136. package/deps/jq/{src → vendor}/decNumber/decNumber.c +4 -4
  137. package/deps/jq/{modules → vendor}/oniguruma/CMakeLists.txt +5 -3
  138. package/deps/jq/{modules → vendor}/oniguruma/HISTORY +45 -7
  139. package/deps/jq/{modules → vendor}/oniguruma/Makefile.am +1 -1
  140. package/deps/jq/{modules → vendor}/oniguruma/README.md +10 -23
  141. package/deps/jq/{modules → vendor}/oniguruma/compile +29 -13
  142. package/deps/jq/{modules → vendor}/oniguruma/config.guess +91 -27
  143. package/deps/jq/{modules → vendor}/oniguruma/config.sub +716 -242
  144. package/deps/jq/{modules → vendor}/oniguruma/configure.ac +2 -2
  145. package/deps/jq/{modules → vendor}/oniguruma/depcomp +10 -9
  146. package/deps/jq/{modules → vendor}/oniguruma/doc/API +3 -1
  147. package/deps/jq/{modules → vendor}/oniguruma/doc/API.ja +3 -1
  148. package/deps/jq/{modules → vendor}/oniguruma/doc/CALLOUTS.BUILTIN +10 -1
  149. package/deps/jq/{modules → vendor}/oniguruma/doc/CALLOUTS.BUILTIN.ja +9 -1
  150. package/deps/jq/{modules → vendor}/oniguruma/doc/RE +12 -13
  151. package/deps/jq/{modules → vendor}/oniguruma/doc/RE.ja +12 -13
  152. package/deps/jq/{modules → vendor}/oniguruma/doc/SYNTAX.md +202 -167
  153. package/deps/jq/{modules → vendor}/oniguruma/doc/UNICODE_PROPERTIES +33 -1
  154. package/deps/jq/vendor/oniguruma/doc/onig_syn_md.c +667 -0
  155. package/deps/jq/{modules → vendor}/oniguruma/harnesses/base.c +1 -1
  156. package/deps/jq/{modules → vendor}/oniguruma/install-sh +9 -9
  157. package/deps/jq/{modules → vendor}/oniguruma/missing +50 -29
  158. package/deps/jq/{modules → vendor}/oniguruma/sample/callback_each_match.c +1 -3
  159. package/deps/jq/vendor/oniguruma/sbom.cdx.json +44 -0
  160. package/deps/jq/{modules → vendor}/oniguruma/src/ascii.c +4 -1
  161. package/deps/jq/{modules → vendor}/oniguruma/src/gperf_fold_key_conv.py +4 -4
  162. package/deps/jq/{modules → vendor}/oniguruma/src/gperf_unfold_key_conv.py +4 -4
  163. package/deps/jq/vendor/oniguruma/src/make_unicode_egcb.sh +7 -0
  164. package/deps/jq/{modules → vendor}/oniguruma/src/make_unicode_egcb_data.py +20 -19
  165. package/deps/jq/{modules → vendor}/oniguruma/src/make_unicode_fold.sh +5 -5
  166. package/deps/jq/{modules → vendor}/oniguruma/src/make_unicode_fold_data.py +37 -37
  167. package/deps/jq/{modules → vendor}/oniguruma/src/make_unicode_property.sh +2 -2
  168. package/deps/jq/{modules → vendor}/oniguruma/src/make_unicode_property_data.py +66 -65
  169. package/deps/jq/vendor/oniguruma/src/make_unicode_wb.sh +7 -0
  170. package/deps/jq/{modules → vendor}/oniguruma/src/make_unicode_wb_data.py +20 -19
  171. package/deps/jq/{modules → vendor}/oniguruma/src/oniguruma.h +6 -3
  172. package/deps/jq/{modules → vendor}/oniguruma/src/regcomp.c +14 -6
  173. package/deps/jq/{modules → vendor}/oniguruma/src/regerror.c +2 -2
  174. package/deps/jq/{modules → vendor}/oniguruma/src/regexec.c +85 -14
  175. package/deps/jq/{modules → vendor}/oniguruma/src/regint.h +17 -4
  176. package/deps/jq/{modules → vendor}/oniguruma/src/regparse.c +115 -27
  177. package/deps/jq/{modules → vendor}/oniguruma/src/regsyntax.c +10 -7
  178. package/deps/jq/{modules → vendor}/oniguruma/src/st.c +49 -75
  179. package/deps/jq/{modules → vendor}/oniguruma/src/st.h +3 -10
  180. package/deps/jq/{modules → vendor}/oniguruma/src/unicode_egcb_data.c +54 -49
  181. package/deps/jq/{modules → vendor}/oniguruma/src/unicode_fold1_key.c +1567 -1507
  182. package/deps/jq/{modules → vendor}/oniguruma/src/unicode_fold2_key.c +1 -1
  183. package/deps/jq/{modules → vendor}/oniguruma/src/unicode_fold3_key.c +1 -1
  184. package/deps/jq/vendor/oniguruma/src/unicode_fold_data.c +1619 -0
  185. package/deps/jq/{modules → vendor}/oniguruma/src/unicode_property_data.c +5520 -4178
  186. package/deps/jq/{modules → vendor}/oniguruma/src/unicode_property_data_posix.c +239 -83
  187. package/deps/jq/vendor/oniguruma/src/unicode_unfold_key.c +3497 -0
  188. package/deps/jq/{modules → vendor}/oniguruma/src/unicode_wb_data.c +51 -19
  189. package/deps/jq/{modules → vendor}/oniguruma/src/utf16_be.c +3 -2
  190. package/deps/jq/{modules → vendor}/oniguruma/src/utf16_le.c +3 -2
  191. package/deps/jq/{modules → vendor}/oniguruma/test/test_back.c +3 -3
  192. package/deps/jq/{modules → vendor}/oniguruma/test/test_options.c +2 -2
  193. package/deps/jq/{modules → vendor}/oniguruma/test/test_syntax.c +54 -2
  194. package/deps/jq/{modules → vendor}/oniguruma/test/test_utf8.c +19 -5
  195. package/deps/jq/{modules → vendor}/oniguruma/test/testc.c +1 -1
  196. package/deps/jq/{modules → vendor}/oniguruma/test/testp.c +1 -1
  197. package/deps/jq/{modules → vendor}/oniguruma/test-driver +13 -6
  198. package/deps/jq/{modules → vendor}/oniguruma/windows/CMakeLists.txt +1 -1
  199. package/index.d.ts +2 -1
  200. package/lib/index.js +1 -0
  201. package/lib/jq.js +2 -1
  202. package/package.json +4 -3
  203. package/test/santiy-async.test.js +4 -4
  204. package/test/santiy.test.js +4 -4
  205. package/test/template.test.js +6 -6
  206. package/deps/jq/modules/oniguruma/src/make_unicode_egcb.sh +0 -7
  207. package/deps/jq/modules/oniguruma/src/make_unicode_wb.sh +0 -7
  208. package/deps/jq/modules/oniguruma/src/unicode_fold_data.c +0 -1592
  209. package/deps/jq/modules/oniguruma/src/unicode_unfold_key.c +0 -3394
  210. package/deps/jq/scripts/update-website +0 -30
  211. /package/deps/jq/{src → vendor}/decNumber/ICU-license.html +0 -0
  212. /package/deps/jq/{src → vendor}/decNumber/decContext.c +0 -0
  213. /package/deps/jq/{src → vendor}/decNumber/decContext.h +0 -0
  214. /package/deps/jq/{src → vendor}/decNumber/decDPD.h +0 -0
  215. /package/deps/jq/{src → vendor}/decNumber/decDouble.c +0 -0
  216. /package/deps/jq/{src → vendor}/decNumber/decDouble.h +0 -0
  217. /package/deps/jq/{src → vendor}/decNumber/decNumber.h +0 -0
  218. /package/deps/jq/{src → vendor}/decNumber/decNumberLocal.h +0 -0
  219. /package/deps/jq/{src → vendor}/decNumber/decPacked.c +0 -0
  220. /package/deps/jq/{src → vendor}/decNumber/decPacked.h +0 -0
  221. /package/deps/jq/{src → vendor}/decNumber/decQuad.c +0 -0
  222. /package/deps/jq/{src → vendor}/decNumber/decQuad.h +0 -0
  223. /package/deps/jq/{src → vendor}/decNumber/decSingle.c +0 -0
  224. /package/deps/jq/{src → vendor}/decNumber/decSingle.h +0 -0
  225. /package/deps/jq/{src → vendor}/decNumber/decimal128.c +0 -0
  226. /package/deps/jq/{src → vendor}/decNumber/decimal128.h +0 -0
  227. /package/deps/jq/{src → vendor}/decNumber/decimal32.c +0 -0
  228. /package/deps/jq/{src → vendor}/decNumber/decimal32.h +0 -0
  229. /package/deps/jq/{src → vendor}/decNumber/decimal64.c +0 -0
  230. /package/deps/jq/{src → vendor}/decNumber/decimal64.h +0 -0
  231. /package/deps/jq/{src → vendor}/decNumber/decnumber.pdf +0 -0
  232. /package/deps/jq/{src → vendor}/decNumber/example1.c +0 -0
  233. /package/deps/jq/{src → vendor}/decNumber/example2.c +0 -0
  234. /package/deps/jq/{src → vendor}/decNumber/example3.c +0 -0
  235. /package/deps/jq/{src → vendor}/decNumber/example4.c +0 -0
  236. /package/deps/jq/{src → vendor}/decNumber/example5.c +0 -0
  237. /package/deps/jq/{src → vendor}/decNumber/example6.c +0 -0
  238. /package/deps/jq/{src → vendor}/decNumber/example7.c +0 -0
  239. /package/deps/jq/{src → vendor}/decNumber/example8.c +0 -0
  240. /package/deps/jq/{src → vendor}/decNumber/readme.txt +0 -0
  241. /package/deps/jq/{modules → vendor}/oniguruma/.travis.yml +0 -0
  242. /package/deps/jq/{modules → vendor}/oniguruma/AUTHORS +0 -0
  243. /package/deps/jq/{modules → vendor}/oniguruma/COPYING +0 -0
  244. /package/deps/jq/{modules → vendor}/oniguruma/ChangeLog +0 -0
  245. /package/deps/jq/{modules → vendor}/oniguruma/NEWS +0 -0
  246. /package/deps/jq/{modules → vendor}/oniguruma/README +0 -0
  247. /package/deps/jq/{modules → vendor}/oniguruma/README_japanese +0 -0
  248. /package/deps/jq/{modules → vendor}/oniguruma/autogen.sh +0 -0
  249. /package/deps/jq/{modules → vendor}/oniguruma/cmake/Config.cmake.in +0 -0
  250. /package/deps/jq/{modules → vendor}/oniguruma/doc/CALLOUTS.API +0 -0
  251. /package/deps/jq/{modules → vendor}/oniguruma/doc/CALLOUTS.API.ja +0 -0
  252. /package/deps/jq/{modules → vendor}/oniguruma/doc/FAQ +0 -0
  253. /package/deps/jq/{modules → vendor}/oniguruma/doc/FAQ.ja +0 -0
  254. /package/deps/jq/{modules → vendor}/oniguruma/harnesses/ascii_compatible.dict +0 -0
  255. /package/deps/jq/{modules → vendor}/oniguruma/harnesses/deluxe.c +0 -0
  256. /package/deps/jq/{modules → vendor}/oniguruma/harnesses/dict_conv.py +0 -0
  257. /package/deps/jq/{modules → vendor}/oniguruma/harnesses/fuzzer.options +0 -0
  258. /package/deps/jq/{modules → vendor}/oniguruma/harnesses/libfuzzer-onig.cpp +0 -0
  259. /package/deps/jq/{modules → vendor}/oniguruma/harnesses/regset.c +0 -0
  260. /package/deps/jq/{modules → vendor}/oniguruma/index.html +0 -0
  261. /package/deps/jq/{modules → vendor}/oniguruma/index_ja.html +0 -0
  262. /package/deps/jq/{modules → vendor}/oniguruma/m4/.whatever +0 -0
  263. /package/deps/jq/{modules → vendor}/oniguruma/make_win.bat +0 -0
  264. /package/deps/jq/{modules → vendor}/oniguruma/make_win32.bat +0 -0
  265. /package/deps/jq/{modules → vendor}/oniguruma/make_win64.bat +0 -0
  266. /package/deps/jq/{modules → vendor}/oniguruma/onig-config.cmake.in +0 -0
  267. /package/deps/jq/{modules → vendor}/oniguruma/onig-config.in +0 -0
  268. /package/deps/jq/{modules → vendor}/oniguruma/oniguruma.pc.cmake.in +0 -0
  269. /package/deps/jq/{modules → vendor}/oniguruma/oniguruma.pc.in +0 -0
  270. /package/deps/jq/{modules → vendor}/oniguruma/sample/CMakeLists.txt +0 -0
  271. /package/deps/jq/{modules → vendor}/oniguruma/sample/Makefile.am +0 -0
  272. /package/deps/jq/{modules → vendor}/oniguruma/sample/bug_fix.c +0 -0
  273. /package/deps/jq/{modules → vendor}/oniguruma/sample/callout.c +0 -0
  274. /package/deps/jq/{modules → vendor}/oniguruma/sample/count.c +0 -0
  275. /package/deps/jq/{modules → vendor}/oniguruma/sample/crnl.c +0 -0
  276. /package/deps/jq/{modules → vendor}/oniguruma/sample/echo.c +0 -0
  277. /package/deps/jq/{modules → vendor}/oniguruma/sample/encode.c +0 -0
  278. /package/deps/jq/{modules → vendor}/oniguruma/sample/listcap.c +0 -0
  279. /package/deps/jq/{modules → vendor}/oniguruma/sample/names.c +0 -0
  280. /package/deps/jq/{modules → vendor}/oniguruma/sample/posix.c +0 -0
  281. /package/deps/jq/{modules → vendor}/oniguruma/sample/regset.c +0 -0
  282. /package/deps/jq/{modules → vendor}/oniguruma/sample/scan.c +0 -0
  283. /package/deps/jq/{modules → vendor}/oniguruma/sample/simple.c +0 -0
  284. /package/deps/jq/{modules → vendor}/oniguruma/sample/sql.c +0 -0
  285. /package/deps/jq/{modules → vendor}/oniguruma/sample/syntax.c +0 -0
  286. /package/deps/jq/{modules → vendor}/oniguruma/sample/user_property.c +0 -0
  287. /package/deps/jq/{modules → vendor}/oniguruma/src/Makefile.am +0 -0
  288. /package/deps/jq/{modules → vendor}/oniguruma/src/Makefile.windows +0 -0
  289. /package/deps/jq/{modules → vendor}/oniguruma/src/big5.c +0 -0
  290. /package/deps/jq/{modules → vendor}/oniguruma/src/config.h.cmake.in +0 -0
  291. /package/deps/jq/{modules → vendor}/oniguruma/src/config.h.win32 +0 -0
  292. /package/deps/jq/{modules → vendor}/oniguruma/src/config.h.win64 +0 -0
  293. /package/deps/jq/{modules → vendor}/oniguruma/src/config.h.windows.in +0 -0
  294. /package/deps/jq/{modules → vendor}/oniguruma/src/cp1251.c +0 -0
  295. /package/deps/jq/{modules → vendor}/oniguruma/src/euc_jp.c +0 -0
  296. /package/deps/jq/{modules → vendor}/oniguruma/src/euc_jp_prop.c +0 -0
  297. /package/deps/jq/{modules → vendor}/oniguruma/src/euc_jp_prop.gperf +0 -0
  298. /package/deps/jq/{modules → vendor}/oniguruma/src/euc_kr.c +0 -0
  299. /package/deps/jq/{modules → vendor}/oniguruma/src/euc_tw.c +0 -0
  300. /package/deps/jq/{modules → vendor}/oniguruma/src/gb18030.c +0 -0
  301. /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_1.c +0 -0
  302. /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_10.c +0 -0
  303. /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_11.c +0 -0
  304. /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_13.c +0 -0
  305. /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_14.c +0 -0
  306. /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_15.c +0 -0
  307. /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_16.c +0 -0
  308. /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_2.c +0 -0
  309. /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_3.c +0 -0
  310. /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_4.c +0 -0
  311. /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_5.c +0 -0
  312. /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_6.c +0 -0
  313. /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_7.c +0 -0
  314. /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_8.c +0 -0
  315. /package/deps/jq/{modules → vendor}/oniguruma/src/iso8859_9.c +0 -0
  316. /package/deps/jq/{modules → vendor}/oniguruma/src/koi8.c +0 -0
  317. /package/deps/jq/{modules → vendor}/oniguruma/src/koi8_r.c +0 -0
  318. /package/deps/jq/{modules → vendor}/oniguruma/src/make_property.sh +0 -0
  319. /package/deps/jq/{modules → vendor}/oniguruma/src/mktable.c +0 -0
  320. /package/deps/jq/{modules → vendor}/oniguruma/src/onig_init.c +0 -0
  321. /package/deps/jq/{modules → vendor}/oniguruma/src/oniggnu.h +0 -0
  322. /package/deps/jq/{modules → vendor}/oniguruma/src/onigposix.h +0 -0
  323. /package/deps/jq/{modules → vendor}/oniguruma/src/regenc.c +0 -0
  324. /package/deps/jq/{modules → vendor}/oniguruma/src/regenc.h +0 -0
  325. /package/deps/jq/{modules → vendor}/oniguruma/src/regext.c +0 -0
  326. /package/deps/jq/{modules → vendor}/oniguruma/src/reggnu.c +0 -0
  327. /package/deps/jq/{modules → vendor}/oniguruma/src/regparse.h +0 -0
  328. /package/deps/jq/{modules → vendor}/oniguruma/src/regposerr.c +0 -0
  329. /package/deps/jq/{modules → vendor}/oniguruma/src/regposix.c +0 -0
  330. /package/deps/jq/{modules → vendor}/oniguruma/src/regtrav.c +0 -0
  331. /package/deps/jq/{modules → vendor}/oniguruma/src/regversion.c +0 -0
  332. /package/deps/jq/{modules → vendor}/oniguruma/src/sjis.c +0 -0
  333. /package/deps/jq/{modules → vendor}/oniguruma/src/sjis_prop.c +0 -0
  334. /package/deps/jq/{modules → vendor}/oniguruma/src/sjis_prop.gperf +0 -0
  335. /package/deps/jq/{modules → vendor}/oniguruma/src/unicode.c +0 -0
  336. /package/deps/jq/{modules → vendor}/oniguruma/src/utf32_be.c +0 -0
  337. /package/deps/jq/{modules → vendor}/oniguruma/src/utf32_le.c +0 -0
  338. /package/deps/jq/{modules → vendor}/oniguruma/src/utf8.c +0 -0
  339. /package/deps/jq/{modules → vendor}/oniguruma/test/CMakeLists.txt +0 -0
  340. /package/deps/jq/{modules → vendor}/oniguruma/test/Makefile.am +0 -0
  341. /package/deps/jq/{modules → vendor}/oniguruma/test/test.sh +0 -0
  342. /package/deps/jq/{modules → vendor}/oniguruma/test/test_regset.c +0 -0
  343. /package/deps/jq/{modules → vendor}/oniguruma/test/testu.c +0 -0
  344. /package/deps/jq/{modules → vendor}/oniguruma/tis-ci/stub.c +0 -0
  345. /package/deps/jq/{modules → vendor}/oniguruma/tis-ci/test_back.config +0 -0
  346. /package/deps/jq/{modules → vendor}/oniguruma/tis-ci/test_regset.config +0 -0
  347. /package/deps/jq/{modules → vendor}/oniguruma/tis-ci/test_syntax.config +0 -0
  348. /package/deps/jq/{modules → vendor}/oniguruma/tis-ci/test_utf8.config +0 -0
  349. /package/deps/jq/{modules → vendor}/oniguruma/tis-ci/testc.config +0 -0
  350. /package/deps/jq/{modules → vendor}/oniguruma/tis-ci/testu.config +0 -0
  351. /package/deps/jq/{modules → vendor}/oniguruma/tis.config +0 -0
  352. /package/deps/jq/{modules → vendor}/oniguruma/windows/testc.c +0 -0
@@ -0,0 +1,667 @@
1
+ /*
2
+ * onig_syn_md.c
3
+ * Copyright (c) 2024 K.Kosako
4
+ *
5
+ * Oniguruma OWner: K.Kosako https://github.com/kkos/oniguruma
6
+ * SYNTAX.md : seanofw https://github.com/seanofw
7
+ * onig_syn_md.c : tonco-miyazawa https://github.com/tonco-miyazawa
8
+ */
9
+
10
+ #include <stdlib.h>
11
+ #include <stdio.h>
12
+ #include <string.h>
13
+ #include "oniguruma.h"
14
+
15
+ #define ONIG_SYN_MD_VERSION_INT (00002)
16
+ #define TOTAL_NUM_OF_BITS (32)
17
+
18
+ #define PRINT_SEPARATOR (printf("===================================================\n"))
19
+
20
+ #define INPUT_SYNTAX(syn, abb, set_in) { (syn), (#syn), (abb), (set_in) }
21
+ #define INPUT_FLAG(arg) { (arg), (#arg) }
22
+
23
+
24
+
25
+ /************************************* Settings *********************************************/
26
+ /* NOW_MODE
27
+ 1: (OP)
28
+ 2: (OP2)
29
+ 3: (BEHAVIOR) */
30
+ #define NOW_MODE (1)
31
+
32
+ /* #define PRINT_UNDEFINED_FLAG */
33
+
34
+ /* #define PRINT_SYNTAX_FORWARD_ORDER */
35
+
36
+ /* #define USE_YOUR_OWN_SYNTAX */
37
+
38
+ /* #define PRINT_DEBUG_INFO */
39
+
40
+ #define PRINT_VERSION_INFO
41
+ #define PRINT_SET_IN_INFO
42
+ #define PRINT_TABLE_INFO
43
+ #define WARN_UNDEFINED_FLAG_USED
44
+ /************************************* Settings *********************************************/
45
+
46
+
47
+ /************************ Switch between OP, OP2, BEHAVIOR **********************************/
48
+ #if NOW_MODE == 1
49
+
50
+ #define SYNTAX_MEMBER_NAME ("op")
51
+ #define TITLE_STRING ("Group One Flags (op)")
52
+ #define SYNTAX_MEMBER(syn) ((syn)->op)
53
+ #define IS_SYNTAX_MEMBER(syn, opm) (((syn)->op & (opm)) != 0)
54
+
55
+ #elif NOW_MODE == 2
56
+
57
+ #define SYNTAX_MEMBER_NAME ("op2")
58
+ #define TITLE_STRING ("Group Two Flags (op2)")
59
+ #define SYNTAX_MEMBER(syn) ((syn)->op2)
60
+ #define IS_SYNTAX_MEMBER(syn, opm) (((syn)->op2 & (opm)) != 0)
61
+
62
+ #elif NOW_MODE == 3
63
+
64
+ #define SYNTAX_MEMBER_NAME ("behavior")
65
+ #define TITLE_STRING ("Syntax Flags (syn)")
66
+ #define SYNTAX_MEMBER(syn) ((syn)->behavior)
67
+ #define IS_SYNTAX_MEMBER(syn, opm) (((syn)->behavior & (opm)) != 0)
68
+
69
+ #else
70
+ #error "Check 'NOW_MODE' value."
71
+ #endif
72
+ /************************ Switch between OP, OP2, BEHAVIOR **********************************/
73
+
74
+
75
+ /*********************************** Your own syntax ****************************************/
76
+ #ifdef USE_YOUR_OWN_SYNTAX
77
+ static OnigSyntaxType OnigSyntaxYourOwn;
78
+ #define ONIG_SYNTAX_YOUROWN (&OnigSyntaxYourOwn)
79
+
80
+ static OnigSyntaxType OnigSyntaxYourOwn = {
81
+ 0xf0f0f0f0 /* Group One Flags (op) */
82
+ , 0xffff0000 /* Group Two Flags (op2) */
83
+ , 0x00ff00ff /* Syntax Flags (syn) */
84
+ , ONIG_OPTION_NONE
85
+ ,
86
+ {
87
+ (OnigCodePoint )'\\' /* esc */
88
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
89
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
90
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
91
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
92
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
93
+ }
94
+ };
95
+ #endif
96
+ /*********************************** Your own syntax ****************************************/
97
+
98
+
99
+ /************************************** syntax data *****************************************/
100
+ typedef struct {
101
+ OnigSyntaxType* syn;
102
+ char *name;
103
+ char *abb;
104
+ char *set_in;
105
+ } syn_data;
106
+
107
+
108
+ static syn_data syn_data_list[] =
109
+ {
110
+ /* INPUT_SYNTAX(syn, abb, set_in) ===> { (syn), (#syn), (abb), (set_in) } */
111
+
112
+ INPUT_SYNTAX( ONIG_SYNTAX_ASIS , "ASIS" , "ASIS" )
113
+ , INPUT_SYNTAX( ONIG_SYNTAX_POSIX_BASIC , "PosB" , "PosixBasic" )
114
+ , INPUT_SYNTAX( ONIG_SYNTAX_POSIX_EXTENDED , "PosEx", "PosixExtended")
115
+ , INPUT_SYNTAX( ONIG_SYNTAX_EMACS , "Emacs", "Emacs")
116
+ , INPUT_SYNTAX( ONIG_SYNTAX_GREP , "Grep" , "Grep" )
117
+ , INPUT_SYNTAX( ONIG_SYNTAX_GNU_REGEX , "Gnu" , "GnuRegex" )
118
+ , INPUT_SYNTAX( ONIG_SYNTAX_JAVA , "Java" , "Java" )
119
+ , INPUT_SYNTAX( ONIG_SYNTAX_PERL , "Perl" , "Perl" )
120
+ , INPUT_SYNTAX( ONIG_SYNTAX_PERL_NG , "PeNG" , "Perl_NG" )
121
+ , INPUT_SYNTAX( ONIG_SYNTAX_RUBY , "Ruby" , "Ruby" )
122
+ , INPUT_SYNTAX( ONIG_SYNTAX_PYTHON , "Pythn", "Python")
123
+ , INPUT_SYNTAX( ONIG_SYNTAX_ONIGURUMA , "Onig" , "Oniguruma" )
124
+
125
+ #ifdef USE_YOUR_OWN_SYNTAX
126
+ , INPUT_SYNTAX( ONIG_SYNTAX_YOUROWN , "Your" , "YourOwn" )
127
+ #endif
128
+ };
129
+
130
+ static const int num_of_syntax_types = (sizeof syn_data_list /sizeof syn_data_list[0]);
131
+
132
+
133
+ static void print_syn_data_list()
134
+ {
135
+ int y;
136
+ PRINT_SEPARATOR;
137
+ for (y = 0; y < num_of_syntax_types; y++)
138
+ {
139
+ printf( "\nsyn_data_list[%d]\n", y);
140
+ printf( "name='%s'\n" , syn_data_list[y].name);
141
+
142
+ printf( "syn->");
143
+ printf( SYNTAX_MEMBER_NAME );
144
+ printf( "= 0x%08x\n", SYNTAX_MEMBER(syn_data_list[y].syn) );
145
+
146
+ printf( "abb='%s'\n" , syn_data_list[y].abb);
147
+ printf( "set_in='%s'\n" , syn_data_list[y].set_in);
148
+ };
149
+ return ;
150
+ }
151
+ /************************************** syntax data *****************************************/
152
+
153
+
154
+ /************************************** flag data *******************************************/
155
+ typedef struct {
156
+ unsigned int num;
157
+ char *name;
158
+ } flag_data;
159
+
160
+
161
+ /* OP */
162
+ #if NOW_MODE == 1
163
+ static flag_data flag_data_list[] =
164
+ {
165
+
166
+ /* The following are no need to sort them in bit order. */
167
+
168
+ /* INPUT_FLAG(arg) ===> { (arg), (#arg) } */
169
+
170
+ INPUT_FLAG( ONIG_SYN_OP_VARIABLE_META_CHARACTERS )
171
+ , INPUT_FLAG( ONIG_SYN_OP_DOT_ANYCHAR )
172
+ , INPUT_FLAG( ONIG_SYN_OP_ASTERISK_ZERO_INF )
173
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF )
174
+ , INPUT_FLAG( ONIG_SYN_OP_PLUS_ONE_INF )
175
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_PLUS_ONE_INF )
176
+ , INPUT_FLAG( ONIG_SYN_OP_QMARK_ZERO_ONE )
177
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_QMARK_ZERO_ONE )
178
+ , INPUT_FLAG( ONIG_SYN_OP_BRACE_INTERVAL )
179
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_BRACE_INTERVAL )
180
+ , INPUT_FLAG( ONIG_SYN_OP_VBAR_ALT )
181
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_VBAR_ALT )
182
+ , INPUT_FLAG( ONIG_SYN_OP_LPAREN_SUBEXP )
183
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_LPAREN_SUBEXP )
184
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR )
185
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR )
186
+ , INPUT_FLAG( ONIG_SYN_OP_DECIMAL_BACKREF )
187
+ , INPUT_FLAG( ONIG_SYN_OP_BRACKET_CC )
188
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_W_WORD )
189
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END )
190
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_B_WORD_BOUND )
191
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_S_WHITE_SPACE )
192
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_D_DIGIT )
193
+ , INPUT_FLAG( ONIG_SYN_OP_LINE_ANCHOR )
194
+ , INPUT_FLAG( ONIG_SYN_OP_POSIX_BRACKET )
195
+ , INPUT_FLAG( ONIG_SYN_OP_QMARK_NON_GREEDY )
196
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_CONTROL_CHARS )
197
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_C_CONTROL )
198
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_OCTAL3 )
199
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_X_HEX2 )
200
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_X_BRACE_HEX8 )
201
+ , INPUT_FLAG( ONIG_SYN_OP_ESC_O_BRACE_OCTAL )
202
+ };
203
+ #endif
204
+
205
+
206
+ /* OP2 */
207
+ #if NOW_MODE == 2
208
+ static flag_data flag_data_list[] =
209
+ {
210
+ INPUT_FLAG( ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE )
211
+ , INPUT_FLAG( ONIG_SYN_OP2_QMARK_GROUP_EFFECT )
212
+ , INPUT_FLAG( ONIG_SYN_OP2_OPTION_PERL )
213
+ , INPUT_FLAG( ONIG_SYN_OP2_OPTION_RUBY )
214
+ , INPUT_FLAG( ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT )
215
+ , INPUT_FLAG( ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL )
216
+ , INPUT_FLAG( ONIG_SYN_OP2_CCLASS_SET_OP )
217
+ , INPUT_FLAG( ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP )
218
+ , INPUT_FLAG( ONIG_SYN_OP2_ESC_K_NAMED_BACKREF )
219
+ , INPUT_FLAG( ONIG_SYN_OP2_ESC_G_SUBEXP_CALL )
220
+ , INPUT_FLAG( ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY )
221
+ , INPUT_FLAG( ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL )
222
+ , INPUT_FLAG( ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META )
223
+ , INPUT_FLAG( ONIG_SYN_OP2_ESC_V_VTAB )
224
+ , INPUT_FLAG( ONIG_SYN_OP2_ESC_U_HEX4 )
225
+ , INPUT_FLAG( ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR )
226
+ , INPUT_FLAG( ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY )
227
+ , INPUT_FLAG( ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT )
228
+ /* , INPUT_FLAG( ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS ) */
229
+ , INPUT_FLAG( ONIG_SYN_OP2_ESC_H_XDIGIT )
230
+ , INPUT_FLAG( ONIG_SYN_OP2_INEFFECTIVE_ESCAPE )
231
+ , INPUT_FLAG( ONIG_SYN_OP2_QMARK_LPAREN_IF_ELSE )
232
+ , INPUT_FLAG( ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP )
233
+ , INPUT_FLAG( ONIG_SYN_OP2_ESC_CAPITAL_R_GENERAL_NEWLINE )
234
+ , INPUT_FLAG( ONIG_SYN_OP2_ESC_CAPITAL_N_O_SUPER_DOT )
235
+ , INPUT_FLAG( ONIG_SYN_OP2_QMARK_TILDE_ABSENT_GROUP )
236
+ /* , INPUT_FLAG( ONIG_SYN_OP2_ESC_X_Y_GRAPHEME_CLUSTER ) */ /* obsoleted: use next */
237
+ , INPUT_FLAG( ONIG_SYN_OP2_ESC_X_Y_TEXT_SEGMENT )
238
+ , INPUT_FLAG( ONIG_SYN_OP2_QMARK_PERL_SUBEXP_CALL )
239
+ , INPUT_FLAG( ONIG_SYN_OP2_QMARK_BRACE_CALLOUT_CONTENTS )
240
+ , INPUT_FLAG( ONIG_SYN_OP2_ASTERISK_CALLOUT_NAME )
241
+ , INPUT_FLAG( ONIG_SYN_OP2_OPTION_ONIGURUMA )
242
+ , INPUT_FLAG( ONIG_SYN_OP2_QMARK_CAPITAL_P_NAME )
243
+ };
244
+ #endif
245
+
246
+
247
+ /* BEHAVIOR */
248
+ #if NOW_MODE == 3
249
+ static flag_data flag_data_list[] =
250
+ {
251
+ INPUT_FLAG( ONIG_SYN_CONTEXT_INDEP_ANCHORS )
252
+ , INPUT_FLAG( ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS )
253
+ , INPUT_FLAG( ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS )
254
+ , INPUT_FLAG( ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP )
255
+ , INPUT_FLAG( ONIG_SYN_ALLOW_INVALID_INTERVAL )
256
+ , INPUT_FLAG( ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV )
257
+ , INPUT_FLAG( ONIG_SYN_STRICT_CHECK_BACKREF )
258
+ , INPUT_FLAG( ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND )
259
+ , INPUT_FLAG( ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP )
260
+ , INPUT_FLAG( ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME )
261
+ , INPUT_FLAG( ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY )
262
+ , INPUT_FLAG( ONIG_SYN_ISOLATED_OPTION_CONTINUE_BRANCH )
263
+ , INPUT_FLAG( ONIG_SYN_VARIABLE_LEN_LOOK_BEHIND )
264
+ , INPUT_FLAG( ONIG_SYN_PYTHON )
265
+ , INPUT_FLAG( ONIG_SYN_WHOLE_OPTIONS )
266
+ , INPUT_FLAG( ONIG_SYN_BRE_ANCHOR_AT_EDGE_OF_SUBEXP )
267
+
268
+ /* syntax (behavior) in char class [...] */
269
+ , INPUT_FLAG( ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC )
270
+ , INPUT_FLAG( ONIG_SYN_BACKSLASH_ESCAPE_IN_CC )
271
+ , INPUT_FLAG( ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC )
272
+ , INPUT_FLAG( ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC )
273
+ , INPUT_FLAG( ONIG_SYN_ALLOW_INVALID_CODE_END_OF_RANGE_IN_CC )
274
+ , INPUT_FLAG( ONIG_SYN_ALLOW_CHAR_TYPE_FOLLOWED_BY_MINUS_IN_CC )
275
+
276
+ /* syntax (behavior) warning */
277
+ , INPUT_FLAG( ONIG_SYN_WARN_CC_OP_NOT_ESCAPED )
278
+ , INPUT_FLAG( ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT )
279
+ };
280
+ #endif
281
+
282
+
283
+ static const int num_of_flags = (sizeof flag_data_list /sizeof flag_data_list[0]);
284
+
285
+ static int flag_name_max_len = 0;
286
+
287
+
288
+ static int flag_name_max_len_int()
289
+ {
290
+ int i, n, max_len;
291
+ max_len = 0;
292
+
293
+ for (i = 0; i < num_of_flags; i++)
294
+ {
295
+ n = strlen(flag_data_list[i].name);
296
+ if ( max_len < n )
297
+ {
298
+ max_len = n;
299
+ }
300
+ }
301
+
302
+ /* Debug: printf("max_len=%d\n", max_len); */
303
+ return max_len;
304
+ }
305
+
306
+
307
+ static int convert_bit_shift_num_to_flag_data_list_element( int bit_shift_num )
308
+ {
309
+ int i;
310
+ for (i = 0; i < num_of_flags; i++)
311
+ {
312
+ if ( flag_data_list[i].num == (1U << bit_shift_num) ){
313
+
314
+ #ifdef PRINT_DEBUG_INFO
315
+ printf("(1U << %d) ===> flag_data_list[%d]\n", bit_shift_num, i );
316
+ #endif
317
+ return i;
318
+ }
319
+ }
320
+
321
+ #ifdef PRINT_DEBUG_INFO
322
+ printf("(1U << %d) ===> ( none )\n", bit_shift_num );
323
+ #endif
324
+
325
+ /* If not found, returns "-1". This is not Error. */
326
+ return -1;
327
+ }
328
+
329
+
330
+ static int convert_num_to_bit_shift_num(unsigned int arg_num){
331
+ int x;
332
+ for (x = 0; x < TOTAL_NUM_OF_BITS; x++)
333
+ {
334
+ if ( arg_num == (1U << x) )
335
+ {
336
+ return x;
337
+ }
338
+ }
339
+
340
+ /* Error */
341
+ printf("<Error:line%d> '0x%08x' is not bit flag.\n", __LINE__, arg_num );
342
+ exit(-1);
343
+ return -1;
344
+ }
345
+
346
+
347
+ static int check_flag_data_duplication()
348
+ {
349
+ int i, shift_num;
350
+ unsigned int used_bits = 0;
351
+
352
+ for (i = 0; i < num_of_flags; i++)
353
+ {
354
+ if ( (used_bits & flag_data_list[i].num) != 0 ){
355
+
356
+ shift_num = convert_num_to_bit_shift_num(flag_data_list[i].num);
357
+
358
+ PRINT_SEPARATOR;
359
+ fprintf(stderr, "\n<Error:line%d> The following bit has already been used.\n", __LINE__ );
360
+ fprintf(stderr, "flag_data_list[%d] : '%s' ", i, flag_data_list[i].name);
361
+ fprintf(stderr, "(1U << %d)\n", shift_num);
362
+
363
+ #ifndef PRINT_DEBUG_INFO
364
+ fprintf(stderr, "\nPlease use '#define PRINT_DEBUG_INFO'.\n");
365
+ #endif
366
+ exit(-1);
367
+ return -1;
368
+ }
369
+ used_bits |= flag_data_list[i].num;
370
+ }
371
+ return 0;
372
+ }
373
+
374
+
375
+ static void print_flag_data_list()
376
+ {
377
+ int i, shift_num;
378
+
379
+ PRINT_SEPARATOR;
380
+ for (i = 0; i < num_of_flags; i++)
381
+ {
382
+ shift_num = convert_num_to_bit_shift_num( flag_data_list[i].num );
383
+
384
+ printf( "\nflag_data_list[%d]\n", i);
385
+ printf( "name='%s' " , flag_data_list[i].name);
386
+ printf( "(1U << %d)\n" , shift_num);
387
+ printf( "num=0x%08x\n" , flag_data_list[i].num);
388
+ }
389
+ return ;
390
+ }
391
+ /************************************** flag data *******************************************/
392
+
393
+
394
+ /************************************** print table *****************************************/
395
+ static void print_table_head()
396
+ {
397
+ int i, y;
398
+
399
+ printf("\n### ");
400
+ printf( TITLE_STRING );
401
+ printf("\n\n| ID | Option");
402
+ for (i = 0; i < (flag_name_max_len - 1); i++)
403
+ {
404
+ printf(" ");
405
+ }
406
+ printf("|");
407
+
408
+ /* ex. print "PeNG " */
409
+ #ifdef PRINT_SYNTAX_FORWARD_ORDER
410
+ for (y = 0; y < num_of_syntax_types; y++)
411
+ #else
412
+ for (y = num_of_syntax_types -1; y > -1; y--)
413
+ #endif
414
+ {
415
+ printf(" %-5.5s |", syn_data_list[y].abb );
416
+ }
417
+
418
+ printf("\n| ----- | ");
419
+ for (i = 0; i < (flag_name_max_len + 4); i++)
420
+ {
421
+ printf("-");
422
+ }
423
+ printf(" |");
424
+
425
+ for (y = 0; y < num_of_syntax_types; y++)
426
+ {
427
+ printf(" ----- |");
428
+ }
429
+ printf("\n");
430
+ return ;
431
+ }
432
+
433
+
434
+ static void print_table_body_one_line( int shift_num )
435
+ {
436
+ int i, y, elem, name_chars;
437
+
438
+ elem = convert_bit_shift_num_to_flag_data_list_element(shift_num);
439
+
440
+ printf("| %2d | ", shift_num);
441
+
442
+ if (elem < 0){
443
+ name_chars = printf(" `( Undefined )`"); /* elem == -1 */
444
+ } else {
445
+ name_chars = printf("`%s`", flag_data_list[elem].name);
446
+ }
447
+
448
+ for ( i=0; i < (flag_name_max_len - name_chars + 5); i++){ printf(" "); }
449
+ printf("|");
450
+
451
+ /* ex. print ' Yes |' */
452
+ #ifdef PRINT_SYNTAX_FORWARD_ORDER
453
+ for (y = 0; y < num_of_syntax_types; y++)
454
+ #else
455
+ for (y = num_of_syntax_types -1; y > -1; y--)
456
+ #endif
457
+ {
458
+ if ( IS_SYNTAX_MEMBER(syn_data_list[y].syn, (1U << shift_num)) )
459
+ {
460
+ printf(" Yes |");
461
+ } else {
462
+ printf(" - |");
463
+ }
464
+ }
465
+ printf("\n");
466
+ return ;
467
+ }
468
+
469
+
470
+ static void print_table_body()
471
+ {
472
+ int x, elem;
473
+ for (x = 0; x < TOTAL_NUM_OF_BITS; x++)
474
+ {
475
+ elem = convert_bit_shift_num_to_flag_data_list_element( x );
476
+
477
+ if (elem < 0)
478
+ {
479
+ #if !(defined( PRINT_UNDEFINED_FLAG ))
480
+ continue;
481
+ #endif
482
+ }
483
+ print_table_body_one_line(x);
484
+ }
485
+ return ;
486
+ }
487
+
488
+ /************************************** print table *****************************************/
489
+
490
+
491
+ /************************************* print Set_in *****************************************/
492
+ static void print_set_in_one_line(int shift_num)
493
+ {
494
+ int y, elem, count;
495
+
496
+ elem = convert_bit_shift_num_to_flag_data_list_element(shift_num);
497
+
498
+ if (elem < 0)
499
+ {
500
+ printf("### %d. ( Undefined )\n", shift_num ); /* elem == -1 */
501
+ } else {
502
+ printf("### %d. %s\n", shift_num, flag_data_list[elem].name );
503
+ }
504
+
505
+ count = 0;
506
+ printf("_Set in: ");
507
+ #ifdef PRINT_SYNTAX_FORWARD_ORDER
508
+ for (y = 0; y < num_of_syntax_types; y++)
509
+ #else
510
+ for (y = num_of_syntax_types -1; y > -1; y--)
511
+ #endif
512
+ {
513
+ if ( IS_SYNTAX_MEMBER(syn_data_list[y].syn, (1U << shift_num)) )
514
+ {
515
+ if (count > 0){ printf(", "); };
516
+ printf("%s", syn_data_list[y].set_in);
517
+ count++;
518
+ }
519
+ } /* for y */
520
+
521
+ if (count==0){ printf("none"); };
522
+
523
+ printf("_\n\n");
524
+ return ;
525
+ }
526
+
527
+
528
+ static void print_set_in()
529
+ {
530
+ int x, elem;
531
+
532
+ PRINT_SEPARATOR;
533
+ printf("The following are 'Set in' for oniguruma/doc/SYNTAX.md\n\n## ");
534
+ printf( TITLE_STRING );
535
+ printf("\n\n");
536
+ for (x = 0; x < TOTAL_NUM_OF_BITS; x++)
537
+ {
538
+ elem = convert_bit_shift_num_to_flag_data_list_element( x );
539
+
540
+ if (elem < 0)
541
+ {
542
+ #if !(defined( PRINT_UNDEFINED_FLAG ))
543
+ continue;
544
+ #endif
545
+ }
546
+
547
+ print_set_in_one_line(x);
548
+ }
549
+ return ;
550
+ }
551
+
552
+ /************************************* print Set_in *****************************************/
553
+
554
+
555
+ /************************************** main() *****************************************/
556
+
557
+ static void print_version()
558
+ {
559
+ printf( "[ onig_syn_md.c ver.%05d ] ", ONIG_SYN_MD_VERSION_INT );
560
+ printf("The loaded oniguruma is '%d.%d.%d'.\n"
561
+ , ONIGURUMA_VERSION_MAJOR
562
+ , ONIGURUMA_VERSION_MINOR
563
+ , ONIGURUMA_VERSION_TEENY );
564
+ return ;
565
+ }
566
+
567
+
568
+ static void print_debug()
569
+ {
570
+ int x;
571
+
572
+ print_version();
573
+ print_syn_data_list();
574
+ print_flag_data_list();
575
+ check_flag_data_duplication();
576
+
577
+ /* print: (1U << x) ===> flag_data_list[elem] */
578
+ PRINT_SEPARATOR;
579
+ printf("\nThe following are the array elements that correspond to each bit.\n\n");
580
+ for (x = 0; x < TOTAL_NUM_OF_BITS; x++)
581
+ {
582
+ convert_bit_shift_num_to_flag_data_list_element(x);
583
+ }
584
+ return ;
585
+ }
586
+
587
+
588
+ static void warn_undefined_flag_used()
589
+ {
590
+ int x, y, elem;
591
+
592
+ for (x = 0; x < TOTAL_NUM_OF_BITS; x++)
593
+ {
594
+ elem = convert_bit_shift_num_to_flag_data_list_element(x);
595
+
596
+ if (elem < 0){
597
+ for (y = 0; y < num_of_syntax_types; y++)
598
+ {
599
+ if ( IS_SYNTAX_MEMBER( syn_data_list[y].syn, (1U << x) ) )
600
+ {
601
+ PRINT_SEPARATOR;
602
+ printf("warning: An undefined bit flag is used.");
603
+ printf(" (1U << %d)\n\n", x);
604
+ print_set_in_one_line( x );
605
+
606
+ #ifndef PRINT_UNDEFINED_FLAG
607
+ printf("Please use '#define PRINT_UNDEFINED_FLAG'.\n");
608
+ #endif
609
+ return ;
610
+ }
611
+ } /* for y */
612
+ } /* if elem */
613
+ } /* for x */
614
+ return ;
615
+ }
616
+
617
+
618
+ extern int main(int argc, char* argv[])
619
+ {
620
+ #ifdef PRINT_DEBUG_INFO
621
+ print_debug();
622
+ return 0;
623
+ #endif
624
+
625
+ #ifdef PRINT_VERSION_INFO
626
+ print_version();
627
+ #endif
628
+
629
+ flag_name_max_len = flag_name_max_len_int();
630
+ check_flag_data_duplication();
631
+
632
+ #ifdef PRINT_SET_IN_INFO
633
+ print_set_in();
634
+ #endif
635
+
636
+ #ifdef PRINT_TABLE_INFO
637
+ print_table_head();
638
+ print_table_body();
639
+ #endif
640
+
641
+ #ifdef WARN_UNDEFINED_FLAG_USED
642
+ warn_undefined_flag_used();
643
+ #endif
644
+
645
+ /* test */
646
+ /*
647
+ printf("\n------ test -------\n");
648
+
649
+ int test_x = 17;
650
+ print_set_in_one_line( test_x );
651
+ print_table_body_one_line( test_x );
652
+ printf("--------------------\n");
653
+ */
654
+
655
+ /* To avoid 'gcc -Wall' warnings. */
656
+ if (0)
657
+ {
658
+ print_debug();
659
+ print_version();
660
+ print_set_in();
661
+ print_table_head();
662
+ print_table_body();
663
+ warn_undefined_flag_used();
664
+ }
665
+
666
+ return 0;
667
+ }
@@ -201,7 +201,7 @@ each_match_callback_func(const UChar* str, const UChar* end,
201
201
  return ONIG_NORMAL;
202
202
  }
203
203
 
204
- static unsigned int calc_retry_limit(sl, len)
204
+ static unsigned int calc_retry_limit(int sl, int len)
205
205
  {
206
206
  unsigned int r;
207
207
  unsigned int upper;