@port-labs/jq-node-bindings 0.0.14 → 0.0.15-dev2
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.
- package/README.md +6 -1
- package/binding.gyp +42 -20
- package/configure +1 -1
- package/deps/jq/.gitattributes +12 -0
- package/deps/jq/AUTHORS +149 -43
- package/deps/jq/COPYING +75 -1
- package/deps/jq/ChangeLog +2 -2
- package/deps/jq/Makefile.am +106 -65
- package/deps/jq/NEWS.md +391 -0
- package/deps/jq/README.md +54 -52
- package/deps/jq/SECURITY.md +7 -0
- package/deps/jq/compile-ios.sh +106 -102
- package/deps/jq/configure.ac +72 -59
- package/deps/jq/docs/Pipfile +14 -0
- package/deps/jq/docs/Pipfile.lock +415 -0
- package/deps/jq/docs/README.md +15 -14
- package/deps/jq/docs/build_manpage.py +251 -0
- package/deps/jq/docs/build_mantests.py +21 -0
- package/deps/jq/docs/build_website.py +95 -0
- package/deps/jq/docs/content/download/default.yml +249 -0
- package/deps/jq/docs/content/index.yml +83 -0
- package/deps/jq/docs/content/{3.manual/v1.6 → manual/dev}/manual.yml +992 -452
- package/deps/jq/docs/content/{3.manual → manual}/v1.3/manual.yml +105 -116
- package/deps/jq/docs/content/{3.manual → manual}/v1.4/manual.yml +122 -129
- package/deps/jq/docs/content/{3.manual → manual}/v1.5/manual.yml +313 -262
- package/deps/jq/docs/content/{3.manual → manual/v1.6}/manual.yml +407 -332
- package/deps/jq/docs/content/manual/v1.7/manual.yml +3697 -0
- package/deps/jq/docs/content/tutorial/default.yml +337 -0
- package/deps/jq/docs/manual_schema.yml +60 -0
- package/deps/jq/docs/public/css/style.css +99 -0
- package/deps/jq/docs/public/icon.png +0 -0
- package/deps/jq/docs/public/icon.svg +1 -0
- package/deps/jq/docs/public/jq.svg +1 -0
- package/deps/jq/docs/public/js/manual-search.js +31 -49
- package/deps/jq/docs/templates/default.html.j2 +31 -0
- package/deps/jq/docs/templates/index.html.j2 +58 -0
- package/deps/jq/docs/templates/manual.html.j2 +120 -0
- package/deps/jq/docs/templates/shared/_footer.html.j2 +14 -0
- package/deps/jq/docs/templates/shared/_head.html.j2 +23 -0
- package/deps/jq/docs/templates/shared/_navbar.html.j2 +40 -0
- package/deps/jq/docs/validate_manual_schema.py +19 -0
- package/deps/jq/jq.1.prebuilt +1102 -294
- package/deps/jq/jq.spec +2 -3
- package/deps/jq/libjq.pc.in +11 -0
- package/deps/jq/m4/ax_pthread.m4 +522 -0
- package/deps/jq/modules/oniguruma/.travis.yml +17 -0
- package/deps/jq/modules/oniguruma/CMakeLists.txt +206 -41
- package/deps/jq/modules/oniguruma/COPYING +23 -25
- package/deps/jq/modules/oniguruma/HISTORY +368 -23
- package/deps/jq/modules/oniguruma/Makefile.am +61 -7
- package/deps/jq/modules/oniguruma/README +34 -20
- package/deps/jq/modules/oniguruma/README.md +106 -33
- package/deps/jq/modules/oniguruma/README_japanese +183 -0
- package/deps/jq/modules/oniguruma/autogen.sh +9 -0
- package/deps/jq/modules/oniguruma/cmake/Config.cmake.in +4 -0
- package/deps/jq/modules/oniguruma/configure.ac +66 -55
- package/deps/jq/modules/oniguruma/doc/API +485 -42
- package/deps/jq/modules/oniguruma/doc/API.ja +732 -293
- package/deps/jq/modules/oniguruma/doc/CALLOUTS.API +397 -0
- package/deps/jq/modules/oniguruma/doc/CALLOUTS.API.ja +393 -0
- package/deps/jq/modules/oniguruma/doc/CALLOUTS.BUILTIN +95 -0
- package/deps/jq/modules/oniguruma/doc/CALLOUTS.BUILTIN.ja +93 -0
- package/deps/jq/modules/oniguruma/doc/FAQ +3 -3
- package/deps/jq/modules/oniguruma/doc/FAQ.ja +8 -8
- package/deps/jq/modules/oniguruma/doc/RE +223 -63
- package/deps/jq/modules/oniguruma/doc/RE.ja +420 -265
- package/deps/jq/modules/oniguruma/doc/SYNTAX.md +1091 -0
- package/deps/jq/modules/oniguruma/doc/UNICODE_PROPERTIES +840 -697
- package/deps/jq/modules/oniguruma/harnesses/ascii_compatible.dict +113 -0
- package/deps/jq/modules/oniguruma/harnesses/base.c +749 -0
- package/deps/jq/modules/oniguruma/harnesses/deluxe.c +206 -0
- package/deps/jq/modules/oniguruma/harnesses/dict_conv.py +72 -0
- package/deps/jq/modules/oniguruma/harnesses/fuzzer.options +2 -0
- package/deps/jq/modules/oniguruma/harnesses/libfuzzer-onig.cpp +45 -0
- package/deps/jq/modules/oniguruma/harnesses/regset.c +392 -0
- package/deps/jq/modules/oniguruma/index.html +16 -5
- package/deps/jq/modules/oniguruma/index_ja.html +16 -5
- package/deps/jq/modules/oniguruma/make_win.bat +5 -0
- package/deps/jq/modules/oniguruma/make_win32.bat +5 -3
- package/deps/jq/modules/oniguruma/make_win64.bat +5 -3
- package/deps/jq/modules/oniguruma/onig-config.cmake.in +80 -0
- package/deps/jq/modules/oniguruma/onig-config.in +1 -1
- package/deps/jq/modules/oniguruma/oniguruma.pc.cmake.in +1 -1
- package/deps/jq/modules/oniguruma/oniguruma.pc.in +0 -1
- package/deps/jq/modules/oniguruma/sample/CMakeLists.txt +9 -2
- package/deps/jq/modules/oniguruma/sample/Makefile.am +24 -5
- package/deps/jq/modules/oniguruma/sample/bug_fix.c +13 -51
- package/deps/jq/modules/oniguruma/sample/callback_each_match.c +168 -0
- package/deps/jq/modules/oniguruma/sample/callout.c +268 -0
- package/deps/jq/modules/oniguruma/sample/count.c +125 -0
- package/deps/jq/modules/oniguruma/sample/crnl.c +6 -4
- package/deps/jq/modules/oniguruma/sample/echo.c +136 -0
- package/deps/jq/modules/oniguruma/sample/encode.c +53 -146
- package/deps/jq/modules/oniguruma/sample/listcap.c +18 -10
- package/deps/jq/modules/oniguruma/sample/names.c +10 -6
- package/deps/jq/modules/oniguruma/sample/posix.c +13 -2
- package/deps/jq/modules/oniguruma/sample/regset.c +95 -0
- package/deps/jq/modules/oniguruma/sample/scan.c +20 -6
- package/deps/jq/modules/oniguruma/sample/simple.c +8 -4
- package/deps/jq/modules/oniguruma/sample/sql.c +13 -8
- package/deps/jq/modules/oniguruma/sample/syntax.c +11 -10
- package/deps/jq/modules/oniguruma/sample/user_property.c +12 -7
- package/deps/jq/modules/oniguruma/src/Makefile.am +41 -15
- package/deps/jq/modules/oniguruma/src/Makefile.windows +196 -183
- package/deps/jq/modules/oniguruma/src/ascii.c +64 -7
- package/deps/jq/modules/oniguruma/src/big5.c +25 -15
- package/deps/jq/modules/oniguruma/src/config.h.cmake.in +7 -22
- package/deps/jq/modules/oniguruma/src/config.h.win32 +56 -84
- package/deps/jq/modules/oniguruma/src/config.h.win64 +56 -84
- package/deps/jq/modules/oniguruma/src/config.h.windows.in +62 -0
- package/deps/jq/modules/oniguruma/src/cp1251.c +14 -8
- package/deps/jq/modules/oniguruma/src/euc_jp.c +28 -30
- package/deps/jq/modules/oniguruma/src/euc_jp_prop.c +25 -32
- package/deps/jq/modules/oniguruma/src/euc_jp_prop.gperf +1 -2
- package/deps/jq/modules/oniguruma/src/euc_kr.c +27 -15
- package/deps/jq/modules/oniguruma/src/euc_tw.c +40 -17
- package/deps/jq/modules/oniguruma/src/gb18030.c +177 -119
- package/deps/jq/modules/oniguruma/src/gperf_fold_key_conv.py +12 -8
- package/deps/jq/modules/oniguruma/src/gperf_unfold_key_conv.py +8 -6
- package/deps/jq/modules/oniguruma/src/iso8859_1.c +92 -91
- package/deps/jq/modules/oniguruma/src/iso8859_10.c +13 -29
- package/deps/jq/modules/oniguruma/src/iso8859_11.c +4 -2
- package/deps/jq/modules/oniguruma/src/iso8859_13.c +13 -33
- package/deps/jq/modules/oniguruma/src/iso8859_14.c +13 -30
- package/deps/jq/modules/oniguruma/src/iso8859_15.c +13 -34
- package/deps/jq/modules/oniguruma/src/iso8859_16.c +13 -29
- package/deps/jq/modules/oniguruma/src/iso8859_2.c +13 -29
- package/deps/jq/modules/oniguruma/src/iso8859_3.c +13 -33
- package/deps/jq/modules/oniguruma/src/iso8859_4.c +13 -32
- package/deps/jq/modules/oniguruma/src/iso8859_5.c +16 -23
- package/deps/jq/modules/oniguruma/src/iso8859_6.c +4 -2
- package/deps/jq/modules/oniguruma/src/iso8859_7.c +14 -29
- package/deps/jq/modules/oniguruma/src/iso8859_8.c +4 -2
- package/deps/jq/modules/oniguruma/src/iso8859_9.c +13 -33
- package/deps/jq/modules/oniguruma/src/koi8.c +14 -27
- package/deps/jq/modules/oniguruma/src/koi8_r.c +12 -19
- package/deps/jq/modules/oniguruma/src/make_property.sh +21 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_egcb.sh +7 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_egcb_data.py +267 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_fold.sh +25 -11
- package/deps/jq/modules/oniguruma/src/make_unicode_fold_data.py +206 -26
- package/deps/jq/modules/oniguruma/src/make_unicode_property.sh +19 -10
- package/deps/jq/modules/oniguruma/src/make_unicode_property_data.py +474 -375
- package/deps/jq/modules/oniguruma/src/make_unicode_wb.sh +7 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_wb_data.py +267 -0
- package/deps/jq/modules/oniguruma/src/mktable.c +28 -24
- package/deps/jq/modules/oniguruma/src/onig_init.c +2 -2
- package/deps/jq/modules/oniguruma/src/oniggnu.h +7 -5
- package/deps/jq/modules/oniguruma/src/onigposix.h +40 -16
- package/deps/jq/modules/oniguruma/src/oniguruma.h +357 -107
- package/deps/jq/modules/oniguruma/src/regcomp.c +6214 -3933
- package/deps/jq/modules/oniguruma/src/regenc.c +197 -120
- package/deps/jq/modules/oniguruma/src/regenc.h +106 -63
- package/deps/jq/modules/oniguruma/src/regerror.c +112 -91
- package/deps/jq/modules/oniguruma/src/regexec.c +4876 -2010
- package/deps/jq/modules/oniguruma/src/regext.c +8 -8
- package/deps/jq/modules/oniguruma/src/reggnu.c +13 -17
- package/deps/jq/modules/oniguruma/src/regint.h +757 -491
- package/deps/jq/modules/oniguruma/src/regparse.c +7204 -3240
- package/deps/jq/modules/oniguruma/src/regparse.h +361 -218
- package/deps/jq/modules/oniguruma/src/regposerr.c +49 -9
- package/deps/jq/modules/oniguruma/src/regposix.c +106 -24
- package/deps/jq/modules/oniguruma/src/regsyntax.c +66 -13
- package/deps/jq/modules/oniguruma/src/regtrav.c +1 -1
- package/deps/jq/modules/oniguruma/src/regversion.c +6 -4
- package/deps/jq/modules/oniguruma/src/sjis.c +23 -52
- package/deps/jq/modules/oniguruma/src/sjis_prop.c +25 -32
- package/deps/jq/modules/oniguruma/src/sjis_prop.gperf +1 -2
- package/deps/jq/modules/oniguruma/src/st.c +248 -249
- package/deps/jq/modules/oniguruma/src/st.h +4 -5
- package/deps/jq/modules/oniguruma/src/unicode.c +869 -294
- package/deps/jq/modules/oniguruma/src/unicode_egcb_data.c +1419 -0
- package/deps/jq/modules/oniguruma/src/unicode_fold1_key.c +1829 -1300
- package/deps/jq/modules/oniguruma/src/unicode_fold2_key.c +32 -9
- package/deps/jq/modules/oniguruma/src/unicode_fold3_key.c +32 -9
- package/deps/jq/modules/oniguruma/src/unicode_fold_data.c +1210 -984
- package/deps/jq/modules/oniguruma/src/unicode_property_data.c +22480 -15198
- package/deps/jq/modules/oniguruma/src/unicode_property_data_posix.c +1463 -591
- package/deps/jq/modules/oniguruma/src/unicode_unfold_key.c +1958 -1418
- package/deps/jq/modules/oniguruma/src/unicode_wb_data.c +1106 -0
- package/deps/jq/modules/oniguruma/src/utf16_be.c +90 -49
- package/deps/jq/modules/oniguruma/src/utf16_le.c +80 -49
- package/deps/jq/modules/oniguruma/src/utf32_be.c +14 -42
- package/deps/jq/modules/oniguruma/src/utf32_le.c +13 -40
- package/deps/jq/modules/oniguruma/src/utf8.c +33 -78
- package/deps/jq/modules/oniguruma/test/CMakeLists.txt +55 -0
- package/deps/jq/modules/oniguruma/test/Makefile.am +65 -10
- package/deps/jq/modules/oniguruma/test/test.sh +17 -0
- package/deps/jq/modules/oniguruma/test/test_back.c +1450 -0
- package/deps/jq/modules/oniguruma/test/test_options.c +228 -0
- package/deps/jq/modules/oniguruma/test/test_regset.c +466 -0
- package/deps/jq/modules/oniguruma/test/test_syntax.c +365 -0
- package/deps/jq/modules/oniguruma/test/test_utf8.c +1761 -0
- package/deps/jq/modules/oniguruma/test/testc.c +128 -88
- package/deps/jq/modules/oniguruma/test/testp.c +613 -0
- package/deps/jq/modules/oniguruma/test/testu.c +75 -28
- package/deps/jq/modules/oniguruma/tis-ci/stub.c +3 -0
- package/deps/jq/modules/oniguruma/tis-ci/test_back.config +26 -0
- package/deps/jq/modules/oniguruma/tis-ci/test_regset.config +20 -0
- package/deps/jq/modules/oniguruma/tis-ci/test_syntax.config +26 -0
- package/deps/jq/modules/oniguruma/tis-ci/test_utf8.config +25 -0
- package/deps/jq/modules/oniguruma/tis-ci/testc.config +26 -0
- package/deps/jq/modules/oniguruma/tis-ci/testu.config +24 -0
- package/deps/jq/modules/oniguruma/tis.config +1336 -0
- package/deps/jq/modules/oniguruma/windows/CMakeLists.txt +8 -0
- package/deps/jq/modules/oniguruma/windows/testc.c +865 -869
- package/deps/jq/scripts/update-website +6 -5
- package/deps/jq/scripts/version +10 -7
- package/deps/jq/sig/jq-release-new.key +29 -0
- package/deps/jq/sig/v1.4/sha256sum.txt +1 -0
- package/deps/jq/sig/v1.5/sha256sum.txt +2 -0
- package/deps/jq/sig/v1.5rc1/sha256sum.txt +1 -0
- package/deps/jq/sig/v1.5rc2/sha256sum.txt +2 -0
- package/deps/jq/sig/v1.6/sha256sum.txt +2 -0
- package/deps/jq/sig/v1.7/jq-1.7.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7/jq-1.7.zip.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7/sha256sum.txt +23 -0
- package/deps/jq/sig/v1.7.1/jq-1.7.1.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-1.7.1.zip.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-osx-amd64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-win64.exe.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7.1/sha256sum.txt +26 -0
- package/deps/jq/sig/v1.7rc1/jq-1.7rc1.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-1.7rc1.zip.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7rc1/sha256sum.txt +23 -0
- package/deps/jq/sig/v1.7rc2/jq-1.7rc2.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-1.7rc2.zip.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7rc2/sha256sum.txt +23 -0
- package/deps/jq/src/builtin.c +537 -343
- package/deps/jq/src/builtin.h +18 -0
- package/deps/jq/src/builtin.jq +116 -143
- package/deps/jq/src/bytecode.h +8 -4
- package/deps/jq/src/compile.c +157 -143
- package/deps/jq/src/compile.h +3 -4
- package/deps/jq/src/decNumber/ICU-license.html +45 -0
- package/deps/jq/src/decNumber/decBasic.c +3908 -0
- package/deps/jq/src/decNumber/decCommon.c +1835 -0
- package/deps/jq/src/decNumber/decContext.c +437 -0
- package/deps/jq/src/decNumber/decContext.h +254 -0
- package/deps/jq/src/decNumber/decDPD.h +1185 -0
- package/deps/jq/src/decNumber/decDouble.c +140 -0
- package/deps/jq/src/decNumber/decDouble.h +155 -0
- package/deps/jq/src/decNumber/decNumber.c +8143 -0
- package/deps/jq/src/decNumber/decNumber.h +182 -0
- package/deps/jq/src/decNumber/decNumberLocal.h +757 -0
- package/deps/jq/src/decNumber/decPacked.c +220 -0
- package/deps/jq/src/decNumber/decPacked.h +52 -0
- package/deps/jq/src/decNumber/decQuad.c +135 -0
- package/deps/jq/src/decNumber/decQuad.h +177 -0
- package/deps/jq/src/decNumber/decSingle.c +71 -0
- package/deps/jq/src/decNumber/decSingle.h +86 -0
- package/deps/jq/src/decNumber/decimal128.c +553 -0
- package/deps/jq/src/decNumber/decimal128.h +81 -0
- package/deps/jq/src/decNumber/decimal32.c +476 -0
- package/deps/jq/src/decNumber/decimal32.h +81 -0
- package/deps/jq/src/decNumber/decimal64.c +839 -0
- package/deps/jq/src/decNumber/decimal64.h +83 -0
- package/deps/jq/src/decNumber/decnumber.pdf +0 -0
- package/deps/jq/src/decNumber/example1.c +38 -0
- package/deps/jq/src/decNumber/example2.c +52 -0
- package/deps/jq/src/decNumber/example3.c +64 -0
- package/deps/jq/src/decNumber/example4.c +61 -0
- package/deps/jq/src/decNumber/example5.c +36 -0
- package/deps/jq/src/decNumber/example6.c +61 -0
- package/deps/jq/src/decNumber/example7.c +35 -0
- package/deps/jq/src/decNumber/example8.c +39 -0
- package/deps/jq/src/decNumber/readme.txt +81 -0
- package/deps/jq/src/exec_stack.h +5 -3
- package/deps/jq/src/execute.c +126 -44
- package/deps/jq/src/inject_errors.c +0 -2
- package/deps/jq/src/jq.h +10 -1
- package/deps/jq/src/jq_test.c +222 -11
- package/deps/jq/src/jv.c +807 -176
- package/deps/jq/src/jv.h +22 -1
- package/deps/jq/src/jv_alloc.c +33 -26
- package/deps/jq/src/jv_alloc.h +0 -11
- package/deps/jq/src/jv_aux.c +153 -67
- package/deps/jq/src/jv_dtoa.c +12 -2
- package/deps/jq/src/jv_dtoa_tsd.c +51 -0
- package/deps/jq/src/jv_dtoa_tsd.h +4 -0
- package/deps/jq/src/jv_parse.c +70 -15
- package/deps/jq/src/jv_print.c +56 -60
- package/deps/jq/src/jv_private.h +7 -0
- package/deps/jq/src/jv_thread.h +76 -0
- package/deps/jq/src/jv_unicode.c +18 -0
- package/deps/jq/src/jv_unicode.h +2 -0
- package/deps/jq/src/lexer.c +782 -543
- package/deps/jq/src/lexer.h +438 -64
- package/deps/jq/src/lexer.l +10 -3
- package/deps/jq/src/libm.h +16 -6
- package/deps/jq/src/linker.c +97 -40
- package/deps/jq/src/locfile.c +2 -1
- package/deps/jq/src/main.c +384 -336
- package/deps/jq/src/opcode_list.h +5 -2
- package/deps/jq/src/parser.c +2260 -1898
- package/deps/jq/src/parser.h +115 -98
- package/deps/jq/src/parser.y +124 -89
- package/deps/jq/src/util.c +854 -55
- package/deps/jq/src/util.h +6 -4
- package/deps/jq/tests/jq.test +762 -26
- package/deps/jq/tests/jq_fuzz_compile.c +27 -0
- package/deps/jq/tests/jq_fuzz_execute.cpp +42 -0
- package/deps/jq/tests/jq_fuzz_fixed.cpp +297 -0
- package/deps/jq/tests/jq_fuzz_load_file.c +28 -0
- package/deps/jq/tests/jq_fuzz_parse.c +21 -0
- package/deps/jq/tests/jq_fuzz_parse_extended.c +36 -0
- package/deps/jq/tests/jq_fuzz_parse_stream.c +21 -0
- package/deps/jq/tests/local.supp +14 -0
- package/deps/jq/tests/man.test +979 -0
- package/deps/jq/tests/manonig.test +76 -0
- package/deps/jq/tests/manonigtest +5 -0
- package/deps/jq/tests/mantest +1 -2
- package/deps/jq/tests/modules/home2/.jq/g.jq +1 -0
- package/deps/jq/tests/modules/shadow1.jq +2 -0
- package/deps/jq/tests/modules/shadow2.jq +1 -0
- package/deps/jq/tests/modules/test_bind_order0.jq +1 -0
- package/deps/jq/tests/modules/test_bind_order1.jq +1 -1
- package/deps/jq/tests/modules/test_bind_order2.jq +0 -1
- package/deps/jq/tests/no-main-program.jq +1 -0
- package/deps/jq/tests/onig.test +77 -2
- package/deps/jq/tests/setup +7 -2
- package/deps/jq/tests/shtest +478 -59
- package/deps/jq/tests/uri.test +38 -0
- package/deps/jq/tests/uritest +5 -0
- package/deps/jq/tests/yes-main-program.jq +2 -0
- package/index.d.ts +2 -0
- package/lib/index.js +3 -0
- package/lib/jq.js +15 -1
- package/lib/templateAsync.js +137 -0
- package/package.json +3 -3
- package/src/binding.cc +623 -146
- package/src/binding.h +3 -4
- package/test/santiy-async.test.js +171 -0
- package/test/santiy.test.js +2 -2
- package/test/template-async.test.js +182 -0
- package/test/template.test.js +3 -3
- package/deps/jq/.travis.yml +0 -202
- package/deps/jq/NEWS +0 -89
- package/deps/jq/appveyor.yml +0 -53
- package/deps/jq/docs/Gemfile +0 -7
- package/deps/jq/docs/Gemfile.lock +0 -63
- package/deps/jq/docs/Rakefile +0 -24
- package/deps/jq/docs/Rakefile.manual +0 -49
- package/deps/jq/docs/Rakefile.website +0 -76
- package/deps/jq/docs/content/1.tutorial/default.yml +0 -327
- package/deps/jq/docs/content/2.download/default.yml +0 -193
- package/deps/jq/docs/content/index/index.yml +0 -73
- package/deps/jq/docs/public/css/base.scss +0 -181
- package/deps/jq/docs/public/jq.png +0 -0
- package/deps/jq/docs/site.yml +0 -9
- package/deps/jq/docs/templates/default.liquid +0 -34
- package/deps/jq/docs/templates/index.liquid +0 -73
- package/deps/jq/docs/templates/manual.liquid +0 -99
- package/deps/jq/docs/templates/shared/_footer.liquid +0 -10
- package/deps/jq/docs/templates/shared/_head.liquid +0 -17
- package/deps/jq/docs/templates/shared/_navbar.liquid +0 -27
- package/deps/jq/modules/oniguruma/README.ja +0 -195
- package/deps/jq/modules/oniguruma/cmake/dist.cmake +0 -321
- package/deps/jq/modules/oniguruma/contributed/libfuzzer-onig.cpp +0 -31
- package/deps/jq/modules/oniguruma/dist.info +0 -10
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold1_key.c +0 -2250
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold2_key.c +0 -203
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold3_key.c +0 -113
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold_data.c +0 -1225
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data.c +0 -24742
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data_posix.c +0 -4846
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_unfold_key.c +0 -2571
- /package/deps/jq/sig/{jq-release.key → jq-release-old.key} +0 -0
- /package/deps/jq/tests/modules/{.jq → home1/.jq} +0 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* callout.c
|
|
3
|
+
*/
|
|
4
|
+
#include <stdlib.h>
|
|
5
|
+
#include <stdio.h>
|
|
6
|
+
#include <string.h>
|
|
7
|
+
#include "oniguruma.h"
|
|
8
|
+
|
|
9
|
+
static int
|
|
10
|
+
callout_body(OnigCalloutArgs* args, void* user_data)
|
|
11
|
+
{
|
|
12
|
+
int r;
|
|
13
|
+
int i;
|
|
14
|
+
int n;
|
|
15
|
+
int begin, end;
|
|
16
|
+
int used_num;
|
|
17
|
+
int used_bytes;
|
|
18
|
+
OnigCalloutIn in;
|
|
19
|
+
int name_id;
|
|
20
|
+
const UChar* contents;
|
|
21
|
+
const UChar* start;
|
|
22
|
+
const UChar* current;
|
|
23
|
+
regex_t* regex;
|
|
24
|
+
|
|
25
|
+
in = onig_get_callout_in_by_callout_args(args);
|
|
26
|
+
name_id = onig_get_name_id_by_callout_args(args);
|
|
27
|
+
start = onig_get_start_by_callout_args(args);
|
|
28
|
+
current = onig_get_current_by_callout_args(args);
|
|
29
|
+
regex = onig_get_regex_by_callout_args(args);
|
|
30
|
+
|
|
31
|
+
contents = onig_get_contents_by_callout_args(args);
|
|
32
|
+
|
|
33
|
+
if (name_id != ONIG_NON_NAME_ID) {
|
|
34
|
+
UChar* name = onig_get_callout_name_by_name_id(name_id);
|
|
35
|
+
fprintf(stdout, "name: %s\n", name);
|
|
36
|
+
}
|
|
37
|
+
fprintf(stdout,
|
|
38
|
+
"%s %s: contents: \"%s\", start: \"%s\", current: \"%s\"\n",
|
|
39
|
+
contents != 0 ? "CONTENTS" : "NAME",
|
|
40
|
+
in == ONIG_CALLOUT_IN_PROGRESS ? "PROGRESS" : "RETRACTION",
|
|
41
|
+
contents, start, current);
|
|
42
|
+
|
|
43
|
+
fprintf(stdout, "user_data: %s\n", (char* )user_data);
|
|
44
|
+
|
|
45
|
+
(void )onig_get_used_stack_size_in_callout(args, &used_num, &used_bytes);
|
|
46
|
+
fprintf(stdout, "stack: used_num: %d, used_bytes: %d\n", used_num, used_bytes);
|
|
47
|
+
|
|
48
|
+
n = onig_number_of_captures(regex);
|
|
49
|
+
for (i = 1; i <= n; i++) {
|
|
50
|
+
r = onig_get_capture_range_in_callout(args, i, &begin, &end);
|
|
51
|
+
if (r != ONIG_NORMAL) return r;
|
|
52
|
+
|
|
53
|
+
fprintf(stdout, "capture %d: (%d-%d)\n", i, begin, end);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
fflush(stdout);
|
|
57
|
+
return ONIG_CALLOUT_SUCCESS;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
static int
|
|
61
|
+
progress_callout_func(OnigCalloutArgs* args, void* user_data)
|
|
62
|
+
{
|
|
63
|
+
return callout_body(args, user_data);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static int
|
|
67
|
+
retraction_callout_func(OnigCalloutArgs* args, void* user_data)
|
|
68
|
+
{
|
|
69
|
+
return callout_body(args, user_data);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
static int
|
|
73
|
+
foo(OnigCalloutArgs* args, void* user_data)
|
|
74
|
+
{
|
|
75
|
+
return callout_body(args, user_data);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static int
|
|
79
|
+
bar(OnigCalloutArgs* args, void* user_data)
|
|
80
|
+
{
|
|
81
|
+
int r;
|
|
82
|
+
int i;
|
|
83
|
+
int n;
|
|
84
|
+
OnigType type;
|
|
85
|
+
OnigValue val;
|
|
86
|
+
|
|
87
|
+
fprintf(stdout, "bar called.\n");
|
|
88
|
+
|
|
89
|
+
n = onig_get_args_num_by_callout_args(args);
|
|
90
|
+
if (n < 0) {
|
|
91
|
+
fprintf(stderr, "FAIL: onig_get_args_num_by_callout_args(): %d\n", n);
|
|
92
|
+
return n;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
for (i = 0; i < n; i++) {
|
|
96
|
+
r = onig_get_arg_by_callout_args(args, i, &type, &val);
|
|
97
|
+
if (r != 0) {
|
|
98
|
+
fprintf(stderr, "FAIL: onig_get_arg_by_callout_args(): %d\n", r);
|
|
99
|
+
return r;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
fprintf(stdout, "arg[%d]: ", i);
|
|
103
|
+
switch (type) {
|
|
104
|
+
case ONIG_TYPE_LONG:
|
|
105
|
+
fprintf(stdout, "%ld\n", val.l);
|
|
106
|
+
break;
|
|
107
|
+
case ONIG_TYPE_CHAR:
|
|
108
|
+
fprintf(stdout, "0x%06x\n", val.c);
|
|
109
|
+
break;
|
|
110
|
+
case ONIG_TYPE_STRING:
|
|
111
|
+
fprintf(stdout, "'%s'\n", val.s.start);
|
|
112
|
+
break;
|
|
113
|
+
default:
|
|
114
|
+
/* Never come here. But escape warning. */
|
|
115
|
+
break;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return ONIG_CALLOUT_SUCCESS;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
static int
|
|
123
|
+
test(OnigEncoding enc, OnigMatchParam* mp, char* in_pattern, char* in_str)
|
|
124
|
+
{
|
|
125
|
+
int r;
|
|
126
|
+
unsigned char *start, *range, *end;
|
|
127
|
+
regex_t* reg;
|
|
128
|
+
OnigErrorInfo einfo;
|
|
129
|
+
OnigRegion *region;
|
|
130
|
+
UChar* pattern;
|
|
131
|
+
UChar* str;
|
|
132
|
+
|
|
133
|
+
pattern = (UChar* )in_pattern;
|
|
134
|
+
str = (UChar* )in_str;
|
|
135
|
+
|
|
136
|
+
r = onig_new(®, pattern, pattern + strlen((char* )pattern),
|
|
137
|
+
ONIG_OPTION_DEFAULT, enc, ONIG_SYNTAX_DEFAULT, &einfo);
|
|
138
|
+
if (r != ONIG_NORMAL) {
|
|
139
|
+
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
140
|
+
onig_error_code_to_str((UChar* )s, r, &einfo);
|
|
141
|
+
fprintf(stderr, "COMPILE ERROR: %d: %s\n", r, s);
|
|
142
|
+
return -1;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
region = onig_region_new();
|
|
146
|
+
|
|
147
|
+
end = str + strlen((char* )str);
|
|
148
|
+
start = str;
|
|
149
|
+
range = end;
|
|
150
|
+
r = onig_search_with_param(reg, str, end, start, range, region,
|
|
151
|
+
ONIG_OPTION_NONE, mp);
|
|
152
|
+
if (r >= 0) {
|
|
153
|
+
int i;
|
|
154
|
+
|
|
155
|
+
fprintf(stderr, "match at %d\n", r);
|
|
156
|
+
for (i = 0; i < region->num_regs; i++) {
|
|
157
|
+
fprintf(stderr, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
else if (r == ONIG_MISMATCH) {
|
|
161
|
+
fprintf(stderr, "search fail\n");
|
|
162
|
+
}
|
|
163
|
+
else { /* error */
|
|
164
|
+
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
165
|
+
onig_error_code_to_str((UChar* )s, r);
|
|
166
|
+
fprintf(stderr, "SEARCH ERROR: %d: %s\n", r, s);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
onig_region_free(region, 1 /* 1:free self, 0:free contents only */);
|
|
170
|
+
onig_free(reg);
|
|
171
|
+
return r;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
extern int main(int argc, char* argv[])
|
|
175
|
+
{
|
|
176
|
+
int r;
|
|
177
|
+
int id;
|
|
178
|
+
void* user_data;
|
|
179
|
+
UChar* name;
|
|
180
|
+
OnigEncoding use_encs[1];
|
|
181
|
+
unsigned int arg_types[4];
|
|
182
|
+
OnigValue opt_defaults[4];
|
|
183
|
+
OnigEncoding enc;
|
|
184
|
+
OnigMatchParam* mp;
|
|
185
|
+
|
|
186
|
+
enc = ONIG_ENCODING_UTF8;
|
|
187
|
+
use_encs[0] = enc;
|
|
188
|
+
|
|
189
|
+
r = onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0]));
|
|
190
|
+
if (r != ONIG_NORMAL) return -1;
|
|
191
|
+
|
|
192
|
+
/* monitor on */
|
|
193
|
+
r = onig_setup_builtin_monitors_by_ascii_encoded_name(stdout);
|
|
194
|
+
if (r != ONIG_NORMAL) return -1;
|
|
195
|
+
|
|
196
|
+
name = (UChar* )"foo";
|
|
197
|
+
id = onig_set_callout_of_name(enc, ONIG_CALLOUT_TYPE_SINGLE,
|
|
198
|
+
name, name + strlen((char* )name),
|
|
199
|
+
ONIG_CALLOUT_IN_BOTH, foo, 0, 0, 0, 0, 0);
|
|
200
|
+
if (id < 0) {
|
|
201
|
+
fprintf(stderr, "ERROR: fail to set callout of name: %s\n", name);
|
|
202
|
+
//return -1;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
name = (UChar* )"bar";
|
|
206
|
+
arg_types[0] = ONIG_TYPE_LONG;
|
|
207
|
+
arg_types[1] = ONIG_TYPE_STRING;
|
|
208
|
+
arg_types[2] = ONIG_TYPE_CHAR;
|
|
209
|
+
opt_defaults[0].s.start = (UChar* )"I am a option argument's default value.";
|
|
210
|
+
opt_defaults[0].s.end = opt_defaults[0].s.start +
|
|
211
|
+
strlen((char* )opt_defaults[0].s.start);
|
|
212
|
+
opt_defaults[1].c = 0x4422;
|
|
213
|
+
|
|
214
|
+
id = onig_set_callout_of_name(enc, ONIG_CALLOUT_TYPE_SINGLE,
|
|
215
|
+
name, name + strlen((char* )name),
|
|
216
|
+
ONIG_CALLOUT_IN_PROGRESS, bar, 0,
|
|
217
|
+
3, arg_types, 2, opt_defaults);
|
|
218
|
+
if (id < 0) {
|
|
219
|
+
fprintf(stderr, "ERROR: fail to set callout of name: %s\n", name);
|
|
220
|
+
//return -1;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
(void)onig_set_progress_callout(progress_callout_func);
|
|
224
|
+
(void)onig_set_retraction_callout(retraction_callout_func);
|
|
225
|
+
|
|
226
|
+
mp = onig_new_match_param();
|
|
227
|
+
|
|
228
|
+
user_data = (void* )"something data";
|
|
229
|
+
r = onig_set_callout_user_data_of_match_param(mp, user_data);
|
|
230
|
+
if (r != ONIG_NORMAL) {
|
|
231
|
+
fprintf(stderr, "ERROR: fail onig_set_callout_user_data_of_match_param(): %d\n", r);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* callout of contents */
|
|
235
|
+
test(enc, mp, "a+(?{foo bar baz...}X)$", "aaab");
|
|
236
|
+
test(enc, mp, "(?{{!{}#$%&'()=-~^|[_]`@*:+;<>?/.\\,}}[symbols])c", "abc");
|
|
237
|
+
test(enc, mp, "\\A(...)(?{{{booooooooooooo{{ooo}}ooooooooooz}}}<)", "aaab");
|
|
238
|
+
test(enc, mp, "\\A(?!a(?{in prec-read-not}[xxx]X)b)", "ac");
|
|
239
|
+
test(enc, mp, "(?<!a(?{in look-behind-not}X)c)c", "abc");
|
|
240
|
+
|
|
241
|
+
// callout of name
|
|
242
|
+
test(enc, mp, "\\A(*foo)abc", "abc");
|
|
243
|
+
test(enc, mp, "abc(?:(*FAIL)|$)", "abcabc");
|
|
244
|
+
test(enc, mp, "abc(?:$|(*MISMATCH)|abc$)", "abcabc");
|
|
245
|
+
test(enc, mp, "abc(?:(*ERROR)|$)", "abcabc");
|
|
246
|
+
test(enc, mp, "ab(*foo{})(*FAIL)", "abc");
|
|
247
|
+
test(enc, mp, "abc(d|(*ERROR{-999}))", "abc");
|
|
248
|
+
test(enc, mp, "ab(*bar{372,I am a bar's argument,あ})c(*FAIL)", "abc");
|
|
249
|
+
test(enc, mp, "ab(*bar{1234567890})", "abc");
|
|
250
|
+
test(enc, mp, "(?:a(*MAX{2})|b)*", "abbabbabbabb");
|
|
251
|
+
test(enc, mp, "(?:(*MAX{2})a|b)*", "abbabbabbabb");
|
|
252
|
+
test(enc, mp, "(?:(*MAX{1})a|b)*", "bbbbbabbbbbabbbbb");
|
|
253
|
+
test(enc, mp, "(?:(*MAX{3})a|(*MAX{4})b)*", "bbbaabbab");
|
|
254
|
+
test(enc, mp, "(?:(*MAX[A]{3})a|(*MAX[B]{5})b)*(*CMP{A,<,B})", "abababc");
|
|
255
|
+
test(enc, mp, "(?:(*MAX[A]{7})a|(*MAX[B]{5})b)*(*CMP{A,>=,4})", "abababcabababaa");
|
|
256
|
+
test(enc, mp, "(?:(*MAX[T]{3})a)*(?:(*MAX{T})c)*", "aaccc");
|
|
257
|
+
|
|
258
|
+
/* callouts in condition */
|
|
259
|
+
test(enc, mp, "\\A(?(?{in condition})then|else)\\z", "then");
|
|
260
|
+
test(enc, mp, "\\A(?(*FAIL)then|else)\\z", "else");
|
|
261
|
+
|
|
262
|
+
/* monitor test */
|
|
263
|
+
test(enc, mp, "(?:(*MON{X})(*FAIL)|.{,3}(*MON[FOO])k)", "abcdefghijk");
|
|
264
|
+
|
|
265
|
+
onig_free_match_param(mp);
|
|
266
|
+
onig_end();
|
|
267
|
+
return 0;
|
|
268
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* count.c
|
|
3
|
+
*/
|
|
4
|
+
#include <stdlib.h>
|
|
5
|
+
#include <stdio.h>
|
|
6
|
+
#include <string.h>
|
|
7
|
+
#include "oniguruma.h"
|
|
8
|
+
|
|
9
|
+
#define ulen(enc, p) onigenc_str_bytelen_null(enc, (UChar* )p)
|
|
10
|
+
|
|
11
|
+
static int
|
|
12
|
+
test(OnigEncoding enc, OnigMatchParam* mp, char* in_pattern, char* in_str)
|
|
13
|
+
{
|
|
14
|
+
int r;
|
|
15
|
+
unsigned char *start, *range, *end;
|
|
16
|
+
regex_t* reg;
|
|
17
|
+
OnigErrorInfo einfo;
|
|
18
|
+
OnigRegion *region;
|
|
19
|
+
UChar* pattern;
|
|
20
|
+
UChar* str;
|
|
21
|
+
|
|
22
|
+
pattern = (UChar* )in_pattern;
|
|
23
|
+
str = (UChar* )in_str;
|
|
24
|
+
|
|
25
|
+
r = onig_new(®, pattern, pattern + ulen(enc, pattern),
|
|
26
|
+
ONIG_OPTION_DEFAULT, enc, ONIG_SYNTAX_DEFAULT, &einfo);
|
|
27
|
+
if (r != ONIG_NORMAL) {
|
|
28
|
+
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
29
|
+
onig_error_code_to_str((UChar* )s, r, &einfo);
|
|
30
|
+
fprintf(stderr, "COMPILE ERROR: %d: %s\n", r, s);
|
|
31
|
+
return -1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
region = onig_region_new();
|
|
35
|
+
|
|
36
|
+
end = str + ulen(enc, str);
|
|
37
|
+
start = str;
|
|
38
|
+
range = end;
|
|
39
|
+
r = onig_search_with_param(reg, str, end, start, range, region,
|
|
40
|
+
ONIG_OPTION_NONE, mp);
|
|
41
|
+
if (r >= 0) {
|
|
42
|
+
int slot;
|
|
43
|
+
OnigValue val;
|
|
44
|
+
char* tag;
|
|
45
|
+
int tag_len;
|
|
46
|
+
|
|
47
|
+
fprintf(stdout, "match at %d\n", r);
|
|
48
|
+
|
|
49
|
+
show_count:
|
|
50
|
+
if (enc == ONIG_ENCODING_UTF16_BE) {
|
|
51
|
+
tag = "\000x\000\000";
|
|
52
|
+
}
|
|
53
|
+
else if (enc == ONIG_ENCODING_UTF16_LE) {
|
|
54
|
+
tag = "x\000\000\000";
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
tag = "x";
|
|
58
|
+
}
|
|
59
|
+
tag_len = ulen(enc, tag);
|
|
60
|
+
|
|
61
|
+
slot = 0;
|
|
62
|
+
r = onig_get_callout_data_by_tag_dont_clear_old(reg, mp, (UChar* )tag,
|
|
63
|
+
(UChar* )tag + tag_len, slot, 0, &val);
|
|
64
|
+
if (r < ONIG_NORMAL) goto err;
|
|
65
|
+
else if (r == ONIG_VALUE_IS_NOT_SET) {
|
|
66
|
+
fprintf(stdout, "COUNT[x]: NO DATA\n");
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
fprintf(stdout, "COUNT[x]: %ld\n", val.l);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
else if (r == ONIG_MISMATCH) {
|
|
73
|
+
fprintf(stdout, "search fail\n");
|
|
74
|
+
goto show_count;
|
|
75
|
+
}
|
|
76
|
+
else { /* error */
|
|
77
|
+
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
78
|
+
err:
|
|
79
|
+
onig_error_code_to_str((UChar* )s, r);
|
|
80
|
+
fprintf(stdout, "SEARCH ERROR: %d: %s\n", r, s);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
onig_region_free(region, 1 /* 1:free self, 0:free contents only */);
|
|
84
|
+
onig_free(reg);
|
|
85
|
+
return r;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
extern int main(int argc, char* argv[])
|
|
89
|
+
{
|
|
90
|
+
int r;
|
|
91
|
+
OnigMatchParam* mp;
|
|
92
|
+
OnigEncoding encs[3];
|
|
93
|
+
|
|
94
|
+
encs[0] = ONIG_ENCODING_UTF8;
|
|
95
|
+
encs[1] = ONIG_ENCODING_UTF16_BE;
|
|
96
|
+
encs[2] = ONIG_ENCODING_UTF16_LE;
|
|
97
|
+
|
|
98
|
+
r = onig_initialize(encs, sizeof(encs)/sizeof(encs[0]));
|
|
99
|
+
if (r != ONIG_NORMAL) {
|
|
100
|
+
fprintf(stderr, "FAIL: onig_initialize(): %d\n", r);
|
|
101
|
+
return -1;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
mp = onig_new_match_param();
|
|
105
|
+
|
|
106
|
+
test(encs[0], mp, "abc(.(*COUNT[x]))*(*FAIL)", "abcdefg");
|
|
107
|
+
test(encs[0], mp, "abc(.(*COUNT[_any_]))*(.(*COUNT[x]))*d", "abcdefg");
|
|
108
|
+
/* fail count */
|
|
109
|
+
test(encs[0], mp, "abc(.(*COUNT[x]{<}))*f", "abcdefg");
|
|
110
|
+
/* success count */
|
|
111
|
+
test(encs[0], mp, "abc(.(*COUNT[x]{X}))*f", "abcdefg");
|
|
112
|
+
/* passed count */
|
|
113
|
+
test(encs[0], mp, "abc(.(*COUNT[x]))*f", "abcdefg");
|
|
114
|
+
test(encs[0], mp, "a(.(*COUNT[x]))*z", "abcd\nabcdz");
|
|
115
|
+
/* total count */
|
|
116
|
+
test(encs[0], mp, "a(.(*TOTAL_COUNT[x]))*z", "abcd\nabcdz");
|
|
117
|
+
|
|
118
|
+
test(encs[1], mp, "\000a\000b\000c\000(\000.\000(\000*\000C\000O\000U\000N\000T\000[\000x\000]\000)\000)\000*\000(\000*\000F\000A\000I\000L\000)\000\000", "\000a\000b\000c\000d\000e\000f\000g\000\000");
|
|
119
|
+
|
|
120
|
+
test(encs[2], mp, "a\000b\000c\000(\000.\000(\000*\000C\000O\000U\000N\000T\000[\000x\000]\000)\000)\000*\000(\000*\000F\000A\000I\000L\000)\000\000\000", "a\000b\000c\000d\000e\000f\000g\000\000\000");
|
|
121
|
+
|
|
122
|
+
onig_free_match_param(mp);
|
|
123
|
+
onig_end();
|
|
124
|
+
return 0;
|
|
125
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* crnl.c 2007/05/30 K.Kosako
|
|
3
3
|
*
|
|
4
4
|
* !!! You should enable USE_CRNL_AS_LINE_TERMINATOR. !!!
|
|
5
|
-
*
|
|
5
|
+
*
|
|
6
6
|
* USE_CRNL_AS_LINE_TERMINATOR config test program.
|
|
7
7
|
*/
|
|
8
8
|
#include <stdio.h>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
static int nfail = 0;
|
|
13
13
|
|
|
14
14
|
static void result(int no, int from, int to,
|
|
15
|
-
|
|
15
|
+
int expected_from, int expected_to)
|
|
16
16
|
{
|
|
17
17
|
fprintf(stderr, "%3d: ", no);
|
|
18
18
|
if (from == expected_from && to == expected_to) {
|
|
@@ -20,7 +20,7 @@ static void result(int no, int from, int to,
|
|
|
20
20
|
}
|
|
21
21
|
else {
|
|
22
22
|
fprintf(stderr, "Fail: expected: (%d-%d), result: (%d-%d)\n",
|
|
23
|
-
|
|
23
|
+
expected_from, expected_to, from, to);
|
|
24
24
|
|
|
25
25
|
nfail++;
|
|
26
26
|
}
|
|
@@ -41,7 +41,7 @@ x(int no, char* pattern_arg, char* str_arg,
|
|
|
41
41
|
str = (UChar* )str_arg;
|
|
42
42
|
|
|
43
43
|
r = onig_new(®, pattern, pattern + strlen((char* )pattern),
|
|
44
|
-
|
|
44
|
+
ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo);
|
|
45
45
|
if (r != ONIG_NORMAL) {
|
|
46
46
|
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
47
47
|
onig_error_code_to_str(s, r, &einfo);
|
|
@@ -65,6 +65,8 @@ x(int no, char* pattern_arg, char* str_arg,
|
|
|
65
65
|
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
66
66
|
onig_error_code_to_str(s, r);
|
|
67
67
|
fprintf(stderr, "ERROR: %s\n", s);
|
|
68
|
+
onig_region_free(region, 1 /* 1:free self, 0:free contents only */);
|
|
69
|
+
onig_free(reg);
|
|
68
70
|
return -1;
|
|
69
71
|
}
|
|
70
72
|
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* echo.c
|
|
3
|
+
*/
|
|
4
|
+
#include <stdlib.h>
|
|
5
|
+
#include <stdio.h>
|
|
6
|
+
#include <string.h>
|
|
7
|
+
#include "oniguruma.h"
|
|
8
|
+
|
|
9
|
+
static int
|
|
10
|
+
echo(OnigCalloutArgs* args, void* user_data)
|
|
11
|
+
{
|
|
12
|
+
int r;
|
|
13
|
+
OnigCalloutIn in;
|
|
14
|
+
OnigType type;
|
|
15
|
+
OnigValue val;
|
|
16
|
+
FILE* fp;
|
|
17
|
+
|
|
18
|
+
fp = stdout;
|
|
19
|
+
|
|
20
|
+
in = onig_get_callout_in_by_callout_args(args);
|
|
21
|
+
|
|
22
|
+
r = onig_get_arg_by_callout_args(args, 1, &type, &val);
|
|
23
|
+
if (r != ONIG_NORMAL) return r;
|
|
24
|
+
|
|
25
|
+
if (in == ONIG_CALLOUT_IN_PROGRESS) {
|
|
26
|
+
if (val.c == '<')
|
|
27
|
+
return ONIG_CALLOUT_SUCCESS;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
if (val.c != 'X' && val.c != '<')
|
|
31
|
+
return ONIG_CALLOUT_SUCCESS;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
r = onig_get_arg_by_callout_args(args, 0, &type, &val);
|
|
35
|
+
if (r != ONIG_NORMAL) return r;
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
fprintf(fp, "%s %s\n",
|
|
39
|
+
(in == ONIG_CALLOUT_IN_PROGRESS ? "=>" : "<="),
|
|
40
|
+
val.s.start);
|
|
41
|
+
fflush(fp);
|
|
42
|
+
|
|
43
|
+
return ONIG_CALLOUT_SUCCESS;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
static int
|
|
48
|
+
test(OnigEncoding enc, char* in_pattern, char* in_str)
|
|
49
|
+
{
|
|
50
|
+
int r;
|
|
51
|
+
unsigned char *start, *range, *end;
|
|
52
|
+
regex_t* reg;
|
|
53
|
+
OnigErrorInfo einfo;
|
|
54
|
+
OnigRegion *region;
|
|
55
|
+
UChar* pattern;
|
|
56
|
+
UChar* str;
|
|
57
|
+
|
|
58
|
+
pattern = (UChar* )in_pattern;
|
|
59
|
+
str = (UChar* )in_str;
|
|
60
|
+
|
|
61
|
+
r = onig_new(®, pattern, pattern + strlen((char* )pattern),
|
|
62
|
+
ONIG_OPTION_DEFAULT, enc, ONIG_SYNTAX_DEFAULT, &einfo);
|
|
63
|
+
if (r != ONIG_NORMAL) {
|
|
64
|
+
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
65
|
+
onig_error_code_to_str((UChar* )s, r, &einfo);
|
|
66
|
+
fprintf(stderr, "COMPILE ERROR: %d: %s\n", r, s);
|
|
67
|
+
return -1;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
region = onig_region_new();
|
|
71
|
+
|
|
72
|
+
end = str + strlen((char* )str);
|
|
73
|
+
start = str;
|
|
74
|
+
range = end;
|
|
75
|
+
r = onig_search(reg, str, end, start, range, region, ONIG_OPTION_NONE);
|
|
76
|
+
if (r >= 0) {
|
|
77
|
+
int i;
|
|
78
|
+
|
|
79
|
+
fprintf(stderr, "match at %d\n", r);
|
|
80
|
+
for (i = 0; i < region->num_regs; i++) {
|
|
81
|
+
fprintf(stderr, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
else if (r == ONIG_MISMATCH) {
|
|
85
|
+
fprintf(stderr, "search fail\n");
|
|
86
|
+
}
|
|
87
|
+
else { /* error */
|
|
88
|
+
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
89
|
+
onig_error_code_to_str((UChar* )s, r);
|
|
90
|
+
fprintf(stderr, "SEARCH ERROR: %d: %s\n", r, s);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
onig_region_free(region, 1 /* 1:free self, 0:free contents only */);
|
|
94
|
+
onig_free(reg);
|
|
95
|
+
return r;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
extern int main(int argc, char* argv[])
|
|
99
|
+
{
|
|
100
|
+
int r;
|
|
101
|
+
int id;
|
|
102
|
+
UChar* name;
|
|
103
|
+
OnigEncoding use_encs[1];
|
|
104
|
+
OnigType arg_types[4];
|
|
105
|
+
OnigValue opt_defaults[4];
|
|
106
|
+
OnigEncoding enc;
|
|
107
|
+
|
|
108
|
+
enc = ONIG_ENCODING_UTF8;
|
|
109
|
+
use_encs[0] = enc;
|
|
110
|
+
|
|
111
|
+
r = onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0]));
|
|
112
|
+
if (r != ONIG_NORMAL) return -1;
|
|
113
|
+
|
|
114
|
+
name = (UChar* )"echo";
|
|
115
|
+
arg_types[0] = ONIG_TYPE_STRING;
|
|
116
|
+
arg_types[1] = ONIG_TYPE_CHAR;
|
|
117
|
+
opt_defaults[0].s.start = (UChar* )"echo";
|
|
118
|
+
opt_defaults[0].s.end = opt_defaults[0].s.start +
|
|
119
|
+
strlen((char* )opt_defaults[0].s.start);
|
|
120
|
+
opt_defaults[1].c = '>';
|
|
121
|
+
|
|
122
|
+
id = onig_set_callout_of_name(enc, ONIG_CALLOUT_TYPE_SINGLE,
|
|
123
|
+
name, name + strlen((char* )name),
|
|
124
|
+
ONIG_CALLOUT_IN_BOTH, echo, 0,
|
|
125
|
+
2, arg_types, 2, opt_defaults);
|
|
126
|
+
if (id < 0) {
|
|
127
|
+
fprintf(stderr, "ERROR: fail to set callout of name: %s\n", name);
|
|
128
|
+
return -1;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
test(enc, "(?:(*echo{abc!!!})a|b)*", "abba");
|
|
132
|
+
test(enc, "(?:(*echo{xyz,X})a|b)*", "abba");
|
|
133
|
+
|
|
134
|
+
onig_end();
|
|
135
|
+
return 0;
|
|
136
|
+
}
|