@port-labs/jq-node-bindings 0.0.13 → 0.0.15-dev1
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 +41 -19
- 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/lib/index.js +3 -0
- package/lib/jq.js +15 -1
- package/lib/templateAsync.js +137 -0
- package/package.json +7 -7
- 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
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
gb18030.c - Oniguruma (regular expression library)
|
|
3
3
|
**********************************************************************/
|
|
4
4
|
/*-
|
|
5
|
-
* Copyright (c) 2005-
|
|
6
|
-
* K.Kosako
|
|
5
|
+
* Copyright (c) 2005-2023 KUBO Takehiro <kubo AT jiubao DOT org>
|
|
6
|
+
* K.Kosako
|
|
7
7
|
* All rights reserved.
|
|
8
8
|
*
|
|
9
9
|
* Redistribution and use in source and binary forms, with or without
|
|
@@ -30,10 +30,23 @@
|
|
|
30
30
|
|
|
31
31
|
#include "regenc.h"
|
|
32
32
|
|
|
33
|
-
#
|
|
34
|
-
|
|
33
|
+
/* #define DEBUG_GB18030 */
|
|
34
|
+
|
|
35
|
+
#ifndef DEBUG_GB18030
|
|
36
|
+
|
|
37
|
+
#define DEBUG_OUT(arg)
|
|
38
|
+
|
|
35
39
|
#else
|
|
36
|
-
|
|
40
|
+
|
|
41
|
+
#ifndef NEED_TO_INCLUDE_STDIO
|
|
42
|
+
#define NEED_TO_INCLUDE_STDIO
|
|
43
|
+
#endif
|
|
44
|
+
|
|
45
|
+
/* for printf() */
|
|
46
|
+
#include "regint.h"
|
|
47
|
+
|
|
48
|
+
#define DEBUG_OUT(arg) printf arg
|
|
49
|
+
|
|
37
50
|
#endif
|
|
38
51
|
|
|
39
52
|
enum {
|
|
@@ -67,14 +80,38 @@ gb18030_mbc_enc_len(const UChar* p)
|
|
|
67
80
|
{
|
|
68
81
|
if (GB18030_MAP[*p] != CM)
|
|
69
82
|
return 1;
|
|
83
|
+
|
|
70
84
|
p++;
|
|
71
85
|
if (GB18030_MAP[*p] == C4)
|
|
72
86
|
return 4;
|
|
73
|
-
|
|
74
|
-
return 1; /* illegal sequence */
|
|
87
|
+
|
|
75
88
|
return 2;
|
|
76
89
|
}
|
|
77
90
|
|
|
91
|
+
static int
|
|
92
|
+
gb18030_code_to_mbclen(OnigCodePoint code)
|
|
93
|
+
{
|
|
94
|
+
if ((code & 0xff000000) != 0) {
|
|
95
|
+
if (GB18030_MAP[(int )(code >> 24) & 0xff] == CM)
|
|
96
|
+
if (GB18030_MAP[(int )(code >> 16) & 0xff] == C4)
|
|
97
|
+
return 4;
|
|
98
|
+
}
|
|
99
|
+
else if ((code & 0xff0000) != 0) return ONIGERR_INVALID_CODE_POINT_VALUE;
|
|
100
|
+
else if ((code & 0xff00) != 0) {
|
|
101
|
+
if (GB18030_MAP[(int )(code >> 8) & 0xff] == CM) {
|
|
102
|
+
char c = GB18030_MAP[(int )code & 0xff];
|
|
103
|
+
if (c == CM || c == C2)
|
|
104
|
+
return 2;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
if (GB18030_MAP[(int )(code & 0xff)] != CM)
|
|
109
|
+
return 1;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return ONIGERR_INVALID_CODE_POINT_VALUE;
|
|
113
|
+
}
|
|
114
|
+
|
|
78
115
|
static int
|
|
79
116
|
is_valid_mbc_string(const UChar* p, const UChar* end)
|
|
80
117
|
{
|
|
@@ -89,25 +126,25 @@ is_valid_mbc_string(const UChar* p, const UChar* end)
|
|
|
89
126
|
p++;
|
|
90
127
|
if (p >= end) return FALSE;
|
|
91
128
|
if (*p < 0x40) {
|
|
92
|
-
|
|
93
|
-
|
|
129
|
+
if (*p < 0x30 || *p > 0x39)
|
|
130
|
+
return FALSE;
|
|
94
131
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
132
|
+
p++;
|
|
133
|
+
if (p >= end) return FALSE;
|
|
134
|
+
if (*p < 0x81 || *p == 0xff) return FALSE;
|
|
98
135
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
136
|
+
p++;
|
|
137
|
+
if (p >= end) return FALSE;
|
|
138
|
+
if (*p < 0x30 || *p > 0x39)
|
|
139
|
+
return FALSE;
|
|
103
140
|
|
|
104
|
-
|
|
141
|
+
p++;
|
|
105
142
|
}
|
|
106
143
|
else if (*p == 0x7f || *p == 0xff) {
|
|
107
|
-
|
|
144
|
+
return FALSE;
|
|
108
145
|
}
|
|
109
146
|
else {
|
|
110
|
-
|
|
147
|
+
p++;
|
|
111
148
|
}
|
|
112
149
|
}
|
|
113
150
|
}
|
|
@@ -135,15 +172,6 @@ gb18030_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end,
|
|
|
135
172
|
pp, end, lower);
|
|
136
173
|
}
|
|
137
174
|
|
|
138
|
-
#if 0
|
|
139
|
-
static int
|
|
140
|
-
gb18030_is_mbc_ambiguous(OnigCaseFoldType flag,
|
|
141
|
-
const UChar** pp, const UChar* end)
|
|
142
|
-
{
|
|
143
|
-
return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_GB18030, flag, pp, end);
|
|
144
|
-
}
|
|
145
|
-
#endif
|
|
146
|
-
|
|
147
175
|
static int
|
|
148
176
|
gb18030_is_code_ctype(OnigCodePoint code, unsigned int ctype)
|
|
149
177
|
{
|
|
@@ -151,7 +179,7 @@ gb18030_is_code_ctype(OnigCodePoint code, unsigned int ctype)
|
|
|
151
179
|
}
|
|
152
180
|
|
|
153
181
|
enum state {
|
|
154
|
-
S_START,
|
|
182
|
+
S_START = 0,
|
|
155
183
|
S_one_C2,
|
|
156
184
|
S_one_C4,
|
|
157
185
|
S_one_CM,
|
|
@@ -184,29 +212,57 @@ enum state {
|
|
|
184
212
|
S_odd_CM_even_C4CM,
|
|
185
213
|
};
|
|
186
214
|
|
|
215
|
+
#ifdef DEBUG_GB18030
|
|
216
|
+
static char* StateNames[] = {
|
|
217
|
+
"S_START",
|
|
218
|
+
"S_one_C2",
|
|
219
|
+
"S_one_C4",
|
|
220
|
+
"S_one_CM",
|
|
221
|
+
"S_odd_CM_one_CX",
|
|
222
|
+
"S_even_CM_one_CX",
|
|
223
|
+
"S_one_CMC4",
|
|
224
|
+
"S_odd_CMC4",
|
|
225
|
+
"S_one_C4_odd_CMC4",
|
|
226
|
+
"S_even_CMC4",
|
|
227
|
+
"S_one_C4_even_CMC4",
|
|
228
|
+
"S_odd_CM_odd_CMC4",
|
|
229
|
+
"S_even_CM_odd_CMC4",
|
|
230
|
+
"S_odd_CM_even_CMC4",
|
|
231
|
+
"S_even_CM_even_CMC4",
|
|
232
|
+
"S_odd_C4CM",
|
|
233
|
+
"S_one_CM_odd_C4CM",
|
|
234
|
+
"S_even_C4CM",
|
|
235
|
+
"S_one_CM_even_C4CM",
|
|
236
|
+
"S_even_CM_odd_C4CM",
|
|
237
|
+
"S_odd_CM_odd_C4CM",
|
|
238
|
+
"S_even_CM_even_C4CM",
|
|
239
|
+
"S_odd_CM_even_C4CM"
|
|
240
|
+
};
|
|
241
|
+
#endif
|
|
242
|
+
|
|
187
243
|
static UChar*
|
|
188
244
|
gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
189
245
|
{
|
|
190
246
|
const UChar *p;
|
|
191
247
|
enum state state = S_START;
|
|
192
248
|
|
|
193
|
-
|
|
249
|
+
DEBUG_OUT(("----------------\n"));
|
|
194
250
|
for (p = s; p >= start; p--) {
|
|
195
|
-
|
|
251
|
+
DEBUG_OUT(("%5d: state %-19s (0x%02x)->\n", (int )(p - start), StateNames[state], *p));
|
|
196
252
|
switch (state) {
|
|
197
253
|
case S_START:
|
|
198
254
|
switch (GB18030_MAP[*p]) {
|
|
199
255
|
case C1:
|
|
200
|
-
|
|
256
|
+
return (UChar *)s;
|
|
201
257
|
case C2:
|
|
202
|
-
|
|
203
|
-
|
|
258
|
+
state = S_one_C2; /* C2 */
|
|
259
|
+
break;
|
|
204
260
|
case C4:
|
|
205
|
-
|
|
206
|
-
|
|
261
|
+
state = S_one_C4; /* C4 */
|
|
262
|
+
break;
|
|
207
263
|
case CM:
|
|
208
|
-
|
|
209
|
-
|
|
264
|
+
state = S_one_CM; /* CM */
|
|
265
|
+
break;
|
|
210
266
|
}
|
|
211
267
|
break;
|
|
212
268
|
case S_one_C2: /* C2 */
|
|
@@ -214,10 +270,10 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
214
270
|
case C1:
|
|
215
271
|
case C2:
|
|
216
272
|
case C4:
|
|
217
|
-
|
|
273
|
+
return (UChar *)s;
|
|
218
274
|
case CM:
|
|
219
|
-
|
|
220
|
-
|
|
275
|
+
state = S_odd_CM_one_CX; /* CM C2 */
|
|
276
|
+
break;
|
|
221
277
|
}
|
|
222
278
|
break;
|
|
223
279
|
case S_one_C4: /* C4 */
|
|
@@ -225,23 +281,23 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
225
281
|
case C1:
|
|
226
282
|
case C2:
|
|
227
283
|
case C4:
|
|
228
|
-
|
|
284
|
+
return (UChar *)s;
|
|
229
285
|
case CM:
|
|
230
|
-
|
|
231
|
-
|
|
286
|
+
state = S_one_CMC4;
|
|
287
|
+
break;
|
|
232
288
|
}
|
|
233
289
|
break;
|
|
234
290
|
case S_one_CM: /* CM */
|
|
235
291
|
switch (GB18030_MAP[*p]) {
|
|
236
292
|
case C1:
|
|
237
293
|
case C2:
|
|
238
|
-
|
|
294
|
+
return (UChar *)s;
|
|
239
295
|
case C4:
|
|
240
|
-
|
|
241
|
-
|
|
296
|
+
state = S_odd_C4CM;
|
|
297
|
+
break;
|
|
242
298
|
case CM:
|
|
243
|
-
|
|
244
|
-
|
|
299
|
+
state = S_odd_CM_one_CX; /* CM CM */
|
|
300
|
+
break;
|
|
245
301
|
}
|
|
246
302
|
break;
|
|
247
303
|
|
|
@@ -250,10 +306,10 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
250
306
|
case C1:
|
|
251
307
|
case C2:
|
|
252
308
|
case C4:
|
|
253
|
-
|
|
309
|
+
return (UChar *)(s - 1);
|
|
254
310
|
case CM:
|
|
255
|
-
|
|
256
|
-
|
|
311
|
+
state = S_even_CM_one_CX;
|
|
312
|
+
break;
|
|
257
313
|
}
|
|
258
314
|
break;
|
|
259
315
|
case S_even_CM_one_CX: /* CM CM C2 */ /* CM CM CM */ /* CM CM C4 */
|
|
@@ -261,10 +317,10 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
261
317
|
case C1:
|
|
262
318
|
case C2:
|
|
263
319
|
case C4:
|
|
264
|
-
|
|
320
|
+
return (UChar *)s;
|
|
265
321
|
case CM:
|
|
266
|
-
|
|
267
|
-
|
|
322
|
+
state = S_odd_CM_one_CX;
|
|
323
|
+
break;
|
|
268
324
|
}
|
|
269
325
|
break;
|
|
270
326
|
|
|
@@ -272,26 +328,26 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
272
328
|
switch (GB18030_MAP[*p]) {
|
|
273
329
|
case C1:
|
|
274
330
|
case C2:
|
|
275
|
-
|
|
331
|
+
return (UChar *)(s - 1);
|
|
276
332
|
case C4:
|
|
277
|
-
|
|
278
|
-
|
|
333
|
+
state = S_one_C4_odd_CMC4; /* C4 CM C4 */
|
|
334
|
+
break;
|
|
279
335
|
case CM:
|
|
280
|
-
|
|
281
|
-
|
|
336
|
+
state = S_even_CM_one_CX; /* CM CM C4 */
|
|
337
|
+
break;
|
|
282
338
|
}
|
|
283
339
|
break;
|
|
284
340
|
case S_odd_CMC4: /* CM C4 CM C4 CM C4 */
|
|
285
341
|
switch (GB18030_MAP[*p]) {
|
|
286
342
|
case C1:
|
|
287
343
|
case C2:
|
|
288
|
-
|
|
344
|
+
return (UChar *)(s - 1);
|
|
289
345
|
case C4:
|
|
290
|
-
|
|
291
|
-
|
|
346
|
+
state = S_one_C4_odd_CMC4;
|
|
347
|
+
break;
|
|
292
348
|
case CM:
|
|
293
|
-
|
|
294
|
-
|
|
349
|
+
state = S_odd_CM_odd_CMC4;
|
|
350
|
+
break;
|
|
295
351
|
}
|
|
296
352
|
break;
|
|
297
353
|
case S_one_C4_odd_CMC4: /* C4 CM C4 */
|
|
@@ -299,23 +355,23 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
299
355
|
case C1:
|
|
300
356
|
case C2:
|
|
301
357
|
case C4:
|
|
302
|
-
|
|
358
|
+
return (UChar *)(s - 1);
|
|
303
359
|
case CM:
|
|
304
|
-
|
|
305
|
-
|
|
360
|
+
state = S_even_CMC4; /* CM C4 CM C4 */
|
|
361
|
+
break;
|
|
306
362
|
}
|
|
307
363
|
break;
|
|
308
364
|
case S_even_CMC4: /* CM C4 CM C4 */
|
|
309
365
|
switch (GB18030_MAP[*p]) {
|
|
310
366
|
case C1:
|
|
311
367
|
case C2:
|
|
312
|
-
|
|
368
|
+
return (UChar *)(s - 3);
|
|
313
369
|
case C4:
|
|
314
|
-
|
|
315
|
-
|
|
370
|
+
state = S_one_C4_even_CMC4;
|
|
371
|
+
break;
|
|
316
372
|
case CM:
|
|
317
|
-
|
|
318
|
-
|
|
373
|
+
state = S_odd_CM_even_CMC4;
|
|
374
|
+
break;
|
|
319
375
|
}
|
|
320
376
|
break;
|
|
321
377
|
case S_one_C4_even_CMC4: /* C4 CM C4 CM C4 */
|
|
@@ -323,10 +379,10 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
323
379
|
case C1:
|
|
324
380
|
case C2:
|
|
325
381
|
case C4:
|
|
326
|
-
|
|
382
|
+
return (UChar *)(s - 3);
|
|
327
383
|
case CM:
|
|
328
|
-
|
|
329
|
-
|
|
384
|
+
state = S_odd_CMC4;
|
|
385
|
+
break;
|
|
330
386
|
}
|
|
331
387
|
break;
|
|
332
388
|
|
|
@@ -335,10 +391,10 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
335
391
|
case C1:
|
|
336
392
|
case C2:
|
|
337
393
|
case C4:
|
|
338
|
-
|
|
394
|
+
return (UChar *)(s - 3);
|
|
339
395
|
case CM:
|
|
340
|
-
|
|
341
|
-
|
|
396
|
+
state = S_even_CM_odd_CMC4;
|
|
397
|
+
break;
|
|
342
398
|
}
|
|
343
399
|
break;
|
|
344
400
|
case S_even_CM_odd_CMC4: /* CM CM CM C4 CM C4 CM C4 */
|
|
@@ -346,10 +402,10 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
346
402
|
case C1:
|
|
347
403
|
case C2:
|
|
348
404
|
case C4:
|
|
349
|
-
|
|
405
|
+
return (UChar *)(s - 1);
|
|
350
406
|
case CM:
|
|
351
|
-
|
|
352
|
-
|
|
407
|
+
state = S_odd_CM_odd_CMC4;
|
|
408
|
+
break;
|
|
353
409
|
}
|
|
354
410
|
break;
|
|
355
411
|
|
|
@@ -358,10 +414,10 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
358
414
|
case C1:
|
|
359
415
|
case C2:
|
|
360
416
|
case C4:
|
|
361
|
-
|
|
417
|
+
return (UChar *)(s - 1);
|
|
362
418
|
case CM:
|
|
363
|
-
|
|
364
|
-
|
|
419
|
+
state = S_even_CM_even_CMC4;
|
|
420
|
+
break;
|
|
365
421
|
}
|
|
366
422
|
break;
|
|
367
423
|
case S_even_CM_even_CMC4: /* CM CM CM C4 CM C4 */
|
|
@@ -369,10 +425,10 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
369
425
|
case C1:
|
|
370
426
|
case C2:
|
|
371
427
|
case C4:
|
|
372
|
-
|
|
428
|
+
return (UChar *)(s - 3);
|
|
373
429
|
case CM:
|
|
374
|
-
|
|
375
|
-
|
|
430
|
+
state = S_odd_CM_even_CMC4;
|
|
431
|
+
break;
|
|
376
432
|
}
|
|
377
433
|
break;
|
|
378
434
|
|
|
@@ -381,23 +437,23 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
381
437
|
case C1:
|
|
382
438
|
case C2:
|
|
383
439
|
case C4:
|
|
384
|
-
|
|
440
|
+
return (UChar *)s;
|
|
385
441
|
case CM:
|
|
386
|
-
|
|
387
|
-
|
|
442
|
+
state = S_one_CM_odd_C4CM; /* CM C4 CM */
|
|
443
|
+
break;
|
|
388
444
|
}
|
|
389
445
|
break;
|
|
390
446
|
case S_one_CM_odd_C4CM: /* CM C4 CM */ /* CM C4 CM C4 CM C4 CM */
|
|
391
447
|
switch (GB18030_MAP[*p]) {
|
|
392
448
|
case C1:
|
|
393
449
|
case C2:
|
|
394
|
-
|
|
450
|
+
return (UChar *)(s - 2); /* |CM C4 CM */
|
|
395
451
|
case C4:
|
|
396
|
-
|
|
397
|
-
|
|
452
|
+
state = S_even_C4CM;
|
|
453
|
+
break;
|
|
398
454
|
case CM:
|
|
399
|
-
|
|
400
|
-
|
|
455
|
+
state = S_even_CM_odd_C4CM;
|
|
456
|
+
break;
|
|
401
457
|
}
|
|
402
458
|
break;
|
|
403
459
|
case S_even_C4CM: /* C4 CM C4 CM */
|
|
@@ -405,23 +461,23 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
405
461
|
case C1:
|
|
406
462
|
case C2:
|
|
407
463
|
case C4:
|
|
408
|
-
|
|
464
|
+
return (UChar *)(s - 2); /* C4|CM C4 CM */
|
|
409
465
|
case CM:
|
|
410
|
-
|
|
411
|
-
|
|
466
|
+
state = S_one_CM_even_C4CM;
|
|
467
|
+
break;
|
|
412
468
|
}
|
|
413
469
|
break;
|
|
414
470
|
case S_one_CM_even_C4CM: /* CM C4 CM C4 CM */
|
|
415
471
|
switch (GB18030_MAP[*p]) {
|
|
416
472
|
case C1:
|
|
417
473
|
case C2:
|
|
418
|
-
|
|
474
|
+
return (UChar *)(s - 0); /*|CM C4 CM C4|CM */
|
|
419
475
|
case C4:
|
|
420
|
-
|
|
421
|
-
|
|
476
|
+
state = S_odd_C4CM;
|
|
477
|
+
break;
|
|
422
478
|
case CM:
|
|
423
|
-
|
|
424
|
-
|
|
479
|
+
state = S_even_CM_even_C4CM;
|
|
480
|
+
break;
|
|
425
481
|
}
|
|
426
482
|
break;
|
|
427
483
|
|
|
@@ -430,10 +486,10 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
430
486
|
case C1:
|
|
431
487
|
case C2:
|
|
432
488
|
case C4:
|
|
433
|
-
|
|
489
|
+
return (UChar *)(s - 0); /* |CM CM|C4|CM */
|
|
434
490
|
case CM:
|
|
435
|
-
|
|
436
|
-
|
|
491
|
+
state = S_odd_CM_odd_C4CM;
|
|
492
|
+
break;
|
|
437
493
|
}
|
|
438
494
|
break;
|
|
439
495
|
case S_odd_CM_odd_C4CM: /* CM CM CM C4 CM */
|
|
@@ -441,10 +497,10 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
441
497
|
case C1:
|
|
442
498
|
case C2:
|
|
443
499
|
case C4:
|
|
444
|
-
|
|
500
|
+
return (UChar *)(s - 2); /* |CM CM|CM C4 CM */
|
|
445
501
|
case CM:
|
|
446
|
-
|
|
447
|
-
|
|
502
|
+
state = S_even_CM_odd_C4CM;
|
|
503
|
+
break;
|
|
448
504
|
}
|
|
449
505
|
break;
|
|
450
506
|
|
|
@@ -453,10 +509,10 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
453
509
|
case C1:
|
|
454
510
|
case C2:
|
|
455
511
|
case C4:
|
|
456
|
-
|
|
512
|
+
return (UChar *)(s - 2); /* |CM CM|C4|CM C4 CM */
|
|
457
513
|
case CM:
|
|
458
|
-
|
|
459
|
-
|
|
514
|
+
state = S_odd_CM_even_C4CM;
|
|
515
|
+
break;
|
|
460
516
|
}
|
|
461
517
|
break;
|
|
462
518
|
case S_odd_CM_even_C4CM: /* CM CM CM C4 CM C4 CM */
|
|
@@ -464,16 +520,16 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
|
464
520
|
case C1:
|
|
465
521
|
case C2:
|
|
466
522
|
case C4:
|
|
467
|
-
|
|
523
|
+
return (UChar *)(s - 0); /* |CM CM|CM C4 CM C4|CM */
|
|
468
524
|
case CM:
|
|
469
|
-
|
|
470
|
-
|
|
525
|
+
state = S_even_CM_even_C4CM;
|
|
526
|
+
break;
|
|
471
527
|
}
|
|
472
528
|
break;
|
|
473
529
|
}
|
|
474
530
|
}
|
|
475
531
|
|
|
476
|
-
|
|
532
|
+
DEBUG_OUT(("state %-19s\n", StateNames[state]));
|
|
477
533
|
switch (state) {
|
|
478
534
|
case S_START: return (UChar *)(s - 0);
|
|
479
535
|
case S_one_C2: return (UChar *)(s - 0);
|
|
@@ -522,7 +578,7 @@ OnigEncodingType OnigEncodingGB18030 = {
|
|
|
522
578
|
1, /* min enc length */
|
|
523
579
|
onigenc_is_mbc_newline_0x0a,
|
|
524
580
|
gb18030_mbc_to_code,
|
|
525
|
-
|
|
581
|
+
gb18030_code_to_mbclen,
|
|
526
582
|
gb18030_code_to_mbc,
|
|
527
583
|
gb18030_mbc_case_fold,
|
|
528
584
|
onigenc_ascii_apply_all_case_fold,
|
|
@@ -534,5 +590,7 @@ OnigEncodingType OnigEncodingGB18030 = {
|
|
|
534
590
|
gb18030_is_allowed_reverse_match,
|
|
535
591
|
NULL, /* init */
|
|
536
592
|
NULL, /* is_initialized */
|
|
537
|
-
is_valid_mbc_string
|
|
593
|
+
is_valid_mbc_string,
|
|
594
|
+
ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1,
|
|
595
|
+
0, 0
|
|
538
596
|
};
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/python
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
|
+
# gperf_fold_key_conv.py
|
|
4
|
+
# Copyright (c) 2016-2018 K.Kosako
|
|
3
5
|
|
|
4
6
|
import sys
|
|
5
7
|
import re
|
|
6
8
|
|
|
7
9
|
REG_LINE_GPERF = re.compile('#line .+gperf"')
|
|
8
|
-
REG_HASH_FUNC = re.compile('hash\s*\(register\s+const\s+char\s*\*\s*str,\s*register\s+
|
|
10
|
+
REG_HASH_FUNC = re.compile('hash\s*\(register\s+const\s+char\s*\*\s*str,\s*register\s+size_t\s+len\s*\)')
|
|
9
11
|
REG_STR_AT = re.compile('str\[(\d+)\]')
|
|
10
|
-
REG_RETURN_TYPE = re.compile('^const\s+int\s*\*')
|
|
11
|
-
REG_FOLD_KEY = re.compile('unicode_fold(\d)_key\s*\(register\s+const\s+char\s*\*\s*str,\s*register\s+
|
|
12
|
+
REG_RETURN_TYPE = re.compile('^const\s+short\s+int\s*\*')
|
|
13
|
+
REG_FOLD_KEY = re.compile('unicode_fold(\d)_key\s*\(register\s+const\s+char\s*\*\s*str,\s*register\s+size_t\s+len\)')
|
|
12
14
|
REG_ENTRY = re.compile('\{".*?",\s*(-?\d+)\s*\}')
|
|
13
|
-
REG_IF_LEN = re.compile('if\s*\(\s*len\s*<=\s*MAX_WORD_LENGTH.+')
|
|
15
|
+
REG_IF_LEN = re.compile('\s*if\s*\(\s*len\s*<=\s*MAX_WORD_LENGTH.+')
|
|
14
16
|
REG_GET_HASH = re.compile('(?:register\s+)?(?:unsigned\s+)?int\s+key\s*=\s*hash\s*\(str,\s*len\);')
|
|
15
17
|
REG_GET_CODE = re.compile('(?:register\s+)?const\s+char\s*\*\s*s\s*=\s*wordlist\[key\]\.name;')
|
|
16
18
|
REG_CODE_CHECK = re.compile('if\s*\(\*str\s*==\s*\*s\s*&&\s*!strncmp.+\)')
|
|
@@ -32,7 +34,7 @@ def parse_line(s, key_len):
|
|
|
32
34
|
if r != s: return r
|
|
33
35
|
r = re.sub(REG_ENTRY, '\\1', s)
|
|
34
36
|
if r != s: return r
|
|
35
|
-
r = re.sub(REG_IF_LEN, '
|
|
37
|
+
r = re.sub(REG_IF_LEN, '', s)
|
|
36
38
|
if r != s: return r
|
|
37
39
|
r = re.sub(REG_GET_HASH, 'int key = hash(codes);', s)
|
|
38
40
|
if r != s: return r
|
|
@@ -52,11 +54,13 @@ def parse_line(s, key_len):
|
|
|
52
54
|
def parse_file(f, key_len):
|
|
53
55
|
print "/* This file was converted by gperf_fold_key_conv.py\n from gperf output file. */"
|
|
54
56
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
while True:
|
|
58
|
+
line = f.readline()
|
|
59
|
+
if not line:
|
|
60
|
+
break
|
|
61
|
+
|
|
57
62
|
s = parse_line(line, key_len)
|
|
58
63
|
print s
|
|
59
|
-
line = f.readline()
|
|
60
64
|
|
|
61
65
|
|
|
62
66
|
# main
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/python
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
|
+
# gperf_unfold_key_conv.py
|
|
4
|
+
# Copyright (c) 2016-2018 K.Kosako
|
|
3
5
|
|
|
4
6
|
import sys
|
|
5
7
|
import re
|
|
6
8
|
|
|
7
9
|
REG_LINE_GPERF = re.compile('#line .+gperf"')
|
|
8
|
-
REG_HASH_FUNC = re.compile('hash\s*\(register\s+const\s+char\s*\*\s*str,\s*register\s+
|
|
10
|
+
REG_HASH_FUNC = re.compile('hash\s*\(register\s+const\s+char\s*\*\s*str,\s*register\s+size_t\s+len\s*\)')
|
|
9
11
|
REG_STR_AT = re.compile('str\[(\d+)\]')
|
|
10
|
-
REG_UNFOLD_KEY = re.compile('
|
|
12
|
+
REG_UNFOLD_KEY = re.compile('onigenc_unicode_unfold_key\s*\(register\s+const\s+char\s*\*\s*str,\s*register\s+size_t\s+len\)')
|
|
11
13
|
REG_ENTRY = re.compile('\{".+?",\s*/\*(.+?)\*/\s*(-?\d+),\s*(\d)\}')
|
|
12
14
|
REG_EMPTY_ENTRY = re.compile('\{"",\s*(-?\d+),\s*(\d)\}')
|
|
13
|
-
REG_IF_LEN = re.compile('if\s*\(\s*len\s*<=\s*MAX_WORD_LENGTH.+')
|
|
15
|
+
REG_IF_LEN = re.compile('\s*if\s*\(\s*len\s*<=\s*MAX_WORD_LENGTH.+')
|
|
14
16
|
REG_GET_HASH = re.compile('(?:register\s+)?(?:unsigned\s+)?int\s+key\s*=\s*hash\s*\(str,\s*len\);')
|
|
15
17
|
REG_GET_CODE = re.compile('(?:register\s+)?const\s+char\s*\*\s*s\s*=\s*wordlist\[key\]\.name;')
|
|
16
18
|
REG_CODE_CHECK = re.compile('if\s*\(\*str\s*==\s*\*s\s*&&\s*!strncmp.+\)')
|
|
@@ -24,19 +26,19 @@ def parse_line(s):
|
|
|
24
26
|
if r != s: return r
|
|
25
27
|
r = re.sub(REG_STR_AT, 'onig_codes_byte_at(codes, \\1)', s)
|
|
26
28
|
if r != s: return r
|
|
27
|
-
r = re.sub(REG_UNFOLD_KEY, '
|
|
29
|
+
r = re.sub(REG_UNFOLD_KEY, 'onigenc_unicode_unfold_key(OnigCodePoint code)', s)
|
|
28
30
|
if r != s: return r
|
|
29
31
|
r = re.sub(REG_ENTRY, '{\\1, \\2, \\3}', s)
|
|
30
32
|
if r != s: return r
|
|
31
33
|
r = re.sub(REG_EMPTY_ENTRY, '{0xffffffff, \\1, \\2}', s)
|
|
32
34
|
if r != s: return r
|
|
33
|
-
r = re.sub(REG_IF_LEN, '
|
|
35
|
+
r = re.sub(REG_IF_LEN, '', s)
|
|
34
36
|
if r != s: return r
|
|
35
37
|
r = re.sub(REG_GET_HASH, 'int key = hash(&code);', s)
|
|
36
38
|
if r != s: return r
|
|
37
39
|
r = re.sub(REG_GET_CODE, 'OnigCodePoint gcode = wordlist[key].code;', s)
|
|
38
40
|
if r != s: return r
|
|
39
|
-
r = re.sub(REG_CODE_CHECK, 'if (code == gcode)', s)
|
|
41
|
+
r = re.sub(REG_CODE_CHECK, 'if (code == gcode && wordlist[key].index >= 0)', s)
|
|
40
42
|
if r != s: return r
|
|
41
43
|
|
|
42
44
|
return s
|