@port-labs/jq-node-bindings 0.0.14 → 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 +4 -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
|
@@ -1,432 +1,496 @@
|
|
|
1
1
|
#!/usr/bin/python
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
|
+
# make_unicode_property_data.py
|
|
4
|
+
# Copyright (c) 2016-2022 K.Kosako
|
|
3
5
|
|
|
4
6
|
import sys
|
|
5
7
|
import re
|
|
6
8
|
|
|
7
9
|
POSIX_LIST = [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
'NEWLINE', 'Alpha', 'Blank', 'Cntrl', 'Digit', 'Graph', 'Lower',
|
|
11
|
+
'Print', 'PosixPunct', 'Space', 'Upper', 'XDigit', 'Word', 'Alnum',
|
|
12
|
+
'ASCII'
|
|
10
13
|
]
|
|
11
14
|
|
|
12
15
|
MAX_CODE_POINT = 0x10ffff
|
|
13
16
|
|
|
17
|
+
GRAPHEME_CLUSTER_BREAK_NAME_PREFIX = 'Grapheme_Cluster_Break_'
|
|
18
|
+
|
|
14
19
|
UD_FIRST_REG = re.compile("<.+,\s*First>")
|
|
15
20
|
UD_LAST_REG = re.compile("<.+,\s*Last>")
|
|
16
|
-
PR_TOTAL_REG = re.compile("#\s*Total\s+code\s+points:")
|
|
21
|
+
PR_TOTAL_REG = re.compile("#\s*Total\s+(?:code\s+points|elements):")
|
|
17
22
|
PR_LINE_REG = re.compile("([0-9A-Fa-f]+)(?:..([0-9A-Fa-f]+))?\s*;\s*(\w+)")
|
|
18
23
|
PA_LINE_REG = re.compile("(\w+)\s*;\s*(\w+)")
|
|
19
24
|
PVA_LINE_REG = re.compile("(sc|gc)\s*;\s*(\w+)\s*;\s*(\w+)(?:\s*;\s*(\w+))?")
|
|
20
25
|
BL_LINE_REG = re.compile("([0-9A-Fa-f]+)\.\.([0-9A-Fa-f]+)\s*;\s*(.*)")
|
|
21
|
-
|
|
26
|
+
UNICODE_VERSION_REG = re.compile("#\s*.*-(\d+)\.(\d+)\.(\d+)\.txt")
|
|
27
|
+
EMOJI_VERSION_REG = re.compile("(?i)#.+Version\s+(\d+)\.(\d+)")
|
|
28
|
+
|
|
29
|
+
VERSION_INFO = [-1, -1, -1]
|
|
30
|
+
EMOJI_VERSION_INFO = [-1, -1]
|
|
22
31
|
|
|
23
|
-
VERSION_INFO = None
|
|
24
32
|
DIC = { }
|
|
25
33
|
KDIC = { }
|
|
26
34
|
PropIndex = { }
|
|
27
35
|
PROPERTY_NAME_MAX_LEN = 0
|
|
36
|
+
PROPS = None
|
|
28
37
|
|
|
29
38
|
def normalize_prop_name(name):
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
name = re.sub(r'[ _]', '', name)
|
|
40
|
+
name = name.lower()
|
|
41
|
+
return name
|
|
33
42
|
|
|
34
43
|
def fix_block_name(name):
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
def check_version_info(s):
|
|
39
|
-
global VERSION_INFO
|
|
40
|
-
m = VERSION_REG.match(s)
|
|
41
|
-
if m is not None:
|
|
42
|
-
VERSION_INFO = m.group(1)
|
|
43
|
-
|
|
44
|
+
s = re.sub(r'[- ]+', '_', name)
|
|
45
|
+
return 'In_' + s
|
|
44
46
|
|
|
45
47
|
def print_ranges(ranges):
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
for (start, end) in ranges:
|
|
49
|
+
print "0x%06x, 0x%06x" % (start, end)
|
|
48
50
|
|
|
49
|
-
|
|
51
|
+
print len(ranges)
|
|
50
52
|
|
|
51
53
|
def print_prop_and_index(prop, i):
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
print "%-35s %3d" % (prop + ',', i)
|
|
55
|
+
PropIndex[prop] = i
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
PRINT_CACHE = { }
|
|
56
58
|
|
|
57
59
|
def print_property(prop, data, desc):
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
print ''
|
|
61
|
+
print "/* PROPERTY: '%s': %s */" % (prop, desc)
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
prev_prop = dic_find_by_value(PRINT_CACHE, data)
|
|
64
|
+
if prev_prop is not None:
|
|
65
|
+
print "#define CR_%s CR_%s" % (prop, prev_prop)
|
|
66
|
+
else:
|
|
67
|
+
PRINT_CACHE[prop] = data
|
|
68
|
+
print "static const OnigCodePoint"
|
|
69
|
+
print "CR_%s[] = { %d," % (prop, len(data))
|
|
70
|
+
for (start, end) in data:
|
|
71
|
+
print "0x%04x, 0x%04x," % (start, end)
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
print "}; /* END of CR_%s */" % prop
|
|
72
74
|
|
|
73
75
|
|
|
74
76
|
def dic_find_by_value(dic, v):
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
for key, val in dic.items():
|
|
78
|
+
if val == v:
|
|
79
|
+
return key
|
|
78
80
|
|
|
79
|
-
|
|
81
|
+
return None
|
|
80
82
|
|
|
83
|
+
def make_reverse_dic(dic):
|
|
84
|
+
rev = {}
|
|
85
|
+
for key, val in dic.items():
|
|
86
|
+
d = rev.get(val, None)
|
|
87
|
+
if d is None:
|
|
88
|
+
rev[val] = [key]
|
|
89
|
+
else:
|
|
90
|
+
d.append(key)
|
|
91
|
+
|
|
92
|
+
return rev
|
|
81
93
|
|
|
82
94
|
def normalize_ranges(in_ranges, sort=False):
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
95
|
+
if sort:
|
|
96
|
+
ranges = sorted(in_ranges)
|
|
97
|
+
else:
|
|
98
|
+
ranges = in_ranges
|
|
87
99
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
100
|
+
r = []
|
|
101
|
+
prev = None
|
|
102
|
+
for (start, end) in ranges:
|
|
103
|
+
if prev >= start - 1:
|
|
104
|
+
(pstart, pend) = r.pop()
|
|
105
|
+
end = max(pend, end)
|
|
106
|
+
start = pstart
|
|
95
107
|
|
|
96
|
-
|
|
97
|
-
|
|
108
|
+
r.append((start, end))
|
|
109
|
+
prev = end
|
|
98
110
|
|
|
99
|
-
|
|
111
|
+
return r
|
|
100
112
|
|
|
101
113
|
def inverse_ranges(in_ranges):
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
114
|
+
r = []
|
|
115
|
+
prev = 0x000000
|
|
116
|
+
for (start, end) in in_ranges:
|
|
117
|
+
if prev < start:
|
|
118
|
+
r.append((prev, start - 1))
|
|
107
119
|
|
|
108
|
-
|
|
120
|
+
prev = end + 1
|
|
109
121
|
|
|
110
|
-
|
|
111
|
-
|
|
122
|
+
if prev < MAX_CODE_POINT:
|
|
123
|
+
r.append((prev, MAX_CODE_POINT))
|
|
112
124
|
|
|
113
|
-
|
|
125
|
+
return r
|
|
114
126
|
|
|
115
127
|
def add_ranges(r1, r2):
|
|
116
|
-
|
|
117
|
-
|
|
128
|
+
r = r1 + r2
|
|
129
|
+
return normalize_ranges(r, True)
|
|
118
130
|
|
|
119
131
|
def sub_one_range(one_range, rs):
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
132
|
+
r = []
|
|
133
|
+
(s1, e1) = one_range
|
|
134
|
+
n = len(rs)
|
|
135
|
+
for i in range(0, n):
|
|
136
|
+
(s2, e2) = rs[i]
|
|
137
|
+
if s2 >= s1 and s2 <= e1:
|
|
138
|
+
if s2 > s1:
|
|
139
|
+
r.append((s1, s2 - 1))
|
|
140
|
+
if e2 >= e1:
|
|
141
|
+
return r
|
|
142
|
+
|
|
143
|
+
s1 = e2 + 1
|
|
144
|
+
elif s2 < s1 and e2 >= s1:
|
|
145
|
+
if e2 < e1:
|
|
146
|
+
s1 = e2 + 1
|
|
147
|
+
else:
|
|
148
|
+
return r
|
|
149
|
+
|
|
150
|
+
r.append((s1, e1))
|
|
151
|
+
return r
|
|
140
152
|
|
|
141
153
|
def sub_ranges(r1, r2):
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
154
|
+
r = []
|
|
155
|
+
for one_range in r1:
|
|
156
|
+
rs = sub_one_range(one_range, r2)
|
|
157
|
+
r.extend(rs)
|
|
146
158
|
|
|
147
|
-
|
|
159
|
+
return r
|
|
148
160
|
|
|
149
161
|
def add_ranges_in_dic(dic):
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
162
|
+
r = []
|
|
163
|
+
for k, v in dic.items():
|
|
164
|
+
r = r + v
|
|
153
165
|
|
|
154
|
-
|
|
166
|
+
return normalize_ranges(r, True)
|
|
155
167
|
|
|
156
168
|
def normalize_ranges_in_dic(dic, sort=False):
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
169
|
+
for k, v in dic.items():
|
|
170
|
+
r = normalize_ranges(v, sort)
|
|
171
|
+
dic[k] = r
|
|
160
172
|
|
|
161
173
|
def merge_dic(to_dic, from_dic):
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
174
|
+
to_keys = to_dic.keys()
|
|
175
|
+
from_keys = from_dic.keys()
|
|
176
|
+
common = list(set(to_keys) & set(from_keys))
|
|
177
|
+
if len(common) != 0:
|
|
178
|
+
print >> sys.stderr, "merge_dic: collision: %s" % sorted(common)
|
|
167
179
|
|
|
168
|
-
|
|
180
|
+
to_dic.update(from_dic)
|
|
169
181
|
|
|
170
182
|
def merge_props(to_props, from_props):
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
183
|
+
common = list(set(to_props) & set(from_props))
|
|
184
|
+
if len(common) != 0:
|
|
185
|
+
print >> sys.stderr, "merge_props: collision: %s" % sorted(common)
|
|
174
186
|
|
|
175
|
-
|
|
187
|
+
to_props.extend(from_props)
|
|
176
188
|
|
|
177
189
|
def add_range_into_dic(dic, name, start, end):
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
190
|
+
d = dic.get(name, None)
|
|
191
|
+
if d is None:
|
|
192
|
+
d = [(start, end)]
|
|
193
|
+
dic[name] = d
|
|
194
|
+
else:
|
|
195
|
+
d.append((start, end))
|
|
184
196
|
|
|
185
197
|
def list_sub(a, b):
|
|
186
|
-
|
|
187
|
-
|
|
198
|
+
x = set(a) - set(b)
|
|
199
|
+
return list(x)
|
|
188
200
|
|
|
189
201
|
|
|
190
202
|
def parse_unicode_data_file(f):
|
|
203
|
+
dic = { }
|
|
204
|
+
assigned = []
|
|
205
|
+
for line in f:
|
|
206
|
+
s = line.strip()
|
|
207
|
+
if len(s) == 0:
|
|
208
|
+
continue
|
|
209
|
+
if s[0] == '#':
|
|
210
|
+
continue
|
|
211
|
+
|
|
212
|
+
a = s.split(';')
|
|
213
|
+
code = int(a[0], 16)
|
|
214
|
+
desc = a[1]
|
|
215
|
+
prop = a[2]
|
|
216
|
+
if UD_FIRST_REG.match(desc) is not None:
|
|
217
|
+
start = code
|
|
218
|
+
end = None
|
|
219
|
+
elif UD_LAST_REG.match(desc) is not None:
|
|
220
|
+
end = code
|
|
221
|
+
else:
|
|
222
|
+
start = end = code
|
|
223
|
+
|
|
224
|
+
if end is not None:
|
|
225
|
+
assigned.append((start, end))
|
|
226
|
+
add_range_into_dic(dic, prop, start, end)
|
|
227
|
+
if len(prop) == 2:
|
|
228
|
+
add_range_into_dic(dic, prop[0:1], start, end)
|
|
229
|
+
|
|
230
|
+
normalize_ranges_in_dic(dic)
|
|
231
|
+
return dic, assigned
|
|
232
|
+
|
|
233
|
+
def parse_properties(path, klass, prop_prefix = None, version_reg = None):
|
|
234
|
+
version_match = None
|
|
235
|
+
with open(path, 'r') as f:
|
|
191
236
|
dic = { }
|
|
192
|
-
|
|
237
|
+
prop = None
|
|
238
|
+
props = []
|
|
193
239
|
for line in f:
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
240
|
+
s = line.strip()
|
|
241
|
+
if len(s) == 0:
|
|
242
|
+
continue
|
|
243
|
+
|
|
244
|
+
if s[0] == '#' and version_reg is not None and version_match is None:
|
|
245
|
+
version_match = version_reg.match(s)
|
|
246
|
+
if version_match is not None:
|
|
247
|
+
continue
|
|
248
|
+
|
|
249
|
+
m = PR_LINE_REG.match(s)
|
|
250
|
+
if m:
|
|
251
|
+
prop = m.group(3)
|
|
252
|
+
if prop_prefix is not None:
|
|
253
|
+
prop = prop_prefix + prop
|
|
254
|
+
|
|
255
|
+
if m.group(2):
|
|
256
|
+
start = int(m.group(1), 16)
|
|
257
|
+
end = int(m.group(2), 16)
|
|
258
|
+
add_range_into_dic(dic, prop, start, end)
|
|
209
259
|
else:
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
return dic, assigned
|
|
220
|
-
|
|
221
|
-
def parse_properties(path, klass):
|
|
222
|
-
with open(path, 'r') as f:
|
|
223
|
-
dic = { }
|
|
224
|
-
prop = None
|
|
225
|
-
props = []
|
|
226
|
-
for line in f:
|
|
227
|
-
s = line.strip()
|
|
228
|
-
if len(s) == 0:
|
|
229
|
-
continue
|
|
230
|
-
|
|
231
|
-
if s[0] == '#':
|
|
232
|
-
if VERSION_INFO is None:
|
|
233
|
-
check_version_info(s)
|
|
234
|
-
|
|
235
|
-
m = PR_LINE_REG.match(s)
|
|
236
|
-
if m:
|
|
237
|
-
prop = m.group(3)
|
|
238
|
-
if m.group(2):
|
|
239
|
-
start = int(m.group(1), 16)
|
|
240
|
-
end = int(m.group(2), 16)
|
|
241
|
-
add_range_into_dic(dic, prop, start, end)
|
|
242
|
-
else:
|
|
243
|
-
start = int(m.group(1), 16)
|
|
244
|
-
add_range_into_dic(dic, prop, start, start)
|
|
245
|
-
|
|
246
|
-
elif PR_TOTAL_REG.match(s) is not None:
|
|
247
|
-
KDIC[prop] = klass
|
|
248
|
-
props.append(prop)
|
|
249
|
-
|
|
250
|
-
normalize_ranges_in_dic(dic)
|
|
251
|
-
return (dic, props)
|
|
260
|
+
start = int(m.group(1), 16)
|
|
261
|
+
add_range_into_dic(dic, prop, start, start)
|
|
262
|
+
|
|
263
|
+
elif PR_TOTAL_REG.match(s) is not None:
|
|
264
|
+
KDIC[prop] = klass
|
|
265
|
+
props.append(prop)
|
|
266
|
+
|
|
267
|
+
normalize_ranges_in_dic(dic)
|
|
268
|
+
return (dic, props, version_match)
|
|
252
269
|
|
|
253
270
|
def parse_property_aliases(path):
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
271
|
+
a = { }
|
|
272
|
+
with open(path, 'r') as f:
|
|
273
|
+
for line in f:
|
|
274
|
+
s = line.strip()
|
|
275
|
+
if len(s) == 0:
|
|
276
|
+
continue
|
|
260
277
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
278
|
+
m = PA_LINE_REG.match(s)
|
|
279
|
+
if not(m):
|
|
280
|
+
continue
|
|
264
281
|
|
|
265
|
-
|
|
266
|
-
|
|
282
|
+
if m.group(1) == m.group(2):
|
|
283
|
+
continue
|
|
267
284
|
|
|
268
|
-
|
|
285
|
+
a[m.group(1)] = m.group(2)
|
|
269
286
|
|
|
270
|
-
|
|
287
|
+
return a
|
|
271
288
|
|
|
272
289
|
def parse_property_value_aliases(path):
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
290
|
+
a = { }
|
|
291
|
+
with open(path, 'r') as f:
|
|
292
|
+
for line in f:
|
|
293
|
+
s = line.strip()
|
|
294
|
+
if len(s) == 0:
|
|
295
|
+
continue
|
|
296
|
+
|
|
297
|
+
m = PVA_LINE_REG.match(s)
|
|
298
|
+
if not(m):
|
|
299
|
+
continue
|
|
300
|
+
|
|
301
|
+
cat = m.group(1)
|
|
302
|
+
x2 = m.group(2)
|
|
303
|
+
x3 = m.group(3)
|
|
304
|
+
x4 = m.group(4)
|
|
305
|
+
if cat == 'sc':
|
|
306
|
+
if x2 != x3:
|
|
307
|
+
a[x2] = x3
|
|
308
|
+
if x4 and x4 != x3:
|
|
309
|
+
a[x4] = x3
|
|
310
|
+
else:
|
|
311
|
+
if x2 != x3:
|
|
312
|
+
a[x3] = x2
|
|
313
|
+
if x4 and x4 != x2:
|
|
314
|
+
a[x4] = x2
|
|
315
|
+
|
|
316
|
+
return a
|
|
300
317
|
|
|
301
318
|
def parse_blocks(path):
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
319
|
+
dic = { }
|
|
320
|
+
blocks = []
|
|
321
|
+
with open(path, 'r') as f:
|
|
322
|
+
for line in f:
|
|
323
|
+
s = line.strip()
|
|
324
|
+
if len(s) == 0:
|
|
325
|
+
continue
|
|
326
|
+
|
|
327
|
+
m = BL_LINE_REG.match(s)
|
|
328
|
+
if not(m):
|
|
329
|
+
continue
|
|
330
|
+
|
|
331
|
+
start = int(m.group(1), 16)
|
|
332
|
+
end = int(m.group(2), 16)
|
|
333
|
+
block = fix_block_name(m.group(3))
|
|
334
|
+
add_range_into_dic(dic, block, start, end)
|
|
335
|
+
blocks.append(block)
|
|
336
|
+
|
|
337
|
+
noblock = fix_block_name('No_Block')
|
|
338
|
+
dic[noblock] = inverse_ranges(add_ranges_in_dic(dic))
|
|
339
|
+
blocks.append(noblock)
|
|
340
|
+
return dic, blocks
|
|
324
341
|
|
|
325
342
|
def add_primitive_props(assigned):
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
343
|
+
DIC['Assigned'] = normalize_ranges(assigned)
|
|
344
|
+
DIC['Any'] = [(0x000000, 0x10ffff)]
|
|
345
|
+
DIC['ASCII'] = [(0x000000, 0x00007f)]
|
|
346
|
+
DIC['NEWLINE'] = [(0x00000a, 0x00000a)]
|
|
347
|
+
DIC['Cn'] = inverse_ranges(DIC['Assigned'])
|
|
348
|
+
DIC['C'].extend(DIC['Cn'])
|
|
349
|
+
DIC['C'] = normalize_ranges(DIC['C'], True)
|
|
350
|
+
|
|
351
|
+
d = []
|
|
352
|
+
d.extend(DIC['Ll'])
|
|
353
|
+
d.extend(DIC['Lt'])
|
|
354
|
+
d.extend(DIC['Lu'])
|
|
355
|
+
DIC['LC'] = normalize_ranges(d, True)
|
|
339
356
|
|
|
340
357
|
def add_posix_props(dic):
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
358
|
+
alnum = []
|
|
359
|
+
alnum.extend(dic['Alphabetic'])
|
|
360
|
+
alnum.extend(dic['Nd']) # Nd == Decimal_Number
|
|
361
|
+
alnum = normalize_ranges(alnum, True)
|
|
362
|
+
|
|
363
|
+
blank = [(0x0009, 0x0009)]
|
|
364
|
+
blank.extend(dic['Zs']) # Zs == Space_Separator
|
|
365
|
+
blank = normalize_ranges(blank, True)
|
|
366
|
+
|
|
367
|
+
word = []
|
|
368
|
+
word.extend(dic['Alphabetic'])
|
|
369
|
+
word.extend(dic['M']) # M == Mark
|
|
370
|
+
word.extend(dic['Nd'])
|
|
371
|
+
word.extend(dic['Pc']) # Pc == Connector_Punctuation
|
|
372
|
+
word = normalize_ranges(word, True)
|
|
373
|
+
|
|
374
|
+
graph = sub_ranges(dic['Any'], dic['White_Space'])
|
|
375
|
+
graph = sub_ranges(graph, dic['Cc'])
|
|
376
|
+
graph = sub_ranges(graph, dic['Cs']) # Cs == Surrogate
|
|
377
|
+
graph = sub_ranges(graph, dic['Cn']) # Cn == Unassigned
|
|
378
|
+
graph = normalize_ranges(graph, True)
|
|
379
|
+
|
|
380
|
+
p = []
|
|
381
|
+
p.extend(graph)
|
|
382
|
+
p.extend(dic['Zs'])
|
|
383
|
+
p = normalize_ranges(p, True)
|
|
384
|
+
|
|
385
|
+
dic['Alpha'] = dic['Alphabetic']
|
|
386
|
+
dic['Upper'] = dic['Uppercase']
|
|
387
|
+
dic['Lower'] = dic['Lowercase']
|
|
388
|
+
dic['PosixPunct'] = add_ranges(dic['P'], dic['S']) # P == Punctuation
|
|
389
|
+
dic['Digit'] = dic['Nd']
|
|
390
|
+
dic['XDigit'] = [(0x0030, 0x0039), (0x0041, 0x0046), (0x0061, 0x0066)]
|
|
391
|
+
dic['Alnum'] = alnum
|
|
392
|
+
dic['Space'] = dic['White_Space']
|
|
393
|
+
dic['Blank'] = blank
|
|
394
|
+
dic['Cntrl'] = dic['Cc']
|
|
395
|
+
dic['Word'] = word
|
|
396
|
+
dic['Graph'] = graph
|
|
397
|
+
dic['Print'] = p
|
|
381
398
|
|
|
382
399
|
|
|
383
400
|
def set_max_prop_name(name):
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
401
|
+
global PROPERTY_NAME_MAX_LEN
|
|
402
|
+
n = len(name)
|
|
403
|
+
if n > PROPERTY_NAME_MAX_LEN:
|
|
404
|
+
PROPERTY_NAME_MAX_LEN = n
|
|
388
405
|
|
|
389
|
-
LIST_COUNTER = 1
|
|
390
406
|
def entry_prop_name(name, index):
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
407
|
+
set_max_prop_name(name)
|
|
408
|
+
if OUTPUT_LIST_MODE and index >= len(POSIX_LIST):
|
|
409
|
+
print >> UPF, "%s" % (name)
|
|
410
|
+
|
|
411
|
+
def entry_and_print_prop_and_index(name, index):
|
|
412
|
+
entry_prop_name(name, index)
|
|
413
|
+
nname = normalize_prop_name(name)
|
|
414
|
+
print_prop_and_index(nname, index)
|
|
415
|
+
|
|
416
|
+
def parse_and_merge_properties(path, klass, prop_prefix = None, version_reg = None):
|
|
417
|
+
dic, props, ver_m = parse_properties(path, klass, prop_prefix, version_reg)
|
|
418
|
+
merge_dic(DIC, dic)
|
|
419
|
+
merge_props(PROPS, props)
|
|
420
|
+
return dic, props, ver_m
|
|
396
421
|
|
|
397
422
|
|
|
398
423
|
### main ###
|
|
399
424
|
argv = sys.argv
|
|
400
425
|
argc = len(argv)
|
|
401
426
|
|
|
427
|
+
COPYRIGHT = '''
|
|
428
|
+
/*-
|
|
429
|
+
* Copyright (c) 2016-2022 K.Kosako
|
|
430
|
+
* All rights reserved.
|
|
431
|
+
*
|
|
432
|
+
* Redistribution and use in source and binary forms, with or without
|
|
433
|
+
* modification, are permitted provided that the following conditions
|
|
434
|
+
* are met:
|
|
435
|
+
* 1. Redistributions of source code must retain the above copyright
|
|
436
|
+
* notice, this list of conditions and the following disclaimer.
|
|
437
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
|
438
|
+
* notice, this list of conditions and the following disclaimer in the
|
|
439
|
+
* documentation and/or other materials provided with the distribution.
|
|
440
|
+
*
|
|
441
|
+
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
442
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
443
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
444
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
445
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
446
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
447
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
448
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
449
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
450
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
451
|
+
* SUCH DAMAGE.
|
|
452
|
+
*/
|
|
453
|
+
'''.strip()
|
|
454
|
+
|
|
402
455
|
POSIX_ONLY = False
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
456
|
+
INCLUDE_GRAPHEME_CLUSTER_DATA = False
|
|
457
|
+
|
|
458
|
+
for i in range(1, argc):
|
|
459
|
+
arg = argv[i]
|
|
460
|
+
if arg == '-posix':
|
|
461
|
+
POSIX_ONLY = True
|
|
462
|
+
elif arg == '-gc':
|
|
463
|
+
INCLUDE_GRAPHEME_CLUSTER_DATA = True
|
|
464
|
+
else:
|
|
465
|
+
print >> sys.stderr, "Invalid argument: %s" % arg
|
|
406
466
|
|
|
407
|
-
|
|
467
|
+
|
|
468
|
+
OUTPUT_LIST_MODE = not(POSIX_ONLY)
|
|
408
469
|
|
|
409
470
|
with open('UnicodeData.txt', 'r') as f:
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
471
|
+
dic, assigned = parse_unicode_data_file(f)
|
|
472
|
+
DIC = dic
|
|
473
|
+
add_primitive_props(assigned)
|
|
413
474
|
|
|
414
475
|
PROPS = DIC.keys()
|
|
415
476
|
PROPS = list_sub(PROPS, POSIX_LIST)
|
|
416
|
-
PROPS = sorted(PROPS)
|
|
417
477
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
478
|
+
_, _, ver_m = parse_and_merge_properties('DerivedCoreProperties.txt', 'Derived Property', None, UNICODE_VERSION_REG)
|
|
479
|
+
if ver_m is not None:
|
|
480
|
+
VERSION_INFO[0] = int(ver_m.group(1))
|
|
481
|
+
VERSION_INFO[1] = int(ver_m.group(2))
|
|
482
|
+
VERSION_INFO[2] = int(ver_m.group(3))
|
|
421
483
|
|
|
422
|
-
dic, props =
|
|
423
|
-
merge_dic(DIC, dic)
|
|
424
|
-
merge_props(PROPS, props)
|
|
484
|
+
dic, props, _ = parse_and_merge_properties('Scripts.txt', 'Script')
|
|
425
485
|
DIC['Unknown'] = inverse_ranges(add_ranges_in_dic(dic))
|
|
426
486
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
487
|
+
parse_and_merge_properties('PropList.txt', 'Binary Property')
|
|
488
|
+
|
|
489
|
+
_, _, ver_m = parse_and_merge_properties('emoji-data.txt', 'Emoji Property', None, EMOJI_VERSION_REG)
|
|
490
|
+
if ver_m is not None:
|
|
491
|
+
EMOJI_VERSION_INFO[0] = int(ver_m.group(1))
|
|
492
|
+
EMOJI_VERSION_INFO[1] = int(ver_m.group(2))
|
|
493
|
+
|
|
430
494
|
PROPS.append('Unknown')
|
|
431
495
|
KDIC['Unknown'] = 'Script'
|
|
432
496
|
|
|
@@ -437,109 +501,144 @@ merge_dic(ALIASES, a)
|
|
|
437
501
|
dic, BLOCKS = parse_blocks('Blocks.txt')
|
|
438
502
|
merge_dic(DIC, dic)
|
|
439
503
|
|
|
504
|
+
if INCLUDE_GRAPHEME_CLUSTER_DATA:
|
|
505
|
+
dic, props, _ = parse_properties('GraphemeBreakProperty.txt',
|
|
506
|
+
'GraphemeBreak Property',
|
|
507
|
+
GRAPHEME_CLUSTER_BREAK_NAME_PREFIX)
|
|
508
|
+
merge_dic(DIC, dic)
|
|
509
|
+
merge_props(PROPS, props)
|
|
510
|
+
#prop = GRAPHEME_CLUSTER_BREAK_NAME_PREFIX + 'Other'
|
|
511
|
+
#DIC[prop] = inverse_ranges(add_ranges_in_dic(dic))
|
|
512
|
+
#PROPS.append(prop)
|
|
513
|
+
#KDIC[prop] = 'GrapemeBreak Property'
|
|
514
|
+
|
|
440
515
|
add_posix_props(DIC)
|
|
516
|
+
PROPS = sorted(PROPS)
|
|
517
|
+
|
|
441
518
|
|
|
442
519
|
s = '''%{
|
|
443
520
|
/* Generated by make_unicode_property_data.py. */
|
|
444
521
|
'''
|
|
445
522
|
print s
|
|
523
|
+
print COPYRIGHT
|
|
524
|
+
print ''
|
|
525
|
+
|
|
446
526
|
for prop in POSIX_LIST:
|
|
447
|
-
|
|
527
|
+
if prop == 'PosixPunct':
|
|
528
|
+
desc = "POSIX [[:punct:]]"
|
|
529
|
+
else:
|
|
530
|
+
desc = "POSIX [[:%s:]]" % prop
|
|
531
|
+
|
|
532
|
+
print_property(prop, DIC[prop], desc)
|
|
448
533
|
|
|
449
534
|
print ''
|
|
450
535
|
|
|
451
536
|
if not(POSIX_ONLY):
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
537
|
+
for prop in PROPS:
|
|
538
|
+
klass = KDIC.get(prop, None)
|
|
539
|
+
if klass is None:
|
|
540
|
+
n = len(prop)
|
|
541
|
+
if n == 1:
|
|
542
|
+
klass = 'Major Category'
|
|
543
|
+
elif n == 2:
|
|
544
|
+
klass = 'General Category'
|
|
545
|
+
else:
|
|
546
|
+
klass = '-'
|
|
462
547
|
|
|
463
|
-
|
|
548
|
+
print_property(prop, DIC[prop], klass)
|
|
464
549
|
|
|
465
|
-
|
|
466
|
-
|
|
550
|
+
for block in BLOCKS:
|
|
551
|
+
print_property(block, DIC[block], 'Block')
|
|
467
552
|
|
|
468
553
|
|
|
469
554
|
print ''
|
|
470
555
|
print "static const OnigCodePoint*\nconst CodeRanges[] = {"
|
|
471
556
|
|
|
472
557
|
for prop in POSIX_LIST:
|
|
473
|
-
|
|
558
|
+
print " CR_%s," % prop
|
|
474
559
|
|
|
475
560
|
if not(POSIX_ONLY):
|
|
476
|
-
|
|
477
|
-
|
|
561
|
+
for prop in PROPS:
|
|
562
|
+
print " CR_%s," % prop
|
|
478
563
|
|
|
479
|
-
|
|
480
|
-
|
|
564
|
+
for prop in BLOCKS:
|
|
565
|
+
print " CR_%s," % prop
|
|
481
566
|
|
|
482
567
|
s = '''};
|
|
568
|
+
|
|
569
|
+
#define pool_offset(s) offsetof(struct unicode_prop_name_pool_t, unicode_prop_name_pool_str##s)
|
|
570
|
+
|
|
483
571
|
%}
|
|
484
|
-
struct
|
|
485
|
-
|
|
486
|
-
int ctype;
|
|
572
|
+
struct PoolPropertyNameCtype {
|
|
573
|
+
short int name;
|
|
574
|
+
short int ctype;
|
|
487
575
|
};
|
|
576
|
+
|
|
488
577
|
%%
|
|
489
578
|
'''
|
|
490
579
|
sys.stdout.write(s)
|
|
491
580
|
|
|
492
|
-
if
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
581
|
+
if OUTPUT_LIST_MODE:
|
|
582
|
+
UPF = open("UNICODE_PROPERTIES", "w")
|
|
583
|
+
if VERSION_INFO[0] < 0:
|
|
584
|
+
raise RuntimeError("Unicode Version is not found")
|
|
585
|
+
if EMOJI_VERSION_INFO[0] < 0:
|
|
586
|
+
raise RuntimeError("Emoji Version is not found")
|
|
587
|
+
|
|
588
|
+
print >> UPF, "Unicode Properties (Unicode Version: %d.%d.%d, Emoji: %d.%d)" % (VERSION_INFO[0], VERSION_INFO[1], VERSION_INFO[2], EMOJI_VERSION_INFO[0], EMOJI_VERSION_INFO[1])
|
|
589
|
+
print >> UPF, ''
|
|
497
590
|
|
|
498
591
|
index = -1
|
|
499
592
|
for prop in POSIX_LIST:
|
|
500
593
|
index += 1
|
|
501
|
-
|
|
502
|
-
prop = normalize_prop_name(prop)
|
|
503
|
-
print_prop_and_index(prop, index)
|
|
594
|
+
entry_and_print_prop_and_index(prop, index)
|
|
504
595
|
|
|
505
596
|
if not(POSIX_ONLY):
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
index += 1
|
|
529
|
-
entry_prop_name(name, index)
|
|
530
|
-
name = normalize_prop_name(name)
|
|
531
|
-
print_prop_and_index(name, index)
|
|
597
|
+
for prop in PROPS:
|
|
598
|
+
index += 1
|
|
599
|
+
entry_and_print_prop_and_index(prop, index)
|
|
600
|
+
|
|
601
|
+
NALIASES = map(lambda (k,v):(normalize_prop_name(k), k, v), ALIASES.items())
|
|
602
|
+
NALIASES = sorted(NALIASES)
|
|
603
|
+
for (nk, k, v) in NALIASES:
|
|
604
|
+
nv = normalize_prop_name(v)
|
|
605
|
+
if PropIndex.get(nk, None) is not None:
|
|
606
|
+
print >> sys.stderr, "ALIASES: already exists: %s => %s" % (k, v)
|
|
607
|
+
continue
|
|
608
|
+
aindex = PropIndex.get(nv, None)
|
|
609
|
+
if aindex is None:
|
|
610
|
+
#print >> sys.stderr, "ALIASES: value is not exist: %s => %s" % (k, v)
|
|
611
|
+
continue
|
|
612
|
+
|
|
613
|
+
entry_prop_name(k, aindex)
|
|
614
|
+
print_prop_and_index(nk, aindex)
|
|
615
|
+
|
|
616
|
+
for name in BLOCKS:
|
|
617
|
+
index += 1
|
|
618
|
+
entry_and_print_prop_and_index(name, index)
|
|
532
619
|
|
|
533
620
|
print '%%'
|
|
534
621
|
print ''
|
|
535
|
-
if
|
|
536
|
-
|
|
537
|
-
|
|
622
|
+
if not(POSIX_ONLY):
|
|
623
|
+
if VERSION_INFO[0] < 0:
|
|
624
|
+
raise RuntimeError("Unicode Version is not found")
|
|
625
|
+
if EMOJI_VERSION_INFO[0] < 0:
|
|
626
|
+
raise RuntimeError("Emoji Version is not found")
|
|
627
|
+
|
|
628
|
+
print "#define UNICODE_PROPERTY_VERSION %02d%02d%02d" % (VERSION_INFO[0], VERSION_INFO[1], VERSION_INFO[2])
|
|
629
|
+
print "#define UNICODE_EMOJI_VERSION %02d%02d" % (EMOJI_VERSION_INFO[0], EMOJI_VERSION_INFO[1])
|
|
630
|
+
print ''
|
|
538
631
|
|
|
539
632
|
print "#define PROPERTY_NAME_MAX_SIZE %d" % (PROPERTY_NAME_MAX_LEN + 10)
|
|
540
633
|
print "#define CODE_RANGES_NUM %d" % (index + 1)
|
|
541
634
|
|
|
542
|
-
|
|
543
|
-
|
|
635
|
+
index_props = make_reverse_dic(PropIndex)
|
|
636
|
+
print ''
|
|
637
|
+
for i in range(index + 1):
|
|
638
|
+
for p in index_props[i]:
|
|
639
|
+
print "#define PROP_INDEX_%s %d" % (p.upper(), i)
|
|
640
|
+
|
|
641
|
+
if OUTPUT_LIST_MODE:
|
|
642
|
+
UPF.close()
|
|
544
643
|
|
|
545
644
|
sys.exit(0)
|