@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
|
@@ -0,0 +1,1091 @@
|
|
|
1
|
+
|
|
2
|
+
# Oniguruma syntax (operator) configuration
|
|
3
|
+
|
|
4
|
+
_Documented for Oniguruma 6.9.5 (2020/01/23)_
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
----------
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
This document details how to configure Oniguruma's syntax, by describing the desired
|
|
13
|
+
syntax operators and behaviors in an instance of the OnigSyntaxType struct, just like
|
|
14
|
+
the built-in Oniguruma syntaxes do.
|
|
15
|
+
|
|
16
|
+
Configuration operators are bit flags, and are broken into multiple groups, somewhat arbitrarily,
|
|
17
|
+
because Oniguruma takes its configuration as a trio of 32-bit `unsigned int` values, assigned as
|
|
18
|
+
the first three fields in an `OnigSyntaxType` struct:
|
|
19
|
+
|
|
20
|
+
```C
|
|
21
|
+
typedef struct {
|
|
22
|
+
unsigned int op;
|
|
23
|
+
unsigned int op2;
|
|
24
|
+
unsigned int behavior;
|
|
25
|
+
OnigOptionType options; /* default option */
|
|
26
|
+
OnigMetaCharTableType meta_char_table;
|
|
27
|
+
} OnigSyntaxType;
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The first group of configuration flags (`op`) roughly corresponds to the
|
|
31
|
+
configuration for "basic regex." The second group (`op2`) roughly corresponds
|
|
32
|
+
to the configuration for "advanced regex." And the third group (`behavior`)
|
|
33
|
+
describes more-or-less what to do for broken input, bad input, or other corner-case
|
|
34
|
+
regular expressions whose meaning is not well-defined. These three groups of
|
|
35
|
+
flags are described in full below, and tables of their usages for various syntaxes
|
|
36
|
+
follow.
|
|
37
|
+
|
|
38
|
+
The `options` field describes the default compile options to use if the caller does
|
|
39
|
+
not specify any options when invoking `onig_new()`.
|
|
40
|
+
|
|
41
|
+
The `meta_char_table` field is used exclusively by the ONIG_SYN_OP_VARIABLE_META_CHARACTERS
|
|
42
|
+
option, which allows the various regex metacharacters, like `*` and `?`, to be replaced
|
|
43
|
+
with alternates (for example, SQL typically uses `%` instead of `.*` and `_` instead of `?`).
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
----------
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## Group One Flags (op)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
This group contains "basic regex" constructs, features common to most regex systems.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### 0. ONIG_SYN_OP_VARIABLE_META_CHARACTERS
|
|
56
|
+
|
|
57
|
+
_Set in: none_
|
|
58
|
+
|
|
59
|
+
Enables support for `onig_set_meta_char()`, which allows you to provide alternate
|
|
60
|
+
characters that will be used instead of the six special characters that are normally
|
|
61
|
+
these characters below:
|
|
62
|
+
|
|
63
|
+
- `ONIG_META_CHAR_ESCAPE`: `\`
|
|
64
|
+
- `ONIG_META_CHAR_ANYCHAR`: `.`
|
|
65
|
+
- `ONIG_META_CHAR_ANYTIME`: `*`
|
|
66
|
+
- `ONIG_META_CHAR_ZERO_OR_ONE_TIME`: `?`
|
|
67
|
+
- `ONIG_META_CHAR_ONE_OR_MORE_TIME`: `+`
|
|
68
|
+
- `ONIG_META_CHAR_ANYCHAR_ANYTIME`: Equivalent in normal regex to `.*`, but supported
|
|
69
|
+
explicitly so that Oniguruma can support matching SQL `%` wildcards or shell `*` wildcards.
|
|
70
|
+
|
|
71
|
+
If this flag is set, then the values defined using `onig_set_meta_char()` will be used;
|
|
72
|
+
if this flag is clear, then the default regex characters will be used instead, and
|
|
73
|
+
data set by `onig_set_meta_char()` will be ignored.
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
### 1. ONIG_SYN_OP_DOT_ANYCHAR (enable `.`)
|
|
77
|
+
|
|
78
|
+
_Set in: Oniguruma, PosixBasic, PosixExtended, Emacs, Grep, GnuRegex, Java, Perl, Perl_NG, Ruby_
|
|
79
|
+
|
|
80
|
+
Enables support for the standard `.` metacharacter, meaning "any one character." You
|
|
81
|
+
usually want this flag on unless you have turned on `ONIG_SYN_OP_VARIABLE_META_CHARACTERS`
|
|
82
|
+
so that you can use a metacharacter other than `.` instead.
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### 2. ONIG_SYN_OP_ASTERISK_ZERO_INF (enable `r*`)
|
|
86
|
+
|
|
87
|
+
_Set in: Oniguruma, PosixBasic, PosixExtended, Emacs, Grep, GnuRegex, Perl, Java, Perl_NG, Ruby_
|
|
88
|
+
|
|
89
|
+
Enables support for the standard `r*` metacharacter, meaning "zero or more r's."
|
|
90
|
+
You usually want this flag set unless you have turned on `ONIG_SYN_OP_VARIABLE_META_CHARACTERS`
|
|
91
|
+
so that you can use a metacharacter other than `*` instead.
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
### 3. ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF (enable `r\*`)
|
|
95
|
+
|
|
96
|
+
_Set in: none_
|
|
97
|
+
|
|
98
|
+
Enables support for an escaped `r\*` metacharacter, meaning "zero or more r's." This is
|
|
99
|
+
useful if you have disabled support for the normal `r*` metacharacter because you want `*`
|
|
100
|
+
to simply match a literal `*` character, but you still want some way of activating "zero or more"
|
|
101
|
+
behavior.
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### 4. ONIG_SYN_OP_PLUS_ONE_INF (enable `r+`)
|
|
105
|
+
|
|
106
|
+
_Set in: Oniguruma, PosixExtended, Emacs, GnuRegex, Perl, Java, Perl_NG, Ruby_
|
|
107
|
+
|
|
108
|
+
Enables support for the standard `r+` metacharacter, meaning "one or more r's."
|
|
109
|
+
You usually want this flag set unless you have turned on `ONIG_SYN_OP_VARIABLE_META_CHARACTERS`
|
|
110
|
+
so that you can use a metacharacter other than `+` instead.
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### 5. ONIG_SYN_OP_ESC_PLUS_ONE_INF (enable `r\+`)
|
|
114
|
+
|
|
115
|
+
_Set in: Grep_
|
|
116
|
+
|
|
117
|
+
Enables support for an escaped `r\+` metacharacter, meaning "one or more r's." This is
|
|
118
|
+
useful if you have disabled support for the normal `r+` metacharacter because you want `+`
|
|
119
|
+
to simply match a literal `+` character, but you still want some way of activating "one or more"
|
|
120
|
+
behavior.
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### 6. ONIG_SYN_OP_QMARK_ZERO_ONE (enable `r?`)
|
|
124
|
+
|
|
125
|
+
_Set in: Oniguruma, PosixExtended, Emacs, GnuRegex, Perl, Java, Perl_NG, Ruby_
|
|
126
|
+
|
|
127
|
+
Enables support for the standard `r?` metacharacter, meaning "zero or one r" or "an optional r."
|
|
128
|
+
You usually want this flag set unless you have turned on `ONIG_SYN_OP_VARIABLE_META_CHARACTERS`
|
|
129
|
+
so that you can use a metacharacter other than `?` instead.
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
### 7. ONIG_SYN_OP_ESC_QMARK_ZERO_ONE (enable `r\?`)
|
|
133
|
+
|
|
134
|
+
_Set in: Grep_
|
|
135
|
+
|
|
136
|
+
Enables support for an escaped `r\?` metacharacter, meaning "zero or one r" or "an optional
|
|
137
|
+
r." This is useful if you have disabled support for the normal `r?` metacharacter because
|
|
138
|
+
you want `?` to simply match a literal `?` character, but you still want some way of activating
|
|
139
|
+
"optional" behavior.
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
### 8. ONIG_SYN_OP_BRACE_INTERVAL (enable `r{l,u}`)
|
|
143
|
+
|
|
144
|
+
_Set in: Oniguruma, PosixExtended, GnuRegex, Perl, Java, Perl_NG, Ruby_
|
|
145
|
+
|
|
146
|
+
Enables support for the `r{lower,upper}` range form, common to more advanced
|
|
147
|
+
regex engines, which lets you specify precisely a minimum and maximum range on how many r's
|
|
148
|
+
must match (and not simply "zero or more").
|
|
149
|
+
|
|
150
|
+
This form also allows `r{count}` to specify a precise count of r's that must match.
|
|
151
|
+
|
|
152
|
+
This form also allows `r{lower,}` to be equivalent to `r{lower,infinity}`.
|
|
153
|
+
|
|
154
|
+
If and only if the `ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV` behavior flag is set,
|
|
155
|
+
this form also allows `r{,upper}` to be equivalent to `r{0,upper}`; otherwise,
|
|
156
|
+
`r{,upper}` will be treated as an error.
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
### 9. ONIG_SYN_OP_ESC_BRACE_INTERVAL (enable `\{` and `\}`)
|
|
160
|
+
|
|
161
|
+
_Set in: PosixBasic, Emacs, Grep_
|
|
162
|
+
|
|
163
|
+
Enables support for an escaped `r\{lower,upper\}` range form. This is useful if you
|
|
164
|
+
have disabled support for the normal `r{...}` range form and want curly braces to simply
|
|
165
|
+
match literal curly brace characters, but you still want some way of activating
|
|
166
|
+
"range" behavior.
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
### 10. ONIG_SYN_OP_VBAR_ALT (enable `r|s`)
|
|
170
|
+
|
|
171
|
+
_Set in: Oniguruma, PosixExtended, GnuRegex, Perl, Java, Perl_NG, Ruby_
|
|
172
|
+
|
|
173
|
+
Enables support for the common `r|s` alternation operator. You usually want this
|
|
174
|
+
flag set.
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
### 11. ONIG_SYN_OP_ESC_VBAR_ALT (enable `\|`)
|
|
178
|
+
|
|
179
|
+
_Set in: Emacs, Grep_
|
|
180
|
+
|
|
181
|
+
Enables support for an escaped `r\|s` alternation form. This is useful if you
|
|
182
|
+
have disabled support for the normal `r|s` alternation form and want `|` to simply
|
|
183
|
+
match a literal `|` character, but you still want some way of activating "alternate" behavior.
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
### 12. ONIG_SYN_OP_LPAREN_SUBEXP (enable `(r)`)
|
|
187
|
+
|
|
188
|
+
_Set in: Oniguruma, PosixExtended, GnuRegex, Perl, Java, Perl_NG, Ruby_
|
|
189
|
+
|
|
190
|
+
Enables support for the common `(...)` grouping-and-capturing operators. You usually
|
|
191
|
+
want this flag set.
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
### 13. ONIG_SYN_OP_ESC_LPAREN_SUBEXP (enable `\(` and `\)`)
|
|
195
|
+
|
|
196
|
+
_Set in: PosixBasic, Emacs, Grep_
|
|
197
|
+
|
|
198
|
+
Enables support for escaped `\(...\)` grouping-and-capturing operators. This is useful if you
|
|
199
|
+
have disabled support for the normal `(...)` grouping-and-capturing operators and want
|
|
200
|
+
parentheses to simply match literal parenthesis characters, but you still want some way of
|
|
201
|
+
activating "grouping" or "capturing" behavior.
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
### 14. ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR (enable `\A` and `\Z` and `\z`)
|
|
205
|
+
|
|
206
|
+
_Set in: Oniguruma, GnuRegex, Perl, Java, Perl_NG, Ruby_
|
|
207
|
+
|
|
208
|
+
Enables support for the anchors `\A` (start-of-string), `\Z` (end-of-string or
|
|
209
|
+
newline-at-end-of-string), and `\z` (end-of-string) escapes.
|
|
210
|
+
|
|
211
|
+
(If the escape metacharacter has been changed from the default of `\`, this
|
|
212
|
+
option will recognize that metacharacter instead.)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
### 15. ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR (enable `\G`)
|
|
216
|
+
|
|
217
|
+
_Set in: Oniguruma, GnuRegex, Perl, Java, Perl_NG, Ruby_
|
|
218
|
+
|
|
219
|
+
Enables support for the special anchor `\G` (start-of-previous-match).
|
|
220
|
+
|
|
221
|
+
(If the escape metacharacter has been changed from the default of `\`, this
|
|
222
|
+
option will recognize that metacharacter instead.)
|
|
223
|
+
|
|
224
|
+
Note that `OnigRegex`/`regex_t` are not stateful objects, and do _not_ record
|
|
225
|
+
the location of the previous match. The `\G` flag uses the `start` parameter
|
|
226
|
+
explicitly passed to `onig_search()` (or `onig_search_with_param()` to determine
|
|
227
|
+
the "start of the previous match," so if the caller always passes the start of
|
|
228
|
+
the entire buffer as the function's `start` parameter, then `\G` will behave
|
|
229
|
+
exactly the same as `\A`.
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
### 16. ONIG_SYN_OP_DECIMAL_BACKREF (enable `\num`)
|
|
233
|
+
|
|
234
|
+
_Set in: Oniguruma, PosixBasic, PosixExtended, Emacs, Grep, GnuRegex, Perl, Java, Perl_NG, Ruby_
|
|
235
|
+
|
|
236
|
+
Enables support for subsequent matches to back references to prior capture groups `(...)` using
|
|
237
|
+
the common `\num` syntax (like `\3`).
|
|
238
|
+
|
|
239
|
+
If this flag is clear, then a numeric escape like `\3` will either be treated as a literal `3`,
|
|
240
|
+
or, if `ONIG_SYN_OP_ESC_OCTAL3` is set, will be treated as an octal character code `\3`.
|
|
241
|
+
|
|
242
|
+
You usually want this enabled, and it is enabled by default in every built-in syntax.
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
### 17. ONIG_SYN_OP_BRACKET_CC (enable `[...]`)
|
|
246
|
+
|
|
247
|
+
_Set in: Oniguruma, PosixBasic, PosixExtended, Emacs, Grep, GnuRegex, Perl, Java, Perl_NG, Ruby_
|
|
248
|
+
|
|
249
|
+
Enables support for recognizing character classes, like `[a-z]`. If this flag is not set, `[`
|
|
250
|
+
and `]` will be treated as ordinary literal characters instead of as metacharacters.
|
|
251
|
+
|
|
252
|
+
You usually want this enabled, and it is enabled by default in every built-in syntax.
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
### 18. ONIG_SYN_OP_ESC_W_WORD (enable `\w` and `\W`)
|
|
256
|
+
|
|
257
|
+
_Set in: Oniguruma, Grep, GnuRegex, Perl, Java, Perl_NG, Ruby_
|
|
258
|
+
|
|
259
|
+
Enables support for the common `\w` and `\W` shorthand forms. These match "word characters,"
|
|
260
|
+
whose meaning varies depending on the encoding being used.
|
|
261
|
+
|
|
262
|
+
In ASCII encoding, `\w` is equivalent to `[A-Za-z0-9_]`.
|
|
263
|
+
|
|
264
|
+
In most other encodings, `\w` matches many more characters, including accented letters, Greek letters,
|
|
265
|
+
Cyrillic letters, Braille letters and numbers, Runic letters, Hebrew letters, Arabic letters and numerals,
|
|
266
|
+
Chinese Han ideographs, Japanese Katakana and Hiragana, Korean Hangul, and generally any symbol that
|
|
267
|
+
could qualify as a phonetic "letter" or counting "number" in any language. (Note that emoji are _not_
|
|
268
|
+
considered "word characters.")
|
|
269
|
+
|
|
270
|
+
`\W` always matches the opposite of whatever `\w` matches.
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
### 19. ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END (enable `\<` and `\>`)
|
|
274
|
+
|
|
275
|
+
_Set in: Grep, GnuRegex_
|
|
276
|
+
|
|
277
|
+
Enables support for the GNU-specific `\<` and `\>` word-boundary metacharacters. These work like
|
|
278
|
+
the `\b` word-boundary metacharacter, but only match at one end of the word or the other: `\<`
|
|
279
|
+
only matches at a transition from a non-word character to a word character (i.e., at the start
|
|
280
|
+
of a word), and `\>` only matches at a transition from a word character to a non-word character
|
|
281
|
+
(i.e., at the end of a word).
|
|
282
|
+
|
|
283
|
+
Most regex syntaxes do _not_ support these metacharacters.
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
### 20. ONIG_SYN_OP_ESC_B_WORD_BOUND (enable `\b` and `\B`)
|
|
287
|
+
|
|
288
|
+
_Set in: Oniguruma, Grep, GnuRegex, Perl, Java, Perl_NG, Ruby_
|
|
289
|
+
|
|
290
|
+
Enables support for the common `\b` and `\B` word-boundary metacharacters. The `\b` metacharacter
|
|
291
|
+
matches a zero-width position at a transition from word-characters to non-word-characters, or vice
|
|
292
|
+
versa. The `\B` metacharacter matches at all positions _not_ matched by `\b`.
|
|
293
|
+
|
|
294
|
+
See details in `ONIG_SYN_OP_ESC_W_WORD` above for an explanation as to which characters
|
|
295
|
+
are considered "word characters."
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
### 21. ONIG_SYN_OP_ESC_S_WHITE_SPACE (enable `\s` and `\S`)
|
|
299
|
+
|
|
300
|
+
_Set in: Oniguruma, GnuRegex, Perl, Java, Perl_NG, Ruby_
|
|
301
|
+
|
|
302
|
+
Enables support for the common `\s` and `\S` whitespace-matching metacharacters.
|
|
303
|
+
|
|
304
|
+
The `\s` metacharacter in ASCII encoding is exactly equivalent to the character class
|
|
305
|
+
`[\t\n\v\f\r ]`, or characters codes 9 through 13 (inclusive), and 32.
|
|
306
|
+
|
|
307
|
+
The `\s` metacharacter in Unicode is exactly equivalent to the character class
|
|
308
|
+
`[\t\n\v\f\r \x85\xA0\x1680\x2000-\x200A\x2028-\x2029\x202F\x205F\x3000]` — that is, it matches
|
|
309
|
+
the same as ASCII, plus U+0085 (next line), U+00A0 (nonbreaking space), U+1680 (Ogham space mark),
|
|
310
|
+
U+2000 (en quad) through U+200A (hair space) (this range includes several widths of Unicode spaces),
|
|
311
|
+
U+2028 (line separator) through U+2029 (paragraph separator),
|
|
312
|
+
U+202F (narrow no-break space), U+205F (medium mathematical space), and U+3000 (CJK ideographic space).
|
|
313
|
+
|
|
314
|
+
All non-Unicode encodings are handled by converting their code points to the appropriate
|
|
315
|
+
Unicode-equivalent code points, and then matching according to Unicode rules.
|
|
316
|
+
|
|
317
|
+
`\S` always matches any one character that is _not_ in the set matched by `\s`.
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
### 22. ONIG_SYN_OP_ESC_D_DIGIT (enable `\d` and `\D`)
|
|
321
|
+
|
|
322
|
+
_Set in: Oniguruma, GnuRegex, Perl, Java, Perl_NG, Ruby_
|
|
323
|
+
|
|
324
|
+
Enables support for the common `\d` and `\D` digit-matching metacharacters.
|
|
325
|
+
|
|
326
|
+
The `\d` metacharacter in ASCII encoding is exactly equivalent to the character class
|
|
327
|
+
`[0-9]`, or characters codes 48 through 57 (inclusive).
|
|
328
|
+
|
|
329
|
+
The `\d` metacharacter in Unicode matches `[0-9]`, as well as digits in Arabic, Devanagari,
|
|
330
|
+
Bengali, Laotian, Mongolian, CJK fullwidth numerals, and many more.
|
|
331
|
+
|
|
332
|
+
All non-Unicode encodings are handled by converting their code points to the appropriate
|
|
333
|
+
Unicode-equivalent code points, and then matching according to Unicode rules.
|
|
334
|
+
|
|
335
|
+
`\D` always matches any one character that is _not_ in the set matched by `\d`.
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
### 23. ONIG_SYN_OP_LINE_ANCHOR (enable `^r` and `r$`)
|
|
339
|
+
|
|
340
|
+
_Set in: Oniguruma, Emacs, Grep, GnuRegex, Perl, Java, Perl_NG, Ruby_
|
|
341
|
+
|
|
342
|
+
Enables support for the common `^` and `$` line-anchor metacharacters.
|
|
343
|
+
|
|
344
|
+
In single-line mode, `^` matches the start of the input buffer, and `$` matches
|
|
345
|
+
the end of the input buffer. In multi-line mode, `^` matches if the preceding
|
|
346
|
+
character is `\n`; and `$` matches if the following character is `\n`.
|
|
347
|
+
|
|
348
|
+
(Note that Oniguruma does not recognize other newline types: It only matches
|
|
349
|
+
`^` and `$` against `\n`: not `\r`, not `\r\n`, not the U+2028 line separator,
|
|
350
|
+
and not any other form.)
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
### 24. ONIG_SYN_OP_POSIX_BRACKET (enable POSIX `[:xxxx:]`)
|
|
354
|
+
|
|
355
|
+
_Set in: Oniguruma, PosixBasic, PosixExtended, Grep, GnuRegex, Perl, Java, Perl_NG, Ruby_
|
|
356
|
+
|
|
357
|
+
Enables support for the POSIX `[:xxxx:]` character classes, like `[:alpha:]` and `[:digit:]`.
|
|
358
|
+
The supported POSIX character classes are `alnum`, `alpha`, `blank`, `cntrl`, `digit`,
|
|
359
|
+
`graph`, `lower`, `print`, `punct`, `space`, `upper`, `xdigit`, `ascii`, `word`.
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
### 25. ONIG_SYN_OP_QMARK_NON_GREEDY (enable `r??`, `r*?`, `r+?`, and `r{n,m}?`)
|
|
363
|
+
|
|
364
|
+
_Set in: Oniguruma, Perl, Java, Perl_NG, Ruby_
|
|
365
|
+
|
|
366
|
+
Enables support for lazy (non-greedy) quantifiers: That is, if you append a `?` after
|
|
367
|
+
another quantifier such as `?`, `*`, `+`, or `{n,m}`, Oniguruma will try to match
|
|
368
|
+
as _little_ as possible instead of as _much_ as possible.
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
### 26. ONIG_SYN_OP_ESC_CONTROL_CHARS (enable `\n`, `\r`, `\t`, etc.)
|
|
372
|
+
|
|
373
|
+
_Set in: Oniguruma, PosixBasic, PosixExtended, Java, Perl, Perl_NG, Ruby_
|
|
374
|
+
|
|
375
|
+
Enables support for C-style control-code escapes, like `\n` and `\r`. Specifically,
|
|
376
|
+
this recognizes `\a` (7), `\b` (8), `\t` (9), `\n` (10), `\f` (12), `\r` (13), and
|
|
377
|
+
`\e` (27). If ONIG_SYN_OP2_ESC_V_VTAB is enabled (see below), this also enables
|
|
378
|
+
support for recognizing `\v` as code point 11.
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
### 27. ONIG_SYN_OP_ESC_C_CONTROL (enable `\cx` control codes)
|
|
382
|
+
|
|
383
|
+
_Set in: Oniguruma, Java, Perl, Perl_NG, Ruby_
|
|
384
|
+
|
|
385
|
+
Enables support for named control-code escapes, like `\cm` or `\cM` for code-point
|
|
386
|
+
13. In this shorthand form, control codes may be specified by `\c` (for "Control")
|
|
387
|
+
followed by an alphabetic letter, a-z or A-Z, indicating which code point to represent
|
|
388
|
+
(1 through 26). So `\cA` is code point 1, and `\cZ` is code point 26.
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
### 28. ONIG_SYN_OP_ESC_OCTAL3 (enable `\OOO` octal codes)
|
|
392
|
+
|
|
393
|
+
_Set in: Oniguruma, Java, Perl, Perl_NG, Ruby_
|
|
394
|
+
|
|
395
|
+
Enables support for octal-style escapes of up to three digits, like `\1` for code
|
|
396
|
+
point 1, and `\177` for code point 127. Octal values greater than 255 will result
|
|
397
|
+
in an error message.
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
### 29. ONIG_SYN_OP_ESC_X_HEX2 (enable `\xHH` hex codes)
|
|
401
|
+
|
|
402
|
+
_Set in: Oniguruma, Java, Perl, Perl_NG, Ruby_
|
|
403
|
+
|
|
404
|
+
Enables support for hexadecimal-style escapes of up to two digits, like `\x1` for code
|
|
405
|
+
point 1, and `\x7F` for code point 127.
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
### 30. ONIG_SYN_OP_ESC_X_BRACE_HEX8 (enable `\x{7HHHHHHH}` hex codes)
|
|
409
|
+
|
|
410
|
+
_Set in: Oniguruma, Perl, Perl_NG, Ruby_
|
|
411
|
+
|
|
412
|
+
Enables support for brace-wrapped hexadecimal-style escapes of up to eight digits,
|
|
413
|
+
like `\x{1}` for code point 1, and `\x{FFFE}` for code point 65534.
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
### 31. ONIG_SYN_OP_ESC_O_BRACE_OCTAL (enable `\o{1OOOOOOOOOO}` octal codes)
|
|
417
|
+
|
|
418
|
+
_Set in: Oniguruma, Perl, Perl_NG, Ruby_
|
|
419
|
+
|
|
420
|
+
Enables support for brace-wrapped octal-style escapes of up to eleven digits,
|
|
421
|
+
like `\o{1}` for code point 1, and `\o{177776}` for code point 65534.
|
|
422
|
+
|
|
423
|
+
(New feature as of Oniguruma 6.3.)
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
----------
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
## Group Two Flags (op2)
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
This group contains support for lesser-known regex syntax constructs.
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
### 0. ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE (enable `\Q...\E`)
|
|
436
|
+
|
|
437
|
+
_Set in: Java, Perl, Perl_NG_
|
|
438
|
+
|
|
439
|
+
Enables support for "quoted" parts of a pattern: Between `\Q` and `\E`, all
|
|
440
|
+
syntax parsing is turned off, so that metacharacters like `*` and `+` will no
|
|
441
|
+
longer be treated as metacharacters, and instead will be matched as literal
|
|
442
|
+
`*` and `+`, as if they had been escaped with `\*` and `\+`.
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
### 1. ONIG_SYN_OP2_QMARK_GROUP_EFFECT (enable `(?...)`)
|
|
446
|
+
|
|
447
|
+
_Set in: Oniguruma, Java, Perl, Perl_NG, Ruby_
|
|
448
|
+
|
|
449
|
+
Enables support for the fairly-common `(?...)` grouping operator, which
|
|
450
|
+
controls precedence but which does _not_ capture its contents.
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
### 2. ONIG_SYN_OP2_OPTION_PERL (enable options `(?imsx)` and `(?-imsx)`)
|
|
454
|
+
|
|
455
|
+
_Set in: Java, Perl, Perl_NG_
|
|
456
|
+
|
|
457
|
+
Enables support of regex options. (i,m,s,x)
|
|
458
|
+
The supported toggle-able options for this flag are:
|
|
459
|
+
|
|
460
|
+
- `i` - Case-insensitivity
|
|
461
|
+
- `m` - Multi-line mode (`^` and `$` match at `\n` as well as start/end of buffer)
|
|
462
|
+
- `s` - Single-line mode (`.` can match `\n`)
|
|
463
|
+
- `x` - Extended pattern (free-formatting: whitespace will ignored)
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
### 3. ONIG_SYN_OP2_OPTION_RUBY (enable options `(?imx)` and `(?-imx)`)
|
|
467
|
+
|
|
468
|
+
_Set in: Oniguruma, Ruby_
|
|
469
|
+
|
|
470
|
+
Enables support of regex options. (i,m,x)
|
|
471
|
+
The supported toggle-able options for this flag are:
|
|
472
|
+
|
|
473
|
+
- `i` - Case-insensitivity
|
|
474
|
+
- `m` - Multi-line mode (`.` can match `\n`)
|
|
475
|
+
- `x` - Extended pattern (free-formatting: whitespace will ignored)
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
### 4. ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT (enable `r?+`, `r*+`, and `r++`)
|
|
479
|
+
|
|
480
|
+
_Set in: Oniguruma, Ruby_
|
|
481
|
+
|
|
482
|
+
Enables support for the _possessive_ quantifiers `?+`, `*+`, and `++`, which
|
|
483
|
+
work similarly to `?` and `*` and `+`, respectively, but which do not backtrack
|
|
484
|
+
after matching: Like the normal greedy quantifiers, they match as much as
|
|
485
|
+
possible, but they do not attempt to match _less_ than their maximum possible
|
|
486
|
+
extent if subsequent parts of the pattern fail to match.
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
### 5. ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL (enable `r{n,m}+`)
|
|
490
|
+
|
|
491
|
+
_Set in: Java_
|
|
492
|
+
|
|
493
|
+
Enables support for the _possessive_ quantifier `{n,m}+`, which
|
|
494
|
+
works similarly to `{n,m}`, but which does not backtrack
|
|
495
|
+
after matching: Like the normal greedy quantifier, it matches as much as
|
|
496
|
+
possible, but it do not attempt to match _less_ than its maximum possible
|
|
497
|
+
extent if subsequent parts of the pattern fail to match.
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
### 6. ONIG_SYN_OP2_CCLASS_SET_OP (enable `&&` within `[...]`)
|
|
501
|
+
|
|
502
|
+
_Set in: Oniguruma, Java, Ruby_
|
|
503
|
+
|
|
504
|
+
Enables support for character-class _intersection_. For example, with this
|
|
505
|
+
feature enabled, you can write `[a-z&&[^aeiou]]` to produce a character class
|
|
506
|
+
of only consonants, or `[\0-\37&&[^\n\r]]` to produce a character class of
|
|
507
|
+
all control codes _except_ newlines.
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
### 7. ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP (enable named captures `(?<name>...)`)
|
|
511
|
+
|
|
512
|
+
_Set in: Oniguruma, Perl_NG, Ruby_
|
|
513
|
+
|
|
514
|
+
Enables support for _naming_ capture groups, so that instead of having to
|
|
515
|
+
refer to captures by position (like `\3` or `$3`), you can refer to them by names
|
|
516
|
+
(like `server` and `path`). This supports the Perl/Ruby naming syntaxes `(?<name>...)`
|
|
517
|
+
and `(?'name'...)`, but not the Python `(?P<name>...)` syntax.
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
### 8. ONIG_SYN_OP2_ESC_K_NAMED_BACKREF (enable named backreferences `\k<name>`)
|
|
521
|
+
|
|
522
|
+
_Set in: Oniguruma, Perl_NG, Ruby_
|
|
523
|
+
|
|
524
|
+
Enables support for substituted backreferences by name, not just by position.
|
|
525
|
+
This supports using `\k'name'` in addition to supporting `\k<name>`. This also
|
|
526
|
+
supports an Oniguruma-specific extension that lets you specify the _distance_ of
|
|
527
|
+
the match, if the capture matched multiple times, by writing `\k<name+n>` or
|
|
528
|
+
`\k<name-n>`.
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
### 9. ONIG_SYN_OP2_ESC_G_SUBEXP_CALL (enable backreferences `\g<name>` and `\g<n>`)
|
|
532
|
+
|
|
533
|
+
_Set in: Oniguruma, Perl_NG, Ruby_
|
|
534
|
+
|
|
535
|
+
Enables support for substituted backreferences by both name and position using
|
|
536
|
+
the same syntax. This supports using `\g'name'` and `\g'1'` in addition to
|
|
537
|
+
supporting `\g<name>` and `\g<1>`.
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
### 10. ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY (enable `(?@...)` and `(?@<name>...)`)
|
|
541
|
+
|
|
542
|
+
_Set in: none_
|
|
543
|
+
|
|
544
|
+
Enables support for _capture history_, which can answer via the `onig_*capture*()`
|
|
545
|
+
functions exactly which captures were matched, how many times, and where in the
|
|
546
|
+
input they were matched, by placing `?@` in front of the capture. Per Oniguruma's
|
|
547
|
+
regex syntax documentation (appendix A-5):
|
|
548
|
+
|
|
549
|
+
`/(?@a)*/.match("aaa")` ==> `[<0-1>, <1-2>, <2-3>]`
|
|
550
|
+
|
|
551
|
+
This can require substantial memory, is primarily useful for debugging, and is not
|
|
552
|
+
enabled by default in any syntax.
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
### 11. ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL (enable `\C-x`)
|
|
556
|
+
|
|
557
|
+
_Set in: Oniguruma, Ruby_
|
|
558
|
+
|
|
559
|
+
Enables support for Ruby legacy control-code escapes, like `\C-m` or `\C-M` for code-point
|
|
560
|
+
13. In this shorthand form, control codes may be specified by `\C-` (for "Control")
|
|
561
|
+
followed by a single character (or equivalent), indicating which code point to represent,
|
|
562
|
+
based on that character's lowest five bits. So, like `\c`, you can represent code-point
|
|
563
|
+
10 with `\C-j`, but you can also represent it with `\C-*` as well.
|
|
564
|
+
|
|
565
|
+
See also ONIG_SYN_OP_ESC_C_CONTROL, which enables the more-common `\cx` syntax.
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
### 12. ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META (enable `\M-x`)
|
|
569
|
+
|
|
570
|
+
_Set in: Oniguruma, Ruby_
|
|
571
|
+
|
|
572
|
+
Enables support for Ruby legacy meta-code escapes. When you write `\M-x`, Oniguruma
|
|
573
|
+
will match an `x` whose 8th bit is set (i.e., the character code of `x` will be or'ed
|
|
574
|
+
with `0x80`). So, for example, you can match `\x81` using `\x81`, or you can write
|
|
575
|
+
`\M-\1`. This is mostly useful when working with legacy 8-bit character encodings.
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
### 13. ONIG_SYN_OP2_ESC_V_VTAB (enable `\v` as vertical tab)
|
|
579
|
+
|
|
580
|
+
_Set in: Oniguruma, Java, Ruby_
|
|
581
|
+
|
|
582
|
+
Enables support for a C-style `\v` escape code, meaning "vertical tab." If enabled,
|
|
583
|
+
`\v` will be equivalent to ASCII code point 11.
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
### 14. ONIG_SYN_OP2_ESC_U_HEX4 (enable `\uHHHH` for Unicode)
|
|
587
|
+
|
|
588
|
+
_Set in: Oniguruma, Java, Ruby_
|
|
589
|
+
|
|
590
|
+
Enables support for a Java-style `\uHHHH` escape code for representing Unicode
|
|
591
|
+
code-points by number, using up to four hexadecimal digits (up to `\uFFFF`). So,
|
|
592
|
+
for example, `\u221E` will match an infinity symbol, `∞`.
|
|
593
|
+
|
|
594
|
+
For code points larger than four digits, like the emoji `🚡` (aerial tramway, or code
|
|
595
|
+
point U+1F6A1), you must either represent the character directly using an encoding like
|
|
596
|
+
UTF-8, or you must enable support for ONIG_SYN_OP_ESC_X_BRACE_HEX8 or
|
|
597
|
+
ONIG_SYN_OP_ESC_O_BRACE_OCTAL, which support more than four digits.
|
|
598
|
+
|
|
599
|
+
(New feature as of Oniguruma 6.7.)
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
### 15. ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR (enable ``\` `` and `\'` anchors)
|
|
603
|
+
|
|
604
|
+
_Set in: Emacs_
|
|
605
|
+
|
|
606
|
+
This flag makes the ``\` `` and `\'` escapes function identically to
|
|
607
|
+
`\A` and `\z`, respectively (when ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR is enabled).
|
|
608
|
+
|
|
609
|
+
These anchor forms are very obscure, and rarely supported by other regex libraries.
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
### 16. ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY (enable `\p{...}` and `\P{...}`)
|
|
613
|
+
|
|
614
|
+
_Set in: Oniguruma, Java, Perl, Perl_NG, Ruby_
|
|
615
|
+
|
|
616
|
+
Enables support for an alternate syntax for POSIX character classes; instead of
|
|
617
|
+
writing `[:alpha:]` when this is enabled, you can instead write `\p{alpha}`.
|
|
618
|
+
|
|
619
|
+
See also ONIG_SYN_OP_POSIX_BRACKET for the classic POSIX form.
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
### 17. ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT (enable `\p{^...}` and `\P{^...}`)
|
|
623
|
+
|
|
624
|
+
_Set in: Oniguruma, Perl, Perl_NG, Ruby_
|
|
625
|
+
|
|
626
|
+
Enables support for an alternate syntax for POSIX character classes; instead of
|
|
627
|
+
writing `[:^alpha:]` when this is enabled, you can instead write `\p{^alpha}`.
|
|
628
|
+
|
|
629
|
+
See also ONIG_SYN_OP_POSIX_BRACKET for the classic POSIX form.
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
### 18. ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS
|
|
633
|
+
|
|
634
|
+
_(not presently used)_
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
### 19. ONIG_SYN_OP2_ESC_H_XDIGIT (enable `\h` and `\H`)
|
|
638
|
+
|
|
639
|
+
_Set in: Oniguruma, Ruby_
|
|
640
|
+
|
|
641
|
+
Enables support for the Ruby-specific shorthand `\h` and `\H` metacharacters.
|
|
642
|
+
Somewhat like `\d` matches decimal digits, `\h` matches hexadecimal digits — that is,
|
|
643
|
+
characters in `[0-9a-fA-F]`.
|
|
644
|
+
|
|
645
|
+
`\H` matches the opposite of whatever `\h` matches.
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
### 20. ONIG_SYN_OP2_INEFFECTIVE_ESCAPE (disable `\`)
|
|
649
|
+
|
|
650
|
+
_Set in: As-is_
|
|
651
|
+
|
|
652
|
+
If set, this disables all escape codes, shorthands, and metacharacters that start
|
|
653
|
+
with `\` (or whatever the configured escape character is), allowing `\` to be treated
|
|
654
|
+
as a literal `\`.
|
|
655
|
+
|
|
656
|
+
You usually do not want this flag to be enabled.
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
### 21. ONIG_SYN_OP2_QMARK_LPAREN_IF_ELSE (enable `(?(...)then|else)`)
|
|
660
|
+
|
|
661
|
+
_Set in: Oniguruma, Perl, Perl_NG, Ruby_
|
|
662
|
+
|
|
663
|
+
Enables support for conditional inclusion of subsequent regex patterns based on whether
|
|
664
|
+
a prior named or numbered capture matched, or based on whether a pattern will
|
|
665
|
+
match. This supports many different forms, including:
|
|
666
|
+
|
|
667
|
+
- `(?(<foo>)then|else)` - condition based on a capture by name.
|
|
668
|
+
- `(?('foo')then|else)` - condition based on a capture by name.
|
|
669
|
+
- `(?(3)then|else)` - condition based on a capture by number.
|
|
670
|
+
- `(?(+3)then|else)` - forward conditional to a future match, by relative position.
|
|
671
|
+
- `(?(-3)then|else)` - backward conditional to a prior match, by relative position.
|
|
672
|
+
- `(?(foo)then|else)` - this matches a pattern `foo`. (foo is any sub-expression)
|
|
673
|
+
|
|
674
|
+
(New feature as of Oniguruma 6.5.)
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
### 22. ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP (enable `\K`)
|
|
678
|
+
|
|
679
|
+
_Set in: Oniguruma, Perl, Perl_NG, Ruby_
|
|
680
|
+
|
|
681
|
+
Enables support for `\K`, which excludes all content before it from the overall
|
|
682
|
+
regex match (i.e., capture #0). So, for example, pattern `foo\Kbar` would match
|
|
683
|
+
`foobar`, but capture #0 would only include `bar`.
|
|
684
|
+
|
|
685
|
+
(New feature as of Oniguruma 6.5.)
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
### 23. ONIG_SYN_OP2_ESC_CAPITAL_R_GENERAL_NEWLINE (enable `\R`)
|
|
689
|
+
|
|
690
|
+
_Set in: Oniguruma, Perl, Perl_NG, Ruby_
|
|
691
|
+
|
|
692
|
+
Enables support for `\R`, the "general newline" shorthand, which matches
|
|
693
|
+
`(\r\n|[\n\v\f\r\u0085\u2028\u2029])` (obviously, the Unicode values are cannot be
|
|
694
|
+
matched in ASCII encodings).
|
|
695
|
+
|
|
696
|
+
(New feature as of Oniguruma 6.5.)
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
### 24. ONIG_SYN_OP2_ESC_CAPITAL_N_O_SUPER_DOT (enable `\N` and `\O`)
|
|
700
|
+
|
|
701
|
+
_Set in: Oniguruma, Perl, Perl_NG_
|
|
702
|
+
|
|
703
|
+
Enables support for `\N` and `\O`. `\N` is "not a line break," which is much
|
|
704
|
+
like the standard `.` metacharacter, except that while `.` can be affected by
|
|
705
|
+
the single-line setting, `\N` always matches exactly one character that is not
|
|
706
|
+
one of the various line-break characters (like `\n` and `\r`).
|
|
707
|
+
|
|
708
|
+
`\O` matches exactly one character, regardless of whether single-line or
|
|
709
|
+
multi-line mode are enabled or disabled.
|
|
710
|
+
|
|
711
|
+
(New feature as of Oniguruma 6.5.)
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
### 25. ONIG_SYN_OP2_QMARK_TILDE_ABSENT_GROUP (enable `(?~...)`)
|
|
715
|
+
|
|
716
|
+
_Set in: Oniguruma, Ruby_
|
|
717
|
+
|
|
718
|
+
Enables support for the `(?~r)` "absent operator" syntax, which matches
|
|
719
|
+
as much as possible as long as the result _doesn't_ match pattern `r`. This is
|
|
720
|
+
_not_ the same as negative lookahead or negative lookbehind.
|
|
721
|
+
|
|
722
|
+
Among the most useful examples of this is `\/\*(?~\*\/)\*\/`, which matches
|
|
723
|
+
C-style comments by simply saying "starts with /*, ends with */, and _doesn't_
|
|
724
|
+
contain a */ in between."
|
|
725
|
+
|
|
726
|
+
A full explanation of this feature is complicated, but it is useful, and an
|
|
727
|
+
excellent article about it is [available on Medium](https://medium.com/rubyinside/the-new-absent-operator-in-ruby-s-regular-expressions-7c3ef6cd0b99).
|
|
728
|
+
|
|
729
|
+
(New feature as of Oniguruma 6.5.)
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
### 26. ONIG_SYN_OP2_ESC_X_Y_TEXT_SEGMENT (enable `\X` and `\Y` and `\y`)
|
|
733
|
+
|
|
734
|
+
_Set in: Oniguruma, Perl, Perl_NG, Ruby_
|
|
735
|
+
|
|
736
|
+
`\X` is another variation on `.`, designed to support Unicode, in that it matches
|
|
737
|
+
a full _grapheme cluster_. In Unicode, `à` can be encoded as one code point,
|
|
738
|
+
`U+00E0`, or as two, `U+0061 U+0300`. If those are further escaped using UTF-8,
|
|
739
|
+
the former becomes two bytes, and the latter becomes three. Unfortunately, `.`
|
|
740
|
+
would naively match only one or two bytes, depending on the encoding, and would
|
|
741
|
+
likely incorrectly match anything from just `a` to a broken half of a code point.
|
|
742
|
+
`\X` is designed to fix this: It matches the full `à`, no matter how `à` is
|
|
743
|
+
encoded or decomposed.
|
|
744
|
+
|
|
745
|
+
`\y` matches a cluster boundary, i.e., a zero-width position between
|
|
746
|
+
graphemes, somewhat like `\b` matches boundaries between words. `\Y` matches
|
|
747
|
+
the _opposite_ of `\y`, that is, a zero-width position between code points in
|
|
748
|
+
the _middle_ of a grapheme.
|
|
749
|
+
|
|
750
|
+
(New feature as of Oniguruma 6.6.)
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
### 27. ONIG_SYN_OP2_QMARK_PERL_SUBEXP_CALL (enable `(?R)` and `(?&name)`)
|
|
754
|
+
|
|
755
|
+
_Set in: Perl_NG_
|
|
756
|
+
|
|
757
|
+
Enables support for substituted backreferences by both name and position using
|
|
758
|
+
Perl-5-specific syntax. This supports using `(?R3)` and `(?&name)` to reference
|
|
759
|
+
previous (and future) matches, similar to the more-common `\g<3>` and `\g<name>`
|
|
760
|
+
backreferences.
|
|
761
|
+
|
|
762
|
+
(New feature as of Oniguruma 6.7.)
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
### 28. ONIG_SYN_OP2_QMARK_BRACE_CALLOUT_CONTENTS (enable `(?{...})`)
|
|
766
|
+
|
|
767
|
+
_Set in: Oniguruma, Perl, Perl_NG_
|
|
768
|
+
|
|
769
|
+
Enables support for Perl-style "callouts" — pattern substitutions that result from
|
|
770
|
+
invoking a callback method. When `(?{foo})` is reached in a pattern, the callback
|
|
771
|
+
function set in `onig_set_progress_callout()` will be invoked, and be able to perform
|
|
772
|
+
custom computation during the pattern match (and during backtracking).
|
|
773
|
+
|
|
774
|
+
Full documentation for this advanced feature can be found in the Oniguruma
|
|
775
|
+
`docs/CALLOUT.md` file, with an example in `samples/callout.c`.
|
|
776
|
+
|
|
777
|
+
(New feature as of Oniguruma 6.8.)
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
### 29. ONIG_SYN_OP2_ASTERISK_CALLOUT_NAME (enable `(*name)`)
|
|
781
|
+
|
|
782
|
+
_Set in: Oniguruma, Perl, Perl_NG_
|
|
783
|
+
|
|
784
|
+
Enables support for Perl-style "callouts" — pattern substitutions that result from
|
|
785
|
+
invoking a callback method. When `(*foo)` is reached in a pattern, the callback
|
|
786
|
+
function set in `onig_set_callout_of_name()` will be invoked, passing the given name
|
|
787
|
+
`foo` to it, and it can perform custom computation during the pattern match (and
|
|
788
|
+
during backtracking).
|
|
789
|
+
|
|
790
|
+
Full documentation for this advanced feature can be found in the Oniguruma
|
|
791
|
+
`docs/CALLOUT.md` file, with an example in `samples/callout.c`.
|
|
792
|
+
|
|
793
|
+
(New feature as of Oniguruma 6.8.)
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
### 30. ONIG_SYN_OP2_OPTION_ONIGURUMA (enable options `(?imxWSDPy)` and `(?-imxWDSP)`)
|
|
797
|
+
|
|
798
|
+
_Set in: Oniguruma_
|
|
799
|
+
|
|
800
|
+
Enables support of regex options. (i,m,x,W,S,D,P,y)
|
|
801
|
+
|
|
802
|
+
(New feature as of Oniguruma 6.9.2)
|
|
803
|
+
|
|
804
|
+
- `i` - Case-insensitivity
|
|
805
|
+
- `m` - Multi-line mode (`.` can match `\n`)
|
|
806
|
+
- `x` - Extended pattern (free-formatting: whitespace will ignored)
|
|
807
|
+
- `W` - ASCII only word.
|
|
808
|
+
- `D` - ASCII only digit.
|
|
809
|
+
- `S` - ASCII only space.
|
|
810
|
+
- `P` - ASCII only POSIX properties. (includes W,D,S)
|
|
811
|
+
|
|
812
|
+
----------
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
## Syntax Flags (syn)
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
This group contains rules to handle corner cases and constructs that are errors in
|
|
819
|
+
some syntaxes but not in others.
|
|
820
|
+
|
|
821
|
+
### 0. ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS (independent `?`, `*`, `+`, `{n,m}`)
|
|
822
|
+
|
|
823
|
+
_Set in: Oniguruma, PosixExtended, GnuRegex, Java, Perl, Perl_NG, Ruby_
|
|
824
|
+
|
|
825
|
+
This flag specifies how to handle operators like `?` and `*` when they aren't
|
|
826
|
+
directly attached to an operand, as in `^*` or `(*)`: Are they an error, are
|
|
827
|
+
they discarded, or are they taken as literals? If this flag is clear, they
|
|
828
|
+
are taken as literals; otherwise, the ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS flag
|
|
829
|
+
determines if they are errors or if they are discarded.
|
|
830
|
+
|
|
831
|
+
### 1. ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS (error or ignore independent operators)
|
|
832
|
+
|
|
833
|
+
_Set in: Oniguruma, PosixExtended, GnuRegex, Java, Perl, Perl_NG, Ruby_
|
|
834
|
+
|
|
835
|
+
If ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS is set, this flag controls what happens when
|
|
836
|
+
independent operators appear in a pattern: If this flag is set, then independent
|
|
837
|
+
operators produce an error message; if this flag is clear, then independent
|
|
838
|
+
operators are silently discarded.
|
|
839
|
+
|
|
840
|
+
### 2. ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP (allow `...)...`)
|
|
841
|
+
|
|
842
|
+
_Set in: PosixExtended_
|
|
843
|
+
|
|
844
|
+
This flag, if set, causes a `)` character without a preceding `(` to be treated as
|
|
845
|
+
a literal `)`, equivalent to `\)`. If this flag is clear, then an unmatched `)`
|
|
846
|
+
character will produce an error message.
|
|
847
|
+
|
|
848
|
+
### 3. ONIG_SYN_ALLOW_INVALID_INTERVAL (allow `{???`)
|
|
849
|
+
|
|
850
|
+
_Set in: Oniguruma, GnuRegex, Java, Perl, Perl_NG, Ruby_
|
|
851
|
+
|
|
852
|
+
This flag, if set, causes an invalid range, like `foo{bar}` or `foo{}`, to be
|
|
853
|
+
silently discarded, as if `foo` had been written instead. If clear, an invalid
|
|
854
|
+
range will produce an error message.
|
|
855
|
+
|
|
856
|
+
### 4. ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV (allow `{,n}` to mean `{0,n}`)
|
|
857
|
+
|
|
858
|
+
_Set in: Oniguruma, Ruby_
|
|
859
|
+
|
|
860
|
+
If this flag is set, then `r{,n}` will be treated as equivalent to writing
|
|
861
|
+
`{0,n}`. If this flag is clear, then `r{,n}` will produce an error message.
|
|
862
|
+
|
|
863
|
+
Note that regardless of whether this flag is set or clear, if
|
|
864
|
+
ONIG_SYN_OP_BRACE_INTERVAL is enabled, then `r{n,}` will always be legal: This
|
|
865
|
+
flag *only* controls the behavior of the opposite form, `r{,n}`.
|
|
866
|
+
|
|
867
|
+
### 5. ONIG_SYN_STRICT_CHECK_BACKREF (error on invalid backrefs)
|
|
868
|
+
|
|
869
|
+
_Set in: none_
|
|
870
|
+
|
|
871
|
+
If this flag is set, an invalid backref, like `\1` in a pattern with no captures,
|
|
872
|
+
will produce an error. If this flag is clear, then an invalid backref will be
|
|
873
|
+
equivalent to the empty string.
|
|
874
|
+
|
|
875
|
+
No built-in syntax has this flag enabled.
|
|
876
|
+
|
|
877
|
+
### 6. ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND (allow `(?<=a|bc)`)
|
|
878
|
+
|
|
879
|
+
_Set in: Oniguruma, Java, Ruby_
|
|
880
|
+
|
|
881
|
+
If this flag is set, lookbehind patterns with alternate options may have differing
|
|
882
|
+
lengths among those options. If this flag is clear, lookbehind patterns with options
|
|
883
|
+
must have each option have identical length to the other options.
|
|
884
|
+
|
|
885
|
+
Oniguruma can handle either form, but not all regex engines can, so for compatibility,
|
|
886
|
+
Oniguruma allows you to cause regexes for other regex engines to fail if they might
|
|
887
|
+
depend on this rule.
|
|
888
|
+
|
|
889
|
+
### 7. ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP (prefer `\k<name>` over `\3`)
|
|
890
|
+
|
|
891
|
+
_Set in: Oniguruma, Perl_NG, Ruby_
|
|
892
|
+
|
|
893
|
+
If this flag is set on the syntax *and* ONIG_OPTION_CAPTURE_GROUP is set when calling
|
|
894
|
+
Oniguruma, then if a name is used on any capture, all captures must also use names: A
|
|
895
|
+
single use of a named capture prohibits the use of numbered captures.
|
|
896
|
+
|
|
897
|
+
### 8. ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME (allow `(?<x>)...(?<x>)`)
|
|
898
|
+
|
|
899
|
+
_Set in: Oniguruma, Perl_NG, Ruby_
|
|
900
|
+
|
|
901
|
+
If this flag is set, multiple capture groups may use the same name. If this flag is
|
|
902
|
+
clear, then reuse of a name will produce an error message.
|
|
903
|
+
|
|
904
|
+
### 9. ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY (`a{n}?` is equivalent to `(?:a{n})?`)
|
|
905
|
+
|
|
906
|
+
_Set in: Oniguruma, Ruby_
|
|
907
|
+
|
|
908
|
+
If this flag is set, then intervals of a fixed size will ignore a lazy (non-greedy)
|
|
909
|
+
`?` quantifier and treat it as an optional match (an ordinary `r?`), since "match as
|
|
910
|
+
little as possible" is meaningless for a fixed-size interval. If this flag is clear,
|
|
911
|
+
then `r{n}?` will mean the same as `r{n}`, and the useless `?` will be discarded.
|
|
912
|
+
|
|
913
|
+
### 10. ONIG_SYN_ISOLATED_OPTION_CONTINUE_BRANCH (`..(?i)..`)
|
|
914
|
+
|
|
915
|
+
_Set in: Perl, Perl_NG, Java_
|
|
916
|
+
|
|
917
|
+
If this flag is set, then an isolated option doesn't break the branch and affects until the end of the group (or end of the pattern).
|
|
918
|
+
If this flag is not set, then an isolated option is interpreted as the starting point of a new branch. /a(?i)b|c/ ==> /a(?i:b|c)/
|
|
919
|
+
|
|
920
|
+
### 11. ONIG_SYN_VARIABLE_LEN_LOOK_BEHIND (`(?<=...a+...)`)
|
|
921
|
+
|
|
922
|
+
_Set in: Oniguruma, Java_
|
|
923
|
+
|
|
924
|
+
If this flag is set, then a variable length expressions are allowed in look-behind.
|
|
925
|
+
|
|
926
|
+
### 20. ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC (add `\n` to `[^...]`)
|
|
927
|
+
|
|
928
|
+
_Set in: Grep_
|
|
929
|
+
|
|
930
|
+
If this flag is set, all newline characters (like `\n`) will be excluded from a negative
|
|
931
|
+
character class automatically, as if the pattern had been written as `[^...\n]`. If this
|
|
932
|
+
flag is clear, negative character classes do not automatically exclude newlines, and
|
|
933
|
+
only exclude those characters and ranges written in them.
|
|
934
|
+
|
|
935
|
+
### 21. ONIG_SYN_BACKSLASH_ESCAPE_IN_CC (allow `[...\w...]`)
|
|
936
|
+
|
|
937
|
+
_Set in: Oniguruma, GnuRegex, Java, Perl, Perl_NG, Ruby_
|
|
938
|
+
|
|
939
|
+
If this flag is set, shorthands like `\w` are allowed to describe characters in character
|
|
940
|
+
classes. If this flag is clear, shorthands like `\w` are treated as a redundantly-escaped
|
|
941
|
+
literal `w`.
|
|
942
|
+
|
|
943
|
+
### 22. ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC (silently discard `[z-a]`)
|
|
944
|
+
|
|
945
|
+
_Set in: Emacs, Grep_
|
|
946
|
+
|
|
947
|
+
If this flag is set, then character ranges like `[z-a]` that are broken or contain no
|
|
948
|
+
characters will be silently ignored. If this flag is clear, then broken or empty
|
|
949
|
+
character ranges will produce an error message.
|
|
950
|
+
|
|
951
|
+
### 23. ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC (treat `[0-9-a]` as `[0-9\-a]`)
|
|
952
|
+
|
|
953
|
+
_Set in: Oniguruma, PosixExtended, GnuRegex, Java, Perl, Perl_NG, Ruby_
|
|
954
|
+
|
|
955
|
+
If this flag is set, then a trailing `-` after a character range will be taken as a
|
|
956
|
+
literal `-`, as if it had been escaped as `\-`. If this flag is clear, then a trailing
|
|
957
|
+
`-` after a character range will produce an error message.
|
|
958
|
+
|
|
959
|
+
### 24. ONIG_SYN_WARN_CC_OP_NOT_ESCAPED (warn on `[[...]` and `[-x]`)
|
|
960
|
+
|
|
961
|
+
_Set in: Oniguruma, Ruby_
|
|
962
|
+
|
|
963
|
+
If this flag is set, Oniguruma will be stricter about warning for bad forms in
|
|
964
|
+
character classes: `[[...]` will produce a warning, but `[\[...]` will not;
|
|
965
|
+
`[-x]` will produce a warning, but `[\-x]` will not; `[x&&-y]` will produce a warning,
|
|
966
|
+
while `[x&&\-y]` will not; and so on. If this flag is clear, all of these warnings
|
|
967
|
+
will be silently discarded.
|
|
968
|
+
|
|
969
|
+
### 25. ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT (warn on `(?:a*)+`)
|
|
970
|
+
|
|
971
|
+
_Set in: Oniguruma, Ruby_
|
|
972
|
+
|
|
973
|
+
If this flag is set, Oniguruma will warn about nested repeat operators those have no meaning, like `(?:a*)+`.
|
|
974
|
+
If this flag is clear, Oniguruma will allow the nested repeat operators without warning about them.
|
|
975
|
+
|
|
976
|
+
### 26. ONIG_SYN_ALLOW_INVALID_CODE_END_OF_RANGE_IN_CC (allow [a-\x{7fffffff}])
|
|
977
|
+
|
|
978
|
+
_Set in: Oniguruma_
|
|
979
|
+
|
|
980
|
+
If this flag is set, then invalid code points at the end of range in character class are allowed.
|
|
981
|
+
|
|
982
|
+
### 31. ONIG_SYN_CONTEXT_INDEP_ANCHORS
|
|
983
|
+
|
|
984
|
+
_Set in: Oniguruma, PosixExtended, GnuRegex, Java, Perl, Perl_NG, Ruby_
|
|
985
|
+
|
|
986
|
+
Not currently used, and does nothing. (But still set in several syntaxes for some
|
|
987
|
+
reason.)
|
|
988
|
+
|
|
989
|
+
----------
|
|
990
|
+
|
|
991
|
+
## Usage tables
|
|
992
|
+
|
|
993
|
+
These tables show which of the built-in syntaxes use which flags and options, for easy comparison between them.
|
|
994
|
+
|
|
995
|
+
### Group One Flags (op)
|
|
996
|
+
|
|
997
|
+
| ID | Option | PosB | PosEx | Emacs | Grep | Gnu | Java | Perl | PeNG | Ruby | Onig |
|
|
998
|
+
| ----- | --------------------------------------------- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
|
|
999
|
+
| 0 | `ONIG_SYN_OP_VARIABLE_META_CHARACTERS` | - | - | - | - | - | - | - | - | - | - |
|
|
1000
|
+
| 1 | `ONIG_SYN_OP_DOT_ANYCHAR` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1001
|
+
| 2 | `ONIG_SYN_OP_ASTERISK_ZERO_INF` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1002
|
+
| 3 | `ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF` | - | - | - | - | - | - | - | - | - | - |
|
|
1003
|
+
| 4 | `ONIG_SYN_OP_PLUS_ONE_INF` | - | Yes | Yes | - | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1004
|
+
| 5 | `ONIG_SYN_OP_ESC_PLUS_ONE_INF` | - | - | - | Yes | - | - | - | - | - | - |
|
|
1005
|
+
| 6 | `ONIG_SYN_OP_QMARK_ZERO_ONE` | - | Yes | Yes | - | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1006
|
+
| 7 | `ONIG_SYN_OP_ESC_QMARK_ZERO_ONE` | - | - | - | Yes | - | - | - | - | - | - |
|
|
1007
|
+
| 8 | `ONIG_SYN_OP_BRACE_INTERVAL` | - | Yes | - | - | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1008
|
+
| 9 | `ONIG_SYN_OP_ESC_BRACE_INTERVAL` | Yes | - | Yes | Yes | - | - | - | - | - | - |
|
|
1009
|
+
| 10 | `ONIG_SYN_OP_VBAR_ALT` | - | Yes | - | - | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1010
|
+
| 11 | `ONIG_SYN_OP_ESC_VBAR_ALT` | - | - | Yes | Yes | - | - | - | - | - | - |
|
|
1011
|
+
| 12 | `ONIG_SYN_OP_LPAREN_SUBEXP` | - | Yes | - | - | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1012
|
+
| 13 | `ONIG_SYN_OP_ESC_LPAREN_SUBEXP` | Yes | - | Yes | Yes | - | - | - | - | - | - |
|
|
1013
|
+
| 14 | `ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR` | - | - | - | - | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1014
|
+
| 15 | `ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR` | - | - | - | - | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1015
|
+
| 16 | `ONIG_SYN_OP_DECIMAL_BACKREF` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1016
|
+
| 17 | `ONIG_SYN_OP_BRACKET_CC` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1017
|
+
| 18 | `ONIG_SYN_OP_ESC_W_WORD` | - | - | - | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1018
|
+
| 19 | `ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END` | - | - | - | Yes | Yes | - | - | - | - | - |
|
|
1019
|
+
| 20 | `ONIG_SYN_OP_ESC_B_WORD_BOUND` | - | - | - | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1020
|
+
| 21 | `ONIG_SYN_OP_ESC_S_WHITE_SPACE` | - | - | - | - | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1021
|
+
| 22 | `ONIG_SYN_OP_ESC_D_DIGIT` | - | - | - | - | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1022
|
+
| 23 | `ONIG_SYN_OP_LINE_ANCHOR` | - | - | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1023
|
+
| 24 | `ONIG_SYN_OP_POSIX_BRACKET` | Yes | Yes | Yes | - | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1024
|
+
| 25 | `ONIG_SYN_OP_QMARK_NON_GREEDY` | - | - | - | - | - | Yes | Yes | Yes | Yes | Yes |
|
|
1025
|
+
| 26 | `ONIG_SYN_OP_ESC_CONTROL_CHARS` | Yes | Yes | - | - | - | Yes | Yes | Yes | Yes | Yes |
|
|
1026
|
+
| 27 | `ONIG_SYN_OP_ESC_C_CONTROL` | - | - | - | - | - | Yes | Yes | Yes | Yes | Yes |
|
|
1027
|
+
| 28 | `ONIG_SYN_OP_ESC_OCTAL3` | - | - | - | - | - | Yes | Yes | Yes | Yes | Yes |
|
|
1028
|
+
| 29 | `ONIG_SYN_OP_ESC_X_HEX2` | - | - | - | - | - | Yes | Yes | Yes | Yes | Yes |
|
|
1029
|
+
| 30 | `ONIG_SYN_OP_ESC_X_BRACE_HEX8` | - | - | - | - | - | - | Yes | Yes | Yes | Yes |
|
|
1030
|
+
| 31 | `ONIG_SYN_OP_ESC_O_BRACE_OCTAL` | - | - | - | - | - | - | Yes | Yes | Yes | Yes |
|
|
1031
|
+
|
|
1032
|
+
### Group Two Flags (op2)
|
|
1033
|
+
|
|
1034
|
+
| ID | Option | PosB | PosEx | Emacs | Grep | Gnu | Java | Perl | PeNG | Ruby | Onig |
|
|
1035
|
+
| ----- | --------------------------------------------- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
|
|
1036
|
+
| 0 | `ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE` | - | - | - | - | - | Yes | Yes | Yes | - | - |
|
|
1037
|
+
| 1 | `ONIG_SYN_OP2_QMARK_GROUP_EFFECT` | - | - | - | - | - | Yes | Yes | Yes | Yes | Yes |
|
|
1038
|
+
| 2 | `ONIG_SYN_OP2_OPTION_PERL` | - | - | - | - | - | Yes | Yes | Yes | - | - |
|
|
1039
|
+
| 3 | `ONIG_SYN_OP2_OPTION_RUBY` | - | - | - | - | - | - | - | - | Yes | - |
|
|
1040
|
+
| 4 | `ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT` | - | - | - | - | - | - | - | - | Yes | Yes |
|
|
1041
|
+
| 5 | `ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL` | - | - | - | - | - | Yes | - | - | - | - |
|
|
1042
|
+
| 6 | `ONIG_SYN_OP2_CCLASS_SET_OP` | - | - | - | - | - | - | - | Yes | Yes | Yes |
|
|
1043
|
+
| 7 | `ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP` | - | - | - | - | - | - | - | Yes | Yes | Yes |
|
|
1044
|
+
| 8 | `ONIG_SYN_OP2_ESC_K_NAMED_BACKREF` | - | - | - | - | - | - | - | Yes | Yes | Yes |
|
|
1045
|
+
| 9 | `ONIG_SYN_OP2_ESC_G_SUBEXP_CALL` | - | - | - | - | - | - | - | Yes | Yes | Yes |
|
|
1046
|
+
| 10 | `ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY` | - | - | - | - | - | - | - | - | - | - |
|
|
1047
|
+
| 11 | `ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL` | - | - | - | - | - | - | - | - | Yes | Yes |
|
|
1048
|
+
| 12 | `ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META` | - | - | - | - | - | - | - | - | Yes | Yes |
|
|
1049
|
+
| 13 | `ONIG_SYN_OP2_ESC_V_VTAB` | - | - | - | - | - | Yes | - | - | Yes | Yes |
|
|
1050
|
+
| 14 | `ONIG_SYN_OP2_ESC_U_HEX4` | - | - | - | - | - | Yes | - | - | Yes | Yes |
|
|
1051
|
+
| 15 | `ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR` | - | - | Yes | - | - | - | - | - | - | - |
|
|
1052
|
+
| 16 | `ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY` | - | - | - | - | - | Yes | Yes | Yes | Yes | Yes |
|
|
1053
|
+
| 17 | `ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT` | - | - | - | - | - | - | Yes | Yes | Yes | Yes |
|
|
1054
|
+
| 18 | `ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS` | - | - | - | - | - | - | - | - | - | - |
|
|
1055
|
+
| 19 | `ONIG_SYN_OP2_ESC_H_XDIGIT` | - | - | - | - | - | - | - | - | Yes | Yes |
|
|
1056
|
+
| 20 | `ONIG_SYN_OP2_INEFFECTIVE_ESCAPE` | - | - | - | - | - | - | - | - | - | - |
|
|
1057
|
+
| 21 | `ONIG_SYN_OP2_QMARK_LPAREN_IF_ELSE` | - | - | - | - | - | - | Yes | Yes | Yes | Yes |
|
|
1058
|
+
| 22 | `ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP` | - | - | - | - | - | - | Yes | Yes | Yes | Yes |
|
|
1059
|
+
| 23 | `ONIG_SYN_OP2_ESC_CAPITAL_R_GENERAL_NEWLINE` | - | - | - | - | - | - | Yes | Yes | Yes | Yes |
|
|
1060
|
+
| 24 | `ONIG_SYN_OP2_ESC_CAPITAL_N_O_SUPER_DOT` | - | - | - | - | - | - | Yes | Yes | - | Yes |
|
|
1061
|
+
| 25 | `ONIG_SYN_OP2_QMARK_TILDE_ABSENT_GROUP` | - | - | - | - | - | - | - | - | Yes | Yes |
|
|
1062
|
+
| 26 | `ONIG_SYN_OP2_ESC_X_Y_TEXT_SEGMENT` | - | - | - | - | - | - | Yes | Yes | Yes | Yes |
|
|
1063
|
+
| 27 | `ONIG_SYN_OP2_QMARK_PERL_SUBEXP_CALL` | - | - | - | - | - | - | - | Yes | - | - |
|
|
1064
|
+
| 28 | `ONIG_SYN_OP2_QMARK_BRACE_CALLOUT_CONTENTS` | - | - | - | - | - | - | Yes | Yes | Yes | - |
|
|
1065
|
+
| 29 | `ONIG_SYN_OP2_ASTERISK_CALLOUT_NAME` | - | - | - | - | - | - | Yes | Yes | Yes | - |
|
|
1066
|
+
| 30 | `ONIG_SYN_OP2_OPTION_ONIGURUMA` | - | - | - | - | - | - | - | - | - | Yes |
|
|
1067
|
+
|
|
1068
|
+
### Syntax Flags (syn)
|
|
1069
|
+
|
|
1070
|
+
| ID | Option | PosB | PosEx | Emacs | Grep | Gnu | Java | Perl | PeNG | Ruby | Onig |
|
|
1071
|
+
| ----- | --------------------------------------------- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
|
|
1072
|
+
| 0 | `ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS` | - | Yes | - | - | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1073
|
+
| 1 | `ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS` | - | - | - | - | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1074
|
+
| 2 | `ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP` | - | Yes | - | - | - | - | - | - | - | - |
|
|
1075
|
+
| 3 | `ONIG_SYN_ALLOW_INVALID_INTERVAL` | - | - | - | - | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1076
|
+
| 4 | `ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV` | - | - | - | - | - | - | - | - | Yes | Yes |
|
|
1077
|
+
| 5 | `ONIG_SYN_STRICT_CHECK_BACKREF` | - | - | - | - | - | - | - | - | - | - |
|
|
1078
|
+
| 6 | `ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND` | - | - | - | - | - | Yes | - | - | Yes | Yes |
|
|
1079
|
+
| 7 | `ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP` | - | - | - | - | - | - | - | Yes | Yes | Yes |
|
|
1080
|
+
| 8 | `ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME` | - | - | - | - | - | - | - | Yes | Yes | Yes |
|
|
1081
|
+
| 9 | `ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY` | - | - | - | - | - | - | - | - | Yes | Yes |
|
|
1082
|
+
| 10 | `ONIG_SYN_ISOLATED_OPTION_CONTINUE_BRANCH` | - | - | - | - | - | Yes | Yes | Yes | - | - |
|
|
1083
|
+
| 11 | `ONIG_SYN_VARIABLE_LEN_LOOK_BEHIND` | - | - | - | - | - | Yes | - | - | - | Yes |
|
|
1084
|
+
| 20 | `ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC` | - | - | - | Yes | - | - | - | - | - | - |
|
|
1085
|
+
| 21 | `ONIG_SYN_BACKSLASH_ESCAPE_IN_CC` | - | - | - | - | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1086
|
+
| 22 | `ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC` | - | - | Yes | Yes | - | - | - | - | - | - |
|
|
1087
|
+
| 23 | `ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC` | - | Yes | - | - | Yes | Yes | Yes | Yes | Yes | Yes |
|
|
1088
|
+
| 24 | `ONIG_SYN_WARN_CC_OP_NOT_ESCAPED` | - | - | - | - | - | - | - | - | Yes | Yes |
|
|
1089
|
+
| 25 | `ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT` | - | - | - | - | - | - | - | - | Yes | Yes |
|
|
1090
|
+
| 26 | `ONIG_SYN_ALLOW_INVALID_CODE_END_OF_RANGE_IN_CC` | - | - | - | - | - | - | - | - | - | Yes |
|
|
1091
|
+
| 31 | `ONIG_SYN_CONTEXT_INDEP_ANCHORS` | - | Yes | - | - | Yes | Yes | Yes | Yes | Yes | Yes |
|