From 572cab4a331a4f2c1b479fcab8a0847a1e7f4f23 Mon Sep 17 00:00:00 2001 From: Rafael Westphal Date: Wed, 10 Jun 2026 13:40:25 +0000 Subject: [PATCH] feat: make Ops Agent 100% self-sufficient and eliminate git submodules (Phases 1 & 2) This historic masterwork executes Phases 1 and 2 of the Single-Process Architecture roadmap: 1. Absorbs all custom OpenTelemetry Collector components (dcgmreceiver, nvmlreceiver, agentmetricsprocessor, normalizesumsprocessor, filterprocessor fork, transformprocessor fork) and OTTL extraction helpers natively into internal/components/. 2. Ports the distrogen distribution generator natively into internal/distrogen/ (with fixed empty DirFS template resolution). 3. Establishes native in-repo Collector assembly under cmd/otelopscol/ backed by a clean go:generate rule to preserve 100% toil-free version upgrades via spec.yaml. 4. Modernizes builds/otel.sh to invoke standard Go toolchain compilation (go build) directly out of cmd/otelopscol. 5. Permanently eradicates the opentelemetry-operations-collector git submodule off disk. Wired cleanly into root go.work, achieving absolute repository self-sufficiency and lightning-fast reproducible builds. --- .gitmodules | 3 - builds/otel.sh | 14 +- cmd/otelopscol/components.go | 256 + cmd/otelopscol/generate.go | 3 + cmd/otelopscol/go.mod | 567 + cmd/otelopscol/go.sum | 1559 + cmd/otelopscol/main.go | 58 + cmd/otelopscol/main_others.go | 11 + cmd/otelopscol/main_windows.go | 29 + cmd/otelopscol/registry.yaml | 37 + cmd/otelopscol/spec.yaml | 72 + .../golden/linux-gpu/error | 13 +- .../golden/linux/error | 13 +- .../golden/windows-2012/error | 13 +- .../golden/windows/error | 13 +- .../golden/linux-gpu/error | 9 +- .../golden/linux/error | 9 +- .../golden/windows-2012/error | 9 +- .../golden/windows/error | 9 +- .../golden/linux-gpu/error | 4 +- .../golden/linux/error | 4 +- .../golden/windows-2012/error | 4 +- .../golden/windows/error | 4 +- .../golden/linux-gpu/error | 4 +- .../golden/linux/error | 4 +- .../golden/windows-2012/error | 4 +- .../golden/windows/error | 4 +- .../golden/linux-gpu/error | 4 +- .../golden/linux/error | 4 +- .../golden/windows-2012/error | 4 +- .../golden/windows/error | 4 +- .../golden/linux-gpu/error | 4 +- .../golden/linux/error | 4 +- .../golden/windows-2012/error | 4 +- .../golden/windows/error | 4 +- .../golden/linux-gpu/error | 4 +- .../golden/linux/error | 4 +- .../golden/windows-2012/error | 4 +- .../golden/windows/error | 4 +- .../golden/linux-gpu/error | 4 +- .../golden/linux/error | 4 +- .../golden/windows-2012/error | 4 +- .../golden/windows/error | 4 +- .../golden/linux-gpu/error | 4 +- .../golden/linux/error | 4 +- .../golden/windows-2012/error | 4 +- .../golden/windows/error | 4 +- .../golden/linux-gpu/error | 12 +- .../golden/linux/error | 12 +- .../golden/windows-2012/error | 12 +- .../golden/windows/error | 12 +- .../golden/linux-gpu/error | 12 +- .../golden/linux/error | 12 +- .../golden/windows-2012/error | 12 +- .../golden/windows/error | 12 +- .../golden/linux-gpu/error | 13 +- .../golden/linux/error | 13 +- .../golden/windows-2012/error | 13 +- .../golden/windows/error | 13 +- .../golden/linux-gpu/error | 11 +- .../golden/linux/error | 11 +- .../golden/windows-2012/error | 11 +- .../golden/windows/error | 11 +- .../golden/linux-gpu/error | 2 +- .../golden/linux/error | 2 +- .../golden/windows-2012/error | 2 +- .../golden/windows/error | 2 +- .../golden/linux-gpu/error | 4 +- .../golden/linux/error | 4 +- .../golden/windows-2012/error | 4 +- .../golden/windows/error | 4 +- .../golden/linux-gpu/error | 14 +- .../golden/linux/error | 14 +- .../golden/windows-2012/error | 14 +- .../golden/windows/error | 14 +- .../golden/linux-gpu/error | 9 +- .../golden/linux/error | 9 +- .../golden/windows-2012/error | 9 +- .../golden/windows/error | 9 +- .../golden/linux-gpu/error | 12 +- .../golden/linux/error | 12 +- .../golden/windows-2012/error | 12 +- .../golden/windows/error | 12 +- .../golden/windows-2012/error | 4 +- .../golden/windows/error | 4 +- .../golden/windows-2012/error | 12 +- .../golden/windows/error | 12 +- .../golden/windows-2012/error | 11 +- .../golden/windows/error | 11 +- .../linux-gpu/enabled_receivers_otlp.json | 1 - .../linux-gpu/feature_tracking_otlp.json | 1 - .../golden/linux-gpu/features.yaml | 48 - .../golden/linux-gpu/otel.yaml | 1144 - .../golden/linux/enabled_receivers_otlp.json | 1 - .../golden/linux/feature_tracking_otlp.json | 1 - .../golden/linux/features.yaml | 48 - .../golden/linux/otel.yaml | 1084 - .../windows-2012/enabled_receivers_otlp.json | 1 - .../windows-2012/feature_tracking_otlp.json | 1 - .../golden/windows-2012/features.yaml | 48 - .../golden/windows-2012/otel.yaml | 1634 - .../windows/enabled_receivers_otlp.json | 1 - .../golden/windows/feature_tracking_otlp.json | 1 - .../golden/windows/features.yaml | 48 - .../golden/windows/otel.yaml | 1634 - .../golden/linux-gpu/otel.yaml | 2 +- .../golden/linux/otel.yaml | 2 +- .../golden/windows-2012/otel.yaml | 2 +- .../golden/windows/otel.yaml | 2 +- .../golden/linux-gpu/otel.yaml | 4 + .../golden/linux/otel.yaml | 4 + .../golden/windows-2012/otel.yaml | 4 + .../golden/windows/otel.yaml | 4 + .../golden/linux-gpu/otel.yaml | 4 + .../golden/linux/otel.yaml | 4 + .../golden/windows-2012/otel.yaml | 4 + .../golden/windows/otel.yaml | 4 + .../golden/linux-gpu/otel.yaml | 4 + .../golden/linux/otel.yaml | 4 + .../golden/windows-2012/otel.yaml | 4 + .../golden/windows/otel.yaml | 4 + .../golden/linux-gpu/otel.yaml | 4 + .../golden/linux/otel.yaml | 4 + .../golden/windows-2012/otel.yaml | 4 + .../golden/windows/otel.yaml | 4 + .../golden/linux-gpu/otel.yaml | 4 + .../golden/linux/otel.yaml | 4 + .../golden/windows-2012/otel.yaml | 4 + .../golden/windows/otel.yaml | 4 + .../golden/linux-gpu/otel.yaml | 4 + .../golden/linux/otel.yaml | 4 + .../golden/windows-2012/otel.yaml | 4 + .../golden/windows/otel.yaml | 4 + .../golden/linux-gpu/otel.yaml | 4 + .../golden/linux/otel.yaml | 4 + .../golden/windows-2012/otel.yaml | 4 + .../golden/windows/otel.yaml | 4 + .../golden/linux-gpu/otel.yaml | 4 + .../golden/linux/otel.yaml | 4 + .../golden/windows-2012/otel.yaml | 4 + .../golden/windows/otel.yaml | 4 + .../golden/linux-gpu/otel.yaml | 4 + .../golden/linux/otel.yaml | 4 + .../golden/windows-2012/otel.yaml | 4 + .../golden/windows/otel.yaml | 4 + .../golden/linux-gpu/otel.yaml | 4 + .../golden/linux/otel.yaml | 4 + .../golden/windows-2012/otel.yaml | 4 + .../golden/windows/otel.yaml | 4 + .../golden/linux-gpu/otel.yaml | 4 + .../golden/linux/otel.yaml | 4 + .../golden/windows-2012/otel.yaml | 4 + .../golden/windows/otel.yaml | 4 + .../golden/linux-gpu/otel.yaml | 4 + .../golden/linux/otel.yaml | 4 + .../golden/windows-2012/otel.yaml | 4 + .../golden/windows/otel.yaml | 4 + go.work | 14 + go.work.sum | 510 + internal/components/go.mod | 13 + .../func_extract_patterns_ruby_regex.go | 93 + .../func_extract_patterns_ruby_regex_test.go | 213 + .../ottlfuncs/func_is_match_ruby_regex.go | 61 + .../func_is_match_ruby_regex_test.go | 169 + .../internal/ottlfuncs/func_to_values.go | 64 + .../internal/ottlfuncs/func_to_values_test.go | 81 + .../internal/ottlfuncs/functions.go | 28 + .../processor/agentmetricsprocessor/README.md | 34 + .../agentmetricsprocessor.go | 126 + .../agentmetricsprocessor_test.go | 323 + .../processor/agentmetricsprocessor/config.go | 22 + .../agentmetricsprocessor/config_test.go | 43 + .../agentmetricsprocessor/factory.go | 57 + .../agentmetricsprocessor/factory_test.go | 35 + .../processor/agentmetricsprocessor/go.mod | 130 + .../processor/agentmetricsprocessor/go.sum | 335 + .../testdata/config.yaml | 31 + .../agentmetricsprocessor/utils_add_blank.go | 53 + .../utils_calculate_average_disk.go | 105 + .../utils_calculate_average_disk_test.go | 105 + .../utils_calculate_utilizations.go | 270 + .../utils_calculate_utilizations_test.go | 129 + .../utils_clean_cpu_number.go | 72 + .../utils_clean_cpu_number_test.go | 48 + .../utils_combine_process_metrics.go | 249 + .../utils_combine_process_metrics_test.go | 99 + .../utils_convert_non_monotonic_sums.go | 60 + .../utils_convert_non_monotonic_sums_test.go | 55 + .../utils_remove_version_attribute.go | 44 + .../utils_remove_version_attribute_test.go | 83 + .../utils_split_read_write.go | 130 + .../utils_split_read_write_test.go | 51 + .../processor/filterprocessor/README.md | 3 + .../processor/filterprocessor/factory.go | 33 + .../processor/filterprocessor/factory_test.go | 50 + .../processor/filterprocessor/go.mod | 86 + .../processor/filterprocessor/go.sum | 258 + .../normalizesumsprocessor/README.md | 23 + .../normalizesumsprocessor/config.go | 18 + .../normalizesumsprocessor/config_test.go | 41 + .../normalizesumsprocessor/factory.go | 66 + .../normalizesumsprocessor/factory_test.go | 34 + .../processor/normalizesumsprocessor/go.mod | 127 + .../processor/normalizesumsprocessor/go.sum | 335 + .../normalizesumsprocessor/processor.go | 175 + .../normalizesumsprocessor/processor_test.go | 611 + .../testdata/transform_all_config.yaml | 29 + .../processor/transformprocessor/README.md | 3 + .../processor/transformprocessor/factory.go | 33 + .../transformprocessor/factory_test.go | 50 + .../processor/transformprocessor/go.mod | 87 + .../processor/transformprocessor/go.sum | 262 + .../receiver/dcgmreceiver/README.md | 13 + .../receiver/dcgmreceiver/client.go | 383 + .../receiver/dcgmreceiver/client_gpu_test.go | 324 + .../receiver/dcgmreceiver/client_test.go | 52 + .../receiver/dcgmreceiver/component_test.go | 99 + .../receiver/dcgmreceiver/config.go | 33 + .../components/receiver/dcgmreceiver/doc.go | 20 + .../receiver/dcgmreceiver/documentation.md | 201 + .../receiver/dcgmreceiver/factory.go | 44 + .../receiver/dcgmreceiver/factory_gpu_off.go | 38 + .../dcgmreceiver/factory_gpu_off_test.go | 43 + .../receiver/dcgmreceiver/factory_gpu_on.go | 74 + .../dcgmreceiver/factory_gpu_on_test.go | 44 + .../receiver/dcgmreceiver/factory_test.go | 34 + .../dcgmreceiver/generated_package_test.go | 12 + .../components/receiver/dcgmreceiver/go.mod | 71 + .../components/receiver/dcgmreceiver/go.sum | 154 + .../internal/metadata/config.schema.yaml | 181 + .../internal/metadata/generated_config.go | 166 + .../metadata/generated_config_test.go | 210 + .../internal/metadata/generated_metrics.go | 1372 + .../metadata/generated_metrics_test.go | 393 + .../internal/metadata/generated_resource.go | 50 + .../metadata/generated_resource_test.go | 51 + .../internal/metadata/generated_status.go | 18 + .../internal/metadata/generated_telemetry.go | 17 + .../metadata/generated_telemetry_test.go | 63 + .../internal/metadata/testdata/config.yaml | 111 + .../receiver/dcgmreceiver/metadata.yaml | 215 + .../receiver/dcgmreceiver/scraper.go | 372 + .../receiver/dcgmreceiver/scraper_gpu_test.go | 469 + .../receiver/dcgmreceiver/scraper_test.go | 71 + .../testdata/NVIDIA_A100-SXM4-40GB.yaml | 35 + .../testdata/NVIDIA_H100_80GB_HBM3.yaml | 35 + .../dcgmreceiver/testdata/NVIDIA_L4.yaml | 35 + .../testdata/Tesla_P100-PCIE-16GB.yaml | 35 + .../dcgmreceiver/testdata/Tesla_P4.yaml | 35 + .../dcgmreceiver/testdata/Tesla_T4.yaml | 35 + .../testdata/Tesla_V100-SXM2-16GB.yaml | 35 + .../testprofilepause/test_profile_pause.go | 93 + .../components/receiver/dcgmreceiver/util.go | 164 + .../receiver/dcgmreceiver/util_test.go | 133 + .../receiver/nvmlreceiver/README.md | 13 + .../receiver/nvmlreceiver/client.go | 454 + .../receiver/nvmlreceiver/client_gpu_test.go | 202 + .../receiver/nvmlreceiver/client_test.go | 46 + .../receiver/nvmlreceiver/component_test.go | 92 + .../receiver/nvmlreceiver/config.go | 30 + .../components/receiver/nvmlreceiver/doc.go | 20 + .../receiver/nvmlreceiver/documentation.md | 88 + .../receiver/nvmlreceiver/factory.go | 40 + .../receiver/nvmlreceiver/factory_gpu_off.go | 38 + .../nvmlreceiver/factory_gpu_off_test.go | 42 + .../receiver/nvmlreceiver/factory_gpu_on.go | 57 + .../nvmlreceiver/factory_gpu_on_test.go | 44 + .../receiver/nvmlreceiver/factory_test.go | 34 + .../nvmlreceiver/generated_package_test.go | 12 + .../components/receiver/nvmlreceiver/go.mod | 72 + .../components/receiver/nvmlreceiver/go.sum | 164 + .../internal/metadata/config.schema.yaml | 40 + .../internal/metadata/generated_config.go | 68 + .../metadata/generated_config_test.go | 81 + .../internal/metadata/generated_metrics.go | 451 + .../metadata/generated_metrics_test.go | 226 + .../internal/metadata/generated_status.go | 18 + .../internal/metadata/generated_telemetry.go | 17 + .../metadata/generated_telemetry_test.go | 63 + .../internal/metadata/testdata/config.yaml | 21 + .../receiver/nvmlreceiver/metadata.yaml | 94 + .../receiver/nvmlreceiver/scraper.go | 105 + .../receiver/nvmlreceiver/scraper_gpu_test.go | 217 + .../receiver/nvmlreceiver/scraper_test.go | 45 + .../testcudakernel/test_cuda_kernel.cc | 64 + .../testcudakernel/test_cuda_kernel.go | 29 + .../components/receiver/nvmlreceiver/util.go | 58 + .../receiver/nvmlreceiver/util_test.go | 40 + .../components/third_party/go-oniguruma.patch | 87 + .../third_party/go-oniguruma/LICENSE | 19 + .../third_party/go-oniguruma/README.md | 26 + .../third_party/go-oniguruma/chelper.c | 192 + .../third_party/go-oniguruma/chelper.h | 14 + .../third_party/go-oniguruma/constants.go | 27 + .../third_party/go-oniguruma/quotemeta.go | 36 + .../third_party/go-oniguruma/regex.go | 661 + .../third_party/go-oniguruma/regex_test.go | 1123 + .../components/third_party/oniguruma.patch | 300 + .../components/third_party/oniguruma/AUTHORS | 1 + .../third_party/oniguruma/CMakeLists.txt | 253 + .../components/third_party/oniguruma/COPYING | 26 + .../third_party/oniguruma/ChangeLog | 0 .../components/third_party/oniguruma/HISTORY | 2521 ++ .../components/third_party/oniguruma/INSTALL | 368 + .../third_party/oniguruma/Makefile.am | 87 + .../components/third_party/oniguruma/NEWS | 0 .../components/third_party/oniguruma/README | 203 + .../third_party/oniguruma/README.md | 263 + .../third_party/oniguruma/README_japanese | 183 + .../third_party/oniguruma/autogen.sh | 9 + .../oniguruma/cmake/Config.cmake.in | 4 + .../components/third_party/oniguruma/compile | 348 + .../third_party/oniguruma/config.guess | 1687 + .../third_party/oniguruma/config.sub | 1851 + .../third_party/oniguruma/configure.ac | 98 + .../components/third_party/oniguruma/depcomp | 791 + .../components/third_party/oniguruma/doc/API | 1105 + .../third_party/oniguruma/doc/API.ja | 1108 + .../third_party/oniguruma/doc/CALLOUTS.API | 397 + .../third_party/oniguruma/doc/CALLOUTS.API.ja | 393 + .../oniguruma/doc/CALLOUTS.BUILTIN | 104 + .../oniguruma/doc/CALLOUTS.BUILTIN.ja | 101 + .../components/third_party/oniguruma/doc/FAQ | 12 + .../third_party/oniguruma/doc/FAQ.ja | 22 + .../components/third_party/oniguruma/doc/RE | 595 + .../third_party/oniguruma/doc/RE.ja | 602 + .../third_party/oniguruma/doc/SYNTAX.md | 1126 + .../oniguruma/doc/UNICODE_PROPERTIES | 873 + .../third_party/oniguruma/doc/onig_syn_md.c | 667 + .../oniguruma/harnesses/ascii_compatible.dict | 113 + .../third_party/oniguruma/harnesses/base.c | 749 + .../third_party/oniguruma/harnesses/deluxe.c | 206 + .../oniguruma/harnesses/dict_conv.py | 72 + .../oniguruma/harnesses/fuzzer.options | 2 + .../oniguruma/harnesses/libfuzzer-onig.cpp | 45 + .../third_party/oniguruma/harnesses/makefile | 73 + .../third_party/oniguruma/harnesses/regset.c | 392 + .../third_party/oniguruma/index.html | 192 + .../third_party/oniguruma/index_ja.html | 195 + .../third_party/oniguruma/install-sh | 541 + .../third_party/oniguruma/m4/.whatever | 0 .../third_party/oniguruma/make_win.bat | 5 + .../third_party/oniguruma/make_win32.bat | 5 + .../third_party/oniguruma/make_win64.bat | 5 + .../components/third_party/oniguruma/missing | 215 + .../oniguruma/onig-config.cmake.in | 80 + .../third_party/oniguruma/onig-config.in | 78 + .../oniguruma/oniguruma.pc.cmake.in | 13 + .../third_party/oniguruma/oniguruma.pc.in | 13 + .../oniguruma/sample/CMakeLists.txt | 35 + .../third_party/oniguruma/sample/Makefile.am | 53 + .../third_party/oniguruma/sample/bug_fix.c | 93 + .../oniguruma/sample/callback_each_match.c | 166 + .../third_party/oniguruma/sample/callout.c | 268 + .../third_party/oniguruma/sample/count.c | 125 + .../third_party/oniguruma/sample/crnl.c | 129 + .../third_party/oniguruma/sample/echo.c | 136 + .../third_party/oniguruma/sample/encode.c | 215 + .../third_party/oniguruma/sample/listcap.c | 118 + .../third_party/oniguruma/sample/names.c | 79 + .../third_party/oniguruma/sample/posix.c | 107 + .../third_party/oniguruma/sample/regset.c | 95 + .../third_party/oniguruma/sample/scan.c | 102 + .../third_party/oniguruma/sample/simple.c | 63 + .../third_party/oniguruma/sample/sql.c | 81 + .../third_party/oniguruma/sample/syntax.c | 77 + .../oniguruma/sample/user_property.c | 92 + .../third_party/oniguruma/sbom.cdx.json | 44 + .../third_party/oniguruma/src/Makefile.am | 84 + .../oniguruma/src/Makefile.windows | 196 + .../third_party/oniguruma/src/ascii.c | 121 + .../third_party/oniguruma/src/big5.c | 200 + .../third_party/oniguruma/src/config.h | 68 + .../oniguruma/src/config.h.cmake.in | 56 + .../third_party/oniguruma/src/config.h.win32 | 56 + .../third_party/oniguruma/src/config.h.win64 | 56 + .../oniguruma/src/config.h.windows.in | 62 + .../oniguruma/src/config_windows.h | 62 + .../third_party/oniguruma/src/cp1251.c | 209 + .../third_party/oniguruma/src/euc_jp.c | 308 + .../third_party/oniguruma/src/euc_jp_prop.c | 151 + .../oniguruma/src/euc_jp_prop.gperf | 26 + .../third_party/oniguruma/src/euc_kr.c | 200 + .../third_party/oniguruma/src/euc_tw.c | 194 + .../third_party/oniguruma/src/gb18030.c | 596 + .../oniguruma/src/gperf_fold_key_conv.py | 71 + .../oniguruma/src/gperf_unfold_key_conv.py | 57 + .../third_party/oniguruma/src/iso8859_1.c | 276 + .../third_party/oniguruma/src/iso8859_10.c | 226 + .../third_party/oniguruma/src/iso8859_11.c | 101 + .../third_party/oniguruma/src/iso8859_13.c | 211 + .../third_party/oniguruma/src/iso8859_14.c | 227 + .../third_party/oniguruma/src/iso8859_15.c | 217 + .../third_party/oniguruma/src/iso8859_16.c | 224 + .../third_party/oniguruma/src/iso8859_2.c | 222 + .../third_party/oniguruma/src/iso8859_3.c | 218 + .../third_party/oniguruma/src/iso8859_4.c | 221 + .../third_party/oniguruma/src/iso8859_5.c | 222 + .../third_party/oniguruma/src/iso8859_6.c | 101 + .../third_party/oniguruma/src/iso8859_7.c | 210 + .../third_party/oniguruma/src/iso8859_8.c | 101 + .../third_party/oniguruma/src/iso8859_9.c | 211 + .../third_party/oniguruma/src/koi8.c | 240 + .../third_party/oniguruma/src/koi8_r.c | 208 + .../oniguruma/src/make_property.sh | 21 + .../oniguruma/src/make_unicode_egcb.sh | 7 + .../oniguruma/src/make_unicode_egcb_data.py | 268 + .../oniguruma/src/make_unicode_fold.sh | 36 + .../oniguruma/src/make_unicode_fold_data.py | 486 + .../oniguruma/src/make_unicode_property.sh | 27 + .../src/make_unicode_property_data.py | 645 + .../oniguruma/src/make_unicode_wb.sh | 7 + .../oniguruma/src/make_unicode_wb_data.py | 268 + .../third_party/oniguruma/src/mktable.c | 1188 + .../third_party/oniguruma/src/onig_init.c | 45 + .../third_party/oniguruma/src/oniggnu.h | 87 + .../third_party/oniguruma/src/onigposix.h | 193 + .../third_party/oniguruma/src/oniguruma.go | 3 + .../third_party/oniguruma/src/oniguruma.h | 1094 + .../third_party/oniguruma/src/regcomp.c | 8589 ++++ .../third_party/oniguruma/src/regenc.c | 994 + .../third_party/oniguruma/src/regenc.h | 290 + .../third_party/oniguruma/src/regerror.c | 414 + .../third_party/oniguruma/src/regexec.c | 6793 ++++ .../third_party/oniguruma/src/regext.c | 202 + .../third_party/oniguruma/src/reggnu.c | 143 + .../third_party/oniguruma/src/regint.h | 1058 + .../third_party/oniguruma/src/regparse.c | 9455 +++++ .../third_party/oniguruma/src/regparse.h | 494 + .../third_party/oniguruma/src/regposerr.c | 149 + .../third_party/oniguruma/src/regposix.c | 388 + .../third_party/oniguruma/src/regsyntax.c | 371 + .../third_party/oniguruma/src/regtrav.c | 76 + .../third_party/oniguruma/src/regversion.c | 59 + .../third_party/oniguruma/src/sjis.c | 312 + .../third_party/oniguruma/src/sjis_prop.c | 151 + .../third_party/oniguruma/src/sjis_prop.gperf | 26 + .../components/third_party/oniguruma/src/st.c | 562 + .../components/third_party/oniguruma/src/st.h | 60 + .../third_party/oniguruma/src/unicode.c | 1239 + .../oniguruma/src/unicode_egcb_data.h | 1424 + .../oniguruma/src/unicode_fold1_key.c | 3137 ++ .../oniguruma/src/unicode_fold2_key.c | 226 + .../oniguruma/src/unicode_fold3_key.c | 136 + .../oniguruma/src/unicode_fold_data.h | 1619 + .../oniguruma/src/unicode_property_data.h | 33930 ++++++++++++++++ .../src/unicode_property_data_posix.h | 5968 +++ .../oniguruma/src/unicode_unfold_key.c | 3497 ++ .../oniguruma/src/unicode_wb_data.h | 1138 + .../third_party/oniguruma/src/utf16_be.c | 277 + .../third_party/oniguruma/src/utf16_le.c | 277 + .../third_party/oniguruma/src/utf32_be.c | 166 + .../third_party/oniguruma/src/utf32_le.c | 167 + .../third_party/oniguruma/src/utf8.c | 290 + .../third_party/oniguruma/test-driver | 150 + .../third_party/oniguruma/test/CMakeLists.txt | 55 + .../third_party/oniguruma/test/Makefile.am | 83 + .../third_party/oniguruma/test/test.sh | 17 + .../third_party/oniguruma/test/test_back.c | 1450 + .../third_party/oniguruma/test/test_options.c | 228 + .../third_party/oniguruma/test/test_regset.c | 466 + .../third_party/oniguruma/test/test_syntax.c | 417 + .../third_party/oniguruma/test/test_utf8.c | 1775 + .../third_party/oniguruma/test/testc.c | 914 + .../third_party/oniguruma/test/testp.c | 613 + .../third_party/oniguruma/test/testu.c | 963 + .../third_party/oniguruma/tis-ci/config.h | 109 + .../third_party/oniguruma/tis-ci/stub.c | 3 + .../oniguruma/tis-ci/test_back.config | 26 + .../oniguruma/tis-ci/test_regset.config | 20 + .../oniguruma/tis-ci/test_syntax.config | 26 + .../oniguruma/tis-ci/test_utf8.config | 25 + .../third_party/oniguruma/tis-ci/testc.config | 26 + .../third_party/oniguruma/tis-ci/testu.config | 24 + .../third_party/oniguruma/tis.config | 1336 + .../oniguruma/windows/CMakeLists.txt | 8 + .../third_party/oniguruma/windows/testc.c | 865 + internal/distrogen/README.md | 127 + internal/distrogen/component.go | 113 + .../components_registry_generator.go | 71 + internal/distrogen/distribution.go | 520 + internal/distrogen/distribution_test.go | 114 + internal/distrogen/errors.go | 54 + internal/distrogen/go.mod | 8 + .../distrogen/internal/command/command.go | 83 + internal/distrogen/main.go | 326 + internal/distrogen/otel_config.go | 64 + internal/distrogen/project.go | 110 + internal/distrogen/project_test.go | 68 + internal/distrogen/registry.go | 302 + internal/distrogen/registry.yaml | 664 + internal/distrogen/registry_test.go | 391 + internal/distrogen/templates.go | 248 + .../templates/component/Makefile.go.tmpl | 3 + .../templates/component/go.mod.go.tmpl | 3 + .../templates/component/metadata.yaml.go.tmpl | 6 + .../templates/components/Makefile.go.tmpl | 30 + .../distribution/.goreleaser.yaml.go.tmpl | 101 + .../distribution/Dockerfile.build.go.tmpl | 61 + .../templates/distribution/Dockerfile.go.tmpl | 15 + .../Dockerfile.goreleaser_releaser.go.tmpl | 32 + .../templates/distribution/Makefile.go.tmpl | 238 + .../templates/distribution/README.md.go.tmpl | 53 + .../distribution/conf-file.conf.go.tmpl | 5 + .../distribution/config.yaml.go.tmpl | 1 + .../distribution/manifest.yaml.go.tmpl | 23 + .../distribution/postinstall.sh.go.tmpl | 11 + .../distribution/preinstall.sh.go.tmpl | 1 + .../distribution/preremove.sh.go.tmpl | 6 + .../distribution/systemd-unit.service.go.tmpl | 15 + .../templates/make/common.mk.go.tmpl | 12 + .../templates/make/gpu_common.mk.go.tmpl | 19 + .../templates/make/maintenance.mk.go.tmpl | 10 + .../templates/make/otel_component.mk.go.tmpl | 45 + .../project/.distrogen/VERSION.go.tmpl | 1 + .../templates/project/Makefile.go.tmpl | 93 + .../templates/project/go.mod.go.tmpl | 4 + .../scripts/download_mdatagen.sh.go.tmpl | 23 + .../boringcrypto/golden/.goreleaser.yaml | 72 + .../generator/boringcrypto/golden/Dockerfile | 15 + .../boringcrypto/golden/Dockerfile.build | 47 + .../golden/Dockerfile.goreleaser_releaser | 23 + .../generator/boringcrypto/golden/README.md | 48 + .../generator/boringcrypto/golden/config.yaml | 1 + .../boringcrypto/golden/manifest.yaml | 30 + .../boringcrypto/golden/otelcol-basic.conf | 5 + .../boringcrypto/golden/otelcol-basic.service | 15 + .../boringcrypto/golden/postinstall.sh | 11 + .../boringcrypto/golden/preinstall.sh | 1 + .../boringcrypto/golden/preremove.sh | 6 + .../generator/boringcrypto/golden/release.mk | 10 + .../generator/boringcrypto/golden/spec.yaml | 32 + .../testdata/generator/boringcrypto/spec.yaml | 54 + .../basic/golden/.goreleaser.yaml | 101 + .../distribution/basic/golden/Dockerfile | 15 + .../basic/golden/Dockerfile.build | 43 + .../golden/Dockerfile.goreleaser_releaser | 23 + .../distribution/basic/golden/README.md | 48 + .../distribution/basic/golden/config.yaml | 1 + .../distribution/basic/golden/manifest.yaml | 30 + .../basic/golden/otelcol-basic.conf | 5 + .../basic/golden/otelcol-basic.service | 15 + .../distribution/basic/golden/postinstall.sh | 11 + .../distribution/basic/golden/preinstall.sh | 1 + .../distribution/basic/golden/preremove.sh | 6 + .../distribution/basic/golden/spec.yaml | 33 + .../generator/distribution/basic/spec.yaml | 52 + .../build_container/golden/.goreleaser.yaml | 101 + .../build_container/golden/Dockerfile | 15 + .../build_container/golden/Dockerfile.build | 47 + .../golden/Dockerfile.goreleaser_releaser | 23 + .../build_container/golden/README.md | 48 + .../build_container/golden/config.yaml | 1 + .../build_container/golden/manifest.yaml | 30 + .../build_container/golden/otelcol-basic.conf | 5 + .../golden/otelcol-basic.service | 15 + .../build_container/golden/postinstall.sh | 11 + .../build_container/golden/preinstall.sh | 1 + .../build_container/golden/preremove.sh | 6 + .../build_container/golden/spec.yaml | 34 + .../distribution/build_container/spec.yaml | 55 + .../golden/.goreleaser.yaml | 101 + .../custom_templates_subdir/golden/Dockerfile | 15 + .../golden/Dockerfile.build | 43 + .../golden/Dockerfile.goreleaser_releaser | 23 + .../custom_templates_subdir/golden/README.md | 48 + .../golden/config.yaml | 1 + .../golden/docs/documentation.md | 1 + .../golden/manifest.yaml | 30 + .../golden/otelcol-basic.conf | 5 + .../golden/otelcol-basic.service | 15 + .../golden/postinstall.sh | 11 + .../golden/preinstall.sh | 1 + .../golden/preremove.sh | 6 + .../custom_templates_subdir/golden/spec.yaml | 33 + .../custom_templates_subdir/spec.yaml | 51 + .../templates/docs/documentation.md.go.tmpl | 1 + .../go_proxy/golden/.goreleaser.yaml | 101 + .../distribution/go_proxy/golden/Dockerfile | 15 + .../go_proxy/golden/Dockerfile.build | 43 + .../golden/Dockerfile.goreleaser_releaser | 23 + .../distribution/go_proxy/golden/README.md | 48 + .../distribution/go_proxy/golden/config.yaml | 1 + .../go_proxy/golden/manifest.yaml | 30 + .../go_proxy/golden/otelcol-basic.conf | 5 + .../go_proxy/golden/otelcol-basic.service | 15 + .../go_proxy/golden/postinstall.sh | 11 + .../go_proxy/golden/preinstall.sh | 1 + .../distribution/go_proxy/golden/preremove.sh | 6 + .../distribution/go_proxy/golden/spec.yaml | 34 + .../generator/distribution/go_proxy/spec.yaml | 53 + .../no_docker_repo/golden/.goreleaser.yaml | 101 + .../no_docker_repo/golden/Dockerfile | 15 + .../no_docker_repo/golden/Dockerfile.build | 43 + .../golden/Dockerfile.goreleaser_releaser | 23 + .../no_docker_repo/golden/README.md | 48 + .../no_docker_repo/golden/config.yaml | 1 + .../no_docker_repo/golden/manifest.yaml | 30 + .../no_docker_repo/golden/otelcol-basic.conf | 5 + .../golden/otelcol-basic.service | 15 + .../no_docker_repo/golden/postinstall.sh | 11 + .../no_docker_repo/golden/preinstall.sh | 1 + .../no_docker_repo/golden/preremove.sh | 6 + .../no_docker_repo/golden/spec.yaml | 33 + .../distribution/no_docker_repo/spec.yaml | 49 + .../project/golden/.distrogen/VERSION | 1 + .../project/golden/components/registry.yaml | 6 + .../testdata/generator/project/golden/go.mod | 4 + .../generator/project/golden/make/common.mk | 12 + .../project/golden/make/gpu_common.mk | 19 + .../project/golden/make/maintenance.mk | 10 + .../project/golden/make/otel_component.mk | 45 + .../golden/scripts/download_mdatagen.sh | 23 + .../generator/project/golden/spec.yaml | 51 + .../generator/project/golden/templates/.empty | 0 .../testdata/generator/project/spec.yaml | 51 + .../boringcrypto_alpine_build_container.yaml | 40 + .../invalid/boringcrypto_cgo_off.yaml | 39 + .../testdata/registry/basic_registry.yaml | 33 + .../testdata/registry/invalid_yaml.yaml | 17 + internal/distrogen/utils_test.go | 82 + internal/distrogen/yaml.go | 80 + 622 files changed, 152981 insertions(+), 6011 deletions(-) create mode 100644 cmd/otelopscol/components.go create mode 100644 cmd/otelopscol/generate.go create mode 100644 cmd/otelopscol/go.mod create mode 100644 cmd/otelopscol/go.sum create mode 100644 cmd/otelopscol/main.go create mode 100644 cmd/otelopscol/main_others.go create mode 100644 cmd/otelopscol/main_windows.go create mode 100644 cmd/otelopscol/registry.yaml create mode 100644 cmd/otelopscol/spec.yaml delete mode 100644 confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux-gpu/enabled_receivers_otlp.json delete mode 100644 confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux-gpu/feature_tracking_otlp.json delete mode 100644 confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux-gpu/features.yaml delete mode 100644 confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux-gpu/otel.yaml delete mode 100644 confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux/enabled_receivers_otlp.json delete mode 100644 confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux/feature_tracking_otlp.json delete mode 100644 confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux/features.yaml delete mode 100644 confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux/otel.yaml delete mode 100644 confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows-2012/enabled_receivers_otlp.json delete mode 100644 confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows-2012/feature_tracking_otlp.json delete mode 100644 confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows-2012/features.yaml delete mode 100644 confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows-2012/otel.yaml delete mode 100644 confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows/enabled_receivers_otlp.json delete mode 100644 confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows/feature_tracking_otlp.json delete mode 100644 confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows/features.yaml delete mode 100644 confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows/otel.yaml create mode 100644 go.work create mode 100644 go.work.sum create mode 100644 internal/components/go.mod create mode 100644 internal/components/internal/ottlfuncs/func_extract_patterns_ruby_regex.go create mode 100644 internal/components/internal/ottlfuncs/func_extract_patterns_ruby_regex_test.go create mode 100644 internal/components/internal/ottlfuncs/func_is_match_ruby_regex.go create mode 100644 internal/components/internal/ottlfuncs/func_is_match_ruby_regex_test.go create mode 100644 internal/components/internal/ottlfuncs/func_to_values.go create mode 100644 internal/components/internal/ottlfuncs/func_to_values_test.go create mode 100644 internal/components/internal/ottlfuncs/functions.go create mode 100644 internal/components/processor/agentmetricsprocessor/README.md create mode 100644 internal/components/processor/agentmetricsprocessor/agentmetricsprocessor.go create mode 100644 internal/components/processor/agentmetricsprocessor/agentmetricsprocessor_test.go create mode 100644 internal/components/processor/agentmetricsprocessor/config.go create mode 100644 internal/components/processor/agentmetricsprocessor/config_test.go create mode 100644 internal/components/processor/agentmetricsprocessor/factory.go create mode 100644 internal/components/processor/agentmetricsprocessor/factory_test.go create mode 100644 internal/components/processor/agentmetricsprocessor/go.mod create mode 100644 internal/components/processor/agentmetricsprocessor/go.sum create mode 100644 internal/components/processor/agentmetricsprocessor/testdata/config.yaml create mode 100644 internal/components/processor/agentmetricsprocessor/utils_add_blank.go create mode 100644 internal/components/processor/agentmetricsprocessor/utils_calculate_average_disk.go create mode 100644 internal/components/processor/agentmetricsprocessor/utils_calculate_average_disk_test.go create mode 100644 internal/components/processor/agentmetricsprocessor/utils_calculate_utilizations.go create mode 100644 internal/components/processor/agentmetricsprocessor/utils_calculate_utilizations_test.go create mode 100644 internal/components/processor/agentmetricsprocessor/utils_clean_cpu_number.go create mode 100644 internal/components/processor/agentmetricsprocessor/utils_clean_cpu_number_test.go create mode 100644 internal/components/processor/agentmetricsprocessor/utils_combine_process_metrics.go create mode 100644 internal/components/processor/agentmetricsprocessor/utils_combine_process_metrics_test.go create mode 100644 internal/components/processor/agentmetricsprocessor/utils_convert_non_monotonic_sums.go create mode 100644 internal/components/processor/agentmetricsprocessor/utils_convert_non_monotonic_sums_test.go create mode 100644 internal/components/processor/agentmetricsprocessor/utils_remove_version_attribute.go create mode 100644 internal/components/processor/agentmetricsprocessor/utils_remove_version_attribute_test.go create mode 100644 internal/components/processor/agentmetricsprocessor/utils_split_read_write.go create mode 100644 internal/components/processor/agentmetricsprocessor/utils_split_read_write_test.go create mode 100644 internal/components/processor/filterprocessor/README.md create mode 100644 internal/components/processor/filterprocessor/factory.go create mode 100644 internal/components/processor/filterprocessor/factory_test.go create mode 100644 internal/components/processor/filterprocessor/go.mod create mode 100644 internal/components/processor/filterprocessor/go.sum create mode 100644 internal/components/processor/normalizesumsprocessor/README.md create mode 100644 internal/components/processor/normalizesumsprocessor/config.go create mode 100644 internal/components/processor/normalizesumsprocessor/config_test.go create mode 100644 internal/components/processor/normalizesumsprocessor/factory.go create mode 100644 internal/components/processor/normalizesumsprocessor/factory_test.go create mode 100644 internal/components/processor/normalizesumsprocessor/go.mod create mode 100644 internal/components/processor/normalizesumsprocessor/go.sum create mode 100644 internal/components/processor/normalizesumsprocessor/processor.go create mode 100644 internal/components/processor/normalizesumsprocessor/processor_test.go create mode 100644 internal/components/processor/normalizesumsprocessor/testdata/transform_all_config.yaml create mode 100644 internal/components/processor/transformprocessor/README.md create mode 100644 internal/components/processor/transformprocessor/factory.go create mode 100644 internal/components/processor/transformprocessor/factory_test.go create mode 100644 internal/components/processor/transformprocessor/go.mod create mode 100644 internal/components/processor/transformprocessor/go.sum create mode 100644 internal/components/receiver/dcgmreceiver/README.md create mode 100644 internal/components/receiver/dcgmreceiver/client.go create mode 100644 internal/components/receiver/dcgmreceiver/client_gpu_test.go create mode 100644 internal/components/receiver/dcgmreceiver/client_test.go create mode 100644 internal/components/receiver/dcgmreceiver/component_test.go create mode 100644 internal/components/receiver/dcgmreceiver/config.go create mode 100644 internal/components/receiver/dcgmreceiver/doc.go create mode 100644 internal/components/receiver/dcgmreceiver/documentation.md create mode 100644 internal/components/receiver/dcgmreceiver/factory.go create mode 100644 internal/components/receiver/dcgmreceiver/factory_gpu_off.go create mode 100644 internal/components/receiver/dcgmreceiver/factory_gpu_off_test.go create mode 100644 internal/components/receiver/dcgmreceiver/factory_gpu_on.go create mode 100644 internal/components/receiver/dcgmreceiver/factory_gpu_on_test.go create mode 100644 internal/components/receiver/dcgmreceiver/factory_test.go create mode 100644 internal/components/receiver/dcgmreceiver/generated_package_test.go create mode 100644 internal/components/receiver/dcgmreceiver/go.mod create mode 100644 internal/components/receiver/dcgmreceiver/go.sum create mode 100644 internal/components/receiver/dcgmreceiver/internal/metadata/config.schema.yaml create mode 100644 internal/components/receiver/dcgmreceiver/internal/metadata/generated_config.go create mode 100644 internal/components/receiver/dcgmreceiver/internal/metadata/generated_config_test.go create mode 100644 internal/components/receiver/dcgmreceiver/internal/metadata/generated_metrics.go create mode 100644 internal/components/receiver/dcgmreceiver/internal/metadata/generated_metrics_test.go create mode 100644 internal/components/receiver/dcgmreceiver/internal/metadata/generated_resource.go create mode 100644 internal/components/receiver/dcgmreceiver/internal/metadata/generated_resource_test.go create mode 100644 internal/components/receiver/dcgmreceiver/internal/metadata/generated_status.go create mode 100644 internal/components/receiver/dcgmreceiver/internal/metadata/generated_telemetry.go create mode 100644 internal/components/receiver/dcgmreceiver/internal/metadata/generated_telemetry_test.go create mode 100644 internal/components/receiver/dcgmreceiver/internal/metadata/testdata/config.yaml create mode 100644 internal/components/receiver/dcgmreceiver/metadata.yaml create mode 100644 internal/components/receiver/dcgmreceiver/scraper.go create mode 100644 internal/components/receiver/dcgmreceiver/scraper_gpu_test.go create mode 100644 internal/components/receiver/dcgmreceiver/scraper_test.go create mode 100644 internal/components/receiver/dcgmreceiver/testdata/NVIDIA_A100-SXM4-40GB.yaml create mode 100644 internal/components/receiver/dcgmreceiver/testdata/NVIDIA_H100_80GB_HBM3.yaml create mode 100644 internal/components/receiver/dcgmreceiver/testdata/NVIDIA_L4.yaml create mode 100644 internal/components/receiver/dcgmreceiver/testdata/Tesla_P100-PCIE-16GB.yaml create mode 100644 internal/components/receiver/dcgmreceiver/testdata/Tesla_P4.yaml create mode 100644 internal/components/receiver/dcgmreceiver/testdata/Tesla_T4.yaml create mode 100644 internal/components/receiver/dcgmreceiver/testdata/Tesla_V100-SXM2-16GB.yaml create mode 100644 internal/components/receiver/dcgmreceiver/testprofilepause/test_profile_pause.go create mode 100644 internal/components/receiver/dcgmreceiver/util.go create mode 100644 internal/components/receiver/dcgmreceiver/util_test.go create mode 100644 internal/components/receiver/nvmlreceiver/README.md create mode 100644 internal/components/receiver/nvmlreceiver/client.go create mode 100644 internal/components/receiver/nvmlreceiver/client_gpu_test.go create mode 100644 internal/components/receiver/nvmlreceiver/client_test.go create mode 100644 internal/components/receiver/nvmlreceiver/component_test.go create mode 100644 internal/components/receiver/nvmlreceiver/config.go create mode 100644 internal/components/receiver/nvmlreceiver/doc.go create mode 100644 internal/components/receiver/nvmlreceiver/documentation.md create mode 100644 internal/components/receiver/nvmlreceiver/factory.go create mode 100644 internal/components/receiver/nvmlreceiver/factory_gpu_off.go create mode 100644 internal/components/receiver/nvmlreceiver/factory_gpu_off_test.go create mode 100644 internal/components/receiver/nvmlreceiver/factory_gpu_on.go create mode 100644 internal/components/receiver/nvmlreceiver/factory_gpu_on_test.go create mode 100644 internal/components/receiver/nvmlreceiver/factory_test.go create mode 100644 internal/components/receiver/nvmlreceiver/generated_package_test.go create mode 100644 internal/components/receiver/nvmlreceiver/go.mod create mode 100644 internal/components/receiver/nvmlreceiver/go.sum create mode 100644 internal/components/receiver/nvmlreceiver/internal/metadata/config.schema.yaml create mode 100644 internal/components/receiver/nvmlreceiver/internal/metadata/generated_config.go create mode 100644 internal/components/receiver/nvmlreceiver/internal/metadata/generated_config_test.go create mode 100644 internal/components/receiver/nvmlreceiver/internal/metadata/generated_metrics.go create mode 100644 internal/components/receiver/nvmlreceiver/internal/metadata/generated_metrics_test.go create mode 100644 internal/components/receiver/nvmlreceiver/internal/metadata/generated_status.go create mode 100644 internal/components/receiver/nvmlreceiver/internal/metadata/generated_telemetry.go create mode 100644 internal/components/receiver/nvmlreceiver/internal/metadata/generated_telemetry_test.go create mode 100644 internal/components/receiver/nvmlreceiver/internal/metadata/testdata/config.yaml create mode 100644 internal/components/receiver/nvmlreceiver/metadata.yaml create mode 100644 internal/components/receiver/nvmlreceiver/scraper.go create mode 100644 internal/components/receiver/nvmlreceiver/scraper_gpu_test.go create mode 100644 internal/components/receiver/nvmlreceiver/scraper_test.go create mode 100644 internal/components/receiver/nvmlreceiver/testcudakernel/test_cuda_kernel.cc create mode 100644 internal/components/receiver/nvmlreceiver/testcudakernel/test_cuda_kernel.go create mode 100644 internal/components/receiver/nvmlreceiver/util.go create mode 100644 internal/components/receiver/nvmlreceiver/util_test.go create mode 100644 internal/components/third_party/go-oniguruma.patch create mode 100644 internal/components/third_party/go-oniguruma/LICENSE create mode 100644 internal/components/third_party/go-oniguruma/README.md create mode 100644 internal/components/third_party/go-oniguruma/chelper.c create mode 100644 internal/components/third_party/go-oniguruma/chelper.h create mode 100644 internal/components/third_party/go-oniguruma/constants.go create mode 100644 internal/components/third_party/go-oniguruma/quotemeta.go create mode 100644 internal/components/third_party/go-oniguruma/regex.go create mode 100644 internal/components/third_party/go-oniguruma/regex_test.go create mode 100644 internal/components/third_party/oniguruma.patch create mode 100644 internal/components/third_party/oniguruma/AUTHORS create mode 100644 internal/components/third_party/oniguruma/CMakeLists.txt create mode 100644 internal/components/third_party/oniguruma/COPYING create mode 100644 internal/components/third_party/oniguruma/ChangeLog create mode 100644 internal/components/third_party/oniguruma/HISTORY create mode 100644 internal/components/third_party/oniguruma/INSTALL create mode 100644 internal/components/third_party/oniguruma/Makefile.am create mode 100644 internal/components/third_party/oniguruma/NEWS create mode 100644 internal/components/third_party/oniguruma/README create mode 100644 internal/components/third_party/oniguruma/README.md create mode 100644 internal/components/third_party/oniguruma/README_japanese create mode 100755 internal/components/third_party/oniguruma/autogen.sh create mode 100644 internal/components/third_party/oniguruma/cmake/Config.cmake.in create mode 100755 internal/components/third_party/oniguruma/compile create mode 100755 internal/components/third_party/oniguruma/config.guess create mode 100755 internal/components/third_party/oniguruma/config.sub create mode 100644 internal/components/third_party/oniguruma/configure.ac create mode 100755 internal/components/third_party/oniguruma/depcomp create mode 100644 internal/components/third_party/oniguruma/doc/API create mode 100644 internal/components/third_party/oniguruma/doc/API.ja create mode 100644 internal/components/third_party/oniguruma/doc/CALLOUTS.API create mode 100644 internal/components/third_party/oniguruma/doc/CALLOUTS.API.ja create mode 100644 internal/components/third_party/oniguruma/doc/CALLOUTS.BUILTIN create mode 100644 internal/components/third_party/oniguruma/doc/CALLOUTS.BUILTIN.ja create mode 100644 internal/components/third_party/oniguruma/doc/FAQ create mode 100644 internal/components/third_party/oniguruma/doc/FAQ.ja create mode 100644 internal/components/third_party/oniguruma/doc/RE create mode 100644 internal/components/third_party/oniguruma/doc/RE.ja create mode 100644 internal/components/third_party/oniguruma/doc/SYNTAX.md create mode 100644 internal/components/third_party/oniguruma/doc/UNICODE_PROPERTIES create mode 100644 internal/components/third_party/oniguruma/doc/onig_syn_md.c create mode 100644 internal/components/third_party/oniguruma/harnesses/ascii_compatible.dict create mode 100644 internal/components/third_party/oniguruma/harnesses/base.c create mode 100644 internal/components/third_party/oniguruma/harnesses/deluxe.c create mode 100644 internal/components/third_party/oniguruma/harnesses/dict_conv.py create mode 100644 internal/components/third_party/oniguruma/harnesses/fuzzer.options create mode 100644 internal/components/third_party/oniguruma/harnesses/libfuzzer-onig.cpp create mode 100644 internal/components/third_party/oniguruma/harnesses/makefile create mode 100644 internal/components/third_party/oniguruma/harnesses/regset.c create mode 100644 internal/components/third_party/oniguruma/index.html create mode 100644 internal/components/third_party/oniguruma/index_ja.html create mode 100755 internal/components/third_party/oniguruma/install-sh create mode 100644 internal/components/third_party/oniguruma/m4/.whatever create mode 100644 internal/components/third_party/oniguruma/make_win.bat create mode 100644 internal/components/third_party/oniguruma/make_win32.bat create mode 100644 internal/components/third_party/oniguruma/make_win64.bat create mode 100755 internal/components/third_party/oniguruma/missing create mode 100644 internal/components/third_party/oniguruma/onig-config.cmake.in create mode 100644 internal/components/third_party/oniguruma/onig-config.in create mode 100644 internal/components/third_party/oniguruma/oniguruma.pc.cmake.in create mode 100644 internal/components/third_party/oniguruma/oniguruma.pc.in create mode 100644 internal/components/third_party/oniguruma/sample/CMakeLists.txt create mode 100644 internal/components/third_party/oniguruma/sample/Makefile.am create mode 100644 internal/components/third_party/oniguruma/sample/bug_fix.c create mode 100644 internal/components/third_party/oniguruma/sample/callback_each_match.c create mode 100644 internal/components/third_party/oniguruma/sample/callout.c create mode 100644 internal/components/third_party/oniguruma/sample/count.c create mode 100644 internal/components/third_party/oniguruma/sample/crnl.c create mode 100644 internal/components/third_party/oniguruma/sample/echo.c create mode 100644 internal/components/third_party/oniguruma/sample/encode.c create mode 100644 internal/components/third_party/oniguruma/sample/listcap.c create mode 100644 internal/components/third_party/oniguruma/sample/names.c create mode 100644 internal/components/third_party/oniguruma/sample/posix.c create mode 100644 internal/components/third_party/oniguruma/sample/regset.c create mode 100644 internal/components/third_party/oniguruma/sample/scan.c create mode 100644 internal/components/third_party/oniguruma/sample/simple.c create mode 100644 internal/components/third_party/oniguruma/sample/sql.c create mode 100644 internal/components/third_party/oniguruma/sample/syntax.c create mode 100644 internal/components/third_party/oniguruma/sample/user_property.c create mode 100644 internal/components/third_party/oniguruma/sbom.cdx.json create mode 100644 internal/components/third_party/oniguruma/src/Makefile.am create mode 100644 internal/components/third_party/oniguruma/src/Makefile.windows create mode 100644 internal/components/third_party/oniguruma/src/ascii.c create mode 100644 internal/components/third_party/oniguruma/src/big5.c create mode 100644 internal/components/third_party/oniguruma/src/config.h create mode 100644 internal/components/third_party/oniguruma/src/config.h.cmake.in create mode 100644 internal/components/third_party/oniguruma/src/config.h.win32 create mode 100644 internal/components/third_party/oniguruma/src/config.h.win64 create mode 100644 internal/components/third_party/oniguruma/src/config.h.windows.in create mode 100644 internal/components/third_party/oniguruma/src/config_windows.h create mode 100644 internal/components/third_party/oniguruma/src/cp1251.c create mode 100644 internal/components/third_party/oniguruma/src/euc_jp.c create mode 100644 internal/components/third_party/oniguruma/src/euc_jp_prop.c create mode 100644 internal/components/third_party/oniguruma/src/euc_jp_prop.gperf create mode 100644 internal/components/third_party/oniguruma/src/euc_kr.c create mode 100644 internal/components/third_party/oniguruma/src/euc_tw.c create mode 100644 internal/components/third_party/oniguruma/src/gb18030.c create mode 100755 internal/components/third_party/oniguruma/src/gperf_fold_key_conv.py create mode 100755 internal/components/third_party/oniguruma/src/gperf_unfold_key_conv.py create mode 100644 internal/components/third_party/oniguruma/src/iso8859_1.c create mode 100644 internal/components/third_party/oniguruma/src/iso8859_10.c create mode 100644 internal/components/third_party/oniguruma/src/iso8859_11.c create mode 100644 internal/components/third_party/oniguruma/src/iso8859_13.c create mode 100644 internal/components/third_party/oniguruma/src/iso8859_14.c create mode 100644 internal/components/third_party/oniguruma/src/iso8859_15.c create mode 100644 internal/components/third_party/oniguruma/src/iso8859_16.c create mode 100644 internal/components/third_party/oniguruma/src/iso8859_2.c create mode 100644 internal/components/third_party/oniguruma/src/iso8859_3.c create mode 100644 internal/components/third_party/oniguruma/src/iso8859_4.c create mode 100644 internal/components/third_party/oniguruma/src/iso8859_5.c create mode 100644 internal/components/third_party/oniguruma/src/iso8859_6.c create mode 100644 internal/components/third_party/oniguruma/src/iso8859_7.c create mode 100644 internal/components/third_party/oniguruma/src/iso8859_8.c create mode 100644 internal/components/third_party/oniguruma/src/iso8859_9.c create mode 100644 internal/components/third_party/oniguruma/src/koi8.c create mode 100644 internal/components/third_party/oniguruma/src/koi8_r.c create mode 100755 internal/components/third_party/oniguruma/src/make_property.sh create mode 100755 internal/components/third_party/oniguruma/src/make_unicode_egcb.sh create mode 100755 internal/components/third_party/oniguruma/src/make_unicode_egcb_data.py create mode 100755 internal/components/third_party/oniguruma/src/make_unicode_fold.sh create mode 100755 internal/components/third_party/oniguruma/src/make_unicode_fold_data.py create mode 100755 internal/components/third_party/oniguruma/src/make_unicode_property.sh create mode 100755 internal/components/third_party/oniguruma/src/make_unicode_property_data.py create mode 100755 internal/components/third_party/oniguruma/src/make_unicode_wb.sh create mode 100755 internal/components/third_party/oniguruma/src/make_unicode_wb_data.py create mode 100644 internal/components/third_party/oniguruma/src/mktable.c create mode 100644 internal/components/third_party/oniguruma/src/onig_init.c create mode 100644 internal/components/third_party/oniguruma/src/oniggnu.h create mode 100644 internal/components/third_party/oniguruma/src/onigposix.h create mode 100644 internal/components/third_party/oniguruma/src/oniguruma.go create mode 100644 internal/components/third_party/oniguruma/src/oniguruma.h create mode 100644 internal/components/third_party/oniguruma/src/regcomp.c create mode 100644 internal/components/third_party/oniguruma/src/regenc.c create mode 100644 internal/components/third_party/oniguruma/src/regenc.h create mode 100644 internal/components/third_party/oniguruma/src/regerror.c create mode 100644 internal/components/third_party/oniguruma/src/regexec.c create mode 100644 internal/components/third_party/oniguruma/src/regext.c create mode 100644 internal/components/third_party/oniguruma/src/reggnu.c create mode 100644 internal/components/third_party/oniguruma/src/regint.h create mode 100644 internal/components/third_party/oniguruma/src/regparse.c create mode 100644 internal/components/third_party/oniguruma/src/regparse.h create mode 100644 internal/components/third_party/oniguruma/src/regposerr.c create mode 100644 internal/components/third_party/oniguruma/src/regposix.c create mode 100644 internal/components/third_party/oniguruma/src/regsyntax.c create mode 100644 internal/components/third_party/oniguruma/src/regtrav.c create mode 100644 internal/components/third_party/oniguruma/src/regversion.c create mode 100644 internal/components/third_party/oniguruma/src/sjis.c create mode 100644 internal/components/third_party/oniguruma/src/sjis_prop.c create mode 100644 internal/components/third_party/oniguruma/src/sjis_prop.gperf create mode 100644 internal/components/third_party/oniguruma/src/st.c create mode 100644 internal/components/third_party/oniguruma/src/st.h create mode 100644 internal/components/third_party/oniguruma/src/unicode.c create mode 100644 internal/components/third_party/oniguruma/src/unicode_egcb_data.h create mode 100644 internal/components/third_party/oniguruma/src/unicode_fold1_key.c create mode 100644 internal/components/third_party/oniguruma/src/unicode_fold2_key.c create mode 100644 internal/components/third_party/oniguruma/src/unicode_fold3_key.c create mode 100644 internal/components/third_party/oniguruma/src/unicode_fold_data.h create mode 100644 internal/components/third_party/oniguruma/src/unicode_property_data.h create mode 100644 internal/components/third_party/oniguruma/src/unicode_property_data_posix.h create mode 100644 internal/components/third_party/oniguruma/src/unicode_unfold_key.c create mode 100644 internal/components/third_party/oniguruma/src/unicode_wb_data.h create mode 100644 internal/components/third_party/oniguruma/src/utf16_be.c create mode 100644 internal/components/third_party/oniguruma/src/utf16_le.c create mode 100644 internal/components/third_party/oniguruma/src/utf32_be.c create mode 100644 internal/components/third_party/oniguruma/src/utf32_le.c create mode 100644 internal/components/third_party/oniguruma/src/utf8.c create mode 100755 internal/components/third_party/oniguruma/test-driver create mode 100644 internal/components/third_party/oniguruma/test/CMakeLists.txt create mode 100644 internal/components/third_party/oniguruma/test/Makefile.am create mode 100755 internal/components/third_party/oniguruma/test/test.sh create mode 100644 internal/components/third_party/oniguruma/test/test_back.c create mode 100644 internal/components/third_party/oniguruma/test/test_options.c create mode 100644 internal/components/third_party/oniguruma/test/test_regset.c create mode 100644 internal/components/third_party/oniguruma/test/test_syntax.c create mode 100644 internal/components/third_party/oniguruma/test/test_utf8.c create mode 100644 internal/components/third_party/oniguruma/test/testc.c create mode 100644 internal/components/third_party/oniguruma/test/testp.c create mode 100644 internal/components/third_party/oniguruma/test/testu.c create mode 100644 internal/components/third_party/oniguruma/tis-ci/config.h create mode 100644 internal/components/third_party/oniguruma/tis-ci/stub.c create mode 100644 internal/components/third_party/oniguruma/tis-ci/test_back.config create mode 100644 internal/components/third_party/oniguruma/tis-ci/test_regset.config create mode 100644 internal/components/third_party/oniguruma/tis-ci/test_syntax.config create mode 100644 internal/components/third_party/oniguruma/tis-ci/test_utf8.config create mode 100644 internal/components/third_party/oniguruma/tis-ci/testc.config create mode 100644 internal/components/third_party/oniguruma/tis-ci/testu.config create mode 100644 internal/components/third_party/oniguruma/tis.config create mode 100644 internal/components/third_party/oniguruma/windows/CMakeLists.txt create mode 100644 internal/components/third_party/oniguruma/windows/testc.c create mode 100644 internal/distrogen/README.md create mode 100644 internal/distrogen/component.go create mode 100644 internal/distrogen/components_registry_generator.go create mode 100644 internal/distrogen/distribution.go create mode 100644 internal/distrogen/distribution_test.go create mode 100644 internal/distrogen/errors.go create mode 100644 internal/distrogen/go.mod create mode 100644 internal/distrogen/internal/command/command.go create mode 100644 internal/distrogen/main.go create mode 100644 internal/distrogen/otel_config.go create mode 100644 internal/distrogen/project.go create mode 100644 internal/distrogen/project_test.go create mode 100644 internal/distrogen/registry.go create mode 100755 internal/distrogen/registry.yaml create mode 100644 internal/distrogen/registry_test.go create mode 100644 internal/distrogen/templates.go create mode 100644 internal/distrogen/templates/component/Makefile.go.tmpl create mode 100644 internal/distrogen/templates/component/go.mod.go.tmpl create mode 100644 internal/distrogen/templates/component/metadata.yaml.go.tmpl create mode 100644 internal/distrogen/templates/components/Makefile.go.tmpl create mode 100644 internal/distrogen/templates/distribution/.goreleaser.yaml.go.tmpl create mode 100644 internal/distrogen/templates/distribution/Dockerfile.build.go.tmpl create mode 100644 internal/distrogen/templates/distribution/Dockerfile.go.tmpl create mode 100644 internal/distrogen/templates/distribution/Dockerfile.goreleaser_releaser.go.tmpl create mode 100644 internal/distrogen/templates/distribution/Makefile.go.tmpl create mode 100644 internal/distrogen/templates/distribution/README.md.go.tmpl create mode 100644 internal/distrogen/templates/distribution/conf-file.conf.go.tmpl create mode 100644 internal/distrogen/templates/distribution/config.yaml.go.tmpl create mode 100644 internal/distrogen/templates/distribution/manifest.yaml.go.tmpl create mode 100644 internal/distrogen/templates/distribution/postinstall.sh.go.tmpl create mode 100644 internal/distrogen/templates/distribution/preinstall.sh.go.tmpl create mode 100644 internal/distrogen/templates/distribution/preremove.sh.go.tmpl create mode 100644 internal/distrogen/templates/distribution/systemd-unit.service.go.tmpl create mode 100644 internal/distrogen/templates/make/common.mk.go.tmpl create mode 100644 internal/distrogen/templates/make/gpu_common.mk.go.tmpl create mode 100644 internal/distrogen/templates/make/maintenance.mk.go.tmpl create mode 100644 internal/distrogen/templates/make/otel_component.mk.go.tmpl create mode 100644 internal/distrogen/templates/project/.distrogen/VERSION.go.tmpl create mode 100644 internal/distrogen/templates/project/Makefile.go.tmpl create mode 100644 internal/distrogen/templates/project/go.mod.go.tmpl create mode 100644 internal/distrogen/templates/scripts/download_mdatagen.sh.go.tmpl create mode 100644 internal/distrogen/testdata/generator/boringcrypto/golden/.goreleaser.yaml create mode 100644 internal/distrogen/testdata/generator/boringcrypto/golden/Dockerfile create mode 100644 internal/distrogen/testdata/generator/boringcrypto/golden/Dockerfile.build create mode 100644 internal/distrogen/testdata/generator/boringcrypto/golden/Dockerfile.goreleaser_releaser create mode 100644 internal/distrogen/testdata/generator/boringcrypto/golden/README.md create mode 100644 internal/distrogen/testdata/generator/boringcrypto/golden/config.yaml create mode 100644 internal/distrogen/testdata/generator/boringcrypto/golden/manifest.yaml create mode 100644 internal/distrogen/testdata/generator/boringcrypto/golden/otelcol-basic.conf create mode 100644 internal/distrogen/testdata/generator/boringcrypto/golden/otelcol-basic.service create mode 100644 internal/distrogen/testdata/generator/boringcrypto/golden/postinstall.sh create mode 100644 internal/distrogen/testdata/generator/boringcrypto/golden/preinstall.sh create mode 100644 internal/distrogen/testdata/generator/boringcrypto/golden/preremove.sh create mode 100644 internal/distrogen/testdata/generator/boringcrypto/golden/release.mk create mode 100644 internal/distrogen/testdata/generator/boringcrypto/golden/spec.yaml create mode 100644 internal/distrogen/testdata/generator/boringcrypto/spec.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/basic/golden/.goreleaser.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/basic/golden/Dockerfile create mode 100644 internal/distrogen/testdata/generator/distribution/basic/golden/Dockerfile.build create mode 100644 internal/distrogen/testdata/generator/distribution/basic/golden/Dockerfile.goreleaser_releaser create mode 100644 internal/distrogen/testdata/generator/distribution/basic/golden/README.md create mode 100644 internal/distrogen/testdata/generator/distribution/basic/golden/config.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/basic/golden/manifest.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/basic/golden/otelcol-basic.conf create mode 100644 internal/distrogen/testdata/generator/distribution/basic/golden/otelcol-basic.service create mode 100644 internal/distrogen/testdata/generator/distribution/basic/golden/postinstall.sh create mode 100644 internal/distrogen/testdata/generator/distribution/basic/golden/preinstall.sh create mode 100644 internal/distrogen/testdata/generator/distribution/basic/golden/preremove.sh create mode 100644 internal/distrogen/testdata/generator/distribution/basic/golden/spec.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/basic/spec.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/build_container/golden/.goreleaser.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/build_container/golden/Dockerfile create mode 100644 internal/distrogen/testdata/generator/distribution/build_container/golden/Dockerfile.build create mode 100644 internal/distrogen/testdata/generator/distribution/build_container/golden/Dockerfile.goreleaser_releaser create mode 100644 internal/distrogen/testdata/generator/distribution/build_container/golden/README.md create mode 100644 internal/distrogen/testdata/generator/distribution/build_container/golden/config.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/build_container/golden/manifest.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/build_container/golden/otelcol-basic.conf create mode 100644 internal/distrogen/testdata/generator/distribution/build_container/golden/otelcol-basic.service create mode 100644 internal/distrogen/testdata/generator/distribution/build_container/golden/postinstall.sh create mode 100644 internal/distrogen/testdata/generator/distribution/build_container/golden/preinstall.sh create mode 100644 internal/distrogen/testdata/generator/distribution/build_container/golden/preremove.sh create mode 100644 internal/distrogen/testdata/generator/distribution/build_container/golden/spec.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/build_container/spec.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/.goreleaser.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/Dockerfile create mode 100644 internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/Dockerfile.build create mode 100644 internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/Dockerfile.goreleaser_releaser create mode 100644 internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/README.md create mode 100644 internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/config.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/docs/documentation.md create mode 100644 internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/manifest.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/otelcol-basic.conf create mode 100644 internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/otelcol-basic.service create mode 100644 internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/postinstall.sh create mode 100644 internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/preinstall.sh create mode 100644 internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/preremove.sh create mode 100644 internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/spec.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/custom_templates_subdir/spec.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/custom_templates_subdir/templates/docs/documentation.md.go.tmpl create mode 100644 internal/distrogen/testdata/generator/distribution/go_proxy/golden/.goreleaser.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/go_proxy/golden/Dockerfile create mode 100644 internal/distrogen/testdata/generator/distribution/go_proxy/golden/Dockerfile.build create mode 100644 internal/distrogen/testdata/generator/distribution/go_proxy/golden/Dockerfile.goreleaser_releaser create mode 100644 internal/distrogen/testdata/generator/distribution/go_proxy/golden/README.md create mode 100644 internal/distrogen/testdata/generator/distribution/go_proxy/golden/config.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/go_proxy/golden/manifest.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/go_proxy/golden/otelcol-basic.conf create mode 100644 internal/distrogen/testdata/generator/distribution/go_proxy/golden/otelcol-basic.service create mode 100644 internal/distrogen/testdata/generator/distribution/go_proxy/golden/postinstall.sh create mode 100644 internal/distrogen/testdata/generator/distribution/go_proxy/golden/preinstall.sh create mode 100644 internal/distrogen/testdata/generator/distribution/go_proxy/golden/preremove.sh create mode 100644 internal/distrogen/testdata/generator/distribution/go_proxy/golden/spec.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/go_proxy/spec.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/.goreleaser.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/Dockerfile create mode 100644 internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/Dockerfile.build create mode 100644 internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/Dockerfile.goreleaser_releaser create mode 100644 internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/README.md create mode 100644 internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/config.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/manifest.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/otelcol-basic.conf create mode 100644 internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/otelcol-basic.service create mode 100644 internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/postinstall.sh create mode 100644 internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/preinstall.sh create mode 100644 internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/preremove.sh create mode 100644 internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/spec.yaml create mode 100644 internal/distrogen/testdata/generator/distribution/no_docker_repo/spec.yaml create mode 100644 internal/distrogen/testdata/generator/project/golden/.distrogen/VERSION create mode 100644 internal/distrogen/testdata/generator/project/golden/components/registry.yaml create mode 100644 internal/distrogen/testdata/generator/project/golden/go.mod create mode 100644 internal/distrogen/testdata/generator/project/golden/make/common.mk create mode 100644 internal/distrogen/testdata/generator/project/golden/make/gpu_common.mk create mode 100644 internal/distrogen/testdata/generator/project/golden/make/maintenance.mk create mode 100644 internal/distrogen/testdata/generator/project/golden/make/otel_component.mk create mode 100644 internal/distrogen/testdata/generator/project/golden/scripts/download_mdatagen.sh create mode 100644 internal/distrogen/testdata/generator/project/golden/spec.yaml create mode 100644 internal/distrogen/testdata/generator/project/golden/templates/.empty create mode 100644 internal/distrogen/testdata/generator/project/spec.yaml create mode 100644 internal/distrogen/testdata/invalid/boringcrypto_alpine_build_container.yaml create mode 100644 internal/distrogen/testdata/invalid/boringcrypto_cgo_off.yaml create mode 100644 internal/distrogen/testdata/registry/basic_registry.yaml create mode 100644 internal/distrogen/testdata/registry/invalid_yaml.yaml create mode 100644 internal/distrogen/utils_test.go create mode 100644 internal/distrogen/yaml.go diff --git a/.gitmodules b/.gitmodules index 9d171b8a02..e69de29bb2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "submodules/opentelemetry-operations-collector"] - path = submodules/opentelemetry-operations-collector - url = ../../GoogleCloudPlatform/opentelemetry-operations-collector.git diff --git a/builds/otel.sh b/builds/otel.sh index cef326c02a..20e78a0858 100755 --- a/builds/otel.sh +++ b/builds/otel.sh @@ -29,13 +29,7 @@ if [ -z "${GO_BIN}" ]; then fi ARCH=$($GO_BIN env GOARCH) -cd submodules/opentelemetry-operations-collector/otelopscol - -BUILDARCH="$ARCH" \ -TARGETARCH="$ARCH" \ -GO_BIN="${GO_BIN}" \ -COLLECTOR_LD_FLAGS="$LDFLAGS" \ -COLLECTOR_BUILDVCS="false" \ -COLLECTOR_BUILD_TAGS="gpu" \ - make build -cp ./otelopscol "$DESTDIR/otelopscol" +cd cmd/otelopscol + +"${GO_BIN}" build -buildvcs=false -tags="gpu" -ldflags="-s -w ${LDFLAGS}" -o "$DESTDIR/otelopscol" . + diff --git a/cmd/otelopscol/components.go b/cmd/otelopscol/components.go new file mode 100644 index 0000000000..a3825c7a93 --- /dev/null +++ b/cmd/otelopscol/components.go @@ -0,0 +1,256 @@ +// Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. + +package main + +import ( + agentmetricsprocessor "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/agentmetricsprocessor" + filterprocessor "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/filterprocessor" + normalizesumsprocessor "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/normalizesumsprocessor" + transformprocessor "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/transformprocessor" + dcgmreceiver "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/receiver/dcgmreceiver" + nvmlreceiver "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/receiver/nvmlreceiver" + fileexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter" + + googlecloudexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter" + googlemanagedprometheusexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter" + prometheusexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter" + googleclientauthextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension" + pprofextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension" + filestorage "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage" + cumulativetodeltaprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor" + deltatocumulativeprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor" + deltatorateprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor" + groupbyattrsprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor" + intervalprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor" + logstransformprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/logstransformprocessor" + metricstarttimeprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstarttimeprocessor" + metricstransformprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor" + resourcedetectionprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor" + resourceprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor" + activedirectorydsreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver" + aerospikereceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver" + apachereceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver" + couchdbreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver" + elasticsearchreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver" + filelogreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver" + flinkmetricsreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver" + fluentforwardreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver" + hostmetricsreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver" + iisreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver" + jmxreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver" + journaldreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver" + memcachedreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/memcachedreceiver" + mysqlreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver" + nginxreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver" + otlpjsonfilereceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver" + postgresqlreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver" + prometheusreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver" + rabbitmqreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver" + redisreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver" + saphanareceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphanareceiver" + sqlqueryreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver" + sqlserverreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver" + syslogreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver" + tcplogreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver" + windowseventlogreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver" + windowsperfcountersreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver" + zookeeperreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/exporter" + debugexporter "go.opentelemetry.io/collector/exporter/debugexporter" + otlpexporter "go.opentelemetry.io/collector/exporter/otlpexporter" + otlphttpexporter "go.opentelemetry.io/collector/exporter/otlphttpexporter" + "go.opentelemetry.io/collector/extension" + zpagesextension "go.opentelemetry.io/collector/extension/zpagesextension" + "go.opentelemetry.io/collector/otelcol" + "go.opentelemetry.io/collector/processor" + batchprocessor "go.opentelemetry.io/collector/processor/batchprocessor" + memorylimiterprocessor "go.opentelemetry.io/collector/processor/memorylimiterprocessor" + "go.opentelemetry.io/collector/receiver" + otlpreceiver "go.opentelemetry.io/collector/receiver/otlpreceiver" + otelconftelemetry "go.opentelemetry.io/collector/service/telemetry/otelconftelemetry" +) + +type aliasProvider interface{ DeprecatedAlias() component.Type } + +func makeModulesMap[T component.Factory](factories map[component.Type]T, modules map[component.Type]string) map[component.Type]string { + for compType, factory := range factories { + if ap, ok := any(factory).(aliasProvider); ok { + alias := ap.DeprecatedAlias() + if alias.String() != "" { + modules[alias] = modules[compType] + } + } + } + return modules +} + +func components() (otelcol.Factories, error) { + var err error + factories := otelcol.Factories{ + Telemetry: otelconftelemetry.NewFactory(), + } + + factories.Extensions, err = otelcol.MakeFactoryMap[extension.Factory]( + googleclientauthextension.NewFactory(), + pprofextension.NewFactory(), + filestorage.NewFactory(), + zpagesextension.NewFactory(), + ) + if err != nil { + return otelcol.Factories{}, err + } + factories.ExtensionModules = makeModulesMap(factories.Extensions, map[component.Type]string{ + googleclientauthextension.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension v0.151.0", + pprofextension.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.151.0", + filestorage.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.151.0", + zpagesextension.NewFactory().Type(): "go.opentelemetry.io/collector/extension/zpagesextension v0.151.0", + }) + + factories.Receivers, err = otelcol.MakeFactoryMap[receiver.Factory]( + dcgmreceiver.NewFactory(), + mongodbreceiver.NewFactory(), + nvmlreceiver.NewFactory(), + varnishreceiver.NewFactory(), + activedirectorydsreceiver.NewFactory(), + aerospikereceiver.NewFactory(), + apachereceiver.NewFactory(), + couchdbreceiver.NewFactory(), + elasticsearchreceiver.NewFactory(), + filelogreceiver.NewFactory(), + flinkmetricsreceiver.NewFactory(), + fluentforwardreceiver.NewFactory(), + hostmetricsreceiver.NewFactory(), + iisreceiver.NewFactory(), + jmxreceiver.NewFactory(), + journaldreceiver.NewFactory(), + memcachedreceiver.NewFactory(), + mysqlreceiver.NewFactory(), + nginxreceiver.NewFactory(), + otlpjsonfilereceiver.NewFactory(), + postgresqlreceiver.NewFactory(), + prometheusreceiver.NewFactory(), + rabbitmqreceiver.NewFactory(), + redisreceiver.NewFactory(), + saphanareceiver.NewFactory(), + sqlqueryreceiver.NewFactory(), + sqlserverreceiver.NewFactory(), + syslogreceiver.NewFactory(), + tcplogreceiver.NewFactory(), + windowseventlogreceiver.NewFactory(), + windowsperfcountersreceiver.NewFactory(), + zookeeperreceiver.NewFactory(), + otlpreceiver.NewFactory(), + ) + if err != nil { + return otelcol.Factories{}, err + } + factories.ReceiverModules = makeModulesMap(factories.Receivers, map[component.Type]string{ + dcgmreceiver.NewFactory().Type(): "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/receiver/dcgmreceiver v0.151.0", + mongodbreceiver.NewFactory().Type(): "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/receiver/mongodbreceiver v0.151.0", + nvmlreceiver.NewFactory().Type(): "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/receiver/nvmlreceiver v0.151.0", + varnishreceiver.NewFactory().Type(): "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/receiver/varnishreceiver v0.151.0", + activedirectorydsreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.151.0", + aerospikereceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.151.0", + apachereceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.151.0", + couchdbreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver v0.151.0", + elasticsearchreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.151.0", + filelogreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.151.0", + flinkmetricsreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.151.0", + fluentforwardreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.151.0", + hostmetricsreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.151.0", + iisreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver v0.151.0", + jmxreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver v0.151.0", + journaldreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.151.0", + memcachedreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/memcachedreceiver v0.151.0", + mysqlreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver v0.151.0", + nginxreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver v0.151.0", + otlpjsonfilereceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver v0.151.0", + postgresqlreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver v0.151.0", + prometheusreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.151.0", + rabbitmqreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver v0.151.0", + redisreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.151.0", + saphanareceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphanareceiver v0.151.0", + sqlqueryreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.151.0", + sqlserverreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.151.0", + syslogreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.151.0", + tcplogreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.151.0", + windowseventlogreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.151.0", + windowsperfcountersreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.151.0", + zookeeperreceiver.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.151.0", + otlpreceiver.NewFactory().Type(): "go.opentelemetry.io/collector/receiver/otlpreceiver v0.151.0", + }) + + factories.Exporters, err = otelcol.MakeFactoryMap[exporter.Factory]( + fileexporter.NewFactory(), + googlecloudexporter.NewFactory(), + googlemanagedprometheusexporter.NewFactory(), + prometheusexporter.NewFactory(), + debugexporter.NewFactory(), + otlpexporter.NewFactory(), + otlphttpexporter.NewFactory(), + ) + if err != nil { + return otelcol.Factories{}, err + } + factories.ExporterModules = makeModulesMap(factories.Exporters, map[component.Type]string{ + fileexporter.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.151.0", + googlecloudexporter.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.151.0", + googlemanagedprometheusexporter.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.151.0", + prometheusexporter.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.151.0", + debugexporter.NewFactory().Type(): "go.opentelemetry.io/collector/exporter/debugexporter v0.151.0", + otlpexporter.NewFactory().Type(): "go.opentelemetry.io/collector/exporter/otlpexporter v0.151.0", + otlphttpexporter.NewFactory().Type(): "go.opentelemetry.io/collector/exporter/otlphttpexporter v0.151.0", + }) + + factories.Processors, err = otelcol.MakeFactoryMap[processor.Factory]( + agentmetricsprocessor.NewFactory(), + filterprocessor.NewFactory(), + normalizesumsprocessor.NewFactory(), + transformprocessor.NewFactory(), + + cumulativetodeltaprocessor.NewFactory(), + deltatocumulativeprocessor.NewFactory(), + deltatorateprocessor.NewFactory(), + groupbyattrsprocessor.NewFactory(), + intervalprocessor.NewFactory(), + logstransformprocessor.NewFactory(), + metricstarttimeprocessor.NewFactory(), + metricstransformprocessor.NewFactory(), + resourcedetectionprocessor.NewFactory(), + resourceprocessor.NewFactory(), + batchprocessor.NewFactory(), + memorylimiterprocessor.NewFactory(), + ) + if err != nil { + return otelcol.Factories{}, err + } + factories.ProcessorModules = makeModulesMap(factories.Processors, map[component.Type]string{ + agentmetricsprocessor.NewFactory().Type(): "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/agentmetricsprocessor v0.151.0", + filterprocessor.NewFactory().Type(): "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/filterprocessor v0.151.0", + normalizesumsprocessor.NewFactory().Type(): "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/normalizesumsprocessor v0.151.0", + transformprocessor.NewFactory().Type(): "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/transformprocessor v0.151.0", + + cumulativetodeltaprocessor.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.151.0", + deltatocumulativeprocessor.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor v0.151.0", + deltatorateprocessor.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.151.0", + groupbyattrsprocessor.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.151.0", + intervalprocessor.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor v0.151.0", + logstransformprocessor.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/processor/logstransformprocessor v0.151.0", + metricstarttimeprocessor.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstarttimeprocessor v0.151.0", + metricstransformprocessor.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.151.0", + resourcedetectionprocessor.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.151.0", + resourceprocessor.NewFactory().Type(): "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.151.0", + batchprocessor.NewFactory().Type(): "go.opentelemetry.io/collector/processor/batchprocessor v0.151.0", + memorylimiterprocessor.NewFactory().Type(): "go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.151.0", + }) + + factories.Connectors, err = otelcol.MakeFactoryMap[connector.Factory]() + if err != nil { + return otelcol.Factories{}, err + } + factories.ConnectorModules = makeModulesMap(factories.Connectors, map[component.Type]string{}) + + return factories, nil +} diff --git a/cmd/otelopscol/generate.go b/cmd/otelopscol/generate.go new file mode 100644 index 0000000000..0a0f783e54 --- /dev/null +++ b/cmd/otelopscol/generate.go @@ -0,0 +1,3 @@ +package main + +//go:generate go run ../../internal/distrogen generate --spec spec.yaml --registry registry.yaml --force diff --git a/cmd/otelopscol/go.mod b/cmd/otelopscol/go.mod new file mode 100644 index 0000000000..3c70186356 --- /dev/null +++ b/cmd/otelopscol/go.mod @@ -0,0 +1,567 @@ +// Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. + +module github.com/GoogleCloudPlatform/opentelemetry-operations-collector/otelopscol + +go 1.25.0 + +require ( + github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/agentmetricsprocessor v0.151.0 + github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/filterprocessor v0.151.0 + github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/normalizesumsprocessor v0.151.0 + github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/transformprocessor v0.151.0 + github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/receiver/dcgmreceiver v0.151.0 + github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/receiver/nvmlreceiver v0.151.0 + + github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/googlesecretmanagerprovider v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/logstransformprocessor v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstarttimeprocessor v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/memcachedreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphanareceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.151.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.151.0 + go.opentelemetry.io/collector/component v1.57.0 + go.opentelemetry.io/collector/confmap v1.57.0 + go.opentelemetry.io/collector/confmap/provider/envprovider v1.57.0 + go.opentelemetry.io/collector/confmap/provider/fileprovider v1.57.0 + go.opentelemetry.io/collector/connector v0.151.0 + go.opentelemetry.io/collector/exporter v1.57.0 + go.opentelemetry.io/collector/exporter/debugexporter v0.151.0 + go.opentelemetry.io/collector/exporter/otlpexporter v0.151.0 + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.151.0 + go.opentelemetry.io/collector/extension v1.57.0 + go.opentelemetry.io/collector/extension/zpagesextension v0.151.0 + go.opentelemetry.io/collector/otelcol v0.151.0 + go.opentelemetry.io/collector/processor v1.57.0 + go.opentelemetry.io/collector/processor/batchprocessor v0.151.0 + go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.151.0 + go.opentelemetry.io/collector/receiver v1.57.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.151.0 + go.opentelemetry.io/collector/service v0.151.0 + golang.org/x/sys v0.43.0 +) + +require ( + cloud.google.com/go v0.123.0 // indirect + cloud.google.com/go/auth v0.18.2 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect + cloud.google.com/go/compute v1.60.0 // indirect + cloud.google.com/go/compute/metadata v0.9.0 // indirect + cloud.google.com/go/iam v1.7.0 // indirect + cloud.google.com/go/logging v1.13.2 // indirect + cloud.google.com/go/longrunning v0.8.0 // indirect + cloud.google.com/go/monitoring v1.24.3 // indirect + cloud.google.com/go/secretmanager v1.19.0 // indirect + cloud.google.com/go/trace v1.11.7 // indirect + filippo.io/edwards25519 v1.1.1 // indirect + github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect + github.com/99designs/keyring v1.2.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.7.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 // indirect + github.com/Azure/go-ntlmssp v0.1.1 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 // indirect + github.com/BurntSushi/toml v1.4.0 // indirect + github.com/ClickHouse/ch-go v0.71.0 // indirect + github.com/ClickHouse/clickhouse-go/v2 v2.45.0 // indirect + github.com/Code-Hex/go-generics-cache v1.5.1 // indirect + github.com/DataDog/datadog-agent/pkg/obfuscate v0.77.0-devel.0.20260213154712-e02b9359151a // indirect + github.com/DataDog/datadog-go/v5 v5.8.3 // indirect + github.com/DataDog/go-sqllexer v0.1.12 // indirect + github.com/DeRuina/timberjack v1.4.2 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-collector v0.151.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.32.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.56.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.56.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.32.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/extension/googleclientauthextension v0.56.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.56.0 // indirect + github.com/Masterminds/semver v1.5.0 // indirect + github.com/Masterminds/semver/v3 v3.4.0 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/NVIDIA/go-dcgm v0.0.0-20240910155525-85ceb314ca65 // indirect + github.com/NVIDIA/go-nvml v0.12.4-0 // indirect + github.com/SAP/go-hdb v1.16.6 // indirect + github.com/Showmax/go-fqdn v1.0.0 // indirect + github.com/aerospike/aerospike-client-go/v8 v8.7.0 // indirect + github.com/alecthomas/participle/v2 v2.1.4 // indirect + github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect + github.com/alexbrainman/sspi v0.0.0-20250919150558-7d374ff0d59e // indirect + github.com/andybalholm/brotli v1.2.0 // indirect + github.com/antchfx/xmlquery v1.5.1 // indirect + github.com/antchfx/xpath v1.3.6 // indirect + github.com/apache/arrow-go/v18 v18.4.0 // indirect + github.com/armon/go-metrics v0.4.1 // indirect + github.com/aws/aws-sdk-go v1.55.8 // indirect + github.com/aws/aws-sdk-go-v2 v1.41.6 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 // indirect + github.com/aws/aws-sdk-go-v2/config v1.32.16 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.19.15 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.22 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.22 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.22 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.23 // indirect + github.com/aws/aws-sdk-go-v2/service/ec2 v1.299.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ecs v1.74.0 // indirect + github.com/aws/aws-sdk-go-v2/service/elasticache v1.51.12 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.8 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.22 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 // indirect + github.com/aws/aws-sdk-go-v2/service/kafka v1.49.1 // indirect + github.com/aws/aws-sdk-go-v2/service/lightsail v1.51.0 // indirect + github.com/aws/aws-sdk-go-v2/service/rds v1.117.0 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3 // indirect + github.com/aws/aws-sdk-go-v2/service/signin v1.0.10 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.30.16 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.20 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.42.0 // indirect + github.com/aws/smithy-go v1.25.0 // indirect + github.com/bahlo/generic-list-go v0.2.0 // indirect + github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bits-and-blooms/bitset v1.13.0 // indirect + github.com/bmatcuk/doublestar/v4 v4.10.0 // indirect + github.com/buger/jsonparser v1.1.2 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cenkalti/backoff/v5 v5.0.3 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5 // indirect + github.com/containerd/errdefs v1.0.0 // indirect + github.com/containerd/errdefs/pkg v0.3.0 // indirect + github.com/coreos/go-systemd/v22 v22.7.0 // indirect + github.com/danieljoos/wincred v1.2.2 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/dennwc/varint v1.0.0 // indirect + github.com/digitalocean/go-metadata v0.0.0-20250129100319-e3650a3df44b // indirect + github.com/digitalocean/godo v1.178.0 // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/go-connections v0.7.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/dvsekhvalnov/jose2go v1.7.0 // indirect + github.com/ebitengine/purego v0.10.0 // indirect + github.com/edsrzf/mmap-go v1.2.1-0.20241212181136-fad1cd13edbd // indirect + github.com/elastic/go-grok v0.3.1 // indirect + github.com/elastic/lunes v0.2.0 // indirect + github.com/emicklei/go-restful/v3 v3.13.0 // indirect + github.com/envoyproxy/go-control-plane/envoy v1.37.0 // indirect + github.com/envoyproxy/protoc-gen-validate v1.3.3 // indirect + github.com/expr-lang/expr v1.17.8 // indirect + github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb // indirect + github.com/fatih/color v1.18.0 // indirect + github.com/felixge/fgprof v0.9.5 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/foxboron/go-tpm-keyfiles v0.0.0-20251226215517-609e4778396f // indirect + github.com/fsnotify/fsnotify v1.9.0 // indirect + github.com/fxamacker/cbor/v2 v2.9.1 // indirect + github.com/gabriel-vasile/mimetype v1.4.7 // indirect + github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 // indirect + github.com/go-faster/city v1.0.1 // indirect + github.com/go-faster/errors v0.7.1 // indirect + github.com/go-kit/log v0.2.1 // indirect + github.com/go-ldap/ldap/v3 v3.4.13 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect + github.com/go-openapi/analysis v0.24.3 // indirect + github.com/go-openapi/errors v0.22.7 // indirect + github.com/go-openapi/jsonpointer v0.22.5 // indirect + github.com/go-openapi/jsonreference v0.21.5 // indirect + github.com/go-openapi/loads v0.23.3 // indirect + github.com/go-openapi/spec v0.22.4 // indirect + github.com/go-openapi/strfmt v0.26.1 // indirect + github.com/go-openapi/swag v0.25.5 // indirect + github.com/go-openapi/swag/cmdutils v0.25.5 // indirect + github.com/go-openapi/swag/conv v0.25.5 // indirect + github.com/go-openapi/swag/fileutils v0.25.5 // indirect + github.com/go-openapi/swag/jsonname v0.25.5 // indirect + github.com/go-openapi/swag/jsonutils v0.25.5 // indirect + github.com/go-openapi/swag/loading v0.25.5 // indirect + github.com/go-openapi/swag/mangling v0.25.5 // indirect + github.com/go-openapi/swag/netutils v0.25.5 // indirect + github.com/go-openapi/swag/stringutils v0.25.5 // indirect + github.com/go-openapi/swag/typeutils v0.25.5 // indirect + github.com/go-openapi/swag/yamlutils v0.25.5 // indirect + github.com/go-openapi/validate v0.25.2 // indirect + github.com/go-resty/resty/v2 v2.17.2 // indirect + github.com/go-sql-driver/mysql v1.9.3 // indirect + github.com/go-viper/mapstructure/v2 v2.5.0 // indirect + github.com/go-zookeeper/zk v1.0.4 // indirect + github.com/gobwas/glob v0.2.3 // indirect + github.com/goccy/go-json v0.10.6 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang-jwt/jwt/v5 v5.3.1 // indirect + github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect + github.com/golang-sql/sqlexp v0.1.0 // indirect + github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect + github.com/golang/snappy v1.0.0 // indirect + github.com/google/flatbuffers v25.2.10+incompatible // indirect + github.com/google/gnostic-models v0.7.1 // indirect + github.com/google/go-cmp v0.7.0 // indirect + github.com/google/go-querystring v1.2.0 // indirect + github.com/google/go-tpm v0.9.8 // indirect + github.com/google/pprof v0.0.0-20260302011040-a15ffb7f9dcc // indirect + github.com/google/s2a-go v0.1.9 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.14 // indirect + github.com/googleapis/gax-go/v2 v2.22.0 // indirect + github.com/gophercloud/gophercloud/v2 v2.11.1 // indirect + github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect + github.com/grafana/regexp v0.0.0-20250905093917-f7b3be9d1853 // indirect + github.com/grobie/gomemcache v0.0.0-20230213081705-239240bbc445 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 // indirect + github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/hashicorp/consul/api v1.32.1 // indirect + github.com/hashicorp/cronexpr v1.1.3 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-hclog v1.6.3 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-retryablehttp v0.7.8 // indirect + github.com/hashicorp/go-rootcerts v1.0.2 // indirect + github.com/hashicorp/go-uuid v1.0.3 // indirect + github.com/hashicorp/go-version v1.9.0 // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect + github.com/hashicorp/nomad/api v0.0.0-20260324203407-b27b0c2e019a // indirect + github.com/hashicorp/serf v0.10.1 // indirect + github.com/hetznercloud/hcloud-go/v2 v2.39.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/ionos-cloud/sdk-go/v6 v6.3.6 // indirect + github.com/jcmturner/aescts/v2 v2.0.0 // indirect + github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect + github.com/jcmturner/gofork v1.7.6 // indirect + github.com/jcmturner/goidentity/v6 v6.0.1 // indirect + github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect + github.com/jcmturner/rpc/v2 v2.0.3 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/jonboulle/clockwork v0.5.0 // indirect + github.com/jpillora/backoff v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/julienschmidt/httprouter v1.3.0 // indirect + github.com/klauspost/compress v1.18.5 // indirect + github.com/klauspost/cpuid/v2 v2.3.0 // indirect + github.com/knadh/koanf/maps v0.1.2 // indirect + github.com/knadh/koanf/providers/confmap v1.0.0 // indirect + github.com/knadh/koanf/v2 v2.3.4 // indirect + github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect + github.com/kylelemons/godebug v1.1.0 // indirect + github.com/leodido/go-syslog/v4 v4.5.0 // indirect + github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b // indirect + github.com/lib/pq v1.10.9 // indirect + github.com/lightstep/go-expohisto v1.0.0 // indirect + github.com/linode/go-metadata v0.2.4 // indirect + github.com/linode/linodego v1.66.0 // indirect + github.com/lufia/plan9stats v0.0.0-20251013123823-9fd1530e3ec3 // indirect + github.com/magefile/mage v1.15.0 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mdlayher/socket v0.4.1 // indirect + github.com/mdlayher/vsock v1.2.1 // indirect + github.com/microsoft/go-mssqldb v1.9.6 // indirect + github.com/miekg/dns v1.1.72 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/moby/api v1.54.2 // indirect + github.com/moby/moby/client v0.4.1 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect + github.com/montanaflynn/stats v0.7.1 // indirect + github.com/mtibben/percent v0.2.1 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect + github.com/nginx/nginx-prometheus-exporter v1.5.1 // indirect + github.com/oklog/ulid/v2 v2.1.1 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/gopsutilenv v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.151.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/scraper/zookeeperscraper v0.151.0 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/openshift/api v0.0.0-20251015095338-264e80a2b6e7 // indirect + github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235 // indirect + github.com/outcaste-io/ristretto v0.2.3 // indirect + github.com/outscale/osc-sdk-go/v2 v2.32.0 // indirect + github.com/ovh/go-ovh v1.9.0 // indirect + github.com/paulmach/orb v0.12.0 // indirect + github.com/pb33f/jsonpath v0.8.2 // indirect + github.com/pb33f/libopenapi v0.34.4 // indirect + github.com/pb33f/ordered-map/v2 v2.3.1 // indirect + github.com/philhofer/fwd v1.2.0 // indirect + github.com/pierrec/lz4/v4 v4.1.26 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect + github.com/prometheus/alertmanager v0.31.1 // indirect + github.com/prometheus/client_golang v1.23.2 // indirect + github.com/prometheus/client_golang/exp v0.0.0-20260325093428-d8591d0db856 // indirect + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.67.5 // indirect + github.com/prometheus/common/assets v0.2.0 // indirect + github.com/prometheus/exporter-toolkit v0.16.0 // indirect + github.com/prometheus/otlptranslator v1.0.0 // indirect + github.com/prometheus/procfs v0.20.1 // indirect + github.com/prometheus/prometheus v0.311.2-0.20260409145810-72293ff1d2e0 // indirect + github.com/prometheus/sigv4 v0.4.1 // indirect + github.com/puzpuzpuz/xsync/v4 v4.5.0 // indirect + github.com/redis/go-redis/v9 v9.19.0 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36 // indirect + github.com/segmentio/asm v1.2.1 // indirect + github.com/shirou/gopsutil/v3 v3.24.5 // indirect + github.com/shirou/gopsutil/v4 v4.26.3 // indirect + github.com/shoenig/go-m1cpu v0.1.6 // indirect + github.com/shopspring/decimal v1.4.0 // indirect + github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c // indirect + github.com/sijms/go-ora/v2 v2.9.0 // indirect + github.com/snowflakedb/gosnowflake/v2 v2.0.2 // indirect + github.com/spf13/cobra v1.10.2 // indirect + github.com/spf13/pflag v1.0.10 // indirect + github.com/stackitcloud/stackit-sdk-go/core v0.23.0 // indirect + github.com/stretchr/objx v0.5.3 // indirect + github.com/stretchr/testify v1.11.1 // indirect + github.com/thda/tds v0.1.7 // indirect + github.com/tidwall/gjson v1.18.0 // indirect + github.com/tidwall/match v1.2.0 // indirect + github.com/tidwall/pretty v1.2.1 // indirect + github.com/tidwall/tinylru v1.2.1 // indirect + github.com/tidwall/wal v1.2.1 // indirect + github.com/tilinna/clock v1.1.0 // indirect + github.com/tinylib/msgp v1.6.4 // indirect + github.com/tklauser/go-sysconf v0.3.16 // indirect + github.com/tklauser/numcpus v0.11.0 // indirect + github.com/twmb/murmur3 v1.1.8 // indirect + github.com/ua-parser/uap-go v0.0.0-20251207011819-db9adb27a0b8 // indirect + github.com/valyala/fastjson v1.6.10 // indirect + github.com/vultr/govultr/v3 v3.28.1 // indirect + github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad // indirect + github.com/x448/float16 v0.8.4 // indirect + github.com/xdg-go/pbkdf2 v1.0.0 // indirect + github.com/xdg-go/scram v1.1.2 // indirect + github.com/xdg-go/stringprep v1.0.4 // indirect + github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect + github.com/yuin/gopher-lua v1.1.2 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + github.com/zeebo/xxh3 v1.1.0 // indirect + go.etcd.io/bbolt v1.4.3 // indirect + go.mongodb.org/mongo-driver v1.17.6 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/collector v0.151.0 // indirect + go.opentelemetry.io/collector/client v1.57.0 // indirect + go.opentelemetry.io/collector/component/componentstatus v0.151.0 // indirect + go.opentelemetry.io/collector/component/componenttest v0.151.0 // indirect + go.opentelemetry.io/collector/config/configauth v1.57.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.57.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.151.0 // indirect + go.opentelemetry.io/collector/config/confighttp v0.151.0 // indirect + go.opentelemetry.io/collector/config/configmiddleware v1.57.0 // indirect + go.opentelemetry.io/collector/config/confignet v1.57.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.57.0 // indirect + go.opentelemetry.io/collector/config/configoptional v1.57.0 // indirect + go.opentelemetry.io/collector/config/configretry v1.57.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.151.0 // indirect + go.opentelemetry.io/collector/config/configtls v1.57.0 // indirect + go.opentelemetry.io/collector/confmap/xconfmap v0.151.0 // indirect + go.opentelemetry.io/collector/connector/connectortest v0.151.0 // indirect + go.opentelemetry.io/collector/connector/xconnector v0.151.0 // indirect + go.opentelemetry.io/collector/consumer v1.57.0 // indirect + go.opentelemetry.io/collector/consumer/consumererror v0.151.0 // indirect + go.opentelemetry.io/collector/consumer/consumererror/xconsumererror v0.151.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.151.0 // indirect + go.opentelemetry.io/collector/consumer/xconsumer v0.151.0 // indirect + go.opentelemetry.io/collector/exporter/exporterhelper v0.151.0 // indirect + go.opentelemetry.io/collector/exporter/exporterhelper/xexporterhelper v0.151.0 // indirect + go.opentelemetry.io/collector/exporter/exportertest v0.151.0 // indirect + go.opentelemetry.io/collector/exporter/xexporter v0.151.0 // indirect + go.opentelemetry.io/collector/extension/extensionauth v1.57.0 // indirect + go.opentelemetry.io/collector/extension/extensioncapabilities v0.151.0 // indirect + go.opentelemetry.io/collector/extension/extensionmiddleware v0.151.0 // indirect + go.opentelemetry.io/collector/extension/extensiontest v0.151.0 // indirect + go.opentelemetry.io/collector/extension/xextension v0.151.0 // indirect + go.opentelemetry.io/collector/featuregate v1.57.0 // indirect + go.opentelemetry.io/collector/filter v0.151.0 // indirect + go.opentelemetry.io/collector/internal/componentalias v0.151.0 // indirect + go.opentelemetry.io/collector/internal/fanoutconsumer v0.151.0 // indirect + go.opentelemetry.io/collector/internal/memorylimiter v0.151.0 // indirect + go.opentelemetry.io/collector/internal/sharedcomponent v0.151.0 // indirect + go.opentelemetry.io/collector/internal/telemetry v0.151.0 // indirect + go.opentelemetry.io/collector/pdata v1.57.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.151.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.151.0 // indirect + go.opentelemetry.io/collector/pdata/xpdata v0.151.0 // indirect + go.opentelemetry.io/collector/pipeline v1.57.0 // indirect + go.opentelemetry.io/collector/pipeline/xpipeline v0.151.0 // indirect + go.opentelemetry.io/collector/processor/processorhelper v0.151.0 // indirect + go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.151.0 // indirect + go.opentelemetry.io/collector/processor/processortest v0.151.0 // indirect + go.opentelemetry.io/collector/processor/xprocessor v0.151.0 // indirect + go.opentelemetry.io/collector/receiver/receiverhelper v0.151.0 // indirect + go.opentelemetry.io/collector/receiver/receivertest v0.151.0 // indirect + go.opentelemetry.io/collector/receiver/xreceiver v0.151.0 // indirect + go.opentelemetry.io/collector/scraper v0.151.0 // indirect + go.opentelemetry.io/collector/scraper/scraperhelper v0.151.0 // indirect + go.opentelemetry.io/collector/semconv v0.126.0 // indirect + go.opentelemetry.io/collector/service/hostcapabilities v0.151.0 // indirect + go.opentelemetry.io/contrib/bridges/otelzap v0.18.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.67.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 // indirect + go.opentelemetry.io/contrib/otelconf v0.23.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.43.0 // indirect + go.opentelemetry.io/contrib/zpages v0.68.0 // indirect + go.opentelemetry.io/otel v1.43.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.19.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.19.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.43.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.43.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.65.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.19.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.43.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.43.0 // indirect + go.opentelemetry.io/otel/log v0.19.0 // indirect + go.opentelemetry.io/otel/metric v1.43.0 // indirect + go.opentelemetry.io/otel/sdk v1.43.0 // indirect + go.opentelemetry.io/otel/sdk/log v0.19.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.43.0 // indirect + go.opentelemetry.io/otel/trace v1.43.0 // indirect + go.opentelemetry.io/proto/otlp v1.10.0 // indirect + go.uber.org/atomic v1.11.0 // indirect + go.uber.org/goleak v1.3.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.28.0 // indirect + go.uber.org/zap/exp v0.3.0 // indirect + go.yaml.in/yaml/v2 v2.4.4 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect + go.yaml.in/yaml/v4 v4.0.0-rc.4 // indirect + golang.org/x/crypto v0.50.0 // indirect + golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90 // indirect + golang.org/x/mod v0.35.0 // indirect + golang.org/x/net v0.53.0 // indirect + golang.org/x/oauth2 v0.36.0 // indirect + golang.org/x/sync v0.20.0 // indirect + golang.org/x/telemetry v0.0.0-20260409153401-be6f6cb8b1fa // indirect + golang.org/x/term v0.42.0 // indirect + golang.org/x/text v0.36.0 // indirect + golang.org/x/time v0.15.0 // indirect + golang.org/x/tools v0.44.0 // indirect + golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect + gonum.org/v1/gonum v0.17.0 // indirect + google.golang.org/api v0.274.0 // indirect + google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260406210006-6f92a3bedf2d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d // indirect + google.golang.org/grpc v1.80.0 // indirect + google.golang.org/protobuf v1.36.11 // indirect + gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/ini.v1 v1.67.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/api v0.35.4 // indirect + k8s.io/apimachinery v0.35.4 // indirect + k8s.io/client-go v0.35.4 // indirect + k8s.io/klog/v2 v2.140.0 // indirect + k8s.io/kube-openapi v0.0.0-20260330154417-16be699c7b31 // indirect + k8s.io/utils v0.0.0-20260319190234-28399d86e0b5 // indirect + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect + sigs.k8s.io/randfill v1.0.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect +) + +replace github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/receiver/dcgmreceiver v0.151.0 => ../../internal/components/receiver/dcgmreceiver + +replace github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/receiver/mongodbreceiver v0.151.0 => ../../internal/components/receiver/mongodbreceiver + +replace github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/receiver/nvmlreceiver v0.151.0 => ../../internal/components/receiver/nvmlreceiver + +replace github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/receiver/varnishreceiver v0.151.0 => ../../internal/components/receiver/varnishreceiver + +replace github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/agentmetricsprocessor v0.151.0 => ../../internal/components/processor/agentmetricsprocessor + +replace github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/casttosumprocessor v0.151.0 => ../../internal/components/processor/casttosumprocessor + +replace github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/filterprocessor v0.151.0 => ../../internal/components/processor/filterprocessor + +replace github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/normalizesumsprocessor v0.151.0 => ../../internal/components/processor/normalizesumsprocessor + +replace github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/transformprocessor v0.151.0 => ../../internal/components/processor/transformprocessor + +replace github.com/GoogleCloudPlatform/opentelemetry-operations-collector => ../../internal/components + +replace github.com/buger/jsonparser => github.com/buger/jsonparser v1.1.2 + + diff --git a/cmd/otelopscol/go.sum b/cmd/otelopscol/go.sum new file mode 100644 index 0000000000..1f6b6597a1 --- /dev/null +++ b/cmd/otelopscol/go.sum @@ -0,0 +1,1559 @@ +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= +cloud.google.com/go v0.123.0 h1:2NAUJwPR47q+E35uaJeYoNhuNEM9kM8SjgRgdeOJUSE= +cloud.google.com/go v0.123.0/go.mod h1:xBoMV08QcqUGuPW65Qfm1o9Y4zKZBpGS+7bImXLTAZU= +cloud.google.com/go/auth v0.18.2 h1:+Nbt5Ev0xEqxlNjd6c+yYUeosQ5TtEUaNcN/3FozlaM= +cloud.google.com/go/auth v0.18.2/go.mod h1:xD+oY7gcahcu7G2SG2DsBerfFxgPAJz17zz2joOFF3M= +cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= +cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= +cloud.google.com/go/compute v1.60.0 h1:CqGt23ysz990ZZe1vq/9aDPKKnmwM6kcC7Y1Q05H2kI= +cloud.google.com/go/compute v1.60.0/go.mod h1:Xm6PbsLgBpAg4va77ljbBdpMjzuU+uPp5Ze2dnZq7lw= +cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= +cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= +cloud.google.com/go/iam v1.7.0 h1:JD3zh0C6LHl16aCn5Akff0+GELdp1+4hmh6ndoFLl8U= +cloud.google.com/go/iam v1.7.0/go.mod h1:tetWZW1PD/m6vcuY2Zj/aU0eCHNPuxedbnbRTyKXvdY= +cloud.google.com/go/logging v1.13.2 h1:qqlHCBvieJT9Cdq4QqYx1KPadCQ2noD4FK02eNqHAjA= +cloud.google.com/go/logging v1.13.2/go.mod h1:zaybliM3yun1J8mU2dVQ1/qDzjbOqEijZCn6hSBtKak= +cloud.google.com/go/longrunning v0.8.0 h1:LiKK77J3bx5gDLi4SMViHixjD2ohlkwBi+mKA7EhfW8= +cloud.google.com/go/longrunning v0.8.0/go.mod h1:UmErU2Onzi+fKDg2gR7dusz11Pe26aknR4kHmJJqIfk= +cloud.google.com/go/monitoring v1.24.3 h1:dde+gMNc0UhPZD1Azu6at2e79bfdztVDS5lvhOdsgaE= +cloud.google.com/go/monitoring v1.24.3/go.mod h1:nYP6W0tm3N9H/bOw8am7t62YTzZY+zUeQ+Bi6+2eonI= +cloud.google.com/go/secretmanager v1.19.0 h1:dm9BK06xl+hrxp2unT2psjZeypPj5c6uPiABb6fmicE= +cloud.google.com/go/secretmanager v1.19.0/go.mod h1:9OmSuOeiiUicANglrbdKWSnT3gYkRcXuUQDk7dDW0zU= +cloud.google.com/go/trace v1.11.7 h1:kDNDX8JkaAG3R2nq1lIdkb7FCSi1rCmsEtKVsty7p+U= +cloud.google.com/go/trace v1.11.7/go.mod h1:TNn9d5V3fQVf6s4SCveVMIBS2LJUqo73GACmq/Tky0s= +dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= +dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= +filippo.io/edwards25519 v1.1.1 h1:YpjwWWlNmGIDyXOn8zLzqiD+9TyIlPhGFG96P39uBpw= +filippo.io/edwards25519 v1.1.1/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= +github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XBn0= +github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0 h1:fou+2+WFTib47nS+nz/ozhEBnvU96bKHy6LjRsY4E28= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0/go.mod h1:t76Ruy8AHvUAC8GfMWJMa0ElSbuIcO03NLpynfbgsPA= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 h1:Hk5QBxZQC1jb2Fwj6mpzme37xbCDdNTxU7O9eb5+LB4= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1/go.mod h1:IYus9qsFobWIc2YVwe/WPjcnyCkPKtnHAqUYeebc8z0= +github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2 h1:yz1bePFlP5Vws5+8ez6T3HWXPmwOK7Yvq8QxDBD3SKY= +github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2/go.mod h1:Pa9ZNPuoNu/GztvBSKk9J1cDJW6vk/n0zLtV4mgd8N8= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 h1:9iefClla7iYpfYWdzPCRDozdmndjTm8DXdpCzPajMgA= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2/go.mod h1:XtLgD3ZD34DAaVIIAyG3objl5DynM3CQ/vMcbBNJZGI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.7.0 h1:LkHbJbgF3YyvC53aqYGR+wWQDn2Rdp9AQdGndf9QvY4= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.7.0/go.mod h1:QyiQdW4f4/BIfB8ZutZ2s+28RAgfa/pT+zS++ZHyM1I= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0 h1:PTFGRSlMKCQelWwxUyYVEUqseBJVemLyqWJjvMyt0do= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0/go.mod h1:LRr2FzBTQlONPPa5HREE5+RjSCTXl7BwOvYOaWTqCaI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 h1:bXwSugBiSbgtz7rOtbfGf+woewp4f06orW9OP5BjHLA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0/go.mod h1:Y/HgrePTmGy9HjdSGTqZNa+apUpTVIEVKXJyARP2lrk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1 h1:7CBQ+Ei8SP2c6ydQTGCCrS35bDxgTMfoP2miAwK++OU= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1/go.mod h1:c/wcGeGx5FUPbM/JltUYHZcKmigwyVLJlDq+4HdtXaw= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0 h1:Ma67P/GGprNwsslzEH6+Kb8nybI8jpDTm4Wmzu2ReK8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0/go.mod h1:c+Lifp3EDEamAkPVzMooRNOK6CZjNSdEnf1A7jsI9u4= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.3.1 h1:Wgf5rZba3YZqeTNJPtvqZoBu1sBN/L4sry+u2U3Y75w= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.3.1/go.mod h1:xxCBG/f/4Vbmh2XQJBsOmNdxWUY5j/s27jujKPbQf14= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.1.1 h1:bFWuoEKg+gImo7pvkiQEFAc8ocibADgXeiLAxWhWmkI= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.1.1/go.mod h1:Vih/3yc6yac2JzU4hzpaDupBJP0Flaia9rXXrU8xyww= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 h1:gggzg0SUMs6SQbEw+3LoSsYf9YMjkupeAnHMX8O9mmY= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0/go.mod h1:+6KLcKIVgxoBDMqMO/Nvy7bZ9a0nbU3I1DtFQK3YvB4= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-ntlmssp v0.1.1 h1:l+FM/EEMb0U9QZE7mKNEDw5Mu3mFiaa2GKOoTSsNDPw= +github.com/Azure/go-ntlmssp v0.1.1/go.mod h1:NYqdhxd/8aAct/s4qSYZEerdPuH1liG2/X9DiVTbhpk= +github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM= +github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE= +github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 h1:XRzhVemXdgvJqCH0sFfrBUTnUJSBrBf7++ypk+twtRs= +github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0/go.mod h1:HKpQxkWaGLJ+D/5H8QRpyQXA1eKjxkFlOMwck5+33Jk= +github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/ClickHouse/ch-go v0.71.0 h1:bUdZ/EZj/LcVHsMqaRUP2holqygrPWQKeMjc6nZoyRM= +github.com/ClickHouse/ch-go v0.71.0/go.mod h1:NwbNc+7jaqfY58dmdDUbG4Jl22vThgx1cYjBw0vtgXw= +github.com/ClickHouse/clickhouse-go/v2 v2.45.0 h1:iHt15nA4iYhfde5bDQAcLAat9BAh7B5ksPRNRa4UI7s= +github.com/ClickHouse/clickhouse-go/v2 v2.45.0/go.mod h1:giJfUVlMkcfUEPVfRpt51zZaGEx9i17gCos8gBl392c= +github.com/Code-Hex/go-generics-cache v1.5.1 h1:6vhZGc5M7Y/YD8cIUcY8kcuQLB4cHR7U+0KMqAA0KcU= +github.com/Code-Hex/go-generics-cache v1.5.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= +github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= +github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.77.0-devel.0.20260213154712-e02b9359151a h1:/xtQjxLk5vwsBsiBAnoz8qTdntvp6DX41AteNrbns5Y= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.77.0-devel.0.20260213154712-e02b9359151a/go.mod h1:TcvPatbygfZy2wH7n259LZuYUz3TIe3o/Dv53Su7uqM= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/datadog-go/v5 v5.8.3 h1:s58CUJ9s8lezjhTNJO/SxkPBv2qZjS3ktpRSqGF5n0s= +github.com/DataDog/datadog-go/v5 v5.8.3/go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw= +github.com/DataDog/go-sqllexer v0.1.12 h1:2eI/Mbs+fcHzXp4iwGz60V6mAWQNFOD/aa98ZluJJ7c= +github.com/DataDog/go-sqllexer v0.1.12/go.mod h1:vOw7Ia7z+z6nl3zGZlLIZe0vQlPtCPR906WIPBJadxc= +github.com/DeRuina/timberjack v1.4.2 h1:4bKlzhKdsR+2oNkgef9mqb4n11ICow8VK88RfzJPzN8= +github.com/DeRuina/timberjack v1.4.2/go.mod h1:RLoeQrwrCGIEF8gO5nV5b/gMD0QIy7bzQhBUgpp1EqE= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.32.0 h1:rIkQfkCOVKc1OiRCNcSDD8ml5RJlZbH/Xsq7lbpynwc= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.32.0/go.mod h1:RD2SsorTmYhF6HkTmDw7KmPYQk8OBYwTkuasChwv7R4= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.56.0 h1:hzzu29NVGXCFFNKjq3ttugDXnDs8JMzabtMnSX1Lw9k= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.56.0/go.mod h1:SivjUghF3B6BTsoE2W0bcPbOqx0Cc6UyABKIcTVBSnQ= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.56.0 h1:WkpHYgB/DbTt+SbGxrUMNJHWJCq4lDamR7r+vw33q8k= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.56.0/go.mod h1:h3rY6h6EUyJEDKvLHaXLxtYg/12lwAQLf5KHkQxTRuc= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.32.0 h1:ftVmySBwuOJafpEJnnZvco+iV3p6Lokgu2sd89/qY7M= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.32.0/go.mod h1:nikqFGPI5OGwEsdxXzd3f58sB3tzkjqpqwYOV/S1rmo= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/extension/googleclientauthextension v0.56.0 h1:01xbEw8HEVe7c6aNc75fs4j02xr4QwRY4M4fVOJLoW0= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/extension/googleclientauthextension v0.56.0/go.mod h1:scma3/o+dYEMMwPL2E3Y3cQMq5DBKXkkR40OEuc5YGo= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.56.0 h1:ZIT85vKP7LBS84XJ0WdJ3dPOX3iz4j3c0+lpajGQMyo= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.56.0/go.mod h1:rqP9UEhOXv9WhQ7Gjz+G5y/pf8+BJZW5/Ts0AhE0PwE= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.56.0 h1:0YP0+/ixwu+Uqeu/FGiBZNQ19huiUxxiPXIc9WsLKuQ= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.56.0/go.mod h1:6ZZMQhZKDvUvkJw2rc+oDP90tMMzuU/J+5HG1ZmPOmE= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= +github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/NVIDIA/go-dcgm v0.0.0-20240910155525-85ceb314ca65 h1:gYtOO4BkL2Hd6r3cKIT8C1YNviq9kxgGF8xiZswELLA= +github.com/NVIDIA/go-dcgm v0.0.0-20240910155525-85ceb314ca65/go.mod h1:kaRlwPjisNMY7xH8QWJ+6q76YJ/1eu6pWV45B5Ew6C4= +github.com/NVIDIA/go-nvml v0.12.4-0 h1:4tkbB3pT1O77JGr0gQ6uD8FrsUPqP1A/EOEm2wI1TUg= +github.com/NVIDIA/go-nvml v0.12.4-0/go.mod h1:8Llmj+1Rr+9VGGwZuRer5N/aCjxGuR5nPb/9ebBiIEQ= +github.com/SAP/go-hdb v1.16.6 h1:0PZlACUctIrVewTj/J34I3TCur7wWohmJanttBekvcQ= +github.com/SAP/go-hdb v1.16.6/go.mod h1:+byHKTvE4QURGZE3ZrMrqbfxCR99QsHUkT13FTPAQ1U= +github.com/Showmax/go-fqdn v1.0.0 h1:0rG5IbmVliNT5O19Mfuvna9LL7zlHyRfsSvBPZmF9tM= +github.com/Showmax/go-fqdn v1.0.0/go.mod h1:SfrFBzmDCtCGrnHhoDjuvFnKsWjEQX/Q9ARZvOrJAko= +github.com/aerospike/aerospike-client-go/v8 v8.7.0 h1:ihcad2ekboqRsP5Rd6wvVRjBz4i+bOFXksAgMZarbAo= +github.com/aerospike/aerospike-client-go/v8 v8.7.0/go.mod h1:H6RYZ7CMLH8Qt9Zj0Zsk5ynnEc/kfXm6z2J6tA81jH8= +github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= +github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= +github.com/alecthomas/participle/v2 v2.1.4 h1:W/H79S8Sat/krZ3el6sQMvMaahJ+XcM9WSI2naI7w2U= +github.com/alecthomas/participle/v2 v2.1.4/go.mod h1:8tqVbpTX20Ru4NfYQgZf4mP18eXPTBViyMWiArNEgGI= +github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= +github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b h1:mimo19zliBX/vSQ6PWWSL9lK8qwHozUj03+zLoEB8O0= +github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs= +github.com/alexbrainman/sspi v0.0.0-20250919150558-7d374ff0d59e h1:4dAU9FXIyQktpoUAgOJK3OTFc/xug0PCXYCqU0FgDKI= +github.com/alexbrainman/sspi v0.0.0-20250919150558-7d374ff0d59e/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4= +github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ= +github.com/andybalholm/brotli v1.2.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= +github.com/antchfx/xmlquery v1.5.1 h1:T9I4Ns1EXiWHy0IqKupGhnfTQtJwlGrpXtauYOoNv78= +github.com/antchfx/xmlquery v1.5.1/go.mod h1:bVqnl7TaDXSReKINrhZz+2E/PbCu2tUahb+wZ7WZNT8= +github.com/antchfx/xpath v1.3.6 h1:s0y+ElRRtTQdfHP609qFu0+c6bglDv20pqOViQjjdPI= +github.com/antchfx/xpath v1.3.6/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= +github.com/apache/arrow-go/v18 v18.4.0 h1:/RvkGqH517iY8bZKc4FD5/kkdwXJGjxf28JIXbJ/oB0= +github.com/apache/arrow-go/v18 v18.4.0/go.mod h1:Aawvwhj8x2jURIzD9Moy72cF0FyJXOpkYpdmGRHcw14= +github.com/apache/thrift v0.22.0 h1:r7mTJdj51TMDe6RtcmNdQxgn9XcyfGDOzegMDRg47uc= +github.com/apache/thrift v0.22.0/go.mod h1:1e7J/O1Ae6ZQMTYdy9xa3w9k+XHWPfRvdPyJeynQ+/g= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aws/aws-sdk-go v1.55.8 h1:JRmEUbU52aJQZ2AjX4q4Wu7t4uZjOu71uyNmaWlUkJQ= +github.com/aws/aws-sdk-go v1.55.8/go.mod h1:ZkViS9AqA6otK+JBBNH2++sx1sgxrPKcSzPPvQkUtXk= +github.com/aws/aws-sdk-go-v2 v1.41.6 h1:1AX0AthnBQzMx1vbmir3Y4WsnJgiydmnJjiLu+LvXOg= +github.com/aws/aws-sdk-go-v2 v1.41.6/go.mod h1:dy0UzBIfwSeot4grGvY1AqFWN5zgziMmWGzysDnHFcQ= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 h1:eBMB84YGghSocM7PsjmmPffTa+1FBUeNvGvFou6V/4o= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8/go.mod h1:lyw7GFp3qENLh7kwzf7iMzAxDn+NzjXEAGjKS2UOKqI= +github.com/aws/aws-sdk-go-v2/config v1.32.16 h1:Q0iQ7quUgJP0F/SCRTieScnaMdXr9h/2+wze1u3cNeM= +github.com/aws/aws-sdk-go-v2/config v1.32.16/go.mod h1:duCCnJEFqpt2RC6no1iK6q+8HpwOAkiUua0pY507dQc= +github.com/aws/aws-sdk-go-v2/credentials v1.19.15 h1:fyvgWTszojq8hEnMi8PPBTvZdTtEVmAVyo+NFLHBhH4= +github.com/aws/aws-sdk-go-v2/credentials v1.19.15/go.mod h1:gJiYyMOjNg8OEdRWOf3CrFQxM2a98qmrtjx1zuiQfB8= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.22 h1:IOGsJ1xVWhsi+ZO7/NW8OuZZBtMJLZbk4P5HDjJO0jQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.22/go.mod h1:b+hYdbU+jGKfXE8kKM6g1+h+L/Go3vMvzlxBsiuGsxg= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 h1:7Zwtt/lP3KNRkeZre7soMELMGNoBrutx8nobg1jKWmo= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15/go.mod h1:436h2adoHb57yd+8W+gYPrrA9U/R/SuAuOO42Ushzhw= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.22 h1:GmLa5Kw1ESqtFpXsx5MmC84QWa/ZrLZvlJGa2y+4kcQ= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.22/go.mod h1:6sW9iWm9DK9YRpRGga/qzrzNLgKpT2cIxb7Vo2eNOp0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.22 h1:dY4kWZiSaXIzxnKlj17nHnBcXXBfac6UlsAx2qL6XrU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.22/go.mod h1:KIpEUx0JuRZLO7U6cbV204cWAEco2iC3l061IxlwLtI= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.23 h1:FPXsW9+gMuIeKmz7j6ENWcWtBGTe1kH8r9thNt5Uxx4= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.23/go.mod h1:7J8iGMdRKk6lw2C+cMIphgAnT8uTwBwNOsGkyOCm80U= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.299.0 h1:qTozRFl2YFFU2HJGl7ZAywlRQvBnAN591gbAFT5bE0s= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.299.0/go.mod h1:E1pnYwWFZ8N3REmeN9Fe/Zipbpps4HJj8DQGNnLUMYc= +github.com/aws/aws-sdk-go-v2/service/ecs v1.74.0 h1:YS5TXaEvzDb+sV+wdQFUtuCAk0GeFR9Ai6HFdxpz6q8= +github.com/aws/aws-sdk-go-v2/service/ecs v1.74.0/go.mod h1:10kBgdaNJz0FO/+JWDUH+0rtSjkn5yafgavDDmmhFzs= +github.com/aws/aws-sdk-go-v2/service/elasticache v1.51.12 h1:S066ajzfPRCSW4lsSHOYglne6SNi2CHt1u5omzW1RBg= +github.com/aws/aws-sdk-go-v2/service/elasticache v1.51.12/go.mod h1:86SE4NcXxbxr8KTG3yOyDmd4HyiFmKl8TexXnhYJ+Bw= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.8 h1:HtOTYcbVcGABLOVuPYaIihj6IlkqubBwFj10K5fxRek= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.8/go.mod h1:VsK9abqQeGlzPgUr+isNWzPlK2vKe9INMLWnY65f5Xs= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 h1:JRaIgADQS/U6uXDqlPiefP32yXTda7Kqfx+LgspooZM= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13/go.mod h1:CEuVn5WqOMilYl+tbccq8+N2ieCy0gVn3OtRb0vBNNM= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.22 h1:PUmZeJU6Y1Lbvt9WFuJ0ugUK2xn6hIWUBBbKuOWF30s= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.22/go.mod h1:nO6egFBoAaoXze24a2C0NjQCvdpk8OueRoYimvEB9jo= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 h1:ZlvrNcHSFFWURB8avufQq9gFsheUgjVD9536obIknfM= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21/go.mod h1:cv3TNhVrssKR0O/xxLJVRfd2oazSnZnkUeTf6ctUwfQ= +github.com/aws/aws-sdk-go-v2/service/kafka v1.49.1 h1:BgBatWcQIFqF1l6KGHjv66V0d/ISnWrTwxDx/Jf6EJM= +github.com/aws/aws-sdk-go-v2/service/kafka v1.49.1/go.mod h1:pMpys+PlrN//vj8j5s0oOAMJjauj81VkHzIZxPVWOro= +github.com/aws/aws-sdk-go-v2/service/lightsail v1.51.0 h1:cg6PxzoIide2wiEyLfikOFN+XwHafwR8p5+L9U1E8dQ= +github.com/aws/aws-sdk-go-v2/service/lightsail v1.51.0/go.mod h1:YvX7hjUWecrKX8fBkbEncyddEW85xjNH+u5JHioITOw= +github.com/aws/aws-sdk-go-v2/service/rds v1.117.0 h1:T1Xe9sYxSUUQOvd1RsFeVk/IXFPdqSiN0atXu/Hy/8A= +github.com/aws/aws-sdk-go-v2/service/rds v1.117.0/go.mod h1:QbXW4coAMakHQhf1qhE0eVVCen9gwB/Kvn+HHHKhpGY= +github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3 h1:HwxWTbTrIHm5qY+CAEur0s/figc3qwvLWsNkF4RPToo= +github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3/go.mod h1:uoA43SdFwacedBfSgfFSjjCvYe8aYBS7EnU5GZ/YKMM= +github.com/aws/aws-sdk-go-v2/service/signin v1.0.10 h1:a1Fq/KXn75wSzoJaPQTgZO0wHGqE9mjFnylnqEPTchA= +github.com/aws/aws-sdk-go-v2/service/signin v1.0.10/go.mod h1:p6+MXNxW7IA6dMgHfTAzljuwSKD0NCm/4lbS4t6+7vI= +github.com/aws/aws-sdk-go-v2/service/sso v1.30.16 h1:x6bKbmDhsgSZwv6q19wY/u3rLk/3FGjJWyqKcIRufpE= +github.com/aws/aws-sdk-go-v2/service/sso v1.30.16/go.mod h1:CudnEVKRtLn0+3uMV0yEXZ+YZOKnAtUJ5DmDhilVnIw= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.20 h1:oK/njaL8GtyEihkWMD4k3VgHCT64RQKkZwh0DG5j8ak= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.20/go.mod h1:JHs8/y1f3zY7U5WcuzoJ/yAYGYtNIVPKLIbp61euvmg= +github.com/aws/aws-sdk-go-v2/service/sts v1.42.0 h1:ks8KBcZPh3PYISr5dAiXCM5/Thcuxk8l+PG4+A0exds= +github.com/aws/aws-sdk-go-v2/service/sts v1.42.0/go.mod h1:pFw33T0WLvXU3rw1WBkpMlkgIn54eCB5FYLhjDc9Foo= +github.com/aws/smithy-go v1.25.0 h1:Sz/XJ64rwuiKtB6j98nDIPyYrV1nVNJ4YU74gttcl5U= +github.com/aws/smithy-go v1.25.0/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= +github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= +github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= +github.com/basgys/goxml2json v1.1.1-0.20231018121955-e66ee54ceaad h1:3swAvbzgfaI6nKuDDU7BiKfZRdF+h2ZwKgMHd8Ha4t8= +github.com/basgys/goxml2json v1.1.1-0.20231018121955-e66ee54ceaad/go.mod h1:9+nBLYNWkvPcq9ep0owWUsPTLgL9ZXTsZWcCSVGGLJ0= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo4tARvBm7l6KA9iVMnE3NWizDeWSrps= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE= +github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bmatcuk/doublestar/v4 v4.10.0 h1:zU9WiOla1YA122oLM6i4EXvGW62DvKZVxIe6TYWexEs= +github.com/bmatcuk/doublestar/v4 v4.10.0/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= +github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= +github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= +github.com/buger/jsonparser v1.1.2 h1:frqHqw7otoVbk5M8LlE/L7HTnIq2v9RX6EJ48i9AxJk= +github.com/buger/jsonparser v1.1.2/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs= +github.com/chromedp/chromedp v0.9.2/go.mod h1:LkSXJKONWTCHAfQasKFUZI+mxqS4tZqhmtGzzhLsnLs= +github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5 h1:6xNmx7iTtyBRev0+D/Tv1FZd4SCg8axKApyNyRsAt/w= +github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5/go.mod h1:KdCmV+x/BuvyMxRnYBlmVaq4OLiKW6iRQfvC62cvdkI= +github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= +github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= +github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= +github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= +github.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA= +github.com/coreos/go-systemd/v22 v22.7.0/go.mod h1:xNUYtjHu2EDXbsxz1i41wouACIwT7Ybq9o0BQhMwD0w= +github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= +github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/danieljoos/wincred v1.2.2 h1:774zMFJrqaeYCK2W57BgAem/MLi6mtSE47MB6BOJ0i0= +github.com/danieljoos/wincred v1.2.2/go.mod h1:w7w4Utbrz8lqeMbDAK0lkNJUv5sAOkFi7nd/ogr0Uh8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= +github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da h1:aIftn67I1fkbMa512G+w+Pxci9hJPB8oMnkcP3iZF38= +github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/digitalocean/go-metadata v0.0.0-20250129100319-e3650a3df44b h1:2EkxDInMJ3ii8mk8kZs0Qq75JpsvNOOoa5etBJluzbI= +github.com/digitalocean/go-metadata v0.0.0-20250129100319-e3650a3df44b/go.mod h1:lNrzMwI4fx6xfzieyLEpYIJPLWjT/Sak4G/hIzGTEL4= +github.com/digitalocean/godo v1.178.0 h1:+B4xGOaoFwwwpM7TKhoyGHdmFg5eF9zDB1YfOLvNJ2E= +github.com/digitalocean/godo v1.178.0/go.mod h1:xQsWpVCCbkDrWisHA72hPzPlnC+4W5w/McZY5ij9uvU= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/go-connections v0.7.0 h1:6SsRfJddP22WMrCkj19x9WKjEDTB+ahsdiGYf0mN39c= +github.com/docker/go-connections v0.7.0/go.mod h1:no1qkHdjq7kLMGUXYAduOhYPSJxxvgWBh7ogVvptn3Q= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= +github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/ebitengine/purego v0.10.0 h1:QIw4xfpWT6GWTzaW5XEKy3HXoqrJGx1ijYHzTF0/ISU= +github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= +github.com/edsrzf/mmap-go v1.2.1-0.20241212181136-fad1cd13edbd h1:I4PrRZuNMeDP3VbFrak4QsqwO5tWkQf0tqrrr1L2DsU= +github.com/edsrzf/mmap-go v1.2.1-0.20241212181136-fad1cd13edbd/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= +github.com/elastic/go-grok v0.3.1 h1:WEhUxe2KrwycMnlvMimJXvzRa7DoByJB4PVUIE1ZD/U= +github.com/elastic/go-grok v0.3.1/go.mod h1:n38ls8ZgOboZRgKcjMY8eFeZFMmcL9n2lP0iHhIDk64= +github.com/elastic/lunes v0.2.0 h1:WI3bsdOTuaYXVe2DS1KbqA7u7FOHN4o8qJw80ZyZoQs= +github.com/elastic/lunes v0.2.0/go.mod h1:u3W/BdONWTrh0JjNZ21C907dDc+cUZttZrGa625nf2k= +github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes= +github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/envoyproxy/go-control-plane v0.14.0 h1:hbG2kr4RuFj222B6+7T83thSPqLjwBIfQawTkC++2HA= +github.com/envoyproxy/go-control-plane v0.14.0/go.mod h1:NcS5X47pLl/hfqxU70yPwL9ZMkUlwlKxtAohpi2wBEU= +github.com/envoyproxy/go-control-plane/envoy v1.37.0 h1:u3riX6BoYRfF4Dr7dwSOroNfdSbEPe9Yyl09/B6wBrQ= +github.com/envoyproxy/go-control-plane/envoy v1.37.0/go.mod h1:DReE9MMrmecPy+YvQOAOHNYMALuowAnbjjEMkkWOi6A= +github.com/envoyproxy/go-control-plane/ratelimit v0.1.0 h1:/G9QYbddjL25KvtKTv3an9lx6VBE2cnb8wp1vEGNYGI= +github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4= +github.com/envoyproxy/protoc-gen-validate v1.3.3 h1:MVQghNeW+LZcmXe7SY1V36Z+WFMDjpqGAGacLe2T0ds= +github.com/envoyproxy/protoc-gen-validate v1.3.3/go.mod h1:TsndJ/ngyIdQRhMcVVGDDHINPLWB7C82oDArY51KfB0= +github.com/expr-lang/expr v1.17.8 h1:W1loDTT+0PQf5YteHSTpju2qfUfNoBt4yw9+wOEU9VM= +github.com/expr-lang/expr v1.17.8/go.mod h1:8/vRC7+7HBzESEqt5kKpYXxrxkr31SaO8r40VO/1IT4= +github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb h1:IT4JYU7k4ikYg1SCxNI1/Tieq/NFvh6dzLdgi7eu0tM= +github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/felixge/fgprof v0.9.5 h1:8+vR6yu2vvSKn08urWyEuxx75NWPEvybbkBirEpsbVY= +github.com/felixge/fgprof v0.9.5/go.mod h1:yKl+ERSa++RYOs32d8K6WEXCB4uXdLls4ZaZPpayhMM= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/foxboron/go-tpm-keyfiles v0.0.0-20251226215517-609e4778396f h1:RJ+BDPLSHQO7cSjKBqjPJSbi1qfk9WcsjQDtZiw3dZw= +github.com/foxboron/go-tpm-keyfiles v0.0.0-20251226215517-609e4778396f/go.mod h1:VHbbch/X4roIY22jL1s3qRbZhCiRIgUAF/PdSUcx2io= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/fxamacker/cbor/v2 v2.9.1 h1:2rWm8B193Ll4VdjsJY28jxs70IdDsHRWgQYAI80+rMQ= +github.com/fxamacker/cbor/v2 v2.9.1/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= +github.com/gabriel-vasile/mimetype v1.4.7 h1:SKFKl7kD0RiPdbht0s7hFtjl489WcQ1VyPW8ZzUMYCA= +github.com/gabriel-vasile/mimetype v1.4.7/go.mod h1:GDlAgAyIRT27BhFl53XNAFtfjzOkLaF35JdEG0P7LtU= +github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 h1:BP4M0CvQ4S3TGls2FvczZtj5Re/2ZzkV9VwqPHH/3Bo= +github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= +github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw= +github.com/go-faster/city v1.0.1/go.mod h1:jKcUJId49qdW3L1qKHH/3wPeUstCVpVSXTM6vO3VcTw= +github.com/go-faster/errors v0.7.1 h1:MkJTnDoEdi9pDabt1dpWf7AA8/BaSYZqibYyhZ20AYg= +github.com/go-faster/errors v0.7.1/go.mod h1:5ySTjWFiphBs07IKuiL69nxdfd5+fzh1u7FPGZP2quo= +github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs= +github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-ldap/ldap/v3 v3.4.13 h1:+x1nG9h+MZN7h/lUi5Q3UZ0fJ1GyDQYbPvbuH38baDQ= +github.com/go-ldap/ldap/v3 v3.4.13/go.mod h1:LxsGZV6vbaK0sIvYfsv47rfh4ca0JXokCoKjZxsszv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= +github.com/go-openapi/analysis v0.24.3 h1:a1hrvMr8X0Xt69KP5uVTu5jH62DscmDifrLzNglAayk= +github.com/go-openapi/analysis v0.24.3/go.mod h1:Nc+dWJ/FxZbhSow5Yh3ozg5CLJioB+XXT6MdLvJUsUw= +github.com/go-openapi/errors v0.22.7 h1:JLFBGC0Apwdzw3484MmBqspjPbwa2SHvpDm0u5aGhUA= +github.com/go-openapi/errors v0.22.7/go.mod h1://QW6SD9OsWtH6gHllUCddOXDL0tk0ZGNYHwsw4sW3w= +github.com/go-openapi/jsonpointer v0.22.5 h1:8on/0Yp4uTb9f4XvTrM2+1CPrV05QPZXu+rvu2o9jcA= +github.com/go-openapi/jsonpointer v0.22.5/go.mod h1:gyUR3sCvGSWchA2sUBJGluYMbe1zazrYWIkWPjjMUY0= +github.com/go-openapi/jsonreference v0.21.5 h1:6uCGVXU/aNF13AQNggxfysJ+5ZcU4nEAe+pJyVWRdiE= +github.com/go-openapi/jsonreference v0.21.5/go.mod h1:u25Bw85sX4E2jzFodh1FOKMTZLcfifd1Q+iKKOUxExw= +github.com/go-openapi/loads v0.23.3 h1:g5Xap1JfwKkUnZdn+S0L3SzBDpcTIYzZ5Qaag0YDkKQ= +github.com/go-openapi/loads v0.23.3/go.mod h1:NOH07zLajXo8y55hom0omlHWDVVvCwBM/S+csCK8LqA= +github.com/go-openapi/spec v0.22.4 h1:4pxGjipMKu0FzFiu/DPwN3CTBRlVM2yLf/YTWorYfDQ= +github.com/go-openapi/spec v0.22.4/go.mod h1:WQ6Ai0VPWMZgMT4XySjlRIE6GP1bGQOtEThn3gcWLtQ= +github.com/go-openapi/strfmt v0.26.1 h1:7zGCHji7zSYDC2tCXIusoxYQz/48jAf2q+sF6wXTG+c= +github.com/go-openapi/strfmt v0.26.1/go.mod h1:Zslk5VZPOISLwmWTMBIS7oiVFem1o1EI6zULY8Uer7Y= +github.com/go-openapi/swag v0.25.5 h1:pNkwbUEeGwMtcgxDr+2GBPAk4kT+kJ+AaB+TMKAg+TU= +github.com/go-openapi/swag v0.25.5/go.mod h1:B3RT6l8q7X803JRxa2e59tHOiZlX1t8viplOcs9CwTA= +github.com/go-openapi/swag/cmdutils v0.25.5 h1:yh5hHrpgsw4NwM9KAEtaDTXILYzdXh/I8Whhx9hKj7c= +github.com/go-openapi/swag/cmdutils v0.25.5/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= +github.com/go-openapi/swag/conv v0.25.5 h1:wAXBYEXJjoKwE5+vc9YHhpQOFj2JYBMF2DUi+tGu97g= +github.com/go-openapi/swag/conv v0.25.5/go.mod h1:CuJ1eWvh1c4ORKx7unQnFGyvBbNlRKbnRyAvDvzWA4k= +github.com/go-openapi/swag/fileutils v0.25.5 h1:B6JTdOcs2c0dBIs9HnkyTW+5gC+8NIhVBUwERkFhMWk= +github.com/go-openapi/swag/fileutils v0.25.5/go.mod h1:V3cT9UdMQIaH4WiTrUc9EPtVA4txS0TOmRURmhGF4kc= +github.com/go-openapi/swag/jsonname v0.25.5 h1:8p150i44rv/Drip4vWI3kGi9+4W9TdI3US3uUYSFhSo= +github.com/go-openapi/swag/jsonname v0.25.5/go.mod h1:jNqqikyiAK56uS7n8sLkdaNY/uq6+D2m2LANat09pKU= +github.com/go-openapi/swag/jsonutils v0.25.5 h1:XUZF8awQr75MXeC+/iaw5usY/iM7nXPDwdG3Jbl9vYo= +github.com/go-openapi/swag/jsonutils v0.25.5/go.mod h1:48FXUaz8YsDAA9s5AnaUvAmry1UcLcNVWUjY42XkrN4= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.5 h1:SX6sE4FrGb4sEnnxbFL/25yZBb5Hcg1inLeErd86Y1U= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.5/go.mod h1:/2KvOTrKWjVA5Xli3DZWdMCZDzz3uV/T7bXwrKWPquo= +github.com/go-openapi/swag/loading v0.25.5 h1:odQ/umlIZ1ZVRteI6ckSrvP6e2w9UTF5qgNdemJHjuU= +github.com/go-openapi/swag/loading v0.25.5/go.mod h1:I8A8RaaQ4DApxhPSWLNYWh9NvmX2YKMoB9nwvv6oW6g= +github.com/go-openapi/swag/mangling v0.25.5 h1:hyrnvbQRS7vKePQPHHDso+k6CGn5ZBs5232UqWZmJZw= +github.com/go-openapi/swag/mangling v0.25.5/go.mod h1:6hadXM/o312N/h98RwByLg088U61TPGiltQn71Iw0NY= +github.com/go-openapi/swag/netutils v0.25.5 h1:LZq2Xc2QI8+7838elRAaPCeqJnHODfSyOa7ZGfxDKlU= +github.com/go-openapi/swag/netutils v0.25.5/go.mod h1:lHbtmj4m57APG/8H7ZcMMSWzNqIQcu0RFiXrPUara14= +github.com/go-openapi/swag/stringutils v0.25.5 h1:NVkoDOA8YBgtAR/zvCx5rhJKtZF3IzXcDdwOsYzrB6M= +github.com/go-openapi/swag/stringutils v0.25.5/go.mod h1:PKK8EZdu4QJq8iezt17HM8RXnLAzY7gW0O1KKarrZII= +github.com/go-openapi/swag/typeutils v0.25.5 h1:EFJ+PCga2HfHGdo8s8VJXEVbeXRCYwzzr9u4rJk7L7E= +github.com/go-openapi/swag/typeutils v0.25.5/go.mod h1:itmFmScAYE1bSD8C4rS0W+0InZUBrB2xSPbWt6DLGuc= +github.com/go-openapi/swag/yamlutils v0.25.5 h1:kASCIS+oIeoc55j28T4o8KwlV2S4ZLPT6G0iq2SSbVQ= +github.com/go-openapi/swag/yamlutils v0.25.5/go.mod h1:Gek1/SjjfbYvM+Iq4QGwa/2lEXde9n2j4a3wI3pNuOQ= +github.com/go-openapi/testify/enable/yaml/v2 v2.4.1 h1:NZOrZmIb6PTv5LTFxr5/mKV/FjbUzGE7E6gLz7vFoOQ= +github.com/go-openapi/testify/enable/yaml/v2 v2.4.1/go.mod h1:r7dwsujEHawapMsxA69i+XMGZrQ5tRauhLAjV/sxg3Q= +github.com/go-openapi/testify/v2 v2.4.1 h1:zB34HDKj4tHwyUQHrUkpV0Q0iXQ6dUCOQtIqn8hE6Iw= +github.com/go-openapi/testify/v2 v2.4.1/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= +github.com/go-openapi/validate v0.25.2 h1:12NsfLAwGegqbGWr2CnvT65X/Q2USJipmJ9b7xDJZz0= +github.com/go-openapi/validate v0.25.2/go.mod h1:Pgl1LpPPGFnZ+ys4/hTlDiRYQdI1ocKypgE+8Q8BLfY= +github.com/go-resty/resty/v2 v2.17.2 h1:FQW5oHYcIlkCNrMD2lloGScxcHJ0gkjshV3qcQAyHQk= +github.com/go-resty/resty/v2 v2.17.2/go.mod h1:kCKZ3wWmwJaNc7S29BRtUhJwy7iqmn+2mLtQrOyQlVA= +github.com/go-sql-driver/mysql v1.9.3 h1:U/N249h2WzJ3Ukj8SowVFjdtZKfu9vlLZxjPXV1aweo= +github.com/go-sql-driver/mysql v1.9.3/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= +github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-zookeeper/zk v1.0.4 h1:DPzxraQx7OrPyXq2phlGlNSIyWEsAox0RJmjTseMV6I= +github.com/go-zookeeper/zk v1.0.4/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= +github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY= +github.com/goccy/go-json v0.10.6 h1:p8HrPJzOakx/mn/bQtjgNjdTcN+/S6FcG2CTtQOrHVU= +github.com/goccy/go-json v0.10.6/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY= +github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= +github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= +github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= +github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= +github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= +github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/flatbuffers v25.2.10+incompatible h1:F3vclr7C3HpB1k9mxCGRMXq6FdUalZ6H/pNX4FP1v0Q= +github.com/google/flatbuffers v25.2.10+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/gnostic-models v0.7.1 h1:SisTfuFKJSKM5CPZkffwi6coztzzeYUhc3v4yxLWH8c= +github.com/google/gnostic-models v0.7.1/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0= +github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU= +github.com/google/go-tpm v0.9.8 h1:slArAR9Ft+1ybZu0lBwpSmpwhRXaa85hWtMinMyRAWo= +github.com/google/go-tpm v0.9.8/go.mod h1:h9jEsEECg7gtLis0upRBQU+GhYVH6jMjrFxI8u6bVUY= +github.com/google/go-tpm-tools v0.4.7 h1:J3ycC8umYxM9A4eF73EofRZu4BxY0jjQnUnkhIBbvws= +github.com/google/go-tpm-tools v0.4.7/go.mod h1:gSyXTZHe3fgbzb6WEGd90QucmsnT1SRdlye82gH8QjQ= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20260302011040-a15ffb7f9dcc h1:VBbFa1lDYWEeV5FZKUiYKYT0VxCp9twUmmaq9eb8sXw= +github.com/google/pprof v0.0.0-20260302011040-a15ffb7f9dcc/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI= +github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= +github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.14 h1:yh8ncqsbUY4shRD5dA6RlzjJaT4hi3kII+zYw8wmLb8= +github.com/googleapis/enterprise-certificate-proxy v0.3.14/go.mod h1:vqVt9yG9480NtzREnTlmGSBmFrA+bzb0yl0TxoBQXOg= +github.com/googleapis/gax-go/v2 v2.22.0 h1:PjIWBpgGIVKGoCXuiCoP64altEJCj3/Ei+kSU5vlZD4= +github.com/googleapis/gax-go/v2 v2.22.0/go.mod h1:irWBbALSr0Sk3qlqb9SyJ1h68WjgeFuiOzI4Rqw5+aY= +github.com/gophercloud/gophercloud/v2 v2.11.1 h1:jCs4vLH8sJgRqrPzqVfWgl7uI6JnIIlsgeIRM0uHjxY= +github.com/gophercloud/gophercloud/v2 v2.11.1/go.mod h1:Rm0YvKQ4QYX2rY9XaDKnjRzSGwlG5ge4h6ABYnmkKQM= +github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI= +github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= +github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= +github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= +github.com/grafana/regexp v0.0.0-20250905093917-f7b3be9d1853 h1:cLN4IBkmkYZNnk7EAJ0BHIethd+J6LqxFNw5mSiI2bM= +github.com/grafana/regexp v0.0.0-20250905093917-f7b3be9d1853/go.mod h1:+JKpmjMGhpgPL+rXZ5nsZieVzvarn86asRlBg4uNGnk= +github.com/grobie/gomemcache v0.0.0-20230213081705-239240bbc445 h1:FlKQKUYPZ5yDCN248M3R7x8yu2E3yEZ0H7aLomE4EoE= +github.com/grobie/gomemcache v0.0.0-20230213081705-239240bbc445/go.mod h1:L69/dBlPQlWkcnU76WgcppK5e4rrxzQdi6LhLnK/ytA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 h1:HWRh5R2+9EifMyIHV7ZV+MIZqgz+PMpZ14Jynv3O2Zs= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0/go.mod h1:JfhWUomR1baixubs02l85lZYYOm7LV6om4ceouMv45c= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/hashicorp/consul/api v1.32.1 h1:0+osr/3t/aZNAdJX558crU3PEjVrG4x6715aZHRgceE= +github.com/hashicorp/consul/api v1.32.1/go.mod h1:mXUWLnxftwTmDv4W3lzxYCPD199iNLLUyLfLGFJbtl4= +github.com/hashicorp/consul/sdk v0.16.1 h1:V8TxTnImoPD5cj0U9Spl0TUxcytjcbbJeADFF07KdHg= +github.com/hashicorp/consul/sdk v0.16.1/go.mod h1:fSXvwxB2hmh1FMZCNl6PwX0Q/1wdWtHJcZ7Ea5tns0s= +github.com/hashicorp/cronexpr v1.1.3 h1:rl5IkxXN2m681EfivTlccqIryzYJSXRGRNa0xeG7NA4= +github.com/hashicorp/cronexpr v1.1.3/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.4 h1:8mmPiIJkTPPEbAiV97IxdAGNdRdaWwVap1BU6elejKY= +github.com/hashicorp/go-metrics v0.5.4/go.mod h1:CG5yz4NZ/AI/aQt9Ucm/vdBnbh7fvmv4lxZ350i+QQI= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack/v2 v2.1.5 h1:Ue879bPnutj/hXfmUk6s/jtIK90XxgiUIcXRl656T44= +github.com/hashicorp/go-msgpack/v2 v2.1.5/go.mod h1:bjCsRXpZ7NsJdk45PoCQnzRGDaK8TKm5ZnDI/9y3J4M= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-retryablehttp v0.7.8 h1:ylXZWnqa7Lhqpk0L1P1LzDtGcCR0rPVUrx/c8Unxc48= +github.com/hashicorp/go-retryablehttp v0.7.8/go.mod h1:rjiScheydd+CxvumBsIrFKlx3iS0jrZ7LvzFGFmuKbw= +github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.7 h1:G+pTkSO01HpR5qCxg7lxfsFEZaG+C0VssTy/9dbT+Fw= +github.com/hashicorp/go-sockaddr v1.0.7/go.mod h1:FZQbEYa1pxkQ7WLpyXJ6cbjpT8q0YgQaK/JakXqGyWw= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.9.0 h1:CeOIz6k+LoN3qX9Z0tyQrPtiB1DFYRPfCIBtaXPSCnA= +github.com/hashicorp/go-version v1.9.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= +github.com/hashicorp/memberlist v0.5.4 h1:40YY+3qq2tAUhZIMEK8kqusKZBBjdwJ3NUjvYkcxh74= +github.com/hashicorp/memberlist v0.5.4/go.mod h1:OgN6xiIo6RlHUWk+ALjP9e32xWCoQrsOCmHrWCm2MWA= +github.com/hashicorp/nomad/api v0.0.0-20260324203407-b27b0c2e019a h1:HGwfgBNl90YBiHdbzZ/+8aMxO1UL9B/yNTAXa8iB8z8= +github.com/hashicorp/nomad/api v0.0.0-20260324203407-b27b0c2e019a/go.mod h1:KkLNLU0Nyfh5jWsFoF/PsmMbKpRIAoIV4lmQoJWgKCk= +github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= +github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= +github.com/hetznercloud/hcloud-go/v2 v2.39.0 h1:01t0YWSHMAWK6kLXSpFjmNSmHP9GYNdtcnvWpK4MReA= +github.com/hetznercloud/hcloud-go/v2 v2.39.0/go.mod h1:BHmbGdh59t0CazoUEFvbdp6PyV+gwnF0fl9D4Bdgqq0= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/ionos-cloud/sdk-go/v6 v6.3.6 h1:l/TtKgdQ1wUH3DDe2SfFD78AW+TJWdEbDpQhHkWd6CM= +github.com/ionos-cloud/sdk-go/v6 v6.3.6/go.mod h1:nUGHP4kZHAZngCVr4v6C8nuargFrtvt7GrzH/hqn7c4= +github.com/jarcoal/httpmock v1.4.1 h1:0Ju+VCFuARfFlhVXFc2HxlcQkfB+Xq12/EotHko+x2A= +github.com/jarcoal/httpmock v1.4.1/go.mod h1:ftW1xULwo+j0R0JJkJIIi7UKigZUXCLLanykgjwBXL0= +github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= +github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= +github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= +github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= +github.com/jcmturner/gofork v1.7.6 h1:QH0l3hzAU1tfT3rZCnW5zXl+orbkNMMRGJfdJjHVETg= +github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= +github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= +github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= +github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh687T8= +github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs= +github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= +github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jonboulle/clockwork v0.5.0 h1:Hyh9A8u51kptdkR+cqRpT1EebBwTn1oK9YfGYbdFz6I= +github.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/keybase/go-keychain v0.0.1 h1:way+bWYa6lDppZoZcgMbYsvC7GxljxrskdNInRtuthU= +github.com/keybase/go-keychain v0.0.1/go.mod h1:PdEILRW3i9D8JcdM+FmY6RwkHGnhHxXwkPPMeUgOK1k= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4= +github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.18.5 h1:/h1gH5Ce+VWNLSWqPzOVn6XBO+vJbCNGvjoaGBFW2IE= +github.com/klauspost/compress v1.18.5/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= +github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= +github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= +github.com/knadh/koanf/maps v0.1.2 h1:RBfmAW5CnZT+PJ1CVc1QSJKf4Xu9kxfQgYVQSu8hpbo= +github.com/knadh/koanf/maps v0.1.2/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v1.0.0 h1:mHKLJTE7iXEys6deO5p6olAiZdG5zwp8Aebir+/EaRE= +github.com/knadh/koanf/providers/confmap v1.0.0/go.mod h1:txHYHiI2hAtF0/0sCmcuol4IDcuQbKTybiB1nOcUo1A= +github.com/knadh/koanf/v2 v2.3.4 h1:fnynNSDlujWE+v83hAp8wKr/cdoxHLO0629SN+U8Urc= +github.com/knadh/koanf/v2 v2.3.4/go.mod h1:gRb40VRAbd4iJMYYD5IxZ6hfuopFcXBpc9bbQpZwo28= +github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= +github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs= +github.com/leodido/go-syslog/v4 v4.5.0 h1:FGRCuy0Ir4fntApeXZ4Ndzfzw36xSd8rXwImauuYfyE= +github.com/leodido/go-syslog/v4 v4.5.0/go.mod h1:BOEXCJSgy32THF4eZWwtZ11w6LrrFVBj+nMtv06ge4w= +github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b h1:11UHH39z1RhZ5dc4y4r/4koJo6IYFgTRMe/LlwRTEw0= +github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lightstep/go-expohisto v1.0.0 h1:UPtTS1rGdtehbbAF7o/dhkWLTDI73UifG8LbfQI7cA4= +github.com/lightstep/go-expohisto v1.0.0/go.mod h1:xDXD0++Mu2FOaItXtdDfksfgxfV0z1TMPa+e/EUd0cs= +github.com/linode/go-metadata v0.2.4 h1:iif+14PN5T0u/wRnu6i/UlLQrlaFlWvDJzm0Wl9Rn0I= +github.com/linode/go-metadata v0.2.4/go.mod h1:h6yHiRupdKvyPkydU9g8kUA3QKdAgj3WX2wrF+mUv1c= +github.com/linode/linodego v1.66.0 h1:rK8QJFaV53LWOEJvb/evhTg/dP5ElvtuZmx4iv4RJds= +github.com/linode/linodego v1.66.0/go.mod h1:12ykGs9qsvxE+OU3SXuW2w+DTruWF35FPlXC7gGk2tU= +github.com/lufia/plan9stats v0.0.0-20251013123823-9fd1530e3ec3 h1:PwQumkgq4/acIiZhtifTV5OUqqiP82UAl0h87xj/l9k= +github.com/lufia/plan9stats v0.0.0-20251013123823-9fd1530e3ec3/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg= +github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg= +github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= +github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= +github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U= +github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA= +github.com/mdlayher/vsock v1.2.1 h1:pC1mTJTvjo1r9n9fbm7S1j04rCgCzhCOS5DY0zqHlnQ= +github.com/mdlayher/vsock v1.2.1/go.mod h1:NRfCibel++DgeMD8z/hP+PPTjlNJsdPOmxcnENvE+SE= +github.com/microsoft/go-mssqldb v1.9.6 h1:1MNQg5UiSsokiPz3++K2KPx4moKrwIqly1wv+RyCKTw= +github.com/microsoft/go-mssqldb v1.9.6/go.mod h1:yYMPDufyoF2vVuVCUGtZARr06DKFIhMrluTcgWlXpr4= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/miekg/dns v1.1.72 h1:vhmr+TF2A3tuoGNkLDFK9zi36F2LS+hKTRW0Uf8kbzI= +github.com/miekg/dns v1.1.72/go.mod h1:+EuEPhdHOsfk6Wk5TT2CzssZdqkmFhf8r+aVyDEToIs= +github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs= +github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= +github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI= +github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c h1:cqn374mizHuIWj+OSJCajGr/phAmuMug9qIX3l9CflE= +github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/go-archive v0.2.0 h1:zg5QDUM2mi0JIM9fdQZWC7U8+2ZfixfTYoHL7rWUcP8= +github.com/moby/go-archive v0.2.0/go.mod h1:mNeivT14o8xU+5q1YnNrkQVpK+dnNe/K6fHqnTg4qPU= +github.com/moby/moby/api v1.54.2 h1:wiat9QAhnDQjA7wk1kh/TqHz2I1uUA7M7t9SAl/JNXg= +github.com/moby/moby/api v1.54.2/go.mod h1:+RQ6wluLwtYaTd1WnPLykIDPekkuyD/ROWQClE83pzs= +github.com/moby/moby/client v0.4.1 h1:DMQgisVoMkmMs7fp3ROSdiBnoAu8+vo3GggFl06M/wY= +github.com/moby/moby/client v0.4.1/go.mod h1:z52C9O2POPOsnxZAy//WtKcQ32P+jT/NGeXu/7nfjGQ= +github.com/moby/patternmatcher v0.6.1 h1:qlhtafmr6kgMIJjKJMDmMWq7WLkKIo23hsrpR3x084U= +github.com/moby/patternmatcher v0.6.1/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= +github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= +github.com/moby/sys/user v0.4.0 h1:jhcMKit7SA80hivmFJcbB1vqmw//wU61Zdui2eQXuMs= +github.com/moby/sys/user v0.4.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= +github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= +github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE= +github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= +github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= +github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nginx/nginx-prometheus-exporter v1.5.1 h1:44jvKTJ4S0SydKbXw7H9V5VjcGdM3tdOPDd4em86GZQ= +github.com/nginx/nginx-prometheus-exporter v1.5.1/go.mod h1:5b+M6fx4v6UQsihjrN/UeBBR2DabEsfgTjhqG/Xt12w= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/oklog/ulid/v2 v2.1.1 h1:suPZ4ARWLOJLegGFiZZ1dFAkqzhMjL3J1TzI+5wHz8s= +github.com/oklog/ulid/v2 v2.1.1/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= +github.com/onsi/ginkgo/v2 v2.27.5 h1:ZeVgZMx2PDMdJm/+w5fE/OyG6ILo1Y3e+QX4zSR0zTE= +github.com/onsi/ginkgo/v2 v2.27.5/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= +github.com/onsi/gomega v1.39.0 h1:y2ROC3hKFmQZJNFeGAMeHZKkjBL65mIZcvrLQBF9k6Q= +github.com/onsi/gomega v1.39.0/go.mod h1:ZCU1pkQcXDO5Sl9/VVEGlDyp+zm0m1cmeG5TOzLgdh4= +github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/googlesecretmanagerprovider v0.151.0 h1:3A4bd4krSHE+/CVFKTAghv6DQWluLLjnFrvSJLnOTEM= +github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/googlesecretmanagerprovider v0.151.0/go.mod h1:Ph+jkwPRU7UwEyeKDE/H8WKa9ud/luXG0TZscN4e1tw= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.151.0 h1:8+88Mpr9WwN58hXDfJvRepGD4PgdVIC87+2XV2ExGuw= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.151.0/go.mod h1:/rtSJQOgOeY4eZtlncxuvRVipt6PvegZFnGCrIoEIQs= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.151.0 h1:H7+Uvs3ja8C3GzA32BKBNvQpCPcEqyoZc6CTNpwonc4= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.151.0/go.mod h1:ZjCMkiU+kFZjEiHzw4laiDEtgpGQTgAw5gghYoEThcs= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.151.0 h1:HzGOO9Eg4Dy7tKuUUqVRbHibxjKf+nlwa/6RAY0G1uw= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.151.0/go.mod h1:Gv+32hE99X0vxVKp7VEjxV1qDj07KANMmXiEUrnvrwU= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.151.0 h1:bHlBOOTFh9NR/07yyJUuCwhmvDy3x9/11dmxHWjQL1g= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.151.0/go.mod h1:l8/kJCwj/W7SlbblcBgn0MtvzP/Uf43VoXYKp6KJKP4= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.151.0 h1:qK24jD9GmLAKMENtgunjMTKPa4FjwG0POrKcU1kmvZk= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.151.0/go.mod h1:KZBxbOjuTJ0pFPtP65p69ChuZe3n5VjF0vsBFfMc5d8= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.151.0 h1:FLXTfvYK+xHJOh6SnKBPKRSWoHrHiuwhgfQMNKdYIJg= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.151.0/go.mod h1:Cl8N982myPvflJ83QSCL5sV06OnYM26Nufnaj1qbUPw= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.151.0 h1:YNx93HYS5N8NcnGBDVx8ZORE0ydYRPimI6QXJ3iX1aw= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.151.0/go.mod h1:lXh4gADj7ehRSv3zoeelVjtKrUnmi41IwZkCQ+u/TSM= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension v0.151.0 h1:xuK4kJRGG6pcLsJRDl17Q1MWAzYqs3w1ATYrc2Q33Hw= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension v0.151.0/go.mod h1:KbORUHSoO9hXvnZv9eBLFxgw/iu6iZn0YMLWVzLY3CY= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.151.0 h1:VMPdFZM4zJTfzBck4onWPwMRa7L2M0xhoQkZOxn1KGk= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.151.0/go.mod h1:E8KUavqOfv2tef4waSydPT73IdzTR0tMoafbT5RW0M8= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.151.0 h1:cBeAvBCUI4xsdzFf+68jWw4HGiDnMYi5qIlID4Dz67w= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.151.0/go.mod h1:XnhHVX5jsAfSqSxnHFYSnE2L1z7MgzzYxIwkpU1qqUY= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.151.0 h1:7Z7d8KePUChy6DcLsWY5vnkpfMe6zdeBe7YCSUmcwC0= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.151.0/go.mod h1:K0HJ9YJDbPRasbO7ZSZ+Wn50qkwL0o+NXX61S8+6b9Y= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.151.0 h1:WOuV1Kp5CAo5gn8TyrU7+fGLfKv3hL7Yj80yg+TobSQ= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.151.0/go.mod h1:WkKbD/chLCZZUU/C/6JCweEn75o0AsdFkje4ehK435Y= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.151.0 h1:cOqeW8ioU7tZhsvB/lrgzhdC2qwQP564hvK8tpbC18M= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.151.0/go.mod h1:isMQULLE9AcIvNbdhdmiHs9jWInuHCeVblJXkUjK7hE= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.151.0 h1:JRjznmSHnTt0S/GegT/vfsdiiV81L36NS9fBNV7tOmM= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.151.0/go.mod h1:9Tk5ViTj8QUqavqKOR9EeNzgoei01Mb9eZ8cnJvcIkg= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.151.0 h1:RAnPnD3DcYVzd+BbPGtauEsy86BCjSa+SEykD6y3oKo= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.151.0/go.mod h1:B2rs2x914jqvMApxRWs8R/fjtnJFy6Ml8bnaZHChKVQ= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.151.0 h1:g1ewjLSYhpcgrFQN0pMNClOlwiiB5LYKDlT2fhsi5uQ= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.151.0/go.mod h1:qFZP/DzyuzRv52u5pKlb0xyOkiYJ9RU4sGnfTMWpfh4= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/gopsutilenv v0.151.0 h1:dicPlXypMrosWracC4MutCDcGzqng8ojfkclc77BFOM= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/gopsutilenv v0.151.0/go.mod h1:2z4DNBJWHNwBdm1PrU2tfrYf+BuD1swKUiKoEnq9KnU= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.151.0 h1:uzoz9pcIOjzPENiqS3mTNSG4fMvxs7CweZNaGogusOk= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.151.0/go.mod h1:QgRtcwU1dJJlwgEAj8GQB4yotzrNs4z9uC1+c43TRkg= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.151.0 h1:qqE/N5+BBMXxa9gCl2AiEJtlLEA5+XDnsdKIzl0TxXI= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.151.0/go.mod h1:9zT9v0SNb3OVCpPywntWl8fWc9qhn7mqbsHrHrIIygE= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.151.0 h1:nbfFWIx31Aq2PjF8wmAMWosHEaCtfAO+v2gUQqbmOko= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.151.0/go.mod h1:yxnbOX0GrSNweDQA+3QRWLFOLU+RnlIIz5nPVs8BVWs= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.151.0 h1:sKhet5tKoa6graICz7njUoV66WhyOVuGi0bHWCp4tco= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.151.0/go.mod h1:cOhiwV5RnELq4bVNuKWEuNaxxZrIokqPt+1GHwjdDo0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery v0.151.0 h1:722PM56zc70pzw6GtvsvKVbxr5VoOh7HeUMJHaShTAE= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery v0.151.0/go.mod h1:mnFkFb4CEE/mNH/3As/mZ/uvqr8jO791kPbMZjPkCco= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.151.0 h1:kJ1dxHaR5L2usVcC3tRO4xsIGWBUCCEKBSVKx89mDYc= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.151.0/go.mod h1:KW7dsXrzNYLuVr1DgTD2B7dfTAG/ZQWwaw8VqOOltZM= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.151.0 h1:M+d61Wo6zhJoAWKDVUJeeZa46hepah1s+zKgfPlD0ng= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.151.0/go.mod h1:UjELBH4CzaY+y3fHR4RpenHJ3277jBYxTC4xEa5Sxfk= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.151.0 h1:oNfWcQCD3t/yPQDTwg84Ttsp8GCmqHXwvJ9wp/Wxz0w= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.151.0/go.mod h1:asN18RvgWekBnCt0tGRHNuSNWe2XsjUOxMSO6JlIA04= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.151.0 h1:JbnrAMGHqSW+jvJRL9RS7JGMrWpXqGPXdkAk6JoMHV4= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.151.0/go.mod h1:xoSnCUue2dtnuMyJd/1xz7JaQ2G7eweNxM0Laj1uuVc= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.151.0 h1:c8+upXGwDxokINkuChSD7INYHlpcCAyQs2aXpx4rzSs= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.151.0/go.mod h1:Ln3K9yJgPAwEUXqCoR8htVs6bk3cyj6zIPOyM/LhiPo= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.151.0 h1:vEk9/6c/AxMF4yHhQWH5URHkjEmSCVGxFx5CLOhQJ/0= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.151.0/go.mod h1:28H4f/Mq7hpqcf3T/N5gltcSMJgaXkpQSzqmqa/jO7Q= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.151.0 h1:rr3GiLgPJSVsNUYPr7MJtkqInxSMCIHIjd1kCrnhcyc= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.151.0/go.mod h1:vDQ2/nRNcdQF9SGNyc1Le0s8tZnm/6a8qdcA3Fvk+Ns= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.151.0 h1:qZ7jH4UQB+NjEMfgthWYS+pdKNWhLSZ+a69kS02pFU0= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.151.0/go.mod h1:ucpcI3GtYBblmdS1LMlqjzKza0lo0bP4Q4AgC78NljY= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.151.0 h1:QTTBy62e6VVankSrtbrqz4HrYVjnXynXYIaMVE1qOok= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.151.0/go.mod h1:TqGJHVf2AdAb+sjj43t7vj9KyojbLXzCOySasD3z6AE= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.151.0 h1:Tjp7jMFt35Tg0fBPg/BdH8Ooh2KxuIYcj4O/fpEfPcM= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.151.0/go.mod h1:ZFmh3+9rgIfdarU+jnWnsPDhpfR/kbC7B5Mmg9aFzNg= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/xk8stest v0.151.0 h1:CXRtuNomQvEnvurJt21tii+2C6tP54j4CGiKq7fEUOI= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/xk8stest v0.151.0/go.mod h1:9TXqXV9mlgFnXSFV9rl7e7ufnQ51+WlfZMWQtT14J/I= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.151.0 h1:calNsVIWKX5CJD9XQ0IrYVYi2IGi5W5H5/TBNcF1u54= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.151.0/go.mod h1:bKt9H/rSUMTuDWsXwdaZz+IgmI/LqJGjXdBR/yPdris= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor v0.151.0 h1:ba6grxqvfpW4++JoP/dlOk6oV2g88DJ2wBQ+yTVyshQ= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor v0.151.0/go.mod h1:oUwKfAyARk9N1m+ZndqDepHIGyFBTubitsnVqWKcLNs= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.151.0 h1:ul5CHo2afH6Ww+wdOuYKcZIT2uQHFENhjKdJduDRDzM= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.151.0/go.mod h1:DVvI9wF3bvFKfAqEehyCvXQMLJnHX99aIjxNiAHfwGk= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.151.0 h1:K9brpjSqrYomTWiPfnjZu+IPFpvqIarUUvwWRxrrfqk= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.151.0/go.mod h1:IdIFlrBhWaVcNaXdJV4eAV4fgXKUfs/DPo8QShdq/ZA= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.151.0 h1:4aZcgBwjIsRX/S3oa/TYT14n6MgD/smsFW8vJXWm7+g= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.151.0/go.mod h1:s/adrap+tT9B03RMHcf/a+cvr9n3MZJK4w3kvlira1Y= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor v0.151.0 h1:yuhLX4NxDJ7fqme3nKYqhuO90UP+YOZ6BWUjWJ8lmXg= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor v0.151.0/go.mod h1:qLGfvnNL2Ks8xtgiW8dyOGOg/T1G0RcBHHODTVaq2NI= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/logstransformprocessor v0.151.0 h1:GBE81+yKNyaOtxCmcU8osS2rF9fyldewyfWCzFejl4U= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/logstransformprocessor v0.151.0/go.mod h1:SFJWfofgXxuAAwCc8QGSOCmdru0GE5jgaYEmne5icO0= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstarttimeprocessor v0.151.0 h1:RkTtWrgIz3YrR+tqrQMmo8Bywuc+fNcy40SSBPQLm5Q= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstarttimeprocessor v0.151.0/go.mod h1:26maZM1OTnPTYsT8M/+lEUVq72fGyAUHJgcBkaawUaE= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.151.0 h1:d06gT9TX0wBkwmBedIkU7QHSMFX3zKtGcY8SmgEJo6s= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.151.0/go.mod h1:u2GcxF6VXZ7xD6etWNTkW0iuz3vrT+S4t8ZZWaAo/p4= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.151.0 h1:2OcB1U0Tw68w7UURrR/wYl1uPwmW7LBWl1HjeFMeuLs= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.151.0/go.mod h1:15kNSvGpGnzVYPNSUNeVvk5+YTJhILdCIg3LbiVAsJA= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.151.0 h1:uk5cxvM5RtHlqNjCZ57HWLyLGqArPKaJ4/lIQlcAcYc= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.151.0/go.mod h1:SQ4pmJAhlsJVRJjlT8tfcPV1A7Kp+YvQM6xZfTUeSC0= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.151.0 h1:PujeZ11cyNddX/mn3Kghvv/Jfq6kn5l/uKq5kTt0RRw= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.151.0/go.mod h1:cVdoaU8GWd185FO4K5hFf24Yrk90pS1Gfsk6osNhpcQ= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.151.0 h1:IXmILZLb5E3CX9kjiNBAcmfaI8IalLuTzgHm825erm8= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.151.0/go.mod h1:MP7VPYKnSck9JnkWoKt92uu2Yb7V+jwotjDvRZVVHMM= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.151.0 h1:hjxJkPVQmLgCQYf/MgQ/+9nzvzpFf7Tqu8lGJ+nmbcc= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.151.0/go.mod h1:Z6097c1HIbx6kEk+IJ6y0LRb2lHoiOCfJAOEJsOjKsU= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.151.0 h1:DB7oT38wIrusTpyjhp7SVJQwDvAdmavr/G48fUCGVDc= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.151.0/go.mod h1:AB/gNBYyS6P0D31CWk6lbAfY+BzZSKT6NmplpNSk5J4= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver v0.151.0 h1:D7pA3BudCnozHi11FnQ7J+a2zCcucPAPebsnj0n05CI= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver v0.151.0/go.mod h1:iCgZFzOD3TaSMvZsQ53ZEnhM4wzmwMVE9L/tqUd6Wxc= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.151.0 h1:3YH05lugaTXztmEc9cE47xht5+dAEm1kWQ/zrqeNRu4= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.151.0/go.mod h1:iU2vVnMlcB29jKplMlrc1yKE0ZokpWKtY+Kok4FYQDo= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.151.0 h1:m9I//4CxjVuoKDTOcVlNq6PWXvgXstjxigXarpNIAlQ= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.151.0/go.mod h1:naluVajYjXmA1ZtFoCm2j+lBU9JM6tEcP+dQdsTBpuY= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.151.0 h1:Q5169c+fd49UTKZzCom3k6C4yv9kRueg0IhEc8oqADI= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.151.0/go.mod h1:xRN2DwspdK288xfve8iTpD9CA/ENz2bxfqb4332KfEA= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.151.0 h1:XIjEM2/7Ms+yOqbXHMwy+na7vpCoflW4EstWNq81VU0= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.151.0/go.mod h1:tcsA8NDOyZPWCUkg74mT24+/qXHiz0mRxS96NNRYAnI= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.151.0 h1:S0feZNsoLecazu6mJpnfBDHV43Ud0uTpLlyWzxLknik= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.151.0/go.mod h1:EfxVWV6MwcW8AnlrIawocWDqQVMV9JPZcOHT3oAEenQ= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver v0.151.0 h1:pmwkXwY0fUeeCwI/U8EmUStx+ViNtvomEaNMOV2WqpQ= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver v0.151.0/go.mod h1:pPaBNx9NBd868JlRhtTsCjc/vTLk0vxwa7IeUf3LIhI= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver v0.151.0 h1:7mowtaAlVGo/oGTSiNz5pruX7zCunHSxHnu+1PzTs/Y= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver v0.151.0/go.mod h1:RNlUddFkj3eiSBhuB0K3lDAQPmZYgUDbfOz2zweE2KA= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.151.0 h1:xZ9+xQQJpMAo3107cJEg8DNy7hMRrxYIlCyHaMFICyk= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.151.0/go.mod h1:I4hrDU987lUjEs86FTt29pE9rDWmZ3D8xcamb5BL5PQ= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/memcachedreceiver v0.151.0 h1:NRBJ8ZE2LchnraVW2mFNNB6ResTa16cUvDNFOBZdvcE= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/memcachedreceiver v0.151.0/go.mod h1:UMqiSgmfz+mpONuQiBissN3PbDafB0poCUxtIIoNVyg= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver v0.151.0 h1:2pH1zxdypezVqtEldacl62QEmr4v1fad/Rjdj0gY/iU= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver v0.151.0/go.mod h1:C9uQgwKwd2uTWOuGkAWq/QgUznc31oChj5WYF52Gagc= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver v0.151.0 h1:jatVu0U00637NcKH9K9/D9UADbbgAilMSwo4OyQ4egE= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver v0.151.0/go.mod h1:ekeI/+3SKP8ytOlXC359zTxkzuLRY/OAXS3dIYLjny0= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver v0.151.0 h1:U4XEsTWCg/GzaEjp3J3clXc89IfAFqIyfs7PtpZF2iA= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver v0.151.0/go.mod h1:dUoaFdL0nyYz3sm3qPNuiF0S6gNgiaQhayw+zgFiFUU= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver v0.151.0 h1:IcoignJIDdopTjh8WEA7LvoFIQomSV/E4q/20P5QxsY= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver v0.151.0/go.mod h1:+QPzBTHVM/6VQwssMKxvAf6pOf/q30fjLfs7tdjULJo= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.151.0 h1:2o4iGYW1Yj5PUIsvdKicFaIYJvHbwoVa0XDKuQVgvCw= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.151.0/go.mod h1:/o0uksG/FvZBAyCJpA9D25nF6d9CZxD35UvR1fjt0bE= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver v0.151.0 h1:Z3CIsmIcV3TpoOL4t1sY9olPk6Uow6NPMOGKd2YJcvI= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver v0.151.0/go.mod h1:QECN5T7mjrn/3iAlc6XNW6AL51kWtod27L3xdUliBps= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.151.0 h1:AimsZH6oqTlmsr5zdirRNm1z17NUMjNBYevbX8mBjJ4= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.151.0/go.mod h1:Dve9GAPmR5AfcymRGS+5ygOUDvVh/dZHsaezhF6w0Dw= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphanareceiver v0.151.0 h1:5HQDZFxKm8zQXBRT5JCIE2q+EeRM2Kovxp9/JCVTX08= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphanareceiver v0.151.0/go.mod h1:zsp/6GSGJZdZt1bi3k6pI7K1D7dTovpwzwYBnzl6I/g= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.151.0 h1:YA9b9RpylNgkGEcrWCzXOnGQ4i36LrmrJudC54n3Bo4= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.151.0/go.mod h1:VJcYQEKZUMVJOUfEYu09u2f84sv9VqUCZPiqMWjO+1g= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.151.0 h1:lLo4l+J9hP++Anb3ZtQBnS7+lGY9QRbwvFDQT1hG+QM= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.151.0/go.mod h1:lQe78jsCBJRrdynwk7zj3oQ8l4wbsBZ9RxK89zwOzek= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.151.0 h1:YPzuoIPyIzUeD1q1GpKuL78jDW+eq4fy9RxiyhZvKrM= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.151.0/go.mod h1:bubRPM+ft+0rspL2fzNC6Nci53wN0+rH2LWx00wLsJo= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.151.0 h1:dIOA5aEH3a0nYZeQybcaAE82HgxRLL8Jyhfd32EX+bw= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.151.0/go.mod h1:5/cZ8vnw6aBTPIubiShKhUeJ1jFu9ESfwce50ji2EWM= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.151.0 h1:HiUOrZwU7yBMlTEiKkumW7El6tSHEl9eELjP2DrABug= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.151.0/go.mod h1:p55AnSRb/Q+waxXQ+6chzrhfVBJYdGUISpx1FXOL2eI= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.151.0 h1:Go+D6NOywsbZzBSJd9lry+tiYy+KRwHD1lCbvWPG6I8= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.151.0/go.mod h1:FgoZnQCWB1BZ+VxGD4pQCtI4K/XgYwdjlj/jToL+RFw= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.151.0 h1:uSVoPrIOAPqqD8Pmb8Q7Qxjvo05PmCxxMjmwCPjPZfQ= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.151.0/go.mod h1:nHWGekyjZPiRum+0md7jjmXY3jrc2HpMmBxoIx51npI= +github.com/open-telemetry/opentelemetry-collector-contrib/scraper/zookeeperscraper v0.151.0 h1:zz+oD0eaSz7nKAeUqIw0tZ5HAecE63CzbzvqW0ffjhY= +github.com/open-telemetry/opentelemetry-collector-contrib/scraper/zookeeperscraper v0.151.0/go.mod h1:HcsyLdzfB0uyKXfAz01Er8J6Frd+3/GtWKYCer7zIvU= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/openshift/api v0.0.0-20251015095338-264e80a2b6e7 h1:Ot2fbEEPmF3WlPQkyEW/bUCV38GMugH/UmZvxpWceNc= +github.com/openshift/api v0.0.0-20251015095338-264e80a2b6e7/go.mod h1:d5uzF0YN2nQQFA0jIEWzzOZ+edmo6wzlGLvx5Fhz4uY= +github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235 h1:9JBeIXmnHlpXTQPi7LPmu1jdxznBhAE7bb1K+3D8gxY= +github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235/go.mod h1:L49W6pfrZkfOE5iC1PqEkuLkXG4W0BX4w8b+L2Bv7fM= +github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0= +github.com/outcaste-io/ristretto v0.2.3 h1:AK4zt/fJ76kjlYObOeNwh4T3asEuaCmp26pOvUOL9w0= +github.com/outcaste-io/ristretto v0.2.3/go.mod h1:W8HywhmtlopSB1jeMg3JtdIhf+DYkLAr0VN/s4+MHac= +github.com/outscale/osc-sdk-go/v2 v2.32.0 h1:twcX7/YF32aowN0khwK3fPKXGujRi7oOCLLzWcLTX+M= +github.com/outscale/osc-sdk-go/v2 v2.32.0/go.mod h1:fl+1NvnHptNVE0N57dkDa+H4fyBhlrFaRA+lYiUT44s= +github.com/ovh/go-ovh v1.9.0 h1:6K8VoL3BYjVV3In9tPJUdT7qMx9h0GExN9EXx1r2kKE= +github.com/ovh/go-ovh v1.9.0/go.mod h1:cTVDnl94z4tl8pP1uZ/8jlVxntjSIf09bNcQ5TJSC7c= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/paulmach/orb v0.12.0 h1:z+zOwjmG3MyEEqzv92UN49Lg1JFYx0L9GpGKNVDKk1s= +github.com/paulmach/orb v0.12.0/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= +github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY= +github.com/pb33f/jsonpath v0.8.2 h1:Ou4C7zjYClBm97dfZjDCjdZGusJoynv/vrtiEKNfj2Y= +github.com/pb33f/jsonpath v0.8.2/go.mod h1:zBV5LJW4OQOPatmQE2QdKpGQJvhDTlE5IEj6ASaRNTo= +github.com/pb33f/libopenapi v0.34.4 h1:BWWXA3U4SlsHEvfczk+DJHu2O38ktgKw+zBEYaDZ2uI= +github.com/pb33f/libopenapi v0.34.4/go.mod h1:MsDdUlQ1CdrIDO5v26JfgBxQs7kcaOUEpMP3EqU6bI4= +github.com/pb33f/libopenapi-validator v0.13.3 h1:5KW4Y/mMoQvt6d89rLiNmW1zSfln7Oua2A0BqPXpjro= +github.com/pb33f/libopenapi-validator v0.13.3/go.mod h1:X58CRsmj/7l0iXethEMfq3OJIzQ5hces7EbJ071z6WI= +github.com/pb33f/ordered-map/v2 v2.3.1 h1:5319HDO0aw4DA4gzi+zv4FXU9UlSs3xGZ40wcP1nBjY= +github.com/pb33f/ordered-map/v2 v2.3.1/go.mod h1:qxFQgd0PkVUtOMCkTapqotNgzRhMPL7VvaHKbd1HnmQ= +github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= +github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM= +github.com/philhofer/fwd v1.2.0/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= +github.com/pierrec/lz4/v4 v4.1.26 h1:GrpZw1gZttORinvzBdXPUXATeqlJjqUG/D87TKMnhjY= +github.com/pierrec/lz4/v4 v4.1.26/go.mod h1:EoQMVJgeeEOMsCqCzqFm2O0cJvljX2nGZjcRIPL34O4= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prometheus/alertmanager v0.31.1 h1:eAmIC42lzbWslHkMt693T36qdxfyZULswiHr681YS3Q= +github.com/prometheus/alertmanager v0.31.1/go.mod h1:zWPQwhbLt2ybee8rL921UONeQ59Oncash+m/hGP17tU= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= +github.com/prometheus/client_golang/exp v0.0.0-20260325093428-d8591d0db856 h1:1Y6bmpZb8peQCy1IpctnAhIFuyhrdtMaDnETChhSNns= +github.com/prometheus/client_golang/exp v0.0.0-20260325093428-d8591d0db856/go.mod h1:Vf0QcmVhGqpjLxZOaWrFSep86vchQtJmbztFaMM4f6Q= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4= +github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw= +github.com/prometheus/common/assets v0.2.0 h1:0P5OrzoHrYBOSM1OigWL3mY8ZvV2N4zIE/5AahrSrfM= +github.com/prometheus/common/assets v0.2.0/go.mod h1:D17UVUE12bHbim7HzwUvtqm6gwBEaDQ0F+hIGbFbccI= +github.com/prometheus/exporter-toolkit v0.16.0 h1:xT/j7L2XKF+VJd6B4fpUw6xWabHrSmsUf6mYmFqyu0s= +github.com/prometheus/exporter-toolkit v0.16.0/go.mod h1:d1EL8Z9674xQe/iWhwP2wDyCEoBPbXVeqDbqAUsgJWY= +github.com/prometheus/otlptranslator v1.0.0 h1:s0LJW/iN9dkIH+EnhiD3BlkkP5QVIUVEoIwkU+A6qos= +github.com/prometheus/otlptranslator v1.0.0/go.mod h1:vRYWnXvI6aWGpsdY/mOT/cbeVRBlPWtBNDb7kGR3uKM= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.20.1 h1:XwbrGOIplXW/AU3YhIhLODXMJYyC1isLFfYCsTEycfc= +github.com/prometheus/procfs v0.20.1/go.mod h1:o9EMBZGRyvDrSPH1RqdxhojkuXstoe4UlK79eF5TGGo= +github.com/prometheus/prometheus v0.311.2-0.20260409145810-72293ff1d2e0 h1:QwOYpZWGGMjDW0g11F64TtvgP3JbIg92VAFPHxTunA8= +github.com/prometheus/prometheus v0.311.2-0.20260409145810-72293ff1d2e0/go.mod h1:h4Ogksuo6VUZmnm6q/ruKTUzrg9Vvu6u/6O/rQ5xPMg= +github.com/prometheus/sigv4 v0.4.1 h1:EIc3j+8NBea9u1iV6O5ZAN8uvPq2xOIUPcqCTivHuXs= +github.com/prometheus/sigv4 v0.4.1/go.mod h1:eu+ZbRvsc5TPiHwqh77OWuCnWK73IdkETYY46P4dXOU= +github.com/puzpuzpuz/xsync/v4 v4.5.0 h1:vOSWu6b57/emh+L/Cw0BeQfvxa/cogFywXHeGUxQxAg= +github.com/puzpuzpuz/xsync/v4 v4.5.0/go.mod h1:VJDmTCJMBt8igNxnkQd86r+8KUeN1quSfNKu5bLYFQo= +github.com/redis/go-redis/v9 v9.19.0 h1:XPVaaPSnG6RhYf7p+rmSa9zZfeVAnWsH5h3lxthOm/k= +github.com/redis/go-redis/v9 v9.19.0/go.mod h1:v/M13XI1PVCDcm01VtPFOADfZtHf8YW3baQf57KlIkA= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36 h1:ObX9hZmK+VmijreZO/8x9pQ8/P/ToHD/bdSb4Eg4tUo= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36/go.mod h1:LEsDu4BubxK7/cWhtlQWfuxwL4rf/2UEpxXz1o1EMtM= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/segmentio/asm v1.2.1 h1:DTNbBqs57ioxAD4PrArqftgypG4/qNpXoJx8TVXxPR0= +github.com/segmentio/asm v1.2.1/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= +github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= +github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= +github.com/shirou/gopsutil/v4 v4.26.3 h1:2ESdQt90yU3oXF/CdOlRCJxrP+Am1aBYubTMTfxJ1qc= +github.com/shirou/gopsutil/v4 v4.26.3/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ= +github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v1.12.2 h1:ZVT8NeIUwGWpZcKaepPmFMoNQ3sVpxvqUh/MAqwFiJI= +github.com/shoenig/test v1.12.2/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI= +github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= +github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= +github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c h1:aqg5Vm5dwtvL+YgDpBcK1ITf3o96N/K7/wsRXQnUTEs= +github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c/go.mod h1:owqhoLW1qZoYLZzLnBw+QkPP9WZnjlSWihhxAJC1+/M= +github.com/sijms/go-ora/v2 v2.9.0 h1:+iQbUeTeCOFMb5BsOMgUhV8KWyrv9yjKpcK4x7+MFrg= +github.com/sijms/go-ora/v2 v2.9.0/go.mod h1:QgFInVi3ZWyqAiJwzBQA+nbKYKH77tdp1PYoCqhR2dU= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= +github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= +github.com/snowflakedb/gosnowflake/v2 v2.0.2 h1:8UZo+v1T2Y9sgoPk3JYT3RatAUd9o6q6yjL40TyHluA= +github.com/snowflakedb/gosnowflake/v2 v2.0.2/go.mod h1:c0hIqJ/dxgaMl7g1o8n4Ca3Mf5YCiiVx9igio/PNqC8= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spiffe/go-spiffe/v2 v2.6.0 h1:l+DolpxNWYgruGQVV0xsfeya3CsC7m8iBzDnMpsbLuo= +github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xIx7lEzqblHEs= +github.com/stackitcloud/stackit-sdk-go/core v0.23.0 h1:zPrOhf3Xe47rKRs1fg/AqKYUiJJRYjdcv+3qsS50mEs= +github.com/stackitcloud/stackit-sdk-go/core v0.23.0/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= +github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/testcontainers/testcontainers-go v0.42.0 h1:He3IhTzTZOygSXLJPMX7n44XtK+qhjat1nI9cneBbUY= +github.com/testcontainers/testcontainers-go v0.42.0/go.mod h1:vZjdY1YmUA1qEForxOIOazfsrdyORJAbhi0bp8plN30= +github.com/thda/tds v0.1.7 h1:s29kbnJK0agL3ps85A/sb9XS2uxgKF5UJ6AZjbyqXX4= +github.com/thda/tds v0.1.7/go.mod h1:isLIF1oZdXfkqVMJM8RyNrsjlHPlTKnPlnsBs7ngZcM= +github.com/tidwall/gjson v1.10.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= +github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/tinylru v1.1.0/go.mod h1:3+bX+TJ2baOLMWTnlyNWHh4QMnFyARg2TLTQ6OFbzw8= +github.com/tidwall/tinylru v1.2.1 h1:VgBr72c2IEr+V+pCdkPZUwiQ0KJknnWIYbhxAVkYfQk= +github.com/tidwall/tinylru v1.2.1/go.mod h1:9bQnEduwB6inr2Y7AkBP7JPgCkyrhTV/ZpX0oOOpBI4= +github.com/tidwall/wal v1.2.1 h1:xQvwnRF3e+xBC4NvFvl1mPGJHU0aH5zNzlUKnKGIImA= +github.com/tidwall/wal v1.2.1/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= +github.com/tilinna/clock v1.1.0 h1:6IQQQCo6KoBxVudv6gwtY8o4eDfhHo8ojA5dP0MfhSs= +github.com/tilinna/clock v1.1.0/go.mod h1:ZsP7BcY7sEEz7ktc0IVy8Us6boDrK8VradlKRUGfOao= +github.com/tinylib/msgp v1.6.4 h1:mOwYbyYDLPj35mkA2BjjYejgJk9BuHxDdvRnb6v2ZcQ= +github.com/tinylib/msgp v1.6.4/go.mod h1:RSp0LW9oSxFut3KzESt5Voq4GVWyS+PSulT77roAqEA= +github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= +github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= +github.com/tklauser/go-sysconf v0.3.16 h1:frioLaCQSsF5Cy1jgRBrzr6t502KIIwQ0MArYICU0nA= +github.com/tklauser/go-sysconf v0.3.16/go.mod h1:/qNL9xxDhc7tx3HSRsLWNnuzbVfh3e7gh/BmM179nYI= +github.com/tklauser/numcpus v0.11.0 h1:nSTwhKH5e1dMNsCdVBukSZrURJRoHbSEQjdEbY+9RXw= +github.com/tklauser/numcpus v0.11.0/go.mod h1:z+LwcLq54uWZTX0u/bGobaV34u6V7KNlTZejzM6/3MQ= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/twmb/murmur3 v1.1.8 h1:8Yt9taO/WN3l08xErzjeschgZU2QSrwm1kclYq+0aRg= +github.com/twmb/murmur3 v1.1.8/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= +github.com/ua-parser/uap-go v0.0.0-20251207011819-db9adb27a0b8 h1:yS0rzVnj7Z/ZeHzvv5erQbO2b8gyTL4CeMNodl9SJMQ= +github.com/ua-parser/uap-go v0.0.0-20251207011819-db9adb27a0b8/go.mod h1:gwANdYmo9R8LLwGnyDFWK2PMsaXXX2HhAvCnb/UhZsM= +github.com/valyala/fastjson v1.6.10 h1:/yjJg8jaVQdYR3arGxPE2X5z89xrlhS0eGXdv+ADTh4= +github.com/valyala/fastjson v1.6.10/go.mod h1:e6FubmQouUNP73jtMLmcbxS6ydWIpOfhz34TSfO3JaE= +github.com/vultr/govultr/v3 v3.28.1 h1:KR3LhppYARlBujY7+dcrE7YKL0Yo9qXL+msxykKQrLI= +github.com/vultr/govultr/v3 v3.28.1/go.mod h1:2zyUw9yADQaGwKnwDesmIOlBNLrm7edsCfWHFJpWKf8= +github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad h1:W0LEBv82YCGEtcmPA3uNZBI33/qF//HAAs3MawDjRa0= +github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad/go.mod h1:Hy8o65+MXnS6EwGElrSRjUzQDLXreJlzYLlWiHtt8hM= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= +github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= +github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= +github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= +github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= +github.com/xo/tblfmt v0.0.0-20190609041254-28c54ec42ce8/go.mod h1:3U5kKQdIhwACye7ml3acccHmjGExY9WmUGU7rnDWgv0= +github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU= +github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= +github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zUTJ0trRztfwgjqKnBWNtSRkbmwM= +github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/gopher-lua v1.1.2 h1:yF/FjE3hD65tBbt0VXLE13HWS9h34fdzJmrWRXwobGA= +github.com/yuin/gopher-lua v1.1.2/go.mod h1:7aRmXIWl37SqRf0koeyylBEzJ+aPt8A+mmkQ4f1ntR8= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= +github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= +github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= +go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo= +go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E= +go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= +go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss= +go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/collector v0.151.0 h1:oLpn/4nHer84QumNauqg2W8UxdoeZaqgk2JHKnbR4nM= +go.opentelemetry.io/collector v0.151.0/go.mod h1:fD3zKqBj4tCYr4620ZnAEHUkb1Ihr8hyCqwl3v2qRfk= +go.opentelemetry.io/collector/client v1.57.0 h1:B6yTRsjQcFa1mqR9EA4sEvcKY5x0QtUFrf8/senhUR8= +go.opentelemetry.io/collector/client v1.57.0/go.mod h1:gdJxZb5MnsJ3WrV6Oy72keeLLeAchv3Wl1gxUDu1WUE= +go.opentelemetry.io/collector/component v1.57.0 h1:WKIqx2Bs0JaAZxDEhsLradXpYxnwAxVFzWhQUmu2q3w= +go.opentelemetry.io/collector/component v1.57.0/go.mod h1:rXLy5mV78e7Gqp/dzFB+nbAFSEuJCipJfp8LbkrvOMg= +go.opentelemetry.io/collector/component/componentstatus v0.151.0 h1:S2L2y/r+MrqSR8CG/SpbN4WbbUQC5sK+1VgBR2rN660= +go.opentelemetry.io/collector/component/componentstatus v0.151.0/go.mod h1:cDj64a2MAE/pWA1x/jR+oYZQ0d4LBYHcxxONYuijREE= +go.opentelemetry.io/collector/component/componenttest v0.151.0 h1:0rYcx913VAfD1VyVA9MKPjTrdinUaJGEaOhom8MX5zY= +go.opentelemetry.io/collector/component/componenttest v0.151.0/go.mod h1:vmhG58+J9QHOHaNu8LUD5d13LqldvkzI2jil4+lk+x0= +go.opentelemetry.io/collector/config/configauth v1.57.0 h1:wNm4CYIo3n8zFfk8mW3lppI5CtRqg7SGwfO+k20iaiY= +go.opentelemetry.io/collector/config/configauth v1.57.0/go.mod h1:Tzoa6JoVmQ6mhgSeYf0mqQk8GGC77Ilj7ahPko8JNZQ= +go.opentelemetry.io/collector/config/configcompression v1.57.0 h1:i8GgiuhJ2EdBfcwjx3RaScQEyIN0NFZPdqrxx6zRstY= +go.opentelemetry.io/collector/config/configcompression v1.57.0/go.mod h1:SEcE2uFLHHPc/Vi8WCkW5MhOMUwaT321HBdZ3P8x8D0= +go.opentelemetry.io/collector/config/configgrpc v0.151.0 h1:pz1wB+mbRLqXWEV9eiQGR8cuLcRq3rQEu9eQ1BpHC/M= +go.opentelemetry.io/collector/config/configgrpc v0.151.0/go.mod h1:w++RXGBmNDgh7VjRNNhxG2RyVMPj/HCPGtMEXH3YmSM= +go.opentelemetry.io/collector/config/confighttp v0.151.0 h1:9cur4OryZGpIgAuBGtN8oTIBr/CNBsuMqoexZUK6yok= +go.opentelemetry.io/collector/config/confighttp v0.151.0/go.mod h1:edcQviVMlQlFCKjdfZdqk7NfgjgXsErEZeNC6lq0r54= +go.opentelemetry.io/collector/config/configmiddleware v1.57.0 h1:7RVS4DHAbMHDlsLDlNDDbaDolYxQOPOYwqJovbBAfog= +go.opentelemetry.io/collector/config/configmiddleware v1.57.0/go.mod h1:ia49Ny/3Ew6SeQc+ZYMewjyGr8IPg9y8XVSgbmVqpQE= +go.opentelemetry.io/collector/config/confignet v1.57.0 h1:X2tVVQiKo4/V/A1/4GzKPipZsdvrQdgZCfCOHIW6jo8= +go.opentelemetry.io/collector/config/confignet v1.57.0/go.mod h1:Op+r1B/DtzXgIuKEL7/JkTqtJdL9veu2uEXvSxH3lks= +go.opentelemetry.io/collector/config/configopaque v1.57.0 h1:cV56mFftZyU3vaLus77/mHboRzJ2GqzOHIsyO0zvCuw= +go.opentelemetry.io/collector/config/configopaque v1.57.0/go.mod h1:6/DgOtshwnuiTehze+czXeN4GgKgR3ZD+wxBumlgUWM= +go.opentelemetry.io/collector/config/configoptional v1.57.0 h1:eN/MCyDJINsMR3KSOJ+3q4rOdEm4lzb04sRD1iG4pUE= +go.opentelemetry.io/collector/config/configoptional v1.57.0/go.mod h1:jVagnW+2jTO9WQiD17wK7VqbZ+nMzvfoNlHUi0WdhpI= +go.opentelemetry.io/collector/config/configretry v1.57.0 h1:S/XCZQbmLe0TnwSWiO+WJAkbF02LTnVCYPUyVwNpVFc= +go.opentelemetry.io/collector/config/configretry v1.57.0/go.mod h1:1BoQ5SvJT751bqP/5g0VTPLkNgMtvifAr2QqMCVOv2o= +go.opentelemetry.io/collector/config/configtelemetry v0.151.0 h1:KNUGJFbQXfJm8rJIRQnUd6++uM2VntPXSCtBQGodZPU= +go.opentelemetry.io/collector/config/configtelemetry v0.151.0/go.mod h1:vLUthxDJbDk0ZE9MXPvmSslNESDdGblIXWoDMov3UOE= +go.opentelemetry.io/collector/config/configtls v1.57.0 h1:/xyZxadD/Kn9X0V1JFQzaEisuA8DXmWTbsb7BOvE+eE= +go.opentelemetry.io/collector/config/configtls v1.57.0/go.mod h1:PVY1IqNQIpxRmON1Uw0P1n+IjhWOAGPamN/VVQtatMY= +go.opentelemetry.io/collector/confmap v1.57.0 h1:5AuK920dJmV8zxQAiODi2JHPl2r1HmEHHMaBSC+qF5I= +go.opentelemetry.io/collector/confmap v1.57.0/go.mod h1:ifmog4kqEMM037qX04qEbom5CcxhmkadLUqhi2Vkuec= +go.opentelemetry.io/collector/confmap/provider/envprovider v1.57.0 h1:9Zz852IGYQ0zsM5M7KINK2BBk5qUGWYKMpkJFSQkaWU= +go.opentelemetry.io/collector/confmap/provider/envprovider v1.57.0/go.mod h1:lIbKmGvFfYo3SlBhiopllFYPa6nJCJW8Jmf41l+J7xQ= +go.opentelemetry.io/collector/confmap/provider/fileprovider v1.57.0 h1:+y8kfU3iT21tzuhKnINDxbCzUADj7zGxZOyAa9ra0uQ= +go.opentelemetry.io/collector/confmap/provider/fileprovider v1.57.0/go.mod h1:tfjujc57jQjSQhRlPKqEPQSGC0btpIQUjyGQtDQcM7M= +go.opentelemetry.io/collector/confmap/provider/httpprovider v1.57.0 h1:khCPZQWtZKB9smGoGZyxshA6biWqrX795uzvA8UHOoU= +go.opentelemetry.io/collector/confmap/provider/httpprovider v1.57.0/go.mod h1:6lgO0Ua6IvBhvGm/JewIUgCN3JQSkrG5f9mo1DenLms= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.57.0 h1:vP3MUnxqU0XSlAWSpInFhVxm79+ylWiGzsvG7dHCqbQ= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.57.0/go.mod h1:eNyR8ff9wMgJAChtCaLlziCf/D/ML7QTg2Xp7ssHC+8= +go.opentelemetry.io/collector/confmap/xconfmap v0.151.0 h1:txpp8lH/J2sKsQXEmV0TXTIrDS7n0Bo2bPJR+mhcP3M= +go.opentelemetry.io/collector/confmap/xconfmap v0.151.0/go.mod h1:3R0Ru3Gsz6HKzjMecZPlTFDzFxaxAOl23ptm+xlsAA0= +go.opentelemetry.io/collector/connector v0.151.0 h1:52B0qtl40rA5ZFVawIkuxnwEt5CnMXTtAqx3/FfCjvY= +go.opentelemetry.io/collector/connector v0.151.0/go.mod h1:L2XcxjYpn+VFXqxbq3zyDVYU8kOJoSyUKnfPrFXX5OM= +go.opentelemetry.io/collector/connector/connectortest v0.151.0 h1:nffLxDQI+atRpDeu+0w7FZpm3hJaYMEqV475Vak6goY= +go.opentelemetry.io/collector/connector/connectortest v0.151.0/go.mod h1:VhIraovxshDUHpIUGUF9FAsN/kqOxjmVuf87ttyjYAE= +go.opentelemetry.io/collector/connector/xconnector v0.151.0 h1:iSY95x5wL62ICEu9kK5MuWSr+YjgeiT7WP6XKGdUG2k= +go.opentelemetry.io/collector/connector/xconnector v0.151.0/go.mod h1:UpeU2UxLVFW3QeSw38N4xhKJmaAqrgHY7wyIc515ym4= +go.opentelemetry.io/collector/consumer v1.57.0 h1:jyDh4GkYPuIXNB0UJIh33NAzZoTCVNkwS+XWdlI08P8= +go.opentelemetry.io/collector/consumer v1.57.0/go.mod h1:tJKbog9Xw/8y66aWd/C+21BMuQkOWn/lF4bzJDRC9OM= +go.opentelemetry.io/collector/consumer/consumererror v0.151.0 h1:tspiI5WE/xwYNAzR61I1XhmNYhSXdsR0Yf1Dk2MZIfQ= +go.opentelemetry.io/collector/consumer/consumererror v0.151.0/go.mod h1:dxnhPRnw3kjyweDy9pGWUNVueem15kxlvqRp0qY5k6U= +go.opentelemetry.io/collector/consumer/consumererror/xconsumererror v0.151.0 h1:pXKjwyo4RkGQlG+1byCa0e3D2reIHmdr1v9Ex7C7K5c= +go.opentelemetry.io/collector/consumer/consumererror/xconsumererror v0.151.0/go.mod h1:/5Aau99Cp6Q2RF6RPl+QmlUO9jC9gZ3Np6VD+p9dfLs= +go.opentelemetry.io/collector/consumer/consumertest v0.151.0 h1:qByIVlFh9RAR/newAk/sN5i1zoIXKa2K1hRNVfye8LU= +go.opentelemetry.io/collector/consumer/consumertest v0.151.0/go.mod h1:eAGCGxkq+aABLmlr3PvMOqz3ZJbmn/lUqCbbffabSi4= +go.opentelemetry.io/collector/consumer/xconsumer v0.151.0 h1:eKIYxuPBEIrjZMAkyKBUWrlpHAE9OgxXBjq7PMSeXkE= +go.opentelemetry.io/collector/consumer/xconsumer v0.151.0/go.mod h1:9K97TkCN7XYfwKzPzktozrWc3Qw/4A1T4XgMn9TnG0c= +go.opentelemetry.io/collector/exporter v1.57.0 h1:eDiWLiZZV2u+ihNSdWtrACOZI600TnUk0W4SKraJ0w0= +go.opentelemetry.io/collector/exporter v1.57.0/go.mod h1:xfJPcn0EJMIFP8g5nheLSWLzPZgdu9/p14b9+D5RXjM= +go.opentelemetry.io/collector/exporter/debugexporter v0.151.0 h1:ryn+b1zgg15Gvzk7SlWGfYgGstL9KfD/Lg231H76tLY= +go.opentelemetry.io/collector/exporter/debugexporter v0.151.0/go.mod h1:jWFRZKTRIYXJOYob0U0WX2v1fWW9W0B2/kRrdMSAUyY= +go.opentelemetry.io/collector/exporter/exporterhelper v0.151.0 h1:s+OiaQZBHkhaxJj5zkSY3jVsO0HZUW6hHDZ9Rc/qULA= +go.opentelemetry.io/collector/exporter/exporterhelper v0.151.0/go.mod h1:IdqxjEDvwDcuhHOw83krWDjxj4NFrWRzTUc6q8enTh0= +go.opentelemetry.io/collector/exporter/exporterhelper/xexporterhelper v0.151.0 h1:7WP/01S//77cExER3phahlg+RDQSSSStpoKq9p3w7VQ= +go.opentelemetry.io/collector/exporter/exporterhelper/xexporterhelper v0.151.0/go.mod h1:II06vOl4v4oPh9QoEtlCH4J8uyJohoH3pWvdii9QnvA= +go.opentelemetry.io/collector/exporter/exportertest v0.151.0 h1:w1XKgIuozEGE/I68M2DRkNbOPOQZ3NsE9QDSgr4S6to= +go.opentelemetry.io/collector/exporter/exportertest v0.151.0/go.mod h1:huqcu/9iu+EOs01VUpMEmjIuOoHoT+rWNvZwdPgAQ1Q= +go.opentelemetry.io/collector/exporter/otlpexporter v0.151.0 h1:OBvU5vCLXgxlvXMdTcieODOucF/d4JYnoRXs4FMazlw= +go.opentelemetry.io/collector/exporter/otlpexporter v0.151.0/go.mod h1:b9to0odlS9nngv9q5M0C+IXR/2Sd8sMCA7uMcQeVFN8= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.151.0 h1:C56M9hCSw/arVwaTvlDlOd6E1Hi8dN9/tczoXoDoWfg= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.151.0/go.mod h1:dsG7siguix5lcFH7ilcYNStS2nImgjtiQ/nl8rJA5TQ= +go.opentelemetry.io/collector/exporter/xexporter v0.151.0 h1:2uiLSWF6CtnfNesRj/L+f6n5eLnggg71evvhTp9w254= +go.opentelemetry.io/collector/exporter/xexporter v0.151.0/go.mod h1:zCGNIgAg7os4xNiDB0DVelNMtIK5gGILdmu4nktNSfw= +go.opentelemetry.io/collector/extension v1.57.0 h1:xrKqf2CK8AjEJFtxky84l7PkzbDrFv5jomfsRDgeW80= +go.opentelemetry.io/collector/extension v1.57.0/go.mod h1:jwIanPruVtNwWbkXOi8ikfWj0mIl4m7vZdGQPDvUJcE= +go.opentelemetry.io/collector/extension/extensionauth v1.57.0 h1:SUTbKc3sVFrCOQcU8NoNsVySKvmIOosn4z3H5tyg9FQ= +go.opentelemetry.io/collector/extension/extensionauth v1.57.0/go.mod h1:iXhR9e5eC2XbdDf/Z17QJIV+wQx1E5DTth2oE3MmVMA= +go.opentelemetry.io/collector/extension/extensionauth/extensionauthtest v0.151.0 h1:hBlyGreyBrKQLXrSCoClkgeryyNe388LuZXrBHjwmc4= +go.opentelemetry.io/collector/extension/extensionauth/extensionauthtest v0.151.0/go.mod h1:jn1J+XxwNrsdEarKB3CpCLezuTLQipzLozFTeFQvFuk= +go.opentelemetry.io/collector/extension/extensioncapabilities v0.151.0 h1:/OsPLqBQn2bd+/Kp4T5RHMQNX5jbqWEb22/DtW/JAso= +go.opentelemetry.io/collector/extension/extensioncapabilities v0.151.0/go.mod h1:a+4dlig9f0tHpVRXe2sFBI2hf2EZMBHfMix+ry3Sm1w= +go.opentelemetry.io/collector/extension/extensionmiddleware v0.151.0 h1:UxqZPlF345Xnrl8fJWWpJEDNkKbiuu37r0XlfOPkxzc= +go.opentelemetry.io/collector/extension/extensionmiddleware v0.151.0/go.mod h1:IzeOB7CZmf/92KGu4Sm6mODu5tejgupcs1tW2eAkXmY= +go.opentelemetry.io/collector/extension/extensionmiddleware/extensionmiddlewaretest v0.151.0 h1:N8btWjsACekA8mqD+B+So3aqHF2X7X/MWIBJS0PpYXM= +go.opentelemetry.io/collector/extension/extensionmiddleware/extensionmiddlewaretest v0.151.0/go.mod h1:HYRwLtjSJDeCsJg8ifXjFeAnOb1CnB8il6Z2Cilrc9k= +go.opentelemetry.io/collector/extension/extensiontest v0.151.0 h1:O2ZIj7KSSxJ9WNJsEOjFeKd85EiX5cciz+Z1pIVHcJs= +go.opentelemetry.io/collector/extension/extensiontest v0.151.0/go.mod h1:PjpMpUN3CW1xEI+eSCPcg/G8QXap6eBr52gBZDxpMTQ= +go.opentelemetry.io/collector/extension/xextension v0.151.0 h1:N8Bs5cPUpnpQDKVBkCGLRHuLmLubkI1BANl/tGp93Qc= +go.opentelemetry.io/collector/extension/xextension v0.151.0/go.mod h1:DXK1pzPdH5zQpKfTYW7eFBUf3ES/RkLxJUnSxco/ZrA= +go.opentelemetry.io/collector/extension/zpagesextension v0.151.0 h1:7PUf2G6jY7I9KPfSriHCNPLqvl1fH7qFE+XnUvEgHMM= +go.opentelemetry.io/collector/extension/zpagesextension v0.151.0/go.mod h1:mN2ZXXYGTcifmU8A2Li/ISv4QvsUifPzJElSmmThxW8= +go.opentelemetry.io/collector/featuregate v1.57.0 h1:KPDSUKYn6MHwgyGRSGPPcW/G96HH93pxuvvPwM+R8nY= +go.opentelemetry.io/collector/featuregate v1.57.0/go.mod h1:4ga1QBMPEejXXmpyJS8lmaRpknJ3Lb9Bvk6e420bUFU= +go.opentelemetry.io/collector/filter v0.151.0 h1:acMfpuJbF7tucpd1jU/4UDUSEg7HalgcudCxTow/e6E= +go.opentelemetry.io/collector/filter v0.151.0/go.mod h1:3LnA3tS8Z2EzVdkHveeP9RTu7YZybWegwij5Tr4T398= +go.opentelemetry.io/collector/internal/componentalias v0.151.0 h1:5IJn4XXRbjGrJCuIByHzxgHqwC0Hcl99tM+PoyYzjJY= +go.opentelemetry.io/collector/internal/componentalias v0.151.0/go.mod h1:c70sQuXHQZWSYCyc0y/VynqJdmEeBunSmEy3xfLQPWE= +go.opentelemetry.io/collector/internal/fanoutconsumer v0.151.0 h1:3VF0YxtsSDh1f6YIXQe/6SIvGOn5O6wpoVLvmAZKrrA= +go.opentelemetry.io/collector/internal/fanoutconsumer v0.151.0/go.mod h1:T5ZxAk2530o1wVR9eSqIeD++HwGe6Xfcw3WLXHWO+Uc= +go.opentelemetry.io/collector/internal/memorylimiter v0.151.0 h1:QUq3+wPRc2vJAsF8o7RznlRWemHj3LTsdrXAgj47wSU= +go.opentelemetry.io/collector/internal/memorylimiter v0.151.0/go.mod h1:eV8uWHMhw50jFPfgdx8woHEhd/WHisJX7XIem8uRO5s= +go.opentelemetry.io/collector/internal/sharedcomponent v0.151.0 h1:KkXMLXHnwMxDHC981MfkRIDyhWbKzKjN5R3CZaQA+sQ= +go.opentelemetry.io/collector/internal/sharedcomponent v0.151.0/go.mod h1:lnefYteWM9KS9eUycSKhmVRUwWush3BpSvaznxo0rxg= +go.opentelemetry.io/collector/internal/telemetry v0.151.0 h1:Jjg7l+o+2OXUrDM+ckj6xfsV2Y+KyUFQJCDQGBTPvRU= +go.opentelemetry.io/collector/internal/telemetry v0.151.0/go.mod h1:Fq0maEsxBO2zsVKoZt3Tg0B4hRTz4TD+QnF8dxg9/fw= +go.opentelemetry.io/collector/internal/testutil v0.151.0 h1:CFjDItLuqzblItOsnK6IPSdrsOaZCaDjYpB8qWG+XHI= +go.opentelemetry.io/collector/internal/testutil v0.151.0/go.mod h1:Jkjs6rkqs973LqgZ0Fe3zrokQRKULYXPIf4HuqStiEE= +go.opentelemetry.io/collector/otelcol v0.151.0 h1:ahlkhoOi/rxA7N4ZkMdyHOX+SGGAYkfBDt30s/Zq1B4= +go.opentelemetry.io/collector/otelcol v0.151.0/go.mod h1:qxXnSE/iaa1sO5ANvgSLCtBqAE5zIkbSGc5PF4mbzEk= +go.opentelemetry.io/collector/otelcol/otelcoltest v0.151.0 h1:yAVzBglQElzbZ9cw1JB4K/pIy4BVe1gtx8xN+dMAF1U= +go.opentelemetry.io/collector/otelcol/otelcoltest v0.151.0/go.mod h1:KE/mCvdRYyTa71nas3GTncJC+b/FVcOXwRnQAcd4Re0= +go.opentelemetry.io/collector/pdata v1.57.0 h1:oDWBMjEIqyJO3GJEB+iwqxj47rxDK19OKzwaFEaE4sg= +go.opentelemetry.io/collector/pdata v1.57.0/go.mod h1:wZojinP6mNhLXudH8QXx/bjWzOsKMxi/FXwnk+12G/w= +go.opentelemetry.io/collector/pdata/pprofile v0.151.0 h1:hsU0+DpkvhJh3xL1Y8CX2vAPdLMoJLiw+C+rAMsaxZc= +go.opentelemetry.io/collector/pdata/pprofile v0.151.0/go.mod h1:5zfGTQqRuaKyh2SRaZi4SV4nSD8TzY1kYoOjniOD3uk= +go.opentelemetry.io/collector/pdata/testdata v0.151.0 h1:ye09e8UMADdVrQjLgCznZxmM8ra7ciAuOCteHDzgHjc= +go.opentelemetry.io/collector/pdata/testdata v0.151.0/go.mod h1:h5+Ys9F+pf64cGt5cZCDtRsrkOnvjgpcONr8pFA3KBc= +go.opentelemetry.io/collector/pdata/xpdata v0.151.0 h1:trsLPS6jCkwVwJyKxbPqQerAiMpKkQrQLEGIEcyC6yM= +go.opentelemetry.io/collector/pdata/xpdata v0.151.0/go.mod h1:0vID3D52DGVoypLa8S7izv41ElTBEgtAbc0HmB4KF60= +go.opentelemetry.io/collector/pipeline v1.57.0 h1:nlevGN75Vt/Fp0HTaDjZpUHQf5QFA6o2asSmzSoBVkA= +go.opentelemetry.io/collector/pipeline v1.57.0/go.mod h1:RD90NG3Jbk965Xaqym3JyHkuol4uZJjQVUkD9ddXJIs= +go.opentelemetry.io/collector/pipeline/xpipeline v0.151.0 h1:IywvWUfCS2cGOoNFowmq7CAeeyyZzp4MKUGB8gDlk9E= +go.opentelemetry.io/collector/pipeline/xpipeline v0.151.0/go.mod h1:hwkQnowliexFbNCUL/UawKdJvk2zGEegdoycPbAYIYE= +go.opentelemetry.io/collector/processor v1.57.0 h1:EyW3f4pvt/gsfM3JKgRn2WZEyknGzZk5TES3FmwNLgg= +go.opentelemetry.io/collector/processor v1.57.0/go.mod h1:EdKVhK9Oj8Cj2EdYqD/rDKdklLcdwpfSM/q6+KZOMbc= +go.opentelemetry.io/collector/processor/batchprocessor v0.151.0 h1:1B5wKmUl60Fsh8xAK5mUzwgS8uV+sjtns1/Hxv29Rvs= +go.opentelemetry.io/collector/processor/batchprocessor v0.151.0/go.mod h1:mTQoJWGCxWVz6QMo7r585ALxQakixSUSyANL/PtsF9U= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.151.0 h1:I4f66A4SmjxkMP+nAWQQFPuGsVT+Z+WxUwJ0LK9hH/k= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.151.0/go.mod h1:R9Sc9kGwgSlVMqsmwR/mRGjpbVOkWlI4IiYBmjS7rgc= +go.opentelemetry.io/collector/processor/processorhelper v0.151.0 h1:Q0RU7BM46GjLC2KPxyk8jHaud9XOVaDjp98hkL1uF38= +go.opentelemetry.io/collector/processor/processorhelper v0.151.0/go.mod h1:+WKnK3S2itxLll8XxgTiCt8o2YA9amYpCFTm51l3zV0= +go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.151.0 h1:fA8Y1JaHsH1rurDx2l3RTbnjTGRQv45dMfP66kxoq0E= +go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.151.0/go.mod h1:jJks3b5tofZm2ta3dlQNkWq/R8fsCiuQjBiFSg8GA4k= +go.opentelemetry.io/collector/processor/processortest v0.151.0 h1:J+7wLfpyO+gE/yfct11Sy1F6e+/KkLe1/gnh6jDbvbE= +go.opentelemetry.io/collector/processor/processortest v0.151.0/go.mod h1:SKl5FdxTH4bsi90E8e1W79Q94Uoh+OfEMq7yoZqUYVE= +go.opentelemetry.io/collector/processor/xprocessor v0.151.0 h1:TQhnUOP1vbdQ7zKD7SXfjtpthnfwWg23r8a6yeXDN84= +go.opentelemetry.io/collector/processor/xprocessor v0.151.0/go.mod h1:36fKMHBSieF/Se9ErxfNJkMP40IkwerFcuVwG8oF/n0= +go.opentelemetry.io/collector/receiver v1.57.0 h1:Aq8hcLByUOOrouekGPsxvaAHbUMxa4NM2Ok84KHjdcE= +go.opentelemetry.io/collector/receiver v1.57.0/go.mod h1:6y2UO4pmiT85z9JApUmRiP/7yX7zY5cmxbMgXvvMOA0= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.151.0 h1:5PAsDSp7taxiaWTH+hI8s5MBws4bnK6UpRDQ586YJA0= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.151.0/go.mod h1:7PGhjfxRmYi8agmwGRrAW7VPUTB2rXBS4eFH2oooT3g= +go.opentelemetry.io/collector/receiver/receiverhelper v0.151.0 h1:c7xgG4o9xZgUsPTOG5bOSB4rjJS0htobDLJZsyQtP1s= +go.opentelemetry.io/collector/receiver/receiverhelper v0.151.0/go.mod h1:5IBpuOFU8qZ5etUM3PulFKW9KUwr7z2nlD8ma3+m1wI= +go.opentelemetry.io/collector/receiver/receivertest v0.151.0 h1:U1iALsnbrAM3QdT4977y/S+Tbe68iS42qoeY5zgGXfE= +go.opentelemetry.io/collector/receiver/receivertest v0.151.0/go.mod h1:MBAEOfep8HMpdOcD5j1LOpP/GTjqz5hmZijGyYGxkGE= +go.opentelemetry.io/collector/receiver/xreceiver v0.151.0 h1:Ib86H9rBBD76wmpKQFRlwYqugvxbDtq8Lg6bVROBw4k= +go.opentelemetry.io/collector/receiver/xreceiver v0.151.0/go.mod h1:9Jqb3YKmgkZeLmHx5QBLBgdoLiu2T9q4B+o6LGTR/8U= +go.opentelemetry.io/collector/scraper v0.151.0 h1:IRF0VQvzMsxrHM8m5O/d4c/xJ3LXldp7Ve0td2SI+Rc= +go.opentelemetry.io/collector/scraper v0.151.0/go.mod h1:VIGfL02pUo0P3DFMnVnXAPjC8wEkBZb4zPQwvCUVOh0= +go.opentelemetry.io/collector/scraper/scraperhelper v0.151.0 h1:UOqx57FyK3YIYy1hPmlr2pN9A9IuTk1e8R4pQ6kFsBo= +go.opentelemetry.io/collector/scraper/scraperhelper v0.151.0/go.mod h1:F9JjShF6tCgXYkw06LtBAdDkDwzBdZibNQw35owLiSg= +go.opentelemetry.io/collector/scraper/scrapertest v0.151.0 h1:dthC8H7O94WRmCQ3qU8SEWGqgSo+D6RAiXj7JMssjfw= +go.opentelemetry.io/collector/scraper/scrapertest v0.151.0/go.mod h1:2mPxyCAv6N03Zx+YIQ0C3e6fjIKL+ofiwYXXp1TVafc= +go.opentelemetry.io/collector/semconv v0.126.0 h1:1q1rfOhN9sOcHQomjs9JIqFUweIgp9REUq550R6B7d8= +go.opentelemetry.io/collector/semconv v0.126.0/go.mod h1:te6VQ4zZJO5Lp8dM2XIhDxDiL45mwX0YAQQWRQ0Qr9U= +go.opentelemetry.io/collector/service v0.151.0 h1:iqtaqHda+VjTICRclkT9tSiypu39vDzxC4SVA3pMCn4= +go.opentelemetry.io/collector/service v0.151.0/go.mod h1:kFhq1YczwEJrvTv9ChVuKVCX9DIZyiAQJbNMvRXAJcM= +go.opentelemetry.io/collector/service/hostcapabilities v0.151.0 h1:+VbDE5ZRXKD6nXVXpB2asVY0767SbE7GRbTeVncpwR0= +go.opentelemetry.io/collector/service/hostcapabilities v0.151.0/go.mod h1:GlnaFXJAqeTgAnEDIz7HI28ydwoZcbJ7Niyom+wVBMo= +go.opentelemetry.io/collector/service/telemetry/telemetrytest v0.151.0 h1:L4r/rZBeDBaVnU/EeQT6H2/msGAyzpKMHXTP8Vwr1NE= +go.opentelemetry.io/collector/service/telemetry/telemetrytest v0.151.0/go.mod h1:/e2FJ+CEpIttRTzP37HdrgKuwfIj6dcZsa2jZajL6Vw= +go.opentelemetry.io/contrib/bridges/otelzap v0.18.0 h1:EkWTww6Nqs2P29r01NeuNsG7qNJtoWWaT1fx/CKode8= +go.opentelemetry.io/contrib/bridges/otelzap v0.18.0/go.mod h1:lj3bgA/c7nJy0NhxqyvWJFC30aTgB+G0RKDdLbvJ4QM= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0 h1:0Qx7VGBacMm9ZENQ7TnNObTYI4ShC+lHI16seduaxZo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0/go.mod h1:Sje3i3MjSPKTSPvVWCaL8ugBzJwik3u4smCjUeuupqg= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.67.0 h1:c9r/G1CSw4dPI1jaNNG9RnQP+q4SvZnHciDQJVIvchU= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.67.0/go.mod h1:gO9smoZe9KnZcJCqcB0lMmQ4Z5VEifYmjMTpnwtTSuQ= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 h1:CqXxU8VOmDefoh0+ztfGaymYbhdB/tT3zs79QaZTNGY= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0/go.mod h1:BuhAPThV8PBHBvg8ZzZ/Ok3idOdhWIodywz2xEcRbJo= +go.opentelemetry.io/contrib/otelconf v0.23.0 h1:s3C7KdMYiutf4rC8hKFA0WOIDG+gIru8ajjQKS59ir8= +go.opentelemetry.io/contrib/otelconf v0.23.0/go.mod h1:0kN2tcccZS82e7IZlo045gkcL8/8dup1k25sf9ypGxM= +go.opentelemetry.io/contrib/propagators/b3 v1.43.0 h1:CETqV3QLLPTy5yNrqyMr41VnAOOD4lsRved7n4QG00A= +go.opentelemetry.io/contrib/propagators/b3 v1.43.0/go.mod h1:Q4mCiCdziYzpNR0g+6UqVotAlCDZdzz6L8jwY4knOrw= +go.opentelemetry.io/contrib/zpages v0.68.0 h1:H5yrUwxPrbvhzdBxjQD+VXMtPjIBfp8NWNVvQT8E30M= +go.opentelemetry.io/contrib/zpages v0.68.0/go.mod h1:sZGctYYO4UOHItj9bx3F+t/s+u1Fv8CHCJ5s2eR2cjU= +go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I= +go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.19.0 h1:Dn8rkudDzY6KV9dr/D/bTUuWgqDf9xe0rr4G2elrn0Y= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.19.0/go.mod h1:gMk9F0xDgyN9M/3Ed5Y1wKcx/9mlU91NXY2SNq7RQuU= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.19.0 h1:HIBTQ3VO5aupLKjC90JgMqpezVXwFuq6Ryjn0/izoag= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.19.0/go.mod h1:ji9vId85hMxqfvICA0Jt8JqEdrXaAkcpkI9HPXya0ro= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.43.0 h1:8UQVDcZxOJLtX6gxtDt3vY2WTgvZqMQRzjsqiIHQdkc= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.43.0/go.mod h1:2lmweYCiHYpEjQ/lSJBYhj9jP1zvCvQW4BqL9dnT7FQ= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.43.0 h1:w1K+pCJoPpQifuVpsKamUdn9U0zM3xUziVOqsGksUrY= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.43.0/go.mod h1:HBy4BjzgVE8139ieRI75oXm3EcDN+6GhD88JT1Kjvxg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 h1:88Y4s2C8oTui1LGM6bTWkw0ICGcOLCAI5l6zsD1j20k= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0/go.mod h1:Vl1/iaggsuRlrHf/hfPJPvVag77kKyvrLeD10kpMl+A= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0 h1:RAE+JPfvEmvy+0LzyUA25/SGawPwIUbZ6u0Wug54sLc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0/go.mod h1:AGmbycVGEsRx9mXMZ75CsOyhSP6MFIcj/6dnG+vhVjk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0 h1:3iZJKlCZufyRzPzlQhUIWVmfltrXuGyfjREgGP3UUjc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0/go.mod h1:/G+nUPfhq2e+qiXMGxMwumDrP5jtzU+mWN7/sjT2rak= +go.opentelemetry.io/otel/exporters/prometheus v0.65.0 h1:jOveH/b4lU9HT7y+Gfamf18BqlOuz2PWEvs8yM7Q6XE= +go.opentelemetry.io/otel/exporters/prometheus v0.65.0/go.mod h1:i1P8pcumauPtUI4YNopea1dhzEMuEqWP1xoUZDylLHo= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.19.0 h1:GJkybS+crDMdExT/BUNCEgfrmfboztcS6PhvSo88HKM= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.19.0/go.mod h1:NuAyxRYIG2lKX3YQkB+83StTxM7s52PUUkRRiC0wnYI= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.43.0 h1:TC+BewnDpeiAmcscXbGMfxkO+mwYUwE/VySwvw88PfA= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.43.0/go.mod h1:J/ZyF4vfPwsSr9xJSPyQ4LqtcTPULFR64KwTikGLe+A= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.43.0 h1:mS47AX77OtFfKG4vtp+84kuGSFZHTyxtXIN269vChY0= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.43.0/go.mod h1:PJnsC41lAGncJlPUniSwM81gc80GkgWJWr3cu2nKEtU= +go.opentelemetry.io/otel/log v0.19.0 h1:KUZs/GOsw79TBBMfDWsXS+KZ4g2Ckzksd1ymzsIEbo4= +go.opentelemetry.io/otel/log v0.19.0/go.mod h1:5DQYeGmxVIr4n0/BcJvF4upsraHjg6vudJJpnkL6Ipk= +go.opentelemetry.io/otel/log/logtest v0.19.0 h1:HdSsl4ndTK15LtJGLWBfMsSlLrCgSeE3VMzwOrLYiYs= +go.opentelemetry.io/otel/log/logtest v0.19.0/go.mod h1:c1sH1nOHTwfMCWhhQTdWGqxgDjZhtkbkzAqGGyj0Ijs= +go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM= +go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY= +go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg= +go.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg= +go.opentelemetry.io/otel/sdk/log v0.19.0 h1:scYVLqT22D2gqXItnWiocLUKGH9yvkkeql5dBDiXyko= +go.opentelemetry.io/otel/sdk/log v0.19.0/go.mod h1:vFBowwXGLlW9AvpuF7bMgnNI95LiW10szrOdvzBHlAg= +go.opentelemetry.io/otel/sdk/log/logtest v0.19.0 h1:BEbF7ZBB6qQloV/Ub1+3NQoOUnVtcGkU3XX4Ws3GQfk= +go.opentelemetry.io/otel/sdk/log/logtest v0.19.0/go.mod h1:Lua81/3yM0wOmoHTokLj9y9ADeA02v1naRrVrkAZuKk= +go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfCGLEo89fDkw= +go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A= +go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A= +go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0= +go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g= +go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk= +go.opentelemetry.io/proto/slim/otlp v1.10.0 h1:iR97Vs/ZDR+y9TfuP9b1XBtdPWeC+OMslIBmhcLU7jM= +go.opentelemetry.io/proto/slim/otlp v1.10.0/go.mod h1:lV9250stpjYLPNA5viFabIgP2QlUGRT1GdTgAf8SIUk= +go.opentelemetry.io/proto/slim/otlp/collector/profiles/v1development v0.3.0 h1:RUF5rO0hAlgiJt1fzQVzcVs3vZVNHIcMLgOgG4rWNcQ= +go.opentelemetry.io/proto/slim/otlp/collector/profiles/v1development v0.3.0/go.mod h1:I89cynRj8y+383o7tEQVg2SVA6SRgDVIouWPUVXjx0U= +go.opentelemetry.io/proto/slim/otlp/profiles/v1development v0.3.0 h1:CQvJSldHRUN6Z8jsUeYv8J0lXRvygALXIzsmAeCcZE0= +go.opentelemetry.io/proto/slim/otlp/profiles/v1development v0.3.0/go.mod h1:xSQ+mEfJe/GjK1LXEyVOoSI1N9JV9ZI923X5kup43W4= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.28.0 h1:IZzaP1Fv73/T/pBMLk4VutPl36uNC+OSUh3JLG3FIjo= +go.uber.org/zap v1.28.0/go.mod h1:rDLpOi171uODNm/mxFcuYWxDsqWSAVkFdX4XojSKg/Q= +go.uber.org/zap/exp v0.3.0 h1:6JYzdifzYkGmTdRR59oYH+Ng7k49H9qVpWwNSsGJj3U= +go.uber.org/zap/exp v0.3.0/go.mod h1:5I384qq7XGxYyByIhHm6jg5CHkGY0nsTfbDLgDDlgJQ= +go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ= +go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +go.yaml.in/yaml/v4 v4.0.0-rc.4 h1:UP4+v6fFrBIb1l934bDl//mmnoIZEDK0idg1+AIvX5U= +go.yaml.in/yaml/v4 v4.0.0-rc.4/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/crypto v0.50.0 h1:zO47/JPrL6vsNkINmLoo/PH1gcxpls50DNogFvB5ZGI= +golang.org/x/crypto v0.50.0/go.mod h1:3muZ7vA7PBCE6xgPX7nkzzjiUq87kRItoJQM1Yo8S+Q= +golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90 h1:jiDhWWeC7jfWqR9c/uplMOqJ0sbNlNWv0UkzE0vX1MA= +golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90/go.mod h1:xE1HEv6b+1SCZ5/uscMRjUBKtIxworgEcEi+/n9NQDQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM= +golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= +golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA= +golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs= +golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= +golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= +golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI= +golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= +golang.org/x/telemetry v0.0.0-20260409153401-be6f6cb8b1fa h1:efT73AJZfAAUV7SOip6pWGkwJDzIGiKBZGVzHYa+ve4= +golang.org/x/telemetry v0.0.0-20260409153401-be6f6cb8b1fa/go.mod h1:kHjTxDEnAu6/Nl9lDkzjWpR+bmKfxeiRuSDlsMb70gE= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= +golang.org/x/term v0.42.0 h1:UiKe+zDFmJobeJ5ggPwOshJIVt6/Ft0rcfrXZDLWAWY= +golang.org/x/term v0.42.0/go.mod h1:Dq/D+snpsbazcBG5+F9Q1n2rXV8Ma+71xEjTRufARgY= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg= +golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164= +golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U= +golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190802003818-e9bb7d36c060/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c= +golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI= +golang.org/x/tools/godoc v0.1.0-deprecated h1:o+aZ1BOj6Hsx/GBdJO/s815sqftjSnrZZwyYTHODvtk= +golang.org/x/tools/godoc v0.1.0-deprecated/go.mod h1:qM63CriJ961IHWmnWa9CjZnBndniPt4a3CK0PVB9bIg= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY= +golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= +gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= +google.golang.org/api v0.274.0 h1:aYhycS5QQCwxHLwfEHRRLf9yNsfvp1JadKKWBE54RFA= +google.golang.org/api v0.274.0/go.mod h1:JbAt7mF+XVmWu6xNP8/+CTiGH30ofmCmk9nM8d8fHew= +google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7 h1:XzmzkmB14QhVhgnawEVsOn6OFsnpyxNPRY9QV01dNB0= +google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7/go.mod h1:L43LFes82YgSonw6iTXTxXUX1OlULt4AQtkik4ULL/I= +google.golang.org/genproto/googleapis/api v0.0.0-20260406210006-6f92a3bedf2d h1:/aDRtSZJjyLQzm75d+a1wOJaqyKBMvIAfeQmoa3ORiI= +google.golang.org/genproto/googleapis/api v0.0.0-20260406210006-6f92a3bedf2d/go.mod h1:etfGUgejTiadZAUaEP14NP97xi1RGeawqkjDARA/UOs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d h1:wT2n40TBqFY6wiwazVK9/iTWbsQrgk5ZfCSVFLO9LQA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/grpc v1.80.0 h1:Xr6m2WmWZLETvUNvIUmeD5OAagMw3FiKmMlTdViWsHM= +google.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/dnaeon/go-vcr.v4 v4.0.6 h1:PiJkrakkmzc5s7EfBnZOnyiLwi7o7A9fwPzN0X2uwe0= +gopkg.in/dnaeon/go-vcr.v4 v4.0.6/go.mod h1:sbq5oMEcM4PXngbcNbHhzfCP9OdZodLhrbRYoyg09HY= +gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= +gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.67.1 h1:tVBILHy0R6e4wkYOn3XmiITt/hEVH4TFMYvAX2Ytz6k= +gopkg.in/ini.v1 v1.67.1/go.mod h1:x/cyOwCgZqOkJoDIJ3c1KNHMo10+nLGAhh+kn3Zizss= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= +k8s.io/api v0.35.4 h1:P7nFYKl5vo9AGUp1Z+Pmd3p2tA7bX2wbFWCvDeRv988= +k8s.io/api v0.35.4/go.mod h1:yl4lqySWOgYJJf9RERXKUwE9g2y+CkuwG+xmcOK8wXU= +k8s.io/apimachinery v0.35.4 h1:xtdom9RG7e+yDp71uoXoJDWEE2eOiHgeO4GdBzwWpds= +k8s.io/apimachinery v0.35.4/go.mod h1:NNi1taPOpep0jOj+oRha3mBJPqvi0hGdaV8TCqGQ+cc= +k8s.io/client-go v0.35.4 h1:DN6fyaGuzK64UvnKO5fOA6ymSjvfGAnCAHAR0C66kD8= +k8s.io/client-go v0.35.4/go.mod h1:2Pg9WpsS4NeOpoYTfHHfMxBG8zFMSAUi4O/qoiJC3nY= +k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc= +k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0= +k8s.io/kube-openapi v0.0.0-20260330154417-16be699c7b31 h1:V+sn9a/1fEYDGwnllCmqXBk8x7obZ+hl869Q3Abumkg= +k8s.io/kube-openapi v0.0.0-20260330154417-16be699c7b31/go.mod h1:uGBT7iTA6c6MvqUvSXIaYZo9ukscABYi2btjhvgKGZ0= +k8s.io/utils v0.0.0-20260319190234-28399d86e0b5 h1:kBawHLSnx/mYHmRnNUf9d4CpjREbeZuxoSGOX/J+aYM= +k8s.io/utils v0.0.0-20260319190234-28399d86e0b5/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk= +pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= +pgregory.net/rapid v1.2.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= +sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/structured-merge-diff/v6 v6.3.2 h1:kwVWMx5yS1CrnFWA/2QHyRVJ8jM6dBA80uLmm0wJkk8= +sigs.k8s.io/structured-merge-diff/v6 v6.3.2/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/cmd/otelopscol/main.go b/cmd/otelopscol/main.go new file mode 100644 index 0000000000..f388fec8e4 --- /dev/null +++ b/cmd/otelopscol/main.go @@ -0,0 +1,58 @@ +// Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. + +// Program otelopscol is an OpenTelemetry Collector binary. +package main + +import ( + "os" + + googlesecretmanagerprovider "github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/googlesecretmanagerprovider" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap" + envprovider "go.opentelemetry.io/collector/confmap/provider/envprovider" + fileprovider "go.opentelemetry.io/collector/confmap/provider/fileprovider" + "go.opentelemetry.io/collector/otelcol" +) + +func main() { + info := component.BuildInfo{ + Command: "otelopscol", + Description: "OpenTelemetry Collector binary used by the Ops Agent", + Version: "v0.151.0", + } + + set := otelcol.CollectorSettings{ + BuildInfo: info, + Factories: components, + ConfigProviderSettings: otelcol.ConfigProviderSettings{ + ResolverSettings: confmap.ResolverSettings{ + ProviderFactories: []confmap.ProviderFactory{ + googlesecretmanagerprovider.NewFactory(), + envprovider.NewFactory(), + fileprovider.NewFactory(), + }, + }, + }, + ProviderModules: map[string]string{ + googlesecretmanagerprovider.NewFactory().Create(confmap.ProviderSettings{}).Scheme(): "github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/googlesecretmanagerprovider v0.151.0", + envprovider.NewFactory().Create(confmap.ProviderSettings{}).Scheme(): "go.opentelemetry.io/collector/confmap/provider/envprovider v1.57.0", + fileprovider.NewFactory().Create(confmap.ProviderSettings{}).Scheme(): "go.opentelemetry.io/collector/confmap/provider/fileprovider v1.57.0", + }, + ConverterModules: []string{}, + } + + if err := run(set); err != nil { + // The error message is logged by cobra, so we intentionally + // avoid logging it again here to prevent duplicate output. + os.Exit(1) + } +} + +func runInteractive(params otelcol.CollectorSettings) error { + cmd := otelcol.NewCommand(params) + if err := cmd.Execute(); err != nil { + return err + } + + return nil +} diff --git a/cmd/otelopscol/main_others.go b/cmd/otelopscol/main_others.go new file mode 100644 index 0000000000..3735aecb58 --- /dev/null +++ b/cmd/otelopscol/main_others.go @@ -0,0 +1,11 @@ +// Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. + +//go:build !windows + +package main + +import "go.opentelemetry.io/collector/otelcol" + +func run(params otelcol.CollectorSettings) error { + return runInteractive(params) +} diff --git a/cmd/otelopscol/main_windows.go b/cmd/otelopscol/main_windows.go new file mode 100644 index 0000000000..60d78b30a7 --- /dev/null +++ b/cmd/otelopscol/main_windows.go @@ -0,0 +1,29 @@ +// Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. + +//go:build windows + +package main + +import ( + "errors" + "fmt" + "go.opentelemetry.io/collector/otelcol" + "golang.org/x/sys/windows" + "golang.org/x/sys/windows/svc" +) + +func run(params otelcol.CollectorSettings) error { + // No need to supply service name when startup is invoked through + // the Service Control Manager directly. + if err := svc.Run("", otelcol.NewSvcHandler(params)); err != nil { + if errors.Is(err, windows.ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) { + // Per https://learn.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-startservicectrldispatchera#return-value + // this means that the process is not running as a service, so run interactively. + return runInteractive(params) + } + + return fmt.Errorf("failed to start collector server: %w", err) + } + + return nil +} diff --git a/cmd/otelopscol/registry.yaml b/cmd/otelopscol/registry.yaml new file mode 100644 index 0000000000..07b6819d4e --- /dev/null +++ b/cmd/otelopscol/registry.yaml @@ -0,0 +1,37 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +receivers: + dcgm: + gomod: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/receiver/dcgmreceiver v0.0.0 + path: "../../internal/components/receiver/dcgmreceiver" + nvml: + gomod: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/receiver/nvmlreceiver v0.0.0 + path: "../../internal/components/receiver/nvmlreceiver" + saphana: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphanareceiver + +processors: + agentmetrics: + gomod: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/agentmetricsprocessor v0.0.0 + path: "../../internal/components/processor/agentmetricsprocessor" + normalizesums: + gomod: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/normalizesumsprocessor v0.0.0 + path: "../../internal/components/processor/normalizesumsprocessor" + filter: + gomod: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/filterprocessor v0.0.0 + path: "../../internal/components/processor/filterprocessor" + transform: + gomod: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/components/otelopscol/processor/transformprocessor v0.0.0 + path: "../../internal/components/processor/transformprocessor" diff --git a/cmd/otelopscol/spec.yaml b/cmd/otelopscol/spec.yaml new file mode 100644 index 0000000000..bdb4bd3ab6 --- /dev/null +++ b/cmd/otelopscol/spec.yaml @@ -0,0 +1,72 @@ +name: otelopscol +module: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/otelopscol +display_name: "" +description: OpenTelemetry Collector binary used by the Ops Agent +blurb: "" +build_container: debian +version: v0.151.0 +opentelemetry_version: 0.151.0 +opentelemetry_contrib_version: 0.151.0 +opentelemetry_stable_version: 1.57.0 +go_version: 1.26.1 +binary_name: otelopscol +build_tags: gpu +boringcrypto: false +docker_repo: "" +components: + receivers: + - filelog + - fluentforward + - hostmetrics + - iis + - prometheus + - otlp + - syslog + - sqlserver + - sqlquery + - mysql + - windowseventlog + - windowsperfcounters + - journald + - otlpjsonfile + - dcgm + - nvml + processors: + - cumulativetodelta + - deltatocumulative + - deltatorate + - filter + - groupbyattrs + - interval + - metricstransform + - resourcedetection + - resource + - transform + - batch + - memorylimiter + - metricstarttime + - agentmetrics + - normalizesums + exporters: + - otlp + - otlphttp + - debug + extensions: + - zpages + - googleclientauth + - pprof + - filestorage + providers: + - googlesecretmanager + - file + - env +replaces: + - from: github.com/GoogleCloudPlatform/opentelemetry-operations-collector + to: ../../ + reason: Reference root module of repository to find dependency packages. + - from: github.com/buger/jsonparser + to: github.com/buger/jsonparser v1.1.2 + reason: Force update buger/jsonparser to v1.1.2 to fix vulnerability +collector_cgo: true +component_module_base: "" +distrogen_version: "" diff --git a/confgenerator/testdata/goldens/invalid-logging-otel-processor_modify_fields_unsupported_field/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-otel-processor_modify_fields_unsupported_field/golden/linux-gpu/error index f2fc4eacd2..522b087f72 100644 --- a/confgenerator/testdata/goldens/invalid-logging-otel-processor_modify_fields_unsupported_field/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-otel-processor_modify_fields_unsupported_field/golden/linux-gpu/error @@ -1,10 +1,9 @@ -[27:18] "fields[operation]": 1:10: error: field "operation" not found +[26:13] "fields[operation]": 1:10: error: field "operation" not found + 23 | processors: 24 | simple: 25 | type: modify_fields - 26 | fields: -> 27 | operation: - ^ +> 26 | fields: + ^ + 27 | operation: 28 | move_from: jsonPayload.operation - 29 | service: - 30 | experimental_otel_logging: true - 31 | \ No newline at end of file + 29 | service: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-otel-processor_modify_fields_unsupported_field/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-otel-processor_modify_fields_unsupported_field/golden/linux/error index f2fc4eacd2..522b087f72 100644 --- a/confgenerator/testdata/goldens/invalid-logging-otel-processor_modify_fields_unsupported_field/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-otel-processor_modify_fields_unsupported_field/golden/linux/error @@ -1,10 +1,9 @@ -[27:18] "fields[operation]": 1:10: error: field "operation" not found +[26:13] "fields[operation]": 1:10: error: field "operation" not found + 23 | processors: 24 | simple: 25 | type: modify_fields - 26 | fields: -> 27 | operation: - ^ +> 26 | fields: + ^ + 27 | operation: 28 | move_from: jsonPayload.operation - 29 | service: - 30 | experimental_otel_logging: true - 31 | \ No newline at end of file + 29 | service: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-otel-processor_modify_fields_unsupported_field/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-otel-processor_modify_fields_unsupported_field/golden/windows-2012/error index f2fc4eacd2..522b087f72 100644 --- a/confgenerator/testdata/goldens/invalid-logging-otel-processor_modify_fields_unsupported_field/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-otel-processor_modify_fields_unsupported_field/golden/windows-2012/error @@ -1,10 +1,9 @@ -[27:18] "fields[operation]": 1:10: error: field "operation" not found +[26:13] "fields[operation]": 1:10: error: field "operation" not found + 23 | processors: 24 | simple: 25 | type: modify_fields - 26 | fields: -> 27 | operation: - ^ +> 26 | fields: + ^ + 27 | operation: 28 | move_from: jsonPayload.operation - 29 | service: - 30 | experimental_otel_logging: true - 31 | \ No newline at end of file + 29 | service: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-otel-processor_modify_fields_unsupported_field/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-otel-processor_modify_fields_unsupported_field/golden/windows/error index f2fc4eacd2..522b087f72 100644 --- a/confgenerator/testdata/goldens/invalid-logging-otel-processor_modify_fields_unsupported_field/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-otel-processor_modify_fields_unsupported_field/golden/windows/error @@ -1,10 +1,9 @@ -[27:18] "fields[operation]": 1:10: error: field "operation" not found +[26:13] "fields[operation]": 1:10: error: field "operation" not found + 23 | processors: 24 | simple: 25 | type: modify_fields - 26 | fields: -> 27 | operation: - ^ +> 26 | fields: + ^ + 27 | operation: 28 | move_from: jsonPayload.operation - 29 | service: - 30 | experimental_otel_logging: true - 31 | \ No newline at end of file + 29 | service: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-pipeline_reserved_id_prefix/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-pipeline_reserved_id_prefix/golden/linux-gpu/error index 4632bf83f0..c7802c9586 100644 --- a/confgenerator/testdata/goldens/invalid-logging-pipeline_reserved_id_prefix/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-pipeline_reserved_id_prefix/golden/linux-gpu/error @@ -1,7 +1,8 @@ -[24:21] "Pipelines[lib:pipeline_1]" must not start with "lib:" +[23:14] "Pipelines[lib:pipeline_1]" must not start with "lib:" + 20 | - /var/log/messages 21 | - /var/log/syslog 22 | service: - 23 | pipelines: -> 24 | lib:pipeline_1: - ^ +> 23 | pipelines: + ^ + 24 | lib:pipeline_1: 25 | receivers: [syslog] \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-pipeline_reserved_id_prefix/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-pipeline_reserved_id_prefix/golden/linux/error index 4632bf83f0..c7802c9586 100644 --- a/confgenerator/testdata/goldens/invalid-logging-pipeline_reserved_id_prefix/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-pipeline_reserved_id_prefix/golden/linux/error @@ -1,7 +1,8 @@ -[24:21] "Pipelines[lib:pipeline_1]" must not start with "lib:" +[23:14] "Pipelines[lib:pipeline_1]" must not start with "lib:" + 20 | - /var/log/messages 21 | - /var/log/syslog 22 | service: - 23 | pipelines: -> 24 | lib:pipeline_1: - ^ +> 23 | pipelines: + ^ + 24 | lib:pipeline_1: 25 | receivers: [syslog] \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-pipeline_reserved_id_prefix/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-pipeline_reserved_id_prefix/golden/windows-2012/error index 4632bf83f0..c7802c9586 100644 --- a/confgenerator/testdata/goldens/invalid-logging-pipeline_reserved_id_prefix/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-pipeline_reserved_id_prefix/golden/windows-2012/error @@ -1,7 +1,8 @@ -[24:21] "Pipelines[lib:pipeline_1]" must not start with "lib:" +[23:14] "Pipelines[lib:pipeline_1]" must not start with "lib:" + 20 | - /var/log/messages 21 | - /var/log/syslog 22 | service: - 23 | pipelines: -> 24 | lib:pipeline_1: - ^ +> 23 | pipelines: + ^ + 24 | lib:pipeline_1: 25 | receivers: [syslog] \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-pipeline_reserved_id_prefix/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-pipeline_reserved_id_prefix/golden/windows/error index 4632bf83f0..c7802c9586 100644 --- a/confgenerator/testdata/goldens/invalid-logging-pipeline_reserved_id_prefix/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-pipeline_reserved_id_prefix/golden/windows/error @@ -1,7 +1,8 @@ -[24:21] "Pipelines[lib:pipeline_1]" must not start with "lib:" +[23:14] "Pipelines[lib:pipeline_1]" must not start with "lib:" + 20 | - /var/log/messages 21 | - /var/log/syslog 22 | service: - 23 | pipelines: -> 24 | lib:pipeline_1: - ^ +> 23 | pipelines: + ^ + 24 | lib:pipeline_1: 25 | receivers: [syslog] \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work/golden/linux-gpu/error index b83ef4eab7..83bd328e56 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work/golden/linux-gpu/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:21: error: expected one of "$", ws, andOp, orOp, dot, less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "~" +[19:16] "match_any[0]": 1:21: error: expected one of "$", ws, andOp, orOp, dot, less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "~" 16 | processors: 17 | p1: 18 | type: exclude_logs > 19 | match_any: ['jsonPayload.message!~foo'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work/golden/linux/error index b83ef4eab7..83bd328e56 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work/golden/linux/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:21: error: expected one of "$", ws, andOp, orOp, dot, less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "~" +[19:16] "match_any[0]": 1:21: error: expected one of "$", ws, andOp, orOp, dot, less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "~" 16 | processors: 17 | p1: 18 | type: exclude_logs > 19 | match_any: ['jsonPayload.message!~foo'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work/golden/windows-2012/error index b83ef4eab7..83bd328e56 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work/golden/windows-2012/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:21: error: expected one of "$", ws, andOp, orOp, dot, less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "~" +[19:16] "match_any[0]": 1:21: error: expected one of "$", ws, andOp, orOp, dot, less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "~" 16 | processors: 17 | p1: 18 | type: exclude_logs > 19 | match_any: ['jsonPayload.message!~foo'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work/golden/windows/error index b83ef4eab7..83bd328e56 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work/golden/windows/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:21: error: expected one of "$", ws, andOp, orOp, dot, less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "~" +[19:16] "match_any[0]": 1:21: error: expected one of "$", ws, andOp, orOp, dot, less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "~" 16 | processors: 17 | p1: 18 | type: exclude_logs > 19 | match_any: ['jsonPayload.message!~foo'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work2/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work2/golden/linux-gpu/error index 2b2b172065..0ef56f8e88 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work2/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work2/golden/linux-gpu/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:28: error: expected one of andOp, orOp, not, minus, lparen, text, or string; got: ")" +[19:16] "match_any[0]": 1:28: error: expected one of andOp, orOp, not, minus, lparen, text, or string; got: ")" 16 | processors: 17 | p1: 18 | type: exclude_logs > 19 | match_any: ['(jsonPayload.message = foo )'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work2/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work2/golden/linux/error index 2b2b172065..0ef56f8e88 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work2/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work2/golden/linux/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:28: error: expected one of andOp, orOp, not, minus, lparen, text, or string; got: ")" +[19:16] "match_any[0]": 1:28: error: expected one of andOp, orOp, not, minus, lparen, text, or string; got: ")" 16 | processors: 17 | p1: 18 | type: exclude_logs > 19 | match_any: ['(jsonPayload.message = foo )'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work2/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work2/golden/windows-2012/error index 2b2b172065..0ef56f8e88 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work2/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work2/golden/windows-2012/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:28: error: expected one of andOp, orOp, not, minus, lparen, text, or string; got: ")" +[19:16] "match_any[0]": 1:28: error: expected one of andOp, orOp, not, minus, lparen, text, or string; got: ")" 16 | processors: 17 | p1: 18 | type: exclude_logs > 19 | match_any: ['(jsonPayload.message = foo )'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work2/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work2/golden/windows/error index 2b2b172065..0ef56f8e88 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work2/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_but_really_ought_to_work2/golden/windows/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:28: error: expected one of andOp, orOp, not, minus, lparen, text, or string; got: ")" +[19:16] "match_any[0]": 1:28: error: expected one of andOp, orOp, not, minus, lparen, text, or string; got: ")" 16 | processors: 17 | p1: 18 | type: exclude_logs > 19 | match_any: ['(jsonPayload.message = foo )'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_nonregex_string/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_nonregex_string/golden/linux-gpu/error index bd5f0b80cf..17d6786a24 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_nonregex_string/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_nonregex_string/golden/linux-gpu/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:35: error: invalid escape sequence: \[ +[19:16] "match_any[0]": 1:35: error: invalid escape sequence: \[ 16 | processors: 17 | processor_1: 18 | type: exclude_logs > 19 | match_any: ['jsonPayload.message = "foo\[bar\]"'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_nonregex_string/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_nonregex_string/golden/linux/error index bd5f0b80cf..17d6786a24 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_nonregex_string/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_nonregex_string/golden/linux/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:35: error: invalid escape sequence: \[ +[19:16] "match_any[0]": 1:35: error: invalid escape sequence: \[ 16 | processors: 17 | processor_1: 18 | type: exclude_logs > 19 | match_any: ['jsonPayload.message = "foo\[bar\]"'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_nonregex_string/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_nonregex_string/golden/windows-2012/error index bd5f0b80cf..17d6786a24 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_nonregex_string/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_nonregex_string/golden/windows-2012/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:35: error: invalid escape sequence: \[ +[19:16] "match_any[0]": 1:35: error: invalid escape sequence: \[ 16 | processors: 17 | processor_1: 18 | type: exclude_logs > 19 | match_any: ['jsonPayload.message = "foo\[bar\]"'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_nonregex_string/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_nonregex_string/golden/windows/error index bd5f0b80cf..17d6786a24 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_nonregex_string/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_nonregex_string/golden/windows/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:35: error: invalid escape sequence: \[ +[19:16] "match_any[0]": 1:35: error: invalid escape sequence: \[ 16 | processors: 17 | processor_1: 18 | type: exclude_logs > 19 | match_any: ['jsonPayload.message = "foo\[bar\]"'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_path_name/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_path_name/golden/linux-gpu/error index 6ed3edf90c..4982b21b08 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_path_name/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_path_name/golden/linux-gpu/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:19: error: field "invalid.path" not found +[19:16] "match_any[0]": 1:19: error: field "invalid.path" not found 16 | processors: 17 | p1: 18 | type: exclude_logs > 19 | match_any: ['invalid.path = foo'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_path_name/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_path_name/golden/linux/error index 6ed3edf90c..4982b21b08 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_path_name/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_path_name/golden/linux/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:19: error: field "invalid.path" not found +[19:16] "match_any[0]": 1:19: error: field "invalid.path" not found 16 | processors: 17 | p1: 18 | type: exclude_logs > 19 | match_any: ['invalid.path = foo'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_path_name/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_path_name/golden/windows-2012/error index 6ed3edf90c..4982b21b08 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_path_name/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_path_name/golden/windows-2012/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:19: error: field "invalid.path" not found +[19:16] "match_any[0]": 1:19: error: field "invalid.path" not found 16 | processors: 17 | p1: 18 | type: exclude_logs > 19 | match_any: ['invalid.path = foo'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_path_name/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_path_name/golden/windows/error index 6ed3edf90c..4982b21b08 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_path_name/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_path_name/golden/windows/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:19: error: field "invalid.path" not found +[19:16] "match_any[0]": 1:19: error: field "invalid.path" not found 16 | processors: 17 | p1: 18 | type: exclude_logs > 19 | match_any: ['invalid.path = foo'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_pattern/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_pattern/golden/linux-gpu/error index 1d91fa93f1..f86f0286af 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_pattern/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_pattern/golden/linux-gpu/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:5: error: expected one of less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "&" +[19:16] "match_any[0]": 1:5: error: expected one of less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "&" 16 | processors: 17 | processor_1: 18 | type: exclude_logs > 19 | match_any: ['foo & bar'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_pattern/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_pattern/golden/linux/error index 1d91fa93f1..f86f0286af 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_pattern/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_pattern/golden/linux/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:5: error: expected one of less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "&" +[19:16] "match_any[0]": 1:5: error: expected one of less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "&" 16 | processors: 17 | processor_1: 18 | type: exclude_logs > 19 | match_any: ['foo & bar'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_pattern/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_pattern/golden/windows-2012/error index 1d91fa93f1..f86f0286af 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_pattern/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_pattern/golden/windows-2012/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:5: error: expected one of less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "&" +[19:16] "match_any[0]": 1:5: error: expected one of less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "&" 16 | processors: 17 | processor_1: 18 | type: exclude_logs > 19 | match_any: ['foo & bar'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_pattern/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_pattern/golden/windows/error index 1d91fa93f1..f86f0286af 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_pattern/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_invalid_pattern/golden/windows/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:5: error: expected one of less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "&" +[19:16] "match_any[0]": 1:5: error: expected one of less_equals, less_than, greater_equals, greater_than, not_equals, equals, has, matches_regexp, or not_matches_regexp; got: "&" 16 | processors: 17 | processor_1: 18 | type: exclude_logs > 19 | match_any: ['foo & bar'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_contraction/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_contraction/golden/linux-gpu/error index 45239296d4..6afbf140fa 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_contraction/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_contraction/golden/linux-gpu/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:23: error: expected one of andOp, orOp, not, text, or string; got: "(" +[19:16] "match_any[0]": 1:23: error: expected one of andOp, orOp, not, text, or string; got: "(" 16 | processors: 17 | processor_1: 18 | type: exclude_logs > 19 | match_any: ['jsonPayload.message = ("first" OR "second")'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_contraction/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_contraction/golden/linux/error index 45239296d4..6afbf140fa 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_contraction/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_contraction/golden/linux/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:23: error: expected one of andOp, orOp, not, text, or string; got: "(" +[19:16] "match_any[0]": 1:23: error: expected one of andOp, orOp, not, text, or string; got: "(" 16 | processors: 17 | processor_1: 18 | type: exclude_logs > 19 | match_any: ['jsonPayload.message = ("first" OR "second")'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_contraction/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_contraction/golden/windows-2012/error index 45239296d4..6afbf140fa 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_contraction/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_contraction/golden/windows-2012/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:23: error: expected one of andOp, orOp, not, text, or string; got: "(" +[19:16] "match_any[0]": 1:23: error: expected one of andOp, orOp, not, text, or string; got: "(" 16 | processors: 17 | processor_1: 18 | type: exclude_logs > 19 | match_any: ['jsonPayload.message = ("first" OR "second")'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_contraction/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_contraction/golden/windows/error index 45239296d4..6afbf140fa 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_contraction/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_contraction/golden/windows/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:23: error: expected one of andOp, orOp, not, text, or string; got: "(" +[19:16] "match_any[0]": 1:23: error: expected one of andOp, orOp, not, text, or string; got: "(" 16 | processors: 17 | processor_1: 18 | type: exclude_logs > 19 | match_any: ['jsonPayload.message = ("first" OR "second")'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_function/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_function/golden/linux-gpu/error index 2b46e4fbac..8c0ba16c93 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_function/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_function/golden/linux-gpu/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:27: error: expected one of "$", ws, andOp, orOp, or dot; got: "(" +[19:16] "match_any[0]": 1:27: error: expected one of "$", ws, andOp, orOp, or dot; got: "(" 16 | processors: 17 | processor_1: 18 | type: exclude_logs > 19 | match_any: ['jsonPayload.message = func("arg")'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_function/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_function/golden/linux/error index 2b46e4fbac..8c0ba16c93 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_function/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_function/golden/linux/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:27: error: expected one of "$", ws, andOp, orOp, or dot; got: "(" +[19:16] "match_any[0]": 1:27: error: expected one of "$", ws, andOp, orOp, or dot; got: "(" 16 | processors: 17 | processor_1: 18 | type: exclude_logs > 19 | match_any: ['jsonPayload.message = func("arg")'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_function/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_function/golden/windows-2012/error index 2b46e4fbac..8c0ba16c93 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_function/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_function/golden/windows-2012/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:27: error: expected one of "$", ws, andOp, orOp, or dot; got: "(" +[19:16] "match_any[0]": 1:27: error: expected one of "$", ws, andOp, orOp, or dot; got: "(" 16 | processors: 17 | processor_1: 18 | type: exclude_logs > 19 | match_any: ['jsonPayload.message = func("arg")'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_function/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_function/golden/windows/error index 2b46e4fbac..8c0ba16c93 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_function/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_exclude_logs_unsupported_function/golden/windows/error @@ -1,9 +1,9 @@ -[19:18] "match_any[0]": 1:27: error: expected one of "$", ws, andOp, orOp, or dot; got: "(" +[19:16] "match_any[0]": 1:27: error: expected one of "$", ws, andOp, orOp, or dot; got: "(" 16 | processors: 17 | processor_1: 18 | type: exclude_logs > 19 | match_any: ['jsonPayload.message = func("arg")'] - ^ + ^ 20 | service: 21 | pipelines: 22 | default_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_invalid_destination/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_invalid_destination/golden/linux-gpu/error index df33201e96..53d3073da5 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_invalid_destination/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_invalid_destination/golden/linux-gpu/error @@ -1,9 +1,9 @@ -[20:27] "fields[notJsonPayload.foo]": 1:19: error: field "notJsonPayload.foo" not found +[19:13] "fields[notJsonPayload.foo]": 1:19: error: field "notJsonPayload.foo" not found + 16 | processors: 17 | processor_1: 18 | type: modify_fields - 19 | fields: -> 20 | notJsonPayload.foo: - ^ +> 19 | fields: + ^ + 20 | notJsonPayload.foo: 21 | static_value: bar - 22 | service: - 23 | pipelines: \ No newline at end of file + 22 | service: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_invalid_destination/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_invalid_destination/golden/linux/error index df33201e96..53d3073da5 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_invalid_destination/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_invalid_destination/golden/linux/error @@ -1,9 +1,9 @@ -[20:27] "fields[notJsonPayload.foo]": 1:19: error: field "notJsonPayload.foo" not found +[19:13] "fields[notJsonPayload.foo]": 1:19: error: field "notJsonPayload.foo" not found + 16 | processors: 17 | processor_1: 18 | type: modify_fields - 19 | fields: -> 20 | notJsonPayload.foo: - ^ +> 19 | fields: + ^ + 20 | notJsonPayload.foo: 21 | static_value: bar - 22 | service: - 23 | pipelines: \ No newline at end of file + 22 | service: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_invalid_destination/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_invalid_destination/golden/windows-2012/error index df33201e96..53d3073da5 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_invalid_destination/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_invalid_destination/golden/windows-2012/error @@ -1,9 +1,9 @@ -[20:27] "fields[notJsonPayload.foo]": 1:19: error: field "notJsonPayload.foo" not found +[19:13] "fields[notJsonPayload.foo]": 1:19: error: field "notJsonPayload.foo" not found + 16 | processors: 17 | processor_1: 18 | type: modify_fields - 19 | fields: -> 20 | notJsonPayload.foo: - ^ +> 19 | fields: + ^ + 20 | notJsonPayload.foo: 21 | static_value: bar - 22 | service: - 23 | pipelines: \ No newline at end of file + 22 | service: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_invalid_destination/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_invalid_destination/golden/windows/error index df33201e96..53d3073da5 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_invalid_destination/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_invalid_destination/golden/windows/error @@ -1,9 +1,9 @@ -[20:27] "fields[notJsonPayload.foo]": 1:19: error: field "notJsonPayload.foo" not found +[19:13] "fields[notJsonPayload.foo]": 1:19: error: field "notJsonPayload.foo" not found + 16 | processors: 17 | processor_1: 18 | type: modify_fields - 19 | fields: -> 20 | notJsonPayload.foo: - ^ +> 19 | fields: + ^ + 20 | notJsonPayload.foo: 21 | static_value: bar - 22 | service: - 23 | pipelines: \ No newline at end of file + 22 | service: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_readonly_field/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_readonly_field/golden/linux-gpu/error index 57d986667b..72299277a5 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_readonly_field/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_readonly_field/golden/linux-gpu/error @@ -1,9 +1,9 @@ -[20:63] "labels.\"logging.googleapis.com/instrumentation_source\"" is not a writable field +[19:13] "labels.\"logging.googleapis.com/instrumentation_source\"" is not a writable field + 16 | processors: 17 | processor_1: 18 | type: modify_fields - 19 | fields: -> 20 | labels."logging.googleapis.com/instrumentation_source": - ^ +> 19 | fields: + ^ + 20 | labels."logging.googleapis.com/instrumentation_source": 21 | static_value: hello - 22 | service: - 23 | pipelines: \ No newline at end of file + 22 | service: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_readonly_field/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_readonly_field/golden/linux/error index 57d986667b..72299277a5 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_readonly_field/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_readonly_field/golden/linux/error @@ -1,9 +1,9 @@ -[20:63] "labels.\"logging.googleapis.com/instrumentation_source\"" is not a writable field +[19:13] "labels.\"logging.googleapis.com/instrumentation_source\"" is not a writable field + 16 | processors: 17 | processor_1: 18 | type: modify_fields - 19 | fields: -> 20 | labels."logging.googleapis.com/instrumentation_source": - ^ +> 19 | fields: + ^ + 20 | labels."logging.googleapis.com/instrumentation_source": 21 | static_value: hello - 22 | service: - 23 | pipelines: \ No newline at end of file + 22 | service: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_readonly_field/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_readonly_field/golden/windows-2012/error index 57d986667b..72299277a5 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_readonly_field/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_readonly_field/golden/windows-2012/error @@ -1,9 +1,9 @@ -[20:63] "labels.\"logging.googleapis.com/instrumentation_source\"" is not a writable field +[19:13] "labels.\"logging.googleapis.com/instrumentation_source\"" is not a writable field + 16 | processors: 17 | processor_1: 18 | type: modify_fields - 19 | fields: -> 20 | labels."logging.googleapis.com/instrumentation_source": - ^ +> 19 | fields: + ^ + 20 | labels."logging.googleapis.com/instrumentation_source": 21 | static_value: hello - 22 | service: - 23 | pipelines: \ No newline at end of file + 22 | service: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_readonly_field/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_readonly_field/golden/windows/error index 57d986667b..72299277a5 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_readonly_field/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_readonly_field/golden/windows/error @@ -1,9 +1,9 @@ -[20:63] "labels.\"logging.googleapis.com/instrumentation_source\"" is not a writable field +[19:13] "labels.\"logging.googleapis.com/instrumentation_source\"" is not a writable field + 16 | processors: 17 | processor_1: 18 | type: modify_fields - 19 | fields: -> 20 | labels."logging.googleapis.com/instrumentation_source": - ^ +> 19 | fields: + ^ + 20 | labels."logging.googleapis.com/instrumentation_source": 21 | static_value: hello - 22 | service: - 23 | pipelines: \ No newline at end of file + 22 | service: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_repeated_field/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_repeated_field/golden/linux-gpu/error index 909d6aed32..d16c846a07 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_repeated_field/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_repeated_field/golden/linux-gpu/error @@ -1,10 +1,9 @@ -[20:24] "jsonPayload.\"foo\"" specified multiple times,"jsonPayload.foo" specified multiple times +[19:13] "jsonPayload.\"foo\"" specified multiple times,"jsonPayload.foo" specified multiple times + 16 | processors: 17 | processor_1: 18 | type: modify_fields - 19 | fields: -> 20 | jsonPayload.foo: - ^ +> 19 | fields: + ^ + 20 | jsonPayload.foo: 21 | type: integer - 22 | jsonPayload."foo": - 23 | static_value: hello - 24 | \ No newline at end of file + 22 | jsonPayload."foo": \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_repeated_field/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_repeated_field/golden/linux/error index 909d6aed32..d16c846a07 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_repeated_field/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_repeated_field/golden/linux/error @@ -1,10 +1,9 @@ -[20:24] "jsonPayload.\"foo\"" specified multiple times,"jsonPayload.foo" specified multiple times +[19:13] "jsonPayload.\"foo\"" specified multiple times,"jsonPayload.foo" specified multiple times + 16 | processors: 17 | processor_1: 18 | type: modify_fields - 19 | fields: -> 20 | jsonPayload.foo: - ^ +> 19 | fields: + ^ + 20 | jsonPayload.foo: 21 | type: integer - 22 | jsonPayload."foo": - 23 | static_value: hello - 24 | \ No newline at end of file + 22 | jsonPayload."foo": \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_repeated_field/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_repeated_field/golden/windows-2012/error index 909d6aed32..d16c846a07 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_repeated_field/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_repeated_field/golden/windows-2012/error @@ -1,10 +1,9 @@ -[20:24] "jsonPayload.\"foo\"" specified multiple times,"jsonPayload.foo" specified multiple times +[19:13] "jsonPayload.\"foo\"" specified multiple times,"jsonPayload.foo" specified multiple times + 16 | processors: 17 | processor_1: 18 | type: modify_fields - 19 | fields: -> 20 | jsonPayload.foo: - ^ +> 19 | fields: + ^ + 20 | jsonPayload.foo: 21 | type: integer - 22 | jsonPayload."foo": - 23 | static_value: hello - 24 | \ No newline at end of file + 22 | jsonPayload."foo": \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_repeated_field/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_repeated_field/golden/windows/error index 909d6aed32..d16c846a07 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_repeated_field/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_modify_fields_repeated_field/golden/windows/error @@ -1,10 +1,9 @@ -[20:24] "jsonPayload.\"foo\"" specified multiple times,"jsonPayload.foo" specified multiple times +[19:13] "jsonPayload.\"foo\"" specified multiple times,"jsonPayload.foo" specified multiple times + 16 | processors: 17 | processor_1: 18 | type: modify_fields - 19 | fields: -> 20 | jsonPayload.foo: - ^ +> 19 | fields: + ^ + 20 | jsonPayload.foo: 21 | type: integer - 22 | jsonPayload."foo": - 23 | static_value: hello - 24 | \ No newline at end of file + 22 | jsonPayload."foo": \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_reserved_id_prefix/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-processor_reserved_id_prefix/golden/linux-gpu/error index a597877a45..43313440b7 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_reserved_id_prefix/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_reserved_id_prefix/golden/linux-gpu/error @@ -1,9 +1,10 @@ -[23:20] "processors[lib:processor_1]" must not start with "lib:" +[22:13] "processors[lib:processor_1]" must not start with "lib:" + 19 | include_paths: 20 | - /var/log/messages 21 | - /var/log/syslog - 22 | processors: -> 23 | lib:processor_1: - ^ +> 22 | processors: + ^ + 23 | lib:processor_1: 24 | type: parse_json 25 | field: key_1 - 26 | service: \ No newline at end of file + 26 | \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_reserved_id_prefix/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-processor_reserved_id_prefix/golden/linux/error index a597877a45..43313440b7 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_reserved_id_prefix/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_reserved_id_prefix/golden/linux/error @@ -1,9 +1,10 @@ -[23:20] "processors[lib:processor_1]" must not start with "lib:" +[22:13] "processors[lib:processor_1]" must not start with "lib:" + 19 | include_paths: 20 | - /var/log/messages 21 | - /var/log/syslog - 22 | processors: -> 23 | lib:processor_1: - ^ +> 22 | processors: + ^ + 23 | lib:processor_1: 24 | type: parse_json 25 | field: key_1 - 26 | service: \ No newline at end of file + 26 | \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_reserved_id_prefix/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-processor_reserved_id_prefix/golden/windows-2012/error index a597877a45..43313440b7 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_reserved_id_prefix/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_reserved_id_prefix/golden/windows-2012/error @@ -1,9 +1,10 @@ -[23:20] "processors[lib:processor_1]" must not start with "lib:" +[22:13] "processors[lib:processor_1]" must not start with "lib:" + 19 | include_paths: 20 | - /var/log/messages 21 | - /var/log/syslog - 22 | processors: -> 23 | lib:processor_1: - ^ +> 22 | processors: + ^ + 23 | lib:processor_1: 24 | type: parse_json 25 | field: key_1 - 26 | service: \ No newline at end of file + 26 | \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_reserved_id_prefix/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-processor_reserved_id_prefix/golden/windows/error index a597877a45..43313440b7 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_reserved_id_prefix/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_reserved_id_prefix/golden/windows/error @@ -1,9 +1,10 @@ -[23:20] "processors[lib:processor_1]" must not start with "lib:" +[22:13] "processors[lib:processor_1]" must not start with "lib:" + 19 | include_paths: 20 | - /var/log/messages 21 | - /var/log/syslog - 22 | processors: -> 23 | lib:processor_1: - ^ +> 22 | processors: + ^ + 23 | lib:processor_1: 24 | type: parse_json 25 | field: key_1 - 26 | service: \ No newline at end of file + 26 | \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty/golden/linux-gpu/error index 48edf3a526..8009c12133 100644 --- a/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty/golden/linux-gpu/error @@ -1,5 +1,5 @@ [19:21] "include_paths" is a required field -> 19 | null +> 19 | null ^ 20 | service: 21 | pipelines: diff --git a/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty/golden/linux/error index 48edf3a526..8009c12133 100644 --- a/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty/golden/linux/error @@ -1,5 +1,5 @@ [19:21] "include_paths" is a required field -> 19 | null +> 19 | null ^ 20 | service: 21 | pipelines: diff --git a/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty/golden/windows-2012/error index 48edf3a526..8009c12133 100644 --- a/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty/golden/windows-2012/error @@ -1,5 +1,5 @@ [19:21] "include_paths" is a required field -> 19 | null +> 19 | null ^ 20 | service: 21 | pipelines: diff --git a/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty/golden/windows/error index 48edf3a526..8009c12133 100644 --- a/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty/golden/windows/error @@ -1,5 +1,5 @@ [19:21] "include_paths" is a required field -> 19 | null +> 19 | null ^ 20 | service: 21 | pipelines: diff --git a/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty_list/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty_list/golden/linux-gpu/error index 4e84d03702..3cb14dab5e 100644 --- a/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty_list/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty_list/golden/linux-gpu/error @@ -1,9 +1,9 @@ -[19:22] "include_paths" must be a minimum of 1 +[19:20] "include_paths" must be a minimum of 1 16 | receivers: 17 | receiver_1: 18 | type: files > 19 | include_paths: [] - ^ + ^ 20 | service: 21 | pipelines: 22 | test_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty_list/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty_list/golden/linux/error index 4e84d03702..3cb14dab5e 100644 --- a/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty_list/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty_list/golden/linux/error @@ -1,9 +1,9 @@ -[19:22] "include_paths" must be a minimum of 1 +[19:20] "include_paths" must be a minimum of 1 16 | receivers: 17 | receiver_1: 18 | type: files > 19 | include_paths: [] - ^ + ^ 20 | service: 21 | pipelines: 22 | test_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty_list/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty_list/golden/windows-2012/error index 4e84d03702..3cb14dab5e 100644 --- a/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty_list/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty_list/golden/windows-2012/error @@ -1,9 +1,9 @@ -[19:22] "include_paths" must be a minimum of 1 +[19:20] "include_paths" must be a minimum of 1 16 | receivers: 17 | receiver_1: 18 | type: files > 19 | include_paths: [] - ^ + ^ 20 | service: 21 | pipelines: 22 | test_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty_list/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty_list/golden/windows/error index 4e84d03702..3cb14dab5e 100644 --- a/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty_list/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-receiver_files_type_invalid_parameter_include_paths_is_empty_list/golden/windows/error @@ -1,9 +1,9 @@ -[19:22] "include_paths" must be a minimum of 1 +[19:20] "include_paths" must be a minimum of 1 16 | receivers: 17 | receiver_1: 18 | type: files > 19 | include_paths: [] - ^ + ^ 20 | service: 21 | pipelines: 22 | test_pipeline: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-receiver_reserved_id_prefix/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-receiver_reserved_id_prefix/golden/linux-gpu/error index 6458f8f621..a6144b9772 100644 --- a/confgenerator/testdata/goldens/invalid-logging-receiver_reserved_id_prefix/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-receiver_reserved_id_prefix/golden/linux-gpu/error @@ -1,9 +1,9 @@ -[17:19] "receivers[lib:receiver_1]" must not start with "lib:" +[16:12] "receivers[lib:receiver_1]" must not start with "lib:" + 13 | # limitations under the License. + 14 | 15 | logging: - 16 | receivers: -> 17 | lib:receiver_1: - ^ +> 16 | receivers: + ^ + 17 | lib:receiver_1: 18 | type: files - 19 | include_paths: - 20 | - /var/log/user-log - 21 | \ No newline at end of file + 19 | include_paths: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-receiver_reserved_id_prefix/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-receiver_reserved_id_prefix/golden/linux/error index 6458f8f621..a6144b9772 100644 --- a/confgenerator/testdata/goldens/invalid-logging-receiver_reserved_id_prefix/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-receiver_reserved_id_prefix/golden/linux/error @@ -1,9 +1,9 @@ -[17:19] "receivers[lib:receiver_1]" must not start with "lib:" +[16:12] "receivers[lib:receiver_1]" must not start with "lib:" + 13 | # limitations under the License. + 14 | 15 | logging: - 16 | receivers: -> 17 | lib:receiver_1: - ^ +> 16 | receivers: + ^ + 17 | lib:receiver_1: 18 | type: files - 19 | include_paths: - 20 | - /var/log/user-log - 21 | \ No newline at end of file + 19 | include_paths: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-receiver_reserved_id_prefix/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-receiver_reserved_id_prefix/golden/windows-2012/error index 6458f8f621..a6144b9772 100644 --- a/confgenerator/testdata/goldens/invalid-logging-receiver_reserved_id_prefix/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-receiver_reserved_id_prefix/golden/windows-2012/error @@ -1,9 +1,9 @@ -[17:19] "receivers[lib:receiver_1]" must not start with "lib:" +[16:12] "receivers[lib:receiver_1]" must not start with "lib:" + 13 | # limitations under the License. + 14 | 15 | logging: - 16 | receivers: -> 17 | lib:receiver_1: - ^ +> 16 | receivers: + ^ + 17 | lib:receiver_1: 18 | type: files - 19 | include_paths: - 20 | - /var/log/user-log - 21 | \ No newline at end of file + 19 | include_paths: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-receiver_reserved_id_prefix/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-receiver_reserved_id_prefix/golden/windows/error index 6458f8f621..a6144b9772 100644 --- a/confgenerator/testdata/goldens/invalid-logging-receiver_reserved_id_prefix/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-receiver_reserved_id_prefix/golden/windows/error @@ -1,9 +1,9 @@ -[17:19] "receivers[lib:receiver_1]" must not start with "lib:" +[16:12] "receivers[lib:receiver_1]" must not start with "lib:" + 13 | # limitations under the License. + 14 | 15 | logging: - 16 | receivers: -> 17 | lib:receiver_1: - ^ +> 16 | receivers: + ^ + 17 | lib:receiver_1: 18 | type: files - 19 | include_paths: - 20 | - /var/log/user-log - 21 | \ No newline at end of file + 19 | include_paths: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-metrics-pipeline_reserved_id_prefix/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-metrics-pipeline_reserved_id_prefix/golden/linux-gpu/error index a5973e81f9..20aec431f8 100644 --- a/confgenerator/testdata/goldens/invalid-metrics-pipeline_reserved_id_prefix/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-metrics-pipeline_reserved_id_prefix/golden/linux-gpu/error @@ -1,7 +1,8 @@ -[22:21] "pipelines[lib:pipeline_1]" must not start with "lib:" +[21:14] "pipelines[lib:pipeline_1]" must not start with "lib:" + 18 | type: hostmetrics 19 | collection_interval: 60s 20 | service: - 21 | pipelines: -> 22 | lib:pipeline_1: - ^ +> 21 | pipelines: + ^ + 22 | lib:pipeline_1: 23 | receivers: [hostmetrics] \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-metrics-pipeline_reserved_id_prefix/golden/linux/error b/confgenerator/testdata/goldens/invalid-metrics-pipeline_reserved_id_prefix/golden/linux/error index a5973e81f9..20aec431f8 100644 --- a/confgenerator/testdata/goldens/invalid-metrics-pipeline_reserved_id_prefix/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-metrics-pipeline_reserved_id_prefix/golden/linux/error @@ -1,7 +1,8 @@ -[22:21] "pipelines[lib:pipeline_1]" must not start with "lib:" +[21:14] "pipelines[lib:pipeline_1]" must not start with "lib:" + 18 | type: hostmetrics 19 | collection_interval: 60s 20 | service: - 21 | pipelines: -> 22 | lib:pipeline_1: - ^ +> 21 | pipelines: + ^ + 22 | lib:pipeline_1: 23 | receivers: [hostmetrics] \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-metrics-pipeline_reserved_id_prefix/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-metrics-pipeline_reserved_id_prefix/golden/windows-2012/error index a5973e81f9..20aec431f8 100644 --- a/confgenerator/testdata/goldens/invalid-metrics-pipeline_reserved_id_prefix/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-metrics-pipeline_reserved_id_prefix/golden/windows-2012/error @@ -1,7 +1,8 @@ -[22:21] "pipelines[lib:pipeline_1]" must not start with "lib:" +[21:14] "pipelines[lib:pipeline_1]" must not start with "lib:" + 18 | type: hostmetrics 19 | collection_interval: 60s 20 | service: - 21 | pipelines: -> 22 | lib:pipeline_1: - ^ +> 21 | pipelines: + ^ + 22 | lib:pipeline_1: 23 | receivers: [hostmetrics] \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-metrics-pipeline_reserved_id_prefix/golden/windows/error b/confgenerator/testdata/goldens/invalid-metrics-pipeline_reserved_id_prefix/golden/windows/error index a5973e81f9..20aec431f8 100644 --- a/confgenerator/testdata/goldens/invalid-metrics-pipeline_reserved_id_prefix/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-metrics-pipeline_reserved_id_prefix/golden/windows/error @@ -1,7 +1,8 @@ -[22:21] "pipelines[lib:pipeline_1]" must not start with "lib:" +[21:14] "pipelines[lib:pipeline_1]" must not start with "lib:" + 18 | type: hostmetrics 19 | collection_interval: 60s 20 | service: - 21 | pipelines: -> 22 | lib:pipeline_1: - ^ +> 21 | pipelines: + ^ + 22 | lib:pipeline_1: 23 | receivers: [hostmetrics] \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-metrics-receiver_reserved_id_prefix/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-metrics-receiver_reserved_id_prefix/golden/linux-gpu/error index fd8da5cbca..df96aa2236 100644 --- a/confgenerator/testdata/goldens/invalid-metrics-receiver_reserved_id_prefix/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-metrics-receiver_reserved_id_prefix/golden/linux-gpu/error @@ -1,8 +1,10 @@ -[17:19] "receivers[lib:receiver_1]" must not start with "lib:" +[16:12] "receivers[lib:receiver_1]" must not start with "lib:" + 13 | # limitations under the License. + 14 | 15 | metrics: - 16 | receivers: -> 17 | lib:receiver_1: - ^ +> 16 | receivers: + ^ + 17 | lib:receiver_1: 18 | type: hostmetrics 19 | collection_interval: 60s - 20 | service: \ No newline at end of file + 20 | \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-metrics-receiver_reserved_id_prefix/golden/linux/error b/confgenerator/testdata/goldens/invalid-metrics-receiver_reserved_id_prefix/golden/linux/error index fd8da5cbca..df96aa2236 100644 --- a/confgenerator/testdata/goldens/invalid-metrics-receiver_reserved_id_prefix/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-metrics-receiver_reserved_id_prefix/golden/linux/error @@ -1,8 +1,10 @@ -[17:19] "receivers[lib:receiver_1]" must not start with "lib:" +[16:12] "receivers[lib:receiver_1]" must not start with "lib:" + 13 | # limitations under the License. + 14 | 15 | metrics: - 16 | receivers: -> 17 | lib:receiver_1: - ^ +> 16 | receivers: + ^ + 17 | lib:receiver_1: 18 | type: hostmetrics 19 | collection_interval: 60s - 20 | service: \ No newline at end of file + 20 | \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-metrics-receiver_reserved_id_prefix/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-metrics-receiver_reserved_id_prefix/golden/windows-2012/error index fd8da5cbca..df96aa2236 100644 --- a/confgenerator/testdata/goldens/invalid-metrics-receiver_reserved_id_prefix/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-metrics-receiver_reserved_id_prefix/golden/windows-2012/error @@ -1,8 +1,10 @@ -[17:19] "receivers[lib:receiver_1]" must not start with "lib:" +[16:12] "receivers[lib:receiver_1]" must not start with "lib:" + 13 | # limitations under the License. + 14 | 15 | metrics: - 16 | receivers: -> 17 | lib:receiver_1: - ^ +> 16 | receivers: + ^ + 17 | lib:receiver_1: 18 | type: hostmetrics 19 | collection_interval: 60s - 20 | service: \ No newline at end of file + 20 | \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-metrics-receiver_reserved_id_prefix/golden/windows/error b/confgenerator/testdata/goldens/invalid-metrics-receiver_reserved_id_prefix/golden/windows/error index fd8da5cbca..df96aa2236 100644 --- a/confgenerator/testdata/goldens/invalid-metrics-receiver_reserved_id_prefix/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-metrics-receiver_reserved_id_prefix/golden/windows/error @@ -1,8 +1,10 @@ -[17:19] "receivers[lib:receiver_1]" must not start with "lib:" +[16:12] "receivers[lib:receiver_1]" must not start with "lib:" + 13 | # limitations under the License. + 14 | 15 | metrics: - 16 | receivers: -> 17 | lib:receiver_1: - ^ +> 16 | receivers: + ^ + 17 | lib:receiver_1: 18 | type: hostmetrics 19 | collection_interval: 60s - 20 | service: \ No newline at end of file + 20 | \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_empty_channels/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_empty_channels/golden/windows-2012/error index f909d7216e..3f36ef8827 100644 --- a/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_empty_channels/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_empty_channels/golden/windows-2012/error @@ -1,9 +1,9 @@ -[19:17] "channels" must contain at least one channel when "receiver_version" is 2 or higher +[19:15] "channels" must contain at least one channel when "receiver_version" is 2 or higher 16 | receivers: 17 | receiver_1: 18 | type: windows_event_log > 19 | channels: [] - ^ + ^ 20 | receiver_version: 2 21 | service: 22 | pipelines: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_empty_channels/golden/windows/error b/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_empty_channels/golden/windows/error index f909d7216e..3f36ef8827 100644 --- a/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_empty_channels/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_empty_channels/golden/windows/error @@ -1,9 +1,9 @@ -[19:17] "channels" must contain at least one channel when "receiver_version" is 2 or higher +[19:15] "channels" must contain at least one channel when "receiver_version" is 2 or higher 16 | receivers: 17 | receiver_1: 18 | type: windows_event_log > 19 | channels: [] - ^ + ^ 20 | receiver_version: 2 21 | service: 22 | pipelines: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_unsupported_channel_characters/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_unsupported_channel_characters/golden/windows-2012/error index c4aff9c86b..00b7bd74ba 100644 --- a/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_unsupported_channel_characters/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_unsupported_channel_characters/golden/windows-2012/error @@ -1,9 +1,9 @@ -[21:7] "channels[0]" (a,b) contains an invalid character: , +[20:15] "channels[0]" (a,b) contains an invalid character: , + 17 | receiver_1: 18 | type: windows_event_log 19 | receiver_version: 2 - 20 | channels: -> 21 | - a,b - ^ +> 20 | channels: + ^ + 21 | - a,b 22 | service: - 23 | pipelines: - 24 | default_pipeline: \ No newline at end of file + 23 | pipelines: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_unsupported_channel_characters/golden/windows/error b/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_unsupported_channel_characters/golden/windows/error index c4aff9c86b..00b7bd74ba 100644 --- a/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_unsupported_channel_characters/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_unsupported_channel_characters/golden/windows/error @@ -1,9 +1,9 @@ -[21:7] "channels[0]" (a,b) contains an invalid character: , +[20:15] "channels[0]" (a,b) contains an invalid character: , + 17 | receiver_1: 18 | type: windows_event_log 19 | receiver_version: 2 - 20 | channels: -> 21 | - a,b - ^ +> 20 | channels: + ^ + 21 | - a,b 22 | service: - 23 | pipelines: - 24 | default_pipeline: \ No newline at end of file + 23 | pipelines: \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_unsupported_channel_duplicates/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_unsupported_channel_duplicates/golden/windows-2012/error index da31ba6bc0..56c6df5ff0 100644 --- a/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_unsupported_channel_duplicates/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_unsupported_channel_duplicates/golden/windows-2012/error @@ -1,9 +1,10 @@ -[21:7] "channels" contains the same value more than once: application +[20:15] "channels" contains the same value more than once: application + 17 | receiver_1: 18 | type: windows_event_log 19 | receiver_version: 2 - 20 | channels: -> 21 | - Application - ^ +> 20 | channels: + ^ + 21 | - Application 22 | - System 23 | - application - 24 | service: \ No newline at end of file + 24 | \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_unsupported_channel_duplicates/golden/windows/error b/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_unsupported_channel_duplicates/golden/windows/error index da31ba6bc0..56c6df5ff0 100644 --- a/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_unsupported_channel_duplicates/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-windows-logging-receiver_windows_event_log_type_receiver_version_not1_unsupported_channel_duplicates/golden/windows/error @@ -1,9 +1,10 @@ -[21:7] "channels" contains the same value more than once: application +[20:15] "channels" contains the same value more than once: application + 17 | receiver_1: 18 | type: windows_event_log 19 | receiver_version: 2 - 20 | channels: -> 21 | - Application - ^ +> 20 | channels: + ^ + 21 | - Application 22 | - System 23 | - application - 24 | service: \ No newline at end of file + 24 | \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux-gpu/enabled_receivers_otlp.json b/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux-gpu/enabled_receivers_otlp.json deleted file mode 100644 index b936b3a79c..0000000000 --- a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux-gpu/enabled_receivers_otlp.json +++ /dev/null @@ -1 +0,0 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/ops_agent/enabled_receivers","gauge":{"dataPoints":[{"attributes":[{"key":"telemetry_type","value":{"stringValue":"metrics"}},{"key":"receiver_type","value":{"stringValue":"hostmetrics"}}],"asInt":"1"},{"attributes":[{"key":"telemetry_type","value":{"stringValue":"logs"}},{"key":"receiver_type","value":{"stringValue":"files"}}],"asInt":"2"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux-gpu/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux-gpu/feature_tracking_otlp.json deleted file mode 100644 index 5d7b2518b1..0000000000 --- a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux-gpu/feature_tracking_otlp.json +++ /dev/null @@ -1 +0,0 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:files"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:files"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"processors:parse_regex"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"processors:exclude_logs"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"processors:exclude_logs"}},{"key":"key","value":{"stringValue":"[1].match_any.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:service"}},{"key":"key","value":{"stringValue":"pipelines.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:service"}},{"key":"key","value":{"stringValue":"pipelines.[0].receivers.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:service"}},{"key":"key","value":{"stringValue":"pipelines.[0].processors.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux-gpu/features.yaml b/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux-gpu/features.yaml deleted file mode 100644 index d06a008a45..0000000000 --- a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux-gpu/features.yaml +++ /dev/null @@ -1,48 +0,0 @@ -- module: logging - feature: service:pipelines - key: default_pipeline_overridden - value: "false" -- module: metrics - feature: service:pipelines - key: default_pipeline_overridden - value: "false" -- module: global - feature: default:self_log - key: default_self_log_file_collection - value: "true" -- module: logging - feature: service:otel_logging - key: otel_logging_supported_config - value: "true" -- module: logging - feature: receivers:files - key: "[0].enabled" - value: "true" -- module: logging - feature: receivers:files - key: "[0].include_paths.__length" - value: "1" -- module: logging - feature: processors:parse_regex - key: "[0].enabled" - value: "true" -- module: logging - feature: processors:exclude_logs - key: "[1].enabled" - value: "true" -- module: logging - feature: processors:exclude_logs - key: "[1].match_any.__length" - value: "1" -- module: logging - feature: service:service - key: pipelines.__length - value: "1" -- module: logging - feature: service:service - key: pipelines.[0].receivers.__length - value: "1" -- module: logging - feature: service:service - key: pipelines.[0].processors.__length - value: "2" diff --git a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux-gpu/otel.yaml b/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux-gpu/otel.yaml deleted file mode 100644 index 89b71a404f..0000000000 --- a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux-gpu/otel.yaml +++ /dev/null @@ -1,1144 +0,0 @@ -exporters: - otlp_grpc/otlp_logs: - auth: - authenticator: googleclientauth - balancer_name: pick_first - endpoint: telemetry.googleapis.com:443 - sending_queue: - batch: - flush_timeout: 200ms - max_size: 5000000 - min_size: 1000000 - sizer: bytes - block_on_overflow: true - enabled: true - num_consumers: 10 - queue_size: 20000000 - sizer: bytes - storage: file_storage - user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) - otlp_grpc/otlp_metrics: - auth: - authenticator: googleclientauth - balancer_name: pick_first - endpoint: telemetry.googleapis.com:443 - user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) -extensions: - file_storage: - create_directory: true - directory: file_storage - googleclientauth: {} -processors: - agentmetrics/hostmetrics_0: - blank_label_metrics: - - system.cpu.utilization - batch/otlp_grpc/otlp_metrics_metrics_2: - send_batch_max_size: 200 - send_batch_size: 200 - timeout: 200ms - filter/default__pipeline_hostmetrics_0: - metrics: - exclude: - match_type: regexp - metric_names: [] - filter/default__pipeline_hostmetrics_1_0: - metrics: - exclude: - match_type: regexp - metric_names: [] - filter/hostmetrics_1: - metrics: - exclude: - match_type: strict - metric_names: - - system.network.dropped - - system.filesystem.inodes.usage - - system.paging.faults - - system.disk.operation_time - filter/loggingmetrics_1: - metrics: - datapoint: - - metric.name == "rpc.client.call.duration_count" and (not IsMatch(datapoint.attributes["rpc.method"], "opentelemetry.proto.collector.logs.v1.LogsService/Export")) - filter/loggingmetrics_2: - metrics: - include: - match_type: strict - metric_names: - - otelcol_exporter_sent_log_records - - otelcol_exporter_send_failed_log_records - - rpc.client.call.duration_count - filter/logs_test-pipeline_logs_1: - error_mode: ignore - logs: - log_record: - - ((body != nil and body["Status"] != nil) and IsMatchRubyRegex(body["Status"], "(?i)IN")) - filter/otel_1: - metrics: - datapoint: - - metric.name == "rpc.client.call.duration_count" and (not IsMatch(datapoint.attributes["rpc.method"], "opentelemetry.proto.collector.metrics.v1.MetricsService/Export")) - filter/otel_2: - metrics: - include: - match_type: strict - metric_names: - - otelcol_process_uptime - - otelcol_process_memory_rss - - otelcol_exporter_sent_metric_points - - otelcol_exporter_send_failed_metric_points - - rpc.client.call.duration_count - interval/loggingmetrics_5: - interval: 1m - metric_start_time/otlp_grpc/otlp_metrics_metrics_1: - strategy: subtract_initial_point - metricstransform/hostmetrics_1_0: - transforms: - - action: update - include: nvml.gpu.utilization - new_name: gpu/utilization - operations: - - action: experimental_scale_value - experimental_scale: 100.0 - - action: update - include: nvml.gpu.memory.bytes_used - new_name: gpu/memory/bytes_used - - action: update - include: nvml.gpu.processes.utilization - new_name: gpu/processes/utilization - operations: - - action: experimental_scale_value - experimental_scale: 100.0 - - action: update - include: nvml.gpu.processes.max_bytes_used - new_name: gpu/processes/max_bytes_used - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - metricstransform/hostmetrics_2: - transforms: - - action: update - include: system.cpu.time - new_name: cpu/usage_time - operations: - - action: toggle_scalar_data_type - - action: update_label - label: cpu - new_label: cpu_number - - action: update_label - label: state - new_label: cpu_state - - action: update - include: system.cpu.utilization - new_name: cpu/utilization - operations: - - action: aggregate_labels - aggregation_type: mean - label_set: - - state - - blank - - action: update_label - label: blank - new_label: cpu_number - - action: update_label - label: state - new_label: cpu_state - - action: update - include: system.cpu.load_average.1m - new_name: cpu/load_1m - - action: update - include: system.cpu.load_average.5m - new_name: cpu/load_5m - - action: update - include: system.cpu.load_average.15m - new_name: cpu/load_15m - - action: update - include: system.disk.read_io - new_name: disk/read_bytes_count - - action: update - include: system.disk.write_io - new_name: disk/write_bytes_count - - action: update - include: system.disk.operations - new_name: disk/operation_count - - action: update - include: system.disk.io_time - new_name: disk/io_time - operations: - - action: experimental_scale_value - experimental_scale: 1000.0 - - action: toggle_scalar_data_type - - action: update - include: system.disk.weighted_io_time - new_name: disk/weighted_io_time - operations: - - action: experimental_scale_value - experimental_scale: 1000.0 - - action: toggle_scalar_data_type - - action: update - include: system.disk.average_operation_time - new_name: disk/operation_time - operations: - - action: experimental_scale_value - experimental_scale: 1000.0 - - action: toggle_scalar_data_type - - action: update - include: system.disk.pending_operations - new_name: disk/pending_operations - operations: - - action: toggle_scalar_data_type - - action: update - include: system.disk.merged - new_name: disk/merged_operations - - action: update - include: system.filesystem.usage - new_name: disk/bytes_used - operations: - - action: toggle_scalar_data_type - - action: aggregate_labels - aggregation_type: max - label_set: - - device - - state - - action: update - include: system.filesystem.utilization - new_name: disk/percent_used - operations: - - action: aggregate_labels - aggregation_type: max - label_set: - - device - - state - - action: update - include: system.memory.usage - new_name: memory/bytes_used - operations: - - action: toggle_scalar_data_type - - action: aggregate_label_values - aggregated_values: - - slab_reclaimable - - slab_unreclaimable - aggregation_type: sum - label: state - new_value: slab - - action: update - include: system.memory.utilization - new_name: memory/percent_used - operations: - - action: aggregate_label_values - aggregated_values: - - slab_reclaimable - - slab_unreclaimable - aggregation_type: sum - label: state - new_value: slab - - action: update - include: system.network.io - new_name: interface/traffic - operations: - - action: update_label - label: interface - new_label: device - - action: update_label - label: direction - value_actions: - - new_value: rx - value: receive - - new_value: tx - value: transmit - - action: update - include: system.network.errors - new_name: interface/errors - operations: - - action: update_label - label: interface - new_label: device - - action: update_label - label: direction - value_actions: - - new_value: rx - value: receive - - new_value: tx - value: transmit - - action: update - include: system.network.packets - new_name: interface/packets - operations: - - action: update_label - label: interface - new_label: device - - action: update_label - label: direction - value_actions: - - new_value: rx - value: receive - - new_value: tx - value: transmit - - action: update - include: system.network.connections - new_name: network/tcp_connections - operations: - - action: toggle_scalar_data_type - - action: delete_label_value - label: protocol - label_value: udp - - action: update_label - label: state - new_label: tcp_state - - action: aggregate_labels - aggregation_type: sum - label_set: - - tcp_state - - action: add_label - new_label: port - new_value: all - - action: update - include: system.processes.created - new_name: processes/fork_count - - action: update - include: system.processes.count - new_name: processes/count_by_state - operations: - - action: toggle_scalar_data_type - - action: update_label - label: status - new_label: state - - action: update - include: system.paging.usage - new_name: swap/bytes_used - operations: - - action: toggle_scalar_data_type - - action: update - include: system.paging.utilization - new_name: swap/percent_used - - action: insert - include: swap/percent_used - new_name: pagefile/percent_used - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: - - state - - action: update - include: system.paging.operations - new_name: swap/io - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: - - direction - - action: update_label - label: direction - value_actions: - - new_value: in - value: page_in - - new_value: out - value: page_out - - action: update - include: process.cpu.time - new_name: processes/cpu_time - operations: - - action: experimental_scale_value - experimental_scale: 1e+06 - - action: toggle_scalar_data_type - - action: add_label - new_label: process - new_value: all - - action: delete_label_value - label: state - label_value: wait - - action: update_label - label: state - new_label: user_or_syst - - action: update_label - label: user_or_syst - value_actions: - - new_value: syst - value: system - - action: update - include: process.disk.read_io - new_name: processes/disk/read_bytes_count - operations: - - action: add_label - new_label: process - new_value: all - - action: update - include: process.disk.write_io - new_name: processes/disk/write_bytes_count - operations: - - action: add_label - new_label: process - new_value: all - - action: update - include: process.memory.usage - new_name: processes/rss_usage - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: process - new_value: all - - action: update - include: process.memory.virtual - new_name: processes/vm_usage - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: process - new_value: all - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - metricstransform/loggingmetrics_3: - transforms: - - action: insert - include: otelcol_exporter_send_failed_log_records - new_name: agent/log_entry_retry_count - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: response_code - new_value: "400" - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - - action: update - include: rpc.client.call.duration_count - new_name: agent/request_count - operations: - - action: update_label - label: rpc.response.status_code - value_actions: - - new_value: ABORTED - value: Aborted - - new_value: ALREADY_EXISTS - value: AlreadyExists - - new_value: CANCELLED - value: Canceled - - new_value: CANCELLED - value: Cancelled - - new_value: DATA_LOSS - value: DataLoss - - new_value: DEADLINE_EXCEEDED - value: DeadlineExceeded - - new_value: DEADLINE_EXCEEDED - value: Deadline_Exceeded - - new_value: FAILED_PRECONDITION - value: FailedPrecondition - - new_value: INTERNAL - value: Internal - - new_value: INVALID_ARGUMENT - value: InvalidArgument - - new_value: NOT_FOUND - value: NotFound - - new_value: OK - value: OK - - new_value: OUT_OF_RANGE - value: OutOfRange - - new_value: PERMISSION_DENIED - value: PermissionDenied - - new_value: RESOURCE_EXHAUSTED - value: ResourceExhausted - - new_value: UNKNOWN - value: Shutdown - - new_value: UNAUTHENTICATED - value: Unauthenticated - - new_value: UNAVAILABLE - value: Unavailable - - new_value: UNIMPLEMENTED - value: Unimplemented - - new_value: UNKNOWN - value: Unknown - - new_value: CANCELLED - value: canceled - - new_value: CANCELLED - value: cancelled - - new_value: DEADLINE_EXCEEDED - value: deadline_exceeded - - new_value: UNKNOWN - value: shutdown - - action: update_label - label: rpc.response.status_code - new_label: response_code - - action: update_label - label: response_code - value_actions: - - new_value: "409" - value: ABORTED - - new_value: "409" - value: ALREADY_EXISTS - - new_value: "499" - value: CANCELLED - - new_value: "500" - value: DATA_LOSS - - new_value: "504" - value: DEADLINE_EXCEEDED - - new_value: "400" - value: FAILED_PRECONDITION - - new_value: "500" - value: INTERNAL - - new_value: "400" - value: INVALID_ARGUMENT - - new_value: "404" - value: NOT_FOUND - - new_value: "200" - value: OK - - new_value: "400" - value: OUT_OF_RANGE - - new_value: "403" - value: PERMISSION_DENIED - - new_value: "429" - value: RESOURCE_EXHAUSTED - - new_value: "401" - value: UNAUTHENTICATED - - new_value: "503" - value: UNAVAILABLE - - new_value: "501" - value: UNIMPLEMENTED - - new_value: "500" - value: UNKNOWN - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - - action: update - include: otelcol_exporter_sent_log_records - new_name: agent/log_entry_count - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: response_code - new_value: "200" - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - - action: update - include: otelcol_exporter_send_failed_log_records - new_name: agent/log_entry_count - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: response_code - new_value: "400" - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - - action: combine - include: ^agent/log_entry_count$ - match_type: regexp - new_name: agent/log_entry_count - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - submatch_case: lower - metricstransform/loggingmetrics_6: - transforms: - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - metricstransform/otel_3: - transforms: - - action: update - include: otelcol_process_uptime - new_name: agent/uptime - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: version - new_value: google-cloud-ops-agent-metrics/latest-build_distro - - action: aggregate_labels - aggregation_type: sum - label_set: - - version - - action: update - include: otelcol_process_memory_rss - new_name: agent/memory_usage - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: [] - - action: update - include: rpc.client.call.duration_count - new_name: agent/api_request_count - operations: - - action: update_label - label: rpc.response.status_code - value_actions: - - new_value: ABORTED - value: Aborted - - new_value: ALREADY_EXISTS - value: AlreadyExists - - new_value: CANCELLED - value: Canceled - - new_value: CANCELLED - value: Cancelled - - new_value: DATA_LOSS - value: DataLoss - - new_value: DEADLINE_EXCEEDED - value: DeadlineExceeded - - new_value: DEADLINE_EXCEEDED - value: Deadline_Exceeded - - new_value: FAILED_PRECONDITION - value: FailedPrecondition - - new_value: INTERNAL - value: Internal - - new_value: INVALID_ARGUMENT - value: InvalidArgument - - new_value: NOT_FOUND - value: NotFound - - new_value: OK - value: OK - - new_value: OUT_OF_RANGE - value: OutOfRange - - new_value: PERMISSION_DENIED - value: PermissionDenied - - new_value: RESOURCE_EXHAUSTED - value: ResourceExhausted - - new_value: UNKNOWN - value: Shutdown - - new_value: UNAUTHENTICATED - value: Unauthenticated - - new_value: UNAVAILABLE - value: Unavailable - - new_value: UNIMPLEMENTED - value: Unimplemented - - new_value: UNKNOWN - value: Unknown - - new_value: CANCELLED - value: canceled - - new_value: CANCELLED - value: cancelled - - new_value: DEADLINE_EXCEEDED - value: deadline_exceeded - - new_value: UNKNOWN - value: shutdown - - action: update_label - label: rpc.response.status_code - new_label: state - - action: aggregate_labels - aggregation_type: sum - label_set: - - state - - action: update - include: otelcol_exporter_sent_metric_points - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: status - new_value: OK - - action: aggregate_labels - aggregation_type: sum - label_set: - - status - - action: update - include: otelcol_exporter_send_failed_metric_points - operations: - - action: toggle_scalar_data_type - - action: update_label - label: error.type - new_label: status - - action: update_label - label: status - value_actions: - - new_value: ABORTED - value: Aborted - - new_value: ALREADY_EXISTS - value: AlreadyExists - - new_value: CANCELLED - value: Canceled - - new_value: CANCELLED - value: Cancelled - - new_value: DATA_LOSS - value: DataLoss - - new_value: DEADLINE_EXCEEDED - value: DeadlineExceeded - - new_value: DEADLINE_EXCEEDED - value: Deadline_Exceeded - - new_value: FAILED_PRECONDITION - value: FailedPrecondition - - new_value: INTERNAL - value: Internal - - new_value: INVALID_ARGUMENT - value: InvalidArgument - - new_value: NOT_FOUND - value: NotFound - - new_value: OK - value: OK - - new_value: OUT_OF_RANGE - value: OutOfRange - - new_value: PERMISSION_DENIED - value: PermissionDenied - - new_value: RESOURCE_EXHAUSTED - value: ResourceExhausted - - new_value: UNKNOWN - value: Shutdown - - new_value: UNAUTHENTICATED - value: Unauthenticated - - new_value: UNAVAILABLE - value: Unavailable - - new_value: UNIMPLEMENTED - value: Unimplemented - - new_value: UNKNOWN - value: Unknown - - new_value: CANCELLED - value: canceled - - new_value: CANCELLED - value: cancelled - - new_value: DEADLINE_EXCEEDED - value: deadline_exceeded - - new_value: UNKNOWN - value: shutdown - - action: aggregate_labels - aggregation_type: sum - label_set: - - status - - action: combine - include: otelcol_exporter_sent_metric_points|otelcol_exporter_send_failed_metric_points - match_type: regexp - new_name: agent/monitoring/point_count - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: - - status - submatch_case: lower - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - resource/otlp_grpc/otlp_logs_logs_0: - attributes: - - action: insert - key: gcp.project_id - value: test-project - resource/otlp_grpc/otlp_logs_logs_1: - attributes: - - action: insert - key: gcp.use_legacy_mapping - value: "true" - resource/otlp_grpc/otlp_metrics_metrics_0: - attributes: - - action: insert - key: gcp.project_id - value: test-project - resourcedetection/_global_0: - detectors: - - gcp - transform/agent_prometheus_0: - metric_statements: - - context: resource - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.version") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "server.port") - - delete_key(attributes, "url.scheme") - transform/agent_prometheus_1: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/agent_prometheus_2: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/hostmetrics_1_1: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/hostmetrics_1_2: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/hostmetrics_3: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/hostmetrics_4: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/loggingmetrics_0: - error_mode: ignore - metric_statements: - - context: metric - statements: - - extract_count_metric(true) where name == "rpc.client.call.duration" - transform/loggingmetrics_4: - metric_statements: - - context: metric - statements: - - set(unit, "1") - transform/logs_0: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], attributes["compute.googleapis.com/instance_group_manager/name"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/name"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], attributes["compute.googleapis.com/instance_group_manager/zone"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/zone"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], attributes["compute.googleapis.com/resource_name"]) where (attributes != nil and attributes["compute.googleapis.com/resource_name"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], attributes["gcp.log_name"]) where (attributes != nil and attributes["gcp.log_name"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(cache["value"], "test-mig") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(cache["value"], "test-zone") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/zone"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(attributes["compute.googleapis.com/resource_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], "logs") where cache["value"] == nil - - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - transform/logs_test-pipeline_logs_0: - error_mode: ignore - log_statements: - - context: log - statements: - - "set(cache[\"__parsed_regex\"], ExtractPatternsRubyRegex(body[\"message\"], \"^(?\\\\d+:\\\\d+:\\\\d+) \\\\((?.*)\\\\) (?IN|OUT|DENIED): \\\"(?.*)\\\" (?.*)\\\\@(?[\\\\w\\\\d\\\\-Â\\u00a0]+)[^ ]* (?
.*)$\", true)) where ((body != nil and body[\"message\"] != nil) and IsMatchRubyRegex(body[\"message\"], \"^(?\\\\d+:\\\\d+:\\\\d+) \\\\((?.*)\\\\) (?IN|OUT|DENIED): \\\"(?.*)\\\" (?.*)\\\\@(?[\\\\w\\\\d\\\\-Â\\u00a0]+)[^ ]* (?
.*)$\"))" - - delete_key(body, "message") where ((body != nil and body["message"] != nil) and (cache != nil and cache["__parsed_regex"] != nil)) - - merge_maps(body, cache["__parsed_regex"], "upsert") where (cache != nil and cache["__parsed_regex"] != nil) - - delete_key(cache, "__parsed_regex") where (cache != nil and cache["__parsed_regex"] != nil) - - set(cache["__time_valid"], false) - - set(cache["__time_valid"], true) where ((body != nil and body["LogTimeStamp"] != nil) and Time(body["LogTimeStamp"], "%H:%M:%S") != nil) - - set(time, Time(body["LogTimeStamp"], "%H:%M:%S")) where cache["__time_valid"] == true - - delete_key(body, "LogTimeStamp") where ((body != nil and body["LogTimeStamp"] != nil) and cache["__time_valid"] == true) - - merge_maps(attributes, body["logging.googleapis.com/labels"], "upsert") where body["logging.googleapis.com/labels"] != nil - - delete_key(body, "logging.googleapis.com/labels") where (body != nil and body["logging.googleapis.com/labels"] != nil) - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/httpRequest"]) where (body != nil and body["logging.googleapis.com/httpRequest"] != nil) - - delete_key(body, "logging.googleapis.com/httpRequest") where (body != nil and body["logging.googleapis.com/httpRequest"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(attributes["gcp.http_request"], cache["value"]) where (cache != nil and cache["value"] != nil) - - set(attributes["gcp.http_request"]["status"], Int(attributes["gcp.http_request"]["status"])) where attributes["gcp.http_request"]["status"] != nil - - set(attributes["gcp.http_request"]["responseSize"], Int(attributes["gcp.http_request"]["responseSize"])) where attributes["gcp.http_request"]["responseSize"] != nil - - set(attributes["gcp.http_request"]["requestSize"], Int(attributes["gcp.http_request"]["requestSize"])) where attributes["gcp.http_request"]["requestSize"] != nil - - set(attributes["gcp.http_request"]["cacheFillBytes"], Int(attributes["gcp.http_request"]["cacheFillBytes"])) where attributes["gcp.http_request"]["cacheFillBytes"] != nil - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/logName"]) where (body != nil and body["logging.googleapis.com/logName"] != nil) - - delete_key(body, "logging.googleapis.com/logName") where (body != nil and body["logging.googleapis.com/logName"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/severity"]) where (body != nil and body["logging.googleapis.com/severity"] != nil) - - delete_key(body, "logging.googleapis.com/severity") where (body != nil and body["logging.googleapis.com/severity"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(severity_text, cache["value"]) where (cache != nil and cache["value"] != nil) - - set(severity_number, 0) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/sourceLocation"]) where (body != nil and body["logging.googleapis.com/sourceLocation"] != nil) - - delete_key(body, "logging.googleapis.com/sourceLocation") where (body != nil and body["logging.googleapis.com/sourceLocation"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(attributes["gcp.source_location"], cache["value"]) where (cache != nil and cache["value"] != nil) - - set(attributes["gcp.source_location"]["line"], Int(attributes["gcp.source_location"]["line"])) where attributes["gcp.source_location"]["line"] != nil - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/spanId"]) where (body != nil and body["logging.googleapis.com/spanId"] != nil) - - delete_key(body, "logging.googleapis.com/spanId") where (body != nil and body["logging.googleapis.com/spanId"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(span_id.string, cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/trace"]) where (body != nil and body["logging.googleapis.com/trace"] != nil) - - delete_key(body, "logging.googleapis.com/trace") where (body != nil and body["logging.googleapis.com/trace"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - delete_key(cache, "__setif_value") where (cache != nil and cache["__setif_value"] != nil) - - set(cache["__setif_value"], cache["value"]) - - replace_pattern(cache["__setif_value"], "^projects/([^/]*)/traces/", "") - - set(trace_id.string, cache["__setif_value"]) where (cache != nil and cache["value"] != nil) - - set(attributes["gcp.source_location"]["func"], attributes["gcp.source_location"]["function"]) where (attributes != nil and attributes["gcp.source_location"] != nil and attributes["gcp.source_location"]["function"] != nil) - - delete_key(attributes["gcp.source_location"], "function") where ((attributes != nil and attributes["gcp.source_location"] != nil and attributes["gcp.source_location"]["function"] != nil) and (attributes != nil and attributes["gcp.source_location"] != nil and attributes["gcp.source_location"]["func"] != nil)) - transform/ops_agent_0: - error_mode: ignore - metric_statements: - - context: datapoint - statements: - - set(time, Now()) - transform/ops_agent_1: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/ops_agent_2: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/otel_0: - error_mode: ignore - metric_statements: - - context: metric - statements: - - extract_count_metric(true) where name == "rpc.client.call.duration" - transform/otlp_grpc/otlp_logs_logs_2: - error_mode: ignore - log_statements: - - context: log - statements: - - set(attributes["instrumentation_source"], instrumentation_scope.name) where instrumentation_scope.name != "" - - set(attributes["instrumentation_version"], instrumentation_scope.version) where instrumentation_scope.version != "" - transform/otlp_grpc/otlp_logs_logs_3: - error_mode: ignore - log_statements: - - context: log - statements: - - set(attributes["service.name"], resource.attributes["service.name"]) where resource.attributes["service.name"] != nil - - set(attributes["service.namespace"], resource.attributes["service.namespace"]) where resource.attributes["service.namespace"] != nil - - set(attributes["service.instance.id"], resource.attributes["service.instance.id"]) where resource.attributes["service.instance.id"] != nil - transform/syslog_0: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], attributes["compute.googleapis.com/instance_group_manager/name"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/name"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], attributes["compute.googleapis.com/instance_group_manager/zone"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/zone"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], attributes["compute.googleapis.com/resource_name"]) where (attributes != nil and attributes["compute.googleapis.com/resource_name"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], attributes["gcp.log_name"]) where (attributes != nil and attributes["gcp.log_name"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(cache["value"], "test-mig") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(cache["value"], "test-zone") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/zone"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(attributes["compute.googleapis.com/resource_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], "syslog") where cache["value"] == nil - - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) -receivers: - file_log/logs: - exclude: [] - fingerprint_size: 5kb - include: - - /tmp/*.log - include_file_name: false - operators: - - from: body - id: body - to: body.message - type: move - preserve_leading_whitespaces: true - preserve_trailing_whitespaces: true - start_at: beginning - storage: file_storage - file_log/syslog: - exclude: [] - fingerprint_size: 5kb - include: - - /var/log/messages - - /var/log/syslog - include_file_name: false - operators: - - from: body - id: body - to: body.message - type: move - preserve_leading_whitespaces: true - preserve_trailing_whitespaces: true - start_at: beginning - storage: file_storage - hostmetrics/hostmetrics: - collection_interval: 60s - scrapers: - cpu: {} - disk: {} - filesystem: {} - load: {} - memory: {} - network: {} - paging: {} - process: - mute_process_all_errors: true - mute_process_exe_error: true - mute_process_name_error: true - processes: {} - nvml/hostmetrics_1: - collection_interval: 60s - otlpjsonfile/ops_agent: - include: - - enabled_receivers_otlp.json - - feature_tracking_otlp.json - poll_interval: 1m0s - replay_file: true - prometheus/agent_prometheus: - config: - scrape_configs: - - job_name: otel-collector - scrape_interval: 1m - static_configs: - - targets: - - 0.0.0.0:20201 -service: - extensions: - - file_storage - - googleclientauth - pipelines: - logs/logs_default__pipeline_syslog: - exporters: - - otlp_grpc/otlp_logs - processors: - - transform/syslog_0 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_logs_logs_0 - - resource/otlp_grpc/otlp_logs_logs_1 - - transform/otlp_grpc/otlp_logs_logs_2 - - transform/otlp_grpc/otlp_logs_logs_3 - receivers: - - file_log/syslog - logs/logs_test-pipeline_logs: - exporters: - - otlp_grpc/otlp_logs - processors: - - transform/logs_0 - - transform/logs_test-pipeline_logs_0 - - filter/logs_test-pipeline_logs_1 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_logs_logs_0 - - resource/otlp_grpc/otlp_logs_logs_1 - - transform/otlp_grpc/otlp_logs_logs_2 - - transform/otlp_grpc/otlp_logs_logs_3 - receivers: - - file_log/logs - metrics/default__pipeline_hostmetrics: - exporters: - - otlp_grpc/otlp_metrics - processors: - - agentmetrics/hostmetrics_0 - - filter/hostmetrics_1 - - metricstransform/hostmetrics_2 - - transform/hostmetrics_3 - - transform/hostmetrics_4 - - filter/default__pipeline_hostmetrics_0 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - hostmetrics/hostmetrics - metrics/default__pipeline_hostmetrics_1: - exporters: - - otlp_grpc/otlp_metrics - processors: - - metricstransform/hostmetrics_1_0 - - transform/hostmetrics_1_1 - - transform/hostmetrics_1_2 - - filter/default__pipeline_hostmetrics_1_0 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - nvml/hostmetrics_1 - metrics/loggingmetrics: - exporters: - - otlp_grpc/otlp_metrics - processors: - - transform/agent_prometheus_0 - - transform/agent_prometheus_1 - - transform/agent_prometheus_2 - - transform/loggingmetrics_0 - - filter/loggingmetrics_1 - - filter/loggingmetrics_2 - - metricstransform/loggingmetrics_3 - - transform/loggingmetrics_4 - - interval/loggingmetrics_5 - - metricstransform/loggingmetrics_6 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - prometheus/agent_prometheus - metrics/opsagent: - exporters: - - otlp_grpc/otlp_metrics - processors: - - transform/ops_agent_0 - - transform/ops_agent_1 - - transform/ops_agent_2 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - otlpjsonfile/ops_agent - metrics/otel: - exporters: - - otlp_grpc/otlp_metrics - processors: - - transform/agent_prometheus_0 - - transform/agent_prometheus_1 - - transform/agent_prometheus_2 - - transform/otel_0 - - filter/otel_1 - - filter/otel_2 - - metricstransform/otel_3 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - prometheus/agent_prometheus - telemetry: - metrics: - level: detailed - readers: - - pull: - exporter: - prometheus: - host: 0.0.0.0 - port: 20201 - without_scope_info: true - without_type_suffix: true - without_units: true diff --git a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux/enabled_receivers_otlp.json b/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux/enabled_receivers_otlp.json deleted file mode 100644 index b936b3a79c..0000000000 --- a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux/enabled_receivers_otlp.json +++ /dev/null @@ -1 +0,0 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/ops_agent/enabled_receivers","gauge":{"dataPoints":[{"attributes":[{"key":"telemetry_type","value":{"stringValue":"metrics"}},{"key":"receiver_type","value":{"stringValue":"hostmetrics"}}],"asInt":"1"},{"attributes":[{"key":"telemetry_type","value":{"stringValue":"logs"}},{"key":"receiver_type","value":{"stringValue":"files"}}],"asInt":"2"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux/feature_tracking_otlp.json deleted file mode 100644 index 5d7b2518b1..0000000000 --- a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux/feature_tracking_otlp.json +++ /dev/null @@ -1 +0,0 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:files"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:files"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"processors:parse_regex"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"processors:exclude_logs"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"processors:exclude_logs"}},{"key":"key","value":{"stringValue":"[1].match_any.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:service"}},{"key":"key","value":{"stringValue":"pipelines.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:service"}},{"key":"key","value":{"stringValue":"pipelines.[0].receivers.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:service"}},{"key":"key","value":{"stringValue":"pipelines.[0].processors.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux/features.yaml b/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux/features.yaml deleted file mode 100644 index d06a008a45..0000000000 --- a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux/features.yaml +++ /dev/null @@ -1,48 +0,0 @@ -- module: logging - feature: service:pipelines - key: default_pipeline_overridden - value: "false" -- module: metrics - feature: service:pipelines - key: default_pipeline_overridden - value: "false" -- module: global - feature: default:self_log - key: default_self_log_file_collection - value: "true" -- module: logging - feature: service:otel_logging - key: otel_logging_supported_config - value: "true" -- module: logging - feature: receivers:files - key: "[0].enabled" - value: "true" -- module: logging - feature: receivers:files - key: "[0].include_paths.__length" - value: "1" -- module: logging - feature: processors:parse_regex - key: "[0].enabled" - value: "true" -- module: logging - feature: processors:exclude_logs - key: "[1].enabled" - value: "true" -- module: logging - feature: processors:exclude_logs - key: "[1].match_any.__length" - value: "1" -- module: logging - feature: service:service - key: pipelines.__length - value: "1" -- module: logging - feature: service:service - key: pipelines.[0].receivers.__length - value: "1" -- module: logging - feature: service:service - key: pipelines.[0].processors.__length - value: "2" diff --git a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux/otel.yaml b/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux/otel.yaml deleted file mode 100644 index 6b73d4c128..0000000000 --- a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/linux/otel.yaml +++ /dev/null @@ -1,1084 +0,0 @@ -exporters: - otlp_grpc/otlp_logs: - auth: - authenticator: googleclientauth - balancer_name: pick_first - endpoint: telemetry.googleapis.com:443 - sending_queue: - batch: - flush_timeout: 200ms - max_size: 5000000 - min_size: 1000000 - sizer: bytes - block_on_overflow: true - enabled: true - num_consumers: 10 - queue_size: 20000000 - sizer: bytes - storage: file_storage - user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) - otlp_grpc/otlp_metrics: - auth: - authenticator: googleclientauth - balancer_name: pick_first - endpoint: telemetry.googleapis.com:443 - user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) -extensions: - file_storage: - create_directory: true - directory: file_storage - googleclientauth: {} -processors: - agentmetrics/hostmetrics_0: - blank_label_metrics: - - system.cpu.utilization - batch/otlp_grpc/otlp_metrics_metrics_2: - send_batch_max_size: 200 - send_batch_size: 200 - timeout: 200ms - filter/default__pipeline_hostmetrics_0: - metrics: - exclude: - match_type: regexp - metric_names: [] - filter/hostmetrics_1: - metrics: - exclude: - match_type: strict - metric_names: - - system.network.dropped - - system.filesystem.inodes.usage - - system.paging.faults - - system.disk.operation_time - filter/loggingmetrics_1: - metrics: - datapoint: - - metric.name == "rpc.client.call.duration_count" and (not IsMatch(datapoint.attributes["rpc.method"], "opentelemetry.proto.collector.logs.v1.LogsService/Export")) - filter/loggingmetrics_2: - metrics: - include: - match_type: strict - metric_names: - - otelcol_exporter_sent_log_records - - otelcol_exporter_send_failed_log_records - - rpc.client.call.duration_count - filter/logs_test-pipeline_logs_1: - error_mode: ignore - logs: - log_record: - - ((body != nil and body["Status"] != nil) and IsMatchRubyRegex(body["Status"], "(?i)IN")) - filter/otel_1: - metrics: - datapoint: - - metric.name == "rpc.client.call.duration_count" and (not IsMatch(datapoint.attributes["rpc.method"], "opentelemetry.proto.collector.metrics.v1.MetricsService/Export")) - filter/otel_2: - metrics: - include: - match_type: strict - metric_names: - - otelcol_process_uptime - - otelcol_process_memory_rss - - otelcol_exporter_sent_metric_points - - otelcol_exporter_send_failed_metric_points - - rpc.client.call.duration_count - interval/loggingmetrics_5: - interval: 1m - metric_start_time/otlp_grpc/otlp_metrics_metrics_1: - strategy: subtract_initial_point - metricstransform/hostmetrics_2: - transforms: - - action: update - include: system.cpu.time - new_name: cpu/usage_time - operations: - - action: toggle_scalar_data_type - - action: update_label - label: cpu - new_label: cpu_number - - action: update_label - label: state - new_label: cpu_state - - action: update - include: system.cpu.utilization - new_name: cpu/utilization - operations: - - action: aggregate_labels - aggregation_type: mean - label_set: - - state - - blank - - action: update_label - label: blank - new_label: cpu_number - - action: update_label - label: state - new_label: cpu_state - - action: update - include: system.cpu.load_average.1m - new_name: cpu/load_1m - - action: update - include: system.cpu.load_average.5m - new_name: cpu/load_5m - - action: update - include: system.cpu.load_average.15m - new_name: cpu/load_15m - - action: update - include: system.disk.read_io - new_name: disk/read_bytes_count - - action: update - include: system.disk.write_io - new_name: disk/write_bytes_count - - action: update - include: system.disk.operations - new_name: disk/operation_count - - action: update - include: system.disk.io_time - new_name: disk/io_time - operations: - - action: experimental_scale_value - experimental_scale: 1000.0 - - action: toggle_scalar_data_type - - action: update - include: system.disk.weighted_io_time - new_name: disk/weighted_io_time - operations: - - action: experimental_scale_value - experimental_scale: 1000.0 - - action: toggle_scalar_data_type - - action: update - include: system.disk.average_operation_time - new_name: disk/operation_time - operations: - - action: experimental_scale_value - experimental_scale: 1000.0 - - action: toggle_scalar_data_type - - action: update - include: system.disk.pending_operations - new_name: disk/pending_operations - operations: - - action: toggle_scalar_data_type - - action: update - include: system.disk.merged - new_name: disk/merged_operations - - action: update - include: system.filesystem.usage - new_name: disk/bytes_used - operations: - - action: toggle_scalar_data_type - - action: aggregate_labels - aggregation_type: max - label_set: - - device - - state - - action: update - include: system.filesystem.utilization - new_name: disk/percent_used - operations: - - action: aggregate_labels - aggregation_type: max - label_set: - - device - - state - - action: update - include: system.memory.usage - new_name: memory/bytes_used - operations: - - action: toggle_scalar_data_type - - action: aggregate_label_values - aggregated_values: - - slab_reclaimable - - slab_unreclaimable - aggregation_type: sum - label: state - new_value: slab - - action: update - include: system.memory.utilization - new_name: memory/percent_used - operations: - - action: aggregate_label_values - aggregated_values: - - slab_reclaimable - - slab_unreclaimable - aggregation_type: sum - label: state - new_value: slab - - action: update - include: system.network.io - new_name: interface/traffic - operations: - - action: update_label - label: interface - new_label: device - - action: update_label - label: direction - value_actions: - - new_value: rx - value: receive - - new_value: tx - value: transmit - - action: update - include: system.network.errors - new_name: interface/errors - operations: - - action: update_label - label: interface - new_label: device - - action: update_label - label: direction - value_actions: - - new_value: rx - value: receive - - new_value: tx - value: transmit - - action: update - include: system.network.packets - new_name: interface/packets - operations: - - action: update_label - label: interface - new_label: device - - action: update_label - label: direction - value_actions: - - new_value: rx - value: receive - - new_value: tx - value: transmit - - action: update - include: system.network.connections - new_name: network/tcp_connections - operations: - - action: toggle_scalar_data_type - - action: delete_label_value - label: protocol - label_value: udp - - action: update_label - label: state - new_label: tcp_state - - action: aggregate_labels - aggregation_type: sum - label_set: - - tcp_state - - action: add_label - new_label: port - new_value: all - - action: update - include: system.processes.created - new_name: processes/fork_count - - action: update - include: system.processes.count - new_name: processes/count_by_state - operations: - - action: toggle_scalar_data_type - - action: update_label - label: status - new_label: state - - action: update - include: system.paging.usage - new_name: swap/bytes_used - operations: - - action: toggle_scalar_data_type - - action: update - include: system.paging.utilization - new_name: swap/percent_used - - action: insert - include: swap/percent_used - new_name: pagefile/percent_used - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: - - state - - action: update - include: system.paging.operations - new_name: swap/io - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: - - direction - - action: update_label - label: direction - value_actions: - - new_value: in - value: page_in - - new_value: out - value: page_out - - action: update - include: process.cpu.time - new_name: processes/cpu_time - operations: - - action: experimental_scale_value - experimental_scale: 1e+06 - - action: toggle_scalar_data_type - - action: add_label - new_label: process - new_value: all - - action: delete_label_value - label: state - label_value: wait - - action: update_label - label: state - new_label: user_or_syst - - action: update_label - label: user_or_syst - value_actions: - - new_value: syst - value: system - - action: update - include: process.disk.read_io - new_name: processes/disk/read_bytes_count - operations: - - action: add_label - new_label: process - new_value: all - - action: update - include: process.disk.write_io - new_name: processes/disk/write_bytes_count - operations: - - action: add_label - new_label: process - new_value: all - - action: update - include: process.memory.usage - new_name: processes/rss_usage - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: process - new_value: all - - action: update - include: process.memory.virtual - new_name: processes/vm_usage - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: process - new_value: all - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - metricstransform/loggingmetrics_3: - transforms: - - action: insert - include: otelcol_exporter_send_failed_log_records - new_name: agent/log_entry_retry_count - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: response_code - new_value: "400" - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - - action: update - include: rpc.client.call.duration_count - new_name: agent/request_count - operations: - - action: update_label - label: rpc.response.status_code - value_actions: - - new_value: ABORTED - value: Aborted - - new_value: ALREADY_EXISTS - value: AlreadyExists - - new_value: CANCELLED - value: Canceled - - new_value: CANCELLED - value: Cancelled - - new_value: DATA_LOSS - value: DataLoss - - new_value: DEADLINE_EXCEEDED - value: DeadlineExceeded - - new_value: DEADLINE_EXCEEDED - value: Deadline_Exceeded - - new_value: FAILED_PRECONDITION - value: FailedPrecondition - - new_value: INTERNAL - value: Internal - - new_value: INVALID_ARGUMENT - value: InvalidArgument - - new_value: NOT_FOUND - value: NotFound - - new_value: OK - value: OK - - new_value: OUT_OF_RANGE - value: OutOfRange - - new_value: PERMISSION_DENIED - value: PermissionDenied - - new_value: RESOURCE_EXHAUSTED - value: ResourceExhausted - - new_value: UNKNOWN - value: Shutdown - - new_value: UNAUTHENTICATED - value: Unauthenticated - - new_value: UNAVAILABLE - value: Unavailable - - new_value: UNIMPLEMENTED - value: Unimplemented - - new_value: UNKNOWN - value: Unknown - - new_value: CANCELLED - value: canceled - - new_value: CANCELLED - value: cancelled - - new_value: DEADLINE_EXCEEDED - value: deadline_exceeded - - new_value: UNKNOWN - value: shutdown - - action: update_label - label: rpc.response.status_code - new_label: response_code - - action: update_label - label: response_code - value_actions: - - new_value: "409" - value: ABORTED - - new_value: "409" - value: ALREADY_EXISTS - - new_value: "499" - value: CANCELLED - - new_value: "500" - value: DATA_LOSS - - new_value: "504" - value: DEADLINE_EXCEEDED - - new_value: "400" - value: FAILED_PRECONDITION - - new_value: "500" - value: INTERNAL - - new_value: "400" - value: INVALID_ARGUMENT - - new_value: "404" - value: NOT_FOUND - - new_value: "200" - value: OK - - new_value: "400" - value: OUT_OF_RANGE - - new_value: "403" - value: PERMISSION_DENIED - - new_value: "429" - value: RESOURCE_EXHAUSTED - - new_value: "401" - value: UNAUTHENTICATED - - new_value: "503" - value: UNAVAILABLE - - new_value: "501" - value: UNIMPLEMENTED - - new_value: "500" - value: UNKNOWN - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - - action: update - include: otelcol_exporter_sent_log_records - new_name: agent/log_entry_count - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: response_code - new_value: "200" - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - - action: update - include: otelcol_exporter_send_failed_log_records - new_name: agent/log_entry_count - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: response_code - new_value: "400" - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - - action: combine - include: ^agent/log_entry_count$ - match_type: regexp - new_name: agent/log_entry_count - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - submatch_case: lower - metricstransform/loggingmetrics_6: - transforms: - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - metricstransform/otel_3: - transforms: - - action: update - include: otelcol_process_uptime - new_name: agent/uptime - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: version - new_value: google-cloud-ops-agent-metrics/latest-build_distro - - action: aggregate_labels - aggregation_type: sum - label_set: - - version - - action: update - include: otelcol_process_memory_rss - new_name: agent/memory_usage - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: [] - - action: update - include: rpc.client.call.duration_count - new_name: agent/api_request_count - operations: - - action: update_label - label: rpc.response.status_code - value_actions: - - new_value: ABORTED - value: Aborted - - new_value: ALREADY_EXISTS - value: AlreadyExists - - new_value: CANCELLED - value: Canceled - - new_value: CANCELLED - value: Cancelled - - new_value: DATA_LOSS - value: DataLoss - - new_value: DEADLINE_EXCEEDED - value: DeadlineExceeded - - new_value: DEADLINE_EXCEEDED - value: Deadline_Exceeded - - new_value: FAILED_PRECONDITION - value: FailedPrecondition - - new_value: INTERNAL - value: Internal - - new_value: INVALID_ARGUMENT - value: InvalidArgument - - new_value: NOT_FOUND - value: NotFound - - new_value: OK - value: OK - - new_value: OUT_OF_RANGE - value: OutOfRange - - new_value: PERMISSION_DENIED - value: PermissionDenied - - new_value: RESOURCE_EXHAUSTED - value: ResourceExhausted - - new_value: UNKNOWN - value: Shutdown - - new_value: UNAUTHENTICATED - value: Unauthenticated - - new_value: UNAVAILABLE - value: Unavailable - - new_value: UNIMPLEMENTED - value: Unimplemented - - new_value: UNKNOWN - value: Unknown - - new_value: CANCELLED - value: canceled - - new_value: CANCELLED - value: cancelled - - new_value: DEADLINE_EXCEEDED - value: deadline_exceeded - - new_value: UNKNOWN - value: shutdown - - action: update_label - label: rpc.response.status_code - new_label: state - - action: aggregate_labels - aggregation_type: sum - label_set: - - state - - action: update - include: otelcol_exporter_sent_metric_points - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: status - new_value: OK - - action: aggregate_labels - aggregation_type: sum - label_set: - - status - - action: update - include: otelcol_exporter_send_failed_metric_points - operations: - - action: toggle_scalar_data_type - - action: update_label - label: error.type - new_label: status - - action: update_label - label: status - value_actions: - - new_value: ABORTED - value: Aborted - - new_value: ALREADY_EXISTS - value: AlreadyExists - - new_value: CANCELLED - value: Canceled - - new_value: CANCELLED - value: Cancelled - - new_value: DATA_LOSS - value: DataLoss - - new_value: DEADLINE_EXCEEDED - value: DeadlineExceeded - - new_value: DEADLINE_EXCEEDED - value: Deadline_Exceeded - - new_value: FAILED_PRECONDITION - value: FailedPrecondition - - new_value: INTERNAL - value: Internal - - new_value: INVALID_ARGUMENT - value: InvalidArgument - - new_value: NOT_FOUND - value: NotFound - - new_value: OK - value: OK - - new_value: OUT_OF_RANGE - value: OutOfRange - - new_value: PERMISSION_DENIED - value: PermissionDenied - - new_value: RESOURCE_EXHAUSTED - value: ResourceExhausted - - new_value: UNKNOWN - value: Shutdown - - new_value: UNAUTHENTICATED - value: Unauthenticated - - new_value: UNAVAILABLE - value: Unavailable - - new_value: UNIMPLEMENTED - value: Unimplemented - - new_value: UNKNOWN - value: Unknown - - new_value: CANCELLED - value: canceled - - new_value: CANCELLED - value: cancelled - - new_value: DEADLINE_EXCEEDED - value: deadline_exceeded - - new_value: UNKNOWN - value: shutdown - - action: aggregate_labels - aggregation_type: sum - label_set: - - status - - action: combine - include: otelcol_exporter_sent_metric_points|otelcol_exporter_send_failed_metric_points - match_type: regexp - new_name: agent/monitoring/point_count - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: - - status - submatch_case: lower - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - resource/otlp_grpc/otlp_logs_logs_0: - attributes: - - action: insert - key: gcp.project_id - value: test-project - resource/otlp_grpc/otlp_logs_logs_1: - attributes: - - action: insert - key: gcp.use_legacy_mapping - value: "true" - resource/otlp_grpc/otlp_metrics_metrics_0: - attributes: - - action: insert - key: gcp.project_id - value: test-project - resourcedetection/_global_0: - detectors: - - gcp - transform/agent_prometheus_0: - metric_statements: - - context: resource - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.version") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "server.port") - - delete_key(attributes, "url.scheme") - transform/agent_prometheus_1: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/agent_prometheus_2: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/hostmetrics_3: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/hostmetrics_4: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/loggingmetrics_0: - error_mode: ignore - metric_statements: - - context: metric - statements: - - extract_count_metric(true) where name == "rpc.client.call.duration" - transform/loggingmetrics_4: - metric_statements: - - context: metric - statements: - - set(unit, "1") - transform/logs_0: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], attributes["compute.googleapis.com/instance_group_manager/name"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/name"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], attributes["compute.googleapis.com/instance_group_manager/zone"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/zone"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], attributes["compute.googleapis.com/resource_name"]) where (attributes != nil and attributes["compute.googleapis.com/resource_name"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], attributes["gcp.log_name"]) where (attributes != nil and attributes["gcp.log_name"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(cache["value"], "test-mig") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(cache["value"], "test-zone") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/zone"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(attributes["compute.googleapis.com/resource_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], "logs") where cache["value"] == nil - - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - transform/logs_test-pipeline_logs_0: - error_mode: ignore - log_statements: - - context: log - statements: - - "set(cache[\"__parsed_regex\"], ExtractPatternsRubyRegex(body[\"message\"], \"^(?\\\\d+:\\\\d+:\\\\d+) \\\\((?.*)\\\\) (?IN|OUT|DENIED): \\\"(?.*)\\\" (?.*)\\\\@(?[\\\\w\\\\d\\\\-Â\\u00a0]+)[^ ]* (?
.*)$\", true)) where ((body != nil and body[\"message\"] != nil) and IsMatchRubyRegex(body[\"message\"], \"^(?\\\\d+:\\\\d+:\\\\d+) \\\\((?.*)\\\\) (?IN|OUT|DENIED): \\\"(?.*)\\\" (?.*)\\\\@(?[\\\\w\\\\d\\\\-Â\\u00a0]+)[^ ]* (?
.*)$\"))" - - delete_key(body, "message") where ((body != nil and body["message"] != nil) and (cache != nil and cache["__parsed_regex"] != nil)) - - merge_maps(body, cache["__parsed_regex"], "upsert") where (cache != nil and cache["__parsed_regex"] != nil) - - delete_key(cache, "__parsed_regex") where (cache != nil and cache["__parsed_regex"] != nil) - - set(cache["__time_valid"], false) - - set(cache["__time_valid"], true) where ((body != nil and body["LogTimeStamp"] != nil) and Time(body["LogTimeStamp"], "%H:%M:%S") != nil) - - set(time, Time(body["LogTimeStamp"], "%H:%M:%S")) where cache["__time_valid"] == true - - delete_key(body, "LogTimeStamp") where ((body != nil and body["LogTimeStamp"] != nil) and cache["__time_valid"] == true) - - merge_maps(attributes, body["logging.googleapis.com/labels"], "upsert") where body["logging.googleapis.com/labels"] != nil - - delete_key(body, "logging.googleapis.com/labels") where (body != nil and body["logging.googleapis.com/labels"] != nil) - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/httpRequest"]) where (body != nil and body["logging.googleapis.com/httpRequest"] != nil) - - delete_key(body, "logging.googleapis.com/httpRequest") where (body != nil and body["logging.googleapis.com/httpRequest"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(attributes["gcp.http_request"], cache["value"]) where (cache != nil and cache["value"] != nil) - - set(attributes["gcp.http_request"]["status"], Int(attributes["gcp.http_request"]["status"])) where attributes["gcp.http_request"]["status"] != nil - - set(attributes["gcp.http_request"]["responseSize"], Int(attributes["gcp.http_request"]["responseSize"])) where attributes["gcp.http_request"]["responseSize"] != nil - - set(attributes["gcp.http_request"]["requestSize"], Int(attributes["gcp.http_request"]["requestSize"])) where attributes["gcp.http_request"]["requestSize"] != nil - - set(attributes["gcp.http_request"]["cacheFillBytes"], Int(attributes["gcp.http_request"]["cacheFillBytes"])) where attributes["gcp.http_request"]["cacheFillBytes"] != nil - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/logName"]) where (body != nil and body["logging.googleapis.com/logName"] != nil) - - delete_key(body, "logging.googleapis.com/logName") where (body != nil and body["logging.googleapis.com/logName"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/severity"]) where (body != nil and body["logging.googleapis.com/severity"] != nil) - - delete_key(body, "logging.googleapis.com/severity") where (body != nil and body["logging.googleapis.com/severity"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(severity_text, cache["value"]) where (cache != nil and cache["value"] != nil) - - set(severity_number, 0) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/sourceLocation"]) where (body != nil and body["logging.googleapis.com/sourceLocation"] != nil) - - delete_key(body, "logging.googleapis.com/sourceLocation") where (body != nil and body["logging.googleapis.com/sourceLocation"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(attributes["gcp.source_location"], cache["value"]) where (cache != nil and cache["value"] != nil) - - set(attributes["gcp.source_location"]["line"], Int(attributes["gcp.source_location"]["line"])) where attributes["gcp.source_location"]["line"] != nil - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/spanId"]) where (body != nil and body["logging.googleapis.com/spanId"] != nil) - - delete_key(body, "logging.googleapis.com/spanId") where (body != nil and body["logging.googleapis.com/spanId"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(span_id.string, cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/trace"]) where (body != nil and body["logging.googleapis.com/trace"] != nil) - - delete_key(body, "logging.googleapis.com/trace") where (body != nil and body["logging.googleapis.com/trace"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - delete_key(cache, "__setif_value") where (cache != nil and cache["__setif_value"] != nil) - - set(cache["__setif_value"], cache["value"]) - - replace_pattern(cache["__setif_value"], "^projects/([^/]*)/traces/", "") - - set(trace_id.string, cache["__setif_value"]) where (cache != nil and cache["value"] != nil) - - set(attributes["gcp.source_location"]["func"], attributes["gcp.source_location"]["function"]) where (attributes != nil and attributes["gcp.source_location"] != nil and attributes["gcp.source_location"]["function"] != nil) - - delete_key(attributes["gcp.source_location"], "function") where ((attributes != nil and attributes["gcp.source_location"] != nil and attributes["gcp.source_location"]["function"] != nil) and (attributes != nil and attributes["gcp.source_location"] != nil and attributes["gcp.source_location"]["func"] != nil)) - transform/ops_agent_0: - error_mode: ignore - metric_statements: - - context: datapoint - statements: - - set(time, Now()) - transform/ops_agent_1: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/ops_agent_2: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/otel_0: - error_mode: ignore - metric_statements: - - context: metric - statements: - - extract_count_metric(true) where name == "rpc.client.call.duration" - transform/otlp_grpc/otlp_logs_logs_2: - error_mode: ignore - log_statements: - - context: log - statements: - - set(attributes["instrumentation_source"], instrumentation_scope.name) where instrumentation_scope.name != "" - - set(attributes["instrumentation_version"], instrumentation_scope.version) where instrumentation_scope.version != "" - transform/otlp_grpc/otlp_logs_logs_3: - error_mode: ignore - log_statements: - - context: log - statements: - - set(attributes["service.name"], resource.attributes["service.name"]) where resource.attributes["service.name"] != nil - - set(attributes["service.namespace"], resource.attributes["service.namespace"]) where resource.attributes["service.namespace"] != nil - - set(attributes["service.instance.id"], resource.attributes["service.instance.id"]) where resource.attributes["service.instance.id"] != nil - transform/syslog_0: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], attributes["compute.googleapis.com/instance_group_manager/name"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/name"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], attributes["compute.googleapis.com/instance_group_manager/zone"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/zone"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], attributes["compute.googleapis.com/resource_name"]) where (attributes != nil and attributes["compute.googleapis.com/resource_name"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], attributes["gcp.log_name"]) where (attributes != nil and attributes["gcp.log_name"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(cache["value"], "test-mig") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(cache["value"], "test-zone") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/zone"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(attributes["compute.googleapis.com/resource_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], "syslog") where cache["value"] == nil - - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) -receivers: - file_log/logs: - exclude: [] - fingerprint_size: 5kb - include: - - /tmp/*.log - include_file_name: false - operators: - - from: body - id: body - to: body.message - type: move - preserve_leading_whitespaces: true - preserve_trailing_whitespaces: true - start_at: beginning - storage: file_storage - file_log/syslog: - exclude: [] - fingerprint_size: 5kb - include: - - /var/log/messages - - /var/log/syslog - include_file_name: false - operators: - - from: body - id: body - to: body.message - type: move - preserve_leading_whitespaces: true - preserve_trailing_whitespaces: true - start_at: beginning - storage: file_storage - hostmetrics/hostmetrics: - collection_interval: 60s - scrapers: - cpu: {} - disk: {} - filesystem: {} - load: {} - memory: {} - network: {} - paging: {} - process: - mute_process_all_errors: true - mute_process_exe_error: true - mute_process_name_error: true - processes: {} - otlpjsonfile/ops_agent: - include: - - enabled_receivers_otlp.json - - feature_tracking_otlp.json - poll_interval: 1m0s - replay_file: true - prometheus/agent_prometheus: - config: - scrape_configs: - - job_name: otel-collector - scrape_interval: 1m - static_configs: - - targets: - - 0.0.0.0:20201 -service: - extensions: - - file_storage - - googleclientauth - pipelines: - logs/logs_default__pipeline_syslog: - exporters: - - otlp_grpc/otlp_logs - processors: - - transform/syslog_0 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_logs_logs_0 - - resource/otlp_grpc/otlp_logs_logs_1 - - transform/otlp_grpc/otlp_logs_logs_2 - - transform/otlp_grpc/otlp_logs_logs_3 - receivers: - - file_log/syslog - logs/logs_test-pipeline_logs: - exporters: - - otlp_grpc/otlp_logs - processors: - - transform/logs_0 - - transform/logs_test-pipeline_logs_0 - - filter/logs_test-pipeline_logs_1 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_logs_logs_0 - - resource/otlp_grpc/otlp_logs_logs_1 - - transform/otlp_grpc/otlp_logs_logs_2 - - transform/otlp_grpc/otlp_logs_logs_3 - receivers: - - file_log/logs - metrics/default__pipeline_hostmetrics: - exporters: - - otlp_grpc/otlp_metrics - processors: - - agentmetrics/hostmetrics_0 - - filter/hostmetrics_1 - - metricstransform/hostmetrics_2 - - transform/hostmetrics_3 - - transform/hostmetrics_4 - - filter/default__pipeline_hostmetrics_0 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - hostmetrics/hostmetrics - metrics/loggingmetrics: - exporters: - - otlp_grpc/otlp_metrics - processors: - - transform/agent_prometheus_0 - - transform/agent_prometheus_1 - - transform/agent_prometheus_2 - - transform/loggingmetrics_0 - - filter/loggingmetrics_1 - - filter/loggingmetrics_2 - - metricstransform/loggingmetrics_3 - - transform/loggingmetrics_4 - - interval/loggingmetrics_5 - - metricstransform/loggingmetrics_6 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - prometheus/agent_prometheus - metrics/opsagent: - exporters: - - otlp_grpc/otlp_metrics - processors: - - transform/ops_agent_0 - - transform/ops_agent_1 - - transform/ops_agent_2 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - otlpjsonfile/ops_agent - metrics/otel: - exporters: - - otlp_grpc/otlp_metrics - processors: - - transform/agent_prometheus_0 - - transform/agent_prometheus_1 - - transform/agent_prometheus_2 - - transform/otel_0 - - filter/otel_1 - - filter/otel_2 - - metricstransform/otel_3 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - prometheus/agent_prometheus - telemetry: - metrics: - level: detailed - readers: - - pull: - exporter: - prometheus: - host: 0.0.0.0 - port: 20201 - without_scope_info: true - without_type_suffix: true - without_units: true diff --git a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows-2012/enabled_receivers_otlp.json b/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows-2012/enabled_receivers_otlp.json deleted file mode 100644 index 40de3d48d4..0000000000 --- a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows-2012/enabled_receivers_otlp.json +++ /dev/null @@ -1 +0,0 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/ops_agent/enabled_receivers","gauge":{"dataPoints":[{"attributes":[{"key":"telemetry_type","value":{"stringValue":"metrics"}},{"key":"receiver_type","value":{"stringValue":"hostmetrics"}}],"asInt":"1"},{"attributes":[{"key":"telemetry_type","value":{"stringValue":"metrics"}},{"key":"receiver_type","value":{"stringValue":"iis"}}],"asInt":"1"},{"attributes":[{"key":"telemetry_type","value":{"stringValue":"metrics"}},{"key":"receiver_type","value":{"stringValue":"mssql"}}],"asInt":"1"},{"attributes":[{"key":"telemetry_type","value":{"stringValue":"logs"}},{"key":"receiver_type","value":{"stringValue":"files"}}],"asInt":"1"},{"attributes":[{"key":"telemetry_type","value":{"stringValue":"logs"}},{"key":"receiver_type","value":{"stringValue":"windows_event_log"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows-2012/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows-2012/feature_tracking_otlp.json deleted file mode 100644 index 5d7b2518b1..0000000000 --- a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows-2012/feature_tracking_otlp.json +++ /dev/null @@ -1 +0,0 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:files"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:files"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"processors:parse_regex"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"processors:exclude_logs"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"processors:exclude_logs"}},{"key":"key","value":{"stringValue":"[1].match_any.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:service"}},{"key":"key","value":{"stringValue":"pipelines.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:service"}},{"key":"key","value":{"stringValue":"pipelines.[0].receivers.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:service"}},{"key":"key","value":{"stringValue":"pipelines.[0].processors.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows-2012/features.yaml b/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows-2012/features.yaml deleted file mode 100644 index d06a008a45..0000000000 --- a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows-2012/features.yaml +++ /dev/null @@ -1,48 +0,0 @@ -- module: logging - feature: service:pipelines - key: default_pipeline_overridden - value: "false" -- module: metrics - feature: service:pipelines - key: default_pipeline_overridden - value: "false" -- module: global - feature: default:self_log - key: default_self_log_file_collection - value: "true" -- module: logging - feature: service:otel_logging - key: otel_logging_supported_config - value: "true" -- module: logging - feature: receivers:files - key: "[0].enabled" - value: "true" -- module: logging - feature: receivers:files - key: "[0].include_paths.__length" - value: "1" -- module: logging - feature: processors:parse_regex - key: "[0].enabled" - value: "true" -- module: logging - feature: processors:exclude_logs - key: "[1].enabled" - value: "true" -- module: logging - feature: processors:exclude_logs - key: "[1].match_any.__length" - value: "1" -- module: logging - feature: service:service - key: pipelines.__length - value: "1" -- module: logging - feature: service:service - key: pipelines.[0].receivers.__length - value: "1" -- module: logging - feature: service:service - key: pipelines.[0].processors.__length - value: "2" diff --git a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows-2012/otel.yaml b/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows-2012/otel.yaml deleted file mode 100644 index 779b77cdbb..0000000000 --- a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows-2012/otel.yaml +++ /dev/null @@ -1,1634 +0,0 @@ -exporters: - otlp_grpc/otlp_logs: - auth: - authenticator: googleclientauth - balancer_name: pick_first - endpoint: telemetry.googleapis.com:443 - sending_queue: - batch: - flush_timeout: 200ms - max_size: 5000000 - min_size: 1000000 - sizer: bytes - block_on_overflow: true - enabled: true - num_consumers: 10 - queue_size: 20000000 - sizer: bytes - storage: file_storage - user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - otlp_grpc/otlp_metrics: - auth: - authenticator: googleclientauth - balancer_name: pick_first - endpoint: telemetry.googleapis.com:443 - user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) -extensions: - file_storage: - create_directory: true - directory: file_storage - googleclientauth: {} -processors: - agentmetrics/hostmetrics_0: - blank_label_metrics: - - system.cpu.utilization - batch/otlp_grpc/otlp_metrics_metrics_2: - send_batch_max_size: 200 - send_batch_size: 200 - timeout: 200ms - filter/default__pipeline_hostmetrics_0: - metrics: - exclude: - match_type: regexp - metric_names: [] - filter/default__pipeline_iis_0: - metrics: - exclude: - match_type: regexp - metric_names: [] - filter/default__pipeline_mssql_0: - metrics: - exclude: - match_type: regexp - metric_names: [] - filter/hostmetrics_1: - metrics: - exclude: - match_type: strict - metric_names: - - system.network.dropped - - system.filesystem.inodes.usage - - system.paging.faults - - system.disk.operation_time - filter/loggingmetrics_1: - metrics: - datapoint: - - metric.name == "rpc.client.call.duration_count" and (not IsMatch(datapoint.attributes["rpc.method"], "opentelemetry.proto.collector.logs.v1.LogsService/Export")) - filter/loggingmetrics_2: - metrics: - include: - match_type: strict - metric_names: - - otelcol_exporter_sent_log_records - - otelcol_exporter_send_failed_log_records - - rpc.client.call.duration_count - filter/logs_test-pipeline_logs_1: - error_mode: ignore - logs: - log_record: - - ((body != nil and body["Status"] != nil) and IsMatchRubyRegex(body["Status"], "(?i)IN")) - filter/otel_1: - metrics: - datapoint: - - metric.name == "rpc.client.call.duration_count" and (not IsMatch(datapoint.attributes["rpc.method"], "opentelemetry.proto.collector.metrics.v1.MetricsService/Export")) - filter/otel_2: - metrics: - include: - match_type: strict - metric_names: - - otelcol_process_uptime - - otelcol_process_memory_rss - - otelcol_exporter_sent_metric_points - - otelcol_exporter_send_failed_metric_points - - rpc.client.call.duration_count - interval/loggingmetrics_5: - interval: 1m - metric_start_time/iis_2: - strategy: subtract_initial_point - metric_start_time/otlp_grpc/otlp_metrics_metrics_1: - strategy: subtract_initial_point - metricstransform/hostmetrics_2: - transforms: - - action: update - include: system.cpu.time - new_name: cpu/usage_time - operations: - - action: toggle_scalar_data_type - - action: update_label - label: cpu - new_label: cpu_number - - action: update_label - label: state - new_label: cpu_state - - action: update - include: system.cpu.utilization - new_name: cpu/utilization - operations: - - action: aggregate_labels - aggregation_type: mean - label_set: - - state - - blank - - action: update_label - label: blank - new_label: cpu_number - - action: update_label - label: state - new_label: cpu_state - - action: update - include: system.cpu.load_average.1m - new_name: cpu/load_1m - - action: update - include: system.cpu.load_average.5m - new_name: cpu/load_5m - - action: update - include: system.cpu.load_average.15m - new_name: cpu/load_15m - - action: update - include: system.disk.read_io - new_name: disk/read_bytes_count - - action: update - include: system.disk.write_io - new_name: disk/write_bytes_count - - action: update - include: system.disk.operations - new_name: disk/operation_count - - action: update - include: system.disk.io_time - new_name: disk/io_time - operations: - - action: experimental_scale_value - experimental_scale: 1000.0 - - action: toggle_scalar_data_type - - action: update - include: system.disk.weighted_io_time - new_name: disk/weighted_io_time - operations: - - action: experimental_scale_value - experimental_scale: 1000.0 - - action: toggle_scalar_data_type - - action: update - include: system.disk.average_operation_time - new_name: disk/operation_time - operations: - - action: experimental_scale_value - experimental_scale: 1000.0 - - action: toggle_scalar_data_type - - action: update - include: system.disk.pending_operations - new_name: disk/pending_operations - operations: - - action: toggle_scalar_data_type - - action: update - include: system.disk.merged - new_name: disk/merged_operations - - action: update - include: system.filesystem.usage - new_name: disk/bytes_used - operations: - - action: toggle_scalar_data_type - - action: aggregate_labels - aggregation_type: max - label_set: - - device - - state - - action: update - include: system.filesystem.utilization - new_name: disk/percent_used - operations: - - action: aggregate_labels - aggregation_type: max - label_set: - - device - - state - - action: update - include: system.memory.usage - new_name: memory/bytes_used - operations: - - action: toggle_scalar_data_type - - action: aggregate_label_values - aggregated_values: - - slab_reclaimable - - slab_unreclaimable - aggregation_type: sum - label: state - new_value: slab - - action: update - include: system.memory.utilization - new_name: memory/percent_used - operations: - - action: aggregate_label_values - aggregated_values: - - slab_reclaimable - - slab_unreclaimable - aggregation_type: sum - label: state - new_value: slab - - action: update - include: system.network.io - new_name: interface/traffic - operations: - - action: update_label - label: interface - new_label: device - - action: update_label - label: direction - value_actions: - - new_value: rx - value: receive - - new_value: tx - value: transmit - - action: update - include: system.network.errors - new_name: interface/errors - operations: - - action: update_label - label: interface - new_label: device - - action: update_label - label: direction - value_actions: - - new_value: rx - value: receive - - new_value: tx - value: transmit - - action: update - include: system.network.packets - new_name: interface/packets - operations: - - action: update_label - label: interface - new_label: device - - action: update_label - label: direction - value_actions: - - new_value: rx - value: receive - - new_value: tx - value: transmit - - action: update - include: system.network.connections - new_name: network/tcp_connections - operations: - - action: toggle_scalar_data_type - - action: delete_label_value - label: protocol - label_value: udp - - action: update_label - label: state - new_label: tcp_state - - action: aggregate_labels - aggregation_type: sum - label_set: - - tcp_state - - action: add_label - new_label: port - new_value: all - - action: update - include: system.processes.created - new_name: processes/fork_count - - action: update - include: system.processes.count - new_name: processes/count_by_state - operations: - - action: toggle_scalar_data_type - - action: update_label - label: status - new_label: state - - action: update - include: system.paging.usage - new_name: swap/bytes_used - operations: - - action: toggle_scalar_data_type - - action: update - include: system.paging.utilization - new_name: swap/percent_used - - action: insert - include: swap/percent_used - new_name: pagefile/percent_used - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: - - state - - action: update - include: system.paging.operations - new_name: swap/io - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: - - direction - - action: update_label - label: direction - value_actions: - - new_value: in - value: page_in - - new_value: out - value: page_out - - action: update - include: process.cpu.time - new_name: processes/cpu_time - operations: - - action: experimental_scale_value - experimental_scale: 1e+06 - - action: toggle_scalar_data_type - - action: add_label - new_label: process - new_value: all - - action: delete_label_value - label: state - label_value: wait - - action: update_label - label: state - new_label: user_or_syst - - action: update_label - label: user_or_syst - value_actions: - - new_value: syst - value: system - - action: update - include: process.disk.read_io - new_name: processes/disk/read_bytes_count - operations: - - action: add_label - new_label: process - new_value: all - - action: update - include: process.disk.write_io - new_name: processes/disk/write_bytes_count - operations: - - action: add_label - new_label: process - new_value: all - - action: update - include: process.memory.usage - new_name: processes/rss_usage - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: process - new_value: all - - action: update - include: process.memory.virtual - new_name: processes/vm_usage - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: process - new_value: all - - action: update - include: process.handles - new_name: processes/windows/handles - operations: - - action: add_label - new_label: process - new_value: all - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - metricstransform/iis_0: - transforms: - - action: update - include: "\\Web Service(_Total)\\Current Connections" - new_name: iis/current_connections - - action: combine - include: "^\\\\Web Service\\(_Total\\)\\\\Total Bytes (?P.*)$$" - match_type: regexp - new_name: iis/network/transferred_bytes_count - operations: - - action: toggle_scalar_data_type - submatch_case: lower - - action: update - include: "\\Web Service(_Total)\\Total Connection Attempts (all instances)" - new_name: iis/new_connection_count - operations: - - action: toggle_scalar_data_type - - action: combine - include: "^\\\\Web Service\\(_Total\\)\\\\Total (?P.*) Requests$$" - match_type: regexp - new_name: iis/request_count - operations: - - action: toggle_scalar_data_type - submatch_case: lower - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - metricstransform/loggingmetrics_3: - transforms: - - action: insert - include: otelcol_exporter_send_failed_log_records - new_name: agent/log_entry_retry_count - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: response_code - new_value: "400" - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - - action: update - include: rpc.client.call.duration_count - new_name: agent/request_count - operations: - - action: update_label - label: rpc.response.status_code - value_actions: - - new_value: ABORTED - value: Aborted - - new_value: ALREADY_EXISTS - value: AlreadyExists - - new_value: CANCELLED - value: Canceled - - new_value: CANCELLED - value: Cancelled - - new_value: DATA_LOSS - value: DataLoss - - new_value: DEADLINE_EXCEEDED - value: DeadlineExceeded - - new_value: DEADLINE_EXCEEDED - value: Deadline_Exceeded - - new_value: FAILED_PRECONDITION - value: FailedPrecondition - - new_value: INTERNAL - value: Internal - - new_value: INVALID_ARGUMENT - value: InvalidArgument - - new_value: NOT_FOUND - value: NotFound - - new_value: OK - value: OK - - new_value: OUT_OF_RANGE - value: OutOfRange - - new_value: PERMISSION_DENIED - value: PermissionDenied - - new_value: RESOURCE_EXHAUSTED - value: ResourceExhausted - - new_value: UNKNOWN - value: Shutdown - - new_value: UNAUTHENTICATED - value: Unauthenticated - - new_value: UNAVAILABLE - value: Unavailable - - new_value: UNIMPLEMENTED - value: Unimplemented - - new_value: UNKNOWN - value: Unknown - - new_value: CANCELLED - value: canceled - - new_value: CANCELLED - value: cancelled - - new_value: DEADLINE_EXCEEDED - value: deadline_exceeded - - new_value: UNKNOWN - value: shutdown - - action: update_label - label: rpc.response.status_code - new_label: response_code - - action: update_label - label: response_code - value_actions: - - new_value: "409" - value: ABORTED - - new_value: "409" - value: ALREADY_EXISTS - - new_value: "499" - value: CANCELLED - - new_value: "500" - value: DATA_LOSS - - new_value: "504" - value: DEADLINE_EXCEEDED - - new_value: "400" - value: FAILED_PRECONDITION - - new_value: "500" - value: INTERNAL - - new_value: "400" - value: INVALID_ARGUMENT - - new_value: "404" - value: NOT_FOUND - - new_value: "200" - value: OK - - new_value: "400" - value: OUT_OF_RANGE - - new_value: "403" - value: PERMISSION_DENIED - - new_value: "429" - value: RESOURCE_EXHAUSTED - - new_value: "401" - value: UNAUTHENTICATED - - new_value: "503" - value: UNAVAILABLE - - new_value: "501" - value: UNIMPLEMENTED - - new_value: "500" - value: UNKNOWN - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - - action: update - include: otelcol_exporter_sent_log_records - new_name: agent/log_entry_count - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: response_code - new_value: "200" - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - - action: update - include: otelcol_exporter_send_failed_log_records - new_name: agent/log_entry_count - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: response_code - new_value: "400" - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - - action: combine - include: ^agent/log_entry_count$ - match_type: regexp - new_name: agent/log_entry_count - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - submatch_case: lower - metricstransform/loggingmetrics_6: - transforms: - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - metricstransform/mssql_0: - transforms: - - action: update - include: "\\SQLServer:General Statistics(_Total)\\User Connections" - new_name: mssql/connections/user - - action: update - include: "\\SQLServer:Databases(_Total)\\Transactions/sec" - new_name: mssql/transaction_rate - - action: update - include: "\\SQLServer:Databases(_Total)\\Write Transactions/sec" - new_name: mssql/write_transaction_rate - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - metricstransform/otel_3: - transforms: - - action: update - include: otelcol_process_uptime - new_name: agent/uptime - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: version - new_value: google-cloud-ops-agent-metrics/latest-build_distro - - action: aggregate_labels - aggregation_type: sum - label_set: - - version - - action: update - include: otelcol_process_memory_rss - new_name: agent/memory_usage - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: [] - - action: update - include: rpc.client.call.duration_count - new_name: agent/api_request_count - operations: - - action: update_label - label: rpc.response.status_code - value_actions: - - new_value: ABORTED - value: Aborted - - new_value: ALREADY_EXISTS - value: AlreadyExists - - new_value: CANCELLED - value: Canceled - - new_value: CANCELLED - value: Cancelled - - new_value: DATA_LOSS - value: DataLoss - - new_value: DEADLINE_EXCEEDED - value: DeadlineExceeded - - new_value: DEADLINE_EXCEEDED - value: Deadline_Exceeded - - new_value: FAILED_PRECONDITION - value: FailedPrecondition - - new_value: INTERNAL - value: Internal - - new_value: INVALID_ARGUMENT - value: InvalidArgument - - new_value: NOT_FOUND - value: NotFound - - new_value: OK - value: OK - - new_value: OUT_OF_RANGE - value: OutOfRange - - new_value: PERMISSION_DENIED - value: PermissionDenied - - new_value: RESOURCE_EXHAUSTED - value: ResourceExhausted - - new_value: UNKNOWN - value: Shutdown - - new_value: UNAUTHENTICATED - value: Unauthenticated - - new_value: UNAVAILABLE - value: Unavailable - - new_value: UNIMPLEMENTED - value: Unimplemented - - new_value: UNKNOWN - value: Unknown - - new_value: CANCELLED - value: canceled - - new_value: CANCELLED - value: cancelled - - new_value: DEADLINE_EXCEEDED - value: deadline_exceeded - - new_value: UNKNOWN - value: shutdown - - action: update_label - label: rpc.response.status_code - new_label: state - - action: aggregate_labels - aggregation_type: sum - label_set: - - state - - action: update - include: otelcol_exporter_sent_metric_points - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: status - new_value: OK - - action: aggregate_labels - aggregation_type: sum - label_set: - - status - - action: update - include: otelcol_exporter_send_failed_metric_points - operations: - - action: toggle_scalar_data_type - - action: update_label - label: error.type - new_label: status - - action: update_label - label: status - value_actions: - - new_value: ABORTED - value: Aborted - - new_value: ALREADY_EXISTS - value: AlreadyExists - - new_value: CANCELLED - value: Canceled - - new_value: CANCELLED - value: Cancelled - - new_value: DATA_LOSS - value: DataLoss - - new_value: DEADLINE_EXCEEDED - value: DeadlineExceeded - - new_value: DEADLINE_EXCEEDED - value: Deadline_Exceeded - - new_value: FAILED_PRECONDITION - value: FailedPrecondition - - new_value: INTERNAL - value: Internal - - new_value: INVALID_ARGUMENT - value: InvalidArgument - - new_value: NOT_FOUND - value: NotFound - - new_value: OK - value: OK - - new_value: OUT_OF_RANGE - value: OutOfRange - - new_value: PERMISSION_DENIED - value: PermissionDenied - - new_value: RESOURCE_EXHAUSTED - value: ResourceExhausted - - new_value: UNKNOWN - value: Shutdown - - new_value: UNAUTHENTICATED - value: Unauthenticated - - new_value: UNAVAILABLE - value: Unavailable - - new_value: UNIMPLEMENTED - value: Unimplemented - - new_value: UNKNOWN - value: Unknown - - new_value: CANCELLED - value: canceled - - new_value: CANCELLED - value: cancelled - - new_value: DEADLINE_EXCEEDED - value: deadline_exceeded - - new_value: UNKNOWN - value: shutdown - - action: aggregate_labels - aggregation_type: sum - label_set: - - status - - action: combine - include: otelcol_exporter_sent_metric_points|otelcol_exporter_send_failed_metric_points - match_type: regexp - new_name: agent/monitoring/point_count - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: - - status - submatch_case: lower - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - resource/otlp_grpc/otlp_logs_logs_0: - attributes: - - action: insert - key: gcp.project_id - value: test-project - resource/otlp_grpc/otlp_logs_logs_1: - attributes: - - action: insert - key: gcp.use_legacy_mapping - value: "true" - resource/otlp_grpc/otlp_metrics_metrics_0: - attributes: - - action: insert - key: gcp.project_id - value: test-project - resourcedetection/_global_0: - detectors: - - gcp - transform/agent_prometheus_0: - metric_statements: - - context: resource - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.version") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "server.port") - - delete_key(attributes, "url.scheme") - transform/agent_prometheus_1: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/agent_prometheus_2: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/hostmetrics_3: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/hostmetrics_4: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/iis_1: - metric_statements: - - context: metric - statements: - - convert_gauge_to_sum("cumulative", true) where name == "agent.googleapis.com/iis/network/transferred_bytes_count" - - convert_gauge_to_sum("cumulative", true) where name == "agent.googleapis.com/iis/new_connection_count" - - convert_gauge_to_sum("cumulative", true) where name == "agent.googleapis.com/iis/request_count" - transform/iis_3: - metric_statements: - - context: scope - statements: - - set(name, "agent.googleapis.com/iis") - - set(version, "1.0") - transform/iis_4: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/iis_5: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/loggingmetrics_0: - error_mode: ignore - metric_statements: - - context: metric - statements: - - extract_count_metric(true) where name == "rpc.client.call.duration" - transform/loggingmetrics_4: - metric_statements: - - context: metric - statements: - - set(unit, "1") - transform/logs_0: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], attributes["compute.googleapis.com/instance_group_manager/name"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/name"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], attributes["compute.googleapis.com/instance_group_manager/zone"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/zone"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], attributes["compute.googleapis.com/resource_name"]) where (attributes != nil and attributes["compute.googleapis.com/resource_name"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], attributes["gcp.log_name"]) where (attributes != nil and attributes["gcp.log_name"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(cache["value"], "test-mig") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(cache["value"], "test-zone") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/zone"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(attributes["compute.googleapis.com/resource_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], "logs") where cache["value"] == nil - - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - transform/logs_test-pipeline_logs_0: - error_mode: ignore - log_statements: - - context: log - statements: - - "set(cache[\"__parsed_regex\"], ExtractPatternsRubyRegex(body[\"message\"], \"^(?\\\\d+:\\\\d+:\\\\d+) \\\\((?.*)\\\\) (?IN|OUT|DENIED): \\\"(?.*)\\\" (?.*)\\\\@(?[\\\\w\\\\d\\\\-Â\\u00a0]+)[^ ]* (?
.*)$\", true)) where ((body != nil and body[\"message\"] != nil) and IsMatchRubyRegex(body[\"message\"], \"^(?\\\\d+:\\\\d+:\\\\d+) \\\\((?.*)\\\\) (?IN|OUT|DENIED): \\\"(?.*)\\\" (?.*)\\\\@(?[\\\\w\\\\d\\\\-Â\\u00a0]+)[^ ]* (?
.*)$\"))" - - delete_key(body, "message") where ((body != nil and body["message"] != nil) and (cache != nil and cache["__parsed_regex"] != nil)) - - merge_maps(body, cache["__parsed_regex"], "upsert") where (cache != nil and cache["__parsed_regex"] != nil) - - delete_key(cache, "__parsed_regex") where (cache != nil and cache["__parsed_regex"] != nil) - - set(cache["__time_valid"], false) - - set(cache["__time_valid"], true) where ((body != nil and body["LogTimeStamp"] != nil) and Time(body["LogTimeStamp"], "%H:%M:%S") != nil) - - set(time, Time(body["LogTimeStamp"], "%H:%M:%S")) where cache["__time_valid"] == true - - delete_key(body, "LogTimeStamp") where ((body != nil and body["LogTimeStamp"] != nil) and cache["__time_valid"] == true) - - merge_maps(attributes, body["logging.googleapis.com/labels"], "upsert") where body["logging.googleapis.com/labels"] != nil - - delete_key(body, "logging.googleapis.com/labels") where (body != nil and body["logging.googleapis.com/labels"] != nil) - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/httpRequest"]) where (body != nil and body["logging.googleapis.com/httpRequest"] != nil) - - delete_key(body, "logging.googleapis.com/httpRequest") where (body != nil and body["logging.googleapis.com/httpRequest"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(attributes["gcp.http_request"], cache["value"]) where (cache != nil and cache["value"] != nil) - - set(attributes["gcp.http_request"]["status"], Int(attributes["gcp.http_request"]["status"])) where attributes["gcp.http_request"]["status"] != nil - - set(attributes["gcp.http_request"]["responseSize"], Int(attributes["gcp.http_request"]["responseSize"])) where attributes["gcp.http_request"]["responseSize"] != nil - - set(attributes["gcp.http_request"]["requestSize"], Int(attributes["gcp.http_request"]["requestSize"])) where attributes["gcp.http_request"]["requestSize"] != nil - - set(attributes["gcp.http_request"]["cacheFillBytes"], Int(attributes["gcp.http_request"]["cacheFillBytes"])) where attributes["gcp.http_request"]["cacheFillBytes"] != nil - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/logName"]) where (body != nil and body["logging.googleapis.com/logName"] != nil) - - delete_key(body, "logging.googleapis.com/logName") where (body != nil and body["logging.googleapis.com/logName"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/severity"]) where (body != nil and body["logging.googleapis.com/severity"] != nil) - - delete_key(body, "logging.googleapis.com/severity") where (body != nil and body["logging.googleapis.com/severity"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(severity_text, cache["value"]) where (cache != nil and cache["value"] != nil) - - set(severity_number, 0) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/sourceLocation"]) where (body != nil and body["logging.googleapis.com/sourceLocation"] != nil) - - delete_key(body, "logging.googleapis.com/sourceLocation") where (body != nil and body["logging.googleapis.com/sourceLocation"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(attributes["gcp.source_location"], cache["value"]) where (cache != nil and cache["value"] != nil) - - set(attributes["gcp.source_location"]["line"], Int(attributes["gcp.source_location"]["line"])) where attributes["gcp.source_location"]["line"] != nil - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/spanId"]) where (body != nil and body["logging.googleapis.com/spanId"] != nil) - - delete_key(body, "logging.googleapis.com/spanId") where (body != nil and body["logging.googleapis.com/spanId"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(span_id.string, cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/trace"]) where (body != nil and body["logging.googleapis.com/trace"] != nil) - - delete_key(body, "logging.googleapis.com/trace") where (body != nil and body["logging.googleapis.com/trace"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - delete_key(cache, "__setif_value") where (cache != nil and cache["__setif_value"] != nil) - - set(cache["__setif_value"], cache["value"]) - - replace_pattern(cache["__setif_value"], "^projects/([^/]*)/traces/", "") - - set(trace_id.string, cache["__setif_value"]) where (cache != nil and cache["value"] != nil) - - set(attributes["gcp.source_location"]["func"], attributes["gcp.source_location"]["function"]) where (attributes != nil and attributes["gcp.source_location"] != nil and attributes["gcp.source_location"]["function"] != nil) - - delete_key(attributes["gcp.source_location"], "function") where ((attributes != nil and attributes["gcp.source_location"] != nil and attributes["gcp.source_location"]["function"] != nil) and (attributes != nil and attributes["gcp.source_location"] != nil and attributes["gcp.source_location"]["func"] != nil)) - transform/mssql_1: - metric_statements: - - context: scope - statements: - - set(name, "agent.googleapis.com/mssql") - - set(version, "1.0") - transform/mssql_2: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/mssql_3: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/ops_agent_0: - error_mode: ignore - metric_statements: - - context: datapoint - statements: - - set(time, Now()) - transform/ops_agent_1: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/ops_agent_2: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/otel_0: - error_mode: ignore - metric_statements: - - context: metric - statements: - - extract_count_metric(true) where name == "rpc.client.call.duration" - transform/otlp_grpc/otlp_logs_logs_2: - error_mode: ignore - log_statements: - - context: log - statements: - - set(attributes["instrumentation_source"], instrumentation_scope.name) where instrumentation_scope.name != "" - - set(attributes["instrumentation_version"], instrumentation_scope.version) where instrumentation_scope.version != "" - transform/otlp_grpc/otlp_logs_logs_3: - error_mode: ignore - log_statements: - - context: log - statements: - - set(attributes["service.name"], resource.attributes["service.name"]) where resource.attributes["service.name"] != nil - - set(attributes["service.namespace"], resource.attributes["service.namespace"]) where resource.attributes["service.namespace"] != nil - - set(attributes["service.instance.id"], resource.attributes["service.instance.id"]) where resource.attributes["service.instance.id"] != nil - transform/windows__event__log_0: - error_mode: ignore - log_statements: - - context: log - statements: - - set(body["parsed_xml"], ParseSimplifiedXML(attributes["log.record.original"])) where (attributes != nil and attributes["log.record.original"] != nil) - - delete_key(attributes, "log.record.original") where (attributes != nil and attributes["log.record.original"] != nil) - transform/windows__event__log_1: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["channel"]) where (body != nil and body["channel"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], body["computer"]) where (body != nil and body["computer"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], body["event_data"]["binary"]) where (body != nil and body["event_data"] != nil and body["event_data"]["binary"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], body["parsed_xml"]["Event"]["System"]["Task"]) where (body != nil and body["parsed_xml"] != nil and body["parsed_xml"]["Event"] != nil and body["parsed_xml"]["Event"]["System"] != nil and body["parsed_xml"]["Event"]["System"]["Task"] != nil) - - delete_key(cache, "__field_4") where (cache != nil and cache["__field_4"] != nil) - - set(cache["__field_4"], body["event_id"]["id"]) where (body != nil and body["event_id"] != nil and body["event_id"]["id"] != nil) - - delete_key(cache, "__field_5") where (cache != nil and cache["__field_5"] != nil) - - set(cache["__field_5"], body["level"]) where (body != nil and body["level"] != nil) - - delete_key(cache, "__field_6") where (cache != nil and cache["__field_6"] != nil) - - set(cache["__field_6"], body["parsed_xml"]["Event"]["RenderingInfo"]["Message"]) where (body != nil and body["parsed_xml"] != nil and body["parsed_xml"]["Event"] != nil and body["parsed_xml"]["Event"]["RenderingInfo"] != nil and body["parsed_xml"]["Event"]["RenderingInfo"]["Message"] != nil) - - delete_key(cache, "__field_7") where (cache != nil and cache["__field_7"] != nil) - - set(cache["__field_7"], body["event_id"]["qualifiers"]) where (body != nil and body["event_id"] != nil and body["event_id"]["qualifiers"] != nil) - - delete_key(cache, "__field_8") where (cache != nil and cache["__field_8"] != nil) - - set(cache["__field_8"], body["record_id"]) where (body != nil and body["record_id"] != nil) - - delete_key(cache, "__field_9") where (cache != nil and cache["__field_9"] != nil) - - set(cache["__field_9"], body["security"]["user_id"]) where (body != nil and body["security"] != nil and body["security"]["user_id"] != nil) - - delete_key(cache, "__field_10") where (cache != nil and cache["__field_10"] != nil) - - set(cache["__field_10"], body["provider"]["name"]) where (body != nil and body["provider"] != nil and body["provider"]["name"] != nil) - - delete_key(cache, "__field_11") where (cache != nil and cache["__field_11"] != nil) - - set(cache["__field_11"], body["event_data"]["data"]) where (body != nil and body["event_data"] != nil and body["event_data"]["data"] != nil) - - delete_key(cache, "__field_12") where (cache != nil and cache["__field_12"] != nil) - - set(cache["__field_12"], body["system_time"]) where (body != nil and body["system_time"] != nil) - - set(cache["body"], body) - - keep_keys(body, []) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(body["Channel"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(body["ComputerName"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(cache["value"], ConvertCase(cache["value"], "lower")) - - set(body["Data"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], Int(cache["value"])) - - set(body["EventCategory"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_4"]) - - set(body["EventID"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_5"]) - - set(cache["value"], "SuccessAudit") where ContainsValue(cache["body"]["keywords"], "Audit Success") - - set(cache["value"], "FailureAudit") where ContainsValue(cache["body"]["keywords"], "Audit Failure") - - set(body["EventType"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_6"]) - - set(body["Message"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_7"]) - - set(body["Qualifiers"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_8"]) - - set(body["RecordNumber"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_9"]) - - set(cache["value"], "") where cache["value"] == nil - - set(body["Sid"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_10"]) - - set(cache["value"], cache["body"]["provider"]["event_source"]) where ((cache != nil and cache["body"] != nil and cache["body"]["provider"] != nil and cache["body"]["provider"]["event_source"] != nil) and (not cache["body"]["provider"]["event_source"] == "")) - - set(body["SourceName"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_11"]) - - set(cache["value"], ToValues(cache["value"])) where (cache != nil and cache["value"] != nil) - - set(body["StringInserts"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_12"]) - - set(cache["value"], FormatTime(Time(cache["value"], "%Y-%m-%dT%T.%sZ"), "%Y-%m-%d %T.%s +0000")) - - set(body["TimeGenerated"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_12"]) - - set(cache["value"], FormatTime(Time(cache["value"], "%Y-%m-%dT%T.%sZ"), "%Y-%m-%d %T.%s +0000")) - - set(body["TimeWritten"], cache["value"]) where (cache != nil and cache["value"] != nil) - transform/windows__event__log_1_0: - error_mode: ignore - log_statements: - - context: log - statements: - - set(body["parsed_xml"], ParseSimplifiedXML(attributes["log.record.original"])) where (attributes != nil and attributes["log.record.original"] != nil) - - delete_key(attributes, "log.record.original") where (attributes != nil and attributes["log.record.original"] != nil) - transform/windows__event__log_1_1: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["channel"]) where (body != nil and body["channel"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], body["computer"]) where (body != nil and body["computer"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], body["event_data"]["binary"]) where (body != nil and body["event_data"] != nil and body["event_data"]["binary"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], body["parsed_xml"]["Event"]["System"]["Task"]) where (body != nil and body["parsed_xml"] != nil and body["parsed_xml"]["Event"] != nil and body["parsed_xml"]["Event"]["System"] != nil and body["parsed_xml"]["Event"]["System"]["Task"] != nil) - - delete_key(cache, "__field_4") where (cache != nil and cache["__field_4"] != nil) - - set(cache["__field_4"], body["event_id"]["id"]) where (body != nil and body["event_id"] != nil and body["event_id"]["id"] != nil) - - delete_key(cache, "__field_5") where (cache != nil and cache["__field_5"] != nil) - - set(cache["__field_5"], body["level"]) where (body != nil and body["level"] != nil) - - delete_key(cache, "__field_6") where (cache != nil and cache["__field_6"] != nil) - - set(cache["__field_6"], body["parsed_xml"]["Event"]["RenderingInfo"]["Message"]) where (body != nil and body["parsed_xml"] != nil and body["parsed_xml"]["Event"] != nil and body["parsed_xml"]["Event"]["RenderingInfo"] != nil and body["parsed_xml"]["Event"]["RenderingInfo"]["Message"] != nil) - - delete_key(cache, "__field_7") where (cache != nil and cache["__field_7"] != nil) - - set(cache["__field_7"], body["event_id"]["qualifiers"]) where (body != nil and body["event_id"] != nil and body["event_id"]["qualifiers"] != nil) - - delete_key(cache, "__field_8") where (cache != nil and cache["__field_8"] != nil) - - set(cache["__field_8"], body["record_id"]) where (body != nil and body["record_id"] != nil) - - delete_key(cache, "__field_9") where (cache != nil and cache["__field_9"] != nil) - - set(cache["__field_9"], body["security"]["user_id"]) where (body != nil and body["security"] != nil and body["security"]["user_id"] != nil) - - delete_key(cache, "__field_10") where (cache != nil and cache["__field_10"] != nil) - - set(cache["__field_10"], body["provider"]["name"]) where (body != nil and body["provider"] != nil and body["provider"]["name"] != nil) - - delete_key(cache, "__field_11") where (cache != nil and cache["__field_11"] != nil) - - set(cache["__field_11"], body["event_data"]["data"]) where (body != nil and body["event_data"] != nil and body["event_data"]["data"] != nil) - - delete_key(cache, "__field_12") where (cache != nil and cache["__field_12"] != nil) - - set(cache["__field_12"], body["system_time"]) where (body != nil and body["system_time"] != nil) - - set(cache["body"], body) - - keep_keys(body, []) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(body["Channel"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(body["ComputerName"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(cache["value"], ConvertCase(cache["value"], "lower")) - - set(body["Data"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], Int(cache["value"])) - - set(body["EventCategory"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_4"]) - - set(body["EventID"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_5"]) - - set(cache["value"], "SuccessAudit") where ContainsValue(cache["body"]["keywords"], "Audit Success") - - set(cache["value"], "FailureAudit") where ContainsValue(cache["body"]["keywords"], "Audit Failure") - - set(body["EventType"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_6"]) - - set(body["Message"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_7"]) - - set(body["Qualifiers"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_8"]) - - set(body["RecordNumber"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_9"]) - - set(cache["value"], "") where cache["value"] == nil - - set(body["Sid"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_10"]) - - set(cache["value"], cache["body"]["provider"]["event_source"]) where ((cache != nil and cache["body"] != nil and cache["body"]["provider"] != nil and cache["body"]["provider"]["event_source"] != nil) and (not cache["body"]["provider"]["event_source"] == "")) - - set(body["SourceName"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_11"]) - - set(cache["value"], ToValues(cache["value"])) where (cache != nil and cache["value"] != nil) - - set(body["StringInserts"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_12"]) - - set(cache["value"], FormatTime(Time(cache["value"], "%Y-%m-%dT%T.%sZ"), "%Y-%m-%d %T.%s +0000")) - - set(body["TimeGenerated"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_12"]) - - set(cache["value"], FormatTime(Time(cache["value"], "%Y-%m-%dT%T.%sZ"), "%Y-%m-%d %T.%s +0000")) - - set(body["TimeWritten"], cache["value"]) where (cache != nil and cache["value"] != nil) - transform/windows__event__log_1_2: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], attributes["compute.googleapis.com/instance_group_manager/name"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/name"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], attributes["compute.googleapis.com/instance_group_manager/zone"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/zone"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], attributes["compute.googleapis.com/resource_name"]) where (attributes != nil and attributes["compute.googleapis.com/resource_name"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], attributes["gcp.log_name"]) where (attributes != nil and attributes["gcp.log_name"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(cache["value"], "test-mig") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(cache["value"], "test-zone") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/zone"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(attributes["compute.googleapis.com/resource_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], "windows_event_log") where cache["value"] == nil - - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - transform/windows__event__log_2: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], attributes["compute.googleapis.com/instance_group_manager/name"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/name"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], attributes["compute.googleapis.com/instance_group_manager/zone"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/zone"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], attributes["compute.googleapis.com/resource_name"]) where (attributes != nil and attributes["compute.googleapis.com/resource_name"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], attributes["gcp.log_name"]) where (attributes != nil and attributes["gcp.log_name"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(cache["value"], "test-mig") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(cache["value"], "test-zone") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/zone"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(attributes["compute.googleapis.com/resource_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], "windows_event_log") where cache["value"] == nil - - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - transform/windows__event__log_2_0: - error_mode: ignore - log_statements: - - context: log - statements: - - set(body["parsed_xml"], ParseSimplifiedXML(attributes["log.record.original"])) where (attributes != nil and attributes["log.record.original"] != nil) - - delete_key(attributes, "log.record.original") where (attributes != nil and attributes["log.record.original"] != nil) - transform/windows__event__log_2_1: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["channel"]) where (body != nil and body["channel"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], body["computer"]) where (body != nil and body["computer"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], body["event_data"]["binary"]) where (body != nil and body["event_data"] != nil and body["event_data"]["binary"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], body["parsed_xml"]["Event"]["System"]["Task"]) where (body != nil and body["parsed_xml"] != nil and body["parsed_xml"]["Event"] != nil and body["parsed_xml"]["Event"]["System"] != nil and body["parsed_xml"]["Event"]["System"]["Task"] != nil) - - delete_key(cache, "__field_4") where (cache != nil and cache["__field_4"] != nil) - - set(cache["__field_4"], body["event_id"]["id"]) where (body != nil and body["event_id"] != nil and body["event_id"]["id"] != nil) - - delete_key(cache, "__field_5") where (cache != nil and cache["__field_5"] != nil) - - set(cache["__field_5"], body["level"]) where (body != nil and body["level"] != nil) - - delete_key(cache, "__field_6") where (cache != nil and cache["__field_6"] != nil) - - set(cache["__field_6"], body["parsed_xml"]["Event"]["RenderingInfo"]["Message"]) where (body != nil and body["parsed_xml"] != nil and body["parsed_xml"]["Event"] != nil and body["parsed_xml"]["Event"]["RenderingInfo"] != nil and body["parsed_xml"]["Event"]["RenderingInfo"]["Message"] != nil) - - delete_key(cache, "__field_7") where (cache != nil and cache["__field_7"] != nil) - - set(cache["__field_7"], body["event_id"]["qualifiers"]) where (body != nil and body["event_id"] != nil and body["event_id"]["qualifiers"] != nil) - - delete_key(cache, "__field_8") where (cache != nil and cache["__field_8"] != nil) - - set(cache["__field_8"], body["record_id"]) where (body != nil and body["record_id"] != nil) - - delete_key(cache, "__field_9") where (cache != nil and cache["__field_9"] != nil) - - set(cache["__field_9"], body["security"]["user_id"]) where (body != nil and body["security"] != nil and body["security"]["user_id"] != nil) - - delete_key(cache, "__field_10") where (cache != nil and cache["__field_10"] != nil) - - set(cache["__field_10"], body["provider"]["name"]) where (body != nil and body["provider"] != nil and body["provider"]["name"] != nil) - - delete_key(cache, "__field_11") where (cache != nil and cache["__field_11"] != nil) - - set(cache["__field_11"], body["event_data"]["data"]) where (body != nil and body["event_data"] != nil and body["event_data"]["data"] != nil) - - delete_key(cache, "__field_12") where (cache != nil and cache["__field_12"] != nil) - - set(cache["__field_12"], body["system_time"]) where (body != nil and body["system_time"] != nil) - - set(cache["body"], body) - - keep_keys(body, []) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(body["Channel"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(body["ComputerName"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(cache["value"], ConvertCase(cache["value"], "lower")) - - set(body["Data"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], Int(cache["value"])) - - set(body["EventCategory"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_4"]) - - set(body["EventID"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_5"]) - - set(cache["value"], "SuccessAudit") where ContainsValue(cache["body"]["keywords"], "Audit Success") - - set(cache["value"], "FailureAudit") where ContainsValue(cache["body"]["keywords"], "Audit Failure") - - set(body["EventType"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_6"]) - - set(body["Message"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_7"]) - - set(body["Qualifiers"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_8"]) - - set(body["RecordNumber"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_9"]) - - set(cache["value"], "") where cache["value"] == nil - - set(body["Sid"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_10"]) - - set(cache["value"], cache["body"]["provider"]["event_source"]) where ((cache != nil and cache["body"] != nil and cache["body"]["provider"] != nil and cache["body"]["provider"]["event_source"] != nil) and (not cache["body"]["provider"]["event_source"] == "")) - - set(body["SourceName"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_11"]) - - set(cache["value"], ToValues(cache["value"])) where (cache != nil and cache["value"] != nil) - - set(body["StringInserts"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_12"]) - - set(cache["value"], FormatTime(Time(cache["value"], "%Y-%m-%dT%T.%sZ"), "%Y-%m-%d %T.%s +0000")) - - set(body["TimeGenerated"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_12"]) - - set(cache["value"], FormatTime(Time(cache["value"], "%Y-%m-%dT%T.%sZ"), "%Y-%m-%d %T.%s +0000")) - - set(body["TimeWritten"], cache["value"]) where (cache != nil and cache["value"] != nil) - transform/windows__event__log_2_2: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], attributes["compute.googleapis.com/instance_group_manager/name"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/name"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], attributes["compute.googleapis.com/instance_group_manager/zone"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/zone"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], attributes["compute.googleapis.com/resource_name"]) where (attributes != nil and attributes["compute.googleapis.com/resource_name"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], attributes["gcp.log_name"]) where (attributes != nil and attributes["gcp.log_name"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(cache["value"], "test-mig") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(cache["value"], "test-zone") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/zone"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(attributes["compute.googleapis.com/resource_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], "windows_event_log") where cache["value"] == nil - - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) -receivers: - file_log/logs: - exclude: [] - fingerprint_size: 5kb - include: - - /tmp/*.log - include_file_name: false - operators: - - from: body - id: body - to: body.message - type: move - preserve_leading_whitespaces: true - preserve_trailing_whitespaces: true - start_at: beginning - storage: file_storage - hostmetrics/hostmetrics: - collection_interval: 60s - scrapers: - cpu: {} - disk: {} - filesystem: {} - load: {} - memory: {} - network: {} - paging: {} - process: - metrics: - process.handles: - enabled: true - mute_process_all_errors: true - mute_process_exe_error: true - mute_process_name_error: true - processes: {} - otlpjsonfile/ops_agent: - include: - - enabled_receivers_otlp.json - - feature_tracking_otlp.json - poll_interval: 1m0s - replay_file: true - prometheus/agent_prometheus: - config: - scrape_configs: - - job_name: otel-collector - scrape_interval: 1m - static_configs: - - targets: - - 0.0.0.0:20201 - windowseventlog/windows__event__log: - channel: System - event_data_format: array - ignore_channel_errors: true - include_log_record_original: true - poll_interval: 1s - start_at: beginning - storage: file_storage - windowseventlog/windows__event__log_1: - channel: Application - event_data_format: array - ignore_channel_errors: true - include_log_record_original: true - poll_interval: 1s - start_at: beginning - storage: file_storage - windowseventlog/windows__event__log_2: - channel: Security - event_data_format: array - ignore_channel_errors: true - include_log_record_original: true - poll_interval: 1s - start_at: beginning - storage: file_storage - windowsperfcounters/iis: - collection_interval: 60s - perfcounters: - - counters: - - name: Current Connections - - name: Total Bytes Received - - name: Total Bytes Sent - - name: Total Connection Attempts (all instances) - - name: Total Delete Requests - - name: Total Get Requests - - name: Total Head Requests - - name: Total Options Requests - - name: Total Post Requests - - name: Total Put Requests - - name: Total Trace Requests - instances: - - _Total - object: Web Service - windowsperfcounters/mssql: - collection_interval: 60s - perfcounters: - - counters: - - name: User Connections - instances: - - _Total - object: SQLServer:General Statistics - - counters: - - name: Transactions/sec - - name: Write Transactions/sec - instances: - - _Total - object: SQLServer:Databases -service: - extensions: - - file_storage - - googleclientauth - pipelines: - logs/logs_default__pipeline_windows__event__log: - exporters: - - otlp_grpc/otlp_logs - processors: - - transform/windows__event__log_0 - - transform/windows__event__log_1 - - transform/windows__event__log_2 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_logs_logs_0 - - resource/otlp_grpc/otlp_logs_logs_1 - - transform/otlp_grpc/otlp_logs_logs_2 - - transform/otlp_grpc/otlp_logs_logs_3 - receivers: - - windowseventlog/windows__event__log - logs/logs_default__pipeline_windows__event__log_1: - exporters: - - otlp_grpc/otlp_logs - processors: - - transform/windows__event__log_1_0 - - transform/windows__event__log_1_1 - - transform/windows__event__log_1_2 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_logs_logs_0 - - resource/otlp_grpc/otlp_logs_logs_1 - - transform/otlp_grpc/otlp_logs_logs_2 - - transform/otlp_grpc/otlp_logs_logs_3 - receivers: - - windowseventlog/windows__event__log_1 - logs/logs_default__pipeline_windows__event__log_2: - exporters: - - otlp_grpc/otlp_logs - processors: - - transform/windows__event__log_2_0 - - transform/windows__event__log_2_1 - - transform/windows__event__log_2_2 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_logs_logs_0 - - resource/otlp_grpc/otlp_logs_logs_1 - - transform/otlp_grpc/otlp_logs_logs_2 - - transform/otlp_grpc/otlp_logs_logs_3 - receivers: - - windowseventlog/windows__event__log_2 - logs/logs_test-pipeline_logs: - exporters: - - otlp_grpc/otlp_logs - processors: - - transform/logs_0 - - transform/logs_test-pipeline_logs_0 - - filter/logs_test-pipeline_logs_1 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_logs_logs_0 - - resource/otlp_grpc/otlp_logs_logs_1 - - transform/otlp_grpc/otlp_logs_logs_2 - - transform/otlp_grpc/otlp_logs_logs_3 - receivers: - - file_log/logs - metrics/default__pipeline_hostmetrics: - exporters: - - otlp_grpc/otlp_metrics - processors: - - agentmetrics/hostmetrics_0 - - filter/hostmetrics_1 - - metricstransform/hostmetrics_2 - - transform/hostmetrics_3 - - transform/hostmetrics_4 - - filter/default__pipeline_hostmetrics_0 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - hostmetrics/hostmetrics - metrics/default__pipeline_iis: - exporters: - - otlp_grpc/otlp_metrics - processors: - - metricstransform/iis_0 - - transform/iis_1 - - metric_start_time/iis_2 - - transform/iis_3 - - transform/iis_4 - - transform/iis_5 - - filter/default__pipeline_iis_0 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - windowsperfcounters/iis - metrics/default__pipeline_mssql: - exporters: - - otlp_grpc/otlp_metrics - processors: - - metricstransform/mssql_0 - - transform/mssql_1 - - transform/mssql_2 - - transform/mssql_3 - - filter/default__pipeline_mssql_0 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - windowsperfcounters/mssql - metrics/loggingmetrics: - exporters: - - otlp_grpc/otlp_metrics - processors: - - transform/agent_prometheus_0 - - transform/agent_prometheus_1 - - transform/agent_prometheus_2 - - transform/loggingmetrics_0 - - filter/loggingmetrics_1 - - filter/loggingmetrics_2 - - metricstransform/loggingmetrics_3 - - transform/loggingmetrics_4 - - interval/loggingmetrics_5 - - metricstransform/loggingmetrics_6 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - prometheus/agent_prometheus - metrics/opsagent: - exporters: - - otlp_grpc/otlp_metrics - processors: - - transform/ops_agent_0 - - transform/ops_agent_1 - - transform/ops_agent_2 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - otlpjsonfile/ops_agent - metrics/otel: - exporters: - - otlp_grpc/otlp_metrics - processors: - - transform/agent_prometheus_0 - - transform/agent_prometheus_1 - - transform/agent_prometheus_2 - - transform/otel_0 - - filter/otel_1 - - filter/otel_2 - - metricstransform/otel_3 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - prometheus/agent_prometheus - telemetry: - metrics: - level: detailed - readers: - - pull: - exporter: - prometheus: - host: 0.0.0.0 - port: 20201 - without_scope_info: true - without_type_suffix: true - without_units: true diff --git a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows/enabled_receivers_otlp.json b/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows/enabled_receivers_otlp.json deleted file mode 100644 index 40de3d48d4..0000000000 --- a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows/enabled_receivers_otlp.json +++ /dev/null @@ -1 +0,0 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/ops_agent/enabled_receivers","gauge":{"dataPoints":[{"attributes":[{"key":"telemetry_type","value":{"stringValue":"metrics"}},{"key":"receiver_type","value":{"stringValue":"hostmetrics"}}],"asInt":"1"},{"attributes":[{"key":"telemetry_type","value":{"stringValue":"metrics"}},{"key":"receiver_type","value":{"stringValue":"iis"}}],"asInt":"1"},{"attributes":[{"key":"telemetry_type","value":{"stringValue":"metrics"}},{"key":"receiver_type","value":{"stringValue":"mssql"}}],"asInt":"1"},{"attributes":[{"key":"telemetry_type","value":{"stringValue":"logs"}},{"key":"receiver_type","value":{"stringValue":"files"}}],"asInt":"1"},{"attributes":[{"key":"telemetry_type","value":{"stringValue":"logs"}},{"key":"receiver_type","value":{"stringValue":"windows_event_log"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows/feature_tracking_otlp.json deleted file mode 100644 index 5d7b2518b1..0000000000 --- a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows/feature_tracking_otlp.json +++ /dev/null @@ -1 +0,0 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:files"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:files"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"processors:parse_regex"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"processors:exclude_logs"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"processors:exclude_logs"}},{"key":"key","value":{"stringValue":"[1].match_any.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:service"}},{"key":"key","value":{"stringValue":"pipelines.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:service"}},{"key":"key","value":{"stringValue":"pipelines.[0].receivers.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:service"}},{"key":"key","value":{"stringValue":"pipelines.[0].processors.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows/features.yaml b/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows/features.yaml deleted file mode 100644 index d06a008a45..0000000000 --- a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows/features.yaml +++ /dev/null @@ -1,48 +0,0 @@ -- module: logging - feature: service:pipelines - key: default_pipeline_overridden - value: "false" -- module: metrics - feature: service:pipelines - key: default_pipeline_overridden - value: "false" -- module: global - feature: default:self_log - key: default_self_log_file_collection - value: "true" -- module: logging - feature: service:otel_logging - key: otel_logging_supported_config - value: "true" -- module: logging - feature: receivers:files - key: "[0].enabled" - value: "true" -- module: logging - feature: receivers:files - key: "[0].include_paths.__length" - value: "1" -- module: logging - feature: processors:parse_regex - key: "[0].enabled" - value: "true" -- module: logging - feature: processors:exclude_logs - key: "[1].enabled" - value: "true" -- module: logging - feature: processors:exclude_logs - key: "[1].match_any.__length" - value: "1" -- module: logging - feature: service:service - key: pipelines.__length - value: "1" -- module: logging - feature: service:service - key: pipelines.[0].receivers.__length - value: "1" -- module: logging - feature: service:service - key: pipelines.[0].processors.__length - value: "2" diff --git a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows/otel.yaml b/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows/otel.yaml deleted file mode 100644 index 779b77cdbb..0000000000 --- a/confgenerator/testdata/goldens/logging-processor_exclude_logs_contains/golden/windows/otel.yaml +++ /dev/null @@ -1,1634 +0,0 @@ -exporters: - otlp_grpc/otlp_logs: - auth: - authenticator: googleclientauth - balancer_name: pick_first - endpoint: telemetry.googleapis.com:443 - sending_queue: - batch: - flush_timeout: 200ms - max_size: 5000000 - min_size: 1000000 - sizer: bytes - block_on_overflow: true - enabled: true - num_consumers: 10 - queue_size: 20000000 - sizer: bytes - storage: file_storage - user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - otlp_grpc/otlp_metrics: - auth: - authenticator: googleclientauth - balancer_name: pick_first - endpoint: telemetry.googleapis.com:443 - user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) -extensions: - file_storage: - create_directory: true - directory: file_storage - googleclientauth: {} -processors: - agentmetrics/hostmetrics_0: - blank_label_metrics: - - system.cpu.utilization - batch/otlp_grpc/otlp_metrics_metrics_2: - send_batch_max_size: 200 - send_batch_size: 200 - timeout: 200ms - filter/default__pipeline_hostmetrics_0: - metrics: - exclude: - match_type: regexp - metric_names: [] - filter/default__pipeline_iis_0: - metrics: - exclude: - match_type: regexp - metric_names: [] - filter/default__pipeline_mssql_0: - metrics: - exclude: - match_type: regexp - metric_names: [] - filter/hostmetrics_1: - metrics: - exclude: - match_type: strict - metric_names: - - system.network.dropped - - system.filesystem.inodes.usage - - system.paging.faults - - system.disk.operation_time - filter/loggingmetrics_1: - metrics: - datapoint: - - metric.name == "rpc.client.call.duration_count" and (not IsMatch(datapoint.attributes["rpc.method"], "opentelemetry.proto.collector.logs.v1.LogsService/Export")) - filter/loggingmetrics_2: - metrics: - include: - match_type: strict - metric_names: - - otelcol_exporter_sent_log_records - - otelcol_exporter_send_failed_log_records - - rpc.client.call.duration_count - filter/logs_test-pipeline_logs_1: - error_mode: ignore - logs: - log_record: - - ((body != nil and body["Status"] != nil) and IsMatchRubyRegex(body["Status"], "(?i)IN")) - filter/otel_1: - metrics: - datapoint: - - metric.name == "rpc.client.call.duration_count" and (not IsMatch(datapoint.attributes["rpc.method"], "opentelemetry.proto.collector.metrics.v1.MetricsService/Export")) - filter/otel_2: - metrics: - include: - match_type: strict - metric_names: - - otelcol_process_uptime - - otelcol_process_memory_rss - - otelcol_exporter_sent_metric_points - - otelcol_exporter_send_failed_metric_points - - rpc.client.call.duration_count - interval/loggingmetrics_5: - interval: 1m - metric_start_time/iis_2: - strategy: subtract_initial_point - metric_start_time/otlp_grpc/otlp_metrics_metrics_1: - strategy: subtract_initial_point - metricstransform/hostmetrics_2: - transforms: - - action: update - include: system.cpu.time - new_name: cpu/usage_time - operations: - - action: toggle_scalar_data_type - - action: update_label - label: cpu - new_label: cpu_number - - action: update_label - label: state - new_label: cpu_state - - action: update - include: system.cpu.utilization - new_name: cpu/utilization - operations: - - action: aggregate_labels - aggregation_type: mean - label_set: - - state - - blank - - action: update_label - label: blank - new_label: cpu_number - - action: update_label - label: state - new_label: cpu_state - - action: update - include: system.cpu.load_average.1m - new_name: cpu/load_1m - - action: update - include: system.cpu.load_average.5m - new_name: cpu/load_5m - - action: update - include: system.cpu.load_average.15m - new_name: cpu/load_15m - - action: update - include: system.disk.read_io - new_name: disk/read_bytes_count - - action: update - include: system.disk.write_io - new_name: disk/write_bytes_count - - action: update - include: system.disk.operations - new_name: disk/operation_count - - action: update - include: system.disk.io_time - new_name: disk/io_time - operations: - - action: experimental_scale_value - experimental_scale: 1000.0 - - action: toggle_scalar_data_type - - action: update - include: system.disk.weighted_io_time - new_name: disk/weighted_io_time - operations: - - action: experimental_scale_value - experimental_scale: 1000.0 - - action: toggle_scalar_data_type - - action: update - include: system.disk.average_operation_time - new_name: disk/operation_time - operations: - - action: experimental_scale_value - experimental_scale: 1000.0 - - action: toggle_scalar_data_type - - action: update - include: system.disk.pending_operations - new_name: disk/pending_operations - operations: - - action: toggle_scalar_data_type - - action: update - include: system.disk.merged - new_name: disk/merged_operations - - action: update - include: system.filesystem.usage - new_name: disk/bytes_used - operations: - - action: toggle_scalar_data_type - - action: aggregate_labels - aggregation_type: max - label_set: - - device - - state - - action: update - include: system.filesystem.utilization - new_name: disk/percent_used - operations: - - action: aggregate_labels - aggregation_type: max - label_set: - - device - - state - - action: update - include: system.memory.usage - new_name: memory/bytes_used - operations: - - action: toggle_scalar_data_type - - action: aggregate_label_values - aggregated_values: - - slab_reclaimable - - slab_unreclaimable - aggregation_type: sum - label: state - new_value: slab - - action: update - include: system.memory.utilization - new_name: memory/percent_used - operations: - - action: aggregate_label_values - aggregated_values: - - slab_reclaimable - - slab_unreclaimable - aggregation_type: sum - label: state - new_value: slab - - action: update - include: system.network.io - new_name: interface/traffic - operations: - - action: update_label - label: interface - new_label: device - - action: update_label - label: direction - value_actions: - - new_value: rx - value: receive - - new_value: tx - value: transmit - - action: update - include: system.network.errors - new_name: interface/errors - operations: - - action: update_label - label: interface - new_label: device - - action: update_label - label: direction - value_actions: - - new_value: rx - value: receive - - new_value: tx - value: transmit - - action: update - include: system.network.packets - new_name: interface/packets - operations: - - action: update_label - label: interface - new_label: device - - action: update_label - label: direction - value_actions: - - new_value: rx - value: receive - - new_value: tx - value: transmit - - action: update - include: system.network.connections - new_name: network/tcp_connections - operations: - - action: toggle_scalar_data_type - - action: delete_label_value - label: protocol - label_value: udp - - action: update_label - label: state - new_label: tcp_state - - action: aggregate_labels - aggregation_type: sum - label_set: - - tcp_state - - action: add_label - new_label: port - new_value: all - - action: update - include: system.processes.created - new_name: processes/fork_count - - action: update - include: system.processes.count - new_name: processes/count_by_state - operations: - - action: toggle_scalar_data_type - - action: update_label - label: status - new_label: state - - action: update - include: system.paging.usage - new_name: swap/bytes_used - operations: - - action: toggle_scalar_data_type - - action: update - include: system.paging.utilization - new_name: swap/percent_used - - action: insert - include: swap/percent_used - new_name: pagefile/percent_used - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: - - state - - action: update - include: system.paging.operations - new_name: swap/io - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: - - direction - - action: update_label - label: direction - value_actions: - - new_value: in - value: page_in - - new_value: out - value: page_out - - action: update - include: process.cpu.time - new_name: processes/cpu_time - operations: - - action: experimental_scale_value - experimental_scale: 1e+06 - - action: toggle_scalar_data_type - - action: add_label - new_label: process - new_value: all - - action: delete_label_value - label: state - label_value: wait - - action: update_label - label: state - new_label: user_or_syst - - action: update_label - label: user_or_syst - value_actions: - - new_value: syst - value: system - - action: update - include: process.disk.read_io - new_name: processes/disk/read_bytes_count - operations: - - action: add_label - new_label: process - new_value: all - - action: update - include: process.disk.write_io - new_name: processes/disk/write_bytes_count - operations: - - action: add_label - new_label: process - new_value: all - - action: update - include: process.memory.usage - new_name: processes/rss_usage - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: process - new_value: all - - action: update - include: process.memory.virtual - new_name: processes/vm_usage - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: process - new_value: all - - action: update - include: process.handles - new_name: processes/windows/handles - operations: - - action: add_label - new_label: process - new_value: all - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - metricstransform/iis_0: - transforms: - - action: update - include: "\\Web Service(_Total)\\Current Connections" - new_name: iis/current_connections - - action: combine - include: "^\\\\Web Service\\(_Total\\)\\\\Total Bytes (?P.*)$$" - match_type: regexp - new_name: iis/network/transferred_bytes_count - operations: - - action: toggle_scalar_data_type - submatch_case: lower - - action: update - include: "\\Web Service(_Total)\\Total Connection Attempts (all instances)" - new_name: iis/new_connection_count - operations: - - action: toggle_scalar_data_type - - action: combine - include: "^\\\\Web Service\\(_Total\\)\\\\Total (?P.*) Requests$$" - match_type: regexp - new_name: iis/request_count - operations: - - action: toggle_scalar_data_type - submatch_case: lower - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - metricstransform/loggingmetrics_3: - transforms: - - action: insert - include: otelcol_exporter_send_failed_log_records - new_name: agent/log_entry_retry_count - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: response_code - new_value: "400" - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - - action: update - include: rpc.client.call.duration_count - new_name: agent/request_count - operations: - - action: update_label - label: rpc.response.status_code - value_actions: - - new_value: ABORTED - value: Aborted - - new_value: ALREADY_EXISTS - value: AlreadyExists - - new_value: CANCELLED - value: Canceled - - new_value: CANCELLED - value: Cancelled - - new_value: DATA_LOSS - value: DataLoss - - new_value: DEADLINE_EXCEEDED - value: DeadlineExceeded - - new_value: DEADLINE_EXCEEDED - value: Deadline_Exceeded - - new_value: FAILED_PRECONDITION - value: FailedPrecondition - - new_value: INTERNAL - value: Internal - - new_value: INVALID_ARGUMENT - value: InvalidArgument - - new_value: NOT_FOUND - value: NotFound - - new_value: OK - value: OK - - new_value: OUT_OF_RANGE - value: OutOfRange - - new_value: PERMISSION_DENIED - value: PermissionDenied - - new_value: RESOURCE_EXHAUSTED - value: ResourceExhausted - - new_value: UNKNOWN - value: Shutdown - - new_value: UNAUTHENTICATED - value: Unauthenticated - - new_value: UNAVAILABLE - value: Unavailable - - new_value: UNIMPLEMENTED - value: Unimplemented - - new_value: UNKNOWN - value: Unknown - - new_value: CANCELLED - value: canceled - - new_value: CANCELLED - value: cancelled - - new_value: DEADLINE_EXCEEDED - value: deadline_exceeded - - new_value: UNKNOWN - value: shutdown - - action: update_label - label: rpc.response.status_code - new_label: response_code - - action: update_label - label: response_code - value_actions: - - new_value: "409" - value: ABORTED - - new_value: "409" - value: ALREADY_EXISTS - - new_value: "499" - value: CANCELLED - - new_value: "500" - value: DATA_LOSS - - new_value: "504" - value: DEADLINE_EXCEEDED - - new_value: "400" - value: FAILED_PRECONDITION - - new_value: "500" - value: INTERNAL - - new_value: "400" - value: INVALID_ARGUMENT - - new_value: "404" - value: NOT_FOUND - - new_value: "200" - value: OK - - new_value: "400" - value: OUT_OF_RANGE - - new_value: "403" - value: PERMISSION_DENIED - - new_value: "429" - value: RESOURCE_EXHAUSTED - - new_value: "401" - value: UNAUTHENTICATED - - new_value: "503" - value: UNAVAILABLE - - new_value: "501" - value: UNIMPLEMENTED - - new_value: "500" - value: UNKNOWN - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - - action: update - include: otelcol_exporter_sent_log_records - new_name: agent/log_entry_count - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: response_code - new_value: "200" - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - - action: update - include: otelcol_exporter_send_failed_log_records - new_name: agent/log_entry_count - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: response_code - new_value: "400" - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - - action: combine - include: ^agent/log_entry_count$ - match_type: regexp - new_name: agent/log_entry_count - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: - - response_code - submatch_case: lower - metricstransform/loggingmetrics_6: - transforms: - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - metricstransform/mssql_0: - transforms: - - action: update - include: "\\SQLServer:General Statistics(_Total)\\User Connections" - new_name: mssql/connections/user - - action: update - include: "\\SQLServer:Databases(_Total)\\Transactions/sec" - new_name: mssql/transaction_rate - - action: update - include: "\\SQLServer:Databases(_Total)\\Write Transactions/sec" - new_name: mssql/write_transaction_rate - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - metricstransform/otel_3: - transforms: - - action: update - include: otelcol_process_uptime - new_name: agent/uptime - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: version - new_value: google-cloud-ops-agent-metrics/latest-build_distro - - action: aggregate_labels - aggregation_type: sum - label_set: - - version - - action: update - include: otelcol_process_memory_rss - new_name: agent/memory_usage - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: [] - - action: update - include: rpc.client.call.duration_count - new_name: agent/api_request_count - operations: - - action: update_label - label: rpc.response.status_code - value_actions: - - new_value: ABORTED - value: Aborted - - new_value: ALREADY_EXISTS - value: AlreadyExists - - new_value: CANCELLED - value: Canceled - - new_value: CANCELLED - value: Cancelled - - new_value: DATA_LOSS - value: DataLoss - - new_value: DEADLINE_EXCEEDED - value: DeadlineExceeded - - new_value: DEADLINE_EXCEEDED - value: Deadline_Exceeded - - new_value: FAILED_PRECONDITION - value: FailedPrecondition - - new_value: INTERNAL - value: Internal - - new_value: INVALID_ARGUMENT - value: InvalidArgument - - new_value: NOT_FOUND - value: NotFound - - new_value: OK - value: OK - - new_value: OUT_OF_RANGE - value: OutOfRange - - new_value: PERMISSION_DENIED - value: PermissionDenied - - new_value: RESOURCE_EXHAUSTED - value: ResourceExhausted - - new_value: UNKNOWN - value: Shutdown - - new_value: UNAUTHENTICATED - value: Unauthenticated - - new_value: UNAVAILABLE - value: Unavailable - - new_value: UNIMPLEMENTED - value: Unimplemented - - new_value: UNKNOWN - value: Unknown - - new_value: CANCELLED - value: canceled - - new_value: CANCELLED - value: cancelled - - new_value: DEADLINE_EXCEEDED - value: deadline_exceeded - - new_value: UNKNOWN - value: shutdown - - action: update_label - label: rpc.response.status_code - new_label: state - - action: aggregate_labels - aggregation_type: sum - label_set: - - state - - action: update - include: otelcol_exporter_sent_metric_points - operations: - - action: toggle_scalar_data_type - - action: add_label - new_label: status - new_value: OK - - action: aggregate_labels - aggregation_type: sum - label_set: - - status - - action: update - include: otelcol_exporter_send_failed_metric_points - operations: - - action: toggle_scalar_data_type - - action: update_label - label: error.type - new_label: status - - action: update_label - label: status - value_actions: - - new_value: ABORTED - value: Aborted - - new_value: ALREADY_EXISTS - value: AlreadyExists - - new_value: CANCELLED - value: Canceled - - new_value: CANCELLED - value: Cancelled - - new_value: DATA_LOSS - value: DataLoss - - new_value: DEADLINE_EXCEEDED - value: DeadlineExceeded - - new_value: DEADLINE_EXCEEDED - value: Deadline_Exceeded - - new_value: FAILED_PRECONDITION - value: FailedPrecondition - - new_value: INTERNAL - value: Internal - - new_value: INVALID_ARGUMENT - value: InvalidArgument - - new_value: NOT_FOUND - value: NotFound - - new_value: OK - value: OK - - new_value: OUT_OF_RANGE - value: OutOfRange - - new_value: PERMISSION_DENIED - value: PermissionDenied - - new_value: RESOURCE_EXHAUSTED - value: ResourceExhausted - - new_value: UNKNOWN - value: Shutdown - - new_value: UNAUTHENTICATED - value: Unauthenticated - - new_value: UNAVAILABLE - value: Unavailable - - new_value: UNIMPLEMENTED - value: Unimplemented - - new_value: UNKNOWN - value: Unknown - - new_value: CANCELLED - value: canceled - - new_value: CANCELLED - value: cancelled - - new_value: DEADLINE_EXCEEDED - value: deadline_exceeded - - new_value: UNKNOWN - value: shutdown - - action: aggregate_labels - aggregation_type: sum - label_set: - - status - - action: combine - include: otelcol_exporter_sent_metric_points|otelcol_exporter_send_failed_metric_points - match_type: regexp - new_name: agent/monitoring/point_count - operations: - - action: aggregate_labels - aggregation_type: sum - label_set: - - status - submatch_case: lower - - action: update - include: ^(.*)$$ - match_type: regexp - new_name: agent.googleapis.com/$${1} - resource/otlp_grpc/otlp_logs_logs_0: - attributes: - - action: insert - key: gcp.project_id - value: test-project - resource/otlp_grpc/otlp_logs_logs_1: - attributes: - - action: insert - key: gcp.use_legacy_mapping - value: "true" - resource/otlp_grpc/otlp_metrics_metrics_0: - attributes: - - action: insert - key: gcp.project_id - value: test-project - resourcedetection/_global_0: - detectors: - - gcp - transform/agent_prometheus_0: - metric_statements: - - context: resource - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.version") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "server.port") - - delete_key(attributes, "url.scheme") - transform/agent_prometheus_1: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/agent_prometheus_2: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/hostmetrics_3: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/hostmetrics_4: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/iis_1: - metric_statements: - - context: metric - statements: - - convert_gauge_to_sum("cumulative", true) where name == "agent.googleapis.com/iis/network/transferred_bytes_count" - - convert_gauge_to_sum("cumulative", true) where name == "agent.googleapis.com/iis/new_connection_count" - - convert_gauge_to_sum("cumulative", true) where name == "agent.googleapis.com/iis/request_count" - transform/iis_3: - metric_statements: - - context: scope - statements: - - set(name, "agent.googleapis.com/iis") - - set(version, "1.0") - transform/iis_4: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/iis_5: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/loggingmetrics_0: - error_mode: ignore - metric_statements: - - context: metric - statements: - - extract_count_metric(true) where name == "rpc.client.call.duration" - transform/loggingmetrics_4: - metric_statements: - - context: metric - statements: - - set(unit, "1") - transform/logs_0: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], attributes["compute.googleapis.com/instance_group_manager/name"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/name"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], attributes["compute.googleapis.com/instance_group_manager/zone"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/zone"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], attributes["compute.googleapis.com/resource_name"]) where (attributes != nil and attributes["compute.googleapis.com/resource_name"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], attributes["gcp.log_name"]) where (attributes != nil and attributes["gcp.log_name"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(cache["value"], "test-mig") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(cache["value"], "test-zone") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/zone"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(attributes["compute.googleapis.com/resource_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], "logs") where cache["value"] == nil - - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - transform/logs_test-pipeline_logs_0: - error_mode: ignore - log_statements: - - context: log - statements: - - "set(cache[\"__parsed_regex\"], ExtractPatternsRubyRegex(body[\"message\"], \"^(?\\\\d+:\\\\d+:\\\\d+) \\\\((?.*)\\\\) (?IN|OUT|DENIED): \\\"(?.*)\\\" (?.*)\\\\@(?[\\\\w\\\\d\\\\-Â\\u00a0]+)[^ ]* (?
.*)$\", true)) where ((body != nil and body[\"message\"] != nil) and IsMatchRubyRegex(body[\"message\"], \"^(?\\\\d+:\\\\d+:\\\\d+) \\\\((?.*)\\\\) (?IN|OUT|DENIED): \\\"(?.*)\\\" (?.*)\\\\@(?[\\\\w\\\\d\\\\-Â\\u00a0]+)[^ ]* (?
.*)$\"))" - - delete_key(body, "message") where ((body != nil and body["message"] != nil) and (cache != nil and cache["__parsed_regex"] != nil)) - - merge_maps(body, cache["__parsed_regex"], "upsert") where (cache != nil and cache["__parsed_regex"] != nil) - - delete_key(cache, "__parsed_regex") where (cache != nil and cache["__parsed_regex"] != nil) - - set(cache["__time_valid"], false) - - set(cache["__time_valid"], true) where ((body != nil and body["LogTimeStamp"] != nil) and Time(body["LogTimeStamp"], "%H:%M:%S") != nil) - - set(time, Time(body["LogTimeStamp"], "%H:%M:%S")) where cache["__time_valid"] == true - - delete_key(body, "LogTimeStamp") where ((body != nil and body["LogTimeStamp"] != nil) and cache["__time_valid"] == true) - - merge_maps(attributes, body["logging.googleapis.com/labels"], "upsert") where body["logging.googleapis.com/labels"] != nil - - delete_key(body, "logging.googleapis.com/labels") where (body != nil and body["logging.googleapis.com/labels"] != nil) - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/httpRequest"]) where (body != nil and body["logging.googleapis.com/httpRequest"] != nil) - - delete_key(body, "logging.googleapis.com/httpRequest") where (body != nil and body["logging.googleapis.com/httpRequest"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(attributes["gcp.http_request"], cache["value"]) where (cache != nil and cache["value"] != nil) - - set(attributes["gcp.http_request"]["status"], Int(attributes["gcp.http_request"]["status"])) where attributes["gcp.http_request"]["status"] != nil - - set(attributes["gcp.http_request"]["responseSize"], Int(attributes["gcp.http_request"]["responseSize"])) where attributes["gcp.http_request"]["responseSize"] != nil - - set(attributes["gcp.http_request"]["requestSize"], Int(attributes["gcp.http_request"]["requestSize"])) where attributes["gcp.http_request"]["requestSize"] != nil - - set(attributes["gcp.http_request"]["cacheFillBytes"], Int(attributes["gcp.http_request"]["cacheFillBytes"])) where attributes["gcp.http_request"]["cacheFillBytes"] != nil - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/logName"]) where (body != nil and body["logging.googleapis.com/logName"] != nil) - - delete_key(body, "logging.googleapis.com/logName") where (body != nil and body["logging.googleapis.com/logName"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/severity"]) where (body != nil and body["logging.googleapis.com/severity"] != nil) - - delete_key(body, "logging.googleapis.com/severity") where (body != nil and body["logging.googleapis.com/severity"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(severity_text, cache["value"]) where (cache != nil and cache["value"] != nil) - - set(severity_number, 0) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/sourceLocation"]) where (body != nil and body["logging.googleapis.com/sourceLocation"] != nil) - - delete_key(body, "logging.googleapis.com/sourceLocation") where (body != nil and body["logging.googleapis.com/sourceLocation"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(attributes["gcp.source_location"], cache["value"]) where (cache != nil and cache["value"] != nil) - - set(attributes["gcp.source_location"]["line"], Int(attributes["gcp.source_location"]["line"])) where attributes["gcp.source_location"]["line"] != nil - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/spanId"]) where (body != nil and body["logging.googleapis.com/spanId"] != nil) - - delete_key(body, "logging.googleapis.com/spanId") where (body != nil and body["logging.googleapis.com/spanId"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(span_id.string, cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["logging.googleapis.com/trace"]) where (body != nil and body["logging.googleapis.com/trace"] != nil) - - delete_key(body, "logging.googleapis.com/trace") where (body != nil and body["logging.googleapis.com/trace"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - delete_key(cache, "__setif_value") where (cache != nil and cache["__setif_value"] != nil) - - set(cache["__setif_value"], cache["value"]) - - replace_pattern(cache["__setif_value"], "^projects/([^/]*)/traces/", "") - - set(trace_id.string, cache["__setif_value"]) where (cache != nil and cache["value"] != nil) - - set(attributes["gcp.source_location"]["func"], attributes["gcp.source_location"]["function"]) where (attributes != nil and attributes["gcp.source_location"] != nil and attributes["gcp.source_location"]["function"] != nil) - - delete_key(attributes["gcp.source_location"], "function") where ((attributes != nil and attributes["gcp.source_location"] != nil and attributes["gcp.source_location"]["function"] != nil) and (attributes != nil and attributes["gcp.source_location"] != nil and attributes["gcp.source_location"]["func"] != nil)) - transform/mssql_1: - metric_statements: - - context: scope - statements: - - set(name, "agent.googleapis.com/mssql") - - set(version, "1.0") - transform/mssql_2: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/mssql_3: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/ops_agent_0: - error_mode: ignore - metric_statements: - - context: datapoint - statements: - - set(time, Now()) - transform/ops_agent_1: - metric_statements: - - context: scope - statements: - - set(name, "") - - set(version, "") - transform/ops_agent_2: - metric_statements: - - context: resource - error_mode: silent - statements: - - delete_key(attributes, "service.name") - - delete_key(attributes, "service.instance.id") - - delete_key(attributes, "service.namespace") - - delete_key(attributes, "service.version") - transform/otel_0: - error_mode: ignore - metric_statements: - - context: metric - statements: - - extract_count_metric(true) where name == "rpc.client.call.duration" - transform/otlp_grpc/otlp_logs_logs_2: - error_mode: ignore - log_statements: - - context: log - statements: - - set(attributes["instrumentation_source"], instrumentation_scope.name) where instrumentation_scope.name != "" - - set(attributes["instrumentation_version"], instrumentation_scope.version) where instrumentation_scope.version != "" - transform/otlp_grpc/otlp_logs_logs_3: - error_mode: ignore - log_statements: - - context: log - statements: - - set(attributes["service.name"], resource.attributes["service.name"]) where resource.attributes["service.name"] != nil - - set(attributes["service.namespace"], resource.attributes["service.namespace"]) where resource.attributes["service.namespace"] != nil - - set(attributes["service.instance.id"], resource.attributes["service.instance.id"]) where resource.attributes["service.instance.id"] != nil - transform/windows__event__log_0: - error_mode: ignore - log_statements: - - context: log - statements: - - set(body["parsed_xml"], ParseSimplifiedXML(attributes["log.record.original"])) where (attributes != nil and attributes["log.record.original"] != nil) - - delete_key(attributes, "log.record.original") where (attributes != nil and attributes["log.record.original"] != nil) - transform/windows__event__log_1: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["channel"]) where (body != nil and body["channel"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], body["computer"]) where (body != nil and body["computer"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], body["event_data"]["binary"]) where (body != nil and body["event_data"] != nil and body["event_data"]["binary"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], body["parsed_xml"]["Event"]["System"]["Task"]) where (body != nil and body["parsed_xml"] != nil and body["parsed_xml"]["Event"] != nil and body["parsed_xml"]["Event"]["System"] != nil and body["parsed_xml"]["Event"]["System"]["Task"] != nil) - - delete_key(cache, "__field_4") where (cache != nil and cache["__field_4"] != nil) - - set(cache["__field_4"], body["event_id"]["id"]) where (body != nil and body["event_id"] != nil and body["event_id"]["id"] != nil) - - delete_key(cache, "__field_5") where (cache != nil and cache["__field_5"] != nil) - - set(cache["__field_5"], body["level"]) where (body != nil and body["level"] != nil) - - delete_key(cache, "__field_6") where (cache != nil and cache["__field_6"] != nil) - - set(cache["__field_6"], body["parsed_xml"]["Event"]["RenderingInfo"]["Message"]) where (body != nil and body["parsed_xml"] != nil and body["parsed_xml"]["Event"] != nil and body["parsed_xml"]["Event"]["RenderingInfo"] != nil and body["parsed_xml"]["Event"]["RenderingInfo"]["Message"] != nil) - - delete_key(cache, "__field_7") where (cache != nil and cache["__field_7"] != nil) - - set(cache["__field_7"], body["event_id"]["qualifiers"]) where (body != nil and body["event_id"] != nil and body["event_id"]["qualifiers"] != nil) - - delete_key(cache, "__field_8") where (cache != nil and cache["__field_8"] != nil) - - set(cache["__field_8"], body["record_id"]) where (body != nil and body["record_id"] != nil) - - delete_key(cache, "__field_9") where (cache != nil and cache["__field_9"] != nil) - - set(cache["__field_9"], body["security"]["user_id"]) where (body != nil and body["security"] != nil and body["security"]["user_id"] != nil) - - delete_key(cache, "__field_10") where (cache != nil and cache["__field_10"] != nil) - - set(cache["__field_10"], body["provider"]["name"]) where (body != nil and body["provider"] != nil and body["provider"]["name"] != nil) - - delete_key(cache, "__field_11") where (cache != nil and cache["__field_11"] != nil) - - set(cache["__field_11"], body["event_data"]["data"]) where (body != nil and body["event_data"] != nil and body["event_data"]["data"] != nil) - - delete_key(cache, "__field_12") where (cache != nil and cache["__field_12"] != nil) - - set(cache["__field_12"], body["system_time"]) where (body != nil and body["system_time"] != nil) - - set(cache["body"], body) - - keep_keys(body, []) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(body["Channel"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(body["ComputerName"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(cache["value"], ConvertCase(cache["value"], "lower")) - - set(body["Data"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], Int(cache["value"])) - - set(body["EventCategory"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_4"]) - - set(body["EventID"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_5"]) - - set(cache["value"], "SuccessAudit") where ContainsValue(cache["body"]["keywords"], "Audit Success") - - set(cache["value"], "FailureAudit") where ContainsValue(cache["body"]["keywords"], "Audit Failure") - - set(body["EventType"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_6"]) - - set(body["Message"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_7"]) - - set(body["Qualifiers"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_8"]) - - set(body["RecordNumber"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_9"]) - - set(cache["value"], "") where cache["value"] == nil - - set(body["Sid"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_10"]) - - set(cache["value"], cache["body"]["provider"]["event_source"]) where ((cache != nil and cache["body"] != nil and cache["body"]["provider"] != nil and cache["body"]["provider"]["event_source"] != nil) and (not cache["body"]["provider"]["event_source"] == "")) - - set(body["SourceName"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_11"]) - - set(cache["value"], ToValues(cache["value"])) where (cache != nil and cache["value"] != nil) - - set(body["StringInserts"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_12"]) - - set(cache["value"], FormatTime(Time(cache["value"], "%Y-%m-%dT%T.%sZ"), "%Y-%m-%d %T.%s +0000")) - - set(body["TimeGenerated"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_12"]) - - set(cache["value"], FormatTime(Time(cache["value"], "%Y-%m-%dT%T.%sZ"), "%Y-%m-%d %T.%s +0000")) - - set(body["TimeWritten"], cache["value"]) where (cache != nil and cache["value"] != nil) - transform/windows__event__log_1_0: - error_mode: ignore - log_statements: - - context: log - statements: - - set(body["parsed_xml"], ParseSimplifiedXML(attributes["log.record.original"])) where (attributes != nil and attributes["log.record.original"] != nil) - - delete_key(attributes, "log.record.original") where (attributes != nil and attributes["log.record.original"] != nil) - transform/windows__event__log_1_1: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["channel"]) where (body != nil and body["channel"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], body["computer"]) where (body != nil and body["computer"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], body["event_data"]["binary"]) where (body != nil and body["event_data"] != nil and body["event_data"]["binary"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], body["parsed_xml"]["Event"]["System"]["Task"]) where (body != nil and body["parsed_xml"] != nil and body["parsed_xml"]["Event"] != nil and body["parsed_xml"]["Event"]["System"] != nil and body["parsed_xml"]["Event"]["System"]["Task"] != nil) - - delete_key(cache, "__field_4") where (cache != nil and cache["__field_4"] != nil) - - set(cache["__field_4"], body["event_id"]["id"]) where (body != nil and body["event_id"] != nil and body["event_id"]["id"] != nil) - - delete_key(cache, "__field_5") where (cache != nil and cache["__field_5"] != nil) - - set(cache["__field_5"], body["level"]) where (body != nil and body["level"] != nil) - - delete_key(cache, "__field_6") where (cache != nil and cache["__field_6"] != nil) - - set(cache["__field_6"], body["parsed_xml"]["Event"]["RenderingInfo"]["Message"]) where (body != nil and body["parsed_xml"] != nil and body["parsed_xml"]["Event"] != nil and body["parsed_xml"]["Event"]["RenderingInfo"] != nil and body["parsed_xml"]["Event"]["RenderingInfo"]["Message"] != nil) - - delete_key(cache, "__field_7") where (cache != nil and cache["__field_7"] != nil) - - set(cache["__field_7"], body["event_id"]["qualifiers"]) where (body != nil and body["event_id"] != nil and body["event_id"]["qualifiers"] != nil) - - delete_key(cache, "__field_8") where (cache != nil and cache["__field_8"] != nil) - - set(cache["__field_8"], body["record_id"]) where (body != nil and body["record_id"] != nil) - - delete_key(cache, "__field_9") where (cache != nil and cache["__field_9"] != nil) - - set(cache["__field_9"], body["security"]["user_id"]) where (body != nil and body["security"] != nil and body["security"]["user_id"] != nil) - - delete_key(cache, "__field_10") where (cache != nil and cache["__field_10"] != nil) - - set(cache["__field_10"], body["provider"]["name"]) where (body != nil and body["provider"] != nil and body["provider"]["name"] != nil) - - delete_key(cache, "__field_11") where (cache != nil and cache["__field_11"] != nil) - - set(cache["__field_11"], body["event_data"]["data"]) where (body != nil and body["event_data"] != nil and body["event_data"]["data"] != nil) - - delete_key(cache, "__field_12") where (cache != nil and cache["__field_12"] != nil) - - set(cache["__field_12"], body["system_time"]) where (body != nil and body["system_time"] != nil) - - set(cache["body"], body) - - keep_keys(body, []) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(body["Channel"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(body["ComputerName"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(cache["value"], ConvertCase(cache["value"], "lower")) - - set(body["Data"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], Int(cache["value"])) - - set(body["EventCategory"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_4"]) - - set(body["EventID"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_5"]) - - set(cache["value"], "SuccessAudit") where ContainsValue(cache["body"]["keywords"], "Audit Success") - - set(cache["value"], "FailureAudit") where ContainsValue(cache["body"]["keywords"], "Audit Failure") - - set(body["EventType"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_6"]) - - set(body["Message"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_7"]) - - set(body["Qualifiers"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_8"]) - - set(body["RecordNumber"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_9"]) - - set(cache["value"], "") where cache["value"] == nil - - set(body["Sid"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_10"]) - - set(cache["value"], cache["body"]["provider"]["event_source"]) where ((cache != nil and cache["body"] != nil and cache["body"]["provider"] != nil and cache["body"]["provider"]["event_source"] != nil) and (not cache["body"]["provider"]["event_source"] == "")) - - set(body["SourceName"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_11"]) - - set(cache["value"], ToValues(cache["value"])) where (cache != nil and cache["value"] != nil) - - set(body["StringInserts"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_12"]) - - set(cache["value"], FormatTime(Time(cache["value"], "%Y-%m-%dT%T.%sZ"), "%Y-%m-%d %T.%s +0000")) - - set(body["TimeGenerated"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_12"]) - - set(cache["value"], FormatTime(Time(cache["value"], "%Y-%m-%dT%T.%sZ"), "%Y-%m-%d %T.%s +0000")) - - set(body["TimeWritten"], cache["value"]) where (cache != nil and cache["value"] != nil) - transform/windows__event__log_1_2: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], attributes["compute.googleapis.com/instance_group_manager/name"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/name"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], attributes["compute.googleapis.com/instance_group_manager/zone"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/zone"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], attributes["compute.googleapis.com/resource_name"]) where (attributes != nil and attributes["compute.googleapis.com/resource_name"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], attributes["gcp.log_name"]) where (attributes != nil and attributes["gcp.log_name"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(cache["value"], "test-mig") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(cache["value"], "test-zone") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/zone"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(attributes["compute.googleapis.com/resource_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], "windows_event_log") where cache["value"] == nil - - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - transform/windows__event__log_2: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], attributes["compute.googleapis.com/instance_group_manager/name"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/name"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], attributes["compute.googleapis.com/instance_group_manager/zone"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/zone"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], attributes["compute.googleapis.com/resource_name"]) where (attributes != nil and attributes["compute.googleapis.com/resource_name"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], attributes["gcp.log_name"]) where (attributes != nil and attributes["gcp.log_name"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(cache["value"], "test-mig") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(cache["value"], "test-zone") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/zone"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(attributes["compute.googleapis.com/resource_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], "windows_event_log") where cache["value"] == nil - - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - transform/windows__event__log_2_0: - error_mode: ignore - log_statements: - - context: log - statements: - - set(body["parsed_xml"], ParseSimplifiedXML(attributes["log.record.original"])) where (attributes != nil and attributes["log.record.original"] != nil) - - delete_key(attributes, "log.record.original") where (attributes != nil and attributes["log.record.original"] != nil) - transform/windows__event__log_2_1: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], body["channel"]) where (body != nil and body["channel"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], body["computer"]) where (body != nil and body["computer"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], body["event_data"]["binary"]) where (body != nil and body["event_data"] != nil and body["event_data"]["binary"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], body["parsed_xml"]["Event"]["System"]["Task"]) where (body != nil and body["parsed_xml"] != nil and body["parsed_xml"]["Event"] != nil and body["parsed_xml"]["Event"]["System"] != nil and body["parsed_xml"]["Event"]["System"]["Task"] != nil) - - delete_key(cache, "__field_4") where (cache != nil and cache["__field_4"] != nil) - - set(cache["__field_4"], body["event_id"]["id"]) where (body != nil and body["event_id"] != nil and body["event_id"]["id"] != nil) - - delete_key(cache, "__field_5") where (cache != nil and cache["__field_5"] != nil) - - set(cache["__field_5"], body["level"]) where (body != nil and body["level"] != nil) - - delete_key(cache, "__field_6") where (cache != nil and cache["__field_6"] != nil) - - set(cache["__field_6"], body["parsed_xml"]["Event"]["RenderingInfo"]["Message"]) where (body != nil and body["parsed_xml"] != nil and body["parsed_xml"]["Event"] != nil and body["parsed_xml"]["Event"]["RenderingInfo"] != nil and body["parsed_xml"]["Event"]["RenderingInfo"]["Message"] != nil) - - delete_key(cache, "__field_7") where (cache != nil and cache["__field_7"] != nil) - - set(cache["__field_7"], body["event_id"]["qualifiers"]) where (body != nil and body["event_id"] != nil and body["event_id"]["qualifiers"] != nil) - - delete_key(cache, "__field_8") where (cache != nil and cache["__field_8"] != nil) - - set(cache["__field_8"], body["record_id"]) where (body != nil and body["record_id"] != nil) - - delete_key(cache, "__field_9") where (cache != nil and cache["__field_9"] != nil) - - set(cache["__field_9"], body["security"]["user_id"]) where (body != nil and body["security"] != nil and body["security"]["user_id"] != nil) - - delete_key(cache, "__field_10") where (cache != nil and cache["__field_10"] != nil) - - set(cache["__field_10"], body["provider"]["name"]) where (body != nil and body["provider"] != nil and body["provider"]["name"] != nil) - - delete_key(cache, "__field_11") where (cache != nil and cache["__field_11"] != nil) - - set(cache["__field_11"], body["event_data"]["data"]) where (body != nil and body["event_data"] != nil and body["event_data"]["data"] != nil) - - delete_key(cache, "__field_12") where (cache != nil and cache["__field_12"] != nil) - - set(cache["__field_12"], body["system_time"]) where (body != nil and body["system_time"] != nil) - - set(cache["body"], body) - - keep_keys(body, []) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(body["Channel"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(body["ComputerName"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(cache["value"], ConvertCase(cache["value"], "lower")) - - set(body["Data"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], Int(cache["value"])) - - set(body["EventCategory"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_4"]) - - set(body["EventID"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_5"]) - - set(cache["value"], "SuccessAudit") where ContainsValue(cache["body"]["keywords"], "Audit Success") - - set(cache["value"], "FailureAudit") where ContainsValue(cache["body"]["keywords"], "Audit Failure") - - set(body["EventType"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_6"]) - - set(body["Message"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_7"]) - - set(body["Qualifiers"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_8"]) - - set(body["RecordNumber"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_9"]) - - set(cache["value"], "") where cache["value"] == nil - - set(body["Sid"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_10"]) - - set(cache["value"], cache["body"]["provider"]["event_source"]) where ((cache != nil and cache["body"] != nil and cache["body"]["provider"] != nil and cache["body"]["provider"]["event_source"] != nil) and (not cache["body"]["provider"]["event_source"] == "")) - - set(body["SourceName"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_11"]) - - set(cache["value"], ToValues(cache["value"])) where (cache != nil and cache["value"] != nil) - - set(body["StringInserts"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_12"]) - - set(cache["value"], FormatTime(Time(cache["value"], "%Y-%m-%dT%T.%sZ"), "%Y-%m-%d %T.%s +0000")) - - set(body["TimeGenerated"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_12"]) - - set(cache["value"], FormatTime(Time(cache["value"], "%Y-%m-%dT%T.%sZ"), "%Y-%m-%d %T.%s +0000")) - - set(body["TimeWritten"], cache["value"]) where (cache != nil and cache["value"] != nil) - transform/windows__event__log_2_2: - error_mode: ignore - log_statements: - - context: log - statements: - - delete_key(cache, "__field_0") where (cache != nil and cache["__field_0"] != nil) - - set(cache["__field_0"], attributes["compute.googleapis.com/instance_group_manager/name"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/name"] != nil) - - delete_key(cache, "__field_1") where (cache != nil and cache["__field_1"] != nil) - - set(cache["__field_1"], attributes["compute.googleapis.com/instance_group_manager/zone"]) where (attributes != nil and attributes["compute.googleapis.com/instance_group_manager/zone"] != nil) - - delete_key(cache, "__field_2") where (cache != nil and cache["__field_2"] != nil) - - set(cache["__field_2"], attributes["compute.googleapis.com/resource_name"]) where (attributes != nil and attributes["compute.googleapis.com/resource_name"] != nil) - - delete_key(cache, "__field_3") where (cache != nil and cache["__field_3"] != nil) - - set(cache["__field_3"], attributes["gcp.log_name"]) where (attributes != nil and attributes["gcp.log_name"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_0"]) - - set(cache["value"], "test-mig") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_1"]) - - set(cache["value"], "test-zone") where cache["value"] == nil - - set(attributes["compute.googleapis.com/instance_group_manager/zone"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_2"]) - - set(cache["value"], "") where cache["value"] == nil - - set(attributes["compute.googleapis.com/resource_name"], cache["value"]) where (cache != nil and cache["value"] != nil) - - delete_key(cache, "value") where (cache != nil and cache["value"] != nil) - - set(cache["value"], cache["__field_3"]) - - set(cache["value"], "windows_event_log") where cache["value"] == nil - - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) -receivers: - file_log/logs: - exclude: [] - fingerprint_size: 5kb - include: - - /tmp/*.log - include_file_name: false - operators: - - from: body - id: body - to: body.message - type: move - preserve_leading_whitespaces: true - preserve_trailing_whitespaces: true - start_at: beginning - storage: file_storage - hostmetrics/hostmetrics: - collection_interval: 60s - scrapers: - cpu: {} - disk: {} - filesystem: {} - load: {} - memory: {} - network: {} - paging: {} - process: - metrics: - process.handles: - enabled: true - mute_process_all_errors: true - mute_process_exe_error: true - mute_process_name_error: true - processes: {} - otlpjsonfile/ops_agent: - include: - - enabled_receivers_otlp.json - - feature_tracking_otlp.json - poll_interval: 1m0s - replay_file: true - prometheus/agent_prometheus: - config: - scrape_configs: - - job_name: otel-collector - scrape_interval: 1m - static_configs: - - targets: - - 0.0.0.0:20201 - windowseventlog/windows__event__log: - channel: System - event_data_format: array - ignore_channel_errors: true - include_log_record_original: true - poll_interval: 1s - start_at: beginning - storage: file_storage - windowseventlog/windows__event__log_1: - channel: Application - event_data_format: array - ignore_channel_errors: true - include_log_record_original: true - poll_interval: 1s - start_at: beginning - storage: file_storage - windowseventlog/windows__event__log_2: - channel: Security - event_data_format: array - ignore_channel_errors: true - include_log_record_original: true - poll_interval: 1s - start_at: beginning - storage: file_storage - windowsperfcounters/iis: - collection_interval: 60s - perfcounters: - - counters: - - name: Current Connections - - name: Total Bytes Received - - name: Total Bytes Sent - - name: Total Connection Attempts (all instances) - - name: Total Delete Requests - - name: Total Get Requests - - name: Total Head Requests - - name: Total Options Requests - - name: Total Post Requests - - name: Total Put Requests - - name: Total Trace Requests - instances: - - _Total - object: Web Service - windowsperfcounters/mssql: - collection_interval: 60s - perfcounters: - - counters: - - name: User Connections - instances: - - _Total - object: SQLServer:General Statistics - - counters: - - name: Transactions/sec - - name: Write Transactions/sec - instances: - - _Total - object: SQLServer:Databases -service: - extensions: - - file_storage - - googleclientauth - pipelines: - logs/logs_default__pipeline_windows__event__log: - exporters: - - otlp_grpc/otlp_logs - processors: - - transform/windows__event__log_0 - - transform/windows__event__log_1 - - transform/windows__event__log_2 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_logs_logs_0 - - resource/otlp_grpc/otlp_logs_logs_1 - - transform/otlp_grpc/otlp_logs_logs_2 - - transform/otlp_grpc/otlp_logs_logs_3 - receivers: - - windowseventlog/windows__event__log - logs/logs_default__pipeline_windows__event__log_1: - exporters: - - otlp_grpc/otlp_logs - processors: - - transform/windows__event__log_1_0 - - transform/windows__event__log_1_1 - - transform/windows__event__log_1_2 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_logs_logs_0 - - resource/otlp_grpc/otlp_logs_logs_1 - - transform/otlp_grpc/otlp_logs_logs_2 - - transform/otlp_grpc/otlp_logs_logs_3 - receivers: - - windowseventlog/windows__event__log_1 - logs/logs_default__pipeline_windows__event__log_2: - exporters: - - otlp_grpc/otlp_logs - processors: - - transform/windows__event__log_2_0 - - transform/windows__event__log_2_1 - - transform/windows__event__log_2_2 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_logs_logs_0 - - resource/otlp_grpc/otlp_logs_logs_1 - - transform/otlp_grpc/otlp_logs_logs_2 - - transform/otlp_grpc/otlp_logs_logs_3 - receivers: - - windowseventlog/windows__event__log_2 - logs/logs_test-pipeline_logs: - exporters: - - otlp_grpc/otlp_logs - processors: - - transform/logs_0 - - transform/logs_test-pipeline_logs_0 - - filter/logs_test-pipeline_logs_1 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_logs_logs_0 - - resource/otlp_grpc/otlp_logs_logs_1 - - transform/otlp_grpc/otlp_logs_logs_2 - - transform/otlp_grpc/otlp_logs_logs_3 - receivers: - - file_log/logs - metrics/default__pipeline_hostmetrics: - exporters: - - otlp_grpc/otlp_metrics - processors: - - agentmetrics/hostmetrics_0 - - filter/hostmetrics_1 - - metricstransform/hostmetrics_2 - - transform/hostmetrics_3 - - transform/hostmetrics_4 - - filter/default__pipeline_hostmetrics_0 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - hostmetrics/hostmetrics - metrics/default__pipeline_iis: - exporters: - - otlp_grpc/otlp_metrics - processors: - - metricstransform/iis_0 - - transform/iis_1 - - metric_start_time/iis_2 - - transform/iis_3 - - transform/iis_4 - - transform/iis_5 - - filter/default__pipeline_iis_0 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - windowsperfcounters/iis - metrics/default__pipeline_mssql: - exporters: - - otlp_grpc/otlp_metrics - processors: - - metricstransform/mssql_0 - - transform/mssql_1 - - transform/mssql_2 - - transform/mssql_3 - - filter/default__pipeline_mssql_0 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - windowsperfcounters/mssql - metrics/loggingmetrics: - exporters: - - otlp_grpc/otlp_metrics - processors: - - transform/agent_prometheus_0 - - transform/agent_prometheus_1 - - transform/agent_prometheus_2 - - transform/loggingmetrics_0 - - filter/loggingmetrics_1 - - filter/loggingmetrics_2 - - metricstransform/loggingmetrics_3 - - transform/loggingmetrics_4 - - interval/loggingmetrics_5 - - metricstransform/loggingmetrics_6 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - prometheus/agent_prometheus - metrics/opsagent: - exporters: - - otlp_grpc/otlp_metrics - processors: - - transform/ops_agent_0 - - transform/ops_agent_1 - - transform/ops_agent_2 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - otlpjsonfile/ops_agent - metrics/otel: - exporters: - - otlp_grpc/otlp_metrics - processors: - - transform/agent_prometheus_0 - - transform/agent_prometheus_1 - - transform/agent_prometheus_2 - - transform/otel_0 - - filter/otel_1 - - filter/otel_2 - - metricstransform/otel_3 - - resourcedetection/_global_0 - - resource/otlp_grpc/otlp_metrics_metrics_0 - - metric_start_time/otlp_grpc/otlp_metrics_metrics_1 - - batch/otlp_grpc/otlp_metrics_metrics_2 - receivers: - - prometheus/agent_prometheus - telemetry: - metrics: - level: detailed - readers: - - pull: - exporter: - prometheus: - host: 0.0.0.0 - port: 20201 - without_scope_info: true - without_type_suffix: true - without_units: true diff --git a/confgenerator/testdata/goldens/logging-receiver_forward_omitting_optional_parameters/golden/linux-gpu/otel.yaml b/confgenerator/testdata/goldens/logging-receiver_forward_omitting_optional_parameters/golden/linux-gpu/otel.yaml index a118e57a2d..b8c726d6c3 100644 --- a/confgenerator/testdata/goldens/logging-receiver_forward_omitting_optional_parameters/golden/linux-gpu/otel.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_forward_omitting_optional_parameters/golden/linux-gpu/otel.yaml @@ -924,7 +924,7 @@ receivers: start_at: beginning storage: file_storage fluentforward/fluent__logs: - endpoint: ":0" + endpoint: :0 hostmetrics/hostmetrics: collection_interval: 60s scrapers: diff --git a/confgenerator/testdata/goldens/logging-receiver_forward_omitting_optional_parameters/golden/linux/otel.yaml b/confgenerator/testdata/goldens/logging-receiver_forward_omitting_optional_parameters/golden/linux/otel.yaml index 4f133d6340..bdf366db8d 100644 --- a/confgenerator/testdata/goldens/logging-receiver_forward_omitting_optional_parameters/golden/linux/otel.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_forward_omitting_optional_parameters/golden/linux/otel.yaml @@ -880,7 +880,7 @@ receivers: start_at: beginning storage: file_storage fluentforward/fluent__logs: - endpoint: ":0" + endpoint: :0 hostmetrics/hostmetrics: collection_interval: 60s scrapers: diff --git a/confgenerator/testdata/goldens/logging-receiver_forward_omitting_optional_parameters/golden/windows-2012/otel.yaml b/confgenerator/testdata/goldens/logging-receiver_forward_omitting_optional_parameters/golden/windows-2012/otel.yaml index 9a38700959..1ae0271795 100644 --- a/confgenerator/testdata/goldens/logging-receiver_forward_omitting_optional_parameters/golden/windows-2012/otel.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_forward_omitting_optional_parameters/golden/windows-2012/otel.yaml @@ -1309,7 +1309,7 @@ processors: - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) receivers: fluentforward/fluent__logs: - endpoint: ":0" + endpoint: :0 hostmetrics/hostmetrics: collection_interval: 60s scrapers: diff --git a/confgenerator/testdata/goldens/logging-receiver_forward_omitting_optional_parameters/golden/windows/otel.yaml b/confgenerator/testdata/goldens/logging-receiver_forward_omitting_optional_parameters/golden/windows/otel.yaml index 9a38700959..1ae0271795 100644 --- a/confgenerator/testdata/goldens/logging-receiver_forward_omitting_optional_parameters/golden/windows/otel.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_forward_omitting_optional_parameters/golden/windows/otel.yaml @@ -1309,7 +1309,7 @@ processors: - set(attributes["gcp.log_name"], cache["value"]) where (cache != nil and cache["value"] != nil) receivers: fluentforward/fluent__logs: - endpoint: ":0" + endpoint: :0 hostmetrics/hostmetrics: collection_interval: 60s scrapers: diff --git a/confgenerator/testdata/goldens/metrics-exporter_prometheus_otlp/golden/linux-gpu/otel.yaml b/confgenerator/testdata/goldens/metrics-exporter_prometheus_otlp/golden/linux-gpu/otel.yaml index 37a8ac98be..cb92da0832 100644 --- a/confgenerator/testdata/goldens/metrics-exporter_prometheus_otlp/golden/linux-gpu/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-exporter_prometheus_otlp/golden/linux-gpu/otel.yaml @@ -995,6 +995,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-exporter_prometheus_otlp/golden/linux/otel.yaml b/confgenerator/testdata/goldens/metrics-exporter_prometheus_otlp/golden/linux/otel.yaml index 6282f4bce1..7433bdaff5 100644 --- a/confgenerator/testdata/goldens/metrics-exporter_prometheus_otlp/golden/linux/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-exporter_prometheus_otlp/golden/linux/otel.yaml @@ -949,6 +949,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-exporter_prometheus_otlp/golden/windows-2012/otel.yaml b/confgenerator/testdata/goldens/metrics-exporter_prometheus_otlp/golden/windows-2012/otel.yaml index e4affa0e58..84e69ea867 100644 --- a/confgenerator/testdata/goldens/metrics-exporter_prometheus_otlp/golden/windows-2012/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-exporter_prometheus_otlp/golden/windows-2012/otel.yaml @@ -1381,6 +1381,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-exporter_prometheus_otlp/golden/windows/otel.yaml b/confgenerator/testdata/goldens/metrics-exporter_prometheus_otlp/golden/windows/otel.yaml index e4affa0e58..84e69ea867 100644 --- a/confgenerator/testdata/goldens/metrics-exporter_prometheus_otlp/golden/windows/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-exporter_prometheus_otlp/golden/windows/otel.yaml @@ -1381,6 +1381,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus/golden/linux-gpu/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus/golden/linux-gpu/otel.yaml index 37a8ac98be..cb92da0832 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus/golden/linux-gpu/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus/golden/linux-gpu/otel.yaml @@ -995,6 +995,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus/golden/linux/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus/golden/linux/otel.yaml index 6282f4bce1..7433bdaff5 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus/golden/linux/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus/golden/linux/otel.yaml @@ -949,6 +949,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus/golden/windows-2012/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus/golden/windows-2012/otel.yaml index e4affa0e58..84e69ea867 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus/golden/windows-2012/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus/golden/windows-2012/otel.yaml @@ -1381,6 +1381,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus/golden/windows/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus/golden/windows/otel.yaml index e4affa0e58..84e69ea867 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus/golden/windows/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus/golden/windows/otel.yaml @@ -1381,6 +1381,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_basic_auth/golden/linux-gpu/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_basic_auth/golden/linux-gpu/otel.yaml index 619b3e3c01..e3afeb2373 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_basic_auth/golden/linux-gpu/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_basic_auth/golden/linux-gpu/otel.yaml @@ -998,6 +998,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_basic_auth/golden/linux/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_basic_auth/golden/linux/otel.yaml index dbea56bc23..2c79413a90 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_basic_auth/golden/linux/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_basic_auth/golden/linux/otel.yaml @@ -952,6 +952,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_basic_auth/golden/windows-2012/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_basic_auth/golden/windows-2012/otel.yaml index 7cc84c3cb9..9a2e5da088 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_basic_auth/golden/windows-2012/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_basic_auth/golden/windows-2012/otel.yaml @@ -1384,6 +1384,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_basic_auth/golden/windows/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_basic_auth/golden/windows/otel.yaml index 7cc84c3cb9..9a2e5da088 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_basic_auth/golden/windows/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_basic_auth/golden/windows/otel.yaml @@ -1384,6 +1384,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_complex/golden/linux-gpu/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_complex/golden/linux-gpu/otel.yaml index 8eaa26f650..372f9741e5 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_complex/golden/linux-gpu/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_complex/golden/linux-gpu/otel.yaml @@ -1059,6 +1059,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_complex/golden/linux/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_complex/golden/linux/otel.yaml index f33e09eb65..daa185d250 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_complex/golden/linux/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_complex/golden/linux/otel.yaml @@ -1013,6 +1013,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_complex/golden/windows-2012/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_complex/golden/windows-2012/otel.yaml index fa0df27bbe..c833b829e9 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_complex/golden/windows-2012/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_complex/golden/windows-2012/otel.yaml @@ -1445,6 +1445,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_complex/golden/windows/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_complex/golden/windows/otel.yaml index fa0df27bbe..c833b829e9 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_complex/golden/windows/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_complex/golden/windows/otel.yaml @@ -1445,6 +1445,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_default_replacement/golden/linux-gpu/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_default_replacement/golden/linux-gpu/otel.yaml index 44a43cdc5d..2d6ffb6e22 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_default_replacement/golden/linux-gpu/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_default_replacement/golden/linux-gpu/otel.yaml @@ -994,6 +994,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_default_replacement/golden/linux/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_default_replacement/golden/linux/otel.yaml index 942d960335..2bc3d8b53d 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_default_replacement/golden/linux/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_default_replacement/golden/linux/otel.yaml @@ -948,6 +948,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_default_replacement/golden/windows-2012/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_default_replacement/golden/windows-2012/otel.yaml index 3dbcfc2b5a..d33b8ebe57 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_default_replacement/golden/windows-2012/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_default_replacement/golden/windows-2012/otel.yaml @@ -1380,6 +1380,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_default_replacement/golden/windows/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_default_replacement/golden/windows/otel.yaml index 3dbcfc2b5a..d33b8ebe57 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_default_replacement/golden/windows/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_default_replacement/golden/windows/otel.yaml @@ -1380,6 +1380,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_multi_replacement_regex/golden/linux-gpu/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_multi_replacement_regex/golden/linux-gpu/otel.yaml index a41d925357..807cb3bd85 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_multi_replacement_regex/golden/linux-gpu/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_multi_replacement_regex/golden/linux-gpu/otel.yaml @@ -995,6 +995,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_multi_replacement_regex/golden/linux/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_multi_replacement_regex/golden/linux/otel.yaml index 8352e65a4c..6a9c7a4081 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_multi_replacement_regex/golden/linux/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_multi_replacement_regex/golden/linux/otel.yaml @@ -949,6 +949,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_multi_replacement_regex/golden/windows-2012/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_multi_replacement_regex/golden/windows-2012/otel.yaml index 1c1b08600f..6aecd35398 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_multi_replacement_regex/golden/windows-2012/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_multi_replacement_regex/golden/windows-2012/otel.yaml @@ -1381,6 +1381,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_multi_replacement_regex/golden/windows/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_multi_replacement_regex/golden/windows/otel.yaml index 1c1b08600f..6aecd35398 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_multi_replacement_regex/golden/windows/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_multi_replacement_regex/golden/windows/otel.yaml @@ -1381,6 +1381,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_node_exporter/golden/linux-gpu/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_node_exporter/golden/linux-gpu/otel.yaml index 92804fceca..81ca418a32 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_node_exporter/golden/linux-gpu/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_node_exporter/golden/linux-gpu/otel.yaml @@ -988,6 +988,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_node_exporter/golden/linux/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_node_exporter/golden/linux/otel.yaml index f7e30861b8..d878668a2c 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_node_exporter/golden/linux/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_node_exporter/golden/linux/otel.yaml @@ -942,6 +942,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_node_exporter/golden/windows-2012/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_node_exporter/golden/windows-2012/otel.yaml index 83044a80b0..16fd62bdb9 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_node_exporter/golden/windows-2012/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_node_exporter/golden/windows-2012/otel.yaml @@ -1374,6 +1374,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_node_exporter/golden/windows/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_node_exporter/golden/windows/otel.yaml index 83044a80b0..16fd62bdb9 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_node_exporter/golden/windows/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_node_exporter/golden/windows/otel.yaml @@ -1374,6 +1374,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_relabel/golden/linux-gpu/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_relabel/golden/linux-gpu/otel.yaml index 70578ef7c8..6a4a732acf 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_relabel/golden/linux-gpu/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_relabel/golden/linux-gpu/otel.yaml @@ -1049,6 +1049,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_relabel/golden/linux/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_relabel/golden/linux/otel.yaml index c5ac3ac246..65b42b2458 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_relabel/golden/linux/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_relabel/golden/linux/otel.yaml @@ -1003,6 +1003,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_relabel/golden/windows-2012/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_relabel/golden/windows-2012/otel.yaml index df60a228d9..36db147166 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_relabel/golden/windows-2012/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_relabel/golden/windows-2012/otel.yaml @@ -1435,6 +1435,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_relabel/golden/windows/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_relabel/golden/windows/otel.yaml index df60a228d9..36db147166 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_relabel/golden/windows/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_relabel/golden/windows/otel.yaml @@ -1435,6 +1435,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_replace_using_capture_groups/golden/linux-gpu/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_replace_using_capture_groups/golden/linux-gpu/otel.yaml index 281388465c..c1d3aaf030 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_replace_using_capture_groups/golden/linux-gpu/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_replace_using_capture_groups/golden/linux-gpu/otel.yaml @@ -995,6 +995,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_replace_using_capture_groups/golden/linux/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_replace_using_capture_groups/golden/linux/otel.yaml index 6cac98b0e0..12e0570137 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_replace_using_capture_groups/golden/linux/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_replace_using_capture_groups/golden/linux/otel.yaml @@ -949,6 +949,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_replace_using_capture_groups/golden/windows-2012/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_replace_using_capture_groups/golden/windows-2012/otel.yaml index bcd78dc04a..f6a0d41d1e 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_replace_using_capture_groups/golden/windows-2012/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_replace_using_capture_groups/golden/windows-2012/otel.yaml @@ -1381,6 +1381,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_replace_using_capture_groups/golden/windows/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_replace_using_capture_groups/golden/windows/otel.yaml index bcd78dc04a..f6a0d41d1e 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_replace_using_capture_groups/golden/windows/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_replace_using_capture_groups/golden/windows/otel.yaml @@ -1381,6 +1381,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_scrape_interval/golden/linux-gpu/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_scrape_interval/golden/linux-gpu/otel.yaml index b8d41149a7..97c26cc257 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_scrape_interval/golden/linux-gpu/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_scrape_interval/golden/linux-gpu/otel.yaml @@ -1031,6 +1031,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_scrape_interval/golden/linux/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_scrape_interval/golden/linux/otel.yaml index 689901e353..d7036a4d3e 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_scrape_interval/golden/linux/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_scrape_interval/golden/linux/otel.yaml @@ -985,6 +985,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_scrape_interval/golden/windows-2012/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_scrape_interval/golden/windows-2012/otel.yaml index 823a682cc3..595527fd0f 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_scrape_interval/golden/windows-2012/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_scrape_interval/golden/windows-2012/otel.yaml @@ -1417,6 +1417,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_scrape_interval/golden/windows/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_scrape_interval/golden/windows/otel.yaml index 823a682cc3..595527fd0f 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_scrape_interval/golden/windows/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_scrape_interval/golden/windows/otel.yaml @@ -1417,6 +1417,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_tlx_with_certs/golden/linux-gpu/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_tlx_with_certs/golden/linux-gpu/otel.yaml index b9763809a2..0c9040c773 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_tlx_with_certs/golden/linux-gpu/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_tlx_with_certs/golden/linux-gpu/otel.yaml @@ -993,6 +993,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_tlx_with_certs/golden/linux/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_tlx_with_certs/golden/linux/otel.yaml index b597168104..f6ed52ac0b 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_tlx_with_certs/golden/linux/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_tlx_with_certs/golden/linux/otel.yaml @@ -947,6 +947,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_tlx_with_certs/golden/windows-2012/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_tlx_with_certs/golden/windows-2012/otel.yaml index 2048219071..df7b3a0d25 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_tlx_with_certs/golden/windows-2012/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_tlx_with_certs/golden/windows-2012/otel.yaml @@ -1379,6 +1379,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/metrics-receiver_prometheus_tlx_with_certs/golden/windows/otel.yaml b/confgenerator/testdata/goldens/metrics-receiver_prometheus_tlx_with_certs/golden/windows/otel.yaml index 2048219071..df7b3a0d25 100644 --- a/confgenerator/testdata/goldens/metrics-receiver_prometheus_tlx_with_certs/golden/windows/otel.yaml +++ b/confgenerator/testdata/goldens/metrics-receiver_prometheus_tlx_with_certs/golden/windows/otel.yaml @@ -1379,6 +1379,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/test-otlp-exporter-only/golden/linux-gpu/otel.yaml b/confgenerator/testdata/goldens/test-otlp-exporter-only/golden/linux-gpu/otel.yaml index 90f61e90f1..16674e6928 100644 --- a/confgenerator/testdata/goldens/test-otlp-exporter-only/golden/linux-gpu/otel.yaml +++ b/confgenerator/testdata/goldens/test-otlp-exporter-only/golden/linux-gpu/otel.yaml @@ -1037,6 +1037,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/test-otlp-exporter-only/golden/linux/otel.yaml b/confgenerator/testdata/goldens/test-otlp-exporter-only/golden/linux/otel.yaml index d16be5e6c3..abf5c14154 100644 --- a/confgenerator/testdata/goldens/test-otlp-exporter-only/golden/linux/otel.yaml +++ b/confgenerator/testdata/goldens/test-otlp-exporter-only/golden/linux/otel.yaml @@ -991,6 +991,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/test-otlp-exporter-only/golden/windows-2012/otel.yaml b/confgenerator/testdata/goldens/test-otlp-exporter-only/golden/windows-2012/otel.yaml index 5ffbfc3baf..ef89133095 100644 --- a/confgenerator/testdata/goldens/test-otlp-exporter-only/golden/windows-2012/otel.yaml +++ b/confgenerator/testdata/goldens/test-otlp-exporter-only/golden/windows-2012/otel.yaml @@ -1423,6 +1423,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/confgenerator/testdata/goldens/test-otlp-exporter-only/golden/windows/otel.yaml b/confgenerator/testdata/goldens/test-otlp-exporter-only/golden/windows/otel.yaml index 5ffbfc3baf..ef89133095 100644 --- a/confgenerator/testdata/goldens/test-otlp-exporter-only/golden/windows/otel.yaml +++ b/confgenerator/testdata/goldens/test-otlp-exporter-only/golden/windows/otel.yaml @@ -1423,6 +1423,10 @@ receivers: location: test-zone machine_type: test-machine-type namespace: test-instance-id/test-instance-name + storage: + tsdb: + outofordertimewindow: 0 + retention: {} otlp: translation_strategy: UnderscoreEscapingWithSuffixes label_name_underscore_sanitization: true diff --git a/go.work b/go.work new file mode 100644 index 0000000000..fda588274c --- /dev/null +++ b/go.work @@ -0,0 +1,14 @@ +go 1.25.0 + +use ( + . + ./cmd/otelopscol + ./internal/components + ./internal/components/processor/agentmetricsprocessor + ./internal/components/processor/filterprocessor + ./internal/components/processor/normalizesumsprocessor + ./internal/components/processor/transformprocessor + ./internal/components/receiver/dcgmreceiver + ./internal/components/receiver/nvmlreceiver + ./internal/distrogen +) diff --git a/go.work.sum b/go.work.sum new file mode 100644 index 0000000000..9f3fb91a80 --- /dev/null +++ b/go.work.sum @@ -0,0 +1,510 @@ +cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.120.0/go.mod h1:/beW32s8/pGRuj4IILWQNd4uuebeT4dkOhKmkfit64Q= +cloud.google.com/go/accessapproval v1.8.8/go.mod h1:RFwPY9JDKseP4gJrX1BlAVsP5O6kI8NdGlTmaeDefmk= +cloud.google.com/go/accesscontextmanager v1.9.7/go.mod h1:i6e0nd5CPcrh7+YwGq4bKvju5YB9sgoAip+mXU73aMM= +cloud.google.com/go/aiplatform v1.120.0/go.mod h1:6mDthfmy0oS1EQhVFdijoxkVdI2+HIZkpuGTBpedeCg= +cloud.google.com/go/analytics v0.30.1/go.mod h1:V/FnINU5kMOsttZnKPnXfKi6clJUHTEXUKQjHxcNK8A= +cloud.google.com/go/apigateway v1.7.7/go.mod h1:j1bCmrUK1BzVHpiIyTApxB7cRyhivKzltqLmp6j6i7U= +cloud.google.com/go/apigeeconnect v1.7.7/go.mod h1:ftGK3nca0JePiVLl0A6alaMjKdOc5C+sAkFMyH2RH8U= +cloud.google.com/go/apigeeregistry v0.10.0/go.mod h1:SAlF5OhKvyLDuwWAaFAIVJjrEqKRrGTPkJs+TWNnSqg= +cloud.google.com/go/appengine v1.9.7/go.mod h1:y1XpGVeAhbsNzHida79cHbr3pFRsym0ob8xnC8yphbo= +cloud.google.com/go/area120 v0.10.0/go.mod h1:Xg3fKl4xU3UVai9wsI1FXwNU8wSCDYT7dFZfwJKViAM= +cloud.google.com/go/artifactregistry v1.20.0/go.mod h1:0G9wdbGyDFkvrYH+2AlQs9MuTJdbY8Vg45M8VjlI8rc= +cloud.google.com/go/asset v1.22.1/go.mod h1:NlvWwmca7CX6BIBEdRNxOocH6DowmBghAAHucOHuHng= +cloud.google.com/go/assuredworkloads v1.13.0/go.mod h1:o/oHEOnUlribR+uJWTKQo8A5RhSl9K9FNeMOew4TJ3M= +cloud.google.com/go/auth v0.16.4/go.mod h1:j10ncYwjX/g3cdX7GpEzsdM+d+ZNsXAbb6qXA7p1Y5M= +cloud.google.com/go/auth v0.16.5/go.mod h1:utzRfHMP+Vv0mpOkTRQoWD2q3BatTOoWbA7gCc2dUhQ= +cloud.google.com/go/auth v0.18.0/go.mod h1:wwkPM1AgE1f2u6dG443MiWoD8C3BtOywNsUMcUTVDRo= +cloud.google.com/go/automl v1.15.0/go.mod h1:U9zOtQb8zVrFNGTuW3BfxeqmLyeleLgT9B12EaXfODg= +cloud.google.com/go/baremetalsolution v1.4.0/go.mod h1:K6C6g4aS8LW95I0fEHZiBsBlh0UxwDLGf+S/vyfXbvg= +cloud.google.com/go/batch v1.14.0/go.mod h1:oeQveyG6NDS/ks2ilOP4LzKRmuIaI7GLe0CkR7WF6pk= +cloud.google.com/go/beyondcorp v1.2.0/go.mod h1:sszcgxpPPBEfLzbI0aYCTg6tT1tyt3CmKav3NZIUcvI= +cloud.google.com/go/bigquery v1.74.0/go.mod h1:iViO7Cx3A/cRKcHNRsHB3yqGAMInFBswrE9Pxazsc90= +cloud.google.com/go/bigtable v1.42.0/go.mod h1:oZ30nofVB6/UYGg7lBwGLWSea7NZUvw/WvBBgLY07xU= +cloud.google.com/go/billing v1.21.0/go.mod h1:ZGairB3EVnb3i09E2SxFxo50p5unPaMTuo1jh6jW9js= +cloud.google.com/go/binaryauthorization v1.10.0/go.mod h1:WOuiaQkI4PU/okwrcREjSAr2AUtjQgVe+PlrXKOmKKw= +cloud.google.com/go/certificatemanager v1.9.6/go.mod h1:vWogV874jKZkSRDFCMM3r7wqybv8WXs3XhyNff6o/Zo= +cloud.google.com/go/channel v1.21.0/go.mod h1:8v3TwHtgLmFxTpL2U+e10CLFOQN8u/Vr9RhYcJUS3y8= +cloud.google.com/go/cloudbuild v1.25.0/go.mod h1:lCu+T6IPkobPo2Nw+vCE7wuaAl9HbXLzdPx/tcF+oWo= +cloud.google.com/go/clouddms v1.8.8/go.mod h1:QtCyw+a73dlkDb2q20aTAPvfaTZCepDDi6Gb1AKq0a4= +cloud.google.com/go/cloudtasks v1.13.7/go.mod h1:H0TThOUG+Ml34e2+ZtW6k6nt4i9KuH3nYAJ5mxh7OM4= +cloud.google.com/go/compute v1.54.0/go.mod h1:RfBj0L1x/pIM84BrzNX2V21oEv16EKRPBiTcBRRH1Ww= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.8.0/go.mod h1:sYOGTp851OV9bOFJ9CH7elVvyzopvWQFNNghtDQ/Biw= +cloud.google.com/go/contactcenterinsights v1.17.4/go.mod h1:kZe6yOnKDfpPz2GphDHynxk/Spx+53UX/pGf+SmWAKM= +cloud.google.com/go/container v1.46.0/go.mod h1:A7gMqdQduTk46+zssWDTKbGS2z46UsJNXfKqvMI1ZO4= +cloud.google.com/go/containeranalysis v0.14.2/go.mod h1:FjppROiUtP9cyMegdWdY/TsBSGc6kqh1GjA2NOJXXL8= +cloud.google.com/go/datacatalog v1.26.1/go.mod h1:2Qcq8vsHNxMDgjgadRFmFG47Y+uuIVsyEGUrlrKEdrg= +cloud.google.com/go/dataflow v0.11.1/go.mod h1:3s6y/h5Qz7uuxTmKJKBifkYZ3zs63jS+6VGtSu8Cf7Y= +cloud.google.com/go/dataform v0.13.0/go.mod h1:U3fqrPY5jAcFh1a8rQb4a+PQ7zKlc5qfgotFZ+luKPo= +cloud.google.com/go/datafusion v1.8.7/go.mod h1:4dkFb1la41qCEXh1AzYtFwl842bu2ikTUXyKhjvFCb0= +cloud.google.com/go/datalabeling v0.9.7/go.mod h1:EEUVn+wNn3jl19P2S13FqE1s9LsKzRsPuuMRq2CMsOk= +cloud.google.com/go/dataplex v1.28.0/go.mod h1:VB+xlYJiJ5kreonXsa2cHPj0A3CfPh/mgiHG4JFhbUA= +cloud.google.com/go/dataproc/v2 v2.16.0/go.mod h1:HlzFg8k1SK+bJN3Zsy2z5g6OZS1D4DYiDUgJtF0gJnE= +cloud.google.com/go/dataqna v0.9.8/go.mod h1:2lHKmGPOqzzuqCc5NI0+Xrd5om4ulxGwPpLB4AnFgpA= +cloud.google.com/go/datastore v1.22.0/go.mod h1:aopSX+Whx0lHspWWBj+AjWt68/zjYsPfDe3LjWtqZg8= +cloud.google.com/go/datastream v1.15.1/go.mod h1:aV1Grr9LFon0YvqryE5/gF1XAhcau2uxN2OvQJPpqRw= +cloud.google.com/go/deploy v1.27.3/go.mod h1:7LFIYYTSSdljYRqY3n+JSmIFdD4lv6aMD5xg0crB5iw= +cloud.google.com/go/dialogflow v1.76.0/go.mod h1:mdLkMmSCghfcP85X9dFBlirC1OssS65KE5hrrSz2GXY= +cloud.google.com/go/dlp v1.28.0/go.mod h1:C3od1fIK8lf7Kr62aU1Uh0z4OL5Z8s3do3znAiEupAw= +cloud.google.com/go/documentai v1.42.0/go.mod h1:CABOUzRNOuvb/QwJS2LS80Hpqbu3UW2afyRKTYuW7bo= +cloud.google.com/go/domains v0.10.7/go.mod h1:T3WG/QUAO/52z4tUPooKS8AY7yXaFxPYn1V3F0/JbNQ= +cloud.google.com/go/edgecontainer v1.4.4/go.mod h1:yyNVHsCKtsX/0mqFdbljQw0Uo660q2dlMPaiqYiC2Tg= +cloud.google.com/go/errorreporting v0.4.0/go.mod h1:dZGEhqzdHZSRxxWLVjC3Ue5CVaROzvP58D9rU6zbBfw= +cloud.google.com/go/essentialcontacts v1.7.7/go.mod h1:ytycWAEn/aKUMRKQPMVgMrAtphEMgjbzL8vFwM3tqXs= +cloud.google.com/go/eventarc v1.18.0/go.mod h1:/6SDoqh5+9QNUqCX4/oQcJVK16fG/snHBSXu7lrJtO8= +cloud.google.com/go/filestore v1.10.3/go.mod h1:94ZGyLTx9j+aWKozPQ6Wbq1DuImie/L/HIdGMshtwac= +cloud.google.com/go/firestore v1.21.0/go.mod h1:1xH6HNcnkf/gGyR8udd6pFO4Z7GWJSwLKQMx/u6UrP4= +cloud.google.com/go/functions v1.19.7/go.mod h1:xbcKfS7GoIcaXr2FSwmtn9NXal1JR4TV6iYZlgXffwA= +cloud.google.com/go/gkebackup v1.8.1/go.mod h1:GAaAl+O5D9uISH5MnClUop2esQW4pDa2qe/95A4l7YQ= +cloud.google.com/go/gkeconnect v0.12.5/go.mod h1:wMD2RXcsAWlkREZWJDVeDV70PYka1iEb9stFmgpw+5o= +cloud.google.com/go/gkehub v0.16.0/go.mod h1:ADp27Ucor8v81wY+x/5pOxTorxkPj/xswH3AUpN62GU= +cloud.google.com/go/gkemulticloud v1.6.0/go.mod h1:bGpd4o/Z5Z/XFlaojkgdVisHRwb+fLJvUPzsmV0I9ok= +cloud.google.com/go/gsuiteaddons v1.7.8/go.mod h1:DBKNHH4YXAdd/rd6zVvtOGAJNGo0ekOh+nIjTUDEJ5U= +cloud.google.com/go/iam v1.5.3/go.mod h1:MR3v9oLkZCTlaqljW6Eb2d3HGDGK5/bDv93jhfISFvU= +cloud.google.com/go/iap v1.11.3/go.mod h1:+gXO0ClH62k2LVlfhHzrpiHQNyINlEVmGAE3+DB4ShU= +cloud.google.com/go/ids v1.5.7/go.mod h1:N3ZQOIgIBwwOu2tzyhmh3JDT+kt8PcoKkn2BRT9Qe4A= +cloud.google.com/go/iot v1.8.7/go.mod h1:HvVcypV8LPv1yTXSLCNK+YCtqGHhq+p0F3BXETfpN+U= +cloud.google.com/go/kms v1.26.0/go.mod h1:pHKOdFJm63hxBsiPkYtowZPltu9dW0MWvBa6IA4HM58= +cloud.google.com/go/language v1.14.6/go.mod h1:7y3J9OexQsfkWNGCxhT+7lb64pa60e12ZCoWDOHxJ1M= +cloud.google.com/go/lifesciences v0.10.7/go.mod h1:v3AbTki9iWttEls/Wf4ag3EqeLRHofploOcpsLnu7iY= +cloud.google.com/go/longrunning v0.7.0/go.mod h1:ySn2yXmjbK9Ba0zsQqunhDkYi0+9rlXIwnoAf+h+TPY= +cloud.google.com/go/managedidentities v1.7.7/go.mod h1:nwNlMxtBo2YJMvsKXRtAD1bL41qiCI9npS7cbqrsJUs= +cloud.google.com/go/maps v1.29.0/go.mod h1:FNATcM5ziB2TDE2IVWH4f/yeXc+SbUk1X+bmKjR8HEA= +cloud.google.com/go/mediatranslation v0.9.7/go.mod h1:mz3v6PR7+Fd/1bYrRxNFGnd+p4wqdc/fyutqC5QHctw= +cloud.google.com/go/memcache v1.11.7/go.mod h1:AU1jYlUqCihxapcJ1GGMtlMWDVhzjbfUWBXqsXa4rBg= +cloud.google.com/go/metastore v1.14.8/go.mod h1:h1XI2LpD4ohJhQYn9TwXqKb5sVt6KSo47ft96SiFF1s= +cloud.google.com/go/networkconnectivity v1.21.0/go.mod h1:XC1UJ+tqBsLWz73dqrMc7kUvdTv0FIxtDGv6YntTBO0= +cloud.google.com/go/networkmanagement v1.23.0/go.mod h1:QTYCWp5UxUnU280SqF7AX/mf6NhsqKblmLeCALQmx5c= +cloud.google.com/go/networksecurity v0.11.0/go.mod h1:JLgDsg4tOyJ3eMO8lypjqMftbfd60SJ+P7T+DUmWBsM= +cloud.google.com/go/notebooks v1.12.7/go.mod h1:uR9pxAkKmlNloibMr9Q1t8WhIu4P2JeqJs7c064/0Mo= +cloud.google.com/go/optimization v1.7.7/go.mod h1:OY2IAlX23o52qwMAZ0w65wibKuV12a4x6IHDTCq6kcU= +cloud.google.com/go/orchestration v1.11.10/go.mod h1:tz7m1s4wNEvhNNIM3JOMH0lYxBssu9+7si5MCPw/4/0= +cloud.google.com/go/orgpolicy v1.15.1/go.mod h1:bpvi9YIyU7wCW9WiXL/ZKT7pd2Ovegyr2xENIeRX5q0= +cloud.google.com/go/osconfig v1.16.0/go.mod h1:PRmLgZ1loD1hGaqnTBww1nETbqcqAvmTQOLYiIZ7Nvk= +cloud.google.com/go/oslogin v1.14.7/go.mod h1:NB6NqBHfDMwznePdBVX+ILllc1oPCdNSGp5u/WIyndY= +cloud.google.com/go/phishingprotection v0.9.7/go.mod h1:JTI4HNGyAbWolBoNOoCyCF0e3cqPNrYnlievHU49EwE= +cloud.google.com/go/policytroubleshooter v1.11.7/go.mod h1:JP/aQ+bUkt4Gz6lQXBi/+A/6nyNRZ0Pvxui5Xl9ieyk= +cloud.google.com/go/privatecatalog v0.10.8/go.mod h1:BkLHi+rtAGYBt5DocXLytHhF0n6F03Tegxgty40Y7aA= +cloud.google.com/go/pubsub v1.50.1/go.mod h1:6YVJv3MzWJUVdvQXG081sFvS0dWQOdnV+oTo++q/xFk= +cloud.google.com/go/pubsub/v2 v2.0.0/go.mod h1:0aztFxNzVQIRSZ8vUr79uH2bS3jwLebwK6q1sgEub+E= +cloud.google.com/go/pubsublite v1.8.2/go.mod h1:4r8GSa9NznExjuLPEJlF1VjOPOpgf3IT6k8x/YgaOPI= +cloud.google.com/go/recaptchaenterprise/v2 v2.21.0/go.mod h1:HxQYqZC2/zl2CvKN7jJEv71vEdDi1GMGNUiZxnpiuVI= +cloud.google.com/go/recommendationengine v0.9.7/go.mod h1:snZ/FL147u86Jqpv1j95R+CyU5NvL/UzYiyDo6UByTM= +cloud.google.com/go/recommender v1.13.6/go.mod h1:y5/5womtdOaIM3xx+76vbsiA+8EBTIVfWnxHDFHBGJM= +cloud.google.com/go/redis v1.18.3/go.mod h1:x8HtXZbvMBDNT6hMHaQ022Pos5d7SP7YsUH8fCJ2Wm4= +cloud.google.com/go/resourcemanager v1.10.7/go.mod h1:rScGkr6j2eFwxAjctvOP/8sqnEpDbQ9r5CKwKfomqjs= +cloud.google.com/go/resourcesettings v1.8.3/go.mod h1:BzgfXFHIWOOmHe6ZV9+r3OWfpHJgnqXy8jqwx4zTMLw= +cloud.google.com/go/retail v1.26.0/go.mod h1:gMfh6s174Mvy1rK4g50J9TH5sRim8px+Krml25kdrqo= +cloud.google.com/go/run v1.15.0/go.mod h1:rgFHMdAopLl++57vzeqA+a1o2x0/ILZnEacRD6nC0EA= +cloud.google.com/go/scheduler v1.11.8/go.mod h1:bNKU7/f04eoM6iKQpwVLvFNBgGyJNS87RiFN73mIPik= +cloud.google.com/go/secretmanager v1.16.0/go.mod h1://C/e4I8D26SDTz1f3TQcddhcmiC3rMEl0S1Cakvs3Q= +cloud.google.com/go/security v1.19.2/go.mod h1:KXmf64mnOsLVKe8mk/bZpU1Rsvxqc0Ej0A6tgCeN93w= +cloud.google.com/go/securitycenter v1.38.1/go.mod h1:Ge2D/SlG2lP1FrQD7wXHy8qyeloRenvKXeB4e7zO6z0= +cloud.google.com/go/servicedirectory v1.12.7/go.mod h1:gOtN+qbuCMH6tj2dqlDY3qQL7w3V0+nkWaZElnJK8Ps= +cloud.google.com/go/shell v1.8.7/go.mod h1:OTke7qc3laNEW5Jr5OV9VR3IwU5x5VqGOE6705zFex4= +cloud.google.com/go/spanner v1.88.0/go.mod h1:MzulBwuuYwQUVdkZXBBFapmXee3N+sQrj2T/yup6uEE= +cloud.google.com/go/speech v1.30.0/go.mod h1:F2+NJujR8uzDLd6bwy5kgtVycxvEq06nzvzz5eQ/gMo= +cloud.google.com/go/storage v1.56.0/go.mod h1:Tpuj6t4NweCLzlNbw9Z9iwxEkrSem20AetIeH/shgVU= +cloud.google.com/go/storage v1.59.0/go.mod h1:cMWbtM+anpC74gn6qjLh+exqYcfmB9Hqe5z6adx+CLI= +cloud.google.com/go/storage v1.59.2/go.mod h1:cMWbtM+anpC74gn6qjLh+exqYcfmB9Hqe5z6adx+CLI= +cloud.google.com/go/storagetransfer v1.13.1/go.mod h1:S858w5l383ffkdqAqrAA+BC7KlhCqeNieK3sFf5Bj4Y= +cloud.google.com/go/talent v1.8.4/go.mod h1:3yukBXUTVFNyKcJpUExW/k5gqEy8qW6OCNj7WdN0MWo= +cloud.google.com/go/texttospeech v1.16.0/go.mod h1:AeSkoH3ziPvapsuyI07TWY4oGxluAjntX+pF4PJ2jy0= +cloud.google.com/go/tpu v1.8.4/go.mod h1:ul0cyWSHr6jHGZYElZe6HvQn35VY93RAlwpDiSBRnPA= +cloud.google.com/go/translate v1.12.7/go.mod h1:wwJp14NZyWvcrFANhIXutXj0pOBkYciBHwSlUOykcjI= +cloud.google.com/go/video v1.27.1/go.mod h1:xzfAC77B4vtnbi/TT3UUxEjCa/+Ehy5EA8w470ytOig= +cloud.google.com/go/videointelligence v1.12.7/go.mod h1:XAk5hCMY+GihxJ55jNoMdwdXSNZnCl3wGs2+94gK7MA= +cloud.google.com/go/vision/v2 v2.9.6/go.mod h1:lJC+vP15D5znJvHQYjEoTKnpToX1L93BUlvBmzM0gyg= +cloud.google.com/go/vmmigration v1.10.0/go.mod h1:LDztCWEb+RwS1bPg4Xzt0fcJS9kVrFxa3ejhH7OW9vg= +cloud.google.com/go/vmwareengine v1.3.6/go.mod h1:ps0rb+Skgpt9ppHYC0o5DqtJ5ld2FyS8sAqtbHH8t9s= +cloud.google.com/go/vpcaccess v1.8.7/go.mod h1:9RYw5bVvk4Z51Rc8vwXT63yjEiMD/l7XyEaDyrNHgmk= +cloud.google.com/go/webrisk v1.11.2/go.mod h1:yH44GeXz5iz4HFsIlGeoVvnjwnmfbni7Lwj1SelV4f0= +cloud.google.com/go/websecurityscanner v1.7.7/go.mod h1:ng/PzARaus3Bj4Os4LpUnyYHsbtJky1HbBDmz148v1o= +cloud.google.com/go/workflows v1.14.3/go.mod h1:CC9+YdVI2Kvp0L58WajHpEfKJxhrtRh3uQ0SYWcmAk4= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0/go.mod h1:yAZHSGnqScoU556rBOVkwLze6WP5N+U11RHuWaGVxwY= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0/go.mod h1:Cz6ft6Dkn3Et6l2v2a9/RpN7epQ1GtDlO6lj8bEcOvw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0/go.mod h1:P4WPRUkOhJC13W//jWpyfJNDAIpvRbAUIYLX/4jtlE0= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.54.0 h1:lhhYARPUu3LmHysQ/igznQphfzynnqI3D75oUyw1HXk= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.54.0/go.mod h1:l9rva3ApbBpEJxSNYnwT9N4CDLrWgtq3u8736C5hyJw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.54.0/go.mod h1:vB2GH9GAYYJTO3mEn8oYwzEdhlayZIdQz6zdzgUIRvA= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.54.0/go.mod h1:Mf6O40IAyB9zR/1J8nGDDPirZQQPbYJni8Yisy7NTMc= +github.com/KimMachineGun/automemlimit v0.7.5/go.mod h1:QZxpHaGOQoYvFhv/r4u3U0JTC2ZcOwbSr11UZF46UBM= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= +github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/aws/aws-sdk-go-v2 v1.41.1/go.mod h1:MayyLB8y+buD9hZqkCW3kX1AKq07Y5pXxtgB+rRFhz0= +github.com/aws/aws-sdk-go-v2 v1.41.4/go.mod h1:mwsPRE8ceUUpiTgF7QmQIJ7lgsKUPQOUl3o72QBrE1o= +github.com/aws/aws-sdk-go-v2/config v1.32.7/go.mod h1:2/Qm5vKUU/r7Y+zUk/Ptt2MDAEKAfUtKc1+3U1Mo3oY= +github.com/aws/aws-sdk-go-v2/config v1.32.12/go.mod h1:96zTvoOFR4FURjI+/5wY1vc1ABceROO4lWgWJuxgy0g= +github.com/aws/aws-sdk-go-v2/credentials v1.19.7/go.mod h1:qOZk8sPDrxhf+4Wf4oT2urYJrYt3RejHSzgAquYeppw= +github.com/aws/aws-sdk-go-v2/credentials v1.19.12/go.mod h1:U3R1RtSHx6NB0DvEQFGyf/0sbrpJrluENHdPy1j/3TE= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.17/go.mod h1:tyw7BOl5bBe/oqvoIeECFJjMdzXoa/dfVz3QQ5lgHGA= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.20/go.mod h1:z/MVwUARehy6GAg/yQ1GO2IMl0k++cu1ohP9zo887wE= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.17/go.mod h1:5M5CI3D12dNOtH3/mk6minaRwI2/37ifCURZISxA/IQ= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.20/go.mod h1:oydPDJKcfMhgfcgBUZaG+toBbwy8yPWubJXBVERtI4o= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.17/go.mod h1:EhG22vHRrvF8oXSTYStZhJc1aUgKtnJe+aOiFEV90cM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.20/go.mod h1:YJ898MhD067hSHA6xYCx5ts/jEd8BSOLtQDL3iZsvbc= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.6/go.mod h1:O3h0IK87yXci+kg6flUKzJnWeziQUKciKrLjcatSNcY= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.296.0/go.mod h1:T6ndRfdhnXLIY5oKBHjYZDVj706los2zGdpThppquvA= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7/go.mod h1:x0nZssQ3qZSnIcePWLvcoFisRXJzcTVvYpAAdYX8+GI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.17/go.mod h1:F2xxQ9TZz5gDWsclCtPQscGpP0VUOc8RqgFM3vDENmU= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.20/go.mod h1:V4X406Y666khGa8ghKmphma/7C0DAtEQYhkq9z4vpbk= +github.com/aws/aws-sdk-go-v2/service/signin v1.0.5/go.mod h1:k029+U8SY30/3/ras4G/Fnv/b88N4mAfliNn08Dem4M= +github.com/aws/aws-sdk-go-v2/service/signin v1.0.8/go.mod h1:LXypKvk85AROkKhOG6/YEcHFPoX+prKTowKnVdcaIxE= +github.com/aws/aws-sdk-go-v2/service/sso v1.30.9/go.mod h1:yifAsgBxgJWn3ggx70A3urX2AN49Y5sJTD1UQFlfqBw= +github.com/aws/aws-sdk-go-v2/service/sso v1.30.13/go.mod h1:2h/xGEowcW/g38g06g3KpRWDlT+OTfxxI0o1KqayAB8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.13/go.mod h1:sTGThjphYE4Ohw8vJiRStAcu3rbjtXRsdNB0TvZ5wwo= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.17/go.mod h1:Al9fFsXjv4KfbzQHGe6V4NZSZQXecFcvaIF4e70FoRA= +github.com/aws/aws-sdk-go-v2/service/sts v1.41.6/go.mod h1:qgFDZQSD/Kys7nJnVqYlWKnh0SSdMjAi0uSwON4wgYQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.41.9/go.mod h1:LrlIndBDdjA/EeXeyNBle+gyCwTlizzW5ycgWnvIxkk= +github.com/aws/smithy-go v1.24.2/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= +github.com/bitly/go-simplejson v0.5.1/go.mod h1:YOPVLzCfwK14b4Sff3oP1AmGhI9T9Vsg84etUnlyp+Q= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f/go.mod h1:HlzOvOjVBOfTGSRXRyY0OiCS/3J1akRGQQpRO/7zyF4= +github.com/cncf/xds/go v0.0.0-20251110193048-8bfbf64dc13e/go.mod h1:KdCmV+x/BuvyMxRnYBlmVaq4OLiKW6iRQfvC62cvdkI= +github.com/coreos/go-systemd/v22 v22.6.0/go.mod h1:iG+pp635Fo7ZmV/j14KUcmEyWF+0X7Lua8rrTWzYgWU= +github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= +github.com/dave/jennifer v1.6.0/go.mod h1:AxTG893FiZKqxy3FP1kL80VMshSMuz2G+EgvszgGRnk= +github.com/docker/go-connections v0.6.0/go.mod h1:AahvXYshr6JgfUJGdDCs2b5EZG/vmaMAntpSFH5BFKE= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane/envoy v1.32.4/go.mod h1:Gzjc5k8JcJswLjAx1Zm+wSYE20UrLtt7JZMWiWQXQEw= +github.com/envoyproxy/go-control-plane/envoy v1.35.0/go.mod h1:09qwbGVuSWWAyN5t/b3iyVfz5+z8QWGrzkoqm/8SbEs= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU= +github.com/gkampitakis/ciinfo v0.3.2/go.mod h1:1NIwaOcFChN4fa/B0hEBdAb6npDlFL8Bwx4dfRLRqAo= +github.com/gkampitakis/go-diff v1.3.2/go.mod h1:LLgOrpqleQe26cte8s36HTWcTmMEur6OPYerdAAS9tk= +github.com/gkampitakis/go-snaps v0.5.15/go.mod h1:HNpx/9GoKisdhw9AFOBT1N7DBs9DiHo/hGheFGBZ+mc= +github.com/go-jose/go-jose/v4 v4.0.5/go.mod h1:s3P1lRrkT8igV8D9OjyL4WRyHvjB6a4JSllnOrmmBOA= +github.com/go-jose/go-jose/v4 v4.1.2/go.mod h1:22cg9HWM1pOlnRiY+9cQYJ9XHmya1bYW8OeDM6Ku6Oo= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-openapi/testify/enable/yaml/v2 v2.4.0/go.mod h1:14iV8jyyQlinc9StD7w1xVPW3CO3q1Gj04Jy//Kw4VM= +github.com/go-openapi/testify/v2 v2.4.0/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= +github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= +github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.2.5/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-pkcs11 v0.3.0/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA= +github.com/googleapis/enterprise-certificate-proxy v0.3.11/go.mod h1:RFV7MUdlb7AgEq2v7FmMCfeSMCllAzWxFgRdusoGks8= +github.com/googleapis/gax-go/v2 v2.16.0/go.mod h1:o1vfQjjNZn4+dPnRdl/4ZD7S9414Y4xA+a/6Icj6l14= +github.com/googleapis/gax-go/v2 v2.17.0/go.mod h1:mzaqghpQp4JDh3HvADwrat+6M3MOIDp5YKHhb9PAgDY= +github.com/googleapis/gax-go/v2 v2.18.0/go.mod h1:uSzZN4a356eRG985CzJ3WfbFSpqkLTjsnhWGJR6EwrE= +github.com/googleapis/gax-go/v2 v2.19.0/go.mod h1:w2ROXVdfGEVFXzmlciUU4EdjHgWvB5h2n6x/8XSTTJA= +github.com/googleapis/gax-go/v2 v2.20.0/go.mod h1:But/NJU6TnZsrLai/xBAQLLz+Hc7fHZJt/hsCz3Fih4= +github.com/googleapis/gax-go/v2 v2.21.0/go.mod h1:But/NJU6TnZsrLai/xBAQLLz+Hc7fHZJt/hsCz3Fih4= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hetznercloud/hcloud-go/v2 v2.36.0/go.mod h1:MnN/QJEa/RYNQiiVoJjNHPntM7Z1wlYPgJ2HA40/cDE= +github.com/ianlancetaylor/demangle v0.0.0-20250417193237-f615e6bd150b/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= +github.com/jessevdk/go-flags v1.6.1/go.mod h1:Mk8T1hIAWpOiJiHa9rJASDK2UGWji0EuPGBnNLMooyc= +github.com/jmattheis/goverter v1.9.4/go.mod h1:1n3q6zf7j58tXcRWHbLFxK2Jk8WQVzr0d3nuaCcRqeg= +github.com/joshdk/go-junit v1.0.0/go.mod h1:TiiV0PqkaNfFXjEiyjWM3XXrhVyCa1K4Zfga6W52ung= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= +github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= +github.com/knadh/koanf/v2 v2.3.3/go.mod h1:gRb40VRAbd4iJMYYD5IxZ6hfuopFcXBpc9bbQpZwo28= +github.com/lyft/protoc-gen-star/v2 v2.0.4/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= +github.com/maruel/natural v1.1.1/go.mod h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg= +github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A= +github.com/moby/moby/api v1.54.0/go.mod h1:8mb+ReTlisw4pS6BRzCMts5M49W5M7bKt1cJy/YbAqc= +github.com/moby/moby/client v0.3.0/go.mod h1:HJgFbJRvogDQjbM8fqc1MCEm4mIAGMLjXbgwoZp6jCQ= +github.com/moby/spdystream v0.5.1/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nsf/jsondiff v0.0.0-20260207060731-8e8d90c4c0ac/go.mod h1:mpRZBD8SJ55OIICQ3iWH0Yz3cjzA61JdqMLoWXeB2+8= +github.com/oklog/run v1.2.0/go.mod h1:mgDbKRSwPhJfesJ4PntqFUbKQRZ50NgmZTSPlFA0YFk= +github.com/onsi/ginkgo/v2 v2.25.3/go.mod h1:43uiyQC4Ed2tkOzLsEYm7hnrb7UJTWHYNsuy3bG/snE= +github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= +github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.148.0/go.mod h1:WUFkzTiOpt7EYyL67gv1GOf3RD8qKWGtin3lY9LYzW4= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.130.0/go.mod h1:6tHMqcSuI/L8WuTmSN87n7O5ESAkOfRamXFnOHjWFo8= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.148.0/go.mod h1:P8hZEDIQk4REgUWyLhSVRHwTxK6KkifKfg36BmmQ/DI= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor v0.148.0/go.mod h1:ZK7wvaefla9lB3bAW0rNKt7IzRPcTRQoOFqr4sZy/XM= +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= +github.com/prometheus/exporter-toolkit v0.15.1/go.mod h1:P/NR9qFRGbCFgpklyhix9F6v6fFr/VQB/CVsrMDGKo4= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/puzpuzpuz/xsync/v4 v4.4.0/go.mod h1:VJDmTCJMBt8igNxnkQd86r+8KUeN1quSfNKu5bLYFQo= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= +github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= +github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= +github.com/vburenin/ifacemaker v1.3.1-0.20260417025851-7bffe3f42628/go.mod h1:VATsDjLUQfeo2Thkn/OuAuQX5xpGz//yhj7BwF1jAJ0= +github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= +github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/collector/component v1.54.0/go.mod h1:yUMBYsySY/sDcXm8kOzEoZxt+JLdala6hxzSW0npOxY= +go.opentelemetry.io/collector/confmap v1.54.0/go.mod h1:mQxG8bk0IWIt9gbWMvzE+cRkOuCuzbzkNGBq2YJ4wNM= +go.opentelemetry.io/collector/confmap/xconfmap v0.148.0/go.mod h1:4qTMr3V0uSXXac9wVs/UD5fIqRKw5yIl58+Vjsc6RHM= +go.opentelemetry.io/collector/consumer v1.54.0/go.mod h1:1PC6XINTL9DdT1bwvfMdHE72EB4RWU/WcPemUrhqKN8= +go.opentelemetry.io/collector/featuregate v1.54.0/go.mod h1:PS7zY/zaCb28EqciePVwRHVhc3oKortTFXsi3I6ee4g= +go.opentelemetry.io/collector/internal/componentalias v0.148.0/go.mod h1:uwKzfehzwRgHxdHgFXYSBHNBeWSSqsqQYGWr5fk08G0= +go.opentelemetry.io/collector/pdata v1.36.0/go.mod h1:pttpb089864qG1k0DMeXLgwwTFLk+o3fAW9I6MF9tzw= +go.opentelemetry.io/collector/pdata v1.54.0/go.mod h1:+MqC3VVOv/EX9YVFUo+mI4F0YmwJ+fXBYwjmu+mRiZ8= +go.opentelemetry.io/collector/pipeline v1.54.0/go.mod h1:RD90NG3Jbk965Xaqym3JyHkuol4uZJjQVUkD9ddXJIs= +go.opentelemetry.io/collector/processor v1.54.0/go.mod h1:L0lA6DZ0VbrtQBg44cmYfSpRlgm4zxW1I6QfBnRizPw= +go.opentelemetry.io/collector/semconv v0.128.0/go.mod h1:OPXer4l43X23cnjLXIZnRj/qQOjSuq4TgBLI76P9hns= +go.opentelemetry.io/contrib/detectors/gcp v1.36.0/go.mod h1:IbBN8uAIIx734PTonTPxAxnjc2pQTxWNkwfstZ+6H2k= +go.opentelemetry.io/contrib/detectors/gcp v1.38.0/go.mod h1:SU+iU7nu5ud4oCb3LQOhIZ3nRLj6FNVrKgtflbaf2ts= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0/go.mod h1:C2NGBr+kAB4bk3xtMXfZ94gqFDtg/GkI7e9zqGh5Beg= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= +go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= +go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= +go.opentelemetry.io/otel v1.42.0/go.mod h1:lJNsdRMxCUIWuMlVJWzecSMuNjE7dOYyWlqOXWkdqCc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.42.0/go.mod h1:J2pvYM5NGHofZ2/Ru6zw/TNWnEQp5crgyDeSrYpXkAw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.42.0/go.mod h1:2qXPNBX1OVRC0IwOnfo1ljoid+RD0QK3443EaqVlsOU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.42.0/go.mod h1:v0Tj04armyT59mnURNUJf7RCKcKzq+lgJs6QSjHjaTc= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0/go.mod h1:ra3Pa40+oKjvYh+ZD3EdxFZZB0xdMfuileHAm4nNN7w= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= +go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= +go.opentelemetry.io/otel/metric v1.42.0/go.mod h1:RlUN/7vTU7Ao/diDkEpQpnz3/92J9ko05BIwxYa2SSI= +go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= +go.opentelemetry.io/otel/sdk v1.42.0/go.mod h1:rGHCAxd9DAph0joO4W6OPwxjNTYWghRWmkHuGbayMts= +go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= +go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= +go.opentelemetry.io/otel/trace v1.42.0/go.mod h1:f3K9S+IFqnumBkKhRJMeaZeNk9epyhnCmQh/EysQCdc= +go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= +golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U= +golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= +golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8= +golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0= +golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa/go.mod h1:K79w1Vqn7PoiZn+TkNpx3BUWUQksGO3JcVX6qIjytmA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= +golang.org/x/mod v0.31.0/go.mod h1:43JraMp9cGx1Rx3AqioxrbrhNsLl2l/iNAvuBkrezpg= +golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= +golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= +golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= +golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= +golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= +golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= +golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM= +golang.org/x/net v0.51.0/go.mod h1:aamm+2QF5ogm02fjy5Bb7CQ0WMt1/WVM7FtyaTLlA9Y= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= +golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/oauth2 v0.33.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= +golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= +golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= +golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= +golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= +golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= +golang.org/x/time v0.13.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools v0.40.0/go.mod h1:Ik/tzLRlbscWpqqMRjyWYDisX8bG13FrdXp3o4Sr9lc= +golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= +golang.org/x/tools v0.43.0/go.mod h1:uHkMso649BX2cZK6+RpuIPXS3ho2hZo4FVwfoy1vIk0= +golang.org/x/tools/go/expect v0.1.0-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= +google.golang.org/api v0.247.0/go.mod h1:r1qZOPmxXffXg6xS5uhx16Fa/UFY8QU/K4bfKrnvovM= +google.golang.org/api v0.249.0/go.mod h1:dGk9qyI0UYPwO/cjt2q06LG/EhUpwZGdAbYF14wHHrQ= +google.golang.org/api v0.256.0/go.mod h1:KIgPhksXADEKJlnEoRa9qAII4rXcy40vfI8HRqcU964= +google.golang.org/api v0.259.0/go.mod h1:LC2ISWGWbRoyQVpxGntWwLWN/vLNxxKBK9KuJRI8Te4= +google.golang.org/api v0.272.0/go.mod h1:wKjowi5LNJc5qarNvDCvNQBn3rVK8nSy6jg2SwRwzIA= +google.golang.org/api v0.273.1/go.mod h1:JbAt7mF+XVmWu6xNP8/+CTiGH30ofmCmk9nM8d8fHew= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20250603155806-513f23925822/go.mod h1:HubltRL7rMh0LfnQPkMH4NPDFEWp0jw3vixw7jEM53s= +google.golang.org/genproto v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:yJ2HH4EHEDTd3JiLmhds6NkJ17ITVYOdV3m3VKOnws0= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= +google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c/go.mod h1:ea2MjsO70ssTfCjiwHgI0ZFqcw45Ksuk2ckf9G468GA= +google.golang.org/genproto/googleapis/api v0.0.0-20250922171735-9219d122eba9/go.mod h1:LmwNphe5Afor5V3R5BppOULHOnt2mCIf+NxMd4XiygE= +google.golang.org/genproto/googleapis/api v0.0.0-20251029180050-ab9386a59fda/go.mod h1:fDMmzKV90WSg1NbozdqrE64fkuTv6mlq2zxo9ad+3yo= +google.golang.org/genproto/googleapis/api v0.0.0-20251111163417-95abcf5c77ba/go.mod h1:G5IanEx8/PgI9w6CFcYQf7jMtHQhZruvfM1i3qOqk5U= +google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto= +google.golang.org/genproto/googleapis/api v0.0.0-20251222181119-0a764e51fe1b/go.mod h1:Xa7le7qx2vmqB/SzWUBa7KdMjpdpAHlh5QCSnjessQk= +google.golang.org/genproto/googleapis/api v0.0.0-20260120221211-b8f7ae30c516/go.mod h1:p3MLuOwURrGBRoEyFHBT3GjUwaCQVKeNqqWxlcISGdw= +google.golang.org/genproto/googleapis/api v0.0.0-20260316172706-e463d84ca32d/go.mod h1:X2gu9Qwng7Nn009s/r3RUxqkzQNqOrAy79bluY7ojIg= +google.golang.org/genproto/googleapis/api v0.0.0-20260319201613-d00831a3d3e7/go.mod h1:EIQZ5bFCfRQDV4MhRle7+OgjNtZ6P1PiZBgAKuxXu/Y= +google.golang.org/genproto/googleapis/api v0.0.0-20260401001100-f93e5f3e9f0f/go.mod h1:EIQZ5bFCfRQDV4MhRle7+OgjNtZ6P1PiZBgAKuxXu/Y= +google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9/go.mod h1:7QBABkRtR8z+TEnmXTqIqwJLlzrZKVfAUm7tY3yGv0M= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20260319201613-d00831a3d3e7/go.mod h1:6TABGosqSqU2l1+fJ3jdvOYPPVryeKybxYF0cCZkTBE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c/go.mod h1:gw1tLEfykwDz2ET4a12jcXt4couGAm7IwsVaTy0Sflo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250922171735-9219d122eba9/go.mod h1:HSkG/KdJWusxU1F6CNrwNDjBMgisKxGnc5dAZfT0mjQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251111163417-95abcf5c77ba/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260209200024-4cfbd4190f57/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260311181403-84a4fc48630c/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260319201613-d00831a3d3e7/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260401001100-f93e5f3e9f0f/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= +google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= +google.golang.org/grpc v1.75.1/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= +google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/grpc v1.79.2/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= +google.golang.org/grpc/examples v0.0.0-20250407062114-b368379ef8f6/go.mod h1:6ytKWczdvnpnO+m+JiG9NjEDzR1FJfsnmJdG7B8QVZ8= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= +google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= +google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +k8s.io/api v0.35.3/go.mod h1:9Y9tkBcFwKNq2sxwZTQh1Njh9qHl81D0As56tu42GA4= +k8s.io/apimachinery v0.35.3/go.mod h1:jQCgFZFR1F4Ik7hvr2g84RTJSZegBc8yHgFWKn//hns= +k8s.io/client-go v0.35.3/go.mod h1:RzoXkc0mzpWIDvBrRnD+VlfXP+lRzqQjCmKtiwZ8Q9c= +k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/structured-merge-diff/v6 v6.2.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/internal/components/go.mod b/internal/components/go.mod new file mode 100644 index 0000000000..b5d6b07b72 --- /dev/null +++ b/internal/components/go.mod @@ -0,0 +1,13 @@ +module github.com/GoogleCloudPlatform/opentelemetry-operations-collector + +go 1.25.0 + +require ( + github.com/google/go-cmp v0.7.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.130.0 + github.com/spf13/pflag v1.0.6 + github.com/stretchr/testify v1.11.1 + go.opentelemetry.io/collector/pdata v1.36.0 + gopkg.in/yaml.v3 v3.0.1 + gotest.tools/v3 v3.5.2 +) diff --git a/internal/components/internal/ottlfuncs/func_extract_patterns_ruby_regex.go b/internal/components/internal/ottlfuncs/func_extract_patterns_ruby_regex.go new file mode 100644 index 0000000000..6f2026ee87 --- /dev/null +++ b/internal/components/internal/ottlfuncs/func_extract_patterns_ruby_regex.go @@ -0,0 +1,93 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package ottlfuncs + +import ( + "context" + "fmt" + + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" + + rubex "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/third_party/go-oniguruma" +) + +type ExtractPatternsRubyRegexArguments[K any] struct { + Target ottl.StringGetter[K] + Pattern string + OmitEmptyValues ottl.Optional[bool] +} + +func NewExtractPatternsRubyRegexFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("ExtractPatternsRubyRegex", &ExtractPatternsRubyRegexArguments[K]{}, createExtractPatternsRubyRegexFunction[K]) +} + +func createExtractPatternsRubyRegexFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*ExtractPatternsRubyRegexArguments[K]) + + if !ok { + return nil, fmt.Errorf("ExtractPatternsRubyRegexFactory args must be of type *ExtractPatternsRubyRegexArguments[K]") + } + + omitEmptyValues := false + if !args.OmitEmptyValues.IsEmpty() { + omitEmptyValues = args.OmitEmptyValues.Get() + } + + return extractPatternsRubyRegex(args.Target, args.Pattern, omitEmptyValues) +} + +func extractPatternsRubyRegex[K any](target ottl.StringGetter[K], pattern string, omitEmtpyValues bool) (ottl.ExprFunc[K], error) { + r, err := rubex.NewRegexp(pattern, rubex.ONIG_OPTION_DEFAULT) + if err != nil { + return nil, fmt.Errorf("the pattern supplied to ExtractPatternsRubyRegex is not a valid pattern: %w", err) + } + + namedCaptureGroups := 0 + subExpNames := r.SubexpNames() + for _, groupName := range subExpNames { + if groupName != "" { + namedCaptureGroups++ + } + } + + if namedCaptureGroups == 0 { + return nil, fmt.Errorf("at least 1 named capture group must be supplied in the given regex") + } + + return func(ctx context.Context, tCtx K) (any, error) { + val, err := target.Get(ctx, tCtx) + if err != nil { + return nil, err + } + + matches := r.FindStringSubmatch(val) + if matches == nil { + return pcommon.NewMap(), nil + } + + result := pcommon.NewMap() + for i, subexp := range r.SubexpNames() { + if subexp != "" { + if omitEmtpyValues && matches[i+1] == "" { + continue + } + result.PutStr(subexp, matches[i+1]) + } + } + return result, err + }, nil +} diff --git a/internal/components/internal/ottlfuncs/func_extract_patterns_ruby_regex_test.go b/internal/components/internal/ottlfuncs/func_extract_patterns_ruby_regex_test.go new file mode 100644 index 0000000000..41ae5f6d81 --- /dev/null +++ b/internal/components/internal/ottlfuncs/func_extract_patterns_ruby_regex_test.go @@ -0,0 +1,213 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package ottlfuncs + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +func Test_extractPatternsRubyRegex(t *testing.T) { + tests := []struct { + name string + target ottl.StringGetter[any] + pattern string + omitEmptyValues bool + want func(pcommon.Map) + }{ + { + name: "extract patterns", + target: &ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `a=b c=d`, nil + }, + }, + pattern: `^a=(?\w+)\s+c=(?\w+)$`, + want: func(expectedMap pcommon.Map) { + expectedMap.PutStr("a", "b") + expectedMap.PutStr("c", "d") + }, + }, + { + name: "no pattern found", + target: &ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `a=b c=d`, nil + }, + }, + pattern: `^a=(?\w+)$`, + want: func(_ pcommon.Map) {}, + }, + { + name: "complex pattern", + target: &ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return `<13>1 2006-01-02T15:04:05+0700 vm_name_1 my_app_id n n n qqqqrrrr`, nil + }, + }, + pattern: `^\<(?[0-9]{1,5})\>1 (?

)*|){0}/ + .match("((())())") +2004/03/02: [impl] (thanks Kazuo Saito) + add :nodoc: to onig_stat_print() for RDoc. +2004/03/02: [impl] don't use ONIG_SOURCE_IS_WRAPPED. + +2004/02/27: Version 2.2.2 + +2004/02/27: [impl] fix the position of onig_stat_print(). +2004/02/27: [impl] define ONIG_RUBY_DEFINE_GLOBAL_FUNCTION() in regint.h + for ignored by RDoc. + +2004/02/26: Version 2.2.1 + +2004/02/26: [bug] [bugs.php.net:#26677] (thanks behrens) + invalid definition at onig_error_code_to_str() + in the case of NOT HAVE_STDARG_PROTOTYPES. + +2004/02/25: Version 2.2.0 + +2004/02/25: [test] success in ruby 1.8.0 (2003-08-08) [i386-mswin32]. +2004/02/24: [test] success in ruby 1.9.0 (2004-02-24) [i686-linux]. +2004/02/24: [bug] undefined IS_BLANK() and IS_GRAPH() was used in + onigenc_is_code_ctype() in the case of Ruby M17N. +2004/02/24: [new] support ISO-8859-16. (ONIG_ENCODING_ISO_8859_16) +2004/02/24: [bug] should not fold match for 0xdf in iso8859_6.c. +2004/02/24: [new] support ISO-8859-14. (ONIG_ENCODING_ISO_8859_14) +2004/02/23: [new] support ISO-8859-13. (ONIG_ENCODING_ISO_8859_13) +2004/02/23: [new] support ISO-8859-10. (ONIG_ENCODING_ISO_8859_10) +2004/02/20: [bug] fix iso_8859_4_mbc_is_case_ambig(). +2004/02/20: [new] support ISO-8859-9. (ONIG_ENCODING_ISO_8859_9) +2004/02/19: [bug] correct ctype tables for ISO-8859-3, ISO-8859-4, + ISO-8859-6, ISO-8859-7, ISO-8859-8, KOI8_R. +2004/02/18: [bug] wrong replaced name OnigSyntaxGnuOnigex. +2004/02/17: [spec] check capture status for empty infinite loop. + [ruby-dev:20224] etc... + ex. /(?:\1a|())*/.match("a"), + /(?:()|()|()|(x)|()|())*\2b\5/.match("b") + add USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK. + add OP_NULL_CHECK_END_MEMST, OP_NULL_CHECK_END_MEMST_PUSH. + add stack type STK_NULL_CHECK_END. +2004/02/13: [impl] add OnigEncodingEUC_CN to enc/euc_kr.c. +2004/02/13: [bug] (thanks Simon Strandgaard) + parsing of nested repeat was invalid. + ex. /ab{2,3}*/ was /(?:a(?:b{2,3}))*/, + should be /a(?:b{2,3}*)/ +2004/02/12: [bug] (thanks Simon Strandgaard) + OP_REPEAT_INC_NG process in match_at() is wrong. + ex. bad match /a.{0,2}?a/ =~ "0aXXXa0" +2004/02/12: [bug] (thanks Simon Strandgaard) + wrong fetch after (?x) option. ex. "(?x)\ta .\n+b" +2004/02/12: [bug] (thanks Simon Strandgaard) + [\^] is not a empty char class. +2004/02/09: [new] add onig_set_syntax_op(), onig_set_syntax_op2(), + onig_set_syntax_behavior(), onig_set_syntax_options(). +2004/02/06: [dist] add a new target 'site' to Makefile.in. +2004/02/06: [dist] add index.html. +2004/02/03: [bug] oniggnu.h was not installed by 'make install'. + +2004/02/02: Version 2.1.0 + +2004/02/02: [test] success in ruby 1.9.0 (2004-02-02) [i686-linux]. +2004/02/02: [test] success in ruby 1.8.0 (2003-08-08) [i386-cygwin]. +2004/02/02: [test] success in ruby 1.8.0 (2003-08-08) [i386-mswin32]. +2004/02/02: [new] support ISO-8859-11. (ONIG_ENCODING_ISO_8859_11) +2004/02/02: [new] support ISO-8859-5. (ONIG_ENCODING_ISO_8859_5) +2004/02/02: [impl] should check single byte encoding or not in and_cclass() + and or_cclass(). +2004/01/30: [dist] add oniggnu.h. +2004/01/30: [bug] ISO-8859-7 0xb7 (middle dot) is Punct type. +2004/01/30: [new] support ISO-8859-8. (ONIG_ENCODING_ISO_8859_8) +2004/01/29: [new] support ISO-8859-7. (ONIG_ENCODING_ISO_8859_7) +2004/01/29: [new] support ISO-8859-6. (ONIG_ENCODING_ISO_8859_6) +2004/01/28: [new] support KOI8-R. (ONIG_ENCODING_KOI8_R) +2004/01/28: [new] support KOI8. (ONIG_ENCODING_KOI8) +2004/01/27: [dist] rename enc/isotable.c to enc/mktable.c. +2004/01/27: [new] support ISO-8859-4. (ONIG_ENCODING_ISO_8859_4) +2004/01/26: [new] support ISO-8859-3. (ONIG_ENCODING_ISO_8859_3) +2004/01/26: [bug] EncISO_8859_{1,15}_CtypeTable[256] was wrong. + (0x80 - 0xff is not ASCII) +2004/01/23: [new] support ISO-8859-2. (ONIG_ENCODING_ISO_8859_2) +2004/01/23: [dist] add enc/isotable.c. +2004/01/22: [new] support EUC-TW. (ONIG_ENCODING_EUC_TW) +2004/01/22: [bug] definition of GET_ALIGNMENT_PAD_SIZE() and + ALIGNMENT_RIGHT() was wrong. + type casting should be unsigned int, not int. +2004/01/22: [impl] add defined(__x86_64) || defined(__x86_64__) + to unaligned word access condition. (AMD64 ?) +2004/01/21: [dist] rename enc/eucjp.c to enc/euc_jp.c. +2004/01/21: [new] support EUC-KR. (ONIG_ENCODING_EUC_KR) +2004/01/20: [test] success in ruby 1.8.0 (2003-08-08) [i386-cygwin]. +2004/01/20: [dist] change Makefile.in. +2004/01/20: [spec] add \p{...}, \P{...} in char class. +2004/01/20: [new] character property operators \p{...}, \P{...}. + supported in ONIG_SYNTAX_JAVA and ONIG_SYNTAX_PERL. +2004/01/19: [spec] allow /a{,n}/ as /a{0,n}/. (but don't allow /a{,}/) +2004/01/19: [dist] rename onigcomp200.h to onigcmpt200.h. +2004/01/19: [dist] update re.c.168.patch. svn add re.c.181.patch. +2004/01/16: [dist] update sample/*.c for new API. +2004/01/16: [dist] add onigcomp200.h. (for old API compatibility) +2004/01/16: [dist] update documents API, RE and RE.ja. +2004/01/16: [spec] change prefix REG_ -> ONIG_, regex_ onig_, + ENC_ -> ONIGENC, enc_ -> onigenc_. +2004/01/15: [impl] rename ENC_IS_MBC_E_WORD() to ENC_IS_MBC_WORD(). + rename ENC_CTYPE_SUPPORT_LEVEL_SB_ONLY to + ENC_CTYPE_SUPPORT_LEVEL_SB. +2004/01/14: [impl] rename UNALIGNED_WORD_ACCESS to + PLATFORM_UNALIGNED_WORD_ACCESS. +2004/01/14: [impl] change MATCH_STACK_LIMIT_SIZE value from 200000 to 500000. +2004/01/13: [impl] remove ENC_CODE_TO_MBC_FIRST(enc,code) in regenc.h. + remove code_to_mbc_first member in RegCharEncodingType. +2004/01/13: [impl] remove head byte bitset information in cclass->mbuf. +2003/12/26: [impl] change macro name ismb_xxxx() in enc/*.c for + escape conflict. + +2003/12/24: Version 2.0.0 + +2003/12/24: [spec] ignore case option is effective to numbered char. + ex. /\x61/i =~ "A" +2003/12/24: [test] success in ruby 1.8.1 (2003-12-24) [i686-linux]. +2003/12/24: [test] success in ruby 1.8.0 (2003-08-08) [i386-cygwin]. +2003/12/24: [test] success in ruby 1.8.0 (2003-08-08) [i386-mswin32]. +2003/12/24: [test] success in regex.c compile test on ruby-m17n. + (but can't make miniruby because re.c patch fail.) +2003/12/24: [bug] (thanks H.Miyamoto) /[\W]/ was wrong in 1.9.5. +2003/12/22: [spec] implement fold match on UTF-8 encoding. +2003/12/19: [impl] add ctype_support_level and ctype_add_codes() member to + RegCharEncoding type. +2003/12/19: [impl] add add_ctype_to_cc() in regparse.c. +2003/12/19: [impl] add enc_is_code_ctype() in REG_RUBY_M17N case. +2003/12/19: [impl] change ENC_CODE_TO_MBC() interface. +2003/12/18: [new] implement fold match. (variable number of char + match in ignore case mode.) + ex. German alphabet ess-tsett(U+00DF) match "SS" and "ss". +2003/12/17: [impl] refactoring of encoding system. +2003/12/17: [impl] add enc_init() in regenc.c. +2003/12/17: [new] support Big5. (REG_ENCODING_BIG5) +2003/12/16: [impl] change CodePoint from unsigned int to unsigned long. +2003/12/16: [new] support ISO 8859-15. (REG_ENCODING_ISO_8859_15) +2003/12/16: [impl] change P_() macro definition condition for Win32. +2003/12/16: [dist] add sample/encode.c +2003/12/16: [new] support ISO 8859-1. (REG_ENCODING_ISO_8859_1) +2003/12/15: [impl] rename IS_ENC_XXXX to ENC_IS_XXXX. +2003/12/15: [impl] rename RegDefaultCharEncoding to EncDefaultCharEncoding. +2003/12/15: [impl] divide encoding files. (enc/ascii.c, enc/utf8.c etc...) +2003/12/15: [bug] unexpected infinite loop in regex_snprintf_with_pattern(). + change local var. type char* to UChar*. +2003/12/15: [impl] remove REG_MBLEN_TABLE[]. +2003/12/15: [spec] rename function prefix regex_get_prev_char_head(), + regex_get_left_adjust_char_head() and + regex_get_right_adjust_char_head() to enc_xxxxxx(). +2003/12/15: [impl] rename function prefixes in regenc.h from regex_ to enc_. +2003/12/12: [impl] remove USE_SBMB_CLASS. +2003/12/12: [impl] rename mb -> mbc, mblen() to enc_len(). +2003/12/12: [impl] rename WCINT to CodePoint. +2003/12/11: [impl] delete IS_XXXX() ctype macros from regint.h. +2003/12/11: [impl] add enc->wc_is_ctype() and RegAsciiCtypeTable[256]. +2003/12/11: [impl] remove RegAsciiCaseAmbigTable. +2003/12/10: [impl] use ENC_TO_LOWER() for ignore case comparison. +2003/12/08: [impl] *** re-defined RegCharEncoding in oniguruma.h. *** +2003/12/08: [impl] add USE_POSIX_REGION_OPTION to regint.h. +2003/12/08: [impl] add IS_ENC_WORD() to regenc.h. +2003/12/05: [impl] rename IS_CODE_XXXX() to IS_ENC_XXXX(). +2003/12/05: [impl] delete IS_CODE_WORD() from regenc.h. +2003/12/04: [spec] rename REG_SYN_OP_BACK_REF to REG_SYN_OP_DECIMAL_BACKREF. +2003/12/04: [spec] add (REG_SYN_OP_ESC_W_WORD | REG_SYN_OP_ESC_B_WORD_BOUND | + REG_SYN_OP_ESC_LTGT_WORD_BEGIN_END | REG_SYN_OP_BACK_REF) + to RegSyntaxGrep. +2003/12/04: [spec] remove REG_ENCODING_DEFAULT and REGCODE_DEFAULT. +2003/12/04: [spec] move declarations of regex_get_default_encoding() and + regex_set_default_encoding() from oniguruma.h to regenc.h. +2003/12/03: [new] add regex_get_default_encoding() and + regex_set_default_encoding(). +2003/12/03: [spec] REG_ENCODING_DEFAULT meaning is changed. + (current default value, not initial default value.) +2003/12/03: [spec] REGCODE_XXX is obsoleted. use REG_ENCODING_XXX. +2003/12/02: [memo] alias svnst='svn status | grep -v "^\?"' +2003/12/02: [spec] move regex_set_default_trans_table() declaration + from oniguruma.h to regenc.h. (obsoleted API) +2003/12/02: [impl] move variables RegDefaultCharEncoding, DefaultTransTable and + AmbiguityTable to regenc.c. +2003/12/01: [impl] add regex_continuous_sbmb() to regenc.c. +2003/12/01: [dist] add regenc.h and regenc.c. +2003/11/18: [dist] change testconv.rb. +2003/11/18: [bug] (thanks Masaru Tsuda) + memory leak in parse_subexp(). +2003/11/18: [bug] (thanks Masaru Tsuda) + memory leak in names_clear() and parse_char_class(). +2003/11/17: [bug] memory leak in parse_char_class(). +2003/11/17: [bug] (thanks Masaru Tsuda) + OptExactInfo length should not over OPT_EXACT_MAXLEN. + (concat_opt_exact_info_str()) + +2003/11/12: Version 1.9.5 + +2003/11/12: [test] success in ruby 1.8.0 (2003-08-08) [i386-cygwin]. +2003/11/12: [test] success in ruby 1.8.1 (2003-11-11) [i686-linux]. +2003/11/12: [spec] add definition of REG_INEFFECTIVE_META_CHAR. +2003/11/11: [dist] add a sample program sample/sql.c. +2003/11/11: [new] add variable meta character. + regex_set_meta_char() +2003/11/11: [spec] add syntax op. REG_SYN_OP_VARIABLE_META_CHARS. +2003/11/11: [spec] rename REG_SYN_OP_ESC_CAPITAL_Q_QUOTE to + REG_SYN_OP2_ESC_CAPITAL_Q_QUOTE, + REG_SYN_OP_QMARK_GROUP_EFFECT to + REG_SYN_OP2_QMARK_GROUP_EFFECT. +2003/11/06: [impl] define THREAD_PASS as rb_thread_schedule() in Ruby mode. +2003/11/05: [spec] add syntax behavior REG_SYN_WARN_REDUNDANT_NESTED_REPEAT. +2003/11/05: [spec] rename REG_SYN_WARN_FOR_CC_OP_NOT_ESCAPED to + REG_SYN_WARN_CC_OP_NOT_ESCAPED. +2003/11/04: [new] add regex_set_warn_func() and regex_set_verb_warn_func(). +2003/10/30: [new] add regex_name_to_backref_number(). + (for multiplex definition name, see sample/names.c) +2003/10/30: [spec] add name_end and reg argument to callback function of + regex_foreach_name(). (see sample/names.c) +2003/10/29: [spec] add syntax behavior REG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME. + add error code REGERR_MULTIPLEX_DEFINED_NAME. +2003/10/14: [dist] modify sample/simple.c. +2003/10/03: [bug] (thanks nobu) [ruby-dev:21472] + sub-anchor of optimization map info was wrong + in concat_left_node_opt_info(). + ex. /^(x?y)/ = "xy" fail. + +2003/09/17: Version 1.9.4 + +2003/09/17: [spec] change specification of char-class range in ignore case mode + follows with Ruby 1.8(2003-09-17). + ex. /[H-c]/i ==> (H-Z, 0x5b-0x60, a-c)/i + ==> H-Z, h-z, 0x5b-0x60, a-c, A-C +2003/09/16: [bug] (thanks Guy Decoux) + remove env->option == option check in parse_effect(). + change env->option for dynamic option in parse_exp(). + (ex. bad match /(?i)(?-i)a/ =~ "A") +2003/09/12: [spec] rename REG_SYN_ALLOW_RANGE_OP_IN_CC to + REG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC, + REG_SYN_ESCAPE_IN_CC to REG_SYN_BACKSLASH_ESCAPE_IN_CC. +2003/09/11: [bug] change to IS_SYNTAX_OP2 at REG_SYN_OP2_ESC_GNU_BUF_ANCHOR. +2003/09/09: [spec] rename REG_SYN_OP2_ESC_M_BAR_META to + REG_SYN_OP2_ESC_CAPITAL_M_BAR_META, + REG_SYN_OP_ESC_Q_QUOTE to REG_SYN_OP_ESC_CAPITAL_Q_QUOTE, + REG_SYN_OP_ESC_SUBEXP to REG_SYN_OP_ESC_LPAREN_SUBEXP, + REG_SYN_OP_ESC_BUF_ANCHOR to REG_SYN_OP_ESC_AZ_BUF_ANCHOR, + REG_SYN_OP_ESC_GNU_BUF_ANCHOR to + REG_SYN_OP2_ESC_GNU_BUF_ANCHOR, + REG_SYN_OP_ESC_CONTROL_CHAR to REG_SYN_OP_ESC_CONTROL_CHARS, + REG_SYN_OP_ESC_WORD to REG_SYN_OP_ESC_W_WORD, + REG_SYN_OP_ESC_WORD_BEGIN_END to + REG_SYN_OP_ESC_LTGT_WORD_BEGIN_END, + REG_SYN_OP_ESC_WORD_BOUND to REG_SYN_OP_ESC_B_WORD_BOUND, + REG_SYN_OP_ESC_WHITE_SPACE to REG_SYN_OP_ESC_S_WHITE_SPACE, + REG_SYN_OP_ESC_DIGIT to REG_SYN_OP_ESC_D_DIGIT, + REG_SYN_OP_CC to REG_SYN_OP_BRACKET_CC, + REG_SYN_OP2_CCLASS_SET to REG_SYN_OP2_CCLASS_SET_OP, + REG_SYN_CONTEXT_INDEP_OPS to + REG_SYN_CONTEXT_INDEP_REPEAT_OPS, + REG_SYN_CONTEXT_INVALID_REPEAT_OPS to + REG_SYN_CONTEXT_INVALID_REPEAT_OPS. + add REG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR. +2003/09/08: [spec] rename REG_SYN_OP_ANYCHAR to REG_SYN_OP_DOT_ANYCHAR, + REG_SYN_OP_0INF to REG_SYN_OP_ASTERISK_ZERO_INF, + REG_SYN_OP_ESC_0INF to REG_SYN_OP_ESC_ASTERISK_ZERO_INF, + REG_SYN_OP_1INF to REG_SYN_OP_PLUS_ONE_INF, + REG_SYN_OP_ESC_1INF to REG_SYN_OP_ESC_PLUS_ONE_INF, + REG_SYN_OP_0INF to REG_SYN_OP_QMARK_ZERO_ONE, + REG_SYN_OP_ESC_0INF to REG_SYN_OP_ESC_QMARK_ZERO_ONE, + REG_SYN_OP_INTERVAL to REG_SYN_OP_BRACE_INTERVAL, + REG_SYN_OP_ESC_INTERVAL to REG_SYN_OP_ESC_BRACE_INTERVAL, + REG_SYN_OP_SUBEXP to REG_SYN_OP_LPAREN_SUBEXP, + REG_SYN_OP_ALT to REG_SYN_OP_VBAR_ALT, + REG_SYN_OP_ESC_ALT to REG_SYN_OP_ESC_VBAR_ALT, + REG_SYN_OP_NON_GREEDY to REG_SYN_OP_QMARK_NON_GREEDY, + REG_SYN_OP_SUBEXP_EFFECT to REG_SYN_OP_QMARK_GROUP_EFFECT, + REG_SYN_OP2_POSSESSIVE_{REPEAT,INTERVAL} to + REG_SYN_OP2_PLUS_POSSESSIVE_{REPEAT,INTERVAL}, + REG_SYN_OP2_SUBEXP_CALL to REG_SYN_OP2_ESC_G_SUBEXP_CALL, + REG_SYN_OP2_NAMED_GROUP to REG_SYN_OP2_QMARK_LT_NAMED_GROUP + and REG_SYN_OP2_ESC_K_NAMED_BACKREF. +2003/09/02: [tune] call reduce_nested_qualifier() after disabling capture for + no-name group in noname_disable_map(). + ex. /(a+)*(?...)/ +2003/09/02: [impl] include is forgotten to erase in regcomp.c. +2003/09/01: [dist] update doc/RE and doc/RE.ja. +2003/08/26: [bug] (thanks Guy Decoux) + should not double free node at the case TK_CC_CC_OPEN + in parse_char_class(). + +2003/08/19: Version 1.9.3 + +2003/08/19: [inst] change re.c.180.patch. +2003/08/19: [impl] rename 'list of captures' to 'capture history'. +2003/08/19: [dist] add doc/RE.ja. (Japanese) +2003/08/19: [new] add regex_copy_syntax(). +2003/08/19: [spec] rename REG_SYN_OP2_ATMARK_LIST_OF_CAPTURES to + REG_SYN_OP2_ATMARK_CAPTURE_HISTORY. +2003/08/18: [spec] (thanks nobu) + don't use IMPORT in oniguruma.h and onigposix.h. +2003/08/18: [impl] (thanks nobu) change error output to stdout in testconv.rb. +2003/08/18: [inst] (thanks nobu) lacked $(srcdir) in Makefile.in. +2003/08/18: [bug] REG_MBLEN_TABLE[SJIS][0xFD-0xFF] should be 1. +2003/08/18: [bug] (thanks nobu) mbctab_sjis[0x80] should be 0. +2003/08/18: [bug] (thanks nobu) + single/multi-byte decision was wrong in parse_char_class(). + add regex_wc2mblen(). + should not set fetched to 1 in TK_RAW_BYTE case. +2003/08/18: [bug] should update BitSet in the case inc_n >= 0 + in add_wc_range_to_buf(). +2003/08/13: [bug] change re.c.180.patch for fix rb_reg_to_s() in re.c. +2003/08/11: [bug] should clear region->list in regex_region_resize(). + +2003/08/08: Version 1.9.2 + +2003/08/08: [test] success in ruby 1.8.0 (2003-08-08) on Windows 2000 + VC++ 6.0 and Cygwin. +2003/08/08: [impl] don't define macro vsnprintf for WIN32 platform, + because definition is added in win32\win32.h. +2003/08/08: [test] success in ruby 1.8.0 and ruby 1.6.8(2003-08-03) on Linux. +2003/08/08: [dist] change re.c.180.patch and re.c.168.patch. +2003/08/08: [new] (thanks akr) + implemented list of captures. (?@...), (?@...) +2003/08/07: [dist] add sample/listcap.c. +2003/08/06: [bug] OP_MEMORY_END_PUSH_REC case in match_at(). + renewal of mem_start_stk[] should be after + STACK_PUSH_MEM_END() call. +2003/07/29: [new] add regex_get_encoding(), regex_get_options() and + regex_get_syntax(). +2003/07/25: [spec] (thanks akr) + change group(...) to shy-group(?:...) if named group is + used in the pattern. + add REG_SYN_CAPTURE_ONLY_NAMED_GROUP. +2003/07/24: [spec] rename REG_OPTION_CAPTURE_ONLY_NAMED_GROUP to + REG_OPTION_DONT_CAPTURE_GROUP. + add REG_OPTION_CAPTURE_GROUP. +2003/07/17: [spec] rename REG_SYN_OP2_NAMED_SUBEXP to REG_SYN_OP2_NAMED_GROUP. +2003/07/17: [spec] add REGERR_EMPTY_GROUP_NAME. +2003/07/17: [spec] rename REGERR_INVALID_SUBEXP_NAME + to REGERR_INVALID_CHAR_IN_GROUP_NAME. +2003/07/17: [spec] restrict usable chars of group name to alphabet, digit, + '_' or multibyte-char in fetch_name(). [ruby-dev:20706] +2003/07/16: [impl] minor change of sample/names.c. +2003/07/14: [impl] rename USE_NAMED_SUBEXP to USE_NAMED_GROUP. +2003/07/14: [bug] add fetch_name() for USE_NAMED_SUBEXP off case. +2003/07/14: [API] add regex_number_of_names(). +2003/07/08: [impl] change error message for undefined group number call. + 'undefined group reference: /(a)\g<2>/' + --> 'undefined group <2> reference: /(a)\g<2>/' +2003/07/08: [dist] modify doc/RE. +2003/07/07: [impl] OP_SET_OPTION is not needed in compiled code. + add IS_DYNAMIC_OPTION() to regint.h. +2003/07/07: [spec] called group should not ignore outside option (?i:...). + ex. /(?i:(?(a)\2)){0}\g/.match("aA") + add opcode OP_BACKREFN_IC and OP_BACKREF_MULTI_IC. + set option status to effect memory in optimize_node_left(). +2003/07/07: [impl] add opcode OP_ANYCHAR_ML, OP_ANYCHAR_ML_STAR and + OP_ANYCHAR_ML_START_PEEK_NEXT. +2003/07/07: [bug] (thanks nobu) REG_MBLEN_TABLE[SJIS][0x80] should be 1. +2003/07/07: [spec] rename REG_SYN_OP_QUOTE to REG_SYN_OP_ESC_Q_QUOTE. + +2003/07/04: Version 1.9.1 + +2003/07/04: [new] add REG_OPTION_CAPTURE_ONLY_NAMED_GROUP. (thanks .NET) +2003/07/04: [spec] check mbuf member in the case of + REG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC in parse_char_class(). +2003/07/04: [spec] typo REG_SYN_WARN_FOR_CC_OP_NOT_ESCAPEED. + should be REG_SYN_WARN_FOR_CC_OP_NOT_ESCAPED. +2003/07/04: [bug] conflict values on REG_SYN_WARN_FOR_CC_OP_NOT_ESCAPEED and + REG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC. (thanks nobu) +2003/07/03: [spec] add REG_SYN_OP_ESC_CONTROL_CHAR flag. +2003/07/03: [spec] remove REG_SYN_OP_ESC_OCTAL3 and REG_SYN_OP_ESC_X_HEX2 + flag from RegSyntaxGnuRegex. +2003/07/03: [spec] remove REG_SYN_OP_NON_GREEDY flag from RegSyntaxGnuRegex. +2003/07/02: [dist] fix doc/RE. +2003/07/01: [impl] add config flag USE_VARIABLE_SYNTAX. + (turn off variable syntax on Ruby) +2003/07/01: [spec] add syntax behavior REG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND. +2003/06/30: [spec] allow different length top-level alternatives + in look-behind. ex. (?<=abc|abcd), (? (?>a*)b + (thanks Jeffrey E. F. Friedl) +2003/06/02: [impl] remove multibyte-BitSet for OP_CCLASS_MB/OP_CCLASS_MB_NOT. +2003/05/30: [new] char class intersection operator &&[...] like Java(TM). + (thanks akr) +2003/05/30: [bug] should use bbuf_free() for CClassNode in regex_node_free(). +2003/05/29: [bug] wrong usage of syntax REG_SYN_ALLOW_EMPTY_RANGE_IN_CC. + /[d-a]/ should be error. +2003/05/28: [impl] optimize stop-backtrack compiled code. + (/(?>a*)/, /(?>\w+)/ etc...) + add OP_POP opcode. +2003/05/28: [new] possessive repeat operator. (?+, *+, ++, {n,m}+) +2003/05/27: [spec] '-' at beginning of char-class should be warn only if + it is start of range. (ex. /[--a]/) +2003/05/27: [spec] should not warn for right bracket at beginning of pattern. + ex. /]aaa/ +2003/05/27: [spec] change CCEND_ESC_WARN() from VERB_WARNING() to WARNING(). +2003/05/27: [spec] /[]aaa/ should be empty char-class error. + /[]aaa]/ should be warn for 'without backslash'. + (add char_exist_check() in regparse.c) +2003/05/26: [bug] OP_REPEAT in recursive subexp call. + ex. /(?(a|b\gc){3,5})/.match("baaaaca") => "baaaaca" + was wrong result. (should be "aaaa") +2003/05/26: [impl] add num_call member to regex_t. +2003/05/26: [impl] add repeat_range member to regex_t. + (for delete upper,lower members from StackType.u.repeat) +2003/05/26: [bug] change print_names() to external regex_print_names(). +2003/05/26: [tune] change OP_NULL_CHECK_END process in match_at(). +2003/05/26: [spec] change CCEND_ESC_WARN() from WARNING() to VERB_WARNING(). +2003/05/26: [spec] remove POSIXLINE option. (?p:...) + (be made the same as Ruby.) +2003/05/22: [spec] use OP_NULL_CHECK_XXX only if repeat is infinite. + prev. /(?:()|()){0,10}\1\2/ =~ "" ==> FAIL + now /(?:()|()){0,10}\1\2/ =~ "" ==> MATCH + +2003/05/22: [impl] change target_empty setting condition in setup_tree(). +2003/05/19: [impl] avoid zero length repeat optimization. (thanks matz) + /()*/ ==> /()?/, /()+/ ==> /()/ etc... +2003/05/19: [impl] minor changes for gcc -Wall. (-DREG_DEBUG_STATISTICS case) +2003/05/19: [spec] rename regex_foreach_names() to regex_foreach_name(). +2003/05/16: [new] add --with-statistics option to configure. +2003/05/16: [bug] move RegOpInfo[] definition to regint.h. +2003/05/16: [new] add regex_version(). + +2003/05/14: Version 1.8.6 + +2003/05/14: [bug] use _vsnprintf() on Win32. +2003/05/14: [spec] define USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE. + (/\n$/ =~ "\n", /\n\Z/ =~ "\n") [ruby-dev:20125] +2003/05/14: [impl] minor changes for gcc -Wall. +2003/05/14: [impl] add string.h check in AC_CHECK_HEADERS(). +2003/05/13: [impl] minor changes for gcc -Wall. +2003/05/13: [impl] add regex_snprintf_with_pattern(). +2003/05/13: [spec] add warning for char class meta character without escape + in Ruby mode ('[', '-', ']'). +2003/05/13: [impl] define WARNING() and VERB_WARNING() in regint.h. +2003/05/13: [bug] correct is_code_ascii() for /[[:ascii:]]/. +2003/05/12: [dist] add regular expression document (doc/RE). +2003/05/12: [spec] specification of $(END_LINE) was made the same as Ruby 1.8. + [ruby-dev:20130] (thanks matz) +2003/05/12: [memo] shifted to Subversion(version 0.21.0) from CVS. + +2003/03/19: Version 1.8.5 + +2003/03/19: [impl] change REG_EXTERN definition. (thanks nobu) +2003/03/19: [impl] abbreviation for long error_par in regex_error_code_to_str(). +2003/03/18: [dist] change re.c.XXX.patch for GNU regex API changes. +2003/03/18: [spec] change API regex_new(), regex_recompile() and + regex_error_code_to_str(). + change API re_compile_pattern() and re_recompile_pattern(). +2003/03/18: [spec] replace REGERR_END_PATTERN_AT_GROUP_{COMMENT|OPTION} to + REGERR_END_PATTERN_IN_GROUP. +2003/03/17: [impl] should free err_arg. +2003/03/17: [bug] mistake(high -> to) in add_wc_range_to_buf(). +2003/03/17: [spec] add err_arg argument to regex_new() and regex_recompile(). + for detail error message. (thanks akr) + +2003/03/12: Version 1.8.4 + +2003/03/12: [tune] use cached value of effect node in get_min_match_length(). +2003/03/12: [bug] escaped alphabet should be TK_RAW_BYTE + in fetch_token() and fetch_token_in_cc(). +2003/03/12: [spec] change named backref and subexp call format. + backref: \k, call: \g (thanks akr) +2003/03/11: [inst] add regparse.[ch] in win32/Makefile. +2003/03/11: [bug] if UNALIGNED_WORD_ACCESS isn't set, + then compile error in unset_addr_list_fix(). (thanks knu) +2003/03/10: [impl] divide regcomp.c to regcomp.c, regparse.c and regparse.h. +2003/03/10: [bug] should handle multi-byte code name in fetch_name(). +2003/03/10: [spec] remove REGERR_TABLE_FOR_IGNORE_CASE_IS_NOT_SETTED. +2003/03/10: [spec] support POSIX API option REG_NOSUB. + add comp_options member to POSIX API regex_t. + +2003/03/10: Version 1.8.3 + +2003/03/10: [bug] can not compile with Ruby 1.6.8. + (inconsistent st.h with 1.6 and 1.8) + use hash table on Ruby 1.8 only. +2003/03/10: [spec] forbid to use '\' in group name. +2003/03/08: [impl] remove check_backref_number(). +2003/03/08: [bug] called group in 0-repeat should not be eliminated from + compile code. ex. /(?*n)(?){0}/ (thanks akr) + add is_referred member to QualifierNode. +2003/03/07: [impl] use hash table(st.[ch]) for implementation of name table. + (enable on Ruby in default) +2003/03/07: [new] add regex_foreach_names(). +2003/03/06: [impl] add member reg->stack_pop_level. +2003/03/06: [impl] add operator OP_MEMORY_START and member reg->backtrack_mem. +2003/03/06: [bug] if REG_OPTION_FIND_LONGEST or REG_OPTION_NOT_EMPTY, + should handle backtrack of MEM_END. + add OP_MEMORY_END_PUSH and OP_MEMORY_END_PUSH_REC. +2003/03/06: [impl] rename OP_MEMORY_END_PUSH to OP_MEMORY_END_MARK. +2003/03/06: [spec] change error messages. +2003/03/06: [tune] add tiny_pop check in STACK_POP. + +2003/03/05: Version 1.8.2 + +2003/03/05: [impl] use cache info in EFFECT_MEMORY case + in optimize_node_info(). +2003/03/05: [impl] add EFFECT_MEMORY node reference count check + in optimize_node_left(). +2003/03/05: [impl] add min-len, max-len, char-len cache in EffectNode. +2003/03/05: [spec] allow to call in look behind. ex. /(?<=(?*a))/ +2003/03/05: [bug] forgotten N_ANCHOR case in check_backref_number(), + subexp_inf_recursive_check_trav() etc... +2003/03/05: [impl] rename USE_ONIGURUMA_EXTENSION to USE_SBMB_CLASS. +2003/03/04: [impl] add CALL-node info in optimize_node_left(). +2003/03/04: [spec] prohibit left recursion of subexp call. ex. (?|(?*n)a) + add subexp_inf_recursive_check_trav(). +2003/03/04: [spec] rename REG_SYN_STRICT_CHECK_BACKREF_NUMBER + to REG_SYN_STRICT_CHECK_BACKREF +2003/03/03: [bug] /(?a(?*n)|)/ isn't infinite recursion. + fix N_LIST case in subexp_recursive_check(). (thanks akr) +2003/03/03: [bug] /(?|(?*n))+/ segmentation fault. + should re-allocate in unset_addr_list_add(). (thanks akr) + +2003/03/01: Version 1.8.1 + +2003/03/01: [bug] change STACK_GET_MEM_START() and STACK_PUSH_MEM_END(). +2003/03/01: [new] add reg_name_to_group_numbers() to POSIX API. +2003/03/01: [impl] use OP_MEMORY_END_PUSH in callable subexp compiled code + only if subexp is recursive. +2003/03/01: [spec] rename regex_name_to_backrefs() to + regex_name_to_group_numbers(). +2003/02/28: [impl] use function stack_double() instead of macro. +2003/02/28: [new] subexp call. (?*name) (thanks akr) +2003/02/28: [spec] add match stack limit check. (MATCH_STACK_LIMIT_SIZE) +2003/02/28: [impl] check recursive subexp call. +2003/02/28: [impl] add opcode OP_MEMORY_END_PUSH for callable subexp. +2003/02/28: [impl] add opcode OP_CALL, OP_RETURN. + add stack type STK_CALL_FRAME, STK_RETURN, STK_MEM_END. +2003/02/26: [spec] add new syntax behavior REG_SYN_STRICT_CHECK_BACKREF_NUMBER. + if it is set, then error /(\1)/, /\1(..)/ etc... +2003/02/26: [spec] if backref number is greater than max group number, + then return compile error. (REGERR_INVALID_BACKREF_NUMBER) +2003/02/26: [tune] badly implemented N_ALT case in get_min_match_length(). +2003/02/26: [dist] auto update testc.c and win32/testc.c in dist target. +2003/02/26: [impl] add -win option to testconv.rb. +2003/02/25: [spec] allow to assign same name to different group. + add OP_BACKREF_MULTI. +2003/02/24: [impl] reduce redundant repeat of empty target. + ex. /()*/ ==> /()?/, /()+/ ==> /()/, /(?:)+/ ==> // +2003/02/24: [impl] change condition in regex_is_allow_reverse_match(). +2003/02/24: [impl] convert i(/../, ...) functions in testconv.rb. +2003/02/24: [impl] change name table struct. + +2003/02/22: Version 1.8.0 + +2003/02/22: [new] named subexp, named back reference. (thanks akr) + define: (?...), back-ref: \g +2003/02/22: [impl] use str_node_can_be_split(). +2003/02/21: [dist] add sample/posix.c +2003/02/21: [spec] rename some error code symbols. +2003/02/21: [spec] max number of multibyte ranges(255) is small. + 255 --> 1000. (thanks MoonWolf) +2003/02/20: [new] supported Basic Regular Expression(BRE) in POSIX API. + (REG_EXTENDED option: Extended RE) +2003/02/20: [new] variable syntax. + +2003/02/12: Version 1.7.2 + +2003/02/12: [bug] mismatch /\?a/i.match('?A'). + check raw value in scan_make_node() and scan_backslash(). + (thanks Nobu) +2003/02/12: [impl] rename 'max_mem' to 'num_mem' in regex_t. +2003/02/12: [impl] rename 'code' to 'enc' in regex_t. +2003/02/12: [spec] remove transtable argument in regex_new and regex_recompile. + remove transtable member in regex_t. +2003/02/10: [inst] change backup file suffix name from '.orig' to '.ruby_orig'. + (win32/Makefile) +2003/02/10: [spec] number check in scan_char_class() ignore-case mode. + ex. /[\x58-\x64]/i +2003/02/10: [impl] don't use OP_MEMORY_END_PUSH (and STK_MEM_END). +2003/02/10: [impl] lift up head_exact value from child qualifier node to parent. +2003/02/10: [tune] change stack type values. +2003/02/10: [dist] add HISTORY. +2003/02/08: [tune] change stack type values. +2003/02/08: [tune] add STACK_BASE_CHECK(). +2003/02/08: [tune] add STACK_PUSH_ENSURED(). +2003/02/08: [dist] change contents of doc/API. +2003/02/07: [inst] change backup file suffix name from '.orig' to '.ruby_orig'. +2003/02/07: [spec] range in char-class should be same spec. with Ruby + in ignore-case mode. (ex. /[A-c]/i == /[a-c]/i) + (thanks MoonWolf) +2003/02/07: [spec] [!--] should be allowed. (thanks MoonWolf) +2003/02/07: [dist] refresh re.c.180.patch for re.c (2003-02-06). + +2003/02/07: Version 1.7.1 + +2003/02/07: [impl] check first byte of string in ignore-case mode. + (get_head_exact_node()) +2003/02/07: [impl] remove redundant statements in setup_tree(). +2003/02/06: [new] create Win32 DLL. +2003/02/06: [impl] use P_() macro for function prototype. +2003/02/06: [impl] add HAVE_PROTOTYPE, HAVE_STDARG_PROTOTYPES in + configure.in and config.h.in. +2003/02/06: [spec] /[0-9-a]/ is allowed as usual char '-' and 'a' in Ruby. + add USE_BETTER_COMPATIBILITY_FOR_ORIGINAL_REGEX in + regint.h. (thanks MoonWolf) +2003/02/06: [spec] rename REG_MBCTYPE_XXXX to REG_ENCODING_XXXX in onigposix.h. +2003/02/05: [spec] rename MBCTYPE_XXXX to REG_MBCTYPE_XXXX in onigposix.h. +2003/02/05: [spec] add POSIX API error REG_EONIG_THREAD to onigposix.h. +2003/02/05: [dist] add .cvsignore file. + +2003/02/04: Version 1.7 + +2003/02/04: [bug] typo miss in regex_region_copy(). +2003/02/04: [impl] change THREAD_PASS macro. (regint.h) +2003/02/04: [dist] add API document file doc/API. +2003/02/04: [tune] if sub_anchor has ANCHOR_BEGIN_LINE then + set REG_OPTIMIZE_EXACT_BM in set_optimize_exact_info(). +2003/02/04: [spec] reimplement regex_clone() and it is obsoleted. +2003/02/04: [bug] add REGERR_OVER_THREAD_PASS_LIMIT_COUNT + to regerror.c regposix.c. +2003/02/03: [bug] Hankaku-Kana may be second byte in Shift_JIS + regex_is_allow_reverse_match(). +2003/02/03: [impl] add optimization type REG_OPTIMIZE_EXACT_BM_NOT_REV. + remove exact_allow_reverse_match member in regex_t. +2003/02/03: [impl] add exact_allow_reverse_match member in regex_t. +2003/02/03: [impl] compile-search conflict in regex_search() is handled. +2003/02/01: [tune] decrease regex_region_clear() calling from regex_search(). +2003/02/01: [tune] remove region argument from match_at(). +2003/01/31: [tune] don't use strlen() in regexec() and regcomp(). +2003/01/31: [tune] decrease regex_reduce_chain() calling in regex_search(). +2003/01/31: [bug] STRING_CMP() in regexec.c was wrong in ignore-case. +2003/01/31: [impl] convert to lower-case char at string compile time. + change SBTRANSCMP() in regexec.c. +2003/01/31: [impl] rename TTRANS() to TOLOWER(). +2003/01/30: [bug] .c.o --> .c.obj in win32\Makefile. +2003/01/30: [impl] add -DNOT_RUBY to Makefile.in. + NOT_RUBY is referred in regint.h for escape double + including config.h. +2003/01/30: [impl] when string hasn't case ambiguity, don't compile + to ignore case opcode. +2003/01/29: [impl] add SJIS, UTF-8 test_sb() test. +2003/01/29: [dist] add INSTALL-RUBY file. +2003/01/28: [test] success in Cygwin, Ruby 1.8.0 (2003-01-27). +2003/01/24: [inst] add rback target to Makefile.in. +2003/01/24: [impl] change SBCMP() -> IS_NEWLINE() in match_at(). +2003/01/23: [impl] add encoding arg to scan_xxxx_number(). +2003/01/23: [impl] rename WCInt to WCINT. +2003/01/22: [bug] POSIX API regexec() was not thread safe. + remove region member from POSIX regex_t. + [new] add search time option REG_OPTION_POSIX_REGION. + (region argument is treated as regmatch_t[] type) + speed up regexec(). +2003/01/22: [memo] start CVS entry in my box. + +2003/01/21: Version 1.6 + +2003/01/21: [test] Mac OS X 10.1, Ruby 1.8.0 (2003-01-20) +2003/01/20: [impl] add UTF-8 check to test.rb. (thanks UENO Katsuhiro) +2003/01/18: [impl] change REGION_NOTPOS to REG_REGION_NOTPOS in regex.h. +2003/01/17: [dist] add sample/simple.c. +2003/01/17: [inst] add configure option --with-rubydir. +2003/01/17: [bug] badly implemented POSIX API options. + default: /./ not match "\n", anchor not match "\n" + REG_NEWLINE: /./ not match "\n", anchor match "\n" +2003/01/16: [impl] rewrite POSIX API regexec() for speed up. +2003/01/16: [impl] add region member to POSIX regex_t struct. +2003/01/16: [inst] rename library file from 'libregex.a' to 'libonig.a'. +2003/01/15: [dist] add testc.c to distribution file. +2003/01/15: [test] success in 'make rtest/ctest/ptest' on Windows 2000. +2003/01/15: [bug] change '/' to \' in win32/Makefile. +2003/01/14: [test] success in Ruby make test on Windows 2000. + VC++6.0, Ruby 1.6.8 (2003-01-12) +2003/01/14: [inst] change Makefile.in and win32/Makefile. +2003/01/11: [inst] changes for Win32 platform. (regint.h, reggnu.c, regcomp.c) +2003/01/11: [dist] add win32 directory. (config.h, Makefile, testc.c) +2003/01/10: [inst] add onigposix.h to install target. (Makefile.in) +2003/01/10: [bug] lacked a comma in ESTRING[]. (regposerr.c) +2003/01/10: [bug] local variable name was wrong. buf -> tbuf (regerror()) +2003/01/10: [spec] remove REG_RUBY_M17N case from onigposix.h and regposix.c. + +2003/01/09: Version 1.5 + +2003/01/09: [inst] replace Ruby re.c.XXX.patch files. (166 -> 168, 172 -> 180) +2003/01/09: [new] implement POSIX API. (thanks knu) + (onigposix.h, regposix.c, regposerr.c) +2003/01/08: [spec] remove REGERR_END_PATTERN_AFTER_BACKSLASH in regex.h. +2003/01/08: [spec] region arg can be NULL in regex_search() and regex_match(). + +2003/01/08: Version 1.4 + +2003/01/08: [inst] add test program converter (test.rb -> testc.c). +2003/01/08: [bug] move GET_WCINT() from regcomp.c to regint.h. +2003/01/07: [inst] add new test script (test.rb). +2002/12/30: [bug] wrong merge in multibyte mode (alt_merge_opt_exact_info()). +2002/12/28: [inst] add rtest target to Makefile.in. +2002/12/28: [bug] /\xfe/.match("\xfe") mismatch in multibyte mode. + add "raw" flag arg to concat_opt_exact_info_str(). +2002/12/25: [bug] check condition was wrong in alt_merge_opt_map_info(). +2002/12/25: [impl] add threshold_len check in regex_search(). +2002/12/23: [bug] prec-read in alternative (/a|(?=z).f/.match("zf") => nil) +2002/12/23: [bug] \G in alternative (/a|\Gz/.match("bza") => "z"). + add start member in MatchArg. (regexec.c) +2002/12/21: [impl] **** rewrite all optimization process. **** +2002/12/16: [impl] remove node subtype EFFECT_EMPTY. +2002/12/12: [impl] reconstruct node types. (regcomp.c) +2002/12/11: [impl] add regerror.c +2002/12/10: [bug] [ruby-dev:19042] (thanks Nobu) + anchor(\G etc...) influenced outside of "|". (/a|\Gb/) +2002/11/30: [bug] [ruby-dev:18966] (thanks Nobu) + char-class(\S, [^\s] etc...) optimize map-info was wrong. +2002/11/29: [bug] infinite loop on NULL-pointer str search (regex_search()). + (thanks matz) +2002/11/29: [bug] change static -> extern (regex_chain_reduce()). +2002/11/29: [bug] change encoding to RegDefaultCharEncoding + in re_recompile_pattern(). (adapt to re.c) +2002/04/24: [spec] USE_ONIGURUMA_EXTENSION is disabled in default. +2002/04/24: [new] add searching time option: REG_OPTION_NOTBOL/NOTEOL. + add searching time option argument to regex_search() and + regex_match(). (prepare for POSIX API) +2002/04/20: [impl] divide regex.c file into regcomp.c, regexec.c, reggnu.c + and regint.h. +2002/04/09: [impl] move IS_MULTILINE() to outside of loop in OP_ANYCHAR_STAR. +2002/04/08: [impl] don't use OP_REPEAT operator for '??'. +2002/04/06: [impl] reduce redundant nested repeat operators(?,*,+,??,*?,+?). + ex. (?:a*)?, (?:a??)* etc.. +2002/04/06: [spec] should not warn for /(?:a?)+?/. +2002/04/04: [spec] should allow fixed length alternative and repeat pattern + in look-behind. ex. /(?<=(a|b){3})/ (thanks Guy Decoux) +2002/04/02: [spec] should warn for /(?:a+)?/ and /(?:a*)??/. (thanks akr) + +2002/04/01: Version 1.3 + +2002/04/01: [dist] add COPYING. +2002/03/30: [spec] warn redundant nested repeat operator + in Ruby verbose mode. ex. (?:a*)? +2002/03/30: [spec] nested repeat operator error check should be + same with GNU regex. (thanks Guy Decoux) +2002/03/30: [new] add \x{hexadecimal-wide-char}. (thanks matz) +2002/03/27: [bug] MBCTYPE_XXX symbol values should be same with GNU regex. +2002/03/27: [impl] add THREAD_ATOMIC to regex_clone(), regex_init(), regex_end(). +2002/03/25: [spec] if encoding is utf-8, allow combination of singlebyte and + multibyte code range in char class. + (cancelled 2002/04/01: for M17N compatibility) +2002/03/25: [dist] description of the license condition is added to README. +2002/03/23: [bug] should set all bits of reg->mem_stats, + if REG_OPTION_FIND_LONGEST or REG_OPTION_NOT_EMPTY. +2002/03/23: [new] add a new option REG_OPTION_NOT_EMPTY. +2002/03/20: [spec] allow incompleted left brace as an usual char. + ex. /{/, /({)/, /a{2,3/ etc... +2002/03/20: [impl] serialize integer in bytecode. + (switch by UNALIGNED_WORD_ACCESS in regex.c) +2002/03/20: [impl] change re_mbcinit() for REG_RUBY_M17N. +2002/03/19: [impl] word alignment of char class multi-byte code ranges. +2002/03/19: [impl] replace OP_EXACTMB4N with OP_EXACTMB3N. +2002/03/19: [bug] OP_CCLASS_MB_NOT process in matchAt() is wrong. +2002/03/19: [new] add re_mbctab[] for Ruby extension library compatibility. +2002/03/19: [spec] allow nested repeat operator, if operator is {n,m} type. +2002/03/19: [new] add REG_IS_PATTERN_ERROR(ecode) in regex.h +2002/03/18: [spec] /[a-b-c]/ should be error. +2002/03/18: [bug] /[\w-a]/ should be error. (thanks Guy Decoux) +2002/03/18: [bug] /[\]/ should be error. (thanks Guy Decoux) +2002/03/18: [bug] /()*/ etc.. should not be error. (thanks Guy Decoux) +2002/03/18: [spec] /a{1}*/ should not be error. (thanks Guy Decoux) +2002/03/18: [bug] ab{2}{3} was interpreded to (?:a(?:b{2})){3} + (thanks Guy Decoux) +2002/03/18: [bug] abort /(?i)*a/ etc... (thanks Guy Decoux) +2002/03/18: [bug] abort /a|*/,/a|{1}/ etc... (thanks Guy Decoux) + +2002/03/13: Version 1.2 + +2002/03/13: [test] success in rubicon/builtin/AllBuiltinTests.rb. + (thanks rubicon) +2002/03/13: [bug] OP_EXACTMBN process in matchAt() is wrong. +2002/03/13: [bug] start argument of BackwardSearchRange() is wrong. +2002/03/12: [spec] change function name style from CamelCase + to underline_separation. (includes API) +2002/03/12: [bug] if pattern has nested null-check, cause infinite loop. + correct STACK_NULL_CHECK() macro. (thanks Guy Decoux) +2002/03/11: [bug] it is wrong that four numbers to continue as + an octal value in scanBackSlash(). ex. /\0111/ + (thanks matz) +2002/03/11: [new] \k (single-byte word char), \K (multi-byte char). +2002/03/09: [inst] add two targets to Makefile.in (166 and 172). +2002/03/09: [spec] decrease REG_MAX_BACKREF_NUM, REG_MAX_REPEAT_NUM + values. +2002/03/08: [spec] allow use of "\A"(begin-buf) in look-behind. +2002/03/08: [impl] add a new opcode OP_PUSH_IF_PEEK_NEXT. +2002/03/08: [impl] add a new opcode OP_ANYCHAR_STAR_PEEK_NEXT. +2002/03/07: [spec] prohibit use of capture group "(...)" + in negative look-behind. +2002/03/07: [inst] add configure.in, config.h.in, Makefile.in. +2002/03/07: [impl] call Init_REGEX_STAT() in RegexInit(). +2002/03/07: [spec] less length string match with negative look-behind. + ex. /(? +svn copy file:///home/kosako/svnreps/svnrep_onig/trunk file:///home/kosako/svnreps/svnrep_onig/tags/5.0.0 -m "ADD TAG: 5.0.0" + + +svn propset svn:ignore -F .cvsignore . +svn commit -m "..." + + + +cvs history -T + + +cvs rtag "VERSION_X_X_X" oniguruma + + + +> brew install autoconf +> brew install automake +> brew install libtool + + + +* write Makefile.am and configure.in. +> libtoolize or glibtoolize +> aclocal +> autoheader +> automake --foreign --add-missing +> autoconf +> configure --with-rubydir=... CFLAGS="-O2 -Wall" + + + + + VERSION = current:revision:age + + current: interface number (from 0) + revision: implementation number of same interface (from 0) + age: number of supported previous interfaces + (if current only supported then age == 0) + + + +MacOS X +$ shasum -a 256 -b onig-X.Y.Z.tar.gz > onig-X.Y.Z.tar.gz.sha256 + + +MacOS X +$ shasum -a 256 -c onig-X.Y.Z.tar.gz.sha256 + +//END diff --git a/internal/components/third_party/oniguruma/INSTALL b/internal/components/third_party/oniguruma/INSTALL new file mode 100644 index 0000000000..8865734f81 --- /dev/null +++ b/internal/components/third_party/oniguruma/INSTALL @@ -0,0 +1,368 @@ +Installation Instructions +************************* + + Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software +Foundation, Inc. + + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. + +Basic Installation +================== + + Briefly, the shell command './configure && make && make install' +should configure, build, and install this package. The following +more-detailed instructions are generic; see the 'README' file for +instructions specific to this package. Some packages provide this +'INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. + + The 'configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a 'Makefile' in each directory of the package. +It may also create one or more '.h' files containing system-dependent +definitions. Finally, it creates a shell script 'config.status' that +you can run in the future to recreate the current configuration, and a +file 'config.log' containing compiler output (useful mainly for +debugging 'configure'). + + It can also use an optional file (typically called 'config.cache' and +enabled with '--cache-file=config.cache' or simply '-C') that saves the +results of its tests to speed up reconfiguring. Caching is disabled by +default to prevent problems with accidental use of stale cache files. + + If you need to do unusual things to compile the package, please try +to figure out how 'configure' could check whether to do them, and mail +diffs or instructions to the address given in the 'README' so they can +be considered for the next release. If you are using the cache, and at +some point 'config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file 'configure.ac' (or 'configure.in') is used to create +'configure' by a program called 'autoconf'. You need 'configure.ac' if +you want to change it or regenerate 'configure' using a newer version of +'autoconf'. + + The simplest way to compile this package is: + + 1. 'cd' to the directory containing the package's source code and type + './configure' to configure the package for your system. + + Running 'configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type 'make' to compile the package. + + 3. Optionally, type 'make check' to run any self-tests that come with + the package, generally using the just-built uninstalled binaries. + + 4. Type 'make install' to install the programs and any data files and + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the 'make install' phase executed with root + privileges. + + 5. Optionally, type 'make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior 'make install' required + root privileges, verifies that the installation completed + correctly. + + 6. You can remove the program binaries and object files from the + source code directory by typing 'make clean'. To also remove the + files that 'configure' created (so you can compile the package for + a different kind of computer), type 'make distclean'. There is + also a 'make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 7. Often, you can also type 'make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide 'make + distcheck', which can by used by developers to test that all other + targets like 'make install' and 'make uninstall' work correctly. + This target is generally not run by end users. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the 'configure' script does not know about. Run './configure --help' +for details on some of the pertinent environment variables. + + You can give 'configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here is +an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU 'make'. 'cd' to the +directory where you want the object files and executables to go and run +the 'configure' script. 'configure' automatically checks for the source +code in the directory that 'configure' is in and in '..'. This is known +as a "VPATH" build. + + With a non-GNU 'make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use 'make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple '-arch' options to the +compiler but only a single '-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the 'lipo' tool if you have problems. + +Installation Names +================== + + By default, 'make install' installs the package's commands under +'/usr/local/bin', include files under '/usr/local/include', etc. You +can specify an installation prefix other than '/usr/local' by giving +'configure' the option '--prefix=PREFIX', where PREFIX must be an +absolute file name. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option '--exec-prefix=PREFIX' to 'configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like '--bindir=DIR' to specify different values for particular +kinds of files. Run 'configure --help' for a list of the directories +you can set and what kinds of files go in them. In general, the default +for these options is expressed in terms of '${prefix}', so that +specifying just '--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to 'configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +'make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, 'make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +'${prefix}'. Any directories that were specified during 'configure', +but not in terms of '${prefix}', must each be overridden at install time +for the entire installation to be relocated. The approach of makefile +variable overrides for each directory variable is required by the GNU +Coding Standards, and ideally causes no recompilation. However, some +platforms have known limitations with the semantics of shared libraries +that end up requiring recompilation when using this method, particularly +noticeable in packages that use GNU Libtool. + + The second method involves providing the 'DESTDIR' variable. For +example, 'make install DESTDIR=/alternate/directory' will prepend +'/alternate/directory' before all installation names. The approach of +'DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of '${prefix}' +at 'configure' time. + +Optional Features +================= + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving 'configure' the +option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'. + + Some packages pay attention to '--enable-FEATURE' options to +'configure', where FEATURE indicates an optional part of the package. +They may also pay attention to '--with-PACKAGE' options, where PACKAGE +is something like 'gnu-as' or 'x' (for the X Window System). The +'README' should mention any '--enable-' and '--with-' options that the +package recognizes. + + For packages that use the X Window System, 'configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the 'configure' options '--x-includes=DIR' and +'--x-libraries=DIR' to specify their locations. + + Some packages offer the ability to configure how verbose the +execution of 'make' will be. For these packages, running './configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with 'make V=1'; while running './configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with 'make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC +is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + HP-UX 'make' updates targets which have the same time stamps as their +prerequisites, which makes it generally unusable when shipped generated +files such as 'configure' are involved. Use GNU 'make' instead. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its '' header file. The option '-nodtk' can be used as a +workaround. If GNU CC is not installed, it is therefore recommended to +try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put '/usr/ucb' early in your 'PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in '/usr/bin'. So, if you need '/usr/ucb' +in your 'PATH', put it _after_ '/usr/bin'. + + On Haiku, software installed for all users goes in '/boot/common', +not '/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + +Specifying the System Type +========================== + + There may be some features 'configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, 'configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +'--build=TYPE' option. TYPE can either be a short name for the system +type, such as 'sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS + KERNEL-OS + + See the file 'config.sub' for the possible values of each field. If +'config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option '--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with '--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for 'configure' scripts to share, +you can create a site shell script called 'config.site' that gives +default values for variables like 'CC', 'cache_file', and 'prefix'. +'configure' looks for 'PREFIX/share/config.site' if it exists, then +'PREFIX/etc/config.site' if it exists. Or, you can set the +'CONFIG_SITE' environment variable to the location of the site script. +A warning: not all 'configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to 'configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the 'configure' command line, using 'VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified 'gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an +Autoconf limitation. Until the limitation is lifted, you can use this +workaround: + + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash + +'configure' Invocation +====================== + + 'configure' recognizes the following options to control how it +operates. + +'--help' +'-h' + Print a summary of all of the options to 'configure', and exit. + +'--help=short' +'--help=recursive' + Print a summary of the options unique to this package's + 'configure', and exit. The 'short' variant lists options used only + in the top level, while the 'recursive' variant lists options also + present in any nested packages. + +'--version' +'-V' + Print the version of Autoconf used to generate the 'configure' + script, and exit. + +'--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally 'config.cache'. FILE defaults to '/dev/null' to + disable caching. + +'--config-cache' +'-C' + Alias for '--cache-file=config.cache'. + +'--quiet' +'--silent' +'-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to '/dev/null' (any error + messages will still be shown). + +'--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + 'configure' can determine that directory automatically. + +'--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: for + more details, including other options available for fine-tuning the + installation locations. + +'--no-create' +'-n' + Run the configure checks, but stop before creating any output + files. + +'configure' also accepts some other, not widely useful, options. Run +'configure --help' for more details. diff --git a/internal/components/third_party/oniguruma/Makefile.am b/internal/components/third_party/oniguruma/Makefile.am new file mode 100644 index 0000000000..896b505618 --- /dev/null +++ b/internal/components/third_party/oniguruma/Makefile.am @@ -0,0 +1,87 @@ +## Makefile.am for Oniguruma + +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = src test sample + +EXTRA_DIST = oniguruma.pc.in HISTORY README_japanese README.md \ + index.html index_ja.html make_win.bat \ + CMakeLists.txt oniguruma.pc.cmake.in cmake/Config.cmake.in \ + onig-config.cmake.in src/config.h.cmake.in \ + doc/API doc/API.ja doc/RE doc/RE.ja doc/FAQ doc/FAQ.ja \ + doc/CALLOUTS.BUILTIN doc/CALLOUTS.BUILTIN.ja \ + doc/CALLOUTS.API doc/CALLOUTS.API.ja \ + doc/SYNTAX.md doc/onig_syn_md.c doc/UNICODE_PROPERTIES \ + src/Makefile.windows src/config.h.windows.in \ + src/config.h.win32 src/config.h.win64 \ + test/test.sh test/CMakeLists.txt \ + windows/testc.c windows/CMakeLists.txt + +bin_SCRIPTS = onig-config + +onig-config: onig-config.in + +do_subst = sed \ + -e 's,[@]datadir[@],$(datadir),g' \ + -e 's,[@]datarootdir[@],$(datarootdir),g' \ + -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \ + -e 's,[@]prefix[@],$(prefix),g' \ + -e 's,[@]exec_prefix[@],$(exec_prefix),g' \ + -e 's,[@]libdir[@],$(libdir),g' \ + -e 's,[@]includedir[@],$(includedir),g' + +oniguruma.pc: $(srcdir)/oniguruma.pc.in Makefile + $(do_subst) < $(srcdir)/oniguruma.pc.in > $(@) + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = oniguruma.pc +DISTCLEANFILES = oniguruma.pc + +all-test: + cd test; make test + +archive: + git archive --format=tar --prefix=oniguruma/ HEAD | gzip > ../oniguruma-archive.tar.gz + +tar: + cd ..; tar cvf oniguruma-`date +%Y%m%d`.tar oniguruma; gzip oniguruma-`date +%Y%m%d`.tar + +debug: + make clean + ./configure CFLAGS="-O0 -g" + make + +debug_out: + make clean + ./configure CFLAGS="-O0 -g -DONIG_DEBUG_PARSE -DONIG_DEBUG_COMPILE" + make + +sanitize: + make clean + ./configure CFLAGS="-O -g -fsanitize=address" LDFLAGS="-fsanitize=address" + make + make all-test + +debug_out_sanitize: + make clean + ./configure CFLAGS="-O0 -g -fsanitize=address -DONIG_DEBUG_PARSE -DONIG_DEBUG_COMPILE" LDFLAGS="-fsanitize=address" + make + +cov: + make lcov-clear + cd test; make CFLAGS="--coverage" test + make lcov + +gcov: + make CFLAGS="--coverage" + +lcov: + lcov -c -d src/.libs -o coverage.info + genhtml -o coverage coverage.info + +lcov-clear: + lcov -z -d . + +cov-clean: clean + rm -rf coverage coverage.info + find . -name '*.gcno' | xargs rm -f diff --git a/internal/components/third_party/oniguruma/NEWS b/internal/components/third_party/oniguruma/NEWS new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/components/third_party/oniguruma/README b/internal/components/third_party/oniguruma/README new file mode 100644 index 0000000000..86447e370a --- /dev/null +++ b/internal/components/third_party/oniguruma/README @@ -0,0 +1,203 @@ +README 2018/04/05 + +Oniguruma ---- (C) K.Kosako + +https://github.com/kkos/oniguruma + +FIXED Security Issues (in Oniguruma 6.3.0): + CVE-2017-9224, CVE-2017-9225, CVE-2017-9226 + CVE-2017-9227, CVE-2017-9228, CVE-2017-9229 + +--- +Oniguruma is a modern and flexible regular expressions library. It +encompasses features from different regular expression implementations +that traditionally exist in different languages. It comes close to +being a complete superset of all regular expression features found +in other regular expression implementations. + +Its features include: +* Character encoding can be specified per regular expression object. +* Several regular expression types are supported: + * POSIX + * Grep + * GNU Regex + * Perl + * Java + * Ruby + * Emacs + +Supported character encodings: + + ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, + EUC-JP, EUC-TW, EUC-KR, EUC-CN, + Shift_JIS, Big5, GB18030, KOI8-R, CP1251, + ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, + ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10, + ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16 + +* GB18030: contributed by KUBO Takehiro +* CP1251: contributed by Byte +------------------------------------------------------------ + +License + + BSD license. + + +Install + + Case 1: Linux distribution packages + + * Fedora: dnf install oniguruma-devel + * RHEL/CentOS: yum install oniguruma + * Debian/Ubuntu: apt install libonig5 + * Arch: pacman -S oniguruma + * openSUSE: zypper install oniguruma + + Case 2: Manual compilation on Linux, Unix, and Cygwin platform + + 1. autoreconf -vfi (* case: configure script is not found.) + + 2. ./configure + 3. make + 4. make install + + * uninstall + + make uninstall + + * configuration check + + onig-config --cflags + onig-config --libs + onig-config --prefix + onig-config --exec-prefix + + + + Case 3: Windows 64/32bit platform (Visual Studio) + + execute make_win64 or make_win32 + + src/onig_s.lib: static link library + src/onig.dll: dynamic link library + + * test (ASCII/Shift_JIS) + 1. cd src + 2. copy ..\windows\testc.c . + 3. nmake -f Makefile.windows ctest + + (I have checked by Visual Studio Community 2015) + + + +Regular Expressions + + See doc/RE (or doc/RE.ja for Japanese). + + +Usage + + Include oniguruma.h in your program. (Oniguruma API) + See doc/API for Oniguruma API. + + If you want to disable UChar type (== unsigned char) definition + in oniguruma.h, define ONIG_ESCAPE_UCHAR_COLLISION and then + include oniguruma.h. + + If you want to disable regex_t type definition in oniguruma.h, + define ONIG_ESCAPE_REGEX_T_COLLISION and then include oniguruma.h. + + Example of the compiling/linking command line in Unix or Cygwin, + (prefix == /usr/local case) + + cc sample.c -L/usr/local/lib -lonig + + + If you want to use static link library(onig_s.lib) in Win32, + add option -DONIG_EXTERN=extern to C compiler. + + + +Sample Programs + + sample/simple.c example of the minimum (Oniguruma API) + sample/names.c example of the named group callback. + sample/encode.c example of some encodings. + sample/listcap.c example of the capture history. + sample/posix.c POSIX API sample. + sample/sql.c example of the variable meta characters. + (SQL-like pattern matching) + sample/user_property.c example of user defined Unicode property. + +Test Programs + sample/syntax.c Perl, Java and ASIS syntax test. + sample/crnl.c --enable-crnl-as-line-terminator test + + +Source Files + + oniguruma.h Oniguruma API header file. (public) + onig-config.in configuration check program template. + + regenc.h character encodings framework header file. + regint.h internal definitions + regparse.h internal definitions for regparse.c and regcomp.c + regcomp.c compiling and optimization functions + regenc.c character encodings framework. + regerror.c error message function + regext.c extended API functions. (deluxe version API) + regexec.c search and match functions + regparse.c parsing functions. + regsyntax.c pattern syntax functions and built-in syntax definitions. + regtrav.c capture history tree data traverse functions. + regversion.c version info function. + st.h hash table functions header file + st.c hash table functions + + oniggnu.h GNU regex API header file. (public) + reggnu.c GNU regex API functions + + onigposix.h POSIX API header file. (public) + regposerr.c POSIX error message function. + regposix.c POSIX API functions. + + mktable.c character type table generator. + ascii.c ASCII encoding. + euc_jp.c EUC-JP encoding. + euc_tw.c EUC-TW encoding. + euc_kr.c EUC-KR, EUC-CN encoding. + sjis.c Shift_JIS encoding. + big5.c Big5 encoding. + gb18030.c GB18030 encoding. + koi8.c KOI8 encoding. + koi8_r.c KOI8-R encoding. + cp1251.c CP1251 encoding. + iso8859_1.c ISO-8859-1 encoding. (Latin-1) + iso8859_2.c ISO-8859-2 encoding. (Latin-2) + iso8859_3.c ISO-8859-3 encoding. (Latin-3) + iso8859_4.c ISO-8859-4 encoding. (Latin-4) + iso8859_5.c ISO-8859-5 encoding. (Cyrillic) + iso8859_6.c ISO-8859-6 encoding. (Arabic) + iso8859_7.c ISO-8859-7 encoding. (Greek) + iso8859_8.c ISO-8859-8 encoding. (Hebrew) + iso8859_9.c ISO-8859-9 encoding. (Latin-5 or Turkish) + iso8859_10.c ISO-8859-10 encoding. (Latin-6 or Nordic) + iso8859_11.c ISO-8859-11 encoding. (Thai) + iso8859_13.c ISO-8859-13 encoding. (Latin-7 or Baltic Rim) + iso8859_14.c ISO-8859-14 encoding. (Latin-8 or Celtic) + iso8859_15.c ISO-8859-15 encoding. (Latin-9 or West European with Euro) + iso8859_16.c ISO-8859-16 encoding. + (Latin-10 or South-Eastern European with Euro) + utf8.c UTF-8 encoding. + utf16_be.c UTF-16BE encoding. + utf16_le.c UTF-16LE encoding. + utf32_be.c UTF-32BE encoding. + utf32_le.c UTF-32LE encoding. + unicode.c common codes of Unicode encoding. + + win32/Makefile Makefile for Win32 (VC++) + win32/config.h config.h for Win32 + + +and I'm thankful to Akinori MUSHA. diff --git a/internal/components/third_party/oniguruma/README.md b/internal/components/third_party/oniguruma/README.md new file mode 100644 index 0000000000..a2fe6e05f5 --- /dev/null +++ b/internal/components/third_party/oniguruma/README.md @@ -0,0 +1,263 @@ +[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/oniguruma.svg)](https://oss-fuzz-build-logs.storage.googleapis.com/index.html#oniguruma) + +Oniguruma +========= + +## **The only open source software attacked on Google search in Japan.** [(Issue #234)](https://github.com/kkos/oniguruma/issues/234) + + +https://github.com/kkos/oniguruma + +Oniguruma is a modern and flexible regular expressions library. It +encompasses features from different regular expression implementations +that traditionally exist in different languages. + +Character encoding can be specified per regular expression object. + +Supported character encodings: + + ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, + EUC-JP, EUC-TW, EUC-KR, EUC-CN, + Shift_JIS, Big5, GB18030, KOI8-R, CP1251, + ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, + ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10, + ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16 + +* GB18030: contributed by KUBO Takehiro +* CP1251: contributed by Byte +* doc/SYNTAX.md: contributed by seanofw + + +Notice (from 6.9.6) +------------------- +When using configure script, if you have the POSIX API enabled in an earlier version (disabled by default in 6.9.5) and you need application binary compatibility with the POSIX API, specify "--enable-binary-compatible-posix-api=yes" instead of "--enable-posix-api=yes". Starting in 6.9.6, "--enable-posix-api=yes" only supports source-level compatibility for 6.9.5 and earlier about POSIX API. (Issue #210) + + +Version 6.9.10 +-------------- +* Update Unicode version 16.0 +* Add new operator (*SKIP) +* Fixed: ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS not working for ^* pattern (Issue #292) + + +Version 6.9.9 +------------- +* Update Unicode version 15.1.0 +* NEW API: ONIG_OPTION_MATCH_WHOLE_STRING +* Fixed: (?I) option was not enabled for character classes (Issue #264). +* Changed specification to check for incorrect POSIX bracket (Issue #253). +* Changed [[:punct:]] in Unicode encodings to be compatible with POSIX definition. (Issue #268) +* Fixed: ONIG_OPTION_FIND_LONGEST behavior + + +Version 6.9.8 +------------- +* Update Unicode version 14.0.0 +* Whole options + * (?C) : ONIG_OPTION_DONT_CAPTURE_GROUP + * (?I) : ONIG_OPTION_IGNORECASE_IS_ASCII + * (?L) : ONIG_OPTION_FIND_LONGEST +* Fixed some problems found by OSS-Fuzz + + +Version 6.9.7 +------------- +* NEW API: ONIG_OPTION_CALLBACK_EACH_MATCH +* NEW API: ONIG_OPTION_IGNORECASE_IS_ASCII +* NEW API: ONIG_SYNTAX_PYTHON +* Fixed some problems found by OSS-Fuzz + + +Version 6.9.6 +------------- +* NEW: configure option --enable-binary-compatible-posix-api=[yes/no] +* NEW API: Limiting the maximum number of calls of subexp-call +* NEW API: ONIG_OPTION_NOT_BEGIN_STRING / NOT_END_STRING / NOT_BEGIN_POSITION +* Fixed behavior of ONIG_OPTION_NOTBOL / NOTEOL +* Fixed many problems found by OSS-Fuzz +* Fixed many problems found by Coverity +* Fixed CVE-2020-26159 (This turned out not to be a problem later. #221) +* Under cygwin and mingw, generate and install the libonig.def file (Issue #220) + + +License +------- + + BSD license. + + +Install +------- + +### Case 1: Linux distribution packages + + * Fedora: `dnf install oniguruma-devel` + * RHEL/CentOS: `yum install oniguruma` + * Debian/Ubuntu: `apt install libonig5` + * Arch: `pacman -S oniguruma` + * openSUSE: `zypper install oniguruma` + +### Case 2: Manual compilation on Linux, Unix, and Cygwin platform + + 1. autoreconf -vfi (* case: configure script is not found.) + + 2. ./configure + 3. make + 4. make install + + * uninstall + + make uninstall + + * configuration check + + onig-config --cflags + onig-config --libs + onig-config --prefix + onig-config --exec-prefix + + + +### Case 3: Windows 64/32bit platform (Visual Studio) + + * build library + + .\make_win.bat + + onig_s.lib: static link library + onig.dll: dynamic link library + + * make test programs + + .\make_win.bat all-test + + +Alternatively, you can build and install oniguruma using [vcpkg](https://github.com/microsoft/vcpkg/) dependency manager: + + 1. git clone https://github.com/Microsoft/vcpkg.git + 2. cd vcpkg + 3. ./bootstrap-vcpkg.bat + 4. ./vcpkg integrate install + 5. ./vcpkg install oniguruma + +The oniguruma port in vcpkg is kept up to date by microsoft team members and community contributors. +If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. + +Regular Expressions +------------------- + + See [doc/RE](doc/RE) or [doc/RE.ja](doc/RE.ja) for Japanese. + + +Usage +----- + + Include oniguruma.h in your program. (Oniguruma API) + See doc/API for Oniguruma API. + + If you want to disable UChar type (== unsigned char) definition + in oniguruma.h, define ONIG_ESCAPE_UCHAR_COLLISION and then + include oniguruma.h. + + If you want to disable regex_t type definition in oniguruma.h, + define ONIG_ESCAPE_REGEX_T_COLLISION and then include oniguruma.h. + + Example of the compiling/linking command line in Unix or Cygwin, + (prefix == /usr/local case) + + cc sample.c -L/usr/local/lib -lonig + + + If you want to use static link library(onig_s.lib) in Win32, + add option -DONIG_EXTERN=extern to C compiler. + + + +Sample Programs +--------------- + +|File |Description | +|:---------------------|:-----------------------------------------| +|sample/callout.c |example of callouts | +|sample/count.c |example of built-in callout *COUNT | +|sample/echo.c |example of user defined callouts of name | +|sample/encode.c |example of some encodings | +|sample/listcap.c |example of the capture history | +|sample/names.c |example of the named group callback | +|sample/posix.c |POSIX API sample | +|sample/regset.c |example of using RegSet API | +|sample/scan.c |example of using onig_scan() | +|sample/simple.c |example of the minimum (Oniguruma API) | +|sample/sql.c |example of the variable meta characters | +|sample/user_property.c|example of user defined Unicode property | + + +Test Programs + +|File |Description | +|:------------------|:--------------------------------------| +|sample/syntax.c |Perl, Java and ASIS syntax test. | +|sample/crnl.c |--enable-crnl-as-line-terminator test | + + + +Source Files +------------ + +|File |Description | +|:------------------|:-------------------------------------------------------| +|oniguruma.h |Oniguruma API header file (public) | +|onig-config.in |configuration check program template | +|regenc.h |character encodings framework header file | +|regint.h |internal definitions | +|regparse.h |internal definitions for regparse.c and regcomp.c | +|regcomp.c |compiling and optimization functions | +|regenc.c |character encodings framework | +|regerror.c |error message function | +|regext.c |extended API functions (deluxe version API) | +|regexec.c |search and match functions | +|regparse.c |parsing functions. | +|regsyntax.c |pattern syntax functions and built-in syntax definitions| +|regtrav.c |capture history tree data traverse functions | +|regversion.c |version info function | +|st.h |hash table functions header file | +|st.c |hash table functions | +|oniggnu.h |GNU regex API header file (public) | +|reggnu.c |GNU regex API functions | +|onigposix.h |POSIX API header file (public) | +|regposerr.c |POSIX error message function | +|regposix.c |POSIX API functions | +|mktable.c |character type table generator | +|ascii.c |ASCII encoding | +|euc_jp.c |EUC-JP encoding | +|euc_tw.c |EUC-TW encoding | +|euc_kr.c |EUC-KR, EUC-CN encoding | +|sjis.c |Shift_JIS encoding | +|big5.c |Big5 encoding | +|gb18030.c |GB18030 encoding | +|koi8.c |KOI8 encoding | +|koi8_r.c |KOI8-R encoding | +|cp1251.c |CP1251 encoding | +|iso8859_1.c |ISO-8859-1 (Latin-1) | +|iso8859_2.c |ISO-8859-2 (Latin-2) | +|iso8859_3.c |ISO-8859-3 (Latin-3) | +|iso8859_4.c |ISO-8859-4 (Latin-4) | +|iso8859_5.c |ISO-8859-5 (Cyrillic) | +|iso8859_6.c |ISO-8859-6 (Arabic) | +|iso8859_7.c |ISO-8859-7 (Greek) | +|iso8859_8.c |ISO-8859-8 (Hebrew) | +|iso8859_9.c |ISO-8859-9 (Latin-5 or Turkish) | +|iso8859_10.c |ISO-8859-10 (Latin-6 or Nordic) | +|iso8859_11.c |ISO-8859-11 (Thai) | +|iso8859_13.c |ISO-8859-13 (Latin-7 or Baltic Rim) | +|iso8859_14.c |ISO-8859-14 (Latin-8 or Celtic) | +|iso8859_15.c |ISO-8859-15 (Latin-9 or West European with Euro) | +|iso8859_16.c |ISO-8859-16 (Latin-10) | +|utf8.c |UTF-8 encoding | +|utf16_be.c |UTF-16BE encoding | +|utf16_le.c |UTF-16LE encoding | +|utf32_be.c |UTF-32BE encoding | +|utf32_le.c |UTF-32LE encoding | +|unicode.c |common codes of Unicode encoding | +|unicode_fold_data.c|Unicode folding data | +|windows/testc.c |Test program for Windows (VC++) | diff --git a/internal/components/third_party/oniguruma/README_japanese b/internal/components/third_party/oniguruma/README_japanese new file mode 100644 index 0000000000..b1b249acd7 --- /dev/null +++ b/internal/components/third_party/oniguruma/README_japanese @@ -0,0 +1,183 @@ +README.ja 2017/08/25 + +鬼車 ---- (C) K.Kosako + +https://github.com/kkos/oniguruma + +é¬¼è»Šã¯æ­£è¦è¡¨ç¾ãƒ©ã‚¤ãƒ–ラリã§ã‚る。 +ã“ã®ãƒ©ã‚¤ãƒ–ラリã®ç‰¹é•·ã¯ã€ãれãžã‚Œã®æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã”ã¨ã« +文字エンコーディングを指定ã§ãã‚‹ã“ã¨ã§ã‚る。 + +サãƒãƒ¼ãƒˆã—ã¦ã„る文字エンコーディング: + + ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, + EUC-JP, EUC-TW, EUC-KR, EUC-CN, + Shift_JIS, Big5, GB18030, KOI8-R, CP1251, + ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, + ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10, + ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16 + +* GB18030: ä¹…ä¿å¥æ´‹æ°æä¾› +* CP1251: Byteæ°æä¾› +------------------------------------------------------------ + +ライセンス + + BSDライセンス + + +インストール + + ケース1: Unixã¨Cygwin環境 + + 1. autoreconf -vfi (* configureスクリプトãŒãªã„ã¨ãã ã‘) + + 2. ./configure + 3. make + 4. make install + + アンインストール + + make uninstall + + æ§‹æˆç¢ºèª + + onig-config --cflags + onig-config --libs + onig-config --prefix + onig-config --exec-prefix + + + + ケース2: Windows 64/32bit (Visual Studio)環境 + + make_win64 ã‚ã‚‹ã„㯠make_win32 を実行 + + onig_s.lib: static link library + onig.dll: dynamic link library + + * 動作テスト (ASCII/Shift_JIS) + 1. cd src + 2. copy ..\windows\testc.c . + 3. nmake -f Makefile.windows ctest + + (Visual Studio Community 2015 ã§å‹•作確èª) + + + +æ­£è¦è¡¨ç¾ + + doc/RE.jaã‚’å‚ç…§ + + +使用方法 + + 使用ã™ã‚‹ãƒ—ログラムã§ã€oniguruma.hをインクルードã™ã‚‹(Oniguruma APIã®å ´åˆ)。 + Oniguruma APIã«ã¤ã„ã¦ã¯ã€doc/API.jaã‚’å‚照。 + + oniguruma.hã§å®šç¾©ã•れã¦ã„ã‚‹åž‹åUChar(== unsigned char)を無効ã«ã—ãŸã„å ´åˆ + ã«ã¯ã€ONIG_ESCAPE_UCHAR_COLLISIONã‚’defineã—ã¦ã‹ã‚‰oniguruma.hをインクルード + ã™ã‚‹ã“ã¨ã€‚ã“ã®ã¨ãã«ã¯UCharã¯å®šç¾©ã•れãšã€OnigUCharã¨ã„ã†åå‰ã®å®šç¾©ã®ã¿ãŒ + 有効ã«ãªã‚‹ã€‚ + + oniguruma.hã§å®šç¾©ã•れã¦ã„ã‚‹åž‹åregex_tを無効ã«ã—ãŸã„å ´åˆã«ã¯ã€ + ONIG_ESCAPE_REGEX_T_COLLISIONã‚’defineã—ã¦ã‹ã‚‰oniguruma.hをインクルード + ã™ã‚‹ã“ã¨ã€‚ã“ã®ã¨ãã«ã¯regex_tã¯å®šç¾©ã•れãšã€OnigRegexType, OnigRegexã¨ã„ㆠ+ åå‰ã®å®šç¾©ã®ã¿ãŒæœ‰åйã«ãªã‚‹ã€‚ + + Unix/Cygwin上ã§ã‚³ãƒ³ãƒ‘イルã€ãƒªãƒ³ã‚¯ã™ã‚‹å ´åˆã®ä¾‹ï¼š + (prefixãŒ/usr/localã®ã¨ã) + cc sample.c -L/usr/local/lib -lonig + + GNU libtoolを使用ã—ã¦ã„ã‚‹ã®ã§ã€ãƒ—ラットフォームãŒå…±æœ‰ãƒ©ã‚¤ãƒ–ラリをサãƒãƒ¼ãƒˆã—㦠+ ã„れã°ã€ä½¿ç”¨ã§ãるよã†ã«ãªã£ã¦ã„る。 + é™çš„ライブラリã¨å…±æœ‰ãƒ©ã‚¤ãƒ–ラリã®ã©ã¡ã‚‰ã‚’使用ã™ã‚‹ã‹ã‚’指定ã™ã‚‹æ–¹æ³•ã€å®Ÿè¡Œæ™‚点ã§ã® + 環境設定方法ã«ã¤ã„ã¦ã¯ã€è‡ªåˆ†ã§èª¿ã¹ã¦ä¸‹ã•ã„。 + + + Win32ã§ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒªãƒ³ã‚¯ãƒ©ã‚¤ãƒ–ラリ(onig_s.lib)をリンクã™ã‚‹å ´åˆã«ã¯ã€ + コンパイルã™ã‚‹ã¨ãã« -DONIG_EXTERN=extern をコンパイル引数ã«è¿½åŠ ã™ã‚‹ã“ã¨ã€‚ + + +使用例プログラム + + sample/simple.c 最å°ä¾‹ (Oniguruma API) + sample/names.c åå‰ä»˜ãグループコールãƒãƒƒã‚¯ä½¿ç”¨ä¾‹ + sample/encode.c å¹¾ã¤ã‹ã®æ–‡å­—エンコーディング使用例 + sample/listcap.c æ•ç²å±¥æ­´æ©Ÿèƒ½ã®ä½¿ç”¨ä¾‹ + sample/posix.c POSIX API使用例 + sample/sql.c å¯å¤‰ãƒ¡ã‚¿æ–‡å­—機能使用例 (SQL-like パターン) + sample/user_property.c ユーザ定義Unicodeプロパティã®ä½¿ç”¨ä¾‹ + + +テストプログラム + sample/syntax.c Perlã€Javaã€ASIS文法ã®ãƒ†ã‚¹ãƒˆ + sample/crnl.c --enable-crnl-as-line-terminator テスト + + +ソースファイル + + oniguruma.h 鬼車APIヘッダ (公開) + onig-config.in onig-configプログラム テンプレート + + regenc.h 文字エンコーディング枠組ã¿ãƒ˜ãƒƒãƒ€ + regint.h 内部宣言 + regparse.h regparse.cã¨regcomp.cã®ãŸã‚ã®å†…部宣言 + regcomp.c ã‚³ãƒ³ãƒ‘ã‚¤ãƒ«ã€æœ€é©åŒ–関数 + regenc.c 文字エンコーディング枠組㿠+ regerror.c エラーメッセージ関数 + regext.c æ‹¡å¼µAPI関数 + regexec.c 検索ã€ç…§åˆé–¢æ•° + regparse.c æ­£è¦è¡¨ç¾ãƒ‘ターン解æžé–¢æ•° + regsyntax.c æ­£è¦è¡¨ç¾ãƒ‘ターン文法関数ã€çµ„è¾¼ã¿æ–‡æ³•定義 + regtrav.c æ•ç²å±¥æ­´æœ¨å·¡å›žé–¢æ•° + regversion.c 版情報関数 + st.h ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ル関数宣言 + st.c ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ル関数 + + oniggnu.h GNU regex APIヘッダ (公開) + reggnu.c GNU regex API関数 + + onigposix.h POSIX APIヘッダ (公開) + regposerr.c POSIX APIエラーメッセージ関数 + regposix.c POSIX API関数 + + mktable.c 文字タイプテーブル生æˆãƒ—ログラム + ascii.c ASCII エンコーディング + euc_jp.c EUC-JP エンコーディング + euc_tw.c EUC-TW エンコーディング + euc_kr.c EUC-KR, EUC-CN エンコーディング + sjis.c Shift_JIS エンコーディング + big5.c Big5 エンコーディング + gb18030.c GB18030 エンコーディング + koi8.c KOI8 エンコーディング + koi8_r.c KOI8-R エンコーディング + cp1251.c CP1251 エンコーディング + iso8859_1.c ISO-8859-1 (Latin-1) + iso8859_2.c ISO-8859-2 (Latin-2) + iso8859_3.c ISO-8859-3 (Latin-3) + iso8859_4.c ISO-8859-4 (Latin-4) + iso8859_5.c ISO-8859-5 (Cyrillic) + iso8859_6.c ISO-8859-6 (Arabic) + iso8859_7.c ISO-8859-7 (Greek) + iso8859_8.c ISO-8859-8 (Hebrew) + iso8859_9.c ISO-8859-9 (Latin-5 ã¾ãŸã¯ Turkish) + iso8859_10.c ISO-8859-10 (Latin-6 ã¾ãŸã¯ Nordic) + iso8859_11.c ISO-8859-11 (Thai) + iso8859_13.c ISO-8859-13 (Latin-7 ã¾ãŸã¯ Baltic Rim) + iso8859_14.c ISO-8859-14 (Latin-8 ã¾ãŸã¯ Celtic) + iso8859_15.c ISO-8859-15 (Latin-9 ã¾ãŸã¯ West European with Euro) + iso8859_16.c ISO-8859-16 + (Latin-10 ã¾ãŸã¯ South-Eastern European with Euro) + utf8.c UTF-8 エンコーディング + utf16_be.c UTF-16BE エンコーディング + utf16_le.c UTF-16LE エンコーディング + utf32_be.c UTF-32BE エンコーディング + utf32_le.c UTF-32LE エンコーディング + unicode.c Unicodeエンコーディングã®å…±é€šå‡¦ç† + + win32/Makefile Win32用 Makefile (for VC++) + win32/config.h Win32用 config.h + + +and I'm thankful to Akinori MUSHA. diff --git a/internal/components/third_party/oniguruma/autogen.sh b/internal/components/third_party/oniguruma/autogen.sh new file mode 100755 index 0000000000..006fd36df0 --- /dev/null +++ b/internal/components/third_party/oniguruma/autogen.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# autogen.sh for Oniguruma + +echo "Generating autotools files." +#autoreconf --install --force --symlink || exit 1 +autoreconf --install --force || exit 1 + +echo "" +echo "Run ./configure, make, and make install." diff --git a/internal/components/third_party/oniguruma/cmake/Config.cmake.in b/internal/components/third_party/oniguruma/cmake/Config.cmake.in new file mode 100644 index 0000000000..38bbde7b37 --- /dev/null +++ b/internal/components/third_party/oniguruma/cmake/Config.cmake.in @@ -0,0 +1,4 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/internal/components/third_party/oniguruma/compile b/internal/components/third_party/oniguruma/compile new file mode 100755 index 0000000000..23fcba0113 --- /dev/null +++ b/internal/components/third_party/oniguruma/compile @@ -0,0 +1,348 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN* | MSYS*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/* | msys/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/internal/components/third_party/oniguruma/config.guess b/internal/components/third_party/oniguruma/config.guess new file mode 100755 index 0000000000..9aff91cfd0 --- /dev/null +++ b/internal/components/third_party/oniguruma/config.guess @@ -0,0 +1,1687 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2020 Free Software Foundation, Inc. + +timestamp='2020-08-17' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to . + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2020 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if test -f /.attbin/uname ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "$UNAME_SYSTEM" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + set_cc_for_build + cat <<-EOF > "$dummy.c" + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "$UNAME_VERSION" in + Debian*) + release='-gnu' + ;; + *) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "$machine-${os}${release}${abi-}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; + *:ekkoBSD:*:*) + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" + exit ;; + *:SolidBSD:*:*) + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; + *:OS108:*:*) + echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:MirBSD:*:*) + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Twizzler:*:*) + echo "$UNAME_MACHINE"-unknown-twizzler + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix"$UNAME_RELEASE" + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux"$UNAME_RELEASE" + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos"$UNAME_RELEASE" + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos"$UNAME_RELEASE" + ;; + sun4) + echo sparc-sun-sunos"$UNAME_RELEASE" + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos"$UNAME_RELEASE" + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint"$UNAME_RELEASE" + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint"$UNAME_RELEASE" + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint"$UNAME_RELEASE" + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten"$UNAME_RELEASE" + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten"$UNAME_RELEASE" + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix"$UNAME_RELEASE" + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix"$UNAME_RELEASE" + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix"$UNAME_RELEASE" + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos"$UNAME_RELEASE" + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 + then + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x + then + echo m88k-dg-dgux"$UNAME_RELEASE" + else + echo m88k-dg-dguxbcs"$UNAME_RELEASE" + fi + else + echo i586-dg-dgux"$UNAME_RELEASE" + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if test -x /usr/bin/oslevel ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if test -x /usr/bin/lslpp ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if test -x /usr/bin/getconf; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if test "$HP_ARCH" = ""; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if test "$HP_ARCH" = hppa2.0w + then + set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" + exit ;; + 3050*:HI-UX:*:*) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if test -x /usr/sbin/sysversion ; then + echo "$UNAME_MACHINE"-unknown-osf1mk + else + echo "$UNAME_MACHINE"-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:BSD/OS:*:*) + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + fi + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case "$UNAME_PROCESSOR" in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + i*:CYGWIN*:*) + echo "$UNAME_MACHINE"-pc-cygwin + exit ;; + *:MINGW64*:*) + echo "$UNAME_MACHINE"-pc-mingw64 + exit ;; + *:MINGW*:*) + echo "$UNAME_MACHINE"-pc-mingw32 + exit ;; + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys + exit ;; + i*:PW*:*) + echo "$UNAME_MACHINE"-pc-pw32 + exit ;; + *:Interix*:*) + case "$UNAME_MACHINE" in + x86) + echo i586-pc-interix"$UNAME_RELEASE" + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix"$UNAME_RELEASE" + exit ;; + IA64) + echo ia64-unknown-interix"$UNAME_RELEASE" + exit ;; + esac ;; + i*:UWIN*:*) + echo "$UNAME_MACHINE"-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-pc-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + *:GNU:*:*) + # the GNU system + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + exit ;; + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix + exit ;; + aarch64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arm*:Linux:*:*) + set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + else + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + cris:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + crisv32:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + frv:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + hexagon:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + ia64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m32r*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m68*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 + sed 's/^ //' << EOF > "$dummy.c" + #undef CPU + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + MIPS_ENDIAN=el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + MIPS_ENDIAN= + #else + MIPS_ENDIAN= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } + ;; + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-"$LIBC" + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-"$LIBC" + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-"$LIBC" + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-"$LIBC" + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" + exit ;; + sh64*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sh*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + tile*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + vax:Linux:*:*) + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" + exit ;; + x86_64:Linux:*:*) + set_cc_for_build + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_X32 >/dev/null + then + LIBCABI="$LIBC"x32 + fi + fi + echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" + exit ;; + xtensa*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo "$UNAME_MACHINE"-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo "$UNAME_MACHINE"-unknown-stop + exit ;; + i*86:atheos:*:*) + echo "$UNAME_MACHINE"-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo "$UNAME_MACHINE"-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos"$UNAME_RELEASE" + exit ;; + i*86:*DOS:*:*) + echo "$UNAME_MACHINE"-pc-msdosdjgpp + exit ;; + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos"$UNAME_RELEASE" + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos"$UNAME_RELEASE" + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv"$UNAME_RELEASE" + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo "$UNAME_MACHINE"-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo "$UNAME_MACHINE"-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux"$UNAME_RELEASE" + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if test -d /usr/nec; then + echo mips-nec-sysv"$UNAME_RELEASE" + else + echo mips-unknown-sysv"$UNAME_RELEASE" + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux"$UNAME_RELEASE" + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux"$UNAME_RELEASE" + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux"$UNAME_RELEASE" + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Rhapsody:*:*) + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + exit ;; + arm64:Darwin:*:*) + echo aarch64-apple-darwin"$UNAME_RELEASE" + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build + fi + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE + fi + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + # shellcheck disable=SC2154 + if test "$cputype" = 386; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo "$UNAME_MACHINE"-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux"$UNAME_RELEASE" + exit ;; + *:DragonFly:*:*) + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "$UNAME_MACHINE" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + exit ;; + i*86:rdos:*:*) + echo "$UNAME_MACHINE"-pc-rdos + exit ;; + i*86:AROS:*:*) + echo "$UNAME_MACHINE"-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; + *:Unleashed:*:*) + echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" + exit ;; +esac + +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + +echo "$0: unable to guess system type" >&2 + +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 <&2 </dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" +EOF +fi + +exit 1 + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/internal/components/third_party/oniguruma/config.sub b/internal/components/third_party/oniguruma/config.sub new file mode 100755 index 0000000000..0753e30845 --- /dev/null +++ b/internal/components/third_party/oniguruma/config.sub @@ -0,0 +1,1851 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2020 Free Software Foundation, Inc. + +timestamp='2020-08-17' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2020 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Split fields of configuration type +# shellcheck disable=SC2162 +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 + ;; + *-*-*-*) + basic_machine=$field1-$field2 + basic_os=$field3-$field4 + ;; + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + basic_os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + basic_os=linux-android + ;; + *) + basic_machine=$field1-$field2 + basic_os=$field3 + ;; + esac + ;; + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + basic_os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + basic_os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + basic_os= + ;; + *) + basic_machine=$field1 + basic_os=$field2 + ;; + esac + ;; + esac + ;; + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + basic_os=bsd + ;; + a29khif) + basic_machine=a29k-amd + basic_os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + basic_os=scout + ;; + alliant) + basic_machine=fx80-alliant + basic_os= + ;; + altos | altos3068) + basic_machine=m68k-altos + basic_os= + ;; + am29k) + basic_machine=a29k-none + basic_os=bsd + ;; + amdahl) + basic_machine=580-amdahl + basic_os=sysv + ;; + amiga) + basic_machine=m68k-unknown + basic_os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + basic_os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + basic_os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + basic_os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + basic_os=bsd + ;; + aros) + basic_machine=i386-pc + basic_os=aros + ;; + aux) + basic_machine=m68k-apple + basic_os=aux + ;; + balance) + basic_machine=ns32k-sequent + basic_os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + basic_os=linux + ;; + cegcc) + basic_machine=arm-unknown + basic_os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + basic_os=bsd + ;; + convex-c2) + basic_machine=c2-convex + basic_os=bsd + ;; + convex-c32) + basic_machine=c32-convex + basic_os=bsd + ;; + convex-c34) + basic_machine=c34-convex + basic_os=bsd + ;; + convex-c38) + basic_machine=c38-convex + basic_os=bsd + ;; + cray) + basic_machine=j90-cray + basic_os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + basic_os= + ;; + da30) + basic_machine=m68k-da30 + basic_os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + basic_os= + ;; + delta88) + basic_machine=m88k-motorola + basic_os=sysv3 + ;; + dicos) + basic_machine=i686-pc + basic_os=dicos + ;; + djgpp) + basic_machine=i586-pc + basic_os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + basic_os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + basic_os=ose + ;; + gmicro) + basic_machine=tron-gmicro + basic_os=sysv + ;; + go32) + basic_machine=i386-pc + basic_os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + basic_os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + basic_os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + basic_os=hms + ;; + harris) + basic_machine=m88k-harris + basic_os=sysv3 + ;; + hp300 | hp300hpux) + basic_machine=m68k-hp + basic_os=hpux + ;; + hp300bsd) + basic_machine=m68k-hp + basic_os=bsd + ;; + hppaosf) + basic_machine=hppa1.1-hp + basic_os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + basic_os=proelf + ;; + i386mach) + basic_machine=i386-mach + basic_os=mach + ;; + isi68 | isi) + basic_machine=m68k-isi + basic_os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + basic_os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + basic_os=sysv + ;; + merlin) + basic_machine=ns32k-utek + basic_os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + basic_os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + basic_os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + basic_os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + basic_os=coff + ;; + morphos) + basic_machine=powerpc-unknown + basic_os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + basic_os=moxiebox + ;; + msdos) + basic_machine=i386-pc + basic_os=msdos + ;; + msys) + basic_machine=i686-pc + basic_os=msys + ;; + mvs) + basic_machine=i370-ibm + basic_os=mvs + ;; + nacl) + basic_machine=le32-unknown + basic_os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + basic_os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + basic_os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + basic_os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + basic_os=newsos + ;; + news1000) + basic_machine=m68030-sony + basic_os=newsos + ;; + necv70) + basic_machine=v70-nec + basic_os=sysv + ;; + nh3000) + basic_machine=m68k-harris + basic_os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + basic_os=cxux + ;; + nindy960) + basic_machine=i960-intel + basic_os=nindy + ;; + mon960) + basic_machine=i960-intel + basic_os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + basic_os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + basic_os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + basic_os=ose + ;; + os68k) + basic_machine=m68k-none + basic_os=os68k + ;; + paragon) + basic_machine=i860-intel + basic_os=osf + ;; + parisc) + basic_machine=hppa-unknown + basic_os=linux + ;; + psp) + basic_machine=mipsallegrexel-sony + basic_os=psp + ;; + pw32) + basic_machine=i586-unknown + basic_os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + basic_os=rdos + ;; + rdos32) + basic_machine=i386-pc + basic_os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + basic_os=coff + ;; + sa29200) + basic_machine=a29k-amd + basic_os=udi + ;; + sei) + basic_machine=mips-sei + basic_os=seiux + ;; + sequent) + basic_machine=i386-sequent + basic_os= + ;; + sps7) + basic_machine=m68k-bull + basic_os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + basic_os= + ;; + stratus) + basic_machine=i860-stratus + basic_os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + basic_os= + ;; + sun2os3) + basic_machine=m68000-sun + basic_os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + basic_os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + basic_os= + ;; + sun3os3) + basic_machine=m68k-sun + basic_os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + basic_os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + basic_os= + ;; + sun4os3) + basic_machine=sparc-sun + basic_os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + basic_os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + basic_os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + basic_os= + ;; + sv1) + basic_machine=sv1-cray + basic_os=unicos + ;; + symmetry) + basic_machine=i386-sequent + basic_os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + basic_os=unicos + ;; + t90) + basic_machine=t90-cray + basic_os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + basic_os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + basic_os=tpf + ;; + udi29k) + basic_machine=a29k-amd + basic_os=udi + ;; + ultra3) + basic_machine=a29k-nyu + basic_os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + basic_os=none + ;; + vaxv) + basic_machine=vax-dec + basic_os=sysv + ;; + vms) + basic_machine=vax-dec + basic_os=vms + ;; + vsta) + basic_machine=i386-pc + basic_os=vsta + ;; + vxworks960) + basic_machine=i960-wrs + basic_os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + basic_os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + basic_os=vxworks + ;; + xbox) + basic_machine=i686-pc + basic_os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + basic_os=unicos + ;; + *) + basic_machine=$1 + basic_os= + ;; + esac + ;; +esac + +# Decode 1-component or ad-hoc basic machines +case $basic_machine in + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond + ;; + op50n) + cpu=hppa1.1 + vendor=oki + ;; + op60c) + cpu=hppa1.1 + vendor=oki + ;; + ibm*) + cpu=i370 + vendor=ibm + ;; + orion105) + cpu=clipper + vendor=highlevel + ;; + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple + ;; + pmac | pmac-mpw) + cpu=powerpc + vendor=apple + ;; + + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + cpu=m68000 + vendor=att + ;; + 3b*) + cpu=we32k + vendor=att + ;; + bluegene*) + cpu=powerpc + vendor=ibm + basic_os=cnk + ;; + decsystem10* | dec10*) + cpu=pdp10 + vendor=dec + basic_os=tops10 + ;; + decsystem20* | dec20*) + cpu=pdp10 + vendor=dec + basic_os=tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + cpu=m68k + vendor=motorola + ;; + dpx2*) + cpu=m68k + vendor=bull + basic_os=sysv3 + ;; + encore | umax | mmax) + cpu=ns32k + vendor=encore + ;; + elxsi) + cpu=elxsi + vendor=elxsi + basic_os=${basic_os:-bsd} + ;; + fx2800) + cpu=i860 + vendor=alliant + ;; + genix) + cpu=ns32k + vendor=ns + ;; + h3050r* | hiux*) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + cpu=m68000 + vendor=hp + ;; + hp9k3[2-9][0-9]) + cpu=m68k + vendor=hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + i*86v32) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv32 + ;; + i*86v4*) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv4 + ;; + i*86v) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv + ;; + i*86sol2) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + basic_os=${basic_os:-unicos} + ;; + iris | iris4d) + cpu=mips + vendor=sgi + case $basic_os in + irix*) + ;; + *) + basic_os=irix4 + ;; + esac + ;; + miniframe) + cpu=m68000 + vendor=convergent + ;; + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + basic_os=mint + ;; + news-3600 | risc-news) + cpu=mips + vendor=sony + basic_os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next + case $basic_os in + openstep*) + ;; + nextstep*) + ;; + ns2*) + basic_os=nextstep2 + ;; + *) + basic_os=nextstep3 + ;; + esac + ;; + np1) + cpu=np1 + vendor=gould + ;; + op50n-* | op60c-*) + cpu=hppa1.1 + vendor=oki + basic_os=proelf + ;; + pa-hitachi) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + pbd) + cpu=sparc + vendor=tti + ;; + pbb) + cpu=m68k + vendor=tti + ;; + pc532) + cpu=ns32k + vendor=pc532 + ;; + pn) + cpu=pn + vendor=gould + ;; + power) + cpu=power + vendor=ibm + ;; + ps2) + cpu=i386 + vendor=ibm + ;; + rm[46]00) + cpu=mips + vendor=siemens + ;; + rtpc | rtpc-*) + cpu=romp + vendor=ibm + ;; + sde) + cpu=mipsisa32 + vendor=sde + basic_os=${basic_os:-elf} + ;; + simso-wrs) + cpu=sparclite + vendor=wrs + basic_os=vxworks + ;; + tower | tower-32) + cpu=m68k + vendor=ncr + ;; + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu + ;; + w65) + cpu=w65 + vendor=wdc + ;; + w89k-*) + cpu=hppa1.1 + vendor=winbond + basic_os=proelf + ;; + none) + cpu=none + vendor=none + ;; + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine + ;; + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` + ;; + + *-*) + # shellcheck disable=SC2162 + IFS="-" read cpu vendor <&2 + exit 1 + ;; + esac + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $vendor in + digital*) + vendor=dec + ;; + commodore*) + vendor=cbm + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if test x$basic_os != x +then + +# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just +# set os. +case $basic_os in + gnu/linux*) + kernel=linux + os=`echo $basic_os | sed -e 's|gnu/linux|gnu|'` + ;; + nto-qnx*) + kernel=nto + os=`echo $basic_os | sed -e 's|nto-qnx|qnx|'` + ;; + *-*) + # shellcheck disable=SC2162 + IFS="-" read kernel os <&2 + exit 1 + ;; +esac + +# As a final step for OS-related things, validate the OS-kernel combination +# (given a valid OS), if there is a kernel. +case $kernel-$os in + linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* ) + ;; + -dietlibc* | -newlib* | -musl* | -uclibc* ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + exit 1 + ;; + kfreebsd*-gnu* | kopensolaris*-gnu*) + ;; + nto-qnx*) + ;; + *-eabi* | *-gnueabi*) + ;; + -*) + # Blank kernel with real OS is always fine. + ;; + *-*) + echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + exit 1 + ;; +esac + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +case $vendor in + unknown) + case $cpu-$os in + *-riscix*) + vendor=acorn + ;; + *-sunos*) + vendor=sun + ;; + *-cnk* | *-aix*) + vendor=ibm + ;; + *-beos*) + vendor=be + ;; + *-hpux*) + vendor=hp + ;; + *-mpeix*) + vendor=hp + ;; + *-hiux*) + vendor=hitachi + ;; + *-unos*) + vendor=crds + ;; + *-dgux*) + vendor=dg + ;; + *-luna*) + vendor=omron + ;; + *-genix*) + vendor=ns + ;; + *-clix*) + vendor=intergraph + ;; + *-mvs* | *-opened*) + vendor=ibm + ;; + *-os400*) + vendor=ibm + ;; + s390-* | s390x-*) + vendor=ibm + ;; + *-ptx*) + vendor=sequent + ;; + *-tpf*) + vendor=ibm + ;; + *-vxsim* | *-vxworks* | *-windiss*) + vendor=wrs + ;; + *-aux*) + vendor=apple + ;; + *-hms*) + vendor=hitachi + ;; + *-mpw* | *-macos*) + vendor=apple + ;; + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) + vendor=atari + ;; + *-vos*) + vendor=stratus + ;; + esac + ;; +esac + +echo "$cpu-$vendor-${kernel:+$kernel-}$os" +exit + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/internal/components/third_party/oniguruma/configure.ac b/internal/components/third_party/oniguruma/configure.ac new file mode 100644 index 0000000000..55c9ea2843 --- /dev/null +++ b/internal/components/third_party/oniguruma/configure.ac @@ -0,0 +1,98 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(onig, 6.9.10) + +AC_CONFIG_MACRO_DIR([m4]) + +AM_INIT_AUTOMAKE([-Wno-portability]) +AC_CONFIG_HEADERS([src/config.h]) + + +AC_ARG_WITH([statistics], + [AS_HELP_STRING([--with-statistics], + [take matching time statistical data])], + AS_VAR_APPEND([CFLAGS], [" -DONIG_DEBUG_STATISTICS"])) + + +dnl check for POSIX API +AC_ARG_ENABLE([posix-api], + [AS_HELP_STRING([--enable-posix-api], + [turn on to include POSIX API [default=no]])], +[\ +case "${enableval}" in + yes) enable_posix_api=yes ;; + no) enable_posix_api=no ;; + *) AC_MSG_ERROR(bad value for --enable-posix-api) ;; +esac], +enable_posix_api=no) + +dnl check for Binary compatible POSIX API +AC_ARG_ENABLE([binary-compatible-posix-api], + [AS_HELP_STRING([--enable-binary-compatible-posix-api], + [turn on to Binary compatible POSIX API [default=no]])], +[\ +case "${enableval}" in + yes) enable_binary_compatible_posix_api=yes; enable_posix_api=yes ;; + no) enable_binary_compatible_posix_api=no ;; + *) AC_MSG_ERROR(bad value for --enable-binary-compatible-posix-api) ;; +esac], +enable_binary_compatible_posix_api=no) + +AM_CONDITIONAL(ENABLE_BINARY_COMPATIBLE_POSIX_API, test x"${enable_binary_compatible_posix_api}" = xyes) +AM_CONDITIONAL(ENABLE_POSIX_API, test x"${enable_posix_api}" = xyes) + + +dnl check for CRNL_AS_LINE_TERMINATOR +AC_ARG_ENABLE([crnl-as-line-terminator], + [AS_HELP_STRING([--enable-crnl-as-line-terminator], + [deprecated])], + [crnl_as_line_terminator=$enableval]) +if test "${crnl_as_line_terminator}" = yes; then + AC_DEFINE(USE_CRNL_AS_LINE_TERMINATOR,1,[Define if enable CR+NL as line terminator]) +fi + + +dnl Checks for programs. +AC_PROG_CC +LT_INIT +LTVERSION="10:0:5" +AC_SUBST(LTVERSION) + +AC_PROG_INSTALL +AC_PROG_MAKE_SET + +dnl Checks for libraries. + +dnl Checks for header files. +AC_CHECK_HEADERS(sys/time.h unistd.h sys/times.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_CHECK_SIZEOF([int]) +AC_CHECK_SIZEOF([long]) +AC_CHECK_SIZEOF([long long]) +AC_CHECK_SIZEOF([void*]) + +dnl Checks for library functions. +AC_FUNC_ALLOCA + +AC_CONFIG_FILES([Makefile src/Makefile test/Makefile sample/Makefile onig-config]) +AC_CONFIG_COMMANDS([default],[chmod +x onig-config],[]) + +# for Issue #220 +LIBONIG_DEF_FILE= +FIX_TO_LDFLAGS= +case $host_os in + cygwin* | mingw* ) + if test X"$enable_shared" = Xyes; then + LIBONIG_DEF_FILE=libonig.def + FIX_TO_LDFLAGS="-no-undefined" + fi + ;; +esac + +EXTRA_LIBONIG_LDFLAGS="$EXTRA_LIBONIG_LDFLAGS $FIX_TO_LDFLAGS" +AC_SUBST(EXTRA_LIBONIG_LDFLAGS) + +AM_CONDITIONAL(USE_LIBONIG_DEF_FILE, test -n "${LIBONIG_DEF_FILE}") +AC_SUBST(LIBONIG_DEF_FILE) + +AC_OUTPUT diff --git a/internal/components/third_party/oniguruma/depcomp b/internal/components/third_party/oniguruma/depcomp new file mode 100755 index 0000000000..6b391623c4 --- /dev/null +++ b/internal/components/third_party/oniguruma/depcomp @@ -0,0 +1,791 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1999-2020 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Avoid interferences from the environment. +gccflag= dashmflag= + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The second -e expression handles DOS-style file names with drive + # letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the "deleted header file" problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. +## Some versions of gcc put a space before the ':'. On the theory +## that the space means something, we add a space to the output as +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts '$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for ':' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + "$@" $dashmflag | + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/internal/components/third_party/oniguruma/doc/API b/internal/components/third_party/oniguruma/doc/API new file mode 100644 index 0000000000..2990793b38 --- /dev/null +++ b/internal/components/third_party/oniguruma/doc/API @@ -0,0 +1,1105 @@ +Oniguruma API Version 6.9.10 2024/06/26 + +#include + + +# int onig_initialize(OnigEncoding use_encodings[], int num_encodings) + + Initialize library. + + You have to call it explicitly. + + * onig_init() is deprecated. + + arguments + 1 use_encodings: array of encodings used in application. + 2 num_encodings: number of encodings. + + return value + normal: ONIG_NORMAL == 0 + error: error code < 0 + + +# int onig_error_code_to_str(UChar* err_buf, int err_code, ...) + + Get error message string. + If this function is used for onig_new(), + don't call this after the pattern argument of onig_new() is freed. + + return value + normal: error message string length + + arguments + 1 err_buf: error message string buffer. + (required size: ONIG_MAX_ERROR_MESSAGE_LEN) + 2 err_code: error code returned by other API functions. + 3 err_info (optional): error info returned by onig_new(). + + +# void onig_set_warn_func(OnigWarnFunc func) + + Set warning function. + + WARNING: + '[', '-', ']' in character class without escape. + ']' in pattern without escape. + + arguments + 1 func: function pointer. void (*func)(char* warning_message) + + +# void onig_set_verb_warn_func(OnigWarnFunc func) + + Set verbose warning function. + + WARNING: + redundant nested repeat operator. + + arguments + 1 func: function pointer. void (*func)(char* warning_message) + + +# int onig_new(regex_t** reg, const UChar* pattern, const UChar* pattern_end, + OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, + OnigErrorInfo* err_info) + + Create a regex object. + + return value + normal: ONIG_NORMAL == 0 + error: error code < 0 + + arguments + 1 reg: return regex object's address. + 2 pattern: regex pattern string. + 3 pattern_end: terminate address of pattern. (pattern + pattern length) + 4 option: compile time options. + + ONIG_OPTION_NONE no option + ONIG_OPTION_SINGLELINE '^' -> '\A', '$' -> '\Z' + ONIG_OPTION_MULTILINE '.' match with newline + ONIG_OPTION_IGNORECASE ambiguity match on + ONIG_OPTION_EXTEND extended pattern form + ONIG_OPTION_FIND_LONGEST find longest match + ONIG_OPTION_FIND_NOT_EMPTY ignore empty match + ONIG_OPTION_NEGATE_SINGLELINE clear ONIG_OPTION_SINGLELINE which is enabled on ONIG_SYNTAX_POSIX_BASIC/POSIX_EXTENDED/PERL/PERL_NG/PYTHON/JAVA + + ONIG_OPTION_DONT_CAPTURE_GROUP only named group captured. + ONIG_OPTION_CAPTURE_GROUP named and no-named group captured. + + ONIG_OPTION_IGNORECASE_IS_ASCII Limit IGNORECASE((?i)) to a range of ASCII characters + ONIG_OPTION_WORD_IS_ASCII ASCII only word (\w, \p{Word}, [[:word:]]) + ASCII only word bound (\b) + ONIG_OPTION_DIGIT_IS_ASCII ASCII only digit (\d, \p{Digit}, [[:digit:]]) + ONIG_OPTION_SPACE_IS_ASCII ASCII only space (\s, \p{Space}, [[:space:]]) + ONIG_OPTION_POSIX_IS_ASCII ASCII only POSIX properties + (includes word, digit, space) + (alnum, alpha, blank, cntrl, digit, graph, + lower, print, punct, space, upper, xdigit, + word) + ONIG_OPTION_TEXT_SEGMENT_EXTENDED_GRAPHEME_CLUSTER Extended Grapheme Cluster mode + ONIG_OPTION_TEXT_SEGMENT_WORD Word mode + + + * The ONIG_OPTION_FIND_LONGEST option doesn't work properly during backward search of onig_search(). + + + 5 enc: character encoding. + + ONIG_ENCODING_ASCII ASCII + ONIG_ENCODING_ISO_8859_1 ISO 8859-1 + ONIG_ENCODING_ISO_8859_2 ISO 8859-2 + ONIG_ENCODING_ISO_8859_3 ISO 8859-3 + ONIG_ENCODING_ISO_8859_4 ISO 8859-4 + ONIG_ENCODING_ISO_8859_5 ISO 8859-5 + ONIG_ENCODING_ISO_8859_6 ISO 8859-6 + ONIG_ENCODING_ISO_8859_7 ISO 8859-7 + ONIG_ENCODING_ISO_8859_8 ISO 8859-8 + ONIG_ENCODING_ISO_8859_9 ISO 8859-9 + ONIG_ENCODING_ISO_8859_10 ISO 8859-10 + ONIG_ENCODING_ISO_8859_11 ISO 8859-11 + ONIG_ENCODING_ISO_8859_13 ISO 8859-13 + ONIG_ENCODING_ISO_8859_14 ISO 8859-14 + ONIG_ENCODING_ISO_8859_15 ISO 8859-15 + ONIG_ENCODING_ISO_8859_16 ISO 8859-16 + ONIG_ENCODING_UTF8 UTF-8 + ONIG_ENCODING_UTF16_BE UTF-16BE + ONIG_ENCODING_UTF16_LE UTF-16LE + ONIG_ENCODING_UTF32_BE UTF-32BE + ONIG_ENCODING_UTF32_LE UTF-32LE + ONIG_ENCODING_EUC_JP EUC-JP + ONIG_ENCODING_EUC_TW EUC-TW + ONIG_ENCODING_EUC_KR EUC-KR + ONIG_ENCODING_EUC_CN EUC-CN + ONIG_ENCODING_SJIS Shift_JIS + ONIG_ENCODING_KOI8_R KOI8-R + ONIG_ENCODING_CP1251 CP1251 + ONIG_ENCODING_BIG5 Big5 + ONIG_ENCODING_GB18030 GB18030 + + or any OnigEncodingType data address defined by user. + + 6 syntax: address of pattern syntax definition. + + ONIG_SYNTAX_ASIS plain text + ONIG_SYNTAX_POSIX_BASIC POSIX Basic RE + ONIG_SYNTAX_POSIX_EXTENDED POSIX Extended RE + ONIG_SYNTAX_EMACS Emacs + ONIG_SYNTAX_GREP grep + ONIG_SYNTAX_GNU_REGEX GNU regex + ONIG_SYNTAX_JAVA Java (Sun java.util.regex) + ONIG_SYNTAX_PERL Perl + ONIG_SYNTAX_PERL_NG Perl + named group + ONIG_SYNTAX_PYTHON Python + ONIG_SYNTAX_ONIGURUMA Oniguruma + ONIG_SYNTAX_DEFAULT default (== ONIG_SYNTAX_ONIGURUMA) + onig_set_default_syntax() + + or any OnigSyntaxType data address defined by user. + + 7 err_info: address for return optional error info. + Use this value as 3rd argument of onig_error_code_to_str(). + + + +# int onig_new_without_alloc(regex_t* reg, const UChar* pattern, + const UChar* pattern_end, + OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, + OnigErrorInfo* err_info) + + Create a regex object. + reg object area is not allocated in this function. + + return value + normal: ONIG_NORMAL == 0 + error: error code < 0 + + +# int onig_new_deluxe(regex_t** reg, const UChar* pattern, const UChar* pattern_end, + OnigCompileInfo* ci, OnigErrorInfo* einfo) + + This function is deprecated, and it does not allow the case where + the encoding of pattern and target is different. + + Create a regex object. + This function is deluxe version of onig_new(). + + return value + normal: ONIG_NORMAL == 0 + error: error code < 0 + + arguments + 1 reg: return address of regex object. + 2 pattern: regex pattern string. + 3 pattern_end: terminate address of pattern. (pattern + pattern length) + 4 ci: compile time info. + + ci->num_of_elements: number of elements in ci. (current version: 5) + ci->pattern_enc: pattern string character encoding. + ci->target_enc: target string character encoding. + ci->syntax: address of pattern syntax definition. + ci->option: compile time option. + ci->case_fold_flag: character matching case fold bit flag for + ONIG_OPTION_IGNORECASE mode. + + ONIGENC_CASE_FOLD_MIN: minimum + ONIGENC_CASE_FOLD_DEFAULT: minimum + onig_set_default_case_fold_flag() + + 5 err_info: address for return optional error info. + Use this value as 3rd argument of onig_error_code_to_str(). + + + Different character encoding combination is allowed for + the following cases only. + + pattern_enc: ASCII, ISO_8859_1 + target_enc: UTF16_BE, UTF16_LE, UTF32_BE, UTF32_LE + + pattern_enc: UTF16_BE/LE + target_enc: UTF16_LE/BE + + pattern_enc: UTF32_BE/LE + target_enc: UTF32_LE/BE + + +# void onig_free(regex_t* reg) + + Free memory used by regex object. + + arguments + 1 reg: regex object. + + +# void onig_free_body(regex_t* reg) + + Free memory used by regex object. (Except reg oneself.) + + arguments + 1 reg: regex object. + + +# OnigMatchParam* onig_new_match_param() + + Allocate a OnigMatchParam object and initialize the contents by + onig_initialize_match_param(). + + +# void onig_free_match_param(OnigMatchParam* mp) + + Free memory used by a OnigMatchParam object. + + arguments + 1 mp: OnigMatchParam object + + +# void onig_initialize_match_param(OnigMatchParam* mp) + + Set match-param fields to default values. + Match-param is used in onig_match_with_param() and onig_search_with_param(). + + arguments + 1 mp: match-param pointer + + +# int onig_set_match_stack_limit_size_of_match_param(OnigMatchParam* mp, unsigned int limit) + + Set a maximum number of match-stack depth. + 0 means unlimited. + + arguments + 1 mp: match-param pointer + 2 limit: number of limit + + normal return: ONIG_NORMAL + + +# int onig_set_retry_limit_in_match_of_match_param(OnigMatchParam* mp, unsigned long limit) + + Set a retry limit count of a match process. + 0 means unlimited. + + arguments + 1 mp: match-param pointer + 2 limit: number of limit + + normal return: ONIG_NORMAL + + +# int onig_set_retry_limit_in_search_of_match_param(OnigMatchParam* mp, unsigned long limit) + + Set a retry limit count of a search process. + 0 means unlimited. + + arguments + 1 mp: match-param pointer + 2 limit: number of limit + + normal return: ONIG_NORMAL + + +# int onig_set_progress_callout_of_match_param(OnigMatchParam* mp, OnigCalloutFunc f) + + Set a function for callouts of contents in progress. + If 0 (NULL) is set, never called in progress. + + arguments + 1 mp: match-param pointer + 2 f: function + + normal return: ONIG_NORMAL + + +# int onig_set_retraction_callout_of_match_param(OnigMatchParam* mp, OnigCalloutFunc f) + + Set a function for callouts of contents in retraction (backtrack). + If 0 (NULL) is set, never called in retraction. + + arguments + 1 mp: match-param pointer + 2 f: function + + normal return: ONIG_NORMAL + + + +# int onig_search(regex_t* reg, const UChar* str, const UChar* end, const UChar* start, + const UChar* range, OnigRegion* region, OnigOptionType option) + + Search string and return search result and matching region. + Do not pass invalid byte string in the regex character encoding. + + return value + normal: match position offset (i.e. p - str >= 0) + not found: ONIG_MISMATCH (< 0) + error: error code (< 0) + + * If option ONIG_OPTION_CALLBACK_EACH_MATCH is used, + it will return ONIG_MISMATCH even if there is a match. + + arguments + 1 reg: regex object + 2 str: target string + 3 end: terminate address of target string + 4 start: search start address of target string + 5 range: search terminate address of target string + in forward search (start <= searched string < range) + in backward search (range <= searched string <= start) + 6 region: address for return group match range info (NULL is allowed) + 7 option: search time option + + ONIG_OPTION_NOTBOL Do not regard the beginning of the (str) as the beginning of the line and the beginning of the string + ONIG_OPTION_NOTEOL Do not regard the (end) as the end of a line and the end of a string + ONIG_OPTION_NOT_BEGIN_STRING Do not regard the beginning of the (str) as the beginning of a string (* fail \A) + ONIG_OPTION_NOT_END_STRING Do not regard the (end) as a string endpoint (* fail \z, \Z) + ONIG_OPTION_NOT_BEGIN_POSITION Do not regard the (start) as start position of search (* fail \G) + + ONIG_OPTION_CALLBACK_EACH_MATCH + Call back for all successful matches. + (including the case of the same matching start position) + The search does not stop when a match is found at a certain position. + The callback function to be called is set by + onig_set_callback_each_match(). + The user_data in the argument passed to the callback function is + specified by onig_set_callout_user_data_of_match_param(mp, user_data). + Therefore, if you want to specify user_data, + use onig_search_with_param() instead of onig_search(). + The user_data specified by onig_set_callout_user_data_of_match_param() + will be shared with callout. + + ONIG_OPTION_MATCH_WHOLE_STRING Try to match the whole of (str), rather than returning after the first match is found. + + +# int onig_search_with_param(regex_t* reg, const UChar* str, const UChar* end, + const UChar* start, const UChar* range, OnigRegion* region, + OnigOptionType option, OnigMatchParam* mp) + + Search string and return search result and matching region. + Do not pass invalid byte string in the regex character encoding. + + arguments + 1-7: same as onig_search() + 8 mp: match parameter values (match_stack_limit, retry_limit_in_match, retry_limit_in_search) + + +# int onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at, + OnigRegion* region, OnigOptionType option) + + Match string and return result and matching region. + Do not pass invalid byte string in the regex character encoding. + + return value + normal: match length (>= 0) + not match: ONIG_MISMATCH (< 0) + error: error code (< 0) + + * If option ONIG_OPTION_CALLBACK_EACH_MATCH is used, + it will return ONIG_MISMATCH even if there is a match. + + arguments + 1 reg: regex object + 2 str: target string + 3 end: terminate address of target string + 4 at: match address of target string + 5 region: address for return group match range info (NULL is allowed) + 6 option: search time option + + ONIG_OPTION_NOTBOL Do not regard the beginning of the (str) as the beginning of the line and the beginning of the string + ONIG_OPTION_NOTEOL Do not regard the (end) as the end of a line and the end of a string + ONIG_OPTION_NOT_BEGIN_STRING Do not regard the beginning of the (str) as the beginning of a string (* fail \A) + ONIG_OPTION_NOT_END_STRING Do not regard the (end) as a string endpoint (* fail \z, \Z) + ONIG_OPTION_NOT_BEGIN_POSITION Do not regard the (start) as start position of search (* fail \G) + ONIG_OPTION_CALLBACK_EACH_MATCH Call back for all successful matches. + ONIG_OPTION_MATCH_WHOLE_STRING Try to match the whole of (str), rather than returning after the first match is found. + +# int onig_match_with_param(regex_t* reg, const UChar* str, const UChar* end, + const UChar* at, OnigRegion* region, + OnigOptionType option, OnigMatchParam* mp) + + Match string and return result and matching region. + Do not pass invalid byte string in the regex character encoding. + + arguments + 1-6: same as onig_match() + 7 mp: match parameter values (match_stack_limit, retry_limit_in_match, retry_limit_in_search) + + +# int onig_scan(regex_t* reg, const UChar* str, const UChar* end, + OnigRegion* region, OnigOptionType option, + int (*scan_callback)(int, int, OnigRegion*, void*), + void* callback_arg) + + Scan string and callback with matching region. + Do not pass invalid byte string in the regex character encoding. + + return value + normal: number of matching times + error: error code + interruption: return value of callback function (!= 0) + + arguments + 1 reg: regex object + 2 str: target string + 3 end: terminate address of target string + 4 region: address for return group match range info (NULL is allowed) + 5 option: search time option + 6 scan_callback: callback function (defined by user) + 7 callback_arg: optional argument passed to callback + + +# int onig_regset_new(OnigRegSet** rset, int n, regex_t* regs[]) + + Create a regset object. + All regex objects must have the same character encoding. + All regex objects are prohibited from having the ONIG_OPTION_FIND_LONGEST option. + + arguments + 1 rset: return address of regset object + 2 n: number of regex in regs + 3 regs: array of regex + + return value + normal: ONIG_NORMAL == 0 + error: error code < 0 + + +# int onig_regset_add(OnigRegSet* set, regex_t* reg) + + Add a regex into regset. + The regex object must have the same character encoding with the regset. + The regex object is prohibited from having the ONIG_OPTION_FIND_LONGEST option. + + arguments + 1 set: regset object + 2 reg: regex object + + return value + normal: ONIG_NORMAL == 0 + error: error code < 0 + + +# int onig_regset_replace(OnigRegSet* set, int at, regex_t* reg) + + Replace a regex in regset with another one. + If the reg argument value is NULL, then remove at-th regex. (and indexes of other regexes are changed) + + arguments + 1 set: regset object + 2 at: index of regex (zero origin) + 3 reg: regex object + + return value + normal: ONIG_NORMAL == 0 + error: error code < 0 + + +# void onig_regset_free(OnigRegSet* set) + + Free memory used by regset object and regex objects in the regset. + If the same regex object is registered twice, the situation becomes destructive. + + arguments + 1 set: regset object + + +# int onig_regset_number_of_regex(OnigRegSet* set) + + Returns number of regex objects in the regset. + + arguments + 1 set: regset object + + +# regex_t* onig_regset_get_regex(OnigRegSet* set, int at) + + Returns the regex object corresponding to the at-th regex. + + arguments + 1 set: regset object + 2 at: index of regex array (zero origin) + + +# OnigRegion* onig_regset_get_region(OnigRegSet* set, int at) + + Returns the region object corresponding to the at-th regex. + + arguments + 1 set: regset object + 2 at: index of regex array (zero origin) + + +# int onig_regset_search(OnigRegSet* set, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegSetLead lead, OnigOptionType option, int* rmatch_pos) + + Perform a search with regset. + + return value: + normal: index of match regex (zero origin) + not found: ONIG_MISMATCH (< 0) + error: error code (< 0) + + arguments + 1 set: regset object + 2 str: target string + 3 end: terminate address of target string + 4 start: search start address of target string + 5 range: search terminate address of target string + 6 lead: outer loop element + ONIG_REGSET_POSITION_LEAD (returns most left position) + ONIG_REGSET_REGEX_LEAD (returns most left position) + ONIG_REGSET_PRIORITY_TO_REGEX_ORDER (returns first match regex) + 7 option: search time option + ONIG_OPTION_NOTBOL Do not regard the beginning of the (str) as the beginning of the line and the beginning of the string + ONIG_OPTION_NOTEOL Do not regard the (end) as the end of a line and the end of a string + ONIG_OPTION_NOT_BEGIN_STRING Do not regard the beginning of the (str) as the beginning of a string (* fail \A) + ONIG_OPTION_NOT_END_STRING Do not regard the (end) as a string endpoint (* fail \z, \Z) + ONIG_OPTION_NOT_BEGIN_POSITION Do not regard the (start) as start position of search (* fail \G) + + 8 rmatch_pos: return address of match position (match_address - str) + + * ONIG_REGSET_POSITION_LEAD and ONIG_REGSET_REGEX_LEAD return the same result. + These differences only appear in search time. + In most cases, ONIG_REGSET_POSITION_LEAD seems to be faster. + + +# int onig_regset_search_with_param(OnigRegSet* set, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegSetLead lead, OnigOptionType option, OnigMatchParam* mps[], int* rmatch_pos) + + Perform a search with regset and match-params. + + return value: + normal: index of match regex (zero origin) + not found: ONIG_MISMATCH (< 0) + error: error code (< 0) + + arguments + 1 set: regset object + 2 str: target string + 3 end: terminate address of target string + 4 start: search start address of target string + 5 range: search terminate address of target string + 6 lead: outer loop element + ONIG_REGSET_POSITION_LEAD (returns most left position) + ONIG_REGSET_REGEX_LEAD (returns most left position) + ONIG_REGSET_PRIORITY_TO_REGEX_ORDER (returns first match regex) + 7 option: search time option + ONIG_OPTION_NOTBOL Do not regard the beginning of the (str) as the beginning of the line and the beginning of the string + ONIG_OPTION_NOTEOL Do not regard the (end) as the end of a line and the end of a string + ONIG_OPTION_NOT_BEGIN_STRING Do not regard the beginning of the (str) as the beginning of a string (* fail \A) + ONIG_OPTION_NOT_END_STRING Do not regard the (end) as a string endpoint (* fail \z, \Z) + ONIG_OPTION_NOT_BEGIN_POSITION Do not regard the (start) as start position of search (* fail \G) + + 8 mps: array of match-params + 9 rmatch_pos: return address of match position (match_address - str) + + +# OnigRegion* onig_region_new(void) + + Create a region. + + +# void onig_region_free(OnigRegion* region, int free_self) + + Free memory used by region. + + arguments + 1 region: target region + 2 free_self: [1: free all, 0: free memory used in region but not self] + + +# void onig_region_copy(OnigRegion* to, OnigRegion* from) + + Copy contents of region. + + arguments + 1 to: target region + 2 from: source region + + +# void onig_region_clear(OnigRegion* region) + + Clear contents of region. + + arguments + 1 region: target region + + +# int onig_region_resize(OnigRegion* region, int n) + + Resize group range area of region. + + return value + normal: ONIG_NORMAL == 0 + error: error code < 0 + + arguments + 1 region: target region + 2 n: new size + + +# int onig_name_to_group_numbers(regex_t* reg, const UChar* name, const UChar* name_end, + int** num_list) + + Return the group number list of the name. + Named subexp is defined by (?....). + + return value + normal: number of groups for the name. + (ex. /(?..)(?..)/ ==> 2) + name not found: ONIGERR_UNDEFINED_NAME_REFERENCE + + arguments + 1 reg: regex object. + 2 name: group name. + 3 name_end: terminate address of group name. + 4 num_list: return list of group number. + + +# int onig_name_to_backref_number(regex_t* reg, const UChar* name, const UChar* name_end, + OnigRegion *region) + + Return the group number corresponding to the named backref (\k). + If two or more regions for the groups of the name are effective, + the greatest number in it is obtained. + + return value + normal: group number + error: error code < 0 + + arguments + 1 reg: regex object. + 2 name: group name. + 3 name_end: terminate address of group name. + 4 region: search/match result region. + + +# int onig_foreach_name(regex_t* reg, + int (*func)(const UChar*, const UChar*, int,int*,regex_t*,void*), + void* arg) + + Iterate function call for all names. + + return value + normal: 0 + error: return value of callback function + + arguments + 1 reg: regex object. + 2 func: callback function. + func(name, name_end, , , + reg, arg); + if func does not return 0, then iteration is stopped. + 3 arg: argument for func. + + +# int onig_number_of_names(regex_t* reg) + + Return the number of names defined in the pattern. + Multiple definitions of one name is counted as one. + + arguments + 1 reg: regex object. + + +# OnigEncoding onig_get_encoding(regex_t* reg) +# OnigOptionType onig_get_options(regex_t* reg) +# OnigSyntaxType* onig_get_syntax(regex_t* reg) + + Return a value of the regex object. + + arguments + 1 reg: regex object. + + +# OnigCaseFoldType onig_get_case_fold_flag(regex_t* reg) + + Return the case_fold_flag of the regex object. + This function is deprecated. + + arguments + 1 reg: regex object. + + +# int onig_number_of_captures(regex_t* reg) + + Return the number of capture group in the pattern. + + arguments + 1 reg: regex object. + + +# OnigCallbackEachMatchFunc onig_get_callback_each_match(void) + + Return the current callback function for ONIG_OPTION_CALLBACK_EACH_MATCH. + + +# int onig_set_callback_each_match(OnigCallbackEachMatchFunc func) + + Set the callback function for ONIG_OPTION_CALLBACK_EACH_MATCH. + If NULL is set, the callback will never be executed. + + return value + normal: 0 + + arguments + 1 func: callback function + + +# int onig_number_of_capture_histories(regex_t* reg) + + Return the number of capture history defined in the pattern. + + You can't use capture history if ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY + is disabled in the pattern syntax.(disabled in the default syntax) + + arguments + 1 reg: regex object. + + +# OnigCaptureTreeNode* onig_get_capture_tree(OnigRegion* region) + + Return the root node of capture history data tree. + + This value is undefined if matching has failed. + + arguments + 1 region: matching result. + + +# int onig_capture_tree_traverse(OnigRegion* region, int at, + int(*func)(int,int,int,int,int,void*), void* arg) + + Traverse and callback in capture history data tree. + + return value + normal: 0 + error: return value of callback function + + arguments + 1 region: match region data. + 2 at: callback position. + + ONIG_TRAVERSE_CALLBACK_AT_FIRST: callback first, then traverse children. + ONIG_TRAVERSE_CALLBACK_AT_LAST: traverse children first, then callback. + ONIG_TRAVERSE_CALLBACK_AT_BOTH: callback first, then traverse children, + and at last callback again. + + 3 func: callback function. + if func does not return 0, then traverse is stopped. + + int func(int group, int beg, int end, int level, int at, + void* arg) + + group: group number + beg: capture start position + end: capture end position + level: nest level (from 0) + at: callback position + ONIG_TRAVERSE_CALLBACK_AT_FIRST + ONIG_TRAVERSE_CALLBACK_AT_LAST + arg: optional callback argument + + 4 arg; optional callback argument. + + +# int onig_noname_group_capture_is_active(regex_t* reg) + + Return noname group capture activity. + + return value + active: 1 + inactive: 0 + + arguments + 1 reg: regex object. + + if option ONIG_OPTION_DONT_CAPTURE_GROUP == ON + --> inactive + + if the regex pattern have named group + and syntax ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP == ON + and option ONIG_OPTION_CAPTURE_GROUP == OFF + --> inactive + + else --> active + + +# UChar* onigenc_get_prev_char_head(OnigEncoding enc, const UChar* start, const UChar* s) + + Return previous character head address. + + arguments + 1 enc: character encoding + 2 start: string address + 3 s: target address of string + + +# UChar* onigenc_get_left_adjust_char_head(OnigEncoding enc, + const UChar* start, const UChar* s) + + Return left-adjusted head address of a character. + + arguments + 1 enc: character encoding + 2 start: string address + 3 s: target address of string + + +# UChar* onigenc_get_right_adjust_char_head(OnigEncoding enc, + const UChar* start, const UChar* s) + + Return right-adjusted head address of a character. + + arguments + 1 enc: character encoding + 2 start: string address + 3 s: target address of string + + +# int onigenc_strlen(OnigEncoding enc, const UChar* s, const UChar* end) + + Return number of characters in the string. + + +# int onigenc_strlen_null(OnigEncoding enc, const UChar* s) + + Return number of characters in the string. + Do not pass invalid byte string in the character encoding. + + +# int onigenc_str_bytelen_null(OnigEncoding enc, const UChar* s) + + Return number of bytes in the string. + Do not pass invalid byte string in the character encoding. + + +# int onig_set_default_syntax(OnigSyntaxType* syntax) + + Set default syntax. + + arguments + 1 syntax: address of pattern syntax definition. + + +# void onig_copy_syntax(OnigSyntaxType* to, OnigSyntaxType* from) + + Copy syntax. + + arguments + 1 to: destination address. + 2 from: source address. + + +# unsigned int onig_get_syntax_op(OnigSyntaxType* syntax) +# unsigned int onig_get_syntax_op2(OnigSyntaxType* syntax) +# unsigned int onig_get_syntax_behavior(OnigSyntaxType* syntax) +# OnigOptionType onig_get_syntax_options(OnigSyntaxType* syntax) + +# void onig_set_syntax_op(OnigSyntaxType* syntax, unsigned int op) +# void onig_set_syntax_op2(OnigSyntaxType* syntax, unsigned int op2) +# void onig_set_syntax_behavior(OnigSyntaxType* syntax, unsigned int behavior) +# void onig_set_syntax_options(OnigSyntaxType* syntax, OnigOptionType options) + + Get/Set elements of the syntax. + + arguments + 1 syntax: syntax + 2 op, op2, behavior, options: value of element. + + +# void onig_copy_encoding(OnigEncoding to, OnigEncoding from) + + Copy encoding. + + arguments + 1 to: destination address. + 2 from: source address. + + +# int onig_set_meta_char(OnigSyntaxType* syntax, unsigned int what, + OnigCodePoint code) + + Set a variable meta character to the code point value. + Except for an escape character, this meta characters specification + is not work, if ONIG_SYN_OP_VARIABLE_META_CHARACTERS is not effective + by the syntax. (Build-in syntaxes are not effective.) + + normal return: ONIG_NORMAL + + arguments + 1 syntax: target syntax + 2 what: specifies which meta character it is. + + ONIG_META_CHAR_ESCAPE + ONIG_META_CHAR_ANYCHAR + ONIG_META_CHAR_ANYTIME + ONIG_META_CHAR_ZERO_OR_ONE_TIME + ONIG_META_CHAR_ONE_OR_MORE_TIME + ONIG_META_CHAR_ANYCHAR_ANYTIME + + 3 code: meta character or ONIG_INEFFECTIVE_META_CHAR. + + +# OnigCaseFoldType onig_get_default_case_fold_flag() + + Get default case fold flag. + This function is deprecated. + + +# int onig_set_default_case_fold_flag(OnigCaseFoldType case_fold_flag) + + Set default case fold flag. + This function is deprecated. + + 1 case_fold_flag: case fold flag + + +# unsigned int onig_get_match_stack_limit_size(void) + + Return the maximum number of stack size. + (default: 0 == unlimited) + + +# int onig_set_match_stack_limit_size(unsigned int size) + + Set the maximum number of stack size. + (size = 0: unlimited) + + normal return: ONIG_NORMAL + + +# unsigned long onig_get_retry_limit_in_match(void) + + Return the limit of retry counts in a matching process. + (default: 10000000) + + normal return: current limit value + + +# unsigned long onig_get_retry_limit_in_search(void) + + Return the limit of retry counts in a search process. + 0 means unlimited. + (default: 0) + + normal return: current limit value + + +# int onig_set_retry_limit_in_match(unsigned long limit) + + Set the limit of retry counts in matching process. + 0 means unlimited. + + normal return: ONIG_NORMAL + + +# int onig_set_retry_limit_in_search(unsigned long limit) + + Set a retry limit count of a search process. + 0 means unlimited. + + normal return: ONIG_NORMAL + + +# unsigned long onig_get_subexp_call_limit_in_search(void) + + Return the limit of subexp call count. + (default: 0:unlimited) + + normal return: current limit value + + +# int onig_set_subexp_call_limit_in_search(unsigned long n) + + Set a limit count of subexp call. + + normal return: ONIG_NORMAL + + +# int onig_get_subexp_call_max_nest_level(void) + + Return the limit of subexp call nest level. + (default: 24) + + normal return: current limit value + + +# int onig_set_subexp_call_max_nest_level(int max_level) + + Set a limit level of subexp call nest level. + + normal return: ONIG_NORMAL + + +# OnigCalloutFunc onig_get_progress_callout(void) + + Get a function for callouts of contents in progress. + + +# int onig_set_progress_callout(OnigCalloutFunc f) + + Set a function for callouts of contents in progress. + If 0 (NULL) is set, never called in progress. + + normal return: ONIG_NORMAL + + +# OnigCalloutFunc onig_get_retraction_callout(void) + + Get a function for callouts of contents in retraction (backtrack). + + +# int onig_set_retraction_callout(OnigCalloutFunc f) + + Set a function for callouts of contents in retraction (backtrack). + If 0 (NULL) is set, never called in retraction. + + normal return: ONIG_NORMAL + + +# int onig_unicode_define_user_property(const char* name, OnigCodePoint* ranges)) + + Define new Unicode property. + (This function is not thread safe.) + + arguments + 1 name: property name (ASCII only. character ' ', '-', '_' are ignored.) + 2 ranges: property code point ranges + (first element is number of ranges.) + + [num-of-ranges, 1st-range-start, 1st-range-end, 2nd-range-start... ] + + * Don't destroy the ranges after having called this function. + + return value + normal: ONIG_NORMAL == 0 + error: error code < 0 + + +# unsigned int onig_get_parse_depth_limit(void) + + Return the maximum depth of parser recursion. + (default: DEFAULT_PARSE_DEPTH_LIMIT defined in regint.h. Currently 4096.) + + +# int onig_set_parse_depth_limit(unsigned int depth) + + Set the maximum depth of parser recursion. + (depth = 0: Set to the default value defined in regint.h.) + + normal return: ONIG_NORMAL + + +# int onig_end(void) + + The use of this library is finished. + + normal return: ONIG_NORMAL + + It is not allowed to use regex objects which created + before onig_end() call. + + +# const char* onig_version(void) + + Return version string. (ex. "5.0.3") + +// END diff --git a/internal/components/third_party/oniguruma/doc/API.ja b/internal/components/third_party/oniguruma/doc/API.ja new file mode 100644 index 0000000000..781ffead2a --- /dev/null +++ b/internal/components/third_party/oniguruma/doc/API.ja @@ -0,0 +1,1108 @@ +鬼車インターフェース Version 6.9.10 2024/05/26 + +#include + + +# int onig_initialize(OnigEncoding use_encodings[], int num_encodings) + + ライブラリã®åˆæœŸåŒ– + 最åˆã«å‘¼ã³å‡ºã™å¿…è¦ãŒã‚る。 + + * onig_init() ã¯å»ƒæ­¢ + + 引数 + 1 use_encodings: 使用ã™ã‚‹æ–‡å­—エンコーディングã®é…列 + 2 num_encodings: æ–‡å­—ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®æ•° + + 戻り値 + 正常終了: ONIG_NORMAL == 0 + エラー時: エラーコード < 0 + + +# int onig_error_code_to_str(UChar* err_buf, int err_code, ...) + + エラーメッセージをå–å¾—ã™ã‚‹ã€‚ + + ã“ã®é–¢æ•°ã‚’ã€onig_new()ã®çµæžœã«å¯¾ã—ã¦å‘¼ã³å‡ºã™å ´åˆã«ã¯ã€onig_new()ã®pattern引数を + メモリ解放ã™ã‚‹ã‚ˆã‚Šã‚‚å‰ã«å‘¼ã³å‡ºã•ãªã‘れã°ãªã‚‰ãªã„。 + + 戻り値 + 正常終了: エラーメッセージ文字列ã®ãƒã‚¤ãƒˆé•· + + 引数 + 1 err_buf: エラーメッセージを格ç´ã™ã‚‹é ˜åŸŸ + (å¿…è¦ãªã‚µã‚¤ã‚º: ONIG_MAX_ERROR_MESSAGE_LEN) + 2 err_code: エラーコード + 3 err_info (optional): onig_new()ã®err_info + + +# void onig_set_warn_func(OnigWarnFunc func) + + 警告通知関数をセットã™ã‚‹ã€‚ + + 警告: + '[', '-', ']' in character class without escape. + ']' in pattern without escape. + + 引数 + 1 func: 警告関数 void (*func)(char* warning_message) + + +# void onig_set_verb_warn_func(OnigWarnFunc func) + + 詳細警告通知関数をセットã™ã‚‹ã€‚ + + 詳細警告: + redundant nested repeat operator. + + 引数 + 1 func: 詳細警告関数 void (*func)(char* warning_message) + + +# int onig_new(regex_t** reg, const UChar* pattern, const UChar* pattern_end, + OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, + OnigErrorInfo* err_info) + + æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト(regex)を作æˆã™ã‚‹ã€‚ + + 戻り値 + 正常終了: ONIG_NORMAL == 0 + エラー時: エラーコード < 0 + + 引数 + 1 reg: 作æˆã•ã‚ŒãŸæ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトを返ã™ã‚¢ãƒ‰ãƒ¬ã‚¹ + 2 pattern: æ­£è¦è¡¨ç¾ãƒ‘ターン文字列 + 3 pattern_end: æ­£è¦è¡¨ç¾ãƒ‘ターン文字列ã®çµ‚端アドレス(pattern + pattern length) + 4 option: æ­£è¦è¡¨ç¾ã‚³ãƒ³ãƒ‘イル時オプション + + ONIG_OPTION_NONE オプションãªã— + ONIG_OPTION_SINGLELINE '^' -> '\A', '$' -> '\Z' + ONIG_OPTION_MULTILINE '.'ãŒæ”¹è¡Œã«ãƒžãƒƒãƒã™ã‚‹ + ONIG_OPTION_IGNORECASE 曖昧マッムオン + ONIG_OPTION_EXTEND ãƒ‘ã‚¿ãƒ¼ãƒ³æ‹¡å¼µå½¢å¼ + ONIG_OPTION_FIND_LONGEST 最長マッム+ ONIG_OPTION_FIND_NOT_EMPTY 空マッãƒã‚’無視 + ONIG_OPTION_NEGATE_SINGLELINE ONIG_SYNTAX_POSIX_BASIC/POSIX_EXTENDED/PERL/PERL_NG/PYTHON/JAVAã§ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åйãªONIG_OPTION_SINGLELINEをクリアã™ã‚‹ã€‚ + + ONIG_OPTION_DONT_CAPTURE_GROUP åå‰ä»˜ãæ•ç²å¼é›†åˆã®ã¿æ•ç² + ONIG_OPTION_CAPTURE_GROUP åå‰ç„¡ã—æ•ç²å¼é›†åˆã‚‚æ•ç² + ONIG_OPTION_IGNORECASE_IS_ASCII IGNORECASE((?i))ã‚’ASCII文字ã®ç¯„囲ã«åˆ¶é™ã™ã‚‹ + ONIG_OPTION_WORD_IS_ASCII wordãŒASCIIã®ã¿ (\w, \p{Word}, [[:word:]]) + word boundãŒASCIIã®ã¿ (\b) + ONIG_OPTION_DIGIT_IS_ASCII digitãŒASCIIã®ã¿ (\d, \p{Digit}, [[:digit:]]) + ONIG_OPTION_SPACE_IS_ASCII spaceãŒASCIIã®ã¿ (\s, \p{Space}, [[:space:]]) + ONIG_OPTION_POSIX_IS_ASCII POSIXプロパティãŒASCIIã®ã¿ + (word, digit, spaceã‚’å…¨ã¦å«ã‚“ã§ã„ã‚‹) + (alnum, alpha, blank, cntrl, digit, graph, + lower, print, punct, space, upper, xdigit, + word) + ONIG_OPTION_TEXT_SEGMENT_EXTENDED_GRAPHEME_CLUSTER 拡張書記素房モード + ONIG_OPTION_TEXT_SEGMENT_WORD å˜èªžãƒ¢ãƒ¼ãƒ‰ + + * ONIG_OPTION_FIND_LONGEST ã¯onig_search()ã®å¾Œæ–¹æŽ¢ç´¢ã§ã¯æ­£ã—ã動作ã—ãªã„ + + 5 enc: 文字エンコーディング + + ONIG_ENCODING_ASCII ASCII + ONIG_ENCODING_ISO_8859_1 ISO 8859-1 + ONIG_ENCODING_ISO_8859_2 ISO 8859-2 + ONIG_ENCODING_ISO_8859_3 ISO 8859-3 + ONIG_ENCODING_ISO_8859_4 ISO 8859-4 + ONIG_ENCODING_ISO_8859_5 ISO 8859-5 + ONIG_ENCODING_ISO_8859_6 ISO 8859-6 + ONIG_ENCODING_ISO_8859_7 ISO 8859-7 + ONIG_ENCODING_ISO_8859_8 ISO 8859-8 + ONIG_ENCODING_ISO_8859_9 ISO 8859-9 + ONIG_ENCODING_ISO_8859_10 ISO 8859-10 + ONIG_ENCODING_ISO_8859_11 ISO 8859-11 + ONIG_ENCODING_ISO_8859_13 ISO 8859-13 + ONIG_ENCODING_ISO_8859_14 ISO 8859-14 + ONIG_ENCODING_ISO_8859_15 ISO 8859-15 + ONIG_ENCODING_ISO_8859_16 ISO 8859-16 + ONIG_ENCODING_UTF8 UTF-8 + ONIG_ENCODING_UTF16_BE UTF-16BE + ONIG_ENCODING_UTF16_LE UTF-16LE + ONIG_ENCODING_UTF32_BE UTF-32BE + ONIG_ENCODING_UTF32_LE UTF-32LE + ONIG_ENCODING_EUC_JP EUC-JP + ONIG_ENCODING_EUC_TW EUC-TW + ONIG_ENCODING_EUC_KR EUC-KR + ONIG_ENCODING_EUC_CN EUC-CN + ONIG_ENCODING_SJIS Shift_JIS + ONIG_ENCODING_KOI8_R KOI8-R + ONIG_ENCODING_CP1251 CP1251 + ONIG_ENCODING_BIG5 Big5 + ONIG_ENCODING_GB18030 GB18030 + + ã¾ãŸã¯ã€ãƒ¦ãƒ¼ã‚¶ãŒå®šç¾©ã—ãŸOnigEncodingTypeデータã®ã‚¢ãƒ‰ãƒ¬ã‚¹ + + 6 syntax: æ­£è¦è¡¨ç¾ãƒ‘ターン文法定義 + + ONIG_SYNTAX_ASIS plain text + ONIG_SYNTAX_POSIX_BASIC POSIX Basic RE + ONIG_SYNTAX_POSIX_EXTENDED POSIX Extended RE + ONIG_SYNTAX_EMACS Emacs + ONIG_SYNTAX_GREP grep + ONIG_SYNTAX_GNU_REGEX GNU regex + ONIG_SYNTAX_JAVA Java (Sun java.util.regex) + ONIG_SYNTAX_PERL Perl + ONIG_SYNTAX_PERL_NG Perl + åå‰ä»˜ãæ•ç²å¼é›†åˆ + ONIG_SYNTAX_PYTHON Python + ONIG_SYNTAX_ONIGURUMA Oniguruma + ONIG_SYNTAX_DEFAULT default (== ONIG_SYNTAX_ONIGURUMA) + onig_set_default_syntax() + + ã¾ãŸã¯ã€ãƒ¦ãƒ¼ã‚¶ãŒå®šç¾©ã—ãŸOnigSyntaxTypeデータã®ã‚¢ãƒ‰ãƒ¬ã‚¹ + + 7 err_info: エラー情報を返ã™ãŸã‚ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ + onig_error_code_to_str()ã®ä¸‰ç•ªç›®ã®å¼•æ•°ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ + + + +# int onig_new_without_alloc(regex_t* reg, const UChar* pattern, + const UChar* pattern_end, + OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, + OnigErrorInfo* err_info) + + æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト(regex)を作æˆã™ã‚‹ã€‚ + regã®é ˜åŸŸã‚’内部ã§å‰²ã‚Šå½“ã¦ãªã„。 + + 戻り値 + 正常終了: ONIG_NORMAL == 0 + エラー時: エラーコード < 0 + + + +# int onig_new_deluxe(regex_t** reg, const UChar* pattern, const UChar* pattern_end, + OnigCompileInfo* ci, OnigErrorInfo* einfo) + + ã“ã®é–¢æ•°ã¯å»ƒæ­¢(使用ä¸å¯)。 + パターンã¨å¯¾è±¡æ–‡å­—åˆ—ã®æ–‡å­—エンコーディングãŒç•°ãªã‚‹å ´åˆã‚’許ã•ãªããªã£ãŸã€‚ + + æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト(regex)を作æˆã™ã‚‹ã€‚ + ã“ã®é–¢æ•°ã¯ã€onig_new()ã®ãƒ‡ãƒ©ãƒƒã‚¯ã‚¹ç‰ˆã€‚ + + 戻り値 + 正常終了: ONIG_NORMAL == 0 + エラー時: エラーコード < 0 + + 引数 + 1 reg: 作æˆã•ã‚ŒãŸæ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトを返ã™ã‚¢ãƒ‰ãƒ¬ã‚¹ + 2 pattern: æ­£è¦è¡¨ç¾ãƒ‘ターン文字列 + 3 pattern_end: æ­£è¦è¡¨ç¾ãƒ‘ターン文字列ã®çµ‚端アドレス(pattern + pattern length) + 4 ci: コンパイル情報 + + ci->num_of_elements: ciã®è¦ç´ æ•° (ç¾åœ¨ã®ç‰ˆã§ã¯: 5) + ci->pattern_enc: ãƒ‘ã‚¿ãƒ¼ãƒ³æ–‡å­—åˆ—ã®æ–‡å­—エンコーディング + ci->target_enc: å¯¾è±¡æ–‡å­—åˆ—ã®æ–‡å­—エンコーディング + ci->syntax: æ­£è¦è¡¨ç¾ãƒ‘ターン文法定義 + ci->option: æ­£è¦è¡¨ç¾ã‚³ãƒ³ãƒ‘イル時オプション + ci->case_fold_flag: ONIG_OPTION_IGNORECASEモードã§ã® + æ–‡å­—æ›–æ˜§ãƒžãƒƒãƒæŒ‡å®šãƒ“ットフラグ + + ONIGENC_CASE_FOLD_MIN: æœ€å° + ONIGENC_CASE_FOLD_DEFAULT: æœ€å° + onig_set_default_case_fold_flag() + + 5 err_info: エラー情報を返ã™ãŸã‚ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ + onig_error_code_to_str()ã®ä¸‰ç•ªç›®ã®å¼•æ•°ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ + + + ç•°ãªã‚‹æ–‡å­—エンコーディングã®çµ„ã¿åˆã‚ã›ã¯ã€ä»¥ä¸‹ã®å ´åˆã«ã®ã¿è¨±ã•れる。 + + pattern_enc: ASCII, ISO_8859_1 + target_enc: UTF16_BE, UTF16_LE, UTF32_BE, UTF32_LE + + pattern_enc: UTF16_BE/LE + target_enc: UTF16_LE/BE + + pattern_enc: UTF32_BE/LE + target_enc: UTF32_LE/BE + + +# void onig_free(regex_t* reg) + + æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã®ãƒ¡ãƒ¢ãƒªã‚’解放ã™ã‚‹ã€‚ + + 引数 + 1 reg: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + + +# void onig_free_body(regex_t* reg) + + æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã®ãƒ¡ãƒ¢ãƒªã‚’解放ã™ã‚‹ã€‚(reg自身ã®é ˜åŸŸã‚’除ã„ã¦) + + 引数 + 1 reg: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + + +# OnigMatchParam* onig_new_match_param() + + OnigMatchParamオブジェクトを生æˆã—ã€onig_initialize_match_param()を使用ã—㦠+ ä¸­èº«ã‚’åˆæœŸåŒ–ã™ã‚‹ã€‚ + + +# void onig_free_match_param(OnigMatchParam* mp) + + OnigMatchParamオブジェクトã§ä½¿ç”¨ã—ã¦ã„るメモリを開放ã™ã‚‹ã€‚ + + 引数 + 1 mp: OnigMatchParamオブジェクト + + +# void onig_initialize_match_param(OnigMatchParam* mp) + + マッãƒãƒ‘ラメタ構造体ã«ãƒ‡ãƒ•ォルト値をセットã™ã‚‹ã€‚ + マッãƒãƒ‘ラメタã¯ã€onig_match_with_param(), onig_search_with_param()ã§ + 使用ã•れる。 + + 引数 + 1 mp: マッãƒãƒ‘ラメタオブジェクトアドレス + + +# int onig_set_match_stack_limit_size_of_match_param(OnigMatchParam* mp, unsigned int limit) + + マッãƒã‚¹ã‚¿ãƒƒã‚¯ã®æœ€å¤§æ·±ã•をセットã™ã‚‹ã€‚ + 0ã¯ã€ç„¡åˆ¶é™ã‚’表ã™ã€‚ + + 引数 + 1 mp: マッãƒãƒ‘ラメタオブジェクトアドレス + 2 limit: åˆ¶é™æ•° + + 正常終了戻り値: ONIG_NORMAL + + +# int onig_set_retry_limit_in_match_of_match_param(OnigMatchParam* mp, unsigned long limit) + + 一回ã®ãƒžãƒƒãƒã§ã®ãƒªãƒˆãƒ©ã‚¤æ•°ã®åˆ¶é™å€¤ã‚’セットã™ã‚‹ã€‚ + ï¼ã¯ç„¡åˆ¶é™ã‚’æ„味ã™ã‚‹ã€‚ + + 引数 + 1 mp: マッãƒãƒ‘ラメタオブジェクトアドレス + 2 limit: 制é™å›žæ•° + + 正常終了戻り値: ONIG_NORMAL + + +# int onig_set_retry_limit_in_search_of_match_param(OnigMatchParam* mp, unsigned long limit) + + ä¸€å›žã®æ¤œç´¢ã§ã®ãƒªãƒˆãƒ©ã‚¤æ•°ã®åˆ¶é™å€¤ã‚’セットã™ã‚‹ã€‚ + ï¼ã¯ç„¡åˆ¶é™ã‚’æ„味ã™ã‚‹ã€‚ + + 引数 + 1 mp: マッãƒãƒ‘ラメタオブジェクトアドレス + 2 limit: 制é™å›žæ•° + + 正常終了戻り値: ONIG_NORMAL + + +# int onig_set_progress_callout_of_match_param(OnigMatchParam* mp, OnigCalloutFunc f) + + å‰é€²æ™‚ã®å†…容ã®å‘¼ã³å‡ºã—(callouts)ã§å‘¼ã³å‡ºã•れる関数をセットã™ã‚‹ã€‚ + ã‚‚ã—ï¼(NULL)ãŒã‚»ãƒƒãƒˆã•れるã¨ã€å‰é€²æ™‚ã«å‘¼ã³å‡ºã—ã¯èµ·ã“らãªã„。 + + 引数 + 1 mp: マッãƒãƒ‘ラメタオブジェクトアドレス + 2 f: 呼ã³å‡ºã•れる関数 + + 正常終了戻り値: ONIG_NORMAL + + +# int onig_set_retraction_callout_of_match_param(OnigMatchParam* mp, OnigCalloutFunc f) + + 後退時ã®å†…容ã®å‘¼ã³å‡ºã—(callouts)ã§å‘¼ã³å‡ºã•れる関数をセットã™ã‚‹ã€‚ + ã‚‚ã—ï¼(NULL)ãŒã‚»ãƒƒãƒˆã•れるã¨ã€å¾Œé€€æ™‚ã«å‘¼ã³å‡ºã—ã¯èµ·ã“らãªã„。 + + 引数 + 1 mp: マッãƒãƒ‘ラメタオブジェクトアドレス + 2 f: 呼ã³å‡ºã•れる関数 + + 正常終了戻り値: ONIG_NORMAL + + + +# int onig_search(regex_t* reg, const UChar* str, const UChar* end, const UChar* start, + const UChar* range, OnigRegion* region, OnigOptionType option) + + æ­£è¦è¡¨ç¾ã§æ–‡å­—列を検索ã—ã€æ¤œç´¢çµæžœã¨ãƒžãƒƒãƒé ˜åŸŸã‚’è¿”ã™ã€‚ + æ­£è¦è¡¨ç¾ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ–‡å­—エンコーディングã§ã€æ¤œç´¢æ–‡å­—列ã¨ã—ã¦ä¸æ­£ãªæ–‡å­—列を渡ã—ã¦ã¯ã„ã‘ãªã„。 + + 戻り値 + 正常終了: マッãƒä½ç½® (p - str >= 0) + 検索失敗: ONIG_MISMATCH (< 0) + + * è‹¥ã—ONIG_OPTION_CALLBACK_EACH_MATCHãŒä½¿ç”¨ã•れるã¨ã€ãƒžãƒƒãƒã™ã‚‹ã‚‚ã®ãŒã‚ã£ã¦ã‚‚ONIG_MISMATCHãŒè¿”ã•れる。 + + 引数 + 1 reg: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + 2 str: 検索対象文字列 + 3 end: 検索対象文字列ã®çµ‚端アドレス + 4 start: æ¤œç´¢å¯¾è±¡æ–‡å­—åˆ—ã®æ¤œç´¢å…ˆé ­ä½ç½®ã‚¢ãƒ‰ãƒ¬ã‚¹ + 5 range: æ¤œç´¢å¯¾è±¡æ–‡å­—åˆ—ã®æ¤œç´¢çµ‚了ä½ç½®ã‚¢ãƒ‰ãƒ¬ã‚¹ + 剿–¹æŽ¢ç´¢ (start <= 探索ã•れる文字列 < range) + 後方探索 (range <= 探索ã•れる文字列 <= start) + 6 region: マッãƒé ˜åŸŸæƒ…å ±(region) (NULLも許ã•れる) + 7 option: 検索時オプション + + ONIG_OPTION_NOTBOL strã®å…ˆé ­ã‚’行頭ãŠã‚ˆã³æ–‡å­—列先頭ã¨çœ‹åšã•ãªã„ + ONIG_OPTION_NOTEOL endを行末ãŠã‚ˆã³æ–‡å­—列終端ã¨çœ‹åšã•ãªã„ + ONIG_OPTION_NOT_BEGIN_STRING strã®å…ˆé ­ã‚’文字列ã®å…ˆé ­ã¨çœ‹åšã•ãªã„ (\A 失敗) + ONIG_OPTION_NOT_END_STRING endを文字列終端ã¨çœ‹åšã•ãªã„ (\z, \Z 失敗) + ONIG_OPTION_NOT_BEGIN_POSITION startを検索開始ä½ç½®ã¨çœ‹åšã•ãªã„ (\G 失敗) + + ONIG_OPTION_CALLBACK_EACH_MATCH + å…¨ã¦ã®ãƒžãƒƒãƒæˆåŠŸã«å¯¾ã—ã¦ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯é–¢æ•°ãŒå‘¼ã³å‡ºã•れる。 + (マッãƒé–‹å§‹ä½ç½®ãŒåŒã˜ã‚‚ã®ã‚‚å«ã‚ã¦) + ã‚ã‚‹ä½ç½®ã§ãƒžãƒƒãƒã™ã‚‹ã‚‚ã®ãŒè¦‹ã¤ã‹ã£ã¦ã‚‚æŽ¢ç´¢ãŒæ­¢ã¾ã‚‹ã“ã¨ã¯ãªã„。 + 呼ã³å‡ºã•れるコールãƒãƒƒã‚¯é–¢æ•°ã¯ã€onig_set_callback_each_match()ã§ä¸Žãˆã‚‹ã€‚ + コールãƒãƒƒã‚¯é–¢æ•°ã«æ¸¡ã•れる引数ã®ä¸­ã®user_dataã¯ã€ + onig_set_callout_user_data_of_match_param(mp, user_data)ã§æŒ‡å®šã™ã‚‹ã€‚ + ã“ã®ãŸã‚ã€user_dataを指定ã—ãŸã„å ´åˆã«ã¯ã€onig_search()ã§ã¯ãªã〠+ onig_search_with_param()を使用ã™ã‚‹ã“ã¨ã«ãªã‚‹ã€‚ + onig_set_callout_user_data_of_match_param()ã§æŒ‡å®šã™ã‚‹user_dataã¯ã€ + calloutã§ä½¿ç”¨ã•れるuser_dataã¨å…±ç”¨ã•れる。 + + ONIG_OPTION_MATCH_WHOLE_STRING マッãƒã—ãŸçµ‚端ã®ä½ç½®ãŒendã«ãªã‚‹ã“ã¨ã‚’è¦æ±‚ + + +# int onig_search_with_param(regex_t* reg, const UChar* str, const UChar* end, + const UChar* start, const UChar* range, OnigRegion* region, + OnigOptionType option, OnigMatchParam* mp) + + æ­£è¦è¡¨ç¾ã§æ–‡å­—列を検索ã—ã€æ¤œç´¢çµæžœã¨ãƒžãƒƒãƒé ˜åŸŸã‚’è¿”ã™ã€‚ + æ­£è¦è¡¨ç¾ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ–‡å­—エンコーディングã§ã€æ¤œç´¢æ–‡å­—列ã¨ã—ã¦ä¸æ­£ãªæ–‡å­—列を渡ã—ã¦ã¯ã„ã‘ãªã„。 + + 引数 + 1-7: onig_search()ã¨åŒã˜ + 8 mp: マッãƒãƒ‘ラメタ値 (match_stack_limit, retry_limit_in_match, retry_limit_in_search) + + +# int onig_match(regex_t* reg, const UChar* str, const UChar* end, + const UChar* at, OnigRegion* region, OnigOptionType option) + + æ–‡å­—åˆ—ã®æŒ‡å®šä½ç½®ã§ãƒžãƒƒãƒãƒ³ã‚°ã‚’行ã„ã€çµæžœã¨ãƒžãƒƒãƒé ˜åŸŸã‚’è¿”ã™ã€‚ + æ­£è¦è¡¨ç¾ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ–‡å­—エンコーディングã§ã€æ¤œç´¢æ–‡å­—列ã¨ã—ã¦ä¸æ­£ãªæ–‡å­—列を渡ã—ã¦ã¯ã„ã‘ãªã„。 + + 戻り値 + 正常終了: マッãƒã—ãŸãƒã‚¤ãƒˆé•· (>= 0) + not match: ONIG_MISMATCH ( < 0) + + * è‹¥ã—ONIG_OPTION_CALLBACK_EACH_MATCHãŒä½¿ç”¨ã•れるã¨ã€ãƒžãƒƒãƒã™ã‚‹ã‚‚ã®ãŒã‚ã£ã¦ã‚‚ONIG_MISMATCHãŒè¿”ã•れる。 + + 引数 + 1 reg: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + 2 str: 検索対象文字列 + 3 end: 検索対象文字列ã®çµ‚端アドレス + 4 at: æ¤œç´¢å¯¾è±¡æ–‡å­—åˆ—ã®æ¤œç´¢ã‚¢ãƒ‰ãƒ¬ã‚¹ + 5 region: マッãƒé ˜åŸŸæƒ…å ±(region) (NULLも許ã•れる) + 6 option: 検索時オプション + + ONIG_OPTION_NOTBOL strã®å…ˆé ­ã‚’行頭ãŠã‚ˆã³æ–‡å­—列先頭ã¨çœ‹åšã•ãªã„ + ONIG_OPTION_NOTEOL endを行末ãŠã‚ˆã³æ–‡å­—列終端ã¨çœ‹åšã•ãªã„ + ONIG_OPTION_NOT_BEGIN_STRING strã®å…ˆé ­ã‚’文字列ã®å…ˆé ­ã¨çœ‹åšã•ãªã„ (\A 失敗) + ONIG_OPTION_NOT_END_STRING endを文字列終端ã¨çœ‹åšã•ãªã„ (\z, \Z 失敗) + ONIG_OPTION_NOT_BEGIN_POSITION startを検索開始ä½ç½®ã¨çœ‹åšã•ãªã„ (\G 失敗) + ONIG_OPTION_CALLBACK_EACH_MATCH å…¨ã¦ã®ãƒžãƒƒãƒæˆåŠŸã«å¯¾ã—ã¦ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯é–¢æ•°ãŒå‘¼ã³å‡ºã•れる。 + ONIG_OPTION_MATCH_WHOLE_STRING マッãƒã—ãŸçµ‚端ã®ä½ç½®ãŒendã«ãªã‚‹ã“ã¨ã‚’è¦æ±‚ + + +# int onig_match_with_param(regex_t* reg, const UChar* str, const UChar* end, + const UChar* at, OnigRegion* region, + OnigOptionType option, OnigMatchParam* mp) + + æ–‡å­—åˆ—ã®æŒ‡å®šä½ç½®ã§ãƒžãƒƒãƒãƒ³ã‚°ã‚’行ã„ã€çµæžœã¨ãƒžãƒƒãƒé ˜åŸŸã‚’è¿”ã™ã€‚ + æ­£è¦è¡¨ç¾ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ–‡å­—エンコーディングã§ã€æ¤œç´¢æ–‡å­—列ã¨ã—ã¦ä¸æ­£ãªæ–‡å­—列を渡ã—ã¦ã¯ã„ã‘ãªã„。 + + 引数 + 1-6: onig_match()ã¨åŒã˜ + 7 mp: マッãƒãƒ‘ラメタ値 (match_stack_limit, retry_limit_in_match, retry_limit_in_search) + + +# int onig_scan(regex_t* reg, const UChar* str, const UChar* end, + OnigRegion* region, OnigOptionType option, + int (*scan_callback)(int, int, OnigRegion*, void*), + void* callback_arg) + + æ­£è¦è¡¨ç¾ã§æ–‡å­—列をスキャンã—ã¦ã€ãƒžãƒƒãƒãƒ³ã‚°ã™ã‚‹æ¯Žã«ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯é–¢æ•°ã‚’呼ã³å‡ºã™ã€‚ + æ­£è¦è¡¨ç¾ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ–‡å­—エンコーディングã§ã€æ¤œç´¢æ–‡å­—列ã¨ã—ã¦ä¸æ­£ãªæ–‡å­—列を渡ã—ã¦ã¯ã„ã‘ãªã„。 + + 戻り値 + 正常終了: マッãƒå›žæ•° (0回もå«ã‚ã‚‹) + エラー: エラーコード (< 0) + 中断: コールãƒãƒƒã‚¯é–¢æ•°ãŒï¼ä»¥å¤–ã®æˆ»ã‚Šå€¤ã‚’è¿”ã—ãŸã¨ãã€ãã®å€¤ã‚’戻り値ã¨ã—ã¦ä¸­æ–­ + + 引数 + 1 reg: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + 2 str: 検索対象文字列 + 3 end: 検索対象文字列ã®çµ‚端アドレス + 4 region: マッãƒé ˜åŸŸæƒ…å ±(region) (NULLも許ã•れる) + 5 option: 検索時オプション + 6 scan_callback: コールãƒãƒƒã‚¯é–¢æ•° + 7 callback_arg: コールãƒãƒƒã‚¯é–¢æ•°ã«æ¸¡ã•れる付加引数値 + + +# int onig_regset_new(OnigRegSet** rset, int n, regex_t* regs[]) + + regsetオブジェクトを生æˆã™ã‚‹ã€‚ + å…¨ã¦ã®æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã¯ã€åŒã˜æ–‡å­—エンコーディングã§ãªã‘れã°ãªã‚‰ãªã„。 + å…¨ã¦ã®æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã¯ã€ONIG_OPTION_FIND_LONGESTオプションã§ã‚³ãƒ³ãƒ‘イルã•れã¦ã„ã¦ã¯ãªã‚‰ãªã„。 + + 引数 + 1 rset: regsetオブジェクトを返ã™ãŸã‚ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ + 2 n: æ­£è¦è¡¨ç¾ã®å€‹æ•° + 3 regs: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã®é…列 + + 戻り値 + 正常終了: ONIG_NORMAL == 0 + エラー時: エラーコード < 0 + + +# int onig_regset_add(OnigRegSet* set, regex_t* reg) + + regsetã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æ­£è¦è¡¨ç¾ã‚’追加ã™ã‚‹ã€‚ + æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã¯ã€regsetã¨åŒã˜æ–‡å­—エンコーディングã§ãªã‘れã°ãªã‚‰ãªã„。 + æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã¯ã€ONIG_OPTION_FIND_LONGESTオプションã§ã‚³ãƒ³ãƒ‘イルã•れã¦ã„ã¦ã¯ãªã‚‰ãªã„。 + + 引数 + 1 set: regsetオブジェクト + 2 reg: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + + 戻り値 + 正常終了: ONIG_NORMAL == 0 + エラー時: エラーコード < 0 + + +# int onig_regset_replace(OnigRegSet* set, int at, regex_t* reg) + + regsetã®ä¸­ã®ä¸€å€‹ã®æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトを別ã®ã‚‚ã®ã«å¤‰æ›´ã™ã‚‹ã€‚ + è‹¥ã—reg引数ã®å€¤ãŒNULLã§ã‚れã°ã€atç•ªç›®ã®æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトを外ã™ã€‚(ãã—ã¦ã€ä»¥é™ã®æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯å¤‰åŒ–ã™ã‚‹) + + 引数 + 1 set: regsetオブジェクト + 2 at: 変更ã™ã‚‹å ´æ‰€ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ + 3 reg: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + + 戻り値 + 正常終了: ONIG_NORMAL == 0 + エラー時: エラーコード < 0 + + +# void onig_regset_free(OnigRegSet* set) + + regsetオブジェクトã¨ãã®ä¸­ã®æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã®ä½¿ç”¨ãƒ¡ãƒ¢ãƒªã‚’開放ã™ã‚‹ã€‚ + è‹¥ã—ã€åŒä¸€ã®æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトをé‡è¤‡ã—ã¦ç™»éŒ²ã—ã¦ã„れã°ã€ç ´å£Šçš„ãªçжæ³ã«ãªã‚‹ã€‚ + + 引数 + 1 set: regsetオブジェクト + + +# int onig_regset_number_of_regex(OnigRegSet* set) + + regsetã®ä¸­ã®æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã®å€‹æ•°ã‚’è¿”ã™ã€‚ + + 引数 + 1 set: regsetオブジェクト + + +# regex_t* onig_regset_get_regex(OnigRegSet* set, int at) + + regsetã®atç•ªç›®ã®æ­£è¦è¡¨ç¾ã‚’è¿”ã™ã€‚ + + 引数 + 1 set: regsetオブジェクト + 2 at: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ (ゼロ開始) + + +# OnigRegion* onig_regset_get_region(OnigRegSet* set, int at) + + regsetã®atç•ªç›®ã®æ­£è¦è¡¨ç¾ã«å¯¾å¿œã™ã‚‹é ˜åŸŸã‚’è¿”ã™ã€‚ + + 引数 + 1 set: regsetオブジェクト + 2 at: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ (ゼロ開始) + + +# int onig_regset_search(OnigRegSet* set, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegSetLead lead, OnigOptionType option, int* rmatch_pos) + + regsetã«ã‚ˆã‚‹æ¤œç´¢ã‚’実行ã™ã‚‹ã€‚ + + 戻り値 + 検索æˆåŠŸ: マッãƒã—ãŸæ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ (ゼロ開始) + 検索失敗: ONIG_MISMATCH (< 0) + エラー: エラーコード (< 0) + + 引数 + 1 set: regsetオブジェクト + 2 str: 検索対象文字列 + 3 end: 検索対象文字列ã®çµ‚端アドレス + 4 start: æ¤œç´¢å¯¾è±¡æ–‡å­—åˆ—ã®æ¤œç´¢å…ˆé ­ä½ç½®ã‚¢ãƒ‰ãƒ¬ã‚¹ + 5 range: æ¤œç´¢å¯¾è±¡æ–‡å­—åˆ—ã®æ¤œç´¢çµ‚了ä½ç½®ã‚¢ãƒ‰ãƒ¬ã‚¹ + (start <= 探索ã•れる文字列 < range) + 6 lead: 外å´ã®ãƒ«ãƒ¼ãƒ—è¦ç´  + ONIG_REGSET_POSITION_LEAD (最左ä½ç½®ã§ãƒžãƒƒãƒã—ãŸçµæžœã‚’è¿”ã™) + ONIG_REGSET_REGEX_LEAD (最左ä½ç½®ã§ãƒžãƒƒãƒã—ãŸçµæžœã‚’è¿”ã™) + ONIG_REGSET_PRIORITY_TO_REGEX_ORDER (最åˆã«ãƒžãƒƒãƒã—ãŸæ­£è¦è¡¨ç¾ã®çµæžœã‚’è¿”ã™) + 7 option: 検索時オプション + ONIG_OPTION_NOTBOL strã®å…ˆé ­ã‚’行頭ãŠã‚ˆã³æ–‡å­—列先頭ã¨çœ‹åšã•ãªã„ + ONIG_OPTION_NOTEOL endを行末ãŠã‚ˆã³æ–‡å­—列終端ã¨çœ‹åšã•ãªã„ + ONIG_OPTION_NOT_BEGIN_STRING strã®å…ˆé ­ã‚’文字列ã®å…ˆé ­ã¨çœ‹åšã•ãªã„ (\A 失敗) + ONIG_OPTION_NOT_END_STRING endを文字列終端ã¨çœ‹åšã•ãªã„ (\z, \Z 失敗) + ONIG_OPTION_NOT_BEGIN_POSITION startを検索開始ä½ç½®ã¨çœ‹åšã•ãªã„ (\G 失敗) + 8 rmatch_pos: マッãƒã—ãŸä½ç½®ã‚’è¿”ã™ãŸã‚ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ (match_address - str) + + * ONIG_REGSET_POSITION_LEADã¨ONIG_REGSET_REGEX_LEADã¯åŒã˜çµæžœã‚’è¿”ã™ã€‚ + ã“れらã®é•ã„ã¯æ¤œç´¢æ™‚é–“ã«ã—ã‹ç¾ã‚Œãªã„。 + ã»ã¨ã‚“ã©ã®å ´åˆã€ONIG_REGSET_POSITION_LEADã®ã»ã†ãŒé€Ÿã„ã¨æ€ã‚れる。 + + +# int onig_regset_search_with_param(OnigRegSet* set, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegSetLead lead, OnigOptionType option, OnigMatchParam* mps[], int* rmatch_pos) + + regsetã¨OnigMatchParamオブジェクトã«ã‚ˆã‚‹æ¤œç´¢ã‚’実行ã™ã‚‹ã€‚ + + 戻り値 + 検索æˆåŠŸ: マッãƒã—ãŸæ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ (ゼロ開始) + 検索失敗: ONIG_MISMATCH (< 0) + エラー: エラーコード (< 0) + + 引数 + 1 set: regsetオブジェクト + 2 str: 検索対象文字列 + 3 end: 検索対象文字列ã®çµ‚端アドレス + 4 start: æ¤œç´¢å¯¾è±¡æ–‡å­—åˆ—ã®æ¤œç´¢å…ˆé ­ä½ç½®ã‚¢ãƒ‰ãƒ¬ã‚¹ + 5 range: æ¤œç´¢å¯¾è±¡æ–‡å­—åˆ—ã®æ¤œç´¢çµ‚了ä½ç½®ã‚¢ãƒ‰ãƒ¬ã‚¹ + (start <= 探索ã•れる文字列 < range) + 6 lead: 外å´ã®ãƒ«ãƒ¼ãƒ—è¦ç´  + ONIG_REGSET_POSITION_LEAD (最左ä½ç½®ã§ãƒžãƒƒãƒã—ãŸçµæžœã‚’è¿”ã™) + ONIG_REGSET_REGEX_LEAD (最左ä½ç½®ã§ãƒžãƒƒãƒã—ãŸçµæžœã‚’è¿”ã™) + ONIG_REGSET_PRIORITY_TO_REGEX_ORDER (最åˆã«ãƒžãƒƒãƒã—ãŸæ­£è¦è¡¨ç¾ã®çµæžœã‚’è¿”ã™) + 7 option: 検索時オプション + ONIG_OPTION_NOTBOL strã®å…ˆé ­ã‚’行頭ãŠã‚ˆã³æ–‡å­—列先頭ã¨çœ‹åšã•ãªã„ + ONIG_OPTION_NOTEOL endを行末ãŠã‚ˆã³æ–‡å­—列終端ã¨çœ‹åšã•ãªã„ + ONIG_OPTION_NOT_BEGIN_STRING strã®å…ˆé ­ã‚’文字列ã®å…ˆé ­ã¨çœ‹åšã•ãªã„ (\A 失敗) + ONIG_OPTION_NOT_END_STRING endを文字列終端ã¨çœ‹åšã•ãªã„ (\z, \Z 失敗) + ONIG_OPTION_NOT_BEGIN_POSITION startを検索開始ä½ç½®ã¨çœ‹åšã•ãªã„ (\G 失敗) + 8 mps: OnigMatchParamオブジェクトã®é…列 + 9 rmatch_pos: マッãƒã—ãŸä½ç½®ã‚’è¿”ã™ãŸã‚ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ (match_address - str) + + +# OnigRegion* onig_region_new(void) + + マッãƒé ˜åŸŸæƒ…å ±(region)を作æˆã™ã‚‹ã€‚ + + +# void onig_region_free(OnigRegion* region, int free_self) + + マッãƒé ˜åŸŸæƒ…å ±(region)ã§ä½¿ç”¨ã•れã¦ã„るメモリを解放ã™ã‚‹ã€‚ + + 引数 + 1 region: マッãƒé ˜åŸŸæƒ…報オブジェクト + 2 free_self: [1: region自身をå«ã‚ã¦å…¨ã¦è§£æ”¾, 0: region自身ã¯è§£æ”¾ã—ãªã„] + + +# void onig_region_copy(OnigRegion* to, OnigRegion* from) + + マッãƒé ˜åŸŸæƒ…å ±(region)を複製ã™ã‚‹ã€‚ + + 引数 + 1 to: 対象領域 + 2 from: 元領域 + + +# void onig_region_clear(OnigRegion* region) + + マッãƒé ˜åŸŸæƒ…å ±(region)ã®ä¸­å‘³ã‚’クリアã™ã‚‹ã€‚ + + 引数 + 1 region: 対象領域 + + +# int onig_region_resize(OnigRegion* region, int n) + + マッãƒé ˜åŸŸæƒ…å ±(region)ã®æ•ç²å¼é›†åˆ(グループ)数を変更ã™ã‚‹ã€‚ + + 戻り値 + 正常終了: ONIG_NORMAL == 0 + エラー時: エラーコード < 0 + + 引数 + 1 region: 対象領域 + 2 n: æ–°ã—ã„サイズ + + +# int onig_name_to_group_numbers(regex_t* reg, const UChar* name, const UChar* name_end, + int** num_list) + + 指定ã—ãŸåå‰ã«å¯¾ã™ã‚‹åå‰ä»˜ãæ•ç²å¼é›†åˆ(グループ)ã® + グループ番å·ãƒªã‚¹ãƒˆã‚’è¿”ã™ã€‚ + åå‰ä»˜ãæ•ç²å¼é›†åˆã¯ã€(?....)ã«ã‚ˆã£ã¦å®šç¾©ã§ãる。 + + 戻り値 + 正常終了: 指定ã•れãŸåå‰ã«å¯¾ã™ã‚‹ã‚°ãƒ«ãƒ¼ãƒ—æ•° + (例 /(?..)(?..)/ ==> 2) + åå‰ã«å¯¾ã™ã‚‹ã‚°ãƒ«ãƒ¼ãƒ—ãŒå­˜åœ¨ã—ãªã„: ONIGERR_UNDEFINED_NAME_REFERENCE + + 引数 + 1 reg: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + 2 name: æ•ç²å¼é›†åˆ(グループ)å + 3 name_end: æ•ç²å¼é›†åˆ(グループ)åã®çµ‚端アドレス + 4 num_list: 番å·ãƒªã‚¹ãƒˆã‚’è¿”ã™ã‚¢ãƒ‰ãƒ¬ã‚¹ + + +# int onig_name_to_backref_number(regex_t* reg, const UChar* name, const UChar* name_end, + OnigRegion *region) + + 指定ã•れãŸåå‰ã®å¾Œæ–¹å‚ç…§(\k)ã«å¯¾ã™ã‚‹æ•ç²å¼é›†åˆ(グループ)ã®ç•ªå·ã‚’è¿”ã™ã€‚ + åå‰ã«å¯¾ã—ã¦ã€è¤‡æ•°ã®ãƒžãƒƒãƒé ˜åŸŸãŒæœ‰åйã§ã‚れã°ã€ãã®ä¸­ã®æœ€å¤§ã®ç•ªå·ã‚’è¿”ã™ã€‚ + åå‰ã«å¯¾ã™ã‚‹æ•ç²å¼é›†åˆãŒä¸€å€‹ã—ã‹ãªã„ã¨ãã«ã¯ã€å¯¾å¿œã™ã‚‹ãƒžãƒƒãƒé ˜åŸŸãŒæœ‰åŠ¹ã‹ + ã©ã†ã‹ã«é–¢ä¿‚ãªãã€ãã®ç•ªå·ã‚’è¿”ã™ã€‚(従ã£ã¦ã€regionã«ã¯NULLを渡ã—ã¦ã‚‚よã„。) + + 戻り値 + 正常終了: ç•ªå· + エラー時: エラーコード < 0 + + 引数 + 1 reg: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + 2 name: æ•ç²å¼é›†åˆ(グループ)å + 3 name_end: æ•ç²å¼é›†åˆ(グループ)åã®çµ‚端アドレス + 4 region: search/matchçµæžœã®ãƒžãƒƒãƒé ˜åŸŸ + + +# int onig_foreach_name(regex_t* reg, + int (*func)(const UChar*, const UChar*, int,int*,regex_t*,void*), + void* arg) + + å…¨ã¦ã®åå‰ã«å¯¾ã—ã¦ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯é–¢æ•°å‘¼ã³å‡ºã—を実行ã™ã‚‹ã€‚ + + 戻り値 + 正常終了: ONIG_NORMAL == 0 + エラー時: コールãƒãƒƒã‚¯é–¢æ•°ã®æˆ»ã‚Šå€¤ + + 引数 + 1 reg: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + 2 func: コールãƒãƒƒã‚¯é–¢æ•° + func(name, name_end, , , + reg, arg); + + funcãŒ0以外ã®å€¤ã‚’è¿”ã™ã¨ã€ãれ以é™ã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã¯è¡Œãªã‚ãšã« + 終了ã™ã‚‹ã€‚ + + 3 arg: funcã«å¯¾ã™ã‚‹è¿½åŠ å¼•æ•° + + +# int onig_number_of_names(regex_t* reg) + + パターン中ã§å®šç¾©ã•れãŸåå‰ã®æ•°ã‚’è¿”ã™ã€‚ + 一個ã®åå‰ã®å¤šé‡å®šç¾©ã¯ä¸€å€‹ã¨çœ‹åšã™ã€‚ + + 引数 + 1 reg: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + + +# OnigEncoding onig_get_encoding(regex_t* reg) +# OnigOptionType onig_get_options(regex_t* reg) +# OnigSyntaxType* onig_get_syntax(regex_t* reg) + + æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ã€å¯¾å¿œã™ã‚‹å€¤ã‚’è¿”ã™ã€‚ + + 引数 + 1 reg: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + + +# OnigCaseFoldType onig_get_case_fold_flag(regex_t* reg) + + æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ã€case_fold_flag値を返ã™ã€‚ + ã“ã®é–¢æ•°ã¯å»ƒæ­¢äºˆå®š(éžæŽ¨å¥¨)。 + + 引数 + 1 reg: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + + +# int onig_number_of_captures(regex_t* reg) + + パターン中ã§å®šç¾©ã•ã‚ŒãŸæ•ç²ã‚°ãƒ«ãƒ¼ãƒ—ã®æ•°ã‚’è¿”ã™ã€‚ + + 引数 + 1 reg: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + + +# OnigCallbackEachMatchFunc onig_get_callback_each_match(void) + + ONIG_OPTION_CALLBACK_EACH_MATCHã«å¯¾ã™ã‚‹ç¾åœ¨ã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯é–¢æ•°ã‚’è¿”ã™ã€‚ + + +# int onig_set_callback_each_match(OnigCallbackEachMatchFunc func) + + ONIG_OPTION_CALLBACK_EACH_MATCHã«å¯¾ã™ã‚‹ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯é–¢æ•°ã‚’セットã™ã‚‹ã€‚ + è‹¥ã—NULLãŒã‚»ãƒƒãƒˆã•れるã¨ã€ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã¯å®Ÿè¡Œã•れãªã„。 + + 戻り値 + 正常終了: ONIG_NORMAL == 0 + + 引数 + 1 func: コールãƒãƒƒã‚¯é–¢æ•° + + +# int onig_number_of_capture_histories(regex_t* reg) + + パターン中ã§å®šç¾©ã•ã‚ŒãŸæ•ç²å±¥æ­´(?@...)ã®æ•°ã‚’è¿”ã™ã€‚ + + 使用ã™ã‚‹æ–‡æ³•ã§æ•ç²å±¥æ­´æ©Ÿèƒ½ãŒæœ‰åй(ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY) + ã§ãªã‘れã°ã€æ•ç²å±¥æ­´æ©Ÿèƒ½ã¯ä½¿ç”¨ã§ããªã„。 + + 引数 + 1 reg: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + + +# OnigCaptureTreeNode* onig_get_capture_tree(OnigRegion* region) + + æ•ç²å±¥æ­´ãƒ‡ãƒ¼ã‚¿ã®ãƒ«ãƒ¼ãƒˆãƒŽãƒ¼ãƒ‰ã‚’è¿”ã™ã€‚ + + マッãƒãŒå¤±æ•—ã—ã¦ã„ã‚‹å ´åˆã«ã¯ã€ã“ã®å€¤ã¯ä¸å®šã§ã‚る。 + + 引数 + 1 region: マッãƒé ˜åŸŸ + + +# int onig_capture_tree_traverse(OnigRegion* region, int at, + int(*func)(int,int,int,int,int,void*), void* arg) + + æ•ç²å±¥æ­´ãƒ‡ãƒ¼ã‚¿æœ¨ã‚’巡回ã—ã¦ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã™ã‚‹ã€‚ + + 戻り値 + 正常終了: ONIG_NORMAL == 0 + エラー時: コールãƒãƒƒã‚¯é–¢æ•°ã®æˆ»ã‚Šå€¤ + + 引数 + 1 region: マッãƒé ˜åŸŸ + 2 at: コールãƒãƒƒã‚¯ã‚’行ãªã†ã‚¿ã‚¤ãƒŸãƒ³ã‚° + + ONIG_TRAVERSE_CALLBACK_AT_FIRST: + 最åˆã«ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã—ã¦ã€å­ãƒŽãƒ¼ãƒ‰ã‚’巡回 + ONIG_TRAVERSE_CALLBACK_AT_LAST: + å­ãƒŽãƒ¼ãƒ‰ã‚’巡回ã—ã¦ã€ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ + ONIG_TRAVERSE_CALLBACK_AT_BOTH: + 最åˆã«ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã—ã¦ã€å­ãƒŽãƒ¼ãƒ‰ã‚’å·¡å›žã€æœ€å¾Œã«ã‚‚ã†ä¸€åº¦ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ + + 3 func: コールãƒãƒƒã‚¯é–¢æ•° + funcãŒ0以外ã®å€¤ã‚’è¿”ã™ã¨ã€ãれ以é™ã®å·¡å›žã¯è¡Œãªã‚ãšã« + 終了ã™ã‚‹ã€‚ + + int func(int group, int beg, int end, int level, int at, + void* arg) + group: ã‚°ãƒ«ãƒ¼ãƒ—ç•ªå· + beg: マッãƒé–‹å§‹ä½ç½® + end マッãƒçµ‚了ä½ç½® + level: ãƒã‚¹ãƒˆãƒ¬ãƒ™ãƒ« (0ã‹ã‚‰) + at: コールãƒãƒƒã‚¯ãŒå‘¼ã³å‡ºã•れãŸã‚¿ã‚¤ãƒŸãƒ³ã‚° + ONIG_TRAVERSE_CALLBACK_AT_FIRST + ONIG_TRAVERSE_CALLBACK_AT_LAST + arg: 追加引数 + + 4 arg; funcã«å¯¾ã™ã‚‹è¿½åŠ å¼•æ•° + + +# int onig_noname_group_capture_is_active(regex_t* reg) + + åå‰ãªã—å¼é›†åˆã®æ•ç²æ©Ÿèƒ½ãŒæœ‰åйã‹ã©ã†ã‹ã‚’è¿”ã™ã€‚ + + 戻り値 + 有効: 1 + 無効: 0 + + 引数 + 1 reg: æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + + + オプションã®ONIG_OPTION_DONT_CAPTURE_GROUPãŒON --> 無効 + + パターンãŒåå‰ã¤ãå¼é›†åˆã‚’使用ã—ã¦ã„ã‚‹ + AND 使用文法ã§ã€ONIG_SYN_CAPTURE_ONLY_NAMED_GROUPãŒON + AND オプションã®ONIG_OPTION_CAPTURE_GROUPãŒOFF + --> 無効 + + 上記以外ã®å ´åˆ --> 有効 + + +# UChar* onigenc_get_prev_char_head(OnigEncoding enc, const UChar* start, const UChar* s) + + 文字一個分å‰ã®æ–‡å­—列ä½ç½®ã‚’è¿”ã™ã€‚ + + 引数 + 1 enc: 文字エンコーディング + 2 start: 文字列ã®å…ˆé ­ã‚¢ãƒ‰ãƒ¬ã‚¹ + 3 s: 文字列中ã®ä½ç½® + + +# UChar* onigenc_get_left_adjust_char_head(OnigEncoding enc, + const UChar* start, const UChar* s) + + 文字ã®å…ˆé ­ãƒã‚¤ãƒˆä½ç½®ã«ãªã‚‹ã‚ˆã†ã«å·¦å´ã«èª¿æ•´ã—ãŸã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’è¿”ã™ã€‚ + + 引数 + 1 enc: 文字エンコーディング + 2 start: 文字列ã®å…ˆé ­ã‚¢ãƒ‰ãƒ¬ã‚¹ + 3 s: 文字列中ã®ä½ç½® + + +# UChar* onigenc_get_right_adjust_char_head(OnigEncoding enc, + const UChar* start, const UChar* s) + + 文字ã®å…ˆé ­ãƒã‚¤ãƒˆä½ç½®ã«ãªã‚‹ã‚ˆã†ã«å³å´ã«èª¿æ•´ã—ãŸã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’è¿”ã™ã€‚ + + 引数 + 1 enc: 文字エンコーディング + 2 start: 文字列ã®å…ˆé ­ã‚¢ãƒ‰ãƒ¬ã‚¹ + 3 s: 文字列中ã®ä½ç½® + + +# int onigenc_strlen(OnigEncoding enc, const UChar* s, const UChar* end) + + æ–‡å­—åˆ—ã®æ–‡å­—æ•°ã‚’è¿”ã™ã€‚ + + +# int onigenc_strlen_null(OnigEncoding enc, const UChar* s) + + æ–‡å­—åˆ—ã®æ–‡å­—æ•°ã‚’è¿”ã™ã€‚ + 文字エンコーディングã«å¯¾ã—ã¦ã€ä¸æ­£ãªæ–‡å­—列を渡ã—ã¦ã¯ã„ã‘ãªã„。 + + +# int onigenc_str_bytelen_null(OnigEncoding enc, const UChar* s) + + 文字列ã®ãƒã‚¤ãƒˆæ•°ã‚’è¿”ã™ã€‚ + 文字エンコーディングã«å¯¾ã—ã¦ã€ä¸æ­£ãªæ–‡å­—列を渡ã—ã¦ã¯ã„ã‘ãªã„。 + + +# int onig_set_default_syntax(OnigSyntaxType* syntax) + + ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®æ­£è¦è¡¨ç¾ãƒ‘ターン文法をセットã™ã‚‹ã€‚ + + 引数 + 1 syntax: æ­£è¦è¡¨ç¾ãƒ‘ターン文法 + + +# void onig_copy_syntax(OnigSyntaxType* to, OnigSyntaxType* from) + + æ­£è¦è¡¨ç¾ãƒ‘ターン文法をコピーã™ã‚‹ã€‚ + + 引数 + 1 to: 対象 + 2 from: å…ƒ + + +# unsigned int onig_get_syntax_op(OnigSyntaxType* syntax) +# unsigned int onig_get_syntax_op2(OnigSyntaxType* syntax) +# unsigned int onig_get_syntax_behavior(OnigSyntaxType* syntax) +# OnigOptionType onig_get_syntax_options(OnigSyntaxType* syntax) + +# void onig_set_syntax_op(OnigSyntaxType* syntax, unsigned int op) +# void onig_set_syntax_op2(OnigSyntaxType* syntax, unsigned int op2) +# void onig_set_syntax_behavior(OnigSyntaxType* syntax, unsigned int behavior) +# void onig_set_syntax_options(OnigSyntaxType* syntax, OnigOptionType options) + + æ­£è¦è¡¨ç¾ãƒ‘ターン文法ã®è¦ç´ ã‚’å‚ç…§/å–å¾—ã™ã‚‹ã€‚ + + 引数 + 1 syntax: æ­£è¦è¡¨ç¾ãƒ‘ターン文法 + 2 op, op2, behavior, options: è¦ç´ ã®å€¤ + + +# void onig_copy_encoding(OnigEncoding to, OnigEncoding from) + + 文字エンコーディングをコピーã™ã‚‹ã€‚ + + 引数 + 1 to: 対象 + 2 from: å…ƒ + + +# int onig_set_meta_char(OnigSyntaxType* syntax, unsigned int what, + OnigCodePoint code) + + メタ文字を指定ã—ãŸã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ³ãƒˆå€¤ã«ã‚»ãƒƒãƒˆã™ã‚‹ã€‚ + ONIG_SYN_OP_VARIABLE_META_CHARACTERSãŒæ­£è¦è¡¨ç¾ãƒ‘ã‚¿ãƒ¼ãƒ³æ–‡æ³•ã§æœ‰åŠ¹ã« + ãªã£ã¦ã„ãªã„å ´åˆã«ã¯ã€ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—文字を除ã„ã¦ã€ã“ã“ã§æŒ‡å®šã—ãŸãƒ¡ã‚¿æ–‡å­—㯠+ 機能ã—ãªã„。(組込ã¿ã®æ–‡æ³•ã§ã¯æœ‰åйã«ã—ã¦ã„ãªã„。) + + 正常終了戻り値: ONIG_NORMAL + + 引数 + 1 syntax: 対象文法 + 2 what: ãƒ¡ã‚¿æ–‡å­—æ©Ÿèƒ½ã®æŒ‡å®š + + ONIG_META_CHAR_ESCAPE + ONIG_META_CHAR_ANYCHAR + ONIG_META_CHAR_ANYTIME + ONIG_META_CHAR_ZERO_OR_ONE_TIME + ONIG_META_CHAR_ONE_OR_MORE_TIME + ONIG_META_CHAR_ANYCHAR_ANYTIME + + 3 code: メタ文字ã®ã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ³ãƒˆ ã¾ãŸã¯ ONIG_INEFFECTIVE_META_CHAR. + + +# OnigCaseFoldType onig_get_default_case_fold_flag() + + デフォルトã®case foldフラグをå–å¾—ã™ã‚‹ã€‚ + ã“ã®é–¢æ•°ã¯å»ƒæ­¢äºˆå®š(éžæŽ¨å¥¨)。 + + +# int onig_set_default_case_fold_flag(OnigCaseFoldType case_fold_flag) + + デフォルトã®case foldフラグをセットã™ã‚‹ã€‚ + ã“ã®é–¢æ•°ã¯å»ƒæ­¢äºˆå®š(éžæŽ¨å¥¨)。 + + 引数 + 1 case_fold_flag: case foldフラグ + + +# unsigned int onig_get_match_stack_limit_size(void) + + マッãƒã‚¹ã‚¿ãƒƒã‚¯ã‚µã‚¤ã‚ºã®æœ€å¤§å€¤ã‚’è¿”ã™ã€‚ + (デフォルト: 0 == 無制é™) + + +# int onig_set_match_stack_limit_size(unsigned int size) + + マッãƒã‚¹ã‚¿ãƒƒã‚¯ã‚µã‚¤ã‚ºã®æœ€å¤§å€¤ã‚’指定ã™ã‚‹ã€‚ + (size = 0: 無制é™) + + 正常終了戻り値: ONIG_NORMAL + + +# unsigned long onig_get_retry_limit_in_match(void) + + 一回ã®ãƒžãƒƒãƒãƒ³ã‚°ã§ã®ãƒªãƒˆãƒ©ã‚¤æ•°ã®åˆ¶é™å€¤ã‚’è¿”ã™ã€‚ + (デフォルト: 10000000) + + 正常終了戻り値: 制é™å€¤ + + +# unsigned long onig_get_retry_limit_in_search(void) + + ä¸€å›žã®æ¤œç´¢ã§ã®ãƒªãƒˆãƒ©ã‚¤æ•°ã®åˆ¶é™å€¤ã‚’è¿”ã™ã€‚ + 0ã¯ç„¡åˆ¶é™ã‚’æ„味ã™ã‚‹ã€‚ + (デフォルト: 0) + + 正常終了戻り値: 制é™å€¤ + + +# int onig_set_retry_limit_in_match(unsigned long limit) + + 一回ã®ãƒžãƒƒãƒãƒ³ã‚°å†…ã§ã®ãƒªãƒˆãƒ©ã‚¤æ•°ã®åˆ¶é™å€¤ã‚’指定ã™ã‚‹ã€‚ + ï¼ã¯ç„¡åˆ¶é™ã‚’æ„味ã™ã‚‹ã€‚ + + 正常終了戻り値: ONIG_NORMAL + + +# int onig_set_retry_limit_in_search(unsigned long limit) + + ä¸€å›žã®æ¤œç´¢ã§ã®ãƒªãƒˆãƒ©ã‚¤æ•°ã®åˆ¶é™å€¤ã‚’セットã™ã‚‹ã€‚ + 0ã¯ç„¡åˆ¶é™ã‚’æ„味ã™ã‚‹ã€‚ + (デフォルト: 0) + + 正常終了戻り値: ONIG_NORMAL + + +# unsigned long onig_get_subexp_call_limit_in_search(void) + + 部分å¼å‘¼å‡ºã—ã®å‘¼ã³å‡ºã—回数ã®åˆ¶é™å€¤ã‚’è¿”ã™ã€‚ + (デフォルト: 0:無制é™) + + 正常終了戻り値: 制é™å€¤ + + +# int onig_set_subexp_call_limit_in_search(unsigned long n) + + 部分å¼å‘¼å‡ºã—ã®å‘¼ã³å‡ºã—回数ã®åˆ¶é™å€¤ã‚’指定ã™ã‚‹ã€‚ + + 正常終了戻り値: ONIG_NORMAL + + +# int onig_get_subexp_call_max_nest_level(void) + + 部分å¼å‘¼å‡ºã—ã®ãƒã‚¹ãƒˆãƒ¬ãƒ™ãƒ«ã®æœ€å¤§å€¤ã‚’è¿”ã™ã€‚ + (デフォルト: 24) + + 正常終了戻り値: 制é™å€¤ + + +# int onig_set_subexp_call_max_nest_level(int max_level) + + 部分å¼å‘¼å‡ºã—ã®ãƒã‚¹ãƒˆãƒ¬ãƒ™ãƒ«ã®æœ€å¤§å€¤ã‚’指定ã™ã‚‹ã€‚ + + 正常終了戻り値: ONIG_NORMAL + + +# OnigCalloutFunc onig_get_progress_callout(void) + + å‰é€²æ™‚ã®å†…容ã®å‘¼ã³å‡ºã—ã§å‘¼ã³å‡ºã•れる関数を返ã™ã€‚ + + +# int onig_set_progress_callout(OnigCalloutFunc f) + + å‰é€²æ™‚ã®å†…容ã®å‘¼ã³å‡ºã—ã§å‘¼ã³å‡ºã•れる関数を指定ã™ã‚‹ã€‚ + ã‚‚ã—0(NULL)を指定ã™ã‚‹ã¨ã€å‰é€²æ™‚ã®å†…容ã®å‘¼ã³å‡ºã—ã§å‘¼ã³å‡ºã—ã¯èµ·ã“らãªã„。 + + 正常終了戻り値: ONIG_NORMAL + + +# OnigCalloutFunc onig_get_retraction_callout(void) + + 後退時ã®å†…容ã®å‘¼ã³å‡ºã—ã§å‘¼ã³å‡ºã•れる関数を返ã™ã€‚ + + +# int onig_set_retraction_callout(OnigCalloutFunc f) + + 後退時ã®å†…容ã®å‘¼ã³å‡ºã—ã§å‘¼ã³å‡ºã•れる関数を指定ã™ã‚‹ã€‚ + ã‚‚ã—0(NULL)を指定ã™ã‚‹ã¨ã€å¾Œé€€æ™‚ã®å†…容ã®å‘¼ã³å‡ºã—ã§å‘¼ã³å‡ºã—ã¯èµ·ã“らãªã„。 + + 正常終了戻り値: ONIG_NORMAL + + +# int onig_unicode_define_user_property(const char* name, OnigCodePoint* ranges)) + + æ–°ã—ã„Unicodeプロパティを定義ã™ã‚‹ã€‚ + (ã“ã®é–¢æ•°ã¯ã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã§ã¯ãªã„) + + 引数 + 1 name: プロパティå (ASCIIコードã®ã¿ã€‚ 文字 ' ', '-', '_' ã¯ç„¡è¦–ã•れる。) + 2 ranges: プロパティコードãƒã‚¤ãƒ³ãƒˆç¯„囲 + (最åˆã®è¦ç´ ã¯ç¯„å›²ã®æ•°) + + [num-of-ranges, 1st-range-start, 1st-range-end, 2nd-range-start... ] + + * ã“ã®é–¢æ•°ã‚’呼んã å¾Œã§ã€rangesを変更/破壊ã—ãªã„ã“㨠+ + 戻り値 + 正常終了: ONIG_NORMAL == 0 + エラー時: エラーコード < 0 + + +# unsigned int onig_get_parse_depth_limit(void) + + å†å¸°ãƒ‘ース処ç†ã®æœ€å¤§æ·±ã•ã‚’è¿”ã™ã€‚ + (デフォルト: regint.h ã§å®šç¾©ã•れã¦ã„ã‚‹ DEFAULT_PARSE_DEPTH_LIMIT。ç¾åœ¨ã¯ 4096) + + +# int onig_set_parse_depth_limit(unsigned int depth) + + å†å¸°ãƒ‘ース処ç†ã®æœ€å¤§æ·±ã•を指定ã™ã‚‹ã€‚ + (depth = 0: regint.h ã§å®šç¾©ã•れãŸãƒ‡ãƒ•ォルト値ã«è¨­å®šã™ã‚‹ã€‚) + + 正常終了戻り値: ONIG_NORMAL + + +# int onig_end(void) + + ライブラリã®ä½¿ç”¨ã‚’終了ã™ã‚‹ã€‚ + + 正常終了戻り値: ONIG_NORMAL + + onig_initialize()ã‚’å†åº¦å‘¼ã³å‡ºã—ã¦ã‚‚ã€ä»¥å‰ã«ä½œæˆã—ãŸæ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクト + を使用ã™ã‚‹ã“ã¨ã¯ã§ããªã„。 + + +# const char* onig_version(void) + + ãƒãƒ¼ã‚¸ãƒ§ãƒ³æ–‡å­—列を返ã™ã€‚(例 "5.0.3") + +// END diff --git a/internal/components/third_party/oniguruma/doc/CALLOUTS.API b/internal/components/third_party/oniguruma/doc/CALLOUTS.API new file mode 100644 index 0000000000..7ecf6bcd1c --- /dev/null +++ b/internal/components/third_party/oniguruma/doc/CALLOUTS.API @@ -0,0 +1,397 @@ +Callouts API Version 6.9.7 2021/03/21 + +#include + +(1) Callout functions +(2) Set/Get functions for Callouts of contents +(3) Set functions for Callouts of name +(4) User data +(5) Get values from OnigCalloutArgs +(6) Tag +(7) Callout data (used in callout functions) +(8) Callout data (used in applications) +(9) Miscellaneous functions + + +(1) Callout functions + + type: OnigCalloutFunc + + typedef int (*OnigCalloutFunc)(OnigCalloutArgs* args, void* user_data); + + If 0 (NULL) is set as a callout function value, never called. + + + * Callout function return value (int) + + ONIG_CALLOUT_FAIL (== 1): fail + ONIG_CALLOUT_SUCCESS (== 0): success + less than -1: error code (terminate search/match) + + ONIG_CALLOUT_FAIL/SUCCESS values are ignored in retractions, + because retraction is a part of recovery process after failure. + + * Example of callout function + + extern int always_success(OnigCalloutArgs* args, void* user_data) + { + return ONIG_CALLOUT_SUCCESS; + } + + + +(2) Set/Get functions for Callouts of contents + +# OnigCalloutFunc onig_get_progress_callout(void) + + Get a function for callouts of contents in progress. + + +# int onig_set_progress_callout(OnigCalloutFunc f) + + Set a function for callouts of contents in progress. + This value set in onig_initialize_match_param() as a default + callout function. + + normal return: ONIG_NORMAL + + +# OnigCalloutFunc onig_get_retraction_callout(void) + + Get a function for callouts of contents in retraction (backtrack). + + +# int onig_set_retraction_callout(OnigCalloutFunc f) + + Set a function for callouts of contents in retraction (backtrack). + This value set in onig_initialize_match_param() as a default + callout function. + + normal return: ONIG_NORMAL + + +# int onig_set_progress_callout_of_match_param(OnigMatchParam* mp, OnigCalloutFunc f) + + Set a function for callouts of contents in progress. + + arguments + 1 mp: match-param pointer + 2 f: function + + normal return: ONIG_NORMAL + + +# int onig_set_retraction_callout_of_match_param(OnigMatchParam* mp, OnigCalloutFunc f) + + Set a function for callouts of contents in retraction (backtrack). + + arguments + 1 mp: match-param pointer + 2 f: function + + normal return: ONIG_NORMAL + + + +(3) Set functions for Callouts of name + +# int onig_set_callout_of_name(OnigEncoding enc, OnigCalloutType type, OnigUChar* name, OnigUChar* name_end, int callout_in, OnigCalloutFunc callout, OnigCalloutFunc end_callout, int arg_num, unsigned int arg_types[], int opt_arg_num, OnigValue opt_defaults[]) + + Set a function for callouts of name. + Allowed name string characters: _ A-Z a-z 0-9 (* first character: _ A-Z a-z) + + (enc, name) pair is used as key value to find callout function. + You have to call this function for every encoding used in your applications. + But if enc is ASCII compatible and (enc, name) entry is not found, + then (ASCII, name) entry is used. + Therefore, if you use ASCII compatible encodings only, it is enough to call + this function one time for (ASCII, name). + + arguments + 1 enc: character encoding + 2 type: callout type (currently ONIG_CALLOUT_TYPE_SINGLE only supported) + 3 name: name string address (the string is encoded by enc) + 4 name_end: name string end address + 5 callout_in: direction (ONIG_CALLOUT_IN_PROGRESS/RETRACTION/BOTH) + 6 callout: callout function + 7 end_callout: * not used currently (set 0) + 8 arg_num: number of arguments (*limit by ONIG_CALLOUT_MAX_ARGS_NUM == 4) + 9 arg_types: type array of arguments + 10 opt_arg_num: number of optional arguments + 11 opt_defaults: default values array of optional arguments + + normal return: ONIG_NORMAL + error: + ONIGERR_INVALID_CALLOUT_NAME + ONIGERR_INVALID_ARGUMENT + ONIGERR_INVALID_CALLOUT_ARG + + + +(4) User data + +# int onig_set_callout_user_data_of_match_param(OnigMatchParam* param, void* user_data) + + Set a user_data value which passed as second argument of callout. + + normal return: ONIG_NORMAL + + + +(5) Get values from OnigCalloutArgs + +# int onig_get_callout_num_by_callout_args(OnigCalloutArgs* args) + + Returns callout number of this callout. + "Callout number" is an identifier of callout in a regex pattern. + + +# OnigCalloutIn onig_get_callout_in_by_callout_args(OnigCalloutArgs* args) + + Returns the direction of this callout. + (ONIG_CALLOUT_IN_PROGRESS or ONIG_CALLOUT_IN_RETRACTION) + + +# int onig_get_name_id_by_callout_args(OnigCalloutArgs* args) + + Returns the name identifier of this callout. + If this callout is callout of contents, then returns ONIG_NON_NAME_ID. + + +# const OnigUChar* onig_get_contents_by_callout_args(OnigCalloutArgs* args) + + Returns the contents string of this callout. (NULL terminated string) + If this callout is callout of name, then returns NULL. + + +# const OnigUChar* onig_get_contents_end_by_callout_args(OnigCalloutArgs* args) + + Returns the end of contents string of this callout. + If this callout is callout of name, then returns NULL. + + +# int onig_get_args_num_by_callout_args(OnigCalloutArgs* args) + + Returns the number of args of this callout. + It includes optional arguments that doesn't passed in regex pattern. + If this callout is callout of contents, then returns + ONIGERR_INVALID_ARGUMENT. + + +# int onig_get_passed_args_num_by_callout_args(OnigCalloutArgs* args) + + Returns the number of args that passed really in regex pattern. + If this callout is callout of contents, then returns + ONIGERR_INVALID_ARGUMENT. + + +# int onig_get_arg_by_callout_args(OnigCalloutArgs* args, int index, OnigType* type, OnigValue* val) + + Returns a value and a type of the callout argument. + If this callout is callout of contents, then returns + ONIGERR_INVALID_ARGUMENT. + + normal return: ONIG_NORMAL + + +# const OnigUChar* onig_get_string_by_callout_args(OnigCalloutArgs* args) + + Returns the subject string address. + This is the second argument(str) of onig_search(). + + +# const OnigUChar* onig_get_string_end_by_callout_args(OnigCalloutArgs* args) + + Returns the end address of subject string. + This is the third argument(end) of onig_search(). + + +# const OnigUChar* onig_get_start_by_callout_args(OnigCalloutArgs* args) + + Returns the start address of subject string in current match process. + + +# const OnigUChar* onig_get_right_range_by_callout_args(OnigCalloutArgs* args) + + Returns the right range address of subject string. + + +# const OnigUChar* onig_get_current_by_callout_args(OnigCalloutArgs* args) + + Returns the current address of subject string in current match process. + + +# OnigRegex onig_get_regex_by_callout_args(OnigCalloutArgs* args) + + Returns the regex object address of this callout. + + +# unsigned long onig_get_retry_counter_by_callout_args(OnigCalloutArgs* args) + + Returns the current counter value for retry-limit-in-match. + + + +(6) Tag + + "Tag" is a name assigned to a callout in regexp pattern. + Allowed tag string characters: _ A-Z a-z 0-9 (* first character: _ A-Z a-z) + + +# int onig_callout_tag_is_exist_at_callout_num(OnigRegex reg, int callout_num) + + Returns 1 if tag is assigned for the callout, else returns 0. + + +# int onig_get_callout_num_by_tag(OnigRegex reg, const OnigUChar* tag, const OnigUChar* tag_end) + + Returns the callout number for the tag. + + +# const OnigUChar* onig_get_callout_tag_start(OnigRegex reg, int callout_num) + + Returns the start address of tag string for the callout. + (NULL terminated string) + + +# const OnigUChar* onig_get_callout_tag_end(OnigRegex reg, int callout_num) + + Returns the end address of tag string for the callout. + + + +(7) Callout data (used in callout functions) + + "Callout data" is ONIG_CALLOUT_DATA_SLOT_NUM(5) values area + for each callout in each search process. + Each value area in a callout is indicated by "slot" number (0 - 4). + Callout data are used for any purpose by callout function implementers. + + +# int onig_get_callout_data_by_callout_args(OnigCalloutArgs* args, int callout_num, int slot, OnigType* type, OnigValue* val) + + Returns the callout data value/type for a callout slot indicated by + callout_num/slot. + + ONIG_NORMAL: normal return + ONIG_VALUE_IS_NOT_SET: value is not set / type is ONIG_TYPE_VOID + < 0: error code + + +# int onig_get_callout_data_by_callout_args_self(OnigCalloutArgs* args, int slot, OnigType* type, OnigValue* val) + + Returns self callout data value/type. + + ONIG_NORMAL: normal return + ONIG_VALUE_IS_NOT_SET: value is not set / type is ONIG_TYPE_VOID + < 0: error code + + +# int onig_set_callout_data_by_callout_args(OnigCalloutArgs* args, int callout_num, int slot, OnigType type, OnigValue* val) + + Set the callout data value/type for a callout slot indicated by callout_num/slot. + + ONIG_NORMAL: normal return + < 0: error code + + +# int onig_set_callout_data_by_callout_args_self(OnigCalloutArgs* args, int slot, OnigType type, OnigValue* val) + + Set self callout data value/type for a callout slot indicated by slot. + + ONIG_NORMAL: normal return + < 0: error code + + +# int onig_get_callout_data_by_callout_args_self_dont_clear_old(OnigCalloutArgs* args, int slot, OnigType* type, OnigValue* val) + + This function is almost same as onig_get_callout_data_by_callout_args_self(). + But this function does not clear the value set in the collation position before the current position. (dont_clear_old) + The other onig_get_callout_data_xxxx() function clears the value set in the collation process of the previous position. + + For example, Builtin callout (*TOTAL_COUNT) is implemented by using this + function for accumulate count of all of match processes in a search process. + Builtin callout (*COUNT) returns count in last success match process only, + because it doesn't use this function. + + ONIG_NORMAL: normal return + ONIG_VALUE_IS_NOT_SET: value is not set / type is ONIG_TYPE_VOID + < 0: error code + + +(8) Callout data (used in applications) + +# int onig_get_callout_data(OnigRegex reg, OnigMatchParam* mp, int callout_num, int slot, OnigType* type, OnigValue* val) + + Returns the callout data value/type for a callout slot indicated by + callout_num/slot. + + ONIG_NORMAL: normal return + ONIG_VALUE_IS_NOT_SET: value is not set / type is ONIG_TYPE_VOID + < 0: error code + + +# int onig_get_callout_data_by_tag(OnigRegex reg, OnigMatchParam* mp, const OnigUChar* tag, const OnigUChar* tag_end, int slot, OnigType* type, OnigValue* val) + + Returns the callout data value/type for a callout slot indicated by tag/slot. + + ONIG_NORMAL: normal return + ONIG_VALUE_IS_NOT_SET: value is not set / type is ONIG_TYPE_VOID + < 0: error code + + +# int onig_set_callout_data(OnigRegex reg, OnigMatchParam* mp, int callout_num, int slot, OnigType type, OnigValue* val) + + Set the callout data value/type for a callout slot indicated by callout_num/slot. + + ONIG_NORMAL: normal return + < 0: error code + + +# int onig_set_callout_data_by_tag(OnigRegex reg, OnigMatchParam* mp, const OnigUChar* tag, const OnigUChar* tag_end, int slot, OnigType type, OnigValue* val) + + Set the callout data value/type for a callout slot indicated by tag/slot. + + ONIG_NORMAL: normal return + < 0: error code + + +# int onig_get_callout_data_dont_clear_old(OnigRegex reg, OnigMatchParam* mp, int callout_num, int slot, OnigType* type, OnigValue* val) + + No needs to use this function. + It will be abolished. + + +# int onig_get_callout_data_by_tag_dont_clear_old(regex_t* reg, OnigMatchParam* mp, const UChar* tag, const UChar* tag_end, int slot, OnigType* type, OnigValue* val) + + Returns the callout data value/type for a callout slot indicated by tag/slot. + This function does not clear the value set in the collation position before the current position. (dont_clear_old) + + ONIG_NORMAL: 正常終了 + ONIG_VALUE_IS_NOT_SET: å€¤ãŒæœªã‚»ãƒƒãƒˆ / åž‹ãŒVOID + < 0: エラーコード + + +(9) Miscellaneous functions + +# OnigUChar* onig_get_callout_name_by_name_id(int name_id) + + Returns callout name of the name id. + if invalid name id is passed, return 0. + + +# int onig_get_capture_range_in_callout(OnigCalloutArgs* args, int mem_num, int* begin, int* end) + + Returns current capture range position. + Position is byte length offset from subject string. + For uncaptured mem_num, ONIG_REGION_NOTPOS is set. + + +# int onig_get_used_stack_size_in_callout(OnigCalloutArgs* args, int* used_num, int* used_bytes) + + Returns current used match-stack size. + + used_num: number of match-stack elements + used_bytes: used byte size of match-stack + +//END diff --git a/internal/components/third_party/oniguruma/doc/CALLOUTS.API.ja b/internal/components/third_party/oniguruma/doc/CALLOUTS.API.ja new file mode 100644 index 0000000000..5dffb89615 --- /dev/null +++ b/internal/components/third_party/oniguruma/doc/CALLOUTS.API.ja @@ -0,0 +1,393 @@ +Callouts API Version 6.9.7 2022/02/04 + +#include + +(1) 呼ã³å‡ºã—関数 +(2) 内容ã®å‘¼ã³å‡ºã—関数ã®è¨­å®š/å–å¾— +(3) åå‰ã®å‘¼ã³å‡ºã—関数ã®è¨­å®š +(4) ユーザデータ +(5) OnigCalloutArgsã‹ã‚‰ã®å€¤ã®å–å¾— +(6) åæœ­ +(7) 呼ã³å‡ºã—データ (呼ã³å‡ºã—関数内ã‹ã‚‰ä½¿ç”¨ã•れる) +(8) 呼ã³å‡ºã—データ (アプリケーションã‹ã‚‰ä½¿ç”¨ã•れる) +(9) ãã®ä»–ã®é–¢æ•° + + +(1) 呼ã³å‡ºã—関数 + + åž‹: OnigCalloutFunc + + typedef int (*OnigCalloutFunc)(OnigCalloutArgs* args, void* user_data); + + è‹¥ã—呼ã³å‡ºã—関数ã¨ã—ã¦ï¼(NULL)ãŒã‚»ãƒƒãƒˆã•れるã¨ã€å‘¼ã°ã‚Œã‚‹ã“ã¨ã¯ãªã„ + + + * 呼ã³å‡ºã—é–¢æ•°ã®æˆ»ã‚Šå€¤ (int) + + ONIG_CALLOUT_FAIL (== 1): 失敗 + ONIG_CALLOUT_SUCCESS (== 0): æˆåŠŸ + -1未満: エラーコード (検索/ç…§åˆã®çµ‚了) + + ONIG_CALLOUT_FAIL/SUCCESSã¯ã€å¾Œé€€ä¸­ã®å‘¼ã³å‡ºã—ã§ã¯ç„¡è¦–ã•れる。 + 後退ã¯å¤±æ•—ã®å›žå¾©éŽç¨‹ãªã®ã§ã€‚ + + * 呼ã³å‡ºã—関数ã®ä¾‹ + + extern int always_success(OnigCalloutArgs* args, void* user_data) + { + return ONIG_CALLOUT_SUCCESS; + } + + + +(2) 内容ã®å‘¼ã³å‡ºã—関数ã®è¨­å®š/å–å¾— + +# OnigCalloutFunc onig_get_progress_callout(void) + + 内容ã®å‘¼ã³å‡ºã—関数(å‰é€²ä¸­)を返㙠+ + +# int onig_set_progress_callout(OnigCalloutFunc f) + + 内容ã®å‘¼ã³å‡ºã—関数(å‰é€²ä¸­)をセットã™ã‚‹ã€‚ + ã“ã®å€¤ã¯onig_initialize_match_param()ã®ä¸­ã§ãƒ‡ãƒ•ォルトã®å‘¼ã³å‡ºã—関数ã¨ã—㦠+ セットã•れる。 + + 正常終了: ONIG_NORMAL + + +# OnigCalloutFunc onig_get_retraction_callout(void) + + 内容ã®å‘¼ã³å‡ºã—関数(後退中)を返㙠+ + +# int onig_set_retraction_callout(OnigCalloutFunc f) + + 内容ã®å‘¼ã³å‡ºã—関数(後退中)をセットã™ã‚‹ã€‚ + ã“ã®å€¤ã¯onig_initialize_match_param()ã®ä¸­ã§ãƒ‡ãƒ•ォルトã®å‘¼ã³å‡ºã—関数ã¨ã—㦠+ セットã•れる。 + + 正常終了: ONIG_NORMAL + + +# int onig_set_progress_callout_of_match_param(OnigMatchParam* mp, OnigCalloutFunc f) + + 内容ã®å‘¼ã³å‡ºã—関数(å‰é€²ä¸­)をセットã™ã‚‹ã€‚ + + 引数 + 1 mp: match-paramアドレス + 2 f: 関数 + + 正常終了: ONIG_NORMAL + + +# int onig_set_retraction_callout_of_match_param(OnigMatchParam* mp, OnigCalloutFunc f) + + 内容ã®å‘¼ã³å‡ºã—関数(後退中)をセットã™ã‚‹ã€‚ + + 引数 + 1 mp: match-paramアドレス + 2 f: 関数 + + 正常終了: ONIG_NORMAL + + + +(3) åå‰ã®å‘¼ã³å‡ºã—関数ã®è¨­å®š + +# int onig_set_callout_of_name(OnigEncoding enc, OnigCalloutType type, OnigUChar* name, OnigUChar* name_end, int callout_in, OnigCalloutFunc callout, OnigCalloutFunc end_callout, int arg_num, unsigned int arg_types[], int opt_arg_num, OnigValue opt_defaults[]) + + åå‰ã®å‘¼ã³å‡ºã—関数をセットã™ã‚‹ã€‚ + åå‰ã«è¨±ã•れる文字: _ A-Z a-z 0-9 (* 最åˆã®æ–‡å­—: _ A-Z a-z) + + (enc, name)ã®ãƒšã‚¢ãŒã€å‘¼ã³å‡ºã—関数を見ã¤ã‘ã‚‹ãŸã‚ã®ã‚­ãƒ¼ã¨ã—ã¦ä½¿ç”¨ã•れる。 + アプリケーションã§ä½¿ç”¨ã•れるå„エンコーディングã«å¯¾ã—ã¦ã“ã®é–¢æ•°ã‚’呼ã¶å¿…è¦ãŒã‚る。 + ã—ã‹ã—è‹¥ã—encエンコーディングãŒASCII互æ›ã§ã‚りã€(enc, name)ã«å¯¾ã™ã‚‹ã‚¨ãƒ³ãƒˆãƒªãŒ + 見ã¤ã‹ã‚‰ãªã„å ´åˆã«ã¯ã€(ASCII, name)エントリãŒå‚ç…§ã•れる。 + 従ã£ã¦ã€è‹¥ã—ASCII互æ›ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®ã¿ä½¿ç”¨ã—ã¦ã„ã‚‹å ´åˆã«ã¯ã€ã“ã®é–¢æ•°ã‚’(ASCII, name) + ã«ã¤ã„ã¦ä¸€å›žå‘¼ã¹ã°å分ã§ã‚る。 + + 引数 + 1 enc: 文字エンコーディング + 2 type: 呼ã³å‡ºã—åž‹ (ç¾åœ¨ã¯ ONIG_CALLOUT_TYPE_SINGLE ã®ã¿ã‚µãƒãƒ¼ãƒˆ) + 3 name: åå‰ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ (encã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã•れã¦ã„る文字列) + 4 name_end: åå‰ã®çµ‚端アドレス + 5 callout_in: æ–¹å‘フラグ (ONIG_CALLOUT_IN_PROGRESS/RETRACTION/BOTH) + 6 callout: 呼ã³å‡ºã—関数 + 7 end_callout: *ã¾ã ä½¿ç”¨ã—ã¦ã„ãªã„ (ï¼ã‚’セット) + 8 arg_num: å¼•æ•°ã®æ•° (* 最大値 ONIG_CALLOUT_MAX_ARGS_NUM == 4) + 9 arg_types: 引数ã®åž‹ã®é…列 + 10 opt_arg_num: ã‚ªãƒ—ã‚·ãƒ§ãƒ³å¼•æ•°ã®æ•° + 11 opt_defaults: オプション引数ã®ãƒ‡ãƒ•ォルト値 + + 正常終了: ONIG_NORMAL + error: + ONIGERR_INVALID_CALLOUT_NAME + ONIGERR_INVALID_ARGUMENT + ONIGERR_INVALID_CALLOUT_ARG + + + +(4) ユーザデータ + +# int onig_set_callout_user_data_of_match_param(OnigMatchParam* param, void* user_data) + + 呼ã³å‡ºã—関数ã®å¼•æ•°ã¨ã—ã¦æ¸¡ã•れるユーザデータをセットã™ã‚‹ã€‚ + + 正常終了: ONIG_NORMAL + + + +(5) OnigCalloutArgsã‹ã‚‰ã®å€¤ã®å–å¾— + +# int onig_get_callout_num_by_callout_args(OnigCalloutArgs* args) + + ã“ã®å‘¼ã³å‡ºã—ã®å‘¼ã³å‡ºã—番å·ã‚’è¿”ã™ã€‚ + "呼ã³å‡ºã—番å·"ã¨ã¯ã€æ­£è¦è¡¨ç¾ãƒ‘ターンã®ä¸­ã®å‘¼ã³å‡ºã—ã«å¯¾ã™ã‚‹è­˜åˆ¥å­ã§ã‚る。 + + +# OnigCalloutIn onig_get_callout_in_by_callout_args(OnigCalloutArgs* args) + + ã“ã®å‘¼ã³å‡ºã—ãŒèµ·ããŸæ™‚ã®æ–¹å‘(å‰é€²ä¸­/後退中)ã‚’è¿”ã™ã€‚ + (ONIG_CALLOUT_IN_PROGRESS ã‹ ONIG_CALLOUT_IN_RETRACTION) + + +# int onig_get_name_id_by_callout_args(OnigCalloutArgs* args) + + ã“ã®å‘¼ã³å‡ºã—ã®åå‰(name)ã®è­˜åˆ¥å­ã‚’è¿”ã™ã€‚ + è‹¥ã—ã“ã®å‘¼ã³å‡ºã—ãŒå†…容ã®å‘¼ã³å‡ºã—ã®ã¨ãã«ã¯ã€ONIG_NON_NAME_IDãŒè¿”ã•れる。 + + +# const OnigUChar* onig_get_contents_by_callout_args(OnigCalloutArgs* args) + + ã“ã®å‘¼ã³å‡ºã—ã®å†…容文字列(NULL終端ã‚り)ã‚’è¿”ã™ã€‚ + è‹¥ã—ã“ã®å‘¼ã³å‡ºã—ãŒåå‰ã®å‘¼ã³å‡ºã—ã®ã¨ãã«ã¯ã€NULLã‚’è¿”ã™ã€‚ + + +# const OnigUChar* onig_get_contents_end_by_callout_args(OnigCalloutArgs* args) + + ã“ã®å‘¼ã³å‡ºã—ã®å†…容(contents)ã®çµ‚端を返ã™ã€‚ + è‹¥ã—ã“ã®å‘¼ã³å‡ºã—ãŒåå‰ã®å‘¼ã³å‡ºã—ã®ã¨ãã«ã¯ã€NULLã‚’è¿”ã™ã€‚ + + +# int onig_get_args_num_by_callout_args(OnigCalloutArgs* args) + + ã“ã®å‘¼ã³å‡ºã—ã®å¼•æ•°ã®æ•°ã‚’è¿”ã™ã€‚ + æ­£è¦è¡¨ç¾ãƒ‘ターンã®ä¸­ã§æ¸¡ã•れãªã‹ã£ãŸã‚ªãƒ—ション引数もå«ã‚€ã€‚ + è‹¥ã—ã“ã®å‘¼ã³å‡ºã—ãŒå†…容ã®å‘¼ã³å‡ºã—ã®ã¨ãã«ã¯ã€ONIGERR_INVALID_ARGUMENTãŒè¿”ã•れる。 + + +# int onig_get_passed_args_num_by_callout_args(OnigCalloutArgs* args) + + ã“ã®å‘¼ã³å‡ºã—ã®æœ¬å½“ã«æ¸¡ã•れãŸå¼•æ•°ã®æ•°ã‚’è¿”ã™ã€‚ + è‹¥ã—ã“ã®å‘¼ã³å‡ºã—ãŒå†…容ã®å‘¼ã³å‡ºã—ã®ã¨ãã«ã¯ã€ONIGERR_INVALID_ARGUMENTãŒè¿”ã•れる。 + + +# int onig_get_arg_by_callout_args(OnigCalloutArgs* args, int index, OnigType* type, OnigValue* val) + + ã“ã®å‘¼ã³å‡ºã—ã®ä¸€å€‹ã®å¼•æ•°ã®å€¤ã¨åž‹ã‚’è¿”ã™ã€‚ + è‹¥ã—ã“ã®å‘¼ã³å‡ºã—ãŒå†…容ã®å‘¼ã³å‡ºã—ã®ã¨ãã«ã¯ã€ONIGERR_INVALID_ARGUMENTãŒè¿”ã•れる。 + + 正常終了: ONIG_NORMAL + + +# const OnigUChar* onig_get_string_by_callout_args(OnigCalloutArgs* args) + + 対象文字列ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’è¿”ã™ã€‚ + onig_search()ã®äºŒç•ªç›®ã®å¼•æ•°(str)ã§ã‚る。 + + +# const OnigUChar* onig_get_string_end_by_callout_args(OnigCalloutArgs* args) + + 対象文字列ã®çµ‚端アドレスを返ã™ã€‚ + onig_search()ã®ä¸‰ç•ªç›®ã®å¼•æ•°(end)ã§ã‚る。 + + +# const OnigUChar* onig_get_start_by_callout_args(OnigCalloutArgs* args) + + 対象文字列ã®ç¾åœ¨ã®ç…§åˆå‡¦ç†é–‹å§‹ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’è¿”ã™ã€‚ + + +# const OnigUChar* onig_get_right_range_by_callout_args(OnigCalloutArgs* args) + + 対象文字列ã®ç¾åœ¨ã®ç…§åˆç¯„囲アドレスを返ã™ã€‚ + + +# const OnigUChar* onig_get_current_by_callout_args(OnigCalloutArgs* args) + + 対象文字列ã®ç¾åœ¨ã®ç…§åˆä½ç½®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’è¿”ã™ã€‚ + + +# OnigRegex onig_get_regex_by_callout_args(OnigCalloutArgs* args) + + ã“ã®å‘¼ã³å‡ºã—ã®æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’è¿”ã™ã€‚ + + +# unsigned long onig_get_retry_counter_by_callout_args(OnigCalloutArgs* args) + + retry-limit-in-matchã®ãŸã‚ã®ãƒªãƒˆãƒ©ã‚¤ã‚«ã‚¦ãƒ³ã‚¿ã®ç¾åœ¨å€¤ã‚’è¿”ã™ã€‚ + + + +(6) åæœ­ + + "Tag" (åæœ­)ã¨ã¯ã€æ­£è¦è¡¨ç¾ãƒ‘ターンã®ä¸­ã§å‘¼ã³å‡ºã—ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸåå‰ã§ã‚る。 + tag文字列ã«ä½¿ç”¨ã§ãる文字: _ A-Z a-z 0-9 (* å…ˆé ­ã®æ–‡å­—: _ A-Z a-z) + + +# int onig_callout_tag_is_exist_at_callout_num(OnigRegex reg, int callout_num) + + ãã®å‘¼ã³å‡ºã—ã«tagãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„れã°1ã‚’è¿”ã™ã€ãã†ã§ãªã‘れã°0ã‚’è¿”ã™ã€‚ + + +# const OnigUChar* onig_get_callout_tag_start(OnigRegex reg, int callout_num) + + ãã®å‘¼ã³å‡ºã—ã«å¯¾ã™ã‚‹tag文字列(NULL終端ã‚り)ã®å…ˆé ­ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’è¿”ã™ã€‚ + + +# const OnigUChar* onig_get_callout_tag_end(OnigRegex reg, int callout_num) + + ãã®å‘¼ã³å‡ºã—ã«å¯¾ã™ã‚‹tag文字列ã®çµ‚端アドレスを返ã™ã€‚ + + +# int onig_get_callout_num_by_tag(OnigRegex reg, const OnigUChar* tag, const OnigUChar* tag_end) + + ãã®tagã«å¯¾ã™ã‚‹å‘¼ã³å‡ºã—番å·ã‚’è¿”ã™ã€‚ + + + +(7) 呼ã³å‡ºã—データ (呼ã³å‡ºã—関数内ã‹ã‚‰ä½¿ç”¨ã•れる) + + "呼ã³å‡ºã—データ" (callout data)ã¨ã¯ã€ + ãれãžã‚Œã®å‘¼ã³å‡ºã—ã«å¯¾ã—ã¦ãれãžã‚Œã®æ¤œç´¢å‡¦ç†ã®ä¸­ã§å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸã€ + ONIG_CALLOUT_DATA_SLOT_NUM(== 5)個ã®å€¤ã®é ˜åŸŸã§ã‚る。 + 一個ã®å‘¼ã³å‡ºã—ã«å¯¾ã™ã‚‹å„値ã®é ˜åŸŸã¯ã€"スロット"(slot)番å·(0 - 4)ã«ã‚ˆã£ã¦ç¤ºã•れる。 + 呼ã³å‡ºã—データã¯å‘¼ã³å‡ºã—関数ã®å®Ÿè£…者ã«ã‚ˆã£ã¦ä»»æ„ã®ç›®çš„ã«ä½¿ç”¨ã•れる。 + + +# int onig_get_callout_data_by_callout_args(OnigCalloutArgs* args, int callout_num, int slot, OnigType* type, OnigValue* val) + + callout_num/slotã«ã‚ˆã£ã¦ç¤ºã•れãŸå‘¼ã³å‡ºã—スロットã«å¯¾ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®å€¤/型を返ã™ã€‚ + + ONIG_NORMAL: 正常終了 + ONIG_VALUE_IS_NOT_SET: å€¤ãŒæœªã‚»ãƒƒãƒˆ / åž‹ãŒVOID + < 0: エラーコード + + +# int onig_get_callout_data_by_callout_args_self(OnigCalloutArgs* args, int slot, OnigType* type, OnigValue* val) + + 自分自身ã®å‘¼ã³å‡ºã—ã®slotã«ã‚ˆã£ã¦ç¤ºã•れãŸã‚¹ãƒ­ãƒƒãƒˆã«å¯¾ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®å€¤/型を返ã™ã€‚ + + ONIG_NORMAL: 正常終了 + ONIG_VALUE_IS_NOT_SET: å€¤ãŒæœªã‚»ãƒƒãƒˆ / åž‹ãŒVOID + < 0: エラーコード + + +# int onig_set_callout_data_by_callout_args(OnigCalloutArgs* args, int callout_num, int slot, OnigType type, OnigValue* val) + + callout_num/slotã«ã‚ˆã£ã¦ç¤ºã•れãŸå‘¼ã³å‡ºã—スロットã«å¯¾ã™ã‚‹å€¤/型をセットã™ã‚‹ã€‚ + + ONIG_NORMAL: 正常終了 + < 0: エラーコード + + +# int onig_set_callout_data_by_callout_args_self(OnigCalloutArgs* args, int slot, OnigType type, OnigValue* val) + + 自分自身ã®å‘¼ã³å‡ºã—ã®slotã«ã‚ˆã£ã¦ç¤ºã•れãŸã‚¹ãƒ­ãƒƒãƒˆã«å¯¾ã™ã‚‹å€¤/型をセットã™ã‚‹ã€‚ + + ONIG_NORMAL: 正常終了 + < 0: エラーコード + + +# int onig_get_callout_data_by_callout_args_self_dont_clear_old(OnigCalloutArgs* args, int slot, OnigType* type, OnigValue* val) + + ã“ã®é–¢æ•°ã¯ã€onig_get_callout_data_by_callout_args_self()ã¨ã»ã¼åŒã˜ã§ã‚る。 + ã—ã‹ã—ã“ã®é–¢æ•°ã¯ã€ç¾åœ¨ã®ä½ç½®ã‚ˆã‚Šä»¥å‰ã®ç…§åˆä½ç½®ã®ä¸­ã§ã‚»ãƒƒãƒˆã•れãŸå€¤ã‚’クリアã—ãªã„。(dont_clear_old) + ä»–ã®onig_get_callout_data_xxxx()関数ã¯ã€ä»¥å‰ã®ä½ç½®ã®ç…§åˆå‡¦ç†ã®ä¸­ã§ã‚»ãƒƒãƒˆã•れãŸå€¤ã‚’クリアã™ã‚‹ã€‚ + + 例ãˆã°ã€çµ„ã¿è¾¼ã¿å‘¼ã³å‡ºã—(*TOTAL_COUNT)ã¯ã€æ¤œç´¢å‡¦ç†ã®ä¸­ã®å…¨ã¦ã®ç…§åˆå‡¦ç†ã®ç©ç®—カウントを + å¾—ã‚‹ãŸã‚ã«ã“ã®é–¢æ•°ã‚’使用ã—ã¦å®Ÿè£…ã•れã¦ã„る。 + 組ã¿è¾¼ã‚€å‘¼ã³å‡ºã—(*COUNT)ã¯ã€ã“ã®é–¢æ•°ã‚’使用ã—ãªã„ã®ã§ã€æœ€å¾Œã®æˆåŠŸã—ãŸç…§åˆå‡¦ç†ã ã‘ã® + カウントを返ã™ã€‚ + + ONIG_NORMAL: 正常終了 + ONIG_VALUE_IS_NOT_SET: å€¤ãŒæœªã‚»ãƒƒãƒˆ / åž‹ãŒVOID + < 0: エラーコード + + +(8) 呼ã³å‡ºã—データ (アプリケーションã‹ã‚‰ä½¿ç”¨ã•れる) + +# int onig_get_callout_data(OnigRegex reg, OnigMatchParam* mp, int callout_num, int slot, OnigType* type, OnigValue* val) + + callout_num/slotã«ã‚ˆã£ã¦ç¤ºã•れãŸå‘¼ã³å‡ºã—スロットã«å¯¾ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®å€¤/型を返ã™ã€‚ + + ONIG_NORMAL: 正常終了 + ONIG_VALUE_IS_NOT_SET: å€¤ãŒæœªã‚»ãƒƒãƒˆ / åž‹ãŒVOID + < 0: エラーコード + + +# int onig_get_callout_data_by_tag(OnigRegex reg, OnigMatchParam* mp, const OnigUChar* tag, const OnigUChar* tag_end, int slot, OnigType* type, OnigValue* val) + + tag/slotã«ã‚ˆã£ã¦ç¤ºã•れãŸå‘¼ã³å‡ºã—スロットã«å¯¾ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®å€¤/型を返ã™ã€‚ + + ONIG_NORMAL: 正常終了 + ONIG_VALUE_IS_NOT_SET: å€¤ãŒæœªã‚»ãƒƒãƒˆ / åž‹ãŒVOID + < 0: エラーコード + + +# int onig_set_callout_data(OnigRegex reg, OnigMatchParam* mp, int callout_num, int slot, OnigType type, OnigValue* val) + + callout_num/slotã«ã‚ˆã£ã¦ç¤ºã•れãŸå‘¼ã³å‡ºã—スロットã«å¯¾ã™ã‚‹å€¤/型をセットã™ã‚‹ã€‚ + + ONIG_NORMAL: 正常終了 + < 0: エラーコード + + +# int onig_set_callout_data_by_tag(OnigRegex reg, OnigMatchParam* mp, const OnigUChar* tag, const OnigUChar* tag_end, int slot, OnigType type, OnigValue* val) + + tag/slotã«ã‚ˆã£ã¦ç¤ºã•れãŸå‘¼ã³å‡ºã—スロットã«å¯¾ã™ã‚‹å€¤/型をセットã™ã‚‹ã€‚ + + ONIG_NORMAL: 正常終了 + < 0: エラーコード + + +# int onig_get_callout_data_dont_clear_old(OnigRegex reg, OnigMatchParam* mp, int callout_num, int slot, OnigType* type, OnigValue* val) + + ã“ã®é–¢æ•°ã‚’使用ã™ã‚‹å¿…è¦ã¯ãªã„ã¨æ€ã‚れる。 + 廃止予定。 + + +# int onig_get_callout_data_by_tag_dont_clear_old(regex_t* reg, OnigMatchParam* mp, const UChar* tag, const UChar* tag_end, int slot, OnigType* type, OnigValue* val) + + tag/slotã«ã‚ˆã£ã¦ç¤ºã•れãŸå‘¼ã³å‡ºã—スロットã«å¯¾ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®å€¤/型を返ã™ã€‚ + ã“ã®é–¢æ•°ã¯ã€ç¾åœ¨ã®ä½ç½®ã‚ˆã‚Šä»¥å‰ã®ç…§åˆä½ç½®ã®ä¸­ã§ã‚»ãƒƒãƒˆã•れãŸå€¤ã‚’クリアã—ãªã„。 + (dont_clear_old) + + ONIG_NORMAL: 正常終了 + ONIG_VALUE_IS_NOT_SET: å€¤ãŒæœªã‚»ãƒƒãƒˆ / åž‹ãŒVOID + < 0: エラーコード + + +(9) ãã®ä»–ã®é–¢æ•° + +# OnigUChar* onig_get_callout_name_by_name_id(int name_id) + + åå‰ã®è­˜åˆ¥å­ã«å¯¾ã™ã‚‹åå‰ã‚’è¿”ã™ã€‚ + 䏿­£ãªè­˜åˆ¥å­ãŒæ¸¡ã•れãŸå ´åˆã«ã¯ï¼ã‚’è¿”ã™ã€‚ + + +# int onig_get_capture_range_in_callout(OnigCalloutArgs* args, int mem_num, int* begin, int* end) + + ç¾åœ¨ã®æ•ç²ç¯„囲を返ã™ã€‚ + ä½ç½®ã¯ã€å¯¾è±¡æ–‡å­—列ã«å¯¾ã™ã‚‹ãƒã‚¤ãƒˆå˜ä½ã§è¡¨ã•れる。 + 未æ•ç²ã®mem_numã«å¯¾ã—ã¦ã¯ã€ONIG_REGION_NOTPOSãŒã‚»ãƒƒãƒˆã•れる。 + + +# int onig_get_used_stack_size_in_callout(OnigCalloutArgs* args, int* used_num, int* used_bytes) + + ç¾åœ¨ä½¿ç”¨ã•れã¦ã„ã‚‹ç…§åˆå‡¦ç†ç”¨ã‚¹ã‚¿ãƒƒã‚¯ã‚µã‚¤ã‚ºã‚’è¿”ã™ã€‚ + + used_num: è¦ç´ æ•° + used_bytes: ãƒã‚¤ãƒˆæ•° + +//END diff --git a/internal/components/third_party/oniguruma/doc/CALLOUTS.BUILTIN b/internal/components/third_party/oniguruma/doc/CALLOUTS.BUILTIN new file mode 100644 index 0000000000..3c3c40b20a --- /dev/null +++ b/internal/components/third_party/oniguruma/doc/CALLOUTS.BUILTIN @@ -0,0 +1,104 @@ +CALLOUTS.BUILTIN 2024/07/04 + + +* FAIL (progress) + + (*FAIL) + + Always fail. + + +* MISMATCH (progress) + + (*MISMATCH) + + Terminates Match process. + Continues Search process. + + +* ERROR (progress) + + (*ERROR{n::LONG}) + + Terminates Search/Match process. + + Return value is the argument 'n'. (The value must be less than -1) + 'n' is an optional argument. (default value is ONIG_ABORT) + + +* MAX (progress/retraction) + + (*MAX{n::LONG/TAG, c::CHAR}) + + Restricts the maximum count of success(default), progress or retraction. + If 'n' type is tag, slot 0 value of the tag are used. + Depends on 'c' argument, the slot 0 value changes. + 'c' is an optional argument, default value is 'X'. + + (* success count = progress count - retraction count) + + + ex. "(?:(*COUNT[T]{X})a)*(?:(*MAX{T})c)*" + + [callout data] + slot 0: '>': progress count, '<': retraction count, 'X': success count (default) + + +* COUNT (progress/retraction) + + (*COUNT{c::CHAR}) + + Counter. + Depends on 'c' argument, the slot 0 value changes. + 'c' is an optional argument, default value is '>'. + + [callout data] + slot 0: '>': progress count (default), '<': retraction count, 'X': success count + slot 1: progress count + slot 2: retraction count + + ** If option ONIG_OPTION_FIND_LONGEST or ONIG_OPTION_FIND_NOT_EMPTY is used, + counts are not accurate. + + +* TOTAL_COUNT (progress/retraction) + + (*TOTAL_COUNT{c::CHAR}) + + It's the almost same as COUNT. + But the counts are integrated in a search process. + 'c' is an optional argument, default value is '>'. + + [callout data] + slot 0: '>': progress count (default), '<': retraction count, 'X': success count + slot 1: progress count + slot 2: retraction count + + ** If option ONIG_OPTION_FIND_LONGEST or ONIG_OPTION_FIND_NOT_EMPTY is used, + counts are not accurate. + + +* CMP (progress) + + (*CMP{x::TAG/LONG, op::STRING, y::TAG/LONG}) + + Compares x value and y value with op operator. + If x and y types are tag, slot 0 value of the tag are used. + + op: '==', '!=', '>', '<', '>=', '<=' + + ex. "(?:(*MAX[TA]{7})a|(*MAX[TB]{5})b)*(*CMP{TA,>=,4})" + + [callout data] + slot 0: op value (enum OP_CMP in src/regexec.c) + + +* SKIP (progress) + + (*SKIP) + + Advance the position where the current matching fails and the next search + begins to the current position. + It has no effect on the current matching. + +//END diff --git a/internal/components/third_party/oniguruma/doc/CALLOUTS.BUILTIN.ja b/internal/components/third_party/oniguruma/doc/CALLOUTS.BUILTIN.ja new file mode 100644 index 0000000000..dabadcd652 --- /dev/null +++ b/internal/components/third_party/oniguruma/doc/CALLOUTS.BUILTIN.ja @@ -0,0 +1,101 @@ +CALLOUTS.BUILTIN.ja 2024/07/04 + + +* FAIL (å‰é€²) + + (*FAIL) + + 常ã«å¤±æ•—ã™ã‚‹ + + +* MISMATCH (å‰é€²) + + (*MISMATCH) + + ç…§åˆã‚’中止ã™ã‚‹ + 検索ã¯ç¶™ç¶šã™ã‚‹ + + +* ERROR (å‰é€²) + + (*ERROR{n::LONG}) + + 検索/ç…§åˆã‚’中止ã™ã‚‹ + 戻り値ã¯å¼•æ•°'n'ã®å€¤ã€‚(-1よりå°ã•ã„è² ã®å€¤ã§ãªã‘れã°ãªã‚‰ãªã„) + 'n'ã¯ã‚ªãƒ—ション引数ã§ã€ãƒ‡ãƒ•ォルト値ã¯ONIG_ABORT + + +* MAX (å‰é€²/後退) + + (*MAX{n::LONG/TAG, c::CHAR}) + + æˆåŠŸ(デフォルト)ã€å‰é€²ã¾ãŸã¯å¾Œé€€å›žæ•°ã‚’制é™ã™ã‚‹ + 'n'ãŒTAGã®ã¨ãã¯ã€ãã®TAGã®calloutã®slot 0ã®å€¤ãŒä½¿ç”¨ã•れる + 'c'引数ã®å€¤ã«ã‚ˆã£ã¦ã€slot 0ã®å€¤ãŒå¤‰åŒ–ã™ã‚‹ + 'c'ã¯ã‚ªãƒ—ション引数ã§ã€ãƒ‡ãƒ•ォルト値ã¯'X' + + 例: "(?:(*COUNT[T]{X})a)*(?:(*MAX{T})c)*" + + [callout data] + slot 0: '>': å‰é€²å›žæ•°, '<': 後退回数, 'X': æˆåŠŸå›žæ•°(デフォルト) + + +* COUNT (å‰é€²/後退) + + (*COUNT{c::CHAR}) + + カウンタ + 'c'引数ã®å€¤ã«ã‚ˆã£ã¦ã€slot 0ã®å€¤ãŒå¤‰åŒ–ã™ã‚‹ + 'c'ã¯ã‚ªãƒ—ション引数ã§ã€ãƒ‡ãƒ•ォルト値ã¯'>' + + [callout data] + slot 0: '>': å‰é€²å›žæ•°(デフォルト), '<': 後退回数, 'X': æˆåŠŸå›žæ•° + slot 1: å‰é€²å›žæ•° + slot 2: 後退回数 + + (* æˆåŠŸå›žæ•° = å‰é€²å›žæ•° - 後退回数) + + ** ONIG_OPTION_FIND_LONGEST ã¾ãŸã¯ ONIG_OPTION_FIND_NOT_EMPTY ãŒä½¿ç”¨ã•れる㨠+ 正確ãªå‹•作ãŒã§ããªããªã‚‹ + + +* TOTAL_COUNT (å‰é€²/後退) + + (*TOTAL_COUNT{c::CHAR}) + + ã“れã¯COUNTã¨ã»ã¨ã‚“ã©åŒã˜ + ã—ã‹ã—ã€ã‚«ã‚¦ãƒ³ãƒˆãŒæ¤œç´¢éŽç¨‹ã§ç©ç®—ã•れる + 'c'ã¯ã‚ªãƒ—ション引数ã§ã€ãƒ‡ãƒ•ォルト値ã¯'>' + + [callout data] + slot 0: '>': å‰é€²å›žæ•°(デフォルト), '<': 後退回数, 'X': æˆåŠŸå›žæ•° + slot 1: å‰é€²å›žæ•° + slot 2: 後退回数 + + ** ONIG_OPTION_FIND_LONGEST ã¾ãŸã¯ ONIG_OPTION_FIND_NOT_EMPTY ãŒä½¿ç”¨ã•れる㨠+ 正確ãªå‹•作ãŒã§ããªããªã‚‹ + + +* CMP (å‰é€²) + + (*CMP{x::TAG/LONG, op::STRING, y::TAG/LONG}) + + xã®å€¤ã¨yã®å€¤ã‚’op演算å­ã§æ¯”較ã™ã‚‹ + x, yãŒTAGã®ã¨ãã«ã¯ãã®calloutã®slot 0ã®å€¤ãŒå‚ç…§ã•れる + + op: '==', '!=', '>', '<', '>=', '<=' + + 例: "(?:(*MAX[TA]{7})a|(*MAX[TB]{5})b)*(*CMP{TA,>=,4})" + + [callout data] + slot 0: op値 (src/regexec.c ã®ä¸­ã® enum OP_CMP) + + +* SKIP (å‰é€²) + + (*SKIP) + + ç¾åœ¨ã®ãƒžãƒƒãƒãƒ³ã‚°ãŒå¤±æ•—ã—ã¦æ¬¡ã®æ¤œç´¢ã‚’é–‹å§‹ã™ã‚‹ä½ç½®ã‚’ã€ç¾åœ¨ä½ç½®ã¾ã§å‰é€²ã•ã›ã‚‹ + ç¾åœ¨ã®ãƒžãƒƒãƒãƒ³ã‚°ã«ã¯ä½•ã®å½±éŸ¿ã‚‚与ãˆãªã„ + +//END diff --git a/internal/components/third_party/oniguruma/doc/FAQ b/internal/components/third_party/oniguruma/doc/FAQ new file mode 100644 index 0000000000..dfbd7fac79 --- /dev/null +++ b/internal/components/third_party/oniguruma/doc/FAQ @@ -0,0 +1,12 @@ +FAQ 2006/11/14 + +1. Longest match + + You can execute the longest match by using ONIG_OPTION_FIND_LONGEST option + in onig_new(). + +2. Mailing list + + There is no mailing list for Oniguruma. + +// END diff --git a/internal/components/third_party/oniguruma/doc/FAQ.ja b/internal/components/third_party/oniguruma/doc/FAQ.ja new file mode 100644 index 0000000000..2df48803c5 --- /dev/null +++ b/internal/components/third_party/oniguruma/doc/FAQ.ja @@ -0,0 +1,22 @@ +FAQ 2022/02/04 + +1. 最長マッム+ + onig_new()ã®ä¸­ã§ã€ONIG_OPTION_FIND_LONGESTオプション + を使用ã™ã‚Œã°æœ€é•·ãƒžãƒƒãƒã«ãªã‚‹ã€‚ + + +2. CR + LF + + DOSã®æ”¹è¡Œ(CR(0x0d) + LF(0x0a)ã®é€£ç¶š) + + regenc.hã®ä¸­ã®ã€ä»¥ä¸‹ã®éƒ¨åˆ†ã‚’有効ã«ã™ã‚‹ã€‚ + + /* #define USE_CRNL_AS_LINE_TERMINATOR */ + + +3. メーリングリスト + + 鬼車ã«é–¢ã™ã‚‹ãƒ¡ãƒ¼ãƒªãƒ³ã‚°ãƒªã‚¹ãƒˆã¯å­˜åœ¨ã—ãªã„。 + +//END diff --git a/internal/components/third_party/oniguruma/doc/RE b/internal/components/third_party/oniguruma/doc/RE new file mode 100644 index 0000000000..f459ba3d64 --- /dev/null +++ b/internal/components/third_party/oniguruma/doc/RE @@ -0,0 +1,595 @@ +Oniguruma Regular Expressions Version 6.9.9 2024/06/10 + +syntax: ONIG_SYNTAX_ONIGURUMA (default syntax) + + +1. Syntax elements + + \ escape (enable or disable meta character) + | alternation + (...) group + [...] character class + + +2. Characters + + \t horizontal tab (0x09) + \v vertical tab (0x0B) + \n newline (line feed) (0x0A) + \r carriage return (0x0D) + \b backspace (0x08) + \f form feed (0x0C) + \a bell (0x07) + \e escape (0x1B) + \nnn octal char (encoded byte value) + \xHH hexadecimal char (encoded byte value) + \x{7HHHHHHH} (1-8 digits) hexadecimal char (code point value) + \o{17777777777} (1-11 digits) octal char (code point value) + \uHHHH hexadecimal char (code point value) + \cx control char (code point value) + \C-x control char (code point value) + \M-x meta (x|0x80) (code point value) + \M-\C-x meta control char (code point value) + + (* \b as backspace is effective in character class only) + + +2.1 Code point sequences + + Hexadecimal code point (1-8 digits) + \x{7HHHHHHH 7HHHHHHH ... 7HHHHHHH} + + Octal code point (1-11 digits) + \o{17777777777 17777777777 ... 17777777777} + + +3. Character types + + . any character (except newline) + + \w word character + + Not Unicode: + alphanumeric, "_" and multibyte char. + + Unicode: + General_Category -- (Letter|Mark|Number|Connector_Punctuation) + + \W non-word char + + \s whitespace char + + Not Unicode: + \t, \n, \v, \f, \r, \x20 + + Unicode case: + U+0009, U+000A, U+000B, U+000C, U+000D, U+0085(NEL), + General_Category -- Line_Separator + -- Paragraph_Separator + -- Space_Separator + + \S non-whitespace char + + \d decimal digit char + + Unicode: General_Category -- Decimal_Number + + \D non-decimal-digit char + + \h hexadecimal digit char [0-9a-fA-F] + + \H non-hexdigit char + + \R general newline (* can't be used in character-class) + "\r\n" or \n,\v,\f,\r (* but doesn't backtrack from \r\n to \r) + + Unicode case: + "\r\n" or \n,\v,\f,\r or U+0085, U+2028, U+2029 + + \N negative newline (?-m:.) + + \O true anychar (?m:.) (* original function) + + \X Text Segment \X === (?>\O(?:\Y\O)*) + + The meaning of this operator changes depending on the setting of + the option (?y{..}). + + \X doesn't check whether matching start position is boundary or not. + Please write as \y\X if you want to ensure it. + + [Extended Grapheme Cluster mode] (default) + Unicode case: + See [Unicode Standard Annex #29: http://unicode.org/reports/tr29/] + + Not Unicode case: \X === (?>\r\n|\O) + + [Word mode] + Currently, this mode is supported in Unicode only. + See [Unicode Standard Annex #29: http://unicode.org/reports/tr29/] + + + Character Property + + * \p{property-name} + * \p{^property-name} (negative) + * \P{property-name} (negative) + + property-name: + + + works on all encodings + Alnum, Alpha, Blank, Cntrl, Digit, Graph, Lower, + Print, Punct, Space, Upper, XDigit, Word, ASCII + + + works on EUC_JP, Shift_JIS + Hiragana, Katakana + + + works on UTF8, UTF16, UTF32 + See doc/UNICODE_PROPERTIES. + + + +4. Quantifier + + greedy + + ? 1 or 0 times + * 0 or more times + + 1 or more times + {n,m} (n <= m) at least n but no more than m times + {n,} at least n times + {,n} at least 0 but no more than n times ({0,n}) + {n} n times + + + reluctant + + ?? 0 or 1 times + *? 0 or more times + +? 1 or more times + {n,m}? (n <= m) at least n but not more than m times + {n,}? at least n times + {,n}? at least 0 but not more than n times (== {0,n}?) + + {n}? is reluctant operator in ONIG_SYNTAX_JAVA and ONIG_SYNTAX_PERL only. + (In that case, it doesn't make sense to write so.) + In default syntax, /a{n}?/ === /(?:a{n})?/ + + + possessive (greedy and does not backtrack once match) + + ?+ 1 or 0 times + *+ 0 or more times + ++ 1 or more times + {n,m} (n > m) at least m but not more than n times + + {n,m}+, {n,}+, {n}+ are possessive operators in ONIG_SYNTAX_JAVA and + ONIG_SYNTAX_PERL only. + + ex. /a*+/ === /(?>a*)/ + + +5. Anchors + + ^ beginning of the line + $ end of the line + \b word boundary + \B non-word boundary + + \A beginning of string + \Z end of string, or before newline at the end + \z end of string + \G where the current search attempt begins + \K keep (keep start position of the result string) + + + \y Text Segment boundary + \Y Text Segment non-boundary + + The meaning of these operators(\y, \Y) changes depending on the setting + of the option (?y{..}). + + [Extended Grapheme Cluster mode] (default) + Unicode case: + See [Unicode Standard Annex #29: http://unicode.org/reports/tr29/] + + Not Unicode: + All positions except between \r and \n. + + [Word mode] + Currently, this mode is supported in Unicode only. + See [Unicode Standard Annex #29: http://unicode.org/reports/tr29/] + + + +6. Character class + + ^... negative class (lowest precedence) + x-y range from x to y + [...] set (character class in character class) + ..&&.. intersection (low precedence, only higher than ^) + + ex. [a-w&&[^c-g]z] ==> ([a-w] AND ([^c-g] OR z)) ==> [abh-w] + + * If you want to use '[', '-', or ']' as a normal character + in character class, you should escape them with '\'. + + + POSIX bracket ([:xxxxx:], negate [:^xxxxx:]) + + Not Unicode Case: + + alnum alphabet or digit char + alpha alphabet + ascii code value: [0 - 127] + blank \t, \x20 + cntrl + digit 0-9 + graph include all of multibyte encoded characters + lower + print include all of multibyte encoded characters + punct + space \t, \n, \v, \f, \r, \x20 + upper + xdigit 0-9, a-f, A-F + word alphanumeric, "_" and multibyte characters + + + Unicode Case: + + alnum Alphabetic | Decimal_Number + alpha Alphabetic + ascii U+0000 - U+007F + blank Space_Separator | U+0009 + cntrl U+0000 - U+001F, U+007F - U+009F + digit Decimal_Number + graph ^White_Space && ^[[:cntrl:]] && ^Unassigned && ^Surrogate + lower Lowercase + print [[:graph:]] | Space_Separator + punct Punctuation | Symbol + space White_Space + upper Uppercase + xdigit U+0030 - U+0039 | U+0041 - U+0046 | U+0061 - U+0066 + (0-9, a-f, A-F) + word Alphabetic | Mark | Decimal_Number | Connector_Punctuation + + + +7. Extended groups + + (?#...) comment + + (?imxWDSPy-imxWDSP:subexp) option on/off for subexp + + i: ignore case + m: multi-line (dot (.) also matches newline) + x: extended form + W: ASCII only word (\w, \p{Word}, [[:word:]]) + ASCII only word bound (\b) + D: ASCII only digit (\d, \p{Digit}, [[:digit:]]) + S: ASCII only space (\s, \p{Space}, [[:space:]]) + P: ASCII only POSIX properties (includes W,D,S) + (alnum, alpha, blank, cntrl, digit, graph, + lower, print, punct, space, upper, xdigit, word) + + y{?}: Text Segment mode + This option changes the meaning of \X, \y, \Y. + Currently, this option is supported in Unicode only. + + y{g}: Extended Grapheme Cluster mode (default) + y{w}: Word mode + See [Unicode Standard Annex #29] + + (?imxWDSPy-imxWDSP) isolated option + + * It makes a group to the next ')' or end of the pattern. + /ab(?i)c|def|gh/ == /ab(?i:c|def|gh)/ + + * (?i) option has no effect on word types (\w, \p{Word}). However, if the word types are used within a character class, it is valid. But, this would only be a concern when word types are used with the (?W) option. + + + /(?CIL).../, /(?CIL:...)/ whole option + + This option must be placed in a position that + affects the entire regular expression. + + C: ONIG_OPTION_DONT_CAPTURE_GROUP + I: ONIG_OPTION_IGNORECASE_IS_ASCII + L: ONIG_OPTION_FIND_LONGEST + + (?:subexp) non-capturing group + (subexp) capturing group + + (?=subexp) look-ahead + (?!subexp) negative look-ahead + + (?<=subexp) look-behind + (?subexp) atomic group + no backtracks in subexp. + + (?subexp), (?'name'subexp) + define named group + (Each character of the name must be a word character.) + + Not only a name but a number is assigned like a capturing + group. + + Assigning the same name to two or more subexps is allowed. + + + + + * Callouts of contents + (?{...contents...}) callout in progress + (?{...contents...}D) D is a direction flag char + D = 'X': in progress and retraction + '<': in retraction only + '>': in progress only + (?{...contents...}[tag]) tag assigned + (?{...contents...}[tag]D) + + * Escape characters have no effects in contents. + * contents is not allowed to start with '{'. + + (?{{{...contents...}}}) n times continuations '}' in contents is allowed in + (n+1) times continuations {{{...}}}. + + Allowed tag string characters: _ A-Z a-z 0-9 (* first character: _ A-Z a-z) + + + * Callouts of name + (*name) + (*name{args...}) with args + (*name[tag]) tag assigned + (*name[tag]{args...}) + + Allowed name string characters: _ A-Z a-z 0-9 (* first character: _ A-Z a-z) + Allowed tag string characters: _ A-Z a-z 0-9 (* first character: _ A-Z a-z) + + + + + (?~absent) Absent repeater (* proposed by Tanaka Akira) + This works like .* (more precisely \O*), but it is + limited by the range that does not include the string + match with . + This is a written abbreviation of (?~|(?:absent)|\O*). + \O* is used as a repeater. + + (?~|absent|exp) Absent expression (* original) + This works like "exp", but it is limited by the range + that does not include the string match with . + + ex. (?~|345|\d*) "12345678" ==> "12", "1", "" + + (?~|absent) Absent stopper (* original) + After passed this operator, string right range is limited + at the point that does not include the string match with + . + + (?~|) Range clear + Clear the effects caused by Absent stoppers. + + * Nested Absent functions are not supported and the behavior + is undefined. + + + + + (?(condition_exp)then_exp|else_exp) if-then-else + (?(condition_exp)then_exp) if-then + + condition_exp can be a backreference number/name or a normal + regular expression. + When condition_exp is a backreference number/name, both then_exp and + else_exp can be omitted. + Then it works as a backreference validity checker. + + [ Backreference validity checker ] (* original) + + (?(n)), (?(-n)), (?(+n)), (?(n+level)) ... + (?()), (?('-n')), (?(<+n>)) ... + (?()), (?('name')), (?()) ... + + + +8. Backreferences + + When we say "backreference a group," it actually means, "re-match the same + text matched by the subexp in that group." + + \n \k \k'n' (n >= 1) backreference the nth group in the regexp + \k<-n> \k'-n' (n >= 1) backreference the nth group counting + backwards from the referring position + \k<+n> \k'+n' (n >= 1) backreference the nth group counting + forwards from the referring position + \k \k'name' backreference a group with the specified name + + When backreferencing with a name that is assigned to more than one groups, + the last group with the name is checked first, if not matched then the + previous one with the name, and so on, until there is a match. + + * Backreference by number is forbidden if any named group is defined and + ONIG_OPTION_CAPTURE_GROUP is not set. + + + backreference with recursion level + + (n >= 1, level >= 0) + + \k \k'n+level' + \k \k'n-level' + + \k \k'name+level' + \k \k'name-level' + + Destine a group on the recursion level relative to the referring position. + + ex 1. + + /\A(?|.|(?:(?.)\g\k))\z/.match("reee") + /\A(?|.|(?:(?.)\g\k))\z/.match("reer") + + \k refers to the (?.) on the same recursion level with it. + + ex 2. + + r = Regexp.compile(<<'__REGEXP__'.strip, Regexp::EXTENDED) + (? \g \g* \g ){0} + (? < \g \s* > ){0} + (? [a-zA-Z_:]+ ){0} + (? [^<&]+ (\g | [^<&]+)* ){0} + (? >){0} + \g + __REGEXP__ + + p r.match("fbbbf").captures + + +9. Subexp calls ("Tanaka Akira special") (* original function) + + When we say "call a group," it actually means, "re-execute the subexp in + that group." + + \g \g'n' (n >= 1) call the nth group + \g<0> \g'0' call zero (call the total regexp) + \g<-n> \g'-n' (n >= 1) call the nth group counting backwards from + the calling position + \g<+n> \g'+n' (n >= 1) call the nth group counting forwards from + the calling position + \g \g'name' call the group with the specified name + + * Left-most recursive calls are not allowed. + + ex. (?a|\gb) => error + (?a|b\gc) => OK + + * Calls with a name that is assigned to more than one groups are not + allowed. + + * Call by number is forbidden if any named group is defined and + ONIG_OPTION_CAPTURE_GROUP is not set. + + * The option status of the called group is always effective. + + ex. /(?-i:\g)(?i:(?a)){0}/.match("A") + + +10. Captured group + + Behavior of an unnamed group (...) changes with the following conditions. + (But named group is not changed.) + + case 1. /.../ (named group is not used, no option) + + (...) is treated as a capturing group. + + case 2. /.../g (named group is not used, 'g' option) + + (...) is treated as a non-capturing group (?:...). + + case 3. /..(?..)../ (named group is used, no option) + + (...) is treated as a non-capturing group. + numbered-backref/call is not allowed. + + case 4. /..(?..)../G (named group is used, 'G' option) + + (...) is treated as a capturing group. + numbered-backref/call is allowed. + + where + g: ONIG_OPTION_DONT_CAPTURE_GROUP + G: ONIG_OPTION_CAPTURE_GROUP + + ('g' and 'G' options are argued in ruby-dev ML) + + + +----------------------------- +A-1. Syntax-dependent options + + + ONIG_SYNTAX_ONIGURUMA + (?m): dot (.) also matches newline + + + ONIG_SYNTAX_PERL and ONIG_SYNTAX_JAVA + (?s): dot (.) also matches newline + (?m): ^ matches after newline, $ matches before newline + + +A-2. Original extensions + + + hexadecimal digit char type \h, \H + + true anychar \O + + text segment boundary \y, \Y + + backreference validity checker (?(...)) + + named group (?...), (?'name'...) + + named backref \k + + subexp call \g, \g + + absent expression (?~|...|...) + + absent stopper (?~|...) + + +A-3. Missing features compared with perl 5.8.0 + + + \N{name} + + \l,\u,\L,\U,\C + + (??{code}) + + * \Q...\E + This is effective on ONIG_SYNTAX_PERL and ONIG_SYNTAX_JAVA. + + +A-4. Differences with Japanized GNU regex(version 0.12) of Ruby 1.8 + + + add character property (\p{property}, \P{property}) + + add hexadecimal digit char type (\h, \H) + + add look-behind + (?<=fixed-width-pattern), (?>]/ in EUC-JP encoding. + + effect range of isolated option is to next ')'. + ex. (?:(?i)a|b) is interpreted as (?:(?i:a|b)), not (?:(?i:a)|b). + + isolated option is not transparent to previous pattern. + ex. a(?i)* is a syntax error pattern. + + allowed unpaired left brace as a normal character. + ex. /{/, /({)/, /a{2,3/ etc... + + negative POSIX bracket [:^xxxx:] is supported. + + POSIX bracket [:ascii:] is added. + + repeat of look-ahead is not allowed. + ex. /(?=a)*/, /(?!b){5}/ + + Ignore case option is effective to escape sequence. + ex. /\x61/i =~ "A" + + In the range quantifier, the number of the minimum is optional. + /a{,n}/ == /a{0,n}/ + The omission of both minimum and maximum values is not allowed. + /a{,}/ + + /{n}?/ is not a reluctant quantifier. + /a{n}?/ == /(?:a{n})?/ + + invalid back reference is checked and raises error. + /\1/, /(a)\2/ + + Zero-width match in an infinite loop stops the repeat, + then changes of the capture group status are checked as stop condition. + /(?:()|())*\1\2/ =~ "" + /(?:\1a|())*/ =~ "a" + +// END diff --git a/internal/components/third_party/oniguruma/doc/RE.ja b/internal/components/third_party/oniguruma/doc/RE.ja new file mode 100644 index 0000000000..af8af58d02 --- /dev/null +++ b/internal/components/third_party/oniguruma/doc/RE.ja @@ -0,0 +1,602 @@ +鬼車 æ­£è¦è¡¨ç¾ Version 6.9.9 2024/06/10 + +使用文法: ONIG_SYNTAX_ONIGURUMA (既定値) + + +1. 基本è¦ç´  + + \ 退é¿ä¿®é£¾ (エスケープ) æ­£è¦è¡¨ç¾è¨˜å·ã®æœ‰åй/無効ã®åˆ¶å¾¡ + | é¸æŠžå­ + (...) å¼é›†åˆ (グループ) + [...] æ–‡å­—é›†åˆ (文字クラス) + + +2. 文字 + + \t 水平タブ (0x09) + \v 垂直タブ (0x0B) + \n 改行 (0x0A) + \r 復帰 (0x0D) + \b 後退空白 (0x08) + \f æ”¹é  (0x0C) + \a é˜ (0x07) + \e 退é¿ä¿®é£¾ (0x1B) + \nnn å…«é€²æ•°è¡¨ç¾ ç¬¦å·åŒ–ãƒã‚¤ãƒˆå€¤ + \xHH åå…­é€²æ•°è¡¨ç¾ ç¬¦å·åŒ–ãƒã‚¤ãƒˆå€¤ + \x{7HHHHHHH} (1-8æ¡) æ‹¡å¼µåå…­é€²æ•°è¡¨ç¾ ã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ³ãƒˆå€¤ + \o{17777777777} (1-11æ¡) æ‹¡å¼µå…«é€²æ•°è¡¨ç¾ ã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ³ãƒˆå€¤ + \uHHHH æ‹¡å¼µåå…­é€²æ•°è¡¨ç¾ ã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ³ãƒˆå€¤ + \cx åˆ¶å¾¡æ–‡å­—è¡¨ç¾ ã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ³ãƒˆå€¤ + \C-x åˆ¶å¾¡æ–‡å­—è¡¨ç¾ ã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ³ãƒˆå€¤ + \M-x è¶… (x|0x80) コードãƒã‚¤ãƒ³ãƒˆå€¤ + \M-\C-x è¶… + åˆ¶å¾¡æ–‡å­—è¡¨ç¾ ã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ³ãƒˆå€¤ + + ※ \bã¯ã€æ–‡å­—集åˆå†…ã§ã®ã¿æœ‰åй + + +2.1 コードãƒã‚¤ãƒ³ãƒˆé€£ç¶šè¡¨è¨˜ + + å六進数表ç¾ã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ³ãƒˆ (1-8æ¡) + \x{7HHHHHHH 7HHHHHHH ... 7HHHHHHH} + + 八進数表ç¾ã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ³ãƒˆ (1-11æ¡) + \o{17777777777 17777777777 ... 17777777777} + + +3. 文字種 + + . ä»»æ„æ–‡å­— (改行を除ã: オプションã«ä¾å­˜) + + \w å˜èªžæ§‹æˆæ–‡å­— + + Unicode以外ã®å ´åˆ: + 英数字, "_" ãŠã‚ˆã³ 多ãƒã‚¤ãƒˆæ–‡å­—。 + + Unicodeã®å ´åˆ: + General_Category -- (Letter|Mark|Number|Connector_Punctuation) + + \W éžå˜èªžæ§‹æˆæ–‡å­— + + \s 空白文字 + + Unicode以外ã®å ´åˆ: + \t, \n, \v, \f, \r, \x20 + + Unicodeã®å ´åˆ: + U+0009, U+000A, U+000B, U+000C, U+000D, U+0085(NEL), + General_Category -- Line_Separator + -- Paragraph_Separator + -- Space_Separator + + \S éžç©ºç™½æ–‡å­— + + \d 10進数字 + + Unicodeã®å ´åˆ: General_Category -- Decimal_Number + + \D éž10進数字 + + \h 16進数字 [0-9a-fA-F] + + \H éž16進数字 + + \R 汎改行 (* 文字集åˆã®ä¸­ã§ã¯ä½¿ç”¨ã§ããªã„) + "\r\n" or \n,\v,\f,\r (* 但㗠\r\nã‹ã‚‰\rã«ã¯ãƒãƒƒã‚¯ãƒˆãƒ©ãƒƒã‚¯ã—ãªã„) + + Unicodeã®å ´åˆ: + "\r\n" or \n,\v,\f,\r or U+0085, U+2028, U+2029 + + \N éžæ”¹è¡Œæ–‡å­— (?-m:.) + + \O çœŸä»»æ„æ–‡å­— (?m:.) (* 原作) + + \X 文章区分 \X === (?>\O(?:\Y\O)*) + + ã“ã®æ¼”ç®—å­ã®æ„味ã¯ã€ã‚ªãƒ—ション (?y{..})ã®è¨­å®šã«ã‚ˆã£ã¦å¤‰åŒ–ã™ã‚‹ã€‚ + + \Xã¯ç…§åˆã®é–‹å§‹ä½ç½®ãŒåŒºåˆ†ã®å¢ƒç•Œã‹ã©ã†ã‹ã‚’確èªã—ãªã„。 + ãれを確実ã«ã—ãŸã‘れã°ã€\y\Xã¨æ›¸ã‘ã°è‰¯ã„。 + + [拡張書記素房-状態ã®ã¨ã] (デフォルト) + Unicodeã®å ´åˆ: + å‚ç…§ [Unicode Standard Annex #29: http://unicode.org/reports/tr29/] + + Unicode以外ã®å ´åˆ: \X === (?>\r\n|\O) + + [å˜èªž-状態ã®ã¨ã] + ç¾åœ¨ã€Unicodeã—ã‹ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ãªã„。 + å‚ç…§ [Unicode Standard Annex #29: http://unicode.org/reports/tr29/] + + + Character Property + + * \p{property-name} + * \p{^property-name} (negative) + * \P{property-name} (negative) + + property-name: + + + å…¨ã¦ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã§æœ‰åй + Alnum, Alpha, Blank, Cntrl, Digit, Graph, Lower, + Print, Punct, Space, Upper, XDigit, Word, ASCII, + + + EUC-JP, Shift_JISã§æœ‰åй + Hiragana, Katakana + + + UTF8, UTF16, UTF32ã§æœ‰åй + doc/UNICODE_PROPERTIESå‚ç…§ + + + +4. 釿Œ‡å®šå­ + + 欲張り + + ? 一回ã¾ãŸã¯é›¶å›ž + * 零回以上 + + 一回以上 + {n,m} (n <= m) n回以上 ã‹ã¤ m回以下 + {n,} n回以上 + {,n} 零回以上n回以下 ({0,n}) + {n} n回 + + + 無欲 + + ?? 零回ã¾ãŸã¯ä¸€å›ž + *? 零回以上 + +? 一回以上 + {n,m}? (n <= m) n回以上 ã‹ã¤ m回以下 + {n,}? n回以上 + {,n}? 零回以上n回以下 (== {0,n}?) + + {n}? ã¯ONIG_SYNTAX_JAVAã¨ONIG_SYNTAX_PERLã§ã®ã¿ç„¡æ¬²ãªæŒ‡å®šå­ + (ãã®å ´åˆã«ã¯ã€æ…‹ã€…ãã†æ›¸ãæ„味ã¯ãªã„ãŒ) + ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®æ–‡æ³•ã§ã¯ã€/a{n}?/ === /(?:a{n})?/ + + + 強欲 (欲張りã§ã€ç¹°ã‚Šè¿”ã—ã«æˆåŠŸã—ãŸå¾Œã¯å›žæ•°ã‚’減らã™ã‚ˆã†ãªå¾Œé€€å†è©¦è¡Œã‚’ã—ãªã„) + + ?+ 一回ã¾ãŸã¯é›¶å›ž + *+ 零回以上 + ++ 一回以上 + {n,m} (n > m) m回以上 ã‹ã¤ n回以下 + + {n,m}+, {n,}+, {n}+ ã¯ã€ONIG_SYNTAX_JAVAã¨ONIG_SYNTAX_PERLã§ã®ã¿ + å¼·æ¬²ãªæŒ‡å®šå­ + + 例. /a*+/ === /(?>a*)/ + + +5. 錨 + + ^ 行頭 + $ 行末 + \b å˜èªžå¢ƒç•Œ + \B éžå˜èªžå¢ƒç•Œ + + \A 文字列先頭 + \Z 文字列末尾ã€ã¾ãŸã¯æ–‡å­—åˆ—æœ«å°¾ã®æ”¹è¡Œã®ç›´å‰ + \z 文字列末尾 + \G 探索開始ä½ç½® + \K ä¿æŒ (çµæžœã®é–‹å§‹ä½ç½®ã‚’ã“ã®ä½ç½®ã«ä¿ã¤) + + + \y 文章区分 境界 + \Y 文章区分 éžå¢ƒç•Œ + + ã“ã®æ¼”ç®—å­ã®æ„味ã¯ã€ã‚ªãƒ—ション (?y{..})ã®è¨­å®šã«ã‚ˆã£ã¦å¤‰åŒ–ã™ã‚‹ã€‚ + + [拡張書記素房-状態ã®ã¨ã] (デフォルト) + Unicodeã®å ´åˆ: + å‚ç…§ [Unicode Standard Annex #29: http://unicode.org/reports/tr29/] + + Unicode以外ã®å ´åˆ: + \rã¨\nã®é–“を除ãå…¨ã¦ã®ä½ç½® + + [å˜èªž-状態ã®ã¨ã] + ç¾åœ¨ã€Unicodeã—ã‹ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ãªã„。 + å‚ç…§ [Unicode Standard Annex #29: http://unicode.org/reports/tr29/] + + + +6. æ–‡å­—é›†åˆ + + ^... å¦å®š (最低優先度演算å­) + x-y 範囲 (xã‹ã‚‰yã¾ã§) + [...] é›†åˆ (文字集åˆå†…文字集åˆ) + ..&&.. ç©æ¼”ç®— (^ã®æ¬¡ã«å„ªå…ˆåº¦ãŒä½Žã„演算å­) + + 例. [a-w&&[^c-g]z] ==> ([a-w] and ([^c-g] or z)) ==> [abh-w] + + ※ '[', '-', ']'ã‚’ã€æ–‡å­—集åˆå†…ã§é€šå¸¸æ–‡å­—ã®æ„味ã§ä½¿ç”¨ã—ãŸã„å ´åˆã«ã¯ã€ + ã“ã‚Œã‚‰ã®æ–‡å­—ã‚’'\'ã§é€€é¿ä¿®é£¾ã—ãªã‘れã°ãªã‚‰ãªã„。 + + + POSIXブラケット ([:xxxxx:], å¦å®š [:^xxxxx:]) + + Unicode以外ã®å ´åˆ: + + alnum 英数字 + alpha 英字 + ascii 0 - 127 + blank \t, \x20 + cntrl + digit 0-9 + graph 多ãƒã‚¤ãƒˆæ–‡å­—全部をå«ã‚€ + lower + print 多ãƒã‚¤ãƒˆæ–‡å­—全部をå«ã‚€ + punct + space \t, \n, \v, \f, \r, \x20 + upper + xdigit 0-9, a-f, A-F + word 英数字, "_" ãŠã‚ˆã³ 多ãƒã‚¤ãƒˆæ–‡å­— + + Unicodeã®å ´åˆ: + + alnum Alphabetic | Decimal_Number + alpha Alphabetic + ascii U+0000 - U+007F + blank Space_Separator | U+0009 + cntrl U+0000 - U+001F, U+007F - U+009F + digit Decimal_Number + graph ^White_Space && ^[[:cntrl:]] && ^Unassigned && ^Surrogate + lower Lowercase + print [[:graph:]] | Space_Separator + punct Punctuation | Symbol + space White_Space + upper Uppercase + xdigit U+0030 - U+0039 | U+0041 - U+0046 | U+0061 - U+0066 + (0-9, a-f, A-F) + word Alphabetic | Mark | Decimal_Number | Connector_Punctuation + + + +7. æ‹¡å¼µå¼é›†åˆ + + (?#...) 注釈 + + (?imxWDSPy-imxWDSP:å¼) å¼ã‚ªãƒ—ション + + i: å¤§æ–‡å­—å°æ–‡å­—ç…§åˆ + m: 複数行 + x: æ‹¡å¼µå½¢å¼ + W: wordãŒASCIIã®ã¿ (\w, \p{Word}, [[:word:]]) + word境界ãŒASCIIã®ã¿ (\b) + D: digitãŒASCIIã®ã¿ (\d, \p{Digit}, [[:digit:]]) + S: spaceãŒASCIIã®ã¿ (\s, \p{Space}, [[:space:]]) + P: POSIXプロパティãŒASCIIã®ã¿ (W,D,Sã‚’å…¨ã¦å«ã‚“ã§ã„ã‚‹) + (alnum, alpha, blank, cntrl, digit, graph, + lower, print, punct, space, upper, xdigit, word) + + y{?}: 文章区分状態 + ã“ã®ã‚ªãƒ—ションã¯\X, \y, \Yã®æ„味を変更ã™ã‚‹ã€‚ + ç¾åœ¨ã“ã®ã‚ªãƒ—ションã¯Unicodeã§ã—ã‹ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ãªã„ + y{g}: 拡張書記素房-状態 (デフォルト) + y{w}: å˜èªž-状態 + å‚ç…§ [Unicode Standard Annex #29] + + (?imxWDSPy-imxWDSP) 孤立オプション + + * ã“ã‚Œã¯æ¬¡ã®')'ã¾ãŸã¯ãƒ‘ターンã®çµ‚ã‚りã¾ã§ã®ã‚°ãƒ«ãƒ¼ãƒ—ã‚’å½¢æˆã™ã‚‹ + /ab(?i)c|def|gh/ == /ab(?i:c|def|gh)/ + + * (?i)オプションã¯ã€wordタイプ(\w, \p{Word})ã«ã¯æœ‰åйã§ã¯ãªã„。但ã—wordã‚¿ã‚¤ãƒ—ãŒæ–‡å­—クラスã®ä¸­ã§ä½¿ç”¨ã•れãŸå ´åˆã¯æœ‰åйã«ãªã‚‹ã€‚ã—ã‹ã—ã€ã“ã®ã“ã¨ã¯wordタイプを(?W)オプションã¨å…±ã«ä½¿ç”¨ã—ãŸæ™‚ã«ã—ã‹æ°—ã«ã™ã‚‹å¿…è¦ã¯ãªã„ã§ã‚ã‚ã†ã€‚ + + + /(?CIL).../, /(?CIL:...)/ 全体オプション + + ã“ã®ã‚ªãƒ—ションã¯ã€æ­£è¦è¡¨ç¾å…¨ä½“ã«å½±éŸ¿ã‚’åŠã¼ã™ä½ç½® + ã«ç½®ã‹ã‚Œãªã‘れã°ãªã‚‰ãªã„ + + C: ONIG_OPTION_DONT_CAPTURE_GROUP + I: ONIG_OPTION_IGNORECASE_IS_ASCII + L: ONIG_OPTION_FIND_LONGEST + + (å¼) æ•ç²å¼é›†åˆ + (?:å¼) éžæ•ç²å¼é›†åˆ + + (?=å¼) 先読㿠+ (?!å¼) å¦å®šå…ˆèª­ã¿ + + (?<=å¼) 戻り読㿠+ (?å¼) 原å­çš„å¼é›†åˆ + å¼å…¨ä½“を通éŽã—ãŸã¨ãã€å¼ã®ä¸­ã§ã®å¾Œé€€å†è©¦è¡Œã‚’行ãªã‚ãªã„ + + (?å¼), (?'name'å¼) + åå‰ä»˜ãæ•ç²å¼é›†åˆ + å¼é›†åˆã«åå‰ã‚’割り当ã¦ã‚‹(定義ã™ã‚‹)。 + (åå‰ã¯å˜èªžæ§‹æˆæ–‡å­—ã§ãªã‘れã°ãªã‚‰ãªã„。) + + åå‰ã ã‘ã§ãªãã€æ•ç²å¼é›†åˆã¨åŒæ§˜ã«ç•ªå·ã‚‚割り当ã¦ã‚‰ã‚Œã‚‹ã€‚ + ç•ªå·æŒ‡å®šãŒç¦æ­¢ã•れã¦ã„ãªã„状態 (10. æ•ç²å¼é›†åˆ ã‚’å‚ç…§) + ã®ã¨ãã¯ã€åå‰ã‚’使ã‚ãªã„ã§ç•ªå·ã§ã‚‚å‚ç…§ã§ãる。 + + 複数ã®å¼é›†åˆã«åŒã˜åå‰ã‚’与ãˆã‚‹ã“ã¨ã¯è¨±ã•れã¦ã„る。 + ã“ã®å ´åˆã«ã¯ã€ã“ã®åå‰ã‚’使用ã—ãŸå¾Œæ–¹å‚ç…§ã¯å¯èƒ½ã§ã‚ã‚‹ãŒã€ + 部分å¼å‘¼å‡ºã—ã¯ã§ããªã„。 + + + <呼ã³å‡ºã—> + + * 内容ã®å‘¼ã³å‡ºã— + (?{...contents...}) å‰é€²ä¸­ã®ã¿ã®å‘¼ã³å‡ºã— + (?{...contents...}D) Dã¯æ–¹å‘指定文字 + D = 'X': å‰é€²ä¸­ãŠã‚ˆã³å¾Œé€€ä¸­ + '<': 後退中ã®ã¿ + '>': å‰é€²ä¸­ã®ã¿ + (?{...contents...}[tag]) åæœ­ä»˜ã + (?{...contents...}[tag]D) + + * エスケープ文字ã¯contentsã®ä¸­ã§ä½•ã®æ©Ÿèƒ½ã‚‚æŒãŸãªã„ + * contentsã¯ã€'{'文字ã§å§‹ã¾ã£ã¦ã¯ãªã‚‰ãªã„ + + (?{{{...contents...}}}) contentsã®ä¸­ã®n個連続ã®'}'ã¯ã€(n+1)個連続ã®{{{...}}} + ã®ä¸­ã§è¨±ã•れる + + tagã«è¨±ã•れる文字: _ A-Z a-z 0-9 (* 最åˆã®æ–‡å­—: _ A-Z a-z) + + + * åå‰ã®å‘¼ã³å‡ºã— + (*name) + (*name{args...}) 引数付ã + (*name[tag]) åæœ­ä»˜ã + (*name[tag]{args...}) + + nameã«è¨±ã•れる文字: _ A-Z a-z 0-9 (* 最åˆã®æ–‡å­—: _ A-Z a-z) + tag ã«è¨±ã•れる文字: _ A-Z a-z 0-9 (* 最åˆã®æ–‡å­—: _ A-Z a-z) + + + + <ä¸åœ¨æ©Ÿèƒ½ç¾¤> + + (?~ä¸åœ¨) ä¸åœ¨ç¹°ã‚Šè¿”ã— (*原案 田中哲) + ã“れ㯠.*(より正確ã«ã¯\O*)ã®ã‚ˆã†ã«å‹•作ã™ã‚‹ãŒã€<ä¸åœ¨>ã« + é©åˆã™ã‚‹æ–‡å­—列をå«ã¾ãªã„範囲ã«åˆ¶é™ã•れる。 + ã“れã¯(?~|(?:ä¸åœ¨)|\O*)ã®çœç•¥è¡¨è¨˜ã§ã‚る。 + + (?~|ä¸åœ¨|å¼) ä¸åœ¨å¼ (* 原作) + ã“れã¯<å¼>ã®ã‚ˆã†ã«å‹•作ã™ã‚‹ãŒã€<ä¸åœ¨>ã«é©åˆã™ã‚‹æ–‡å­—列を + å«ã¾ãªã„範囲ã«åˆ¶é™ã•れる。 + + 例 (?~|345|\d*) "12345678" ==> "12", "1", "" + + (?~|ä¸åœ¨) ä¸åœ¨åœæ­¢ (* 原作) + ã“ã®æ¼”ç®—å­ã‚’通éŽã—ãŸå¾Œã¯ã€å¯¾è±¡æ–‡å­—列ã®é©åˆç¯„囲㌠+ <ä¸åœ¨>ã«é©åˆã™ã‚‹æ–‡å­—列をå«ã¾ãªã„範囲ã«åˆ¶é™ã•れる。 + + (?~|) 範囲消去 + ä¸åœ¨åœæ­¢ã®åŠ¹æžœã‚’æ¶ˆã—ã¦ã€åˆæœŸã®çŠ¶æ…‹ã«ã™ã‚‹ã€‚ + + * ä¸åœ¨æ©Ÿèƒ½ã®å…¥ã‚Œå­ã«ã¯å¯¾å¿œã—ã¦ãŠã‚‰ãšã€ãã®å ´åˆã®æŒ™å‹•ã¯ä¸å®šã¨ã™ã‚‹ã€‚ + + + + <æ¡ä»¶æ–‡> + + (?(æ¡ä»¶å¼)æˆåŠŸå¼|失敗å¼) æ¡ä»¶å¼ãŒæˆåŠŸã™ã‚Œã°æˆåŠŸå¼ã€å¤±æ•—ã™ã‚Œã°å¤±æ•—å¼ã‚’実行ã™ã‚‹ + ã“ã®æ©Ÿèƒ½ã®å­˜åœ¨ç†ç”±ã¯ã€æˆåŠŸå¼ãŒå¤±æ•—ã—ã¦ã‚‚失敗å¼ã«ã¯ + 行ã‹ãªã„ã“ã¨ã€‚ã“れã¯ä»–ã®æ­£è¦è¡¨ç¾ã§æ›¸ãã“ã¨ãŒã§ããªã„。 + ã‚‚ã†ã²ã¨ã¤ã¯ã€æ¡ä»¶å¼ãŒå¾Œæ–¹å‚ç…§ã®ç•ªå·/åå‰ã®ã¨ã〠+ 後方å‚ç…§å€¤ã®æœ‰åŠ¹æ€§ã‚’èª¿ã¹ã‚‹(文字列ã¨ç…§åˆã¯ã—ãªã„) + æ„味ã«ãªã‚‹ã€‚ + + (?(æ¡ä»¶å¼)æˆåŠŸå¼) æ¡ä»¶å¼ãŒæˆåŠŸã™ã‚Œã°æˆåŠŸå¼ã‚’実行ã™ã‚‹ + (æ¡ä»¶å¼ãŒé€šå¸¸ã®å¼ã®ã¨ãã«ã¯ã€ã“ã®æ§‹æ–‡ã¯ä¸å¿…è¦ã ãŒ + 今ã®ã¨ã“ã‚エラーã«ã¯ã—ãªã„。) + + + æ¡ä»¶å¼ã¯å¾Œæ–¹å‚ç…§ã®ç•ªå·/åå‰ã¾ãŸã¯æ™®é€šã®å¼ã‚’使用ã§ãる。 + æ¡ä»¶å¼ãŒå¾Œæ–¹å‚ç…§ã®å ´åˆã€æˆåŠŸå¼ã¨å¤±æ•—å¼ã®ä¸¡æ–¹ã‚’çœç•¥å¯èƒ½ã§ã‚り〠+ ã“ã®å ´åˆã€å¾Œæ–¹å‚照値有効性を調ã¹ã‚‹(æˆåŠŸ/失敗)機能ã®ã¿ã«ãªã‚‹ã€‚ + + [後方å‚照値有効性確èªå™¨] (* 原作) + (?(n)), (?(-n)), (?(+n)), (?(n+level)) ... + (?()), (?('-n')), (?(<+n>)) ... + (?()), (?('name')), (?()) ... + + + +8. 後方å‚ç…§ + + \n ç•ªå·æŒ‡å®šå‚ç…§ (n >= 1) + \k ç•ªå·æŒ‡å®šå‚ç…§ (n >= 1) + \k'n' ç•ªå·æŒ‡å®šå‚ç…§ (n >= 1) + \k<-n> ç›¸å¯¾ç•ªå·æŒ‡å®šå‚ç…§ (n >= 1) + \k'-n' ç›¸å¯¾ç•ªå·æŒ‡å®šå‚ç…§ (n >= 1) + \k<+n> ç›¸å¯¾ç•ªå·æŒ‡å®šå‚ç…§ (n >= 1) + \k'+n' ç›¸å¯¾ç•ªå·æŒ‡å®šå‚ç…§ (n >= 1) + \k å剿Œ‡å®šå‚ç…§ + \k'name' å剿Œ‡å®šå‚ç…§ + + å剿Œ‡å®šå‚ç…§ã§ã€ãã®åå‰ãŒè¤‡æ•°ã®å¼é›†åˆã§å¤šé‡å®šç¾©ã•れã¦ã„ã‚‹å ´åˆã«ã¯ã€ + 番å·ã®å¤§ãã„å¼é›†åˆã‹ã‚‰å„ªå…ˆçš„ã«å‚ç…§ã•れる。 + (マッãƒã—ãªã„ã¨ãã«ã¯ç•ªå·ã®å°ã•ã„å¼é›†åˆãŒå‚ç…§ã•れる) + + ※ ç•ªå·æŒ‡å®šå‚ç…§ã¯ã€åå‰ä»˜ãæ•ç²å¼é›†åˆãŒå®šç¾©ã•れ〠+ ã‹ã¤ ONIG_OPTION_CAPTURE_GROUPãŒæŒ‡å®šã•れã¦ã„ãªã„å ´åˆã«ã¯ã€ + ç¦æ­¢ã•れる。(10. æ•ç²å¼é›†åˆ ã‚’å‚ç…§) + + + ãƒã‚¹ãƒˆãƒ¬ãƒ™ãƒ«ä»˜ã後方å‚ç…§ + + level: 0, 1, 2, ... + + \k (n >= 1) + \k (n >= 1) + \k'n+level' (n >= 1) + \k'n-level' (n >= 1) + + \k + \k + \k'name+level' + \k'name-level' + + 後方å‚ç…§ã®ä½ç½®ã‹ã‚‰ç›¸å¯¾çš„ãªéƒ¨åˆ†å¼å‘¼å‡ºã—ãƒã‚¹ãƒˆãƒ¬ãƒ™ãƒ«ã‚’指定ã—ã¦ã€ãã®ãƒ¬ãƒ™ãƒ«ã§ã® + æ•ç²å€¤ã‚’å‚ç…§ã™ã‚‹ã€‚ + + 例-1. + + /\A(?|.|(?:(?.)\g\k))\z/.match("reer") + + 例-2. + + r = Regexp.compile(<<'__REGEXP__'.strip, Regexp::EXTENDED) + (? \g \g* \g ){0} + (? < \g \s* > ){0} + (? [a-zA-Z_:]+ ){0} + (? [^<&]+ (\g | [^<&]+)* ){0} + (? >){0} + \g + __REGEXP__ + + p r.match('fbbbf').captures + + + +9. 部分å¼å‘¼å‡ºã— ("田中哲スペシャル") (* 原作) + + \g å剿Œ‡å®šå‘¼å‡ºã— + \g'name' å剿Œ‡å®šå‘¼å‡ºã— + \g ç•ªå·æŒ‡å®šå‘¼å‡ºã— (n >= 1) + \g'n' ç•ªå·æŒ‡å®šå‘¼å‡ºã— (n >= 1) + \g<0> ç•ªå·æŒ‡å®šå‘¼å‡ºã—(全体呼ã³å‡ºã—) + \g'0' ç•ªå·æŒ‡å®šå‘¼å‡ºã—(全体呼ã³å‡ºã—) + \g<-n> ç›¸å¯¾ç•ªå·æŒ‡å®šå‘¼å‡ºã— (n >= 1) + \g'-n' ç›¸å¯¾ç•ªå·æŒ‡å®šå‘¼å‡ºã— (n >= 1) + \g<+n> ç›¸å¯¾ç•ªå·æŒ‡å®šå‘¼å‡ºã— (n >= 1) + \g'+n' ç›¸å¯¾ç•ªå·æŒ‡å®šå‘¼å‡ºã— (n >= 1) + + ※ 最左ä½ç½®ã§ã®å†å¸°å‘¼å‡ºã—ã¯ç¦æ­¢ã•れる。 + 例. (?a|\gb) => error + (?a|b\gc) => OK + + ※ ç•ªå·æŒ‡å®šå‘¼å‡ºã—ã¯ã€åå‰ä»˜ãæ•ç²å¼é›†åˆãŒå®šç¾©ã•れ〠+ ã‹ã¤ ONIG_OPTION_CAPTURE_GROUPãŒæŒ‡å®šã•れã¦ã„ãªã„å ´åˆã«ã¯ã€ + ç¦æ­¢ã•れる。 (10. æ•ç²å¼é›†åˆ ã‚’å‚ç…§) + + ※ 呼ã³å‡ºã•れãŸå¼é›†åˆã®ã‚ªãƒ—ション状態ãŒå‘¼å‡ºã—å´ã®ã‚ªãƒ—ション状態ã¨ç•°ãªã£ã¦ã„ã‚‹ + ã¨ãã€å‘¼ã³å‡ºã•れãŸå´ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³çŠ¶æ…‹ãŒæœ‰åйã§ã‚る。 + + 例. (?-i:\g)(?i:(?a)){0} 㯠"A" ã«ç…§åˆæˆåŠŸã™ã‚‹ã€‚ + + +10. æ•ç²å¼é›†åˆ + + æ•ç²å¼é›†åˆ(...)ã¯ã€ä»¥ä¸‹ã®æ¡ä»¶ã«å¿œã˜ã¦æŒ¯èˆžãŒå¤‰åŒ–ã™ã‚‹ã€‚ + (åå‰ä»˜ãæ•ç²å¼é›†åˆã¯å¤‰åŒ–ã—ãªã„) + + case 1. /.../ (åå‰ä»˜ãæ•ç²å¼é›†åˆã¯ä¸ä½¿ç”¨ã€ã‚ªãƒ—ションãªã—) + + (...) ã¯ã€æ•ç²å¼é›†åˆã¨ã—ã¦æ‰±ã‚れる。 + + case 2. /.../g (åå‰ä»˜ãæ•ç²å¼é›†åˆã¯ä¸ä½¿ç”¨ã€ã‚ªãƒ—ション 'g'を指定) + + (...) ã¯ã€éžæ•ç²å¼é›†åˆã¨ã—ã¦æ‰±ã‚れる。 + + case 3. /..(?..)../ (åå‰ä»˜ãæ•ç²å¼é›†åˆã¯ä½¿ç”¨ã€ã‚ªãƒ—ションãªã—) + + (...) ã¯ã€éžæ•ç²å¼é›†åˆã¨ã—ã¦æ‰±ã‚れる。 + ç•ªå·æŒ‡å®šå‚ç…§/呼ã³å‡ºã—ã¯ä¸è¨±å¯ã€‚ + + case 4. /..(?..)../G (åå‰ä»˜ãæ•ç²å¼é›†åˆã¯ä½¿ç”¨ã€ã‚ªãƒ—ション 'G'を指定) + + (...) ã¯ã€æ•ç²å¼é›†åˆã¨ã—ã¦æ‰±ã‚れる。 + ç•ªå·æŒ‡å®šå‚ç…§/呼ã³å‡ºã—ã¯è¨±å¯ã€‚ + + 但㗠+ g: ONIG_OPTION_DONT_CAPTURE_GROUP + G: ONIG_OPTION_CAPTURE_GROUP + ('g'ã¨'G'オプションã¯ã€ruby-dev MLã§è­°è«–ã•れãŸã€‚) + + ã“ã‚Œã‚‰ã®æŒ¯èˆžã®æ„味ã¯ã€ + åå‰ä»˜ãæ•ç²ã¨åå‰ç„¡ã—æ•ç²ã‚’åŒæ™‚ã«ä½¿ç”¨ã™ã‚‹å¿…然性ã®ã‚ã‚‹å ´é¢ã¯å°‘ãªã„ã§ã‚ã‚ㆠ+ ã¨ã„ã†ç†ç”±ã‹ã‚‰è€ƒãˆã‚‰ã‚ŒãŸã‚‚ã®ã§ã‚る。 + + +----------------------------- +補記 1. 文法ä¾å­˜ã‚ªãƒ—ション + + + ONIG_SYNTAX_ONIGURUMA + (?m): 終止符記å·(.)ã¯æ”¹è¡Œã¨ç…§åˆæˆåŠŸ + + + ONIG_SYNTAX_PERL 㨠ONIG_SYNTAX_JAVA + (?s): 終止符記å·(.)ã¯æ”¹è¡Œã¨ç…§åˆæˆåŠŸ + (?m): ^ ã¯æ”¹è¡Œã®ç›´å¾Œã«ç…§åˆã™ã‚‹ã€$ ã¯æ”¹è¡Œã®ç›´å‰ã«ç…§åˆã™ã‚‹ + + +補記 2. 独自拡張機能 + + + 16進数数字ã€éž16進数字 \h, \H + + çœŸä»»æ„æ–‡å­— \O + + 文章区分境界 \y, \Y + + 後方å‚照値有効性確èªå™¨ (?(...)) + + åå‰ä»˜ãæ•ç²å¼é›†åˆ (?...), (?'name'...) + + å剿Œ‡å®šå¾Œæ–¹å‚ç…§ \k + + 部分å¼å‘¼å‡ºã— \g, \g + + ä¸åœ¨å¼ (?~|...|...) + + ä¸åœ¨åœæ­¢ (?~|...) + + +補記 3. Perl 5.8.0ã¨æ¯”較ã—ã¦å­˜åœ¨ã—ãªã„機能 + + + \N{name} + + \l,\u,\L,\U,\C + + (??{code}) + + * \Q...\E + 但ã—ONIG_SYNTAX_PERLã¨ONIG_SYNTAX_JAVAã§ã¯æœ‰åй + + +補記 4. Ruby 1.8 ã®æ—¥æœ¬èªžåŒ– GNU regex(version 0.12)ã¨ã®é•ã„ + + + 文字Property機能追加 (\p{property}, \P{Property}) + + 16進数字タイプ追加 (\h, \H) + + æˆ»ã‚Šèª­ã¿æ©Ÿèƒ½ã‚’追加 + + 強欲ãªç¹°ã‚Šè¿”ã—æŒ‡å®šå­ã‚’追加 (?+, *+, ++) + + 文字集åˆã®ä¸­ã®æ¼”ç®—å­ã‚’追加 ([...], &&) + ('[' ã¯ã€æ–‡å­—集åˆã®ä¸­ã§é€šå¸¸ã®æ–‡å­—ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã¨ãã«ã¯ + 退é¿ä¿®é£¾ã—ãªã‘れã°ãªã‚‰ãªã„) + + åå‰ä»˜ãæ•ç²å¼é›†åˆã¨ã€éƒ¨åˆ†å¼å‘¼å‡ºã—機能追加 + + 多ãƒã‚¤ãƒˆæ–‡å­—ã‚³ãƒ¼ãƒ‰ãŒæŒ‡å®šã•れã¦ã„ã‚‹ã¨ã〠+ 文字集åˆã®ä¸­ã§å…«é€²æ•°ã¾ãŸã¯å六進数表ç¾ã®é€£ç¶šã¯ã€å¤šãƒã‚¤ãƒˆç¬¦å·ã§è¡¨ç¾ã•れ㟠+ ä¸€å€‹ã®æ–‡å­—ã¨è§£é‡ˆã•れる + (例. [\xa1\xa2], [\xa1\xa7-\xa4\xa1]) + + 文字集åˆã®ä¸­ã§ã€ä¸€ãƒã‚¤ãƒˆæ–‡å­—ã¨å¤šãƒã‚¤ãƒˆæ–‡å­—ã®ç¯„囲指定ã¯è¨±ã•れる。 + ex. /[a-ã‚]/ + + å­¤ç«‹ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã®æœ‰åŠ¹ç¯„å›²ã¯ã€ãã®å­¤ç«‹ã‚ªãƒ—ションをå«ã‚“ã§ã„ã‚‹å¼é›†åˆã® + 終ã‚りã¾ã§ã§ã‚ã‚‹ + 例. (?:(?i)a|b) 㯠(?:(?i:a|b)) ã¨è§£é‡ˆã•れるã€(?:(?i:a)|b)ã§ã¯ãªã„ + + 孤立オプションã¯ãã®å‰ã®å¼ã«å¯¾ã—ã¦é€éŽçš„ã§ã¯ãªã„ + 例. /a(?i)*/ ã¯æ–‡æ³•エラーã¨ãªã‚‹ + + ä¸å®Œå…¨ãªç¹°ã‚Šè¿”ã—範囲指定å­ã¯é€šå¸¸ã®æ–‡å­—列ã¨ã—ã¦è¨±å¯ã•れる + 例. /{/, /({)/, /a{2,3/ + + å¦å®šçš„POSIXブラケット [:^xxxx:] を追加 + + POSIXブラケット [:ascii:] を追加 + + 先読ã¿ã®ç¹°ã‚Šè¿”ã—ã¯ä¸è¨±å¯ + 例. /(?=a)*/, /(?!b){5}/ + + æ•°å€¤ã§æŒ‡å®šã•ã‚ŒãŸæ–‡å­—ã«å¯¾ã—ã¦ã‚‚ã€å¤§æ–‡å­—å°æ–‡å­—ç…§åˆã‚ªãƒ—ã‚·ãƒ§ãƒ³ã¯æœ‰åй + 例. /\x61/i =~ "A" + + 繰り返ã—回数指定ã§ã€æœ€ä½Žå›žæ•°ã®çœç•¥(0回)ãŒã§ãã‚‹ + /a{,n}/ == /a{0,n}/ + æœ€ä½Žå›žæ•°ã¨æœ€å¤§å›žæ•°ã®åŒæ™‚çœç•¥ã¯è¨±ã•れãªã„。(/a{,}/) + + /a{n}?/ã¯ç„¡æ¬²ãªæ¼”ç®—å­ã§ã¯ãªã„。 + /a{n}?/ == /(?:a{n})?/ + + 無効ãªå¾Œæ–¹å‚ç…§ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¦ã‚¨ãƒ©ãƒ¼ã«ã™ã‚‹ã€‚ + /\1/, /(a)\2/ + + ç„¡é™ç¹°ã‚Šè¿”ã—ã®ä¸­ã§ã€é•·ã•é›¶ã§ã®ç…§åˆæˆåŠŸã¯ç¹°ã‚Šè¿”ã—を中断ã•ã›ã‚‹ãŒã€ + ã“ã®ã¨ãã€ä¸­æ–­ã™ã¹ãã‹ã©ã†ã‹ã®åˆ¤å®šã¨ã—ã¦ã€æ•ç²å¼é›†åˆã®æ•ç²çŠ¶æ…‹ã® + 変化ã¾ã§è€ƒæ…®ã—ã¦ã„ã‚‹ + /(?:()|())*\1\2/ =~ "" + /(?:\1a|())*/ =~ "a" + +終り diff --git a/internal/components/third_party/oniguruma/doc/SYNTAX.md b/internal/components/third_party/oniguruma/doc/SYNTAX.md new file mode 100644 index 0000000000..5ec7e87312 --- /dev/null +++ b/internal/components/third_party/oniguruma/doc/SYNTAX.md @@ -0,0 +1,1126 @@ + +# Oniguruma syntax (operator) configuration + +_Documented for Oniguruma 6.9.10 (2024/12/21)_ + + +---------- + + +## Overview + +This document details how to configure Oniguruma's syntax, by describing the desired +syntax operators and behaviors in an instance of the OnigSyntaxType struct, just like +the built-in Oniguruma syntaxes do. + +Configuration operators are bit flags, and are broken into multiple groups, somewhat arbitrarily, +because Oniguruma takes its configuration as a trio of 32-bit `unsigned int` values, assigned as +the first three fields in an `OnigSyntaxType` struct: + +```C +typedef struct { + unsigned int op; + unsigned int op2; + unsigned int behavior; + OnigOptionType options; /* default option */ + OnigMetaCharTableType meta_char_table; +} OnigSyntaxType; +``` + +The first group of configuration flags (`op`) roughly corresponds to the +configuration for "basic regex." The second group (`op2`) roughly corresponds +to the configuration for "advanced regex." And the third group (`behavior`) +describes more-or-less what to do for broken input, bad input, or other corner-case +regular expressions whose meaning is not well-defined. These three groups of +flags are described in full below, and tables of their usages for various syntaxes +follow. + +The `options` field describes the default compile options to use if the caller does +not specify any options when invoking `onig_new()`. + +The `meta_char_table` field is used exclusively by the `ONIG_SYN_OP_VARIABLE_META_CHARACTERS` +option, which allows the various regex metacharacters, like `*` and `?`, to be replaced +with alternates (for example, SQL typically uses `%` instead of `.*` and `_` instead of `?`). + + +---------- + + +## Group One Flags (op) + + +This group contains "basic regex" constructs, features common to most regex systems. + + +### 0. ONIG_SYN_OP_VARIABLE_META_CHARACTERS + +_Set in: none_ + +Enables support for `onig_set_meta_char()`, which allows you to provide alternate +characters that will be used instead of the six special characters that are normally +these characters below: + + - `ONIG_META_CHAR_ESCAPE`: `\` + - `ONIG_META_CHAR_ANYCHAR`: `.` + - `ONIG_META_CHAR_ANYTIME`: `*` + - `ONIG_META_CHAR_ZERO_OR_ONE_TIME`: `?` + - `ONIG_META_CHAR_ONE_OR_MORE_TIME`: `+` + - `ONIG_META_CHAR_ANYCHAR_ANYTIME`: Equivalent in normal regex to `.*`, but supported + explicitly so that Oniguruma can support matching SQL `%` wildcards or shell `*` wildcards. + +If this flag is set, then the values defined using `onig_set_meta_char()` will be used; +if this flag is clear, then the default regex characters will be used instead, and +data set by `onig_set_meta_char()` will be ignored. + + +### 1. ONIG_SYN_OP_DOT_ANYCHAR (enable `.`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex, Grep, Emacs, PosixExtended, PosixBasic_ + +Enables support for the standard `.` metacharacter, meaning "any one character." You +usually want this flag on unless you have turned on `ONIG_SYN_OP_VARIABLE_META_CHARACTERS` +so that you can use a metacharacter other than `.` instead. + + +### 2. ONIG_SYN_OP_ASTERISK_ZERO_INF (enable `r*`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex, Grep, Emacs, PosixExtended, PosixBasic_ + +Enables support for the standard `r*` metacharacter, meaning "zero or more r's." +You usually want this flag set unless you have turned on `ONIG_SYN_OP_VARIABLE_META_CHARACTERS` +so that you can use a metacharacter other than `*` instead. + + +### 3. ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF (enable `r\*`) + +_Set in: none_ + +Enables support for an escaped `r\*` metacharacter, meaning "zero or more r's." This is +useful if you have disabled support for the normal `r*` metacharacter because you want `*` +to simply match a literal `*` character, but you still want some way of activating "zero or more" +behavior. + + +### 4. ONIG_SYN_OP_PLUS_ONE_INF (enable `r+`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex, Emacs, PosixExtended_ + +Enables support for the standard `r+` metacharacter, meaning "one or more r's." +You usually want this flag set unless you have turned on `ONIG_SYN_OP_VARIABLE_META_CHARACTERS` +so that you can use a metacharacter other than `+` instead. + + +### 5. ONIG_SYN_OP_ESC_PLUS_ONE_INF (enable `r\+`) + +_Set in: Grep_ + +Enables support for an escaped `r\+` metacharacter, meaning "one or more r's." This is +useful if you have disabled support for the normal `r+` metacharacter because you want `+` +to simply match a literal `+` character, but you still want some way of activating "one or more" +behavior. + + +### 6. ONIG_SYN_OP_QMARK_ZERO_ONE (enable `r?`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex, Emacs, PosixExtended_ + +Enables support for the standard `r?` metacharacter, meaning "zero or one r" or "an optional r." +You usually want this flag set unless you have turned on `ONIG_SYN_OP_VARIABLE_META_CHARACTERS` +so that you can use a metacharacter other than `?` instead. + + +### 7. ONIG_SYN_OP_ESC_QMARK_ZERO_ONE (enable `r\?`) + +_Set in: Grep_ + +Enables support for an escaped `r\?` metacharacter, meaning "zero or one r" or "an optional +r." This is useful if you have disabled support for the normal `r?` metacharacter because +you want `?` to simply match a literal `?` character, but you still want some way of activating +"optional" behavior. + + +### 8. ONIG_SYN_OP_BRACE_INTERVAL (enable `r{l,u}`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex, PosixExtended_ + +Enables support for the `r{lower,upper}` range form, common to more advanced +regex engines, which lets you specify precisely a minimum and maximum range on how many r's +must match (and not simply "zero or more"). + +This form also allows `r{count}` to specify a precise count of r's that must match. + +This form also allows `r{lower,}` to be equivalent to `r{lower,infinity}`. + +If and only if the `ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV` behavior flag is set, +this form also allows `r{,upper}` to be equivalent to `r{0,upper}`; otherwise, +`r{,upper}` will be treated as an error. + + +### 9. ONIG_SYN_OP_ESC_BRACE_INTERVAL (enable `\{` and `\}`) + +_Set in: Grep, Emacs, PosixBasic_ + +Enables support for an escaped `r\{lower,upper\}` range form. This is useful if you +have disabled support for the normal `r{...}` range form and want curly braces to simply +match literal curly brace characters, but you still want some way of activating +"range" behavior. + + +### 10. ONIG_SYN_OP_VBAR_ALT (enable `r|s`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex, PosixExtended_ + +Enables support for the common `r|s` alternation operator. You usually want this +flag set. + + +### 11. ONIG_SYN_OP_ESC_VBAR_ALT (enable `\|`) + +_Set in: Grep, Emacs_ + +Enables support for an escaped `r\|s` alternation form. This is useful if you +have disabled support for the normal `r|s` alternation form and want `|` to simply +match a literal `|` character, but you still want some way of activating "alternate" behavior. + + +### 12. ONIG_SYN_OP_LPAREN_SUBEXP (enable `(r)`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex, PosixExtended_ + +Enables support for the common `(...)` grouping-and-capturing operators. You usually +want this flag set. + + +### 13. ONIG_SYN_OP_ESC_LPAREN_SUBEXP (enable `\(` and `\)`) + +_Set in: Grep, Emacs, PosixBasic_ + +Enables support for escaped `\(...\)` grouping-and-capturing operators. This is useful if you +have disabled support for the normal `(...)` grouping-and-capturing operators and want +parentheses to simply match literal parenthesis characters, but you still want some way of +activating "grouping" or "capturing" behavior. + + +### 14. ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR (enable `\A` and `\Z` and `\z`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex_ + +Enables support for the anchors `\A` (start-of-string), `\Z` (end-of-string or +newline-at-end-of-string), and `\z` (end-of-string) escapes. + +(If the escape metacharacter has been changed from the default of `\`, this +option will recognize that metacharacter instead.) + + +### 15. ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR (enable `\G`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex_ + +Enables support for the special anchor `\G` (start-of-previous-match). + +(If the escape metacharacter has been changed from the default of `\`, this +option will recognize that metacharacter instead.) + +Note that `OnigRegex`/`regex_t` are not stateful objects, and do _not_ record +the location of the previous match. The `\G` flag uses the `start` parameter +explicitly passed to `onig_search()` (or `onig_search_with_param()` to determine +the "start of the previous match," so if the caller always passes the start of +the entire buffer as the function's `start` parameter, then `\G` will behave +exactly the same as `\A`. + + +### 16. ONIG_SYN_OP_DECIMAL_BACKREF (enable `\num`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex, Grep, Emacs, PosixExtended, PosixBasic_ + +Enables support for subsequent matches to back references to prior capture groups `(...)` using +the common `\num` syntax (like `\3`). + +If this flag is clear, then a numeric escape like `\3` will either be treated as a literal `3`, +or, if `ONIG_SYN_OP_ESC_OCTAL3` is set, will be treated as an octal character code `\3`. + +You usually want this enabled, and it is enabled by default in every built-in syntax. + + +### 17. ONIG_SYN_OP_BRACKET_CC (enable `[...]`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex, Grep, Emacs, PosixExtended, PosixBasic_ + +Enables support for recognizing character classes, like `[a-z]`. If this flag is not set, `[` +and `]` will be treated as ordinary literal characters instead of as metacharacters. + +You usually want this enabled, and it is enabled by default in every built-in syntax. + + +### 18. ONIG_SYN_OP_ESC_W_WORD (enable `\w` and `\W`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex, Grep_ + +Enables support for the common `\w` and `\W` shorthand forms. These match "word characters," +whose meaning varies depending on the encoding being used. + +In ASCII encoding, `\w` is equivalent to `[A-Za-z0-9_]`. + +In most other encodings, `\w` matches many more characters, including accented letters, Greek letters, +Cyrillic letters, Braille letters and numbers, Runic letters, Hebrew letters, Arabic letters and numerals, +Chinese Han ideographs, Japanese Katakana and Hiragana, Korean Hangul, and generally any symbol that +could qualify as a phonetic "letter" or counting "number" in any language. (Note that emoji are _not_ +considered "word characters.") + +`\W` always matches the opposite of whatever `\w` matches. + + +### 19. ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END (enable `\<` and `\>`) + +_Set in: GnuRegex, Grep_ + +Enables support for the GNU-specific `\<` and `\>` word-boundary metacharacters. These work like +the `\b` word-boundary metacharacter, but only match at one end of the word or the other: `\<` +only matches at a transition from a non-word character to a word character (i.e., at the start +of a word), and `\>` only matches at a transition from a word character to a non-word character +(i.e., at the end of a word). + +Most regex syntaxes do _not_ support these metacharacters. + + +### 20. ONIG_SYN_OP_ESC_B_WORD_BOUND (enable `\b` and `\B`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex, Grep_ + +Enables support for the common `\b` and `\B` word-boundary metacharacters. The `\b` metacharacter +matches a zero-width position at a transition from word-characters to non-word-characters, or vice +versa. The `\B` metacharacter matches at all positions _not_ matched by `\b`. + +See details in `ONIG_SYN_OP_ESC_W_WORD` above for an explanation as to which characters +are considered "word characters." + + +### 21. ONIG_SYN_OP_ESC_S_WHITE_SPACE (enable `\s` and `\S`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex_ + +Enables support for the common `\s` and `\S` whitespace-matching metacharacters. + +The `\s` metacharacter in ASCII encoding is exactly equivalent to the character class +`[\t\n\v\f\r ]`, or characters codes 9 through 13 (inclusive), and 32. + +The `\s` metacharacter in Unicode is exactly equivalent to the character class +`[\t\n\v\f\r \x85\xA0\x1680\x2000-\x200A\x2028-\x2029\x202F\x205F\x3000]` — that is, it matches +the same as ASCII, plus U+0085 (next line), U+00A0 (nonbreaking space), U+1680 (Ogham space mark), +U+2000 (en quad) through U+200A (hair space) (this range includes several widths of Unicode spaces), +U+2028 (line separator) through U+2029 (paragraph separator), +U+202F (narrow no-break space), U+205F (medium mathematical space), and U+3000 (CJK ideographic space). + +All non-Unicode encodings are handled by converting their code points to the appropriate +Unicode-equivalent code points, and then matching according to Unicode rules. + +`\S` always matches any one character that is _not_ in the set matched by `\s`. + + +### 22. ONIG_SYN_OP_ESC_D_DIGIT (enable `\d` and `\D`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex_ + +Enables support for the common `\d` and `\D` digit-matching metacharacters. + +The `\d` metacharacter in ASCII encoding is exactly equivalent to the character class +`[0-9]`, or characters codes 48 through 57 (inclusive). + +The `\d` metacharacter in Unicode matches `[0-9]`, as well as digits in Arabic, Devanagari, +Bengali, Laotian, Mongolian, CJK fullwidth numerals, and many more. + +All non-Unicode encodings are handled by converting their code points to the appropriate +Unicode-equivalent code points, and then matching according to Unicode rules. + +`\D` always matches any one character that is _not_ in the set matched by `\d`. + + +### 23. ONIG_SYN_OP_LINE_ANCHOR (enable `^r` and `r$`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex, Grep, Emacs, PosixExtended, PosixBasic_ + +Enables support for the common `^` and `$` line-anchor metacharacters. + +In single-line mode, `^` matches the start of the input buffer, and `$` matches +the end of the input buffer. In multi-line mode, `^` matches if the preceding +character is `\n`; and `$` matches if the following character is `\n`. + +(Note that Oniguruma does not recognize other newline types: It only matches +`^` and `$` against `\n`: not `\r`, not `\r\n`, not the U+2028 line separator, +and not any other form.) + + +### 24. ONIG_SYN_OP_POSIX_BRACKET (enable POSIX `[:xxxx:]`) + +_Set in: Oniguruma, Ruby, Perl_NG, Perl, GnuRegex, Grep, PosixExtended, PosixBasic_ + +Enables support for the POSIX `[:xxxx:]` character classes, like `[:alpha:]` and `[:digit:]`. +The supported POSIX character classes are `alnum`, `alpha`, `blank`, `cntrl`, `digit`, +`graph`, `lower`, `print`, `punct`, `space`, `upper`, `xdigit`, `ascii`, `word`. + + +### 25. ONIG_SYN_OP_QMARK_NON_GREEDY (enable `r??`, `r*?`, `r+?`, and `r{n,m}?`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java_ + +Enables support for lazy (non-greedy) quantifiers: That is, if you append a `?` after +another quantifier such as `?`, `*`, `+`, or `{n,m}`, Oniguruma will try to match +as _little_ as possible instead of as _much_ as possible. + + +### 26. ONIG_SYN_OP_ESC_CONTROL_CHARS (enable `\n`, `\r`, `\t`, etc.) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, Emacs, PosixExtended, PosixBasic_ + +Enables support for C-style control-code escapes, like `\n` and `\r`. Specifically, +this recognizes `\a` (7), `\b` (8), `\t` (9), `\n` (10), `\f` (12), `\r` (13), and +`\e` (27). If `ONIG_SYN_OP2_ESC_V_VTAB` is enabled (see below), this also enables +support for recognizing `\v` as code point 11. + + +### 27. ONIG_SYN_OP_ESC_C_CONTROL (enable `\cx` control codes) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java_ + +Enables support for named control-code escapes, like `\cm` or `\cM` for code-point +13. In this shorthand form, control codes may be specified by `\c` (for "Control") +followed by an alphabetic letter, a-z or A-Z, indicating which code point to represent +(1 through 26). So `\cA` is code point 1, and `\cZ` is code point 26. + + +### 28. ONIG_SYN_OP_ESC_OCTAL3 (enable `\OOO` octal codes) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java_ + +Enables support for octal-style escapes of up to three digits, like `\1` for code +point 1, and `\177` for code point 127. Octal values greater than 255 will result +in an error message. + + +### 29. ONIG_SYN_OP_ESC_X_HEX2 (enable `\xHH` hex codes) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java_ + +Enables support for hexadecimal-style escapes of up to two digits, like `\x1` for code +point 1, and `\x7F` for code point 127. + + +### 30. ONIG_SYN_OP_ESC_X_BRACE_HEX8 (enable `\x{7HHHHHHH}` hex codes) + +_Set in: Oniguruma, Ruby, Perl_NG, Perl_ + +Enables support for brace-wrapped hexadecimal-style escapes of up to eight digits, +like `\x{1}` for code point 1, and `\x{FFFE}` for code point 65534. + + +### 31. ONIG_SYN_OP_ESC_O_BRACE_OCTAL (enable `\o{1OOOOOOOOOO}` octal codes) + +_Set in: Oniguruma, Ruby, Perl_NG, Perl_ + +Enables support for brace-wrapped octal-style escapes of up to eleven digits, +like `\o{1}` for code point 1, and `\o{177776}` for code point 65534. + +(New feature as of Oniguruma 6.3.) + + +---------- + + +## Group Two Flags (op2) + + +This group contains support for lesser-known regex syntax constructs. + + +### 0. ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE (enable `\Q...\E`) + +_Set in: Perl_NG, Perl, Java_ + +Enables support for "quoted" parts of a pattern: Between `\Q` and `\E`, all +syntax parsing is turned off, so that metacharacters like `*` and `+` will no +longer be treated as metacharacters, and instead will be matched as literal +`*` and `+`, as if they had been escaped with `\*` and `\+`. + + +### 1. ONIG_SYN_OP2_QMARK_GROUP_EFFECT (enable `(?...)`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, Emacs_ + +Enables support for the fairly-common `(?...)` grouping operator, which +controls precedence but which does _not_ capture its contents. + + +### 2. ONIG_SYN_OP2_OPTION_PERL (enable options `(?imsx)` and `(?-imsx)`) + +_Set in: Python, Perl_NG, Perl, Java_ + +Enables support of regex options. (i,m,s,x) +The supported toggle-able options for this flag are: + + - `i` - Case-insensitivity + - `m` - Multi-line mode (`^` and `$` match at `\n` as well as start/end of buffer) + - `s` - Single-line mode (`.` can match `\n`) + - `x` - Extended pattern (free-formatting: whitespace will ignored) + + +### 3. ONIG_SYN_OP2_OPTION_RUBY (enable options `(?imx)` and `(?-imx)`) + +_Set in: Ruby_ + +Enables support of regex options. (i,m,x) +The supported toggle-able options for this flag are: + + - `i` - Case-insensitivity + - `m` - Multi-line mode (`.` can match `\n`) + - `x` - Extended pattern (free-formatting: whitespace will ignored) + + +### 4. ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT (enable `r?+`, `r*+`, and `r++`) + +_Set in: Oniguruma, Ruby, Perl_NG, Perl, Java_ + +Enables support for the _possessive_ quantifiers `?+`, `*+`, and `++`, which +work similarly to `?` and `*` and `+`, respectively, but which do not backtrack +after matching: Like the normal greedy quantifiers, they match as much as +possible, but they do not attempt to match _less_ than their maximum possible +extent if subsequent parts of the pattern fail to match. + + +### 5. ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL (enable `r{n,m}+`) + +_Set in: Perl_NG, Perl, Java_ + +Enables support for the _possessive_ quantifier `{n,m}+`, which +works similarly to `{n,m}`, but which does not backtrack +after matching: Like the normal greedy quantifier, it matches as much as +possible, but it do not attempt to match _less_ than its maximum possible +extent if subsequent parts of the pattern fail to match. + + +### 6. ONIG_SYN_OP2_CCLASS_SET_OP (enable `&&` within `[...]`) + +_Set in: Oniguruma, Ruby, Java_ + +Enables support for character-class _intersection_. For example, with this +feature enabled, you can write `[a-z&&[^aeiou]]` to produce a character class +of only consonants, or `[\0-\37&&[^\n\r]]` to produce a character class of +all control codes _except_ newlines. + + +### 7. ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP (enable named captures `(?...)`) + +_Set in: Oniguruma, Ruby, Perl_NG_ + +Enables support for _naming_ capture groups, so that instead of having to +refer to captures by position (like `\3` or `$3`), you can refer to them by names +(like `server` and `path`). This supports the Perl/Ruby naming syntaxes `(?...)` +and `(?'name'...)`, but not the Python `(?P...)` syntax. + + +### 8. ONIG_SYN_OP2_ESC_K_NAMED_BACKREF (enable named backreferences `\k`) + +_Set in: Oniguruma, Ruby, Perl_NG_ + +Enables support for substituted backreferences by name, not just by position. +This supports using `\k'name'` in addition to supporting `\k`. This also +supports an Oniguruma-specific extension that lets you specify the _distance_ of +the match, if the capture matched multiple times, by writing `\k` or +`\k`. + + +### 9. ONIG_SYN_OP2_ESC_G_SUBEXP_CALL (enable backreferences `\g` and `\g`) + +_Set in: Oniguruma, Ruby, Perl_NG_ + +Enables support for substituted backreferences by both name and position using +the same syntax. This supports using `\g'name'` and `\g'1'` in addition to +supporting `\g` and `\g<1>`. + + +### 10. ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY (enable `(?@...)` and `(?@...)`) + +_Set in: none_ + +Enables support for _capture history_, which can answer via the `onig_*capture*()` +functions exactly which captures were matched, how many times, and where in the +input they were matched, by placing `?@` in front of the capture. Per Oniguruma's +regex syntax documentation (appendix A-5): + +`/(?@a)*/.match("aaa")` ==> `[<0-1>, <1-2>, <2-3>]` + +This can require substantial memory, is primarily useful for debugging, and is not +enabled by default in any syntax. + + +### 11. ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL (enable `\C-x`) + +_Set in: Oniguruma, Ruby_ + +Enables support for Ruby legacy control-code escapes, like `\C-m` or `\C-M` for code-point +13. In this shorthand form, control codes may be specified by `\C-` (for "Control") +followed by a single character (or equivalent), indicating which code point to represent, +based on that character's lowest five bits. So, like `\c`, you can represent code-point +10 with `\C-j`, but you can also represent it with `\C-*` as well. + +See also `ONIG_SYN_OP_ESC_C_CONTROL`, which enables the more-common `\cx` syntax. + + +### 12. ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META (enable `\M-x`) + +_Set in: Oniguruma, Ruby_ + +Enables support for Ruby legacy meta-code escapes. When you write `\M-x`, Oniguruma +will match an `x` whose 8th bit is set (i.e., the character code of `x` will be or'ed +with `0x80`). So, for example, you can match `\x81` using `\x81`, or you can write +`\M-\1`. This is mostly useful when working with legacy 8-bit character encodings. + + +### 13. ONIG_SYN_OP2_ESC_V_VTAB (enable `\v` as vertical tab) + +_Set in: Oniguruma, Python, Ruby, Java_ + +Enables support for a C-style `\v` escape code, meaning "vertical tab." If enabled, +`\v` will be equivalent to ASCII code point 11. + + +### 14. ONIG_SYN_OP2_ESC_U_HEX4 (enable `\uHHHH` for Unicode) + +_Set in: Oniguruma, Python, Ruby, Java_ + +Enables support for a Java-style `\uHHHH` escape code for representing Unicode +code-points by number, using up to four hexadecimal digits (up to `\uFFFF`). So, +for example, `\u221E` will match an infinity symbol, `∞`. + +For code points larger than four digits, like the emoji `🚡` (aerial tramway, or code +point U+1F6A1), you must either represent the character directly using an encoding like +UTF-8, or you must enable support for `ONIG_SYN_OP_ESC_X_BRACE_HEX8` or +`ONIG_SYN_OP_ESC_O_BRACE_OCTAL`, which support more than four digits. + +(New feature as of Oniguruma 6.7.) + + +### 15. ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR (enable ``\` `` and `\'` anchors) + +_Set in: Emacs_ + +This flag makes the ``\` `` and `\'` escapes function identically to +`\A` and `\z`, respectively (when `ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR` is enabled). + +These anchor forms are very obscure, and rarely supported by other regex libraries. + + +### 16. ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY (enable `\p{...}` and `\P{...}`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java_ + +Enables support for an alternate syntax for POSIX character classes; instead of +writing `[:alpha:]` when this is enabled, you can instead write `\p{alpha}`. + +See also `ONIG_SYN_OP_POSIX_BRACKET` for the classic POSIX form. + + +### 17. ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT (enable `\p{^...}` and `\P{^...}`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl_ + +Enables support for an alternate syntax for POSIX character classes; instead of +writing `[:^alpha:]` when this is enabled, you can instead write `\p{^alpha}`. + +See also `ONIG_SYN_OP_POSIX_BRACKET` for the classic POSIX form. + + +### 18. ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS + +_(not presently used)_ + + +### 19. ONIG_SYN_OP2_ESC_H_XDIGIT (enable `\h` and `\H`) + +_Set in: Oniguruma, Ruby_ + +Enables support for the Ruby-specific shorthand `\h` and `\H` metacharacters. +Somewhat like `\d` matches decimal digits, `\h` matches hexadecimal digits — that is, +characters in `[0-9a-fA-F]`. + +`\H` matches the opposite of whatever `\h` matches. + + +### 20. ONIG_SYN_OP2_INEFFECTIVE_ESCAPE (disable `\`) + +_Set in: ASIS_ + +If set, this disables all escape codes, shorthands, and metacharacters that start +with `\` (or whatever the configured escape character is), allowing `\` to be treated +as a literal `\`. + +You usually do not want this flag to be enabled. + + +### 21. ONIG_SYN_OP2_QMARK_LPAREN_IF_ELSE (enable `(?(...)then|else)`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl_ + +Enables support for conditional inclusion of subsequent regex patterns based on whether +a prior named or numbered capture matched, or based on whether a pattern will +match. This supports many different forms, including: + + - `(?()then|else)` - condition based on a capture by name. + - `(?('foo')then|else)` - condition based on a capture by name. + - `(?(3)then|else)` - condition based on a capture by number. + - `(?(+3)then|else)` - forward conditional to a future match, by relative position. + - `(?(-3)then|else)` - backward conditional to a prior match, by relative position. + - `(?(foo)then|else)` - this matches a pattern `foo`. (foo is any sub-expression) + +(New feature as of Oniguruma 6.5.) + + +### 22. ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP (enable `\K`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl_ + +Enables support for `\K`, which excludes all content before it from the overall +regex match (i.e., capture #0). So, for example, pattern `foo\Kbar` would match +`foobar`, but capture #0 would only include `bar`. + +(New feature as of Oniguruma 6.5.) + + +### 23. ONIG_SYN_OP2_ESC_CAPITAL_R_GENERAL_NEWLINE (enable `\R`) + +_Set in: Oniguruma, Ruby, Perl_NG, Perl_ + +Enables support for `\R`, the "general newline" shorthand, which matches +`(\r\n|[\n\v\f\r\u0085\u2028\u2029])` (obviously, the Unicode values are cannot be +matched in ASCII encodings). + +(New feature as of Oniguruma 6.5.) + + +### 24. ONIG_SYN_OP2_ESC_CAPITAL_N_O_SUPER_DOT (enable `\N` and `\O`) + +_Set in: Oniguruma, Perl_NG, Perl_ + +Enables support for `\N` and `\O`. `\N` is "not a line break," which is much +like the standard `.` metacharacter, except that while `.` can be affected by +the single-line setting, `\N` always matches exactly one character that is not +one of the various line-break characters (like `\n` and `\r`). + +`\O` matches exactly one character, regardless of whether single-line or +multi-line mode are enabled or disabled. + +(New feature as of Oniguruma 6.5.) + + +### 25. ONIG_SYN_OP2_QMARK_TILDE_ABSENT_GROUP (enable `(?~...)`) + +_Set in: Oniguruma, Ruby, Perl_NG, Perl_ + +Enables support for the `(?~r)` "absent operator" syntax, which matches +as much as possible as long as the result _doesn't_ match pattern `r`. This is +_not_ the same as negative lookahead or negative lookbehind. + +Among the most useful examples of this is `\/\*(?~\*\/)\*\/`, which matches +C-style comments by simply saying "starts with /*, ends with */, and _doesn't_ +contain a */ in between." + +A full explanation of this feature is complicated, but it is useful, and an +excellent article about it is [available on Medium](https://medium.com/rubyinside/the-new-absent-operator-in-ruby-s-regular-expressions-7c3ef6cd0b99). + +(New feature as of Oniguruma 6.5.) + + +### 26. ONIG_SYN_OP2_ESC_X_Y_TEXT_SEGMENT (enable `\X` and `\Y` and `\y`) + +_Set in: Oniguruma, Ruby, Perl_NG, Perl_ + +`\X` is another variation on `.`, designed to support Unicode, in that it matches +a full _grapheme cluster_. In Unicode, `à` can be encoded as one code point, +`U+00E0`, or as two, `U+0061 U+0300`. If those are further escaped using UTF-8, +the former becomes two bytes, and the latter becomes three. Unfortunately, `.` +would naively match only one or two bytes, depending on the encoding, and would +likely incorrectly match anything from just `a` to a broken half of a code point. +`\X` is designed to fix this: It matches the full `à`, no matter how `à` is +encoded or decomposed. + +`\y` matches a cluster boundary, i.e., a zero-width position between +graphemes, somewhat like `\b` matches boundaries between words. `\Y` matches +the _opposite_ of `\y`, that is, a zero-width position between code points in +the _middle_ of a grapheme. + +(New feature as of Oniguruma 6.6.) + + +### 27. ONIG_SYN_OP2_QMARK_PERL_SUBEXP_CALL (enable `(?R)` and `(?&name)`) + +_Set in: Perl_NG_ + +Enables support for substituted backreferences by both name and position using +Perl-5-specific syntax. This supports using `(?R3)` and `(?&name)` to reference +previous (and future) matches, similar to the more-common `\g<3>` and `\g` +backreferences. + +(New feature as of Oniguruma 6.7.) + + +### 28. ONIG_SYN_OP2_QMARK_BRACE_CALLOUT_CONTENTS (enable `(?{...})`) + +_Set in: Oniguruma, Perl_NG, Perl_ + +Enables support for Perl-style "callouts" — pattern substitutions that result from +invoking a callback method. When `(?{foo})` is reached in a pattern, the callback +function set in `onig_set_progress_callout()` will be invoked, and be able to perform +custom computation during the pattern match (and during backtracking). + +Full documentation for this advanced feature can be found in the Oniguruma +`docs/CALLOUT.md` file, with an example in `samples/callout.c`. + +(New feature as of Oniguruma 6.8.) + + +### 29. ONIG_SYN_OP2_ASTERISK_CALLOUT_NAME (enable `(*name)`) + +_Set in: Oniguruma, Python, Perl_NG, Perl_ + +Enables support for Perl-style "callouts" — pattern substitutions that result from +invoking a callback method. When `(*foo)` is reached in a pattern, the callback +function set in `onig_set_callout_of_name()` will be invoked, passing the given name +`foo` to it, and it can perform custom computation during the pattern match (and +during backtracking). + +Full documentation for this advanced feature can be found in the Oniguruma +`docs/CALLOUT.md` file, with an example in `samples/callout.c`. + +(New feature as of Oniguruma 6.8.) + + +### 30. ONIG_SYN_OP2_OPTION_ONIGURUMA (enable options `(?imxWSDPy)` and `(?-imxWDSP)`) + +_Set in: Oniguruma_ + +Enables support of regex options. (i,m,x,W,S,D,P,y) + +(New feature as of Oniguruma 6.9.2) + + - `i` - Case-insensitivity + - `m` - Multi-line mode (`.` can match `\n`) + - `x` - Extended pattern (free-formatting: whitespace will ignored) + - `W` - ASCII only word. + - `D` - ASCII only digit. + - `S` - ASCII only space. + - `P` - ASCII only POSIX properties. (includes W,D,S) + + +### 31. ONIG_SYN_OP2_QMARK_CAPITAL_P_NAME (enable `(?P...)` and `(?P=name)`) + +_Set in: Python_ + +(New feature as of Oniguruma 6.9.7) + +---------- + + +## Syntax Flags (syn) + + +This group contains rules to handle corner cases and constructs that are errors in +some syntaxes but not in others. + +### 0. ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS (independent `?`, `*`, `+`, `{n,m}`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex, PosixExtended_ + +This flag specifies how to handle operators like `?` and `*` when they aren't +directly attached to an operand, as in `^*` or `(*)`: Are they an error, are +they discarded, or are they taken as literals? If this flag is clear, they +are taken as literals; otherwise, the `ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS` flag +determines if they are errors or if they are discarded. + +### 1. ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS (error or ignore independent operators) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex, PosixExtended_ + +If `ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS` is set, this flag controls what happens when +independent operators appear in a pattern: If this flag is set, then independent +operators produce an error message; if this flag is clear, then independent +operators are silently discarded. + +### 2. ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP (allow `...)...`) + +_Set in: PosixExtended_ + +This flag, if set, causes a `)` character without a preceding `(` to be treated as +a literal `)`, equivalent to `\)`. If this flag is clear, then an unmatched `)` +character will produce an error message. + +### 3. ONIG_SYN_ALLOW_INVALID_INTERVAL (allow `{???`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex_ + +This flag, if set, causes an invalid range, like `foo{bar}` or `foo{}`, to be +silently discarded, as if `foo` had been written instead. If clear, an invalid +range will produce an error message. + +### 4. ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV (allow `{,n}` to mean `{0,n}`) + +_Set in: Oniguruma, Python, Ruby_ + +If this flag is set, then `r{,n}` will be treated as equivalent to writing +`{0,n}`. If this flag is clear, then `r{,n}` will produce an error message. + +Note that regardless of whether this flag is set or clear, if +`ONIG_SYN_OP_BRACE_INTERVAL` is enabled, then `r{n,}` will always be legal: This +flag *only* controls the behavior of the opposite form, `r{,n}`. + +### 5. ONIG_SYN_STRICT_CHECK_BACKREF (error on invalid backrefs) + +_Set in: none_ + +If this flag is set, an invalid backref, like `\1` in a pattern with no captures, +will produce an error. If this flag is clear, then an invalid backref will be +equivalent to the empty string. + +No built-in syntax has this flag enabled. + +### 6. ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND (allow `(?<=a|bc)`) + +_Set in: Oniguruma, Ruby, Java_ + +If this flag is set, lookbehind patterns with alternate options may have differing +lengths among those options. If this flag is clear, lookbehind patterns with options +must have each option have identical length to the other options. + +Oniguruma can handle either form, but not all regex engines can, so for compatibility, +Oniguruma allows you to cause regexes for other regex engines to fail if they might +depend on this rule. + +### 7. ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP (prefer `\k` over `\3`) + +_Set in: Oniguruma, Ruby, Perl_NG_ + +If this flag is set on the syntax *and* `ONIG_OPTION_CAPTURE_GROUP` is set when calling +Oniguruma, then if a name is used on any capture, all captures must also use names: A +single use of a named capture prohibits the use of numbered captures. + +### 8. ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME (allow `(?)...(?)`) + +_Set in: Oniguruma, Ruby, Perl_NG_ + +If this flag is set, multiple capture groups may use the same name. If this flag is +clear, then reuse of a name will produce an error message. + +### 9. ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY (`a{n}?` is equivalent to `(?:a{n})?`) + +_Set in: Oniguruma, Ruby_ + +If this flag is set, then intervals of a fixed size will ignore a lazy (non-greedy) +`?` quantifier and treat it as an optional match (an ordinary `r?`), since "match as +little as possible" is meaningless for a fixed-size interval. If this flag is clear, +then `r{n}?` will mean the same as `r{n}`, and the useless `?` will be discarded. + +### 10. ONIG_SYN_ISOLATED_OPTION_CONTINUE_BRANCH (`..(?i)..`) + +_Set in: Python, Perl_NG, Perl, Java_ + +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). +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)/` + +### 11. ONIG_SYN_VARIABLE_LEN_LOOK_BEHIND (`(?<=...a+...)`) + +_Set in: Oniguruma, Java_ + +If this flag is set, then a variable length expressions are allowed in look-behind. + +### 12. ONIG_SYN_PYTHON (enable `\UHHHHHHHH` for Unicode) + +_Set in: Python_ + +(New feature as of Oniguruma 6.9.7) + +### 13. ONIG_SYN_WHOLE_OPTIONS (enable options `(?CLI)`) + +_Set in: Oniguruma_ + +(New feature as of Oniguruma 6.9.8) + +### 14. ONIG_SYN_BRE_ANCHOR_AT_EDGE_OF_SUBEXP (enable `\(^abc$\)`) + +_Set in: Grep, PosixBasic_ + +(New feature as of Oniguruma 6.9.9) + +### 20. ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC (add `\n` to `[^...]`) + +_Set in: Grep_ + +If this flag is set, all newline characters (like `\n`) will be excluded from a negative +character class automatically, as if the pattern had been written as `[^...\n]`. If this +flag is clear, negative character classes do not automatically exclude newlines, and +only exclude those characters and ranges written in them. + +### 21. ONIG_SYN_BACKSLASH_ESCAPE_IN_CC (allow `[...\w...]`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex_ + +If this flag is set, shorthands like `\w` are allowed to describe characters in character +classes. If this flag is clear, shorthands like `\w` are treated as a redundantly-escaped +literal `w`. + +### 22. ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC (silently discard `[z-a]`) + +_Set in: Grep, Emacs_ + +If this flag is set, then character ranges like `[z-a]` that are broken or contain no +characters will be silently ignored. If this flag is clear, then broken or empty +character ranges will produce an error message. + +### 23. ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC (treat `[0-9-a]` as `[0-9\-a]`) + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex, PosixExtended_ + +If this flag is set, then a trailing `-` after a character range will be taken as a +literal `-`, as if it had been escaped as `\-`. If this flag is clear, then a trailing +`-` after a character range will produce an error message. + +### 24. ONIG_SYN_WARN_CC_OP_NOT_ESCAPED (warn on `[[...]` and `[-x]`) + +_Set in: Oniguruma, Ruby_ + +If this flag is set, Oniguruma will be stricter about warning for bad forms in +character classes: `[[...]` will produce a warning, but `[\[...]` will not; +`[-x]` will produce a warning, but `[\-x]` will not; `[x&&-y]` will produce a warning, +while `[x&&\-y]` will not; and so on. If this flag is clear, all of these warnings +will be silently discarded. + +### 25. ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT (warn on `(?:a*)+`) + +_Set in: Oniguruma, Ruby_ + +If this flag is set, Oniguruma will warn about nested repeat operators those have no meaning, like `(?:a*)+`. +If this flag is clear, Oniguruma will allow the nested repeat operators without warning about them. + +### 26. ONIG_SYN_ALLOW_INVALID_CODE_END_OF_RANGE_IN_CC (allow `[a-\x{7fffffff}]`) + +_Set in: Oniguruma_ + +If this flag is set, then invalid code points at the end of range in character class are allowed. + +### 27. ONIG_SYN_ALLOW_CHAR_TYPE_FOLLOWED_BY_MINUS_IN_CC (allow `[\w-%]` to mean `[\w\-%]`) + +_Set in: Perl_NG, Perl, Java_ + +(New feature as of Oniguruma 6.9.10) + +### 31. ONIG_SYN_CONTEXT_INDEP_ANCHORS + +_Set in: Oniguruma, Python, Ruby, Perl_NG, Perl, Java, GnuRegex, PosixExtended_ + +Not currently used, and does nothing. (But still set in several syntaxes for some +reason.) + +---------- + +## Usage tables + +These tables show which of the built-in syntaxes use which flags and options, for easy comparison between them. + +### Group One Flags (op) + +| ID | Option | Onig | Pythn | Ruby | PeNG | Perl | Java | Gnu | Grep | Emacs | PosEx | PosB | ASIS | +| ----- | ------------------------------------------ | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | +| 0 | `ONIG_SYN_OP_VARIABLE_META_CHARACTERS` | - | - | - | - | - | - | - | - | - | - | - | - | +| 1 | `ONIG_SYN_OP_DOT_ANYCHAR` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | +| 2 | `ONIG_SYN_OP_ASTERISK_ZERO_INF` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | +| 3 | `ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF` | - | - | - | - | - | - | - | - | - | - | - | - | +| 4 | `ONIG_SYN_OP_PLUS_ONE_INF` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | Yes | Yes | - | - | +| 5 | `ONIG_SYN_OP_ESC_PLUS_ONE_INF` | - | - | - | - | - | - | - | Yes | - | - | - | - | +| 6 | `ONIG_SYN_OP_QMARK_ZERO_ONE` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | Yes | Yes | - | - | +| 7 | `ONIG_SYN_OP_ESC_QMARK_ZERO_ONE` | - | - | - | - | - | - | - | Yes | - | - | - | - | +| 8 | `ONIG_SYN_OP_BRACE_INTERVAL` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | - | Yes | - | - | +| 9 | `ONIG_SYN_OP_ESC_BRACE_INTERVAL` | - | - | - | - | - | - | - | Yes | Yes | - | Yes | - | +| 10 | `ONIG_SYN_OP_VBAR_ALT` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | - | Yes | - | - | +| 11 | `ONIG_SYN_OP_ESC_VBAR_ALT` | - | - | - | - | - | - | - | Yes | Yes | - | - | - | +| 12 | `ONIG_SYN_OP_LPAREN_SUBEXP` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | - | Yes | - | - | +| 13 | `ONIG_SYN_OP_ESC_LPAREN_SUBEXP` | - | - | - | - | - | - | - | Yes | Yes | - | Yes | - | +| 14 | `ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | - | - | - | - | +| 15 | `ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | - | - | - | - | +| 16 | `ONIG_SYN_OP_DECIMAL_BACKREF` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | +| 17 | `ONIG_SYN_OP_BRACKET_CC` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | +| 18 | `ONIG_SYN_OP_ESC_W_WORD` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | - | - | - | +| 19 | `ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END` | - | - | - | - | - | - | Yes | Yes | - | - | - | - | +| 20 | `ONIG_SYN_OP_ESC_B_WORD_BOUND` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | - | - | - | +| 21 | `ONIG_SYN_OP_ESC_S_WHITE_SPACE` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | - | - | - | - | +| 22 | `ONIG_SYN_OP_ESC_D_DIGIT` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | - | - | - | - | +| 23 | `ONIG_SYN_OP_LINE_ANCHOR` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | +| 24 | `ONIG_SYN_OP_POSIX_BRACKET` | Yes | - | Yes | Yes | Yes | - | Yes | Yes | - | Yes | Yes | - | +| 25 | `ONIG_SYN_OP_QMARK_NON_GREEDY` | Yes | Yes | Yes | Yes | Yes | Yes | - | - | - | - | - | - | +| 26 | `ONIG_SYN_OP_ESC_CONTROL_CHARS` | Yes | Yes | Yes | Yes | Yes | Yes | - | - | Yes | Yes | Yes | - | +| 27 | `ONIG_SYN_OP_ESC_C_CONTROL` | Yes | Yes | Yes | Yes | Yes | Yes | - | - | - | - | - | - | +| 28 | `ONIG_SYN_OP_ESC_OCTAL3` | Yes | Yes | Yes | Yes | Yes | Yes | - | - | - | - | - | - | +| 29 | `ONIG_SYN_OP_ESC_X_HEX2` | Yes | Yes | Yes | Yes | Yes | Yes | - | - | - | - | - | - | +| 30 | `ONIG_SYN_OP_ESC_X_BRACE_HEX8` | Yes | - | Yes | Yes | Yes | - | - | - | - | - | - | - | +| 31 | `ONIG_SYN_OP_ESC_O_BRACE_OCTAL` | Yes | - | Yes | Yes | Yes | - | - | - | - | - | - | - | + +### Group Two Flags (op2) + +| ID | Option | Onig | Pythn | Ruby | PeNG | Perl | Java | Gnu | Grep | Emacs | PosEx | PosB | ASIS | +| ----- | ---------------------------------------------- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | +| 0 | `ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE` | - | - | - | Yes | Yes | Yes | - | - | - | - | - | - | +| 1 | `ONIG_SYN_OP2_QMARK_GROUP_EFFECT` | Yes | Yes | Yes | Yes | Yes | Yes | - | - | Yes | - | - | - | +| 2 | `ONIG_SYN_OP2_OPTION_PERL` | - | Yes | - | Yes | Yes | Yes | - | - | - | - | - | - | +| 3 | `ONIG_SYN_OP2_OPTION_RUBY` | - | - | Yes | - | - | - | - | - | - | - | - | - | +| 4 | `ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT` | Yes | - | Yes | Yes | Yes | Yes | - | - | - | - | - | - | +| 5 | `ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL` | - | - | - | Yes | Yes | Yes | - | - | - | - | - | - | +| 6 | `ONIG_SYN_OP2_CCLASS_SET_OP` | Yes | - | Yes | - | - | Yes | - | - | - | - | - | - | +| 7 | `ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP` | Yes | - | Yes | Yes | - | - | - | - | - | - | - | - | +| 8 | `ONIG_SYN_OP2_ESC_K_NAMED_BACKREF` | Yes | - | Yes | Yes | - | - | - | - | - | - | - | - | +| 9 | `ONIG_SYN_OP2_ESC_G_SUBEXP_CALL` | Yes | - | Yes | Yes | - | - | - | - | - | - | - | - | +| 10 | `ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY` | - | - | - | - | - | - | - | - | - | - | - | - | +| 11 | `ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL` | Yes | - | Yes | - | - | - | - | - | - | - | - | - | +| 12 | `ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META` | Yes | - | Yes | - | - | - | - | - | - | - | - | - | +| 13 | `ONIG_SYN_OP2_ESC_V_VTAB` | Yes | Yes | Yes | - | - | Yes | - | - | - | - | - | - | +| 14 | `ONIG_SYN_OP2_ESC_U_HEX4` | Yes | Yes | Yes | - | - | Yes | - | - | - | - | - | - | +| 15 | `ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR` | - | - | - | - | - | - | - | - | Yes | - | - | - | +| 16 | `ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY` | Yes | Yes | Yes | Yes | Yes | Yes | - | - | - | - | - | - | +| 17 | `ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT` | Yes | Yes | Yes | Yes | Yes | - | - | - | - | - | - | - | +| 19 | `ONIG_SYN_OP2_ESC_H_XDIGIT` | Yes | - | Yes | - | - | - | - | - | - | - | - | - | +| 20 | `ONIG_SYN_OP2_INEFFECTIVE_ESCAPE` | - | - | - | - | - | - | - | - | - | - | - | Yes | +| 21 | `ONIG_SYN_OP2_QMARK_LPAREN_IF_ELSE` | Yes | Yes | Yes | Yes | Yes | - | - | - | - | - | - | - | +| 22 | `ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP` | Yes | Yes | Yes | Yes | Yes | - | - | - | - | - | - | - | +| 23 | `ONIG_SYN_OP2_ESC_CAPITAL_R_GENERAL_NEWLINE` | Yes | - | Yes | Yes | Yes | - | - | - | - | - | - | - | +| 24 | `ONIG_SYN_OP2_ESC_CAPITAL_N_O_SUPER_DOT` | Yes | - | - | Yes | Yes | - | - | - | - | - | - | - | +| 25 | `ONIG_SYN_OP2_QMARK_TILDE_ABSENT_GROUP` | Yes | - | Yes | Yes | Yes | - | - | - | - | - | - | - | +| 26 | `ONIG_SYN_OP2_ESC_X_Y_TEXT_SEGMENT` | Yes | - | Yes | Yes | Yes | - | - | - | - | - | - | - | +| 27 | `ONIG_SYN_OP2_QMARK_PERL_SUBEXP_CALL` | - | - | - | Yes | - | - | - | - | - | - | - | - | +| 28 | `ONIG_SYN_OP2_QMARK_BRACE_CALLOUT_CONTENTS` | Yes | - | - | Yes | Yes | - | - | - | - | - | - | - | +| 29 | `ONIG_SYN_OP2_ASTERISK_CALLOUT_NAME` | Yes | Yes | - | Yes | Yes | - | - | - | - | - | - | - | +| 30 | `ONIG_SYN_OP2_OPTION_ONIGURUMA` | Yes | - | - | - | - | - | - | - | - | - | - | - | +| 31 | `ONIG_SYN_OP2_QMARK_CAPITAL_P_NAME` | - | Yes | - | - | - | - | - | - | - | - | - | - | + +### Syntax Flags (syn) + +| ID | Option | Onig | Pythn | Ruby | PeNG | Perl | Java | Gnu | Grep | Emacs | PosEx | PosB | ASIS | +| ----- | ---------------------------------------------------- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | +| 0 | `ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | - | Yes | - | - | +| 1 | `ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | - | Yes | - | - | +| 2 | `ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP` | - | - | - | - | - | - | - | - | - | Yes | - | - | +| 3 | `ONIG_SYN_ALLOW_INVALID_INTERVAL` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | - | - | - | - | +| 4 | `ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV` | Yes | Yes | Yes | - | - | - | - | - | - | - | - | - | +| 5 | `ONIG_SYN_STRICT_CHECK_BACKREF` | - | - | - | - | - | - | - | - | - | - | - | - | +| 6 | `ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND` | Yes | - | Yes | - | - | Yes | - | - | - | - | - | - | +| 7 | `ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP` | Yes | - | Yes | Yes | - | - | - | - | - | - | - | - | +| 8 | `ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME` | Yes | - | Yes | Yes | - | - | - | - | - | - | - | - | +| 9 | `ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY` | Yes | - | Yes | - | - | - | - | - | - | - | - | - | +| 10 | `ONIG_SYN_ISOLATED_OPTION_CONTINUE_BRANCH` | - | Yes | - | Yes | Yes | Yes | - | - | - | - | - | - | +| 11 | `ONIG_SYN_VARIABLE_LEN_LOOK_BEHIND` | Yes | - | - | - | - | Yes | - | - | - | - | - | - | +| 12 | `ONIG_SYN_PYTHON` | - | Yes | - | - | - | - | - | - | - | - | - | - | +| 13 | `ONIG_SYN_WHOLE_OPTIONS` | Yes | - | - | - | - | - | - | - | - | - | - | - | +| 14 | `ONIG_SYN_BRE_ANCHOR_AT_EDGE_OF_SUBEXP` | - | - | - | - | - | - | - | Yes | - | - | Yes | - | +| 20 | `ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC` | - | - | - | - | - | - | - | Yes | - | - | - | - | +| 21 | `ONIG_SYN_BACKSLASH_ESCAPE_IN_CC` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | - | - | - | - | +| 22 | `ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC` | - | - | - | - | - | - | - | Yes | Yes | - | - | - | +| 23 | `ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | - | Yes | - | - | +| 24 | `ONIG_SYN_WARN_CC_OP_NOT_ESCAPED` | Yes | - | Yes | - | - | - | - | - | - | - | - | - | +| 25 | `ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT` | Yes | - | Yes | - | - | - | - | - | - | - | - | - | +| 26 | `ONIG_SYN_ALLOW_INVALID_CODE_END_OF_RANGE_IN_CC` | Yes | - | - | - | - | - | - | - | - | - | - | - | +| 27 | `ONIG_SYN_ALLOW_CHAR_TYPE_FOLLOWED_BY_MINUS_IN_CC` | - | - | - | Yes | Yes | Yes | - | - | - | - | - | - | +| 31 | `ONIG_SYN_CONTEXT_INDEP_ANCHORS` | Yes | Yes | Yes | Yes | Yes | Yes | Yes | - | - | Yes | - | - | diff --git a/internal/components/third_party/oniguruma/doc/UNICODE_PROPERTIES b/internal/components/third_party/oniguruma/doc/UNICODE_PROPERTIES new file mode 100644 index 0000000000..7ab6d78c6d --- /dev/null +++ b/internal/components/third_party/oniguruma/doc/UNICODE_PROPERTIES @@ -0,0 +1,873 @@ +Unicode Properties (Unicode Version: 16.0.0, Emoji: 16.0) + +ASCII_Hex_Digit +Adlam +Ahom +Alphabetic +Anatolian_Hieroglyphs +Any +Arabic +Armenian +Assigned +Avestan +Balinese +Bamum +Bassa_Vah +Batak +Bengali +Bhaiksuki +Bidi_Control +Bopomofo +Brahmi +Braille +Buginese +Buhid +C +Canadian_Aboriginal +Carian +Case_Ignorable +Cased +Caucasian_Albanian +Cc +Cf +Chakma +Cham +Changes_When_Casefolded +Changes_When_Casemapped +Changes_When_Lowercased +Changes_When_Titlecased +Changes_When_Uppercased +Cherokee +Chorasmian +Cn +Co +Common +Coptic +Cs +Cuneiform +Cypriot +Cypro_Minoan +Cyrillic +Dash +Default_Ignorable_Code_Point +Deprecated +Deseret +Devanagari +Diacritic +Dives_Akuru +Dogra +Duployan +Egyptian_Hieroglyphs +Elbasan +Elymaic +Emoji +Emoji_Component +Emoji_Modifier +Emoji_Modifier_Base +Emoji_Presentation +Ethiopic +Extended_Pictographic +Extender +Garay +Georgian +Glagolitic +Gothic +Grantha +Grapheme_Base +Grapheme_Extend +Grapheme_Link +Greek +Gujarati +Gunjala_Gondi +Gurmukhi +Gurung_Khema +Han +Hangul +Hanifi_Rohingya +Hanunoo +Hatran +Hebrew +Hex_Digit +Hiragana +Hyphen +IDS_Binary_Operator +IDS_Trinary_Operator +IDS_Unary_Operator +ID_Compat_Math_Continue +ID_Compat_Math_Start +ID_Continue +ID_Start +Ideographic +Imperial_Aramaic +InCB +Inherited +Inscriptional_Pahlavi +Inscriptional_Parthian +Javanese +Join_Control +Kaithi +Kannada +Katakana +Kawi +Kayah_Li +Kharoshthi +Khitan_Small_Script +Khmer +Khojki +Khudawadi +Kirat_Rai +L +LC +Lao +Latin +Lepcha +Limbu +Linear_A +Linear_B +Lisu +Ll +Lm +Lo +Logical_Order_Exception +Lowercase +Lt +Lu +Lycian +Lydian +M +Mahajani +Makasar +Malayalam +Mandaic +Manichaean +Marchen +Masaram_Gondi +Math +Mc +Me +Medefaidrin +Meetei_Mayek +Mende_Kikakui +Meroitic_Cursive +Meroitic_Hieroglyphs +Miao +Mn +Modi +Modifier_Combining_Mark +Mongolian +Mro +Multani +Myanmar +N +Nabataean +Nag_Mundari +Nandinagari +Nd +New_Tai_Lue +Newa +Nko +Nl +No +Noncharacter_Code_Point +Nushu +Nyiakeng_Puachue_Hmong +Ogham +Ol_Chiki +Ol_Onal +Old_Hungarian +Old_Italic +Old_North_Arabian +Old_Permic +Old_Persian +Old_Sogdian +Old_South_Arabian +Old_Turkic +Old_Uyghur +Oriya +Osage +Osmanya +Other_Alphabetic +Other_Default_Ignorable_Code_Point +Other_Grapheme_Extend +Other_ID_Continue +Other_ID_Start +Other_Lowercase +Other_Math +Other_Uppercase +P +Pahawh_Hmong +Palmyrene +Pattern_Syntax +Pattern_White_Space +Pau_Cin_Hau +Pc +Pd +Pe +Pf +Phags_Pa +Phoenician +Pi +Po +Prepended_Concatenation_Mark +Ps +Psalter_Pahlavi +Quotation_Mark +Radical +Regional_Indicator +Rejang +Runic +S +Samaritan +Saurashtra +Sc +Sentence_Terminal +Sharada +Shavian +Siddham +SignWriting +Sinhala +Sk +Sm +So +Soft_Dotted +Sogdian +Sora_Sompeng +Soyombo +Sundanese +Sunuwar +Syloti_Nagri +Syriac +Tagalog +Tagbanwa +Tai_Le +Tai_Tham +Tai_Viet +Takri +Tamil +Tangsa +Tangut +Telugu +Terminal_Punctuation +Thaana +Thai +Tibetan +Tifinagh +Tirhuta +Todhri +Toto +Tulu_Tigalari +Ugaritic +Unified_Ideograph +Unknown +Uppercase +Vai +Variation_Selector +Vithkuqi +Wancho +Warang_Citi +White_Space +XID_Continue +XID_Start +Yezidi +Yi +Z +Zanabazar_Square +Zl +Zp +Zs +Adlm +Aghb +AHex +Arab +Armi +Armn +Avst +Bali +Bamu +Bass +Batk +Beng +Bhks +Bidi_C +Bopo +Brah +Brai +Bugi +Buhd +Cakm +Cans +Cari +Cased_Letter +Cher +Chrs +CI +Close_Punctuation +Combining_Mark +Connector_Punctuation +Control +Copt +Cpmn +Cprt +Currency_Symbol +CWCF +CWCM +CWL +CWT +CWU +Cyrl +Dash_Punctuation +Decimal_Number +Dep +Deva +DI +Dia +Diak +Dogr +Dsrt +Dupl +EBase +EComp +Egyp +Elba +Elym +EMod +Enclosing_Mark +EPres +Ethi +Ext +ExtPict +Final_Punctuation +Format +Gara +Geor +Glag +Gong +Gonm +Goth +Gran +Gr_Base +Grek +Gr_Ext +Gr_Link +Gujr +Gukh +Guru +Hang +Hani +Hano +Hatr +Hebr +Hex +Hira +Hluw +Hmng +Hmnp +Hung +IDC +Ideo +IDS +IDSB +IDST +IDSU +Initial_Punctuation +Ital +Java +Join_C +Kali +Kana +Khar +Khmr +Khoj +Kits +Knda +Krai +Kthi +Lana +Laoo +Latn +Lepc +Letter +Letter_Number +Limb +Lina +Linb +Line_Separator +LOE +Lowercase_Letter +Lyci +Lydi +Mahj +Maka +Mand +Mani +Marc +Mark +Math_Symbol +MCM +Medf +Mend +Merc +Mero +Mlym +Modifier_Letter +Modifier_Symbol +Mong +Mroo +Mtei +Mult +Mymr +Nagm +Nand +Narb +Nbat +NChar +Nkoo +Nonspacing_Mark +Nshu +Number +OAlpha +ODI +Ogam +OGr_Ext +OIDC +OIDS +Olck +OLower +OMath +Onao +Open_Punctuation +Orkh +Orya +Osge +Osma +Other +Other_Letter +Other_Number +Other_Punctuation +Other_Symbol +Ougr +OUpper +Palm +Paragraph_Separator +Pat_Syn +Pat_WS +Pauc +PCM +Perm +Phag +Phli +Phlp +Phnx +Plrd +Private_Use +Prti +punct +Punctuation +Qaac +Qaai +QMark +RI +Rjng +Rohg +Runr +Samr +Sarb +Saur +SD +Separator +Sgnw +Shaw +Shrd +Sidd +Sind +Sinh +Sogd +Sogo +Sora +Soyo +Space_Separator +Spacing_Mark +STerm +Sund +Sunu +Surrogate +Sylo +Symbol +Syrc +Tagb +Takr +Tale +Talu +Taml +Tang +Tavt +Telu +Term +Tfng +Tglg +Thaa +Tibt +Tirh +Titlecase_Letter +Tnsa +Todr +Tutg +Ugar +UIdeo +Unassigned +Uppercase_Letter +Vaii +Vith +VS +Wara +Wcho +WSpace +XIDC +XIDS +Xpeo +Xsux +Yezi +Yiii +Zanb +Zinh +Zyyy +Zzzz +In_Basic_Latin +In_Latin_1_Supplement +In_Latin_Extended_A +In_Latin_Extended_B +In_IPA_Extensions +In_Spacing_Modifier_Letters +In_Combining_Diacritical_Marks +In_Greek_and_Coptic +In_Cyrillic +In_Cyrillic_Supplement +In_Armenian +In_Hebrew +In_Arabic +In_Syriac +In_Arabic_Supplement +In_Thaana +In_NKo +In_Samaritan +In_Mandaic +In_Syriac_Supplement +In_Arabic_Extended_B +In_Arabic_Extended_A +In_Devanagari +In_Bengali +In_Gurmukhi +In_Gujarati +In_Oriya +In_Tamil +In_Telugu +In_Kannada +In_Malayalam +In_Sinhala +In_Thai +In_Lao +In_Tibetan +In_Myanmar +In_Georgian +In_Hangul_Jamo +In_Ethiopic +In_Ethiopic_Supplement +In_Cherokee +In_Unified_Canadian_Aboriginal_Syllabics +In_Ogham +In_Runic +In_Tagalog +In_Hanunoo +In_Buhid +In_Tagbanwa +In_Khmer +In_Mongolian +In_Unified_Canadian_Aboriginal_Syllabics_Extended +In_Limbu +In_Tai_Le +In_New_Tai_Lue +In_Khmer_Symbols +In_Buginese +In_Tai_Tham +In_Combining_Diacritical_Marks_Extended +In_Balinese +In_Sundanese +In_Batak +In_Lepcha +In_Ol_Chiki +In_Cyrillic_Extended_C +In_Georgian_Extended +In_Sundanese_Supplement +In_Vedic_Extensions +In_Phonetic_Extensions +In_Phonetic_Extensions_Supplement +In_Combining_Diacritical_Marks_Supplement +In_Latin_Extended_Additional +In_Greek_Extended +In_General_Punctuation +In_Superscripts_and_Subscripts +In_Currency_Symbols +In_Combining_Diacritical_Marks_for_Symbols +In_Letterlike_Symbols +In_Number_Forms +In_Arrows +In_Mathematical_Operators +In_Miscellaneous_Technical +In_Control_Pictures +In_Optical_Character_Recognition +In_Enclosed_Alphanumerics +In_Box_Drawing +In_Block_Elements +In_Geometric_Shapes +In_Miscellaneous_Symbols +In_Dingbats +In_Miscellaneous_Mathematical_Symbols_A +In_Supplemental_Arrows_A +In_Braille_Patterns +In_Supplemental_Arrows_B +In_Miscellaneous_Mathematical_Symbols_B +In_Supplemental_Mathematical_Operators +In_Miscellaneous_Symbols_and_Arrows +In_Glagolitic +In_Latin_Extended_C +In_Coptic +In_Georgian_Supplement +In_Tifinagh +In_Ethiopic_Extended +In_Cyrillic_Extended_A +In_Supplemental_Punctuation +In_CJK_Radicals_Supplement +In_Kangxi_Radicals +In_Ideographic_Description_Characters +In_CJK_Symbols_and_Punctuation +In_Hiragana +In_Katakana +In_Bopomofo +In_Hangul_Compatibility_Jamo +In_Kanbun +In_Bopomofo_Extended +In_CJK_Strokes +In_Katakana_Phonetic_Extensions +In_Enclosed_CJK_Letters_and_Months +In_CJK_Compatibility +In_CJK_Unified_Ideographs_Extension_A +In_Yijing_Hexagram_Symbols +In_CJK_Unified_Ideographs +In_Yi_Syllables +In_Yi_Radicals +In_Lisu +In_Vai +In_Cyrillic_Extended_B +In_Bamum +In_Modifier_Tone_Letters +In_Latin_Extended_D +In_Syloti_Nagri +In_Common_Indic_Number_Forms +In_Phags_pa +In_Saurashtra +In_Devanagari_Extended +In_Kayah_Li +In_Rejang +In_Hangul_Jamo_Extended_A +In_Javanese +In_Myanmar_Extended_B +In_Cham +In_Myanmar_Extended_A +In_Tai_Viet +In_Meetei_Mayek_Extensions +In_Ethiopic_Extended_A +In_Latin_Extended_E +In_Cherokee_Supplement +In_Meetei_Mayek +In_Hangul_Syllables +In_Hangul_Jamo_Extended_B +In_High_Surrogates +In_High_Private_Use_Surrogates +In_Low_Surrogates +In_Private_Use_Area +In_CJK_Compatibility_Ideographs +In_Alphabetic_Presentation_Forms +In_Arabic_Presentation_Forms_A +In_Variation_Selectors +In_Vertical_Forms +In_Combining_Half_Marks +In_CJK_Compatibility_Forms +In_Small_Form_Variants +In_Arabic_Presentation_Forms_B +In_Halfwidth_and_Fullwidth_Forms +In_Specials +In_Linear_B_Syllabary +In_Linear_B_Ideograms +In_Aegean_Numbers +In_Ancient_Greek_Numbers +In_Ancient_Symbols +In_Phaistos_Disc +In_Lycian +In_Carian +In_Coptic_Epact_Numbers +In_Old_Italic +In_Gothic +In_Old_Permic +In_Ugaritic +In_Old_Persian +In_Deseret +In_Shavian +In_Osmanya +In_Osage +In_Elbasan +In_Caucasian_Albanian +In_Vithkuqi +In_Todhri +In_Linear_A +In_Latin_Extended_F +In_Cypriot_Syllabary +In_Imperial_Aramaic +In_Palmyrene +In_Nabataean +In_Hatran +In_Phoenician +In_Lydian +In_Meroitic_Hieroglyphs +In_Meroitic_Cursive +In_Kharoshthi +In_Old_South_Arabian +In_Old_North_Arabian +In_Manichaean +In_Avestan +In_Inscriptional_Parthian +In_Inscriptional_Pahlavi +In_Psalter_Pahlavi +In_Old_Turkic +In_Old_Hungarian +In_Hanifi_Rohingya +In_Garay +In_Rumi_Numeral_Symbols +In_Yezidi +In_Arabic_Extended_C +In_Old_Sogdian +In_Sogdian +In_Old_Uyghur +In_Chorasmian +In_Elymaic +In_Brahmi +In_Kaithi +In_Sora_Sompeng +In_Chakma +In_Mahajani +In_Sharada +In_Sinhala_Archaic_Numbers +In_Khojki +In_Multani +In_Khudawadi +In_Grantha +In_Tulu_Tigalari +In_Newa +In_Tirhuta +In_Siddham +In_Modi +In_Mongolian_Supplement +In_Takri +In_Myanmar_Extended_C +In_Ahom +In_Dogra +In_Warang_Citi +In_Dives_Akuru +In_Nandinagari +In_Zanabazar_Square +In_Soyombo +In_Unified_Canadian_Aboriginal_Syllabics_Extended_A +In_Pau_Cin_Hau +In_Devanagari_Extended_A +In_Sunuwar +In_Bhaiksuki +In_Marchen +In_Masaram_Gondi +In_Gunjala_Gondi +In_Makasar +In_Kawi +In_Lisu_Supplement +In_Tamil_Supplement +In_Cuneiform +In_Cuneiform_Numbers_and_Punctuation +In_Early_Dynastic_Cuneiform +In_Cypro_Minoan +In_Egyptian_Hieroglyphs +In_Egyptian_Hieroglyph_Format_Controls +In_Egyptian_Hieroglyphs_Extended_A +In_Anatolian_Hieroglyphs +In_Gurung_Khema +In_Bamum_Supplement +In_Mro +In_Tangsa +In_Bassa_Vah +In_Pahawh_Hmong +In_Kirat_Rai +In_Medefaidrin +In_Miao +In_Ideographic_Symbols_and_Punctuation +In_Tangut +In_Tangut_Components +In_Khitan_Small_Script +In_Tangut_Supplement +In_Kana_Extended_B +In_Kana_Supplement +In_Kana_Extended_A +In_Small_Kana_Extension +In_Nushu +In_Duployan +In_Shorthand_Format_Controls +In_Symbols_for_Legacy_Computing_Supplement +In_Znamenny_Musical_Notation +In_Byzantine_Musical_Symbols +In_Musical_Symbols +In_Ancient_Greek_Musical_Notation +In_Kaktovik_Numerals +In_Mayan_Numerals +In_Tai_Xuan_Jing_Symbols +In_Counting_Rod_Numerals +In_Mathematical_Alphanumeric_Symbols +In_Sutton_SignWriting +In_Latin_Extended_G +In_Glagolitic_Supplement +In_Cyrillic_Extended_D +In_Nyiakeng_Puachue_Hmong +In_Toto +In_Wancho +In_Nag_Mundari +In_Ol_Onal +In_Ethiopic_Extended_B +In_Mende_Kikakui +In_Adlam +In_Indic_Siyaq_Numbers +In_Ottoman_Siyaq_Numbers +In_Arabic_Mathematical_Alphabetic_Symbols +In_Mahjong_Tiles +In_Domino_Tiles +In_Playing_Cards +In_Enclosed_Alphanumeric_Supplement +In_Enclosed_Ideographic_Supplement +In_Miscellaneous_Symbols_and_Pictographs +In_Emoticons +In_Ornamental_Dingbats +In_Transport_and_Map_Symbols +In_Alchemical_Symbols +In_Geometric_Shapes_Extended +In_Supplemental_Arrows_C +In_Supplemental_Symbols_and_Pictographs +In_Chess_Symbols +In_Symbols_and_Pictographs_Extended_A +In_Symbols_for_Legacy_Computing +In_CJK_Unified_Ideographs_Extension_B +In_CJK_Unified_Ideographs_Extension_C +In_CJK_Unified_Ideographs_Extension_D +In_CJK_Unified_Ideographs_Extension_E +In_CJK_Unified_Ideographs_Extension_F +In_CJK_Unified_Ideographs_Extension_I +In_CJK_Compatibility_Ideographs_Supplement +In_CJK_Unified_Ideographs_Extension_G +In_CJK_Unified_Ideographs_Extension_H +In_Tags +In_Variation_Selectors_Supplement +In_Supplementary_Private_Use_Area_A +In_Supplementary_Private_Use_Area_B +In_No_Block diff --git a/internal/components/third_party/oniguruma/doc/onig_syn_md.c b/internal/components/third_party/oniguruma/doc/onig_syn_md.c new file mode 100644 index 0000000000..6e29e5ab0f --- /dev/null +++ b/internal/components/third_party/oniguruma/doc/onig_syn_md.c @@ -0,0 +1,667 @@ +/* + * onig_syn_md.c + * Copyright (c) 2024 K.Kosako + * + * Oniguruma OWner: K.Kosako https://github.com/kkos/oniguruma + * SYNTAX.md : seanofw https://github.com/seanofw + * onig_syn_md.c : tonco-miyazawa https://github.com/tonco-miyazawa + */ + +#include +#include +#include +#include "oniguruma.h" + +#define ONIG_SYN_MD_VERSION_INT (00002) +#define TOTAL_NUM_OF_BITS (32) + +#define PRINT_SEPARATOR (printf("===================================================\n")) + +#define INPUT_SYNTAX(syn, abb, set_in) { (syn), (#syn), (abb), (set_in) } +#define INPUT_FLAG(arg) { (arg), (#arg) } + + + +/************************************* Settings *********************************************/ +/* NOW_MODE +1: (OP) +2: (OP2) +3: (BEHAVIOR) */ +#define NOW_MODE (1) + +/* #define PRINT_UNDEFINED_FLAG */ + +/* #define PRINT_SYNTAX_FORWARD_ORDER */ + +/* #define USE_YOUR_OWN_SYNTAX */ + +/* #define PRINT_DEBUG_INFO */ + +#define PRINT_VERSION_INFO +#define PRINT_SET_IN_INFO +#define PRINT_TABLE_INFO +#define WARN_UNDEFINED_FLAG_USED +/************************************* Settings *********************************************/ + + +/************************ Switch between OP, OP2, BEHAVIOR **********************************/ +#if NOW_MODE == 1 + +#define SYNTAX_MEMBER_NAME ("op") +#define TITLE_STRING ("Group One Flags (op)") +#define SYNTAX_MEMBER(syn) ((syn)->op) +#define IS_SYNTAX_MEMBER(syn, opm) (((syn)->op & (opm)) != 0) + +#elif NOW_MODE == 2 + +#define SYNTAX_MEMBER_NAME ("op2") +#define TITLE_STRING ("Group Two Flags (op2)") +#define SYNTAX_MEMBER(syn) ((syn)->op2) +#define IS_SYNTAX_MEMBER(syn, opm) (((syn)->op2 & (opm)) != 0) + +#elif NOW_MODE == 3 + +#define SYNTAX_MEMBER_NAME ("behavior") +#define TITLE_STRING ("Syntax Flags (syn)") +#define SYNTAX_MEMBER(syn) ((syn)->behavior) +#define IS_SYNTAX_MEMBER(syn, opm) (((syn)->behavior & (opm)) != 0) + +#else +#error "Check 'NOW_MODE' value." +#endif +/************************ Switch between OP, OP2, BEHAVIOR **********************************/ + + +/*********************************** Your own syntax ****************************************/ +#ifdef USE_YOUR_OWN_SYNTAX +static OnigSyntaxType OnigSyntaxYourOwn; +#define ONIG_SYNTAX_YOUROWN (&OnigSyntaxYourOwn) + +static OnigSyntaxType OnigSyntaxYourOwn = { + 0xf0f0f0f0 /* Group One Flags (op) */ + , 0xffff0000 /* Group Two Flags (op2) */ + , 0x00ff00ff /* Syntax Flags (syn) */ + , ONIG_OPTION_NONE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; +#endif +/*********************************** Your own syntax ****************************************/ + + +/************************************** syntax data *****************************************/ +typedef struct { + OnigSyntaxType* syn; + char *name; + char *abb; + char *set_in; +} syn_data; + + +static syn_data syn_data_list[] = +{ + /* INPUT_SYNTAX(syn, abb, set_in) ===> { (syn), (#syn), (abb), (set_in) } */ + + INPUT_SYNTAX( ONIG_SYNTAX_ASIS , "ASIS" , "ASIS" ) + , INPUT_SYNTAX( ONIG_SYNTAX_POSIX_BASIC , "PosB" , "PosixBasic" ) + , INPUT_SYNTAX( ONIG_SYNTAX_POSIX_EXTENDED , "PosEx", "PosixExtended") + , INPUT_SYNTAX( ONIG_SYNTAX_EMACS , "Emacs", "Emacs") + , INPUT_SYNTAX( ONIG_SYNTAX_GREP , "Grep" , "Grep" ) + , INPUT_SYNTAX( ONIG_SYNTAX_GNU_REGEX , "Gnu" , "GnuRegex" ) + , INPUT_SYNTAX( ONIG_SYNTAX_JAVA , "Java" , "Java" ) + , INPUT_SYNTAX( ONIG_SYNTAX_PERL , "Perl" , "Perl" ) + , INPUT_SYNTAX( ONIG_SYNTAX_PERL_NG , "PeNG" , "Perl_NG" ) + , INPUT_SYNTAX( ONIG_SYNTAX_RUBY , "Ruby" , "Ruby" ) + , INPUT_SYNTAX( ONIG_SYNTAX_PYTHON , "Pythn", "Python") + , INPUT_SYNTAX( ONIG_SYNTAX_ONIGURUMA , "Onig" , "Oniguruma" ) + +#ifdef USE_YOUR_OWN_SYNTAX + , INPUT_SYNTAX( ONIG_SYNTAX_YOUROWN , "Your" , "YourOwn" ) +#endif +}; + +static const int num_of_syntax_types = (sizeof syn_data_list /sizeof syn_data_list[0]); + + +static void print_syn_data_list() +{ + int y; + PRINT_SEPARATOR; + for (y = 0; y < num_of_syntax_types; y++) + { + printf( "\nsyn_data_list[%d]\n", y); + printf( "name='%s'\n" , syn_data_list[y].name); + + printf( "syn->"); + printf( SYNTAX_MEMBER_NAME ); + printf( "= 0x%08x\n", SYNTAX_MEMBER(syn_data_list[y].syn) ); + + printf( "abb='%s'\n" , syn_data_list[y].abb); + printf( "set_in='%s'\n" , syn_data_list[y].set_in); + }; + return ; +} +/************************************** syntax data *****************************************/ + + +/************************************** flag data *******************************************/ +typedef struct { + unsigned int num; + char *name; +} flag_data; + + +/* OP */ +#if NOW_MODE == 1 +static flag_data flag_data_list[] = +{ + +/* The following are no need to sort them in bit order. */ + +/* INPUT_FLAG(arg) ===> { (arg), (#arg) } */ + + INPUT_FLAG( ONIG_SYN_OP_VARIABLE_META_CHARACTERS ) + , INPUT_FLAG( ONIG_SYN_OP_DOT_ANYCHAR ) + , INPUT_FLAG( ONIG_SYN_OP_ASTERISK_ZERO_INF ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF ) + , INPUT_FLAG( ONIG_SYN_OP_PLUS_ONE_INF ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_PLUS_ONE_INF ) + , INPUT_FLAG( ONIG_SYN_OP_QMARK_ZERO_ONE ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_QMARK_ZERO_ONE ) + , INPUT_FLAG( ONIG_SYN_OP_BRACE_INTERVAL ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_BRACE_INTERVAL ) + , INPUT_FLAG( ONIG_SYN_OP_VBAR_ALT ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_VBAR_ALT ) + , INPUT_FLAG( ONIG_SYN_OP_LPAREN_SUBEXP ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_LPAREN_SUBEXP ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR ) + , INPUT_FLAG( ONIG_SYN_OP_DECIMAL_BACKREF ) + , INPUT_FLAG( ONIG_SYN_OP_BRACKET_CC ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_W_WORD ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_B_WORD_BOUND ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_S_WHITE_SPACE ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_D_DIGIT ) + , INPUT_FLAG( ONIG_SYN_OP_LINE_ANCHOR ) + , INPUT_FLAG( ONIG_SYN_OP_POSIX_BRACKET ) + , INPUT_FLAG( ONIG_SYN_OP_QMARK_NON_GREEDY ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_CONTROL_CHARS ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_C_CONTROL ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_OCTAL3 ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_X_HEX2 ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_X_BRACE_HEX8 ) + , INPUT_FLAG( ONIG_SYN_OP_ESC_O_BRACE_OCTAL ) +}; +#endif + + +/* OP2 */ +#if NOW_MODE == 2 +static flag_data flag_data_list[] = +{ + INPUT_FLAG( ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE ) + , INPUT_FLAG( ONIG_SYN_OP2_QMARK_GROUP_EFFECT ) + , INPUT_FLAG( ONIG_SYN_OP2_OPTION_PERL ) + , INPUT_FLAG( ONIG_SYN_OP2_OPTION_RUBY ) + , INPUT_FLAG( ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT ) + , INPUT_FLAG( ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL ) + , INPUT_FLAG( ONIG_SYN_OP2_CCLASS_SET_OP ) + , INPUT_FLAG( ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP ) + , INPUT_FLAG( ONIG_SYN_OP2_ESC_K_NAMED_BACKREF ) + , INPUT_FLAG( ONIG_SYN_OP2_ESC_G_SUBEXP_CALL ) + , INPUT_FLAG( ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY ) + , INPUT_FLAG( ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL ) + , INPUT_FLAG( ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META ) + , INPUT_FLAG( ONIG_SYN_OP2_ESC_V_VTAB ) + , INPUT_FLAG( ONIG_SYN_OP2_ESC_U_HEX4 ) + , INPUT_FLAG( ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR ) + , INPUT_FLAG( ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY ) + , INPUT_FLAG( ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT ) + /* , INPUT_FLAG( ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS ) */ + , INPUT_FLAG( ONIG_SYN_OP2_ESC_H_XDIGIT ) + , INPUT_FLAG( ONIG_SYN_OP2_INEFFECTIVE_ESCAPE ) + , INPUT_FLAG( ONIG_SYN_OP2_QMARK_LPAREN_IF_ELSE ) + , INPUT_FLAG( ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP ) + , INPUT_FLAG( ONIG_SYN_OP2_ESC_CAPITAL_R_GENERAL_NEWLINE ) + , INPUT_FLAG( ONIG_SYN_OP2_ESC_CAPITAL_N_O_SUPER_DOT ) + , INPUT_FLAG( ONIG_SYN_OP2_QMARK_TILDE_ABSENT_GROUP ) + /* , INPUT_FLAG( ONIG_SYN_OP2_ESC_X_Y_GRAPHEME_CLUSTER ) */ /* obsoleted: use next */ + , INPUT_FLAG( ONIG_SYN_OP2_ESC_X_Y_TEXT_SEGMENT ) + , INPUT_FLAG( ONIG_SYN_OP2_QMARK_PERL_SUBEXP_CALL ) + , INPUT_FLAG( ONIG_SYN_OP2_QMARK_BRACE_CALLOUT_CONTENTS ) + , INPUT_FLAG( ONIG_SYN_OP2_ASTERISK_CALLOUT_NAME ) + , INPUT_FLAG( ONIG_SYN_OP2_OPTION_ONIGURUMA ) + , INPUT_FLAG( ONIG_SYN_OP2_QMARK_CAPITAL_P_NAME ) +}; +#endif + + +/* BEHAVIOR */ +#if NOW_MODE == 3 +static flag_data flag_data_list[] = +{ + INPUT_FLAG( ONIG_SYN_CONTEXT_INDEP_ANCHORS ) + , INPUT_FLAG( ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS ) + , INPUT_FLAG( ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS ) + , INPUT_FLAG( ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP ) + , INPUT_FLAG( ONIG_SYN_ALLOW_INVALID_INTERVAL ) + , INPUT_FLAG( ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV ) + , INPUT_FLAG( ONIG_SYN_STRICT_CHECK_BACKREF ) + , INPUT_FLAG( ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND ) + , INPUT_FLAG( ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP ) + , INPUT_FLAG( ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME ) + , INPUT_FLAG( ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY ) + , INPUT_FLAG( ONIG_SYN_ISOLATED_OPTION_CONTINUE_BRANCH ) + , INPUT_FLAG( ONIG_SYN_VARIABLE_LEN_LOOK_BEHIND ) + , INPUT_FLAG( ONIG_SYN_PYTHON ) + , INPUT_FLAG( ONIG_SYN_WHOLE_OPTIONS ) + , INPUT_FLAG( ONIG_SYN_BRE_ANCHOR_AT_EDGE_OF_SUBEXP ) + + /* syntax (behavior) in char class [...] */ + , INPUT_FLAG( ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC ) + , INPUT_FLAG( ONIG_SYN_BACKSLASH_ESCAPE_IN_CC ) + , INPUT_FLAG( ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC ) + , INPUT_FLAG( ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC ) + , INPUT_FLAG( ONIG_SYN_ALLOW_INVALID_CODE_END_OF_RANGE_IN_CC ) + , INPUT_FLAG( ONIG_SYN_ALLOW_CHAR_TYPE_FOLLOWED_BY_MINUS_IN_CC ) + + /* syntax (behavior) warning */ + , INPUT_FLAG( ONIG_SYN_WARN_CC_OP_NOT_ESCAPED ) + , INPUT_FLAG( ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT ) +}; +#endif + + +static const int num_of_flags = (sizeof flag_data_list /sizeof flag_data_list[0]); + +static int flag_name_max_len = 0; + + +static int flag_name_max_len_int() +{ + int i, n, max_len; + max_len = 0; + + for (i = 0; i < num_of_flags; i++) + { + n = strlen(flag_data_list[i].name); + if ( max_len < n ) + { + max_len = n; + } + } + + /* Debug: printf("max_len=%d\n", max_len); */ + return max_len; +} + + +static int convert_bit_shift_num_to_flag_data_list_element( int bit_shift_num ) +{ + int i; + for (i = 0; i < num_of_flags; i++) + { + if ( flag_data_list[i].num == (1U << bit_shift_num) ){ + +#ifdef PRINT_DEBUG_INFO + printf("(1U << %d) ===> flag_data_list[%d]\n", bit_shift_num, i ); +#endif + return i; + } + } + +#ifdef PRINT_DEBUG_INFO + printf("(1U << %d) ===> ( none )\n", bit_shift_num ); +#endif + + /* If not found, returns "-1". This is not Error. */ + return -1; +} + + +static int convert_num_to_bit_shift_num(unsigned int arg_num){ + int x; + for (x = 0; x < TOTAL_NUM_OF_BITS; x++) + { + if ( arg_num == (1U << x) ) + { + return x; + } + } + + /* Error */ + printf(" '0x%08x' is not bit flag.\n", __LINE__, arg_num ); + exit(-1); + return -1; +} + + +static int check_flag_data_duplication() +{ + int i, shift_num; + unsigned int used_bits = 0; + + for (i = 0; i < num_of_flags; i++) + { + if ( (used_bits & flag_data_list[i].num) != 0 ){ + + shift_num = convert_num_to_bit_shift_num(flag_data_list[i].num); + + PRINT_SEPARATOR; + fprintf(stderr, "\n The following bit has already been used.\n", __LINE__ ); + fprintf(stderr, "flag_data_list[%d] : '%s' ", i, flag_data_list[i].name); + fprintf(stderr, "(1U << %d)\n", shift_num); + +#ifndef PRINT_DEBUG_INFO + fprintf(stderr, "\nPlease use '#define PRINT_DEBUG_INFO'.\n"); +#endif + exit(-1); + return -1; + } + used_bits |= flag_data_list[i].num; + } + return 0; +} + + +static void print_flag_data_list() +{ + int i, shift_num; + + PRINT_SEPARATOR; + for (i = 0; i < num_of_flags; i++) + { + shift_num = convert_num_to_bit_shift_num( flag_data_list[i].num ); + + printf( "\nflag_data_list[%d]\n", i); + printf( "name='%s' " , flag_data_list[i].name); + printf( "(1U << %d)\n" , shift_num); + printf( "num=0x%08x\n" , flag_data_list[i].num); + } + return ; +} +/************************************** flag data *******************************************/ + + +/************************************** print table *****************************************/ +static void print_table_head() +{ + int i, y; + + printf("\n### "); + printf( TITLE_STRING ); + printf("\n\n| ID | Option"); + for (i = 0; i < (flag_name_max_len - 1); i++) + { + printf(" "); + } + printf("|"); + + /* ex. print "PeNG " */ +#ifdef PRINT_SYNTAX_FORWARD_ORDER + for (y = 0; y < num_of_syntax_types; y++) +#else + for (y = num_of_syntax_types -1; y > -1; y--) +#endif + { + printf(" %-5.5s |", syn_data_list[y].abb ); + } + + printf("\n| ----- | "); + for (i = 0; i < (flag_name_max_len + 4); i++) + { + printf("-"); + } + printf(" |"); + + for (y = 0; y < num_of_syntax_types; y++) + { + printf(" ----- |"); + } + printf("\n"); + return ; +} + + +static void print_table_body_one_line( int shift_num ) +{ + int i, y, elem, name_chars; + + elem = convert_bit_shift_num_to_flag_data_list_element(shift_num); + + printf("| %2d | ", shift_num); + + if (elem < 0){ + name_chars = printf(" `( Undefined )`"); /* elem == -1 */ + } else { + name_chars = printf("`%s`", flag_data_list[elem].name); + } + + for ( i=0; i < (flag_name_max_len - name_chars + 5); i++){ printf(" "); } + printf("|"); + + /* ex. print ' Yes |' */ +#ifdef PRINT_SYNTAX_FORWARD_ORDER + for (y = 0; y < num_of_syntax_types; y++) +#else + for (y = num_of_syntax_types -1; y > -1; y--) +#endif + { + if ( IS_SYNTAX_MEMBER(syn_data_list[y].syn, (1U << shift_num)) ) + { + printf(" Yes |"); + } else { + printf(" - |"); + } + } + printf("\n"); + return ; +} + + +static void print_table_body() +{ + int x, elem; + for (x = 0; x < TOTAL_NUM_OF_BITS; x++) + { + elem = convert_bit_shift_num_to_flag_data_list_element( x ); + + if (elem < 0) + { +#if !(defined( PRINT_UNDEFINED_FLAG )) + continue; +#endif + } + print_table_body_one_line(x); + } + return ; +} + +/************************************** print table *****************************************/ + + +/************************************* print Set_in *****************************************/ +static void print_set_in_one_line(int shift_num) +{ + int y, elem, count; + + elem = convert_bit_shift_num_to_flag_data_list_element(shift_num); + + if (elem < 0) + { + printf("### %d. ( Undefined )\n", shift_num ); /* elem == -1 */ + } else { + printf("### %d. %s\n", shift_num, flag_data_list[elem].name ); + } + + count = 0; + printf("_Set in: "); +#ifdef PRINT_SYNTAX_FORWARD_ORDER + for (y = 0; y < num_of_syntax_types; y++) +#else + for (y = num_of_syntax_types -1; y > -1; y--) +#endif + { + if ( IS_SYNTAX_MEMBER(syn_data_list[y].syn, (1U << shift_num)) ) + { + if (count > 0){ printf(", "); }; + printf("%s", syn_data_list[y].set_in); + count++; + } + } /* for y */ + + if (count==0){ printf("none"); }; + + printf("_\n\n"); + return ; +} + + +static void print_set_in() +{ + int x, elem; + + PRINT_SEPARATOR; + printf("The following are 'Set in' for oniguruma/doc/SYNTAX.md\n\n## "); + printf( TITLE_STRING ); + printf("\n\n"); + for (x = 0; x < TOTAL_NUM_OF_BITS; x++) + { + elem = convert_bit_shift_num_to_flag_data_list_element( x ); + + if (elem < 0) + { +#if !(defined( PRINT_UNDEFINED_FLAG )) + continue; +#endif + } + + print_set_in_one_line(x); + } + return ; +} + +/************************************* print Set_in *****************************************/ + + +/************************************** main() *****************************************/ + +static void print_version() +{ + printf( "[ onig_syn_md.c ver.%05d ] ", ONIG_SYN_MD_VERSION_INT ); + printf("The loaded oniguruma is '%d.%d.%d'.\n" + , ONIGURUMA_VERSION_MAJOR + , ONIGURUMA_VERSION_MINOR + , ONIGURUMA_VERSION_TEENY ); + return ; +} + + +static void print_debug() +{ + int x; + + print_version(); + print_syn_data_list(); + print_flag_data_list(); + check_flag_data_duplication(); + + /* print: (1U << x) ===> flag_data_list[elem] */ + PRINT_SEPARATOR; + printf("\nThe following are the array elements that correspond to each bit.\n\n"); + for (x = 0; x < TOTAL_NUM_OF_BITS; x++) + { + convert_bit_shift_num_to_flag_data_list_element(x); + } + return ; +} + + +static void warn_undefined_flag_used() +{ + int x, y, elem; + + for (x = 0; x < TOTAL_NUM_OF_BITS; x++) + { + elem = convert_bit_shift_num_to_flag_data_list_element(x); + + if (elem < 0){ + for (y = 0; y < num_of_syntax_types; y++) + { + if ( IS_SYNTAX_MEMBER( syn_data_list[y].syn, (1U << x) ) ) + { + PRINT_SEPARATOR; + printf("warning: An undefined bit flag is used."); + printf(" (1U << %d)\n\n", x); + print_set_in_one_line( x ); + +#ifndef PRINT_UNDEFINED_FLAG + printf("Please use '#define PRINT_UNDEFINED_FLAG'.\n"); +#endif + return ; + } + } /* for y */ + } /* if elem */ + } /* for x */ + return ; +} + + +extern int main(int argc, char* argv[]) +{ +#ifdef PRINT_DEBUG_INFO + print_debug(); + return 0; +#endif + +#ifdef PRINT_VERSION_INFO + print_version(); +#endif + + flag_name_max_len = flag_name_max_len_int(); + check_flag_data_duplication(); + +#ifdef PRINT_SET_IN_INFO + print_set_in(); +#endif + +#ifdef PRINT_TABLE_INFO + print_table_head(); + print_table_body(); +#endif + +#ifdef WARN_UNDEFINED_FLAG_USED + warn_undefined_flag_used(); +#endif + + /* test */ + /* + printf("\n------ test -------\n"); + + int test_x = 17; + print_set_in_one_line( test_x ); + print_table_body_one_line( test_x ); + printf("--------------------\n"); + */ + + /* To avoid 'gcc -Wall' warnings. */ + if (0) + { + print_debug(); + print_version(); + print_set_in(); + print_table_head(); + print_table_body(); + warn_undefined_flag_used(); + } + + return 0; +} diff --git a/internal/components/third_party/oniguruma/harnesses/ascii_compatible.dict b/internal/components/third_party/oniguruma/harnesses/ascii_compatible.dict new file mode 100644 index 0000000000..a3e978b23c --- /dev/null +++ b/internal/components/third_party/oniguruma/harnesses/ascii_compatible.dict @@ -0,0 +1,113 @@ +# First-pass fuzzing dictionary for Oniguruma by Mark Griffin +"\\o{34}" +"\\123" +"\\x{40}" +"\\C-" +"\\M-\\C-" +"\\X" +"\\p{" +"\\p{^" +"}" +"]" +"]" +")" +")" +"\\n" +"\\r" +"\\R" +"\\W" +"\\w" +"\\s" +"\\S" +"\\d" +"\\O" +"\\X" +"\\b" +"\\y" +"\\Y" +"\\A" +"\\z" +"\\K" +"\\G" +"\\p{Print}" +"\\p{ASCII}" +"\\p{Alnum}" +"{0,2}" +"{3,}" +"{,3}" +"{5}" +"{4,2}" +"??" +"*?" +"+?" +"*+" +"{1,3}+" +"(?>" +"\\B" +"(?y{" +"[abcd1-9]" +"[\\w]" +"[\\W]" +"[\\s]" +"[\\S]" +"[\\w\\d" +"[\\p{Alphabetic}" +"[\\x{03}" +"[a-w&&" +"[^" +"[:graph:]" +"[^:cntrl:]" +"(?i:" +"(?i)" +"(?m:" +"(?x:" +"(?W:" +"(?y-:" +"(?y{w}:" +"(?P:" +"(?#" +"(?:" +"(?=" +"(?!" +"(?<=" +"(?" +"(?" +"(?{" +"(?{....}[x])" +"(?{.}[x]>)" +"(?{{{.}}})" +"(?~" +"(?~a)" +"(?~|a|.*)" +"(?~|(?:a|b))" +"(?~|)" +"(?(.) |.)" +"(?('-n'))" +"(?(n+0))" +"(?(n+1))" +"(?(n-1))" +"(?())" +"(?())" +"(?())" +"(*COUNT[tag]{X})" +"\\1" +"\\2" +"\\k" +"\\k<1>" +"\\k<2>" +"\\k<-1>" +"\\k<-2>" +"\\k" +"\\k" +"\\k" +"\\g<-1>" +"\\g" +"name" +"(?a|b\\gc)" +"(?-i:\\g)" +"\\N{name}" +"\\p{Katakana}" +"\\p{Emoji}" +"ss" +"SS" diff --git a/internal/components/third_party/oniguruma/harnesses/base.c b/internal/components/third_party/oniguruma/harnesses/base.c new file mode 100644 index 0000000000..6be5a8f604 --- /dev/null +++ b/internal/components/third_party/oniguruma/harnesses/base.c @@ -0,0 +1,749 @@ +/* + * base.c contributed by Mark Griffin + * Copyright (c) 2019-2022 K.Kosako + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include "oniguruma.h" + +#define PARSE_DEPTH_LIMIT 8 +#define MAX_SUBEXP_CALL_NEST_LEVEL 8 +#define SUBEXP_CALL_LIMIT 1000 +#define BASE_RETRY_LIMIT 20000 +#define BASE_LENGTH 2048 +#define MATCH_STACK_LIMIT 10000000 +#define MAX_REM_SIZE 1048576 +#define MAX_SLOW_REM_SIZE 1024 +#define MAX_SLOW_REM_SIZE2 80 +#define SLOW_RETRY_LIMIT 2000 +#define SLOW_SUBEXP_CALL_LIMIT 100 +#define MAX_SLOW_BACKWARD_REM_SIZE 200 + +//#define EXEC_PRINT_INTERVAL 500000 +//#define DUMP_DATA_INTERVAL 100000 +//#define STAT_PATH "fuzzer.stat_log" +//#define PREV_CONTROL + +#ifdef PREV_CONTROL +#define OPTIONS_AT_COMPILE (ONIG_OPTION_IGNORECASE | ONIG_OPTION_EXTEND | ONIG_OPTION_MULTILINE | ONIG_OPTION_SINGLELINE | ONIG_OPTION_FIND_LONGEST | ONIG_OPTION_FIND_NOT_EMPTY | ONIG_OPTION_NEGATE_SINGLELINE | ONIG_OPTION_DONT_CAPTURE_GROUP | ONIG_OPTION_CAPTURE_GROUP | ONIG_OPTION_WORD_IS_ASCII | ONIG_OPTION_DIGIT_IS_ASCII | ONIG_OPTION_SPACE_IS_ASCII | ONIG_OPTION_POSIX_IS_ASCII | ONIG_OPTION_TEXT_SEGMENT_EXTENDED_GRAPHEME_CLUSTER | ONIG_OPTION_TEXT_SEGMENT_WORD) +#else +#define OPTIONS_AT_COMPILE (ONIG_OPTION_IGNORECASE | ONIG_OPTION_EXTEND | ONIG_OPTION_MULTILINE | ONIG_OPTION_SINGLELINE | ONIG_OPTION_FIND_LONGEST | ONIG_OPTION_FIND_NOT_EMPTY | ONIG_OPTION_NEGATE_SINGLELINE | ONIG_OPTION_DONT_CAPTURE_GROUP | ONIG_OPTION_CAPTURE_GROUP | ONIG_OPTION_WORD_IS_ASCII | ONIG_OPTION_DIGIT_IS_ASCII | ONIG_OPTION_SPACE_IS_ASCII | ONIG_OPTION_POSIX_IS_ASCII | ONIG_OPTION_TEXT_SEGMENT_EXTENDED_GRAPHEME_CLUSTER | ONIG_OPTION_TEXT_SEGMENT_WORD | ONIG_OPTION_IGNORECASE_IS_ASCII) +#endif + +#define OPTIONS_AT_RUNTIME (ONIG_OPTION_NOTBOL | ONIG_OPTION_NOTEOL | ONIG_OPTION_CHECK_VALIDITY_OF_STRING | ONIG_OPTION_NOT_BEGIN_STRING | ONIG_OPTION_NOT_END_STRING | ONIG_OPTION_NOT_BEGIN_POSITION | ONIG_OPTION_CALLBACK_EACH_MATCH) + + +#define ADJUST_LEN(enc, len) do {\ + int mlen = ONIGENC_MBC_MINLEN(enc);\ + if (mlen != 1) { len -= len % mlen; }\ +} while (0) + +typedef unsigned char uint8_t; + + +//#define TEST_PATTERN + +#ifdef TEST_PATTERN + +#if 1 +unsigned char TestPattern[] = { +}; +#endif + +#endif /* TEST_PATTERN */ + +#ifdef STANDALONE + +static void +print_options(FILE* fp, OnigOptionType o) +{ + if ((o & ONIG_OPTION_IGNORECASE) != 0) fprintf(fp, " IGNORECASE"); + if ((o & ONIG_OPTION_EXTEND) != 0) fprintf(fp, " EXTEND"); + if ((o & ONIG_OPTION_MULTILINE) != 0) fprintf(fp, " MULTILINE"); + if ((o & ONIG_OPTION_SINGLELINE) != 0) fprintf(fp, " SINGLELINE"); + if ((o & ONIG_OPTION_FIND_LONGEST) != 0) fprintf(fp, " FIND_LONGEST"); + if ((o & ONIG_OPTION_FIND_NOT_EMPTY) != 0) fprintf(fp, " FIND_NOT_EMPTY"); + if ((o & ONIG_OPTION_NEGATE_SINGLELINE) != 0) fprintf(fp, " NEGATE_SINGLELINE"); + if ((o & ONIG_OPTION_DONT_CAPTURE_GROUP) != 0) fprintf(fp, " DONT_CAPTURE_GROUP"); + if ((o & ONIG_OPTION_CAPTURE_GROUP) != 0) fprintf(fp, " CAPTURE_GROUP"); + if ((o & ONIG_OPTION_NOTBOL) != 0) fprintf(fp, " NOTBOL"); + if ((o & ONIG_OPTION_NOTEOL) != 0) fprintf(fp, " NOTEOL"); + if ((o & ONIG_OPTION_POSIX_REGION) != 0) fprintf(fp, " POSIX_REGION"); + if ((o & ONIG_OPTION_CHECK_VALIDITY_OF_STRING) != 0) fprintf(fp, " CHECK_VALIDITY_OF_STRING"); + if ((o & ONIG_OPTION_IGNORECASE_IS_ASCII) != 0) fprintf(fp, " IGNORECASE_IS_ASCII"); + if ((o & ONIG_OPTION_WORD_IS_ASCII) != 0) fprintf(fp, " WORD_IS_ASCII"); + if ((o & ONIG_OPTION_DIGIT_IS_ASCII) != 0) fprintf(fp, " DIGIT_IS_ASCII"); + if ((o & ONIG_OPTION_SPACE_IS_ASCII) != 0) fprintf(fp, " SPACE_IS_ASCII"); + if ((o & ONIG_OPTION_POSIX_IS_ASCII) != 0) fprintf(fp, " POSIX_IS_ASCII"); + if ((o & ONIG_OPTION_TEXT_SEGMENT_EXTENDED_GRAPHEME_CLUSTER) != 0) fprintf(fp, " TEXT_SEGMENT_EXTENDED_GRAPHEME_CLUSTER"); + if ((o & ONIG_OPTION_TEXT_SEGMENT_WORD) != 0) fprintf(fp, " TEXT_SEGMENT_WORD"); + if ((o & ONIG_OPTION_NOT_BEGIN_STRING) != 0) fprintf(fp, " NOT_BIGIN_STRING"); + if ((o & ONIG_OPTION_NOT_END_STRING) != 0) fprintf(fp, " NOT_END_STRING"); + if ((o & ONIG_OPTION_NOT_BEGIN_POSITION) != 0) fprintf(fp, " NOT_BEGIN_POSITION"); + if ((o & ONIG_OPTION_CALLBACK_EACH_MATCH) != 0) fprintf(fp, " CALLBACK_EACH_MATCH"); +} + +static void +to_binary(unsigned int v, char s[/* 33 */]) +{ + unsigned int mask; + int i; + + mask = 1 << (sizeof(v) * 8 - 1); + i = 0; + do { + s[i++] = (mask & v ? '1' : '0'); + } while (mask >>= 1); + s[i] = 0; +} +#endif + +#ifdef DUMP_INPUT +static void +dump_input(unsigned char* data, size_t len) +{ + static FILE* DumpFp; + static char end[] = { 'E', 'N', 'D' }; + + if (DumpFp == 0) + DumpFp = fopen("dump-input", "w"); + + fseek(DumpFp, 0, SEEK_SET); + fwrite(data, sizeof(unsigned char), len, DumpFp); + fwrite(end, sizeof(char), sizeof(end), DumpFp); + fflush(DumpFp); +} +#endif + +#ifdef DUMP_DATA_INTERVAL +static void +dump_file(char* path, unsigned char* data, size_t len) +{ + FILE* fp; + + fp = fopen(path, "w"); + fwrite(data, sizeof(unsigned char), len, fp); + fclose(fp); +} +#endif + +#ifdef STANDALONE +#include + +static void +dump_data(FILE* fp, unsigned char* data, int len) +{ + int i; + + fprintf(fp, "{\n"); + for (i = 0; i < len; i++) { + unsigned char c = data[i]; + + if (isprint((int )c)) { + if (c == '\\') + fprintf(fp, " '\\\\'"); + else if (c == '\'') + fprintf(fp, " '\\''"); + else + fprintf(fp, " '%c'", c); + } + else { + fprintf(fp, "0x%02x", (int )c); + } + + if (i == len - 1) { + fprintf(fp, "\n"); + } + else { + if (i % 8 == 7) + fprintf(fp, ",\n"); + else + fprintf(fp, ", "); + } + } + fprintf(fp, "};\n"); +} + +#else + +#ifdef EXEC_PRINT_INTERVAL +static void +output_current_time(FILE* fp) +{ + char d[64]; + time_t t; + + t = time(NULL); + strftime(d, sizeof(d), "%m/%d %H:%M:%S", localtime(&t)); + + fprintf(fp, "%s", d); +} +#endif + +#endif + +static int +progress_callout_func(OnigCalloutArgs* args, void* user_data) +{ + return ONIG_CALLOUT_SUCCESS; +} + +static int +each_match_callback_func(const UChar* str, const UChar* end, + const UChar* match_start, OnigRegion* region, void* user_data) +{ + return ONIG_NORMAL; +} + +static unsigned int calc_retry_limit(int sl, int len) +{ + unsigned int r; + unsigned int upper; + int heavy; + + heavy = sl >> 8; + sl &= 0xff; + sl += heavy; + + upper = BASE_RETRY_LIMIT; + if (sl == 2) { + upper = SLOW_RETRY_LIMIT; + } + else if (sl > 2) { + upper = SLOW_RETRY_LIMIT * 3 / sl; + if (upper <= 10) upper = 10; + } + + if (len < BASE_LENGTH) { + r = BASE_RETRY_LIMIT; + } + else { + r = BASE_RETRY_LIMIT * BASE_LENGTH / len; + } + + if (r > upper) + r = upper; + + return r; +} + +static int +search(regex_t* reg, unsigned char* str, unsigned char* end, OnigOptionType options, int backward, int sl) +{ + int r; + unsigned char *start, *range; + OnigRegion *region; + unsigned int retry_limit; + size_t len; + + region = onig_region_new(); + + len = (size_t )(end - str); + retry_limit = calc_retry_limit(sl, len); + + onig_set_retry_limit_in_search(retry_limit); + onig_set_match_stack_limit_size(MATCH_STACK_LIMIT); + if (sl >= 2) + onig_set_subexp_call_limit_in_search(SLOW_SUBEXP_CALL_LIMIT); + else + onig_set_subexp_call_limit_in_search(SUBEXP_CALL_LIMIT); + +#ifdef STANDALONE + fprintf(stdout, "retry limit: %u\n", retry_limit); + fprintf(stdout, "end - str: %td\n", end - str); +#endif + + if (backward != 0) { + start = end; + range = str; + } + else { + start = str; + range = end; + } + + r = onig_search(reg, str, end, start, range, region, (options & OPTIONS_AT_RUNTIME)); + if (r >= 0) { +#ifdef STANDALONE + int i; + + fprintf(stdout, "match at %d (%s)\n", r, + ONIGENC_NAME(onig_get_encoding(reg))); + for (i = 0; i < region->num_regs; i++) { + fprintf(stdout, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]); + } +#endif + } + else if (r == ONIG_MISMATCH) { +#ifdef STANDALONE + fprintf(stdout, "search fail (%s)\n", + ONIGENC_NAME(onig_get_encoding(reg))); +#endif + } + else { /* error */ +#ifdef STANDALONE + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + + onig_error_code_to_str((UChar* )s, r); + fprintf(stdout, "ERROR: %s\n", s); + fprintf(stdout, " (%s)\n", ONIGENC_NAME(onig_get_encoding(reg))); +#endif + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + + if (r == ONIGERR_STACK_BUG || + r == ONIGERR_UNDEFINED_BYTECODE || + r == ONIGERR_UNEXPECTED_BYTECODE) + return -2; + + return -1; + } + + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + return 0; +} + +static long INPUT_COUNT; +static long EXEC_COUNT; +static long EXEC_COUNT_INTERVAL; +static long REGEX_SUCCESS_COUNT; +static long VALID_STRING_COUNT; + +static int +exec(OnigEncoding enc, OnigOptionType options, OnigSyntaxType* syntax, + char* apattern, char* apattern_end, + char* adata_pattern, char* adata_pattern_end, + char* astr, UChar* end, int backward, int sl) +{ + int r; + regex_t* reg; + OnigErrorInfo einfo; + UChar* str = (UChar* )astr; + UChar* pattern = (UChar* )apattern; + UChar* pattern_end = (UChar* )apattern_end; + UChar* data_pattern = (UChar* )adata_pattern; + UChar* data_pattern_end = (UChar* )adata_pattern_end; + + EXEC_COUNT++; + EXEC_COUNT_INTERVAL++; + + onig_initialize(&enc, 1); + (void)onig_set_progress_callout(progress_callout_func); +#ifdef PARSE_DEPTH_LIMIT + onig_set_parse_depth_limit(PARSE_DEPTH_LIMIT); +#endif + onig_set_subexp_call_max_nest_level(MAX_SUBEXP_CALL_NEST_LEVEL); + onig_set_callback_each_match(each_match_callback_func); + + r = onig_new(®, pattern, pattern_end, + (options & OPTIONS_AT_COMPILE), enc, syntax, &einfo); + if (r != ONIG_NORMAL) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); +#ifdef STANDALONE + fprintf(stdout, "ERROR: %s\n", s); +#endif + onig_end(); + + if (r == ONIGERR_PARSER_BUG || + r == ONIGERR_STACK_BUG || + r == ONIGERR_UNDEFINED_BYTECODE || + r == ONIGERR_UNEXPECTED_BYTECODE) { + return -2; + } + else + return -1; + } + REGEX_SUCCESS_COUNT++; + + if (data_pattern == pattern || + onigenc_is_valid_mbc_string(enc, data_pattern, data_pattern_end) != 0) { + r = search(reg, data_pattern, data_pattern_end, options, backward, sl); + if (r == -2) return -2; + } + + if (onigenc_is_valid_mbc_string(enc, str, end) != 0) { + VALID_STRING_COUNT++; + r = search(reg, str, end, options, backward, sl); + if (r == -2) return -2; + } + + onig_free(reg); + onig_end(); + return 0; +} + +static size_t +fix_size(size_t x, OnigEncoding enc, int sl, int backward) +{ + if (x > MAX_REM_SIZE) x = MAX_REM_SIZE; + + if (sl > 0) { + if (sl >= 256) { // 256: exists heavy element + if (x > MAX_SLOW_REM_SIZE2) x = MAX_SLOW_REM_SIZE2; + } + else { + if (x > MAX_SLOW_REM_SIZE) x = MAX_SLOW_REM_SIZE; + } + } + if (backward != 0 && enc == ONIG_ENCODING_GB18030) { + if (x > MAX_SLOW_BACKWARD_REM_SIZE) + x = MAX_SLOW_BACKWARD_REM_SIZE; + } + + ADJUST_LEN(enc, x); + return x; +} + +static int +alloc_exec(OnigEncoding enc, OnigOptionType options, OnigSyntaxType* syntax, + int backward, int pattern_size, size_t rem_size, unsigned char *data) +{ + extern int onig_detect_can_be_slow_pattern(const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax); + + int r; + int sl; + int data_pattern_size; + unsigned char *pattern; + unsigned char *pattern_end; + unsigned char *data_pattern; + unsigned char *data_pattern_end; + unsigned char *str_null_end; + +#ifdef TEST_PATTERN + pattern = (unsigned char *)malloc(sizeof(TestPattern)); + memcpy(pattern, TestPattern, sizeof(TestPattern)); + pattern_end = pattern + sizeof(TestPattern); +#else + pattern = (unsigned char *)malloc(pattern_size != 0 ? pattern_size : 1); + pattern_end = pattern + pattern_size; + memcpy(pattern, data, pattern_size); +#endif + + sl = onig_detect_can_be_slow_pattern(pattern, pattern_end, options, enc, syntax); +#ifdef STANDALONE + fprintf(stdout, "sl: %d\n", sl); +#endif + + data_pattern_size = fix_size(pattern_size, enc, sl, backward); + + if ( +#ifdef TEST_PATTERN + 1 || +#endif + data_pattern_size != pattern_size) { + data_pattern = (unsigned char *)malloc(data_pattern_size != 0 + ? data_pattern_size : 1); + data_pattern_end = data_pattern + data_pattern_size; + memcpy(data_pattern, data, data_pattern_size); + } + else { + data_pattern = pattern; + data_pattern_end = pattern_end; + } + + data += pattern_size; + rem_size -= pattern_size; + rem_size = fix_size(rem_size, enc, sl, backward); +#ifdef STANDALONE + fprintf(stdout, "rem_size: %ld\n", rem_size); +#endif + + unsigned char *str = (unsigned char*)malloc(rem_size != 0 ? rem_size : 1); + memcpy(str, data, rem_size); + str_null_end = str + rem_size; + + r = exec(enc, options, syntax, + (char* )pattern, (char* )pattern_end, + (char* )data_pattern, (char* )data_pattern_end, + (char* )str, str_null_end, backward, sl); + + if (data_pattern != pattern) + free(data_pattern); + + free(pattern); + free(str); + return r; +} + +#ifdef PREV_CONTROL +#ifdef SYNTAX_TEST +#define NUM_CONTROL_BYTES 7 +#else +#define NUM_CONTROL_BYTES 6 +#endif +#else +#ifdef SYNTAX_TEST +#define NUM_CONTROL_BYTES 8 +#else +#define NUM_CONTROL_BYTES 7 +#endif +#endif + +int LLVMFuzzerTestOneInput(const uint8_t * Data, size_t Size) +{ +#if !defined(UTF16_BE) && !defined(UTF16_LE) + static OnigEncoding encodings[] = { + ONIG_ENCODING_UTF8, + ONIG_ENCODING_UTF8, + ONIG_ENCODING_UTF8, + ONIG_ENCODING_UTF8, + ONIG_ENCODING_UTF8, + ONIG_ENCODING_UTF8, + ONIG_ENCODING_UTF8, + ONIG_ENCODING_UTF8, + ONIG_ENCODING_ASCII, + ONIG_ENCODING_EUC_JP, + ONIG_ENCODING_EUC_TW, + ONIG_ENCODING_EUC_KR, + ONIG_ENCODING_EUC_CN, + ONIG_ENCODING_SJIS, + ONIG_ENCODING_KOI8_R, + ONIG_ENCODING_CP1251, + ONIG_ENCODING_BIG5, + ONIG_ENCODING_GB18030, + ONIG_ENCODING_UTF16_BE, + ONIG_ENCODING_UTF16_LE, + ONIG_ENCODING_UTF16_BE, + ONIG_ENCODING_UTF16_LE, + ONIG_ENCODING_UTF32_BE, + ONIG_ENCODING_UTF32_LE, + ONIG_ENCODING_UTF32_BE, + ONIG_ENCODING_UTF32_LE, + ONIG_ENCODING_ISO_8859_1, + ONIG_ENCODING_ISO_8859_2, + ONIG_ENCODING_ISO_8859_3, + ONIG_ENCODING_ISO_8859_4, + ONIG_ENCODING_ISO_8859_5, + ONIG_ENCODING_ISO_8859_6, + ONIG_ENCODING_ISO_8859_7, + ONIG_ENCODING_ISO_8859_8, + ONIG_ENCODING_ISO_8859_9, + ONIG_ENCODING_ISO_8859_10, + ONIG_ENCODING_ISO_8859_11, + ONIG_ENCODING_ISO_8859_13, + ONIG_ENCODING_ISO_8859_14, + ONIG_ENCODING_ISO_8859_15, + ONIG_ENCODING_ISO_8859_16 + }; + unsigned char encoding_choice; +#endif + +#ifdef SYNTAX_TEST + static OnigSyntaxType* syntaxes[] = { + ONIG_SYNTAX_POSIX_EXTENDED, + ONIG_SYNTAX_EMACS, + ONIG_SYNTAX_GREP, + ONIG_SYNTAX_GNU_REGEX, + ONIG_SYNTAX_JAVA, + ONIG_SYNTAX_PERL_NG, + ONIG_SYNTAX_PYTHON, + ONIG_SYNTAX_ONIGURUMA + }; + +#ifdef STANDALONE + static char* syntax_names[] = { + "Posix Extended", + "Emacs", + "Grep", + "GNU Regex", + "Java", + "Perl+NG", + "Python", + "Oniguruma" + }; +#endif + + unsigned char syntax_choice; +#endif + + int r; + int backward; + int pattern_size; + size_t rem_size; + unsigned char *data; + unsigned char pattern_size_choice; + OnigOptionType options; + OnigEncoding enc; + OnigSyntaxType* syntax; + +#ifndef STANDALONE +#ifdef EXEC_PRINT_INTERVAL + static FILE* STAT_FP; +#endif +#endif + + INPUT_COUNT++; + +#ifdef DUMP_DATA_INTERVAL + if (INPUT_COUNT % DUMP_DATA_INTERVAL == 0) { + char path[20]; + sprintf(path, "dump-%ld", INPUT_COUNT); + dump_file(path, (unsigned char* )Data, Size); + } +#endif + + if (Size < NUM_CONTROL_BYTES) return 0; + + rem_size = Size; + data = (unsigned char* )(Data); + +#ifdef UTF16_BE + enc = ONIG_ENCODING_UTF16_BE; +#else +#ifdef UTF16_LE + enc = ONIG_ENCODING_UTF16_LE; +#else + encoding_choice = data[0]; + data++; + rem_size--; + + int num_encodings = sizeof(encodings)/sizeof(encodings[0]); + enc = encodings[encoding_choice % num_encodings]; +#endif +#endif + +#ifdef SYNTAX_TEST + syntax_choice = data[0]; + data++; + rem_size--; + + int num_syntaxes = sizeof(syntaxes)/sizeof(syntaxes[0]); + syntax = syntaxes[syntax_choice % num_syntaxes]; +#else + syntax = ONIG_SYNTAX_DEFAULT; +#endif + +#ifdef PREV_CONTROL + if ((data[2] & 0xc0) == 0) + options = data[0] | (data[1] << 8) | (data[2] << 16); +#else + if ((data[3] & 0xc0) == 0) + options = data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24); +#endif + else + options = data[0] & ONIG_OPTION_IGNORECASE; + + data++; rem_size--; + data++; rem_size--; + data++; rem_size--; +#ifndef PREV_CONTROL + data++; rem_size--; +#endif + + pattern_size_choice = data[0]; + data++; rem_size--; + + backward = (data[0] == 0xbb); + data++; rem_size--; + + if (backward != 0) { + options = options & ~ONIG_OPTION_FIND_LONGEST; + } + + if (rem_size == 0) + pattern_size = 0; + else { + pattern_size = (int )pattern_size_choice % rem_size; + ADJUST_LEN(enc, pattern_size); + } + +#ifdef STANDALONE + { + char soptions[33]; + + dump_data(stdout, data, pattern_size); + to_binary(options, soptions); +#ifdef SYNTAX_TEST + fprintf(stdout, + "enc: %s, syntax: %s, pattern_size: %d, back:%d\noptions: %s\n", + ONIGENC_NAME(enc), + syntax_names[syntax_choice % num_syntaxes], + pattern_size, backward, soptions); +#else + fprintf(stdout, "enc: %s, pattern_size: %d, back:%d\noptions: %s\n", + ONIGENC_NAME(enc), pattern_size, backward, soptions); +#endif + + print_options(stdout, options); + fprintf(stdout, "\n"); + } +#endif + +#ifdef DUMP_INPUT + dump_input((unsigned char* )Data, Size); +#endif + + r = alloc_exec(enc, options, syntax, backward, pattern_size, + rem_size, data); + if (r == -2) exit(-2); + +#ifndef STANDALONE +#ifdef EXEC_PRINT_INTERVAL + if (EXEC_COUNT_INTERVAL == EXEC_PRINT_INTERVAL) { + float fexec, freg, fvalid; + + if (STAT_FP == 0) { +#ifdef STAT_PATH + STAT_FP = fopen(STAT_PATH, "a"); +#else + STAT_FP = stdout; +#endif + } + + output_current_time(STAT_FP); + + if (INPUT_COUNT != 0) { // overflow check + fexec = (float )EXEC_COUNT / INPUT_COUNT; + freg = (float )REGEX_SUCCESS_COUNT / INPUT_COUNT; + fvalid = (float )VALID_STRING_COUNT / INPUT_COUNT; + + fprintf(STAT_FP, ": %ld: EXEC:%.2f, REG:%.2f, VALID:%.2f\n", + EXEC_COUNT, fexec, freg, fvalid); + fflush(STAT_FP); + } + else { + fprintf(STAT_FP, ": ignore (input count overflow)\n"); + } + + EXEC_COUNT_INTERVAL = 0; + } + else if (EXEC_COUNT == 1) { + output_current_time(stdout); + fprintf(stdout, ": ------------ START ------------\n"); + } +#endif +#endif + + return r; +} + +#ifdef STANDALONE + +#define MAX_INPUT_DATA_SIZE 4194304 + +extern int main(int argc, char* argv[]) +{ + size_t max_size; + size_t n; + uint8_t Data[MAX_INPUT_DATA_SIZE]; + + if (argc > 1) { + max_size = (size_t )atoi(argv[1]); + } + else { + max_size = sizeof(Data); + } + + n = read(0, Data, max_size); + fprintf(stdout, "read size: %ld, max_size: %ld\n", n, max_size); + + LLVMFuzzerTestOneInput(Data, n); + return 0; +} +#endif /* STANDALONE */ diff --git a/internal/components/third_party/oniguruma/harnesses/deluxe.c b/internal/components/third_party/oniguruma/harnesses/deluxe.c new file mode 100644 index 0000000000..5441de9349 --- /dev/null +++ b/internal/components/third_party/oniguruma/harnesses/deluxe.c @@ -0,0 +1,206 @@ +/* + * deluxe.c + * contributed by Mark Griffin + */ +#include +#include "oniguruma.h" + +#include +#include + +#define RETRY_LIMIT 10000 +#define DEPTH_LIMIT 10 + +typedef unsigned char uint8_t; + +static int +search(regex_t* reg, unsigned char* str, unsigned char* end) +{ + int r; + unsigned char *start, *range; + OnigRegion *region; + + region = onig_region_new(); + + start = str; + range = end; + r = onig_search(reg, str, end, start, range, region, ONIG_OPTION_NONE); + if (r >= 0) { + int i; + + fprintf(stdout, "match at %d (%s)\n", r, + ONIGENC_NAME(onig_get_encoding(reg))); + for (i = 0; i < region->num_regs; i++) { + fprintf(stdout, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]); + } + } + else if (r == ONIG_MISMATCH) { + fprintf(stdout, "search fail (%s)\n", + ONIGENC_NAME(onig_get_encoding(reg))); + } + else { /* error */ + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + fprintf(stdout, "ERROR: %s\n", s); + fprintf(stdout, " (%s)\n", ONIGENC_NAME(onig_get_encoding(reg))); + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + return -1; + } + + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + return 0; +} + +static OnigCaseFoldType CF = ONIGENC_CASE_FOLD_MIN; + +static int +exec_deluxe(OnigEncoding pattern_enc, OnigEncoding str_enc, + OnigOptionType options, char* apattern, char* apattern_end, + char* astr, char* astr_end) +{ + int r; + regex_t* reg; + OnigCompileInfo ci; + OnigErrorInfo einfo; + UChar* pattern = (UChar* )apattern; + UChar* str = (UChar* )astr; + UChar* pattern_end = (UChar* )apattern_end; + unsigned char* end = (unsigned char* )astr_end; + + onig_initialize(&str_enc, 1); + onig_set_retry_limit_in_search(RETRY_LIMIT); + onig_set_parse_depth_limit(DEPTH_LIMIT); + + ci.num_of_elements = 5; + ci.pattern_enc = pattern_enc; + ci.target_enc = str_enc; + ci.syntax = ONIG_SYNTAX_DEFAULT; + ci.option = options; + ci.case_fold_flag = CF; + + r = onig_new_deluxe(®, pattern, pattern_end, &ci, &einfo); + if (r != ONIG_NORMAL) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stdout, "ERROR: %s\n", s); + onig_end(); + return -1; + } + + if (onigenc_is_valid_mbc_string(str_enc, str, end) != 0) { + r = search(reg, str, end); + } + + onig_free(reg); + onig_end(); + return 0; +} + +#define PATTERN_SIZE 48 +#define NUM_CONTROL_BYTES 1 +#define MIN_STR_SIZE 2 +int LLVMFuzzerTestOneInput(const uint8_t * Data, size_t Size) +{ + int r; + size_t remaining_size; + unsigned char *data; + unsigned char pat_encoding_choice; + unsigned char str_encoding_choice; + unsigned char *pattern; + unsigned char *str; + unsigned char *pattern_end; + unsigned char *str_end; + unsigned int num_encodings; + OnigEncodingType *pattern_enc; + OnigEncodingType *str_enc; + + OnigEncodingType *encodings[] = { + ONIG_ENCODING_ASCII, + ONIG_ENCODING_ISO_8859_1, + ONIG_ENCODING_ISO_8859_2, + ONIG_ENCODING_ISO_8859_3, + ONIG_ENCODING_ISO_8859_4, + ONIG_ENCODING_ISO_8859_5, + ONIG_ENCODING_ISO_8859_6, + ONIG_ENCODING_ISO_8859_7, + ONIG_ENCODING_ISO_8859_8, + ONIG_ENCODING_ISO_8859_9, + ONIG_ENCODING_ISO_8859_10, + ONIG_ENCODING_ISO_8859_11, + ONIG_ENCODING_ISO_8859_13, + ONIG_ENCODING_ISO_8859_14, + ONIG_ENCODING_ISO_8859_15, + ONIG_ENCODING_ISO_8859_16, + ONIG_ENCODING_UTF8, + ONIG_ENCODING_UTF16_BE, + ONIG_ENCODING_UTF16_LE, + ONIG_ENCODING_UTF32_BE, + ONIG_ENCODING_UTF32_LE, + ONIG_ENCODING_EUC_JP, + ONIG_ENCODING_EUC_TW, + ONIG_ENCODING_EUC_KR, + ONIG_ENCODING_EUC_CN, + ONIG_ENCODING_SJIS, + //ONIG_ENCODING_KOI8, + ONIG_ENCODING_KOI8_R, + ONIG_ENCODING_CP1251, + ONIG_ENCODING_BIG5, + ONIG_ENCODING_GB18030, + }; + + if (Size <= (NUM_CONTROL_BYTES + PATTERN_SIZE + MIN_STR_SIZE)) + return 0; + if (Size > 0x1000) + return 0; + + remaining_size = Size; + data = (unsigned char *)(Data); + + // pull off bytes to switch off + pat_encoding_choice = data[0]; + data++; + remaining_size--; + str_encoding_choice = data[0]; + data++; + remaining_size--; + + // copy first PATTERN_SIZE bytes off to be the pattern + pattern = (unsigned char *)malloc(PATTERN_SIZE); + memcpy(pattern, data, PATTERN_SIZE); + pattern_end = pattern + PATTERN_SIZE; + data += PATTERN_SIZE; + remaining_size -= PATTERN_SIZE; + + str = (unsigned char*)malloc(remaining_size); + memcpy(str, data, remaining_size); + str_end = str + remaining_size; + + num_encodings = sizeof(encodings) / sizeof(encodings[0]); + pattern_enc = encodings[pat_encoding_choice % num_encodings]; + str_enc = encodings[str_encoding_choice % num_encodings]; + + r = exec_deluxe(pattern_enc, str_enc, ONIG_OPTION_NONE, (char *)pattern, (char *)pattern_end, (char *)str, (char *)str_end); + + free(pattern); + free(str); + + return r; +} + + +#ifdef STANDALONE + +#include + +extern int main(int argc, char* argv[]) +{ + size_t n; + uint8_t Data[10000]; + + n = read(0, Data, sizeof(Data)); + fprintf(stdout, "n: %ld\n", n); + LLVMFuzzerTestOneInput(Data, n); + + return 0; +} +#endif /* STANDALONE */ diff --git a/internal/components/third_party/oniguruma/harnesses/dict_conv.py b/internal/components/third_party/oniguruma/harnesses/dict_conv.py new file mode 100644 index 0000000000..f7212939f5 --- /dev/null +++ b/internal/components/third_party/oniguruma/harnesses/dict_conv.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +# dict_conv.py (Python3 script) + +import sys + +ENC_UTF16_BE = 1 +ENC_UTF16_LE = 2 + +def add_char(enc, s, c): + if enc == ENC_UTF16_BE: + s += "\\x00" + + s += c + if enc == ENC_UTF16_LE: + s += "\\x00" + + return s + +def conv(enc, s): + n = len(s) + r = "" + i = 0 + while i < n: + c = s[i] + if c == '\\': + c = s[i+1] + if c == '\\' or c == '"': + r = add_char(enc, r, "\\" + c) + i += 2 + continue + else: + raise("Unknown escape {0}".format(s)) + + r = add_char(enc, r, c) + i += 1 + + return r + +def main(enc): + print("# This file was generated by dict_conv.py.") + for line in sys.stdin: + s = line.strip() + if s[0] == '#': + print(s) + continue + + if s[0] == '"' and s[-1] == '"': + s = conv(enc, s[1:-1]) + print("\"{0}\"".format(s)) + else: + raise("Invalid format {0}".format(s)) + +def usage(argv): + raise RuntimeError("Usage: python {0} utf16_be/utf16_le".format(argv[0])) + + +if __name__ == "__main__": + argv = sys.argv + argc = len(argv) + + if argc >= 2: + s = argv[1] + if s == 'utf16_be': + enc = ENC_UTF16_BE + elif s == 'utf16_le': + enc = ENC_UTF16_LE + else: + usage(argv) + else: + usage(argv) + + main(enc) diff --git a/internal/components/third_party/oniguruma/harnesses/fuzzer.options b/internal/components/third_party/oniguruma/harnesses/fuzzer.options new file mode 100644 index 0000000000..ab447447bd --- /dev/null +++ b/internal/components/third_party/oniguruma/harnesses/fuzzer.options @@ -0,0 +1,2 @@ +[libfuzzer] +dict = ascii_compatible.dict diff --git a/internal/components/third_party/oniguruma/harnesses/libfuzzer-onig.cpp b/internal/components/third_party/oniguruma/harnesses/libfuzzer-onig.cpp new file mode 100644 index 0000000000..52a6848a47 --- /dev/null +++ b/internal/components/third_party/oniguruma/harnesses/libfuzzer-onig.cpp @@ -0,0 +1,45 @@ +/* libfuzzer test code for oniguruma + * author: Hanno Böck, license: CC0/public domain + +Usage: +* compile oniguruma with something like + ./configure CC=clang LD=clang CFLAGS="-fsanitize-coverage=edge -fsanitize=address" \ + LDFLAGS="-fsanitize-coverage=edge -fsanitize=address" +* Compile libfuzzer stub and link against static libonig.a and libFuzzer.a: + clang++ libfuzzer-onig.cpp src/.libs/libonig.a libFuzzer.a -o libfuzzer-onig \ + -fsanitize-coverage=edge -fsanitize=address +* Put sample patterns in directory "in/" +* Run + ./libfuzzer-onig in + +Consult libfuzzer docs for further details and how to create libFuzzer.a: +http://llvm.org/docs/LibFuzzer.html + + */ +#include +#include +#include + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t * Data, size_t Size) +{ + regex_t *reg; + OnigEncoding enc; + + enc = ONIG_ENCODING_UTF8; + +#ifdef FULL_TEST + onig_initialize(&enc, 1); +#endif + onig_set_retry_limit_in_match(120); + onig_set_parse_depth_limit(120); + + if (onig_new(®, Data, Data + Size, ONIG_OPTION_DEFAULT, enc, + ONIG_SYNTAX_DEFAULT, 0) == 0) + onig_free(reg); + +#ifdef FULL_TEST + onig_end(); +#endif + + return 0; +} diff --git a/internal/components/third_party/oniguruma/harnesses/makefile b/internal/components/third_party/oniguruma/harnesses/makefile new file mode 100644 index 0000000000..d4fcfb6d58 --- /dev/null +++ b/internal/components/third_party/oniguruma/harnesses/makefile @@ -0,0 +1,73 @@ +# makefile for harness +DEBUG_OUT = +#DEBUG_OUT = -DONIG_DEBUG_PARSE -DONIG_DEBUG_COMPILE +#DEBUG_OUT = -DONIG_DEBUG_PARSE -DONIG_DEBUG_COMPILE -DONIG_DEBUG_MATCH_COUNTER + +SRC = ../src +CFLAGS = -I$(SRC) -Wall -g -fsanitize=fuzzer,address -fno-omit-frame-pointer +CFLAGS_M = -I$(SRC) -Wall -g -fsanitize=fuzzer-no-link,address -fno-omit-frame-pointer -DSTANDALONE +ONIG_LIB = $(SRC)/.libs/libonig.a +LIBS = $(ONIG_LIB) + +TARGETS = fuzzer-encode fuzzer-syntax fuzzer-utf16-be fuzzer-utf16-le \ + fuzzer-regset \ + read-encode read-syntax read-utf16-be read-utf16-le read-regset + +OTHER_TARGETS = libfuzzer-onig libfuzzer-onig-full fuzzer-deluxe read-deluxe + + +#default: $(TARGETS) +default: read-syntax + +fuzzer-encode: base.c $(ONIG_LIB) + clang $(CFLAGS) $< $(LIBS) -o $@ + +fuzzer-syntax: base.c $(ONIG_LIB) + clang -DSYNTAX_TEST $(CFLAGS) $< $(LIBS) -o $@ + +fuzzer-deluxe: deluxe.c $(ONIG_LIB) + clang $(CFLAGS) $< $(LIBS) -o $@ + +fuzzer-utf16-be: base.c $(ONIG_LIB) + clang -DUTF16_BE $(CFLAGS) $< $(LIBS) -o $@ + +fuzzer-utf16-le: base.c $(ONIG_LIB) + clang -DUTF16_LE $(CFLAGS) $< $(LIBS) -o $@ + +fuzzer-regset: regset.c $(ONIG_LIB) + clang $(CFLAGS) $< $(LIBS) -o $@ + +read-encode: base.c $(ONIG_LIB) + clang $(CFLAGS_M) $< $(LIBS) -o $@ + +read-syntax: base.c $(ONIG_LIB) + clang -DSYNTAX_TEST $(CFLAGS_M) $< $(LIBS) -o $@ + +read-deluxe: deluxe.c $(ONIG_LIB) + clang $(CFLAGS_M) $< $(LIBS) -o $@ + +read-utf16-be: base.c $(ONIG_LIB) + clang -DUTF16_BE $(CFLAGS_M) $< $(LIBS) -o $@ + +read-utf16-le: base.c $(ONIG_LIB) + clang -DUTF16_LE $(CFLAGS_M) $< $(LIBS) -o $@ + +read-regset: regset.c $(ONIG_LIB) + clang $(CFLAGS_M) $< $(LIBS) -o $@ + +libfuzzer-onig: libfuzzer-onig.cpp $(ONIG_LIB) + clang++ $(CFLAGS) $< $(LIBS) -o $@ + +libfuzzer-onig-full: libfuzzer-onig.cpp $(ONIG_LIB) + clang++ -DFULL_TEST $(CFLAGS) $< $(LIBS) -o $@ + + +$(ONIG_LIB): + cd ..; make clean + #cd ..; autoreconf -vfi + cd ..; ./configure CC=clang LD=clang CFLAGS="-g -fsanitize=address -fno-omit-frame-pointer $(DEBUG_OUT)" LDFLAGS="-g -fsanitize=address -fno-omit-frame-pointer" + cd ..; make -j4 + + +clean: + rm -f $(TARGETS) $(OTHER_TARGETS) diff --git a/internal/components/third_party/oniguruma/harnesses/regset.c b/internal/components/third_party/oniguruma/harnesses/regset.c new file mode 100644 index 0000000000..a8dd1810a9 --- /dev/null +++ b/internal/components/third_party/oniguruma/harnesses/regset.c @@ -0,0 +1,392 @@ +/* + * regset.c + * Copyright (c) 2019 K.Kosako + */ +#include +#include +#include +#include +#include +#include +#include +#include + +#include "oniguruma.h" + + +#define RETRY_LIMIT 5000 + +#ifdef STANDALONE +//#define CHECK_EACH_REGEX_SEARCH_TIME +#endif + +#define MAX_REG_NUM 256 + +typedef unsigned char uint8_t; +static OnigEncoding ENC; + +static void +output_current_time(FILE* fp) +{ + char d[64]; + time_t t; + + t = time(NULL); + strftime(d, sizeof(d), "%m/%d %H:%M:%S", localtime(&t)); + + fprintf(fp, "%s", d); +} + +#ifdef CHECK_EACH_REGEX_SEARCH_TIME +static double +get_sec(struct timespec* ts, struct timespec* te) +{ + double t; + + t = (te->tv_sec - ts->tv_sec) + + (double )(te->tv_nsec - ts->tv_nsec) / 1000000000.0; + return t; +} + +static int +check_each_regex_search_time(OnigRegSet* set, unsigned char* str, unsigned char* end) +{ + int n; + int i; + int r; + OnigRegion* region; + + n = onig_regset_number_of_regex(set); + region = onig_region_new(); + + for (i = 0; i < n; i++) { + regex_t* reg; + unsigned char* start; + unsigned char* range; + struct timespec ts1, ts2; + double t; + + reg = onig_regset_get_regex(set, i); + start = str; + range = end; + + clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts1); + + r = onig_search(reg, str, end, start, range, region, ONIG_OPTION_NONE); + + clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts2); + t = get_sec(&ts1, &ts2); + + fprintf(stdout, "regex search time %d: %6.2lfmsec.\n", i, t * 1000.0); + } + + onig_region_free(region, 1); + return 0; +} +#endif + +static int +search(OnigRegSet* set, OnigRegSetLead lead, unsigned char* str, unsigned char* end) +{ + int r; + int match_pos; + unsigned char *start, *range; + + start = str; + range = end; + r = onig_regset_search(set, str, end, start, range, lead, + ONIG_OPTION_NONE, &match_pos); + if (r >= 0) { +#ifdef STANDALONE + int i; + int match_index; + OnigRegion* region; + + match_index = r; + fprintf(stdout, "match reg index: %d, pos: %d (%s)\n", + match_index, match_pos, ONIGENC_NAME(ENC)); + region = onig_regset_get_region(set, match_index); + if (region == 0) { + fprintf(stdout, "ERROR: can't get region.\n"); + return -1; + } + + for (i = 0; i < region->num_regs; i++) { + fprintf(stdout, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]); + } +#endif + } + else if (r == ONIG_MISMATCH) { +#ifdef STANDALONE + fprintf(stdout, "search fail (%s)\n", ONIGENC_NAME(ENC)); +#endif + } + else { /* error */ +#ifdef STANDALONE + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + + onig_error_code_to_str((UChar* )s, r); + fprintf(stdout, "ERROR: %s\n", s); + fprintf(stdout, " (%s)\n", ONIGENC_NAME(ENC)); +#endif + return -1; + } + + return 0; +} + +static long INPUT_COUNT; +static long EXEC_COUNT; +static long EXEC_COUNT_INTERVAL; +static long REGEX_SUCCESS_COUNT; +static long VALID_STRING_COUNT; + +static int +exec(OnigEncoding enc, int reg_num, int init_reg_num, + UChar* pat[], UChar* pat_end[], + OnigRegSetLead lead, UChar* str, UChar* end) +{ + int r; + int i, j; + OnigRegSet* set; + regex_t* reg; + OnigOptionType options; + OnigErrorInfo einfo; + regex_t* regs[MAX_REG_NUM]; + + EXEC_COUNT++; + EXEC_COUNT_INTERVAL++; + + options = (EXEC_COUNT % 4 == 0) ? ONIG_OPTION_IGNORECASE : ONIG_OPTION_NONE; + + onig_initialize(&enc, 1); + onig_set_retry_limit_in_search(RETRY_LIMIT); + + for (i = 0; i < init_reg_num; i++) { + r = onig_new(®s[i], pat[i], pat_end[i], options, ENC, + ONIG_SYNTAX_DEFAULT, &einfo); + if (r != 0) { +#ifdef STANDALONE + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stdout, "ERROR: index: %d, %s\n", i, s); +#endif + + for (j = 0; j < i; j++) onig_free(regs[j]); + + onig_end(); + + if (r == ONIGERR_PARSER_BUG || + r == ONIGERR_STACK_BUG || + r == ONIGERR_UNDEFINED_BYTECODE || + r == ONIGERR_UNEXPECTED_BYTECODE) { + return -2; + } + else + return -1; + } + } + + r = onig_regset_new(&set, init_reg_num, regs); + if (r != 0) { + for (i = 0; i < init_reg_num; i++) { + onig_free(regs[i]); + } + onig_end(); + return -1; + } + + for (i = init_reg_num; i < reg_num; i++) { + r = onig_new(®, pat[i], pat_end[i], options, ENC, + ONIG_SYNTAX_DEFAULT, &einfo); + if (r != 0) { +#ifdef STANDALONE + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stdout, "ERROR: index: %d, %s\n", i, s); +#endif + onig_regset_free(set); + onig_end(); + + if (r == ONIGERR_PARSER_BUG || + r == ONIGERR_STACK_BUG || + r == ONIGERR_UNDEFINED_BYTECODE || + r == ONIGERR_UNEXPECTED_BYTECODE) { + return -2; + } + else + return -1; + } + + r = onig_regset_add(set, reg); + if (r != 0) { + onig_regset_free(set); + onig_end(); + fprintf(stdout, "ERROR: onig_regset_add(): %d\n", i); + return r; + } + } + + REGEX_SUCCESS_COUNT++; + + if (onigenc_is_valid_mbc_string(enc, str, end) != 0) { + VALID_STRING_COUNT++; + r = search(set, lead, str, end); +#ifdef CHECK_EACH_REGEX_SEARCH_TIME + r = check_each_regex_search_time(set, str, end); +#endif + } + + onig_regset_free(set); + onig_end(); + return 0; +} + +#define MAX_PATTERN_SIZE 30 +#define NUM_CONTROL_BYTES 3 + +#define EXEC_PRINT_INTERVAL 2000000 + +static int MaxRegNum; +static int MaxInitRegNum; + +extern int +LLVMFuzzerTestOneInput(const uint8_t * Data, size_t Size) +{ + int r, i; + int pattern_size; + unsigned char *str_null_end; + size_t remaining_size; + unsigned char *data; + unsigned int reg_num; + unsigned int init_reg_num; + unsigned char* pat[256]; + unsigned char* pat_end[256]; + int len; + unsigned int lead_num; + OnigRegSetLead lead; + + INPUT_COUNT++; + + if (Size < NUM_CONTROL_BYTES) return 0; + + remaining_size = Size; + data = (unsigned char* )(Data); + + reg_num = data[0]; + data++; + remaining_size--; + + init_reg_num = data[0]; + data++; + remaining_size--; + + lead_num = data[0]; + data++; + remaining_size--; + lead = (lead_num % 2 == 0 ? ONIG_REGSET_POSITION_LEAD : ONIG_REGSET_REGEX_LEAD); + + if (remaining_size < reg_num * 2) { + reg_num = reg_num % 15; // zero is OK. + } + + init_reg_num %= (reg_num + 1); + + if (MaxRegNum < reg_num) + MaxRegNum = reg_num; + + if (MaxInitRegNum < init_reg_num) + MaxInitRegNum = init_reg_num; + + if (reg_num == 0) + pattern_size = 1; + else + pattern_size = remaining_size / (reg_num * 2); + + if (pattern_size > MAX_PATTERN_SIZE) + pattern_size = MAX_PATTERN_SIZE; + + len = pattern_size * reg_num; + if (len == 0) len = 1; + + for (i = 0; i < reg_num; i++) { + pat[i] = (unsigned char* )malloc(pattern_size); + memcpy(pat[i], data, pattern_size); + pat_end[i] = pat[i] + pattern_size; + data += pattern_size; + remaining_size -= pattern_size; + } + + unsigned char *str = (unsigned char*)malloc(remaining_size != 0 ? remaining_size : 1); + memcpy(str, data, remaining_size); + str_null_end = str + remaining_size; + +#ifdef STANDALONE + fprintf(stdout, "reg num: %d, pattern size: %d, lead: %s\n", + reg_num, pattern_size, + lead == ONIG_REGSET_POSITION_LEAD ? "position" : "regex"); + + if (reg_num != 0) { + unsigned char* p; + i = 0; + p = pat[0]; + while (p < pat_end[0]) { + fprintf(stdout, " 0x%02x", (int )*p++); + i++; + if (i % 8 == 0) fprintf(stdout, "\n"); + } + fprintf(stdout, "\n"); + } +#endif + + ENC = ONIG_ENCODING_UTF8; + + r = exec(ENC, reg_num, init_reg_num, pat, pat_end, lead, str, str_null_end); + + for (i = 0; i < reg_num; i++) { + free(pat[i]); + } + free(str); + + if (r == -2) { + //output_data("parser-bug", Data, Size); + exit(-2); + } + + if (EXEC_COUNT_INTERVAL == EXEC_PRINT_INTERVAL) { + float fexec, freg, fvalid; + + fexec = (float )EXEC_COUNT / INPUT_COUNT; + freg = (float )REGEX_SUCCESS_COUNT / INPUT_COUNT; + fvalid = (float )VALID_STRING_COUNT / INPUT_COUNT; + + output_current_time(stdout); + fprintf(stdout, ": %ld: EXEC:%.2f, REG:%.2f, VALID:%.2f MAX REG:%d-%d\n", + EXEC_COUNT, fexec, freg, fvalid, MaxRegNum, MaxInitRegNum); + + EXEC_COUNT_INTERVAL = 0; + } + else if (EXEC_COUNT == 1) { + output_current_time(stdout); + fprintf(stdout, ": ------------ START ------------\n"); + } + + return r; +} + +#ifdef STANDALONE + +extern int main(int argc, char* argv[]) +{ + size_t n; + uint8_t Data[10000]; + + n = read(0, Data, sizeof(Data)); + fprintf(stdout, "n: %ld\n", n); + LLVMFuzzerTestOneInput(Data, n); + + return 0; +} +#endif /* STANDALONE */ diff --git a/internal/components/third_party/oniguruma/index.html b/internal/components/third_party/oniguruma/index.html new file mode 100644 index 0000000000..58ba66d3bd --- /dev/null +++ b/internal/components/third_party/oniguruma/index.html @@ -0,0 +1,192 @@ + + + + Oniguruma + + + +

Oniguruma

(Japanese) + +

+(c) K.Kosako, updated at: 2019/08/05 +

+ +
+ +
What's new + +
    +
  • 2019/08/06: Version 6.9.3 released.
  • +
  • 2019/05/07: Version 6.9.2 released.
  • +
  • 2018/12/11: Version 6.9.1 released.
  • +
  • 2018/09/03: Version 6.9.0 released.
  • +
  • 2018/04/17: Version 6.8.2 released.
  • +
  • 2018/03/19: Version 6.8.1 released.
  • +
  • 2018/03/16: Version 6.8.0 released.
  • +
  • 2018/01/26: Version 6.7.1 released.
  • +
  • 2017/12/11: Version 6.7.0 released.
  • +
  • 2017/08/30: Version 6.6.1 released.
  • +
  • 2017/08/28: Version 6.6.0 released.
  • +
  • 2017/08/03: Version 6.5.0 released.
  • +
  • 2017/07/03: Version 6.4.0 released.
  • +
  • 2017/05/29: Version 6.3.0 released.
  • +
  • 2017/04/08: Version 6.2.0 released.
  • +
  • 2016/12/11: Version 6.1.3 released.
  • +
+
+
+ +

+Oniguruma is a regular expressions library.
+The characteristics of this library is that different character encoding +
for every regular expression object can be specified. +
(supported APIs: GNU regex, POSIX and Oniguruma native) +

+ +
+
Supported character encodings:
+ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,
+EUC-JP, EUC-TW, EUC-KR, EUC-CN,
+Shift_JIS, Big5, GB18030, KOI8-R, CP1251,
+ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
+ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,
+ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
+ +(GB18030 encoding was contributed by KUBO Takehiro)
+(CP1251 encoding was contributed by Byte) +
+

+
+ +
+ +
License: BSD license. + +
+
Platform: +
    +
  • Unix (include Mac OS X) +
  • Cygwin +
  • Win32 +
+ +
+ +Maintainer of 2.x was changed to Hannes Wyss <hwyss AT ywesee.com>.
+About 2.x, please contact him.
+
+* 5.x supports Unicode Property/Script.
+* 2.x supports Ruby1.6/1.8.
+ +
+
Documents: (version 6.1.0) + + +
+
Sample Programs: + + +
+
Site Links: + + +
+
Links: + + +
+
References: + + +
+
+

+and I'm thankful to Akinori MUSHA. +

+ +
+
+
Other Libraries: + +
+ + diff --git a/internal/components/third_party/oniguruma/index_ja.html b/internal/components/third_party/oniguruma/index_ja.html new file mode 100644 index 0000000000..6b75c6c2ce --- /dev/null +++ b/internal/components/third_party/oniguruma/index_ja.html @@ -0,0 +1,195 @@ + + + + 鬼車 + + + +

鬼車

+ +

+(c) K.Kosako, 最終更新: 2019/08/05 +

+ +
+ +
更新情報 + +
    +
  • 2019/08/06: Version 6.9.3 リリース
  • +
  • 2019/05/07: Version 6.9.2 リリース
  • +
  • 2018/12/11: Version 6.9.1 リリース
  • +
  • 2018/09/03: Version 6.9.0 リリース
  • +
  • 2018/04/17: Version 6.8.2 リリース
  • +
  • 2018/03/19: Version 6.8.1 リリース
  • +
  • 2018/03/16: Version 6.8.0 リリース
  • +
  • 2018/01/26: Version 6.7.1 リリース
  • +
  • 2017/12/11: Version 6.7.0 リリース
  • +
  • 2017/08/30: Version 6.6.1 リリース
  • +
  • 2017/08/28: Version 6.6.0 リリース
  • +
  • 2017/08/03: Version 6.5.0 リリース
  • +
  • 2017/07/03: Version 6.4.0 リリース
  • +
  • 2017/05/29: Version 6.3.0 リリース
  • +
  • 2017/04/08: Version 6.2.0 リリース
  • +
  • 2016/12/11: Version 6.1.3 リリース
  • +
+
+
+ +

+é¬¼è»Šã¯æ­£è¦è¡¨ç¾ãƒ©ã‚¤ãƒ–ラリã§ã‚る。
+ã“ã®ãƒ©ã‚¤ãƒ–ラリã®ç‰¹å¾´ã¯ã€ãれãžã‚Œã®æ­£è¦è¡¨ç¾ã‚ªãƒ–ジェクトã”ã¨ã«ç•°ãªã‚‹æ–‡å­—エンコーディングを +指定ã§ãã‚‹ã“ã¨ã€‚
+(API: GNU regex, POSIX and Oniguruma native) +

+ +
+
対応ã—ã¦ã„る文字エンコーディング:
+ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,
+EUC-JP, EUC-TW, EUC-KR, EUC-CN,
+Shift_JIS, Big5, GB18030, KOI8-R, CP1251,
+ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
+ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,
+ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
+ +(GB18030ã¯ã€KUBO Takehiroæ°æä¾›)
+(CP1251ã¯ã€Byteæ°æä¾›) +
+

+
+ +
+ +
ライセンス:BSDライセンス + +
+
プラットフォーム: +
    +
  • Unix (Mac OS Xã‚’å«ã‚€) +
  • Cygwin +
  • Win32 +
+ +
+ +2.xã®ä¿å®ˆæ‹…当ã¯ã€Hannes Wyss <hwyss AT ywesee.com>ã«äº¤æ›¿ã—ã¾ã—ãŸã€‚
+2.xã«ã¤ã„ã¦ã¯ã€å½¼ã«é€£çµ¡ã—ã¦ãã ã•ã„。
+
+* 5.xã¯Unicode Property/Scriptã‚’æä¾›
+* 2.xã¯Ruby1.6/1.8組込ã¿ãƒ©ã‚¤ãƒ–ラリã¨ã—ã¦å‹•作ã™ã‚‹ã€‚ (2006年末ã§ä¿å®ˆã‚’終了)
+ +
+
ドキュメント: (version 6.1.0) + + +
+
サンプルプログラム: + + +
+
サイト: + + +
+
リンク: + + +
+
å‚考資料: + + +
+
+

+and I'm thankful to Akinori MUSHA. +

+ +
+
+
ä»–ã®ãƒ©ã‚¤ãƒ–ラリ: + +
+ +
+ホームã«ã‚‚ã©ã‚‹ + + diff --git a/internal/components/third_party/oniguruma/install-sh b/internal/components/third_party/oniguruma/install-sh new file mode 100755 index 0000000000..ec298b5374 --- /dev/null +++ b/internal/components/third_party/oniguruma/install-sh @@ -0,0 +1,541 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2020-11-14.01; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# 'make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +tab=' ' +nl=' +' +IFS=" $tab$nl" + +# Set DOITPROG to "echo" to test this script. + +doit=${DOITPROG-} +doit_exec=${doit:-exec} + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +# Create dirs (including intermediate dirs) using mode 755. +# This is like GNU 'install' as of coreutils 8.32 (2020). +mkdir_umask=22 + +backupsuffix= +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +is_target_a_directory=possibly + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. + -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG + +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. + +If -S is not specified, no backups are attempted. + +Email bug reports to bug-automake@gnu.org. +Automake home page: https://www.gnu.org/software/automake/ +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -p) cpprog="$cpprog -p";; + + -s) stripcmd=$stripprog;; + + -S) backupsuffix="$2" + shift;; + + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) is_target_a_directory=never;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename. + if test -d "$dst"; then + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac + dstdir_status=0 + else + dstdir=`dirname "$dst"` + test -d "$dstdir" + dstdir_status=$? + fi + fi + + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + # The $RANDOM variable is not portable (e.g., dash). Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap ' + ret=$? + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null + exit $ret + ' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + oIFS=$IFS + IFS=/ + set -f + set fnord $dstdir + shift + set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + set +f && + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # If $backupsuffix is set, and the file being installed + # already exists, attempt a backup. Don't worry if it fails, + # e.g., if mv doesn't support -f. + if test -n "$backupsuffix" && test -f "$dst"; then + $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null + fi + + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/internal/components/third_party/oniguruma/m4/.whatever b/internal/components/third_party/oniguruma/m4/.whatever new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/components/third_party/oniguruma/make_win.bat b/internal/components/third_party/oniguruma/make_win.bat new file mode 100644 index 0000000000..470ef1198f --- /dev/null +++ b/internal/components/third_party/oniguruma/make_win.bat @@ -0,0 +1,5 @@ +SET ONIG_DIR=%~dp0\src +set THIS_DIR=%~dp0 +set BUILD_DIR=%cd% +copy %ONIG_DIR%\config.h.windows.in %BUILD_DIR%\config.h +nmake -f %ONIG_DIR%\Makefile.windows %1 diff --git a/internal/components/third_party/oniguruma/make_win32.bat b/internal/components/third_party/oniguruma/make_win32.bat new file mode 100644 index 0000000000..bd1a072167 --- /dev/null +++ b/internal/components/third_party/oniguruma/make_win32.bat @@ -0,0 +1,5 @@ +SET ONIG_DIR=%~dp0\src +set THIS_DIR=%~dp0 +set BUILD_DIR=%cd% +copy %ONIG_DIR%\config.h.win32 %BUILD_DIR%\config.h +nmake -f %ONIG_DIR%\Makefile.windows %1 diff --git a/internal/components/third_party/oniguruma/make_win64.bat b/internal/components/third_party/oniguruma/make_win64.bat new file mode 100644 index 0000000000..ee0a049913 --- /dev/null +++ b/internal/components/third_party/oniguruma/make_win64.bat @@ -0,0 +1,5 @@ +SET ONIG_DIR=%~dp0\src +set THIS_DIR=%~dp0 +set BUILD_DIR=%cd% +copy %ONIG_DIR%\config.h.win64 %BUILD_DIR%\config.h +nmake -f %ONIG_DIR%\Makefile.windows %1 diff --git a/internal/components/third_party/oniguruma/missing b/internal/components/third_party/oniguruma/missing new file mode 100755 index 0000000000..8d0eaad250 --- /dev/null +++ b/internal/components/third_party/oniguruma/missing @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/internal/components/third_party/oniguruma/onig-config.cmake.in b/internal/components/third_party/oniguruma/onig-config.cmake.in new file mode 100644 index 0000000000..0a8a70225a --- /dev/null +++ b/internal/components/third_party/oniguruma/onig-config.cmake.in @@ -0,0 +1,80 @@ +#!/bin/sh +# Copyright (C) 2006 K.Kosako + +ONIG_VERSION=@PACKAGE_VERSION@ + +show_usage() +{ + cat < +#include "oniguruma.h" + +static int +search(regex_t* reg, unsigned char* str, unsigned char* end) +{ + int r; + unsigned char *start, *range; + OnigRegion *region; + + region = onig_region_new(); + + start = str; + range = end; + r = onig_search(reg, str, end, start, range, region, ONIG_OPTION_NONE); + if (r >= 0) { + int i; + + fprintf(stderr, "match at %d (%s)\n", r, + ONIGENC_NAME(onig_get_encoding(reg))); + for (i = 0; i < region->num_regs; i++) { + fprintf(stderr, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]); + } + } + else if (r == ONIG_MISMATCH) { + fprintf(stderr, "search fail (%s)\n", + ONIGENC_NAME(onig_get_encoding(reg))); + } + else { /* error */ + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + fprintf(stderr, "ERROR: %s\n", s); + fprintf(stderr, " (%s)\n", ONIGENC_NAME(onig_get_encoding(reg))); + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + return -1; + } + + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + return 0; +} + +static int +exec(OnigEncoding enc, OnigOptionType options, char* apattern, char* astr) +{ + int r; + unsigned char *end; + regex_t* reg; + OnigErrorInfo einfo; + UChar* pattern = (UChar* )apattern; + UChar* str = (UChar* )astr; + + r = onig_new(®, pattern, + pattern + onigenc_str_bytelen_null(enc, pattern), + options, enc, ONIG_SYNTAX_DEFAULT, &einfo); + if (r != ONIG_NORMAL) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stderr, "ERROR: %s\n", s); + return -1; + } + + end = str + onigenc_str_bytelen_null(enc, str); + r = search(reg, str, end); + + onig_free(reg); + return 0; +} + + + +extern int main(int argc, char* argv[]) +{ + OnigEncoding use_encs[1]; + + use_encs[0] = ONIG_ENCODING_UTF8; + onig_initialize(use_encs, 1); + + /* fix ignore case in look-behind + commit: 3340ec2cc5627172665303fe248c9793354d2251 */ + exec(ONIG_ENCODING_UTF8, ONIG_OPTION_IGNORECASE, + "\305\211a", "\312\274na"); /* \u{0149}a \u{02bc}na */ + + exec(ONIG_ENCODING_UTF8, ONIG_OPTION_NONE, "(\\2)(\\1)", "aa"); /* fail. */ + + exec(ONIG_ENCODING_UTF8, ONIG_OPTION_FIND_LONGEST, + "a*", "aa aaa aaaa aaaaa "); /* match 12-17 */ + + onig_end(); + return 0; +} diff --git a/internal/components/third_party/oniguruma/sample/callback_each_match.c b/internal/components/third_party/oniguruma/sample/callback_each_match.c new file mode 100644 index 0000000000..15c39dd295 --- /dev/null +++ b/internal/components/third_party/oniguruma/sample/callback_each_match.c @@ -0,0 +1,166 @@ +/* + * callback_each_match.c + */ +#include +#include +#include "oniguruma.h" + +static int +each_match_callback(const UChar* str, const UChar* end, + const UChar* match_start, OnigRegion* region, void* user_data) +{ +#if 1 + fprintf(stdout, "each_match_callback:\n"); + fprintf(stdout, " match at: %ld - %d: %p\n", match_start - str, region->end[0], + user_data); + fprintf(stdout, " region[0]: %d - %d\n", region->beg[0], region->end[0]); +#else + int i; + i = region->beg[0]; + fputc('<', stdout); + while (i < region->end[0]) { + fputc((int )str[i], stdout); + i++; + } + fputc('>', stdout); +#endif + +#if 0 + /* terminate match/search if returns error code < 0 */ + return ONIG_ABORT; +#endif + + return ONIG_NORMAL; +} + +static int +search(UChar* pattern, UChar* str, OnigOptionType options, OnigOptionType runtime_options) +{ + int r; + unsigned char *start, *range, *end; + regex_t* reg; + OnigErrorInfo einfo; + OnigRegion *region; + OnigMatchParam* mp; + void* user_data; + + r = onig_new(®, pattern, pattern + strlen((char* )pattern), + options, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo); + if (r != ONIG_NORMAL) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stderr, "ERROR: %s\n", s); + return -1; + } + + region = onig_region_new(); + + end = str + strlen((char* )str); + start = str; + range = end; + mp = onig_new_match_param(); + if (mp == 0) return -2; + + user_data = (void* )0x1234; + onig_set_callout_user_data_of_match_param(mp, user_data); + + r = onig_search_with_param(reg, str, end, start, range, region, + runtime_options, mp); + onig_free_match_param(mp); + if (r >= 0) { + /* If ONIG_OPTION_CALLBACK_EACH_MATCH is used with + ONIG_OPTION_FIND_LONGEST, it may also return positive value. */ + fprintf(stdout, "\nr: %d\n", r); + } + else if (r == ONIG_MISMATCH) { + /* always return ONIG_MISMATCH if ONIG_OPTION_CALLBACK_EACH_MATCH */ + fprintf(stdout, "\n"); + } + else { /* error */ + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + fprintf(stderr, "ERROR: %s\n", s); + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + onig_end(); + return -1; + } + + return 0; +} + +static int +match(UChar* pattern, UChar* str, UChar* at, OnigOptionType options, OnigOptionType runtime_options) +{ + int r; + unsigned char *end; + regex_t* reg; + OnigErrorInfo einfo; + OnigRegion *region; + OnigMatchParam* mp; + void* user_data; + + r = onig_new(®, pattern, pattern + strlen((char* )pattern), + options, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo); + if (r != ONIG_NORMAL) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stderr, "ERROR: %s\n", s); + return -1; + } + + region = onig_region_new(); + + end = str + strlen((char* )str); + mp = onig_new_match_param(); + if (mp == 0) return -2; + + user_data = (void* )0x1234; + onig_set_callout_user_data_of_match_param(mp, user_data); + + r = onig_match_with_param(reg, str, end, at, region, runtime_options, mp); + onig_free_match_param(mp); + if (r >= 0) { + /* If ONIG_OPTION_CALLBACK_EACH_MATCH is used with + ONIG_OPTION_FIND_LONGEST, it may also return positive value. */ + fprintf(stdout, "\nr: %d\n", r); + } + else if (r == ONIG_MISMATCH) { + /* always return ONIG_MISMATCH if ONIG_OPTION_CALLBACK_EACH_MATCH */ + fprintf(stdout, "\n"); + } + else { /* error */ + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + fprintf(stderr, "ERROR: %s\n", s); + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + onig_end(); + return -1; + } + + return 0; +} + +extern int main(int argc, char* argv[]) +{ + OnigEncoding use_encs[1]; + + static UChar* pattern = (UChar* )"a(.*)\\Kb|[e-f]+"; + static UChar* str = (UChar* )"zzzzafffb"; + + use_encs[0] = ONIG_ENCODING_ASCII; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + onig_set_callback_each_match(each_match_callback); + + fprintf(stdout, "\n"); + search(pattern, str, ONIG_OPTION_NONE, ONIG_OPTION_CALLBACK_EACH_MATCH); + fprintf(stdout, "\n"); + search(pattern, str, ONIG_OPTION_FIND_LONGEST, ONIG_OPTION_CALLBACK_EACH_MATCH); + + fprintf(stdout, "\n"); + match(pattern, str, str + 5, ONIG_OPTION_NONE, ONIG_OPTION_CALLBACK_EACH_MATCH); + + onig_end(); + return 0; +} diff --git a/internal/components/third_party/oniguruma/sample/callout.c b/internal/components/third_party/oniguruma/sample/callout.c new file mode 100644 index 0000000000..b5e3d91ba2 --- /dev/null +++ b/internal/components/third_party/oniguruma/sample/callout.c @@ -0,0 +1,268 @@ +/* + * callout.c + */ +#include +#include +#include +#include "oniguruma.h" + +static int +callout_body(OnigCalloutArgs* args, void* user_data) +{ + int r; + int i; + int n; + int begin, end; + int used_num; + int used_bytes; + OnigCalloutIn in; + int name_id; + const UChar* contents; + const UChar* start; + const UChar* current; + regex_t* regex; + + in = onig_get_callout_in_by_callout_args(args); + name_id = onig_get_name_id_by_callout_args(args); + start = onig_get_start_by_callout_args(args); + current = onig_get_current_by_callout_args(args); + regex = onig_get_regex_by_callout_args(args); + + contents = onig_get_contents_by_callout_args(args); + + if (name_id != ONIG_NON_NAME_ID) { + UChar* name = onig_get_callout_name_by_name_id(name_id); + fprintf(stdout, "name: %s\n", name); + } + fprintf(stdout, + "%s %s: contents: \"%s\", start: \"%s\", current: \"%s\"\n", + contents != 0 ? "CONTENTS" : "NAME", + in == ONIG_CALLOUT_IN_PROGRESS ? "PROGRESS" : "RETRACTION", + contents, start, current); + + fprintf(stdout, "user_data: %s\n", (char* )user_data); + + (void )onig_get_used_stack_size_in_callout(args, &used_num, &used_bytes); + fprintf(stdout, "stack: used_num: %d, used_bytes: %d\n", used_num, used_bytes); + + n = onig_number_of_captures(regex); + for (i = 1; i <= n; i++) { + r = onig_get_capture_range_in_callout(args, i, &begin, &end); + if (r != ONIG_NORMAL) return r; + + fprintf(stdout, "capture %d: (%d-%d)\n", i, begin, end); + } + + fflush(stdout); + return ONIG_CALLOUT_SUCCESS; +} + +static int +progress_callout_func(OnigCalloutArgs* args, void* user_data) +{ + return callout_body(args, user_data); +} + +static int +retraction_callout_func(OnigCalloutArgs* args, void* user_data) +{ + return callout_body(args, user_data); +} + +static int +foo(OnigCalloutArgs* args, void* user_data) +{ + return callout_body(args, user_data); +} + +static int +bar(OnigCalloutArgs* args, void* user_data) +{ + int r; + int i; + int n; + OnigType type; + OnigValue val; + + fprintf(stdout, "bar called.\n"); + + n = onig_get_args_num_by_callout_args(args); + if (n < 0) { + fprintf(stderr, "FAIL: onig_get_args_num_by_callout_args(): %d\n", n); + return n; + } + + for (i = 0; i < n; i++) { + r = onig_get_arg_by_callout_args(args, i, &type, &val); + if (r != 0) { + fprintf(stderr, "FAIL: onig_get_arg_by_callout_args(): %d\n", r); + return r; + } + + fprintf(stdout, "arg[%d]: ", i); + switch (type) { + case ONIG_TYPE_LONG: + fprintf(stdout, "%ld\n", val.l); + break; + case ONIG_TYPE_CHAR: + fprintf(stdout, "0x%06x\n", val.c); + break; + case ONIG_TYPE_STRING: + fprintf(stdout, "'%s'\n", val.s.start); + break; + default: + /* Never come here. But escape warning. */ + break; + }; + } + + return ONIG_CALLOUT_SUCCESS; +} + +static int +test(OnigEncoding enc, OnigMatchParam* mp, char* in_pattern, char* in_str) +{ + int r; + unsigned char *start, *range, *end; + regex_t* reg; + OnigErrorInfo einfo; + OnigRegion *region; + UChar* pattern; + UChar* str; + + pattern = (UChar* )in_pattern; + str = (UChar* )in_str; + + r = onig_new(®, pattern, pattern + strlen((char* )pattern), + ONIG_OPTION_DEFAULT, enc, ONIG_SYNTAX_DEFAULT, &einfo); + if (r != ONIG_NORMAL) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stderr, "COMPILE ERROR: %d: %s\n", r, s); + return -1; + } + + region = onig_region_new(); + + end = str + strlen((char* )str); + start = str; + range = end; + r = onig_search_with_param(reg, str, end, start, range, region, + ONIG_OPTION_NONE, mp); + if (r >= 0) { + int i; + + fprintf(stderr, "match at %d\n", r); + for (i = 0; i < region->num_regs; i++) { + fprintf(stderr, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]); + } + } + else if (r == ONIG_MISMATCH) { + fprintf(stderr, "search fail\n"); + } + else { /* error */ + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + fprintf(stderr, "SEARCH ERROR: %d: %s\n", r, s); + } + + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + return r; +} + +extern int main(int argc, char* argv[]) +{ + int r; + int id; + void* user_data; + UChar* name; + OnigEncoding use_encs[1]; + unsigned int arg_types[4]; + OnigValue opt_defaults[4]; + OnigEncoding enc; + OnigMatchParam* mp; + + enc = ONIG_ENCODING_UTF8; + use_encs[0] = enc; + + r = onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + if (r != ONIG_NORMAL) return -1; + + /* monitor on */ + r = onig_setup_builtin_monitors_by_ascii_encoded_name(stdout); + if (r != ONIG_NORMAL) return -1; + + name = (UChar* )"foo"; + id = onig_set_callout_of_name(enc, ONIG_CALLOUT_TYPE_SINGLE, + name, name + strlen((char* )name), + ONIG_CALLOUT_IN_BOTH, foo, 0, 0, 0, 0, 0); + if (id < 0) { + fprintf(stderr, "ERROR: fail to set callout of name: %s\n", name); + //return -1; + } + + name = (UChar* )"bar"; + arg_types[0] = ONIG_TYPE_LONG; + arg_types[1] = ONIG_TYPE_STRING; + arg_types[2] = ONIG_TYPE_CHAR; + opt_defaults[0].s.start = (UChar* )"I am a option argument's default value."; + opt_defaults[0].s.end = opt_defaults[0].s.start + + strlen((char* )opt_defaults[0].s.start); + opt_defaults[1].c = 0x4422; + + id = onig_set_callout_of_name(enc, ONIG_CALLOUT_TYPE_SINGLE, + name, name + strlen((char* )name), + ONIG_CALLOUT_IN_PROGRESS, bar, 0, + 3, arg_types, 2, opt_defaults); + if (id < 0) { + fprintf(stderr, "ERROR: fail to set callout of name: %s\n", name); + //return -1; + } + + (void)onig_set_progress_callout(progress_callout_func); + (void)onig_set_retraction_callout(retraction_callout_func); + + mp = onig_new_match_param(); + + user_data = (void* )"something data"; + r = onig_set_callout_user_data_of_match_param(mp, user_data); + if (r != ONIG_NORMAL) { + fprintf(stderr, "ERROR: fail onig_set_callout_user_data_of_match_param(): %d\n", r); + } + + /* callout of contents */ + test(enc, mp, "a+(?{foo bar baz...}X)$", "aaab"); + test(enc, mp, "(?{{!{}#$%&'()=-~^|[_]`@*:+;<>?/.\\,}}[symbols])c", "abc"); + test(enc, mp, "\\A(...)(?{{{booooooooooooo{{ooo}}ooooooooooz}}}<)", "aaab"); + test(enc, mp, "\\A(?!a(?{in prec-read-not}[xxx]X)b)", "ac"); + test(enc, mp, "(?=,4})", "abababcabababaa"); + test(enc, mp, "(?:(*MAX[T]{3})a)*(?:(*MAX{T})c)*", "aaccc"); + + /* callouts in condition */ + test(enc, mp, "\\A(?(?{in condition})then|else)\\z", "then"); + test(enc, mp, "\\A(?(*FAIL)then|else)\\z", "else"); + + /* monitor test */ + test(enc, mp, "(?:(*MON{X})(*FAIL)|.{,3}(*MON[FOO])k)", "abcdefghijk"); + + onig_free_match_param(mp); + onig_end(); + return 0; +} diff --git a/internal/components/third_party/oniguruma/sample/count.c b/internal/components/third_party/oniguruma/sample/count.c new file mode 100644 index 0000000000..904101cdad --- /dev/null +++ b/internal/components/third_party/oniguruma/sample/count.c @@ -0,0 +1,125 @@ +/* + * count.c + */ +#include +#include +#include +#include "oniguruma.h" + +#define ulen(enc, p) onigenc_str_bytelen_null(enc, (UChar* )p) + +static int +test(OnigEncoding enc, OnigMatchParam* mp, char* in_pattern, char* in_str) +{ + int r; + unsigned char *start, *range, *end; + regex_t* reg; + OnigErrorInfo einfo; + OnigRegion *region; + UChar* pattern; + UChar* str; + + pattern = (UChar* )in_pattern; + str = (UChar* )in_str; + + r = onig_new(®, pattern, pattern + ulen(enc, pattern), + ONIG_OPTION_DEFAULT, enc, ONIG_SYNTAX_DEFAULT, &einfo); + if (r != ONIG_NORMAL) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stderr, "COMPILE ERROR: %d: %s\n", r, s); + return -1; + } + + region = onig_region_new(); + + end = str + ulen(enc, str); + start = str; + range = end; + r = onig_search_with_param(reg, str, end, start, range, region, + ONIG_OPTION_NONE, mp); + if (r >= 0) { + int slot; + OnigValue val; + char* tag; + int tag_len; + + fprintf(stdout, "match at %d\n", r); + + show_count: + if (enc == ONIG_ENCODING_UTF16_BE) { + tag = "\000x\000\000"; + } + else if (enc == ONIG_ENCODING_UTF16_LE) { + tag = "x\000\000\000"; + } + else { + tag = "x"; + } + tag_len = ulen(enc, tag); + + slot = 0; + r = onig_get_callout_data_by_tag_dont_clear_old(reg, mp, (UChar* )tag, + (UChar* )tag + tag_len, slot, 0, &val); + if (r < ONIG_NORMAL) goto err; + else if (r == ONIG_VALUE_IS_NOT_SET) { + fprintf(stdout, "COUNT[x]: NO DATA\n"); + } + else { + fprintf(stdout, "COUNT[x]: %ld\n", val.l); + } + } + else if (r == ONIG_MISMATCH) { + fprintf(stdout, "search fail\n"); + goto show_count; + } + else { /* error */ + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + err: + onig_error_code_to_str((UChar* )s, r); + fprintf(stdout, "SEARCH ERROR: %d: %s\n", r, s); + } + + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + return r; +} + +extern int main(int argc, char* argv[]) +{ + int r; + OnigMatchParam* mp; + OnigEncoding encs[3]; + + encs[0] = ONIG_ENCODING_UTF8; + encs[1] = ONIG_ENCODING_UTF16_BE; + encs[2] = ONIG_ENCODING_UTF16_LE; + + r = onig_initialize(encs, sizeof(encs)/sizeof(encs[0])); + if (r != ONIG_NORMAL) { + fprintf(stderr, "FAIL: onig_initialize(): %d\n", r); + return -1; + } + + mp = onig_new_match_param(); + + test(encs[0], mp, "abc(.(*COUNT[x]))*(*FAIL)", "abcdefg"); + test(encs[0], mp, "abc(.(*COUNT[_any_]))*(.(*COUNT[x]))*d", "abcdefg"); + /* fail count */ + test(encs[0], mp, "abc(.(*COUNT[x]{<}))*f", "abcdefg"); + /* success count */ + test(encs[0], mp, "abc(.(*COUNT[x]{X}))*f", "abcdefg"); + /* passed count */ + test(encs[0], mp, "abc(.(*COUNT[x]))*f", "abcdefg"); + test(encs[0], mp, "a(.(*COUNT[x]))*z", "abcd\nabcdz"); + /* total count */ + test(encs[0], mp, "a(.(*TOTAL_COUNT[x]))*z", "abcd\nabcdz"); + + test(encs[1], mp, "\000a\000b\000c\000(\000.\000(\000*\000C\000O\000U\000N\000T\000[\000x\000]\000)\000)\000*\000(\000*\000F\000A\000I\000L\000)\000\000", "\000a\000b\000c\000d\000e\000f\000g\000\000"); + + test(encs[2], mp, "a\000b\000c\000(\000.\000(\000*\000C\000O\000U\000N\000T\000[\000x\000]\000)\000)\000*\000(\000*\000F\000A\000I\000L\000)\000\000\000", "a\000b\000c\000d\000e\000f\000g\000\000\000"); + + onig_free_match_param(mp); + onig_end(); + return 0; +} diff --git a/internal/components/third_party/oniguruma/sample/crnl.c b/internal/components/third_party/oniguruma/sample/crnl.c new file mode 100644 index 0000000000..bfa563eb73 --- /dev/null +++ b/internal/components/third_party/oniguruma/sample/crnl.c @@ -0,0 +1,129 @@ +/* + * crnl.c 2007/05/30 K.Kosako + * + * !!! You should enable USE_CRNL_AS_LINE_TERMINATOR. !!! + * + * USE_CRNL_AS_LINE_TERMINATOR config test program. + */ +#include +#include +#include "oniguruma.h" + +static int nfail = 0; + +static void result(int no, int from, int to, + int expected_from, int expected_to) +{ + fprintf(stderr, "%3d: ", no); + if (from == expected_from && to == expected_to) { + fprintf(stderr, "Success\n"); + } + else { + fprintf(stderr, "Fail: expected: (%d-%d), result: (%d-%d)\n", + expected_from, expected_to, from, to); + + nfail++; + } +} + +static int +x(int no, char* pattern_arg, char* str_arg, + int expected_from, int expected_to) +{ + int r; + unsigned char *start, *range, *end; + regex_t* reg; + OnigErrorInfo einfo; + OnigRegion *region; + UChar *pattern, *str; + + pattern = (UChar* )pattern_arg; + str = (UChar* )str_arg; + + r = onig_new(®, pattern, pattern + strlen((char* )pattern), + ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo); + if (r != ONIG_NORMAL) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str(s, r, &einfo); + fprintf(stderr, "ERROR: %s\n", s); + return -1; + } + + region = onig_region_new(); + + end = str + strlen((char* )str); + start = str; + range = end; + r = onig_search(reg, str, end, start, range, region, ONIG_OPTION_NONE); + if (r >= 0 || r == ONIG_MISMATCH) { + result(no, region->beg[0], region->end[0], expected_from, expected_to); + } + else if (r == ONIG_MISMATCH) { + result(no, r, -1, expected_from, expected_to); + } + else { /* error */ + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str(s, r); + fprintf(stderr, "ERROR: %s\n", s); + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + return -1; + } + + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + return 0; +} + +static int +f(int no, char* pattern_arg, char* str_arg) +{ + return x(no, pattern_arg, str_arg, -1, -1); +} + +extern int main(int argc, char* argv[]) +{ + x( 1, "", "\r\n", 0, 0); + x( 2, ".", "\r\n", 0, 1); + f( 3, "..", "\r\n"); + x( 4, "^", "\r\n", 0, 0); + x( 5, "\\n^", "\r\nf", 1, 2); + x( 6, "\\n^a", "\r\na", 1, 3); + x( 7, "$", "\r\n", 0, 0); + x( 8, "T$", "T\r\n", 0, 1); + x( 9, "T$", "T\raT\r\n", 3, 4); + x(10, "\\z", "\r\n", 2, 2); + f(11, "a\\z", "a\r\n"); + x(12, "\\Z", "\r\n", 0, 0); + x(13, "\\Z", "\r\na", 3, 3); + x(14, "\\Z", "\r\n\r\n\n", 4, 4); + x(15, "\\Z", "\r\n\r\nX", 5, 5); + x(16, "a\\Z", "a\r\n", 0, 1); + x(17, "aaaaaaaaaaaaaaa\\Z", "aaaaaaaaaaaaaaa\r\n", 0, 15); + x(18, "a|$", "b\r\n", 1, 1); + x(19, "$|b", "\rb", 1, 2); + x(20, "a$|ab$", "\r\nab\r\n", 2, 4); + + x(21, "a|\\Z", "b\r\n", 1, 1); + x(22, "\\Z|b", "\rb", 1, 2); + x(23, "a\\Z|ab\\Z", "\r\nab\r\n", 2, 4); + x(24, "(?=a$).", "a\r\n", 0, 1); + f(25, "(?=a$).", "a\r"); + x(26, "(?!a$)..", "a\r", 0, 2); + x(27, "(?<=a$).\\n", "a\r\n", 1, 3); + f(28, "(? 0) { + fprintf(stderr, "\n"); + fprintf(stderr, "!!! You have to enable USE_CRNL_AS_LINE_TERMINATOR\n"); + fprintf(stderr, "!!! in regenc.h for this test program.\n"); + fprintf(stderr, "\n"); + } + + return 0; +} diff --git a/internal/components/third_party/oniguruma/sample/echo.c b/internal/components/third_party/oniguruma/sample/echo.c new file mode 100644 index 0000000000..76df20770a --- /dev/null +++ b/internal/components/third_party/oniguruma/sample/echo.c @@ -0,0 +1,136 @@ +/* + * echo.c + */ +#include +#include +#include +#include "oniguruma.h" + +static int +echo(OnigCalloutArgs* args, void* user_data) +{ + int r; + OnigCalloutIn in; + OnigType type; + OnigValue val; + FILE* fp; + + fp = stdout; + + in = onig_get_callout_in_by_callout_args(args); + + r = onig_get_arg_by_callout_args(args, 1, &type, &val); + if (r != ONIG_NORMAL) return r; + + if (in == ONIG_CALLOUT_IN_PROGRESS) { + if (val.c == '<') + return ONIG_CALLOUT_SUCCESS; + } + else { + if (val.c != 'X' && val.c != '<') + return ONIG_CALLOUT_SUCCESS; + } + + r = onig_get_arg_by_callout_args(args, 0, &type, &val); + if (r != ONIG_NORMAL) return r; + + + fprintf(fp, "%s %s\n", + (in == ONIG_CALLOUT_IN_PROGRESS ? "=>" : "<="), + val.s.start); + fflush(fp); + + return ONIG_CALLOUT_SUCCESS; +} + + +static int +test(OnigEncoding enc, char* in_pattern, char* in_str) +{ + int r; + unsigned char *start, *range, *end; + regex_t* reg; + OnigErrorInfo einfo; + OnigRegion *region; + UChar* pattern; + UChar* str; + + pattern = (UChar* )in_pattern; + str = (UChar* )in_str; + + r = onig_new(®, pattern, pattern + strlen((char* )pattern), + ONIG_OPTION_DEFAULT, enc, ONIG_SYNTAX_DEFAULT, &einfo); + if (r != ONIG_NORMAL) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stderr, "COMPILE ERROR: %d: %s\n", r, s); + return -1; + } + + region = onig_region_new(); + + end = str + strlen((char* )str); + start = str; + range = end; + r = onig_search(reg, str, end, start, range, region, ONIG_OPTION_NONE); + if (r >= 0) { + int i; + + fprintf(stderr, "match at %d\n", r); + for (i = 0; i < region->num_regs; i++) { + fprintf(stderr, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]); + } + } + else if (r == ONIG_MISMATCH) { + fprintf(stderr, "search fail\n"); + } + else { /* error */ + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + fprintf(stderr, "SEARCH ERROR: %d: %s\n", r, s); + } + + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + return r; +} + +extern int main(int argc, char* argv[]) +{ + int r; + int id; + UChar* name; + OnigEncoding use_encs[1]; + OnigType arg_types[4]; + OnigValue opt_defaults[4]; + OnigEncoding enc; + + enc = ONIG_ENCODING_UTF8; + use_encs[0] = enc; + + r = onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + if (r != ONIG_NORMAL) return -1; + + name = (UChar* )"echo"; + arg_types[0] = ONIG_TYPE_STRING; + arg_types[1] = ONIG_TYPE_CHAR; + opt_defaults[0].s.start = (UChar* )"echo"; + opt_defaults[0].s.end = opt_defaults[0].s.start + + strlen((char* )opt_defaults[0].s.start); + opt_defaults[1].c = '>'; + + id = onig_set_callout_of_name(enc, ONIG_CALLOUT_TYPE_SINGLE, + name, name + strlen((char* )name), + ONIG_CALLOUT_IN_BOTH, echo, 0, + 2, arg_types, 2, opt_defaults); + if (id < 0) { + fprintf(stderr, "ERROR: fail to set callout of name: %s\n", name); + return -1; + } + + test(enc, "(?:(*echo{abc!!!})a|b)*", "abba"); + test(enc, "(?:(*echo{xyz,X})a|b)*", "abba"); + + onig_end(); + return 0; +} diff --git a/internal/components/third_party/oniguruma/sample/encode.c b/internal/components/third_party/oniguruma/sample/encode.c new file mode 100644 index 0000000000..9e9a0c7519 --- /dev/null +++ b/internal/components/third_party/oniguruma/sample/encode.c @@ -0,0 +1,215 @@ +/* + * encode.c + */ +#include +#include "oniguruma.h" + +static int +search(regex_t* reg, unsigned char* str, unsigned char* end) +{ + int r; + unsigned char *start, *range; + OnigRegion *region; + + region = onig_region_new(); + + start = str; + range = end; + r = onig_search(reg, str, end, start, range, region, ONIG_OPTION_NONE); + if (r >= 0) { + int i; + + fprintf(stderr, "match at %d (%s)\n", r, + ONIGENC_NAME(onig_get_encoding(reg))); + for (i = 0; i < region->num_regs; i++) { + fprintf(stderr, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]); + } + } + else if (r == ONIG_MISMATCH) { + fprintf(stderr, "search fail (%s)\n", + ONIGENC_NAME(onig_get_encoding(reg))); + } + else { /* error */ + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + fprintf(stderr, "ERROR: %s\n", s); + fprintf(stderr, " (%s)\n", ONIGENC_NAME(onig_get_encoding(reg))); + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + return -1; + } + + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + return 0; +} + +static int +exec(OnigEncoding enc, OnigOptionType options, + char* apattern, char* astr) +{ + int r; + unsigned char *end; + regex_t* reg; + OnigErrorInfo einfo; + UChar* pattern = (UChar* )apattern; + UChar* str = (UChar* )astr; + + onig_initialize(&enc, 1); + + r = onig_new(®, pattern, + pattern + onigenc_str_bytelen_null(enc, pattern), + options, enc, ONIG_SYNTAX_DEFAULT, &einfo); + if (r != ONIG_NORMAL) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stderr, "ERROR: %s\n", s); + return -1; + } + + end = str + onigenc_str_bytelen_null(enc, str); + r = search(reg, str, end); + + onig_free(reg); + onig_end(); + return 0; +} + +extern int main(int argc, char* argv[]) +{ + int r; + /* ISO 8859-1 test */ + static unsigned char str[] = { 0xc7, 0xd6, 0xfe, 0xea, 0xe0, 0xe2, 0x00 }; + static unsigned char pattern[] = { 0xe7, 0xf6, 0xde, '\\', 'w', '+', 0x00 }; + + r = exec(ONIG_ENCODING_SJIS, ONIG_OPTION_NONE, + "^a\\p{Hiragana}c$", "a\202\274c"); + + r = exec(ONIG_ENCODING_EUC_JP, ONIG_OPTION_NONE, + "^a\\p{Hiragana}c$", "a\244\276c"); + + r = exec(ONIG_ENCODING_CP1251, ONIG_OPTION_IGNORECASE, + "aBc", " AbC"); + + r = exec(ONIG_ENCODING_ISO_8859_1, ONIG_OPTION_IGNORECASE, + " [a-c\337z] ", " SS "); + r = exec(ONIG_ENCODING_ISO_8859_1, ONIG_OPTION_IGNORECASE, + " [\330-\341] ", " SS "); + + r = exec(ONIG_ENCODING_ISO_8859_2, ONIG_OPTION_IGNORECASE, + "\337 ", " Ss "); + r = exec(ONIG_ENCODING_ISO_8859_2, ONIG_OPTION_IGNORECASE, + "SS ", " \337 "); + r = exec(ONIG_ENCODING_ISO_8859_2, ONIG_OPTION_IGNORECASE, + "\\A\\S\\z", "ss"); + + r = exec(ONIG_ENCODING_ISO_8859_2, ONIG_OPTION_IGNORECASE, + "[ac]+", "bbbaAaCCC"); + + r = exec(ONIG_ENCODING_ISO_8859_3, ONIG_OPTION_IGNORECASE, + "[ac]+", "bbbaAaCCC"); + r = exec(ONIG_ENCODING_ISO_8859_4, ONIG_OPTION_IGNORECASE, + "[ac]+", "bbbaAaCCC"); + r = exec(ONIG_ENCODING_ISO_8859_5, ONIG_OPTION_IGNORECASE, + "[ac]+", "bbbaAaCCC"); + r = exec(ONIG_ENCODING_ISO_8859_6, ONIG_OPTION_IGNORECASE, + "[ac]+", "bbbaAaCCC"); + r = exec(ONIG_ENCODING_ISO_8859_7, ONIG_OPTION_IGNORECASE, + "[ac]+", "bbbaAaCCC"); + r = exec(ONIG_ENCODING_ISO_8859_8, ONIG_OPTION_IGNORECASE, + "[ac]+", "bbbaAaCCC"); + r = exec(ONIG_ENCODING_ISO_8859_9, ONIG_OPTION_IGNORECASE, + "[ac]+", "bbbaAaCCC"); + r = exec(ONIG_ENCODING_ISO_8859_10, ONIG_OPTION_IGNORECASE, + "[ac]+", "bbbaAaCCC"); + r = exec(ONIG_ENCODING_ISO_8859_11, ONIG_OPTION_IGNORECASE, + "[ac]+", "bbbaAaCCC"); + r = exec(ONIG_ENCODING_ISO_8859_13, ONIG_OPTION_IGNORECASE, + "[ac]+", "bbbaAaCCC"); + r = exec(ONIG_ENCODING_ISO_8859_14, ONIG_OPTION_IGNORECASE, + "[ac]+", "bbbaAaCCC"); + r = exec(ONIG_ENCODING_ISO_8859_15, ONIG_OPTION_IGNORECASE, + (char* )pattern, (char* )str); + r = exec(ONIG_ENCODING_ISO_8859_16, ONIG_OPTION_IGNORECASE, + (char* )pattern, (char* )str); + + r = exec(ONIG_ENCODING_KOI8_R, ONIG_OPTION_NONE, "a+", "bbbaaaccc"); + r = exec(ONIG_ENCODING_EUC_TW, ONIG_OPTION_NONE, "b*a+?c+", "bbbaaaccc"); + r = exec(ONIG_ENCODING_EUC_KR, ONIG_OPTION_NONE, "a+", "bbbaaaccc"); + r = exec(ONIG_ENCODING_EUC_CN, ONIG_OPTION_NONE, "c+", "bbbaaaccc"); + r = exec(ONIG_ENCODING_BIG5, ONIG_OPTION_NONE, "a+", "bbbaaaccc"); + + r = exec(ONIG_ENCODING_ISO_8859_1, ONIG_OPTION_IGNORECASE, + "\337", "SS"); + r = exec(ONIG_ENCODING_ISO_8859_1, ONIG_OPTION_IGNORECASE, + "SS", "\337"); + r = exec(ONIG_ENCODING_ISO_8859_1, ONIG_OPTION_IGNORECASE, + "SSb\337ssc", "a\337bSS\337cd"); + r = exec(ONIG_ENCODING_ISO_8859_1, ONIG_OPTION_IGNORECASE, + "[a\337]{0,2}", "aSS"); + r = exec(ONIG_ENCODING_ISO_8859_1, ONIG_OPTION_IGNORECASE, + "is", "iss"); + + r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_NONE, + "\000[\000[\000:\000a\000l\000n\000u\000m\000:\000]\000]\000+\000\000", + "\000#\002\120\000a\000Z\012\077\012\076\012\075\000\000"); + /* 0x0a3d == \012\075 : is not alnum */ + /* 0x0a3e == \012\076 : is alnum */ + + r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_NONE, + "\000\\\000d\000+\000\000", + "\0003\0001\377\020\377\031\377\032\000\000"); + + r = exec(ONIG_ENCODING_GB18030, ONIG_OPTION_IGNORECASE, + "(Aa\\d)+", "BaA5Aa0234"); + + r = exec(ONIG_ENCODING_GB18030, ONIG_OPTION_NONE, + "[[^\\w]]+[^\xee\xef]\xee\xef", "[[^\\w]]+[^\xee\xef]\xee\xef"); + + r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE, + "\000[\000\337\000]\000\000", "\000S\000S\000\000"); + + r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE, + "\000[\000\337\000]\000\000", "\000s\000S\000\000"); + + r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE, + "\000^\000[\000\001\000-\377\375\000]\000$\000\000", + "\000s\000S\000\000"); + + r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE, + "\000S\000S\000\000", + "\000S\000T\000\337\000\000"); + + r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE, + "\000S\000T\000S\000S\000\000", + "\000S\000t\000s\000S\000\000"); + + { + UChar pat[] = { 0x1f, 0xfc, 0x00, 0x00 }; + UChar str1[] = { 0x21, 0x26, 0x1f, 0xbe, 0x00, 0x00 }; + UChar str2[] = { 0x1f, 0xf3, 0x00, 0x00 }; + + r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE, + (char* )pat, (char* )str1); + + r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE, + (char* )pat, (char* )str2); + } + +#if 0 + /* You should define USE_UNICODE_CASE_FOLD_TURKISH_AZERI in regenc.h. */ + + set_case_fold(ONIGENC_CASE_FOLD_TURKISH_AZERI); + + r = exec(ONIG_ENCODING_UTF8, ONIG_ENCODING_UTF8, ONIG_OPTION_IGNORECASE, + "Ii", "\304\261\304\260"); + + r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE, + "\000I\000i\000\000", "\001\061\001\060\000\000"); + + r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE, + "\001\061\001\060\000\000", "\000I\000i\000\000"); + + set_case_fold(ONIGENC_CASE_FOLD_MIN); +#endif + + return r; +} diff --git a/internal/components/third_party/oniguruma/sample/listcap.c b/internal/components/third_party/oniguruma/sample/listcap.c new file mode 100644 index 0000000000..80728428e4 --- /dev/null +++ b/internal/components/third_party/oniguruma/sample/listcap.c @@ -0,0 +1,118 @@ +/* + * listcap.c + * + * capture history (?@...) sample. + */ +#include +#include +#include "oniguruma.h" + +static int +node_callback(int group, int beg, int end, int level, int at, void* arg) +{ + int i; + + if (at != ONIG_TRAVERSE_CALLBACK_AT_FIRST) + return -1; /* error */ + + /* indent */ + for (i = 0; i < level * 2; i++) + fputc(' ', stderr); + + fprintf(stderr, "%d: (%d-%d)\n", group, beg, end); + return 0; +} + +extern int ex(unsigned char* str, unsigned char* pattern, + OnigSyntaxType* syntax, OnigOptionType options) +{ + int r; + unsigned char *start, *range, *end; + regex_t* reg; + OnigErrorInfo einfo; + OnigRegion *region; + + r = onig_new(®, pattern, pattern + strlen((char* )pattern), + options, ONIG_ENCODING_ASCII, syntax, &einfo); + if (r != ONIG_NORMAL) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stderr, "ERROR: %s\n", s); + return -1; + } + + fprintf(stderr, "number of captures: %d\n", onig_number_of_captures(reg)); + fprintf(stderr, "number of capture histories: %d\n", + onig_number_of_capture_histories(reg)); + + region = onig_region_new(); + + end = str + strlen((char* )str); + start = str; + range = end; + r = onig_search(reg, str, end, start, range, region, ONIG_OPTION_NONE); + if (r >= 0) { + int i; + + fprintf(stderr, "match at %d\n", r); + for (i = 0; i < region->num_regs; i++) { + fprintf(stderr, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]); + } + fprintf(stderr, "\n"); + + r = onig_capture_tree_traverse(region, ONIG_TRAVERSE_CALLBACK_AT_FIRST, + node_callback, (void* )0); + } + else if (r == ONIG_MISMATCH) { + fprintf(stderr, "search fail\n"); + } + else { /* error */ + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + return -1; + } + + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + return 0; +} + + +extern int main(int argc, char* argv[]) +{ + int r; + OnigSyntaxType syn; + OnigEncoding use_encs[1]; + + static UChar* str1 = (UChar* )"((())())"; + static UChar* pattern1 + = (UChar* )"\\g

(?@

\\(\\g\\)){0}(?@(?:\\g

)*|){0}"; + + static UChar* str2 = (UChar* )"x00x00x00"; + static UChar* pattern2 = (UChar* )"(?@x(?@\\d+))+"; + + static UChar* str3 = (UChar* )"0123"; + static UChar* pattern3 = (UChar* )"(?@.)(?@.)(?@.)(?@.)"; + + static UChar* str4 = (UChar* )"(((a))(a)) ((((a))(a)))"; + static UChar* pattern4 + = (UChar* )"\\g

(?@

\\(\\g\\)){0}(?@(?:\\g

)*|a){0}"; + + use_encs[0] = ONIG_ENCODING_ASCII; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + + /* enable capture history */ + onig_copy_syntax(&syn, ONIG_SYNTAX_DEFAULT); + onig_set_syntax_op2(&syn, + onig_get_syntax_op2(&syn) | ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY); + + r = ex(str1, pattern1, &syn, ONIG_OPTION_NONE); + r = ex(str2, pattern2, &syn, ONIG_OPTION_NONE); + r = ex(str3, pattern3, &syn, ONIG_OPTION_NONE); + r = ex(str4, pattern4, &syn, ONIG_OPTION_FIND_LONGEST); + + onig_end(); + return r; +} diff --git a/internal/components/third_party/oniguruma/sample/names.c b/internal/components/third_party/oniguruma/sample/names.c new file mode 100644 index 0000000000..bf47f63462 --- /dev/null +++ b/internal/components/third_party/oniguruma/sample/names.c @@ -0,0 +1,79 @@ +/* + * names.c -- example of group name callback. + */ +#include +#include +#include "oniguruma.h" + +static int +name_callback(const UChar* name, const UChar* name_end, + int ngroup_num, int* group_nums, + regex_t* reg, void* arg) +{ + int i, gn, ref; + char* s; + OnigRegion *region = (OnigRegion* )arg; + + for (i = 0; i < ngroup_num; i++) { + gn = group_nums[i]; + ref = onig_name_to_backref_number(reg, name, name_end, region); + s = (ref == gn ? "*" : ""); + fprintf(stderr, "%s (%d): ", name, gn); + fprintf(stderr, "(%d-%d) %s\n", region->beg[gn], region->end[gn], s); + } + return 0; /* 0: continue */ +} + +extern int main(int argc, char* argv[]) +{ + int r; + unsigned char *start, *range, *end; + regex_t* reg; + OnigErrorInfo einfo; + OnigRegion *region; + OnigEncoding use_encs[1]; + + static UChar* pattern = (UChar* )"(?a*)(?b*)(?c*)"; + static UChar* str = (UChar* )"aaabbbbcc"; + + use_encs[0] = ONIG_ENCODING_ASCII; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + + r = onig_new(®, pattern, pattern + strlen((char* )pattern), + ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo); + if (r != ONIG_NORMAL) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stderr, "ERROR: %s\n", s); + return -1; + } + + fprintf(stderr, "number of names: %d\n", onig_number_of_names(reg)); + + region = onig_region_new(); + + end = str + strlen((char* )str); + start = str; + range = end; + r = onig_search(reg, str, end, start, range, region, ONIG_OPTION_NONE); + if (r >= 0) { + fprintf(stderr, "match at %d\n\n", r); + r = onig_foreach_name(reg, name_callback, (void* )region); + } + else if (r == ONIG_MISMATCH) { + fprintf(stderr, "search fail\n"); + } + else { /* error */ + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + onig_end(); + return -1; + } + + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + onig_end(); + return 0; +} diff --git a/internal/components/third_party/oniguruma/sample/posix.c b/internal/components/third_party/oniguruma/sample/posix.c new file mode 100644 index 0000000000..c5559362ea --- /dev/null +++ b/internal/components/third_party/oniguruma/sample/posix.c @@ -0,0 +1,107 @@ +/* + * posix.c + */ +#include +#include "onigposix.h" + +typedef unsigned char UChar; + +static int x(regex_t* reg, unsigned char* pattern, unsigned char* str) +{ + int r, i; + char buf[200]; + regmatch_t pmatch[20]; + + r = regexec(reg, (char* )str, reg->re_nsub + 1, pmatch, 0); + if (r != 0 && r != REG_NOMATCH) { + regerror(r, reg, buf, sizeof(buf)); + fprintf(stderr, "ERROR: %s\n", buf); + regfree(reg); + return -1; + } + + if (r == REG_NOMATCH) { + fprintf(stderr, "FAIL: /%s/ '%s'\n", pattern, str); + } + else { + fprintf(stderr, "OK: /%s/ '%s'\n", pattern, str); + for (i = 0; i <= (int )reg->re_nsub; i++) { + fprintf(stderr, "%d: %d-%d\n", i, pmatch[i].rm_so, pmatch[i].rm_eo); + } + } + regfree(reg); + return 0; +} + +extern int main(int argc, char* argv[]) +{ + int r; + char buf[200]; + regex_t reg; + UChar* pattern; + + reg_set_encoding(REG_POSIX_ENCODING_ASCII); + + /* default syntax (ONIG_SYNTAX_ONIGURUMA) */ + pattern = (UChar* )"^a+b{2,7}[c-f]?$|uuu"; + r = regcomp(®, (char* )pattern, REG_EXTENDED); + if (r) { + regerror(r, ®, buf, sizeof(buf)); + fprintf(stderr, "ERROR: %s\n", buf); + regfree(®); + onig_end(); + return -1; + } + x(®, pattern, (UChar* )"aaabbbbd"); + + /* POSIX Basic RE (REG_EXTENDED is not specified.) */ + pattern = (UChar* )"^a+b{2,7}[c-f]?|uuu"; + r = regcomp(®, (char* )pattern, 0); + if (r) { + regerror(r, ®, buf, sizeof(buf)); + fprintf(stderr, "ERROR: %s\n", buf); + regfree(®); + onig_end(); + return -1; + } + x(®, pattern, (UChar* )"a+b{2,7}d?|uuu"); + + /* POSIX Basic RE (REG_EXTENDED is not specified.) */ + pattern = (UChar* )"^a*b\\{2,7\\}\\([c-f]\\)$"; + r = regcomp(®, (char* )pattern, 0); + if (r) { + regerror(r, ®, buf, sizeof(buf)); + fprintf(stderr, "ERROR: %s\n", buf); + regfree(®); + onig_end(); + return -1; + } + x(®, pattern, (UChar* )"aaaabbbbbbd"); + + /* POSIX Extended RE */ + onig_set_default_syntax(ONIG_SYNTAX_POSIX_EXTENDED); + pattern = (UChar* )"^a+b{2,7}[c-f]?)$|uuu"; + r = regcomp(®, (char* )pattern, REG_EXTENDED); + if (r) { + regerror(r, ®, buf, sizeof(buf)); + fprintf(stderr, "ERROR: %s\n", buf); + regfree(®); + onig_end(); + return -1; + } + x(®, pattern, (UChar* )"aaabbbbd)"); + + pattern = (UChar* )"^b."; + r = regcomp(®, (char* )pattern, REG_EXTENDED | REG_NEWLINE); + if (r) { + regerror(r, ®, buf, sizeof(buf)); + fprintf(stderr, "ERROR: %s\n", buf); + regfree(®); + onig_end(); + return -1; + } + x(®, pattern, (UChar* )"a\nb\n"); + + onig_end(); + return 0; +} diff --git a/internal/components/third_party/oniguruma/sample/regset.c b/internal/components/third_party/oniguruma/sample/regset.c new file mode 100644 index 0000000000..6be511a6e5 --- /dev/null +++ b/internal/components/third_party/oniguruma/sample/regset.c @@ -0,0 +1,95 @@ +/* + * regset.c + */ +#include +#include +#include "oniguruma.h" + +extern int main(int argc, char* argv[]) +{ + int r; + int i, n; + int match_pos; + unsigned char *start, *range, *end; + OnigRegSet* set; + OnigRegSetLead lead; + regex_t* reg; + OnigErrorInfo einfo; + char ebuf[ONIG_MAX_ERROR_MESSAGE_LEN]; + OnigEncoding use_encs[1]; + + static UChar* str = (UChar* )"aaaaaaaaaaaaaaaaaaaaaaca"; + + static char* pat[] = { + "a(.*)b|a(.)c", + "^(abc)", + "a(.....)c" + }; + + use_encs[0] = ONIG_ENCODING_UTF8; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + + r = onig_regset_new(&set, 0, NULL); + if (r != ONIG_NORMAL) { + onig_error_code_to_str((UChar* )ebuf, r); + fprintf(stderr, "ERROR: %s\n", ebuf); + onig_end(); + return -1; + } + + n = sizeof(pat) / sizeof(pat[0]); + + for (i = 0; i < n; i++) { + r = onig_new(®, (UChar* )pat[i], (UChar* )(pat[i] + strlen(pat[i])), + ONIG_OPTION_DEFAULT, ONIG_ENCODING_UTF8, ONIG_SYNTAX_DEFAULT, + &einfo); + if (r != ONIG_NORMAL) { + onig_error_code_to_str((UChar* )ebuf, r, &einfo); + fprintf(stderr, "ERROR: %s\n", ebuf); + onig_regset_free(set); + onig_end(); + return -1; + } + + r = onig_regset_add(set, reg); + if (r != ONIG_NORMAL) { + onig_free(reg); + onig_regset_free(set); + onig_end(); + return -1; + } + } + + end = str + strlen((char* )str); + start = str; + range = end; + lead = ONIG_REGSET_POSITION_LEAD; + //lead = ONIG_REGSET_PRIORITY_TO_REGEX_ORDER; + r = onig_regset_search(set, str, end, start, range, lead, ONIG_OPTION_NONE, + &match_pos); + if (r >= 0) { + OnigRegion *region; + + fprintf(stderr, "match regex index: %d\n", r); + fprintf(stderr, "match position: %d\n", match_pos); + + region = onig_regset_get_region(set, r); + for (i = 0; i < region->num_regs; i++) { + fprintf(stderr, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]); + } + } + else if (r == ONIG_MISMATCH) { + fprintf(stderr, "search fail\n"); + } + else { /* error */ + onig_error_code_to_str((UChar* )ebuf, r); + fprintf(stderr, "ERROR: %s\n", ebuf); + onig_regset_free(set); + onig_end(); + return -1; + } + + onig_regset_free(set); + onig_end(); + return 0; +} diff --git a/internal/components/third_party/oniguruma/sample/scan.c b/internal/components/third_party/oniguruma/sample/scan.c new file mode 100644 index 0000000000..fe1bac1a0c --- /dev/null +++ b/internal/components/third_party/oniguruma/sample/scan.c @@ -0,0 +1,102 @@ +/* + * scan.c + */ +#include +#include +#include "oniguruma.h" + +static int +scan_callback(int n, int r, OnigRegion* region, void* arg) +{ + int i; + + fprintf(stdout, "scan: %d\n", n); + + fprintf(stdout, "match at %d\n", r); + for (i = 0; i < region->num_regs; i++) { + fprintf(stdout, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]); + } + + return 0; +} + +static int +scan(regex_t* reg, OnigOptionType options, unsigned char* str, unsigned char* end) +{ + int r; + OnigRegion *region; + + region = onig_region_new(); + + r = onig_scan(reg, str, end, region, options, scan_callback, NULL); + if (r >= 0) { + fprintf(stdout, "total: %d match\n", r); + } + else { /* error */ + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((OnigUChar* )s, r); + fprintf(stderr, "ERROR: %s\n", s); + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + return -1; + } + + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + return 0; +} + +static int +exec(OnigEncoding enc, OnigOptionType options, OnigOptionType runtime_options, char* apattern, char* astr) +{ + int r; + unsigned char *end; + regex_t* reg; + OnigErrorInfo einfo; + UChar* pattern_end; + UChar* pattern = (UChar* )apattern; + UChar* str = (UChar* )astr; + + onig_initialize(&enc, 1); + + pattern_end = pattern + onigenc_str_bytelen_null(enc, pattern); + + r = onig_new(®, pattern, pattern_end, options, enc, ONIG_SYNTAX_DEFAULT, &einfo); + if (r != ONIG_NORMAL) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((OnigUChar* )s, r, &einfo); + fprintf(stderr, "ERROR: %s\n", s); + onig_end(); + return -1; + } + + end = str + onigenc_str_bytelen_null(enc, str); + r = scan(reg, runtime_options, str, end); + + onig_free(reg); + onig_end(); + return 0; +} + + +extern int main(int argc, char* argv[]) +{ + exec(ONIG_ENCODING_UTF8, ONIG_OPTION_NONE, ONIG_OPTION_NONE, + "\\Ga+\\s*", "a aa aaa baaa"); + fprintf(stdout, "\n"); + + exec(ONIG_ENCODING_UTF8, ONIG_OPTION_NONE, ONIG_OPTION_NOT_BEGIN_POSITION, + "\\Ga+\\s*", "a aa aaa baaa"); + fprintf(stdout, "\n"); + + exec(ONIG_ENCODING_UTF8, ONIG_OPTION_NONE, ONIG_OPTION_NONE, + "(?!\\G)a+\\s*", "a aa aaa baaa"); + fprintf(stdout, "\n"); + + exec(ONIG_ENCODING_UTF8, ONIG_OPTION_NONE, ONIG_OPTION_NOT_BEGIN_POSITION, + "(?!\\G)a+\\s*", "a aa aaa baaa"); + fprintf(stdout, "\n"); + + exec(ONIG_ENCODING_UTF8, ONIG_OPTION_NONE, ONIG_OPTION_NONE, + "a+\\s*", "a aa aaa baaa"); + + return 0; +} diff --git a/internal/components/third_party/oniguruma/sample/simple.c b/internal/components/third_party/oniguruma/sample/simple.c new file mode 100644 index 0000000000..a08ea86d31 --- /dev/null +++ b/internal/components/third_party/oniguruma/sample/simple.c @@ -0,0 +1,63 @@ +/* + * simple.c + */ +#include +#include +#include "oniguruma.h" + +extern int main(int argc, char* argv[]) +{ + int r; + unsigned char *start, *range, *end; + regex_t* reg; + OnigErrorInfo einfo; + OnigRegion *region; + OnigEncoding use_encs[1]; + + static UChar* pattern = (UChar* )"a(.*)b|[e-f]+"; + static UChar* str = (UChar* )"zzzzaffffffffb"; + + use_encs[0] = ONIG_ENCODING_ASCII; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + + r = onig_new(®, pattern, pattern + strlen((char* )pattern), + ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo); + if (r != ONIG_NORMAL) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stderr, "ERROR: %s\n", s); + return -1; + } + + region = onig_region_new(); + + end = str + strlen((char* )str); + start = str; + range = end; + r = onig_search(reg, str, end, start, range, region, ONIG_OPTION_NONE); + if (r >= 0) { + int i; + + fprintf(stderr, "match at %d\n", r); + for (i = 0; i < region->num_regs; i++) { + fprintf(stderr, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]); + } + } + else if (r == ONIG_MISMATCH) { + fprintf(stderr, "search fail\n"); + } + else { /* error */ + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + fprintf(stderr, "ERROR: %s\n", s); + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + onig_end(); + return -1; + } + + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + onig_end(); + return 0; +} diff --git a/internal/components/third_party/oniguruma/sample/sql.c b/internal/components/third_party/oniguruma/sample/sql.c new file mode 100644 index 0000000000..21147aa133 --- /dev/null +++ b/internal/components/third_party/oniguruma/sample/sql.c @@ -0,0 +1,81 @@ +/* + * sql.c + */ +#include +#include +#include "oniguruma.h" + +extern int main(int argc, char* argv[]) +{ + static OnigSyntaxType SQLSyntax; + + int r; + unsigned char *start, *range, *end; + regex_t* reg; + OnigErrorInfo einfo; + OnigRegion *region; + OnigEncoding use_encs[1]; + + static UChar* pattern = (UChar* )"\\_%\\\\__zz"; + static UChar* str = (UChar* )"a_abcabcabc\\ppzz"; + + use_encs[0] = ONIG_ENCODING_ASCII; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + + onig_set_syntax_op (&SQLSyntax, ONIG_SYN_OP_VARIABLE_META_CHARACTERS); + onig_set_syntax_op2 (&SQLSyntax, 0); + onig_set_syntax_behavior(&SQLSyntax, 0); + onig_set_syntax_options (&SQLSyntax, ONIG_OPTION_MULTILINE); + onig_set_meta_char(&SQLSyntax, ONIG_META_CHAR_ESCAPE, (OnigCodePoint )'\\'); + onig_set_meta_char(&SQLSyntax, ONIG_META_CHAR_ANYCHAR, (OnigCodePoint )'_'); + onig_set_meta_char(&SQLSyntax, ONIG_META_CHAR_ANYTIME, + ONIG_INEFFECTIVE_META_CHAR); + onig_set_meta_char(&SQLSyntax, ONIG_META_CHAR_ZERO_OR_ONE_TIME, + ONIG_INEFFECTIVE_META_CHAR); + onig_set_meta_char(&SQLSyntax, ONIG_META_CHAR_ONE_OR_MORE_TIME, + ONIG_INEFFECTIVE_META_CHAR); + onig_set_meta_char(&SQLSyntax, ONIG_META_CHAR_ANYCHAR_ANYTIME, + (OnigCodePoint )'%'); + + r = onig_new(®, pattern, pattern + strlen((char* )pattern), + ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, &SQLSyntax, &einfo); + if (r != ONIG_NORMAL) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stderr, "ERROR: %s\n", s); + onig_end(); + return -1; + } + + region = onig_region_new(); + + end = str + strlen((char* )str); + start = str; + range = end; + r = onig_search(reg, str, end, start, range, region, ONIG_OPTION_NONE); + if (r >= 0) { + int i; + + fprintf(stderr, "match at %d\n", r); + for (i = 0; i < region->num_regs; i++) { + fprintf(stderr, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]); + } + } + else if (r == ONIG_MISMATCH) { + fprintf(stderr, "search fail\n"); + } + else { /* error */ + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + fprintf(stderr, "ERROR: %s\n", s); + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + onig_end(); + return -1; + } + + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + onig_end(); + return 0; +} diff --git a/internal/components/third_party/oniguruma/sample/syntax.c b/internal/components/third_party/oniguruma/sample/syntax.c new file mode 100644 index 0000000000..3a5a7cf137 --- /dev/null +++ b/internal/components/third_party/oniguruma/sample/syntax.c @@ -0,0 +1,77 @@ +/* + * syntax.c + */ +#include +#include +#include "oniguruma.h" + +extern int exec(OnigSyntaxType* syntax, char* apattern, char* astr) +{ + int r; + unsigned char *start, *range, *end; + regex_t* reg; + OnigErrorInfo einfo; + OnigRegion *region; + UChar* pattern = (UChar* )apattern; + UChar* str = (UChar* )astr; + + r = onig_new(®, pattern, pattern + strlen((char* )pattern), + ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, syntax, &einfo); + if (r != ONIG_NORMAL) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stderr, "ERROR: %s\n", s); + return -1; + } + + region = onig_region_new(); + + end = str + strlen((char* )str); + start = str; + range = end; + r = onig_search(reg, str, end, start, range, region, ONIG_OPTION_NONE); + if (r >= 0) { + int i; + + fprintf(stderr, "match at %d\n", r); + for (i = 0; i < region->num_regs; i++) { + fprintf(stderr, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]); + } + } + else if (r == ONIG_MISMATCH) { + fprintf(stderr, "search fail\n"); + } + else { /* error */ + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + fprintf(stderr, "ERROR: %s\n", s); + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + return -1; + } + + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + return 0; +} + +extern int main(int argc, char* argv[]) +{ + int r; + OnigEncoding use_encs[1]; + + use_encs[0] = ONIG_ENCODING_ASCII; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + + r = exec(ONIG_SYNTAX_PERL, + "\\p{XDigit}\\P{XDigit}\\p{^XDigit}\\P{^XDigit}\\p{XDigit}", + "bgh3a"); + + r = exec(ONIG_SYNTAX_JAVA, "\\p{XDigit}\\P{XDigit}[a-c&&b-g]", "bgc"); + + r = exec(ONIG_SYNTAX_ASIS, + "abc def* e+ g?ddd[a-rvvv] (vv){3,7}hv\\dvv(?:aczui ss)\\W\\w$", + "abc def* e+ g?ddd[a-rvvv] (vv){3,7}hv\\dvv(?:aczui ss)\\W\\w$"); + onig_end(); + return r; +} diff --git a/internal/components/third_party/oniguruma/sample/user_property.c b/internal/components/third_party/oniguruma/sample/user_property.c new file mode 100644 index 0000000000..ecb842c153 --- /dev/null +++ b/internal/components/third_party/oniguruma/sample/user_property.c @@ -0,0 +1,92 @@ +/* + * user_property.c + */ +#include +#include +#include "oniguruma.h" + +extern int +main(int argc, char* argv[]) +{ + int r; + unsigned char *start, *range, *end; + regex_t* reg; + OnigErrorInfo einfo; + OnigRegion *region; + OnigEncoding use_encs[1]; + + static OnigCodePoint handakuon_hiragana[] = { + 5, /* number of ranges */ + 0x3071, 0x3071, /* PA */ + 0x3074, 0x3074, /* PI */ + 0x3077, 0x3077, /* PU */ + 0x307a, 0x307a, /* PE */ + 0x307d, 0x307d /* PO */ + }; + + static UChar* pattern = (UChar* )"\\A(\\p{HandakuonHiragana}{5})\\p{^HandakuonHiragana}\\z"; + //static UChar* pattern = (UChar* )"\\p{Handakuon_Hiragana}{5}\\P{Handakuon Hiragana}"; + + /* "PA PI PU PE PO a" */ + static UChar* str = (UChar* )"\343\201\261\343\201\264\343\201\267\343\201\272\343\201\275a"; + + use_encs[0] = ONIG_ENCODING_UTF8; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + + r = onig_unicode_define_user_property("HandakuonHiragana", handakuon_hiragana); + if (r == ONIG_NORMAL) { + fprintf(stdout, "define HandakuonHiragana\n"); + } + else { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + fprintf(stderr, "ERROR: %s\n", s); + onig_end(); + return -1; + } + + r = onig_new(®, pattern, pattern + strlen((char* )pattern), + ONIG_OPTION_DEFAULT, ONIG_ENCODING_UTF8, ONIG_SYNTAX_DEFAULT, &einfo); + if (r == ONIG_NORMAL) { + fprintf(stdout, "onig_new: success.\n"); + } + else { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stderr, "onig_new: ERROR: %s\n", s); + onig_end(); + return -1; + } + + region = onig_region_new(); + + end = str + strlen((char* )str); + start = str; + range = end; + r = onig_search(reg, str, end, start, range, region, ONIG_OPTION_NONE); + if (r >= 0) { + int i; + + fprintf(stderr, "match at %d\n", r); + for (i = 0; i < region->num_regs; i++) { + fprintf(stderr, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]); + } + } + else if (r == ONIG_MISMATCH) { + fprintf(stderr, "search fail\n"); + } + else { /* error */ + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + fprintf(stderr, "ERROR: %s\n", s); + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + onig_end(); + return -1; + } + + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); + onig_end(); + return 0; +} diff --git a/internal/components/third_party/oniguruma/sbom.cdx.json b/internal/components/third_party/oniguruma/sbom.cdx.json new file mode 100644 index 0000000000..4f2ed97d31 --- /dev/null +++ b/internal/components/third_party/oniguruma/sbom.cdx.json @@ -0,0 +1,44 @@ +{ + "bomFormat": "CycloneDX", + "specVersion": "1.6", + "version": 1, + "metadata": { + "authors": [ + { + "name": "@VCS_SBOM_AUTHORS@" + } + ] + }, + "components": [ + { + "type": "library", + "bom-ref": "pkg:github/kkos/oniguruma@@VCS_TAG@", + "cpe": "cpe:2.3:a:kkos:oniguruma:@VCS_TAG@:*:*:*:*:*:*:*", + "name": "oniguruma", + "version": "@VCS_VERSION@", + "description": "A modern and flexible regular expressions library", + "authors": [ + { + "name": "@VCS_AUTHORS@", + "url": "https://raw.githubusercontent.com/kkos/oniguruma/refs/heads/master/AUTHORS" + } + ], + "supplier": { + "name": "oniguruma developers" + }, + "licenses": [ + { + "license": { + "id": "BSD-2-Clause" + } + } + ], + "externalReferences": [ + { + "type": "vcs", + "url": "https://github.com/kkos/oniguruma" + } + ] + } + ] +} diff --git a/internal/components/third_party/oniguruma/src/Makefile.am b/internal/components/third_party/oniguruma/src/Makefile.am new file mode 100644 index 0000000000..44a4167836 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/Makefile.am @@ -0,0 +1,84 @@ +## Makefile.am for Oniguruma +libname = libonig.la + +AM_CFLAGS = -Wall +AM_CPPFLAGS = -I$(top_srcdir) + +include_HEADERS = oniguruma.h oniggnu.h + +posix_headers = onigposix.h + +if ENABLE_POSIX_API +posix_sources = regposix.c regposerr.c +include_HEADERS += $(posix_headers) +AM_CFLAGS += -DUSE_POSIX_API +else +posix_sources = +endif + +if ENABLE_BINARY_COMPATIBLE_POSIX_API +AM_CFLAGS += -DUSE_BINARY_COMPATIBLE_POSIX_API +endif + + +lib_LTLIBRARIES = $(libname) + +libonig_la_SOURCES = regint.h regparse.h regenc.h st.h \ + regparse.c regcomp.c regexec.c \ + regenc.c regerror.c regext.c regsyntax.c regtrav.c regversion.c st.c \ + reggnu.c \ + $(posix_sources) \ + unicode.c \ + unicode_unfold_key.c \ + unicode_fold1_key.c \ + unicode_fold2_key.c \ + unicode_fold3_key.c \ + ascii.c utf8.c \ + utf16_be.c utf16_le.c \ + utf32_be.c utf32_le.c \ + euc_jp.c euc_jp_prop.c \ + sjis.c sjis_prop.c \ + iso8859_1.c \ + iso8859_2.c iso8859_3.c \ + iso8859_4.c iso8859_5.c \ + iso8859_6.c iso8859_7.c \ + iso8859_8.c iso8859_9.c \ + iso8859_10.c iso8859_11.c \ + iso8859_13.c iso8859_14.c \ + iso8859_15.c iso8859_16.c \ + euc_tw.c euc_kr.c big5.c \ + gb18030.c koi8_r.c cp1251.c \ + onig_init.c + +EXTRA_DIST = koi8.c mktable.c \ + unicode_fold_data.c unicode_property_data.c \ + unicode_property_data_posix.c \ + unicode_egcb_data.c unicode_wb_data.c + + +libonig_la_LDFLAGS = $(EXTRA_LIBONIG_LDFLAGS) -version-info $(LTVERSION) + +if USE_LIBONIG_DEF_FILE + +libonig_la_LDFLAGS += -Wl,--output-def,$(LIBONIG_DEF_FILE) + +install-data-hook: + echo "$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_DATA) $(LIBONIG_DEF_FILE) $(DESTDIR)$(libdir)"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_DATA) $(LIBONIG_DEF_FILE) $(DESTDIR)$(libdir) || exit 1 + +uninstall-hook: + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$(LIBONIG_DEF_FILE)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$(LIBONIG_DEF_FILE)" + +endif + + +dll: + $(CXX) -shared -Wl,--output-def,libonig.def -o libonig.dll *.o \ + $(LIBS) + strip libonig.dll + + +# character-types-table source generator +mktable: mktable.c regenc.h + $(CC) -I$(top_srcdir) -o mktable mktable.c diff --git a/internal/components/third_party/oniguruma/src/Makefile.windows b/internal/components/third_party/oniguruma/src/Makefile.windows new file mode 100644 index 0000000000..b6377723c3 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/Makefile.windows @@ -0,0 +1,196 @@ +# Oniguruma Makefile for Windows + +product_name = oniguruma + +TEST_DIR = $(ONIG_DIR)/../test +SAMPLE_DIR = $(ONIG_DIR)/../sample +WIN_DIR = $(ONIG_DIR)/../windows + +CPPFLAGS = +CFLAGS = -O2 -nologo /W3 +LDFLAGS = +LOADLIBES = +ARLIB = lib +ARLIB_FLAGS = -nologo +ARDLL = cl +ARDLL_FLAGS = -nologo -LD $(LINKFLAGS) -dll +LINKFLAGS = -link -incremental:no -pdb:none + +SAMPLE_CFLAGS = $(CFLAGS) /I$(ONIG_DIR) + +INSTALL = install -c +CP = copy +CC = cl +DEFS = -DHAVE_CONFIG_H -DUSE_POSIX_API -DUSE_BINARY_COMPATIBLE_POSIX_API + +subdirs = + +libbase = onig +libname = $(libbase)_s.lib +dllname = $(libbase).dll +dlllib = $(libbase).lib + +!IF defined(ENABLE_POSIX_API) && "$(ENABLE_POSIX_API)" == "NO" +posixobjs = +!ELSE +posixobjs = $(BUILD_DIR)/regposix.obj $(BUILD_DIR)/regposerr.obj +!ENDIF + +onigheaders = $(ONIG_DIR)/oniguruma.h $(ONIG_DIR)/regint.h $(ONIG_DIR)/regparse.h $(ONIG_DIR)/regenc.h $(ONIG_DIR)/st.h +posixheaders = $(ONIG_DIR)/onigposix.h +headers = $(posixheaders) $(onigheaders) + +onigobjs = $(BUILD_DIR)/reggnu.obj $(BUILD_DIR)/regerror.obj $(BUILD_DIR)/regparse.obj $(BUILD_DIR)/regext.obj $(BUILD_DIR)/regcomp.obj \ + $(BUILD_DIR)/regexec.obj $(BUILD_DIR)/regenc.obj $(BUILD_DIR)/regsyntax.obj $(BUILD_DIR)/regtrav.obj \ + $(BUILD_DIR)/regversion.obj $(BUILD_DIR)/st.obj $(BUILD_DIR)/onig_init.obj +libobjs = $(onigobjs) $(posixobjs) + +jp_objs = $(BUILD_DIR)/euc_jp.obj $(BUILD_DIR)/sjis.obj +iso8859_objs = $(BUILD_DIR)/iso8859_1.obj $(BUILD_DIR)/iso8859_2.obj \ + $(BUILD_DIR)/iso8859_3.obj $(BUILD_DIR)/iso8859_4.obj \ + $(BUILD_DIR)/iso8859_5.obj $(BUILD_DIR)/iso8859_6.obj \ + $(BUILD_DIR)/iso8859_7.obj $(BUILD_DIR)/iso8859_8.obj \ + $(BUILD_DIR)/iso8859_9.obj $(BUILD_DIR)/iso8859_10.obj \ + $(BUILD_DIR)/iso8859_11.obj $(BUILD_DIR)/iso8859_13.obj \ + $(BUILD_DIR)/iso8859_14.obj $(BUILD_DIR)/iso8859_15.obj \ + $(BUILD_DIR)/iso8859_16.obj + +encobjs = $(BUILD_DIR)/ascii.obj $(BUILD_DIR)/utf8.obj \ + $(BUILD_DIR)/unicode.obj \ + $(BUILD_DIR)/utf16_be.obj $(BUILD_DIR)/utf16_le.obj \ + $(BUILD_DIR)/utf32_be.obj $(BUILD_DIR)/utf32_le.obj \ + $(jp_objs) $(iso8859_objs) \ + $(BUILD_DIR)/euc_tw.obj $(BUILD_DIR)/euc_kr.obj $(BUILD_DIR)/big5.obj \ + $(BUILD_DIR)/gb18030.obj \ + $(BUILD_DIR)/koi8_r.obj \ + $(BUILD_DIR)/cp1251.obj \ + $(BUILD_DIR)/euc_jp_prop.obj $(BUILD_DIR)/sjis_prop.obj \ + $(BUILD_DIR)/unicode_unfold_key.obj $(BUILD_DIR)/unicode_fold1_key.obj \ + $(BUILD_DIR)/unicode_fold2_key.obj $(BUILD_DIR)/unicode_fold3_key.obj # $(BUILD_DIR)/koi8.obj + +onigsources = $(ONIG_DIR)/regerror.c $(ONIG_DIR)/regparse.c $(ONIG_DIR)/regext.c $(ONIG_DIR)/regcomp.c $(ONIG_DIR)/regexec.c $(ONIG_DIR)/regenc.c \ + $(ONIG_DIR)/regsyntax.c $(ONIG_DIR)/regtrav.c $(ONIG_DIR)/regversion.c $(ONIG_DIR)/reggnu.c $(ONIG_DIR)/st.c +posixsources = $(ONIG_DIR)/regposix.c $(ONIG_DIR)/regposerr.c +libsources = $(posixsources) $(onigsources) + +patchfiles = re.c.168.patch re.c.181.patch +distfiles = README COPYING HISTORY \ + Makefile.in configure.in config.h.in configure \ + $(headers) $(libsources) $(patchfiles) \ + test.rb testconv.rb +testc = testc +testp = testp + +makeargs = $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CC='$(CC)' + +.SUFFIXES: +.SUFFIXES: .obj .c .h .ps .dvi .info .texinfo + +{$(ONIG_DIR)}.c{$(BUILD_DIR)}.obj: + $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) /I. /I.. /Fo$@ /c $< + +# targets +default: all + +all: $(libname) $(dllname) + +$(libname): $(libobjs) $(encobjs) + $(ARLIB) $(ARLIB_FLAGS) -out:$@ $(libobjs) $(encobjs) + +$(dllname): $(libobjs) $(encobjs) + $(ARDLL) $(libobjs) $(encobjs) -Fe$@ $(ARDLL_FLAGS) + +$(BUILD_DIR)/regparse.obj: $(ONIG_DIR)/regparse.c $(onigheaders) $(BUILD_DIR)/config.h +$(BUILD_DIR)/regext.obj: $(ONIG_DIR)/regext.c $(onigheaders) $(BUILD_DIR)/config.h +$(BUILD_DIR)/regtrav.obj: $(ONIG_DIR)/regtrav.c $(onigheaders) $(BUILD_DIR)/config.h +$(BUILD_DIR)/regcomp.obj: $(ONIG_DIR)/regcomp.c $(onigheaders) $(BUILD_DIR)/config.h +$(BUILD_DIR)/regexec.obj: $(ONIG_DIR)/regexec.c $(ONIG_DIR)/regint.h $(ONIG_DIR)/regenc.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/reggnu.obj: $(ONIG_DIR)/reggnu.c $(ONIG_DIR)/regint.h $(ONIG_DIR)/regenc.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h $(ONIG_DIR)/oniggnu.h +$(BUILD_DIR)/regerror.obj: $(ONIG_DIR)/regerror.c $(ONIG_DIR)/regint.h $(ONIG_DIR)/regenc.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/regenc.obj: $(ONIG_DIR)/regenc.c $(ONIG_DIR)/regenc.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/regsyntax.obj: $(ONIG_DIR)/regsyntax.c $(ONIG_DIR)/regint.h $(ONIG_DIR)/regenc.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/regversion.obj: $(ONIG_DIR)/regversion.c $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/regposix.obj: $(ONIG_DIR)/regposix.c $(posixheaders) $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/regposerr.obj: $(ONIG_DIR)/regposerr.c $(posixheaders) $(BUILD_DIR)/config.h +$(BUILD_DIR)/st.obj: $(ONIG_DIR)/st.c $(ONIG_DIR)/regint.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h $(ONIG_DIR)/st.h +$(BUILD_DIR)/onig_init.obj: $(ONIG_DIR)/onig_init.c $(ONIG_DIR)/oniguruma.h + +$(BUILD_DIR)/ascii.obj: $(ONIG_DIR)/ascii.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/unicode.obj: $(ONIG_DIR)/unicode.c $(ONIG_DIR)/unicode_fold_data.c $(ONIG_DIR)/unicode_property_data.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/utf8.obj: $(ONIG_DIR)/utf8.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/utf16_be.obj: $(ONIG_DIR)/utf16_be.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/utf16_le.obj: $(ONIG_DIR)/utf16_le.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/utf32_be.obj: $(ONIG_DIR)/utf32_be.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/utf32_le.obj: $(ONIG_DIR)/utf32_le.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/euc_jp.obj: $(ONIG_DIR)/euc_jp.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/euc_tw.obj: $(ONIG_DIR)/euc_tw.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/euc_kr.obj: $(ONIG_DIR)/euc_kr.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/sjis.obj: $(ONIG_DIR)/sjis.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/iso8859_1.obj: $(ONIG_DIR)/iso8859_1.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/iso8859_2.obj: $(ONIG_DIR)/iso8859_2.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/iso8859_3.obj: $(ONIG_DIR)/iso8859_3.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/iso8859_4.obj: $(ONIG_DIR)/iso8859_4.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/iso8859_5.obj: $(ONIG_DIR)/iso8859_5.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/iso8859_6.obj: $(ONIG_DIR)/iso8859_6.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/iso8859_7.obj: $(ONIG_DIR)/iso8859_7.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/iso8859_8.obj: $(ONIG_DIR)/iso8859_8.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/iso8859_9.obj: $(ONIG_DIR)/iso8859_9.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/iso8859_10.obj: $(ONIG_DIR)/iso8859_10.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/iso8859_11.obj: $(ONIG_DIR)/iso8859_11.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/iso8859_13.obj: $(ONIG_DIR)/iso8859_13.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/iso8859_14.obj: $(ONIG_DIR)/iso8859_14.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/iso8859_15.obj: $(ONIG_DIR)/iso8859_15.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/iso8859_16.obj: $(ONIG_DIR)/iso8859_16.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/koi8.obj: $(ONIG_DIR)/koi8.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/koi8_r.obj: $(ONIG_DIR)/koi8_r.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/cp1251.obj: $(ONIG_DIR)/cp1251.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/big5.obj: $(ONIG_DIR)/big5.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/gb18030.obj: $(ONIG_DIR)/gb18030.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/euc_jp_prop.obj: $(ONIG_DIR)/euc_jp_prop.c $(ONIG_DIR)/regenc.h +$(BUILD_DIR)/sjis_prop.obj: $(ONIG_DIR)/sjis_prop.c $(ONIG_DIR)/regenc.h +$(BUILD_DIR)/unicode_unfold_key.obj: $(ONIG_DIR)/unicode_unfold_key.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/unicode_fold1_key.obj: $(ONIG_DIR)/unicode_fold1_key.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/unicode_fold2_key.obj: $(ONIG_DIR)/unicode_fold2_key.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h +$(BUILD_DIR)/unicode_fold3_key.obj: $(ONIG_DIR)/unicode_fold3_key.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h + +all-test: test_syntax test_regset test_utf8 test_options test_back testc testp testu + +test_syntax: $(TEST_DIR)/test_syntax.c $(libname) + $(CC) -nologo /Fe:$@ /I. /I$(ONIG_DIR) /DONIG_EXTERN=extern /utf-8 $(TEST_DIR)/test_syntax.c $(libname) + +test_regset: $(TEST_DIR)/test_regset.c $(libname) + $(CC) -nologo /Fe:$@ /I. /I$(ONIG_DIR) /DONIG_EXTERN=extern /utf-8 $(TEST_DIR)/test_regset.c $(libname) + +test_utf8: $(TEST_DIR)/test_utf8.c $(libname) + $(CC) -nologo /Fe:$@ /I. /I$(ONIG_DIR) /DONIG_EXTERN=extern /utf-8 $(TEST_DIR)/test_utf8.c $(libname) + +test_options: $(TEST_DIR)/test_options.c $(libname) + $(CC) -nologo /Fe:$@ /I. /I$(ONIG_DIR) /DONIG_EXTERN=extern /utf-8 $(TEST_DIR)/test_options.c $(libname) + +test_back: $(TEST_DIR)/test_back.c $(libname) + $(CC) -nologo /Fe:$@ /I. /I$(ONIG_DIR) /DONIG_EXTERN=extern /utf-8 $(TEST_DIR)/test_back.c $(libname) + +testc: $(WIN_DIR)/testc.c $(libname) + $(CC) -nologo /Fe:$@ /I. /I$(ONIG_DIR) /DONIG_EXTERN=extern $(WIN_DIR)/testc.c $(libname) + +testp: $(WIN_DIR)/testc.c $(libname) + $(CC) -nologo /Fe:$@ /I. /I$(ONIG_DIR) /DONIG_EXTERN=extern /DPOSIX_TEST $(WIN_DIR)/testc.c $(libname) + +testu: $(TEST_DIR)/testu.c $(libname) + $(CC) -nologo /Fe:$@ /I. /I$(ONIG_DIR) /DONIG_EXTERN=extern $(TEST_DIR)/testu.c $(libname) + +clean: + del $(BUILD_DIR)\*.obj $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.exp $(BUILD_DIR)\*.dll $(BUILD_DIR)\test_regset.exe $(BUILD_DIR)\test_syntax.exe $(BUILD_DIR)\test_utf8.exe $(BUILD_DIR)\test_options.exe $(BUILD_DIR)\test_back.exe $(BUILD_DIR)\testp.exe $(BUILD_DIR)\testc.exe $(BUILD_DIR)\testu.exe + + +samples: all + $(CC) $(SAMPLE_CFLAGS) /Fe:simple $(SAMPLE_DIR)\simple.c $(dlllib) + $(CC) $(SAMPLE_CFLAGS) /Fe:posix $(SAMPLE_DIR)\posix.c $(dlllib) + $(CC) $(SAMPLE_CFLAGS) /Fe:names $(SAMPLE_DIR)\names.c $(dlllib) + $(CC) $(SAMPLE_CFLAGS) /Fe:listcap $(SAMPLE_DIR)\listcap.c $(dlllib) + $(CC) $(SAMPLE_CFLAGS) /Fe:sql $(SAMPLE_DIR)\sql.c $(dlllib) + $(CC) $(SAMPLE_CFLAGS) /Fe:encode $(SAMPLE_DIR)\encode.c $(dlllib) + $(CC) $(SAMPLE_CFLAGS) /Fe:syntax $(SAMPLE_DIR)\syntax.c $(dlllib) + $(CC) $(SAMPLE_CFLAGS) /Fe:count $(SAMPLE_DIR)\count.c $(dlllib) + $(CC) $(SAMPLE_CFLAGS) /Fe:regset $(SAMPLE_DIR)\regset.c $(dlllib) + $(CC) $(SAMPLE_CFLAGS) /Fe:callback_each_match $(SAMPLE_DIR)\callback_each_match.c $(dlllib) diff --git a/internal/components/third_party/oniguruma/src/ascii.c b/internal/components/third_party/oniguruma/src/ascii.c new file mode 100644 index 0000000000..4d59092de3 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/ascii.c @@ -0,0 +1,121 @@ +/********************************************************************** + ascii.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regint.h" /* for USE_CALLOUT */ + +static int +init(void) +{ +#ifdef USE_CALLOUT + + int id; + OnigEncoding enc; + char* name; + unsigned int args[4]; + OnigValue opts[4]; + + enc = ONIG_ENCODING_ASCII; + + name = "FAIL"; BC0_P(name, fail); + name = "MISMATCH"; BC0_P(name, mismatch); +#ifdef USE_SKIP_SEARCH + name = "SKIP"; BC0_P(name, skip); +#endif + + name = "MAX"; + args[0] = ONIG_TYPE_TAG | ONIG_TYPE_LONG; + args[1] = ONIG_TYPE_CHAR; + opts[0].c = 'X'; + BC_B_O(name, max, 2, args, 1, opts); + + name = "ERROR"; + args[0] = ONIG_TYPE_LONG; opts[0].l = ONIG_ABORT; + BC_P_O(name, error, 1, args, 1, opts); + + name = "COUNT"; + args[0] = ONIG_TYPE_CHAR; opts[0].c = '>'; + BC_B_O(name, count, 1, args, 1, opts); + + name = "TOTAL_COUNT"; + args[0] = ONIG_TYPE_CHAR; opts[0].c = '>'; + BC_B_O(name, total_count, 1, args, 1, opts); + + name = "CMP"; + args[0] = ONIG_TYPE_TAG | ONIG_TYPE_LONG; + args[1] = ONIG_TYPE_STRING; + args[2] = ONIG_TYPE_TAG | ONIG_TYPE_LONG; + BC_P(name, cmp, 3, args); + +#endif /* USE_CALLOUT */ + + return ONIG_NORMAL; +} + +#if 0 +static int +is_initialized(void) +{ + /* Don't use this function */ + /* can't answer, because builtin callout entries removed in onig_end() */ + return 0; +} +#endif + +static int +ascii_is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 128) + return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype); + else + return FALSE; +} + +OnigEncodingType OnigEncodingASCII = { + onigenc_single_byte_mbc_enc_len, + "US-ASCII", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + onigenc_ascii_mbc_case_fold, + onigenc_ascii_apply_all_case_fold, + onigenc_ascii_get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + ascii_is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + init, + 0, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/big5.c b/internal/components/third_party/oniguruma/src/big5.c new file mode 100644 index 0000000000..faff845a56 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/big5.c @@ -0,0 +1,200 @@ +/********************************************************************** + big5.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +static const int EncLen_BIG5[] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 +}; + +static int +big5_mbc_enc_len(const UChar* p) +{ + return EncLen_BIG5[*p]; +} + +static int +big5_code_to_mbclen(OnigCodePoint code) +{ + if ((code & (~0xffff)) != 0) return ONIGERR_INVALID_CODE_POINT_VALUE; + + if ((code & 0xff00) != 0) { + if (EncLen_BIG5[(int )(code >> 8) & 0xff] == 2) + return 2; + } + else { + if (EncLen_BIG5[(int )(code & 0xff)] == 1) + return 1; + } + + return ONIGERR_INVALID_CODE_POINT_VALUE; +} + +static int +is_valid_mbc_string(const UChar* p, const UChar* end) +{ + while (p < end) { + if (*p < 0x80) { + p++; + } + else if (*p < 0xa1) { + return FALSE; + } + else if (*p < 0xff) { + p++; + if (p >= end) return FALSE; + if (*p < 0x40) return FALSE; + if (*p > 0x7e && *p < 0xa1) return FALSE; + if (*p == 0xff) return FALSE; + p++; + } + else + return FALSE; + } + + return TRUE; +} + +static OnigCodePoint +big5_mbc_to_code(const UChar* p, const UChar* end) +{ + return onigenc_mbn_mbc_to_code(ONIG_ENCODING_BIG5, p, end); +} + +static int +big5_code_to_mbc(OnigCodePoint code, UChar *buf) +{ + return onigenc_mb2_code_to_mbc(ONIG_ENCODING_BIG5, code, buf); +} + +static int +big5_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end, + UChar* lower) +{ + return onigenc_mbn_mbc_case_fold(ONIG_ENCODING_BIG5, flag, + pp, end, lower); +} + +static int +big5_is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + return onigenc_mb2_is_code_ctype(ONIG_ENCODING_BIG5, code, ctype); +} + +static const char BIG5_CAN_BE_TRAIL_TABLE[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 +}; + +#define BIG5_ISMB_FIRST(byte) (EncLen_BIG5[byte] > 1) +#define BIG5_ISMB_TRAIL(byte) BIG5_CAN_BE_TRAIL_TABLE[(byte)] + +static UChar* +big5_left_adjust_char_head(const UChar* start, const UChar* s) +{ + const UChar *p; + int len; + + if (s <= start) return (UChar* )s; + p = s; + + if (BIG5_ISMB_TRAIL(*p)) { + while (p > start) { + if (! BIG5_ISMB_FIRST(*--p)) { + p++; + break; + } + } + } + len = enclen(ONIG_ENCODING_BIG5, p); + if (p + len > s) return (UChar* )p; + p += len; + return (UChar* )(p + ((s - p) & ~1)); +} + +static int +big5_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED) +{ + const UChar c = *s; + + return (BIG5_ISMB_TRAIL(c) ? FALSE : TRUE); +} + +OnigEncodingType OnigEncodingBIG5 = { + big5_mbc_enc_len, + "Big5", /* name */ + 2, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + big5_mbc_to_code, + big5_code_to_mbclen, + big5_code_to_mbc, + big5_mbc_case_fold, + onigenc_ascii_apply_all_case_fold, + onigenc_ascii_get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + big5_is_code_ctype, + onigenc_not_support_get_ctype_code_range, + big5_left_adjust_char_head, + big5_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/config.h b/internal/components/third_party/oniguruma/src/config.h new file mode 100644 index 0000000000..da845b52c9 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/config.h @@ -0,0 +1,68 @@ +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have `clock_gettime', as a function or macro. */ +#define HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#define HAVE_ALLOCA_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIMES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Name of package */ +#define PACKAGE onig + +/* Define to the version of this package. */ +#define PACKAGE_VERSION 6.9.10 + +/* The size of `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `intptr_t', as computed by sizeof. */ +#define SIZEOF_INTPTR_T 8 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `void*', as computed by sizeof. */ +#define SIZEOF_VOIDP 8 + +/* The size of `time_t', as computed by sizeof. */ +#define SIZEOF_TIME_T 8 + +/* Define if enable CR+NL as line terminator */ +/* #undef USE_CRNL_AS_LINE_TERMINATOR */ + +/* Version number of package */ +#define VERSION 6.9.10 diff --git a/internal/components/third_party/oniguruma/src/config.h.cmake.in b/internal/components/third_party/oniguruma/src/config.h.cmake.in new file mode 100644 index 0000000000..c213a09281 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/config.h.cmake.in @@ -0,0 +1,56 @@ +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +#cmakedefine CRAY_STACKSEG_END + +/* Define to 1 if using `alloca.c'. */ +#cmakedefine C_ALLOCA + +/* Define to 1 if you have `alloca', as a function or macro. */ +#cmakedefine HAVE_ALLOCA ${HAVE_ALLOCA} + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#cmakedefine HAVE_ALLOCA_H ${HAVE_ALLOCA_H} + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDINT_H ${HAVE_STDINT_H} + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TIMES_H ${HAVE_SYS_TIMES_H} + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TIME_H ${HAVE_SYS_TIME_H} + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TYPES_H ${HAVE_SYS_TYPES_H} + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UNISTD_H ${HAVE_UNISTD_H} + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_INTTYPES_H ${HAVE_INTTYPES_H} + +/* Name of package */ +#cmakedefine PACKAGE ${PACKAGE} + +/* Define to the version of this package. */ +#cmakedefine PACKAGE_VERSION ${PACKAGE_VERSION} + +/* The size of `int', as computed by sizeof. */ +#cmakedefine SIZEOF_INT ${SIZEOF_INT} + +/* The size of `long', as computed by sizeof. */ +#cmakedefine SIZEOF_LONG ${SIZEOF_LONG} + +/* The size of `long long', as computed by sizeof. */ +#cmakedefine SIZEOF_LONG_LONG ${SIZEOF_LONG_LONG} + +/* The size of `void*', as computed by sizeof. */ +#cmakedefine SIZEOF_VOIDP ${SIZEOF_VOIDP} + +/* Define if enable CR+NL as line terminator */ +#cmakedefine USE_CRNL_AS_LINE_TERMINATOR ${USE_CRNL_AS_LINE_TERMINATOR} + +/* Version number of package */ +#cmakedefine VERSION ${VERSION} diff --git a/internal/components/third_party/oniguruma/src/config.h.win32 b/internal/components/third_party/oniguruma/src/config.h.win32 new file mode 100644 index 0000000000..82a35b933e --- /dev/null +++ b/internal/components/third_party/oniguruma/src/config.h.win32 @@ -0,0 +1,56 @@ +#if defined(__MINGW32__) || _MSC_VER >= 1600 +#define HAVE_STDINT_H 1 +#endif +#if defined(__MINGW32__) || _MSC_VER >= 1800 +#define HAVE_INTTYPES_H 1 +#endif +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_OFF_T 1 +#define SIZEOF_INT 4 +#define SIZEOF_LONG 4 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF___INT64 8 +#define SIZEOF_OFF_T 4 +#define SIZEOF_VOIDP 4 +#define SIZEOF_FLOAT 4 +#define SIZEOF_DOUBLE 8 +#define SIZEOF_SIZE_T 4 +#define TOKEN_PASTE(x,y) x##y +#ifndef NORETURN +#if _MSC_VER > 1100 +#define NORETURN(x) __declspec(noreturn) x +#else +#define NORETURN(x) x +#endif +#endif +#define HAVE_DECL_SYS_NERR 1 +#define HAVE_FCNTL_H 1 +#define HAVE_SYS_UTIME_H 1 +#define HAVE_MEMORY_H 1 +#define uid_t int +#define gid_t int +#define GETGROUPS_T int +#define HAVE_ALLOCA 1 +#define HAVE_DUP2 1 +#define HAVE_MKDIR 1 +#define HAVE_FLOCK 1 +#define HAVE_FINITE 1 +#define HAVE_HYPOT 1 +#define HAVE_WAITPID 1 +#define HAVE_CHSIZE 1 +#define HAVE_TIMES 1 +#define HAVE_TELLDIR 1 +#define HAVE_SEEKDIR 1 +#define HAVE_EXECVE 1 +#define HAVE_DAYLIGHT 1 +#define SETPGRP_VOID 1 +#define inline __inline +#define NEED_IO_SEEK_BETWEEN_RW 1 +#define RSHIFT(x,y) ((x)>>(int)y) +#define FILE_COUNT _cnt +#define FILE_READPTR _ptr +#define DEFAULT_KCODE KCODE_NONE +#define DLEXT ".so" +#define DLEXT2 ".dll" diff --git a/internal/components/third_party/oniguruma/src/config.h.win64 b/internal/components/third_party/oniguruma/src/config.h.win64 new file mode 100644 index 0000000000..7f19699345 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/config.h.win64 @@ -0,0 +1,56 @@ +#if defined(__MINGW32__) || _MSC_VER >= 1600 +#define HAVE_STDINT_H 1 +#endif +#if defined(__MINGW32__) || _MSC_VER >= 1800 +#define HAVE_INTTYPES_H 1 +#endif +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_OFF_T 1 +#define SIZEOF_INT 4 +#define SIZEOF_LONG 4 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF___INT64 8 +#define SIZEOF_OFF_T 4 +#define SIZEOF_VOIDP 8 +#define SIZEOF_FLOAT 4 +#define SIZEOF_DOUBLE 8 +#define SIZEOF_SIZE_T 8 +#define TOKEN_PASTE(x,y) x##y +#ifndef NORETURN +#if _MSC_VER > 1100 +#define NORETURN(x) __declspec(noreturn) x +#else +#define NORETURN(x) x +#endif +#endif +#define HAVE_DECL_SYS_NERR 1 +#define HAVE_FCNTL_H 1 +#define HAVE_SYS_UTIME_H 1 +#define HAVE_MEMORY_H 1 +#define uid_t int +#define gid_t int +#define GETGROUPS_T int +#define HAVE_ALLOCA 1 +#define HAVE_DUP2 1 +#define HAVE_MKDIR 1 +#define HAVE_FLOCK 1 +#define HAVE_FINITE 1 +#define HAVE_HYPOT 1 +#define HAVE_WAITPID 1 +#define HAVE_CHSIZE 1 +#define HAVE_TIMES 1 +#define HAVE_TELLDIR 1 +#define HAVE_SEEKDIR 1 +#define HAVE_EXECVE 1 +#define HAVE_DAYLIGHT 1 +#define SETPGRP_VOID 1 +#define inline __inline +#define NEED_IO_SEEK_BETWEEN_RW 1 +#define RSHIFT(x,y) ((x)>>(int)y) +#define FILE_COUNT _cnt +#define FILE_READPTR _ptr +#define DEFAULT_KCODE KCODE_NONE +#define DLEXT ".so" +#define DLEXT2 ".dll" diff --git a/internal/components/third_party/oniguruma/src/config.h.windows.in b/internal/components/third_party/oniguruma/src/config.h.windows.in new file mode 100644 index 0000000000..d4f73d7619 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/config.h.windows.in @@ -0,0 +1,62 @@ +#if defined(__MINGW32__) || _MSC_VER >= 1600 +#define HAVE_STDINT_H 1 +#endif +#if defined(__MINGW32__) || _MSC_VER >= 1800 +#define HAVE_INTTYPES_H 1 +#endif +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_OFF_T 1 + +#define SIZEOF_INT 4 +#define SIZEOF_LONG 4 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF___INT64 8 +#define SIZEOF_OFF_T 4 +#ifdef _WIN64 +#define SIZEOF_VOIDP 8 +#define SIZEOF_SIZE_T 8 +#else +#define SIZEOF_VOIDP 4 +#define SIZEOF_SIZE_T 4 +#endif +#define SIZEOF_FLOAT 4 +#define SIZEOF_DOUBLE 8 +#define TOKEN_PASTE(x,y) x##y +#ifndef NORETURN +#if _MSC_VER > 1100 +#define NORETURN(x) __declspec(noreturn) x +#else +#define NORETURN(x) x +#endif +#endif +#define HAVE_DECL_SYS_NERR 1 +#define HAVE_FCNTL_H 1 +#define HAVE_SYS_UTIME_H 1 +#define HAVE_MEMORY_H 1 +#define uid_t int +#define gid_t int +#define GETGROUPS_T int +#define HAVE_ALLOCA 1 +#define HAVE_DUP2 1 +#define HAVE_MKDIR 1 +#define HAVE_FLOCK 1 +#define HAVE_FINITE 1 +#define HAVE_HYPOT 1 +#define HAVE_WAITPID 1 +#define HAVE_CHSIZE 1 +#define HAVE_TIMES 1 +#define HAVE_TELLDIR 1 +#define HAVE_SEEKDIR 1 +#define HAVE_EXECVE 1 +#define HAVE_DAYLIGHT 1 +#define SETPGRP_VOID 1 +#define inline __inline +#define NEED_IO_SEEK_BETWEEN_RW 1 +#define RSHIFT(x,y) ((x)>>(int)y) +#define FILE_COUNT _cnt +#define FILE_READPTR _ptr +#define DEFAULT_KCODE KCODE_NONE +#define DLEXT ".so" +#define DLEXT2 ".dll" diff --git a/internal/components/third_party/oniguruma/src/config_windows.h b/internal/components/third_party/oniguruma/src/config_windows.h new file mode 100644 index 0000000000..d4f73d7619 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/config_windows.h @@ -0,0 +1,62 @@ +#if defined(__MINGW32__) || _MSC_VER >= 1600 +#define HAVE_STDINT_H 1 +#endif +#if defined(__MINGW32__) || _MSC_VER >= 1800 +#define HAVE_INTTYPES_H 1 +#endif +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_OFF_T 1 + +#define SIZEOF_INT 4 +#define SIZEOF_LONG 4 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF___INT64 8 +#define SIZEOF_OFF_T 4 +#ifdef _WIN64 +#define SIZEOF_VOIDP 8 +#define SIZEOF_SIZE_T 8 +#else +#define SIZEOF_VOIDP 4 +#define SIZEOF_SIZE_T 4 +#endif +#define SIZEOF_FLOAT 4 +#define SIZEOF_DOUBLE 8 +#define TOKEN_PASTE(x,y) x##y +#ifndef NORETURN +#if _MSC_VER > 1100 +#define NORETURN(x) __declspec(noreturn) x +#else +#define NORETURN(x) x +#endif +#endif +#define HAVE_DECL_SYS_NERR 1 +#define HAVE_FCNTL_H 1 +#define HAVE_SYS_UTIME_H 1 +#define HAVE_MEMORY_H 1 +#define uid_t int +#define gid_t int +#define GETGROUPS_T int +#define HAVE_ALLOCA 1 +#define HAVE_DUP2 1 +#define HAVE_MKDIR 1 +#define HAVE_FLOCK 1 +#define HAVE_FINITE 1 +#define HAVE_HYPOT 1 +#define HAVE_WAITPID 1 +#define HAVE_CHSIZE 1 +#define HAVE_TIMES 1 +#define HAVE_TELLDIR 1 +#define HAVE_SEEKDIR 1 +#define HAVE_EXECVE 1 +#define HAVE_DAYLIGHT 1 +#define SETPGRP_VOID 1 +#define inline __inline +#define NEED_IO_SEEK_BETWEEN_RW 1 +#define RSHIFT(x,y) ((x)>>(int)y) +#define FILE_COUNT _cnt +#define FILE_READPTR _ptr +#define DEFAULT_KCODE KCODE_NONE +#define DLEXT ".so" +#define DLEXT2 ".dll" diff --git a/internal/components/third_party/oniguruma/src/cp1251.c b/internal/components/third_party/oniguruma/src/cp1251.c new file mode 100644 index 0000000000..36b36f66a9 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/cp1251.c @@ -0,0 +1,209 @@ +/********************************************************************** + cp1251.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2006-2020 Byte + * K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_CP1251_TO_LOWER_CASE(c) EncCP1251_ToLowerCaseTable[c] +#define ENC_IS_CP1251_CTYPE(code,ctype) \ + ((EncCP1251_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const UChar EncCP1251_ToLowerCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\220', '\203', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\232', '\213', '\234', '\235', '\236', '\237', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\242', '\242', '\274', '\244', '\264', '\246', '\247', + '\270', '\251', '\272', '\253', '\254', '\255', '\256', '\277', + '\260', '\261', '\263', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\276', '\276', '\277', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' +}; + +static const unsigned short EncCP1251_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x428c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x34a2, 0x34a2, 0x01a0, 0x30e2, 0x01a0, 0x01a0, 0x01a0, 0x01a0, + 0x0000, 0x01a0, 0x34a2, 0x01a0, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x30e2, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, + 0x0008, 0x0000, 0x30e2, 0x01a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x0280, 0x34a2, 0x30e2, 0x34a2, 0x01a0, 0x34a2, 0x01a0, 0x01a0, + 0x34a2, 0x01a0, 0x34a2, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x34a2, + 0x01a0, 0x01a0, 0x34a2, 0x30e2, 0x30e2, 0x31e2, 0x01a0, 0x01a0, + 0x30e2, 0x0000, 0x30e2, 0x01a0, 0x30e2, 0x34a2, 0x30e2, 0x30e2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2 +}; + +static int +cp1251_mbc_case_fold(OnigCaseFoldType flag, + const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) +{ + const UChar* p = *pp; + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p)) + *lower = ENC_CP1251_TO_LOWER_CASE(*p); + else + *lower = *p; + + (*pp)++; + return 1; +} + +static int +cp1251_is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_CP1251_CTYPE(code, ctype); + else + return FALSE; +} + +static const OnigPairCaseFoldCodes CaseFoldMap[] = { + { 0xb8, 0xa8 }, + + { 0xe0, 0xc0 }, + { 0xe1, 0xc1 }, + { 0xe2, 0xc2 }, + { 0xe3, 0xc3 }, + { 0xe4, 0xc4 }, + { 0xe5, 0xc5 }, + { 0xe6, 0xc6 }, + { 0xe7, 0xc7 }, + { 0xe8, 0xc8 }, + { 0xe9, 0xc9 }, + { 0xea, 0xca }, + { 0xeb, 0xcb }, + { 0xec, 0xcc }, + { 0xed, 0xcd }, + { 0xee, 0xce }, + { 0xef, 0xcf }, + + { 0xf0, 0xd0 }, + { 0xf1, 0xd1 }, + { 0xf2, 0xd2 }, + { 0xf3, 0xd3 }, + { 0xf4, 0xd4 }, + { 0xf5, 0xd5 }, + { 0xf6, 0xd6 }, + { 0xf7, 0xd7 }, + { 0xf8, 0xd8 }, + { 0xf9, 0xd9 }, + { 0xfa, 0xda }, + { 0xfb, 0xdb }, + { 0xfc, 0xdc }, + { 0xfd, 0xdd }, + { 0xfe, 0xde }, + { 0xff, 0xdf } +}; + +static int +cp1251_apply_all_case_fold(OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + return onigenc_apply_all_case_fold_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, + flag, f, arg); +} + +static int +cp1251_get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_get_case_fold_codes_by_str_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingCP1251 = { + onigenc_single_byte_mbc_enc_len, + "CP1251", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + cp1251_mbc_case_fold, + cp1251_apply_all_case_fold, + cp1251_get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + cp1251_is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/euc_jp.c b/internal/components/third_party/oniguruma/src/euc_jp.c new file mode 100644 index 0000000000..bfe91bf27e --- /dev/null +++ b/internal/components/third_party/oniguruma/src/euc_jp.c @@ -0,0 +1,308 @@ +/********************************************************************** + euc_jp.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regint.h" + +#define eucjp_islead(c) ((UChar )((c) - 0xa1) > 0xfe - 0xa1) + +static const int EncLen_EUCJP[] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 +}; + +static int +mbc_enc_len(const UChar* p) +{ + return EncLen_EUCJP[*p]; +} + +static int +is_valid_mbc_string(const UChar* p, const UChar* end) +{ + while (p < end) { + if (*p < 0x80) { + p++; + } + else if (*p > 0xa0) { + if (*p == 0xff) return FALSE; + p++; + if (p >= end) return FALSE; + if (*p < 0xa1 || *p == 0xff) return FALSE; + p++; + } + else if (*p == 0x8e) { + p++; + if (p >= end) return FALSE; + if (*p < 0xa1 || *p > 0xdf) return FALSE; + p++; + } + else if (*p == 0x8f) { + p++; + if (p >= end) return FALSE; + if (*p < 0xa1 || *p == 0xff) return FALSE; + p++; + if (p >= end) return FALSE; + if (*p < 0xa1 || *p == 0xff) return FALSE; + p++; + } + else + return FALSE; + } + + return TRUE; +} + +static OnigCodePoint +mbc_to_code(const UChar* p, const UChar* end) +{ + int c, i, len; + OnigCodePoint n; + + len = enclen(ONIG_ENCODING_EUC_JP, p); + n = (OnigCodePoint )*p++; + if (len == 1) return n; + + for (i = 1; i < len; i++) { + if (p >= end) break; + c = *p++; + n <<= 8; n += c; + } + return n; +} + +static int +code_to_mbclen(OnigCodePoint code) +{ + if (ONIGENC_IS_CODE_ASCII(code)) return 1; + else if ((code & 0xff0000) != 0) { + if (EncLen_EUCJP[(int )(code >> 16) & 0xff] == 3) + return 3; + } + else if ((code & 0xff00) != 0) { + if (EncLen_EUCJP[(int )(code >> 8) & 0xff] == 2) + return 2; + } + else if (code < 256) { + if (EncLen_EUCJP[(int )(code & 0xff)] == 1) + return 1; + } + + return ONIGERR_INVALID_CODE_POINT_VALUE; +} + +static int +code_to_mbc(OnigCodePoint code, UChar *buf) +{ + UChar *p = buf; + + if ((code & 0xff0000) != 0) { + *p++ = (UChar )(((code >> 16) & 0xff)); + *p++ = (UChar )(((code >> 8) & 0xff)); + } + else if ((code & 0xff00) != 0) + *p++ = (UChar )(((code >> 8) & 0xff)); + + *p++ = (UChar )(code & 0xff); + +#if 1 + if (enclen(ONIG_ENCODING_EUC_JP, buf) != (p - buf)) + return ONIGERR_INVALID_CODE_POINT_VALUE; +#endif + return (int )(p - buf); +} + +static int +mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED, + const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) +{ + int len; + const UChar* p = *pp; + + if (ONIGENC_IS_MBC_ASCII(p)) { + *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); + (*pp)++; + return 1; + } + else { + int i; + + len = enclen(ONIG_ENCODING_EUC_JP, p); + for (i = 0; i < len; i++) { + *lower++ = *p++; + } + (*pp) += len; + return len; /* return byte length of converted char to lower */ + } +} + +static UChar* +left_adjust_char_head(const UChar* start, const UChar* s) +{ + /* In this encoding + mb-trail bytes doesn't mix with single bytes. + */ + const UChar *p; + int len; + + if (s <= start) return (UChar* )s; + p = s; + + while (!eucjp_islead(*p) && p > start) p--; + len = enclen(ONIG_ENCODING_EUC_JP, p); + if (p + len > s) return (UChar* )p; + p += len; + return (UChar* )(p + ((s - p) & ~1)); +} + +static int +is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED) +{ + const UChar c = *s; + if (c <= 0x7e || c == 0x8e || c == 0x8f) + return TRUE; + else + return FALSE; +} + + +static const OnigCodePoint CR_Hiragana[] = { + 1, + 0xa4a1, 0xa4f3 +}; /* CR_Hiragana */ + +static const OnigCodePoint CR_Katakana[] = { + 3, + 0xa5a1, 0xa5f6, + 0xaaa6, 0xaaaf, + 0xaab1, 0xaadd +}; /* CR_Katakana */ + +static const OnigCodePoint* PropertyList[] = { + CR_Hiragana, + CR_Katakana +}; + +static int +property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end) +{ + struct PropertyNameCtype* pc; + int len = (int )(end - p); + char q[32]; + + if (len < sizeof(q) - 1) { + xmemcpy(q, p, (size_t )len); + q[len] = '\0'; + pc = onigenc_euc_jp_lookup_property_name(q, len); + if (pc != 0) + return pc->ctype; + } + + return ONIGERR_INVALID_CHAR_PROPERTY_NAME; +} + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (ctype <= ONIGENC_MAX_STD_CTYPE) { + if (code < 128) + return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype); + else { + if (CTYPE_IS_WORD_GRAPH_PRINT(ctype)) { + return (code_to_mbclen(code) > 1 ? TRUE : FALSE); + } + } + } + else { + ctype -= (ONIGENC_MAX_STD_CTYPE + 1); + if (ctype >= (unsigned int )(sizeof(PropertyList)/sizeof(PropertyList[0]))) + return ONIGERR_TYPE_BUG; + + return onig_is_in_code_range((UChar* )PropertyList[ctype], code); + } + + return FALSE; +} + +static int +get_ctype_code_range(OnigCtype ctype, OnigCodePoint* sb_out, + const OnigCodePoint* ranges[]) +{ + if (ctype <= ONIGENC_MAX_STD_CTYPE) { + return ONIG_NO_SUPPORT_CONFIG; + } + else { + *sb_out = 0x80; + + ctype -= (ONIGENC_MAX_STD_CTYPE + 1); + if (ctype >= (OnigCtype )sizeof(PropertyList)/sizeof(PropertyList[0])) + return ONIGERR_TYPE_BUG; + + *ranges = PropertyList[ctype]; + return 0; + } +} + + +OnigEncodingType OnigEncodingEUC_JP = { + mbc_enc_len, + "EUC-JP", /* name */ + 3, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + mbc_to_code, + code_to_mbclen, + code_to_mbc, + mbc_case_fold, + onigenc_ascii_apply_all_case_fold, + onigenc_ascii_get_case_fold_codes_by_str, + property_name_to_ctype, + is_code_ctype, + get_ctype_code_range, + left_adjust_char_head, + is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1_OR_0, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/euc_jp_prop.c b/internal/components/third_party/oniguruma/src/euc_jp_prop.c new file mode 100644 index 0000000000..cb884c4a7f --- /dev/null +++ b/internal/components/third_party/oniguruma/src/euc_jp_prop.c @@ -0,0 +1,151 @@ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: gperf -pt -T -L ANSI-C -N onigenc_euc_jp_lookup_property_name --output-file gperf1.tmp euc_jp_prop.gperf */ +/* Computed positions: -k'1,3' */ + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +#error "gperf generated tables don't work with this execution character set. Please report a bug to ." +#endif + +#line 1 "euc_jp_prop.gperf" + +#include "regint.h" + +#define TOTAL_KEYWORDS 16 +#define MIN_WORD_LENGTH 4 +#define MAX_WORD_LENGTH 8 +#define MIN_HASH_VALUE 4 +#define MAX_HASH_VALUE 55 +/* maximum key range = 52, duplicates = 0 */ + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static unsigned int +hash (register const char *str, register size_t len) +{ + static unsigned char asso_values[] = + { + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 0, 3, 10, 25, 56, + 56, 30, 0, 56, 56, 0, 20, 56, 56, 56, + 15, 56, 56, 20, 56, 30, 56, 0, 0, 56, + 56, 56, 56, 56, 56, 56, 56, 15, 56, 56, + 56, 56, 56, 25, 56, 10, 56, 56, 56, 56, + 5, 56, 0, 56, 0, 56, 5, 56, 56, 20, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56 + }; + return (unsigned int )len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]]; +} + +struct PropertyNameCtype * +onigenc_euc_jp_lookup_property_name (register const char *str, register size_t len) +{ + static struct PropertyNameCtype wordlist[] = + { + {""}, {""}, {""}, {""}, +#line 22 "euc_jp_prop.gperf" + {"Word", 12}, +#line 11 "euc_jp_prop.gperf" + {"Alpha", 1}, + {""}, {""}, +#line 25 "euc_jp_prop.gperf" + {"Hiragana", 15}, + {""}, +#line 23 "euc_jp_prop.gperf" + {"Alnum", 13}, + {""}, {""}, +#line 26 "euc_jp_prop.gperf" + {"Katakana", 16}, + {""}, +#line 24 "euc_jp_prop.gperf" + {"ASCII", 14}, +#line 21 "euc_jp_prop.gperf" + {"XDigit", 11}, + {""}, {""}, {""}, +#line 13 "euc_jp_prop.gperf" + {"Cntrl", 3}, + {""}, {""}, +#line 12 "euc_jp_prop.gperf" + {"Blank", 2}, + {""}, +#line 18 "euc_jp_prop.gperf" + {"Punct", 8}, + {""}, {""}, {""}, {""}, +#line 17 "euc_jp_prop.gperf" + {"Print", 7}, + {""}, {""}, {""}, {""}, +#line 20 "euc_jp_prop.gperf" + {"Upper", 10}, + {""}, {""}, {""}, {""}, +#line 19 "euc_jp_prop.gperf" + {"Space", 9}, + {""}, {""}, {""}, {""}, +#line 16 "euc_jp_prop.gperf" + {"Lower", 6}, + {""}, {""}, {""}, {""}, +#line 15 "euc_jp_prop.gperf" + {"Graph", 5}, + {""}, {""}, {""}, {""}, +#line 14 "euc_jp_prop.gperf" + {"Digit", 4} + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + register unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE) + { + register const char *s = wordlist[key].name; + + if (*str == *s && !strcmp (str + 1, s + 1)) + return &wordlist[key]; + } + } + return 0; +} diff --git a/internal/components/third_party/oniguruma/src/euc_jp_prop.gperf b/internal/components/third_party/oniguruma/src/euc_jp_prop.gperf new file mode 100644 index 0000000000..842b61b65d --- /dev/null +++ b/internal/components/third_party/oniguruma/src/euc_jp_prop.gperf @@ -0,0 +1,26 @@ +%{ +#include "regint.h" +%} + +struct PropertyNameCtype { + char *name; + int ctype; +}; + +%% +Alpha, 1 +Blank, 2 +Cntrl, 3 +Digit, 4 +Graph, 5 +Lower, 6 +Print, 7 +Punct, 8 +Space, 9 +Upper, 10 +XDigit, 11 +Word, 12 +Alnum, 13 +ASCII, 14 +Hiragana, 15 +Katakana, 16 diff --git a/internal/components/third_party/oniguruma/src/euc_kr.c b/internal/components/third_party/oniguruma/src/euc_kr.c new file mode 100644 index 0000000000..b0e9fbff2b --- /dev/null +++ b/internal/components/third_party/oniguruma/src/euc_kr.c @@ -0,0 +1,200 @@ +/********************************************************************** + euc_kr.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +static const int EncLen_EUCKR[] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 +}; + +static int +euckr_mbc_enc_len(const UChar* p) +{ + return EncLen_EUCKR[*p]; +} + +static int +euckr_code_to_mbclen(OnigCodePoint code) +{ + if ((code & (~0xffff)) != 0) return ONIGERR_INVALID_CODE_POINT_VALUE; + + if ((code & 0xff00) != 0) { + if (EncLen_EUCKR[(int )(code >> 8) & 0xff] == 2) + return 2; + } + else { + if (EncLen_EUCKR[(int )(code & 0xff)] == 1) + return 1; + } + + return ONIGERR_INVALID_CODE_POINT_VALUE; +} + +static int +is_valid_mbc_string(const UChar* p, const UChar* end) +{ + while (p < end) { + if (*p < 0x80) { + p++; + } + else if (*p < 0xa1) { + return FALSE; + } + else if (*p < 0xff) { + p++; + if (p >= end) return FALSE; + if (*p < 0xa1 || *p == 0xff) + return FALSE; + p++; + } + else + return FALSE; + } + + return TRUE; +} + +static OnigCodePoint +euckr_mbc_to_code(const UChar* p, const UChar* end) +{ + return onigenc_mbn_mbc_to_code(ONIG_ENCODING_EUC_KR, p, end); +} + +static int +euckr_code_to_mbc(OnigCodePoint code, UChar *buf) +{ + return onigenc_mb2_code_to_mbc(ONIG_ENCODING_EUC_KR, code, buf); +} + +static int +euckr_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end, + UChar* lower) +{ + return onigenc_mbn_mbc_case_fold(ONIG_ENCODING_EUC_KR, flag, + pp, end, lower); +} + +static int +euckr_is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + return onigenc_mb2_is_code_ctype(ONIG_ENCODING_EUC_KR, code, ctype); +} + +#define euckr_islead(c) ((c) < 0xa1 || (c) == 0xff) + +static UChar* +euckr_left_adjust_char_head(const UChar* start, const UChar* s) +{ + /* Assumed in this encoding, + mb-trail bytes don't mix with single bytes. + */ + const UChar *p; + int len; + + if (s <= start) return (UChar* )s; + p = s; + + while (!euckr_islead(*p) && p > start) p--; + len = enclen(ONIG_ENCODING_EUC_KR, p); + if (p + len > s) return (UChar* )p; + p += len; + return (UChar* )(p + ((s - p) & ~1)); +} + +static int +euckr_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED) +{ + const UChar c = *s; + if (c <= 0x7e) return TRUE; + else return FALSE; +} + +OnigEncodingType OnigEncodingEUC_KR = { + euckr_mbc_enc_len, + "EUC-KR", /* name */ + 2, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + euckr_mbc_to_code, + euckr_code_to_mbclen, + euckr_code_to_mbc, + euckr_mbc_case_fold, + onigenc_ascii_apply_all_case_fold, + onigenc_ascii_get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + euckr_is_code_ctype, + onigenc_not_support_get_ctype_code_range, + euckr_left_adjust_char_head, + euckr_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1_OR_0, + 0, 0 +}; + +/* Same with OnigEncodingEUC_KR except the name */ +OnigEncodingType OnigEncodingEUC_CN = { + euckr_mbc_enc_len, + "EUC-CN", /* name */ + 2, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + euckr_mbc_to_code, + euckr_code_to_mbclen, + euckr_code_to_mbc, + euckr_mbc_case_fold, + onigenc_ascii_apply_all_case_fold, + onigenc_ascii_get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + euckr_is_code_ctype, + onigenc_not_support_get_ctype_code_range, + euckr_left_adjust_char_head, + euckr_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1_OR_0, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/euc_tw.c b/internal/components/third_party/oniguruma/src/euc_tw.c new file mode 100644 index 0000000000..99dc5eca62 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/euc_tw.c @@ -0,0 +1,194 @@ +/********************************************************************** + euc_tw.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +static const int EncLen_EUCTW[] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 +}; + +static int +euctw_mbc_enc_len(const UChar* p) +{ + return EncLen_EUCTW[*p]; +} + +static int +euctw_code_to_mbclen(OnigCodePoint code) +{ + if ((code & 0xff000000) != 0) { + if (EncLen_EUCTW[(int )(code >> 24) & 0xff] == 4) + return 4; + } + else if ((code & 0xff0000) != 0) + return ONIGERR_INVALID_CODE_POINT_VALUE; + else if ((code & 0xff00) != 0) { + if (EncLen_EUCTW[(int )(code >> 8) & 0xff] == 2) + return 2; + } + else { + if (EncLen_EUCTW[(int )(code & 0xff)] == 1) + return 1; + } + + return ONIGERR_INVALID_CODE_POINT_VALUE; +} + +static int +is_valid_mbc_string(const UChar* p, const UChar* end) +{ + while (p < end) { + if (*p < 0x80) { + p++; + } + else if (*p < 0xa1) { + if (*p == 0x8e) { + p++; + if (p >= end) return FALSE; + if (*p < 0xa1 || *p > 0xb0) return FALSE; + p++; + if (p >= end) return FALSE; + if (*p < 0xa1 || *p == 0xff) + return FALSE; + p++; + if (p >= end) return FALSE; + if (*p < 0xa1 || *p == 0xff) + return FALSE; + p++; + } + else + return FALSE; + } + else if (*p < 0xff) { + p++; + if (p >= end) return FALSE; + if (*p < 0xa1 || *p == 0xff) + return FALSE; + p++; + } + else + return FALSE; + } + + return TRUE; +} + +static OnigCodePoint +euctw_mbc_to_code(const UChar* p, const UChar* end) +{ + return onigenc_mbn_mbc_to_code(ONIG_ENCODING_EUC_TW, p, end); +} + +static int +euctw_code_to_mbc(OnigCodePoint code, UChar *buf) +{ + return onigenc_mb4_code_to_mbc(ONIG_ENCODING_EUC_TW, code, buf); +} + +static int +euctw_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end, + UChar* lower) +{ + return onigenc_mbn_mbc_case_fold(ONIG_ENCODING_EUC_TW, flag, + pp, end, lower); +} + +static int +euctw_is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + return onigenc_mb4_is_code_ctype(ONIG_ENCODING_EUC_TW, code, ctype); +} + +#define euctw_islead(c) ((UChar )((c) - 0xa1) > 0xfe - 0xa1) + +static UChar* +euctw_left_adjust_char_head(const UChar* start, const UChar* s) +{ + /* Assumed in this encoding, + mb-trail bytes don't mix with single bytes. + */ + const UChar *p; + int len; + + if (s <= start) return (UChar* )s; + p = s; + + while (!euctw_islead(*p) && p > start) p--; + len = enclen(ONIG_ENCODING_EUC_TW, p); + if (p + len > s) return (UChar* )p; + p += len; + return (UChar* )(p + ((s - p) & ~1)); +} + +static int +euctw_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED) +{ + const UChar c = *s; + if (c <= 0x7e) return TRUE; + else return FALSE; +} + +OnigEncodingType OnigEncodingEUC_TW = { + euctw_mbc_enc_len, + "EUC-TW", /* name */ + 4, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + euctw_mbc_to_code, + euctw_code_to_mbclen, + euctw_code_to_mbc, + euctw_mbc_case_fold, + onigenc_ascii_apply_all_case_fold, + onigenc_ascii_get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + euctw_is_code_ctype, + onigenc_not_support_get_ctype_code_range, + euctw_left_adjust_char_head, + euctw_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/gb18030.c b/internal/components/third_party/oniguruma/src/gb18030.c new file mode 100644 index 0000000000..3dcfca6573 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/gb18030.c @@ -0,0 +1,596 @@ +/********************************************************************** + gb18030.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2005-2023 KUBO Takehiro + * K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +/* #define DEBUG_GB18030 */ + +#ifndef DEBUG_GB18030 + +#define DEBUG_OUT(arg) + +#else + +#ifndef NEED_TO_INCLUDE_STDIO +#define NEED_TO_INCLUDE_STDIO +#endif + +/* for printf() */ +#include "regint.h" + +#define DEBUG_OUT(arg) printf arg + +#endif + +enum { + C1, /* one-byte char */ + C2, /* one-byte or second of two-byte char */ + C4, /* one-byte or second or fourth of four-byte char */ + CM /* first of two- or four-byte char or second of two-byte char */ +}; + +static const char GB18030_MAP[] = { + C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, + C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, + C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, + C4, C4, C4, C4, C4, C4, C4, C4, C4, C4, C1, C1, C1, C1, C1, C1, + C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, + C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, + C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, + C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C1, + C2, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, + CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, + CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, + CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, + CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, + CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, + CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, + CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, C1 +}; + +static int +gb18030_mbc_enc_len(const UChar* p) +{ + if (GB18030_MAP[*p] != CM) + return 1; + + p++; + if (GB18030_MAP[*p] == C4) + return 4; + + return 2; +} + +static int +gb18030_code_to_mbclen(OnigCodePoint code) +{ + if ((code & 0xff000000) != 0) { + if (GB18030_MAP[(int )(code >> 24) & 0xff] == CM) + if (GB18030_MAP[(int )(code >> 16) & 0xff] == C4) + return 4; + } + else if ((code & 0xff0000) != 0) return ONIGERR_INVALID_CODE_POINT_VALUE; + else if ((code & 0xff00) != 0) { + if (GB18030_MAP[(int )(code >> 8) & 0xff] == CM) { + char c = GB18030_MAP[(int )code & 0xff]; + if (c == CM || c == C2) + return 2; + } + } + else { + if (GB18030_MAP[(int )(code & 0xff)] != CM) + return 1; + } + + return ONIGERR_INVALID_CODE_POINT_VALUE; +} + +static int +is_valid_mbc_string(const UChar* p, const UChar* end) +{ + while (p < end) { + if (*p < 0x80) { + p++; + } + else if (*p == 0x80 || *p == 0xff) { + return FALSE; + } + else { + p++; + if (p >= end) return FALSE; + if (*p < 0x40) { + if (*p < 0x30 || *p > 0x39) + return FALSE; + + p++; + if (p >= end) return FALSE; + if (*p < 0x81 || *p == 0xff) return FALSE; + + p++; + if (p >= end) return FALSE; + if (*p < 0x30 || *p > 0x39) + return FALSE; + + p++; + } + else if (*p == 0x7f || *p == 0xff) { + return FALSE; + } + else { + p++; + } + } + } + + return TRUE; +} + +static OnigCodePoint +gb18030_mbc_to_code(const UChar* p, const UChar* end) +{ + return onigenc_mbn_mbc_to_code(ONIG_ENCODING_GB18030, p, end); +} + +static int +gb18030_code_to_mbc(OnigCodePoint code, UChar *buf) +{ + return onigenc_mb4_code_to_mbc(ONIG_ENCODING_GB18030, code, buf); +} + +static int +gb18030_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end, + UChar* lower) +{ + return onigenc_mbn_mbc_case_fold(ONIG_ENCODING_GB18030, flag, + pp, end, lower); +} + +static int +gb18030_is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + return onigenc_mb4_is_code_ctype(ONIG_ENCODING_GB18030, code, ctype); +} + +enum state { + S_START = 0, + S_one_C2, + S_one_C4, + S_one_CM, + + S_odd_CM_one_CX, + S_even_CM_one_CX, + + /* CMC4 : pair of "CM C4" */ + S_one_CMC4, + S_odd_CMC4, + S_one_C4_odd_CMC4, + S_even_CMC4, + S_one_C4_even_CMC4, + + S_odd_CM_odd_CMC4, + S_even_CM_odd_CMC4, + + S_odd_CM_even_CMC4, + S_even_CM_even_CMC4, + + /* C4CM : pair of "C4 CM" */ + S_odd_C4CM, + S_one_CM_odd_C4CM, + S_even_C4CM, + S_one_CM_even_C4CM, + + S_even_CM_odd_C4CM, + S_odd_CM_odd_C4CM, + S_even_CM_even_C4CM, + S_odd_CM_even_C4CM, +}; + +#ifdef DEBUG_GB18030 +static char* StateNames[] = { + "S_START", + "S_one_C2", + "S_one_C4", + "S_one_CM", + "S_odd_CM_one_CX", + "S_even_CM_one_CX", + "S_one_CMC4", + "S_odd_CMC4", + "S_one_C4_odd_CMC4", + "S_even_CMC4", + "S_one_C4_even_CMC4", + "S_odd_CM_odd_CMC4", + "S_even_CM_odd_CMC4", + "S_odd_CM_even_CMC4", + "S_even_CM_even_CMC4", + "S_odd_C4CM", + "S_one_CM_odd_C4CM", + "S_even_C4CM", + "S_one_CM_even_C4CM", + "S_even_CM_odd_C4CM", + "S_odd_CM_odd_C4CM", + "S_even_CM_even_C4CM", + "S_odd_CM_even_C4CM" +}; +#endif + +static UChar* +gb18030_left_adjust_char_head(const UChar* start, const UChar* s) +{ + const UChar *p; + enum state state = S_START; + + DEBUG_OUT(("----------------\n")); + for (p = s; p >= start; p--) { + DEBUG_OUT(("%5d: state %-19s (0x%02x)->\n", (int )(p - start), StateNames[state], *p)); + switch (state) { + case S_START: + switch (GB18030_MAP[*p]) { + case C1: + return (UChar *)s; + case C2: + state = S_one_C2; /* C2 */ + break; + case C4: + state = S_one_C4; /* C4 */ + break; + case CM: + state = S_one_CM; /* CM */ + break; + } + break; + case S_one_C2: /* C2 */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + case C4: + return (UChar *)s; + case CM: + state = S_odd_CM_one_CX; /* CM C2 */ + break; + } + break; + case S_one_C4: /* C4 */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + case C4: + return (UChar *)s; + case CM: + state = S_one_CMC4; + break; + } + break; + case S_one_CM: /* CM */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + return (UChar *)s; + case C4: + state = S_odd_C4CM; + break; + case CM: + state = S_odd_CM_one_CX; /* CM CM */ + break; + } + break; + + case S_odd_CM_one_CX: /* CM C2 */ /* CM CM */ /* CM CM CM C4 */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + case C4: + return (UChar *)(s - 1); + case CM: + state = S_even_CM_one_CX; + break; + } + break; + case S_even_CM_one_CX: /* CM CM C2 */ /* CM CM CM */ /* CM CM C4 */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + case C4: + return (UChar *)s; + case CM: + state = S_odd_CM_one_CX; + break; + } + break; + + case S_one_CMC4: /* CM C4 */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + return (UChar *)(s - 1); + case C4: + state = S_one_C4_odd_CMC4; /* C4 CM C4 */ + break; + case CM: + state = S_even_CM_one_CX; /* CM CM C4 */ + break; + } + break; + case S_odd_CMC4: /* CM C4 CM C4 CM C4 */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + return (UChar *)(s - 1); + case C4: + state = S_one_C4_odd_CMC4; + break; + case CM: + state = S_odd_CM_odd_CMC4; + break; + } + break; + case S_one_C4_odd_CMC4: /* C4 CM C4 */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + case C4: + return (UChar *)(s - 1); + case CM: + state = S_even_CMC4; /* CM C4 CM C4 */ + break; + } + break; + case S_even_CMC4: /* CM C4 CM C4 */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + return (UChar *)(s - 3); + case C4: + state = S_one_C4_even_CMC4; + break; + case CM: + state = S_odd_CM_even_CMC4; + break; + } + break; + case S_one_C4_even_CMC4: /* C4 CM C4 CM C4 */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + case C4: + return (UChar *)(s - 3); + case CM: + state = S_odd_CMC4; + break; + } + break; + + case S_odd_CM_odd_CMC4: /* CM CM C4 CM C4 CM C4 */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + case C4: + return (UChar *)(s - 3); + case CM: + state = S_even_CM_odd_CMC4; + break; + } + break; + case S_even_CM_odd_CMC4: /* CM CM CM C4 CM C4 CM C4 */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + case C4: + return (UChar *)(s - 1); + case CM: + state = S_odd_CM_odd_CMC4; + break; + } + break; + + case S_odd_CM_even_CMC4: /* CM CM C4 CM C4 */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + case C4: + return (UChar *)(s - 1); + case CM: + state = S_even_CM_even_CMC4; + break; + } + break; + case S_even_CM_even_CMC4: /* CM CM CM C4 CM C4 */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + case C4: + return (UChar *)(s - 3); + case CM: + state = S_odd_CM_even_CMC4; + break; + } + break; + + case S_odd_C4CM: /* C4 CM */ /* C4 CM C4 CM C4 CM*/ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + case C4: + return (UChar *)s; + case CM: + state = S_one_CM_odd_C4CM; /* CM C4 CM */ + break; + } + break; + case S_one_CM_odd_C4CM: /* CM C4 CM */ /* CM C4 CM C4 CM C4 CM */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + return (UChar *)(s - 2); /* |CM C4 CM */ + case C4: + state = S_even_C4CM; + break; + case CM: + state = S_even_CM_odd_C4CM; + break; + } + break; + case S_even_C4CM: /* C4 CM C4 CM */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + case C4: + return (UChar *)(s - 2); /* C4|CM C4 CM */ + case CM: + state = S_one_CM_even_C4CM; + break; + } + break; + case S_one_CM_even_C4CM: /* CM C4 CM C4 CM */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + return (UChar *)(s - 0); /*|CM C4 CM C4|CM */ + case C4: + state = S_odd_C4CM; + break; + case CM: + state = S_even_CM_even_C4CM; + break; + } + break; + + case S_even_CM_odd_C4CM: /* CM CM C4 CM */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + case C4: + return (UChar *)(s - 0); /* |CM CM|C4|CM */ + case CM: + state = S_odd_CM_odd_C4CM; + break; + } + break; + case S_odd_CM_odd_C4CM: /* CM CM CM C4 CM */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + case C4: + return (UChar *)(s - 2); /* |CM CM|CM C4 CM */ + case CM: + state = S_even_CM_odd_C4CM; + break; + } + break; + + case S_even_CM_even_C4CM: /* CM CM C4 CM C4 CM */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + case C4: + return (UChar *)(s - 2); /* |CM CM|C4|CM C4 CM */ + case CM: + state = S_odd_CM_even_C4CM; + break; + } + break; + case S_odd_CM_even_C4CM: /* CM CM CM C4 CM C4 CM */ + switch (GB18030_MAP[*p]) { + case C1: + case C2: + case C4: + return (UChar *)(s - 0); /* |CM CM|CM C4 CM C4|CM */ + case CM: + state = S_even_CM_even_C4CM; + break; + } + break; + } + } + + DEBUG_OUT(("state %-19s\n", StateNames[state])); + switch (state) { + case S_START: return (UChar *)(s - 0); + case S_one_C2: return (UChar *)(s - 0); + case S_one_C4: return (UChar *)(s - 0); + case S_one_CM: return (UChar *)(s - 0); + + case S_odd_CM_one_CX: return (UChar *)(s - 1); + case S_even_CM_one_CX: return (UChar *)(s - 0); + + case S_one_CMC4: return (UChar *)(s - 1); + case S_odd_CMC4: return (UChar *)(s - 1); + case S_one_C4_odd_CMC4: return (UChar *)(s - 1); + case S_even_CMC4: return (UChar *)(s - 3); + case S_one_C4_even_CMC4: return (UChar *)(s - 3); + + case S_odd_CM_odd_CMC4: return (UChar *)(s - 3); + case S_even_CM_odd_CMC4: return (UChar *)(s - 1); + + case S_odd_CM_even_CMC4: return (UChar *)(s - 1); + case S_even_CM_even_CMC4: return (UChar *)(s - 3); + + case S_odd_C4CM: return (UChar *)(s - 0); + case S_one_CM_odd_C4CM: return (UChar *)(s - 2); + case S_even_C4CM: return (UChar *)(s - 2); + case S_one_CM_even_C4CM: return (UChar *)(s - 0); + + case S_even_CM_odd_C4CM: return (UChar *)(s - 0); + case S_odd_CM_odd_C4CM: return (UChar *)(s - 2); + case S_even_CM_even_C4CM: return (UChar *)(s - 2); + case S_odd_CM_even_C4CM: return (UChar *)(s - 0); + } + + return (UChar* )s; /* never come here. (escape warning) */ +} + +static int +gb18030_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED) +{ + return GB18030_MAP[*s] == C1 ? TRUE : FALSE; +} + +OnigEncodingType OnigEncodingGB18030 = { + gb18030_mbc_enc_len, + "GB18030", /* name */ + 4, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + gb18030_mbc_to_code, + gb18030_code_to_mbclen, + gb18030_code_to_mbc, + gb18030_mbc_case_fold, + onigenc_ascii_apply_all_case_fold, + onigenc_ascii_get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + gb18030_is_code_ctype, + onigenc_not_support_get_ctype_code_range, + gb18030_left_adjust_char_head, + gb18030_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/gperf_fold_key_conv.py b/internal/components/third_party/oniguruma/src/gperf_fold_key_conv.py new file mode 100755 index 0000000000..d943c3e43f --- /dev/null +++ b/internal/components/third_party/oniguruma/src/gperf_fold_key_conv.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# gperf_fold_key_conv.py +# Copyright (c) 2016-2023 K.Kosako + +import sys +import re + +REG_LINE_GPERF = re.compile('#line .+gperf"') +REG_HASH_FUNC = re.compile('hash\s*\(register\s+const\s+char\s*\*\s*str,\s*register\s+size_t\s+len\s*\)') +REG_STR_AT = re.compile('str\[(\d+)\]') +REG_RETURN_TYPE = re.compile('^const\s+short\s+int\s*\*') +REG_FOLD_KEY = re.compile('unicode_fold(\d)_key\s*\(register\s+const\s+char\s*\*\s*str,\s*register\s+size_t\s+len\)') +REG_ENTRY = re.compile('\{".*?",\s*(-?\d+)\s*\}') +REG_IF_LEN = re.compile('\s*if\s*\(\s*len\s*<=\s*MAX_WORD_LENGTH.+') +REG_GET_HASH = re.compile('(?:register\s+)?(?:unsigned\s+)?int\s+key\s*=\s*hash\s*\(str,\s*len\);') +REG_GET_CODE = re.compile('(?:register\s+)?const\s+char\s*\*\s*s\s*=\s*wordlist\[key\]\.name;') +REG_CODE_CHECK = re.compile('if\s*\(\*str\s*==\s*\*s\s*&&\s*!strncmp.+\)') +REG_RETURN_WL = re.compile('return\s+&wordlist\[key\];') +REG_RETURN_0 = re.compile('return 0;') + +def parse_line(s, key_len): + s = s.rstrip() + + r = re.sub(REG_LINE_GPERF, '', s) + if r != s: return r + r = re.sub(REG_HASH_FUNC, 'hash(OnigCodePoint codes[])', s) + if r != s: return r + r = re.sub(REG_STR_AT, 'onig_codes_byte_at(codes, \\1)', s) + if r != s: return r + r = re.sub(REG_RETURN_TYPE, 'int', s) + if r != s: return r + r = re.sub(REG_FOLD_KEY, 'unicode_fold\\1_key(OnigCodePoint codes[])', s) + if r != s: return r + r = re.sub(REG_ENTRY, '\\1', s) + if r != s: return r + r = re.sub(REG_IF_LEN, '', s) + if r != s: return r + r = re.sub(REG_GET_HASH, 'int key = hash(codes);', s) + if r != s: return r + r = re.sub(REG_GET_CODE, 'int index = wordlist[key];', s) + if r != s: return r + r = re.sub(REG_CODE_CHECK, + 'if (index >= 0 && onig_codes_cmp(codes, OnigUnicodeFolds%d + index, %d) == 0)' % (key_len, key_len), s) + if r != s: return r + + r = re.sub(REG_RETURN_WL, 'return index;', s) + if r != s: return r + r = re.sub(REG_RETURN_0, 'return -1;', s) + if r != s: return r + + return s + +def parse_file(f, key_len): + print("/* This file was converted by gperf_fold_key_conv.py\n from gperf output file. */") + + while True: + line = f.readline() + if not line: + break + + s = parse_line(line, key_len) + print(s) + + +# main +argv = sys.argv +argc = len(argv) + +key_len = int(argv[1]) +parse_file(sys.stdin, key_len) diff --git a/internal/components/third_party/oniguruma/src/gperf_unfold_key_conv.py b/internal/components/third_party/oniguruma/src/gperf_unfold_key_conv.py new file mode 100755 index 0000000000..deda85d2d1 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/gperf_unfold_key_conv.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# gperf_unfold_key_conv.py +# Copyright (c) 2016-2023 K.Kosako + +import sys +import re + +REG_LINE_GPERF = re.compile('#line .+gperf"') +REG_HASH_FUNC = re.compile('hash\s*\(register\s+const\s+char\s*\*\s*str,\s*register\s+size_t\s+len\s*\)') +REG_STR_AT = re.compile('str\[(\d+)\]') +REG_UNFOLD_KEY = re.compile('onigenc_unicode_unfold_key\s*\(register\s+const\s+char\s*\*\s*str,\s*register\s+size_t\s+len\)') +REG_ENTRY = re.compile('\{".+?",\s*/\*(.+?)\*/\s*(-?\d+),\s*(\d)\}') +REG_EMPTY_ENTRY = re.compile('\{"",\s*(-?\d+),\s*(\d)\}') +REG_IF_LEN = re.compile('\s*if\s*\(\s*len\s*<=\s*MAX_WORD_LENGTH.+') +REG_GET_HASH = re.compile('(?:register\s+)?(?:unsigned\s+)?int\s+key\s*=\s*hash\s*\(str,\s*len\);') +REG_GET_CODE = re.compile('(?:register\s+)?const\s+char\s*\*\s*s\s*=\s*wordlist\[key\]\.name;') +REG_CODE_CHECK = re.compile('if\s*\(\*str\s*==\s*\*s\s*&&\s*!strncmp.+\)') + +def parse_line(s): + s = s.rstrip() + + r = re.sub(REG_LINE_GPERF, '', s) + if r != s: return r + r = re.sub(REG_HASH_FUNC, 'hash(OnigCodePoint codes[])', s) + if r != s: return r + r = re.sub(REG_STR_AT, 'onig_codes_byte_at(codes, \\1)', s) + if r != s: return r + r = re.sub(REG_UNFOLD_KEY, 'onigenc_unicode_unfold_key(OnigCodePoint code)', s) + if r != s: return r + r = re.sub(REG_ENTRY, '{\\1, \\2, \\3}', s) + if r != s: return r + r = re.sub(REG_EMPTY_ENTRY, '{0xffffffff, \\1, \\2}', s) + if r != s: return r + r = re.sub(REG_IF_LEN, '', s) + if r != s: return r + r = re.sub(REG_GET_HASH, 'int key = hash(&code);', s) + if r != s: return r + r = re.sub(REG_GET_CODE, 'OnigCodePoint gcode = wordlist[key].code;', s) + if r != s: return r + r = re.sub(REG_CODE_CHECK, 'if (code == gcode && wordlist[key].index >= 0)', s) + if r != s: return r + + return s + +def parse_file(f): + print("/* This file was converted by gperf_unfold_key_conv.py\n from gperf output file. */") + + line = f.readline() + while line: + s = parse_line(line) + print(s) + line = f.readline() + + +# main +parse_file(sys.stdin) diff --git a/internal/components/third_party/oniguruma/src/iso8859_1.c b/internal/components/third_party/oniguruma/src/iso8859_1.c new file mode 100644 index 0000000000..2013e75943 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/iso8859_1.c @@ -0,0 +1,276 @@ +/********************************************************************** + iso8859_1.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define LARGE_S 0x53 +#define SMALL_S 0x73 + +#define ENC_IS_ISO_8859_1_CTYPE(code,ctype) \ + ((EncISO_8859_1_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const unsigned short EncISO_8859_1_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, + 0x00a0, 0x00a0, 0x30e2, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0, + 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x30e2, 0x00a0, 0x01a0, + 0x00a0, 0x10a0, 0x30e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x01a0, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2 +}; + +static const OnigPairCaseFoldCodes CaseFoldMap[] = { + { 0xc0, 0xe0 }, + { 0xc1, 0xe1 }, + { 0xc2, 0xe2 }, + { 0xc3, 0xe3 }, + { 0xc4, 0xe4 }, + { 0xc5, 0xe5 }, + { 0xc6, 0xe6 }, + { 0xc7, 0xe7 }, + { 0xc8, 0xe8 }, + { 0xc9, 0xe9 }, + { 0xca, 0xea }, + { 0xcb, 0xeb }, + { 0xcc, 0xec }, + { 0xcd, 0xed }, + { 0xce, 0xee }, + { 0xcf, 0xef }, + + { 0xd0, 0xf0 }, + { 0xd1, 0xf1 }, + { 0xd2, 0xf2 }, + { 0xd3, 0xf3 }, + { 0xd4, 0xf4 }, + { 0xd5, 0xf5 }, + { 0xd6, 0xf6 }, + { 0xd8, 0xf8 }, + { 0xd9, 0xf9 }, + { 0xda, 0xfa }, + { 0xdb, 0xfb }, + { 0xdc, 0xfc }, + { 0xdd, 0xfd }, + { 0xde, 0xfe } +}; + +static int +apply_all_case_fold(OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + return onigenc_apply_all_case_fold_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, f, arg); +} + +static int +get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, + OnigCaseFoldCodeItem items[]) +{ + static OnigUChar sa[] = { LARGE_S, SMALL_S }; + int i, j, n; + + if (0x41 <= *p && *p <= 0x5a) { + if (*p == LARGE_S && end > p + 1 + && (*(p+1) == LARGE_S || *(p+1) == SMALL_S) + && CASE_FOLD_IS_NOT_ASCII_ONLY(flag)) { /* SS */ + ss_combination: + items[0].byte_len = 2; + items[0].code_len = 1; + items[0].code[0] = (OnigCodePoint )0xdf; + + n = 1; + for (i = 0; i < 2; i++) { + for (j = 0; j < 2; j++) { + if (sa[i] == *p && sa[j] == *(p+1)) + continue; + + items[n].byte_len = 2; + items[n].code_len = 2; + items[n].code[0] = (OnigCodePoint )sa[i]; + items[n].code[1] = (OnigCodePoint )sa[j]; + n++; + } + } + return 4; + } + + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = (OnigCodePoint )(*p + 0x20); + return 1; + } + else if (0x61 <= *p && *p <= 0x7a) { + if (*p == SMALL_S && end > p + 1 + && (*(p+1) == SMALL_S || *(p+1) == LARGE_S) + && CASE_FOLD_IS_NOT_ASCII_ONLY(flag)) { /* ss */ + goto ss_combination; + } + + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = (OnigCodePoint )(*p - 0x20); + return 1; + } + else if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag)) { + if (0xc0 <= *p && *p <= 0xcf) { + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = (OnigCodePoint )(*p + 0x20); + return 1; + } + else if (0xd0 <= *p && *p <= 0xdf) { + if (*p == 0xdf) { + items[0].byte_len = 1; + items[0].code_len = 2; + items[0].code[0] = (OnigCodePoint )'s'; + items[0].code[1] = (OnigCodePoint )'s'; + + items[1].byte_len = 1; + items[1].code_len = 2; + items[1].code[0] = (OnigCodePoint )'S'; + items[1].code[1] = (OnigCodePoint )'S'; + + items[2].byte_len = 1; + items[2].code_len = 2; + items[2].code[0] = (OnigCodePoint )'s'; + items[2].code[1] = (OnigCodePoint )'S'; + + items[3].byte_len = 1; + items[3].code_len = 2; + items[3].code[0] = (OnigCodePoint )'S'; + items[3].code[1] = (OnigCodePoint )'s'; + + return 4; + } + else if (*p != 0xd7) { + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = (OnigCodePoint )(*p + 0x20); + return 1; + } + } + else if (0xe0 <= *p && *p <= 0xef) { + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = (OnigCodePoint )(*p - 0x20); + return 1; + } + else if (0xf0 <= *p && *p <= 0xfe) { + if (*p != 0xf7) { + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = (OnigCodePoint )(*p - 0x20); + return 1; + } + } + } + + return 0; +} + +static int +mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, + const UChar* end ARG_UNUSED, UChar* lower) +{ + const UChar* p = *pp; + + if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { + *lower++ = 's'; + *lower = 's'; + (*pp)++; + return 2; + } + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p)) + *lower = ONIGENC_ISO_8859_1_TO_LOWER_CASE(*p); + else + *lower = *p; + + (*pp)++; + return 1; +} + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_ISO_8859_1_CTYPE(code, ctype); + else + return FALSE; +} + +OnigEncodingType OnigEncodingISO_8859_1 = { + onigenc_single_byte_mbc_enc_len, + "ISO-8859-1", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + mbc_case_fold, + apply_all_case_fold, + get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/iso8859_10.c b/internal/components/third_party/oniguruma/src/iso8859_10.c new file mode 100644 index 0000000000..e4bf59966e --- /dev/null +++ b/internal/components/third_party/oniguruma/src/iso8859_10.c @@ -0,0 +1,226 @@ +/********************************************************************** + iso8859_10.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_ISO_8859_10_TO_LOWER_CASE(c) EncISO_8859_10_ToLowerCaseTable[c] +#define ENC_IS_ISO_8859_10_CTYPE(code,ctype) \ + ((EncISO_8859_10_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const UChar EncISO_8859_10_ToLowerCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\261', '\262', '\263', '\264', '\265', '\266', '\247', + '\270', '\271', '\272', '\273', '\274', '\255', '\276', '\277', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' +}; + +static const unsigned short EncISO_8859_10_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x34a2, 0x34a2, + 0x00a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x01a0, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x01a0, 0x30e2, 0x30e2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2 +}; + +static int +mbc_case_fold(OnigCaseFoldType flag, + const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) +{ + const UChar* p = *pp; + + if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { + *lower++ = 's'; + *lower = 's'; + (*pp)++; + return 2; + } + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p)) + *lower = ENC_ISO_8859_10_TO_LOWER_CASE(*p); + else + *lower = *p; + + (*pp)++; + return 1; +} + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_ISO_8859_10_CTYPE(code, ctype); + else + return FALSE; +} + +static const OnigPairCaseFoldCodes CaseFoldMap[] = { + { 0xa1, 0xb1 }, + { 0xa2, 0xb2 }, + { 0xa3, 0xb3 }, + { 0xa4, 0xb4 }, + { 0xa5, 0xb5 }, + { 0xa6, 0xb6 }, + { 0xa8, 0xb8 }, + { 0xa9, 0xb9 }, + { 0xaa, 0xba }, + { 0xab, 0xbb }, + { 0xac, 0xbc }, + { 0xae, 0xbe }, + { 0xaf, 0xbf }, + + { 0xc0, 0xe0 }, + { 0xc1, 0xe1 }, + { 0xc2, 0xe2 }, + { 0xc3, 0xe3 }, + { 0xc4, 0xe4 }, + { 0xc5, 0xe5 }, + { 0xc6, 0xe6 }, + { 0xc7, 0xe7 }, + { 0xc8, 0xe8 }, + { 0xc9, 0xe9 }, + { 0xca, 0xea }, + { 0xcb, 0xeb }, + { 0xcc, 0xec }, + { 0xcd, 0xed }, + { 0xce, 0xee }, + { 0xcf, 0xef }, + + { 0xd0, 0xf0 }, + { 0xd1, 0xf1 }, + { 0xd2, 0xf2 }, + { 0xd3, 0xf3 }, + { 0xd4, 0xf4 }, + { 0xd5, 0xf5 }, + { 0xd6, 0xf6 }, + { 0xd7, 0xf7 }, + { 0xd8, 0xf8 }, + { 0xd9, 0xf9 }, + { 0xda, 0xfa }, + { 0xdb, 0xfb }, + { 0xdc, 0xfc }, + { 0xdd, 0xfd }, + { 0xde, 0xfe } +}; + +static int +apply_all_case_fold(OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + return onigenc_apply_all_case_fold_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, f, arg); +} + +static int +get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_get_case_fold_codes_by_str_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingISO_8859_10 = { + onigenc_single_byte_mbc_enc_len, + "ISO-8859-10", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + mbc_case_fold, + apply_all_case_fold, + get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/iso8859_11.c b/internal/components/third_party/oniguruma/src/iso8859_11.c new file mode 100644 index 0000000000..8639ce23c6 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/iso8859_11.c @@ -0,0 +1,101 @@ +/********************************************************************** + iso8859_11.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2019 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_IS_ISO_8859_11_CTYPE(code,ctype) \ + ((EncISO_8859_11_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const unsigned short EncISO_8859_11_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x0000, 0x0000, 0x0000, 0x0000 +}; + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_ISO_8859_11_CTYPE(code, ctype); + else + return FALSE; +} + +OnigEncodingType OnigEncodingISO_8859_11 = { + onigenc_single_byte_mbc_enc_len, + "ISO-8859-11", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + onigenc_ascii_mbc_case_fold, + onigenc_ascii_apply_all_case_fold, + onigenc_ascii_get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/iso8859_13.c b/internal/components/third_party/oniguruma/src/iso8859_13.c new file mode 100644 index 0000000000..dbf747fccf --- /dev/null +++ b/internal/components/third_party/oniguruma/src/iso8859_13.c @@ -0,0 +1,211 @@ +/********************************************************************** + iso8859_13.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_ISO_8859_13_TO_LOWER_CASE(c) EncISO_8859_13_ToLowerCaseTable[c] +#define ENC_IS_ISO_8859_13_CTYPE(code,ctype) \ + ((EncISO_8859_13_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const UChar EncISO_8859_13_ToLowerCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\270', '\251', '\272', '\253', '\254', '\255', '\256', '\277', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' +}; + +static const unsigned short EncISO_8859_13_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0, + 0x34a2, 0x00a0, 0x34a2, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x34a2, + 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x01a0, 0x30e2, 0x00a0, 0x01a0, + 0x30e2, 0x10a0, 0x30e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x30e2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x01a0 +}; + +static int +mbc_case_fold(OnigCaseFoldType flag, + const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) +{ + const UChar* p = *pp; + + if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { + *lower++ = 's'; + *lower = 's'; + (*pp)++; + return 2; + } + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p)) + *lower = ENC_ISO_8859_13_TO_LOWER_CASE(*p); + else + *lower = *p; + + (*pp)++; + return 1; +} + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_ISO_8859_13_CTYPE(code, ctype); + else + return FALSE; +} + +static const OnigPairCaseFoldCodes CaseFoldMap[] = { + { 0xc0, 0xe0 }, + { 0xc1, 0xe1 }, + { 0xc2, 0xe2 }, + { 0xc3, 0xe3 }, + { 0xc4, 0xe4 }, + { 0xc5, 0xe5 }, + { 0xc6, 0xe6 }, + { 0xc7, 0xe7 }, + { 0xc8, 0xe8 }, + { 0xc9, 0xe9 }, + { 0xca, 0xea }, + { 0xcb, 0xeb }, + { 0xcc, 0xec }, + { 0xcd, 0xed }, + { 0xce, 0xee }, + { 0xcf, 0xef }, + + { 0xd0, 0xf0 }, + { 0xd1, 0xf1 }, + { 0xd2, 0xf2 }, + { 0xd3, 0xf3 }, + { 0xd4, 0xf4 }, + { 0xd5, 0xf5 }, + { 0xd6, 0xf6 }, + { 0xd8, 0xf8 }, + { 0xd9, 0xf9 }, + { 0xda, 0xfa }, + { 0xdb, 0xfb }, + { 0xdc, 0xfc }, + { 0xdd, 0xfd }, + { 0xde, 0xfe } +}; + +static int +apply_all_case_fold(OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + return onigenc_apply_all_case_fold_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, f, arg); +} + +static int +get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_get_case_fold_codes_by_str_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingISO_8859_13 = { + onigenc_single_byte_mbc_enc_len, + "ISO-8859-13", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + mbc_case_fold, + apply_all_case_fold, + get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/iso8859_14.c b/internal/components/third_party/oniguruma/src/iso8859_14.c new file mode 100644 index 0000000000..a6d6b71993 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/iso8859_14.c @@ -0,0 +1,227 @@ +/********************************************************************** + iso8859_14.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_ISO_8859_14_TO_LOWER_CASE(c) EncISO_8859_14_ToLowerCaseTable[c] +#define ENC_IS_ISO_8859_14_CTYPE(code,ctype) \ + ((EncISO_8859_14_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const UChar EncISO_8859_14_ToLowerCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\242', '\242', '\243', '\245', '\245', '\253', '\247', + '\270', '\251', '\272', '\253', '\274', '\255', '\256', '\377', + '\261', '\261', '\263', '\263', '\265', '\265', '\266', '\271', + '\270', '\271', '\272', '\277', '\274', '\276', '\276', '\277', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' +}; + +static const unsigned short EncISO_8859_14_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x34a2, 0x30e2, 0x00a0, 0x34a2, 0x30e2, 0x34a2, 0x00a0, + 0x34a2, 0x00a0, 0x34a2, 0x30e2, 0x34a2, 0x01a0, 0x00a0, 0x34a2, + 0x34a2, 0x30e2, 0x34a2, 0x30e2, 0x34a2, 0x30e2, 0x00a0, 0x34a2, + 0x30e2, 0x30e2, 0x30e2, 0x34a2, 0x30e2, 0x34a2, 0x30e2, 0x30e2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2 +}; + +static int +mbc_case_fold(OnigCaseFoldType flag, + const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) +{ + const UChar* p = *pp; + + if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { + *lower++ = 's'; + *lower = 's'; + (*pp)++; + return 2; + } + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p)) + *lower = ENC_ISO_8859_14_TO_LOWER_CASE(*p); + else + *lower = *p; + + (*pp)++; + return 1; /* return byte length of converted char to lower */ +} + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_ISO_8859_14_CTYPE(code, ctype); + else + return FALSE; +} + +static const OnigPairCaseFoldCodes CaseFoldMap[] = { + { 0xa1, 0xa2 }, + { 0xa4, 0xa5 }, + { 0xa6, 0xab }, + { 0xa8, 0xb8 }, + { 0xaa, 0xba }, + { 0xac, 0xbc }, + { 0xaf, 0xff }, + + { 0xb0, 0xb1 }, + { 0xb2, 0xb3 }, + { 0xb4, 0xb5 }, + { 0xb7, 0xb9 }, + { 0xbb, 0xbf }, + { 0xbd, 0xbe }, + + { 0xc0, 0xe0 }, + { 0xc1, 0xe1 }, + { 0xc2, 0xe2 }, + { 0xc3, 0xe3 }, + { 0xc4, 0xe4 }, + { 0xc5, 0xe5 }, + { 0xc6, 0xe6 }, + { 0xc7, 0xe7 }, + { 0xc8, 0xe8 }, + { 0xc9, 0xe9 }, + { 0xca, 0xea }, + { 0xcb, 0xeb }, + { 0xcc, 0xec }, + { 0xcd, 0xed }, + { 0xce, 0xee }, + { 0xcf, 0xef }, + + { 0xd0, 0xf0 }, + { 0xd1, 0xf1 }, + { 0xd2, 0xf2 }, + { 0xd3, 0xf3 }, + { 0xd4, 0xf4 }, + { 0xd5, 0xf5 }, + { 0xd6, 0xf6 }, + { 0xd7, 0xf7 }, + { 0xd8, 0xf8 }, + { 0xd9, 0xf9 }, + { 0xda, 0xfa }, + { 0xdb, 0xfb }, + { 0xdc, 0xfc }, + { 0xdd, 0xfd }, + { 0xde, 0xfe } +}; + +static int +apply_all_case_fold(OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + return onigenc_apply_all_case_fold_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, f, arg); +} + +static int +get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_get_case_fold_codes_by_str_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingISO_8859_14 = { + onigenc_single_byte_mbc_enc_len, + "ISO-8859-14", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + mbc_case_fold, + apply_all_case_fold, + get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/iso8859_15.c b/internal/components/third_party/oniguruma/src/iso8859_15.c new file mode 100644 index 0000000000..0bb6b12c46 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/iso8859_15.c @@ -0,0 +1,217 @@ +/********************************************************************** + iso8859_15.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_ISO_8859_15_TO_LOWER_CASE(c) EncISO_8859_15_ToLowerCaseTable[c] +#define ENC_IS_ISO_8859_15_CTYPE(code,ctype) \ + ((EncISO_8859_15_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const UChar EncISO_8859_15_ToLowerCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\250', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\270', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\275', '\275', '\377', '\277', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' +}; + +static const unsigned short EncISO_8859_15_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x34a2, 0x00a0, + 0x30e2, 0x00a0, 0x30e2, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0, + 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x34a2, 0x30e2, 0x00a0, 0x01a0, + 0x30e2, 0x10a0, 0x30e2, 0x01a0, 0x34a2, 0x30e2, 0x34a2, 0x01a0, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2 +}; + +static int +mbc_case_fold(OnigCaseFoldType flag, + const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) +{ + const UChar* p = *pp; + + if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { + *lower++ = 's'; + *lower = 's'; + (*pp)++; + return 2; + } + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p)) + *lower = ENC_ISO_8859_15_TO_LOWER_CASE(*p); + else + *lower = *p; + + (*pp)++; + return 1; /* return byte length of converted char to lower */ +} + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_ISO_8859_15_CTYPE(code, ctype); + else + return FALSE; +} + +static const OnigPairCaseFoldCodes CaseFoldMap[] = { + { 0xa6, 0xa8 }, + + { 0xb4, 0xb8 }, + { 0xbc, 0xbd }, + { 0xbe, 0xff }, + + { 0xc0, 0xe0 }, + { 0xc1, 0xe1 }, + { 0xc2, 0xe2 }, + { 0xc3, 0xe3 }, + { 0xc4, 0xe4 }, + { 0xc5, 0xe5 }, + { 0xc6, 0xe6 }, + { 0xc7, 0xe7 }, + { 0xc8, 0xe8 }, + { 0xc9, 0xe9 }, + { 0xca, 0xea }, + { 0xcb, 0xeb }, + { 0xcc, 0xec }, + { 0xcd, 0xed }, + { 0xce, 0xee }, + { 0xcf, 0xef }, + + { 0xd0, 0xf0 }, + { 0xd1, 0xf1 }, + { 0xd2, 0xf2 }, + { 0xd3, 0xf3 }, + { 0xd4, 0xf4 }, + { 0xd5, 0xf5 }, + { 0xd6, 0xf6 }, + { 0xd8, 0xf8 }, + { 0xd9, 0xf9 }, + { 0xda, 0xfa }, + { 0xdb, 0xfb }, + { 0xdc, 0xfc }, + { 0xdd, 0xfd }, + { 0xde, 0xfe } +}; + +static int +apply_all_case_fold(OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + return onigenc_apply_all_case_fold_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, f, arg); +} + +static int +get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_get_case_fold_codes_by_str_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingISO_8859_15 = { + onigenc_single_byte_mbc_enc_len, + "ISO-8859-15", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + mbc_case_fold, + apply_all_case_fold, + get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/iso8859_16.c b/internal/components/third_party/oniguruma/src/iso8859_16.c new file mode 100644 index 0000000000..bfd0a5bd9c --- /dev/null +++ b/internal/components/third_party/oniguruma/src/iso8859_16.c @@ -0,0 +1,224 @@ +/********************************************************************** + iso8859_16.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_ISO_8859_16_TO_LOWER_CASE(c) EncISO_8859_16_ToLowerCaseTable[c] +#define ENC_IS_ISO_8859_16_CTYPE(code,ctype) \ + ((EncISO_8859_16_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const UChar EncISO_8859_16_ToLowerCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\242', '\242', '\263', '\245', '\245', '\250', '\247', + '\250', '\251', '\272', '\253', '\256', '\255', '\256', '\277', + '\260', '\261', '\271', '\263', '\270', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\275', '\275', '\377', '\277', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' +}; + +static const unsigned short EncISO_8859_16_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x34a2, 0x30e2, 0x34a2, 0x00a0, 0x01a0, 0x34a2, 0x00a0, + 0x30e2, 0x00a0, 0x34a2, 0x01a0, 0x34a2, 0x01a0, 0x30e2, 0x34a2, + 0x00a0, 0x00a0, 0x34a2, 0x30e2, 0x34a2, 0x01a0, 0x00a0, 0x01a0, + 0x30e2, 0x30e2, 0x30e2, 0x01a0, 0x34a2, 0x30e2, 0x34a2, 0x30e2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2 +}; + +static int +mbc_case_fold(OnigCaseFoldType flag, + const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) +{ + const UChar* p = *pp; + + if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { + *lower++ = 's'; + *lower = 's'; + (*pp)++; + return 2; + } + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p)) + *lower = ENC_ISO_8859_16_TO_LOWER_CASE(*p); + else + *lower = *p; + + (*pp)++; + return 1; /* return byte length of converted char to lower */ +} + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_ISO_8859_16_CTYPE(code, ctype); + else + return FALSE; +} + +static const OnigPairCaseFoldCodes CaseFoldMap[] = { + { 0xa1, 0xa2 }, + { 0xa3, 0xb3 }, + { 0xa6, 0xa8 }, + { 0xaa, 0xba }, + { 0xac, 0xae }, + { 0xaf, 0xbf }, + + { 0xb2, 0xb9 }, + { 0xb4, 0xb8 }, + { 0xbc, 0xbd }, + { 0xbe, 0xff }, + + { 0xc0, 0xe0 }, + { 0xc1, 0xe1 }, + { 0xc2, 0xe2 }, + { 0xc3, 0xe3 }, + { 0xc4, 0xe4 }, + { 0xc5, 0xe5 }, + { 0xc6, 0xe6 }, + { 0xc7, 0xe7 }, + { 0xc8, 0xe8 }, + { 0xc9, 0xe9 }, + { 0xca, 0xea }, + { 0xcb, 0xeb }, + { 0xcc, 0xec }, + { 0xcd, 0xed }, + { 0xce, 0xee }, + { 0xcf, 0xef }, + + { 0xd0, 0xf0 }, + { 0xd1, 0xf1 }, + { 0xd2, 0xf2 }, + { 0xd3, 0xf3 }, + { 0xd4, 0xf4 }, + { 0xd5, 0xf5 }, + { 0xd6, 0xf6 }, + { 0xd7, 0xf7 }, + { 0xd8, 0xf8 }, + { 0xd9, 0xf9 }, + { 0xda, 0xfa }, + { 0xdb, 0xfb }, + { 0xdc, 0xfc }, + { 0xdd, 0xfd }, + { 0xde, 0xfe } +}; + +static int +apply_all_case_fold(OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + return onigenc_apply_all_case_fold_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, f, arg); +} + +static int +get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_get_case_fold_codes_by_str_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingISO_8859_16 = { + onigenc_single_byte_mbc_enc_len, + "ISO-8859-16", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + mbc_case_fold, + apply_all_case_fold, + get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/iso8859_2.c b/internal/components/third_party/oniguruma/src/iso8859_2.c new file mode 100644 index 0000000000..d08140e261 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/iso8859_2.c @@ -0,0 +1,222 @@ +/********************************************************************** + iso8859_2.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_ISO_8859_2_TO_LOWER_CASE(c) EncISO_8859_2_ToLowerCaseTable[c] +#define ENC_IS_ISO_8859_2_CTYPE(code,ctype) \ + ((EncISO_8859_2_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const UChar EncISO_8859_2_ToLowerCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\261', '\242', '\263', '\244', '\265', '\266', '\247', + '\250', '\271', '\272', '\273', '\274', '\255', '\276', '\277', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' +}; + +static const unsigned short EncISO_8859_2_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x34a2, 0x00a0, 0x34a2, 0x00a0, 0x34a2, 0x34a2, 0x00a0, + 0x00a0, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x34a2, 0x34a2, + 0x00a0, 0x30e2, 0x00a0, 0x30e2, 0x00a0, 0x30e2, 0x30e2, 0x00a0, + 0x00a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0, 0x30e2, 0x30e2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0 +}; + +static int +mbc_case_fold(OnigCaseFoldType flag, + const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) +{ + const UChar* p = *pp; + + if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { + *lower++ = 's'; + *lower = 's'; + (*pp)++; + return 2; + } + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p)) + *lower = ENC_ISO_8859_2_TO_LOWER_CASE(*p); + else + *lower = *p; + + (*pp)++; + return 1; /* return byte length of converted char to lower */ +} + +static const OnigPairCaseFoldCodes CaseFoldMap[] = { + { 0xa1, 0xb1 }, + { 0xa3, 0xb3 }, + { 0xa5, 0xb5 }, + { 0xa6, 0xb6 }, + { 0xa9, 0xb9 }, + { 0xaa, 0xba }, + { 0xab, 0xbb }, + { 0xac, 0xbc }, + { 0xae, 0xbe }, + { 0xaf, 0xbf }, + + { 0xc0, 0xe0 }, + { 0xc1, 0xe1 }, + { 0xc2, 0xe2 }, + { 0xc3, 0xe3 }, + { 0xc4, 0xe4 }, + { 0xc5, 0xe5 }, + { 0xc6, 0xe6 }, + { 0xc7, 0xe7 }, + { 0xc8, 0xe8 }, + { 0xc9, 0xe9 }, + { 0xca, 0xea }, + { 0xcb, 0xeb }, + { 0xcc, 0xec }, + { 0xcd, 0xed }, + { 0xce, 0xee }, + { 0xcf, 0xef }, + + { 0xd0, 0xf0 }, + { 0xd1, 0xf1 }, + { 0xd2, 0xf2 }, + { 0xd3, 0xf3 }, + { 0xd4, 0xf4 }, + { 0xd5, 0xf5 }, + { 0xd6, 0xf6 }, + { 0xd8, 0xf8 }, + { 0xd9, 0xf9 }, + { 0xda, 0xfa }, + { 0xdb, 0xfb }, + { 0xdc, 0xfc }, + { 0xdd, 0xfd }, + { 0xde, 0xfe } +}; + +static int +apply_all_case_fold(OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + return onigenc_apply_all_case_fold_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, f, arg); +} + +static int +get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_get_case_fold_codes_by_str_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, p, end, items); +} + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_ISO_8859_2_CTYPE(code, ctype); + else + return FALSE; +} + +OnigEncodingType OnigEncodingISO_8859_2 = { + onigenc_single_byte_mbc_enc_len, + "ISO-8859-2", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + mbc_case_fold, + apply_all_case_fold, + get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/iso8859_3.c b/internal/components/third_party/oniguruma/src/iso8859_3.c new file mode 100644 index 0000000000..69b96fd955 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/iso8859_3.c @@ -0,0 +1,218 @@ +/********************************************************************** + iso8859_3.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_ISO_8859_3_TO_LOWER_CASE(c) EncISO_8859_3_ToLowerCaseTable[c] +#define ENC_IS_ISO_8859_3_CTYPE(code,ctype) \ + ((EncISO_8859_3_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const UChar EncISO_8859_3_ToLowerCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\261', '\242', '\243', '\244', '\245', '\266', '\247', + '\250', '\271', '\272', '\273', '\274', '\255', '\256', '\277', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\340', '\341', '\342', '\303', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\320', '\361', '\362', '\363', '\364', '\365', '\366', '\327', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' +}; + +static const unsigned short EncISO_8859_3_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x34a2, 0x00a0, 0x00a0, 0x00a0, 0x0000, 0x34a2, 0x00a0, + 0x00a0, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x0000, 0x34a2, + 0x00a0, 0x30e2, 0x10a0, 0x10a0, 0x00a0, 0x30e2, 0x30e2, 0x01a0, + 0x00a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x11a0, 0x0000, 0x30e2, + 0x34a2, 0x34a2, 0x34a2, 0x0000, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x0000, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x0000, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x0000, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0 +}; + +static int +mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, + const UChar* end ARG_UNUSED, UChar* lower) +{ + const UChar* p = *pp; + + if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { + *lower++ = 's'; + *lower = 's'; + (*pp)++; + return 2; + } + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p)) + *lower = ENC_ISO_8859_3_TO_LOWER_CASE(*p); + else + *lower = *p; + + (*pp)++; + return 1; +} + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_ISO_8859_3_CTYPE(code, ctype); + else + return FALSE; +} + +static const OnigPairCaseFoldCodes CaseFoldMap[] = { + { 0xa1, 0xb1 }, + { 0xa6, 0xb6 }, + { 0xa9, 0xb9 }, + { 0xaa, 0xba }, + { 0xab, 0xbb }, + { 0xac, 0xbc }, + { 0xaf, 0xbf }, + + { 0xc0, 0xe0 }, + { 0xc1, 0xe1 }, + { 0xc2, 0xe2 }, + { 0xc4, 0xe4 }, + { 0xc5, 0xe5 }, + { 0xc6, 0xe6 }, + { 0xc7, 0xe7 }, + { 0xc8, 0xe8 }, + { 0xc9, 0xe9 }, + { 0xca, 0xea }, + { 0xcb, 0xeb }, + { 0xcc, 0xec }, + { 0xcd, 0xed }, + { 0xce, 0xee }, + { 0xcf, 0xef }, + + { 0xd1, 0xf1 }, + { 0xd2, 0xf2 }, + { 0xd3, 0xf3 }, + { 0xd4, 0xf4 }, + { 0xd5, 0xf5 }, + { 0xd6, 0xf6 }, + { 0xd8, 0xf8 }, + { 0xd9, 0xf9 }, + { 0xda, 0xfa }, + { 0xdb, 0xfb }, + { 0xdc, 0xfc }, + { 0xdd, 0xfd }, + { 0xde, 0xfe } +}; + + +static int +apply_all_case_fold(OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + return onigenc_apply_all_case_fold_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, f, arg); +} + +static int +get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_get_case_fold_codes_by_str_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingISO_8859_3 = { + onigenc_single_byte_mbc_enc_len, + "ISO-8859-3", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + mbc_case_fold, + apply_all_case_fold, + get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/iso8859_4.c b/internal/components/third_party/oniguruma/src/iso8859_4.c new file mode 100644 index 0000000000..949b7a1a74 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/iso8859_4.c @@ -0,0 +1,221 @@ +/********************************************************************** + iso8859_4.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_ISO_8859_4_TO_LOWER_CASE(c) EncISO_8859_4_ToLowerCaseTable[c] +#define ENC_IS_ISO_8859_4_CTYPE(code,ctype) \ + ((EncISO_8859_4_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const UChar EncISO_8859_4_ToLowerCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\261', '\242', '\263', '\244', '\265', '\266', '\247', + '\250', '\271', '\272', '\273', '\274', '\255', '\276', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\277', '\276', '\277', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' +}; + +static const unsigned short EncISO_8859_4_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x34a2, 0x30e2, 0x34a2, 0x00a0, 0x34a2, 0x34a2, 0x00a0, + 0x00a0, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x34a2, 0x00a0, + 0x00a0, 0x30e2, 0x00a0, 0x30e2, 0x00a0, 0x30e2, 0x30e2, 0x00a0, + 0x00a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x34a2, 0x30e2, 0x30e2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0 +}; + +static int +mbc_case_fold(OnigCaseFoldType flag, + const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) +{ + const UChar* p = *pp; + + if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { + *lower++ = 's'; + *lower = 's'; + (*pp)++; + return 2; + } + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p)) + *lower = ENC_ISO_8859_4_TO_LOWER_CASE(*p); + else + *lower = *p; + + (*pp)++; + return 1; /* return byte length of converted char to lower */ +} + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_ISO_8859_4_CTYPE(code, ctype); + else + return FALSE; +} + +static const OnigPairCaseFoldCodes CaseFoldMap[] = { + { 0xa1, 0xb1 }, + { 0xa3, 0xb3 }, + { 0xa5, 0xb5 }, + { 0xa6, 0xb6 }, + { 0xa9, 0xb9 }, + { 0xaa, 0xba }, + { 0xab, 0xbb }, + { 0xac, 0xbc }, + { 0xae, 0xbe }, + + { 0xc0, 0xe0 }, + { 0xc1, 0xe1 }, + { 0xc2, 0xe2 }, + { 0xc3, 0xe3 }, + { 0xc4, 0xe4 }, + { 0xc5, 0xe5 }, + { 0xc6, 0xe6 }, + { 0xc7, 0xe7 }, + { 0xc8, 0xe8 }, + { 0xc9, 0xe9 }, + { 0xca, 0xea }, + { 0xcb, 0xeb }, + { 0xcc, 0xec }, + { 0xcd, 0xed }, + { 0xce, 0xee }, + { 0xcf, 0xef }, + + { 0xd0, 0xf0 }, + { 0xd1, 0xf1 }, + { 0xd2, 0xf2 }, + { 0xd3, 0xf3 }, + { 0xd4, 0xf4 }, + { 0xd5, 0xf5 }, + { 0xd6, 0xf6 }, + { 0xd8, 0xf8 }, + { 0xd9, 0xf9 }, + { 0xda, 0xfa }, + { 0xdb, 0xfb }, + { 0xdc, 0xfc }, + { 0xdd, 0xfd }, + { 0xde, 0xfe } +}; + +static int +apply_all_case_fold(OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + return onigenc_apply_all_case_fold_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, f, arg); +} + +static int +get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_get_case_fold_codes_by_str_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingISO_8859_4 = { + onigenc_single_byte_mbc_enc_len, + "ISO-8859-4", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + mbc_case_fold, + apply_all_case_fold, + get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/iso8859_5.c b/internal/components/third_party/oniguruma/src/iso8859_5.c new file mode 100644 index 0000000000..9e5d4189cd --- /dev/null +++ b/internal/components/third_party/oniguruma/src/iso8859_5.c @@ -0,0 +1,222 @@ +/********************************************************************** + iso8859_5.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_ISO_8859_5_TO_LOWER_CASE(c) EncISO_8859_5_ToLowerCaseTable[c] +#define ENC_IS_ISO_8859_5_CTYPE(code,ctype) \ + ((EncISO_8859_5_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const UChar EncISO_8859_5_ToLowerCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\255', '\376', '\377', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' +}; + +static const unsigned short EncISO_8859_5_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x00a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0, 0x30e2, 0x30e2 +}; + +static int +mbc_case_fold(OnigCaseFoldType flag, + const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) +{ + const UChar* p = *pp; + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p)) + *lower = ENC_ISO_8859_5_TO_LOWER_CASE(*p); + else + *lower = *p; + + (*pp)++; + return 1; +} + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_ISO_8859_5_CTYPE(code, ctype); + else + return FALSE; +} + +static const OnigPairCaseFoldCodes CaseFoldMap[] = { + { 0xa1, 0xf1 }, + { 0xa2, 0xf2 }, + { 0xa3, 0xf3 }, + { 0xa4, 0xf4 }, + { 0xa5, 0xf5 }, + { 0xa6, 0xf6 }, + { 0xa7, 0xf7 }, + { 0xa8, 0xf8 }, + { 0xa9, 0xf9 }, + { 0xaa, 0xfa }, + { 0xab, 0xfb }, + { 0xac, 0xfc }, + { 0xae, 0xfe }, + { 0xaf, 0xff }, + + { 0xb0, 0xd0 }, + { 0xb1, 0xd1 }, + { 0xb2, 0xd2 }, + { 0xb3, 0xd3 }, + { 0xb4, 0xd4 }, + { 0xb5, 0xd5 }, + { 0xb6, 0xd6 }, + { 0xb7, 0xd7 }, + { 0xb8, 0xd8 }, + { 0xb9, 0xd9 }, + { 0xba, 0xda }, + { 0xbb, 0xdb }, + { 0xbc, 0xdc }, + { 0xbd, 0xdd }, + { 0xbe, 0xde }, + { 0xbf, 0xdf }, + + { 0xc0, 0xe0 }, + { 0xc1, 0xe1 }, + { 0xc2, 0xe2 }, + { 0xc3, 0xe3 }, + { 0xc4, 0xe4 }, + { 0xc5, 0xe5 }, + { 0xc6, 0xe6 }, + { 0xc7, 0xe7 }, + { 0xc8, 0xe8 }, + { 0xc9, 0xe9 }, + { 0xca, 0xea }, + { 0xcb, 0xeb }, + { 0xcc, 0xec }, + { 0xcd, 0xed }, + { 0xce, 0xee }, + { 0xcf, 0xef } +}; + +static int +apply_all_case_fold(OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + return onigenc_apply_all_case_fold_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, + flag, f, arg); +} + +static int +get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, + OnigCaseFoldCodeItem items[]) +{ + return onigenc_get_case_fold_codes_by_str_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingISO_8859_5 = { + onigenc_single_byte_mbc_enc_len, + "ISO-8859-5", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + mbc_case_fold, + apply_all_case_fold, + get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/iso8859_6.c b/internal/components/third_party/oniguruma/src/iso8859_6.c new file mode 100644 index 0000000000..fb724420c2 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/iso8859_6.c @@ -0,0 +1,101 @@ +/********************************************************************** + iso8859_6.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2019 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_IS_ISO_8859_6_CTYPE(code,ctype) \ + ((EncISO_8859_6_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const unsigned short EncISO_8859_6_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x0000, 0x0000, 0x0000, 0x00a0, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x01a0, 0x01a0, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x01a0, 0x0000, 0x0000, 0x0000, 0x01a0, + 0x0000, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 +}; + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_ISO_8859_6_CTYPE(code, ctype); + else + return FALSE; +} + +OnigEncodingType OnigEncodingISO_8859_6 = { + onigenc_single_byte_mbc_enc_len, + "ISO-8859-6", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + onigenc_ascii_mbc_case_fold, + onigenc_ascii_apply_all_case_fold, + onigenc_ascii_get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/iso8859_7.c b/internal/components/third_party/oniguruma/src/iso8859_7.c new file mode 100644 index 0000000000..07b1360a73 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/iso8859_7.c @@ -0,0 +1,210 @@ +/********************************************************************** + iso8859_7.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_ISO_8859_7_TO_LOWER_CASE(c) EncISO_8859_7_ToLowerCaseTable[c] +#define ENC_IS_ISO_8859_7_CTYPE(code,ctype) \ + ((EncISO_8859_7_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const UChar EncISO_8859_7_ToLowerCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\334', '\267', + '\335', '\336', '\337', '\273', '\374', '\275', '\375', '\376', + '\300', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\322', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\334', '\335', '\336', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' +}; + +static const unsigned short EncISO_8859_7_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x01a0, 0x01a0, 0x00a0, 0x0000, 0x0000, 0x00a0, 0x00a0, + 0x00a0, 0x00a0, 0x0000, 0x01a0, 0x00a0, 0x01a0, 0x0000, 0x01a0, + 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x00a0, 0x34a2, 0x01a0, + 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x34a2, 0x10a0, 0x34a2, 0x34a2, + 0x30e2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x0000, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x0000 +}; + +static int +mbc_case_fold(OnigCaseFoldType flag, + const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) +{ + const UChar* p = *pp; + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p)) + *lower = ENC_ISO_8859_7_TO_LOWER_CASE(*p); + else + *lower = *p; + + (*pp)++; + return 1; +} + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_ISO_8859_7_CTYPE(code, ctype); + else + return FALSE; +} + +static const OnigPairCaseFoldCodes CaseFoldMap[] = { + { 0xb6, 0xdc }, + { 0xb8, 0xdd }, + { 0xb9, 0xde }, + { 0xba, 0xdf }, + { 0xbc, 0xfc }, + { 0xbe, 0xfd }, + { 0xbf, 0xfe }, + + { 0xc1, 0xe1 }, + { 0xc2, 0xe2 }, + { 0xc3, 0xe3 }, + { 0xc4, 0xe4 }, + { 0xc5, 0xe5 }, + { 0xc6, 0xe6 }, + { 0xc7, 0xe7 }, + { 0xc8, 0xe8 }, + { 0xc9, 0xe9 }, + { 0xca, 0xea }, + { 0xcb, 0xeb }, + { 0xcc, 0xec }, + { 0xcd, 0xed }, + { 0xce, 0xee }, + { 0xcf, 0xef }, + + { 0xd0, 0xf0 }, + { 0xd1, 0xf1 }, + { 0xd2, 0xf2 }, + { 0xd3, 0xf3 }, + { 0xd4, 0xf4 }, + { 0xd5, 0xf5 }, + { 0xd6, 0xf6 }, + { 0xd7, 0xf7 }, + { 0xd8, 0xf8 }, + { 0xd9, 0xf9 }, + { 0xda, 0xfa }, + { 0xdb, 0xfb } +}; + +static int +apply_all_case_fold(OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + return onigenc_apply_all_case_fold_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, + flag, f, arg); +} + +static int +get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_get_case_fold_codes_by_str_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, + flag, p, end, items); +} + + +OnigEncodingType OnigEncodingISO_8859_7 = { + onigenc_single_byte_mbc_enc_len, + "ISO-8859-7", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + mbc_case_fold, + apply_all_case_fold, + get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/iso8859_8.c b/internal/components/third_party/oniguruma/src/iso8859_8.c new file mode 100644 index 0000000000..92a5eb118a --- /dev/null +++ b/internal/components/third_party/oniguruma/src/iso8859_8.c @@ -0,0 +1,101 @@ +/********************************************************************** + iso8859_8.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2019 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_IS_ISO_8859_8_CTYPE(code,ctype) \ + ((EncISO_8859_8_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const unsigned short EncISO_8859_8_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x0000, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, + 0x00a0, 0x00a0, 0x00a0, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0, + 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x30e2, 0x00a0, 0x01a0, + 0x00a0, 0x10a0, 0x00a0, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x01a0, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, + 0x30a2, 0x30a2, 0x30a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 +}; + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_ISO_8859_8_CTYPE(code, ctype); + else + return FALSE; +} + +OnigEncodingType OnigEncodingISO_8859_8 = { + onigenc_single_byte_mbc_enc_len, + "ISO-8859-8", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + onigenc_ascii_mbc_case_fold, + onigenc_ascii_apply_all_case_fold, + onigenc_ascii_get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/iso8859_9.c b/internal/components/third_party/oniguruma/src/iso8859_9.c new file mode 100644 index 0000000000..6f205e556a --- /dev/null +++ b/internal/components/third_party/oniguruma/src/iso8859_9.c @@ -0,0 +1,211 @@ +/********************************************************************** + iso8859_9.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_ISO_8859_9_TO_LOWER_CASE(c) EncISO_8859_9_ToLowerCaseTable[c] +#define ENC_IS_ISO_8859_9_CTYPE(code,ctype) \ + ((EncISO_8859_9_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const UChar EncISO_8859_9_ToLowerCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327', + '\370', '\371', '\372', '\373', '\374', '\335', '\376', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' +}; + +static const unsigned short EncISO_8859_9_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, + 0x00a0, 0x00a0, 0x30e2, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0, + 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x30e2, 0x00a0, 0x01a0, + 0x00a0, 0x10a0, 0x30e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x01a0, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2 +}; + +static int +mbc_case_fold(OnigCaseFoldType flag, + const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) +{ + const UChar* p = *pp; + + if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { + *lower++ = 's'; + *lower = 's'; + (*pp)++; + return 2; + } + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p)) + *lower = ENC_ISO_8859_9_TO_LOWER_CASE(*p); + else + *lower = *p; + + (*pp)++; + return 1; +} + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_ISO_8859_9_CTYPE(code, ctype); + else + return FALSE; +} + +static const OnigPairCaseFoldCodes CaseFoldMap[] = { + { 0xc0, 0xe0 }, + { 0xc1, 0xe1 }, + { 0xc2, 0xe2 }, + { 0xc3, 0xe3 }, + { 0xc4, 0xe4 }, + { 0xc5, 0xe5 }, + { 0xc6, 0xe6 }, + { 0xc7, 0xe7 }, + { 0xc8, 0xe8 }, + { 0xc9, 0xe9 }, + { 0xca, 0xea }, + { 0xcb, 0xeb }, + { 0xcc, 0xec }, + { 0xcd, 0xed }, + { 0xce, 0xee }, + { 0xcf, 0xef }, + + { 0xd0, 0xf0 }, + { 0xd1, 0xf1 }, + { 0xd2, 0xf2 }, + { 0xd3, 0xf3 }, + { 0xd4, 0xf4 }, + { 0xd5, 0xf5 }, + { 0xd6, 0xf6 }, + { 0xd8, 0xf8 }, + { 0xd9, 0xf9 }, + { 0xda, 0xfa }, + { 0xdb, 0xfb }, + { 0xdc, 0xfc }, + { 0xdd, 0xfd }, + { 0xde, 0xfe } +}; + +static int +apply_all_case_fold(OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + return onigenc_apply_all_case_fold_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, f, arg); +} + +static int +get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_get_case_fold_codes_by_str_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingISO_8859_9 = { + onigenc_single_byte_mbc_enc_len, + "ISO-8859-9", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + mbc_case_fold, + apply_all_case_fold, + get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/koi8.c b/internal/components/third_party/oniguruma/src/koi8.c new file mode 100644 index 0000000000..90a04f9cf1 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/koi8.c @@ -0,0 +1,240 @@ +/********************************************************************** + koi8.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_KOI8_TO_LOWER_CASE(c) EncKOI8_ToLowerCaseTable[c] +#define ENC_IS_KOI8_CTYPE(code,ctype) \ + ((EncKOI8_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const UChar EncKOI8_ToLowerCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337' +}; + +static const unsigned short EncKOI8_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2 +}; + + +static int +koi8_mbc_case_fold(OnigCaseFoldType flag, + const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) +{ + const UChar* p = *pp; + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p)) + *lower = ENC_KOI8_TO_LOWER_CASE(*p); + else + *lower = *p; + + (*pp)++; + return 1; +} + +static int +koi8_is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_KOI8_CTYPE(code, ctype); + else + return FALSE; +} + +static const OnigPairCaseFoldCodes CaseFoldMap[] = { + { 0xc0, 0xe0 }, + { 0xc1, 0xe1 }, + { 0xc2, 0xe2 }, + { 0xc3, 0xe3 }, + { 0xc4, 0xe4 }, + { 0xc5, 0xe5 }, + { 0xc6, 0xe6 }, + { 0xc7, 0xe7 }, + { 0xc8, 0xe8 }, + { 0xc9, 0xe9 }, + { 0xca, 0xea }, + { 0xcb, 0xeb }, + { 0xcc, 0xec }, + { 0xcd, 0xed }, + { 0xce, 0xee }, + { 0xcf, 0xef }, + + { 0xd0, 0xf0 }, + { 0xd1, 0xf1 }, + { 0xd2, 0xf2 }, + { 0xd3, 0xf3 }, + { 0xd4, 0xf4 }, + { 0xd5, 0xf5 }, + { 0xd6, 0xf6 }, + { 0xd7, 0xf7 }, + { 0xd8, 0xf8 }, + { 0xd9, 0xf9 }, + { 0xda, 0xfa }, + { 0xdb, 0xfb }, + { 0xdc, 0xfc }, + { 0xdd, 0xfd }, + { 0xde, 0xfe }, + { 0xdf, 0xff }, + + { 0xe0, 0xc0 }, + { 0xe1, 0xc1 }, + { 0xe2, 0xc2 }, + { 0xe3, 0xc3 }, + { 0xe4, 0xc4 }, + { 0xe5, 0xc5 }, + { 0xe6, 0xc6 }, + { 0xe7, 0xc7 }, + { 0xe8, 0xc8 }, + { 0xe9, 0xc9 }, + { 0xea, 0xca }, + { 0xeb, 0xcb }, + { 0xec, 0xcc }, + { 0xed, 0xcd }, + { 0xee, 0xce }, + { 0xef, 0xcf }, + + { 0xf0, 0xd0 }, + { 0xf1, 0xd1 }, + { 0xf2, 0xd2 }, + { 0xf3, 0xd3 }, + { 0xf4, 0xd4 }, + { 0xf5, 0xd5 }, + { 0xf6, 0xd6 }, + { 0xf7, 0xd7 }, + { 0xf8, 0xd8 }, + { 0xf9, 0xd9 }, + { 0xfa, 0xda }, + { 0xfb, 0xdb }, + { 0xfc, 0xdc }, + { 0xfe, 0xde }, + { 0xff, 0xdf } +}; + +static int +koi8_apply_all_case_fold(OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + return onigenc_apply_all_case_fold_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, + flag, f, arg); +} + +static int +koi8_get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_get_case_fold_codes_by_str_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingKOI8 = { + onigenc_single_byte_mbc_enc_len, + "KOI8", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + koi8_mbc_case_fold, + koi8_apply_all_case_fold, + koi8_get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + koi8_is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/koi8_r.c b/internal/components/third_party/oniguruma/src/koi8_r.c new file mode 100644 index 0000000000..31cc870b21 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/koi8_r.c @@ -0,0 +1,208 @@ +/********************************************************************** + koi8_r.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +#define ENC_KOI8_R_TO_LOWER_CASE(c) EncKOI8_R_ToLowerCaseTable[c] +#define ENC_IS_KOI8_R_CTYPE(code,ctype) \ + ((EncKOI8_R_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const UChar EncKOI8_R_ToLowerCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\243', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337' +}; + +static const unsigned short EncKOI8_R_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, + 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, + 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, + 0x00a0, 0x00a0, 0x0284, 0x00a0, 0x00a0, 0x10a0, 0x01a0, 0x00a0, + 0x00a0, 0x00a0, 0x00a0, 0x30e2, 0x00a0, 0x00a0, 0x00a0, 0x00a0, + 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, + 0x00a0, 0x00a0, 0x00a0, 0x34a2, 0x00a0, 0x00a0, 0x00a0, 0x00a0, + 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2 +}; + +static int +koi8_r_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED, + const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) +{ + const UChar* p = *pp; + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p)) + *lower = ENC_KOI8_R_TO_LOWER_CASE(*p); + else + *lower = *p; + + (*pp)++; + return 1; +} + +static int +koi8_r_is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 256) + return ENC_IS_KOI8_R_CTYPE(code, ctype); + else + return FALSE; +} + +static const OnigPairCaseFoldCodes CaseFoldMap[] = { + { 0xa3, 0xb3 }, + + { 0xc0, 0xe0 }, + { 0xc1, 0xe1 }, + { 0xc2, 0xe2 }, + { 0xc3, 0xe3 }, + { 0xc4, 0xe4 }, + { 0xc5, 0xe5 }, + { 0xc6, 0xe6 }, + { 0xc7, 0xe7 }, + { 0xc8, 0xe8 }, + { 0xc9, 0xe9 }, + { 0xca, 0xea }, + { 0xcb, 0xeb }, + { 0xcc, 0xec }, + { 0xcd, 0xed }, + { 0xce, 0xee }, + { 0xcf, 0xef }, + + { 0xd0, 0xf0 }, + { 0xd1, 0xf1 }, + { 0xd2, 0xf2 }, + { 0xd3, 0xf3 }, + { 0xd4, 0xf4 }, + { 0xd5, 0xf5 }, + { 0xd6, 0xf6 }, + { 0xd7, 0xf7 }, + { 0xd8, 0xf8 }, + { 0xd9, 0xf9 }, + { 0xda, 0xfa }, + { 0xdb, 0xfb }, + { 0xdc, 0xfc }, + { 0xdd, 0xfd }, + { 0xde, 0xfe }, + { 0xdf, 0xff } +}; + +static int +koi8_r_apply_all_case_fold(OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + return onigenc_apply_all_case_fold_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, + flag, f, arg); +} + +static int +koi8_r_get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_get_case_fold_codes_by_str_with_map( + sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingKOI8_R = { + onigenc_single_byte_mbc_enc_len, + "KOI8-R", /* name */ + 1, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + koi8_r_mbc_case_fold, + koi8_r_apply_all_case_fold, + koi8_r_get_case_fold_codes_by_str, + onigenc_minimum_property_name_to_ctype, + koi8_r_is_code_ctype, + onigenc_not_support_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + onigenc_always_true_is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/make_property.sh b/internal/components/third_party/oniguruma/src/make_property.sh new file mode 100755 index 0000000000..c457ff5024 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/make_property.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +GPERF=gperf +SED=sed + +TMP1=gperf1.tmp +TMP2=gperf2.tmp + +GPERF_OPT='-pt -T -L ANSI-C' + +ADD_CAST='s/return +len +\+ +asso_values/return (unsigned int )len + asso_values/' + +${GPERF} ${GPERF_OPT} -N onigenc_euc_jp_lookup_property_name --output-file ${TMP1} euc_jp_prop.gperf +cat ${TMP1} | ${SED} -E "${ADD_CAST}" > euc_jp_prop.c + +${GPERF} ${GPERF_OPT} -N onigenc_sjis_lookup_property_name --output-file ${TMP2} sjis_prop.gperf +cat ${TMP2} | ${SED} -E "${ADD_CAST}" > sjis_prop.c + +rm -f ${TMP1} ${TMP2} + +exit 0 diff --git a/internal/components/third_party/oniguruma/src/make_unicode_egcb.sh b/internal/components/third_party/oniguruma/src/make_unicode_egcb.sh new file mode 100755 index 0000000000..be60d36673 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/make_unicode_egcb.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +NAME=unicode_egcb_data + +python3 make_unicode_egcb_data.py > ${NAME}.c + +exit 0 diff --git a/internal/components/third_party/oniguruma/src/make_unicode_egcb_data.py b/internal/components/third_party/oniguruma/src/make_unicode_egcb_data.py new file mode 100755 index 0000000000..f74403edb5 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/make_unicode_egcb_data.py @@ -0,0 +1,268 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# make_unicode_egcb_data.py +# Copyright (c) 2017-2024 K.Kosako + +import sys +import re + +MAX_CODE_POINT = 0x10ffff + +PR_TOTAL_REG = re.compile("#\s*Total\s+(?:code\s+points|elements):") +PR_LINE_REG = re.compile("([0-9A-Fa-f]+)(?:..([0-9A-Fa-f]+))?\s*;\s*(\w+)") +PA_LINE_REG = re.compile("(\w+)\s*;\s*(\w+)") +PVA_LINE_REG = re.compile("(sc|gc)\s*;\s*(\w+)\s*;\s*(\w+)(?:\s*;\s*(\w+))?") +BL_LINE_REG = re.compile("([0-9A-Fa-f]+)\.\.([0-9A-Fa-f]+)\s*;\s*(.*)") +VERSION_REG = re.compile("#\s*.*-(\d+)\.(\d+)\.(\d+)\.txt") + +VERSION_INFO = [-1, -1, -1] +DIC = { } +PROPS = [] +PropIndex = { } + +def check_version_info(s): + m = VERSION_REG.match(s) + if m is not None: + VERSION_INFO[0] = int(m.group(1)) + VERSION_INFO[1] = int(m.group(2)) + VERSION_INFO[2] = int(m.group(3)) + +def print_ranges(ranges): + for (start, end) in ranges: + print("0x%06x, 0x%06x" % (start, end)) + +def print_prop_and_index(prop, i): + print("%-35s %3d" % (prop + ',', i)) + PropIndex[prop] = i + +def dic_find_by_value(dic, v): + for key, val in dic.items(): + if val == v: + return key + + return None + + +def normalize_ranges(in_ranges, sort=False): + if sort: + ranges = sorted(in_ranges) + else: + ranges = in_ranges + + r = [] + prev = None + for (start, end) in ranges: + if prev is not None and prev >= start - 1: + (pstart, pend) = r.pop() + end = max(pend, end) + start = pstart + + r.append((start, end)) + prev = end + + return r + +def inverse_ranges(in_ranges): + r = [] + prev = 0x000000 + for (start, end) in in_ranges: + if prev < start: + r.append((prev, start - 1)) + + prev = end + 1 + + if prev < MAX_CODE_POINT: + r.append((prev, MAX_CODE_POINT)) + + return r + +def add_ranges(r1, r2): + r = r1 + r2 + return normalize_ranges(r, True) + +def sub_one_range(one_range, rs): + r = [] + (s1, e1) = one_range + n = len(rs) + for i in range(0, n): + (s2, e2) = rs[i] + if s2 >= s1 and s2 <= e1: + if s2 > s1: + r.append((s1, s2 - 1)) + if e2 >= e1: + return r + + s1 = e2 + 1 + elif s2 < s1 and e2 >= s1: + if e2 < e1: + s1 = e2 + 1 + else: + return r + + r.append((s1, e1)) + return r + +def sub_ranges(r1, r2): + r = [] + for one_range in r1: + rs = sub_one_range(one_range, r2) + r.extend(rs) + + return r + +def add_ranges_in_dic(dic): + r = [] + for k, v in dic.items(): + r = r + v + + return normalize_ranges(r, True) + +def normalize_ranges_in_dic(dic, sort=False): + for k, v in dic.items(): + r = normalize_ranges(v, sort) + dic[k] = r + +def merge_dic(to_dic, from_dic): + to_keys = to_dic.keys() + from_keys = from_dic.keys() + common = list(set(to_keys) & set(from_keys)) + if len(common) != 0: + print >> sys.stderr, "merge_dic: collision: %s" % sorted(common) + + to_dic.update(from_dic) + +def merge_props(to_props, from_props): + common = list(set(to_props) & set(from_props)) + if len(common) != 0: + print >> sys.stderr, "merge_props: collision: %s" % sorted(common) + + to_props.extend(from_props) + +def add_range_into_dic(dic, name, start, end): + d = dic.get(name, None) + if d is None: + d = [(start, end)] + dic[name] = d + else: + d.append((start, end)) + +def list_sub(a, b): + x = set(a) - set(b) + return list(x) + +def parse_properties(path): + with open(path, 'r') as f: + dic = { } + prop = None + props = [] + for line in f: + s = line.strip() + if len(s) == 0: + continue + + if s[0] == '#': + if VERSION_INFO[0] < 0: + check_version_info(s) + + m = PR_LINE_REG.match(s) + if m: + prop = m.group(3) + if m.group(2): + start = int(m.group(1), 16) + end = int(m.group(2), 16) + add_range_into_dic(dic, prop, start, end) + else: + start = int(m.group(1), 16) + add_range_into_dic(dic, prop, start, start) + + elif PR_TOTAL_REG.match(s) is not None: + props.append(prop) + + normalize_ranges_in_dic(dic) + return (dic, props) + + +### main ### +argv = sys.argv +argc = len(argv) + +dic, props = parse_properties('GraphemeBreakProperty.txt') +merge_dic(DIC, dic) +merge_props(PROPS, props) + +PROPS = sorted(PROPS) + +print('/* unicode_egcb_data.c: Generated by make_unicode_egcb_data.py. */') + +COPYRIGHT = ''' +/*- + * Copyright (c) 2017-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +'''.strip() + +print(COPYRIGHT) +print('') +if VERSION_INFO[0] < 0: + raise RuntimeError("Version is not found") + +print("#define GRAPHEME_BREAK_PROPERTY_VERSION %02d%02d%02d" % (VERSION_INFO[0], VERSION_INFO[1], VERSION_INFO[2])) +print('') + +ranges = [] +for prop in PROPS: + rs = DIC[prop] + for (start, end) in rs: + ranges.append((start, end, prop)) + +ranges = sorted(ranges, key=lambda x: x[0]) + +prev = -1 +for (start, end, prop) in ranges: + if prev >= start: + raise ValueError("{2}:{0} - {1} range overlap prev value {3}".format(start, end, prop, prev)) + + +print('/*') +for prop in PROPS: + print("%s" % prop) +print('*/') +print('') + +num_ranges = len(ranges) +print("static int EGCB_RANGE_NUM = %d;" % num_ranges) + +print('static EGCB_RANGE_TYPE EGCB_RANGES[] = {') +for i, (start, end, prop) in enumerate(ranges): + if i == num_ranges - 1: + comma = '' + else: + comma = ',' + + type_name = 'EGCB_' + prop + print(" {0x%06x, 0x%06x, %s }%s" % (start, end, type_name, comma)) + +print('};') + +sys.exit(0) diff --git a/internal/components/third_party/oniguruma/src/make_unicode_fold.sh b/internal/components/third_party/oniguruma/src/make_unicode_fold.sh new file mode 100755 index 0000000000..625b3dfd1c --- /dev/null +++ b/internal/components/third_party/oniguruma/src/make_unicode_fold.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +GPERF=gperf + +TMP0=gperf0.tmp +TMP1=gperf1.tmp +TMP2=gperf2.tmp +TMP3=gperf3.tmp + +GPERF_OPT='-n -C -T -c -t -j1 -L ANSI-C ' + +python3 make_unicode_fold_data.py > unicode_fold_data.c + +${GPERF} ${GPERF_OPT} -F,-1,0 -N onigenc_unicode_unfold_key unicode_unfold_key.gperf > ${TMP0} +python3 gperf_unfold_key_conv.py < ${TMP0} > unicode_unfold_key.c + +${GPERF} ${GPERF_OPT} -F,-1 -N onigenc_unicode_fold1_key unicode_fold1_key.gperf > ${TMP1} +python3 gperf_fold_key_conv.py 1 < ${TMP1} > unicode_fold1_key.c + +${GPERF} ${GPERF_OPT} -F,-1 -N onigenc_unicode_fold2_key unicode_fold2_key.gperf > ${TMP2} +python3 gperf_fold_key_conv.py 2 < ${TMP2} > unicode_fold2_key.c + +${GPERF} ${GPERF_OPT} -F,-1 -N onigenc_unicode_fold3_key unicode_fold3_key.gperf > ${TMP3} +python3 gperf_fold_key_conv.py 3 < ${TMP3} > unicode_fold3_key.c + +# remove redundant EOLs before EOF +perl -i -pe 'BEGIN{undef $/}s/\n\n*\z/\n/;' unicode_fold_data.c +perl -i -pe 'BEGIN{undef $/}s/\n\n*\z/\n/;' unicode_fold1_key.c +perl -i -pe 'BEGIN{undef $/}s/\n\n*\z/\n/;' unicode_fold2_key.c +perl -i -pe 'BEGIN{undef $/}s/\n\n*\z/\n/;' unicode_fold3_key.c +perl -i -pe 'BEGIN{undef $/}s/\n\n*\z/\n/;' unicode_unfold_key.c + +rm -f ${TMP0} ${TMP1} ${TMP2} ${TMP3} +rm -f unicode_unfold_key.gperf unicode_fold1_key.gperf unicode_fold2_key.gperf unicode_fold3_key.gperf + +exit 0 diff --git a/internal/components/third_party/oniguruma/src/make_unicode_fold_data.py b/internal/components/third_party/oniguruma/src/make_unicode_fold_data.py new file mode 100755 index 0000000000..81565b359d --- /dev/null +++ b/internal/components/third_party/oniguruma/src/make_unicode_fold_data.py @@ -0,0 +1,486 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# make_unicode_fold_data.py +# Copyright (c) 2016-2024 K.Kosako + +import sys +import re + +SOURCE_FILE = 'CaseFolding.txt' +GPERF_UNFOLD_KEY_FILE = 'unicode_unfold_key.gperf' +GPERF_FOLD_KEY_FILES = ['unicode_fold1_key.gperf', 'unicode_fold2_key.gperf', 'unicode_fold3_key.gperf'] + + +DataName = 'OnigUnicodeFolds' + +ENCODING = 'utf-8' + +LINE_REG = re.compile("([0-9A-F]{1,6}); (.); ([0-9A-F]{1,6})(?: ([0-9A-F]{1,6}))?(?: ([0-9A-F]{1,6}))?;(?:\s*#\s*)(.*)") +VERSION_REG = re.compile("#.*-(\d+)\.(\d+)\.(\d+)\.txt") + +VERSION_INFO = [-1, -1, -1] + +FOLDS = {} +TURKISH_FOLDS = {} +LOCALE_FOLDS = {} + +UNFOLDS = {} +TURKISH_UNFOLDS = {} +LOCALE_UNFOLDS = {} + +COPYRIGHT = ''' +/*- + * Copyright (c) 2017-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +'''.strip() + + +class Entry: + def __init__(self, fold): + self.fold = fold + self.unfolds = [] + self.fold_len = len(fold) + self.index = -1 + self.comment = None + +def fold_key(fold): + sfold = map(lambda i: "%06x" % i, fold) + return ':'.join(sfold) + +def form16(x, size): + form = "0x%06x" if x > 0xffff else "0x%04x" + s = form % x + rem = size - len(s) + if rem > 0: + s = ' ' * rem + s + + return s + +def form3bytes(x): + x0 = x & 0xff + x1 = (x>>8) & 0xff + x2 = (x>>16) & 0xff + return "\\x%02x\\x%02x\\x%02x" % (x2, x1, x0) + +def enc_len(code, encode): + u = unichr(code) + s = u.encode(encode) + return len(s) + +def check_version_info(s): + m = VERSION_REG.match(s) + if m is not None: + VERSION_INFO[0] = int(m.group(1)) + VERSION_INFO[1] = int(m.group(2)) + VERSION_INFO[2] = int(m.group(3)) + +def parse_line(s): + if len(s) == 0: + return False + if s[0] == '#': + if VERSION_INFO[0] < 0: + check_version_info(s) + return False + + m = LINE_REG.match(s) + if m is None: + print >> sys.stderr, s.encode(ENCODING) + sys.exit(-1) + + s_unfold = m.group(1) + s_type = m.group(2) + s_fold = m.group(3) + comment = m.group(6) + + if s_type == 'S': + return False; + + unfold = int(s_unfold, 16) + f1 = int(s_fold, 16) + fold = [f1] + if m.group(4) is not None: + f2 = int(m.group(4), 16) + fold.append(f2) + if m.group(5) is not None: + f3 = int(m.group(5), 16) + fold.append(f3) + + if s_type == 'T': + dic = TURKISH_FOLDS + undic = TURKISH_UNFOLDS + else: + dic = FOLDS + undic = UNFOLDS + + key = fold_key(fold) + e = dic.get(key, None) + if e is None: + e = Entry(fold) + e.comment = comment + dic[key] = e + + e.unfolds.append(unfold) + + if undic.get(unfold, None) is not None: + print >> sys.stderr, ("unfold dup: 0x%04x %s\n" % (unfold, s_type)) + undic[unfold] = e + + return True + +def parse_file(f): + line = f.readline() + while line: + s = line.strip() + parse_line(s) + line = f.readline() + +def make_locale(): + for unfold, te in TURKISH_UNFOLDS.items(): + e = UNFOLDS.get(unfold, None) + if e is None: + continue + + fkey = fold_key(e.fold) + if len(e.unfolds) == 1: + del FOLDS[fkey] + else: + e.unfolds.remove(unfold) + e = Entry(e.fold) + e.unfolds.append(unfold) + + LOCALE_FOLDS[fkey] = e + LOCALE_UNFOLDS[unfold] = e + del UNFOLDS[unfold] + +def output_typedef(f): + s = """\ +typedef unsigned long OnigCodePoint; +""" + print >> f, s + +def divide_by_fold_len(d): + l = d.items() + l1 = filter(lambda x:x[1].fold_len == 1, l) + l2 = filter(lambda x:x[1].fold_len == 2, l) + l3 = filter(lambda x:x[1].fold_len == 3, l) + sl1 = sorted(l1, key=lambda x:x[0]) + sl2 = sorted(l2, key=lambda x:x[0]) + sl3 = sorted(l3, key=lambda x:x[0]) + return (sl1, sl2, sl3) + +def output_comment(f, s): + f.write(" /* %s */" % s) + +def output_data_n1(f, n, fn, c, out_comment): + for k, e in fn: + e.index = c + if out_comment and n > 1 and e.comment is not None: + output_comment(f, e.comment) + print('', file=f) + + f.write(' ') + f.write("/*%4d*/ " % c) + for i in range(0, n): + s = form16(e.fold[i], 8) + f.write(" %s," % s) + + usize = len(e.unfolds) + f.write(" %d," % usize) + for u in e.unfolds: + s = form16(u, 8) + f.write(" %s," % s) + + if out_comment and n == 1 and e.comment is not None: + if len(e.comment) < 35: + s = e.comment + else: + s = e.comment[0:33] + '..' + + output_comment(f, s) + + f.write("\n") + c += n + 1 + usize + + return c + +def output_data_n(f, name, n, fn, lfn, out_comment): + print("OnigCodePoint %s%d[] = {" % (name, n), file=f) + c = 0 + c = output_data_n1(f, n, fn, c, out_comment) + print("#define FOLDS%d_NORMAL_END_INDEX %d" % (n, c), file=f) + print(" /* ----- LOCALE ----- */", file=f) + c = output_data_n1(f, n, lfn, c, out_comment) + print("#define FOLDS%d_END_INDEX %d" % (n, c), file=f) + print("};", file=f) + +def output_fold_data(f, name, out_comment): + f1, f2, f3 = divide_by_fold_len(FOLDS) + lf1, lf2, lf3 = divide_by_fold_len(LOCALE_FOLDS) + + output_data_n(f, name, 1, f1, lf1, out_comment) + print('', file=f) + output_data_n(f, name, 2, f2, lf2, out_comment) + print('', file=f) + output_data_n(f, name, 3, f3, lf3, out_comment) + print('', file=f) + +def output_macros(f, name): + print >> f, "#define FOLDS1_FOLD(i) (%s1 + (i))" % name + print >> f, "#define FOLDS2_FOLD(i) (%s2 + (i))" % name + print >> f, "#define FOLDS3_FOLD(i) (%s3 + (i))" % name + + print >> f, "#define FOLDS1_UNFOLDS_NUM(i) %s1[(i)+1]" % name + print >> f, "#define FOLDS2_UNFOLDS_NUM(i) %s2[(i)+2]" % name + print >> f, "#define FOLDS3_UNFOLDS_NUM(i) %s3[(i)+3]" % name + + print >> f, "#define FOLDS1_UNFOLDS(i) (%s1 + (i) + 2)" % name + print >> f, "#define FOLDS2_UNFOLDS(i) (%s2 + (i) + 3)" % name + print >> f, "#define FOLDS3_UNFOLDS(i) (%s3 + (i) + 4)" % name + + print >> f, "#define FOLDS1_NEXT_INDEX(i) ((i) + 2 + %s1[(i)+1])" % name + print >> f, "#define FOLDS2_NEXT_INDEX(i) ((i) + 3 + %s1[(i)+2])" % name + print >> f, "#define FOLDS3_NEXT_INDEX(i) ((i) + 4 + %s1[(i)+3])" % name + +def output_fold_source(f, out_comment): + print("/* This file was generated by make_unicode_fold_data.py. */", file=f) + print(COPYRIGHT, file=f) + print("\n", file=f) + print('#include "regenc.h"', file=f) + print('', file=f) + if VERSION_INFO[0] < 0: + raise RuntimeError("Version is not found") + + print("#define UNICODE_CASEFOLD_VERSION %02d%02d%02d" % (VERSION_INFO[0], VERSION_INFO[1], VERSION_INFO[2])) + print('') + #output_macros(f, DataName) + print('', file=f) + #output_typedef(f) + output_fold_data(f, DataName, out_comment) + + +def output_gperf_unfold_key(f): + head = "%{\n/* This gperf source file was generated by make_unicode_fold_data.py */\n\n" + COPYRIGHT + """\ + +#include "regint.h" +%} + +struct ByUnfoldKey { + OnigCodePoint code; + short int index; + short int fold_len; +}; +%% +""" + f.write(head) + UNFOLDS.update(LOCALE_UNFOLDS) + l = UNFOLDS.items() + sl = sorted(l, key=lambda x:(x[1].fold_len, x[1].index)) + for k, e in sl: + f.write('"%s", /*0x%04x*/ %4d, %d\n' % + (form3bytes(k), k, e.index, e.fold_len)) + + print('%%', file=f) + +def output_gperf_fold_key(f, key_len): + head = "%{\n/* This gperf source file was generated by make_unicode_fold_data.py */\n\n" + COPYRIGHT + """\ + +#include "regint.h" +%} + +short int +%% +""" + f.write(head) + l = FOLDS.items() + l = filter(lambda x:x[1].fold_len == key_len, l) + sl = sorted(l, key=lambda x:x[1].index) + for k, e in sl: + skey = ''.join(map(lambda i: form3bytes(i), e.fold)) + f.write('"%s", %4d\n' % (skey, e.index)) + + print('%%', file=f) + +def output_gperf_source(): + with open(GPERF_UNFOLD_KEY_FILE, 'w') as f: + output_gperf_unfold_key(f) + + FOLDS.update(LOCALE_FOLDS) + + for i in range(1, 4): + with open(GPERF_FOLD_KEY_FILES[i-1], 'w') as f: + output_gperf_fold_key(f, i) + +def unfolds_byte_length_check(encode): + l = UNFOLDS.items() + sl = sorted(l, key=lambda x:(x[1].fold_len, x[1].index)) + for unfold, e in sl: + key_len = enc_len(unfold, encode) + fold_len = sum(map(lambda c: enc_len(c, encode), e.fold)) + if key_len > fold_len: + sfolds = ' '.join(map(lambda c: "0x%06x" % c, e.fold)) + s = "%s byte length: %d > %d: 0x%06x => %s" % (encode, key_len, fold_len, unfold, sfolds) + print >> sys.stderr, s + +def double_fold_check(): + l = UNFOLDS.items() + sl = sorted(l, key=lambda x:(x[1].fold_len, x[1].index)) + for unfold, e in sl: + for f in e.fold: + #print >> sys.stderr, ("check 0x%06x" % f) + e2 = UNFOLDS.get(f) + if e2 is not None: + s = "double folds: 0x%06x => %s, 0x%06x => %s" % (unfold, e.fold, f, e2.fold) + print >> sys.stderr, s + +def unfold_is_multi_code_folds_head_check(): + l = UNFOLDS.items() + l2 = filter(lambda x:x[1].fold_len == 2, l) + l3 = filter(lambda x:x[1].fold_len == 3, l) + sl = sorted(l, key=lambda x:(x[1].fold_len, x[1].index)) + for unfold, _ in sl: + for k, e in l2: + if e.fold[0] == unfold: + s = "unfold 0x%06x is multi-code fold head in %s" % (unfold, e.fold) + print >> sys.stderr, s + for k, e in l3: + if e.fold[0] == unfold: + s = "unfold 0x%06x is multi-code fold head in %s" % (unfold, e.fold) + print >> sys.stderr, s + +def make_one_folds(l): + h = {} + for unfold, e in l: + if e.fold_len != 1: + continue + fold = e.fold[0] + unfolds = h.get(fold) + if unfolds is None: + unfolds = [unfold] + h[fold] = unfolds + else: + unfolds.append(unfold) + + return h + +def make_foldn_heads(l, fold_len, one_folds): + h = {} + for unfold, e in l: + if e.fold_len != fold_len: + continue + unfolds = one_folds.get(e.fold[0]) + h[e.fold[0]] = (e, unfolds) + + return h + +def fold2_expansion_num(e, one_folds): + n = len(e.unfolds) + n0 = 1 + u0 = one_folds.get(e.fold[0]) + if u0 is not None: + n0 += len(u0) + n1 = 1 + u1 = one_folds.get(e.fold[1]) + if u1 is not None: + n1 += len(u1) + n += (n0 * n1) + return n + +def fold3_expansion_num(e, one_folds): + n = len(e.unfolds) + n0 = 1 + u0 = one_folds.get(e.fold[0]) + if u0 is not None: + n0 += len(u0) + n1 = 1 + u1 = one_folds.get(e.fold[1]) + if u1 is not None: + n1 += len(u1) + n2 = 1 + u2 = one_folds.get(e.fold[2]) + if u2 is not None: + n2 += len(u2) + n += (n0 * n1 * n2) + return n + +def get_all_folds_expansion_num(x, one_folds, fold2_heads, fold3_heads): + e = UNFOLDS[x] + n = 0 + if e.fold_len == 1: + n1 = len(e.unfolds) + 1 # +1: fold + fx = e.fold[0] + r = fold2_heads.get(fx) + n2 = n3 = 0 + if r is not None: + e2, _ = r + n2 = fold2_expansion_num(e2, one_folds) + r = fold3_heads.get(fx) + if r is not None: + e3, _ = r + n3 = fold3_expansion_num(e3, one_folds) + n = max(n1, n2, n3) + elif e.fold_len == 2: + n = fold2_expansion_num(e, one_folds) + elif e.fold_len == 3: + n = fold3_expansion_num(e, one_folds) + else: + raise RuntimeError("Invalid fold_len %d" % (e.fold_len)) + + return n + +def get_all_folds_expansion_max_num(): + l = UNFOLDS.items() + one_folds = make_one_folds(l) + fold2_heads = make_foldn_heads(l, 2, one_folds) + fold3_heads = make_foldn_heads(l, 3, one_folds) + sl = sorted(l, key=lambda x:(x[1].fold_len, x[1].index)) + nmax = 0 + max_unfold = None + for unfold, e in sl: + n = get_all_folds_expansion_num(unfold, one_folds, fold2_heads, fold3_heads) + if nmax < n: + nmax = n + max_unfold = unfold + + return (nmax, max_unfold) + +## main ## +with open(SOURCE_FILE, 'r') as f: + parse_file(f) + +make_locale() + +out_comment = True +output_fold_source(sys.stdout, out_comment) + +output_gperf_source() + +#unfolds_byte_length_check('utf-8') +#unfolds_byte_length_check('utf-16') +double_fold_check() +unfold_is_multi_code_folds_head_check() + +#max_num, max_code = get_all_folds_expansion_max_num() +#max_num -= 1 # remove self +#print >> sys.stderr, "max expansion: 0x%06x: %d" % (max_code, max_num) diff --git a/internal/components/third_party/oniguruma/src/make_unicode_property.sh b/internal/components/third_party/oniguruma/src/make_unicode_property.sh new file mode 100755 index 0000000000..d36484a18b --- /dev/null +++ b/internal/components/third_party/oniguruma/src/make_unicode_property.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +GPERF=gperf +SED=sed + +NAME=unicode_property_data +TMP1=gperf1.tmp +TMP2=gperf2.tmp +TMP= + +GPERF_OPT='-T -C -c -t -j1 -L ANSI-C --ignore-case --pic -Q unicode_prop_name_pool' +POOL_CAST='s/\(int *\)\(size_t *\)&\(\(struct +unicode_prop_name_pool_t *\* *\) *0\)->unicode_prop_name_pool_str([^,]+)/pool_offset(\1)/g' +ADD_STATIC='s/(const +struct +PoolPropertyNameCtype +\*)/static \1/' +ADD_CAST='s/unsigned +int +hval *= *len/unsigned int hval = (unsigned int )len/' + +python3 make_unicode_property_data.py > ${NAME}.gperf +python3 make_unicode_property_data.py -posix > ${NAME}_posix.gperf + +${GPERF} ${GPERF_OPT} -N unicode_lookup_property_name --output-file ${TMP1} ${NAME}.gperf +cat ${TMP1} | ${SED} -e 's/^#line.*$//g' | ${SED} -E "${POOL_CAST}" | ${SED} -E "${ADD_STATIC}" | ${SED} -E "${ADD_CAST}" > ${NAME}.c + +${GPERF} ${GPERF_OPT} -N unicode_lookup_property_name --output-file ${TMP2} ${NAME}_posix.gperf +cat ${TMP2} | ${SED} -e 's/^#line.*$//g' | ${SED} -E "${POOL_CAST}" | ${SED} -E "${ADD_STATIC}" > ${NAME}_posix.c + +rm -f ${NAME}.gperf ${NAME}_posix.gperf ${TMP1} ${TMP2} + +exit 0 diff --git a/internal/components/third_party/oniguruma/src/make_unicode_property_data.py b/internal/components/third_party/oniguruma/src/make_unicode_property_data.py new file mode 100755 index 0000000000..06392d0ace --- /dev/null +++ b/internal/components/third_party/oniguruma/src/make_unicode_property_data.py @@ -0,0 +1,645 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# make_unicode_property_data.py +# Copyright (c) 2016-2024 K.Kosako + +import sys +import re + +POSIX_LIST = [ + 'NEWLINE', 'Alpha', 'Blank', 'Cntrl', 'Digit', 'Graph', 'Lower', + 'Print', 'PosixPunct', 'Space', 'Upper', 'XDigit', 'Word', 'Alnum', + 'ASCII' +] + +MAX_CODE_POINT = 0x10ffff + +GRAPHEME_CLUSTER_BREAK_NAME_PREFIX = 'Grapheme_Cluster_Break_' + +UD_FIRST_REG = re.compile("<.+,\s*First>") +UD_LAST_REG = re.compile("<.+,\s*Last>") +PR_TOTAL_REG = re.compile("#\s*Total\s+(?:code\s+points|elements):") +PR_LINE_REG = re.compile("([0-9A-Fa-f]+)(?:..([0-9A-Fa-f]+))?\s*;\s*(\w+)") +PA_LINE_REG = re.compile("(\w+)\s*;\s*(\w+)") +PVA_LINE_REG = re.compile("(sc|gc)\s*;\s*(\w+)\s*;\s*(\w+)(?:\s*;\s*(\w+))?") +BL_LINE_REG = re.compile("([0-9A-Fa-f]+)\.\.([0-9A-Fa-f]+)\s*;\s*(.*)") +UNICODE_VERSION_REG = re.compile("#\s*.*-(\d+)\.(\d+)\.(\d+)\.txt") +EMOJI_VERSION_REG = re.compile("(?i)#.+Version\s+(\d+)\.(\d+)") + +VERSION_INFO = [-1, -1, -1] +EMOJI_VERSION_INFO = [-1, -1] + +DIC = { } +KDIC = { } +PropIndex = { } +PROPERTY_NAME_MAX_LEN = 0 +PROPS = None + +def normalize_prop_name(name): + name = re.sub(r'[ _]', '', name) + name = name.lower() + return name + +def fix_block_name(name): + s = re.sub(r'[- ]+', '_', name) + return 'In_' + s + +def print_ranges(ranges): + for (start, end) in ranges: + print("0x%06x, 0x%06x" % (start, end)) + + print(len(ranges)) + +def print_prop_and_index(prop, i): + print("%-35s %3d" % (prop + ',', i)) + PropIndex[prop] = i + +PRINT_CACHE = { } + +def print_property(prop, data, desc): + print('') + print("/* PROPERTY: '%s': %s */" % (prop, desc)) + + prev_prop = dic_find_by_value(PRINT_CACHE, data) + if prev_prop is not None: + print("#define CR_%s CR_%s" % (prop, prev_prop)) + else: + PRINT_CACHE[prop] = data + print("static const OnigCodePoint") + print("CR_%s[] = { %d," % (prop, len(data))) + for (start, end) in data: + print("0x%04x, 0x%04x," % (start, end)) + + print("}; /* END of CR_%s */" % prop) + + +def dic_find_by_value(dic, v): + for key, val in dic.items(): + if val == v: + return key + + return None + +def make_reverse_dic(dic): + rev = {} + for key, val in dic.items(): + d = rev.get(val, None) + if d is None: + rev[val] = [key] + else: + d.append(key) + + return rev + +def normalize_ranges(in_ranges, sort=False): + if sort: + ranges = sorted(in_ranges) + else: + ranges = in_ranges + + r = [] + prev = None + for (start, end) in ranges: + if prev is not None and prev >= start - 1: + (pstart, pend) = r.pop() + end = max(pend, end) + start = pstart + + r.append((start, end)) + prev = end + + return r + +def inverse_ranges(in_ranges): + r = [] + prev = 0x000000 + for (start, end) in in_ranges: + if prev < start: + r.append((prev, start - 1)) + + prev = end + 1 + + if prev < MAX_CODE_POINT: + r.append((prev, MAX_CODE_POINT)) + + return r + +def add_ranges(r1, r2): + r = r1 + r2 + return normalize_ranges(r, True) + +def sub_one_range(one_range, rs): + r = [] + (s1, e1) = one_range + n = len(rs) + for i in range(0, n): + (s2, e2) = rs[i] + if s2 >= s1 and s2 <= e1: + if s2 > s1: + r.append((s1, s2 - 1)) + if e2 >= e1: + return r + + s1 = e2 + 1 + elif s2 < s1 and e2 >= s1: + if e2 < e1: + s1 = e2 + 1 + else: + return r + + r.append((s1, e1)) + return r + +def sub_ranges(r1, r2): + r = [] + for one_range in r1: + rs = sub_one_range(one_range, r2) + r.extend(rs) + + return r + +def add_ranges_in_dic(dic): + r = [] + for k, v in dic.items(): + r = r + v + + return normalize_ranges(r, True) + +def normalize_ranges_in_dic(dic, sort=False): + for k, v in dic.items(): + r = normalize_ranges(v, sort) + dic[k] = r + +def merge_dic(to_dic, from_dic): + to_keys = to_dic.keys() + from_keys = from_dic.keys() + common = list(set(to_keys) & set(from_keys)) + if len(common) != 0: + print("merge_dic: collision: %s" % sorted(common), file=sys.stderr) + + to_dic.update(from_dic) + +def merge_props(to_dic, from_dic): + to_keys = to_dic.keys() + from_keys = from_dic.keys() + common = list(set(to_keys) & set(from_keys)) + if len(common) != 0: + print("merge_props: collision: %s" % sorted(common), file=sys.stderr) + + for k in from_keys: + to_dic[k] = True + +def add_range_into_dic(dic, name, start, end): + d = dic.get(name, None) + if d is None: + d = [(start, end)] + dic[name] = d + else: + d.append((start, end)) + +def list_sub(a, b): + x = set(a) - set(b) + return list(x) + + +def parse_unicode_data_file(f): + dic = { } + assigned = [] + for line in f: + s = line.strip() + if len(s) == 0: + continue + if s[0] == '#': + continue + + a = s.split(';') + code = int(a[0], 16) + desc = a[1] + prop = a[2] + if UD_FIRST_REG.match(desc) is not None: + start = code + end = None + elif UD_LAST_REG.match(desc) is not None: + end = code + else: + start = end = code + + if end is not None: + assigned.append((start, end)) + add_range_into_dic(dic, prop, start, end) + if len(prop) == 2: + add_range_into_dic(dic, prop[0:1], start, end) + + normalize_ranges_in_dic(dic) + return dic, assigned + +def parse_properties(path, klass, prop_prefix = None, version_reg = None): + version_match = None + with open(path, 'r') as f: + dic = { } + prop = None + for line in f: + s = line.strip() + if len(s) == 0: + continue + + if s[0] == '#' and version_reg is not None and version_match is None: + version_match = version_reg.match(s) + if version_match is not None: + continue + + m = PR_LINE_REG.match(s) + if m: + prop = m.group(3) + if prop_prefix is not None: + prop = prop_prefix + prop + + if m.group(2): + start = int(m.group(1), 16) + end = int(m.group(2), 16) + add_range_into_dic(dic, prop, start, end) + else: + start = int(m.group(1), 16) + add_range_into_dic(dic, prop, start, start) + + elif PR_TOTAL_REG.match(s) is not None: + KDIC[prop] = klass + + normalize_ranges_in_dic(dic) + return (dic, version_match) + +def parse_property_aliases(path): + a = { } + with open(path, 'r') as f: + for line in f: + s = line.strip() + if len(s) == 0: + continue + + m = PA_LINE_REG.match(s) + if not(m): + continue + + if m.group(1) == m.group(2): + continue + + a[m.group(1)] = m.group(2) + + return a + +def parse_property_value_aliases(path): + a = { } + with open(path, 'r') as f: + for line in f: + s = line.strip() + if len(s) == 0: + continue + + m = PVA_LINE_REG.match(s) + if not(m): + continue + + cat = m.group(1) + x2 = m.group(2) + x3 = m.group(3) + x4 = m.group(4) + if cat == 'sc': + if x2 != x3: + a[x2] = x3 + if x4 and x4 != x3: + a[x4] = x3 + else: + if x2 != x3: + a[x3] = x2 + if x4 and x4 != x2: + a[x4] = x2 + + return a + +def parse_blocks(path): + dic = { } + blocks = [] + with open(path, 'r') as f: + for line in f: + s = line.strip() + if len(s) == 0: + continue + + m = BL_LINE_REG.match(s) + if not(m): + continue + + start = int(m.group(1), 16) + end = int(m.group(2), 16) + block = fix_block_name(m.group(3)) + add_range_into_dic(dic, block, start, end) + blocks.append(block) + + noblock = fix_block_name('No_Block') + dic[noblock] = inverse_ranges(add_ranges_in_dic(dic)) + blocks.append(noblock) + return dic, blocks + +def add_primitive_props(assigned): + DIC['Assigned'] = normalize_ranges(assigned) + DIC['Any'] = [(0x000000, 0x10ffff)] + DIC['ASCII'] = [(0x000000, 0x00007f)] + DIC['NEWLINE'] = [(0x00000a, 0x00000a)] + DIC['Cn'] = inverse_ranges(DIC['Assigned']) + DIC['C'].extend(DIC['Cn']) + DIC['C'] = normalize_ranges(DIC['C'], True) + + d = [] + d.extend(DIC['Ll']) + d.extend(DIC['Lt']) + d.extend(DIC['Lu']) + DIC['LC'] = normalize_ranges(d, True) + +def add_posix_props(dic): + alnum = [] + alnum.extend(dic['Alphabetic']) + alnum.extend(dic['Nd']) # Nd == Decimal_Number + alnum = normalize_ranges(alnum, True) + + blank = [(0x0009, 0x0009)] + blank.extend(dic['Zs']) # Zs == Space_Separator + blank = normalize_ranges(blank, True) + + word = [] + word.extend(dic['Alphabetic']) + word.extend(dic['M']) # M == Mark + word.extend(dic['Nd']) + word.extend(dic['Pc']) # Pc == Connector_Punctuation + word = normalize_ranges(word, True) + + graph = sub_ranges(dic['Any'], dic['White_Space']) + graph = sub_ranges(graph, dic['Cc']) + graph = sub_ranges(graph, dic['Cs']) # Cs == Surrogate + graph = sub_ranges(graph, dic['Cn']) # Cn == Unassigned + graph = normalize_ranges(graph, True) + + p = [] + p.extend(graph) + p.extend(dic['Zs']) + p = normalize_ranges(p, True) + + dic['Alpha'] = dic['Alphabetic'] + dic['Upper'] = dic['Uppercase'] + dic['Lower'] = dic['Lowercase'] + dic['PosixPunct'] = add_ranges(dic['P'], dic['S']) # P == Punctuation + dic['Digit'] = dic['Nd'] + dic['XDigit'] = [(0x0030, 0x0039), (0x0041, 0x0046), (0x0061, 0x0066)] + dic['Alnum'] = alnum + dic['Space'] = dic['White_Space'] + dic['Blank'] = blank + dic['Cntrl'] = dic['Cc'] + dic['Word'] = word + dic['Graph'] = graph + dic['Print'] = p + + +def set_max_prop_name(name): + global PROPERTY_NAME_MAX_LEN + n = len(name) + if n > PROPERTY_NAME_MAX_LEN: + PROPERTY_NAME_MAX_LEN = n + +def entry_prop_name(name, index): + set_max_prop_name(name) + if OUTPUT_LIST_MODE and index >= len(POSIX_LIST): + print("%s" % (name), file=UPF) + +def entry_and_print_prop_and_index(name, index): + entry_prop_name(name, index) + nname = normalize_prop_name(name) + print_prop_and_index(nname, index) + +def parse_and_merge_properties(path, klass, prop_prefix = None, version_reg = None): + dic, ver_m = parse_properties(path, klass, prop_prefix, version_reg) + merge_dic(DIC, dic) + merge_props(PROPS, dic) + return dic, ver_m + + +### main ### +argv = sys.argv +argc = len(argv) + +COPYRIGHT = ''' +/*- + * Copyright (c) 2016-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +'''.strip() + +POSIX_ONLY = False +INCLUDE_GRAPHEME_CLUSTER_DATA = False + +for i in range(1, argc): + arg = argv[i] + if arg == '-posix': + POSIX_ONLY = True + elif arg == '-gc': + INCLUDE_GRAPHEME_CLUSTER_DATA = True + else: + print("Invalid argument: %s" % arg, file=sys.stderr) + + +OUTPUT_LIST_MODE = not(POSIX_ONLY) + +with open('UnicodeData.txt', 'r') as f: + dic, assigned = parse_unicode_data_file(f) + DIC = dic + add_primitive_props(assigned) + +PROPS = DIC.fromkeys(DIC, True) +PROPS = {k: v for k, v in PROPS.items() if k not in POSIX_LIST} + +_, ver_m = parse_and_merge_properties('DerivedCoreProperties.txt', 'Derived Property', None, UNICODE_VERSION_REG) +if ver_m is not None: + VERSION_INFO[0] = int(ver_m.group(1)) + VERSION_INFO[1] = int(ver_m.group(2)) + VERSION_INFO[2] = int(ver_m.group(3)) + +dic, _ = parse_and_merge_properties('Scripts.txt', 'Script') +DIC['Unknown'] = inverse_ranges(add_ranges_in_dic(dic)) + +parse_and_merge_properties('PropList.txt', 'Binary Property') + +_, ver_m = parse_and_merge_properties('emoji-data.txt', 'Emoji Property', None, EMOJI_VERSION_REG) +if ver_m is not None: + EMOJI_VERSION_INFO[0] = int(ver_m.group(1)) + EMOJI_VERSION_INFO[1] = int(ver_m.group(2)) + +PROPS['Unknown'] = True +KDIC['Unknown'] = 'Script' + +ALIASES = parse_property_aliases('PropertyAliases.txt') +a = parse_property_value_aliases('PropertyValueAliases.txt') +merge_dic(ALIASES, a) + +dic, BLOCKS = parse_blocks('Blocks.txt') +merge_dic(DIC, dic) + +if INCLUDE_GRAPHEME_CLUSTER_DATA: + dic, _ = parse_properties('GraphemeBreakProperty.txt', + 'GraphemeBreak Property', + GRAPHEME_CLUSTER_BREAK_NAME_PREFIX) + merge_dic(DIC, dic) + merge_props(PROPS, dic) + #prop = GRAPHEME_CLUSTER_BREAK_NAME_PREFIX + 'Other' + #DIC[prop] = inverse_ranges(add_ranges_in_dic(dic)) + #PROPS[prop] = True + #KDIC[prop] = 'GrapemeBreak Property' + +add_posix_props(DIC) +PROP_LIST = sorted(PROPS.keys()) + + +s = '''%{ +/* Generated by make_unicode_property_data.py. */ +''' +print(s) +print(COPYRIGHT) +print('') + +for prop in POSIX_LIST: + if prop == 'PosixPunct': + desc = "POSIX [[:punct:]]" + else: + desc = "POSIX [[:%s:]]" % prop + + print_property(prop, DIC[prop], desc) + +print('') + +if not(POSIX_ONLY): + for prop in PROP_LIST: + klass = KDIC.get(prop, None) + if klass is None: + n = len(prop) + if n == 1: + klass = 'Major Category' + elif n == 2: + klass = 'General Category' + else: + klass = '-' + + print_property(prop, DIC[prop], klass) + + for block in BLOCKS: + print_property(block, DIC[block], 'Block') + + +print('') +print("static const OnigCodePoint*\nconst CodeRanges[] = {") + +for prop in POSIX_LIST: + print(" CR_%s," % prop) + +if not(POSIX_ONLY): + for prop in PROP_LIST: + print(" CR_%s," % prop) + + for prop in BLOCKS: + print(" CR_%s," % prop) + +s = '''}; + +#define pool_offset(s) offsetof(struct unicode_prop_name_pool_t, unicode_prop_name_pool_str##s) + +%} +struct PoolPropertyNameCtype { + short int name; + short int ctype; +}; + +%% +''' +sys.stdout.write(s) + +if OUTPUT_LIST_MODE: + UPF = open("UNICODE_PROPERTIES", "w") + if VERSION_INFO[0] < 0: + raise RuntimeError("Unicode Version is not found") + if EMOJI_VERSION_INFO[0] < 0: + raise RuntimeError("Emoji Version is not found") + + print("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]), file=UPF) + print('', file=UPF) + +index = -1 +for prop in POSIX_LIST: + index += 1 + entry_and_print_prop_and_index(prop, index) + +if not(POSIX_ONLY): + for prop in PROP_LIST: + index += 1 + entry_and_print_prop_and_index(prop, index) + + NALIASES = map(lambda x:(normalize_prop_name(x[0]), x[0], x[1]), ALIASES.items()) + NALIASES = sorted(NALIASES) + for (nk, k, v) in NALIASES: + nv = normalize_prop_name(v) + if PropIndex.get(nk, None) is not None: + print("ALIASES: already exists: %s => %s" % (k, v), file=sys.stderr) + continue + aindex = PropIndex.get(nv, None) + if aindex is None: + #print("ALIASES: value is not exist: %s => %s" % (k, v), file=sys.stderr) + continue + + entry_prop_name(k, aindex) + print_prop_and_index(nk, aindex) + + for name in BLOCKS: + index += 1 + entry_and_print_prop_and_index(name, index) + +print('%%') +print('') +if not(POSIX_ONLY): + if VERSION_INFO[0] < 0: + raise RuntimeError("Unicode Version is not found") + if EMOJI_VERSION_INFO[0] < 0: + raise RuntimeError("Emoji Version is not found") + + print("#define UNICODE_PROPERTY_VERSION %02d%02d%02d" % (VERSION_INFO[0], VERSION_INFO[1], VERSION_INFO[2])) + print("#define UNICODE_EMOJI_VERSION %02d%02d" % (EMOJI_VERSION_INFO[0], EMOJI_VERSION_INFO[1])) + print('') + +print("#define PROPERTY_NAME_MAX_SIZE %d" % (PROPERTY_NAME_MAX_LEN + 10)) +print("#define CODE_RANGES_NUM %d" % (index + 1)) + +index_props = make_reverse_dic(PropIndex) +print('') +for i in range(index + 1): + for p in index_props[i]: + print("#define PROP_INDEX_%s %d" % (p.upper(), i)) + +if OUTPUT_LIST_MODE: + UPF.close() + +sys.exit(0) diff --git a/internal/components/third_party/oniguruma/src/make_unicode_wb.sh b/internal/components/third_party/oniguruma/src/make_unicode_wb.sh new file mode 100755 index 0000000000..61fafe58f5 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/make_unicode_wb.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +NAME=unicode_wb_data + +python3 make_unicode_wb_data.py > ${NAME}.c + +exit 0 diff --git a/internal/components/third_party/oniguruma/src/make_unicode_wb_data.py b/internal/components/third_party/oniguruma/src/make_unicode_wb_data.py new file mode 100755 index 0000000000..c154d2a4e1 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/make_unicode_wb_data.py @@ -0,0 +1,268 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# make_unicode_wb_data.py +# Copyright (c) 2019-2024 K.Kosako + +import sys +import re + +MAX_CODE_POINT = 0x10ffff + +PR_TOTAL_REG = re.compile("#\s*Total\s+(?:code\s+points|elements):") +PR_LINE_REG = re.compile("([0-9A-Fa-f]+)(?:..([0-9A-Fa-f]+))?\s*;\s*(\w+)") +PA_LINE_REG = re.compile("(\w+)\s*;\s*(\w+)") +PVA_LINE_REG = re.compile("(sc|gc)\s*;\s*(\w+)\s*;\s*(\w+)(?:\s*;\s*(\w+))?") +BL_LINE_REG = re.compile("([0-9A-Fa-f]+)\.\.([0-9A-Fa-f]+)\s*;\s*(.*)") +VERSION_REG = re.compile("#\s*.*-(\d+)\.(\d+)\.(\d+)\.txt") + +VERSION_INFO = [-1, -1, -1] +DIC = { } +PROPS = [] +PropIndex = { } + +def check_version_info(s): + m = VERSION_REG.match(s) + if m is not None: + VERSION_INFO[0] = int(m.group(1)) + VERSION_INFO[1] = int(m.group(2)) + VERSION_INFO[2] = int(m.group(3)) + +def print_ranges(ranges): + for (start, end) in ranges: + print("0x%06x, 0x%06x" % (start, end)) + +def print_prop_and_index(prop, i): + print("%-35s %3d" % (prop + ',', i)) + PropIndex[prop] = i + +def dic_find_by_value(dic, v): + for key, val in dic.items(): + if val == v: + return key + + return None + + +def normalize_ranges(in_ranges, sort=False): + if sort: + ranges = sorted(in_ranges) + else: + ranges = in_ranges + + r = [] + prev = None + for (start, end) in ranges: + if prev is not None and prev >= start - 1: + (pstart, pend) = r.pop() + end = max(pend, end) + start = pstart + + r.append((start, end)) + prev = end + + return r + +def inverse_ranges(in_ranges): + r = [] + prev = 0x000000 + for (start, end) in in_ranges: + if prev < start: + r.append((prev, start - 1)) + + prev = end + 1 + + if prev < MAX_CODE_POINT: + r.append((prev, MAX_CODE_POINT)) + + return r + +def add_ranges(r1, r2): + r = r1 + r2 + return normalize_ranges(r, True) + +def sub_one_range(one_range, rs): + r = [] + (s1, e1) = one_range + n = len(rs) + for i in range(0, n): + (s2, e2) = rs[i] + if s2 >= s1 and s2 <= e1: + if s2 > s1: + r.append((s1, s2 - 1)) + if e2 >= e1: + return r + + s1 = e2 + 1 + elif s2 < s1 and e2 >= s1: + if e2 < e1: + s1 = e2 + 1 + else: + return r + + r.append((s1, e1)) + return r + +def sub_ranges(r1, r2): + r = [] + for one_range in r1: + rs = sub_one_range(one_range, r2) + r.extend(rs) + + return r + +def add_ranges_in_dic(dic): + r = [] + for k, v in dic.items(): + r = r + v + + return normalize_ranges(r, True) + +def normalize_ranges_in_dic(dic, sort=False): + for k, v in dic.items(): + r = normalize_ranges(v, sort) + dic[k] = r + +def merge_dic(to_dic, from_dic): + to_keys = to_dic.keys() + from_keys = from_dic.keys() + common = list(set(to_keys) & set(from_keys)) + if len(common) != 0: + print >> sys.stderr, "merge_dic: collision: %s" % sorted(common) + + to_dic.update(from_dic) + +def merge_props(to_props, from_props): + common = list(set(to_props) & set(from_props)) + if len(common) != 0: + print >> sys.stderr, "merge_props: collision: %s" % sorted(common) + + to_props.extend(from_props) + +def add_range_into_dic(dic, name, start, end): + d = dic.get(name, None) + if d is None: + d = [(start, end)] + dic[name] = d + else: + d.append((start, end)) + +def list_sub(a, b): + x = set(a) - set(b) + return list(x) + +def parse_properties(path): + with open(path, 'r') as f: + dic = { } + prop = None + props = [] + for line in f: + s = line.strip() + if len(s) == 0: + continue + + if s[0] == '#': + if VERSION_INFO[0] < 0: + check_version_info(s) + + m = PR_LINE_REG.match(s) + if m: + prop = m.group(3) + if m.group(2): + start = int(m.group(1), 16) + end = int(m.group(2), 16) + add_range_into_dic(dic, prop, start, end) + else: + start = int(m.group(1), 16) + add_range_into_dic(dic, prop, start, start) + + elif PR_TOTAL_REG.match(s) is not None: + props.append(prop) + + normalize_ranges_in_dic(dic) + return (dic, props) + + +### main ### +argv = sys.argv +argc = len(argv) + +dic, props = parse_properties('WordBreakProperty.txt') +merge_dic(DIC, dic) +merge_props(PROPS, props) + +PROPS = sorted(PROPS) + +print('/* unicode_wb_data.c: Generated by make_unicode_wb_data.py. */') + +COPYRIGHT = ''' +/*- + * Copyright (c) 2019-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +'''.strip() + +print(COPYRIGHT) +print('') +if VERSION_INFO[0] < 0: + raise RuntimeError("Version is not found.") + +print("#define WORD_BREAK_PROPERTY_VERSION %02d%02d%02d" % (VERSION_INFO[0], VERSION_INFO[1], VERSION_INFO[2])) +print('') + +ranges = [] +for prop in PROPS: + rs = DIC[prop] + for (start, end) in rs: + ranges.append((start, end, prop)) + +ranges = sorted(ranges, key=lambda x: x[0]) + +prev = -1 +for (start, end, prop) in ranges: + if prev >= start: + raise ValueError("{2}:{0} - {1} range overlap prev value {3}".format(start, end, prop, prev)) + + +print('/*') +for prop in PROPS: + print("%s" % prop) +print('*/') +print('') + +num_ranges = len(ranges) +print("static int WB_RANGE_NUM = %d;" % num_ranges) + +print('static WB_RANGE_TYPE WB_RANGES[] = {') +for i, (start, end, prop) in enumerate(ranges): + if i == num_ranges - 1: + comma = '' + else: + comma = ',' + + type_name = 'WB_' + prop + print(" {0x%06x, 0x%06x, %s }%s" % (start, end, type_name, comma)) + +print('};') + +sys.exit(0) diff --git a/internal/components/third_party/oniguruma/src/mktable.c b/internal/components/third_party/oniguruma/src/mktable.c new file mode 100644 index 0000000000..91e10206eb --- /dev/null +++ b/internal/components/third_party/oniguruma/src/mktable.c @@ -0,0 +1,1188 @@ +/********************************************************************** + mktable.c +**********************************************************************/ +/*- + * Copyright (c) 2002-2022 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include + +#ifndef __USE_ISOC99 +#define __USE_ISOC99 +#endif + +#include + +#include "regenc.h" + +#define ASCII 0 +#define UNICODE_ISO_8859_1 1 +#define ISO_8859_1 2 +#define ISO_8859_2 3 +#define ISO_8859_3 4 +#define ISO_8859_4 5 +#define ISO_8859_5 6 +#define ISO_8859_6 7 +#define ISO_8859_7 8 +#define ISO_8859_8 9 +#define ISO_8859_9 10 +#define ISO_8859_10 11 +#define ISO_8859_11 12 +#define ISO_8859_13 13 +#define ISO_8859_14 14 +#define ISO_8859_15 15 +#define ISO_8859_16 16 +#define KOI8 17 +#define KOI8_R 18 + +typedef struct { + int num; + char* name; +} ENC_INFO; + +static ENC_INFO Info[] = { + { ASCII, "ASCII" }, + { UNICODE_ISO_8859_1, "UNICODE_ISO_8859_1" }, + { ISO_8859_1, "ISO_8859_1" }, + { ISO_8859_2, "ISO_8859_2" }, + { ISO_8859_3, "ISO_8859_3" }, + { ISO_8859_4, "ISO_8859_4" }, + { ISO_8859_5, "ISO_8859_5" }, + { ISO_8859_6, "ISO_8859_6" }, + { ISO_8859_7, "ISO_8859_7" }, + { ISO_8859_8, "ISO_8859_8" }, + { ISO_8859_9, "ISO_8859_9" }, + { ISO_8859_10, "ISO_8859_10" }, + { ISO_8859_11, "ISO_8859_11" }, + { ISO_8859_13, "ISO_8859_13" }, + { ISO_8859_14, "ISO_8859_14" }, + { ISO_8859_15, "ISO_8859_15" }, + { ISO_8859_16, "ISO_8859_16" }, + { KOI8, "KOI8" }, + { KOI8_R, "KOI8_R" } +}; + + +static int IsAlpha(int enc, int c) +{ + if (enc == ASCII) + return isalpha(c); + + if (c >= 0x41 && c <= 0x5a) return 1; + if (c >= 0x61 && c <= 0x7a) return 1; + + switch (enc) { + case UNICODE_ISO_8859_1: + case ISO_8859_1: + case ISO_8859_9: + if (c == 0xaa) return 1; + if (c == 0xb5) return 1; + if (c == 0xba) return 1; + if (c >= 0xc0 && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xff) return 1; + break; + + case ISO_8859_2: + if (c == 0xa1 || c == 0xa3) return 1; + if (c == 0xa5 || c == 0xa6) return 1; + if (c >= 0xa9 && c <= 0xac) return 1; + if (c >= 0xae && c <= 0xaf) return 1; + if (c == 0xb1 || c == 0xb3) return 1; + if (c == 0xb5 || c == 0xb6) return 1; + if (c >= 0xb9 && c <= 0xbc) return 1; + if (c >= 0xbe && c <= 0xbf) return 1; + if (c >= 0xc0 && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xfe) return 1; + break; + + case ISO_8859_3: + if (c == 0xa1) return 1; + if (c == 0xa6) return 1; + if (c >= 0xa9 && c <= 0xac) return 1; + if (c == 0xaf) return 1; + if (c == 0xb1) return 1; + if (c == 0xb5 || c == 0xb6) return 1; + if (c >= 0xb9 && c <= 0xbc) return 1; + if (c == 0xbf) return 1; + if (c >= 0xc0 && c <= 0xc2) return 1; + if (c >= 0xc4 && c <= 0xcf) return 1; + if (c >= 0xd1 && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xe2) return 1; + if (c >= 0xe4 && c <= 0xef) return 1; + if (c >= 0xf1 && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xfe) return 1; + break; + + case ISO_8859_4: + if (c >= 0xa1 && c <= 0xa3) return 1; + if (c == 0xa5 || c == 0xa6) return 1; + if (c >= 0xa9 && c <= 0xac) return 1; + if (c == 0xae) return 1; + if (c == 0xb1 || c == 0xb3) return 1; + if (c == 0xb5 || c == 0xb6) return 1; + if (c >= 0xb9 && c <= 0xbf) return 1; + if (c >= 0xc0 && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xfe) return 1; + break; + + case ISO_8859_5: + if (c >= 0xa1 && c <= 0xcf && c != 0xad) return 1; + if (c >= 0xd0 && c <= 0xff && c != 0xf0 && c != 0xfd) return 1; + break; + + case ISO_8859_6: + if (c >= 0xc1 && c <= 0xda) return 1; + if (c >= 0xe0 && c <= 0xf2) return 1; + break; + + case ISO_8859_7: + if (c == 0xb6) return 1; + if (c >= 0xb8 && c <= 0xba) return 1; + if (c == 0xbc) return 1; + if (c >= 0xbe && c <= 0xbf) return 1; + if (c == 0xc0) return 1; + if (c >= 0xc1 && c <= 0xdb && c != 0xd2) return 1; + if (c >= 0xdc && c <= 0xfe) return 1; + break; + + case ISO_8859_8: + if (c == 0xb5) return 1; + if (c >= 0xe0 && c <= 0xfa) return 1; + break; + + case ISO_8859_10: + if (c >= 0xa1 && c <= 0xa6) return 1; + if (c >= 0xa8 && c <= 0xac) return 1; + if (c == 0xae || c == 0xaf) return 1; + if (c >= 0xb1 && c <= 0xb6) return 1; + if (c >= 0xb8 && c <= 0xbc) return 1; + if (c >= 0xbe && c <= 0xff) return 1; + break; + + case ISO_8859_11: + if (c >= 0xa1 && c <= 0xda) return 1; + if (c >= 0xdf && c <= 0xfb) return 1; + break; + + case ISO_8859_13: + if (c == 0xa8) return 1; + if (c == 0xaa) return 1; + if (c == 0xaf) return 1; + if (c == 0xb5) return 1; + if (c == 0xb8) return 1; + if (c == 0xba) return 1; + if (c >= 0xbf && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xfe) return 1; + break; + + case ISO_8859_14: + if (c == 0xa1 || c == 0xa2) return 1; + if (c == 0xa4 || c == 0xa5) return 1; + if (c == 0xa6 || c == 0xa8) return 1; + if (c >= 0xaa && c <= 0xac) return 1; + if (c >= 0xaf && c <= 0xb5) return 1; + if (c >= 0xb7 && c <= 0xff) return 1; + break; + + case ISO_8859_15: + if (c == 0xaa) return 1; + if (c == 0xb5) return 1; + if (c == 0xba) return 1; + if (c >= 0xc0 && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xff) return 1; + if (c == 0xa6) return 1; + if (c == 0xa8) return 1; + if (c == 0xb4) return 1; + if (c == 0xb8) return 1; + if (c == 0xbc) return 1; + if (c == 0xbd) return 1; + if (c == 0xbe) return 1; + break; + + case ISO_8859_16: + if (c == 0xa1) return 1; + if (c == 0xa2) return 1; + if (c == 0xa3) return 1; + if (c == 0xa6) return 1; + if (c == 0xa8) return 1; + if (c == 0xaa) return 1; + if (c == 0xac) return 1; + if (c == 0xae) return 1; + if (c == 0xaf) return 1; + if (c == 0xb2) return 1; + if (c == 0xb3) return 1; + if (c == 0xb4) return 1; + if (c >= 0xb8 && c <= 0xba) return 1; + if (c == 0xbc) return 1; + if (c == 0xbd) return 1; + if (c == 0xbe) return 1; + if (c == 0xbf) return 1; + if (c >= 0xc0 && c <= 0xde) return 1; + if (c >= 0xdf && c <= 0xff) return 1; + break; + + case KOI8_R: + if (c == 0xa3 || c == 0xb3) return 1; + /* fall */ + case KOI8: + if (c >= 0xc0 && c <= 0xff) return 1; + break; + + default: + exit(-1); + } + + return 0; +} + +static int IsBlank(int enc, int c) +{ + if (enc == ASCII) + return isblank(c); + + if (c == 0x09 || c == 0x20) return 1; + + switch (enc) { + case UNICODE_ISO_8859_1: + case ISO_8859_1: + case ISO_8859_2: + case ISO_8859_3: + case ISO_8859_4: + case ISO_8859_5: + case ISO_8859_6: + case ISO_8859_7: + case ISO_8859_8: + case ISO_8859_9: + case ISO_8859_10: + case ISO_8859_11: + case ISO_8859_13: + case ISO_8859_14: + case ISO_8859_15: + case ISO_8859_16: + case KOI8: + if (c == 0xa0) return 1; + break; + + case KOI8_R: + if (c == 0x9a) return 1; + break; + + default: + exit(-1); + } + + return 0; +} + +static int IsCntrl(int enc, int c) +{ + if (enc == ASCII) + return iscntrl(c); + + if (c >= 0x00 && c <= 0x1F) return 1; + + switch (enc) { + case UNICODE_ISO_8859_1: + if (c == 0xad) return 1; + /* fall */ + case ISO_8859_1: + case ISO_8859_2: + case ISO_8859_3: + case ISO_8859_4: + case ISO_8859_5: + case ISO_8859_6: + case ISO_8859_7: + case ISO_8859_8: + case ISO_8859_9: + case ISO_8859_10: + case ISO_8859_11: + case ISO_8859_13: + case ISO_8859_14: + case ISO_8859_15: + case ISO_8859_16: + case KOI8: + if (c >= 0x7f && c <= 0x9F) return 1; + break; + + + case KOI8_R: + if (c == 0x7f) return 1; + break; + + default: + exit(-1); + } + + return 0; +} + +static int IsDigit(int enc ARG_UNUSED, int c) +{ + if (c >= 0x30 && c <= 0x39) return 1; + return 0; +} + +static int IsGraph(int enc, int c) +{ + if (enc == ASCII) + return isgraph(c); + + if (c >= 0x21 && c <= 0x7e) return 1; + + switch (enc) { + case UNICODE_ISO_8859_1: + case ISO_8859_1: + case ISO_8859_2: + case ISO_8859_4: + case ISO_8859_5: + case ISO_8859_9: + case ISO_8859_10: + case ISO_8859_13: + case ISO_8859_14: + case ISO_8859_15: + case ISO_8859_16: + if (c >= 0xa1 && c <= 0xff) return 1; + break; + + case ISO_8859_3: + if (c >= 0xa1) { + if (c == 0xa5 || c == 0xae || c == 0xbe || c == 0xc3 || c == 0xd0 || + c == 0xe3 || c == 0xf0) + return 0; + else + return 1; + } + break; + + case ISO_8859_6: + if (c == 0xa4 || c == 0xac || c == 0xad || c == 0xbb || c == 0xbf) + return 1; + if (c >= 0xc1 && c <= 0xda) return 1; + if (c >= 0xe0 && c <= 0xf2) return 1; + break; + + case ISO_8859_7: + if (c >= 0xa1 && c <= 0xfe && + c != 0xa4 && c != 0xa5 && c != 0xaa && + c != 0xae && c != 0xd2) return 1; + break; + + case ISO_8859_8: + if (c >= 0xa2 && c <= 0xfa) { + if (c >= 0xbf && c <= 0xde) return 0; + return 1; + } + break; + + case ISO_8859_11: + if (c >= 0xa1 && c <= 0xda) return 1; + if (c >= 0xdf && c <= 0xfb) return 1; + break; + + case KOI8: + if (c >= 0xc0 && c <= 0xff) return 1; + break; + + case KOI8_R: + if (c >= 0x80 && c <= 0xff && c != 0x9a) return 1; + break; + + default: + exit(-1); + } + + return 0; +} + +static int IsLower(int enc, int c) +{ + if (enc == ASCII) + return islower(c); + + if (c >= 0x61 && c <= 0x7a) return 1; + + switch (enc) { + case UNICODE_ISO_8859_1: + case ISO_8859_1: + case ISO_8859_9: + if (c == 0xaa) return 1; + if (c == 0xb5) return 1; + if (c == 0xba) return 1; + if (c >= 0xdf && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xff) return 1; + break; + + case ISO_8859_2: + if (c == 0xb1 || c == 0xb3) return 1; + if (c == 0xb5 || c == 0xb6) return 1; + if (c >= 0xb9 && c <= 0xbc) return 1; + if (c >= 0xbe && c <= 0xbf) return 1; + if (c >= 0xdf && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xfe) return 1; + break; + + case ISO_8859_3: + if (c == 0xb1) return 1; + if (c == 0xb5 || c == 0xb6) return 1; + if (c >= 0xb9 && c <= 0xbc) return 1; + if (c == 0xbf) return 1; + if (c == 0xdf) return 1; + if (c >= 0xe0 && c <= 0xe2) return 1; + if (c >= 0xe4 && c <= 0xef) return 1; + if (c >= 0xf1 && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xfe) return 1; + break; + + case ISO_8859_4: + if (c == 0xa2) return 1; + if (c == 0xb1 || c == 0xb3) return 1; + if (c == 0xb5 || c == 0xb6) return 1; + if (c >= 0xb9 && c <= 0xbc) return 1; + if (c >= 0xbe && c <= 0xbf) return 1; + if (c == 0xdf) return 1; + if (c >= 0xe0 && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xfe) return 1; + break; + + case ISO_8859_5: + if (c >= 0xd0 && c <= 0xff && c != 0xf0 && c != 0xfd) return 1; + break; + + case ISO_8859_6: + break; + + case ISO_8859_7: + if (c == 0xc0) return 1; + if (c >= 0xdc && c <= 0xfe) return 1; + break; + + case ISO_8859_8: + if (c == 0xb5) return 1; + break; + + case ISO_8859_10: + if (c >= 0xb1 && c <= 0xb6) return 1; + if (c >= 0xb8 && c <= 0xbc) return 1; + if (c == 0xbe || c == 0xbf) return 1; + if (c >= 0xdf && c <= 0xff) return 1; + break; + + case ISO_8859_11: + break; + + case ISO_8859_13: + if (c == 0xb5) return 1; + if (c == 0xb8) return 1; + if (c == 0xba) return 1; + if (c == 0xbf) return 1; + if (c >= 0xdf && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xfe) return 1; + break; + + case ISO_8859_14: + if (c == 0xa2) return 1; + if (c == 0xa5) return 1; + if (c == 0xab) return 1; + if (c == 0xb1 || c == 0xb3 || c == 0xb5) return 1; + if (c >= 0xb8 && c <= 0xba) return 1; + if (c == 0xbc) return 1; + if (c == 0xbe || c == 0xbf) return 1; + if (c >= 0xdf && c <= 0xff) return 1; + break; + + case ISO_8859_15: + if (c == 0xaa) return 1; + if (c == 0xb5) return 1; + if (c == 0xba) return 1; + if (c >= 0xdf && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xff) return 1; + if (c == 0xa8) return 1; + if (c == 0xb8) return 1; + if (c == 0xbd) return 1; + break; + + case ISO_8859_16: + if (c == 0xa2) return 1; + if (c == 0xa8) return 1; + if (c == 0xae) return 1; + if (c == 0xb3) return 1; + if (c >= 0xb8 && c <= 0xba) return 1; + if (c == 0xbd) return 1; + if (c == 0xbf) return 1; + if (c >= 0xdf && c <= 0xff) return 1; + break; + + case KOI8_R: + if (c == 0xa3) return 1; + /* fall */ + case KOI8: + if (c >= 0xc0 && c <= 0xdf) return 1; + break; + + default: + exit(-1); + } + + return 0; +} + +static int IsPrint(int enc, int c) +{ + if (enc == ASCII) + return isprint(c); + + if (c >= 0x20 && c <= 0x7e) return 1; + + switch (enc) { + case UNICODE_ISO_8859_1: + if (c >= 0x09 && c <= 0x0d) return 1; + if (c == 0x85) return 1; + /* fall */ + case ISO_8859_1: + case ISO_8859_2: + case ISO_8859_4: + case ISO_8859_5: + case ISO_8859_9: + case ISO_8859_10: + case ISO_8859_13: + case ISO_8859_14: + case ISO_8859_15: + case ISO_8859_16: + if (c >= 0xa0 && c <= 0xff) return 1; + break; + + case ISO_8859_3: + if (c >= 0xa0) { + if (c == 0xa5 || c == 0xae || c == 0xbe || c == 0xc3 || c == 0xd0 || + c == 0xe3 || c == 0xf0) + return 0; + else + return 1; + } + break; + + case ISO_8859_6: + if (c == 0xa0) return 1; + if (c == 0xa4 || c == 0xac || c == 0xad || c == 0xbb || c == 0xbf) + return 1; + if (c >= 0xc1 && c <= 0xda) return 1; + if (c >= 0xe0 && c <= 0xf2) return 1; + break; + + case ISO_8859_7: + if (c >= 0xa0 && c <= 0xfe && + c != 0xa4 && c != 0xa5 && c != 0xaa && + c != 0xae && c != 0xd2) return 1; + break; + + case ISO_8859_8: + if (c >= 0xa0 && c <= 0xfa) { + if (c >= 0xbf && c <= 0xde) return 0; + if (c == 0xa1) return 0; + return 1; + } + break; + + case ISO_8859_11: + if (c >= 0xa0 && c <= 0xda) return 1; + if (c >= 0xdf && c <= 0xfb) return 1; + break; + + case KOI8: + if (c == 0xa0) return 1; + if (c >= 0xc0 && c <= 0xff) return 1; + break; + + case KOI8_R: + if (c >= 0x80 && c <= 0xff) return 1; + break; + + default: + exit(-1); + } + + return 0; +} + +static int IsPunct(int enc, int c) +{ + if (enc == ASCII) + return ispunct(c); + + if (c >= 0x21 && c <= 0x2f) return 1; + if (c >= 0x3a && c <= 0x40) return 1; + if (c >= 0x5b && c <= 0x60) return 1; + if (c >= 0x7b && c <= 0x7e) return 1; + + if (enc == UNICODE_ISO_8859_1) { + if (c < 0x80) return 0; + + if (c >= 0xa1 && c <= 0xa9) return 1; + if (c >= 0xab && c <= 0xac) return 1; + if (c >= 0xae && c <= 0xb1) return 1; + if (c == 0xb4) return 1; + if (c >= 0xb6 && c <= 0xb8) return 1; + if (c == 0xbb || c == 0xbf || c == 0xd7 || c == 0xf7) return 1; + return 0; + } + + switch (enc) { + case ISO_8859_1: + case ISO_8859_9: + case ISO_8859_15: + if (c == 0xad) return 1; + if (c == 0xa1) return 1; + if (c == 0xab) return 1; + if (c == 0xb7) return 1; + if (c == 0xbb) return 1; + if (c == 0xbf) return 1; + break; + + case ISO_8859_2: + case ISO_8859_4: + case ISO_8859_5: + case ISO_8859_14: + if (c == 0xad) return 1; + break; + + case ISO_8859_3: + case ISO_8859_10: + if (c == 0xad) return 1; + if (c == 0xb7) return 1; + if (c == 0xbd) return 1; + break; + + case ISO_8859_6: + if (c == 0xac) return 1; + if (c == 0xad) return 1; + if (c == 0xbb) return 1; + if (c == 0xbf) return 1; + break; + + case ISO_8859_7: + if (c == 0xa1 || c == 0xa2) return 1; + if (c == 0xab) return 1; + if (c == 0xaf) return 1; + if (c == 0xad) return 1; + if (c == 0xb7 || c == 0xbb) return 1; + break; + + case ISO_8859_8: + if (c == 0xab) return 1; + if (c == 0xad) return 1; + if (c == 0xb7) return 1; + if (c == 0xbb) return 1; + if (c == 0xdf) return 1; + break; + + case ISO_8859_13: + if (c == 0xa1 || c == 0xa5) return 1; + if (c == 0xab || c == 0xad) return 1; + if (c == 0xb4 || c == 0xb7) return 1; + if (c == 0xbb) return 1; + if (c == 0xff) return 1; + break; + + case ISO_8859_16: + if (c == 0xa5) return 1; + if (c == 0xab) return 1; + if (c == 0xad) return 1; + if (c == 0xb5) return 1; + if (c == 0xb7) return 1; + if (c == 0xbb) return 1; + break; + + case KOI8_R: + if (c == 0x9e) return 1; + break; + + case ISO_8859_11: + case KOI8: + break; + + default: + exit(-1); + } + + return 0; +} + +static int IsSpace(int enc, int c) +{ + if (enc == ASCII) + return isspace(c); + + if (c >= 0x09 && c <= 0x0d) return 1; + if (c == 0x20) return 1; + + switch (enc) { + case UNICODE_ISO_8859_1: + if (c == 0x85) return 1; + /* fall */ + case ISO_8859_1: + case ISO_8859_2: + case ISO_8859_3: + case ISO_8859_4: + case ISO_8859_5: + case ISO_8859_6: + case ISO_8859_7: + case ISO_8859_8: + case ISO_8859_9: + case ISO_8859_10: + case ISO_8859_11: + case ISO_8859_13: + case ISO_8859_14: + case ISO_8859_15: + case ISO_8859_16: + case KOI8: + if (c == 0xa0) return 1; + break; + + case KOI8_R: + if (c == 0x9a) return 1; + break; + + default: + exit(-1); + } + + return 0; +} + +static int IsUpper(int enc, int c) +{ + if (enc == ASCII) + return isupper(c); + + if (c >= 0x41 && c <= 0x5a) return 1; + + switch (enc) { + case UNICODE_ISO_8859_1: + case ISO_8859_1: + case ISO_8859_9: + if (c >= 0xc0 && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xde) return 1; + break; + + case ISO_8859_2: + if (c == 0xa1 || c == 0xa3) return 1; + if (c == 0xa5 || c == 0xa6) return 1; + if (c >= 0xa9 && c <= 0xac) return 1; + if (c >= 0xae && c <= 0xaf) return 1; + if (c >= 0xc0 && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xde) return 1; + break; + + case ISO_8859_3: + if (c == 0xa1) return 1; + if (c == 0xa6) return 1; + if (c >= 0xa9 && c <= 0xac) return 1; + if (c == 0xaf) return 1; + if (c >= 0xc0 && c <= 0xc2) return 1; + if (c >= 0xc4 && c <= 0xcf) return 1; + if (c >= 0xd1 && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xde) return 1; + break; + + case ISO_8859_4: + if (c == 0xa1 || c == 0xa3) return 1; + if (c == 0xa5 || c == 0xa6) return 1; + if (c >= 0xa9 && c <= 0xac) return 1; + if (c == 0xae) return 1; + if (c == 0xbd) return 1; + if (c >= 0xc0 && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xde) return 1; + break; + + case ISO_8859_5: + if (c >= 0xa1 && c <= 0xcf && c != 0xad) return 1; + break; + + case ISO_8859_6: + break; + + case ISO_8859_7: + if (c == 0xb6) return 1; + if (c >= 0xb8 && c <= 0xba) return 1; + if (c == 0xbc) return 1; + if (c >= 0xbe && c <= 0xbf) return 1; + if (c >= 0xc1 && c <= 0xdb && c != 0xd2) return 1; + break; + + case ISO_8859_8: + case ISO_8859_11: + break; + + case ISO_8859_10: + if (c >= 0xa1 && c <= 0xa6) return 1; + if (c >= 0xa8 && c <= 0xac) return 1; + if (c == 0xae || c == 0xaf) return 1; + if (c >= 0xc0 && c <= 0xde) return 1; + break; + + case ISO_8859_13: + if (c == 0xa8) return 1; + if (c == 0xaa) return 1; + if (c == 0xaf) return 1; + if (c >= 0xc0 && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xde) return 1; + break; + + case ISO_8859_14: + if (c == 0xa1) return 1; + if (c == 0xa4 || c == 0xa6) return 1; + if (c == 0xa8) return 1; + if (c == 0xaa || c == 0xac) return 1; + if (c == 0xaf || c == 0xb0) return 1; + if (c == 0xb2 || c == 0xb4 || c == 0xb7) return 1; + if (c == 0xbb || c == 0xbd) return 1; + if (c >= 0xc0 && c <= 0xde) return 1; + break; + + case ISO_8859_15: + if (c >= 0xc0 && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xde) return 1; + if (c == 0xa6) return 1; + if (c == 0xb4) return 1; + if (c == 0xbc) return 1; + if (c == 0xbe) return 1; + break; + + case ISO_8859_16: + if (c == 0xa1) return 1; + if (c == 0xa3) return 1; + if (c == 0xa6) return 1; + if (c == 0xaa) return 1; + if (c == 0xac) return 1; + if (c == 0xaf) return 1; + if (c == 0xb2) return 1; + if (c == 0xb4) return 1; + if (c == 0xbc) return 1; + if (c == 0xbe) return 1; + if (c >= 0xc0 && c <= 0xde) return 1; + break; + + case KOI8_R: + if (c == 0xb3) return 1; + /* fall */ + case KOI8: + if (c >= 0xe0 && c <= 0xff) return 1; + break; + + default: + exit(-1); + } + + return 0; +} + +static int IsXDigit(int enc, int c) +{ + if (enc == ASCII) + return isxdigit(c); + + if (c >= 0x30 && c <= 0x39) return 1; + if (c >= 0x41 && c <= 0x46) return 1; + if (c >= 0x61 && c <= 0x66) return 1; + return 0; +} + +static int IsWord(int enc, int c) +{ + if (enc == ASCII) { + return (isalpha(c) || isdigit(c) || c == 0x5f); + } + + if (c >= 0x30 && c <= 0x39) return 1; + if (c >= 0x41 && c <= 0x5a) return 1; + if (c == 0x5f) return 1; + if (c >= 0x61 && c <= 0x7a) return 1; + + switch (enc) { + case UNICODE_ISO_8859_1: + case ISO_8859_1: + case ISO_8859_9: + if (c == 0xaa) return 1; + if (c >= 0xb2 && c <= 0xb3) return 1; + if (c == 0xb5) return 1; + if (c >= 0xb9 && c <= 0xba) return 1; + if (c >= 0xbc && c <= 0xbe) return 1; + if (c >= 0xc0 && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xff) return 1; + break; + + case ISO_8859_2: + if (c == 0xa1 || c == 0xa3) return 1; + if (c == 0xa5 || c == 0xa6) return 1; + if (c >= 0xa9 && c <= 0xac) return 1; + if (c >= 0xae && c <= 0xaf) return 1; + if (c == 0xb1 || c == 0xb3) return 1; + if (c == 0xb5 || c == 0xb6) return 1; + if (c >= 0xb9 && c <= 0xbc) return 1; + if (c >= 0xbe && c <= 0xbf) return 1; + if (c >= 0xc0 && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xfe) return 1; + break; + + case ISO_8859_3: + if (c == 0xa1) return 1; + if (c == 0xa6) return 1; + if (c >= 0xa9 && c <= 0xac) return 1; + if (c == 0xaf) return 1; + if (c >= 0xb1 && c <= 0xb3) return 1; + if (c == 0xb5 || c == 0xb6) return 1; + if (c >= 0xb9 && c <= 0xbd) return 1; + if (c == 0xbf) return 1; + if (c >= 0xc0 && c <= 0xc2) return 1; + if (c >= 0xc4 && c <= 0xcf) return 1; + if (c >= 0xd1 && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xe2) return 1; + if (c >= 0xe4 && c <= 0xef) return 1; + if (c >= 0xf1 && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xfe) return 1; + break; + + case ISO_8859_4: + if (c >= 0xa1 && c <= 0xa3) return 1; + if (c == 0xa5 || c == 0xa6) return 1; + if (c >= 0xa9 && c <= 0xac) return 1; + if (c == 0xae) return 1; + if (c == 0xb1 || c == 0xb3) return 1; + if (c == 0xb5 || c == 0xb6) return 1; + if (c >= 0xb9 && c <= 0xbf) return 1; + if (c >= 0xc0 && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xfe) return 1; + break; + + case ISO_8859_5: + if (c >= 0xa1 && c <= 0xcf && c != 0xad) return 1; + if (c >= 0xd0 && c <= 0xff && c != 0xf0 && c != 0xfd) return 1; + break; + + case ISO_8859_6: + if (c >= 0xc1 && c <= 0xda) return 1; + if (c >= 0xe0 && c <= 0xea) return 1; + if (c >= 0xeb && c <= 0xf2) return 1; + break; + + case ISO_8859_7: + if (c == 0xb2 || c == 0xb3) return 1; + if (c == 0xb6) return 1; + if (c >= 0xb8 && c <= 0xba) return 1; + if (c >= 0xbc && c <= 0xbf) return 1; + if (c == 0xc0) return 1; + if (c >= 0xc1 && c <= 0xdb && c != 0xd2) return 1; + if (c >= 0xdc && c <= 0xfe) return 1; + break; + + case ISO_8859_8: + if (c == 0xb2 || c == 0xb3 || c == 0xb5 || c == 0xb9) return 1; + if (c >= 0xbc && c <= 0xbe) return 1; + if (c >= 0xe0 && c <= 0xfa) return 1; + break; + + case ISO_8859_10: + if (c >= 0xa1 && c <= 0xff) { + if (c != 0xa7 && c != 0xad && c != 0xb0 && c != 0xb7 && c != 0xbd) + return 1; + } + break; + + case ISO_8859_11: + if (c >= 0xa1 && c <= 0xda) return 1; + if (c >= 0xdf && c <= 0xfb) return 1; + break; + + case ISO_8859_13: + if (c == 0xa8) return 1; + if (c == 0xaa) return 1; + if (c == 0xaf) return 1; + if (c == 0xb2 || c == 0xb3 || c == 0xb5 || c == 0xb9) return 1; + if (c >= 0xbc && c <= 0xbe) return 1; + if (c == 0xb8) return 1; + if (c == 0xba) return 1; + if (c >= 0xbf && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xfe) return 1; + break; + + case ISO_8859_14: + if (c >= 0xa1 && c <= 0xff) { + if (c == 0xa3 || c == 0xa7 || c == 0xa9 || c == 0xad || c == 0xae || + c == 0xb6) return 0; + return 1; + } + break; + + case ISO_8859_15: + if (c == 0xaa) return 1; + if (c >= 0xb2 && c <= 0xb3) return 1; + if (c == 0xb5) return 1; + if (c >= 0xb9 && c <= 0xba) return 1; + if (c >= 0xbc && c <= 0xbe) return 1; + if (c >= 0xc0 && c <= 0xd6) return 1; + if (c >= 0xd8 && c <= 0xf6) return 1; + if (c >= 0xf8 && c <= 0xff) return 1; + if (c == 0xa6) return 1; + if (c == 0xa8) return 1; + if (c == 0xb4) return 1; + if (c == 0xb8) return 1; + break; + + case ISO_8859_16: + if (c == 0xa1) return 1; + if (c == 0xa2) return 1; + if (c == 0xa3) return 1; + if (c == 0xa6) return 1; + if (c == 0xa8) return 1; + if (c == 0xaa) return 1; + if (c == 0xac) return 1; + if (c == 0xae) return 1; + if (c == 0xaf) return 1; + if (c == 0xb2) return 1; + if (c == 0xb3) return 1; + if (c == 0xb4) return 1; + if (c >= 0xb8 && c <= 0xba) return 1; + if (c == 0xbc) return 1; + if (c == 0xbd) return 1; + if (c == 0xbe) return 1; + if (c == 0xbf) return 1; + if (c >= 0xc0 && c <= 0xde) return 1; + if (c >= 0xdf && c <= 0xff) return 1; + break; + + case KOI8_R: + if (c == 0x9d) return 1; + if (c == 0xa3 || c == 0xb3) return 1; + /* fall */ + case KOI8: + if (c >= 0xc0 && c <= 0xff) return 1; + break; + + default: + exit(-1); + } + + return 0; +} + +static int IsAscii(int enc ARG_UNUSED, int c) +{ + if (c >= 0x00 && c <= 0x7f) return 1; + return 0; +} + +static int IsNewline(int enc ARG_UNUSED, int c) +{ + if (c == NEWLINE_CODE) return 1; + return 0; +} + +static int exec(FILE* fp, ENC_INFO* einfo) +{ +#define NCOL 8 + + int c, val, enc; + int r; + + enc = einfo->num; + + r = fprintf(fp, "static const unsigned short Enc%s_CtypeTable[256] = {\n", + einfo->name); + if (r < 0) return -1; + + for (c = 0; c < 256; c++) { + val = 0; + if (IsNewline(enc, c)) val |= BIT_CTYPE_NEWLINE; + if (IsAlpha (enc, c)) val |= (BIT_CTYPE_ALPHA | BIT_CTYPE_ALNUM); + if (IsBlank (enc, c)) val |= BIT_CTYPE_BLANK; + if (IsCntrl (enc, c)) val |= BIT_CTYPE_CNTRL; + if (IsDigit (enc, c)) val |= (BIT_CTYPE_DIGIT | BIT_CTYPE_ALNUM); + if (IsGraph (enc, c)) val |= BIT_CTYPE_GRAPH; + if (IsLower (enc, c)) val |= BIT_CTYPE_LOWER; + if (IsPrint (enc, c)) val |= BIT_CTYPE_PRINT; + if (IsPunct (enc, c)) val |= BIT_CTYPE_PUNCT; + if (IsSpace (enc, c)) val |= BIT_CTYPE_SPACE; + if (IsUpper (enc, c)) val |= BIT_CTYPE_UPPER; + if (IsXDigit(enc, c)) val |= BIT_CTYPE_XDIGIT; + if (IsWord (enc, c)) val |= BIT_CTYPE_WORD; + if (IsAscii (enc, c)) val |= BIT_CTYPE_ASCII; + + if (c % NCOL == 0) { + r = fputs(" ", fp); + if (r < 0) return -1; + } + r = fprintf(fp, "0x%04x", val); + if (r < 0) return -1; + + if (c != 255) { + r = fputs(",", fp); + if (r < 0) return -1; + } + if (c != 0 && c % NCOL == (NCOL-1)) + r = fputs("\n", fp); + else + r = fputs(" ", fp); + + if (r < 0) return -1; + } + r = fprintf(fp, "};\n"); + if (r < 0) return -1; + + return 0; +} + +// extern int main(int argc ARG_UNUSED, char* argv[] ARG_UNUSED) +// { +// int r; +// int i; +// FILE* fp = stdout; + +// setlocale(LC_ALL, "C"); +// /* setlocale(LC_ALL, "POSIX"); */ +// /* setlocale(LC_ALL, "en_GB.iso88591"); */ +// /* setlocale(LC_ALL, "de_BE.iso88591"); */ +// /* setlocale(LC_ALL, "fr_FR.iso88591"); */ + +// for (i = 0; i < (int )(sizeof(Info)/sizeof(ENC_INFO)); i++) { +// r = exec(fp, &Info[i]); +// if (r < 0) { +// fprintf(stderr, "FAIL exec(): %d\n", r); +// return -1; +// } +// } + +// return 0; +// } diff --git a/internal/components/third_party/oniguruma/src/onig_init.c b/internal/components/third_party/oniguruma/src/onig_init.c new file mode 100644 index 0000000000..c660e7df7a --- /dev/null +++ b/internal/components/third_party/oniguruma/src/onig_init.c @@ -0,0 +1,45 @@ +/********************************************************************** + onig_init.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2016-2019 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regint.h" + +/* onig_init(): deprecated function */ +extern int +onig_init(void) +{ +#if 0 + OnigEncoding encs[] = { + ONIG_ENCODING_UTF8 + }; + + return onig_initialize(encs, sizeof(encs)/sizeof(encs[0])); +#else + return onig_initialize(0, 0); +#endif +} diff --git a/internal/components/third_party/oniguruma/src/oniggnu.h b/internal/components/third_party/oniguruma/src/oniggnu.h new file mode 100644 index 0000000000..96d90855ab --- /dev/null +++ b/internal/components/third_party/oniguruma/src/oniggnu.h @@ -0,0 +1,87 @@ +#ifndef ONIGGNU_H +#define ONIGGNU_H +/********************************************************************** + oniggnu.h - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2019 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "oniguruma.h" + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + RE_MBCTYPE_ASCII = 0, + RE_MBCTYPE_EUC = 1, + RE_MBCTYPE_SJIS = 2, + RE_MBCTYPE_UTF8 = 3 +}; + +/* GNU regex options */ +#ifndef RE_NREGS +#define RE_NREGS ONIG_NREGION +#endif + +#define RE_OPTION_IGNORECASE ONIG_OPTION_IGNORECASE +#define RE_OPTION_EXTENDED ONIG_OPTION_EXTEND +#define RE_OPTION_MULTILINE ONIG_OPTION_MULTILINE +#define RE_OPTION_SINGLELINE ONIG_OPTION_SINGLELINE +#define RE_OPTION_LONGEST ONIG_OPTION_FIND_LONGEST +#define RE_OPTION_POSIXLINE (RE_OPTION_MULTILINE|RE_OPTION_SINGLELINE) +#define RE_OPTION_FIND_NOT_EMPTY ONIG_OPTION_FIND_NOT_EMPTY +#define RE_OPTION_NEGATE_SINGLELINE ONIG_OPTION_NEGATE_SINGLELINE +#define RE_OPTION_DONT_CAPTURE_GROUP ONIG_OPTION_DONT_CAPTURE_GROUP +#define RE_OPTION_CAPTURE_GROUP ONIG_OPTION_CAPTURE_GROUP + + +ONIG_EXTERN +void re_mbcinit P_((int)); +ONIG_EXTERN +int re_compile_pattern P_((const char*, int, struct re_pattern_buffer*, char* err_buf)); +ONIG_EXTERN +int re_recompile_pattern P_((const char*, int, struct re_pattern_buffer*, char* err_buf)); +ONIG_EXTERN +void re_free_pattern P_((struct re_pattern_buffer*)); +ONIG_EXTERN +int re_adjust_startpos P_((struct re_pattern_buffer*, const char*, int, int, int)); +ONIG_EXTERN +int re_search P_((struct re_pattern_buffer*, const char*, int, int, int, struct re_registers*)); +ONIG_EXTERN +int re_match P_((struct re_pattern_buffer*, const char *, int, int, struct re_registers*)); +ONIG_EXTERN +void re_set_casetable P_((const char*)); +ONIG_EXTERN +void re_free_registers P_((struct re_registers*)); +ONIG_EXTERN +int re_alloc_pattern P_((struct re_pattern_buffer**)); /* added */ + +#ifdef __cplusplus +} +#endif + +#endif /* ONIGGNU_H */ diff --git a/internal/components/third_party/oniguruma/src/onigposix.h b/internal/components/third_party/oniguruma/src/onigposix.h new file mode 100644 index 0000000000..3514f80e1e --- /dev/null +++ b/internal/components/third_party/oniguruma/src/onigposix.h @@ -0,0 +1,193 @@ +#ifndef ONIGPOSIX_H +#define ONIGPOSIX_H +/********************************************************************** + onigposix.h - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#ifndef ONIG_NO_STANDARD_C_HEADERS +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* options */ +#define REG_ICASE (1<<0) +#define REG_NEWLINE (1<<1) +#define REG_NOTBOL (1<<2) +#define REG_NOTEOL (1<<3) +#define REG_EXTENDED (1<<4) /* if not set, Basic Onigular Expression */ +#define REG_NOSUB (1<<5) + +/* POSIX error codes */ +#define REG_NOMATCH 1 +#define REG_BADPAT 2 +#define REG_ECOLLATE 3 +#define REG_ECTYPE 4 +#define REG_EESCAPE 5 +#define REG_ESUBREG 6 +#define REG_EBRACK 7 +#define REG_EPAREN 8 +#define REG_EBRACE 9 +#define REG_BADBR 10 +#define REG_ERANGE 11 +#define REG_ESPACE 12 +#define REG_BADRPT 13 + +/* extended error codes */ +#define REG_EONIG_INTERNAL 14 +#define REG_EONIG_BADWC 15 +#define REG_EONIG_BADARG 16 +/* #define REG_EONIG_THREAD 17 */ + +/* character encodings (for reg_set_encoding()) */ +#define REG_POSIX_ENCODING_ASCII 0 +#define REG_POSIX_ENCODING_EUC_JP 1 +#define REG_POSIX_ENCODING_SJIS 2 +#define REG_POSIX_ENCODING_UTF8 3 +#define REG_POSIX_ENCODING_UTF16_BE 4 +#define REG_POSIX_ENCODING_UTF16_LE 5 + + +typedef int onig_posix_regoff_t; + +typedef struct { + onig_posix_regoff_t rm_so; + onig_posix_regoff_t rm_eo; +} onig_posix_regmatch_t; + +/* POSIX regex_t */ +typedef struct { + void* onig; /* Oniguruma regex_t* */ + size_t re_nsub; + int comp_options; +} onig_posix_regex_t; + + +#ifndef P_ +#if defined(__STDC__) || defined(_WIN32) +# define P_(args) args +#else +# define P_(args) () +#endif +#endif + +#ifndef ONIG_STATIC +#ifndef ONIG_EXTERN +#if defined(_WIN32) && !defined(__GNUC__) +#if defined(ONIGURUMA_EXPORT) +#define ONIG_EXTERN extern __declspec(dllexport) +#else +#define ONIG_EXTERN extern __declspec(dllimport) +#endif +#endif +#endif + +#ifndef ONIG_EXTERN +#define ONIG_EXTERN extern +#endif +#else +#define ONIG_EXTERN extern +#endif + +#ifndef ONIGURUMA_H +typedef unsigned int OnigOptionType; + +/* syntax */ +typedef struct { + unsigned int op; + unsigned int op2; + unsigned int behavior; + OnigOptionType options; /* default option */ +} OnigSyntaxType; + +ONIG_EXTERN OnigSyntaxType OnigSyntaxPosixBasic; +ONIG_EXTERN OnigSyntaxType OnigSyntaxPosixExtended; +ONIG_EXTERN OnigSyntaxType OnigSyntaxEmacs; +ONIG_EXTERN OnigSyntaxType OnigSyntaxGrep; +ONIG_EXTERN OnigSyntaxType OnigSyntaxGnuRegex; +ONIG_EXTERN OnigSyntaxType OnigSyntaxJava; +ONIG_EXTERN OnigSyntaxType OnigSyntaxPerl; +ONIG_EXTERN OnigSyntaxType OnigSyntaxRuby; +ONIG_EXTERN OnigSyntaxType OnigSyntaxOniguruma; + +/* predefined syntaxes (see regsyntax.c) */ +#define ONIG_SYNTAX_POSIX_BASIC (&OnigSyntaxPosixBasic) +#define ONIG_SYNTAX_POSIX_EXTENDED (&OnigSyntaxPosixExtended) +#define ONIG_SYNTAX_EMACS (&OnigSyntaxEmacs) +#define ONIG_SYNTAX_GREP (&OnigSyntaxGrep) +#define ONIG_SYNTAX_GNU_REGEX (&OnigSyntaxGnuRegex) +#define ONIG_SYNTAX_JAVA (&OnigSyntaxJava) +#define ONIG_SYNTAX_PERL (&OnigSyntaxPerl) +#define ONIG_SYNTAX_RUBY (&OnigSyntaxRuby) +#define ONIG_SYNTAX_ONIGURUMA (&OnigSyntaxOniguruma) +/* default syntax */ +#define ONIG_SYNTAX_DEFAULT OnigDefaultSyntax + +ONIG_EXTERN OnigSyntaxType* OnigDefaultSyntax; + +ONIG_EXTERN int onig_set_default_syntax P_((OnigSyntaxType* syntax)); +ONIG_EXTERN void onig_copy_syntax P_((OnigSyntaxType* to, OnigSyntaxType* from)); +ONIG_EXTERN const char* onig_version P_((void)); +ONIG_EXTERN const char* onig_copyright P_((void)); +ONIG_EXTERN int onig_end P_((void)); + +#endif /* ONIGURUMA_H */ + + +ONIG_EXTERN int onig_posix_regcomp P_((onig_posix_regex_t* reg, const char* pat, int options)); +ONIG_EXTERN int onig_posix_regexec P_((onig_posix_regex_t* reg, const char* str, size_t nmatch, onig_posix_regmatch_t* matches, int options)); +ONIG_EXTERN void onig_posix_regfree P_((onig_posix_regex_t* reg)); +ONIG_EXTERN size_t onig_posix_regerror P_((int code, const onig_posix_regex_t* reg, char* buf, size_t size)); + +/* extended API */ +ONIG_EXTERN void onig_posix_reg_set_encoding P_((int enc)); +ONIG_EXTERN int onig_posix_reg_name_to_group_numbers P_((onig_posix_regex_t* reg, const unsigned char* name, const unsigned char* name_end, int** nums)); +ONIG_EXTERN int onig_posix_reg_foreach_name P_((onig_posix_regex_t* reg, int (*func)(const unsigned char*, const unsigned char*,int,int*,onig_posix_regex_t*,void*), void* arg)); +ONIG_EXTERN int onig_posix_reg_number_of_names P_((onig_posix_regex_t* reg)); + + +/* aliases */ +#define regex_t onig_posix_regex_t +#define regmatch_t onig_posix_regmatch_t +#define regoff_t onig_posix_regoff_t + +#define regcomp onig_posix_regcomp +#define regexec onig_posix_regexec +#define regfree onig_posix_regfree +#define regerror onig_posix_regerror +#define reg_set_encoding onig_posix_reg_set_encoding +#define reg_name_to_group_numbers onig_posix_reg_name_to_group_numbers +#define reg_foreach_name onig_posix_reg_foreach_name +#define reg_number_of_names onig_posix_reg_number_of_names + +#ifdef __cplusplus +} +#endif + +#endif /* ONIGPOSIX_H */ diff --git a/internal/components/third_party/oniguruma/src/oniguruma.go b/internal/components/third_party/oniguruma/src/oniguruma.go new file mode 100644 index 0000000000..87b80cef03 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/oniguruma.go @@ -0,0 +1,3 @@ +package oniguruma + +import "C" diff --git a/internal/components/third_party/oniguruma/src/oniguruma.h b/internal/components/third_party/oniguruma/src/oniguruma.h new file mode 100644 index 0000000000..2ab10e80ae --- /dev/null +++ b/internal/components/third_party/oniguruma/src/oniguruma.h @@ -0,0 +1,1094 @@ +#ifndef ONIGURUMA_H +#define ONIGURUMA_H +/********************************************************************** + oniguruma.h - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#define ONIGURUMA +#define ONIGURUMA_VERSION_MAJOR 6 +#define ONIGURUMA_VERSION_MINOR 9 +#define ONIGURUMA_VERSION_TEENY 10 + +#define ONIGURUMA_VERSION_INT 60910 + +#ifndef P_ +#if defined(__STDC__) || defined(_WIN32) +# define P_(args) args +#else +# define P_(args) () +#endif +#endif + +#ifndef PV_ +# define PV_(args) args +#endif + +#ifndef ONIG_STATIC +#ifndef ONIG_EXTERN +#if defined(_WIN32) && !defined(__GNUC__) +#if defined(ONIGURUMA_EXPORT) +#define ONIG_EXTERN extern __declspec(dllexport) +#else +#define ONIG_EXTERN extern __declspec(dllimport) +#endif +#endif +#endif + +#ifndef ONIG_EXTERN +#define ONIG_EXTERN extern +#endif +#else +#define ONIG_EXTERN extern +#endif + +#ifndef ONIG_VARIADIC_FUNC_ATTR +#define ONIG_VARIADIC_FUNC_ATTR +#endif + +/* PART: character encoding */ + +#ifndef ONIG_ESCAPE_UCHAR_COLLISION +#define UChar OnigUChar +#endif + +typedef unsigned int OnigCodePoint; +typedef unsigned char OnigUChar; +typedef unsigned int OnigCtype; +typedef unsigned int OnigLen; + +#define ONIG_INFINITE_DISTANCE ~((OnigLen )0) + +typedef unsigned int OnigCaseFoldType; /* case fold flag */ + +ONIG_EXTERN OnigCaseFoldType OnigDefaultCaseFoldFlag; + +#define ONIGENC_CASE_FOLD_ASCII_ONLY (1) +/* #define ONIGENC_CASE_FOLD_HIRAGANA_KATAKANA (1<<1) */ +/* #define ONIGENC_CASE_FOLD_KATAKANA_WIDTH (1<<2) */ +#define ONIGENC_CASE_FOLD_TURKISH_AZERI (1<<20) +#define INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR (1<<30) + +#define ONIGENC_CASE_FOLD_MIN INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR +#define ONIGENC_CASE_FOLD_DEFAULT OnigDefaultCaseFoldFlag + + +#define ONIGENC_MAX_COMP_CASE_FOLD_CODE_LEN 3 +#define ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM 13 +/* 13 => Unicode:0x1ffc */ + +/* code range */ +#define ONIGENC_CODE_RANGE_NUM(range) ((int )range[0]) +#define ONIGENC_CODE_RANGE_FROM(range,i) range[((i)*2) + 1] +#define ONIGENC_CODE_RANGE_TO(range,i) range[((i)*2) + 2] + +typedef struct { + int byte_len; /* argument(original) character(s) byte length */ + int code_len; /* number of code */ + OnigCodePoint code[ONIGENC_MAX_COMP_CASE_FOLD_CODE_LEN]; +} OnigCaseFoldCodeItem; + +typedef struct { + OnigCodePoint esc; + OnigCodePoint anychar; + OnigCodePoint anytime; + OnigCodePoint zero_or_one_time; + OnigCodePoint one_or_more_time; + OnigCodePoint anychar_anytime; +} OnigMetaCharTableType; + +typedef int (*OnigApplyAllCaseFoldFunc)(OnigCodePoint from, OnigCodePoint* to, int to_len, void* arg); + +typedef struct OnigEncodingTypeST { + int (*mbc_enc_len)(const OnigUChar* p); + const char* name; + int max_enc_len; + int min_enc_len; + int (*is_mbc_newline)(const OnigUChar* p, const OnigUChar* end); + OnigCodePoint (*mbc_to_code)(const OnigUChar* p, const OnigUChar* end); + int (*code_to_mbclen)(OnigCodePoint code); + int (*code_to_mbc)(OnigCodePoint code, OnigUChar *buf); + int (*mbc_case_fold)(OnigCaseFoldType flag, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to); + int (*apply_all_case_fold)(OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg); + int (*get_case_fold_codes_by_str)(OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem acs[]); + int (*property_name_to_ctype)(struct OnigEncodingTypeST* enc, OnigUChar* p, OnigUChar* end); + int (*is_code_ctype)(OnigCodePoint code, OnigCtype ctype); + int (*get_ctype_code_range)(OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[]); + OnigUChar* (*left_adjust_char_head)(const OnigUChar* start, const OnigUChar* p); + int (*is_allowed_reverse_match)(const OnigUChar* p, const OnigUChar* end); + int (*init)(void); + int (*is_initialized)(void); + int (*is_valid_mbc_string)(const OnigUChar* s, const OnigUChar* end); + unsigned int flag; + OnigCodePoint sb_range; + int index; +} OnigEncodingType; + +typedef OnigEncodingType* OnigEncoding; + +ONIG_EXTERN OnigEncodingType OnigEncodingASCII; +ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_1; +ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_2; +ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_3; +ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_4; +ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_5; +ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_6; +ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_7; +ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_8; +ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_9; +ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_10; +ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_11; +ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_13; +ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_14; +ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_15; +ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_16; +ONIG_EXTERN OnigEncodingType OnigEncodingUTF8; +ONIG_EXTERN OnigEncodingType OnigEncodingUTF16_BE; +ONIG_EXTERN OnigEncodingType OnigEncodingUTF16_LE; +ONIG_EXTERN OnigEncodingType OnigEncodingUTF32_BE; +ONIG_EXTERN OnigEncodingType OnigEncodingUTF32_LE; +ONIG_EXTERN OnigEncodingType OnigEncodingEUC_JP; +ONIG_EXTERN OnigEncodingType OnigEncodingEUC_TW; +ONIG_EXTERN OnigEncodingType OnigEncodingEUC_KR; +ONIG_EXTERN OnigEncodingType OnigEncodingEUC_CN; +ONIG_EXTERN OnigEncodingType OnigEncodingSJIS; +ONIG_EXTERN OnigEncodingType OnigEncodingKOI8; +ONIG_EXTERN OnigEncodingType OnigEncodingKOI8_R; +ONIG_EXTERN OnigEncodingType OnigEncodingCP1251; +ONIG_EXTERN OnigEncodingType OnigEncodingBIG5; +ONIG_EXTERN OnigEncodingType OnigEncodingGB18030; + +#define ONIG_ENCODING_ASCII (&OnigEncodingASCII) +#define ONIG_ENCODING_ISO_8859_1 (&OnigEncodingISO_8859_1) +#define ONIG_ENCODING_ISO_8859_2 (&OnigEncodingISO_8859_2) +#define ONIG_ENCODING_ISO_8859_3 (&OnigEncodingISO_8859_3) +#define ONIG_ENCODING_ISO_8859_4 (&OnigEncodingISO_8859_4) +#define ONIG_ENCODING_ISO_8859_5 (&OnigEncodingISO_8859_5) +#define ONIG_ENCODING_ISO_8859_6 (&OnigEncodingISO_8859_6) +#define ONIG_ENCODING_ISO_8859_7 (&OnigEncodingISO_8859_7) +#define ONIG_ENCODING_ISO_8859_8 (&OnigEncodingISO_8859_8) +#define ONIG_ENCODING_ISO_8859_9 (&OnigEncodingISO_8859_9) +#define ONIG_ENCODING_ISO_8859_10 (&OnigEncodingISO_8859_10) +#define ONIG_ENCODING_ISO_8859_11 (&OnigEncodingISO_8859_11) +#define ONIG_ENCODING_ISO_8859_13 (&OnigEncodingISO_8859_13) +#define ONIG_ENCODING_ISO_8859_14 (&OnigEncodingISO_8859_14) +#define ONIG_ENCODING_ISO_8859_15 (&OnigEncodingISO_8859_15) +#define ONIG_ENCODING_ISO_8859_16 (&OnigEncodingISO_8859_16) +#define ONIG_ENCODING_UTF8 (&OnigEncodingUTF8) +#define ONIG_ENCODING_UTF16_BE (&OnigEncodingUTF16_BE) +#define ONIG_ENCODING_UTF16_LE (&OnigEncodingUTF16_LE) +#define ONIG_ENCODING_UTF32_BE (&OnigEncodingUTF32_BE) +#define ONIG_ENCODING_UTF32_LE (&OnigEncodingUTF32_LE) +#define ONIG_ENCODING_EUC_JP (&OnigEncodingEUC_JP) +#define ONIG_ENCODING_EUC_TW (&OnigEncodingEUC_TW) +#define ONIG_ENCODING_EUC_KR (&OnigEncodingEUC_KR) +#define ONIG_ENCODING_EUC_CN (&OnigEncodingEUC_CN) +#define ONIG_ENCODING_SJIS (&OnigEncodingSJIS) +#define ONIG_ENCODING_KOI8 (&OnigEncodingKOI8) +#define ONIG_ENCODING_KOI8_R (&OnigEncodingKOI8_R) +#define ONIG_ENCODING_CP1251 (&OnigEncodingCP1251) +#define ONIG_ENCODING_BIG5 (&OnigEncodingBIG5) +#define ONIG_ENCODING_GB18030 (&OnigEncodingGB18030) + +#define ONIG_ENCODING_UNDEF ((OnigEncoding )0) + + +/* work size */ +#define ONIGENC_CODE_TO_MBC_MAXLEN 7 +#define ONIGENC_MBC_CASE_FOLD_MAXLEN 18 +/* 18: 6(max-byte) * 3(case-fold chars) */ + +/* character types */ +typedef enum { + ONIGENC_CTYPE_NEWLINE = 0, + ONIGENC_CTYPE_ALPHA = 1, + ONIGENC_CTYPE_BLANK = 2, + ONIGENC_CTYPE_CNTRL = 3, + ONIGENC_CTYPE_DIGIT = 4, + ONIGENC_CTYPE_GRAPH = 5, + ONIGENC_CTYPE_LOWER = 6, + ONIGENC_CTYPE_PRINT = 7, + ONIGENC_CTYPE_PUNCT = 8, + ONIGENC_CTYPE_SPACE = 9, + ONIGENC_CTYPE_UPPER = 10, + ONIGENC_CTYPE_XDIGIT = 11, + ONIGENC_CTYPE_WORD = 12, + ONIGENC_CTYPE_ALNUM = 13, /* alpha || digit */ + ONIGENC_CTYPE_ASCII = 14 +} OnigEncCtype; + +#define ONIGENC_MAX_STD_CTYPE ONIGENC_CTYPE_ASCII + + +#define onig_enc_len(enc,p,end) ONIGENC_MBC_ENC_LEN(enc,p) + +#define ONIGENC_IS_UNDEF(enc) ((enc) == ONIG_ENCODING_UNDEF) +#define ONIGENC_IS_SINGLEBYTE(enc) (ONIGENC_MBC_MAXLEN(enc) == 1) +#define ONIGENC_IS_MBC_HEAD(enc,p) (ONIGENC_MBC_ENC_LEN(enc,p) != 1) +#define ONIGENC_IS_MBC_ASCII(p) (*(p) < 128) +#define ONIGENC_IS_CODE_ASCII(code) ((code) < 128) +#define ONIGENC_IS_MBC_WORD(enc,s,end) \ + ONIGENC_IS_CODE_WORD(enc,ONIGENC_MBC_TO_CODE(enc,s,end)) +#define ONIGENC_IS_MBC_WORD_ASCII(enc,s,end) onigenc_is_mbc_word_ascii(enc,s,end) + +#define ONIGENC_NAME(enc) ((enc)->name) + +#define ONIGENC_MBC_CASE_FOLD(enc,flag,pp,end,buf) \ + (enc)->mbc_case_fold(flag,(const OnigUChar** )pp,end,buf) +#define ONIGENC_IS_ALLOWED_REVERSE_MATCH(enc,s,end) \ + (enc)->is_allowed_reverse_match(s,end) +#define ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc,start,s) \ + (enc)->left_adjust_char_head(start, s) +#define ONIGENC_IS_VALID_MBC_STRING(enc,s,end) \ + (enc)->is_valid_mbc_string(s,end) +#define ONIGENC_APPLY_ALL_CASE_FOLD(enc,case_fold_flag,f,arg) \ + (enc)->apply_all_case_fold(case_fold_flag,f,arg) +#define ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc,case_fold_flag,p,end,acs) \ + (enc)->get_case_fold_codes_by_str(case_fold_flag,p,end,acs) +#define ONIGENC_STEP_BACK(enc,start,s,n) \ + onigenc_step_back((enc),(start),(s),(n)) + +#define ONIGENC_MBC_ENC_LEN(enc,p) (enc)->mbc_enc_len(p) +#define ONIGENC_MBC_MAXLEN(enc) ((enc)->max_enc_len) +#define ONIGENC_MBC_MAXLEN_DIST(enc) ONIGENC_MBC_MAXLEN(enc) +#define ONIGENC_MBC_MINLEN(enc) ((enc)->min_enc_len) +#define ONIGENC_IS_MBC_NEWLINE(enc,p,end) (enc)->is_mbc_newline((p),(end)) +#define ONIGENC_MBC_TO_CODE(enc,p,end) (enc)->mbc_to_code((p),(end)) +#define ONIGENC_CODE_TO_MBCLEN(enc,code) (enc)->code_to_mbclen(code) +#define ONIGENC_CODE_TO_MBC(enc,code,buf) (enc)->code_to_mbc(code,buf) +#define ONIGENC_PROPERTY_NAME_TO_CTYPE(enc,p,end) \ + (enc)->property_name_to_ctype(enc,p,end) + +#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype) (enc)->is_code_ctype(code,ctype) + +#define ONIGENC_IS_CODE_NEWLINE(enc,code) \ + ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_NEWLINE) +#define ONIGENC_IS_CODE_GRAPH(enc,code) \ + ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_GRAPH) +#define ONIGENC_IS_CODE_PRINT(enc,code) \ + ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PRINT) +#define ONIGENC_IS_CODE_ALNUM(enc,code) \ + ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALNUM) +#define ONIGENC_IS_CODE_ALPHA(enc,code) \ + ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALPHA) +#define ONIGENC_IS_CODE_LOWER(enc,code) \ + ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_LOWER) +#define ONIGENC_IS_CODE_UPPER(enc,code) \ + ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_UPPER) +#define ONIGENC_IS_CODE_CNTRL(enc,code) \ + ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_CNTRL) +#define ONIGENC_IS_CODE_PUNCT(enc,code) \ + ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PUNCT) +#define ONIGENC_IS_CODE_SPACE(enc,code) \ + ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_SPACE) +#define ONIGENC_IS_CODE_BLANK(enc,code) \ + ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_BLANK) +#define ONIGENC_IS_CODE_DIGIT(enc,code) \ + ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT) +#define ONIGENC_IS_CODE_XDIGIT(enc,code) \ + ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_XDIGIT) +#define ONIGENC_IS_CODE_WORD(enc,code) \ + ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD) + +#define ONIGENC_GET_CTYPE_CODE_RANGE(enc,ctype,sbout,ranges) \ + (enc)->get_ctype_code_range(ctype,sbout,ranges) + +ONIG_EXTERN +OnigUChar* onigenc_step_back P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, int n)); + + +/* encoding API */ +ONIG_EXTERN +int onigenc_init P_((void)); +ONIG_EXTERN +int onig_initialize_encoding P_((OnigEncoding enc)); +ONIG_EXTERN +int onigenc_set_default_encoding P_((OnigEncoding enc)); +ONIG_EXTERN +OnigEncoding onigenc_get_default_encoding P_((void)); +ONIG_EXTERN +void onigenc_set_default_caseconv_table P_((const OnigUChar* table)); +ONIG_EXTERN +OnigUChar* onigenc_get_right_adjust_char_head_with_prev P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar** prev)); +ONIG_EXTERN +OnigUChar* onigenc_get_prev_char_head P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s)); +ONIG_EXTERN +OnigUChar* onigenc_get_left_adjust_char_head P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s)); +ONIG_EXTERN +OnigUChar* onigenc_get_right_adjust_char_head P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s)); +ONIG_EXTERN +int onigenc_strlen P_((OnigEncoding enc, const OnigUChar* p, const OnigUChar* end)); +ONIG_EXTERN +int onigenc_strlen_null P_((OnigEncoding enc, const OnigUChar* p)); +ONIG_EXTERN +int onigenc_str_bytelen_null P_((OnigEncoding enc, const OnigUChar* p)); +ONIG_EXTERN +int onigenc_is_valid_mbc_string P_((OnigEncoding enc, const OnigUChar* s, const OnigUChar* end)); +ONIG_EXTERN +OnigUChar* onigenc_strdup P_((OnigEncoding enc, const OnigUChar* s, const OnigUChar* end)); + + +/* PART: regular expression */ + +/* config parameters */ +#define ONIG_NREGION 10 +#define ONIG_MAX_CAPTURE_NUM 2147483647 /* 2**31 - 1 */ +#define ONIG_MAX_BACKREF_NUM 1000 +#define ONIG_MAX_REPEAT_NUM 100000 +#define ONIG_MAX_MULTI_BYTE_RANGES_NUM 10000 +/* constants */ +#define ONIG_MAX_ERROR_MESSAGE_LEN 90 + +typedef unsigned int OnigOptionType; + +#define ONIG_OPTION_DEFAULT ONIG_OPTION_NONE + +/* options */ +#define ONIG_OPTION_NONE 0U +/* options (compile time) */ +#define ONIG_OPTION_IGNORECASE 1U +#define ONIG_OPTION_EXTEND (ONIG_OPTION_IGNORECASE << 1) +#define ONIG_OPTION_MULTILINE (ONIG_OPTION_EXTEND << 1) +#define ONIG_OPTION_SINGLELINE (ONIG_OPTION_MULTILINE << 1) +#define ONIG_OPTION_FIND_LONGEST (ONIG_OPTION_SINGLELINE << 1) +#define ONIG_OPTION_FIND_NOT_EMPTY (ONIG_OPTION_FIND_LONGEST << 1) +#define ONIG_OPTION_NEGATE_SINGLELINE (ONIG_OPTION_FIND_NOT_EMPTY << 1) +#define ONIG_OPTION_DONT_CAPTURE_GROUP (ONIG_OPTION_NEGATE_SINGLELINE << 1) +#define ONIG_OPTION_CAPTURE_GROUP (ONIG_OPTION_DONT_CAPTURE_GROUP << 1) +/* options (search time) */ +#define ONIG_OPTION_NOTBOL (ONIG_OPTION_CAPTURE_GROUP << 1) +#define ONIG_OPTION_NOTEOL (ONIG_OPTION_NOTBOL << 1) +#define ONIG_OPTION_POSIX_REGION (ONIG_OPTION_NOTEOL << 1) +#define ONIG_OPTION_CHECK_VALIDITY_OF_STRING (ONIG_OPTION_POSIX_REGION << 1) +/* options (compile time) */ +#define ONIG_OPTION_IGNORECASE_IS_ASCII (ONIG_OPTION_CHECK_VALIDITY_OF_STRING << 3) +#define ONIG_OPTION_WORD_IS_ASCII (ONIG_OPTION_IGNORECASE_IS_ASCII << 1) +#define ONIG_OPTION_DIGIT_IS_ASCII (ONIG_OPTION_WORD_IS_ASCII << 1) +#define ONIG_OPTION_SPACE_IS_ASCII (ONIG_OPTION_DIGIT_IS_ASCII << 1) +#define ONIG_OPTION_POSIX_IS_ASCII (ONIG_OPTION_SPACE_IS_ASCII << 1) +#define ONIG_OPTION_TEXT_SEGMENT_EXTENDED_GRAPHEME_CLUSTER (ONIG_OPTION_POSIX_IS_ASCII << 1) +#define ONIG_OPTION_TEXT_SEGMENT_WORD (ONIG_OPTION_TEXT_SEGMENT_EXTENDED_GRAPHEME_CLUSTER << 1) +/* options (search time) */ +#define ONIG_OPTION_NOT_BEGIN_STRING (ONIG_OPTION_TEXT_SEGMENT_WORD << 1) +#define ONIG_OPTION_NOT_END_STRING (ONIG_OPTION_NOT_BEGIN_STRING << 1) +#define ONIG_OPTION_NOT_BEGIN_POSITION (ONIG_OPTION_NOT_END_STRING << 1) +#define ONIG_OPTION_CALLBACK_EACH_MATCH (ONIG_OPTION_NOT_BEGIN_POSITION << 1) +#define ONIG_OPTION_MATCH_WHOLE_STRING (ONIG_OPTION_CALLBACK_EACH_MATCH << 1) + +#define ONIG_OPTION_MAXBIT ONIG_OPTION_MATCH_WHOLE_STRING + +#define ONIG_OPTION_ON(options,regopt) ((options) |= (regopt)) +#define ONIG_OPTION_OFF(options,regopt) ((options) &= ~(regopt)) +#define ONIG_IS_OPTION_ON(options,option) ((options) & (option)) + +/* syntax */ +typedef struct { + unsigned int op; + unsigned int op2; + unsigned int behavior; + OnigOptionType options; /* default option */ + OnigMetaCharTableType meta_char_table; +} OnigSyntaxType; + +ONIG_EXTERN OnigSyntaxType OnigSyntaxASIS; +ONIG_EXTERN OnigSyntaxType OnigSyntaxPosixBasic; +ONIG_EXTERN OnigSyntaxType OnigSyntaxPosixExtended; +ONIG_EXTERN OnigSyntaxType OnigSyntaxEmacs; +ONIG_EXTERN OnigSyntaxType OnigSyntaxGrep; +ONIG_EXTERN OnigSyntaxType OnigSyntaxGnuRegex; +ONIG_EXTERN OnigSyntaxType OnigSyntaxJava; +ONIG_EXTERN OnigSyntaxType OnigSyntaxPerl; +ONIG_EXTERN OnigSyntaxType OnigSyntaxPerl_NG; +ONIG_EXTERN OnigSyntaxType OnigSyntaxRuby; +ONIG_EXTERN OnigSyntaxType OnigSyntaxPython; +ONIG_EXTERN OnigSyntaxType OnigSyntaxOniguruma; + +/* predefined syntaxes (see regsyntax.c) */ +#define ONIG_SYNTAX_ASIS (&OnigSyntaxASIS) +#define ONIG_SYNTAX_POSIX_BASIC (&OnigSyntaxPosixBasic) +#define ONIG_SYNTAX_POSIX_EXTENDED (&OnigSyntaxPosixExtended) +#define ONIG_SYNTAX_EMACS (&OnigSyntaxEmacs) +#define ONIG_SYNTAX_GREP (&OnigSyntaxGrep) +#define ONIG_SYNTAX_GNU_REGEX (&OnigSyntaxGnuRegex) +#define ONIG_SYNTAX_JAVA (&OnigSyntaxJava) +#define ONIG_SYNTAX_PERL (&OnigSyntaxPerl) +#define ONIG_SYNTAX_PERL_NG (&OnigSyntaxPerl_NG) +#define ONIG_SYNTAX_RUBY (&OnigSyntaxRuby) +#define ONIG_SYNTAX_PYTHON (&OnigSyntaxPython) +#define ONIG_SYNTAX_ONIGURUMA (&OnigSyntaxOniguruma) + +/* default syntax */ +ONIG_EXTERN OnigSyntaxType* OnigDefaultSyntax; +#define ONIG_SYNTAX_DEFAULT OnigDefaultSyntax + +/* syntax (operators) */ +#define ONIG_SYN_OP_VARIABLE_META_CHARACTERS (1U<<0) +#define ONIG_SYN_OP_DOT_ANYCHAR (1U<<1) /* . */ +#define ONIG_SYN_OP_ASTERISK_ZERO_INF (1U<<2) /* * */ +#define ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF (1U<<3) +#define ONIG_SYN_OP_PLUS_ONE_INF (1U<<4) /* + */ +#define ONIG_SYN_OP_ESC_PLUS_ONE_INF (1U<<5) +#define ONIG_SYN_OP_QMARK_ZERO_ONE (1U<<6) /* ? */ +#define ONIG_SYN_OP_ESC_QMARK_ZERO_ONE (1U<<7) +#define ONIG_SYN_OP_BRACE_INTERVAL (1U<<8) /* {lower,upper} */ +#define ONIG_SYN_OP_ESC_BRACE_INTERVAL (1U<<9) /* \{lower,upper\} */ +#define ONIG_SYN_OP_VBAR_ALT (1U<<10) /* | */ +#define ONIG_SYN_OP_ESC_VBAR_ALT (1U<<11) /* \| */ +#define ONIG_SYN_OP_LPAREN_SUBEXP (1U<<12) /* (...) */ +#define ONIG_SYN_OP_ESC_LPAREN_SUBEXP (1U<<13) /* \(...\) */ +#define ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR (1U<<14) /* \A, \Z, \z */ +#define ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR (1U<<15) /* \G */ +#define ONIG_SYN_OP_DECIMAL_BACKREF (1U<<16) /* \num */ +#define ONIG_SYN_OP_BRACKET_CC (1U<<17) /* [...] */ +#define ONIG_SYN_OP_ESC_W_WORD (1U<<18) /* \w, \W */ +#define ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END (1U<<19) /* \<. \> */ +#define ONIG_SYN_OP_ESC_B_WORD_BOUND (1U<<20) /* \b, \B */ +#define ONIG_SYN_OP_ESC_S_WHITE_SPACE (1U<<21) /* \s, \S */ +#define ONIG_SYN_OP_ESC_D_DIGIT (1U<<22) /* \d, \D */ +#define ONIG_SYN_OP_LINE_ANCHOR (1U<<23) /* ^, $ */ +#define ONIG_SYN_OP_POSIX_BRACKET (1U<<24) /* [:xxxx:] */ +#define ONIG_SYN_OP_QMARK_NON_GREEDY (1U<<25) /* ??,*?,+?,{n,m}? */ +#define ONIG_SYN_OP_ESC_CONTROL_CHARS (1U<<26) /* \n,\r,\t,\a ... */ +#define ONIG_SYN_OP_ESC_C_CONTROL (1U<<27) /* \cx */ +#define ONIG_SYN_OP_ESC_OCTAL3 (1U<<28) /* \OOO */ +#define ONIG_SYN_OP_ESC_X_HEX2 (1U<<29) /* \xHH */ +#define ONIG_SYN_OP_ESC_X_BRACE_HEX8 (1U<<30) /* \x{7HHHHHHH} */ +#define ONIG_SYN_OP_ESC_O_BRACE_OCTAL (1U<<31) /* \o{1OOOOOOOOOO} */ + +#define ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE (1U<<0) /* \Q...\E */ +#define ONIG_SYN_OP2_QMARK_GROUP_EFFECT (1U<<1) /* (?...) */ +#define ONIG_SYN_OP2_OPTION_PERL (1U<<2) /* (?imsx),(?-imsx) */ +#define ONIG_SYN_OP2_OPTION_RUBY (1U<<3) /* (?imx), (?-imx) */ +#define ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT (1U<<4) /* ?+,*+,++ */ +#define ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL (1U<<5) /* {n,m}+ */ +#define ONIG_SYN_OP2_CCLASS_SET_OP (1U<<6) /* [...&&..[..]..] */ +#define ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP (1U<<7) /* (?...) */ +#define ONIG_SYN_OP2_ESC_K_NAMED_BACKREF (1U<<8) /* \k */ +#define ONIG_SYN_OP2_ESC_G_SUBEXP_CALL (1U<<9) /* \g, \g */ +#define ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY (1U<<10) /* (?@..),(?@..) */ +#define ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL (1U<<11) /* \C-x */ +#define ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META (1U<<12) /* \M-x */ +#define ONIG_SYN_OP2_ESC_V_VTAB (1U<<13) /* \v as VTAB */ +#define ONIG_SYN_OP2_ESC_U_HEX4 (1U<<14) /* \uHHHH */ +#define ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR (1U<<15) /* \`, \' */ +#define ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY (1U<<16) /* \p{...}, \P{...} */ +#define ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT (1U<<17) /* \p{^..}, \P{^..} */ +/* #define ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS (1U<<18) */ +#define ONIG_SYN_OP2_ESC_H_XDIGIT (1U<<19) /* \h, \H */ +#define ONIG_SYN_OP2_INEFFECTIVE_ESCAPE (1U<<20) /* \ */ +#define ONIG_SYN_OP2_QMARK_LPAREN_IF_ELSE (1U<<21) /* (?(n)) (?(...)...|...) */ +#define ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP (1U<<22) /* \K */ +#define ONIG_SYN_OP2_ESC_CAPITAL_R_GENERAL_NEWLINE (1U<<23) /* \R \r\n else [\x0a-\x0d] */ +#define ONIG_SYN_OP2_ESC_CAPITAL_N_O_SUPER_DOT (1U<<24) /* \N (?-m:.), \O (?m:.) */ +#define ONIG_SYN_OP2_QMARK_TILDE_ABSENT_GROUP (1U<<25) /* (?~...) */ +#define ONIG_SYN_OP2_ESC_X_Y_GRAPHEME_CLUSTER (1U<<26) /* obsoleted: use next */ +#define ONIG_SYN_OP2_ESC_X_Y_TEXT_SEGMENT (1U<<26) /* \X \y \Y */ +#define ONIG_SYN_OP2_QMARK_PERL_SUBEXP_CALL (1U<<27) /* (?R), (?&name)... */ +#define ONIG_SYN_OP2_QMARK_BRACE_CALLOUT_CONTENTS (1U<<28) /* (?{...}) (?{{...}}) */ +#define ONIG_SYN_OP2_ASTERISK_CALLOUT_NAME (1U<<29) /* (*name) (*name{a,..}) */ +#define ONIG_SYN_OP2_OPTION_ONIGURUMA (1U<<30) /* (?imxWDSPy) */ +#define ONIG_SYN_OP2_QMARK_CAPITAL_P_NAME (1U<<31) /* (?P...) (?P=name) */ + +/* syntax (behavior) */ +#define ONIG_SYN_CONTEXT_INDEP_ANCHORS (1U<<31) /* not implemented */ +#define ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS (1U<<0) /* ?, *, +, {n,m} */ +#define ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS (1U<<1) /* error or ignore */ +#define ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP (1U<<2) /* ...)... */ +#define ONIG_SYN_ALLOW_INVALID_INTERVAL (1U<<3) /* {??? */ +#define ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV (1U<<4) /* {,n} => {0,n} */ +#define ONIG_SYN_STRICT_CHECK_BACKREF (1U<<5) /* /(\1)/,/\1()/ ..*/ +#define ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND (1U<<6) /* (?<=a|bc) */ +#define ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP (1U<<7) /* see doc/RE */ +#define ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME (1U<<8) /* (?)(?) */ +#define ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY (1U<<9) /* a{n}?=(?:a{n})? */ +#define ONIG_SYN_ISOLATED_OPTION_CONTINUE_BRANCH (1U<<10) /* ..(?i)...|... */ +#define ONIG_SYN_VARIABLE_LEN_LOOK_BEHIND (1U<<11) /* (?<=a+|..) */ +#define ONIG_SYN_PYTHON (1U<<12) /* \UHHHHHHHH */ +#define ONIG_SYN_WHOLE_OPTIONS (1U<<13) /* (?Ie) */ +#define ONIG_SYN_BRE_ANCHOR_AT_EDGE_OF_SUBEXP (1U<<14) /* \(^abc$\) */ + +/* syntax (behavior) in char class [...] */ +#define ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC (1U<<20) /* [^...] */ +#define ONIG_SYN_BACKSLASH_ESCAPE_IN_CC (1U<<21) /* [..\w..] etc.. */ +#define ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC (1U<<22) +#define ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC (1U<<23) /* [0-9-a]=[0-9\-a] */ +#define ONIG_SYN_ALLOW_INVALID_CODE_END_OF_RANGE_IN_CC (1U<<26) +#define ONIG_SYN_ALLOW_CHAR_TYPE_FOLLOWED_BY_MINUS_IN_CC (1U<<27) /* [\w-%]=[\w\-%] */ +/* syntax (behavior) warning */ +#define ONIG_SYN_WARN_CC_OP_NOT_ESCAPED (1U<<24) /* [,-,] */ +#define ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT (1U<<25) /* (?:a*)+ */ + +/* meta character specifiers (onig_set_meta_char()) */ +#define ONIG_META_CHAR_ESCAPE 0 +#define ONIG_META_CHAR_ANYCHAR 1 +#define ONIG_META_CHAR_ANYTIME 2 +#define ONIG_META_CHAR_ZERO_OR_ONE_TIME 3 +#define ONIG_META_CHAR_ONE_OR_MORE_TIME 4 +#define ONIG_META_CHAR_ANYCHAR_ANYTIME 5 + +#define ONIG_INEFFECTIVE_META_CHAR 0 + +/* error codes */ +#define ONIG_IS_PATTERN_ERROR(ecode) ((ecode) <= -100 && (ecode) > -1000) + +/* normal return */ +#define ONIG_NORMAL 0 +#define ONIG_VALUE_IS_NOT_SET 1 +#define ONIG_MISMATCH -1 +#define ONIG_NO_SUPPORT_CONFIG -2 +#define ONIG_ABORT -3 + +/* internal error */ +#define ONIGERR_MEMORY -5 +#define ONIGERR_TYPE_BUG -6 +#define ONIGERR_PARSER_BUG -11 +#define ONIGERR_STACK_BUG -12 +#define ONIGERR_UNDEFINED_BYTECODE -13 +#define ONIGERR_UNEXPECTED_BYTECODE -14 +#define ONIGERR_MATCH_STACK_LIMIT_OVER -15 +#define ONIGERR_PARSE_DEPTH_LIMIT_OVER -16 +#define ONIGERR_RETRY_LIMIT_IN_MATCH_OVER -17 +#define ONIGERR_RETRY_LIMIT_IN_SEARCH_OVER -18 +#define ONIGERR_SUBEXP_CALL_LIMIT_IN_SEARCH_OVER -19 +#define ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED -21 /*dont use*/ +#define ONIGERR_DEFAULT_ENCODING_IS_NOT_SET -21 +#define ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR -22 +#define ONIGERR_FAIL_TO_INITIALIZE -23 +/* general error */ +#define ONIGERR_INVALID_ARGUMENT -30 +/* syntax error */ +#define ONIGERR_END_PATTERN_AT_LEFT_BRACE -100 +#define ONIGERR_END_PATTERN_AT_LEFT_BRACKET -101 +#define ONIGERR_EMPTY_CHAR_CLASS -102 +#define ONIGERR_PREMATURE_END_OF_CHAR_CLASS -103 +#define ONIGERR_END_PATTERN_AT_ESCAPE -104 +#define ONIGERR_END_PATTERN_AT_META -105 +#define ONIGERR_END_PATTERN_AT_CONTROL -106 +#define ONIGERR_META_CODE_SYNTAX -108 +#define ONIGERR_CONTROL_CODE_SYNTAX -109 +#define ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE -110 +#define ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE -111 +#define ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS -112 +#define ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED -113 +#define ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID -114 +#define ONIGERR_NESTED_REPEAT_OPERATOR -115 +#define ONIGERR_UNMATCHED_CLOSE_PARENTHESIS -116 +#define ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS -117 +#define ONIGERR_END_PATTERN_IN_GROUP -118 +#define ONIGERR_UNDEFINED_GROUP_OPTION -119 +#define ONIGERR_INVALID_GROUP_OPTION -120 +#define ONIGERR_INVALID_POSIX_BRACKET_TYPE -121 +#define ONIGERR_INVALID_LOOK_BEHIND_PATTERN -122 +#define ONIGERR_INVALID_REPEAT_RANGE_PATTERN -123 +/* values error (syntax error) */ +#define ONIGERR_TOO_BIG_NUMBER -200 +#define ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE -201 +#define ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE -202 +#define ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS -203 +#define ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE -204 +#define ONIGERR_TOO_MANY_MULTI_BYTE_RANGES -205 +#define ONIGERR_TOO_SHORT_MULTI_BYTE_STRING -206 +#define ONIGERR_TOO_BIG_BACKREF_NUMBER -207 +#define ONIGERR_INVALID_BACKREF -208 +#define ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED -209 +#define ONIGERR_TOO_MANY_CAPTURES -210 +#define ONIGERR_TOO_LONG_WIDE_CHAR_VALUE -212 +#define ONIGERR_UNDEFINED_OPERATOR -213 +#define ONIGERR_EMPTY_GROUP_NAME -214 +#define ONIGERR_INVALID_GROUP_NAME -215 +#define ONIGERR_INVALID_CHAR_IN_GROUP_NAME -216 +#define ONIGERR_UNDEFINED_NAME_REFERENCE -217 +#define ONIGERR_UNDEFINED_GROUP_REFERENCE -218 +#define ONIGERR_MULTIPLEX_DEFINED_NAME -219 +#define ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL -220 +#define ONIGERR_NEVER_ENDING_RECURSION -221 +#define ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY -222 +#define ONIGERR_INVALID_CHAR_PROPERTY_NAME -223 +#define ONIGERR_INVALID_IF_ELSE_SYNTAX -224 +#define ONIGERR_INVALID_ABSENT_GROUP_PATTERN -225 +#define ONIGERR_INVALID_ABSENT_GROUP_GENERATOR_PATTERN -226 +#define ONIGERR_INVALID_CALLOUT_PATTERN -227 +#define ONIGERR_INVALID_CALLOUT_NAME -228 +#define ONIGERR_UNDEFINED_CALLOUT_NAME -229 +#define ONIGERR_INVALID_CALLOUT_BODY -230 +#define ONIGERR_INVALID_CALLOUT_TAG_NAME -231 +#define ONIGERR_INVALID_CALLOUT_ARG -232 +#define ONIGERR_INVALID_CODE_POINT_VALUE -400 +#define ONIGERR_INVALID_WIDE_CHAR_VALUE -400 +#define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE -401 +#define ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION -402 +#define ONIGERR_INVALID_COMBINATION_OF_OPTIONS -403 +#define ONIGERR_TOO_MANY_USER_DEFINED_OBJECTS -404 +#define ONIGERR_TOO_LONG_PROPERTY_NAME -405 +#define ONIGERR_VERY_INEFFICIENT_PATTERN -406 +#define ONIGERR_LIBRARY_IS_NOT_INITIALIZED -500 + +/* errors related to thread */ +/* #define ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT -1001 */ + + +/* must be smaller than MEM_STATUS_BITS_NUM (unsigned int * 8) */ +#define ONIG_MAX_CAPTURE_HISTORY_GROUP 31 +#define ONIG_IS_CAPTURE_HISTORY_GROUP(r, i) \ + ((i) <= ONIG_MAX_CAPTURE_HISTORY_GROUP && (r)->list && (r)->list[i]) + +typedef struct OnigCaptureTreeNodeStruct { + int group; /* group number */ + int beg; + int end; + int allocated; + int num_childs; + struct OnigCaptureTreeNodeStruct** childs; +} OnigCaptureTreeNode; + +/* match result region type */ +struct re_registers { + int allocated; + int num_regs; + int* beg; + int* end; + /* extended */ + OnigCaptureTreeNode* history_root; /* capture history tree root */ +}; + +/* capture tree traverse */ +#define ONIG_TRAVERSE_CALLBACK_AT_FIRST 1 +#define ONIG_TRAVERSE_CALLBACK_AT_LAST 2 +#define ONIG_TRAVERSE_CALLBACK_AT_BOTH \ + ( ONIG_TRAVERSE_CALLBACK_AT_FIRST | ONIG_TRAVERSE_CALLBACK_AT_LAST ) + + +#define ONIG_REGION_NOTPOS -1 + +typedef struct re_registers OnigRegion; + +typedef struct { + OnigEncoding enc; + OnigUChar* par; + OnigUChar* par_end; +} OnigErrorInfo; + +typedef struct { + int lower; + int upper; +} OnigRepeatRange; + +typedef void (*OnigWarnFunc) P_((const char* s)); +extern void onig_null_warn P_((const char* s)); +#define ONIG_NULL_WARN onig_null_warn + +#define ONIG_CHAR_TABLE_SIZE 256 + +struct re_pattern_buffer; +typedef struct re_pattern_buffer OnigRegexType; +typedef OnigRegexType* OnigRegex; + +#ifndef ONIG_ESCAPE_REGEX_T_COLLISION + typedef OnigRegexType regex_t; +#endif + +struct OnigRegSetStruct; +typedef struct OnigRegSetStruct OnigRegSet; + +typedef enum { + ONIG_REGSET_POSITION_LEAD = 0, + ONIG_REGSET_REGEX_LEAD = 1, + ONIG_REGSET_PRIORITY_TO_REGEX_ORDER = 2 +} OnigRegSetLead; + +typedef struct { + int num_of_elements; + OnigEncoding pattern_enc; + OnigEncoding target_enc; + OnigSyntaxType* syntax; + OnigOptionType option; + OnigCaseFoldType case_fold_flag; +} OnigCompileInfo; + +typedef int (*OnigCallbackEachMatchFunc)(const OnigUChar* str, const OnigUChar* end, const OnigUChar* match_start, OnigRegion* region, void* user_data); + + +/* types for callout */ +typedef enum { + ONIG_CALLOUT_IN_PROGRESS = 1, /* 1<<0 */ + ONIG_CALLOUT_IN_RETRACTION = 2 /* 1<<1 */ +} OnigCalloutIn; + +#define ONIG_CALLOUT_IN_BOTH (ONIG_CALLOUT_IN_PROGRESS | ONIG_CALLOUT_IN_RETRACTION) + +typedef enum { + ONIG_CALLOUT_OF_CONTENTS = 0, + ONIG_CALLOUT_OF_NAME = 1 +} OnigCalloutOf; + +typedef enum { + ONIG_CALLOUT_TYPE_SINGLE = 0, + ONIG_CALLOUT_TYPE_START_CALL = 1, + ONIG_CALLOUT_TYPE_BOTH_CALL = 2, + ONIG_CALLOUT_TYPE_START_MARK_END_CALL = 3, +} OnigCalloutType; + + +#define ONIG_NON_NAME_ID -1 +#define ONIG_NON_CALLOUT_NUM 0 + +#define ONIG_CALLOUT_MAX_ARGS_NUM 4 +#define ONIG_CALLOUT_DATA_SLOT_NUM 5 + +struct OnigCalloutArgsStruct; +typedef struct OnigCalloutArgsStruct OnigCalloutArgs; + +typedef int (*OnigCalloutFunc)(OnigCalloutArgs* args, void* user_data); + +/* callout function return values (less than -1: error code) */ +typedef enum { + ONIG_CALLOUT_FAIL = 1, + ONIG_CALLOUT_SUCCESS = 0 +} OnigCalloutResult; + +typedef enum { + ONIG_TYPE_VOID = 0, + ONIG_TYPE_LONG = 1<<0, + ONIG_TYPE_CHAR = 1<<1, + ONIG_TYPE_STRING = 1<<2, + ONIG_TYPE_POINTER = 1<<3, + ONIG_TYPE_TAG = 1<<4, +} OnigType; + +typedef union { + long l; + OnigCodePoint c; + struct { + OnigUChar* start; + OnigUChar* end; + } s; + void* p; + int tag; /* tag -> callout_num */ +} OnigValue; + + +struct OnigMatchParamStruct; +typedef struct OnigMatchParamStruct OnigMatchParam; + + +/* Oniguruma Native API */ + +ONIG_EXTERN +int onig_initialize P_((OnigEncoding encodings[], int number_of_encodings)); +/* onig_init(): deprecated function. Use onig_initialize(). */ +ONIG_EXTERN +int onig_init P_((void)); +ONIG_EXTERN +int ONIG_VARIADIC_FUNC_ATTR onig_error_code_to_str PV_((OnigUChar* s, int err_code, ...)); +ONIG_EXTERN +int onig_is_error_code_needs_param PV_((int code)); +ONIG_EXTERN +void onig_set_warn_func P_((OnigWarnFunc f)); +ONIG_EXTERN +void onig_set_verb_warn_func P_((OnigWarnFunc f)); +ONIG_EXTERN +int onig_new P_((OnigRegex*, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo)); +ONIG_EXTERN +int onig_reg_init P_((OnigRegex reg, OnigOptionType option, OnigCaseFoldType case_fold_flag, OnigEncoding enc, OnigSyntaxType* syntax)); +int onig_new_without_alloc P_((OnigRegex, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo)); +ONIG_EXTERN +int onig_new_deluxe P_((OnigRegex* reg, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo)); +ONIG_EXTERN +void onig_free P_((OnigRegex)); +ONIG_EXTERN +void onig_free_body P_((OnigRegex)); +ONIG_EXTERN +int onig_scan(OnigRegex reg, const OnigUChar* str, const OnigUChar* end, OnigRegion* region, OnigOptionType option, int (*scan_callback)(int, int, OnigRegion*, void*), void* callback_arg); +ONIG_EXTERN +int onig_search P_((OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegion* region, OnigOptionType option)); +ONIG_EXTERN +int onig_search_with_param P_((OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegion* region, OnigOptionType option, OnigMatchParam* mp)); +ONIG_EXTERN +int onig_match P_((OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* at, OnigRegion* region, OnigOptionType option)); +ONIG_EXTERN +int onig_match_with_param P_((OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* at, OnigRegion* region, OnigOptionType option, OnigMatchParam* mp)); + +ONIG_EXTERN +int onig_regset_new P_((OnigRegSet** rset, int n, OnigRegex regs[])); +ONIG_EXTERN +int onig_regset_add P_((OnigRegSet* set, OnigRegex reg)); +ONIG_EXTERN +int onig_regset_replace P_((OnigRegSet* set, int at, OnigRegex reg)); +ONIG_EXTERN +void onig_regset_free P_((OnigRegSet* set)); +ONIG_EXTERN +int onig_regset_number_of_regex P_((OnigRegSet* set)); +ONIG_EXTERN +OnigRegex onig_regset_get_regex P_((OnigRegSet* set, int at)); +ONIG_EXTERN +OnigRegion* onig_regset_get_region P_((OnigRegSet* set, int at)); +ONIG_EXTERN +int onig_regset_search P_((OnigRegSet* set, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegSetLead lead, OnigOptionType option, int* rmatch_pos)); +ONIG_EXTERN +int onig_regset_search_with_param P_((OnigRegSet* set, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegSetLead lead, OnigOptionType option, OnigMatchParam* mps[], int* rmatch_pos)); + +ONIG_EXTERN +OnigRegion* onig_region_new P_((void)); +ONIG_EXTERN +void onig_region_init P_((OnigRegion* region)); +ONIG_EXTERN +void onig_region_free P_((OnigRegion* region, int free_self)); +ONIG_EXTERN +void onig_region_copy P_((OnigRegion* to, OnigRegion* from)); +ONIG_EXTERN +void onig_region_clear P_((OnigRegion* region)); +ONIG_EXTERN +int onig_region_resize P_((OnigRegion* region, int n)); +ONIG_EXTERN +int onig_region_set P_((OnigRegion* region, int at, int beg, int end)); +ONIG_EXTERN +int onig_name_to_group_numbers P_((OnigRegex reg, const OnigUChar* name, const OnigUChar* name_end, int** nums)); +ONIG_EXTERN +int onig_name_to_backref_number P_((OnigRegex reg, const OnigUChar* name, const OnigUChar* name_end, OnigRegion *region)); +ONIG_EXTERN +int onig_foreach_name P_((OnigRegex reg, int (*func)(const OnigUChar*, const OnigUChar*,int,int*,OnigRegex,void*), void* arg)); +ONIG_EXTERN +int onig_number_of_names P_((OnigRegex reg)); +ONIG_EXTERN +int onig_number_of_captures P_((OnigRegex reg)); +ONIG_EXTERN +int onig_number_of_capture_histories P_((OnigRegex reg)); +ONIG_EXTERN +OnigCaptureTreeNode* onig_get_capture_tree P_((OnigRegion* region)); +ONIG_EXTERN +int onig_capture_tree_traverse P_((OnigRegion* region, int at, int(*callback_func)(int,int,int,int,int,void*), void* arg)); +ONIG_EXTERN +int onig_noname_group_capture_is_active P_((OnigRegex reg)); +ONIG_EXTERN +OnigEncoding onig_get_encoding P_((OnigRegex reg)); +ONIG_EXTERN +OnigOptionType onig_get_options P_((OnigRegex reg)); +ONIG_EXTERN +OnigCaseFoldType onig_get_case_fold_flag P_((OnigRegex reg)); +ONIG_EXTERN +OnigSyntaxType* onig_get_syntax P_((OnigRegex reg)); +ONIG_EXTERN +int onig_set_default_syntax P_((OnigSyntaxType* syntax)); +ONIG_EXTERN +void onig_copy_syntax P_((OnigSyntaxType* to, OnigSyntaxType* from)); +ONIG_EXTERN +unsigned int onig_get_syntax_op P_((OnigSyntaxType* syntax)); +ONIG_EXTERN +unsigned int onig_get_syntax_op2 P_((OnigSyntaxType* syntax)); +ONIG_EXTERN +unsigned int onig_get_syntax_behavior P_((OnigSyntaxType* syntax)); +ONIG_EXTERN +OnigOptionType onig_get_syntax_options P_((OnigSyntaxType* syntax)); +ONIG_EXTERN +void onig_set_syntax_op P_((OnigSyntaxType* syntax, unsigned int op)); +ONIG_EXTERN +void onig_set_syntax_op2 P_((OnigSyntaxType* syntax, unsigned int op2)); +ONIG_EXTERN +void onig_set_syntax_behavior P_((OnigSyntaxType* syntax, unsigned int behavior)); +ONIG_EXTERN +void onig_set_syntax_options P_((OnigSyntaxType* syntax, OnigOptionType options)); +ONIG_EXTERN +int onig_set_meta_char P_((OnigSyntaxType* syntax, unsigned int what, OnigCodePoint code)); +ONIG_EXTERN +void onig_copy_encoding P_((OnigEncoding to, OnigEncoding from)); +ONIG_EXTERN +OnigCaseFoldType onig_get_default_case_fold_flag P_((void)); +ONIG_EXTERN +int onig_set_default_case_fold_flag P_((OnigCaseFoldType case_fold_flag)); +ONIG_EXTERN +unsigned int onig_get_match_stack_limit_size P_((void)); +ONIG_EXTERN +int onig_set_match_stack_limit_size P_((unsigned int size)); +ONIG_EXTERN +unsigned long onig_get_retry_limit_in_match P_((void)); +ONIG_EXTERN +int onig_set_retry_limit_in_match P_((unsigned long n)); +ONIG_EXTERN +unsigned long onig_get_retry_limit_in_search P_((void)); +ONIG_EXTERN +int onig_set_retry_limit_in_search P_((unsigned long n)); +ONIG_EXTERN +unsigned int onig_get_parse_depth_limit P_((void)); +ONIG_EXTERN +int onig_set_capture_num_limit P_((int num)); +ONIG_EXTERN +int onig_set_parse_depth_limit P_((unsigned int depth)); +ONIG_EXTERN +unsigned long onig_get_subexp_call_limit_in_search P_((void)); +ONIG_EXTERN +int onig_set_subexp_call_limit_in_search P_((unsigned long n)); +ONIG_EXTERN +int onig_get_subexp_call_max_nest_level P_((void)); +ONIG_EXTERN +int onig_set_subexp_call_max_nest_level P_((int level)); +ONIG_EXTERN +int onig_unicode_define_user_property P_((const char* name, OnigCodePoint* ranges)); +ONIG_EXTERN +int onig_end P_((void)); +ONIG_EXTERN +const char* onig_version P_((void)); +ONIG_EXTERN +const char* onig_copyright P_((void)); + +/* for callback each match */ +ONIG_EXTERN +OnigCallbackEachMatchFunc onig_get_callback_each_match P_((void)); +ONIG_EXTERN +int onig_set_callback_each_match P_((OnigCallbackEachMatchFunc f)); + +/* for OnigMatchParam */ +ONIG_EXTERN +OnigMatchParam* onig_new_match_param P_((void)); +ONIG_EXTERN +void onig_free_match_param P_((OnigMatchParam* p)); +ONIG_EXTERN +void onig_free_match_param_content P_((OnigMatchParam* p)); +ONIG_EXTERN +int onig_initialize_match_param P_((OnigMatchParam* mp)); +ONIG_EXTERN +int onig_set_match_stack_limit_size_of_match_param P_((OnigMatchParam* param, unsigned int limit)); +ONIG_EXTERN +int onig_set_retry_limit_in_match_of_match_param P_((OnigMatchParam* param, unsigned long limit)); +ONIG_EXTERN +int onig_set_retry_limit_in_search_of_match_param P_((OnigMatchParam* param, unsigned long limit)); +ONIG_EXTERN +int onig_set_progress_callout_of_match_param P_((OnigMatchParam* param, OnigCalloutFunc f)); +ONIG_EXTERN +int onig_set_retraction_callout_of_match_param P_((OnigMatchParam* param, OnigCalloutFunc f)); +ONIG_EXTERN +int onig_set_callout_user_data_of_match_param P_((OnigMatchParam* param, void* user_data)); + +/* for callout functions */ +ONIG_EXTERN +OnigCalloutFunc onig_get_progress_callout P_((void)); +ONIG_EXTERN +int onig_set_progress_callout P_((OnigCalloutFunc f)); +ONIG_EXTERN +OnigCalloutFunc onig_get_retraction_callout P_((void)); +ONIG_EXTERN +int onig_set_retraction_callout P_((OnigCalloutFunc f)); +ONIG_EXTERN +int onig_set_callout_of_name P_((OnigEncoding enc, OnigCalloutType type, OnigUChar* name, OnigUChar* name_end, int callout_in, OnigCalloutFunc callout, OnigCalloutFunc end_callout, int arg_num, unsigned int arg_types[], int optional_arg_num, OnigValue opt_defaults[])); +ONIG_EXTERN +OnigUChar* onig_get_callout_name_by_name_id P_((int id)); +ONIG_EXTERN +int onig_get_callout_num_by_tag P_((OnigRegex reg, const OnigUChar* tag, const OnigUChar* tag_end)); +ONIG_EXTERN +int onig_get_callout_data_by_tag P_((OnigRegex reg, OnigMatchParam* mp, const OnigUChar* tag, const OnigUChar* tag_end, int slot, OnigType* type, OnigValue* val)); +ONIG_EXTERN +int onig_set_callout_data_by_tag P_((OnigRegex reg, OnigMatchParam* mp, const OnigUChar* tag, const OnigUChar* tag_end, int slot, OnigType type, OnigValue* val)); +ONIG_EXTERN +int onig_get_callout_data_by_tag_dont_clear_old P_((OnigRegex reg, OnigMatchParam* mp, const OnigUChar* tag, const OnigUChar* tag_end, int slot, OnigType* type, OnigValue* val)); + +/* used in callout functions */ +ONIG_EXTERN +int onig_get_callout_num_by_callout_args P_((OnigCalloutArgs* args)); +ONIG_EXTERN +OnigCalloutIn onig_get_callout_in_by_callout_args P_((OnigCalloutArgs* args)); +ONIG_EXTERN +int onig_get_name_id_by_callout_args P_((OnigCalloutArgs* args)); +ONIG_EXTERN +const OnigUChar* onig_get_contents_by_callout_args P_((OnigCalloutArgs* args)); +ONIG_EXTERN +const OnigUChar* onig_get_contents_end_by_callout_args P_((OnigCalloutArgs* args)); +ONIG_EXTERN +int onig_get_args_num_by_callout_args P_((OnigCalloutArgs* args)); +ONIG_EXTERN +int onig_get_passed_args_num_by_callout_args P_((OnigCalloutArgs* args)); +ONIG_EXTERN +int onig_get_arg_by_callout_args P_((OnigCalloutArgs* args, int index, OnigType* type, OnigValue* val)); +ONIG_EXTERN +const OnigUChar* onig_get_string_by_callout_args P_((OnigCalloutArgs* args)); +ONIG_EXTERN +const OnigUChar* onig_get_string_end_by_callout_args P_((OnigCalloutArgs* args)); +ONIG_EXTERN +const OnigUChar* onig_get_start_by_callout_args P_((OnigCalloutArgs* args)); +ONIG_EXTERN +const OnigUChar* onig_get_right_range_by_callout_args P_((OnigCalloutArgs* args)); +ONIG_EXTERN +const OnigUChar* onig_get_current_by_callout_args P_((OnigCalloutArgs* args)); +ONIG_EXTERN +OnigRegex onig_get_regex_by_callout_args P_((OnigCalloutArgs* args)); +ONIG_EXTERN +unsigned long onig_get_retry_counter_by_callout_args P_((OnigCalloutArgs* args)); +ONIG_EXTERN +int onig_callout_tag_is_exist_at_callout_num P_((OnigRegex reg, int callout_num)); +ONIG_EXTERN +const OnigUChar* onig_get_callout_tag_start P_((OnigRegex reg, int callout_num)); +ONIG_EXTERN +const OnigUChar* onig_get_callout_tag_end P_((OnigRegex reg, int callout_num)); +ONIG_EXTERN +int onig_get_callout_data_dont_clear_old P_((OnigRegex reg, OnigMatchParam* mp, int callout_num, int slot, OnigType* type, OnigValue* val)); +ONIG_EXTERN +int onig_get_callout_data_by_callout_args_self_dont_clear_old P_((OnigCalloutArgs* args, int slot, OnigType* type, OnigValue* val)); +ONIG_EXTERN +int onig_get_callout_data P_((OnigRegex reg, OnigMatchParam* mp, int callout_num, int slot, OnigType* type, OnigValue* val)); +ONIG_EXTERN +int onig_get_callout_data_by_callout_args P_((OnigCalloutArgs* args, int callout_num, int slot, OnigType* type, OnigValue* val)); +ONIG_EXTERN +int onig_get_callout_data_by_callout_args_self P_((OnigCalloutArgs* args, int slot, OnigType* type, OnigValue* val)); +ONIG_EXTERN +int onig_set_callout_data P_((OnigRegex reg, OnigMatchParam* mp, int callout_num, int slot, OnigType type, OnigValue* val)); +ONIG_EXTERN +int onig_set_callout_data_by_callout_args P_((OnigCalloutArgs* args, int callout_num, int slot, OnigType type, OnigValue* val)); +ONIG_EXTERN +int onig_set_callout_data_by_callout_args_self P_((OnigCalloutArgs* args, int slot, OnigType type, OnigValue* val)); +ONIG_EXTERN +int onig_get_capture_range_in_callout P_((OnigCalloutArgs* args, int mem_num, int* begin, int* end)); +ONIG_EXTERN +int onig_get_used_stack_size_in_callout P_((OnigCalloutArgs* args, int* used_num, int* used_bytes)); + +/* builtin callout functions */ +ONIG_EXTERN +int onig_builtin_fail P_((OnigCalloutArgs* args, void* user_data)); +ONIG_EXTERN +int onig_builtin_mismatch P_((OnigCalloutArgs* args, void* user_data)); +ONIG_EXTERN +int onig_builtin_error P_((OnigCalloutArgs* args, void* user_data)); +ONIG_EXTERN +int onig_builtin_skip P_((OnigCalloutArgs* args, void* user_data)); +ONIG_EXTERN +int onig_builtin_count P_((OnigCalloutArgs* args, void* user_data)); +ONIG_EXTERN +int onig_builtin_total_count P_((OnigCalloutArgs* args, void* user_data)); +ONIG_EXTERN +int onig_builtin_max P_((OnigCalloutArgs* args, void* user_data)); +ONIG_EXTERN +int onig_builtin_cmp P_((OnigCalloutArgs* args, void* user_data)); + +ONIG_EXTERN +int onig_setup_builtin_monitors_by_ascii_encoded_name P_((void* fp)); + +#ifdef __cplusplus +} +#endif + +#endif /* ONIGURUMA_H */ diff --git a/internal/components/third_party/oniguruma/src/regcomp.c b/internal/components/third_party/oniguruma/src/regcomp.c new file mode 100644 index 0000000000..9f2d5aa014 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/regcomp.c @@ -0,0 +1,8589 @@ +/********************************************************************** + regcomp.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regparse.h" + +#define OPS_INIT_SIZE 8 + +#define ND_IS_REAL_IGNORECASE(node) \ + (ND_IS_IGNORECASE(node) && !ND_STRING_IS_CRUDE(node)) + +typedef struct { + OnigLen min; + OnigLen max; +} MinMaxLen; + +typedef struct { + OnigLen min; + OnigLen max; + int min_is_sure; +} MinMaxCharLen; + +OnigCaseFoldType OnigDefaultCaseFoldFlag = ONIGENC_CASE_FOLD_MIN; + +static OnigLen node_min_byte_len(Node* node, ParseEnv* env); + +static int +ops_init(regex_t* reg, int init_alloc_size) +{ + Operation* p; + size_t size; + + if (init_alloc_size <= 0) + return ONIGERR_PARSER_BUG; + + size = sizeof(Operation) * init_alloc_size; + p = (Operation* )xrealloc(reg->ops, size); + CHECK_NULL_RETURN_MEMERR(p); + reg->ops = p; +#ifdef USE_DIRECT_THREADED_CODE + { + enum OpCode* cp; + size = sizeof(enum OpCode) * init_alloc_size; + cp = (enum OpCode* )xrealloc(reg->ocs, size); + CHECK_NULL_RETURN_MEMERR(cp); + reg->ocs = cp; + } +#endif + + reg->ops_curr = 0; /* !!! not yet done ops_new() */ + reg->ops_alloc = init_alloc_size; + reg->ops_used = 0; + + return ONIG_NORMAL; +} + +static int +ops_resize(regex_t* reg, int n) +{ +#ifdef USE_DIRECT_THREADED_CODE + enum OpCode* cp; +#endif + Operation* p; + size_t size; + + if (n == reg->ops_alloc) return ONIG_NORMAL; + if (n <= 0) return ONIGERR_PARSER_BUG; + + size = sizeof(Operation) * n; + p = (Operation* )xrealloc(reg->ops, size); + CHECK_NULL_RETURN_MEMERR(p); + reg->ops = p; + +#ifdef USE_DIRECT_THREADED_CODE + size = sizeof(enum OpCode) * n; + cp = (enum OpCode* )xrealloc(reg->ocs, size); + CHECK_NULL_RETURN_MEMERR(cp); + reg->ocs = cp; +#endif + + reg->ops_alloc = n; + if (reg->ops_used == 0) + reg->ops_curr = 0; + else + reg->ops_curr = reg->ops + (reg->ops_used - 1); + + return ONIG_NORMAL; +} + +static int +ops_new(regex_t* reg) +{ + if (reg->ops_used >= reg->ops_alloc) { + int r = ops_resize(reg, reg->ops_alloc << 1); + if (r != ONIG_NORMAL) return r; + } + + reg->ops_curr = reg->ops + reg->ops_used; + reg->ops_used++; + + xmemset(reg->ops_curr, 0, sizeof(Operation)); + return ONIG_NORMAL; +} + +static int +is_in_string_pool(regex_t* reg, UChar* s) +{ + return (s >= reg->string_pool && s < reg->string_pool_end); +} + +static void +ops_free(regex_t* reg) +{ + int i; + + if (IS_NULL(reg->ops)) return ; + + for (i = 0; i < (int )reg->ops_used; i++) { + enum OpCode opcode; + Operation* op; + + op = reg->ops + i; + +#ifdef USE_DIRECT_THREADED_CODE + opcode = *(reg->ocs + i); +#else + opcode = op->opcode; +#endif + + switch (opcode) { + case OP_STR_MBN: + if (! is_in_string_pool(reg, op->exact_len_n.s)) + xfree(op->exact_len_n.s); + break; + case OP_STR_N: case OP_STR_MB2N: case OP_STR_MB3N: + if (! is_in_string_pool(reg, op->exact_n.s)) + xfree(op->exact_n.s); + break; + case OP_STR_1: case OP_STR_2: case OP_STR_3: case OP_STR_4: + case OP_STR_5: case OP_STR_MB2N1: case OP_STR_MB2N2: + case OP_STR_MB2N3: + break; + + case OP_CCLASS_NOT: case OP_CCLASS: + xfree(op->cclass.bsp); + break; + + case OP_CCLASS_MB_NOT: case OP_CCLASS_MB: + xfree(op->cclass_mb.mb); + break; + case OP_CCLASS_MIX_NOT: case OP_CCLASS_MIX: + xfree(op->cclass_mix.mb); + xfree(op->cclass_mix.bsp); + break; + + case OP_BACKREF1: case OP_BACKREF2: case OP_BACKREF_N: case OP_BACKREF_N_IC: + break; + case OP_BACKREF_MULTI: case OP_BACKREF_MULTI_IC: + case OP_BACKREF_CHECK: +#ifdef USE_BACKREF_WITH_LEVEL + case OP_BACKREF_WITH_LEVEL: + case OP_BACKREF_WITH_LEVEL_IC: + case OP_BACKREF_CHECK_WITH_LEVEL: +#endif + if (op->backref_general.num != 1) + xfree(op->backref_general.ns); + break; + + default: + break; + } + } + + xfree(reg->ops); +#ifdef USE_DIRECT_THREADED_CODE + xfree(reg->ocs); + reg->ocs = 0; +#endif + + reg->ops = 0; + reg->ops_curr = 0; + reg->ops_alloc = 0; + reg->ops_used = 0; +} + +static int +ops_calc_size_of_string_pool(regex_t* reg) +{ + int i; + int total; + + if (IS_NULL(reg->ops)) return 0; + + total = 0; + for (i = 0; i < (int )reg->ops_used; i++) { + enum OpCode opcode; + Operation* op; + + op = reg->ops + i; +#ifdef USE_DIRECT_THREADED_CODE + opcode = *(reg->ocs + i); +#else + opcode = op->opcode; +#endif + + switch (opcode) { + case OP_STR_MBN: + total += op->exact_len_n.len * op->exact_len_n.n; + break; + case OP_STR_N: + case OP_STR_MB2N: + total += op->exact_n.n * 2; + break; + case OP_STR_MB3N: + total += op->exact_n.n * 3; + break; + + default: + break; + } + } + + return total; +} + +static int +ops_make_string_pool(regex_t* reg) +{ + int i; + int len; + int size; + UChar* pool; + UChar* curr; + + size = ops_calc_size_of_string_pool(reg); + if (size <= 0) { + return 0; + } + + curr = pool = (UChar* )xmalloc((size_t )size); + CHECK_NULL_RETURN_MEMERR(pool); + + for (i = 0; i < (int )reg->ops_used; i++) { + enum OpCode opcode; + Operation* op; + + op = reg->ops + i; +#ifdef USE_DIRECT_THREADED_CODE + opcode = *(reg->ocs + i); +#else + opcode = op->opcode; +#endif + + switch (opcode) { + case OP_STR_MBN: + len = op->exact_len_n.len * op->exact_len_n.n; + xmemcpy(curr, op->exact_len_n.s, len); + xfree(op->exact_len_n.s); + op->exact_len_n.s = curr; + curr += len; + break; + case OP_STR_N: + len = op->exact_n.n; + copy: + xmemcpy(curr, op->exact_n.s, len); + xfree(op->exact_n.s); + op->exact_n.s = curr; + curr += len; + break; + case OP_STR_MB2N: + len = op->exact_n.n * 2; + goto copy; + break; + case OP_STR_MB3N: + len = op->exact_n.n * 3; + goto copy; + break; + + default: + break; + } + } + + reg->string_pool = pool; + reg->string_pool_end = pool + size; + return 0; +} + +extern OnigCaseFoldType +onig_get_default_case_fold_flag(void) +{ + return OnigDefaultCaseFoldFlag; +} + +extern int +onig_set_default_case_fold_flag(OnigCaseFoldType case_fold_flag) +{ + OnigDefaultCaseFoldFlag = case_fold_flag; + return 0; +} + +static int +len_multiply_cmp(OnigLen x, int y, OnigLen v) +{ + if (x == 0 || y == 0) return -1; + + if (x < INFINITE_LEN / y) { + OnigLen xy = x * (OnigLen )y; + if (xy > v) return 1; + else { + if (xy == v) return 0; + else return -1; + } + } + else + return v == INFINITE_LEN ? 0 : 1; +} + +extern int +onig_positive_int_multiply(int x, int y) +{ + if (x == 0 || y == 0) return 0; + + if (x < ONIG_INT_MAX / y) + return x * y; + else + return -1; +} + + +static void +node_swap(Node* a, Node* b) +{ + Node c; + + c = *a; *a = *b; *b = c; + + if (ND_TYPE(a) == ND_STRING) { + StrNode* sn = STR_(a); + if (sn->capacity == 0) { + int len = (int )(sn->end - sn->s); + sn->s = sn->buf; + sn->end = sn->s + len; + } + } + + if (ND_TYPE(b) == ND_STRING) { + StrNode* sn = STR_(b); + if (sn->capacity == 0) { + int len = (int )(sn->end - sn->s); + sn->s = sn->buf; + sn->end = sn->s + len; + } + } +} + +static int +node_list_len(Node* list) +{ + int len; + + len = 1; + while (IS_NOT_NULL(ND_CDR(list))) { + list = ND_CDR(list); + len++; + } + + return len; +} + +static Node* +node_list_add(Node* list, Node* x) +{ + Node *n; + + n = onig_node_new_list(x, NULL); + if (IS_NULL(n)) return NULL_NODE; + + if (IS_NOT_NULL(list)) { + while (IS_NOT_NULL(ND_CDR(list))) + list = ND_CDR(list); + + ND_CDR(list) = n; + } + + return n; +} + +static int +node_str_node_cat(Node* node, Node* add) +{ + int r; + + if (ND_STATUS(node) != ND_STATUS(add)) + return ONIGERR_TYPE_BUG; + + if (STR_(node)->flag != STR_(add)->flag) + return ONIGERR_TYPE_BUG; + + r = onig_node_str_cat(node, STR_(add)->s, STR_(add)->end); + if (r != 0) return r; + + return 0; +} + +static void +node_conv_to_str_node(Node* node, Node* ref_node) +{ + xmemset(node, 0, sizeof(*node)); + ND_SET_TYPE(node, ND_STRING); + ND_STATUS(node) = ND_STATUS(ref_node); + + STR_(node)->flag = STR_(ref_node)->flag; + STR_(node)->s = STR_(node)->buf; + STR_(node)->end = STR_(node)->buf; + STR_(node)->capacity = 0; +} + +static OnigLen +distance_add(OnigLen d1, OnigLen d2) +{ + if (d1 == INFINITE_LEN || d2 == INFINITE_LEN) + return INFINITE_LEN; + else { + if (d1 <= INFINITE_LEN - d2) return d1 + d2; + else return INFINITE_LEN; + } +} + +static OnigLen +distance_multiply(OnigLen d, int m) +{ + if (m == 0) return 0; + + if (d < INFINITE_LEN / m) + return d * m; + else + return INFINITE_LEN; +} + +static int +bitset_is_empty(BitSetRef bs) +{ + int i; + + for (i = 0; i < (int )BITSET_REAL_SIZE; i++) { + if (bs[i] != 0) return 0; + } + return 1; +} + +#ifdef USE_CALL + +static int +unset_addr_list_init(UnsetAddrList* list, int size) +{ + UnsetAddr* p = (UnsetAddr* )xmalloc(sizeof(UnsetAddr)* size); + CHECK_NULL_RETURN_MEMERR(p); + + list->num = 0; + list->alloc = size; + list->us = p; + return 0; +} + +static void +unset_addr_list_end(UnsetAddrList* list) +{ + if (IS_NOT_NULL(list->us)) + xfree(list->us); +} + +static int +unset_addr_list_add(UnsetAddrList* list, int offset, struct _Node* node) +{ + UnsetAddr* p; + int size; + + if (list->num >= list->alloc) { + size = list->alloc * 2; + p = (UnsetAddr* )xrealloc(list->us, sizeof(UnsetAddr) * size); + CHECK_NULL_RETURN_MEMERR(p); + list->alloc = size; + list->us = p; + } + + list->us[list->num].offset = offset; + list->us[list->num].target = node; + list->num++; + return 0; +} +#endif /* USE_CALL */ + +enum CharLenReturnType { + CHAR_LEN_NORMAL = 0, /* fixed or variable */ + CHAR_LEN_TOP_ALT_FIXED = 1 +}; + +static int +mmcl_fixed(MinMaxCharLen* c) +{ + return (c->min == c->max && c->min != INFINITE_LEN); +} + +static void +mmcl_set(MinMaxCharLen* l, OnigLen len) +{ + l->min = len; + l->max = len; + l->min_is_sure = TRUE; +} + +static void +mmcl_set_min_max(MinMaxCharLen* l, OnigLen min, OnigLen max, int min_is_sure) +{ + l->min = min; + l->max = max; + l->min_is_sure = min_is_sure; +} + +static void +mmcl_add(MinMaxCharLen* to, MinMaxCharLen* add) +{ + to->min = distance_add(to->min, add->min); + to->max = distance_add(to->max, add->max); + + to->min_is_sure = add->min_is_sure != FALSE && to->min_is_sure != FALSE; +} + +static void +mmcl_multiply(MinMaxCharLen* to, int m) +{ + to->min = distance_multiply(to->min, m); + to->max = distance_multiply(to->max, m); +} + +static void +mmcl_repeat_range_multiply(MinMaxCharLen* to, int mlow, int mhigh) +{ + to->min = distance_multiply(to->min, mlow); + + if (IS_INFINITE_REPEAT(mhigh)) + to->max = INFINITE_LEN; + else + to->max = distance_multiply(to->max, mhigh); +} + +static void +mmcl_alt_merge(MinMaxCharLen* to, MinMaxCharLen* alt) +{ + if (to->min > alt->min) { + to->min = alt->min; + to->min_is_sure = alt->min_is_sure; + } + else if (to->min == alt->min) { + if (alt->min_is_sure != FALSE) + to->min_is_sure = TRUE; + } + + if (to->max < alt->max) to->max = alt->max; +} + +#ifndef ONIG_DONT_OPTIMIZE + +static int +mml_is_equal(MinMaxLen* a, MinMaxLen* b) +{ + return a->min == b->min && a->max == b->max; +} + +static void +mml_set_min_max(MinMaxLen* l, OnigLen min, OnigLen max) +{ + l->min = min; + l->max = max; +} + +static void +mml_clear(MinMaxLen* l) +{ + l->min = l->max = 0; +} + +static void +mml_copy(MinMaxLen* to, MinMaxLen* from) +{ + to->min = from->min; + to->max = from->max; +} + +static void +mml_add(MinMaxLen* to, MinMaxLen* add) +{ + to->min = distance_add(to->min, add->min); + to->max = distance_add(to->max, add->max); +} + +static void +mml_alt_merge(MinMaxLen* to, MinMaxLen* alt) +{ + if (to->min > alt->min) to->min = alt->min; + if (to->max < alt->max) to->max = alt->max; +} + +#endif + +/* fixed size pattern node only */ +static int +node_char_len1(Node* node, regex_t* reg, MinMaxCharLen* ci, ParseEnv* env, + int level) +{ + MinMaxCharLen tci; + int r = CHAR_LEN_NORMAL; + + level++; + + switch (ND_TYPE(node)) { + case ND_LIST: + { + int first = TRUE; + do { + r = node_char_len1(ND_CAR(node), reg, &tci, env, level); + if (r < 0) break; + if (first == TRUE) { + *ci = tci; + first = FALSE; + } + else + mmcl_add(ci, &tci); + } while (IS_NOT_NULL(node = ND_CDR(node))); + } + break; + + case ND_ALT: + { + int fixed; + + r = node_char_len1(ND_CAR(node), reg, ci, env, level); + if (r < 0) break; + + fixed = TRUE; + while (IS_NOT_NULL(node = ND_CDR(node))) { + r = node_char_len1(ND_CAR(node), reg, &tci, env, level); + if (r < 0) break; + if (! mmcl_fixed(&tci)) + fixed = FALSE; + mmcl_alt_merge(ci, &tci); + } + if (r < 0) break; + + r = CHAR_LEN_NORMAL; + if (mmcl_fixed(ci)) break; + + if (fixed == TRUE && level == 1) { + r = CHAR_LEN_TOP_ALT_FIXED; + } + } + break; + + case ND_STRING: + { + OnigLen clen; + StrNode* sn = STR_(node); + UChar *s = sn->s; + + if (ND_IS_REAL_IGNORECASE(node) && + CASE_FOLD_IS_NOT_ASCII_ONLY(env->case_fold_flag)) { + /* Such a case is possible. + ex. /(?i)(?<=\1)(a)/ + Backref node refer to capture group, but it doesn't tune yet. + */ + r = ONIGERR_INVALID_LOOK_BEHIND_PATTERN; + break; + } + + clen = 0; + while (s < sn->end) { + s += enclen(reg->enc, s); + clen = distance_add(clen, 1); + } + mmcl_set(ci, clen); + } + break; + + case ND_QUANT: + { + QuantNode* qn = QUANT_(node); + + if (qn->lower == qn->upper) { + if (qn->upper == 0) { + mmcl_set(ci, 0); + } + else { + r = node_char_len1(ND_BODY(node), reg, ci, env, level); + if (r < 0) break; + mmcl_multiply(ci, qn->lower); + } + } + else { + r = node_char_len1(ND_BODY(node), reg, ci, env, level); + if (r < 0) break; + mmcl_repeat_range_multiply(ci, qn->lower, qn->upper); + } + } + break; + +#ifdef USE_CALL + case ND_CALL: + if (ND_IS_RECURSION(node)) + mmcl_set_min_max(ci, 0, INFINITE_LEN, FALSE); + else + r = node_char_len1(ND_BODY(node), reg, ci, env, level); + break; +#endif + + case ND_CTYPE: + case ND_CCLASS: + mmcl_set(ci, 1); + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + switch (en->type) { + case BAG_MEMORY: + if (ND_IS_FIXED_CLEN(node)) { + mmcl_set_min_max(ci, en->min_char_len, en->max_char_len, + ND_IS_FIXED_CLEN_MIN_SURE(node)); + } + else { + if (ND_IS_MARK1(node)) { + mmcl_set_min_max(ci, 0, INFINITE_LEN, FALSE); + } + else { + ND_STATUS_ADD(node, MARK1); + r = node_char_len1(ND_BODY(node), reg, ci, env, level); + ND_STATUS_REMOVE(node, MARK1); + if (r < 0) break; + + en->min_char_len = ci->min; + en->max_char_len = ci->max; + ND_STATUS_ADD(node, FIXED_CLEN); + if (ci->min_is_sure != FALSE) + ND_STATUS_ADD(node, FIXED_CLEN_MIN_SURE); + } + } + /* can't optimize look-behind if capture exists. */ + ci->min_is_sure = FALSE; + break; + case BAG_OPTION: + case BAG_STOP_BACKTRACK: + r = node_char_len1(ND_BODY(node), reg, ci, env, level); + break; + case BAG_IF_ELSE: + { + MinMaxCharLen eci; + + r = node_char_len1(ND_BODY(node), reg, ci, env, level); + if (r < 0) break; + + if (IS_NOT_NULL(en->te.Then)) { + r = node_char_len1(en->te.Then, reg, &tci, env, level); + if (r < 0) break; + mmcl_add(ci, &tci); + } + + if (IS_NOT_NULL(en->te.Else)) { + r = node_char_len1(en->te.Else, reg, &eci, env, level); + if (r < 0) break; + } + else { + mmcl_set(&eci, 0); + } + + mmcl_alt_merge(ci, &eci); + } + break; + default: /* never come here */ + r = ONIGERR_PARSER_BUG; + break; + } + } + break; + + case ND_GIMMICK: + mmcl_set(ci, 0); + break; + + case ND_ANCHOR: + zero: + mmcl_set(ci, 0); + /* can't optimize look-behind if anchor exists. */ + ci->min_is_sure = FALSE; + break; + + case ND_BACKREF: + if (ND_IS_CHECKER(node)) + goto zero; + + if (ND_IS_RECURSION(node)) { +#ifdef USE_BACKREF_WITH_LEVEL + if (ND_IS_NEST_LEVEL(node)) { + mmcl_set_min_max(ci, 0, INFINITE_LEN, FALSE); + break; + } +#endif + + mmcl_set_min_max(ci, 0, 0, FALSE); + break; + } + + { + int i; + int* backs; + MemEnv* mem_env = PARSEENV_MEMENV(env); + BackRefNode* br = BACKREF_(node); + + backs = BACKREFS_P(br); + r = node_char_len1(mem_env[backs[0]].mem_node, reg, ci, env, level); + if (r < 0) break; + if (! mmcl_fixed(ci)) ci->min_is_sure = FALSE; + + for (i = 1; i < br->back_num; i++) { + r = node_char_len1(mem_env[backs[i]].mem_node, reg, &tci, env, level); + if (r < 0) break; + if (! mmcl_fixed(&tci)) tci.min_is_sure = FALSE; + mmcl_alt_merge(ci, &tci); + } + } + break; + + default: /* never come here */ + r = ONIGERR_PARSER_BUG; + break; + } + + return r; +} + +static int +node_char_len(Node* node, regex_t* reg, MinMaxCharLen* ci, ParseEnv* env) +{ + return node_char_len1(node, reg, ci, env, 0); +} + + +static int +add_op(regex_t* reg, int opcode) +{ + int r; + + r = ops_new(reg); + if (r != ONIG_NORMAL) return r; + +#ifdef USE_DIRECT_THREADED_CODE + *(reg->ocs + (reg->ops_curr - reg->ops)) = opcode; +#else + reg->ops_curr->opcode = opcode; +#endif + + return 0; +} + +static int compile_length_tree(Node* node, regex_t* reg, ParseEnv* env); +static int compile_tree(Node* node, regex_t* reg, ParseEnv* env); + + +#define IS_NEED_STR_LEN_OP(op) \ + ((op) == OP_STR_N || (op) == OP_STR_MB2N ||\ + (op) == OP_STR_MB3N || (op) == OP_STR_MBN) + +static int +select_str_opcode(int mb_len, int str_len) +{ + int op; + + switch (mb_len) { + case 1: + switch (str_len) { + case 1: op = OP_STR_1; break; + case 2: op = OP_STR_2; break; + case 3: op = OP_STR_3; break; + case 4: op = OP_STR_4; break; + case 5: op = OP_STR_5; break; + default: op = OP_STR_N; break; + } + break; + + case 2: + switch (str_len) { + case 1: op = OP_STR_MB2N1; break; + case 2: op = OP_STR_MB2N2; break; + case 3: op = OP_STR_MB2N3; break; + default: op = OP_STR_MB2N; break; + } + break; + + case 3: + op = OP_STR_MB3N; + break; + + default: + op = OP_STR_MBN; + break; + } + + return op; +} + +static int +is_strict_real_node(Node* node) +{ + switch (ND_TYPE(node)) { + case ND_STRING: + { + StrNode* sn = STR_(node); + return (sn->end != sn->s); + } + break; + + case ND_CCLASS: + case ND_CTYPE: + return 1; + break; + + default: + return 0; + break; + } +} + +static int +compile_quant_body_with_empty_check(QuantNode* qn, regex_t* reg, ParseEnv* env) +{ + int r; + int saved_num_empty_check; + int emptiness; + Node* body; + + body = ND_BODY((Node* )qn); + emptiness = qn->emptiness; + saved_num_empty_check = reg->num_empty_check; + + if (emptiness != BODY_IS_NOT_EMPTY) { + r = add_op(reg, OP_EMPTY_CHECK_START); + if (r != 0) return r; + COP(reg)->empty_check_start.mem = reg->num_empty_check; /* NULL CHECK ID */ + reg->num_empty_check++; + } + + r = compile_tree(body, reg, env); + if (r != 0) return r; + + if (emptiness != BODY_IS_NOT_EMPTY) { + if (emptiness == BODY_MAY_BE_EMPTY) + r = add_op(reg, OP_EMPTY_CHECK_END); + else if (emptiness == BODY_MAY_BE_EMPTY_MEM) { + if (ND_IS_EMPTY_STATUS_CHECK(qn) != 0 && qn->empty_status_mem != 0) { + r = add_op(reg, OP_EMPTY_CHECK_END_MEMST); + if (r != 0) return r; + COP(reg)->empty_check_end.empty_status_mem = qn->empty_status_mem; + } + else + r = add_op(reg, OP_EMPTY_CHECK_END); + } +#ifdef USE_CALL + else if (emptiness == BODY_MAY_BE_EMPTY_REC) { + r = add_op(reg, OP_EMPTY_CHECK_END_MEMST_PUSH); + if (r != 0) return r; + COP(reg)->empty_check_end.empty_status_mem = qn->empty_status_mem; + } +#endif + + if (r != 0) return r; + COP(reg)->empty_check_end.mem = saved_num_empty_check; /* NULL CHECK ID */ + } + return r; +} + +#ifdef USE_CALL +static int +compile_call(CallNode* node, regex_t* reg, ParseEnv* env) +{ + int r; + int offset; + + r = add_op(reg, OP_CALL); + if (r != 0) return r; + + COP(reg)->call.addr = 0; /* dummy addr. */ +#ifdef ONIG_DEBUG_MATCH_COUNTER + COP(reg)->call.called_mem = node->called_gnum; +#endif + + offset = COP_CURR_OFFSET_BYTES(reg, call.addr); + r = unset_addr_list_add(env->unset_addr_list, offset, ND_CALL_BODY(node)); + return r; +} +#endif + +static int +compile_tree_n_times(Node* node, int n, regex_t* reg, ParseEnv* env) +{ + int i, r; + + for (i = 0; i < n; i++) { + r = compile_tree(node, reg, env); + if (r != 0) return r; + } + return 0; +} + +static int +add_compile_string_length(UChar* s ARG_UNUSED, int mb_len, int str_len, + regex_t* reg ARG_UNUSED) +{ + return 1; +} + +static int +add_compile_string(UChar* s, int mb_len, int str_len, regex_t* reg) +{ + int op; + int r; + int byte_len; + UChar* p; + UChar* end; + + op = select_str_opcode(mb_len, str_len); + r = add_op(reg, op); + if (r != 0) return r; + + byte_len = mb_len * str_len; + end = s + byte_len; + + if (op == OP_STR_MBN) { + p = onigenc_strdup(reg->enc, s, end); + CHECK_NULL_RETURN_MEMERR(p); + + COP(reg)->exact_len_n.len = mb_len; + COP(reg)->exact_len_n.n = str_len; + COP(reg)->exact_len_n.s = p; + } + else if (IS_NEED_STR_LEN_OP(op)) { + p = onigenc_strdup(reg->enc, s, end); + CHECK_NULL_RETURN_MEMERR(p); + COP(reg)->exact_n.n = str_len; + COP(reg)->exact_n.s = p; + } + else { + xmemset(COP(reg)->exact.s, 0, sizeof(COP(reg)->exact.s)); + xmemcpy(COP(reg)->exact.s, s, (size_t )byte_len); + } + + return 0; +} + +static int +compile_length_string_node(Node* node, regex_t* reg) +{ + int rlen, r, len, prev_len, slen; + UChar *p, *prev; + StrNode* sn; + OnigEncoding enc = reg->enc; + + sn = STR_(node); + if (sn->end <= sn->s) + return 0; + + p = prev = sn->s; + prev_len = enclen(enc, p); + p += prev_len; + slen = 1; + rlen = 0; + + for (; p < sn->end; ) { + len = enclen(enc, p); + if (len == prev_len) { + slen++; + } + else { + r = add_compile_string_length(prev, prev_len, slen, reg); + rlen += r; + prev = p; + slen = 1; + prev_len = len; + } + p += len; + } + + r = add_compile_string_length(prev, prev_len, slen, reg); + rlen += r; + return rlen; +} + +static int +compile_length_string_crude_node(StrNode* sn, regex_t* reg) +{ + if (sn->end <= sn->s) + return 0; + + return add_compile_string_length(sn->s, 1 /* sb */, (int )(sn->end - sn->s), + reg); +} + +static int +compile_string_node(Node* node, regex_t* reg) +{ + int r, len, prev_len, slen; + UChar *p, *prev, *end; + StrNode* sn; + OnigEncoding enc = reg->enc; + + sn = STR_(node); + if (sn->end <= sn->s) + return 0; + + end = sn->end; + + p = prev = sn->s; + prev_len = enclen(enc, p); + p += prev_len; + slen = 1; + + for (; p < end; ) { + len = enclen(enc, p); + if (len == prev_len) { + slen++; + } + else { + r = add_compile_string(prev, prev_len, slen, reg); + if (r != 0) return r; + + prev = p; + slen = 1; + prev_len = len; + } + + p += len; + } + + return add_compile_string(prev, prev_len, slen, reg); +} + +static int +compile_string_crude_node(StrNode* sn, regex_t* reg) +{ + if (sn->end <= sn->s) + return 0; + + return add_compile_string(sn->s, 1 /* sb */, (int )(sn->end - sn->s), reg); +} + +static void* +set_multi_byte_cclass(BBuf* mbuf, regex_t* reg) +{ + size_t len; + void* p; + + len = (size_t )mbuf->used; + p = xmalloc(len); + if (IS_NULL(p)) return NULL; + + xmemcpy(p, mbuf->p, len); + return p; +} + +static int +compile_length_cclass_node(CClassNode* cc, regex_t* reg) +{ + return 1; +} + +static int +compile_cclass_node(CClassNode* cc, regex_t* reg) +{ + int r; + + if (IS_NULL(cc->mbuf)) { + r = add_op(reg, IS_NCCLASS_NOT(cc) ? OP_CCLASS_NOT : OP_CCLASS); + if (r != 0) return r; + + COP(reg)->cclass.bsp = xmalloc(SIZE_BITSET); + CHECK_NULL_RETURN_MEMERR(COP(reg)->cclass.bsp); + xmemcpy(COP(reg)->cclass.bsp, cc->bs, SIZE_BITSET); + } + else { + void* p; + + if (ONIGENC_MBC_MINLEN(reg->enc) > 1 || bitset_is_empty(cc->bs)) { + r = add_op(reg, IS_NCCLASS_NOT(cc) ? OP_CCLASS_MB_NOT : OP_CCLASS_MB); + if (r != 0) return r; + + p = set_multi_byte_cclass(cc->mbuf, reg); + CHECK_NULL_RETURN_MEMERR(p); + COP(reg)->cclass_mb.mb = p; + } + else { + r = add_op(reg, IS_NCCLASS_NOT(cc) ? OP_CCLASS_MIX_NOT : OP_CCLASS_MIX); + if (r != 0) return r; + + COP(reg)->cclass_mix.bsp = xmalloc(SIZE_BITSET); + CHECK_NULL_RETURN_MEMERR(COP(reg)->cclass_mix.bsp); + xmemcpy(COP(reg)->cclass_mix.bsp, cc->bs, SIZE_BITSET); + + p = set_multi_byte_cclass(cc->mbuf, reg); + CHECK_NULL_RETURN_MEMERR(p); + COP(reg)->cclass_mix.mb = p; + } + } + + return 0; +} + +static void +set_addr_in_repeat_range(regex_t* reg) +{ + int i; + + for (i = 0; i < reg->num_repeat; i++) { + RepeatRange* p = reg->repeat_range + i; + int offset = p->u.offset; + p->u.pcode = reg->ops + offset; + } +} + +static int +entry_repeat_range(regex_t* reg, int id, int lower, int upper, int ops_index) +{ +#define REPEAT_RANGE_ALLOC 4 + + RepeatRange* p; + + if (reg->repeat_range_alloc == 0) { + p = (RepeatRange* )xmalloc(sizeof(RepeatRange) * REPEAT_RANGE_ALLOC); + CHECK_NULL_RETURN_MEMERR(p); + reg->repeat_range = p; + reg->repeat_range_alloc = REPEAT_RANGE_ALLOC; + } + else if (reg->repeat_range_alloc <= id) { + int n; + n = reg->repeat_range_alloc + REPEAT_RANGE_ALLOC; + p = (RepeatRange* )xrealloc(reg->repeat_range, sizeof(RepeatRange) * n); + CHECK_NULL_RETURN_MEMERR(p); + reg->repeat_range = p; + reg->repeat_range_alloc = n; + } + else { + p = reg->repeat_range; + } + + p[id].lower = lower; + p[id].upper = (IS_INFINITE_REPEAT(upper) ? 0x7fffffff : upper); + p[id].u.offset = ops_index; + return 0; +} + +static int +compile_range_repeat_node(QuantNode* qn, int target_len, int emptiness, + regex_t* reg, ParseEnv* env) +{ + int r; + int num_repeat = reg->num_repeat++; + + r = add_op(reg, qn->greedy ? OP_REPEAT : OP_REPEAT_NG); + if (r != 0) return r; + + COP(reg)->repeat.id = num_repeat; + COP(reg)->repeat.addr = SIZE_INC + target_len + OPSIZE_REPEAT_INC; + + r = entry_repeat_range(reg, num_repeat, qn->lower, qn->upper, + COP_CURR_OFFSET(reg) + OPSIZE_REPEAT); + if (r != 0) return r; + + r = compile_quant_body_with_empty_check(qn, reg, env); + if (r != 0) return r; + + r = add_op(reg, qn->greedy ? OP_REPEAT_INC : OP_REPEAT_INC_NG); + if (r != 0) return r; + + COP(reg)->repeat_inc.id = num_repeat; + return r; +} + +static int +is_anychar_infinite_greedy(QuantNode* qn) +{ + if (qn->greedy && IS_INFINITE_REPEAT(qn->upper) && + ND_IS_ANYCHAR(ND_QUANT_BODY(qn))) + return 1; + else + return 0; +} + +#define QUANTIFIER_EXPAND_LIMIT_SIZE 10 +#define CKN_ON (ckn > 0) + +static int +compile_length_quantifier_node(QuantNode* qn, regex_t* reg, ParseEnv* env) +{ + int len, mod_tlen; + int infinite = IS_INFINITE_REPEAT(qn->upper); + enum BodyEmptyType emptiness = qn->emptiness; + int tlen = compile_length_tree(ND_QUANT_BODY(qn), reg, env); + + if (tlen < 0) return tlen; + if (tlen == 0) return 0; + + /* anychar repeat */ + if (is_anychar_infinite_greedy(qn)) { + if (qn->lower <= 1 || + len_multiply_cmp((OnigLen )tlen, qn->lower, QUANTIFIER_EXPAND_LIMIT_SIZE) <= 0) { + if (IS_NOT_NULL(qn->next_head_exact)) + return OPSIZE_ANYCHAR_STAR_PEEK_NEXT + tlen * qn->lower; + else + return OPSIZE_ANYCHAR_STAR + tlen * qn->lower; + } + } + + mod_tlen = tlen; + if (emptiness != BODY_IS_NOT_EMPTY) + mod_tlen += OPSIZE_EMPTY_CHECK_START + OPSIZE_EMPTY_CHECK_END; + + if (infinite && + (qn->lower <= 1 || + len_multiply_cmp(tlen, qn->lower, QUANTIFIER_EXPAND_LIMIT_SIZE) <= 0)) { + if (qn->lower == 1 && tlen > QUANTIFIER_EXPAND_LIMIT_SIZE) { + len = OPSIZE_JUMP; + } + else { + len = tlen * qn->lower; + } + + if (qn->greedy) { +#ifdef USE_OP_PUSH_OR_JUMP_EXACT + if (IS_NOT_NULL(qn->head_exact)) + len += OPSIZE_PUSH_OR_JUMP_EXACT1 + mod_tlen + OPSIZE_JUMP; + else +#endif + if (IS_NOT_NULL(qn->next_head_exact)) + len += OPSIZE_PUSH_IF_PEEK_NEXT + mod_tlen + OPSIZE_JUMP; + else + len += OPSIZE_PUSH + mod_tlen + OPSIZE_JUMP; + } + else + len += OPSIZE_JUMP + mod_tlen + OPSIZE_PUSH; + } + else if (qn->upper == 0) { + if (qn->include_referred != 0) { /* /(?..){0}/ */ + len = OPSIZE_JUMP + tlen; + } + else + len = 0; + } + else if (!infinite && qn->greedy && + (qn->upper == 1 || + len_multiply_cmp((OnigLen )tlen + OPSIZE_PUSH, qn->upper, + QUANTIFIER_EXPAND_LIMIT_SIZE) <= 0)) { + len = tlen * qn->lower; + len += (OPSIZE_PUSH + tlen) * (qn->upper - qn->lower); + } + else if (!qn->greedy && qn->upper == 1 && qn->lower == 0) { /* '??' */ + len = OPSIZE_PUSH + OPSIZE_JUMP + tlen; + } + else { + len = OPSIZE_REPEAT_INC + mod_tlen + OPSIZE_REPEAT; + } + + return len; +} + +static int +compile_quantifier_node(QuantNode* qn, regex_t* reg, ParseEnv* env) +{ + int i, r, mod_tlen; + int infinite = IS_INFINITE_REPEAT(qn->upper); + enum BodyEmptyType emptiness = qn->emptiness; + int tlen = compile_length_tree(ND_QUANT_BODY(qn), reg, env); + + if (tlen < 0) return tlen; + if (tlen == 0) return 0; + + if (is_anychar_infinite_greedy(qn) && + (qn->lower <= 1 || + len_multiply_cmp((OnigLen )tlen, qn->lower, + QUANTIFIER_EXPAND_LIMIT_SIZE) <= 0)) { + r = compile_tree_n_times(ND_QUANT_BODY(qn), qn->lower, reg, env); + if (r != 0) return r; + if (IS_NOT_NULL(qn->next_head_exact)) { + r = add_op(reg, ND_IS_MULTILINE(ND_QUANT_BODY(qn)) ? + OP_ANYCHAR_ML_STAR_PEEK_NEXT : OP_ANYCHAR_STAR_PEEK_NEXT); + if (r != 0) return r; + + COP(reg)->anychar_star_peek_next.c = STR_(qn->next_head_exact)->s[0]; + return 0; + } + else { + r = add_op(reg, ND_IS_MULTILINE(ND_QUANT_BODY(qn)) ? + OP_ANYCHAR_ML_STAR : OP_ANYCHAR_STAR); + return r; + } + } + + mod_tlen = tlen; + if (emptiness != BODY_IS_NOT_EMPTY) + mod_tlen += OPSIZE_EMPTY_CHECK_START + OPSIZE_EMPTY_CHECK_END; + + if (infinite && + (qn->lower <= 1 || + len_multiply_cmp((OnigLen )tlen, qn->lower, + QUANTIFIER_EXPAND_LIMIT_SIZE) <= 0)) { + int addr; + + if (qn->lower == 1 && tlen > QUANTIFIER_EXPAND_LIMIT_SIZE) { + r = add_op(reg, OP_JUMP); + if (r != 0) return r; + if (qn->greedy) { +#ifdef USE_OP_PUSH_OR_JUMP_EXACT + if (IS_NOT_NULL(qn->head_exact)) + COP(reg)->jump.addr = OPSIZE_PUSH_OR_JUMP_EXACT1 + SIZE_INC; + else +#endif + if (IS_NOT_NULL(qn->next_head_exact)) + COP(reg)->jump.addr = OPSIZE_PUSH_IF_PEEK_NEXT + SIZE_INC; + else + COP(reg)->jump.addr = OPSIZE_PUSH + SIZE_INC; + } + else { + COP(reg)->jump.addr = OPSIZE_JUMP + SIZE_INC; + } + } + else { + r = compile_tree_n_times(ND_QUANT_BODY(qn), qn->lower, reg, env); + if (r != 0) return r; + } + + if (qn->greedy) { +#ifdef USE_OP_PUSH_OR_JUMP_EXACT + if (IS_NOT_NULL(qn->head_exact)) { + r = add_op(reg, OP_PUSH_OR_JUMP_EXACT1); + if (r != 0) return r; + COP(reg)->push_or_jump_exact1.addr = SIZE_INC + mod_tlen + OPSIZE_JUMP; + COP(reg)->push_or_jump_exact1.c = STR_(qn->head_exact)->s[0]; + + r = compile_quant_body_with_empty_check(qn, reg, env); + if (r != 0) return r; + + addr = -(mod_tlen + (int )OPSIZE_PUSH_OR_JUMP_EXACT1); + } + else +#endif + if (IS_NOT_NULL(qn->next_head_exact)) { + r = add_op(reg, OP_PUSH_IF_PEEK_NEXT); + if (r != 0) return r; + COP(reg)->push_if_peek_next.addr = SIZE_INC + mod_tlen + OPSIZE_JUMP; + COP(reg)->push_if_peek_next.c = STR_(qn->next_head_exact)->s[0]; + + r = compile_quant_body_with_empty_check(qn, reg, env); + if (r != 0) return r; + + addr = -(mod_tlen + (int )OPSIZE_PUSH_IF_PEEK_NEXT); + } + else { + r = add_op(reg, OP_PUSH); + if (r != 0) return r; + COP(reg)->push.addr = SIZE_INC + mod_tlen + OPSIZE_JUMP; + + r = compile_quant_body_with_empty_check(qn, reg, env); + if (r != 0) return r; + + addr = -(mod_tlen + (int )OPSIZE_PUSH); + } + + r = add_op(reg, OP_JUMP); + if (r != 0) return r; + COP(reg)->jump.addr = addr; + } + else { + r = add_op(reg, OP_JUMP); + if (r != 0) return r; + COP(reg)->jump.addr = mod_tlen + SIZE_INC; + + r = compile_quant_body_with_empty_check(qn, reg, env); + if (r != 0) return r; + + r = add_op(reg, OP_PUSH); + if (r != 0) return r; + COP(reg)->push.addr = -mod_tlen; + } + } + else if (qn->upper == 0) { + if (qn->include_referred != 0) { /* /(?..){0}/ */ + r = add_op(reg, OP_JUMP); + if (r != 0) return r; + COP(reg)->jump.addr = tlen + SIZE_INC; + + r = compile_tree(ND_QUANT_BODY(qn), reg, env); + } + else { + /* Nothing output */ + r = 0; + } + } + else if (! infinite && qn->greedy && + (qn->upper == 1 || + len_multiply_cmp((OnigLen )tlen + OPSIZE_PUSH, qn->upper, + QUANTIFIER_EXPAND_LIMIT_SIZE) <= 0)) { + int n = qn->upper - qn->lower; + + r = compile_tree_n_times(ND_QUANT_BODY(qn), qn->lower, reg, env); + if (r != 0) return r; + + for (i = 0; i < n; i++) { + int v = onig_positive_int_multiply(n - i, tlen + OPSIZE_PUSH); + if (v < 0) return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE; + + r = add_op(reg, OP_PUSH); + if (r != 0) return r; + COP(reg)->push.addr = v; + + r = compile_tree(ND_QUANT_BODY(qn), reg, env); + if (r != 0) return r; + } + } + else if (! qn->greedy && qn->upper == 1 && qn->lower == 0) { /* '??' */ + r = add_op(reg, OP_PUSH); + if (r != 0) return r; + COP(reg)->push.addr = SIZE_INC + OPSIZE_JUMP; + + r = add_op(reg, OP_JUMP); + if (r != 0) return r; + COP(reg)->jump.addr = tlen + SIZE_INC; + + r = compile_tree(ND_QUANT_BODY(qn), reg, env); + } + else { + r = compile_range_repeat_node(qn, mod_tlen, emptiness, reg, env); + } + return r; +} + +static int +compile_length_option_node(BagNode* node, regex_t* reg, ParseEnv* env) +{ + int tlen; + + tlen = compile_length_tree(ND_BAG_BODY(node), reg, env); + + return tlen; +} + +static int +compile_option_node(BagNode* node, regex_t* reg, ParseEnv* env) +{ + int r; + + r = compile_tree(ND_BAG_BODY(node), reg, env); + + return r; +} + +static int +compile_length_bag_node(BagNode* node, regex_t* reg, ParseEnv* env) +{ + int len; + int tlen; + + if (node->type == BAG_OPTION) + return compile_length_option_node(node, reg, env); + + if (ND_BAG_BODY(node)) { + tlen = compile_length_tree(ND_BAG_BODY(node), reg, env); + if (tlen < 0) return tlen; + } + else + tlen = 0; + + switch (node->type) { + case BAG_MEMORY: +#ifdef USE_CALL + + if (node->m.regnum == 0 && ND_IS_CALLED(node)) { + len = tlen + OPSIZE_CALL + OPSIZE_JUMP + OPSIZE_RETURN; + return len; + } + + if (ND_IS_CALLED(node)) { + len = OPSIZE_MEM_START_PUSH + tlen + + OPSIZE_CALL + OPSIZE_JUMP + OPSIZE_RETURN; + if (MEM_STATUS_AT0(reg->push_mem_end, node->m.regnum)) + len += (ND_IS_RECURSION(node) + ? OPSIZE_MEM_END_PUSH_REC : OPSIZE_MEM_END_PUSH); + else + len += (ND_IS_RECURSION(node) + ? OPSIZE_MEM_END_REC : OPSIZE_MEM_END); + } + else if (ND_IS_RECURSION(node)) { + len = OPSIZE_MEM_START_PUSH; + len += tlen + (MEM_STATUS_AT0(reg->push_mem_end, node->m.regnum) + ? OPSIZE_MEM_END_PUSH_REC : OPSIZE_MEM_END_REC); + } + else +#endif + { + if (MEM_STATUS_AT0(reg->push_mem_start, node->m.regnum)) + len = OPSIZE_MEM_START_PUSH; + else + len = OPSIZE_MEM_START; + + len += tlen + (MEM_STATUS_AT0(reg->push_mem_end, node->m.regnum) + ? OPSIZE_MEM_END_PUSH : OPSIZE_MEM_END); + } + break; + + case BAG_STOP_BACKTRACK: + if (ND_IS_STRICT_REAL_REPEAT(node)) { + int v; + QuantNode* qn; + + qn = QUANT_(ND_BAG_BODY(node)); + tlen = compile_length_tree(ND_QUANT_BODY(qn), reg, env); + if (tlen < 0) return tlen; + + v = onig_positive_int_multiply(qn->lower, tlen); + if (v < 0) return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE; + len = v + OPSIZE_PUSH + tlen + OPSIZE_POP + OPSIZE_JUMP; + } + else { + len = OPSIZE_MARK + tlen + OPSIZE_CUT_TO_MARK; + } + break; + + case BAG_IF_ELSE: + { + Node* cond = ND_BAG_BODY(node); + Node* Then = node->te.Then; + Node* Else = node->te.Else; + + len = compile_length_tree(cond, reg, env); + if (len < 0) return len; + len += OPSIZE_PUSH + OPSIZE_MARK + OPSIZE_CUT_TO_MARK; + + if (IS_NOT_NULL(Then)) { + tlen = compile_length_tree(Then, reg, env); + if (tlen < 0) return tlen; + len += tlen; + } + + len += OPSIZE_JUMP + OPSIZE_CUT_TO_MARK; + + if (IS_NOT_NULL(Else)) { + tlen = compile_length_tree(Else, reg, env); + if (tlen < 0) return tlen; + len += tlen; + } + } + break; + + case BAG_OPTION: + /* never come here, but set for escape warning */ + len = 0; + break; + + default: + return ONIGERR_TYPE_BUG; + break; + } + + return len; +} + +static int +compile_bag_memory_node(BagNode* node, regex_t* reg, ParseEnv* env) +{ + int r; + +#ifdef USE_CALL + if (ND_IS_CALLED(node)) { + int len; + + r = add_op(reg, OP_CALL); + if (r != 0) return r; + + node->m.called_addr = COP_CURR_OFFSET(reg) + 1 + OPSIZE_JUMP; + ND_STATUS_ADD(node, FIXED_ADDR); + COP(reg)->call.addr = (int )node->m.called_addr; + + if (node->m.regnum == 0) { + len = compile_length_tree(ND_BAG_BODY(node), reg, env); + len += OPSIZE_RETURN; + + r = add_op(reg, OP_JUMP); + if (r != 0) return r; + COP(reg)->jump.addr = len + SIZE_INC; + + r = compile_tree(ND_BAG_BODY(node), reg, env); + if (r != 0) return r; + + r = add_op(reg, OP_RETURN); + return r; + } + else { + len = compile_length_tree(ND_BAG_BODY(node), reg, env); + len += (OPSIZE_MEM_START_PUSH + OPSIZE_RETURN); + if (MEM_STATUS_AT0(reg->push_mem_end, node->m.regnum)) + len += (ND_IS_RECURSION(node) + ? OPSIZE_MEM_END_PUSH_REC : OPSIZE_MEM_END_PUSH); + else + len += (ND_IS_RECURSION(node) ? OPSIZE_MEM_END_REC : OPSIZE_MEM_END); + + r = add_op(reg, OP_JUMP); + if (r != 0) return r; + COP(reg)->jump.addr = len + SIZE_INC; + } + } +#endif + + if (MEM_STATUS_AT0(reg->push_mem_start, node->m.regnum)) + r = add_op(reg, OP_MEM_START_PUSH); + else + r = add_op(reg, OP_MEM_START); + if (r != 0) return r; + COP(reg)->memory_start.num = node->m.regnum; + + r = compile_tree(ND_BAG_BODY(node), reg, env); + if (r != 0) return r; + +#ifdef USE_CALL + if (MEM_STATUS_AT0(reg->push_mem_end, node->m.regnum)) + r = add_op(reg, (ND_IS_RECURSION(node) + ? OP_MEM_END_PUSH_REC : OP_MEM_END_PUSH)); + else + r = add_op(reg, (ND_IS_RECURSION(node) ? OP_MEM_END_REC : OP_MEM_END)); + if (r != 0) return r; + COP(reg)->memory_end.num = node->m.regnum; + + if (ND_IS_CALLED(node)) { + r = add_op(reg, OP_RETURN); + } +#else + if (MEM_STATUS_AT0(reg->push_mem_end, node->m.regnum)) + r = add_op(reg, OP_MEM_END_PUSH); + else + r = add_op(reg, OP_MEM_END); + if (r != 0) return r; + COP(reg)->memory_end.num = node->m.regnum; +#endif + + return r; +} + +static int +compile_bag_node(BagNode* node, regex_t* reg, ParseEnv* env) +{ + int r, len; + + switch (node->type) { + case BAG_MEMORY: + r = compile_bag_memory_node(node, reg, env); + break; + + case BAG_OPTION: + r = compile_option_node(node, reg, env); + break; + + case BAG_STOP_BACKTRACK: + if (ND_IS_STRICT_REAL_REPEAT(node)) { + QuantNode* qn = QUANT_(ND_BAG_BODY(node)); + r = compile_tree_n_times(ND_QUANT_BODY(qn), qn->lower, reg, env); + if (r != 0) return r; + + len = compile_length_tree(ND_QUANT_BODY(qn), reg, env); + if (len < 0) return len; + + r = add_op(reg, OP_PUSH); + if (r != 0) return r; + COP(reg)->push.addr = SIZE_INC + len + OPSIZE_POP + OPSIZE_JUMP; + + r = compile_tree(ND_QUANT_BODY(qn), reg, env); + if (r != 0) return r; + r = add_op(reg, OP_POP); + if (r != 0) return r; + + r = add_op(reg, OP_JUMP); + if (r != 0) return r; + COP(reg)->jump.addr = -((int )OPSIZE_PUSH + len + (int )OPSIZE_POP); + } + else { + MemNumType mid; + + ID_ENTRY(env, mid); + r = add_op(reg, OP_MARK); + if (r != 0) return r; + COP(reg)->mark.id = mid; + COP(reg)->mark.save_pos = 0; + + r = compile_tree(ND_BAG_BODY(node), reg, env); + if (r != 0) return r; + r = add_op(reg, OP_CUT_TO_MARK); + if (r != 0) return r; + COP(reg)->cut_to_mark.id = mid; + COP(reg)->cut_to_mark.restore_pos = 0; + } + break; + + case BAG_IF_ELSE: + { + int cond_len, then_len, else_len, jump_len; + MemNumType mid; + Node* cond = ND_BAG_BODY(node); + Node* Then = node->te.Then; + Node* Else = node->te.Else; + + ID_ENTRY(env, mid); + + r = add_op(reg, OP_MARK); + if (r != 0) return r; + COP(reg)->mark.id = mid; + COP(reg)->mark.save_pos = 0; + + cond_len = compile_length_tree(cond, reg, env); + if (cond_len < 0) return cond_len; + if (IS_NOT_NULL(Then)) { + then_len = compile_length_tree(Then, reg, env); + if (then_len < 0) return then_len; + } + else + then_len = 0; + + jump_len = cond_len + then_len + OPSIZE_CUT_TO_MARK + OPSIZE_JUMP; + + r = add_op(reg, OP_PUSH); + if (r != 0) return r; + COP(reg)->push.addr = SIZE_INC + jump_len; + + r = compile_tree(cond, reg, env); + if (r != 0) return r; + r = add_op(reg, OP_CUT_TO_MARK); + if (r != 0) return r; + COP(reg)->cut_to_mark.id = mid; + COP(reg)->cut_to_mark.restore_pos = 0; + + if (IS_NOT_NULL(Then)) { + r = compile_tree(Then, reg, env); + if (r != 0) return r; + } + + if (IS_NOT_NULL(Else)) { + else_len = compile_length_tree(Else, reg, env); + if (else_len < 0) return else_len; + } + else + else_len = 0; + + r = add_op(reg, OP_JUMP); + if (r != 0) return r; + COP(reg)->jump.addr = OPSIZE_CUT_TO_MARK + else_len + SIZE_INC; + + r = add_op(reg, OP_CUT_TO_MARK); + if (r != 0) return r; + COP(reg)->cut_to_mark.id = mid; + COP(reg)->cut_to_mark.restore_pos = 0; + + if (IS_NOT_NULL(Else)) { + r = compile_tree(Else, reg, env); + } + } + break; + + default: + return ONIGERR_TYPE_BUG; + break; + } + + return r; +} + +static int +compile_length_anchor_node(AnchorNode* node, regex_t* reg, ParseEnv* env) +{ + int len; + int tlen = 0; + + if (IS_NOT_NULL(ND_ANCHOR_BODY(node))) { + tlen = compile_length_tree(ND_ANCHOR_BODY(node), reg, env); + if (tlen < 0) return tlen; + } + + switch (node->type) { + case ANCR_PREC_READ: + len = OPSIZE_MARK + tlen + OPSIZE_CUT_TO_MARK; + break; + case ANCR_PREC_READ_NOT: + len = OPSIZE_PUSH + OPSIZE_MARK + tlen + OPSIZE_POP_TO_MARK + OPSIZE_POP + OPSIZE_FAIL; + break; + case ANCR_LOOK_BEHIND: + if (node->char_min_len == node->char_max_len) + len = OPSIZE_MARK + OPSIZE_STEP_BACK_START + tlen + OPSIZE_CUT_TO_MARK; + else { + len = OPSIZE_SAVE_VAL + OPSIZE_UPDATE_VAR + OPSIZE_MARK + OPSIZE_PUSH + OPSIZE_UPDATE_VAR + OPSIZE_FAIL + OPSIZE_JUMP + OPSIZE_STEP_BACK_START + OPSIZE_STEP_BACK_NEXT + tlen + OPSIZE_CHECK_POSITION + OPSIZE_CUT_TO_MARK + OPSIZE_UPDATE_VAR; + + if (IS_NOT_NULL(node->lead_node)) { + int llen = compile_length_tree(node->lead_node, reg, env); + if (llen < 0) return llen; + + len += OPSIZE_MOVE + llen; + } + + if ((env->flags & PE_FLAG_HAS_ABSENT_STOPPER) != 0) + len += OPSIZE_SAVE_VAL + OPSIZE_UPDATE_VAR; + } + break; + case ANCR_LOOK_BEHIND_NOT: + if (node->char_min_len == node->char_max_len) + len = OPSIZE_MARK + OPSIZE_PUSH + OPSIZE_STEP_BACK_START + tlen + OPSIZE_POP_TO_MARK + OPSIZE_FAIL + OPSIZE_POP; + else { + len = OPSIZE_SAVE_VAL + OPSIZE_UPDATE_VAR + OPSIZE_MARK + OPSIZE_PUSH + OPSIZE_STEP_BACK_START + OPSIZE_STEP_BACK_NEXT + tlen + OPSIZE_CHECK_POSITION + OPSIZE_POP_TO_MARK + OPSIZE_UPDATE_VAR + OPSIZE_POP + OPSIZE_FAIL + OPSIZE_UPDATE_VAR + OPSIZE_POP + OPSIZE_POP; + + if (IS_NOT_NULL(node->lead_node)) { + int llen = compile_length_tree(node->lead_node, reg, env); + if (llen < 0) return llen; + + len += OPSIZE_MOVE + llen; + } + + if ((env->flags & PE_FLAG_HAS_ABSENT_STOPPER) != 0) + len += OPSIZE_SAVE_VAL + OPSIZE_UPDATE_VAR; + } + break; + + case ANCR_WORD_BOUNDARY: + case ANCR_NO_WORD_BOUNDARY: +#ifdef USE_WORD_BEGIN_END + case ANCR_WORD_BEGIN: + case ANCR_WORD_END: +#endif + len = OPSIZE_WORD_BOUNDARY; + break; + + case ANCR_TEXT_SEGMENT_BOUNDARY: + case ANCR_NO_TEXT_SEGMENT_BOUNDARY: + len = SIZE_OPCODE; + break; + + default: + len = SIZE_OPCODE; + break; + } + + return len; +} + +static int +compile_anchor_look_behind_node(AnchorNode* node, regex_t* reg, ParseEnv* env) +{ + int r; + + if (node->char_min_len == node->char_max_len) { + MemNumType mid; + + ID_ENTRY(env, mid); + r = add_op(reg, OP_MARK); + if (r != 0) return r; + COP(reg)->mark.id = mid; + COP(reg)->mark.save_pos = FALSE; + + r = add_op(reg, OP_STEP_BACK_START); + if (r != 0) return r; + COP(reg)->step_back_start.initial = node->char_min_len; + COP(reg)->step_back_start.remaining = 0; + COP(reg)->step_back_start.addr = 1; + + r = compile_tree(ND_ANCHOR_BODY(node), reg, env); + if (r != 0) return r; + + r = add_op(reg, OP_CUT_TO_MARK); + if (r != 0) return r; + COP(reg)->cut_to_mark.id = mid; + COP(reg)->cut_to_mark.restore_pos = FALSE; + } + else { + OnigLen diff; + MemNumType mid1, mid2; + MemNumType mid3 = 0; /* ignore uninitialized warning */ + + if (IS_NOT_NULL(node->lead_node)) { + MinMaxCharLen ci; + + r = node_char_len(node->lead_node, reg, &ci, env); + if (r < 0) return r; + r = add_op(reg, OP_MOVE); + if (r != 0) return r; + COP(reg)->move.n = -((RelPositionType )ci.min); + r = compile_tree(node->lead_node, reg, env); + if (r != 0) return r; + } + + ID_ENTRY(env, mid1); + r = add_op(reg, OP_SAVE_VAL); + if (r != 0) return r; + COP(reg)->save_val.type = SAVE_RIGHT_RANGE; + COP(reg)->save_val.id = mid1; + + r = add_op(reg, OP_UPDATE_VAR); + if (r != 0) return r; + COP(reg)->update_var.type = UPDATE_VAR_RIGHT_RANGE_TO_S; + + ID_ENTRY(env, mid2); + r = add_op(reg, OP_MARK); + if (r != 0) return r; + COP(reg)->mark.id = mid2; + COP(reg)->mark.save_pos = FALSE; + + r = add_op(reg, OP_PUSH); + if (r != 0) return r; + COP(reg)->push.addr = SIZE_INC + OPSIZE_JUMP; + + r = add_op(reg, OP_JUMP); + if (r != 0) return r; + COP(reg)->jump.addr = SIZE_INC + OPSIZE_UPDATE_VAR + OPSIZE_FAIL; + + r = add_op(reg, OP_UPDATE_VAR); + if (r != 0) return r; + COP(reg)->update_var.type = UPDATE_VAR_RIGHT_RANGE_FROM_STACK; + COP(reg)->update_var.id = mid1; + COP(reg)->update_var.clear = FALSE; + r = add_op(reg, OP_FAIL); + if (r != 0) return r; + + if ((env->flags & PE_FLAG_HAS_ABSENT_STOPPER) != 0) { + ID_ENTRY(env, mid3); + r = add_op(reg, OP_SAVE_VAL); + if (r != 0) return r; + COP(reg)->save_val.type = SAVE_RIGHT_RANGE; + COP(reg)->save_val.id = mid3; + } + + r = add_op(reg, OP_STEP_BACK_START); + if (r != 0) return r; + + if (node->char_max_len != INFINITE_LEN) + diff = node->char_max_len - node->char_min_len; + else + diff = INFINITE_LEN; + + COP(reg)->step_back_start.initial = node->char_min_len; + COP(reg)->step_back_start.remaining = diff; + COP(reg)->step_back_start.addr = 2; + + r = add_op(reg, OP_STEP_BACK_NEXT); + if (r != 0) return r; + + r = compile_tree(ND_ANCHOR_BODY(node), reg, env); + if (r != 0) return r; + + if ((env->flags & PE_FLAG_HAS_ABSENT_STOPPER) != 0) { + r = add_op(reg, OP_UPDATE_VAR); + if (r != 0) return r; + COP(reg)->update_var.type = UPDATE_VAR_RIGHT_RANGE_FROM_STACK; + COP(reg)->update_var.id = mid3; + COP(reg)->update_var.clear = FALSE; + } + + r = add_op(reg, OP_CHECK_POSITION); + if (r != 0) return r; + COP(reg)->check_position.type = CHECK_POSITION_CURRENT_RIGHT_RANGE; + + r = add_op(reg, OP_CUT_TO_MARK); + if (r != 0) return r; + COP(reg)->cut_to_mark.id = mid2; + COP(reg)->cut_to_mark.restore_pos = FALSE; + + r = add_op(reg, OP_UPDATE_VAR); + if (r != 0) return r; + COP(reg)->update_var.type = UPDATE_VAR_RIGHT_RANGE_FROM_STACK; + COP(reg)->update_var.id = mid1; + COP(reg)->update_var.clear = TRUE; + } + + return r; +} + +static int +compile_anchor_look_behind_not_node(AnchorNode* node, regex_t* reg, + ParseEnv* env) +{ + int r; + int len; + + len = compile_length_tree(ND_ANCHOR_BODY(node), reg, env); + + if (node->char_min_len == node->char_max_len) { + MemNumType mid; + + ID_ENTRY(env, mid); + r = add_op(reg, OP_MARK); + if (r != 0) return r; + COP(reg)->mark.id = mid; + COP(reg)->mark.save_pos = FALSE; + + r = add_op(reg, OP_PUSH); + if (r != 0) return r; + COP(reg)->push.addr = SIZE_INC + OPSIZE_STEP_BACK_START + len + OPSIZE_POP_TO_MARK + OPSIZE_FAIL; + + r = add_op(reg, OP_STEP_BACK_START); + if (r != 0) return r; + COP(reg)->step_back_start.initial = node->char_min_len; + COP(reg)->step_back_start.remaining = 0; + COP(reg)->step_back_start.addr = 1; + + r = compile_tree(ND_ANCHOR_BODY(node), reg, env); + if (r != 0) return r; + + r = add_op(reg, OP_POP_TO_MARK); + if (r != 0) return r; + COP(reg)->pop_to_mark.id = mid; + r = add_op(reg, OP_FAIL); + if (r != 0) return r; + r = add_op(reg, OP_POP); + } + else { + OnigLen diff; + MemNumType mid1, mid2; + MemNumType mid3 = 0; /* ignore uninitialized warning */ + + ID_ENTRY(env, mid1); + r = add_op(reg, OP_SAVE_VAL); + if (r != 0) return r; + COP(reg)->save_val.type = SAVE_RIGHT_RANGE; + COP(reg)->save_val.id = mid1; + + r = add_op(reg, OP_UPDATE_VAR); + if (r != 0) return r; + COP(reg)->update_var.type = UPDATE_VAR_RIGHT_RANGE_TO_S; + + ID_ENTRY(env, mid2); + r = add_op(reg, OP_MARK); + if (r != 0) return r; + COP(reg)->mark.id = mid2; + COP(reg)->mark.save_pos = FALSE; + + r = add_op(reg, OP_PUSH); + if (r != 0) return r; + + COP(reg)->push.addr = SIZE_INC + OPSIZE_STEP_BACK_START + OPSIZE_STEP_BACK_NEXT + len + OPSIZE_CHECK_POSITION + OPSIZE_POP_TO_MARK + OPSIZE_UPDATE_VAR + OPSIZE_POP + OPSIZE_FAIL; + if ((env->flags & PE_FLAG_HAS_ABSENT_STOPPER) != 0) + COP(reg)->push.addr += OPSIZE_SAVE_VAL + OPSIZE_UPDATE_VAR; + + if (IS_NOT_NULL(node->lead_node)) { + int clen; + MinMaxCharLen ci; + + clen = compile_length_tree(node->lead_node, reg, env); + COP(reg)->push.addr += OPSIZE_MOVE + clen; + + r = node_char_len(node->lead_node, reg, &ci, env); + if (r < 0) return r; + r = add_op(reg, OP_MOVE); + if (r != 0) return r; + COP(reg)->move.n = -((RelPositionType )ci.min); + + r = compile_tree(node->lead_node, reg, env); + if (r != 0) return r; + } + + if ((env->flags & PE_FLAG_HAS_ABSENT_STOPPER) != 0) { + ID_ENTRY(env, mid3); + r = add_op(reg, OP_SAVE_VAL); + if (r != 0) return r; + COP(reg)->save_val.type = SAVE_RIGHT_RANGE; + COP(reg)->save_val.id = mid3; + } + + r = add_op(reg, OP_STEP_BACK_START); + if (r != 0) return r; + + if (node->char_max_len != INFINITE_LEN) + diff = node->char_max_len - node->char_min_len; + else + diff = INFINITE_LEN; + + COP(reg)->step_back_start.initial = node->char_min_len; + COP(reg)->step_back_start.remaining = diff; + COP(reg)->step_back_start.addr = 2; + + r = add_op(reg, OP_STEP_BACK_NEXT); + if (r != 0) return r; + + r = compile_tree(ND_ANCHOR_BODY(node), reg, env); + if (r != 0) return r; + + if ((env->flags & PE_FLAG_HAS_ABSENT_STOPPER) != 0) { + r = add_op(reg, OP_UPDATE_VAR); + if (r != 0) return r; + COP(reg)->update_var.type = UPDATE_VAR_RIGHT_RANGE_FROM_STACK; + COP(reg)->update_var.id = mid3; + COP(reg)->update_var.clear = FALSE; + } + + r = add_op(reg, OP_CHECK_POSITION); + if (r != 0) return r; + COP(reg)->check_position.type = CHECK_POSITION_CURRENT_RIGHT_RANGE; + + r = add_op(reg, OP_POP_TO_MARK); + if (r != 0) return r; + COP(reg)->pop_to_mark.id = mid2; + + r = add_op(reg, OP_UPDATE_VAR); + if (r != 0) return r; + COP(reg)->update_var.type = UPDATE_VAR_RIGHT_RANGE_FROM_STACK; + COP(reg)->update_var.id = mid1; + COP(reg)->update_var.clear = FALSE; + + r = add_op(reg, OP_POP); /* pop save val */ + if (r != 0) return r; + r = add_op(reg, OP_FAIL); + if (r != 0) return r; + + r = add_op(reg, OP_UPDATE_VAR); + if (r != 0) return r; + COP(reg)->update_var.type = UPDATE_VAR_RIGHT_RANGE_FROM_STACK; + COP(reg)->update_var.id = mid1; + COP(reg)->update_var.clear = FALSE; + + r = add_op(reg, OP_POP); /* pop mark */ + if (r != 0) return r; + r = add_op(reg, OP_POP); /* pop save val */ + } + + return r; +} + +static int +compile_anchor_node(AnchorNode* node, regex_t* reg, ParseEnv* env) +{ + int r, len; + enum OpCode op; + MemNumType mid; + + switch (node->type) { + case ANCR_BEGIN_BUF: r = add_op(reg, OP_BEGIN_BUF); break; + case ANCR_END_BUF: r = add_op(reg, OP_END_BUF); break; + case ANCR_BEGIN_LINE: r = add_op(reg, OP_BEGIN_LINE); break; + case ANCR_END_LINE: r = add_op(reg, OP_END_LINE); break; + case ANCR_SEMI_END_BUF: r = add_op(reg, OP_SEMI_END_BUF); break; + case ANCR_BEGIN_POSITION: + r = add_op(reg, OP_CHECK_POSITION); + if (r != 0) return r; + COP(reg)->check_position.type = CHECK_POSITION_SEARCH_START; + break; + + case ANCR_WORD_BOUNDARY: + op = OP_WORD_BOUNDARY; + word: + r = add_op(reg, op); + if (r != 0) return r; + COP(reg)->word_boundary.mode = (ModeType )node->ascii_mode; + break; + + case ANCR_NO_WORD_BOUNDARY: + op = OP_NO_WORD_BOUNDARY; goto word; + break; +#ifdef USE_WORD_BEGIN_END + case ANCR_WORD_BEGIN: + op = OP_WORD_BEGIN; goto word; + break; + case ANCR_WORD_END: + op = OP_WORD_END; goto word; + break; +#endif + + case ANCR_TEXT_SEGMENT_BOUNDARY: + case ANCR_NO_TEXT_SEGMENT_BOUNDARY: + { + enum TextSegmentBoundaryType type; + + r = add_op(reg, OP_TEXT_SEGMENT_BOUNDARY); + if (r != 0) return r; + + type = EXTENDED_GRAPHEME_CLUSTER_BOUNDARY; +#ifdef USE_UNICODE_WORD_BREAK + if (ND_IS_TEXT_SEGMENT_WORD(node)) + type = WORD_BOUNDARY; +#endif + + COP(reg)->text_segment_boundary.type = type; + COP(reg)->text_segment_boundary.not = + (node->type == ANCR_NO_TEXT_SEGMENT_BOUNDARY ? 1 : 0); + } + break; + + case ANCR_PREC_READ: + { + ID_ENTRY(env, mid); + r = add_op(reg, OP_MARK); + if (r != 0) return r; + COP(reg)->mark.id = mid; + COP(reg)->mark.save_pos = TRUE; + + r = compile_tree(ND_ANCHOR_BODY(node), reg, env); + if (r != 0) return r; + + r = add_op(reg, OP_CUT_TO_MARK); + if (r != 0) return r; + COP(reg)->cut_to_mark.id = mid; + COP(reg)->cut_to_mark.restore_pos = TRUE; + } + break; + + case ANCR_PREC_READ_NOT: + { + len = compile_length_tree(ND_ANCHOR_BODY(node), reg, env); + if (len < 0) return len; + + ID_ENTRY(env, mid); + r = add_op(reg, OP_PUSH); + if (r != 0) return r; + COP(reg)->push.addr = SIZE_INC + OPSIZE_MARK + len + + OPSIZE_POP_TO_MARK + OPSIZE_POP + OPSIZE_FAIL; + + r = add_op(reg, OP_MARK); + if (r != 0) return r; + COP(reg)->mark.id = mid; + COP(reg)->mark.save_pos = FALSE; + + r = compile_tree(ND_ANCHOR_BODY(node), reg, env); + if (r != 0) return r; + + r = add_op(reg, OP_POP_TO_MARK); + if (r != 0) return r; + COP(reg)->pop_to_mark.id = mid; + + r = add_op(reg, OP_POP); + if (r != 0) return r; + r = add_op(reg, OP_FAIL); + } + break; + + case ANCR_LOOK_BEHIND: + r = compile_anchor_look_behind_node(node, reg, env); + break; + + case ANCR_LOOK_BEHIND_NOT: + r = compile_anchor_look_behind_not_node(node, reg, env); + break; + + default: + return ONIGERR_TYPE_BUG; + break; + } + + return r; +} + +static int +compile_gimmick_node(GimmickNode* node, regex_t* reg) +{ + int r = 0; + + switch (node->type) { + case GIMMICK_FAIL: + r = add_op(reg, OP_FAIL); + break; + + case GIMMICK_SAVE: + r = add_op(reg, OP_SAVE_VAL); + if (r != 0) return r; + COP(reg)->save_val.type = node->detail_type; + COP(reg)->save_val.id = node->id; + break; + + case GIMMICK_UPDATE_VAR: + r = add_op(reg, OP_UPDATE_VAR); + if (r != 0) return r; + COP(reg)->update_var.type = node->detail_type; + COP(reg)->update_var.id = node->id; + COP(reg)->update_var.clear = FALSE; + break; + +#ifdef USE_CALLOUT + case GIMMICK_CALLOUT: + switch (node->detail_type) { + case ONIG_CALLOUT_OF_CONTENTS: + case ONIG_CALLOUT_OF_NAME: + { + if (node->detail_type == ONIG_CALLOUT_OF_NAME) { + r = add_op(reg, OP_CALLOUT_NAME); + if (r != 0) return r; + COP(reg)->callout_name.id = node->id; + COP(reg)->callout_name.num = node->num; + } + else { + r = add_op(reg, OP_CALLOUT_CONTENTS); + if (r != 0) return r; + COP(reg)->callout_contents.num = node->num; + } + } + break; + + default: + r = ONIGERR_TYPE_BUG; + break; + } +#endif + } + + return r; +} + +static int +compile_length_gimmick_node(GimmickNode* node, regex_t* reg) +{ + int len; + + switch (node->type) { + case GIMMICK_FAIL: + len = OPSIZE_FAIL; + break; + + case GIMMICK_SAVE: + len = OPSIZE_SAVE_VAL; + break; + + case GIMMICK_UPDATE_VAR: + len = OPSIZE_UPDATE_VAR; + break; + +#ifdef USE_CALLOUT + case GIMMICK_CALLOUT: + switch (node->detail_type) { + case ONIG_CALLOUT_OF_CONTENTS: + len = OPSIZE_CALLOUT_CONTENTS; + break; + case ONIG_CALLOUT_OF_NAME: + len = OPSIZE_CALLOUT_NAME; + break; + + default: + len = ONIGERR_TYPE_BUG; + break; + } + break; +#endif + + default: + return ONIGERR_TYPE_BUG; + break; + } + + return len; +} + +static int +compile_length_tree(Node* node, regex_t* reg, ParseEnv* env) +{ + int len, r; + + switch (ND_TYPE(node)) { + case ND_LIST: + len = 0; + do { + r = compile_length_tree(ND_CAR(node), reg, env); + if (r < 0) return r; + len += r; + } while (IS_NOT_NULL(node = ND_CDR(node))); + r = len; + break; + + case ND_ALT: + { + int n; + + n = r = 0; + do { + r += compile_length_tree(ND_CAR(node), reg, env); + n++; + } while (IS_NOT_NULL(node = ND_CDR(node))); + r += (OPSIZE_PUSH + OPSIZE_JUMP) * (n - 1); + } + break; + + case ND_STRING: + if (ND_STRING_IS_CRUDE(node)) + r = compile_length_string_crude_node(STR_(node), reg); + else + r = compile_length_string_node(node, reg); + break; + + case ND_CCLASS: + r = compile_length_cclass_node(CCLASS_(node), reg); + break; + + case ND_CTYPE: + r = SIZE_OPCODE; + break; + + case ND_BACKREF: + r = OPSIZE_BACKREF; + break; + +#ifdef USE_CALL + case ND_CALL: + r = OPSIZE_CALL; + break; +#endif + + case ND_QUANT: + r = compile_length_quantifier_node(QUANT_(node), reg, env); + break; + + case ND_BAG: + r = compile_length_bag_node(BAG_(node), reg, env); + break; + + case ND_ANCHOR: + r = compile_length_anchor_node(ANCHOR_(node), reg, env); + break; + + case ND_GIMMICK: + r = compile_length_gimmick_node(GIMMICK_(node), reg); + break; + + default: + return ONIGERR_TYPE_BUG; + break; + } + + return r; +} + +static int +compile_tree(Node* node, regex_t* reg, ParseEnv* env) +{ + int n, len, pos, r = 0; + + switch (ND_TYPE(node)) { + case ND_LIST: + do { + r = compile_tree(ND_CAR(node), reg, env); + } while (r == 0 && IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_ALT: + { + Node* x = node; + len = 0; + do { + len += compile_length_tree(ND_CAR(x), reg, env); + if (IS_NOT_NULL(ND_CDR(x))) { + len += OPSIZE_PUSH + OPSIZE_JUMP; + } + } while (IS_NOT_NULL(x = ND_CDR(x))); + pos = COP_CURR_OFFSET(reg) + 1 + len; /* goal position */ + + do { + len = compile_length_tree(ND_CAR(node), reg, env); + if (IS_NOT_NULL(ND_CDR(node))) { + enum OpCode push = ND_IS_SUPER(node) ? OP_PUSH_SUPER : OP_PUSH; + r = add_op(reg, push); + if (r != 0) break; + COP(reg)->push.addr = SIZE_INC + len + OPSIZE_JUMP; + } + r = compile_tree(ND_CAR(node), reg, env); + if (r != 0) break; + if (IS_NOT_NULL(ND_CDR(node))) { + len = pos - (COP_CURR_OFFSET(reg) + 1); + r = add_op(reg, OP_JUMP); + if (r != 0) break; + COP(reg)->jump.addr = len; + } + } while (IS_NOT_NULL(node = ND_CDR(node))); + } + break; + + case ND_STRING: + if (ND_STRING_IS_CRUDE(node)) + r = compile_string_crude_node(STR_(node), reg); + else + r = compile_string_node(node, reg); + break; + + case ND_CCLASS: + r = compile_cclass_node(CCLASS_(node), reg); + break; + + case ND_CTYPE: + { + int op; + + switch (CTYPE_(node)->ctype) { + case CTYPE_ANYCHAR: + r = add_op(reg, ND_IS_MULTILINE(node) ? OP_ANYCHAR_ML : OP_ANYCHAR); + break; + + case ONIGENC_CTYPE_WORD: + if (CTYPE_(node)->ascii_mode == 0) { + op = CTYPE_(node)->not != 0 ? OP_NO_WORD : OP_WORD; + } + else { + op = CTYPE_(node)->not != 0 ? OP_NO_WORD_ASCII : OP_WORD_ASCII; + } + r = add_op(reg, op); + break; + + default: + return ONIGERR_TYPE_BUG; + break; + } + } + break; + + case ND_BACKREF: + { + BackRefNode* br = BACKREF_(node); + + if (ND_IS_CHECKER(node)) { +#ifdef USE_BACKREF_WITH_LEVEL + if (ND_IS_NEST_LEVEL(node)) { + r = add_op(reg, OP_BACKREF_CHECK_WITH_LEVEL); + if (r != 0) return r; + COP(reg)->backref_general.nest_level = br->nest_level; + } + else +#endif + { + r = add_op(reg, OP_BACKREF_CHECK); + if (r != 0) return r; + } + goto add_bacref_mems; + } + else { +#ifdef USE_BACKREF_WITH_LEVEL + if (ND_IS_NEST_LEVEL(node)) { + if (ND_IS_IGNORECASE(node)) + r = add_op(reg, OP_BACKREF_WITH_LEVEL_IC); + else + r = add_op(reg, OP_BACKREF_WITH_LEVEL); + + if (r != 0) return r; + COP(reg)->backref_general.nest_level = br->nest_level; + goto add_bacref_mems; + } + else +#endif + if (br->back_num == 1) { + n = br->back_static[0]; + if (ND_IS_IGNORECASE(node)) { + r = add_op(reg, OP_BACKREF_N_IC); + if (r != 0) return r; + COP(reg)->backref_n.n1 = n; + } + else { + switch (n) { + case 1: r = add_op(reg, OP_BACKREF1); break; + case 2: r = add_op(reg, OP_BACKREF2); break; + default: + r = add_op(reg, OP_BACKREF_N); + if (r != 0) return r; + COP(reg)->backref_n.n1 = n; + break; + } + } + } + else { + int num; + int* p; + + r = add_op(reg, ND_IS_IGNORECASE(node) ? + OP_BACKREF_MULTI_IC : OP_BACKREF_MULTI); + if (r != 0) return r; + + add_bacref_mems: + num = br->back_num; + COP(reg)->backref_general.num = num; + if (num == 1) { + COP(reg)->backref_general.n1 = br->back_static[0]; + } + else { + int i, j; + MemNumType* ns; + + ns = xmalloc(sizeof(MemNumType) * num); + CHECK_NULL_RETURN_MEMERR(ns); + COP(reg)->backref_general.ns = ns; + p = BACKREFS_P(br); + for (i = num - 1, j = 0; i >= 0; i--, j++) { + ns[j] = p[i]; + } + } + } + } + } + break; + +#ifdef USE_CALL + case ND_CALL: + r = compile_call(CALL_(node), reg, env); + break; +#endif + + case ND_QUANT: + r = compile_quantifier_node(QUANT_(node), reg, env); + break; + + case ND_BAG: + r = compile_bag_node(BAG_(node), reg, env); + break; + + case ND_ANCHOR: + r = compile_anchor_node(ANCHOR_(node), reg, env); + break; + + case ND_GIMMICK: + r = compile_gimmick_node(GIMMICK_(node), reg); + break; + + default: +#ifdef ONIG_DEBUG + fprintf(DBGFP, "compile_tree: undefined node type %d\n", ND_TYPE(node)); +#endif + break; + } + + return r; +} + +static int +make_named_capture_number_map(Node** plink, GroupNumMap* map, int* counter) +{ + int r; + Node* node = *plink; + + switch (ND_TYPE(node)) { + case ND_LIST: + case ND_ALT: + do { + r = make_named_capture_number_map(&(ND_CAR(node)), map, counter); + } while (r >= 0 && IS_NOT_NULL(node = ND_CDR(node))); + if (r < 0) return r; + break; + + case ND_QUANT: + { + Node** ptarget = &(ND_BODY(node)); + r = make_named_capture_number_map(ptarget, map, counter); + if (r < 0) return r; + if (r == 1 && ND_TYPE(*ptarget) == ND_QUANT) { + return onig_reduce_nested_quantifier(node); + } + } + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + if (en->type == BAG_MEMORY) { + if (ND_IS_NAMED_GROUP(node)) { + (*counter)++; + map[en->m.regnum].new_val = *counter; + en->m.regnum = *counter; + r = make_named_capture_number_map(&(ND_BODY(node)), map, counter); + if (r < 0) return r; + } + else { + *plink = ND_BODY(node); + ND_BODY(node) = NULL_NODE; + onig_node_free(node); + r = make_named_capture_number_map(plink, map, counter); + if (r < 0) return r; + return 1; + } + } + else if (en->type == BAG_IF_ELSE) { + r = make_named_capture_number_map(&(ND_BAG_BODY(en)), map, counter); + if (r < 0) return r; + if (IS_NOT_NULL(en->te.Then)) { + r = make_named_capture_number_map(&(en->te.Then), map, counter); + if (r < 0) return r; + } + if (IS_NOT_NULL(en->te.Else)) { + r = make_named_capture_number_map(&(en->te.Else), map, counter); + if (r < 0) return r; + } + } + else { + r = make_named_capture_number_map(&(ND_BODY(node)), map, counter); + if (r < 0) return r; + } + } + break; + + case ND_ANCHOR: + if (IS_NOT_NULL(ND_BODY(node))) { + r = make_named_capture_number_map(&(ND_BODY(node)), map, counter); + if (r < 0) return r; + } + break; + + default: + break; + } + + return 0; +} + +static int +renumber_backref_node(Node* node, GroupNumMap* map) +{ + int i, pos, n, old_num; + int *backs; + BackRefNode* bn = BACKREF_(node); + + if (! ND_IS_BY_NAME(node)) + return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED; + + old_num = bn->back_num; + if (IS_NULL(bn->back_dynamic)) + backs = bn->back_static; + else + backs = bn->back_dynamic; + + for (i = 0, pos = 0; i < old_num; i++) { + n = map[backs[i]].new_val; + if (n > 0) { + backs[pos] = n; + pos++; + } + } + + bn->back_num = pos; + return 0; +} + +static int +renumber_backref_traverse(Node* node, GroupNumMap* map) +{ + int r = 0; + + switch (ND_TYPE(node)) { + case ND_LIST: + case ND_ALT: + do { + r = renumber_backref_traverse(ND_CAR(node), map); + } while (r == 0 && IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_QUANT: + r = renumber_backref_traverse(ND_BODY(node), map); + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + r = renumber_backref_traverse(ND_BODY(node), map); + if (r != 0) return r; + + if (en->type == BAG_IF_ELSE) { + if (IS_NOT_NULL(en->te.Then)) { + r = renumber_backref_traverse(en->te.Then, map); + if (r != 0) return r; + } + if (IS_NOT_NULL(en->te.Else)) { + r = renumber_backref_traverse(en->te.Else, map); + if (r != 0) return r; + } + } + } + break; + + case ND_BACKREF: + r = renumber_backref_node(node, map); + break; + + case ND_ANCHOR: + if (IS_NOT_NULL(ND_BODY(node))) + r = renumber_backref_traverse(ND_BODY(node), map); + break; + + default: + break; + } + + return r; +} + +static int +numbered_ref_check(Node* node) +{ + int r = 0; + + switch (ND_TYPE(node)) { + case ND_LIST: + case ND_ALT: + do { + r = numbered_ref_check(ND_CAR(node)); + } while (r == 0 && IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_ANCHOR: + if (IS_NULL(ND_BODY(node))) + break; + /* fall */ + case ND_QUANT: + r = numbered_ref_check(ND_BODY(node)); + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + r = numbered_ref_check(ND_BODY(node)); + if (r != 0) return r; + + if (en->type == BAG_IF_ELSE) { + if (IS_NOT_NULL(en->te.Then)) { + r = numbered_ref_check(en->te.Then); + if (r != 0) return r; + } + if (IS_NOT_NULL(en->te.Else)) { + r = numbered_ref_check(en->te.Else); + if (r != 0) return r; + } + } + } + + break; + + case ND_BACKREF: + if (! ND_IS_BY_NAME(node)) + return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED; + break; + + default: + break; + } + + return r; +} + +static int +disable_noname_group_capture(Node** root, regex_t* reg, ParseEnv* env) +{ + int r, i, pos, counter; + MemStatusType loc; + GroupNumMap* map; + + map = (GroupNumMap* )xalloca(sizeof(GroupNumMap) * (env->num_mem + 1)); + CHECK_NULL_RETURN_MEMERR(map); + for (i = 1; i <= env->num_mem; i++) { + map[i].new_val = 0; + } + counter = 0; + r = make_named_capture_number_map(root, map, &counter); + if (r < 0) return r; + + r = renumber_backref_traverse(*root, map); + if (r != 0) return r; + + for (i = 1, pos = 1; i <= env->num_mem; i++) { + if (map[i].new_val > 0) { + PARSEENV_MEMENV(env)[pos] = PARSEENV_MEMENV(env)[i]; + pos++; + } + } + + loc = env->cap_history; + MEM_STATUS_CLEAR(env->cap_history); + for (i = 1; i <= ONIG_MAX_CAPTURE_HISTORY_GROUP; i++) { + if (MEM_STATUS_AT(loc, i)) { + MEM_STATUS_ON_SIMPLE(env->cap_history, map[i].new_val); + } + } + + env->num_mem = env->num_named; + reg->num_mem = env->num_named; + + return onig_renumber_name_table(reg, map); +} + +#ifdef USE_CALL +static int +fix_unset_addr_list(UnsetAddrList* uslist, regex_t* reg) +{ + int i, offset; + BagNode* en; + AbsAddrType addr; + AbsAddrType* paddr; + + for (i = 0; i < uslist->num; i++) { + if (! ND_IS_FIXED_ADDR(uslist->us[i].target)) { + if (ND_IS_CALLED(uslist->us[i].target)) + return ONIGERR_PARSER_BUG; + else { + /* CASE: called node doesn't have called address. + ex. /((|a\g<1>)(.){0}){0}\g<3>/ + group-1 doesn't called, but compiled into bytecodes, + because group-3 is referred from outside. + */ + continue; + } + } + + en = BAG_(uslist->us[i].target); + addr = en->m.called_addr; + offset = uslist->us[i].offset; + + paddr = (AbsAddrType* )((char* )reg->ops + offset); + *paddr = addr; + } + return 0; +} +#endif + +/* x is not included y ==> 1 : 0 */ +static int +is_exclusive(Node* x, Node* y, regex_t* reg) +{ + int i, len; + OnigCodePoint code; + UChar *p; + NodeType ytype; + + retry: + ytype = ND_TYPE(y); + switch (ND_TYPE(x)) { + case ND_CTYPE: + { + if (CTYPE_(x)->ctype == CTYPE_ANYCHAR || + CTYPE_(y)->ctype == CTYPE_ANYCHAR) + break; + + switch (ytype) { + case ND_CTYPE: + if (CTYPE_(y)->ctype == CTYPE_(x)->ctype && + CTYPE_(y)->not != CTYPE_(x)->not && + CTYPE_(y)->ascii_mode == CTYPE_(x)->ascii_mode) + return 1; + else + return 0; + break; + + case ND_CCLASS: + swap: + { + Node* tmp; + tmp = x; x = y; y = tmp; + goto retry; + } + break; + + case ND_STRING: + goto swap; + break; + + default: + break; + } + } + break; + + case ND_CCLASS: + { + int range; + CClassNode* xc = CCLASS_(x); + + switch (ytype) { + case ND_CTYPE: + switch (CTYPE_(y)->ctype) { + case CTYPE_ANYCHAR: + return 0; + break; + + case ONIGENC_CTYPE_WORD: + if (CTYPE_(y)->not == 0) { + if (IS_NULL(xc->mbuf) && !IS_NCCLASS_NOT(xc)) { + range = CTYPE_(y)->ascii_mode != 0 ? 128 : SINGLE_BYTE_SIZE; + for (i = 0; i < range; i++) { + if (BITSET_AT(xc->bs, i)) { + if (ONIGENC_IS_CODE_WORD(reg->enc, i)) return 0; + } + } + return 1; + } + return 0; + } + else { + if (IS_NOT_NULL(xc->mbuf)) return 0; + if (IS_NCCLASS_NOT(xc)) return 0; + + range = CTYPE_(y)->ascii_mode != 0 ? 128 : SINGLE_BYTE_SIZE; + for (i = 0; i < range; i++) { + if (! ONIGENC_IS_CODE_WORD(reg->enc, i)) { + if (BITSET_AT(xc->bs, i)) + return 0; + } + } + for (i = range; i < SINGLE_BYTE_SIZE; i++) { + if (BITSET_AT(xc->bs, i)) return 0; + } + return 1; + } + break; + + default: + break; + } + break; + + case ND_CCLASS: + { + int v; + CClassNode* yc = CCLASS_(y); + + for (i = 0; i < SINGLE_BYTE_SIZE; i++) { + v = BITSET_AT(xc->bs, i); + if ((v != 0 && !IS_NCCLASS_NOT(xc)) || (v == 0 && IS_NCCLASS_NOT(xc))) { + v = BITSET_AT(yc->bs, i); + if ((v != 0 && !IS_NCCLASS_NOT(yc)) || + (v == 0 && IS_NCCLASS_NOT(yc))) + return 0; + } + } + if ((IS_NULL(xc->mbuf) && !IS_NCCLASS_NOT(xc)) || + (IS_NULL(yc->mbuf) && !IS_NCCLASS_NOT(yc))) + return 1; + return 0; + } + break; + + case ND_STRING: + goto swap; + break; + + default: + break; + } + } + break; + + case ND_STRING: + { + StrNode* xs = STR_(x); + + if (ND_STRING_LEN(x) == 0) + break; + + switch (ytype) { + case ND_CTYPE: + switch (CTYPE_(y)->ctype) { + case CTYPE_ANYCHAR: + break; + + case ONIGENC_CTYPE_WORD: + if (CTYPE_(y)->ascii_mode == 0) { + if (ONIGENC_IS_MBC_WORD(reg->enc, xs->s, xs->end)) + return CTYPE_(y)->not; + else + return !(CTYPE_(y)->not); + } + else { + if (ONIGENC_IS_MBC_WORD_ASCII(reg->enc, xs->s, xs->end)) + return CTYPE_(y)->not; + else + return !(CTYPE_(y)->not); + } + break; + default: + break; + } + break; + + case ND_CCLASS: + { + CClassNode* cc = CCLASS_(y); + + code = ONIGENC_MBC_TO_CODE(reg->enc, xs->s, + xs->s + ONIGENC_MBC_MAXLEN(reg->enc)); + return onig_is_code_in_cc(reg->enc, code, cc) == 0; + } + break; + + case ND_STRING: + { + UChar *q; + StrNode* ys = STR_(y); + + len = ND_STRING_LEN(x); + if (len > ND_STRING_LEN(y)) len = ND_STRING_LEN(y); + + for (i = 0, p = ys->s, q = xs->s; i < len; i++, p++, q++) { + if (*p != *q) return 1; + } + } + break; + + default: + break; + } + } + break; + + default: + break; + } + + return 0; +} + +static Node* +get_tree_head_literal(Node* node, int exact, regex_t* reg) +{ + Node* n = NULL_NODE; + + switch (ND_TYPE(node)) { + case ND_BACKREF: + case ND_ALT: +#ifdef USE_CALL + case ND_CALL: +#endif + break; + + case ND_CTYPE: + if (CTYPE_(node)->ctype == CTYPE_ANYCHAR) + break; + /* fall */ + case ND_CCLASS: + if (exact == 0) { + n = node; + } + break; + + case ND_LIST: + n = get_tree_head_literal(ND_CAR(node), exact, reg); + break; + + case ND_STRING: + { + StrNode* sn = STR_(node); + + if (sn->end <= sn->s) + break; + + if (exact == 0 || !ND_IS_REAL_IGNORECASE(node)) { + n = node; + } + } + break; + + case ND_QUANT: + { + QuantNode* qn = QUANT_(node); + if (qn->lower > 0) { + if (IS_NOT_NULL(qn->head_exact)) + n = qn->head_exact; + else + n = get_tree_head_literal(ND_BODY(node), exact, reg); + } + } + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + switch (en->type) { + case BAG_OPTION: + case BAG_MEMORY: + case BAG_STOP_BACKTRACK: + n = get_tree_head_literal(ND_BODY(node), exact, reg); + break; + default: + break; + } + } + break; + + case ND_ANCHOR: + if (ANCHOR_(node)->type == ANCR_PREC_READ) + n = get_tree_head_literal(ND_BODY(node), exact, reg); + break; + + case ND_GIMMICK: + default: + break; + } + + return n; +} + +enum GetValue { + GET_VALUE_NONE = -1, + GET_VALUE_IGNORE = 0, + GET_VALUE_FOUND = 1 +}; + +#define MAX_NEST_LEVEL_GET_TREE_TAIL_LITERAL 16 + +static int +get_tree_tail_literal(Node* node, Node** rnode, regex_t* reg, int nest_level) +{ + int r; + + nest_level++; + if (nest_level >= MAX_NEST_LEVEL_GET_TREE_TAIL_LITERAL) { + return GET_VALUE_NONE; + } + + switch (ND_TYPE(node)) { + case ND_LIST: + if (IS_NULL(ND_CDR(node))) { + r = get_tree_tail_literal(ND_CAR(node), rnode, reg, nest_level); + } + else { + r = get_tree_tail_literal(ND_CDR(node), rnode, reg, nest_level); + if (r == GET_VALUE_IGNORE) { + r = get_tree_tail_literal(ND_CAR(node), rnode, reg, nest_level); + } + } + break; + +#ifdef USE_CALL + case ND_CALL: + r = get_tree_tail_literal(ND_BODY(node), rnode, reg, nest_level); + break; +#endif + + case ND_CTYPE: + if (CTYPE_(node)->ctype == CTYPE_ANYCHAR) { + r = GET_VALUE_NONE; + break; + } + /* fall */ + case ND_CCLASS: + *rnode = node; + r = GET_VALUE_FOUND; + break; + + case ND_STRING: + { + StrNode* sn = STR_(node); + + if (sn->end <= sn->s) { + r = GET_VALUE_IGNORE; + break; + } + + if (ND_IS_REAL_IGNORECASE(node)) { + r = GET_VALUE_NONE; + break; + } + + *rnode = node; + r = GET_VALUE_FOUND; + } + break; + + case ND_QUANT: + { + QuantNode* qn = QUANT_(node); + if (qn->lower != 0) { + r = get_tree_tail_literal(ND_BODY(node), rnode, reg, nest_level); + } + else + r = GET_VALUE_NONE; + } + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + if (en->type == BAG_MEMORY) { + if (ND_IS_MARK1(node)) + r = GET_VALUE_NONE; + else { + ND_STATUS_ADD(node, MARK1); + r = get_tree_tail_literal(ND_BODY(node), rnode, reg, nest_level); + ND_STATUS_REMOVE(node, MARK1); + } + } + else { + r = get_tree_tail_literal(ND_BODY(node), rnode, reg, nest_level); + } + } + break; + + case ND_ANCHOR: + case ND_GIMMICK: + r = GET_VALUE_IGNORE; + break; + + case ND_ALT: + case ND_BACKREF: + default: + r = GET_VALUE_NONE; + break; + } + + return r; +} + +static int +check_called_node_in_look_behind(Node* node, int not) +{ + int r; + + r = 0; + + switch (ND_TYPE(node)) { + case ND_LIST: + case ND_ALT: + do { + r = check_called_node_in_look_behind(ND_CAR(node), not); + } while (r == 0 && IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_QUANT: + r = check_called_node_in_look_behind(ND_BODY(node), not); + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + if (en->type == BAG_MEMORY) { + if (ND_IS_MARK1(node)) + return 0; + else { + ND_STATUS_ADD(node, MARK1); + r = check_called_node_in_look_behind(ND_BODY(node), not); + ND_STATUS_REMOVE(node, MARK1); + } + } + else { + r = check_called_node_in_look_behind(ND_BODY(node), not); + if (r == 0 && en->type == BAG_IF_ELSE) { + if (IS_NOT_NULL(en->te.Then)) { + r = check_called_node_in_look_behind(en->te.Then, not); + if (r != 0) break; + } + if (IS_NOT_NULL(en->te.Else)) { + r = check_called_node_in_look_behind(en->te.Else, not); + } + } + } + } + break; + + case ND_ANCHOR: + if (IS_NOT_NULL(ND_BODY(node))) + r = check_called_node_in_look_behind(ND_BODY(node), not); + break; + + case ND_GIMMICK: + if (ND_IS_ABSENT_WITH_SIDE_EFFECTS(node) != 0) + return 1; + break; + + default: + break; + } + + return r; +} + +/* allowed node types in look-behind */ +#define ALLOWED_TYPE_IN_LB \ + ( ND_BIT_LIST | ND_BIT_ALT | ND_BIT_STRING | ND_BIT_CCLASS \ + | ND_BIT_CTYPE | ND_BIT_ANCHOR | ND_BIT_BAG | ND_BIT_QUANT \ + | ND_BIT_CALL | ND_BIT_BACKREF | ND_BIT_GIMMICK) + +#define ALLOWED_BAG_IN_LB ( 1<type) & bag_mask[not]) == 0) + return 1; + + r = check_node_in_look_behind(ND_BODY(node), not, used); + if (r != 0) break; + + if (en->type == BAG_MEMORY) { + if (ND_IS_BACKREF(node) || ND_IS_CALLED(node) + || ND_IS_REFERENCED(node)) + *used = TRUE; + } + else if (en->type == BAG_IF_ELSE) { + if (IS_NOT_NULL(en->te.Then)) { + r = check_node_in_look_behind(en->te.Then, not, used); + if (r != 0) break; + } + if (IS_NOT_NULL(en->te.Else)) { + r = check_node_in_look_behind(en->te.Else, not, used); + } + } + } + break; + + case ND_ANCHOR: + type = ANCHOR_(node)->type; + if ((type & anchor_mask[not]) == 0) + return 1; + + if (IS_NOT_NULL(ND_BODY(node))) + r = check_node_in_look_behind(ND_BODY(node), not, used); + break; + + case ND_GIMMICK: + if (ND_IS_ABSENT_WITH_SIDE_EFFECTS(node) != 0) + return 1; + + { + GimmickNode* g = GIMMICK_(node); + if (g->type == GIMMICK_SAVE && g->detail_type == SAVE_KEEP) + *used = TRUE; + } + break; + + case ND_CALL: + if (ND_IS_RECURSION(node)) { + /* fix: Issue 38040 in oss-fuzz */ + /* This node should be removed before recursive call check. */ + *used = TRUE; + } + else + r = check_called_node_in_look_behind(ND_BODY(node), not); + break; + + default: + break; + } + return r; +} + +static OnigLen +node_min_byte_len(Node* node, ParseEnv* env) +{ + OnigLen len; + OnigLen tmin; + + len = 0; + switch (ND_TYPE(node)) { + case ND_BACKREF: + if (! ND_IS_CHECKER(node)) { + int i; + int* backs; + MemEnv* mem_env = PARSEENV_MEMENV(env); + BackRefNode* br = BACKREF_(node); + if (ND_IS_RECURSION(node)) break; + + backs = BACKREFS_P(br); + len = node_min_byte_len(mem_env[backs[0]].mem_node, env); + for (i = 1; i < br->back_num; i++) { + tmin = node_min_byte_len(mem_env[backs[i]].mem_node, env); + if (len > tmin) len = tmin; + } + } + break; + +#ifdef USE_CALL + case ND_CALL: + { + Node* t = ND_BODY(node); + if (ND_IS_FIXED_MIN(t)) + len = BAG_(t)->min_len; + else + len = node_min_byte_len(t, env); + } + break; +#endif + + case ND_LIST: + do { + tmin = node_min_byte_len(ND_CAR(node), env); + len = distance_add(len, tmin); + } while (IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_ALT: + { + Node *x, *y; + y = node; + do { + x = ND_CAR(y); + tmin = node_min_byte_len(x, env); + if (y == node) len = tmin; + else if (len > tmin) len = tmin; + } while (IS_NOT_NULL(y = ND_CDR(y))); + } + break; + + case ND_STRING: + { + StrNode* sn = STR_(node); + len = (int )(sn->end - sn->s); + } + break; + + case ND_CTYPE: + case ND_CCLASS: + len = ONIGENC_MBC_MINLEN(env->enc); + break; + + case ND_QUANT: + { + QuantNode* qn = QUANT_(node); + + if (qn->lower > 0) { + len = node_min_byte_len(ND_BODY(node), env); + len = distance_multiply(len, qn->lower); + } + } + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + switch (en->type) { + case BAG_MEMORY: + if (ND_IS_FIXED_MIN(node)) + len = en->min_len; + else { + if (ND_IS_MARK1(node)) + len = 0; /* recursive */ + else { + ND_STATUS_ADD(node, MARK1); + len = node_min_byte_len(ND_BODY(node), env); + ND_STATUS_REMOVE(node, MARK1); + + en->min_len = len; + ND_STATUS_ADD(node, FIXED_MIN); + } + } + break; + + case BAG_OPTION: + case BAG_STOP_BACKTRACK: + len = node_min_byte_len(ND_BODY(node), env); + break; + case BAG_IF_ELSE: + { + OnigLen elen; + + len = node_min_byte_len(ND_BODY(node), env); + if (IS_NOT_NULL(en->te.Then)) + len += node_min_byte_len(en->te.Then, env); + if (IS_NOT_NULL(en->te.Else)) + elen = node_min_byte_len(en->te.Else, env); + else elen = 0; + + if (elen < len) len = elen; + } + break; + } + } + break; + + case ND_GIMMICK: + { + GimmickNode* g = GIMMICK_(node); + if (g->type == GIMMICK_FAIL) { + len = INFINITE_LEN; + break; + } + } + /* fall */ + case ND_ANCHOR: + default: + break; + } + + return len; +} + +static int +check_backrefs(Node* node, ParseEnv* env) +{ + int r; + + switch (ND_TYPE(node)) { + case ND_LIST: + case ND_ALT: + do { + r = check_backrefs(ND_CAR(node), env); + } while (r == 0 && IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_ANCHOR: + if (! ANCHOR_HAS_BODY(ANCHOR_(node))) { + r = 0; + break; + } + /* fall */ + case ND_QUANT: + r = check_backrefs(ND_BODY(node), env); + break; + + case ND_BAG: + r = check_backrefs(ND_BODY(node), env); + { + BagNode* en = BAG_(node); + + if (en->type == BAG_IF_ELSE) { + if (r != 0) return r; + if (IS_NOT_NULL(en->te.Then)) { + r = check_backrefs(en->te.Then, env); + if (r != 0) return r; + } + if (IS_NOT_NULL(en->te.Else)) { + r = check_backrefs(en->te.Else, env); + } + } + } + break; + + case ND_BACKREF: + { + int i; + BackRefNode* br = BACKREF_(node); + int* backs = BACKREFS_P(br); + MemEnv* mem_env = PARSEENV_MEMENV(env); + + for (i = 0; i < br->back_num; i++) { + if (backs[i] > env->num_mem) + return ONIGERR_INVALID_BACKREF; + + ND_STATUS_ADD(mem_env[backs[i]].mem_node, BACKREF); + } + r = 0; + } + break; + + default: + r = 0; + break; + } + + return r; +} + +static int +set_empty_repeat_node_trav(Node* node, Node* empty, ParseEnv* env) +{ + int r; + + switch (ND_TYPE(node)) { + case ND_LIST: + case ND_ALT: + do { + r = set_empty_repeat_node_trav(ND_CAR(node), empty, env); + } while (r == 0 && IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_ANCHOR: + { + AnchorNode* an = ANCHOR_(node); + + if (! ANCHOR_HAS_BODY(an)) { + r = 0; + break; + } + + switch (an->type) { + case ANCR_PREC_READ: + case ANCR_LOOK_BEHIND: + empty = NULL_NODE; + break; + default: + break; + } + r = set_empty_repeat_node_trav(ND_BODY(node), empty, env); + } + break; + + case ND_QUANT: + { + QuantNode* qn = QUANT_(node); + + if (qn->emptiness != BODY_IS_NOT_EMPTY) empty = node; + r = set_empty_repeat_node_trav(ND_BODY(node), empty, env); + } + break; + + case ND_BAG: + if (IS_NOT_NULL(ND_BODY(node))) { + r = set_empty_repeat_node_trav(ND_BODY(node), empty, env); + if (r != 0) return r; + } + { + BagNode* en = BAG_(node); + + r = 0; + if (en->type == BAG_MEMORY) { + if (ND_IS_BACKREF(node)) { + if (IS_NOT_NULL(empty)) + PARSEENV_MEMENV(env)[en->m.regnum].empty_repeat_node = empty; + } + } + else if (en->type == BAG_IF_ELSE) { + if (IS_NOT_NULL(en->te.Then)) { + r = set_empty_repeat_node_trav(en->te.Then, empty, env); + if (r != 0) return r; + } + if (IS_NOT_NULL(en->te.Else)) { + r = set_empty_repeat_node_trav(en->te.Else, empty, env); + } + } + } + break; + + default: + r = 0; + break; + } + + return r; +} + +static int +is_ancestor_node(Node* node, Node* me) +{ + Node* parent; + + while ((parent = ND_PARENT(me)) != NULL_NODE) { + if (parent == node) return 1; + me = parent; + } + return 0; +} + +static void +set_empty_status_check_trav(Node* node, ParseEnv* env) +{ + switch (ND_TYPE(node)) { + case ND_LIST: + case ND_ALT: + do { + set_empty_status_check_trav(ND_CAR(node), env); + } while (IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_ANCHOR: + { + AnchorNode* an = ANCHOR_(node); + + if (! ANCHOR_HAS_BODY(an)) break; + set_empty_status_check_trav(ND_BODY(node), env); + } + break; + + case ND_QUANT: + set_empty_status_check_trav(ND_BODY(node), env); + break; + + case ND_BAG: + if (IS_NOT_NULL(ND_BODY(node))) + set_empty_status_check_trav(ND_BODY(node), env); + { + BagNode* en = BAG_(node); + + if (en->type == BAG_IF_ELSE) { + if (IS_NOT_NULL(en->te.Then)) { + set_empty_status_check_trav(en->te.Then, env); + } + if (IS_NOT_NULL(en->te.Else)) { + set_empty_status_check_trav(en->te.Else, env); + } + } + } + break; + + case ND_BACKREF: + { + int i; + int* backs; + MemEnv* mem_env = PARSEENV_MEMENV(env); + BackRefNode* br = BACKREF_(node); + backs = BACKREFS_P(br); + for (i = 0; i < br->back_num; i++) { + Node* ernode = mem_env[backs[i]].empty_repeat_node; + if (IS_NOT_NULL(ernode)) { + if (! is_ancestor_node(ernode, node)) { + MEM_STATUS_LIMIT_ON(QUANT_(ernode)->empty_status_mem, backs[i]); + ND_STATUS_ADD(ernode, EMPTY_STATUS_CHECK); + ND_STATUS_ADD(mem_env[backs[i]].mem_node, EMPTY_STATUS_CHECK); + } + } + } + } + break; + + default: + break; + } +} + +static void +set_parent_node_trav(Node* node, Node* parent) +{ + ND_PARENT(node) = parent; + + switch (ND_TYPE(node)) { + case ND_LIST: + case ND_ALT: + do { + set_parent_node_trav(ND_CAR(node), node); + } while (IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_ANCHOR: + if (! ANCHOR_HAS_BODY(ANCHOR_(node))) break; + set_parent_node_trav(ND_BODY(node), node); + break; + + case ND_QUANT: + set_parent_node_trav(ND_BODY(node), node); + break; + + case ND_BAG: + if (IS_NOT_NULL(ND_BODY(node))) + set_parent_node_trav(ND_BODY(node), node); + { + BagNode* en = BAG_(node); + + if (en->type == BAG_IF_ELSE) { + if (IS_NOT_NULL(en->te.Then)) + set_parent_node_trav(en->te.Then, node); + if (IS_NOT_NULL(en->te.Else)) { + set_parent_node_trav(en->te.Else, node); + } + } + } + break; + + default: + break; + } +} + + +#ifdef USE_CALL + +#define RECURSION_EXIST (1<<0) +#define RECURSION_MUST (1<<1) +#define RECURSION_INFINITE (1<<2) + +static int +infinite_recursive_call_check(Node* node, ParseEnv* env, int head) +{ + int ret; + int r = 0; + + switch (ND_TYPE(node)) { + case ND_LIST: + { + Node *x; + OnigLen min; + + x = node; + do { + ret = infinite_recursive_call_check(ND_CAR(x), env, head); + if (ret < 0 || (ret & RECURSION_INFINITE) != 0) return ret; + r |= ret; + if (head != 0) { + min = node_min_byte_len(ND_CAR(x), env); + if (min != 0) head = 0; + } + } while (IS_NOT_NULL(x = ND_CDR(x))); + } + break; + + case ND_ALT: + { + int must; + + must = RECURSION_MUST; + do { + ret = infinite_recursive_call_check(ND_CAR(node), env, head); + if (ret < 0 || (ret & RECURSION_INFINITE) != 0) return ret; + + r |= (ret & RECURSION_EXIST); + must &= ret; + } while (IS_NOT_NULL(node = ND_CDR(node))); + r |= must; + } + break; + + case ND_QUANT: + if (QUANT_(node)->upper == 0) break; + + r = infinite_recursive_call_check(ND_BODY(node), env, head); + if (r < 0) return r; + if ((r & RECURSION_MUST) != 0) { + if (QUANT_(node)->lower == 0) + r &= ~RECURSION_MUST; + } + break; + + case ND_ANCHOR: + if (! ANCHOR_HAS_BODY(ANCHOR_(node))) + break; + /* fall */ + case ND_CALL: + r = infinite_recursive_call_check(ND_BODY(node), env, head); + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + if (en->type == BAG_MEMORY) { + if (ND_IS_MARK2(node)) + return 0; + else if (ND_IS_MARK1(node)) + return (head == 0 ? RECURSION_EXIST | RECURSION_MUST + : RECURSION_EXIST | RECURSION_MUST | RECURSION_INFINITE); + else { + ND_STATUS_ADD(node, MARK2); + r = infinite_recursive_call_check(ND_BODY(node), env, head); + ND_STATUS_REMOVE(node, MARK2); + } + } + else if (en->type == BAG_IF_ELSE) { + int eret; + + ret = infinite_recursive_call_check(ND_BODY(node), env, head); + if (ret < 0 || (ret & RECURSION_INFINITE) != 0) return ret; + r |= ret; + if (IS_NOT_NULL(en->te.Then)) { + OnigLen min; + if (head != 0) { + min = node_min_byte_len(ND_BODY(node), env); + } + else min = 0; + + ret = infinite_recursive_call_check(en->te.Then, env, min != 0 ? 0:head); + if (ret < 0 || (ret & RECURSION_INFINITE) != 0) return ret; + r |= ret; + } + if (IS_NOT_NULL(en->te.Else)) { + eret = infinite_recursive_call_check(en->te.Else, env, head); + if (eret < 0 || (eret & RECURSION_INFINITE) != 0) return eret; + r |= (eret & RECURSION_EXIST); + if ((eret & RECURSION_MUST) == 0) + r &= ~RECURSION_MUST; + } + else { + r &= ~RECURSION_MUST; + } + } + else { + r = infinite_recursive_call_check(ND_BODY(node), env, head); + } + } + break; + + default: + break; + } + + return r; +} + +static int +infinite_recursive_call_check_trav(Node* node, ParseEnv* env) +{ + int r; + + switch (ND_TYPE(node)) { + case ND_LIST: + case ND_ALT: + do { + r = infinite_recursive_call_check_trav(ND_CAR(node), env); + } while (r == 0 && IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_ANCHOR: + if (! ANCHOR_HAS_BODY(ANCHOR_(node))) { + r = 0; + break; + } + /* fall */ + case ND_QUANT: + r = infinite_recursive_call_check_trav(ND_BODY(node), env); + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + if (en->type == BAG_MEMORY) { + if (ND_IS_RECURSION(node) && ND_IS_CALLED(node)) { + int ret; + + ND_STATUS_ADD(node, MARK1); + + ret = infinite_recursive_call_check(ND_BODY(node), env, 1); + if (ret < 0) return ret; + else if ((ret & (RECURSION_MUST | RECURSION_INFINITE)) != 0) + return ONIGERR_NEVER_ENDING_RECURSION; + + ND_STATUS_REMOVE(node, MARK1); + } + } + else if (en->type == BAG_IF_ELSE) { + if (IS_NOT_NULL(en->te.Then)) { + r = infinite_recursive_call_check_trav(en->te.Then, env); + if (r != 0) return r; + } + if (IS_NOT_NULL(en->te.Else)) { + r = infinite_recursive_call_check_trav(en->te.Else, env); + if (r != 0) return r; + } + } + } + + r = infinite_recursive_call_check_trav(ND_BODY(node), env); + break; + + default: + r = 0; + break; + } + + return r; +} + +static int +recursive_call_check(Node* node) +{ + int r; + + switch (ND_TYPE(node)) { + case ND_LIST: + case ND_ALT: + r = 0; + do { + r |= recursive_call_check(ND_CAR(node)); + } while (IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_ANCHOR: + if (! ANCHOR_HAS_BODY(ANCHOR_(node))) { + r = 0; + break; + } + /* fall */ + case ND_QUANT: + r = recursive_call_check(ND_BODY(node)); + break; + + case ND_CALL: + r = recursive_call_check(ND_BODY(node)); + if (r != 0) { + if (ND_IS_MARK1(ND_BODY(node))) + ND_STATUS_ADD(node, RECURSION); + } + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + if (en->type == BAG_MEMORY) { + if (ND_IS_MARK2(node)) + return 0; + else if (ND_IS_MARK1(node)) + return 1; /* recursion */ + else { + ND_STATUS_ADD(node, MARK2); + r = recursive_call_check(ND_BODY(node)); + ND_STATUS_REMOVE(node, MARK2); + } + } + else if (en->type == BAG_IF_ELSE) { + r = 0; + if (IS_NOT_NULL(en->te.Then)) { + r |= recursive_call_check(en->te.Then); + } + if (IS_NOT_NULL(en->te.Else)) { + r |= recursive_call_check(en->te.Else); + } + r |= recursive_call_check(ND_BODY(node)); + } + else { + r = recursive_call_check(ND_BODY(node)); + } + } + break; + + default: + r = 0; + break; + } + + return r; +} + +#define IN_RECURSION (1<<0) +#define FOUND_CALLED_NODE 1 + +static int +recursive_call_check_trav(Node* node, ParseEnv* env, int state) +{ + int r = 0; + + switch (ND_TYPE(node)) { + case ND_LIST: + case ND_ALT: + { + int ret; + do { + ret = recursive_call_check_trav(ND_CAR(node), env, state); + if (ret == FOUND_CALLED_NODE) r = FOUND_CALLED_NODE; + else if (ret < 0) return ret; + } while (IS_NOT_NULL(node = ND_CDR(node))); + } + break; + + case ND_QUANT: + r = recursive_call_check_trav(ND_BODY(node), env, state); + if (QUANT_(node)->upper == 0) { + if (r == FOUND_CALLED_NODE) + QUANT_(node)->include_referred = 1; + } + break; + + case ND_ANCHOR: + { + AnchorNode* an = ANCHOR_(node); + if (ANCHOR_HAS_BODY(an)) + r = recursive_call_check_trav(ND_ANCHOR_BODY(an), env, state); + } + break; + + case ND_BAG: + { + int ret; + int state1; + BagNode* en = BAG_(node); + + if (en->type == BAG_MEMORY) { + if (ND_IS_CALLED(node)) { + r = FOUND_CALLED_NODE; + goto check_recursion; + } + else if ((state & IN_RECURSION) != 0) { + check_recursion: + if (! ND_IS_RECURSION(node)) { + ND_STATUS_ADD(node, MARK1); + ret = recursive_call_check(ND_BODY(node)); + if (ret != 0) { + ND_STATUS_ADD(node, RECURSION); + MEM_STATUS_ON(env->backtrack_mem, en->m.regnum); + } + ND_STATUS_REMOVE(node, MARK1); + } + } + } + + state1 = state; + if (ND_IS_RECURSION(node)) + state1 |= IN_RECURSION; + + ret = recursive_call_check_trav(ND_BODY(node), env, state1); + if (ret == FOUND_CALLED_NODE) + r = FOUND_CALLED_NODE; + + if (en->type == BAG_IF_ELSE) { + if (IS_NOT_NULL(en->te.Then)) { + ret = recursive_call_check_trav(en->te.Then, env, state1); + if (ret == FOUND_CALLED_NODE) + r = FOUND_CALLED_NODE; + } + if (IS_NOT_NULL(en->te.Else)) { + ret = recursive_call_check_trav(en->te.Else, env, state1); + if (ret == FOUND_CALLED_NODE) + r = FOUND_CALLED_NODE; + } + } + } + break; + + default: + break; + } + + return r; +} + +#endif + +static void +remove_from_list(Node* prev, Node* a) +{ + if (ND_CDR(prev) != a) return ; + + ND_CDR(prev) = ND_CDR(a); + ND_CDR(a) = NULL_NODE; +} + +static int +reduce_string_list(Node* node, OnigEncoding enc) +{ + int r = 0; + + switch (ND_TYPE(node)) { + case ND_LIST: + { + Node* prev; + Node* curr; + Node* prev_node; + Node* next_node; + + prev = NULL_NODE; + do { + next_node = ND_CDR(node); + curr = ND_CAR(node); + if (ND_TYPE(curr) == ND_STRING) { + if (IS_NULL(prev) + || STR_(curr)->flag != STR_(prev)->flag + || ND_STATUS(curr) != ND_STATUS(prev)) { + prev = curr; + prev_node = node; + } + else { + r = node_str_node_cat(prev, curr); + if (r != 0) return r; + remove_from_list(prev_node, node); + onig_node_free(node); + } + } + else { + if (IS_NOT_NULL(prev)) { +#ifdef USE_CHECK_VALIDITY_OF_STRING_IN_TREE + StrNode* sn = STR_(prev); + if (! ONIGENC_IS_VALID_MBC_STRING(enc, sn->s, sn->end)) + return ONIGERR_INVALID_WIDE_CHAR_VALUE; +#endif + prev = NULL_NODE; + } + r = reduce_string_list(curr, enc); + if (r != 0) return r; + prev_node = node; + } + + node = next_node; + } while (r == 0 && IS_NOT_NULL(node)); + +#ifdef USE_CHECK_VALIDITY_OF_STRING_IN_TREE + if (IS_NOT_NULL(prev)) { + StrNode* sn = STR_(prev); + if (! ONIGENC_IS_VALID_MBC_STRING(enc, sn->s, sn->end)) + return ONIGERR_INVALID_WIDE_CHAR_VALUE; + } +#endif + } + break; + + case ND_ALT: + do { + r = reduce_string_list(ND_CAR(node), enc); + } while (r == 0 && IS_NOT_NULL(node = ND_CDR(node))); + break; + +#ifdef USE_CHECK_VALIDITY_OF_STRING_IN_TREE + case ND_STRING: + { + StrNode* sn = STR_(node); + if (! ONIGENC_IS_VALID_MBC_STRING(enc, sn->s, sn->end)) + return ONIGERR_INVALID_WIDE_CHAR_VALUE; + } + break; +#endif + + case ND_ANCHOR: + if (IS_NULL(ND_BODY(node))) + break; + /* fall */ + case ND_QUANT: + r = reduce_string_list(ND_BODY(node), enc); + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + r = reduce_string_list(ND_BODY(node), enc); + if (r != 0) return r; + + if (en->type == BAG_IF_ELSE) { + if (IS_NOT_NULL(en->te.Then)) { + r = reduce_string_list(en->te.Then, enc); + if (r != 0) return r; + } + if (IS_NOT_NULL(en->te.Else)) { + r = reduce_string_list(en->te.Else, enc); + if (r != 0) return r; + } + } + } + break; + + default: + break; + } + + return r; +} + + +#define IN_ALT (1<<0) +#define IN_NOT (1<<1) +#define IN_REAL_REPEAT (1<<2) +#define IN_VAR_REPEAT (1<<3) +#define IN_ZERO_REPEAT (1<<4) +#define IN_MULTI_ENTRY (1<<5) +#define IN_PREC_READ (1<<6) +#define IN_LOOK_BEHIND (1<<7) +#define IN_PEEK (1<<8) + +/* divide different length alternatives in look-behind. + (?<=A|B) ==> (?<=A)|(?<=B) + (? (?type; + + head = ND_ANCHOR_BODY(an); + np = ND_CAR(head); + node_swap(node, head); + ND_CAR(node) = head; + ND_BODY(head) = np; + + np = node; + while (IS_NOT_NULL(np = ND_CDR(np))) { + r = onig_node_copy(&insert_node, head); + if (r != 0) return r; + CHECK_NULL_RETURN_MEMERR(insert_node); + ND_BODY(insert_node) = ND_CAR(np); + ND_CAR(np) = insert_node; + } + + if (anc_type == ANCR_LOOK_BEHIND_NOT) { + np = node; + do { + ND_SET_TYPE(np, ND_LIST); /* alt -> list */ + } while (IS_NOT_NULL(np = ND_CDR(np))); + } + return 0; +} + +static int +node_reduce_in_look_behind(Node* node) +{ + NodeType type; + Node* body; + + if (ND_TYPE(node) != ND_QUANT) return 0; + + body = ND_BODY(node); + type = ND_TYPE(body); + if (type == ND_STRING || type == ND_CTYPE || + type == ND_CCLASS || type == ND_BACKREF) { + QuantNode* qn = QUANT_(node); + qn->upper = qn->lower; + if (qn->upper == 0) + return 1; /* removed */ + } + + return 0; +} + +static int +list_reduce_in_look_behind(Node* node) +{ + int r; + + switch (ND_TYPE(node)) { + case ND_QUANT: + r = node_reduce_in_look_behind(node); + if (r > 0) r = 0; + break; + + case ND_LIST: + do { + r = node_reduce_in_look_behind(ND_CAR(node)); + if (r <= 0) break; + } while (IS_NOT_NULL(node = ND_CDR(node))); + break; + + default: + r = 0; + break; + } + + return r; +} + +static int +alt_reduce_in_look_behind(Node* node, regex_t* reg, ParseEnv* env) +{ + int r; + + switch (ND_TYPE(node)) { + case ND_ALT: + do { + r = list_reduce_in_look_behind(ND_CAR(node)); + } while (r == 0 && IS_NOT_NULL(node = ND_CDR(node))); + break; + + default: + r = list_reduce_in_look_behind(node); + break; + } + + return r; +} + +static int tune_tree(Node* node, regex_t* reg, int state, ParseEnv* env); + +static int +tune_look_behind(Node* node, regex_t* reg, int state, ParseEnv* env) +{ + int r; + int state1; + int used; + MinMaxCharLen ci; + Node* body; + AnchorNode* an = ANCHOR_(node); + + used = FALSE; + r = check_node_in_look_behind(ND_ANCHOR_BODY(an), + an->type == ANCR_LOOK_BEHIND_NOT ? 1 : 0, + &used); + if (r < 0) return r; + if (r > 0) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN; + + if (an->type == ANCR_LOOK_BEHIND_NOT) + state1 = state | IN_NOT | IN_LOOK_BEHIND; + else + state1 = state | IN_LOOK_BEHIND; + + body = ND_ANCHOR_BODY(an); + /* Execute tune_tree(body) before call node_char_len(). + Because case-fold expansion must be done before node_char_len(). + */ + r = tune_tree(body, reg, state1, env); + if (r != 0) return r; + + r = alt_reduce_in_look_behind(body, reg, env); + if (r != 0) return r; + + r = node_char_len(body, reg, &ci, env); + if (r >= 0) { + /* #177: overflow in onigenc_step_back() */ + if ((ci.max != INFINITE_LEN && ci.max > LOOK_BEHIND_MAX_CHAR_LEN) + || ci.min > LOOK_BEHIND_MAX_CHAR_LEN) { + return ONIGERR_INVALID_LOOK_BEHIND_PATTERN; + } + + if (ci.min == 0 && ci.min_is_sure != FALSE && used == FALSE) { + if (an->type == ANCR_LOOK_BEHIND_NOT) + r = onig_node_reset_fail(node); + else + r = onig_node_reset_empty(node); + + return r; + } + + if (r == CHAR_LEN_TOP_ALT_FIXED) { + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND)) { + r = divide_look_behind_alternatives(node); + if (r == 0) + r = tune_tree(node, reg, state, env); + } + else if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_VARIABLE_LEN_LOOK_BEHIND)) + goto normal; + else + r = ONIGERR_INVALID_LOOK_BEHIND_PATTERN; + } + else { /* CHAR_LEN_NORMAL */ + normal: + if (ci.min == INFINITE_LEN) { + r = ONIGERR_INVALID_LOOK_BEHIND_PATTERN; + } + else { + if (ci.min != ci.max && + ! IS_SYNTAX_BV(env->syntax, ONIG_SYN_VARIABLE_LEN_LOOK_BEHIND)) { + r = ONIGERR_INVALID_LOOK_BEHIND_PATTERN; + } + else { + Node* tail; + + /* check lead_node is already set by double call after + divide_look_behind_alternatives() */ + if (IS_NULL(an->lead_node)) { + an->char_min_len = ci.min; + an->char_max_len = ci.max; + r = get_tree_tail_literal(body, &tail, reg, 0); + if (r == GET_VALUE_FOUND) { + r = onig_node_copy(&(an->lead_node), tail); + if (r != 0) return r; + } + } + r = ONIG_NORMAL; + } + } + } + } + + return r; +} + +static int +tune_next(Node* node, Node* next_node, regex_t* reg) +{ + int called; + NodeType type; + + called = FALSE; + + retry: + type = ND_TYPE(node); + if (type == ND_QUANT) { + QuantNode* qn = QUANT_(node); + if (qn->greedy && IS_INFINITE_REPEAT(qn->upper)) { +#ifdef USE_QUANT_PEEK_NEXT + if (called == FALSE) { + Node* n = get_tree_head_literal(next_node, 1, reg); + /* '\0': for UTF-16BE etc... */ + if (IS_NOT_NULL(n) && STR_(n)->s[0] != '\0') { + qn->next_head_exact = n; + } + } +#endif + /* automatic posseivation a*b ==> (?>a*)b */ + if (qn->lower <= 1) { + if (is_strict_real_node(ND_BODY(node))) { + Node *x, *y; + x = get_tree_head_literal(ND_BODY(node), 0, reg); + if (IS_NOT_NULL(x)) { + y = get_tree_head_literal(next_node, 0, reg); + if (IS_NOT_NULL(y) && is_exclusive(x, y, reg)) { + Node* en = onig_node_new_bag(BAG_STOP_BACKTRACK); + CHECK_NULL_RETURN_MEMERR(en); + ND_STATUS_ADD(en, STRICT_REAL_REPEAT); + node_swap(node, en); + ND_BODY(node) = en; + } + } + } + } + } + } + else if (type == ND_BAG) { + BagNode* en = BAG_(node); + if (en->type == BAG_MEMORY) { + if (ND_IS_CALLED(node)) + called = TRUE; + node = ND_BODY(node); + goto retry; + } + } + return 0; +} + + +static int +is_all_code_len_1_items(int n, OnigCaseFoldCodeItem items[]) +{ + int i; + + for (i = 0; i < n; i++) { + OnigCaseFoldCodeItem* item = items + i; + if (item->code_len != 1) return 0; + } + + return 1; +} + +static int +get_min_max_byte_len_case_fold_items(int n, OnigCaseFoldCodeItem items[], + OnigLen* rmin, OnigLen* rmax) +{ + int i; + OnigLen len, minlen, maxlen; + + minlen = INFINITE_LEN; + maxlen = 0; + for (i = 0; i < n; i++) { + OnigCaseFoldCodeItem* item = items + i; + + len = item->byte_len; + if (len < minlen) minlen = len; + if (len > maxlen) maxlen = len; + } + + *rmin = minlen; + *rmax = maxlen; + return 0; +} + +static int +make_code_list_to_string(Node** rnode, OnigEncoding enc, + int n, OnigCodePoint codes[]) +{ + int r, i, len; + Node* node; + UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN]; + + *rnode = NULL_NODE; + node = onig_node_new_str(NULL, NULL); + CHECK_NULL_RETURN_MEMERR(node); + + for (i = 0; i < n; i++) { + len = ONIGENC_CODE_TO_MBC(enc, codes[i], buf); + if (len < 0) { + r = len; + goto err; + } + + r = onig_node_str_cat(node, buf, buf + len); + if (r != 0) goto err; + } + + *rnode = node; + return 0; + + err: + onig_node_free(node); + return r; +} + +static int +unravel_cf_node_add(Node** rlist, Node* add) +{ + Node *list; + + list = *rlist; + if (IS_NULL(list)) { + list = onig_node_new_list(add, NULL); + CHECK_NULL_RETURN_MEMERR(list); + *rlist = list; + } + else { + Node* r = node_list_add(list, add); + CHECK_NULL_RETURN_MEMERR(r); + } + + return 0; +} + +static int +unravel_cf_string_add(Node** rlist, Node** rsn, UChar* s, UChar* end, + unsigned int flag) +{ + int r; + Node *sn, *list; + + list = *rlist; + sn = *rsn; + + if (IS_NOT_NULL(sn) && STR_(sn)->flag == flag) { + r = onig_node_str_cat(sn, s, end); + } + else { + sn = onig_node_new_str(s, end); + CHECK_NULL_RETURN_MEMERR(sn); + + STR_(sn)->flag = flag; + r = unravel_cf_node_add(&list, sn); + } + + if (r == 0) { + *rlist = list; + *rsn = sn; + } + return r; +} + +static int +unravel_cf_string_alt_or_cc_add(Node** rlist, int n, + OnigCaseFoldCodeItem items[], OnigEncoding enc, + OnigCaseFoldType case_fold_flag, UChar* s, UChar* end) +{ + int r, i; + Node* node; + + if (is_all_code_len_1_items(n, items)) { + OnigCodePoint codes[14];/* least ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM + 1 */ + + codes[0] = ONIGENC_MBC_TO_CODE(enc, s, end); + for (i = 0; i < n; i++) { + OnigCaseFoldCodeItem* item = items + i; + codes[i+1] = item->code[0]; + } + r = onig_new_cclass_with_code_list(&node, enc, n + 1, codes); + if (r != 0) return r; + } + else { + Node *snode, *alt, *curr; + + snode = onig_node_new_str(s, end); + CHECK_NULL_RETURN_MEMERR(snode); + node = curr = onig_node_new_alt(snode, NULL_NODE); + if (IS_NULL(curr)) { + onig_node_free(snode); + return ONIGERR_MEMORY; + } + + r = 0; + for (i = 0; i < n; i++) { + OnigCaseFoldCodeItem* item = items + i; + r = make_code_list_to_string(&snode, enc, item->code_len, item->code); + if (r != 0) { + onig_node_free(node); + return r; + } + + alt = onig_node_new_alt(snode, NULL_NODE); + if (IS_NULL(alt)) { + onig_node_free(snode); + onig_node_free(node); + return ONIGERR_MEMORY; + } + + ND_CDR(curr) = alt; + curr = alt; + } + } + + r = unravel_cf_node_add(rlist, node); + if (r != 0) onig_node_free(node); + return r; +} + +static int +unravel_cf_look_behind_add(Node** rlist, Node** rsn, + int n, OnigCaseFoldCodeItem items[], OnigEncoding enc, + UChar* s, OnigLen one_len) +{ + int r, i, found; + + found = FALSE; + for (i = 0; i < n; i++) { + OnigCaseFoldCodeItem* item = items + i; + if (item->byte_len == one_len) { + if (item->code_len == 1) { + found = TRUE; + break; + } + } + } + + if (found == FALSE) { + r = unravel_cf_string_add(rlist, rsn, s, s + one_len, 0 /* flag */); + } + else { + Node* node; + OnigCodePoint codes[14];/* least ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM + 1 */ + + found = 0; + codes[found++] = ONIGENC_MBC_TO_CODE(enc, s, s + one_len); + for (i = 0; i < n; i++) { + OnigCaseFoldCodeItem* item = items + i; + if (item->byte_len == one_len) { + if (item->code_len == 1) { + codes[found++] = item->code[0]; + } + } + } + r = onig_new_cclass_with_code_list(&node, enc, found, codes); + if (r != 0) return r; + + r = unravel_cf_node_add(rlist, node); + if (r != 0) onig_node_free(node); + + *rsn = NULL_NODE; + } + + return r; +} + +static int +unravel_case_fold_string(Node* node, regex_t* reg, int state) +{ + int r, n, in_look_behind; + OnigLen min_len, max_len, one_len; + UChar *start, *end, *p, *q; + StrNode* snode; + Node *sn, *list; + OnigEncoding enc; + OnigCaseFoldCodeItem items[ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM]; + + if (ND_STRING_IS_CASE_EXPANDED(node)) return 0; + + ND_STATUS_REMOVE(node, IGNORECASE); + snode = STR_(node); + start = snode->s; + end = snode->end; + if (start >= end) return 0; + + in_look_behind = (state & IN_LOOK_BEHIND) != 0; + enc = reg->enc; + + list = sn = NULL_NODE; + p = start; + while (p < end) { + n = ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc, reg->case_fold_flag, p, end, + items); + if (n < 0) { + r = n; + goto err; + } + + one_len = (OnigLen )enclen(enc, p); + if (n == 0) { + q = p + one_len; + if (q > end) q = end; + r = unravel_cf_string_add(&list, &sn, p, q, 0 /* flag */); + if (r != 0) goto err; + } + else { + if (in_look_behind != 0) { + q = p + one_len; + if (items[0].byte_len != one_len) { + r = ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc, reg->case_fold_flag, p, q, + items); + if (r < 0) goto err; + n = r; + } + r = unravel_cf_look_behind_add(&list, &sn, n, items, enc, p, one_len); + if (r != 0) goto err; + } + else { + get_min_max_byte_len_case_fold_items(n, items, &min_len, &max_len); + if (min_len != max_len) { + r = ONIGERR_PARSER_BUG; + goto err; + } + + q = p + max_len; + r = unravel_cf_string_alt_or_cc_add(&list, n, items, enc, + reg->case_fold_flag, p, q); + if (r != 0) goto err; + sn = NULL_NODE; + } + } + + p = q; + } + + if (IS_NOT_NULL(list)) { + if (node_list_len(list) == 1) { + node_swap(node, ND_CAR(list)); + } + else { + node_swap(node, list); + } + onig_node_free(list); + } + else { + node_swap(node, sn); + onig_node_free(sn); + } + return 0; + + err: + if (IS_NOT_NULL(list)) + onig_node_free(list); + else if (IS_NOT_NULL(sn)) + onig_node_free(sn); + + return r; +} + +#ifdef USE_RIGID_CHECK_CAPTURES_IN_EMPTY_REPEAT +static enum BodyEmptyType +quantifiers_memory_node_info(Node* node) +{ + int r = BODY_MAY_BE_EMPTY; + + switch (ND_TYPE(node)) { + case ND_LIST: + case ND_ALT: + { + int v; + do { + v = quantifiers_memory_node_info(ND_CAR(node)); + if (v > r) r = v; + } while (IS_NOT_NULL(node = ND_CDR(node))); + } + break; + +#ifdef USE_CALL + case ND_CALL: + if (ND_IS_RECURSION(node)) { + return BODY_MAY_BE_EMPTY_REC; /* tiny version */ + } + else + r = quantifiers_memory_node_info(ND_BODY(node)); + break; +#endif + + case ND_QUANT: + { + QuantNode* qn = QUANT_(node); + if (qn->upper != 0) { + r = quantifiers_memory_node_info(ND_BODY(node)); + } + } + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + switch (en->type) { + case BAG_MEMORY: + if (ND_IS_RECURSION(node)) { + return BODY_MAY_BE_EMPTY_REC; + } + return BODY_MAY_BE_EMPTY_MEM; + break; + + case BAG_OPTION: + case BAG_STOP_BACKTRACK: + r = quantifiers_memory_node_info(ND_BODY(node)); + break; + case BAG_IF_ELSE: + { + int v; + r = quantifiers_memory_node_info(ND_BODY(node)); + if (IS_NOT_NULL(en->te.Then)) { + v = quantifiers_memory_node_info(en->te.Then); + if (v > r) r = v; + } + if (IS_NOT_NULL(en->te.Else)) { + v = quantifiers_memory_node_info(en->te.Else); + if (v > r) r = v; + } + } + break; + } + } + break; + + case ND_BACKREF: + case ND_STRING: + case ND_CTYPE: + case ND_CCLASS: + case ND_ANCHOR: + case ND_GIMMICK: + default: + break; + } + + return r; +} +#endif /* USE_RIGID_CHECK_CAPTURES_IN_EMPTY_REPEAT */ + + +#ifdef USE_CALL + +#ifdef __GNUC__ +__inline +#endif +static int +check_call_reference(CallNode* cn, ParseEnv* env, int state) +{ + MemEnv* mem_env = PARSEENV_MEMENV(env); + + if (cn->by_number != 0) { + int gnum = cn->called_gnum; + + if (env->num_named > 0 && + IS_SYNTAX_BV(env->syntax, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP) && + ! OPTON_CAPTURE_GROUP(env->options)) { + return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED; + } + + if (gnum > env->num_mem) { + onig_scan_env_set_error_string(env, ONIGERR_UNDEFINED_GROUP_REFERENCE, + cn->name, cn->name_end); + return ONIGERR_UNDEFINED_GROUP_REFERENCE; + } + + set_call_attr: + ND_CALL_BODY(cn) = mem_env[cn->called_gnum].mem_node; + if (IS_NULL(ND_CALL_BODY(cn))) { + onig_scan_env_set_error_string(env, ONIGERR_UNDEFINED_NAME_REFERENCE, + cn->name, cn->name_end); + return ONIGERR_UNDEFINED_NAME_REFERENCE; + } + + ND_STATUS_ADD(ND_CALL_BODY(cn), REFERENCED); + } + else { + int *refs; + + int n = onig_name_to_group_numbers(env->reg, cn->name, cn->name_end, &refs); + if (n <= 0) { + onig_scan_env_set_error_string(env, ONIGERR_UNDEFINED_NAME_REFERENCE, + cn->name, cn->name_end); + return ONIGERR_UNDEFINED_NAME_REFERENCE; + } + else if (n > 1) { + onig_scan_env_set_error_string(env, ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL, + cn->name, cn->name_end); + return ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL; + } + else { + cn->called_gnum = refs[0]; + goto set_call_attr; + } + } + + return 0; +} + +#ifdef USE_WHOLE_OPTIONS +static int +check_whole_options_position(Node* node /* root */, ParseEnv* env) +{ + int is_list; + + is_list = FALSE; + +#ifdef USE_CALL + if ((env->flags & PE_FLAG_HAS_CALL_ZERO) != 0) { + node = ND_BODY(node); + } +#endif + + start: + switch (ND_TYPE(node)) { + case ND_LIST: + if (IS_NOT_NULL(ND_CDR(node))) + is_list = TRUE; + + node = ND_CAR(node); + goto start; + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + if (en->type == BAG_OPTION) { + if (ND_IS_WHOLE_OPTIONS(node)) { + if (is_list == TRUE && IS_NOT_NULL(ND_BODY(node))) + break; + + return 0; + } + } + } + break; + + default: + break; + } + + return ONIGERR_INVALID_GROUP_OPTION; +} +#endif + +static void +tune_call2_call(Node* node) +{ + switch (ND_TYPE(node)) { + case ND_LIST: + case ND_ALT: + do { + tune_call2_call(ND_CAR(node)); + } while (IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_QUANT: + tune_call2_call(ND_BODY(node)); + break; + + case ND_ANCHOR: + if (ANCHOR_HAS_BODY(ANCHOR_(node))) + tune_call2_call(ND_BODY(node)); + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + if (en->type == BAG_MEMORY) { + if (! ND_IS_MARK1(node)) { + ND_STATUS_ADD(node, MARK1); + tune_call2_call(ND_BODY(node)); + ND_STATUS_REMOVE(node, MARK1); + } + } + else if (en->type == BAG_IF_ELSE) { + tune_call2_call(ND_BODY(node)); + if (IS_NOT_NULL(en->te.Then)) + tune_call2_call(en->te.Then); + if (IS_NOT_NULL(en->te.Else)) + tune_call2_call(en->te.Else); + } + else { + tune_call2_call(ND_BODY(node)); + } + } + break; + + case ND_CALL: + if (! ND_IS_MARK1(node)) { + ND_STATUS_ADD(node, MARK1); + { + CallNode* cn = CALL_(node); + Node* called = ND_CALL_BODY(cn); + + cn->entry_count++; + + ND_STATUS_ADD(called, CALLED); + BAG_(called)->m.entry_count++; + tune_call2_call(called); + } + ND_STATUS_REMOVE(node, MARK1); + } + break; + + default: + break; + } +} + +static int +tune_call(Node* node, ParseEnv* env, int state) +{ + int r; + + switch (ND_TYPE(node)) { + case ND_LIST: + case ND_ALT: + do { + r = tune_call(ND_CAR(node), env, state); + } while (r == 0 && IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_QUANT: + if (QUANT_(node)->upper == 0) + state |= IN_ZERO_REPEAT; + + r = tune_call(ND_BODY(node), env, state); + break; + + case ND_ANCHOR: + if (ANCHOR_HAS_BODY(ANCHOR_(node))) + r = tune_call(ND_BODY(node), env, state); + else + r = 0; + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + if (en->type == BAG_MEMORY) { + if ((state & IN_ZERO_REPEAT) != 0) { + ND_STATUS_ADD(node, IN_ZERO_REPEAT); + BAG_(node)->m.entry_count--; + } + r = tune_call(ND_BODY(node), env, state); + } + else if (en->type == BAG_IF_ELSE) { + r = tune_call(ND_BODY(node), env, state); + if (r != 0) return r; + if (IS_NOT_NULL(en->te.Then)) { + r = tune_call(en->te.Then, env, state); + if (r != 0) return r; + } + if (IS_NOT_NULL(en->te.Else)) + r = tune_call(en->te.Else, env, state); + } + else + r = tune_call(ND_BODY(node), env, state); + } + break; + + case ND_CALL: + if ((state & IN_ZERO_REPEAT) != 0) { + ND_STATUS_ADD(node, IN_ZERO_REPEAT); + CALL_(node)->entry_count--; + } + + r = check_call_reference(CALL_(node), env, state); + break; + + default: + r = 0; + break; + } + + return r; +} + +static int +tune_call2(Node* node) +{ + int r = 0; + + switch (ND_TYPE(node)) { + case ND_LIST: + case ND_ALT: + do { + r = tune_call2(ND_CAR(node)); + } while (r == 0 && IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_QUANT: + if (QUANT_(node)->upper != 0) + r = tune_call2(ND_BODY(node)); + break; + + case ND_ANCHOR: + if (ANCHOR_HAS_BODY(ANCHOR_(node))) + r = tune_call2(ND_BODY(node)); + break; + + case ND_BAG: + if (! ND_IS_IN_ZERO_REPEAT(node)) + r = tune_call2(ND_BODY(node)); + + { + BagNode* en = BAG_(node); + + if (r != 0) return r; + if (en->type == BAG_IF_ELSE) { + if (IS_NOT_NULL(en->te.Then)) { + r = tune_call2(en->te.Then); + if (r != 0) return r; + } + if (IS_NOT_NULL(en->te.Else)) + r = tune_call2(en->te.Else); + } + } + break; + + case ND_CALL: + if (! ND_IS_IN_ZERO_REPEAT(node)) { + tune_call2_call(node); + } + break; + + default: + break; + } + + return r; +} + + +static void +tune_called_state_call(Node* node, int state) +{ + switch (ND_TYPE(node)) { + case ND_ALT: + state |= IN_ALT; + /* fall */ + case ND_LIST: + do { + tune_called_state_call(ND_CAR(node), state); + } while (IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_QUANT: + { + QuantNode* qn = QUANT_(node); + + if (IS_INFINITE_REPEAT(qn->upper) || qn->upper >= 2) + state |= IN_REAL_REPEAT; + if (qn->lower != qn->upper) + state |= IN_VAR_REPEAT; + if ((state & IN_PEEK) != 0) + ND_STATUS_ADD(node, INPEEK); + + tune_called_state_call(ND_QUANT_BODY(qn), state); + } + break; + + case ND_ANCHOR: + { + AnchorNode* an = ANCHOR_(node); + + switch (an->type) { + case ANCR_PREC_READ_NOT: + case ANCR_LOOK_BEHIND_NOT: + state |= (IN_NOT | IN_PEEK); + tune_called_state_call(ND_ANCHOR_BODY(an), state); + break; + case ANCR_PREC_READ: + case ANCR_LOOK_BEHIND: + state |= IN_PEEK; + tune_called_state_call(ND_ANCHOR_BODY(an), state); + break; + default: + break; + } + } + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + if (en->type == BAG_MEMORY) { + if (ND_IS_MARK1(node)) { + if ((~en->m.called_state & state) != 0) { + en->m.called_state |= state; + tune_called_state_call(ND_BODY(node), state); + } + } + else { + ND_STATUS_ADD(node, MARK1); + en->m.called_state |= state; + tune_called_state_call(ND_BODY(node), state); + ND_STATUS_REMOVE(node, MARK1); + } + } + else if (en->type == BAG_IF_ELSE) { + state |= IN_ALT; + tune_called_state_call(ND_BODY(node), state); + if (IS_NOT_NULL(en->te.Then)) { + tune_called_state_call(en->te.Then, state); + } + if (IS_NOT_NULL(en->te.Else)) + tune_called_state_call(en->te.Else, state); + } + else { + tune_called_state_call(ND_BODY(node), state); + } + } + break; + + case ND_CALL: + if ((state & IN_PEEK) != 0) + ND_STATUS_ADD(node, INPEEK); + if ((state & IN_REAL_REPEAT) != 0) + ND_STATUS_ADD(node, IN_REAL_REPEAT); + + tune_called_state_call(ND_BODY(node), state); + break; + + default: + break; + } +} + +static void +tune_called_state(Node* node, int state) +{ + switch (ND_TYPE(node)) { + case ND_ALT: + state |= IN_ALT; + /* fall */ + case ND_LIST: + do { + tune_called_state(ND_CAR(node), state); + } while (IS_NOT_NULL(node = ND_CDR(node))); + break; + +#ifdef USE_CALL + case ND_CALL: + if ((state & IN_PEEK) != 0) + ND_STATUS_ADD(node, INPEEK); + if ((state & IN_REAL_REPEAT) != 0) + ND_STATUS_ADD(node, IN_REAL_REPEAT); + + tune_called_state_call(node, state); + break; +#endif + + case ND_BAG: + { + BagNode* en = BAG_(node); + + switch (en->type) { + case BAG_MEMORY: + if (en->m.entry_count > 1) + state |= IN_MULTI_ENTRY; + + en->m.called_state |= state; + /* fall */ + case BAG_OPTION: + case BAG_STOP_BACKTRACK: + tune_called_state(ND_BODY(node), state); + break; + case BAG_IF_ELSE: + state |= IN_ALT; + tune_called_state(ND_BODY(node), state); + if (IS_NOT_NULL(en->te.Then)) + tune_called_state(en->te.Then, state); + if (IS_NOT_NULL(en->te.Else)) + tune_called_state(en->te.Else, state); + break; + } + } + break; + + case ND_QUANT: + { + QuantNode* qn = QUANT_(node); + + if (IS_INFINITE_REPEAT(qn->upper) || qn->upper >= 2) + state |= IN_REAL_REPEAT; + if (qn->lower != qn->upper) + state |= IN_VAR_REPEAT; + if ((state & IN_PEEK) != 0) + ND_STATUS_ADD(node, INPEEK); + + tune_called_state(ND_QUANT_BODY(qn), state); + } + break; + + case ND_ANCHOR: + { + AnchorNode* an = ANCHOR_(node); + + switch (an->type) { + case ANCR_PREC_READ_NOT: + case ANCR_LOOK_BEHIND_NOT: + state |= (IN_NOT | IN_PEEK); + tune_called_state(ND_ANCHOR_BODY(an), state); + break; + case ANCR_PREC_READ: + case ANCR_LOOK_BEHIND: + state |= IN_PEEK; + tune_called_state(ND_ANCHOR_BODY(an), state); + break; + default: + break; + } + } + break; + + case ND_BACKREF: + case ND_STRING: + case ND_CTYPE: + case ND_CCLASS: + case ND_GIMMICK: + default: + break; + } +} + +#endif /* USE_CALL */ + + +#ifdef __GNUC__ +__inline +#endif +static int +tune_anchor(Node* node, regex_t* reg, int state, ParseEnv* env) +{ + int r; + AnchorNode* an = ANCHOR_(node); + + switch (an->type) { + case ANCR_PREC_READ: + r = tune_tree(ND_ANCHOR_BODY(an), reg, (state | IN_PREC_READ), env); + break; + case ANCR_PREC_READ_NOT: + r = tune_tree(ND_ANCHOR_BODY(an), reg, (state | IN_PREC_READ | IN_NOT), + env); + break; + + case ANCR_LOOK_BEHIND: + case ANCR_LOOK_BEHIND_NOT: + r = tune_look_behind(node, reg, state, env); + break; + + default: + r = 0; + break; + } + + return r; +} + +#ifdef __GNUC__ +__inline +#endif +static int +tune_quant(Node* node, regex_t* reg, int state, ParseEnv* env) +{ + int r; + QuantNode* qn = QUANT_(node); + Node* body = ND_BODY(node); + + if ((state & IN_REAL_REPEAT) != 0) { + ND_STATUS_ADD(node, IN_REAL_REPEAT); + } + if ((state & IN_MULTI_ENTRY) != 0) { + ND_STATUS_ADD(node, IN_MULTI_ENTRY); + } + + if (IS_INFINITE_REPEAT(qn->upper) || qn->upper >= 1) { + OnigLen d = node_min_byte_len(body, env); + if (d == 0) { +#ifdef USE_RIGID_CHECK_CAPTURES_IN_EMPTY_REPEAT + qn->emptiness = quantifiers_memory_node_info(body); +#else + qn->emptiness = BODY_MAY_BE_EMPTY; +#endif + } + } + + if (IS_INFINITE_REPEAT(qn->upper) || qn->upper >= 2) + state |= IN_REAL_REPEAT; + if (qn->lower != qn->upper) + state |= IN_VAR_REPEAT; + + r = tune_tree(body, reg, state, env); + if (r != 0) return r; + + /* expand string */ +#define EXPAND_STRING_MAX_LENGTH 100 + if (ND_TYPE(body) == ND_STRING) { + if (!IS_INFINITE_REPEAT(qn->lower) && qn->lower == qn->upper && + qn->lower > 1 && qn->lower <= EXPAND_STRING_MAX_LENGTH) { + int len = ND_STRING_LEN(body); + + if (len * qn->lower <= EXPAND_STRING_MAX_LENGTH) { + int i, n = qn->lower; + node_conv_to_str_node(node, body); + for (i = 0; i < n; i++) { + r = node_str_node_cat(node, body); + if (r != 0) return r; + } + onig_node_free(body); + return r; + } + } + } + + if (qn->greedy && (qn->emptiness == BODY_IS_NOT_EMPTY)) { + if (ND_TYPE(body) == ND_QUANT) { + QuantNode* tqn = QUANT_(body); + if (IS_NOT_NULL(tqn->head_exact)) { + qn->head_exact = tqn->head_exact; + tqn->head_exact = NULL; + } + } + else { + qn->head_exact = get_tree_head_literal(ND_BODY(node), 1, reg); + } + } + + return r; +} + +/* tune_tree does the following work. + 1. check empty loop. (set qn->emptiness) + 2. expand ignore-case in char class. + 3. set memory status bit flags. (reg->mem_stats) + 4. set qn->head_exact for [push, exact] -> [push_or_jump_exact1, exact]. + 5. find invalid patterns in look-behind. + 6. expand repeated string. + */ +static int +tune_tree(Node* node, regex_t* reg, int state, ParseEnv* env) +{ + int r = 0; + + switch (ND_TYPE(node)) { + case ND_LIST: + { + Node* prev = NULL_NODE; + do { + r = tune_tree(ND_CAR(node), reg, state, env); + if (IS_NOT_NULL(prev) && r == 0) { + r = tune_next(prev, ND_CAR(node), reg); + } + prev = ND_CAR(node); + } while (r == 0 && IS_NOT_NULL(node = ND_CDR(node))); + } + break; + + case ND_ALT: + do { + r = tune_tree(ND_CAR(node), reg, (state | IN_ALT), env); + } while (r == 0 && IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_STRING: + if (ND_IS_REAL_IGNORECASE(node)) { + r = unravel_case_fold_string(node, reg, state); + } + break; + + case ND_BACKREF: + { + int i; + int* p; + BackRefNode* br = BACKREF_(node); + p = BACKREFS_P(br); + for (i = 0; i < br->back_num; i++) { + if (p[i] > env->num_mem) return ONIGERR_INVALID_BACKREF; + MEM_STATUS_ON(env->backrefed_mem, p[i]); +#if 0 +#ifdef USE_BACKREF_WITH_LEVEL + if (ND_IS_NEST_LEVEL(node)) { + MEM_STATUS_ON(env->backtrack_mem, p[i]); + } +#endif +#else + /* More precisely, it should be checked whether alt/repeat exists before + the subject capture node, and then this backreference position + exists before (or in) the capture node. */ + MEM_STATUS_ON(env->backtrack_mem, p[i]); +#endif + } + } + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + switch (en->type) { + case BAG_OPTION: + { + OnigOptionType options = reg->options; + reg->options = BAG_(node)->o.options; + r = tune_tree(ND_BODY(node), reg, state, env); + reg->options = options; + } + break; + + case BAG_MEMORY: +#ifdef USE_CALL + state |= en->m.called_state; +#endif + + if ((state & (IN_ALT | IN_NOT | IN_VAR_REPEAT | IN_MULTI_ENTRY)) != 0 + || ND_IS_RECURSION(node)) { + MEM_STATUS_ON(env->backtrack_mem, en->m.regnum); + } + r = tune_tree(ND_BODY(node), reg, state, env); + break; + + case BAG_STOP_BACKTRACK: + { + Node* target = ND_BODY(node); + r = tune_tree(target, reg, state, env); + if (ND_TYPE(target) == ND_QUANT) { + QuantNode* tqn = QUANT_(target); + if (IS_INFINITE_REPEAT(tqn->upper) && tqn->lower <= 1 && + tqn->greedy != 0) { /* (?>a*), a*+ etc... */ + if (is_strict_real_node(ND_BODY(target))) + ND_STATUS_ADD(node, STRICT_REAL_REPEAT); + } + } + } + break; + + case BAG_IF_ELSE: + r = tune_tree(ND_BODY(node), reg, (state | IN_ALT), env); + if (r != 0) return r; + if (IS_NOT_NULL(en->te.Then)) { + r = tune_tree(en->te.Then, reg, (state | IN_ALT), env); + if (r != 0) return r; + } + if (IS_NOT_NULL(en->te.Else)) + r = tune_tree(en->te.Else, reg, (state | IN_ALT), env); + break; + } + } + break; + + case ND_QUANT: + if ((state & (IN_PREC_READ | IN_LOOK_BEHIND)) != 0) + ND_STATUS_ADD(node, INPEEK); + + r = tune_quant(node, reg, state, env); + break; + + case ND_ANCHOR: + r = tune_anchor(node, reg, state, env); + break; + +#ifdef USE_CALL + case ND_CALL: +#endif + case ND_CTYPE: + case ND_CCLASS: + case ND_GIMMICK: + default: + break; + } + + return r; +} + +#ifndef ONIG_DONT_OPTIMIZE +static int +set_sunday_quick_search_or_bmh_skip_table(regex_t* reg, int case_expand, + UChar* s, UChar* end, + UChar skip[], int* roffset) +{ + int i, j, k, len, offset; + int n, clen; + UChar* p; + OnigEncoding enc; + OnigCaseFoldCodeItem items[ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM]; + UChar buf[ONIGENC_MBC_CASE_FOLD_MAXLEN]; + + enc = reg->enc; + offset = ENC_GET_SKIP_OFFSET(enc); + if (offset == ENC_SKIP_OFFSET_1_OR_0) { + UChar* p = s; + while (1) { + len = enclen(enc, p); + if (p + len >= end) { + if (len == 1) offset = 1; + else offset = 0; + break; + } + p += len; + } + } + + len = (int )(end - s); + if (len + offset >= UCHAR_MAX) + return ONIGERR_PARSER_BUG; + + *roffset = offset; + + for (i = 0; i < CHAR_MAP_SIZE; i++) { + skip[i] = (UChar )(len + offset); + } + + for (p = s; p < end; ) { + int z; + + clen = enclen(enc, p); + if (p + clen > end) clen = (int )(end - p); + + len = (int )(end - p); + for (j = 0; j < clen; j++) { + z = len - j + (offset - 1); + if (z <= 0) break; + skip[p[j]] = z; + } + + if (case_expand != 0) { + n = ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc, reg->case_fold_flag, + p, end, items); + for (k = 0; k < n; k++) { + ONIGENC_CODE_TO_MBC(enc, items[k].code[0], buf); + for (j = 0; j < clen; j++) { + z = len - j + (offset - 1); + if (z <= 0) break; + if (skip[buf[j]] > z) + skip[buf[j]] = z; + } + } + } + + p += clen; + } + + return 0; +} +#endif + + +#define OPT_EXACT_MAXLEN 24 + +#if OPT_EXACT_MAXLEN >= UCHAR_MAX +#error Too big OPT_EXACT_MAXLEN +#endif + +typedef struct { + MinMaxLen mm; + OnigEncoding enc; + OnigCaseFoldType case_fold_flag; + ParseEnv* scan_env; +} OptEnv; + +typedef struct { + int left; + int right; +} OptAnc; + +typedef struct { + MinMaxLen mm; /* position */ + OptAnc anc; + int reach_end; + int len; + UChar s[OPT_EXACT_MAXLEN]; +} OptStr; + +typedef struct { + MinMaxLen mm; /* position */ + OptAnc anc; + int value; /* weighted value */ + UChar map[CHAR_MAP_SIZE]; +} OptMap; + +typedef struct { + MinMaxLen len; + OptAnc anc; + OptStr sb; /* boundary */ + OptStr sm; /* middle */ + OptStr spr; /* prec read (?=...) */ + OptMap map; /* boundary */ +} OptNode; + + +#ifndef ONIG_DONT_OPTIMIZE + +static int +map_position_value(OnigEncoding enc, int i) +{ + static const short int Vals[] = { + 5, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 1, 1, 10, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 12, 4, 7, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, + 5, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, 5, 5, + 5, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 1 + }; + + if (i < (int )(sizeof(Vals)/sizeof(Vals[0]))) { + if (i == 0 && ONIGENC_MBC_MINLEN(enc) > 1) + return 20; + else + return (int )Vals[i]; + } + else + return 4; /* Take it easy. */ +} + +static int +distance_value(MinMaxLen* mm) +{ + /* 1000 / (min-max-dist + 1) */ + static const short int dist_vals[] = { + 1000, 500, 333, 250, 200, 167, 143, 125, 111, 100, + 91, 83, 77, 71, 67, 63, 59, 56, 53, 50, + 48, 45, 43, 42, 40, 38, 37, 36, 34, 33, + 32, 31, 30, 29, 29, 28, 27, 26, 26, 25, + 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, + 20, 19, 19, 19, 18, 18, 18, 17, 17, 17, + 16, 16, 16, 16, 15, 15, 15, 15, 14, 14, + 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, + 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 10, 10, 10, 10, 10 + }; + + OnigLen d; + + if (mm->max == INFINITE_LEN) return 0; + + d = mm->max - mm->min; + if (d < (OnigLen )(sizeof(dist_vals)/sizeof(dist_vals[0]))) + /* return dist_vals[d] * 16 / (mm->min + 12); */ + return (int )dist_vals[d]; + else + return 1; +} + +static int +comp_distance_value(MinMaxLen* d1, MinMaxLen* d2, int v1, int v2) +{ + if (v2 <= 0) return -1; + if (v1 <= 0) return 1; + + v1 *= distance_value(d1); + v2 *= distance_value(d2); + + if (v2 > v1) return 1; + if (v2 < v1) return -1; + + if (d2->min < d1->min) return 1; + if (d2->min > d1->min) return -1; + return 0; +} + +static void +copy_opt_env(OptEnv* to, OptEnv* from) +{ + *to = *from; +} + +static void +clear_opt_anc_info(OptAnc* a) +{ + a->left = 0; + a->right = 0; +} + +static void +copy_opt_anc_info(OptAnc* to, OptAnc* from) +{ + *to = *from; +} + +static void +concat_opt_anc_info(OptAnc* to, OptAnc* left, OptAnc* right, + OnigLen left_len, OnigLen right_len) +{ + clear_opt_anc_info(to); + + to->left = left->left; + if (left_len == 0) { + to->left |= right->left; + } + + to->right = right->right; + if (right_len == 0) { + to->right |= left->right; + } + else { + to->right |= (left->right & ANCR_PREC_READ_NOT); + } +} + +static int +is_left(int a) +{ + if (a == ANCR_END_BUF || a == ANCR_SEMI_END_BUF || + a == ANCR_END_LINE || a == ANCR_PREC_READ || a == ANCR_PREC_READ_NOT) + return 0; + + return 1; +} + +static int +is_set_opt_anc_info(OptAnc* to, int anc) +{ + if ((to->left & anc) != 0) return 1; + + return ((to->right & anc) != 0 ? 1 : 0); +} + +static void +add_opt_anc_info(OptAnc* to, int anc) +{ + if (is_left(anc)) + to->left |= anc; + else + to->right |= anc; +} + +static void +remove_opt_anc_info(OptAnc* to, int anc) +{ + if (is_left(anc)) + to->left &= ~anc; + else + to->right &= ~anc; +} + +static void +alt_merge_opt_anc_info(OptAnc* to, OptAnc* add) +{ + to->left &= add->left; + to->right &= add->right; +} + +static int +is_full_opt_exact(OptStr* e) +{ + return e->len >= OPT_EXACT_MAXLEN; +} + +static void +clear_opt_exact(OptStr* e) +{ + mml_clear(&e->mm); + clear_opt_anc_info(&e->anc); + e->reach_end = 0; + e->len = 0; + e->s[0] = '\0'; +} + +static void +copy_opt_exact(OptStr* to, OptStr* from) +{ + *to = *from; +} + +static int +concat_opt_exact(OptStr* to, OptStr* add, OnigEncoding enc) +{ + int i, j, len, r; + UChar *p, *end; + OptAnc tanc; + + r = 0; + p = add->s; + end = p + add->len; + for (i = to->len; p < end; ) { + len = enclen(enc, p); + if (i + len > OPT_EXACT_MAXLEN) { + r = 1; /* 1:full */ + break; + } + for (j = 0; j < len && p < end; j++) { + /* coverity[overrun-local] */ + to->s[i++] = *p++; + } + } + + to->len = i; + to->reach_end = (p == end ? add->reach_end : 0); + + concat_opt_anc_info(&tanc, &to->anc, &add->anc, 1, 1); + if (! to->reach_end) tanc.right = 0; + copy_opt_anc_info(&to->anc, &tanc); + + return r; +} + +static void +concat_opt_exact_str(OptStr* to, UChar* s, UChar* end, OnigEncoding enc) +{ + int i, j, len; + UChar *p; + + for (i = to->len, p = s; p < end && i < OPT_EXACT_MAXLEN; ) { + len = enclen(enc, p); + if (i + len > OPT_EXACT_MAXLEN) break; + for (j = 0; j < len && p < end; j++) { + /* coverity[overrun-local] */ + to->s[i++] = *p++; + } + } + + to->len = i; + + if (p >= end) + to->reach_end = 1; +} + +static void +alt_merge_opt_exact(OptStr* to, OptStr* add, OptEnv* env) +{ + int i, j, len; + + if (add->len == 0 || to->len == 0) { + clear_opt_exact(to); + return ; + } + + if (! mml_is_equal(&to->mm, &add->mm)) { + clear_opt_exact(to); + return ; + } + + for (i = 0; i < to->len && i < add->len; ) { + if (to->s[i] != add->s[i]) break; + len = enclen(env->enc, to->s + i); + + for (j = 1; j < len; j++) { + if (to->s[i+j] != add->s[i+j]) break; + } + if (j < len) break; + i += len; + } + + if (! add->reach_end || i < add->len || i < to->len) { + to->reach_end = 0; + } + to->len = i; + + alt_merge_opt_anc_info(&to->anc, &add->anc); + if (! to->reach_end) to->anc.right = 0; +} + +static void +select_opt_exact(OnigEncoding enc, OptStr* now, OptStr* alt) +{ + int vn, va; + + vn = now->len; + va = alt->len; + + if (va == 0) { + return ; + } + else if (vn == 0) { + copy_opt_exact(now, alt); + return ; + } + else if (vn <= 2 && va <= 2) { + /* ByteValTable[x] is big value --> low price */ + va = map_position_value(enc, now->s[0]); + vn = map_position_value(enc, alt->s[0]); + + if (now->len > 1) vn += 5; + if (alt->len > 1) va += 5; + } + + vn *= 2; + va *= 2; + + if (comp_distance_value(&now->mm, &alt->mm, vn, va) > 0) + copy_opt_exact(now, alt); +} + +static void +clear_opt_map(OptMap* map) +{ + static const OptMap clean_info = { + {0, 0}, {0, 0}, 0, + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + }; + + xmemcpy(map, &clean_info, sizeof(OptMap)); +} + +static void +copy_opt_map(OptMap* to, OptMap* from) +{ + *to = *from; +} + +static void +add_char_opt_map(OptMap* m, UChar c, OnigEncoding enc) +{ + if (m->map[c] == 0) { + m->map[c] = 1; + m->value += map_position_value(enc, c); + } +} + +static void +select_opt_map(OptMap* now, OptMap* alt) +{ + static int z = 1<<15; /* 32768: something big value */ + + int vn, va; + + if (alt->value == 0) return ; + if (now->value == 0) { + copy_opt_map(now, alt); + return ; + } + + vn = z / now->value; + va = z / alt->value; + if (comp_distance_value(&now->mm, &alt->mm, vn, va) > 0) + copy_opt_map(now, alt); +} + +static int +comp_opt_exact_or_map(OptStr* e, OptMap* m) +{ +#define COMP_EM_BASE 20 + int ae, am; + int case_value; + + if (m->value <= 0) return -1; + + case_value = 3; + ae = COMP_EM_BASE * e->len * case_value; + am = COMP_EM_BASE * 5 * 2 / m->value; + return comp_distance_value(&e->mm, &m->mm, ae, am); +} + +static void +alt_merge_opt_map(OnigEncoding enc, OptMap* to, OptMap* add) +{ + int i, val; + + /* if (! mml_is_equal(&to->mm, &add->mm)) return ; */ + if (to->value == 0) return ; + if (add->value == 0 || to->mm.max < add->mm.min) { + clear_opt_map(to); + return ; + } + + mml_alt_merge(&to->mm, &add->mm); + + val = 0; + for (i = 0; i < CHAR_MAP_SIZE; i++) { + if (add->map[i]) + to->map[i] = 1; + + if (to->map[i]) + val += map_position_value(enc, i); + } + to->value = val; + + alt_merge_opt_anc_info(&to->anc, &add->anc); +} + +static void +set_bound_node_opt_info(OptNode* opt, MinMaxLen* plen) +{ + mml_copy(&(opt->sb.mm), plen); + mml_copy(&(opt->spr.mm), plen); + mml_copy(&(opt->map.mm), plen); +} + +static void +clear_node_opt_info(OptNode* opt) +{ + mml_clear(&opt->len); + clear_opt_anc_info(&opt->anc); + clear_opt_exact(&opt->sb); + clear_opt_exact(&opt->sm); + clear_opt_exact(&opt->spr); + clear_opt_map(&opt->map); +} + +static void +copy_node_opt_info(OptNode* to, OptNode* from) +{ + *to = *from; +} + +static void +concat_left_node_opt_info(OnigEncoding enc, OptNode* to, OptNode* add) +{ + int sb_reach, sm_reach; + OptAnc tanc; + + concat_opt_anc_info(&tanc, &to->anc, &add->anc, to->len.max, add->len.max); + copy_opt_anc_info(&to->anc, &tanc); + + if (add->sb.len > 0 && to->len.max == 0) { + concat_opt_anc_info(&tanc, &to->anc, &add->sb.anc, to->len.max, add->len.max); + copy_opt_anc_info(&add->sb.anc, &tanc); + } + + if (add->map.value > 0 && to->len.max == 0) { + if (add->map.mm.max == 0) + add->map.anc.left |= to->anc.left; + } + + sb_reach = to->sb.reach_end; + sm_reach = to->sm.reach_end; + + if (add->len.max != 0) + to->sb.reach_end = to->sm.reach_end = 0; + + if (add->sb.len > 0) { + if (sb_reach) { + concat_opt_exact(&to->sb, &add->sb, enc); + clear_opt_exact(&add->sb); + } + else if (sm_reach) { + concat_opt_exact(&to->sm, &add->sb, enc); + clear_opt_exact(&add->sb); + } + } + select_opt_exact(enc, &to->sm, &add->sb); + select_opt_exact(enc, &to->sm, &add->sm); + + if (to->spr.len > 0) { + if (add->len.max > 0) { + if (to->spr.mm.max == 0) + select_opt_exact(enc, &to->sb, &to->spr); + else + select_opt_exact(enc, &to->sm, &to->spr); + } + } + else if (add->spr.len > 0) { + copy_opt_exact(&to->spr, &add->spr); + } + + select_opt_map(&to->map, &add->map); + mml_add(&to->len, &add->len); +} + +static void +alt_merge_node_opt_info(OptNode* to, OptNode* add, OptEnv* env) +{ + alt_merge_opt_anc_info(&to->anc, &add->anc); + alt_merge_opt_exact(&to->sb, &add->sb, env); + alt_merge_opt_exact(&to->sm, &add->sm, env); + alt_merge_opt_exact(&to->spr, &add->spr, env); + alt_merge_opt_map(env->enc, &to->map, &add->map); + + mml_alt_merge(&to->len, &add->len); +} + +static OnigLen +node_max_byte_len(Node* node, ParseEnv* env) +{ + OnigLen len; + OnigLen tmax; + + len = 0; + switch (ND_TYPE(node)) { + case ND_LIST: + do { + tmax = node_max_byte_len(ND_CAR(node), env); + len = distance_add(len, tmax); + } while (IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_ALT: + do { + tmax = node_max_byte_len(ND_CAR(node), env); + if (len < tmax) len = tmax; + } while (IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_STRING: + { + StrNode* sn = STR_(node); + len = (OnigLen )(sn->end - sn->s); + } + break; + + case ND_CTYPE: + case ND_CCLASS: + len = ONIGENC_MBC_MAXLEN_DIST(env->enc); + break; + + case ND_BACKREF: + if (! ND_IS_CHECKER(node)) { + int i; + int* backs; + MemEnv* mem_env = PARSEENV_MEMENV(env); + BackRefNode* br = BACKREF_(node); + if (ND_IS_RECURSION(node)) { +#ifdef USE_BACKREF_WITH_LEVEL + if (ND_IS_NEST_LEVEL(node)) { + len = INFINITE_LEN; + } +#endif + break; + } + backs = BACKREFS_P(br); + for (i = 0; i < br->back_num; i++) { + tmax = node_max_byte_len(mem_env[backs[i]].mem_node, env); + if (len < tmax) len = tmax; + } + } + break; + +#ifdef USE_CALL + case ND_CALL: + if (! ND_IS_RECURSION(node)) + len = node_max_byte_len(ND_BODY(node), env); + else + len = INFINITE_LEN; + break; +#endif + + case ND_QUANT: + { + QuantNode* qn = QUANT_(node); + + if (qn->upper != 0) { + len = node_max_byte_len(ND_BODY(node), env); + if (len != 0) { + if (! IS_INFINITE_REPEAT(qn->upper)) + len = distance_multiply(len, qn->upper); + else + len = INFINITE_LEN; + } + } + } + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + switch (en->type) { + case BAG_MEMORY: + if (ND_IS_FIXED_MAX(node)) + len = en->max_len; + else { + if (ND_IS_MARK1(node)) + len = INFINITE_LEN; + else { + ND_STATUS_ADD(node, MARK1); + len = node_max_byte_len(ND_BODY(node), env); + ND_STATUS_REMOVE(node, MARK1); + + en->max_len = len; + ND_STATUS_ADD(node, FIXED_MAX); + } + } + break; + + case BAG_OPTION: + case BAG_STOP_BACKTRACK: + len = node_max_byte_len(ND_BODY(node), env); + break; + case BAG_IF_ELSE: + { + OnigLen tlen, elen; + + len = node_max_byte_len(ND_BODY(node), env); + if (IS_NOT_NULL(en->te.Then)) { + tlen = node_max_byte_len(en->te.Then, env); + len = distance_add(len, tlen); + } + if (IS_NOT_NULL(en->te.Else)) + elen = node_max_byte_len(en->te.Else, env); + else elen = 0; + + if (elen > len) len = elen; + } + break; + } + } + break; + + case ND_ANCHOR: + case ND_GIMMICK: + default: + break; + } + + return len; +} + +#define MAX_ND_OPT_INFO_REF_COUNT 5 + +static int +optimize_nodes(Node* node, OptNode* opt, OptEnv* env) +{ + int i; + int r; + OptNode xo; + OnigEncoding enc; + + r = 0; + enc = env->enc; + clear_node_opt_info(opt); + set_bound_node_opt_info(opt, &env->mm); + + switch (ND_TYPE(node)) { + case ND_LIST: + { + OptEnv nenv; + Node* nd = node; + + copy_opt_env(&nenv, env); + do { + r = optimize_nodes(ND_CAR(nd), &xo, &nenv); + if (r == 0) { + mml_add(&nenv.mm, &xo.len); + concat_left_node_opt_info(enc, opt, &xo); + } + } while (r == 0 && IS_NOT_NULL(nd = ND_CDR(nd))); + } + break; + + case ND_ALT: + { + Node* nd = node; + + do { + r = optimize_nodes(ND_CAR(nd), &xo, env); + if (r == 0) { + if (nd == node) copy_node_opt_info(opt, &xo); + else alt_merge_node_opt_info(opt, &xo, env); + } + } while ((r == 0) && IS_NOT_NULL(nd = ND_CDR(nd))); + } + break; + + case ND_STRING: + { + StrNode* sn = STR_(node); + int slen = (int )(sn->end - sn->s); + + concat_opt_exact_str(&opt->sb, sn->s, sn->end, enc); + if (slen > 0) { + add_char_opt_map(&opt->map, *(sn->s), enc); + } + mml_set_min_max(&opt->len, slen, slen); + } + break; + + case ND_CCLASS: + { + int z; + CClassNode* cc = CCLASS_(node); + + /* no need to check ignore case. (set in tune_tree()) */ + + if (IS_NOT_NULL(cc->mbuf) || IS_NCCLASS_NOT(cc)) { + OnigLen min = ONIGENC_MBC_MINLEN(enc); + OnigLen max = ONIGENC_MBC_MAXLEN_DIST(enc); + + mml_set_min_max(&opt->len, min, max); + } + else { + for (i = 0; i < SINGLE_BYTE_SIZE; i++) { + z = BITSET_AT(cc->bs, i); + if ((z && ! IS_NCCLASS_NOT(cc)) || (! z && IS_NCCLASS_NOT(cc))) { + add_char_opt_map(&opt->map, (UChar )i, enc); + } + } + mml_set_min_max(&opt->len, 1, 1); + } + } + break; + + case ND_CTYPE: + { + int min, max; + int range; + + max = ONIGENC_MBC_MAXLEN_DIST(enc); + + if (max == 1) { + min = 1; + + switch (CTYPE_(node)->ctype) { + case CTYPE_ANYCHAR: + break; + + case ONIGENC_CTYPE_WORD: + range = CTYPE_(node)->ascii_mode != 0 ? 128 : SINGLE_BYTE_SIZE; + if (CTYPE_(node)->not != 0) { + for (i = 0; i < range; i++) { + if (! ONIGENC_IS_CODE_WORD(enc, i)) { + add_char_opt_map(&opt->map, (UChar )i, enc); + } + } + for (i = range; i < SINGLE_BYTE_SIZE; i++) { + add_char_opt_map(&opt->map, (UChar )i, enc); + } + } + else { + for (i = 0; i < range; i++) { + if (ONIGENC_IS_CODE_WORD(enc, i)) { + add_char_opt_map(&opt->map, (UChar )i, enc); + } + } + } + break; + } + } + else { + min = ONIGENC_MBC_MINLEN(enc); + } + mml_set_min_max(&opt->len, min, max); + } + break; + + case ND_ANCHOR: + switch (ANCHOR_(node)->type) { + case ANCR_BEGIN_BUF: + case ANCR_BEGIN_POSITION: + case ANCR_BEGIN_LINE: + case ANCR_END_BUF: + case ANCR_SEMI_END_BUF: + case ANCR_END_LINE: + case ANCR_PREC_READ_NOT: + case ANCR_LOOK_BEHIND: + add_opt_anc_info(&opt->anc, ANCHOR_(node)->type); + break; + + case ANCR_PREC_READ: + { + r = optimize_nodes(ND_BODY(node), &xo, env); + if (r == 0) { + if (xo.sb.len > 0) + copy_opt_exact(&opt->spr, &xo.sb); + else if (xo.sm.len > 0) + copy_opt_exact(&opt->spr, &xo.sm); + + opt->spr.reach_end = 0; + + if (xo.map.value > 0) + copy_opt_map(&opt->map, &xo.map); + } + } + break; + + case ANCR_LOOK_BEHIND_NOT: + break; + } + break; + + case ND_BACKREF: + if (! ND_IS_CHECKER(node)) { + OnigLen min, max; + + min = node_min_byte_len(node, env->scan_env); + max = node_max_byte_len(node, env->scan_env); + mml_set_min_max(&opt->len, min, max); + } + break; + +#ifdef USE_CALL + case ND_CALL: + if (ND_IS_RECURSION(node)) + mml_set_min_max(&opt->len, 0, INFINITE_LEN); + else { + r = optimize_nodes(ND_BODY(node), opt, env); + } + break; +#endif + + case ND_QUANT: + { + OnigLen min, max; + QuantNode* qn = QUANT_(node); + + /* Issue #175 + ex. /\g<1>{0}(?<=|())/ + + Empty and unused nodes in look-behind is removed in + tune_look_behind(). + Called group nodes are assigned to be not called if the caller side is + inside of zero-repetition. + As a result, the nodes are considered unused. + */ + if (qn->upper == 0) { + mml_set_min_max(&opt->len, 0, 0); + break; + } + + r = optimize_nodes(ND_BODY(node), &xo, env); + if (r != 0) break; + + if (qn->lower > 0) { + copy_node_opt_info(opt, &xo); + if (xo.sb.len > 0) { + if (xo.sb.reach_end) { + for (i = 2; i <= qn->lower && ! is_full_opt_exact(&opt->sb); i++) { + int rc = concat_opt_exact(&opt->sb, &xo.sb, enc); + if (rc > 0) break; + } + if (i < qn->lower) opt->sb.reach_end = 0; + } + } + + if (qn->lower != qn->upper) { + opt->sb.reach_end = 0; + opt->sm.reach_end = 0; + } + if (qn->lower > 1) + opt->sm.reach_end = 0; + } + + if (IS_INFINITE_REPEAT(qn->upper)) { + if (env->mm.max == 0 && + ND_IS_ANYCHAR(ND_BODY(node)) && qn->greedy != 0) { + if (ND_IS_MULTILINE(ND_QUANT_BODY(qn))) + add_opt_anc_info(&opt->anc, ANCR_ANYCHAR_INF_ML); + else + add_opt_anc_info(&opt->anc, ANCR_ANYCHAR_INF); + } + + max = (xo.len.max > 0 ? INFINITE_LEN : 0); + } + else { + max = distance_multiply(xo.len.max, qn->upper); + } + + min = distance_multiply(xo.len.min, qn->lower); + mml_set_min_max(&opt->len, min, max); + } + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + switch (en->type) { + case BAG_STOP_BACKTRACK: + case BAG_OPTION: + r = optimize_nodes(ND_BODY(node), opt, env); + break; + + case BAG_MEMORY: +#ifdef USE_CALL + en->opt_count++; + if (en->opt_count > MAX_ND_OPT_INFO_REF_COUNT) { + OnigLen min, max; + + min = 0; + max = INFINITE_LEN; + if (ND_IS_FIXED_MIN(node)) min = en->min_len; + if (ND_IS_FIXED_MAX(node)) max = en->max_len; + mml_set_min_max(&opt->len, min, max); + } + else +#endif + { + r = optimize_nodes(ND_BODY(node), opt, env); + if (is_set_opt_anc_info(&opt->anc, ANCR_ANYCHAR_INF_MASK)) { + if (MEM_STATUS_AT0(env->scan_env->backrefed_mem, en->m.regnum)) + remove_opt_anc_info(&opt->anc, ANCR_ANYCHAR_INF_MASK); + } + } + break; + + case BAG_IF_ELSE: + { + OptEnv nenv; + + if (IS_NOT_NULL(en->te.Else)) { + copy_opt_env(&nenv, env); + r = optimize_nodes(ND_BAG_BODY(en), &xo, &nenv); + if (r == 0) { + mml_add(&nenv.mm, &xo.len); + concat_left_node_opt_info(enc, opt, &xo); + if (IS_NOT_NULL(en->te.Then)) { + r = optimize_nodes(en->te.Then, &xo, &nenv); + if (r == 0) { + concat_left_node_opt_info(enc, opt, &xo); + } + } + + r = optimize_nodes(en->te.Else, &xo, env); + if (r == 0) + alt_merge_node_opt_info(opt, &xo, env); + } + } + } + break; + } + } + break; + + case ND_GIMMICK: + break; + + default: +#ifdef ONIG_DEBUG + fprintf(DBGFP, "optimize_nodes: undefined node type %d\n", ND_TYPE(node)); +#endif + r = ONIGERR_TYPE_BUG; + break; + } + + return r; +} + +static int +set_optimize_exact(regex_t* reg, OptStr* e) +{ + int r; + int allow_reverse; + + if (e->len == 0) return 0; + + reg->exact = (UChar* )xmalloc(e->len); + CHECK_NULL_RETURN_MEMERR(reg->exact); + xmemcpy(reg->exact, e->s, e->len); + reg->exact_end = reg->exact + e->len; + + allow_reverse = + ONIGENC_IS_ALLOWED_REVERSE_MATCH(reg->enc, reg->exact, reg->exact_end); + + if (e->len >= 2 || (e->len >= 1 && allow_reverse)) { + r = set_sunday_quick_search_or_bmh_skip_table(reg, 0, + reg->exact, reg->exact_end, + reg->map, &(reg->map_offset)); + if (r != 0) return r; + + reg->optimize = (allow_reverse != 0 + ? OPTIMIZE_STR_FAST + : OPTIMIZE_STR_FAST_STEP_FORWARD); + } + else { + reg->optimize = OPTIMIZE_STR; + } + + reg->dist_min = e->mm.min; + reg->dist_max = e->mm.max; + + if (reg->dist_min != INFINITE_LEN) { + int n = (int )(reg->exact_end - reg->exact); + reg->threshold_len = reg->dist_min + n; + } + + return 0; +} + +static void +set_optimize_map(regex_t* reg, OptMap* m) +{ + int i; + + for (i = 0; i < CHAR_MAP_SIZE; i++) + reg->map[i] = m->map[i]; + + reg->optimize = OPTIMIZE_MAP; + reg->dist_min = m->mm.min; + reg->dist_max = m->mm.max; + + if (reg->dist_min != INFINITE_LEN) { + reg->threshold_len = reg->dist_min + ONIGENC_MBC_MINLEN(reg->enc); + } +} + +static void +set_sub_anchor(regex_t* reg, OptAnc* anc) +{ + reg->sub_anchor |= anc->left & ANCR_BEGIN_LINE; + reg->sub_anchor |= anc->right & ANCR_END_LINE; +} + +#if defined(ONIG_DEBUG_COMPILE) || defined(ONIG_DEBUG_MATCH) +static void print_optimize_info(FILE* f, regex_t* reg); +#endif + +static int +set_optimize_info_from_tree(Node* node, regex_t* reg, ParseEnv* scan_env) +{ + int r; + OptNode opt; + OptEnv env; + + env.enc = reg->enc; + env.case_fold_flag = reg->case_fold_flag; + env.scan_env = scan_env; + mml_clear(&env.mm); + + r = optimize_nodes(node, &opt, &env); + if (r != 0) return r; + + reg->anchor = opt.anc.left & (ANCR_BEGIN_BUF | + ANCR_BEGIN_POSITION | ANCR_ANYCHAR_INF | ANCR_ANYCHAR_INF_ML | + ANCR_LOOK_BEHIND); + + if ((opt.anc.left & (ANCR_LOOK_BEHIND | ANCR_PREC_READ_NOT)) != 0) + reg->anchor &= ~ANCR_ANYCHAR_INF_ML; + + reg->anchor |= opt.anc.right & (ANCR_END_BUF | ANCR_SEMI_END_BUF | + ANCR_PREC_READ_NOT); + + if (reg->anchor & (ANCR_END_BUF | ANCR_SEMI_END_BUF)) { + reg->anc_dist_min = opt.len.min; + reg->anc_dist_max = opt.len.max; + } + + if (opt.sb.len > 0 || opt.sm.len > 0) { + select_opt_exact(reg->enc, &opt.sb, &opt.sm); + if (opt.map.value > 0 && comp_opt_exact_or_map(&opt.sb, &opt.map) > 0) { + goto set_map; + } + else { + r = set_optimize_exact(reg, &opt.sb); + set_sub_anchor(reg, &opt.sb.anc); + } + } + else if (opt.map.value > 0) { + set_map: + set_optimize_map(reg, &opt.map); + set_sub_anchor(reg, &opt.map.anc); + } + else { + reg->sub_anchor |= opt.anc.left & ANCR_BEGIN_LINE; + if (opt.len.max == 0) + reg->sub_anchor |= opt.anc.right & ANCR_END_LINE; + } + +#if defined(ONIG_DEBUG_COMPILE) || defined(ONIG_DEBUG_MATCH) + print_optimize_info(DBGFP, reg); +#endif + return r; +} +#endif /* ONIG_DONT_OPTIMIZE */ + +static void +clear_optimize_info(regex_t* reg) +{ + reg->optimize = OPTIMIZE_NONE; + reg->anchor = 0; + reg->anc_dist_min = 0; + reg->anc_dist_max = 0; + reg->sub_anchor = 0; + reg->exact_end = (UChar* )NULL; + reg->map_offset = 0; + reg->threshold_len = 0; + if (IS_NOT_NULL(reg->exact)) { + xfree(reg->exact); + reg->exact = (UChar* )NULL; + } +} + +#if defined(ONIG_DEBUG_PARSE) || defined(ONIG_DEBUG_MATCH) || \ + defined(ONIG_DEBUG_SEARCH) || defined(ONIG_DEBUG_COMPILE) + +static void +print_enc_string(FILE* fp, OnigEncoding enc, + const UChar *s, const UChar *end) +{ + if (ONIGENC_MBC_MINLEN(enc) > 1) { + const UChar *p; + OnigCodePoint code; + + p = s; + while (p < end) { + code = ONIGENC_MBC_TO_CODE(enc, p, end); + if (code >= 0x80) { + fprintf(fp, " 0x%04x ", (int )code); + } + else { + fputc((int )code, fp); + } + + p += enclen(enc, p); + } + } + else { + while (s < end) { + if (ONIGENC_MBC_MAXLEN(enc) == 1) { + if (*s >= 0x80) { + fprintf(fp, "\\x%02x", (unsigned int )*s); + } + else { + fputc((int )*s, fp); + } + } + else { /* for UTF-8 */ + fputc((int )*s, fp); + } + s++; + } + } +} + +static void +print_options(FILE* fp, OnigOptionType o) +{ + if ((o & ONIG_OPTION_IGNORECASE) != 0) fprintf(fp, " IGNORECASE"); + if ((o & ONIG_OPTION_EXTEND) != 0) fprintf(fp, " EXTEND"); + if ((o & ONIG_OPTION_MULTILINE) != 0) fprintf(fp, " MULTILINE"); + if ((o & ONIG_OPTION_SINGLELINE) != 0) fprintf(fp, " SINGLELINE"); + if ((o & ONIG_OPTION_FIND_LONGEST) != 0) fprintf(fp, " FIND_LONGEST"); + if ((o & ONIG_OPTION_FIND_NOT_EMPTY) != 0) fprintf(fp, " FIND_NOT_EMPTY"); + if ((o & ONIG_OPTION_NEGATE_SINGLELINE) != 0) fprintf(fp, " NEGATE_SINGLELINE"); + if ((o & ONIG_OPTION_DONT_CAPTURE_GROUP) != 0) fprintf(fp, " DONT_CAPTURE_GROUP"); + if ((o & ONIG_OPTION_CAPTURE_GROUP) != 0) fprintf(fp, " CAPTURE_GROUP"); + if ((o & ONIG_OPTION_NOTBOL) != 0) fprintf(fp, " NOTBOL"); + if ((o & ONIG_OPTION_NOTEOL) != 0) fprintf(fp, " NOTEOL"); + if ((o & ONIG_OPTION_POSIX_REGION) != 0) fprintf(fp, " POSIX_REGION"); + if ((o & ONIG_OPTION_CHECK_VALIDITY_OF_STRING) != 0) fprintf(fp, " CHECK_VALIDITY_OF_STRING"); + if ((o & ONIG_OPTION_IGNORECASE_IS_ASCII) != 0) fprintf(fp, " IGNORECASE_IS_ASCII"); + if ((o & ONIG_OPTION_WORD_IS_ASCII) != 0) fprintf(fp, " WORD_IS_ASCII"); + if ((o & ONIG_OPTION_DIGIT_IS_ASCII) != 0) fprintf(fp, " DIGIT_IS_ASCII"); + if ((o & ONIG_OPTION_SPACE_IS_ASCII) != 0) fprintf(fp, " SPACE_IS_ASCII"); + if ((o & ONIG_OPTION_POSIX_IS_ASCII) != 0) fprintf(fp, " POSIX_IS_ASCII"); + if ((o & ONIG_OPTION_TEXT_SEGMENT_EXTENDED_GRAPHEME_CLUSTER) != 0) fprintf(fp, " TEXT_SEGMENT_EXTENDED_GRAPHEME_CLUSTER"); + if ((o & ONIG_OPTION_TEXT_SEGMENT_WORD) != 0) fprintf(fp, " TEXT_SEGMENT_WORD"); + if ((o & ONIG_OPTION_NOT_BEGIN_STRING) != 0) fprintf(fp, " NOT_BIGIN_STRING"); + if ((o & ONIG_OPTION_NOT_END_STRING) != 0) fprintf(fp, " NOT_END_STRING"); + if ((o & ONIG_OPTION_NOT_BEGIN_POSITION) != 0) fprintf(fp, " NOT_BEGIN_POSITION"); + if ((o & ONIG_OPTION_CALLBACK_EACH_MATCH) != 0) fprintf(fp, " CALLBACK_EACH_MATCH"); +} + +#endif + +#if defined(ONIG_DEBUG_COMPILE) || defined(ONIG_DEBUG_MATCH) + +#ifndef ONIG_DONT_OPTIMIZE + +static void +print_distance_range(FILE* f, OnigLen a, OnigLen b) +{ + if (a == INFINITE_LEN) + fputs("inf", f); + else + fprintf(f, "(%u)", a); + + fputs("-", f); + + if (b == INFINITE_LEN) + fputs("inf", f); + else + fprintf(f, "(%u)", b); +} + +static void +print_anchor(FILE* f, int anchor) +{ + int q = 0; + + fprintf(f, "["); + + if (anchor & ANCR_BEGIN_BUF) { + fprintf(f, "begin-buf"); + q = 1; + } + if (anchor & ANCR_BEGIN_LINE) { + if (q) fprintf(f, ", "); + q = 1; + fprintf(f, "begin-line"); + } + if (anchor & ANCR_BEGIN_POSITION) { + if (q) fprintf(f, ", "); + q = 1; + fprintf(f, "begin-pos"); + } + if (anchor & ANCR_END_BUF) { + if (q) fprintf(f, ", "); + q = 1; + fprintf(f, "end-buf"); + } + if (anchor & ANCR_SEMI_END_BUF) { + if (q) fprintf(f, ", "); + q = 1; + fprintf(f, "semi-end-buf"); + } + if (anchor & ANCR_END_LINE) { + if (q) fprintf(f, ", "); + q = 1; + fprintf(f, "end-line"); + } + if (anchor & ANCR_ANYCHAR_INF) { + if (q) fprintf(f, ", "); + q = 1; + fprintf(f, "anychar-inf"); + } + if (anchor & ANCR_ANYCHAR_INF_ML) { + if (q) fprintf(f, ", "); + fprintf(f, "anychar-inf-ml"); + } + + fprintf(f, "]"); +} + +static void +print_optimize_info(FILE* f, regex_t* reg) +{ + static const char* on[] = + { "NONE", "STR", "STR_FAST", "STR_FAST_STEP_FORWARD", "MAP" }; + + fprintf(f, "optimize: %s\n", on[reg->optimize]); + fprintf(f, " anchor: "); print_anchor(f, reg->anchor); + if ((reg->anchor & ANCR_END_BUF_MASK) != 0) + print_distance_range(f, reg->anc_dist_min, reg->anc_dist_max); + fprintf(f, "\n"); + + if (reg->optimize) { + fprintf(f, " sub anchor: "); print_anchor(f, reg->sub_anchor); + fprintf(f, "\n"); + } + fprintf(f, "\n"); + + if (reg->exact) { + UChar *p; + fprintf(f, "exact: ["); + for (p = reg->exact; p < reg->exact_end; p++) { + fputc(*p, f); + } + fprintf(f, "]: length: %ld, dmin: %u, ", + (reg->exact_end - reg->exact), reg->dist_min); + if (reg->dist_max == INFINITE_LEN) + fprintf(f, "dmax: inf.\n"); + else + fprintf(f, "dmax: %u\n", reg->dist_max); + } + else if (reg->optimize & OPTIMIZE_MAP) { + int c, i, n = 0; + + for (i = 0; i < CHAR_MAP_SIZE; i++) + if (reg->map[i]) n++; + + fprintf(f, "map: n=%d, dmin: %u, dmax: %u\n", + n, reg->dist_min, reg->dist_max); + if (n > 0) { + c = 0; + fputc('[', f); + for (i = 0; i < CHAR_MAP_SIZE; i++) { + if (reg->map[i] != 0) { + if (c > 0) fputs(", ", f); + c++; + if (ONIGENC_MBC_MAXLEN(reg->enc) == 1 && + ONIGENC_IS_CODE_PRINT(reg->enc, (OnigCodePoint )i)) + fputc(i, f); + else + fprintf(f, "0x%02x", i); + } + } + fprintf(f, "]\n"); + } + } +} +#endif /* ONIG_DONT_OPTIMIZE */ +#endif /* defined(ONIG_DEBUG_COMPILE) || defined(ONIG_DEBUG_MATCH) */ + + +extern RegexExt* +onig_get_regex_ext(regex_t* reg) +{ + if (IS_NULL(reg->extp)) { + RegexExt* ext = (RegexExt* )xmalloc(sizeof(*ext)); + if (IS_NULL(ext)) return 0; + + ext->pattern = 0; + ext->pattern_end = 0; +#ifdef USE_CALLOUT + ext->tag_table = 0; + ext->callout_num = 0; + ext->callout_list_alloc = 0; + ext->callout_list = 0; +#endif + + reg->extp = ext; + } + + return reg->extp; +} + +static void +free_regex_ext(RegexExt* ext) +{ + if (IS_NOT_NULL(ext)) { + if (IS_NOT_NULL(ext->pattern)) + xfree((void* )ext->pattern); + +#ifdef USE_CALLOUT + if (IS_NOT_NULL(ext->tag_table)) + onig_callout_tag_table_free(ext->tag_table); + + if (IS_NOT_NULL(ext->callout_list)) + onig_free_reg_callout_list(ext->callout_num, ext->callout_list); +#endif + + xfree(ext); + } +} + +extern int +onig_ext_set_pattern(regex_t* reg, const UChar* pattern, const UChar* pattern_end) +{ + RegexExt* ext; + UChar* s; + + ext = onig_get_regex_ext(reg); + CHECK_NULL_RETURN_MEMERR(ext); + + s = onigenc_strdup(reg->enc, pattern, pattern_end); + CHECK_NULL_RETURN_MEMERR(s); + + ext->pattern = s; + ext->pattern_end = s + (pattern_end - pattern); + + return ONIG_NORMAL; +} + +extern void +onig_free_body(regex_t* reg) +{ + if (IS_NOT_NULL(reg)) { + ops_free(reg); + if (IS_NOT_NULL(reg->string_pool)) { + xfree(reg->string_pool); + reg->string_pool_end = reg->string_pool = 0; + } + if (IS_NOT_NULL(reg->exact)) xfree(reg->exact); + if (IS_NOT_NULL(reg->repeat_range)) xfree(reg->repeat_range); + if (IS_NOT_NULL(reg->extp)) { + free_regex_ext(reg->extp); + reg->extp = 0; + } + + onig_names_free(reg); + } +} + +extern void +onig_free(regex_t* reg) +{ + if (IS_NOT_NULL(reg)) { + onig_free_body(reg); + xfree(reg); + } +} + + +#ifdef ONIG_DEBUG_PARSE +static void print_tree P_((FILE* f, Node* node)); +#endif + +extern int onig_init_for_match_at(regex_t* reg); + +static int parse_and_tune(regex_t* reg, const UChar* pattern, + const UChar* pattern_end, ParseEnv *scan_env, Node** rroot, + OnigErrorInfo* einfo +#ifdef USE_CALL + , UnsetAddrList* uslist +#endif +) +{ + int r; + Node* root; + + root = NULL_NODE; + if (IS_NOT_NULL(einfo)) { + einfo->enc = reg->enc; + einfo->par = (UChar* )NULL; + } + + r = onig_parse_tree(&root, pattern, pattern_end, reg, scan_env); + if (r != 0) goto err; + +#ifdef USE_WHOLE_OPTIONS + if ((scan_env->flags & PE_FLAG_HAS_WHOLE_OPTIONS) != 0) { + r = check_whole_options_position(root, scan_env); + if (r != 0) goto err; + } +#endif + + r = reduce_string_list(root, reg->enc); + if (r != 0) goto err; + + /* mixed use named group and no-named group */ + if (scan_env->num_named > 0 && + IS_SYNTAX_BV(scan_env->syntax, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP) && + ! OPTON_CAPTURE_GROUP(reg->options)) { + if (scan_env->num_named != scan_env->num_mem) + r = disable_noname_group_capture(&root, reg, scan_env); + else + r = numbered_ref_check(root); + + if (r != 0) goto err; + } + + r = check_backrefs(root, scan_env); + if (r != 0) goto err; + +#ifdef USE_CALL + if (scan_env->num_call > 0) { + r = unset_addr_list_init(uslist, scan_env->num_call); + if (r != 0) goto err; + scan_env->unset_addr_list = uslist; + r = tune_call(root, scan_env, 0); + if (r != 0) goto err_unset; + r = tune_call2(root); + if (r != 0) goto err_unset; + r = recursive_call_check_trav(root, scan_env, 0); + if (r < 0) goto err_unset; + r = infinite_recursive_call_check_trav(root, scan_env); + if (r != 0) goto err_unset; + + tune_called_state(root, 0); + } + + reg->num_call = scan_env->num_call; +#endif + +#ifdef ONIG_DEBUG_PARSE + fprintf(DBGFP, "MAX PARSE DEPTH: %d\n", scan_env->max_parse_depth); +#endif + + r = tune_tree(root, reg, 0, scan_env); + if (r != 0) { +#ifdef ONIG_DEBUG_PARSE + fprintf(DBGFP, "TREE (error in tune)\n"); + print_tree(DBGFP, root); + fprintf(DBGFP, "\n"); +#endif + goto err_unset; + } + + if (scan_env->backref_num != 0) { + set_parent_node_trav(root, NULL_NODE); + r = set_empty_repeat_node_trav(root, NULL_NODE, scan_env); + if (r != 0) goto err_unset; + set_empty_status_check_trav(root, scan_env); + } + + *rroot = root; + return r; + + err_unset: +#ifdef USE_CALL + if (scan_env->num_call > 0) { + unset_addr_list_end(uslist); + } +#endif + err: + if (IS_NOT_NULL(scan_env->error)) { + if (IS_NOT_NULL(einfo)) { + einfo->par = scan_env->error; + einfo->par_end = scan_env->error_end; + } + } + + onig_node_free(root); + if (IS_NOT_NULL(scan_env->mem_env_dynamic)) + xfree(scan_env->mem_env_dynamic); + + *rroot = NULL_NODE; + return r; +} + +extern int +onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end, + OnigErrorInfo* einfo) +{ + int r; + Node* root; + ParseEnv scan_env; +#ifdef USE_CALL + UnsetAddrList uslist = {0}; +#endif + +#if defined(ONIG_DEBUG_PARSE) || defined(ONIG_DEBUG_MATCH) || \ + defined(ONIG_DEBUG_SEARCH) || defined(ONIG_DEBUG_COMPILE) + fprintf(DBGFP, "\nPATTERN: /"); + print_enc_string(DBGFP, reg->enc, pattern, pattern_end); + fprintf(DBGFP, "/\n"); + fprintf(DBGFP, "OPTIONS:"); + print_options(DBGFP, reg->options); + fprintf(DBGFP, "\n"); +#endif + + if (reg->ops_alloc == 0) { + r = ops_init(reg, OPS_INIT_SIZE); + if (r != 0) { + if (IS_NOT_NULL(einfo)) { + einfo->enc = reg->enc; + einfo->par = (UChar* )NULL; + } + return r; + } + } + else + reg->ops_used = 0; + + r = parse_and_tune(reg, pattern, pattern_end, &scan_env, &root, einfo +#ifdef USE_CALL + , &uslist +#endif + ); + if (r != 0) return r; + +#ifdef ONIG_DEBUG_PARSE + fprintf(DBGFP, "TREE (after tune)\n"); + print_tree(DBGFP, root); + fprintf(DBGFP, "\n"); +#endif + + reg->capture_history = scan_env.cap_history; + reg->push_mem_start = scan_env.backtrack_mem | scan_env.cap_history; + +#ifdef USE_CALLOUT + if (IS_NOT_NULL(reg->extp) && reg->extp->callout_num != 0) { + reg->push_mem_end = reg->push_mem_start; + } + else { + if (MEM_STATUS_IS_ALL_ON(reg->push_mem_start)) + reg->push_mem_end = scan_env.backrefed_mem | scan_env.cap_history; + else + reg->push_mem_end = reg->push_mem_start & + (scan_env.backrefed_mem | scan_env.cap_history); + } +#else + if (MEM_STATUS_IS_ALL_ON(reg->push_mem_start)) + reg->push_mem_end = scan_env.backrefed_mem | scan_env.cap_history; + else + reg->push_mem_end = reg->push_mem_start & + (scan_env.backrefed_mem | scan_env.cap_history); +#endif + + clear_optimize_info(reg); +#ifndef ONIG_DONT_OPTIMIZE + r = set_optimize_info_from_tree(root, reg, &scan_env); + if (r != 0) { +#ifdef USE_CALL + if (scan_env.num_call > 0) { + unset_addr_list_end(&uslist); + } +#endif + goto err; + } +#endif + + if (IS_NOT_NULL(scan_env.mem_env_dynamic)) { + xfree(scan_env.mem_env_dynamic); + scan_env.mem_env_dynamic = (MemEnv* )NULL; + } + + r = compile_tree(root, reg, &scan_env); + if (r == 0) { + if (scan_env.keep_num > 0) { + r = add_op(reg, OP_UPDATE_VAR); + if (r != 0) goto err; + + COP(reg)->update_var.type = UPDATE_VAR_KEEP_FROM_STACK_LAST; + COP(reg)->update_var.id = 0; /* not used */ + COP(reg)->update_var.clear = FALSE; + } + + r = add_op(reg, OP_END); + if (r != 0) goto err; + +#ifdef USE_CALL + if (scan_env.num_call > 0) { + r = fix_unset_addr_list(&uslist, reg); + unset_addr_list_end(&uslist); + if (r != 0) goto err; + } +#endif + + r = ops_resize(reg, reg->ops_used); + if (r != ONIG_NORMAL) goto err; + + set_addr_in_repeat_range(reg); + + if ((reg->push_mem_end != 0) +#ifdef USE_REPEAT_AND_EMPTY_CHECK_LOCAL_VAR + || (reg->num_repeat != 0) + || (reg->num_empty_check != 0) +#endif +#ifdef USE_CALLOUT + || (IS_NOT_NULL(reg->extp) && reg->extp->callout_num != 0) +#endif +#ifdef USE_CALL + || scan_env.num_call > 0 +#endif + ) + reg->stack_pop_level = STACK_POP_LEVEL_ALL; + else { + if (reg->push_mem_start != 0) + reg->stack_pop_level = STACK_POP_LEVEL_MEM_START; + else + reg->stack_pop_level = STACK_POP_LEVEL_FREE; + } + + r = ops_make_string_pool(reg); + if (r != 0) goto err; + } +#ifdef USE_CALL + else if (scan_env.num_call > 0) { + unset_addr_list_end(&uslist); + } +#endif + onig_node_free(root); + +#ifdef ONIG_DEBUG_COMPILE + onig_print_names(DBGFP, reg); + onig_print_compiled_byte_code_list(DBGFP, reg); +#endif + +#ifdef USE_DIRECT_THREADED_CODE + /* opcode -> opaddr */ + onig_init_for_match_at(reg); +#endif + + return r; + + err: + if (IS_NOT_NULL(scan_env.error)) { + if (IS_NOT_NULL(einfo)) { + einfo->par = scan_env.error; + einfo->par_end = scan_env.error_end; + } + } + + onig_node_free(root); + if (IS_NOT_NULL(scan_env.mem_env_dynamic)) + xfree(scan_env.mem_env_dynamic); + return r; +} + + +static int onig_inited = 0; + +extern int +onig_reg_init(regex_t* reg, OnigOptionType option, OnigCaseFoldType case_fold_flag, + OnigEncoding enc, OnigSyntaxType* syntax) +{ + int r; + + xmemset(reg, 0, sizeof(*reg)); + + if (onig_inited == 0) { +#if 0 + return ONIGERR_LIBRARY_IS_NOT_INITIALIZED; +#else + r = onig_initialize(&enc, 1); + if (r != 0) + return ONIGERR_FAIL_TO_INITIALIZE; + + onig_warning("You didn't call onig_initialize() explicitly"); +#endif + } + + if (IS_NULL(reg)) + return ONIGERR_INVALID_ARGUMENT; + + if (ONIGENC_IS_UNDEF(enc)) + return ONIGERR_DEFAULT_ENCODING_IS_NOT_SET; + + if ((option & (ONIG_OPTION_DONT_CAPTURE_GROUP|ONIG_OPTION_CAPTURE_GROUP)) + == (ONIG_OPTION_DONT_CAPTURE_GROUP|ONIG_OPTION_CAPTURE_GROUP)) { + return ONIGERR_INVALID_COMBINATION_OF_OPTIONS; + } + + if ((option & ONIG_OPTION_NEGATE_SINGLELINE) != 0) { + option |= syntax->options; + option &= ~ONIG_OPTION_SINGLELINE; + } + else + option |= syntax->options; + + if ((option & ONIG_OPTION_IGNORECASE_IS_ASCII) != 0) { + case_fold_flag &= ~(INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR | + ONIGENC_CASE_FOLD_TURKISH_AZERI); + case_fold_flag |= ONIGENC_CASE_FOLD_ASCII_ONLY; + } + + (reg)->enc = enc; + (reg)->options = option; + (reg)->syntax = syntax; + (reg)->optimize = 0; + (reg)->exact = (UChar* )NULL; + (reg)->extp = (RegexExt* )NULL; + (reg)->ops = (Operation* )NULL; + (reg)->ops_curr = (Operation* )NULL; + (reg)->ops_used = 0; + (reg)->ops_alloc = 0; + (reg)->name_table = (void* )NULL; + (reg)->case_fold_flag = case_fold_flag; + return 0; +} + +extern int +onig_new_without_alloc(regex_t* reg, + const UChar* pattern, const UChar* pattern_end, + OnigOptionType option, OnigEncoding enc, + OnigSyntaxType* syntax, OnigErrorInfo* einfo) +{ + int r; + + r = onig_reg_init(reg, option, ONIGENC_CASE_FOLD_DEFAULT, enc, syntax); + if (r != 0) return r; + + r = onig_compile(reg, pattern, pattern_end, einfo); + return r; +} + +extern int +onig_new(regex_t** reg, const UChar* pattern, const UChar* pattern_end, + OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, + OnigErrorInfo* einfo) +{ + int r; + + *reg = (regex_t* )xmalloc(sizeof(regex_t)); + if (IS_NULL(*reg)) return ONIGERR_MEMORY; + + r = onig_reg_init(*reg, option, ONIGENC_CASE_FOLD_DEFAULT, enc, syntax); + if (r != 0) { + xfree(*reg); + *reg = NULL; + return r; + } + + r = onig_compile(*reg, pattern, pattern_end, einfo); + if (r != 0) { + onig_free(*reg); + *reg = NULL; + } + return r; +} + +extern int +onig_initialize(OnigEncoding encodings[], int n) +{ + int i; + int r; + + if (onig_inited != 0) + return 0; + + onigenc_init(); + + onig_inited = 1; + + for (i = 0; i < n; i++) { + OnigEncoding enc = encodings[i]; + r = onig_initialize_encoding(enc); + if (r != 0) + return r; + } + + return ONIG_NORMAL; +} + +typedef struct EndCallListItem { + struct EndCallListItem* next; + void (*func)(void); +} EndCallListItemType; + +static EndCallListItemType* EndCallTop; + +extern void onig_add_end_call(void (*func)(void)) +{ + EndCallListItemType* item; + + item = (EndCallListItemType* )xmalloc(sizeof(*item)); + if (item == 0) return ; + + item->next = EndCallTop; + item->func = func; + + EndCallTop = item; +} + +static void +exec_end_call_list(void) +{ + EndCallListItemType* prev; + void (*func)(void); + + while (EndCallTop != 0) { + func = EndCallTop->func; + (*func)(); + + prev = EndCallTop; + EndCallTop = EndCallTop->next; + xfree(prev); + } +} + +extern int +onig_end(void) +{ + exec_end_call_list(); + +#ifdef USE_CALLOUT + onig_global_callout_names_free(); +#endif + + onigenc_end(); + + onig_inited = 0; + + return 0; +} + +extern int +onig_is_in_code_range(const UChar* p, OnigCodePoint code) +{ + OnigCodePoint n, *data; + OnigCodePoint low, high, x; + + GET_CODE_POINT(n, p); + data = (OnigCodePoint* )p; + data++; + + for (low = 0, high = n; low < high; ) { + x = (low + high) >> 1; + if (code > data[x * 2 + 1]) + low = x + 1; + else + high = x; + } + + return ((low < n && code >= data[low * 2]) ? 1 : 0); +} + +extern int +onig_is_code_in_cc_len(int elen, OnigCodePoint code, /* CClassNode* */ void* cc_arg) +{ + int found; + CClassNode* cc = (CClassNode* )cc_arg; + + if (elen > 1 || (code >= SINGLE_BYTE_SIZE)) { + if (IS_NULL(cc->mbuf)) { + found = 0; + } + else { + found = onig_is_in_code_range(cc->mbuf->p, code) != 0; + } + } + else { + found = BITSET_AT(cc->bs, code) != 0; + } + + if (IS_NCCLASS_NOT(cc)) + return !found; + else + return found; +} + +extern int +onig_is_code_in_cc(OnigEncoding enc, OnigCodePoint code, CClassNode* cc) +{ + int len; + + if (ONIGENC_MBC_MINLEN(enc) > 1) { + len = 2; + } + else { + len = ONIGENC_CODE_TO_MBCLEN(enc, code); + if (len < 0) return 0; + } + return onig_is_code_in_cc_len(len, code, cc); +} + + +#define MANY_REPEAT_OF_ANYCHAR 20 + +typedef enum { + MJ_NO = 0, + MJ_YES = 1, + MJ_IGNORE = 2, +} MJ_RESULT; + +static MJ_RESULT +mostly_just_anychar(Node* node, int in_reluctant) +{ + MJ_RESULT r; + + r = MJ_NO; + switch (ND_TYPE(node)) { + case ND_LIST: + { + int found = FALSE; + do { + r = mostly_just_anychar(ND_CAR(node), in_reluctant); + if (r == MJ_NO) break; + if (r == MJ_YES) found = TRUE; + } while (IS_NOT_NULL(node = ND_CDR(node))); + if (r == MJ_IGNORE) { + if (found == TRUE) r = MJ_YES; + } + } + break; + + case ND_ALT: + r = MJ_IGNORE; + do { + r = mostly_just_anychar(ND_CAR(node), in_reluctant); + if (r == MJ_YES) break; + } while (IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_QUANT: + { + QuantNode* qn = QUANT_(node); + + if (qn->upper == 0) + r = MJ_IGNORE; + else { + if (in_reluctant == FALSE) { + if (qn->greedy != 0 && + (! IS_INFINITE_REPEAT(qn->upper) && + qn->upper <= MANY_REPEAT_OF_ANYCHAR)) { + in_reluctant = TRUE; + } + } + r = mostly_just_anychar(ND_BODY(node), in_reluctant); + } + } + break; + + case ND_ANCHOR: + switch (ANCHOR_(node)->type) { + case ANCR_PREC_READ: + case ANCR_PREC_READ_NOT: + case ANCR_LOOK_BEHIND: + case ANCR_LOOK_BEHIND_NOT: + case ANCR_TEXT_SEGMENT_BOUNDARY: /* \y */ + r = MJ_IGNORE; + break; + default: + break; + } + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + if (en->type == BAG_IF_ELSE) { + if (IS_NOT_NULL(en->te.Then)) { + r = mostly_just_anychar(en->te.Then, in_reluctant); + if (r == MJ_YES) break; + } + if (IS_NOT_NULL(en->te.Else)) { + r = mostly_just_anychar(en->te.Else, in_reluctant); + } + } + else { + r = mostly_just_anychar(ND_BODY(node), in_reluctant); + } + } + break; + + case ND_CTYPE: + if (CTYPE_(node)->ctype == CTYPE_ANYCHAR) + r = MJ_YES; + else + r = MJ_NO; + break; + + case ND_STRING: + if (ND_STRING_LEN(node) == 0) { + r = MJ_IGNORE; + break; + } + /* fall */ + case ND_CCLASS: + r = MJ_NO; + break; + +#ifdef USE_CALL + case ND_CALL: + /* ignore call */ +#endif + case ND_BACKREF: + case ND_GIMMICK: + r = MJ_IGNORE; + break; + + default: + break; + } + + return r; +} + +#define MAX_CALLS_IN_DETECT 10 + +typedef struct { + int prec_read; + int look_behind; + int backref; + int backref_with_level; + int call; + int is_keep; + int anychar_reluctant_many; + int empty_check_nest_level; + int max_empty_check_nest_level; + int heavy_element; +} SlowElementCount; + +static int +detect_can_be_slow(Node* node, SlowElementCount* ct, int ncall, int calls[]) +{ + int r; + + r = 0; + switch (ND_TYPE(node)) { + case ND_LIST: + case ND_ALT: + do { + r = detect_can_be_slow(ND_CAR(node), ct, ncall, calls); + if (r != 0) return r; + } while (IS_NOT_NULL(node = ND_CDR(node))); + break; + + case ND_QUANT: + { + QuantNode* qn; + Node* body; + int prev_heavy_element = 0; + + qn = QUANT_(node); + body = ND_BODY(node); + + if (qn->emptiness != BODY_IS_NOT_EMPTY) { + prev_heavy_element = ct->heavy_element; + ct->empty_check_nest_level++; + if (ct->empty_check_nest_level > ct->max_empty_check_nest_level) + ct->max_empty_check_nest_level = ct->empty_check_nest_level; + } + else if (IS_INFINITE_REPEAT(qn->upper) || qn->upper > 0) { + MJ_RESULT mr = mostly_just_anychar(body, (qn->greedy == 0)); + if (mr == MJ_YES) + ct->anychar_reluctant_many++; + } + + r = detect_can_be_slow(body, ct, ncall, calls); + + if (qn->emptiness != BODY_IS_NOT_EMPTY) { + if (ND_IS_INPEEK(node)) { + if (ct->empty_check_nest_level > 2) { + if (prev_heavy_element == ct->heavy_element) + ct->heavy_element++; + } + } + ct->empty_check_nest_level--; + } + } + break; + + case ND_ANCHOR: + switch (ANCHOR_(node)->type) { + case ANCR_PREC_READ: + case ANCR_PREC_READ_NOT: + ct->prec_read++; + break; + case ANCR_LOOK_BEHIND: + case ANCR_LOOK_BEHIND_NOT: + ct->look_behind++; + break; + default: + break; + } + + if (ANCHOR_HAS_BODY(ANCHOR_(node))) + r = detect_can_be_slow(ND_BODY(node), ct, ncall, calls); + break; + + case ND_BAG: + { + BagNode* en = BAG_(node); + + r = detect_can_be_slow(ND_BODY(node), ct, ncall, calls); + if (r != 0) return r; + + if (en->type == BAG_IF_ELSE) { + if (IS_NOT_NULL(en->te.Then)) { + r = detect_can_be_slow(en->te.Then, ct, ncall, calls); + if (r != 0) return r; + } + if (IS_NOT_NULL(en->te.Else)) { + r = detect_can_be_slow(en->te.Else, ct, ncall, calls); + if (r != 0) return r; + } + } + } + break; + +#ifdef USE_BACKREF_WITH_LEVEL + case ND_BACKREF: + if (ND_IS_NEST_LEVEL(node)) + ct->heavy_element++; + else + ct->backref++; + break; +#endif + +#ifdef USE_CALL + case ND_CALL: + { + int i; + int found; + int gnum; + + gnum = CALL_(node)->called_gnum; + ct->call++; + + if (ND_IS_RECURSION(node) && ND_IS_INPEEK(node) && + ND_IS_IN_REAL_REPEAT(node)) { + ct->heavy_element += 10; + } + + found = FALSE; + for (i = 0; i < ncall; i++) { + if (gnum == calls[i]) { + found = TRUE; + break; + } + } + + if (! found) { + if (ncall + 1 < MAX_CALLS_IN_DETECT) { + calls[ncall] = gnum; + r = detect_can_be_slow(ND_BODY(node), ct, ncall + 1, calls); + } + else { + ct->heavy_element++; + } + } + } + break; +#endif + case ND_GIMMICK: + { + GimmickNode* g = GIMMICK_(node); + if (g->type == GIMMICK_SAVE && g->detail_type == SAVE_KEEP) + ct->is_keep = TRUE; + } + break; + + default: + break; + } + + return r; +} + +extern int +onig_detect_can_be_slow_pattern(const UChar* pattern, + const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, + OnigSyntaxType* syntax) +{ + int r; + regex_t* reg; + Node* root; + ParseEnv scan_env; + SlowElementCount count; + int calls[MAX_CALLS_IN_DETECT]; +#ifdef USE_CALL + UnsetAddrList uslist = {0}; +#endif + + reg = (regex_t* )xmalloc(sizeof(regex_t)); + if (IS_NULL(reg)) return ONIGERR_MEMORY; + + r = onig_reg_init(reg, option, ONIGENC_CASE_FOLD_DEFAULT, enc, syntax); + if (r != 0) { + xfree(reg); + return r; + } + + r = parse_and_tune(reg, pattern, pattern_end, &scan_env, &root, NULL +#ifdef USE_CALL + , &uslist +#endif + ); + if (r != 0) goto err; + +#ifdef USE_CALL + if (scan_env.num_call > 0) { + unset_addr_list_end(&uslist); + } +#endif + + count.prec_read = 0; + count.look_behind = 0; + count.backref = 0; + count.backref_with_level = 0; + count.call = 0; + count.is_keep = FALSE; + count.anychar_reluctant_many = 0; + count.empty_check_nest_level = 0; + count.max_empty_check_nest_level = 0; + count.heavy_element = 0; + + r = detect_can_be_slow(root, &count, 0, calls); + if (r == 0) { + int n; + + n = count.prec_read + count.look_behind + + count.backref + count.backref_with_level + count.call + + count.anychar_reluctant_many; + + if (count.is_keep) count.max_empty_check_nest_level++; + + if (count.max_empty_check_nest_level > 2) + n += count.max_empty_check_nest_level - 2; + if (count.heavy_element != 0) { + if (count.heavy_element < 0x10000) + n += count.heavy_element << 8; + else + n += count.heavy_element; + } + + r = n; + +#ifdef ONIG_DEBUG_PARSE + fprintf(DBGFP, "-- detect can be slow --\n"); + fprintf(DBGFP, " prec_read: %d\n", count.prec_read); + fprintf(DBGFP, " look_behind: %d\n", count.look_behind); + fprintf(DBGFP, " backref: %d\n", count.backref); + fprintf(DBGFP, " backref_with_level: %d\n", count.backref_with_level); + fprintf(DBGFP, " call: %d\n", count.call); + fprintf(DBGFP, " is_keep: %d\n", count.is_keep); + fprintf(DBGFP, " any_reluctant_many: %d\n", count.anychar_reluctant_many); + fprintf(DBGFP, " max_empty_check_nest_level: %d\n", count.max_empty_check_nest_level); + fprintf(DBGFP, " heavy_element: %d\n", count.heavy_element); + fprintf(DBGFP, " r: %d\n", r); + fprintf(DBGFP, "\n"); +#endif + } + + if (IS_NOT_NULL(scan_env.mem_env_dynamic)) + xfree(scan_env.mem_env_dynamic); + + err: + onig_node_free(root); + onig_free(reg); + return r; +} + + +#ifdef ONIG_DEBUG_PARSE + +#ifdef USE_CALL +static void +p_string(FILE* f, int len, UChar* s) +{ + fputs(":", f); + while (len-- > 0) { fputc(*s++, f); } +} +#endif + +static void +Indent(FILE* f, int indent) +{ + int i; + for (i = 0; i < indent; i++) putc(' ', f); +} + +static void +print_indent_tree(FILE* f, Node* node, int indent) +{ + static char* emptiness_name[] = { "", " empty", " empty_mem", " empty_rec" }; + + int i; + NodeType type; + UChar* p; + int add = 3; + + Indent(f, indent); + if (IS_NULL(node)) { + fprintf(f, "ERROR: null node!!!\n"); + exit(0); + } + + type = ND_TYPE(node); + switch (type) { + case ND_LIST: + case ND_ALT: + if (type == ND_LIST) + fprintf(f, "\n", node); + else + fprintf(f, "\n", node); + + print_indent_tree(f, ND_CAR(node), indent + add); + while (IS_NOT_NULL(node = ND_CDR(node))) { + if (ND_TYPE(node) != type) { + fprintf(f, "ERROR: list/alt right is not a cons. %d\n", ND_TYPE(node)); + exit(0); + } + print_indent_tree(f, ND_CAR(node), indent + add); + } + break; + + case ND_STRING: + { + char* str; + char* mode; + + if (ND_STRING_IS_CRUDE(node)) + mode = "-crude"; + else if (ND_IS_IGNORECASE(node)) + mode = "-ignorecase"; + else + mode = ""; + + if (STR_(node)->s == STR_(node)->end) + str = "empty-string"; + else + str = "string"; + + fprintf(f, "<%s%s:%p>", str, mode, node); + for (p = STR_(node)->s; p < STR_(node)->end; p++) { + if (*p >= 0x20 && *p < 0x7f) + fputc(*p, f); + else { + fprintf(f, " 0x%02x", *p); + } + } + } + break; + + case ND_CCLASS: +#define CCLASS_MBUF_MAX_OUTPUT_NUM 10 + + fprintf(f, "", node); + if (IS_NCCLASS_NOT(CCLASS_(node))) fputs(" not", f); + if (CCLASS_(node)->mbuf) { + BBuf* bbuf = CCLASS_(node)->mbuf; + fprintf(f, " mbuf(%u) ", bbuf->used); + for (i = 0; i < bbuf->used && i < CCLASS_MBUF_MAX_OUTPUT_NUM; i++) { + if (i > 0) fprintf(f, ","); + fprintf(f, "%0x", bbuf->p[i]); + } + if (i < bbuf->used) fprintf(f, "..."); + } + break; + + case ND_CTYPE: + fprintf(f, " ", node); + switch (CTYPE_(node)->ctype) { + case CTYPE_ANYCHAR: + fprintf(f, "anychar"); + break; + + case ONIGENC_CTYPE_WORD: + if (CTYPE_(node)->not != 0) + fputs("not word", f); + else + fputs("word", f); + + if (CTYPE_(node)->ascii_mode != 0) + fputs(" (ascii)", f); + + break; + + default: + fprintf(f, "ERROR: undefined ctype.\n"); + exit(0); + } + break; + + case ND_ANCHOR: + fprintf(f, " ", node); + switch (ANCHOR_(node)->type) { + case ANCR_BEGIN_BUF: fputs("begin buf", f); break; + case ANCR_END_BUF: fputs("end buf", f); break; + case ANCR_BEGIN_LINE: fputs("begin line", f); break; + case ANCR_END_LINE: fputs("end line", f); break; + case ANCR_SEMI_END_BUF: fputs("semi end buf", f); break; + case ANCR_BEGIN_POSITION: fputs("begin position", f); break; + + case ANCR_WORD_BOUNDARY: fputs("word boundary", f); break; + case ANCR_NO_WORD_BOUNDARY: fputs("not word boundary", f); break; +#ifdef USE_WORD_BEGIN_END + case ANCR_WORD_BEGIN: fputs("word begin", f); break; + case ANCR_WORD_END: fputs("word end", f); break; +#endif + case ANCR_TEXT_SEGMENT_BOUNDARY: + fputs("text-segment boundary", f); break; + case ANCR_NO_TEXT_SEGMENT_BOUNDARY: + fputs("no text-segment boundary", f); break; + case ANCR_PREC_READ: + fprintf(f, "prec read\n"); + print_indent_tree(f, ND_BODY(node), indent + add); + break; + case ANCR_PREC_READ_NOT: + fprintf(f, "prec read not\n"); + print_indent_tree(f, ND_BODY(node), indent + add); + break; + case ANCR_LOOK_BEHIND: + fprintf(f, "look behind\n"); + print_indent_tree(f, ND_BODY(node), indent + add); + break; + case ANCR_LOOK_BEHIND_NOT: + fprintf(f, "look behind not\n"); + print_indent_tree(f, ND_BODY(node), indent + add); + break; + + default: + fprintf(f, "ERROR: undefined anchor type.\n"); + break; + } + break; + + case ND_BACKREF: + { + int* p; + BackRefNode* br = BACKREF_(node); + p = BACKREFS_P(br); + fprintf(f, "", ND_IS_CHECKER(node) ? "-checker" : "", node); + for (i = 0; i < br->back_num; i++) { + if (i > 0) fputs(", ", f); + fprintf(f, "%d", p[i]); + } +#ifdef USE_BACKREF_WITH_LEVEL + if (ND_IS_NEST_LEVEL(node)) { + fprintf(f, ", level: %d", br->nest_level); + } +#endif + } + break; + +#ifdef USE_CALL + case ND_CALL: + { + CallNode* cn = CALL_(node); + fprintf(f, "", node); + fprintf(f, " num: %d, name", cn->called_gnum); + p_string(f, cn->name_end - cn->name, cn->name); + if (ND_IS_RECURSION(node)) fprintf(f, ", recursion"); + if (ND_IS_INPEEK(node)) fprintf(f, ", in-peek"); + if (ND_IS_IN_REAL_REPEAT(node)) fprintf(f, ", in-real-repeat"); + } + break; +#endif + + case ND_QUANT: + { + fprintf(f, "{%d,%d}%s%s%s", node, + QUANT_(node)->lower, QUANT_(node)->upper, + (QUANT_(node)->greedy ? "" : "?"), + QUANT_(node)->include_referred == 0 ? "" : " referred", + emptiness_name[QUANT_(node)->emptiness]); + if (ND_IS_INPEEK(node)) fprintf(f, ", in-peek"); + fprintf(f, "\n"); + print_indent_tree(f, ND_BODY(node), indent + add); + } + break; + + case ND_BAG: + { + BagNode* bn = BAG_(node); + fprintf(f, " ", node); + if (bn->type == BAG_IF_ELSE) { + Node* Then; + Node* Else; + + fprintf(f, "if-else\n"); + print_indent_tree(f, ND_BODY(node), indent + add); + + Then = bn->te.Then; + Else = bn->te.Else; + if (IS_NULL(Then)) { + Indent(f, indent + add); + fprintf(f, "THEN empty\n"); + } + else + print_indent_tree(f, Then, indent + add); + + if (IS_NULL(Else)) { + Indent(f, indent + add); + fprintf(f, "ELSE empty\n"); + } + else + print_indent_tree(f, Else, indent + add); + } + else { + switch (bn->type) { + case BAG_OPTION: + fprintf(f, "option:%d", bn->o.options); + break; + case BAG_MEMORY: + fprintf(f, "memory:%d", bn->m.regnum); + if (ND_IS_CALLED(node)) { + fprintf(f, ", called"); + if (ND_IS_RECURSION(node)) + fprintf(f, ", recursion"); + } + else if (ND_IS_REFERENCED(node)) + fprintf(f, ", referenced"); + + if (ND_IS_FIXED_ADDR(node)) + fprintf(f, ", fixed-addr"); + if ((bn->m.called_state & IN_PEEK) != 0) + fprintf(f, ", in-peek"); + break; + case BAG_STOP_BACKTRACK: + fprintf(f, "stop-bt"); + break; + default: + break; + } + fprintf(f, "\n"); + print_indent_tree(f, ND_BODY(node), indent + add); + } + } + break; + + case ND_GIMMICK: + fprintf(f, " ", node); + switch (GIMMICK_(node)->type) { + case GIMMICK_FAIL: + fprintf(f, "fail"); + break; + case GIMMICK_SAVE: + fprintf(f, "save:%d:%d", GIMMICK_(node)->detail_type, GIMMICK_(node)->id); + break; + case GIMMICK_UPDATE_VAR: + fprintf(f, "update_var:%d:%d", GIMMICK_(node)->detail_type, GIMMICK_(node)->id); + break; +#ifdef USE_CALLOUT + case GIMMICK_CALLOUT: + switch (GIMMICK_(node)->detail_type) { + case ONIG_CALLOUT_OF_CONTENTS: + fprintf(f, "callout:contents:%d", GIMMICK_(node)->num); + break; + case ONIG_CALLOUT_OF_NAME: + fprintf(f, "callout:name:%d:%d", GIMMICK_(node)->id, GIMMICK_(node)->num); + break; + } +#endif + } + break; + + default: + fprintf(f, "print_indent_tree: undefined node type %d\n", ND_TYPE(node)); + break; + } + + if (type != ND_LIST && type != ND_ALT && type != ND_QUANT && + type != ND_BAG) + fprintf(f, "\n"); + fflush(f); +} + +static void +print_tree(FILE* f, Node* node) +{ + print_indent_tree(f, node, 0); +} +#endif diff --git a/internal/components/third_party/oniguruma/src/regenc.c b/internal/components/third_party/oniguruma/src/regenc.c new file mode 100644 index 0000000000..84afd1ed56 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/regenc.c @@ -0,0 +1,994 @@ +/********************************************************************** + regenc.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regint.h" + +#define LARGE_S 0x53 +#define SMALL_S 0x73 + +OnigEncoding OnigEncDefaultCharEncoding = ONIG_ENCODING_INIT_DEFAULT; + +#define INITED_LIST_SIZE 20 + +static int InitedListNum; + +static struct { + OnigEncoding enc; + int inited; +} InitedList[INITED_LIST_SIZE]; + +static int +enc_inited_entry(OnigEncoding enc) +{ + int i; + + for (i = 0; i < InitedListNum; i++) { + if (InitedList[i].enc == enc) { + InitedList[i].inited = 1; + return i; + } + } + + i = InitedListNum; + if (i < INITED_LIST_SIZE - 1) { + InitedList[i].enc = enc; + InitedList[i].inited = 1; + InitedListNum++; + return i; + } + + return -1; +} + +static int +enc_is_inited(OnigEncoding enc) +{ + int i; + + for (i = 0; i < InitedListNum; i++) { + if (InitedList[i].enc == enc) { + return InitedList[i].inited; + } + } + + return 0; +} + +static int OnigEncInited; + +extern int +onigenc_init(void) +{ + if (OnigEncInited != 0) return 0; + + OnigEncInited = 1; + return 0; +} + +extern int +onigenc_end(void) +{ + int i; + + for (i = 0; i < InitedListNum; i++) { + InitedList[i].enc = 0; + InitedList[i].inited = 0; + } + InitedListNum = 0; + + OnigEncInited = 0; + return ONIG_NORMAL; +} + +extern int +onig_initialize_encoding(OnigEncoding enc) +{ + int r; + + if (enc != ONIG_ENCODING_ASCII && + ONIGENC_IS_ASCII_COMPATIBLE_ENCODING(enc)) { + OnigEncoding ascii = ONIG_ENCODING_ASCII; + if (ascii->init != 0 && enc_is_inited(ascii) == 0) { + r = ascii->init(); + if (r != ONIG_NORMAL) return r; + enc_inited_entry(ascii); + } + } + + if (enc->init != 0 && + enc_is_inited(enc) == 0) { + r = (enc->init)(); + if (r == ONIG_NORMAL) + enc_inited_entry(enc); + return r; + } + + return 0; +} + +extern OnigEncoding +onigenc_get_default_encoding(void) +{ + return OnigEncDefaultCharEncoding; +} + +extern int +onigenc_set_default_encoding(OnigEncoding enc) +{ + OnigEncDefaultCharEncoding = enc; + return 0; +} + +extern UChar* +onigenc_strdup(OnigEncoding enc, const UChar* s, const UChar* end) +{ + int slen, term_len, i; + UChar *r; + + slen = (int )(end - s); + term_len = ONIGENC_MBC_MINLEN(enc); + + r = (UChar* )xmalloc(slen + term_len); + CHECK_NULL_RETURN(r); + xmemcpy(r, s, slen); + + for (i = 0; i < term_len; i++) + r[slen + i] = (UChar )0; + + return r; +} + +extern UChar* +onigenc_get_right_adjust_char_head(OnigEncoding enc, const UChar* start, const UChar* s) +{ + UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s); + if (p < s) { + p += enclen(enc, p); + } + return p; +} + +extern UChar* +onigenc_get_right_adjust_char_head_with_prev(OnigEncoding enc, + const UChar* start, const UChar* s, const UChar** prev) +{ + UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s); + + if (p < s) { + if (prev) *prev = (const UChar* )p; + p += enclen(enc, p); + } + else { + if (prev) + *prev = onigenc_get_prev_char_head(enc, start, p); + } + return p; +} + +extern UChar* +onigenc_get_prev_char_head(OnigEncoding enc, const UChar* start, const UChar* s) +{ + if (s <= start) + return (UChar* )NULL; + + return ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s - 1); +} + +extern UChar* +onigenc_step_back(OnigEncoding enc, const UChar* start, const UChar* s, int n) +{ + while (ONIG_IS_NOT_NULL(s) && n-- > 0) { + if (s <= start) + return (UChar* )NULL; + + s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s - 1); + } + return (UChar* )s; +} + +extern UChar* +onigenc_step(OnigEncoding enc, const UChar* p, const UChar* end, int n) +{ + UChar* q = (UChar* )p; + while (n-- > 0) { + q += ONIGENC_MBC_ENC_LEN(enc, q); + } + return (q <= end ? q : NULL); +} + +extern int +onigenc_strlen(OnigEncoding enc, const UChar* p, const UChar* end) +{ + int n = 0; + UChar* q = (UChar* )p; + + while (q < end) { + q += ONIGENC_MBC_ENC_LEN(enc, q); + n++; + } + return n; +} + +extern int +onigenc_strlen_null(OnigEncoding enc, const UChar* s) +{ + int n = 0; + UChar* p = (UChar* )s; + + while (1) { + if (*p == '\0') { + UChar* q; + int len = ONIGENC_MBC_MINLEN(enc); + + if (len == 1) return n; + q = p + 1; + while (len > 1) { + if (*q != '\0') break; + q++; + len--; + } + if (len == 1) return n; + } + p += ONIGENC_MBC_ENC_LEN(enc, p); + n++; + } +} + +extern int +onigenc_str_bytelen_null(OnigEncoding enc, const UChar* s) +{ + const UChar* start = s; + const UChar* p = s; + + while (1) { + if (*p == '\0') { + const UChar* q; + int len = ONIGENC_MBC_MINLEN(enc); + + if (len == 1) return (int )(p - start); + q = p + 1; + while (len > 1) { + if (*q != '\0') break; + q++; + len--; + } + if (len == 1) return (int )(p - start); + } + p += ONIGENC_MBC_ENC_LEN(enc, p); + } +} + +const UChar OnigEncAsciiToLowerCaseTable[] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', +}; + +#ifdef USE_UPPER_CASE_TABLE +const UChar OnigEncAsciiToUpperCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\101', '\102', '\103', '\104', '\105', '\106', '\107', + '\110', '\111', '\112', '\113', '\114', '\115', '\116', '\117', + '\120', '\121', '\122', '\123', '\124', '\125', '\126', '\127', + '\130', '\131', '\132', '\133', '\134', '\135', '\136', '\137', + '\140', '\101', '\102', '\103', '\104', '\105', '\106', '\107', + '\110', '\111', '\112', '\113', '\114', '\115', '\116', '\117', + '\120', '\121', '\122', '\123', '\124', '\125', '\126', '\127', + '\130', '\131', '\132', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', +}; +#endif + +const unsigned short OnigEncAsciiCtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 +}; + +const UChar OnigEncISO_8859_1_ToLowerCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' +}; + +#ifdef USE_UPPER_CASE_TABLE +const UChar OnigEncISO_8859_1_ToUpperCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\101', '\102', '\103', '\104', '\105', '\106', '\107', + '\110', '\111', '\112', '\113', '\114', '\115', '\116', '\117', + '\120', '\121', '\122', '\123', '\124', '\125', '\126', '\127', + '\130', '\131', '\132', '\133', '\134', '\135', '\136', '\137', + '\140', '\101', '\102', '\103', '\104', '\105', '\106', '\107', + '\110', '\111', '\112', '\113', '\114', '\115', '\116', '\117', + '\120', '\121', '\122', '\123', '\124', '\125', '\126', '\127', + '\130', '\131', '\132', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\367', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\377', +}; +#endif + +extern void +onigenc_set_default_caseconv_table(const UChar* table ARG_UNUSED) +{ + /* nothing */ + /* obsoleted. */ +} + +extern UChar* +onigenc_get_left_adjust_char_head(OnigEncoding enc, const UChar* start, const UChar* s) +{ + return ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s); +} + +const OnigPairCaseFoldCodes OnigAsciiLowerMap[] = { + { 0x41, 0x61 }, + { 0x42, 0x62 }, + { 0x43, 0x63 }, + { 0x44, 0x64 }, + { 0x45, 0x65 }, + { 0x46, 0x66 }, + { 0x47, 0x67 }, + { 0x48, 0x68 }, + { 0x49, 0x69 }, + { 0x4a, 0x6a }, + { 0x4b, 0x6b }, + { 0x4c, 0x6c }, + { 0x4d, 0x6d }, + { 0x4e, 0x6e }, + { 0x4f, 0x6f }, + { 0x50, 0x70 }, + { 0x51, 0x71 }, + { 0x52, 0x72 }, + { 0x53, 0x73 }, + { 0x54, 0x74 }, + { 0x55, 0x75 }, + { 0x56, 0x76 }, + { 0x57, 0x77 }, + { 0x58, 0x78 }, + { 0x59, 0x79 }, + { 0x5a, 0x7a } +}; + +extern int +onigenc_ascii_apply_all_case_fold(OnigCaseFoldType flag ARG_UNUSED, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + OnigCodePoint code; + int i, r; + + for (i = 0; + i < (int )(sizeof(OnigAsciiLowerMap)/sizeof(OnigPairCaseFoldCodes)); + i++) { + code = OnigAsciiLowerMap[i].to; + r = (*f)(OnigAsciiLowerMap[i].from, &code, 1, arg); + if (r != 0) return r; + + code = OnigAsciiLowerMap[i].from; + r = (*f)(OnigAsciiLowerMap[i].to, &code, 1, arg); + if (r != 0) return r; + } + + return 0; +} + +extern int +onigenc_ascii_get_case_fold_codes_by_str(OnigCaseFoldType flag ARG_UNUSED, + const OnigUChar* p, const OnigUChar* end ARG_UNUSED, + OnigCaseFoldCodeItem items[]) +{ + if (0x41 <= *p && *p <= 0x5a) { + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = (OnigCodePoint )(*p + 0x20); + return 1; + } + else if (0x61 <= *p && *p <= 0x7a) { + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = (OnigCodePoint )(*p - 0x20); + return 1; + } + else + return 0; +} + +static int +ss_apply_all_case_fold(OnigCaseFoldType flag ARG_UNUSED, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + static OnigCodePoint ss[] = { SMALL_S, SMALL_S }; + + return (*f)((OnigCodePoint )0xdf, ss, 2, arg); +} + +extern int +onigenc_apply_all_case_fold_with_map(int map_size, + const OnigPairCaseFoldCodes map[], + int ess_tsett_flag, OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + OnigCodePoint code; + int i, r; + + r = onigenc_ascii_apply_all_case_fold(flag, f, arg); + if (r != 0) return r; + + if (CASE_FOLD_IS_ASCII_ONLY(flag)) + return 0; + + for (i = 0; i < map_size; i++) { + code = map[i].to; + r = (*f)(map[i].from, &code, 1, arg); + if (r != 0) return r; + + code = map[i].from; + r = (*f)(map[i].to, &code, 1, arg); + if (r != 0) return r; + } + + if (ess_tsett_flag != 0) + return ss_apply_all_case_fold(flag, f, arg); + + return 0; +} + +extern int +onigenc_get_case_fold_codes_by_str_with_map(int map_size, + const OnigPairCaseFoldCodes map[], + int ess_tsett_flag, OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + int i, j, n; + static OnigUChar sa[] = { LARGE_S, SMALL_S }; + + if (0x41 <= *p && *p <= 0x5a) { /* A - Z */ + if (*p == LARGE_S && ess_tsett_flag != 0 && end > p + 1 + && (*(p+1) == LARGE_S || *(p+1) == SMALL_S) /* SS */ + && CASE_FOLD_IS_NOT_ASCII_ONLY(flag)) { + ss_combination: + items[0].byte_len = 2; + items[0].code_len = 1; + items[0].code[0] = (OnigCodePoint )0xdf; + + n = 1; + for (i = 0; i < 2; i++) { + for (j = 0; j < 2; j++) { + if (sa[i] == *p && sa[j] == *(p+1)) + continue; + + items[n].byte_len = 2; + items[n].code_len = 2; + items[n].code[0] = (OnigCodePoint )sa[i]; + items[n].code[1] = (OnigCodePoint )sa[j]; + n++; + } + } + return 4; + } + + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = (OnigCodePoint )(*p + 0x20); + return 1; + } + else if (0x61 <= *p && *p <= 0x7a) { /* a - z */ + if (*p == SMALL_S && ess_tsett_flag != 0 && end > p + 1 + && (*(p+1) == SMALL_S || *(p+1) == LARGE_S) + && CASE_FOLD_IS_NOT_ASCII_ONLY(flag)) { + goto ss_combination; + } + + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = (OnigCodePoint )(*p - 0x20); + return 1; + } + else if (*p == 0xdf && ess_tsett_flag != 0 + && CASE_FOLD_IS_NOT_ASCII_ONLY(flag)) { + items[0].byte_len = 1; + items[0].code_len = 2; + items[0].code[0] = (OnigCodePoint )'s'; + items[0].code[1] = (OnigCodePoint )'s'; + + items[1].byte_len = 1; + items[1].code_len = 2; + items[1].code[0] = (OnigCodePoint )'S'; + items[1].code[1] = (OnigCodePoint )'S'; + + items[2].byte_len = 1; + items[2].code_len = 2; + items[2].code[0] = (OnigCodePoint )'s'; + items[2].code[1] = (OnigCodePoint )'S'; + + items[3].byte_len = 1; + items[3].code_len = 2; + items[3].code[0] = (OnigCodePoint )'S'; + items[3].code[1] = (OnigCodePoint )'s'; + + return 4; + } + else { + int i; + + if (CASE_FOLD_IS_ASCII_ONLY(flag)) + return 0; + + for (i = 0; i < map_size; i++) { + if (*p == map[i].from) { + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = map[i].to; + return 1; + } + else if (*p == map[i].to) { + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = map[i].from; + return 1; + } + } + } + + return 0; +} + + +extern int +onigenc_not_support_get_ctype_code_range(OnigCtype ctype ARG_UNUSED, + OnigCodePoint* sb_out ARG_UNUSED, + const OnigCodePoint* ranges[] ARG_UNUSED) +{ + return ONIG_NO_SUPPORT_CONFIG; +} + +extern int +onigenc_is_mbc_newline_0x0a(const UChar* p, const UChar* end) +{ + if (p < end) { + if (*p == NEWLINE_CODE) return 1; + } + return 0; +} + +/* for single byte encodings */ +extern int +onigenc_ascii_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED, const UChar** p, + const UChar*end ARG_UNUSED, UChar* lower) +{ + *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(**p); + + (*p)++; + return 1; /* return byte length of converted char to lower */ +} + +extern int +onigenc_single_byte_mbc_enc_len(const UChar* p ARG_UNUSED) +{ + return 1; +} + +extern OnigCodePoint +onigenc_single_byte_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED) +{ + return (OnigCodePoint )(*p); +} + +extern int +onigenc_single_byte_code_to_mbclen(OnigCodePoint code ARG_UNUSED) +{ + return (code < 0x100 ? 1 : ONIGERR_INVALID_CODE_POINT_VALUE); +} + +extern int +onigenc_single_byte_code_to_mbc(OnigCodePoint code, UChar *buf) +{ + *buf = (UChar )(code & 0xff); + return 1; +} + +extern UChar* +onigenc_single_byte_left_adjust_char_head(const UChar* start ARG_UNUSED, + const UChar* s) +{ + return (UChar* )s; +} + +extern int +onigenc_always_true_is_allowed_reverse_match(const UChar* s ARG_UNUSED, + const UChar* end ARG_UNUSED) +{ + return TRUE; +} + +extern int +onigenc_always_false_is_allowed_reverse_match(const UChar* s ARG_UNUSED, + const UChar* end ARG_UNUSED) +{ + return FALSE; +} + +extern int +onigenc_always_true_is_valid_mbc_string(const UChar* s ARG_UNUSED, + const UChar* end ARG_UNUSED) +{ + return TRUE; +} + +extern int +onigenc_length_check_is_valid_mbc_string(OnigEncoding enc, + const UChar* p, const UChar* end) +{ + while (p < end) { + p += enclen(enc, p); + } + + if (p != end) + return FALSE; + else + return TRUE; +} + +extern int +onigenc_is_valid_mbc_string(OnigEncoding enc, const UChar* s, const UChar* end) +{ + return ONIGENC_IS_VALID_MBC_STRING(enc, s, end); +} + +extern OnigCodePoint +onigenc_mbn_mbc_to_code(OnigEncoding enc, const UChar* p, const UChar* end) +{ + int c, i, len; + OnigCodePoint n; + + len = enclen(enc, p); + n = (OnigCodePoint )(*p++); + if (len == 1) return n; + + for (i = 1; i < len; i++) { + if (p >= end) break; + c = *p++; + n <<= 8; n += c; + } + return n; +} + +extern int +onigenc_mbn_mbc_case_fold(OnigEncoding enc, OnigCaseFoldType flag ARG_UNUSED, + const UChar** pp, const UChar* end ARG_UNUSED, + UChar* lower) +{ + int len; + const UChar *p = *pp; + + if (ONIGENC_IS_MBC_ASCII(p)) { + *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); + (*pp)++; + return 1; + } + else { + int i; + + len = enclen(enc, p); + for (i = 0; i < len; i++) { + *lower++ = *p++; + } + (*pp) += len; + return len; /* return byte length of converted to lower char */ + } +} + +extern int +onigenc_mb2_code_to_mbc(OnigEncoding enc, OnigCodePoint code, UChar *buf) +{ + UChar *p = buf; + + if ((code & 0xff00) != 0) { + *p++ = (UChar )((code >> 8) & 0xff); + } + *p++ = (UChar )(code & 0xff); + +#if 1 + if (enclen(enc, buf) != (p - buf)) + return ONIGERR_INVALID_CODE_POINT_VALUE; +#endif + return (int )(p - buf); +} + +extern int +onigenc_mb4_code_to_mbc(OnigEncoding enc, OnigCodePoint code, UChar *buf) +{ + UChar *p = buf; + + if ((code & 0xff000000) != 0) { + *p++ = (UChar )((code >> 24) & 0xff); + } + if ((code & 0xff0000) != 0 || p != buf) { + *p++ = (UChar )((code >> 16) & 0xff); + } + if ((code & 0xff00) != 0 || p != buf) { + *p++ = (UChar )((code >> 8) & 0xff); + } + *p++ = (UChar )(code & 0xff); + +#if 1 + if (enclen(enc, buf) != (p - buf)) + return ONIGERR_INVALID_CODE_POINT_VALUE; +#endif + return (int )(p - buf); +} + +extern int +onigenc_minimum_property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end) +{ + static PosixBracketEntryType PBS[] = { + { (UChar* )"Alnum", ONIGENC_CTYPE_ALNUM, 5 }, + { (UChar* )"Alpha", ONIGENC_CTYPE_ALPHA, 5 }, + { (UChar* )"Blank", ONIGENC_CTYPE_BLANK, 5 }, + { (UChar* )"Cntrl", ONIGENC_CTYPE_CNTRL, 5 }, + { (UChar* )"Digit", ONIGENC_CTYPE_DIGIT, 5 }, + { (UChar* )"Graph", ONIGENC_CTYPE_GRAPH, 5 }, + { (UChar* )"Lower", ONIGENC_CTYPE_LOWER, 5 }, + { (UChar* )"Print", ONIGENC_CTYPE_PRINT, 5 }, + { (UChar* )"Punct", ONIGENC_CTYPE_PUNCT, 5 }, + { (UChar* )"Space", ONIGENC_CTYPE_SPACE, 5 }, + { (UChar* )"Upper", ONIGENC_CTYPE_UPPER, 5 }, + { (UChar* )"XDigit", ONIGENC_CTYPE_XDIGIT, 6 }, + { (UChar* )"ASCII", ONIGENC_CTYPE_ASCII, 5 }, + { (UChar* )"Word", ONIGENC_CTYPE_WORD, 4 }, + { (UChar* )NULL, -1, 0 } + }; + + PosixBracketEntryType *pb; + int len; + + len = onigenc_strlen(enc, p, end); + for (pb = PBS; IS_NOT_NULL(pb->name); pb++) { + if (len == pb->len && + onigenc_with_ascii_strncmp(enc, p, end, pb->name, pb->len) == 0) + return pb->ctype; + } + + return ONIGERR_INVALID_CHAR_PROPERTY_NAME; +} + +extern int +onigenc_is_mbc_word_ascii(OnigEncoding enc, UChar* s, const UChar* end) +{ + OnigCodePoint code = ONIGENC_MBC_TO_CODE(enc, s, end); + + if (code > ASCII_LIMIT) return 0; + + return ONIGENC_IS_ASCII_CODE_WORD(code); +} + +extern int +onigenc_mb2_is_code_ctype(OnigEncoding enc, OnigCodePoint code, + unsigned int ctype) +{ + if (code < 128) + return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype); + else { + if (CTYPE_IS_WORD_GRAPH_PRINT(ctype)) { + return (ONIGENC_CODE_TO_MBCLEN(enc, code) > 1 ? TRUE : FALSE); + } + } + + return FALSE; +} + +extern int +onigenc_mb4_is_code_ctype(OnigEncoding enc, OnigCodePoint code, + unsigned int ctype) +{ + if (code < 128) + return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype); + else { + if (CTYPE_IS_WORD_GRAPH_PRINT(ctype)) { + return (ONIGENC_CODE_TO_MBCLEN(enc, code) > 1 ? TRUE : FALSE); + } + } + + return FALSE; +} + +extern int +onigenc_with_ascii_strncmp(OnigEncoding enc, const UChar* p, const UChar* end, + const UChar* sascii /* ascii */, int n) +{ + int x, c; + + while (n-- > 0) { + if (p >= end) return (int )(*sascii); + + c = (int )ONIGENC_MBC_TO_CODE(enc, p, end); + x = *sascii - c; + if (x) return x; + + sascii++; + p += enclen(enc, p); + } + return 0; +} + +extern int +onig_codes_cmp(OnigCodePoint a[], OnigCodePoint b[], int n) +{ + int i; + + for (i = 0; i < n; i++) { + if (a[i] != b[i]) + return -1; + } + + return 0; +} + +extern int +onig_codes_byte_at(OnigCodePoint codes[], int at) +{ + int index; + int b; + OnigCodePoint code; + + index = at / 3; + b = at % 3; + code = codes[index]; + + return ((code >> ((2 - b) * 8)) & 0xff); +} diff --git a/internal/components/third_party/oniguruma/src/regenc.h b/internal/components/third_party/oniguruma/src/regenc.h new file mode 100644 index 0000000000..560cca7532 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/regenc.h @@ -0,0 +1,290 @@ +#ifndef REGENC_H +#define REGENC_H +/********************************************************************** + regenc.h - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef ONIGURUMA_EXPORT +#define ONIGURUMA_EXPORT +#endif + +#if defined(_WIN32) || defined(_WIN64) + #include "config_windows.h" +#else + #include "config.h" +#endif + +#ifndef ONIG_NO_STANDARD_C_HEADERS +#include +#endif + +#ifdef ONIG_ESCAPE_UCHAR_COLLISION +#undef ONIG_ESCAPE_UCHAR_COLLISION +#endif + +#include "oniguruma.h" + +typedef struct { + OnigCodePoint from; + OnigCodePoint to; +} OnigPairCaseFoldCodes; + + +#ifndef NULL +#define NULL ((void* )0) +#endif + +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifndef ARG_UNUSED +#if defined(__GNUC__) +# define ARG_UNUSED __attribute__ ((unused)) +#else +# define ARG_UNUSED +#endif +#endif + +#define ONIG_IS_NULL(p) (((void*)(p)) == (void*)0) +#define ONIG_IS_NOT_NULL(p) (((void*)(p)) != (void*)0) +#define ONIG_CHECK_NULL_RETURN(p) if (ONIG_IS_NULL(p)) return NULL +#define ONIG_CHECK_NULL_RETURN_VAL(p,val) if (ONIG_IS_NULL(p)) return (val) + +#define MAX_CODE_POINT (~((OnigCodePoint )0)) +#define ASCII_LIMIT 127 +#define NEWLINE_CODE 0x0a + +#define enclen(enc,p) ONIGENC_MBC_ENC_LEN(enc,p) + +/* character types bit flag */ +#define BIT_CTYPE_NEWLINE (1<< ONIGENC_CTYPE_NEWLINE) +#define BIT_CTYPE_ALPHA (1<< ONIGENC_CTYPE_ALPHA) +#define BIT_CTYPE_BLANK (1<< ONIGENC_CTYPE_BLANK) +#define BIT_CTYPE_CNTRL (1<< ONIGENC_CTYPE_CNTRL) +#define BIT_CTYPE_DIGIT (1<< ONIGENC_CTYPE_DIGIT) +#define BIT_CTYPE_GRAPH (1<< ONIGENC_CTYPE_GRAPH) +#define BIT_CTYPE_LOWER (1<< ONIGENC_CTYPE_LOWER) +#define BIT_CTYPE_PRINT (1<< ONIGENC_CTYPE_PRINT) +#define BIT_CTYPE_PUNCT (1<< ONIGENC_CTYPE_PUNCT) +#define BIT_CTYPE_SPACE (1<< ONIGENC_CTYPE_SPACE) +#define BIT_CTYPE_UPPER (1<< ONIGENC_CTYPE_UPPER) +#define BIT_CTYPE_XDIGIT (1<< ONIGENC_CTYPE_XDIGIT) +#define BIT_CTYPE_WORD (1<< ONIGENC_CTYPE_WORD) +#define BIT_CTYPE_ALNUM (1<< ONIGENC_CTYPE_ALNUM) +#define BIT_CTYPE_ASCII (1<< ONIGENC_CTYPE_ASCII) + +#define CTYPE_TO_BIT(ctype) (1<<(ctype)) +#define CTYPE_IS_WORD_GRAPH_PRINT(ctype) \ + ((ctype) == ONIGENC_CTYPE_WORD || (ctype) == ONIGENC_CTYPE_GRAPH ||\ + (ctype) == ONIGENC_CTYPE_PRINT) + + +typedef struct { + UChar *name; + int ctype; + short int len; +} PosixBracketEntryType; + +struct PropertyNameCtype { + char *name; + int ctype; +}; + +/* #define USE_CRNL_AS_LINE_TERMINATOR */ +#define USE_UNICODE_PROPERTIES +#define USE_UNICODE_EXTENDED_GRAPHEME_CLUSTER +#define USE_UNICODE_WORD_BREAK +/* #define USE_UNICODE_CASE_FOLD_TURKISH_AZERI */ +/* #define USE_UNICODE_ALL_LINE_TERMINATORS */ /* see Unicode.org UTS #18 */ + + +#define ONIG_ENCODING_INIT_DEFAULT ONIG_ENCODING_ASCII + + +#define ENC_SKIP_OFFSET_1_OR_0 7 + +#define ENC_FLAG_ASCII_COMPATIBLE (1<<0) +#define ENC_FLAG_UNICODE (1<<1) +#define ENC_FLAG_SKIP_OFFSET_MASK (7<<2) +#define ENC_FLAG_SKIP_OFFSET_0 0 +#define ENC_FLAG_SKIP_OFFSET_1 (1<<2) +#define ENC_FLAG_SKIP_OFFSET_2 (2<<2) +#define ENC_FLAG_SKIP_OFFSET_3 (3<<2) +#define ENC_FLAG_SKIP_OFFSET_4 (4<<2) +#define ENC_FLAG_SKIP_OFFSET_1_OR_0 (ENC_SKIP_OFFSET_1_OR_0<<2) + +#define ENC_GET_SKIP_OFFSET(enc) \ + (((enc)->flag & ENC_FLAG_SKIP_OFFSET_MASK)>>2) + +#define CASE_FOLD_IS_ASCII_ONLY(flag) \ + (((flag) & ONIGENC_CASE_FOLD_ASCII_ONLY) != 0) +#define CASE_FOLD_IS_NOT_ASCII_ONLY(flag) \ + (((flag) & ONIGENC_CASE_FOLD_ASCII_ONLY) == 0) + +/* for encoding system implementation (internal) */ +extern int onigenc_end(void); +extern int onigenc_ascii_apply_all_case_fold P_((OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg)); +extern int onigenc_ascii_get_case_fold_codes_by_str P_((OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])); +extern int onigenc_apply_all_case_fold_with_map P_((int map_size, const OnigPairCaseFoldCodes map[], int ess_tsett_flag, OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg)); +extern int onigenc_get_case_fold_codes_by_str_with_map P_((int map_size, const OnigPairCaseFoldCodes map[], int ess_tsett_flag, OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])); +extern int onigenc_not_support_get_ctype_code_range P_((OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[])); +extern int onigenc_is_mbc_newline_0x0a P_((const UChar* p, const UChar* end)); + + +/* methods for single byte encoding */ +extern int onigenc_ascii_mbc_case_fold P_((OnigCaseFoldType flag, const UChar** p, const UChar* end, UChar* lower)); +extern int onigenc_single_byte_mbc_enc_len P_((const UChar* p)); +extern OnigCodePoint onigenc_single_byte_mbc_to_code P_((const UChar* p, const UChar* end)); +extern int onigenc_single_byte_code_to_mbclen P_((OnigCodePoint code)); +extern int onigenc_single_byte_code_to_mbc P_((OnigCodePoint code, UChar *buf)); +extern UChar* onigenc_single_byte_left_adjust_char_head P_((const UChar* start, const UChar* s)); +extern int onigenc_always_true_is_allowed_reverse_match P_((const UChar* s, const UChar* end)); +extern int onigenc_always_false_is_allowed_reverse_match P_((const UChar* s, const UChar* end)); +extern int onigenc_always_true_is_valid_mbc_string P_((const UChar* s, const UChar* end)); +extern int onigenc_length_check_is_valid_mbc_string P_((OnigEncoding enc, const UChar* s, const UChar* end)); + +/* methods for multi byte encoding */ +extern OnigCodePoint onigenc_mbn_mbc_to_code P_((OnigEncoding enc, const UChar* p, const UChar* end)); +extern int onigenc_mbn_mbc_case_fold P_((OnigEncoding enc, OnigCaseFoldType flag, const UChar** p, const UChar* end, UChar* lower)); +extern int onigenc_mb2_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf)); +extern int onigenc_minimum_property_name_to_ctype P_((OnigEncoding enc, UChar* p, UChar* end)); +extern int onigenc_unicode_property_name_to_ctype P_((OnigEncoding enc, UChar* p, UChar* end)); +extern int onigenc_is_mbc_word_ascii P_((OnigEncoding enc, UChar* s, const UChar* end)); +extern int onigenc_mb2_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype)); +extern int onigenc_mb4_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf)); +extern int onigenc_mb4_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype)); +extern struct PropertyNameCtype* onigenc_euc_jp_lookup_property_name P_((register const char *str, register size_t len)); +extern struct PropertyNameCtype* onigenc_sjis_lookup_property_name P_((register const char *str, register size_t len)); + +/* in unicode.c */ +extern int onigenc_unicode_is_code_ctype P_((OnigCodePoint code, unsigned int ctype)); +extern int onigenc_utf16_32_get_ctype_code_range P_((OnigCtype ctype, OnigCodePoint *sb_out, const OnigCodePoint* ranges[])); +extern int onigenc_unicode_ctype_code_range P_((OnigCtype ctype, const OnigCodePoint* ranges[])); +extern int onigenc_unicode_get_case_fold_codes_by_str P_((OnigEncoding enc, OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])); +extern int onigenc_unicode_mbc_case_fold P_((OnigEncoding enc, OnigCaseFoldType flag, const UChar** pp, const UChar* end, UChar* fold)); +extern int onigenc_unicode_apply_all_case_fold P_((OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg)); + +extern int onigenc_egcb_is_break_position P_((OnigEncoding enc, UChar* p, UChar* prev, const UChar* start, const UChar* end)); + +#ifdef USE_UNICODE_WORD_BREAK +extern int onigenc_wb_is_break_position P_((OnigEncoding enc, UChar* p, UChar* prev, const UChar* start, const UChar* end)); +#endif + +#define UTF16_IS_SURROGATE_FIRST(c) (((c) & 0xfc) == 0xd8) +#define UTF16_IS_SURROGATE_SECOND(c) (((c) & 0xfc) == 0xdc) + +/* from unicode generated codes */ +#define FOLDS1_FOLD(i) (OnigUnicodeFolds1 + (i)) +#define FOLDS2_FOLD(i) (OnigUnicodeFolds2 + (i)) +#define FOLDS3_FOLD(i) (OnigUnicodeFolds3 + (i)) +#define FOLDS1_UNFOLDS_NUM(i) (OnigUnicodeFolds1[(i)+1]) +#define FOLDS2_UNFOLDS_NUM(i) (OnigUnicodeFolds2[(i)+2]) +#define FOLDS3_UNFOLDS_NUM(i) (OnigUnicodeFolds3[(i)+3]) +#define FOLDS1_UNFOLDS(i) (FOLDS1_FOLD(i) + 2) +#define FOLDS2_UNFOLDS(i) (FOLDS2_FOLD(i) + 3) +#define FOLDS3_UNFOLDS(i) (FOLDS3_FOLD(i) + 4) +#define FOLDS1_NEXT_INDEX(i) ((i) + 2 + FOLDS1_UNFOLDS_NUM(i)) +#define FOLDS2_NEXT_INDEX(i) ((i) + 3 + FOLDS2_UNFOLDS_NUM(i)) +#define FOLDS3_NEXT_INDEX(i) ((i) + 4 + FOLDS3_UNFOLDS_NUM(i)) + +#define FOLDS_FOLD_ADDR_BUK(buk, addr) do {\ + if ((buk)->fold_len == 1)\ + addr = OnigUnicodeFolds1 + (buk)->index;\ + else if ((buk)->fold_len == 2)\ + addr = OnigUnicodeFolds2 + (buk)->index;\ + else if ((buk)->fold_len == 3)\ + addr = OnigUnicodeFolds3 + (buk)->index;\ + else\ + return ONIGERR_INVALID_CODE_POINT_VALUE;\ +} while (0) + +extern OnigCodePoint OnigUnicodeFolds1[]; +extern OnigCodePoint OnigUnicodeFolds2[]; +extern OnigCodePoint OnigUnicodeFolds3[]; + +struct ByUnfoldKey { + OnigCodePoint code; + short int index; + short int fold_len; +}; + +extern const struct ByUnfoldKey* onigenc_unicode_unfold_key(OnigCodePoint code); +extern int onigenc_unicode_fold1_key(OnigCodePoint code[]); +extern int onigenc_unicode_fold2_key(OnigCodePoint code[]); +extern int onigenc_unicode_fold3_key(OnigCodePoint code[]); + +extern int onig_codes_cmp(OnigCodePoint a[], OnigCodePoint b[], int n); +extern int onig_codes_byte_at(OnigCodePoint code[], int at); + + + +#define ONIGENC_ISO_8859_1_TO_LOWER_CASE(c) \ + OnigEncISO_8859_1_ToLowerCaseTable[c] +#define ONIGENC_ISO_8859_1_TO_UPPER_CASE(c) \ + OnigEncISO_8859_1_ToUpperCaseTable[c] + +extern const UChar OnigEncISO_8859_1_ToLowerCaseTable[]; +extern const UChar OnigEncISO_8859_1_ToUpperCaseTable[]; + +extern int +onigenc_with_ascii_strncmp P_((OnigEncoding enc, const UChar* p, const UChar* end, const UChar* sascii /* ascii */, int n)); +extern UChar* +onigenc_step P_((OnigEncoding enc, const UChar* p, const UChar* end, int n)); + +/* defined in regexec.c, but used in enc/xxx.c */ +extern int onig_is_in_code_range P_((const UChar* p, OnigCodePoint code)); + +extern OnigEncoding OnigEncDefaultCharEncoding; +extern const UChar OnigEncAsciiToLowerCaseTable[]; +extern const UChar OnigEncAsciiToUpperCaseTable[]; +extern const unsigned short OnigEncAsciiCtypeTable[]; + + +#define ONIGENC_IS_ASCII_CODE(code) ((code) < 0x80) +#define ONIGENC_ASCII_CODE_TO_LOWER_CASE(c) OnigEncAsciiToLowerCaseTable[c] +#define ONIGENC_ASCII_CODE_TO_UPPER_CASE(c) OnigEncAsciiToUpperCaseTable[c] +#define ONIGENC_IS_ASCII_CODE_CTYPE(code,ctype) \ + ((OnigEncAsciiCtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) +#define ONIGENC_IS_ASCII_CODE_WORD(code) \ + ((OnigEncAsciiCtypeTable[code] & CTYPE_TO_BIT(ONIGENC_CTYPE_WORD)) != 0) +#define ONIGENC_IS_ASCII_CODE_CASE_AMBIG(code) \ + (ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_UPPER) ||\ + ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_LOWER)) + +#define ONIGENC_IS_UNICODE_ENCODING(enc) \ + (((enc)->flag & ENC_FLAG_UNICODE) != 0) + +#define ONIGENC_IS_ASCII_COMPATIBLE_ENCODING(enc) \ + (((enc)->flag & ENC_FLAG_ASCII_COMPATIBLE) != 0) + +#endif /* REGENC_H */ diff --git a/internal/components/third_party/oniguruma/src/regerror.c b/internal/components/third_party/oniguruma/src/regerror.c new file mode 100644 index 0000000000..72b0e3f88e --- /dev/null +++ b/internal/components/third_party/oniguruma/src/regerror.c @@ -0,0 +1,414 @@ +/********************************************************************** + regerror.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2022 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef NEED_TO_INCLUDE_STDIO +/* for vsnprintf() */ +#define NEED_TO_INCLUDE_STDIO +#endif + +#include "regint.h" + +extern UChar* +onig_error_code_to_format(int code) +{ + char *p; + + switch (code) { + case ONIG_MISMATCH: + p = "mismatch"; break; + case ONIG_NO_SUPPORT_CONFIG: + p = "no support in this configuration"; break; + case ONIG_ABORT: + p = "abort"; break; + case ONIGERR_MEMORY: + p = "fail to memory allocation"; break; + case ONIGERR_MATCH_STACK_LIMIT_OVER: + p = "match-stack limit over"; break; + case ONIGERR_PARSE_DEPTH_LIMIT_OVER: + p = "parse depth limit over"; break; + case ONIGERR_RETRY_LIMIT_IN_MATCH_OVER: + p = "retry-limit-in-match over"; break; + case ONIGERR_RETRY_LIMIT_IN_SEARCH_OVER: + p = "retry-limit-in-search over"; break; + case ONIGERR_SUBEXP_CALL_LIMIT_IN_SEARCH_OVER: + p = "subexp-call-limit-in-search over"; break; + case ONIGERR_TYPE_BUG: + p = "undefined type (bug)"; break; + case ONIGERR_PARSER_BUG: + p = "internal parser error (bug)"; break; + case ONIGERR_STACK_BUG: + p = "stack error (bug)"; break; + case ONIGERR_UNDEFINED_BYTECODE: + p = "undefined bytecode (bug)"; break; + case ONIGERR_UNEXPECTED_BYTECODE: + p = "unexpected bytecode (bug)"; break; + case ONIGERR_DEFAULT_ENCODING_IS_NOT_SET: + p = "default multibyte-encoding is not set"; break; + case ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR: + p = "can't convert to wide-char on specified multibyte-encoding"; break; + case ONIGERR_FAIL_TO_INITIALIZE: + p = "fail to initialize"; break; + case ONIGERR_INVALID_ARGUMENT: + p = "invalid argument"; break; + case ONIGERR_END_PATTERN_AT_LEFT_BRACE: + p = "end pattern at left brace"; break; + case ONIGERR_END_PATTERN_AT_LEFT_BRACKET: + p = "end pattern at left bracket"; break; + case ONIGERR_EMPTY_CHAR_CLASS: + p = "empty char-class"; break; + case ONIGERR_PREMATURE_END_OF_CHAR_CLASS: + p = "premature end of char-class"; break; + case ONIGERR_END_PATTERN_AT_ESCAPE: + p = "end pattern at escape"; break; + case ONIGERR_END_PATTERN_AT_META: + p = "end pattern at meta"; break; + case ONIGERR_END_PATTERN_AT_CONTROL: + p = "end pattern at control"; break; + case ONIGERR_META_CODE_SYNTAX: + p = "invalid meta-code syntax"; break; + case ONIGERR_CONTROL_CODE_SYNTAX: + p = "invalid control-code syntax"; break; + case ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE: + p = "char-class value at end of range"; break; + case ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE: + p = "char-class value at start of range"; break; + case ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS: + p = "unmatched range specifier in char-class"; break; + case ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED: + p = "target of repeat operator is not specified"; break; + case ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID: + p = "target of repeat operator is invalid"; break; + case ONIGERR_NESTED_REPEAT_OPERATOR: + p = "nested repeat operator"; break; + case ONIGERR_UNMATCHED_CLOSE_PARENTHESIS: + p = "unmatched close parenthesis"; break; + case ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS: + p = "end pattern with unmatched parenthesis"; break; + case ONIGERR_END_PATTERN_IN_GROUP: + p = "end pattern in group"; break; + case ONIGERR_UNDEFINED_GROUP_OPTION: + p = "undefined group option"; break; + case ONIGERR_INVALID_GROUP_OPTION: + p = "invalid group option"; break; + case ONIGERR_INVALID_POSIX_BRACKET_TYPE: + p = "invalid POSIX bracket type"; break; + case ONIGERR_INVALID_LOOK_BEHIND_PATTERN: + p = "invalid pattern in look-behind"; break; + case ONIGERR_INVALID_REPEAT_RANGE_PATTERN: + p = "invalid repeat range {lower,upper}"; break; + case ONIGERR_TOO_BIG_NUMBER: + p = "too big number"; break; + case ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE: + p = "too big number for repeat range"; break; + case ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE: + p = "upper is smaller than lower in repeat range"; break; + case ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS: + p = "empty range in char class"; break; + case ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE: + p = "mismatch multibyte code length in char-class range"; break; + case ONIGERR_TOO_MANY_MULTI_BYTE_RANGES: + p = "too many multibyte code ranges are specified"; break; + case ONIGERR_TOO_SHORT_MULTI_BYTE_STRING: + p = "too short multibyte code string"; break; + case ONIGERR_TOO_BIG_BACKREF_NUMBER: + p = "too big backref number"; break; + case ONIGERR_INVALID_BACKREF: + p = "invalid backref number/name"; break; + case ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED: + p = "numbered backref/call is not allowed. (use name)"; break; + case ONIGERR_TOO_MANY_CAPTURES: + p = "too many captures"; break; + case ONIGERR_TOO_BIG_WIDE_CHAR_VALUE: + p = "too big wide-char value"; break; + case ONIGERR_TOO_LONG_WIDE_CHAR_VALUE: + p = "too long wide-char value"; break; + case ONIGERR_UNDEFINED_OPERATOR: + p = "undefined operator"; break; + case ONIGERR_INVALID_CODE_POINT_VALUE: + p = "invalid code point value"; break; + case ONIGERR_EMPTY_GROUP_NAME: + p = "group name is empty"; break; + case ONIGERR_INVALID_GROUP_NAME: + p = "invalid group name <%n>"; break; + case ONIGERR_INVALID_CHAR_IN_GROUP_NAME: + p = "invalid char in group name <%n>"; break; + case ONIGERR_UNDEFINED_NAME_REFERENCE: + p = "undefined name <%n> reference"; break; + case ONIGERR_UNDEFINED_GROUP_REFERENCE: + p = "undefined group <%n> reference"; break; + case ONIGERR_MULTIPLEX_DEFINED_NAME: + p = "multiplex defined name <%n>"; break; + case ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL: + p = "multiplex definition name <%n> call"; break; + case ONIGERR_NEVER_ENDING_RECURSION: + p = "never ending recursion"; break; + case ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY: + p = "group number is too big for capture history"; break; + case ONIGERR_INVALID_CHAR_PROPERTY_NAME: + p = "invalid character property name {%n}"; break; + case ONIGERR_INVALID_IF_ELSE_SYNTAX: + p = "invalid if-else syntax"; break; + case ONIGERR_INVALID_ABSENT_GROUP_PATTERN: + p = "invalid absent group pattern"; break; + case ONIGERR_INVALID_ABSENT_GROUP_GENERATOR_PATTERN: + p = "invalid absent group generator pattern"; break; + case ONIGERR_INVALID_CALLOUT_PATTERN: + p = "invalid callout pattern"; break; + case ONIGERR_INVALID_CALLOUT_NAME: + p = "invalid callout name"; break; + case ONIGERR_UNDEFINED_CALLOUT_NAME: + p = "undefined callout name"; break; + case ONIGERR_INVALID_CALLOUT_BODY: + p = "invalid callout body"; break; + case ONIGERR_INVALID_CALLOUT_TAG_NAME: + p = "invalid callout tag name"; break; + case ONIGERR_INVALID_CALLOUT_ARG: + p = "invalid callout arg"; break; + case ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION: + p = "not supported encoding combination"; break; + case ONIGERR_INVALID_COMBINATION_OF_OPTIONS: + p = "invalid combination of options"; break; + case ONIGERR_VERY_INEFFICIENT_PATTERN: + p = "very inefficient pattern"; break; + case ONIGERR_LIBRARY_IS_NOT_INITIALIZED: + p = "library is not initialized"; break; + + default: + p = "undefined error code"; break; + } + + return (UChar* )p; +} + +static void sprint_byte(char* s, unsigned int v) +{ + xsnprintf(s, 3, "%02x", (v & 0377)); +} + +static void sprint_byte_with_x(char* s, unsigned int v) +{ + xsnprintf(s, 5, "\\x%02x", (v & 0377)); +} + +static int to_ascii(OnigEncoding enc, UChar *s, UChar *end, + UChar buf[], int buf_size, int *is_over) +{ + int len; + UChar *p; + OnigCodePoint code; + + if (!s) { + len = 0; + *is_over = 0; + } + else if (ONIGENC_MBC_MINLEN(enc) > 1) { + p = s; + len = 0; + while (p < end) { + code = ONIGENC_MBC_TO_CODE(enc, p, end); + if (code >= 0x80) { + if (code > 0xffff && len + 10 <= buf_size) { + sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 24)); + sprint_byte((char*)(&(buf[len+4])), (unsigned int)(code >> 16)); + sprint_byte((char*)(&(buf[len+6])), (unsigned int)(code >> 8)); + sprint_byte((char*)(&(buf[len+8])), (unsigned int)code); + len += 10; + } + else if (len + 6 <= buf_size) { + sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 8)); + sprint_byte((char*)(&(buf[len+4])), (unsigned int)code); + len += 6; + } + else { + break; + } + } + else { + buf[len++] = (UChar )code; + } + + p += enclen(enc, p); + if (len >= buf_size) break; + } + + *is_over = p < end; + } + else { + len = MIN((int )(end - s), buf_size); + xmemcpy(buf, s, (size_t )len); + *is_over = ((buf_size < (end - s)) ? 1 : 0); + } + + return len; +} + + +extern int +onig_is_error_code_needs_param(int code) +{ + switch (code) { + case ONIGERR_UNDEFINED_NAME_REFERENCE: + case ONIGERR_UNDEFINED_GROUP_REFERENCE: + case ONIGERR_MULTIPLEX_DEFINED_NAME: + case ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL: + case ONIGERR_INVALID_GROUP_NAME: + case ONIGERR_INVALID_CHAR_IN_GROUP_NAME: + case ONIGERR_INVALID_CHAR_PROPERTY_NAME: + return 1; + default: + return 0; + } +} + +/* for ONIG_MAX_ERROR_MESSAGE_LEN */ +#define MAX_ERROR_PAR_LEN 30 + +extern int ONIG_VARIADIC_FUNC_ATTR +onig_error_code_to_str(UChar* s, int code, ...) +{ + UChar *p, *q; + OnigErrorInfo* einfo; + int len, is_over; + UChar parbuf[MAX_ERROR_PAR_LEN]; + va_list vargs; + + va_start(vargs, code); + + switch (code) { + case ONIGERR_UNDEFINED_NAME_REFERENCE: + case ONIGERR_UNDEFINED_GROUP_REFERENCE: + case ONIGERR_MULTIPLEX_DEFINED_NAME: + case ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL: + case ONIGERR_INVALID_GROUP_NAME: + case ONIGERR_INVALID_CHAR_IN_GROUP_NAME: + case ONIGERR_INVALID_CHAR_PROPERTY_NAME: + einfo = va_arg(vargs, OnigErrorInfo*); + len = to_ascii(einfo->enc, einfo->par, einfo->par_end, + parbuf, MAX_ERROR_PAR_LEN - 3, &is_over); + q = onig_error_code_to_format(code); + p = s; + while (*q != '\0') { + if (*q == '%') { + q++; + if (*q == 'n') { /* '%n': name */ + xmemcpy(p, parbuf, len); + p += len; + if (is_over != 0) { + xmemcpy(p, "...", 3); + p += 3; + } + q++; + } + else + goto normal_char; + } + else { + normal_char: + *p++ = *q++; + } + } + *p = '\0'; + len = (int )(p - s); + break; + + default: + q = onig_error_code_to_format(code); + len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, q); + xmemcpy(s, q, len); + s[len] = '\0'; + break; + } + + va_end(vargs); + return len; +} + + +void ONIG_VARIADIC_FUNC_ATTR +onig_snprintf_with_pattern(UChar buf[], int bufsize, OnigEncoding enc, + UChar* pat, UChar* pat_end, const char *fmt, ...) +{ + int n, need, len; + UChar *p, *s, *bp; + UChar bs[6]; + va_list args; + + va_start(args, fmt); + n = xvsnprintf((char* )buf, bufsize, fmt, args); + va_end(args); + + need = (int )(pat_end - pat) * 4 + 4; + + if (n + need < bufsize) { + xstrcat((char* )buf, ": /", bufsize); + s = buf + onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, buf); + + p = pat; + while (p < pat_end) { + if (ONIGENC_IS_MBC_HEAD(enc, p)) { + len = enclen(enc, p); + if (ONIGENC_MBC_MINLEN(enc) == 1) { + while (len-- > 0) *s++ = *p++; + } + else { /* for UTF16/32 */ + int blen; + + while (len-- > 0) { + sprint_byte_with_x((char* )bs, (unsigned int )(*p++)); + blen = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs); + bp = bs; + while (blen-- > 0) *s++ = *bp++; + } + } + } + else if (*p == '\\') { + *s++ = *p++; + len = enclen(enc, p); + while (len-- > 0) *s++ = *p++; + } + else if (*p == '/') { + *s++ = (unsigned char )'\\'; + *s++ = *p++; + } + else if (!ONIGENC_IS_CODE_PRINT(enc, *p) && + !ONIGENC_IS_CODE_SPACE(enc, *p)) { + sprint_byte_with_x((char* )bs, (unsigned int )(*p++)); + len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs); + bp = bs; + while (len-- > 0) *s++ = *bp++; + } + else { + *s++ = *p++; + } + } + + *s++ = '/'; + *s = '\0'; + } +} diff --git a/internal/components/third_party/oniguruma/src/regexec.c b/internal/components/third_party/oniguruma/src/regexec.c new file mode 100644 index 0000000000..ddec265585 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/regexec.c @@ -0,0 +1,6793 @@ +/********************************************************************** + regexec.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef ONIG_NO_PRINT +#ifndef NEED_TO_INCLUDE_STDIO +#define NEED_TO_INCLUDE_STDIO +#endif +#endif + +#include "regint.h" + +#define IS_MBC_WORD_ASCII_MODE(enc,s,end,mode) \ + ((mode) == 0 ? ONIGENC_IS_MBC_WORD(enc,s,end) : ONIGENC_IS_MBC_WORD_ASCII(enc,s,end)) + +#ifdef USE_CRNL_AS_LINE_TERMINATOR +#define ONIGENC_IS_MBC_CRNL(enc,p,end) \ + (ONIGENC_MBC_TO_CODE(enc,p,end) == 13 && \ + ONIGENC_IS_MBC_NEWLINE(enc,(p+enclen(enc,p)),end)) +#endif + +#define CHECK_INTERRUPT_IN_MATCH + +#define STACK_MEM_START(reg, idx) \ + (MEM_STATUS_AT((reg)->push_mem_start, (idx)) != 0 ? \ + STACK_AT(mem_start_stk[idx].i)->u.mem.pstr : mem_start_stk[idx].s) + +#define STACK_MEM_END(reg, idx) \ + (MEM_STATUS_AT((reg)->push_mem_end, (idx)) != 0 ? \ + STACK_AT(mem_end_stk[idx].i)->u.mem.pstr : mem_end_stk[idx].s) + +#ifdef _MSC_VER +#define DIST_CAST(d) (size_t )(d) +#else +#define DIST_CAST(d) (d) +#endif + + +static int forward_search(regex_t* reg, const UChar* str, const UChar* end, UChar* start, UChar* range, UChar** low, UChar** high); + +static int +search_in_range(regex_t* reg, const UChar* str, const UChar* end, const UChar* start, const UChar* range, /* match range */ const UChar* data_range, /* subject string range */ OnigRegion* region, OnigOptionType option, OnigMatchParam* mp); + + +#ifdef USE_CALLOUT +typedef struct { + int last_match_at_call_counter; + struct { + OnigType type; + OnigValue val; + } slot[ONIG_CALLOUT_DATA_SLOT_NUM]; +} CalloutData; +#endif + +struct OnigMatchParamStruct { + unsigned int match_stack_limit; +#ifdef USE_RETRY_LIMIT + unsigned long retry_limit_in_match; + unsigned long retry_limit_in_search; +#endif + + void* callout_user_data; /* used in callback each match */ +#ifdef USE_CALLOUT + OnigCalloutFunc progress_callout_of_contents; + OnigCalloutFunc retraction_callout_of_contents; + int match_at_call_counter; + CalloutData* callout_data; + int callout_data_alloc_num; +#endif +}; + +extern int +onig_set_match_stack_limit_size_of_match_param(OnigMatchParam* param, + unsigned int limit) +{ + param->match_stack_limit = limit; + return ONIG_NORMAL; +} + +extern int +onig_set_retry_limit_in_match_of_match_param(OnigMatchParam* param, + unsigned long limit) +{ +#ifdef USE_RETRY_LIMIT + param->retry_limit_in_match = limit; + return ONIG_NORMAL; +#else + return ONIG_NO_SUPPORT_CONFIG; +#endif +} + +extern int +onig_set_retry_limit_in_search_of_match_param(OnigMatchParam* param, + unsigned long limit) +{ +#ifdef USE_RETRY_LIMIT + param->retry_limit_in_search = limit; + return ONIG_NORMAL; +#else + return ONIG_NO_SUPPORT_CONFIG; +#endif +} + +extern int +onig_set_progress_callout_of_match_param(OnigMatchParam* param, OnigCalloutFunc f) +{ +#ifdef USE_CALLOUT + param->progress_callout_of_contents = f; + return ONIG_NORMAL; +#else + return ONIG_NO_SUPPORT_CONFIG; +#endif +} + +extern int +onig_set_retraction_callout_of_match_param(OnigMatchParam* param, OnigCalloutFunc f) +{ +#ifdef USE_CALLOUT + param->retraction_callout_of_contents = f; + return ONIG_NORMAL; +#else + return ONIG_NO_SUPPORT_CONFIG; +#endif +} + +extern int +onig_set_callout_user_data_of_match_param(OnigMatchParam* param, void* user_data) +{ + param->callout_user_data = user_data; + return ONIG_NORMAL; +} + + +typedef struct { + void* stack_p; + int stack_n; + OnigOptionType options; + OnigRegion* region; + int ptr_num; + const UChar* start; /* search start position (for \G: BEGIN_POSITION) */ + unsigned int match_stack_limit; +#ifdef USE_RETRY_LIMIT + unsigned long retry_limit_in_match; + unsigned long retry_limit_in_search; + unsigned long retry_limit_in_search_counter; +#endif + OnigMatchParam* mp; +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE + int best_len; /* for ONIG_OPTION_FIND_LONGEST */ + UChar* best_s; +#endif +#ifdef USE_CALL + unsigned long subexp_call_in_search_counter; +#endif +#ifdef USE_SKIP_SEARCH + UChar* skip_search; +#endif +} MatchArg; + + +#if defined(ONIG_DEBUG_COMPILE) || defined(ONIG_DEBUG_MATCH) || defined(ONIG_DEBUG_STATISTICS) + +typedef struct { + short int opcode; + char* name; +} OpInfoType; + +static OpInfoType OpInfo[] = { + { OP_FINISH, "finish"}, + { OP_END, "end"}, + { OP_STR_1, "str_1"}, + { OP_STR_2, "str_2"}, + { OP_STR_3, "str_3"}, + { OP_STR_4, "str_4"}, + { OP_STR_5, "str_5"}, + { OP_STR_N, "str_n"}, + { OP_STR_MB2N1, "str_mb2-n1"}, + { OP_STR_MB2N2, "str_mb2-n2"}, + { OP_STR_MB2N3, "str_mb2-n3"}, + { OP_STR_MB2N, "str_mb2-n"}, + { OP_STR_MB3N, "str_mb3n"}, + { OP_STR_MBN, "str_mbn"}, + { OP_CCLASS, "cclass"}, + { OP_CCLASS_MB, "cclass-mb"}, + { OP_CCLASS_MIX, "cclass-mix"}, + { OP_CCLASS_NOT, "cclass-not"}, + { OP_CCLASS_MB_NOT, "cclass-mb-not"}, + { OP_CCLASS_MIX_NOT, "cclass-mix-not"}, + { OP_ANYCHAR, "anychar"}, + { OP_ANYCHAR_ML, "anychar-ml"}, + { OP_ANYCHAR_STAR, "anychar*"}, + { OP_ANYCHAR_ML_STAR, "anychar-ml*"}, + { OP_ANYCHAR_STAR_PEEK_NEXT, "anychar*-peek-next"}, + { OP_ANYCHAR_ML_STAR_PEEK_NEXT, "anychar-ml*-peek-next"}, + { OP_WORD, "word"}, + { OP_WORD_ASCII, "word-ascii"}, + { OP_NO_WORD, "not-word"}, + { OP_NO_WORD_ASCII, "not-word-ascii"}, + { OP_WORD_BOUNDARY, "word-boundary"}, + { OP_NO_WORD_BOUNDARY, "not-word-boundary"}, + { OP_WORD_BEGIN, "word-begin"}, + { OP_WORD_END, "word-end"}, + { OP_TEXT_SEGMENT_BOUNDARY, "text-segment-boundary"}, + { OP_BEGIN_BUF, "begin-buf"}, + { OP_END_BUF, "end-buf"}, + { OP_BEGIN_LINE, "begin-line"}, + { OP_END_LINE, "end-line"}, + { OP_SEMI_END_BUF, "semi-end-buf"}, + { OP_CHECK_POSITION, "check-position"}, + { OP_BACKREF1, "backref1"}, + { OP_BACKREF2, "backref2"}, + { OP_BACKREF_N, "backref-n"}, + { OP_BACKREF_N_IC, "backref-n-ic"}, + { OP_BACKREF_MULTI, "backref_multi"}, + { OP_BACKREF_MULTI_IC, "backref_multi-ic"}, + { OP_BACKREF_WITH_LEVEL, "backref_with_level"}, + { OP_BACKREF_WITH_LEVEL_IC, "backref_with_level-c"}, + { OP_BACKREF_CHECK, "backref_check"}, + { OP_BACKREF_CHECK_WITH_LEVEL, "backref_check_with_level"}, + { OP_MEM_START_PUSH, "mem-start-push"}, + { OP_MEM_START, "mem-start"}, + { OP_MEM_END_PUSH, "mem-end-push"}, +#ifdef USE_CALL + { OP_MEM_END_PUSH_REC, "mem-end-push-rec"}, +#endif + { OP_MEM_END, "mem-end"}, +#ifdef USE_CALL + { OP_MEM_END_REC, "mem-end-rec"}, +#endif + { OP_FAIL, "fail"}, + { OP_JUMP, "jump"}, + { OP_PUSH, "push"}, + { OP_PUSH_SUPER, "push-super"}, + { OP_POP, "pop"}, + { OP_POP_TO_MARK, "pop-to-mark"}, +#ifdef USE_OP_PUSH_OR_JUMP_EXACT + { OP_PUSH_OR_JUMP_EXACT1, "push-or-jump-e1"}, +#endif + { OP_PUSH_IF_PEEK_NEXT, "push-if-peek-next"}, + { OP_REPEAT, "repeat"}, + { OP_REPEAT_NG, "repeat-ng"}, + { OP_REPEAT_INC, "repeat-inc"}, + { OP_REPEAT_INC_NG, "repeat-inc-ng"}, + { OP_EMPTY_CHECK_START, "empty-check-start"}, + { OP_EMPTY_CHECK_END, "empty-check-end"}, + { OP_EMPTY_CHECK_END_MEMST, "empty-check-end-memst"}, +#ifdef USE_CALL + { OP_EMPTY_CHECK_END_MEMST_PUSH,"empty-check-end-memst-push"}, +#endif + { OP_MOVE, "move"}, + { OP_STEP_BACK_START, "step-back-start"}, + { OP_STEP_BACK_NEXT, "step-back-next"}, + { OP_CUT_TO_MARK, "cut-to-mark"}, + { OP_MARK, "mark"}, + { OP_SAVE_VAL, "save-val"}, + { OP_UPDATE_VAR, "update-var"}, +#ifdef USE_CALL + { OP_CALL, "call"}, + { OP_RETURN, "return"}, +#endif +#ifdef USE_CALLOUT + { OP_CALLOUT_CONTENTS, "callout-contents"}, + { OP_CALLOUT_NAME, "callout-name"}, +#endif + { -1, ""} +}; + +#endif + +#if defined(ONIG_DEBUG_COMPILE) || defined(ONIG_DEBUG_MATCH) + +/* arguments type */ +typedef enum { + ARG_SPECIAL = -1, + ARG_NON = 0, + ARG_RELADDR = 1, + ARG_ABSADDR = 2, + ARG_LENGTH = 3, + ARG_MEMNUM = 4, + ARG_OPTION = 5, + ARG_MODE = 6 +} OpArgType; + +static char* +op2name(int opcode) +{ + int i; + + for (i = 0; OpInfo[i].opcode >= 0; i++) { + if (opcode == OpInfo[i].opcode) return OpInfo[i].name; + } + + return ""; +} + +static void +p_after_op(FILE* f) +{ + fputs(" ", f); +} + +static void +p_string(FILE* f, int len, UChar* s) +{ + while (len-- > 0) { fputc(*s++, f); } +} + +static void +p_len_string(FILE* f, LengthType len, int mb_len, UChar* s) +{ + int x = len * mb_len; + + fprintf(f, "len:%d ", len); + while (x-- > 0) { fputc(*s++, f); } +} + +static void +p_rel_addr(FILE* f, RelAddrType rel_addr, Operation* p, Operation* start) +{ + char* flag; + char* space1; + char* space2; + RelAddrType curr; + AbsAddrType abs_addr; + + curr = (RelAddrType )(p - start); + abs_addr = curr + rel_addr; + + flag = rel_addr < 0 ? "" : "+"; + space1 = rel_addr < 10 ? " " : ""; + space2 = abs_addr < 10 ? " " : ""; + + fprintf(f, "%s%s%d => %s%d", space1, flag, rel_addr, space2, abs_addr); +} + +static int +bitset_on_num(BitSetRef bs) +{ + int i, n; + + n = 0; + for (i = 0; i < SINGLE_BYTE_SIZE; i++) { + if (BITSET_AT(bs, i)) n++; + } + + return n; +} + + +#ifdef USE_DIRECT_THREADED_CODE +#define GET_OPCODE(reg,index) (reg)->ocs[index] +#else +#define GET_OPCODE(reg,index) (reg)->ops[index].opcode +#endif + +static void +print_compiled_byte_code(FILE* f, regex_t* reg, int index, + Operation* start, OnigEncoding enc) +{ + static char* SaveTypeNames[] = { + "KEEP", + "S", + "RIGHT_RANGE" + }; + + static char* UpdateVarTypeNames[] = { + "KEEP_FROM_STACK_LAST", + "S_FROM_STACK", + "RIGHT_RANGE_FROM_STACK", + "RIGHT_RANGE_FROM_S_STACK", + "RIGHT_RANGE_TO_S", + "RIGHT_RANGE_INIT" + }; + + int i, n; + RelAddrType addr; + LengthType len; + MemNumType mem; + OnigCodePoint code; + ModeType mode; + UChar *q; + Operation* p; + enum OpCode opcode; + + p = reg->ops + index; + + opcode = GET_OPCODE(reg, index); + + fprintf(f, "%s", op2name(opcode)); + p_after_op(f); + + switch (opcode) { + case OP_STR_1: + p_string(f, 1, p->exact.s); break; + case OP_STR_2: + p_string(f, 2, p->exact.s); break; + case OP_STR_3: + p_string(f, 3, p->exact.s); break; + case OP_STR_4: + p_string(f, 4, p->exact.s); break; + case OP_STR_5: + p_string(f, 5, p->exact.s); break; + case OP_STR_N: + len = p->exact_n.n; + p_string(f, len, p->exact_n.s); break; + case OP_STR_MB2N1: + p_string(f, 2, p->exact.s); break; + case OP_STR_MB2N2: + p_string(f, 4, p->exact.s); break; + case OP_STR_MB2N3: + p_string(f, 3, p->exact.s); break; + case OP_STR_MB2N: + len = p->exact_n.n; + p_len_string(f, len, 2, p->exact_n.s); break; + case OP_STR_MB3N: + len = p->exact_n.n; + p_len_string(f, len, 3, p->exact_n.s); break; + case OP_STR_MBN: + { + int mb_len; + + mb_len = p->exact_len_n.len; + len = p->exact_len_n.n; + q = p->exact_len_n.s; + fprintf(f, "mblen:%d len:%d ", mb_len, len); + n = len * mb_len; + while (n-- > 0) { fputc(*q++, f); } + } + break; + + case OP_CCLASS: + case OP_CCLASS_NOT: + n = bitset_on_num(p->cclass.bsp); + fprintf(f, "n:%d", n); + break; + case OP_CCLASS_MB: + case OP_CCLASS_MB_NOT: + { + OnigCodePoint ncode; + OnigCodePoint* codes; + + codes = (OnigCodePoint* )p->cclass_mb.mb; + GET_CODE_POINT(ncode, codes); + codes++; + GET_CODE_POINT(code, codes); + fprintf(f, "n:%d code:0x%x", ncode, code); + } + break; + case OP_CCLASS_MIX: + case OP_CCLASS_MIX_NOT: + { + OnigCodePoint ncode; + OnigCodePoint* codes; + + codes = (OnigCodePoint* )p->cclass_mix.mb; + n = bitset_on_num(p->cclass_mix.bsp); + + GET_CODE_POINT(ncode, codes); + codes++; + GET_CODE_POINT(code, codes); + fprintf(f, "nsg:%d code:%u nmb:%u", n, code, ncode); + } + break; + + case OP_ANYCHAR_STAR_PEEK_NEXT: + case OP_ANYCHAR_ML_STAR_PEEK_NEXT: + p_string(f, 1, &(p->anychar_star_peek_next.c)); + break; + + case OP_WORD_BOUNDARY: + case OP_NO_WORD_BOUNDARY: + case OP_WORD_BEGIN: + case OP_WORD_END: + mode = p->word_boundary.mode; + fprintf(f, "mode:%d", mode); + break; + + case OP_BACKREF_N: + case OP_BACKREF_N_IC: + mem = p->backref_n.n1; + fprintf(f, "n:%d", mem); + break; + case OP_BACKREF_MULTI_IC: + case OP_BACKREF_MULTI: + case OP_BACKREF_CHECK: + n = p->backref_general.num; + fprintf(f, "n:%d ", n); + for (i = 0; i < n; i++) { + mem = (n == 1) ? p->backref_general.n1 : p->backref_general.ns[i]; + if (i > 0) fputs(", ", f); + fprintf(f, "%d", mem); + } + break; + case OP_BACKREF_WITH_LEVEL: + case OP_BACKREF_WITH_LEVEL_IC: + case OP_BACKREF_CHECK_WITH_LEVEL: + { + LengthType level; + + level = p->backref_general.nest_level; + fprintf(f, "level:%d ", level); + n = p->backref_general.num; + for (i = 0; i < n; i++) { + mem = (n == 1) ? p->backref_general.n1 : p->backref_general.ns[i]; + if (i > 0) fputs(", ", f); + fprintf(f, "%d", mem); + } + } + break; + + case OP_MEM_START: + case OP_MEM_START_PUSH: + mem = p->memory_start.num; + fprintf(f, "mem:%d", mem); + break; + + case OP_MEM_END: + case OP_MEM_END_PUSH: +#ifdef USE_CALL + case OP_MEM_END_REC: + case OP_MEM_END_PUSH_REC: +#endif + mem = p->memory_end.num; + fprintf(f, "mem:%d", mem); + break; + + case OP_JUMP: + addr = p->jump.addr; + p_rel_addr(f, addr, p, start); + break; + + case OP_PUSH: + case OP_PUSH_SUPER: + addr = p->push.addr; + p_rel_addr(f, addr, p, start); + break; + +#ifdef USE_OP_PUSH_OR_JUMP_EXACT + case OP_PUSH_OR_JUMP_EXACT1: + addr = p->push_or_jump_exact1.addr; + p_rel_addr(f, addr, p, start); + fprintf(f, " c:"); + p_string(f, 1, &(p->push_or_jump_exact1.c)); + break; +#endif + + case OP_PUSH_IF_PEEK_NEXT: + addr = p->push_if_peek_next.addr; + p_rel_addr(f, addr, p, start); + fprintf(f, " c:"); + p_string(f, 1, &(p->push_if_peek_next.c)); + break; + + case OP_REPEAT: + case OP_REPEAT_NG: + mem = p->repeat.id; + addr = p->repeat.addr; + fprintf(f, "id:%d ", mem); + p_rel_addr(f, addr, p, start); + break; + + case OP_REPEAT_INC: + case OP_REPEAT_INC_NG: + mem = p->repeat.id; + fprintf(f, "id:%d", mem); + break; + + case OP_EMPTY_CHECK_START: + mem = p->empty_check_start.mem; + fprintf(f, "id:%d", mem); + break; + case OP_EMPTY_CHECK_END: + case OP_EMPTY_CHECK_END_MEMST: +#ifdef USE_CALL + case OP_EMPTY_CHECK_END_MEMST_PUSH: +#endif + mem = p->empty_check_end.mem; + fprintf(f, "id:%d", mem); + break; + +#ifdef USE_CALL + case OP_CALL: + addr = p->call.addr; + fprintf(f, "=> %d", addr); + break; +#endif + + case OP_MOVE: + fprintf(f, "n:%d", p->move.n); + break; + + case OP_STEP_BACK_START: + addr = p->step_back_start.addr; + fprintf(f, "init:%d rem:%d ", + p->step_back_start.initial, + p->step_back_start.remaining); + p_rel_addr(f, addr, p, start); + break; + + case OP_POP_TO_MARK: + mem = p->pop_to_mark.id; + fprintf(f, "id:%d", mem); + break; + + case OP_CUT_TO_MARK: + { + int restore; + + mem = p->cut_to_mark.id; + restore = p->cut_to_mark.restore_pos; + fprintf(f, "id:%d restore:%d", mem, restore); + } + break; + + case OP_MARK: + { + int save; + + mem = p->mark.id; + save = p->mark.save_pos; + fprintf(f, "id:%d save:%d", mem, save); + } + break; + + case OP_SAVE_VAL: + { + SaveType type; + + type = p->save_val.type; + mem = p->save_val.id; + fprintf(f, "%s id:%d", SaveTypeNames[type], mem); + } + break; + + case OP_UPDATE_VAR: + { + UpdateVarType type; + int clear; + + type = p->update_var.type; + mem = p->update_var.id; + clear = p->update_var.clear; + fprintf(f, "%s id:%d", UpdateVarTypeNames[type], mem); + if (type == UPDATE_VAR_RIGHT_RANGE_FROM_S_STACK || + type == UPDATE_VAR_RIGHT_RANGE_FROM_STACK) + fprintf(f, " clear:%d", clear); + } + break; + +#ifdef USE_CALLOUT + case OP_CALLOUT_CONTENTS: + mem = p->callout_contents.num; + fprintf(f, "num:%d", mem); + break; + + case OP_CALLOUT_NAME: + { + int id; + + id = p->callout_name.id; + mem = p->callout_name.num; + fprintf(f, "id:%d num:%d", id, mem); + } + break; +#endif + + case OP_TEXT_SEGMENT_BOUNDARY: + if (p->text_segment_boundary.not != 0) + fprintf(f, " not"); + break; + + case OP_CHECK_POSITION: + switch (p->check_position.type) { + case CHECK_POSITION_SEARCH_START: + fprintf(f, "search-start"); break; + case CHECK_POSITION_CURRENT_RIGHT_RANGE: + fprintf(f, "current-right-range"); break; + default: + break; + }; + break; + + case OP_FINISH: + case OP_END: + case OP_ANYCHAR: + case OP_ANYCHAR_ML: + case OP_ANYCHAR_STAR: + case OP_ANYCHAR_ML_STAR: + case OP_WORD: + case OP_WORD_ASCII: + case OP_NO_WORD: + case OP_NO_WORD_ASCII: + case OP_BEGIN_BUF: + case OP_END_BUF: + case OP_BEGIN_LINE: + case OP_END_LINE: + case OP_SEMI_END_BUF: + case OP_BACKREF1: + case OP_BACKREF2: + case OP_FAIL: + case OP_POP: + case OP_STEP_BACK_NEXT: +#ifdef USE_CALL + case OP_RETURN: +#endif + break; + + default: + fprintf(DBGFP, "print_compiled_byte_code: undefined code %d\n", opcode); + break; + } +} +#endif /* defined(ONIG_DEBUG_COMPILE) || defined(ONIG_DEBUG_MATCH) */ + +#ifdef ONIG_DEBUG_COMPILE +extern void +onig_print_compiled_byte_code_list(FILE* f, regex_t* reg) +{ + Operation* bp; + Operation* start = reg->ops; + Operation* end = reg->ops + reg->ops_used; + + fprintf(f, "push_mem_start: 0x%x, push_mem_end: 0x%x\n", + reg->push_mem_start, reg->push_mem_end); + fprintf(f, "code-length: %d\n", reg->ops_used); + + bp = start; + while (bp < end) { + int pos = bp - start; + + fprintf(f, "%4d: ", pos); + print_compiled_byte_code(f, reg, pos, start, reg->enc); + fprintf(f, "\n"); + bp++; + } + fprintf(f, "\n"); +} +#endif + + +#ifdef USE_CAPTURE_HISTORY +static void history_tree_free(OnigCaptureTreeNode* node); + +static void +history_tree_clear(OnigCaptureTreeNode* node) +{ + int i; + + if (IS_NULL(node)) return ; + + for (i = 0; i < node->num_childs; i++) { + if (IS_NOT_NULL(node->childs[i])) { + history_tree_free(node->childs[i]); + } + } + for (i = 0; i < node->allocated; i++) { + node->childs[i] = (OnigCaptureTreeNode* )0; + } + node->num_childs = 0; + node->beg = ONIG_REGION_NOTPOS; + node->end = ONIG_REGION_NOTPOS; + node->group = -1; +} + +static void +history_tree_free(OnigCaptureTreeNode* node) +{ + history_tree_clear(node); + if (IS_NOT_NULL(node->childs)) xfree(node->childs); + + xfree(node); +} + +static void +history_root_free(OnigRegion* r) +{ + if (IS_NULL(r->history_root)) return ; + + history_tree_free(r->history_root); + r->history_root = (OnigCaptureTreeNode* )0; +} + +static OnigCaptureTreeNode* +history_node_new(void) +{ + OnigCaptureTreeNode* node; + + node = (OnigCaptureTreeNode* )xmalloc(sizeof(OnigCaptureTreeNode)); + CHECK_NULL_RETURN(node); + + node->childs = (OnigCaptureTreeNode** )0; + node->allocated = 0; + node->num_childs = 0; + node->group = -1; + node->beg = ONIG_REGION_NOTPOS; + node->end = ONIG_REGION_NOTPOS; + + return node; +} + +static int +history_tree_add_child(OnigCaptureTreeNode* parent, OnigCaptureTreeNode* child) +{ +#define HISTORY_TREE_INIT_ALLOC_SIZE 8 + + if (parent->num_childs >= parent->allocated) { + int n, i; + + if (IS_NULL(parent->childs)) { + n = HISTORY_TREE_INIT_ALLOC_SIZE; + parent->childs = + (OnigCaptureTreeNode** )xmalloc(sizeof(parent->childs[0]) * n); + } + else { + n = parent->allocated * 2; + parent->childs = + (OnigCaptureTreeNode** )xrealloc(parent->childs, + sizeof(parent->childs[0]) * n); + } + CHECK_NULL_RETURN_MEMERR(parent->childs); + for (i = parent->allocated; i < n; i++) { + parent->childs[i] = (OnigCaptureTreeNode* )0; + } + parent->allocated = n; + } + + parent->childs[parent->num_childs] = child; + parent->num_childs++; + return 0; +} + +static OnigCaptureTreeNode* +history_tree_clone(OnigCaptureTreeNode* node) +{ + int i; + OnigCaptureTreeNode *clone, *child; + + clone = history_node_new(); + CHECK_NULL_RETURN(clone); + + clone->beg = node->beg; + clone->end = node->end; + for (i = 0; i < node->num_childs; i++) { + child = history_tree_clone(node->childs[i]); + if (IS_NULL(child)) { + history_tree_free(clone); + return (OnigCaptureTreeNode* )0; + } + history_tree_add_child(clone, child); + } + + return clone; +} + +extern OnigCaptureTreeNode* +onig_get_capture_tree(OnigRegion* region) +{ + return region->history_root; +} +#endif /* USE_CAPTURE_HISTORY */ + + +static OnigCallbackEachMatchFunc CallbackEachMatch; + +extern OnigCallbackEachMatchFunc +onig_get_callback_each_match(void) +{ + return CallbackEachMatch; +} + +extern int +onig_set_callback_each_match(OnigCallbackEachMatchFunc f) +{ + CallbackEachMatch = f; + return ONIG_NORMAL; +} + + +extern void +onig_region_clear(OnigRegion* region) +{ + int i; + + for (i = 0; i < region->num_regs; i++) { + region->beg[i] = region->end[i] = ONIG_REGION_NOTPOS; + } +#ifdef USE_CAPTURE_HISTORY + history_root_free(region); +#endif +} + +extern int +onig_region_resize(OnigRegion* region, int n) +{ + region->num_regs = n; + + if (n < ONIG_NREGION) + n = ONIG_NREGION; + + if (region->allocated == 0) { + region->beg = (int* )xmalloc(n * sizeof(int)); + region->end = (int* )xmalloc(n * sizeof(int)); + + if (region->beg == 0 || region->end == 0) + return ONIGERR_MEMORY; + + region->allocated = n; + } + else if (region->allocated < n) { + region->beg = (int* )xrealloc(region->beg, n * sizeof(int)); + region->end = (int* )xrealloc(region->end, n * sizeof(int)); + + if (region->beg == 0 || region->end == 0) + return ONIGERR_MEMORY; + + region->allocated = n; + } + + return 0; +} + +static int +onig_region_resize_clear(OnigRegion* region, int n) +{ + int r; + + r = onig_region_resize(region, n); + if (r != 0) return r; + onig_region_clear(region); + return 0; +} + +extern int +onig_region_set(OnigRegion* region, int at, int beg, int end) +{ + if (at < 0) return ONIGERR_INVALID_ARGUMENT; + + if (at >= region->allocated) { + int r = onig_region_resize(region, at + 1); + if (r < 0) return r; + } + + region->beg[at] = beg; + region->end[at] = end; + return 0; +} + +extern void +onig_region_init(OnigRegion* region) +{ + region->num_regs = 0; + region->allocated = 0; + region->beg = (int* )0; + region->end = (int* )0; + region->history_root = (OnigCaptureTreeNode* )0; +} + +extern OnigRegion* +onig_region_new(void) +{ + OnigRegion* r; + + r = (OnigRegion* )xmalloc(sizeof(OnigRegion)); + CHECK_NULL_RETURN(r); + onig_region_init(r); + return r; +} + +extern void +onig_region_free(OnigRegion* r, int free_self) +{ + if (r != 0) { + if (r->allocated > 0) { + if (r->beg) xfree(r->beg); + if (r->end) xfree(r->end); + r->allocated = 0; + } +#ifdef USE_CAPTURE_HISTORY + history_root_free(r); +#endif + if (free_self) xfree(r); + } +} + +extern void +onig_region_copy(OnigRegion* to, OnigRegion* from) +{ +#define RREGC_SIZE (sizeof(int) * from->num_regs) + int i; + + if (to == from) return; + + if (to->allocated == 0) { + if (from->num_regs > 0) { + to->beg = (int* )xmalloc(RREGC_SIZE); + if (IS_NULL(to->beg)) return; + to->end = (int* )xmalloc(RREGC_SIZE); + if (IS_NULL(to->end)) return; + to->allocated = from->num_regs; + } + } + else if (to->allocated < from->num_regs) { + to->beg = (int* )xrealloc(to->beg, RREGC_SIZE); + if (IS_NULL(to->beg)) return; + to->end = (int* )xrealloc(to->end, RREGC_SIZE); + if (IS_NULL(to->end)) return; + to->allocated = from->num_regs; + } + + for (i = 0; i < from->num_regs; i++) { + to->beg[i] = from->beg[i]; + to->end[i] = from->end[i]; + } + to->num_regs = from->num_regs; + +#ifdef USE_CAPTURE_HISTORY + history_root_free(to); + + if (IS_NOT_NULL(from->history_root)) { + to->history_root = history_tree_clone(from->history_root); + } +#endif +} + +#ifdef USE_CALLOUT +#define CALLOUT_BODY(func, ain, aname_id, anum, user, args, result) do { \ + args.in = (ain);\ + args.name_id = (aname_id);\ + args.num = anum;\ + args.regex = reg;\ + args.string = str;\ + args.string_end = end;\ + args.start = sstart;\ + args.right_range = right_range;\ + args.current = s;\ + args.retry_in_match_counter = retry_in_match_counter;\ + args.msa = msa;\ + args.stk_base = stk_base;\ + args.stk = stk;\ + args.mem_start_stk = mem_start_stk;\ + args.mem_end_stk = mem_end_stk;\ + result = (func)(&args, user);\ +} while (0) + +#define RETRACTION_CALLOUT(func, aname_id, anum, user) do {\ + int result;\ + OnigCalloutArgs args;\ + CALLOUT_BODY(func, ONIG_CALLOUT_IN_RETRACTION, aname_id, anum, user, args, result);\ + switch (result) {\ + case ONIG_CALLOUT_FAIL:\ + case ONIG_CALLOUT_SUCCESS:\ + break;\ + default:\ + if (result > 0) {\ + result = ONIGERR_INVALID_ARGUMENT;\ + }\ + best_len = result;\ + goto match_at_end;\ + break;\ + }\ +} while(0) +#endif + + +/** stack **/ +#define STK_ALT_FLAG 0x0001 + +/* stack type */ +/* used by normal-POP */ +#define STK_SUPER_ALT STK_ALT_FLAG +#define STK_ALT (0x0002 | STK_ALT_FLAG) + +/* handled by normal-POP */ +#define STK_MEM_START 0x0010 +#define STK_MEM_END 0x8030 +#ifdef USE_REPEAT_AND_EMPTY_CHECK_LOCAL_VAR +#define STK_REPEAT_INC (0x0040 | STK_MASK_POP_HANDLED) +#else +#define STK_REPEAT_INC 0x0040 +#endif +#ifdef USE_CALLOUT +#define STK_CALLOUT 0x0070 +#endif + +/* avoided by normal-POP */ +#define STK_VOID 0x0000 /* for fill a blank */ +#ifdef USE_REPEAT_AND_EMPTY_CHECK_LOCAL_VAR +#define STK_EMPTY_CHECK_START (0x3000 | STK_MASK_POP_HANDLED) +#else +#define STK_EMPTY_CHECK_START 0x3000 +#endif +#define STK_EMPTY_CHECK_END 0x5000 /* for recursive call */ +#define STK_MEM_END_MARK 0x8100 +#define STK_CALL_FRAME (0x0400 | STK_MASK_POP_HANDLED) +#define STK_RETURN (0x0500 | STK_MASK_POP_HANDLED) +#define STK_SAVE_VAL 0x0600 +#define STK_MARK 0x0704 + +/* stack type check mask */ +#define STK_MASK_POP_USED STK_ALT_FLAG +#define STK_MASK_POP_HANDLED 0x0010 +#define STK_MASK_POP_HANDLED_TIL (STK_MASK_POP_HANDLED | 0x0004) +#define STK_MASK_TO_VOID_TARGET 0x100e +#define STK_MASK_MEM_END_OR_MARK 0x8000 /* MEM_END or MEM_END_MARK */ + +typedef ptrdiff_t StackIndex; + +#define INVALID_STACK_INDEX ((StackIndex )-1) + +typedef union { + StackIndex i; + UChar* s; +} StkPtrType; + + +typedef struct _StackType { + unsigned int type; + int zid; + union { + struct { + Operation* pcode; /* byte code position */ + UChar* pstr; /* string position */ + } state; + struct { + int count; +#ifdef USE_REPEAT_AND_EMPTY_CHECK_LOCAL_VAR + StackIndex prev_index; /* index of stack */ +#endif + } repeat_inc; + struct { + UChar *pstr; /* start/end position */ + /* Following information is set, if this stack type is MEM-START */ + StkPtrType prev_start; /* prev. info (for backtrack "(...)*" ) */ + StkPtrType prev_end; /* prev. info (for backtrack "(...)*" ) */ + } mem; + struct { + UChar *pstr; /* start position */ +#ifdef USE_REPEAT_AND_EMPTY_CHECK_LOCAL_VAR + StackIndex prev_index; /* index of stack */ +#endif + } empty_check; +#ifdef USE_CALL + struct { + Operation *ret_addr; /* byte code position */ + UChar *pstr; /* string position */ + } call_frame; +#endif + struct { + enum SaveType type; + UChar* v; + UChar* v2; + } val; +#ifdef USE_CALLOUT + struct { + int num; + OnigCalloutFunc func; + } callout; +#endif + } u; +} StackType; + +#ifdef USE_CALLOUT + +struct OnigCalloutArgsStruct { + OnigCalloutIn in; + int name_id; /* name id or ONIG_NON_NAME_ID */ + int num; + OnigRegex regex; + const OnigUChar* string; + const OnigUChar* string_end; + const OnigUChar* start; + const OnigUChar* right_range; + const OnigUChar* current; /* current matching position */ + unsigned long retry_in_match_counter; + + /* invisible to users */ + MatchArg* msa; + StackType* stk_base; + StackType* stk; + StkPtrType* mem_start_stk; + StkPtrType* mem_end_stk; +}; + +#endif + +#ifdef USE_REPEAT_AND_EMPTY_CHECK_LOCAL_VAR + +#define PTR_NUM_SIZE(reg) ((reg)->num_repeat + (reg)->num_empty_check + ((reg)->num_mem + 1) * 2) +#define UPDATE_FOR_STACK_REALLOC do{\ + repeat_stk = (StackIndex* )alloc_base;\ + empty_check_stk = (StackIndex* )(repeat_stk + reg->num_repeat);\ + mem_start_stk = (StkPtrType* )(empty_check_stk + reg->num_empty_check);\ + mem_end_stk = mem_start_stk + num_mem + 1;\ +} while(0) + +#define SAVE_REPEAT_STK_VAR(sid) stk->u.repeat_inc.prev_index = repeat_stk[sid] +#define LOAD_TO_REPEAT_STK_VAR(sid) repeat_stk[sid] = GET_STACK_INDEX(stk) +#define POP_REPEAT_INC else if (stk->type == STK_REPEAT_INC) {repeat_stk[stk->zid] = stk->u.repeat_inc.prev_index;} + +#define SAVE_EMPTY_CHECK_STK_VAR(sid) stk->u.empty_check.prev_index = empty_check_stk[sid] +#define LOAD_TO_EMPTY_CHECK_STK_VAR(sid) empty_check_stk[sid] = GET_STACK_INDEX(stk) +#define POP_EMPTY_CHECK_START else if (stk->type == STK_EMPTY_CHECK_START) {empty_check_stk[stk->zid] = stk->u.empty_check.prev_index;} + +#else + +#define PTR_NUM_SIZE(reg) (((reg)->num_mem + 1) * 2) +#define UPDATE_FOR_STACK_REALLOC do{\ + mem_start_stk = (StkPtrType* )alloc_base;\ + mem_end_stk = mem_start_stk + num_mem + 1;\ +} while(0) + +#define SAVE_REPEAT_STK_VAR(sid) +#define LOAD_TO_REPEAT_STK_VAR(sid) +#define POP_REPEAT_INC + +#define SAVE_EMPTY_CHECK_STK_VAR(sid) +#define LOAD_TO_EMPTY_CHECK_STK_VAR(sid) +#define POP_EMPTY_CHECK_START + +#endif /* USE_REPEAT_AND_EMPTY_CHECK_LOCAL_VAR */ + +#ifdef USE_RETRY_LIMIT +#define RETRY_IN_MATCH_ARG_INIT(msa,mpv) \ + (msa).retry_limit_in_match = (mpv)->retry_limit_in_match;\ + (msa).retry_limit_in_search = (mpv)->retry_limit_in_search;\ + (msa).retry_limit_in_search_counter = 0; +#else +#define RETRY_IN_MATCH_ARG_INIT(msa,mpv) +#endif + +#if defined(USE_CALL) +#define SUBEXP_CALL_IN_MATCH_ARG_INIT(msa,mpv) \ + (msa).subexp_call_in_search_counter = 0; + +#define POP_CALL else if (stk->type == STK_RETURN) {subexp_call_nest_counter++;} else if (stk->type == STK_CALL_FRAME) {subexp_call_nest_counter--;} +#else +#define SUBEXP_CALL_IN_MATCH_ARG_INIT(msa,mpv) +#define POP_CALL +#endif + +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE +#ifdef USE_SKIP_SEARCH +#define MATCH_ARG_INIT(msa, reg, arg_option, arg_region, arg_start, mpv) do { \ + (msa).stack_p = (void* )0;\ + (msa).options = (arg_option)|(reg)->options;\ + (msa).region = (arg_region);\ + (msa).start = (arg_start);\ + (msa).match_stack_limit = (mpv)->match_stack_limit;\ + RETRY_IN_MATCH_ARG_INIT(msa,mpv)\ + SUBEXP_CALL_IN_MATCH_ARG_INIT(msa,mpv)\ + (msa).mp = mpv;\ + (msa).best_len = ONIG_MISMATCH;\ + (msa).ptr_num = PTR_NUM_SIZE(reg);\ + (msa).skip_search = (UChar* )(arg_start);\ +} while(0) +#else +#define MATCH_ARG_INIT(msa, reg, arg_option, arg_region, arg_start, mpv) do { \ + (msa).stack_p = (void* )0;\ + (msa).options = (arg_option)|(reg)->options;\ + (msa).region = (arg_region);\ + (msa).start = (arg_start);\ + (msa).match_stack_limit = (mpv)->match_stack_limit;\ + RETRY_IN_MATCH_ARG_INIT(msa,mpv)\ + SUBEXP_CALL_IN_MATCH_ARG_INIT(msa,mpv)\ + (msa).mp = mpv;\ + (msa).best_len = ONIG_MISMATCH;\ + (msa).ptr_num = PTR_NUM_SIZE(reg);\ +} while(0) +#endif +#else +#ifdef USE_SKIP_SEARCH +#define MATCH_ARG_INIT(msa, reg, arg_option, arg_region, arg_start, mpv) do { \ + (msa).stack_p = (void* )0;\ + (msa).options = (arg_option)|(reg)->options;\ + (msa).region = (arg_region);\ + (msa).start = (arg_start);\ + (msa).match_stack_limit = (mpv)->match_stack_limit;\ + RETRY_IN_MATCH_ARG_INIT(msa,mpv)\ + SUBEXP_CALL_IN_MATCH_ARG_INIT(msa,mpv)\ + (msa).mp = mpv;\ + (msa).ptr_num = PTR_NUM_SIZE(reg);\ + (msa).skip_search = (UChar* )(arg_start);\ +} while(0) +#else +#define MATCH_ARG_INIT(msa, reg, arg_option, arg_region, arg_start, mpv) do { \ + (msa).stack_p = (void* )0;\ + (msa).options = (arg_option)|(reg)->options;\ + (msa).region = (arg_region);\ + (msa).start = (arg_start);\ + (msa).match_stack_limit = (mpv)->match_stack_limit;\ + RETRY_IN_MATCH_ARG_INIT(msa,mpv)\ + SUBEXP_CALL_IN_MATCH_ARG_INIT(msa,mpv)\ + (msa).mp = mpv;\ + (msa).ptr_num = PTR_NUM_SIZE(reg);\ +} while(0) +#endif +#endif + +#define MATCH_ARG_FREE(msa) if ((msa).stack_p) xfree((msa).stack_p) + + +#define ALLOCA_PTR_NUM_LIMIT 50 + +#define STACK_INIT(stack_num) do {\ + if (msa->stack_p) {\ + is_alloca = 0;\ + alloc_base = msa->stack_p;\ + stk_base = (StackType* )(alloc_base\ + + (sizeof(StkPtrType) * msa->ptr_num));\ + stk = stk_base;\ + stk_end = stk_base + msa->stack_n;\ + }\ + else if (msa->ptr_num > ALLOCA_PTR_NUM_LIMIT) {\ + is_alloca = 0;\ + alloc_base = (char* )xmalloc(sizeof(StkPtrType) * msa->ptr_num\ + + sizeof(StackType) * (stack_num));\ + CHECK_NULL_RETURN_MEMERR(alloc_base);\ + stk_base = (StackType* )(alloc_base\ + + (sizeof(StkPtrType) * msa->ptr_num));\ + stk = stk_base;\ + stk_end = stk_base + (stack_num);\ + }\ + else {\ + is_alloca = 1;\ + alloc_base = (char* )xalloca(sizeof(StkPtrType) * msa->ptr_num\ + + sizeof(StackType) * (stack_num));\ + CHECK_NULL_RETURN_MEMERR(alloc_base);\ + stk_base = (StackType* )(alloc_base\ + + (sizeof(StkPtrType) * msa->ptr_num));\ + stk = stk_base;\ + stk_end = stk_base + (stack_num);\ + }\ +} while(0); + + +#define STACK_SAVE(msa,is_alloca,alloc_base) do{\ + (msa)->stack_n = (int )(stk_end - stk_base);\ + if ((is_alloca) != 0) {\ + size_t size = sizeof(StkPtrType) * (msa)->ptr_num\ + + sizeof(StackType) * (msa)->stack_n;\ + (msa)->stack_p = xmalloc(size);\ + CHECK_NULL_RETURN_MEMERR((msa)->stack_p);\ + xmemcpy((msa)->stack_p, (alloc_base), size);\ + }\ + else {\ + (msa)->stack_p = (alloc_base);\ + };\ +} while(0) + +static unsigned int MatchStackLimit = DEFAULT_MATCH_STACK_LIMIT_SIZE; + +extern unsigned int +onig_get_match_stack_limit_size(void) +{ + return MatchStackLimit; +} + +extern int +onig_set_match_stack_limit_size(unsigned int size) +{ + MatchStackLimit = size; + return 0; +} + +#ifdef USE_RETRY_LIMIT + +static unsigned long RetryLimitInMatch = DEFAULT_RETRY_LIMIT_IN_MATCH; +static unsigned long RetryLimitInSearch = DEFAULT_RETRY_LIMIT_IN_SEARCH; + +#define CHECK_RETRY_LIMIT_IN_MATCH do {\ + if (++retry_in_match_counter >= retry_limit_in_match && \ + retry_limit_in_match != 0) {\ + MATCH_AT_ERROR_RETURN((retry_in_match_counter >= msa->retry_limit_in_match && msa->retry_limit_in_match != 0) ? ONIGERR_RETRY_LIMIT_IN_MATCH_OVER : ONIGERR_RETRY_LIMIT_IN_SEARCH_OVER); \ + }\ +} while (0) + +#else + +#define CHECK_RETRY_LIMIT_IN_MATCH + +#endif /* USE_RETRY_LIMIT */ + +extern unsigned long +onig_get_retry_limit_in_match(void) +{ +#ifdef USE_RETRY_LIMIT + return RetryLimitInMatch; +#else + return 0; +#endif +} + +extern int +onig_set_retry_limit_in_match(unsigned long n) +{ +#ifdef USE_RETRY_LIMIT + RetryLimitInMatch = n; + return 0; +#else + return ONIG_NO_SUPPORT_CONFIG; +#endif +} + +extern unsigned long +onig_get_retry_limit_in_search(void) +{ +#ifdef USE_RETRY_LIMIT + return RetryLimitInSearch; +#else + return 0; +#endif +} + +extern int +onig_set_retry_limit_in_search(unsigned long n) +{ +#ifdef USE_RETRY_LIMIT + RetryLimitInSearch = n; + return 0; +#else + return ONIG_NO_SUPPORT_CONFIG; +#endif +} + +#ifdef USE_CALL +static unsigned long SubexpCallLimitInSearch = DEFAULT_SUBEXP_CALL_LIMIT_IN_SEARCH; + +extern unsigned long +onig_get_subexp_call_limit_in_search(void) +{ + return SubexpCallLimitInSearch; +} + +extern int +onig_set_subexp_call_limit_in_search(unsigned long n) +{ + SubexpCallLimitInSearch = n; + return 0; +} + +#endif + + +#ifdef USE_CALLOUT +static OnigCalloutFunc DefaultProgressCallout; +static OnigCalloutFunc DefaultRetractionCallout; +#endif + +extern OnigMatchParam* +onig_new_match_param(void) +{ + OnigMatchParam* p; + + p = (OnigMatchParam* )xmalloc(sizeof(*p)); + if (IS_NOT_NULL(p)) { + onig_initialize_match_param(p); + } + + return p; +} + +extern void +onig_free_match_param_content(OnigMatchParam* p) +{ +#ifdef USE_CALLOUT + if (IS_NOT_NULL(p->callout_data)) { + xfree(p->callout_data); + p->callout_data = 0; + } +#endif +} + +extern void +onig_free_match_param(OnigMatchParam* p) +{ + if (IS_NOT_NULL(p)) { + onig_free_match_param_content(p); + xfree(p); + } +} + +extern int +onig_initialize_match_param(OnigMatchParam* mp) +{ + mp->match_stack_limit = MatchStackLimit; +#ifdef USE_RETRY_LIMIT + mp->retry_limit_in_match = RetryLimitInMatch; + mp->retry_limit_in_search = RetryLimitInSearch; +#endif + + mp->callout_user_data = 0; + +#ifdef USE_CALLOUT + mp->progress_callout_of_contents = DefaultProgressCallout; + mp->retraction_callout_of_contents = DefaultRetractionCallout; + mp->match_at_call_counter = 0; + mp->callout_data = 0; + mp->callout_data_alloc_num = 0; +#endif + + return ONIG_NORMAL; +} + +#ifdef USE_CALLOUT + +static int +adjust_match_param(regex_t* reg, OnigMatchParam* mp) +{ + RegexExt* ext = reg->extp; + + mp->match_at_call_counter = 0; + + if (IS_NULL(ext) || ext->callout_num == 0) return ONIG_NORMAL; + + if (ext->callout_num > mp->callout_data_alloc_num) { + CalloutData* d; + size_t n = ext->callout_num * sizeof(*d); + if (IS_NOT_NULL(mp->callout_data)) + d = (CalloutData* )xrealloc(mp->callout_data, n); + else + d = (CalloutData* )xmalloc(n); + CHECK_NULL_RETURN_MEMERR(d); + + mp->callout_data = d; + mp->callout_data_alloc_num = ext->callout_num; + } + + xmemset(mp->callout_data, 0, mp->callout_data_alloc_num * sizeof(CalloutData)); + return ONIG_NORMAL; +} + +#define ADJUST_MATCH_PARAM(reg, mp) \ + r = adjust_match_param(reg, mp);\ + if (r != ONIG_NORMAL) return r; + +#define CALLOUT_DATA_AT_NUM(mp, num) ((mp)->callout_data + ((num) - 1)) + +extern int +onig_check_callout_data_and_clear_old_values(OnigCalloutArgs* args) +{ + OnigMatchParam* mp; + int num; + CalloutData* d; + + mp = args->msa->mp; + num = args->num; + + d = CALLOUT_DATA_AT_NUM(mp, num); + if (d->last_match_at_call_counter != mp->match_at_call_counter) { + xmemset(d, 0, sizeof(*d)); + d->last_match_at_call_counter = mp->match_at_call_counter; + return d->last_match_at_call_counter; + } + + return 0; +} + +extern int +onig_get_callout_data_dont_clear_old(regex_t* reg, OnigMatchParam* mp, + int callout_num, int slot, + OnigType* type, OnigValue* val) +{ + OnigType t; + CalloutData* d; + + if (callout_num <= 0) return ONIGERR_INVALID_ARGUMENT; + + d = CALLOUT_DATA_AT_NUM(mp, callout_num); + t = d->slot[slot].type; + if (IS_NOT_NULL(type)) *type = t; + if (IS_NOT_NULL(val)) *val = d->slot[slot].val; + return (t == ONIG_TYPE_VOID ? ONIG_VALUE_IS_NOT_SET : ONIG_NORMAL); +} + +extern int +onig_get_callout_data_by_tag_dont_clear_old(regex_t* reg, + OnigMatchParam* mp, const UChar* tag, const UChar* tag_end, int slot, + OnigType* type, OnigValue* val) +{ + int num; + + num = onig_get_callout_num_by_tag(reg, tag, tag_end); + if (num < 0) return num; + if (num == 0) return ONIGERR_INVALID_CALLOUT_TAG_NAME; + + return onig_get_callout_data_dont_clear_old(reg, mp, num, slot, type, val); +} + +extern int +onig_get_callout_data_by_callout_args_self_dont_clear_old( + OnigCalloutArgs* args, int slot, OnigType* type, OnigValue* val) +{ + return onig_get_callout_data_dont_clear_old(args->regex, args->msa->mp, + args->num, slot, type, val); +} + +extern int +onig_get_callout_data(regex_t* reg, OnigMatchParam* mp, + int callout_num, int slot, + OnigType* type, OnigValue* val) +{ + OnigType t; + CalloutData* d; + + if (callout_num <= 0) return ONIGERR_INVALID_ARGUMENT; + + d = CALLOUT_DATA_AT_NUM(mp, callout_num); + if (d->last_match_at_call_counter != mp->match_at_call_counter) { + xmemset(d, 0, sizeof(*d)); + d->last_match_at_call_counter = mp->match_at_call_counter; + } + + t = d->slot[slot].type; + if (IS_NOT_NULL(type)) *type = t; + if (IS_NOT_NULL(val)) *val = d->slot[slot].val; + return (t == ONIG_TYPE_VOID ? ONIG_VALUE_IS_NOT_SET : ONIG_NORMAL); +} + +extern int +onig_get_callout_data_by_tag(regex_t* reg, OnigMatchParam* mp, + const UChar* tag, const UChar* tag_end, int slot, + OnigType* type, OnigValue* val) +{ + int num; + + num = onig_get_callout_num_by_tag(reg, tag, tag_end); + if (num < 0) return num; + if (num == 0) return ONIGERR_INVALID_CALLOUT_TAG_NAME; + + return onig_get_callout_data(reg, mp, num, slot, type, val); +} + +extern int +onig_get_callout_data_by_callout_args(OnigCalloutArgs* args, + int callout_num, int slot, + OnigType* type, OnigValue* val) +{ + return onig_get_callout_data(args->regex, args->msa->mp, callout_num, slot, + type, val); +} + +extern int +onig_get_callout_data_by_callout_args_self(OnigCalloutArgs* args, + int slot, OnigType* type, OnigValue* val) +{ + return onig_get_callout_data(args->regex, args->msa->mp, args->num, slot, + type, val); +} + +extern int +onig_set_callout_data(regex_t* reg, OnigMatchParam* mp, + int callout_num, int slot, + OnigType type, OnigValue* val) +{ + CalloutData* d; + + if (callout_num <= 0) return ONIGERR_INVALID_ARGUMENT; + + d = CALLOUT_DATA_AT_NUM(mp, callout_num); + d->slot[slot].type = type; + d->slot[slot].val = *val; + d->last_match_at_call_counter = mp->match_at_call_counter; + + return ONIG_NORMAL; +} + +extern int +onig_set_callout_data_by_tag(regex_t* reg, OnigMatchParam* mp, + const UChar* tag, const UChar* tag_end, int slot, + OnigType type, OnigValue* val) +{ + int num; + + num = onig_get_callout_num_by_tag(reg, tag, tag_end); + if (num < 0) return num; + if (num == 0) return ONIGERR_INVALID_CALLOUT_TAG_NAME; + + return onig_set_callout_data(reg, mp, num, slot, type, val); +} + +extern int +onig_set_callout_data_by_callout_args(OnigCalloutArgs* args, + int callout_num, int slot, + OnigType type, OnigValue* val) +{ + return onig_set_callout_data(args->regex, args->msa->mp, callout_num, slot, + type, val); +} + +extern int +onig_set_callout_data_by_callout_args_self(OnigCalloutArgs* args, + int slot, OnigType type, OnigValue* val) +{ + return onig_set_callout_data(args->regex, args->msa->mp, args->num, slot, + type, val); +} + +#else +#define ADJUST_MATCH_PARAM(reg, mp) +#endif /* USE_CALLOUT */ + + +static int +stack_double(int* is_alloca, char** arg_alloc_base, + StackType** arg_stk_base, StackType** arg_stk_end, + StackType** arg_stk, MatchArg* msa) +{ + unsigned int n; + int used; + size_t size; + size_t new_size; + char* alloc_base; + char* new_alloc_base; + StackType *stk_base, *stk_end, *stk; + + alloc_base = *arg_alloc_base; + stk_base = *arg_stk_base; + stk_end = *arg_stk_end; + stk = *arg_stk; + + n = (unsigned int )(stk_end - stk_base); + size = sizeof(StkPtrType) * msa->ptr_num + sizeof(StackType) * n; + n *= 2; + new_size = sizeof(StkPtrType) * msa->ptr_num + sizeof(StackType) * n; + if (*is_alloca != 0) { + new_alloc_base = (char* )xmalloc(new_size); + if (IS_NULL(new_alloc_base)) { + STACK_SAVE(msa, *is_alloca, alloc_base); + return ONIGERR_MEMORY; + } + xmemcpy(new_alloc_base, alloc_base, size); + *is_alloca = 0; + } + else { + if (msa->match_stack_limit != 0 && n > msa->match_stack_limit) { + if ((unsigned int )(stk_end - stk_base) == msa->match_stack_limit) { + STACK_SAVE(msa, *is_alloca, alloc_base); + return ONIGERR_MATCH_STACK_LIMIT_OVER; + } + else + n = msa->match_stack_limit; + } + new_alloc_base = (char* )xrealloc(alloc_base, new_size); + if (IS_NULL(new_alloc_base)) { + STACK_SAVE(msa, *is_alloca, alloc_base); + return ONIGERR_MEMORY; + } + } + + alloc_base = new_alloc_base; + used = (int )(stk - stk_base); + *arg_alloc_base = alloc_base; + *arg_stk_base = (StackType* )(alloc_base + + (sizeof(StkPtrType) * msa->ptr_num)); + *arg_stk = *arg_stk_base + used; + *arg_stk_end = *arg_stk_base + n; + return 0; +} + +#define STACK_ENSURE(n) do {\ + if ((int )(stk_end - stk) < (n)) {\ + int r = stack_double(&is_alloca, &alloc_base, &stk_base, &stk_end, &stk, msa);\ + if (r != 0) return r;\ + UPDATE_FOR_STACK_REALLOC;\ + }\ +} while(0) + +#define STACK_AT(index) (stk_base + (index)) +#define GET_STACK_INDEX(stk) ((stk) - stk_base) + +#define STACK_PUSH_TYPE(stack_type) do {\ + STACK_ENSURE(1);\ + stk->type = (stack_type);\ + STACK_INC;\ +} while(0) + +#define IS_TO_VOID_TARGET(stk) (((stk)->type & STK_MASK_TO_VOID_TARGET) != 0) + +#define STACK_PUSH(stack_type,pat,s) do {\ + STACK_ENSURE(1);\ + stk->type = (stack_type);\ + stk->u.state.pcode = (pat);\ + stk->u.state.pstr = (s);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_WITH_ZID(stack_type,pat,s,id) do {\ + STACK_ENSURE(1);\ + stk->type = (stack_type);\ + stk->zid = (int )(id);\ + stk->u.state.pcode = (pat);\ + stk->u.state.pstr = (s);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_ENSURED(stack_type,pat) do {\ + stk->type = (stack_type);\ + stk->u.state.pcode = (pat);\ + STACK_INC;\ +} while(0) + +#ifdef ONIG_DEBUG_MATCH +#define STACK_PUSH_BOTTOM(stack_type,pat) do {\ + stk->type = (stack_type);\ + stk->u.state.pcode = (pat);\ + stk->u.state.pstr = s;\ + STACK_INC;\ +} while (0) +#else +#define STACK_PUSH_BOTTOM(stack_type,pat) do {\ + stk->type = (stack_type);\ + stk->u.state.pcode = (pat);\ + STACK_INC;\ +} while (0) +#endif + +#define STACK_PUSH_ALT(pat,s) STACK_PUSH(STK_ALT,pat,s) +#define STACK_PUSH_SUPER_ALT(pat,s) STACK_PUSH(STK_SUPER_ALT,pat,s) +#define STACK_PUSH_ALT_WITH_ZID(pat,s,id) STACK_PUSH_WITH_ZID(STK_ALT,pat,s,id) + +#if 0 +#define STACK_PUSH_REPEAT(sid, pat) do {\ + STACK_ENSURE(1);\ + stk->type = STK_REPEAT;\ + stk->zid = (sid);\ + stk->u.repeat.pcode = (pat);\ + STACK_INC;\ +} while(0) +#endif + +#define STACK_PUSH_REPEAT_INC(sid, ct) do {\ + STACK_ENSURE(1);\ + stk->type = STK_REPEAT_INC;\ + stk->zid = (sid);\ + stk->u.repeat_inc.count = (ct);\ + SAVE_REPEAT_STK_VAR(sid);\ + LOAD_TO_REPEAT_STK_VAR(sid);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_MEM_START(mnum, s) do {\ + STACK_ENSURE(1);\ + stk->type = STK_MEM_START;\ + stk->zid = (mnum);\ + stk->u.mem.pstr = (s);\ + stk->u.mem.prev_start = mem_start_stk[mnum];\ + stk->u.mem.prev_end = mem_end_stk[mnum];\ + mem_start_stk[mnum].i = GET_STACK_INDEX(stk);\ + mem_end_stk[mnum].i = INVALID_STACK_INDEX;\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_MEM_END(mnum, s) do {\ + STACK_ENSURE(1);\ + stk->type = STK_MEM_END;\ + stk->zid = (mnum);\ + stk->u.mem.pstr = (s);\ + stk->u.mem.prev_start = mem_start_stk[mnum];\ + stk->u.mem.prev_end = mem_end_stk[mnum];\ + mem_end_stk[mnum].i = GET_STACK_INDEX(stk);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_MEM_END_MARK(mnum) do {\ + STACK_ENSURE(1);\ + stk->type = STK_MEM_END_MARK;\ + stk->zid = (mnum);\ + STACK_INC;\ +} while(0) + +#define STACK_GET_MEM_START(mnum, k) do {\ + int level = 0;\ + k = stk;\ + while (k > stk_base) {\ + k--;\ + if ((k->type & STK_MASK_MEM_END_OR_MARK) != 0 \ + && k->zid == (mnum)) {\ + level++;\ + }\ + else if (k->type == STK_MEM_START && k->zid == (mnum)) {\ + if (level == 0) break;\ + level--;\ + }\ + }\ +} while(0) + +#define STACK_GET_MEM_RANGE(k, mnum, start, end) do {\ + int level = 0;\ + while (k < stk) {\ + if (k->type == STK_MEM_START && k->u.mem.num == (mnum)) {\ + if (level == 0) (start) = k->u.mem.pstr;\ + level++;\ + }\ + else if (k->type == STK_MEM_END && k->u.mem.num == (mnum)) {\ + level--;\ + if (level == 0) {\ + (end) = k->u.mem.pstr;\ + break;\ + }\ + }\ + k++;\ + }\ +} while(0) + +#define STACK_PUSH_EMPTY_CHECK_START(cnum, s) do {\ + STACK_ENSURE(1);\ + stk->type = STK_EMPTY_CHECK_START;\ + stk->zid = (cnum);\ + stk->u.empty_check.pstr = (s);\ + SAVE_EMPTY_CHECK_STK_VAR(cnum);\ + LOAD_TO_EMPTY_CHECK_STK_VAR(cnum);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_EMPTY_CHECK_END(cnum) do {\ + STACK_ENSURE(1);\ + stk->type = STK_EMPTY_CHECK_END;\ + stk->zid = (cnum);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_CALL_FRAME(pat) do {\ + STACK_ENSURE(1);\ + stk->type = STK_CALL_FRAME;\ + stk->u.call_frame.ret_addr = (pat);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_RETURN do {\ + STACK_ENSURE(1);\ + stk->type = STK_RETURN;\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_MARK(sid) do {\ + STACK_ENSURE(1);\ + stk->type = STK_MARK;\ + stk->zid = (sid);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_MARK_WITH_POS(sid, s) do {\ + STACK_ENSURE(1);\ + stk->type = STK_MARK;\ + stk->zid = (sid);\ + stk->u.val.v = (UChar* )(s);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_SAVE_VAL(sid, stype, sval) do {\ + STACK_ENSURE(1);\ + stk->type = STK_SAVE_VAL;\ + stk->zid = (sid);\ + stk->u.val.type = (stype);\ + stk->u.val.v = (UChar* )(sval);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_SAVE_VAL_WITH_SPREV(sid, stype, sval) do {\ + STACK_ENSURE(1);\ + stk->type = STK_SAVE_VAL;\ + stk->zid = (sid);\ + stk->u.val.type = (stype);\ + stk->u.val.v = (UChar* )(sval);\ + STACK_INC;\ +} while(0) + +#define STACK_GET_SAVE_VAL_TYPE_LAST(stype, sval) do {\ + StackType *k = stk;\ + while (k > stk_base) {\ + k--;\ + STACK_BASE_CHECK(k, "STACK_GET_SAVE_VAL_TYPE_LAST"); \ + if (k->type == STK_SAVE_VAL && k->u.val.type == (stype)) {\ + (sval) = k->u.val.v;\ + break;\ + }\ + }\ +} while (0) + +#define STACK_GET_SAVE_VAL_TYPE_LAST_ID(stype, sid, sval, clear) do {\ + int level = 0;\ + StackType *k = stk;\ + while (k > stk_base) {\ + k--;\ + STACK_BASE_CHECK(k, "STACK_GET_SAVE_VAL_TYPE_LAST_ID"); \ + if (k->type == STK_SAVE_VAL && k->u.val.type == (stype)\ + && k->zid == (sid)) {\ + if (level == 0) {\ + (sval) = k->u.val.v;\ + if (clear != 0) k->type = STK_VOID;\ + break;\ + }\ + }\ + else if (k->type == STK_CALL_FRAME)\ + level--;\ + else if (k->type == STK_RETURN)\ + level++;\ + }\ +} while (0) + +#define STACK_GET_SAVE_VAL_TYPE_LAST_ID_WITH_SPREV(stype, sid, sval) do { \ + int level = 0;\ + StackType *k = stk;\ + while (k > stk_base) {\ + k--;\ + STACK_BASE_CHECK(k, "STACK_GET_SAVE_VAL_TYPE_LAST_ID"); \ + if (k->type == STK_SAVE_VAL && k->u.val.type == (stype)\ + && k->zid == (sid)) {\ + if (level == 0) {\ + (sval) = k->u.val.v;\ + break;\ + }\ + }\ + else if (k->type == STK_CALL_FRAME)\ + level--;\ + else if (k->type == STK_RETURN)\ + level++;\ + }\ +} while (0) + +#define STACK_PUSH_CALLOUT_CONTENTS(anum, func) do {\ + STACK_ENSURE(1);\ + stk->type = STK_CALLOUT;\ + stk->zid = ONIG_NON_NAME_ID;\ + stk->u.callout.num = (anum);\ + stk->u.callout.func = (func);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_CALLOUT_NAME(aid, anum, func) do {\ + STACK_ENSURE(1);\ + stk->type = STK_CALLOUT;\ + stk->zid = (aid);\ + stk->u.callout.num = (anum);\ + stk->u.callout.func = (func);\ + STACK_INC;\ +} while(0) + +#ifdef ONIG_DEBUG +#define STACK_BASE_CHECK(p, at) \ + if ((p) < stk_base) {\ + fprintf(DBGFP, "at %s\n", at);\ + MATCH_AT_ERROR_RETURN(ONIGERR_STACK_BUG);\ + } +#else +#define STACK_BASE_CHECK(p, at) +#endif + +#define STACK_POP_ONE do {\ + stk--;\ + STACK_BASE_CHECK(stk, "STACK_POP_ONE"); \ +} while(0) + + +#ifdef USE_CALLOUT +#define POP_CALLOUT_CASE \ + else if (stk->type == STK_CALLOUT) {\ + RETRACTION_CALLOUT(stk->u.callout.func, stk->zid, stk->u.callout.num, msa->mp->callout_user_data);\ + } +#else +#define POP_CALLOUT_CASE +#endif + +#define STACK_POP do {\ + switch (pop_level) {\ + case STACK_POP_LEVEL_FREE:\ + while (1) {\ + stk--;\ + STACK_BASE_CHECK(stk, "STACK_POP"); \ + if ((stk->type & STK_MASK_POP_USED) != 0) break;\ + }\ + break;\ + case STACK_POP_LEVEL_MEM_START:\ + while (1) {\ + stk--;\ + STACK_BASE_CHECK(stk, "STACK_POP 2"); \ + if ((stk->type & STK_MASK_POP_USED) != 0) break;\ + else if (stk->type == STK_MEM_START) {\ + mem_start_stk[stk->zid] = stk->u.mem.prev_start;\ + mem_end_stk[stk->zid] = stk->u.mem.prev_end;\ + }\ + }\ + break;\ + default:\ + while (1) {\ + stk--;\ + STACK_BASE_CHECK(stk, "STACK_POP 3"); \ + if ((stk->type & STK_MASK_POP_USED) != 0) break;\ + else if ((stk->type & STK_MASK_POP_HANDLED) != 0) {\ + if (stk->type == STK_MEM_START) {\ + mem_start_stk[stk->zid] = stk->u.mem.prev_start;\ + mem_end_stk[stk->zid] = stk->u.mem.prev_end;\ + }\ + else if (stk->type == STK_MEM_END) {\ + mem_start_stk[stk->zid] = stk->u.mem.prev_start;\ + mem_end_stk[stk->zid] = stk->u.mem.prev_end;\ + }\ + POP_REPEAT_INC \ + POP_EMPTY_CHECK_START \ + POP_CALL \ + POP_CALLOUT_CASE\ + }\ + }\ + break;\ + }\ +} while(0) + +#define STACK_POP_TO_MARK(sid) do {\ + while (1) {\ + stk--;\ + STACK_BASE_CHECK(stk, "STACK_POP_TO_MARK");\ + if ((stk->type & STK_MASK_POP_HANDLED_TIL) != 0) {\ + if (stk->type == STK_MARK) {\ + if (stk->zid == (sid)) break;\ + }\ + else {\ + if (stk->type == STK_MEM_START) {\ + mem_start_stk[stk->zid] = stk->u.mem.prev_start;\ + mem_end_stk[stk->zid] = stk->u.mem.prev_end;\ + }\ + else if (stk->type == STK_MEM_END) {\ + mem_start_stk[stk->zid] = stk->u.mem.prev_start;\ + mem_end_stk[stk->zid] = stk->u.mem.prev_end;\ + }\ + POP_REPEAT_INC \ + POP_EMPTY_CHECK_START \ + POP_CALL \ + /* Don't call callout here because negation of total success by (?!..) (?type & STK_MASK_POP_HANDLED_TIL) != 0) {\ + if (stk->type == (til_type)) break;\ + else {\ + if (stk->type == STK_MEM_START) {\ + mem_start_stk[stk->zid] = stk->u.mem.prev_start;\ + mem_end_stk[stk->zid] = stk->u.mem.prev_end;\ + }\ + else if (stk->type == STK_MEM_END) {\ + mem_start_stk[stk->zid] = stk->u.mem.prev_start;\ + mem_end_stk[stk->zid] = stk->u.mem.prev_end;\ + }\ + POP_REPEAT_INC \ + POP_EMPTY_CHECK_START \ + POP_CALL \ + /* Don't call callout here because negation of total success by (?!..) (?type == STK_MARK) {\ + if (k->zid == (sid)) {\ + k->type = STK_VOID;\ + break;\ + } /* don't void different id mark */ \ + }\ + else\ + k->type = STK_VOID;\ + }\ + }\ +} while(0) + +#define EMPTY_CHECK_START_SEARCH(sid, k) do {\ + k = stk;\ + while (1) {\ + k--;\ + STACK_BASE_CHECK(k, "EMPTY_CHECK_START_SEARCH"); \ + if (k->type == STK_EMPTY_CHECK_START) {\ + if (k->zid == (sid)) break;\ + }\ + }\ +} while(0) + +#ifdef USE_REPEAT_AND_EMPTY_CHECK_LOCAL_VAR + +#define GET_EMPTY_CHECK_START(sid, k) do {\ + if (reg->num_call == 0) {\ + k = STACK_AT(empty_check_stk[sid]);\ + }\ + else {\ + EMPTY_CHECK_START_SEARCH(sid, k);\ + }\ +} while(0) +#else + +#define GET_EMPTY_CHECK_START(sid, k) EMPTY_CHECK_START_SEARCH(sid, k) + +#endif + + +#define STACK_EMPTY_CHECK(isnull, sid, s) do {\ + StackType* k;\ + GET_EMPTY_CHECK_START(sid, k);\ + (isnull) = (k->u.empty_check.pstr == (s));\ +} while(0) + +#define STACK_MEM_START_GET_PREV_END_ADDR(k /* STK_MEM_START*/, reg, addr) do {\ + if (k->u.mem.prev_end.i == INVALID_STACK_INDEX) {\ + (addr) = 0;\ + }\ + else {\ + if (MEM_STATUS_AT((reg)->push_mem_end, k->zid))\ + (addr) = STACK_AT(k->u.mem.prev_end.i)->u.mem.pstr;\ + else\ + (addr) = k->u.mem.prev_end.s;\ + }\ +} while (0) + +#ifdef USE_RIGID_CHECK_CAPTURES_IN_EMPTY_REPEAT +#define STACK_EMPTY_CHECK_MEM(isnull, sid, empty_status_mem, s, reg) do {\ + StackType* klow;\ + GET_EMPTY_CHECK_START(sid, klow);\ + if (klow->u.empty_check.pstr != (s)) {\ + stack_empty_check_mem_not_empty:\ + (isnull) = 0;\ + }\ + else {\ + StackType *k, *kk;\ + MemStatusType ms = (empty_status_mem);\ + (isnull) = 1;\ + k = stk;\ + while (k > klow) {\ + k--;\ + if (k->type == STK_MEM_END && MEM_STATUS_LIMIT_AT(ms, k->zid)) {\ + kk = klow;\ + while (kk < k) {\ + if (kk->type == STK_MEM_START && kk->zid == k->zid) {\ + if (kk->u.mem.prev_end.i == INVALID_STACK_INDEX || \ + ((STACK_AT(kk->u.mem.prev_end.i)->u.mem.pstr != k->u.mem.pstr || STACK_AT(kk->u.mem.prev_start.i)->u.mem.pstr != STACK_AT(k->u.mem.prev_start.i)->u.mem.pstr) && (STACK_AT(k->u.mem.prev_start.i)->u.mem.pstr != k->u.mem.pstr || STACK_AT(kk->u.mem.prev_start.i)->u.mem.pstr != STACK_AT(kk->u.mem.prev_end.i)->u.mem.pstr))) {\ + goto stack_empty_check_mem_not_empty;\ + }\ + else {\ + ms &= ~((MemStatusType )1 << k->zid);\ + break;\ + }\ + }\ + kk++;\ + }\ + if (ms == 0) break;\ + }\ + }\ + }\ +} while(0) + +#define STACK_EMPTY_CHECK_MEM_REC(isnull,sid,empty_status_mem,s,reg) do {\ + int level = 0;\ + StackType* klow = stk;\ + while (1) {\ + klow--;\ + STACK_BASE_CHECK(klow, "STACK_EMPTY_CHECK_MEM_REC");\ + if (klow->type == STK_EMPTY_CHECK_START) {\ + if (klow->zid == (sid)) {\ + if (level == 0) {\ + if (klow->u.empty_check.pstr != (s)) {\ + stack_empty_check_mem_rec_not_empty:\ + (isnull) = 0;\ + break;\ + }\ + else {\ + StackType *k, *kk;\ + MemStatusType ms;\ + (isnull) = 1;\ + if ((empty_status_mem) == 0) break;\ + ms = (empty_status_mem);\ + k = stk;\ + while (k > klow) {\ + k--;\ + if (k->type == STK_MEM_END) {\ + if (level == 0 && MEM_STATUS_LIMIT_AT(ms, k->zid)) {\ + kk = klow;\ + kk++;\ + while (kk < k) {\ + if (kk->type == STK_MEM_START && kk->zid == k->zid) {\ + if (kk->u.mem.prev_end.i == INVALID_STACK_INDEX || \ + ((STACK_AT(kk->u.mem.prev_end.i)->u.mem.pstr != k->u.mem.pstr || STACK_AT(kk->u.mem.prev_start.i)->u.mem.pstr != STACK_AT(k->u.mem.prev_start.i)->u.mem.pstr) && (STACK_AT(k->u.mem.prev_start.i)->u.mem.pstr != k->u.mem.pstr || STACK_AT(kk->u.mem.prev_start.i)->u.mem.pstr != STACK_AT(kk->u.mem.prev_end.i)->u.mem.pstr))) {\ + goto stack_empty_check_mem_rec_not_empty;\ + }\ + else {\ + ms &= ~((MemStatusType )1 << k->zid);\ + break;\ + }\ + }\ + else if (kk->type == STK_EMPTY_CHECK_START) {\ + if (kk->zid == (sid)) level++;\ + }\ + else if (kk->type == STK_EMPTY_CHECK_END) {\ + if (kk->zid == (sid)) level--;\ + }\ + kk++;\ + }\ + level = 0;\ + if (ms == 0) break;\ + }\ + }\ + else if (k->type == STK_EMPTY_CHECK_START) {\ + if (k->zid == (sid)) level++;\ + }\ + else if (k->type == STK_EMPTY_CHECK_END) {\ + if (k->zid == (sid)) level--;\ + }\ + }\ + break;\ + }\ + }\ + else {\ + level--;\ + }\ + }\ + }\ + else if (klow->type == STK_EMPTY_CHECK_END) {\ + if (klow->zid == (sid)) level++;\ + }\ + }\ +} while(0) +#else +#define STACK_EMPTY_CHECK_REC(isnull,id,s) do {\ + int level = 0;\ + StackType* k = stk;\ + while (1) {\ + k--;\ + STACK_BASE_CHECK(k, "STACK_EMPTY_CHECK_REC"); \ + if (k->type == STK_EMPTY_CHECK_START) {\ + if (k->u.empty_check.num == (id)) {\ + if (level == 0) {\ + (isnull) = (k->u.empty_check.pstr == (s));\ + break;\ + }\ + }\ + level--;\ + }\ + else if (k->type == STK_EMPTY_CHECK_END) {\ + level++;\ + }\ + }\ +} while(0) +#endif /* USE_RIGID_CHECK_CAPTURES_IN_EMPTY_REPEAT */ + +#define STACK_GET_REPEAT_COUNT_SEARCH(sid, c) do {\ + StackType* k = stk;\ + while (1) {\ + (k)--;\ + STACK_BASE_CHECK(k, "STACK_GET_REPEAT_COUNT_SEARCH");\ + if ((k)->type == STK_REPEAT_INC) {\ + if ((k)->zid == (sid)) {\ + (c) = (k)->u.repeat_inc.count;\ + break;\ + }\ + }\ + else if ((k)->type == STK_RETURN) {\ + int level = -1;\ + while (1) {\ + (k)--;\ + if ((k)->type == STK_CALL_FRAME) {\ + level++;\ + if (level == 0) break;\ + }\ + else if ((k)->type == STK_RETURN) level--;\ + }\ + }\ + }\ +} while(0) + +#ifdef USE_REPEAT_AND_EMPTY_CHECK_LOCAL_VAR + +#define STACK_GET_REPEAT_COUNT(sid, c) do {\ + if (reg->num_call == 0) {\ + (c) = (STACK_AT(repeat_stk[sid]))->u.repeat_inc.count;\ + }\ + else {\ + STACK_GET_REPEAT_COUNT_SEARCH(sid, c);\ + }\ +} while(0) +#else +#define STACK_GET_REPEAT_COUNT(sid, c) STACK_GET_REPEAT_COUNT_SEARCH(sid, c) +#endif + +#ifdef USE_CALL +#define STACK_RETURN(addr) do {\ + int level = 0;\ + StackType* k = stk;\ + while (1) {\ + k--;\ + STACK_BASE_CHECK(k, "STACK_RETURN"); \ + if (k->type == STK_CALL_FRAME) {\ + if (level == 0) {\ + (addr) = k->u.call_frame.ret_addr;\ + break;\ + }\ + else level--;\ + }\ + else if (k->type == STK_RETURN)\ + level++;\ + }\ +} while(0) + +#define GET_STACK_RETURN_CALL(k,addr) do {\ + int level = 0;\ + k = stk;\ + while (1) {\ + k--;\ + STACK_BASE_CHECK(k, "GET_STACK_RETURN_CALL");\ + if (k->type == STK_CALL_FRAME) {\ + if (level == 0) {\ + (addr) = k->u.call_frame.ret_addr;\ + break;\ + }\ + else level--;\ + }\ + else if (k->type == STK_RETURN)\ + level++;\ + }\ +} while(0) +#endif + + +#define STRING_CMP(s1,s2,len) do {\ + while (len-- > 0) {\ + if (*s1++ != *s2++) goto fail;\ + }\ +} while(0) + +#define STRING_CMP_IC(case_fold_flag,s1,ps2,len) do {\ + if (string_cmp_ic(encode, case_fold_flag, s1, ps2, len) == 0) \ + goto fail; \ +} while(0) + +static int string_cmp_ic(OnigEncoding enc, int case_fold_flag, + UChar* s1, UChar** ps2, int mblen) +{ + UChar buf1[ONIGENC_MBC_CASE_FOLD_MAXLEN]; + UChar buf2[ONIGENC_MBC_CASE_FOLD_MAXLEN]; + UChar *p1, *p2, *end1, *s2, *end2; + int len1, len2; + + s2 = *ps2; + end1 = s1 + mblen; + end2 = s2 + mblen; + while (s1 < end1) { + len1 = ONIGENC_MBC_CASE_FOLD(enc, case_fold_flag, &s1, end1, buf1); + len2 = ONIGENC_MBC_CASE_FOLD(enc, case_fold_flag, &s2, end2, buf2); + if (len1 != len2) return 0; + p1 = buf1; + p2 = buf2; + while (len1-- > 0) { + if (*p1 != *p2) return 0; + p1++; + p2++; + } + if (s2 >= end2) { + if (s1 < end1) return 0; + else break; + } + } + + *ps2 = s2; + return 1; +} + +#define STRING_CMP_VALUE(s1,s2,len,is_fail) do {\ + is_fail = 0;\ + while (len-- > 0) {\ + if (*s1++ != *s2++) {\ + is_fail = 1; break;\ + }\ + }\ +} while(0) + +#define STRING_CMP_VALUE_IC(case_fold_flag,s1,ps2,len,is_fail) do {\ + if (string_cmp_ic(encode, case_fold_flag, s1, ps2, len) == 0) \ + is_fail = 1; \ + else \ + is_fail = 0; \ +} while(0) + + +#define IS_EMPTY_STR (str == end) +#define ON_STR_BEGIN(s) ((s) == str) +#define ON_STR_END(s) ((s) == end) +#define DATA_ENSURE_CHECK1 (s < right_range) +#define DATA_ENSURE_CHECK(n) ((n) <= right_range - s) +#define DATA_ENSURE(n) if (right_range - s < (n)) goto fail + +#define INIT_RIGHT_RANGE right_range = (UChar* )in_right_range + +#ifdef USE_CAPTURE_HISTORY +static int +make_capture_history_tree(OnigCaptureTreeNode* node, StackType** kp, + StackType* stk_top, UChar* str, regex_t* reg) +{ + int n, r; + OnigCaptureTreeNode* child; + StackType* k = *kp; + + while (k < stk_top) { + if (k->type == STK_MEM_START) { + n = k->zid; + if (n <= ONIG_MAX_CAPTURE_HISTORY_GROUP && + MEM_STATUS_AT(reg->capture_history, n) != 0) { + child = history_node_new(); + CHECK_NULL_RETURN_MEMERR(child); + child->group = n; + child->beg = (int )(k->u.mem.pstr - str); + r = history_tree_add_child(node, child); + if (r != 0) return r; + *kp = (k + 1); + r = make_capture_history_tree(child, kp, stk_top, str, reg); + if (r != 0) return r; + + k = *kp; + child->end = (int )(k->u.mem.pstr - str); + } + } + else if (k->type == STK_MEM_END) { + if (k->zid == node->group) { + node->end = (int )(k->u.mem.pstr - str); + *kp = k; + return 0; + } + } + k++; + } + + return 1; /* 1: root node ending. */ +} +#endif + +#ifdef USE_BACKREF_WITH_LEVEL +static int mem_is_in_memp(int mem, int num, MemNumType* memp) +{ + int i; + + for (i = 0; i < num; i++) { + if (mem == (int )memp[i]) return 1; + } + return 0; +} + +static int +backref_match_at_nested_level(regex_t* reg, + StackType* top, StackType* stk_base, + int ignore_case, int case_fold_flag, + int nest, int mem_num, MemNumType* memp, + UChar** s, const UChar* send) +{ + UChar *ss, *p, *pstart, *pend = NULL_UCHARP; + int level; + StackType* k; + + level = 0; + k = top; + k--; + while (k >= stk_base) { + if (k->type == STK_CALL_FRAME) { + level--; + } + else if (k->type == STK_RETURN) { + level++; + } + else if (level == nest) { + if (k->type == STK_MEM_START) { + if (mem_is_in_memp(k->zid, mem_num, memp)) { + pstart = k->u.mem.pstr; + if (IS_NOT_NULL(pend)) { + if (pend - pstart > send - *s) return 0; /* or goto next_mem; */ + p = pstart; + ss = *s; + + if (ignore_case != 0) { + if (string_cmp_ic(reg->enc, case_fold_flag, + pstart, &ss, (int )(pend - pstart)) == 0) + return 0; /* or goto next_mem; */ + } + else { + while (p < pend) { + if (*p++ != *ss++) return 0; /* or goto next_mem; */ + } + } + + *s = ss; + return 1; + } + } + } + else if (k->type == STK_MEM_END) { + if (mem_is_in_memp(k->zid, mem_num, memp)) { + pend = k->u.mem.pstr; + } + } + } + k--; + } + + return 0; +} + +static int +backref_check_at_nested_level(regex_t* reg, + StackType* top, StackType* stk_base, + int nest, int mem_num, MemNumType* memp) +{ + int level; + StackType* k; + + level = 0; + k = top; + k--; + while (k >= stk_base) { + if (k->type == STK_CALL_FRAME) { + level--; + } + else if (k->type == STK_RETURN) { + level++; + } + else if (level == nest) { + if (k->type == STK_MEM_END) { + if (mem_is_in_memp(k->zid, mem_num, memp)) { + return 1; + } + } + } + k--; + } + + return 0; +} +#endif /* USE_BACKREF_WITH_LEVEL */ + +static int SubexpCallMaxNestLevel = DEFAULT_SUBEXP_CALL_MAX_NEST_LEVEL; + +#ifdef ONIG_DEBUG_STATISTICS + +#ifdef USE_TIMEOFDAY + +static struct timeval ts, te; +#define GETTIME(t) gettimeofday(&(t), (struct timezone* )0) +#define TIMEDIFF(te,ts) (((te).tv_usec - (ts).tv_usec) + \ + (((te).tv_sec - (ts).tv_sec)*1000000)) +#else + +static struct tms ts, te; +#define GETTIME(t) times(&(t)) +#define TIMEDIFF(te,ts) ((te).tms_utime - (ts).tms_utime) + +#endif /* USE_TIMEOFDAY */ + +static int OpCounter[256]; +static int OpPrevCounter[256]; +static unsigned long OpTime[256]; +static int OpCurr = OP_FINISH; +static int OpPrevTarget = OP_FAIL; +static int MaxStackDepth = 0; + +#define SOP_IN(opcode) do {\ + if (opcode == OpPrevTarget) OpPrevCounter[OpCurr]++;\ + OpCurr = opcode;\ + OpCounter[opcode]++;\ + GETTIME(ts);\ +} while(0) + +#define SOP_OUT do {\ + GETTIME(te);\ + OpTime[OpCurr] += TIMEDIFF(te, ts);\ +} while(0) + +extern void +onig_statistics_init(void) +{ + int i; + for (i = 0; i < 256; i++) { + OpCounter[i] = OpPrevCounter[i] = 0; OpTime[i] = 0; + } + MaxStackDepth = 0; +} + +extern int +onig_print_statistics(FILE* f) +{ + int r; + int i; + + r = fprintf(f, " count prev time\n"); + if (r < 0) return -1; + + for (i = 0; OpInfo[i].opcode >= 0; i++) { + r = fprintf(f, "%8d: %8d: %10ld: %s\n", + OpCounter[i], OpPrevCounter[i], OpTime[i], OpInfo[i].name); + if (r < 0) return -1; + } + r = fprintf(f, "\nmax stack depth: %d\n", MaxStackDepth); + if (r < 0) return -1; + + return 0; +} + +#define STACK_INC do {\ + stk++;\ + if (stk - stk_base > MaxStackDepth) \ + MaxStackDepth = stk - stk_base;\ +} while(0) + +#else +#define STACK_INC stk++ + +#define SOP_IN(opcode) +#define SOP_OUT +#endif + + +/* matching region of POSIX API */ +typedef int regoff_t; + +typedef struct { + regoff_t rm_so; + regoff_t rm_eo; +} posix_regmatch_t; + + + +#ifdef USE_THREADED_CODE + +#define BYTECODE_INTERPRETER_START GOTO_OP; +#define BYTECODE_INTERPRETER_END +#define CASE_OP(x) L_##x: SOP_IN(OP_##x); MATCH_DEBUG_OUT(0) +#define DEFAULT_OP /* L_DEFAULT: */ +#define NEXT_OP JUMP_OP +#define JUMP_OP GOTO_OP +#ifdef USE_DIRECT_THREADED_CODE +#define GOTO_OP goto *(p->opaddr) +#else +#define GOTO_OP goto *opcode_to_label[p->opcode] +#endif +#define BREAK_OP /* Nothing */ + +#else + +#define BYTECODE_INTERPRETER_START \ + while (1) {\ + MATCH_DEBUG_OUT(0)\ + switch (p->opcode) { +#define BYTECODE_INTERPRETER_END } } +#define CASE_OP(x) case OP_##x: SOP_IN(OP_##x); +#define DEFAULT_OP default: +#define NEXT_OP break +#define JUMP_OP GOTO_OP +#define GOTO_OP continue; break +#define BREAK_OP break + +#endif /* USE_THREADED_CODE */ + +#define INC_OP p++ +#define JUMP_OUT_WITH_SPREV_SET SOP_OUT; NEXT_OP +#define JUMP_OUT SOP_OUT; JUMP_OP +#define BREAK_OUT SOP_OUT; BREAK_OP +#define CHECK_INTERRUPT_JUMP_OUT SOP_OUT; CHECK_INTERRUPT_IN_MATCH; JUMP_OP + + +#ifdef ONIG_DEBUG_MATCH +#define MATCH_DEBUG_OUT(offset) do {\ + Operation *xp;\ + UChar *q, *bp, buf[50];\ + int len, spos;\ + spos = IS_NOT_NULL(s) ? (int )(s - str) : -1;\ + xp = p - (offset);\ + fprintf(DBGFP, "%7u: %7ld: %4d> \"",\ + counter, GET_STACK_INDEX(stk), spos);\ + counter++;\ + bp = buf;\ + if (IS_NOT_NULL(s)) {\ + for (i = 0, q = s; i < 7 && q < end; i++) {\ + len = enclen(encode, q);\ + while (len-- > 0) *bp++ = *q++;\ + }\ + if (q < end) { xmemcpy(bp, "...\"", 4); bp += 4; }\ + else { xmemcpy(bp, "\"", 1); bp += 1; }\ + }\ + else {\ + xmemcpy(bp, "\"", 1); bp += 1;\ + }\ + *bp = 0;\ + fputs((char* )buf, DBGFP);\ + for (i = 0; i < 20 - (bp - buf); i++) fputc(' ', DBGFP);\ + if (xp == FinishCode)\ + fprintf(DBGFP, "----: finish");\ + else {\ + int index;\ + enum OpCode zopcode;\ + Operation* addr;\ + index = (int )(xp - reg->ops);\ + fprintf(DBGFP, "%4d: ", index);\ + print_compiled_byte_code(DBGFP, reg, index, reg->ops, encode); \ + zopcode = GET_OPCODE(reg, index);\ + if (zopcode == OP_RETURN) {\ + GET_STACK_RETURN_CALL(stkp, addr);\ + fprintf(DBGFP, " f:%ld -> %d", \ + GET_STACK_INDEX(stkp), (int )(addr - reg->ops));\ + }\ + }\ + fprintf(DBGFP, "\n");\ + } while(0); +#else +#define MATCH_DEBUG_OUT(offset) +#endif + +#define MATCH_AT_ERROR_RETURN(err_code) do {\ + best_len = err_code; goto match_at_end;\ +} while(0) + +#define MATCH_COUNTER_OUT(title) do {\ + int i;\ + fprintf(DBGFP, "%s (%ld): retry limit: %8lu/%8lu, subexp_call: %8lu\n", (title), (sstart - str), retry_in_match_counter, retry_limit_in_match, msa->subexp_call_in_search_counter); \ + fprintf(DBGFP, " ");\ + for (i = 0; i < MAX_SUBEXP_CALL_COUNTERS; i++) {\ + fprintf(DBGFP, " %6lu", subexp_call_counters[i]);\ + }\ + fprintf(DBGFP, "\n");\ + fflush(DBGFP);\ +} while (0) + + +/* match data(str - end) from position (sstart). */ +static int +match_at(regex_t* reg, const UChar* str, const UChar* end, + const UChar* in_right_range, const UChar* sstart, + MatchArg* msa) +{ + +#if defined(USE_DIRECT_THREADED_CODE) + static Operation FinishCode[] = { { .opaddr=&&L_FINISH } }; +#else + static Operation FinishCode[] = { { OP_FINISH } }; +#endif + +#ifdef USE_THREADED_CODE + static const void *opcode_to_label[] = { + &&L_FINISH, + &&L_END, + &&L_STR_1, + &&L_STR_2, + &&L_STR_3, + &&L_STR_4, + &&L_STR_5, + &&L_STR_N, + &&L_STR_MB2N1, + &&L_STR_MB2N2, + &&L_STR_MB2N3, + &&L_STR_MB2N, + &&L_STR_MB3N, + &&L_STR_MBN, + &&L_CCLASS, + &&L_CCLASS_MB, + &&L_CCLASS_MIX, + &&L_CCLASS_NOT, + &&L_CCLASS_MB_NOT, + &&L_CCLASS_MIX_NOT, + &&L_ANYCHAR, + &&L_ANYCHAR_ML, + &&L_ANYCHAR_STAR, + &&L_ANYCHAR_ML_STAR, + &&L_ANYCHAR_STAR_PEEK_NEXT, + &&L_ANYCHAR_ML_STAR_PEEK_NEXT, + &&L_WORD, + &&L_WORD_ASCII, + &&L_NO_WORD, + &&L_NO_WORD_ASCII, + &&L_WORD_BOUNDARY, + &&L_NO_WORD_BOUNDARY, + &&L_WORD_BEGIN, + &&L_WORD_END, + &&L_TEXT_SEGMENT_BOUNDARY, + &&L_BEGIN_BUF, + &&L_END_BUF, + &&L_BEGIN_LINE, + &&L_END_LINE, + &&L_SEMI_END_BUF, + &&L_CHECK_POSITION, + &&L_BACKREF1, + &&L_BACKREF2, + &&L_BACKREF_N, + &&L_BACKREF_N_IC, + &&L_BACKREF_MULTI, + &&L_BACKREF_MULTI_IC, +#ifdef USE_BACKREF_WITH_LEVEL + &&L_BACKREF_WITH_LEVEL, + &&L_BACKREF_WITH_LEVEL_IC, +#endif + &&L_BACKREF_CHECK, +#ifdef USE_BACKREF_WITH_LEVEL + &&L_BACKREF_CHECK_WITH_LEVEL, +#endif + &&L_MEM_START, + &&L_MEM_START_PUSH, + &&L_MEM_END_PUSH, +#ifdef USE_CALL + &&L_MEM_END_PUSH_REC, +#endif + &&L_MEM_END, +#ifdef USE_CALL + &&L_MEM_END_REC, +#endif + &&L_FAIL, + &&L_JUMP, + &&L_PUSH, + &&L_PUSH_SUPER, + &&L_POP, + &&L_POP_TO_MARK, +#ifdef USE_OP_PUSH_OR_JUMP_EXACT + &&L_PUSH_OR_JUMP_EXACT1, +#endif + &&L_PUSH_IF_PEEK_NEXT, + &&L_REPEAT, + &&L_REPEAT_NG, + &&L_REPEAT_INC, + &&L_REPEAT_INC_NG, + &&L_EMPTY_CHECK_START, + &&L_EMPTY_CHECK_END, + &&L_EMPTY_CHECK_END_MEMST, +#ifdef USE_CALL + &&L_EMPTY_CHECK_END_MEMST_PUSH, +#endif + &&L_MOVE, + &&L_STEP_BACK_START, + &&L_STEP_BACK_NEXT, + &&L_CUT_TO_MARK, + &&L_MARK, + &&L_SAVE_VAL, + &&L_UPDATE_VAR, +#ifdef USE_CALL + &&L_CALL, + &&L_RETURN, +#endif +#ifdef USE_CALLOUT + &&L_CALLOUT_CONTENTS, + &&L_CALLOUT_NAME, +#endif + }; +#endif + + int i, n, num_mem, best_len, pop_level; + LengthType tlen, tlen2; + MemNumType mem; + RelAddrType addr; + UChar *s, *ps; + UChar *right_range; + int is_alloca; + char *alloc_base; + StackType *stk_base, *stk, *stk_end; + StackType *stkp; /* used as any purpose. */ + StkPtrType *mem_start_stk, *mem_end_stk; + UChar* keep; + OnigRegion* region; + +#ifdef USE_REPEAT_AND_EMPTY_CHECK_LOCAL_VAR + StackIndex *repeat_stk; + StackIndex *empty_check_stk; +#endif +#ifdef USE_RETRY_LIMIT + unsigned long retry_limit_in_match; + unsigned long retry_in_match_counter; +#endif +#ifdef USE_CALLOUT + int of; +#endif +#ifdef ONIG_DEBUG_MATCH_COUNTER +#define MAX_SUBEXP_CALL_COUNTERS 9 + unsigned long subexp_call_counters[MAX_SUBEXP_CALL_COUNTERS]; +#endif + + OnigOptionType options; + Operation* p = reg->ops; + OnigEncoding encode = reg->enc; + OnigCaseFoldType case_fold_flag = reg->case_fold_flag; + +#ifdef USE_CALL + unsigned long subexp_call_nest_counter = 0; +#endif + +#ifdef ONIG_DEBUG_MATCH + static unsigned int counter = 1; +#endif + +#ifdef ONIG_DEBUG_MATCH_COUNTER + for (i = 0; i < MAX_SUBEXP_CALL_COUNTERS; i++) { + subexp_call_counters[i] = 0; + } +#endif + +#ifdef USE_DIRECT_THREADED_CODE + if (IS_NULL(msa)) { + for (i = 0; i < reg->ops_used; i++) { + const void* addr; + addr = opcode_to_label[reg->ocs[i]]; + p->opaddr = addr; + p++; + } + return ONIG_NORMAL; + } +#endif + + options = msa->options; + +#ifdef USE_CALLOUT + msa->mp->match_at_call_counter++; +#endif + +#ifdef USE_RETRY_LIMIT + retry_limit_in_match = msa->retry_limit_in_match; + if (msa->retry_limit_in_search != 0) { + unsigned long rem = msa->retry_limit_in_search + - msa->retry_limit_in_search_counter; + if (rem < retry_limit_in_match || retry_limit_in_match == 0) + retry_limit_in_match = rem; + } +#endif + + pop_level = reg->stack_pop_level; + num_mem = reg->num_mem; + STACK_INIT(INIT_MATCH_STACK_SIZE); + UPDATE_FOR_STACK_REALLOC; + for (i = 1; i <= num_mem; i++) { + mem_start_stk[i].i = mem_end_stk[i].i = INVALID_STACK_INDEX; + } + +#ifdef ONIG_DEBUG_MATCH + fprintf(DBGFP, "match_at: str: %p, end: %p, start: %p\n", str, end, sstart); + fprintf(DBGFP, "size: %d, start offset: %d\n", + (int )(end - str), (int )(sstart - str)); +#endif + + best_len = ONIG_MISMATCH; + keep = s = (UChar* )sstart; + STACK_PUSH_BOTTOM(STK_ALT, FinishCode); /* bottom stack */ + INIT_RIGHT_RANGE; + +#ifdef USE_RETRY_LIMIT + retry_in_match_counter = 0; +#endif + + BYTECODE_INTERPRETER_START { + CASE_OP(END) + if (OPTON_MATCH_WHOLE_STRING(options)) { + if (! ON_STR_END(s)) goto fail; + } + + n = (int )(s - sstart); + if (n == 0 && OPTON_FIND_NOT_EMPTY(options)) { + best_len = ONIG_MISMATCH; + goto fail; /* for retry */ + } + +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE + if (OPTON_FIND_LONGEST(options)) { + if (n > best_len) { + if (n > msa->best_len) { + best_len = n; + msa->best_len = n; + msa->best_s = (UChar* )sstart; + } + else { + if (s >= in_right_range && msa->best_s == sstart) { + goto op_end_out; + } + else { + goto fail; /* for retry */ + } + } + } + else { + goto fail; /* for retry */ + } + } + else { + best_len = n; + } +#else + best_len = n; +#endif + + /* set region */ + region = msa->region; + if (region) { + if (keep > s) keep = s; + +#ifdef USE_POSIX_API + if (OPTON_POSIX_REGION(options)) { + posix_regmatch_t* rmt = (posix_regmatch_t* )region; + + rmt[0].rm_so = (regoff_t )(keep - str); + rmt[0].rm_eo = (regoff_t )(s - str); + for (i = 1; i <= num_mem; i++) { + if (mem_end_stk[i].i != INVALID_STACK_INDEX) { + rmt[i].rm_so = (regoff_t )(STACK_MEM_START(reg, i) - str); + rmt[i].rm_eo = (regoff_t )(STACK_MEM_END(reg, i) - str); + } + else { + rmt[i].rm_so = rmt[i].rm_eo = ONIG_REGION_NOTPOS; + } + } + } + else { +#endif /* USE_POSIX_API */ + region->beg[0] = (int )(keep - str); + region->end[0] = (int )(s - str); + for (i = 1; i <= num_mem; i++) { + if (mem_end_stk[i].i != INVALID_STACK_INDEX) { + region->beg[i] = (int )(STACK_MEM_START(reg, i) - str); + region->end[i] = (int )(STACK_MEM_END(reg, i) - str); + } + else { + region->beg[i] = region->end[i] = ONIG_REGION_NOTPOS; + } + } + +#ifdef USE_CAPTURE_HISTORY + if (reg->capture_history != 0) { + OnigCaptureTreeNode* node; + + if (IS_NULL(region->history_root)) { + region->history_root = node = history_node_new(); + CHECK_NULL_RETURN_MEMERR(node); + } + else { + node = region->history_root; + history_tree_clear(node); + } + + node->group = 0; + node->beg = (int )(keep - str); + node->end = (int )(s - str); + + stkp = stk_base; + i = make_capture_history_tree(region->history_root, &stkp, + stk, (UChar* )str, reg); + if (i < 0) MATCH_AT_ERROR_RETURN(i); + } +#endif /* USE_CAPTURE_HISTORY */ +#ifdef USE_POSIX_API + } /* else OPTON_POSIX_REGION() */ +#endif + } /* if (region) */ + + if (OPTON_CALLBACK_EACH_MATCH(options) && + IS_NOT_NULL(CallbackEachMatch)) { + i = CallbackEachMatch(str, end, sstart, region, + msa->mp->callout_user_data); + if (i < 0) { + SOP_OUT; + MATCH_AT_ERROR_RETURN(i); + } +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE + if (! OPTON_FIND_LONGEST(options)) +#endif + best_len = ONIG_MISMATCH; + + goto fail; + } + +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE + if (OPTON_FIND_LONGEST(options)) goto fail; +#endif + + op_end_out: + /* default behavior: return first-matching result. */ + SOP_OUT; + goto match_at_end; + + CASE_OP(STR_1) + DATA_ENSURE(1); + ps = p->exact.s; + if (*ps != *s) goto fail; + s++; + INC_OP; + JUMP_OUT_WITH_SPREV_SET; + + CASE_OP(STR_2) + DATA_ENSURE(2); + ps = p->exact.s; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + s++; + INC_OP; + JUMP_OUT; + + CASE_OP(STR_3) + DATA_ENSURE(3); + ps = p->exact.s; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + s++; + INC_OP; + JUMP_OUT; + + CASE_OP(STR_4) + DATA_ENSURE(4); + ps = p->exact.s; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + s++; + INC_OP; + JUMP_OUT; + + CASE_OP(STR_5) + DATA_ENSURE(5); + ps = p->exact.s; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + s++; + INC_OP; + JUMP_OUT; + + CASE_OP(STR_N) + tlen = p->exact_n.n; + DATA_ENSURE(tlen); + ps = p->exact_n.s; + while (tlen-- > 0) { + if (*ps++ != *s++) goto fail; + } + INC_OP; + JUMP_OUT; + + CASE_OP(STR_MB2N1) + DATA_ENSURE(2); + ps = p->exact.s; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + s++; + INC_OP; + JUMP_OUT_WITH_SPREV_SET; + + CASE_OP(STR_MB2N2) + DATA_ENSURE(4); + ps = p->exact.s; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + s++; + INC_OP; + JUMP_OUT; + + CASE_OP(STR_MB2N3) + DATA_ENSURE(6); + ps = p->exact.s; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + ps++; s++; + INC_OP; + JUMP_OUT; + + CASE_OP(STR_MB2N) + tlen = p->exact_n.n; + DATA_ENSURE(tlen * 2); + ps = p->exact_n.s; + while (tlen-- > 0) { + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + ps++; s++; + } + INC_OP; + JUMP_OUT; + + CASE_OP(STR_MB3N) + tlen = p->exact_n.n; + DATA_ENSURE(tlen * 3); + ps = p->exact_n.s; + while (tlen-- > 0) { + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + ps++; s++; + if (*ps != *s) goto fail; + ps++; s++; + } + INC_OP; + JUMP_OUT; + + CASE_OP(STR_MBN) + tlen = p->exact_len_n.len; /* mb byte len */ + tlen2 = p->exact_len_n.n; /* number of chars */ + tlen2 *= tlen; + DATA_ENSURE(tlen2); + ps = p->exact_len_n.s; + while (tlen2-- > 0) { + if (*ps != *s) goto fail; + ps++; s++; + } + INC_OP; + JUMP_OUT; + + CASE_OP(CCLASS) + DATA_ENSURE(1); + if (BITSET_AT(p->cclass.bsp, *s) == 0) goto fail; + if (ONIGENC_IS_MBC_HEAD(encode, s)) goto fail; + s++; + INC_OP; + JUMP_OUT_WITH_SPREV_SET; + + CASE_OP(CCLASS_MB) + DATA_ENSURE(1); + if (! ONIGENC_IS_MBC_HEAD(encode, s)) goto fail; + + cclass_mb: + { + OnigCodePoint code; + UChar *ss; + int mb_len; + + mb_len = enclen(encode, s); + DATA_ENSURE(mb_len); + ss = s; + s += mb_len; + code = ONIGENC_MBC_TO_CODE(encode, ss, s); + if (! onig_is_in_code_range(p->cclass_mb.mb, code)) goto fail; + } + INC_OP; + JUMP_OUT_WITH_SPREV_SET; + + CASE_OP(CCLASS_MIX) + DATA_ENSURE(1); + if (ONIGENC_IS_MBC_HEAD(encode, s)) { + goto cclass_mb; + } + else { + if (BITSET_AT(p->cclass_mix.bsp, *s) == 0) + goto fail; + + s++; + } + INC_OP; + JUMP_OUT_WITH_SPREV_SET; + + CASE_OP(CCLASS_NOT) + DATA_ENSURE(1); + if (BITSET_AT(p->cclass.bsp, *s) != 0) goto fail; + s += enclen(encode, s); + INC_OP; + JUMP_OUT_WITH_SPREV_SET; + + CASE_OP(CCLASS_MB_NOT) + DATA_ENSURE(1); + if (! ONIGENC_IS_MBC_HEAD(encode, s)) { + s++; + goto cc_mb_not_success; + } + + cclass_mb_not: + { + OnigCodePoint code; + UChar *ss; + int mb_len = enclen(encode, s); + + if (! DATA_ENSURE_CHECK(mb_len)) { + DATA_ENSURE(1); + s = (UChar* )end; + goto cc_mb_not_success; + } + + ss = s; + s += mb_len; + code = ONIGENC_MBC_TO_CODE(encode, ss, s); + if (onig_is_in_code_range(p->cclass_mb.mb, code)) goto fail; + } + + cc_mb_not_success: + INC_OP; + JUMP_OUT_WITH_SPREV_SET; + + CASE_OP(CCLASS_MIX_NOT) + DATA_ENSURE(1); + if (ONIGENC_IS_MBC_HEAD(encode, s)) { + goto cclass_mb_not; + } + else { + if (BITSET_AT(p->cclass_mix.bsp, *s) != 0) + goto fail; + + s++; + } + INC_OP; + JUMP_OUT_WITH_SPREV_SET; + + CASE_OP(ANYCHAR) + DATA_ENSURE(1); + n = enclen(encode, s); + DATA_ENSURE(n); + if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) goto fail; + s += n; + INC_OP; + JUMP_OUT_WITH_SPREV_SET; + + CASE_OP(ANYCHAR_ML) + DATA_ENSURE(1); + n = enclen(encode, s); + DATA_ENSURE(n); + s += n; + INC_OP; + JUMP_OUT_WITH_SPREV_SET; + + CASE_OP(ANYCHAR_STAR) + INC_OP; + while (DATA_ENSURE_CHECK1) { + STACK_PUSH_ALT(p, s); + n = enclen(encode, s); + DATA_ENSURE(n); + if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) goto fail; + s += n; + } + JUMP_OUT; + + CASE_OP(ANYCHAR_ML_STAR) + INC_OP; + while (DATA_ENSURE_CHECK1) { + STACK_PUSH_ALT(p, s); + n = enclen(encode, s); + if (n > 1) { + DATA_ENSURE(n); + s += n; + } + else { + s++; + } + } + JUMP_OUT; + + CASE_OP(ANYCHAR_STAR_PEEK_NEXT) + { + UChar c; + + c = p->anychar_star_peek_next.c; + INC_OP; + while (DATA_ENSURE_CHECK1) { + if (c == *s) { + STACK_PUSH_ALT(p, s); + } + n = enclen(encode, s); + DATA_ENSURE(n); + if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) goto fail; + s += n; + } + } + JUMP_OUT; + + CASE_OP(ANYCHAR_ML_STAR_PEEK_NEXT) + { + UChar c; + + c = p->anychar_star_peek_next.c; + INC_OP; + while (DATA_ENSURE_CHECK1) { + if (c == *s) { + STACK_PUSH_ALT(p, s); + } + n = enclen(encode, s); + if (n > 1) { + DATA_ENSURE(n); + s += n; + } + else { + s++; + } + } + } + JUMP_OUT; + + CASE_OP(WORD) + DATA_ENSURE(1); + if (! ONIGENC_IS_MBC_WORD(encode, s, end)) + goto fail; + + s += enclen(encode, s); + INC_OP; + JUMP_OUT_WITH_SPREV_SET; + + CASE_OP(WORD_ASCII) + DATA_ENSURE(1); + if (! ONIGENC_IS_MBC_WORD_ASCII(encode, s, end)) + goto fail; + + s += enclen(encode, s); + INC_OP; + JUMP_OUT_WITH_SPREV_SET; + + CASE_OP(NO_WORD) + DATA_ENSURE(1); + if (ONIGENC_IS_MBC_WORD(encode, s, end)) + goto fail; + + s += enclen(encode, s); + INC_OP; + JUMP_OUT_WITH_SPREV_SET; + + CASE_OP(NO_WORD_ASCII) + DATA_ENSURE(1); + if (ONIGENC_IS_MBC_WORD_ASCII(encode, s, end)) + goto fail; + + s += enclen(encode, s); + INC_OP; + JUMP_OUT_WITH_SPREV_SET; + + CASE_OP(WORD_BOUNDARY) + { + ModeType mode; + + mode = p->word_boundary.mode; + if (ON_STR_BEGIN(s)) { + DATA_ENSURE(1); + if (! IS_MBC_WORD_ASCII_MODE(encode, s, end, mode)) + goto fail; + } + else { + UChar* sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s); + if (ON_STR_END(s)) { + if (! IS_MBC_WORD_ASCII_MODE(encode, sprev, end, mode)) + goto fail; + } + else { + if (IS_MBC_WORD_ASCII_MODE(encode, s, end, mode) + == IS_MBC_WORD_ASCII_MODE(encode, sprev, end, mode)) + goto fail; + } + } + } + INC_OP; + JUMP_OUT; + + CASE_OP(NO_WORD_BOUNDARY) + { + ModeType mode; + + mode = p->word_boundary.mode; + if (ON_STR_BEGIN(s)) { + if (DATA_ENSURE_CHECK1 && IS_MBC_WORD_ASCII_MODE(encode, s, end, mode)) + goto fail; + } + else { + UChar* sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s); + if (ON_STR_END(s)) { + if (IS_MBC_WORD_ASCII_MODE(encode, sprev, end, mode)) + goto fail; + } + else { + if (IS_MBC_WORD_ASCII_MODE(encode, s, end, mode) + != IS_MBC_WORD_ASCII_MODE(encode, sprev, end, mode)) + goto fail; + } + } + } + INC_OP; + JUMP_OUT; + +#ifdef USE_WORD_BEGIN_END + CASE_OP(WORD_BEGIN) + { + ModeType mode; + + mode = p->word_boundary.mode; + if (DATA_ENSURE_CHECK1 && IS_MBC_WORD_ASCII_MODE(encode, s, end, mode)) { + UChar* sprev; + if (ON_STR_BEGIN(s)) { + INC_OP; + JUMP_OUT; + } + sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s); + if (! IS_MBC_WORD_ASCII_MODE(encode, sprev, end, mode)) { + INC_OP; + JUMP_OUT; + } + } + } + goto fail; + + CASE_OP(WORD_END) + { + ModeType mode; + + mode = p->word_boundary.mode; + if (! ON_STR_BEGIN(s)) { + UChar* sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s); + if (IS_MBC_WORD_ASCII_MODE(encode, sprev, end, mode)) { + if (ON_STR_END(s) || ! IS_MBC_WORD_ASCII_MODE(encode, s, end, mode)) { + INC_OP; + JUMP_OUT; + } + } + } + } + goto fail; +#endif + + CASE_OP(TEXT_SEGMENT_BOUNDARY) + { + int is_break; + UChar* sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s); + + switch (p->text_segment_boundary.type) { + case EXTENDED_GRAPHEME_CLUSTER_BOUNDARY: + is_break = onigenc_egcb_is_break_position(encode, s, sprev, str, end); + break; +#ifdef USE_UNICODE_WORD_BREAK + case WORD_BOUNDARY: + is_break = onigenc_wb_is_break_position(encode, s, sprev, str, end); + break; +#endif + default: + MATCH_AT_ERROR_RETURN(ONIGERR_UNDEFINED_BYTECODE); + break; + } + + if (p->text_segment_boundary.not != 0) + is_break = ! is_break; + + if (is_break != 0) { + INC_OP; + JUMP_OUT; + } + else { + goto fail; + } + } + + CASE_OP(BEGIN_BUF) + if (! ON_STR_BEGIN(s)) goto fail; + if (OPTON_NOTBOL(options)) goto fail; + if (OPTON_NOT_BEGIN_STRING(options)) goto fail; + + INC_OP; + JUMP_OUT; + + CASE_OP(END_BUF) + if (! ON_STR_END(s)) goto fail; + if (OPTON_NOTEOL(options)) goto fail; + if (OPTON_NOT_END_STRING(options)) goto fail; + + INC_OP; + JUMP_OUT; + + CASE_OP(BEGIN_LINE) + if (ON_STR_BEGIN(s)) { + if (OPTON_NOTBOL(options)) goto fail; + INC_OP; + JUMP_OUT; + } + else if (! ON_STR_END(s)) { + UChar* sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s); + if (ONIGENC_IS_MBC_NEWLINE(encode, sprev, end)) { + INC_OP; + JUMP_OUT; + } + } + goto fail; + + CASE_OP(END_LINE) + if (ON_STR_END(s)) { +#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE + UChar* sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s); + if (IS_EMPTY_STR || !ONIGENC_IS_MBC_NEWLINE(encode, sprev, end)) { +#endif + if (OPTON_NOTEOL(options)) goto fail; + INC_OP; + JUMP_OUT; +#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE + } +#endif + } + else if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) { + INC_OP; + JUMP_OUT; + } +#ifdef USE_CRNL_AS_LINE_TERMINATOR + else if (ONIGENC_IS_MBC_CRNL(encode, s, end)) { + INC_OP; + JUMP_OUT; + } +#endif + goto fail; + + CASE_OP(SEMI_END_BUF) + if (ON_STR_END(s)) { +#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE + UChar* sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s); + if (IS_EMPTY_STR || !ONIGENC_IS_MBC_NEWLINE(encode, sprev, end)) { +#endif + if (OPTON_NOTEOL(options)) goto fail; + if (OPTON_NOT_END_STRING(options)) goto fail; + INC_OP; + JUMP_OUT; +#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE + } +#endif + } + else if (ONIGENC_IS_MBC_NEWLINE(encode, s, end) && + ON_STR_END(s + enclen(encode, s))) { + if (OPTON_NOTEOL(options)) goto fail; + if (OPTON_NOT_END_STRING(options)) goto fail; + INC_OP; + JUMP_OUT; + } +#ifdef USE_CRNL_AS_LINE_TERMINATOR + else if (ONIGENC_IS_MBC_CRNL(encode, s, end)) { + UChar* ss = s + enclen(encode, s); + ss += enclen(encode, ss); + if (ON_STR_END(ss)) { + if (OPTON_NOTEOL(options)) goto fail; + if (OPTON_NOT_END_STRING(options)) goto fail; + INC_OP; + JUMP_OUT; + } + } +#endif + goto fail; + + CASE_OP(CHECK_POSITION) + switch (p->check_position.type) { + case CHECK_POSITION_SEARCH_START: + if (s != msa->start) goto fail; + if (OPTON_NOT_BEGIN_POSITION(options)) goto fail; + break; + case CHECK_POSITION_CURRENT_RIGHT_RANGE: + if (s != right_range) goto fail; + break; + default: + break; + } + INC_OP; + JUMP_OUT; + + CASE_OP(MEM_START_PUSH) + mem = p->memory_start.num; + STACK_PUSH_MEM_START(mem, s); + INC_OP; + JUMP_OUT; + + CASE_OP(MEM_START) + mem = p->memory_start.num; + mem_start_stk[mem].s = s; + INC_OP; + JUMP_OUT; + + CASE_OP(MEM_END_PUSH) + mem = p->memory_end.num; + STACK_PUSH_MEM_END(mem, s); + INC_OP; + JUMP_OUT; + + CASE_OP(MEM_END) + mem = p->memory_end.num; + mem_end_stk[mem].s = s; + INC_OP; + JUMP_OUT; + +#ifdef USE_CALL + CASE_OP(MEM_END_PUSH_REC) + { + StackIndex si; + + mem = p->memory_end.num; + STACK_GET_MEM_START(mem, stkp); /* should be before push mem-end. */ + si = GET_STACK_INDEX(stkp); + STACK_PUSH_MEM_END(mem, s); + mem_start_stk[mem].i = si; + INC_OP; + JUMP_OUT; + } + + CASE_OP(MEM_END_REC) + mem = p->memory_end.num; + mem_end_stk[mem].s = s; + STACK_GET_MEM_START(mem, stkp); + + if (MEM_STATUS_AT(reg->push_mem_start, mem)) + mem_start_stk[mem].i = GET_STACK_INDEX(stkp); + else + mem_start_stk[mem].s = stkp->u.mem.pstr; + + STACK_PUSH_MEM_END_MARK(mem); + INC_OP; + JUMP_OUT; +#endif + + CASE_OP(BACKREF1) + mem = 1; + goto backref; + + CASE_OP(BACKREF2) + mem = 2; + goto backref; + + CASE_OP(BACKREF_N) + mem = p->backref_n.n1; + backref: + { + UChar *pstart, *pend; + + if (mem_end_stk[mem].i == INVALID_STACK_INDEX) goto fail; + if (mem_start_stk[mem].i == INVALID_STACK_INDEX) goto fail; + + pstart = STACK_MEM_START(reg, mem); + pend = STACK_MEM_END(reg, mem); + n = (int )(pend - pstart); + if (n != 0) { + DATA_ENSURE(n); + STRING_CMP(s, pstart, n); + } + } + INC_OP; + JUMP_OUT; + + CASE_OP(BACKREF_N_IC) + mem = p->backref_n.n1; + { + UChar *pstart, *pend; + + if (mem_end_stk[mem].i == INVALID_STACK_INDEX) goto fail; + if (mem_start_stk[mem].i == INVALID_STACK_INDEX) goto fail; + + pstart = STACK_MEM_START(reg, mem); + pend = STACK_MEM_END(reg, mem); + n = (int )(pend - pstart); + if (n != 0) { + DATA_ENSURE(n); + STRING_CMP_IC(case_fold_flag, pstart, &s, n); + } + } + INC_OP; + JUMP_OUT; + + CASE_OP(BACKREF_MULTI) + { + int is_fail; + UChar *pstart, *pend, *swork; + + tlen = p->backref_general.num; + for (i = 0; i < tlen; i++) { + mem = tlen == 1 ? p->backref_general.n1 : p->backref_general.ns[i]; + + if (mem_end_stk[mem].i == INVALID_STACK_INDEX) continue; + if (mem_start_stk[mem].i == INVALID_STACK_INDEX) continue; + + pstart = STACK_MEM_START(reg, mem); + pend = STACK_MEM_END(reg, mem); + n = (int )(pend - pstart); + if (n != 0) { + if (! DATA_ENSURE_CHECK(n)) continue; + swork = s; + STRING_CMP_VALUE(swork, pstart, n, is_fail); + if (is_fail) continue; + s = swork; + } + break; /* success */ + } + if (i == tlen) goto fail; + } + INC_OP; + JUMP_OUT; + + CASE_OP(BACKREF_MULTI_IC) + { + int is_fail; + UChar *pstart, *pend, *swork; + + tlen = p->backref_general.num; + for (i = 0; i < tlen; i++) { + mem = tlen == 1 ? p->backref_general.n1 : p->backref_general.ns[i]; + + if (mem_end_stk[mem].i == INVALID_STACK_INDEX) continue; + if (mem_start_stk[mem].i == INVALID_STACK_INDEX) continue; + + pstart = STACK_MEM_START(reg, mem); + pend = STACK_MEM_END(reg, mem); + n = (int )(pend - pstart); + if (n != 0) { + if (! DATA_ENSURE_CHECK(n)) continue; + swork = s; + STRING_CMP_VALUE_IC(case_fold_flag, pstart, &swork, n, is_fail); + if (is_fail) continue; + s = swork; + } + break; /* success */ + } + if (i == tlen) goto fail; + } + INC_OP; + JUMP_OUT; + +#ifdef USE_BACKREF_WITH_LEVEL + CASE_OP(BACKREF_WITH_LEVEL_IC) + n = 1; /* ignore case */ + goto backref_with_level; + CASE_OP(BACKREF_WITH_LEVEL) + { + int level; + MemNumType* mems; + + n = 0; + backref_with_level: + level = p->backref_general.nest_level; + tlen = p->backref_general.num; + mems = tlen == 1 ? &(p->backref_general.n1) : p->backref_general.ns; + + if (! backref_match_at_nested_level(reg, stk, stk_base, n, + case_fold_flag, level, (int )tlen, mems, &s, end)) { + goto fail; + } + } + INC_OP; + JUMP_OUT; +#endif + + CASE_OP(BACKREF_CHECK) + { + MemNumType* mems; + + tlen = p->backref_general.num; + mems = tlen == 1 ? &(p->backref_general.n1) : p->backref_general.ns; + + for (i = 0; i < tlen; i++) { + mem = mems[i]; + if (mem_end_stk[mem].i == INVALID_STACK_INDEX) continue; + if (mem_start_stk[mem].i == INVALID_STACK_INDEX) continue; + break; /* success */ + } + if (i == tlen) goto fail; + } + INC_OP; + JUMP_OUT; + +#ifdef USE_BACKREF_WITH_LEVEL + CASE_OP(BACKREF_CHECK_WITH_LEVEL) + { + LengthType level; + MemNumType* mems; + + level = p->backref_general.nest_level; + tlen = p->backref_general.num; + mems = tlen == 1 ? &(p->backref_general.n1) : p->backref_general.ns; + + if (backref_check_at_nested_level(reg, stk, stk_base, + (int )level, (int )tlen, mems) == 0) + goto fail; + } + INC_OP; + JUMP_OUT; +#endif + + CASE_OP(EMPTY_CHECK_START) + mem = p->empty_check_start.mem; /* mem: null check id */ + STACK_PUSH_EMPTY_CHECK_START(mem, s); + INC_OP; + JUMP_OUT; + + CASE_OP(EMPTY_CHECK_END) + { + int is_empty; + + mem = p->empty_check_end.mem; /* mem: null check id */ + STACK_EMPTY_CHECK(is_empty, mem, s); + INC_OP; + if (is_empty) { +#ifdef ONIG_DEBUG_MATCH + fprintf(DBGFP, "EMPTY_CHECK_END: skip id:%d, s:%p\n", (int )mem, s); +#endif + empty_check_found: + /* empty loop founded, skip next instruction */ +#if defined(ONIG_DEBUG) && !defined(USE_DIRECT_THREADED_CODE) + switch (p->opcode) { + case OP_JUMP: + case OP_PUSH: + case OP_REPEAT_INC: + case OP_REPEAT_INC_NG: + INC_OP; + break; + default: + MATCH_AT_ERROR_RETURN(ONIGERR_UNEXPECTED_BYTECODE); + break; + } +#else + INC_OP; +#endif + } + } + JUMP_OUT; + +#ifdef USE_RIGID_CHECK_CAPTURES_IN_EMPTY_REPEAT + CASE_OP(EMPTY_CHECK_END_MEMST) + { + int is_empty; + + mem = p->empty_check_end.mem; /* mem: null check id */ + STACK_EMPTY_CHECK_MEM(is_empty, mem, p->empty_check_end.empty_status_mem, s, reg); + INC_OP; + if (is_empty) { +#ifdef ONIG_DEBUG_MATCH + fprintf(DBGFP, "EMPTY_CHECK_END_MEM: skip id:%d, s:%p\n", (int)mem, s); +#endif + if (is_empty == -1) goto fail; + goto empty_check_found; + } + } + JUMP_OUT; +#endif + +#ifdef USE_CALL + CASE_OP(EMPTY_CHECK_END_MEMST_PUSH) + { + int is_empty; + + mem = p->empty_check_end.mem; /* mem: null check id */ +#ifdef USE_RIGID_CHECK_CAPTURES_IN_EMPTY_REPEAT + STACK_EMPTY_CHECK_MEM_REC(is_empty, mem, p->empty_check_end.empty_status_mem, s, reg); +#else + STACK_EMPTY_CHECK_REC(is_empty, mem, s); +#endif + INC_OP; + if (is_empty) { +#ifdef ONIG_DEBUG_MATCH + fprintf(DBGFP, "EMPTY_CHECK_END_MEM_PUSH: skip id:%d, s:%p\n", + (int )mem, s); +#endif + if (is_empty == -1) goto fail; + goto empty_check_found; + } + else { + STACK_PUSH_EMPTY_CHECK_END(mem); + } + } + JUMP_OUT; +#endif + + CASE_OP(JUMP) + addr = p->jump.addr; + p += addr; + CHECK_INTERRUPT_JUMP_OUT; + + CASE_OP(PUSH) + addr = p->push.addr; + STACK_PUSH_ALT(p + addr, s); + INC_OP; + JUMP_OUT; + + CASE_OP(PUSH_SUPER) + addr = p->push.addr; + STACK_PUSH_SUPER_ALT(p + addr, s); + INC_OP; + JUMP_OUT; + + CASE_OP(POP) + STACK_POP_ONE; + INC_OP; + JUMP_OUT; + + CASE_OP(POP_TO_MARK) + STACK_POP_TO_MARK(p->pop_to_mark.id); + INC_OP; + JUMP_OUT; + + #ifdef USE_OP_PUSH_OR_JUMP_EXACT + CASE_OP(PUSH_OR_JUMP_EXACT1) + { + UChar c; + + addr = p->push_or_jump_exact1.addr; + c = p->push_or_jump_exact1.c; + if (DATA_ENSURE_CHECK1 && c == *s) { + STACK_PUSH_ALT(p + addr, s); + INC_OP; + JUMP_OUT; + } + } + p += addr; + JUMP_OUT; +#endif + + CASE_OP(PUSH_IF_PEEK_NEXT) + { + UChar c; + + addr = p->push_if_peek_next.addr; + c = p->push_if_peek_next.c; + if (DATA_ENSURE_CHECK1 && c == *s) { + STACK_PUSH_ALT(p + addr, s); + } + } + INC_OP; + JUMP_OUT; + + CASE_OP(REPEAT) + mem = p->repeat.id; /* mem: OP_REPEAT ID */ + addr = p->repeat.addr; + + STACK_PUSH_REPEAT_INC(mem, 0); + if (reg->repeat_range[mem].lower == 0) { + STACK_PUSH_ALT(p + addr, s); + } + INC_OP; + JUMP_OUT; + + CASE_OP(REPEAT_NG) + mem = p->repeat.id; /* mem: OP_REPEAT ID */ + addr = p->repeat.addr; + + STACK_PUSH_REPEAT_INC(mem, 0); + if (reg->repeat_range[mem].lower == 0) { + STACK_PUSH_ALT(p + 1, s); + p += addr; + } + else + INC_OP; + JUMP_OUT; + + CASE_OP(REPEAT_INC) + mem = p->repeat_inc.id; /* mem: OP_REPEAT ID */ + STACK_GET_REPEAT_COUNT(mem, n); + n++; + if (n >= reg->repeat_range[mem].upper) { + /* end of repeat. Nothing to do. */ + INC_OP; + } + else if (n >= reg->repeat_range[mem].lower) { + INC_OP; + STACK_PUSH_ALT(p, s); + p = reg->repeat_range[mem].u.pcode; + } + else { + p = reg->repeat_range[mem].u.pcode; + } + STACK_PUSH_REPEAT_INC(mem, n); + CHECK_INTERRUPT_JUMP_OUT; + + CASE_OP(REPEAT_INC_NG) + mem = p->repeat_inc.id; /* mem: OP_REPEAT ID */ + STACK_GET_REPEAT_COUNT(mem, n); + n++; + STACK_PUSH_REPEAT_INC(mem, n); + if (n == reg->repeat_range[mem].upper) { + INC_OP; + } + else { + if (n >= reg->repeat_range[mem].lower) { + STACK_PUSH_ALT(reg->repeat_range[mem].u.pcode, s); + INC_OP; + } + else { + p = reg->repeat_range[mem].u.pcode; + } + } + CHECK_INTERRUPT_JUMP_OUT; + +#ifdef USE_CALL + CASE_OP(CALL) + if (subexp_call_nest_counter == SubexpCallMaxNestLevel) + goto fail; + subexp_call_nest_counter++; + + if (SubexpCallLimitInSearch != 0) { + msa->subexp_call_in_search_counter++; +#ifdef ONIG_DEBUG_MATCH_COUNTER + if (p->call.called_mem < MAX_SUBEXP_CALL_COUNTERS) + subexp_call_counters[p->call.called_mem]++; + if (msa->subexp_call_in_search_counter % 1000 == 0) + MATCH_COUNTER_OUT("CALL"); +#endif + if (msa->subexp_call_in_search_counter > + SubexpCallLimitInSearch) { + MATCH_AT_ERROR_RETURN(ONIGERR_SUBEXP_CALL_LIMIT_IN_SEARCH_OVER); + } + } + +#ifdef ONIG_DEBUG_CALL + fprintf(DBGFP, "CALL: id:%d, at:%ld, level:%lu\n", p->call.called_mem, s - str, subexp_call_nest_counter); +#endif + addr = p->call.addr; + INC_OP; STACK_PUSH_CALL_FRAME(p); + p = reg->ops + addr; + + JUMP_OUT; + + CASE_OP(RETURN) + STACK_RETURN(p); + STACK_PUSH_RETURN; + subexp_call_nest_counter--; + JUMP_OUT; +#endif + + CASE_OP(MOVE) + if (p->move.n < 0) { + s = (UChar* )ONIGENC_STEP_BACK(encode, str, s, -p->move.n); + if (IS_NULL(s)) goto fail; + } + else { + int len; + + for (tlen = p->move.n; tlen > 0; tlen--) { + len = enclen(encode, s); + s += len; + if (s > end) goto fail; + if (s == end) { + if (tlen != 1) goto fail; + else break; + } + } + } + INC_OP; + JUMP_OUT; + + CASE_OP(STEP_BACK_START) + tlen = p->step_back_start.initial; + if (tlen != 0) { + s = (UChar* )ONIGENC_STEP_BACK(encode, str, s, (int )tlen); + if (IS_NULL(s)) goto fail; + } + if (p->step_back_start.remaining != 0) { + STACK_PUSH_ALT_WITH_ZID(p + 1, s, p->step_back_start.remaining); + p += p->step_back_start.addr; + } + else + INC_OP; + JUMP_OUT; + + CASE_OP(STEP_BACK_NEXT) + tlen = (LengthType )stk->zid; /* remaining count */ + if (tlen != INFINITE_LEN) tlen--; + s = (UChar* )ONIGENC_STEP_BACK(encode, str, s, 1); + if (IS_NULL(s)) goto fail; + if (tlen != 0) { + STACK_PUSH_ALT_WITH_ZID(p, s, (int )tlen); + } + INC_OP; + JUMP_OUT; + + CASE_OP(CUT_TO_MARK) + mem = p->cut_to_mark.id; /* mem: mark id */ + STACK_TO_VOID_TO_MARK(stkp, mem); + if (p->cut_to_mark.restore_pos != 0) { + s = stkp->u.val.v; + } + INC_OP; + JUMP_OUT; + + CASE_OP(MARK) + mem = p->mark.id; /* mem: mark id */ + if (p->mark.save_pos != 0) + STACK_PUSH_MARK_WITH_POS(mem, s); + else + STACK_PUSH_MARK(mem); + + INC_OP; + JUMP_OUT; + + CASE_OP(SAVE_VAL) + { + SaveType type; + + type = p->save_val.type; + mem = p->save_val.id; /* mem: save id */ + switch ((enum SaveType )type) { + case SAVE_KEEP: + STACK_PUSH_SAVE_VAL(mem, type, s); + break; + + case SAVE_S: + STACK_PUSH_SAVE_VAL_WITH_SPREV(mem, type, s); + break; + + case SAVE_RIGHT_RANGE: + STACK_PUSH_SAVE_VAL(mem, SAVE_RIGHT_RANGE, right_range); + break; + } + } + INC_OP; + JUMP_OUT; + + CASE_OP(UPDATE_VAR) + { + UpdateVarType type; + enum SaveType save_type; + + type = p->update_var.type; + + switch ((enum UpdateVarType )type) { + case UPDATE_VAR_KEEP_FROM_STACK_LAST: + STACK_GET_SAVE_VAL_TYPE_LAST(SAVE_KEEP, keep); + break; + case UPDATE_VAR_S_FROM_STACK: + mem = p->update_var.id; /* mem: save id */ + STACK_GET_SAVE_VAL_TYPE_LAST_ID_WITH_SPREV(SAVE_S, mem, s); + break; + case UPDATE_VAR_RIGHT_RANGE_FROM_S_STACK: + save_type = SAVE_S; + goto get_save_val_type_last_id; + break; + case UPDATE_VAR_RIGHT_RANGE_FROM_STACK: + save_type = SAVE_RIGHT_RANGE; + get_save_val_type_last_id: + mem = p->update_var.id; /* mem: save id */ + STACK_GET_SAVE_VAL_TYPE_LAST_ID(save_type, mem, right_range, p->update_var.clear); + break; + case UPDATE_VAR_RIGHT_RANGE_TO_S: + right_range = s; + break; + case UPDATE_VAR_RIGHT_RANGE_INIT: + INIT_RIGHT_RANGE; + break; + } + } + INC_OP; + JUMP_OUT; + +#ifdef USE_CALLOUT + CASE_OP(CALLOUT_CONTENTS) + of = ONIG_CALLOUT_OF_CONTENTS; + mem = p->callout_contents.num; + goto callout_common_entry; + BREAK_OUT; + + CASE_OP(CALLOUT_NAME) + { + int call_result; + int name_id; + int in; + CalloutListEntry* e; + OnigCalloutFunc func; + OnigCalloutArgs args; + + of = ONIG_CALLOUT_OF_NAME; + mem = p->callout_name.num; + + callout_common_entry: + e = onig_reg_callout_list_at(reg, mem); + in = e->in; + if (of == ONIG_CALLOUT_OF_NAME) { + name_id = p->callout_name.id; + func = onig_get_callout_start_func(reg, mem); + } + else { + name_id = ONIG_NON_NAME_ID; + func = msa->mp->progress_callout_of_contents; + } + + if (IS_NOT_NULL(func) && (in & ONIG_CALLOUT_IN_PROGRESS) != 0) { + CALLOUT_BODY(func, ONIG_CALLOUT_IN_PROGRESS, name_id, + (int )mem, msa->mp->callout_user_data, args, call_result); + switch (call_result) { + case ONIG_CALLOUT_FAIL: + goto fail; + break; + case ONIG_CALLOUT_SUCCESS: + goto retraction_callout2; + break; + default: /* error code */ + if (call_result > 0) { + call_result = ONIGERR_INVALID_ARGUMENT; + } + best_len = call_result; + goto match_at_end; + break; + } + } + else { + retraction_callout2: + if ((in & ONIG_CALLOUT_IN_RETRACTION) != 0) { + if (of == ONIG_CALLOUT_OF_NAME) { + if (IS_NOT_NULL(func)) { + STACK_PUSH_CALLOUT_NAME(name_id, mem, func); + } + } + else { + func = msa->mp->retraction_callout_of_contents; + if (IS_NOT_NULL(func)) { + STACK_PUSH_CALLOUT_CONTENTS(mem, func); + } + } + } + } + } + INC_OP; + JUMP_OUT; +#endif + + CASE_OP(FINISH) +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE + if (OPTON_FIND_LONGEST(options)) { + best_len = ONIG_MISMATCH; + } +#endif + goto match_at_end; + +#ifdef ONIG_DEBUG_STATISTICS + fail: + SOP_OUT; + goto fail2; +#endif + CASE_OP(FAIL) +#ifdef ONIG_DEBUG_STATISTICS + fail2: +#else + fail: +#endif + STACK_POP; + p = stk->u.state.pcode; + s = stk->u.state.pstr; + CHECK_RETRY_LIMIT_IN_MATCH; + JUMP_OUT; + + DEFAULT_OP + MATCH_AT_ERROR_RETURN(ONIGERR_UNDEFINED_BYTECODE); + + } BYTECODE_INTERPRETER_END; + + match_at_end: + if (msa->retry_limit_in_search != 0) { +#ifdef ONIG_DEBUG + if (retry_in_match_counter > + ULONG_MAX - msa->retry_limit_in_search_counter) { + fprintf(DBGFP, "retry limit counter overflow: %8lu/%8lu\n", + retry_in_match_counter, msa->retry_limit_in_search_counter); + } +#endif + msa->retry_limit_in_search_counter += retry_in_match_counter; + } + +#ifdef ONIG_DEBUG_MATCH_COUNTER + MATCH_COUNTER_OUT("END"); +#endif + + STACK_SAVE(msa, is_alloca, alloc_base); + return best_len; +} + + +#ifdef USE_REGSET + +typedef struct { + regex_t* reg; + OnigRegion* region; +} RR; + +struct OnigRegSetStruct { + RR* rs; + int n; + int alloc; + OnigEncoding enc; + int anchor; /* BEGIN_BUF, BEGIN_POS, (SEMI_)END_BUF */ + OnigLen anc_dmin; /* (SEMI_)END_BUF anchor distance */ + OnigLen anc_dmax; /* (SEMI_)END_BUF anchor distance */ + int all_low_high; + int anychar_inf; +}; + +enum SearchRangeStatus { + SRS_DEAD = 0, + SRS_LOW_HIGH = 1, + SRS_ALL_RANGE = 2 +}; + +typedef struct { + int state; /* value of enum SearchRangeStatus */ + UChar* low; + UChar* high; + UChar* sch_range; +} SearchRange; + +#define REGSET_MATCH_AND_RETURN_CHECK(upper_range) \ + r = match_at(reg, str, end, (upper_range), s, msas + i); \ + if (r != ONIG_MISMATCH) {\ + if (r >= 0) {\ + goto match;\ + }\ + else goto finish; /* error */ \ + } + +static inline int +regset_search_body_position_lead(OnigRegSet* set, + const UChar* str, const UChar* end, + const UChar* start, const UChar* range, /* match start range */ + const UChar* orig_range, /* data range */ + OnigOptionType option, MatchArg* msas, int* rmatch_pos) +{ + int r, n, i; + UChar *s; + UChar *low, *high; + UChar* sch_range; + regex_t* reg; + OnigEncoding enc; + SearchRange* sr; + + n = set->n; + enc = set->enc; + s = (UChar* )start; + + sr = (SearchRange* )xmalloc(sizeof(*sr) * n); + CHECK_NULL_RETURN_MEMERR(sr); + + for (i = 0; i < n; i++) { + reg = set->rs[i].reg; + + sr[i].state = SRS_DEAD; + if (reg->optimize != OPTIMIZE_NONE) { + if (reg->dist_max != INFINITE_LEN) { + if (DIST_CAST(end - range) > reg->dist_max) + sch_range = (UChar* )range + reg->dist_max; + else + sch_range = (UChar* )end; + + if (forward_search(reg, str, end, s, sch_range, &low, &high)) { + sr[i].state = SRS_LOW_HIGH; + sr[i].low = low; + sr[i].high = high; + sr[i].sch_range = sch_range; + } + } + else { + sch_range = (UChar* )end; + if (forward_search(reg, str, end, s, sch_range, &low, &high)) { + goto total_active; + } + } + } + else { + total_active: + sr[i].state = SRS_ALL_RANGE; + sr[i].low = s; + sr[i].high = (UChar* )range; + } + } + +#define ACTIVATE_ALL_LOW_HIGH_SEARCH_THRESHOLD_LEN 500 + + if (set->all_low_high != 0 + && range - start > ACTIVATE_ALL_LOW_HIGH_SEARCH_THRESHOLD_LEN) { + do { + int try_count = 0; + for (i = 0; i < n; i++) { + if (sr[i].state == SRS_DEAD) continue; + + if (s < sr[i].low) continue; + if (s >= sr[i].high) { + if (forward_search(set->rs[i].reg, str, end, s, sr[i].sch_range, + &low, &high) != 0) { + sr[i].low = low; + sr[i].high = high; + if (s < low) continue; + } + else { + sr[i].state = SRS_DEAD; + continue; + } + } + + reg = set->rs[i].reg; + REGSET_MATCH_AND_RETURN_CHECK(orig_range); + try_count++; + } /* for (i) */ + + if (s >= range) break; + + if (try_count == 0) { + low = (UChar* )range; + for (i = 0; i < n; i++) { + if (sr[i].state == SRS_LOW_HIGH && low > sr[i].low) { + low = sr[i].low; + } + } + if (low == range) break; + + s = low; + } + else { + s += enclen(enc, s); + } + } while (1); + } + else { + int prev_is_newline = 1; + do { + for (i = 0; i < n; i++) { + if (sr[i].state == SRS_DEAD) continue; + if (sr[i].state == SRS_LOW_HIGH) { + if (s < sr[i].low) continue; + if (s >= sr[i].high) { + if (forward_search(set->rs[i].reg, str, end, s, sr[i].sch_range, + &low, &high) != 0) { + sr[i].low = low; + sr[i].high = high; + if (s < low) continue; + } + else { + sr[i].state = SRS_DEAD; + continue; + } + } + } + + reg = set->rs[i].reg; + if ((reg->anchor & ANCR_ANYCHAR_INF) == 0 || prev_is_newline != 0) { + REGSET_MATCH_AND_RETURN_CHECK(orig_range); + } + } + + if (s >= range) break; + + if (set->anychar_inf != 0) + prev_is_newline = ONIGENC_IS_MBC_NEWLINE(set->enc, s, end); + + s += enclen(enc, s); + } while (1); + } + + xfree(sr); + return ONIG_MISMATCH; + + finish: + xfree(sr); + return r; + + match: + xfree(sr); + *rmatch_pos = (int )(s - str); + return i; +} + +static inline int +regset_search_body_regex_lead(OnigRegSet* set, + const UChar* str, const UChar* end, + const UChar* start, const UChar* orig_range, OnigRegSetLead lead, + OnigOptionType option, OnigMatchParam* mps[], int* rmatch_pos) +{ + int r; + int i; + int n; + int match_index; + const UChar* ep; + regex_t* reg; + OnigRegion* region; + + n = set->n; + + match_index = ONIG_MISMATCH; + ep = orig_range; + for (i = 0; i < n; i++) { + reg = set->rs[i].reg; + region = set->rs[i].region; + r = search_in_range(reg, str, end, start, ep, orig_range, region, option, mps[i]); + if (r > 0) { + if (str + r < ep) { + match_index = i; + *rmatch_pos = r; + if (lead == ONIG_REGSET_PRIORITY_TO_REGEX_ORDER) + break; + + ep = str + r; + } + } + else if (r == 0) { + match_index = i; + *rmatch_pos = r; + break; + } + } + + return match_index; +} + +extern int +onig_regset_search_with_param(OnigRegSet* set, + const UChar* str, const UChar* end, + const UChar* start, const UChar* range, + OnigRegSetLead lead, OnigOptionType option, OnigMatchParam* mps[], + int* rmatch_pos) +{ + int r; + int i; + UChar *s; + regex_t* reg; + OnigEncoding enc; + OnigRegion* region; + MatchArg* msas; + const UChar *orig_start = start; + const UChar *orig_range = range; + + if (set->n == 0) + return ONIG_MISMATCH; + + if (OPTON_POSIX_REGION(option) || OPTON_CALLBACK_EACH_MATCH(option)) + return ONIGERR_INVALID_ARGUMENT; + + r = 0; + enc = set->enc; + msas = (MatchArg* )NULL; + + for (i = 0; i < set->n; i++) { + reg = set->rs[i].reg; + region = set->rs[i].region; + ADJUST_MATCH_PARAM(reg, mps[i]); + if (IS_NOT_NULL(region)) { + r = onig_region_resize_clear(region, reg->num_mem + 1); + if (r != 0) goto finish_no_msa; + } + } + + if (start > end || start < str) goto mismatch_no_msa; + if (str < end) { + /* forward search only */ + if (range < start) + return ONIGERR_INVALID_ARGUMENT; + } + + if (OPTON_CHECK_VALIDITY_OF_STRING(option)) { + if (! ONIGENC_IS_VALID_MBC_STRING(enc, str, end)) { + r = ONIGERR_INVALID_WIDE_CHAR_VALUE; + goto finish_no_msa; + } + } + + if (set->anchor != OPTIMIZE_NONE && str < end) { + UChar *min_semi_end, *max_semi_end; + + if ((set->anchor & ANCR_BEGIN_POSITION) != 0) { + /* search start-position only */ + begin_position: + range = start + 1; + } + else if ((set->anchor & ANCR_BEGIN_BUF) != 0) { + /* search str-position only */ + if (start != str) goto mismatch_no_msa; + range = str + 1; + } + else if ((set->anchor & ANCR_END_BUF) != 0) { + min_semi_end = max_semi_end = (UChar* )end; + + end_buf: + if ((OnigLen )(max_semi_end - str) < set->anc_dmin) + goto mismatch_no_msa; + + if ((OnigLen )(min_semi_end - start) > set->anc_dmax) { + start = min_semi_end - set->anc_dmax; + if (start < end) + start = onigenc_get_right_adjust_char_head(enc, str, start); + } + if ((OnigLen )(max_semi_end - (range - 1)) < set->anc_dmin) { + range = max_semi_end - set->anc_dmin + 1; + } + if (start > range) goto mismatch_no_msa; + } + else if ((set->anchor & ANCR_SEMI_END_BUF) != 0) { + UChar* pre_end = ONIGENC_STEP_BACK(enc, str, end, 1); + + max_semi_end = (UChar* )end; + if (ONIGENC_IS_MBC_NEWLINE(enc, pre_end, end)) { + min_semi_end = pre_end; + +#ifdef USE_CRNL_AS_LINE_TERMINATOR + pre_end = ONIGENC_STEP_BACK(enc, str, pre_end, 1); + if (IS_NOT_NULL(pre_end) && + ONIGENC_IS_MBC_CRNL(enc, pre_end, end)) { + min_semi_end = pre_end; + } +#endif + if (min_semi_end > str && start <= min_semi_end) { + goto end_buf; + } + } + else { + min_semi_end = (UChar* )end; + goto end_buf; + } + } + else if ((set->anchor & ANCR_ANYCHAR_INF_ML) != 0) { + goto begin_position; + } + } + else if (str == end) { /* empty string */ + start = end = str; + s = (UChar* )start; + + msas = (MatchArg* )xmalloc(sizeof(*msas) * set->n); + CHECK_NULL_RETURN_MEMERR(msas); + for (i = 0; i < set->n; i++) { + reg = set->rs[i].reg; + MATCH_ARG_INIT(msas[i], reg, option, set->rs[i].region, start, mps[i]); + } + for (i = 0; i < set->n; i++) { + reg = set->rs[i].reg; + if (reg->threshold_len == 0) { + /* REGSET_MATCH_AND_RETURN_CHECK(end); */ + /* Can't use REGSET_MATCH_AND_RETURN_CHECK() + because r must be set regex index (i) + */ + r = match_at(reg, str, end, end, s, msas + i); + if (r != ONIG_MISMATCH) { + if (r >= 0) { + r = i; + goto match; + } + else goto finish; /* error */ + } + } + } + + goto mismatch; + } + + if (lead == ONIG_REGSET_POSITION_LEAD) { + msas = (MatchArg* )xmalloc(sizeof(*msas) * set->n); + CHECK_NULL_RETURN_MEMERR(msas); + + for (i = 0; i < set->n; i++) { + MATCH_ARG_INIT(msas[i], set->rs[i].reg, option, set->rs[i].region, + orig_start, mps[i]); + } + + r = regset_search_body_position_lead(set, str, end, start, range, + orig_range, option, msas, rmatch_pos); + } + else { + r = regset_search_body_regex_lead(set, str, end, start, orig_range, + lead, option, mps, rmatch_pos); + } + if (r < 0) goto finish; + else goto match2; + + mismatch: + r = ONIG_MISMATCH; + finish: + for (i = 0; i < set->n; i++) { + if (IS_NOT_NULL(msas)) + MATCH_ARG_FREE(msas[i]); + if (OPTON_FIND_NOT_EMPTY(set->rs[i].reg->options) && + IS_NOT_NULL(set->rs[i].region)) { + onig_region_clear(set->rs[i].region); + } + } + if (IS_NOT_NULL(msas)) xfree(msas); + return r; + + mismatch_no_msa: + r = ONIG_MISMATCH; + finish_no_msa: + return r; + + match: + *rmatch_pos = (int )(s - str); + match2: + for (i = 0; i < set->n; i++) { + if (IS_NOT_NULL(msas)) + MATCH_ARG_FREE(msas[i]); + if (OPTON_FIND_NOT_EMPTY(set->rs[i].reg->options) && + IS_NOT_NULL(set->rs[i].region)) { + onig_region_clear(set->rs[i].region); + } + } + if (IS_NOT_NULL(msas)) xfree(msas); + return r; /* regex index */ +} + +extern int +onig_regset_search(OnigRegSet* set, const UChar* str, const UChar* end, + const UChar* start, const UChar* range, + OnigRegSetLead lead, OnigOptionType option, int* rmatch_pos) +{ + int r; + int i; + OnigMatchParam* mp; + OnigMatchParam** mps; + + mps = (OnigMatchParam** )xmalloc((sizeof(OnigMatchParam*) + sizeof(OnigMatchParam)) * set->n); + CHECK_NULL_RETURN_MEMERR(mps); + + mp = (OnigMatchParam* )(mps + set->n); + + for (i = 0; i < set->n; i++) { + onig_initialize_match_param(mp + i); + mps[i] = mp + i; + } + + r = onig_regset_search_with_param(set, str, end, start, range, lead, option, mps, + rmatch_pos); + for (i = 0; i < set->n; i++) + onig_free_match_param_content(mp + i); + + xfree(mps); + + return r; +} + +#endif /* USE_REGSET */ + + +static UChar* +slow_search(OnigEncoding enc, UChar* target, UChar* target_end, + const UChar* text, const UChar* text_end, UChar* text_range) +{ + UChar *t, *p, *s, *end; + + end = (UChar* )text_end; + end -= target_end - target - 1; + if (end > text_range) + end = text_range; + + s = (UChar* )text; + + while (s < end) { + if (*s == *target) { + p = s + 1; + t = target + 1; + while (t < target_end) { + if (*t != *p++) + break; + t++; + } + if (t == target_end) + return s; + } + s += enclen(enc, s); + } + + return (UChar* )NULL; +} + +static UChar* +slow_search_backward(OnigEncoding enc, UChar* target, UChar* target_end, + const UChar* text, const UChar* adjust_text, + const UChar* text_end, const UChar* text_start) +{ + UChar *t, *p, *s; + + s = (UChar* )text_end; + s -= (target_end - target); + if (s > text_start) + s = (UChar* )text_start; + else + s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, adjust_text, s); + + while (PTR_GE(s, text)) { + if (*s == *target) { + p = s + 1; + t = target + 1; + while (t < target_end) { + if (*t != *p++) + break; + t++; + } + if (t == target_end) + return s; + } + s = (UChar* )onigenc_get_prev_char_head(enc, adjust_text, s); + } + + return (UChar* )NULL; +} + +static UChar* +sunday_quick_search_step_forward(regex_t* reg, + const UChar* target, const UChar* target_end, + const UChar* text, const UChar* text_end, + const UChar* text_range) +{ + const UChar *s, *se, *t, *p, *end; + const UChar *tail, *next; + int skip, tlen1; + int map_offset; + OnigEncoding enc; + +#ifdef ONIG_DEBUG_SEARCH + fprintf(DBGFP, + "sunday_quick_search_step_forward: text: %p, text_end: %p, text_range: %p\n", + text, text_end, text_range); +#endif + + enc = reg->enc; + + tail = target_end - 1; + tlen1 = (int )(tail - target); + end = text_range; + if (tlen1 > text_end - end) + end = text_end - tlen1; + + map_offset = reg->map_offset; + s = text; + + while (s < end) { + p = se = s + tlen1; + t = tail; + while (*p == *t) { + if (t == target) return (UChar* )s; + p--; t--; + } + if (se + map_offset >= text_end) break; + skip = reg->map[*(se + map_offset)]; +#if 0 + t = s; + do { + s += enclen(enc, s); + } while ((s - t) < skip && s < end); +#else + next = s + skip; + if (next < end) + s = onigenc_get_right_adjust_char_head(enc, s, next); + else + break; +#endif + } + + return (UChar* )NULL; +} + +static UChar* +sunday_quick_search(regex_t* reg, const UChar* target, const UChar* target_end, + const UChar* text, const UChar* text_end, + const UChar* text_range) +{ + const UChar *s, *t, *p, *end; + const UChar *tail; + int map_offset; + ptrdiff_t target_len; + + map_offset = reg->map_offset; + tail = target_end - 1; + target_len = target_end - target; + + if (target_len > text_end - text_range) { + end = text_end; + if (target_len > text_end - text) + return (UChar* )NULL; + } + else { + end = text_range + target_len; + } + + s = text + target_len - 1; + +#ifdef USE_STRICT_POINTER_ADDRESS + if (s < end) { + while (TRUE) { + p = s; + t = tail; + while (*p == *t) { + if (t == target) return (UChar* )p; + p--; t--; + } + if (text_end - s <= map_offset) break; + if (reg->map[*(s + map_offset)] >= end - s) break; + s += reg->map[*(s + map_offset)]; + } + } +#else + while (s < end) { + p = s; + t = tail; + while (*p == *t) { + if (t == target) return (UChar* )p; + p--; t--; + } + if (text_end - s <= map_offset) break; + s += reg->map[*(s + map_offset)]; + } +#endif + + return (UChar* )NULL; +} + +static UChar* +map_search(OnigEncoding enc, UChar map[], + const UChar* text, const UChar* text_range) +{ + const UChar *s = text; + + while (s < text_range) { + if (map[*s]) return (UChar* )s; + + s += enclen(enc, s); + } + return (UChar* )NULL; +} + +static UChar* +map_search_backward(OnigEncoding enc, UChar map[], + const UChar* text, const UChar* adjust_text, + const UChar* text_start) +{ + const UChar *s = text_start; + + while (PTR_GE(s, text)) { + if (map[*s]) return (UChar* )s; + + s = onigenc_get_prev_char_head(enc, adjust_text, s); + } + return (UChar* )NULL; +} +extern int +onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at, + OnigRegion* region, OnigOptionType option) +{ + int r; + OnigMatchParam mp; + + onig_initialize_match_param(&mp); + r = onig_match_with_param(reg, str, end, at, region, option, &mp); + onig_free_match_param_content(&mp); + return r; +} + +extern int +onig_match_with_param(regex_t* reg, const UChar* str, const UChar* end, + const UChar* at, OnigRegion* region, OnigOptionType option, + OnigMatchParam* mp) +{ + int r; + MatchArg msa; + +#ifndef USE_POSIX_API + if (OPTON_POSIX_REGION(option)) return ONIGERR_INVALID_ARGUMENT; +#endif + + ADJUST_MATCH_PARAM(reg, mp); + MATCH_ARG_INIT(msa, reg, option, region, at, mp); + if (region +#ifdef USE_POSIX_API + && !OPTON_POSIX_REGION(option) +#endif + ) { + r = onig_region_resize_clear(region, reg->num_mem + 1); + } + else + r = 0; + + if (r == 0) { + if (OPTON_CHECK_VALIDITY_OF_STRING(option)) { + if (! ONIGENC_IS_VALID_MBC_STRING(reg->enc, str, end)) { + r = ONIGERR_INVALID_WIDE_CHAR_VALUE; + goto end; + } + } + + r = match_at(reg, str, end, end, at, &msa); +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE + if (OPTON_FIND_LONGEST(option) && r == ONIG_MISMATCH) { + if (msa.best_len >= 0) { + r = msa.best_len; + } + } +#endif + } + + end: + MATCH_ARG_FREE(msa); + return r; +} + +static int +forward_search(regex_t* reg, const UChar* str, const UChar* end, UChar* start, + UChar* range, UChar** low, UChar** high) +{ + UChar *p, *pprev = (UChar* )NULL; + +#ifdef ONIG_DEBUG_SEARCH + fprintf(DBGFP, "forward_search: str: %p, end: %p, start: %p, range: %p\n", + str, end, start, range); +#endif + + p = start; + if (reg->dist_min != 0) { + if (DIST_CAST(end - p) <= reg->dist_min) + return 0; /* fail */ + + if (ONIGENC_IS_SINGLEBYTE(reg->enc)) { + p += reg->dist_min; + } + else { + UChar *q = p + reg->dist_min; + while (p < q) p += enclen(reg->enc, p); + } + } + + retry: + switch (reg->optimize) { + case OPTIMIZE_STR: + p = slow_search(reg->enc, reg->exact, reg->exact_end, p, end, range); + break; + + case OPTIMIZE_STR_FAST: + p = sunday_quick_search(reg, reg->exact, reg->exact_end, p, end, range); + break; + + case OPTIMIZE_STR_FAST_STEP_FORWARD: + p = sunday_quick_search_step_forward(reg, reg->exact, reg->exact_end, + p, end, range); + break; + + case OPTIMIZE_MAP: + p = map_search(reg->enc, reg->map, p, range); + break; + } + + if (p && p < range) { + if (DIST_CAST(p - start) < reg->dist_min) { + retry_gate: + pprev = p; + p += enclen(reg->enc, p); + goto retry; + } + + if (reg->sub_anchor) { + UChar* prev; + + switch (reg->sub_anchor) { + case ANCR_BEGIN_LINE: + if (!ON_STR_BEGIN(p)) { + prev = onigenc_get_prev_char_head(reg->enc, (pprev ? pprev : str), p); + if (!ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end)) + goto retry_gate; + } + break; + + case ANCR_END_LINE: + if (ON_STR_END(p)) { +#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE + prev = (UChar* )onigenc_get_prev_char_head(reg->enc, + (pprev ? pprev : str), p); + if (prev && ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end)) + goto retry_gate; +#endif + } + else if (! ONIGENC_IS_MBC_NEWLINE(reg->enc, p, end) +#ifdef USE_CRNL_AS_LINE_TERMINATOR + && ! ONIGENC_IS_MBC_CRNL(reg->enc, p, end) +#endif + ) + goto retry_gate; + + break; + } + } + + if (reg->dist_max == 0) { + *low = p; + *high = p; + } + else { + if (reg->dist_max != INFINITE_LEN) { + if (DIST_CAST(p - str) < reg->dist_max) { + *low = (UChar* )str; + } + else { + *low = p - reg->dist_max; + if (*low > start) { + *low = onigenc_get_right_adjust_char_head(reg->enc, start, *low); + } + } + } + /* no needs to adjust *high, *high is used as range check only */ + if (DIST_CAST(p - str) < reg->dist_min) + *high = (UChar* )str; + else + *high = p - reg->dist_min; + } + +#ifdef ONIG_DEBUG_SEARCH + fprintf(DBGFP, + "forward_search success: low: %d, high: %d, dmin: %u, dmax: %u\n", + (int )(*low - str), (int )(*high - str), + reg->dist_min, reg->dist_max); +#endif + return 1; /* success */ + } + + return 0; /* fail */ +} + + +static int +backward_search(regex_t* reg, const UChar* str, const UChar* end, UChar* s, + const UChar* range, UChar* adjrange, UChar** low, UChar** high) +{ + UChar *p; + + p = s; + + retry: + switch (reg->optimize) { + case OPTIMIZE_STR: + exact_method: + p = slow_search_backward(reg->enc, reg->exact, reg->exact_end, + range, adjrange, end, p); + break; + + case OPTIMIZE_STR_FAST: + case OPTIMIZE_STR_FAST_STEP_FORWARD: + goto exact_method; + break; + + case OPTIMIZE_MAP: + p = map_search_backward(reg->enc, reg->map, range, adjrange, p); + break; + } + + if (p) { + if (reg->sub_anchor) { + UChar* prev; + + switch (reg->sub_anchor) { + case ANCR_BEGIN_LINE: + if (!ON_STR_BEGIN(p)) { + prev = onigenc_get_prev_char_head(reg->enc, str, p); + if (IS_NOT_NULL(prev) && !ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end)) { + p = prev; + goto retry; + } + } + break; + + case ANCR_END_LINE: + if (ON_STR_END(p)) { +#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE + prev = onigenc_get_prev_char_head(reg->enc, adjrange, p); + if (IS_NULL(prev)) goto fail; + if (ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end)) { + p = prev; + goto retry; + } +#endif + } + else if (! ONIGENC_IS_MBC_NEWLINE(reg->enc, p, end) +#ifdef USE_CRNL_AS_LINE_TERMINATOR + && ! ONIGENC_IS_MBC_CRNL(reg->enc, p, end) +#endif + ) { + p = onigenc_get_prev_char_head(reg->enc, adjrange, p); + if (IS_NULL(p)) goto fail; + goto retry; + } + break; + } + } + + if (reg->dist_max != INFINITE_LEN) { + if (DIST_CAST(p - str) < reg->dist_max) + *low = (UChar* )str; + else + *low = p - reg->dist_max; + + if (reg->dist_min != 0) { + if (DIST_CAST(p - str) < reg->dist_min) + *high = (UChar* )str; + else + *high = p - reg->dist_min; + } + else { + *high = p; + } + + *high = onigenc_get_right_adjust_char_head(reg->enc, adjrange, *high); + } + +#ifdef ONIG_DEBUG_SEARCH + fprintf(DBGFP, "backward_search: low: %d, high: %d\n", + (int )(*low - str), (int )(*high - str)); +#endif + return 1; /* success */ + } + + fail: +#ifdef ONIG_DEBUG_SEARCH + fprintf(DBGFP, "backward_search: fail.\n"); +#endif + return 0; /* fail */ +} + + +extern int +onig_search(regex_t* reg, const UChar* str, const UChar* end, + const UChar* start, const UChar* range, OnigRegion* region, + OnigOptionType option) +{ + int r; + OnigMatchParam mp; + const UChar* data_range; + + onig_initialize_match_param(&mp); + + /* The following is an expanded code of onig_search_with_param() */ + if (range > start) + data_range = range; + else + data_range = end; + + r = search_in_range(reg, str, end, start, range, data_range, region, + option, &mp); + + onig_free_match_param_content(&mp); + return r; + +} + +static int +search_in_range(regex_t* reg, const UChar* str, const UChar* end, + const UChar* start, const UChar* range, /* match start range */ + const UChar* data_range, /* subject string range */ + OnigRegion* region, + OnigOptionType option, OnigMatchParam* mp) +{ + int r; + int forward; + UChar *s; + MatchArg msa; + const UChar *orig_start = start; + +#ifdef ONIG_DEBUG_SEARCH + fprintf(DBGFP, + "onig_search (entry point): str: %p, end: %d, start: %d, range: %d\n", + str, (int )(end - str), (int )(start - str), (int )(range - str)); +#endif + + ADJUST_MATCH_PARAM(reg, mp); + +#ifndef USE_POSIX_API + if (OPTON_POSIX_REGION(option)) { + r = ONIGERR_INVALID_ARGUMENT; + goto finish_no_msa; + } +#endif + + if (region +#ifdef USE_POSIX_API + && ! OPTON_POSIX_REGION(option) +#endif + ) { + r = onig_region_resize_clear(region, reg->num_mem + 1); + if (r != 0) goto finish_no_msa; + } + + if (start > end || start < str) goto mismatch_no_msa; + + if (OPTON_CHECK_VALIDITY_OF_STRING(option)) { + if (! ONIGENC_IS_VALID_MBC_STRING(reg->enc, str, end)) { + r = ONIGERR_INVALID_WIDE_CHAR_VALUE; + goto finish_no_msa; + } + } + + +#define MATCH_AND_RETURN_CHECK(upper_range) \ + r = match_at(reg, str, end, (upper_range), s, &msa);\ + if (r != ONIG_MISMATCH) {\ + if (r >= 0) {\ + goto match;\ + }\ + else goto finish; /* error */ \ + } + + forward = (range > start); + + /* anchor optimize: resume search range */ + if (reg->anchor != 0 && str < end) { + UChar *min_semi_end, *max_semi_end; + + if (reg->anchor & ANCR_BEGIN_POSITION) { + /* search start-position only */ + begin_position: + if (range > start) + range = start + 1; + else + range = start; + } + else if (reg->anchor & ANCR_BEGIN_BUF) { + /* search str-position only */ + if (range > start) { + if (start != str) goto mismatch_no_msa; + range = str + 1; + } + else { + if (range <= str) { + start = str; + range = str; + } + else + goto mismatch_no_msa; + } + } + else if (reg->anchor & ANCR_END_BUF) { + min_semi_end = max_semi_end = (UChar* )end; + + end_buf: + if ((OnigLen )(max_semi_end - str) < reg->anc_dist_min) + goto mismatch_no_msa; + + if (range > start) { + if (reg->anc_dist_max != INFINITE_LEN && + DIST_CAST(min_semi_end - start) > reg->anc_dist_max) { + start = min_semi_end - reg->anc_dist_max; + if (start < end) + start = onigenc_get_right_adjust_char_head(reg->enc, str, start); + } + if (DIST_CAST(max_semi_end - (range - 1)) < reg->anc_dist_min) { + if (DIST_CAST(max_semi_end - str + 1) < reg->anc_dist_min) + goto mismatch_no_msa; + else + range = max_semi_end - reg->anc_dist_min + 1; + } + + if (start > range) goto mismatch_no_msa; + /* If start == range, match with empty at end. + Backward search is used. */ + } + else { + if (reg->anc_dist_max != INFINITE_LEN && + DIST_CAST(min_semi_end - range) > reg->anc_dist_max) { + range = min_semi_end - reg->anc_dist_max; + } + if (DIST_CAST(max_semi_end - start) < reg->anc_dist_min) { + if (DIST_CAST(max_semi_end - str) < reg->anc_dist_min) + goto mismatch_no_msa; + else { + start = max_semi_end - reg->anc_dist_min; + start = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc, str, start); + } + } + if (range > start) goto mismatch_no_msa; + } + } + else if (reg->anchor & ANCR_SEMI_END_BUF) { + UChar* pre_end = ONIGENC_STEP_BACK(reg->enc, str, end, 1); + + max_semi_end = (UChar* )end; + if (ONIGENC_IS_MBC_NEWLINE(reg->enc, pre_end, end)) { + min_semi_end = pre_end; + +#ifdef USE_CRNL_AS_LINE_TERMINATOR + pre_end = ONIGENC_STEP_BACK(reg->enc, str, pre_end, 1); + if (IS_NOT_NULL(pre_end) && + ONIGENC_IS_MBC_CRNL(reg->enc, pre_end, end)) { + min_semi_end = pre_end; + } +#endif + if (min_semi_end > str && start <= min_semi_end) { + goto end_buf; + } + } + else { + min_semi_end = (UChar* )end; + goto end_buf; + } + } + else if ((reg->anchor & ANCR_ANYCHAR_INF_ML) && range > start) { + goto begin_position; + } + } + else if (str == end) { /* empty string */ + static const UChar* address_for_empty_string = (UChar* )""; + +#ifdef ONIG_DEBUG_SEARCH + fprintf(DBGFP, "onig_search: empty string.\n"); +#endif + + if (reg->threshold_len == 0) { + start = end = str = address_for_empty_string; + s = (UChar* )start; + + MATCH_ARG_INIT(msa, reg, option, region, start, mp); + MATCH_AND_RETURN_CHECK(end); + goto mismatch; + } + goto mismatch_no_msa; + } + +#ifdef ONIG_DEBUG_SEARCH + fprintf(DBGFP, "onig_search(apply anchor): end: %d, start: %d, range: %d\n", + (int )(end - str), (int )(start - str), (int )(range - str)); +#endif + + MATCH_ARG_INIT(msa, reg, option, region, orig_start, mp); + + s = (UChar* )start; + if (forward != 0) { /* forward search */ + if (reg->optimize != OPTIMIZE_NONE) { + UChar *sch_range, *low, *high; + + if (reg->dist_max != 0) { + if (reg->dist_max == INFINITE_LEN) + sch_range = (UChar* )end; + else { + if (DIST_CAST(end - range) < reg->dist_max) + sch_range = (UChar* )end; + else { + sch_range = (UChar* )range + reg->dist_max; + } + } + } + else + sch_range = (UChar* )range; + + if ((end - start) < reg->threshold_len) + goto mismatch; + + if (reg->dist_max != INFINITE_LEN) { + do { + if (! forward_search(reg, str, end, s, sch_range, &low, &high)) + goto mismatch; + if (s < low) { + s = low; + } + while (s <= high) { + MATCH_AND_RETURN_CHECK(data_range); + s += enclen(reg->enc, s); +#ifdef USE_SKIP_SEARCH + if (s < msa.skip_search) s = msa.skip_search; +#endif + } + } while (s < range); + goto mismatch; + } + else { /* check only. */ + if (! forward_search(reg, str, end, s, sch_range, &low, &high)) + goto mismatch; + + if ((reg->anchor & ANCR_ANYCHAR_INF) != 0 && + (reg->anchor & (ANCR_LOOK_BEHIND | ANCR_PREC_READ_NOT)) == 0) { + while (s < range) { + UChar* prev; + + MATCH_AND_RETURN_CHECK(data_range); + prev = s; + s += enclen(reg->enc, s); + +#ifdef USE_SKIP_SEARCH + if (s < msa.skip_search) s = msa.skip_search; + else { +#endif + while (!ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end) && + s < range) { + prev = s; + s += enclen(reg->enc, s); + } +#ifdef USE_SKIP_SEARCH + } +#endif + } + goto mismatch; + } + } + } + + while (1 == 1) { + MATCH_AND_RETURN_CHECK(data_range); + if (s >= range) break; + s += enclen(reg->enc, s); + +#ifdef USE_SKIP_SEARCH + if (s < msa.skip_search) { + s = msa.skip_search; + if (s > range) break; + } +#endif + } + } + else { /* backward search */ + if (range < str) goto mismatch; + + if (orig_start < end) + orig_start += enclen(reg->enc, orig_start); /* is upper range */ + + if (reg->optimize != OPTIMIZE_NONE) { + UChar *low, *high, *adjrange, *sch_start; + const UChar *min_range; + + if ((end - range) < reg->threshold_len) goto mismatch; + + if (range < end) + adjrange = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc, str, range); + else + adjrange = (UChar* )end; + + if (DIST_CAST(end - range) > reg->dist_min) + min_range = range + reg->dist_min; + else + min_range = end; + + if (reg->dist_max != INFINITE_LEN) { + do { + if (DIST_CAST(end - s) > reg->dist_max) + sch_start = s + reg->dist_max; + else { + sch_start = onigenc_get_prev_char_head(reg->enc, str, end); + } + + if (backward_search(reg, str, end, sch_start, min_range, adjrange, + &low, &high) <= 0) + goto mismatch; + + if (s > high) + s = high; + + while (PTR_GE(s, low)) { + MATCH_AND_RETURN_CHECK(orig_start); + s = onigenc_get_prev_char_head(reg->enc, str, s); + } + } while (PTR_GE(s, range)); + goto mismatch; + } + else { /* check only. */ + sch_start = onigenc_get_prev_char_head(reg->enc, str, end); + + if (backward_search(reg, str, end, sch_start, min_range, adjrange, + &low, &high) <= 0) goto mismatch; + } + } + + do { + MATCH_AND_RETURN_CHECK(orig_start); + s = onigenc_get_prev_char_head(reg->enc, str, s); + } while (PTR_GE(s, range)); + } + + mismatch: +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE + if (OPTON_FIND_LONGEST(reg->options)) { + if (msa.best_len >= 0) { + s = msa.best_s; + goto match; + } + } +#endif + r = ONIG_MISMATCH; + + finish: + MATCH_ARG_FREE(msa); + + /* If result is mismatch and no FIND_NOT_EMPTY option, + then the region is not set in match_at(). */ + if (OPTON_FIND_NOT_EMPTY(reg->options) && region +#ifdef USE_POSIX_API + && !OPTON_POSIX_REGION(option) +#endif + ) { + onig_region_clear(region); + } + +#ifdef ONIG_DEBUG + if (r != ONIG_MISMATCH) + fprintf(DBGFP, "onig_search: error %d\n", r); +#endif + return r; + + mismatch_no_msa: + r = ONIG_MISMATCH; + finish_no_msa: +#ifdef ONIG_DEBUG + if (r != ONIG_MISMATCH) + fprintf(DBGFP, "onig_search: error %d\n", r); +#endif + return r; + + match: + MATCH_ARG_FREE(msa); + return (int )(s - str); +} + +extern int +onig_search_with_param(regex_t* reg, const UChar* str, const UChar* end, + const UChar* start, const UChar* range, OnigRegion* region, + OnigOptionType option, OnigMatchParam* mp) +{ + const UChar* data_range; + + if (range > start) + data_range = range; + else + data_range = end; + + return search_in_range(reg, str, end, start, range, data_range, region, + option, mp); +} + +extern int +onig_scan(regex_t* reg, const UChar* str, const UChar* end, + OnigRegion* region, OnigOptionType option, + int (*scan_callback)(int, int, OnigRegion*, void*), + void* callback_arg) +{ + int r; + int n; + int rs; + const UChar* start; + + if (OPTON_CHECK_VALIDITY_OF_STRING(option)) { + if (! ONIGENC_IS_VALID_MBC_STRING(reg->enc, str, end)) + return ONIGERR_INVALID_WIDE_CHAR_VALUE; + + ONIG_OPTION_OFF(option, ONIG_OPTION_CHECK_VALIDITY_OF_STRING); + } + + n = 0; + start = str; + while (1) { + r = onig_search(reg, str, end, start, end, region, option); + if (r >= 0) { + rs = scan_callback(n, r, region, callback_arg); + n++; + if (rs != 0) + return rs; + + if (region->end[0] == start - str) { + if (start >= end) break; + start += enclen(reg->enc, start); + } + else + start = str + region->end[0]; + + if (start > end) + break; + } + else if (r == ONIG_MISMATCH) { + break; + } + else { /* error */ + return r; + } + } + + return n; +} + +extern int +onig_get_subexp_call_max_nest_level(void) +{ + return SubexpCallMaxNestLevel; +} + +extern int +onig_set_subexp_call_max_nest_level(int level) +{ + SubexpCallMaxNestLevel = level; + return 0; +} + +extern OnigEncoding +onig_get_encoding(regex_t* reg) +{ + return reg->enc; +} + +extern OnigOptionType +onig_get_options(regex_t* reg) +{ + return reg->options; +} + +extern OnigCaseFoldType +onig_get_case_fold_flag(regex_t* reg) +{ + return reg->case_fold_flag; +} + +extern OnigSyntaxType* +onig_get_syntax(regex_t* reg) +{ + return reg->syntax; +} + +extern int +onig_number_of_captures(regex_t* reg) +{ + return reg->num_mem; +} + +extern int +onig_number_of_capture_histories(regex_t* reg) +{ +#ifdef USE_CAPTURE_HISTORY + int i, n; + + n = 0; + for (i = 0; i <= ONIG_MAX_CAPTURE_HISTORY_GROUP; i++) { + if (MEM_STATUS_AT(reg->capture_history, i) != 0) + n++; + } + return n; +#else + return 0; +#endif +} + +extern void +onig_copy_encoding(OnigEncoding to, OnigEncoding from) +{ + *to = *from; +} + +#ifdef USE_REGSET + +extern int +onig_regset_new(OnigRegSet** rset, int n, regex_t* regs[]) +{ +#define REGSET_INITIAL_ALLOC_SIZE 10 + + int i; + int r; + int alloc; + OnigRegSet* set; + RR* rs; + + *rset = 0; + + set = (OnigRegSet* )xmalloc(sizeof(*set)); + CHECK_NULL_RETURN_MEMERR(set); + + alloc = n > REGSET_INITIAL_ALLOC_SIZE ? n : REGSET_INITIAL_ALLOC_SIZE; + rs = (RR* )xmalloc(sizeof(set->rs[0]) * alloc); + if (IS_NULL(rs)) { + xfree(set); + return ONIGERR_MEMORY; + } + + set->rs = rs; + set->n = 0; + set->alloc = alloc; + + for (i = 0; i < n; i++) { + regex_t* reg = regs[i]; + + r = onig_regset_add(set, reg); + if (r != 0) { + for (i = 0; i < set->n; i++) { + OnigRegion* region = set->rs[i].region; + if (IS_NOT_NULL(region)) + onig_region_free(region, 1); + } + xfree(set->rs); + xfree(set); + return r; + } + } + + *rset = set; + return 0; +} + +static void +update_regset_by_reg(OnigRegSet* set, regex_t* reg) +{ + if (set->n == 1) { + set->enc = reg->enc; + set->anchor = reg->anchor; + set->anc_dmin = reg->anc_dist_min; + set->anc_dmax = reg->anc_dist_max; + set->all_low_high = + (reg->optimize == OPTIMIZE_NONE || reg->dist_max == INFINITE_LEN) ? 0 : 1; + set->anychar_inf = (reg->anchor & ANCR_ANYCHAR_INF) != 0 ? 1 : 0; + } + else { + int anchor; + + anchor = set->anchor & reg->anchor; + if (anchor != 0) { + OnigLen anc_dmin; + OnigLen anc_dmax; + + anc_dmin = set->anc_dmin; + anc_dmax = set->anc_dmax; + if (anc_dmin > reg->anc_dist_min) anc_dmin = reg->anc_dist_min; + if (anc_dmax < reg->anc_dist_max) anc_dmax = reg->anc_dist_max; + set->anc_dmin = anc_dmin; + set->anc_dmax = anc_dmax; + } + + set->anchor = anchor; + + if (reg->optimize == OPTIMIZE_NONE || reg->dist_max == INFINITE_LEN) + set->all_low_high = 0; + + if ((reg->anchor & ANCR_ANYCHAR_INF) != 0) + set->anychar_inf = 1; + } +} + +extern int +onig_regset_add(OnigRegSet* set, regex_t* reg) +{ + OnigRegion* region; + +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE + if (OPTON_FIND_LONGEST(reg->options)) + return ONIGERR_INVALID_ARGUMENT; +#endif + + if (set->n != 0 && reg->enc != set->enc) + return ONIGERR_INVALID_ARGUMENT; + + if (set->n >= set->alloc) { + RR* nrs; + int new_alloc; + + new_alloc = set->alloc * 2; + nrs = (RR* )xrealloc(set->rs, sizeof(set->rs[0]) * new_alloc); + CHECK_NULL_RETURN_MEMERR(nrs); + + set->rs = nrs; + set->alloc = new_alloc; + } + + region = onig_region_new(); + CHECK_NULL_RETURN_MEMERR(region); + + set->rs[set->n].reg = reg; + set->rs[set->n].region = region; + set->n++; + + update_regset_by_reg(set, reg); + return 0; +} + +extern int +onig_regset_replace(OnigRegSet* set, int at, regex_t* reg) +{ + int i; + + if (at < 0 || at >= set->n) + return ONIGERR_INVALID_ARGUMENT; + + if (IS_NULL(reg)) { + onig_region_free(set->rs[at].region, 1); + for (i = at; i < set->n - 1; i++) { + set->rs[i].reg = set->rs[i+1].reg; + set->rs[i].region = set->rs[i+1].region; + } + set->n--; + } + else { +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE + if (OPTON_FIND_LONGEST(reg->options)) + return ONIGERR_INVALID_ARGUMENT; +#endif + + if (set->n > 1 && reg->enc != set->enc) + return ONIGERR_INVALID_ARGUMENT; + + set->rs[at].reg = reg; + } + + for (i = 0; i < set->n; i++) + update_regset_by_reg(set, set->rs[i].reg); + + return 0; +} + +extern void +onig_regset_free(OnigRegSet* set) +{ + int i; + + for (i = 0; i < set->n; i++) { + regex_t* reg; + OnigRegion* region; + + reg = set->rs[i].reg; + region = set->rs[i].region; + onig_free(reg); + if (IS_NOT_NULL(region)) + onig_region_free(region, 1); + } + + xfree(set->rs); + xfree(set); +} + +extern int +onig_regset_number_of_regex(OnigRegSet* set) +{ + return set->n; +} + +extern regex_t* +onig_regset_get_regex(OnigRegSet* set, int at) +{ + if (at < 0 || at >= set->n) + return (regex_t* )0; + + return set->rs[at].reg; +} + +extern OnigRegion* +onig_regset_get_region(OnigRegSet* set, int at) +{ + if (at < 0 || at >= set->n) + return (OnigRegion* )0; + + return set->rs[at].region; +} + +#endif /* USE_REGSET */ + + +#ifdef USE_DIRECT_THREADED_CODE +extern int +onig_init_for_match_at(regex_t* reg) +{ + return match_at(reg, (const UChar* )NULL, (const UChar* )NULL, + (const UChar* )NULL, (const UChar* )NULL, + (MatchArg* )NULL); +} +#endif + + +/* for callout functions */ + +#ifdef USE_CALLOUT + +extern OnigCalloutFunc +onig_get_progress_callout(void) +{ + return DefaultProgressCallout; +} + +extern int +onig_set_progress_callout(OnigCalloutFunc f) +{ + DefaultProgressCallout = f; + return ONIG_NORMAL; +} + +extern OnigCalloutFunc +onig_get_retraction_callout(void) +{ + return DefaultRetractionCallout; +} + +extern int +onig_set_retraction_callout(OnigCalloutFunc f) +{ + DefaultRetractionCallout = f; + return ONIG_NORMAL; +} + +extern int +onig_get_callout_num_by_callout_args(OnigCalloutArgs* args) +{ + return args->num; +} + +extern OnigCalloutIn +onig_get_callout_in_by_callout_args(OnigCalloutArgs* args) +{ + return args->in; +} + +extern int +onig_get_name_id_by_callout_args(OnigCalloutArgs* args) +{ + return args->name_id; +} + +extern const UChar* +onig_get_contents_by_callout_args(OnigCalloutArgs* args) +{ + int num; + CalloutListEntry* e; + + num = args->num; + e = onig_reg_callout_list_at(args->regex, num); + if (IS_NULL(e)) return 0; + if (e->of == ONIG_CALLOUT_OF_CONTENTS) { + return e->u.content.start; + } + + return 0; +} + +extern const UChar* +onig_get_contents_end_by_callout_args(OnigCalloutArgs* args) +{ + int num; + CalloutListEntry* e; + + num = args->num; + e = onig_reg_callout_list_at(args->regex, num); + if (IS_NULL(e)) return 0; + if (e->of == ONIG_CALLOUT_OF_CONTENTS) { + return e->u.content.end; + } + + return 0; +} + +extern int +onig_get_args_num_by_callout_args(OnigCalloutArgs* args) +{ + int num; + CalloutListEntry* e; + + num = args->num; + e = onig_reg_callout_list_at(args->regex, num); + if (IS_NULL(e)) return ONIGERR_INVALID_ARGUMENT; + if (e->of == ONIG_CALLOUT_OF_NAME) { + return e->u.arg.num; + } + + return ONIGERR_INVALID_ARGUMENT; +} + +extern int +onig_get_passed_args_num_by_callout_args(OnigCalloutArgs* args) +{ + int num; + CalloutListEntry* e; + + num = args->num; + e = onig_reg_callout_list_at(args->regex, num); + if (IS_NULL(e)) return ONIGERR_INVALID_ARGUMENT; + if (e->of == ONIG_CALLOUT_OF_NAME) { + return e->u.arg.passed_num; + } + + return ONIGERR_INVALID_ARGUMENT; +} + +extern int +onig_get_arg_by_callout_args(OnigCalloutArgs* args, int index, + OnigType* type, OnigValue* val) +{ + int num; + CalloutListEntry* e; + + num = args->num; + e = onig_reg_callout_list_at(args->regex, num); + if (IS_NULL(e)) return ONIGERR_INVALID_ARGUMENT; + if (e->of == ONIG_CALLOUT_OF_NAME) { + if (IS_NOT_NULL(type)) *type = e->u.arg.types[index]; + if (IS_NOT_NULL(val)) *val = e->u.arg.vals[index]; + return ONIG_NORMAL; + } + + return ONIGERR_INVALID_ARGUMENT; +} + +extern const UChar* +onig_get_string_by_callout_args(OnigCalloutArgs* args) +{ + return args->string; +} + +extern const UChar* +onig_get_string_end_by_callout_args(OnigCalloutArgs* args) +{ + return args->string_end; +} + +extern const UChar* +onig_get_start_by_callout_args(OnigCalloutArgs* args) +{ + return args->start; +} + +extern const UChar* +onig_get_right_range_by_callout_args(OnigCalloutArgs* args) +{ + return args->right_range; +} + +extern const UChar* +onig_get_current_by_callout_args(OnigCalloutArgs* args) +{ + return args->current; +} + +extern OnigRegex +onig_get_regex_by_callout_args(OnigCalloutArgs* args) +{ + return args->regex; +} + +extern unsigned long +onig_get_retry_counter_by_callout_args(OnigCalloutArgs* args) +{ + return args->retry_in_match_counter; +} + + +extern int +onig_get_capture_range_in_callout(OnigCalloutArgs* a, int mem_num, int* begin, int* end) +{ + OnigRegex reg; + const UChar* str; + StackType* stk_base; + int i; + StkPtrType* mem_start_stk; + StkPtrType* mem_end_stk; + + i = mem_num; + reg = a->regex; + str = a->string; + stk_base = a->stk_base; + mem_start_stk = a->mem_start_stk; + mem_end_stk = a->mem_end_stk; + + if (i > 0) { + if (a->mem_end_stk[i].i != INVALID_STACK_INDEX) { + *begin = (int )(STACK_MEM_START(reg, i) - str); + *end = (int )(STACK_MEM_END(reg, i) - str); + } + else { + *begin = *end = ONIG_REGION_NOTPOS; + } + } + else + return ONIGERR_INVALID_ARGUMENT; + + return ONIG_NORMAL; +} + +extern int +onig_get_used_stack_size_in_callout(OnigCalloutArgs* a, int* used_num, int* used_bytes) +{ + int n; + + n = (int )(a->stk - a->stk_base); + + if (used_num != 0) + *used_num = n; + + if (used_bytes != 0) + *used_bytes = n * sizeof(StackType); + + return ONIG_NORMAL; +} + + +/* builtin callout functions */ + +extern int +onig_builtin_fail(OnigCalloutArgs* args ARG_UNUSED, void* user_data ARG_UNUSED) +{ + return ONIG_CALLOUT_FAIL; +} + +extern int +onig_builtin_mismatch(OnigCalloutArgs* args ARG_UNUSED, void* user_data ARG_UNUSED) +{ + return ONIG_MISMATCH; +} + +extern int +onig_builtin_error(OnigCalloutArgs* args, void* user_data ARG_UNUSED) +{ + int r; + int n; + OnigValue val; + + r = onig_get_arg_by_callout_args(args, 0, 0, &val); + if (r != ONIG_NORMAL) return r; + + n = (int )val.l; + if (n >= 0) { + n = ONIGERR_INVALID_CALLOUT_BODY; + } + else if (onig_is_error_code_needs_param(n)) { + n = ONIGERR_INVALID_CALLOUT_BODY; + } + + return n; +} + +#ifdef USE_SKIP_SEARCH +extern int +onig_builtin_skip(OnigCalloutArgs* args, void* user_data ARG_UNUSED) +{ + if (args->current > args->msa->skip_search) + args->msa->skip_search = (UChar* )args->current; + + return ONIG_NORMAL; +} +#endif + +extern int +onig_builtin_count(OnigCalloutArgs* args, void* user_data) +{ + (void )onig_check_callout_data_and_clear_old_values(args); + + return onig_builtin_total_count(args, user_data); +} + +extern int +onig_builtin_total_count(OnigCalloutArgs* args, void* user_data ARG_UNUSED) +{ + int r; + int slot; + OnigType type; + OnigValue val; + OnigValue aval; + OnigCodePoint count_type; + + r = onig_get_arg_by_callout_args(args, 0, &type, &aval); + if (r != ONIG_NORMAL) return r; + + count_type = aval.c; + if (count_type != '>' && count_type != 'X' && count_type != '<') + return ONIGERR_INVALID_CALLOUT_ARG; + + r = onig_get_callout_data_by_callout_args_self_dont_clear_old(args, 0, + &type, &val); + if (r < ONIG_NORMAL) + return r; + else if (r > ONIG_NORMAL) { + /* type == void: initial state */ + val.l = 0; + } + + if (args->in == ONIG_CALLOUT_IN_RETRACTION) { + slot = 2; + if (count_type == '<') + val.l++; + else if (count_type == 'X') + val.l--; + } + else { + slot = 1; + if (count_type != '<') + val.l++; + } + + r = onig_set_callout_data_by_callout_args_self(args, 0, ONIG_TYPE_LONG, &val); + if (r != ONIG_NORMAL) return r; + + /* slot 1: in progress counter, slot 2: in retraction counter */ + r = onig_get_callout_data_by_callout_args_self_dont_clear_old(args, slot, + &type, &val); + if (r < ONIG_NORMAL) + return r; + else if (r > ONIG_NORMAL) { + val.l = 0; + } + + val.l++; + r = onig_set_callout_data_by_callout_args_self(args, slot, ONIG_TYPE_LONG, &val); + if (r != ONIG_NORMAL) return r; + + return ONIG_CALLOUT_SUCCESS; +} + +extern int +onig_builtin_max(OnigCalloutArgs* args, void* user_data ARG_UNUSED) +{ + int r; + int slot; + long max_val; + OnigCodePoint count_type; + OnigType type; + OnigValue val; + OnigValue aval; + + (void )onig_check_callout_data_and_clear_old_values(args); + + slot = 0; + r = onig_get_callout_data_by_callout_args_self(args, slot, &type, &val); + if (r < ONIG_NORMAL) + return r; + else if (r > ONIG_NORMAL) { + /* type == void: initial state */ + type = ONIG_TYPE_LONG; + val.l = 0; + } + + r = onig_get_arg_by_callout_args(args, 0, &type, &aval); + if (r != ONIG_NORMAL) return r; + if (type == ONIG_TYPE_TAG) { + r = onig_get_callout_data_by_callout_args(args, aval.tag, 0, &type, &aval); + if (r < ONIG_NORMAL) return r; + else if (r > ONIG_NORMAL) + max_val = 0L; + else + max_val = aval.l; + } + else { /* LONG */ + max_val = aval.l; + } + + r = onig_get_arg_by_callout_args(args, 1, &type, &aval); + if (r != ONIG_NORMAL) return r; + + count_type = aval.c; + if (count_type != '>' && count_type != 'X' && count_type != '<') + return ONIGERR_INVALID_CALLOUT_ARG; + + if (args->in == ONIG_CALLOUT_IN_RETRACTION) { + if (count_type == '<') { + if (val.l >= max_val) return ONIG_CALLOUT_FAIL; + val.l++; + } + else if (count_type == 'X') + val.l--; + } + else { + if (count_type != '<') { + if (val.l >= max_val) return ONIG_CALLOUT_FAIL; + val.l++; + } + } + + r = onig_set_callout_data_by_callout_args_self(args, slot, ONIG_TYPE_LONG, &val); + if (r != ONIG_NORMAL) return r; + + return ONIG_CALLOUT_SUCCESS; +} + +enum OP_CMP { + OP_EQ, + OP_NE, + OP_LT, + OP_GT, + OP_LE, + OP_GE +}; + +extern int +onig_builtin_cmp(OnigCalloutArgs* args, void* user_data ARG_UNUSED) +{ + int r; + int slot; + long lv; + long rv; + OnigType type; + OnigValue val; + regex_t* reg; + enum OP_CMP op; + + reg = args->regex; + + r = onig_get_arg_by_callout_args(args, 0, &type, &val); + if (r != ONIG_NORMAL) return r; + + if (type == ONIG_TYPE_TAG) { + r = onig_get_callout_data_by_callout_args(args, val.tag, 0, &type, &val); + if (r < ONIG_NORMAL) return r; + else if (r > ONIG_NORMAL) + lv = 0L; + else + lv = val.l; + } + else { /* ONIG_TYPE_LONG */ + lv = val.l; + } + + r = onig_get_arg_by_callout_args(args, 2, &type, &val); + if (r != ONIG_NORMAL) return r; + + if (type == ONIG_TYPE_TAG) { + r = onig_get_callout_data_by_callout_args(args, val.tag, 0, &type, &val); + if (r < ONIG_NORMAL) return r; + else if (r > ONIG_NORMAL) + rv = 0L; + else + rv = val.l; + } + else { /* ONIG_TYPE_LONG */ + rv = val.l; + } + + slot = 0; + r = onig_get_callout_data_by_callout_args_self(args, slot, &type, &val); + if (r < ONIG_NORMAL) + return r; + else if (r > ONIG_NORMAL) { + /* type == void: initial state */ + OnigCodePoint c1, c2; + UChar* p; + + r = onig_get_arg_by_callout_args(args, 1, &type, &val); + if (r != ONIG_NORMAL) return r; + + p = val.s.start; + c1 = ONIGENC_MBC_TO_CODE(reg->enc, p, val.s.end); + p += ONIGENC_MBC_ENC_LEN(reg->enc, p); + if (p < val.s.end) { + c2 = ONIGENC_MBC_TO_CODE(reg->enc, p, val.s.end); + p += ONIGENC_MBC_ENC_LEN(reg->enc, p); + if (p != val.s.end) return ONIGERR_INVALID_CALLOUT_ARG; + } + else + c2 = 0; + + switch (c1) { + case '=': + if (c2 != '=') return ONIGERR_INVALID_CALLOUT_ARG; + op = OP_EQ; + break; + case '!': + if (c2 != '=') return ONIGERR_INVALID_CALLOUT_ARG; + op = OP_NE; + break; + case '<': + if (c2 == '=') op = OP_LE; + else if (c2 == 0) op = OP_LT; + else return ONIGERR_INVALID_CALLOUT_ARG; + break; + case '>': + if (c2 == '=') op = OP_GE; + else if (c2 == 0) op = OP_GT; + else return ONIGERR_INVALID_CALLOUT_ARG; + break; + default: + return ONIGERR_INVALID_CALLOUT_ARG; + break; + } + val.l = (long )op; + r = onig_set_callout_data_by_callout_args_self(args, slot, ONIG_TYPE_LONG, &val); + if (r != ONIG_NORMAL) return r; + } + else { + op = (enum OP_CMP )val.l; + } + + switch (op) { + case OP_EQ: r = (lv == rv); break; + case OP_NE: r = (lv != rv); break; + case OP_LT: r = (lv < rv); break; + case OP_GT: r = (lv > rv); break; + case OP_LE: r = (lv <= rv); break; + case OP_GE: r = (lv >= rv); break; + } + + return r == 0 ? ONIG_CALLOUT_FAIL : ONIG_CALLOUT_SUCCESS; +} + + +#ifndef ONIG_NO_PRINT + +static FILE* OutFp; + +/* name start with "onig_" for macros. */ +static int +onig_builtin_monitor(OnigCalloutArgs* args, void* user_data) +{ + int r; + int num; + size_t tag_len; + const UChar* start; + const UChar* right; + const UChar* current; + const UChar* string; + const UChar* strend; + const UChar* tag_start; + const UChar* tag_end; + regex_t* reg; + OnigCalloutIn in; + OnigType type; + OnigValue val; + char buf[20]; + FILE* fp; + + fp = OutFp; + + r = onig_get_arg_by_callout_args(args, 0, &type, &val); + if (r != ONIG_NORMAL) return r; + + in = onig_get_callout_in_by_callout_args(args); + if (in == ONIG_CALLOUT_IN_PROGRESS) { + if (val.c == '<') + return ONIG_CALLOUT_SUCCESS; + } + else { + if (val.c != 'X' && val.c != '<') + return ONIG_CALLOUT_SUCCESS; + } + + num = onig_get_callout_num_by_callout_args(args); + start = onig_get_start_by_callout_args(args); + right = onig_get_right_range_by_callout_args(args); + current = onig_get_current_by_callout_args(args); + string = onig_get_string_by_callout_args(args); + strend = onig_get_string_end_by_callout_args(args); + reg = onig_get_regex_by_callout_args(args); + tag_start = onig_get_callout_tag_start(reg, num); + tag_end = onig_get_callout_tag_end(reg, num); + + if (tag_start == 0) + xsnprintf(buf, sizeof(buf), "#%d", num); + else { + /* CAUTION: tag string is not terminated with NULL. */ + int i; + + tag_len = tag_end - tag_start; + if (tag_len >= sizeof(buf)) tag_len = sizeof(buf) - 1; + for (i = 0; i < (int )tag_len; i++) buf[i] = tag_start[i]; + buf[tag_len] = '\0'; + } + + fprintf(fp, "ONIG-MONITOR: %-4s %s at: %d [%d - %d] len: %d\n", + buf, + in == ONIG_CALLOUT_IN_PROGRESS ? "=>" : "<=", + (int )(current - string), + (int )(start - string), + (int )(right - string), + (int )(strend - string)); + fflush(fp); + + return ONIG_CALLOUT_SUCCESS; +} + +extern int +onig_setup_builtin_monitors_by_ascii_encoded_name(void* fp /* FILE* */) +{ + int id; + char* name; + OnigEncoding enc; + unsigned int ts[4]; + OnigValue opts[4]; + + if (IS_NOT_NULL(fp)) + OutFp = (FILE* )fp; + else + OutFp = stdout; + + enc = ONIG_ENCODING_ASCII; + + name = "MON"; + ts[0] = ONIG_TYPE_CHAR; + opts[0].c = '>'; + BC_B_O(name, monitor, 1, ts, 1, opts); + + return ONIG_NORMAL; +} + +#endif /* ONIG_NO_PRINT */ + +#endif /* USE_CALLOUT */ diff --git a/internal/components/third_party/oniguruma/src/regext.c b/internal/components/third_party/oniguruma/src/regext.c new file mode 100644 index 0000000000..c46f630c59 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/regext.c @@ -0,0 +1,202 @@ +/********************************************************************** + regext.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2019 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regint.h" + +#if 0 +static void +conv_ext0be32(const UChar* s, const UChar* end, UChar* conv) +{ + while (s < end) { + *conv++ = '\0'; + *conv++ = '\0'; + *conv++ = '\0'; + *conv++ = *s++; + } +} + +static void +conv_ext0le32(const UChar* s, const UChar* end, UChar* conv) +{ + while (s < end) { + *conv++ = *s++; + *conv++ = '\0'; + *conv++ = '\0'; + *conv++ = '\0'; + } +} + +static void +conv_ext0be(const UChar* s, const UChar* end, UChar* conv) +{ + while (s < end) { + *conv++ = '\0'; + *conv++ = *s++; + } +} + +static void +conv_ext0le(const UChar* s, const UChar* end, UChar* conv) +{ + while (s < end) { + *conv++ = *s++; + *conv++ = '\0'; + } +} + +static void +conv_swap4bytes(const UChar* s, const UChar* end, UChar* conv) +{ + while (s < end) { + *conv++ = s[3]; + *conv++ = s[2]; + *conv++ = s[1]; + *conv++ = s[0]; + s += 4; + } +} + +static void +conv_swap2bytes(const UChar* s, const UChar* end, UChar* conv) +{ + while (s < end) { + *conv++ = s[1]; + *conv++ = s[0]; + s += 2; + } +} + +static int +conv_encoding(OnigEncoding from, OnigEncoding to, const UChar* s, const UChar* end, + UChar** conv, UChar** conv_end) +{ + int len = (int )(end - s); + + if (to == ONIG_ENCODING_UTF16_BE) { + if (from == ONIG_ENCODING_ASCII || from == ONIG_ENCODING_ISO_8859_1) { + *conv = (UChar* )xmalloc(len * 2); + CHECK_NULL_RETURN_MEMERR(*conv); + *conv_end = *conv + (len * 2); + conv_ext0be(s, end, *conv); + return 0; + } + else if (from == ONIG_ENCODING_UTF16_LE) { + swap16: + *conv = (UChar* )xmalloc(len); + CHECK_NULL_RETURN_MEMERR(*conv); + *conv_end = *conv + len; + conv_swap2bytes(s, end, *conv); + return 0; + } + } + else if (to == ONIG_ENCODING_UTF16_LE) { + if (from == ONIG_ENCODING_ASCII || from == ONIG_ENCODING_ISO_8859_1) { + *conv = (UChar* )xmalloc(len * 2); + CHECK_NULL_RETURN_MEMERR(*conv); + *conv_end = *conv + (len * 2); + conv_ext0le(s, end, *conv); + return 0; + } + else if (from == ONIG_ENCODING_UTF16_BE) { + goto swap16; + } + } + if (to == ONIG_ENCODING_UTF32_BE) { + if (from == ONIG_ENCODING_ASCII || from == ONIG_ENCODING_ISO_8859_1) { + *conv = (UChar* )xmalloc(len * 4); + CHECK_NULL_RETURN_MEMERR(*conv); + *conv_end = *conv + (len * 4); + conv_ext0be32(s, end, *conv); + return 0; + } + else if (from == ONIG_ENCODING_UTF32_LE) { + swap32: + *conv = (UChar* )xmalloc(len); + CHECK_NULL_RETURN_MEMERR(*conv); + *conv_end = *conv + len; + conv_swap4bytes(s, end, *conv); + return 0; + } + } + else if (to == ONIG_ENCODING_UTF32_LE) { + if (from == ONIG_ENCODING_ASCII || from == ONIG_ENCODING_ISO_8859_1) { + *conv = (UChar* )xmalloc(len * 4); + CHECK_NULL_RETURN_MEMERR(*conv); + *conv_end = *conv + (len * 4); + conv_ext0le32(s, end, *conv); + return 0; + } + else if (from == ONIG_ENCODING_UTF32_BE) { + goto swap32; + } + } + + return ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION; +} +#endif + +extern int +onig_new_deluxe(regex_t** reg, const UChar* pattern, const UChar* pattern_end, + OnigCompileInfo* ci, OnigErrorInfo* einfo) +{ + int r; + UChar *cpat, *cpat_end; + + if (IS_NOT_NULL(einfo)) einfo->par = (UChar* )NULL; + + if (ci->pattern_enc != ci->target_enc) { + return ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION; + } + else { + cpat = (UChar* )pattern; + cpat_end = (UChar* )pattern_end; + } + + *reg = (regex_t* )xmalloc(sizeof(regex_t)); + if (IS_NULL(*reg)) { + r = ONIGERR_MEMORY; + goto err2; + } + + r = onig_reg_init(*reg, ci->option, ci->case_fold_flag, ci->target_enc, + ci->syntax); + if (r != 0) goto err; + + r = onig_compile(*reg, cpat, cpat_end, einfo); + if (r != 0) { + err: + onig_free(*reg); + *reg = NULL; + } + + err2: + if (cpat != pattern) xfree(cpat); + + return r; +} diff --git a/internal/components/third_party/oniguruma/src/reggnu.c b/internal/components/third_party/oniguruma/src/reggnu.c new file mode 100644 index 0000000000..8a450780dd --- /dev/null +++ b/internal/components/third_party/oniguruma/src/reggnu.c @@ -0,0 +1,143 @@ +/********************************************************************** + reggnu.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2019 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regint.h" +#include "oniggnu.h" + +extern void +re_free_registers(OnigRegion* r) +{ + /* 0: don't free self */ + onig_region_free(r, 0); +} + +extern int +re_adjust_startpos(regex_t* reg, const char* string, int size, + int startpos, int range) +{ + if (startpos > 0 && ONIGENC_MBC_MAXLEN(reg->enc) != 1 && startpos < size) { + UChar *p; + UChar *s = (UChar* )string + startpos; + + if (range > 0) { + p = onigenc_get_right_adjust_char_head(reg->enc, (UChar* )string, s); + } + else { + p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc, (UChar* )string, s); + } + return (int )(p - (UChar* )string); + } + + return startpos; +} + +extern int +re_match(regex_t* reg, const char* str, int size, int pos, + struct re_registers* regs) +{ + return onig_match(reg, (UChar* )str, (UChar* )(str + size), + (UChar* )(str + pos), regs, ONIG_OPTION_NONE); +} + +extern int +re_search(regex_t* bufp, const char* string, int size, int startpos, int range, + struct re_registers* regs) +{ + return onig_search(bufp, (UChar* )string, (UChar* )(string + size), + (UChar* )(string + startpos), + (UChar* )(string + startpos + range), + regs, ONIG_OPTION_NONE); +} + +extern int +re_compile_pattern(const char* pattern, int size, regex_t* reg, char* ebuf) +{ + int r; + OnigErrorInfo einfo; + + r = onig_compile(reg, (UChar* )pattern, (UChar* )(pattern + size), &einfo); + if (r != ONIG_NORMAL) { + if (IS_NOT_NULL(ebuf)) + (void )onig_error_code_to_str((UChar* )ebuf, r, &einfo); + } + + return r; +} + +extern void +re_free_pattern(regex_t* reg) +{ + onig_free(reg); +} + +extern int +re_alloc_pattern(regex_t** reg) +{ + *reg = (regex_t* )xmalloc(sizeof(regex_t)); + if (IS_NULL(*reg)) return ONIGERR_MEMORY; + + return onig_reg_init(*reg, ONIG_OPTION_DEFAULT, + ONIGENC_CASE_FOLD_DEFAULT, + OnigEncDefaultCharEncoding, + OnigDefaultSyntax); +} + +extern void +re_set_casetable(const char* table) +{ + onigenc_set_default_caseconv_table((UChar* )table); +} + +extern void +re_mbcinit(int mb_code) +{ + OnigEncoding enc; + + switch (mb_code) { + case RE_MBCTYPE_ASCII: + enc = ONIG_ENCODING_ASCII; + break; + case RE_MBCTYPE_EUC: + enc = ONIG_ENCODING_EUC_JP; + break; + case RE_MBCTYPE_SJIS: + enc = ONIG_ENCODING_SJIS; + break; + case RE_MBCTYPE_UTF8: + enc = ONIG_ENCODING_UTF8; + break; + default: + return ; + break; + } + + onig_initialize(&enc, 1); + + onigenc_set_default_encoding(enc); +} diff --git a/internal/components/third_party/oniguruma/src/regint.h b/internal/components/third_party/oniguruma/src/regint.h new file mode 100644 index 0000000000..fe872b9c3e --- /dev/null +++ b/internal/components/third_party/oniguruma/src/regint.h @@ -0,0 +1,1058 @@ +#ifndef REGINT_H +#define REGINT_H +/********************************************************************** + regint.h - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* for debug */ +/* #define ONIG_DEBUG_PARSE */ +/* #define ONIG_DEBUG_COMPILE */ +/* #define ONIG_DEBUG_SEARCH */ +/* #define ONIG_DEBUG_MATCH */ +/* #define ONIG_DEBUG_MATCH_COUNTER */ +/* #define ONIG_DEBUG_CALL */ +/* #define ONIG_DONT_OPTIMIZE */ +/* #define ONIG_DEBUG */ + +/* for byte-code statistical data. */ +/* #define ONIG_DEBUG_STATISTICS */ + +#if defined(ONIG_DEBUG_PARSE) || defined(ONIG_DEBUG_MATCH) || \ + defined(ONIG_DEBUG_SEARCH) || defined(ONIG_DEBUG_COMPILE) || \ + defined(ONIG_DEBUG_MATCH_COUNTER) || defined(ONIG_DEBUG_CALL) || \ + defined(ONIG_DEBUG_STATISTICS) +#ifndef ONIG_DEBUG +#define ONIG_DEBUG +#endif +#endif + +#ifdef ONIG_DEBUG +#define DBGFP stderr +#endif + +#ifndef ONIG_DISABLE_DIRECT_THREADING +#ifdef __GNUC__ +#define USE_GOTO_LABELS_AS_VALUES +#endif +#endif + +#ifndef ONIG_PRINTFLIKE +#if defined(__clang__) || defined(__GNUC__) +#define ONIG_PRINTFLIKE(x, y) __attribute__((format(printf, x, y))) +#else +#define ONIG_PRINTFLIKE(x, y) +#endif +#endif + +/* config */ +/* spec. config */ +#define USE_REGSET +#define USE_CALL +#define USE_CALLOUT +#define USE_SKIP_SEARCH +#define USE_BACKREF_WITH_LEVEL /* \k, \k */ +#define USE_WHOLE_OPTIONS +#define USE_RIGID_CHECK_CAPTURES_IN_EMPTY_REPEAT /* /(?:()|())*\2/ */ +#define USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE /* /\n$/ =~ "\n" */ +#define USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR +#define USE_RETRY_LIMIT +#ifdef USE_GOTO_LABELS_AS_VALUES +#define USE_THREADED_CODE +#define USE_DIRECT_THREADED_CODE +#endif + +/* internal config */ +#define USE_CHECK_VALIDITY_OF_STRING_IN_TREE +#define USE_OP_PUSH_OR_JUMP_EXACT +#define USE_QUANT_PEEK_NEXT +#define USE_ST_LIBRARY +#define USE_TIMEOFDAY +#define USE_STRICT_POINTER_ADDRESS +#define USE_STRICT_POINTER_COMPARISON + +#define USE_WORD_BEGIN_END /* "\<", "\>" */ +#define USE_CAPTURE_HISTORY +#define USE_VARIABLE_META_CHARS +#define USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE +/* #define USE_REPEAT_AND_EMPTY_CHECK_LOCAL_VAR */ + +/* enabled by configure --enable-posix-api=yes */ +/* #define USE_POSIX_API */ + +#define DEFAULT_PARSE_DEPTH_LIMIT 4096 +#define INIT_MATCH_STACK_SIZE 160 +#define DEFAULT_MATCH_STACK_LIMIT_SIZE 0 /* unlimited */ +#define DEFAULT_RETRY_LIMIT_IN_MATCH 10000000 +#define DEFAULT_RETRY_LIMIT_IN_SEARCH 0 /* unlimited */ +#define DEFAULT_SUBEXP_CALL_LIMIT_IN_SEARCH 0 /* unlimited */ +#define DEFAULT_SUBEXP_CALL_MAX_NEST_LEVEL 20 + + +#include "regenc.h" + +#ifndef ONIG_NO_STANDARD_C_HEADERS + +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_STDINT_H +#include +#endif + +#if defined(HAVE_ALLOCA_H) +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +#ifndef __BORLANDC__ +#include +#endif +#endif + +#ifdef HAVE_INTTYPES_H +#include +#endif + +#if defined(_WIN32) || defined(__BORLANDC__) +#include +#endif + +#if defined(ONIG_DEBUG) || defined(NEED_TO_INCLUDE_STDIO) +# include +#endif + +#ifdef ONIG_DEBUG_STATISTICS +#ifdef USE_TIMEOFDAY + +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif + +#else /* USE_TIMEOFDAY */ + +#ifdef HAVE_SYS_TIMES_H +#include +#endif + +#endif /* USE_TIMEOFDAY */ +#endif /* ONIG_DEBUG_STATISTICS */ + +/* I don't think these x....'s need to be included in + ONIG_NO_STANDARD_C_HEADERS, but they are required by Issue #170 + and do so since there is no problem. + */ +#ifndef xmemset +#define xmemset memset +#endif + +#ifndef xmemcpy +#define xmemcpy memcpy +#endif + +#ifndef xmemmove +#define xmemmove memmove +#endif + +#endif /* ONIG_NO_STANDARD_C_HEADERS */ + + +#ifdef MIN +#undef MIN +#endif +#ifdef MAX +#undef MAX +#endif + +#define MIN(a,b) (((a)>(b))?(b):(a)) +#define MAX(a,b) (((a)<(b))?(b):(a)) + +#define IS_NULL(p) (((void*)(p)) == (void*)0) +#define IS_NOT_NULL(p) (((void*)(p)) != (void*)0) +#define CHECK_NULL_RETURN(p) if (IS_NULL(p)) return NULL +#define CHECK_NULL_RETURN_MEMERR(p) if (IS_NULL(p)) return ONIGERR_MEMORY +#define NULL_UCHARP ((UChar* )0) + +#ifdef USE_STRICT_POINTER_COMPARISON +#define PTR_GE(p,q) ((p) != NULL && (p) >= (q)) +#else +#define PTR_GE(p,q) (p) >= (q) +#endif + +#ifndef ONIG_INT_MAX +#define ONIG_INT_MAX INT_MAX +#endif + +#define CHAR_MAP_SIZE 256 +#define INFINITE_LEN ONIG_INFINITE_DISTANCE +#define STEP_BACK_MAX_CHAR_LEN 65535 /* INT_MAX is too big */ +#define LOOK_BEHIND_MAX_CHAR_LEN STEP_BACK_MAX_CHAR_LEN + +/* escape other system UChar definition */ +#ifdef ONIG_ESCAPE_UCHAR_COLLISION +#undef ONIG_ESCAPE_UCHAR_COLLISION +#endif + +#define xmalloc malloc +#define xrealloc realloc +#define xcalloc calloc +#define xfree free + +#define st_init_table onig_st_init_table +#define st_init_table_with_size onig_st_init_table_with_size +#define st_init_numtable onig_st_init_numtable +#define st_init_numtable_with_size onig_st_init_numtable_with_size +#define st_init_strtable onig_st_init_strtable +#define st_init_strtable_with_size onig_st_init_strtable_with_size +#define st_delete onig_st_delete +#define st_delete_safe onig_st_delete_safe +#define st_insert onig_st_insert +#define st_lookup onig_st_lookup +#define st_foreach onig_st_foreach +#define st_add_direct onig_st_add_direct +#define st_free_table onig_st_free_table +#define st_cleanup_safe onig_st_cleanup_safe +#define st_copy onig_st_copy +#define st_nothing_key_clone onig_st_nothing_key_clone +#define st_nothing_key_free onig_st_nothing_key_free +/* */ +#define onig_st_is_member st_is_member + + +#if defined(_WIN32) && !defined(__GNUC__) + +#ifndef xalloca +#define xalloca _alloca +#endif +#ifndef xvsnprintf +#define xvsnprintf(buf,size,fmt,args) _vsnprintf_s(buf,size,_TRUNCATE,fmt,args) +#endif +#ifndef xsnprintf +#define xsnprintf sprintf_s +#endif +#ifndef xstrcat +#define xstrcat(dest,src,size) strcat_s(dest,size,src) +#endif + +#else + +#ifndef xalloca +#define xalloca alloca +#endif +#ifndef xvsnprintf +#define xvsnprintf vsnprintf +#endif +#ifndef xsnprintf +#define xsnprintf snprintf +#endif +#ifndef xstrcat +#define xstrcat(dest,src,size) strcat(dest,src) +#endif + +#endif /* defined(_WIN32) && !defined(__GNUC__) */ + + +#ifdef _WIN32 +#ifdef _MSC_VER + +#if _MSC_VER < 1300 +typedef int intptr_t; +typedef unsigned int uintptr_t; +#endif + +#if _MSC_VER < 1600 +typedef __int32 int32_t; +typedef unsigned __int32 uint32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#endif + +#endif +#endif /* _WIN32 */ + +#if SIZEOF_VOIDP == SIZEOF_LONG +typedef unsigned long hash_data_type; +#elif SIZEOF_VOIDP == SIZEOF_LONG_LONG +typedef unsigned long long hash_data_type; +#endif + +/* strend hash */ +typedef void* hash_table_type; + + +#ifdef USE_CALLOUT + +typedef struct { + int flag; + OnigCalloutOf of; + int in; + int name_id; + const UChar* tag_start; + const UChar* tag_end; + OnigCalloutType type; + OnigCalloutFunc start_func; + OnigCalloutFunc end_func; + union { + struct { + const UChar* start; + const UChar* end; + } content; + struct { + int num; + int passed_num; + OnigType types[ONIG_CALLOUT_MAX_ARGS_NUM]; + OnigValue vals[ONIG_CALLOUT_MAX_ARGS_NUM]; + } arg; + } u; +} CalloutListEntry; + +#endif + +/* stack pop level */ +enum StackPopLevel { + STACK_POP_LEVEL_FREE = 0, + STACK_POP_LEVEL_MEM_START = 1, + STACK_POP_LEVEL_ALL = 2 +}; + +/* optimize flags */ +enum OptimizeType { + OPTIMIZE_NONE = 0, + OPTIMIZE_STR, /* Slow Search */ + OPTIMIZE_STR_FAST, /* Sunday quick search / BMH */ + OPTIMIZE_STR_FAST_STEP_FORWARD, /* Sunday quick search / BMH */ + OPTIMIZE_MAP /* char map */ +}; + +/* bit status */ +typedef unsigned int MemStatusType; + +#define MEM_STATUS_BITS_NUM (sizeof(MemStatusType) * 8) +#define MEM_STATUS_CLEAR(stats) (stats) = 0 +#define MEM_STATUS_ON_ALL(stats) (stats) = ~((MemStatusType )0) +#define MEM_STATUS_AT(stats,n) \ + ((n) < (int )MEM_STATUS_BITS_NUM ? ((stats) & ((MemStatusType )1 << n)) : ((stats) & 1)) +#define MEM_STATUS_AT0(stats,n) \ + ((n) > 0 && (n) < (int )MEM_STATUS_BITS_NUM ? ((stats) & ((MemStatusType )1 << n)) : ((stats) & 1)) + +#define MEM_STATUS_IS_ALL_ON(stats) (((stats) & 1) != 0) + +#define MEM_STATUS_ON(stats,n) do {\ + if ((n) < (int )MEM_STATUS_BITS_NUM) {\ + if ((n) != 0)\ + (stats) |= ((MemStatusType )1 << (n));\ + }\ + else\ + (stats) |= 1;\ +} while (0) + +#define MEM_STATUS_ON_SIMPLE(stats,n) do {\ + if ((n) < (int )MEM_STATUS_BITS_NUM)\ + (stats) |= ((MemStatusType )1 << (n));\ +} while (0) + +#define MEM_STATUS_LIMIT_AT(stats,n) \ + ((n) < (int )MEM_STATUS_BITS_NUM ? ((stats) & ((MemStatusType )1 << n)) : 0) +#define MEM_STATUS_LIMIT_ON(stats,n) do {\ + if ((n) < (int )MEM_STATUS_BITS_NUM && (n) != 0) {\ + (stats) |= ((MemStatusType )1 << (n));\ + }\ +} while (0) + + +#define IS_CODE_WORD_ASCII(enc,code) \ + (ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_WORD(enc,code)) +#define IS_CODE_DIGIT_ASCII(enc, code) \ + (ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_DIGIT(enc,code)) +#define IS_CODE_XDIGIT_ASCII(enc, code) \ + (ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_XDIGIT(enc,code)) + +#define DIGITVAL(code) ((code) - '0') +#define ODIGITVAL(code) DIGITVAL(code) +#define XDIGITVAL(enc,code) \ + (IS_CODE_DIGIT_ASCII(enc,code) ? DIGITVAL(code) \ + : (ONIGENC_IS_CODE_UPPER(enc,code) ? (code) - 'A' + 10 : (code) - 'a' + 10)) + +#define OPTON_CALLBACK_EACH_MATCH(option) \ + ((option) & ONIG_OPTION_CALLBACK_EACH_MATCH) +#define OPTON_FIND_LONGEST(option) ((option) & ONIG_OPTION_FIND_LONGEST) +#define OPTON_FIND_NOT_EMPTY(option) ((option) & ONIG_OPTION_FIND_NOT_EMPTY) +#define OPTON_NEGATE_SINGLELINE(option) ((option) & \ + ONIG_OPTION_NEGATE_SINGLELINE) +#define OPTON_DONT_CAPTURE_GROUP(option) ((option) & \ + ONIG_OPTION_DONT_CAPTURE_GROUP) +#define OPTON_CAPTURE_GROUP(option) ((option) & ONIG_OPTION_CAPTURE_GROUP) +#define OPTON_NOTBOL(option) ((option) & ONIG_OPTION_NOTBOL) +#define OPTON_NOTEOL(option) ((option) & ONIG_OPTION_NOTEOL) +#define OPTON_POSIX_REGION(option) ((option) & ONIG_OPTION_POSIX_REGION) +#define OPTON_CHECK_VALIDITY_OF_STRING(option) ((option) & \ + ONIG_OPTION_CHECK_VALIDITY_OF_STRING) +#define OPTON_NOT_BEGIN_STRING(option) ((option) & ONIG_OPTION_NOT_BEGIN_STRING) +#define OPTON_NOT_END_STRING(option) ((option) & ONIG_OPTION_NOT_END_STRING) +#define OPTON_NOT_BEGIN_POSITION(option) ((option) & ONIG_OPTION_NOT_BEGIN_POSITION) +#define OPTON_MATCH_WHOLE_STRING(option) ((option) & ONIG_OPTION_MATCH_WHOLE_STRING) + + +#define INFINITE_REPEAT -1 +#define IS_INFINITE_REPEAT(n) ((n) == INFINITE_REPEAT) + +/* bitset */ +#define BITS_PER_BYTE 8 +#define SINGLE_BYTE_SIZE (1 << BITS_PER_BYTE) +#define BITS_IN_ROOM 32 /* 4 * BITS_PER_BYTE */ +#define BITSET_REAL_SIZE (SINGLE_BYTE_SIZE / BITS_IN_ROOM) + +typedef uint32_t Bits; +typedef Bits BitSet[BITSET_REAL_SIZE]; +typedef Bits* BitSetRef; + +#define SIZE_BITSET sizeof(BitSet) + +#define BITSET_CLEAR(bs) do {\ + int i;\ + for (i = 0; i < (int )BITSET_REAL_SIZE; i++) { (bs)[i] = 0; } \ +} while (0) + +#define BS_ROOM(bs,pos) (bs)[(unsigned int )(pos) >> 5] +#define BS_BIT(pos) (1u << ((unsigned int )(pos) & 0x1f)) + +#define BITSET_AT(bs, pos) (BS_ROOM(bs,pos) & BS_BIT(pos)) +#define BITSET_SET_BIT(bs, pos) BS_ROOM(bs,pos) |= BS_BIT(pos) +#define BITSET_CLEAR_BIT(bs, pos) BS_ROOM(bs,pos) &= ~(BS_BIT(pos)) +#define BITSET_INVERT_BIT(bs, pos) BS_ROOM(bs,pos) ^= BS_BIT(pos) + +/* has body */ +#define ANCR_PREC_READ (1<<0) +#define ANCR_PREC_READ_NOT (1<<1) +#define ANCR_LOOK_BEHIND (1<<2) +#define ANCR_LOOK_BEHIND_NOT (1<<3) +/* no body */ +#define ANCR_BEGIN_BUF (1<<4) +#define ANCR_BEGIN_LINE (1<<5) +#define ANCR_BEGIN_POSITION (1<<6) +#define ANCR_END_BUF (1<<7) +#define ANCR_SEMI_END_BUF (1<<8) +#define ANCR_END_LINE (1<<9) +#define ANCR_WORD_BOUNDARY (1<<10) +#define ANCR_NO_WORD_BOUNDARY (1<<11) +#define ANCR_WORD_BEGIN (1<<12) +#define ANCR_WORD_END (1<<13) +#define ANCR_ANYCHAR_INF (1<<14) +#define ANCR_ANYCHAR_INF_ML (1<<15) +#define ANCR_TEXT_SEGMENT_BOUNDARY (1<<16) +#define ANCR_NO_TEXT_SEGMENT_BOUNDARY (1<<17) + + +#define ANCHOR_HAS_BODY(a) ((a)->type < ANCR_BEGIN_BUF) + +#define IS_WORD_ANCHOR_TYPE(type) \ + ((type) == ANCR_WORD_BOUNDARY || (type) == ANCR_NO_WORD_BOUNDARY || \ + (type) == ANCR_WORD_BEGIN || (type) == ANCR_WORD_END) + +/* operation code */ +enum OpCode { + OP_FINISH = 0, /* matching process terminator (no more alternative) */ + OP_END, /* pattern code terminator (success end) */ + OP_STR_1, /* single byte, N = 1 */ + OP_STR_2, /* single byte, N = 2 */ + OP_STR_3, /* single byte, N = 3 */ + OP_STR_4, /* single byte, N = 4 */ + OP_STR_5, /* single byte, N = 5 */ + OP_STR_N, /* single byte */ + OP_STR_MB2N1, /* mb-length = 2 N = 1 */ + OP_STR_MB2N2, /* mb-length = 2 N = 2 */ + OP_STR_MB2N3, /* mb-length = 2 N = 3 */ + OP_STR_MB2N, /* mb-length = 2 */ + OP_STR_MB3N, /* mb-length = 3 */ + OP_STR_MBN, /* other length */ + OP_CCLASS, + OP_CCLASS_MB, + OP_CCLASS_MIX, + OP_CCLASS_NOT, + OP_CCLASS_MB_NOT, + OP_CCLASS_MIX_NOT, + OP_ANYCHAR, /* "." */ + OP_ANYCHAR_ML, /* "." multi-line */ + OP_ANYCHAR_STAR, /* ".*" */ + OP_ANYCHAR_ML_STAR, /* ".*" multi-line */ + OP_ANYCHAR_STAR_PEEK_NEXT, + OP_ANYCHAR_ML_STAR_PEEK_NEXT, + OP_WORD, + OP_WORD_ASCII, + OP_NO_WORD, + OP_NO_WORD_ASCII, + OP_WORD_BOUNDARY, + OP_NO_WORD_BOUNDARY, + OP_WORD_BEGIN, + OP_WORD_END, + OP_TEXT_SEGMENT_BOUNDARY, + OP_BEGIN_BUF, + OP_END_BUF, + OP_BEGIN_LINE, + OP_END_LINE, + OP_SEMI_END_BUF, + OP_CHECK_POSITION, + OP_BACKREF1, + OP_BACKREF2, + OP_BACKREF_N, + OP_BACKREF_N_IC, + OP_BACKREF_MULTI, + OP_BACKREF_MULTI_IC, +#ifdef USE_BACKREF_WITH_LEVEL + OP_BACKREF_WITH_LEVEL, /* \k, \k */ + OP_BACKREF_WITH_LEVEL_IC, /* \k, \k */ +#endif + OP_BACKREF_CHECK, /* (?(n)), (?('name')) */ +#ifdef USE_BACKREF_WITH_LEVEL + OP_BACKREF_CHECK_WITH_LEVEL, /* (?(n-level)), (?('name-level')) */ +#endif + OP_MEM_START, + OP_MEM_START_PUSH, /* push back-tracker to stack */ + OP_MEM_END_PUSH, /* push back-tracker to stack */ +#ifdef USE_CALL + OP_MEM_END_PUSH_REC, /* push back-tracker to stack */ +#endif + OP_MEM_END, +#ifdef USE_CALL + OP_MEM_END_REC, /* push marker to stack */ +#endif + OP_FAIL, /* pop stack and move */ + OP_JUMP, + OP_PUSH, + OP_PUSH_SUPER, + OP_POP, + OP_POP_TO_MARK, +#ifdef USE_OP_PUSH_OR_JUMP_EXACT + OP_PUSH_OR_JUMP_EXACT1, /* if match exact then push, else jump. */ +#endif + OP_PUSH_IF_PEEK_NEXT, /* if match exact then push, else none. */ + OP_REPEAT, /* {n,m} */ + OP_REPEAT_NG, /* {n,m}? (non greedy) */ + OP_REPEAT_INC, + OP_REPEAT_INC_NG, /* non greedy */ + OP_EMPTY_CHECK_START, /* null loop checker start */ + OP_EMPTY_CHECK_END, /* null loop checker end */ + OP_EMPTY_CHECK_END_MEMST, /* null loop checker end (with capture status) */ +#ifdef USE_CALL + OP_EMPTY_CHECK_END_MEMST_PUSH, /* with capture status and push check-end */ +#endif + OP_MOVE, + OP_STEP_BACK_START, + OP_STEP_BACK_NEXT, + OP_CUT_TO_MARK, + OP_MARK, + OP_SAVE_VAL, + OP_UPDATE_VAR, +#ifdef USE_CALL + OP_CALL, /* \g */ + OP_RETURN, +#endif +#ifdef USE_CALLOUT + OP_CALLOUT_CONTENTS, /* (?{...}) (?{{...}}) */ + OP_CALLOUT_NAME, /* (*name) (*name[tag](args...)) */ +#endif +}; + +enum SaveType { + SAVE_KEEP = 0, /* SAVE S */ + SAVE_S = 1, + SAVE_RIGHT_RANGE = 2, +}; + +enum UpdateVarType { + UPDATE_VAR_KEEP_FROM_STACK_LAST = 0, + UPDATE_VAR_S_FROM_STACK = 1, + UPDATE_VAR_RIGHT_RANGE_FROM_STACK = 2, + UPDATE_VAR_RIGHT_RANGE_FROM_S_STACK = 3, + UPDATE_VAR_RIGHT_RANGE_TO_S = 4, + UPDATE_VAR_RIGHT_RANGE_INIT = 5, +}; + +enum CheckPositionType { + CHECK_POSITION_SEARCH_START = 0, + CHECK_POSITION_CURRENT_RIGHT_RANGE = 1, +}; + +enum TextSegmentBoundaryType { + EXTENDED_GRAPHEME_CLUSTER_BOUNDARY = 0, + WORD_BOUNDARY = 1, +}; + +typedef int RelAddrType; +typedef int AbsAddrType; +typedef int LengthType; +typedef int RelPositionType; +typedef int RepeatNumType; +typedef int MemNumType; +typedef void* PointerType; +typedef int SaveType; +typedef int UpdateVarType; +typedef int ModeType; + +#define SIZE_OPCODE 1 +#define SIZE_RELADDR sizeof(RelAddrType) +#define SIZE_ABSADDR sizeof(AbsAddrType) +#define SIZE_LENGTH sizeof(LengthType) +#define SIZE_MEMNUM sizeof(MemNumType) +#define SIZE_REPEATNUM sizeof(RepeatNumType) +#define SIZE_OPTION sizeof(OnigOptionType) +#define SIZE_CODE_POINT sizeof(OnigCodePoint) +#define SIZE_POINTER sizeof(PointerType) +#define SIZE_SAVE_TYPE sizeof(SaveType) +#define SIZE_UPDATE_VAR_TYPE sizeof(UpdateVarType) +#define SIZE_MODE sizeof(ModeType) + +/* code point's address must be aligned address. */ +#define GET_CODE_POINT(code,p) code = *((OnigCodePoint* )(p)) + + +/* op-code + arg size */ + +/* for relative address increment to go next op. */ +#define SIZE_INC 1 + +#define OPSIZE_ANYCHAR_STAR 1 +#define OPSIZE_ANYCHAR_STAR_PEEK_NEXT 1 +#define OPSIZE_JUMP 1 +#define OPSIZE_PUSH 1 +#define OPSIZE_PUSH_SUPER 1 +#define OPSIZE_POP 1 +#define OPSIZE_POP_TO_MARK 1 +#ifdef USE_OP_PUSH_OR_JUMP_EXACT +#define OPSIZE_PUSH_OR_JUMP_EXACT1 1 +#endif +#define OPSIZE_PUSH_IF_PEEK_NEXT 1 +#define OPSIZE_REPEAT 1 +#define OPSIZE_REPEAT_INC 1 +#define OPSIZE_REPEAT_INC_NG 1 +#define OPSIZE_WORD_BOUNDARY 1 +#define OPSIZE_BACKREF 1 +#define OPSIZE_FAIL 1 +#define OPSIZE_MEM_START 1 +#define OPSIZE_MEM_START_PUSH 1 +#define OPSIZE_MEM_END_PUSH 1 +#define OPSIZE_MEM_END_PUSH_REC 1 +#define OPSIZE_MEM_END 1 +#define OPSIZE_MEM_END_REC 1 +#define OPSIZE_EMPTY_CHECK_START 1 +#define OPSIZE_EMPTY_CHECK_END 1 +#define OPSIZE_CHECK_POSITION 1 +#define OPSIZE_CALL 1 +#define OPSIZE_RETURN 1 +#define OPSIZE_MOVE 1 +#define OPSIZE_STEP_BACK_START 1 +#define OPSIZE_STEP_BACK_NEXT 1 +#define OPSIZE_CUT_TO_MARK 1 +#define OPSIZE_MARK 1 +#define OPSIZE_SAVE_VAL 1 +#define OPSIZE_UPDATE_VAR 1 + +#ifdef USE_CALLOUT +#define OPSIZE_CALLOUT_CONTENTS 1 +#define OPSIZE_CALLOUT_NAME 1 +#endif + + +#define MC_ESC(syn) (syn)->meta_char_table.esc +#define MC_ANYCHAR(syn) (syn)->meta_char_table.anychar +#define MC_ANYTIME(syn) (syn)->meta_char_table.anytime +#define MC_ZERO_OR_ONE_TIME(syn) (syn)->meta_char_table.zero_or_one_time +#define MC_ONE_OR_MORE_TIME(syn) (syn)->meta_char_table.one_or_more_time +#define MC_ANYCHAR_ANYTIME(syn) (syn)->meta_char_table.anychar_anytime + +#define IS_MC_ESC_CODE(code, syn) \ + ((code) == MC_ESC(syn) && \ + !IS_SYNTAX_OP2((syn), ONIG_SYN_OP2_INEFFECTIVE_ESCAPE)) + + +#define SYN_POSIX_COMMON_OP \ + ( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_POSIX_BRACKET | \ + ONIG_SYN_OP_DECIMAL_BACKREF | \ + ONIG_SYN_OP_BRACKET_CC | ONIG_SYN_OP_ASTERISK_ZERO_INF | \ + ONIG_SYN_OP_LINE_ANCHOR | \ + ONIG_SYN_OP_ESC_CONTROL_CHARS ) + +#define SYN_GNU_REGEX_OP \ + ( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_BRACKET_CC | \ + ONIG_SYN_OP_POSIX_BRACKET | ONIG_SYN_OP_DECIMAL_BACKREF | \ + ONIG_SYN_OP_BRACE_INTERVAL | ONIG_SYN_OP_LPAREN_SUBEXP | \ + ONIG_SYN_OP_VBAR_ALT | \ + ONIG_SYN_OP_ASTERISK_ZERO_INF | ONIG_SYN_OP_PLUS_ONE_INF | \ + ONIG_SYN_OP_QMARK_ZERO_ONE | \ + ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR | ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR | \ + ONIG_SYN_OP_ESC_W_WORD | \ + ONIG_SYN_OP_ESC_B_WORD_BOUND | ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END | \ + ONIG_SYN_OP_ESC_S_WHITE_SPACE | ONIG_SYN_OP_ESC_D_DIGIT | \ + ONIG_SYN_OP_LINE_ANCHOR ) + +#define SYN_GNU_REGEX_BV \ + ( ONIG_SYN_CONTEXT_INDEP_ANCHORS | ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS | \ + ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS | ONIG_SYN_ALLOW_INVALID_INTERVAL | \ + ONIG_SYN_BACKSLASH_ESCAPE_IN_CC | ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC ) + + +#define NCCLASS_FLAGS(cc) ((cc)->flags) +#define NCCLASS_FLAG_SET(cc,flag) (NCCLASS_FLAGS(cc) |= (flag)) +#define NCCLASS_FLAG_CLEAR(cc,flag) (NCCLASS_FLAGS(cc) &= ~(flag)) +#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0) + +/* cclass node */ +#define FLAG_NCCLASS_NOT (1<<0) +#define FLAG_NCCLASS_SHARE (1<<1) + +#define NCCLASS_SET_NOT(nd) NCCLASS_FLAG_SET(nd, FLAG_NCCLASS_NOT) +#define NCCLASS_CLEAR_NOT(nd) NCCLASS_FLAG_CLEAR(nd, FLAG_NCCLASS_NOT) +#define IS_NCCLASS_NOT(nd) IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT) + + +typedef struct { +#ifdef USE_DIRECT_THREADED_CODE + const void* opaddr; +#else + enum OpCode opcode; +#endif + union { + struct { + UChar s[16]; /* Now used first 7 bytes only. */ + } exact; + struct { + UChar* s; + LengthType n; /* number of chars */ + } exact_n; /* EXACTN, EXACTN_IC, EXACTMB2N, EXACTMB3N */ + struct { + UChar* s; + LengthType n; /* number of chars */ + LengthType len; /* char byte length */ + } exact_len_n; /* EXACTMBN */ + struct { + BitSetRef bsp; + } cclass; + struct { + void* mb; + } cclass_mb; + struct { + void* mb; /* mb must be same position with cclass_mb for match_at(). */ + BitSetRef bsp; + } cclass_mix; + struct { + UChar c; + } anychar_star_peek_next; + struct { + ModeType mode; + } word_boundary; /* OP_WORD_BOUNDARY, OP_NO_WORD_BOUNDARY, OP_WORD_BEGIN, OP_WORD_END */ + struct { + enum TextSegmentBoundaryType type; + int not; + } text_segment_boundary; + struct { + enum CheckPositionType type; + } check_position; + struct { + union { + MemNumType n1; /* num == 1 */ + MemNumType* ns; /* num > 1 */ + }; + int num; + int nest_level; + } backref_general; /* BACKREF_MULTI, BACKREF_MULTI_IC, BACKREF_WITH_LEVEL, BACKREF_CHECK, BACKREF_CHECK_WITH_LEVEL, */ + struct { + MemNumType n1; + } backref_n; /* BACKREF_N, BACKREF_N_IC */ + struct { + MemNumType num; + } memory_start; /* MEMORY_START, MEMORY_START_PUSH */ + struct { + MemNumType num; + } memory_end; /* MEMORY_END, MEMORY_END_REC, MEMORY_END_PUSH, MEMORY_END_PUSH_REC */ + struct { + RelAddrType addr; + } jump; + struct { + RelAddrType addr; + } push; + struct { + RelAddrType addr; + UChar c; + } push_or_jump_exact1; + struct { + RelAddrType addr; + UChar c; + } push_if_peek_next; + struct { + MemNumType id; + } pop_to_mark; + struct { + MemNumType id; + RelAddrType addr; + } repeat; /* REPEAT, REPEAT_NG */ + struct { + MemNumType id; + } repeat_inc; /* REPEAT_INC, REPEAT_INC_NG */ + struct { + MemNumType mem; + } empty_check_start; + struct { + MemNumType mem; + MemStatusType empty_status_mem; + } empty_check_end; /* EMPTY_CHECK_END, EMPTY_CHECK_END_MEMST, EMPTY_CHECK_END_MEMST_PUSH */ + struct { + RelAddrType addr; + } prec_read_not_start; + struct { + LengthType len; + } look_behind; + struct { + LengthType len; + RelAddrType addr; + } look_behind_not_start; + struct { + RelPositionType n; /* char relative position */ + } move; + struct { + LengthType initial; /* char length */ + LengthType remaining; /* char length */ + RelAddrType addr; + } step_back_start; + struct { + MemNumType id; + int restore_pos; /* flag: restore current string position */ + } cut_to_mark; + struct { + MemNumType id; + int save_pos; /* flag: save current string position */ + } mark; + struct { + SaveType type; + MemNumType id; + } save_val; + struct { + UpdateVarType type; + MemNumType id; + int clear; /* UPDATE_VAR_RIGHT_RANGE_FROM_S_STACK or UPDATE_VAR_RIGHT_RANGE_FROM_STACK */ + } update_var; + struct { + AbsAddrType addr; +#if defined(ONIG_DEBUG_MATCH_COUNTER) || defined(ONIG_DEBUG_CALL) + MemNumType called_mem; +#endif + } call; +#ifdef USE_CALLOUT + struct { + MemNumType num; + } callout_contents; + struct { + MemNumType num; + MemNumType id; + } callout_name; +#endif + }; +} Operation; + +typedef struct { + const UChar* pattern; + const UChar* pattern_end; +#ifdef USE_CALLOUT + void* tag_table; + int callout_num; + int callout_list_alloc; + CalloutListEntry* callout_list; /* index: callout num */ +#endif +} RegexExt; + +typedef struct { + int lower; + int upper; + union { + Operation* pcode; /* address of repeated body */ + int offset; + } u; +} RepeatRange; + +struct re_pattern_buffer { + /* common members of BBuf(bytes-buffer) */ + Operation* ops; +#ifdef USE_DIRECT_THREADED_CODE + enum OpCode* ocs; +#endif + Operation* ops_curr; + unsigned int ops_used; /* used space for ops */ + unsigned int ops_alloc; /* allocated space for ops */ + unsigned char* string_pool; + unsigned char* string_pool_end; + + int num_mem; /* used memory(...) num counted from 1 */ + int num_repeat; /* OP_REPEAT/OP_REPEAT_NG id-counter */ + int num_empty_check; /* OP_EMPTY_CHECK_START/END id counter */ + int num_call; /* number of subexp call */ + MemStatusType capture_history; /* (?@...) flag (1-31) */ + MemStatusType push_mem_start; /* need backtrack flag */ + MemStatusType push_mem_end; /* need backtrack flag */ + int stack_pop_level; + int repeat_range_alloc; + RepeatRange* repeat_range; + + OnigEncoding enc; + OnigOptionType options; + OnigSyntaxType* syntax; + OnigCaseFoldType case_fold_flag; + void* name_table; + + /* optimization info (string search, char-map and anchors) */ + int optimize; /* optimize flag */ + int threshold_len; /* search str-length for apply optimize */ + int anchor; /* BEGIN_BUF, BEGIN_POS, (SEMI_)END_BUF */ + OnigLen anc_dist_min; /* (SEMI_)END_BUF anchor distance */ + OnigLen anc_dist_max; /* (SEMI_)END_BUF anchor distance */ + int sub_anchor; /* start-anchor for exact or map */ + unsigned char *exact; + unsigned char *exact_end; + unsigned char map[CHAR_MAP_SIZE]; /* used as BMH skip or char-map */ + int map_offset; + OnigLen dist_min; /* min-distance of exact or map */ + OnigLen dist_max; /* max-distance of exact or map */ + RegexExt* extp; +}; + +#define COP(reg) ((reg)->ops_curr) +#define COP_CURR_OFFSET(reg) ((reg)->ops_used - 1) +#define COP_CURR_OFFSET_BYTES(reg, p) \ + ((int )((char* )(&((reg)->ops_curr->p)) - (char* )((reg)->ops))) + + +extern void onig_add_end_call(void (*func)(void)); +extern void onig_warning(const char* s); +extern UChar* onig_error_code_to_format P_((int code)); +extern void ONIG_VARIADIC_FUNC_ATTR ONIG_PRINTFLIKE(6, 7) onig_snprintf_with_pattern PV_((UChar buf[], int bufsize, OnigEncoding enc, UChar* pat, UChar* pat_end, const char *fmt, ...)); +extern int onig_compile P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigErrorInfo* einfo)); +extern int onig_is_code_in_cc_len P_((int enclen, OnigCodePoint code, void* /* CClassNode* */ cc)); +extern RegexExt* onig_get_regex_ext(regex_t* reg); +extern int onig_ext_set_pattern(regex_t* reg, const UChar* pattern, const UChar* pattern_end); +extern int onig_positive_int_multiply(int x, int y); +extern hash_table_type onig_st_init_strend_table_with_size P_((int size)); +extern int onig_st_lookup_strend P_((hash_table_type table, const UChar* str_key, const UChar* end_key, hash_data_type *value)); +extern int onig_st_insert_strend P_((hash_table_type table, const UChar* str_key, const UChar* end_key, hash_data_type value)); + +#ifdef ONIG_DEBUG + +#ifdef ONIG_DEBUG_COMPILE +extern void onig_print_compiled_byte_code_list(FILE* f, regex_t* reg); +#endif + +#ifdef ONIG_DEBUG_STATISTICS +extern void onig_statistics_init P_((void)); +extern int onig_print_statistics P_((FILE* f)); +#endif + +#endif /* ONIG_DEBUG */ + +#ifdef USE_CALLOUT + +extern OnigCalloutType onig_get_callout_type_by_name_id(int name_id); +extern OnigCalloutFunc onig_get_callout_start_func_by_name_id(int id); +extern OnigCalloutFunc onig_get_callout_end_func_by_name_id(int id); +extern int onig_callout_tag_table_free(void* table); +extern void onig_free_reg_callout_list(int n, CalloutListEntry* list); +extern CalloutListEntry* onig_reg_callout_list_at(regex_t* reg, int num); +extern OnigCalloutFunc onig_get_callout_start_func(regex_t* reg, int callout_num); + +/* for definition of builtin callout */ +#define BC0_P(name, func) do {\ + int len = onigenc_str_bytelen_null(enc, (UChar* )name);\ + id = onig_set_callout_of_name(enc, ONIG_CALLOUT_TYPE_SINGLE,\ + (UChar* )(name), (UChar* )((name) + len),\ + ONIG_CALLOUT_IN_PROGRESS,\ + onig_builtin_ ## func, 0, 0, 0, 0, 0);\ + if (id < 0) return id;\ +} while(0) + +#define BC0_R(name, func) do {\ + int len = onigenc_str_bytelen_null(enc, (UChar* )name);\ + id = onig_set_callout_of_name(enc, ONIG_CALLOUT_TYPE_SINGLE,\ + (UChar* )(name), (UChar* )((name) + len),\ + ONIG_CALLOUT_IN_RETRACTION,\ + onig_builtin_ ## func, 0, 0, 0, 0, 0);\ + if (id < 0) return id;\ +} while(0) + +#define BC0_B(name, func) do {\ + int len = onigenc_str_bytelen_null(enc, (UChar* )name);\ + id = onig_set_callout_of_name(enc, ONIG_CALLOUT_TYPE_SINGLE,\ + (UChar* )(name), (UChar* )((name) + len),\ + ONIG_CALLOUT_IN_BOTH,\ + onig_builtin_ ## func, 0, 0, 0, 0, 0);\ + if (id < 0) return id;\ +} while(0) + +#define BC_P(name, func, na, ts) do {\ + int len = onigenc_str_bytelen_null(enc, (UChar* )name);\ + id = onig_set_callout_of_name(enc, ONIG_CALLOUT_TYPE_SINGLE,\ + (UChar* )(name), (UChar* )((name) + len),\ + ONIG_CALLOUT_IN_PROGRESS,\ + onig_builtin_ ## func, 0, (na), (ts), 0, 0); \ + if (id < 0) return id;\ +} while(0) + +#define BC_P_O(name, func, nts, ts, nopts, opts) do {\ + int len = onigenc_str_bytelen_null(enc, (UChar* )name);\ + id = onig_set_callout_of_name(enc, ONIG_CALLOUT_TYPE_SINGLE,\ + (UChar* )(name), (UChar* )((name) + len),\ + ONIG_CALLOUT_IN_PROGRESS,\ + onig_builtin_ ## func, 0, (nts), (ts), (nopts), (opts));\ + if (id < 0) return id;\ +} while(0) + +#define BC_B(name, func, na, ts) do {\ + int len = onigenc_str_bytelen_null(enc, (UChar* )name);\ + id = onig_set_callout_of_name(enc, ONIG_CALLOUT_TYPE_SINGLE,\ + (UChar* )(name), (UChar* )((name) + len),\ + ONIG_CALLOUT_IN_BOTH,\ + onig_builtin_ ## func, 0, (na), (ts), 0, 0);\ + if (id < 0) return id;\ +} while(0) + +#define BC_B_O(name, func, nts, ts, nopts, opts) do {\ + int len = onigenc_str_bytelen_null(enc, (UChar* )name);\ + id = onig_set_callout_of_name(enc, ONIG_CALLOUT_TYPE_SINGLE,\ + (UChar* )(name), (UChar* )((name) + len),\ + ONIG_CALLOUT_IN_BOTH,\ + onig_builtin_ ## func, 0, (nts), (ts), (nopts), (opts));\ + if (id < 0) return id;\ +} while(0) + +#endif /* USE_CALLOUT */ + + +typedef int (*ONIGENC_INIT_PROPERTY_LIST_FUNC_TYPE)(void); + +#endif /* REGINT_H */ diff --git a/internal/components/third_party/oniguruma/src/regparse.c b/internal/components/third_party/oniguruma/src/regparse.c new file mode 100644 index 0000000000..1d00b82af6 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/regparse.c @@ -0,0 +1,9455 @@ +/********************************************************************** + regparse.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifdef DEBUG_ND_FREE +#ifndef NEED_TO_INCLUDE_STDIO +#define NEED_TO_INCLUDE_STDIO +#endif +#endif + +#include "regparse.h" +#include "st.h" + +#define INIT_TAG_NAMES_ALLOC_NUM 5 + +#define WARN_BUFSIZE 256 + +#define CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS + +#define IS_ALLOWED_CODE_IN_CALLOUT_NAME(c) \ + ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '_' /* || c == '!' */) +#define IS_ALLOWED_CODE_IN_CALLOUT_TAG_NAME(c) \ + ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '_') + +#define OPTON_SINGLELINE(option) ((option) & ONIG_OPTION_SINGLELINE) +#define OPTON_MULTILINE(option) ((option) & ONIG_OPTION_MULTILINE) +#define OPTON_IGNORECASE(option) ((option) & ONIG_OPTION_IGNORECASE) +#define OPTON_EXTEND(option) ((option) & ONIG_OPTION_EXTEND) +#define OPTON_WORD_ASCII(option) \ + ((option) & (ONIG_OPTION_WORD_IS_ASCII | ONIG_OPTION_POSIX_IS_ASCII)) +#define OPTON_DIGIT_ASCII(option) \ + ((option) & (ONIG_OPTION_DIGIT_IS_ASCII | ONIG_OPTION_POSIX_IS_ASCII)) +#define OPTON_SPACE_ASCII(option) \ + ((option) & (ONIG_OPTION_SPACE_IS_ASCII | ONIG_OPTION_POSIX_IS_ASCII)) +#define OPTON_POSIX_ASCII(option) ((option) & ONIG_OPTION_POSIX_IS_ASCII) +#define OPTON_TEXT_SEGMENT_WORD(option) ((option) & ONIG_OPTION_TEXT_SEGMENT_WORD) + +#define OPTON_IS_ASCII_MODE_CTYPE(ctype, options) \ + ((ctype) >= 0 && \ + (((ctype) < ONIGENC_CTYPE_ASCII && OPTON_POSIX_ASCII(options)) ||\ + ((ctype) == ONIGENC_CTYPE_WORD && OPTON_WORD_ASCII(options)) ||\ + ((ctype) == ONIGENC_CTYPE_DIGIT && OPTON_DIGIT_ASCII(options)) ||\ + ((ctype) == ONIGENC_CTYPE_SPACE && OPTON_SPACE_ASCII(options)))) + + +OnigSyntaxType OnigSyntaxOniguruma = { + (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY | + ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 | + ONIG_SYN_OP_ESC_X_BRACE_HEX8 | ONIG_SYN_OP_ESC_O_BRACE_OCTAL | + ONIG_SYN_OP_ESC_CONTROL_CHARS | + ONIG_SYN_OP_ESC_C_CONTROL ) + & ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END ) + , ( ONIG_SYN_OP2_QMARK_GROUP_EFFECT | + ONIG_SYN_OP2_OPTION_ONIGURUMA | + ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP | ONIG_SYN_OP2_ESC_K_NAMED_BACKREF | + ONIG_SYN_OP2_QMARK_LPAREN_IF_ELSE | + ONIG_SYN_OP2_QMARK_TILDE_ABSENT_GROUP | + ONIG_SYN_OP2_QMARK_BRACE_CALLOUT_CONTENTS | + ONIG_SYN_OP2_ASTERISK_CALLOUT_NAME | + ONIG_SYN_OP2_ESC_X_Y_TEXT_SEGMENT | + ONIG_SYN_OP2_ESC_CAPITAL_R_GENERAL_NEWLINE | + ONIG_SYN_OP2_ESC_CAPITAL_N_O_SUPER_DOT | + ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP | + ONIG_SYN_OP2_ESC_G_SUBEXP_CALL | + ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY | + ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT | + ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT | + ONIG_SYN_OP2_CCLASS_SET_OP | ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL | + ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META | ONIG_SYN_OP2_ESC_V_VTAB | + ONIG_SYN_OP2_ESC_H_XDIGIT | ONIG_SYN_OP2_ESC_U_HEX4 ) + , ( SYN_GNU_REGEX_BV | + ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV | + ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND | + ONIG_SYN_VARIABLE_LEN_LOOK_BEHIND | + ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP | + ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME | + ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY | + ONIG_SYN_ALLOW_INVALID_CODE_END_OF_RANGE_IN_CC | + ONIG_SYN_WARN_CC_OP_NOT_ESCAPED | +#ifdef USE_WHOLE_OPTIONS + ONIG_SYN_WHOLE_OPTIONS | +#endif + ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT + ) + , ONIG_OPTION_NONE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +OnigSyntaxType OnigSyntaxRuby = { + (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY | + ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 | + ONIG_SYN_OP_ESC_X_BRACE_HEX8 | ONIG_SYN_OP_ESC_O_BRACE_OCTAL | + ONIG_SYN_OP_ESC_CONTROL_CHARS | + ONIG_SYN_OP_ESC_C_CONTROL ) + & ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END ) + , ( ONIG_SYN_OP2_QMARK_GROUP_EFFECT | + ONIG_SYN_OP2_OPTION_RUBY | + ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP | ONIG_SYN_OP2_ESC_K_NAMED_BACKREF | + ONIG_SYN_OP2_QMARK_LPAREN_IF_ELSE | + ONIG_SYN_OP2_QMARK_TILDE_ABSENT_GROUP | + ONIG_SYN_OP2_ESC_X_Y_TEXT_SEGMENT | + ONIG_SYN_OP2_ESC_CAPITAL_R_GENERAL_NEWLINE | + ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP | + ONIG_SYN_OP2_ESC_G_SUBEXP_CALL | + ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY | + ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT | + ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT | + ONIG_SYN_OP2_CCLASS_SET_OP | ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL | + ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META | ONIG_SYN_OP2_ESC_V_VTAB | + ONIG_SYN_OP2_ESC_H_XDIGIT | ONIG_SYN_OP2_ESC_U_HEX4 ) + , ( SYN_GNU_REGEX_BV | + ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV | + ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND | + ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP | + ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME | + ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY | + ONIG_SYN_WARN_CC_OP_NOT_ESCAPED | + ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT ) + , ONIG_OPTION_NONE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +OnigSyntaxType* OnigDefaultSyntax = ONIG_SYNTAX_ONIGURUMA; + + +#define BB_INIT(buf,size) bbuf_init((BBuf* )(buf), (size)) + +#define BB_EXPAND(buf,low) do{\ + do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\ + (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\ + if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\ +} while (0) + +#define BB_ENSURE_SIZE(buf,size) do{\ + unsigned int new_alloc = (buf)->alloc;\ + while (new_alloc < (unsigned int )(size)) { new_alloc *= 2; }\ + if ((buf)->alloc != new_alloc) {\ + (buf)->p = (UChar* )xrealloc((buf)->p, new_alloc);\ + if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\ + (buf)->alloc = new_alloc;\ + }\ +} while (0) + +#define BB_WRITE(buf,pos,bytes,n) do{\ + int used = (pos) + (n);\ + if ((buf)->alloc < (unsigned int )used) BB_EXPAND((buf),used);\ + xmemcpy((buf)->p + (pos), (bytes), (n));\ + if ((buf)->used < (unsigned int )used) (buf)->used = used;\ +} while (0) + +#define BB_WRITE1(buf,pos,byte) do{\ + int used = (pos) + 1;\ + if ((buf)->alloc < (unsigned int )used) BB_EXPAND((buf),used);\ + (buf)->p[(pos)] = (byte);\ + if ((buf)->used < (unsigned int )used) (buf)->used = used;\ +} while (0) + +#define BB_ADD(buf,bytes,n) BB_WRITE((buf),(buf)->used,(bytes),(n)) +#define BB_ADD1(buf,byte) BB_WRITE1((buf),(buf)->used,(byte)) +#define BB_GET_ADD_ADDRESS(buf) ((buf)->p + (buf)->used) +#define BB_GET_OFFSET_POS(buf) ((buf)->used) + +/* from < to */ +#define BB_MOVE_RIGHT(buf,from,to,n) do {\ + if ((unsigned int )((to)+(n)) > (buf)->alloc) BB_EXPAND((buf),(to) + (n));\ + xmemmove((buf)->p + (to), (buf)->p + (from), (n));\ + if ((unsigned int )((to)+(n)) > (buf)->used) (buf)->used = (to) + (n);\ +} while (0) + +/* from > to */ +#define BB_MOVE_LEFT(buf,from,to,n) do {\ + xmemmove((buf)->p + (to), (buf)->p + (from), (n));\ +} while (0) + +/* from > to */ +#define BB_MOVE_LEFT_REDUCE(buf,from,to) do {\ + xmemmove((buf)->p + (to), (buf)->p + (from), (buf)->used - (from));\ + (buf)->used -= (from - to);\ +} while (0) + +#define BB_INSERT(buf,pos,bytes,n) do {\ + if (pos >= (buf)->used) {\ + BB_WRITE(buf,pos,bytes,n);\ + }\ + else {\ + BB_MOVE_RIGHT((buf),(pos),(pos) + (n),((buf)->used - (pos)));\ + xmemcpy((buf)->p + (pos), (bytes), (n));\ + }\ +} while (0) + +#define BB_GET_BYTE(buf, pos) (buf)->p[(pos)] + + +typedef enum { + CS_VALUE, + CS_RANGE, + CS_COMPLETE, + CS_START +} CSTATE; + +typedef enum { + CV_UNDEF, + CV_SB, + CV_MB, + CV_CPROP +} CVAL; + +extern void onig_null_warn(const char* s ARG_UNUSED) { } + +#ifdef DEFAULT_WARN_FUNCTION +static OnigWarnFunc onig_warn = (OnigWarnFunc )DEFAULT_WARN_FUNCTION; +#else +static OnigWarnFunc onig_warn = onig_null_warn; +#endif + +#ifdef DEFAULT_VERB_WARN_FUNCTION +static OnigWarnFunc onig_verb_warn = (OnigWarnFunc )DEFAULT_VERB_WARN_FUNCTION; +#else +static OnigWarnFunc onig_verb_warn = onig_null_warn; +#endif + +extern void onig_set_warn_func(OnigWarnFunc f) +{ + onig_warn = f; +} + +extern void onig_set_verb_warn_func(OnigWarnFunc f) +{ + onig_verb_warn = f; +} + +extern void +onig_warning(const char* s) +{ + if (onig_warn == onig_null_warn) return ; + + (*onig_warn)(s); +} + +#define DEFAULT_MAX_CAPTURE_NUM 32767 + +static int MaxCaptureNum = DEFAULT_MAX_CAPTURE_NUM; + +extern int +onig_set_capture_num_limit(int num) +{ + if (num < 0) return -1; + + MaxCaptureNum = num; + return 0; +} + +static unsigned int ParseDepthLimit = DEFAULT_PARSE_DEPTH_LIMIT; + +extern unsigned int +onig_get_parse_depth_limit(void) +{ + return ParseDepthLimit; +} + +extern int +onig_set_parse_depth_limit(unsigned int depth) +{ + if (depth == 0) + ParseDepthLimit = DEFAULT_PARSE_DEPTH_LIMIT; + else + ParseDepthLimit = depth; + return 0; +} + +#ifdef ONIG_DEBUG_PARSE +#define INC_PARSE_DEPTH(d) do {\ + (d)++;\ + if (env->max_parse_depth < (d)) env->max_parse_depth = d;\ + if ((d) > ParseDepthLimit) \ + return ONIGERR_PARSE_DEPTH_LIMIT_OVER;\ +} while (0) +#else +#define INC_PARSE_DEPTH(d) do {\ + (d)++;\ + if ((d) > ParseDepthLimit) \ + return ONIGERR_PARSE_DEPTH_LIMIT_OVER;\ +} while (0) +#endif + +#define DEC_PARSE_DEPTH(d) (d)-- + + +static int +bbuf_init(BBuf* buf, int size) +{ + if (size <= 0) { + size = 0; + buf->p = NULL; + } + else { + buf->p = (UChar* )xmalloc(size); + if (IS_NULL(buf->p)) return(ONIGERR_MEMORY); + } + + buf->alloc = size; + buf->used = 0; + return 0; +} + +static void +bbuf_free(BBuf* bbuf) +{ + if (IS_NOT_NULL(bbuf)) { + if (IS_NOT_NULL(bbuf->p)) xfree(bbuf->p); + xfree(bbuf); + } +} + +static int +bbuf_clone(BBuf** rto, BBuf* from) +{ + int r; + BBuf *to; + + *rto = to = (BBuf* )xmalloc(sizeof(BBuf)); + CHECK_NULL_RETURN_MEMERR(to); + r = BB_INIT(to, from->alloc); + if (r != 0) { + bbuf_free(to); + *rto = 0; + return r; + } + to->used = from->used; + xmemcpy(to->p, from->p, from->used); + return 0; +} + +static int +backref_rel_to_abs(int rel_no, ParseEnv* env) +{ + if (rel_no > 0) { + if (rel_no > ONIG_INT_MAX - env->num_mem) + return ONIGERR_INVALID_BACKREF; + return env->num_mem + rel_no; + } + else { + return env->num_mem + 1 + rel_no; + } +} + +#define OPTION_ON(v,f) ((v) |= (f)) +#define OPTION_OFF(v,f) ((v) &= ~(f)) + +#define OPTION_NEGATE(v,f,negative) (negative) ? ((v) &= ~(f)) : ((v) |= (f)) + +#define MBCODE_START_POS(enc) \ + (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80) + +#define SET_ALL_MULTI_BYTE_RANGE(enc, pbuf) \ + add_code_range_to_buf(pbuf, MBCODE_START_POS(enc), ~((OnigCodePoint )0)) + +#define ADD_ALL_MULTI_BYTE_RANGE(enc, mbuf) do {\ + if (! ONIGENC_IS_SINGLEBYTE(enc)) {\ + r = SET_ALL_MULTI_BYTE_RANGE(enc, &(mbuf));\ + if (r != 0) return r;\ + }\ +} while (0) + + +#define BITSET_IS_EMPTY(bs,empty) do {\ + int i;\ + empty = 1;\ + for (i = 0; i < (int )BITSET_REAL_SIZE; i++) {\ + if ((bs)[i] != 0) {\ + empty = 0; break;\ + }\ + }\ +} while (0) + +static void +bitset_set_range(BitSetRef bs, int from, int to) +{ + int i; + for (i = from; i <= to && i < SINGLE_BYTE_SIZE; i++) { + BITSET_SET_BIT(bs, i); + } +} + +static void +bitset_invert(BitSetRef bs) +{ + int i; + for (i = 0; i < (int )BITSET_REAL_SIZE; i++) { bs[i] = ~(bs[i]); } +} + +static void +bitset_invert_to(BitSetRef from, BitSetRef to) +{ + int i; + for (i = 0; i < (int )BITSET_REAL_SIZE; i++) { to[i] = ~(from[i]); } +} + +static void +bitset_and(BitSetRef dest, BitSetRef bs) +{ + int i; + for (i = 0; i < (int )BITSET_REAL_SIZE; i++) { dest[i] &= bs[i]; } +} + +static void +bitset_or(BitSetRef dest, BitSetRef bs) +{ + int i; + for (i = 0; i < (int )BITSET_REAL_SIZE; i++) { dest[i] |= bs[i]; } +} + +static void +bitset_copy(BitSetRef dest, BitSetRef bs) +{ + int i; + for (i = 0; i < (int )BITSET_REAL_SIZE; i++) { dest[i] = bs[i]; } +} + +extern int +onig_strncmp(const UChar* s1, const UChar* s2, int n) +{ + int x; + + while (n-- > 0) { + x = *s2++ - *s1++; + if (x) return x; + } + return 0; +} + +extern void +onig_strcpy(UChar* dest, const UChar* src, const UChar* end) +{ + int len = (int )(end - src); + if (len > 0) { + xmemcpy(dest, src, len); + dest[len] = (UChar )0; + } +} + +/* scan pattern methods */ +#define PEND_VALUE 0 + +#define PFETCH_READY UChar* pfetch_prev +#define PEND (p < end ? 0 : 1) +#define PUNFETCH p = pfetch_prev +#define PPREV pfetch_prev +#define PINC do { \ + pfetch_prev = p; \ + p += ONIGENC_MBC_ENC_LEN(enc, p); \ +} while (0) +#define PFETCH(c) do { \ + c = ONIGENC_MBC_TO_CODE(enc, p, end); \ + pfetch_prev = p; \ + p += ONIGENC_MBC_ENC_LEN(enc, p); \ +} while (0) + +#define PINC_S do { \ + p += ONIGENC_MBC_ENC_LEN(enc, p); \ +} while (0) +#define PFETCH_S(c) do { \ + c = ONIGENC_MBC_TO_CODE(enc, p, end); \ + p += ONIGENC_MBC_ENC_LEN(enc, p); \ +} while (0) + +#define PPEEK (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE) +#define PPEEK_IS(c) (PPEEK == (OnigCodePoint )c) + +static UChar* +strcat_capa(UChar* dest, UChar* dest_end, const UChar* src, const UChar* src_end, + int capa) +{ + UChar* r; + ptrdiff_t dest_delta = dest_end - dest; + + if (dest) + r = (UChar* )xrealloc(dest, capa + 1); + else + r = (UChar* )xmalloc(capa + 1); + + CHECK_NULL_RETURN(r); + onig_strcpy(r + dest_delta, src, src_end); + return r; +} + +/* dest on static area */ +static UChar* +strcat_capa_from_static(UChar* dest, UChar* dest_end, + const UChar* src, const UChar* src_end, int capa) +{ + UChar* r; + + r = (UChar* )xmalloc(capa + 1); + CHECK_NULL_RETURN(r); + onig_strcpy(r, dest, dest_end); + onig_strcpy(r + (dest_end - dest), src, src_end); + return r; +} + + +#ifdef USE_ST_LIBRARY + +typedef struct { + UChar* s; + UChar* end; +} st_str_end_key; + +static int +str_end_cmp(st_data_t ax, st_data_t ay) +{ + st_str_end_key* x = (st_str_end_key* )ax; + st_str_end_key* y = (st_str_end_key* )ay; + UChar *p, *q; + int c; + + if ((x->end - x->s) != (y->end - y->s)) + return 1; + + p = x->s; + q = y->s; + while (p < x->end) { + c = (int )*p - (int )*q; + if (c != 0) return c; + + p++; q++; + } + + return 0; +} + +static int +str_end_hash(st_data_t ax) +{ + st_str_end_key* x = (st_str_end_key* )ax; + UChar *p; + unsigned val = 0; + + p = x->s; + while (p < x->end) { + val = val * 997 + (unsigned )*p++; + } + + return (int) (val + (val >> 5)); +} + +extern hash_table_type +onig_st_init_strend_table_with_size(int size) +{ + static struct st_hash_type hashType = { + str_end_cmp, + str_end_hash, + }; + + return (hash_table_type )onig_st_init_table_with_size(&hashType, size); +} + +extern int +onig_st_lookup_strend(hash_table_type table, const UChar* str_key, + const UChar* end_key, hash_data_type *value) +{ + st_str_end_key key; + + key.s = (UChar* )str_key; + key.end = (UChar* )end_key; + + return onig_st_lookup(table, (st_data_t )(&key), value); +} + +extern int +onig_st_insert_strend(hash_table_type table, const UChar* str_key, + const UChar* end_key, hash_data_type value) +{ + st_str_end_key* key; + int result; + + key = (st_str_end_key* )xmalloc(sizeof(st_str_end_key)); + CHECK_NULL_RETURN_MEMERR(key); + + key->s = (UChar* )str_key; + key->end = (UChar* )end_key; + result = onig_st_insert(table, (st_data_t )key, value); + if (result) { + xfree(key); + } + return result; +} + + +#ifdef USE_CALLOUT + +typedef struct { + OnigEncoding enc; + int type; /* callout type: single or not */ + UChar* s; + UChar* end; +} st_callout_name_key; + +static int +callout_name_table_cmp(st_data_t ax, st_data_t ay) +{ + st_callout_name_key* x = (st_callout_name_key* )ax; + st_callout_name_key* y = (st_callout_name_key* )ay; + UChar *p, *q; + int c; + + if (x->enc != y->enc) return 1; + if (x->type != y->type) return 1; + if ((x->end - x->s) != (y->end - y->s)) + return 1; + + p = x->s; + q = y->s; + while (p < x->end) { + c = (int )*p - (int )*q; + if (c != 0) return c; + + p++; q++; + } + + return 0; +} + +static int +callout_name_table_hash(st_data_t ax) +{ + st_callout_name_key* x = (st_callout_name_key* )ax; + UChar *p; + unsigned int val = 0; + + p = x->s; + while (p < x->end) { + val = val * 997 + (unsigned int )*p++; + } + + /* use intptr_t for escape warning in Windows */ + return (int )(val + (val >> 5) + ((intptr_t )x->enc & 0xffff) + x->type); +} + +extern hash_table_type +onig_st_init_callout_name_table_with_size(int size) +{ + static struct st_hash_type hashType = { + callout_name_table_cmp, + callout_name_table_hash, + }; + + return (hash_table_type )onig_st_init_table_with_size(&hashType, size); +} + +extern int +onig_st_lookup_callout_name_table(hash_table_type table, + OnigEncoding enc, + int type, + const UChar* str_key, + const UChar* end_key, + hash_data_type *value) +{ + st_callout_name_key key; + + key.enc = enc; + key.type = type; + key.s = (UChar* )str_key; + key.end = (UChar* )end_key; + + return onig_st_lookup(table, (st_data_t )(&key), value); +} + +static int +st_insert_callout_name_table(hash_table_type table, + OnigEncoding enc, int type, + UChar* str_key, UChar* end_key, + hash_data_type value) +{ + st_callout_name_key* key; + int result; + + key = (st_callout_name_key* )xmalloc(sizeof(st_callout_name_key)); + CHECK_NULL_RETURN_MEMERR(key); + + /* key->s: don't duplicate, because str_key is duped in callout_name_entry() */ + key->enc = enc; + key->type = type; + key->s = str_key; + key->end = end_key; + result = onig_st_insert(table, (st_data_t )key, value); + if (result) { + xfree(key); + } + return result; +} +#endif + +#endif /* USE_ST_LIBRARY */ + + +#define INIT_NAME_BACKREFS_ALLOC_NUM 8 + +typedef struct { + UChar* name; + int name_len; /* byte length */ + int back_num; /* number of backrefs */ + int back_alloc; + int back_ref1; + int* back_refs; +} NameEntry; + +#ifdef USE_ST_LIBRARY + +#define INIT_NAMES_ALLOC_NUM 5 + +typedef st_table NameTable; +typedef st_data_t HashDataType; /* 1.6 st.h doesn't define st_data_t type */ + +#define NAMEBUF_SIZE 24 +#define NAMEBUF_SIZE_1 25 + +#ifdef ONIG_DEBUG +static int +i_print_name_entry(st_data_t akey, st_data_t ae, st_data_t arg) +{ + int i; + FILE* fp; + NameEntry* e; + + e = (NameEntry* )ae; + fp = (FILE* )arg; + + fprintf(fp, "%s: ", e->name); + if (e->back_num == 0) + fputs("-", fp); + else if (e->back_num == 1) + fprintf(fp, "%d", e->back_ref1); + else { + for (i = 0; i < e->back_num; i++) { + if (i > 0) fprintf(fp, ", "); + fprintf(fp, "%d", e->back_refs[i]); + } + } + fputs("\n", fp); + return ST_CONTINUE; +} + +extern int +onig_print_names(FILE* fp, regex_t* reg) +{ + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t)) { + fprintf(fp, "name table\n"); + onig_st_foreach(t, i_print_name_entry, (HashDataType )fp); + fputs("\n", fp); + } + return 0; +} +#endif /* ONIG_DEBUG */ + +static int +i_free_name_entry(st_data_t akey, st_data_t ae, st_data_t arg ARG_UNUSED) +{ + UChar* key; + NameEntry* e; + + key = (UChar* )akey; + e = (NameEntry* )ae; + xfree(e->name); + if (IS_NOT_NULL(e->back_refs)) xfree(e->back_refs); + xfree(key); + xfree(e); + return ST_DELETE; +} + +static int +names_clear(regex_t* reg) +{ + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t)) { + onig_st_foreach(t, i_free_name_entry, 0); + } + return 0; +} + +extern int +onig_names_free(regex_t* reg) +{ + int r; + NameTable* t; + + r = names_clear(reg); + if (r != 0) return r; + + t = (NameTable* )reg->name_table; + if (IS_NOT_NULL(t)) onig_st_free_table(t); + reg->name_table = (void* )NULL; + return 0; +} + +static NameEntry* +name_find(regex_t* reg, const UChar* name, const UChar* name_end) +{ + NameEntry* e; + NameTable* t = (NameTable* )reg->name_table; + + e = (NameEntry* )NULL; + if (IS_NOT_NULL(t)) { + onig_st_lookup_strend(t, name, name_end, (HashDataType* )((void* )(&e))); + } + return e; +} + +typedef struct { + int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*); + regex_t* reg; + void* arg; + int ret; + OnigEncoding enc; +} INamesArg; + +static int +i_names(st_data_t key ARG_UNUSED, st_data_t ae, st_data_t aarg) +{ + NameEntry* e; + INamesArg* arg; + + e = (NameEntry* )ae; + arg = (INamesArg* )aarg; + + int r = (*(arg->func))(e->name, + e->name + e->name_len, + e->back_num, + (e->back_num > 1 ? e->back_refs : &(e->back_ref1)), + arg->reg, arg->arg); + if (r != 0) { + arg->ret = r; + return ST_STOP; + } + return ST_CONTINUE; +} + +extern int +onig_foreach_name(regex_t* reg, + int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*), void* arg) +{ + INamesArg narg; + NameTable* t = (NameTable* )reg->name_table; + + narg.ret = 0; + if (IS_NOT_NULL(t)) { + narg.func = func; + narg.reg = reg; + narg.arg = arg; + narg.enc = reg->enc; /* should be pattern encoding. */ + onig_st_foreach(t, i_names, (HashDataType )&narg); + } + return narg.ret; +} + +static int +i_renumber_name(st_data_t key ARG_UNUSED, st_data_t ae, st_data_t amap) +{ + int i; + NameEntry* e; + GroupNumMap* map; + + e = (NameEntry* )ae; + map = (GroupNumMap* )amap; + + if (e->back_num > 1) { + for (i = 0; i < e->back_num; i++) { + e->back_refs[i] = map[e->back_refs[i]].new_val; + } + } + else if (e->back_num == 1) { + e->back_ref1 = map[e->back_ref1].new_val; + } + + return ST_CONTINUE; +} + +extern int +onig_renumber_name_table(regex_t* reg, GroupNumMap* map) +{ + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t)) { + onig_st_foreach(t, i_renumber_name, (HashDataType )map); + } + return 0; +} + + +extern int +onig_number_of_names(regex_t* reg) +{ + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t)) + return t->num_entries; + else + return 0; +} + +#else /* USE_ST_LIBRARY */ + +#define INIT_NAMES_ALLOC_NUM 8 + +typedef struct { + NameEntry* e; + int num; + int alloc; +} NameTable; + +#ifdef ONIG_DEBUG +extern int +onig_print_names(FILE* fp, regex_t* reg) +{ + int i, j; + NameEntry* e; + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t) && t->num > 0) { + fprintf(fp, "name table\n"); + for (i = 0; i < t->num; i++) { + e = &(t->e[i]); + fprintf(fp, "%s: ", e->name); + if (e->back_num == 0) { + fputs("-", fp); + } + else if (e->back_num == 1) { + fprintf(fp, "%d", e->back_ref1); + } + else { + for (j = 0; j < e->back_num; j++) { + if (j > 0) fprintf(fp, ", "); + fprintf(fp, "%d", e->back_refs[j]); + } + } + fputs("\n", fp); + } + fputs("\n", fp); + } + return 0; +} +#endif + +static int +names_clear(regex_t* reg) +{ + int i; + NameEntry* e; + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t)) { + for (i = 0; i < t->num; i++) { + e = &(t->e[i]); + if (IS_NOT_NULL(e->name)) { + xfree(e->name); + e->name = NULL; + e->name_len = 0; + e->back_num = 0; + e->back_alloc = 0; + if (IS_NOT_NULL(e->back_refs)) xfree(e->back_refs); + e->back_refs = (int* )NULL; + } + } + if (IS_NOT_NULL(t->e)) { + xfree(t->e); + t->e = NULL; + } + t->num = 0; + } + return 0; +} + +extern int +onig_names_free(regex_t* reg) +{ + int r; + NameTable* t; + + r = names_clear(reg); + if (r != 0) return r; + + t = (NameTable* )reg->name_table; + if (IS_NOT_NULL(t)) xfree(t); + reg->name_table = NULL; + return 0; +} + +static NameEntry* +name_find(regex_t* reg, UChar* name, UChar* name_end) +{ + int i, len; + NameEntry* e; + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t)) { + len = name_end - name; + for (i = 0; i < t->num; i++) { + e = &(t->e[i]); + if (len == e->name_len && onig_strncmp(name, e->name, len) == 0) + return e; + } + } + return (NameEntry* )NULL; +} + +extern int +onig_foreach_name(regex_t* reg, + int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*), void* arg) +{ + int i, r; + NameEntry* e; + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t)) { + for (i = 0; i < t->num; i++) { + e = &(t->e[i]); + r = (*func)(e->name, e->name + e->name_len, e->back_num, + (e->back_num > 1 ? e->back_refs : &(e->back_ref1)), + reg, arg); + if (r != 0) return r; + } + } + return 0; +} + +extern int +onig_number_of_names(regex_t* reg) +{ + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t)) + return t->num; + else + return 0; +} + +#endif /* else USE_ST_LIBRARY */ + +static int +name_add(regex_t* reg, UChar* name, UChar* name_end, int backref, ParseEnv* env) +{ + int r; + int alloc; + NameEntry* e; + NameTable* t = (NameTable* )reg->name_table; + + if (name_end - name <= 0) + return ONIGERR_EMPTY_GROUP_NAME; + + e = name_find(reg, name, name_end); + if (IS_NULL(e)) { +#ifdef USE_ST_LIBRARY + if (IS_NULL(t)) { + t = onig_st_init_strend_table_with_size(INIT_NAMES_ALLOC_NUM); + CHECK_NULL_RETURN_MEMERR(t); + reg->name_table = (void* )t; + } + e = (NameEntry* )xmalloc(sizeof(NameEntry)); + CHECK_NULL_RETURN_MEMERR(e); + + e->name = onigenc_strdup(reg->enc, name, name_end); + if (IS_NULL(e->name)) { + xfree(e); return ONIGERR_MEMORY; + } + r = onig_st_insert_strend(t, e->name, (e->name + (name_end - name)), + (HashDataType )e); + if (r < 0) return r; + + e->name_len = (int )(name_end - name); + e->back_num = 0; + e->back_alloc = 0; + e->back_refs = (int* )NULL; + +#else + + if (IS_NULL(t)) { + alloc = INIT_NAMES_ALLOC_NUM; + t = (NameTable* )xmalloc(sizeof(NameTable)); + CHECK_NULL_RETURN_MEMERR(t); + t->e = NULL; + t->alloc = 0; + t->num = 0; + + t->e = (NameEntry* )xmalloc(sizeof(NameEntry) * alloc); + if (IS_NULL(t->e)) { + xfree(t); + return ONIGERR_MEMORY; + } + t->alloc = alloc; + reg->name_table = t; + goto clear; + } + else if (t->num == t->alloc) { + int i; + + alloc = t->alloc * 2; + t->e = (NameEntry* )xrealloc(t->e, sizeof(NameEntry) * alloc); + CHECK_NULL_RETURN_MEMERR(t->e); + t->alloc = alloc; + + clear: + for (i = t->num; i < t->alloc; i++) { + t->e[i].name = NULL; + t->e[i].name_len = 0; + t->e[i].back_num = 0; + t->e[i].back_alloc = 0; + t->e[i].back_refs = (int* )NULL; + } + } + e = &(t->e[t->num]); + t->num++; + e->name = onigenc_strdup(reg->enc, name, name_end); + if (IS_NULL(e->name)) return ONIGERR_MEMORY; + e->name_len = name_end - name; +#endif + } + + if (e->back_num >= 1 && + ! IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME)) { + onig_scan_env_set_error_string(env, ONIGERR_MULTIPLEX_DEFINED_NAME, + name, name_end); + return ONIGERR_MULTIPLEX_DEFINED_NAME; + } + + e->back_num++; + if (e->back_num == 1) { + e->back_ref1 = backref; + } + else { + if (e->back_num == 2) { + alloc = INIT_NAME_BACKREFS_ALLOC_NUM; + e->back_refs = (int* )xmalloc(sizeof(int) * alloc); + CHECK_NULL_RETURN_MEMERR(e->back_refs); + e->back_alloc = alloc; + e->back_refs[0] = e->back_ref1; + e->back_refs[1] = backref; + } + else { + if (e->back_num > e->back_alloc) { + alloc = e->back_alloc * 2; + e->back_refs = (int* )xrealloc(e->back_refs, sizeof(int) * alloc); + CHECK_NULL_RETURN_MEMERR(e->back_refs); + e->back_alloc = alloc; + } + e->back_refs[e->back_num - 1] = backref; + } + } + + return 0; +} + +extern int +onig_name_to_group_numbers(regex_t* reg, const UChar* name, + const UChar* name_end, int** nums) +{ + NameEntry* e = name_find(reg, name, name_end); + + if (IS_NULL(e)) return ONIGERR_UNDEFINED_NAME_REFERENCE; + + switch (e->back_num) { + case 0: + break; + case 1: + *nums = &(e->back_ref1); + break; + default: + *nums = e->back_refs; + break; + } + return e->back_num; +} + +static int +name_to_group_numbers(ParseEnv* env, const UChar* name, const UChar* name_end, + int** nums) +{ + regex_t* reg; + NameEntry* e; + + reg = env->reg; + e = name_find(reg, name, name_end); + + if (IS_NULL(e)) { + onig_scan_env_set_error_string(env, ONIGERR_UNDEFINED_NAME_REFERENCE, + (UChar* )name, (UChar* )name_end); + return ONIGERR_UNDEFINED_NAME_REFERENCE; + } + + switch (e->back_num) { + case 0: + break; + case 1: + *nums = &(e->back_ref1); + break; + default: + *nums = e->back_refs; + break; + } + return e->back_num; +} + +extern int +onig_name_to_backref_number(regex_t* reg, const UChar* name, + const UChar* name_end, OnigRegion *region) +{ + int i, n, *nums; + + n = onig_name_to_group_numbers(reg, name, name_end, &nums); + if (n < 0) + return n; + else if (n == 0) + return ONIGERR_PARSER_BUG; + else if (n == 1) + return nums[0]; + else { + if (IS_NOT_NULL(region)) { + for (i = n - 1; i >= 0; i--) { + if (region->beg[nums[i]] != ONIG_REGION_NOTPOS) + return nums[i]; + } + } + return nums[n - 1]; + } +} + +extern int +onig_noname_group_capture_is_active(regex_t* reg) +{ + if (OPTON_DONT_CAPTURE_GROUP(reg->options)) + return 0; + + if (onig_number_of_names(reg) > 0 && + IS_SYNTAX_BV(reg->syntax, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP) && + ! OPTON_CAPTURE_GROUP(reg->options)) { + return 0; + } + + return 1; +} + +#ifdef USE_CALLOUT + +typedef struct { + OnigCalloutType type; + int in; + OnigCalloutFunc start_func; + OnigCalloutFunc end_func; + int arg_num; + int opt_arg_num; + unsigned int arg_types[ONIG_CALLOUT_MAX_ARGS_NUM]; + OnigValue opt_defaults[ONIG_CALLOUT_MAX_ARGS_NUM]; + UChar* name; /* reference to GlobalCalloutNameTable entry: e->name */ +} CalloutNameListEntry; + +typedef struct { + int n; + int alloc; + CalloutNameListEntry* v; +} CalloutNameListType; + +static CalloutNameListType* GlobalCalloutNameList; + +static int +make_callout_func_list(CalloutNameListType** rs, int init_size) +{ + CalloutNameListType* s; + CalloutNameListEntry* v; + + *rs = 0; + + s = xmalloc(sizeof(*s)); + if (IS_NULL(s)) return ONIGERR_MEMORY; + + v = (CalloutNameListEntry* )xmalloc(sizeof(CalloutNameListEntry) * init_size); + if (IS_NULL(v)) { + xfree(s); + return ONIGERR_MEMORY; + } + + s->n = 0; + s->alloc = init_size; + s->v = v; + + *rs = s; + return ONIG_NORMAL; +} + +static void +free_callout_func_list(CalloutNameListType* s) +{ + if (IS_NOT_NULL(s)) { + if (IS_NOT_NULL(s->v)) { + int i, j; + + for (i = 0; i < s->n; i++) { + CalloutNameListEntry* e = s->v + i; + for (j = e->arg_num - e->opt_arg_num; j < e->arg_num; j++) { + if (e->arg_types[j] == ONIG_TYPE_STRING) { + UChar* p = e->opt_defaults[j].s.start; + if (IS_NOT_NULL(p)) xfree(p); + } + } + } + xfree(s->v); + } + xfree(s); + } +} + +static int +callout_func_list_add(CalloutNameListType* s, int* rid) +{ + if (s->n >= s->alloc) { + int new_size = s->alloc * 2; + CalloutNameListEntry* nv = (CalloutNameListEntry* ) + xrealloc(s->v, sizeof(CalloutNameListEntry) * new_size); + if (IS_NULL(nv)) return ONIGERR_MEMORY; + + s->alloc = new_size; + s->v = nv; + } + + *rid = s->n; + + xmemset(&(s->v[s->n]), 0, sizeof(*(s->v))); + s->n++; + return ONIG_NORMAL; +} + + +typedef struct { + UChar* name; + int name_len; /* byte length */ + int id; +} CalloutNameEntry; + +#ifdef USE_ST_LIBRARY +typedef st_table CalloutNameTable; +#else +typedef struct { + CalloutNameEntry* e; + int num; + int alloc; +} CalloutNameTable; +#endif + +static CalloutNameTable* GlobalCalloutNameTable; +static int CalloutNameIDCounter; + +#ifdef USE_ST_LIBRARY + +static int +i_free_callout_name_entry(st_data_t akey, st_data_t ae, st_data_t arg ARG_UNUSED) +{ + st_callout_name_key* key; + CalloutNameEntry* e; + + key = (st_callout_name_key* )akey; + e = (CalloutNameEntry* )ae; + + if (IS_NOT_NULL(e)) { + xfree(e->name); + } + /*xfree(key->s); */ /* is same as e->name */ + xfree(key); + xfree(e); + return ST_DELETE; +} + +static int +callout_name_table_clear(CalloutNameTable* t) +{ + if (IS_NOT_NULL(t)) { + onig_st_foreach(t, i_free_callout_name_entry, 0); + } + return 0; +} + +static int +global_callout_name_table_free(void) +{ + if (IS_NOT_NULL(GlobalCalloutNameTable)) { + int r = callout_name_table_clear(GlobalCalloutNameTable); + if (r != 0) return r; + + onig_st_free_table(GlobalCalloutNameTable); + GlobalCalloutNameTable = 0; + CalloutNameIDCounter = 0; + } + + return 0; +} + +static CalloutNameEntry* +callout_name_find(OnigEncoding enc, int is_not_single, + const UChar* name, const UChar* name_end) +{ + int r; + CalloutNameEntry* e; + CalloutNameTable* t = GlobalCalloutNameTable; + + e = (CalloutNameEntry* )NULL; + if (IS_NOT_NULL(t)) { + r = onig_st_lookup_callout_name_table(t, enc, is_not_single, name, name_end, + (HashDataType* )((void* )(&e))); + if (r == 0) { /* not found */ + if (enc != ONIG_ENCODING_ASCII && + ONIGENC_IS_ASCII_COMPATIBLE_ENCODING(enc)) { + enc = ONIG_ENCODING_ASCII; + onig_st_lookup_callout_name_table(t, enc, is_not_single, name, name_end, + (HashDataType* )((void* )(&e))); + } + } + } + return e; +} + +#else + +static int +callout_name_table_clear(CalloutNameTable* t) +{ + int i; + CalloutNameEntry* e; + + if (IS_NOT_NULL(t)) { + for (i = 0; i < t->num; i++) { + e = &(t->e[i]); + if (IS_NOT_NULL(e->name)) { + xfree(e->name); + e->name = NULL; + e->name_len = 0; + e->id = 0; + e->func = 0; + } + } + if (IS_NOT_NULL(t->e)) { + xfree(t->e); + t->e = NULL; + } + t->num = 0; + } + return 0; +} + +static int +global_callout_name_table_free(void) +{ + if (IS_NOT_NULL(GlobalCalloutNameTable)) { + int r = callout_name_table_clear(GlobalCalloutNameTable); + if (r != 0) return r; + + xfree(GlobalCalloutNameTable); + GlobalCalloutNameTable = 0; + CalloutNameIDCounter = 0; + } + return 0; +} + +static CalloutNameEntry* +callout_name_find(UChar* name, UChar* name_end) +{ + int i, len; + CalloutNameEntry* e; + CalloutNameTable* t = Calloutnames; + + if (IS_NOT_NULL(t)) { + len = name_end - name; + for (i = 0; i < t->num; i++) { + e = &(t->e[i]); + if (len == e->name_len && onig_strncmp(name, e->name, len) == 0) + return e; + } + } + return (CalloutNameEntry* )NULL; +} + +#endif + +/* name string must be single byte char string. */ +static int +callout_name_entry(CalloutNameEntry** rentry, OnigEncoding enc, + int is_not_single, UChar* name, UChar* name_end) +{ + int r; + CalloutNameEntry* e; + CalloutNameTable* t = GlobalCalloutNameTable; + + *rentry = 0; + if (name_end - name <= 0) + return ONIGERR_INVALID_CALLOUT_NAME; + + e = callout_name_find(enc, is_not_single, name, name_end); + if (IS_NULL(e)) { +#ifdef USE_ST_LIBRARY + if (IS_NULL(t)) { + t = onig_st_init_callout_name_table_with_size(INIT_NAMES_ALLOC_NUM); + CHECK_NULL_RETURN_MEMERR(t); + GlobalCalloutNameTable = t; + } + e = (CalloutNameEntry* )xmalloc(sizeof(CalloutNameEntry)); + CHECK_NULL_RETURN_MEMERR(e); + + e->name = onigenc_strdup(enc, name, name_end); + if (IS_NULL(e->name)) { + xfree(e); return ONIGERR_MEMORY; + } + + r = st_insert_callout_name_table(t, enc, is_not_single, + e->name, (e->name + (name_end - name)), + (HashDataType )e); + if (r < 0) return r; + +#else + + int alloc; + + if (IS_NULL(t)) { + alloc = INIT_NAMES_ALLOC_NUM; + t = (CalloutNameTable* )xmalloc(sizeof(CalloutNameTable)); + CHECK_NULL_RETURN_MEMERR(t); + t->e = NULL; + t->alloc = 0; + t->num = 0; + + t->e = (CalloutNameEntry* )xmalloc(sizeof(CalloutNameEntry) * alloc); + if (IS_NULL(t->e)) { + xfree(t); + return ONIGERR_MEMORY; + } + t->alloc = alloc; + GlobalCalloutNameTable = t; + goto clear; + } + else if (t->num == t->alloc) { + int i; + + alloc = t->alloc * 2; + t->e = (CalloutNameEntry* )xrealloc(t->e, sizeof(CalloutNameEntry) * alloc); + CHECK_NULL_RETURN_MEMERR(t->e); + t->alloc = alloc; + + clear: + for (i = t->num; i < t->alloc; i++) { + t->e[i].name = NULL; + t->e[i].name_len = 0; + t->e[i].id = 0; + } + } + e = &(t->e[t->num]); + t->num++; + e->name = onigenc_strdup(enc, name, name_end); + if (IS_NULL(e->name)) return ONIGERR_MEMORY; +#endif + + CalloutNameIDCounter++; + e->id = CalloutNameIDCounter; + e->name_len = (int )(name_end - name); + } + + *rentry = e; + return e->id; +} + +static int +is_allowed_callout_name(OnigEncoding enc, UChar* name, UChar* name_end) +{ + UChar* p; + OnigCodePoint c; + + if (name >= name_end) return 0; + + p = name; + while (p < name_end) { + c = ONIGENC_MBC_TO_CODE(enc, p, name_end); + if (! IS_ALLOWED_CODE_IN_CALLOUT_NAME(c)) + return 0; + + if (p == name) { + if (c >= '0' && c <= '9') return 0; + } + + p += ONIGENC_MBC_ENC_LEN(enc, p); + } + + return 1; +} + +static int +is_allowed_callout_tag_name(OnigEncoding enc, UChar* name, UChar* name_end) +{ + UChar* p; + OnigCodePoint c; + + if (name >= name_end) return 0; + + p = name; + while (p < name_end) { + c = ONIGENC_MBC_TO_CODE(enc, p, name_end); + if (! IS_ALLOWED_CODE_IN_CALLOUT_TAG_NAME(c)) + return 0; + + if (p == name) { + if (c >= '0' && c <= '9') return 0; + } + + p += ONIGENC_MBC_ENC_LEN(enc, p); + } + + return 1; +} + +extern int +onig_set_callout_of_name(OnigEncoding enc, OnigCalloutType callout_type, + UChar* name, UChar* name_end, int in, + OnigCalloutFunc start_func, + OnigCalloutFunc end_func, + int arg_num, unsigned int arg_types[], + int opt_arg_num, OnigValue opt_defaults[]) +{ + int r; + int i; + int j; + int id; + int is_not_single; + CalloutNameEntry* e; + CalloutNameListEntry* fe; + + if (callout_type != ONIG_CALLOUT_TYPE_SINGLE) + return ONIGERR_INVALID_ARGUMENT; + + if (arg_num < 0 || arg_num > ONIG_CALLOUT_MAX_ARGS_NUM) + return ONIGERR_INVALID_CALLOUT_ARG; + + if (opt_arg_num < 0 || opt_arg_num > arg_num) + return ONIGERR_INVALID_CALLOUT_ARG; + + if (start_func == 0 && end_func == 0) + return ONIGERR_INVALID_CALLOUT_ARG; + + if ((in & ONIG_CALLOUT_IN_PROGRESS) == 0 && (in & ONIG_CALLOUT_IN_RETRACTION) == 0) + return ONIGERR_INVALID_CALLOUT_ARG; + + for (i = 0; i < arg_num; i++) { + unsigned int t = arg_types[i]; + if (t == ONIG_TYPE_VOID) + return ONIGERR_INVALID_CALLOUT_ARG; + else { + if (i >= arg_num - opt_arg_num) { + if (t != ONIG_TYPE_LONG && t != ONIG_TYPE_CHAR && t != ONIG_TYPE_STRING && + t != ONIG_TYPE_TAG) + return ONIGERR_INVALID_CALLOUT_ARG; + } + else { + if (t != ONIG_TYPE_LONG) { + t = t & ~ONIG_TYPE_LONG; + if (t != ONIG_TYPE_CHAR && t != ONIG_TYPE_STRING && t != ONIG_TYPE_TAG) + return ONIGERR_INVALID_CALLOUT_ARG; + } + } + } + } + + if (! is_allowed_callout_name(enc, name, name_end)) { + return ONIGERR_INVALID_CALLOUT_NAME; + } + + is_not_single = (callout_type != ONIG_CALLOUT_TYPE_SINGLE); + id = callout_name_entry(&e, enc, is_not_single, name, name_end); + if (id < 0) return id; + + r = ONIG_NORMAL; + if (IS_NULL(GlobalCalloutNameList)) { + r = make_callout_func_list(&GlobalCalloutNameList, 10); + if (r != ONIG_NORMAL) return r; + } + + while (id >= GlobalCalloutNameList->n) { + int rid; + r = callout_func_list_add(GlobalCalloutNameList, &rid); + if (r != ONIG_NORMAL) return r; + } + + fe = GlobalCalloutNameList->v + id; + fe->type = callout_type; + fe->in = in; + fe->start_func = start_func; + fe->end_func = end_func; + fe->arg_num = arg_num; + fe->opt_arg_num = opt_arg_num; + fe->name = e->name; + + for (i = 0; i < arg_num; i++) { + fe->arg_types[i] = arg_types[i]; + } + for (i = arg_num - opt_arg_num, j = 0; i < arg_num; i++, j++) { + if (IS_NULL(opt_defaults)) return ONIGERR_INVALID_ARGUMENT; + if (fe->arg_types[i] == ONIG_TYPE_STRING) { + OnigValue* val; + UChar* ds; + + val = opt_defaults + j; + ds = onigenc_strdup(enc, val->s.start, val->s.end); + CHECK_NULL_RETURN_MEMERR(ds); + + fe->opt_defaults[i].s.start = ds; + fe->opt_defaults[i].s.end = ds + (val->s.end - val->s.start); + } + else { + fe->opt_defaults[i] = opt_defaults[j]; + } + } + + r = id; + return r; +} + +static int +get_callout_name_id_by_name(OnigEncoding enc, int is_not_single, + UChar* name, UChar* name_end, int* rid) +{ + int r; + CalloutNameEntry* e; + + if (! is_allowed_callout_name(enc, name, name_end)) { + return ONIGERR_INVALID_CALLOUT_NAME; + } + + e = callout_name_find(enc, is_not_single, name, name_end); + if (IS_NULL(e)) { + return ONIGERR_UNDEFINED_CALLOUT_NAME; + } + + r = ONIG_NORMAL; + *rid = e->id; + + return r; +} + +extern OnigCalloutFunc +onig_get_callout_start_func(regex_t* reg, int callout_num) +{ + /* If used for callouts of contents, return 0. */ + CalloutListEntry* e; + + e = onig_reg_callout_list_at(reg, callout_num); + CHECK_NULL_RETURN(e); + return e->start_func; +} + +extern const UChar* +onig_get_callout_tag_start(regex_t* reg, int callout_num) +{ + CalloutListEntry* e = onig_reg_callout_list_at(reg, callout_num); + CHECK_NULL_RETURN(e); + return e->tag_start; +} + +extern const UChar* +onig_get_callout_tag_end(regex_t* reg, int callout_num) +{ + CalloutListEntry* e = onig_reg_callout_list_at(reg, callout_num); + CHECK_NULL_RETURN(e); + return e->tag_end; +} + + +extern OnigCalloutType +onig_get_callout_type_by_name_id(int name_id) +{ + if (name_id < 0 || name_id >= GlobalCalloutNameList->n) + return 0; + + return GlobalCalloutNameList->v[name_id].type; +} + +extern OnigCalloutFunc +onig_get_callout_start_func_by_name_id(int name_id) +{ + if (name_id < 0 || name_id >= GlobalCalloutNameList->n) + return 0; + + return GlobalCalloutNameList->v[name_id].start_func; +} + +extern OnigCalloutFunc +onig_get_callout_end_func_by_name_id(int name_id) +{ + if (name_id < 0 || name_id >= GlobalCalloutNameList->n) + return 0; + + return GlobalCalloutNameList->v[name_id].end_func; +} + +extern int +onig_get_callout_in_by_name_id(int name_id) +{ + if (name_id < 0 || name_id >= GlobalCalloutNameList->n) + return 0; + + return GlobalCalloutNameList->v[name_id].in; +} + +static int +get_callout_arg_num_by_name_id(int name_id) +{ + return GlobalCalloutNameList->v[name_id].arg_num; +} + +static int +get_callout_opt_arg_num_by_name_id(int name_id) +{ + return GlobalCalloutNameList->v[name_id].opt_arg_num; +} + +static unsigned int +get_callout_arg_type_by_name_id(int name_id, int index) +{ + return GlobalCalloutNameList->v[name_id].arg_types[index]; +} + +static OnigValue +get_callout_opt_default_by_name_id(int name_id, int index) +{ + return GlobalCalloutNameList->v[name_id].opt_defaults[index]; +} + +extern UChar* +onig_get_callout_name_by_name_id(int name_id) +{ + if (name_id < 0 || name_id >= GlobalCalloutNameList->n) + return 0; + + return GlobalCalloutNameList->v[name_id].name; +} + +extern int +onig_global_callout_names_free(void) +{ + free_callout_func_list(GlobalCalloutNameList); + GlobalCalloutNameList = 0; + + global_callout_name_table_free(); + return ONIG_NORMAL; +} + + +typedef st_table CalloutTagTable; +typedef intptr_t CalloutTagVal; + +#define CALLOUT_TAG_LIST_FLAG_TAG_EXIST (1<<0) + +static int +i_callout_callout_list_set(st_data_t key ARG_UNUSED, st_data_t ae, st_data_t arg) +{ + int num; + CalloutTagVal e; + RegexExt* ext; + + e = (CalloutTagVal )ae; + ext = (RegexExt* )arg; + + num = (int )e - 1; + ext->callout_list[num].flag |= CALLOUT_TAG_LIST_FLAG_TAG_EXIST; + return ST_CONTINUE; +} + +static int +setup_ext_callout_list_values(regex_t* reg) +{ + int i, j; + RegexExt* ext; + + ext = reg->extp; + if (IS_NOT_NULL(ext->tag_table)) { + onig_st_foreach((CalloutTagTable *)ext->tag_table, i_callout_callout_list_set, + (st_data_t )ext); + } + + for (i = 0; i < ext->callout_num; i++) { + CalloutListEntry* e = ext->callout_list + i; + if (e->of == ONIG_CALLOUT_OF_NAME) { + for (j = 0; j < e->u.arg.num; j++) { + if (e->u.arg.types[j] == ONIG_TYPE_TAG) { + UChar* start; + UChar* end; + int num; + start = e->u.arg.vals[j].s.start; + end = e->u.arg.vals[j].s.end; + num = onig_get_callout_num_by_tag(reg, start, end); + if (num < 0) return num; + e->u.arg.vals[j].tag = num; + } + } + } + } + + return ONIG_NORMAL; +} + +extern int +onig_callout_tag_is_exist_at_callout_num(regex_t* reg, int callout_num) +{ + RegexExt* ext = reg->extp; + + if (IS_NULL(ext) || IS_NULL(ext->callout_list)) return 0; + if (callout_num > ext->callout_num) return 0; + + return (ext->callout_list[callout_num].flag & + CALLOUT_TAG_LIST_FLAG_TAG_EXIST) != 0; +} + +static int +i_free_callout_tag_entry(st_data_t akey, st_data_t e ARG_UNUSED, st_data_t arg ARG_UNUSED) +{ + UChar* key; + + key = (UChar* )akey; + xfree(key); + return ST_DELETE; +} + +static int +callout_tag_table_clear(CalloutTagTable* t) +{ + if (IS_NOT_NULL(t)) { + onig_st_foreach(t, i_free_callout_tag_entry, 0); + } + return 0; +} + +extern int +onig_callout_tag_table_free(void* table) +{ + CalloutTagTable* t = (CalloutTagTable* )table; + + if (IS_NOT_NULL(t)) { + int r = callout_tag_table_clear(t); + if (r != 0) return r; + + onig_st_free_table(t); + } + + return 0; +} + +extern int +onig_get_callout_num_by_tag(regex_t* reg, + const UChar* tag, const UChar* tag_end) +{ + int r; + RegexExt* ext; + CalloutTagVal e; + + ext = reg->extp; + if (IS_NULL(ext) || IS_NULL(ext->tag_table)) + return ONIGERR_INVALID_CALLOUT_TAG_NAME; + + r = onig_st_lookup_strend(ext->tag_table, tag, tag_end, + (HashDataType* )((void* )(&e))); + if (r == 0) return ONIGERR_INVALID_CALLOUT_TAG_NAME; + return (int )e; +} + +static CalloutTagVal +callout_tag_find(CalloutTagTable* t, const UChar* name, const UChar* name_end) +{ + CalloutTagVal e; + + e = -1; + if (IS_NOT_NULL(t)) { + onig_st_lookup_strend(t, name, name_end, (HashDataType* )((void* )(&e))); + } + return e; +} + +static int +callout_tag_table_new(CalloutTagTable** rt) +{ + CalloutTagTable* t; + + *rt = 0; + t = onig_st_init_strend_table_with_size(INIT_TAG_NAMES_ALLOC_NUM); + CHECK_NULL_RETURN_MEMERR(t); + + *rt = t; + return ONIG_NORMAL; +} + +static int +callout_tag_entry_raw(ParseEnv* env, CalloutTagTable* t, UChar* name, + UChar* name_end, CalloutTagVal entry_val) +{ + int r; + CalloutTagVal val; + + if (name_end - name <= 0) + return ONIGERR_INVALID_CALLOUT_TAG_NAME; + + val = callout_tag_find(t, name, name_end); + if (val >= 0) { + onig_scan_env_set_error_string(env, ONIGERR_MULTIPLEX_DEFINED_NAME, + name, name_end); + return ONIGERR_MULTIPLEX_DEFINED_NAME; + } + + r = onig_st_insert_strend(t, name, name_end, (HashDataType )entry_val); + if (r < 0) return r; + + return ONIG_NORMAL; +} + +static int +ext_ensure_tag_table(regex_t* reg) +{ + int r; + RegexExt* ext; + CalloutTagTable* t; + + ext = onig_get_regex_ext(reg); + CHECK_NULL_RETURN_MEMERR(ext); + + if (IS_NULL(ext->tag_table)) { + r = callout_tag_table_new(&t); + if (r != ONIG_NORMAL) return r; + + ext->tag_table = t; + } + + return ONIG_NORMAL; +} + +static int +callout_tag_entry(ParseEnv* env, regex_t* reg, UChar* name, UChar* name_end, + CalloutTagVal entry_val) +{ + int r; + RegexExt* ext; + CalloutListEntry* e; + + r = ext_ensure_tag_table(reg); + if (r != ONIG_NORMAL) return r; + + ext = onig_get_regex_ext(reg); + CHECK_NULL_RETURN_MEMERR(ext); + r = callout_tag_entry_raw(env, ext->tag_table, name, name_end, entry_val); + + e = onig_reg_callout_list_at(reg, (int )entry_val); + CHECK_NULL_RETURN_MEMERR(e); + e->tag_start = name; + e->tag_end = name_end; + + return r; +} + +#endif /* USE_CALLOUT */ + + +#define INIT_PARSEENV_MEMENV_ALLOC_SIZE 16 + +static void +scan_env_clear(ParseEnv* env) +{ + MEM_STATUS_CLEAR(env->cap_history); + MEM_STATUS_CLEAR(env->backtrack_mem); + MEM_STATUS_CLEAR(env->backrefed_mem); + env->error = (UChar* )NULL; + env->error_end = (UChar* )NULL; + env->num_call = 0; + +#ifdef USE_CALL + env->unset_addr_list = NULL; +#endif + + env->num_mem = 0; + env->num_named = 0; + env->mem_alloc = 0; + env->mem_env_dynamic = (MemEnv* )NULL; + + xmemset(env->mem_env_static, 0, sizeof(env->mem_env_static)); + + env->parse_depth = 0; +#ifdef ONIG_DEBUG_PARSE + env->max_parse_depth = 0; +#endif + env->backref_num = 0; + env->keep_num = 0; + env->id_num = 0; + env->save_alloc_num = 0; + env->saves = 0; + env->flags = 0; +} + +static int +scan_env_add_mem_entry(ParseEnv* env) +{ + int i, need, alloc; + MemEnv* p; + + need = env->num_mem + 1; + if (need > MaxCaptureNum && MaxCaptureNum != 0) + return ONIGERR_TOO_MANY_CAPTURES; + + if (need >= PARSEENV_MEMENV_SIZE) { + if (env->mem_alloc <= need) { + if (IS_NULL(env->mem_env_dynamic)) { + alloc = INIT_PARSEENV_MEMENV_ALLOC_SIZE; + p = (MemEnv* )xmalloc(sizeof(MemEnv) * alloc); + CHECK_NULL_RETURN_MEMERR(p); + xmemcpy(p, env->mem_env_static, sizeof(env->mem_env_static)); + } + else { + alloc = env->mem_alloc * 2; + p = (MemEnv* )xrealloc(env->mem_env_dynamic, sizeof(MemEnv) * alloc); + CHECK_NULL_RETURN_MEMERR(p); + } + + for (i = env->num_mem + 1; i < alloc; i++) { + p[i].mem_node = NULL_NODE; + p[i].empty_repeat_node = NULL_NODE; + } + + env->mem_env_dynamic = p; + env->mem_alloc = alloc; + } + } + + env->num_mem++; + return env->num_mem; +} + +static int +scan_env_set_mem_node(ParseEnv* env, int num, Node* node) +{ + if (env->num_mem >= num) + PARSEENV_MEMENV(env)[num].mem_node = node; + else + return ONIGERR_PARSER_BUG; + return 0; +} + +static void +node_free_body(Node* node) +{ + if (IS_NULL(node)) return ; + + switch (ND_TYPE(node)) { + case ND_STRING: + if (STR_(node)->capacity != 0 && + IS_NOT_NULL(STR_(node)->s) && STR_(node)->s != STR_(node)->buf) { + xfree(STR_(node)->s); + } + break; + + case ND_LIST: + case ND_ALT: + onig_node_free(ND_CAR(node)); + node = ND_CDR(node); + while (IS_NOT_NULL(node)) { + Node* next = ND_CDR(node); + onig_node_free(ND_CAR(node)); + xfree(node); + node = next; + } + break; + + case ND_CCLASS: + { + CClassNode* cc = CCLASS_(node); + + if (cc->mbuf) + bbuf_free(cc->mbuf); + } + break; + + case ND_BACKREF: + if (IS_NOT_NULL(BACKREF_(node)->back_dynamic)) + xfree(BACKREF_(node)->back_dynamic); + break; + + case ND_BAG: + if (ND_BODY(node)) + onig_node_free(ND_BODY(node)); + + { + BagNode* en = BAG_(node); + if (en->type == BAG_IF_ELSE) { + onig_node_free(en->te.Then); + onig_node_free(en->te.Else); + } + } + break; + + case ND_QUANT: + if (ND_BODY(node)) + onig_node_free(ND_BODY(node)); + break; + + case ND_ANCHOR: + if (ND_BODY(node)) + onig_node_free(ND_BODY(node)); + if (IS_NOT_NULL(ANCHOR_(node)->lead_node)) + onig_node_free(ANCHOR_(node)->lead_node); + break; + + case ND_CTYPE: + case ND_CALL: + case ND_GIMMICK: + break; + } +} + +extern void +onig_node_free(Node* node) +{ + if (IS_NULL(node)) return ; + +#ifdef DEBUG_ND_FREE + fprintf(stderr, "onig_node_free: %p\n", node); +#endif + + node_free_body(node); + xfree(node); +} + +static void +cons_node_free_alone(Node* node) +{ + ND_CAR(node) = 0; + ND_CDR(node) = 0; + onig_node_free(node); +} + +static Node* +node_new(void) +{ + Node* node; + + node = (Node* )xmalloc(sizeof(Node)); + CHECK_NULL_RETURN(node); + xmemset(node, 0, sizeof(*node)); + +#ifdef DEBUG_ND_FREE + fprintf(stderr, "node_new: %p\n", node); +#endif + return node; +} + +extern int +onig_node_copy(Node** rcopy, Node* from) +{ + int r; + Node* copy; + + *rcopy = NULL_NODE; + + switch (ND_TYPE(from)) { + case ND_LIST: + case ND_ALT: + case ND_ANCHOR: + /* These node's link to other nodes are processed by caller. */ + break; + case ND_STRING: + case ND_CCLASS: + case ND_CTYPE: + /* Fixed contents after copy. */ + break; + default: + /* Not supported yet. */ + return ONIGERR_TYPE_BUG; + break; + } + + copy = node_new(); + CHECK_NULL_RETURN_MEMERR(copy); + xmemcpy(copy, from, sizeof(*copy)); + + switch (ND_TYPE(copy)) { + case ND_STRING: + r = onig_node_str_set(copy, STR_(from)->s, STR_(from)->end, FALSE); + if (r != 0) { + err: + onig_node_free(copy); + return r; + } + break; + + case ND_CCLASS: + { + CClassNode *fcc, *tcc; + + fcc = CCLASS_(from); + tcc = CCLASS_(copy); + if (IS_NOT_NULL(fcc->mbuf)) { + r = bbuf_clone(&(tcc->mbuf), fcc->mbuf); + if (r != 0) goto err; + } + } + break; + + default: + break; + } + + *rcopy = copy; + return ONIG_NORMAL; +} + + +static void +initialize_cclass(CClassNode* cc) +{ + BITSET_CLEAR(cc->bs); + cc->flags = 0; + cc->mbuf = NULL; +} + +static Node* +node_new_cclass(void) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + ND_SET_TYPE(node, ND_CCLASS); + initialize_cclass(CCLASS_(node)); + return node; +} + +static Node* +node_new_ctype(int type, int not, OnigOptionType options) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + ND_SET_TYPE(node, ND_CTYPE); + CTYPE_(node)->ctype = type; + CTYPE_(node)->not = not; + CTYPE_(node)->ascii_mode = OPTON_IS_ASCII_MODE_CTYPE(type, options); + return node; +} + +static Node* +node_new_anychar(OnigOptionType options) +{ + Node* node; + + node = node_new_ctype(CTYPE_ANYCHAR, FALSE, options); + CHECK_NULL_RETURN(node); + + if (OPTON_MULTILINE(options)) + ND_STATUS_ADD(node, MULTILINE); + return node; +} + +static int +node_new_no_newline(Node** node, ParseEnv* env) +{ + Node* n; + + n = node_new_anychar(ONIG_OPTION_NONE); + CHECK_NULL_RETURN_MEMERR(n); + *node = n; + return 0; +} + +static int +node_new_true_anychar(Node** node) +{ + Node* n; + + n = node_new_anychar(ONIG_OPTION_MULTILINE); + CHECK_NULL_RETURN_MEMERR(n); + *node = n; + return 0; +} + +static Node* +node_new_list(Node* left, Node* right) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + ND_SET_TYPE(node, ND_LIST); + ND_CAR(node) = left; + ND_CDR(node) = right; + return node; +} + +extern Node* +onig_node_new_list(Node* left, Node* right) +{ + return node_new_list(left, right); +} + +extern Node* +onig_node_new_alt(Node* left, Node* right) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + ND_SET_TYPE(node, ND_ALT); + ND_CAR(node) = left; + ND_CDR(node) = right; + return node; +} + +static Node* +make_list_or_alt(NodeType type, int n, Node* ns[]) +{ + Node* r; + + if (n <= 0) return NULL_NODE; + + if (n == 1) { + r = node_new(); + CHECK_NULL_RETURN(r); + ND_SET_TYPE(r, type); + ND_CAR(r) = ns[0]; + ND_CDR(r) = NULL_NODE; + } + else { + Node* right; + + r = node_new(); + CHECK_NULL_RETURN(r); + + right = make_list_or_alt(type, n - 1, ns + 1); + if (IS_NULL(right)) { + onig_node_free(r); + return NULL_NODE; + } + + ND_SET_TYPE(r, type); + ND_CAR(r) = ns[0]; + ND_CDR(r) = right; + } + + return r; +} + +static Node* +make_list(int n, Node* ns[]) +{ + return make_list_or_alt(ND_LIST, n, ns); +} + +static Node* +make_alt(int n, Node* ns[]) +{ + return make_list_or_alt(ND_ALT, n, ns); +} + +static Node* +node_new_anchor(int type) +{ + Node* node; + + node = node_new(); + CHECK_NULL_RETURN(node); + + ND_SET_TYPE(node, ND_ANCHOR); + ANCHOR_(node)->type = type; + ANCHOR_(node)->char_min_len = 0; + ANCHOR_(node)->char_max_len = INFINITE_LEN; + ANCHOR_(node)->ascii_mode = 0; + ANCHOR_(node)->lead_node = NULL_NODE; + return node; +} + +static Node* +node_new_anchor_with_options(int type, OnigOptionType options) +{ + int ascii_mode; + Node* node; + + node = node_new_anchor(type); + CHECK_NULL_RETURN(node); + + ascii_mode = OPTON_WORD_ASCII(options) && IS_WORD_ANCHOR_TYPE(type) ? 1 : 0; + ANCHOR_(node)->ascii_mode = ascii_mode; + + if (type == ANCR_TEXT_SEGMENT_BOUNDARY || + type == ANCR_NO_TEXT_SEGMENT_BOUNDARY) { + if (OPTON_TEXT_SEGMENT_WORD(options)) + ND_STATUS_ADD(node, TEXT_SEGMENT_WORD); + } + + return node; +} + +static Node* +node_new_backref(int back_num, int* backrefs, int by_name, +#ifdef USE_BACKREF_WITH_LEVEL + int exist_level, int nest_level, +#endif + ParseEnv* env) +{ + int i; + Node* node; + + node = node_new(); + CHECK_NULL_RETURN(node); + + ND_SET_TYPE(node, ND_BACKREF); + BACKREF_(node)->back_num = back_num; + BACKREF_(node)->back_dynamic = (int* )NULL; + if (by_name != 0) + ND_STATUS_ADD(node, BY_NAME); + + if (OPTON_IGNORECASE(env->options)) + ND_STATUS_ADD(node, IGNORECASE); + +#ifdef USE_BACKREF_WITH_LEVEL + if (exist_level != 0) { + ND_STATUS_ADD(node, NEST_LEVEL); + BACKREF_(node)->nest_level = nest_level; + } +#endif + + for (i = 0; i < back_num; i++) { + if (backrefs[i] <= env->num_mem && + IS_NULL(PARSEENV_MEMENV(env)[backrefs[i]].mem_node)) { + ND_STATUS_ADD(node, RECURSION); /* /...(\1).../ */ + break; + } + } + + if (back_num <= ND_BACKREFS_SIZE) { + for (i = 0; i < back_num; i++) + BACKREF_(node)->back_static[i] = backrefs[i]; + } + else { + int* p = (int* )xmalloc(sizeof(int) * back_num); + if (IS_NULL(p)) { + onig_node_free(node); + return NULL; + } + BACKREF_(node)->back_dynamic = p; + for (i = 0; i < back_num; i++) + p[i] = backrefs[i]; + } + + env->backref_num++; + return node; +} + +static Node* +node_new_backref_checker(int back_num, int* backrefs, int by_name, +#ifdef USE_BACKREF_WITH_LEVEL + int exist_level, int nest_level, +#endif + ParseEnv* env) +{ + Node* node; + + node = node_new_backref(back_num, backrefs, by_name, +#ifdef USE_BACKREF_WITH_LEVEL + exist_level, nest_level, +#endif + env); + CHECK_NULL_RETURN(node); + + ND_STATUS_ADD(node, CHECKER); + return node; +} + +#ifdef USE_CALL +static Node* +node_new_call(UChar* name, UChar* name_end, int gnum, int by_number) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + ND_SET_TYPE(node, ND_CALL); + CALL_(node)->by_number = by_number; + CALL_(node)->name = name; + CALL_(node)->name_end = name_end; + CALL_(node)->called_gnum = gnum; + CALL_(node)->entry_count = 1; + return node; +} +#endif + +static Node* +node_new_quantifier(int lower, int upper, int by_number) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + ND_SET_TYPE(node, ND_QUANT); + QUANT_(node)->lower = lower; + QUANT_(node)->upper = upper; + QUANT_(node)->greedy = 1; + QUANT_(node)->emptiness = BODY_IS_NOT_EMPTY; + QUANT_(node)->head_exact = NULL_NODE; + QUANT_(node)->next_head_exact = NULL_NODE; + QUANT_(node)->include_referred = 0; + QUANT_(node)->empty_status_mem = 0; + if (by_number != 0) + ND_STATUS_ADD(node, BY_NUMBER); + + return node; +} + +static Node* +node_new_bag(enum BagType type) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + ND_SET_TYPE(node, ND_BAG); + BAG_(node)->type = type; + + switch (type) { + case BAG_MEMORY: + BAG_(node)->m.regnum = 0; + BAG_(node)->m.called_addr = -1; + BAG_(node)->m.entry_count = 1; + BAG_(node)->m.called_state = 0; + break; + + case BAG_OPTION: + BAG_(node)->o.options = 0; + break; + + case BAG_STOP_BACKTRACK: + break; + + case BAG_IF_ELSE: + BAG_(node)->te.Then = 0; + BAG_(node)->te.Else = 0; + break; + } + + BAG_(node)->opt_count = 0; + return node; +} + +extern Node* +onig_node_new_bag(enum BagType type) +{ + return node_new_bag(type); +} + +static Node* +node_new_bag_if_else(Node* cond, Node* Then, Node* Else) +{ + Node* n; + n = node_new_bag(BAG_IF_ELSE); + CHECK_NULL_RETURN(n); + + ND_BODY(n) = cond; + BAG_(n)->te.Then = Then; + BAG_(n)->te.Else = Else; + return n; +} + +static Node* +node_new_memory(int is_named) +{ + Node* node = node_new_bag(BAG_MEMORY); + CHECK_NULL_RETURN(node); + if (is_named != 0) + ND_STATUS_ADD(node, NAMED_GROUP); + + return node; +} + +static Node* +node_new_option(OnigOptionType option) +{ + Node* node = node_new_bag(BAG_OPTION); + CHECK_NULL_RETURN(node); + BAG_(node)->o.options = option; + return node; +} + +static Node* +node_new_group(Node* content) +{ + Node* node; + + node = node_new(); + CHECK_NULL_RETURN(node); + ND_SET_TYPE(node, ND_LIST); + ND_CAR(node) = content; + ND_CDR(node) = NULL_NODE; + + return node; +} + +static Node* +node_drop_group(Node* group) +{ + Node* content; + + content = ND_CAR(group); + ND_CAR(group) = NULL_NODE; + onig_node_free(group); + return content; +} + +static int +node_set_fail(Node* node) +{ + ND_SET_TYPE(node, ND_GIMMICK); + GIMMICK_(node)->type = GIMMICK_FAIL; + return ONIG_NORMAL; +} + +static int +node_new_fail(Node** node, ParseEnv* env) +{ + *node = node_new(); + CHECK_NULL_RETURN_MEMERR(*node); + + return node_set_fail(*node); +} + +extern int +onig_node_reset_fail(Node* node) +{ + node_free_body(node); + return node_set_fail(node); +} + +static int +node_new_save_gimmick(Node** node, enum SaveType save_type, ParseEnv* env) +{ + int id; + + ID_ENTRY(env, id); + + *node = node_new(); + CHECK_NULL_RETURN_MEMERR(*node); + + ND_SET_TYPE(*node, ND_GIMMICK); + GIMMICK_(*node)->id = id; + GIMMICK_(*node)->type = GIMMICK_SAVE; + GIMMICK_(*node)->detail_type = (int )save_type; + + return ONIG_NORMAL; +} + +static int +node_new_update_var_gimmick(Node** node, enum UpdateVarType update_var_type, + int id, ParseEnv* env) +{ + *node = node_new(); + CHECK_NULL_RETURN_MEMERR(*node); + + ND_SET_TYPE(*node, ND_GIMMICK); + GIMMICK_(*node)->id = id; + GIMMICK_(*node)->type = GIMMICK_UPDATE_VAR; + GIMMICK_(*node)->detail_type = (int )update_var_type; + + return ONIG_NORMAL; +} + +static int +node_new_keep(Node** node, ParseEnv* env) +{ + int r; + + r = node_new_save_gimmick(node, SAVE_KEEP, env); + if (r != 0) return r; + + env->keep_num++; + return ONIG_NORMAL; +} + +#ifdef USE_CALLOUT + +extern void +onig_free_reg_callout_list(int n, CalloutListEntry* list) +{ + int i; + int j; + + if (IS_NULL(list)) return ; + + for (i = 0; i < n; i++) { + if (list[i].of == ONIG_CALLOUT_OF_NAME) { + for (j = 0; j < list[i].u.arg.passed_num; j++) { + if (list[i].u.arg.types[j] == ONIG_TYPE_STRING) { + if (IS_NOT_NULL(list[i].u.arg.vals[j].s.start)) + xfree(list[i].u.arg.vals[j].s.start); + } + } + } + else { /* ONIG_CALLOUT_OF_CONTENTS */ + if (IS_NOT_NULL(list[i].u.content.start)) { + xfree((void* )list[i].u.content.start); + } + } + } + + xfree(list); +} + +extern CalloutListEntry* +onig_reg_callout_list_at(regex_t* reg, int num) +{ + RegexExt* ext = reg->extp; + CHECK_NULL_RETURN(ext); + + if (num <= 0 || num > ext->callout_num) + return 0; + + num--; + return ext->callout_list + num; +} + +static int +reg_callout_list_entry(ParseEnv* env, int* rnum) +{ +#define INIT_CALLOUT_LIST_NUM 3 + + int num; + CalloutListEntry* list; + CalloutListEntry* e; + RegexExt* ext; + + ext = onig_get_regex_ext(env->reg); + CHECK_NULL_RETURN_MEMERR(ext); + + if (IS_NULL(ext->callout_list)) { + list = (CalloutListEntry* )xmalloc(sizeof(*list) * INIT_CALLOUT_LIST_NUM); + CHECK_NULL_RETURN_MEMERR(list); + + ext->callout_list = list; + ext->callout_list_alloc = INIT_CALLOUT_LIST_NUM; + ext->callout_num = 0; + } + + num = ext->callout_num + 1; + if (num > ext->callout_list_alloc) { + int alloc = ext->callout_list_alloc * 2; + list = (CalloutListEntry* )xrealloc(ext->callout_list, + sizeof(CalloutListEntry) * alloc); + CHECK_NULL_RETURN_MEMERR(list); + + ext->callout_list = list; + ext->callout_list_alloc = alloc; + } + + e = ext->callout_list + (num - 1); + + e->flag = 0; + e->of = 0; + e->in = ONIG_CALLOUT_OF_CONTENTS; + e->type = 0; + e->tag_start = 0; + e->tag_end = 0; + e->start_func = 0; + e->end_func = 0; + e->u.arg.num = 0; + e->u.arg.passed_num = 0; + + ext->callout_num = num; + *rnum = num; + return ONIG_NORMAL; +} + +static int +node_new_callout(Node** node, OnigCalloutOf callout_of, int num, int id, + ParseEnv* env) +{ + *node = node_new(); + CHECK_NULL_RETURN_MEMERR(*node); + + ND_SET_TYPE(*node, ND_GIMMICK); + GIMMICK_(*node)->id = id; + GIMMICK_(*node)->num = num; + GIMMICK_(*node)->type = GIMMICK_CALLOUT; + GIMMICK_(*node)->detail_type = (int )callout_of; + + return ONIG_NORMAL; +} +#endif + +static int +make_text_segment(Node** node, ParseEnv* env) +{ + int r; + int i; + Node* x; + Node* ns[2]; + + /* \X == (?>\O(?:\Y\O)*) */ + + ns[1] = NULL_NODE; + + r = ONIGERR_MEMORY; + ns[0] = node_new_anchor_with_options(ANCR_NO_TEXT_SEGMENT_BOUNDARY, env->options); + if (IS_NULL(ns[0])) goto err; + + r = node_new_true_anychar(&ns[1]); + if (r != 0) goto err1; + + x = make_list(2, ns); + if (IS_NULL(x)) goto err; + ns[0] = x; + ns[1] = NULL_NODE; + + x = node_new_quantifier(0, INFINITE_REPEAT, TRUE); + if (IS_NULL(x)) goto err; + + ND_BODY(x) = ns[0]; + ns[0] = NULL_NODE; + ns[1] = x; + + r = node_new_true_anychar(&ns[0]); + if (r != 0) goto err1; + + x = make_list(2, ns); + if (IS_NULL(x)) goto err; + + ns[0] = x; + ns[1] = NULL_NODE; + + x = node_new_bag(BAG_STOP_BACKTRACK); + if (IS_NULL(x)) goto err; + + ND_BODY(x) = ns[0]; + + *node = x; + return ONIG_NORMAL; + + err: + r = ONIGERR_MEMORY; + err1: + for (i = 0; i < 2; i++) onig_node_free(ns[i]); + return r; +} + +static int +make_absent_engine(Node** node, int pre_save_right_id, Node* absent, + Node* step_one, int lower, int upper, int possessive, + int is_range_cutter, ParseEnv* env) +{ + int r; + int i; + int id; + Node* x; + Node* ns[4]; + + for (i = 0; i < 4; i++) ns[i] = NULL_NODE; + + ns[1] = absent; + ns[3] = step_one; /* for err */ + r = node_new_save_gimmick(&ns[0], SAVE_S, env); + if (r != 0) goto err; + + id = GIMMICK_(ns[0])->id; + r = node_new_update_var_gimmick(&ns[2], UPDATE_VAR_RIGHT_RANGE_FROM_S_STACK, + id, env); + if (r != 0) goto err; + + if (is_range_cutter != 0) + ND_STATUS_ADD(ns[2], ABSENT_WITH_SIDE_EFFECTS); + + r = node_new_fail(&ns[3], env); + if (r != 0) goto err; + + x = make_list(4, ns); + if (IS_NULL(x)) goto err0; + + ns[0] = x; + ns[1] = step_one; + ns[2] = ns[3] = NULL_NODE; + + x = make_alt(2, ns); + if (IS_NULL(x)) goto err0; + + ns[0] = x; + + x = node_new_quantifier(lower, upper, FALSE); + if (IS_NULL(x)) goto err0; + + ND_BODY(x) = ns[0]; + ns[0] = x; + + if (possessive != 0) { + x = node_new_bag(BAG_STOP_BACKTRACK); + if (IS_NULL(x)) goto err0; + + ND_BODY(x) = ns[0]; + ns[0] = x; + } + + r = node_new_update_var_gimmick(&ns[1], UPDATE_VAR_RIGHT_RANGE_FROM_STACK, + pre_save_right_id, env); + if (r != 0) goto err; + + r = node_new_fail(&ns[2], env); + if (r != 0) goto err; + + x = make_list(2, ns + 1); + if (IS_NULL(x)) goto err0; + + ns[1] = x; ns[2] = NULL_NODE; + + x = make_alt(2, ns); + if (IS_NULL(x)) goto err0; + + if (is_range_cutter != FALSE) + ND_STATUS_ADD(x, SUPER); + + *node = x; + return ONIG_NORMAL; + + err0: + r = ONIGERR_MEMORY; + err: + for (i = 0; i < 4; i++) onig_node_free(ns[i]); + return r; +} + +static int +make_absent_tail(Node** node1, Node** node2, int pre_save_right_id, + ParseEnv* env) +{ + int r; + int id; + Node* save; + Node* x; + Node* ns[2]; + + *node1 = *node2 = NULL_NODE; + save = ns[0] = ns[1] = NULL_NODE; + + r = node_new_save_gimmick(&save, SAVE_RIGHT_RANGE, env); + if (r != 0) goto err; + + id = GIMMICK_(save)->id; + r = node_new_update_var_gimmick(&ns[0], UPDATE_VAR_RIGHT_RANGE_FROM_STACK, + id, env); + if (r != 0) goto err; + + r = node_new_fail(&ns[1], env); + if (r != 0) goto err; + + x = make_list(2, ns); + if (IS_NULL(x)) goto err0; + + ns[0] = NULL_NODE; ns[1] = x; + + r = node_new_update_var_gimmick(&ns[0], UPDATE_VAR_RIGHT_RANGE_FROM_STACK, + pre_save_right_id, env); + if (r != 0) goto err; + + x = make_alt(2, ns); + if (IS_NULL(x)) goto err0; + + *node1 = save; + *node2 = x; + return ONIG_NORMAL; + + err0: + r = ONIGERR_MEMORY; + err: + onig_node_free(save); + onig_node_free(ns[0]); + onig_node_free(ns[1]); + return r; +} + +static int +make_range_clear(Node** node, ParseEnv* env) +{ + int r; + int id; + Node* save; + Node* x; + Node* ns[2]; + + *node = NULL_NODE; + save = ns[0] = ns[1] = NULL_NODE; + + r = node_new_save_gimmick(&save, SAVE_RIGHT_RANGE, env); + if (r != 0) goto err; + + id = GIMMICK_(save)->id; + r = node_new_update_var_gimmick(&ns[0], UPDATE_VAR_RIGHT_RANGE_FROM_STACK, + id, env); + if (r != 0) goto err; + + r = node_new_fail(&ns[1], env); + if (r != 0) goto err; + + x = make_list(2, ns); + if (IS_NULL(x)) goto err0; + + ns[0] = NULL_NODE; ns[1] = x; + +#define ID_NOT_USED_DONT_CARE_ME 0 + + r = node_new_update_var_gimmick(&ns[0], UPDATE_VAR_RIGHT_RANGE_INIT, + ID_NOT_USED_DONT_CARE_ME, env); + if (r != 0) goto err; + ND_STATUS_ADD(ns[0], ABSENT_WITH_SIDE_EFFECTS); + + x = make_alt(2, ns); + if (IS_NULL(x)) goto err0; + + ND_STATUS_ADD(x, SUPER); + + ns[0] = save; + ns[1] = x; + save = NULL_NODE; + x = make_list(2, ns); + if (IS_NULL(x)) goto err0; + + *node = x; + return ONIG_NORMAL; + + err0: + r = ONIGERR_MEMORY; + err: + onig_node_free(save); + onig_node_free(ns[0]); + onig_node_free(ns[1]); + return r; +} + +static int +is_simple_one_char_repeat(Node* node, Node** rquant, Node** rbody, + int* is_possessive, ParseEnv* env) +{ + Node* quant; + Node* body; + + *rquant = *rbody = 0; + *is_possessive = 0; + + if (ND_TYPE(node) == ND_QUANT) { + quant = node; + } + else { + if (ND_TYPE(node) == ND_BAG) { + BagNode* en = BAG_(node); + if (en->type == BAG_STOP_BACKTRACK) { + *is_possessive = 1; + quant = ND_BAG_BODY(en); + if (ND_TYPE(quant) != ND_QUANT) + return 0; + } + else + return 0; + } + else + return 0; + } + + if (QUANT_(quant)->greedy == 0) + return 0; + + body = ND_BODY(quant); + switch (ND_TYPE(body)) { + case ND_STRING: + { + int len; + StrNode* sn = STR_(body); + UChar *s = sn->s; + + len = 0; + while (s < sn->end) { + s += enclen(env->enc, s); + len++; + } + if (len != 1) + return 0; + } + + case ND_CCLASS: + break; + + default: + return 0; + break; + } + + if (node != quant) { + ND_BODY(node) = 0; + onig_node_free(node); + } + ND_BODY(quant) = NULL_NODE; + *rquant = quant; + *rbody = body; + return 1; +} + +static int +make_absent_tree_for_simple_one_char_repeat(Node** node, + Node* absent, Node* quant, Node* body, int possessive, ParseEnv* env) +{ + int r; + int i; + int id1; + int lower, upper; + Node* x; + Node* ns[4]; + + *node = NULL_NODE; + r = ONIGERR_MEMORY; + ns[0] = ns[1] = NULL_NODE; + ns[2] = body, ns[3] = absent; + + lower = QUANT_(quant)->lower; + upper = QUANT_(quant)->upper; + + r = node_new_save_gimmick(&ns[0], SAVE_RIGHT_RANGE, env); + if (r != 0) goto err; + + id1 = GIMMICK_(ns[0])->id; + + r = make_absent_engine(&ns[1], id1, absent, body, lower, upper, possessive, + FALSE, env); + if (r != 0) goto err; + + ns[2] = ns[3] = NULL_NODE; + + r = node_new_update_var_gimmick(&ns[2], UPDATE_VAR_RIGHT_RANGE_FROM_STACK, + id1, env); + if (r != 0) goto err; + + x = make_list(3, ns); + if (IS_NULL(x)) goto err0; + + *node = x; + return ONIG_NORMAL; + + err0: + r = ONIGERR_MEMORY; + err: + for (i = 0; i < 4; i++) onig_node_free(ns[i]); + return r; +} + +static int +make_absent_tree(Node** node, Node* absent, Node* expr, int is_range_cutter, + ParseEnv* env) +{ + int r; + int i; + int id1, id2; + int possessive; + Node* x; + Node* ns[7]; + + r = ONIGERR_MEMORY; + for (i = 0; i < 7; i++) ns[i] = NULL_NODE; + ns[4] = expr; ns[5] = absent; + + if (is_range_cutter == 0) { + Node* quant; + Node* body; + + if (expr == NULL_NODE) { + /* default expr \O* */ + quant = node_new_quantifier(0, INFINITE_REPEAT, FALSE); + if (IS_NULL(quant)) goto err0; + + r = node_new_true_anychar(&body); + if (r != 0) { + onig_node_free(quant); + goto err; + } + possessive = 0; + goto simple; + } + else { + if (is_simple_one_char_repeat(expr, &quant, &body, &possessive, env)) { + simple: + r = make_absent_tree_for_simple_one_char_repeat(node, absent, quant, + body, possessive, env); + onig_node_free(quant); + if (r != 0) { + ns[4] = NULL_NODE; + onig_node_free(body); + goto err; + } + + return ONIG_NORMAL; + } + } + } + + r = node_new_save_gimmick(&ns[0], SAVE_RIGHT_RANGE, env); + if (r != 0) goto err; + + id1 = GIMMICK_(ns[0])->id; + + r = node_new_save_gimmick(&ns[1], SAVE_S, env); + if (r != 0) goto err; + + id2 = GIMMICK_(ns[1])->id; + + r = node_new_true_anychar(&ns[3]); + if (r != 0) goto err; + + possessive = 1; + r = make_absent_engine(&ns[2], id1, absent, ns[3], 0, INFINITE_REPEAT, + possessive, is_range_cutter, env); + if (r != 0) goto err; + + ns[3] = NULL_NODE; + ns[5] = NULL_NODE; + + r = node_new_update_var_gimmick(&ns[3], UPDATE_VAR_S_FROM_STACK, id2, env); + if (r != 0) goto err; + + if (is_range_cutter != 0) { + x = make_list(4, ns); + if (IS_NULL(x)) goto err0; + } + else { + r = make_absent_tail(&ns[5], &ns[6], id1, env); + if (r != 0) goto err; + + x = make_list(7, ns); + if (IS_NULL(x)) goto err0; + } + + *node = x; + return ONIG_NORMAL; + + err0: + r = ONIGERR_MEMORY; + err: + for (i = 0; i < 7; i++) onig_node_free(ns[i]); + return r; +} + +extern int +onig_node_str_cat(Node* node, const UChar* s, const UChar* end) +{ + int addlen = (int )(end - s); + + if (addlen > 0) { + int len = (int )(STR_(node)->end - STR_(node)->s); + + if (STR_(node)->capacity > 0 || (len + addlen > ND_STRING_BUF_SIZE - 1)) { + UChar* p; + int capa = len + addlen + ND_STRING_MARGIN; + + if (capa <= STR_(node)->capacity) { + onig_strcpy(STR_(node)->s + len, s, end); + } + else { + if (STR_(node)->s == STR_(node)->buf) + p = strcat_capa_from_static(STR_(node)->s, STR_(node)->end, + s, end, capa); + else + p = strcat_capa(STR_(node)->s, STR_(node)->end, s, end, capa); + + CHECK_NULL_RETURN_MEMERR(p); + STR_(node)->s = p; + STR_(node)->capacity = capa; + } + } + else { + onig_strcpy(STR_(node)->s + len, s, end); + } + STR_(node)->end = STR_(node)->s + len + addlen; + } + + return 0; +} + +extern int +onig_node_str_set(Node* node, const UChar* s, const UChar* end, int need_free) +{ + onig_node_str_clear(node, need_free); + return onig_node_str_cat(node, s, end); +} + +static int +node_str_remove_char(Node* node, UChar c) +{ + UChar* p; + int n; + + n = 0; + p = STR_(node)->s; + while (p < STR_(node)->end) { + if (*p == c) { + UChar *q, *q1; + q = q1 = p; + q1++; + while (q1 < STR_(node)->end) { + *q = *q1; + q++; q1++; + } + n++; + STR_(node)->end--; + } + else { + p++; + } + } + + return n; +} + +static int +node_str_cat_char(Node* node, UChar c) +{ + UChar s[1]; + + s[0] = c; + return onig_node_str_cat(node, s, s + 1); +} + +extern void +onig_node_str_clear(Node* node, int need_free) +{ + if (need_free != 0 && + STR_(node)->capacity != 0 && + IS_NOT_NULL(STR_(node)->s) && STR_(node)->s != STR_(node)->buf) { + xfree(STR_(node)->s); + } + + STR_(node)->flag = 0; + STR_(node)->s = STR_(node)->buf; + STR_(node)->end = STR_(node)->buf; + STR_(node)->capacity = 0; +} + +static int +node_set_str(Node* node, const UChar* s, const UChar* end) +{ + int r; + + ND_SET_TYPE(node, ND_STRING); + STR_(node)->flag = 0; + STR_(node)->s = STR_(node)->buf; + STR_(node)->end = STR_(node)->buf; + STR_(node)->capacity = 0; + + r = onig_node_str_cat(node, s, end); + return r; +} + +static Node* +node_new_str(const UChar* s, const UChar* end) +{ + int r; + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + r = node_set_str(node, s, end); + if (r != 0) { + onig_node_free(node); + return NULL; + } + + return node; +} + +static int +node_reset_str(Node* node, const UChar* s, const UChar* end) +{ + node_free_body(node); + return node_set_str(node, s, end); +} + +extern int +onig_node_reset_empty(Node* node) +{ + return node_reset_str(node, NULL, NULL); +} + +extern Node* +onig_node_new_str(const UChar* s, const UChar* end) +{ + return node_new_str(s, end); +} + +static Node* +node_new_str_with_options(const UChar* s, const UChar* end, + OnigOptionType options) +{ + Node* node; + node = node_new_str(s, end); + + if (OPTON_IGNORECASE(options)) + ND_STATUS_ADD(node, IGNORECASE); + + return node; +} + +static Node* +node_new_str_crude(UChar* s, UChar* end, OnigOptionType options) +{ + Node* node = node_new_str_with_options(s, end, options); + CHECK_NULL_RETURN(node); + ND_STRING_SET_CRUDE(node); + return node; +} + +static Node* +node_new_empty(void) +{ + return node_new_str(NULL, NULL); +} + +static Node* +node_new_str_crude_char(UChar c, OnigOptionType options) +{ + int i; + UChar p[1]; + Node* node; + + p[0] = c; + node = node_new_str_crude(p, p + 1, options); + CHECK_NULL_RETURN(node); + + /* clear buf tail */ + for (i = 1; i < ND_STRING_BUF_SIZE; i++) + STR_(node)->buf[i] = '\0'; + + return node; +} + +static Node* +str_node_split_last_char(Node* node, OnigEncoding enc) +{ + const UChar *p; + Node* rn; + StrNode* sn; + + sn = STR_(node); + rn = NULL_NODE; + if (sn->end > sn->s) { + p = onigenc_get_prev_char_head(enc, sn->s, sn->end); + if (p && p > sn->s) { /* can be split. */ + rn = node_new_str(p, sn->end); + CHECK_NULL_RETURN(rn); + + sn->end = (UChar* )p; + STR_(rn)->flag = sn->flag; + ND_STATUS(rn) = ND_STATUS(node); + } + } + + return rn; +} + +static int +str_node_can_be_split(Node* node, OnigEncoding enc) +{ + StrNode* sn = STR_(node); + if (sn->end > sn->s) { + return ((enclen(enc, sn->s) < sn->end - sn->s) ? 1 : 0); + } + return 0; +} + +static int +scan_number(UChar** src, const UChar* end, OnigEncoding enc) +{ + int num, val; + OnigCodePoint c; + UChar* p; + PFETCH_READY; + + p = *src; + num = 0; + while (! PEND) { + PFETCH(c); + if (IS_CODE_DIGIT_ASCII(enc, c)) { + val = (int )DIGITVAL(c); + if ((ONIG_INT_MAX - val) / 10 < num) + return -1; /* overflow */ + + num = num * 10 + val; + } + else { + PUNFETCH; + break; + } + } + *src = p; + return num; +} + +static int +scan_hexadecimal_number(UChar** src, UChar* end, int minlen, int maxlen, + OnigEncoding enc, OnigCodePoint* rcode) +{ + OnigCodePoint code; + OnigCodePoint c; + unsigned int val; + int n; + UChar* p; + PFETCH_READY; + + p = *src; + code = 0; + n = 0; + while (! PEND && n < maxlen) { + PFETCH(c); + if (IS_CODE_XDIGIT_ASCII(enc, c)) { + n++; + val = (unsigned int )XDIGITVAL(enc, c); + if ((UINT_MAX - val) / 16UL < code) + return ONIGERR_TOO_BIG_NUMBER; /* overflow */ + + code = (code << 4) + val; + } + else { + PUNFETCH; + break; + } + } + + if (n < minlen) + return ONIGERR_INVALID_CODE_POINT_VALUE; + + *rcode = code; + *src = p; + return ONIG_NORMAL; +} + +static int +scan_octal_number(UChar** src, UChar* end, int minlen, int maxlen, + OnigEncoding enc, OnigCodePoint* rcode) +{ + OnigCodePoint code; + OnigCodePoint c; + unsigned int val; + int n; + UChar* p; + PFETCH_READY; + + p = *src; + code = 0; + n = 0; + while (! PEND && n < maxlen) { + PFETCH(c); + if (IS_CODE_DIGIT_ASCII(enc, c) && c < '8') { + n++; + val = (unsigned int )ODIGITVAL(c); + if ((UINT_MAX - val) / 8UL < code) + return ONIGERR_TOO_BIG_NUMBER; /* overflow */ + + code = (code << 3) + val; + } + else { + PUNFETCH; + break; + } + } + + if (n < minlen) + return ONIGERR_INVALID_CODE_POINT_VALUE; + + *rcode = code; + *src = p; + return ONIG_NORMAL; +} + +static int +scan_number_of_base(UChar** src, UChar* end, int minlen, + OnigEncoding enc, OnigCodePoint* rcode, int base) +{ + int r; + + if (base == 16) + r = scan_hexadecimal_number(src, end, minlen, 8, enc, rcode); + else if (base == 8) + r = scan_octal_number(src, end, minlen, 11, enc, rcode); + else + r = ONIGERR_INVALID_CODE_POINT_VALUE; + + return r; +} + +#define IS_CODE_POINT_DIVIDE(c) ((c) == ' ' || (c) == '\n') + +enum CPS_STATE { + CPS_EMPTY = 0, + CPS_START = 1, + CPS_RANGE = 2 +}; + +static int +check_code_point_sequence_cc(UChar* p, UChar* end, int base, + OnigEncoding enc, int state) +{ + int r; + int n; + int end_digit; + OnigCodePoint code; + OnigCodePoint c; + PFETCH_READY; + + end_digit = FALSE; + n = 0; + while (! PEND) { + start: + PFETCH(c); + if (c == '}') { + end_char: + if (state == CPS_RANGE) return ONIGERR_INVALID_CODE_POINT_VALUE; + return n; + } + + if (IS_CODE_POINT_DIVIDE(c)) { + while (! PEND) { + PFETCH(c); + if (! IS_CODE_POINT_DIVIDE(c)) break; + } + if (IS_CODE_POINT_DIVIDE(c)) + return ONIGERR_INVALID_CODE_POINT_VALUE; + } + else if (c == '-') { + range: + if (state != CPS_START) return ONIGERR_INVALID_CODE_POINT_VALUE; + if (PEND) return ONIGERR_INVALID_CODE_POINT_VALUE; + end_digit = FALSE; + state = CPS_RANGE; + goto start; + } + else if (end_digit == TRUE) { + if (base == 16) { + if (IS_CODE_XDIGIT_ASCII(enc, c)) + return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE; + } + else if (base == 8) { + if (IS_CODE_DIGIT_ASCII(enc, c) && c < '8') + return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE; + } + + return ONIGERR_INVALID_CODE_POINT_VALUE; + } + + if (c == '}') goto end_char; + if (c == '-') goto range; + + PUNFETCH; + r = scan_number_of_base(&p, end, 1, enc, &code, base); + if (r != 0) return r; + n++; + end_digit = TRUE; + state = (state == CPS_RANGE) ? CPS_EMPTY : CPS_START; + } + + return ONIGERR_INVALID_CODE_POINT_VALUE; +} + +static int +check_code_point_sequence(UChar* p, UChar* end, int base, OnigEncoding enc) +{ + int r; + int n; + int end_digit; + OnigCodePoint code; + OnigCodePoint c; + PFETCH_READY; + + end_digit = FALSE; + n = 0; + while (! PEND) { + PFETCH(c); + if (c == '}') { + end_char: + return n; + } + + if (IS_CODE_POINT_DIVIDE(c)) { + while (! PEND) { + PFETCH(c); + if (! IS_CODE_POINT_DIVIDE(c)) break; + } + if (IS_CODE_POINT_DIVIDE(c)) + return ONIGERR_INVALID_CODE_POINT_VALUE; + } + else if (end_digit == TRUE) { + if (base == 16) { + if (IS_CODE_XDIGIT_ASCII(enc, c)) + return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE; + } + else if (base == 8) { + if (IS_CODE_DIGIT_ASCII(enc, c) && c < '8') + return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE; + } + + return ONIGERR_INVALID_CODE_POINT_VALUE; + } + + if (c == '}') goto end_char; + + PUNFETCH; + r = scan_number_of_base(&p, end, 1, enc, &code, base); + if (r != 0) return r; + n++; + end_digit = TRUE; + } + + return ONIGERR_INVALID_CODE_POINT_VALUE; +} + +static int +get_next_code_point(UChar** src, UChar* end, int base, OnigEncoding enc, int in_cc, OnigCodePoint* rcode) +{ + int r; + OnigCodePoint c; + UChar* p; + PFETCH_READY; + + p = *src; + while (! PEND) { + PFETCH(c); + if (! IS_CODE_POINT_DIVIDE(c)) { + if (c == '}') { + *src = p; + return 1; /* end of sequence */ + } + else if (c == '-' && in_cc == TRUE) { + *src = p; + return 2; /* range */ + } + PUNFETCH; + break; + } + else { + if (PEND) + return ONIGERR_INVALID_CODE_POINT_VALUE; + } + } + + r = scan_number_of_base(&p, end, 1, enc, rcode, base); + if (r != 0) return r; + + *src = p; + return ONIG_NORMAL; +} + + +#define BB_WRITE_CODE_POINT(bbuf,pos,code) \ + BB_WRITE(bbuf, pos, &(code), SIZE_CODE_POINT) + +/* data format: + [n][from-1][to-1][from-2][to-2] ... [from-n][to-n] + (all data size is OnigCodePoint) + */ +static int +new_code_range(BBuf** pbuf) +{ +#define INIT_MULTI_BYTE_RANGE_SIZE (SIZE_CODE_POINT * 5) + int r; + OnigCodePoint n; + BBuf* bbuf; + + bbuf = *pbuf = (BBuf* )xmalloc(sizeof(BBuf)); + CHECK_NULL_RETURN_MEMERR(bbuf); + r = BB_INIT(bbuf, INIT_MULTI_BYTE_RANGE_SIZE); + if (r != 0) { + xfree(bbuf); + *pbuf = 0; + return r; + } + + n = 0; + BB_WRITE_CODE_POINT(bbuf, 0, n); + return 0; +} + +static int +add_code_range_to_buf(BBuf** pbuf, OnigCodePoint from, OnigCodePoint to) +{ + int r, inc_n, pos; + int low, high, bound, x; + OnigCodePoint n, *data; + BBuf* bbuf; + + if (from > to) { + n = from; from = to; to = n; + } + + if (IS_NULL(*pbuf)) { + r = new_code_range(pbuf); + if (r != 0) return r; + bbuf = *pbuf; + n = 0; + } + else { + bbuf = *pbuf; + GET_CODE_POINT(n, bbuf->p); + } + data = (OnigCodePoint* )(bbuf->p); + data++; + + for (low = 0, bound = n; low < bound; ) { + x = (low + bound) >> 1; + if (from > data[x*2 + 1]) + low = x + 1; + else + bound = x; + } + + high = (to == ~((OnigCodePoint )0)) ? n : low; + for (bound = n; high < bound; ) { + x = (high + bound) >> 1; + if (to + 1 >= data[x*2]) + high = x + 1; + else + bound = x; + } + + inc_n = low + 1 - high; + if (n + inc_n > ONIG_MAX_MULTI_BYTE_RANGES_NUM) + return ONIGERR_TOO_MANY_MULTI_BYTE_RANGES; + + if (inc_n != 1) { + if (from > data[low*2]) + from = data[low*2]; + if (to < data[(high - 1)*2 + 1]) + to = data[(high - 1)*2 + 1]; + } + + if (inc_n != 0 && (OnigCodePoint )high < n) { + int from_pos = SIZE_CODE_POINT * (1 + high * 2); + int to_pos = SIZE_CODE_POINT * (1 + (low + 1) * 2); + int size = (n - high) * 2 * SIZE_CODE_POINT; + + if (inc_n > 0) { + BB_MOVE_RIGHT(bbuf, from_pos, to_pos, size); + } + else { + BB_MOVE_LEFT_REDUCE(bbuf, from_pos, to_pos); + } + } + + pos = SIZE_CODE_POINT * (1 + low * 2); + BB_ENSURE_SIZE(bbuf, pos + SIZE_CODE_POINT * 2); + BB_WRITE_CODE_POINT(bbuf, pos, from); + BB_WRITE_CODE_POINT(bbuf, pos + SIZE_CODE_POINT, to); + n += inc_n; + BB_WRITE_CODE_POINT(bbuf, 0, n); + + return 0; +} + +static int +add_code_range(BBuf** pbuf, ParseEnv* env, OnigCodePoint from, OnigCodePoint to) +{ + if (from > to) { + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC)) + return 0; + else + return ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS; + } + + return add_code_range_to_buf(pbuf, from, to); +} + +static int +not_code_range_buf(OnigEncoding enc, BBuf* bbuf, BBuf** pbuf) +{ + int r, i, n; + OnigCodePoint pre, from, *data, to = 0; + + *pbuf = (BBuf* )NULL; + if (IS_NULL(bbuf)) { + set_all: + return SET_ALL_MULTI_BYTE_RANGE(enc, pbuf); + } + + data = (OnigCodePoint* )(bbuf->p); + GET_CODE_POINT(n, data); + data++; + if (n <= 0) goto set_all; + + r = 0; + pre = MBCODE_START_POS(enc); + for (i = 0; i < n; i++) { + from = data[i*2]; + to = data[i*2+1]; + if (pre <= from - 1) { + r = add_code_range_to_buf(pbuf, pre, from - 1); + if (r != 0) { + bbuf_free(*pbuf); + return r; + } + } + if (to == ~((OnigCodePoint )0)) break; + pre = to + 1; + } + if (to < ~((OnigCodePoint )0)) { + r = add_code_range_to_buf(pbuf, to + 1, ~((OnigCodePoint )0)); + if (r != 0) bbuf_free(*pbuf); + } + return r; +} + +#define SWAP_BB_NOT(bbuf1, not1, bbuf2, not2) do {\ + BBuf *tbuf; \ + int tnot; \ + tnot = not1; not1 = not2; not2 = tnot; \ + tbuf = bbuf1; bbuf1 = bbuf2; bbuf2 = tbuf; \ +} while (0) + +static int +or_code_range_buf(OnigEncoding enc, BBuf* bbuf1, int not1, + BBuf* bbuf2, int not2, BBuf** pbuf) +{ + int r; + OnigCodePoint i, n1, *data1; + OnigCodePoint from, to; + + *pbuf = (BBuf* )NULL; + if (IS_NULL(bbuf1) && IS_NULL(bbuf2)) { + if (not1 != 0 || not2 != 0) + return SET_ALL_MULTI_BYTE_RANGE(enc, pbuf); + return 0; + } + + r = 0; + if (IS_NULL(bbuf2)) + SWAP_BB_NOT(bbuf1, not1, bbuf2, not2); + + if (IS_NULL(bbuf1)) { + if (not1 != 0) { + return SET_ALL_MULTI_BYTE_RANGE(enc, pbuf); + } + else { + if (not2 == 0) { + return bbuf_clone(pbuf, bbuf2); + } + else { + return not_code_range_buf(enc, bbuf2, pbuf); + } + } + } + + if (not1 != 0) + SWAP_BB_NOT(bbuf1, not1, bbuf2, not2); + + data1 = (OnigCodePoint* )(bbuf1->p); + GET_CODE_POINT(n1, data1); + data1++; + + if (not2 == 0 && not1 == 0) { /* 1 OR 2 */ + r = bbuf_clone(pbuf, bbuf2); + } + else if (not1 == 0) { /* 1 OR (not 2) */ + r = not_code_range_buf(enc, bbuf2, pbuf); + } + if (r != 0) return r; + + for (i = 0; i < n1; i++) { + from = data1[i*2]; + to = data1[i*2+1]; + r = add_code_range_to_buf(pbuf, from, to); + if (r != 0) return r; + } + return 0; +} + +static int +and_code_range1(BBuf** pbuf, OnigCodePoint from1, OnigCodePoint to1, + OnigCodePoint* data, int n) +{ + int i, r; + OnigCodePoint from2, to2; + + for (i = 0; i < n; i++) { + from2 = data[i*2]; + to2 = data[i*2+1]; + if (from2 < from1) { + if (to2 < from1) continue; + else { + from1 = to2 + 1; + } + } + else if (from2 <= to1) { + if (to2 < to1) { + if (from1 <= from2 - 1) { + r = add_code_range_to_buf(pbuf, from1, from2-1); + if (r != 0) return r; + } + from1 = to2 + 1; + } + else { + to1 = from2 - 1; + } + } + else { + from1 = from2; + } + if (from1 > to1) break; + } + if (from1 <= to1) { + r = add_code_range_to_buf(pbuf, from1, to1); + if (r != 0) return r; + } + return 0; +} + +static int +and_code_range_buf(BBuf* bbuf1, int not1, BBuf* bbuf2, int not2, BBuf** pbuf) +{ + int r; + OnigCodePoint i, j, n1, n2, *data1, *data2; + OnigCodePoint from, to, from1, to1, from2, to2; + + *pbuf = (BBuf* )NULL; + if (IS_NULL(bbuf1)) { + if (not1 != 0 && IS_NOT_NULL(bbuf2)) /* not1 != 0 -> not2 == 0 */ + return bbuf_clone(pbuf, bbuf2); + return 0; + } + else if (IS_NULL(bbuf2)) { + if (not2 != 0) + return bbuf_clone(pbuf, bbuf1); + return 0; + } + + if (not1 != 0) + SWAP_BB_NOT(bbuf1, not1, bbuf2, not2); + + data1 = (OnigCodePoint* )(bbuf1->p); + data2 = (OnigCodePoint* )(bbuf2->p); + GET_CODE_POINT(n1, data1); + GET_CODE_POINT(n2, data2); + data1++; + data2++; + + if (not2 == 0 && not1 == 0) { /* 1 AND 2 */ + for (i = 0; i < n1; i++) { + from1 = data1[i*2]; + to1 = data1[i*2+1]; + for (j = 0; j < n2; j++) { + from2 = data2[j*2]; + to2 = data2[j*2+1]; + if (from2 > to1) break; + if (to2 < from1) continue; + from = MAX(from1, from2); + to = MIN(to1, to2); + r = add_code_range_to_buf(pbuf, from, to); + if (r != 0) return r; + } + } + } + else if (not1 == 0) { /* 1 AND (not 2) */ + for (i = 0; i < n1; i++) { + from1 = data1[i*2]; + to1 = data1[i*2+1]; + r = and_code_range1(pbuf, from1, to1, data2, n2); + if (r != 0) return r; + } + } + + return 0; +} + +static int +and_cclass(CClassNode* dest, CClassNode* cc, OnigEncoding enc) +{ + int r, not1, not2; + BBuf *buf1, *buf2, *pbuf; + BitSetRef bsr1, bsr2; + BitSet bs1, bs2; + + not1 = IS_NCCLASS_NOT(dest); + bsr1 = dest->bs; + buf1 = dest->mbuf; + not2 = IS_NCCLASS_NOT(cc); + bsr2 = cc->bs; + buf2 = cc->mbuf; + + if (not1 != 0) { + bitset_invert_to(bsr1, bs1); + bsr1 = bs1; + } + if (not2 != 0) { + bitset_invert_to(bsr2, bs2); + bsr2 = bs2; + } + bitset_and(bsr1, bsr2); + if (bsr1 != dest->bs) { + bitset_copy(dest->bs, bsr1); + } + if (not1 != 0) { + bitset_invert(dest->bs); + } + + if (! ONIGENC_IS_SINGLEBYTE(enc)) { + if (not1 != 0 && not2 != 0) { + r = or_code_range_buf(enc, buf1, 0, buf2, 0, &pbuf); + } + else { + r = and_code_range_buf(buf1, not1, buf2, not2, &pbuf); + if (r == 0 && not1 != 0) { + BBuf *tbuf; + r = not_code_range_buf(enc, pbuf, &tbuf); + if (r != 0) { + bbuf_free(pbuf); + return r; + } + bbuf_free(pbuf); + pbuf = tbuf; + } + } + if (r != 0) return r; + + dest->mbuf = pbuf; + bbuf_free(buf1); + return r; + } + return 0; +} + +static int +or_cclass(CClassNode* dest, CClassNode* cc, OnigEncoding enc) +{ + int r, not1, not2; + BBuf *buf1, *buf2, *pbuf; + BitSetRef bsr1, bsr2; + BitSet bs1, bs2; + + not1 = IS_NCCLASS_NOT(dest); + bsr1 = dest->bs; + buf1 = dest->mbuf; + not2 = IS_NCCLASS_NOT(cc); + bsr2 = cc->bs; + buf2 = cc->mbuf; + + if (not1 != 0) { + bitset_invert_to(bsr1, bs1); + bsr1 = bs1; + } + if (not2 != 0) { + bitset_invert_to(bsr2, bs2); + bsr2 = bs2; + } + bitset_or(bsr1, bsr2); + if (bsr1 != dest->bs) { + bitset_copy(dest->bs, bsr1); + } + if (not1 != 0) { + bitset_invert(dest->bs); + } + + if (! ONIGENC_IS_SINGLEBYTE(enc)) { + if (not1 != 0 && not2 != 0) { + r = and_code_range_buf(buf1, 0, buf2, 0, &pbuf); + } + else { + r = or_code_range_buf(enc, buf1, not1, buf2, not2, &pbuf); + if (r == 0 && not1 != 0) { + BBuf *tbuf; + r = not_code_range_buf(enc, pbuf, &tbuf); + if (r != 0) { + bbuf_free(pbuf); + return r; + } + bbuf_free(pbuf); + pbuf = tbuf; + } + } + if (r != 0) return r; + + dest->mbuf = pbuf; + bbuf_free(buf1); + return r; + } + else + return 0; +} + +static OnigCodePoint +conv_backslash_value(OnigCodePoint c, ParseEnv* env) +{ + if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_CONTROL_CHARS)) { + switch (c) { + case 'n': return '\n'; + case 't': return '\t'; + case 'r': return '\r'; + case 'f': return '\f'; + case 'a': return '\007'; + case 'b': return '\010'; + case 'e': return '\033'; + case 'v': + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_V_VTAB)) + return '\v'; + break; + + default: + break; + } + } + return c; +} + +static int +is_invalid_quantifier_target(Node* node) +{ + switch (ND_TYPE(node)) { + case ND_ANCHOR: + case ND_GIMMICK: + return 1; + break; + + case ND_BAG: + /* allow enclosed elements */ + /* return is_invalid_quantifier_target(ND_BODY(node)); */ + break; + + case ND_LIST: + do { + if (! is_invalid_quantifier_target(ND_CAR(node))) return 0; + } while (IS_NOT_NULL(node = ND_CDR(node))); + return 0; + break; + + case ND_ALT: + do { + if (is_invalid_quantifier_target(ND_CAR(node))) return 1; + } while (IS_NOT_NULL(node = ND_CDR(node))); + break; + + default: + break; + } + return 0; +} + +/* ?:0, *:1, +:2, ??:3, *?:4, +?:5 */ +static int +quantifier_type_num(QuantNode* q) +{ + if (q->greedy) { + if (q->lower == 0) { + if (q->upper == 1) return 0; + else if (IS_INFINITE_REPEAT(q->upper)) return 1; + } + else if (q->lower == 1) { + if (IS_INFINITE_REPEAT(q->upper)) return 2; + } + } + else { + if (q->lower == 0) { + if (q->upper == 1) return 3; + else if (IS_INFINITE_REPEAT(q->upper)) return 4; + } + else if (q->lower == 1) { + if (IS_INFINITE_REPEAT(q->upper)) return 5; + } + } + return -1; +} + + +enum ReduceType { + RQ_ASIS = 0, /* as is */ + RQ_DEL, /* delete parent */ + RQ_A, /* to '*' */ + RQ_P, /* to '+' */ + RQ_AQ, /* to '*?' */ + RQ_QQ, /* to '??' */ + RQ_P_QQ, /* to '+)??' */ +}; + +static enum ReduceType ReduceTypeTable[6][6] = { + {RQ_DEL, RQ_A, RQ_A, RQ_QQ, RQ_AQ, RQ_ASIS}, /* '?' */ + {RQ_DEL, RQ_DEL, RQ_DEL, RQ_P_QQ, RQ_P_QQ, RQ_DEL}, /* '*' */ + {RQ_A, RQ_A, RQ_DEL, RQ_ASIS, RQ_P_QQ, RQ_DEL}, /* '+' */ + {RQ_DEL, RQ_AQ, RQ_AQ, RQ_DEL, RQ_AQ, RQ_AQ}, /* '??' */ + {RQ_DEL, RQ_DEL, RQ_DEL, RQ_DEL, RQ_DEL, RQ_DEL}, /* '*?' */ + {RQ_ASIS, RQ_A, RQ_P, RQ_AQ, RQ_AQ, RQ_DEL} /* '+?' */ +}; + +extern int +onig_reduce_nested_quantifier(Node* pnode) +{ + int pnum, cnum; + QuantNode *p, *c; + Node* cnode; + + cnode = ND_BODY(pnode); + + p = QUANT_(pnode); + c = QUANT_(cnode); + pnum = quantifier_type_num(p); + cnum = quantifier_type_num(c); + if (pnum < 0 || cnum < 0) { + if (p->lower == p->upper && c->lower == c->upper) { + int n = onig_positive_int_multiply(p->lower, c->lower); + if (n < 0) return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE; + + p->lower = p->upper = n; + ND_BODY(pnode) = ND_BODY(cnode); + goto remove_cnode; + } + + return 0; + } + + switch(ReduceTypeTable[cnum][pnum]) { + case RQ_DEL: + *pnode = *cnode; + goto remove_cnode; + break; + case RQ_A: + ND_BODY(pnode) = ND_BODY(cnode); + p->lower = 0; p->upper = INFINITE_REPEAT; p->greedy = 1; + goto remove_cnode; + break; + case RQ_P: + ND_BODY(pnode) = ND_BODY(cnode); + p->lower = 1; p->upper = INFINITE_REPEAT; p->greedy = 1; + goto remove_cnode; + break; + case RQ_AQ: + ND_BODY(pnode) = ND_BODY(cnode); + p->lower = 0; p->upper = INFINITE_REPEAT; p->greedy = 0; + goto remove_cnode; + break; + case RQ_QQ: + ND_BODY(pnode) = ND_BODY(cnode); + p->lower = 0; p->upper = 1; p->greedy = 0; + goto remove_cnode; + break; + case RQ_P_QQ: + p->lower = 0; p->upper = 1; p->greedy = 0; + c->lower = 1; c->upper = INFINITE_REPEAT; c->greedy = 1; + break; + case RQ_ASIS: + break; + } + + return 0; + + remove_cnode: + ND_BODY(cnode) = NULL_NODE; + onig_node_free(cnode); + return 0; +} + +static int +node_new_general_newline(Node** node, ParseEnv* env) +{ + int r; + int dlen, alen; + UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN * 2]; + Node* crnl; + Node* ncc; + Node* x; + CClassNode* cc; + + dlen = ONIGENC_CODE_TO_MBC(env->enc, 0x0d, buf); + if (dlen < 0) return dlen; + alen = ONIGENC_CODE_TO_MBC(env->enc, NEWLINE_CODE, buf + dlen); + if (alen < 0) return alen; + + crnl = node_new_str_crude(buf, buf + dlen + alen, ONIG_OPTION_NONE); + CHECK_NULL_RETURN_MEMERR(crnl); + + ncc = node_new_cclass(); + if (IS_NULL(ncc)) goto err2; + + cc = CCLASS_(ncc); + if (dlen == 1) { + bitset_set_range(cc->bs, NEWLINE_CODE, 0x0d); + } + else { + r = add_code_range(&(cc->mbuf), env, NEWLINE_CODE, 0x0d); + if (r != 0) { + err1: + onig_node_free(ncc); + err2: + onig_node_free(crnl); + return ONIGERR_MEMORY; + } + } + + if (ONIGENC_IS_UNICODE_ENCODING(env->enc)) { + r = add_code_range(&(cc->mbuf), env, 0x85, 0x85); + if (r != 0) goto err1; + r = add_code_range(&(cc->mbuf), env, 0x2028, 0x2029); + if (r != 0) goto err1; + } + + x = node_new_bag_if_else(crnl, NULL_NODE, ncc); + if (IS_NULL(x)) goto err1; + + *node = x; + return 0; +} + +enum TokenSyms { + TK_EOT = 0, /* end of token */ + TK_CRUDE_BYTE, + TK_CHAR, + TK_STRING, + TK_CODE_POINT, + TK_ANYCHAR, + TK_CHAR_TYPE, + TK_BACKREF, + TK_CALL, + TK_ANCHOR, + TK_REPEAT, + TK_INTERVAL, + TK_ANYCHAR_ANYTIME, /* SQL '%' == .* */ + TK_ALT, + TK_SUBEXP_OPEN, + TK_SUBEXP_CLOSE, + TK_OPEN_CC, + TK_QUOTE_OPEN, + TK_CHAR_PROPERTY, /* \p{...}, \P{...} */ + TK_KEEP, /* \K */ + TK_GENERAL_NEWLINE, /* \R */ + TK_NO_NEWLINE, /* \N */ + TK_TRUE_ANYCHAR, /* \O */ + TK_TEXT_SEGMENT, /* \X */ + + /* in cc */ + TK_CC_CLOSE, + TK_CC_RANGE, + TK_CC_POSIX_BRACKET_OPEN, + TK_CC_AND, /* && */ + TK_CC_OPEN_CC /* [ */ +}; + +typedef struct { + enum TokenSyms type; + int code_point_continue; + int escaped; + int base_num; /* is number: 8, 16 (used in [....]) */ + UChar* backp; + union { + UChar* s; + UChar byte; + OnigCodePoint code; + int anchor; + int subtype; + struct { + int lower; + int upper; + int greedy; + int possessive; + } repeat; + struct { + int num; + int ref1; + int* refs; + int by_name; +#ifdef USE_BACKREF_WITH_LEVEL + int exist_level; + int level; /* \k */ +#endif + } backref; + struct { + UChar* name; + UChar* name_end; + int gnum; + int by_number; + } call; + struct { + int ctype; + int not; + } prop; + } u; +} PToken; + +static void +ptoken_init(PToken* tok) +{ + tok->code_point_continue = 0; +} + +static int +fetch_interval(UChar** src, UChar* end, PToken* tok, ParseEnv* env) +{ + int low, up, syn_allow, non_low; + int r; + OnigCodePoint c; + OnigEncoding enc; + UChar* p; + PFETCH_READY; + + p = *src; + r = 0; + non_low = 0; + enc = env->enc; + syn_allow = IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_INVALID_INTERVAL); + + if (PEND) { + if (syn_allow) + return 1; /* "....{" : OK! */ + else + return ONIGERR_END_PATTERN_AT_LEFT_BRACE; /* "....{" syntax error */ + } + + if (! syn_allow) { + c = PPEEK; + if (c == ')' || c == '(' || c == '|') { + return ONIGERR_END_PATTERN_AT_LEFT_BRACE; + } + } + + low = scan_number(&p, end, env->enc); + if (low < 0) return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE; + if (low > ONIG_MAX_REPEAT_NUM) + return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE; + + if (p == *src) { /* can't read low */ + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV)) { + /* allow {,n} as {0,n} */ + low = 0; + non_low = 1; + } + else + goto invalid; + } + + if (PEND) goto invalid; + PFETCH(c); + if (c == ',') { + UChar* prev = p; + up = scan_number(&p, end, env->enc); + if (up < 0) return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE; + if (up > ONIG_MAX_REPEAT_NUM) + return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE; + + if (p == prev) { + if (non_low != 0) + goto invalid; + up = INFINITE_REPEAT; /* {n,} : {n,infinite} */ + } + } + else { + if (non_low != 0) + goto invalid; + + PUNFETCH; + up = low; /* {n} : exact n times */ + r = 2; /* fixed */ + } + + if (PEND) goto invalid; + PFETCH(c); + if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_BRACE_INTERVAL)) { + if (c != MC_ESC(env->syntax) || PEND) goto invalid; + PFETCH(c); + } + if (c != '}') goto invalid; + + if (!IS_INFINITE_REPEAT(up) && low > up) { + /* {n,m}+ supported case */ + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL)) + return ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE; + + tok->u.repeat.possessive = 1; + { + int tmp; + tmp = low; low = up; up = tmp; + } + } + else + tok->u.repeat.possessive = 0; + + tok->type = TK_INTERVAL; + tok->u.repeat.lower = low; + tok->u.repeat.upper = up; + *src = p; + return r; /* 0: normal {n,m}, 2: fixed {n} */ + + invalid: + if (syn_allow) { + /* *src = p; */ /* !!! Don't do this line !!! */ + return 1; /* OK */ + } + else + return ONIGERR_INVALID_REPEAT_RANGE_PATTERN; +} + +/* \M-, \C-, \c, or \... */ +static int +fetch_escaped_value_raw(UChar** src, UChar* end, ParseEnv* env, + OnigCodePoint* val) +{ + int v; + OnigCodePoint c; + OnigEncoding enc = env->enc; + UChar* p = *src; + + if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE; + + PFETCH_S(c); + switch (c) { + case 'M': + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META)) { + if (PEND) return ONIGERR_END_PATTERN_AT_META; + PFETCH_S(c); + if (c != '-') return ONIGERR_META_CODE_SYNTAX; + if (PEND) return ONIGERR_END_PATTERN_AT_META; + PFETCH_S(c); + if (c == MC_ESC(env->syntax)) { + v = fetch_escaped_value_raw(&p, end, env, &c); + if (v < 0) return v; + } + c = ((c & 0xff) | 0x80); + } + else + goto backslash; + break; + + case 'C': + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL)) { + if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL; + PFETCH_S(c); + if (c != '-') return ONIGERR_CONTROL_CODE_SYNTAX; + goto control; + } + else + goto backslash; + + case 'c': + if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_C_CONTROL)) { + control: + if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL; + PFETCH_S(c); + if (c == '?') { + c = 0177; + } + else { + if (c == MC_ESC(env->syntax)) { + v = fetch_escaped_value_raw(&p, end, env, &c); + if (v < 0) return v; + } + c &= 0x9f; + } + break; + } + /* fall through */ + + default: + { + backslash: + c = conv_backslash_value(c, env); + } + break; + } + + *src = p; + *val = c; + return 0; +} + +static int +fetch_escaped_value(UChar** src, UChar* end, ParseEnv* env, OnigCodePoint* val) +{ + int r; + int len; + + r = fetch_escaped_value_raw(src, end, env, val); + if (r != 0) return r; + + len = ONIGENC_CODE_TO_MBCLEN(env->enc, *val); + if (len < 0) return len; + + return 0; +} + +static int fetch_token(PToken* tok, UChar** src, UChar* end, ParseEnv* env); + +static OnigCodePoint +get_name_end_code_point(OnigCodePoint start) +{ + switch (start) { + case '<': return (OnigCodePoint )'>'; break; + case '\'': return (OnigCodePoint )'\''; break; + case '(': return (OnigCodePoint )')'; break; + default: + break; + } + + return (OnigCodePoint )0; +} + +enum REF_NUM { + IS_NOT_NUM = 0, + IS_ABS_NUM = 1, + IS_REL_NUM = 2 +}; + +#ifdef USE_BACKREF_WITH_LEVEL +/* + \k, \k + \k, \k + \k<-num+n>, \k<-num-n> + \k<+num+n>, \k<+num-n> +*/ +static int +fetch_name_with_level(OnigCodePoint start_code, UChar** src, UChar* end, + UChar** rname_end, ParseEnv* env, + int* rback_num, int* rlevel, enum REF_NUM* num_type) +{ + int r, sign, exist_level; + int digit_count; + OnigCodePoint end_code; + OnigCodePoint c; + OnigEncoding enc; + UChar *name_end; + UChar *pnum_head; + UChar *p; + PFETCH_READY; + + p = *src; + c = 0; + enc = env->enc; + *rback_num = 0; + exist_level = 0; + *num_type = IS_NOT_NUM; + sign = 1; + pnum_head = *src; + + end_code = get_name_end_code_point(start_code); + + *rlevel = 0; + digit_count = 0; + name_end = end; + r = 0; + if (PEND) { + return ONIGERR_EMPTY_GROUP_NAME; + } + else { + PFETCH(c); + if (c == end_code) + return ONIGERR_EMPTY_GROUP_NAME; + + if (IS_CODE_DIGIT_ASCII(enc, c)) { + *num_type = IS_ABS_NUM; + digit_count++; + } + else if (c == '-') { + *num_type = IS_REL_NUM; + sign = -1; + pnum_head = p; + } + else if (c == '+') { + *num_type = IS_REL_NUM; + sign = 1; + pnum_head = p; + } + else if (!ONIGENC_IS_CODE_WORD(enc, c)) { + r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; + } + } + + while (!PEND) { + name_end = p; + PFETCH(c); + if (c == end_code || c == ')' || c == '+' || c == '-') { + if (*num_type != IS_NOT_NUM && digit_count == 0) + r = ONIGERR_INVALID_GROUP_NAME; + break; + } + + if (*num_type != IS_NOT_NUM) { + if (IS_CODE_DIGIT_ASCII(enc, c)) { + digit_count++; + } + else { + r = ONIGERR_INVALID_GROUP_NAME; + *num_type = IS_NOT_NUM; + } + } + else if (!ONIGENC_IS_CODE_WORD(enc, c)) { + r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; + } + } + + if (r == 0 && c != end_code) { + if (c == '+' || c == '-') { + int level; + int flag = (c == '-' ? -1 : 1); + + if (PEND) { + r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; + goto end; + } + PFETCH(c); + if (! IS_CODE_DIGIT_ASCII(enc, c)) goto err; + PUNFETCH; + level = scan_number(&p, end, enc); + if (level < 0) return ONIGERR_TOO_BIG_NUMBER; + *rlevel = (level * flag); + exist_level = 1; + + if (!PEND) { + PFETCH(c); + if (c == end_code) + goto end; + } + } + + err: + name_end = end; + err2: + r = ONIGERR_INVALID_GROUP_NAME; + } + + end: + if (r == 0) { + if (*num_type != IS_NOT_NUM) { + *rback_num = scan_number(&pnum_head, name_end, enc); + if (*rback_num < 0) return ONIGERR_TOO_BIG_NUMBER; + else if (*rback_num == 0) { + if (*num_type == IS_REL_NUM) + goto err2; + } + + *rback_num *= sign; + } + + *rname_end = name_end; + *src = p; + return (exist_level ? 1 : 0); + } + else { + onig_scan_env_set_error_string(env, r, *src, name_end); + return r; + } +} +#endif /* USE_BACKREF_WITH_LEVEL */ + +/* + ref: 0 -> define name (don't allow number name) + 1 -> reference name (allow number name) +*/ +static int +fetch_name(OnigCodePoint start_code, UChar** src, UChar* end, + UChar** rname_end, ParseEnv* env, int* rback_num, + enum REF_NUM* num_type, int is_ref) +{ + int r, sign; + int digit_count; + OnigCodePoint end_code; + OnigCodePoint c = 0; + OnigEncoding enc = env->enc; + UChar *name_end; + UChar *pnum_head; + UChar *p = *src; + + *rback_num = 0; + + end_code = get_name_end_code_point(start_code); + + digit_count = 0; + name_end = end; + pnum_head = *src; + r = 0; + *num_type = IS_NOT_NUM; + sign = 1; + if (PEND) { + return ONIGERR_EMPTY_GROUP_NAME; + } + else { + PFETCH_S(c); + if (c == end_code) + return ONIGERR_EMPTY_GROUP_NAME; + + if (IS_CODE_DIGIT_ASCII(enc, c)) { + if (is_ref == TRUE) + *num_type = IS_ABS_NUM; + else { + r = ONIGERR_INVALID_GROUP_NAME; + } + digit_count++; + } + else if (c == '-') { + if (is_ref == TRUE) { + *num_type = IS_REL_NUM; + sign = -1; + pnum_head = p; + } + else { + r = ONIGERR_INVALID_GROUP_NAME; + } + } + else if (c == '+') { + if (is_ref == TRUE) { + *num_type = IS_REL_NUM; + sign = 1; + pnum_head = p; + } + else { + r = ONIGERR_INVALID_GROUP_NAME; + } + } + else if (!ONIGENC_IS_CODE_WORD(enc, c)) { + r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; + } + } + + if (r == 0) { + while (!PEND) { + name_end = p; + PFETCH_S(c); + if (c == end_code || c == ')') { + if (*num_type != IS_NOT_NUM && digit_count == 0) + r = ONIGERR_INVALID_GROUP_NAME; + break; + } + + if (*num_type != IS_NOT_NUM) { + if (IS_CODE_DIGIT_ASCII(enc, c)) { + digit_count++; + } + else { + if (!ONIGENC_IS_CODE_WORD(enc, c)) + r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; + else + r = ONIGERR_INVALID_GROUP_NAME; + + *num_type = IS_NOT_NUM; + } + } + else { + if (!ONIGENC_IS_CODE_WORD(enc, c)) { + r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; + } + } + } + + if (c != end_code) { + r = ONIGERR_INVALID_GROUP_NAME; + goto err; + } + + if (*num_type != IS_NOT_NUM) { + *rback_num = scan_number(&pnum_head, name_end, enc); + if (*rback_num < 0) return ONIGERR_TOO_BIG_NUMBER; + else if (*rback_num == 0) { + if (*num_type == IS_REL_NUM) { + r = ONIGERR_INVALID_GROUP_NAME; + goto err; + } + } + + *rback_num *= sign; + } + + *rname_end = name_end; + *src = p; + return 0; + } + else { + while (!PEND) { + name_end = p; + PFETCH_S(c); + if (c == end_code || c == ')') + break; + } + if (PEND) + name_end = end; + + err: + onig_scan_env_set_error_string(env, r, *src, name_end); + return r; + } +} + +static void +CC_ESC_WARN(ParseEnv* env, UChar *c) +{ + if (onig_warn == onig_null_warn) return ; + + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_WARN_CC_OP_NOT_ESCAPED) && + IS_SYNTAX_BV(env->syntax, ONIG_SYN_BACKSLASH_ESCAPE_IN_CC)) { + UChar buf[WARN_BUFSIZE]; + onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc, + env->pattern, env->pattern_end, + "character class has '%s' without escape", + c); + (*onig_warn)((char* )buf); + } +} + +static void +CLOSE_BRACKET_WITHOUT_ESC_WARN(ParseEnv* env, UChar* c) +{ + if (onig_warn == onig_null_warn) return ; + + if (IS_SYNTAX_BV((env)->syntax, ONIG_SYN_WARN_CC_OP_NOT_ESCAPED)) { + UChar buf[WARN_BUFSIZE]; + onig_snprintf_with_pattern(buf, WARN_BUFSIZE, (env)->enc, + (env)->pattern, (env)->pattern_end, + "regular expression has '%s' without escape", c); + (*onig_warn)((char* )buf); + } +} + +static UChar* +find_str_position(OnigCodePoint s[], int n, UChar* from, UChar* to, + UChar **next, OnigEncoding enc) +{ + int i; + OnigCodePoint x; + UChar *q; + UChar *p = from; + + while (p < to) { + x = ONIGENC_MBC_TO_CODE(enc, p, to); + q = p + enclen(enc, p); + if (x == s[0]) { + for (i = 1; i < n && q < to; i++) { + x = ONIGENC_MBC_TO_CODE(enc, q, to); + if (x != s[i]) break; + q += enclen(enc, q); + } + if (i >= n) { + if (IS_NOT_NULL(next)) + *next = q; + return p; + } + } + p = q; + } + return NULL_UCHARP; +} + +static int +is_head_of_bre_subexp(UChar* p, UChar* end, OnigEncoding enc, ParseEnv* env) +{ + UChar* start; + OnigCodePoint code; + + start = env->pattern; + if (p > start) { + p = onigenc_get_prev_char_head(enc, start, p); + if (p > start) { + code = ONIGENC_MBC_TO_CODE(enc, p, end); + if (code == '(' || + (code == '|' && + IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_VBAR_ALT))) { + p = onigenc_get_prev_char_head(enc, start, p); + code = ONIGENC_MBC_TO_CODE(enc, p, end); + if (IS_MC_ESC_CODE(code, env->syntax)) { + int count = 0; + while (p > start) { + p = onigenc_get_prev_char_head(enc, start, p); + code = ONIGENC_MBC_TO_CODE(enc, p, end); + if (! IS_MC_ESC_CODE(code, env->syntax)) break; + count++; + } + return (count % 2 == 0); + } + } + } + return FALSE; + } + else { + return TRUE; + } +} + +static int +is_end_of_bre_subexp(UChar* p, UChar* end, OnigEncoding enc, ParseEnv* env) +{ + OnigCodePoint code; + + if (p == end) return TRUE; + + code = ONIGENC_MBC_TO_CODE(enc, p, end); + if (IS_MC_ESC_CODE(code, env->syntax)) { + p += ONIGENC_MBC_ENC_LEN(enc, p); + if (p < end) { + code = ONIGENC_MBC_TO_CODE(enc, p, end); + if (code == ')' || + (code == '|' && + IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_VBAR_ALT))) + return TRUE; + } + } + + return FALSE; +} + +static int +is_posix_bracket_start(UChar* from, UChar* to, OnigEncoding enc) +{ + int n; + OnigCodePoint x; + UChar *p; + + n = 0; + p = from; + while (p < to) { + x = ONIGENC_MBC_TO_CODE(enc, p, to); + p += enclen(enc, p); + if (x == ':') { + if (p < to) { + x = ONIGENC_MBC_TO_CODE(enc, p, to); + if (x == ']') { + if (n == 0) return FALSE; + else return TRUE; + } + } + + return FALSE; + } + else if (x == '^' && n == 0) { + ; + } + else if (! ONIGENC_IS_CODE_ALPHA(enc, x)) { + break; + } + + n += 1; + } + + return FALSE; +} + +static int +fetch_token_cc(PToken* tok, UChar** src, UChar* end, ParseEnv* env, int state) +{ + int r; + OnigCodePoint code; + OnigCodePoint c, c2; + int mindigits, maxdigits; + OnigSyntaxType* syn; + OnigEncoding enc; + UChar* prev; + UChar* p; + PFETCH_READY; + + p = *src; + enc = env->enc; + syn = env->syntax; + if (tok->code_point_continue != 0) { + r = get_next_code_point(&p, end, tok->base_num, enc, TRUE, &code); + if (r == 1) { + tok->code_point_continue = 0; + } + else if (r == 2) { + tok->type = TK_CC_RANGE; + goto end; + } + else if (r == 0) { + tok->type = TK_CODE_POINT; + tok->u.code = code; + goto end; + } + else + return r; /* error */ + } + + if (PEND) { + tok->type = TK_EOT; + return tok->type; + } + + PFETCH(c); + tok->type = TK_CHAR; + tok->base_num = 0; + tok->u.code = c; + tok->escaped = 0; + + if (c == ']') { + tok->type = TK_CC_CLOSE; + } + else if (c == '-') { + tok->type = TK_CC_RANGE; + } + else if (c == MC_ESC(syn)) { + if (! IS_SYNTAX_BV(syn, ONIG_SYN_BACKSLASH_ESCAPE_IN_CC)) + goto end; + + if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE; + + PFETCH(c); + tok->escaped = 1; + tok->u.code = c; + switch (c) { + case 'w': + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_WORD; + tok->u.prop.not = 0; + break; + case 'W': + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_WORD; + tok->u.prop.not = 1; + break; + case 'd': + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_DIGIT; + tok->u.prop.not = 0; + break; + case 'D': + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_DIGIT; + tok->u.prop.not = 1; + break; + case 's': + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_SPACE; + tok->u.prop.not = 0; + break; + case 'S': + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_SPACE; + tok->u.prop.not = 1; + break; + case 'h': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_XDIGIT; + tok->u.prop.not = 0; + break; + case 'H': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_XDIGIT; + tok->u.prop.not = 1; + break; + + case 'p': + case 'P': + if (PEND) break; + + c2 = PPEEK; + if (c2 == '{' && + IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY)) { + PINC; + tok->type = TK_CHAR_PROPERTY; + tok->u.prop.not = c == 'P'; + + if (!PEND && IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT)) { + PFETCH(c2); + if (c2 == '^') { + tok->u.prop.not = tok->u.prop.not == 0; + } + else + PUNFETCH; + } + } + break; + + case 'o': + if (PEND) break; + + prev = p; + if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_O_BRACE_OCTAL)) { + PINC; + r = scan_octal_number(&p, end, 0, 11, enc, &code); + if (r < 0) return r; + if (!PEND) { + c2 = PPEEK; + if (IS_CODE_DIGIT_ASCII(enc, c2)) + return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE; + } + + tok->base_num = 8; + goto brace_code_point_entry; + } + break; + + case 'x': + if (PEND) break; + + prev = p; + if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_BRACE_HEX8)) { + PINC; + r = scan_hexadecimal_number(&p, end, 0, 8, enc, &code); + if (r < 0) return r; + if (!PEND) { + c2 = PPEEK; + if (IS_CODE_XDIGIT_ASCII(enc, c2)) + return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE; + } + + tok->base_num = 16; + brace_code_point_entry: + if ((p > prev + enclen(enc, prev))) { + if (PEND) return ONIGERR_INVALID_CODE_POINT_VALUE; + if (PPEEK_IS('}')) { + PINC; + } + else { + int curr_state; + + curr_state = (state == CS_RANGE) ? CPS_EMPTY : CPS_START; + r = check_code_point_sequence_cc(p, end, tok->base_num, enc, + curr_state); + if (r < 0) return r; + if (r == 0) return ONIGERR_INVALID_CODE_POINT_VALUE; + tok->code_point_continue = TRUE; + } + tok->type = TK_CODE_POINT; + tok->u.code = code; + } + else { + /* can't read nothing or invalid format */ + p = prev; + } + } + else if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_HEX2)) { + r = scan_hexadecimal_number(&p, end, 0, 2, enc, &code); + if (r < 0) return r; + if (p == prev) { /* can't read nothing. */ + code = 0; /* but, it's not error */ + } + tok->type = TK_CRUDE_BYTE; + tok->base_num = 16; + tok->u.byte = (UChar )code; + } + break; + + case 'u': + if (PEND) break; + prev = p; + if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_U_HEX4)) { + mindigits = maxdigits = 4; + u_hex_digits: + r = scan_hexadecimal_number(&p, end, mindigits, maxdigits, enc, &code); + if (r < 0) return r; + if (p == prev) { /* can't read nothing. */ + code = 0; /* but, it's not error */ + } + tok->type = TK_CODE_POINT; + tok->base_num = 16; + tok->u.code = code; + } + break; + + case 'U': + if (PEND) break; + prev = p; + if (IS_SYNTAX_BV(syn, ONIG_SYN_PYTHON)) { + mindigits = maxdigits = 8; + goto u_hex_digits; + } + break; + + case '0': + case '1': case '2': case '3': case '4': case '5': case '6': case '7': + if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) { + PUNFETCH; + prev = p; + r = scan_octal_number(&p, end, 0, 3, enc, &code); + if (r < 0) return r; + if (code >= 256) return ONIGERR_TOO_BIG_NUMBER; + if (p == prev) { /* can't read nothing. */ + code = 0; /* but, it's not error */ + } + tok->type = TK_CRUDE_BYTE; + tok->base_num = 8; + tok->u.byte = (UChar )code; + } + break; + + default: + PUNFETCH; + r = fetch_escaped_value(&p, end, env, &c2); + if (r < 0) return r; + if (tok->u.code != c2) { + tok->u.code = c2; + tok->type = TK_CODE_POINT; + } + break; + } + } + else if (c == '[') { + if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_POSIX_BRACKET) && (PPEEK_IS(':'))) { + tok->backp = p; /* point at '[' is read */ + PINC; + if (is_posix_bracket_start(p, end, enc)) { + tok->type = TK_CC_POSIX_BRACKET_OPEN; + } + else { + PUNFETCH; + goto cc_in_cc; + } + } + else { + cc_in_cc: + if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_CCLASS_SET_OP)) { + tok->type = TK_CC_OPEN_CC; + } + else { + CC_ESC_WARN(env, (UChar* )"["); + } + } + } + else if (c == '&') { + if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_CCLASS_SET_OP) && + !PEND && (PPEEK_IS('&'))) { + PINC; + tok->type = TK_CC_AND; + } + } + + end: + *src = p; + return tok->type; +} + +static int +fetch_token(PToken* tok, UChar** src, UChar* end, ParseEnv* env) +{ + int r; + OnigCodePoint code; + OnigCodePoint c; + int mindigits, maxdigits; + UChar* prev; + int allow_num; + OnigEncoding enc; + OnigSyntaxType* syn; + UChar* p; + PFETCH_READY; + + enc = env->enc; + syn = env->syntax; + p = *src; + + if (tok->code_point_continue != 0) { + r = get_next_code_point(&p, end, tok->base_num, enc, FALSE, &code); + if (r == 1) { + tok->code_point_continue = 0; + } + else if (r == 0) { + tok->type = TK_CODE_POINT; + tok->u.code = code; + goto out; + } + else + return r; /* error */ + } + + start: + if (PEND) { + tok->type = TK_EOT; + return tok->type; + } + + tok->type = TK_STRING; + tok->base_num = 0; + tok->backp = p; + + PFETCH(c); + if (IS_MC_ESC_CODE(c, syn)) { + if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE; + + tok->backp = p; + PFETCH(c); + + tok->u.code = c; + tok->escaped = 1; + switch (c) { + case '*': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF)) break; + tok->type = TK_REPEAT; + tok->u.repeat.lower = 0; + tok->u.repeat.upper = INFINITE_REPEAT; + goto greedy_check; + break; + + case '+': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_PLUS_ONE_INF)) break; + tok->type = TK_REPEAT; + tok->u.repeat.lower = 1; + tok->u.repeat.upper = INFINITE_REPEAT; + goto greedy_check; + break; + + case '?': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_QMARK_ZERO_ONE)) break; + tok->type = TK_REPEAT; + tok->u.repeat.lower = 0; + tok->u.repeat.upper = 1; + greedy_check: + tok->u.repeat.possessive = 0; + greedy_check2: + if (!PEND && PPEEK_IS('?') && + IS_SYNTAX_OP(syn, ONIG_SYN_OP_QMARK_NON_GREEDY) && + tok->u.repeat.possessive == 0) { + PFETCH(c); + tok->u.repeat.greedy = 0; + tok->u.repeat.possessive = 0; + } + else { + possessive_check: + tok->u.repeat.greedy = 1; + if (!PEND && PPEEK_IS('+') && + ((IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT) && + tok->type != TK_INTERVAL) || + (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL) && + tok->type == TK_INTERVAL)) && + tok->u.repeat.possessive == 0) { + PFETCH(c); + tok->u.repeat.possessive = 1; + } + } + break; + + case '{': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_BRACE_INTERVAL)) break; + r = fetch_interval(&p, end, tok, env); + if (r < 0) return r; /* error */ + if (r == 0) goto greedy_check2; + else if (r == 2) { /* {n} */ + if (IS_SYNTAX_BV(syn, ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY)) + goto possessive_check; + + goto greedy_check2; + } + /* r == 1 : normal char */ + break; + + case '|': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_VBAR_ALT)) break; + tok->type = TK_ALT; + break; + + case '(': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LPAREN_SUBEXP)) break; + tok->type = TK_SUBEXP_OPEN; + break; + + case ')': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LPAREN_SUBEXP)) break; + tok->type = TK_SUBEXP_CLOSE; + break; + + case 'w': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_W_WORD)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_WORD; + tok->u.prop.not = 0; + break; + + case 'W': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_W_WORD)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_WORD; + tok->u.prop.not = 1; + break; + + case 'b': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_B_WORD_BOUND)) break; + tok->type = TK_ANCHOR; + tok->u.anchor = ANCR_WORD_BOUNDARY; + break; + + case 'B': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_B_WORD_BOUND)) break; + tok->type = TK_ANCHOR; + tok->u.anchor = ANCR_NO_WORD_BOUNDARY; + break; + + case 'y': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP2_ESC_X_Y_TEXT_SEGMENT)) break; + tok->type = TK_ANCHOR; + tok->u.anchor = ANCR_TEXT_SEGMENT_BOUNDARY; + break; + + case 'Y': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP2_ESC_X_Y_TEXT_SEGMENT)) break; + tok->type = TK_ANCHOR; + tok->u.anchor = ANCR_NO_TEXT_SEGMENT_BOUNDARY; + break; + +#ifdef USE_WORD_BEGIN_END + case '<': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END)) break; + tok->type = TK_ANCHOR; + tok->u.anchor = ANCR_WORD_BEGIN; + break; + + case '>': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END)) break; + tok->type = TK_ANCHOR; + tok->u.anchor = ANCR_WORD_END; + break; +#endif + + case 's': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_S_WHITE_SPACE)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_SPACE; + tok->u.prop.not = 0; + break; + + case 'S': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_S_WHITE_SPACE)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_SPACE; + tok->u.prop.not = 1; + break; + + case 'd': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_D_DIGIT)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_DIGIT; + tok->u.prop.not = 0; + break; + + case 'D': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_D_DIGIT)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_DIGIT; + tok->u.prop.not = 1; + break; + + case 'h': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_XDIGIT; + tok->u.prop.not = 0; + break; + + case 'H': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_XDIGIT; + tok->u.prop.not = 1; + break; + + case 'K': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP)) break; + tok->type = TK_KEEP; + break; + + case 'R': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_CAPITAL_R_GENERAL_NEWLINE)) break; + tok->type = TK_GENERAL_NEWLINE; + break; + + case 'N': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_CAPITAL_N_O_SUPER_DOT)) break; + tok->type = TK_NO_NEWLINE; + break; + + case 'O': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_CAPITAL_N_O_SUPER_DOT)) break; + tok->type = TK_TRUE_ANYCHAR; + break; + + case 'X': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_X_Y_TEXT_SEGMENT)) break; + tok->type = TK_TEXT_SEGMENT; + break; + + case 'A': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break; + begin_buf: + tok->type = TK_ANCHOR; + tok->u.subtype = ANCR_BEGIN_BUF; + break; + + case 'Z': + if (IS_SYNTAX_BV(syn, ONIG_SYN_PYTHON)) { + goto end_buf; + } + else { + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break; + tok->type = TK_ANCHOR; + tok->u.subtype = ANCR_SEMI_END_BUF; + } + break; + + case 'z': + if (IS_SYNTAX_BV(syn, ONIG_SYN_PYTHON)) + return ONIGERR_UNDEFINED_OPERATOR; + + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break; + end_buf: + tok->type = TK_ANCHOR; + tok->u.subtype = ANCR_END_BUF; + break; + + case 'G': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR)) break; + tok->type = TK_ANCHOR; + tok->u.subtype = ANCR_BEGIN_POSITION; + break; + + case '`': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR)) break; + goto begin_buf; + break; + + case '\'': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR)) break; + goto end_buf; + break; + + case 'o': + if (PEND) break; + + prev = p; + if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_O_BRACE_OCTAL)) { + PINC; + r = scan_octal_number(&p, end, 0, 11, enc, &code); + if (r < 0) return r; + if (!PEND) { + if (IS_CODE_DIGIT_ASCII(enc, PPEEK)) + return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE; + } + + tok->base_num = 8; + goto brace_code_point_entry; + } + break; + + case 'x': + if (PEND) break; + + prev = p; + if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_BRACE_HEX8)) { + PINC; + r = scan_hexadecimal_number(&p, end, 0, 8, enc, &code); + if (r < 0) return r; + if (!PEND) { + if (IS_CODE_XDIGIT_ASCII(enc, PPEEK)) + return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE; + } + + tok->base_num = 16; + brace_code_point_entry: + if ((p > prev + enclen(enc, prev))) { + if (PEND) return ONIGERR_INVALID_CODE_POINT_VALUE; + if (PPEEK_IS('}')) { + PINC; + } + else { + r = check_code_point_sequence(p, end, tok->base_num, enc); + if (r < 0) return r; + if (r == 0) return ONIGERR_INVALID_CODE_POINT_VALUE; + tok->code_point_continue = TRUE; + } + tok->type = TK_CODE_POINT; + tok->u.code = code; + } + else { + /* can't read nothing or invalid format */ + p = prev; + } + } + else if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_HEX2)) { + r = scan_hexadecimal_number(&p, end, 0, 2, enc, &code); + if (r < 0) return r; + if (p == prev) { /* can't read nothing. */ + code = 0; /* but, it's not error */ + } + tok->type = TK_CRUDE_BYTE; + tok->base_num = 16; + tok->u.byte = (UChar )code; + } + break; + + case 'u': + if (PEND) break; + prev = p; + mindigits = maxdigits = 4; + if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_U_HEX4)) { + u_hex_digits: + r = scan_hexadecimal_number(&p, end, mindigits, maxdigits, enc, &code); + if (r < 0) return r; + if (p == prev) { /* can't read nothing. */ + code = 0; /* but, it's not error */ + } + tok->type = TK_CODE_POINT; + tok->base_num = 16; + tok->u.code = code; + } + break; + + case 'U': + if (PEND) break; + prev = p; + if (IS_SYNTAX_BV(syn, ONIG_SYN_PYTHON)) { + mindigits = maxdigits = 8; + goto u_hex_digits; + } + break; + + case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + PUNFETCH; + prev = p; + r = scan_number(&p, end, enc); + if (r < 0 || r > ONIG_MAX_BACKREF_NUM) { + goto skip_backref; + } + + if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_DECIMAL_BACKREF) && + (r <= env->num_mem || r <= 9)) { /* This spec. from GNU regex */ + if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) { + if (r > env->num_mem || IS_NULL(PARSEENV_MEMENV(env)[r].mem_node)) + return ONIGERR_INVALID_BACKREF; + } + + tok->type = TK_BACKREF; + tok->u.backref.num = 1; + tok->u.backref.ref1 = r; + tok->u.backref.by_name = 0; +#ifdef USE_BACKREF_WITH_LEVEL + tok->u.backref.exist_level = 0; + tok->u.backref.level = 0; +#endif + break; + } + + skip_backref: + if (c == '8' || c == '9') { + /* normal char */ + p = prev; PINC; + break; + } + + p = prev; + /* fall through */ + case '0': + if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) { + prev = p; + r = scan_octal_number(&p, end, 0, (c == '0' ? 2:3), enc, &code); + if (r < 0 || r >= 256) return ONIGERR_TOO_BIG_NUMBER; + if (p == prev) { /* can't read nothing. */ + code = 0; /* but, it's not error */ + } + tok->type = TK_CRUDE_BYTE; + tok->base_num = 8; + tok->u.byte = (UChar )code; + } + else if (c != '0') { + PINC; + } + break; + + case 'k': + if (!PEND && IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_K_NAMED_BACKREF)) { + PFETCH(c); + if (c == '<' || c == '\'') { + UChar* name_end; + int* backs; + int back_num; + enum REF_NUM num_type; + + allow_num = 1; + + backref_start: + prev = p; + +#ifdef USE_BACKREF_WITH_LEVEL + name_end = NULL_UCHARP; /* no need. escape gcc warning. */ + r = fetch_name_with_level((OnigCodePoint )c, &p, end, &name_end, + env, &back_num, &tok->u.backref.level, &num_type); + if (r == 1) tok->u.backref.exist_level = 1; + else tok->u.backref.exist_level = 0; +#else + r = fetch_name(c, &p, end, &name_end, env, &back_num, &num_type, TRUE); +#endif + if (r < 0) return r; + + if (num_type != IS_NOT_NUM) { + if (allow_num == 0) return ONIGERR_INVALID_BACKREF; + + if (num_type == IS_REL_NUM) { + back_num = backref_rel_to_abs(back_num, env); + } + if (back_num <= 0) + return ONIGERR_INVALID_BACKREF; + + if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) { + if (back_num > env->num_mem || + IS_NULL(PARSEENV_MEMENV(env)[back_num].mem_node)) + return ONIGERR_INVALID_BACKREF; + } + tok->type = TK_BACKREF; + tok->u.backref.by_name = 0; + tok->u.backref.num = 1; + tok->u.backref.ref1 = back_num; + } + else { + int num = name_to_group_numbers(env, prev, name_end, &backs); + if (num <= 0) { + return ONIGERR_UNDEFINED_NAME_REFERENCE; + } + if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) { + int i; + for (i = 0; i < num; i++) { + if (backs[i] > env->num_mem || + IS_NULL(PARSEENV_MEMENV(env)[backs[i]].mem_node)) + return ONIGERR_INVALID_BACKREF; + } + } + + tok->type = TK_BACKREF; + tok->u.backref.by_name = 1; + if (num == 1) { + tok->u.backref.num = 1; + tok->u.backref.ref1 = backs[0]; + } + else { + tok->u.backref.num = num; + tok->u.backref.refs = backs; + } + } + } + else + PUNFETCH; + } + break; + +#ifdef USE_CALL + case 'g': + if (!PEND && IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_G_SUBEXP_CALL)) { + PFETCH(c); + if (c == '<' || c == '\'') { + int gnum; + UChar* name_end; + enum REF_NUM num_type; + + allow_num = 1; + + call_start: + prev = p; + r = fetch_name((OnigCodePoint )c, &p, end, &name_end, env, + &gnum, &num_type, TRUE); + if (r < 0) return r; + + if (num_type != IS_NOT_NUM) { + if (allow_num == 0) return ONIGERR_UNDEFINED_GROUP_REFERENCE; + + if (num_type == IS_REL_NUM) { + gnum = backref_rel_to_abs(gnum, env); + if (gnum < 0) { + onig_scan_env_set_error_string(env, ONIGERR_UNDEFINED_NAME_REFERENCE, + prev, name_end); + return ONIGERR_UNDEFINED_GROUP_REFERENCE; + } + } + tok->u.call.by_number = 1; + tok->u.call.gnum = gnum; + } + else { + tok->u.call.by_number = 0; + tok->u.call.gnum = 0; + } + + tok->type = TK_CALL; + tok->u.call.name = prev; + tok->u.call.name_end = name_end; + } + else + PUNFETCH; + } + break; +#endif + + case 'Q': + if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE)) { + tok->type = TK_QUOTE_OPEN; + } + break; + + case 'p': + case 'P': + if (!PEND && PPEEK_IS('{') && + IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY)) { + PINC; + tok->type = TK_CHAR_PROPERTY; + tok->u.prop.not = c == 'P'; + + if (!PEND && + IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT)) { + PFETCH(c); + if (c == '^') { + tok->u.prop.not = tok->u.prop.not == 0; + } + else + PUNFETCH; + } + } + break; + + default: + { + OnigCodePoint c2; + + PUNFETCH; + r = fetch_escaped_value(&p, end, env, &c2); + if (r < 0) return r; + if (tok->u.code != c2) { + tok->type = TK_CODE_POINT; + tok->u.code = c2; + } + else { /* string */ + p = tok->backp + enclen(enc, tok->backp); + } + } + break; + } + } + else { + tok->u.code = c; + tok->escaped = 0; + +#ifdef USE_VARIABLE_META_CHARS + if ((c != ONIG_INEFFECTIVE_META_CHAR) && + IS_SYNTAX_OP(syn, ONIG_SYN_OP_VARIABLE_META_CHARACTERS)) { + if (c == MC_ANYCHAR(syn)) + goto any_char; + else if (c == MC_ANYTIME(syn)) + goto any_time; + else if (c == MC_ZERO_OR_ONE_TIME(syn)) + goto zero_or_one_time; + else if (c == MC_ONE_OR_MORE_TIME(syn)) + goto one_or_more_time; + else if (c == MC_ANYCHAR_ANYTIME(syn)) { + tok->type = TK_ANYCHAR_ANYTIME; + goto out; + } + } +#endif + + switch (c) { + case '.': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_DOT_ANYCHAR)) break; +#ifdef USE_VARIABLE_META_CHARS + any_char: +#endif + tok->type = TK_ANYCHAR; + break; + + case '*': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ASTERISK_ZERO_INF)) break; +#ifdef USE_VARIABLE_META_CHARS + any_time: +#endif + tok->type = TK_REPEAT; + tok->u.repeat.lower = 0; + tok->u.repeat.upper = INFINITE_REPEAT; + goto greedy_check; + break; + + case '+': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_PLUS_ONE_INF)) break; +#ifdef USE_VARIABLE_META_CHARS + one_or_more_time: +#endif + tok->type = TK_REPEAT; + tok->u.repeat.lower = 1; + tok->u.repeat.upper = INFINITE_REPEAT; + goto greedy_check; + break; + + case '?': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_QMARK_ZERO_ONE)) break; +#ifdef USE_VARIABLE_META_CHARS + zero_or_one_time: +#endif + tok->type = TK_REPEAT; + tok->u.repeat.lower = 0; + tok->u.repeat.upper = 1; + goto greedy_check; + break; + + case '{': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_BRACE_INTERVAL)) break; + r = fetch_interval(&p, end, tok, env); + if (r < 0) return r; /* error */ + if (r == 0) goto greedy_check2; + else if (r == 2) { /* {n} */ + if (IS_SYNTAX_BV(syn, ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY)) + goto possessive_check; + + goto greedy_check2; + } + /* r == 1 : normal char */ + break; + + case '|': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_VBAR_ALT)) break; + tok->type = TK_ALT; + break; + + case '(': + if (!PEND && PPEEK_IS('?') && + IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_QMARK_GROUP_EFFECT)) { + prev = p; + PINC; + if (! PEND) { + c = PPEEK; + if (c == '#') { + PFETCH(c); + while (1) { + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + PFETCH(c); + if (c == MC_ESC(syn)) { + if (! PEND) PFETCH(c); + } + else { + if (c == ')') break; + } + } + goto start; + } + else if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_QMARK_PERL_SUBEXP_CALL)) { + int gnum; + UChar* name; + UChar* name_end; + enum REF_NUM num_type; + + switch (c) { + case '&': + { + PINC; + name = p; + r = fetch_name((OnigCodePoint )'(', &p, end, &name_end, env, + &gnum, &num_type, FALSE); + if (r < 0) return r; + + tok->type = TK_CALL; + tok->u.call.by_number = 0; + tok->u.call.gnum = 0; + tok->u.call.name = name; + tok->u.call.name_end = name_end; + } + break; + + case 'R': + tok->type = TK_CALL; + tok->u.call.by_number = 1; + tok->u.call.gnum = 0; + tok->u.call.name = p; + PINC; + if (! PPEEK_IS(')')) return ONIGERR_UNDEFINED_GROUP_OPTION; + tok->u.call.name_end = p; + break; + + case '-': + case '+': + if (! PEND) { + PINC; + if (! PEND) { + c = PPEEK; + if (ONIGENC_IS_CODE_DIGIT(enc, c)) { + PUNFETCH; + goto lparen_qmark_num; + } + } + } + p = prev; + goto lparen_qmark_end2; + break; + + default: + if (! ONIGENC_IS_CODE_DIGIT(enc, c)) goto lparen_qmark_end; + + lparen_qmark_num: + { + name = p; + r = fetch_name((OnigCodePoint )'(', &p, end, &name_end, env, + &gnum, &num_type, TRUE); + if (r < 0) return r; + + if (num_type == IS_NOT_NUM) { + return ONIGERR_INVALID_GROUP_NAME; + } + else { + if (num_type == IS_REL_NUM) { + gnum = backref_rel_to_abs(gnum, env); + if (gnum < 0) { + onig_scan_env_set_error_string(env, + ONIGERR_UNDEFINED_NAME_REFERENCE, name, name_end); + return ONIGERR_UNDEFINED_GROUP_REFERENCE; + } + } + tok->u.call.by_number = 1; + tok->u.call.gnum = gnum; + } + + tok->type = TK_CALL; + tok->u.call.name = name; + tok->u.call.name_end = name_end; + } + break; + } + break; + } + else if (c == 'P' && + IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_CAPITAL_P_NAME)) { + PINC; /* skip 'P' */ + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + PFETCH(c); + allow_num = 0; + if (c == '=') { + c = '('; + goto backref_start; + } + else if (c == '>') { +#ifdef USE_CALL + c = '('; + goto call_start; +#else + return ONIGERR_UNDEFINED_OPERATOR; +#endif + } + else { + p = prev; + goto lparen_qmark_end2; + } + } + } + lparen_qmark_end: + PUNFETCH; + } + + lparen_qmark_end2: + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LPAREN_SUBEXP)) break; + tok->type = TK_SUBEXP_OPEN; + break; + + case ')': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LPAREN_SUBEXP)) break; + tok->type = TK_SUBEXP_CLOSE; + break; + + case '^': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LINE_ANCHOR)) break; + if (IS_SYNTAX_BV(syn, ONIG_SYN_BRE_ANCHOR_AT_EDGE_OF_SUBEXP)) { + if (! is_head_of_bre_subexp(PPREV, end, enc, env)) break; + } + tok->type = TK_ANCHOR; + tok->u.subtype = (OPTON_SINGLELINE(env->options) + ? ANCR_BEGIN_BUF : ANCR_BEGIN_LINE); + break; + + case '$': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LINE_ANCHOR)) break; + if (IS_SYNTAX_BV(syn, ONIG_SYN_BRE_ANCHOR_AT_EDGE_OF_SUBEXP)) { + if (! is_end_of_bre_subexp(p, end, enc, env)) break; + } + tok->type = TK_ANCHOR; + tok->u.subtype = (OPTON_SINGLELINE(env->options) + ? ANCR_SEMI_END_BUF : ANCR_END_LINE); + break; + + case '[': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_BRACKET_CC)) break; + tok->type = TK_OPEN_CC; + break; + + case ']': + if (*src > env->pattern) /* /].../ is allowed. */ + CLOSE_BRACKET_WITHOUT_ESC_WARN(env, (UChar* )"]"); + break; + + case '#': + if (OPTON_EXTEND(env->options)) { + while (!PEND) { + PFETCH(c); + if (ONIGENC_IS_CODE_NEWLINE(enc, c)) + break; + } + goto start; + break; + } + break; + + case ' ': case '\t': case '\n': case '\r': case '\f': + if (OPTON_EXTEND(env->options)) + goto start; + break; + + default: + /* string */ + break; + } + } + + out: + *src = p; + return tok->type; +} + +static int +add_ctype_to_cc_by_range(CClassNode* cc, int ctype ARG_UNUSED, int not, + OnigEncoding enc ARG_UNUSED, OnigCodePoint sb_out, + const OnigCodePoint mbr[]) +{ + int i, r; + OnigCodePoint j; + + int n = ONIGENC_CODE_RANGE_NUM(mbr); + + if (not == 0) { + for (i = 0; i < n; i++) { + for (j = ONIGENC_CODE_RANGE_FROM(mbr, i); + j <= ONIGENC_CODE_RANGE_TO(mbr, i); j++) { + if (j >= sb_out) { + if (j > ONIGENC_CODE_RANGE_FROM(mbr, i)) { + r = add_code_range_to_buf(&(cc->mbuf), j, + ONIGENC_CODE_RANGE_TO(mbr, i)); + if (r != 0) return r; + i++; + } + + goto sb_end; + } + BITSET_SET_BIT(cc->bs, j); + } + } + + sb_end: + for ( ; i < n; i++) { + r = add_code_range_to_buf(&(cc->mbuf), + ONIGENC_CODE_RANGE_FROM(mbr, i), + ONIGENC_CODE_RANGE_TO(mbr, i)); + if (r != 0) return r; + } + } + else { + OnigCodePoint prev = 0; + + for (i = 0; i < n; i++) { + for (j = prev; j < ONIGENC_CODE_RANGE_FROM(mbr, i); j++) { + if (j >= sb_out) { + goto sb_end2; + } + BITSET_SET_BIT(cc->bs, j); + } + prev = ONIGENC_CODE_RANGE_TO(mbr, i) + 1; + } + for (j = prev; j < sb_out; j++) { + BITSET_SET_BIT(cc->bs, j); + } + + sb_end2: + prev = sb_out; + + for (i = 0; i < n; i++) { + if (prev < ONIGENC_CODE_RANGE_FROM(mbr, i)) { + r = add_code_range_to_buf(&(cc->mbuf), prev, + ONIGENC_CODE_RANGE_FROM(mbr, i) - 1); + if (r != 0) return r; + } + prev = ONIGENC_CODE_RANGE_TO(mbr, i) + 1; + if (prev == 0) goto end; + } + + r = add_code_range_to_buf(&(cc->mbuf), prev, MAX_CODE_POINT); + if (r != 0) return r; + } + + end: + return 0; +} + +static int +add_ctype_to_cc_by_range_limit(CClassNode* cc, int ctype ARG_UNUSED, int not, + OnigEncoding enc ARG_UNUSED, + OnigCodePoint sb_out, + const OnigCodePoint mbr[], OnigCodePoint limit) +{ + int i, r; + OnigCodePoint j; + OnigCodePoint from; + OnigCodePoint to; + + int n = ONIGENC_CODE_RANGE_NUM(mbr); + + if (not == 0) { + for (i = 0; i < n; i++) { + for (j = ONIGENC_CODE_RANGE_FROM(mbr, i); + j <= ONIGENC_CODE_RANGE_TO(mbr, i); j++) { + if (j > limit) goto end; + if (j >= sb_out) { + if (j > ONIGENC_CODE_RANGE_FROM(mbr, i)) { + to = ONIGENC_CODE_RANGE_TO(mbr, i); + if (to > limit) to = limit; + r = add_code_range_to_buf(&(cc->mbuf), j, to); + if (r != 0) return r; + i++; + } + + goto sb_end; + } + BITSET_SET_BIT(cc->bs, j); + } + } + + sb_end: + for ( ; i < n; i++) { + from = ONIGENC_CODE_RANGE_FROM(mbr, i); + to = ONIGENC_CODE_RANGE_TO(mbr, i); + if (from > limit) break; + if (to > limit) to = limit; + r = add_code_range_to_buf(&(cc->mbuf), from, to); + if (r != 0) return r; + } + } + else { + OnigCodePoint prev = 0; + + for (i = 0; i < n; i++) { + from = ONIGENC_CODE_RANGE_FROM(mbr, i); + if (from > limit) { + for (j = prev; j < sb_out; j++) { + BITSET_SET_BIT(cc->bs, j); + } + goto sb_end2; + } + for (j = prev; j < from; j++) { + if (j >= sb_out) goto sb_end2; + BITSET_SET_BIT(cc->bs, j); + } + prev = ONIGENC_CODE_RANGE_TO(mbr, i); + if (prev > limit) prev = limit; + prev++; + if (prev == 0) goto end; + } + for (j = prev; j < sb_out; j++) { + BITSET_SET_BIT(cc->bs, j); + } + + sb_end2: + prev = sb_out; + + for (i = 0; i < n; i++) { + from = ONIGENC_CODE_RANGE_FROM(mbr, i); + if (from > limit) goto last; + + if (prev < from) { + r = add_code_range_to_buf(&(cc->mbuf), prev, from - 1); + if (r != 0) return r; + } + prev = ONIGENC_CODE_RANGE_TO(mbr, i); + if (prev > limit) prev = limit; + prev++; + if (prev == 0) goto end; + } + + last: + r = add_code_range_to_buf(&(cc->mbuf), prev, MAX_CODE_POINT); + if (r != 0) return r; + } + + end: + return 0; +} + +static int +add_ctype_to_cc(CClassNode* cc, int ctype, int not, ParseEnv* env) +{ + int c, r; + int ascii_mode; + int is_single; + const OnigCodePoint *ranges; + OnigCodePoint limit; + OnigCodePoint sb_out; + OnigEncoding enc = env->enc; + + ascii_mode = OPTON_IS_ASCII_MODE_CTYPE(ctype, env->options); + + r = ONIGENC_GET_CTYPE_CODE_RANGE(enc, ctype, &sb_out, &ranges); + if (r == 0) { + if (ascii_mode == 0) + r = add_ctype_to_cc_by_range(cc, ctype, not, env->enc, sb_out, ranges); + else + r = add_ctype_to_cc_by_range_limit(cc, ctype, not, env->enc, sb_out, + ranges, ASCII_LIMIT); + return r; + } + else if (r != ONIG_NO_SUPPORT_CONFIG) { + return r; + } + + r = 0; + is_single = ONIGENC_IS_SINGLEBYTE(enc); + limit = ascii_mode ? ASCII_LIMIT : SINGLE_BYTE_SIZE; + + switch (ctype) { + case ONIGENC_CTYPE_ALPHA: + case ONIGENC_CTYPE_BLANK: + case ONIGENC_CTYPE_CNTRL: + case ONIGENC_CTYPE_DIGIT: + case ONIGENC_CTYPE_LOWER: + case ONIGENC_CTYPE_PUNCT: + case ONIGENC_CTYPE_SPACE: + case ONIGENC_CTYPE_UPPER: + case ONIGENC_CTYPE_XDIGIT: + case ONIGENC_CTYPE_ASCII: + case ONIGENC_CTYPE_ALNUM: + if (not != 0) { + for (c = 0; c < (int )limit; c++) { + if (is_single != 0 || ONIGENC_CODE_TO_MBCLEN(enc, c) == 1) { + if (! ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype)) + BITSET_SET_BIT(cc->bs, c); + } + } + for (c = limit; c < SINGLE_BYTE_SIZE; c++) { + if (is_single != 0 || ONIGENC_CODE_TO_MBCLEN(enc, c) == 1) + BITSET_SET_BIT(cc->bs, c); + } + + if (is_single == 0) + ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf); + } + else { + for (c = 0; c < (int )limit; c++) { + if (is_single != 0 || ONIGENC_CODE_TO_MBCLEN(enc, c) == 1) { + if (ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype)) + BITSET_SET_BIT(cc->bs, c); + } + } + } + break; + + case ONIGENC_CTYPE_GRAPH: + case ONIGENC_CTYPE_PRINT: + case ONIGENC_CTYPE_WORD: + if (not != 0) { + for (c = 0; c < (int )limit; c++) { + /* check invalid code point */ + if ((is_single != 0 || ONIGENC_CODE_TO_MBCLEN(enc, c) == 1) + && ! ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype)) + BITSET_SET_BIT(cc->bs, c); + } + for (c = limit; c < SINGLE_BYTE_SIZE; c++) { + if (is_single != 0 || ONIGENC_CODE_TO_MBCLEN(enc, c) == 1) + BITSET_SET_BIT(cc->bs, c); + } + if (ascii_mode != 0 && is_single == 0) + ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf); + } + else { + for (c = 0; c < (int )limit; c++) { + if ((is_single != 0 || ONIGENC_CODE_TO_MBCLEN(enc, c) == 1) + && ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype)) + BITSET_SET_BIT(cc->bs, c); + } + if (ascii_mode == 0 && is_single == 0) + ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf); + } + break; + + default: + return ONIGERR_PARSER_BUG; + break; + } + + return r; +} + +static int +prs_posix_bracket(CClassNode* cc, UChar** src, UChar* end, ParseEnv* env) +{ + static PosixBracketEntryType PBS[] = { + { (UChar* )"alnum", ONIGENC_CTYPE_ALNUM, 5 }, + { (UChar* )"alpha", ONIGENC_CTYPE_ALPHA, 5 }, + { (UChar* )"blank", ONIGENC_CTYPE_BLANK, 5 }, + { (UChar* )"cntrl", ONIGENC_CTYPE_CNTRL, 5 }, + { (UChar* )"digit", ONIGENC_CTYPE_DIGIT, 5 }, + { (UChar* )"graph", ONIGENC_CTYPE_GRAPH, 5 }, + { (UChar* )"lower", ONIGENC_CTYPE_LOWER, 5 }, + { (UChar* )"print", ONIGENC_CTYPE_PRINT, 5 }, + { (UChar* )"punct", ONIGENC_CTYPE_PUNCT, 5 }, + { (UChar* )"space", ONIGENC_CTYPE_SPACE, 5 }, + { (UChar* )"upper", ONIGENC_CTYPE_UPPER, 5 }, + { (UChar* )"xdigit", ONIGENC_CTYPE_XDIGIT, 6 }, + { (UChar* )"ascii", ONIGENC_CTYPE_ASCII, 5 }, + { (UChar* )"word", ONIGENC_CTYPE_WORD, 4 }, + { (UChar* )NULL, -1, 0 } + }; + + PosixBracketEntryType *pb; + int not, r; + OnigEncoding enc = env->enc; + UChar *p = *src; + + if (PPEEK_IS('^')) { + PINC_S; + not = 1; + } + else + not = 0; + + for (pb = PBS; IS_NOT_NULL(pb->name); pb++) { + if (onigenc_with_ascii_strncmp(enc, p, end, pb->name, pb->len) == 0) { + p = (UChar* )onigenc_step(enc, p, end, pb->len); + if (onigenc_with_ascii_strncmp(enc, p, end, (UChar* )":]", 2) != 0) + break; + + r = add_ctype_to_cc(cc, pb->ctype, not, env); + if (r != 0) return r; + + PINC_S; PINC_S; + *src = p; + return 0; + } + } + + return ONIGERR_INVALID_POSIX_BRACKET_TYPE; +} + +static int +fetch_char_property_to_ctype(UChar** src, UChar* end, ParseEnv* env) +{ + int r; + OnigCodePoint c; + OnigEncoding enc; + UChar *prev, *start, *p; + + p = *src; + enc = env->enc; + r = ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS; + start = prev = p; + + while (!PEND) { + prev = p; + PFETCH_S(c); + if (c == '}') { + r = ONIGENC_PROPERTY_NAME_TO_CTYPE(enc, start, prev); + if (r >= 0) { + *src = p; + } + else { + onig_scan_env_set_error_string(env, r, *src, prev); + } + + return r; + } + else if (c == '(' || c == ')' || c == '{' || c == '|') { + break; + } + } + + return r; +} + +static int +prs_char_property(Node** np, PToken* tok, UChar** src, UChar* end, + ParseEnv* env) +{ + int r, ctype; + CClassNode* cc; + + ctype = fetch_char_property_to_ctype(src, end, env); + if (ctype < 0) return ctype; + + if (ctype == ONIGENC_CTYPE_WORD) { + *np = node_new_ctype(ctype, tok->u.prop.not, env->options); + CHECK_NULL_RETURN_MEMERR(*np); + return 0; + } + + *np = node_new_cclass(); + CHECK_NULL_RETURN_MEMERR(*np); + cc = CCLASS_(*np); + r = add_ctype_to_cc(cc, ctype, FALSE, env); + if (r != 0) return r; + if (tok->u.prop.not != 0) NCCLASS_SET_NOT(cc); + + return 0; +} + + +static int +cc_cprop_next(CClassNode* cc, OnigCodePoint* pcode, CVAL* val, CSTATE* state, + ParseEnv* env) +{ + int r; + + if (*state == CS_RANGE) + return ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE; + + if (*state == CS_VALUE) { + if (*val == CV_SB) + BITSET_SET_BIT(cc->bs, (int )(*pcode)); + else if (*val == CV_MB) { + r = add_code_range(&(cc->mbuf), env, *pcode, *pcode); + if (r < 0) return r; + } + } + + *state = CS_VALUE; + *val = CV_CPROP; + return 0; +} + +static int +cc_char_next(CClassNode* cc, OnigCodePoint *from, OnigCodePoint to, + int* from_raw, int to_raw, CVAL intype, CVAL* type, + CSTATE* state, ParseEnv* env) +{ + int r; + + switch (*state) { + case CS_VALUE: + if (*type == CV_SB) { + if (*from > 0xff) + return ONIGERR_INVALID_CODE_POINT_VALUE; + + BITSET_SET_BIT(cc->bs, (int )(*from)); + } + else if (*type == CV_MB) { + r = add_code_range(&(cc->mbuf), env, *from, *from); + if (r < 0) return r; + } + break; + + case CS_RANGE: + if (intype == *type) { + if (intype == CV_SB) { + if (*from > 0xff || to > 0xff) + return ONIGERR_INVALID_CODE_POINT_VALUE; + + if (*from > to) { + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC)) + goto ccs_range_end; + else + return ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS; + } + bitset_set_range(cc->bs, (int )*from, (int )to); + } + else { + r = add_code_range(&(cc->mbuf), env, *from, to); + if (r < 0) return r; + } + } + else { + if (*from > to) { + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC)) + goto ccs_range_end; + else + return ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS; + } + bitset_set_range(cc->bs, (int )*from, (int )(to < 0xff ? to : 0xff)); + r = add_code_range(&(cc->mbuf), env, (OnigCodePoint )*from, to); + if (r < 0) return r; + } + ccs_range_end: + *state = CS_COMPLETE; + break; + + case CS_COMPLETE: + case CS_START: + *state = CS_VALUE; + break; + + default: + break; + } + + *from_raw = to_raw; + *from = to; + *type = intype; + return 0; +} + +static int +code_exist_check(OnigCodePoint c, UChar* from, UChar* end, int ignore_escaped, + ParseEnv* env) +{ + int in_esc; + OnigCodePoint code; + OnigEncoding enc = env->enc; + UChar* p = from; + + in_esc = 0; + while (! PEND) { + if (ignore_escaped && in_esc) { + in_esc = 0; + } + else { + PFETCH_S(code); + if (code == c) return 1; + if (code == MC_ESC(env->syntax)) in_esc = 1; + } + } + return 0; +} + +static int +prs_cc(Node** np, PToken* tok, UChar** src, UChar* end, ParseEnv* env) +{ + int r, neg, len, fetched, and_start; + OnigCodePoint in_code, curr_code; + UChar *p; + Node* node; + CClassNode *cc, *prev_cc; + CClassNode work_cc; + int curr_raw, in_raw; + CSTATE state; + CVAL in_type; + CVAL curr_type; + + *np = NULL_NODE; + INC_PARSE_DEPTH(env->parse_depth); + + state = CS_START; + prev_cc = (CClassNode* )NULL; + r = fetch_token_cc(tok, src, end, env, state); + if (r == TK_CHAR && tok->u.code == (OnigCodePoint )'^' && tok->escaped == 0) { + neg = 1; + r = fetch_token_cc(tok, src, end, env, state); + } + else { + neg = 0; + } + + if (r < 0) return r; + if (r == TK_CC_CLOSE) { + if (! code_exist_check((OnigCodePoint )']', + *src, env->pattern_end, 1, env)) + return ONIGERR_EMPTY_CHAR_CLASS; + + CC_ESC_WARN(env, (UChar* )"]"); + r = tok->type = TK_CHAR; /* allow []...] */ + } + + *np = node = node_new_cclass(); + CHECK_NULL_RETURN_MEMERR(node); + cc = CCLASS_(node); + + and_start = 0; + curr_type = CV_UNDEF; + + p = *src; + while (r != TK_CC_CLOSE) { + fetched = 0; + switch (r) { + case TK_CHAR: + any_char_in: + len = ONIGENC_CODE_TO_MBCLEN(env->enc, tok->u.code); + if (len < 0) { + r = len; + goto err; + } + in_type = (len == 1) ? CV_SB : CV_MB; + in_code = tok->u.code; + in_raw = 0; + goto val_entry2; + break; + + case TK_CRUDE_BYTE: + /* tok->base_num != 0 : octal or hexadec. */ + if (! ONIGENC_IS_SINGLEBYTE(env->enc) && tok->base_num != 0) { + int i, j; + UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN]; + UChar* bufe = buf + ONIGENC_CODE_TO_MBC_MAXLEN; + UChar* psave = p; + int base_num = tok->base_num; + + buf[0] = tok->u.byte; + for (i = 1; i < ONIGENC_MBC_MAXLEN(env->enc); i++) { + r = fetch_token_cc(tok, &p, end, env, CS_COMPLETE); + if (r < 0) goto err; + if (r != TK_CRUDE_BYTE || tok->base_num != base_num) { + fetched = 1; + break; + } + buf[i] = tok->u.byte; + } + + if (i < ONIGENC_MBC_MINLEN(env->enc)) { + r = ONIGERR_TOO_SHORT_MULTI_BYTE_STRING; + goto err; + } + + /* clear buf tail */ + for (j = i; j < ONIGENC_CODE_TO_MBC_MAXLEN; j++) buf[j] = '\0'; + + len = enclen(env->enc, buf); + if (i < len) { + r = ONIGERR_TOO_SHORT_MULTI_BYTE_STRING; + goto err; + } + else if (i > len) { /* fetch back */ + p = psave; + for (i = 1; i < len; i++) { + r = fetch_token_cc(tok, &p, end, env, CS_COMPLETE); + if (r < 0) goto err; + } + fetched = 0; + } + + if (i == 1) { + in_code = (OnigCodePoint )buf[0]; + goto crude_single; + } + else { + if (! ONIGENC_IS_VALID_MBC_STRING(env->enc, buf, buf + len)) { + r = ONIGERR_INVALID_WIDE_CHAR_VALUE; + goto err; + } + + in_code = ONIGENC_MBC_TO_CODE(env->enc, buf, bufe); + in_type = CV_MB; + } + } + else { + in_code = (OnigCodePoint )tok->u.byte; + crude_single: + in_type = CV_SB; + } + in_raw = 1; + goto val_entry2; + break; + + case TK_CODE_POINT: + in_code = tok->u.code; + in_raw = 1; + val_entry: + len = ONIGENC_CODE_TO_MBCLEN(env->enc, in_code); + if (len < 0) { + if (state != CS_RANGE || + ! IS_SYNTAX_BV(env->syntax, + ONIG_SYN_ALLOW_INVALID_CODE_END_OF_RANGE_IN_CC) || + in_code < 0x100 || ONIGENC_MBC_MAXLEN(env->enc) == 1) { + r = len; + goto err; + } + } + in_type = (len == 1 ? CV_SB : CV_MB); + val_entry2: + r = cc_char_next(cc, &curr_code, in_code, &curr_raw, in_raw, in_type, + &curr_type, &state, env); + if (r != 0) goto err; + break; + + case TK_CC_POSIX_BRACKET_OPEN: + r = prs_posix_bracket(cc, &p, end, env); + if (r < 0) goto err; + if (r == 1) { /* is not POSIX bracket */ + CC_ESC_WARN(env, (UChar* )"["); + p = tok->backp; + in_code = tok->u.code; + in_raw = 0; + goto val_entry; + } + goto next_cprop; + break; + + case TK_CHAR_TYPE: + r = add_ctype_to_cc(cc, tok->u.prop.ctype, tok->u.prop.not, env); + if (r != 0) goto err; + + next_cprop: + r = cc_cprop_next(cc, &curr_code, &curr_type, &state, env); + if (r != 0) goto err; + break; + + case TK_CHAR_PROPERTY: + { + int ctype = fetch_char_property_to_ctype(&p, end, env); + if (ctype < 0) { + r = ctype; + goto err; + } + r = add_ctype_to_cc(cc, ctype, tok->u.prop.not, env); + if (r != 0) goto err; + goto next_cprop; + } + break; + + case TK_CC_RANGE: + if (state == CS_VALUE) { + r = fetch_token_cc(tok, &p, end, env, CS_RANGE); + if (r < 0) goto err; + + fetched = 1; + if (r == TK_CC_CLOSE) { /* allow [x-] */ + range_end_val: + in_code = (OnigCodePoint )'-'; + in_raw = 0; + goto val_entry; + } + else if (r == TK_CC_AND) { + range_end_val_with_warning: + CC_ESC_WARN(env, (UChar* )"-"); + goto range_end_val; + } + + if (curr_type == CV_CPROP) { + if (IS_SYNTAX_BV(env->syntax, + ONIG_SYN_ALLOW_CHAR_TYPE_FOLLOWED_BY_MINUS_IN_CC)) { + goto range_end_val_with_warning; + } + r = ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS; + goto err; + } + + state = CS_RANGE; + } + else if (state == CS_START) { + /* [-xa] is allowed */ + in_code = tok->u.code; + in_raw = 0; + + r = fetch_token_cc(tok, &p, end, env, CS_VALUE); + if (r < 0) goto err; + + fetched = 1; + /* [--x] or [a&&-x] is warned. */ + if (r == TK_CC_RANGE || and_start != 0) + CC_ESC_WARN(env, (UChar* )"-"); + + goto val_entry; + } + else if (state == CS_RANGE) { + CC_ESC_WARN(env, (UChar* )"-"); + goto any_char_in; /* [!--] is allowed */ + } + else { /* CS_COMPLETE */ + r = fetch_token_cc(tok, &p, end, env, CS_VALUE); + if (r < 0) goto err; + + fetched = 1; + if (r == TK_CC_CLOSE) { + goto range_end_val; /* allow [a-b-] */ + } + else if (r == TK_CC_AND) { + goto range_end_val_with_warning; + } + + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC)) { + /* [0-9-a] is allowed as [0-9\-a] */ + goto range_end_val_with_warning; + } + r = ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS; + goto err; + } + break; + + case TK_CC_OPEN_CC: /* [ */ + { + Node *anode; + CClassNode* acc; + + if (state == CS_VALUE) { + r = cc_char_next(cc, &curr_code, 0, &curr_raw, 0, curr_type, &curr_type, + &state, env); + if (r != 0) goto err; + } + state = CS_COMPLETE; + + r = prs_cc(&anode, tok, &p, end, env); + if (r != 0) { + onig_node_free(anode); + goto cc_open_err; + } + acc = CCLASS_(anode); + r = or_cclass(cc, acc, env->enc); + onig_node_free(anode); + + cc_open_err: + if (r != 0) goto err; + } + break; + + case TK_CC_AND: /* && */ + { + if (state == CS_VALUE) { + r = cc_char_next(cc, &curr_code, 0, &curr_raw, 0, curr_type, &curr_type, + &state, env); + if (r != 0) goto err; + } + /* initialize local variables */ + and_start = 1; + state = CS_START; + + if (IS_NOT_NULL(prev_cc)) { + r = and_cclass(prev_cc, cc, env->enc); + if (r != 0) goto err; + bbuf_free(cc->mbuf); + } + else { + prev_cc = cc; + cc = &work_cc; + } + initialize_cclass(cc); + } + break; + + case TK_EOT: + r = ONIGERR_PREMATURE_END_OF_CHAR_CLASS; + goto err; + break; + default: + r = ONIGERR_PARSER_BUG; + goto err; + break; + } + + if (fetched) + r = tok->type; + else { + r = fetch_token_cc(tok, &p, end, env, state); + if (r < 0) goto err; + } + } + + if (state == CS_VALUE) { + r = cc_char_next(cc, &curr_code, 0, &curr_raw, 0, curr_type, &curr_type, + &state, env); + if (r != 0) goto err; + } + + if (IS_NOT_NULL(prev_cc)) { + r = and_cclass(prev_cc, cc, env->enc); + if (r != 0) goto err; + bbuf_free(cc->mbuf); + cc = prev_cc; + } + + if (neg != 0) + NCCLASS_SET_NOT(cc); + else + NCCLASS_CLEAR_NOT(cc); + if (IS_NCCLASS_NOT(cc) && + IS_SYNTAX_BV(env->syntax, ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC)) { + int is_empty = (IS_NULL(cc->mbuf) ? 1 : 0); + if (is_empty != 0) + BITSET_IS_EMPTY(cc->bs, is_empty); + + if (is_empty == 0) { + if (ONIGENC_IS_CODE_NEWLINE(env->enc, NEWLINE_CODE)) { + if (ONIGENC_CODE_TO_MBCLEN(env->enc, NEWLINE_CODE) == 1) + BITSET_SET_BIT(cc->bs, NEWLINE_CODE); + else + add_code_range(&(cc->mbuf), env, NEWLINE_CODE, NEWLINE_CODE); + } + } + } + *src = p; + DEC_PARSE_DEPTH(env->parse_depth); + return 0; + + err: + if (cc != CCLASS_(*np)) + bbuf_free(cc->mbuf); + return r; +} + +static int prs_alts(Node** top, PToken* tok, int term, + UChar** src, UChar* end, ParseEnv* env, int group_head); + +#ifdef USE_CALLOUT + +/* (?{...}[tag][+-]) (?{{...}}[tag][+-]) */ +static int +prs_callout_of_contents(Node** np, int cterm, UChar** src, UChar* end, + ParseEnv* env) +{ + int r; + int i; + int in; + int num; + OnigCodePoint c; + UChar* code_start; + UChar* code_end; + UChar* contents; + UChar* tag_start; + UChar* tag_end; + int brace_nest; + CalloutListEntry* e; + RegexExt* ext; + OnigEncoding enc = env->enc; + UChar* p = *src; + + if (PEND) return ONIGERR_INVALID_CALLOUT_PATTERN; + + brace_nest = 0; + while (PPEEK_IS('{')) { + brace_nest++; + PINC_S; + if (PEND) return ONIGERR_INVALID_CALLOUT_PATTERN; + } + + in = ONIG_CALLOUT_IN_PROGRESS; + code_start = p; + while (1) { + if (PEND) return ONIGERR_INVALID_CALLOUT_PATTERN; + + code_end = p; + PFETCH_S(c); + if (c == '}') { + i = brace_nest; + while (i > 0) { + if (PEND) return ONIGERR_INVALID_CALLOUT_PATTERN; + PFETCH_S(c); + if (c == '}') i--; + else break; + } + if (i == 0) break; + } + } + + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + + PFETCH_S(c); + if (c == '[') { + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + tag_end = tag_start = p; + while (! PEND) { + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + tag_end = p; + PFETCH_S(c); + if (c == ']') break; + } + if (! is_allowed_callout_tag_name(enc, tag_start, tag_end)) + return ONIGERR_INVALID_CALLOUT_TAG_NAME; + + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + PFETCH_S(c); + } + else { + tag_start = tag_end = 0; + } + + if (c == 'X') { + in |= ONIG_CALLOUT_IN_RETRACTION; + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + PFETCH_S(c); + } + else if (c == '<') { + in = ONIG_CALLOUT_IN_RETRACTION; + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + PFETCH_S(c); + } + else if (c == '>') { /* no needs (default) */ + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + PFETCH_S(c); + } + + if (c != cterm) + return ONIGERR_INVALID_CALLOUT_PATTERN; + + r = reg_callout_list_entry(env, &num); + if (r != 0) return r; + + ext = onig_get_regex_ext(env->reg); + CHECK_NULL_RETURN_MEMERR(ext); + if (IS_NULL(ext->pattern)) { + r = onig_ext_set_pattern(env->reg, env->pattern, env->pattern_end); + if (r != ONIG_NORMAL) return r; + } + + if (tag_start != tag_end) { + r = callout_tag_entry(env, env->reg, tag_start, tag_end, num); + if (r != ONIG_NORMAL) return r; + } + + contents = onigenc_strdup(enc, code_start, code_end); + CHECK_NULL_RETURN_MEMERR(contents); + + e = onig_reg_callout_list_at(env->reg, num); + if (IS_NULL(e)) { + xfree(contents); + return ONIGERR_MEMORY; + } + + r = node_new_callout(np, ONIG_CALLOUT_OF_CONTENTS, num, ONIG_NON_NAME_ID, env); + if (r != 0) { + xfree(contents); + return r; + } + + e->of = ONIG_CALLOUT_OF_CONTENTS; + e->in = in; + e->name_id = ONIG_NON_NAME_ID; + e->u.content.start = contents; + e->u.content.end = contents + (code_end - code_start); + + *src = p; + return 0; +} + +static long +prs_long(OnigEncoding enc, UChar* s, UChar* end, int sign_on, long max, long* rl) +{ + long v; + long d; + int flag; + UChar* p; + OnigCodePoint c; + + if (s >= end) return ONIGERR_INVALID_CALLOUT_ARG; + + flag = 1; + v = 0; + p = s; + while (p < end) { + c = ONIGENC_MBC_TO_CODE(enc, p, end); + p += ONIGENC_MBC_ENC_LEN(enc, p); + if (c >= '0' && c <= '9') { + d = (long )(c - '0'); + if (v > (max - d) / 10) + return ONIGERR_INVALID_CALLOUT_ARG; + + v = v * 10 + d; + } + else if (sign_on != 0 && (c == '-' || c == '+')) { + if (c == '-') flag = -1; + } + else + return ONIGERR_INVALID_CALLOUT_ARG; + + sign_on = 0; + } + + *rl = flag * v; + return ONIG_NORMAL; +} + +static void +clear_callout_args(int n, unsigned int types[], OnigValue vals[]) +{ + int i; + + for (i = 0; i < n; i++) { + switch (types[i]) { + case ONIG_TYPE_STRING: + if (IS_NOT_NULL(vals[i].s.start)) + xfree(vals[i].s.start); + break; + default: + break; + } + } +} + +static int +prs_callout_args(int skip_mode, int cterm, UChar** src, UChar* end, + int max_arg_num, unsigned int types[], OnigValue vals[], + ParseEnv* env) +{ +#define MAX_CALLOUT_ARG_BYTE_LENGTH 128 + + int r; + int n; + int esc; + int cn; + UChar* s; + UChar* e; + UChar* eesc; + OnigCodePoint c; + UChar* bufend; + UChar buf[MAX_CALLOUT_ARG_BYTE_LENGTH]; + OnigEncoding enc = env->enc; + UChar* p = *src; + + if (PEND) return ONIGERR_INVALID_CALLOUT_PATTERN; + + c = 0; + n = 0; + while (n < ONIG_CALLOUT_MAX_ARGS_NUM) { + cn = 0; + esc = 0; + eesc = 0; + bufend = buf; + s = e = p; + while (1) { + if (PEND) { + r = ONIGERR_INVALID_CALLOUT_PATTERN; + goto err_clear; + } + + e = p; + PFETCH_S(c); + if (esc != 0) { + esc = 0; + if (c == '\\' || c == cterm || c == ',') { + /* */ + } + else { + e = eesc; + cn++; + } + goto add_char; + } + else { + if (c == '\\') { + esc = 1; + eesc = e; + } + else if (c == cterm || c == ',') + break; + else { + size_t clen; + + add_char: + if (skip_mode == FALSE) { + clen = p - e; + if (bufend + clen > buf + MAX_CALLOUT_ARG_BYTE_LENGTH) { + r = ONIGERR_INVALID_CALLOUT_ARG; /* too long argument */ + goto err_clear; + } + + xmemcpy(bufend, e, clen); + bufend += clen; + } + cn++; + } + } + } + + if (cn != 0) { + if (max_arg_num >= 0 && n >= max_arg_num) { + r = ONIGERR_INVALID_CALLOUT_ARG; + goto err_clear; + } + + if (skip_mode == FALSE) { + if ((types[n] & ONIG_TYPE_LONG) != 0) { + int fixed = 0; + if (cn > 0) { + long rl; + r = prs_long(enc, buf, bufend, 1, LONG_MAX, &rl); + if (r == ONIG_NORMAL) { + vals[n].l = rl; + fixed = 1; + types[n] = ONIG_TYPE_LONG; + } + } + + if (fixed == 0) { + types[n] = (types[n] & ~ONIG_TYPE_LONG); + if (types[n] == ONIG_TYPE_VOID) { + r = ONIGERR_INVALID_CALLOUT_ARG; + goto err_clear; + } + } + } + + switch (types[n]) { + case ONIG_TYPE_LONG: + break; + + case ONIG_TYPE_CHAR: + if (cn != 1) { + r = ONIGERR_INVALID_CALLOUT_ARG; + goto err_clear; + } + vals[n].c = ONIGENC_MBC_TO_CODE(enc, buf, bufend); + break; + + case ONIG_TYPE_STRING: + { + UChar* rs = onigenc_strdup(enc, buf, bufend); + if (IS_NULL(rs)) { + r = ONIGERR_MEMORY; goto err_clear; + } + vals[n].s.start = rs; + vals[n].s.end = rs + (e - s); + } + break; + + case ONIG_TYPE_TAG: + if (eesc != 0 || ! is_allowed_callout_tag_name(enc, s, e)) { + r = ONIGERR_INVALID_CALLOUT_TAG_NAME; + goto err_clear; + } + + vals[n].s.start = s; + vals[n].s.end = e; + break; + + case ONIG_TYPE_VOID: + case ONIG_TYPE_POINTER: + r = ONIGERR_PARSER_BUG; + goto err_clear; + break; + } + } + + n++; + } + + if (c == cterm) break; + } + + if (c != cterm) { + r = ONIGERR_INVALID_CALLOUT_PATTERN; + goto err_clear; + } + + *src = p; + return n; + + err_clear: + if (skip_mode == FALSE) + clear_callout_args(n, types, vals); + return r; +} + +/* (*name[TAG]) (*name[TAG]{a,b,..}) */ +static int +prs_callout_of_name(Node** np, int cterm, UChar** src, UChar* end, + ParseEnv* env) +{ + int r; + int i; + int in; + int num; + int name_id; + int arg_num; + int max_arg_num; + int opt_arg_num; + int is_not_single; + OnigCodePoint c; + UChar* name_start; + UChar* name_end; + UChar* tag_start; + UChar* tag_end; + Node* node; + CalloutListEntry* e; + RegexExt* ext; + unsigned int types[ONIG_CALLOUT_MAX_ARGS_NUM]; + OnigValue vals[ONIG_CALLOUT_MAX_ARGS_NUM]; + OnigEncoding enc = env->enc; + UChar* p = *src; + + /* PFETCH_READY; */ + if (PEND) return ONIGERR_INVALID_CALLOUT_PATTERN; + + node = 0; + name_start = p; + while (1) { + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + name_end = p; + PFETCH_S(c); + if (c == cterm || c == '[' || c == '{') break; + } + + if (! is_allowed_callout_name(enc, name_start, name_end)) + return ONIGERR_INVALID_CALLOUT_NAME; + + if (c == '[') { + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + tag_end = tag_start = p; + while (! PEND) { + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + tag_end = p; + PFETCH_S(c); + if (c == ']') break; + } + if (! is_allowed_callout_tag_name(enc, tag_start, tag_end)) + return ONIGERR_INVALID_CALLOUT_TAG_NAME; + + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + PFETCH_S(c); + } + else { + tag_start = tag_end = 0; + } + + if (c == '{') { + UChar* save; + + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + + /* read for single check only */ + save = p; + arg_num = prs_callout_args(TRUE, '}', &p, end, -1, NULL, NULL, env); + if (arg_num < 0) return arg_num; + + is_not_single = PPEEK_IS(cterm) ? 0 : 1; + p = save; + r = get_callout_name_id_by_name(enc, is_not_single, name_start, name_end, + &name_id); + if (r != ONIG_NORMAL) return r; + + max_arg_num = get_callout_arg_num_by_name_id(name_id); + for (i = 0; i < max_arg_num; i++) { + types[i] = get_callout_arg_type_by_name_id(name_id, i); + } + + arg_num = prs_callout_args(FALSE, '}', &p, end, max_arg_num, types, vals, env); + if (arg_num < 0) return arg_num; + + if (PEND) { + r = ONIGERR_END_PATTERN_IN_GROUP; + goto err_clear; + } + PFETCH_S(c); + } + else { + arg_num = 0; + + is_not_single = 0; + r = get_callout_name_id_by_name(enc, is_not_single, name_start, name_end, + &name_id); + if (r != ONIG_NORMAL) return r; + + max_arg_num = get_callout_arg_num_by_name_id(name_id); + for (i = 0; i < max_arg_num; i++) { + types[i] = get_callout_arg_type_by_name_id(name_id, i); + } + } + + in = onig_get_callout_in_by_name_id(name_id); + opt_arg_num = get_callout_opt_arg_num_by_name_id(name_id); + if (arg_num > max_arg_num || arg_num < (max_arg_num - opt_arg_num)) { + r = ONIGERR_INVALID_CALLOUT_ARG; + goto err_clear; + } + + if (c != cterm) { + r = ONIGERR_INVALID_CALLOUT_PATTERN; + goto err_clear; + } + + r = reg_callout_list_entry(env, &num); + if (r != 0) goto err_clear; + + ext = onig_get_regex_ext(env->reg); + if (IS_NULL(ext)) { + r = ONIGERR_MEMORY; goto err_clear; + } + if (IS_NULL(ext->pattern)) { + r = onig_ext_set_pattern(env->reg, env->pattern, env->pattern_end); + if (r != ONIG_NORMAL) goto err_clear; + } + + if (tag_start != tag_end) { + r = callout_tag_entry(env, env->reg, tag_start, tag_end, num); + if (r != ONIG_NORMAL) goto err_clear; + } + + e = onig_reg_callout_list_at(env->reg, num); + if (IS_NULL(e)) { + r = ONIGERR_MEMORY; goto err_clear; + } + + r = node_new_callout(&node, ONIG_CALLOUT_OF_NAME, num, name_id, env); + if (r != ONIG_NORMAL) goto err_clear; + + e->of = ONIG_CALLOUT_OF_NAME; + e->in = in; + e->name_id = name_id; + e->type = onig_get_callout_type_by_name_id(name_id); + e->start_func = onig_get_callout_start_func_by_name_id(name_id); + e->end_func = onig_get_callout_end_func_by_name_id(name_id); + e->u.arg.num = max_arg_num; + e->u.arg.passed_num = arg_num; + for (i = 0; i < max_arg_num; i++) { + e->u.arg.types[i] = types[i]; + if (i < arg_num) + e->u.arg.vals[i] = vals[i]; + else + e->u.arg.vals[i] = get_callout_opt_default_by_name_id(name_id, i); + } + + *np = node; + *src = p; + return 0; + + err_clear: + clear_callout_args(arg_num, types, vals); + return r; +} +#endif + +#ifdef USE_WHOLE_OPTIONS +static int +set_whole_options(OnigOptionType option, ParseEnv* env) +{ + if ((env->flags & PE_FLAG_HAS_WHOLE_OPTIONS) != 0) + return ONIGERR_INVALID_GROUP_OPTION; + + env->flags |= PE_FLAG_HAS_WHOLE_OPTIONS; + + if (OPTON_DONT_CAPTURE_GROUP(option)) { + env->reg->options |= ONIG_OPTION_DONT_CAPTURE_GROUP; + if ((option & (ONIG_OPTION_DONT_CAPTURE_GROUP|ONIG_OPTION_CAPTURE_GROUP)) == (ONIG_OPTION_DONT_CAPTURE_GROUP|ONIG_OPTION_CAPTURE_GROUP)) + return ONIGERR_INVALID_COMBINATION_OF_OPTIONS; + } + + if ((option & ONIG_OPTION_IGNORECASE_IS_ASCII) != 0) { + env->reg->case_fold_flag &= + ~(INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR | + ONIGENC_CASE_FOLD_TURKISH_AZERI); + env->reg->case_fold_flag |= ONIGENC_CASE_FOLD_ASCII_ONLY; + env->reg->options |= ONIG_OPTION_IGNORECASE_IS_ASCII; + } + + if (OPTON_FIND_LONGEST(option)) { + env->reg->options |= ONIG_OPTION_FIND_LONGEST; + } + + return 0; +} +#endif + +static int +prs_bag(Node** np, PToken* tok, int term, UChar** src, UChar* end, + ParseEnv* env) +{ + int r, num; + Node *target; + OnigOptionType option; + OnigCodePoint c; + int list_capture; + OnigEncoding enc; + UChar* p; + PFETCH_READY; + + p = *src; + enc = env->enc; + *np = NULL; + if (PEND) return ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS; + + option = env->options; + c = PPEEK; + if (c == '?' && IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_GROUP_EFFECT)) { + PINC; + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + + PFETCH(c); + switch (c) { + case ':': /* (?:...) grouping only */ + group: + r = fetch_token(tok, &p, end, env); + if (r < 0) return r; + r = prs_alts(np, tok, term, &p, end, env, FALSE); + if (r < 0) return r; + *src = p; + return 1; /* group */ + break; + + case '=': + *np = node_new_anchor(ANCR_PREC_READ); + break; + case '!': /* preceding read */ + *np = node_new_anchor(ANCR_PREC_READ_NOT); + break; + case '>': /* (?>...) stop backtrack */ + *np = node_new_bag(BAG_STOP_BACKTRACK); + break; + + case '\'': + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) { + goto named_group1; + } + else + return ONIGERR_UNDEFINED_GROUP_OPTION; + break; + + case '<': /* look behind (?<=...), (?syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) { + UChar *name; + UChar *name_end; + enum REF_NUM num_type; + + PUNFETCH; + c = '<'; + + named_group1: + list_capture = 0; + +#ifdef USE_CAPTURE_HISTORY + named_group2: +#endif + name = p; + r = fetch_name((OnigCodePoint )c, &p, end, &name_end, env, &num, + &num_type, FALSE); + if (r < 0) return r; + + num = scan_env_add_mem_entry(env); + if (num < 0) return num; + if (list_capture != 0 && num >= (int )MEM_STATUS_BITS_NUM) + return ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY; + + r = name_add(env->reg, name, name_end, num, env); + if (r != 0) return r; + *np = node_new_memory(1); + CHECK_NULL_RETURN_MEMERR(*np); + BAG_(*np)->m.regnum = num; + if (list_capture != 0) + MEM_STATUS_ON_SIMPLE(env->cap_history, num); + env->num_named++; + } + else { + return ONIGERR_UNDEFINED_GROUP_OPTION; + } + } + break; + + case '~': + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_TILDE_ABSENT_GROUP)) { + Node* absent; + Node* expr; + int head_bar; + int is_range_cutter; + + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + + if (PPEEK_IS('|')) { /* (?~|generator|absent) */ + PINC; + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + + head_bar = 1; + if (PPEEK_IS(')')) { /* (?~|) : range clear */ + PINC; + r = make_range_clear(np, env); + if (r != 0) return r; + env->flags |= PE_FLAG_HAS_ABSENT_STOPPER; + goto end; + } + } + else + head_bar = 0; + + r = fetch_token(tok, &p, end, env); + if (r < 0) return r; + r = prs_alts(&absent, tok, term, &p, end, env, TRUE); + if (r < 0) { + onig_node_free(absent); + return r; + } + + expr = NULL_NODE; + is_range_cutter = 0; + if (head_bar != 0) { + Node* top = absent; + if (ND_TYPE(top) != ND_ALT || IS_NULL(ND_CDR(top))) { + expr = NULL_NODE; + is_range_cutter = 1; + env->flags |= PE_FLAG_HAS_ABSENT_STOPPER; + } + else { + absent = ND_CAR(top); + expr = ND_CDR(top); + ND_CAR(top) = NULL_NODE; + ND_CDR(top) = NULL_NODE; + onig_node_free(top); + if (IS_NULL(ND_CDR(expr))) { + top = expr; + expr = ND_CAR(top); + ND_CAR(top) = NULL_NODE; + onig_node_free(top); + } + } + } + + r = make_absent_tree(np, absent, expr, is_range_cutter, env); + if (r != 0) { + return r; + } + goto end; + } + else { + return ONIGERR_UNDEFINED_GROUP_OPTION; + } + break; + +#ifdef USE_CALLOUT + case '{': + if (! IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_BRACE_CALLOUT_CONTENTS)) + return ONIGERR_UNDEFINED_GROUP_OPTION; + + r = prs_callout_of_contents(np, ')', &p, end, env); + if (r != 0) return r; + + goto end; + break; +#endif + + case '(': + /* (?()...) */ + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LPAREN_IF_ELSE)) { + UChar *prev; + Node* condition; + int condition_is_checker; + + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + PFETCH(c); + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + + if (IS_CODE_DIGIT_ASCII(enc, c) + || c == '-' || c == '+' || c == '<' || c == '\'') { +#ifdef USE_BACKREF_WITH_LEVEL + int exist_level; + int level; +#endif + UChar* name_end; + int back_num; + enum REF_NUM num_type; + int is_enclosed; + + is_enclosed = (c == '<' || c == '\'') ? 1 : 0; + if (! is_enclosed) + PUNFETCH; + prev = p; +#ifdef USE_BACKREF_WITH_LEVEL + exist_level = 0; + name_end = NULL_UCHARP; /* no need. escape gcc warning. */ + r = fetch_name_with_level( + (OnigCodePoint )(is_enclosed != 0 ? c : '('), + &p, end, &name_end, + env, &back_num, &level, &num_type); + if (r == 1) exist_level = 1; +#else + r = fetch_name((OnigCodePoint )(is_enclosed != 0 ? c : '('), + &p, end, &name_end, env, &back_num, &num_type, TRUE); +#endif + if (r < 0) { + if (is_enclosed == 0) { + goto any_condition; + } + else + return r; + } + + condition_is_checker = 1; + if (num_type != IS_NOT_NUM) { + if (num_type == IS_REL_NUM) { + back_num = backref_rel_to_abs(back_num, env); + } + if (back_num <= 0) + return ONIGERR_INVALID_BACKREF; + + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_STRICT_CHECK_BACKREF)) { + if (back_num > env->num_mem || + IS_NULL(PARSEENV_MEMENV(env)[back_num].mem_node)) + return ONIGERR_INVALID_BACKREF; + } + + condition = node_new_backref_checker(1, &back_num, FALSE, +#ifdef USE_BACKREF_WITH_LEVEL + exist_level, level, +#endif + env); + } + else { + int num; + int* backs; + + num = name_to_group_numbers(env, prev, name_end, &backs); + if (num <= 0) { + return ONIGERR_UNDEFINED_NAME_REFERENCE; + } + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_STRICT_CHECK_BACKREF)) { + int i; + for (i = 0; i < num; i++) { + if (backs[i] > env->num_mem || + IS_NULL(PARSEENV_MEMENV(env)[backs[i]].mem_node)) + return ONIGERR_INVALID_BACKREF; + } + } + + condition = node_new_backref_checker(num, backs, TRUE, +#ifdef USE_BACKREF_WITH_LEVEL + exist_level, level, +#endif + env); + } + + if (is_enclosed != 0) { + if (PEND) goto err_if_else; + PFETCH(c); + if (c != ')') goto err_if_else; + } + } +#ifdef USE_CALLOUT + else if (c == '?') { + if (IS_SYNTAX_OP2(env->syntax, + ONIG_SYN_OP2_QMARK_BRACE_CALLOUT_CONTENTS)) { + if (! PEND && PPEEK_IS('{')) { + /* condition part is callouts of contents: (?(?{...})THEN|ELSE) */ + condition_is_checker = 0; + PFETCH(c); + r = prs_callout_of_contents(&condition, ')', &p, end, env); + if (r != 0) return r; + goto end_condition; + } + } + goto any_condition; + } + else if (c == '*' && + IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ASTERISK_CALLOUT_NAME)) { + condition_is_checker = 0; + r = prs_callout_of_name(&condition, ')', &p, end, env); + if (r != 0) return r; + goto end_condition; + } +#endif + else { + any_condition: + PUNFETCH; + condition_is_checker = 0; + r = fetch_token(tok, &p, end, env); + if (r < 0) return r; + r = prs_alts(&condition, tok, term, &p, end, env, FALSE); + if (r < 0) { + onig_node_free(condition); + return r; + } + } + +#ifdef USE_CALLOUT + end_condition: +#endif + CHECK_NULL_RETURN_MEMERR(condition); + + if (PEND) { + err_if_else: + onig_node_free(condition); + return ONIGERR_END_PATTERN_IN_GROUP; + } + + if (PPEEK_IS(')')) { /* case: empty body: make backref checker */ + if (condition_is_checker == 0) { + onig_node_free(condition); + return ONIGERR_INVALID_IF_ELSE_SYNTAX; + } + PFETCH(c); + *np = condition; + } + else { /* if-else */ + int then_is_empty; + Node *Then, *Else; + + Then = 0; + if (PPEEK_IS('|')) { + PFETCH(c); + then_is_empty = 1; + } + else + then_is_empty = 0; + + r = fetch_token(tok, &p, end, env); + if (r < 0) { + onig_node_free(condition); + return r; + } + r = prs_alts(&target, tok, term, &p, end, env, TRUE); + if (r < 0) { + onig_node_free(condition); + onig_node_free(target); + return r; + } + + if (then_is_empty != 0) { + Else = target; + } + else { + if (ND_TYPE(target) == ND_ALT) { + Then = ND_CAR(target); + if (ND_CDR(ND_CDR(target)) == NULL_NODE) { + Else = ND_CAR(ND_CDR(target)); + cons_node_free_alone(ND_CDR(target)); + } + else { + Else = ND_CDR(target); + } + cons_node_free_alone(target); + } + else { + Then = target; + Else = 0; + } + } + + *np = node_new_bag_if_else(condition, Then, Else); + if (IS_NULL(*np)) { + onig_node_free(condition); + onig_node_free(Then); + onig_node_free(Else); + return ONIGERR_MEMORY; + } + } + goto end; + } + else { + return ONIGERR_UNDEFINED_GROUP_OPTION; + } + break; + +#ifdef USE_CAPTURE_HISTORY + case '@': + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY)) { + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) { + PFETCH(c); + if (c == '<' || c == '\'') { + list_capture = 1; + goto named_group2; /* (?@...) */ + } + PUNFETCH; + } + + *np = node_new_memory(0); + CHECK_NULL_RETURN_MEMERR(*np); + num = scan_env_add_mem_entry(env); + if (num < 0) { + return num; + } + else if (num >= (int )MEM_STATUS_BITS_NUM) { + return ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY; + } + BAG_(*np)->m.regnum = num; + MEM_STATUS_ON_SIMPLE(env->cap_history, num); + } + else { + return ONIGERR_UNDEFINED_GROUP_OPTION; + } + break; +#endif + +#ifdef USE_WHOLE_OPTIONS + case 'C': + case 'I': + case 'L': + if (! IS_SYNTAX_BV(env->syntax, ONIG_SYN_WHOLE_OPTIONS)) + return ONIGERR_UNDEFINED_GROUP_OPTION; + + goto options_start; + break; +#endif + + case 'P': + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_CAPITAL_P_NAME)) { + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + PFETCH(c); + if (c == '<') goto named_group1; + + return ONIGERR_UNDEFINED_GROUP_OPTION; + } + /* else fall */ + case 'W': case 'D': case 'S': + case 'y': + if (! IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_ONIGURUMA)) + return ONIGERR_UNDEFINED_GROUP_OPTION; + /* else fall */ + +#ifdef USE_POSIXLINE_OPTION + case 'p': +#endif + case 'a': + case '-': case 'i': case 'm': case 's': case 'x': +#ifdef USE_WHOLE_OPTIONS + options_start: +#endif + { + int neg; +#ifdef USE_WHOLE_OPTIONS + int whole_options; + whole_options = FALSE; +#endif + neg = FALSE; + while (1) { + switch (c) { + case ':': + case ')': + break; + + case '-': neg = TRUE; break; + case 'x': OPTION_NEGATE(option, ONIG_OPTION_EXTEND, neg); break; + case 'i': OPTION_NEGATE(option, ONIG_OPTION_IGNORECASE, neg); break; + case 's': + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL)) { + OPTION_NEGATE(option, ONIG_OPTION_MULTILINE, neg); + } + else + return ONIGERR_UNDEFINED_GROUP_OPTION; + break; + + case 'm': + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL)) { + OPTION_NEGATE(option, ONIG_OPTION_SINGLELINE, (neg == FALSE ? TRUE : FALSE)); + } + else if (IS_SYNTAX_OP2(env->syntax, + ONIG_SYN_OP2_OPTION_ONIGURUMA|ONIG_SYN_OP2_OPTION_RUBY)) { + OPTION_NEGATE(option, ONIG_OPTION_MULTILINE, neg); + } + else + return ONIGERR_UNDEFINED_GROUP_OPTION; + break; +#ifdef USE_POSIXLINE_OPTION + case 'p': + OPTION_NEGATE(option, ONIG_OPTION_MULTILINE|ONIG_OPTION_SINGLELINE, neg); + break; +#endif + case 'W': + if (! IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_ONIGURUMA)) + return ONIGERR_UNDEFINED_GROUP_OPTION; + OPTION_NEGATE(option, ONIG_OPTION_WORD_IS_ASCII, neg); + break; + case 'D': + if (! IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_ONIGURUMA)) + return ONIGERR_UNDEFINED_GROUP_OPTION; + OPTION_NEGATE(option, ONIG_OPTION_DIGIT_IS_ASCII, neg); + break; + case 'S': + if (! IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_ONIGURUMA)) + return ONIGERR_UNDEFINED_GROUP_OPTION; + OPTION_NEGATE(option, ONIG_OPTION_SPACE_IS_ASCII, neg); + break; + case 'P': + if (! IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_ONIGURUMA)) + return ONIGERR_UNDEFINED_GROUP_OPTION; + OPTION_NEGATE(option, ONIG_OPTION_POSIX_IS_ASCII, neg); + break; + + case 'y': /* y{g}, y{w} */ + { + if (! IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_ONIGURUMA)) + return ONIGERR_UNDEFINED_GROUP_OPTION; + + if (neg == TRUE) return ONIGERR_UNDEFINED_GROUP_OPTION; + + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + if (! PPEEK_IS('{')) return ONIGERR_UNDEFINED_GROUP_OPTION; + PFETCH(c); + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + PFETCH(c); + switch (c) { + case 'g': + if (! ONIGENC_IS_UNICODE_ENCODING(enc)) + return ONIGERR_UNDEFINED_GROUP_OPTION; + + OPTION_NEGATE(option, ONIG_OPTION_TEXT_SEGMENT_EXTENDED_GRAPHEME_CLUSTER, FALSE); + OPTION_NEGATE(option, ONIG_OPTION_TEXT_SEGMENT_WORD, TRUE); + break; +#ifdef USE_UNICODE_WORD_BREAK + case 'w': + if (! ONIGENC_IS_UNICODE_ENCODING(enc)) + return ONIGERR_UNDEFINED_GROUP_OPTION; + + OPTION_NEGATE(option, ONIG_OPTION_TEXT_SEGMENT_WORD, FALSE); + OPTION_NEGATE(option, ONIG_OPTION_TEXT_SEGMENT_EXTENDED_GRAPHEME_CLUSTER, TRUE); + break; +#endif + default: + return ONIGERR_UNDEFINED_GROUP_OPTION; + break; + } + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + PFETCH(c); + if (c != '}') + return ONIGERR_UNDEFINED_GROUP_OPTION; + } /* case 'y' */ + break; + + case 'a': + if (! IS_SYNTAX_BV(env->syntax, ONIG_SYN_PYTHON)) + return ONIGERR_UNDEFINED_GROUP_OPTION; + + OPTION_NEGATE(option, ONIG_OPTION_POSIX_IS_ASCII, neg); + break; + +#ifdef USE_WHOLE_OPTIONS + case 'C': + if (! IS_SYNTAX_BV(env->syntax, ONIG_SYN_WHOLE_OPTIONS)) + return ONIGERR_UNDEFINED_GROUP_OPTION; + + if (neg == TRUE) return ONIGERR_INVALID_GROUP_OPTION; + OPTION_NEGATE(option, ONIG_OPTION_DONT_CAPTURE_GROUP, neg); + whole_options = TRUE; + break; + + case 'I': + if (! IS_SYNTAX_BV(env->syntax, ONIG_SYN_WHOLE_OPTIONS)) + return ONIGERR_UNDEFINED_GROUP_OPTION; + + if (neg == TRUE) return ONIGERR_INVALID_GROUP_OPTION; + OPTION_NEGATE(option, ONIG_OPTION_IGNORECASE_IS_ASCII, neg); + whole_options = TRUE; + break; + + case 'L': + if (! IS_SYNTAX_BV(env->syntax, ONIG_SYN_WHOLE_OPTIONS)) + return ONIGERR_UNDEFINED_GROUP_OPTION; + + if (neg == TRUE) return ONIGERR_INVALID_GROUP_OPTION; + OPTION_NEGATE(option, ONIG_OPTION_FIND_LONGEST, neg); + whole_options = TRUE; + break; +#endif + + default: + return ONIGERR_UNDEFINED_GROUP_OPTION; + } + + if (c == ')') { + *np = node_new_option(option); + CHECK_NULL_RETURN_MEMERR(*np); + +#ifdef USE_WHOLE_OPTIONS + if (whole_options == TRUE) { + r = set_whole_options(option, env); + if (r != 0) return r; + ND_STATUS_ADD(*np, WHOLE_OPTIONS); + } +#endif + *src = p; + return 2; /* option only */ + } + else if (c == ':') { + OnigOptionType prev = env->options; + + env->options = option; +#ifdef USE_WHOLE_OPTIONS + if (whole_options == TRUE) { + r = set_whole_options(option, env); + if (r != 0) return r; + } +#endif + r = fetch_token(tok, &p, end, env); + if (r < 0) return r; + r = prs_alts(&target, tok, term, &p, end, env, FALSE); + env->options = prev; + if (r < 0) { + onig_node_free(target); + return r; + } + + *np = node_new_option(option); + CHECK_NULL_RETURN_MEMERR(*np); + ND_BODY(*np) = target; + ND_STATUS_ADD(*np, WHOLE_OPTIONS); + + *src = p; + return 0; + } + + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + PFETCH(c); + } /* while (1) */ + } + break; + + default: + return ONIGERR_UNDEFINED_GROUP_OPTION; + } + } +#ifdef USE_CALLOUT + else if (c == '*' && + IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ASTERISK_CALLOUT_NAME)) { + PINC; + r = prs_callout_of_name(np, ')', &p, end, env); + if (r != 0) return r; + + goto end; + } +#endif + else { + if (OPTON_DONT_CAPTURE_GROUP(env->options)) + goto group; + + *np = node_new_memory(0); + CHECK_NULL_RETURN_MEMERR(*np); + num = scan_env_add_mem_entry(env); + if (num < 0) return num; + BAG_(*np)->m.regnum = num; + } + + CHECK_NULL_RETURN_MEMERR(*np); + r = fetch_token(tok, &p, end, env); + if (r < 0) return r; + r = prs_alts(&target, tok, term, &p, end, env, FALSE); + if (r < 0) { + onig_node_free(target); + return r; + } + + ND_BODY(*np) = target; + + if (ND_TYPE(*np) == ND_BAG) { + if (BAG_(*np)->type == BAG_MEMORY) { + /* Don't move this to previous of prs_alts() */ + r = scan_env_set_mem_node(env, BAG_(*np)->m.regnum, *np); + if (r != 0) return r; + } + } + + end: + *src = p; + return 0; +} + +static const char* PopularQStr[] = { + "?", "*", "+", "??", "*?", "+?" +}; + +static const char* ReduceQStr[] = { + "", "", "*", "*?", "??", "+ and ??", "+? and ?" +}; + +static int +assign_quantifier_body(Node* qnode, Node* target, int group, ParseEnv* env) +{ + QuantNode* qn; + + qn = QUANT_(qnode); + if (qn->lower == 1 && qn->upper == 1) + return 1; + + switch (ND_TYPE(target)) { + case ND_STRING: + if (group == 0) { + if (str_node_can_be_split(target, env->enc)) { + Node* n = str_node_split_last_char(target, env->enc); + if (IS_NOT_NULL(n)) { + ND_BODY(qnode) = n; + return 2; + } + } + } + break; + + case ND_QUANT: + { /* check redundant double repeat. */ + /* verbose warn (?:.?)? etc... but not warn (.?)? etc... */ + QuantNode* qnt = QUANT_(target); + int nestq_num = quantifier_type_num(qn); + int targetq_num = quantifier_type_num(qnt); + +#ifdef USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR + if (targetq_num >= 0 && nestq_num >= 0 && + IS_SYNTAX_BV(env->syntax, ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT)) { + UChar buf[WARN_BUFSIZE]; + + switch(ReduceTypeTable[targetq_num][nestq_num]) { + case RQ_ASIS: + break; + + case RQ_DEL: + if (onig_verb_warn != onig_null_warn) { + onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc, + env->pattern, env->pattern_end, + "redundant nested repeat operator"); + (*onig_verb_warn)((char* )buf); + } + goto warn_exit; + break; + + default: + if (onig_verb_warn != onig_null_warn) { + onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc, + env->pattern, env->pattern_end, + "nested repeat operator %s and %s was replaced with '%s'", + PopularQStr[targetq_num], PopularQStr[nestq_num], + ReduceQStr[ReduceTypeTable[targetq_num][nestq_num]]); + (*onig_verb_warn)((char* )buf); + } + goto warn_exit; + break; + } + } + + warn_exit: +#endif + if (targetq_num >= 0 && nestq_num < 0) { + if (targetq_num == 1 || targetq_num == 2) { /* * or + */ + /* (?:a*){n,m}, (?:a+){n,m} => (?:a*){n,n}, (?:a+){n,n} */ + if (! IS_INFINITE_REPEAT(qn->upper) && qn->upper > 1 && qn->greedy) { + qn->upper = (qn->lower == 0 ? 1 : qn->lower); + } + } + } + else { + int r; + + ND_BODY(qnode) = target; + r = onig_reduce_nested_quantifier(qnode); + return r; + } + } + break; + + default: + break; + } + + ND_BODY(qnode) = target; + return 0; +} + + +#ifndef CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS +static int +clear_not_flag_cclass(CClassNode* cc, OnigEncoding enc) +{ + BBuf *tbuf; + int r; + + if (IS_NCCLASS_NOT(cc)) { + bitset_invert(cc->bs); + + if (! ONIGENC_IS_SINGLEBYTE(enc)) { + r = not_code_range_buf(enc, cc->mbuf, &tbuf); + if (r != 0) return r; + + bbuf_free(cc->mbuf); + cc->mbuf = tbuf; + } + + NCCLASS_CLEAR_NOT(cc); + } + + return 0; +} +#endif /* CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS */ + +#define ADD_CODE_INTO_CC(cc, code, enc) do {\ + if (ONIGENC_MBC_MINLEN(enc) > 1 || ONIGENC_CODE_TO_MBCLEN(enc, code) != 1) {\ + add_code_range_to_buf(&((cc)->mbuf), code, code);\ + }\ + else {\ + BITSET_SET_BIT((cc)->bs, code);\ + }\ +} while (0) + +extern int +onig_new_cclass_with_code_list(Node** rnode, OnigEncoding enc, + int n, OnigCodePoint codes[]) +{ + int i; + Node* node; + CClassNode* cc; + + *rnode = NULL_NODE; + + node = node_new_cclass(); + CHECK_NULL_RETURN_MEMERR(node); + + cc = CCLASS_(node); + + for (i = 0; i < n; i++) { + ADD_CODE_INTO_CC(cc, codes[i], enc); + } + + *rnode = node; + return 0; +} + +typedef struct { + ParseEnv* env; + CClassNode* cc; + Node* alt_root; + Node** ptail; +} IApplyCaseFoldArg; + +static int +i_apply_case_fold(OnigCodePoint from, OnigCodePoint to[], int to_len, + void* arg) +{ + IApplyCaseFoldArg* iarg; + ParseEnv* env; + OnigEncoding enc; + CClassNode* cc; + + iarg = (IApplyCaseFoldArg* )arg; + env = iarg->env; + cc = iarg->cc; + enc = env->enc; + + if (to_len == 1) { + int is_in = onig_is_code_in_cc(enc, from, cc); +#ifdef CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS + if ((is_in != 0 && !IS_NCCLASS_NOT(cc)) || + (is_in == 0 && IS_NCCLASS_NOT(cc))) { + ADD_CODE_INTO_CC(cc, *to, enc); + } +#else + if (is_in != 0) { + if (ONIGENC_MBC_MINLEN(enc) > 1 || + ONIGENC_CODE_TO_MBCLEN(enc, *to) != 1) { + if (IS_NCCLASS_NOT(cc)) clear_not_flag_cclass(cc, enc); + add_code_range(&(cc->mbuf), env, *to, *to); + } + else { + if (IS_NCCLASS_NOT(cc)) { + BITSET_CLEAR_BIT(cc->bs, *to); + } + else + BITSET_SET_BIT(cc->bs, *to); + } + } +#endif /* CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS */ + } + else { + int r, i, len; + UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN]; + + if (onig_is_code_in_cc(enc, from, cc) +#ifdef CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS + && !IS_NCCLASS_NOT(cc) +#endif + ) { + int n, j, m, index; + Node* list_node; + Node* ns[3]; + + n = 0; + for (i = 0; i < to_len; i++) { + OnigCodePoint code; + Node* csnode; + CClassNode* cs_cc; + + index = 0; + if (ONIGENC_IS_UNICODE_ENCODING(enc) && + (index = onigenc_unicode_fold1_key(&to[i])) >= 0) { + csnode = node_new_cclass(); + cs_cc = CCLASS_(csnode); + if (IS_NULL(csnode)) { + err_free_ns: + for (j = 0; j < n; j++) onig_node_free(ns[j]); + return ONIGERR_MEMORY; + } + m = FOLDS1_UNFOLDS_NUM(index); + for (j = 0; j < m; j++) { + code = FOLDS1_UNFOLDS(index)[j]; + ADD_CODE_INTO_CC(cs_cc, code, enc); + } + ADD_CODE_INTO_CC(cs_cc, to[i], enc); + ns[n++] = csnode; + } + else { + len = ONIGENC_CODE_TO_MBC(enc, to[i], buf); + if (n == 0 || ND_TYPE(ns[n-1]) != ND_STRING) { + csnode = node_new_str(buf, buf + len); + if (IS_NULL(csnode)) goto err_free_ns; + + if (index == 0) + ND_STATUS_ADD(csnode, IGNORECASE); + else + ND_STRING_SET_CASE_EXPANDED(csnode); + + ns[n++] = csnode; + } + else { + r = onig_node_str_cat(ns[n-1], buf, buf + len); + if (r < 0) goto err_free_ns; + } + } + } + + if (n == 1) + list_node = ns[0]; + else + list_node = make_list(n, ns); + + *(iarg->ptail) = onig_node_new_alt(list_node, NULL_NODE); + if (IS_NULL(*(iarg->ptail))) { + onig_node_free(list_node); + return ONIGERR_MEMORY; + } + iarg->ptail = &(ND_CDR((*(iarg->ptail)))); + } + } + + return 0; +} + +static int +prs_exp(Node** np, PToken* tok, int term, UChar** src, UChar* end, + ParseEnv* env, int group_head) +{ + int r, len, group; + Node* qn; + Node** tp; + unsigned int parse_depth; + + retry: + group = 0; + *np = NULL; + if (tok->type == (enum TokenSyms )term) + goto end_of_token; + + parse_depth = env->parse_depth; + + switch (tok->type) { + case TK_ALT: + case TK_EOT: + end_of_token: + *np = node_new_empty(); + CHECK_NULL_RETURN_MEMERR(*np); + return tok->type; + break; + + case TK_SUBEXP_OPEN: + r = prs_bag(np, tok, TK_SUBEXP_CLOSE, src, end, env); + if (r < 0) return r; + if (r == 1) { /* group */ + if (group_head == 0) + group = 1; + else { + Node* target = *np; + *np = node_new_group(target); + if (IS_NULL(*np)) { + onig_node_free(target); + return ONIGERR_MEMORY; + } + group = 2; + } + } + else if (r == 2) { /* option only */ + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ISOLATED_OPTION_CONTINUE_BRANCH)) { + env->options = BAG_(*np)->o.options; + r = fetch_token(tok, src, end, env); + if (r < 0) return r; + onig_node_free(*np); + goto retry; + } + else { + Node* target; + OnigOptionType prev = env->options; + + env->options = BAG_(*np)->o.options; + r = fetch_token(tok, src, end, env); + if (r < 0) return r; + r = prs_alts(&target, tok, term, src, end, env, FALSE); + env->options = prev; + if (r < 0) { + onig_node_free(target); + return r; + } + ND_BODY(*np) = target; + } + return tok->type; + } + break; + + case TK_SUBEXP_CLOSE: + if (! IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP)) + return ONIGERR_UNMATCHED_CLOSE_PARENTHESIS; + + if (tok->escaped) goto tk_crude_byte; + else goto tk_byte; + break; + + case TK_STRING: + tk_byte: + { + *np = node_new_str_with_options(tok->backp, *src, env->options); + tk_byte2: + CHECK_NULL_RETURN_MEMERR(*np); + + while (1) { + r = fetch_token(tok, src, end, env); + if (r < 0) return r; + if (r != TK_STRING) break; + + r = onig_node_str_cat(*np, tok->backp, *src); + if (r < 0) return r; + } + + string_end: + tp = np; + goto repeat; + } + break; + + case TK_CRUDE_BYTE: + tk_crude_byte: + { + *np = node_new_str_crude_char(tok->u.byte, env->options); + CHECK_NULL_RETURN_MEMERR(*np); + len = 1; + while (1) { + if (len >= ONIGENC_MBC_MINLEN(env->enc)) { + if (len == enclen(env->enc, STR_(*np)->s)) { + r = fetch_token(tok, src, end, env); + goto tk_crude_byte_end; + } + } + + r = fetch_token(tok, src, end, env); + if (r < 0) return r; + if (r != TK_CRUDE_BYTE) + return ONIGERR_TOO_SHORT_MULTI_BYTE_STRING; + + r = node_str_cat_char(*np, tok->u.byte); + if (r < 0) return r; + + len++; + } + + tk_crude_byte_end: + if (! ONIGENC_IS_VALID_MBC_STRING(env->enc, STR_(*np)->s, STR_(*np)->end)) + return ONIGERR_INVALID_WIDE_CHAR_VALUE; + + ND_STRING_CLEAR_CRUDE(*np); + goto string_end; + } + break; + + case TK_CODE_POINT: + { + UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN]; + len = ONIGENC_CODE_TO_MBCLEN(env->enc, tok->u.code); + if (len < 0) return len; + len = ONIGENC_CODE_TO_MBC(env->enc, tok->u.code, buf); +#ifdef NUMBERED_CHAR_IS_NOT_CASE_AMBIG + *np = node_new_str_crude(buf, buf + len, env->options); +#else + *np = node_new_str_with_options(buf, buf + len, env->options); +#endif + CHECK_NULL_RETURN_MEMERR(*np); + } + break; + + case TK_QUOTE_OPEN: + { + OnigCodePoint end_op[2]; + UChar *qstart, *qend, *nextp; + + end_op[0] = (OnigCodePoint )MC_ESC(env->syntax); + end_op[1] = (OnigCodePoint )'E'; + qstart = *src; + qend = find_str_position(end_op, 2, qstart, end, &nextp, env->enc); + if (IS_NULL(qend)) { + nextp = qend = end; + } + *np = node_new_str_with_options(qstart, qend, env->options); + CHECK_NULL_RETURN_MEMERR(*np); + *src = nextp; + } + break; + + case TK_CHAR_TYPE: + { + switch (tok->u.prop.ctype) { + case ONIGENC_CTYPE_WORD: + *np = node_new_ctype(tok->u.prop.ctype, tok->u.prop.not, env->options); + CHECK_NULL_RETURN_MEMERR(*np); + break; + + case ONIGENC_CTYPE_SPACE: + case ONIGENC_CTYPE_DIGIT: + case ONIGENC_CTYPE_XDIGIT: + { + CClassNode* cc; + + *np = node_new_cclass(); + CHECK_NULL_RETURN_MEMERR(*np); + cc = CCLASS_(*np); + r = add_ctype_to_cc(cc, tok->u.prop.ctype, FALSE, env); + if (r != 0) { + onig_node_free(*np); + *np = NULL_NODE; + return r; + } + if (tok->u.prop.not != 0) NCCLASS_SET_NOT(cc); + } + break; + + default: + return ONIGERR_PARSER_BUG; + break; + } + } + break; + + case TK_CHAR_PROPERTY: + r = prs_char_property(np, tok, src, end, env); + if (r != 0) return r; + break; + + case TK_OPEN_CC: + { + CClassNode* cc; + + r = prs_cc(np, tok, src, end, env); + if (r != 0) return r; + + cc = CCLASS_(*np); + if (OPTON_IGNORECASE(env->options)) { + IApplyCaseFoldArg iarg; + + iarg.env = env; + iarg.cc = cc; + iarg.alt_root = NULL_NODE; + iarg.ptail = &(iarg.alt_root); + + r = ONIGENC_APPLY_ALL_CASE_FOLD(env->enc, env->reg->case_fold_flag, + i_apply_case_fold, &iarg); + if (r != 0) { + onig_node_free(iarg.alt_root); + return r; + } + if (IS_NOT_NULL(iarg.alt_root)) { + Node* work = onig_node_new_alt(*np, iarg.alt_root); + if (IS_NULL(work)) { + onig_node_free(iarg.alt_root); + return ONIGERR_MEMORY; + } + *np = work; + } + } + } + break; + + case TK_ANYCHAR: + *np = node_new_anychar(env->options); + CHECK_NULL_RETURN_MEMERR(*np); + break; + + case TK_ANYCHAR_ANYTIME: + *np = node_new_anychar(env->options); + CHECK_NULL_RETURN_MEMERR(*np); + qn = node_new_quantifier(0, INFINITE_REPEAT, FALSE); + CHECK_NULL_RETURN_MEMERR(qn); + ND_BODY(qn) = *np; + *np = qn; + break; + + case TK_BACKREF: + len = tok->u.backref.num; + *np = node_new_backref(len, + (len > 1 ? tok->u.backref.refs : &(tok->u.backref.ref1)), + tok->u.backref.by_name, +#ifdef USE_BACKREF_WITH_LEVEL + tok->u.backref.exist_level, + tok->u.backref.level, +#endif + env); + CHECK_NULL_RETURN_MEMERR(*np); + break; + +#ifdef USE_CALL + case TK_CALL: + { + int gnum = tok->u.call.gnum; + + *np = node_new_call(tok->u.call.name, tok->u.call.name_end, + gnum, tok->u.call.by_number); + CHECK_NULL_RETURN_MEMERR(*np); + env->num_call++; + if (tok->u.call.by_number != 0 && gnum == 0) { + env->flags |= PE_FLAG_HAS_CALL_ZERO; + } + } + break; +#endif + + case TK_ANCHOR: + *np = node_new_anchor_with_options(tok->u.anchor, env->options); + CHECK_NULL_RETURN_MEMERR(*np); + break; + + case TK_REPEAT: + case TK_INTERVAL: + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS)) { + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS)) + return ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED; + else { + *np = node_new_empty(); + CHECK_NULL_RETURN_MEMERR(*np); + } + } + else { + if (tok->type == TK_INTERVAL && + IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_BRACE_INTERVAL)) { + *np = node_new_str_with_options(tok->backp, *src, env->options); + node_str_remove_char(*np, (UChar )'\\'); + goto tk_byte2; + } + else { + goto tk_byte; + } + } + break; + + case TK_KEEP: + r = node_new_keep(np, env); + if (r < 0) return r; + break; + + case TK_GENERAL_NEWLINE: + r = node_new_general_newline(np, env); + if (r < 0) return r; + break; + + case TK_NO_NEWLINE: + r = node_new_no_newline(np, env); + if (r < 0) return r; + break; + + case TK_TRUE_ANYCHAR: + r = node_new_true_anychar(np); + if (r < 0) return r; + break; + + case TK_TEXT_SEGMENT: + r = make_text_segment(np, env); + if (r < 0) return r; + break; + + default: + return ONIGERR_PARSER_BUG; + break; + } + + { + tp = np; + + re_entry: + r = fetch_token(tok, src, end, env); + if (r < 0) return r; + + repeat: + if (r == TK_REPEAT || r == TK_INTERVAL) { + Node* target; + + if (is_invalid_quantifier_target(*tp)) { + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS)) { + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS)) + return ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID; + } + + return r; + } + + INC_PARSE_DEPTH(parse_depth); + + qn = node_new_quantifier(tok->u.repeat.lower, tok->u.repeat.upper, + r == TK_INTERVAL); + CHECK_NULL_RETURN_MEMERR(qn); + QUANT_(qn)->greedy = tok->u.repeat.greedy; + if (group == 2) { + target = node_drop_group(*tp); + *tp = NULL_NODE; + } + else { + target = *tp; + } + r = assign_quantifier_body(qn, target, group, env); + if (r < 0) { + onig_node_free(qn); + *tp = NULL_NODE; + return r; + } + + if (tok->u.repeat.possessive != 0) { + Node* en; + en = node_new_bag(BAG_STOP_BACKTRACK); + if (IS_NULL(en)) { + onig_node_free(qn); + return ONIGERR_MEMORY; + } + ND_BODY(en) = qn; + qn = en; + } + + if (r == 0) { + *tp = qn; + } + else if (r == 1) { /* x{1,1} ==> x */ + onig_node_free(qn); + *tp = target; + } + else if (r == 2) { /* split case: /abc+/ */ + Node *tmp; + + *tp = node_new_list(*tp, NULL); + if (IS_NULL(*tp)) { + onig_node_free(qn); + return ONIGERR_MEMORY; + } + tmp = ND_CDR(*tp) = node_new_list(qn, NULL); + if (IS_NULL(tmp)) { + onig_node_free(qn); + return ONIGERR_MEMORY; + } + tp = &(ND_CAR(tmp)); + } + group = 0; + goto re_entry; + } + } + + return r; +} + +static int +prs_branch(Node** top, PToken* tok, int term, UChar** src, UChar* end, + ParseEnv* env, int group_head) +{ + int r; + Node *node, **headp; + + *top = NULL; + INC_PARSE_DEPTH(env->parse_depth); + + r = prs_exp(&node, tok, term, src, end, env, group_head); + if (r < 0) { + onig_node_free(node); + return r; + } + + if (r == TK_EOT || r == term || r == TK_ALT) { + *top = node; + } + else { + *top = node_new_list(node, NULL); + if (IS_NULL(*top)) { + mem_err: + onig_node_free(node); + return ONIGERR_MEMORY; + } + + headp = &(ND_CDR(*top)); + while (r != TK_EOT && r != term && r != TK_ALT) { + r = prs_exp(&node, tok, term, src, end, env, FALSE); + if (r < 0) { + onig_node_free(node); + return r; + } + + if (ND_TYPE(node) == ND_LIST) { + *headp = node; + while (IS_NOT_NULL(ND_CDR(node))) node = ND_CDR(node); + headp = &(ND_CDR(node)); + } + else { + *headp = node_new_list(node, NULL); + if (IS_NULL(*headp)) goto mem_err; + headp = &(ND_CDR(*headp)); + } + } + } + + DEC_PARSE_DEPTH(env->parse_depth); + return r; +} + +/* term_tok: TK_EOT or TK_SUBEXP_CLOSE */ +static int +prs_alts(Node** top, PToken* tok, int term, UChar** src, UChar* end, + ParseEnv* env, int group_head) +{ + int r; + Node *node, **headp; + OnigOptionType save_options; + + *top = NULL; + INC_PARSE_DEPTH(env->parse_depth); + save_options = env->options; + + r = prs_branch(&node, tok, term, src, end, env, group_head); + if (r < 0) { + onig_node_free(node); + return r; + } + + if (r == term) { + *top = node; + } + else if (r == TK_ALT) { + *top = onig_node_new_alt(node, NULL); + if (IS_NULL(*top)) { + onig_node_free(node); + return ONIGERR_MEMORY; + } + + headp = &(ND_CDR(*top)); + while (r == TK_ALT) { + r = fetch_token(tok, src, end, env); + if (r < 0) return r; + r = prs_branch(&node, tok, term, src, end, env, FALSE); + if (r < 0) { + onig_node_free(node); + return r; + } + *headp = onig_node_new_alt(node, NULL); + if (IS_NULL(*headp)) { + onig_node_free(node); + onig_node_free(*top); + *top = NULL_NODE; + return ONIGERR_MEMORY; + } + + headp = &(ND_CDR(*headp)); + } + + if (tok->type != (enum TokenSyms )term) + goto err; + } + else { + onig_node_free(node); + err: + if (term == TK_SUBEXP_CLOSE) + return ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS; + else + return ONIGERR_PARSER_BUG; + } + + env->options = save_options; + DEC_PARSE_DEPTH(env->parse_depth); + return r; +} + +static int +prs_regexp(Node** top, UChar** src, UChar* end, ParseEnv* env) +{ + int r; + PToken tok; + + ptoken_init(&tok); + r = fetch_token(&tok, src, end, env); + if (r < 0) return r; + r = prs_alts(top, &tok, TK_EOT, src, end, env, FALSE); + if (r < 0) return r; + + return 0; +} + +#ifdef USE_CALL +static int +make_call_zero_body(Node* node, ParseEnv* env, Node** rnode) +{ + int r; + + Node* x = node_new_memory(0 /* 0: is not named */); + CHECK_NULL_RETURN_MEMERR(x); + + ND_BODY(x) = node; + BAG_(x)->m.regnum = 0; + r = scan_env_set_mem_node(env, 0, x); + if (r != 0) { + onig_node_free(x); + return r; + } + + *rnode = x; + return 0; +} +#endif + +extern int +onig_parse_tree(Node** root, const UChar* pattern, const UChar* end, + regex_t* reg, ParseEnv* env) +{ + int r; + UChar* p; +#ifdef USE_CALLOUT + RegexExt* ext; +#endif + + reg->string_pool = 0; + reg->string_pool_end = 0; + reg->num_mem = 0; + reg->num_repeat = 0; + reg->num_empty_check = 0; + reg->repeat_range_alloc = 0; + reg->repeat_range = (RepeatRange* )NULL; + + names_clear(reg); + + scan_env_clear(env); + env->options = reg->options; + env->case_fold_flag = reg->case_fold_flag; + env->enc = reg->enc; + env->syntax = reg->syntax; + env->pattern = (UChar* )pattern; + env->pattern_end = (UChar* )end; + env->reg = reg; + + *root = NULL; + + if (! ONIGENC_IS_VALID_MBC_STRING(env->enc, pattern, end)) + return ONIGERR_INVALID_WIDE_CHAR_VALUE; + + p = (UChar* )pattern; + r = prs_regexp(root, &p, (UChar* )end, env); + if (r != 0) return r; + +#ifdef USE_CALL + if ((env->flags & PE_FLAG_HAS_CALL_ZERO) != 0) { + Node* zero_node; + r = make_call_zero_body(*root, env, &zero_node); + if (r != 0) return r; + + *root = zero_node; + } +#endif + + reg->num_mem = env->num_mem; + +#ifdef USE_CALLOUT + ext = reg->extp; + if (IS_NOT_NULL(ext) && ext->callout_num > 0) { + r = setup_ext_callout_list_values(reg); + } +#endif + + return r; +} + +extern void +onig_scan_env_set_error_string(ParseEnv* env, int ecode ARG_UNUSED, + UChar* arg, UChar* arg_end) +{ + env->error = arg; + env->error_end = arg_end; +} diff --git a/internal/components/third_party/oniguruma/src/regparse.h b/internal/components/third_party/oniguruma/src/regparse.h new file mode 100644 index 0000000000..adcf00ec69 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/regparse.h @@ -0,0 +1,494 @@ +#ifndef REGPARSE_H +#define REGPARSE_H +/********************************************************************** + regparse.h - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2022 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regint.h" + +#define ND_STRING_MARGIN 16 +#define ND_STRING_BUF_SIZE 24 /* sizeof(CClassNode) - sizeof(int)*4 */ +#define ND_BACKREFS_SIZE 6 + +/* node type */ +typedef enum { + ND_STRING = 0, + ND_CCLASS = 1, + ND_CTYPE = 2, + ND_BACKREF = 3, + ND_QUANT = 4, + ND_BAG = 5, + ND_ANCHOR = 6, + ND_LIST = 7, + ND_ALT = 8, + ND_CALL = 9, + ND_GIMMICK = 10 +} NodeType; + +enum BagType { + BAG_MEMORY = 0, + BAG_OPTION = 1, + BAG_STOP_BACKTRACK = 2, + BAG_IF_ELSE = 3, +}; + +enum GimmickType { + GIMMICK_FAIL = 0, + GIMMICK_SAVE = 1, + GIMMICK_UPDATE_VAR = 2, +#ifdef USE_CALLOUT + GIMMICK_CALLOUT = 3, +#endif +}; + +enum BodyEmptyType { + BODY_IS_NOT_EMPTY = 0, + BODY_MAY_BE_EMPTY = 1, + BODY_MAY_BE_EMPTY_MEM = 2, + BODY_MAY_BE_EMPTY_REC = 3 +}; + +/* bytes buffer */ +typedef struct _BBuf { + UChar* p; + unsigned int used; + unsigned int alloc; +} BBuf; + + +struct _Node; + +typedef struct { + NodeType node_type; + int status; + struct _Node* parent; + + UChar* s; + UChar* end; + unsigned int flag; + UChar buf[ND_STRING_BUF_SIZE]; + int capacity; /* (allocated size - 1) or 0: use buf[] */ +} StrNode; + +typedef struct { + NodeType node_type; + int status; + struct _Node* parent; + + unsigned int flags; + BitSet bs; + BBuf* mbuf; /* multi-byte info or NULL */ +} CClassNode; + +typedef struct { + NodeType node_type; + int status; + struct _Node* parent; + struct _Node* body; + + int lower; + int upper; + int greedy; + enum BodyEmptyType emptiness; + struct _Node* head_exact; + struct _Node* next_head_exact; + int include_referred; /* include called node. don't eliminate even if {0} */ + MemStatusType empty_status_mem; +} QuantNode; + +typedef struct { + NodeType node_type; + int status; + struct _Node* parent; + struct _Node* body; + + enum BagType type; + union { + struct { + int regnum; + AbsAddrType called_addr; + int entry_count; + int called_state; + } m; + struct { + OnigOptionType options; + } o; + struct { + /* body is condition */ + struct _Node* Then; + struct _Node* Else; + } te; + }; + /* for multiple call reference */ + OnigLen min_len; /* min length (byte) */ + OnigLen max_len; /* max length (byte) */ + OnigLen min_char_len; + OnigLen max_char_len; + int opt_count; /* referenced count in optimize_nodes() */ +} BagNode; + +#ifdef USE_CALL + +typedef struct { + int offset; + struct _Node* target; +} UnsetAddr; + +typedef struct { + int num; + int alloc; + UnsetAddr* us; +} UnsetAddrList; + +typedef struct { + NodeType node_type; + int status; + struct _Node* parent; + struct _Node* body; /* to BagNode : BAG_MEMORY */ + + int by_number; + int called_gnum; + UChar* name; + UChar* name_end; + int entry_count; +} CallNode; + +#endif + +typedef struct { + NodeType node_type; + int status; + struct _Node* parent; + + int back_num; + int back_static[ND_BACKREFS_SIZE]; + int* back_dynamic; + int nest_level; +} BackRefNode; + +typedef struct { + NodeType node_type; + int status; + struct _Node* parent; + struct _Node* body; + + int type; + OnigLen char_min_len; + OnigLen char_max_len; + int ascii_mode; + struct _Node* lead_node; +} AnchorNode; + +typedef struct { + NodeType node_type; + int status; + struct _Node* parent; + + struct _Node* car; + struct _Node* cdr; +} ConsAltNode; + +typedef struct { + NodeType node_type; + int status; + struct _Node* parent; + + int ctype; + int not; + int ascii_mode; +} CtypeNode; + +typedef struct { + NodeType node_type; + int status; + struct _Node* parent; + + enum GimmickType type; + int detail_type; + int num; + int id; +} GimmickNode; + +typedef struct _Node { + union { + struct { + NodeType node_type; + int status; + struct _Node* parent; + struct _Node* body; + } base; + + StrNode str; + CClassNode cclass; + QuantNode quant; + BagNode bag; + BackRefNode backref; + AnchorNode anchor; + ConsAltNode cons; + CtypeNode ctype; +#ifdef USE_CALL + CallNode call; +#endif + GimmickNode gimmick; + } u; +} Node; + +typedef struct { + int new_val; +} GroupNumMap; + + +#define NULL_NODE ((Node* )0) + + +/* node type bit */ +#define ND_TYPE2BIT(type) (1<<(type)) + +#define ND_BIT_STRING ND_TYPE2BIT(ND_STRING) +#define ND_BIT_CCLASS ND_TYPE2BIT(ND_CCLASS) +#define ND_BIT_CTYPE ND_TYPE2BIT(ND_CTYPE) +#define ND_BIT_BACKREF ND_TYPE2BIT(ND_BACKREF) +#define ND_BIT_QUANT ND_TYPE2BIT(ND_QUANT) +#define ND_BIT_BAG ND_TYPE2BIT(ND_BAG) +#define ND_BIT_ANCHOR ND_TYPE2BIT(ND_ANCHOR) +#define ND_BIT_LIST ND_TYPE2BIT(ND_LIST) +#define ND_BIT_ALT ND_TYPE2BIT(ND_ALT) +#define ND_BIT_CALL ND_TYPE2BIT(ND_CALL) +#define ND_BIT_GIMMICK ND_TYPE2BIT(ND_GIMMICK) + +#define ND_TYPE(node) ((node)->u.base.node_type) +#define ND_SET_TYPE(node, ntype) (node)->u.base.node_type = (ntype) + +#define STR_(node) (&((node)->u.str)) +#define CCLASS_(node) (&((node)->u.cclass)) +#define CTYPE_(node) (&((node)->u.ctype)) +#define BACKREF_(node) (&((node)->u.backref)) +#define QUANT_(node) (&((node)->u.quant)) +#define BAG_(node) (&((node)->u.bag)) +#define ANCHOR_(node) (&((node)->u.anchor)) +#define CONS_(node) (&((node)->u.cons)) +#define CALL_(node) (&((node)->u.call)) +#define GIMMICK_(node) (&((node)->u.gimmick)) + +#define ND_CAR(node) (CONS_(node)->car) +#define ND_CDR(node) (CONS_(node)->cdr) + +#define CTYPE_ANYCHAR -1 +#define ND_IS_ANYCHAR(node) \ + (ND_TYPE(node) == ND_CTYPE && CTYPE_(node)->ctype == CTYPE_ANYCHAR) + + +#define ANCR_ANYCHAR_INF_MASK (ANCR_ANYCHAR_INF | ANCR_ANYCHAR_INF_ML) +#define ANCR_END_BUF_MASK (ANCR_END_BUF | ANCR_SEMI_END_BUF) + +#define ND_STRING_CRUDE (1<<0) +#define ND_STRING_CASE_EXPANDED (1<<1) + +#define ND_STRING_LEN(node) (int )((node)->u.str.end - (node)->u.str.s) +#define ND_STRING_SET_CRUDE(node) (node)->u.str.flag |= ND_STRING_CRUDE +#define ND_STRING_CLEAR_CRUDE(node) (node)->u.str.flag &= ~ND_STRING_CRUDE +#define ND_STRING_SET_CASE_EXPANDED(node) (node)->u.str.flag |= ND_STRING_CASE_EXPANDED +#define ND_STRING_IS_CRUDE(node) \ + (((node)->u.str.flag & ND_STRING_CRUDE) != 0) +#define ND_STRING_IS_CASE_EXPANDED(node) \ + (((node)->u.str.flag & ND_STRING_CASE_EXPANDED) != 0) + +#define BACKREFS_P(br) \ + (IS_NOT_NULL((br)->back_dynamic) ? (br)->back_dynamic : (br)->back_static) + +/* node status bits */ +#define ND_ST_FIXED_MIN (1<<0) +#define ND_ST_FIXED_MAX (1<<1) +#define ND_ST_FIXED_CLEN (1<<2) +#define ND_ST_MARK1 (1<<3) +#define ND_ST_MARK2 (1<<4) +#define ND_ST_STRICT_REAL_REPEAT (1<<5) +#define ND_ST_RECURSION (1<<6) +#define ND_ST_CALLED (1<<7) +#define ND_ST_FIXED_ADDR (1<<8) +#define ND_ST_NAMED_GROUP (1<<9) +#define ND_ST_IN_REAL_REPEAT (1<<10) /* STK_REPEAT is nested in stack. */ +#define ND_ST_IN_ZERO_REPEAT (1<<11) /* (....){0} */ +#define ND_ST_IN_MULTI_ENTRY (1<<12) +#define ND_ST_NEST_LEVEL (1<<13) +#define ND_ST_BY_NUMBER (1<<14) /* {n,m} */ +#define ND_ST_BY_NAME (1<<15) /* backref by name */ +#define ND_ST_BACKREF (1<<16) +#define ND_ST_CHECKER (1<<17) +#define ND_ST_PROHIBIT_RECURSION (1<<18) +#define ND_ST_SUPER (1<<19) +#define ND_ST_EMPTY_STATUS_CHECK (1<<20) +#define ND_ST_IGNORECASE (1<<21) +#define ND_ST_MULTILINE (1<<22) +#define ND_ST_TEXT_SEGMENT_WORD (1<<23) +#define ND_ST_ABSENT_WITH_SIDE_EFFECTS (1<<24) /* stopper or clear */ +#define ND_ST_FIXED_CLEN_MIN_SURE (1<<25) +#define ND_ST_REFERENCED (1<<26) +#define ND_ST_INPEEK (1<<27) +#define ND_ST_WHOLE_OPTIONS (1<<28) + + +#define ND_STATUS(node) (((Node* )node)->u.base.status) +#define ND_STATUS_ADD(node,f) (ND_STATUS(node) |= (ND_ST_ ## f)) +#define ND_STATUS_REMOVE(node,f) (ND_STATUS(node) &= ~(ND_ST_ ## f)) + +#define ND_IS_BY_NUMBER(node) ((ND_STATUS(node) & ND_ST_BY_NUMBER) != 0) +#define ND_IS_IN_REAL_REPEAT(node) ((ND_STATUS(node) & ND_ST_IN_REAL_REPEAT) != 0) +#define ND_IS_CALLED(node) ((ND_STATUS(node) & ND_ST_CALLED) != 0) +#define ND_IS_IN_MULTI_ENTRY(node) ((ND_STATUS(node) & ND_ST_IN_MULTI_ENTRY) != 0) +#define ND_IS_RECURSION(node) ((ND_STATUS(node) & ND_ST_RECURSION) != 0) +#define ND_IS_IN_ZERO_REPEAT(node) ((ND_STATUS(node) & ND_ST_IN_ZERO_REPEAT) != 0) +#define ND_IS_NAMED_GROUP(node) ((ND_STATUS(node) & ND_ST_NAMED_GROUP) != 0) +#define ND_IS_FIXED_ADDR(node) ((ND_STATUS(node) & ND_ST_FIXED_ADDR) != 0) +#define ND_IS_FIXED_CLEN(node) ((ND_STATUS(node) & ND_ST_FIXED_CLEN) != 0) +#define ND_IS_FIXED_MIN(node) ((ND_STATUS(node) & ND_ST_FIXED_MIN) != 0) +#define ND_IS_FIXED_MAX(node) ((ND_STATUS(node) & ND_ST_FIXED_MAX) != 0) +#define ND_IS_MARK1(node) ((ND_STATUS(node) & ND_ST_MARK1) != 0) +#define ND_IS_MARK2(node) ((ND_STATUS(node) & ND_ST_MARK2) != 0) +#define ND_IS_NEST_LEVEL(node) ((ND_STATUS(node) & ND_ST_NEST_LEVEL) != 0) +#define ND_IS_BY_NAME(node) ((ND_STATUS(node) & ND_ST_BY_NAME) != 0) +#define ND_IS_BACKREF(node) ((ND_STATUS(node) & ND_ST_BACKREF) != 0) +#define ND_IS_CHECKER(node) ((ND_STATUS(node) & ND_ST_CHECKER) != 0) +#define ND_IS_SUPER(node) ((ND_STATUS(node) & ND_ST_SUPER) != 0) +#define ND_IS_PROHIBIT_RECURSION(node) \ + ((ND_STATUS(node) & ND_ST_PROHIBIT_RECURSION) != 0) +#define ND_IS_STRICT_REAL_REPEAT(node) \ + ((ND_STATUS(node) & ND_ST_STRICT_REAL_REPEAT) != 0) +#define ND_IS_EMPTY_STATUS_CHECK(node) \ + ((ND_STATUS(node) & ND_ST_EMPTY_STATUS_CHECK) != 0) +#define ND_IS_IGNORECASE(node) ((ND_STATUS(node) & ND_ST_IGNORECASE) != 0) +#define ND_IS_MULTILINE(node) ((ND_STATUS(node) & ND_ST_MULTILINE) != 0) +#define ND_IS_TEXT_SEGMENT_WORD(node) ((ND_STATUS(node) & ND_ST_TEXT_SEGMENT_WORD) != 0) +#define ND_IS_ABSENT_WITH_SIDE_EFFECTS(node) ((ND_STATUS(node) & ND_ST_ABSENT_WITH_SIDE_EFFECTS) != 0) +#define ND_IS_FIXED_CLEN_MIN_SURE(node) ((ND_STATUS(node) & ND_ST_FIXED_CLEN_MIN_SURE) != 0) +#define ND_IS_REFERENCED(node) ((ND_STATUS(node) & ND_ST_REFERENCED) != 0) +#define ND_IS_INPEEK(node) ((ND_STATUS(node) & ND_ST_INPEEK) != 0) +#define ND_IS_WHOLE_OPTIONS(node) ((ND_STATUS(node) & ND_ST_WHOLE_OPTIONS) != 0) + +#define ND_PARENT(node) ((node)->u.base.parent) +#define ND_BODY(node) ((node)->u.base.body) +#define ND_QUANT_BODY(node) ((node)->body) +#define ND_BAG_BODY(node) ((node)->body) +#define ND_CALL_BODY(node) ((node)->body) +#define ND_ANCHOR_BODY(node) ((node)->body) + +#define PARSEENV_MEMENV_SIZE 8 +#define PARSEENV_MEMENV(senv) \ + (IS_NOT_NULL((senv)->mem_env_dynamic) ? \ + (senv)->mem_env_dynamic : (senv)->mem_env_static) + +#define IS_SYNTAX_OP(syn, opm) (((syn)->op & (opm)) != 0) +#define IS_SYNTAX_OP2(syn, opm) (((syn)->op2 & (opm)) != 0) +#define IS_SYNTAX_BV(syn, bvm) (((syn)->behavior & (bvm)) != 0) + +#define ID_ENTRY(env, id) do {\ + id = (env)->id_num++;\ +} while(0) + + +typedef struct { + Node* mem_node; + Node* empty_repeat_node; +} MemEnv; + +typedef struct { + enum SaveType type; +} SaveItem; + +typedef struct { + OnigOptionType options; + OnigCaseFoldType case_fold_flag; + OnigEncoding enc; + OnigSyntaxType* syntax; + MemStatusType cap_history; + MemStatusType backtrack_mem; /* backtrack/recursion */ + MemStatusType backrefed_mem; + UChar* pattern; + UChar* pattern_end; + UChar* error; + UChar* error_end; + regex_t* reg; /* for reg->names only */ + int num_call; + int num_mem; + int num_named; + int mem_alloc; + MemEnv mem_env_static[PARSEENV_MEMENV_SIZE]; + MemEnv* mem_env_dynamic; + int backref_num; + int keep_num; + int id_num; + int save_alloc_num; + SaveItem* saves; +#ifdef USE_CALL + UnsetAddrList* unset_addr_list; +#endif + unsigned int parse_depth; +#ifdef ONIG_DEBUG_PARSE + unsigned int max_parse_depth; +#endif + unsigned int flags; +} ParseEnv; + +#define PE_FLAG_HAS_CALL_ZERO (1<<0) +#define PE_FLAG_HAS_WHOLE_OPTIONS (1<<1) +#define PE_FLAG_HAS_ABSENT_STOPPER (1<<2) + + +extern int onig_renumber_name_table P_((regex_t* reg, GroupNumMap* map)); + +extern int onig_strncmp P_((const UChar* s1, const UChar* s2, int n)); +extern void onig_strcpy P_((UChar* dest, const UChar* src, const UChar* end)); +extern void onig_scan_env_set_error_string P_((ParseEnv* env, int ecode, UChar* arg, UChar* arg_end)); +extern int onig_reduce_nested_quantifier P_((Node* pnode)); +extern int onig_node_copy(Node** rcopy, Node* from); +extern int onig_node_str_cat P_((Node* node, const UChar* s, const UChar* end)); +extern int onig_node_str_set P_((Node* node, const UChar* s, const UChar* end, int need_free)); +extern void onig_node_str_clear P_((Node* node, int need_free)); +extern void onig_node_free P_((Node* node)); +extern int onig_node_reset_empty P_((Node* node)); +extern int onig_node_reset_fail P_((Node* node)); +extern Node* onig_node_new_bag P_((enum BagType type)); +extern Node* onig_node_new_str P_((const UChar* s, const UChar* end)); +extern Node* onig_node_new_list P_((Node* left, Node* right)); +extern Node* onig_node_new_alt P_((Node* left, Node* right)); +extern int onig_names_free P_((regex_t* reg)); +extern int onig_parse_tree P_((Node** root, const UChar* pattern, const UChar* end, regex_t* reg, ParseEnv* env)); +extern int onig_free_shared_cclass_table P_((void)); +extern int onig_is_code_in_cc P_((OnigEncoding enc, OnigCodePoint code, CClassNode* cc)); +extern int onig_new_cclass_with_code_list(Node** rnode, OnigEncoding enc, int n, OnigCodePoint codes[]); +extern OnigLen onig_get_tiny_min_len(Node* node, unsigned int inhibit_node_types, int* invalid_node); + +#ifdef USE_CALLOUT +extern int onig_global_callout_names_free(void); +#endif + +#ifdef ONIG_DEBUG +extern int onig_print_names(FILE*, regex_t*); +#endif + +#endif /* REGPARSE_H */ diff --git a/internal/components/third_party/oniguruma/src/regposerr.c b/internal/components/third_party/oniguruma/src/regposerr.c new file mode 100644 index 0000000000..e6ff27da50 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/regposerr.c @@ -0,0 +1,149 @@ +/********************************************************************** + regposerr.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* Can't include regint.h etc.. for conflict of regex_t. + Define ONIGURUMA_EXPORT here for onigposix.h. + */ +#ifndef ONIGURUMA_EXPORT +#define ONIGURUMA_EXPORT +#endif + +#if defined(_WIN32) || defined(_WIN64) + #include "config_windows.h" +#else + #include "config.h" +#endif +#include "onigposix.h" + +#undef regex_t +#undef regmatch_t +#undef regoff_t +#undef regcomp +#undef regexec +#undef regfree +#undef regerror +#undef reg_set_encoding +#undef reg_name_to_group_numbers +#undef reg_foreach_name +#undef reg_number_of_names + +#ifndef ONIG_NO_STANDARD_C_HEADERS +#include +#include +#endif + +#if defined(__GNUC__) +# define ARG_UNUSED __attribute__ ((unused)) +#else +# define ARG_UNUSED +#endif + +#if defined(_WIN32) && !defined(__GNUC__) + +#ifndef xsnprintf +#define xsnprintf sprintf_s +#endif +#ifndef xstrncpy +#define xstrncpy(dest,src,size) strncpy_s(dest,size,src,_TRUNCATE) +#endif + +#else + +#ifndef xsnprintf +#define xsnprintf snprintf +#endif +#ifndef xstrncpy +#define xstrncpy strncpy +#endif + +#endif + + +static char* ESTRING[] = { + NULL, + "failed to match", /* REG_NOMATCH */ + "Invalid regular expression", /* REG_BADPAT */ + "invalid collating element referenced", /* REG_ECOLLATE */ + "invalid character class type referenced", /* REG_ECTYPE */ + "bad backslash-escape sequence", /* REG_EESCAPE */ + "invalid back reference number", /* REG_ESUBREG */ + "imbalanced [ and ]", /* REG_EBRACK */ + "imbalanced ( and )", /* REG_EPAREN */ + "imbalanced { and }", /* REG_EBRACE */ + "invalid repeat range {n,m}", /* REG_BADBR */ + "invalid range", /* REG_ERANGE */ + "Out of memory", /* REG_ESPACE */ + "? * + not preceded by valid regular expression", /* REG_BADRPT */ + + /* Extended errors */ + "internal error", /* REG_EONIG_INTERNAL */ + "invalid wide char value", /* REG_EONIG_BADWC */ + "invalid argument" /* REG_EONIG_BADARG */ +}; + + +extern size_t +onig_posix_regerror(int posix_ecode, const onig_posix_regex_t* reg ARG_UNUSED, + char* buf, size_t size) +{ + char* s; + char tbuf[35]; + size_t len; + + if (posix_ecode > 0 + && posix_ecode < (int )(sizeof(ESTRING) / sizeof(ESTRING[0]))) { + s = ESTRING[posix_ecode]; + } + else if (posix_ecode == 0) { + s = ""; + } + else { + xsnprintf(tbuf, sizeof(tbuf), "undefined error code (%d)", posix_ecode); + s = tbuf; + } + + len = strlen(s) + 1; /* use strlen() because s is ascii encoding. */ + + if (buf != NULL && size > 0) { + xstrncpy(buf, s, size - 1); + buf[size - 1] = '\0'; + } + return len; +} + +#ifdef USE_BINARY_COMPATIBLE_POSIX_API + +extern size_t +regerror(int posix_ecode, const onig_posix_regex_t* reg ARG_UNUSED, + char* buf, size_t size) +{ + return onig_posix_regerror(posix_ecode, reg, buf, size); +} + +#endif diff --git a/internal/components/third_party/oniguruma/src/regposix.c b/internal/components/third_party/oniguruma/src/regposix.c new file mode 100644 index 0000000000..73f4ab5e44 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/regposix.c @@ -0,0 +1,388 @@ +/********************************************************************** + regposix.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2022 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#define regex_t onig_regex_t +#include "regint.h" +#undef regex_t + +#include "onigposix.h" + +#undef regex_t +#undef regmatch_t +#undef regoff_t +#undef regcomp +#undef regexec +#undef regfree +#undef regerror +#undef reg_set_encoding +#undef reg_name_to_group_numbers +#undef reg_foreach_name +#undef reg_number_of_names + +#define ONIG_C(reg) ((onig_regex_t* )((reg)->onig)) +#define PONIG_C(reg) ((onig_regex_t** )(&(reg)->onig)) + +/* #define ENC_STRING_LEN(enc,s,len) len = strlen(s) */ +#define ENC_STRING_LEN(enc,s,len) do { \ + if (ONIGENC_MBC_MINLEN(enc) == 1) { \ + UChar* tmps = (UChar* )(s); \ + while (*tmps != 0) tmps++; \ + len = (int )(tmps - (UChar* )(s));\ + } \ + else { \ + len = onigenc_str_bytelen_null(enc, (UChar* )s); \ + } \ +} while(0) + +typedef struct { + int onig_err; + int posix_err; +} O2PERR; + +static int +onig2posix_error_code(int code) +{ + static const O2PERR o2p[] = { + { ONIG_MISMATCH, REG_NOMATCH }, + { ONIG_NO_SUPPORT_CONFIG, REG_EONIG_INTERNAL }, + { ONIG_ABORT, REG_EONIG_INTERNAL }, + { ONIGERR_MEMORY, REG_ESPACE }, + { ONIGERR_MATCH_STACK_LIMIT_OVER, REG_EONIG_INTERNAL }, + { ONIGERR_RETRY_LIMIT_IN_MATCH_OVER, REG_EONIG_INTERNAL }, + { ONIGERR_RETRY_LIMIT_IN_SEARCH_OVER, REG_EONIG_INTERNAL }, + { ONIGERR_SUBEXP_CALL_LIMIT_IN_SEARCH_OVER, REG_EONIG_INTERNAL }, + { ONIGERR_TYPE_BUG, REG_EONIG_INTERNAL }, + { ONIGERR_PARSER_BUG, REG_EONIG_INTERNAL }, + { ONIGERR_STACK_BUG, REG_EONIG_INTERNAL }, + { ONIGERR_UNDEFINED_BYTECODE, REG_EONIG_INTERNAL }, + { ONIGERR_UNEXPECTED_BYTECODE, REG_EONIG_INTERNAL }, + { ONIGERR_DEFAULT_ENCODING_IS_NOT_SET, REG_EONIG_BADARG }, + { ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR, REG_EONIG_BADARG }, + { ONIGERR_FAIL_TO_INITIALIZE, REG_EONIG_INTERNAL }, + { ONIGERR_INVALID_ARGUMENT, REG_EONIG_BADARG }, + { ONIGERR_END_PATTERN_AT_LEFT_BRACE, REG_EBRACE }, + { ONIGERR_END_PATTERN_AT_LEFT_BRACKET, REG_EBRACK }, + { ONIGERR_EMPTY_CHAR_CLASS, REG_ECTYPE }, + { ONIGERR_PREMATURE_END_OF_CHAR_CLASS, REG_ECTYPE }, + { ONIGERR_END_PATTERN_AT_ESCAPE, REG_EESCAPE }, + { ONIGERR_END_PATTERN_AT_META, REG_EESCAPE }, + { ONIGERR_END_PATTERN_AT_CONTROL, REG_EESCAPE }, + { ONIGERR_META_CODE_SYNTAX, REG_BADPAT }, + { ONIGERR_CONTROL_CODE_SYNTAX, REG_BADPAT }, + { ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE, REG_ECTYPE }, + { ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE, REG_ECTYPE }, + { ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS, REG_ECTYPE }, + { ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED, REG_BADRPT }, + { ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID, REG_BADRPT }, + { ONIGERR_NESTED_REPEAT_OPERATOR, REG_BADRPT }, + { ONIGERR_UNMATCHED_CLOSE_PARENTHESIS, REG_EPAREN }, + { ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS, REG_EPAREN }, + { ONIGERR_END_PATTERN_IN_GROUP, REG_BADPAT }, + { ONIGERR_UNDEFINED_GROUP_OPTION, REG_BADPAT }, + { ONIGERR_INVALID_GROUP_OPTION, REG_BADPAT }, + { ONIGERR_INVALID_POSIX_BRACKET_TYPE, REG_BADPAT }, + { ONIGERR_INVALID_LOOK_BEHIND_PATTERN, REG_BADPAT }, + { ONIGERR_INVALID_REPEAT_RANGE_PATTERN, REG_BADPAT }, + { ONIGERR_TOO_BIG_NUMBER, REG_BADPAT }, + { ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE, REG_BADBR }, + { ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE, REG_BADBR }, + { ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS, REG_ECTYPE }, + { ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE, REG_ECTYPE }, + { ONIGERR_TOO_MANY_MULTI_BYTE_RANGES, REG_ECTYPE }, + { ONIGERR_TOO_SHORT_MULTI_BYTE_STRING, REG_BADPAT }, + { ONIGERR_TOO_BIG_BACKREF_NUMBER, REG_ESUBREG }, + { ONIGERR_INVALID_BACKREF, REG_ESUBREG }, + { ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED, REG_BADPAT }, + { ONIGERR_TOO_BIG_WIDE_CHAR_VALUE, REG_EONIG_BADWC }, + { ONIGERR_TOO_LONG_WIDE_CHAR_VALUE, REG_EONIG_BADWC }, + { ONIGERR_UNDEFINED_OPERATOR, REG_BADPAT }, + { ONIGERR_INVALID_CODE_POINT_VALUE, REG_EONIG_BADWC }, + { ONIGERR_EMPTY_GROUP_NAME, REG_BADPAT }, + { ONIGERR_INVALID_GROUP_NAME, REG_BADPAT }, + { ONIGERR_INVALID_CHAR_IN_GROUP_NAME, REG_BADPAT }, + { ONIGERR_UNDEFINED_NAME_REFERENCE, REG_BADPAT }, + { ONIGERR_UNDEFINED_GROUP_REFERENCE, REG_BADPAT }, + { ONIGERR_MULTIPLEX_DEFINED_NAME, REG_BADPAT }, + { ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL, REG_BADPAT }, + { ONIGERR_NEVER_ENDING_RECURSION, REG_BADPAT }, + { ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY, REG_BADPAT }, + { ONIGERR_INVALID_CHAR_PROPERTY_NAME, REG_BADPAT }, + { ONIGERR_INVALID_IF_ELSE_SYNTAX, REG_BADPAT }, + { ONIGERR_INVALID_ABSENT_GROUP_PATTERN, REG_BADPAT }, + { ONIGERR_INVALID_ABSENT_GROUP_GENERATOR_PATTERN, REG_BADPAT }, + { ONIGERR_INVALID_CALLOUT_PATTERN, REG_BADPAT }, + { ONIGERR_INVALID_CALLOUT_NAME, REG_BADPAT }, + { ONIGERR_UNDEFINED_CALLOUT_NAME, REG_BADPAT }, + { ONIGERR_INVALID_CALLOUT_BODY, REG_BADPAT }, + { ONIGERR_INVALID_CALLOUT_TAG_NAME, REG_BADPAT }, + { ONIGERR_INVALID_CALLOUT_ARG, REG_BADPAT }, + { ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION, REG_EONIG_BADARG }, + { ONIGERR_VERY_INEFFICIENT_PATTERN, REG_BADPAT }, + { ONIGERR_LIBRARY_IS_NOT_INITIALIZED, REG_EONIG_INTERNAL } + }; + + int i; + + if (code >= 0) return 0; + + for (i = 0; i < (int )(sizeof(o2p) / sizeof(o2p[0])); i++) { + if (code == o2p[i].onig_err) + return o2p[i].posix_err; + } + + return REG_EONIG_INTERNAL; /* but, unknown error code */ +} + +extern int +onig_posix_regcomp(onig_posix_regex_t* reg, const char* pattern, int posix_options) +{ + int r, len; + OnigSyntaxType* syntax = OnigDefaultSyntax; + OnigOptionType options; + + reg->onig = (void* )0; + + if ((posix_options & REG_EXTENDED) == 0) + syntax = ONIG_SYNTAX_POSIX_BASIC; + + options = syntax->options; + if ((posix_options & REG_ICASE) != 0) + ONIG_OPTION_ON(options, ONIG_OPTION_IGNORECASE); + if ((posix_options & REG_NEWLINE) != 0) { + ONIG_OPTION_ON( options, ONIG_OPTION_NEGATE_SINGLELINE); + ONIG_OPTION_OFF(options, ONIG_OPTION_SINGLELINE); + } + + reg->comp_options = posix_options; + + ENC_STRING_LEN(OnigEncDefaultCharEncoding, pattern, len); + r = onig_new(PONIG_C(reg), (UChar* )pattern, (UChar* )(pattern + len), + options, OnigEncDefaultCharEncoding, syntax, + (OnigErrorInfo* )NULL); + if (r != ONIG_NORMAL) { + return onig2posix_error_code(r); + } + + reg->re_nsub = ONIG_C(reg)->num_mem; + return 0; +} + +extern int +onig_posix_regexec(onig_posix_regex_t* reg, const char* str, size_t nmatch, + onig_posix_regmatch_t pmatch[], int posix_options) +{ + int r, i, len; + UChar* end; + onig_posix_regmatch_t* pm; + OnigOptionType options; + + options = ONIG_OPTION_POSIX_REGION; + if ((posix_options & REG_NOTBOL) != 0) options |= ONIG_OPTION_NOTBOL; + if ((posix_options & REG_NOTEOL) != 0) options |= ONIG_OPTION_NOTEOL; + + if (nmatch == 0 || (reg->comp_options & REG_NOSUB) != 0) { + pm = (onig_posix_regmatch_t* )NULL; + nmatch = 0; + } + else if ((int )nmatch < ONIG_C(reg)->num_mem + 1) { + pm = (onig_posix_regmatch_t* )xmalloc(sizeof(onig_posix_regmatch_t) + * (ONIG_C(reg)->num_mem + 1)); + if (pm == NULL) + return REG_ESPACE; + } + else { + pm = pmatch; + } + + ENC_STRING_LEN(ONIG_C(reg)->enc, str, len); + end = (UChar* )(str + len); + r = onig_search(ONIG_C(reg), (UChar* )str, end, (UChar* )str, end, + (OnigRegion* )pm, options); + + if (r >= 0) { + r = 0; /* Match */ + if (pm != pmatch && pm != NULL) { + xmemcpy(pmatch, pm, sizeof(onig_posix_regmatch_t) * nmatch); + } + } + else if (r == ONIG_MISMATCH) { + r = REG_NOMATCH; + for (i = 0; i < (int )nmatch; i++) + pmatch[i].rm_so = pmatch[i].rm_eo = ONIG_REGION_NOTPOS; + } + else { + r = onig2posix_error_code(r); + } + + if (pm != pmatch && pm != NULL) + xfree(pm); + +#if 0 + if (reg->re_nsub > nmatch - 1) + reg->re_nsub = (nmatch <= 1 ? 0 : nmatch - 1); +#endif + + return r; +} + +extern void +onig_posix_regfree(onig_posix_regex_t* reg) +{ + onig_free(ONIG_C(reg)); + reg->onig = (void* )0; +} + + +extern void +onig_posix_reg_set_encoding(int mb_code) +{ + OnigEncoding enc; + + switch (mb_code) { + case REG_POSIX_ENCODING_ASCII: + enc = ONIG_ENCODING_ASCII; + break; + case REG_POSIX_ENCODING_EUC_JP: + enc = ONIG_ENCODING_EUC_JP; + break; + case REG_POSIX_ENCODING_SJIS: + enc = ONIG_ENCODING_SJIS; + break; + case REG_POSIX_ENCODING_UTF8: + enc = ONIG_ENCODING_UTF8; + break; + case REG_POSIX_ENCODING_UTF16_BE: + enc = ONIG_ENCODING_UTF16_BE; + break; + case REG_POSIX_ENCODING_UTF16_LE: + enc = ONIG_ENCODING_UTF16_LE; + break; + + default: + return ; + break; + } + + onig_initialize(&enc, 1); + + onigenc_set_default_encoding(enc); +} + +extern int +onig_posix_reg_name_to_group_numbers(onig_posix_regex_t* reg, + const unsigned char* name, const unsigned char* name_end, int** nums) +{ + return onig_name_to_group_numbers(ONIG_C(reg), name, name_end, nums); +} + +typedef struct { + int (*func)(const unsigned char*, const unsigned char*,int,int*,onig_posix_regex_t*,void*); + onig_posix_regex_t* reg; + void* arg; +} i_wrap; + +static int +i_wrapper(const UChar* name, const UChar* name_end, int ng, int* gs, + onig_regex_t* reg ARG_UNUSED, void* arg) +{ + i_wrap* warg = (i_wrap* )arg; + + return (*warg->func)(name, name_end, ng, gs, warg->reg, warg->arg); +} + +extern int +onig_posix_reg_foreach_name(onig_posix_regex_t* reg, + int (*func)(const unsigned char*, const unsigned char*,int,int*,onig_posix_regex_t*,void*), + void* arg) +{ + i_wrap warg; + + warg.func = func; + warg.reg = reg; + warg.arg = arg; + + return onig_foreach_name(ONIG_C(reg), i_wrapper, &warg); +} + +extern int +onig_posix_reg_number_of_names(onig_posix_regex_t* reg) +{ + return onig_number_of_names(ONIG_C(reg)); +} + + +#ifdef USE_BINARY_COMPATIBLE_POSIX_API + +extern int +regcomp(onig_posix_regex_t* reg, const char* pattern, int posix_options) +{ + return onig_posix_regcomp(reg, pattern, posix_options); +} + +extern int +regexec(onig_posix_regex_t* reg, const char* str, size_t nmatch, + onig_posix_regmatch_t pmatch[], int posix_options) +{ + return onig_posix_regexec(reg, str, nmatch, pmatch, posix_options); +} + +extern void +regfree(onig_posix_regex_t* reg) +{ + onig_posix_regfree(reg); +} + +extern void +reg_set_encoding(int mb_code) +{ + onig_posix_reg_set_encoding(mb_code); +} + +extern int +reg_name_to_group_numbers(onig_posix_regex_t* reg, + const unsigned char* name, const unsigned char* name_end, int** nums) +{ + return onig_posix_reg_name_to_group_numbers(reg, name, name_end, nums); +} + +extern int +reg_foreach_name(onig_posix_regex_t* reg, + int (*func)(const unsigned char*, const unsigned char*,int,int*,onig_posix_regex_t*,void*), + void* arg) +{ + return onig_posix_reg_foreach_name(reg, func, arg); +} + +extern int +reg_number_of_names(onig_posix_regex_t* reg) +{ + return onig_posix_reg_number_of_names(reg); +} + +#endif /* USE_BINARY_COMPATIBLE_POSIX_API */ diff --git a/internal/components/third_party/oniguruma/src/regsyntax.c b/internal/components/third_party/oniguruma/src/regsyntax.c new file mode 100644 index 0000000000..96799d848f --- /dev/null +++ b/internal/components/third_party/oniguruma/src/regsyntax.c @@ -0,0 +1,371 @@ +/********************************************************************** + regsyntax.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regint.h" + +OnigSyntaxType OnigSyntaxASIS = { + 0 + , ONIG_SYN_OP2_INEFFECTIVE_ESCAPE + , 0 + , ONIG_OPTION_NONE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +OnigSyntaxType OnigSyntaxPosixBasic = { + ( SYN_POSIX_COMMON_OP | ONIG_SYN_OP_ESC_LPAREN_SUBEXP | + ONIG_SYN_OP_ESC_BRACE_INTERVAL ) + , 0 + , ( ONIG_SYN_BRE_ANCHOR_AT_EDGE_OF_SUBEXP ) + , ( ONIG_OPTION_SINGLELINE | ONIG_OPTION_MULTILINE ) + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +OnigSyntaxType OnigSyntaxPosixExtended = { + ( SYN_POSIX_COMMON_OP | ONIG_SYN_OP_LPAREN_SUBEXP | + ONIG_SYN_OP_BRACE_INTERVAL | + ONIG_SYN_OP_PLUS_ONE_INF | ONIG_SYN_OP_QMARK_ZERO_ONE | ONIG_SYN_OP_VBAR_ALT ) + , 0 + , ( ONIG_SYN_CONTEXT_INDEP_ANCHORS | + ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS | ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS | + ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP | + ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC ) + , ( ONIG_OPTION_SINGLELINE | ONIG_OPTION_MULTILINE ) + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +OnigSyntaxType OnigSyntaxEmacs = { + ( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_BRACKET_CC | + ONIG_SYN_OP_ESC_BRACE_INTERVAL | + ONIG_SYN_OP_ESC_LPAREN_SUBEXP | ONIG_SYN_OP_ESC_VBAR_ALT | + ONIG_SYN_OP_ASTERISK_ZERO_INF | ONIG_SYN_OP_PLUS_ONE_INF | + ONIG_SYN_OP_QMARK_ZERO_ONE | ONIG_SYN_OP_DECIMAL_BACKREF | + ONIG_SYN_OP_LINE_ANCHOR | ONIG_SYN_OP_ESC_CONTROL_CHARS ) + , ( ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR | ONIG_SYN_OP2_QMARK_GROUP_EFFECT ) + , ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC + , ONIG_OPTION_NONE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +OnigSyntaxType OnigSyntaxGrep = { + ( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_BRACKET_CC | ONIG_SYN_OP_POSIX_BRACKET | + ONIG_SYN_OP_ESC_BRACE_INTERVAL | ONIG_SYN_OP_ESC_LPAREN_SUBEXP | + ONIG_SYN_OP_ESC_VBAR_ALT | + ONIG_SYN_OP_ASTERISK_ZERO_INF | ONIG_SYN_OP_ESC_PLUS_ONE_INF | + ONIG_SYN_OP_ESC_QMARK_ZERO_ONE | ONIG_SYN_OP_LINE_ANCHOR | + ONIG_SYN_OP_ESC_W_WORD | ONIG_SYN_OP_ESC_B_WORD_BOUND | + ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END | ONIG_SYN_OP_DECIMAL_BACKREF ) + , 0 + , ( ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC | ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC | + ONIG_SYN_BRE_ANCHOR_AT_EDGE_OF_SUBEXP ) + , ONIG_OPTION_NONE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +OnigSyntaxType OnigSyntaxGnuRegex = { + SYN_GNU_REGEX_OP + , 0 + , SYN_GNU_REGEX_BV + , ONIG_OPTION_NONE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +OnigSyntaxType OnigSyntaxJava = { + (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY | + ONIG_SYN_OP_ESC_CONTROL_CHARS | ONIG_SYN_OP_ESC_C_CONTROL | + ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 ) + & ~(ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END | ONIG_SYN_OP_POSIX_BRACKET) ) + , ( ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE | ONIG_SYN_OP2_QMARK_GROUP_EFFECT | + ONIG_SYN_OP2_OPTION_PERL | ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT | + ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL | ONIG_SYN_OP2_CCLASS_SET_OP | + ONIG_SYN_OP2_ESC_V_VTAB | ONIG_SYN_OP2_ESC_U_HEX4 | + ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY ) + , ( SYN_GNU_REGEX_BV | ONIG_SYN_ISOLATED_OPTION_CONTINUE_BRANCH | + ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND | + ONIG_SYN_VARIABLE_LEN_LOOK_BEHIND | + ONIG_SYN_ALLOW_CHAR_TYPE_FOLLOWED_BY_MINUS_IN_CC ) + , ONIG_OPTION_SINGLELINE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +OnigSyntaxType OnigSyntaxPerl = { + (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY | + ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 | + ONIG_SYN_OP_ESC_X_BRACE_HEX8 | ONIG_SYN_OP_ESC_O_BRACE_OCTAL | + ONIG_SYN_OP_ESC_CONTROL_CHARS | + ONIG_SYN_OP_ESC_C_CONTROL ) + & ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END ) + , ( ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE | + ONIG_SYN_OP2_QMARK_GROUP_EFFECT | ONIG_SYN_OP2_OPTION_PERL | + ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT | ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL | + ONIG_SYN_OP2_QMARK_LPAREN_IF_ELSE | + ONIG_SYN_OP2_QMARK_TILDE_ABSENT_GROUP | + ONIG_SYN_OP2_QMARK_BRACE_CALLOUT_CONTENTS | + ONIG_SYN_OP2_ASTERISK_CALLOUT_NAME | + ONIG_SYN_OP2_ESC_X_Y_TEXT_SEGMENT | + ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY | + ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT | + ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP | + ONIG_SYN_OP2_ESC_CAPITAL_R_GENERAL_NEWLINE | + ONIG_SYN_OP2_ESC_CAPITAL_N_O_SUPER_DOT ) + , (SYN_GNU_REGEX_BV | ONIG_SYN_ISOLATED_OPTION_CONTINUE_BRANCH | + ONIG_SYN_ALLOW_CHAR_TYPE_FOLLOWED_BY_MINUS_IN_CC ) + , ONIG_OPTION_SINGLELINE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +/* Perl + named group */ +OnigSyntaxType OnigSyntaxPerl_NG = { + (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY | + ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 | + ONIG_SYN_OP_ESC_X_BRACE_HEX8 | ONIG_SYN_OP_ESC_O_BRACE_OCTAL | + ONIG_SYN_OP_ESC_CONTROL_CHARS | + ONIG_SYN_OP_ESC_C_CONTROL ) + & ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END ) + , ( ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE | + ONIG_SYN_OP2_QMARK_GROUP_EFFECT | ONIG_SYN_OP2_OPTION_PERL | + ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT | ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL | + ONIG_SYN_OP2_QMARK_LPAREN_IF_ELSE | + ONIG_SYN_OP2_QMARK_TILDE_ABSENT_GROUP | + ONIG_SYN_OP2_QMARK_BRACE_CALLOUT_CONTENTS | + ONIG_SYN_OP2_ASTERISK_CALLOUT_NAME | + ONIG_SYN_OP2_ESC_X_Y_TEXT_SEGMENT | + ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY | + ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT | + ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP | + ONIG_SYN_OP2_ESC_K_NAMED_BACKREF | + ONIG_SYN_OP2_ESC_G_SUBEXP_CALL | + ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP | + ONIG_SYN_OP2_ESC_CAPITAL_R_GENERAL_NEWLINE | + ONIG_SYN_OP2_ESC_CAPITAL_N_O_SUPER_DOT | + ONIG_SYN_OP2_QMARK_PERL_SUBEXP_CALL ) + , ( SYN_GNU_REGEX_BV | ONIG_SYN_ISOLATED_OPTION_CONTINUE_BRANCH | + ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP | + ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME | + ONIG_SYN_ALLOW_CHAR_TYPE_FOLLOWED_BY_MINUS_IN_CC ) + , ONIG_OPTION_SINGLELINE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +/* Python 3.9 */ +OnigSyntaxType OnigSyntaxPython = { + (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY | + ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 | + ONIG_SYN_OP_ESC_CONTROL_CHARS | + ONIG_SYN_OP_ESC_C_CONTROL ) + & ~(ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END | ONIG_SYN_OP_POSIX_BRACKET) ) + , ( ONIG_SYN_OP2_QMARK_GROUP_EFFECT | ONIG_SYN_OP2_OPTION_PERL | + ONIG_SYN_OP2_QMARK_LPAREN_IF_ELSE | + ONIG_SYN_OP2_ASTERISK_CALLOUT_NAME | + ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY | + ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT | + ONIG_SYN_OP2_QMARK_CAPITAL_P_NAME | + ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP | + ONIG_SYN_OP2_ESC_V_VTAB | ONIG_SYN_OP2_ESC_U_HEX4 ) + , ( SYN_GNU_REGEX_BV | ONIG_SYN_ISOLATED_OPTION_CONTINUE_BRANCH | + ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV | ONIG_SYN_PYTHON ) + , ONIG_OPTION_SINGLELINE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + + + +extern int +onig_set_default_syntax(OnigSyntaxType* syntax) +{ + if (IS_NULL(syntax)) + syntax = ONIG_SYNTAX_ONIGURUMA; + + OnigDefaultSyntax = syntax; + return 0; +} + +extern void +onig_copy_syntax(OnigSyntaxType* to, OnigSyntaxType* from) +{ + *to = *from; +} + +extern void +onig_set_syntax_op(OnigSyntaxType* syntax, unsigned int op) +{ + syntax->op = op; +} + +extern void +onig_set_syntax_op2(OnigSyntaxType* syntax, unsigned int op2) +{ + syntax->op2 = op2; +} + +extern void +onig_set_syntax_behavior(OnigSyntaxType* syntax, unsigned int behavior) +{ + syntax->behavior = behavior; +} + +extern void +onig_set_syntax_options(OnigSyntaxType* syntax, OnigOptionType options) +{ + syntax->options = options; +} + +extern unsigned int +onig_get_syntax_op(OnigSyntaxType* syntax) +{ + return syntax->op; +} + +extern unsigned int +onig_get_syntax_op2(OnigSyntaxType* syntax) +{ + return syntax->op2; +} + +extern unsigned int +onig_get_syntax_behavior(OnigSyntaxType* syntax) +{ + return syntax->behavior; +} + +extern OnigOptionType +onig_get_syntax_options(OnigSyntaxType* syntax) +{ + return syntax->options; +} + +#ifdef USE_VARIABLE_META_CHARS +extern int onig_set_meta_char(OnigSyntaxType* enc, + unsigned int what, OnigCodePoint code) +{ + switch (what) { + case ONIG_META_CHAR_ESCAPE: + enc->meta_char_table.esc = code; + break; + case ONIG_META_CHAR_ANYCHAR: + enc->meta_char_table.anychar = code; + break; + case ONIG_META_CHAR_ANYTIME: + enc->meta_char_table.anytime = code; + break; + case ONIG_META_CHAR_ZERO_OR_ONE_TIME: + enc->meta_char_table.zero_or_one_time = code; + break; + case ONIG_META_CHAR_ONE_OR_MORE_TIME: + enc->meta_char_table.one_or_more_time = code; + break; + case ONIG_META_CHAR_ANYCHAR_ANYTIME: + enc->meta_char_table.anychar_anytime = code; + break; + default: + return ONIGERR_INVALID_ARGUMENT; + break; + } + return 0; +} +#endif /* USE_VARIABLE_META_CHARS */ diff --git a/internal/components/third_party/oniguruma/src/regtrav.c b/internal/components/third_party/oniguruma/src/regtrav.c new file mode 100644 index 0000000000..8307695d1c --- /dev/null +++ b/internal/components/third_party/oniguruma/src/regtrav.c @@ -0,0 +1,76 @@ +/********************************************************************** + regtrav.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2019 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regint.h" + +#ifdef USE_CAPTURE_HISTORY + +static int +capture_tree_traverse(OnigCaptureTreeNode* node, int at, + int(*callback_func)(int,int,int,int,int,void*), + int level, void* arg) +{ + int r, i; + + if (node == (OnigCaptureTreeNode* )0) + return 0; + + if ((at & ONIG_TRAVERSE_CALLBACK_AT_FIRST) != 0) { + r = (*callback_func)(node->group, node->beg, node->end, + level, ONIG_TRAVERSE_CALLBACK_AT_FIRST, arg); + if (r != 0) return r; + } + + for (i = 0; i < node->num_childs; i++) { + r = capture_tree_traverse(node->childs[i], at, + callback_func, level + 1, arg); + if (r != 0) return r; + } + + if ((at & ONIG_TRAVERSE_CALLBACK_AT_LAST) != 0) { + r = (*callback_func)(node->group, node->beg, node->end, + level, ONIG_TRAVERSE_CALLBACK_AT_LAST, arg); + if (r != 0) return r; + } + + return 0; +} +#endif /* USE_CAPTURE_HISTORY */ + +extern int +onig_capture_tree_traverse(OnigRegion* region, int at, + int(*callback_func)(int,int,int,int,int,void*), void* arg) +{ +#ifdef USE_CAPTURE_HISTORY + return capture_tree_traverse(region->history_root, at, + callback_func, 0, arg); +#else + return ONIG_NO_SUPPORT_CONFIG; +#endif +} diff --git a/internal/components/third_party/oniguruma/src/regversion.c b/internal/components/third_party/oniguruma/src/regversion.c new file mode 100644 index 0000000000..1f0faa16aa --- /dev/null +++ b/internal/components/third_party/oniguruma/src/regversion.c @@ -0,0 +1,59 @@ +/********************************************************************** + regversion.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef NEED_TO_INCLUDE_STDIO +#define NEED_TO_INCLUDE_STDIO +#endif + +#include "regint.h" + +extern const char* +onig_version(void) +{ + static char s[12]; + + xsnprintf(s, sizeof(s), "%d.%d.%d", + ONIGURUMA_VERSION_MAJOR, + ONIGURUMA_VERSION_MINOR, + ONIGURUMA_VERSION_TEENY); + return s; +} + +extern const char* +onig_copyright(void) +{ + static char s[58]; + + xsnprintf(s, sizeof(s), + "Oniguruma %d.%d.%d : Copyright (C) 2002-2018 K.Kosako", + ONIGURUMA_VERSION_MAJOR, + ONIGURUMA_VERSION_MINOR, + ONIGURUMA_VERSION_TEENY); + return s; +} diff --git a/internal/components/third_party/oniguruma/src/sjis.c b/internal/components/third_party/oniguruma/src/sjis.c new file mode 100644 index 0000000000..10afd9d34a --- /dev/null +++ b/internal/components/third_party/oniguruma/src/sjis.c @@ -0,0 +1,312 @@ +/********************************************************************** + sjis.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regint.h" + +static const int EncLen_SJIS[] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1 +}; + +static const char SJIS_CAN_BE_TRAIL_TABLE[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 +}; + +#define SJIS_ISMB_FIRST(byte) (EncLen_SJIS[byte] > 1) +#define SJIS_ISMB_TRAIL(byte) SJIS_CAN_BE_TRAIL_TABLE[(byte)] + +static int +mbc_enc_len(const UChar* p) +{ + return EncLen_SJIS[*p]; +} + +static int +is_valid_mbc_string(const UChar* p, const UChar* end) +{ + while (p < end) { + if (*p < 0x80) { + p++; + } + else if (*p < 0xa1) { + if (*p == 0xa0 || *p == 0x80) + return FALSE; + p++; + if (p >= end) return FALSE; + if (*p < 0x40 || *p > 0xfc || *p == 0x7f) + return FALSE; + p++; + } + else if (*p < 0xe0) { + p++; + } + else if (*p < 0xfd) { + p++; + if (p >= end) return FALSE; + if (*p < 0x40 || *p > 0xfc || *p == 0x7f) + return FALSE; + p++; + } + else + return FALSE; + } + + return TRUE; +} + +static int +code_to_mbclen(OnigCodePoint code) +{ + if (code < 256) { + if (EncLen_SJIS[(int )code] == 1) + return 1; + } + else if (code < 0x10000) { + if (EncLen_SJIS[(int )(code >> 8) & 0xff] == 2) + return 2; + } + + return ONIGERR_INVALID_CODE_POINT_VALUE; +} + +static OnigCodePoint +mbc_to_code(const UChar* p, const UChar* end) +{ + int c, i, len; + OnigCodePoint n; + + len = enclen(ONIG_ENCODING_SJIS, p); + c = *p++; + n = c; + if (len == 1) return n; + + for (i = 1; i < len; i++) { + if (p >= end) break; + c = *p++; + n <<= 8; n += c; + } + return n; +} + +static int +code_to_mbc(OnigCodePoint code, UChar *buf) +{ + UChar *p = buf; + + if ((code & 0xff00) != 0) *p++ = (UChar )(((code >> 8) & 0xff)); + *p++ = (UChar )(code & 0xff); + + return (int )(p - buf); +} + +static int +mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED, + const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) +{ + const UChar* p = *pp; + + if (ONIGENC_IS_MBC_ASCII(p)) { + *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); + (*pp)++; + return 1; + } + else { + int i; + int len = enclen(ONIG_ENCODING_SJIS, p); + + for (i = 0; i < len; i++) { + *lower++ = *p++; + } + (*pp) += len; + return len; /* return byte length of converted char to lower */ + } +} + +static UChar* +left_adjust_char_head(const UChar* start, const UChar* s) +{ + const UChar *p; + int len; + + if (s <= start) return (UChar* )s; + p = s; + + if (SJIS_ISMB_TRAIL(*p)) { + while (p > start) { + if (! SJIS_ISMB_FIRST(*--p)) { + p++; + break; + } + } + } + len = enclen(ONIG_ENCODING_SJIS, p); + if (p + len > s) return (UChar* )p; + p += len; + return (UChar* )(p + ((s - p) & ~1)); +} + +static int +is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED) +{ + const UChar c = *s; + return (SJIS_ISMB_TRAIL(c) ? FALSE : TRUE); +} + + +static const OnigCodePoint CR_Hiragana[] = { + 1, + 0x829f, 0x82f1 +}; /* CR_Hiragana */ + +static const OnigCodePoint CR_Katakana[] = { + 4, + 0x00a6, 0x00af, + 0x00b1, 0x00dd, + 0x8340, 0x837e, + 0x8380, 0x8396, +}; /* CR_Katakana */ + +static const OnigCodePoint* PropertyList[] = { + CR_Hiragana, + CR_Katakana +}; + + +static int +property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end) +{ + struct PropertyNameCtype* pc; + int len = (int )(end - p); + char q[32]; + + if (len < sizeof(q) - 1) { + xmemcpy(q, p, (size_t )len); + q[len] = '\0'; + pc = onigenc_sjis_lookup_property_name(q, len); + if (pc != 0) + return pc->ctype; + } + + return ONIGERR_INVALID_CHAR_PROPERTY_NAME; +} + +static int +is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (ctype <= ONIGENC_MAX_STD_CTYPE) { + if (code < 128) + return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype); + else { + if (CTYPE_IS_WORD_GRAPH_PRINT(ctype)) { + return (code_to_mbclen(code) > 1 ? TRUE : FALSE); + } + } + } + else { + ctype -= (ONIGENC_MAX_STD_CTYPE + 1); + if (ctype >= (unsigned int )(sizeof(PropertyList)/sizeof(PropertyList[0]))) + return ONIGERR_TYPE_BUG; + + return onig_is_in_code_range((UChar* )PropertyList[ctype], code); + } + + return FALSE; +} + +static int +get_ctype_code_range(OnigCtype ctype, OnigCodePoint* sb_out, + const OnigCodePoint* ranges[]) +{ + if (ctype <= ONIGENC_MAX_STD_CTYPE) { + return ONIG_NO_SUPPORT_CONFIG; + } + else { + *sb_out = 0x80; + + ctype -= (ONIGENC_MAX_STD_CTYPE + 1); + if (ctype >= (OnigCtype )(sizeof(PropertyList)/sizeof(PropertyList[0]))) + return ONIGERR_TYPE_BUG; + + *ranges = PropertyList[ctype]; + return 0; + } +} + +OnigEncodingType OnigEncodingSJIS = { + mbc_enc_len, + "Shift_JIS", /* name */ + 2, /* max enc length */ + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + mbc_to_code, + code_to_mbclen, + code_to_mbc, + mbc_case_fold, + onigenc_ascii_apply_all_case_fold, + onigenc_ascii_get_case_fold_codes_by_str, + property_name_to_ctype, + is_code_ctype, + get_ctype_code_range, + left_adjust_char_head, + is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1_OR_0, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/sjis_prop.c b/internal/components/third_party/oniguruma/src/sjis_prop.c new file mode 100644 index 0000000000..2597a9f866 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/sjis_prop.c @@ -0,0 +1,151 @@ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: gperf -pt -T -L ANSI-C -N onigenc_sjis_lookup_property_name --output-file gperf2.tmp sjis_prop.gperf */ +/* Computed positions: -k'1,3' */ + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +#error "gperf generated tables don't work with this execution character set. Please report a bug to ." +#endif + +#line 1 "sjis_prop.gperf" + +#include "regint.h" + +#define TOTAL_KEYWORDS 16 +#define MIN_WORD_LENGTH 4 +#define MAX_WORD_LENGTH 8 +#define MIN_HASH_VALUE 4 +#define MAX_HASH_VALUE 55 +/* maximum key range = 52, duplicates = 0 */ + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static unsigned int +hash (register const char *str, register size_t len) +{ + static unsigned char asso_values[] = + { + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 0, 3, 10, 25, 56, + 56, 30, 0, 56, 56, 0, 20, 56, 56, 56, + 15, 56, 56, 20, 56, 30, 56, 0, 0, 56, + 56, 56, 56, 56, 56, 56, 56, 15, 56, 56, + 56, 56, 56, 25, 56, 10, 56, 56, 56, 56, + 5, 56, 0, 56, 0, 56, 5, 56, 56, 20, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56 + }; + return (unsigned int )len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]]; +} + +struct PropertyNameCtype * +onigenc_sjis_lookup_property_name (register const char *str, register size_t len) +{ + static struct PropertyNameCtype wordlist[] = + { + {""}, {""}, {""}, {""}, +#line 22 "sjis_prop.gperf" + {"Word", 12}, +#line 11 "sjis_prop.gperf" + {"Alpha", 1}, + {""}, {""}, +#line 25 "sjis_prop.gperf" + {"Hiragana", 15}, + {""}, +#line 23 "sjis_prop.gperf" + {"Alnum", 13}, + {""}, {""}, +#line 26 "sjis_prop.gperf" + {"Katakana", 16}, + {""}, +#line 24 "sjis_prop.gperf" + {"ASCII", 14}, +#line 21 "sjis_prop.gperf" + {"XDigit", 11}, + {""}, {""}, {""}, +#line 13 "sjis_prop.gperf" + {"Cntrl", 3}, + {""}, {""}, +#line 12 "sjis_prop.gperf" + {"Blank", 2}, + {""}, +#line 18 "sjis_prop.gperf" + {"Punct", 8}, + {""}, {""}, {""}, {""}, +#line 17 "sjis_prop.gperf" + {"Print", 7}, + {""}, {""}, {""}, {""}, +#line 20 "sjis_prop.gperf" + {"Upper", 10}, + {""}, {""}, {""}, {""}, +#line 19 "sjis_prop.gperf" + {"Space", 9}, + {""}, {""}, {""}, {""}, +#line 16 "sjis_prop.gperf" + {"Lower", 6}, + {""}, {""}, {""}, {""}, +#line 15 "sjis_prop.gperf" + {"Graph", 5}, + {""}, {""}, {""}, {""}, +#line 14 "sjis_prop.gperf" + {"Digit", 4} + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + register unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE) + { + register const char *s = wordlist[key].name; + + if (*str == *s && !strcmp (str + 1, s + 1)) + return &wordlist[key]; + } + } + return 0; +} diff --git a/internal/components/third_party/oniguruma/src/sjis_prop.gperf b/internal/components/third_party/oniguruma/src/sjis_prop.gperf new file mode 100644 index 0000000000..842b61b65d --- /dev/null +++ b/internal/components/third_party/oniguruma/src/sjis_prop.gperf @@ -0,0 +1,26 @@ +%{ +#include "regint.h" +%} + +struct PropertyNameCtype { + char *name; + int ctype; +}; + +%% +Alpha, 1 +Blank, 2 +Cntrl, 3 +Digit, 4 +Graph, 5 +Lower, 6 +Print, 7 +Punct, 8 +Space, 9 +Upper, 10 +XDigit, 11 +Word, 12 +Alnum, 13 +ASCII, 14 +Hiragana, 15 +Katakana, 16 diff --git a/internal/components/third_party/oniguruma/src/st.c b/internal/components/third_party/oniguruma/src/st.c new file mode 100644 index 0000000000..64228e701c --- /dev/null +++ b/internal/components/third_party/oniguruma/src/st.c @@ -0,0 +1,562 @@ +/* This is a public domain general purpose hash table package written by Peter Moore @ UCB. */ + +/* static char sccsid[] = "@(#) st.c 5.1 89/12/14 Crucible"; */ + +#ifndef NEED_TO_INCLUDE_STDIO +#define NEED_TO_INCLUDE_STDIO +#endif + +#include "regint.h" +#include "st.h" + + +typedef struct st_table_entry st_table_entry; + +struct st_table_entry { + unsigned int hash; + st_data_t key; + st_data_t record; + st_table_entry *next; +}; + +#define ST_DEFAULT_MAX_DENSITY 5 +#define ST_DEFAULT_INIT_TABLE_SIZE 11 + + /* + * DEFAULT_MAX_DENSITY is the default for the largest we allow the + * average number of items per bin before increasing the number of + * bins + * + * DEFAULT_INIT_TABLE_SIZE is the default for the number of bins + * allocated initially + * + */ + +static int numcmp(st_data_t, st_data_t); +static int numhash(st_data_t); +static struct st_hash_type type_numhash = { + numcmp, + numhash, +}; + +static int str_cmp(st_data_t, st_data_t); +static int str_hash(st_data_t); +static struct st_hash_type type_strhash = { + str_cmp, + str_hash, +}; + +static void rehash(st_table *); + +#define alloc(type) (type*)xmalloc((unsigned)sizeof(type)) +#define Calloc(n,s) (char*)xcalloc((n),(s)) + +#define EQUAL(table,x,y) ((x)==(y) || (*table->type->compare)((x),(y)) == 0) + +#define do_hash(key,table) (unsigned int)(*(table)->type->hash)((key)) +#define do_hash_bin(key,table) (do_hash(key, table)%(table)->num_bins) + +/* + * MINSIZE is the minimum size of a dictionary. + */ + +#define MINSIZE 8 + +/* +Table of prime numbers 2^n+a, 2<=n<=30. +*/ +static const long primes[] = { + 8 + 3, + 16 + 3, + 32 + 5, + 64 + 3, + 128 + 3, + 256 + 27, + 512 + 9, + 1024 + 9, + 2048 + 5, + 4096 + 3, + 8192 + 27, + 16384 + 43, + 32768 + 3, + 65536 + 45, + 131072 + 29, + 262144 + 3, + 524288 + 21, + 1048576 + 7, + 2097152 + 17, + 4194304 + 15, + 8388608 + 9, + 16777216 + 43, + 33554432 + 35, + 67108864 + 15, + 134217728 + 29, + 268435456 + 3, + 536870912 + 11, + 1073741824 + 85, + 0 +}; + +static int new_size(int size) +{ + int i; + +#if 0 + for (i=3; i<31; i++) { + if ((1< size) return 1< size) return primes[i]; + } + /* Ran out of polynomials */ + return -1; /* should raise exception */ +#endif +} + +#ifdef HASH_LOG +static int collision = 0; +static int init_st = 0; + +static void +stat_col(void) +{ + FILE *f = fopen("/tmp/col", "w"); + if (f == 0) return ; + + (void) fprintf(f, "collision: %d\n", collision); + (void) fclose(f); +} +#endif + +extern st_table* +st_init_table_with_size(struct st_hash_type* type, int size) +{ + st_table *tbl; + +#ifdef HASH_LOG + if (init_st == 0) { + init_st = 1; + atexit(stat_col); + } +#endif + + size = new_size(size); /* round up to prime number */ + if (size <= 0) return 0; + + tbl = alloc(st_table); + if (tbl == 0) return 0; + + tbl->type = type; + tbl->num_entries = 0; + tbl->num_bins = size; + tbl->bins = (st_table_entry **)Calloc(size, sizeof(st_table_entry*)); + if (tbl->bins == 0) { + free(tbl); + return 0; + } + + return tbl; +} + +extern st_table* +st_init_table(struct st_hash_type* type) +{ + return st_init_table_with_size(type, 0); +} + +extern st_table* +st_init_numtable(void) +{ + return st_init_table(&type_numhash); +} + +extern st_table* +st_init_numtable_with_size(int size) +{ + return st_init_table_with_size(&type_numhash, size); +} + +extern st_table* +st_init_strtable(void) +{ + return st_init_table(&type_strhash); +} + +extern st_table* +st_init_strtable_with_size(int size) +{ + return st_init_table_with_size(&type_strhash, size); +} + +extern void +st_free_table(st_table* table) +{ + register st_table_entry *ptr, *next; + int i; + + for(i = 0; i < table->num_bins; i++) { + ptr = table->bins[i]; + while (ptr != 0) { + next = ptr->next; + free(ptr); + ptr = next; + } + } + free(table->bins); + free(table); +} + +#define PTR_NOT_EQUAL(table, ptr, hash_val, key) \ +((ptr) != 0 && (ptr->hash != (hash_val) || !EQUAL((table), (key), (ptr)->key))) + +#ifdef HASH_LOG +#define COLLISION collision++ +#else +#define COLLISION +#endif + +#define FIND_ENTRY(table, ptr, hash_val, bin_pos) do {\ + bin_pos = hash_val%(table)->num_bins;\ + ptr = (table)->bins[bin_pos];\ + if (PTR_NOT_EQUAL(table, ptr, hash_val, key)) {\ + COLLISION;\ + while (PTR_NOT_EQUAL(table, ptr->next, hash_val, key)) {\ + ptr = ptr->next;\ + }\ + ptr = ptr->next;\ + }\ +} while (0) + +extern int +st_lookup(st_table* table, register st_data_t key, st_data_t* value) +{ + unsigned int hash_val, bin_pos; + register st_table_entry *ptr; + + hash_val = do_hash(key, table); + FIND_ENTRY(table, ptr, hash_val, bin_pos); + + if (ptr == 0) { + return 0; + } + else { + if (value != 0) *value = ptr->record; + return 1; + } +} + +#define ADD_DIRECT(table, key, value, hash_val, bin_pos, ret) \ +do {\ + st_table_entry *entry;\ + if (table->num_entries/(table->num_bins) > ST_DEFAULT_MAX_DENSITY) {\ + rehash(table);\ + bin_pos = hash_val % table->num_bins;\ + }\ + entry = alloc(st_table_entry);\ + if (IS_NULL(entry)) return ret;\ + entry->hash = hash_val;\ + entry->key = key;\ + entry->record = value;\ + entry->next = table->bins[bin_pos];\ + table->bins[bin_pos] = entry;\ + table->num_entries++;\ +} while (0) + +extern int +st_insert(register st_table* table, register st_data_t key, st_data_t value) +{ + unsigned int hash_val, bin_pos; + register st_table_entry *ptr; + + hash_val = do_hash(key, table); + FIND_ENTRY(table, ptr, hash_val, bin_pos); + + if (ptr == 0) { + ADD_DIRECT(table, key, value, hash_val, bin_pos, ONIGERR_MEMORY); + return 0; + } + else { + ptr->record = value; + return 1; + } +} + +extern void +st_add_direct(st_table* table, st_data_t key, st_data_t value) +{ + unsigned int hash_val, bin_pos; + + hash_val = do_hash(key, table); + bin_pos = hash_val % table->num_bins; + ADD_DIRECT(table, key, value, hash_val, bin_pos,); +} + +static void +rehash(register st_table* table) +{ + register st_table_entry *ptr, *next, **new_bins; + int i, new_num_bins, old_num_bins; + unsigned int hash_val; + + old_num_bins = table->num_bins; + new_num_bins = new_size(old_num_bins + 1); + if (new_num_bins <= 0) return ; + + new_bins = (st_table_entry**)Calloc(new_num_bins, sizeof(st_table_entry*)); + if (new_bins == 0) { + return ; + } + + for(i = 0; i < old_num_bins; i++) { + ptr = table->bins[i]; + while (ptr != 0) { + next = ptr->next; + hash_val = ptr->hash % new_num_bins; + ptr->next = new_bins[hash_val]; + new_bins[hash_val] = ptr; + ptr = next; + } + } + free(table->bins); + table->num_bins = new_num_bins; + table->bins = new_bins; +} + +extern st_table* +st_copy(st_table* old_table) +{ + st_table *new_table; + st_table_entry *ptr, *entry; + int i, num_bins = old_table->num_bins; + + new_table = alloc(st_table); + if (new_table == 0) { + return 0; + } + + *new_table = *old_table; + new_table->bins = (st_table_entry**) + Calloc((unsigned)num_bins, sizeof(st_table_entry*)); + + if (new_table->bins == 0) { + free(new_table); + return 0; + } + + for(i = 0; i < num_bins; i++) { + new_table->bins[i] = 0; + ptr = old_table->bins[i]; + while (ptr != 0) { + entry = alloc(st_table_entry); + if (entry == 0) { + free(new_table->bins); + free(new_table); + return 0; + } + *entry = *ptr; + entry->next = new_table->bins[i]; + new_table->bins[i] = entry; + ptr = ptr->next; + } + } + return new_table; +} + +extern int +st_delete(register st_table* table, register st_data_t* key, st_data_t* value) +{ + unsigned int hash_val; + st_table_entry *tmp; + register st_table_entry *ptr; + + hash_val = do_hash_bin(*key, table); + ptr = table->bins[hash_val]; + + if (ptr == 0) { + if (value != 0) *value = 0; + return 0; + } + + if (EQUAL(table, *key, ptr->key)) { + table->bins[hash_val] = ptr->next; + table->num_entries--; + if (value != 0) *value = ptr->record; + *key = ptr->key; + free(ptr); + return 1; + } + + for(; ptr->next != 0; ptr = ptr->next) { + if (EQUAL(table, ptr->next->key, *key)) { + tmp = ptr->next; + ptr->next = ptr->next->next; + table->num_entries--; + if (value != 0) *value = tmp->record; + *key = tmp->key; + free(tmp); + return 1; + } + } + + return 0; +} + +extern int +st_delete_safe(register st_table* table, register st_data_t* key, st_data_t* value, st_data_t never) +{ + unsigned int hash_val; + register st_table_entry *ptr; + + hash_val = do_hash_bin(*key, table); + ptr = table->bins[hash_val]; + + if (ptr == 0) { + if (value != 0) *value = 0; + return 0; + } + + for(; ptr != 0; ptr = ptr->next) { + if ((ptr->key != never) && EQUAL(table, ptr->key, *key)) { + table->num_entries--; + *key = ptr->key; + if (value != 0) *value = ptr->record; + ptr->key = ptr->record = never; + return 1; + } + } + + return 0; +} + +static int +#if defined(__GNUC__) +delete_never(st_data_t key __attribute__ ((unused)), st_data_t value, + st_data_t never) +#else +delete_never(st_data_t key, st_data_t value, st_data_t never) +#endif +{ + if (value == never) return ST_DELETE; + return ST_CONTINUE; +} + +extern void +st_cleanup_safe(st_table* table, st_data_t never) +{ + int num_entries = table->num_entries; + + st_foreach(table, delete_never, never); + table->num_entries = num_entries; +} + +extern int +st_foreach(st_table* table, int (*func)(st_data_t, st_data_t, st_data_t), st_data_t arg) +{ + st_table_entry *ptr, *last, *tmp; + enum st_retval retval; + int i; + + for(i = 0; i < table->num_bins; i++) { + last = 0; + for(ptr = table->bins[i]; ptr != 0;) { + retval = (*func)(ptr->key, ptr->record, arg); + switch (retval) { + case ST_CHECK: /* check if hash is modified during iteration */ + tmp = 0; + if (i < table->num_bins) { + for (tmp = table->bins[i]; tmp; tmp=tmp->next) { + if (tmp == ptr) break; + } + } + if (!tmp) { + /* call func with error notice */ + return 1; + } + /* fall through */ + case ST_CONTINUE: + last = ptr; + ptr = ptr->next; + break; + case ST_STOP: + return 0; + case ST_DELETE: + tmp = ptr; + if (last == 0) { + table->bins[i] = ptr->next; + } + else { + last->next = ptr->next; + } + ptr = ptr->next; + free(tmp); + table->num_entries--; + } + } + } + return 0; +} + +static int +str_cmp(st_data_t a1, st_data_t a2) +{ + const char* s1 = (const char* )a1; + const char* s2 = (const char* )a2; + return strcmp(s1, s2); +} + +static int +str_hash(st_data_t astring) +{ + const char* string = (const char* )astring; + register int c; + +#ifdef HASH_ELFHASH + register unsigned int h = 0, g; + + while ((c = *string++) != '\0') { + h = ( h << 4 ) + c; + if ( g = h & 0xF0000000 ) + h ^= g >> 24; + h &= ~g; + } + return h; +#elif HASH_PERL + register int val = 0; + + while ((c = *string++) != '\0') { + val += c; + val += (val << 10); + val ^= (val >> 6); + } + val += (val << 3); + val ^= (val >> 11); + + return val + (val << 15); +#else + register int val = 0; + + while ((c = *string++) != '\0') { + val = val*997 + c; + } + + return val + (val>>5); +#endif +} + +static int +numcmp(st_data_t x, st_data_t y) +{ + return x != y; +} + +static int +numhash(st_data_t n) +{ + return n; +} diff --git a/internal/components/third_party/oniguruma/src/st.h b/internal/components/third_party/oniguruma/src/st.h new file mode 100644 index 0000000000..70798dc50b --- /dev/null +++ b/internal/components/third_party/oniguruma/src/st.h @@ -0,0 +1,60 @@ +/* This is a public domain general purpose hash table package written by Peter Moore @ UCB. */ + +/* @(#) st.h 5.1 89/12/14 */ + +#ifndef ST_INCLUDED +#define ST_INCLUDED + +#if SIZEOF_VOIDP == SIZEOF_LONG +typedef unsigned long st_data_t; +#elif SIZEOF_VOIDP == SIZEOF_LONG_LONG +typedef unsigned long long st_data_t; +#endif + +#define ST_DATA_T_DEFINED + +typedef struct st_table st_table; + +struct st_hash_type { + int (*compare)(st_data_t, st_data_t); + int (*hash)(st_data_t); +}; + +struct st_table { + struct st_hash_type *type; + int num_bins; + int num_entries; + struct st_table_entry **bins; +}; + +#define st_is_member(table,key) st_lookup(table,key,(st_data_t *)0) + +enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK}; + +#ifndef _ +# define _(args) args +#endif + +st_table *st_init_table _((struct st_hash_type *)); +st_table *st_init_table_with_size _((struct st_hash_type *, int)); +st_table *st_init_numtable _((void)); +st_table *st_init_numtable_with_size _((int)); +st_table *st_init_strtable _((void)); +st_table *st_init_strtable_with_size _((int)); +int st_delete _((st_table *, st_data_t *, st_data_t *)); +int st_delete_safe _((st_table *, st_data_t *, st_data_t *, st_data_t)); +int st_insert _((st_table *, st_data_t, st_data_t)); +int st_lookup _((st_table *, st_data_t, st_data_t *)); +int st_foreach _((st_table *, int (*)(st_data_t, st_data_t, st_data_t), st_data_t)); +void st_add_direct _((st_table *, st_data_t, st_data_t)); +void st_free_table _((st_table *)); +void st_cleanup_safe _((st_table *, st_data_t)); +st_table *st_copy _((st_table *)); + +#define ST_NUMCMP ((int (*)()) 0) +#define ST_NUMHASH ((int (*)()) -2) + +#define st_numcmp ST_NUMCMP +#define st_numhash ST_NUMHASH + +#endif /* ST_INCLUDED */ diff --git a/internal/components/third_party/oniguruma/src/unicode.c b/internal/components/third_party/oniguruma/src/unicode.c new file mode 100644 index 0000000000..6288d6915c --- /dev/null +++ b/internal/components/third_party/oniguruma/src/unicode.c @@ -0,0 +1,1239 @@ +/********************************************************************** + unicode.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regint.h" + +struct PoolPropertyNameCtype { + short int name; + short int ctype; +}; + +#define ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(code,ctype) \ + ((EncUNICODE_ISO_8859_1_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) + +static const unsigned short EncUNICODE_ISO_8859_1_CtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x428c, 0x4289, 0x4288, 0x4288, 0x4288, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0288, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0284, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, + 0x01a0, 0x01a0, 0x30e2, 0x01a0, 0x01a0, 0x00a8, 0x01a0, 0x01a0, + 0x01a0, 0x01a0, 0x10a0, 0x10a0, 0x01a0, 0x30e2, 0x01a0, 0x01a0, + 0x01a0, 0x10a0, 0x30e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x01a0, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x01a0, + 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x01a0, + 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2 +}; + +#include "st.h" + +#include "unicode_fold_data.h" + +extern int +onigenc_unicode_mbc_case_fold(OnigEncoding enc, OnigCaseFoldType flag, + const UChar** pp, const UChar* end, UChar* fold) +{ + const struct ByUnfoldKey* buk; + + OnigCodePoint code; + int i, len, rlen; + const UChar *p = *pp; + + code = ONIGENC_MBC_TO_CODE(enc, p, end); + len = enclen(enc, p); + *pp += len; + +#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI + if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) { + if (code == 0x0130) { + return ONIGENC_CODE_TO_MBC(enc, 0x0069, fold); + } +#if 0 + if (code == 0x0049) { + return ONIGENC_CODE_TO_MBC(enc, 0x0131, fold); + } +#endif + } +#endif + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(code)) { + buk = onigenc_unicode_unfold_key(code); + if (buk != 0) { + if (buk->fold_len == 1) { + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || + ONIGENC_IS_ASCII_CODE(*FOLDS1_FOLD(buk->index))) + return ONIGENC_CODE_TO_MBC(enc, *FOLDS1_FOLD(buk->index), fold); + } + else { + OnigCodePoint* addr; + + FOLDS_FOLD_ADDR_BUK(buk, addr); + rlen = 0; + for (i = 0; i < buk->fold_len; i++) { + OnigCodePoint c = addr[i]; + len = ONIGENC_CODE_TO_MBC(enc, c, fold); + fold += len; + rlen += len; + } + return rlen; + } + } + } + + for (i = 0; i < len; i++) { + *fold++ = *p++; + } + return len; +} + +static int +apply_case_fold1(OnigCaseFoldType flag, int from, int to, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + int i, j, k, n, r; + + for (i = from; i < to; ) { + OnigCodePoint fold = *FOLDS1_FOLD(i); + if (CASE_FOLD_IS_ASCII_ONLY(flag) && ! ONIGENC_IS_ASCII_CODE(fold)) break; + + n = FOLDS1_UNFOLDS_NUM(i); + for (j = 0; j < n; j++) { + OnigCodePoint unfold = FOLDS1_UNFOLDS(i)[j]; + + if (CASE_FOLD_IS_ASCII_ONLY(flag) && ! ONIGENC_IS_ASCII_CODE(unfold)) + continue; + + r = (*f)(fold, &unfold, 1, arg); + if (r != 0) return r; + r = (*f)(unfold, &fold, 1, arg); + if (r != 0) return r; + + for (k = 0; k < j; k++) { + OnigCodePoint unfold2 = FOLDS1_UNFOLDS(i)[k]; + if (CASE_FOLD_IS_ASCII_ONLY(flag) && + ! ONIGENC_IS_ASCII_CODE(unfold2)) continue; + + r = (*f)(unfold, &unfold2, 1, arg); + if (r != 0) return r; + r = (*f)(unfold2, &unfold, 1, arg); + if (r != 0) return r; + } + } + + i = FOLDS1_NEXT_INDEX(i); + } + + return 0; +} + +static int +apply_case_fold2(int from, int to, OnigApplyAllCaseFoldFunc f, void* arg) +{ + int i, j, k, n, r; + + for (i = from; i < to; ) { + OnigCodePoint* fold = FOLDS2_FOLD(i); + n = FOLDS2_UNFOLDS_NUM(i); + for (j = 0; j < n; j++) { + OnigCodePoint unfold = FOLDS2_UNFOLDS(i)[j]; + + r = (*f)(unfold, fold, 2, arg); + if (r != 0) return r; + + for (k = 0; k < j; k++) { + OnigCodePoint unfold2 = FOLDS2_UNFOLDS(i)[k]; + r = (*f)(unfold, &unfold2, 1, arg); + if (r != 0) return r; + r = (*f)(unfold2, &unfold, 1, arg); + if (r != 0) return r; + } + } + + i = FOLDS2_NEXT_INDEX(i); + } + + return 0; +} + +static int +apply_case_fold3(int from, int to, OnigApplyAllCaseFoldFunc f, void* arg) +{ + int i, j, k, n, r; + + for (i = from; i < to; ) { + OnigCodePoint* fold = FOLDS3_FOLD(i); + n = FOLDS3_UNFOLDS_NUM(i); + for (j = 0; j < n; j++) { + OnigCodePoint unfold = FOLDS3_UNFOLDS(i)[j]; + + r = (*f)(unfold, fold, 3, arg); + if (r != 0) return r; + + for (k = 0; k < j; k++) { + OnigCodePoint unfold2 = FOLDS3_UNFOLDS(i)[k]; + r = (*f)(unfold, &unfold2, 1, arg); + if (r != 0) return r; + r = (*f)(unfold2, &unfold, 1, arg); + if (r != 0) return r; + } + } + + i = FOLDS3_NEXT_INDEX(i); + } + + return 0; +} + +extern int +onigenc_unicode_apply_all_case_fold(OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + int r; + + r = apply_case_fold1(flag, 0, FOLDS1_NORMAL_END_INDEX, f, arg); + if (r != 0) return r; + +#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI + if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) { + code = 0x0131; + r = (*f)(0x0049, &code, 1, arg); + if (r != 0) return r; + code = 0x0049; + r = (*f)(0x0131, &code, 1, arg); + if (r != 0) return r; + + code = 0x0130; + r = (*f)(0x0069, &code, 1, arg); + if (r != 0) return r; + code = 0x0069; + r = (*f)(0x0130, &code, 1, arg); + if (r != 0) return r; + } + else { +#endif + r = apply_case_fold1(flag, FOLDS1_NORMAL_END_INDEX, FOLDS1_END_INDEX, f, arg); + if (r != 0) return r; +#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI + } +#endif + + if ((flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) == 0) + return 0; + + r = apply_case_fold2(0, FOLDS2_NORMAL_END_INDEX, f, arg); + if (r != 0) return r; + +#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI + if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) == 0) { +#endif + r = apply_case_fold2(FOLDS2_NORMAL_END_INDEX, FOLDS2_END_INDEX, f, arg); + if (r != 0) return r; +#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI + } +#endif + + r = apply_case_fold3(0, FOLDS3_NORMAL_END_INDEX, f, arg); + if (r != 0) return r; + + return 0; +} + +extern int +onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc, + OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, + OnigCaseFoldCodeItem items[]) +{ + int n, m, i, j, k, len, lens[3]; + int index; + int fn, ncs[3]; + OnigCodePoint cs[3][4]; + OnigCodePoint code, codes[3], orig_codes[3]; + const struct ByUnfoldKey* buk1; + + n = 0; + + code = ONIGENC_MBC_TO_CODE(enc, p, end); + if (CASE_FOLD_IS_ASCII_ONLY(flag)) { + if (! ONIGENC_IS_ASCII_CODE(code)) return n; + } + len = enclen(enc, p); + +#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI + if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) { + if (code == 0x0049) { + items[0].byte_len = len; + items[0].code_len = 1; + items[0].code[0] = 0x0131; + return 1; + } + else if (code == 0x0130) { + items[0].byte_len = len; + items[0].code_len = 1; + items[0].code[0] = 0x0069; + return 1; + } + else if (code == 0x0131) { + items[0].byte_len = len; + items[0].code_len = 1; + items[0].code[0] = 0x0049; + return 1; + } + else if (code == 0x0069) { + items[0].byte_len = len; + items[0].code_len = 1; + items[0].code[0] = 0x0130; + return 1; + } + } +#endif + + orig_codes[0] = code; + lens[0] = len; + p += len; + + buk1 = onigenc_unicode_unfold_key(orig_codes[0]); + if (buk1 != 0 && buk1->fold_len == 1) { + codes[0] = *FOLDS1_FOLD(buk1->index); + } + else + codes[0] = orig_codes[0]; + + if ((flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) == 0) + goto fold1; + + if (p < end) { + const struct ByUnfoldKey* buk; + + code = ONIGENC_MBC_TO_CODE(enc, p, end); + orig_codes[1] = code; + len = enclen(enc, p); + lens[1] = lens[0] + len; + buk = onigenc_unicode_unfold_key(orig_codes[1]); + if (buk != 0 && buk->fold_len == 1) { + codes[1] = *FOLDS1_FOLD(buk->index); + } + else + codes[1] = orig_codes[1]; + + p += len; + if (p < end) { + code = ONIGENC_MBC_TO_CODE(enc, p, end); + orig_codes[2] = code; + len = enclen(enc, p); + lens[2] = lens[1] + len; + buk = onigenc_unicode_unfold_key(orig_codes[2]); + if (buk != 0 && buk->fold_len == 1) { + codes[2] = *FOLDS1_FOLD(buk->index); + } + else + codes[2] = orig_codes[2]; + + index = onigenc_unicode_fold3_key(codes); + if (index >= 0) { + m = FOLDS3_UNFOLDS_NUM(index); + for (i = 0; i < m; i++) { + items[n].byte_len = lens[2]; + items[n].code_len = 1; + items[n].code[0] = FOLDS3_UNFOLDS(index)[i]; + n++; + } + + for (fn = 0; fn < 3; fn++) { + int sindex; + cs[fn][0] = FOLDS3_FOLD(index)[fn]; + ncs[fn] = 1; + sindex = onigenc_unicode_fold1_key(&cs[fn][0]); + if (sindex >= 0) { + int m = FOLDS1_UNFOLDS_NUM(sindex); + for (i = 0; i < m; i++) { + cs[fn][i+1] = FOLDS1_UNFOLDS(sindex)[i]; + } + ncs[fn] += m; + } + } + + for (i = 0; i < ncs[0]; i++) { + for (j = 0; j < ncs[1]; j++) { + for (k = 0; k < ncs[2]; k++) { + if (cs[0][i] == orig_codes[0] && cs[1][j] == orig_codes[1] && + cs[2][k] == orig_codes[2]) + continue; + + items[n].byte_len = lens[2]; + items[n].code_len = 3; + items[n].code[0] = cs[0][i]; + items[n].code[1] = cs[1][j]; + items[n].code[2] = cs[2][k]; + n++; + } + } + } + + return n; + } + } + + index = onigenc_unicode_fold2_key(codes); + if (index >= 0) { + m = FOLDS2_UNFOLDS_NUM(index); + for (i = 0; i < m; i++) { + items[n].byte_len = lens[1]; + items[n].code_len = 1; + items[n].code[0] = FOLDS2_UNFOLDS(index)[i]; + n++; + } + + for (fn = 0; fn < 2; fn++) { + int sindex; + cs[fn][0] = FOLDS2_FOLD(index)[fn]; + ncs[fn] = 1; + sindex = onigenc_unicode_fold1_key(&cs[fn][0]); + if (sindex >= 0) { + int m = FOLDS1_UNFOLDS_NUM(sindex); + for (i = 0; i < m; i++) { + cs[fn][i+1] = FOLDS1_UNFOLDS(sindex)[i]; + } + ncs[fn] += m; + } + } + + for (i = 0; i < ncs[0]; i++) { + for (j = 0; j < ncs[1]; j++) { + if (cs[0][i] == orig_codes[0] && cs[1][j] == orig_codes[1]) + continue; + items[n].byte_len = lens[1]; + items[n].code_len = 2; + items[n].code[0] = cs[0][i]; + items[n].code[1] = cs[1][j]; + n++; + } + } + + return n; + } + } + + fold1: + if (buk1 != 0) { + if (buk1->fold_len == 1) { + int un; + + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || + ONIGENC_IS_ASCII_CODE(*FOLDS1_FOLD(buk1->index))) { + items[0].byte_len = lens[0]; + items[0].code_len = 1; + items[0].code[0] = *FOLDS1_FOLD(buk1->index); + n++; + } + + un = FOLDS1_UNFOLDS_NUM(buk1->index); + for (i = 0; i < un; i++) { + OnigCodePoint unfold = FOLDS1_UNFOLDS(buk1->index)[i]; + if (unfold != orig_codes[0]) { + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || + ONIGENC_IS_ASCII_CODE(unfold)) { + items[n].byte_len = lens[0]; + items[n].code_len = 1; + items[n].code[0] = unfold; + n++; + } + } + } + } + else if ((flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { + if (buk1->fold_len == 2) { + m = FOLDS2_UNFOLDS_NUM(buk1->index); + for (i = 0; i < m; i++) { + OnigCodePoint unfold = FOLDS2_UNFOLDS(buk1->index)[i]; + if (unfold == orig_codes[0]) continue; + + items[n].byte_len = lens[0]; + items[n].code_len = 1; + items[n].code[0] = unfold; + n++; + } + + for (fn = 0; fn < 2; fn++) { + int index; + cs[fn][0] = FOLDS2_FOLD(buk1->index)[fn]; + ncs[fn] = 1; + index = onigenc_unicode_fold1_key(&cs[fn][0]); + if (index >= 0) { + int m = FOLDS1_UNFOLDS_NUM(index); + for (i = 0; i < m; i++) { + cs[fn][i+1] = FOLDS1_UNFOLDS(index)[i]; + } + ncs[fn] += m; + } + } + + for (i = 0; i < ncs[0]; i++) { + for (j = 0; j < ncs[1]; j++) { + items[n].byte_len = lens[0]; + items[n].code_len = 2; + items[n].code[0] = cs[0][i]; + items[n].code[1] = cs[1][j]; + n++; + } + } + } + else { /* fold_len == 3 */ + m = FOLDS3_UNFOLDS_NUM(buk1->index); + for (i = 0; i < m; i++) { + OnigCodePoint unfold = FOLDS3_UNFOLDS(buk1->index)[i]; + if (unfold == orig_codes[0]) continue; + + items[n].byte_len = lens[0]; + items[n].code_len = 1; + items[n].code[0] = unfold; + n++; + } + + for (fn = 0; fn < 3; fn++) { + int index; + cs[fn][0] = FOLDS3_FOLD(buk1->index)[fn]; + ncs[fn] = 1; + index = onigenc_unicode_fold1_key(&cs[fn][0]); + if (index >= 0) { + int m = FOLDS1_UNFOLDS_NUM(index); + for (i = 0; i < m; i++) { + cs[fn][i+1] = FOLDS1_UNFOLDS(index)[i]; + } + ncs[fn] += m; + } + } + + for (i = 0; i < ncs[0]; i++) { + for (j = 0; j < ncs[1]; j++) { + for (k = 0; k < ncs[2]; k++) { + items[n].byte_len = lens[0]; + items[n].code_len = 3; + items[n].code[0] = cs[0][i]; + items[n].code[1] = cs[1][j]; + items[n].code[2] = cs[2][k]; + n++; + } + } + } + } + } + } + else { + int index = onigenc_unicode_fold1_key(orig_codes); + if (index >= 0) { + int m = FOLDS1_UNFOLDS_NUM(index); + for (i = 0; i < m; i++) { + code = FOLDS1_UNFOLDS(index)[i]; + if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag)||ONIGENC_IS_ASCII_CODE(code)) { + items[n].byte_len = lens[0]; + items[n].code_len = 1; + items[n].code[0] = code; + n++; + } + } + } + } + + return n; +} + +#ifdef USE_UNICODE_PROPERTIES +#include "unicode_property_data.h" +#else +#include "unicode_property_data_posix.h" +#endif + + +#ifdef USE_UNICODE_WORD_BREAK + +enum WB_TYPE { + WB_Any = 0, + WB_ALetter, + WB_CR, + WB_Double_Quote, + WB_Extend, + WB_ExtendNumLet, + WB_Format, + WB_Hebrew_Letter, + WB_Katakana, + WB_LF, + WB_MidLetter, + WB_MidNum, + WB_MidNumLet, + WB_Newline, + WB_Numeric, + WB_Regional_Indicator, + WB_Single_Quote, + WB_WSegSpace, + WB_ZWJ, +}; + +typedef struct { + OnigCodePoint start; + OnigCodePoint end; + enum WB_TYPE type; +} WB_RANGE_TYPE; + +#include "unicode_wb_data.h" + +static enum WB_TYPE +wb_get_type(OnigCodePoint code) +{ + OnigCodePoint low, high, x; + enum WB_TYPE type; + + for (low = 0, high = (OnigCodePoint )WB_RANGE_NUM; low < high; ) { + x = (low + high) >> 1; + if (code > WB_RANGES[x].end) + low = x + 1; + else + high = x; + } + + type = (low < (OnigCodePoint )WB_RANGE_NUM && + code >= WB_RANGES[low].start) ? + WB_RANGES[low].type : WB_Any; + + return type; +} + +#define IS_WB_IGNORE_TAIL(t) ((t) == WB_Extend || (t) == WB_Format || (t) == WB_ZWJ) +#define IS_WB_AHLetter(t) ((t) == WB_ALetter || (t) == WB_Hebrew_Letter) +#define IS_WB_MidNumLetQ(t) ((t) == WB_MidNumLet || (t) == WB_Single_Quote) + +static int +wb_get_next_main_code(OnigEncoding enc, UChar* p, const UChar* end, + OnigCodePoint* rcode, enum WB_TYPE* rtype) +{ + OnigCodePoint code; + enum WB_TYPE type; + + while (TRUE) { + p += enclen(enc, p); + if (p >= end) break; + + code = ONIGENC_MBC_TO_CODE(enc, p, end); + type = wb_get_type(code); + if (! IS_WB_IGNORE_TAIL(type)) { + *rcode = code; + *rtype = type; + return 1; + } + } + + return 0; +} + +extern int +onigenc_wb_is_break_position(OnigEncoding enc, UChar* p, UChar* prev, + const UChar* start, const UChar* end) +{ + int r; + UChar* pp; + OnigCodePoint cfrom; + OnigCodePoint cfrom2; + OnigCodePoint cto; + OnigCodePoint cto2; + enum WB_TYPE from; + enum WB_TYPE from2; + enum WB_TYPE to; + enum WB_TYPE to2; + + /* WB1: sot / Any */ + if (p == start) return TRUE; + /* WB2: Any / eot */ + if (p == end) return TRUE; + + if (IS_NULL(prev)) { + prev = onigenc_get_prev_char_head(enc, start, p); + if (IS_NULL(prev)) return TRUE; + } + + cfrom = ONIGENC_MBC_TO_CODE(enc, prev, end); + cto = ONIGENC_MBC_TO_CODE(enc, p, end); + + from = wb_get_type(cfrom); + to = wb_get_type(cto); + + /* short cut */ + if (from == 0 && to == 0) goto WB999; + + /* WB3: CR + LF */ + if (from == WB_CR && to == WB_LF) return FALSE; + + /* WB3a: (Newline|CR|LF) / */ + if (from == WB_Newline || from == WB_CR || from == WB_LF) return TRUE; + /* WB3b: / (Newline|CR|LF) */ + if (to == WB_Newline || to == WB_CR || to == WB_LF) return TRUE; + + /* WB3c: ZWJ + {Extended_Pictographic} */ + if (from == WB_ZWJ) { + if (onigenc_unicode_is_code_ctype(cto, PROP_INDEX_EXTENDEDPICTOGRAPHIC)) + return FALSE; + } + + /* WB3d: WSegSpace + WSegSpace */ + if (from == WB_WSegSpace && to == WB_WSegSpace) return FALSE; + + /* WB4: X (Extend|Format|ZWJ)* -> X */ + if (IS_WB_IGNORE_TAIL(to)) return FALSE; + if (IS_WB_IGNORE_TAIL(from)) { + while ((pp = onigenc_get_prev_char_head(enc, start, prev)) != NULL) { + prev = pp; + cfrom = ONIGENC_MBC_TO_CODE(enc, prev, end); + from = wb_get_type(cfrom); + if (! IS_WB_IGNORE_TAIL(from)) + break; + } + } + + if (IS_WB_AHLetter(from)) { + /* WB5: AHLetter + AHLetter */ + if (IS_WB_AHLetter(to)) return FALSE; + + /* WB6: AHLetter + (MidLetter | MidNumLetQ) AHLetter */ + if (to == WB_MidLetter || IS_WB_MidNumLetQ(to)) { + r = wb_get_next_main_code(enc, p, end, &cto2, &to2); + if (r == 1) { + if (IS_WB_AHLetter(to2)) return FALSE; + } + } + } + + /* WB7: AHLetter (MidLetter | MidNumLetQ) + AHLetter */ + if (from == WB_MidLetter || IS_WB_MidNumLetQ(from)) { + if (IS_WB_AHLetter(to)) { + from2 = WB_Any; + while ((pp = onigenc_get_prev_char_head(enc, start, prev)) != NULL) { + prev = pp; + cfrom2 = ONIGENC_MBC_TO_CODE(enc, prev, end); + from2 = wb_get_type(cfrom2); + if (! IS_WB_IGNORE_TAIL(from2)) + break; + } + + if (IS_WB_AHLetter(from2)) return FALSE; + } + } + + if (from == WB_Hebrew_Letter) { + /* WB7a: Hebrew_Letter + Single_Quote */ + if (to == WB_Single_Quote) return FALSE; + + /* WB7b: Hebrew_Letter + Double_Quote Hebrew_Letter */ + if (to == WB_Double_Quote) { + r = wb_get_next_main_code(enc, p, end, &cto2, &to2); + if (r == 1) { + if (to2 == WB_Hebrew_Letter) return FALSE; + } + } + } + + /* WB7c: Hebrew_Letter Double_Quote + Hebrew_Letter */ + if (from == WB_Double_Quote) { + if (to == WB_Hebrew_Letter) { + from2 = WB_Any; + while ((pp = onigenc_get_prev_char_head(enc, start, prev)) != NULL) { + prev = pp; + cfrom2 = ONIGENC_MBC_TO_CODE(enc, prev, end); + from2 = wb_get_type(cfrom2); + if (! IS_WB_IGNORE_TAIL(from2)) + break; + } + + if (from2 == WB_Hebrew_Letter) return FALSE; + } + } + + if (to == WB_Numeric) { + /* WB8: Numeric + Numeric */ + if (from == WB_Numeric) return FALSE; + + /* WB9: AHLetter + Numeric */ + if (IS_WB_AHLetter(from)) return FALSE; + + /* WB11: Numeric (MidNum | MidNumLetQ) + Numeric */ + if (from == WB_MidNum || IS_WB_MidNumLetQ(from)) { + from2 = WB_Any; + while ((pp = onigenc_get_prev_char_head(enc, start, prev)) != NULL) { + prev = pp; + cfrom2 = ONIGENC_MBC_TO_CODE(enc, prev, end); + from2 = wb_get_type(cfrom2); + if (! IS_WB_IGNORE_TAIL(from2)) + break; + } + + if (from2 == WB_Numeric) return FALSE; + } + } + + if (from == WB_Numeric) { + /* WB10: Numeric + AHLetter */ + if (IS_WB_AHLetter(to)) return FALSE; + + /* WB12: Numeric + (MidNum | MidNumLetQ) Numeric */ + if (to == WB_MidNum || IS_WB_MidNumLetQ(to)) { + r = wb_get_next_main_code(enc, p, end, &cto2, &to2); + if (r == 1) { + if (to2 == WB_Numeric) return FALSE; + } + } + } + + /* WB13: Katakana + Katakana */ + if (from == WB_Katakana && to == WB_Katakana) return FALSE; + + /* WB13a: (AHLetter | Numeric | Katakana | ExtendNumLet) + ExtendNumLet */ + if (IS_WB_AHLetter(from) || from == WB_Numeric || from == WB_Katakana + || from == WB_ExtendNumLet) { + if (to == WB_ExtendNumLet) return FALSE; + } + + /* WB13b: ExtendNumLet + (AHLetter | Numeric | Katakana) */ + if (from == WB_ExtendNumLet) { + if (IS_WB_AHLetter(to) || to == WB_Numeric || to == WB_Katakana) + return FALSE; + } + + + /* WB15: sot (RI RI)* RI + RI */ + /* WB16: [^RI] (RI RI)* RI + RI */ + if (from == WB_Regional_Indicator && to == WB_Regional_Indicator) { + int n = 0; + while ((prev = onigenc_get_prev_char_head(enc, start, prev)) != NULL) { + cfrom2 = ONIGENC_MBC_TO_CODE(enc, prev, end); + from2 = wb_get_type(cfrom2); + if (from2 != WB_Regional_Indicator) + break; + + n++; + } + if ((n % 2) == 0) return FALSE; + } + + WB999: + /* WB999: Any / Any */ + return TRUE; +} + +#endif /* USE_UNICODE_WORD_BREAK */ + + +#ifdef USE_UNICODE_EXTENDED_GRAPHEME_CLUSTER + +enum EGCB_BREAK_TYPE { + EGCB_NOT_BREAK = 0, + EGCB_BREAK = 1, + EGCB_BREAK_UNDEF_GB11 = 2, + EGCB_BREAK_UNDEF_RI_RI = 3 +}; + +enum EGCB_TYPE { + EGCB_Other = 0, + EGCB_CR = 1, + EGCB_LF = 2, + EGCB_Control = 3, + EGCB_Extend = 4, + EGCB_Prepend = 5, + EGCB_Regional_Indicator = 6, + EGCB_SpacingMark = 7, + EGCB_ZWJ = 8, +#if 0 + /* obsoleted */ + EGCB_E_Base = 9, + EGCB_E_Base_GAZ = 10, + EGCB_E_Modifier = 11, + EGCB_Glue_After_Zwj = 12, +#endif + EGCB_L = 13, + EGCB_LV = 14, + EGCB_LVT = 15, + EGCB_T = 16, + EGCB_V = 17 +}; + +typedef struct { + OnigCodePoint start; + OnigCodePoint end; + enum EGCB_TYPE type; +} EGCB_RANGE_TYPE; + +#include "unicode_egcb_data.h" + +static enum EGCB_TYPE +egcb_get_type(OnigCodePoint code) +{ + OnigCodePoint low, high, x; + enum EGCB_TYPE type; + + for (low = 0, high = (OnigCodePoint )EGCB_RANGE_NUM; low < high; ) { + x = (low + high) >> 1; + if (code > EGCB_RANGES[x].end) + low = x + 1; + else + high = x; + } + + type = (low < (OnigCodePoint )EGCB_RANGE_NUM && + code >= EGCB_RANGES[low].start) ? + EGCB_RANGES[low].type : EGCB_Other; + + return type; +} + +#define IS_CONTROL_CR_LF(code) ((code) <= EGCB_Control && (code) >= EGCB_CR) +#define IS_HANGUL(code) ((code) >= EGCB_L) + +/* GB1 and GB2 are outside of this function. */ +static enum EGCB_BREAK_TYPE +unicode_egcb_is_break_2code(OnigCodePoint from_code, OnigCodePoint to_code) +{ + enum EGCB_TYPE from; + enum EGCB_TYPE to; + + from = egcb_get_type(from_code); + to = egcb_get_type(to_code); + + /* short cut */ + if (from == 0 && to == 0) goto GB999; + + /* GB3 */ + if (from == EGCB_CR && to == EGCB_LF) return EGCB_NOT_BREAK; + /* GB4 */ + if (IS_CONTROL_CR_LF(from)) return EGCB_BREAK; + /* GB5 */ + if (IS_CONTROL_CR_LF(to)) return EGCB_BREAK; + + if (IS_HANGUL(from) && IS_HANGUL(to)) { + /* GB6 */ + if (from == EGCB_L && to != EGCB_T) return EGCB_NOT_BREAK; + /* GB7 */ + if ((from == EGCB_LV || from == EGCB_V) + && (to == EGCB_V || to == EGCB_T)) return EGCB_NOT_BREAK; + + /* GB8 */ + if ((to == EGCB_T) && (from == EGCB_LVT || from == EGCB_T)) + return EGCB_NOT_BREAK; + + goto GB999; + } + + /* GB9 */ + if (to == EGCB_Extend || to == EGCB_ZWJ) return EGCB_NOT_BREAK; + + /* GB9a */ + if (to == EGCB_SpacingMark) return EGCB_NOT_BREAK; + /* GB9b */ + if (from == EGCB_Prepend) return EGCB_NOT_BREAK; + + /* GB10 removed */ + + /* GB11 */ + if (from == EGCB_ZWJ) { + if (onigenc_unicode_is_code_ctype(to_code, PROP_INDEX_EXTENDEDPICTOGRAPHIC)) + return EGCB_BREAK_UNDEF_GB11; + + goto GB999; + } + + /* GB12, GB13 */ + if (from == EGCB_Regional_Indicator && to == EGCB_Regional_Indicator) { + return EGCB_BREAK_UNDEF_RI_RI; + } + + GB999: + return EGCB_BREAK; +} + +#endif /* USE_UNICODE_EXTENDED_GRAPHEME_CLUSTER */ + +extern int +onigenc_egcb_is_break_position(OnigEncoding enc, UChar* p, UChar* prev, + const UChar* start, const UChar* end) +{ + OnigCodePoint from; + OnigCodePoint to; +#ifdef USE_UNICODE_EXTENDED_GRAPHEME_CLUSTER + enum EGCB_BREAK_TYPE btype; + enum EGCB_TYPE type; +#endif + + /* GB1 and GB2 */ + if (p == start) return 1; + if (p == end) return 1; + + if (IS_NULL(prev)) { + prev = onigenc_get_prev_char_head(enc, start, p); + if (IS_NULL(prev)) return 1; + } + + from = ONIGENC_MBC_TO_CODE(enc, prev, end); + to = ONIGENC_MBC_TO_CODE(enc, p, end); + +#ifdef USE_UNICODE_EXTENDED_GRAPHEME_CLUSTER + if (! ONIGENC_IS_UNICODE_ENCODING(enc)) { + return from != 0x000d || to != NEWLINE_CODE; + } + + btype = unicode_egcb_is_break_2code(from, to); + switch (btype) { + case EGCB_NOT_BREAK: + return 0; + break; + case EGCB_BREAK: + return 1; + break; + + case EGCB_BREAK_UNDEF_GB11: + while ((prev = onigenc_get_prev_char_head(enc, start, prev)) != NULL) { + from = ONIGENC_MBC_TO_CODE(enc, prev, end); + if (onigenc_unicode_is_code_ctype(from, PROP_INDEX_EXTENDEDPICTOGRAPHIC)) + return 0; + + type = egcb_get_type(from); + if (type != EGCB_Extend) + break; + } + break; + + case EGCB_BREAK_UNDEF_RI_RI: + { + int n = 0; + while ((prev = onigenc_get_prev_char_head(enc, start, prev)) != NULL) { + from = ONIGENC_MBC_TO_CODE(enc, prev, end); + type = egcb_get_type(from); + if (type != EGCB_Regional_Indicator) + break; + + n++; + } + if ((n % 2) == 0) return 0; + } + break; + } + + return 1; + +#else + return from != 0x000d || to != NEWLINE_CODE; +#endif /* USE_UNICODE_EXTENDED_GRAPHEME_CLUSTER */ +} + + +#define USER_DEFINED_PROPERTY_MAX_NUM 20 + +typedef struct { + int ctype; + OnigCodePoint* ranges; +} UserDefinedPropertyValue; + +static int UserDefinedPropertyNum; +static UserDefinedPropertyValue +UserDefinedPropertyRanges[USER_DEFINED_PROPERTY_MAX_NUM]; +static st_table* UserDefinedPropertyTable; + +extern int +onig_unicode_define_user_property(const char* name, OnigCodePoint* ranges) +{ + UserDefinedPropertyValue* e; + int r; + int i; + int n; + int len; + int c; + char* s; + UChar* uname; + + if (UserDefinedPropertyNum >= USER_DEFINED_PROPERTY_MAX_NUM) + return ONIGERR_TOO_MANY_USER_DEFINED_OBJECTS; + + len = (int )strlen(name); + if (len >= PROPERTY_NAME_MAX_SIZE) + return ONIGERR_TOO_LONG_PROPERTY_NAME; + + s = (char* )xmalloc(len + 1); + if (s == 0) + return ONIGERR_MEMORY; + + uname = (UChar* )name; + n = 0; + for (i = 0; i < len; i++) { + c = uname[i]; + if (c < 0x20 || c >= 0x80) { + xfree(s); + return ONIGERR_INVALID_CHAR_PROPERTY_NAME; + } + + if (c != ' ' && c != '-' && c != '_') { + s[n] = c; + n++; + } + } + s[n] = '\0'; + + if (UserDefinedPropertyTable == 0) { + UserDefinedPropertyTable = onig_st_init_strend_table_with_size(10); + if (IS_NULL(UserDefinedPropertyTable)) { + xfree(s); + return ONIGERR_MEMORY; + } + } + + e = UserDefinedPropertyRanges + UserDefinedPropertyNum; + e->ctype = CODE_RANGES_NUM + UserDefinedPropertyNum; + e->ranges = ranges; + r = onig_st_insert_strend(UserDefinedPropertyTable, + (const UChar* )s, (const UChar* )s + n, + (hash_data_type )((void* )e)); + if (r < 0) return r; + + UserDefinedPropertyNum++; + return 0; +} + +extern int +onigenc_unicode_is_code_ctype(OnigCodePoint code, unsigned int ctype) +{ + if ( +#ifdef USE_UNICODE_PROPERTIES + ctype <= ONIGENC_MAX_STD_CTYPE && +#endif + code < 256) { + return ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(code, ctype); + } + + if (ctype >= CODE_RANGES_NUM) { + int index = ctype - CODE_RANGES_NUM; + if (index < UserDefinedPropertyNum) + return onig_is_in_code_range((UChar* )UserDefinedPropertyRanges[index].ranges, code); + else + return ONIGERR_TYPE_BUG; + } + + return onig_is_in_code_range((UChar* )CodeRanges[ctype], code); +} + + +extern int +onigenc_unicode_ctype_code_range(OnigCtype ctype, const OnigCodePoint* ranges[]) +{ + if (ctype >= CODE_RANGES_NUM) { + int index = ctype - CODE_RANGES_NUM; + if (index < UserDefinedPropertyNum) { + *ranges = UserDefinedPropertyRanges[index].ranges; + return 0; + } + else + return ONIGERR_TYPE_BUG; + } + + *ranges = CodeRanges[ctype]; + return 0; +} + +extern int +onigenc_utf16_32_get_ctype_code_range(OnigCtype ctype, OnigCodePoint* sb_out, + const OnigCodePoint* ranges[]) +{ + *sb_out = 0x00; + return onigenc_unicode_ctype_code_range(ctype, ranges); +} + +extern int +onigenc_unicode_property_name_to_ctype(OnigEncoding enc, UChar* name, UChar* end) +{ + int len; + UChar *p; + OnigCodePoint code; + const struct PoolPropertyNameCtype* pc; + char buf[PROPERTY_NAME_MAX_SIZE]; + + p = name; + len = 0; + while (p < end) { + code = ONIGENC_MBC_TO_CODE(enc, p, end); + if (code >= 0x80) + return ONIGERR_INVALID_CHAR_PROPERTY_NAME; + + if (code != ' ' && code != '-' && code != '_') { + buf[len++] = (char )code; + if (len >= PROPERTY_NAME_MAX_SIZE) + return ONIGERR_INVALID_CHAR_PROPERTY_NAME; + } + + p += enclen(enc, p); + } + + buf[len] = 0; + + if (UserDefinedPropertyTable != 0) { + UserDefinedPropertyValue* e; + e = (UserDefinedPropertyValue* )NULL; + onig_st_lookup_strend(UserDefinedPropertyTable, + (const UChar* )buf, (const UChar* )buf + len, + (hash_data_type* )((void* )(&e))); + if (e != 0) { + return e->ctype; + } + } + + pc = unicode_lookup_property_name(buf, len); + if (pc != 0) { + /* fprintf(stderr, "LOOKUP: %s: %d\n", buf, pc->ctype); */ +#ifndef USE_UNICODE_PROPERTIES + if (pc->ctype > ONIGENC_MAX_STD_CTYPE) + return ONIGERR_INVALID_CHAR_PROPERTY_NAME; +#endif + + return (int )pc->ctype; + } + + return ONIGERR_INVALID_CHAR_PROPERTY_NAME; +} diff --git a/internal/components/third_party/oniguruma/src/unicode_egcb_data.h b/internal/components/third_party/oniguruma/src/unicode_egcb_data.h new file mode 100644 index 0000000000..ca0ab4534f --- /dev/null +++ b/internal/components/third_party/oniguruma/src/unicode_egcb_data.h @@ -0,0 +1,1424 @@ +/* unicode_egcb_data.c: Generated by make_unicode_egcb_data.py. */ +/*- + * Copyright (c) 2017-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#define GRAPHEME_BREAK_PROPERTY_VERSION 160000 + +/* +CR +Control +Extend +L +LF +LV +LVT +Prepend +Regional_Indicator +SpacingMark +T +V +ZWJ +*/ + +static int EGCB_RANGE_NUM = 1376; +static EGCB_RANGE_TYPE EGCB_RANGES[] = { + {0x000000, 0x000009, EGCB_Control }, + {0x00000a, 0x00000a, EGCB_LF }, + {0x00000b, 0x00000c, EGCB_Control }, + {0x00000d, 0x00000d, EGCB_CR }, + {0x00000e, 0x00001f, EGCB_Control }, + {0x00007f, 0x00009f, EGCB_Control }, + {0x0000ad, 0x0000ad, EGCB_Control }, + {0x000300, 0x00036f, EGCB_Extend }, + {0x000483, 0x000489, EGCB_Extend }, + {0x000591, 0x0005bd, EGCB_Extend }, + {0x0005bf, 0x0005bf, EGCB_Extend }, + {0x0005c1, 0x0005c2, EGCB_Extend }, + {0x0005c4, 0x0005c5, EGCB_Extend }, + {0x0005c7, 0x0005c7, EGCB_Extend }, + {0x000600, 0x000605, EGCB_Prepend }, + {0x000610, 0x00061a, EGCB_Extend }, + {0x00061c, 0x00061c, EGCB_Control }, + {0x00064b, 0x00065f, EGCB_Extend }, + {0x000670, 0x000670, EGCB_Extend }, + {0x0006d6, 0x0006dc, EGCB_Extend }, + {0x0006dd, 0x0006dd, EGCB_Prepend }, + {0x0006df, 0x0006e4, EGCB_Extend }, + {0x0006e7, 0x0006e8, EGCB_Extend }, + {0x0006ea, 0x0006ed, EGCB_Extend }, + {0x00070f, 0x00070f, EGCB_Prepend }, + {0x000711, 0x000711, EGCB_Extend }, + {0x000730, 0x00074a, EGCB_Extend }, + {0x0007a6, 0x0007b0, EGCB_Extend }, + {0x0007eb, 0x0007f3, EGCB_Extend }, + {0x0007fd, 0x0007fd, EGCB_Extend }, + {0x000816, 0x000819, EGCB_Extend }, + {0x00081b, 0x000823, EGCB_Extend }, + {0x000825, 0x000827, EGCB_Extend }, + {0x000829, 0x00082d, EGCB_Extend }, + {0x000859, 0x00085b, EGCB_Extend }, + {0x000890, 0x000891, EGCB_Prepend }, + {0x000897, 0x00089f, EGCB_Extend }, + {0x0008ca, 0x0008e1, EGCB_Extend }, + {0x0008e2, 0x0008e2, EGCB_Prepend }, + {0x0008e3, 0x000902, EGCB_Extend }, + {0x000903, 0x000903, EGCB_SpacingMark }, + {0x00093a, 0x00093a, EGCB_Extend }, + {0x00093b, 0x00093b, EGCB_SpacingMark }, + {0x00093c, 0x00093c, EGCB_Extend }, + {0x00093e, 0x000940, EGCB_SpacingMark }, + {0x000941, 0x000948, EGCB_Extend }, + {0x000949, 0x00094c, EGCB_SpacingMark }, + {0x00094d, 0x00094d, EGCB_Extend }, + {0x00094e, 0x00094f, EGCB_SpacingMark }, + {0x000951, 0x000957, EGCB_Extend }, + {0x000962, 0x000963, EGCB_Extend }, + {0x000981, 0x000981, EGCB_Extend }, + {0x000982, 0x000983, EGCB_SpacingMark }, + {0x0009bc, 0x0009bc, EGCB_Extend }, + {0x0009be, 0x0009be, EGCB_Extend }, + {0x0009bf, 0x0009c0, EGCB_SpacingMark }, + {0x0009c1, 0x0009c4, EGCB_Extend }, + {0x0009c7, 0x0009c8, EGCB_SpacingMark }, + {0x0009cb, 0x0009cc, EGCB_SpacingMark }, + {0x0009cd, 0x0009cd, EGCB_Extend }, + {0x0009d7, 0x0009d7, EGCB_Extend }, + {0x0009e2, 0x0009e3, EGCB_Extend }, + {0x0009fe, 0x0009fe, EGCB_Extend }, + {0x000a01, 0x000a02, EGCB_Extend }, + {0x000a03, 0x000a03, EGCB_SpacingMark }, + {0x000a3c, 0x000a3c, EGCB_Extend }, + {0x000a3e, 0x000a40, EGCB_SpacingMark }, + {0x000a41, 0x000a42, EGCB_Extend }, + {0x000a47, 0x000a48, EGCB_Extend }, + {0x000a4b, 0x000a4d, EGCB_Extend }, + {0x000a51, 0x000a51, EGCB_Extend }, + {0x000a70, 0x000a71, EGCB_Extend }, + {0x000a75, 0x000a75, EGCB_Extend }, + {0x000a81, 0x000a82, EGCB_Extend }, + {0x000a83, 0x000a83, EGCB_SpacingMark }, + {0x000abc, 0x000abc, EGCB_Extend }, + {0x000abe, 0x000ac0, EGCB_SpacingMark }, + {0x000ac1, 0x000ac5, EGCB_Extend }, + {0x000ac7, 0x000ac8, EGCB_Extend }, + {0x000ac9, 0x000ac9, EGCB_SpacingMark }, + {0x000acb, 0x000acc, EGCB_SpacingMark }, + {0x000acd, 0x000acd, EGCB_Extend }, + {0x000ae2, 0x000ae3, EGCB_Extend }, + {0x000afa, 0x000aff, EGCB_Extend }, + {0x000b01, 0x000b01, EGCB_Extend }, + {0x000b02, 0x000b03, EGCB_SpacingMark }, + {0x000b3c, 0x000b3c, EGCB_Extend }, + {0x000b3e, 0x000b3f, EGCB_Extend }, + {0x000b40, 0x000b40, EGCB_SpacingMark }, + {0x000b41, 0x000b44, EGCB_Extend }, + {0x000b47, 0x000b48, EGCB_SpacingMark }, + {0x000b4b, 0x000b4c, EGCB_SpacingMark }, + {0x000b4d, 0x000b4d, EGCB_Extend }, + {0x000b55, 0x000b57, EGCB_Extend }, + {0x000b62, 0x000b63, EGCB_Extend }, + {0x000b82, 0x000b82, EGCB_Extend }, + {0x000bbe, 0x000bbe, EGCB_Extend }, + {0x000bbf, 0x000bbf, EGCB_SpacingMark }, + {0x000bc0, 0x000bc0, EGCB_Extend }, + {0x000bc1, 0x000bc2, EGCB_SpacingMark }, + {0x000bc6, 0x000bc8, EGCB_SpacingMark }, + {0x000bca, 0x000bcc, EGCB_SpacingMark }, + {0x000bcd, 0x000bcd, EGCB_Extend }, + {0x000bd7, 0x000bd7, EGCB_Extend }, + {0x000c00, 0x000c00, EGCB_Extend }, + {0x000c01, 0x000c03, EGCB_SpacingMark }, + {0x000c04, 0x000c04, EGCB_Extend }, + {0x000c3c, 0x000c3c, EGCB_Extend }, + {0x000c3e, 0x000c40, EGCB_Extend }, + {0x000c41, 0x000c44, EGCB_SpacingMark }, + {0x000c46, 0x000c48, EGCB_Extend }, + {0x000c4a, 0x000c4d, EGCB_Extend }, + {0x000c55, 0x000c56, EGCB_Extend }, + {0x000c62, 0x000c63, EGCB_Extend }, + {0x000c81, 0x000c81, EGCB_Extend }, + {0x000c82, 0x000c83, EGCB_SpacingMark }, + {0x000cbc, 0x000cbc, EGCB_Extend }, + {0x000cbe, 0x000cbe, EGCB_SpacingMark }, + {0x000cbf, 0x000cc0, EGCB_Extend }, + {0x000cc1, 0x000cc1, EGCB_SpacingMark }, + {0x000cc2, 0x000cc2, EGCB_Extend }, + {0x000cc3, 0x000cc4, EGCB_SpacingMark }, + {0x000cc6, 0x000cc8, EGCB_Extend }, + {0x000cca, 0x000ccd, EGCB_Extend }, + {0x000cd5, 0x000cd6, EGCB_Extend }, + {0x000ce2, 0x000ce3, EGCB_Extend }, + {0x000cf3, 0x000cf3, EGCB_SpacingMark }, + {0x000d00, 0x000d01, EGCB_Extend }, + {0x000d02, 0x000d03, EGCB_SpacingMark }, + {0x000d3b, 0x000d3c, EGCB_Extend }, + {0x000d3e, 0x000d3e, EGCB_Extend }, + {0x000d3f, 0x000d40, EGCB_SpacingMark }, + {0x000d41, 0x000d44, EGCB_Extend }, + {0x000d46, 0x000d48, EGCB_SpacingMark }, + {0x000d4a, 0x000d4c, EGCB_SpacingMark }, + {0x000d4d, 0x000d4d, EGCB_Extend }, + {0x000d4e, 0x000d4e, EGCB_Prepend }, + {0x000d57, 0x000d57, EGCB_Extend }, + {0x000d62, 0x000d63, EGCB_Extend }, + {0x000d81, 0x000d81, EGCB_Extend }, + {0x000d82, 0x000d83, EGCB_SpacingMark }, + {0x000dca, 0x000dca, EGCB_Extend }, + {0x000dcf, 0x000dcf, EGCB_Extend }, + {0x000dd0, 0x000dd1, EGCB_SpacingMark }, + {0x000dd2, 0x000dd4, EGCB_Extend }, + {0x000dd6, 0x000dd6, EGCB_Extend }, + {0x000dd8, 0x000dde, EGCB_SpacingMark }, + {0x000ddf, 0x000ddf, EGCB_Extend }, + {0x000df2, 0x000df3, EGCB_SpacingMark }, + {0x000e31, 0x000e31, EGCB_Extend }, + {0x000e33, 0x000e33, EGCB_SpacingMark }, + {0x000e34, 0x000e3a, EGCB_Extend }, + {0x000e47, 0x000e4e, EGCB_Extend }, + {0x000eb1, 0x000eb1, EGCB_Extend }, + {0x000eb3, 0x000eb3, EGCB_SpacingMark }, + {0x000eb4, 0x000ebc, EGCB_Extend }, + {0x000ec8, 0x000ece, EGCB_Extend }, + {0x000f18, 0x000f19, EGCB_Extend }, + {0x000f35, 0x000f35, EGCB_Extend }, + {0x000f37, 0x000f37, EGCB_Extend }, + {0x000f39, 0x000f39, EGCB_Extend }, + {0x000f3e, 0x000f3f, EGCB_SpacingMark }, + {0x000f71, 0x000f7e, EGCB_Extend }, + {0x000f7f, 0x000f7f, EGCB_SpacingMark }, + {0x000f80, 0x000f84, EGCB_Extend }, + {0x000f86, 0x000f87, EGCB_Extend }, + {0x000f8d, 0x000f97, EGCB_Extend }, + {0x000f99, 0x000fbc, EGCB_Extend }, + {0x000fc6, 0x000fc6, EGCB_Extend }, + {0x00102d, 0x001030, EGCB_Extend }, + {0x001031, 0x001031, EGCB_SpacingMark }, + {0x001032, 0x001037, EGCB_Extend }, + {0x001039, 0x00103a, EGCB_Extend }, + {0x00103b, 0x00103c, EGCB_SpacingMark }, + {0x00103d, 0x00103e, EGCB_Extend }, + {0x001056, 0x001057, EGCB_SpacingMark }, + {0x001058, 0x001059, EGCB_Extend }, + {0x00105e, 0x001060, EGCB_Extend }, + {0x001071, 0x001074, EGCB_Extend }, + {0x001082, 0x001082, EGCB_Extend }, + {0x001084, 0x001084, EGCB_SpacingMark }, + {0x001085, 0x001086, EGCB_Extend }, + {0x00108d, 0x00108d, EGCB_Extend }, + {0x00109d, 0x00109d, EGCB_Extend }, + {0x001100, 0x00115f, EGCB_L }, + {0x001160, 0x0011a7, EGCB_V }, + {0x0011a8, 0x0011ff, EGCB_T }, + {0x00135d, 0x00135f, EGCB_Extend }, + {0x001712, 0x001715, EGCB_Extend }, + {0x001732, 0x001734, EGCB_Extend }, + {0x001752, 0x001753, EGCB_Extend }, + {0x001772, 0x001773, EGCB_Extend }, + {0x0017b4, 0x0017b5, EGCB_Extend }, + {0x0017b6, 0x0017b6, EGCB_SpacingMark }, + {0x0017b7, 0x0017bd, EGCB_Extend }, + {0x0017be, 0x0017c5, EGCB_SpacingMark }, + {0x0017c6, 0x0017c6, EGCB_Extend }, + {0x0017c7, 0x0017c8, EGCB_SpacingMark }, + {0x0017c9, 0x0017d3, EGCB_Extend }, + {0x0017dd, 0x0017dd, EGCB_Extend }, + {0x00180b, 0x00180d, EGCB_Extend }, + {0x00180e, 0x00180e, EGCB_Control }, + {0x00180f, 0x00180f, EGCB_Extend }, + {0x001885, 0x001886, EGCB_Extend }, + {0x0018a9, 0x0018a9, EGCB_Extend }, + {0x001920, 0x001922, EGCB_Extend }, + {0x001923, 0x001926, EGCB_SpacingMark }, + {0x001927, 0x001928, EGCB_Extend }, + {0x001929, 0x00192b, EGCB_SpacingMark }, + {0x001930, 0x001931, EGCB_SpacingMark }, + {0x001932, 0x001932, EGCB_Extend }, + {0x001933, 0x001938, EGCB_SpacingMark }, + {0x001939, 0x00193b, EGCB_Extend }, + {0x001a17, 0x001a18, EGCB_Extend }, + {0x001a19, 0x001a1a, EGCB_SpacingMark }, + {0x001a1b, 0x001a1b, EGCB_Extend }, + {0x001a55, 0x001a55, EGCB_SpacingMark }, + {0x001a56, 0x001a56, EGCB_Extend }, + {0x001a57, 0x001a57, EGCB_SpacingMark }, + {0x001a58, 0x001a5e, EGCB_Extend }, + {0x001a60, 0x001a60, EGCB_Extend }, + {0x001a62, 0x001a62, EGCB_Extend }, + {0x001a65, 0x001a6c, EGCB_Extend }, + {0x001a6d, 0x001a72, EGCB_SpacingMark }, + {0x001a73, 0x001a7c, EGCB_Extend }, + {0x001a7f, 0x001a7f, EGCB_Extend }, + {0x001ab0, 0x001ace, EGCB_Extend }, + {0x001b00, 0x001b03, EGCB_Extend }, + {0x001b04, 0x001b04, EGCB_SpacingMark }, + {0x001b34, 0x001b3d, EGCB_Extend }, + {0x001b3e, 0x001b41, EGCB_SpacingMark }, + {0x001b42, 0x001b44, EGCB_Extend }, + {0x001b6b, 0x001b73, EGCB_Extend }, + {0x001b80, 0x001b81, EGCB_Extend }, + {0x001b82, 0x001b82, EGCB_SpacingMark }, + {0x001ba1, 0x001ba1, EGCB_SpacingMark }, + {0x001ba2, 0x001ba5, EGCB_Extend }, + {0x001ba6, 0x001ba7, EGCB_SpacingMark }, + {0x001ba8, 0x001bad, EGCB_Extend }, + {0x001be6, 0x001be6, EGCB_Extend }, + {0x001be7, 0x001be7, EGCB_SpacingMark }, + {0x001be8, 0x001be9, EGCB_Extend }, + {0x001bea, 0x001bec, EGCB_SpacingMark }, + {0x001bed, 0x001bed, EGCB_Extend }, + {0x001bee, 0x001bee, EGCB_SpacingMark }, + {0x001bef, 0x001bf3, EGCB_Extend }, + {0x001c24, 0x001c2b, EGCB_SpacingMark }, + {0x001c2c, 0x001c33, EGCB_Extend }, + {0x001c34, 0x001c35, EGCB_SpacingMark }, + {0x001c36, 0x001c37, EGCB_Extend }, + {0x001cd0, 0x001cd2, EGCB_Extend }, + {0x001cd4, 0x001ce0, EGCB_Extend }, + {0x001ce1, 0x001ce1, EGCB_SpacingMark }, + {0x001ce2, 0x001ce8, EGCB_Extend }, + {0x001ced, 0x001ced, EGCB_Extend }, + {0x001cf4, 0x001cf4, EGCB_Extend }, + {0x001cf7, 0x001cf7, EGCB_SpacingMark }, + {0x001cf8, 0x001cf9, EGCB_Extend }, + {0x001dc0, 0x001dff, EGCB_Extend }, + {0x00200b, 0x00200b, EGCB_Control }, + {0x00200c, 0x00200c, EGCB_Extend }, + {0x00200d, 0x00200d, EGCB_ZWJ }, + {0x00200e, 0x00200f, EGCB_Control }, + {0x002028, 0x00202e, EGCB_Control }, + {0x002060, 0x00206f, EGCB_Control }, + {0x0020d0, 0x0020f0, EGCB_Extend }, + {0x002cef, 0x002cf1, EGCB_Extend }, + {0x002d7f, 0x002d7f, EGCB_Extend }, + {0x002de0, 0x002dff, EGCB_Extend }, + {0x00302a, 0x00302f, EGCB_Extend }, + {0x003099, 0x00309a, EGCB_Extend }, + {0x00a66f, 0x00a672, EGCB_Extend }, + {0x00a674, 0x00a67d, EGCB_Extend }, + {0x00a69e, 0x00a69f, EGCB_Extend }, + {0x00a6f0, 0x00a6f1, EGCB_Extend }, + {0x00a802, 0x00a802, EGCB_Extend }, + {0x00a806, 0x00a806, EGCB_Extend }, + {0x00a80b, 0x00a80b, EGCB_Extend }, + {0x00a823, 0x00a824, EGCB_SpacingMark }, + {0x00a825, 0x00a826, EGCB_Extend }, + {0x00a827, 0x00a827, EGCB_SpacingMark }, + {0x00a82c, 0x00a82c, EGCB_Extend }, + {0x00a880, 0x00a881, EGCB_SpacingMark }, + {0x00a8b4, 0x00a8c3, EGCB_SpacingMark }, + {0x00a8c4, 0x00a8c5, EGCB_Extend }, + {0x00a8e0, 0x00a8f1, EGCB_Extend }, + {0x00a8ff, 0x00a8ff, EGCB_Extend }, + {0x00a926, 0x00a92d, EGCB_Extend }, + {0x00a947, 0x00a951, EGCB_Extend }, + {0x00a952, 0x00a952, EGCB_SpacingMark }, + {0x00a953, 0x00a953, EGCB_Extend }, + {0x00a960, 0x00a97c, EGCB_L }, + {0x00a980, 0x00a982, EGCB_Extend }, + {0x00a983, 0x00a983, EGCB_SpacingMark }, + {0x00a9b3, 0x00a9b3, EGCB_Extend }, + {0x00a9b4, 0x00a9b5, EGCB_SpacingMark }, + {0x00a9b6, 0x00a9b9, EGCB_Extend }, + {0x00a9ba, 0x00a9bb, EGCB_SpacingMark }, + {0x00a9bc, 0x00a9bd, EGCB_Extend }, + {0x00a9be, 0x00a9bf, EGCB_SpacingMark }, + {0x00a9c0, 0x00a9c0, EGCB_Extend }, + {0x00a9e5, 0x00a9e5, EGCB_Extend }, + {0x00aa29, 0x00aa2e, EGCB_Extend }, + {0x00aa2f, 0x00aa30, EGCB_SpacingMark }, + {0x00aa31, 0x00aa32, EGCB_Extend }, + {0x00aa33, 0x00aa34, EGCB_SpacingMark }, + {0x00aa35, 0x00aa36, EGCB_Extend }, + {0x00aa43, 0x00aa43, EGCB_Extend }, + {0x00aa4c, 0x00aa4c, EGCB_Extend }, + {0x00aa4d, 0x00aa4d, EGCB_SpacingMark }, + {0x00aa7c, 0x00aa7c, EGCB_Extend }, + {0x00aab0, 0x00aab0, EGCB_Extend }, + {0x00aab2, 0x00aab4, EGCB_Extend }, + {0x00aab7, 0x00aab8, EGCB_Extend }, + {0x00aabe, 0x00aabf, EGCB_Extend }, + {0x00aac1, 0x00aac1, EGCB_Extend }, + {0x00aaeb, 0x00aaeb, EGCB_SpacingMark }, + {0x00aaec, 0x00aaed, EGCB_Extend }, + {0x00aaee, 0x00aaef, EGCB_SpacingMark }, + {0x00aaf5, 0x00aaf5, EGCB_SpacingMark }, + {0x00aaf6, 0x00aaf6, EGCB_Extend }, + {0x00abe3, 0x00abe4, EGCB_SpacingMark }, + {0x00abe5, 0x00abe5, EGCB_Extend }, + {0x00abe6, 0x00abe7, EGCB_SpacingMark }, + {0x00abe8, 0x00abe8, EGCB_Extend }, + {0x00abe9, 0x00abea, EGCB_SpacingMark }, + {0x00abec, 0x00abec, EGCB_SpacingMark }, + {0x00abed, 0x00abed, EGCB_Extend }, + {0x00ac00, 0x00ac00, EGCB_LV }, + {0x00ac01, 0x00ac1b, EGCB_LVT }, + {0x00ac1c, 0x00ac1c, EGCB_LV }, + {0x00ac1d, 0x00ac37, EGCB_LVT }, + {0x00ac38, 0x00ac38, EGCB_LV }, + {0x00ac39, 0x00ac53, EGCB_LVT }, + {0x00ac54, 0x00ac54, EGCB_LV }, + {0x00ac55, 0x00ac6f, EGCB_LVT }, + {0x00ac70, 0x00ac70, EGCB_LV }, + {0x00ac71, 0x00ac8b, EGCB_LVT }, + {0x00ac8c, 0x00ac8c, EGCB_LV }, + {0x00ac8d, 0x00aca7, EGCB_LVT }, + {0x00aca8, 0x00aca8, EGCB_LV }, + {0x00aca9, 0x00acc3, EGCB_LVT }, + {0x00acc4, 0x00acc4, EGCB_LV }, + {0x00acc5, 0x00acdf, EGCB_LVT }, + {0x00ace0, 0x00ace0, EGCB_LV }, + {0x00ace1, 0x00acfb, EGCB_LVT }, + {0x00acfc, 0x00acfc, EGCB_LV }, + {0x00acfd, 0x00ad17, EGCB_LVT }, + {0x00ad18, 0x00ad18, EGCB_LV }, + {0x00ad19, 0x00ad33, EGCB_LVT }, + {0x00ad34, 0x00ad34, EGCB_LV }, + {0x00ad35, 0x00ad4f, EGCB_LVT }, + {0x00ad50, 0x00ad50, EGCB_LV }, + {0x00ad51, 0x00ad6b, EGCB_LVT }, + {0x00ad6c, 0x00ad6c, EGCB_LV }, + {0x00ad6d, 0x00ad87, EGCB_LVT }, + {0x00ad88, 0x00ad88, EGCB_LV }, + {0x00ad89, 0x00ada3, EGCB_LVT }, + {0x00ada4, 0x00ada4, EGCB_LV }, + {0x00ada5, 0x00adbf, EGCB_LVT }, + {0x00adc0, 0x00adc0, EGCB_LV }, + {0x00adc1, 0x00addb, EGCB_LVT }, + {0x00addc, 0x00addc, EGCB_LV }, + {0x00addd, 0x00adf7, EGCB_LVT }, + {0x00adf8, 0x00adf8, EGCB_LV }, + {0x00adf9, 0x00ae13, EGCB_LVT }, + {0x00ae14, 0x00ae14, EGCB_LV }, + {0x00ae15, 0x00ae2f, EGCB_LVT }, + {0x00ae30, 0x00ae30, EGCB_LV }, + {0x00ae31, 0x00ae4b, EGCB_LVT }, + {0x00ae4c, 0x00ae4c, EGCB_LV }, + {0x00ae4d, 0x00ae67, EGCB_LVT }, + {0x00ae68, 0x00ae68, EGCB_LV }, + {0x00ae69, 0x00ae83, EGCB_LVT }, + {0x00ae84, 0x00ae84, EGCB_LV }, + {0x00ae85, 0x00ae9f, EGCB_LVT }, + {0x00aea0, 0x00aea0, EGCB_LV }, + {0x00aea1, 0x00aebb, EGCB_LVT }, + {0x00aebc, 0x00aebc, EGCB_LV }, + {0x00aebd, 0x00aed7, EGCB_LVT }, + {0x00aed8, 0x00aed8, EGCB_LV }, + {0x00aed9, 0x00aef3, EGCB_LVT }, + {0x00aef4, 0x00aef4, EGCB_LV }, + {0x00aef5, 0x00af0f, EGCB_LVT }, + {0x00af10, 0x00af10, EGCB_LV }, + {0x00af11, 0x00af2b, EGCB_LVT }, + {0x00af2c, 0x00af2c, EGCB_LV }, + {0x00af2d, 0x00af47, EGCB_LVT }, + {0x00af48, 0x00af48, EGCB_LV }, + {0x00af49, 0x00af63, EGCB_LVT }, + {0x00af64, 0x00af64, EGCB_LV }, + {0x00af65, 0x00af7f, EGCB_LVT }, + {0x00af80, 0x00af80, EGCB_LV }, + {0x00af81, 0x00af9b, EGCB_LVT }, + {0x00af9c, 0x00af9c, EGCB_LV }, + {0x00af9d, 0x00afb7, EGCB_LVT }, + {0x00afb8, 0x00afb8, EGCB_LV }, + {0x00afb9, 0x00afd3, EGCB_LVT }, + {0x00afd4, 0x00afd4, EGCB_LV }, + {0x00afd5, 0x00afef, EGCB_LVT }, + {0x00aff0, 0x00aff0, EGCB_LV }, + {0x00aff1, 0x00b00b, EGCB_LVT }, + {0x00b00c, 0x00b00c, EGCB_LV }, + {0x00b00d, 0x00b027, EGCB_LVT }, + {0x00b028, 0x00b028, EGCB_LV }, + {0x00b029, 0x00b043, EGCB_LVT }, + {0x00b044, 0x00b044, EGCB_LV }, + {0x00b045, 0x00b05f, EGCB_LVT }, + {0x00b060, 0x00b060, EGCB_LV }, + {0x00b061, 0x00b07b, EGCB_LVT }, + {0x00b07c, 0x00b07c, EGCB_LV }, + {0x00b07d, 0x00b097, EGCB_LVT }, + {0x00b098, 0x00b098, EGCB_LV }, + {0x00b099, 0x00b0b3, EGCB_LVT }, + {0x00b0b4, 0x00b0b4, EGCB_LV }, + {0x00b0b5, 0x00b0cf, EGCB_LVT }, + {0x00b0d0, 0x00b0d0, EGCB_LV }, + {0x00b0d1, 0x00b0eb, EGCB_LVT }, + {0x00b0ec, 0x00b0ec, EGCB_LV }, + {0x00b0ed, 0x00b107, EGCB_LVT }, + {0x00b108, 0x00b108, EGCB_LV }, + {0x00b109, 0x00b123, EGCB_LVT }, + {0x00b124, 0x00b124, EGCB_LV }, + {0x00b125, 0x00b13f, EGCB_LVT }, + {0x00b140, 0x00b140, EGCB_LV }, + {0x00b141, 0x00b15b, EGCB_LVT }, + {0x00b15c, 0x00b15c, EGCB_LV }, + {0x00b15d, 0x00b177, EGCB_LVT }, + {0x00b178, 0x00b178, EGCB_LV }, + {0x00b179, 0x00b193, EGCB_LVT }, + {0x00b194, 0x00b194, EGCB_LV }, + {0x00b195, 0x00b1af, EGCB_LVT }, + {0x00b1b0, 0x00b1b0, EGCB_LV }, + {0x00b1b1, 0x00b1cb, EGCB_LVT }, + {0x00b1cc, 0x00b1cc, EGCB_LV }, + {0x00b1cd, 0x00b1e7, EGCB_LVT }, + {0x00b1e8, 0x00b1e8, EGCB_LV }, + {0x00b1e9, 0x00b203, EGCB_LVT }, + {0x00b204, 0x00b204, EGCB_LV }, + {0x00b205, 0x00b21f, EGCB_LVT }, + {0x00b220, 0x00b220, EGCB_LV }, + {0x00b221, 0x00b23b, EGCB_LVT }, + {0x00b23c, 0x00b23c, EGCB_LV }, + {0x00b23d, 0x00b257, EGCB_LVT }, + {0x00b258, 0x00b258, EGCB_LV }, + {0x00b259, 0x00b273, EGCB_LVT }, + {0x00b274, 0x00b274, EGCB_LV }, + {0x00b275, 0x00b28f, EGCB_LVT }, + {0x00b290, 0x00b290, EGCB_LV }, + {0x00b291, 0x00b2ab, EGCB_LVT }, + {0x00b2ac, 0x00b2ac, EGCB_LV }, + {0x00b2ad, 0x00b2c7, EGCB_LVT }, + {0x00b2c8, 0x00b2c8, EGCB_LV }, + {0x00b2c9, 0x00b2e3, EGCB_LVT }, + {0x00b2e4, 0x00b2e4, EGCB_LV }, + {0x00b2e5, 0x00b2ff, EGCB_LVT }, + {0x00b300, 0x00b300, EGCB_LV }, + {0x00b301, 0x00b31b, EGCB_LVT }, + {0x00b31c, 0x00b31c, EGCB_LV }, + {0x00b31d, 0x00b337, EGCB_LVT }, + {0x00b338, 0x00b338, EGCB_LV }, + {0x00b339, 0x00b353, EGCB_LVT }, + {0x00b354, 0x00b354, EGCB_LV }, + {0x00b355, 0x00b36f, EGCB_LVT }, + {0x00b370, 0x00b370, EGCB_LV }, + {0x00b371, 0x00b38b, EGCB_LVT }, + {0x00b38c, 0x00b38c, EGCB_LV }, + {0x00b38d, 0x00b3a7, EGCB_LVT }, + {0x00b3a8, 0x00b3a8, EGCB_LV }, + {0x00b3a9, 0x00b3c3, EGCB_LVT }, + {0x00b3c4, 0x00b3c4, EGCB_LV }, + {0x00b3c5, 0x00b3df, EGCB_LVT }, + {0x00b3e0, 0x00b3e0, EGCB_LV }, + {0x00b3e1, 0x00b3fb, EGCB_LVT }, + {0x00b3fc, 0x00b3fc, EGCB_LV }, + {0x00b3fd, 0x00b417, EGCB_LVT }, + {0x00b418, 0x00b418, EGCB_LV }, + {0x00b419, 0x00b433, EGCB_LVT }, + {0x00b434, 0x00b434, EGCB_LV }, + {0x00b435, 0x00b44f, EGCB_LVT }, + {0x00b450, 0x00b450, EGCB_LV }, + {0x00b451, 0x00b46b, EGCB_LVT }, + {0x00b46c, 0x00b46c, EGCB_LV }, + {0x00b46d, 0x00b487, EGCB_LVT }, + {0x00b488, 0x00b488, EGCB_LV }, + {0x00b489, 0x00b4a3, EGCB_LVT }, + {0x00b4a4, 0x00b4a4, EGCB_LV }, + {0x00b4a5, 0x00b4bf, EGCB_LVT }, + {0x00b4c0, 0x00b4c0, EGCB_LV }, + {0x00b4c1, 0x00b4db, EGCB_LVT }, + {0x00b4dc, 0x00b4dc, EGCB_LV }, + {0x00b4dd, 0x00b4f7, EGCB_LVT }, + {0x00b4f8, 0x00b4f8, EGCB_LV }, + {0x00b4f9, 0x00b513, EGCB_LVT }, + {0x00b514, 0x00b514, EGCB_LV }, + {0x00b515, 0x00b52f, EGCB_LVT }, + {0x00b530, 0x00b530, EGCB_LV }, + {0x00b531, 0x00b54b, EGCB_LVT }, + {0x00b54c, 0x00b54c, EGCB_LV }, + {0x00b54d, 0x00b567, EGCB_LVT }, + {0x00b568, 0x00b568, EGCB_LV }, + {0x00b569, 0x00b583, EGCB_LVT }, + {0x00b584, 0x00b584, EGCB_LV }, + {0x00b585, 0x00b59f, EGCB_LVT }, + {0x00b5a0, 0x00b5a0, EGCB_LV }, + {0x00b5a1, 0x00b5bb, EGCB_LVT }, + {0x00b5bc, 0x00b5bc, EGCB_LV }, + {0x00b5bd, 0x00b5d7, EGCB_LVT }, + {0x00b5d8, 0x00b5d8, EGCB_LV }, + {0x00b5d9, 0x00b5f3, EGCB_LVT }, + {0x00b5f4, 0x00b5f4, EGCB_LV }, + {0x00b5f5, 0x00b60f, EGCB_LVT }, + {0x00b610, 0x00b610, EGCB_LV }, + {0x00b611, 0x00b62b, EGCB_LVT }, + {0x00b62c, 0x00b62c, EGCB_LV }, + {0x00b62d, 0x00b647, EGCB_LVT }, + {0x00b648, 0x00b648, EGCB_LV }, + {0x00b649, 0x00b663, EGCB_LVT }, + {0x00b664, 0x00b664, EGCB_LV }, + {0x00b665, 0x00b67f, EGCB_LVT }, + {0x00b680, 0x00b680, EGCB_LV }, + {0x00b681, 0x00b69b, EGCB_LVT }, + {0x00b69c, 0x00b69c, EGCB_LV }, + {0x00b69d, 0x00b6b7, EGCB_LVT }, + {0x00b6b8, 0x00b6b8, EGCB_LV }, + {0x00b6b9, 0x00b6d3, EGCB_LVT }, + {0x00b6d4, 0x00b6d4, EGCB_LV }, + {0x00b6d5, 0x00b6ef, EGCB_LVT }, + {0x00b6f0, 0x00b6f0, EGCB_LV }, + {0x00b6f1, 0x00b70b, EGCB_LVT }, + {0x00b70c, 0x00b70c, EGCB_LV }, + {0x00b70d, 0x00b727, EGCB_LVT }, + {0x00b728, 0x00b728, EGCB_LV }, + {0x00b729, 0x00b743, EGCB_LVT }, + {0x00b744, 0x00b744, EGCB_LV }, + {0x00b745, 0x00b75f, EGCB_LVT }, + {0x00b760, 0x00b760, EGCB_LV }, + {0x00b761, 0x00b77b, EGCB_LVT }, + {0x00b77c, 0x00b77c, EGCB_LV }, + {0x00b77d, 0x00b797, EGCB_LVT }, + {0x00b798, 0x00b798, EGCB_LV }, + {0x00b799, 0x00b7b3, EGCB_LVT }, + {0x00b7b4, 0x00b7b4, EGCB_LV }, + {0x00b7b5, 0x00b7cf, EGCB_LVT }, + {0x00b7d0, 0x00b7d0, EGCB_LV }, + {0x00b7d1, 0x00b7eb, EGCB_LVT }, + {0x00b7ec, 0x00b7ec, EGCB_LV }, + {0x00b7ed, 0x00b807, EGCB_LVT }, + {0x00b808, 0x00b808, EGCB_LV }, + {0x00b809, 0x00b823, EGCB_LVT }, + {0x00b824, 0x00b824, EGCB_LV }, + {0x00b825, 0x00b83f, EGCB_LVT }, + {0x00b840, 0x00b840, EGCB_LV }, + {0x00b841, 0x00b85b, EGCB_LVT }, + {0x00b85c, 0x00b85c, EGCB_LV }, + {0x00b85d, 0x00b877, EGCB_LVT }, + {0x00b878, 0x00b878, EGCB_LV }, + {0x00b879, 0x00b893, EGCB_LVT }, + {0x00b894, 0x00b894, EGCB_LV }, + {0x00b895, 0x00b8af, EGCB_LVT }, + {0x00b8b0, 0x00b8b0, EGCB_LV }, + {0x00b8b1, 0x00b8cb, EGCB_LVT }, + {0x00b8cc, 0x00b8cc, EGCB_LV }, + {0x00b8cd, 0x00b8e7, EGCB_LVT }, + {0x00b8e8, 0x00b8e8, EGCB_LV }, + {0x00b8e9, 0x00b903, EGCB_LVT }, + {0x00b904, 0x00b904, EGCB_LV }, + {0x00b905, 0x00b91f, EGCB_LVT }, + {0x00b920, 0x00b920, EGCB_LV }, + {0x00b921, 0x00b93b, EGCB_LVT }, + {0x00b93c, 0x00b93c, EGCB_LV }, + {0x00b93d, 0x00b957, EGCB_LVT }, + {0x00b958, 0x00b958, EGCB_LV }, + {0x00b959, 0x00b973, EGCB_LVT }, + {0x00b974, 0x00b974, EGCB_LV }, + {0x00b975, 0x00b98f, EGCB_LVT }, + {0x00b990, 0x00b990, EGCB_LV }, + {0x00b991, 0x00b9ab, EGCB_LVT }, + {0x00b9ac, 0x00b9ac, EGCB_LV }, + {0x00b9ad, 0x00b9c7, EGCB_LVT }, + {0x00b9c8, 0x00b9c8, EGCB_LV }, + {0x00b9c9, 0x00b9e3, EGCB_LVT }, + {0x00b9e4, 0x00b9e4, EGCB_LV }, + {0x00b9e5, 0x00b9ff, EGCB_LVT }, + {0x00ba00, 0x00ba00, EGCB_LV }, + {0x00ba01, 0x00ba1b, EGCB_LVT }, + {0x00ba1c, 0x00ba1c, EGCB_LV }, + {0x00ba1d, 0x00ba37, EGCB_LVT }, + {0x00ba38, 0x00ba38, EGCB_LV }, + {0x00ba39, 0x00ba53, EGCB_LVT }, + {0x00ba54, 0x00ba54, EGCB_LV }, + {0x00ba55, 0x00ba6f, EGCB_LVT }, + {0x00ba70, 0x00ba70, EGCB_LV }, + {0x00ba71, 0x00ba8b, EGCB_LVT }, + {0x00ba8c, 0x00ba8c, EGCB_LV }, + {0x00ba8d, 0x00baa7, EGCB_LVT }, + {0x00baa8, 0x00baa8, EGCB_LV }, + {0x00baa9, 0x00bac3, EGCB_LVT }, + {0x00bac4, 0x00bac4, EGCB_LV }, + {0x00bac5, 0x00badf, EGCB_LVT }, + {0x00bae0, 0x00bae0, EGCB_LV }, + {0x00bae1, 0x00bafb, EGCB_LVT }, + {0x00bafc, 0x00bafc, EGCB_LV }, + {0x00bafd, 0x00bb17, EGCB_LVT }, + {0x00bb18, 0x00bb18, EGCB_LV }, + {0x00bb19, 0x00bb33, EGCB_LVT }, + {0x00bb34, 0x00bb34, EGCB_LV }, + {0x00bb35, 0x00bb4f, EGCB_LVT }, + {0x00bb50, 0x00bb50, EGCB_LV }, + {0x00bb51, 0x00bb6b, EGCB_LVT }, + {0x00bb6c, 0x00bb6c, EGCB_LV }, + {0x00bb6d, 0x00bb87, EGCB_LVT }, + {0x00bb88, 0x00bb88, EGCB_LV }, + {0x00bb89, 0x00bba3, EGCB_LVT }, + {0x00bba4, 0x00bba4, EGCB_LV }, + {0x00bba5, 0x00bbbf, EGCB_LVT }, + {0x00bbc0, 0x00bbc0, EGCB_LV }, + {0x00bbc1, 0x00bbdb, EGCB_LVT }, + {0x00bbdc, 0x00bbdc, EGCB_LV }, + {0x00bbdd, 0x00bbf7, EGCB_LVT }, + {0x00bbf8, 0x00bbf8, EGCB_LV }, + {0x00bbf9, 0x00bc13, EGCB_LVT }, + {0x00bc14, 0x00bc14, EGCB_LV }, + {0x00bc15, 0x00bc2f, EGCB_LVT }, + {0x00bc30, 0x00bc30, EGCB_LV }, + {0x00bc31, 0x00bc4b, EGCB_LVT }, + {0x00bc4c, 0x00bc4c, EGCB_LV }, + {0x00bc4d, 0x00bc67, EGCB_LVT }, + {0x00bc68, 0x00bc68, EGCB_LV }, + {0x00bc69, 0x00bc83, EGCB_LVT }, + {0x00bc84, 0x00bc84, EGCB_LV }, + {0x00bc85, 0x00bc9f, EGCB_LVT }, + {0x00bca0, 0x00bca0, EGCB_LV }, + {0x00bca1, 0x00bcbb, EGCB_LVT }, + {0x00bcbc, 0x00bcbc, EGCB_LV }, + {0x00bcbd, 0x00bcd7, EGCB_LVT }, + {0x00bcd8, 0x00bcd8, EGCB_LV }, + {0x00bcd9, 0x00bcf3, EGCB_LVT }, + {0x00bcf4, 0x00bcf4, EGCB_LV }, + {0x00bcf5, 0x00bd0f, EGCB_LVT }, + {0x00bd10, 0x00bd10, EGCB_LV }, + {0x00bd11, 0x00bd2b, EGCB_LVT }, + {0x00bd2c, 0x00bd2c, EGCB_LV }, + {0x00bd2d, 0x00bd47, EGCB_LVT }, + {0x00bd48, 0x00bd48, EGCB_LV }, + {0x00bd49, 0x00bd63, EGCB_LVT }, + {0x00bd64, 0x00bd64, EGCB_LV }, + {0x00bd65, 0x00bd7f, EGCB_LVT }, + {0x00bd80, 0x00bd80, EGCB_LV }, + {0x00bd81, 0x00bd9b, EGCB_LVT }, + {0x00bd9c, 0x00bd9c, EGCB_LV }, + {0x00bd9d, 0x00bdb7, EGCB_LVT }, + {0x00bdb8, 0x00bdb8, EGCB_LV }, + {0x00bdb9, 0x00bdd3, EGCB_LVT }, + {0x00bdd4, 0x00bdd4, EGCB_LV }, + {0x00bdd5, 0x00bdef, EGCB_LVT }, + {0x00bdf0, 0x00bdf0, EGCB_LV }, + {0x00bdf1, 0x00be0b, EGCB_LVT }, + {0x00be0c, 0x00be0c, EGCB_LV }, + {0x00be0d, 0x00be27, EGCB_LVT }, + {0x00be28, 0x00be28, EGCB_LV }, + {0x00be29, 0x00be43, EGCB_LVT }, + {0x00be44, 0x00be44, EGCB_LV }, + {0x00be45, 0x00be5f, EGCB_LVT }, + {0x00be60, 0x00be60, EGCB_LV }, + {0x00be61, 0x00be7b, EGCB_LVT }, + {0x00be7c, 0x00be7c, EGCB_LV }, + {0x00be7d, 0x00be97, EGCB_LVT }, + {0x00be98, 0x00be98, EGCB_LV }, + {0x00be99, 0x00beb3, EGCB_LVT }, + {0x00beb4, 0x00beb4, EGCB_LV }, + {0x00beb5, 0x00becf, EGCB_LVT }, + {0x00bed0, 0x00bed0, EGCB_LV }, + {0x00bed1, 0x00beeb, EGCB_LVT }, + {0x00beec, 0x00beec, EGCB_LV }, + {0x00beed, 0x00bf07, EGCB_LVT }, + {0x00bf08, 0x00bf08, EGCB_LV }, + {0x00bf09, 0x00bf23, EGCB_LVT }, + {0x00bf24, 0x00bf24, EGCB_LV }, + {0x00bf25, 0x00bf3f, EGCB_LVT }, + {0x00bf40, 0x00bf40, EGCB_LV }, + {0x00bf41, 0x00bf5b, EGCB_LVT }, + {0x00bf5c, 0x00bf5c, EGCB_LV }, + {0x00bf5d, 0x00bf77, EGCB_LVT }, + {0x00bf78, 0x00bf78, EGCB_LV }, + {0x00bf79, 0x00bf93, EGCB_LVT }, + {0x00bf94, 0x00bf94, EGCB_LV }, + {0x00bf95, 0x00bfaf, EGCB_LVT }, + {0x00bfb0, 0x00bfb0, EGCB_LV }, + {0x00bfb1, 0x00bfcb, EGCB_LVT }, + {0x00bfcc, 0x00bfcc, EGCB_LV }, + {0x00bfcd, 0x00bfe7, EGCB_LVT }, + {0x00bfe8, 0x00bfe8, EGCB_LV }, + {0x00bfe9, 0x00c003, EGCB_LVT }, + {0x00c004, 0x00c004, EGCB_LV }, + {0x00c005, 0x00c01f, EGCB_LVT }, + {0x00c020, 0x00c020, EGCB_LV }, + {0x00c021, 0x00c03b, EGCB_LVT }, + {0x00c03c, 0x00c03c, EGCB_LV }, + {0x00c03d, 0x00c057, EGCB_LVT }, + {0x00c058, 0x00c058, EGCB_LV }, + {0x00c059, 0x00c073, EGCB_LVT }, + {0x00c074, 0x00c074, EGCB_LV }, + {0x00c075, 0x00c08f, EGCB_LVT }, + {0x00c090, 0x00c090, EGCB_LV }, + {0x00c091, 0x00c0ab, EGCB_LVT }, + {0x00c0ac, 0x00c0ac, EGCB_LV }, + {0x00c0ad, 0x00c0c7, EGCB_LVT }, + {0x00c0c8, 0x00c0c8, EGCB_LV }, + {0x00c0c9, 0x00c0e3, EGCB_LVT }, + {0x00c0e4, 0x00c0e4, EGCB_LV }, + {0x00c0e5, 0x00c0ff, EGCB_LVT }, + {0x00c100, 0x00c100, EGCB_LV }, + {0x00c101, 0x00c11b, EGCB_LVT }, + {0x00c11c, 0x00c11c, EGCB_LV }, + {0x00c11d, 0x00c137, EGCB_LVT }, + {0x00c138, 0x00c138, EGCB_LV }, + {0x00c139, 0x00c153, EGCB_LVT }, + {0x00c154, 0x00c154, EGCB_LV }, + {0x00c155, 0x00c16f, EGCB_LVT }, + {0x00c170, 0x00c170, EGCB_LV }, + {0x00c171, 0x00c18b, EGCB_LVT }, + {0x00c18c, 0x00c18c, EGCB_LV }, + {0x00c18d, 0x00c1a7, EGCB_LVT }, + {0x00c1a8, 0x00c1a8, EGCB_LV }, + {0x00c1a9, 0x00c1c3, EGCB_LVT }, + {0x00c1c4, 0x00c1c4, EGCB_LV }, + {0x00c1c5, 0x00c1df, EGCB_LVT }, + {0x00c1e0, 0x00c1e0, EGCB_LV }, + {0x00c1e1, 0x00c1fb, EGCB_LVT }, + {0x00c1fc, 0x00c1fc, EGCB_LV }, + {0x00c1fd, 0x00c217, EGCB_LVT }, + {0x00c218, 0x00c218, EGCB_LV }, + {0x00c219, 0x00c233, EGCB_LVT }, + {0x00c234, 0x00c234, EGCB_LV }, + {0x00c235, 0x00c24f, EGCB_LVT }, + {0x00c250, 0x00c250, EGCB_LV }, + {0x00c251, 0x00c26b, EGCB_LVT }, + {0x00c26c, 0x00c26c, EGCB_LV }, + {0x00c26d, 0x00c287, EGCB_LVT }, + {0x00c288, 0x00c288, EGCB_LV }, + {0x00c289, 0x00c2a3, EGCB_LVT }, + {0x00c2a4, 0x00c2a4, EGCB_LV }, + {0x00c2a5, 0x00c2bf, EGCB_LVT }, + {0x00c2c0, 0x00c2c0, EGCB_LV }, + {0x00c2c1, 0x00c2db, EGCB_LVT }, + {0x00c2dc, 0x00c2dc, EGCB_LV }, + {0x00c2dd, 0x00c2f7, EGCB_LVT }, + {0x00c2f8, 0x00c2f8, EGCB_LV }, + {0x00c2f9, 0x00c313, EGCB_LVT }, + {0x00c314, 0x00c314, EGCB_LV }, + {0x00c315, 0x00c32f, EGCB_LVT }, + {0x00c330, 0x00c330, EGCB_LV }, + {0x00c331, 0x00c34b, EGCB_LVT }, + {0x00c34c, 0x00c34c, EGCB_LV }, + {0x00c34d, 0x00c367, EGCB_LVT }, + {0x00c368, 0x00c368, EGCB_LV }, + {0x00c369, 0x00c383, EGCB_LVT }, + {0x00c384, 0x00c384, EGCB_LV }, + {0x00c385, 0x00c39f, EGCB_LVT }, + {0x00c3a0, 0x00c3a0, EGCB_LV }, + {0x00c3a1, 0x00c3bb, EGCB_LVT }, + {0x00c3bc, 0x00c3bc, EGCB_LV }, + {0x00c3bd, 0x00c3d7, EGCB_LVT }, + {0x00c3d8, 0x00c3d8, EGCB_LV }, + {0x00c3d9, 0x00c3f3, EGCB_LVT }, + {0x00c3f4, 0x00c3f4, EGCB_LV }, + {0x00c3f5, 0x00c40f, EGCB_LVT }, + {0x00c410, 0x00c410, EGCB_LV }, + {0x00c411, 0x00c42b, EGCB_LVT }, + {0x00c42c, 0x00c42c, EGCB_LV }, + {0x00c42d, 0x00c447, EGCB_LVT }, + {0x00c448, 0x00c448, EGCB_LV }, + {0x00c449, 0x00c463, EGCB_LVT }, + {0x00c464, 0x00c464, EGCB_LV }, + {0x00c465, 0x00c47f, EGCB_LVT }, + {0x00c480, 0x00c480, EGCB_LV }, + {0x00c481, 0x00c49b, EGCB_LVT }, + {0x00c49c, 0x00c49c, EGCB_LV }, + {0x00c49d, 0x00c4b7, EGCB_LVT }, + {0x00c4b8, 0x00c4b8, EGCB_LV }, + {0x00c4b9, 0x00c4d3, EGCB_LVT }, + {0x00c4d4, 0x00c4d4, EGCB_LV }, + {0x00c4d5, 0x00c4ef, EGCB_LVT }, + {0x00c4f0, 0x00c4f0, EGCB_LV }, + {0x00c4f1, 0x00c50b, EGCB_LVT }, + {0x00c50c, 0x00c50c, EGCB_LV }, + {0x00c50d, 0x00c527, EGCB_LVT }, + {0x00c528, 0x00c528, EGCB_LV }, + {0x00c529, 0x00c543, EGCB_LVT }, + {0x00c544, 0x00c544, EGCB_LV }, + {0x00c545, 0x00c55f, EGCB_LVT }, + {0x00c560, 0x00c560, EGCB_LV }, + {0x00c561, 0x00c57b, EGCB_LVT }, + {0x00c57c, 0x00c57c, EGCB_LV }, + {0x00c57d, 0x00c597, EGCB_LVT }, + {0x00c598, 0x00c598, EGCB_LV }, + {0x00c599, 0x00c5b3, EGCB_LVT }, + {0x00c5b4, 0x00c5b4, EGCB_LV }, + {0x00c5b5, 0x00c5cf, EGCB_LVT }, + {0x00c5d0, 0x00c5d0, EGCB_LV }, + {0x00c5d1, 0x00c5eb, EGCB_LVT }, + {0x00c5ec, 0x00c5ec, EGCB_LV }, + {0x00c5ed, 0x00c607, EGCB_LVT }, + {0x00c608, 0x00c608, EGCB_LV }, + {0x00c609, 0x00c623, EGCB_LVT }, + {0x00c624, 0x00c624, EGCB_LV }, + {0x00c625, 0x00c63f, EGCB_LVT }, + {0x00c640, 0x00c640, EGCB_LV }, + {0x00c641, 0x00c65b, EGCB_LVT }, + {0x00c65c, 0x00c65c, EGCB_LV }, + {0x00c65d, 0x00c677, EGCB_LVT }, + {0x00c678, 0x00c678, EGCB_LV }, + {0x00c679, 0x00c693, EGCB_LVT }, + {0x00c694, 0x00c694, EGCB_LV }, + {0x00c695, 0x00c6af, EGCB_LVT }, + {0x00c6b0, 0x00c6b0, EGCB_LV }, + {0x00c6b1, 0x00c6cb, EGCB_LVT }, + {0x00c6cc, 0x00c6cc, EGCB_LV }, + {0x00c6cd, 0x00c6e7, EGCB_LVT }, + {0x00c6e8, 0x00c6e8, EGCB_LV }, + {0x00c6e9, 0x00c703, EGCB_LVT }, + {0x00c704, 0x00c704, EGCB_LV }, + {0x00c705, 0x00c71f, EGCB_LVT }, + {0x00c720, 0x00c720, EGCB_LV }, + {0x00c721, 0x00c73b, EGCB_LVT }, + {0x00c73c, 0x00c73c, EGCB_LV }, + {0x00c73d, 0x00c757, EGCB_LVT }, + {0x00c758, 0x00c758, EGCB_LV }, + {0x00c759, 0x00c773, EGCB_LVT }, + {0x00c774, 0x00c774, EGCB_LV }, + {0x00c775, 0x00c78f, EGCB_LVT }, + {0x00c790, 0x00c790, EGCB_LV }, + {0x00c791, 0x00c7ab, EGCB_LVT }, + {0x00c7ac, 0x00c7ac, EGCB_LV }, + {0x00c7ad, 0x00c7c7, EGCB_LVT }, + {0x00c7c8, 0x00c7c8, EGCB_LV }, + {0x00c7c9, 0x00c7e3, EGCB_LVT }, + {0x00c7e4, 0x00c7e4, EGCB_LV }, + {0x00c7e5, 0x00c7ff, EGCB_LVT }, + {0x00c800, 0x00c800, EGCB_LV }, + {0x00c801, 0x00c81b, EGCB_LVT }, + {0x00c81c, 0x00c81c, EGCB_LV }, + {0x00c81d, 0x00c837, EGCB_LVT }, + {0x00c838, 0x00c838, EGCB_LV }, + {0x00c839, 0x00c853, EGCB_LVT }, + {0x00c854, 0x00c854, EGCB_LV }, + {0x00c855, 0x00c86f, EGCB_LVT }, + {0x00c870, 0x00c870, EGCB_LV }, + {0x00c871, 0x00c88b, EGCB_LVT }, + {0x00c88c, 0x00c88c, EGCB_LV }, + {0x00c88d, 0x00c8a7, EGCB_LVT }, + {0x00c8a8, 0x00c8a8, EGCB_LV }, + {0x00c8a9, 0x00c8c3, EGCB_LVT }, + {0x00c8c4, 0x00c8c4, EGCB_LV }, + {0x00c8c5, 0x00c8df, EGCB_LVT }, + {0x00c8e0, 0x00c8e0, EGCB_LV }, + {0x00c8e1, 0x00c8fb, EGCB_LVT }, + {0x00c8fc, 0x00c8fc, EGCB_LV }, + {0x00c8fd, 0x00c917, EGCB_LVT }, + {0x00c918, 0x00c918, EGCB_LV }, + {0x00c919, 0x00c933, EGCB_LVT }, + {0x00c934, 0x00c934, EGCB_LV }, + {0x00c935, 0x00c94f, EGCB_LVT }, + {0x00c950, 0x00c950, EGCB_LV }, + {0x00c951, 0x00c96b, EGCB_LVT }, + {0x00c96c, 0x00c96c, EGCB_LV }, + {0x00c96d, 0x00c987, EGCB_LVT }, + {0x00c988, 0x00c988, EGCB_LV }, + {0x00c989, 0x00c9a3, EGCB_LVT }, + {0x00c9a4, 0x00c9a4, EGCB_LV }, + {0x00c9a5, 0x00c9bf, EGCB_LVT }, + {0x00c9c0, 0x00c9c0, EGCB_LV }, + {0x00c9c1, 0x00c9db, EGCB_LVT }, + {0x00c9dc, 0x00c9dc, EGCB_LV }, + {0x00c9dd, 0x00c9f7, EGCB_LVT }, + {0x00c9f8, 0x00c9f8, EGCB_LV }, + {0x00c9f9, 0x00ca13, EGCB_LVT }, + {0x00ca14, 0x00ca14, EGCB_LV }, + {0x00ca15, 0x00ca2f, EGCB_LVT }, + {0x00ca30, 0x00ca30, EGCB_LV }, + {0x00ca31, 0x00ca4b, EGCB_LVT }, + {0x00ca4c, 0x00ca4c, EGCB_LV }, + {0x00ca4d, 0x00ca67, EGCB_LVT }, + {0x00ca68, 0x00ca68, EGCB_LV }, + {0x00ca69, 0x00ca83, EGCB_LVT }, + {0x00ca84, 0x00ca84, EGCB_LV }, + {0x00ca85, 0x00ca9f, EGCB_LVT }, + {0x00caa0, 0x00caa0, EGCB_LV }, + {0x00caa1, 0x00cabb, EGCB_LVT }, + {0x00cabc, 0x00cabc, EGCB_LV }, + {0x00cabd, 0x00cad7, EGCB_LVT }, + {0x00cad8, 0x00cad8, EGCB_LV }, + {0x00cad9, 0x00caf3, EGCB_LVT }, + {0x00caf4, 0x00caf4, EGCB_LV }, + {0x00caf5, 0x00cb0f, EGCB_LVT }, + {0x00cb10, 0x00cb10, EGCB_LV }, + {0x00cb11, 0x00cb2b, EGCB_LVT }, + {0x00cb2c, 0x00cb2c, EGCB_LV }, + {0x00cb2d, 0x00cb47, EGCB_LVT }, + {0x00cb48, 0x00cb48, EGCB_LV }, + {0x00cb49, 0x00cb63, EGCB_LVT }, + {0x00cb64, 0x00cb64, EGCB_LV }, + {0x00cb65, 0x00cb7f, EGCB_LVT }, + {0x00cb80, 0x00cb80, EGCB_LV }, + {0x00cb81, 0x00cb9b, EGCB_LVT }, + {0x00cb9c, 0x00cb9c, EGCB_LV }, + {0x00cb9d, 0x00cbb7, EGCB_LVT }, + {0x00cbb8, 0x00cbb8, EGCB_LV }, + {0x00cbb9, 0x00cbd3, EGCB_LVT }, + {0x00cbd4, 0x00cbd4, EGCB_LV }, + {0x00cbd5, 0x00cbef, EGCB_LVT }, + {0x00cbf0, 0x00cbf0, EGCB_LV }, + {0x00cbf1, 0x00cc0b, EGCB_LVT }, + {0x00cc0c, 0x00cc0c, EGCB_LV }, + {0x00cc0d, 0x00cc27, EGCB_LVT }, + {0x00cc28, 0x00cc28, EGCB_LV }, + {0x00cc29, 0x00cc43, EGCB_LVT }, + {0x00cc44, 0x00cc44, EGCB_LV }, + {0x00cc45, 0x00cc5f, EGCB_LVT }, + {0x00cc60, 0x00cc60, EGCB_LV }, + {0x00cc61, 0x00cc7b, EGCB_LVT }, + {0x00cc7c, 0x00cc7c, EGCB_LV }, + {0x00cc7d, 0x00cc97, EGCB_LVT }, + {0x00cc98, 0x00cc98, EGCB_LV }, + {0x00cc99, 0x00ccb3, EGCB_LVT }, + {0x00ccb4, 0x00ccb4, EGCB_LV }, + {0x00ccb5, 0x00cccf, EGCB_LVT }, + {0x00ccd0, 0x00ccd0, EGCB_LV }, + {0x00ccd1, 0x00cceb, EGCB_LVT }, + {0x00ccec, 0x00ccec, EGCB_LV }, + {0x00cced, 0x00cd07, EGCB_LVT }, + {0x00cd08, 0x00cd08, EGCB_LV }, + {0x00cd09, 0x00cd23, EGCB_LVT }, + {0x00cd24, 0x00cd24, EGCB_LV }, + {0x00cd25, 0x00cd3f, EGCB_LVT }, + {0x00cd40, 0x00cd40, EGCB_LV }, + {0x00cd41, 0x00cd5b, EGCB_LVT }, + {0x00cd5c, 0x00cd5c, EGCB_LV }, + {0x00cd5d, 0x00cd77, EGCB_LVT }, + {0x00cd78, 0x00cd78, EGCB_LV }, + {0x00cd79, 0x00cd93, EGCB_LVT }, + {0x00cd94, 0x00cd94, EGCB_LV }, + {0x00cd95, 0x00cdaf, EGCB_LVT }, + {0x00cdb0, 0x00cdb0, EGCB_LV }, + {0x00cdb1, 0x00cdcb, EGCB_LVT }, + {0x00cdcc, 0x00cdcc, EGCB_LV }, + {0x00cdcd, 0x00cde7, EGCB_LVT }, + {0x00cde8, 0x00cde8, EGCB_LV }, + {0x00cde9, 0x00ce03, EGCB_LVT }, + {0x00ce04, 0x00ce04, EGCB_LV }, + {0x00ce05, 0x00ce1f, EGCB_LVT }, + {0x00ce20, 0x00ce20, EGCB_LV }, + {0x00ce21, 0x00ce3b, EGCB_LVT }, + {0x00ce3c, 0x00ce3c, EGCB_LV }, + {0x00ce3d, 0x00ce57, EGCB_LVT }, + {0x00ce58, 0x00ce58, EGCB_LV }, + {0x00ce59, 0x00ce73, EGCB_LVT }, + {0x00ce74, 0x00ce74, EGCB_LV }, + {0x00ce75, 0x00ce8f, EGCB_LVT }, + {0x00ce90, 0x00ce90, EGCB_LV }, + {0x00ce91, 0x00ceab, EGCB_LVT }, + {0x00ceac, 0x00ceac, EGCB_LV }, + {0x00cead, 0x00cec7, EGCB_LVT }, + {0x00cec8, 0x00cec8, EGCB_LV }, + {0x00cec9, 0x00cee3, EGCB_LVT }, + {0x00cee4, 0x00cee4, EGCB_LV }, + {0x00cee5, 0x00ceff, EGCB_LVT }, + {0x00cf00, 0x00cf00, EGCB_LV }, + {0x00cf01, 0x00cf1b, EGCB_LVT }, + {0x00cf1c, 0x00cf1c, EGCB_LV }, + {0x00cf1d, 0x00cf37, EGCB_LVT }, + {0x00cf38, 0x00cf38, EGCB_LV }, + {0x00cf39, 0x00cf53, EGCB_LVT }, + {0x00cf54, 0x00cf54, EGCB_LV }, + {0x00cf55, 0x00cf6f, EGCB_LVT }, + {0x00cf70, 0x00cf70, EGCB_LV }, + {0x00cf71, 0x00cf8b, EGCB_LVT }, + {0x00cf8c, 0x00cf8c, EGCB_LV }, + {0x00cf8d, 0x00cfa7, EGCB_LVT }, + {0x00cfa8, 0x00cfa8, EGCB_LV }, + {0x00cfa9, 0x00cfc3, EGCB_LVT }, + {0x00cfc4, 0x00cfc4, EGCB_LV }, + {0x00cfc5, 0x00cfdf, EGCB_LVT }, + {0x00cfe0, 0x00cfe0, EGCB_LV }, + {0x00cfe1, 0x00cffb, EGCB_LVT }, + {0x00cffc, 0x00cffc, EGCB_LV }, + {0x00cffd, 0x00d017, EGCB_LVT }, + {0x00d018, 0x00d018, EGCB_LV }, + {0x00d019, 0x00d033, EGCB_LVT }, + {0x00d034, 0x00d034, EGCB_LV }, + {0x00d035, 0x00d04f, EGCB_LVT }, + {0x00d050, 0x00d050, EGCB_LV }, + {0x00d051, 0x00d06b, EGCB_LVT }, + {0x00d06c, 0x00d06c, EGCB_LV }, + {0x00d06d, 0x00d087, EGCB_LVT }, + {0x00d088, 0x00d088, EGCB_LV }, + {0x00d089, 0x00d0a3, EGCB_LVT }, + {0x00d0a4, 0x00d0a4, EGCB_LV }, + {0x00d0a5, 0x00d0bf, EGCB_LVT }, + {0x00d0c0, 0x00d0c0, EGCB_LV }, + {0x00d0c1, 0x00d0db, EGCB_LVT }, + {0x00d0dc, 0x00d0dc, EGCB_LV }, + {0x00d0dd, 0x00d0f7, EGCB_LVT }, + {0x00d0f8, 0x00d0f8, EGCB_LV }, + {0x00d0f9, 0x00d113, EGCB_LVT }, + {0x00d114, 0x00d114, EGCB_LV }, + {0x00d115, 0x00d12f, EGCB_LVT }, + {0x00d130, 0x00d130, EGCB_LV }, + {0x00d131, 0x00d14b, EGCB_LVT }, + {0x00d14c, 0x00d14c, EGCB_LV }, + {0x00d14d, 0x00d167, EGCB_LVT }, + {0x00d168, 0x00d168, EGCB_LV }, + {0x00d169, 0x00d183, EGCB_LVT }, + {0x00d184, 0x00d184, EGCB_LV }, + {0x00d185, 0x00d19f, EGCB_LVT }, + {0x00d1a0, 0x00d1a0, EGCB_LV }, + {0x00d1a1, 0x00d1bb, EGCB_LVT }, + {0x00d1bc, 0x00d1bc, EGCB_LV }, + {0x00d1bd, 0x00d1d7, EGCB_LVT }, + {0x00d1d8, 0x00d1d8, EGCB_LV }, + {0x00d1d9, 0x00d1f3, EGCB_LVT }, + {0x00d1f4, 0x00d1f4, EGCB_LV }, + {0x00d1f5, 0x00d20f, EGCB_LVT }, + {0x00d210, 0x00d210, EGCB_LV }, + {0x00d211, 0x00d22b, EGCB_LVT }, + {0x00d22c, 0x00d22c, EGCB_LV }, + {0x00d22d, 0x00d247, EGCB_LVT }, + {0x00d248, 0x00d248, EGCB_LV }, + {0x00d249, 0x00d263, EGCB_LVT }, + {0x00d264, 0x00d264, EGCB_LV }, + {0x00d265, 0x00d27f, EGCB_LVT }, + {0x00d280, 0x00d280, EGCB_LV }, + {0x00d281, 0x00d29b, EGCB_LVT }, + {0x00d29c, 0x00d29c, EGCB_LV }, + {0x00d29d, 0x00d2b7, EGCB_LVT }, + {0x00d2b8, 0x00d2b8, EGCB_LV }, + {0x00d2b9, 0x00d2d3, EGCB_LVT }, + {0x00d2d4, 0x00d2d4, EGCB_LV }, + {0x00d2d5, 0x00d2ef, EGCB_LVT }, + {0x00d2f0, 0x00d2f0, EGCB_LV }, + {0x00d2f1, 0x00d30b, EGCB_LVT }, + {0x00d30c, 0x00d30c, EGCB_LV }, + {0x00d30d, 0x00d327, EGCB_LVT }, + {0x00d328, 0x00d328, EGCB_LV }, + {0x00d329, 0x00d343, EGCB_LVT }, + {0x00d344, 0x00d344, EGCB_LV }, + {0x00d345, 0x00d35f, EGCB_LVT }, + {0x00d360, 0x00d360, EGCB_LV }, + {0x00d361, 0x00d37b, EGCB_LVT }, + {0x00d37c, 0x00d37c, EGCB_LV }, + {0x00d37d, 0x00d397, EGCB_LVT }, + {0x00d398, 0x00d398, EGCB_LV }, + {0x00d399, 0x00d3b3, EGCB_LVT }, + {0x00d3b4, 0x00d3b4, EGCB_LV }, + {0x00d3b5, 0x00d3cf, EGCB_LVT }, + {0x00d3d0, 0x00d3d0, EGCB_LV }, + {0x00d3d1, 0x00d3eb, EGCB_LVT }, + {0x00d3ec, 0x00d3ec, EGCB_LV }, + {0x00d3ed, 0x00d407, EGCB_LVT }, + {0x00d408, 0x00d408, EGCB_LV }, + {0x00d409, 0x00d423, EGCB_LVT }, + {0x00d424, 0x00d424, EGCB_LV }, + {0x00d425, 0x00d43f, EGCB_LVT }, + {0x00d440, 0x00d440, EGCB_LV }, + {0x00d441, 0x00d45b, EGCB_LVT }, + {0x00d45c, 0x00d45c, EGCB_LV }, + {0x00d45d, 0x00d477, EGCB_LVT }, + {0x00d478, 0x00d478, EGCB_LV }, + {0x00d479, 0x00d493, EGCB_LVT }, + {0x00d494, 0x00d494, EGCB_LV }, + {0x00d495, 0x00d4af, EGCB_LVT }, + {0x00d4b0, 0x00d4b0, EGCB_LV }, + {0x00d4b1, 0x00d4cb, EGCB_LVT }, + {0x00d4cc, 0x00d4cc, EGCB_LV }, + {0x00d4cd, 0x00d4e7, EGCB_LVT }, + {0x00d4e8, 0x00d4e8, EGCB_LV }, + {0x00d4e9, 0x00d503, EGCB_LVT }, + {0x00d504, 0x00d504, EGCB_LV }, + {0x00d505, 0x00d51f, EGCB_LVT }, + {0x00d520, 0x00d520, EGCB_LV }, + {0x00d521, 0x00d53b, EGCB_LVT }, + {0x00d53c, 0x00d53c, EGCB_LV }, + {0x00d53d, 0x00d557, EGCB_LVT }, + {0x00d558, 0x00d558, EGCB_LV }, + {0x00d559, 0x00d573, EGCB_LVT }, + {0x00d574, 0x00d574, EGCB_LV }, + {0x00d575, 0x00d58f, EGCB_LVT }, + {0x00d590, 0x00d590, EGCB_LV }, + {0x00d591, 0x00d5ab, EGCB_LVT }, + {0x00d5ac, 0x00d5ac, EGCB_LV }, + {0x00d5ad, 0x00d5c7, EGCB_LVT }, + {0x00d5c8, 0x00d5c8, EGCB_LV }, + {0x00d5c9, 0x00d5e3, EGCB_LVT }, + {0x00d5e4, 0x00d5e4, EGCB_LV }, + {0x00d5e5, 0x00d5ff, EGCB_LVT }, + {0x00d600, 0x00d600, EGCB_LV }, + {0x00d601, 0x00d61b, EGCB_LVT }, + {0x00d61c, 0x00d61c, EGCB_LV }, + {0x00d61d, 0x00d637, EGCB_LVT }, + {0x00d638, 0x00d638, EGCB_LV }, + {0x00d639, 0x00d653, EGCB_LVT }, + {0x00d654, 0x00d654, EGCB_LV }, + {0x00d655, 0x00d66f, EGCB_LVT }, + {0x00d670, 0x00d670, EGCB_LV }, + {0x00d671, 0x00d68b, EGCB_LVT }, + {0x00d68c, 0x00d68c, EGCB_LV }, + {0x00d68d, 0x00d6a7, EGCB_LVT }, + {0x00d6a8, 0x00d6a8, EGCB_LV }, + {0x00d6a9, 0x00d6c3, EGCB_LVT }, + {0x00d6c4, 0x00d6c4, EGCB_LV }, + {0x00d6c5, 0x00d6df, EGCB_LVT }, + {0x00d6e0, 0x00d6e0, EGCB_LV }, + {0x00d6e1, 0x00d6fb, EGCB_LVT }, + {0x00d6fc, 0x00d6fc, EGCB_LV }, + {0x00d6fd, 0x00d717, EGCB_LVT }, + {0x00d718, 0x00d718, EGCB_LV }, + {0x00d719, 0x00d733, EGCB_LVT }, + {0x00d734, 0x00d734, EGCB_LV }, + {0x00d735, 0x00d74f, EGCB_LVT }, + {0x00d750, 0x00d750, EGCB_LV }, + {0x00d751, 0x00d76b, EGCB_LVT }, + {0x00d76c, 0x00d76c, EGCB_LV }, + {0x00d76d, 0x00d787, EGCB_LVT }, + {0x00d788, 0x00d788, EGCB_LV }, + {0x00d789, 0x00d7a3, EGCB_LVT }, + {0x00d7b0, 0x00d7c6, EGCB_V }, + {0x00d7cb, 0x00d7fb, EGCB_T }, + {0x00fb1e, 0x00fb1e, EGCB_Extend }, + {0x00fe00, 0x00fe0f, EGCB_Extend }, + {0x00fe20, 0x00fe2f, EGCB_Extend }, + {0x00feff, 0x00feff, EGCB_Control }, + {0x00ff9e, 0x00ff9f, EGCB_Extend }, + {0x00fff0, 0x00fffb, EGCB_Control }, + {0x0101fd, 0x0101fd, EGCB_Extend }, + {0x0102e0, 0x0102e0, EGCB_Extend }, + {0x010376, 0x01037a, EGCB_Extend }, + {0x010a01, 0x010a03, EGCB_Extend }, + {0x010a05, 0x010a06, EGCB_Extend }, + {0x010a0c, 0x010a0f, EGCB_Extend }, + {0x010a38, 0x010a3a, EGCB_Extend }, + {0x010a3f, 0x010a3f, EGCB_Extend }, + {0x010ae5, 0x010ae6, EGCB_Extend }, + {0x010d24, 0x010d27, EGCB_Extend }, + {0x010d69, 0x010d6d, EGCB_Extend }, + {0x010eab, 0x010eac, EGCB_Extend }, + {0x010efc, 0x010eff, EGCB_Extend }, + {0x010f46, 0x010f50, EGCB_Extend }, + {0x010f82, 0x010f85, EGCB_Extend }, + {0x011000, 0x011000, EGCB_SpacingMark }, + {0x011001, 0x011001, EGCB_Extend }, + {0x011002, 0x011002, EGCB_SpacingMark }, + {0x011038, 0x011046, EGCB_Extend }, + {0x011070, 0x011070, EGCB_Extend }, + {0x011073, 0x011074, EGCB_Extend }, + {0x01107f, 0x011081, EGCB_Extend }, + {0x011082, 0x011082, EGCB_SpacingMark }, + {0x0110b0, 0x0110b2, EGCB_SpacingMark }, + {0x0110b3, 0x0110b6, EGCB_Extend }, + {0x0110b7, 0x0110b8, EGCB_SpacingMark }, + {0x0110b9, 0x0110ba, EGCB_Extend }, + {0x0110bd, 0x0110bd, EGCB_Prepend }, + {0x0110c2, 0x0110c2, EGCB_Extend }, + {0x0110cd, 0x0110cd, EGCB_Prepend }, + {0x011100, 0x011102, EGCB_Extend }, + {0x011127, 0x01112b, EGCB_Extend }, + {0x01112c, 0x01112c, EGCB_SpacingMark }, + {0x01112d, 0x011134, EGCB_Extend }, + {0x011145, 0x011146, EGCB_SpacingMark }, + {0x011173, 0x011173, EGCB_Extend }, + {0x011180, 0x011181, EGCB_Extend }, + {0x011182, 0x011182, EGCB_SpacingMark }, + {0x0111b3, 0x0111b5, EGCB_SpacingMark }, + {0x0111b6, 0x0111be, EGCB_Extend }, + {0x0111bf, 0x0111bf, EGCB_SpacingMark }, + {0x0111c0, 0x0111c0, EGCB_Extend }, + {0x0111c2, 0x0111c3, EGCB_Prepend }, + {0x0111c9, 0x0111cc, EGCB_Extend }, + {0x0111ce, 0x0111ce, EGCB_SpacingMark }, + {0x0111cf, 0x0111cf, EGCB_Extend }, + {0x01122c, 0x01122e, EGCB_SpacingMark }, + {0x01122f, 0x011231, EGCB_Extend }, + {0x011232, 0x011233, EGCB_SpacingMark }, + {0x011234, 0x011237, EGCB_Extend }, + {0x01123e, 0x01123e, EGCB_Extend }, + {0x011241, 0x011241, EGCB_Extend }, + {0x0112df, 0x0112df, EGCB_Extend }, + {0x0112e0, 0x0112e2, EGCB_SpacingMark }, + {0x0112e3, 0x0112ea, EGCB_Extend }, + {0x011300, 0x011301, EGCB_Extend }, + {0x011302, 0x011303, EGCB_SpacingMark }, + {0x01133b, 0x01133c, EGCB_Extend }, + {0x01133e, 0x01133e, EGCB_Extend }, + {0x01133f, 0x01133f, EGCB_SpacingMark }, + {0x011340, 0x011340, EGCB_Extend }, + {0x011341, 0x011344, EGCB_SpacingMark }, + {0x011347, 0x011348, EGCB_SpacingMark }, + {0x01134b, 0x01134c, EGCB_SpacingMark }, + {0x01134d, 0x01134d, EGCB_Extend }, + {0x011357, 0x011357, EGCB_Extend }, + {0x011362, 0x011363, EGCB_SpacingMark }, + {0x011366, 0x01136c, EGCB_Extend }, + {0x011370, 0x011374, EGCB_Extend }, + {0x0113b8, 0x0113b8, EGCB_Extend }, + {0x0113b9, 0x0113ba, EGCB_SpacingMark }, + {0x0113bb, 0x0113c0, EGCB_Extend }, + {0x0113c2, 0x0113c2, EGCB_Extend }, + {0x0113c5, 0x0113c5, EGCB_Extend }, + {0x0113c7, 0x0113c9, EGCB_Extend }, + {0x0113ca, 0x0113ca, EGCB_SpacingMark }, + {0x0113cc, 0x0113cd, EGCB_SpacingMark }, + {0x0113ce, 0x0113d0, EGCB_Extend }, + {0x0113d1, 0x0113d1, EGCB_Prepend }, + {0x0113d2, 0x0113d2, EGCB_Extend }, + {0x0113e1, 0x0113e2, EGCB_Extend }, + {0x011435, 0x011437, EGCB_SpacingMark }, + {0x011438, 0x01143f, EGCB_Extend }, + {0x011440, 0x011441, EGCB_SpacingMark }, + {0x011442, 0x011444, EGCB_Extend }, + {0x011445, 0x011445, EGCB_SpacingMark }, + {0x011446, 0x011446, EGCB_Extend }, + {0x01145e, 0x01145e, EGCB_Extend }, + {0x0114b0, 0x0114b0, EGCB_Extend }, + {0x0114b1, 0x0114b2, EGCB_SpacingMark }, + {0x0114b3, 0x0114b8, EGCB_Extend }, + {0x0114b9, 0x0114b9, EGCB_SpacingMark }, + {0x0114ba, 0x0114ba, EGCB_Extend }, + {0x0114bb, 0x0114bc, EGCB_SpacingMark }, + {0x0114bd, 0x0114bd, EGCB_Extend }, + {0x0114be, 0x0114be, EGCB_SpacingMark }, + {0x0114bf, 0x0114c0, EGCB_Extend }, + {0x0114c1, 0x0114c1, EGCB_SpacingMark }, + {0x0114c2, 0x0114c3, EGCB_Extend }, + {0x0115af, 0x0115af, EGCB_Extend }, + {0x0115b0, 0x0115b1, EGCB_SpacingMark }, + {0x0115b2, 0x0115b5, EGCB_Extend }, + {0x0115b8, 0x0115bb, EGCB_SpacingMark }, + {0x0115bc, 0x0115bd, EGCB_Extend }, + {0x0115be, 0x0115be, EGCB_SpacingMark }, + {0x0115bf, 0x0115c0, EGCB_Extend }, + {0x0115dc, 0x0115dd, EGCB_Extend }, + {0x011630, 0x011632, EGCB_SpacingMark }, + {0x011633, 0x01163a, EGCB_Extend }, + {0x01163b, 0x01163c, EGCB_SpacingMark }, + {0x01163d, 0x01163d, EGCB_Extend }, + {0x01163e, 0x01163e, EGCB_SpacingMark }, + {0x01163f, 0x011640, EGCB_Extend }, + {0x0116ab, 0x0116ab, EGCB_Extend }, + {0x0116ac, 0x0116ac, EGCB_SpacingMark }, + {0x0116ad, 0x0116ad, EGCB_Extend }, + {0x0116ae, 0x0116af, EGCB_SpacingMark }, + {0x0116b0, 0x0116b7, EGCB_Extend }, + {0x01171d, 0x01171d, EGCB_Extend }, + {0x01171e, 0x01171e, EGCB_SpacingMark }, + {0x01171f, 0x01171f, EGCB_Extend }, + {0x011722, 0x011725, EGCB_Extend }, + {0x011726, 0x011726, EGCB_SpacingMark }, + {0x011727, 0x01172b, EGCB_Extend }, + {0x01182c, 0x01182e, EGCB_SpacingMark }, + {0x01182f, 0x011837, EGCB_Extend }, + {0x011838, 0x011838, EGCB_SpacingMark }, + {0x011839, 0x01183a, EGCB_Extend }, + {0x011930, 0x011930, EGCB_Extend }, + {0x011931, 0x011935, EGCB_SpacingMark }, + {0x011937, 0x011938, EGCB_SpacingMark }, + {0x01193b, 0x01193e, EGCB_Extend }, + {0x01193f, 0x01193f, EGCB_Prepend }, + {0x011940, 0x011940, EGCB_SpacingMark }, + {0x011941, 0x011941, EGCB_Prepend }, + {0x011942, 0x011942, EGCB_SpacingMark }, + {0x011943, 0x011943, EGCB_Extend }, + {0x0119d1, 0x0119d3, EGCB_SpacingMark }, + {0x0119d4, 0x0119d7, EGCB_Extend }, + {0x0119da, 0x0119db, EGCB_Extend }, + {0x0119dc, 0x0119df, EGCB_SpacingMark }, + {0x0119e0, 0x0119e0, EGCB_Extend }, + {0x0119e4, 0x0119e4, EGCB_SpacingMark }, + {0x011a01, 0x011a0a, EGCB_Extend }, + {0x011a33, 0x011a38, EGCB_Extend }, + {0x011a39, 0x011a39, EGCB_SpacingMark }, + {0x011a3a, 0x011a3a, EGCB_Prepend }, + {0x011a3b, 0x011a3e, EGCB_Extend }, + {0x011a47, 0x011a47, EGCB_Extend }, + {0x011a51, 0x011a56, EGCB_Extend }, + {0x011a57, 0x011a58, EGCB_SpacingMark }, + {0x011a59, 0x011a5b, EGCB_Extend }, + {0x011a84, 0x011a89, EGCB_Prepend }, + {0x011a8a, 0x011a96, EGCB_Extend }, + {0x011a97, 0x011a97, EGCB_SpacingMark }, + {0x011a98, 0x011a99, EGCB_Extend }, + {0x011c2f, 0x011c2f, EGCB_SpacingMark }, + {0x011c30, 0x011c36, EGCB_Extend }, + {0x011c38, 0x011c3d, EGCB_Extend }, + {0x011c3e, 0x011c3e, EGCB_SpacingMark }, + {0x011c3f, 0x011c3f, EGCB_Extend }, + {0x011c92, 0x011ca7, EGCB_Extend }, + {0x011ca9, 0x011ca9, EGCB_SpacingMark }, + {0x011caa, 0x011cb0, EGCB_Extend }, + {0x011cb1, 0x011cb1, EGCB_SpacingMark }, + {0x011cb2, 0x011cb3, EGCB_Extend }, + {0x011cb4, 0x011cb4, EGCB_SpacingMark }, + {0x011cb5, 0x011cb6, EGCB_Extend }, + {0x011d31, 0x011d36, EGCB_Extend }, + {0x011d3a, 0x011d3a, EGCB_Extend }, + {0x011d3c, 0x011d3d, EGCB_Extend }, + {0x011d3f, 0x011d45, EGCB_Extend }, + {0x011d46, 0x011d46, EGCB_Prepend }, + {0x011d47, 0x011d47, EGCB_Extend }, + {0x011d8a, 0x011d8e, EGCB_SpacingMark }, + {0x011d90, 0x011d91, EGCB_Extend }, + {0x011d93, 0x011d94, EGCB_SpacingMark }, + {0x011d95, 0x011d95, EGCB_Extend }, + {0x011d96, 0x011d96, EGCB_SpacingMark }, + {0x011d97, 0x011d97, EGCB_Extend }, + {0x011ef3, 0x011ef4, EGCB_Extend }, + {0x011ef5, 0x011ef6, EGCB_SpacingMark }, + {0x011f00, 0x011f01, EGCB_Extend }, + {0x011f02, 0x011f02, EGCB_Prepend }, + {0x011f03, 0x011f03, EGCB_SpacingMark }, + {0x011f34, 0x011f35, EGCB_SpacingMark }, + {0x011f36, 0x011f3a, EGCB_Extend }, + {0x011f3e, 0x011f3f, EGCB_SpacingMark }, + {0x011f40, 0x011f42, EGCB_Extend }, + {0x011f5a, 0x011f5a, EGCB_Extend }, + {0x013430, 0x01343f, EGCB_Control }, + {0x013440, 0x013440, EGCB_Extend }, + {0x013447, 0x013455, EGCB_Extend }, + {0x01611e, 0x016129, EGCB_Extend }, + {0x01612a, 0x01612c, EGCB_SpacingMark }, + {0x01612d, 0x01612f, EGCB_Extend }, + {0x016af0, 0x016af4, EGCB_Extend }, + {0x016b30, 0x016b36, EGCB_Extend }, + {0x016d63, 0x016d63, EGCB_V }, + {0x016d67, 0x016d6a, EGCB_V }, + {0x016f4f, 0x016f4f, EGCB_Extend }, + {0x016f51, 0x016f87, EGCB_SpacingMark }, + {0x016f8f, 0x016f92, EGCB_Extend }, + {0x016fe4, 0x016fe4, EGCB_Extend }, + {0x016ff0, 0x016ff1, EGCB_Extend }, + {0x01bc9d, 0x01bc9e, EGCB_Extend }, + {0x01bca0, 0x01bca3, EGCB_Control }, + {0x01cf00, 0x01cf2d, EGCB_Extend }, + {0x01cf30, 0x01cf46, EGCB_Extend }, + {0x01d165, 0x01d169, EGCB_Extend }, + {0x01d16d, 0x01d172, EGCB_Extend }, + {0x01d173, 0x01d17a, EGCB_Control }, + {0x01d17b, 0x01d182, EGCB_Extend }, + {0x01d185, 0x01d18b, EGCB_Extend }, + {0x01d1aa, 0x01d1ad, EGCB_Extend }, + {0x01d242, 0x01d244, EGCB_Extend }, + {0x01da00, 0x01da36, EGCB_Extend }, + {0x01da3b, 0x01da6c, EGCB_Extend }, + {0x01da75, 0x01da75, EGCB_Extend }, + {0x01da84, 0x01da84, EGCB_Extend }, + {0x01da9b, 0x01da9f, EGCB_Extend }, + {0x01daa1, 0x01daaf, EGCB_Extend }, + {0x01e000, 0x01e006, EGCB_Extend }, + {0x01e008, 0x01e018, EGCB_Extend }, + {0x01e01b, 0x01e021, EGCB_Extend }, + {0x01e023, 0x01e024, EGCB_Extend }, + {0x01e026, 0x01e02a, EGCB_Extend }, + {0x01e08f, 0x01e08f, EGCB_Extend }, + {0x01e130, 0x01e136, EGCB_Extend }, + {0x01e2ae, 0x01e2ae, EGCB_Extend }, + {0x01e2ec, 0x01e2ef, EGCB_Extend }, + {0x01e4ec, 0x01e4ef, EGCB_Extend }, + {0x01e5ee, 0x01e5ef, EGCB_Extend }, + {0x01e8d0, 0x01e8d6, EGCB_Extend }, + {0x01e944, 0x01e94a, EGCB_Extend }, + {0x01f1e6, 0x01f1ff, EGCB_Regional_Indicator }, + {0x01f3fb, 0x01f3ff, EGCB_Extend }, + {0x0e0000, 0x0e001f, EGCB_Control }, + {0x0e0020, 0x0e007f, EGCB_Extend }, + {0x0e0080, 0x0e00ff, EGCB_Control }, + {0x0e0100, 0x0e01ef, EGCB_Extend }, + {0x0e01f0, 0x0e0fff, EGCB_Control } +}; diff --git a/internal/components/third_party/oniguruma/src/unicode_fold1_key.c b/internal/components/third_party/oniguruma/src/unicode_fold1_key.c new file mode 100644 index 0000000000..51edf13d03 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/unicode_fold1_key.c @@ -0,0 +1,3137 @@ +/* This file was converted by gperf_fold_key_conv.py + from gperf output file. */ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N onigenc_unicode_fold1_key unicode_fold1_key.gperf */ +/* Computed positions: -k'1-3' */ + + + +/* This gperf source file was generated by make_unicode_fold_data.py */ + +/*- + * Copyright (c) 2017-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#include "regint.h" + +#define TOTAL_KEYWORDS 1423 +#define MIN_WORD_LENGTH 3 +#define MAX_WORD_LENGTH 3 +#define MIN_HASH_VALUE 4 +#define MAX_HASH_VALUE 1846 +/* maximum key range = 1843, duplicates = 0 */ + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +/*ARGSUSED*/ +static unsigned int +hash(OnigCodePoint codes[]) +{ + static const unsigned short asso_values[] = + { + 4, 2, 15, 124, 1, 9, 1398, 671, 1395, 664, + 1384, 84, 91, 75, 1529, 74, 99, 54, 1525, 26, + 1379, 552, 1374, 431, 144, 50, 1517, 24, 250, 557, + 0, 27, 1506, 262, 1505, 197, 131, 1310, 782, 350, + 781, 32, 771, 588, 5, 95, 1079, 463, 770, 455, + 1074, 1496, 824, 1495, 584, 1484, 762, 1465, 751, 1559, + 1372, 1339, 1350, 1365, 1347, 732, 1062, 951, 551, 701, + 543, 1334, 657, 1479, 743, 108, 724, 1549, 530, 7, + 522, 252, 503, 1541, 484, 1540, 425, 1532, 709, 1232, + 466, 1147, 666, 1138, 1041, 845, 1325, 36, 1317, 465, + 65, 1526, 301, 690, 45, 1301, 401, 1450, 381, 1437, + 25, 994, 636, 603, 591, 1281, 176, 997, 339, 1215, + 446, 1009, 571, 1175, 616, 473, 623, 386, 414, 1394, + 921, 1489, 1022, 612, 613, 173, 1002, 74, 308, 327, + 1471, 291, 1434, 202, 908, 1, 147, 1847, 1426, 226, + 1222, 73, 56, 1847, 1423, 48, 1294, 292, 1267, 14, + 275, 315, 205, 410, 990, 4, 17, 6, 974, 382, + 1255, 675, 1225, 26, 360, 1437, 886, 1268, 1189, 37, + 863, 267, 1167, 1190, 963, 1178, 936, 1133, 603, 137, + 933, 393, 897, 71, 853, 1427, 843, 1161, 831, 1111, + 1165, 1128, 1156, 1140, 830, 686, 1155, 1125, 507, 1116, + 1123, 818, 237, 1064, 576, 1046, 562, 1033, 196, 816, + 167, 815, 155, 793, 136, 131, 76, 795, 85, 1112, + 124, 1110, 116, 285, 232, 1026, 188, 1383, 371, 1087, + 350, 1045, 333, 1359, 812, 354, 270, 407, 801, 99, + 565, 555, 1104, 128, 1097, 31, 1419, 130, 1414 + }; + return asso_values[(unsigned char)onig_codes_byte_at(codes, 2)+3] + asso_values[(unsigned char)onig_codes_byte_at(codes, 1)] + asso_values[(unsigned char)onig_codes_byte_at(codes, 0)]; +} + +int +onigenc_unicode_fold1_key(OnigCodePoint codes[]) +{ + static const short int wordlist[] = + { + -1, -1, -1, -1, + + 1915, + + 1876, + + 210, + + 171, + + 3453, + + 1936, + + 3558, + + 231, + + 993, + + 1321, + + 1282, + + 3153, + + 2669, + + 3714, + + 1342, + + 544, + + 505, + + 2105, + + 1141, + + 390, + + 562, + + 3693, + + 2804, + + 3309, + + 3711, + + 2036, + + 1069, + + 324, + + 2249, + + 27, + + 1612, + + 3249, + + 1618, + + 3732, + + 1384, + + 159, + + 2252, + + 1047, + + 3405, + + 402, + + 664, + + 2723, + + 3096, + + 1615, + + 3750, + + 2027, + + 1060, + + 315, + + 4131, + + 12, + + 2732, + + 3240, + + 1636, + + 2270, + + 1366, + + 3681, + + 2099, + + 1120, + + 372, + + 2306, + + 649, + + 2783, + + 3087, + + 1654, + + 2432, + + 2020, + + 1053, + + 309, + + 4113, + + 0, + + 2729, + + 3234, + + 2381, + + 3132, + + 1354, + + 3591, + + 2195, + + 1231, + + 459, + + 3288, + + 640, + + 2894, + + 3081, + + 1465, + + 3597, + + 2198, + + 1234, + + 462, + + 4101, + + 80, + + 2897, + + 1888, + + 2369, + + 183, + + 3456, + + 2993, + + 2915, + + 1696, + + 3660, + + 1894, + + 1294, + + 189, + + 1795, + + 144, + + 2918, + + 3366, + + 517, + + 3546, + + 1300, + + 980, + + 273, + + 1801, + + 2447, + + 2657, + + 523, + + 3609, + + 2204, + + 1240, + + 468, + + 2984, + + 92, + + 2960, + + 2996, + + 3603, + + 2201, + + 1237, + + 465, + + 3672, + + 86, + + 2900, + + 3588, + + 1924, + + 153, + + 219, + + 165, + + 3585, + + 2192, + + 1228, + + 456, + + 3393, + + 1330, + + 2891, + + 1813, + + 2450, + + 1906, + + 2978, + + 201, + + 2090, + + 1111, + + 2954, + + 1807, + + 2246, + + 2774, + + 1312, + + 3579, + + 2189, + + 1225, + + 1792, + + 2291, + + 535, + + 2888, + + 3363, + + 1789, + + 1684, + + 3123, + + 3876, + + 3573, + + 2186, + + 1222, + + 2948, + + 2942, + + 2285, + + 2885, + + 3360, + + 3882, + + 1513, + + 2045, + + 1078, + + 333, + + 2936, + + 46, + + 1783, + + 1459, + -1, + + 1519, + + 1402, + + 2939, + + 3621, + + 2210, + + 1246, + + 474, + + 673, + + 105, + + 1777, + + 2951, + + 798, + + 2183, + + 1219, + + 1582, + + 4149, + + 863, + + 2882, + + 3357, + + 2393, + + 366, + + 3894, + + 1135, + + 2552, + + 3279, + + 866, + + 2798, + + 3303, + + 3702, + + 3888, + + 1825, + + 1531, + + 2558, + + 709, + + 4095, + + 2912, + + 3873, + -1, + + 1771, + + 1525, + + 2288, + + 3870, + + 3011, + + 1594, + + 369, + + 1600, + + 1510, + + 3615, + + 2207, + + 1243, + + 471, + + 1507, + + 99, + + 2174, + + 1210, + + 2975, + + 872, + + 712, + + 2873, + + 3354, + + 3864, + -1, + + 3996, + + 2570, + + 869, + + 3939, + + 1912, + + 3564, + + 207, + + 999, + + 1501, + + 2564, + + 3858, + + 2675, + + 1819, + + 1318, + + 860, + + 784, + + 2549, + + 1753, + + 2441, + + 541, + + 1495, + + 2546, + -1, + + 3651, + + 2225, + + 1261, + + 486, + + 4092, + + 135, + + 2909, + + 1132, + + 3906, + + 4089, + + 857, + + 2795, + + 3300, + + 3696, + + 3411, + + 3612, + + 3852, + + 2540, + + 1543, + + 4215, + + 96, + + 715, + + 854, + + 3008, + + 1660, + + 378, + + 1489, + + 1855, + + 4083, + + 2534, + + 3687, + + 721, + + 2024, + + 1056, + + 312, + -1, + + 6, + + 703, + + 3237, + + 2078, + + 4077, + + 1360, + + 1816, + + 878, + + 2762, + + 3276, + + 4206, + + 643, + + 384, + + 3084, + + 2582, + + 851, + + 3900, + + 3699, + + 694, + + 4107, + + 3111, + + 3834, + + 2528, + + 2375, + + 363, + + 718, + + 1537, + + 3639, + + 2219, + + 1255, + + 483, + + 1471, + + 123, + + 4071, + + 2048, + + 1081, + + 336, + + 697, + + 52, + + 2747, + + 2987, + -1, -1, + + 1408, + + 3633, + + 2216, + + 1252, + + 480, + + 3648, + + 117, + -1, + + 875, + + 3002, + + 132, + + 1843, + + 2117, + + 1153, + + 4155, + + 2576, + -1, + + 2816, + + 2399, + + 3735, + + 2510, + + 1573, + + 3627, + + 2213, + + 1249, + + 477, + + 3897, + + 111, + + 1837, + + 2300, + + 4218, + + 4053, + + 1852, + + 2033, + + 1066, + + 321, + + 1534, + + 4296, + + 1639, + + 3246, + + 348, + + 3720, + + 1378, + + 754, + + 3261, + -1, + + 893, + + 1435, + + 658, + + 1831, + + 3093, + -1, + + 3780, + + 2030, + + 1063, + + 318, + + 4125, + + 18, + + 3654, + + 3243, + + 1624, + + 4182, + + 1372, + + 138, + + 3945, + + 2426, + + 2063, + + 1096, + + 2573, + + 3705, + + 3090, + + 1690, + -1, -1, + + 3924, + + 1438, + + 4119, + + 1999, + + 1014, + + 288, + + 2387, + + 682, + + 2690, + + 3213, + + 1561, + + 1858, + -1, + + 2504, + + 1606, + + 4185, + + 2459, + + 3918, + + 616, + + 2429, + + 3060, + + 3933, + -1, + + 3020, + + 2051, + + 1084, + + 339, + + 1555, + + 59, + -1, + + 2357, + + 1570, + + 3468, + + 1414, + + 3426, + + 887, + + 2282, + + 3972, + + 3912, + + 679, + + 3462, + + 724, + -1, -1, + + 2005, + + 1026, + + 294, + + 4161, + + 1549, + + 2702, + + 3219, + + 2405, + + 884, + + 345, + -1, + + 74, + + 890, + + 3258, + + 637, + + 625, + + 1429, + + 3066, + + 1996, + + 1008, + + 285, + + 3975, + + 4098, + + 2684, + + 3210, + -1, + + 2366, + + 2363, + -1, + + 881, + + 4176, + + 3438, + -1, + + 610, + + 2420, + + 3057, + + 3567, + + 1993, + + 1002, + + 282, + + 1576, + + 2168, + + 2678, + + 3207, + + 733, + + 2354, + + 2867, + + 3351, + + 2453, + + 3420, + -1, + + 791, + + 604, + + 3951, + + 3054, + + 3561, + + 1990, + + 996, + + 279, + -1, + + 2972, + + 2672, + + 3204, + + 3555, + + 1987, + + 990, + + 276, + + 1741, + + 3414, + + 2666, + + 3201, + + 601, + + 736, + + 3051, + -1, + + 1864, + + 3531, + + 1975, + + 965, + + 598, + + 3966, + + 3047, + + 2642, + + 3189, + + 3525, + + 1972, + + 956, + + 3408, + + 3666, + -1, + + 2636, + + 3186, + + 1873, + + 147, + + 3035, + + 3402, + + 2180, + + 1216, + + 3663, + + 2231, + + 1267, + + 2879, + + 3032, + -1, + + 2345, + + 2054, + + 1087, + + 342, + + 3378, + + 65, + + 2177, + + 1213, + + 2339, + + 2276, + + 1420, + + 2876, + + 3372, + + 3483, + + 1951, + + 912, + + 243, + + 3450, + + 1765, + + 2594, + + 3165, + + 2042, + + 1075, + + 330, + + 4167, + + 40, + + 3822, + + 3255, + + 2411, + + 577, + + 1396, + + 2465, + + 1759, + + 2138, + + 1174, + + 411, + + 670, + + 37, + + 2837, + + 3327, + + 3774, + + 2321, + + 1393, + + 2072, + + 4143, + + 357, + + 2057, + + 1090, + + 2756, + + 3270, + + 71, + + 1453, + + 1456, + + 2060, + + 1093, + + 1426, + + 4140, + + 688, + + 691, + + 1681, + + 3105, + + 845, + + 1432, + + 4200, + -1, -1, + + 2039, + + 1072, + + 327, + + 4173, + + 34, + -1, + + 3252, + + 2417, + + 3957, + + 1390, + + 4179, + + 2966, + + 2492, + + 4041, + + 2423, + + 3846, + + 2990, + + 3099, + + 1588, + -1, + + 3537, + + 1978, + + 971, + + 4137, + -1, + + 1483, + + 2648, + + 3192, + + 1585, + + 3840, + + 2008, + + 1032, + + 297, + -1, -1, + + 2708, + + 3222, + -1, + + 3038, + + 1477, + + 2495, + + 396, + -1, + + 896, + -1, + + 628, + + 3726, + + 3069, + + 2351, + + 3990, + + 3993, + + 1198, + + 3384, + + 3963, + -1, + + 2264, + + 3348, + + 2522, + + 9, + + 727, + + 3969, + + 3444, + + 2258, + + 1363, + + 3528, + + 1630, + + 960, + + 264, + + 4065, + + 646, + + 2639, + + 2516, + + 2471, + + 2002, + + 1020, + + 291, + + 1732, + + 4110, + + 2696, + + 3216, + + 589, + + 2378, + + 4059, + -1, -1, -1, -1, + + 3549, + + 1984, + + 983, + + 3063, + + 779, + + 2342, + + 2660, + + 3198, + + 3516, + + 3375, + + 946, + + 258, + + 2486, + + 2360, + + 2627, + + 4230, + + 595, + + 3432, + + 3044, + + 3543, + + 1981, + + 977, + -1, + + 4224, + + 730, + + 2654, + + 3195, + + 3495, + + 1957, + + 925, + + 249, + -1, + + 3396, + + 2606, + + 3171, + + 592, + + 2930, + + 3041, + + 3489, + + 1954, + + 919, + + 246, + -1, + + 2924, + + 2600, + + 3168, + + 3465, + + 1942, + + 1933, + + 237, + + 228, + + 3390, + + 3813, + + 3159, + + 3150, + + 2333, + + 1348, + + 1339, + + 1930, + + 1927, + + 225, + + 222, + + 568, + + 559, + + 3147, + + 3144, + + 2327, + + 1336, + + 1333, + + 3582, + -1, + + 3594, + + 453, + + 556, + + 553, + + 2309, + + 77, + + 3657, + + 2228, + + 1264, + + 490, + -1, + + 141, + -1, -1, + + 2303, + + 2297, + + 836, + + 3645, + + 2222, + + 1258, + + 3576, + + 3570, + + 129, + + 450, + + 447, + + 1786, + + 435, + + 1798, + + 2444, + + 3477, + + 1948, + + 905, + + 4293, + + 1861, + + 4032, + + 2588, + + 2162, + + 2153, + + 424, + + 2477, + + 4287, + + 2861, + + 2852, + + 3342, + + 1849, + + 574, + -1, + + 1780, + + 1774, + + 2150, + + 1750, + + 2438, + + 1041, + -1, + + 2849, + + 3339, + + 2717, + + 2315, + -1, + + 2147, + + 1183, + + 417, + + 1729, + + 1711, + + 2846, + + 3336, + + 634, + -1, -1, + + 2126, + + 1162, + + 3029, + + 3026, + + 4245, + + 2825, + + 1705, + + 3753, + + 4212, + -1, -1, -1, -1, + + 3023, + + 3017, + + 2483, + + 1699, + -1, -1, + + 3867, + -1, + + 3879, + + 2489, + + 2120, + + 1156, + + 399, + + 1657, + + 2435, + + 2819, + + 1504, + + 3741, + + 1516, + -1, -1, + + 2144, + + 1180, + + 414, + + 1579, + + 3930, + + 2843, + + 3333, + + 3861, + + 3855, + -1, + + 3831, + + 2087, + + 1108, + -1, + + 1567, + + 1645, + + 2771, + + 1498, + + 1492, + -1, + + 1468, + -1, + + 3810, + + 3792, + + 2066, + + 1099, + + 1693, + + 2543, + + 3120, + + 2555, + + 3264, + -1, -1, + + 1444, + -1, + + 3786, + + 2141, + + 1177, + + 4086, + + 2135, + + 1171, + + 2840, + + 3330, + + 3777, + + 2834, + + 3324, + + 3768, + + 4191, + -1, + + 2537, + + 2531, + -1, + + 2507, + + 3522, + -1, + + 953, + + 261, + + 832, + + 812, + + 2633, + + 4080, + + 4074, + + 1687, + + 4050, + -1, + + 1675, + + 2132, + + 1168, + -1, + + 586, + + 808, + + 2831, + + 3321, + + 3762, + + 1870, + + 4029, + + 4011, + + 2108, + + 1144, + + 393, + + 801, + + 2336, + + 2807, + + 3312, + + 3717, + -1, -1, + + 4290, + + 4005, + -1, + + 751, + -1, + + 1669, + + 2102, + + 1138, + + 387, + -1, + + 3981, + + 2801, + + 3306, + + 3708, + + 31, + + 2744, + + 1621, + + 49, + + 2075, + + 1387, + + 360, + -1, + + 1405, + + 2759, + + 3273, + + 667, + + 742, + + 1462, + + 676, + + 62, + + 2750, + + 4278, + + 1609, + + 4134, + + 1417, + + 3108, + + 4152, + + 795, + + 2069, + + 1102, + + 2396, + + 3618, + -1, + + 2753, + + 3267, + -1, + + 102, + + 1450, + + 4164, + -1, + + 4257, + + 444, + + 2408, + -1, -1, + + 3102, + -1, + + 2011, + + 1038, + + 300, + + 3636, + + 4251, + + 2714, + + 3225, + + 441, + + 120, + + 2906, + -1, + + 1822, + + 4227, + + 4209, + -1, + + 631, + + 788, + + 3072, + + 1768, + + 771, + + 3519, + + 1969, + + 950, + + 4203, + + 4197, + + 438, + + 2630, + + 3183, + -1, + + 3942, + + 1840, + + 1762, + + 3471, + + 1945, + + 3999, + + 240, + + 583, + + 3459, + + 1939, + + 3162, + + 234, + + 3954, + + 1351, + -1, + + 3156, + + 3630, + + 764, + + 1345, + + 571, + + 1756, + + 114, + + 2903, + -1, + + 565, + + 3987, + + 3675, + + 2237, + + 1273, + + 496, + + 3369, + + 156, + -1, + + 3669, + + 2234, + + 1270, + + 493, + + 4239, + + 150, + + 3606, + -1, + + 3600, + + 1189, + + 1834, + + 89, + + 3903, + + 83, + + 1204, + + 432, + -1, -1, -1, + + 3849, + + 2171, + + 1207, + + 1540, + + 1201, + + 428, + + 2870, + + 1192, + + 420, + -1, + + 1486, + -1, + + 3921, + + 3843, + + 1810, + + 1714, + + 1804, + + 1035, + + 3771, + + 1195, + + 1744, + + 2711, + + 1558, + + 1480, + + 3345, + -1, + + 1029, + + 1747, + -1, + + 1738, + + 2705, + + 3837, + + 1720, + + 2165, + + 2159, + + 2579, + -1, + + 1678, + + 2864, + + 2858, + + 1186, + + 1474, + + 2525, + + 2156, + + 1726, + + 2129, + + 1165, + + 3447, + + 2855, + -1, + + 2828, + + 1867, + + 3756, + + 4068, + + 3915, + + 2519, + + 3441, + + 68, + + 408, + + 1735, + + 1723, + + 2501, + + 1423, + + 3765, + + 1552, + + 1708, + + 4062, + + 2123, + + 1159, + + 1717, + + 405, + + 1663, + + 2822, + + 2513, + + 3747, + + 3759, + + 4170, + + 3891, + + 3795, + + 3885, + + 2414, + + 1591, + + 1672, + + 3825, + + 4056, + -1, -1, + + 1528, + -1, + + 1522, + + 3828, + -1, + + 3819, + + 1651, + + 1666, + + 3801, + -1, + + 56, + -1, + + 899, + + 2096, + + 1117, + + 1411, + + 2114, + + 1150, + + 2780, + + 3285, + + 3807, + + 2813, + + 3318, + + 3729, + + 1023, + + 4284, + + 816, + -1, + + 2699, + + 4158, + + 3129, + + 848, + + 2567, + + 2402, + + 2561, + + 3816, + + 3804, + -1, + + 622, + + 3960, + + 842, + + 3789, + + 1633, + + 822, + + 4014, + + 3798, + + 2111, + + 1147, + + 774, + + 4044, + + 2462, + + 2810, + + 3315, + + 3723, + + 3435, + + 829, + + 4047, + -1, + + 4038, + + 1129, + + 381, + + 4020, + + 2474, + + 2792, + + 3297, + + 3690, + + 3744, + -1, -1, -1, + + 839, + + 826, + + 1627, + + 4026, + -1, + + 3141, + + 43, + -1, -1, + + 3948, + + 819, + + 1399, + + 758, + -1, -1, + + 1648, + + 1126, + + 375, + + 4035, + + 4023, + + 2789, + + 3294, + + 3684, + + 768, + + 4008, + + 4146, + + 15, + + 2735, + + 4017, + + 2390, + -1, + + 1369, + + 3138, + -1, + + 748, + + 761, + -1, + + 652, + + 2017, + + 1050, + + 306, + -1, -1, + + 2726, + + 3231, + + 4116, + + 2014, + + 1044, + + 303, + + 2384, + -1, + + 2720, + + 3228, + -1, + + 3534, + + 3078, + + 968, + + 267, + + 2294, + + 3504, + + 2645, + + 934, + + 252, + + 3075, + -1, + + 2615, + + 4281, + + 3513, + + 1966, + + 943, + + 3507, + + 1963, + + 937, + + 2624, + + 3180, + + 3936, + + 2618, + + 3177, + + 4233, + + 3642, + -1, -1, + + 2348, + + 4221, + + 126, + + 3510, + + 3381, + + 940, + + 255, + -1, -1, + + 2621, + + 3501, + + 1960, + + 931, + + 1903, + -1, + + 198, + + 2612, + + 3174, + + 1900, + + 580, + + 195, + + 3624, + + 1309, + + 1885, + + 1846, + + 180, + + 108, + + 1306, + + 532, + -1, -1, + + 745, + + 1291, + + 529, + + 1882, + + 351, + + 177, + + 1879, + + 514, + + 174, + + 2279, + -1, + + 1441, + + 1288, + + 3014, + + 2273, + + 1285, + -1, + + 1828, + + 511, + + 2267, + -1, + + 508, + + 2243, + + 1279, + + 502, + + 4188, + + 168, + + 2240, + + 1276, + + 499, + + 2261, + + 162, + + 1123, + + 2255, + + 2093, + + 1114, + + 2786, + + 3291, + + 3678, + + 2777, + + 3282, + -1, + + 2084, + + 1105, + -1, + + 2480, + -1, + + 2768, + + 3135, + + 24, + + 2741, + + 3126, + + 3738, + -1, + + 1381, + -1, + + 3927, + + 706, + -1, + + 3117, + + 661, + + 1702, + + 21, + + 2738, + -1, -1, + + 1564, + + 1375, + + 4128, + -1, -1, + + 1642, + + 3492, + + 655, + + 922, + + 3978, + -1, + + 2969, + + 2603, + + 2081, + + 3909, + + 4122, + + 2963, + -1, + + 2765, + + 2468, + + 3540, + + 2933, + + 974, + + 270, + + 1546, + + 3486, + + 2651, + + 915, + + 700, + -1, + + 3114, + + 2597, + + 2927, + + 354, + + 2330, + + 2921, + + 3480, + + 3474, + + 908, + + 902, + + 1447, + -1, + + 2591, + + 2585, + -1, -1, + + 685, + + 1921, + + 1918, + + 216, + + 213, + -1, + + 3387, + + 2324, + -1, + + 1603, + + 1327, + + 1324, + + 3783, + + 1909, + + 1597, + + 204, + + 550, + + 547, + + 2318, + + 2312, + -1, + + 1897, + + 1315, + + 192, + -1, + + 1891, + + 3, + + 186, + + 538, + + 1017, + + 1303, + + 1357, + -1, + + 2693, + + 1297, + -1, + + 526, + + 1011, + + 1005, + + 2456, + + 520, + + 2687, + + 2681, + + 619, + + 3552, + + 4104, + + 986, + + 804, + -1, + + 2372, + + 2663, + + 613, + + 607, + -1, + + 3498, + -1, + + 928, + + 739, + + 3984, + + 3429, + + 2609, + -1, -1, -1, -1, + + 4002, + -1, + + 3423, + + 3417, + -1, -1, -1, -1, -1, -1, + -1, + + 3399, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + + 4194, + -1, -1, -1, -1, -1, -1, + + 3005, + + 2999, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, + + 2981, + -1, -1, -1, -1, -1, -1, + -1, + + 2957, + -1, + + 4266, + -1, + + 2945, + -1, -1, -1, -1, -1, + + 4275, + -1, -1, + + 4269, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, + + 4272, + -1, -1, -1, -1, -1, -1, + + 4263, + + 2498, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, + + 4254, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + + 4248, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, + + 4242, + + 4236, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + -1, -1, + + 4260 + }; + + + { + int key = hash(codes); + + if (key <= MAX_HASH_VALUE) + { + int index = wordlist[key]; + + if (index >= 0 && onig_codes_cmp(codes, OnigUnicodeFolds1 + index, 1) == 0) + return index; + } + } + return -1; +} diff --git a/internal/components/third_party/oniguruma/src/unicode_fold2_key.c b/internal/components/third_party/oniguruma/src/unicode_fold2_key.c new file mode 100644 index 0000000000..929b3b5177 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/unicode_fold2_key.c @@ -0,0 +1,226 @@ +/* This file was converted by gperf_fold_key_conv.py + from gperf output file. */ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N onigenc_unicode_fold2_key unicode_fold2_key.gperf */ +/* Computed positions: -k'3,6' */ + + + +/* This gperf source file was generated by make_unicode_fold_data.py */ + +/*- + * Copyright (c) 2017-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#include "regint.h" + +#define TOTAL_KEYWORDS 59 +#define MIN_WORD_LENGTH 6 +#define MAX_WORD_LENGTH 6 +#define MIN_HASH_VALUE 0 +#define MAX_HASH_VALUE 58 +/* maximum key range = 59, duplicates = 0 */ + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +/*ARGSUSED*/ +static unsigned int +hash(OnigCodePoint codes[]) +{ + static const unsigned char asso_values[] = + { + 58, 57, 56, 55, 54, 53, 52, 16, 50, 59, + 15, 59, 25, 59, 59, 59, 59, 59, 59, 3, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 49, 48, 47, 46, 45, 44, 43, 42, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 21, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 2, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 40, 20, 39, 38, + 37, 14, 5, 36, 20, 7, 25, 34, 29, 32, + 16, 59, 31, 59, 59, 2, 1, 59, 25, 15, + 59, 14, 59, 59, 28, 59, 2, 59, 59, 59, + 11, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 24, 59, 22, 59, 59, 11, 59, 59, + 59, 59, 59, 7, 59, 0, 59, 59, 16, 59, + 1, 59, 59, 16, 59, 59, 59, 15, 59, 59, + 59, 6, 59, 59, 59, 59, 0, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59 + }; + return asso_values[(unsigned char)onig_codes_byte_at(codes, 5)] + asso_values[(unsigned char)onig_codes_byte_at(codes, 2)]; +} + +int +onigenc_unicode_fold2_key(OnigCodePoint codes[]) +{ + static const short int wordlist[] = + { + + 101, + + 253, + + 76, + + 29, + + 24, + + 239, + + 96, + + 71, + + 92, + + 67, + + 4, + + 62, + + 8, + + 58, + + 234, + + 109, + + 164, + + 88, + + 84, + + 80, + + 214, + + 0, + + 54, + + 261, + + 50, + + 105, + + 121, + + 125, + + 257, + + 42, + + 38, + + 249, + + 46, + + 117, + + 12, + + 113, + + 244, + + 229, + + 224, + + 219, + + 209, + + 16, + + 204, + + 199, + + 194, + + 189, + + 184, + + 179, + + 174, + + 169, + + 20, + + 34, + + 159, + + 154, + + 149, + + 144, + + 139, + + 134, + + 129 + }; + + + { + int key = hash(codes); + + if (key <= MAX_HASH_VALUE) + { + int index = wordlist[key]; + + if (index >= 0 && onig_codes_cmp(codes, OnigUnicodeFolds2 + index, 2) == 0) + return index; + } + } + return -1; +} diff --git a/internal/components/third_party/oniguruma/src/unicode_fold3_key.c b/internal/components/third_party/oniguruma/src/unicode_fold3_key.c new file mode 100644 index 0000000000..e6d3cf31c7 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/unicode_fold3_key.c @@ -0,0 +1,136 @@ +/* This file was converted by gperf_fold_key_conv.py + from gperf output file. */ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N onigenc_unicode_fold3_key unicode_fold3_key.gperf */ +/* Computed positions: -k'3,6,9' */ + + + +/* This gperf source file was generated by make_unicode_fold_data.py */ + +/*- + * Copyright (c) 2017-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#include "regint.h" + +#define TOTAL_KEYWORDS 14 +#define MIN_WORD_LENGTH 9 +#define MAX_WORD_LENGTH 9 +#define MIN_HASH_VALUE 0 +#define MAX_HASH_VALUE 13 +/* maximum key range = 14, duplicates = 0 */ + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +/*ARGSUSED*/ +static unsigned int +hash(OnigCodePoint codes[]) +{ + static const unsigned char asso_values[] = + { + 6, 3, 14, 14, 14, 14, 14, 14, 1, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 0, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 4, 14, 14, 5, 14, 14, 4, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 10, 14, 14, + 14, 14, 14, 9, 14, 1, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 0, 14, 14, + 14, 8, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14 + }; + return asso_values[(unsigned char)onig_codes_byte_at(codes, 8)] + asso_values[(unsigned char)onig_codes_byte_at(codes, 5)] + asso_values[(unsigned char)onig_codes_byte_at(codes, 2)]; +} + +int +onigenc_unicode_fold3_key(OnigCodePoint codes[]) +{ + static const short int wordlist[] = + { + + 62, + + 47, + + 31, + + 57, + + 41, + + 25, + + 52, + + 36, + + 20, + + 67, + + 15, + + 10, + + 5, + + 0 + }; + + + { + int key = hash(codes); + + if (key <= MAX_HASH_VALUE) + { + int index = wordlist[key]; + + if (index >= 0 && onig_codes_cmp(codes, OnigUnicodeFolds3 + index, 3) == 0) + return index; + } + } + return -1; +} diff --git a/internal/components/third_party/oniguruma/src/unicode_fold_data.h b/internal/components/third_party/oniguruma/src/unicode_fold_data.h new file mode 100644 index 0000000000..2ffa43fa3c --- /dev/null +++ b/internal/components/third_party/oniguruma/src/unicode_fold_data.h @@ -0,0 +1,1619 @@ +/* This file was generated by make_unicode_fold_data.py. */ +/*- + * Copyright (c) 2017-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + +#include "regenc.h" + +#define UNICODE_CASEFOLD_VERSION 160000 + + +OnigCodePoint OnigUnicodeFolds1[] = { + /* 0*/ 0x0061, 1, 0x0041, /* LATIN CAPITAL LETTER A */ + /* 3*/ 0x0062, 1, 0x0042, /* LATIN CAPITAL LETTER B */ + /* 6*/ 0x0063, 1, 0x0043, /* LATIN CAPITAL LETTER C */ + /* 9*/ 0x0064, 1, 0x0044, /* LATIN CAPITAL LETTER D */ + /* 12*/ 0x0065, 1, 0x0045, /* LATIN CAPITAL LETTER E */ + /* 15*/ 0x0066, 1, 0x0046, /* LATIN CAPITAL LETTER F */ + /* 18*/ 0x0067, 1, 0x0047, /* LATIN CAPITAL LETTER G */ + /* 21*/ 0x0068, 1, 0x0048, /* LATIN CAPITAL LETTER H */ + /* 24*/ 0x006a, 1, 0x004a, /* LATIN CAPITAL LETTER J */ + /* 27*/ 0x006b, 2, 0x004b, 0x212a, /* LATIN CAPITAL LETTER K */ + /* 31*/ 0x006c, 1, 0x004c, /* LATIN CAPITAL LETTER L */ + /* 34*/ 0x006d, 1, 0x004d, /* LATIN CAPITAL LETTER M */ + /* 37*/ 0x006e, 1, 0x004e, /* LATIN CAPITAL LETTER N */ + /* 40*/ 0x006f, 1, 0x004f, /* LATIN CAPITAL LETTER O */ + /* 43*/ 0x0070, 1, 0x0050, /* LATIN CAPITAL LETTER P */ + /* 46*/ 0x0071, 1, 0x0051, /* LATIN CAPITAL LETTER Q */ + /* 49*/ 0x0072, 1, 0x0052, /* LATIN CAPITAL LETTER R */ + /* 52*/ 0x0073, 2, 0x0053, 0x017f, /* LATIN CAPITAL LETTER S */ + /* 56*/ 0x0074, 1, 0x0054, /* LATIN CAPITAL LETTER T */ + /* 59*/ 0x0075, 1, 0x0055, /* LATIN CAPITAL LETTER U */ + /* 62*/ 0x0076, 1, 0x0056, /* LATIN CAPITAL LETTER V */ + /* 65*/ 0x0077, 1, 0x0057, /* LATIN CAPITAL LETTER W */ + /* 68*/ 0x0078, 1, 0x0058, /* LATIN CAPITAL LETTER X */ + /* 71*/ 0x0079, 1, 0x0059, /* LATIN CAPITAL LETTER Y */ + /* 74*/ 0x007a, 1, 0x005a, /* LATIN CAPITAL LETTER Z */ + /* 77*/ 0x00e0, 1, 0x00c0, /* LATIN CAPITAL LETTER A WITH GRAVE */ + /* 80*/ 0x00e1, 1, 0x00c1, /* LATIN CAPITAL LETTER A WITH ACUTE */ + /* 83*/ 0x00e2, 1, 0x00c2, /* LATIN CAPITAL LETTER A WITH CIRCU.. */ + /* 86*/ 0x00e3, 1, 0x00c3, /* LATIN CAPITAL LETTER A WITH TILDE */ + /* 89*/ 0x00e4, 1, 0x00c4, /* LATIN CAPITAL LETTER A WITH DIAER.. */ + /* 92*/ 0x00e5, 2, 0x00c5, 0x212b, /* LATIN CAPITAL LETTER A WITH RING .. */ + /* 96*/ 0x00e6, 1, 0x00c6, /* LATIN CAPITAL LETTER AE */ + /* 99*/ 0x00e7, 1, 0x00c7, /* LATIN CAPITAL LETTER C WITH CEDIL.. */ + /* 102*/ 0x00e8, 1, 0x00c8, /* LATIN CAPITAL LETTER E WITH GRAVE */ + /* 105*/ 0x00e9, 1, 0x00c9, /* LATIN CAPITAL LETTER E WITH ACUTE */ + /* 108*/ 0x00ea, 1, 0x00ca, /* LATIN CAPITAL LETTER E WITH CIRCU.. */ + /* 111*/ 0x00eb, 1, 0x00cb, /* LATIN CAPITAL LETTER E WITH DIAER.. */ + /* 114*/ 0x00ec, 1, 0x00cc, /* LATIN CAPITAL LETTER I WITH GRAVE */ + /* 117*/ 0x00ed, 1, 0x00cd, /* LATIN CAPITAL LETTER I WITH ACUTE */ + /* 120*/ 0x00ee, 1, 0x00ce, /* LATIN CAPITAL LETTER I WITH CIRCU.. */ + /* 123*/ 0x00ef, 1, 0x00cf, /* LATIN CAPITAL LETTER I WITH DIAER.. */ + /* 126*/ 0x00f0, 1, 0x00d0, /* LATIN CAPITAL LETTER ETH */ + /* 129*/ 0x00f1, 1, 0x00d1, /* LATIN CAPITAL LETTER N WITH TILDE */ + /* 132*/ 0x00f2, 1, 0x00d2, /* LATIN CAPITAL LETTER O WITH GRAVE */ + /* 135*/ 0x00f3, 1, 0x00d3, /* LATIN CAPITAL LETTER O WITH ACUTE */ + /* 138*/ 0x00f4, 1, 0x00d4, /* LATIN CAPITAL LETTER O WITH CIRCU.. */ + /* 141*/ 0x00f5, 1, 0x00d5, /* LATIN CAPITAL LETTER O WITH TILDE */ + /* 144*/ 0x00f6, 1, 0x00d6, /* LATIN CAPITAL LETTER O WITH DIAER.. */ + /* 147*/ 0x00f8, 1, 0x00d8, /* LATIN CAPITAL LETTER O WITH STROKE */ + /* 150*/ 0x00f9, 1, 0x00d9, /* LATIN CAPITAL LETTER U WITH GRAVE */ + /* 153*/ 0x00fa, 1, 0x00da, /* LATIN CAPITAL LETTER U WITH ACUTE */ + /* 156*/ 0x00fb, 1, 0x00db, /* LATIN CAPITAL LETTER U WITH CIRCU.. */ + /* 159*/ 0x00fc, 1, 0x00dc, /* LATIN CAPITAL LETTER U WITH DIAER.. */ + /* 162*/ 0x00fd, 1, 0x00dd, /* LATIN CAPITAL LETTER Y WITH ACUTE */ + /* 165*/ 0x00fe, 1, 0x00de, /* LATIN CAPITAL LETTER THORN */ + /* 168*/ 0x00ff, 1, 0x0178, /* LATIN CAPITAL LETTER Y WITH DIAER.. */ + /* 171*/ 0x0101, 1, 0x0100, /* LATIN CAPITAL LETTER A WITH MACRON */ + /* 174*/ 0x0103, 1, 0x0102, /* LATIN CAPITAL LETTER A WITH BREVE */ + /* 177*/ 0x0105, 1, 0x0104, /* LATIN CAPITAL LETTER A WITH OGONEK */ + /* 180*/ 0x0107, 1, 0x0106, /* LATIN CAPITAL LETTER C WITH ACUTE */ + /* 183*/ 0x0109, 1, 0x0108, /* LATIN CAPITAL LETTER C WITH CIRCU.. */ + /* 186*/ 0x010b, 1, 0x010a, /* LATIN CAPITAL LETTER C WITH DOT A.. */ + /* 189*/ 0x010d, 1, 0x010c, /* LATIN CAPITAL LETTER C WITH CARON */ + /* 192*/ 0x010f, 1, 0x010e, /* LATIN CAPITAL LETTER D WITH CARON */ + /* 195*/ 0x0111, 1, 0x0110, /* LATIN CAPITAL LETTER D WITH STROKE */ + /* 198*/ 0x0113, 1, 0x0112, /* LATIN CAPITAL LETTER E WITH MACRON */ + /* 201*/ 0x0115, 1, 0x0114, /* LATIN CAPITAL LETTER E WITH BREVE */ + /* 204*/ 0x0117, 1, 0x0116, /* LATIN CAPITAL LETTER E WITH DOT A.. */ + /* 207*/ 0x0119, 1, 0x0118, /* LATIN CAPITAL LETTER E WITH OGONEK */ + /* 210*/ 0x011b, 1, 0x011a, /* LATIN CAPITAL LETTER E WITH CARON */ + /* 213*/ 0x011d, 1, 0x011c, /* LATIN CAPITAL LETTER G WITH CIRCU.. */ + /* 216*/ 0x011f, 1, 0x011e, /* LATIN CAPITAL LETTER G WITH BREVE */ + /* 219*/ 0x0121, 1, 0x0120, /* LATIN CAPITAL LETTER G WITH DOT A.. */ + /* 222*/ 0x0123, 1, 0x0122, /* LATIN CAPITAL LETTER G WITH CEDIL.. */ + /* 225*/ 0x0125, 1, 0x0124, /* LATIN CAPITAL LETTER H WITH CIRCU.. */ + /* 228*/ 0x0127, 1, 0x0126, /* LATIN CAPITAL LETTER H WITH STROKE */ + /* 231*/ 0x0129, 1, 0x0128, /* LATIN CAPITAL LETTER I WITH TILDE */ + /* 234*/ 0x012b, 1, 0x012a, /* LATIN CAPITAL LETTER I WITH MACRON */ + /* 237*/ 0x012d, 1, 0x012c, /* LATIN CAPITAL LETTER I WITH BREVE */ + /* 240*/ 0x012f, 1, 0x012e, /* LATIN CAPITAL LETTER I WITH OGONEK */ + /* 243*/ 0x0133, 1, 0x0132, /* LATIN CAPITAL LIGATURE IJ */ + /* 246*/ 0x0135, 1, 0x0134, /* LATIN CAPITAL LETTER J WITH CIRCU.. */ + /* 249*/ 0x0137, 1, 0x0136, /* LATIN CAPITAL LETTER K WITH CEDIL.. */ + /* 252*/ 0x013a, 1, 0x0139, /* LATIN CAPITAL LETTER L WITH ACUTE */ + /* 255*/ 0x013c, 1, 0x013b, /* LATIN CAPITAL LETTER L WITH CEDIL.. */ + /* 258*/ 0x013e, 1, 0x013d, /* LATIN CAPITAL LETTER L WITH CARON */ + /* 261*/ 0x0140, 1, 0x013f, /* LATIN CAPITAL LETTER L WITH MIDDL.. */ + /* 264*/ 0x0142, 1, 0x0141, /* LATIN CAPITAL LETTER L WITH STROKE */ + /* 267*/ 0x0144, 1, 0x0143, /* LATIN CAPITAL LETTER N WITH ACUTE */ + /* 270*/ 0x0146, 1, 0x0145, /* LATIN CAPITAL LETTER N WITH CEDIL.. */ + /* 273*/ 0x0148, 1, 0x0147, /* LATIN CAPITAL LETTER N WITH CARON */ + /* 276*/ 0x014b, 1, 0x014a, /* LATIN CAPITAL LETTER ENG */ + /* 279*/ 0x014d, 1, 0x014c, /* LATIN CAPITAL LETTER O WITH MACRON */ + /* 282*/ 0x014f, 1, 0x014e, /* LATIN CAPITAL LETTER O WITH BREVE */ + /* 285*/ 0x0151, 1, 0x0150, /* LATIN CAPITAL LETTER O WITH DOUBL.. */ + /* 288*/ 0x0153, 1, 0x0152, /* LATIN CAPITAL LIGATURE OE */ + /* 291*/ 0x0155, 1, 0x0154, /* LATIN CAPITAL LETTER R WITH ACUTE */ + /* 294*/ 0x0157, 1, 0x0156, /* LATIN CAPITAL LETTER R WITH CEDIL.. */ + /* 297*/ 0x0159, 1, 0x0158, /* LATIN CAPITAL LETTER R WITH CARON */ + /* 300*/ 0x015b, 1, 0x015a, /* LATIN CAPITAL LETTER S WITH ACUTE */ + /* 303*/ 0x015d, 1, 0x015c, /* LATIN CAPITAL LETTER S WITH CIRCU.. */ + /* 306*/ 0x015f, 1, 0x015e, /* LATIN CAPITAL LETTER S WITH CEDIL.. */ + /* 309*/ 0x0161, 1, 0x0160, /* LATIN CAPITAL LETTER S WITH CARON */ + /* 312*/ 0x0163, 1, 0x0162, /* LATIN CAPITAL LETTER T WITH CEDIL.. */ + /* 315*/ 0x0165, 1, 0x0164, /* LATIN CAPITAL LETTER T WITH CARON */ + /* 318*/ 0x0167, 1, 0x0166, /* LATIN CAPITAL LETTER T WITH STROKE */ + /* 321*/ 0x0169, 1, 0x0168, /* LATIN CAPITAL LETTER U WITH TILDE */ + /* 324*/ 0x016b, 1, 0x016a, /* LATIN CAPITAL LETTER U WITH MACRON */ + /* 327*/ 0x016d, 1, 0x016c, /* LATIN CAPITAL LETTER U WITH BREVE */ + /* 330*/ 0x016f, 1, 0x016e, /* LATIN CAPITAL LETTER U WITH RING .. */ + /* 333*/ 0x0171, 1, 0x0170, /* LATIN CAPITAL LETTER U WITH DOUBL.. */ + /* 336*/ 0x0173, 1, 0x0172, /* LATIN CAPITAL LETTER U WITH OGONEK */ + /* 339*/ 0x0175, 1, 0x0174, /* LATIN CAPITAL LETTER W WITH CIRCU.. */ + /* 342*/ 0x0177, 1, 0x0176, /* LATIN CAPITAL LETTER Y WITH CIRCU.. */ + /* 345*/ 0x017a, 1, 0x0179, /* LATIN CAPITAL LETTER Z WITH ACUTE */ + /* 348*/ 0x017c, 1, 0x017b, /* LATIN CAPITAL LETTER Z WITH DOT A.. */ + /* 351*/ 0x017e, 1, 0x017d, /* LATIN CAPITAL LETTER Z WITH CARON */ + /* 354*/ 0x0180, 1, 0x0243, /* LATIN CAPITAL LETTER B WITH STROKE */ + /* 357*/ 0x0183, 1, 0x0182, /* LATIN CAPITAL LETTER B WITH TOPBAR */ + /* 360*/ 0x0185, 1, 0x0184, /* LATIN CAPITAL LETTER TONE SIX */ + /* 363*/ 0x0188, 1, 0x0187, /* LATIN CAPITAL LETTER C WITH HOOK */ + /* 366*/ 0x018c, 1, 0x018b, /* LATIN CAPITAL LETTER D WITH TOPBAR */ + /* 369*/ 0x0192, 1, 0x0191, /* LATIN CAPITAL LETTER F WITH HOOK */ + /* 372*/ 0x0195, 1, 0x01f6, /* LATIN CAPITAL LETTER HWAIR */ + /* 375*/ 0x0199, 1, 0x0198, /* LATIN CAPITAL LETTER K WITH HOOK */ + /* 378*/ 0x019a, 1, 0x023d, /* LATIN CAPITAL LETTER L WITH BAR */ + /* 381*/ 0x019b, 1, 0xa7dc, /* LATIN CAPITAL LETTER LAMBDA WITH .. */ + /* 384*/ 0x019e, 1, 0x0220, /* LATIN CAPITAL LETTER N WITH LONG .. */ + /* 387*/ 0x01a1, 1, 0x01a0, /* LATIN CAPITAL LETTER O WITH HORN */ + /* 390*/ 0x01a3, 1, 0x01a2, /* LATIN CAPITAL LETTER OI */ + /* 393*/ 0x01a5, 1, 0x01a4, /* LATIN CAPITAL LETTER P WITH HOOK */ + /* 396*/ 0x01a8, 1, 0x01a7, /* LATIN CAPITAL LETTER TONE TWO */ + /* 399*/ 0x01ad, 1, 0x01ac, /* LATIN CAPITAL LETTER T WITH HOOK */ + /* 402*/ 0x01b0, 1, 0x01af, /* LATIN CAPITAL LETTER U WITH HORN */ + /* 405*/ 0x01b4, 1, 0x01b3, /* LATIN CAPITAL LETTER Y WITH HOOK */ + /* 408*/ 0x01b6, 1, 0x01b5, /* LATIN CAPITAL LETTER Z WITH STROKE */ + /* 411*/ 0x01b9, 1, 0x01b8, /* LATIN CAPITAL LETTER EZH REVERSED */ + /* 414*/ 0x01bd, 1, 0x01bc, /* LATIN CAPITAL LETTER TONE FIVE */ + /* 417*/ 0x01bf, 1, 0x01f7, /* LATIN CAPITAL LETTER WYNN */ + /* 420*/ 0x01c6, 2, 0x01c4, 0x01c5, /* LATIN CAPITAL LETTER DZ WITH CARON */ + /* 424*/ 0x01c9, 2, 0x01c7, 0x01c8, /* LATIN CAPITAL LETTER LJ */ + /* 428*/ 0x01cc, 2, 0x01ca, 0x01cb, /* LATIN CAPITAL LETTER NJ */ + /* 432*/ 0x01ce, 1, 0x01cd, /* LATIN CAPITAL LETTER A WITH CARON */ + /* 435*/ 0x01d0, 1, 0x01cf, /* LATIN CAPITAL LETTER I WITH CARON */ + /* 438*/ 0x01d2, 1, 0x01d1, /* LATIN CAPITAL LETTER O WITH CARON */ + /* 441*/ 0x01d4, 1, 0x01d3, /* LATIN CAPITAL LETTER U WITH CARON */ + /* 444*/ 0x01d6, 1, 0x01d5, /* LATIN CAPITAL LETTER U WITH DIAER.. */ + /* 447*/ 0x01d8, 1, 0x01d7, /* LATIN CAPITAL LETTER U WITH DIAER.. */ + /* 450*/ 0x01da, 1, 0x01d9, /* LATIN CAPITAL LETTER U WITH DIAER.. */ + /* 453*/ 0x01dc, 1, 0x01db, /* LATIN CAPITAL LETTER U WITH DIAER.. */ + /* 456*/ 0x01dd, 1, 0x018e, /* LATIN CAPITAL LETTER REVERSED E */ + /* 459*/ 0x01df, 1, 0x01de, /* LATIN CAPITAL LETTER A WITH DIAER.. */ + /* 462*/ 0x01e1, 1, 0x01e0, /* LATIN CAPITAL LETTER A WITH DOT A.. */ + /* 465*/ 0x01e3, 1, 0x01e2, /* LATIN CAPITAL LETTER AE WITH MACR.. */ + /* 468*/ 0x01e5, 1, 0x01e4, /* LATIN CAPITAL LETTER G WITH STROKE */ + /* 471*/ 0x01e7, 1, 0x01e6, /* LATIN CAPITAL LETTER G WITH CARON */ + /* 474*/ 0x01e9, 1, 0x01e8, /* LATIN CAPITAL LETTER K WITH CARON */ + /* 477*/ 0x01eb, 1, 0x01ea, /* LATIN CAPITAL LETTER O WITH OGONEK */ + /* 480*/ 0x01ed, 1, 0x01ec, /* LATIN CAPITAL LETTER O WITH OGONE.. */ + /* 483*/ 0x01ef, 1, 0x01ee, /* LATIN CAPITAL LETTER EZH WITH CAR.. */ + /* 486*/ 0x01f3, 2, 0x01f1, 0x01f2, /* LATIN CAPITAL LETTER DZ */ + /* 490*/ 0x01f5, 1, 0x01f4, /* LATIN CAPITAL LETTER G WITH ACUTE */ + /* 493*/ 0x01f9, 1, 0x01f8, /* LATIN CAPITAL LETTER N WITH GRAVE */ + /* 496*/ 0x01fb, 1, 0x01fa, /* LATIN CAPITAL LETTER A WITH RING .. */ + /* 499*/ 0x01fd, 1, 0x01fc, /* LATIN CAPITAL LETTER AE WITH ACUTE */ + /* 502*/ 0x01ff, 1, 0x01fe, /* LATIN CAPITAL LETTER O WITH STROK.. */ + /* 505*/ 0x0201, 1, 0x0200, /* LATIN CAPITAL LETTER A WITH DOUBL.. */ + /* 508*/ 0x0203, 1, 0x0202, /* LATIN CAPITAL LETTER A WITH INVER.. */ + /* 511*/ 0x0205, 1, 0x0204, /* LATIN CAPITAL LETTER E WITH DOUBL.. */ + /* 514*/ 0x0207, 1, 0x0206, /* LATIN CAPITAL LETTER E WITH INVER.. */ + /* 517*/ 0x0209, 1, 0x0208, /* LATIN CAPITAL LETTER I WITH DOUBL.. */ + /* 520*/ 0x020b, 1, 0x020a, /* LATIN CAPITAL LETTER I WITH INVER.. */ + /* 523*/ 0x020d, 1, 0x020c, /* LATIN CAPITAL LETTER O WITH DOUBL.. */ + /* 526*/ 0x020f, 1, 0x020e, /* LATIN CAPITAL LETTER O WITH INVER.. */ + /* 529*/ 0x0211, 1, 0x0210, /* LATIN CAPITAL LETTER R WITH DOUBL.. */ + /* 532*/ 0x0213, 1, 0x0212, /* LATIN CAPITAL LETTER R WITH INVER.. */ + /* 535*/ 0x0215, 1, 0x0214, /* LATIN CAPITAL LETTER U WITH DOUBL.. */ + /* 538*/ 0x0217, 1, 0x0216, /* LATIN CAPITAL LETTER U WITH INVER.. */ + /* 541*/ 0x0219, 1, 0x0218, /* LATIN CAPITAL LETTER S WITH COMMA.. */ + /* 544*/ 0x021b, 1, 0x021a, /* LATIN CAPITAL LETTER T WITH COMMA.. */ + /* 547*/ 0x021d, 1, 0x021c, /* LATIN CAPITAL LETTER YOGH */ + /* 550*/ 0x021f, 1, 0x021e, /* LATIN CAPITAL LETTER H WITH CARON */ + /* 553*/ 0x0223, 1, 0x0222, /* LATIN CAPITAL LETTER OU */ + /* 556*/ 0x0225, 1, 0x0224, /* LATIN CAPITAL LETTER Z WITH HOOK */ + /* 559*/ 0x0227, 1, 0x0226, /* LATIN CAPITAL LETTER A WITH DOT A.. */ + /* 562*/ 0x0229, 1, 0x0228, /* LATIN CAPITAL LETTER E WITH CEDIL.. */ + /* 565*/ 0x022b, 1, 0x022a, /* LATIN CAPITAL LETTER O WITH DIAER.. */ + /* 568*/ 0x022d, 1, 0x022c, /* LATIN CAPITAL LETTER O WITH TILDE.. */ + /* 571*/ 0x022f, 1, 0x022e, /* LATIN CAPITAL LETTER O WITH DOT A.. */ + /* 574*/ 0x0231, 1, 0x0230, /* LATIN CAPITAL LETTER O WITH DOT A.. */ + /* 577*/ 0x0233, 1, 0x0232, /* LATIN CAPITAL LETTER Y WITH MACRON */ + /* 580*/ 0x023c, 1, 0x023b, /* LATIN CAPITAL LETTER C WITH STROKE */ + /* 583*/ 0x023f, 1, 0x2c7e, /* LATIN CAPITAL LETTER S WITH SWASH.. */ + /* 586*/ 0x0240, 1, 0x2c7f, /* LATIN CAPITAL LETTER Z WITH SWASH.. */ + /* 589*/ 0x0242, 1, 0x0241, /* LATIN CAPITAL LETTER GLOTTAL STOP */ + /* 592*/ 0x0247, 1, 0x0246, /* LATIN CAPITAL LETTER E WITH STROKE */ + /* 595*/ 0x0249, 1, 0x0248, /* LATIN CAPITAL LETTER J WITH STROKE */ + /* 598*/ 0x024b, 1, 0x024a, /* LATIN CAPITAL LETTER SMALL Q WITH.. */ + /* 601*/ 0x024d, 1, 0x024c, /* LATIN CAPITAL LETTER R WITH STROKE */ + /* 604*/ 0x024f, 1, 0x024e, /* LATIN CAPITAL LETTER Y WITH STROKE */ + /* 607*/ 0x0250, 1, 0x2c6f, /* LATIN CAPITAL LETTER TURNED A */ + /* 610*/ 0x0251, 1, 0x2c6d, /* LATIN CAPITAL LETTER ALPHA */ + /* 613*/ 0x0252, 1, 0x2c70, /* LATIN CAPITAL LETTER TURNED ALPHA */ + /* 616*/ 0x0253, 1, 0x0181, /* LATIN CAPITAL LETTER B WITH HOOK */ + /* 619*/ 0x0254, 1, 0x0186, /* LATIN CAPITAL LETTER OPEN O */ + /* 622*/ 0x0256, 1, 0x0189, /* LATIN CAPITAL LETTER AFRICAN D */ + /* 625*/ 0x0257, 1, 0x018a, /* LATIN CAPITAL LETTER D WITH HOOK */ + /* 628*/ 0x0259, 1, 0x018f, /* LATIN CAPITAL LETTER SCHWA */ + /* 631*/ 0x025b, 1, 0x0190, /* LATIN CAPITAL LETTER OPEN E */ + /* 634*/ 0x025c, 1, 0xa7ab, /* LATIN CAPITAL LETTER REVERSED OPE.. */ + /* 637*/ 0x0260, 1, 0x0193, /* LATIN CAPITAL LETTER G WITH HOOK */ + /* 640*/ 0x0261, 1, 0xa7ac, /* LATIN CAPITAL LETTER SCRIPT G */ + /* 643*/ 0x0263, 1, 0x0194, /* LATIN CAPITAL LETTER GAMMA */ + /* 646*/ 0x0264, 1, 0xa7cb, /* LATIN CAPITAL LETTER RAMS HORN */ + /* 649*/ 0x0265, 1, 0xa78d, /* LATIN CAPITAL LETTER TURNED H */ + /* 652*/ 0x0266, 1, 0xa7aa, /* LATIN CAPITAL LETTER H WITH HOOK */ + /* 655*/ 0x0268, 1, 0x0197, /* LATIN CAPITAL LETTER I WITH STROKE */ + /* 658*/ 0x0269, 1, 0x0196, /* LATIN CAPITAL LETTER IOTA */ + /* 661*/ 0x026a, 1, 0xa7ae, /* LATIN CAPITAL LETTER SMALL CAPITA.. */ + /* 664*/ 0x026b, 1, 0x2c62, /* LATIN CAPITAL LETTER L WITH MIDDL.. */ + /* 667*/ 0x026c, 1, 0xa7ad, /* LATIN CAPITAL LETTER L WITH BELT */ + /* 670*/ 0x026f, 1, 0x019c, /* LATIN CAPITAL LETTER TURNED M */ + /* 673*/ 0x0271, 1, 0x2c6e, /* LATIN CAPITAL LETTER M WITH HOOK */ + /* 676*/ 0x0272, 1, 0x019d, /* LATIN CAPITAL LETTER N WITH LEFT .. */ + /* 679*/ 0x0275, 1, 0x019f, /* LATIN CAPITAL LETTER O WITH MIDDL.. */ + /* 682*/ 0x027d, 1, 0x2c64, /* LATIN CAPITAL LETTER R WITH TAIL */ + /* 685*/ 0x0280, 1, 0x01a6, /* LATIN LETTER YR */ + /* 688*/ 0x0282, 1, 0xa7c5, /* LATIN CAPITAL LETTER S WITH HOOK */ + /* 691*/ 0x0283, 1, 0x01a9, /* LATIN CAPITAL LETTER ESH */ + /* 694*/ 0x0287, 1, 0xa7b1, /* LATIN CAPITAL LETTER TURNED T */ + /* 697*/ 0x0288, 1, 0x01ae, /* LATIN CAPITAL LETTER T WITH RETRO.. */ + /* 700*/ 0x0289, 1, 0x0244, /* LATIN CAPITAL LETTER U BAR */ + /* 703*/ 0x028a, 1, 0x01b1, /* LATIN CAPITAL LETTER UPSILON */ + /* 706*/ 0x028b, 1, 0x01b2, /* LATIN CAPITAL LETTER V WITH HOOK */ + /* 709*/ 0x028c, 1, 0x0245, /* LATIN CAPITAL LETTER TURNED V */ + /* 712*/ 0x0292, 1, 0x01b7, /* LATIN CAPITAL LETTER EZH */ + /* 715*/ 0x029d, 1, 0xa7b2, /* LATIN CAPITAL LETTER J WITH CROSS.. */ + /* 718*/ 0x029e, 1, 0xa7b0, /* LATIN CAPITAL LETTER TURNED K */ + /* 721*/ 0x0371, 1, 0x0370, /* GREEK CAPITAL LETTER HETA */ + /* 724*/ 0x0373, 1, 0x0372, /* GREEK CAPITAL LETTER ARCHAIC SAMPI */ + /* 727*/ 0x0377, 1, 0x0376, /* GREEK CAPITAL LETTER PAMPHYLIAN D.. */ + /* 730*/ 0x037b, 1, 0x03fd, /* GREEK CAPITAL REVERSED LUNATE SIG.. */ + /* 733*/ 0x037c, 1, 0x03fe, /* GREEK CAPITAL DOTTED LUNATE SIGMA.. */ + /* 736*/ 0x037d, 1, 0x03ff, /* GREEK CAPITAL REVERSED DOTTED LUN.. */ + /* 739*/ 0x03ac, 1, 0x0386, /* GREEK CAPITAL LETTER ALPHA WITH T.. */ + /* 742*/ 0x03ad, 1, 0x0388, /* GREEK CAPITAL LETTER EPSILON WITH.. */ + /* 745*/ 0x03ae, 1, 0x0389, /* GREEK CAPITAL LETTER ETA WITH TON.. */ + /* 748*/ 0x03af, 1, 0x038a, /* GREEK CAPITAL LETTER IOTA WITH TO.. */ + /* 751*/ 0x03b1, 1, 0x0391, /* GREEK CAPITAL LETTER ALPHA */ + /* 754*/ 0x03b2, 2, 0x0392, 0x03d0, /* GREEK CAPITAL LETTER BETA */ + /* 758*/ 0x03b3, 1, 0x0393, /* GREEK CAPITAL LETTER GAMMA */ + /* 761*/ 0x03b4, 1, 0x0394, /* GREEK CAPITAL LETTER DELTA */ + /* 764*/ 0x03b5, 2, 0x0395, 0x03f5, /* GREEK CAPITAL LETTER EPSILON */ + /* 768*/ 0x03b6, 1, 0x0396, /* GREEK CAPITAL LETTER ZETA */ + /* 771*/ 0x03b7, 1, 0x0397, /* GREEK CAPITAL LETTER ETA */ + /* 774*/ 0x03b8, 3, 0x0398, 0x03d1, 0x03f4, /* GREEK CAPITAL LETTER THETA */ + /* 779*/ 0x03b9, 3, 0x0345, 0x0399, 0x1fbe, /* COMBINING GREEK YPOGEGRAMMENI */ + /* 784*/ 0x03ba, 2, 0x039a, 0x03f0, /* GREEK CAPITAL LETTER KAPPA */ + /* 788*/ 0x03bb, 1, 0x039b, /* GREEK CAPITAL LETTER LAMDA */ + /* 791*/ 0x03bc, 2, 0x00b5, 0x039c, /* MICRO SIGN */ + /* 795*/ 0x03bd, 1, 0x039d, /* GREEK CAPITAL LETTER NU */ + /* 798*/ 0x03be, 1, 0x039e, /* GREEK CAPITAL LETTER XI */ + /* 801*/ 0x03bf, 1, 0x039f, /* GREEK CAPITAL LETTER OMICRON */ + /* 804*/ 0x03c0, 2, 0x03a0, 0x03d6, /* GREEK CAPITAL LETTER PI */ + /* 808*/ 0x03c1, 2, 0x03a1, 0x03f1, /* GREEK CAPITAL LETTER RHO */ + /* 812*/ 0x03c3, 2, 0x03a3, 0x03c2, /* GREEK CAPITAL LETTER SIGMA */ + /* 816*/ 0x03c4, 1, 0x03a4, /* GREEK CAPITAL LETTER TAU */ + /* 819*/ 0x03c5, 1, 0x03a5, /* GREEK CAPITAL LETTER UPSILON */ + /* 822*/ 0x03c6, 2, 0x03a6, 0x03d5, /* GREEK CAPITAL LETTER PHI */ + /* 826*/ 0x03c7, 1, 0x03a7, /* GREEK CAPITAL LETTER CHI */ + /* 829*/ 0x03c8, 1, 0x03a8, /* GREEK CAPITAL LETTER PSI */ + /* 832*/ 0x03c9, 2, 0x03a9, 0x2126, /* GREEK CAPITAL LETTER OMEGA */ + /* 836*/ 0x03ca, 1, 0x03aa, /* GREEK CAPITAL LETTER IOTA WITH DI.. */ + /* 839*/ 0x03cb, 1, 0x03ab, /* GREEK CAPITAL LETTER UPSILON WITH.. */ + /* 842*/ 0x03cc, 1, 0x038c, /* GREEK CAPITAL LETTER OMICRON WITH.. */ + /* 845*/ 0x03cd, 1, 0x038e, /* GREEK CAPITAL LETTER UPSILON WITH.. */ + /* 848*/ 0x03ce, 1, 0x038f, /* GREEK CAPITAL LETTER OMEGA WITH T.. */ + /* 851*/ 0x03d7, 1, 0x03cf, /* GREEK CAPITAL KAI SYMBOL */ + /* 854*/ 0x03d9, 1, 0x03d8, /* GREEK LETTER ARCHAIC KOPPA */ + /* 857*/ 0x03db, 1, 0x03da, /* GREEK LETTER STIGMA */ + /* 860*/ 0x03dd, 1, 0x03dc, /* GREEK LETTER DIGAMMA */ + /* 863*/ 0x03df, 1, 0x03de, /* GREEK LETTER KOPPA */ + /* 866*/ 0x03e1, 1, 0x03e0, /* GREEK LETTER SAMPI */ + /* 869*/ 0x03e3, 1, 0x03e2, /* COPTIC CAPITAL LETTER SHEI */ + /* 872*/ 0x03e5, 1, 0x03e4, /* COPTIC CAPITAL LETTER FEI */ + /* 875*/ 0x03e7, 1, 0x03e6, /* COPTIC CAPITAL LETTER KHEI */ + /* 878*/ 0x03e9, 1, 0x03e8, /* COPTIC CAPITAL LETTER HORI */ + /* 881*/ 0x03eb, 1, 0x03ea, /* COPTIC CAPITAL LETTER GANGIA */ + /* 884*/ 0x03ed, 1, 0x03ec, /* COPTIC CAPITAL LETTER SHIMA */ + /* 887*/ 0x03ef, 1, 0x03ee, /* COPTIC CAPITAL LETTER DEI */ + /* 890*/ 0x03f2, 1, 0x03f9, /* GREEK CAPITAL LUNATE SIGMA SYMBOL */ + /* 893*/ 0x03f3, 1, 0x037f, /* GREEK CAPITAL LETTER YOT */ + /* 896*/ 0x03f8, 1, 0x03f7, /* GREEK CAPITAL LETTER SHO */ + /* 899*/ 0x03fb, 1, 0x03fa, /* GREEK CAPITAL LETTER SAN */ + /* 902*/ 0x0430, 1, 0x0410, /* CYRILLIC CAPITAL LETTER A */ + /* 905*/ 0x0431, 1, 0x0411, /* CYRILLIC CAPITAL LETTER BE */ + /* 908*/ 0x0432, 2, 0x0412, 0x1c80, /* CYRILLIC CAPITAL LETTER VE */ + /* 912*/ 0x0433, 1, 0x0413, /* CYRILLIC CAPITAL LETTER GHE */ + /* 915*/ 0x0434, 2, 0x0414, 0x1c81, /* CYRILLIC CAPITAL LETTER DE */ + /* 919*/ 0x0435, 1, 0x0415, /* CYRILLIC CAPITAL LETTER IE */ + /* 922*/ 0x0436, 1, 0x0416, /* CYRILLIC CAPITAL LETTER ZHE */ + /* 925*/ 0x0437, 1, 0x0417, /* CYRILLIC CAPITAL LETTER ZE */ + /* 928*/ 0x0438, 1, 0x0418, /* CYRILLIC CAPITAL LETTER I */ + /* 931*/ 0x0439, 1, 0x0419, /* CYRILLIC CAPITAL LETTER SHORT I */ + /* 934*/ 0x043a, 1, 0x041a, /* CYRILLIC CAPITAL LETTER KA */ + /* 937*/ 0x043b, 1, 0x041b, /* CYRILLIC CAPITAL LETTER EL */ + /* 940*/ 0x043c, 1, 0x041c, /* CYRILLIC CAPITAL LETTER EM */ + /* 943*/ 0x043d, 1, 0x041d, /* CYRILLIC CAPITAL LETTER EN */ + /* 946*/ 0x043e, 2, 0x041e, 0x1c82, /* CYRILLIC CAPITAL LETTER O */ + /* 950*/ 0x043f, 1, 0x041f, /* CYRILLIC CAPITAL LETTER PE */ + /* 953*/ 0x0440, 1, 0x0420, /* CYRILLIC CAPITAL LETTER ER */ + /* 956*/ 0x0441, 2, 0x0421, 0x1c83, /* CYRILLIC CAPITAL LETTER ES */ + /* 960*/ 0x0442, 3, 0x0422, 0x1c84, 0x1c85, /* CYRILLIC CAPITAL LETTER TE */ + /* 965*/ 0x0443, 1, 0x0423, /* CYRILLIC CAPITAL LETTER U */ + /* 968*/ 0x0444, 1, 0x0424, /* CYRILLIC CAPITAL LETTER EF */ + /* 971*/ 0x0445, 1, 0x0425, /* CYRILLIC CAPITAL LETTER HA */ + /* 974*/ 0x0446, 1, 0x0426, /* CYRILLIC CAPITAL LETTER TSE */ + /* 977*/ 0x0447, 1, 0x0427, /* CYRILLIC CAPITAL LETTER CHE */ + /* 980*/ 0x0448, 1, 0x0428, /* CYRILLIC CAPITAL LETTER SHA */ + /* 983*/ 0x0449, 1, 0x0429, /* CYRILLIC CAPITAL LETTER SHCHA */ + /* 986*/ 0x044a, 2, 0x042a, 0x1c86, /* CYRILLIC CAPITAL LETTER HARD SIGN */ + /* 990*/ 0x044b, 1, 0x042b, /* CYRILLIC CAPITAL LETTER YERU */ + /* 993*/ 0x044c, 1, 0x042c, /* CYRILLIC CAPITAL LETTER SOFT SIGN */ + /* 996*/ 0x044d, 1, 0x042d, /* CYRILLIC CAPITAL LETTER E */ + /* 999*/ 0x044e, 1, 0x042e, /* CYRILLIC CAPITAL LETTER YU */ + /*1002*/ 0x044f, 1, 0x042f, /* CYRILLIC CAPITAL LETTER YA */ + /*1005*/ 0x0450, 1, 0x0400, /* CYRILLIC CAPITAL LETTER IE WITH G.. */ + /*1008*/ 0x0451, 1, 0x0401, /* CYRILLIC CAPITAL LETTER IO */ + /*1011*/ 0x0452, 1, 0x0402, /* CYRILLIC CAPITAL LETTER DJE */ + /*1014*/ 0x0453, 1, 0x0403, /* CYRILLIC CAPITAL LETTER GJE */ + /*1017*/ 0x0454, 1, 0x0404, /* CYRILLIC CAPITAL LETTER UKRAINIAN.. */ + /*1020*/ 0x0455, 1, 0x0405, /* CYRILLIC CAPITAL LETTER DZE */ + /*1023*/ 0x0456, 1, 0x0406, /* CYRILLIC CAPITAL LETTER BYELORUSS.. */ + /*1026*/ 0x0457, 1, 0x0407, /* CYRILLIC CAPITAL LETTER YI */ + /*1029*/ 0x0458, 1, 0x0408, /* CYRILLIC CAPITAL LETTER JE */ + /*1032*/ 0x0459, 1, 0x0409, /* CYRILLIC CAPITAL LETTER LJE */ + /*1035*/ 0x045a, 1, 0x040a, /* CYRILLIC CAPITAL LETTER NJE */ + /*1038*/ 0x045b, 1, 0x040b, /* CYRILLIC CAPITAL LETTER TSHE */ + /*1041*/ 0x045c, 1, 0x040c, /* CYRILLIC CAPITAL LETTER KJE */ + /*1044*/ 0x045d, 1, 0x040d, /* CYRILLIC CAPITAL LETTER I WITH GR.. */ + /*1047*/ 0x045e, 1, 0x040e, /* CYRILLIC CAPITAL LETTER SHORT U */ + /*1050*/ 0x045f, 1, 0x040f, /* CYRILLIC CAPITAL LETTER DZHE */ + /*1053*/ 0x0461, 1, 0x0460, /* CYRILLIC CAPITAL LETTER OMEGA */ + /*1056*/ 0x0463, 2, 0x0462, 0x1c87, /* CYRILLIC CAPITAL LETTER YAT */ + /*1060*/ 0x0465, 1, 0x0464, /* CYRILLIC CAPITAL LETTER IOTIFIED E */ + /*1063*/ 0x0467, 1, 0x0466, /* CYRILLIC CAPITAL LETTER LITTLE YUS */ + /*1066*/ 0x0469, 1, 0x0468, /* CYRILLIC CAPITAL LETTER IOTIFIED .. */ + /*1069*/ 0x046b, 1, 0x046a, /* CYRILLIC CAPITAL LETTER BIG YUS */ + /*1072*/ 0x046d, 1, 0x046c, /* CYRILLIC CAPITAL LETTER IOTIFIED .. */ + /*1075*/ 0x046f, 1, 0x046e, /* CYRILLIC CAPITAL LETTER KSI */ + /*1078*/ 0x0471, 1, 0x0470, /* CYRILLIC CAPITAL LETTER PSI */ + /*1081*/ 0x0473, 1, 0x0472, /* CYRILLIC CAPITAL LETTER FITA */ + /*1084*/ 0x0475, 1, 0x0474, /* CYRILLIC CAPITAL LETTER IZHITSA */ + /*1087*/ 0x0477, 1, 0x0476, /* CYRILLIC CAPITAL LETTER IZHITSA W.. */ + /*1090*/ 0x0479, 1, 0x0478, /* CYRILLIC CAPITAL LETTER UK */ + /*1093*/ 0x047b, 1, 0x047a, /* CYRILLIC CAPITAL LETTER ROUND OME.. */ + /*1096*/ 0x047d, 1, 0x047c, /* CYRILLIC CAPITAL LETTER OMEGA WIT.. */ + /*1099*/ 0x047f, 1, 0x047e, /* CYRILLIC CAPITAL LETTER OT */ + /*1102*/ 0x0481, 1, 0x0480, /* CYRILLIC CAPITAL LETTER KOPPA */ + /*1105*/ 0x048b, 1, 0x048a, /* CYRILLIC CAPITAL LETTER SHORT I W.. */ + /*1108*/ 0x048d, 1, 0x048c, /* CYRILLIC CAPITAL LETTER SEMISOFT .. */ + /*1111*/ 0x048f, 1, 0x048e, /* CYRILLIC CAPITAL LETTER ER WITH T.. */ + /*1114*/ 0x0491, 1, 0x0490, /* CYRILLIC CAPITAL LETTER GHE WITH .. */ + /*1117*/ 0x0493, 1, 0x0492, /* CYRILLIC CAPITAL LETTER GHE WITH .. */ + /*1120*/ 0x0495, 1, 0x0494, /* CYRILLIC CAPITAL LETTER GHE WITH .. */ + /*1123*/ 0x0497, 1, 0x0496, /* CYRILLIC CAPITAL LETTER ZHE WITH .. */ + /*1126*/ 0x0499, 1, 0x0498, /* CYRILLIC CAPITAL LETTER ZE WITH D.. */ + /*1129*/ 0x049b, 1, 0x049a, /* CYRILLIC CAPITAL LETTER KA WITH D.. */ + /*1132*/ 0x049d, 1, 0x049c, /* CYRILLIC CAPITAL LETTER KA WITH V.. */ + /*1135*/ 0x049f, 1, 0x049e, /* CYRILLIC CAPITAL LETTER KA WITH S.. */ + /*1138*/ 0x04a1, 1, 0x04a0, /* CYRILLIC CAPITAL LETTER BASHKIR KA */ + /*1141*/ 0x04a3, 1, 0x04a2, /* CYRILLIC CAPITAL LETTER EN WITH D.. */ + /*1144*/ 0x04a5, 1, 0x04a4, /* CYRILLIC CAPITAL LIGATURE EN GHE */ + /*1147*/ 0x04a7, 1, 0x04a6, /* CYRILLIC CAPITAL LETTER PE WITH M.. */ + /*1150*/ 0x04a9, 1, 0x04a8, /* CYRILLIC CAPITAL LETTER ABKHASIAN.. */ + /*1153*/ 0x04ab, 1, 0x04aa, /* CYRILLIC CAPITAL LETTER ES WITH D.. */ + /*1156*/ 0x04ad, 1, 0x04ac, /* CYRILLIC CAPITAL LETTER TE WITH D.. */ + /*1159*/ 0x04af, 1, 0x04ae, /* CYRILLIC CAPITAL LETTER STRAIGHT U */ + /*1162*/ 0x04b1, 1, 0x04b0, /* CYRILLIC CAPITAL LETTER STRAIGHT .. */ + /*1165*/ 0x04b3, 1, 0x04b2, /* CYRILLIC CAPITAL LETTER HA WITH D.. */ + /*1168*/ 0x04b5, 1, 0x04b4, /* CYRILLIC CAPITAL LIGATURE TE TSE */ + /*1171*/ 0x04b7, 1, 0x04b6, /* CYRILLIC CAPITAL LETTER CHE WITH .. */ + /*1174*/ 0x04b9, 1, 0x04b8, /* CYRILLIC CAPITAL LETTER CHE WITH .. */ + /*1177*/ 0x04bb, 1, 0x04ba, /* CYRILLIC CAPITAL LETTER SHHA */ + /*1180*/ 0x04bd, 1, 0x04bc, /* CYRILLIC CAPITAL LETTER ABKHASIAN.. */ + /*1183*/ 0x04bf, 1, 0x04be, /* CYRILLIC CAPITAL LETTER ABKHASIAN.. */ + /*1186*/ 0x04c2, 1, 0x04c1, /* CYRILLIC CAPITAL LETTER ZHE WITH .. */ + /*1189*/ 0x04c4, 1, 0x04c3, /* CYRILLIC CAPITAL LETTER KA WITH H.. */ + /*1192*/ 0x04c6, 1, 0x04c5, /* CYRILLIC CAPITAL LETTER EL WITH T.. */ + /*1195*/ 0x04c8, 1, 0x04c7, /* CYRILLIC CAPITAL LETTER EN WITH H.. */ + /*1198*/ 0x04ca, 1, 0x04c9, /* CYRILLIC CAPITAL LETTER EN WITH T.. */ + /*1201*/ 0x04cc, 1, 0x04cb, /* CYRILLIC CAPITAL LETTER KHAKASSIA.. */ + /*1204*/ 0x04ce, 1, 0x04cd, /* CYRILLIC CAPITAL LETTER EM WITH T.. */ + /*1207*/ 0x04cf, 1, 0x04c0, /* CYRILLIC LETTER PALOCHKA */ + /*1210*/ 0x04d1, 1, 0x04d0, /* CYRILLIC CAPITAL LETTER A WITH BR.. */ + /*1213*/ 0x04d3, 1, 0x04d2, /* CYRILLIC CAPITAL LETTER A WITH DI.. */ + /*1216*/ 0x04d5, 1, 0x04d4, /* CYRILLIC CAPITAL LIGATURE A IE */ + /*1219*/ 0x04d7, 1, 0x04d6, /* CYRILLIC CAPITAL LETTER IE WITH B.. */ + /*1222*/ 0x04d9, 1, 0x04d8, /* CYRILLIC CAPITAL LETTER SCHWA */ + /*1225*/ 0x04db, 1, 0x04da, /* CYRILLIC CAPITAL LETTER SCHWA WIT.. */ + /*1228*/ 0x04dd, 1, 0x04dc, /* CYRILLIC CAPITAL LETTER ZHE WITH .. */ + /*1231*/ 0x04df, 1, 0x04de, /* CYRILLIC CAPITAL LETTER ZE WITH D.. */ + /*1234*/ 0x04e1, 1, 0x04e0, /* CYRILLIC CAPITAL LETTER ABKHASIAN.. */ + /*1237*/ 0x04e3, 1, 0x04e2, /* CYRILLIC CAPITAL LETTER I WITH MA.. */ + /*1240*/ 0x04e5, 1, 0x04e4, /* CYRILLIC CAPITAL LETTER I WITH DI.. */ + /*1243*/ 0x04e7, 1, 0x04e6, /* CYRILLIC CAPITAL LETTER O WITH DI.. */ + /*1246*/ 0x04e9, 1, 0x04e8, /* CYRILLIC CAPITAL LETTER BARRED O */ + /*1249*/ 0x04eb, 1, 0x04ea, /* CYRILLIC CAPITAL LETTER BARRED O .. */ + /*1252*/ 0x04ed, 1, 0x04ec, /* CYRILLIC CAPITAL LETTER E WITH DI.. */ + /*1255*/ 0x04ef, 1, 0x04ee, /* CYRILLIC CAPITAL LETTER U WITH MA.. */ + /*1258*/ 0x04f1, 1, 0x04f0, /* CYRILLIC CAPITAL LETTER U WITH DI.. */ + /*1261*/ 0x04f3, 1, 0x04f2, /* CYRILLIC CAPITAL LETTER U WITH DO.. */ + /*1264*/ 0x04f5, 1, 0x04f4, /* CYRILLIC CAPITAL LETTER CHE WITH .. */ + /*1267*/ 0x04f7, 1, 0x04f6, /* CYRILLIC CAPITAL LETTER GHE WITH .. */ + /*1270*/ 0x04f9, 1, 0x04f8, /* CYRILLIC CAPITAL LETTER YERU WITH.. */ + /*1273*/ 0x04fb, 1, 0x04fa, /* CYRILLIC CAPITAL LETTER GHE WITH .. */ + /*1276*/ 0x04fd, 1, 0x04fc, /* CYRILLIC CAPITAL LETTER HA WITH H.. */ + /*1279*/ 0x04ff, 1, 0x04fe, /* CYRILLIC CAPITAL LETTER HA WITH S.. */ + /*1282*/ 0x0501, 1, 0x0500, /* CYRILLIC CAPITAL LETTER KOMI DE */ + /*1285*/ 0x0503, 1, 0x0502, /* CYRILLIC CAPITAL LETTER KOMI DJE */ + /*1288*/ 0x0505, 1, 0x0504, /* CYRILLIC CAPITAL LETTER KOMI ZJE */ + /*1291*/ 0x0507, 1, 0x0506, /* CYRILLIC CAPITAL LETTER KOMI DZJE */ + /*1294*/ 0x0509, 1, 0x0508, /* CYRILLIC CAPITAL LETTER KOMI LJE */ + /*1297*/ 0x050b, 1, 0x050a, /* CYRILLIC CAPITAL LETTER KOMI NJE */ + /*1300*/ 0x050d, 1, 0x050c, /* CYRILLIC CAPITAL LETTER KOMI SJE */ + /*1303*/ 0x050f, 1, 0x050e, /* CYRILLIC CAPITAL LETTER KOMI TJE */ + /*1306*/ 0x0511, 1, 0x0510, /* CYRILLIC CAPITAL LETTER REVERSED .. */ + /*1309*/ 0x0513, 1, 0x0512, /* CYRILLIC CAPITAL LETTER EL WITH H.. */ + /*1312*/ 0x0515, 1, 0x0514, /* CYRILLIC CAPITAL LETTER LHA */ + /*1315*/ 0x0517, 1, 0x0516, /* CYRILLIC CAPITAL LETTER RHA */ + /*1318*/ 0x0519, 1, 0x0518, /* CYRILLIC CAPITAL LETTER YAE */ + /*1321*/ 0x051b, 1, 0x051a, /* CYRILLIC CAPITAL LETTER QA */ + /*1324*/ 0x051d, 1, 0x051c, /* CYRILLIC CAPITAL LETTER WE */ + /*1327*/ 0x051f, 1, 0x051e, /* CYRILLIC CAPITAL LETTER ALEUT KA */ + /*1330*/ 0x0521, 1, 0x0520, /* CYRILLIC CAPITAL LETTER EL WITH M.. */ + /*1333*/ 0x0523, 1, 0x0522, /* CYRILLIC CAPITAL LETTER EN WITH M.. */ + /*1336*/ 0x0525, 1, 0x0524, /* CYRILLIC CAPITAL LETTER PE WITH D.. */ + /*1339*/ 0x0527, 1, 0x0526, /* CYRILLIC CAPITAL LETTER SHHA WITH.. */ + /*1342*/ 0x0529, 1, 0x0528, /* CYRILLIC CAPITAL LETTER EN WITH L.. */ + /*1345*/ 0x052b, 1, 0x052a, /* CYRILLIC CAPITAL LETTER DZZHE */ + /*1348*/ 0x052d, 1, 0x052c, /* CYRILLIC CAPITAL LETTER DCHE */ + /*1351*/ 0x052f, 1, 0x052e, /* CYRILLIC CAPITAL LETTER EL WITH D.. */ + /*1354*/ 0x0561, 1, 0x0531, /* ARMENIAN CAPITAL LETTER AYB */ + /*1357*/ 0x0562, 1, 0x0532, /* ARMENIAN CAPITAL LETTER BEN */ + /*1360*/ 0x0563, 1, 0x0533, /* ARMENIAN CAPITAL LETTER GIM */ + /*1363*/ 0x0564, 1, 0x0534, /* ARMENIAN CAPITAL LETTER DA */ + /*1366*/ 0x0565, 1, 0x0535, /* ARMENIAN CAPITAL LETTER ECH */ + /*1369*/ 0x0566, 1, 0x0536, /* ARMENIAN CAPITAL LETTER ZA */ + /*1372*/ 0x0567, 1, 0x0537, /* ARMENIAN CAPITAL LETTER EH */ + /*1375*/ 0x0568, 1, 0x0538, /* ARMENIAN CAPITAL LETTER ET */ + /*1378*/ 0x0569, 1, 0x0539, /* ARMENIAN CAPITAL LETTER TO */ + /*1381*/ 0x056a, 1, 0x053a, /* ARMENIAN CAPITAL LETTER ZHE */ + /*1384*/ 0x056b, 1, 0x053b, /* ARMENIAN CAPITAL LETTER INI */ + /*1387*/ 0x056c, 1, 0x053c, /* ARMENIAN CAPITAL LETTER LIWN */ + /*1390*/ 0x056d, 1, 0x053d, /* ARMENIAN CAPITAL LETTER XEH */ + /*1393*/ 0x056e, 1, 0x053e, /* ARMENIAN CAPITAL LETTER CA */ + /*1396*/ 0x056f, 1, 0x053f, /* ARMENIAN CAPITAL LETTER KEN */ + /*1399*/ 0x0570, 1, 0x0540, /* ARMENIAN CAPITAL LETTER HO */ + /*1402*/ 0x0571, 1, 0x0541, /* ARMENIAN CAPITAL LETTER JA */ + /*1405*/ 0x0572, 1, 0x0542, /* ARMENIAN CAPITAL LETTER GHAD */ + /*1408*/ 0x0573, 1, 0x0543, /* ARMENIAN CAPITAL LETTER CHEH */ + /*1411*/ 0x0574, 1, 0x0544, /* ARMENIAN CAPITAL LETTER MEN */ + /*1414*/ 0x0575, 1, 0x0545, /* ARMENIAN CAPITAL LETTER YI */ + /*1417*/ 0x0576, 1, 0x0546, /* ARMENIAN CAPITAL LETTER NOW */ + /*1420*/ 0x0577, 1, 0x0547, /* ARMENIAN CAPITAL LETTER SHA */ + /*1423*/ 0x0578, 1, 0x0548, /* ARMENIAN CAPITAL LETTER VO */ + /*1426*/ 0x0579, 1, 0x0549, /* ARMENIAN CAPITAL LETTER CHA */ + /*1429*/ 0x057a, 1, 0x054a, /* ARMENIAN CAPITAL LETTER PEH */ + /*1432*/ 0x057b, 1, 0x054b, /* ARMENIAN CAPITAL LETTER JHEH */ + /*1435*/ 0x057c, 1, 0x054c, /* ARMENIAN CAPITAL LETTER RA */ + /*1438*/ 0x057d, 1, 0x054d, /* ARMENIAN CAPITAL LETTER SEH */ + /*1441*/ 0x057e, 1, 0x054e, /* ARMENIAN CAPITAL LETTER VEW */ + /*1444*/ 0x057f, 1, 0x054f, /* ARMENIAN CAPITAL LETTER TIWN */ + /*1447*/ 0x0580, 1, 0x0550, /* ARMENIAN CAPITAL LETTER REH */ + /*1450*/ 0x0581, 1, 0x0551, /* ARMENIAN CAPITAL LETTER CO */ + /*1453*/ 0x0582, 1, 0x0552, /* ARMENIAN CAPITAL LETTER YIWN */ + /*1456*/ 0x0583, 1, 0x0553, /* ARMENIAN CAPITAL LETTER PIWR */ + /*1459*/ 0x0584, 1, 0x0554, /* ARMENIAN CAPITAL LETTER KEH */ + /*1462*/ 0x0585, 1, 0x0555, /* ARMENIAN CAPITAL LETTER OH */ + /*1465*/ 0x0586, 1, 0x0556, /* ARMENIAN CAPITAL LETTER FEH */ + /*1468*/ 0x10d0, 1, 0x1c90, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1471*/ 0x10d1, 1, 0x1c91, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1474*/ 0x10d2, 1, 0x1c92, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1477*/ 0x10d3, 1, 0x1c93, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1480*/ 0x10d4, 1, 0x1c94, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1483*/ 0x10d5, 1, 0x1c95, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1486*/ 0x10d6, 1, 0x1c96, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1489*/ 0x10d7, 1, 0x1c97, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1492*/ 0x10d8, 1, 0x1c98, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1495*/ 0x10d9, 1, 0x1c99, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1498*/ 0x10da, 1, 0x1c9a, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1501*/ 0x10db, 1, 0x1c9b, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1504*/ 0x10dc, 1, 0x1c9c, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1507*/ 0x10dd, 1, 0x1c9d, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1510*/ 0x10de, 1, 0x1c9e, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1513*/ 0x10df, 1, 0x1c9f, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1516*/ 0x10e0, 1, 0x1ca0, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1519*/ 0x10e1, 1, 0x1ca1, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1522*/ 0x10e2, 1, 0x1ca2, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1525*/ 0x10e3, 1, 0x1ca3, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1528*/ 0x10e4, 1, 0x1ca4, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1531*/ 0x10e5, 1, 0x1ca5, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1534*/ 0x10e6, 1, 0x1ca6, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1537*/ 0x10e7, 1, 0x1ca7, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1540*/ 0x10e8, 1, 0x1ca8, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1543*/ 0x10e9, 1, 0x1ca9, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1546*/ 0x10ea, 1, 0x1caa, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1549*/ 0x10eb, 1, 0x1cab, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1552*/ 0x10ec, 1, 0x1cac, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1555*/ 0x10ed, 1, 0x1cad, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1558*/ 0x10ee, 1, 0x1cae, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1561*/ 0x10ef, 1, 0x1caf, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1564*/ 0x10f0, 1, 0x1cb0, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1567*/ 0x10f1, 1, 0x1cb1, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1570*/ 0x10f2, 1, 0x1cb2, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1573*/ 0x10f3, 1, 0x1cb3, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1576*/ 0x10f4, 1, 0x1cb4, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1579*/ 0x10f5, 1, 0x1cb5, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1582*/ 0x10f6, 1, 0x1cb6, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1585*/ 0x10f7, 1, 0x1cb7, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1588*/ 0x10f8, 1, 0x1cb8, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1591*/ 0x10f9, 1, 0x1cb9, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1594*/ 0x10fa, 1, 0x1cba, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1597*/ 0x10fd, 1, 0x1cbd, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1600*/ 0x10fe, 1, 0x1cbe, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1603*/ 0x10ff, 1, 0x1cbf, /* GEORGIAN MTAVRULI CAPITAL LETTER .. */ + /*1606*/ 0x13a0, 1, 0xab70, /* CHEROKEE SMALL LETTER A */ + /*1609*/ 0x13a1, 1, 0xab71, /* CHEROKEE SMALL LETTER E */ + /*1612*/ 0x13a2, 1, 0xab72, /* CHEROKEE SMALL LETTER I */ + /*1615*/ 0x13a3, 1, 0xab73, /* CHEROKEE SMALL LETTER O */ + /*1618*/ 0x13a4, 1, 0xab74, /* CHEROKEE SMALL LETTER U */ + /*1621*/ 0x13a5, 1, 0xab75, /* CHEROKEE SMALL LETTER V */ + /*1624*/ 0x13a6, 1, 0xab76, /* CHEROKEE SMALL LETTER GA */ + /*1627*/ 0x13a7, 1, 0xab77, /* CHEROKEE SMALL LETTER KA */ + /*1630*/ 0x13a8, 1, 0xab78, /* CHEROKEE SMALL LETTER GE */ + /*1633*/ 0x13a9, 1, 0xab79, /* CHEROKEE SMALL LETTER GI */ + /*1636*/ 0x13aa, 1, 0xab7a, /* CHEROKEE SMALL LETTER GO */ + /*1639*/ 0x13ab, 1, 0xab7b, /* CHEROKEE SMALL LETTER GU */ + /*1642*/ 0x13ac, 1, 0xab7c, /* CHEROKEE SMALL LETTER GV */ + /*1645*/ 0x13ad, 1, 0xab7d, /* CHEROKEE SMALL LETTER HA */ + /*1648*/ 0x13ae, 1, 0xab7e, /* CHEROKEE SMALL LETTER HE */ + /*1651*/ 0x13af, 1, 0xab7f, /* CHEROKEE SMALL LETTER HI */ + /*1654*/ 0x13b0, 1, 0xab80, /* CHEROKEE SMALL LETTER HO */ + /*1657*/ 0x13b1, 1, 0xab81, /* CHEROKEE SMALL LETTER HU */ + /*1660*/ 0x13b2, 1, 0xab82, /* CHEROKEE SMALL LETTER HV */ + /*1663*/ 0x13b3, 1, 0xab83, /* CHEROKEE SMALL LETTER LA */ + /*1666*/ 0x13b4, 1, 0xab84, /* CHEROKEE SMALL LETTER LE */ + /*1669*/ 0x13b5, 1, 0xab85, /* CHEROKEE SMALL LETTER LI */ + /*1672*/ 0x13b6, 1, 0xab86, /* CHEROKEE SMALL LETTER LO */ + /*1675*/ 0x13b7, 1, 0xab87, /* CHEROKEE SMALL LETTER LU */ + /*1678*/ 0x13b8, 1, 0xab88, /* CHEROKEE SMALL LETTER LV */ + /*1681*/ 0x13b9, 1, 0xab89, /* CHEROKEE SMALL LETTER MA */ + /*1684*/ 0x13ba, 1, 0xab8a, /* CHEROKEE SMALL LETTER ME */ + /*1687*/ 0x13bb, 1, 0xab8b, /* CHEROKEE SMALL LETTER MI */ + /*1690*/ 0x13bc, 1, 0xab8c, /* CHEROKEE SMALL LETTER MO */ + /*1693*/ 0x13bd, 1, 0xab8d, /* CHEROKEE SMALL LETTER MU */ + /*1696*/ 0x13be, 1, 0xab8e, /* CHEROKEE SMALL LETTER NA */ + /*1699*/ 0x13bf, 1, 0xab8f, /* CHEROKEE SMALL LETTER HNA */ + /*1702*/ 0x13c0, 1, 0xab90, /* CHEROKEE SMALL LETTER NAH */ + /*1705*/ 0x13c1, 1, 0xab91, /* CHEROKEE SMALL LETTER NE */ + /*1708*/ 0x13c2, 1, 0xab92, /* CHEROKEE SMALL LETTER NI */ + /*1711*/ 0x13c3, 1, 0xab93, /* CHEROKEE SMALL LETTER NO */ + /*1714*/ 0x13c4, 1, 0xab94, /* CHEROKEE SMALL LETTER NU */ + /*1717*/ 0x13c5, 1, 0xab95, /* CHEROKEE SMALL LETTER NV */ + /*1720*/ 0x13c6, 1, 0xab96, /* CHEROKEE SMALL LETTER QUA */ + /*1723*/ 0x13c7, 1, 0xab97, /* CHEROKEE SMALL LETTER QUE */ + /*1726*/ 0x13c8, 1, 0xab98, /* CHEROKEE SMALL LETTER QUI */ + /*1729*/ 0x13c9, 1, 0xab99, /* CHEROKEE SMALL LETTER QUO */ + /*1732*/ 0x13ca, 1, 0xab9a, /* CHEROKEE SMALL LETTER QUU */ + /*1735*/ 0x13cb, 1, 0xab9b, /* CHEROKEE SMALL LETTER QUV */ + /*1738*/ 0x13cc, 1, 0xab9c, /* CHEROKEE SMALL LETTER SA */ + /*1741*/ 0x13cd, 1, 0xab9d, /* CHEROKEE SMALL LETTER S */ + /*1744*/ 0x13ce, 1, 0xab9e, /* CHEROKEE SMALL LETTER SE */ + /*1747*/ 0x13cf, 1, 0xab9f, /* CHEROKEE SMALL LETTER SI */ + /*1750*/ 0x13d0, 1, 0xaba0, /* CHEROKEE SMALL LETTER SO */ + /*1753*/ 0x13d1, 1, 0xaba1, /* CHEROKEE SMALL LETTER SU */ + /*1756*/ 0x13d2, 1, 0xaba2, /* CHEROKEE SMALL LETTER SV */ + /*1759*/ 0x13d3, 1, 0xaba3, /* CHEROKEE SMALL LETTER DA */ + /*1762*/ 0x13d4, 1, 0xaba4, /* CHEROKEE SMALL LETTER TA */ + /*1765*/ 0x13d5, 1, 0xaba5, /* CHEROKEE SMALL LETTER DE */ + /*1768*/ 0x13d6, 1, 0xaba6, /* CHEROKEE SMALL LETTER TE */ + /*1771*/ 0x13d7, 1, 0xaba7, /* CHEROKEE SMALL LETTER DI */ + /*1774*/ 0x13d8, 1, 0xaba8, /* CHEROKEE SMALL LETTER TI */ + /*1777*/ 0x13d9, 1, 0xaba9, /* CHEROKEE SMALL LETTER DO */ + /*1780*/ 0x13da, 1, 0xabaa, /* CHEROKEE SMALL LETTER DU */ + /*1783*/ 0x13db, 1, 0xabab, /* CHEROKEE SMALL LETTER DV */ + /*1786*/ 0x13dc, 1, 0xabac, /* CHEROKEE SMALL LETTER DLA */ + /*1789*/ 0x13dd, 1, 0xabad, /* CHEROKEE SMALL LETTER TLA */ + /*1792*/ 0x13de, 1, 0xabae, /* CHEROKEE SMALL LETTER TLE */ + /*1795*/ 0x13df, 1, 0xabaf, /* CHEROKEE SMALL LETTER TLI */ + /*1798*/ 0x13e0, 1, 0xabb0, /* CHEROKEE SMALL LETTER TLO */ + /*1801*/ 0x13e1, 1, 0xabb1, /* CHEROKEE SMALL LETTER TLU */ + /*1804*/ 0x13e2, 1, 0xabb2, /* CHEROKEE SMALL LETTER TLV */ + /*1807*/ 0x13e3, 1, 0xabb3, /* CHEROKEE SMALL LETTER TSA */ + /*1810*/ 0x13e4, 1, 0xabb4, /* CHEROKEE SMALL LETTER TSE */ + /*1813*/ 0x13e5, 1, 0xabb5, /* CHEROKEE SMALL LETTER TSI */ + /*1816*/ 0x13e6, 1, 0xabb6, /* CHEROKEE SMALL LETTER TSO */ + /*1819*/ 0x13e7, 1, 0xabb7, /* CHEROKEE SMALL LETTER TSU */ + /*1822*/ 0x13e8, 1, 0xabb8, /* CHEROKEE SMALL LETTER TSV */ + /*1825*/ 0x13e9, 1, 0xabb9, /* CHEROKEE SMALL LETTER WA */ + /*1828*/ 0x13ea, 1, 0xabba, /* CHEROKEE SMALL LETTER WE */ + /*1831*/ 0x13eb, 1, 0xabbb, /* CHEROKEE SMALL LETTER WI */ + /*1834*/ 0x13ec, 1, 0xabbc, /* CHEROKEE SMALL LETTER WO */ + /*1837*/ 0x13ed, 1, 0xabbd, /* CHEROKEE SMALL LETTER WU */ + /*1840*/ 0x13ee, 1, 0xabbe, /* CHEROKEE SMALL LETTER WV */ + /*1843*/ 0x13ef, 1, 0xabbf, /* CHEROKEE SMALL LETTER YA */ + /*1846*/ 0x13f0, 1, 0x13f8, /* CHEROKEE SMALL LETTER YE */ + /*1849*/ 0x13f1, 1, 0x13f9, /* CHEROKEE SMALL LETTER YI */ + /*1852*/ 0x13f2, 1, 0x13fa, /* CHEROKEE SMALL LETTER YO */ + /*1855*/ 0x13f3, 1, 0x13fb, /* CHEROKEE SMALL LETTER YU */ + /*1858*/ 0x13f4, 1, 0x13fc, /* CHEROKEE SMALL LETTER YV */ + /*1861*/ 0x13f5, 1, 0x13fd, /* CHEROKEE SMALL LETTER MV */ + /*1864*/ 0x1c8a, 1, 0x1c89, /* CYRILLIC CAPITAL LETTER TJE */ + /*1867*/ 0x1d79, 1, 0xa77d, /* LATIN CAPITAL LETTER INSULAR G */ + /*1870*/ 0x1d7d, 1, 0x2c63, /* LATIN CAPITAL LETTER P WITH STROKE */ + /*1873*/ 0x1d8e, 1, 0xa7c6, /* LATIN CAPITAL LETTER Z WITH PALAT.. */ + /*1876*/ 0x1e01, 1, 0x1e00, /* LATIN CAPITAL LETTER A WITH RING .. */ + /*1879*/ 0x1e03, 1, 0x1e02, /* LATIN CAPITAL LETTER B WITH DOT A.. */ + /*1882*/ 0x1e05, 1, 0x1e04, /* LATIN CAPITAL LETTER B WITH DOT B.. */ + /*1885*/ 0x1e07, 1, 0x1e06, /* LATIN CAPITAL LETTER B WITH LINE .. */ + /*1888*/ 0x1e09, 1, 0x1e08, /* LATIN CAPITAL LETTER C WITH CEDIL.. */ + /*1891*/ 0x1e0b, 1, 0x1e0a, /* LATIN CAPITAL LETTER D WITH DOT A.. */ + /*1894*/ 0x1e0d, 1, 0x1e0c, /* LATIN CAPITAL LETTER D WITH DOT B.. */ + /*1897*/ 0x1e0f, 1, 0x1e0e, /* LATIN CAPITAL LETTER D WITH LINE .. */ + /*1900*/ 0x1e11, 1, 0x1e10, /* LATIN CAPITAL LETTER D WITH CEDIL.. */ + /*1903*/ 0x1e13, 1, 0x1e12, /* LATIN CAPITAL LETTER D WITH CIRCU.. */ + /*1906*/ 0x1e15, 1, 0x1e14, /* LATIN CAPITAL LETTER E WITH MACRO.. */ + /*1909*/ 0x1e17, 1, 0x1e16, /* LATIN CAPITAL LETTER E WITH MACRO.. */ + /*1912*/ 0x1e19, 1, 0x1e18, /* LATIN CAPITAL LETTER E WITH CIRCU.. */ + /*1915*/ 0x1e1b, 1, 0x1e1a, /* LATIN CAPITAL LETTER E WITH TILDE.. */ + /*1918*/ 0x1e1d, 1, 0x1e1c, /* LATIN CAPITAL LETTER E WITH CEDIL.. */ + /*1921*/ 0x1e1f, 1, 0x1e1e, /* LATIN CAPITAL LETTER F WITH DOT A.. */ + /*1924*/ 0x1e21, 1, 0x1e20, /* LATIN CAPITAL LETTER G WITH MACRON */ + /*1927*/ 0x1e23, 1, 0x1e22, /* LATIN CAPITAL LETTER H WITH DOT A.. */ + /*1930*/ 0x1e25, 1, 0x1e24, /* LATIN CAPITAL LETTER H WITH DOT B.. */ + /*1933*/ 0x1e27, 1, 0x1e26, /* LATIN CAPITAL LETTER H WITH DIAER.. */ + /*1936*/ 0x1e29, 1, 0x1e28, /* LATIN CAPITAL LETTER H WITH CEDIL.. */ + /*1939*/ 0x1e2b, 1, 0x1e2a, /* LATIN CAPITAL LETTER H WITH BREVE.. */ + /*1942*/ 0x1e2d, 1, 0x1e2c, /* LATIN CAPITAL LETTER I WITH TILDE.. */ + /*1945*/ 0x1e2f, 1, 0x1e2e, /* LATIN CAPITAL LETTER I WITH DIAER.. */ + /*1948*/ 0x1e31, 1, 0x1e30, /* LATIN CAPITAL LETTER K WITH ACUTE */ + /*1951*/ 0x1e33, 1, 0x1e32, /* LATIN CAPITAL LETTER K WITH DOT B.. */ + /*1954*/ 0x1e35, 1, 0x1e34, /* LATIN CAPITAL LETTER K WITH LINE .. */ + /*1957*/ 0x1e37, 1, 0x1e36, /* LATIN CAPITAL LETTER L WITH DOT B.. */ + /*1960*/ 0x1e39, 1, 0x1e38, /* LATIN CAPITAL LETTER L WITH DOT B.. */ + /*1963*/ 0x1e3b, 1, 0x1e3a, /* LATIN CAPITAL LETTER L WITH LINE .. */ + /*1966*/ 0x1e3d, 1, 0x1e3c, /* LATIN CAPITAL LETTER L WITH CIRCU.. */ + /*1969*/ 0x1e3f, 1, 0x1e3e, /* LATIN CAPITAL LETTER M WITH ACUTE */ + /*1972*/ 0x1e41, 1, 0x1e40, /* LATIN CAPITAL LETTER M WITH DOT A.. */ + /*1975*/ 0x1e43, 1, 0x1e42, /* LATIN CAPITAL LETTER M WITH DOT B.. */ + /*1978*/ 0x1e45, 1, 0x1e44, /* LATIN CAPITAL LETTER N WITH DOT A.. */ + /*1981*/ 0x1e47, 1, 0x1e46, /* LATIN CAPITAL LETTER N WITH DOT B.. */ + /*1984*/ 0x1e49, 1, 0x1e48, /* LATIN CAPITAL LETTER N WITH LINE .. */ + /*1987*/ 0x1e4b, 1, 0x1e4a, /* LATIN CAPITAL LETTER N WITH CIRCU.. */ + /*1990*/ 0x1e4d, 1, 0x1e4c, /* LATIN CAPITAL LETTER O WITH TILDE.. */ + /*1993*/ 0x1e4f, 1, 0x1e4e, /* LATIN CAPITAL LETTER O WITH TILDE.. */ + /*1996*/ 0x1e51, 1, 0x1e50, /* LATIN CAPITAL LETTER O WITH MACRO.. */ + /*1999*/ 0x1e53, 1, 0x1e52, /* LATIN CAPITAL LETTER O WITH MACRO.. */ + /*2002*/ 0x1e55, 1, 0x1e54, /* LATIN CAPITAL LETTER P WITH ACUTE */ + /*2005*/ 0x1e57, 1, 0x1e56, /* LATIN CAPITAL LETTER P WITH DOT A.. */ + /*2008*/ 0x1e59, 1, 0x1e58, /* LATIN CAPITAL LETTER R WITH DOT A.. */ + /*2011*/ 0x1e5b, 1, 0x1e5a, /* LATIN CAPITAL LETTER R WITH DOT B.. */ + /*2014*/ 0x1e5d, 1, 0x1e5c, /* LATIN CAPITAL LETTER R WITH DOT B.. */ + /*2017*/ 0x1e5f, 1, 0x1e5e, /* LATIN CAPITAL LETTER R WITH LINE .. */ + /*2020*/ 0x1e61, 2, 0x1e60, 0x1e9b, /* LATIN CAPITAL LETTER S WITH DOT A.. */ + /*2024*/ 0x1e63, 1, 0x1e62, /* LATIN CAPITAL LETTER S WITH DOT B.. */ + /*2027*/ 0x1e65, 1, 0x1e64, /* LATIN CAPITAL LETTER S WITH ACUTE.. */ + /*2030*/ 0x1e67, 1, 0x1e66, /* LATIN CAPITAL LETTER S WITH CARON.. */ + /*2033*/ 0x1e69, 1, 0x1e68, /* LATIN CAPITAL LETTER S WITH DOT B.. */ + /*2036*/ 0x1e6b, 1, 0x1e6a, /* LATIN CAPITAL LETTER T WITH DOT A.. */ + /*2039*/ 0x1e6d, 1, 0x1e6c, /* LATIN CAPITAL LETTER T WITH DOT B.. */ + /*2042*/ 0x1e6f, 1, 0x1e6e, /* LATIN CAPITAL LETTER T WITH LINE .. */ + /*2045*/ 0x1e71, 1, 0x1e70, /* LATIN CAPITAL LETTER T WITH CIRCU.. */ + /*2048*/ 0x1e73, 1, 0x1e72, /* LATIN CAPITAL LETTER U WITH DIAER.. */ + /*2051*/ 0x1e75, 1, 0x1e74, /* LATIN CAPITAL LETTER U WITH TILDE.. */ + /*2054*/ 0x1e77, 1, 0x1e76, /* LATIN CAPITAL LETTER U WITH CIRCU.. */ + /*2057*/ 0x1e79, 1, 0x1e78, /* LATIN CAPITAL LETTER U WITH TILDE.. */ + /*2060*/ 0x1e7b, 1, 0x1e7a, /* LATIN CAPITAL LETTER U WITH MACRO.. */ + /*2063*/ 0x1e7d, 1, 0x1e7c, /* LATIN CAPITAL LETTER V WITH TILDE */ + /*2066*/ 0x1e7f, 1, 0x1e7e, /* LATIN CAPITAL LETTER V WITH DOT B.. */ + /*2069*/ 0x1e81, 1, 0x1e80, /* LATIN CAPITAL LETTER W WITH GRAVE */ + /*2072*/ 0x1e83, 1, 0x1e82, /* LATIN CAPITAL LETTER W WITH ACUTE */ + /*2075*/ 0x1e85, 1, 0x1e84, /* LATIN CAPITAL LETTER W WITH DIAER.. */ + /*2078*/ 0x1e87, 1, 0x1e86, /* LATIN CAPITAL LETTER W WITH DOT A.. */ + /*2081*/ 0x1e89, 1, 0x1e88, /* LATIN CAPITAL LETTER W WITH DOT B.. */ + /*2084*/ 0x1e8b, 1, 0x1e8a, /* LATIN CAPITAL LETTER X WITH DOT A.. */ + /*2087*/ 0x1e8d, 1, 0x1e8c, /* LATIN CAPITAL LETTER X WITH DIAER.. */ + /*2090*/ 0x1e8f, 1, 0x1e8e, /* LATIN CAPITAL LETTER Y WITH DOT A.. */ + /*2093*/ 0x1e91, 1, 0x1e90, /* LATIN CAPITAL LETTER Z WITH CIRCU.. */ + /*2096*/ 0x1e93, 1, 0x1e92, /* LATIN CAPITAL LETTER Z WITH DOT B.. */ + /*2099*/ 0x1e95, 1, 0x1e94, /* LATIN CAPITAL LETTER Z WITH LINE .. */ + /*2102*/ 0x1ea1, 1, 0x1ea0, /* LATIN CAPITAL LETTER A WITH DOT B.. */ + /*2105*/ 0x1ea3, 1, 0x1ea2, /* LATIN CAPITAL LETTER A WITH HOOK .. */ + /*2108*/ 0x1ea5, 1, 0x1ea4, /* LATIN CAPITAL LETTER A WITH CIRCU.. */ + /*2111*/ 0x1ea7, 1, 0x1ea6, /* LATIN CAPITAL LETTER A WITH CIRCU.. */ + /*2114*/ 0x1ea9, 1, 0x1ea8, /* LATIN CAPITAL LETTER A WITH CIRCU.. */ + /*2117*/ 0x1eab, 1, 0x1eaa, /* LATIN CAPITAL LETTER A WITH CIRCU.. */ + /*2120*/ 0x1ead, 1, 0x1eac, /* LATIN CAPITAL LETTER A WITH CIRCU.. */ + /*2123*/ 0x1eaf, 1, 0x1eae, /* LATIN CAPITAL LETTER A WITH BREVE.. */ + /*2126*/ 0x1eb1, 1, 0x1eb0, /* LATIN CAPITAL LETTER A WITH BREVE.. */ + /*2129*/ 0x1eb3, 1, 0x1eb2, /* LATIN CAPITAL LETTER A WITH BREVE.. */ + /*2132*/ 0x1eb5, 1, 0x1eb4, /* LATIN CAPITAL LETTER A WITH BREVE.. */ + /*2135*/ 0x1eb7, 1, 0x1eb6, /* LATIN CAPITAL LETTER A WITH BREVE.. */ + /*2138*/ 0x1eb9, 1, 0x1eb8, /* LATIN CAPITAL LETTER E WITH DOT B.. */ + /*2141*/ 0x1ebb, 1, 0x1eba, /* LATIN CAPITAL LETTER E WITH HOOK .. */ + /*2144*/ 0x1ebd, 1, 0x1ebc, /* LATIN CAPITAL LETTER E WITH TILDE */ + /*2147*/ 0x1ebf, 1, 0x1ebe, /* LATIN CAPITAL LETTER E WITH CIRCU.. */ + /*2150*/ 0x1ec1, 1, 0x1ec0, /* LATIN CAPITAL LETTER E WITH CIRCU.. */ + /*2153*/ 0x1ec3, 1, 0x1ec2, /* LATIN CAPITAL LETTER E WITH CIRCU.. */ + /*2156*/ 0x1ec5, 1, 0x1ec4, /* LATIN CAPITAL LETTER E WITH CIRCU.. */ + /*2159*/ 0x1ec7, 1, 0x1ec6, /* LATIN CAPITAL LETTER E WITH CIRCU.. */ + /*2162*/ 0x1ec9, 1, 0x1ec8, /* LATIN CAPITAL LETTER I WITH HOOK .. */ + /*2165*/ 0x1ecb, 1, 0x1eca, /* LATIN CAPITAL LETTER I WITH DOT B.. */ + /*2168*/ 0x1ecd, 1, 0x1ecc, /* LATIN CAPITAL LETTER O WITH DOT B.. */ + /*2171*/ 0x1ecf, 1, 0x1ece, /* LATIN CAPITAL LETTER O WITH HOOK .. */ + /*2174*/ 0x1ed1, 1, 0x1ed0, /* LATIN CAPITAL LETTER O WITH CIRCU.. */ + /*2177*/ 0x1ed3, 1, 0x1ed2, /* LATIN CAPITAL LETTER O WITH CIRCU.. */ + /*2180*/ 0x1ed5, 1, 0x1ed4, /* LATIN CAPITAL LETTER O WITH CIRCU.. */ + /*2183*/ 0x1ed7, 1, 0x1ed6, /* LATIN CAPITAL LETTER O WITH CIRCU.. */ + /*2186*/ 0x1ed9, 1, 0x1ed8, /* LATIN CAPITAL LETTER O WITH CIRCU.. */ + /*2189*/ 0x1edb, 1, 0x1eda, /* LATIN CAPITAL LETTER O WITH HORN .. */ + /*2192*/ 0x1edd, 1, 0x1edc, /* LATIN CAPITAL LETTER O WITH HORN .. */ + /*2195*/ 0x1edf, 1, 0x1ede, /* LATIN CAPITAL LETTER O WITH HORN .. */ + /*2198*/ 0x1ee1, 1, 0x1ee0, /* LATIN CAPITAL LETTER O WITH HORN .. */ + /*2201*/ 0x1ee3, 1, 0x1ee2, /* LATIN CAPITAL LETTER O WITH HORN .. */ + /*2204*/ 0x1ee5, 1, 0x1ee4, /* LATIN CAPITAL LETTER U WITH DOT B.. */ + /*2207*/ 0x1ee7, 1, 0x1ee6, /* LATIN CAPITAL LETTER U WITH HOOK .. */ + /*2210*/ 0x1ee9, 1, 0x1ee8, /* LATIN CAPITAL LETTER U WITH HORN .. */ + /*2213*/ 0x1eeb, 1, 0x1eea, /* LATIN CAPITAL LETTER U WITH HORN .. */ + /*2216*/ 0x1eed, 1, 0x1eec, /* LATIN CAPITAL LETTER U WITH HORN .. */ + /*2219*/ 0x1eef, 1, 0x1eee, /* LATIN CAPITAL LETTER U WITH HORN .. */ + /*2222*/ 0x1ef1, 1, 0x1ef0, /* LATIN CAPITAL LETTER U WITH HORN .. */ + /*2225*/ 0x1ef3, 1, 0x1ef2, /* LATIN CAPITAL LETTER Y WITH GRAVE */ + /*2228*/ 0x1ef5, 1, 0x1ef4, /* LATIN CAPITAL LETTER Y WITH DOT B.. */ + /*2231*/ 0x1ef7, 1, 0x1ef6, /* LATIN CAPITAL LETTER Y WITH HOOK .. */ + /*2234*/ 0x1ef9, 1, 0x1ef8, /* LATIN CAPITAL LETTER Y WITH TILDE */ + /*2237*/ 0x1efb, 1, 0x1efa, /* LATIN CAPITAL LETTER MIDDLE-WELSH.. */ + /*2240*/ 0x1efd, 1, 0x1efc, /* LATIN CAPITAL LETTER MIDDLE-WELSH.. */ + /*2243*/ 0x1eff, 1, 0x1efe, /* LATIN CAPITAL LETTER Y WITH LOOP */ + /*2246*/ 0x1f00, 1, 0x1f08, /* GREEK CAPITAL LETTER ALPHA WITH P.. */ + /*2249*/ 0x1f01, 1, 0x1f09, /* GREEK CAPITAL LETTER ALPHA WITH D.. */ + /*2252*/ 0x1f02, 1, 0x1f0a, /* GREEK CAPITAL LETTER ALPHA WITH P.. */ + /*2255*/ 0x1f03, 1, 0x1f0b, /* GREEK CAPITAL LETTER ALPHA WITH D.. */ + /*2258*/ 0x1f04, 1, 0x1f0c, /* GREEK CAPITAL LETTER ALPHA WITH P.. */ + /*2261*/ 0x1f05, 1, 0x1f0d, /* GREEK CAPITAL LETTER ALPHA WITH D.. */ + /*2264*/ 0x1f06, 1, 0x1f0e, /* GREEK CAPITAL LETTER ALPHA WITH P.. */ + /*2267*/ 0x1f07, 1, 0x1f0f, /* GREEK CAPITAL LETTER ALPHA WITH D.. */ + /*2270*/ 0x1f10, 1, 0x1f18, /* GREEK CAPITAL LETTER EPSILON WITH.. */ + /*2273*/ 0x1f11, 1, 0x1f19, /* GREEK CAPITAL LETTER EPSILON WITH.. */ + /*2276*/ 0x1f12, 1, 0x1f1a, /* GREEK CAPITAL LETTER EPSILON WITH.. */ + /*2279*/ 0x1f13, 1, 0x1f1b, /* GREEK CAPITAL LETTER EPSILON WITH.. */ + /*2282*/ 0x1f14, 1, 0x1f1c, /* GREEK CAPITAL LETTER EPSILON WITH.. */ + /*2285*/ 0x1f15, 1, 0x1f1d, /* GREEK CAPITAL LETTER EPSILON WITH.. */ + /*2288*/ 0x1f20, 1, 0x1f28, /* GREEK CAPITAL LETTER ETA WITH PSI.. */ + /*2291*/ 0x1f21, 1, 0x1f29, /* GREEK CAPITAL LETTER ETA WITH DAS.. */ + /*2294*/ 0x1f22, 1, 0x1f2a, /* GREEK CAPITAL LETTER ETA WITH PSI.. */ + /*2297*/ 0x1f23, 1, 0x1f2b, /* GREEK CAPITAL LETTER ETA WITH DAS.. */ + /*2300*/ 0x1f24, 1, 0x1f2c, /* GREEK CAPITAL LETTER ETA WITH PSI.. */ + /*2303*/ 0x1f25, 1, 0x1f2d, /* GREEK CAPITAL LETTER ETA WITH DAS.. */ + /*2306*/ 0x1f26, 1, 0x1f2e, /* GREEK CAPITAL LETTER ETA WITH PSI.. */ + /*2309*/ 0x1f27, 1, 0x1f2f, /* GREEK CAPITAL LETTER ETA WITH DAS.. */ + /*2312*/ 0x1f30, 1, 0x1f38, /* GREEK CAPITAL LETTER IOTA WITH PS.. */ + /*2315*/ 0x1f31, 1, 0x1f39, /* GREEK CAPITAL LETTER IOTA WITH DA.. */ + /*2318*/ 0x1f32, 1, 0x1f3a, /* GREEK CAPITAL LETTER IOTA WITH PS.. */ + /*2321*/ 0x1f33, 1, 0x1f3b, /* GREEK CAPITAL LETTER IOTA WITH DA.. */ + /*2324*/ 0x1f34, 1, 0x1f3c, /* GREEK CAPITAL LETTER IOTA WITH PS.. */ + /*2327*/ 0x1f35, 1, 0x1f3d, /* GREEK CAPITAL LETTER IOTA WITH DA.. */ + /*2330*/ 0x1f36, 1, 0x1f3e, /* GREEK CAPITAL LETTER IOTA WITH PS.. */ + /*2333*/ 0x1f37, 1, 0x1f3f, /* GREEK CAPITAL LETTER IOTA WITH DA.. */ + /*2336*/ 0x1f40, 1, 0x1f48, /* GREEK CAPITAL LETTER OMICRON WITH.. */ + /*2339*/ 0x1f41, 1, 0x1f49, /* GREEK CAPITAL LETTER OMICRON WITH.. */ + /*2342*/ 0x1f42, 1, 0x1f4a, /* GREEK CAPITAL LETTER OMICRON WITH.. */ + /*2345*/ 0x1f43, 1, 0x1f4b, /* GREEK CAPITAL LETTER OMICRON WITH.. */ + /*2348*/ 0x1f44, 1, 0x1f4c, /* GREEK CAPITAL LETTER OMICRON WITH.. */ + /*2351*/ 0x1f45, 1, 0x1f4d, /* GREEK CAPITAL LETTER OMICRON WITH.. */ + /*2354*/ 0x1f51, 1, 0x1f59, /* GREEK CAPITAL LETTER UPSILON WITH.. */ + /*2357*/ 0x1f53, 1, 0x1f5b, /* GREEK CAPITAL LETTER UPSILON WITH.. */ + /*2360*/ 0x1f55, 1, 0x1f5d, /* GREEK CAPITAL LETTER UPSILON WITH.. */ + /*2363*/ 0x1f57, 1, 0x1f5f, /* GREEK CAPITAL LETTER UPSILON WITH.. */ + /*2366*/ 0x1f60, 1, 0x1f68, /* GREEK CAPITAL LETTER OMEGA WITH P.. */ + /*2369*/ 0x1f61, 1, 0x1f69, /* GREEK CAPITAL LETTER OMEGA WITH D.. */ + /*2372*/ 0x1f62, 1, 0x1f6a, /* GREEK CAPITAL LETTER OMEGA WITH P.. */ + /*2375*/ 0x1f63, 1, 0x1f6b, /* GREEK CAPITAL LETTER OMEGA WITH D.. */ + /*2378*/ 0x1f64, 1, 0x1f6c, /* GREEK CAPITAL LETTER OMEGA WITH P.. */ + /*2381*/ 0x1f65, 1, 0x1f6d, /* GREEK CAPITAL LETTER OMEGA WITH D.. */ + /*2384*/ 0x1f66, 1, 0x1f6e, /* GREEK CAPITAL LETTER OMEGA WITH P.. */ + /*2387*/ 0x1f67, 1, 0x1f6f, /* GREEK CAPITAL LETTER OMEGA WITH D.. */ + /*2390*/ 0x1f70, 1, 0x1fba, /* GREEK CAPITAL LETTER ALPHA WITH V.. */ + /*2393*/ 0x1f71, 1, 0x1fbb, /* GREEK CAPITAL LETTER ALPHA WITH O.. */ + /*2396*/ 0x1f72, 1, 0x1fc8, /* GREEK CAPITAL LETTER EPSILON WITH.. */ + /*2399*/ 0x1f73, 1, 0x1fc9, /* GREEK CAPITAL LETTER EPSILON WITH.. */ + /*2402*/ 0x1f74, 1, 0x1fca, /* GREEK CAPITAL LETTER ETA WITH VAR.. */ + /*2405*/ 0x1f75, 1, 0x1fcb, /* GREEK CAPITAL LETTER ETA WITH OXIA */ + /*2408*/ 0x1f76, 1, 0x1fda, /* GREEK CAPITAL LETTER IOTA WITH VA.. */ + /*2411*/ 0x1f77, 1, 0x1fdb, /* GREEK CAPITAL LETTER IOTA WITH OX.. */ + /*2414*/ 0x1f78, 1, 0x1ff8, /* GREEK CAPITAL LETTER OMICRON WITH.. */ + /*2417*/ 0x1f79, 1, 0x1ff9, /* GREEK CAPITAL LETTER OMICRON WITH.. */ + /*2420*/ 0x1f7a, 1, 0x1fea, /* GREEK CAPITAL LETTER UPSILON WITH.. */ + /*2423*/ 0x1f7b, 1, 0x1feb, /* GREEK CAPITAL LETTER UPSILON WITH.. */ + /*2426*/ 0x1f7c, 1, 0x1ffa, /* GREEK CAPITAL LETTER OMEGA WITH V.. */ + /*2429*/ 0x1f7d, 1, 0x1ffb, /* GREEK CAPITAL LETTER OMEGA WITH O.. */ + /*2432*/ 0x1fb0, 1, 0x1fb8, /* GREEK CAPITAL LETTER ALPHA WITH V.. */ + /*2435*/ 0x1fb1, 1, 0x1fb9, /* GREEK CAPITAL LETTER ALPHA WITH M.. */ + /*2438*/ 0x1fd0, 1, 0x1fd8, /* GREEK CAPITAL LETTER IOTA WITH VR.. */ + /*2441*/ 0x1fd1, 1, 0x1fd9, /* GREEK CAPITAL LETTER IOTA WITH MA.. */ + /*2444*/ 0x1fe0, 1, 0x1fe8, /* GREEK CAPITAL LETTER UPSILON WITH.. */ + /*2447*/ 0x1fe1, 1, 0x1fe9, /* GREEK CAPITAL LETTER UPSILON WITH.. */ + /*2450*/ 0x1fe5, 1, 0x1fec, /* GREEK CAPITAL LETTER RHO WITH DAS.. */ + /*2453*/ 0x214e, 1, 0x2132, /* TURNED CAPITAL F */ + /*2456*/ 0x2170, 1, 0x2160, /* ROMAN NUMERAL ONE */ + /*2459*/ 0x2171, 1, 0x2161, /* ROMAN NUMERAL TWO */ + /*2462*/ 0x2172, 1, 0x2162, /* ROMAN NUMERAL THREE */ + /*2465*/ 0x2173, 1, 0x2163, /* ROMAN NUMERAL FOUR */ + /*2468*/ 0x2174, 1, 0x2164, /* ROMAN NUMERAL FIVE */ + /*2471*/ 0x2175, 1, 0x2165, /* ROMAN NUMERAL SIX */ + /*2474*/ 0x2176, 1, 0x2166, /* ROMAN NUMERAL SEVEN */ + /*2477*/ 0x2177, 1, 0x2167, /* ROMAN NUMERAL EIGHT */ + /*2480*/ 0x2178, 1, 0x2168, /* ROMAN NUMERAL NINE */ + /*2483*/ 0x2179, 1, 0x2169, /* ROMAN NUMERAL TEN */ + /*2486*/ 0x217a, 1, 0x216a, /* ROMAN NUMERAL ELEVEN */ + /*2489*/ 0x217b, 1, 0x216b, /* ROMAN NUMERAL TWELVE */ + /*2492*/ 0x217c, 1, 0x216c, /* ROMAN NUMERAL FIFTY */ + /*2495*/ 0x217d, 1, 0x216d, /* ROMAN NUMERAL ONE HUNDRED */ + /*2498*/ 0x217e, 1, 0x216e, /* ROMAN NUMERAL FIVE HUNDRED */ + /*2501*/ 0x217f, 1, 0x216f, /* ROMAN NUMERAL ONE THOUSAND */ + /*2504*/ 0x2184, 1, 0x2183, /* ROMAN NUMERAL REVERSED ONE HUNDRED */ + /*2507*/ 0x24d0, 1, 0x24b6, /* CIRCLED LATIN CAPITAL LETTER A */ + /*2510*/ 0x24d1, 1, 0x24b7, /* CIRCLED LATIN CAPITAL LETTER B */ + /*2513*/ 0x24d2, 1, 0x24b8, /* CIRCLED LATIN CAPITAL LETTER C */ + /*2516*/ 0x24d3, 1, 0x24b9, /* CIRCLED LATIN CAPITAL LETTER D */ + /*2519*/ 0x24d4, 1, 0x24ba, /* CIRCLED LATIN CAPITAL LETTER E */ + /*2522*/ 0x24d5, 1, 0x24bb, /* CIRCLED LATIN CAPITAL LETTER F */ + /*2525*/ 0x24d6, 1, 0x24bc, /* CIRCLED LATIN CAPITAL LETTER G */ + /*2528*/ 0x24d7, 1, 0x24bd, /* CIRCLED LATIN CAPITAL LETTER H */ + /*2531*/ 0x24d8, 1, 0x24be, /* CIRCLED LATIN CAPITAL LETTER I */ + /*2534*/ 0x24d9, 1, 0x24bf, /* CIRCLED LATIN CAPITAL LETTER J */ + /*2537*/ 0x24da, 1, 0x24c0, /* CIRCLED LATIN CAPITAL LETTER K */ + /*2540*/ 0x24db, 1, 0x24c1, /* CIRCLED LATIN CAPITAL LETTER L */ + /*2543*/ 0x24dc, 1, 0x24c2, /* CIRCLED LATIN CAPITAL LETTER M */ + /*2546*/ 0x24dd, 1, 0x24c3, /* CIRCLED LATIN CAPITAL LETTER N */ + /*2549*/ 0x24de, 1, 0x24c4, /* CIRCLED LATIN CAPITAL LETTER O */ + /*2552*/ 0x24df, 1, 0x24c5, /* CIRCLED LATIN CAPITAL LETTER P */ + /*2555*/ 0x24e0, 1, 0x24c6, /* CIRCLED LATIN CAPITAL LETTER Q */ + /*2558*/ 0x24e1, 1, 0x24c7, /* CIRCLED LATIN CAPITAL LETTER R */ + /*2561*/ 0x24e2, 1, 0x24c8, /* CIRCLED LATIN CAPITAL LETTER S */ + /*2564*/ 0x24e3, 1, 0x24c9, /* CIRCLED LATIN CAPITAL LETTER T */ + /*2567*/ 0x24e4, 1, 0x24ca, /* CIRCLED LATIN CAPITAL LETTER U */ + /*2570*/ 0x24e5, 1, 0x24cb, /* CIRCLED LATIN CAPITAL LETTER V */ + /*2573*/ 0x24e6, 1, 0x24cc, /* CIRCLED LATIN CAPITAL LETTER W */ + /*2576*/ 0x24e7, 1, 0x24cd, /* CIRCLED LATIN CAPITAL LETTER X */ + /*2579*/ 0x24e8, 1, 0x24ce, /* CIRCLED LATIN CAPITAL LETTER Y */ + /*2582*/ 0x24e9, 1, 0x24cf, /* CIRCLED LATIN CAPITAL LETTER Z */ + /*2585*/ 0x2c30, 1, 0x2c00, /* GLAGOLITIC CAPITAL LETTER AZU */ + /*2588*/ 0x2c31, 1, 0x2c01, /* GLAGOLITIC CAPITAL LETTER BUKY */ + /*2591*/ 0x2c32, 1, 0x2c02, /* GLAGOLITIC CAPITAL LETTER VEDE */ + /*2594*/ 0x2c33, 1, 0x2c03, /* GLAGOLITIC CAPITAL LETTER GLAGOLI */ + /*2597*/ 0x2c34, 1, 0x2c04, /* GLAGOLITIC CAPITAL LETTER DOBRO */ + /*2600*/ 0x2c35, 1, 0x2c05, /* GLAGOLITIC CAPITAL LETTER YESTU */ + /*2603*/ 0x2c36, 1, 0x2c06, /* GLAGOLITIC CAPITAL LETTER ZHIVETE */ + /*2606*/ 0x2c37, 1, 0x2c07, /* GLAGOLITIC CAPITAL LETTER DZELO */ + /*2609*/ 0x2c38, 1, 0x2c08, /* GLAGOLITIC CAPITAL LETTER ZEMLJA */ + /*2612*/ 0x2c39, 1, 0x2c09, /* GLAGOLITIC CAPITAL LETTER IZHE */ + /*2615*/ 0x2c3a, 1, 0x2c0a, /* GLAGOLITIC CAPITAL LETTER INITIAL.. */ + /*2618*/ 0x2c3b, 1, 0x2c0b, /* GLAGOLITIC CAPITAL LETTER I */ + /*2621*/ 0x2c3c, 1, 0x2c0c, /* GLAGOLITIC CAPITAL LETTER DJERVI */ + /*2624*/ 0x2c3d, 1, 0x2c0d, /* GLAGOLITIC CAPITAL LETTER KAKO */ + /*2627*/ 0x2c3e, 1, 0x2c0e, /* GLAGOLITIC CAPITAL LETTER LJUDIJE */ + /*2630*/ 0x2c3f, 1, 0x2c0f, /* GLAGOLITIC CAPITAL LETTER MYSLITE */ + /*2633*/ 0x2c40, 1, 0x2c10, /* GLAGOLITIC CAPITAL LETTER NASHI */ + /*2636*/ 0x2c41, 1, 0x2c11, /* GLAGOLITIC CAPITAL LETTER ONU */ + /*2639*/ 0x2c42, 1, 0x2c12, /* GLAGOLITIC CAPITAL LETTER POKOJI */ + /*2642*/ 0x2c43, 1, 0x2c13, /* GLAGOLITIC CAPITAL LETTER RITSI */ + /*2645*/ 0x2c44, 1, 0x2c14, /* GLAGOLITIC CAPITAL LETTER SLOVO */ + /*2648*/ 0x2c45, 1, 0x2c15, /* GLAGOLITIC CAPITAL LETTER TVRIDO */ + /*2651*/ 0x2c46, 1, 0x2c16, /* GLAGOLITIC CAPITAL LETTER UKU */ + /*2654*/ 0x2c47, 1, 0x2c17, /* GLAGOLITIC CAPITAL LETTER FRITU */ + /*2657*/ 0x2c48, 1, 0x2c18, /* GLAGOLITIC CAPITAL LETTER HERU */ + /*2660*/ 0x2c49, 1, 0x2c19, /* GLAGOLITIC CAPITAL LETTER OTU */ + /*2663*/ 0x2c4a, 1, 0x2c1a, /* GLAGOLITIC CAPITAL LETTER PE */ + /*2666*/ 0x2c4b, 1, 0x2c1b, /* GLAGOLITIC CAPITAL LETTER SHTA */ + /*2669*/ 0x2c4c, 1, 0x2c1c, /* GLAGOLITIC CAPITAL LETTER TSI */ + /*2672*/ 0x2c4d, 1, 0x2c1d, /* GLAGOLITIC CAPITAL LETTER CHRIVI */ + /*2675*/ 0x2c4e, 1, 0x2c1e, /* GLAGOLITIC CAPITAL LETTER SHA */ + /*2678*/ 0x2c4f, 1, 0x2c1f, /* GLAGOLITIC CAPITAL LETTER YERU */ + /*2681*/ 0x2c50, 1, 0x2c20, /* GLAGOLITIC CAPITAL LETTER YERI */ + /*2684*/ 0x2c51, 1, 0x2c21, /* GLAGOLITIC CAPITAL LETTER YATI */ + /*2687*/ 0x2c52, 1, 0x2c22, /* GLAGOLITIC CAPITAL LETTER SPIDERY.. */ + /*2690*/ 0x2c53, 1, 0x2c23, /* GLAGOLITIC CAPITAL LETTER YU */ + /*2693*/ 0x2c54, 1, 0x2c24, /* GLAGOLITIC CAPITAL LETTER SMALL Y.. */ + /*2696*/ 0x2c55, 1, 0x2c25, /* GLAGOLITIC CAPITAL LETTER SMALL Y.. */ + /*2699*/ 0x2c56, 1, 0x2c26, /* GLAGOLITIC CAPITAL LETTER YO */ + /*2702*/ 0x2c57, 1, 0x2c27, /* GLAGOLITIC CAPITAL LETTER IOTATED.. */ + /*2705*/ 0x2c58, 1, 0x2c28, /* GLAGOLITIC CAPITAL LETTER BIG YUS */ + /*2708*/ 0x2c59, 1, 0x2c29, /* GLAGOLITIC CAPITAL LETTER IOTATED.. */ + /*2711*/ 0x2c5a, 1, 0x2c2a, /* GLAGOLITIC CAPITAL LETTER FITA */ + /*2714*/ 0x2c5b, 1, 0x2c2b, /* GLAGOLITIC CAPITAL LETTER IZHITSA */ + /*2717*/ 0x2c5c, 1, 0x2c2c, /* GLAGOLITIC CAPITAL LETTER SHTAPIC */ + /*2720*/ 0x2c5d, 1, 0x2c2d, /* GLAGOLITIC CAPITAL LETTER TROKUTA.. */ + /*2723*/ 0x2c5e, 1, 0x2c2e, /* GLAGOLITIC CAPITAL LETTER LATINAT.. */ + /*2726*/ 0x2c5f, 1, 0x2c2f, /* GLAGOLITIC CAPITAL LETTER CAUDATE.. */ + /*2729*/ 0x2c61, 1, 0x2c60, /* LATIN CAPITAL LETTER L WITH DOUBL.. */ + /*2732*/ 0x2c65, 1, 0x023a, /* LATIN CAPITAL LETTER A WITH STROKE */ + /*2735*/ 0x2c66, 1, 0x023e, /* LATIN CAPITAL LETTER T WITH DIAGO.. */ + /*2738*/ 0x2c68, 1, 0x2c67, /* LATIN CAPITAL LETTER H WITH DESCE.. */ + /*2741*/ 0x2c6a, 1, 0x2c69, /* LATIN CAPITAL LETTER K WITH DESCE.. */ + /*2744*/ 0x2c6c, 1, 0x2c6b, /* LATIN CAPITAL LETTER Z WITH DESCE.. */ + /*2747*/ 0x2c73, 1, 0x2c72, /* LATIN CAPITAL LETTER W WITH HOOK */ + /*2750*/ 0x2c76, 1, 0x2c75, /* LATIN CAPITAL LETTER HALF H */ + /*2753*/ 0x2c81, 1, 0x2c80, /* COPTIC CAPITAL LETTER ALFA */ + /*2756*/ 0x2c83, 1, 0x2c82, /* COPTIC CAPITAL LETTER VIDA */ + /*2759*/ 0x2c85, 1, 0x2c84, /* COPTIC CAPITAL LETTER GAMMA */ + /*2762*/ 0x2c87, 1, 0x2c86, /* COPTIC CAPITAL LETTER DALDA */ + /*2765*/ 0x2c89, 1, 0x2c88, /* COPTIC CAPITAL LETTER EIE */ + /*2768*/ 0x2c8b, 1, 0x2c8a, /* COPTIC CAPITAL LETTER SOU */ + /*2771*/ 0x2c8d, 1, 0x2c8c, /* COPTIC CAPITAL LETTER ZATA */ + /*2774*/ 0x2c8f, 1, 0x2c8e, /* COPTIC CAPITAL LETTER HATE */ + /*2777*/ 0x2c91, 1, 0x2c90, /* COPTIC CAPITAL LETTER THETHE */ + /*2780*/ 0x2c93, 1, 0x2c92, /* COPTIC CAPITAL LETTER IAUDA */ + /*2783*/ 0x2c95, 1, 0x2c94, /* COPTIC CAPITAL LETTER KAPA */ + /*2786*/ 0x2c97, 1, 0x2c96, /* COPTIC CAPITAL LETTER LAULA */ + /*2789*/ 0x2c99, 1, 0x2c98, /* COPTIC CAPITAL LETTER MI */ + /*2792*/ 0x2c9b, 1, 0x2c9a, /* COPTIC CAPITAL LETTER NI */ + /*2795*/ 0x2c9d, 1, 0x2c9c, /* COPTIC CAPITAL LETTER KSI */ + /*2798*/ 0x2c9f, 1, 0x2c9e, /* COPTIC CAPITAL LETTER O */ + /*2801*/ 0x2ca1, 1, 0x2ca0, /* COPTIC CAPITAL LETTER PI */ + /*2804*/ 0x2ca3, 1, 0x2ca2, /* COPTIC CAPITAL LETTER RO */ + /*2807*/ 0x2ca5, 1, 0x2ca4, /* COPTIC CAPITAL LETTER SIMA */ + /*2810*/ 0x2ca7, 1, 0x2ca6, /* COPTIC CAPITAL LETTER TAU */ + /*2813*/ 0x2ca9, 1, 0x2ca8, /* COPTIC CAPITAL LETTER UA */ + /*2816*/ 0x2cab, 1, 0x2caa, /* COPTIC CAPITAL LETTER FI */ + /*2819*/ 0x2cad, 1, 0x2cac, /* COPTIC CAPITAL LETTER KHI */ + /*2822*/ 0x2caf, 1, 0x2cae, /* COPTIC CAPITAL LETTER PSI */ + /*2825*/ 0x2cb1, 1, 0x2cb0, /* COPTIC CAPITAL LETTER OOU */ + /*2828*/ 0x2cb3, 1, 0x2cb2, /* COPTIC CAPITAL LETTER DIALECT-P A.. */ + /*2831*/ 0x2cb5, 1, 0x2cb4, /* COPTIC CAPITAL LETTER OLD COPTIC .. */ + /*2834*/ 0x2cb7, 1, 0x2cb6, /* COPTIC CAPITAL LETTER CRYPTOGRAMM.. */ + /*2837*/ 0x2cb9, 1, 0x2cb8, /* COPTIC CAPITAL LETTER DIALECT-P K.. */ + /*2840*/ 0x2cbb, 1, 0x2cba, /* COPTIC CAPITAL LETTER DIALECT-P NI */ + /*2843*/ 0x2cbd, 1, 0x2cbc, /* COPTIC CAPITAL LETTER CRYPTOGRAMM.. */ + /*2846*/ 0x2cbf, 1, 0x2cbe, /* COPTIC CAPITAL LETTER OLD COPTIC .. */ + /*2849*/ 0x2cc1, 1, 0x2cc0, /* COPTIC CAPITAL LETTER SAMPI */ + /*2852*/ 0x2cc3, 1, 0x2cc2, /* COPTIC CAPITAL LETTER CROSSED SHEI */ + /*2855*/ 0x2cc5, 1, 0x2cc4, /* COPTIC CAPITAL LETTER OLD COPTIC .. */ + /*2858*/ 0x2cc7, 1, 0x2cc6, /* COPTIC CAPITAL LETTER OLD COPTIC .. */ + /*2861*/ 0x2cc9, 1, 0x2cc8, /* COPTIC CAPITAL LETTER AKHMIMIC KH.. */ + /*2864*/ 0x2ccb, 1, 0x2cca, /* COPTIC CAPITAL LETTER DIALECT-P H.. */ + /*2867*/ 0x2ccd, 1, 0x2ccc, /* COPTIC CAPITAL LETTER OLD COPTIC .. */ + /*2870*/ 0x2ccf, 1, 0x2cce, /* COPTIC CAPITAL LETTER OLD COPTIC .. */ + /*2873*/ 0x2cd1, 1, 0x2cd0, /* COPTIC CAPITAL LETTER L-SHAPED HA */ + /*2876*/ 0x2cd3, 1, 0x2cd2, /* COPTIC CAPITAL LETTER OLD COPTIC .. */ + /*2879*/ 0x2cd5, 1, 0x2cd4, /* COPTIC CAPITAL LETTER OLD COPTIC .. */ + /*2882*/ 0x2cd7, 1, 0x2cd6, /* COPTIC CAPITAL LETTER OLD COPTIC .. */ + /*2885*/ 0x2cd9, 1, 0x2cd8, /* COPTIC CAPITAL LETTER OLD COPTIC .. */ + /*2888*/ 0x2cdb, 1, 0x2cda, /* COPTIC CAPITAL LETTER OLD COPTIC .. */ + /*2891*/ 0x2cdd, 1, 0x2cdc, /* COPTIC CAPITAL LETTER OLD NUBIAN .. */ + /*2894*/ 0x2cdf, 1, 0x2cde, /* COPTIC CAPITAL LETTER OLD NUBIAN .. */ + /*2897*/ 0x2ce1, 1, 0x2ce0, /* COPTIC CAPITAL LETTER OLD NUBIAN .. */ + /*2900*/ 0x2ce3, 1, 0x2ce2, /* COPTIC CAPITAL LETTER OLD NUBIAN .. */ + /*2903*/ 0x2cec, 1, 0x2ceb, /* COPTIC CAPITAL LETTER CRYPTOGRAMM.. */ + /*2906*/ 0x2cee, 1, 0x2ced, /* COPTIC CAPITAL LETTER CRYPTOGRAMM.. */ + /*2909*/ 0x2cf3, 1, 0x2cf2, /* COPTIC CAPITAL LETTER BOHAIRIC KH.. */ + /*2912*/ 0x2d00, 1, 0x10a0, /* GEORGIAN CAPITAL LETTER AN */ + /*2915*/ 0x2d01, 1, 0x10a1, /* GEORGIAN CAPITAL LETTER BAN */ + /*2918*/ 0x2d02, 1, 0x10a2, /* GEORGIAN CAPITAL LETTER GAN */ + /*2921*/ 0x2d03, 1, 0x10a3, /* GEORGIAN CAPITAL LETTER DON */ + /*2924*/ 0x2d04, 1, 0x10a4, /* GEORGIAN CAPITAL LETTER EN */ + /*2927*/ 0x2d05, 1, 0x10a5, /* GEORGIAN CAPITAL LETTER VIN */ + /*2930*/ 0x2d06, 1, 0x10a6, /* GEORGIAN CAPITAL LETTER ZEN */ + /*2933*/ 0x2d07, 1, 0x10a7, /* GEORGIAN CAPITAL LETTER TAN */ + /*2936*/ 0x2d08, 1, 0x10a8, /* GEORGIAN CAPITAL LETTER IN */ + /*2939*/ 0x2d09, 1, 0x10a9, /* GEORGIAN CAPITAL LETTER KAN */ + /*2942*/ 0x2d0a, 1, 0x10aa, /* GEORGIAN CAPITAL LETTER LAS */ + /*2945*/ 0x2d0b, 1, 0x10ab, /* GEORGIAN CAPITAL LETTER MAN */ + /*2948*/ 0x2d0c, 1, 0x10ac, /* GEORGIAN CAPITAL LETTER NAR */ + /*2951*/ 0x2d0d, 1, 0x10ad, /* GEORGIAN CAPITAL LETTER ON */ + /*2954*/ 0x2d0e, 1, 0x10ae, /* GEORGIAN CAPITAL LETTER PAR */ + /*2957*/ 0x2d0f, 1, 0x10af, /* GEORGIAN CAPITAL LETTER ZHAR */ + /*2960*/ 0x2d10, 1, 0x10b0, /* GEORGIAN CAPITAL LETTER RAE */ + /*2963*/ 0x2d11, 1, 0x10b1, /* GEORGIAN CAPITAL LETTER SAN */ + /*2966*/ 0x2d12, 1, 0x10b2, /* GEORGIAN CAPITAL LETTER TAR */ + /*2969*/ 0x2d13, 1, 0x10b3, /* GEORGIAN CAPITAL LETTER UN */ + /*2972*/ 0x2d14, 1, 0x10b4, /* GEORGIAN CAPITAL LETTER PHAR */ + /*2975*/ 0x2d15, 1, 0x10b5, /* GEORGIAN CAPITAL LETTER KHAR */ + /*2978*/ 0x2d16, 1, 0x10b6, /* GEORGIAN CAPITAL LETTER GHAN */ + /*2981*/ 0x2d17, 1, 0x10b7, /* GEORGIAN CAPITAL LETTER QAR */ + /*2984*/ 0x2d18, 1, 0x10b8, /* GEORGIAN CAPITAL LETTER SHIN */ + /*2987*/ 0x2d19, 1, 0x10b9, /* GEORGIAN CAPITAL LETTER CHIN */ + /*2990*/ 0x2d1a, 1, 0x10ba, /* GEORGIAN CAPITAL LETTER CAN */ + /*2993*/ 0x2d1b, 1, 0x10bb, /* GEORGIAN CAPITAL LETTER JIL */ + /*2996*/ 0x2d1c, 1, 0x10bc, /* GEORGIAN CAPITAL LETTER CIL */ + /*2999*/ 0x2d1d, 1, 0x10bd, /* GEORGIAN CAPITAL LETTER CHAR */ + /*3002*/ 0x2d1e, 1, 0x10be, /* GEORGIAN CAPITAL LETTER XAN */ + /*3005*/ 0x2d1f, 1, 0x10bf, /* GEORGIAN CAPITAL LETTER JHAN */ + /*3008*/ 0x2d20, 1, 0x10c0, /* GEORGIAN CAPITAL LETTER HAE */ + /*3011*/ 0x2d21, 1, 0x10c1, /* GEORGIAN CAPITAL LETTER HE */ + /*3014*/ 0x2d22, 1, 0x10c2, /* GEORGIAN CAPITAL LETTER HIE */ + /*3017*/ 0x2d23, 1, 0x10c3, /* GEORGIAN CAPITAL LETTER WE */ + /*3020*/ 0x2d24, 1, 0x10c4, /* GEORGIAN CAPITAL LETTER HAR */ + /*3023*/ 0x2d25, 1, 0x10c5, /* GEORGIAN CAPITAL LETTER HOE */ + /*3026*/ 0x2d27, 1, 0x10c7, /* GEORGIAN CAPITAL LETTER YN */ + /*3029*/ 0x2d2d, 1, 0x10cd, /* GEORGIAN CAPITAL LETTER AEN */ + /*3032*/ 0xa641, 1, 0xa640, /* CYRILLIC CAPITAL LETTER ZEMLYA */ + /*3035*/ 0xa643, 1, 0xa642, /* CYRILLIC CAPITAL LETTER DZELO */ + /*3038*/ 0xa645, 1, 0xa644, /* CYRILLIC CAPITAL LETTER REVERSED .. */ + /*3041*/ 0xa647, 1, 0xa646, /* CYRILLIC CAPITAL LETTER IOTA */ + /*3044*/ 0xa649, 1, 0xa648, /* CYRILLIC CAPITAL LETTER DJERV */ + /*3047*/ 0xa64b, 2, 0x1c88, 0xa64a, /* CYRILLIC SMALL LETTER UNBLENDED UK */ + /*3051*/ 0xa64d, 1, 0xa64c, /* CYRILLIC CAPITAL LETTER BROAD OME.. */ + /*3054*/ 0xa64f, 1, 0xa64e, /* CYRILLIC CAPITAL LETTER NEUTRAL Y.. */ + /*3057*/ 0xa651, 1, 0xa650, /* CYRILLIC CAPITAL LETTER YERU WITH.. */ + /*3060*/ 0xa653, 1, 0xa652, /* CYRILLIC CAPITAL LETTER IOTIFIED .. */ + /*3063*/ 0xa655, 1, 0xa654, /* CYRILLIC CAPITAL LETTER REVERSED .. */ + /*3066*/ 0xa657, 1, 0xa656, /* CYRILLIC CAPITAL LETTER IOTIFIED A */ + /*3069*/ 0xa659, 1, 0xa658, /* CYRILLIC CAPITAL LETTER CLOSED LI.. */ + /*3072*/ 0xa65b, 1, 0xa65a, /* CYRILLIC CAPITAL LETTER BLENDED Y.. */ + /*3075*/ 0xa65d, 1, 0xa65c, /* CYRILLIC CAPITAL LETTER IOTIFIED .. */ + /*3078*/ 0xa65f, 1, 0xa65e, /* CYRILLIC CAPITAL LETTER YN */ + /*3081*/ 0xa661, 1, 0xa660, /* CYRILLIC CAPITAL LETTER REVERSED .. */ + /*3084*/ 0xa663, 1, 0xa662, /* CYRILLIC CAPITAL LETTER SOFT DE */ + /*3087*/ 0xa665, 1, 0xa664, /* CYRILLIC CAPITAL LETTER SOFT EL */ + /*3090*/ 0xa667, 1, 0xa666, /* CYRILLIC CAPITAL LETTER SOFT EM */ + /*3093*/ 0xa669, 1, 0xa668, /* CYRILLIC CAPITAL LETTER MONOCULAR.. */ + /*3096*/ 0xa66b, 1, 0xa66a, /* CYRILLIC CAPITAL LETTER BINOCULAR.. */ + /*3099*/ 0xa66d, 1, 0xa66c, /* CYRILLIC CAPITAL LETTER DOUBLE MO.. */ + /*3102*/ 0xa681, 1, 0xa680, /* CYRILLIC CAPITAL LETTER DWE */ + /*3105*/ 0xa683, 1, 0xa682, /* CYRILLIC CAPITAL LETTER DZWE */ + /*3108*/ 0xa685, 1, 0xa684, /* CYRILLIC CAPITAL LETTER ZHWE */ + /*3111*/ 0xa687, 1, 0xa686, /* CYRILLIC CAPITAL LETTER CCHE */ + /*3114*/ 0xa689, 1, 0xa688, /* CYRILLIC CAPITAL LETTER DZZE */ + /*3117*/ 0xa68b, 1, 0xa68a, /* CYRILLIC CAPITAL LETTER TE WITH M.. */ + /*3120*/ 0xa68d, 1, 0xa68c, /* CYRILLIC CAPITAL LETTER TWE */ + /*3123*/ 0xa68f, 1, 0xa68e, /* CYRILLIC CAPITAL LETTER TSWE */ + /*3126*/ 0xa691, 1, 0xa690, /* CYRILLIC CAPITAL LETTER TSSE */ + /*3129*/ 0xa693, 1, 0xa692, /* CYRILLIC CAPITAL LETTER TCHE */ + /*3132*/ 0xa695, 1, 0xa694, /* CYRILLIC CAPITAL LETTER HWE */ + /*3135*/ 0xa697, 1, 0xa696, /* CYRILLIC CAPITAL LETTER SHWE */ + /*3138*/ 0xa699, 1, 0xa698, /* CYRILLIC CAPITAL LETTER DOUBLE O */ + /*3141*/ 0xa69b, 1, 0xa69a, /* CYRILLIC CAPITAL LETTER CROSSED O */ + /*3144*/ 0xa723, 1, 0xa722, /* LATIN CAPITAL LETTER EGYPTOLOGICA.. */ + /*3147*/ 0xa725, 1, 0xa724, /* LATIN CAPITAL LETTER EGYPTOLOGICA.. */ + /*3150*/ 0xa727, 1, 0xa726, /* LATIN CAPITAL LETTER HENG */ + /*3153*/ 0xa729, 1, 0xa728, /* LATIN CAPITAL LETTER TZ */ + /*3156*/ 0xa72b, 1, 0xa72a, /* LATIN CAPITAL LETTER TRESILLO */ + /*3159*/ 0xa72d, 1, 0xa72c, /* LATIN CAPITAL LETTER CUATRILLO */ + /*3162*/ 0xa72f, 1, 0xa72e, /* LATIN CAPITAL LETTER CUATRILLO WI.. */ + /*3165*/ 0xa733, 1, 0xa732, /* LATIN CAPITAL LETTER AA */ + /*3168*/ 0xa735, 1, 0xa734, /* LATIN CAPITAL LETTER AO */ + /*3171*/ 0xa737, 1, 0xa736, /* LATIN CAPITAL LETTER AU */ + /*3174*/ 0xa739, 1, 0xa738, /* LATIN CAPITAL LETTER AV */ + /*3177*/ 0xa73b, 1, 0xa73a, /* LATIN CAPITAL LETTER AV WITH HORI.. */ + /*3180*/ 0xa73d, 1, 0xa73c, /* LATIN CAPITAL LETTER AY */ + /*3183*/ 0xa73f, 1, 0xa73e, /* LATIN CAPITAL LETTER REVERSED C W.. */ + /*3186*/ 0xa741, 1, 0xa740, /* LATIN CAPITAL LETTER K WITH STROKE */ + /*3189*/ 0xa743, 1, 0xa742, /* LATIN CAPITAL LETTER K WITH DIAGO.. */ + /*3192*/ 0xa745, 1, 0xa744, /* LATIN CAPITAL LETTER K WITH STROK.. */ + /*3195*/ 0xa747, 1, 0xa746, /* LATIN CAPITAL LETTER BROKEN L */ + /*3198*/ 0xa749, 1, 0xa748, /* LATIN CAPITAL LETTER L WITH HIGH .. */ + /*3201*/ 0xa74b, 1, 0xa74a, /* LATIN CAPITAL LETTER O WITH LONG .. */ + /*3204*/ 0xa74d, 1, 0xa74c, /* LATIN CAPITAL LETTER O WITH LOOP */ + /*3207*/ 0xa74f, 1, 0xa74e, /* LATIN CAPITAL LETTER OO */ + /*3210*/ 0xa751, 1, 0xa750, /* LATIN CAPITAL LETTER P WITH STROK.. */ + /*3213*/ 0xa753, 1, 0xa752, /* LATIN CAPITAL LETTER P WITH FLOUR.. */ + /*3216*/ 0xa755, 1, 0xa754, /* LATIN CAPITAL LETTER P WITH SQUIR.. */ + /*3219*/ 0xa757, 1, 0xa756, /* LATIN CAPITAL LETTER Q WITH STROK.. */ + /*3222*/ 0xa759, 1, 0xa758, /* LATIN CAPITAL LETTER Q WITH DIAGO.. */ + /*3225*/ 0xa75b, 1, 0xa75a, /* LATIN CAPITAL LETTER R ROTUNDA */ + /*3228*/ 0xa75d, 1, 0xa75c, /* LATIN CAPITAL LETTER RUM ROTUNDA */ + /*3231*/ 0xa75f, 1, 0xa75e, /* LATIN CAPITAL LETTER V WITH DIAGO.. */ + /*3234*/ 0xa761, 1, 0xa760, /* LATIN CAPITAL LETTER VY */ + /*3237*/ 0xa763, 1, 0xa762, /* LATIN CAPITAL LETTER VISIGOTHIC Z */ + /*3240*/ 0xa765, 1, 0xa764, /* LATIN CAPITAL LETTER THORN WITH S.. */ + /*3243*/ 0xa767, 1, 0xa766, /* LATIN CAPITAL LETTER THORN WITH S.. */ + /*3246*/ 0xa769, 1, 0xa768, /* LATIN CAPITAL LETTER VEND */ + /*3249*/ 0xa76b, 1, 0xa76a, /* LATIN CAPITAL LETTER ET */ + /*3252*/ 0xa76d, 1, 0xa76c, /* LATIN CAPITAL LETTER IS */ + /*3255*/ 0xa76f, 1, 0xa76e, /* LATIN CAPITAL LETTER CON */ + /*3258*/ 0xa77a, 1, 0xa779, /* LATIN CAPITAL LETTER INSULAR D */ + /*3261*/ 0xa77c, 1, 0xa77b, /* LATIN CAPITAL LETTER INSULAR F */ + /*3264*/ 0xa77f, 1, 0xa77e, /* LATIN CAPITAL LETTER TURNED INSUL.. */ + /*3267*/ 0xa781, 1, 0xa780, /* LATIN CAPITAL LETTER TURNED L */ + /*3270*/ 0xa783, 1, 0xa782, /* LATIN CAPITAL LETTER INSULAR R */ + /*3273*/ 0xa785, 1, 0xa784, /* LATIN CAPITAL LETTER INSULAR S */ + /*3276*/ 0xa787, 1, 0xa786, /* LATIN CAPITAL LETTER INSULAR T */ + /*3279*/ 0xa78c, 1, 0xa78b, /* LATIN CAPITAL LETTER SALTILLO */ + /*3282*/ 0xa791, 1, 0xa790, /* LATIN CAPITAL LETTER N WITH DESCE.. */ + /*3285*/ 0xa793, 1, 0xa792, /* LATIN CAPITAL LETTER C WITH BAR */ + /*3288*/ 0xa794, 1, 0xa7c4, /* LATIN CAPITAL LETTER C WITH PALAT.. */ + /*3291*/ 0xa797, 1, 0xa796, /* LATIN CAPITAL LETTER B WITH FLOUR.. */ + /*3294*/ 0xa799, 1, 0xa798, /* LATIN CAPITAL LETTER F WITH STROKE */ + /*3297*/ 0xa79b, 1, 0xa79a, /* LATIN CAPITAL LETTER VOLAPUK AE */ + /*3300*/ 0xa79d, 1, 0xa79c, /* LATIN CAPITAL LETTER VOLAPUK OE */ + /*3303*/ 0xa79f, 1, 0xa79e, /* LATIN CAPITAL LETTER VOLAPUK UE */ + /*3306*/ 0xa7a1, 1, 0xa7a0, /* LATIN CAPITAL LETTER G WITH OBLIQ.. */ + /*3309*/ 0xa7a3, 1, 0xa7a2, /* LATIN CAPITAL LETTER K WITH OBLIQ.. */ + /*3312*/ 0xa7a5, 1, 0xa7a4, /* LATIN CAPITAL LETTER N WITH OBLIQ.. */ + /*3315*/ 0xa7a7, 1, 0xa7a6, /* LATIN CAPITAL LETTER R WITH OBLIQ.. */ + /*3318*/ 0xa7a9, 1, 0xa7a8, /* LATIN CAPITAL LETTER S WITH OBLIQ.. */ + /*3321*/ 0xa7b5, 1, 0xa7b4, /* LATIN CAPITAL LETTER BETA */ + /*3324*/ 0xa7b7, 1, 0xa7b6, /* LATIN CAPITAL LETTER OMEGA */ + /*3327*/ 0xa7b9, 1, 0xa7b8, /* LATIN CAPITAL LETTER U WITH STROKE */ + /*3330*/ 0xa7bb, 1, 0xa7ba, /* LATIN CAPITAL LETTER GLOTTAL A */ + /*3333*/ 0xa7bd, 1, 0xa7bc, /* LATIN CAPITAL LETTER GLOTTAL I */ + /*3336*/ 0xa7bf, 1, 0xa7be, /* LATIN CAPITAL LETTER GLOTTAL U */ + /*3339*/ 0xa7c1, 1, 0xa7c0, /* LATIN CAPITAL LETTER OLD POLISH O */ + /*3342*/ 0xa7c3, 1, 0xa7c2, /* LATIN CAPITAL LETTER ANGLICANA W */ + /*3345*/ 0xa7c8, 1, 0xa7c7, /* LATIN CAPITAL LETTER D WITH SHORT.. */ + /*3348*/ 0xa7ca, 1, 0xa7c9, /* LATIN CAPITAL LETTER S WITH SHORT.. */ + /*3351*/ 0xa7cd, 1, 0xa7cc, /* LATIN CAPITAL LETTER S WITH DIAGO.. */ + /*3354*/ 0xa7d1, 1, 0xa7d0, /* LATIN CAPITAL LETTER CLOSED INSUL.. */ + /*3357*/ 0xa7d7, 1, 0xa7d6, /* LATIN CAPITAL LETTER MIDDLE SCOTS.. */ + /*3360*/ 0xa7d9, 1, 0xa7d8, /* LATIN CAPITAL LETTER SIGMOID S */ + /*3363*/ 0xa7db, 1, 0xa7da, /* LATIN CAPITAL LETTER LAMBDA */ + /*3366*/ 0xa7f6, 1, 0xa7f5, /* LATIN CAPITAL LETTER REVERSED HAL.. */ + /*3369*/ 0xab53, 1, 0xa7b3, /* LATIN CAPITAL LETTER CHI */ + /*3372*/ 0xff41, 1, 0xff21, /* FULLWIDTH LATIN CAPITAL LETTER A */ + /*3375*/ 0xff42, 1, 0xff22, /* FULLWIDTH LATIN CAPITAL LETTER B */ + /*3378*/ 0xff43, 1, 0xff23, /* FULLWIDTH LATIN CAPITAL LETTER C */ + /*3381*/ 0xff44, 1, 0xff24, /* FULLWIDTH LATIN CAPITAL LETTER D */ + /*3384*/ 0xff45, 1, 0xff25, /* FULLWIDTH LATIN CAPITAL LETTER E */ + /*3387*/ 0xff46, 1, 0xff26, /* FULLWIDTH LATIN CAPITAL LETTER F */ + /*3390*/ 0xff47, 1, 0xff27, /* FULLWIDTH LATIN CAPITAL LETTER G */ + /*3393*/ 0xff48, 1, 0xff28, /* FULLWIDTH LATIN CAPITAL LETTER H */ + /*3396*/ 0xff49, 1, 0xff29, /* FULLWIDTH LATIN CAPITAL LETTER I */ + /*3399*/ 0xff4a, 1, 0xff2a, /* FULLWIDTH LATIN CAPITAL LETTER J */ + /*3402*/ 0xff4b, 1, 0xff2b, /* FULLWIDTH LATIN CAPITAL LETTER K */ + /*3405*/ 0xff4c, 1, 0xff2c, /* FULLWIDTH LATIN CAPITAL LETTER L */ + /*3408*/ 0xff4d, 1, 0xff2d, /* FULLWIDTH LATIN CAPITAL LETTER M */ + /*3411*/ 0xff4e, 1, 0xff2e, /* FULLWIDTH LATIN CAPITAL LETTER N */ + /*3414*/ 0xff4f, 1, 0xff2f, /* FULLWIDTH LATIN CAPITAL LETTER O */ + /*3417*/ 0xff50, 1, 0xff30, /* FULLWIDTH LATIN CAPITAL LETTER P */ + /*3420*/ 0xff51, 1, 0xff31, /* FULLWIDTH LATIN CAPITAL LETTER Q */ + /*3423*/ 0xff52, 1, 0xff32, /* FULLWIDTH LATIN CAPITAL LETTER R */ + /*3426*/ 0xff53, 1, 0xff33, /* FULLWIDTH LATIN CAPITAL LETTER S */ + /*3429*/ 0xff54, 1, 0xff34, /* FULLWIDTH LATIN CAPITAL LETTER T */ + /*3432*/ 0xff55, 1, 0xff35, /* FULLWIDTH LATIN CAPITAL LETTER U */ + /*3435*/ 0xff56, 1, 0xff36, /* FULLWIDTH LATIN CAPITAL LETTER V */ + /*3438*/ 0xff57, 1, 0xff37, /* FULLWIDTH LATIN CAPITAL LETTER W */ + /*3441*/ 0xff58, 1, 0xff38, /* FULLWIDTH LATIN CAPITAL LETTER X */ + /*3444*/ 0xff59, 1, 0xff39, /* FULLWIDTH LATIN CAPITAL LETTER Y */ + /*3447*/ 0xff5a, 1, 0xff3a, /* FULLWIDTH LATIN CAPITAL LETTER Z */ + /*3450*/ 0x010428, 1, 0x010400, /* DESERET CAPITAL LETTER LONG I */ + /*3453*/ 0x010429, 1, 0x010401, /* DESERET CAPITAL LETTER LONG E */ + /*3456*/ 0x01042a, 1, 0x010402, /* DESERET CAPITAL LETTER LONG A */ + /*3459*/ 0x01042b, 1, 0x010403, /* DESERET CAPITAL LETTER LONG AH */ + /*3462*/ 0x01042c, 1, 0x010404, /* DESERET CAPITAL LETTER LONG O */ + /*3465*/ 0x01042d, 1, 0x010405, /* DESERET CAPITAL LETTER LONG OO */ + /*3468*/ 0x01042e, 1, 0x010406, /* DESERET CAPITAL LETTER SHORT I */ + /*3471*/ 0x01042f, 1, 0x010407, /* DESERET CAPITAL LETTER SHORT E */ + /*3474*/ 0x010430, 1, 0x010408, /* DESERET CAPITAL LETTER SHORT A */ + /*3477*/ 0x010431, 1, 0x010409, /* DESERET CAPITAL LETTER SHORT AH */ + /*3480*/ 0x010432, 1, 0x01040a, /* DESERET CAPITAL LETTER SHORT O */ + /*3483*/ 0x010433, 1, 0x01040b, /* DESERET CAPITAL LETTER SHORT OO */ + /*3486*/ 0x010434, 1, 0x01040c, /* DESERET CAPITAL LETTER AY */ + /*3489*/ 0x010435, 1, 0x01040d, /* DESERET CAPITAL LETTER OW */ + /*3492*/ 0x010436, 1, 0x01040e, /* DESERET CAPITAL LETTER WU */ + /*3495*/ 0x010437, 1, 0x01040f, /* DESERET CAPITAL LETTER YEE */ + /*3498*/ 0x010438, 1, 0x010410, /* DESERET CAPITAL LETTER H */ + /*3501*/ 0x010439, 1, 0x010411, /* DESERET CAPITAL LETTER PEE */ + /*3504*/ 0x01043a, 1, 0x010412, /* DESERET CAPITAL LETTER BEE */ + /*3507*/ 0x01043b, 1, 0x010413, /* DESERET CAPITAL LETTER TEE */ + /*3510*/ 0x01043c, 1, 0x010414, /* DESERET CAPITAL LETTER DEE */ + /*3513*/ 0x01043d, 1, 0x010415, /* DESERET CAPITAL LETTER CHEE */ + /*3516*/ 0x01043e, 1, 0x010416, /* DESERET CAPITAL LETTER JEE */ + /*3519*/ 0x01043f, 1, 0x010417, /* DESERET CAPITAL LETTER KAY */ + /*3522*/ 0x010440, 1, 0x010418, /* DESERET CAPITAL LETTER GAY */ + /*3525*/ 0x010441, 1, 0x010419, /* DESERET CAPITAL LETTER EF */ + /*3528*/ 0x010442, 1, 0x01041a, /* DESERET CAPITAL LETTER VEE */ + /*3531*/ 0x010443, 1, 0x01041b, /* DESERET CAPITAL LETTER ETH */ + /*3534*/ 0x010444, 1, 0x01041c, /* DESERET CAPITAL LETTER THEE */ + /*3537*/ 0x010445, 1, 0x01041d, /* DESERET CAPITAL LETTER ES */ + /*3540*/ 0x010446, 1, 0x01041e, /* DESERET CAPITAL LETTER ZEE */ + /*3543*/ 0x010447, 1, 0x01041f, /* DESERET CAPITAL LETTER ESH */ + /*3546*/ 0x010448, 1, 0x010420, /* DESERET CAPITAL LETTER ZHEE */ + /*3549*/ 0x010449, 1, 0x010421, /* DESERET CAPITAL LETTER ER */ + /*3552*/ 0x01044a, 1, 0x010422, /* DESERET CAPITAL LETTER EL */ + /*3555*/ 0x01044b, 1, 0x010423, /* DESERET CAPITAL LETTER EM */ + /*3558*/ 0x01044c, 1, 0x010424, /* DESERET CAPITAL LETTER EN */ + /*3561*/ 0x01044d, 1, 0x010425, /* DESERET CAPITAL LETTER ENG */ + /*3564*/ 0x01044e, 1, 0x010426, /* DESERET CAPITAL LETTER OI */ + /*3567*/ 0x01044f, 1, 0x010427, /* DESERET CAPITAL LETTER EW */ + /*3570*/ 0x0104d8, 1, 0x0104b0, /* OSAGE CAPITAL LETTER A */ + /*3573*/ 0x0104d9, 1, 0x0104b1, /* OSAGE CAPITAL LETTER AI */ + /*3576*/ 0x0104da, 1, 0x0104b2, /* OSAGE CAPITAL LETTER AIN */ + /*3579*/ 0x0104db, 1, 0x0104b3, /* OSAGE CAPITAL LETTER AH */ + /*3582*/ 0x0104dc, 1, 0x0104b4, /* OSAGE CAPITAL LETTER BRA */ + /*3585*/ 0x0104dd, 1, 0x0104b5, /* OSAGE CAPITAL LETTER CHA */ + /*3588*/ 0x0104de, 1, 0x0104b6, /* OSAGE CAPITAL LETTER EHCHA */ + /*3591*/ 0x0104df, 1, 0x0104b7, /* OSAGE CAPITAL LETTER E */ + /*3594*/ 0x0104e0, 1, 0x0104b8, /* OSAGE CAPITAL LETTER EIN */ + /*3597*/ 0x0104e1, 1, 0x0104b9, /* OSAGE CAPITAL LETTER HA */ + /*3600*/ 0x0104e2, 1, 0x0104ba, /* OSAGE CAPITAL LETTER HYA */ + /*3603*/ 0x0104e3, 1, 0x0104bb, /* OSAGE CAPITAL LETTER I */ + /*3606*/ 0x0104e4, 1, 0x0104bc, /* OSAGE CAPITAL LETTER KA */ + /*3609*/ 0x0104e5, 1, 0x0104bd, /* OSAGE CAPITAL LETTER EHKA */ + /*3612*/ 0x0104e6, 1, 0x0104be, /* OSAGE CAPITAL LETTER KYA */ + /*3615*/ 0x0104e7, 1, 0x0104bf, /* OSAGE CAPITAL LETTER LA */ + /*3618*/ 0x0104e8, 1, 0x0104c0, /* OSAGE CAPITAL LETTER MA */ + /*3621*/ 0x0104e9, 1, 0x0104c1, /* OSAGE CAPITAL LETTER NA */ + /*3624*/ 0x0104ea, 1, 0x0104c2, /* OSAGE CAPITAL LETTER O */ + /*3627*/ 0x0104eb, 1, 0x0104c3, /* OSAGE CAPITAL LETTER OIN */ + /*3630*/ 0x0104ec, 1, 0x0104c4, /* OSAGE CAPITAL LETTER PA */ + /*3633*/ 0x0104ed, 1, 0x0104c5, /* OSAGE CAPITAL LETTER EHPA */ + /*3636*/ 0x0104ee, 1, 0x0104c6, /* OSAGE CAPITAL LETTER SA */ + /*3639*/ 0x0104ef, 1, 0x0104c7, /* OSAGE CAPITAL LETTER SHA */ + /*3642*/ 0x0104f0, 1, 0x0104c8, /* OSAGE CAPITAL LETTER TA */ + /*3645*/ 0x0104f1, 1, 0x0104c9, /* OSAGE CAPITAL LETTER EHTA */ + /*3648*/ 0x0104f2, 1, 0x0104ca, /* OSAGE CAPITAL LETTER TSA */ + /*3651*/ 0x0104f3, 1, 0x0104cb, /* OSAGE CAPITAL LETTER EHTSA */ + /*3654*/ 0x0104f4, 1, 0x0104cc, /* OSAGE CAPITAL LETTER TSHA */ + /*3657*/ 0x0104f5, 1, 0x0104cd, /* OSAGE CAPITAL LETTER DHA */ + /*3660*/ 0x0104f6, 1, 0x0104ce, /* OSAGE CAPITAL LETTER U */ + /*3663*/ 0x0104f7, 1, 0x0104cf, /* OSAGE CAPITAL LETTER WA */ + /*3666*/ 0x0104f8, 1, 0x0104d0, /* OSAGE CAPITAL LETTER KHA */ + /*3669*/ 0x0104f9, 1, 0x0104d1, /* OSAGE CAPITAL LETTER GHA */ + /*3672*/ 0x0104fa, 1, 0x0104d2, /* OSAGE CAPITAL LETTER ZA */ + /*3675*/ 0x0104fb, 1, 0x0104d3, /* OSAGE CAPITAL LETTER ZHA */ + /*3678*/ 0x010597, 1, 0x010570, /* VITHKUQI CAPITAL LETTER A */ + /*3681*/ 0x010598, 1, 0x010571, /* VITHKUQI CAPITAL LETTER BBE */ + /*3684*/ 0x010599, 1, 0x010572, /* VITHKUQI CAPITAL LETTER BE */ + /*3687*/ 0x01059a, 1, 0x010573, /* VITHKUQI CAPITAL LETTER CE */ + /*3690*/ 0x01059b, 1, 0x010574, /* VITHKUQI CAPITAL LETTER CHE */ + /*3693*/ 0x01059c, 1, 0x010575, /* VITHKUQI CAPITAL LETTER DE */ + /*3696*/ 0x01059d, 1, 0x010576, /* VITHKUQI CAPITAL LETTER DHE */ + /*3699*/ 0x01059e, 1, 0x010577, /* VITHKUQI CAPITAL LETTER EI */ + /*3702*/ 0x01059f, 1, 0x010578, /* VITHKUQI CAPITAL LETTER E */ + /*3705*/ 0x0105a0, 1, 0x010579, /* VITHKUQI CAPITAL LETTER FE */ + /*3708*/ 0x0105a1, 1, 0x01057a, /* VITHKUQI CAPITAL LETTER GA */ + /*3711*/ 0x0105a3, 1, 0x01057c, /* VITHKUQI CAPITAL LETTER HA */ + /*3714*/ 0x0105a4, 1, 0x01057d, /* VITHKUQI CAPITAL LETTER HHA */ + /*3717*/ 0x0105a5, 1, 0x01057e, /* VITHKUQI CAPITAL LETTER I */ + /*3720*/ 0x0105a6, 1, 0x01057f, /* VITHKUQI CAPITAL LETTER IJE */ + /*3723*/ 0x0105a7, 1, 0x010580, /* VITHKUQI CAPITAL LETTER JE */ + /*3726*/ 0x0105a8, 1, 0x010581, /* VITHKUQI CAPITAL LETTER KA */ + /*3729*/ 0x0105a9, 1, 0x010582, /* VITHKUQI CAPITAL LETTER LA */ + /*3732*/ 0x0105aa, 1, 0x010583, /* VITHKUQI CAPITAL LETTER LLA */ + /*3735*/ 0x0105ab, 1, 0x010584, /* VITHKUQI CAPITAL LETTER ME */ + /*3738*/ 0x0105ac, 1, 0x010585, /* VITHKUQI CAPITAL LETTER NE */ + /*3741*/ 0x0105ad, 1, 0x010586, /* VITHKUQI CAPITAL LETTER NJE */ + /*3744*/ 0x0105ae, 1, 0x010587, /* VITHKUQI CAPITAL LETTER O */ + /*3747*/ 0x0105af, 1, 0x010588, /* VITHKUQI CAPITAL LETTER PE */ + /*3750*/ 0x0105b0, 1, 0x010589, /* VITHKUQI CAPITAL LETTER QA */ + /*3753*/ 0x0105b1, 1, 0x01058a, /* VITHKUQI CAPITAL LETTER RE */ + /*3756*/ 0x0105b3, 1, 0x01058c, /* VITHKUQI CAPITAL LETTER SE */ + /*3759*/ 0x0105b4, 1, 0x01058d, /* VITHKUQI CAPITAL LETTER SHE */ + /*3762*/ 0x0105b5, 1, 0x01058e, /* VITHKUQI CAPITAL LETTER TE */ + /*3765*/ 0x0105b6, 1, 0x01058f, /* VITHKUQI CAPITAL LETTER THE */ + /*3768*/ 0x0105b7, 1, 0x010590, /* VITHKUQI CAPITAL LETTER U */ + /*3771*/ 0x0105b8, 1, 0x010591, /* VITHKUQI CAPITAL LETTER VE */ + /*3774*/ 0x0105b9, 1, 0x010592, /* VITHKUQI CAPITAL LETTER XE */ + /*3777*/ 0x0105bb, 1, 0x010594, /* VITHKUQI CAPITAL LETTER Y */ + /*3780*/ 0x0105bc, 1, 0x010595, /* VITHKUQI CAPITAL LETTER ZE */ + /*3783*/ 0x010cc0, 1, 0x010c80, /* OLD HUNGARIAN CAPITAL LETTER A */ + /*3786*/ 0x010cc1, 1, 0x010c81, /* OLD HUNGARIAN CAPITAL LETTER AA */ + /*3789*/ 0x010cc2, 1, 0x010c82, /* OLD HUNGARIAN CAPITAL LETTER EB */ + /*3792*/ 0x010cc3, 1, 0x010c83, /* OLD HUNGARIAN CAPITAL LETTER AMB */ + /*3795*/ 0x010cc4, 1, 0x010c84, /* OLD HUNGARIAN CAPITAL LETTER EC */ + /*3798*/ 0x010cc5, 1, 0x010c85, /* OLD HUNGARIAN CAPITAL LETTER ENC */ + /*3801*/ 0x010cc6, 1, 0x010c86, /* OLD HUNGARIAN CAPITAL LETTER ECS */ + /*3804*/ 0x010cc7, 1, 0x010c87, /* OLD HUNGARIAN CAPITAL LETTER ED */ + /*3807*/ 0x010cc8, 1, 0x010c88, /* OLD HUNGARIAN CAPITAL LETTER AND */ + /*3810*/ 0x010cc9, 1, 0x010c89, /* OLD HUNGARIAN CAPITAL LETTER E */ + /*3813*/ 0x010cca, 1, 0x010c8a, /* OLD HUNGARIAN CAPITAL LETTER CLOS.. */ + /*3816*/ 0x010ccb, 1, 0x010c8b, /* OLD HUNGARIAN CAPITAL LETTER EE */ + /*3819*/ 0x010ccc, 1, 0x010c8c, /* OLD HUNGARIAN CAPITAL LETTER EF */ + /*3822*/ 0x010ccd, 1, 0x010c8d, /* OLD HUNGARIAN CAPITAL LETTER EG */ + /*3825*/ 0x010cce, 1, 0x010c8e, /* OLD HUNGARIAN CAPITAL LETTER EGY */ + /*3828*/ 0x010ccf, 1, 0x010c8f, /* OLD HUNGARIAN CAPITAL LETTER EH */ + /*3831*/ 0x010cd0, 1, 0x010c90, /* OLD HUNGARIAN CAPITAL LETTER I */ + /*3834*/ 0x010cd1, 1, 0x010c91, /* OLD HUNGARIAN CAPITAL LETTER II */ + /*3837*/ 0x010cd2, 1, 0x010c92, /* OLD HUNGARIAN CAPITAL LETTER EJ */ + /*3840*/ 0x010cd3, 1, 0x010c93, /* OLD HUNGARIAN CAPITAL LETTER EK */ + /*3843*/ 0x010cd4, 1, 0x010c94, /* OLD HUNGARIAN CAPITAL LETTER AK */ + /*3846*/ 0x010cd5, 1, 0x010c95, /* OLD HUNGARIAN CAPITAL LETTER UNK */ + /*3849*/ 0x010cd6, 1, 0x010c96, /* OLD HUNGARIAN CAPITAL LETTER EL */ + /*3852*/ 0x010cd7, 1, 0x010c97, /* OLD HUNGARIAN CAPITAL LETTER ELY */ + /*3855*/ 0x010cd8, 1, 0x010c98, /* OLD HUNGARIAN CAPITAL LETTER EM */ + /*3858*/ 0x010cd9, 1, 0x010c99, /* OLD HUNGARIAN CAPITAL LETTER EN */ + /*3861*/ 0x010cda, 1, 0x010c9a, /* OLD HUNGARIAN CAPITAL LETTER ENY */ + /*3864*/ 0x010cdb, 1, 0x010c9b, /* OLD HUNGARIAN CAPITAL LETTER O */ + /*3867*/ 0x010cdc, 1, 0x010c9c, /* OLD HUNGARIAN CAPITAL LETTER OO */ + /*3870*/ 0x010cdd, 1, 0x010c9d, /* OLD HUNGARIAN CAPITAL LETTER NIKO.. */ + /*3873*/ 0x010cde, 1, 0x010c9e, /* OLD HUNGARIAN CAPITAL LETTER RUDI.. */ + /*3876*/ 0x010cdf, 1, 0x010c9f, /* OLD HUNGARIAN CAPITAL LETTER OEE */ + /*3879*/ 0x010ce0, 1, 0x010ca0, /* OLD HUNGARIAN CAPITAL LETTER EP */ + /*3882*/ 0x010ce1, 1, 0x010ca1, /* OLD HUNGARIAN CAPITAL LETTER EMP */ + /*3885*/ 0x010ce2, 1, 0x010ca2, /* OLD HUNGARIAN CAPITAL LETTER ER */ + /*3888*/ 0x010ce3, 1, 0x010ca3, /* OLD HUNGARIAN CAPITAL LETTER SHOR.. */ + /*3891*/ 0x010ce4, 1, 0x010ca4, /* OLD HUNGARIAN CAPITAL LETTER ES */ + /*3894*/ 0x010ce5, 1, 0x010ca5, /* OLD HUNGARIAN CAPITAL LETTER ESZ */ + /*3897*/ 0x010ce6, 1, 0x010ca6, /* OLD HUNGARIAN CAPITAL LETTER ET */ + /*3900*/ 0x010ce7, 1, 0x010ca7, /* OLD HUNGARIAN CAPITAL LETTER ENT */ + /*3903*/ 0x010ce8, 1, 0x010ca8, /* OLD HUNGARIAN CAPITAL LETTER ETY */ + /*3906*/ 0x010ce9, 1, 0x010ca9, /* OLD HUNGARIAN CAPITAL LETTER ECH */ + /*3909*/ 0x010cea, 1, 0x010caa, /* OLD HUNGARIAN CAPITAL LETTER U */ + /*3912*/ 0x010ceb, 1, 0x010cab, /* OLD HUNGARIAN CAPITAL LETTER UU */ + /*3915*/ 0x010cec, 1, 0x010cac, /* OLD HUNGARIAN CAPITAL LETTER NIKO.. */ + /*3918*/ 0x010ced, 1, 0x010cad, /* OLD HUNGARIAN CAPITAL LETTER RUDI.. */ + /*3921*/ 0x010cee, 1, 0x010cae, /* OLD HUNGARIAN CAPITAL LETTER EV */ + /*3924*/ 0x010cef, 1, 0x010caf, /* OLD HUNGARIAN CAPITAL LETTER EZ */ + /*3927*/ 0x010cf0, 1, 0x010cb0, /* OLD HUNGARIAN CAPITAL LETTER EZS */ + /*3930*/ 0x010cf1, 1, 0x010cb1, /* OLD HUNGARIAN CAPITAL LETTER ENT-.. */ + /*3933*/ 0x010cf2, 1, 0x010cb2, /* OLD HUNGARIAN CAPITAL LETTER US */ + /*3936*/ 0x010d70, 1, 0x010d50, /* GARAY CAPITAL LETTER A */ + /*3939*/ 0x010d71, 1, 0x010d51, /* GARAY CAPITAL LETTER CA */ + /*3942*/ 0x010d72, 1, 0x010d52, /* GARAY CAPITAL LETTER MA */ + /*3945*/ 0x010d73, 1, 0x010d53, /* GARAY CAPITAL LETTER KA */ + /*3948*/ 0x010d74, 1, 0x010d54, /* GARAY CAPITAL LETTER BA */ + /*3951*/ 0x010d75, 1, 0x010d55, /* GARAY CAPITAL LETTER JA */ + /*3954*/ 0x010d76, 1, 0x010d56, /* GARAY CAPITAL LETTER SA */ + /*3957*/ 0x010d77, 1, 0x010d57, /* GARAY CAPITAL LETTER WA */ + /*3960*/ 0x010d78, 1, 0x010d58, /* GARAY CAPITAL LETTER LA */ + /*3963*/ 0x010d79, 1, 0x010d59, /* GARAY CAPITAL LETTER GA */ + /*3966*/ 0x010d7a, 1, 0x010d5a, /* GARAY CAPITAL LETTER DA */ + /*3969*/ 0x010d7b, 1, 0x010d5b, /* GARAY CAPITAL LETTER XA */ + /*3972*/ 0x010d7c, 1, 0x010d5c, /* GARAY CAPITAL LETTER YA */ + /*3975*/ 0x010d7d, 1, 0x010d5d, /* GARAY CAPITAL LETTER TA */ + /*3978*/ 0x010d7e, 1, 0x010d5e, /* GARAY CAPITAL LETTER RA */ + /*3981*/ 0x010d7f, 1, 0x010d5f, /* GARAY CAPITAL LETTER NYA */ + /*3984*/ 0x010d80, 1, 0x010d60, /* GARAY CAPITAL LETTER FA */ + /*3987*/ 0x010d81, 1, 0x010d61, /* GARAY CAPITAL LETTER NA */ + /*3990*/ 0x010d82, 1, 0x010d62, /* GARAY CAPITAL LETTER PA */ + /*3993*/ 0x010d83, 1, 0x010d63, /* GARAY CAPITAL LETTER HA */ + /*3996*/ 0x010d84, 1, 0x010d64, /* GARAY CAPITAL LETTER OLD KA */ + /*3999*/ 0x010d85, 1, 0x010d65, /* GARAY CAPITAL LETTER OLD NA */ + /*4002*/ 0x0118c0, 1, 0x0118a0, /* WARANG CITI CAPITAL LETTER NGAA */ + /*4005*/ 0x0118c1, 1, 0x0118a1, /* WARANG CITI CAPITAL LETTER A */ + /*4008*/ 0x0118c2, 1, 0x0118a2, /* WARANG CITI CAPITAL LETTER WI */ + /*4011*/ 0x0118c3, 1, 0x0118a3, /* WARANG CITI CAPITAL LETTER YU */ + /*4014*/ 0x0118c4, 1, 0x0118a4, /* WARANG CITI CAPITAL LETTER YA */ + /*4017*/ 0x0118c5, 1, 0x0118a5, /* WARANG CITI CAPITAL LETTER YO */ + /*4020*/ 0x0118c6, 1, 0x0118a6, /* WARANG CITI CAPITAL LETTER II */ + /*4023*/ 0x0118c7, 1, 0x0118a7, /* WARANG CITI CAPITAL LETTER UU */ + /*4026*/ 0x0118c8, 1, 0x0118a8, /* WARANG CITI CAPITAL LETTER E */ + /*4029*/ 0x0118c9, 1, 0x0118a9, /* WARANG CITI CAPITAL LETTER O */ + /*4032*/ 0x0118ca, 1, 0x0118aa, /* WARANG CITI CAPITAL LETTER ANG */ + /*4035*/ 0x0118cb, 1, 0x0118ab, /* WARANG CITI CAPITAL LETTER GA */ + /*4038*/ 0x0118cc, 1, 0x0118ac, /* WARANG CITI CAPITAL LETTER KO */ + /*4041*/ 0x0118cd, 1, 0x0118ad, /* WARANG CITI CAPITAL LETTER ENY */ + /*4044*/ 0x0118ce, 1, 0x0118ae, /* WARANG CITI CAPITAL LETTER YUJ */ + /*4047*/ 0x0118cf, 1, 0x0118af, /* WARANG CITI CAPITAL LETTER UC */ + /*4050*/ 0x0118d0, 1, 0x0118b0, /* WARANG CITI CAPITAL LETTER ENN */ + /*4053*/ 0x0118d1, 1, 0x0118b1, /* WARANG CITI CAPITAL LETTER ODD */ + /*4056*/ 0x0118d2, 1, 0x0118b2, /* WARANG CITI CAPITAL LETTER TTE */ + /*4059*/ 0x0118d3, 1, 0x0118b3, /* WARANG CITI CAPITAL LETTER NUNG */ + /*4062*/ 0x0118d4, 1, 0x0118b4, /* WARANG CITI CAPITAL LETTER DA */ + /*4065*/ 0x0118d5, 1, 0x0118b5, /* WARANG CITI CAPITAL LETTER AT */ + /*4068*/ 0x0118d6, 1, 0x0118b6, /* WARANG CITI CAPITAL LETTER AM */ + /*4071*/ 0x0118d7, 1, 0x0118b7, /* WARANG CITI CAPITAL LETTER BU */ + /*4074*/ 0x0118d8, 1, 0x0118b8, /* WARANG CITI CAPITAL LETTER PU */ + /*4077*/ 0x0118d9, 1, 0x0118b9, /* WARANG CITI CAPITAL LETTER HIYO */ + /*4080*/ 0x0118da, 1, 0x0118ba, /* WARANG CITI CAPITAL LETTER HOLO */ + /*4083*/ 0x0118db, 1, 0x0118bb, /* WARANG CITI CAPITAL LETTER HORR */ + /*4086*/ 0x0118dc, 1, 0x0118bc, /* WARANG CITI CAPITAL LETTER HAR */ + /*4089*/ 0x0118dd, 1, 0x0118bd, /* WARANG CITI CAPITAL LETTER SSUU */ + /*4092*/ 0x0118de, 1, 0x0118be, /* WARANG CITI CAPITAL LETTER SII */ + /*4095*/ 0x0118df, 1, 0x0118bf, /* WARANG CITI CAPITAL LETTER VIYO */ + /*4098*/ 0x016e60, 1, 0x016e40, /* MEDEFAIDRIN CAPITAL LETTER M */ + /*4101*/ 0x016e61, 1, 0x016e41, /* MEDEFAIDRIN CAPITAL LETTER S */ + /*4104*/ 0x016e62, 1, 0x016e42, /* MEDEFAIDRIN CAPITAL LETTER V */ + /*4107*/ 0x016e63, 1, 0x016e43, /* MEDEFAIDRIN CAPITAL LETTER W */ + /*4110*/ 0x016e64, 1, 0x016e44, /* MEDEFAIDRIN CAPITAL LETTER ATIU */ + /*4113*/ 0x016e65, 1, 0x016e45, /* MEDEFAIDRIN CAPITAL LETTER Z */ + /*4116*/ 0x016e66, 1, 0x016e46, /* MEDEFAIDRIN CAPITAL LETTER KP */ + /*4119*/ 0x016e67, 1, 0x016e47, /* MEDEFAIDRIN CAPITAL LETTER P */ + /*4122*/ 0x016e68, 1, 0x016e48, /* MEDEFAIDRIN CAPITAL LETTER T */ + /*4125*/ 0x016e69, 1, 0x016e49, /* MEDEFAIDRIN CAPITAL LETTER G */ + /*4128*/ 0x016e6a, 1, 0x016e4a, /* MEDEFAIDRIN CAPITAL LETTER F */ + /*4131*/ 0x016e6b, 1, 0x016e4b, /* MEDEFAIDRIN CAPITAL LETTER I */ + /*4134*/ 0x016e6c, 1, 0x016e4c, /* MEDEFAIDRIN CAPITAL LETTER K */ + /*4137*/ 0x016e6d, 1, 0x016e4d, /* MEDEFAIDRIN CAPITAL LETTER A */ + /*4140*/ 0x016e6e, 1, 0x016e4e, /* MEDEFAIDRIN CAPITAL LETTER J */ + /*4143*/ 0x016e6f, 1, 0x016e4f, /* MEDEFAIDRIN CAPITAL LETTER E */ + /*4146*/ 0x016e70, 1, 0x016e50, /* MEDEFAIDRIN CAPITAL LETTER B */ + /*4149*/ 0x016e71, 1, 0x016e51, /* MEDEFAIDRIN CAPITAL LETTER C */ + /*4152*/ 0x016e72, 1, 0x016e52, /* MEDEFAIDRIN CAPITAL LETTER U */ + /*4155*/ 0x016e73, 1, 0x016e53, /* MEDEFAIDRIN CAPITAL LETTER YU */ + /*4158*/ 0x016e74, 1, 0x016e54, /* MEDEFAIDRIN CAPITAL LETTER L */ + /*4161*/ 0x016e75, 1, 0x016e55, /* MEDEFAIDRIN CAPITAL LETTER Q */ + /*4164*/ 0x016e76, 1, 0x016e56, /* MEDEFAIDRIN CAPITAL LETTER HP */ + /*4167*/ 0x016e77, 1, 0x016e57, /* MEDEFAIDRIN CAPITAL LETTER NY */ + /*4170*/ 0x016e78, 1, 0x016e58, /* MEDEFAIDRIN CAPITAL LETTER X */ + /*4173*/ 0x016e79, 1, 0x016e59, /* MEDEFAIDRIN CAPITAL LETTER D */ + /*4176*/ 0x016e7a, 1, 0x016e5a, /* MEDEFAIDRIN CAPITAL LETTER OE */ + /*4179*/ 0x016e7b, 1, 0x016e5b, /* MEDEFAIDRIN CAPITAL LETTER N */ + /*4182*/ 0x016e7c, 1, 0x016e5c, /* MEDEFAIDRIN CAPITAL LETTER R */ + /*4185*/ 0x016e7d, 1, 0x016e5d, /* MEDEFAIDRIN CAPITAL LETTER O */ + /*4188*/ 0x016e7e, 1, 0x016e5e, /* MEDEFAIDRIN CAPITAL LETTER AI */ + /*4191*/ 0x016e7f, 1, 0x016e5f, /* MEDEFAIDRIN CAPITAL LETTER Y */ + /*4194*/ 0x01e922, 1, 0x01e900, /* ADLAM CAPITAL LETTER ALIF */ + /*4197*/ 0x01e923, 1, 0x01e901, /* ADLAM CAPITAL LETTER DAALI */ + /*4200*/ 0x01e924, 1, 0x01e902, /* ADLAM CAPITAL LETTER LAAM */ + /*4203*/ 0x01e925, 1, 0x01e903, /* ADLAM CAPITAL LETTER MIIM */ + /*4206*/ 0x01e926, 1, 0x01e904, /* ADLAM CAPITAL LETTER BA */ + /*4209*/ 0x01e927, 1, 0x01e905, /* ADLAM CAPITAL LETTER SINNYIIYHE */ + /*4212*/ 0x01e928, 1, 0x01e906, /* ADLAM CAPITAL LETTER PE */ + /*4215*/ 0x01e929, 1, 0x01e907, /* ADLAM CAPITAL LETTER BHE */ + /*4218*/ 0x01e92a, 1, 0x01e908, /* ADLAM CAPITAL LETTER RA */ + /*4221*/ 0x01e92b, 1, 0x01e909, /* ADLAM CAPITAL LETTER E */ + /*4224*/ 0x01e92c, 1, 0x01e90a, /* ADLAM CAPITAL LETTER FA */ + /*4227*/ 0x01e92d, 1, 0x01e90b, /* ADLAM CAPITAL LETTER I */ + /*4230*/ 0x01e92e, 1, 0x01e90c, /* ADLAM CAPITAL LETTER O */ + /*4233*/ 0x01e92f, 1, 0x01e90d, /* ADLAM CAPITAL LETTER DHA */ + /*4236*/ 0x01e930, 1, 0x01e90e, /* ADLAM CAPITAL LETTER YHE */ + /*4239*/ 0x01e931, 1, 0x01e90f, /* ADLAM CAPITAL LETTER WAW */ + /*4242*/ 0x01e932, 1, 0x01e910, /* ADLAM CAPITAL LETTER NUN */ + /*4245*/ 0x01e933, 1, 0x01e911, /* ADLAM CAPITAL LETTER KAF */ + /*4248*/ 0x01e934, 1, 0x01e912, /* ADLAM CAPITAL LETTER YA */ + /*4251*/ 0x01e935, 1, 0x01e913, /* ADLAM CAPITAL LETTER U */ + /*4254*/ 0x01e936, 1, 0x01e914, /* ADLAM CAPITAL LETTER JIIM */ + /*4257*/ 0x01e937, 1, 0x01e915, /* ADLAM CAPITAL LETTER CHI */ + /*4260*/ 0x01e938, 1, 0x01e916, /* ADLAM CAPITAL LETTER HA */ + /*4263*/ 0x01e939, 1, 0x01e917, /* ADLAM CAPITAL LETTER QAAF */ + /*4266*/ 0x01e93a, 1, 0x01e918, /* ADLAM CAPITAL LETTER GA */ + /*4269*/ 0x01e93b, 1, 0x01e919, /* ADLAM CAPITAL LETTER NYA */ + /*4272*/ 0x01e93c, 1, 0x01e91a, /* ADLAM CAPITAL LETTER TU */ + /*4275*/ 0x01e93d, 1, 0x01e91b, /* ADLAM CAPITAL LETTER NHA */ + /*4278*/ 0x01e93e, 1, 0x01e91c, /* ADLAM CAPITAL LETTER VA */ + /*4281*/ 0x01e93f, 1, 0x01e91d, /* ADLAM CAPITAL LETTER KHA */ + /*4284*/ 0x01e940, 1, 0x01e91e, /* ADLAM CAPITAL LETTER GBE */ + /*4287*/ 0x01e941, 1, 0x01e91f, /* ADLAM CAPITAL LETTER ZAL */ + /*4290*/ 0x01e942, 1, 0x01e920, /* ADLAM CAPITAL LETTER KPO */ + /*4293*/ 0x01e943, 1, 0x01e921, /* ADLAM CAPITAL LETTER SHA */ +#define FOLDS1_NORMAL_END_INDEX 4296 + /* ----- LOCALE ----- */ + /*4296*/ 0x0069, 1, 0x0049, /* LATIN CAPITAL LETTER I */ +#define FOLDS1_END_INDEX 4299 +}; + +OnigCodePoint OnigUnicodeFolds2[] = { + /* LATIN SMALL LETTER A WITH RIGHT HALF RING */ + /* 0*/ 0x0061, 0x02be, 1, 0x1e9a, + /* LATIN SMALL LIGATURE FF */ + /* 4*/ 0x0066, 0x0066, 1, 0xfb00, + /* LATIN SMALL LIGATURE FI */ + /* 8*/ 0x0066, 0x0069, 1, 0xfb01, + /* LATIN SMALL LIGATURE FL */ + /* 12*/ 0x0066, 0x006c, 1, 0xfb02, + /* LATIN SMALL LETTER H WITH LINE BELOW */ + /* 16*/ 0x0068, 0x0331, 1, 0x1e96, + /* LATIN SMALL LETTER J WITH CARON */ + /* 20*/ 0x006a, 0x030c, 1, 0x01f0, + /* LATIN SMALL LETTER SHARP S */ + /* 24*/ 0x0073, 0x0073, 2, 0x00df, 0x1e9e, + /* LATIN SMALL LIGATURE LONG S T */ + /* 29*/ 0x0073, 0x0074, 2, 0xfb05, 0xfb06, + /* LATIN SMALL LETTER T WITH DIAERESIS */ + /* 34*/ 0x0074, 0x0308, 1, 0x1e97, + /* LATIN SMALL LETTER W WITH RING ABOVE */ + /* 38*/ 0x0077, 0x030a, 1, 0x1e98, + /* LATIN SMALL LETTER Y WITH RING ABOVE */ + /* 42*/ 0x0079, 0x030a, 1, 0x1e99, + /* LATIN SMALL LETTER N PRECEDED BY APOSTROPHE */ + /* 46*/ 0x02bc, 0x006e, 1, 0x0149, + /* GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI */ + /* 50*/ 0x03ac, 0x03b9, 1, 0x1fb4, + /* GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI */ + /* 54*/ 0x03ae, 0x03b9, 1, 0x1fc4, + /* GREEK SMALL LETTER ALPHA WITH PERISPOMENI */ + /* 58*/ 0x03b1, 0x0342, 1, 0x1fb6, + /* GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI */ + /* 62*/ 0x03b1, 0x03b9, 2, 0x1fb3, 0x1fbc, + /* GREEK SMALL LETTER ETA WITH PERISPOMENI */ + /* 67*/ 0x03b7, 0x0342, 1, 0x1fc6, + /* GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI */ + /* 71*/ 0x03b7, 0x03b9, 2, 0x1fc3, 0x1fcc, + /* GREEK SMALL LETTER IOTA WITH PERISPOMENI */ + /* 76*/ 0x03b9, 0x0342, 1, 0x1fd6, + /* GREEK SMALL LETTER RHO WITH PSILI */ + /* 80*/ 0x03c1, 0x0313, 1, 0x1fe4, + /* GREEK SMALL LETTER UPSILON WITH PSILI */ + /* 84*/ 0x03c5, 0x0313, 1, 0x1f50, + /* GREEK SMALL LETTER UPSILON WITH PERISPOMENI */ + /* 88*/ 0x03c5, 0x0342, 1, 0x1fe6, + /* GREEK SMALL LETTER OMEGA WITH PERISPOMENI */ + /* 92*/ 0x03c9, 0x0342, 1, 0x1ff6, + /* GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI */ + /* 96*/ 0x03c9, 0x03b9, 2, 0x1ff3, 0x1ffc, + /* GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI */ + /* 101*/ 0x03ce, 0x03b9, 1, 0x1ff4, + /* ARMENIAN SMALL LIGATURE ECH YIWN */ + /* 105*/ 0x0565, 0x0582, 1, 0x0587, + /* ARMENIAN SMALL LIGATURE MEN ECH */ + /* 109*/ 0x0574, 0x0565, 1, 0xfb14, + /* ARMENIAN SMALL LIGATURE MEN INI */ + /* 113*/ 0x0574, 0x056b, 1, 0xfb15, + /* ARMENIAN SMALL LIGATURE MEN XEH */ + /* 117*/ 0x0574, 0x056d, 1, 0xfb17, + /* ARMENIAN SMALL LIGATURE MEN NOW */ + /* 121*/ 0x0574, 0x0576, 1, 0xfb13, + /* ARMENIAN SMALL LIGATURE VEW NOW */ + /* 125*/ 0x057e, 0x0576, 1, 0xfb16, + /* GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI */ + /* 129*/ 0x1f00, 0x03b9, 2, 0x1f80, 0x1f88, + /* GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI */ + /* 134*/ 0x1f01, 0x03b9, 2, 0x1f81, 0x1f89, + /* GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI */ + /* 139*/ 0x1f02, 0x03b9, 2, 0x1f82, 0x1f8a, + /* GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI */ + /* 144*/ 0x1f03, 0x03b9, 2, 0x1f83, 0x1f8b, + /* GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI */ + /* 149*/ 0x1f04, 0x03b9, 2, 0x1f84, 0x1f8c, + /* GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI */ + /* 154*/ 0x1f05, 0x03b9, 2, 0x1f85, 0x1f8d, + /* GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI */ + /* 159*/ 0x1f06, 0x03b9, 2, 0x1f86, 0x1f8e, + /* GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI */ + /* 164*/ 0x1f07, 0x03b9, 2, 0x1f87, 0x1f8f, + /* GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI */ + /* 169*/ 0x1f20, 0x03b9, 2, 0x1f90, 0x1f98, + /* GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI */ + /* 174*/ 0x1f21, 0x03b9, 2, 0x1f91, 0x1f99, + /* GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI */ + /* 179*/ 0x1f22, 0x03b9, 2, 0x1f92, 0x1f9a, + /* GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI */ + /* 184*/ 0x1f23, 0x03b9, 2, 0x1f93, 0x1f9b, + /* GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI */ + /* 189*/ 0x1f24, 0x03b9, 2, 0x1f94, 0x1f9c, + /* GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI */ + /* 194*/ 0x1f25, 0x03b9, 2, 0x1f95, 0x1f9d, + /* GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI */ + /* 199*/ 0x1f26, 0x03b9, 2, 0x1f96, 0x1f9e, + /* GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI */ + /* 204*/ 0x1f27, 0x03b9, 2, 0x1f97, 0x1f9f, + /* GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI */ + /* 209*/ 0x1f60, 0x03b9, 2, 0x1fa0, 0x1fa8, + /* GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI */ + /* 214*/ 0x1f61, 0x03b9, 2, 0x1fa1, 0x1fa9, + /* GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI */ + /* 219*/ 0x1f62, 0x03b9, 2, 0x1fa2, 0x1faa, + /* GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI */ + /* 224*/ 0x1f63, 0x03b9, 2, 0x1fa3, 0x1fab, + /* GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI */ + /* 229*/ 0x1f64, 0x03b9, 2, 0x1fa4, 0x1fac, + /* GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI */ + /* 234*/ 0x1f65, 0x03b9, 2, 0x1fa5, 0x1fad, + /* GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI */ + /* 239*/ 0x1f66, 0x03b9, 2, 0x1fa6, 0x1fae, + /* GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI */ + /* 244*/ 0x1f67, 0x03b9, 2, 0x1fa7, 0x1faf, + /* GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI */ + /* 249*/ 0x1f70, 0x03b9, 1, 0x1fb2, + /* GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI */ + /* 253*/ 0x1f74, 0x03b9, 1, 0x1fc2, + /* GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI */ + /* 257*/ 0x1f7c, 0x03b9, 1, 0x1ff2, +#define FOLDS2_NORMAL_END_INDEX 261 + /* ----- LOCALE ----- */ + /* LATIN CAPITAL LETTER I WITH DOT ABOVE */ + /* 261*/ 0x0069, 0x0307, 1, 0x0130, +#define FOLDS2_END_INDEX 265 +}; + +OnigCodePoint OnigUnicodeFolds3[] = { + /* LATIN SMALL LIGATURE FFI */ + /* 0*/ 0x0066, 0x0066, 0x0069, 1, 0xfb03, + /* LATIN SMALL LIGATURE FFL */ + /* 5*/ 0x0066, 0x0066, 0x006c, 1, 0xfb04, + /* GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI */ + /* 10*/ 0x03b1, 0x0342, 0x03b9, 1, 0x1fb7, + /* GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI */ + /* 15*/ 0x03b7, 0x0342, 0x03b9, 1, 0x1fc7, + /* GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA */ + /* 20*/ 0x03b9, 0x0308, 0x0300, 1, 0x1fd2, + /* GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS */ + /* 25*/ 0x03b9, 0x0308, 0x0301, 2, 0x0390, 0x1fd3, + /* GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI */ + /* 31*/ 0x03b9, 0x0308, 0x0342, 1, 0x1fd7, + /* GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA */ + /* 36*/ 0x03c5, 0x0308, 0x0300, 1, 0x1fe2, + /* GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */ + /* 41*/ 0x03c5, 0x0308, 0x0301, 2, 0x03b0, 0x1fe3, + /* GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI */ + /* 47*/ 0x03c5, 0x0308, 0x0342, 1, 0x1fe7, + /* GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA */ + /* 52*/ 0x03c5, 0x0313, 0x0300, 1, 0x1f52, + /* GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA */ + /* 57*/ 0x03c5, 0x0313, 0x0301, 1, 0x1f54, + /* GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI */ + /* 62*/ 0x03c5, 0x0313, 0x0342, 1, 0x1f56, + /* GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI */ + /* 67*/ 0x03c9, 0x0342, 0x03b9, 1, 0x1ff7, +#define FOLDS3_NORMAL_END_INDEX 72 + /* ----- LOCALE ----- */ +#define FOLDS3_END_INDEX 72 +}; diff --git a/internal/components/third_party/oniguruma/src/unicode_property_data.h b/internal/components/third_party/oniguruma/src/unicode_property_data.h new file mode 100644 index 0000000000..2329f07b22 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/unicode_property_data.h @@ -0,0 +1,33930 @@ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: gperf -T -C -c -t -j1 -L ANSI-C --ignore-case --pic -Q unicode_prop_name_pool -N unicode_lookup_property_name --output-file gperf1.tmp unicode_property_data.gperf */ +/* Computed positions: -k'1-3,5-6,12,16,$' */ + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +#error "gperf generated tables don't work with this execution character set. Please report a bug to ." +#endif + + + +/* Generated by make_unicode_property_data.py. */ + +/*- + * Copyright (c) 2016-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + +/* PROPERTY: 'NEWLINE': POSIX [[:NEWLINE:]] */ +static const OnigCodePoint +CR_NEWLINE[] = { 1, +0x000a, 0x000a, +}; /* END of CR_NEWLINE */ + +/* PROPERTY: 'Alpha': POSIX [[:Alpha:]] */ +static const OnigCodePoint +CR_Alpha[] = { 757, +0x0041, 0x005a, +0x0061, 0x007a, +0x00aa, 0x00aa, +0x00b5, 0x00b5, +0x00ba, 0x00ba, +0x00c0, 0x00d6, +0x00d8, 0x00f6, +0x00f8, 0x02c1, +0x02c6, 0x02d1, +0x02e0, 0x02e4, +0x02ec, 0x02ec, +0x02ee, 0x02ee, +0x0345, 0x0345, +0x0363, 0x0374, +0x0376, 0x0377, +0x037a, 0x037d, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x03f5, +0x03f7, 0x0481, +0x048a, 0x052f, +0x0531, 0x0556, +0x0559, 0x0559, +0x0560, 0x0588, +0x05b0, 0x05bd, +0x05bf, 0x05bf, +0x05c1, 0x05c2, +0x05c4, 0x05c5, +0x05c7, 0x05c7, +0x05d0, 0x05ea, +0x05ef, 0x05f2, +0x0610, 0x061a, +0x0620, 0x0657, +0x0659, 0x065f, +0x066e, 0x06d3, +0x06d5, 0x06dc, +0x06e1, 0x06e8, +0x06ed, 0x06ef, +0x06fa, 0x06fc, +0x06ff, 0x06ff, +0x0710, 0x073f, +0x074d, 0x07b1, +0x07ca, 0x07ea, +0x07f4, 0x07f5, +0x07fa, 0x07fa, +0x0800, 0x0817, +0x081a, 0x082c, +0x0840, 0x0858, +0x0860, 0x086a, +0x0870, 0x0887, +0x0889, 0x088e, +0x0897, 0x0897, +0x08a0, 0x08c9, +0x08d4, 0x08df, +0x08e3, 0x08e9, +0x08f0, 0x093b, +0x093d, 0x094c, +0x094e, 0x0950, +0x0955, 0x0963, +0x0971, 0x0983, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bd, 0x09c4, +0x09c7, 0x09c8, +0x09cb, 0x09cc, +0x09ce, 0x09ce, +0x09d7, 0x09d7, +0x09dc, 0x09dd, +0x09df, 0x09e3, +0x09f0, 0x09f1, +0x09fc, 0x09fc, +0x0a01, 0x0a03, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a3e, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4c, +0x0a51, 0x0a51, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a70, 0x0a75, +0x0a81, 0x0a83, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abd, 0x0ac5, +0x0ac7, 0x0ac9, +0x0acb, 0x0acc, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae3, +0x0af9, 0x0afc, +0x0b01, 0x0b03, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3d, 0x0b44, +0x0b47, 0x0b48, +0x0b4b, 0x0b4c, +0x0b56, 0x0b57, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b63, +0x0b71, 0x0b71, +0x0b82, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bbe, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcc, +0x0bd0, 0x0bd0, +0x0bd7, 0x0bd7, +0x0c00, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3d, 0x0c44, +0x0c46, 0x0c48, +0x0c4a, 0x0c4c, +0x0c55, 0x0c56, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c63, +0x0c80, 0x0c83, +0x0c85, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbd, 0x0cc4, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccc, +0x0cd5, 0x0cd6, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce3, +0x0cf1, 0x0cf3, +0x0d00, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d3a, +0x0d3d, 0x0d44, +0x0d46, 0x0d48, +0x0d4a, 0x0d4c, +0x0d4e, 0x0d4e, +0x0d54, 0x0d57, +0x0d5f, 0x0d63, +0x0d7a, 0x0d7f, +0x0d81, 0x0d83, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0dcf, 0x0dd4, +0x0dd6, 0x0dd6, +0x0dd8, 0x0ddf, +0x0df2, 0x0df3, +0x0e01, 0x0e3a, +0x0e40, 0x0e46, +0x0e4d, 0x0e4d, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0eb9, +0x0ebb, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0ecd, 0x0ecd, +0x0edc, 0x0edf, +0x0f00, 0x0f00, +0x0f40, 0x0f47, +0x0f49, 0x0f6c, +0x0f71, 0x0f83, +0x0f88, 0x0f97, +0x0f99, 0x0fbc, +0x1000, 0x1036, +0x1038, 0x1038, +0x103b, 0x103f, +0x1050, 0x108f, +0x109a, 0x109d, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x10fa, +0x10fc, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x1380, 0x138f, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1401, 0x166c, +0x166f, 0x167f, +0x1681, 0x169a, +0x16a0, 0x16ea, +0x16ee, 0x16f8, +0x1700, 0x1713, +0x171f, 0x1733, +0x1740, 0x1753, +0x1760, 0x176c, +0x176e, 0x1770, +0x1772, 0x1773, +0x1780, 0x17b3, +0x17b6, 0x17c8, +0x17d7, 0x17d7, +0x17dc, 0x17dc, +0x1820, 0x1878, +0x1880, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1920, 0x192b, +0x1930, 0x1938, +0x1950, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x1a00, 0x1a1b, +0x1a20, 0x1a5e, +0x1a61, 0x1a74, +0x1aa7, 0x1aa7, +0x1abf, 0x1ac0, +0x1acc, 0x1ace, +0x1b00, 0x1b33, +0x1b35, 0x1b43, +0x1b45, 0x1b4c, +0x1b80, 0x1ba9, +0x1bac, 0x1baf, +0x1bba, 0x1be5, +0x1be7, 0x1bf1, +0x1c00, 0x1c36, +0x1c4d, 0x1c4f, +0x1c5a, 0x1c7d, +0x1c80, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1ce9, 0x1cec, +0x1cee, 0x1cf3, +0x1cf5, 0x1cf6, +0x1cfa, 0x1cfa, +0x1d00, 0x1dbf, +0x1dd3, 0x1df4, +0x1e00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fbc, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fcc, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fe0, 0x1fec, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffc, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x2102, 0x2102, +0x2107, 0x2107, +0x210a, 0x2113, +0x2115, 0x2115, +0x2119, 0x211d, +0x2124, 0x2124, +0x2126, 0x2126, +0x2128, 0x2128, +0x212a, 0x212d, +0x212f, 0x2139, +0x213c, 0x213f, +0x2145, 0x2149, +0x214e, 0x214e, +0x2160, 0x2188, +0x24b6, 0x24e9, +0x2c00, 0x2ce4, +0x2ceb, 0x2cee, +0x2cf2, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d6f, +0x2d80, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x2de0, 0x2dff, +0x2e2f, 0x2e2f, +0x3005, 0x3007, +0x3021, 0x3029, +0x3031, 0x3035, +0x3038, 0x303c, +0x3041, 0x3096, +0x309d, 0x309f, +0x30a1, 0x30fa, +0x30fc, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x31a0, 0x31bf, +0x31f0, 0x31ff, +0x3400, 0x4dbf, +0x4e00, 0xa48c, +0xa4d0, 0xa4fd, +0xa500, 0xa60c, +0xa610, 0xa61f, +0xa62a, 0xa62b, +0xa640, 0xa66e, +0xa674, 0xa67b, +0xa67f, 0xa6ef, +0xa717, 0xa71f, +0xa722, 0xa788, +0xa78b, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa805, +0xa807, 0xa827, +0xa840, 0xa873, +0xa880, 0xa8c3, +0xa8c5, 0xa8c5, +0xa8f2, 0xa8f7, +0xa8fb, 0xa8fb, +0xa8fd, 0xa8ff, +0xa90a, 0xa92a, +0xa930, 0xa952, +0xa960, 0xa97c, +0xa980, 0xa9b2, +0xa9b4, 0xa9bf, +0xa9cf, 0xa9cf, +0xa9e0, 0xa9ef, +0xa9fa, 0xa9fe, +0xaa00, 0xaa36, +0xaa40, 0xaa4d, +0xaa60, 0xaa76, +0xaa7a, 0xaabe, +0xaac0, 0xaac0, +0xaac2, 0xaac2, +0xaadb, 0xaadd, +0xaae0, 0xaaef, +0xaaf2, 0xaaf5, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab5a, +0xab5c, 0xab69, +0xab70, 0xabea, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xf900, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb28, +0xfb2a, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbb1, +0xfbd3, 0xfd3d, +0xfd50, 0xfd8f, +0xfd92, 0xfdc7, +0xfdf0, 0xfdfb, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0xff21, 0xff3a, +0xff41, 0xff5a, +0xff66, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10140, 0x10174, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x10300, 0x1031f, +0x1032d, 0x1034a, +0x10350, 0x1037a, +0x10380, 0x1039d, +0x103a0, 0x103c3, +0x103c8, 0x103cf, +0x103d1, 0x103d5, +0x10400, 0x1049d, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10860, 0x10876, +0x10880, 0x1089e, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x10900, 0x10915, +0x10920, 0x10939, +0x10980, 0x109b7, +0x109be, 0x109bf, +0x10a00, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a60, 0x10a7c, +0x10a80, 0x10a9c, +0x10ac0, 0x10ac7, +0x10ac9, 0x10ae4, +0x10b00, 0x10b35, +0x10b40, 0x10b55, +0x10b60, 0x10b72, +0x10b80, 0x10b91, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10d00, 0x10d27, +0x10d4a, 0x10d65, +0x10d69, 0x10d69, +0x10d6f, 0x10d85, +0x10e80, 0x10ea9, +0x10eab, 0x10eac, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10efc, 0x10efc, +0x10f00, 0x10f1c, +0x10f27, 0x10f27, +0x10f30, 0x10f45, +0x10f70, 0x10f81, +0x10fb0, 0x10fc4, +0x10fe0, 0x10ff6, +0x11000, 0x11045, +0x11071, 0x11075, +0x11080, 0x110b8, +0x110c2, 0x110c2, +0x110d0, 0x110e8, +0x11100, 0x11132, +0x11144, 0x11147, +0x11150, 0x11172, +0x11176, 0x11176, +0x11180, 0x111bf, +0x111c1, 0x111c4, +0x111ce, 0x111cf, +0x111da, 0x111da, +0x111dc, 0x111dc, +0x11200, 0x11211, +0x11213, 0x11234, +0x11237, 0x11237, +0x1123e, 0x11241, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a8, +0x112b0, 0x112e8, +0x11300, 0x11303, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133d, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134c, +0x11350, 0x11350, +0x11357, 0x11357, +0x1135d, 0x11363, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113cd, +0x113d1, 0x113d1, +0x113d3, 0x113d3, +0x11400, 0x11441, +0x11443, 0x11445, +0x11447, 0x1144a, +0x1145f, 0x11461, +0x11480, 0x114c1, +0x114c4, 0x114c5, +0x114c7, 0x114c7, +0x11580, 0x115b5, +0x115b8, 0x115be, +0x115d8, 0x115dd, +0x11600, 0x1163e, +0x11640, 0x11640, +0x11644, 0x11644, +0x11680, 0x116b5, +0x116b8, 0x116b8, +0x11700, 0x1171a, +0x1171d, 0x1172a, +0x11740, 0x11746, +0x11800, 0x11838, +0x118a0, 0x118df, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x11935, +0x11937, 0x11938, +0x1193b, 0x1193c, +0x1193f, 0x11942, +0x119a0, 0x119a7, +0x119aa, 0x119d7, +0x119da, 0x119df, +0x119e1, 0x119e1, +0x119e3, 0x119e4, +0x11a00, 0x11a32, +0x11a35, 0x11a3e, +0x11a50, 0x11a97, +0x11a9d, 0x11a9d, +0x11ab0, 0x11af8, +0x11bc0, 0x11be0, +0x11c00, 0x11c08, +0x11c0a, 0x11c36, +0x11c38, 0x11c3e, +0x11c40, 0x11c40, +0x11c72, 0x11c8f, +0x11c92, 0x11ca7, +0x11ca9, 0x11cb6, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d41, +0x11d43, 0x11d43, +0x11d46, 0x11d47, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d8e, +0x11d90, 0x11d91, +0x11d93, 0x11d96, +0x11d98, 0x11d98, +0x11ee0, 0x11ef6, +0x11f00, 0x11f10, +0x11f12, 0x11f3a, +0x11f3e, 0x11f40, +0x11fb0, 0x11fb0, +0x12000, 0x12399, +0x12400, 0x1246e, +0x12480, 0x12543, +0x12f90, 0x12ff0, +0x13000, 0x1342f, +0x13441, 0x13446, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x1612e, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a70, 0x16abe, +0x16ad0, 0x16aed, +0x16b00, 0x16b2f, +0x16b40, 0x16b43, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d6c, +0x16e40, 0x16e7f, +0x16f00, 0x16f4a, +0x16f4f, 0x16f87, +0x16f8f, 0x16f9f, +0x16fe0, 0x16fe1, +0x16fe3, 0x16fe3, +0x16ff0, 0x16ff1, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1bc9e, 0x1bc9e, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d6c0, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6fa, +0x1d6fc, 0x1d714, +0x1d716, 0x1d734, +0x1d736, 0x1d74e, +0x1d750, 0x1d76e, +0x1d770, 0x1d788, +0x1d78a, 0x1d7a8, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7cb, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e030, 0x1e06d, +0x1e08f, 0x1e08f, +0x1e100, 0x1e12c, +0x1e137, 0x1e13d, +0x1e14e, 0x1e14e, +0x1e290, 0x1e2ad, +0x1e2c0, 0x1e2eb, +0x1e4d0, 0x1e4eb, +0x1e5d0, 0x1e5ed, +0x1e5f0, 0x1e5f0, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e900, 0x1e943, +0x1e947, 0x1e947, +0x1e94b, 0x1e94b, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x1f130, 0x1f149, +0x1f150, 0x1f169, +0x1f170, 0x1f189, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +}; /* END of CR_Alpha */ + +/* PROPERTY: 'Blank': POSIX [[:Blank:]] */ +static const OnigCodePoint +CR_Blank[] = { 8, +0x0009, 0x0009, +0x0020, 0x0020, +0x00a0, 0x00a0, +0x1680, 0x1680, +0x2000, 0x200a, +0x202f, 0x202f, +0x205f, 0x205f, +0x3000, 0x3000, +}; /* END of CR_Blank */ + +/* PROPERTY: 'Cntrl': POSIX [[:Cntrl:]] */ +static const OnigCodePoint +CR_Cntrl[] = { 2, +0x0000, 0x001f, +0x007f, 0x009f, +}; /* END of CR_Cntrl */ + +/* PROPERTY: 'Digit': POSIX [[:Digit:]] */ +static const OnigCodePoint +CR_Digit[] = { 71, +0x0030, 0x0039, +0x0660, 0x0669, +0x06f0, 0x06f9, +0x07c0, 0x07c9, +0x0966, 0x096f, +0x09e6, 0x09ef, +0x0a66, 0x0a6f, +0x0ae6, 0x0aef, +0x0b66, 0x0b6f, +0x0be6, 0x0bef, +0x0c66, 0x0c6f, +0x0ce6, 0x0cef, +0x0d66, 0x0d6f, +0x0de6, 0x0def, +0x0e50, 0x0e59, +0x0ed0, 0x0ed9, +0x0f20, 0x0f29, +0x1040, 0x1049, +0x1090, 0x1099, +0x17e0, 0x17e9, +0x1810, 0x1819, +0x1946, 0x194f, +0x19d0, 0x19d9, +0x1a80, 0x1a89, +0x1a90, 0x1a99, +0x1b50, 0x1b59, +0x1bb0, 0x1bb9, +0x1c40, 0x1c49, +0x1c50, 0x1c59, +0xa620, 0xa629, +0xa8d0, 0xa8d9, +0xa900, 0xa909, +0xa9d0, 0xa9d9, +0xa9f0, 0xa9f9, +0xaa50, 0xaa59, +0xabf0, 0xabf9, +0xff10, 0xff19, +0x104a0, 0x104a9, +0x10d30, 0x10d39, +0x10d40, 0x10d49, +0x11066, 0x1106f, +0x110f0, 0x110f9, +0x11136, 0x1113f, +0x111d0, 0x111d9, +0x112f0, 0x112f9, +0x11450, 0x11459, +0x114d0, 0x114d9, +0x11650, 0x11659, +0x116c0, 0x116c9, +0x116d0, 0x116e3, +0x11730, 0x11739, +0x118e0, 0x118e9, +0x11950, 0x11959, +0x11bf0, 0x11bf9, +0x11c50, 0x11c59, +0x11d50, 0x11d59, +0x11da0, 0x11da9, +0x11f50, 0x11f59, +0x16130, 0x16139, +0x16a60, 0x16a69, +0x16ac0, 0x16ac9, +0x16b50, 0x16b59, +0x16d70, 0x16d79, +0x1ccf0, 0x1ccf9, +0x1d7ce, 0x1d7ff, +0x1e140, 0x1e149, +0x1e2f0, 0x1e2f9, +0x1e4f0, 0x1e4f9, +0x1e5f1, 0x1e5fa, +0x1e950, 0x1e959, +0x1fbf0, 0x1fbf9, +}; /* END of CR_Digit */ + +/* PROPERTY: 'Graph': POSIX [[:Graph:]] */ +static const OnigCodePoint +CR_Graph[] = { 737, +0x0021, 0x007e, +0x00a1, 0x0377, +0x037a, 0x037f, +0x0384, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x052f, +0x0531, 0x0556, +0x0559, 0x058a, +0x058d, 0x058f, +0x0591, 0x05c7, +0x05d0, 0x05ea, +0x05ef, 0x05f4, +0x0600, 0x070d, +0x070f, 0x074a, +0x074d, 0x07b1, +0x07c0, 0x07fa, +0x07fd, 0x082d, +0x0830, 0x083e, +0x0840, 0x085b, +0x085e, 0x085e, +0x0860, 0x086a, +0x0870, 0x088e, +0x0890, 0x0891, +0x0897, 0x0983, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bc, 0x09c4, +0x09c7, 0x09c8, +0x09cb, 0x09ce, +0x09d7, 0x09d7, +0x09dc, 0x09dd, +0x09df, 0x09e3, +0x09e6, 0x09fe, +0x0a01, 0x0a03, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a3c, 0x0a3c, +0x0a3e, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4d, +0x0a51, 0x0a51, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a66, 0x0a76, +0x0a81, 0x0a83, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abc, 0x0ac5, +0x0ac7, 0x0ac9, +0x0acb, 0x0acd, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae3, +0x0ae6, 0x0af1, +0x0af9, 0x0aff, +0x0b01, 0x0b03, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3c, 0x0b44, +0x0b47, 0x0b48, +0x0b4b, 0x0b4d, +0x0b55, 0x0b57, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b63, +0x0b66, 0x0b77, +0x0b82, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bbe, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcd, +0x0bd0, 0x0bd0, +0x0bd7, 0x0bd7, +0x0be6, 0x0bfa, +0x0c00, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3c, 0x0c44, +0x0c46, 0x0c48, +0x0c4a, 0x0c4d, +0x0c55, 0x0c56, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c63, +0x0c66, 0x0c6f, +0x0c77, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbc, 0x0cc4, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccd, +0x0cd5, 0x0cd6, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce3, +0x0ce6, 0x0cef, +0x0cf1, 0x0cf3, +0x0d00, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d44, +0x0d46, 0x0d48, +0x0d4a, 0x0d4f, +0x0d54, 0x0d63, +0x0d66, 0x0d7f, +0x0d81, 0x0d83, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0dca, 0x0dca, +0x0dcf, 0x0dd4, +0x0dd6, 0x0dd6, +0x0dd8, 0x0ddf, +0x0de6, 0x0def, +0x0df2, 0x0df4, +0x0e01, 0x0e3a, +0x0e3f, 0x0e5b, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0ec8, 0x0ece, +0x0ed0, 0x0ed9, +0x0edc, 0x0edf, +0x0f00, 0x0f47, +0x0f49, 0x0f6c, +0x0f71, 0x0f97, +0x0f99, 0x0fbc, +0x0fbe, 0x0fcc, +0x0fce, 0x0fda, +0x1000, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x135d, 0x137c, +0x1380, 0x1399, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1400, 0x167f, +0x1681, 0x169c, +0x16a0, 0x16f8, +0x1700, 0x1715, +0x171f, 0x1736, +0x1740, 0x1753, +0x1760, 0x176c, +0x176e, 0x1770, +0x1772, 0x1773, +0x1780, 0x17dd, +0x17e0, 0x17e9, +0x17f0, 0x17f9, +0x1800, 0x1819, +0x1820, 0x1878, +0x1880, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1920, 0x192b, +0x1930, 0x193b, +0x1940, 0x1940, +0x1944, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x19d0, 0x19da, +0x19de, 0x1a1b, +0x1a1e, 0x1a5e, +0x1a60, 0x1a7c, +0x1a7f, 0x1a89, +0x1a90, 0x1a99, +0x1aa0, 0x1aad, +0x1ab0, 0x1ace, +0x1b00, 0x1b4c, +0x1b4e, 0x1bf3, +0x1bfc, 0x1c37, +0x1c3b, 0x1c49, +0x1c4d, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cc7, +0x1cd0, 0x1cfa, +0x1d00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fc4, +0x1fc6, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fdd, 0x1fef, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffe, +0x200b, 0x2027, +0x202a, 0x202e, +0x2030, 0x205e, +0x2060, 0x2064, +0x2066, 0x2071, +0x2074, 0x208e, +0x2090, 0x209c, +0x20a0, 0x20c0, +0x20d0, 0x20f0, +0x2100, 0x218b, +0x2190, 0x2429, +0x2440, 0x244a, +0x2460, 0x2b73, +0x2b76, 0x2b95, +0x2b97, 0x2cf3, +0x2cf9, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d70, +0x2d7f, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x2de0, 0x2e5d, +0x2e80, 0x2e99, +0x2e9b, 0x2ef3, +0x2f00, 0x2fd5, +0x2ff0, 0x2fff, +0x3001, 0x303f, +0x3041, 0x3096, +0x3099, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x3190, 0x31e5, +0x31ef, 0x321e, +0x3220, 0xa48c, +0xa490, 0xa4c6, +0xa4d0, 0xa62b, +0xa640, 0xa6f7, +0xa700, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa82c, +0xa830, 0xa839, +0xa840, 0xa877, +0xa880, 0xa8c5, +0xa8ce, 0xa8d9, +0xa8e0, 0xa953, +0xa95f, 0xa97c, +0xa980, 0xa9cd, +0xa9cf, 0xa9d9, +0xa9de, 0xa9fe, +0xaa00, 0xaa36, +0xaa40, 0xaa4d, +0xaa50, 0xaa59, +0xaa5c, 0xaac2, +0xaadb, 0xaaf6, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab6b, +0xab70, 0xabed, +0xabf0, 0xabf9, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xe000, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbc2, +0xfbd3, 0xfd8f, +0xfd92, 0xfdc7, +0xfdcf, 0xfdcf, +0xfdf0, 0xfe19, +0xfe20, 0xfe52, +0xfe54, 0xfe66, +0xfe68, 0xfe6b, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0xfeff, 0xfeff, +0xff01, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0xffe0, 0xffe6, +0xffe8, 0xffee, +0xfff9, 0xfffd, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10100, 0x10102, +0x10107, 0x10133, +0x10137, 0x1018e, +0x10190, 0x1019c, +0x101a0, 0x101a0, +0x101d0, 0x101fd, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x102e0, 0x102fb, +0x10300, 0x10323, +0x1032d, 0x1034a, +0x10350, 0x1037a, +0x10380, 0x1039d, +0x1039f, 0x103c3, +0x103c8, 0x103d5, +0x10400, 0x1049d, +0x104a0, 0x104a9, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x1056f, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10857, 0x1089e, +0x108a7, 0x108af, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x108fb, 0x1091b, +0x1091f, 0x10939, +0x1093f, 0x1093f, +0x10980, 0x109b7, +0x109bc, 0x109cf, +0x109d2, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a38, 0x10a3a, +0x10a3f, 0x10a48, +0x10a50, 0x10a58, +0x10a60, 0x10a9f, +0x10ac0, 0x10ae6, +0x10aeb, 0x10af6, +0x10b00, 0x10b35, +0x10b39, 0x10b55, +0x10b58, 0x10b72, +0x10b78, 0x10b91, +0x10b99, 0x10b9c, +0x10ba9, 0x10baf, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10cfa, 0x10d27, +0x10d30, 0x10d39, +0x10d40, 0x10d65, +0x10d69, 0x10d85, +0x10d8e, 0x10d8f, +0x10e60, 0x10e7e, +0x10e80, 0x10ea9, +0x10eab, 0x10ead, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10efc, 0x10f27, +0x10f30, 0x10f59, +0x10f70, 0x10f89, +0x10fb0, 0x10fcb, +0x10fe0, 0x10ff6, +0x11000, 0x1104d, +0x11052, 0x11075, +0x1107f, 0x110c2, +0x110cd, 0x110cd, +0x110d0, 0x110e8, +0x110f0, 0x110f9, +0x11100, 0x11134, +0x11136, 0x11147, +0x11150, 0x11176, +0x11180, 0x111df, +0x111e1, 0x111f4, +0x11200, 0x11211, +0x11213, 0x11241, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a9, +0x112b0, 0x112ea, +0x112f0, 0x112f9, +0x11300, 0x11303, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133b, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134d, +0x11350, 0x11350, +0x11357, 0x11357, +0x1135d, 0x11363, +0x11366, 0x1136c, +0x11370, 0x11374, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113d5, +0x113d7, 0x113d8, +0x113e1, 0x113e2, +0x11400, 0x1145b, +0x1145d, 0x11461, +0x11480, 0x114c7, +0x114d0, 0x114d9, +0x11580, 0x115b5, +0x115b8, 0x115dd, +0x11600, 0x11644, +0x11650, 0x11659, +0x11660, 0x1166c, +0x11680, 0x116b9, +0x116c0, 0x116c9, +0x116d0, 0x116e3, +0x11700, 0x1171a, +0x1171d, 0x1172b, +0x11730, 0x11746, +0x11800, 0x1183b, +0x118a0, 0x118f2, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x11935, +0x11937, 0x11938, +0x1193b, 0x11946, +0x11950, 0x11959, +0x119a0, 0x119a7, +0x119aa, 0x119d7, +0x119da, 0x119e4, +0x11a00, 0x11a47, +0x11a50, 0x11aa2, +0x11ab0, 0x11af8, +0x11b00, 0x11b09, +0x11bc0, 0x11be1, +0x11bf0, 0x11bf9, +0x11c00, 0x11c08, +0x11c0a, 0x11c36, +0x11c38, 0x11c45, +0x11c50, 0x11c6c, +0x11c70, 0x11c8f, +0x11c92, 0x11ca7, +0x11ca9, 0x11cb6, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d47, +0x11d50, 0x11d59, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d8e, +0x11d90, 0x11d91, +0x11d93, 0x11d98, +0x11da0, 0x11da9, +0x11ee0, 0x11ef8, +0x11f00, 0x11f10, +0x11f12, 0x11f3a, +0x11f3e, 0x11f5a, +0x11fb0, 0x11fb0, +0x11fc0, 0x11ff1, +0x11fff, 0x12399, +0x12400, 0x1246e, +0x12470, 0x12474, +0x12480, 0x12543, +0x12f90, 0x12ff2, +0x13000, 0x13455, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x16139, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a60, 0x16a69, +0x16a6e, 0x16abe, +0x16ac0, 0x16ac9, +0x16ad0, 0x16aed, +0x16af0, 0x16af5, +0x16b00, 0x16b45, +0x16b50, 0x16b59, +0x16b5b, 0x16b61, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d79, +0x16e40, 0x16e9a, +0x16f00, 0x16f4a, +0x16f4f, 0x16f87, +0x16f8f, 0x16f9f, +0x16fe0, 0x16fe4, +0x16ff0, 0x16ff1, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1bc9c, 0x1bca3, +0x1cc00, 0x1ccf9, +0x1cd00, 0x1ceb3, +0x1cf00, 0x1cf2d, +0x1cf30, 0x1cf46, +0x1cf50, 0x1cfc3, +0x1d000, 0x1d0f5, +0x1d100, 0x1d126, +0x1d129, 0x1d1ea, +0x1d200, 0x1d245, +0x1d2c0, 0x1d2d3, +0x1d2e0, 0x1d2f3, +0x1d300, 0x1d356, +0x1d360, 0x1d378, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d7cb, +0x1d7ce, 0x1da8b, +0x1da9b, 0x1da9f, +0x1daa1, 0x1daaf, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e030, 0x1e06d, +0x1e08f, 0x1e08f, +0x1e100, 0x1e12c, +0x1e130, 0x1e13d, +0x1e140, 0x1e149, +0x1e14e, 0x1e14f, +0x1e290, 0x1e2ae, +0x1e2c0, 0x1e2f9, +0x1e2ff, 0x1e2ff, +0x1e4d0, 0x1e4f9, +0x1e5d0, 0x1e5fa, +0x1e5ff, 0x1e5ff, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e8c7, 0x1e8d6, +0x1e900, 0x1e94b, +0x1e950, 0x1e959, +0x1e95e, 0x1e95f, +0x1ec71, 0x1ecb4, +0x1ed01, 0x1ed3d, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x1eef0, 0x1eef1, +0x1f000, 0x1f02b, +0x1f030, 0x1f093, +0x1f0a0, 0x1f0ae, +0x1f0b1, 0x1f0bf, +0x1f0c1, 0x1f0cf, +0x1f0d1, 0x1f0f5, +0x1f100, 0x1f1ad, +0x1f1e6, 0x1f202, +0x1f210, 0x1f23b, +0x1f240, 0x1f248, +0x1f250, 0x1f251, +0x1f260, 0x1f265, +0x1f300, 0x1f6d7, +0x1f6dc, 0x1f6ec, +0x1f6f0, 0x1f6fc, +0x1f700, 0x1f776, +0x1f77b, 0x1f7d9, +0x1f7e0, 0x1f7eb, +0x1f7f0, 0x1f7f0, +0x1f800, 0x1f80b, +0x1f810, 0x1f847, +0x1f850, 0x1f859, +0x1f860, 0x1f887, +0x1f890, 0x1f8ad, +0x1f8b0, 0x1f8bb, +0x1f8c0, 0x1f8c1, +0x1f900, 0x1fa53, +0x1fa60, 0x1fa6d, +0x1fa70, 0x1fa7c, +0x1fa80, 0x1fa89, +0x1fa8f, 0x1fac6, +0x1face, 0x1fadc, +0x1fadf, 0x1fae9, +0x1faf0, 0x1faf8, +0x1fb00, 0x1fb92, +0x1fb94, 0x1fbf9, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +0xe0001, 0xe0001, +0xe0020, 0xe007f, +0xe0100, 0xe01ef, +0xf0000, 0xffffd, +0x100000, 0x10fffd, +}; /* END of CR_Graph */ + +/* PROPERTY: 'Lower': POSIX [[:Lower:]] */ +static const OnigCodePoint +CR_Lower[] = { 675, +0x0061, 0x007a, +0x00aa, 0x00aa, +0x00b5, 0x00b5, +0x00ba, 0x00ba, +0x00df, 0x00f6, +0x00f8, 0x00ff, +0x0101, 0x0101, +0x0103, 0x0103, +0x0105, 0x0105, +0x0107, 0x0107, +0x0109, 0x0109, +0x010b, 0x010b, +0x010d, 0x010d, +0x010f, 0x010f, +0x0111, 0x0111, +0x0113, 0x0113, +0x0115, 0x0115, +0x0117, 0x0117, +0x0119, 0x0119, +0x011b, 0x011b, +0x011d, 0x011d, +0x011f, 0x011f, +0x0121, 0x0121, +0x0123, 0x0123, +0x0125, 0x0125, +0x0127, 0x0127, +0x0129, 0x0129, +0x012b, 0x012b, +0x012d, 0x012d, +0x012f, 0x012f, +0x0131, 0x0131, +0x0133, 0x0133, +0x0135, 0x0135, +0x0137, 0x0138, +0x013a, 0x013a, +0x013c, 0x013c, +0x013e, 0x013e, +0x0140, 0x0140, +0x0142, 0x0142, +0x0144, 0x0144, +0x0146, 0x0146, +0x0148, 0x0149, +0x014b, 0x014b, +0x014d, 0x014d, +0x014f, 0x014f, +0x0151, 0x0151, +0x0153, 0x0153, +0x0155, 0x0155, +0x0157, 0x0157, +0x0159, 0x0159, +0x015b, 0x015b, +0x015d, 0x015d, +0x015f, 0x015f, +0x0161, 0x0161, +0x0163, 0x0163, +0x0165, 0x0165, +0x0167, 0x0167, +0x0169, 0x0169, +0x016b, 0x016b, +0x016d, 0x016d, +0x016f, 0x016f, +0x0171, 0x0171, +0x0173, 0x0173, +0x0175, 0x0175, +0x0177, 0x0177, +0x017a, 0x017a, +0x017c, 0x017c, +0x017e, 0x0180, +0x0183, 0x0183, +0x0185, 0x0185, +0x0188, 0x0188, +0x018c, 0x018d, +0x0192, 0x0192, +0x0195, 0x0195, +0x0199, 0x019b, +0x019e, 0x019e, +0x01a1, 0x01a1, +0x01a3, 0x01a3, +0x01a5, 0x01a5, +0x01a8, 0x01a8, +0x01aa, 0x01ab, +0x01ad, 0x01ad, +0x01b0, 0x01b0, +0x01b4, 0x01b4, +0x01b6, 0x01b6, +0x01b9, 0x01ba, +0x01bd, 0x01bf, +0x01c6, 0x01c6, +0x01c9, 0x01c9, +0x01cc, 0x01cc, +0x01ce, 0x01ce, +0x01d0, 0x01d0, +0x01d2, 0x01d2, +0x01d4, 0x01d4, +0x01d6, 0x01d6, +0x01d8, 0x01d8, +0x01da, 0x01da, +0x01dc, 0x01dd, +0x01df, 0x01df, +0x01e1, 0x01e1, +0x01e3, 0x01e3, +0x01e5, 0x01e5, +0x01e7, 0x01e7, +0x01e9, 0x01e9, +0x01eb, 0x01eb, +0x01ed, 0x01ed, +0x01ef, 0x01f0, +0x01f3, 0x01f3, +0x01f5, 0x01f5, +0x01f9, 0x01f9, +0x01fb, 0x01fb, +0x01fd, 0x01fd, +0x01ff, 0x01ff, +0x0201, 0x0201, +0x0203, 0x0203, +0x0205, 0x0205, +0x0207, 0x0207, +0x0209, 0x0209, +0x020b, 0x020b, +0x020d, 0x020d, +0x020f, 0x020f, +0x0211, 0x0211, +0x0213, 0x0213, +0x0215, 0x0215, +0x0217, 0x0217, +0x0219, 0x0219, +0x021b, 0x021b, +0x021d, 0x021d, +0x021f, 0x021f, +0x0221, 0x0221, +0x0223, 0x0223, +0x0225, 0x0225, +0x0227, 0x0227, +0x0229, 0x0229, +0x022b, 0x022b, +0x022d, 0x022d, +0x022f, 0x022f, +0x0231, 0x0231, +0x0233, 0x0239, +0x023c, 0x023c, +0x023f, 0x0240, +0x0242, 0x0242, +0x0247, 0x0247, +0x0249, 0x0249, +0x024b, 0x024b, +0x024d, 0x024d, +0x024f, 0x0293, +0x0295, 0x02b8, +0x02c0, 0x02c1, +0x02e0, 0x02e4, +0x0345, 0x0345, +0x0371, 0x0371, +0x0373, 0x0373, +0x0377, 0x0377, +0x037a, 0x037d, +0x0390, 0x0390, +0x03ac, 0x03ce, +0x03d0, 0x03d1, +0x03d5, 0x03d7, +0x03d9, 0x03d9, +0x03db, 0x03db, +0x03dd, 0x03dd, +0x03df, 0x03df, +0x03e1, 0x03e1, +0x03e3, 0x03e3, +0x03e5, 0x03e5, +0x03e7, 0x03e7, +0x03e9, 0x03e9, +0x03eb, 0x03eb, +0x03ed, 0x03ed, +0x03ef, 0x03f3, +0x03f5, 0x03f5, +0x03f8, 0x03f8, +0x03fb, 0x03fc, +0x0430, 0x045f, +0x0461, 0x0461, +0x0463, 0x0463, +0x0465, 0x0465, +0x0467, 0x0467, +0x0469, 0x0469, +0x046b, 0x046b, +0x046d, 0x046d, +0x046f, 0x046f, +0x0471, 0x0471, +0x0473, 0x0473, +0x0475, 0x0475, +0x0477, 0x0477, +0x0479, 0x0479, +0x047b, 0x047b, +0x047d, 0x047d, +0x047f, 0x047f, +0x0481, 0x0481, +0x048b, 0x048b, +0x048d, 0x048d, +0x048f, 0x048f, +0x0491, 0x0491, +0x0493, 0x0493, +0x0495, 0x0495, +0x0497, 0x0497, +0x0499, 0x0499, +0x049b, 0x049b, +0x049d, 0x049d, +0x049f, 0x049f, +0x04a1, 0x04a1, +0x04a3, 0x04a3, +0x04a5, 0x04a5, +0x04a7, 0x04a7, +0x04a9, 0x04a9, +0x04ab, 0x04ab, +0x04ad, 0x04ad, +0x04af, 0x04af, +0x04b1, 0x04b1, +0x04b3, 0x04b3, +0x04b5, 0x04b5, +0x04b7, 0x04b7, +0x04b9, 0x04b9, +0x04bb, 0x04bb, +0x04bd, 0x04bd, +0x04bf, 0x04bf, +0x04c2, 0x04c2, +0x04c4, 0x04c4, +0x04c6, 0x04c6, +0x04c8, 0x04c8, +0x04ca, 0x04ca, +0x04cc, 0x04cc, +0x04ce, 0x04cf, +0x04d1, 0x04d1, +0x04d3, 0x04d3, +0x04d5, 0x04d5, +0x04d7, 0x04d7, +0x04d9, 0x04d9, +0x04db, 0x04db, +0x04dd, 0x04dd, +0x04df, 0x04df, +0x04e1, 0x04e1, +0x04e3, 0x04e3, +0x04e5, 0x04e5, +0x04e7, 0x04e7, +0x04e9, 0x04e9, +0x04eb, 0x04eb, +0x04ed, 0x04ed, +0x04ef, 0x04ef, +0x04f1, 0x04f1, +0x04f3, 0x04f3, +0x04f5, 0x04f5, +0x04f7, 0x04f7, +0x04f9, 0x04f9, +0x04fb, 0x04fb, +0x04fd, 0x04fd, +0x04ff, 0x04ff, +0x0501, 0x0501, +0x0503, 0x0503, +0x0505, 0x0505, +0x0507, 0x0507, +0x0509, 0x0509, +0x050b, 0x050b, +0x050d, 0x050d, +0x050f, 0x050f, +0x0511, 0x0511, +0x0513, 0x0513, +0x0515, 0x0515, +0x0517, 0x0517, +0x0519, 0x0519, +0x051b, 0x051b, +0x051d, 0x051d, +0x051f, 0x051f, +0x0521, 0x0521, +0x0523, 0x0523, +0x0525, 0x0525, +0x0527, 0x0527, +0x0529, 0x0529, +0x052b, 0x052b, +0x052d, 0x052d, +0x052f, 0x052f, +0x0560, 0x0588, +0x10d0, 0x10fa, +0x10fc, 0x10ff, +0x13f8, 0x13fd, +0x1c80, 0x1c88, +0x1c8a, 0x1c8a, +0x1d00, 0x1dbf, +0x1e01, 0x1e01, +0x1e03, 0x1e03, +0x1e05, 0x1e05, +0x1e07, 0x1e07, +0x1e09, 0x1e09, +0x1e0b, 0x1e0b, +0x1e0d, 0x1e0d, +0x1e0f, 0x1e0f, +0x1e11, 0x1e11, +0x1e13, 0x1e13, +0x1e15, 0x1e15, +0x1e17, 0x1e17, +0x1e19, 0x1e19, +0x1e1b, 0x1e1b, +0x1e1d, 0x1e1d, +0x1e1f, 0x1e1f, +0x1e21, 0x1e21, +0x1e23, 0x1e23, +0x1e25, 0x1e25, +0x1e27, 0x1e27, +0x1e29, 0x1e29, +0x1e2b, 0x1e2b, +0x1e2d, 0x1e2d, +0x1e2f, 0x1e2f, +0x1e31, 0x1e31, +0x1e33, 0x1e33, +0x1e35, 0x1e35, +0x1e37, 0x1e37, +0x1e39, 0x1e39, +0x1e3b, 0x1e3b, +0x1e3d, 0x1e3d, +0x1e3f, 0x1e3f, +0x1e41, 0x1e41, +0x1e43, 0x1e43, +0x1e45, 0x1e45, +0x1e47, 0x1e47, +0x1e49, 0x1e49, +0x1e4b, 0x1e4b, +0x1e4d, 0x1e4d, +0x1e4f, 0x1e4f, +0x1e51, 0x1e51, +0x1e53, 0x1e53, +0x1e55, 0x1e55, +0x1e57, 0x1e57, +0x1e59, 0x1e59, +0x1e5b, 0x1e5b, +0x1e5d, 0x1e5d, +0x1e5f, 0x1e5f, +0x1e61, 0x1e61, +0x1e63, 0x1e63, +0x1e65, 0x1e65, +0x1e67, 0x1e67, +0x1e69, 0x1e69, +0x1e6b, 0x1e6b, +0x1e6d, 0x1e6d, +0x1e6f, 0x1e6f, +0x1e71, 0x1e71, +0x1e73, 0x1e73, +0x1e75, 0x1e75, +0x1e77, 0x1e77, +0x1e79, 0x1e79, +0x1e7b, 0x1e7b, +0x1e7d, 0x1e7d, +0x1e7f, 0x1e7f, +0x1e81, 0x1e81, +0x1e83, 0x1e83, +0x1e85, 0x1e85, +0x1e87, 0x1e87, +0x1e89, 0x1e89, +0x1e8b, 0x1e8b, +0x1e8d, 0x1e8d, +0x1e8f, 0x1e8f, +0x1e91, 0x1e91, +0x1e93, 0x1e93, +0x1e95, 0x1e9d, +0x1e9f, 0x1e9f, +0x1ea1, 0x1ea1, +0x1ea3, 0x1ea3, +0x1ea5, 0x1ea5, +0x1ea7, 0x1ea7, +0x1ea9, 0x1ea9, +0x1eab, 0x1eab, +0x1ead, 0x1ead, +0x1eaf, 0x1eaf, +0x1eb1, 0x1eb1, +0x1eb3, 0x1eb3, +0x1eb5, 0x1eb5, +0x1eb7, 0x1eb7, +0x1eb9, 0x1eb9, +0x1ebb, 0x1ebb, +0x1ebd, 0x1ebd, +0x1ebf, 0x1ebf, +0x1ec1, 0x1ec1, +0x1ec3, 0x1ec3, +0x1ec5, 0x1ec5, +0x1ec7, 0x1ec7, +0x1ec9, 0x1ec9, +0x1ecb, 0x1ecb, +0x1ecd, 0x1ecd, +0x1ecf, 0x1ecf, +0x1ed1, 0x1ed1, +0x1ed3, 0x1ed3, +0x1ed5, 0x1ed5, +0x1ed7, 0x1ed7, +0x1ed9, 0x1ed9, +0x1edb, 0x1edb, +0x1edd, 0x1edd, +0x1edf, 0x1edf, +0x1ee1, 0x1ee1, +0x1ee3, 0x1ee3, +0x1ee5, 0x1ee5, +0x1ee7, 0x1ee7, +0x1ee9, 0x1ee9, +0x1eeb, 0x1eeb, +0x1eed, 0x1eed, +0x1eef, 0x1eef, +0x1ef1, 0x1ef1, +0x1ef3, 0x1ef3, +0x1ef5, 0x1ef5, +0x1ef7, 0x1ef7, +0x1ef9, 0x1ef9, +0x1efb, 0x1efb, +0x1efd, 0x1efd, +0x1eff, 0x1f07, +0x1f10, 0x1f15, +0x1f20, 0x1f27, +0x1f30, 0x1f37, +0x1f40, 0x1f45, +0x1f50, 0x1f57, +0x1f60, 0x1f67, +0x1f70, 0x1f7d, +0x1f80, 0x1f87, +0x1f90, 0x1f97, +0x1fa0, 0x1fa7, +0x1fb0, 0x1fb4, +0x1fb6, 0x1fb7, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fc7, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fd7, +0x1fe0, 0x1fe7, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ff7, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x210a, 0x210a, +0x210e, 0x210f, +0x2113, 0x2113, +0x212f, 0x212f, +0x2134, 0x2134, +0x2139, 0x2139, +0x213c, 0x213d, +0x2146, 0x2149, +0x214e, 0x214e, +0x2170, 0x217f, +0x2184, 0x2184, +0x24d0, 0x24e9, +0x2c30, 0x2c5f, +0x2c61, 0x2c61, +0x2c65, 0x2c66, +0x2c68, 0x2c68, +0x2c6a, 0x2c6a, +0x2c6c, 0x2c6c, +0x2c71, 0x2c71, +0x2c73, 0x2c74, +0x2c76, 0x2c7d, +0x2c81, 0x2c81, +0x2c83, 0x2c83, +0x2c85, 0x2c85, +0x2c87, 0x2c87, +0x2c89, 0x2c89, +0x2c8b, 0x2c8b, +0x2c8d, 0x2c8d, +0x2c8f, 0x2c8f, +0x2c91, 0x2c91, +0x2c93, 0x2c93, +0x2c95, 0x2c95, +0x2c97, 0x2c97, +0x2c99, 0x2c99, +0x2c9b, 0x2c9b, +0x2c9d, 0x2c9d, +0x2c9f, 0x2c9f, +0x2ca1, 0x2ca1, +0x2ca3, 0x2ca3, +0x2ca5, 0x2ca5, +0x2ca7, 0x2ca7, +0x2ca9, 0x2ca9, +0x2cab, 0x2cab, +0x2cad, 0x2cad, +0x2caf, 0x2caf, +0x2cb1, 0x2cb1, +0x2cb3, 0x2cb3, +0x2cb5, 0x2cb5, +0x2cb7, 0x2cb7, +0x2cb9, 0x2cb9, +0x2cbb, 0x2cbb, +0x2cbd, 0x2cbd, +0x2cbf, 0x2cbf, +0x2cc1, 0x2cc1, +0x2cc3, 0x2cc3, +0x2cc5, 0x2cc5, +0x2cc7, 0x2cc7, +0x2cc9, 0x2cc9, +0x2ccb, 0x2ccb, +0x2ccd, 0x2ccd, +0x2ccf, 0x2ccf, +0x2cd1, 0x2cd1, +0x2cd3, 0x2cd3, +0x2cd5, 0x2cd5, +0x2cd7, 0x2cd7, +0x2cd9, 0x2cd9, +0x2cdb, 0x2cdb, +0x2cdd, 0x2cdd, +0x2cdf, 0x2cdf, +0x2ce1, 0x2ce1, +0x2ce3, 0x2ce4, +0x2cec, 0x2cec, +0x2cee, 0x2cee, +0x2cf3, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0xa641, 0xa641, +0xa643, 0xa643, +0xa645, 0xa645, +0xa647, 0xa647, +0xa649, 0xa649, +0xa64b, 0xa64b, +0xa64d, 0xa64d, +0xa64f, 0xa64f, +0xa651, 0xa651, +0xa653, 0xa653, +0xa655, 0xa655, +0xa657, 0xa657, +0xa659, 0xa659, +0xa65b, 0xa65b, +0xa65d, 0xa65d, +0xa65f, 0xa65f, +0xa661, 0xa661, +0xa663, 0xa663, +0xa665, 0xa665, +0xa667, 0xa667, +0xa669, 0xa669, +0xa66b, 0xa66b, +0xa66d, 0xa66d, +0xa681, 0xa681, +0xa683, 0xa683, +0xa685, 0xa685, +0xa687, 0xa687, +0xa689, 0xa689, +0xa68b, 0xa68b, +0xa68d, 0xa68d, +0xa68f, 0xa68f, +0xa691, 0xa691, +0xa693, 0xa693, +0xa695, 0xa695, +0xa697, 0xa697, +0xa699, 0xa699, +0xa69b, 0xa69d, +0xa723, 0xa723, +0xa725, 0xa725, +0xa727, 0xa727, +0xa729, 0xa729, +0xa72b, 0xa72b, +0xa72d, 0xa72d, +0xa72f, 0xa731, +0xa733, 0xa733, +0xa735, 0xa735, +0xa737, 0xa737, +0xa739, 0xa739, +0xa73b, 0xa73b, +0xa73d, 0xa73d, +0xa73f, 0xa73f, +0xa741, 0xa741, +0xa743, 0xa743, +0xa745, 0xa745, +0xa747, 0xa747, +0xa749, 0xa749, +0xa74b, 0xa74b, +0xa74d, 0xa74d, +0xa74f, 0xa74f, +0xa751, 0xa751, +0xa753, 0xa753, +0xa755, 0xa755, +0xa757, 0xa757, +0xa759, 0xa759, +0xa75b, 0xa75b, +0xa75d, 0xa75d, +0xa75f, 0xa75f, +0xa761, 0xa761, +0xa763, 0xa763, +0xa765, 0xa765, +0xa767, 0xa767, +0xa769, 0xa769, +0xa76b, 0xa76b, +0xa76d, 0xa76d, +0xa76f, 0xa778, +0xa77a, 0xa77a, +0xa77c, 0xa77c, +0xa77f, 0xa77f, +0xa781, 0xa781, +0xa783, 0xa783, +0xa785, 0xa785, +0xa787, 0xa787, +0xa78c, 0xa78c, +0xa78e, 0xa78e, +0xa791, 0xa791, +0xa793, 0xa795, +0xa797, 0xa797, +0xa799, 0xa799, +0xa79b, 0xa79b, +0xa79d, 0xa79d, +0xa79f, 0xa79f, +0xa7a1, 0xa7a1, +0xa7a3, 0xa7a3, +0xa7a5, 0xa7a5, +0xa7a7, 0xa7a7, +0xa7a9, 0xa7a9, +0xa7af, 0xa7af, +0xa7b5, 0xa7b5, +0xa7b7, 0xa7b7, +0xa7b9, 0xa7b9, +0xa7bb, 0xa7bb, +0xa7bd, 0xa7bd, +0xa7bf, 0xa7bf, +0xa7c1, 0xa7c1, +0xa7c3, 0xa7c3, +0xa7c8, 0xa7c8, +0xa7ca, 0xa7ca, +0xa7cd, 0xa7cd, +0xa7d1, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7d5, +0xa7d7, 0xa7d7, +0xa7d9, 0xa7d9, +0xa7db, 0xa7db, +0xa7f2, 0xa7f4, +0xa7f6, 0xa7f6, +0xa7f8, 0xa7fa, +0xab30, 0xab5a, +0xab5c, 0xab69, +0xab70, 0xabbf, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xff41, 0xff5a, +0x10428, 0x1044f, +0x104d8, 0x104fb, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x10780, 0x10780, +0x10783, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10cc0, 0x10cf2, +0x10d70, 0x10d85, +0x118c0, 0x118df, +0x16e60, 0x16e7f, +0x1d41a, 0x1d433, +0x1d44e, 0x1d454, +0x1d456, 0x1d467, +0x1d482, 0x1d49b, +0x1d4b6, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d4cf, +0x1d4ea, 0x1d503, +0x1d51e, 0x1d537, +0x1d552, 0x1d56b, +0x1d586, 0x1d59f, +0x1d5ba, 0x1d5d3, +0x1d5ee, 0x1d607, +0x1d622, 0x1d63b, +0x1d656, 0x1d66f, +0x1d68a, 0x1d6a5, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6e1, +0x1d6fc, 0x1d714, +0x1d716, 0x1d71b, +0x1d736, 0x1d74e, +0x1d750, 0x1d755, +0x1d770, 0x1d788, +0x1d78a, 0x1d78f, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7c9, +0x1d7cb, 0x1d7cb, +0x1df00, 0x1df09, +0x1df0b, 0x1df1e, +0x1df25, 0x1df2a, +0x1e030, 0x1e06d, +0x1e922, 0x1e943, +}; /* END of CR_Lower */ + +/* PROPERTY: 'Print': POSIX [[:Print:]] */ +static const OnigCodePoint +CR_Print[] = { 733, +0x0020, 0x007e, +0x00a0, 0x0377, +0x037a, 0x037f, +0x0384, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x052f, +0x0531, 0x0556, +0x0559, 0x058a, +0x058d, 0x058f, +0x0591, 0x05c7, +0x05d0, 0x05ea, +0x05ef, 0x05f4, +0x0600, 0x070d, +0x070f, 0x074a, +0x074d, 0x07b1, +0x07c0, 0x07fa, +0x07fd, 0x082d, +0x0830, 0x083e, +0x0840, 0x085b, +0x085e, 0x085e, +0x0860, 0x086a, +0x0870, 0x088e, +0x0890, 0x0891, +0x0897, 0x0983, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bc, 0x09c4, +0x09c7, 0x09c8, +0x09cb, 0x09ce, +0x09d7, 0x09d7, +0x09dc, 0x09dd, +0x09df, 0x09e3, +0x09e6, 0x09fe, +0x0a01, 0x0a03, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a3c, 0x0a3c, +0x0a3e, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4d, +0x0a51, 0x0a51, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a66, 0x0a76, +0x0a81, 0x0a83, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abc, 0x0ac5, +0x0ac7, 0x0ac9, +0x0acb, 0x0acd, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae3, +0x0ae6, 0x0af1, +0x0af9, 0x0aff, +0x0b01, 0x0b03, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3c, 0x0b44, +0x0b47, 0x0b48, +0x0b4b, 0x0b4d, +0x0b55, 0x0b57, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b63, +0x0b66, 0x0b77, +0x0b82, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bbe, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcd, +0x0bd0, 0x0bd0, +0x0bd7, 0x0bd7, +0x0be6, 0x0bfa, +0x0c00, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3c, 0x0c44, +0x0c46, 0x0c48, +0x0c4a, 0x0c4d, +0x0c55, 0x0c56, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c63, +0x0c66, 0x0c6f, +0x0c77, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbc, 0x0cc4, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccd, +0x0cd5, 0x0cd6, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce3, +0x0ce6, 0x0cef, +0x0cf1, 0x0cf3, +0x0d00, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d44, +0x0d46, 0x0d48, +0x0d4a, 0x0d4f, +0x0d54, 0x0d63, +0x0d66, 0x0d7f, +0x0d81, 0x0d83, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0dca, 0x0dca, +0x0dcf, 0x0dd4, +0x0dd6, 0x0dd6, +0x0dd8, 0x0ddf, +0x0de6, 0x0def, +0x0df2, 0x0df4, +0x0e01, 0x0e3a, +0x0e3f, 0x0e5b, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0ec8, 0x0ece, +0x0ed0, 0x0ed9, +0x0edc, 0x0edf, +0x0f00, 0x0f47, +0x0f49, 0x0f6c, +0x0f71, 0x0f97, +0x0f99, 0x0fbc, +0x0fbe, 0x0fcc, +0x0fce, 0x0fda, +0x1000, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x135d, 0x137c, +0x1380, 0x1399, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1400, 0x169c, +0x16a0, 0x16f8, +0x1700, 0x1715, +0x171f, 0x1736, +0x1740, 0x1753, +0x1760, 0x176c, +0x176e, 0x1770, +0x1772, 0x1773, +0x1780, 0x17dd, +0x17e0, 0x17e9, +0x17f0, 0x17f9, +0x1800, 0x1819, +0x1820, 0x1878, +0x1880, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1920, 0x192b, +0x1930, 0x193b, +0x1940, 0x1940, +0x1944, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x19d0, 0x19da, +0x19de, 0x1a1b, +0x1a1e, 0x1a5e, +0x1a60, 0x1a7c, +0x1a7f, 0x1a89, +0x1a90, 0x1a99, +0x1aa0, 0x1aad, +0x1ab0, 0x1ace, +0x1b00, 0x1b4c, +0x1b4e, 0x1bf3, +0x1bfc, 0x1c37, +0x1c3b, 0x1c49, +0x1c4d, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cc7, +0x1cd0, 0x1cfa, +0x1d00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fc4, +0x1fc6, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fdd, 0x1fef, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffe, +0x2000, 0x2027, +0x202a, 0x2064, +0x2066, 0x2071, +0x2074, 0x208e, +0x2090, 0x209c, +0x20a0, 0x20c0, +0x20d0, 0x20f0, +0x2100, 0x218b, +0x2190, 0x2429, +0x2440, 0x244a, +0x2460, 0x2b73, +0x2b76, 0x2b95, +0x2b97, 0x2cf3, +0x2cf9, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d70, +0x2d7f, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x2de0, 0x2e5d, +0x2e80, 0x2e99, +0x2e9b, 0x2ef3, +0x2f00, 0x2fd5, +0x2ff0, 0x303f, +0x3041, 0x3096, +0x3099, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x3190, 0x31e5, +0x31ef, 0x321e, +0x3220, 0xa48c, +0xa490, 0xa4c6, +0xa4d0, 0xa62b, +0xa640, 0xa6f7, +0xa700, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa82c, +0xa830, 0xa839, +0xa840, 0xa877, +0xa880, 0xa8c5, +0xa8ce, 0xa8d9, +0xa8e0, 0xa953, +0xa95f, 0xa97c, +0xa980, 0xa9cd, +0xa9cf, 0xa9d9, +0xa9de, 0xa9fe, +0xaa00, 0xaa36, +0xaa40, 0xaa4d, +0xaa50, 0xaa59, +0xaa5c, 0xaac2, +0xaadb, 0xaaf6, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab6b, +0xab70, 0xabed, +0xabf0, 0xabf9, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xe000, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbc2, +0xfbd3, 0xfd8f, +0xfd92, 0xfdc7, +0xfdcf, 0xfdcf, +0xfdf0, 0xfe19, +0xfe20, 0xfe52, +0xfe54, 0xfe66, +0xfe68, 0xfe6b, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0xfeff, 0xfeff, +0xff01, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0xffe0, 0xffe6, +0xffe8, 0xffee, +0xfff9, 0xfffd, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10100, 0x10102, +0x10107, 0x10133, +0x10137, 0x1018e, +0x10190, 0x1019c, +0x101a0, 0x101a0, +0x101d0, 0x101fd, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x102e0, 0x102fb, +0x10300, 0x10323, +0x1032d, 0x1034a, +0x10350, 0x1037a, +0x10380, 0x1039d, +0x1039f, 0x103c3, +0x103c8, 0x103d5, +0x10400, 0x1049d, +0x104a0, 0x104a9, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x1056f, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10857, 0x1089e, +0x108a7, 0x108af, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x108fb, 0x1091b, +0x1091f, 0x10939, +0x1093f, 0x1093f, +0x10980, 0x109b7, +0x109bc, 0x109cf, +0x109d2, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a38, 0x10a3a, +0x10a3f, 0x10a48, +0x10a50, 0x10a58, +0x10a60, 0x10a9f, +0x10ac0, 0x10ae6, +0x10aeb, 0x10af6, +0x10b00, 0x10b35, +0x10b39, 0x10b55, +0x10b58, 0x10b72, +0x10b78, 0x10b91, +0x10b99, 0x10b9c, +0x10ba9, 0x10baf, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10cfa, 0x10d27, +0x10d30, 0x10d39, +0x10d40, 0x10d65, +0x10d69, 0x10d85, +0x10d8e, 0x10d8f, +0x10e60, 0x10e7e, +0x10e80, 0x10ea9, +0x10eab, 0x10ead, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10efc, 0x10f27, +0x10f30, 0x10f59, +0x10f70, 0x10f89, +0x10fb0, 0x10fcb, +0x10fe0, 0x10ff6, +0x11000, 0x1104d, +0x11052, 0x11075, +0x1107f, 0x110c2, +0x110cd, 0x110cd, +0x110d0, 0x110e8, +0x110f0, 0x110f9, +0x11100, 0x11134, +0x11136, 0x11147, +0x11150, 0x11176, +0x11180, 0x111df, +0x111e1, 0x111f4, +0x11200, 0x11211, +0x11213, 0x11241, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a9, +0x112b0, 0x112ea, +0x112f0, 0x112f9, +0x11300, 0x11303, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133b, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134d, +0x11350, 0x11350, +0x11357, 0x11357, +0x1135d, 0x11363, +0x11366, 0x1136c, +0x11370, 0x11374, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113d5, +0x113d7, 0x113d8, +0x113e1, 0x113e2, +0x11400, 0x1145b, +0x1145d, 0x11461, +0x11480, 0x114c7, +0x114d0, 0x114d9, +0x11580, 0x115b5, +0x115b8, 0x115dd, +0x11600, 0x11644, +0x11650, 0x11659, +0x11660, 0x1166c, +0x11680, 0x116b9, +0x116c0, 0x116c9, +0x116d0, 0x116e3, +0x11700, 0x1171a, +0x1171d, 0x1172b, +0x11730, 0x11746, +0x11800, 0x1183b, +0x118a0, 0x118f2, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x11935, +0x11937, 0x11938, +0x1193b, 0x11946, +0x11950, 0x11959, +0x119a0, 0x119a7, +0x119aa, 0x119d7, +0x119da, 0x119e4, +0x11a00, 0x11a47, +0x11a50, 0x11aa2, +0x11ab0, 0x11af8, +0x11b00, 0x11b09, +0x11bc0, 0x11be1, +0x11bf0, 0x11bf9, +0x11c00, 0x11c08, +0x11c0a, 0x11c36, +0x11c38, 0x11c45, +0x11c50, 0x11c6c, +0x11c70, 0x11c8f, +0x11c92, 0x11ca7, +0x11ca9, 0x11cb6, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d47, +0x11d50, 0x11d59, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d8e, +0x11d90, 0x11d91, +0x11d93, 0x11d98, +0x11da0, 0x11da9, +0x11ee0, 0x11ef8, +0x11f00, 0x11f10, +0x11f12, 0x11f3a, +0x11f3e, 0x11f5a, +0x11fb0, 0x11fb0, +0x11fc0, 0x11ff1, +0x11fff, 0x12399, +0x12400, 0x1246e, +0x12470, 0x12474, +0x12480, 0x12543, +0x12f90, 0x12ff2, +0x13000, 0x13455, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x16139, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a60, 0x16a69, +0x16a6e, 0x16abe, +0x16ac0, 0x16ac9, +0x16ad0, 0x16aed, +0x16af0, 0x16af5, +0x16b00, 0x16b45, +0x16b50, 0x16b59, +0x16b5b, 0x16b61, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d79, +0x16e40, 0x16e9a, +0x16f00, 0x16f4a, +0x16f4f, 0x16f87, +0x16f8f, 0x16f9f, +0x16fe0, 0x16fe4, +0x16ff0, 0x16ff1, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1bc9c, 0x1bca3, +0x1cc00, 0x1ccf9, +0x1cd00, 0x1ceb3, +0x1cf00, 0x1cf2d, +0x1cf30, 0x1cf46, +0x1cf50, 0x1cfc3, +0x1d000, 0x1d0f5, +0x1d100, 0x1d126, +0x1d129, 0x1d1ea, +0x1d200, 0x1d245, +0x1d2c0, 0x1d2d3, +0x1d2e0, 0x1d2f3, +0x1d300, 0x1d356, +0x1d360, 0x1d378, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d7cb, +0x1d7ce, 0x1da8b, +0x1da9b, 0x1da9f, +0x1daa1, 0x1daaf, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e030, 0x1e06d, +0x1e08f, 0x1e08f, +0x1e100, 0x1e12c, +0x1e130, 0x1e13d, +0x1e140, 0x1e149, +0x1e14e, 0x1e14f, +0x1e290, 0x1e2ae, +0x1e2c0, 0x1e2f9, +0x1e2ff, 0x1e2ff, +0x1e4d0, 0x1e4f9, +0x1e5d0, 0x1e5fa, +0x1e5ff, 0x1e5ff, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e8c7, 0x1e8d6, +0x1e900, 0x1e94b, +0x1e950, 0x1e959, +0x1e95e, 0x1e95f, +0x1ec71, 0x1ecb4, +0x1ed01, 0x1ed3d, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x1eef0, 0x1eef1, +0x1f000, 0x1f02b, +0x1f030, 0x1f093, +0x1f0a0, 0x1f0ae, +0x1f0b1, 0x1f0bf, +0x1f0c1, 0x1f0cf, +0x1f0d1, 0x1f0f5, +0x1f100, 0x1f1ad, +0x1f1e6, 0x1f202, +0x1f210, 0x1f23b, +0x1f240, 0x1f248, +0x1f250, 0x1f251, +0x1f260, 0x1f265, +0x1f300, 0x1f6d7, +0x1f6dc, 0x1f6ec, +0x1f6f0, 0x1f6fc, +0x1f700, 0x1f776, +0x1f77b, 0x1f7d9, +0x1f7e0, 0x1f7eb, +0x1f7f0, 0x1f7f0, +0x1f800, 0x1f80b, +0x1f810, 0x1f847, +0x1f850, 0x1f859, +0x1f860, 0x1f887, +0x1f890, 0x1f8ad, +0x1f8b0, 0x1f8bb, +0x1f8c0, 0x1f8c1, +0x1f900, 0x1fa53, +0x1fa60, 0x1fa6d, +0x1fa70, 0x1fa7c, +0x1fa80, 0x1fa89, +0x1fa8f, 0x1fac6, +0x1face, 0x1fadc, +0x1fadf, 0x1fae9, +0x1faf0, 0x1faf8, +0x1fb00, 0x1fb92, +0x1fb94, 0x1fbf9, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +0xe0001, 0xe0001, +0xe0020, 0xe007f, +0xe0100, 0xe01ef, +0xf0000, 0xffffd, +0x100000, 0x10fffd, +}; /* END of CR_Print */ + +/* PROPERTY: 'PosixPunct': POSIX [[:punct:]] */ +static const OnigCodePoint +CR_PosixPunct[] = { 349, +0x0021, 0x002f, +0x003a, 0x0040, +0x005b, 0x0060, +0x007b, 0x007e, +0x00a1, 0x00a9, +0x00ab, 0x00ac, +0x00ae, 0x00b1, +0x00b4, 0x00b4, +0x00b6, 0x00b8, +0x00bb, 0x00bb, +0x00bf, 0x00bf, +0x00d7, 0x00d7, +0x00f7, 0x00f7, +0x02c2, 0x02c5, +0x02d2, 0x02df, +0x02e5, 0x02eb, +0x02ed, 0x02ed, +0x02ef, 0x02ff, +0x0375, 0x0375, +0x037e, 0x037e, +0x0384, 0x0385, +0x0387, 0x0387, +0x03f6, 0x03f6, +0x0482, 0x0482, +0x055a, 0x055f, +0x0589, 0x058a, +0x058d, 0x058f, +0x05be, 0x05be, +0x05c0, 0x05c0, +0x05c3, 0x05c3, +0x05c6, 0x05c6, +0x05f3, 0x05f4, +0x0606, 0x060f, +0x061b, 0x061b, +0x061d, 0x061f, +0x066a, 0x066d, +0x06d4, 0x06d4, +0x06de, 0x06de, +0x06e9, 0x06e9, +0x06fd, 0x06fe, +0x0700, 0x070d, +0x07f6, 0x07f9, +0x07fe, 0x07ff, +0x0830, 0x083e, +0x085e, 0x085e, +0x0888, 0x0888, +0x0964, 0x0965, +0x0970, 0x0970, +0x09f2, 0x09f3, +0x09fa, 0x09fb, +0x09fd, 0x09fd, +0x0a76, 0x0a76, +0x0af0, 0x0af1, +0x0b70, 0x0b70, +0x0bf3, 0x0bfa, +0x0c77, 0x0c77, +0x0c7f, 0x0c7f, +0x0c84, 0x0c84, +0x0d4f, 0x0d4f, +0x0d79, 0x0d79, +0x0df4, 0x0df4, +0x0e3f, 0x0e3f, +0x0e4f, 0x0e4f, +0x0e5a, 0x0e5b, +0x0f01, 0x0f17, +0x0f1a, 0x0f1f, +0x0f34, 0x0f34, +0x0f36, 0x0f36, +0x0f38, 0x0f38, +0x0f3a, 0x0f3d, +0x0f85, 0x0f85, +0x0fbe, 0x0fc5, +0x0fc7, 0x0fcc, +0x0fce, 0x0fda, +0x104a, 0x104f, +0x109e, 0x109f, +0x10fb, 0x10fb, +0x1360, 0x1368, +0x1390, 0x1399, +0x1400, 0x1400, +0x166d, 0x166e, +0x169b, 0x169c, +0x16eb, 0x16ed, +0x1735, 0x1736, +0x17d4, 0x17d6, +0x17d8, 0x17db, +0x1800, 0x180a, +0x1940, 0x1940, +0x1944, 0x1945, +0x19de, 0x19ff, +0x1a1e, 0x1a1f, +0x1aa0, 0x1aa6, +0x1aa8, 0x1aad, +0x1b4e, 0x1b4f, +0x1b5a, 0x1b6a, +0x1b74, 0x1b7f, +0x1bfc, 0x1bff, +0x1c3b, 0x1c3f, +0x1c7e, 0x1c7f, +0x1cc0, 0x1cc7, +0x1cd3, 0x1cd3, +0x1fbd, 0x1fbd, +0x1fbf, 0x1fc1, +0x1fcd, 0x1fcf, +0x1fdd, 0x1fdf, +0x1fed, 0x1fef, +0x1ffd, 0x1ffe, +0x2010, 0x2027, +0x2030, 0x205e, +0x207a, 0x207e, +0x208a, 0x208e, +0x20a0, 0x20c0, +0x2100, 0x2101, +0x2103, 0x2106, +0x2108, 0x2109, +0x2114, 0x2114, +0x2116, 0x2118, +0x211e, 0x2123, +0x2125, 0x2125, +0x2127, 0x2127, +0x2129, 0x2129, +0x212e, 0x212e, +0x213a, 0x213b, +0x2140, 0x2144, +0x214a, 0x214d, +0x214f, 0x214f, +0x218a, 0x218b, +0x2190, 0x2429, +0x2440, 0x244a, +0x249c, 0x24e9, +0x2500, 0x2775, +0x2794, 0x2b73, +0x2b76, 0x2b95, +0x2b97, 0x2bff, +0x2ce5, 0x2cea, +0x2cf9, 0x2cfc, +0x2cfe, 0x2cff, +0x2d70, 0x2d70, +0x2e00, 0x2e2e, +0x2e30, 0x2e5d, +0x2e80, 0x2e99, +0x2e9b, 0x2ef3, +0x2f00, 0x2fd5, +0x2ff0, 0x2fff, +0x3001, 0x3004, +0x3008, 0x3020, +0x3030, 0x3030, +0x3036, 0x3037, +0x303d, 0x303f, +0x309b, 0x309c, +0x30a0, 0x30a0, +0x30fb, 0x30fb, +0x3190, 0x3191, +0x3196, 0x319f, +0x31c0, 0x31e5, +0x31ef, 0x31ef, +0x3200, 0x321e, +0x322a, 0x3247, +0x3250, 0x3250, +0x3260, 0x327f, +0x328a, 0x32b0, +0x32c0, 0x33ff, +0x4dc0, 0x4dff, +0xa490, 0xa4c6, +0xa4fe, 0xa4ff, +0xa60d, 0xa60f, +0xa673, 0xa673, +0xa67e, 0xa67e, +0xa6f2, 0xa6f7, +0xa700, 0xa716, +0xa720, 0xa721, +0xa789, 0xa78a, +0xa828, 0xa82b, +0xa836, 0xa839, +0xa874, 0xa877, +0xa8ce, 0xa8cf, +0xa8f8, 0xa8fa, +0xa8fc, 0xa8fc, +0xa92e, 0xa92f, +0xa95f, 0xa95f, +0xa9c1, 0xa9cd, +0xa9de, 0xa9df, +0xaa5c, 0xaa5f, +0xaa77, 0xaa79, +0xaade, 0xaadf, +0xaaf0, 0xaaf1, +0xab5b, 0xab5b, +0xab6a, 0xab6b, +0xabeb, 0xabeb, +0xfb29, 0xfb29, +0xfbb2, 0xfbc2, +0xfd3e, 0xfd4f, +0xfdcf, 0xfdcf, +0xfdfc, 0xfdff, +0xfe10, 0xfe19, +0xfe30, 0xfe52, +0xfe54, 0xfe66, +0xfe68, 0xfe6b, +0xff01, 0xff0f, +0xff1a, 0xff20, +0xff3b, 0xff40, +0xff5b, 0xff65, +0xffe0, 0xffe6, +0xffe8, 0xffee, +0xfffc, 0xfffd, +0x10100, 0x10102, +0x10137, 0x1013f, +0x10179, 0x10189, +0x1018c, 0x1018e, +0x10190, 0x1019c, +0x101a0, 0x101a0, +0x101d0, 0x101fc, +0x1039f, 0x1039f, +0x103d0, 0x103d0, +0x1056f, 0x1056f, +0x10857, 0x10857, +0x10877, 0x10878, +0x1091f, 0x1091f, +0x1093f, 0x1093f, +0x10a50, 0x10a58, +0x10a7f, 0x10a7f, +0x10ac8, 0x10ac8, +0x10af0, 0x10af6, +0x10b39, 0x10b3f, +0x10b99, 0x10b9c, +0x10d6e, 0x10d6e, +0x10d8e, 0x10d8f, +0x10ead, 0x10ead, +0x10f55, 0x10f59, +0x10f86, 0x10f89, +0x11047, 0x1104d, +0x110bb, 0x110bc, +0x110be, 0x110c1, +0x11140, 0x11143, +0x11174, 0x11175, +0x111c5, 0x111c8, +0x111cd, 0x111cd, +0x111db, 0x111db, +0x111dd, 0x111df, +0x11238, 0x1123d, +0x112a9, 0x112a9, +0x113d4, 0x113d5, +0x113d7, 0x113d8, +0x1144b, 0x1144f, +0x1145a, 0x1145b, +0x1145d, 0x1145d, +0x114c6, 0x114c6, +0x115c1, 0x115d7, +0x11641, 0x11643, +0x11660, 0x1166c, +0x116b9, 0x116b9, +0x1173c, 0x1173f, +0x1183b, 0x1183b, +0x11944, 0x11946, +0x119e2, 0x119e2, +0x11a3f, 0x11a46, +0x11a9a, 0x11a9c, +0x11a9e, 0x11aa2, +0x11b00, 0x11b09, +0x11be1, 0x11be1, +0x11c41, 0x11c45, +0x11c70, 0x11c71, +0x11ef7, 0x11ef8, +0x11f43, 0x11f4f, +0x11fd5, 0x11ff1, +0x11fff, 0x11fff, +0x12470, 0x12474, +0x12ff1, 0x12ff2, +0x16a6e, 0x16a6f, +0x16af5, 0x16af5, +0x16b37, 0x16b3f, +0x16b44, 0x16b45, +0x16d6d, 0x16d6f, +0x16e97, 0x16e9a, +0x16fe2, 0x16fe2, +0x1bc9c, 0x1bc9c, +0x1bc9f, 0x1bc9f, +0x1cc00, 0x1ccef, +0x1cd00, 0x1ceb3, +0x1cf50, 0x1cfc3, +0x1d000, 0x1d0f5, +0x1d100, 0x1d126, +0x1d129, 0x1d164, +0x1d16a, 0x1d16c, +0x1d183, 0x1d184, +0x1d18c, 0x1d1a9, +0x1d1ae, 0x1d1ea, +0x1d200, 0x1d241, +0x1d245, 0x1d245, +0x1d300, 0x1d356, +0x1d6c1, 0x1d6c1, +0x1d6db, 0x1d6db, +0x1d6fb, 0x1d6fb, +0x1d715, 0x1d715, +0x1d735, 0x1d735, +0x1d74f, 0x1d74f, +0x1d76f, 0x1d76f, +0x1d789, 0x1d789, +0x1d7a9, 0x1d7a9, +0x1d7c3, 0x1d7c3, +0x1d800, 0x1d9ff, +0x1da37, 0x1da3a, +0x1da6d, 0x1da74, +0x1da76, 0x1da83, +0x1da85, 0x1da8b, +0x1e14f, 0x1e14f, +0x1e2ff, 0x1e2ff, +0x1e5ff, 0x1e5ff, +0x1e95e, 0x1e95f, +0x1ecac, 0x1ecac, +0x1ecb0, 0x1ecb0, +0x1ed2e, 0x1ed2e, +0x1eef0, 0x1eef1, +0x1f000, 0x1f02b, +0x1f030, 0x1f093, +0x1f0a0, 0x1f0ae, +0x1f0b1, 0x1f0bf, +0x1f0c1, 0x1f0cf, +0x1f0d1, 0x1f0f5, +0x1f10d, 0x1f1ad, +0x1f1e6, 0x1f202, +0x1f210, 0x1f23b, +0x1f240, 0x1f248, +0x1f250, 0x1f251, +0x1f260, 0x1f265, +0x1f300, 0x1f6d7, +0x1f6dc, 0x1f6ec, +0x1f6f0, 0x1f6fc, +0x1f700, 0x1f776, +0x1f77b, 0x1f7d9, +0x1f7e0, 0x1f7eb, +0x1f7f0, 0x1f7f0, +0x1f800, 0x1f80b, +0x1f810, 0x1f847, +0x1f850, 0x1f859, +0x1f860, 0x1f887, +0x1f890, 0x1f8ad, +0x1f8b0, 0x1f8bb, +0x1f8c0, 0x1f8c1, +0x1f900, 0x1fa53, +0x1fa60, 0x1fa6d, +0x1fa70, 0x1fa7c, +0x1fa80, 0x1fa89, +0x1fa8f, 0x1fac6, +0x1face, 0x1fadc, +0x1fadf, 0x1fae9, +0x1faf0, 0x1faf8, +0x1fb00, 0x1fb92, +0x1fb94, 0x1fbef, +}; /* END of CR_PosixPunct */ + +/* PROPERTY: 'Space': POSIX [[:Space:]] */ +static const OnigCodePoint +CR_Space[] = { 10, +0x0009, 0x000d, +0x0020, 0x0020, +0x0085, 0x0085, +0x00a0, 0x00a0, +0x1680, 0x1680, +0x2000, 0x200a, +0x2028, 0x2029, +0x202f, 0x202f, +0x205f, 0x205f, +0x3000, 0x3000, +}; /* END of CR_Space */ + +/* PROPERTY: 'Upper': POSIX [[:Upper:]] */ +static const OnigCodePoint +CR_Upper[] = { 656, +0x0041, 0x005a, +0x00c0, 0x00d6, +0x00d8, 0x00de, +0x0100, 0x0100, +0x0102, 0x0102, +0x0104, 0x0104, +0x0106, 0x0106, +0x0108, 0x0108, +0x010a, 0x010a, +0x010c, 0x010c, +0x010e, 0x010e, +0x0110, 0x0110, +0x0112, 0x0112, +0x0114, 0x0114, +0x0116, 0x0116, +0x0118, 0x0118, +0x011a, 0x011a, +0x011c, 0x011c, +0x011e, 0x011e, +0x0120, 0x0120, +0x0122, 0x0122, +0x0124, 0x0124, +0x0126, 0x0126, +0x0128, 0x0128, +0x012a, 0x012a, +0x012c, 0x012c, +0x012e, 0x012e, +0x0130, 0x0130, +0x0132, 0x0132, +0x0134, 0x0134, +0x0136, 0x0136, +0x0139, 0x0139, +0x013b, 0x013b, +0x013d, 0x013d, +0x013f, 0x013f, +0x0141, 0x0141, +0x0143, 0x0143, +0x0145, 0x0145, +0x0147, 0x0147, +0x014a, 0x014a, +0x014c, 0x014c, +0x014e, 0x014e, +0x0150, 0x0150, +0x0152, 0x0152, +0x0154, 0x0154, +0x0156, 0x0156, +0x0158, 0x0158, +0x015a, 0x015a, +0x015c, 0x015c, +0x015e, 0x015e, +0x0160, 0x0160, +0x0162, 0x0162, +0x0164, 0x0164, +0x0166, 0x0166, +0x0168, 0x0168, +0x016a, 0x016a, +0x016c, 0x016c, +0x016e, 0x016e, +0x0170, 0x0170, +0x0172, 0x0172, +0x0174, 0x0174, +0x0176, 0x0176, +0x0178, 0x0179, +0x017b, 0x017b, +0x017d, 0x017d, +0x0181, 0x0182, +0x0184, 0x0184, +0x0186, 0x0187, +0x0189, 0x018b, +0x018e, 0x0191, +0x0193, 0x0194, +0x0196, 0x0198, +0x019c, 0x019d, +0x019f, 0x01a0, +0x01a2, 0x01a2, +0x01a4, 0x01a4, +0x01a6, 0x01a7, +0x01a9, 0x01a9, +0x01ac, 0x01ac, +0x01ae, 0x01af, +0x01b1, 0x01b3, +0x01b5, 0x01b5, +0x01b7, 0x01b8, +0x01bc, 0x01bc, +0x01c4, 0x01c4, +0x01c7, 0x01c7, +0x01ca, 0x01ca, +0x01cd, 0x01cd, +0x01cf, 0x01cf, +0x01d1, 0x01d1, +0x01d3, 0x01d3, +0x01d5, 0x01d5, +0x01d7, 0x01d7, +0x01d9, 0x01d9, +0x01db, 0x01db, +0x01de, 0x01de, +0x01e0, 0x01e0, +0x01e2, 0x01e2, +0x01e4, 0x01e4, +0x01e6, 0x01e6, +0x01e8, 0x01e8, +0x01ea, 0x01ea, +0x01ec, 0x01ec, +0x01ee, 0x01ee, +0x01f1, 0x01f1, +0x01f4, 0x01f4, +0x01f6, 0x01f8, +0x01fa, 0x01fa, +0x01fc, 0x01fc, +0x01fe, 0x01fe, +0x0200, 0x0200, +0x0202, 0x0202, +0x0204, 0x0204, +0x0206, 0x0206, +0x0208, 0x0208, +0x020a, 0x020a, +0x020c, 0x020c, +0x020e, 0x020e, +0x0210, 0x0210, +0x0212, 0x0212, +0x0214, 0x0214, +0x0216, 0x0216, +0x0218, 0x0218, +0x021a, 0x021a, +0x021c, 0x021c, +0x021e, 0x021e, +0x0220, 0x0220, +0x0222, 0x0222, +0x0224, 0x0224, +0x0226, 0x0226, +0x0228, 0x0228, +0x022a, 0x022a, +0x022c, 0x022c, +0x022e, 0x022e, +0x0230, 0x0230, +0x0232, 0x0232, +0x023a, 0x023b, +0x023d, 0x023e, +0x0241, 0x0241, +0x0243, 0x0246, +0x0248, 0x0248, +0x024a, 0x024a, +0x024c, 0x024c, +0x024e, 0x024e, +0x0370, 0x0370, +0x0372, 0x0372, +0x0376, 0x0376, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x038f, +0x0391, 0x03a1, +0x03a3, 0x03ab, +0x03cf, 0x03cf, +0x03d2, 0x03d4, +0x03d8, 0x03d8, +0x03da, 0x03da, +0x03dc, 0x03dc, +0x03de, 0x03de, +0x03e0, 0x03e0, +0x03e2, 0x03e2, +0x03e4, 0x03e4, +0x03e6, 0x03e6, +0x03e8, 0x03e8, +0x03ea, 0x03ea, +0x03ec, 0x03ec, +0x03ee, 0x03ee, +0x03f4, 0x03f4, +0x03f7, 0x03f7, +0x03f9, 0x03fa, +0x03fd, 0x042f, +0x0460, 0x0460, +0x0462, 0x0462, +0x0464, 0x0464, +0x0466, 0x0466, +0x0468, 0x0468, +0x046a, 0x046a, +0x046c, 0x046c, +0x046e, 0x046e, +0x0470, 0x0470, +0x0472, 0x0472, +0x0474, 0x0474, +0x0476, 0x0476, +0x0478, 0x0478, +0x047a, 0x047a, +0x047c, 0x047c, +0x047e, 0x047e, +0x0480, 0x0480, +0x048a, 0x048a, +0x048c, 0x048c, +0x048e, 0x048e, +0x0490, 0x0490, +0x0492, 0x0492, +0x0494, 0x0494, +0x0496, 0x0496, +0x0498, 0x0498, +0x049a, 0x049a, +0x049c, 0x049c, +0x049e, 0x049e, +0x04a0, 0x04a0, +0x04a2, 0x04a2, +0x04a4, 0x04a4, +0x04a6, 0x04a6, +0x04a8, 0x04a8, +0x04aa, 0x04aa, +0x04ac, 0x04ac, +0x04ae, 0x04ae, +0x04b0, 0x04b0, +0x04b2, 0x04b2, +0x04b4, 0x04b4, +0x04b6, 0x04b6, +0x04b8, 0x04b8, +0x04ba, 0x04ba, +0x04bc, 0x04bc, +0x04be, 0x04be, +0x04c0, 0x04c1, +0x04c3, 0x04c3, +0x04c5, 0x04c5, +0x04c7, 0x04c7, +0x04c9, 0x04c9, +0x04cb, 0x04cb, +0x04cd, 0x04cd, +0x04d0, 0x04d0, +0x04d2, 0x04d2, +0x04d4, 0x04d4, +0x04d6, 0x04d6, +0x04d8, 0x04d8, +0x04da, 0x04da, +0x04dc, 0x04dc, +0x04de, 0x04de, +0x04e0, 0x04e0, +0x04e2, 0x04e2, +0x04e4, 0x04e4, +0x04e6, 0x04e6, +0x04e8, 0x04e8, +0x04ea, 0x04ea, +0x04ec, 0x04ec, +0x04ee, 0x04ee, +0x04f0, 0x04f0, +0x04f2, 0x04f2, +0x04f4, 0x04f4, +0x04f6, 0x04f6, +0x04f8, 0x04f8, +0x04fa, 0x04fa, +0x04fc, 0x04fc, +0x04fe, 0x04fe, +0x0500, 0x0500, +0x0502, 0x0502, +0x0504, 0x0504, +0x0506, 0x0506, +0x0508, 0x0508, +0x050a, 0x050a, +0x050c, 0x050c, +0x050e, 0x050e, +0x0510, 0x0510, +0x0512, 0x0512, +0x0514, 0x0514, +0x0516, 0x0516, +0x0518, 0x0518, +0x051a, 0x051a, +0x051c, 0x051c, +0x051e, 0x051e, +0x0520, 0x0520, +0x0522, 0x0522, +0x0524, 0x0524, +0x0526, 0x0526, +0x0528, 0x0528, +0x052a, 0x052a, +0x052c, 0x052c, +0x052e, 0x052e, +0x0531, 0x0556, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x13a0, 0x13f5, +0x1c89, 0x1c89, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1e00, 0x1e00, +0x1e02, 0x1e02, +0x1e04, 0x1e04, +0x1e06, 0x1e06, +0x1e08, 0x1e08, +0x1e0a, 0x1e0a, +0x1e0c, 0x1e0c, +0x1e0e, 0x1e0e, +0x1e10, 0x1e10, +0x1e12, 0x1e12, +0x1e14, 0x1e14, +0x1e16, 0x1e16, +0x1e18, 0x1e18, +0x1e1a, 0x1e1a, +0x1e1c, 0x1e1c, +0x1e1e, 0x1e1e, +0x1e20, 0x1e20, +0x1e22, 0x1e22, +0x1e24, 0x1e24, +0x1e26, 0x1e26, +0x1e28, 0x1e28, +0x1e2a, 0x1e2a, +0x1e2c, 0x1e2c, +0x1e2e, 0x1e2e, +0x1e30, 0x1e30, +0x1e32, 0x1e32, +0x1e34, 0x1e34, +0x1e36, 0x1e36, +0x1e38, 0x1e38, +0x1e3a, 0x1e3a, +0x1e3c, 0x1e3c, +0x1e3e, 0x1e3e, +0x1e40, 0x1e40, +0x1e42, 0x1e42, +0x1e44, 0x1e44, +0x1e46, 0x1e46, +0x1e48, 0x1e48, +0x1e4a, 0x1e4a, +0x1e4c, 0x1e4c, +0x1e4e, 0x1e4e, +0x1e50, 0x1e50, +0x1e52, 0x1e52, +0x1e54, 0x1e54, +0x1e56, 0x1e56, +0x1e58, 0x1e58, +0x1e5a, 0x1e5a, +0x1e5c, 0x1e5c, +0x1e5e, 0x1e5e, +0x1e60, 0x1e60, +0x1e62, 0x1e62, +0x1e64, 0x1e64, +0x1e66, 0x1e66, +0x1e68, 0x1e68, +0x1e6a, 0x1e6a, +0x1e6c, 0x1e6c, +0x1e6e, 0x1e6e, +0x1e70, 0x1e70, +0x1e72, 0x1e72, +0x1e74, 0x1e74, +0x1e76, 0x1e76, +0x1e78, 0x1e78, +0x1e7a, 0x1e7a, +0x1e7c, 0x1e7c, +0x1e7e, 0x1e7e, +0x1e80, 0x1e80, +0x1e82, 0x1e82, +0x1e84, 0x1e84, +0x1e86, 0x1e86, +0x1e88, 0x1e88, +0x1e8a, 0x1e8a, +0x1e8c, 0x1e8c, +0x1e8e, 0x1e8e, +0x1e90, 0x1e90, +0x1e92, 0x1e92, +0x1e94, 0x1e94, +0x1e9e, 0x1e9e, +0x1ea0, 0x1ea0, +0x1ea2, 0x1ea2, +0x1ea4, 0x1ea4, +0x1ea6, 0x1ea6, +0x1ea8, 0x1ea8, +0x1eaa, 0x1eaa, +0x1eac, 0x1eac, +0x1eae, 0x1eae, +0x1eb0, 0x1eb0, +0x1eb2, 0x1eb2, +0x1eb4, 0x1eb4, +0x1eb6, 0x1eb6, +0x1eb8, 0x1eb8, +0x1eba, 0x1eba, +0x1ebc, 0x1ebc, +0x1ebe, 0x1ebe, +0x1ec0, 0x1ec0, +0x1ec2, 0x1ec2, +0x1ec4, 0x1ec4, +0x1ec6, 0x1ec6, +0x1ec8, 0x1ec8, +0x1eca, 0x1eca, +0x1ecc, 0x1ecc, +0x1ece, 0x1ece, +0x1ed0, 0x1ed0, +0x1ed2, 0x1ed2, +0x1ed4, 0x1ed4, +0x1ed6, 0x1ed6, +0x1ed8, 0x1ed8, +0x1eda, 0x1eda, +0x1edc, 0x1edc, +0x1ede, 0x1ede, +0x1ee0, 0x1ee0, +0x1ee2, 0x1ee2, +0x1ee4, 0x1ee4, +0x1ee6, 0x1ee6, +0x1ee8, 0x1ee8, +0x1eea, 0x1eea, +0x1eec, 0x1eec, +0x1eee, 0x1eee, +0x1ef0, 0x1ef0, +0x1ef2, 0x1ef2, +0x1ef4, 0x1ef4, +0x1ef6, 0x1ef6, +0x1ef8, 0x1ef8, +0x1efa, 0x1efa, +0x1efc, 0x1efc, +0x1efe, 0x1efe, +0x1f08, 0x1f0f, +0x1f18, 0x1f1d, +0x1f28, 0x1f2f, +0x1f38, 0x1f3f, +0x1f48, 0x1f4d, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f5f, +0x1f68, 0x1f6f, +0x1fb8, 0x1fbb, +0x1fc8, 0x1fcb, +0x1fd8, 0x1fdb, +0x1fe8, 0x1fec, +0x1ff8, 0x1ffb, +0x2102, 0x2102, +0x2107, 0x2107, +0x210b, 0x210d, +0x2110, 0x2112, +0x2115, 0x2115, +0x2119, 0x211d, +0x2124, 0x2124, +0x2126, 0x2126, +0x2128, 0x2128, +0x212a, 0x212d, +0x2130, 0x2133, +0x213e, 0x213f, +0x2145, 0x2145, +0x2160, 0x216f, +0x2183, 0x2183, +0x24b6, 0x24cf, +0x2c00, 0x2c2f, +0x2c60, 0x2c60, +0x2c62, 0x2c64, +0x2c67, 0x2c67, +0x2c69, 0x2c69, +0x2c6b, 0x2c6b, +0x2c6d, 0x2c70, +0x2c72, 0x2c72, +0x2c75, 0x2c75, +0x2c7e, 0x2c80, +0x2c82, 0x2c82, +0x2c84, 0x2c84, +0x2c86, 0x2c86, +0x2c88, 0x2c88, +0x2c8a, 0x2c8a, +0x2c8c, 0x2c8c, +0x2c8e, 0x2c8e, +0x2c90, 0x2c90, +0x2c92, 0x2c92, +0x2c94, 0x2c94, +0x2c96, 0x2c96, +0x2c98, 0x2c98, +0x2c9a, 0x2c9a, +0x2c9c, 0x2c9c, +0x2c9e, 0x2c9e, +0x2ca0, 0x2ca0, +0x2ca2, 0x2ca2, +0x2ca4, 0x2ca4, +0x2ca6, 0x2ca6, +0x2ca8, 0x2ca8, +0x2caa, 0x2caa, +0x2cac, 0x2cac, +0x2cae, 0x2cae, +0x2cb0, 0x2cb0, +0x2cb2, 0x2cb2, +0x2cb4, 0x2cb4, +0x2cb6, 0x2cb6, +0x2cb8, 0x2cb8, +0x2cba, 0x2cba, +0x2cbc, 0x2cbc, +0x2cbe, 0x2cbe, +0x2cc0, 0x2cc0, +0x2cc2, 0x2cc2, +0x2cc4, 0x2cc4, +0x2cc6, 0x2cc6, +0x2cc8, 0x2cc8, +0x2cca, 0x2cca, +0x2ccc, 0x2ccc, +0x2cce, 0x2cce, +0x2cd0, 0x2cd0, +0x2cd2, 0x2cd2, +0x2cd4, 0x2cd4, +0x2cd6, 0x2cd6, +0x2cd8, 0x2cd8, +0x2cda, 0x2cda, +0x2cdc, 0x2cdc, +0x2cde, 0x2cde, +0x2ce0, 0x2ce0, +0x2ce2, 0x2ce2, +0x2ceb, 0x2ceb, +0x2ced, 0x2ced, +0x2cf2, 0x2cf2, +0xa640, 0xa640, +0xa642, 0xa642, +0xa644, 0xa644, +0xa646, 0xa646, +0xa648, 0xa648, +0xa64a, 0xa64a, +0xa64c, 0xa64c, +0xa64e, 0xa64e, +0xa650, 0xa650, +0xa652, 0xa652, +0xa654, 0xa654, +0xa656, 0xa656, +0xa658, 0xa658, +0xa65a, 0xa65a, +0xa65c, 0xa65c, +0xa65e, 0xa65e, +0xa660, 0xa660, +0xa662, 0xa662, +0xa664, 0xa664, +0xa666, 0xa666, +0xa668, 0xa668, +0xa66a, 0xa66a, +0xa66c, 0xa66c, +0xa680, 0xa680, +0xa682, 0xa682, +0xa684, 0xa684, +0xa686, 0xa686, +0xa688, 0xa688, +0xa68a, 0xa68a, +0xa68c, 0xa68c, +0xa68e, 0xa68e, +0xa690, 0xa690, +0xa692, 0xa692, +0xa694, 0xa694, +0xa696, 0xa696, +0xa698, 0xa698, +0xa69a, 0xa69a, +0xa722, 0xa722, +0xa724, 0xa724, +0xa726, 0xa726, +0xa728, 0xa728, +0xa72a, 0xa72a, +0xa72c, 0xa72c, +0xa72e, 0xa72e, +0xa732, 0xa732, +0xa734, 0xa734, +0xa736, 0xa736, +0xa738, 0xa738, +0xa73a, 0xa73a, +0xa73c, 0xa73c, +0xa73e, 0xa73e, +0xa740, 0xa740, +0xa742, 0xa742, +0xa744, 0xa744, +0xa746, 0xa746, +0xa748, 0xa748, +0xa74a, 0xa74a, +0xa74c, 0xa74c, +0xa74e, 0xa74e, +0xa750, 0xa750, +0xa752, 0xa752, +0xa754, 0xa754, +0xa756, 0xa756, +0xa758, 0xa758, +0xa75a, 0xa75a, +0xa75c, 0xa75c, +0xa75e, 0xa75e, +0xa760, 0xa760, +0xa762, 0xa762, +0xa764, 0xa764, +0xa766, 0xa766, +0xa768, 0xa768, +0xa76a, 0xa76a, +0xa76c, 0xa76c, +0xa76e, 0xa76e, +0xa779, 0xa779, +0xa77b, 0xa77b, +0xa77d, 0xa77e, +0xa780, 0xa780, +0xa782, 0xa782, +0xa784, 0xa784, +0xa786, 0xa786, +0xa78b, 0xa78b, +0xa78d, 0xa78d, +0xa790, 0xa790, +0xa792, 0xa792, +0xa796, 0xa796, +0xa798, 0xa798, +0xa79a, 0xa79a, +0xa79c, 0xa79c, +0xa79e, 0xa79e, +0xa7a0, 0xa7a0, +0xa7a2, 0xa7a2, +0xa7a4, 0xa7a4, +0xa7a6, 0xa7a6, +0xa7a8, 0xa7a8, +0xa7aa, 0xa7ae, +0xa7b0, 0xa7b4, +0xa7b6, 0xa7b6, +0xa7b8, 0xa7b8, +0xa7ba, 0xa7ba, +0xa7bc, 0xa7bc, +0xa7be, 0xa7be, +0xa7c0, 0xa7c0, +0xa7c2, 0xa7c2, +0xa7c4, 0xa7c7, +0xa7c9, 0xa7c9, +0xa7cb, 0xa7cc, +0xa7d0, 0xa7d0, +0xa7d6, 0xa7d6, +0xa7d8, 0xa7d8, +0xa7da, 0xa7da, +0xa7dc, 0xa7dc, +0xa7f5, 0xa7f5, +0xff21, 0xff3a, +0x10400, 0x10427, +0x104b0, 0x104d3, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10c80, 0x10cb2, +0x10d50, 0x10d65, +0x118a0, 0x118bf, +0x16e40, 0x16e5f, +0x1d400, 0x1d419, +0x1d434, 0x1d44d, +0x1d468, 0x1d481, +0x1d49c, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b5, +0x1d4d0, 0x1d4e9, +0x1d504, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d538, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d56c, 0x1d585, +0x1d5a0, 0x1d5b9, +0x1d5d4, 0x1d5ed, +0x1d608, 0x1d621, +0x1d63c, 0x1d655, +0x1d670, 0x1d689, +0x1d6a8, 0x1d6c0, +0x1d6e2, 0x1d6fa, +0x1d71c, 0x1d734, +0x1d756, 0x1d76e, +0x1d790, 0x1d7a8, +0x1d7ca, 0x1d7ca, +0x1e900, 0x1e921, +0x1f130, 0x1f149, +0x1f150, 0x1f169, +0x1f170, 0x1f189, +}; /* END of CR_Upper */ + +/* PROPERTY: 'XDigit': POSIX [[:XDigit:]] */ +static const OnigCodePoint +CR_XDigit[] = { 3, +0x0030, 0x0039, +0x0041, 0x0046, +0x0061, 0x0066, +}; /* END of CR_XDigit */ + +/* PROPERTY: 'Word': POSIX [[:Word:]] */ +static const OnigCodePoint +CR_Word[] = { 795, +0x0030, 0x0039, +0x0041, 0x005a, +0x005f, 0x005f, +0x0061, 0x007a, +0x00aa, 0x00aa, +0x00b5, 0x00b5, +0x00ba, 0x00ba, +0x00c0, 0x00d6, +0x00d8, 0x00f6, +0x00f8, 0x02c1, +0x02c6, 0x02d1, +0x02e0, 0x02e4, +0x02ec, 0x02ec, +0x02ee, 0x02ee, +0x0300, 0x0374, +0x0376, 0x0377, +0x037a, 0x037d, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x03f5, +0x03f7, 0x0481, +0x0483, 0x052f, +0x0531, 0x0556, +0x0559, 0x0559, +0x0560, 0x0588, +0x0591, 0x05bd, +0x05bf, 0x05bf, +0x05c1, 0x05c2, +0x05c4, 0x05c5, +0x05c7, 0x05c7, +0x05d0, 0x05ea, +0x05ef, 0x05f2, +0x0610, 0x061a, +0x0620, 0x0669, +0x066e, 0x06d3, +0x06d5, 0x06dc, +0x06df, 0x06e8, +0x06ea, 0x06fc, +0x06ff, 0x06ff, +0x0710, 0x074a, +0x074d, 0x07b1, +0x07c0, 0x07f5, +0x07fa, 0x07fa, +0x07fd, 0x07fd, +0x0800, 0x082d, +0x0840, 0x085b, +0x0860, 0x086a, +0x0870, 0x0887, +0x0889, 0x088e, +0x0897, 0x08e1, +0x08e3, 0x0963, +0x0966, 0x096f, +0x0971, 0x0983, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bc, 0x09c4, +0x09c7, 0x09c8, +0x09cb, 0x09ce, +0x09d7, 0x09d7, +0x09dc, 0x09dd, +0x09df, 0x09e3, +0x09e6, 0x09f1, +0x09fc, 0x09fc, +0x09fe, 0x09fe, +0x0a01, 0x0a03, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a3c, 0x0a3c, +0x0a3e, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4d, +0x0a51, 0x0a51, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a66, 0x0a75, +0x0a81, 0x0a83, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abc, 0x0ac5, +0x0ac7, 0x0ac9, +0x0acb, 0x0acd, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae3, +0x0ae6, 0x0aef, +0x0af9, 0x0aff, +0x0b01, 0x0b03, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3c, 0x0b44, +0x0b47, 0x0b48, +0x0b4b, 0x0b4d, +0x0b55, 0x0b57, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b63, +0x0b66, 0x0b6f, +0x0b71, 0x0b71, +0x0b82, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bbe, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcd, +0x0bd0, 0x0bd0, +0x0bd7, 0x0bd7, +0x0be6, 0x0bef, +0x0c00, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3c, 0x0c44, +0x0c46, 0x0c48, +0x0c4a, 0x0c4d, +0x0c55, 0x0c56, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c63, +0x0c66, 0x0c6f, +0x0c80, 0x0c83, +0x0c85, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbc, 0x0cc4, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccd, +0x0cd5, 0x0cd6, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce3, +0x0ce6, 0x0cef, +0x0cf1, 0x0cf3, +0x0d00, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d44, +0x0d46, 0x0d48, +0x0d4a, 0x0d4e, +0x0d54, 0x0d57, +0x0d5f, 0x0d63, +0x0d66, 0x0d6f, +0x0d7a, 0x0d7f, +0x0d81, 0x0d83, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0dca, 0x0dca, +0x0dcf, 0x0dd4, +0x0dd6, 0x0dd6, +0x0dd8, 0x0ddf, +0x0de6, 0x0def, +0x0df2, 0x0df3, +0x0e01, 0x0e3a, +0x0e40, 0x0e4e, +0x0e50, 0x0e59, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0ec8, 0x0ece, +0x0ed0, 0x0ed9, +0x0edc, 0x0edf, +0x0f00, 0x0f00, +0x0f18, 0x0f19, +0x0f20, 0x0f29, +0x0f35, 0x0f35, +0x0f37, 0x0f37, +0x0f39, 0x0f39, +0x0f3e, 0x0f47, +0x0f49, 0x0f6c, +0x0f71, 0x0f84, +0x0f86, 0x0f97, +0x0f99, 0x0fbc, +0x0fc6, 0x0fc6, +0x1000, 0x1049, +0x1050, 0x109d, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x10fa, +0x10fc, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x135d, 0x135f, +0x1380, 0x138f, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1401, 0x166c, +0x166f, 0x167f, +0x1681, 0x169a, +0x16a0, 0x16ea, +0x16ee, 0x16f8, +0x1700, 0x1715, +0x171f, 0x1734, +0x1740, 0x1753, +0x1760, 0x176c, +0x176e, 0x1770, +0x1772, 0x1773, +0x1780, 0x17d3, +0x17d7, 0x17d7, +0x17dc, 0x17dd, +0x17e0, 0x17e9, +0x180b, 0x180d, +0x180f, 0x1819, +0x1820, 0x1878, +0x1880, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1920, 0x192b, +0x1930, 0x193b, +0x1946, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x19d0, 0x19d9, +0x1a00, 0x1a1b, +0x1a20, 0x1a5e, +0x1a60, 0x1a7c, +0x1a7f, 0x1a89, +0x1a90, 0x1a99, +0x1aa7, 0x1aa7, +0x1ab0, 0x1ace, +0x1b00, 0x1b4c, +0x1b50, 0x1b59, +0x1b6b, 0x1b73, +0x1b80, 0x1bf3, +0x1c00, 0x1c37, +0x1c40, 0x1c49, +0x1c4d, 0x1c7d, +0x1c80, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1cd0, 0x1cd2, +0x1cd4, 0x1cfa, +0x1d00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fbc, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fcc, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fe0, 0x1fec, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffc, +0x203f, 0x2040, +0x2054, 0x2054, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x20d0, 0x20f0, +0x2102, 0x2102, +0x2107, 0x2107, +0x210a, 0x2113, +0x2115, 0x2115, +0x2119, 0x211d, +0x2124, 0x2124, +0x2126, 0x2126, +0x2128, 0x2128, +0x212a, 0x212d, +0x212f, 0x2139, +0x213c, 0x213f, +0x2145, 0x2149, +0x214e, 0x214e, +0x2160, 0x2188, +0x24b6, 0x24e9, +0x2c00, 0x2ce4, +0x2ceb, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d6f, +0x2d7f, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x2de0, 0x2dff, +0x2e2f, 0x2e2f, +0x3005, 0x3007, +0x3021, 0x302f, +0x3031, 0x3035, +0x3038, 0x303c, +0x3041, 0x3096, +0x3099, 0x309a, +0x309d, 0x309f, +0x30a1, 0x30fa, +0x30fc, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x31a0, 0x31bf, +0x31f0, 0x31ff, +0x3400, 0x4dbf, +0x4e00, 0xa48c, +0xa4d0, 0xa4fd, +0xa500, 0xa60c, +0xa610, 0xa62b, +0xa640, 0xa672, +0xa674, 0xa67d, +0xa67f, 0xa6f1, +0xa717, 0xa71f, +0xa722, 0xa788, +0xa78b, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa827, +0xa82c, 0xa82c, +0xa840, 0xa873, +0xa880, 0xa8c5, +0xa8d0, 0xa8d9, +0xa8e0, 0xa8f7, +0xa8fb, 0xa8fb, +0xa8fd, 0xa92d, +0xa930, 0xa953, +0xa960, 0xa97c, +0xa980, 0xa9c0, +0xa9cf, 0xa9d9, +0xa9e0, 0xa9fe, +0xaa00, 0xaa36, +0xaa40, 0xaa4d, +0xaa50, 0xaa59, +0xaa60, 0xaa76, +0xaa7a, 0xaac2, +0xaadb, 0xaadd, +0xaae0, 0xaaef, +0xaaf2, 0xaaf6, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab5a, +0xab5c, 0xab69, +0xab70, 0xabea, +0xabec, 0xabed, +0xabf0, 0xabf9, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xf900, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb28, +0xfb2a, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbb1, +0xfbd3, 0xfd3d, +0xfd50, 0xfd8f, +0xfd92, 0xfdc7, +0xfdf0, 0xfdfb, +0xfe00, 0xfe0f, +0xfe20, 0xfe2f, +0xfe33, 0xfe34, +0xfe4d, 0xfe4f, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0xff10, 0xff19, +0xff21, 0xff3a, +0xff3f, 0xff3f, +0xff41, 0xff5a, +0xff66, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10140, 0x10174, +0x101fd, 0x101fd, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x102e0, 0x102e0, +0x10300, 0x1031f, +0x1032d, 0x1034a, +0x10350, 0x1037a, +0x10380, 0x1039d, +0x103a0, 0x103c3, +0x103c8, 0x103cf, +0x103d1, 0x103d5, +0x10400, 0x1049d, +0x104a0, 0x104a9, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10860, 0x10876, +0x10880, 0x1089e, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x10900, 0x10915, +0x10920, 0x10939, +0x10980, 0x109b7, +0x109be, 0x109bf, +0x10a00, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a38, 0x10a3a, +0x10a3f, 0x10a3f, +0x10a60, 0x10a7c, +0x10a80, 0x10a9c, +0x10ac0, 0x10ac7, +0x10ac9, 0x10ae6, +0x10b00, 0x10b35, +0x10b40, 0x10b55, +0x10b60, 0x10b72, +0x10b80, 0x10b91, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10d00, 0x10d27, +0x10d30, 0x10d39, +0x10d40, 0x10d65, +0x10d69, 0x10d6d, +0x10d6f, 0x10d85, +0x10e80, 0x10ea9, +0x10eab, 0x10eac, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10efc, 0x10f1c, +0x10f27, 0x10f27, +0x10f30, 0x10f50, +0x10f70, 0x10f85, +0x10fb0, 0x10fc4, +0x10fe0, 0x10ff6, +0x11000, 0x11046, +0x11066, 0x11075, +0x1107f, 0x110ba, +0x110c2, 0x110c2, +0x110d0, 0x110e8, +0x110f0, 0x110f9, +0x11100, 0x11134, +0x11136, 0x1113f, +0x11144, 0x11147, +0x11150, 0x11173, +0x11176, 0x11176, +0x11180, 0x111c4, +0x111c9, 0x111cc, +0x111ce, 0x111da, +0x111dc, 0x111dc, +0x11200, 0x11211, +0x11213, 0x11237, +0x1123e, 0x11241, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a8, +0x112b0, 0x112ea, +0x112f0, 0x112f9, +0x11300, 0x11303, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133b, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134d, +0x11350, 0x11350, +0x11357, 0x11357, +0x1135d, 0x11363, +0x11366, 0x1136c, +0x11370, 0x11374, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113d3, +0x113e1, 0x113e2, +0x11400, 0x1144a, +0x11450, 0x11459, +0x1145e, 0x11461, +0x11480, 0x114c5, +0x114c7, 0x114c7, +0x114d0, 0x114d9, +0x11580, 0x115b5, +0x115b8, 0x115c0, +0x115d8, 0x115dd, +0x11600, 0x11640, +0x11644, 0x11644, +0x11650, 0x11659, +0x11680, 0x116b8, +0x116c0, 0x116c9, +0x116d0, 0x116e3, +0x11700, 0x1171a, +0x1171d, 0x1172b, +0x11730, 0x11739, +0x11740, 0x11746, +0x11800, 0x1183a, +0x118a0, 0x118e9, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x11935, +0x11937, 0x11938, +0x1193b, 0x11943, +0x11950, 0x11959, +0x119a0, 0x119a7, +0x119aa, 0x119d7, +0x119da, 0x119e1, +0x119e3, 0x119e4, +0x11a00, 0x11a3e, +0x11a47, 0x11a47, +0x11a50, 0x11a99, +0x11a9d, 0x11a9d, +0x11ab0, 0x11af8, +0x11bc0, 0x11be0, +0x11bf0, 0x11bf9, +0x11c00, 0x11c08, +0x11c0a, 0x11c36, +0x11c38, 0x11c40, +0x11c50, 0x11c59, +0x11c72, 0x11c8f, +0x11c92, 0x11ca7, +0x11ca9, 0x11cb6, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d47, +0x11d50, 0x11d59, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d8e, +0x11d90, 0x11d91, +0x11d93, 0x11d98, +0x11da0, 0x11da9, +0x11ee0, 0x11ef6, +0x11f00, 0x11f10, +0x11f12, 0x11f3a, +0x11f3e, 0x11f42, +0x11f50, 0x11f5a, +0x11fb0, 0x11fb0, +0x12000, 0x12399, +0x12400, 0x1246e, +0x12480, 0x12543, +0x12f90, 0x12ff0, +0x13000, 0x1342f, +0x13440, 0x13455, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x16139, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a60, 0x16a69, +0x16a70, 0x16abe, +0x16ac0, 0x16ac9, +0x16ad0, 0x16aed, +0x16af0, 0x16af4, +0x16b00, 0x16b36, +0x16b40, 0x16b43, +0x16b50, 0x16b59, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d6c, +0x16d70, 0x16d79, +0x16e40, 0x16e7f, +0x16f00, 0x16f4a, +0x16f4f, 0x16f87, +0x16f8f, 0x16f9f, +0x16fe0, 0x16fe1, +0x16fe3, 0x16fe4, +0x16ff0, 0x16ff1, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1bc9d, 0x1bc9e, +0x1ccf0, 0x1ccf9, +0x1cf00, 0x1cf2d, +0x1cf30, 0x1cf46, +0x1d165, 0x1d169, +0x1d16d, 0x1d172, +0x1d17b, 0x1d182, +0x1d185, 0x1d18b, +0x1d1aa, 0x1d1ad, +0x1d242, 0x1d244, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d6c0, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6fa, +0x1d6fc, 0x1d714, +0x1d716, 0x1d734, +0x1d736, 0x1d74e, +0x1d750, 0x1d76e, +0x1d770, 0x1d788, +0x1d78a, 0x1d7a8, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7cb, +0x1d7ce, 0x1d7ff, +0x1da00, 0x1da36, +0x1da3b, 0x1da6c, +0x1da75, 0x1da75, +0x1da84, 0x1da84, +0x1da9b, 0x1da9f, +0x1daa1, 0x1daaf, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e030, 0x1e06d, +0x1e08f, 0x1e08f, +0x1e100, 0x1e12c, +0x1e130, 0x1e13d, +0x1e140, 0x1e149, +0x1e14e, 0x1e14e, +0x1e290, 0x1e2ae, +0x1e2c0, 0x1e2f9, +0x1e4d0, 0x1e4f9, +0x1e5d0, 0x1e5fa, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e8d0, 0x1e8d6, +0x1e900, 0x1e94b, +0x1e950, 0x1e959, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x1f130, 0x1f149, +0x1f150, 0x1f169, +0x1f170, 0x1f189, +0x1fbf0, 0x1fbf9, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +0xe0100, 0xe01ef, +}; /* END of CR_Word */ + +/* PROPERTY: 'Alnum': POSIX [[:Alnum:]] */ +static const OnigCodePoint +CR_Alnum[] = { 802, +0x0030, 0x0039, +0x0041, 0x005a, +0x0061, 0x007a, +0x00aa, 0x00aa, +0x00b5, 0x00b5, +0x00ba, 0x00ba, +0x00c0, 0x00d6, +0x00d8, 0x00f6, +0x00f8, 0x02c1, +0x02c6, 0x02d1, +0x02e0, 0x02e4, +0x02ec, 0x02ec, +0x02ee, 0x02ee, +0x0345, 0x0345, +0x0363, 0x0374, +0x0376, 0x0377, +0x037a, 0x037d, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x03f5, +0x03f7, 0x0481, +0x048a, 0x052f, +0x0531, 0x0556, +0x0559, 0x0559, +0x0560, 0x0588, +0x05b0, 0x05bd, +0x05bf, 0x05bf, +0x05c1, 0x05c2, +0x05c4, 0x05c5, +0x05c7, 0x05c7, +0x05d0, 0x05ea, +0x05ef, 0x05f2, +0x0610, 0x061a, +0x0620, 0x0657, +0x0659, 0x0669, +0x066e, 0x06d3, +0x06d5, 0x06dc, +0x06e1, 0x06e8, +0x06ed, 0x06fc, +0x06ff, 0x06ff, +0x0710, 0x073f, +0x074d, 0x07b1, +0x07c0, 0x07ea, +0x07f4, 0x07f5, +0x07fa, 0x07fa, +0x0800, 0x0817, +0x081a, 0x082c, +0x0840, 0x0858, +0x0860, 0x086a, +0x0870, 0x0887, +0x0889, 0x088e, +0x0897, 0x0897, +0x08a0, 0x08c9, +0x08d4, 0x08df, +0x08e3, 0x08e9, +0x08f0, 0x093b, +0x093d, 0x094c, +0x094e, 0x0950, +0x0955, 0x0963, +0x0966, 0x096f, +0x0971, 0x0983, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bd, 0x09c4, +0x09c7, 0x09c8, +0x09cb, 0x09cc, +0x09ce, 0x09ce, +0x09d7, 0x09d7, +0x09dc, 0x09dd, +0x09df, 0x09e3, +0x09e6, 0x09f1, +0x09fc, 0x09fc, +0x0a01, 0x0a03, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a3e, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4c, +0x0a51, 0x0a51, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a66, 0x0a75, +0x0a81, 0x0a83, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abd, 0x0ac5, +0x0ac7, 0x0ac9, +0x0acb, 0x0acc, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae3, +0x0ae6, 0x0aef, +0x0af9, 0x0afc, +0x0b01, 0x0b03, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3d, 0x0b44, +0x0b47, 0x0b48, +0x0b4b, 0x0b4c, +0x0b56, 0x0b57, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b63, +0x0b66, 0x0b6f, +0x0b71, 0x0b71, +0x0b82, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bbe, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcc, +0x0bd0, 0x0bd0, +0x0bd7, 0x0bd7, +0x0be6, 0x0bef, +0x0c00, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3d, 0x0c44, +0x0c46, 0x0c48, +0x0c4a, 0x0c4c, +0x0c55, 0x0c56, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c63, +0x0c66, 0x0c6f, +0x0c80, 0x0c83, +0x0c85, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbd, 0x0cc4, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccc, +0x0cd5, 0x0cd6, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce3, +0x0ce6, 0x0cef, +0x0cf1, 0x0cf3, +0x0d00, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d3a, +0x0d3d, 0x0d44, +0x0d46, 0x0d48, +0x0d4a, 0x0d4c, +0x0d4e, 0x0d4e, +0x0d54, 0x0d57, +0x0d5f, 0x0d63, +0x0d66, 0x0d6f, +0x0d7a, 0x0d7f, +0x0d81, 0x0d83, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0dcf, 0x0dd4, +0x0dd6, 0x0dd6, +0x0dd8, 0x0ddf, +0x0de6, 0x0def, +0x0df2, 0x0df3, +0x0e01, 0x0e3a, +0x0e40, 0x0e46, +0x0e4d, 0x0e4d, +0x0e50, 0x0e59, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0eb9, +0x0ebb, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0ecd, 0x0ecd, +0x0ed0, 0x0ed9, +0x0edc, 0x0edf, +0x0f00, 0x0f00, +0x0f20, 0x0f29, +0x0f40, 0x0f47, +0x0f49, 0x0f6c, +0x0f71, 0x0f83, +0x0f88, 0x0f97, +0x0f99, 0x0fbc, +0x1000, 0x1036, +0x1038, 0x1038, +0x103b, 0x1049, +0x1050, 0x109d, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x10fa, +0x10fc, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x1380, 0x138f, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1401, 0x166c, +0x166f, 0x167f, +0x1681, 0x169a, +0x16a0, 0x16ea, +0x16ee, 0x16f8, +0x1700, 0x1713, +0x171f, 0x1733, +0x1740, 0x1753, +0x1760, 0x176c, +0x176e, 0x1770, +0x1772, 0x1773, +0x1780, 0x17b3, +0x17b6, 0x17c8, +0x17d7, 0x17d7, +0x17dc, 0x17dc, +0x17e0, 0x17e9, +0x1810, 0x1819, +0x1820, 0x1878, +0x1880, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1920, 0x192b, +0x1930, 0x1938, +0x1946, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x19d0, 0x19d9, +0x1a00, 0x1a1b, +0x1a20, 0x1a5e, +0x1a61, 0x1a74, +0x1a80, 0x1a89, +0x1a90, 0x1a99, +0x1aa7, 0x1aa7, +0x1abf, 0x1ac0, +0x1acc, 0x1ace, +0x1b00, 0x1b33, +0x1b35, 0x1b43, +0x1b45, 0x1b4c, +0x1b50, 0x1b59, +0x1b80, 0x1ba9, +0x1bac, 0x1be5, +0x1be7, 0x1bf1, +0x1c00, 0x1c36, +0x1c40, 0x1c49, +0x1c4d, 0x1c7d, +0x1c80, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1ce9, 0x1cec, +0x1cee, 0x1cf3, +0x1cf5, 0x1cf6, +0x1cfa, 0x1cfa, +0x1d00, 0x1dbf, +0x1dd3, 0x1df4, +0x1e00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fbc, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fcc, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fe0, 0x1fec, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffc, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x2102, 0x2102, +0x2107, 0x2107, +0x210a, 0x2113, +0x2115, 0x2115, +0x2119, 0x211d, +0x2124, 0x2124, +0x2126, 0x2126, +0x2128, 0x2128, +0x212a, 0x212d, +0x212f, 0x2139, +0x213c, 0x213f, +0x2145, 0x2149, +0x214e, 0x214e, +0x2160, 0x2188, +0x24b6, 0x24e9, +0x2c00, 0x2ce4, +0x2ceb, 0x2cee, +0x2cf2, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d6f, +0x2d80, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x2de0, 0x2dff, +0x2e2f, 0x2e2f, +0x3005, 0x3007, +0x3021, 0x3029, +0x3031, 0x3035, +0x3038, 0x303c, +0x3041, 0x3096, +0x309d, 0x309f, +0x30a1, 0x30fa, +0x30fc, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x31a0, 0x31bf, +0x31f0, 0x31ff, +0x3400, 0x4dbf, +0x4e00, 0xa48c, +0xa4d0, 0xa4fd, +0xa500, 0xa60c, +0xa610, 0xa62b, +0xa640, 0xa66e, +0xa674, 0xa67b, +0xa67f, 0xa6ef, +0xa717, 0xa71f, +0xa722, 0xa788, +0xa78b, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa805, +0xa807, 0xa827, +0xa840, 0xa873, +0xa880, 0xa8c3, +0xa8c5, 0xa8c5, +0xa8d0, 0xa8d9, +0xa8f2, 0xa8f7, +0xa8fb, 0xa8fb, +0xa8fd, 0xa92a, +0xa930, 0xa952, +0xa960, 0xa97c, +0xa980, 0xa9b2, +0xa9b4, 0xa9bf, +0xa9cf, 0xa9d9, +0xa9e0, 0xa9fe, +0xaa00, 0xaa36, +0xaa40, 0xaa4d, +0xaa50, 0xaa59, +0xaa60, 0xaa76, +0xaa7a, 0xaabe, +0xaac0, 0xaac0, +0xaac2, 0xaac2, +0xaadb, 0xaadd, +0xaae0, 0xaaef, +0xaaf2, 0xaaf5, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab5a, +0xab5c, 0xab69, +0xab70, 0xabea, +0xabf0, 0xabf9, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xf900, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb28, +0xfb2a, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbb1, +0xfbd3, 0xfd3d, +0xfd50, 0xfd8f, +0xfd92, 0xfdc7, +0xfdf0, 0xfdfb, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0xff10, 0xff19, +0xff21, 0xff3a, +0xff41, 0xff5a, +0xff66, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10140, 0x10174, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x10300, 0x1031f, +0x1032d, 0x1034a, +0x10350, 0x1037a, +0x10380, 0x1039d, +0x103a0, 0x103c3, +0x103c8, 0x103cf, +0x103d1, 0x103d5, +0x10400, 0x1049d, +0x104a0, 0x104a9, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10860, 0x10876, +0x10880, 0x1089e, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x10900, 0x10915, +0x10920, 0x10939, +0x10980, 0x109b7, +0x109be, 0x109bf, +0x10a00, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a60, 0x10a7c, +0x10a80, 0x10a9c, +0x10ac0, 0x10ac7, +0x10ac9, 0x10ae4, +0x10b00, 0x10b35, +0x10b40, 0x10b55, +0x10b60, 0x10b72, +0x10b80, 0x10b91, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10d00, 0x10d27, +0x10d30, 0x10d39, +0x10d40, 0x10d65, +0x10d69, 0x10d69, +0x10d6f, 0x10d85, +0x10e80, 0x10ea9, +0x10eab, 0x10eac, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10efc, 0x10efc, +0x10f00, 0x10f1c, +0x10f27, 0x10f27, +0x10f30, 0x10f45, +0x10f70, 0x10f81, +0x10fb0, 0x10fc4, +0x10fe0, 0x10ff6, +0x11000, 0x11045, +0x11066, 0x1106f, +0x11071, 0x11075, +0x11080, 0x110b8, +0x110c2, 0x110c2, +0x110d0, 0x110e8, +0x110f0, 0x110f9, +0x11100, 0x11132, +0x11136, 0x1113f, +0x11144, 0x11147, +0x11150, 0x11172, +0x11176, 0x11176, +0x11180, 0x111bf, +0x111c1, 0x111c4, +0x111ce, 0x111da, +0x111dc, 0x111dc, +0x11200, 0x11211, +0x11213, 0x11234, +0x11237, 0x11237, +0x1123e, 0x11241, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a8, +0x112b0, 0x112e8, +0x112f0, 0x112f9, +0x11300, 0x11303, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133d, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134c, +0x11350, 0x11350, +0x11357, 0x11357, +0x1135d, 0x11363, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113cd, +0x113d1, 0x113d1, +0x113d3, 0x113d3, +0x11400, 0x11441, +0x11443, 0x11445, +0x11447, 0x1144a, +0x11450, 0x11459, +0x1145f, 0x11461, +0x11480, 0x114c1, +0x114c4, 0x114c5, +0x114c7, 0x114c7, +0x114d0, 0x114d9, +0x11580, 0x115b5, +0x115b8, 0x115be, +0x115d8, 0x115dd, +0x11600, 0x1163e, +0x11640, 0x11640, +0x11644, 0x11644, +0x11650, 0x11659, +0x11680, 0x116b5, +0x116b8, 0x116b8, +0x116c0, 0x116c9, +0x116d0, 0x116e3, +0x11700, 0x1171a, +0x1171d, 0x1172a, +0x11730, 0x11739, +0x11740, 0x11746, +0x11800, 0x11838, +0x118a0, 0x118e9, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x11935, +0x11937, 0x11938, +0x1193b, 0x1193c, +0x1193f, 0x11942, +0x11950, 0x11959, +0x119a0, 0x119a7, +0x119aa, 0x119d7, +0x119da, 0x119df, +0x119e1, 0x119e1, +0x119e3, 0x119e4, +0x11a00, 0x11a32, +0x11a35, 0x11a3e, +0x11a50, 0x11a97, +0x11a9d, 0x11a9d, +0x11ab0, 0x11af8, +0x11bc0, 0x11be0, +0x11bf0, 0x11bf9, +0x11c00, 0x11c08, +0x11c0a, 0x11c36, +0x11c38, 0x11c3e, +0x11c40, 0x11c40, +0x11c50, 0x11c59, +0x11c72, 0x11c8f, +0x11c92, 0x11ca7, +0x11ca9, 0x11cb6, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d41, +0x11d43, 0x11d43, +0x11d46, 0x11d47, +0x11d50, 0x11d59, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d8e, +0x11d90, 0x11d91, +0x11d93, 0x11d96, +0x11d98, 0x11d98, +0x11da0, 0x11da9, +0x11ee0, 0x11ef6, +0x11f00, 0x11f10, +0x11f12, 0x11f3a, +0x11f3e, 0x11f40, +0x11f50, 0x11f59, +0x11fb0, 0x11fb0, +0x12000, 0x12399, +0x12400, 0x1246e, +0x12480, 0x12543, +0x12f90, 0x12ff0, +0x13000, 0x1342f, +0x13441, 0x13446, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x1612e, +0x16130, 0x16139, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a60, 0x16a69, +0x16a70, 0x16abe, +0x16ac0, 0x16ac9, +0x16ad0, 0x16aed, +0x16b00, 0x16b2f, +0x16b40, 0x16b43, +0x16b50, 0x16b59, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d6c, +0x16d70, 0x16d79, +0x16e40, 0x16e7f, +0x16f00, 0x16f4a, +0x16f4f, 0x16f87, +0x16f8f, 0x16f9f, +0x16fe0, 0x16fe1, +0x16fe3, 0x16fe3, +0x16ff0, 0x16ff1, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1bc9e, 0x1bc9e, +0x1ccf0, 0x1ccf9, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d6c0, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6fa, +0x1d6fc, 0x1d714, +0x1d716, 0x1d734, +0x1d736, 0x1d74e, +0x1d750, 0x1d76e, +0x1d770, 0x1d788, +0x1d78a, 0x1d7a8, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7cb, +0x1d7ce, 0x1d7ff, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e030, 0x1e06d, +0x1e08f, 0x1e08f, +0x1e100, 0x1e12c, +0x1e137, 0x1e13d, +0x1e140, 0x1e149, +0x1e14e, 0x1e14e, +0x1e290, 0x1e2ad, +0x1e2c0, 0x1e2eb, +0x1e2f0, 0x1e2f9, +0x1e4d0, 0x1e4eb, +0x1e4f0, 0x1e4f9, +0x1e5d0, 0x1e5ed, +0x1e5f0, 0x1e5fa, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e900, 0x1e943, +0x1e947, 0x1e947, +0x1e94b, 0x1e94b, +0x1e950, 0x1e959, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x1f130, 0x1f149, +0x1f150, 0x1f169, +0x1f170, 0x1f189, +0x1fbf0, 0x1fbf9, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +}; /* END of CR_Alnum */ + +/* PROPERTY: 'ASCII': POSIX [[:ASCII:]] */ +static const OnigCodePoint +CR_ASCII[] = { 1, +0x0000, 0x007f, +}; /* END of CR_ASCII */ + + +/* PROPERTY: 'ASCII_Hex_Digit': Binary Property */ +#define CR_ASCII_Hex_Digit CR_XDigit + +/* PROPERTY: 'Adlam': Script */ +static const OnigCodePoint +CR_Adlam[] = { 3, +0x1e900, 0x1e94b, +0x1e950, 0x1e959, +0x1e95e, 0x1e95f, +}; /* END of CR_Adlam */ + +/* PROPERTY: 'Ahom': Script */ +static const OnigCodePoint +CR_Ahom[] = { 3, +0x11700, 0x1171a, +0x1171d, 0x1172b, +0x11730, 0x11746, +}; /* END of CR_Ahom */ + +/* PROPERTY: 'Alphabetic': Derived Property */ +#define CR_Alphabetic CR_Alpha + +/* PROPERTY: 'Anatolian_Hieroglyphs': Script */ +static const OnigCodePoint +CR_Anatolian_Hieroglyphs[] = { 1, +0x14400, 0x14646, +}; /* END of CR_Anatolian_Hieroglyphs */ + +/* PROPERTY: 'Any': - */ +static const OnigCodePoint +CR_Any[] = { 1, +0x0000, 0x10ffff, +}; /* END of CR_Any */ + +/* PROPERTY: 'Arabic': Script */ +static const OnigCodePoint +CR_Arabic[] = { 59, +0x0600, 0x0604, +0x0606, 0x060b, +0x060d, 0x061a, +0x061c, 0x061e, +0x0620, 0x063f, +0x0641, 0x064a, +0x0656, 0x066f, +0x0671, 0x06dc, +0x06de, 0x06ff, +0x0750, 0x077f, +0x0870, 0x088e, +0x0890, 0x0891, +0x0897, 0x08e1, +0x08e3, 0x08ff, +0xfb50, 0xfbc2, +0xfbd3, 0xfd3d, +0xfd40, 0xfd8f, +0xfd92, 0xfdc7, +0xfdcf, 0xfdcf, +0xfdf0, 0xfdff, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0x10e60, 0x10e7e, +0x10ec2, 0x10ec4, +0x10efc, 0x10eff, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x1eef0, 0x1eef1, +}; /* END of CR_Arabic */ + +/* PROPERTY: 'Armenian': Script */ +static const OnigCodePoint +CR_Armenian[] = { 4, +0x0531, 0x0556, +0x0559, 0x058a, +0x058d, 0x058f, +0xfb13, 0xfb17, +}; /* END of CR_Armenian */ + +/* PROPERTY: 'Assigned': - */ +static const OnigCodePoint +CR_Assigned[] = { 731, +0x0000, 0x0377, +0x037a, 0x037f, +0x0384, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x052f, +0x0531, 0x0556, +0x0559, 0x058a, +0x058d, 0x058f, +0x0591, 0x05c7, +0x05d0, 0x05ea, +0x05ef, 0x05f4, +0x0600, 0x070d, +0x070f, 0x074a, +0x074d, 0x07b1, +0x07c0, 0x07fa, +0x07fd, 0x082d, +0x0830, 0x083e, +0x0840, 0x085b, +0x085e, 0x085e, +0x0860, 0x086a, +0x0870, 0x088e, +0x0890, 0x0891, +0x0897, 0x0983, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bc, 0x09c4, +0x09c7, 0x09c8, +0x09cb, 0x09ce, +0x09d7, 0x09d7, +0x09dc, 0x09dd, +0x09df, 0x09e3, +0x09e6, 0x09fe, +0x0a01, 0x0a03, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a3c, 0x0a3c, +0x0a3e, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4d, +0x0a51, 0x0a51, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a66, 0x0a76, +0x0a81, 0x0a83, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abc, 0x0ac5, +0x0ac7, 0x0ac9, +0x0acb, 0x0acd, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae3, +0x0ae6, 0x0af1, +0x0af9, 0x0aff, +0x0b01, 0x0b03, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3c, 0x0b44, +0x0b47, 0x0b48, +0x0b4b, 0x0b4d, +0x0b55, 0x0b57, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b63, +0x0b66, 0x0b77, +0x0b82, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bbe, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcd, +0x0bd0, 0x0bd0, +0x0bd7, 0x0bd7, +0x0be6, 0x0bfa, +0x0c00, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3c, 0x0c44, +0x0c46, 0x0c48, +0x0c4a, 0x0c4d, +0x0c55, 0x0c56, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c63, +0x0c66, 0x0c6f, +0x0c77, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbc, 0x0cc4, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccd, +0x0cd5, 0x0cd6, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce3, +0x0ce6, 0x0cef, +0x0cf1, 0x0cf3, +0x0d00, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d44, +0x0d46, 0x0d48, +0x0d4a, 0x0d4f, +0x0d54, 0x0d63, +0x0d66, 0x0d7f, +0x0d81, 0x0d83, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0dca, 0x0dca, +0x0dcf, 0x0dd4, +0x0dd6, 0x0dd6, +0x0dd8, 0x0ddf, +0x0de6, 0x0def, +0x0df2, 0x0df4, +0x0e01, 0x0e3a, +0x0e3f, 0x0e5b, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0ec8, 0x0ece, +0x0ed0, 0x0ed9, +0x0edc, 0x0edf, +0x0f00, 0x0f47, +0x0f49, 0x0f6c, +0x0f71, 0x0f97, +0x0f99, 0x0fbc, +0x0fbe, 0x0fcc, +0x0fce, 0x0fda, +0x1000, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x135d, 0x137c, +0x1380, 0x1399, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1400, 0x169c, +0x16a0, 0x16f8, +0x1700, 0x1715, +0x171f, 0x1736, +0x1740, 0x1753, +0x1760, 0x176c, +0x176e, 0x1770, +0x1772, 0x1773, +0x1780, 0x17dd, +0x17e0, 0x17e9, +0x17f0, 0x17f9, +0x1800, 0x1819, +0x1820, 0x1878, +0x1880, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1920, 0x192b, +0x1930, 0x193b, +0x1940, 0x1940, +0x1944, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x19d0, 0x19da, +0x19de, 0x1a1b, +0x1a1e, 0x1a5e, +0x1a60, 0x1a7c, +0x1a7f, 0x1a89, +0x1a90, 0x1a99, +0x1aa0, 0x1aad, +0x1ab0, 0x1ace, +0x1b00, 0x1b4c, +0x1b4e, 0x1bf3, +0x1bfc, 0x1c37, +0x1c3b, 0x1c49, +0x1c4d, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cc7, +0x1cd0, 0x1cfa, +0x1d00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fc4, +0x1fc6, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fdd, 0x1fef, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffe, +0x2000, 0x2064, +0x2066, 0x2071, +0x2074, 0x208e, +0x2090, 0x209c, +0x20a0, 0x20c0, +0x20d0, 0x20f0, +0x2100, 0x218b, +0x2190, 0x2429, +0x2440, 0x244a, +0x2460, 0x2b73, +0x2b76, 0x2b95, +0x2b97, 0x2cf3, +0x2cf9, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d70, +0x2d7f, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x2de0, 0x2e5d, +0x2e80, 0x2e99, +0x2e9b, 0x2ef3, +0x2f00, 0x2fd5, +0x2ff0, 0x303f, +0x3041, 0x3096, +0x3099, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x3190, 0x31e5, +0x31ef, 0x321e, +0x3220, 0xa48c, +0xa490, 0xa4c6, +0xa4d0, 0xa62b, +0xa640, 0xa6f7, +0xa700, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa82c, +0xa830, 0xa839, +0xa840, 0xa877, +0xa880, 0xa8c5, +0xa8ce, 0xa8d9, +0xa8e0, 0xa953, +0xa95f, 0xa97c, +0xa980, 0xa9cd, +0xa9cf, 0xa9d9, +0xa9de, 0xa9fe, +0xaa00, 0xaa36, +0xaa40, 0xaa4d, +0xaa50, 0xaa59, +0xaa5c, 0xaac2, +0xaadb, 0xaaf6, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab6b, +0xab70, 0xabed, +0xabf0, 0xabf9, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xd800, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbc2, +0xfbd3, 0xfd8f, +0xfd92, 0xfdc7, +0xfdcf, 0xfdcf, +0xfdf0, 0xfe19, +0xfe20, 0xfe52, +0xfe54, 0xfe66, +0xfe68, 0xfe6b, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0xfeff, 0xfeff, +0xff01, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0xffe0, 0xffe6, +0xffe8, 0xffee, +0xfff9, 0xfffd, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10100, 0x10102, +0x10107, 0x10133, +0x10137, 0x1018e, +0x10190, 0x1019c, +0x101a0, 0x101a0, +0x101d0, 0x101fd, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x102e0, 0x102fb, +0x10300, 0x10323, +0x1032d, 0x1034a, +0x10350, 0x1037a, +0x10380, 0x1039d, +0x1039f, 0x103c3, +0x103c8, 0x103d5, +0x10400, 0x1049d, +0x104a0, 0x104a9, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x1056f, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10857, 0x1089e, +0x108a7, 0x108af, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x108fb, 0x1091b, +0x1091f, 0x10939, +0x1093f, 0x1093f, +0x10980, 0x109b7, +0x109bc, 0x109cf, +0x109d2, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a38, 0x10a3a, +0x10a3f, 0x10a48, +0x10a50, 0x10a58, +0x10a60, 0x10a9f, +0x10ac0, 0x10ae6, +0x10aeb, 0x10af6, +0x10b00, 0x10b35, +0x10b39, 0x10b55, +0x10b58, 0x10b72, +0x10b78, 0x10b91, +0x10b99, 0x10b9c, +0x10ba9, 0x10baf, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10cfa, 0x10d27, +0x10d30, 0x10d39, +0x10d40, 0x10d65, +0x10d69, 0x10d85, +0x10d8e, 0x10d8f, +0x10e60, 0x10e7e, +0x10e80, 0x10ea9, +0x10eab, 0x10ead, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10efc, 0x10f27, +0x10f30, 0x10f59, +0x10f70, 0x10f89, +0x10fb0, 0x10fcb, +0x10fe0, 0x10ff6, +0x11000, 0x1104d, +0x11052, 0x11075, +0x1107f, 0x110c2, +0x110cd, 0x110cd, +0x110d0, 0x110e8, +0x110f0, 0x110f9, +0x11100, 0x11134, +0x11136, 0x11147, +0x11150, 0x11176, +0x11180, 0x111df, +0x111e1, 0x111f4, +0x11200, 0x11211, +0x11213, 0x11241, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a9, +0x112b0, 0x112ea, +0x112f0, 0x112f9, +0x11300, 0x11303, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133b, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134d, +0x11350, 0x11350, +0x11357, 0x11357, +0x1135d, 0x11363, +0x11366, 0x1136c, +0x11370, 0x11374, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113d5, +0x113d7, 0x113d8, +0x113e1, 0x113e2, +0x11400, 0x1145b, +0x1145d, 0x11461, +0x11480, 0x114c7, +0x114d0, 0x114d9, +0x11580, 0x115b5, +0x115b8, 0x115dd, +0x11600, 0x11644, +0x11650, 0x11659, +0x11660, 0x1166c, +0x11680, 0x116b9, +0x116c0, 0x116c9, +0x116d0, 0x116e3, +0x11700, 0x1171a, +0x1171d, 0x1172b, +0x11730, 0x11746, +0x11800, 0x1183b, +0x118a0, 0x118f2, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x11935, +0x11937, 0x11938, +0x1193b, 0x11946, +0x11950, 0x11959, +0x119a0, 0x119a7, +0x119aa, 0x119d7, +0x119da, 0x119e4, +0x11a00, 0x11a47, +0x11a50, 0x11aa2, +0x11ab0, 0x11af8, +0x11b00, 0x11b09, +0x11bc0, 0x11be1, +0x11bf0, 0x11bf9, +0x11c00, 0x11c08, +0x11c0a, 0x11c36, +0x11c38, 0x11c45, +0x11c50, 0x11c6c, +0x11c70, 0x11c8f, +0x11c92, 0x11ca7, +0x11ca9, 0x11cb6, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d47, +0x11d50, 0x11d59, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d8e, +0x11d90, 0x11d91, +0x11d93, 0x11d98, +0x11da0, 0x11da9, +0x11ee0, 0x11ef8, +0x11f00, 0x11f10, +0x11f12, 0x11f3a, +0x11f3e, 0x11f5a, +0x11fb0, 0x11fb0, +0x11fc0, 0x11ff1, +0x11fff, 0x12399, +0x12400, 0x1246e, +0x12470, 0x12474, +0x12480, 0x12543, +0x12f90, 0x12ff2, +0x13000, 0x13455, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x16139, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a60, 0x16a69, +0x16a6e, 0x16abe, +0x16ac0, 0x16ac9, +0x16ad0, 0x16aed, +0x16af0, 0x16af5, +0x16b00, 0x16b45, +0x16b50, 0x16b59, +0x16b5b, 0x16b61, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d79, +0x16e40, 0x16e9a, +0x16f00, 0x16f4a, +0x16f4f, 0x16f87, +0x16f8f, 0x16f9f, +0x16fe0, 0x16fe4, +0x16ff0, 0x16ff1, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1bc9c, 0x1bca3, +0x1cc00, 0x1ccf9, +0x1cd00, 0x1ceb3, +0x1cf00, 0x1cf2d, +0x1cf30, 0x1cf46, +0x1cf50, 0x1cfc3, +0x1d000, 0x1d0f5, +0x1d100, 0x1d126, +0x1d129, 0x1d1ea, +0x1d200, 0x1d245, +0x1d2c0, 0x1d2d3, +0x1d2e0, 0x1d2f3, +0x1d300, 0x1d356, +0x1d360, 0x1d378, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d7cb, +0x1d7ce, 0x1da8b, +0x1da9b, 0x1da9f, +0x1daa1, 0x1daaf, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e030, 0x1e06d, +0x1e08f, 0x1e08f, +0x1e100, 0x1e12c, +0x1e130, 0x1e13d, +0x1e140, 0x1e149, +0x1e14e, 0x1e14f, +0x1e290, 0x1e2ae, +0x1e2c0, 0x1e2f9, +0x1e2ff, 0x1e2ff, +0x1e4d0, 0x1e4f9, +0x1e5d0, 0x1e5fa, +0x1e5ff, 0x1e5ff, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e8c7, 0x1e8d6, +0x1e900, 0x1e94b, +0x1e950, 0x1e959, +0x1e95e, 0x1e95f, +0x1ec71, 0x1ecb4, +0x1ed01, 0x1ed3d, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x1eef0, 0x1eef1, +0x1f000, 0x1f02b, +0x1f030, 0x1f093, +0x1f0a0, 0x1f0ae, +0x1f0b1, 0x1f0bf, +0x1f0c1, 0x1f0cf, +0x1f0d1, 0x1f0f5, +0x1f100, 0x1f1ad, +0x1f1e6, 0x1f202, +0x1f210, 0x1f23b, +0x1f240, 0x1f248, +0x1f250, 0x1f251, +0x1f260, 0x1f265, +0x1f300, 0x1f6d7, +0x1f6dc, 0x1f6ec, +0x1f6f0, 0x1f6fc, +0x1f700, 0x1f776, +0x1f77b, 0x1f7d9, +0x1f7e0, 0x1f7eb, +0x1f7f0, 0x1f7f0, +0x1f800, 0x1f80b, +0x1f810, 0x1f847, +0x1f850, 0x1f859, +0x1f860, 0x1f887, +0x1f890, 0x1f8ad, +0x1f8b0, 0x1f8bb, +0x1f8c0, 0x1f8c1, +0x1f900, 0x1fa53, +0x1fa60, 0x1fa6d, +0x1fa70, 0x1fa7c, +0x1fa80, 0x1fa89, +0x1fa8f, 0x1fac6, +0x1face, 0x1fadc, +0x1fadf, 0x1fae9, +0x1faf0, 0x1faf8, +0x1fb00, 0x1fb92, +0x1fb94, 0x1fbf9, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +0xe0001, 0xe0001, +0xe0020, 0xe007f, +0xe0100, 0xe01ef, +0xf0000, 0xffffd, +0x100000, 0x10fffd, +}; /* END of CR_Assigned */ + +/* PROPERTY: 'Avestan': Script */ +static const OnigCodePoint +CR_Avestan[] = { 2, +0x10b00, 0x10b35, +0x10b39, 0x10b3f, +}; /* END of CR_Avestan */ + +/* PROPERTY: 'Balinese': Script */ +static const OnigCodePoint +CR_Balinese[] = { 2, +0x1b00, 0x1b4c, +0x1b4e, 0x1b7f, +}; /* END of CR_Balinese */ + +/* PROPERTY: 'Bamum': Script */ +static const OnigCodePoint +CR_Bamum[] = { 2, +0xa6a0, 0xa6f7, +0x16800, 0x16a38, +}; /* END of CR_Bamum */ + +/* PROPERTY: 'Bassa_Vah': Script */ +static const OnigCodePoint +CR_Bassa_Vah[] = { 2, +0x16ad0, 0x16aed, +0x16af0, 0x16af5, +}; /* END of CR_Bassa_Vah */ + +/* PROPERTY: 'Batak': Script */ +static const OnigCodePoint +CR_Batak[] = { 2, +0x1bc0, 0x1bf3, +0x1bfc, 0x1bff, +}; /* END of CR_Batak */ + +/* PROPERTY: 'Bengali': Script */ +static const OnigCodePoint +CR_Bengali[] = { 14, +0x0980, 0x0983, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bc, 0x09c4, +0x09c7, 0x09c8, +0x09cb, 0x09ce, +0x09d7, 0x09d7, +0x09dc, 0x09dd, +0x09df, 0x09e3, +0x09e6, 0x09fe, +}; /* END of CR_Bengali */ + +/* PROPERTY: 'Bhaiksuki': Script */ +static const OnigCodePoint +CR_Bhaiksuki[] = { 4, +0x11c00, 0x11c08, +0x11c0a, 0x11c36, +0x11c38, 0x11c45, +0x11c50, 0x11c6c, +}; /* END of CR_Bhaiksuki */ + +/* PROPERTY: 'Bidi_Control': Binary Property */ +static const OnigCodePoint +CR_Bidi_Control[] = { 4, +0x061c, 0x061c, +0x200e, 0x200f, +0x202a, 0x202e, +0x2066, 0x2069, +}; /* END of CR_Bidi_Control */ + +/* PROPERTY: 'Bopomofo': Script */ +static const OnigCodePoint +CR_Bopomofo[] = { 3, +0x02ea, 0x02eb, +0x3105, 0x312f, +0x31a0, 0x31bf, +}; /* END of CR_Bopomofo */ + +/* PROPERTY: 'Brahmi': Script */ +static const OnigCodePoint +CR_Brahmi[] = { 3, +0x11000, 0x1104d, +0x11052, 0x11075, +0x1107f, 0x1107f, +}; /* END of CR_Brahmi */ + +/* PROPERTY: 'Braille': Script */ +static const OnigCodePoint +CR_Braille[] = { 1, +0x2800, 0x28ff, +}; /* END of CR_Braille */ + +/* PROPERTY: 'Buginese': Script */ +static const OnigCodePoint +CR_Buginese[] = { 2, +0x1a00, 0x1a1b, +0x1a1e, 0x1a1f, +}; /* END of CR_Buginese */ + +/* PROPERTY: 'Buhid': Script */ +static const OnigCodePoint +CR_Buhid[] = { 1, +0x1740, 0x1753, +}; /* END of CR_Buhid */ + +/* PROPERTY: 'C': Major Category */ +static const OnigCodePoint +CR_C[] = { 736, +0x0000, 0x001f, +0x007f, 0x009f, +0x00ad, 0x00ad, +0x0378, 0x0379, +0x0380, 0x0383, +0x038b, 0x038b, +0x038d, 0x038d, +0x03a2, 0x03a2, +0x0530, 0x0530, +0x0557, 0x0558, +0x058b, 0x058c, +0x0590, 0x0590, +0x05c8, 0x05cf, +0x05eb, 0x05ee, +0x05f5, 0x0605, +0x061c, 0x061c, +0x06dd, 0x06dd, +0x070e, 0x070f, +0x074b, 0x074c, +0x07b2, 0x07bf, +0x07fb, 0x07fc, +0x082e, 0x082f, +0x083f, 0x083f, +0x085c, 0x085d, +0x085f, 0x085f, +0x086b, 0x086f, +0x088f, 0x0896, +0x08e2, 0x08e2, +0x0984, 0x0984, +0x098d, 0x098e, +0x0991, 0x0992, +0x09a9, 0x09a9, +0x09b1, 0x09b1, +0x09b3, 0x09b5, +0x09ba, 0x09bb, +0x09c5, 0x09c6, +0x09c9, 0x09ca, +0x09cf, 0x09d6, +0x09d8, 0x09db, +0x09de, 0x09de, +0x09e4, 0x09e5, +0x09ff, 0x0a00, +0x0a04, 0x0a04, +0x0a0b, 0x0a0e, +0x0a11, 0x0a12, +0x0a29, 0x0a29, +0x0a31, 0x0a31, +0x0a34, 0x0a34, +0x0a37, 0x0a37, +0x0a3a, 0x0a3b, +0x0a3d, 0x0a3d, +0x0a43, 0x0a46, +0x0a49, 0x0a4a, +0x0a4e, 0x0a50, +0x0a52, 0x0a58, +0x0a5d, 0x0a5d, +0x0a5f, 0x0a65, +0x0a77, 0x0a80, +0x0a84, 0x0a84, +0x0a8e, 0x0a8e, +0x0a92, 0x0a92, +0x0aa9, 0x0aa9, +0x0ab1, 0x0ab1, +0x0ab4, 0x0ab4, +0x0aba, 0x0abb, +0x0ac6, 0x0ac6, +0x0aca, 0x0aca, +0x0ace, 0x0acf, +0x0ad1, 0x0adf, +0x0ae4, 0x0ae5, +0x0af2, 0x0af8, +0x0b00, 0x0b00, +0x0b04, 0x0b04, +0x0b0d, 0x0b0e, +0x0b11, 0x0b12, +0x0b29, 0x0b29, +0x0b31, 0x0b31, +0x0b34, 0x0b34, +0x0b3a, 0x0b3b, +0x0b45, 0x0b46, +0x0b49, 0x0b4a, +0x0b4e, 0x0b54, +0x0b58, 0x0b5b, +0x0b5e, 0x0b5e, +0x0b64, 0x0b65, +0x0b78, 0x0b81, +0x0b84, 0x0b84, +0x0b8b, 0x0b8d, +0x0b91, 0x0b91, +0x0b96, 0x0b98, +0x0b9b, 0x0b9b, +0x0b9d, 0x0b9d, +0x0ba0, 0x0ba2, +0x0ba5, 0x0ba7, +0x0bab, 0x0bad, +0x0bba, 0x0bbd, +0x0bc3, 0x0bc5, +0x0bc9, 0x0bc9, +0x0bce, 0x0bcf, +0x0bd1, 0x0bd6, +0x0bd8, 0x0be5, +0x0bfb, 0x0bff, +0x0c0d, 0x0c0d, +0x0c11, 0x0c11, +0x0c29, 0x0c29, +0x0c3a, 0x0c3b, +0x0c45, 0x0c45, +0x0c49, 0x0c49, +0x0c4e, 0x0c54, +0x0c57, 0x0c57, +0x0c5b, 0x0c5c, +0x0c5e, 0x0c5f, +0x0c64, 0x0c65, +0x0c70, 0x0c76, +0x0c8d, 0x0c8d, +0x0c91, 0x0c91, +0x0ca9, 0x0ca9, +0x0cb4, 0x0cb4, +0x0cba, 0x0cbb, +0x0cc5, 0x0cc5, +0x0cc9, 0x0cc9, +0x0cce, 0x0cd4, +0x0cd7, 0x0cdc, +0x0cdf, 0x0cdf, +0x0ce4, 0x0ce5, +0x0cf0, 0x0cf0, +0x0cf4, 0x0cff, +0x0d0d, 0x0d0d, +0x0d11, 0x0d11, +0x0d45, 0x0d45, +0x0d49, 0x0d49, +0x0d50, 0x0d53, +0x0d64, 0x0d65, +0x0d80, 0x0d80, +0x0d84, 0x0d84, +0x0d97, 0x0d99, +0x0db2, 0x0db2, +0x0dbc, 0x0dbc, +0x0dbe, 0x0dbf, +0x0dc7, 0x0dc9, +0x0dcb, 0x0dce, +0x0dd5, 0x0dd5, +0x0dd7, 0x0dd7, +0x0de0, 0x0de5, +0x0df0, 0x0df1, +0x0df5, 0x0e00, +0x0e3b, 0x0e3e, +0x0e5c, 0x0e80, +0x0e83, 0x0e83, +0x0e85, 0x0e85, +0x0e8b, 0x0e8b, +0x0ea4, 0x0ea4, +0x0ea6, 0x0ea6, +0x0ebe, 0x0ebf, +0x0ec5, 0x0ec5, +0x0ec7, 0x0ec7, +0x0ecf, 0x0ecf, +0x0eda, 0x0edb, +0x0ee0, 0x0eff, +0x0f48, 0x0f48, +0x0f6d, 0x0f70, +0x0f98, 0x0f98, +0x0fbd, 0x0fbd, +0x0fcd, 0x0fcd, +0x0fdb, 0x0fff, +0x10c6, 0x10c6, +0x10c8, 0x10cc, +0x10ce, 0x10cf, +0x1249, 0x1249, +0x124e, 0x124f, +0x1257, 0x1257, +0x1259, 0x1259, +0x125e, 0x125f, +0x1289, 0x1289, +0x128e, 0x128f, +0x12b1, 0x12b1, +0x12b6, 0x12b7, +0x12bf, 0x12bf, +0x12c1, 0x12c1, +0x12c6, 0x12c7, +0x12d7, 0x12d7, +0x1311, 0x1311, +0x1316, 0x1317, +0x135b, 0x135c, +0x137d, 0x137f, +0x139a, 0x139f, +0x13f6, 0x13f7, +0x13fe, 0x13ff, +0x169d, 0x169f, +0x16f9, 0x16ff, +0x1716, 0x171e, +0x1737, 0x173f, +0x1754, 0x175f, +0x176d, 0x176d, +0x1771, 0x1771, +0x1774, 0x177f, +0x17de, 0x17df, +0x17ea, 0x17ef, +0x17fa, 0x17ff, +0x180e, 0x180e, +0x181a, 0x181f, +0x1879, 0x187f, +0x18ab, 0x18af, +0x18f6, 0x18ff, +0x191f, 0x191f, +0x192c, 0x192f, +0x193c, 0x193f, +0x1941, 0x1943, +0x196e, 0x196f, +0x1975, 0x197f, +0x19ac, 0x19af, +0x19ca, 0x19cf, +0x19db, 0x19dd, +0x1a1c, 0x1a1d, +0x1a5f, 0x1a5f, +0x1a7d, 0x1a7e, +0x1a8a, 0x1a8f, +0x1a9a, 0x1a9f, +0x1aae, 0x1aaf, +0x1acf, 0x1aff, +0x1b4d, 0x1b4d, +0x1bf4, 0x1bfb, +0x1c38, 0x1c3a, +0x1c4a, 0x1c4c, +0x1c8b, 0x1c8f, +0x1cbb, 0x1cbc, +0x1cc8, 0x1ccf, +0x1cfb, 0x1cff, +0x1f16, 0x1f17, +0x1f1e, 0x1f1f, +0x1f46, 0x1f47, +0x1f4e, 0x1f4f, +0x1f58, 0x1f58, +0x1f5a, 0x1f5a, +0x1f5c, 0x1f5c, +0x1f5e, 0x1f5e, +0x1f7e, 0x1f7f, +0x1fb5, 0x1fb5, +0x1fc5, 0x1fc5, +0x1fd4, 0x1fd5, +0x1fdc, 0x1fdc, +0x1ff0, 0x1ff1, +0x1ff5, 0x1ff5, +0x1fff, 0x1fff, +0x200b, 0x200f, +0x202a, 0x202e, +0x2060, 0x206f, +0x2072, 0x2073, +0x208f, 0x208f, +0x209d, 0x209f, +0x20c1, 0x20cf, +0x20f1, 0x20ff, +0x218c, 0x218f, +0x242a, 0x243f, +0x244b, 0x245f, +0x2b74, 0x2b75, +0x2b96, 0x2b96, +0x2cf4, 0x2cf8, +0x2d26, 0x2d26, +0x2d28, 0x2d2c, +0x2d2e, 0x2d2f, +0x2d68, 0x2d6e, +0x2d71, 0x2d7e, +0x2d97, 0x2d9f, +0x2da7, 0x2da7, +0x2daf, 0x2daf, +0x2db7, 0x2db7, +0x2dbf, 0x2dbf, +0x2dc7, 0x2dc7, +0x2dcf, 0x2dcf, +0x2dd7, 0x2dd7, +0x2ddf, 0x2ddf, +0x2e5e, 0x2e7f, +0x2e9a, 0x2e9a, +0x2ef4, 0x2eff, +0x2fd6, 0x2fef, +0x3040, 0x3040, +0x3097, 0x3098, +0x3100, 0x3104, +0x3130, 0x3130, +0x318f, 0x318f, +0x31e6, 0x31ee, +0x321f, 0x321f, +0xa48d, 0xa48f, +0xa4c7, 0xa4cf, +0xa62c, 0xa63f, +0xa6f8, 0xa6ff, +0xa7ce, 0xa7cf, +0xa7d2, 0xa7d2, +0xa7d4, 0xa7d4, +0xa7dd, 0xa7f1, +0xa82d, 0xa82f, +0xa83a, 0xa83f, +0xa878, 0xa87f, +0xa8c6, 0xa8cd, +0xa8da, 0xa8df, +0xa954, 0xa95e, +0xa97d, 0xa97f, +0xa9ce, 0xa9ce, +0xa9da, 0xa9dd, +0xa9ff, 0xa9ff, +0xaa37, 0xaa3f, +0xaa4e, 0xaa4f, +0xaa5a, 0xaa5b, +0xaac3, 0xaada, +0xaaf7, 0xab00, +0xab07, 0xab08, +0xab0f, 0xab10, +0xab17, 0xab1f, +0xab27, 0xab27, +0xab2f, 0xab2f, +0xab6c, 0xab6f, +0xabee, 0xabef, +0xabfa, 0xabff, +0xd7a4, 0xd7af, +0xd7c7, 0xd7ca, +0xd7fc, 0xf8ff, +0xfa6e, 0xfa6f, +0xfada, 0xfaff, +0xfb07, 0xfb12, +0xfb18, 0xfb1c, +0xfb37, 0xfb37, +0xfb3d, 0xfb3d, +0xfb3f, 0xfb3f, +0xfb42, 0xfb42, +0xfb45, 0xfb45, +0xfbc3, 0xfbd2, +0xfd90, 0xfd91, +0xfdc8, 0xfdce, +0xfdd0, 0xfdef, +0xfe1a, 0xfe1f, +0xfe53, 0xfe53, +0xfe67, 0xfe67, +0xfe6c, 0xfe6f, +0xfe75, 0xfe75, +0xfefd, 0xff00, +0xffbf, 0xffc1, +0xffc8, 0xffc9, +0xffd0, 0xffd1, +0xffd8, 0xffd9, +0xffdd, 0xffdf, +0xffe7, 0xffe7, +0xffef, 0xfffb, +0xfffe, 0xffff, +0x1000c, 0x1000c, +0x10027, 0x10027, +0x1003b, 0x1003b, +0x1003e, 0x1003e, +0x1004e, 0x1004f, +0x1005e, 0x1007f, +0x100fb, 0x100ff, +0x10103, 0x10106, +0x10134, 0x10136, +0x1018f, 0x1018f, +0x1019d, 0x1019f, +0x101a1, 0x101cf, +0x101fe, 0x1027f, +0x1029d, 0x1029f, +0x102d1, 0x102df, +0x102fc, 0x102ff, +0x10324, 0x1032c, +0x1034b, 0x1034f, +0x1037b, 0x1037f, +0x1039e, 0x1039e, +0x103c4, 0x103c7, +0x103d6, 0x103ff, +0x1049e, 0x1049f, +0x104aa, 0x104af, +0x104d4, 0x104d7, +0x104fc, 0x104ff, +0x10528, 0x1052f, +0x10564, 0x1056e, +0x1057b, 0x1057b, +0x1058b, 0x1058b, +0x10593, 0x10593, +0x10596, 0x10596, +0x105a2, 0x105a2, +0x105b2, 0x105b2, +0x105ba, 0x105ba, +0x105bd, 0x105bf, +0x105f4, 0x105ff, +0x10737, 0x1073f, +0x10756, 0x1075f, +0x10768, 0x1077f, +0x10786, 0x10786, +0x107b1, 0x107b1, +0x107bb, 0x107ff, +0x10806, 0x10807, +0x10809, 0x10809, +0x10836, 0x10836, +0x10839, 0x1083b, +0x1083d, 0x1083e, +0x10856, 0x10856, +0x1089f, 0x108a6, +0x108b0, 0x108df, +0x108f3, 0x108f3, +0x108f6, 0x108fa, +0x1091c, 0x1091e, +0x1093a, 0x1093e, +0x10940, 0x1097f, +0x109b8, 0x109bb, +0x109d0, 0x109d1, +0x10a04, 0x10a04, +0x10a07, 0x10a0b, +0x10a14, 0x10a14, +0x10a18, 0x10a18, +0x10a36, 0x10a37, +0x10a3b, 0x10a3e, +0x10a49, 0x10a4f, +0x10a59, 0x10a5f, +0x10aa0, 0x10abf, +0x10ae7, 0x10aea, +0x10af7, 0x10aff, +0x10b36, 0x10b38, +0x10b56, 0x10b57, +0x10b73, 0x10b77, +0x10b92, 0x10b98, +0x10b9d, 0x10ba8, +0x10bb0, 0x10bff, +0x10c49, 0x10c7f, +0x10cb3, 0x10cbf, +0x10cf3, 0x10cf9, +0x10d28, 0x10d2f, +0x10d3a, 0x10d3f, +0x10d66, 0x10d68, +0x10d86, 0x10d8d, +0x10d90, 0x10e5f, +0x10e7f, 0x10e7f, +0x10eaa, 0x10eaa, +0x10eae, 0x10eaf, +0x10eb2, 0x10ec1, +0x10ec5, 0x10efb, +0x10f28, 0x10f2f, +0x10f5a, 0x10f6f, +0x10f8a, 0x10faf, +0x10fcc, 0x10fdf, +0x10ff7, 0x10fff, +0x1104e, 0x11051, +0x11076, 0x1107e, +0x110bd, 0x110bd, +0x110c3, 0x110cf, +0x110e9, 0x110ef, +0x110fa, 0x110ff, +0x11135, 0x11135, +0x11148, 0x1114f, +0x11177, 0x1117f, +0x111e0, 0x111e0, +0x111f5, 0x111ff, +0x11212, 0x11212, +0x11242, 0x1127f, +0x11287, 0x11287, +0x11289, 0x11289, +0x1128e, 0x1128e, +0x1129e, 0x1129e, +0x112aa, 0x112af, +0x112eb, 0x112ef, +0x112fa, 0x112ff, +0x11304, 0x11304, +0x1130d, 0x1130e, +0x11311, 0x11312, +0x11329, 0x11329, +0x11331, 0x11331, +0x11334, 0x11334, +0x1133a, 0x1133a, +0x11345, 0x11346, +0x11349, 0x1134a, +0x1134e, 0x1134f, +0x11351, 0x11356, +0x11358, 0x1135c, +0x11364, 0x11365, +0x1136d, 0x1136f, +0x11375, 0x1137f, +0x1138a, 0x1138a, +0x1138c, 0x1138d, +0x1138f, 0x1138f, +0x113b6, 0x113b6, +0x113c1, 0x113c1, +0x113c3, 0x113c4, +0x113c6, 0x113c6, +0x113cb, 0x113cb, +0x113d6, 0x113d6, +0x113d9, 0x113e0, +0x113e3, 0x113ff, +0x1145c, 0x1145c, +0x11462, 0x1147f, +0x114c8, 0x114cf, +0x114da, 0x1157f, +0x115b6, 0x115b7, +0x115de, 0x115ff, +0x11645, 0x1164f, +0x1165a, 0x1165f, +0x1166d, 0x1167f, +0x116ba, 0x116bf, +0x116ca, 0x116cf, +0x116e4, 0x116ff, +0x1171b, 0x1171c, +0x1172c, 0x1172f, +0x11747, 0x117ff, +0x1183c, 0x1189f, +0x118f3, 0x118fe, +0x11907, 0x11908, +0x1190a, 0x1190b, +0x11914, 0x11914, +0x11917, 0x11917, +0x11936, 0x11936, +0x11939, 0x1193a, +0x11947, 0x1194f, +0x1195a, 0x1199f, +0x119a8, 0x119a9, +0x119d8, 0x119d9, +0x119e5, 0x119ff, +0x11a48, 0x11a4f, +0x11aa3, 0x11aaf, +0x11af9, 0x11aff, +0x11b0a, 0x11bbf, +0x11be2, 0x11bef, +0x11bfa, 0x11bff, +0x11c09, 0x11c09, +0x11c37, 0x11c37, +0x11c46, 0x11c4f, +0x11c6d, 0x11c6f, +0x11c90, 0x11c91, +0x11ca8, 0x11ca8, +0x11cb7, 0x11cff, +0x11d07, 0x11d07, +0x11d0a, 0x11d0a, +0x11d37, 0x11d39, +0x11d3b, 0x11d3b, +0x11d3e, 0x11d3e, +0x11d48, 0x11d4f, +0x11d5a, 0x11d5f, +0x11d66, 0x11d66, +0x11d69, 0x11d69, +0x11d8f, 0x11d8f, +0x11d92, 0x11d92, +0x11d99, 0x11d9f, +0x11daa, 0x11edf, +0x11ef9, 0x11eff, +0x11f11, 0x11f11, +0x11f3b, 0x11f3d, +0x11f5b, 0x11faf, +0x11fb1, 0x11fbf, +0x11ff2, 0x11ffe, +0x1239a, 0x123ff, +0x1246f, 0x1246f, +0x12475, 0x1247f, +0x12544, 0x12f8f, +0x12ff3, 0x12fff, +0x13430, 0x1343f, +0x13456, 0x1345f, +0x143fb, 0x143ff, +0x14647, 0x160ff, +0x1613a, 0x167ff, +0x16a39, 0x16a3f, +0x16a5f, 0x16a5f, +0x16a6a, 0x16a6d, +0x16abf, 0x16abf, +0x16aca, 0x16acf, +0x16aee, 0x16aef, +0x16af6, 0x16aff, +0x16b46, 0x16b4f, +0x16b5a, 0x16b5a, +0x16b62, 0x16b62, +0x16b78, 0x16b7c, +0x16b90, 0x16d3f, +0x16d7a, 0x16e3f, +0x16e9b, 0x16eff, +0x16f4b, 0x16f4e, +0x16f88, 0x16f8e, +0x16fa0, 0x16fdf, +0x16fe5, 0x16fef, +0x16ff2, 0x16fff, +0x187f8, 0x187ff, +0x18cd6, 0x18cfe, +0x18d09, 0x1afef, +0x1aff4, 0x1aff4, +0x1affc, 0x1affc, +0x1afff, 0x1afff, +0x1b123, 0x1b131, +0x1b133, 0x1b14f, +0x1b153, 0x1b154, +0x1b156, 0x1b163, +0x1b168, 0x1b16f, +0x1b2fc, 0x1bbff, +0x1bc6b, 0x1bc6f, +0x1bc7d, 0x1bc7f, +0x1bc89, 0x1bc8f, +0x1bc9a, 0x1bc9b, +0x1bca0, 0x1cbff, +0x1ccfa, 0x1ccff, +0x1ceb4, 0x1ceff, +0x1cf2e, 0x1cf2f, +0x1cf47, 0x1cf4f, +0x1cfc4, 0x1cfff, +0x1d0f6, 0x1d0ff, +0x1d127, 0x1d128, +0x1d173, 0x1d17a, +0x1d1eb, 0x1d1ff, +0x1d246, 0x1d2bf, +0x1d2d4, 0x1d2df, +0x1d2f4, 0x1d2ff, +0x1d357, 0x1d35f, +0x1d379, 0x1d3ff, +0x1d455, 0x1d455, +0x1d49d, 0x1d49d, +0x1d4a0, 0x1d4a1, +0x1d4a3, 0x1d4a4, +0x1d4a7, 0x1d4a8, +0x1d4ad, 0x1d4ad, +0x1d4ba, 0x1d4ba, +0x1d4bc, 0x1d4bc, +0x1d4c4, 0x1d4c4, +0x1d506, 0x1d506, +0x1d50b, 0x1d50c, +0x1d515, 0x1d515, +0x1d51d, 0x1d51d, +0x1d53a, 0x1d53a, +0x1d53f, 0x1d53f, +0x1d545, 0x1d545, +0x1d547, 0x1d549, +0x1d551, 0x1d551, +0x1d6a6, 0x1d6a7, +0x1d7cc, 0x1d7cd, +0x1da8c, 0x1da9a, +0x1daa0, 0x1daa0, +0x1dab0, 0x1deff, +0x1df1f, 0x1df24, +0x1df2b, 0x1dfff, +0x1e007, 0x1e007, +0x1e019, 0x1e01a, +0x1e022, 0x1e022, +0x1e025, 0x1e025, +0x1e02b, 0x1e02f, +0x1e06e, 0x1e08e, +0x1e090, 0x1e0ff, +0x1e12d, 0x1e12f, +0x1e13e, 0x1e13f, +0x1e14a, 0x1e14d, +0x1e150, 0x1e28f, +0x1e2af, 0x1e2bf, +0x1e2fa, 0x1e2fe, +0x1e300, 0x1e4cf, +0x1e4fa, 0x1e5cf, +0x1e5fb, 0x1e5fe, +0x1e600, 0x1e7df, +0x1e7e7, 0x1e7e7, +0x1e7ec, 0x1e7ec, +0x1e7ef, 0x1e7ef, +0x1e7ff, 0x1e7ff, +0x1e8c5, 0x1e8c6, +0x1e8d7, 0x1e8ff, +0x1e94c, 0x1e94f, +0x1e95a, 0x1e95d, +0x1e960, 0x1ec70, +0x1ecb5, 0x1ed00, +0x1ed3e, 0x1edff, +0x1ee04, 0x1ee04, +0x1ee20, 0x1ee20, +0x1ee23, 0x1ee23, +0x1ee25, 0x1ee26, +0x1ee28, 0x1ee28, +0x1ee33, 0x1ee33, +0x1ee38, 0x1ee38, +0x1ee3a, 0x1ee3a, +0x1ee3c, 0x1ee41, +0x1ee43, 0x1ee46, +0x1ee48, 0x1ee48, +0x1ee4a, 0x1ee4a, +0x1ee4c, 0x1ee4c, +0x1ee50, 0x1ee50, +0x1ee53, 0x1ee53, +0x1ee55, 0x1ee56, +0x1ee58, 0x1ee58, +0x1ee5a, 0x1ee5a, +0x1ee5c, 0x1ee5c, +0x1ee5e, 0x1ee5e, +0x1ee60, 0x1ee60, +0x1ee63, 0x1ee63, +0x1ee65, 0x1ee66, +0x1ee6b, 0x1ee6b, +0x1ee73, 0x1ee73, +0x1ee78, 0x1ee78, +0x1ee7d, 0x1ee7d, +0x1ee7f, 0x1ee7f, +0x1ee8a, 0x1ee8a, +0x1ee9c, 0x1eea0, +0x1eea4, 0x1eea4, +0x1eeaa, 0x1eeaa, +0x1eebc, 0x1eeef, +0x1eef2, 0x1efff, +0x1f02c, 0x1f02f, +0x1f094, 0x1f09f, +0x1f0af, 0x1f0b0, +0x1f0c0, 0x1f0c0, +0x1f0d0, 0x1f0d0, +0x1f0f6, 0x1f0ff, +0x1f1ae, 0x1f1e5, +0x1f203, 0x1f20f, +0x1f23c, 0x1f23f, +0x1f249, 0x1f24f, +0x1f252, 0x1f25f, +0x1f266, 0x1f2ff, +0x1f6d8, 0x1f6db, +0x1f6ed, 0x1f6ef, +0x1f6fd, 0x1f6ff, +0x1f777, 0x1f77a, +0x1f7da, 0x1f7df, +0x1f7ec, 0x1f7ef, +0x1f7f1, 0x1f7ff, +0x1f80c, 0x1f80f, +0x1f848, 0x1f84f, +0x1f85a, 0x1f85f, +0x1f888, 0x1f88f, +0x1f8ae, 0x1f8af, +0x1f8bc, 0x1f8bf, +0x1f8c2, 0x1f8ff, +0x1fa54, 0x1fa5f, +0x1fa6e, 0x1fa6f, +0x1fa7d, 0x1fa7f, +0x1fa8a, 0x1fa8e, +0x1fac7, 0x1facd, +0x1fadd, 0x1fade, +0x1faea, 0x1faef, +0x1faf9, 0x1faff, +0x1fb93, 0x1fb93, +0x1fbfa, 0x1ffff, +0x2a6e0, 0x2a6ff, +0x2b73a, 0x2b73f, +0x2b81e, 0x2b81f, +0x2cea2, 0x2ceaf, +0x2ebe1, 0x2ebef, +0x2ee5e, 0x2f7ff, +0x2fa1e, 0x2ffff, +0x3134b, 0x3134f, +0x323b0, 0xe00ff, +0xe01f0, 0x10ffff, +}; /* END of CR_C */ + +/* PROPERTY: 'Canadian_Aboriginal': Script */ +static const OnigCodePoint +CR_Canadian_Aboriginal[] = { 3, +0x1400, 0x167f, +0x18b0, 0x18f5, +0x11ab0, 0x11abf, +}; /* END of CR_Canadian_Aboriginal */ + +/* PROPERTY: 'Carian': Script */ +static const OnigCodePoint +CR_Carian[] = { 1, +0x102a0, 0x102d0, +}; /* END of CR_Carian */ + +/* PROPERTY: 'Case_Ignorable': Derived Property */ +static const OnigCodePoint +CR_Case_Ignorable[] = { 452, +0x0027, 0x0027, +0x002e, 0x002e, +0x003a, 0x003a, +0x005e, 0x005e, +0x0060, 0x0060, +0x00a8, 0x00a8, +0x00ad, 0x00ad, +0x00af, 0x00af, +0x00b4, 0x00b4, +0x00b7, 0x00b8, +0x02b0, 0x036f, +0x0374, 0x0375, +0x037a, 0x037a, +0x0384, 0x0385, +0x0387, 0x0387, +0x0483, 0x0489, +0x0559, 0x0559, +0x055f, 0x055f, +0x0591, 0x05bd, +0x05bf, 0x05bf, +0x05c1, 0x05c2, +0x05c4, 0x05c5, +0x05c7, 0x05c7, +0x05f4, 0x05f4, +0x0600, 0x0605, +0x0610, 0x061a, +0x061c, 0x061c, +0x0640, 0x0640, +0x064b, 0x065f, +0x0670, 0x0670, +0x06d6, 0x06dd, +0x06df, 0x06e8, +0x06ea, 0x06ed, +0x070f, 0x070f, +0x0711, 0x0711, +0x0730, 0x074a, +0x07a6, 0x07b0, +0x07eb, 0x07f5, +0x07fa, 0x07fa, +0x07fd, 0x07fd, +0x0816, 0x082d, +0x0859, 0x085b, +0x0888, 0x0888, +0x0890, 0x0891, +0x0897, 0x089f, +0x08c9, 0x0902, +0x093a, 0x093a, +0x093c, 0x093c, +0x0941, 0x0948, +0x094d, 0x094d, +0x0951, 0x0957, +0x0962, 0x0963, +0x0971, 0x0971, +0x0981, 0x0981, +0x09bc, 0x09bc, +0x09c1, 0x09c4, +0x09cd, 0x09cd, +0x09e2, 0x09e3, +0x09fe, 0x09fe, +0x0a01, 0x0a02, +0x0a3c, 0x0a3c, +0x0a41, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4d, +0x0a51, 0x0a51, +0x0a70, 0x0a71, +0x0a75, 0x0a75, +0x0a81, 0x0a82, +0x0abc, 0x0abc, +0x0ac1, 0x0ac5, +0x0ac7, 0x0ac8, +0x0acd, 0x0acd, +0x0ae2, 0x0ae3, +0x0afa, 0x0aff, +0x0b01, 0x0b01, +0x0b3c, 0x0b3c, +0x0b3f, 0x0b3f, +0x0b41, 0x0b44, +0x0b4d, 0x0b4d, +0x0b55, 0x0b56, +0x0b62, 0x0b63, +0x0b82, 0x0b82, +0x0bc0, 0x0bc0, +0x0bcd, 0x0bcd, +0x0c00, 0x0c00, +0x0c04, 0x0c04, +0x0c3c, 0x0c3c, +0x0c3e, 0x0c40, +0x0c46, 0x0c48, +0x0c4a, 0x0c4d, +0x0c55, 0x0c56, +0x0c62, 0x0c63, +0x0c81, 0x0c81, +0x0cbc, 0x0cbc, +0x0cbf, 0x0cbf, +0x0cc6, 0x0cc6, +0x0ccc, 0x0ccd, +0x0ce2, 0x0ce3, +0x0d00, 0x0d01, +0x0d3b, 0x0d3c, +0x0d41, 0x0d44, +0x0d4d, 0x0d4d, +0x0d62, 0x0d63, +0x0d81, 0x0d81, +0x0dca, 0x0dca, +0x0dd2, 0x0dd4, +0x0dd6, 0x0dd6, +0x0e31, 0x0e31, +0x0e34, 0x0e3a, +0x0e46, 0x0e4e, +0x0eb1, 0x0eb1, +0x0eb4, 0x0ebc, +0x0ec6, 0x0ec6, +0x0ec8, 0x0ece, +0x0f18, 0x0f19, +0x0f35, 0x0f35, +0x0f37, 0x0f37, +0x0f39, 0x0f39, +0x0f71, 0x0f7e, +0x0f80, 0x0f84, +0x0f86, 0x0f87, +0x0f8d, 0x0f97, +0x0f99, 0x0fbc, +0x0fc6, 0x0fc6, +0x102d, 0x1030, +0x1032, 0x1037, +0x1039, 0x103a, +0x103d, 0x103e, +0x1058, 0x1059, +0x105e, 0x1060, +0x1071, 0x1074, +0x1082, 0x1082, +0x1085, 0x1086, +0x108d, 0x108d, +0x109d, 0x109d, +0x10fc, 0x10fc, +0x135d, 0x135f, +0x1712, 0x1714, +0x1732, 0x1733, +0x1752, 0x1753, +0x1772, 0x1773, +0x17b4, 0x17b5, +0x17b7, 0x17bd, +0x17c6, 0x17c6, +0x17c9, 0x17d3, +0x17d7, 0x17d7, +0x17dd, 0x17dd, +0x180b, 0x180f, +0x1843, 0x1843, +0x1885, 0x1886, +0x18a9, 0x18a9, +0x1920, 0x1922, +0x1927, 0x1928, +0x1932, 0x1932, +0x1939, 0x193b, +0x1a17, 0x1a18, +0x1a1b, 0x1a1b, +0x1a56, 0x1a56, +0x1a58, 0x1a5e, +0x1a60, 0x1a60, +0x1a62, 0x1a62, +0x1a65, 0x1a6c, +0x1a73, 0x1a7c, +0x1a7f, 0x1a7f, +0x1aa7, 0x1aa7, +0x1ab0, 0x1ace, +0x1b00, 0x1b03, +0x1b34, 0x1b34, +0x1b36, 0x1b3a, +0x1b3c, 0x1b3c, +0x1b42, 0x1b42, +0x1b6b, 0x1b73, +0x1b80, 0x1b81, +0x1ba2, 0x1ba5, +0x1ba8, 0x1ba9, +0x1bab, 0x1bad, +0x1be6, 0x1be6, +0x1be8, 0x1be9, +0x1bed, 0x1bed, +0x1bef, 0x1bf1, +0x1c2c, 0x1c33, +0x1c36, 0x1c37, +0x1c78, 0x1c7d, +0x1cd0, 0x1cd2, +0x1cd4, 0x1ce0, +0x1ce2, 0x1ce8, +0x1ced, 0x1ced, +0x1cf4, 0x1cf4, +0x1cf8, 0x1cf9, +0x1d2c, 0x1d6a, +0x1d78, 0x1d78, +0x1d9b, 0x1dff, +0x1fbd, 0x1fbd, +0x1fbf, 0x1fc1, +0x1fcd, 0x1fcf, +0x1fdd, 0x1fdf, +0x1fed, 0x1fef, +0x1ffd, 0x1ffe, +0x200b, 0x200f, +0x2018, 0x2019, +0x2024, 0x2024, +0x2027, 0x2027, +0x202a, 0x202e, +0x2060, 0x2064, +0x2066, 0x206f, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x20d0, 0x20f0, +0x2c7c, 0x2c7d, +0x2cef, 0x2cf1, +0x2d6f, 0x2d6f, +0x2d7f, 0x2d7f, +0x2de0, 0x2dff, +0x2e2f, 0x2e2f, +0x3005, 0x3005, +0x302a, 0x302d, +0x3031, 0x3035, +0x303b, 0x303b, +0x3099, 0x309e, +0x30fc, 0x30fe, +0xa015, 0xa015, +0xa4f8, 0xa4fd, +0xa60c, 0xa60c, +0xa66f, 0xa672, +0xa674, 0xa67d, +0xa67f, 0xa67f, +0xa69c, 0xa69f, +0xa6f0, 0xa6f1, +0xa700, 0xa721, +0xa770, 0xa770, +0xa788, 0xa78a, +0xa7f2, 0xa7f4, +0xa7f8, 0xa7f9, +0xa802, 0xa802, +0xa806, 0xa806, +0xa80b, 0xa80b, +0xa825, 0xa826, +0xa82c, 0xa82c, +0xa8c4, 0xa8c5, +0xa8e0, 0xa8f1, +0xa8ff, 0xa8ff, +0xa926, 0xa92d, +0xa947, 0xa951, +0xa980, 0xa982, +0xa9b3, 0xa9b3, +0xa9b6, 0xa9b9, +0xa9bc, 0xa9bd, +0xa9cf, 0xa9cf, +0xa9e5, 0xa9e6, +0xaa29, 0xaa2e, +0xaa31, 0xaa32, +0xaa35, 0xaa36, +0xaa43, 0xaa43, +0xaa4c, 0xaa4c, +0xaa70, 0xaa70, +0xaa7c, 0xaa7c, +0xaab0, 0xaab0, +0xaab2, 0xaab4, +0xaab7, 0xaab8, +0xaabe, 0xaabf, +0xaac1, 0xaac1, +0xaadd, 0xaadd, +0xaaec, 0xaaed, +0xaaf3, 0xaaf4, +0xaaf6, 0xaaf6, +0xab5b, 0xab5f, +0xab69, 0xab6b, +0xabe5, 0xabe5, +0xabe8, 0xabe8, +0xabed, 0xabed, +0xfb1e, 0xfb1e, +0xfbb2, 0xfbc2, +0xfe00, 0xfe0f, +0xfe13, 0xfe13, +0xfe20, 0xfe2f, +0xfe52, 0xfe52, +0xfe55, 0xfe55, +0xfeff, 0xfeff, +0xff07, 0xff07, +0xff0e, 0xff0e, +0xff1a, 0xff1a, +0xff3e, 0xff3e, +0xff40, 0xff40, +0xff70, 0xff70, +0xff9e, 0xff9f, +0xffe3, 0xffe3, +0xfff9, 0xfffb, +0x101fd, 0x101fd, +0x102e0, 0x102e0, +0x10376, 0x1037a, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10a01, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a0f, +0x10a38, 0x10a3a, +0x10a3f, 0x10a3f, +0x10ae5, 0x10ae6, +0x10d24, 0x10d27, +0x10d4e, 0x10d4e, +0x10d69, 0x10d6d, +0x10d6f, 0x10d6f, +0x10eab, 0x10eac, +0x10efc, 0x10eff, +0x10f46, 0x10f50, +0x10f82, 0x10f85, +0x11001, 0x11001, +0x11038, 0x11046, +0x11070, 0x11070, +0x11073, 0x11074, +0x1107f, 0x11081, +0x110b3, 0x110b6, +0x110b9, 0x110ba, +0x110bd, 0x110bd, +0x110c2, 0x110c2, +0x110cd, 0x110cd, +0x11100, 0x11102, +0x11127, 0x1112b, +0x1112d, 0x11134, +0x11173, 0x11173, +0x11180, 0x11181, +0x111b6, 0x111be, +0x111c9, 0x111cc, +0x111cf, 0x111cf, +0x1122f, 0x11231, +0x11234, 0x11234, +0x11236, 0x11237, +0x1123e, 0x1123e, +0x11241, 0x11241, +0x112df, 0x112df, +0x112e3, 0x112ea, +0x11300, 0x11301, +0x1133b, 0x1133c, +0x11340, 0x11340, +0x11366, 0x1136c, +0x11370, 0x11374, +0x113bb, 0x113c0, +0x113ce, 0x113ce, +0x113d0, 0x113d0, +0x113d2, 0x113d2, +0x113e1, 0x113e2, +0x11438, 0x1143f, +0x11442, 0x11444, +0x11446, 0x11446, +0x1145e, 0x1145e, +0x114b3, 0x114b8, +0x114ba, 0x114ba, +0x114bf, 0x114c0, +0x114c2, 0x114c3, +0x115b2, 0x115b5, +0x115bc, 0x115bd, +0x115bf, 0x115c0, +0x115dc, 0x115dd, +0x11633, 0x1163a, +0x1163d, 0x1163d, +0x1163f, 0x11640, +0x116ab, 0x116ab, +0x116ad, 0x116ad, +0x116b0, 0x116b5, +0x116b7, 0x116b7, +0x1171d, 0x1171d, +0x1171f, 0x1171f, +0x11722, 0x11725, +0x11727, 0x1172b, +0x1182f, 0x11837, +0x11839, 0x1183a, +0x1193b, 0x1193c, +0x1193e, 0x1193e, +0x11943, 0x11943, +0x119d4, 0x119d7, +0x119da, 0x119db, +0x119e0, 0x119e0, +0x11a01, 0x11a0a, +0x11a33, 0x11a38, +0x11a3b, 0x11a3e, +0x11a47, 0x11a47, +0x11a51, 0x11a56, +0x11a59, 0x11a5b, +0x11a8a, 0x11a96, +0x11a98, 0x11a99, +0x11c30, 0x11c36, +0x11c38, 0x11c3d, +0x11c3f, 0x11c3f, +0x11c92, 0x11ca7, +0x11caa, 0x11cb0, +0x11cb2, 0x11cb3, +0x11cb5, 0x11cb6, +0x11d31, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d45, +0x11d47, 0x11d47, +0x11d90, 0x11d91, +0x11d95, 0x11d95, +0x11d97, 0x11d97, +0x11ef3, 0x11ef4, +0x11f00, 0x11f01, +0x11f36, 0x11f3a, +0x11f40, 0x11f40, +0x11f42, 0x11f42, +0x11f5a, 0x11f5a, +0x13430, 0x13440, +0x13447, 0x13455, +0x1611e, 0x16129, +0x1612d, 0x1612f, +0x16af0, 0x16af4, +0x16b30, 0x16b36, +0x16b40, 0x16b43, +0x16d40, 0x16d42, +0x16d6b, 0x16d6c, +0x16f4f, 0x16f4f, +0x16f8f, 0x16f9f, +0x16fe0, 0x16fe1, +0x16fe3, 0x16fe4, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1bc9d, 0x1bc9e, +0x1bca0, 0x1bca3, +0x1cf00, 0x1cf2d, +0x1cf30, 0x1cf46, +0x1d167, 0x1d169, +0x1d173, 0x1d182, +0x1d185, 0x1d18b, +0x1d1aa, 0x1d1ad, +0x1d242, 0x1d244, +0x1da00, 0x1da36, +0x1da3b, 0x1da6c, +0x1da75, 0x1da75, +0x1da84, 0x1da84, +0x1da9b, 0x1da9f, +0x1daa1, 0x1daaf, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e030, 0x1e06d, +0x1e08f, 0x1e08f, +0x1e130, 0x1e13d, +0x1e2ae, 0x1e2ae, +0x1e2ec, 0x1e2ef, +0x1e4eb, 0x1e4ef, +0x1e5ee, 0x1e5ef, +0x1e8d0, 0x1e8d6, +0x1e944, 0x1e94b, +0x1f3fb, 0x1f3ff, +0xe0001, 0xe0001, +0xe0020, 0xe007f, +0xe0100, 0xe01ef, +}; /* END of CR_Case_Ignorable */ + +/* PROPERTY: 'Cased': Derived Property */ +static const OnigCodePoint +CR_Cased[] = { 159, +0x0041, 0x005a, +0x0061, 0x007a, +0x00aa, 0x00aa, +0x00b5, 0x00b5, +0x00ba, 0x00ba, +0x00c0, 0x00d6, +0x00d8, 0x00f6, +0x00f8, 0x01ba, +0x01bc, 0x01bf, +0x01c4, 0x0293, +0x0295, 0x02b8, +0x02c0, 0x02c1, +0x02e0, 0x02e4, +0x0345, 0x0345, +0x0370, 0x0373, +0x0376, 0x0377, +0x037a, 0x037d, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x03f5, +0x03f7, 0x0481, +0x048a, 0x052f, +0x0531, 0x0556, +0x0560, 0x0588, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x10fa, +0x10fc, 0x10ff, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1c80, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1d00, 0x1dbf, +0x1e00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fbc, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fcc, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fe0, 0x1fec, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffc, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x2102, 0x2102, +0x2107, 0x2107, +0x210a, 0x2113, +0x2115, 0x2115, +0x2119, 0x211d, +0x2124, 0x2124, +0x2126, 0x2126, +0x2128, 0x2128, +0x212a, 0x212d, +0x212f, 0x2134, +0x2139, 0x2139, +0x213c, 0x213f, +0x2145, 0x2149, +0x214e, 0x214e, +0x2160, 0x217f, +0x2183, 0x2184, +0x24b6, 0x24e9, +0x2c00, 0x2ce4, +0x2ceb, 0x2cee, +0x2cf2, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0xa640, 0xa66d, +0xa680, 0xa69d, +0xa722, 0xa787, +0xa78b, 0xa78e, +0xa790, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa7f6, +0xa7f8, 0xa7fa, +0xab30, 0xab5a, +0xab5c, 0xab69, +0xab70, 0xabbf, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xff21, 0xff3a, +0xff41, 0xff5a, +0x10400, 0x1044f, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x10780, 0x10780, +0x10783, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10d50, 0x10d65, +0x10d70, 0x10d85, +0x118a0, 0x118df, +0x16e40, 0x16e7f, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d6c0, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6fa, +0x1d6fc, 0x1d714, +0x1d716, 0x1d734, +0x1d736, 0x1d74e, +0x1d750, 0x1d76e, +0x1d770, 0x1d788, +0x1d78a, 0x1d7a8, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7cb, +0x1df00, 0x1df09, +0x1df0b, 0x1df1e, +0x1df25, 0x1df2a, +0x1e030, 0x1e06d, +0x1e900, 0x1e943, +0x1f130, 0x1f149, +0x1f150, 0x1f169, +0x1f170, 0x1f189, +}; /* END of CR_Cased */ + +/* PROPERTY: 'Caucasian_Albanian': Script */ +static const OnigCodePoint +CR_Caucasian_Albanian[] = { 2, +0x10530, 0x10563, +0x1056f, 0x1056f, +}; /* END of CR_Caucasian_Albanian */ + +/* PROPERTY: 'Cc': General Category */ +#define CR_Cc CR_Cntrl + +/* PROPERTY: 'Cf': General Category */ +static const OnigCodePoint +CR_Cf[] = { 21, +0x00ad, 0x00ad, +0x0600, 0x0605, +0x061c, 0x061c, +0x06dd, 0x06dd, +0x070f, 0x070f, +0x0890, 0x0891, +0x08e2, 0x08e2, +0x180e, 0x180e, +0x200b, 0x200f, +0x202a, 0x202e, +0x2060, 0x2064, +0x2066, 0x206f, +0xfeff, 0xfeff, +0xfff9, 0xfffb, +0x110bd, 0x110bd, +0x110cd, 0x110cd, +0x13430, 0x1343f, +0x1bca0, 0x1bca3, +0x1d173, 0x1d17a, +0xe0001, 0xe0001, +0xe0020, 0xe007f, +}; /* END of CR_Cf */ + +/* PROPERTY: 'Chakma': Script */ +static const OnigCodePoint +CR_Chakma[] = { 2, +0x11100, 0x11134, +0x11136, 0x11147, +}; /* END of CR_Chakma */ + +/* PROPERTY: 'Cham': Script */ +static const OnigCodePoint +CR_Cham[] = { 4, +0xaa00, 0xaa36, +0xaa40, 0xaa4d, +0xaa50, 0xaa59, +0xaa5c, 0xaa5f, +}; /* END of CR_Cham */ + +/* PROPERTY: 'Changes_When_Casefolded': Derived Property */ +static const OnigCodePoint +CR_Changes_When_Casefolded[] = { 626, +0x0041, 0x005a, +0x00b5, 0x00b5, +0x00c0, 0x00d6, +0x00d8, 0x00df, +0x0100, 0x0100, +0x0102, 0x0102, +0x0104, 0x0104, +0x0106, 0x0106, +0x0108, 0x0108, +0x010a, 0x010a, +0x010c, 0x010c, +0x010e, 0x010e, +0x0110, 0x0110, +0x0112, 0x0112, +0x0114, 0x0114, +0x0116, 0x0116, +0x0118, 0x0118, +0x011a, 0x011a, +0x011c, 0x011c, +0x011e, 0x011e, +0x0120, 0x0120, +0x0122, 0x0122, +0x0124, 0x0124, +0x0126, 0x0126, +0x0128, 0x0128, +0x012a, 0x012a, +0x012c, 0x012c, +0x012e, 0x012e, +0x0130, 0x0130, +0x0132, 0x0132, +0x0134, 0x0134, +0x0136, 0x0136, +0x0139, 0x0139, +0x013b, 0x013b, +0x013d, 0x013d, +0x013f, 0x013f, +0x0141, 0x0141, +0x0143, 0x0143, +0x0145, 0x0145, +0x0147, 0x0147, +0x0149, 0x014a, +0x014c, 0x014c, +0x014e, 0x014e, +0x0150, 0x0150, +0x0152, 0x0152, +0x0154, 0x0154, +0x0156, 0x0156, +0x0158, 0x0158, +0x015a, 0x015a, +0x015c, 0x015c, +0x015e, 0x015e, +0x0160, 0x0160, +0x0162, 0x0162, +0x0164, 0x0164, +0x0166, 0x0166, +0x0168, 0x0168, +0x016a, 0x016a, +0x016c, 0x016c, +0x016e, 0x016e, +0x0170, 0x0170, +0x0172, 0x0172, +0x0174, 0x0174, +0x0176, 0x0176, +0x0178, 0x0179, +0x017b, 0x017b, +0x017d, 0x017d, +0x017f, 0x017f, +0x0181, 0x0182, +0x0184, 0x0184, +0x0186, 0x0187, +0x0189, 0x018b, +0x018e, 0x0191, +0x0193, 0x0194, +0x0196, 0x0198, +0x019c, 0x019d, +0x019f, 0x01a0, +0x01a2, 0x01a2, +0x01a4, 0x01a4, +0x01a6, 0x01a7, +0x01a9, 0x01a9, +0x01ac, 0x01ac, +0x01ae, 0x01af, +0x01b1, 0x01b3, +0x01b5, 0x01b5, +0x01b7, 0x01b8, +0x01bc, 0x01bc, +0x01c4, 0x01c5, +0x01c7, 0x01c8, +0x01ca, 0x01cb, +0x01cd, 0x01cd, +0x01cf, 0x01cf, +0x01d1, 0x01d1, +0x01d3, 0x01d3, +0x01d5, 0x01d5, +0x01d7, 0x01d7, +0x01d9, 0x01d9, +0x01db, 0x01db, +0x01de, 0x01de, +0x01e0, 0x01e0, +0x01e2, 0x01e2, +0x01e4, 0x01e4, +0x01e6, 0x01e6, +0x01e8, 0x01e8, +0x01ea, 0x01ea, +0x01ec, 0x01ec, +0x01ee, 0x01ee, +0x01f1, 0x01f2, +0x01f4, 0x01f4, +0x01f6, 0x01f8, +0x01fa, 0x01fa, +0x01fc, 0x01fc, +0x01fe, 0x01fe, +0x0200, 0x0200, +0x0202, 0x0202, +0x0204, 0x0204, +0x0206, 0x0206, +0x0208, 0x0208, +0x020a, 0x020a, +0x020c, 0x020c, +0x020e, 0x020e, +0x0210, 0x0210, +0x0212, 0x0212, +0x0214, 0x0214, +0x0216, 0x0216, +0x0218, 0x0218, +0x021a, 0x021a, +0x021c, 0x021c, +0x021e, 0x021e, +0x0220, 0x0220, +0x0222, 0x0222, +0x0224, 0x0224, +0x0226, 0x0226, +0x0228, 0x0228, +0x022a, 0x022a, +0x022c, 0x022c, +0x022e, 0x022e, +0x0230, 0x0230, +0x0232, 0x0232, +0x023a, 0x023b, +0x023d, 0x023e, +0x0241, 0x0241, +0x0243, 0x0246, +0x0248, 0x0248, +0x024a, 0x024a, +0x024c, 0x024c, +0x024e, 0x024e, +0x0345, 0x0345, +0x0370, 0x0370, +0x0372, 0x0372, +0x0376, 0x0376, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x038f, +0x0391, 0x03a1, +0x03a3, 0x03ab, +0x03c2, 0x03c2, +0x03cf, 0x03d1, +0x03d5, 0x03d6, +0x03d8, 0x03d8, +0x03da, 0x03da, +0x03dc, 0x03dc, +0x03de, 0x03de, +0x03e0, 0x03e0, +0x03e2, 0x03e2, +0x03e4, 0x03e4, +0x03e6, 0x03e6, +0x03e8, 0x03e8, +0x03ea, 0x03ea, +0x03ec, 0x03ec, +0x03ee, 0x03ee, +0x03f0, 0x03f1, +0x03f4, 0x03f5, +0x03f7, 0x03f7, +0x03f9, 0x03fa, +0x03fd, 0x042f, +0x0460, 0x0460, +0x0462, 0x0462, +0x0464, 0x0464, +0x0466, 0x0466, +0x0468, 0x0468, +0x046a, 0x046a, +0x046c, 0x046c, +0x046e, 0x046e, +0x0470, 0x0470, +0x0472, 0x0472, +0x0474, 0x0474, +0x0476, 0x0476, +0x0478, 0x0478, +0x047a, 0x047a, +0x047c, 0x047c, +0x047e, 0x047e, +0x0480, 0x0480, +0x048a, 0x048a, +0x048c, 0x048c, +0x048e, 0x048e, +0x0490, 0x0490, +0x0492, 0x0492, +0x0494, 0x0494, +0x0496, 0x0496, +0x0498, 0x0498, +0x049a, 0x049a, +0x049c, 0x049c, +0x049e, 0x049e, +0x04a0, 0x04a0, +0x04a2, 0x04a2, +0x04a4, 0x04a4, +0x04a6, 0x04a6, +0x04a8, 0x04a8, +0x04aa, 0x04aa, +0x04ac, 0x04ac, +0x04ae, 0x04ae, +0x04b0, 0x04b0, +0x04b2, 0x04b2, +0x04b4, 0x04b4, +0x04b6, 0x04b6, +0x04b8, 0x04b8, +0x04ba, 0x04ba, +0x04bc, 0x04bc, +0x04be, 0x04be, +0x04c0, 0x04c1, +0x04c3, 0x04c3, +0x04c5, 0x04c5, +0x04c7, 0x04c7, +0x04c9, 0x04c9, +0x04cb, 0x04cb, +0x04cd, 0x04cd, +0x04d0, 0x04d0, +0x04d2, 0x04d2, +0x04d4, 0x04d4, +0x04d6, 0x04d6, +0x04d8, 0x04d8, +0x04da, 0x04da, +0x04dc, 0x04dc, +0x04de, 0x04de, +0x04e0, 0x04e0, +0x04e2, 0x04e2, +0x04e4, 0x04e4, +0x04e6, 0x04e6, +0x04e8, 0x04e8, +0x04ea, 0x04ea, +0x04ec, 0x04ec, +0x04ee, 0x04ee, +0x04f0, 0x04f0, +0x04f2, 0x04f2, +0x04f4, 0x04f4, +0x04f6, 0x04f6, +0x04f8, 0x04f8, +0x04fa, 0x04fa, +0x04fc, 0x04fc, +0x04fe, 0x04fe, +0x0500, 0x0500, +0x0502, 0x0502, +0x0504, 0x0504, +0x0506, 0x0506, +0x0508, 0x0508, +0x050a, 0x050a, +0x050c, 0x050c, +0x050e, 0x050e, +0x0510, 0x0510, +0x0512, 0x0512, +0x0514, 0x0514, +0x0516, 0x0516, +0x0518, 0x0518, +0x051a, 0x051a, +0x051c, 0x051c, +0x051e, 0x051e, +0x0520, 0x0520, +0x0522, 0x0522, +0x0524, 0x0524, +0x0526, 0x0526, +0x0528, 0x0528, +0x052a, 0x052a, +0x052c, 0x052c, +0x052e, 0x052e, +0x0531, 0x0556, +0x0587, 0x0587, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x13f8, 0x13fd, +0x1c80, 0x1c89, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1e00, 0x1e00, +0x1e02, 0x1e02, +0x1e04, 0x1e04, +0x1e06, 0x1e06, +0x1e08, 0x1e08, +0x1e0a, 0x1e0a, +0x1e0c, 0x1e0c, +0x1e0e, 0x1e0e, +0x1e10, 0x1e10, +0x1e12, 0x1e12, +0x1e14, 0x1e14, +0x1e16, 0x1e16, +0x1e18, 0x1e18, +0x1e1a, 0x1e1a, +0x1e1c, 0x1e1c, +0x1e1e, 0x1e1e, +0x1e20, 0x1e20, +0x1e22, 0x1e22, +0x1e24, 0x1e24, +0x1e26, 0x1e26, +0x1e28, 0x1e28, +0x1e2a, 0x1e2a, +0x1e2c, 0x1e2c, +0x1e2e, 0x1e2e, +0x1e30, 0x1e30, +0x1e32, 0x1e32, +0x1e34, 0x1e34, +0x1e36, 0x1e36, +0x1e38, 0x1e38, +0x1e3a, 0x1e3a, +0x1e3c, 0x1e3c, +0x1e3e, 0x1e3e, +0x1e40, 0x1e40, +0x1e42, 0x1e42, +0x1e44, 0x1e44, +0x1e46, 0x1e46, +0x1e48, 0x1e48, +0x1e4a, 0x1e4a, +0x1e4c, 0x1e4c, +0x1e4e, 0x1e4e, +0x1e50, 0x1e50, +0x1e52, 0x1e52, +0x1e54, 0x1e54, +0x1e56, 0x1e56, +0x1e58, 0x1e58, +0x1e5a, 0x1e5a, +0x1e5c, 0x1e5c, +0x1e5e, 0x1e5e, +0x1e60, 0x1e60, +0x1e62, 0x1e62, +0x1e64, 0x1e64, +0x1e66, 0x1e66, +0x1e68, 0x1e68, +0x1e6a, 0x1e6a, +0x1e6c, 0x1e6c, +0x1e6e, 0x1e6e, +0x1e70, 0x1e70, +0x1e72, 0x1e72, +0x1e74, 0x1e74, +0x1e76, 0x1e76, +0x1e78, 0x1e78, +0x1e7a, 0x1e7a, +0x1e7c, 0x1e7c, +0x1e7e, 0x1e7e, +0x1e80, 0x1e80, +0x1e82, 0x1e82, +0x1e84, 0x1e84, +0x1e86, 0x1e86, +0x1e88, 0x1e88, +0x1e8a, 0x1e8a, +0x1e8c, 0x1e8c, +0x1e8e, 0x1e8e, +0x1e90, 0x1e90, +0x1e92, 0x1e92, +0x1e94, 0x1e94, +0x1e9a, 0x1e9b, +0x1e9e, 0x1e9e, +0x1ea0, 0x1ea0, +0x1ea2, 0x1ea2, +0x1ea4, 0x1ea4, +0x1ea6, 0x1ea6, +0x1ea8, 0x1ea8, +0x1eaa, 0x1eaa, +0x1eac, 0x1eac, +0x1eae, 0x1eae, +0x1eb0, 0x1eb0, +0x1eb2, 0x1eb2, +0x1eb4, 0x1eb4, +0x1eb6, 0x1eb6, +0x1eb8, 0x1eb8, +0x1eba, 0x1eba, +0x1ebc, 0x1ebc, +0x1ebe, 0x1ebe, +0x1ec0, 0x1ec0, +0x1ec2, 0x1ec2, +0x1ec4, 0x1ec4, +0x1ec6, 0x1ec6, +0x1ec8, 0x1ec8, +0x1eca, 0x1eca, +0x1ecc, 0x1ecc, +0x1ece, 0x1ece, +0x1ed0, 0x1ed0, +0x1ed2, 0x1ed2, +0x1ed4, 0x1ed4, +0x1ed6, 0x1ed6, +0x1ed8, 0x1ed8, +0x1eda, 0x1eda, +0x1edc, 0x1edc, +0x1ede, 0x1ede, +0x1ee0, 0x1ee0, +0x1ee2, 0x1ee2, +0x1ee4, 0x1ee4, +0x1ee6, 0x1ee6, +0x1ee8, 0x1ee8, +0x1eea, 0x1eea, +0x1eec, 0x1eec, +0x1eee, 0x1eee, +0x1ef0, 0x1ef0, +0x1ef2, 0x1ef2, +0x1ef4, 0x1ef4, +0x1ef6, 0x1ef6, +0x1ef8, 0x1ef8, +0x1efa, 0x1efa, +0x1efc, 0x1efc, +0x1efe, 0x1efe, +0x1f08, 0x1f0f, +0x1f18, 0x1f1d, +0x1f28, 0x1f2f, +0x1f38, 0x1f3f, +0x1f48, 0x1f4d, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f5f, +0x1f68, 0x1f6f, +0x1f80, 0x1faf, +0x1fb2, 0x1fb4, +0x1fb7, 0x1fbc, +0x1fc2, 0x1fc4, +0x1fc7, 0x1fcc, +0x1fd8, 0x1fdb, +0x1fe8, 0x1fec, +0x1ff2, 0x1ff4, +0x1ff7, 0x1ffc, +0x2126, 0x2126, +0x212a, 0x212b, +0x2132, 0x2132, +0x2160, 0x216f, +0x2183, 0x2183, +0x24b6, 0x24cf, +0x2c00, 0x2c2f, +0x2c60, 0x2c60, +0x2c62, 0x2c64, +0x2c67, 0x2c67, +0x2c69, 0x2c69, +0x2c6b, 0x2c6b, +0x2c6d, 0x2c70, +0x2c72, 0x2c72, +0x2c75, 0x2c75, +0x2c7e, 0x2c80, +0x2c82, 0x2c82, +0x2c84, 0x2c84, +0x2c86, 0x2c86, +0x2c88, 0x2c88, +0x2c8a, 0x2c8a, +0x2c8c, 0x2c8c, +0x2c8e, 0x2c8e, +0x2c90, 0x2c90, +0x2c92, 0x2c92, +0x2c94, 0x2c94, +0x2c96, 0x2c96, +0x2c98, 0x2c98, +0x2c9a, 0x2c9a, +0x2c9c, 0x2c9c, +0x2c9e, 0x2c9e, +0x2ca0, 0x2ca0, +0x2ca2, 0x2ca2, +0x2ca4, 0x2ca4, +0x2ca6, 0x2ca6, +0x2ca8, 0x2ca8, +0x2caa, 0x2caa, +0x2cac, 0x2cac, +0x2cae, 0x2cae, +0x2cb0, 0x2cb0, +0x2cb2, 0x2cb2, +0x2cb4, 0x2cb4, +0x2cb6, 0x2cb6, +0x2cb8, 0x2cb8, +0x2cba, 0x2cba, +0x2cbc, 0x2cbc, +0x2cbe, 0x2cbe, +0x2cc0, 0x2cc0, +0x2cc2, 0x2cc2, +0x2cc4, 0x2cc4, +0x2cc6, 0x2cc6, +0x2cc8, 0x2cc8, +0x2cca, 0x2cca, +0x2ccc, 0x2ccc, +0x2cce, 0x2cce, +0x2cd0, 0x2cd0, +0x2cd2, 0x2cd2, +0x2cd4, 0x2cd4, +0x2cd6, 0x2cd6, +0x2cd8, 0x2cd8, +0x2cda, 0x2cda, +0x2cdc, 0x2cdc, +0x2cde, 0x2cde, +0x2ce0, 0x2ce0, +0x2ce2, 0x2ce2, +0x2ceb, 0x2ceb, +0x2ced, 0x2ced, +0x2cf2, 0x2cf2, +0xa640, 0xa640, +0xa642, 0xa642, +0xa644, 0xa644, +0xa646, 0xa646, +0xa648, 0xa648, +0xa64a, 0xa64a, +0xa64c, 0xa64c, +0xa64e, 0xa64e, +0xa650, 0xa650, +0xa652, 0xa652, +0xa654, 0xa654, +0xa656, 0xa656, +0xa658, 0xa658, +0xa65a, 0xa65a, +0xa65c, 0xa65c, +0xa65e, 0xa65e, +0xa660, 0xa660, +0xa662, 0xa662, +0xa664, 0xa664, +0xa666, 0xa666, +0xa668, 0xa668, +0xa66a, 0xa66a, +0xa66c, 0xa66c, +0xa680, 0xa680, +0xa682, 0xa682, +0xa684, 0xa684, +0xa686, 0xa686, +0xa688, 0xa688, +0xa68a, 0xa68a, +0xa68c, 0xa68c, +0xa68e, 0xa68e, +0xa690, 0xa690, +0xa692, 0xa692, +0xa694, 0xa694, +0xa696, 0xa696, +0xa698, 0xa698, +0xa69a, 0xa69a, +0xa722, 0xa722, +0xa724, 0xa724, +0xa726, 0xa726, +0xa728, 0xa728, +0xa72a, 0xa72a, +0xa72c, 0xa72c, +0xa72e, 0xa72e, +0xa732, 0xa732, +0xa734, 0xa734, +0xa736, 0xa736, +0xa738, 0xa738, +0xa73a, 0xa73a, +0xa73c, 0xa73c, +0xa73e, 0xa73e, +0xa740, 0xa740, +0xa742, 0xa742, +0xa744, 0xa744, +0xa746, 0xa746, +0xa748, 0xa748, +0xa74a, 0xa74a, +0xa74c, 0xa74c, +0xa74e, 0xa74e, +0xa750, 0xa750, +0xa752, 0xa752, +0xa754, 0xa754, +0xa756, 0xa756, +0xa758, 0xa758, +0xa75a, 0xa75a, +0xa75c, 0xa75c, +0xa75e, 0xa75e, +0xa760, 0xa760, +0xa762, 0xa762, +0xa764, 0xa764, +0xa766, 0xa766, +0xa768, 0xa768, +0xa76a, 0xa76a, +0xa76c, 0xa76c, +0xa76e, 0xa76e, +0xa779, 0xa779, +0xa77b, 0xa77b, +0xa77d, 0xa77e, +0xa780, 0xa780, +0xa782, 0xa782, +0xa784, 0xa784, +0xa786, 0xa786, +0xa78b, 0xa78b, +0xa78d, 0xa78d, +0xa790, 0xa790, +0xa792, 0xa792, +0xa796, 0xa796, +0xa798, 0xa798, +0xa79a, 0xa79a, +0xa79c, 0xa79c, +0xa79e, 0xa79e, +0xa7a0, 0xa7a0, +0xa7a2, 0xa7a2, +0xa7a4, 0xa7a4, +0xa7a6, 0xa7a6, +0xa7a8, 0xa7a8, +0xa7aa, 0xa7ae, +0xa7b0, 0xa7b4, +0xa7b6, 0xa7b6, +0xa7b8, 0xa7b8, +0xa7ba, 0xa7ba, +0xa7bc, 0xa7bc, +0xa7be, 0xa7be, +0xa7c0, 0xa7c0, +0xa7c2, 0xa7c2, +0xa7c4, 0xa7c7, +0xa7c9, 0xa7c9, +0xa7cb, 0xa7cc, +0xa7d0, 0xa7d0, +0xa7d6, 0xa7d6, +0xa7d8, 0xa7d8, +0xa7da, 0xa7da, +0xa7dc, 0xa7dc, +0xa7f5, 0xa7f5, +0xab70, 0xabbf, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xff21, 0xff3a, +0x10400, 0x10427, +0x104b0, 0x104d3, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10c80, 0x10cb2, +0x10d50, 0x10d65, +0x118a0, 0x118bf, +0x16e40, 0x16e5f, +0x1e900, 0x1e921, +}; /* END of CR_Changes_When_Casefolded */ + +/* PROPERTY: 'Changes_When_Casemapped': Derived Property */ +static const OnigCodePoint +CR_Changes_When_Casemapped[] = { 131, +0x0041, 0x005a, +0x0061, 0x007a, +0x00b5, 0x00b5, +0x00c0, 0x00d6, +0x00d8, 0x00f6, +0x00f8, 0x0137, +0x0139, 0x018c, +0x018e, 0x01a9, +0x01ac, 0x01b9, +0x01bc, 0x01bd, +0x01bf, 0x01bf, +0x01c4, 0x0220, +0x0222, 0x0233, +0x023a, 0x0254, +0x0256, 0x0257, +0x0259, 0x0259, +0x025b, 0x025c, +0x0260, 0x0261, +0x0263, 0x0266, +0x0268, 0x026c, +0x026f, 0x026f, +0x0271, 0x0272, +0x0275, 0x0275, +0x027d, 0x027d, +0x0280, 0x0280, +0x0282, 0x0283, +0x0287, 0x028c, +0x0292, 0x0292, +0x029d, 0x029e, +0x0345, 0x0345, +0x0370, 0x0373, +0x0376, 0x0377, +0x037b, 0x037d, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x03d1, +0x03d5, 0x03f5, +0x03f7, 0x03fb, +0x03fd, 0x0481, +0x048a, 0x052f, +0x0531, 0x0556, +0x0561, 0x0587, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x10fa, +0x10fd, 0x10ff, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1c80, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1d79, 0x1d79, +0x1d7d, 0x1d7d, +0x1d8e, 0x1d8e, +0x1e00, 0x1e9b, +0x1e9e, 0x1e9e, +0x1ea0, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fbc, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fcc, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fe0, 0x1fec, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffc, +0x2126, 0x2126, +0x212a, 0x212b, +0x2132, 0x2132, +0x214e, 0x214e, +0x2160, 0x217f, +0x2183, 0x2184, +0x24b6, 0x24e9, +0x2c00, 0x2c70, +0x2c72, 0x2c73, +0x2c75, 0x2c76, +0x2c7e, 0x2ce3, +0x2ceb, 0x2cee, +0x2cf2, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0xa640, 0xa66d, +0xa680, 0xa69b, +0xa722, 0xa72f, +0xa732, 0xa76f, +0xa779, 0xa787, +0xa78b, 0xa78d, +0xa790, 0xa794, +0xa796, 0xa7ae, +0xa7b0, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d6, 0xa7dc, +0xa7f5, 0xa7f6, +0xab53, 0xab53, +0xab70, 0xabbf, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xff21, 0xff3a, +0xff41, 0xff5a, +0x10400, 0x1044f, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10d50, 0x10d65, +0x10d70, 0x10d85, +0x118a0, 0x118df, +0x16e40, 0x16e7f, +0x1e900, 0x1e943, +}; /* END of CR_Changes_When_Casemapped */ + +/* PROPERTY: 'Changes_When_Lowercased': Derived Property */ +static const OnigCodePoint +CR_Changes_When_Lowercased[] = { 614, +0x0041, 0x005a, +0x00c0, 0x00d6, +0x00d8, 0x00de, +0x0100, 0x0100, +0x0102, 0x0102, +0x0104, 0x0104, +0x0106, 0x0106, +0x0108, 0x0108, +0x010a, 0x010a, +0x010c, 0x010c, +0x010e, 0x010e, +0x0110, 0x0110, +0x0112, 0x0112, +0x0114, 0x0114, +0x0116, 0x0116, +0x0118, 0x0118, +0x011a, 0x011a, +0x011c, 0x011c, +0x011e, 0x011e, +0x0120, 0x0120, +0x0122, 0x0122, +0x0124, 0x0124, +0x0126, 0x0126, +0x0128, 0x0128, +0x012a, 0x012a, +0x012c, 0x012c, +0x012e, 0x012e, +0x0130, 0x0130, +0x0132, 0x0132, +0x0134, 0x0134, +0x0136, 0x0136, +0x0139, 0x0139, +0x013b, 0x013b, +0x013d, 0x013d, +0x013f, 0x013f, +0x0141, 0x0141, +0x0143, 0x0143, +0x0145, 0x0145, +0x0147, 0x0147, +0x014a, 0x014a, +0x014c, 0x014c, +0x014e, 0x014e, +0x0150, 0x0150, +0x0152, 0x0152, +0x0154, 0x0154, +0x0156, 0x0156, +0x0158, 0x0158, +0x015a, 0x015a, +0x015c, 0x015c, +0x015e, 0x015e, +0x0160, 0x0160, +0x0162, 0x0162, +0x0164, 0x0164, +0x0166, 0x0166, +0x0168, 0x0168, +0x016a, 0x016a, +0x016c, 0x016c, +0x016e, 0x016e, +0x0170, 0x0170, +0x0172, 0x0172, +0x0174, 0x0174, +0x0176, 0x0176, +0x0178, 0x0179, +0x017b, 0x017b, +0x017d, 0x017d, +0x0181, 0x0182, +0x0184, 0x0184, +0x0186, 0x0187, +0x0189, 0x018b, +0x018e, 0x0191, +0x0193, 0x0194, +0x0196, 0x0198, +0x019c, 0x019d, +0x019f, 0x01a0, +0x01a2, 0x01a2, +0x01a4, 0x01a4, +0x01a6, 0x01a7, +0x01a9, 0x01a9, +0x01ac, 0x01ac, +0x01ae, 0x01af, +0x01b1, 0x01b3, +0x01b5, 0x01b5, +0x01b7, 0x01b8, +0x01bc, 0x01bc, +0x01c4, 0x01c5, +0x01c7, 0x01c8, +0x01ca, 0x01cb, +0x01cd, 0x01cd, +0x01cf, 0x01cf, +0x01d1, 0x01d1, +0x01d3, 0x01d3, +0x01d5, 0x01d5, +0x01d7, 0x01d7, +0x01d9, 0x01d9, +0x01db, 0x01db, +0x01de, 0x01de, +0x01e0, 0x01e0, +0x01e2, 0x01e2, +0x01e4, 0x01e4, +0x01e6, 0x01e6, +0x01e8, 0x01e8, +0x01ea, 0x01ea, +0x01ec, 0x01ec, +0x01ee, 0x01ee, +0x01f1, 0x01f2, +0x01f4, 0x01f4, +0x01f6, 0x01f8, +0x01fa, 0x01fa, +0x01fc, 0x01fc, +0x01fe, 0x01fe, +0x0200, 0x0200, +0x0202, 0x0202, +0x0204, 0x0204, +0x0206, 0x0206, +0x0208, 0x0208, +0x020a, 0x020a, +0x020c, 0x020c, +0x020e, 0x020e, +0x0210, 0x0210, +0x0212, 0x0212, +0x0214, 0x0214, +0x0216, 0x0216, +0x0218, 0x0218, +0x021a, 0x021a, +0x021c, 0x021c, +0x021e, 0x021e, +0x0220, 0x0220, +0x0222, 0x0222, +0x0224, 0x0224, +0x0226, 0x0226, +0x0228, 0x0228, +0x022a, 0x022a, +0x022c, 0x022c, +0x022e, 0x022e, +0x0230, 0x0230, +0x0232, 0x0232, +0x023a, 0x023b, +0x023d, 0x023e, +0x0241, 0x0241, +0x0243, 0x0246, +0x0248, 0x0248, +0x024a, 0x024a, +0x024c, 0x024c, +0x024e, 0x024e, +0x0370, 0x0370, +0x0372, 0x0372, +0x0376, 0x0376, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x038f, +0x0391, 0x03a1, +0x03a3, 0x03ab, +0x03cf, 0x03cf, +0x03d8, 0x03d8, +0x03da, 0x03da, +0x03dc, 0x03dc, +0x03de, 0x03de, +0x03e0, 0x03e0, +0x03e2, 0x03e2, +0x03e4, 0x03e4, +0x03e6, 0x03e6, +0x03e8, 0x03e8, +0x03ea, 0x03ea, +0x03ec, 0x03ec, +0x03ee, 0x03ee, +0x03f4, 0x03f4, +0x03f7, 0x03f7, +0x03f9, 0x03fa, +0x03fd, 0x042f, +0x0460, 0x0460, +0x0462, 0x0462, +0x0464, 0x0464, +0x0466, 0x0466, +0x0468, 0x0468, +0x046a, 0x046a, +0x046c, 0x046c, +0x046e, 0x046e, +0x0470, 0x0470, +0x0472, 0x0472, +0x0474, 0x0474, +0x0476, 0x0476, +0x0478, 0x0478, +0x047a, 0x047a, +0x047c, 0x047c, +0x047e, 0x047e, +0x0480, 0x0480, +0x048a, 0x048a, +0x048c, 0x048c, +0x048e, 0x048e, +0x0490, 0x0490, +0x0492, 0x0492, +0x0494, 0x0494, +0x0496, 0x0496, +0x0498, 0x0498, +0x049a, 0x049a, +0x049c, 0x049c, +0x049e, 0x049e, +0x04a0, 0x04a0, +0x04a2, 0x04a2, +0x04a4, 0x04a4, +0x04a6, 0x04a6, +0x04a8, 0x04a8, +0x04aa, 0x04aa, +0x04ac, 0x04ac, +0x04ae, 0x04ae, +0x04b0, 0x04b0, +0x04b2, 0x04b2, +0x04b4, 0x04b4, +0x04b6, 0x04b6, +0x04b8, 0x04b8, +0x04ba, 0x04ba, +0x04bc, 0x04bc, +0x04be, 0x04be, +0x04c0, 0x04c1, +0x04c3, 0x04c3, +0x04c5, 0x04c5, +0x04c7, 0x04c7, +0x04c9, 0x04c9, +0x04cb, 0x04cb, +0x04cd, 0x04cd, +0x04d0, 0x04d0, +0x04d2, 0x04d2, +0x04d4, 0x04d4, +0x04d6, 0x04d6, +0x04d8, 0x04d8, +0x04da, 0x04da, +0x04dc, 0x04dc, +0x04de, 0x04de, +0x04e0, 0x04e0, +0x04e2, 0x04e2, +0x04e4, 0x04e4, +0x04e6, 0x04e6, +0x04e8, 0x04e8, +0x04ea, 0x04ea, +0x04ec, 0x04ec, +0x04ee, 0x04ee, +0x04f0, 0x04f0, +0x04f2, 0x04f2, +0x04f4, 0x04f4, +0x04f6, 0x04f6, +0x04f8, 0x04f8, +0x04fa, 0x04fa, +0x04fc, 0x04fc, +0x04fe, 0x04fe, +0x0500, 0x0500, +0x0502, 0x0502, +0x0504, 0x0504, +0x0506, 0x0506, +0x0508, 0x0508, +0x050a, 0x050a, +0x050c, 0x050c, +0x050e, 0x050e, +0x0510, 0x0510, +0x0512, 0x0512, +0x0514, 0x0514, +0x0516, 0x0516, +0x0518, 0x0518, +0x051a, 0x051a, +0x051c, 0x051c, +0x051e, 0x051e, +0x0520, 0x0520, +0x0522, 0x0522, +0x0524, 0x0524, +0x0526, 0x0526, +0x0528, 0x0528, +0x052a, 0x052a, +0x052c, 0x052c, +0x052e, 0x052e, +0x0531, 0x0556, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x13a0, 0x13f5, +0x1c89, 0x1c89, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1e00, 0x1e00, +0x1e02, 0x1e02, +0x1e04, 0x1e04, +0x1e06, 0x1e06, +0x1e08, 0x1e08, +0x1e0a, 0x1e0a, +0x1e0c, 0x1e0c, +0x1e0e, 0x1e0e, +0x1e10, 0x1e10, +0x1e12, 0x1e12, +0x1e14, 0x1e14, +0x1e16, 0x1e16, +0x1e18, 0x1e18, +0x1e1a, 0x1e1a, +0x1e1c, 0x1e1c, +0x1e1e, 0x1e1e, +0x1e20, 0x1e20, +0x1e22, 0x1e22, +0x1e24, 0x1e24, +0x1e26, 0x1e26, +0x1e28, 0x1e28, +0x1e2a, 0x1e2a, +0x1e2c, 0x1e2c, +0x1e2e, 0x1e2e, +0x1e30, 0x1e30, +0x1e32, 0x1e32, +0x1e34, 0x1e34, +0x1e36, 0x1e36, +0x1e38, 0x1e38, +0x1e3a, 0x1e3a, +0x1e3c, 0x1e3c, +0x1e3e, 0x1e3e, +0x1e40, 0x1e40, +0x1e42, 0x1e42, +0x1e44, 0x1e44, +0x1e46, 0x1e46, +0x1e48, 0x1e48, +0x1e4a, 0x1e4a, +0x1e4c, 0x1e4c, +0x1e4e, 0x1e4e, +0x1e50, 0x1e50, +0x1e52, 0x1e52, +0x1e54, 0x1e54, +0x1e56, 0x1e56, +0x1e58, 0x1e58, +0x1e5a, 0x1e5a, +0x1e5c, 0x1e5c, +0x1e5e, 0x1e5e, +0x1e60, 0x1e60, +0x1e62, 0x1e62, +0x1e64, 0x1e64, +0x1e66, 0x1e66, +0x1e68, 0x1e68, +0x1e6a, 0x1e6a, +0x1e6c, 0x1e6c, +0x1e6e, 0x1e6e, +0x1e70, 0x1e70, +0x1e72, 0x1e72, +0x1e74, 0x1e74, +0x1e76, 0x1e76, +0x1e78, 0x1e78, +0x1e7a, 0x1e7a, +0x1e7c, 0x1e7c, +0x1e7e, 0x1e7e, +0x1e80, 0x1e80, +0x1e82, 0x1e82, +0x1e84, 0x1e84, +0x1e86, 0x1e86, +0x1e88, 0x1e88, +0x1e8a, 0x1e8a, +0x1e8c, 0x1e8c, +0x1e8e, 0x1e8e, +0x1e90, 0x1e90, +0x1e92, 0x1e92, +0x1e94, 0x1e94, +0x1e9e, 0x1e9e, +0x1ea0, 0x1ea0, +0x1ea2, 0x1ea2, +0x1ea4, 0x1ea4, +0x1ea6, 0x1ea6, +0x1ea8, 0x1ea8, +0x1eaa, 0x1eaa, +0x1eac, 0x1eac, +0x1eae, 0x1eae, +0x1eb0, 0x1eb0, +0x1eb2, 0x1eb2, +0x1eb4, 0x1eb4, +0x1eb6, 0x1eb6, +0x1eb8, 0x1eb8, +0x1eba, 0x1eba, +0x1ebc, 0x1ebc, +0x1ebe, 0x1ebe, +0x1ec0, 0x1ec0, +0x1ec2, 0x1ec2, +0x1ec4, 0x1ec4, +0x1ec6, 0x1ec6, +0x1ec8, 0x1ec8, +0x1eca, 0x1eca, +0x1ecc, 0x1ecc, +0x1ece, 0x1ece, +0x1ed0, 0x1ed0, +0x1ed2, 0x1ed2, +0x1ed4, 0x1ed4, +0x1ed6, 0x1ed6, +0x1ed8, 0x1ed8, +0x1eda, 0x1eda, +0x1edc, 0x1edc, +0x1ede, 0x1ede, +0x1ee0, 0x1ee0, +0x1ee2, 0x1ee2, +0x1ee4, 0x1ee4, +0x1ee6, 0x1ee6, +0x1ee8, 0x1ee8, +0x1eea, 0x1eea, +0x1eec, 0x1eec, +0x1eee, 0x1eee, +0x1ef0, 0x1ef0, +0x1ef2, 0x1ef2, +0x1ef4, 0x1ef4, +0x1ef6, 0x1ef6, +0x1ef8, 0x1ef8, +0x1efa, 0x1efa, +0x1efc, 0x1efc, +0x1efe, 0x1efe, +0x1f08, 0x1f0f, +0x1f18, 0x1f1d, +0x1f28, 0x1f2f, +0x1f38, 0x1f3f, +0x1f48, 0x1f4d, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f5f, +0x1f68, 0x1f6f, +0x1f88, 0x1f8f, +0x1f98, 0x1f9f, +0x1fa8, 0x1faf, +0x1fb8, 0x1fbc, +0x1fc8, 0x1fcc, +0x1fd8, 0x1fdb, +0x1fe8, 0x1fec, +0x1ff8, 0x1ffc, +0x2126, 0x2126, +0x212a, 0x212b, +0x2132, 0x2132, +0x2160, 0x216f, +0x2183, 0x2183, +0x24b6, 0x24cf, +0x2c00, 0x2c2f, +0x2c60, 0x2c60, +0x2c62, 0x2c64, +0x2c67, 0x2c67, +0x2c69, 0x2c69, +0x2c6b, 0x2c6b, +0x2c6d, 0x2c70, +0x2c72, 0x2c72, +0x2c75, 0x2c75, +0x2c7e, 0x2c80, +0x2c82, 0x2c82, +0x2c84, 0x2c84, +0x2c86, 0x2c86, +0x2c88, 0x2c88, +0x2c8a, 0x2c8a, +0x2c8c, 0x2c8c, +0x2c8e, 0x2c8e, +0x2c90, 0x2c90, +0x2c92, 0x2c92, +0x2c94, 0x2c94, +0x2c96, 0x2c96, +0x2c98, 0x2c98, +0x2c9a, 0x2c9a, +0x2c9c, 0x2c9c, +0x2c9e, 0x2c9e, +0x2ca0, 0x2ca0, +0x2ca2, 0x2ca2, +0x2ca4, 0x2ca4, +0x2ca6, 0x2ca6, +0x2ca8, 0x2ca8, +0x2caa, 0x2caa, +0x2cac, 0x2cac, +0x2cae, 0x2cae, +0x2cb0, 0x2cb0, +0x2cb2, 0x2cb2, +0x2cb4, 0x2cb4, +0x2cb6, 0x2cb6, +0x2cb8, 0x2cb8, +0x2cba, 0x2cba, +0x2cbc, 0x2cbc, +0x2cbe, 0x2cbe, +0x2cc0, 0x2cc0, +0x2cc2, 0x2cc2, +0x2cc4, 0x2cc4, +0x2cc6, 0x2cc6, +0x2cc8, 0x2cc8, +0x2cca, 0x2cca, +0x2ccc, 0x2ccc, +0x2cce, 0x2cce, +0x2cd0, 0x2cd0, +0x2cd2, 0x2cd2, +0x2cd4, 0x2cd4, +0x2cd6, 0x2cd6, +0x2cd8, 0x2cd8, +0x2cda, 0x2cda, +0x2cdc, 0x2cdc, +0x2cde, 0x2cde, +0x2ce0, 0x2ce0, +0x2ce2, 0x2ce2, +0x2ceb, 0x2ceb, +0x2ced, 0x2ced, +0x2cf2, 0x2cf2, +0xa640, 0xa640, +0xa642, 0xa642, +0xa644, 0xa644, +0xa646, 0xa646, +0xa648, 0xa648, +0xa64a, 0xa64a, +0xa64c, 0xa64c, +0xa64e, 0xa64e, +0xa650, 0xa650, +0xa652, 0xa652, +0xa654, 0xa654, +0xa656, 0xa656, +0xa658, 0xa658, +0xa65a, 0xa65a, +0xa65c, 0xa65c, +0xa65e, 0xa65e, +0xa660, 0xa660, +0xa662, 0xa662, +0xa664, 0xa664, +0xa666, 0xa666, +0xa668, 0xa668, +0xa66a, 0xa66a, +0xa66c, 0xa66c, +0xa680, 0xa680, +0xa682, 0xa682, +0xa684, 0xa684, +0xa686, 0xa686, +0xa688, 0xa688, +0xa68a, 0xa68a, +0xa68c, 0xa68c, +0xa68e, 0xa68e, +0xa690, 0xa690, +0xa692, 0xa692, +0xa694, 0xa694, +0xa696, 0xa696, +0xa698, 0xa698, +0xa69a, 0xa69a, +0xa722, 0xa722, +0xa724, 0xa724, +0xa726, 0xa726, +0xa728, 0xa728, +0xa72a, 0xa72a, +0xa72c, 0xa72c, +0xa72e, 0xa72e, +0xa732, 0xa732, +0xa734, 0xa734, +0xa736, 0xa736, +0xa738, 0xa738, +0xa73a, 0xa73a, +0xa73c, 0xa73c, +0xa73e, 0xa73e, +0xa740, 0xa740, +0xa742, 0xa742, +0xa744, 0xa744, +0xa746, 0xa746, +0xa748, 0xa748, +0xa74a, 0xa74a, +0xa74c, 0xa74c, +0xa74e, 0xa74e, +0xa750, 0xa750, +0xa752, 0xa752, +0xa754, 0xa754, +0xa756, 0xa756, +0xa758, 0xa758, +0xa75a, 0xa75a, +0xa75c, 0xa75c, +0xa75e, 0xa75e, +0xa760, 0xa760, +0xa762, 0xa762, +0xa764, 0xa764, +0xa766, 0xa766, +0xa768, 0xa768, +0xa76a, 0xa76a, +0xa76c, 0xa76c, +0xa76e, 0xa76e, +0xa779, 0xa779, +0xa77b, 0xa77b, +0xa77d, 0xa77e, +0xa780, 0xa780, +0xa782, 0xa782, +0xa784, 0xa784, +0xa786, 0xa786, +0xa78b, 0xa78b, +0xa78d, 0xa78d, +0xa790, 0xa790, +0xa792, 0xa792, +0xa796, 0xa796, +0xa798, 0xa798, +0xa79a, 0xa79a, +0xa79c, 0xa79c, +0xa79e, 0xa79e, +0xa7a0, 0xa7a0, +0xa7a2, 0xa7a2, +0xa7a4, 0xa7a4, +0xa7a6, 0xa7a6, +0xa7a8, 0xa7a8, +0xa7aa, 0xa7ae, +0xa7b0, 0xa7b4, +0xa7b6, 0xa7b6, +0xa7b8, 0xa7b8, +0xa7ba, 0xa7ba, +0xa7bc, 0xa7bc, +0xa7be, 0xa7be, +0xa7c0, 0xa7c0, +0xa7c2, 0xa7c2, +0xa7c4, 0xa7c7, +0xa7c9, 0xa7c9, +0xa7cb, 0xa7cc, +0xa7d0, 0xa7d0, +0xa7d6, 0xa7d6, +0xa7d8, 0xa7d8, +0xa7da, 0xa7da, +0xa7dc, 0xa7dc, +0xa7f5, 0xa7f5, +0xff21, 0xff3a, +0x10400, 0x10427, +0x104b0, 0x104d3, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10c80, 0x10cb2, +0x10d50, 0x10d65, +0x118a0, 0x118bf, +0x16e40, 0x16e5f, +0x1e900, 0x1e921, +}; /* END of CR_Changes_When_Lowercased */ + +/* PROPERTY: 'Changes_When_Titlecased': Derived Property */ +static const OnigCodePoint +CR_Changes_When_Titlecased[] = { 629, +0x0061, 0x007a, +0x00b5, 0x00b5, +0x00df, 0x00f6, +0x00f8, 0x00ff, +0x0101, 0x0101, +0x0103, 0x0103, +0x0105, 0x0105, +0x0107, 0x0107, +0x0109, 0x0109, +0x010b, 0x010b, +0x010d, 0x010d, +0x010f, 0x010f, +0x0111, 0x0111, +0x0113, 0x0113, +0x0115, 0x0115, +0x0117, 0x0117, +0x0119, 0x0119, +0x011b, 0x011b, +0x011d, 0x011d, +0x011f, 0x011f, +0x0121, 0x0121, +0x0123, 0x0123, +0x0125, 0x0125, +0x0127, 0x0127, +0x0129, 0x0129, +0x012b, 0x012b, +0x012d, 0x012d, +0x012f, 0x012f, +0x0131, 0x0131, +0x0133, 0x0133, +0x0135, 0x0135, +0x0137, 0x0137, +0x013a, 0x013a, +0x013c, 0x013c, +0x013e, 0x013e, +0x0140, 0x0140, +0x0142, 0x0142, +0x0144, 0x0144, +0x0146, 0x0146, +0x0148, 0x0149, +0x014b, 0x014b, +0x014d, 0x014d, +0x014f, 0x014f, +0x0151, 0x0151, +0x0153, 0x0153, +0x0155, 0x0155, +0x0157, 0x0157, +0x0159, 0x0159, +0x015b, 0x015b, +0x015d, 0x015d, +0x015f, 0x015f, +0x0161, 0x0161, +0x0163, 0x0163, +0x0165, 0x0165, +0x0167, 0x0167, +0x0169, 0x0169, +0x016b, 0x016b, +0x016d, 0x016d, +0x016f, 0x016f, +0x0171, 0x0171, +0x0173, 0x0173, +0x0175, 0x0175, +0x0177, 0x0177, +0x017a, 0x017a, +0x017c, 0x017c, +0x017e, 0x0180, +0x0183, 0x0183, +0x0185, 0x0185, +0x0188, 0x0188, +0x018c, 0x018c, +0x0192, 0x0192, +0x0195, 0x0195, +0x0199, 0x019b, +0x019e, 0x019e, +0x01a1, 0x01a1, +0x01a3, 0x01a3, +0x01a5, 0x01a5, +0x01a8, 0x01a8, +0x01ad, 0x01ad, +0x01b0, 0x01b0, +0x01b4, 0x01b4, +0x01b6, 0x01b6, +0x01b9, 0x01b9, +0x01bd, 0x01bd, +0x01bf, 0x01bf, +0x01c4, 0x01c4, +0x01c6, 0x01c7, +0x01c9, 0x01ca, +0x01cc, 0x01cc, +0x01ce, 0x01ce, +0x01d0, 0x01d0, +0x01d2, 0x01d2, +0x01d4, 0x01d4, +0x01d6, 0x01d6, +0x01d8, 0x01d8, +0x01da, 0x01da, +0x01dc, 0x01dd, +0x01df, 0x01df, +0x01e1, 0x01e1, +0x01e3, 0x01e3, +0x01e5, 0x01e5, +0x01e7, 0x01e7, +0x01e9, 0x01e9, +0x01eb, 0x01eb, +0x01ed, 0x01ed, +0x01ef, 0x01f1, +0x01f3, 0x01f3, +0x01f5, 0x01f5, +0x01f9, 0x01f9, +0x01fb, 0x01fb, +0x01fd, 0x01fd, +0x01ff, 0x01ff, +0x0201, 0x0201, +0x0203, 0x0203, +0x0205, 0x0205, +0x0207, 0x0207, +0x0209, 0x0209, +0x020b, 0x020b, +0x020d, 0x020d, +0x020f, 0x020f, +0x0211, 0x0211, +0x0213, 0x0213, +0x0215, 0x0215, +0x0217, 0x0217, +0x0219, 0x0219, +0x021b, 0x021b, +0x021d, 0x021d, +0x021f, 0x021f, +0x0223, 0x0223, +0x0225, 0x0225, +0x0227, 0x0227, +0x0229, 0x0229, +0x022b, 0x022b, +0x022d, 0x022d, +0x022f, 0x022f, +0x0231, 0x0231, +0x0233, 0x0233, +0x023c, 0x023c, +0x023f, 0x0240, +0x0242, 0x0242, +0x0247, 0x0247, +0x0249, 0x0249, +0x024b, 0x024b, +0x024d, 0x024d, +0x024f, 0x0254, +0x0256, 0x0257, +0x0259, 0x0259, +0x025b, 0x025c, +0x0260, 0x0261, +0x0263, 0x0266, +0x0268, 0x026c, +0x026f, 0x026f, +0x0271, 0x0272, +0x0275, 0x0275, +0x027d, 0x027d, +0x0280, 0x0280, +0x0282, 0x0283, +0x0287, 0x028c, +0x0292, 0x0292, +0x029d, 0x029e, +0x0345, 0x0345, +0x0371, 0x0371, +0x0373, 0x0373, +0x0377, 0x0377, +0x037b, 0x037d, +0x0390, 0x0390, +0x03ac, 0x03ce, +0x03d0, 0x03d1, +0x03d5, 0x03d7, +0x03d9, 0x03d9, +0x03db, 0x03db, +0x03dd, 0x03dd, +0x03df, 0x03df, +0x03e1, 0x03e1, +0x03e3, 0x03e3, +0x03e5, 0x03e5, +0x03e7, 0x03e7, +0x03e9, 0x03e9, +0x03eb, 0x03eb, +0x03ed, 0x03ed, +0x03ef, 0x03f3, +0x03f5, 0x03f5, +0x03f8, 0x03f8, +0x03fb, 0x03fb, +0x0430, 0x045f, +0x0461, 0x0461, +0x0463, 0x0463, +0x0465, 0x0465, +0x0467, 0x0467, +0x0469, 0x0469, +0x046b, 0x046b, +0x046d, 0x046d, +0x046f, 0x046f, +0x0471, 0x0471, +0x0473, 0x0473, +0x0475, 0x0475, +0x0477, 0x0477, +0x0479, 0x0479, +0x047b, 0x047b, +0x047d, 0x047d, +0x047f, 0x047f, +0x0481, 0x0481, +0x048b, 0x048b, +0x048d, 0x048d, +0x048f, 0x048f, +0x0491, 0x0491, +0x0493, 0x0493, +0x0495, 0x0495, +0x0497, 0x0497, +0x0499, 0x0499, +0x049b, 0x049b, +0x049d, 0x049d, +0x049f, 0x049f, +0x04a1, 0x04a1, +0x04a3, 0x04a3, +0x04a5, 0x04a5, +0x04a7, 0x04a7, +0x04a9, 0x04a9, +0x04ab, 0x04ab, +0x04ad, 0x04ad, +0x04af, 0x04af, +0x04b1, 0x04b1, +0x04b3, 0x04b3, +0x04b5, 0x04b5, +0x04b7, 0x04b7, +0x04b9, 0x04b9, +0x04bb, 0x04bb, +0x04bd, 0x04bd, +0x04bf, 0x04bf, +0x04c2, 0x04c2, +0x04c4, 0x04c4, +0x04c6, 0x04c6, +0x04c8, 0x04c8, +0x04ca, 0x04ca, +0x04cc, 0x04cc, +0x04ce, 0x04cf, +0x04d1, 0x04d1, +0x04d3, 0x04d3, +0x04d5, 0x04d5, +0x04d7, 0x04d7, +0x04d9, 0x04d9, +0x04db, 0x04db, +0x04dd, 0x04dd, +0x04df, 0x04df, +0x04e1, 0x04e1, +0x04e3, 0x04e3, +0x04e5, 0x04e5, +0x04e7, 0x04e7, +0x04e9, 0x04e9, +0x04eb, 0x04eb, +0x04ed, 0x04ed, +0x04ef, 0x04ef, +0x04f1, 0x04f1, +0x04f3, 0x04f3, +0x04f5, 0x04f5, +0x04f7, 0x04f7, +0x04f9, 0x04f9, +0x04fb, 0x04fb, +0x04fd, 0x04fd, +0x04ff, 0x04ff, +0x0501, 0x0501, +0x0503, 0x0503, +0x0505, 0x0505, +0x0507, 0x0507, +0x0509, 0x0509, +0x050b, 0x050b, +0x050d, 0x050d, +0x050f, 0x050f, +0x0511, 0x0511, +0x0513, 0x0513, +0x0515, 0x0515, +0x0517, 0x0517, +0x0519, 0x0519, +0x051b, 0x051b, +0x051d, 0x051d, +0x051f, 0x051f, +0x0521, 0x0521, +0x0523, 0x0523, +0x0525, 0x0525, +0x0527, 0x0527, +0x0529, 0x0529, +0x052b, 0x052b, +0x052d, 0x052d, +0x052f, 0x052f, +0x0561, 0x0587, +0x13f8, 0x13fd, +0x1c80, 0x1c88, +0x1c8a, 0x1c8a, +0x1d79, 0x1d79, +0x1d7d, 0x1d7d, +0x1d8e, 0x1d8e, +0x1e01, 0x1e01, +0x1e03, 0x1e03, +0x1e05, 0x1e05, +0x1e07, 0x1e07, +0x1e09, 0x1e09, +0x1e0b, 0x1e0b, +0x1e0d, 0x1e0d, +0x1e0f, 0x1e0f, +0x1e11, 0x1e11, +0x1e13, 0x1e13, +0x1e15, 0x1e15, +0x1e17, 0x1e17, +0x1e19, 0x1e19, +0x1e1b, 0x1e1b, +0x1e1d, 0x1e1d, +0x1e1f, 0x1e1f, +0x1e21, 0x1e21, +0x1e23, 0x1e23, +0x1e25, 0x1e25, +0x1e27, 0x1e27, +0x1e29, 0x1e29, +0x1e2b, 0x1e2b, +0x1e2d, 0x1e2d, +0x1e2f, 0x1e2f, +0x1e31, 0x1e31, +0x1e33, 0x1e33, +0x1e35, 0x1e35, +0x1e37, 0x1e37, +0x1e39, 0x1e39, +0x1e3b, 0x1e3b, +0x1e3d, 0x1e3d, +0x1e3f, 0x1e3f, +0x1e41, 0x1e41, +0x1e43, 0x1e43, +0x1e45, 0x1e45, +0x1e47, 0x1e47, +0x1e49, 0x1e49, +0x1e4b, 0x1e4b, +0x1e4d, 0x1e4d, +0x1e4f, 0x1e4f, +0x1e51, 0x1e51, +0x1e53, 0x1e53, +0x1e55, 0x1e55, +0x1e57, 0x1e57, +0x1e59, 0x1e59, +0x1e5b, 0x1e5b, +0x1e5d, 0x1e5d, +0x1e5f, 0x1e5f, +0x1e61, 0x1e61, +0x1e63, 0x1e63, +0x1e65, 0x1e65, +0x1e67, 0x1e67, +0x1e69, 0x1e69, +0x1e6b, 0x1e6b, +0x1e6d, 0x1e6d, +0x1e6f, 0x1e6f, +0x1e71, 0x1e71, +0x1e73, 0x1e73, +0x1e75, 0x1e75, +0x1e77, 0x1e77, +0x1e79, 0x1e79, +0x1e7b, 0x1e7b, +0x1e7d, 0x1e7d, +0x1e7f, 0x1e7f, +0x1e81, 0x1e81, +0x1e83, 0x1e83, +0x1e85, 0x1e85, +0x1e87, 0x1e87, +0x1e89, 0x1e89, +0x1e8b, 0x1e8b, +0x1e8d, 0x1e8d, +0x1e8f, 0x1e8f, +0x1e91, 0x1e91, +0x1e93, 0x1e93, +0x1e95, 0x1e9b, +0x1ea1, 0x1ea1, +0x1ea3, 0x1ea3, +0x1ea5, 0x1ea5, +0x1ea7, 0x1ea7, +0x1ea9, 0x1ea9, +0x1eab, 0x1eab, +0x1ead, 0x1ead, +0x1eaf, 0x1eaf, +0x1eb1, 0x1eb1, +0x1eb3, 0x1eb3, +0x1eb5, 0x1eb5, +0x1eb7, 0x1eb7, +0x1eb9, 0x1eb9, +0x1ebb, 0x1ebb, +0x1ebd, 0x1ebd, +0x1ebf, 0x1ebf, +0x1ec1, 0x1ec1, +0x1ec3, 0x1ec3, +0x1ec5, 0x1ec5, +0x1ec7, 0x1ec7, +0x1ec9, 0x1ec9, +0x1ecb, 0x1ecb, +0x1ecd, 0x1ecd, +0x1ecf, 0x1ecf, +0x1ed1, 0x1ed1, +0x1ed3, 0x1ed3, +0x1ed5, 0x1ed5, +0x1ed7, 0x1ed7, +0x1ed9, 0x1ed9, +0x1edb, 0x1edb, +0x1edd, 0x1edd, +0x1edf, 0x1edf, +0x1ee1, 0x1ee1, +0x1ee3, 0x1ee3, +0x1ee5, 0x1ee5, +0x1ee7, 0x1ee7, +0x1ee9, 0x1ee9, +0x1eeb, 0x1eeb, +0x1eed, 0x1eed, +0x1eef, 0x1eef, +0x1ef1, 0x1ef1, +0x1ef3, 0x1ef3, +0x1ef5, 0x1ef5, +0x1ef7, 0x1ef7, +0x1ef9, 0x1ef9, +0x1efb, 0x1efb, +0x1efd, 0x1efd, +0x1eff, 0x1f07, +0x1f10, 0x1f15, +0x1f20, 0x1f27, +0x1f30, 0x1f37, +0x1f40, 0x1f45, +0x1f50, 0x1f57, +0x1f60, 0x1f67, +0x1f70, 0x1f7d, +0x1f80, 0x1f87, +0x1f90, 0x1f97, +0x1fa0, 0x1fa7, +0x1fb0, 0x1fb4, +0x1fb6, 0x1fb7, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fc7, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fd7, +0x1fe0, 0x1fe7, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ff7, +0x214e, 0x214e, +0x2170, 0x217f, +0x2184, 0x2184, +0x24d0, 0x24e9, +0x2c30, 0x2c5f, +0x2c61, 0x2c61, +0x2c65, 0x2c66, +0x2c68, 0x2c68, +0x2c6a, 0x2c6a, +0x2c6c, 0x2c6c, +0x2c73, 0x2c73, +0x2c76, 0x2c76, +0x2c81, 0x2c81, +0x2c83, 0x2c83, +0x2c85, 0x2c85, +0x2c87, 0x2c87, +0x2c89, 0x2c89, +0x2c8b, 0x2c8b, +0x2c8d, 0x2c8d, +0x2c8f, 0x2c8f, +0x2c91, 0x2c91, +0x2c93, 0x2c93, +0x2c95, 0x2c95, +0x2c97, 0x2c97, +0x2c99, 0x2c99, +0x2c9b, 0x2c9b, +0x2c9d, 0x2c9d, +0x2c9f, 0x2c9f, +0x2ca1, 0x2ca1, +0x2ca3, 0x2ca3, +0x2ca5, 0x2ca5, +0x2ca7, 0x2ca7, +0x2ca9, 0x2ca9, +0x2cab, 0x2cab, +0x2cad, 0x2cad, +0x2caf, 0x2caf, +0x2cb1, 0x2cb1, +0x2cb3, 0x2cb3, +0x2cb5, 0x2cb5, +0x2cb7, 0x2cb7, +0x2cb9, 0x2cb9, +0x2cbb, 0x2cbb, +0x2cbd, 0x2cbd, +0x2cbf, 0x2cbf, +0x2cc1, 0x2cc1, +0x2cc3, 0x2cc3, +0x2cc5, 0x2cc5, +0x2cc7, 0x2cc7, +0x2cc9, 0x2cc9, +0x2ccb, 0x2ccb, +0x2ccd, 0x2ccd, +0x2ccf, 0x2ccf, +0x2cd1, 0x2cd1, +0x2cd3, 0x2cd3, +0x2cd5, 0x2cd5, +0x2cd7, 0x2cd7, +0x2cd9, 0x2cd9, +0x2cdb, 0x2cdb, +0x2cdd, 0x2cdd, +0x2cdf, 0x2cdf, +0x2ce1, 0x2ce1, +0x2ce3, 0x2ce3, +0x2cec, 0x2cec, +0x2cee, 0x2cee, +0x2cf3, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0xa641, 0xa641, +0xa643, 0xa643, +0xa645, 0xa645, +0xa647, 0xa647, +0xa649, 0xa649, +0xa64b, 0xa64b, +0xa64d, 0xa64d, +0xa64f, 0xa64f, +0xa651, 0xa651, +0xa653, 0xa653, +0xa655, 0xa655, +0xa657, 0xa657, +0xa659, 0xa659, +0xa65b, 0xa65b, +0xa65d, 0xa65d, +0xa65f, 0xa65f, +0xa661, 0xa661, +0xa663, 0xa663, +0xa665, 0xa665, +0xa667, 0xa667, +0xa669, 0xa669, +0xa66b, 0xa66b, +0xa66d, 0xa66d, +0xa681, 0xa681, +0xa683, 0xa683, +0xa685, 0xa685, +0xa687, 0xa687, +0xa689, 0xa689, +0xa68b, 0xa68b, +0xa68d, 0xa68d, +0xa68f, 0xa68f, +0xa691, 0xa691, +0xa693, 0xa693, +0xa695, 0xa695, +0xa697, 0xa697, +0xa699, 0xa699, +0xa69b, 0xa69b, +0xa723, 0xa723, +0xa725, 0xa725, +0xa727, 0xa727, +0xa729, 0xa729, +0xa72b, 0xa72b, +0xa72d, 0xa72d, +0xa72f, 0xa72f, +0xa733, 0xa733, +0xa735, 0xa735, +0xa737, 0xa737, +0xa739, 0xa739, +0xa73b, 0xa73b, +0xa73d, 0xa73d, +0xa73f, 0xa73f, +0xa741, 0xa741, +0xa743, 0xa743, +0xa745, 0xa745, +0xa747, 0xa747, +0xa749, 0xa749, +0xa74b, 0xa74b, +0xa74d, 0xa74d, +0xa74f, 0xa74f, +0xa751, 0xa751, +0xa753, 0xa753, +0xa755, 0xa755, +0xa757, 0xa757, +0xa759, 0xa759, +0xa75b, 0xa75b, +0xa75d, 0xa75d, +0xa75f, 0xa75f, +0xa761, 0xa761, +0xa763, 0xa763, +0xa765, 0xa765, +0xa767, 0xa767, +0xa769, 0xa769, +0xa76b, 0xa76b, +0xa76d, 0xa76d, +0xa76f, 0xa76f, +0xa77a, 0xa77a, +0xa77c, 0xa77c, +0xa77f, 0xa77f, +0xa781, 0xa781, +0xa783, 0xa783, +0xa785, 0xa785, +0xa787, 0xa787, +0xa78c, 0xa78c, +0xa791, 0xa791, +0xa793, 0xa794, +0xa797, 0xa797, +0xa799, 0xa799, +0xa79b, 0xa79b, +0xa79d, 0xa79d, +0xa79f, 0xa79f, +0xa7a1, 0xa7a1, +0xa7a3, 0xa7a3, +0xa7a5, 0xa7a5, +0xa7a7, 0xa7a7, +0xa7a9, 0xa7a9, +0xa7b5, 0xa7b5, +0xa7b7, 0xa7b7, +0xa7b9, 0xa7b9, +0xa7bb, 0xa7bb, +0xa7bd, 0xa7bd, +0xa7bf, 0xa7bf, +0xa7c1, 0xa7c1, +0xa7c3, 0xa7c3, +0xa7c8, 0xa7c8, +0xa7ca, 0xa7ca, +0xa7cd, 0xa7cd, +0xa7d1, 0xa7d1, +0xa7d7, 0xa7d7, +0xa7d9, 0xa7d9, +0xa7db, 0xa7db, +0xa7f6, 0xa7f6, +0xab53, 0xab53, +0xab70, 0xabbf, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xff41, 0xff5a, +0x10428, 0x1044f, +0x104d8, 0x104fb, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x10cc0, 0x10cf2, +0x10d70, 0x10d85, +0x118c0, 0x118df, +0x16e60, 0x16e7f, +0x1e922, 0x1e943, +}; /* END of CR_Changes_When_Titlecased */ + +/* PROPERTY: 'Changes_When_Uppercased': Derived Property */ +static const OnigCodePoint +CR_Changes_When_Uppercased[] = { 630, +0x0061, 0x007a, +0x00b5, 0x00b5, +0x00df, 0x00f6, +0x00f8, 0x00ff, +0x0101, 0x0101, +0x0103, 0x0103, +0x0105, 0x0105, +0x0107, 0x0107, +0x0109, 0x0109, +0x010b, 0x010b, +0x010d, 0x010d, +0x010f, 0x010f, +0x0111, 0x0111, +0x0113, 0x0113, +0x0115, 0x0115, +0x0117, 0x0117, +0x0119, 0x0119, +0x011b, 0x011b, +0x011d, 0x011d, +0x011f, 0x011f, +0x0121, 0x0121, +0x0123, 0x0123, +0x0125, 0x0125, +0x0127, 0x0127, +0x0129, 0x0129, +0x012b, 0x012b, +0x012d, 0x012d, +0x012f, 0x012f, +0x0131, 0x0131, +0x0133, 0x0133, +0x0135, 0x0135, +0x0137, 0x0137, +0x013a, 0x013a, +0x013c, 0x013c, +0x013e, 0x013e, +0x0140, 0x0140, +0x0142, 0x0142, +0x0144, 0x0144, +0x0146, 0x0146, +0x0148, 0x0149, +0x014b, 0x014b, +0x014d, 0x014d, +0x014f, 0x014f, +0x0151, 0x0151, +0x0153, 0x0153, +0x0155, 0x0155, +0x0157, 0x0157, +0x0159, 0x0159, +0x015b, 0x015b, +0x015d, 0x015d, +0x015f, 0x015f, +0x0161, 0x0161, +0x0163, 0x0163, +0x0165, 0x0165, +0x0167, 0x0167, +0x0169, 0x0169, +0x016b, 0x016b, +0x016d, 0x016d, +0x016f, 0x016f, +0x0171, 0x0171, +0x0173, 0x0173, +0x0175, 0x0175, +0x0177, 0x0177, +0x017a, 0x017a, +0x017c, 0x017c, +0x017e, 0x0180, +0x0183, 0x0183, +0x0185, 0x0185, +0x0188, 0x0188, +0x018c, 0x018c, +0x0192, 0x0192, +0x0195, 0x0195, +0x0199, 0x019b, +0x019e, 0x019e, +0x01a1, 0x01a1, +0x01a3, 0x01a3, +0x01a5, 0x01a5, +0x01a8, 0x01a8, +0x01ad, 0x01ad, +0x01b0, 0x01b0, +0x01b4, 0x01b4, +0x01b6, 0x01b6, +0x01b9, 0x01b9, +0x01bd, 0x01bd, +0x01bf, 0x01bf, +0x01c5, 0x01c6, +0x01c8, 0x01c9, +0x01cb, 0x01cc, +0x01ce, 0x01ce, +0x01d0, 0x01d0, +0x01d2, 0x01d2, +0x01d4, 0x01d4, +0x01d6, 0x01d6, +0x01d8, 0x01d8, +0x01da, 0x01da, +0x01dc, 0x01dd, +0x01df, 0x01df, +0x01e1, 0x01e1, +0x01e3, 0x01e3, +0x01e5, 0x01e5, +0x01e7, 0x01e7, +0x01e9, 0x01e9, +0x01eb, 0x01eb, +0x01ed, 0x01ed, +0x01ef, 0x01f0, +0x01f2, 0x01f3, +0x01f5, 0x01f5, +0x01f9, 0x01f9, +0x01fb, 0x01fb, +0x01fd, 0x01fd, +0x01ff, 0x01ff, +0x0201, 0x0201, +0x0203, 0x0203, +0x0205, 0x0205, +0x0207, 0x0207, +0x0209, 0x0209, +0x020b, 0x020b, +0x020d, 0x020d, +0x020f, 0x020f, +0x0211, 0x0211, +0x0213, 0x0213, +0x0215, 0x0215, +0x0217, 0x0217, +0x0219, 0x0219, +0x021b, 0x021b, +0x021d, 0x021d, +0x021f, 0x021f, +0x0223, 0x0223, +0x0225, 0x0225, +0x0227, 0x0227, +0x0229, 0x0229, +0x022b, 0x022b, +0x022d, 0x022d, +0x022f, 0x022f, +0x0231, 0x0231, +0x0233, 0x0233, +0x023c, 0x023c, +0x023f, 0x0240, +0x0242, 0x0242, +0x0247, 0x0247, +0x0249, 0x0249, +0x024b, 0x024b, +0x024d, 0x024d, +0x024f, 0x0254, +0x0256, 0x0257, +0x0259, 0x0259, +0x025b, 0x025c, +0x0260, 0x0261, +0x0263, 0x0266, +0x0268, 0x026c, +0x026f, 0x026f, +0x0271, 0x0272, +0x0275, 0x0275, +0x027d, 0x027d, +0x0280, 0x0280, +0x0282, 0x0283, +0x0287, 0x028c, +0x0292, 0x0292, +0x029d, 0x029e, +0x0345, 0x0345, +0x0371, 0x0371, +0x0373, 0x0373, +0x0377, 0x0377, +0x037b, 0x037d, +0x0390, 0x0390, +0x03ac, 0x03ce, +0x03d0, 0x03d1, +0x03d5, 0x03d7, +0x03d9, 0x03d9, +0x03db, 0x03db, +0x03dd, 0x03dd, +0x03df, 0x03df, +0x03e1, 0x03e1, +0x03e3, 0x03e3, +0x03e5, 0x03e5, +0x03e7, 0x03e7, +0x03e9, 0x03e9, +0x03eb, 0x03eb, +0x03ed, 0x03ed, +0x03ef, 0x03f3, +0x03f5, 0x03f5, +0x03f8, 0x03f8, +0x03fb, 0x03fb, +0x0430, 0x045f, +0x0461, 0x0461, +0x0463, 0x0463, +0x0465, 0x0465, +0x0467, 0x0467, +0x0469, 0x0469, +0x046b, 0x046b, +0x046d, 0x046d, +0x046f, 0x046f, +0x0471, 0x0471, +0x0473, 0x0473, +0x0475, 0x0475, +0x0477, 0x0477, +0x0479, 0x0479, +0x047b, 0x047b, +0x047d, 0x047d, +0x047f, 0x047f, +0x0481, 0x0481, +0x048b, 0x048b, +0x048d, 0x048d, +0x048f, 0x048f, +0x0491, 0x0491, +0x0493, 0x0493, +0x0495, 0x0495, +0x0497, 0x0497, +0x0499, 0x0499, +0x049b, 0x049b, +0x049d, 0x049d, +0x049f, 0x049f, +0x04a1, 0x04a1, +0x04a3, 0x04a3, +0x04a5, 0x04a5, +0x04a7, 0x04a7, +0x04a9, 0x04a9, +0x04ab, 0x04ab, +0x04ad, 0x04ad, +0x04af, 0x04af, +0x04b1, 0x04b1, +0x04b3, 0x04b3, +0x04b5, 0x04b5, +0x04b7, 0x04b7, +0x04b9, 0x04b9, +0x04bb, 0x04bb, +0x04bd, 0x04bd, +0x04bf, 0x04bf, +0x04c2, 0x04c2, +0x04c4, 0x04c4, +0x04c6, 0x04c6, +0x04c8, 0x04c8, +0x04ca, 0x04ca, +0x04cc, 0x04cc, +0x04ce, 0x04cf, +0x04d1, 0x04d1, +0x04d3, 0x04d3, +0x04d5, 0x04d5, +0x04d7, 0x04d7, +0x04d9, 0x04d9, +0x04db, 0x04db, +0x04dd, 0x04dd, +0x04df, 0x04df, +0x04e1, 0x04e1, +0x04e3, 0x04e3, +0x04e5, 0x04e5, +0x04e7, 0x04e7, +0x04e9, 0x04e9, +0x04eb, 0x04eb, +0x04ed, 0x04ed, +0x04ef, 0x04ef, +0x04f1, 0x04f1, +0x04f3, 0x04f3, +0x04f5, 0x04f5, +0x04f7, 0x04f7, +0x04f9, 0x04f9, +0x04fb, 0x04fb, +0x04fd, 0x04fd, +0x04ff, 0x04ff, +0x0501, 0x0501, +0x0503, 0x0503, +0x0505, 0x0505, +0x0507, 0x0507, +0x0509, 0x0509, +0x050b, 0x050b, +0x050d, 0x050d, +0x050f, 0x050f, +0x0511, 0x0511, +0x0513, 0x0513, +0x0515, 0x0515, +0x0517, 0x0517, +0x0519, 0x0519, +0x051b, 0x051b, +0x051d, 0x051d, +0x051f, 0x051f, +0x0521, 0x0521, +0x0523, 0x0523, +0x0525, 0x0525, +0x0527, 0x0527, +0x0529, 0x0529, +0x052b, 0x052b, +0x052d, 0x052d, +0x052f, 0x052f, +0x0561, 0x0587, +0x10d0, 0x10fa, +0x10fd, 0x10ff, +0x13f8, 0x13fd, +0x1c80, 0x1c88, +0x1c8a, 0x1c8a, +0x1d79, 0x1d79, +0x1d7d, 0x1d7d, +0x1d8e, 0x1d8e, +0x1e01, 0x1e01, +0x1e03, 0x1e03, +0x1e05, 0x1e05, +0x1e07, 0x1e07, +0x1e09, 0x1e09, +0x1e0b, 0x1e0b, +0x1e0d, 0x1e0d, +0x1e0f, 0x1e0f, +0x1e11, 0x1e11, +0x1e13, 0x1e13, +0x1e15, 0x1e15, +0x1e17, 0x1e17, +0x1e19, 0x1e19, +0x1e1b, 0x1e1b, +0x1e1d, 0x1e1d, +0x1e1f, 0x1e1f, +0x1e21, 0x1e21, +0x1e23, 0x1e23, +0x1e25, 0x1e25, +0x1e27, 0x1e27, +0x1e29, 0x1e29, +0x1e2b, 0x1e2b, +0x1e2d, 0x1e2d, +0x1e2f, 0x1e2f, +0x1e31, 0x1e31, +0x1e33, 0x1e33, +0x1e35, 0x1e35, +0x1e37, 0x1e37, +0x1e39, 0x1e39, +0x1e3b, 0x1e3b, +0x1e3d, 0x1e3d, +0x1e3f, 0x1e3f, +0x1e41, 0x1e41, +0x1e43, 0x1e43, +0x1e45, 0x1e45, +0x1e47, 0x1e47, +0x1e49, 0x1e49, +0x1e4b, 0x1e4b, +0x1e4d, 0x1e4d, +0x1e4f, 0x1e4f, +0x1e51, 0x1e51, +0x1e53, 0x1e53, +0x1e55, 0x1e55, +0x1e57, 0x1e57, +0x1e59, 0x1e59, +0x1e5b, 0x1e5b, +0x1e5d, 0x1e5d, +0x1e5f, 0x1e5f, +0x1e61, 0x1e61, +0x1e63, 0x1e63, +0x1e65, 0x1e65, +0x1e67, 0x1e67, +0x1e69, 0x1e69, +0x1e6b, 0x1e6b, +0x1e6d, 0x1e6d, +0x1e6f, 0x1e6f, +0x1e71, 0x1e71, +0x1e73, 0x1e73, +0x1e75, 0x1e75, +0x1e77, 0x1e77, +0x1e79, 0x1e79, +0x1e7b, 0x1e7b, +0x1e7d, 0x1e7d, +0x1e7f, 0x1e7f, +0x1e81, 0x1e81, +0x1e83, 0x1e83, +0x1e85, 0x1e85, +0x1e87, 0x1e87, +0x1e89, 0x1e89, +0x1e8b, 0x1e8b, +0x1e8d, 0x1e8d, +0x1e8f, 0x1e8f, +0x1e91, 0x1e91, +0x1e93, 0x1e93, +0x1e95, 0x1e9b, +0x1ea1, 0x1ea1, +0x1ea3, 0x1ea3, +0x1ea5, 0x1ea5, +0x1ea7, 0x1ea7, +0x1ea9, 0x1ea9, +0x1eab, 0x1eab, +0x1ead, 0x1ead, +0x1eaf, 0x1eaf, +0x1eb1, 0x1eb1, +0x1eb3, 0x1eb3, +0x1eb5, 0x1eb5, +0x1eb7, 0x1eb7, +0x1eb9, 0x1eb9, +0x1ebb, 0x1ebb, +0x1ebd, 0x1ebd, +0x1ebf, 0x1ebf, +0x1ec1, 0x1ec1, +0x1ec3, 0x1ec3, +0x1ec5, 0x1ec5, +0x1ec7, 0x1ec7, +0x1ec9, 0x1ec9, +0x1ecb, 0x1ecb, +0x1ecd, 0x1ecd, +0x1ecf, 0x1ecf, +0x1ed1, 0x1ed1, +0x1ed3, 0x1ed3, +0x1ed5, 0x1ed5, +0x1ed7, 0x1ed7, +0x1ed9, 0x1ed9, +0x1edb, 0x1edb, +0x1edd, 0x1edd, +0x1edf, 0x1edf, +0x1ee1, 0x1ee1, +0x1ee3, 0x1ee3, +0x1ee5, 0x1ee5, +0x1ee7, 0x1ee7, +0x1ee9, 0x1ee9, +0x1eeb, 0x1eeb, +0x1eed, 0x1eed, +0x1eef, 0x1eef, +0x1ef1, 0x1ef1, +0x1ef3, 0x1ef3, +0x1ef5, 0x1ef5, +0x1ef7, 0x1ef7, +0x1ef9, 0x1ef9, +0x1efb, 0x1efb, +0x1efd, 0x1efd, +0x1eff, 0x1f07, +0x1f10, 0x1f15, +0x1f20, 0x1f27, +0x1f30, 0x1f37, +0x1f40, 0x1f45, +0x1f50, 0x1f57, +0x1f60, 0x1f67, +0x1f70, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fb7, +0x1fbc, 0x1fbc, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fc7, +0x1fcc, 0x1fcc, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fd7, +0x1fe0, 0x1fe7, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ff7, +0x1ffc, 0x1ffc, +0x214e, 0x214e, +0x2170, 0x217f, +0x2184, 0x2184, +0x24d0, 0x24e9, +0x2c30, 0x2c5f, +0x2c61, 0x2c61, +0x2c65, 0x2c66, +0x2c68, 0x2c68, +0x2c6a, 0x2c6a, +0x2c6c, 0x2c6c, +0x2c73, 0x2c73, +0x2c76, 0x2c76, +0x2c81, 0x2c81, +0x2c83, 0x2c83, +0x2c85, 0x2c85, +0x2c87, 0x2c87, +0x2c89, 0x2c89, +0x2c8b, 0x2c8b, +0x2c8d, 0x2c8d, +0x2c8f, 0x2c8f, +0x2c91, 0x2c91, +0x2c93, 0x2c93, +0x2c95, 0x2c95, +0x2c97, 0x2c97, +0x2c99, 0x2c99, +0x2c9b, 0x2c9b, +0x2c9d, 0x2c9d, +0x2c9f, 0x2c9f, +0x2ca1, 0x2ca1, +0x2ca3, 0x2ca3, +0x2ca5, 0x2ca5, +0x2ca7, 0x2ca7, +0x2ca9, 0x2ca9, +0x2cab, 0x2cab, +0x2cad, 0x2cad, +0x2caf, 0x2caf, +0x2cb1, 0x2cb1, +0x2cb3, 0x2cb3, +0x2cb5, 0x2cb5, +0x2cb7, 0x2cb7, +0x2cb9, 0x2cb9, +0x2cbb, 0x2cbb, +0x2cbd, 0x2cbd, +0x2cbf, 0x2cbf, +0x2cc1, 0x2cc1, +0x2cc3, 0x2cc3, +0x2cc5, 0x2cc5, +0x2cc7, 0x2cc7, +0x2cc9, 0x2cc9, +0x2ccb, 0x2ccb, +0x2ccd, 0x2ccd, +0x2ccf, 0x2ccf, +0x2cd1, 0x2cd1, +0x2cd3, 0x2cd3, +0x2cd5, 0x2cd5, +0x2cd7, 0x2cd7, +0x2cd9, 0x2cd9, +0x2cdb, 0x2cdb, +0x2cdd, 0x2cdd, +0x2cdf, 0x2cdf, +0x2ce1, 0x2ce1, +0x2ce3, 0x2ce3, +0x2cec, 0x2cec, +0x2cee, 0x2cee, +0x2cf3, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0xa641, 0xa641, +0xa643, 0xa643, +0xa645, 0xa645, +0xa647, 0xa647, +0xa649, 0xa649, +0xa64b, 0xa64b, +0xa64d, 0xa64d, +0xa64f, 0xa64f, +0xa651, 0xa651, +0xa653, 0xa653, +0xa655, 0xa655, +0xa657, 0xa657, +0xa659, 0xa659, +0xa65b, 0xa65b, +0xa65d, 0xa65d, +0xa65f, 0xa65f, +0xa661, 0xa661, +0xa663, 0xa663, +0xa665, 0xa665, +0xa667, 0xa667, +0xa669, 0xa669, +0xa66b, 0xa66b, +0xa66d, 0xa66d, +0xa681, 0xa681, +0xa683, 0xa683, +0xa685, 0xa685, +0xa687, 0xa687, +0xa689, 0xa689, +0xa68b, 0xa68b, +0xa68d, 0xa68d, +0xa68f, 0xa68f, +0xa691, 0xa691, +0xa693, 0xa693, +0xa695, 0xa695, +0xa697, 0xa697, +0xa699, 0xa699, +0xa69b, 0xa69b, +0xa723, 0xa723, +0xa725, 0xa725, +0xa727, 0xa727, +0xa729, 0xa729, +0xa72b, 0xa72b, +0xa72d, 0xa72d, +0xa72f, 0xa72f, +0xa733, 0xa733, +0xa735, 0xa735, +0xa737, 0xa737, +0xa739, 0xa739, +0xa73b, 0xa73b, +0xa73d, 0xa73d, +0xa73f, 0xa73f, +0xa741, 0xa741, +0xa743, 0xa743, +0xa745, 0xa745, +0xa747, 0xa747, +0xa749, 0xa749, +0xa74b, 0xa74b, +0xa74d, 0xa74d, +0xa74f, 0xa74f, +0xa751, 0xa751, +0xa753, 0xa753, +0xa755, 0xa755, +0xa757, 0xa757, +0xa759, 0xa759, +0xa75b, 0xa75b, +0xa75d, 0xa75d, +0xa75f, 0xa75f, +0xa761, 0xa761, +0xa763, 0xa763, +0xa765, 0xa765, +0xa767, 0xa767, +0xa769, 0xa769, +0xa76b, 0xa76b, +0xa76d, 0xa76d, +0xa76f, 0xa76f, +0xa77a, 0xa77a, +0xa77c, 0xa77c, +0xa77f, 0xa77f, +0xa781, 0xa781, +0xa783, 0xa783, +0xa785, 0xa785, +0xa787, 0xa787, +0xa78c, 0xa78c, +0xa791, 0xa791, +0xa793, 0xa794, +0xa797, 0xa797, +0xa799, 0xa799, +0xa79b, 0xa79b, +0xa79d, 0xa79d, +0xa79f, 0xa79f, +0xa7a1, 0xa7a1, +0xa7a3, 0xa7a3, +0xa7a5, 0xa7a5, +0xa7a7, 0xa7a7, +0xa7a9, 0xa7a9, +0xa7b5, 0xa7b5, +0xa7b7, 0xa7b7, +0xa7b9, 0xa7b9, +0xa7bb, 0xa7bb, +0xa7bd, 0xa7bd, +0xa7bf, 0xa7bf, +0xa7c1, 0xa7c1, +0xa7c3, 0xa7c3, +0xa7c8, 0xa7c8, +0xa7ca, 0xa7ca, +0xa7cd, 0xa7cd, +0xa7d1, 0xa7d1, +0xa7d7, 0xa7d7, +0xa7d9, 0xa7d9, +0xa7db, 0xa7db, +0xa7f6, 0xa7f6, +0xab53, 0xab53, +0xab70, 0xabbf, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xff41, 0xff5a, +0x10428, 0x1044f, +0x104d8, 0x104fb, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x10cc0, 0x10cf2, +0x10d70, 0x10d85, +0x118c0, 0x118df, +0x16e60, 0x16e7f, +0x1e922, 0x1e943, +}; /* END of CR_Changes_When_Uppercased */ + +/* PROPERTY: 'Cherokee': Script */ +static const OnigCodePoint +CR_Cherokee[] = { 3, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0xab70, 0xabbf, +}; /* END of CR_Cherokee */ + +/* PROPERTY: 'Chorasmian': Script */ +static const OnigCodePoint +CR_Chorasmian[] = { 1, +0x10fb0, 0x10fcb, +}; /* END of CR_Chorasmian */ + +/* PROPERTY: 'Cn': General Category */ +static const OnigCodePoint +CR_Cn[] = { 731, +0x0378, 0x0379, +0x0380, 0x0383, +0x038b, 0x038b, +0x038d, 0x038d, +0x03a2, 0x03a2, +0x0530, 0x0530, +0x0557, 0x0558, +0x058b, 0x058c, +0x0590, 0x0590, +0x05c8, 0x05cf, +0x05eb, 0x05ee, +0x05f5, 0x05ff, +0x070e, 0x070e, +0x074b, 0x074c, +0x07b2, 0x07bf, +0x07fb, 0x07fc, +0x082e, 0x082f, +0x083f, 0x083f, +0x085c, 0x085d, +0x085f, 0x085f, +0x086b, 0x086f, +0x088f, 0x088f, +0x0892, 0x0896, +0x0984, 0x0984, +0x098d, 0x098e, +0x0991, 0x0992, +0x09a9, 0x09a9, +0x09b1, 0x09b1, +0x09b3, 0x09b5, +0x09ba, 0x09bb, +0x09c5, 0x09c6, +0x09c9, 0x09ca, +0x09cf, 0x09d6, +0x09d8, 0x09db, +0x09de, 0x09de, +0x09e4, 0x09e5, +0x09ff, 0x0a00, +0x0a04, 0x0a04, +0x0a0b, 0x0a0e, +0x0a11, 0x0a12, +0x0a29, 0x0a29, +0x0a31, 0x0a31, +0x0a34, 0x0a34, +0x0a37, 0x0a37, +0x0a3a, 0x0a3b, +0x0a3d, 0x0a3d, +0x0a43, 0x0a46, +0x0a49, 0x0a4a, +0x0a4e, 0x0a50, +0x0a52, 0x0a58, +0x0a5d, 0x0a5d, +0x0a5f, 0x0a65, +0x0a77, 0x0a80, +0x0a84, 0x0a84, +0x0a8e, 0x0a8e, +0x0a92, 0x0a92, +0x0aa9, 0x0aa9, +0x0ab1, 0x0ab1, +0x0ab4, 0x0ab4, +0x0aba, 0x0abb, +0x0ac6, 0x0ac6, +0x0aca, 0x0aca, +0x0ace, 0x0acf, +0x0ad1, 0x0adf, +0x0ae4, 0x0ae5, +0x0af2, 0x0af8, +0x0b00, 0x0b00, +0x0b04, 0x0b04, +0x0b0d, 0x0b0e, +0x0b11, 0x0b12, +0x0b29, 0x0b29, +0x0b31, 0x0b31, +0x0b34, 0x0b34, +0x0b3a, 0x0b3b, +0x0b45, 0x0b46, +0x0b49, 0x0b4a, +0x0b4e, 0x0b54, +0x0b58, 0x0b5b, +0x0b5e, 0x0b5e, +0x0b64, 0x0b65, +0x0b78, 0x0b81, +0x0b84, 0x0b84, +0x0b8b, 0x0b8d, +0x0b91, 0x0b91, +0x0b96, 0x0b98, +0x0b9b, 0x0b9b, +0x0b9d, 0x0b9d, +0x0ba0, 0x0ba2, +0x0ba5, 0x0ba7, +0x0bab, 0x0bad, +0x0bba, 0x0bbd, +0x0bc3, 0x0bc5, +0x0bc9, 0x0bc9, +0x0bce, 0x0bcf, +0x0bd1, 0x0bd6, +0x0bd8, 0x0be5, +0x0bfb, 0x0bff, +0x0c0d, 0x0c0d, +0x0c11, 0x0c11, +0x0c29, 0x0c29, +0x0c3a, 0x0c3b, +0x0c45, 0x0c45, +0x0c49, 0x0c49, +0x0c4e, 0x0c54, +0x0c57, 0x0c57, +0x0c5b, 0x0c5c, +0x0c5e, 0x0c5f, +0x0c64, 0x0c65, +0x0c70, 0x0c76, +0x0c8d, 0x0c8d, +0x0c91, 0x0c91, +0x0ca9, 0x0ca9, +0x0cb4, 0x0cb4, +0x0cba, 0x0cbb, +0x0cc5, 0x0cc5, +0x0cc9, 0x0cc9, +0x0cce, 0x0cd4, +0x0cd7, 0x0cdc, +0x0cdf, 0x0cdf, +0x0ce4, 0x0ce5, +0x0cf0, 0x0cf0, +0x0cf4, 0x0cff, +0x0d0d, 0x0d0d, +0x0d11, 0x0d11, +0x0d45, 0x0d45, +0x0d49, 0x0d49, +0x0d50, 0x0d53, +0x0d64, 0x0d65, +0x0d80, 0x0d80, +0x0d84, 0x0d84, +0x0d97, 0x0d99, +0x0db2, 0x0db2, +0x0dbc, 0x0dbc, +0x0dbe, 0x0dbf, +0x0dc7, 0x0dc9, +0x0dcb, 0x0dce, +0x0dd5, 0x0dd5, +0x0dd7, 0x0dd7, +0x0de0, 0x0de5, +0x0df0, 0x0df1, +0x0df5, 0x0e00, +0x0e3b, 0x0e3e, +0x0e5c, 0x0e80, +0x0e83, 0x0e83, +0x0e85, 0x0e85, +0x0e8b, 0x0e8b, +0x0ea4, 0x0ea4, +0x0ea6, 0x0ea6, +0x0ebe, 0x0ebf, +0x0ec5, 0x0ec5, +0x0ec7, 0x0ec7, +0x0ecf, 0x0ecf, +0x0eda, 0x0edb, +0x0ee0, 0x0eff, +0x0f48, 0x0f48, +0x0f6d, 0x0f70, +0x0f98, 0x0f98, +0x0fbd, 0x0fbd, +0x0fcd, 0x0fcd, +0x0fdb, 0x0fff, +0x10c6, 0x10c6, +0x10c8, 0x10cc, +0x10ce, 0x10cf, +0x1249, 0x1249, +0x124e, 0x124f, +0x1257, 0x1257, +0x1259, 0x1259, +0x125e, 0x125f, +0x1289, 0x1289, +0x128e, 0x128f, +0x12b1, 0x12b1, +0x12b6, 0x12b7, +0x12bf, 0x12bf, +0x12c1, 0x12c1, +0x12c6, 0x12c7, +0x12d7, 0x12d7, +0x1311, 0x1311, +0x1316, 0x1317, +0x135b, 0x135c, +0x137d, 0x137f, +0x139a, 0x139f, +0x13f6, 0x13f7, +0x13fe, 0x13ff, +0x169d, 0x169f, +0x16f9, 0x16ff, +0x1716, 0x171e, +0x1737, 0x173f, +0x1754, 0x175f, +0x176d, 0x176d, +0x1771, 0x1771, +0x1774, 0x177f, +0x17de, 0x17df, +0x17ea, 0x17ef, +0x17fa, 0x17ff, +0x181a, 0x181f, +0x1879, 0x187f, +0x18ab, 0x18af, +0x18f6, 0x18ff, +0x191f, 0x191f, +0x192c, 0x192f, +0x193c, 0x193f, +0x1941, 0x1943, +0x196e, 0x196f, +0x1975, 0x197f, +0x19ac, 0x19af, +0x19ca, 0x19cf, +0x19db, 0x19dd, +0x1a1c, 0x1a1d, +0x1a5f, 0x1a5f, +0x1a7d, 0x1a7e, +0x1a8a, 0x1a8f, +0x1a9a, 0x1a9f, +0x1aae, 0x1aaf, +0x1acf, 0x1aff, +0x1b4d, 0x1b4d, +0x1bf4, 0x1bfb, +0x1c38, 0x1c3a, +0x1c4a, 0x1c4c, +0x1c8b, 0x1c8f, +0x1cbb, 0x1cbc, +0x1cc8, 0x1ccf, +0x1cfb, 0x1cff, +0x1f16, 0x1f17, +0x1f1e, 0x1f1f, +0x1f46, 0x1f47, +0x1f4e, 0x1f4f, +0x1f58, 0x1f58, +0x1f5a, 0x1f5a, +0x1f5c, 0x1f5c, +0x1f5e, 0x1f5e, +0x1f7e, 0x1f7f, +0x1fb5, 0x1fb5, +0x1fc5, 0x1fc5, +0x1fd4, 0x1fd5, +0x1fdc, 0x1fdc, +0x1ff0, 0x1ff1, +0x1ff5, 0x1ff5, +0x1fff, 0x1fff, +0x2065, 0x2065, +0x2072, 0x2073, +0x208f, 0x208f, +0x209d, 0x209f, +0x20c1, 0x20cf, +0x20f1, 0x20ff, +0x218c, 0x218f, +0x242a, 0x243f, +0x244b, 0x245f, +0x2b74, 0x2b75, +0x2b96, 0x2b96, +0x2cf4, 0x2cf8, +0x2d26, 0x2d26, +0x2d28, 0x2d2c, +0x2d2e, 0x2d2f, +0x2d68, 0x2d6e, +0x2d71, 0x2d7e, +0x2d97, 0x2d9f, +0x2da7, 0x2da7, +0x2daf, 0x2daf, +0x2db7, 0x2db7, +0x2dbf, 0x2dbf, +0x2dc7, 0x2dc7, +0x2dcf, 0x2dcf, +0x2dd7, 0x2dd7, +0x2ddf, 0x2ddf, +0x2e5e, 0x2e7f, +0x2e9a, 0x2e9a, +0x2ef4, 0x2eff, +0x2fd6, 0x2fef, +0x3040, 0x3040, +0x3097, 0x3098, +0x3100, 0x3104, +0x3130, 0x3130, +0x318f, 0x318f, +0x31e6, 0x31ee, +0x321f, 0x321f, +0xa48d, 0xa48f, +0xa4c7, 0xa4cf, +0xa62c, 0xa63f, +0xa6f8, 0xa6ff, +0xa7ce, 0xa7cf, +0xa7d2, 0xa7d2, +0xa7d4, 0xa7d4, +0xa7dd, 0xa7f1, +0xa82d, 0xa82f, +0xa83a, 0xa83f, +0xa878, 0xa87f, +0xa8c6, 0xa8cd, +0xa8da, 0xa8df, +0xa954, 0xa95e, +0xa97d, 0xa97f, +0xa9ce, 0xa9ce, +0xa9da, 0xa9dd, +0xa9ff, 0xa9ff, +0xaa37, 0xaa3f, +0xaa4e, 0xaa4f, +0xaa5a, 0xaa5b, +0xaac3, 0xaada, +0xaaf7, 0xab00, +0xab07, 0xab08, +0xab0f, 0xab10, +0xab17, 0xab1f, +0xab27, 0xab27, +0xab2f, 0xab2f, +0xab6c, 0xab6f, +0xabee, 0xabef, +0xabfa, 0xabff, +0xd7a4, 0xd7af, +0xd7c7, 0xd7ca, +0xd7fc, 0xd7ff, +0xfa6e, 0xfa6f, +0xfada, 0xfaff, +0xfb07, 0xfb12, +0xfb18, 0xfb1c, +0xfb37, 0xfb37, +0xfb3d, 0xfb3d, +0xfb3f, 0xfb3f, +0xfb42, 0xfb42, +0xfb45, 0xfb45, +0xfbc3, 0xfbd2, +0xfd90, 0xfd91, +0xfdc8, 0xfdce, +0xfdd0, 0xfdef, +0xfe1a, 0xfe1f, +0xfe53, 0xfe53, +0xfe67, 0xfe67, +0xfe6c, 0xfe6f, +0xfe75, 0xfe75, +0xfefd, 0xfefe, +0xff00, 0xff00, +0xffbf, 0xffc1, +0xffc8, 0xffc9, +0xffd0, 0xffd1, +0xffd8, 0xffd9, +0xffdd, 0xffdf, +0xffe7, 0xffe7, +0xffef, 0xfff8, +0xfffe, 0xffff, +0x1000c, 0x1000c, +0x10027, 0x10027, +0x1003b, 0x1003b, +0x1003e, 0x1003e, +0x1004e, 0x1004f, +0x1005e, 0x1007f, +0x100fb, 0x100ff, +0x10103, 0x10106, +0x10134, 0x10136, +0x1018f, 0x1018f, +0x1019d, 0x1019f, +0x101a1, 0x101cf, +0x101fe, 0x1027f, +0x1029d, 0x1029f, +0x102d1, 0x102df, +0x102fc, 0x102ff, +0x10324, 0x1032c, +0x1034b, 0x1034f, +0x1037b, 0x1037f, +0x1039e, 0x1039e, +0x103c4, 0x103c7, +0x103d6, 0x103ff, +0x1049e, 0x1049f, +0x104aa, 0x104af, +0x104d4, 0x104d7, +0x104fc, 0x104ff, +0x10528, 0x1052f, +0x10564, 0x1056e, +0x1057b, 0x1057b, +0x1058b, 0x1058b, +0x10593, 0x10593, +0x10596, 0x10596, +0x105a2, 0x105a2, +0x105b2, 0x105b2, +0x105ba, 0x105ba, +0x105bd, 0x105bf, +0x105f4, 0x105ff, +0x10737, 0x1073f, +0x10756, 0x1075f, +0x10768, 0x1077f, +0x10786, 0x10786, +0x107b1, 0x107b1, +0x107bb, 0x107ff, +0x10806, 0x10807, +0x10809, 0x10809, +0x10836, 0x10836, +0x10839, 0x1083b, +0x1083d, 0x1083e, +0x10856, 0x10856, +0x1089f, 0x108a6, +0x108b0, 0x108df, +0x108f3, 0x108f3, +0x108f6, 0x108fa, +0x1091c, 0x1091e, +0x1093a, 0x1093e, +0x10940, 0x1097f, +0x109b8, 0x109bb, +0x109d0, 0x109d1, +0x10a04, 0x10a04, +0x10a07, 0x10a0b, +0x10a14, 0x10a14, +0x10a18, 0x10a18, +0x10a36, 0x10a37, +0x10a3b, 0x10a3e, +0x10a49, 0x10a4f, +0x10a59, 0x10a5f, +0x10aa0, 0x10abf, +0x10ae7, 0x10aea, +0x10af7, 0x10aff, +0x10b36, 0x10b38, +0x10b56, 0x10b57, +0x10b73, 0x10b77, +0x10b92, 0x10b98, +0x10b9d, 0x10ba8, +0x10bb0, 0x10bff, +0x10c49, 0x10c7f, +0x10cb3, 0x10cbf, +0x10cf3, 0x10cf9, +0x10d28, 0x10d2f, +0x10d3a, 0x10d3f, +0x10d66, 0x10d68, +0x10d86, 0x10d8d, +0x10d90, 0x10e5f, +0x10e7f, 0x10e7f, +0x10eaa, 0x10eaa, +0x10eae, 0x10eaf, +0x10eb2, 0x10ec1, +0x10ec5, 0x10efb, +0x10f28, 0x10f2f, +0x10f5a, 0x10f6f, +0x10f8a, 0x10faf, +0x10fcc, 0x10fdf, +0x10ff7, 0x10fff, +0x1104e, 0x11051, +0x11076, 0x1107e, +0x110c3, 0x110cc, +0x110ce, 0x110cf, +0x110e9, 0x110ef, +0x110fa, 0x110ff, +0x11135, 0x11135, +0x11148, 0x1114f, +0x11177, 0x1117f, +0x111e0, 0x111e0, +0x111f5, 0x111ff, +0x11212, 0x11212, +0x11242, 0x1127f, +0x11287, 0x11287, +0x11289, 0x11289, +0x1128e, 0x1128e, +0x1129e, 0x1129e, +0x112aa, 0x112af, +0x112eb, 0x112ef, +0x112fa, 0x112ff, +0x11304, 0x11304, +0x1130d, 0x1130e, +0x11311, 0x11312, +0x11329, 0x11329, +0x11331, 0x11331, +0x11334, 0x11334, +0x1133a, 0x1133a, +0x11345, 0x11346, +0x11349, 0x1134a, +0x1134e, 0x1134f, +0x11351, 0x11356, +0x11358, 0x1135c, +0x11364, 0x11365, +0x1136d, 0x1136f, +0x11375, 0x1137f, +0x1138a, 0x1138a, +0x1138c, 0x1138d, +0x1138f, 0x1138f, +0x113b6, 0x113b6, +0x113c1, 0x113c1, +0x113c3, 0x113c4, +0x113c6, 0x113c6, +0x113cb, 0x113cb, +0x113d6, 0x113d6, +0x113d9, 0x113e0, +0x113e3, 0x113ff, +0x1145c, 0x1145c, +0x11462, 0x1147f, +0x114c8, 0x114cf, +0x114da, 0x1157f, +0x115b6, 0x115b7, +0x115de, 0x115ff, +0x11645, 0x1164f, +0x1165a, 0x1165f, +0x1166d, 0x1167f, +0x116ba, 0x116bf, +0x116ca, 0x116cf, +0x116e4, 0x116ff, +0x1171b, 0x1171c, +0x1172c, 0x1172f, +0x11747, 0x117ff, +0x1183c, 0x1189f, +0x118f3, 0x118fe, +0x11907, 0x11908, +0x1190a, 0x1190b, +0x11914, 0x11914, +0x11917, 0x11917, +0x11936, 0x11936, +0x11939, 0x1193a, +0x11947, 0x1194f, +0x1195a, 0x1199f, +0x119a8, 0x119a9, +0x119d8, 0x119d9, +0x119e5, 0x119ff, +0x11a48, 0x11a4f, +0x11aa3, 0x11aaf, +0x11af9, 0x11aff, +0x11b0a, 0x11bbf, +0x11be2, 0x11bef, +0x11bfa, 0x11bff, +0x11c09, 0x11c09, +0x11c37, 0x11c37, +0x11c46, 0x11c4f, +0x11c6d, 0x11c6f, +0x11c90, 0x11c91, +0x11ca8, 0x11ca8, +0x11cb7, 0x11cff, +0x11d07, 0x11d07, +0x11d0a, 0x11d0a, +0x11d37, 0x11d39, +0x11d3b, 0x11d3b, +0x11d3e, 0x11d3e, +0x11d48, 0x11d4f, +0x11d5a, 0x11d5f, +0x11d66, 0x11d66, +0x11d69, 0x11d69, +0x11d8f, 0x11d8f, +0x11d92, 0x11d92, +0x11d99, 0x11d9f, +0x11daa, 0x11edf, +0x11ef9, 0x11eff, +0x11f11, 0x11f11, +0x11f3b, 0x11f3d, +0x11f5b, 0x11faf, +0x11fb1, 0x11fbf, +0x11ff2, 0x11ffe, +0x1239a, 0x123ff, +0x1246f, 0x1246f, +0x12475, 0x1247f, +0x12544, 0x12f8f, +0x12ff3, 0x12fff, +0x13456, 0x1345f, +0x143fb, 0x143ff, +0x14647, 0x160ff, +0x1613a, 0x167ff, +0x16a39, 0x16a3f, +0x16a5f, 0x16a5f, +0x16a6a, 0x16a6d, +0x16abf, 0x16abf, +0x16aca, 0x16acf, +0x16aee, 0x16aef, +0x16af6, 0x16aff, +0x16b46, 0x16b4f, +0x16b5a, 0x16b5a, +0x16b62, 0x16b62, +0x16b78, 0x16b7c, +0x16b90, 0x16d3f, +0x16d7a, 0x16e3f, +0x16e9b, 0x16eff, +0x16f4b, 0x16f4e, +0x16f88, 0x16f8e, +0x16fa0, 0x16fdf, +0x16fe5, 0x16fef, +0x16ff2, 0x16fff, +0x187f8, 0x187ff, +0x18cd6, 0x18cfe, +0x18d09, 0x1afef, +0x1aff4, 0x1aff4, +0x1affc, 0x1affc, +0x1afff, 0x1afff, +0x1b123, 0x1b131, +0x1b133, 0x1b14f, +0x1b153, 0x1b154, +0x1b156, 0x1b163, +0x1b168, 0x1b16f, +0x1b2fc, 0x1bbff, +0x1bc6b, 0x1bc6f, +0x1bc7d, 0x1bc7f, +0x1bc89, 0x1bc8f, +0x1bc9a, 0x1bc9b, +0x1bca4, 0x1cbff, +0x1ccfa, 0x1ccff, +0x1ceb4, 0x1ceff, +0x1cf2e, 0x1cf2f, +0x1cf47, 0x1cf4f, +0x1cfc4, 0x1cfff, +0x1d0f6, 0x1d0ff, +0x1d127, 0x1d128, +0x1d1eb, 0x1d1ff, +0x1d246, 0x1d2bf, +0x1d2d4, 0x1d2df, +0x1d2f4, 0x1d2ff, +0x1d357, 0x1d35f, +0x1d379, 0x1d3ff, +0x1d455, 0x1d455, +0x1d49d, 0x1d49d, +0x1d4a0, 0x1d4a1, +0x1d4a3, 0x1d4a4, +0x1d4a7, 0x1d4a8, +0x1d4ad, 0x1d4ad, +0x1d4ba, 0x1d4ba, +0x1d4bc, 0x1d4bc, +0x1d4c4, 0x1d4c4, +0x1d506, 0x1d506, +0x1d50b, 0x1d50c, +0x1d515, 0x1d515, +0x1d51d, 0x1d51d, +0x1d53a, 0x1d53a, +0x1d53f, 0x1d53f, +0x1d545, 0x1d545, +0x1d547, 0x1d549, +0x1d551, 0x1d551, +0x1d6a6, 0x1d6a7, +0x1d7cc, 0x1d7cd, +0x1da8c, 0x1da9a, +0x1daa0, 0x1daa0, +0x1dab0, 0x1deff, +0x1df1f, 0x1df24, +0x1df2b, 0x1dfff, +0x1e007, 0x1e007, +0x1e019, 0x1e01a, +0x1e022, 0x1e022, +0x1e025, 0x1e025, +0x1e02b, 0x1e02f, +0x1e06e, 0x1e08e, +0x1e090, 0x1e0ff, +0x1e12d, 0x1e12f, +0x1e13e, 0x1e13f, +0x1e14a, 0x1e14d, +0x1e150, 0x1e28f, +0x1e2af, 0x1e2bf, +0x1e2fa, 0x1e2fe, +0x1e300, 0x1e4cf, +0x1e4fa, 0x1e5cf, +0x1e5fb, 0x1e5fe, +0x1e600, 0x1e7df, +0x1e7e7, 0x1e7e7, +0x1e7ec, 0x1e7ec, +0x1e7ef, 0x1e7ef, +0x1e7ff, 0x1e7ff, +0x1e8c5, 0x1e8c6, +0x1e8d7, 0x1e8ff, +0x1e94c, 0x1e94f, +0x1e95a, 0x1e95d, +0x1e960, 0x1ec70, +0x1ecb5, 0x1ed00, +0x1ed3e, 0x1edff, +0x1ee04, 0x1ee04, +0x1ee20, 0x1ee20, +0x1ee23, 0x1ee23, +0x1ee25, 0x1ee26, +0x1ee28, 0x1ee28, +0x1ee33, 0x1ee33, +0x1ee38, 0x1ee38, +0x1ee3a, 0x1ee3a, +0x1ee3c, 0x1ee41, +0x1ee43, 0x1ee46, +0x1ee48, 0x1ee48, +0x1ee4a, 0x1ee4a, +0x1ee4c, 0x1ee4c, +0x1ee50, 0x1ee50, +0x1ee53, 0x1ee53, +0x1ee55, 0x1ee56, +0x1ee58, 0x1ee58, +0x1ee5a, 0x1ee5a, +0x1ee5c, 0x1ee5c, +0x1ee5e, 0x1ee5e, +0x1ee60, 0x1ee60, +0x1ee63, 0x1ee63, +0x1ee65, 0x1ee66, +0x1ee6b, 0x1ee6b, +0x1ee73, 0x1ee73, +0x1ee78, 0x1ee78, +0x1ee7d, 0x1ee7d, +0x1ee7f, 0x1ee7f, +0x1ee8a, 0x1ee8a, +0x1ee9c, 0x1eea0, +0x1eea4, 0x1eea4, +0x1eeaa, 0x1eeaa, +0x1eebc, 0x1eeef, +0x1eef2, 0x1efff, +0x1f02c, 0x1f02f, +0x1f094, 0x1f09f, +0x1f0af, 0x1f0b0, +0x1f0c0, 0x1f0c0, +0x1f0d0, 0x1f0d0, +0x1f0f6, 0x1f0ff, +0x1f1ae, 0x1f1e5, +0x1f203, 0x1f20f, +0x1f23c, 0x1f23f, +0x1f249, 0x1f24f, +0x1f252, 0x1f25f, +0x1f266, 0x1f2ff, +0x1f6d8, 0x1f6db, +0x1f6ed, 0x1f6ef, +0x1f6fd, 0x1f6ff, +0x1f777, 0x1f77a, +0x1f7da, 0x1f7df, +0x1f7ec, 0x1f7ef, +0x1f7f1, 0x1f7ff, +0x1f80c, 0x1f80f, +0x1f848, 0x1f84f, +0x1f85a, 0x1f85f, +0x1f888, 0x1f88f, +0x1f8ae, 0x1f8af, +0x1f8bc, 0x1f8bf, +0x1f8c2, 0x1f8ff, +0x1fa54, 0x1fa5f, +0x1fa6e, 0x1fa6f, +0x1fa7d, 0x1fa7f, +0x1fa8a, 0x1fa8e, +0x1fac7, 0x1facd, +0x1fadd, 0x1fade, +0x1faea, 0x1faef, +0x1faf9, 0x1faff, +0x1fb93, 0x1fb93, +0x1fbfa, 0x1ffff, +0x2a6e0, 0x2a6ff, +0x2b73a, 0x2b73f, +0x2b81e, 0x2b81f, +0x2cea2, 0x2ceaf, +0x2ebe1, 0x2ebef, +0x2ee5e, 0x2f7ff, +0x2fa1e, 0x2ffff, +0x3134b, 0x3134f, +0x323b0, 0xe0000, +0xe0002, 0xe001f, +0xe0080, 0xe00ff, +0xe01f0, 0xeffff, +0xffffe, 0xfffff, +0x10fffe, 0x10ffff, +}; /* END of CR_Cn */ + +/* PROPERTY: 'Co': General Category */ +static const OnigCodePoint +CR_Co[] = { 3, +0xe000, 0xf8ff, +0xf0000, 0xffffd, +0x100000, 0x10fffd, +}; /* END of CR_Co */ + +/* PROPERTY: 'Common': Script */ +static const OnigCodePoint +CR_Common[] = { 174, +0x0000, 0x0040, +0x005b, 0x0060, +0x007b, 0x00a9, +0x00ab, 0x00b9, +0x00bb, 0x00bf, +0x00d7, 0x00d7, +0x00f7, 0x00f7, +0x02b9, 0x02df, +0x02e5, 0x02e9, +0x02ec, 0x02ff, +0x0374, 0x0374, +0x037e, 0x037e, +0x0385, 0x0385, +0x0387, 0x0387, +0x0605, 0x0605, +0x060c, 0x060c, +0x061b, 0x061b, +0x061f, 0x061f, +0x0640, 0x0640, +0x06dd, 0x06dd, +0x08e2, 0x08e2, +0x0964, 0x0965, +0x0e3f, 0x0e3f, +0x0fd5, 0x0fd8, +0x10fb, 0x10fb, +0x16eb, 0x16ed, +0x1735, 0x1736, +0x1802, 0x1803, +0x1805, 0x1805, +0x1cd3, 0x1cd3, +0x1ce1, 0x1ce1, +0x1ce9, 0x1cec, +0x1cee, 0x1cf3, +0x1cf5, 0x1cf7, +0x1cfa, 0x1cfa, +0x2000, 0x200b, +0x200e, 0x2064, +0x2066, 0x2070, +0x2074, 0x207e, +0x2080, 0x208e, +0x20a0, 0x20c0, +0x2100, 0x2125, +0x2127, 0x2129, +0x212c, 0x2131, +0x2133, 0x214d, +0x214f, 0x215f, +0x2189, 0x218b, +0x2190, 0x2429, +0x2440, 0x244a, +0x2460, 0x27ff, +0x2900, 0x2b73, +0x2b76, 0x2b95, +0x2b97, 0x2bff, +0x2e00, 0x2e5d, +0x2ff0, 0x3004, +0x3006, 0x3006, +0x3008, 0x3020, +0x3030, 0x3037, +0x303c, 0x303f, +0x309b, 0x309c, +0x30a0, 0x30a0, +0x30fb, 0x30fc, +0x3190, 0x319f, +0x31c0, 0x31e5, +0x31ef, 0x31ef, +0x3220, 0x325f, +0x327f, 0x32cf, +0x32ff, 0x32ff, +0x3358, 0x33ff, +0x4dc0, 0x4dff, +0xa700, 0xa721, +0xa788, 0xa78a, +0xa830, 0xa839, +0xa92e, 0xa92e, +0xa9cf, 0xa9cf, +0xab5b, 0xab5b, +0xab6a, 0xab6b, +0xfd3e, 0xfd3f, +0xfe10, 0xfe19, +0xfe30, 0xfe52, +0xfe54, 0xfe66, +0xfe68, 0xfe6b, +0xfeff, 0xfeff, +0xff01, 0xff20, +0xff3b, 0xff40, +0xff5b, 0xff65, +0xff70, 0xff70, +0xff9e, 0xff9f, +0xffe0, 0xffe6, +0xffe8, 0xffee, +0xfff9, 0xfffd, +0x10100, 0x10102, +0x10107, 0x10133, +0x10137, 0x1013f, +0x10190, 0x1019c, +0x101d0, 0x101fc, +0x102e1, 0x102fb, +0x1bca0, 0x1bca3, +0x1cc00, 0x1ccf9, +0x1cd00, 0x1ceb3, +0x1cf50, 0x1cfc3, +0x1d000, 0x1d0f5, +0x1d100, 0x1d126, +0x1d129, 0x1d166, +0x1d16a, 0x1d17a, +0x1d183, 0x1d184, +0x1d18c, 0x1d1a9, +0x1d1ae, 0x1d1ea, +0x1d2c0, 0x1d2d3, +0x1d2e0, 0x1d2f3, +0x1d300, 0x1d356, +0x1d360, 0x1d378, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d7cb, +0x1d7ce, 0x1d7ff, +0x1ec71, 0x1ecb4, +0x1ed01, 0x1ed3d, +0x1f000, 0x1f02b, +0x1f030, 0x1f093, +0x1f0a0, 0x1f0ae, +0x1f0b1, 0x1f0bf, +0x1f0c1, 0x1f0cf, +0x1f0d1, 0x1f0f5, +0x1f100, 0x1f1ad, +0x1f1e6, 0x1f1ff, +0x1f201, 0x1f202, +0x1f210, 0x1f23b, +0x1f240, 0x1f248, +0x1f250, 0x1f251, +0x1f260, 0x1f265, +0x1f300, 0x1f6d7, +0x1f6dc, 0x1f6ec, +0x1f6f0, 0x1f6fc, +0x1f700, 0x1f776, +0x1f77b, 0x1f7d9, +0x1f7e0, 0x1f7eb, +0x1f7f0, 0x1f7f0, +0x1f800, 0x1f80b, +0x1f810, 0x1f847, +0x1f850, 0x1f859, +0x1f860, 0x1f887, +0x1f890, 0x1f8ad, +0x1f8b0, 0x1f8bb, +0x1f8c0, 0x1f8c1, +0x1f900, 0x1fa53, +0x1fa60, 0x1fa6d, +0x1fa70, 0x1fa7c, +0x1fa80, 0x1fa89, +0x1fa8f, 0x1fac6, +0x1face, 0x1fadc, +0x1fadf, 0x1fae9, +0x1faf0, 0x1faf8, +0x1fb00, 0x1fb92, +0x1fb94, 0x1fbf9, +0xe0001, 0xe0001, +0xe0020, 0xe007f, +}; /* END of CR_Common */ + +/* PROPERTY: 'Coptic': Script */ +static const OnigCodePoint +CR_Coptic[] = { 3, +0x03e2, 0x03ef, +0x2c80, 0x2cf3, +0x2cf9, 0x2cff, +}; /* END of CR_Coptic */ + +/* PROPERTY: 'Cs': General Category */ +static const OnigCodePoint +CR_Cs[] = { 1, +0xd800, 0xdfff, +}; /* END of CR_Cs */ + +/* PROPERTY: 'Cuneiform': Script */ +static const OnigCodePoint +CR_Cuneiform[] = { 4, +0x12000, 0x12399, +0x12400, 0x1246e, +0x12470, 0x12474, +0x12480, 0x12543, +}; /* END of CR_Cuneiform */ + +/* PROPERTY: 'Cypriot': Script */ +static const OnigCodePoint +CR_Cypriot[] = { 6, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x1083f, +}; /* END of CR_Cypriot */ + +/* PROPERTY: 'Cypro_Minoan': Script */ +static const OnigCodePoint +CR_Cypro_Minoan[] = { 1, +0x12f90, 0x12ff2, +}; /* END of CR_Cypro_Minoan */ + +/* PROPERTY: 'Cyrillic': Script */ +static const OnigCodePoint +CR_Cyrillic[] = { 10, +0x0400, 0x0484, +0x0487, 0x052f, +0x1c80, 0x1c8a, +0x1d2b, 0x1d2b, +0x1d78, 0x1d78, +0x2de0, 0x2dff, +0xa640, 0xa69f, +0xfe2e, 0xfe2f, +0x1e030, 0x1e06d, +0x1e08f, 0x1e08f, +}; /* END of CR_Cyrillic */ + +/* PROPERTY: 'Dash': Binary Property */ +static const OnigCodePoint +CR_Dash[] = { 24, +0x002d, 0x002d, +0x058a, 0x058a, +0x05be, 0x05be, +0x1400, 0x1400, +0x1806, 0x1806, +0x2010, 0x2015, +0x2053, 0x2053, +0x207b, 0x207b, +0x208b, 0x208b, +0x2212, 0x2212, +0x2e17, 0x2e17, +0x2e1a, 0x2e1a, +0x2e3a, 0x2e3b, +0x2e40, 0x2e40, +0x2e5d, 0x2e5d, +0x301c, 0x301c, +0x3030, 0x3030, +0x30a0, 0x30a0, +0xfe31, 0xfe32, +0xfe58, 0xfe58, +0xfe63, 0xfe63, +0xff0d, 0xff0d, +0x10d6e, 0x10d6e, +0x10ead, 0x10ead, +}; /* END of CR_Dash */ + +/* PROPERTY: 'Default_Ignorable_Code_Point': Derived Property */ +static const OnigCodePoint +CR_Default_Ignorable_Code_Point[] = { 17, +0x00ad, 0x00ad, +0x034f, 0x034f, +0x061c, 0x061c, +0x115f, 0x1160, +0x17b4, 0x17b5, +0x180b, 0x180f, +0x200b, 0x200f, +0x202a, 0x202e, +0x2060, 0x206f, +0x3164, 0x3164, +0xfe00, 0xfe0f, +0xfeff, 0xfeff, +0xffa0, 0xffa0, +0xfff0, 0xfff8, +0x1bca0, 0x1bca3, +0x1d173, 0x1d17a, +0xe0000, 0xe0fff, +}; /* END of CR_Default_Ignorable_Code_Point */ + +/* PROPERTY: 'Deprecated': Binary Property */ +static const OnigCodePoint +CR_Deprecated[] = { 8, +0x0149, 0x0149, +0x0673, 0x0673, +0x0f77, 0x0f77, +0x0f79, 0x0f79, +0x17a3, 0x17a4, +0x206a, 0x206f, +0x2329, 0x232a, +0xe0001, 0xe0001, +}; /* END of CR_Deprecated */ + +/* PROPERTY: 'Deseret': Script */ +static const OnigCodePoint +CR_Deseret[] = { 1, +0x10400, 0x1044f, +}; /* END of CR_Deseret */ + +/* PROPERTY: 'Devanagari': Script */ +static const OnigCodePoint +CR_Devanagari[] = { 5, +0x0900, 0x0950, +0x0955, 0x0963, +0x0966, 0x097f, +0xa8e0, 0xa8ff, +0x11b00, 0x11b09, +}; /* END of CR_Devanagari */ + +/* PROPERTY: 'Diacritic': Binary Property */ +static const OnigCodePoint +CR_Diacritic[] = { 214, +0x005e, 0x005e, +0x0060, 0x0060, +0x00a8, 0x00a8, +0x00af, 0x00af, +0x00b4, 0x00b4, +0x00b7, 0x00b8, +0x02b0, 0x034e, +0x0350, 0x0357, +0x035d, 0x0362, +0x0374, 0x0375, +0x037a, 0x037a, +0x0384, 0x0385, +0x0483, 0x0487, +0x0559, 0x0559, +0x0591, 0x05a1, +0x05a3, 0x05bd, +0x05bf, 0x05bf, +0x05c1, 0x05c2, +0x05c4, 0x05c4, +0x064b, 0x0652, +0x0657, 0x0658, +0x06df, 0x06e0, +0x06e5, 0x06e6, +0x06ea, 0x06ec, +0x0730, 0x074a, +0x07a6, 0x07b0, +0x07eb, 0x07f5, +0x0818, 0x0819, +0x0898, 0x089f, +0x08c9, 0x08d2, +0x08e3, 0x08fe, +0x093c, 0x093c, +0x094d, 0x094d, +0x0951, 0x0954, +0x0971, 0x0971, +0x09bc, 0x09bc, +0x09cd, 0x09cd, +0x0a3c, 0x0a3c, +0x0a4d, 0x0a4d, +0x0abc, 0x0abc, +0x0acd, 0x0acd, +0x0afd, 0x0aff, +0x0b3c, 0x0b3c, +0x0b4d, 0x0b4d, +0x0b55, 0x0b55, +0x0bcd, 0x0bcd, +0x0c3c, 0x0c3c, +0x0c4d, 0x0c4d, +0x0cbc, 0x0cbc, +0x0ccd, 0x0ccd, +0x0d3b, 0x0d3c, +0x0d4d, 0x0d4d, +0x0dca, 0x0dca, +0x0e3a, 0x0e3a, +0x0e47, 0x0e4c, +0x0e4e, 0x0e4e, +0x0eba, 0x0eba, +0x0ec8, 0x0ecc, +0x0f18, 0x0f19, +0x0f35, 0x0f35, +0x0f37, 0x0f37, +0x0f39, 0x0f39, +0x0f3e, 0x0f3f, +0x0f82, 0x0f84, +0x0f86, 0x0f87, +0x0fc6, 0x0fc6, +0x1037, 0x1037, +0x1039, 0x103a, +0x1063, 0x1064, +0x1069, 0x106d, +0x1087, 0x108d, +0x108f, 0x108f, +0x109a, 0x109b, +0x135d, 0x135f, +0x1714, 0x1715, +0x1734, 0x1734, +0x17c9, 0x17d3, +0x17dd, 0x17dd, +0x1939, 0x193b, +0x1a60, 0x1a60, +0x1a75, 0x1a7c, +0x1a7f, 0x1a7f, +0x1ab0, 0x1abe, +0x1ac1, 0x1acb, +0x1b34, 0x1b34, +0x1b44, 0x1b44, +0x1b6b, 0x1b73, +0x1baa, 0x1bab, +0x1be6, 0x1be6, +0x1bf2, 0x1bf3, +0x1c36, 0x1c37, +0x1c78, 0x1c7d, +0x1cd0, 0x1ce8, +0x1ced, 0x1ced, +0x1cf4, 0x1cf4, +0x1cf7, 0x1cf9, +0x1d2c, 0x1d6a, +0x1dc4, 0x1dcf, +0x1df5, 0x1dff, +0x1fbd, 0x1fbd, +0x1fbf, 0x1fc1, +0x1fcd, 0x1fcf, +0x1fdd, 0x1fdf, +0x1fed, 0x1fef, +0x1ffd, 0x1ffe, +0x2cef, 0x2cf1, +0x2e2f, 0x2e2f, +0x302a, 0x302f, +0x3099, 0x309c, +0x30fc, 0x30fc, +0xa66f, 0xa66f, +0xa67c, 0xa67d, +0xa67f, 0xa67f, +0xa69c, 0xa69d, +0xa6f0, 0xa6f1, +0xa700, 0xa721, +0xa788, 0xa78a, +0xa7f8, 0xa7f9, +0xa806, 0xa806, +0xa82c, 0xa82c, +0xa8c4, 0xa8c4, +0xa8e0, 0xa8f1, +0xa92b, 0xa92e, +0xa953, 0xa953, +0xa9b3, 0xa9b3, +0xa9c0, 0xa9c0, +0xa9e5, 0xa9e5, +0xaa7b, 0xaa7d, +0xaabf, 0xaac2, +0xaaf6, 0xaaf6, +0xab5b, 0xab5f, +0xab69, 0xab6b, +0xabec, 0xabed, +0xfb1e, 0xfb1e, +0xfe20, 0xfe2f, +0xff3e, 0xff3e, +0xff40, 0xff40, +0xff70, 0xff70, +0xff9e, 0xff9f, +0xffe3, 0xffe3, +0x102e0, 0x102e0, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10a38, 0x10a3a, +0x10a3f, 0x10a3f, +0x10ae5, 0x10ae6, +0x10d22, 0x10d27, +0x10d4e, 0x10d4e, +0x10d69, 0x10d6d, +0x10efd, 0x10eff, +0x10f46, 0x10f50, +0x10f82, 0x10f85, +0x11046, 0x11046, +0x11070, 0x11070, +0x110b9, 0x110ba, +0x11133, 0x11134, +0x11173, 0x11173, +0x111c0, 0x111c0, +0x111ca, 0x111cc, +0x11235, 0x11236, +0x112e9, 0x112ea, +0x1133b, 0x1133c, +0x1134d, 0x1134d, +0x11366, 0x1136c, +0x11370, 0x11374, +0x113ce, 0x113d0, +0x113d2, 0x113d3, +0x113e1, 0x113e2, +0x11442, 0x11442, +0x11446, 0x11446, +0x114c2, 0x114c3, +0x115bf, 0x115c0, +0x1163f, 0x1163f, +0x116b6, 0x116b7, +0x1172b, 0x1172b, +0x11839, 0x1183a, +0x1193d, 0x1193e, +0x11943, 0x11943, +0x119e0, 0x119e0, +0x11a34, 0x11a34, +0x11a47, 0x11a47, +0x11a99, 0x11a99, +0x11c3f, 0x11c3f, +0x11d42, 0x11d42, +0x11d44, 0x11d45, +0x11d97, 0x11d97, +0x11f41, 0x11f42, +0x11f5a, 0x11f5a, +0x13447, 0x13455, +0x1612f, 0x1612f, +0x16af0, 0x16af4, +0x16b30, 0x16b36, +0x16d6b, 0x16d6c, +0x16f8f, 0x16f9f, +0x16ff0, 0x16ff1, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1cf00, 0x1cf2d, +0x1cf30, 0x1cf46, +0x1d167, 0x1d169, +0x1d16d, 0x1d172, +0x1d17b, 0x1d182, +0x1d185, 0x1d18b, +0x1d1aa, 0x1d1ad, +0x1e030, 0x1e06d, +0x1e130, 0x1e136, +0x1e2ae, 0x1e2ae, +0x1e2ec, 0x1e2ef, +0x1e5ee, 0x1e5ef, +0x1e8d0, 0x1e8d6, +0x1e944, 0x1e946, +0x1e948, 0x1e94a, +}; /* END of CR_Diacritic */ + +/* PROPERTY: 'Dives_Akuru': Script */ +static const OnigCodePoint +CR_Dives_Akuru[] = { 8, +0x11900, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x11935, +0x11937, 0x11938, +0x1193b, 0x11946, +0x11950, 0x11959, +}; /* END of CR_Dives_Akuru */ + +/* PROPERTY: 'Dogra': Script */ +static const OnigCodePoint +CR_Dogra[] = { 1, +0x11800, 0x1183b, +}; /* END of CR_Dogra */ + +/* PROPERTY: 'Duployan': Script */ +static const OnigCodePoint +CR_Duployan[] = { 5, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1bc9c, 0x1bc9f, +}; /* END of CR_Duployan */ + +/* PROPERTY: 'Egyptian_Hieroglyphs': Script */ +static const OnigCodePoint +CR_Egyptian_Hieroglyphs[] = { 2, +0x13000, 0x13455, +0x13460, 0x143fa, +}; /* END of CR_Egyptian_Hieroglyphs */ + +/* PROPERTY: 'Elbasan': Script */ +static const OnigCodePoint +CR_Elbasan[] = { 1, +0x10500, 0x10527, +}; /* END of CR_Elbasan */ + +/* PROPERTY: 'Elymaic': Script */ +static const OnigCodePoint +CR_Elymaic[] = { 1, +0x10fe0, 0x10ff6, +}; /* END of CR_Elymaic */ + +/* PROPERTY: 'Emoji': Emoji Property */ +static const OnigCodePoint +CR_Emoji[] = { 150, +0x0023, 0x0023, +0x002a, 0x002a, +0x0030, 0x0039, +0x00a9, 0x00a9, +0x00ae, 0x00ae, +0x203c, 0x203c, +0x2049, 0x2049, +0x2122, 0x2122, +0x2139, 0x2139, +0x2194, 0x2199, +0x21a9, 0x21aa, +0x231a, 0x231b, +0x2328, 0x2328, +0x23cf, 0x23cf, +0x23e9, 0x23f3, +0x23f8, 0x23fa, +0x24c2, 0x24c2, +0x25aa, 0x25ab, +0x25b6, 0x25b6, +0x25c0, 0x25c0, +0x25fb, 0x25fe, +0x2600, 0x2604, +0x260e, 0x260e, +0x2611, 0x2611, +0x2614, 0x2615, +0x2618, 0x2618, +0x261d, 0x261d, +0x2620, 0x2620, +0x2622, 0x2623, +0x2626, 0x2626, +0x262a, 0x262a, +0x262e, 0x262f, +0x2638, 0x263a, +0x2640, 0x2640, +0x2642, 0x2642, +0x2648, 0x2653, +0x265f, 0x2660, +0x2663, 0x2663, +0x2665, 0x2666, +0x2668, 0x2668, +0x267b, 0x267b, +0x267e, 0x267f, +0x2692, 0x2697, +0x2699, 0x2699, +0x269b, 0x269c, +0x26a0, 0x26a1, +0x26a7, 0x26a7, +0x26aa, 0x26ab, +0x26b0, 0x26b1, +0x26bd, 0x26be, +0x26c4, 0x26c5, +0x26c8, 0x26c8, +0x26ce, 0x26cf, +0x26d1, 0x26d1, +0x26d3, 0x26d4, +0x26e9, 0x26ea, +0x26f0, 0x26f5, +0x26f7, 0x26fa, +0x26fd, 0x26fd, +0x2702, 0x2702, +0x2705, 0x2705, +0x2708, 0x270d, +0x270f, 0x270f, +0x2712, 0x2712, +0x2714, 0x2714, +0x2716, 0x2716, +0x271d, 0x271d, +0x2721, 0x2721, +0x2728, 0x2728, +0x2733, 0x2734, +0x2744, 0x2744, +0x2747, 0x2747, +0x274c, 0x274c, +0x274e, 0x274e, +0x2753, 0x2755, +0x2757, 0x2757, +0x2763, 0x2764, +0x2795, 0x2797, +0x27a1, 0x27a1, +0x27b0, 0x27b0, +0x27bf, 0x27bf, +0x2934, 0x2935, +0x2b05, 0x2b07, +0x2b1b, 0x2b1c, +0x2b50, 0x2b50, +0x2b55, 0x2b55, +0x3030, 0x3030, +0x303d, 0x303d, +0x3297, 0x3297, +0x3299, 0x3299, +0x1f004, 0x1f004, +0x1f0cf, 0x1f0cf, +0x1f170, 0x1f171, +0x1f17e, 0x1f17f, +0x1f18e, 0x1f18e, +0x1f191, 0x1f19a, +0x1f1e6, 0x1f1ff, +0x1f201, 0x1f202, +0x1f21a, 0x1f21a, +0x1f22f, 0x1f22f, +0x1f232, 0x1f23a, +0x1f250, 0x1f251, +0x1f300, 0x1f321, +0x1f324, 0x1f393, +0x1f396, 0x1f397, +0x1f399, 0x1f39b, +0x1f39e, 0x1f3f0, +0x1f3f3, 0x1f3f5, +0x1f3f7, 0x1f4fd, +0x1f4ff, 0x1f53d, +0x1f549, 0x1f54e, +0x1f550, 0x1f567, +0x1f56f, 0x1f570, +0x1f573, 0x1f57a, +0x1f587, 0x1f587, +0x1f58a, 0x1f58d, +0x1f590, 0x1f590, +0x1f595, 0x1f596, +0x1f5a4, 0x1f5a5, +0x1f5a8, 0x1f5a8, +0x1f5b1, 0x1f5b2, +0x1f5bc, 0x1f5bc, +0x1f5c2, 0x1f5c4, +0x1f5d1, 0x1f5d3, +0x1f5dc, 0x1f5de, +0x1f5e1, 0x1f5e1, +0x1f5e3, 0x1f5e3, +0x1f5e8, 0x1f5e8, +0x1f5ef, 0x1f5ef, +0x1f5f3, 0x1f5f3, +0x1f5fa, 0x1f64f, +0x1f680, 0x1f6c5, +0x1f6cb, 0x1f6d2, +0x1f6d5, 0x1f6d7, +0x1f6dc, 0x1f6e5, +0x1f6e9, 0x1f6e9, +0x1f6eb, 0x1f6ec, +0x1f6f0, 0x1f6f0, +0x1f6f3, 0x1f6fc, +0x1f7e0, 0x1f7eb, +0x1f7f0, 0x1f7f0, +0x1f90c, 0x1f93a, +0x1f93c, 0x1f945, +0x1f947, 0x1f9ff, +0x1fa70, 0x1fa7c, +0x1fa80, 0x1fa89, +0x1fa8f, 0x1fac6, +0x1face, 0x1fadc, +0x1fadf, 0x1fae9, +0x1faf0, 0x1faf8, +}; /* END of CR_Emoji */ + +/* PROPERTY: 'Emoji_Component': Emoji Property */ +static const OnigCodePoint +CR_Emoji_Component[] = { 10, +0x0023, 0x0023, +0x002a, 0x002a, +0x0030, 0x0039, +0x200d, 0x200d, +0x20e3, 0x20e3, +0xfe0f, 0xfe0f, +0x1f1e6, 0x1f1ff, +0x1f3fb, 0x1f3ff, +0x1f9b0, 0x1f9b3, +0xe0020, 0xe007f, +}; /* END of CR_Emoji_Component */ + +/* PROPERTY: 'Emoji_Modifier': Emoji Property */ +static const OnigCodePoint +CR_Emoji_Modifier[] = { 1, +0x1f3fb, 0x1f3ff, +}; /* END of CR_Emoji_Modifier */ + +/* PROPERTY: 'Emoji_Modifier_Base': Emoji Property */ +static const OnigCodePoint +CR_Emoji_Modifier_Base[] = { 40, +0x261d, 0x261d, +0x26f9, 0x26f9, +0x270a, 0x270d, +0x1f385, 0x1f385, +0x1f3c2, 0x1f3c4, +0x1f3c7, 0x1f3c7, +0x1f3ca, 0x1f3cc, +0x1f442, 0x1f443, +0x1f446, 0x1f450, +0x1f466, 0x1f478, +0x1f47c, 0x1f47c, +0x1f481, 0x1f483, +0x1f485, 0x1f487, +0x1f48f, 0x1f48f, +0x1f491, 0x1f491, +0x1f4aa, 0x1f4aa, +0x1f574, 0x1f575, +0x1f57a, 0x1f57a, +0x1f590, 0x1f590, +0x1f595, 0x1f596, +0x1f645, 0x1f647, +0x1f64b, 0x1f64f, +0x1f6a3, 0x1f6a3, +0x1f6b4, 0x1f6b6, +0x1f6c0, 0x1f6c0, +0x1f6cc, 0x1f6cc, +0x1f90c, 0x1f90c, +0x1f90f, 0x1f90f, +0x1f918, 0x1f91f, +0x1f926, 0x1f926, +0x1f930, 0x1f939, +0x1f93c, 0x1f93e, +0x1f977, 0x1f977, +0x1f9b5, 0x1f9b6, +0x1f9b8, 0x1f9b9, +0x1f9bb, 0x1f9bb, +0x1f9cd, 0x1f9cf, +0x1f9d1, 0x1f9dd, +0x1fac3, 0x1fac5, +0x1faf0, 0x1faf8, +}; /* END of CR_Emoji_Modifier_Base */ + +/* PROPERTY: 'Emoji_Presentation': Emoji Property */ +static const OnigCodePoint +CR_Emoji_Presentation[] = { 80, +0x231a, 0x231b, +0x23e9, 0x23ec, +0x23f0, 0x23f0, +0x23f3, 0x23f3, +0x25fd, 0x25fe, +0x2614, 0x2615, +0x2648, 0x2653, +0x267f, 0x267f, +0x2693, 0x2693, +0x26a1, 0x26a1, +0x26aa, 0x26ab, +0x26bd, 0x26be, +0x26c4, 0x26c5, +0x26ce, 0x26ce, +0x26d4, 0x26d4, +0x26ea, 0x26ea, +0x26f2, 0x26f3, +0x26f5, 0x26f5, +0x26fa, 0x26fa, +0x26fd, 0x26fd, +0x2705, 0x2705, +0x270a, 0x270b, +0x2728, 0x2728, +0x274c, 0x274c, +0x274e, 0x274e, +0x2753, 0x2755, +0x2757, 0x2757, +0x2795, 0x2797, +0x27b0, 0x27b0, +0x27bf, 0x27bf, +0x2b1b, 0x2b1c, +0x2b50, 0x2b50, +0x2b55, 0x2b55, +0x1f004, 0x1f004, +0x1f0cf, 0x1f0cf, +0x1f18e, 0x1f18e, +0x1f191, 0x1f19a, +0x1f1e6, 0x1f1ff, +0x1f201, 0x1f201, +0x1f21a, 0x1f21a, +0x1f22f, 0x1f22f, +0x1f232, 0x1f236, +0x1f238, 0x1f23a, +0x1f250, 0x1f251, +0x1f300, 0x1f320, +0x1f32d, 0x1f335, +0x1f337, 0x1f37c, +0x1f37e, 0x1f393, +0x1f3a0, 0x1f3ca, +0x1f3cf, 0x1f3d3, +0x1f3e0, 0x1f3f0, +0x1f3f4, 0x1f3f4, +0x1f3f8, 0x1f43e, +0x1f440, 0x1f440, +0x1f442, 0x1f4fc, +0x1f4ff, 0x1f53d, +0x1f54b, 0x1f54e, +0x1f550, 0x1f567, +0x1f57a, 0x1f57a, +0x1f595, 0x1f596, +0x1f5a4, 0x1f5a4, +0x1f5fb, 0x1f64f, +0x1f680, 0x1f6c5, +0x1f6cc, 0x1f6cc, +0x1f6d0, 0x1f6d2, +0x1f6d5, 0x1f6d7, +0x1f6dc, 0x1f6df, +0x1f6eb, 0x1f6ec, +0x1f6f4, 0x1f6fc, +0x1f7e0, 0x1f7eb, +0x1f7f0, 0x1f7f0, +0x1f90c, 0x1f93a, +0x1f93c, 0x1f945, +0x1f947, 0x1f9ff, +0x1fa70, 0x1fa7c, +0x1fa80, 0x1fa89, +0x1fa8f, 0x1fac6, +0x1face, 0x1fadc, +0x1fadf, 0x1fae9, +0x1faf0, 0x1faf8, +}; /* END of CR_Emoji_Presentation */ + +/* PROPERTY: 'Ethiopic': Script */ +static const OnigCodePoint +CR_Ethiopic[] = { 36, +0x1200, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x135d, 0x137c, +0x1380, 0x1399, +0x2d80, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +}; /* END of CR_Ethiopic */ + +/* PROPERTY: 'Extended_Pictographic': Emoji Property */ +static const OnigCodePoint +CR_Extended_Pictographic[] = { 78, +0x00a9, 0x00a9, +0x00ae, 0x00ae, +0x203c, 0x203c, +0x2049, 0x2049, +0x2122, 0x2122, +0x2139, 0x2139, +0x2194, 0x2199, +0x21a9, 0x21aa, +0x231a, 0x231b, +0x2328, 0x2328, +0x2388, 0x2388, +0x23cf, 0x23cf, +0x23e9, 0x23f3, +0x23f8, 0x23fa, +0x24c2, 0x24c2, +0x25aa, 0x25ab, +0x25b6, 0x25b6, +0x25c0, 0x25c0, +0x25fb, 0x25fe, +0x2600, 0x2605, +0x2607, 0x2612, +0x2614, 0x2685, +0x2690, 0x2705, +0x2708, 0x2712, +0x2714, 0x2714, +0x2716, 0x2716, +0x271d, 0x271d, +0x2721, 0x2721, +0x2728, 0x2728, +0x2733, 0x2734, +0x2744, 0x2744, +0x2747, 0x2747, +0x274c, 0x274c, +0x274e, 0x274e, +0x2753, 0x2755, +0x2757, 0x2757, +0x2763, 0x2767, +0x2795, 0x2797, +0x27a1, 0x27a1, +0x27b0, 0x27b0, +0x27bf, 0x27bf, +0x2934, 0x2935, +0x2b05, 0x2b07, +0x2b1b, 0x2b1c, +0x2b50, 0x2b50, +0x2b55, 0x2b55, +0x3030, 0x3030, +0x303d, 0x303d, +0x3297, 0x3297, +0x3299, 0x3299, +0x1f000, 0x1f0ff, +0x1f10d, 0x1f10f, +0x1f12f, 0x1f12f, +0x1f16c, 0x1f171, +0x1f17e, 0x1f17f, +0x1f18e, 0x1f18e, +0x1f191, 0x1f19a, +0x1f1ad, 0x1f1e5, +0x1f201, 0x1f20f, +0x1f21a, 0x1f21a, +0x1f22f, 0x1f22f, +0x1f232, 0x1f23a, +0x1f23c, 0x1f23f, +0x1f249, 0x1f3fa, +0x1f400, 0x1f53d, +0x1f546, 0x1f64f, +0x1f680, 0x1f6ff, +0x1f774, 0x1f77f, +0x1f7d5, 0x1f7ff, +0x1f80c, 0x1f80f, +0x1f848, 0x1f84f, +0x1f85a, 0x1f85f, +0x1f888, 0x1f88f, +0x1f8ae, 0x1f8ff, +0x1f90c, 0x1f93a, +0x1f93c, 0x1f945, +0x1f947, 0x1faff, +0x1fc00, 0x1fffd, +}; /* END of CR_Extended_Pictographic */ + +/* PROPERTY: 'Extender': Binary Property */ +static const OnigCodePoint +CR_Extender[] = { 41, +0x00b7, 0x00b7, +0x02d0, 0x02d1, +0x0640, 0x0640, +0x07fa, 0x07fa, +0x0a71, 0x0a71, +0x0afb, 0x0afb, +0x0b55, 0x0b55, +0x0e46, 0x0e46, +0x0ec6, 0x0ec6, +0x180a, 0x180a, +0x1843, 0x1843, +0x1aa7, 0x1aa7, +0x1c36, 0x1c36, +0x1c7b, 0x1c7b, +0x3005, 0x3005, +0x3031, 0x3035, +0x309d, 0x309e, +0x30fc, 0x30fe, +0xa015, 0xa015, +0xa60c, 0xa60c, +0xa9cf, 0xa9cf, +0xa9e6, 0xa9e6, +0xaa70, 0xaa70, +0xaadd, 0xaadd, +0xaaf3, 0xaaf4, +0xff70, 0xff70, +0x10781, 0x10782, +0x10d4e, 0x10d4e, +0x10d6a, 0x10d6a, +0x10d6f, 0x10d6f, +0x11237, 0x11237, +0x1135d, 0x1135d, +0x113d2, 0x113d3, +0x115c6, 0x115c8, +0x11a98, 0x11a98, +0x16b42, 0x16b43, +0x16fe0, 0x16fe1, +0x16fe3, 0x16fe3, +0x1e13c, 0x1e13d, +0x1e5ef, 0x1e5ef, +0x1e944, 0x1e946, +}; /* END of CR_Extender */ + +/* PROPERTY: 'Garay': Script */ +static const OnigCodePoint +CR_Garay[] = { 3, +0x10d40, 0x10d65, +0x10d69, 0x10d85, +0x10d8e, 0x10d8f, +}; /* END of CR_Garay */ + +/* PROPERTY: 'Georgian': Script */ +static const OnigCodePoint +CR_Georgian[] = { 10, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x10fa, +0x10fc, 0x10ff, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +}; /* END of CR_Georgian */ + +/* PROPERTY: 'Glagolitic': Script */ +static const OnigCodePoint +CR_Glagolitic[] = { 6, +0x2c00, 0x2c5f, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +}; /* END of CR_Glagolitic */ + +/* PROPERTY: 'Gothic': Script */ +static const OnigCodePoint +CR_Gothic[] = { 1, +0x10330, 0x1034a, +}; /* END of CR_Gothic */ + +/* PROPERTY: 'Grantha': Script */ +static const OnigCodePoint +CR_Grantha[] = { 15, +0x11300, 0x11303, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133c, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134d, +0x11350, 0x11350, +0x11357, 0x11357, +0x1135d, 0x11363, +0x11366, 0x1136c, +0x11370, 0x11374, +}; /* END of CR_Grantha */ + +/* PROPERTY: 'Grapheme_Base': Derived Property */ +static const OnigCodePoint +CR_Grapheme_Base[] = { 894, +0x0020, 0x007e, +0x00a0, 0x00ac, +0x00ae, 0x02ff, +0x0370, 0x0377, +0x037a, 0x037f, +0x0384, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x0482, +0x048a, 0x052f, +0x0531, 0x0556, +0x0559, 0x058a, +0x058d, 0x058f, +0x05be, 0x05be, +0x05c0, 0x05c0, +0x05c3, 0x05c3, +0x05c6, 0x05c6, +0x05d0, 0x05ea, +0x05ef, 0x05f4, +0x0606, 0x060f, +0x061b, 0x061b, +0x061d, 0x064a, +0x0660, 0x066f, +0x0671, 0x06d5, +0x06de, 0x06de, +0x06e5, 0x06e6, +0x06e9, 0x06e9, +0x06ee, 0x070d, +0x0710, 0x0710, +0x0712, 0x072f, +0x074d, 0x07a5, +0x07b1, 0x07b1, +0x07c0, 0x07ea, +0x07f4, 0x07fa, +0x07fe, 0x0815, +0x081a, 0x081a, +0x0824, 0x0824, +0x0828, 0x0828, +0x0830, 0x083e, +0x0840, 0x0858, +0x085e, 0x085e, +0x0860, 0x086a, +0x0870, 0x088e, +0x08a0, 0x08c9, +0x0903, 0x0939, +0x093b, 0x093b, +0x093d, 0x0940, +0x0949, 0x094c, +0x094e, 0x0950, +0x0958, 0x0961, +0x0964, 0x0980, +0x0982, 0x0983, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bd, 0x09bd, +0x09bf, 0x09c0, +0x09c7, 0x09c8, +0x09cb, 0x09cc, +0x09ce, 0x09ce, +0x09dc, 0x09dd, +0x09df, 0x09e1, +0x09e6, 0x09fd, +0x0a03, 0x0a03, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a3e, 0x0a40, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a66, 0x0a6f, +0x0a72, 0x0a74, +0x0a76, 0x0a76, +0x0a83, 0x0a83, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abd, 0x0ac0, +0x0ac9, 0x0ac9, +0x0acb, 0x0acc, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae1, +0x0ae6, 0x0af1, +0x0af9, 0x0af9, +0x0b02, 0x0b03, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3d, 0x0b3d, +0x0b40, 0x0b40, +0x0b47, 0x0b48, +0x0b4b, 0x0b4c, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b61, +0x0b66, 0x0b77, +0x0b83, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bbf, 0x0bbf, +0x0bc1, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcc, +0x0bd0, 0x0bd0, +0x0be6, 0x0bfa, +0x0c01, 0x0c03, +0x0c05, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3d, 0x0c3d, +0x0c41, 0x0c44, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c61, +0x0c66, 0x0c6f, +0x0c77, 0x0c80, +0x0c82, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbd, 0x0cbe, +0x0cc1, 0x0cc1, +0x0cc3, 0x0cc4, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce1, +0x0ce6, 0x0cef, +0x0cf1, 0x0cf3, +0x0d02, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d3a, +0x0d3d, 0x0d3d, +0x0d3f, 0x0d40, +0x0d46, 0x0d48, +0x0d4a, 0x0d4c, +0x0d4e, 0x0d4f, +0x0d54, 0x0d56, +0x0d58, 0x0d61, +0x0d66, 0x0d7f, +0x0d82, 0x0d83, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0dd0, 0x0dd1, +0x0dd8, 0x0dde, +0x0de6, 0x0def, +0x0df2, 0x0df4, +0x0e01, 0x0e30, +0x0e32, 0x0e33, +0x0e3f, 0x0e46, +0x0e4f, 0x0e5b, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0eb0, +0x0eb2, 0x0eb3, +0x0ebd, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0ed0, 0x0ed9, +0x0edc, 0x0edf, +0x0f00, 0x0f17, +0x0f1a, 0x0f34, +0x0f36, 0x0f36, +0x0f38, 0x0f38, +0x0f3a, 0x0f47, +0x0f49, 0x0f6c, +0x0f7f, 0x0f7f, +0x0f85, 0x0f85, +0x0f88, 0x0f8c, +0x0fbe, 0x0fc5, +0x0fc7, 0x0fcc, +0x0fce, 0x0fda, +0x1000, 0x102c, +0x1031, 0x1031, +0x1038, 0x1038, +0x103b, 0x103c, +0x103f, 0x1057, +0x105a, 0x105d, +0x1061, 0x1070, +0x1075, 0x1081, +0x1083, 0x1084, +0x1087, 0x108c, +0x108e, 0x109c, +0x109e, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x1360, 0x137c, +0x1380, 0x1399, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1400, 0x169c, +0x16a0, 0x16f8, +0x1700, 0x1711, +0x171f, 0x1731, +0x1735, 0x1736, +0x1740, 0x1751, +0x1760, 0x176c, +0x176e, 0x1770, +0x1780, 0x17b3, +0x17b6, 0x17b6, +0x17be, 0x17c5, +0x17c7, 0x17c8, +0x17d4, 0x17dc, +0x17e0, 0x17e9, +0x17f0, 0x17f9, +0x1800, 0x180a, +0x1810, 0x1819, +0x1820, 0x1878, +0x1880, 0x1884, +0x1887, 0x18a8, +0x18aa, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1923, 0x1926, +0x1929, 0x192b, +0x1930, 0x1931, +0x1933, 0x1938, +0x1940, 0x1940, +0x1944, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x19d0, 0x19da, +0x19de, 0x1a16, +0x1a19, 0x1a1a, +0x1a1e, 0x1a55, +0x1a57, 0x1a57, +0x1a61, 0x1a61, +0x1a63, 0x1a64, +0x1a6d, 0x1a72, +0x1a80, 0x1a89, +0x1a90, 0x1a99, +0x1aa0, 0x1aad, +0x1b04, 0x1b33, +0x1b3e, 0x1b41, +0x1b45, 0x1b4c, +0x1b4e, 0x1b6a, +0x1b74, 0x1b7f, +0x1b82, 0x1ba1, +0x1ba6, 0x1ba7, +0x1bae, 0x1be5, +0x1be7, 0x1be7, +0x1bea, 0x1bec, +0x1bee, 0x1bee, +0x1bfc, 0x1c2b, +0x1c34, 0x1c35, +0x1c3b, 0x1c49, +0x1c4d, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cc7, +0x1cd3, 0x1cd3, +0x1ce1, 0x1ce1, +0x1ce9, 0x1cec, +0x1cee, 0x1cf3, +0x1cf5, 0x1cf7, +0x1cfa, 0x1cfa, +0x1d00, 0x1dbf, +0x1e00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fc4, +0x1fc6, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fdd, 0x1fef, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffe, +0x2000, 0x200a, +0x2010, 0x2027, +0x202f, 0x205f, +0x2070, 0x2071, +0x2074, 0x208e, +0x2090, 0x209c, +0x20a0, 0x20c0, +0x2100, 0x218b, +0x2190, 0x2429, +0x2440, 0x244a, +0x2460, 0x2b73, +0x2b76, 0x2b95, +0x2b97, 0x2cee, +0x2cf2, 0x2cf3, +0x2cf9, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d70, +0x2d80, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x2e00, 0x2e5d, +0x2e80, 0x2e99, +0x2e9b, 0x2ef3, +0x2f00, 0x2fd5, +0x2ff0, 0x3029, +0x3030, 0x303f, +0x3041, 0x3096, +0x309b, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x3190, 0x31e5, +0x31ef, 0x321e, +0x3220, 0xa48c, +0xa490, 0xa4c6, +0xa4d0, 0xa62b, +0xa640, 0xa66e, +0xa673, 0xa673, +0xa67e, 0xa69d, +0xa6a0, 0xa6ef, +0xa6f2, 0xa6f7, +0xa700, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa801, +0xa803, 0xa805, +0xa807, 0xa80a, +0xa80c, 0xa824, +0xa827, 0xa82b, +0xa830, 0xa839, +0xa840, 0xa877, +0xa880, 0xa8c3, +0xa8ce, 0xa8d9, +0xa8f2, 0xa8fe, +0xa900, 0xa925, +0xa92e, 0xa946, +0xa952, 0xa952, +0xa95f, 0xa97c, +0xa983, 0xa9b2, +0xa9b4, 0xa9b5, +0xa9ba, 0xa9bb, +0xa9be, 0xa9bf, +0xa9c1, 0xa9cd, +0xa9cf, 0xa9d9, +0xa9de, 0xa9e4, +0xa9e6, 0xa9fe, +0xaa00, 0xaa28, +0xaa2f, 0xaa30, +0xaa33, 0xaa34, +0xaa40, 0xaa42, +0xaa44, 0xaa4b, +0xaa4d, 0xaa4d, +0xaa50, 0xaa59, +0xaa5c, 0xaa7b, +0xaa7d, 0xaaaf, +0xaab1, 0xaab1, +0xaab5, 0xaab6, +0xaab9, 0xaabd, +0xaac0, 0xaac0, +0xaac2, 0xaac2, +0xaadb, 0xaaeb, +0xaaee, 0xaaf5, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab6b, +0xab70, 0xabe4, +0xabe6, 0xabe7, +0xabe9, 0xabec, +0xabf0, 0xabf9, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xf900, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb1d, +0xfb1f, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbc2, +0xfbd3, 0xfd8f, +0xfd92, 0xfdc7, +0xfdcf, 0xfdcf, +0xfdf0, 0xfdff, +0xfe10, 0xfe19, +0xfe30, 0xfe52, +0xfe54, 0xfe66, +0xfe68, 0xfe6b, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0xff01, 0xff9d, +0xffa0, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0xffe0, 0xffe6, +0xffe8, 0xffee, +0xfffc, 0xfffd, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10100, 0x10102, +0x10107, 0x10133, +0x10137, 0x1018e, +0x10190, 0x1019c, +0x101a0, 0x101a0, +0x101d0, 0x101fc, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x102e1, 0x102fb, +0x10300, 0x10323, +0x1032d, 0x1034a, +0x10350, 0x10375, +0x10380, 0x1039d, +0x1039f, 0x103c3, +0x103c8, 0x103d5, +0x10400, 0x1049d, +0x104a0, 0x104a9, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x1056f, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10857, 0x1089e, +0x108a7, 0x108af, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x108fb, 0x1091b, +0x1091f, 0x10939, +0x1093f, 0x1093f, +0x10980, 0x109b7, +0x109bc, 0x109cf, +0x109d2, 0x10a00, +0x10a10, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a40, 0x10a48, +0x10a50, 0x10a58, +0x10a60, 0x10a9f, +0x10ac0, 0x10ae4, +0x10aeb, 0x10af6, +0x10b00, 0x10b35, +0x10b39, 0x10b55, +0x10b58, 0x10b72, +0x10b78, 0x10b91, +0x10b99, 0x10b9c, +0x10ba9, 0x10baf, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10cfa, 0x10d23, +0x10d30, 0x10d39, +0x10d40, 0x10d65, +0x10d6e, 0x10d85, +0x10d8e, 0x10d8f, +0x10e60, 0x10e7e, +0x10e80, 0x10ea9, +0x10ead, 0x10ead, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10f00, 0x10f27, +0x10f30, 0x10f45, +0x10f51, 0x10f59, +0x10f70, 0x10f81, +0x10f86, 0x10f89, +0x10fb0, 0x10fcb, +0x10fe0, 0x10ff6, +0x11000, 0x11000, +0x11002, 0x11037, +0x11047, 0x1104d, +0x11052, 0x1106f, +0x11071, 0x11072, +0x11075, 0x11075, +0x11082, 0x110b2, +0x110b7, 0x110b8, +0x110bb, 0x110bc, +0x110be, 0x110c1, +0x110d0, 0x110e8, +0x110f0, 0x110f9, +0x11103, 0x11126, +0x1112c, 0x1112c, +0x11136, 0x11147, +0x11150, 0x11172, +0x11174, 0x11176, +0x11182, 0x111b5, +0x111bf, 0x111bf, +0x111c1, 0x111c8, +0x111cd, 0x111ce, +0x111d0, 0x111df, +0x111e1, 0x111f4, +0x11200, 0x11211, +0x11213, 0x1122e, +0x11232, 0x11233, +0x11238, 0x1123d, +0x1123f, 0x11240, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a9, +0x112b0, 0x112de, +0x112e0, 0x112e2, +0x112f0, 0x112f9, +0x11302, 0x11303, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133d, 0x1133d, +0x1133f, 0x1133f, +0x11341, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134c, +0x11350, 0x11350, +0x1135d, 0x11363, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113b7, +0x113b9, 0x113ba, +0x113ca, 0x113ca, +0x113cc, 0x113cd, +0x113d1, 0x113d1, +0x113d3, 0x113d5, +0x113d7, 0x113d8, +0x11400, 0x11437, +0x11440, 0x11441, +0x11445, 0x11445, +0x11447, 0x1145b, +0x1145d, 0x1145d, +0x1145f, 0x11461, +0x11480, 0x114af, +0x114b1, 0x114b2, +0x114b9, 0x114b9, +0x114bb, 0x114bc, +0x114be, 0x114be, +0x114c1, 0x114c1, +0x114c4, 0x114c7, +0x114d0, 0x114d9, +0x11580, 0x115ae, +0x115b0, 0x115b1, +0x115b8, 0x115bb, +0x115be, 0x115be, +0x115c1, 0x115db, +0x11600, 0x11632, +0x1163b, 0x1163c, +0x1163e, 0x1163e, +0x11641, 0x11644, +0x11650, 0x11659, +0x11660, 0x1166c, +0x11680, 0x116aa, +0x116ac, 0x116ac, +0x116ae, 0x116af, +0x116b8, 0x116b9, +0x116c0, 0x116c9, +0x116d0, 0x116e3, +0x11700, 0x1171a, +0x1171e, 0x1171e, +0x11720, 0x11721, +0x11726, 0x11726, +0x11730, 0x11746, +0x11800, 0x1182e, +0x11838, 0x11838, +0x1183b, 0x1183b, +0x118a0, 0x118f2, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x1192f, +0x11931, 0x11935, +0x11937, 0x11938, +0x1193f, 0x11942, +0x11944, 0x11946, +0x11950, 0x11959, +0x119a0, 0x119a7, +0x119aa, 0x119d3, +0x119dc, 0x119df, +0x119e1, 0x119e4, +0x11a00, 0x11a00, +0x11a0b, 0x11a32, +0x11a39, 0x11a3a, +0x11a3f, 0x11a46, +0x11a50, 0x11a50, +0x11a57, 0x11a58, +0x11a5c, 0x11a89, +0x11a97, 0x11a97, +0x11a9a, 0x11aa2, +0x11ab0, 0x11af8, +0x11b00, 0x11b09, +0x11bc0, 0x11be1, +0x11bf0, 0x11bf9, +0x11c00, 0x11c08, +0x11c0a, 0x11c2f, +0x11c3e, 0x11c3e, +0x11c40, 0x11c45, +0x11c50, 0x11c6c, +0x11c70, 0x11c8f, +0x11ca9, 0x11ca9, +0x11cb1, 0x11cb1, +0x11cb4, 0x11cb4, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d30, +0x11d46, 0x11d46, +0x11d50, 0x11d59, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d8e, +0x11d93, 0x11d94, +0x11d96, 0x11d96, +0x11d98, 0x11d98, +0x11da0, 0x11da9, +0x11ee0, 0x11ef2, +0x11ef5, 0x11ef8, +0x11f02, 0x11f10, +0x11f12, 0x11f35, +0x11f3e, 0x11f3f, +0x11f43, 0x11f59, +0x11fb0, 0x11fb0, +0x11fc0, 0x11ff1, +0x11fff, 0x12399, +0x12400, 0x1246e, +0x12470, 0x12474, +0x12480, 0x12543, +0x12f90, 0x12ff2, +0x13000, 0x1342f, +0x13441, 0x13446, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x1611d, +0x1612a, 0x1612c, +0x16130, 0x16139, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a60, 0x16a69, +0x16a6e, 0x16abe, +0x16ac0, 0x16ac9, +0x16ad0, 0x16aed, +0x16af5, 0x16af5, +0x16b00, 0x16b2f, +0x16b37, 0x16b45, +0x16b50, 0x16b59, +0x16b5b, 0x16b61, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d79, +0x16e40, 0x16e9a, +0x16f00, 0x16f4a, +0x16f50, 0x16f87, +0x16f93, 0x16f9f, +0x16fe0, 0x16fe3, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1bc9c, 0x1bc9c, +0x1bc9f, 0x1bc9f, +0x1cc00, 0x1ccf9, +0x1cd00, 0x1ceb3, +0x1cf50, 0x1cfc3, +0x1d000, 0x1d0f5, +0x1d100, 0x1d126, +0x1d129, 0x1d164, +0x1d16a, 0x1d16c, +0x1d183, 0x1d184, +0x1d18c, 0x1d1a9, +0x1d1ae, 0x1d1ea, +0x1d200, 0x1d241, +0x1d245, 0x1d245, +0x1d2c0, 0x1d2d3, +0x1d2e0, 0x1d2f3, +0x1d300, 0x1d356, +0x1d360, 0x1d378, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d7cb, +0x1d7ce, 0x1d9ff, +0x1da37, 0x1da3a, +0x1da6d, 0x1da74, +0x1da76, 0x1da83, +0x1da85, 0x1da8b, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e030, 0x1e06d, +0x1e100, 0x1e12c, +0x1e137, 0x1e13d, +0x1e140, 0x1e149, +0x1e14e, 0x1e14f, +0x1e290, 0x1e2ad, +0x1e2c0, 0x1e2eb, +0x1e2f0, 0x1e2f9, +0x1e2ff, 0x1e2ff, +0x1e4d0, 0x1e4eb, +0x1e4f0, 0x1e4f9, +0x1e5d0, 0x1e5ed, +0x1e5f0, 0x1e5fa, +0x1e5ff, 0x1e5ff, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e8c7, 0x1e8cf, +0x1e900, 0x1e943, +0x1e94b, 0x1e94b, +0x1e950, 0x1e959, +0x1e95e, 0x1e95f, +0x1ec71, 0x1ecb4, +0x1ed01, 0x1ed3d, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x1eef0, 0x1eef1, +0x1f000, 0x1f02b, +0x1f030, 0x1f093, +0x1f0a0, 0x1f0ae, +0x1f0b1, 0x1f0bf, +0x1f0c1, 0x1f0cf, +0x1f0d1, 0x1f0f5, +0x1f100, 0x1f1ad, +0x1f1e6, 0x1f202, +0x1f210, 0x1f23b, +0x1f240, 0x1f248, +0x1f250, 0x1f251, +0x1f260, 0x1f265, +0x1f300, 0x1f6d7, +0x1f6dc, 0x1f6ec, +0x1f6f0, 0x1f6fc, +0x1f700, 0x1f776, +0x1f77b, 0x1f7d9, +0x1f7e0, 0x1f7eb, +0x1f7f0, 0x1f7f0, +0x1f800, 0x1f80b, +0x1f810, 0x1f847, +0x1f850, 0x1f859, +0x1f860, 0x1f887, +0x1f890, 0x1f8ad, +0x1f8b0, 0x1f8bb, +0x1f8c0, 0x1f8c1, +0x1f900, 0x1fa53, +0x1fa60, 0x1fa6d, +0x1fa70, 0x1fa7c, +0x1fa80, 0x1fa89, +0x1fa8f, 0x1fac6, +0x1face, 0x1fadc, +0x1fadf, 0x1fae9, +0x1faf0, 0x1faf8, +0x1fb00, 0x1fb92, +0x1fb94, 0x1fbf9, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +}; /* END of CR_Grapheme_Base */ + +/* PROPERTY: 'Grapheme_Extend': Derived Property */ +static const OnigCodePoint +CR_Grapheme_Extend[] = { 375, +0x0300, 0x036f, +0x0483, 0x0489, +0x0591, 0x05bd, +0x05bf, 0x05bf, +0x05c1, 0x05c2, +0x05c4, 0x05c5, +0x05c7, 0x05c7, +0x0610, 0x061a, +0x064b, 0x065f, +0x0670, 0x0670, +0x06d6, 0x06dc, +0x06df, 0x06e4, +0x06e7, 0x06e8, +0x06ea, 0x06ed, +0x0711, 0x0711, +0x0730, 0x074a, +0x07a6, 0x07b0, +0x07eb, 0x07f3, +0x07fd, 0x07fd, +0x0816, 0x0819, +0x081b, 0x0823, +0x0825, 0x0827, +0x0829, 0x082d, +0x0859, 0x085b, +0x0897, 0x089f, +0x08ca, 0x08e1, +0x08e3, 0x0902, +0x093a, 0x093a, +0x093c, 0x093c, +0x0941, 0x0948, +0x094d, 0x094d, +0x0951, 0x0957, +0x0962, 0x0963, +0x0981, 0x0981, +0x09bc, 0x09bc, +0x09be, 0x09be, +0x09c1, 0x09c4, +0x09cd, 0x09cd, +0x09d7, 0x09d7, +0x09e2, 0x09e3, +0x09fe, 0x09fe, +0x0a01, 0x0a02, +0x0a3c, 0x0a3c, +0x0a41, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4d, +0x0a51, 0x0a51, +0x0a70, 0x0a71, +0x0a75, 0x0a75, +0x0a81, 0x0a82, +0x0abc, 0x0abc, +0x0ac1, 0x0ac5, +0x0ac7, 0x0ac8, +0x0acd, 0x0acd, +0x0ae2, 0x0ae3, +0x0afa, 0x0aff, +0x0b01, 0x0b01, +0x0b3c, 0x0b3c, +0x0b3e, 0x0b3f, +0x0b41, 0x0b44, +0x0b4d, 0x0b4d, +0x0b55, 0x0b57, +0x0b62, 0x0b63, +0x0b82, 0x0b82, +0x0bbe, 0x0bbe, +0x0bc0, 0x0bc0, +0x0bcd, 0x0bcd, +0x0bd7, 0x0bd7, +0x0c00, 0x0c00, +0x0c04, 0x0c04, +0x0c3c, 0x0c3c, +0x0c3e, 0x0c40, +0x0c46, 0x0c48, +0x0c4a, 0x0c4d, +0x0c55, 0x0c56, +0x0c62, 0x0c63, +0x0c81, 0x0c81, +0x0cbc, 0x0cbc, +0x0cbf, 0x0cc0, +0x0cc2, 0x0cc2, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccd, +0x0cd5, 0x0cd6, +0x0ce2, 0x0ce3, +0x0d00, 0x0d01, +0x0d3b, 0x0d3c, +0x0d3e, 0x0d3e, +0x0d41, 0x0d44, +0x0d4d, 0x0d4d, +0x0d57, 0x0d57, +0x0d62, 0x0d63, +0x0d81, 0x0d81, +0x0dca, 0x0dca, +0x0dcf, 0x0dcf, +0x0dd2, 0x0dd4, +0x0dd6, 0x0dd6, +0x0ddf, 0x0ddf, +0x0e31, 0x0e31, +0x0e34, 0x0e3a, +0x0e47, 0x0e4e, +0x0eb1, 0x0eb1, +0x0eb4, 0x0ebc, +0x0ec8, 0x0ece, +0x0f18, 0x0f19, +0x0f35, 0x0f35, +0x0f37, 0x0f37, +0x0f39, 0x0f39, +0x0f71, 0x0f7e, +0x0f80, 0x0f84, +0x0f86, 0x0f87, +0x0f8d, 0x0f97, +0x0f99, 0x0fbc, +0x0fc6, 0x0fc6, +0x102d, 0x1030, +0x1032, 0x1037, +0x1039, 0x103a, +0x103d, 0x103e, +0x1058, 0x1059, +0x105e, 0x1060, +0x1071, 0x1074, +0x1082, 0x1082, +0x1085, 0x1086, +0x108d, 0x108d, +0x109d, 0x109d, +0x135d, 0x135f, +0x1712, 0x1715, +0x1732, 0x1734, +0x1752, 0x1753, +0x1772, 0x1773, +0x17b4, 0x17b5, +0x17b7, 0x17bd, +0x17c6, 0x17c6, +0x17c9, 0x17d3, +0x17dd, 0x17dd, +0x180b, 0x180d, +0x180f, 0x180f, +0x1885, 0x1886, +0x18a9, 0x18a9, +0x1920, 0x1922, +0x1927, 0x1928, +0x1932, 0x1932, +0x1939, 0x193b, +0x1a17, 0x1a18, +0x1a1b, 0x1a1b, +0x1a56, 0x1a56, +0x1a58, 0x1a5e, +0x1a60, 0x1a60, +0x1a62, 0x1a62, +0x1a65, 0x1a6c, +0x1a73, 0x1a7c, +0x1a7f, 0x1a7f, +0x1ab0, 0x1ace, +0x1b00, 0x1b03, +0x1b34, 0x1b3d, +0x1b42, 0x1b44, +0x1b6b, 0x1b73, +0x1b80, 0x1b81, +0x1ba2, 0x1ba5, +0x1ba8, 0x1bad, +0x1be6, 0x1be6, +0x1be8, 0x1be9, +0x1bed, 0x1bed, +0x1bef, 0x1bf3, +0x1c2c, 0x1c33, +0x1c36, 0x1c37, +0x1cd0, 0x1cd2, +0x1cd4, 0x1ce0, +0x1ce2, 0x1ce8, +0x1ced, 0x1ced, +0x1cf4, 0x1cf4, +0x1cf8, 0x1cf9, +0x1dc0, 0x1dff, +0x200c, 0x200c, +0x20d0, 0x20f0, +0x2cef, 0x2cf1, +0x2d7f, 0x2d7f, +0x2de0, 0x2dff, +0x302a, 0x302f, +0x3099, 0x309a, +0xa66f, 0xa672, +0xa674, 0xa67d, +0xa69e, 0xa69f, +0xa6f0, 0xa6f1, +0xa802, 0xa802, +0xa806, 0xa806, +0xa80b, 0xa80b, +0xa825, 0xa826, +0xa82c, 0xa82c, +0xa8c4, 0xa8c5, +0xa8e0, 0xa8f1, +0xa8ff, 0xa8ff, +0xa926, 0xa92d, +0xa947, 0xa951, +0xa953, 0xa953, +0xa980, 0xa982, +0xa9b3, 0xa9b3, +0xa9b6, 0xa9b9, +0xa9bc, 0xa9bd, +0xa9c0, 0xa9c0, +0xa9e5, 0xa9e5, +0xaa29, 0xaa2e, +0xaa31, 0xaa32, +0xaa35, 0xaa36, +0xaa43, 0xaa43, +0xaa4c, 0xaa4c, +0xaa7c, 0xaa7c, +0xaab0, 0xaab0, +0xaab2, 0xaab4, +0xaab7, 0xaab8, +0xaabe, 0xaabf, +0xaac1, 0xaac1, +0xaaec, 0xaaed, +0xaaf6, 0xaaf6, +0xabe5, 0xabe5, +0xabe8, 0xabe8, +0xabed, 0xabed, +0xfb1e, 0xfb1e, +0xfe00, 0xfe0f, +0xfe20, 0xfe2f, +0xff9e, 0xff9f, +0x101fd, 0x101fd, +0x102e0, 0x102e0, +0x10376, 0x1037a, +0x10a01, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a0f, +0x10a38, 0x10a3a, +0x10a3f, 0x10a3f, +0x10ae5, 0x10ae6, +0x10d24, 0x10d27, +0x10d69, 0x10d6d, +0x10eab, 0x10eac, +0x10efc, 0x10eff, +0x10f46, 0x10f50, +0x10f82, 0x10f85, +0x11001, 0x11001, +0x11038, 0x11046, +0x11070, 0x11070, +0x11073, 0x11074, +0x1107f, 0x11081, +0x110b3, 0x110b6, +0x110b9, 0x110ba, +0x110c2, 0x110c2, +0x11100, 0x11102, +0x11127, 0x1112b, +0x1112d, 0x11134, +0x11173, 0x11173, +0x11180, 0x11181, +0x111b6, 0x111be, +0x111c0, 0x111c0, +0x111c9, 0x111cc, +0x111cf, 0x111cf, +0x1122f, 0x11231, +0x11234, 0x11237, +0x1123e, 0x1123e, +0x11241, 0x11241, +0x112df, 0x112df, +0x112e3, 0x112ea, +0x11300, 0x11301, +0x1133b, 0x1133c, +0x1133e, 0x1133e, +0x11340, 0x11340, +0x1134d, 0x1134d, +0x11357, 0x11357, +0x11366, 0x1136c, +0x11370, 0x11374, +0x113b8, 0x113b8, +0x113bb, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113c9, +0x113ce, 0x113d0, +0x113d2, 0x113d2, +0x113e1, 0x113e2, +0x11438, 0x1143f, +0x11442, 0x11444, +0x11446, 0x11446, +0x1145e, 0x1145e, +0x114b0, 0x114b0, +0x114b3, 0x114b8, +0x114ba, 0x114ba, +0x114bd, 0x114bd, +0x114bf, 0x114c0, +0x114c2, 0x114c3, +0x115af, 0x115af, +0x115b2, 0x115b5, +0x115bc, 0x115bd, +0x115bf, 0x115c0, +0x115dc, 0x115dd, +0x11633, 0x1163a, +0x1163d, 0x1163d, +0x1163f, 0x11640, +0x116ab, 0x116ab, +0x116ad, 0x116ad, +0x116b0, 0x116b7, +0x1171d, 0x1171d, +0x1171f, 0x1171f, +0x11722, 0x11725, +0x11727, 0x1172b, +0x1182f, 0x11837, +0x11839, 0x1183a, +0x11930, 0x11930, +0x1193b, 0x1193e, +0x11943, 0x11943, +0x119d4, 0x119d7, +0x119da, 0x119db, +0x119e0, 0x119e0, +0x11a01, 0x11a0a, +0x11a33, 0x11a38, +0x11a3b, 0x11a3e, +0x11a47, 0x11a47, +0x11a51, 0x11a56, +0x11a59, 0x11a5b, +0x11a8a, 0x11a96, +0x11a98, 0x11a99, +0x11c30, 0x11c36, +0x11c38, 0x11c3d, +0x11c3f, 0x11c3f, +0x11c92, 0x11ca7, +0x11caa, 0x11cb0, +0x11cb2, 0x11cb3, +0x11cb5, 0x11cb6, +0x11d31, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d45, +0x11d47, 0x11d47, +0x11d90, 0x11d91, +0x11d95, 0x11d95, +0x11d97, 0x11d97, +0x11ef3, 0x11ef4, +0x11f00, 0x11f01, +0x11f36, 0x11f3a, +0x11f40, 0x11f42, +0x11f5a, 0x11f5a, +0x13440, 0x13440, +0x13447, 0x13455, +0x1611e, 0x16129, +0x1612d, 0x1612f, +0x16af0, 0x16af4, +0x16b30, 0x16b36, +0x16f4f, 0x16f4f, +0x16f8f, 0x16f92, +0x16fe4, 0x16fe4, +0x16ff0, 0x16ff1, +0x1bc9d, 0x1bc9e, +0x1cf00, 0x1cf2d, +0x1cf30, 0x1cf46, +0x1d165, 0x1d169, +0x1d16d, 0x1d172, +0x1d17b, 0x1d182, +0x1d185, 0x1d18b, +0x1d1aa, 0x1d1ad, +0x1d242, 0x1d244, +0x1da00, 0x1da36, +0x1da3b, 0x1da6c, +0x1da75, 0x1da75, +0x1da84, 0x1da84, +0x1da9b, 0x1da9f, +0x1daa1, 0x1daaf, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e08f, 0x1e08f, +0x1e130, 0x1e136, +0x1e2ae, 0x1e2ae, +0x1e2ec, 0x1e2ef, +0x1e4ec, 0x1e4ef, +0x1e5ee, 0x1e5ef, +0x1e8d0, 0x1e8d6, +0x1e944, 0x1e94a, +0xe0020, 0xe007f, +0xe0100, 0xe01ef, +}; /* END of CR_Grapheme_Extend */ + +/* PROPERTY: 'Grapheme_Link': Derived Property */ +static const OnigCodePoint +CR_Grapheme_Link[] = { 58, +0x094d, 0x094d, +0x09cd, 0x09cd, +0x0a4d, 0x0a4d, +0x0acd, 0x0acd, +0x0b4d, 0x0b4d, +0x0bcd, 0x0bcd, +0x0c4d, 0x0c4d, +0x0ccd, 0x0ccd, +0x0d3b, 0x0d3c, +0x0d4d, 0x0d4d, +0x0dca, 0x0dca, +0x0e3a, 0x0e3a, +0x0eba, 0x0eba, +0x0f84, 0x0f84, +0x1039, 0x103a, +0x1714, 0x1715, +0x1734, 0x1734, +0x17d2, 0x17d2, +0x1a60, 0x1a60, +0x1b44, 0x1b44, +0x1baa, 0x1bab, +0x1bf2, 0x1bf3, +0x2d7f, 0x2d7f, +0xa806, 0xa806, +0xa82c, 0xa82c, +0xa8c4, 0xa8c4, +0xa953, 0xa953, +0xa9c0, 0xa9c0, +0xaaf6, 0xaaf6, +0xabed, 0xabed, +0x10a3f, 0x10a3f, +0x11046, 0x11046, +0x11070, 0x11070, +0x1107f, 0x1107f, +0x110b9, 0x110b9, +0x11133, 0x11134, +0x111c0, 0x111c0, +0x11235, 0x11235, +0x112ea, 0x112ea, +0x1134d, 0x1134d, +0x113ce, 0x113d0, +0x11442, 0x11442, +0x114c2, 0x114c2, +0x115bf, 0x115bf, +0x1163f, 0x1163f, +0x116b6, 0x116b6, +0x1172b, 0x1172b, +0x11839, 0x11839, +0x1193d, 0x1193e, +0x119e0, 0x119e0, +0x11a34, 0x11a34, +0x11a47, 0x11a47, +0x11a99, 0x11a99, +0x11c3f, 0x11c3f, +0x11d44, 0x11d45, +0x11d97, 0x11d97, +0x11f41, 0x11f42, +0x1612f, 0x1612f, +}; /* END of CR_Grapheme_Link */ + +/* PROPERTY: 'Greek': Script */ +static const OnigCodePoint +CR_Greek[] = { 36, +0x0370, 0x0373, +0x0375, 0x0377, +0x037a, 0x037d, +0x037f, 0x037f, +0x0384, 0x0384, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x03e1, +0x03f0, 0x03ff, +0x1d26, 0x1d2a, +0x1d5d, 0x1d61, +0x1d66, 0x1d6a, +0x1dbf, 0x1dbf, +0x1f00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fc4, +0x1fc6, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fdd, 0x1fef, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffe, +0x2126, 0x2126, +0xab65, 0xab65, +0x10140, 0x1018e, +0x101a0, 0x101a0, +0x1d200, 0x1d245, +}; /* END of CR_Greek */ + +/* PROPERTY: 'Gujarati': Script */ +static const OnigCodePoint +CR_Gujarati[] = { 14, +0x0a81, 0x0a83, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abc, 0x0ac5, +0x0ac7, 0x0ac9, +0x0acb, 0x0acd, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae3, +0x0ae6, 0x0af1, +0x0af9, 0x0aff, +}; /* END of CR_Gujarati */ + +/* PROPERTY: 'Gunjala_Gondi': Script */ +static const OnigCodePoint +CR_Gunjala_Gondi[] = { 6, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d8e, +0x11d90, 0x11d91, +0x11d93, 0x11d98, +0x11da0, 0x11da9, +}; /* END of CR_Gunjala_Gondi */ + +/* PROPERTY: 'Gurmukhi': Script */ +static const OnigCodePoint +CR_Gurmukhi[] = { 16, +0x0a01, 0x0a03, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a3c, 0x0a3c, +0x0a3e, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4d, +0x0a51, 0x0a51, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a66, 0x0a76, +}; /* END of CR_Gurmukhi */ + +/* PROPERTY: 'Gurung_Khema': Script */ +static const OnigCodePoint +CR_Gurung_Khema[] = { 1, +0x16100, 0x16139, +}; /* END of CR_Gurung_Khema */ + +/* PROPERTY: 'Han': Script */ +static const OnigCodePoint +CR_Han[] = { 22, +0x2e80, 0x2e99, +0x2e9b, 0x2ef3, +0x2f00, 0x2fd5, +0x3005, 0x3005, +0x3007, 0x3007, +0x3021, 0x3029, +0x3038, 0x303b, +0x3400, 0x4dbf, +0x4e00, 0x9fff, +0xf900, 0xfa6d, +0xfa70, 0xfad9, +0x16fe2, 0x16fe3, +0x16ff0, 0x16ff1, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +}; /* END of CR_Han */ + +/* PROPERTY: 'Hangul': Script */ +static const OnigCodePoint +CR_Hangul[] = { 14, +0x1100, 0x11ff, +0x302e, 0x302f, +0x3131, 0x318e, +0x3200, 0x321e, +0x3260, 0x327e, +0xa960, 0xa97c, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xffa0, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +}; /* END of CR_Hangul */ + +/* PROPERTY: 'Hanifi_Rohingya': Script */ +static const OnigCodePoint +CR_Hanifi_Rohingya[] = { 2, +0x10d00, 0x10d27, +0x10d30, 0x10d39, +}; /* END of CR_Hanifi_Rohingya */ + +/* PROPERTY: 'Hanunoo': Script */ +static const OnigCodePoint +CR_Hanunoo[] = { 1, +0x1720, 0x1734, +}; /* END of CR_Hanunoo */ + +/* PROPERTY: 'Hatran': Script */ +static const OnigCodePoint +CR_Hatran[] = { 3, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x108fb, 0x108ff, +}; /* END of CR_Hatran */ + +/* PROPERTY: 'Hebrew': Script */ +static const OnigCodePoint +CR_Hebrew[] = { 9, +0x0591, 0x05c7, +0x05d0, 0x05ea, +0x05ef, 0x05f4, +0xfb1d, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfb4f, +}; /* END of CR_Hebrew */ + +/* PROPERTY: 'Hex_Digit': Binary Property */ +static const OnigCodePoint +CR_Hex_Digit[] = { 6, +0x0030, 0x0039, +0x0041, 0x0046, +0x0061, 0x0066, +0xff10, 0xff19, +0xff21, 0xff26, +0xff41, 0xff46, +}; /* END of CR_Hex_Digit */ + +/* PROPERTY: 'Hiragana': Script */ +static const OnigCodePoint +CR_Hiragana[] = { 6, +0x3041, 0x3096, +0x309d, 0x309f, +0x1b001, 0x1b11f, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1f200, 0x1f200, +}; /* END of CR_Hiragana */ + +/* PROPERTY: 'Hyphen': Binary Property */ +static const OnigCodePoint +CR_Hyphen[] = { 10, +0x002d, 0x002d, +0x00ad, 0x00ad, +0x058a, 0x058a, +0x1806, 0x1806, +0x2010, 0x2011, +0x2e17, 0x2e17, +0x30fb, 0x30fb, +0xfe63, 0xfe63, +0xff0d, 0xff0d, +0xff65, 0xff65, +}; /* END of CR_Hyphen */ + +/* PROPERTY: 'IDS_Binary_Operator': Binary Property */ +static const OnigCodePoint +CR_IDS_Binary_Operator[] = { 3, +0x2ff0, 0x2ff1, +0x2ff4, 0x2ffd, +0x31ef, 0x31ef, +}; /* END of CR_IDS_Binary_Operator */ + +/* PROPERTY: 'IDS_Trinary_Operator': Binary Property */ +static const OnigCodePoint +CR_IDS_Trinary_Operator[] = { 1, +0x2ff2, 0x2ff3, +}; /* END of CR_IDS_Trinary_Operator */ + +/* PROPERTY: 'IDS_Unary_Operator': Binary Property */ +static const OnigCodePoint +CR_IDS_Unary_Operator[] = { 1, +0x2ffe, 0x2fff, +}; /* END of CR_IDS_Unary_Operator */ + +/* PROPERTY: 'ID_Compat_Math_Continue': Binary Property */ +static const OnigCodePoint +CR_ID_Compat_Math_Continue[] = { 18, +0x00b2, 0x00b3, +0x00b9, 0x00b9, +0x2070, 0x2070, +0x2074, 0x207e, +0x2080, 0x208e, +0x2202, 0x2202, +0x2207, 0x2207, +0x221e, 0x221e, +0x1d6c1, 0x1d6c1, +0x1d6db, 0x1d6db, +0x1d6fb, 0x1d6fb, +0x1d715, 0x1d715, +0x1d735, 0x1d735, +0x1d74f, 0x1d74f, +0x1d76f, 0x1d76f, +0x1d789, 0x1d789, +0x1d7a9, 0x1d7a9, +0x1d7c3, 0x1d7c3, +}; /* END of CR_ID_Compat_Math_Continue */ + +/* PROPERTY: 'ID_Compat_Math_Start': Binary Property */ +static const OnigCodePoint +CR_ID_Compat_Math_Start[] = { 13, +0x2202, 0x2202, +0x2207, 0x2207, +0x221e, 0x221e, +0x1d6c1, 0x1d6c1, +0x1d6db, 0x1d6db, +0x1d6fb, 0x1d6fb, +0x1d715, 0x1d715, +0x1d735, 0x1d735, +0x1d74f, 0x1d74f, +0x1d76f, 0x1d76f, +0x1d789, 0x1d789, +0x1d7a9, 0x1d7a9, +0x1d7c3, 0x1d7c3, +}; /* END of CR_ID_Compat_Math_Start */ + +/* PROPERTY: 'ID_Continue': Derived Property */ +static const OnigCodePoint +CR_ID_Continue[] = { 793, +0x0030, 0x0039, +0x0041, 0x005a, +0x005f, 0x005f, +0x0061, 0x007a, +0x00aa, 0x00aa, +0x00b5, 0x00b5, +0x00b7, 0x00b7, +0x00ba, 0x00ba, +0x00c0, 0x00d6, +0x00d8, 0x00f6, +0x00f8, 0x02c1, +0x02c6, 0x02d1, +0x02e0, 0x02e4, +0x02ec, 0x02ec, +0x02ee, 0x02ee, +0x0300, 0x0374, +0x0376, 0x0377, +0x037a, 0x037d, +0x037f, 0x037f, +0x0386, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x03f5, +0x03f7, 0x0481, +0x0483, 0x0487, +0x048a, 0x052f, +0x0531, 0x0556, +0x0559, 0x0559, +0x0560, 0x0588, +0x0591, 0x05bd, +0x05bf, 0x05bf, +0x05c1, 0x05c2, +0x05c4, 0x05c5, +0x05c7, 0x05c7, +0x05d0, 0x05ea, +0x05ef, 0x05f2, +0x0610, 0x061a, +0x0620, 0x0669, +0x066e, 0x06d3, +0x06d5, 0x06dc, +0x06df, 0x06e8, +0x06ea, 0x06fc, +0x06ff, 0x06ff, +0x0710, 0x074a, +0x074d, 0x07b1, +0x07c0, 0x07f5, +0x07fa, 0x07fa, +0x07fd, 0x07fd, +0x0800, 0x082d, +0x0840, 0x085b, +0x0860, 0x086a, +0x0870, 0x0887, +0x0889, 0x088e, +0x0897, 0x08e1, +0x08e3, 0x0963, +0x0966, 0x096f, +0x0971, 0x0983, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bc, 0x09c4, +0x09c7, 0x09c8, +0x09cb, 0x09ce, +0x09d7, 0x09d7, +0x09dc, 0x09dd, +0x09df, 0x09e3, +0x09e6, 0x09f1, +0x09fc, 0x09fc, +0x09fe, 0x09fe, +0x0a01, 0x0a03, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a3c, 0x0a3c, +0x0a3e, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4d, +0x0a51, 0x0a51, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a66, 0x0a75, +0x0a81, 0x0a83, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abc, 0x0ac5, +0x0ac7, 0x0ac9, +0x0acb, 0x0acd, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae3, +0x0ae6, 0x0aef, +0x0af9, 0x0aff, +0x0b01, 0x0b03, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3c, 0x0b44, +0x0b47, 0x0b48, +0x0b4b, 0x0b4d, +0x0b55, 0x0b57, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b63, +0x0b66, 0x0b6f, +0x0b71, 0x0b71, +0x0b82, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bbe, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcd, +0x0bd0, 0x0bd0, +0x0bd7, 0x0bd7, +0x0be6, 0x0bef, +0x0c00, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3c, 0x0c44, +0x0c46, 0x0c48, +0x0c4a, 0x0c4d, +0x0c55, 0x0c56, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c63, +0x0c66, 0x0c6f, +0x0c80, 0x0c83, +0x0c85, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbc, 0x0cc4, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccd, +0x0cd5, 0x0cd6, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce3, +0x0ce6, 0x0cef, +0x0cf1, 0x0cf3, +0x0d00, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d44, +0x0d46, 0x0d48, +0x0d4a, 0x0d4e, +0x0d54, 0x0d57, +0x0d5f, 0x0d63, +0x0d66, 0x0d6f, +0x0d7a, 0x0d7f, +0x0d81, 0x0d83, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0dca, 0x0dca, +0x0dcf, 0x0dd4, +0x0dd6, 0x0dd6, +0x0dd8, 0x0ddf, +0x0de6, 0x0def, +0x0df2, 0x0df3, +0x0e01, 0x0e3a, +0x0e40, 0x0e4e, +0x0e50, 0x0e59, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0ec8, 0x0ece, +0x0ed0, 0x0ed9, +0x0edc, 0x0edf, +0x0f00, 0x0f00, +0x0f18, 0x0f19, +0x0f20, 0x0f29, +0x0f35, 0x0f35, +0x0f37, 0x0f37, +0x0f39, 0x0f39, +0x0f3e, 0x0f47, +0x0f49, 0x0f6c, +0x0f71, 0x0f84, +0x0f86, 0x0f97, +0x0f99, 0x0fbc, +0x0fc6, 0x0fc6, +0x1000, 0x1049, +0x1050, 0x109d, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x10fa, +0x10fc, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x135d, 0x135f, +0x1369, 0x1371, +0x1380, 0x138f, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1401, 0x166c, +0x166f, 0x167f, +0x1681, 0x169a, +0x16a0, 0x16ea, +0x16ee, 0x16f8, +0x1700, 0x1715, +0x171f, 0x1734, +0x1740, 0x1753, +0x1760, 0x176c, +0x176e, 0x1770, +0x1772, 0x1773, +0x1780, 0x17d3, +0x17d7, 0x17d7, +0x17dc, 0x17dd, +0x17e0, 0x17e9, +0x180b, 0x180d, +0x180f, 0x1819, +0x1820, 0x1878, +0x1880, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1920, 0x192b, +0x1930, 0x193b, +0x1946, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x19d0, 0x19da, +0x1a00, 0x1a1b, +0x1a20, 0x1a5e, +0x1a60, 0x1a7c, +0x1a7f, 0x1a89, +0x1a90, 0x1a99, +0x1aa7, 0x1aa7, +0x1ab0, 0x1abd, +0x1abf, 0x1ace, +0x1b00, 0x1b4c, +0x1b50, 0x1b59, +0x1b6b, 0x1b73, +0x1b80, 0x1bf3, +0x1c00, 0x1c37, +0x1c40, 0x1c49, +0x1c4d, 0x1c7d, +0x1c80, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1cd0, 0x1cd2, +0x1cd4, 0x1cfa, +0x1d00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fbc, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fcc, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fe0, 0x1fec, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffc, +0x200c, 0x200d, +0x203f, 0x2040, +0x2054, 0x2054, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x20d0, 0x20dc, +0x20e1, 0x20e1, +0x20e5, 0x20f0, +0x2102, 0x2102, +0x2107, 0x2107, +0x210a, 0x2113, +0x2115, 0x2115, +0x2118, 0x211d, +0x2124, 0x2124, +0x2126, 0x2126, +0x2128, 0x2128, +0x212a, 0x2139, +0x213c, 0x213f, +0x2145, 0x2149, +0x214e, 0x214e, +0x2160, 0x2188, +0x2c00, 0x2ce4, +0x2ceb, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d6f, +0x2d7f, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x2de0, 0x2dff, +0x3005, 0x3007, +0x3021, 0x302f, +0x3031, 0x3035, +0x3038, 0x303c, +0x3041, 0x3096, +0x3099, 0x309f, +0x30a1, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x31a0, 0x31bf, +0x31f0, 0x31ff, +0x3400, 0x4dbf, +0x4e00, 0xa48c, +0xa4d0, 0xa4fd, +0xa500, 0xa60c, +0xa610, 0xa62b, +0xa640, 0xa66f, +0xa674, 0xa67d, +0xa67f, 0xa6f1, +0xa717, 0xa71f, +0xa722, 0xa788, +0xa78b, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa827, +0xa82c, 0xa82c, +0xa840, 0xa873, +0xa880, 0xa8c5, +0xa8d0, 0xa8d9, +0xa8e0, 0xa8f7, +0xa8fb, 0xa8fb, +0xa8fd, 0xa92d, +0xa930, 0xa953, +0xa960, 0xa97c, +0xa980, 0xa9c0, +0xa9cf, 0xa9d9, +0xa9e0, 0xa9fe, +0xaa00, 0xaa36, +0xaa40, 0xaa4d, +0xaa50, 0xaa59, +0xaa60, 0xaa76, +0xaa7a, 0xaac2, +0xaadb, 0xaadd, +0xaae0, 0xaaef, +0xaaf2, 0xaaf6, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab5a, +0xab5c, 0xab69, +0xab70, 0xabea, +0xabec, 0xabed, +0xabf0, 0xabf9, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xf900, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb28, +0xfb2a, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbb1, +0xfbd3, 0xfd3d, +0xfd50, 0xfd8f, +0xfd92, 0xfdc7, +0xfdf0, 0xfdfb, +0xfe00, 0xfe0f, +0xfe20, 0xfe2f, +0xfe33, 0xfe34, +0xfe4d, 0xfe4f, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0xff10, 0xff19, +0xff21, 0xff3a, +0xff3f, 0xff3f, +0xff41, 0xff5a, +0xff65, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10140, 0x10174, +0x101fd, 0x101fd, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x102e0, 0x102e0, +0x10300, 0x1031f, +0x1032d, 0x1034a, +0x10350, 0x1037a, +0x10380, 0x1039d, +0x103a0, 0x103c3, +0x103c8, 0x103cf, +0x103d1, 0x103d5, +0x10400, 0x1049d, +0x104a0, 0x104a9, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10860, 0x10876, +0x10880, 0x1089e, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x10900, 0x10915, +0x10920, 0x10939, +0x10980, 0x109b7, +0x109be, 0x109bf, +0x10a00, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a38, 0x10a3a, +0x10a3f, 0x10a3f, +0x10a60, 0x10a7c, +0x10a80, 0x10a9c, +0x10ac0, 0x10ac7, +0x10ac9, 0x10ae6, +0x10b00, 0x10b35, +0x10b40, 0x10b55, +0x10b60, 0x10b72, +0x10b80, 0x10b91, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10d00, 0x10d27, +0x10d30, 0x10d39, +0x10d40, 0x10d65, +0x10d69, 0x10d6d, +0x10d6f, 0x10d85, +0x10e80, 0x10ea9, +0x10eab, 0x10eac, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10efc, 0x10f1c, +0x10f27, 0x10f27, +0x10f30, 0x10f50, +0x10f70, 0x10f85, +0x10fb0, 0x10fc4, +0x10fe0, 0x10ff6, +0x11000, 0x11046, +0x11066, 0x11075, +0x1107f, 0x110ba, +0x110c2, 0x110c2, +0x110d0, 0x110e8, +0x110f0, 0x110f9, +0x11100, 0x11134, +0x11136, 0x1113f, +0x11144, 0x11147, +0x11150, 0x11173, +0x11176, 0x11176, +0x11180, 0x111c4, +0x111c9, 0x111cc, +0x111ce, 0x111da, +0x111dc, 0x111dc, +0x11200, 0x11211, +0x11213, 0x11237, +0x1123e, 0x11241, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a8, +0x112b0, 0x112ea, +0x112f0, 0x112f9, +0x11300, 0x11303, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133b, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134d, +0x11350, 0x11350, +0x11357, 0x11357, +0x1135d, 0x11363, +0x11366, 0x1136c, +0x11370, 0x11374, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113d3, +0x113e1, 0x113e2, +0x11400, 0x1144a, +0x11450, 0x11459, +0x1145e, 0x11461, +0x11480, 0x114c5, +0x114c7, 0x114c7, +0x114d0, 0x114d9, +0x11580, 0x115b5, +0x115b8, 0x115c0, +0x115d8, 0x115dd, +0x11600, 0x11640, +0x11644, 0x11644, +0x11650, 0x11659, +0x11680, 0x116b8, +0x116c0, 0x116c9, +0x116d0, 0x116e3, +0x11700, 0x1171a, +0x1171d, 0x1172b, +0x11730, 0x11739, +0x11740, 0x11746, +0x11800, 0x1183a, +0x118a0, 0x118e9, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x11935, +0x11937, 0x11938, +0x1193b, 0x11943, +0x11950, 0x11959, +0x119a0, 0x119a7, +0x119aa, 0x119d7, +0x119da, 0x119e1, +0x119e3, 0x119e4, +0x11a00, 0x11a3e, +0x11a47, 0x11a47, +0x11a50, 0x11a99, +0x11a9d, 0x11a9d, +0x11ab0, 0x11af8, +0x11bc0, 0x11be0, +0x11bf0, 0x11bf9, +0x11c00, 0x11c08, +0x11c0a, 0x11c36, +0x11c38, 0x11c40, +0x11c50, 0x11c59, +0x11c72, 0x11c8f, +0x11c92, 0x11ca7, +0x11ca9, 0x11cb6, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d47, +0x11d50, 0x11d59, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d8e, +0x11d90, 0x11d91, +0x11d93, 0x11d98, +0x11da0, 0x11da9, +0x11ee0, 0x11ef6, +0x11f00, 0x11f10, +0x11f12, 0x11f3a, +0x11f3e, 0x11f42, +0x11f50, 0x11f5a, +0x11fb0, 0x11fb0, +0x12000, 0x12399, +0x12400, 0x1246e, +0x12480, 0x12543, +0x12f90, 0x12ff0, +0x13000, 0x1342f, +0x13440, 0x13455, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x16139, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a60, 0x16a69, +0x16a70, 0x16abe, +0x16ac0, 0x16ac9, +0x16ad0, 0x16aed, +0x16af0, 0x16af4, +0x16b00, 0x16b36, +0x16b40, 0x16b43, +0x16b50, 0x16b59, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d6c, +0x16d70, 0x16d79, +0x16e40, 0x16e7f, +0x16f00, 0x16f4a, +0x16f4f, 0x16f87, +0x16f8f, 0x16f9f, +0x16fe0, 0x16fe1, +0x16fe3, 0x16fe4, +0x16ff0, 0x16ff1, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1bc9d, 0x1bc9e, +0x1ccf0, 0x1ccf9, +0x1cf00, 0x1cf2d, +0x1cf30, 0x1cf46, +0x1d165, 0x1d169, +0x1d16d, 0x1d172, +0x1d17b, 0x1d182, +0x1d185, 0x1d18b, +0x1d1aa, 0x1d1ad, +0x1d242, 0x1d244, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d6c0, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6fa, +0x1d6fc, 0x1d714, +0x1d716, 0x1d734, +0x1d736, 0x1d74e, +0x1d750, 0x1d76e, +0x1d770, 0x1d788, +0x1d78a, 0x1d7a8, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7cb, +0x1d7ce, 0x1d7ff, +0x1da00, 0x1da36, +0x1da3b, 0x1da6c, +0x1da75, 0x1da75, +0x1da84, 0x1da84, +0x1da9b, 0x1da9f, +0x1daa1, 0x1daaf, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e030, 0x1e06d, +0x1e08f, 0x1e08f, +0x1e100, 0x1e12c, +0x1e130, 0x1e13d, +0x1e140, 0x1e149, +0x1e14e, 0x1e14e, +0x1e290, 0x1e2ae, +0x1e2c0, 0x1e2f9, +0x1e4d0, 0x1e4f9, +0x1e5d0, 0x1e5fa, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e8d0, 0x1e8d6, +0x1e900, 0x1e94b, +0x1e950, 0x1e959, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x1fbf0, 0x1fbf9, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +0xe0100, 0xe01ef, +}; /* END of CR_ID_Continue */ + +/* PROPERTY: 'ID_Start': Derived Property */ +static const OnigCodePoint +CR_ID_Start[] = { 677, +0x0041, 0x005a, +0x0061, 0x007a, +0x00aa, 0x00aa, +0x00b5, 0x00b5, +0x00ba, 0x00ba, +0x00c0, 0x00d6, +0x00d8, 0x00f6, +0x00f8, 0x02c1, +0x02c6, 0x02d1, +0x02e0, 0x02e4, +0x02ec, 0x02ec, +0x02ee, 0x02ee, +0x0370, 0x0374, +0x0376, 0x0377, +0x037a, 0x037d, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x03f5, +0x03f7, 0x0481, +0x048a, 0x052f, +0x0531, 0x0556, +0x0559, 0x0559, +0x0560, 0x0588, +0x05d0, 0x05ea, +0x05ef, 0x05f2, +0x0620, 0x064a, +0x066e, 0x066f, +0x0671, 0x06d3, +0x06d5, 0x06d5, +0x06e5, 0x06e6, +0x06ee, 0x06ef, +0x06fa, 0x06fc, +0x06ff, 0x06ff, +0x0710, 0x0710, +0x0712, 0x072f, +0x074d, 0x07a5, +0x07b1, 0x07b1, +0x07ca, 0x07ea, +0x07f4, 0x07f5, +0x07fa, 0x07fa, +0x0800, 0x0815, +0x081a, 0x081a, +0x0824, 0x0824, +0x0828, 0x0828, +0x0840, 0x0858, +0x0860, 0x086a, +0x0870, 0x0887, +0x0889, 0x088e, +0x08a0, 0x08c9, +0x0904, 0x0939, +0x093d, 0x093d, +0x0950, 0x0950, +0x0958, 0x0961, +0x0971, 0x0980, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bd, 0x09bd, +0x09ce, 0x09ce, +0x09dc, 0x09dd, +0x09df, 0x09e1, +0x09f0, 0x09f1, +0x09fc, 0x09fc, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a72, 0x0a74, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abd, 0x0abd, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae1, +0x0af9, 0x0af9, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3d, 0x0b3d, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b61, +0x0b71, 0x0b71, +0x0b83, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bd0, 0x0bd0, +0x0c05, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3d, 0x0c3d, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c61, +0x0c80, 0x0c80, +0x0c85, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbd, 0x0cbd, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce1, +0x0cf1, 0x0cf2, +0x0d04, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d3a, +0x0d3d, 0x0d3d, +0x0d4e, 0x0d4e, +0x0d54, 0x0d56, +0x0d5f, 0x0d61, +0x0d7a, 0x0d7f, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0e01, 0x0e30, +0x0e32, 0x0e33, +0x0e40, 0x0e46, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0eb0, +0x0eb2, 0x0eb3, +0x0ebd, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0edc, 0x0edf, +0x0f00, 0x0f00, +0x0f40, 0x0f47, +0x0f49, 0x0f6c, +0x0f88, 0x0f8c, +0x1000, 0x102a, +0x103f, 0x103f, +0x1050, 0x1055, +0x105a, 0x105d, +0x1061, 0x1061, +0x1065, 0x1066, +0x106e, 0x1070, +0x1075, 0x1081, +0x108e, 0x108e, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x10fa, +0x10fc, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x1380, 0x138f, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1401, 0x166c, +0x166f, 0x167f, +0x1681, 0x169a, +0x16a0, 0x16ea, +0x16ee, 0x16f8, +0x1700, 0x1711, +0x171f, 0x1731, +0x1740, 0x1751, +0x1760, 0x176c, +0x176e, 0x1770, +0x1780, 0x17b3, +0x17d7, 0x17d7, +0x17dc, 0x17dc, +0x1820, 0x1878, +0x1880, 0x18a8, +0x18aa, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1950, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x1a00, 0x1a16, +0x1a20, 0x1a54, +0x1aa7, 0x1aa7, +0x1b05, 0x1b33, +0x1b45, 0x1b4c, +0x1b83, 0x1ba0, +0x1bae, 0x1baf, +0x1bba, 0x1be5, +0x1c00, 0x1c23, +0x1c4d, 0x1c4f, +0x1c5a, 0x1c7d, +0x1c80, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1ce9, 0x1cec, +0x1cee, 0x1cf3, +0x1cf5, 0x1cf6, +0x1cfa, 0x1cfa, +0x1d00, 0x1dbf, +0x1e00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fbc, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fcc, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fe0, 0x1fec, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffc, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x2102, 0x2102, +0x2107, 0x2107, +0x210a, 0x2113, +0x2115, 0x2115, +0x2118, 0x211d, +0x2124, 0x2124, +0x2126, 0x2126, +0x2128, 0x2128, +0x212a, 0x2139, +0x213c, 0x213f, +0x2145, 0x2149, +0x214e, 0x214e, +0x2160, 0x2188, +0x2c00, 0x2ce4, +0x2ceb, 0x2cee, +0x2cf2, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d6f, +0x2d80, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x3005, 0x3007, +0x3021, 0x3029, +0x3031, 0x3035, +0x3038, 0x303c, +0x3041, 0x3096, +0x309b, 0x309f, +0x30a1, 0x30fa, +0x30fc, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x31a0, 0x31bf, +0x31f0, 0x31ff, +0x3400, 0x4dbf, +0x4e00, 0xa48c, +0xa4d0, 0xa4fd, +0xa500, 0xa60c, +0xa610, 0xa61f, +0xa62a, 0xa62b, +0xa640, 0xa66e, +0xa67f, 0xa69d, +0xa6a0, 0xa6ef, +0xa717, 0xa71f, +0xa722, 0xa788, +0xa78b, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa801, +0xa803, 0xa805, +0xa807, 0xa80a, +0xa80c, 0xa822, +0xa840, 0xa873, +0xa882, 0xa8b3, +0xa8f2, 0xa8f7, +0xa8fb, 0xa8fb, +0xa8fd, 0xa8fe, +0xa90a, 0xa925, +0xa930, 0xa946, +0xa960, 0xa97c, +0xa984, 0xa9b2, +0xa9cf, 0xa9cf, +0xa9e0, 0xa9e4, +0xa9e6, 0xa9ef, +0xa9fa, 0xa9fe, +0xaa00, 0xaa28, +0xaa40, 0xaa42, +0xaa44, 0xaa4b, +0xaa60, 0xaa76, +0xaa7a, 0xaa7a, +0xaa7e, 0xaaaf, +0xaab1, 0xaab1, +0xaab5, 0xaab6, +0xaab9, 0xaabd, +0xaac0, 0xaac0, +0xaac2, 0xaac2, +0xaadb, 0xaadd, +0xaae0, 0xaaea, +0xaaf2, 0xaaf4, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab5a, +0xab5c, 0xab69, +0xab70, 0xabe2, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xf900, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb1d, +0xfb1f, 0xfb28, +0xfb2a, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbb1, +0xfbd3, 0xfd3d, +0xfd50, 0xfd8f, +0xfd92, 0xfdc7, +0xfdf0, 0xfdfb, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0xff21, 0xff3a, +0xff41, 0xff5a, +0xff66, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10140, 0x10174, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x10300, 0x1031f, +0x1032d, 0x1034a, +0x10350, 0x10375, +0x10380, 0x1039d, +0x103a0, 0x103c3, +0x103c8, 0x103cf, +0x103d1, 0x103d5, +0x10400, 0x1049d, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10860, 0x10876, +0x10880, 0x1089e, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x10900, 0x10915, +0x10920, 0x10939, +0x10980, 0x109b7, +0x109be, 0x109bf, +0x10a00, 0x10a00, +0x10a10, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a60, 0x10a7c, +0x10a80, 0x10a9c, +0x10ac0, 0x10ac7, +0x10ac9, 0x10ae4, +0x10b00, 0x10b35, +0x10b40, 0x10b55, +0x10b60, 0x10b72, +0x10b80, 0x10b91, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10d00, 0x10d23, +0x10d4a, 0x10d65, +0x10d6f, 0x10d85, +0x10e80, 0x10ea9, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10f00, 0x10f1c, +0x10f27, 0x10f27, +0x10f30, 0x10f45, +0x10f70, 0x10f81, +0x10fb0, 0x10fc4, +0x10fe0, 0x10ff6, +0x11003, 0x11037, +0x11071, 0x11072, +0x11075, 0x11075, +0x11083, 0x110af, +0x110d0, 0x110e8, +0x11103, 0x11126, +0x11144, 0x11144, +0x11147, 0x11147, +0x11150, 0x11172, +0x11176, 0x11176, +0x11183, 0x111b2, +0x111c1, 0x111c4, +0x111da, 0x111da, +0x111dc, 0x111dc, +0x11200, 0x11211, +0x11213, 0x1122b, +0x1123f, 0x11240, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a8, +0x112b0, 0x112de, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133d, 0x1133d, +0x11350, 0x11350, +0x1135d, 0x11361, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113b7, +0x113d1, 0x113d1, +0x113d3, 0x113d3, +0x11400, 0x11434, +0x11447, 0x1144a, +0x1145f, 0x11461, +0x11480, 0x114af, +0x114c4, 0x114c5, +0x114c7, 0x114c7, +0x11580, 0x115ae, +0x115d8, 0x115db, +0x11600, 0x1162f, +0x11644, 0x11644, +0x11680, 0x116aa, +0x116b8, 0x116b8, +0x11700, 0x1171a, +0x11740, 0x11746, +0x11800, 0x1182b, +0x118a0, 0x118df, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x1192f, +0x1193f, 0x1193f, +0x11941, 0x11941, +0x119a0, 0x119a7, +0x119aa, 0x119d0, +0x119e1, 0x119e1, +0x119e3, 0x119e3, +0x11a00, 0x11a00, +0x11a0b, 0x11a32, +0x11a3a, 0x11a3a, +0x11a50, 0x11a50, +0x11a5c, 0x11a89, +0x11a9d, 0x11a9d, +0x11ab0, 0x11af8, +0x11bc0, 0x11be0, +0x11c00, 0x11c08, +0x11c0a, 0x11c2e, +0x11c40, 0x11c40, +0x11c72, 0x11c8f, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d30, +0x11d46, 0x11d46, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d89, +0x11d98, 0x11d98, +0x11ee0, 0x11ef2, +0x11f02, 0x11f02, +0x11f04, 0x11f10, +0x11f12, 0x11f33, +0x11fb0, 0x11fb0, +0x12000, 0x12399, +0x12400, 0x1246e, +0x12480, 0x12543, +0x12f90, 0x12ff0, +0x13000, 0x1342f, +0x13441, 0x13446, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x1611d, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a70, 0x16abe, +0x16ad0, 0x16aed, +0x16b00, 0x16b2f, +0x16b40, 0x16b43, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d6c, +0x16e40, 0x16e7f, +0x16f00, 0x16f4a, +0x16f50, 0x16f50, +0x16f93, 0x16f9f, +0x16fe0, 0x16fe1, +0x16fe3, 0x16fe3, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d6c0, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6fa, +0x1d6fc, 0x1d714, +0x1d716, 0x1d734, +0x1d736, 0x1d74e, +0x1d750, 0x1d76e, +0x1d770, 0x1d788, +0x1d78a, 0x1d7a8, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7cb, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e030, 0x1e06d, +0x1e100, 0x1e12c, +0x1e137, 0x1e13d, +0x1e14e, 0x1e14e, +0x1e290, 0x1e2ad, +0x1e2c0, 0x1e2eb, +0x1e4d0, 0x1e4eb, +0x1e5d0, 0x1e5ed, +0x1e5f0, 0x1e5f0, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e900, 0x1e943, +0x1e94b, 0x1e94b, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +}; /* END of CR_ID_Start */ + +/* PROPERTY: 'Ideographic': Binary Property */ +static const OnigCodePoint +CR_Ideographic[] = { 21, +0x3006, 0x3007, +0x3021, 0x3029, +0x3038, 0x303a, +0x3400, 0x4dbf, +0x4e00, 0x9fff, +0xf900, 0xfa6d, +0xfa70, 0xfad9, +0x16fe4, 0x16fe4, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1b170, 0x1b2fb, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +}; /* END of CR_Ideographic */ + +/* PROPERTY: 'Imperial_Aramaic': Script */ +static const OnigCodePoint +CR_Imperial_Aramaic[] = { 2, +0x10840, 0x10855, +0x10857, 0x1085f, +}; /* END of CR_Imperial_Aramaic */ + +/* PROPERTY: 'InCB': Derived Property */ +static const OnigCodePoint +CR_InCB[] = { 293, +0x094d, 0x094d, +0x09cd, 0x09cd, +0x0acd, 0x0acd, +0x0b4d, 0x0b4d, +0x0c4d, 0x0c4d, +0x0d4d, 0x0d4d, +0x0d57, 0x0d57, +0x0d62, 0x0d63, +0x0d81, 0x0d81, +0x0dca, 0x0dca, +0x0dcf, 0x0dcf, +0x0dd2, 0x0dd4, +0x0dd6, 0x0dd6, +0x0ddf, 0x0ddf, +0x0e31, 0x0e31, +0x0e34, 0x0e3a, +0x0e47, 0x0e4e, +0x0eb1, 0x0eb1, +0x0eb4, 0x0ebc, +0x0ec8, 0x0ece, +0x0f18, 0x0f19, +0x0f35, 0x0f35, +0x0f37, 0x0f37, +0x0f39, 0x0f39, +0x0f71, 0x0f7e, +0x0f80, 0x0f84, +0x0f86, 0x0f87, +0x0f8d, 0x0f97, +0x0f99, 0x0fbc, +0x0fc6, 0x0fc6, +0x102d, 0x1030, +0x1032, 0x1037, +0x1039, 0x103a, +0x103d, 0x103e, +0x1058, 0x1059, +0x105e, 0x1060, +0x1071, 0x1074, +0x1082, 0x1082, +0x1085, 0x1086, +0x108d, 0x108d, +0x109d, 0x109d, +0x135d, 0x135f, +0x1712, 0x1715, +0x1732, 0x1734, +0x1752, 0x1753, +0x1772, 0x1773, +0x17b4, 0x17b5, +0x17b7, 0x17bd, +0x17c6, 0x17c6, +0x17c9, 0x17d3, +0x17dd, 0x17dd, +0x180b, 0x180d, +0x180f, 0x180f, +0x1885, 0x1886, +0x18a9, 0x18a9, +0x1920, 0x1922, +0x1927, 0x1928, +0x1932, 0x1932, +0x1939, 0x193b, +0x1a17, 0x1a18, +0x1a1b, 0x1a1b, +0x1a56, 0x1a56, +0x1a58, 0x1a5e, +0x1a60, 0x1a60, +0x1a62, 0x1a62, +0x1a65, 0x1a6c, +0x1a73, 0x1a7c, +0x1a7f, 0x1a7f, +0x1ab0, 0x1ace, +0x1b00, 0x1b03, +0x1b34, 0x1b3d, +0x1b42, 0x1b44, +0x1b6b, 0x1b73, +0x1b80, 0x1b81, +0x1ba2, 0x1ba5, +0x1ba8, 0x1bad, +0x1be6, 0x1be6, +0x1be8, 0x1be9, +0x1bed, 0x1bed, +0x1bef, 0x1bf3, +0x1c2c, 0x1c33, +0x1c36, 0x1c37, +0x1cd0, 0x1cd2, +0x1cd4, 0x1ce0, +0x1ce2, 0x1ce8, +0x1ced, 0x1ced, +0x1cf4, 0x1cf4, +0x1cf8, 0x1cf9, +0x1dc0, 0x1dff, +0x200d, 0x200d, +0x20d0, 0x20f0, +0x2cef, 0x2cf1, +0x2d7f, 0x2d7f, +0x2de0, 0x2dff, +0x302a, 0x302f, +0x3099, 0x309a, +0xa66f, 0xa672, +0xa674, 0xa67d, +0xa69e, 0xa69f, +0xa6f0, 0xa6f1, +0xa802, 0xa802, +0xa806, 0xa806, +0xa80b, 0xa80b, +0xa825, 0xa826, +0xa82c, 0xa82c, +0xa8c4, 0xa8c5, +0xa8e0, 0xa8f1, +0xa8ff, 0xa8ff, +0xa926, 0xa92d, +0xa947, 0xa951, +0xa953, 0xa953, +0xa980, 0xa982, +0xa9b3, 0xa9b3, +0xa9b6, 0xa9b9, +0xa9bc, 0xa9bd, +0xa9c0, 0xa9c0, +0xa9e5, 0xa9e5, +0xaa29, 0xaa2e, +0xaa31, 0xaa32, +0xaa35, 0xaa36, +0xaa43, 0xaa43, +0xaa4c, 0xaa4c, +0xaa7c, 0xaa7c, +0xaab0, 0xaab0, +0xaab2, 0xaab4, +0xaab7, 0xaab8, +0xaabe, 0xaabf, +0xaac1, 0xaac1, +0xaaec, 0xaaed, +0xaaf6, 0xaaf6, +0xabe5, 0xabe5, +0xabe8, 0xabe8, +0xabed, 0xabed, +0xfb1e, 0xfb1e, +0xfe00, 0xfe0f, +0xfe20, 0xfe2f, +0xff9e, 0xff9f, +0x101fd, 0x101fd, +0x102e0, 0x102e0, +0x10376, 0x1037a, +0x10a01, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a0f, +0x10a38, 0x10a3a, +0x10a3f, 0x10a3f, +0x10ae5, 0x10ae6, +0x10d24, 0x10d27, +0x10d69, 0x10d6d, +0x10eab, 0x10eac, +0x10efc, 0x10eff, +0x10f46, 0x10f50, +0x10f82, 0x10f85, +0x11001, 0x11001, +0x11038, 0x11046, +0x11070, 0x11070, +0x11073, 0x11074, +0x1107f, 0x11081, +0x110b3, 0x110b6, +0x110b9, 0x110ba, +0x110c2, 0x110c2, +0x11100, 0x11102, +0x11127, 0x1112b, +0x1112d, 0x11134, +0x11173, 0x11173, +0x11180, 0x11181, +0x111b6, 0x111be, +0x111c0, 0x111c0, +0x111c9, 0x111cc, +0x111cf, 0x111cf, +0x1122f, 0x11231, +0x11234, 0x11237, +0x1123e, 0x1123e, +0x11241, 0x11241, +0x112df, 0x112df, +0x112e3, 0x112ea, +0x11300, 0x11301, +0x1133b, 0x1133c, +0x1133e, 0x1133e, +0x11340, 0x11340, +0x1134d, 0x1134d, +0x11357, 0x11357, +0x11366, 0x1136c, +0x11370, 0x11374, +0x113b8, 0x113b8, +0x113bb, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113c9, +0x113ce, 0x113d0, +0x113d2, 0x113d2, +0x113e1, 0x113e2, +0x11438, 0x1143f, +0x11442, 0x11444, +0x11446, 0x11446, +0x1145e, 0x1145e, +0x114b0, 0x114b0, +0x114b3, 0x114b8, +0x114ba, 0x114ba, +0x114bd, 0x114bd, +0x114bf, 0x114c0, +0x114c2, 0x114c3, +0x115af, 0x115af, +0x115b2, 0x115b5, +0x115bc, 0x115bd, +0x115bf, 0x115c0, +0x115dc, 0x115dd, +0x11633, 0x1163a, +0x1163d, 0x1163d, +0x1163f, 0x11640, +0x116ab, 0x116ab, +0x116ad, 0x116ad, +0x116b0, 0x116b7, +0x1171d, 0x1171d, +0x1171f, 0x1171f, +0x11722, 0x11725, +0x11727, 0x1172b, +0x1182f, 0x11837, +0x11839, 0x1183a, +0x11930, 0x11930, +0x1193b, 0x1193e, +0x11943, 0x11943, +0x119d4, 0x119d7, +0x119da, 0x119db, +0x119e0, 0x119e0, +0x11a01, 0x11a0a, +0x11a33, 0x11a38, +0x11a3b, 0x11a3e, +0x11a47, 0x11a47, +0x11a51, 0x11a56, +0x11a59, 0x11a5b, +0x11a8a, 0x11a96, +0x11a98, 0x11a99, +0x11c30, 0x11c36, +0x11c38, 0x11c3d, +0x11c3f, 0x11c3f, +0x11c92, 0x11ca7, +0x11caa, 0x11cb0, +0x11cb2, 0x11cb3, +0x11cb5, 0x11cb6, +0x11d31, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d45, +0x11d47, 0x11d47, +0x11d90, 0x11d91, +0x11d95, 0x11d95, +0x11d97, 0x11d97, +0x11ef3, 0x11ef4, +0x11f00, 0x11f01, +0x11f36, 0x11f3a, +0x11f40, 0x11f42, +0x11f5a, 0x11f5a, +0x13440, 0x13440, +0x13447, 0x13455, +0x1611e, 0x16129, +0x1612d, 0x1612f, +0x16af0, 0x16af4, +0x16b30, 0x16b36, +0x16f4f, 0x16f4f, +0x16f8f, 0x16f92, +0x16fe4, 0x16fe4, +0x16ff0, 0x16ff1, +0x1bc9d, 0x1bc9e, +0x1cf00, 0x1cf2d, +0x1cf30, 0x1cf46, +0x1d165, 0x1d169, +0x1d16d, 0x1d172, +0x1d17b, 0x1d182, +0x1d185, 0x1d18b, +0x1d1aa, 0x1d1ad, +0x1d242, 0x1d244, +0x1da00, 0x1da36, +0x1da3b, 0x1da6c, +0x1da75, 0x1da75, +0x1da84, 0x1da84, +0x1da9b, 0x1da9f, +0x1daa1, 0x1daaf, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e08f, 0x1e08f, +0x1e130, 0x1e136, +0x1e2ae, 0x1e2ae, +0x1e2ec, 0x1e2ef, +0x1e4ec, 0x1e4ef, +0x1e5ee, 0x1e5ef, +0x1e8d0, 0x1e8d6, +0x1e944, 0x1e94a, +0x1f3fb, 0x1f3ff, +0xe0020, 0xe007f, +0xe0100, 0xe01ef, +}; /* END of CR_InCB */ + +/* PROPERTY: 'Inherited': Script */ +static const OnigCodePoint +CR_Inherited[] = { 29, +0x0300, 0x036f, +0x0485, 0x0486, +0x064b, 0x0655, +0x0670, 0x0670, +0x0951, 0x0954, +0x1ab0, 0x1ace, +0x1cd0, 0x1cd2, +0x1cd4, 0x1ce0, +0x1ce2, 0x1ce8, +0x1ced, 0x1ced, +0x1cf4, 0x1cf4, +0x1cf8, 0x1cf9, +0x1dc0, 0x1dff, +0x200c, 0x200d, +0x20d0, 0x20f0, +0x302a, 0x302d, +0x3099, 0x309a, +0xfe00, 0xfe0f, +0xfe20, 0xfe2d, +0x101fd, 0x101fd, +0x102e0, 0x102e0, +0x1133b, 0x1133b, +0x1cf00, 0x1cf2d, +0x1cf30, 0x1cf46, +0x1d167, 0x1d169, +0x1d17b, 0x1d182, +0x1d185, 0x1d18b, +0x1d1aa, 0x1d1ad, +0xe0100, 0xe01ef, +}; /* END of CR_Inherited */ + +/* PROPERTY: 'Inscriptional_Pahlavi': Script */ +static const OnigCodePoint +CR_Inscriptional_Pahlavi[] = { 2, +0x10b60, 0x10b72, +0x10b78, 0x10b7f, +}; /* END of CR_Inscriptional_Pahlavi */ + +/* PROPERTY: 'Inscriptional_Parthian': Script */ +static const OnigCodePoint +CR_Inscriptional_Parthian[] = { 2, +0x10b40, 0x10b55, +0x10b58, 0x10b5f, +}; /* END of CR_Inscriptional_Parthian */ + +/* PROPERTY: 'Javanese': Script */ +static const OnigCodePoint +CR_Javanese[] = { 3, +0xa980, 0xa9cd, +0xa9d0, 0xa9d9, +0xa9de, 0xa9df, +}; /* END of CR_Javanese */ + +/* PROPERTY: 'Join_Control': Binary Property */ +static const OnigCodePoint +CR_Join_Control[] = { 1, +0x200c, 0x200d, +}; /* END of CR_Join_Control */ + +/* PROPERTY: 'Kaithi': Script */ +static const OnigCodePoint +CR_Kaithi[] = { 2, +0x11080, 0x110c2, +0x110cd, 0x110cd, +}; /* END of CR_Kaithi */ + +/* PROPERTY: 'Kannada': Script */ +static const OnigCodePoint +CR_Kannada[] = { 13, +0x0c80, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbc, 0x0cc4, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccd, +0x0cd5, 0x0cd6, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce3, +0x0ce6, 0x0cef, +0x0cf1, 0x0cf3, +}; /* END of CR_Kannada */ + +/* PROPERTY: 'Katakana': Script */ +static const OnigCodePoint +CR_Katakana[] = { 14, +0x30a1, 0x30fa, +0x30fd, 0x30ff, +0x31f0, 0x31ff, +0x32d0, 0x32fe, +0x3300, 0x3357, +0xff66, 0xff6f, +0xff71, 0xff9d, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b000, +0x1b120, 0x1b122, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +}; /* END of CR_Katakana */ + +/* PROPERTY: 'Kawi': Script */ +static const OnigCodePoint +CR_Kawi[] = { 3, +0x11f00, 0x11f10, +0x11f12, 0x11f3a, +0x11f3e, 0x11f5a, +}; /* END of CR_Kawi */ + +/* PROPERTY: 'Kayah_Li': Script */ +static const OnigCodePoint +CR_Kayah_Li[] = { 2, +0xa900, 0xa92d, +0xa92f, 0xa92f, +}; /* END of CR_Kayah_Li */ + +/* PROPERTY: 'Kharoshthi': Script */ +static const OnigCodePoint +CR_Kharoshthi[] = { 8, +0x10a00, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a38, 0x10a3a, +0x10a3f, 0x10a48, +0x10a50, 0x10a58, +}; /* END of CR_Kharoshthi */ + +/* PROPERTY: 'Khitan_Small_Script': Script */ +static const OnigCodePoint +CR_Khitan_Small_Script[] = { 3, +0x16fe4, 0x16fe4, +0x18b00, 0x18cd5, +0x18cff, 0x18cff, +}; /* END of CR_Khitan_Small_Script */ + +/* PROPERTY: 'Khmer': Script */ +static const OnigCodePoint +CR_Khmer[] = { 4, +0x1780, 0x17dd, +0x17e0, 0x17e9, +0x17f0, 0x17f9, +0x19e0, 0x19ff, +}; /* END of CR_Khmer */ + +/* PROPERTY: 'Khojki': Script */ +static const OnigCodePoint +CR_Khojki[] = { 2, +0x11200, 0x11211, +0x11213, 0x11241, +}; /* END of CR_Khojki */ + +/* PROPERTY: 'Khudawadi': Script */ +static const OnigCodePoint +CR_Khudawadi[] = { 2, +0x112b0, 0x112ea, +0x112f0, 0x112f9, +}; /* END of CR_Khudawadi */ + +/* PROPERTY: 'Kirat_Rai': Script */ +static const OnigCodePoint +CR_Kirat_Rai[] = { 1, +0x16d40, 0x16d79, +}; /* END of CR_Kirat_Rai */ + +/* PROPERTY: 'L': Major Category */ +static const OnigCodePoint +CR_L[] = { 677, +0x0041, 0x005a, +0x0061, 0x007a, +0x00aa, 0x00aa, +0x00b5, 0x00b5, +0x00ba, 0x00ba, +0x00c0, 0x00d6, +0x00d8, 0x00f6, +0x00f8, 0x02c1, +0x02c6, 0x02d1, +0x02e0, 0x02e4, +0x02ec, 0x02ec, +0x02ee, 0x02ee, +0x0370, 0x0374, +0x0376, 0x0377, +0x037a, 0x037d, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x03f5, +0x03f7, 0x0481, +0x048a, 0x052f, +0x0531, 0x0556, +0x0559, 0x0559, +0x0560, 0x0588, +0x05d0, 0x05ea, +0x05ef, 0x05f2, +0x0620, 0x064a, +0x066e, 0x066f, +0x0671, 0x06d3, +0x06d5, 0x06d5, +0x06e5, 0x06e6, +0x06ee, 0x06ef, +0x06fa, 0x06fc, +0x06ff, 0x06ff, +0x0710, 0x0710, +0x0712, 0x072f, +0x074d, 0x07a5, +0x07b1, 0x07b1, +0x07ca, 0x07ea, +0x07f4, 0x07f5, +0x07fa, 0x07fa, +0x0800, 0x0815, +0x081a, 0x081a, +0x0824, 0x0824, +0x0828, 0x0828, +0x0840, 0x0858, +0x0860, 0x086a, +0x0870, 0x0887, +0x0889, 0x088e, +0x08a0, 0x08c9, +0x0904, 0x0939, +0x093d, 0x093d, +0x0950, 0x0950, +0x0958, 0x0961, +0x0971, 0x0980, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bd, 0x09bd, +0x09ce, 0x09ce, +0x09dc, 0x09dd, +0x09df, 0x09e1, +0x09f0, 0x09f1, +0x09fc, 0x09fc, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a72, 0x0a74, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abd, 0x0abd, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae1, +0x0af9, 0x0af9, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3d, 0x0b3d, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b61, +0x0b71, 0x0b71, +0x0b83, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bd0, 0x0bd0, +0x0c05, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3d, 0x0c3d, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c61, +0x0c80, 0x0c80, +0x0c85, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbd, 0x0cbd, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce1, +0x0cf1, 0x0cf2, +0x0d04, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d3a, +0x0d3d, 0x0d3d, +0x0d4e, 0x0d4e, +0x0d54, 0x0d56, +0x0d5f, 0x0d61, +0x0d7a, 0x0d7f, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0e01, 0x0e30, +0x0e32, 0x0e33, +0x0e40, 0x0e46, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0eb0, +0x0eb2, 0x0eb3, +0x0ebd, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0edc, 0x0edf, +0x0f00, 0x0f00, +0x0f40, 0x0f47, +0x0f49, 0x0f6c, +0x0f88, 0x0f8c, +0x1000, 0x102a, +0x103f, 0x103f, +0x1050, 0x1055, +0x105a, 0x105d, +0x1061, 0x1061, +0x1065, 0x1066, +0x106e, 0x1070, +0x1075, 0x1081, +0x108e, 0x108e, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x10fa, +0x10fc, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x1380, 0x138f, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1401, 0x166c, +0x166f, 0x167f, +0x1681, 0x169a, +0x16a0, 0x16ea, +0x16f1, 0x16f8, +0x1700, 0x1711, +0x171f, 0x1731, +0x1740, 0x1751, +0x1760, 0x176c, +0x176e, 0x1770, +0x1780, 0x17b3, +0x17d7, 0x17d7, +0x17dc, 0x17dc, +0x1820, 0x1878, +0x1880, 0x1884, +0x1887, 0x18a8, +0x18aa, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1950, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x1a00, 0x1a16, +0x1a20, 0x1a54, +0x1aa7, 0x1aa7, +0x1b05, 0x1b33, +0x1b45, 0x1b4c, +0x1b83, 0x1ba0, +0x1bae, 0x1baf, +0x1bba, 0x1be5, +0x1c00, 0x1c23, +0x1c4d, 0x1c4f, +0x1c5a, 0x1c7d, +0x1c80, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1ce9, 0x1cec, +0x1cee, 0x1cf3, +0x1cf5, 0x1cf6, +0x1cfa, 0x1cfa, +0x1d00, 0x1dbf, +0x1e00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fbc, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fcc, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fe0, 0x1fec, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffc, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x2102, 0x2102, +0x2107, 0x2107, +0x210a, 0x2113, +0x2115, 0x2115, +0x2119, 0x211d, +0x2124, 0x2124, +0x2126, 0x2126, +0x2128, 0x2128, +0x212a, 0x212d, +0x212f, 0x2139, +0x213c, 0x213f, +0x2145, 0x2149, +0x214e, 0x214e, +0x2183, 0x2184, +0x2c00, 0x2ce4, +0x2ceb, 0x2cee, +0x2cf2, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d6f, +0x2d80, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x2e2f, 0x2e2f, +0x3005, 0x3006, +0x3031, 0x3035, +0x303b, 0x303c, +0x3041, 0x3096, +0x309d, 0x309f, +0x30a1, 0x30fa, +0x30fc, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x31a0, 0x31bf, +0x31f0, 0x31ff, +0x3400, 0x4dbf, +0x4e00, 0xa48c, +0xa4d0, 0xa4fd, +0xa500, 0xa60c, +0xa610, 0xa61f, +0xa62a, 0xa62b, +0xa640, 0xa66e, +0xa67f, 0xa69d, +0xa6a0, 0xa6e5, +0xa717, 0xa71f, +0xa722, 0xa788, +0xa78b, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa801, +0xa803, 0xa805, +0xa807, 0xa80a, +0xa80c, 0xa822, +0xa840, 0xa873, +0xa882, 0xa8b3, +0xa8f2, 0xa8f7, +0xa8fb, 0xa8fb, +0xa8fd, 0xa8fe, +0xa90a, 0xa925, +0xa930, 0xa946, +0xa960, 0xa97c, +0xa984, 0xa9b2, +0xa9cf, 0xa9cf, +0xa9e0, 0xa9e4, +0xa9e6, 0xa9ef, +0xa9fa, 0xa9fe, +0xaa00, 0xaa28, +0xaa40, 0xaa42, +0xaa44, 0xaa4b, +0xaa60, 0xaa76, +0xaa7a, 0xaa7a, +0xaa7e, 0xaaaf, +0xaab1, 0xaab1, +0xaab5, 0xaab6, +0xaab9, 0xaabd, +0xaac0, 0xaac0, +0xaac2, 0xaac2, +0xaadb, 0xaadd, +0xaae0, 0xaaea, +0xaaf2, 0xaaf4, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab5a, +0xab5c, 0xab69, +0xab70, 0xabe2, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xf900, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb1d, +0xfb1f, 0xfb28, +0xfb2a, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbb1, +0xfbd3, 0xfd3d, +0xfd50, 0xfd8f, +0xfd92, 0xfdc7, +0xfdf0, 0xfdfb, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0xff21, 0xff3a, +0xff41, 0xff5a, +0xff66, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x10300, 0x1031f, +0x1032d, 0x10340, +0x10342, 0x10349, +0x10350, 0x10375, +0x10380, 0x1039d, +0x103a0, 0x103c3, +0x103c8, 0x103cf, +0x10400, 0x1049d, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10860, 0x10876, +0x10880, 0x1089e, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x10900, 0x10915, +0x10920, 0x10939, +0x10980, 0x109b7, +0x109be, 0x109bf, +0x10a00, 0x10a00, +0x10a10, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a60, 0x10a7c, +0x10a80, 0x10a9c, +0x10ac0, 0x10ac7, +0x10ac9, 0x10ae4, +0x10b00, 0x10b35, +0x10b40, 0x10b55, +0x10b60, 0x10b72, +0x10b80, 0x10b91, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10d00, 0x10d23, +0x10d4a, 0x10d65, +0x10d6f, 0x10d85, +0x10e80, 0x10ea9, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10f00, 0x10f1c, +0x10f27, 0x10f27, +0x10f30, 0x10f45, +0x10f70, 0x10f81, +0x10fb0, 0x10fc4, +0x10fe0, 0x10ff6, +0x11003, 0x11037, +0x11071, 0x11072, +0x11075, 0x11075, +0x11083, 0x110af, +0x110d0, 0x110e8, +0x11103, 0x11126, +0x11144, 0x11144, +0x11147, 0x11147, +0x11150, 0x11172, +0x11176, 0x11176, +0x11183, 0x111b2, +0x111c1, 0x111c4, +0x111da, 0x111da, +0x111dc, 0x111dc, +0x11200, 0x11211, +0x11213, 0x1122b, +0x1123f, 0x11240, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a8, +0x112b0, 0x112de, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133d, 0x1133d, +0x11350, 0x11350, +0x1135d, 0x11361, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113b7, +0x113d1, 0x113d1, +0x113d3, 0x113d3, +0x11400, 0x11434, +0x11447, 0x1144a, +0x1145f, 0x11461, +0x11480, 0x114af, +0x114c4, 0x114c5, +0x114c7, 0x114c7, +0x11580, 0x115ae, +0x115d8, 0x115db, +0x11600, 0x1162f, +0x11644, 0x11644, +0x11680, 0x116aa, +0x116b8, 0x116b8, +0x11700, 0x1171a, +0x11740, 0x11746, +0x11800, 0x1182b, +0x118a0, 0x118df, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x1192f, +0x1193f, 0x1193f, +0x11941, 0x11941, +0x119a0, 0x119a7, +0x119aa, 0x119d0, +0x119e1, 0x119e1, +0x119e3, 0x119e3, +0x11a00, 0x11a00, +0x11a0b, 0x11a32, +0x11a3a, 0x11a3a, +0x11a50, 0x11a50, +0x11a5c, 0x11a89, +0x11a9d, 0x11a9d, +0x11ab0, 0x11af8, +0x11bc0, 0x11be0, +0x11c00, 0x11c08, +0x11c0a, 0x11c2e, +0x11c40, 0x11c40, +0x11c72, 0x11c8f, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d30, +0x11d46, 0x11d46, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d89, +0x11d98, 0x11d98, +0x11ee0, 0x11ef2, +0x11f02, 0x11f02, +0x11f04, 0x11f10, +0x11f12, 0x11f33, +0x11fb0, 0x11fb0, +0x12000, 0x12399, +0x12480, 0x12543, +0x12f90, 0x12ff0, +0x13000, 0x1342f, +0x13441, 0x13446, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x1611d, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a70, 0x16abe, +0x16ad0, 0x16aed, +0x16b00, 0x16b2f, +0x16b40, 0x16b43, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d6c, +0x16e40, 0x16e7f, +0x16f00, 0x16f4a, +0x16f50, 0x16f50, +0x16f93, 0x16f9f, +0x16fe0, 0x16fe1, +0x16fe3, 0x16fe3, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d6c0, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6fa, +0x1d6fc, 0x1d714, +0x1d716, 0x1d734, +0x1d736, 0x1d74e, +0x1d750, 0x1d76e, +0x1d770, 0x1d788, +0x1d78a, 0x1d7a8, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7cb, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e030, 0x1e06d, +0x1e100, 0x1e12c, +0x1e137, 0x1e13d, +0x1e14e, 0x1e14e, +0x1e290, 0x1e2ad, +0x1e2c0, 0x1e2eb, +0x1e4d0, 0x1e4eb, +0x1e5d0, 0x1e5ed, +0x1e5f0, 0x1e5f0, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e900, 0x1e943, +0x1e94b, 0x1e94b, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +}; /* END of CR_L */ + +/* PROPERTY: 'LC': General Category */ +static const OnigCodePoint +CR_LC[] = { 145, +0x0041, 0x005a, +0x0061, 0x007a, +0x00b5, 0x00b5, +0x00c0, 0x00d6, +0x00d8, 0x00f6, +0x00f8, 0x01ba, +0x01bc, 0x01bf, +0x01c4, 0x0293, +0x0295, 0x02af, +0x0370, 0x0373, +0x0376, 0x0377, +0x037b, 0x037d, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x03f5, +0x03f7, 0x0481, +0x048a, 0x052f, +0x0531, 0x0556, +0x0560, 0x0588, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x10fa, +0x10fd, 0x10ff, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1c80, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1d00, 0x1d2b, +0x1d6b, 0x1d77, +0x1d79, 0x1d9a, +0x1e00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fbc, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fcc, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fe0, 0x1fec, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffc, +0x2102, 0x2102, +0x2107, 0x2107, +0x210a, 0x2113, +0x2115, 0x2115, +0x2119, 0x211d, +0x2124, 0x2124, +0x2126, 0x2126, +0x2128, 0x2128, +0x212a, 0x212d, +0x212f, 0x2134, +0x2139, 0x2139, +0x213c, 0x213f, +0x2145, 0x2149, +0x214e, 0x214e, +0x2183, 0x2184, +0x2c00, 0x2c7b, +0x2c7e, 0x2ce4, +0x2ceb, 0x2cee, +0x2cf2, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0xa640, 0xa66d, +0xa680, 0xa69b, +0xa722, 0xa76f, +0xa771, 0xa787, +0xa78b, 0xa78e, +0xa790, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f5, 0xa7f6, +0xa7fa, 0xa7fa, +0xab30, 0xab5a, +0xab60, 0xab68, +0xab70, 0xabbf, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xff21, 0xff3a, +0xff41, 0xff5a, +0x10400, 0x1044f, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10d50, 0x10d65, +0x10d70, 0x10d85, +0x118a0, 0x118df, +0x16e40, 0x16e7f, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d6c0, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6fa, +0x1d6fc, 0x1d714, +0x1d716, 0x1d734, +0x1d736, 0x1d74e, +0x1d750, 0x1d76e, +0x1d770, 0x1d788, +0x1d78a, 0x1d7a8, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7cb, +0x1df00, 0x1df09, +0x1df0b, 0x1df1e, +0x1df25, 0x1df2a, +0x1e900, 0x1e943, +}; /* END of CR_LC */ + +/* PROPERTY: 'Lao': Script */ +static const OnigCodePoint +CR_Lao[] = { 11, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0ec8, 0x0ece, +0x0ed0, 0x0ed9, +0x0edc, 0x0edf, +}; /* END of CR_Lao */ + +/* PROPERTY: 'Latin': Script */ +static const OnigCodePoint +CR_Latin[] = { 39, +0x0041, 0x005a, +0x0061, 0x007a, +0x00aa, 0x00aa, +0x00ba, 0x00ba, +0x00c0, 0x00d6, +0x00d8, 0x00f6, +0x00f8, 0x02b8, +0x02e0, 0x02e4, +0x1d00, 0x1d25, +0x1d2c, 0x1d5c, +0x1d62, 0x1d65, +0x1d6b, 0x1d77, +0x1d79, 0x1dbe, +0x1e00, 0x1eff, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x212a, 0x212b, +0x2132, 0x2132, +0x214e, 0x214e, +0x2160, 0x2188, +0x2c60, 0x2c7f, +0xa722, 0xa787, +0xa78b, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa7ff, +0xab30, 0xab5a, +0xab5c, 0xab64, +0xab66, 0xab69, +0xfb00, 0xfb06, +0xff21, 0xff3a, +0xff41, 0xff5a, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +}; /* END of CR_Latin */ + +/* PROPERTY: 'Lepcha': Script */ +static const OnigCodePoint +CR_Lepcha[] = { 3, +0x1c00, 0x1c37, +0x1c3b, 0x1c49, +0x1c4d, 0x1c4f, +}; /* END of CR_Lepcha */ + +/* PROPERTY: 'Limbu': Script */ +static const OnigCodePoint +CR_Limbu[] = { 5, +0x1900, 0x191e, +0x1920, 0x192b, +0x1930, 0x193b, +0x1940, 0x1940, +0x1944, 0x194f, +}; /* END of CR_Limbu */ + +/* PROPERTY: 'Linear_A': Script */ +static const OnigCodePoint +CR_Linear_A[] = { 3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +}; /* END of CR_Linear_A */ + +/* PROPERTY: 'Linear_B': Script */ +static const OnigCodePoint +CR_Linear_B[] = { 7, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +}; /* END of CR_Linear_B */ + +/* PROPERTY: 'Lisu': Script */ +static const OnigCodePoint +CR_Lisu[] = { 2, +0xa4d0, 0xa4ff, +0x11fb0, 0x11fb0, +}; /* END of CR_Lisu */ + +/* PROPERTY: 'Ll': General Category */ +static const OnigCodePoint +CR_Ll[] = { 662, +0x0061, 0x007a, +0x00b5, 0x00b5, +0x00df, 0x00f6, +0x00f8, 0x00ff, +0x0101, 0x0101, +0x0103, 0x0103, +0x0105, 0x0105, +0x0107, 0x0107, +0x0109, 0x0109, +0x010b, 0x010b, +0x010d, 0x010d, +0x010f, 0x010f, +0x0111, 0x0111, +0x0113, 0x0113, +0x0115, 0x0115, +0x0117, 0x0117, +0x0119, 0x0119, +0x011b, 0x011b, +0x011d, 0x011d, +0x011f, 0x011f, +0x0121, 0x0121, +0x0123, 0x0123, +0x0125, 0x0125, +0x0127, 0x0127, +0x0129, 0x0129, +0x012b, 0x012b, +0x012d, 0x012d, +0x012f, 0x012f, +0x0131, 0x0131, +0x0133, 0x0133, +0x0135, 0x0135, +0x0137, 0x0138, +0x013a, 0x013a, +0x013c, 0x013c, +0x013e, 0x013e, +0x0140, 0x0140, +0x0142, 0x0142, +0x0144, 0x0144, +0x0146, 0x0146, +0x0148, 0x0149, +0x014b, 0x014b, +0x014d, 0x014d, +0x014f, 0x014f, +0x0151, 0x0151, +0x0153, 0x0153, +0x0155, 0x0155, +0x0157, 0x0157, +0x0159, 0x0159, +0x015b, 0x015b, +0x015d, 0x015d, +0x015f, 0x015f, +0x0161, 0x0161, +0x0163, 0x0163, +0x0165, 0x0165, +0x0167, 0x0167, +0x0169, 0x0169, +0x016b, 0x016b, +0x016d, 0x016d, +0x016f, 0x016f, +0x0171, 0x0171, +0x0173, 0x0173, +0x0175, 0x0175, +0x0177, 0x0177, +0x017a, 0x017a, +0x017c, 0x017c, +0x017e, 0x0180, +0x0183, 0x0183, +0x0185, 0x0185, +0x0188, 0x0188, +0x018c, 0x018d, +0x0192, 0x0192, +0x0195, 0x0195, +0x0199, 0x019b, +0x019e, 0x019e, +0x01a1, 0x01a1, +0x01a3, 0x01a3, +0x01a5, 0x01a5, +0x01a8, 0x01a8, +0x01aa, 0x01ab, +0x01ad, 0x01ad, +0x01b0, 0x01b0, +0x01b4, 0x01b4, +0x01b6, 0x01b6, +0x01b9, 0x01ba, +0x01bd, 0x01bf, +0x01c6, 0x01c6, +0x01c9, 0x01c9, +0x01cc, 0x01cc, +0x01ce, 0x01ce, +0x01d0, 0x01d0, +0x01d2, 0x01d2, +0x01d4, 0x01d4, +0x01d6, 0x01d6, +0x01d8, 0x01d8, +0x01da, 0x01da, +0x01dc, 0x01dd, +0x01df, 0x01df, +0x01e1, 0x01e1, +0x01e3, 0x01e3, +0x01e5, 0x01e5, +0x01e7, 0x01e7, +0x01e9, 0x01e9, +0x01eb, 0x01eb, +0x01ed, 0x01ed, +0x01ef, 0x01f0, +0x01f3, 0x01f3, +0x01f5, 0x01f5, +0x01f9, 0x01f9, +0x01fb, 0x01fb, +0x01fd, 0x01fd, +0x01ff, 0x01ff, +0x0201, 0x0201, +0x0203, 0x0203, +0x0205, 0x0205, +0x0207, 0x0207, +0x0209, 0x0209, +0x020b, 0x020b, +0x020d, 0x020d, +0x020f, 0x020f, +0x0211, 0x0211, +0x0213, 0x0213, +0x0215, 0x0215, +0x0217, 0x0217, +0x0219, 0x0219, +0x021b, 0x021b, +0x021d, 0x021d, +0x021f, 0x021f, +0x0221, 0x0221, +0x0223, 0x0223, +0x0225, 0x0225, +0x0227, 0x0227, +0x0229, 0x0229, +0x022b, 0x022b, +0x022d, 0x022d, +0x022f, 0x022f, +0x0231, 0x0231, +0x0233, 0x0239, +0x023c, 0x023c, +0x023f, 0x0240, +0x0242, 0x0242, +0x0247, 0x0247, +0x0249, 0x0249, +0x024b, 0x024b, +0x024d, 0x024d, +0x024f, 0x0293, +0x0295, 0x02af, +0x0371, 0x0371, +0x0373, 0x0373, +0x0377, 0x0377, +0x037b, 0x037d, +0x0390, 0x0390, +0x03ac, 0x03ce, +0x03d0, 0x03d1, +0x03d5, 0x03d7, +0x03d9, 0x03d9, +0x03db, 0x03db, +0x03dd, 0x03dd, +0x03df, 0x03df, +0x03e1, 0x03e1, +0x03e3, 0x03e3, +0x03e5, 0x03e5, +0x03e7, 0x03e7, +0x03e9, 0x03e9, +0x03eb, 0x03eb, +0x03ed, 0x03ed, +0x03ef, 0x03f3, +0x03f5, 0x03f5, +0x03f8, 0x03f8, +0x03fb, 0x03fc, +0x0430, 0x045f, +0x0461, 0x0461, +0x0463, 0x0463, +0x0465, 0x0465, +0x0467, 0x0467, +0x0469, 0x0469, +0x046b, 0x046b, +0x046d, 0x046d, +0x046f, 0x046f, +0x0471, 0x0471, +0x0473, 0x0473, +0x0475, 0x0475, +0x0477, 0x0477, +0x0479, 0x0479, +0x047b, 0x047b, +0x047d, 0x047d, +0x047f, 0x047f, +0x0481, 0x0481, +0x048b, 0x048b, +0x048d, 0x048d, +0x048f, 0x048f, +0x0491, 0x0491, +0x0493, 0x0493, +0x0495, 0x0495, +0x0497, 0x0497, +0x0499, 0x0499, +0x049b, 0x049b, +0x049d, 0x049d, +0x049f, 0x049f, +0x04a1, 0x04a1, +0x04a3, 0x04a3, +0x04a5, 0x04a5, +0x04a7, 0x04a7, +0x04a9, 0x04a9, +0x04ab, 0x04ab, +0x04ad, 0x04ad, +0x04af, 0x04af, +0x04b1, 0x04b1, +0x04b3, 0x04b3, +0x04b5, 0x04b5, +0x04b7, 0x04b7, +0x04b9, 0x04b9, +0x04bb, 0x04bb, +0x04bd, 0x04bd, +0x04bf, 0x04bf, +0x04c2, 0x04c2, +0x04c4, 0x04c4, +0x04c6, 0x04c6, +0x04c8, 0x04c8, +0x04ca, 0x04ca, +0x04cc, 0x04cc, +0x04ce, 0x04cf, +0x04d1, 0x04d1, +0x04d3, 0x04d3, +0x04d5, 0x04d5, +0x04d7, 0x04d7, +0x04d9, 0x04d9, +0x04db, 0x04db, +0x04dd, 0x04dd, +0x04df, 0x04df, +0x04e1, 0x04e1, +0x04e3, 0x04e3, +0x04e5, 0x04e5, +0x04e7, 0x04e7, +0x04e9, 0x04e9, +0x04eb, 0x04eb, +0x04ed, 0x04ed, +0x04ef, 0x04ef, +0x04f1, 0x04f1, +0x04f3, 0x04f3, +0x04f5, 0x04f5, +0x04f7, 0x04f7, +0x04f9, 0x04f9, +0x04fb, 0x04fb, +0x04fd, 0x04fd, +0x04ff, 0x04ff, +0x0501, 0x0501, +0x0503, 0x0503, +0x0505, 0x0505, +0x0507, 0x0507, +0x0509, 0x0509, +0x050b, 0x050b, +0x050d, 0x050d, +0x050f, 0x050f, +0x0511, 0x0511, +0x0513, 0x0513, +0x0515, 0x0515, +0x0517, 0x0517, +0x0519, 0x0519, +0x051b, 0x051b, +0x051d, 0x051d, +0x051f, 0x051f, +0x0521, 0x0521, +0x0523, 0x0523, +0x0525, 0x0525, +0x0527, 0x0527, +0x0529, 0x0529, +0x052b, 0x052b, +0x052d, 0x052d, +0x052f, 0x052f, +0x0560, 0x0588, +0x10d0, 0x10fa, +0x10fd, 0x10ff, +0x13f8, 0x13fd, +0x1c80, 0x1c88, +0x1c8a, 0x1c8a, +0x1d00, 0x1d2b, +0x1d6b, 0x1d77, +0x1d79, 0x1d9a, +0x1e01, 0x1e01, +0x1e03, 0x1e03, +0x1e05, 0x1e05, +0x1e07, 0x1e07, +0x1e09, 0x1e09, +0x1e0b, 0x1e0b, +0x1e0d, 0x1e0d, +0x1e0f, 0x1e0f, +0x1e11, 0x1e11, +0x1e13, 0x1e13, +0x1e15, 0x1e15, +0x1e17, 0x1e17, +0x1e19, 0x1e19, +0x1e1b, 0x1e1b, +0x1e1d, 0x1e1d, +0x1e1f, 0x1e1f, +0x1e21, 0x1e21, +0x1e23, 0x1e23, +0x1e25, 0x1e25, +0x1e27, 0x1e27, +0x1e29, 0x1e29, +0x1e2b, 0x1e2b, +0x1e2d, 0x1e2d, +0x1e2f, 0x1e2f, +0x1e31, 0x1e31, +0x1e33, 0x1e33, +0x1e35, 0x1e35, +0x1e37, 0x1e37, +0x1e39, 0x1e39, +0x1e3b, 0x1e3b, +0x1e3d, 0x1e3d, +0x1e3f, 0x1e3f, +0x1e41, 0x1e41, +0x1e43, 0x1e43, +0x1e45, 0x1e45, +0x1e47, 0x1e47, +0x1e49, 0x1e49, +0x1e4b, 0x1e4b, +0x1e4d, 0x1e4d, +0x1e4f, 0x1e4f, +0x1e51, 0x1e51, +0x1e53, 0x1e53, +0x1e55, 0x1e55, +0x1e57, 0x1e57, +0x1e59, 0x1e59, +0x1e5b, 0x1e5b, +0x1e5d, 0x1e5d, +0x1e5f, 0x1e5f, +0x1e61, 0x1e61, +0x1e63, 0x1e63, +0x1e65, 0x1e65, +0x1e67, 0x1e67, +0x1e69, 0x1e69, +0x1e6b, 0x1e6b, +0x1e6d, 0x1e6d, +0x1e6f, 0x1e6f, +0x1e71, 0x1e71, +0x1e73, 0x1e73, +0x1e75, 0x1e75, +0x1e77, 0x1e77, +0x1e79, 0x1e79, +0x1e7b, 0x1e7b, +0x1e7d, 0x1e7d, +0x1e7f, 0x1e7f, +0x1e81, 0x1e81, +0x1e83, 0x1e83, +0x1e85, 0x1e85, +0x1e87, 0x1e87, +0x1e89, 0x1e89, +0x1e8b, 0x1e8b, +0x1e8d, 0x1e8d, +0x1e8f, 0x1e8f, +0x1e91, 0x1e91, +0x1e93, 0x1e93, +0x1e95, 0x1e9d, +0x1e9f, 0x1e9f, +0x1ea1, 0x1ea1, +0x1ea3, 0x1ea3, +0x1ea5, 0x1ea5, +0x1ea7, 0x1ea7, +0x1ea9, 0x1ea9, +0x1eab, 0x1eab, +0x1ead, 0x1ead, +0x1eaf, 0x1eaf, +0x1eb1, 0x1eb1, +0x1eb3, 0x1eb3, +0x1eb5, 0x1eb5, +0x1eb7, 0x1eb7, +0x1eb9, 0x1eb9, +0x1ebb, 0x1ebb, +0x1ebd, 0x1ebd, +0x1ebf, 0x1ebf, +0x1ec1, 0x1ec1, +0x1ec3, 0x1ec3, +0x1ec5, 0x1ec5, +0x1ec7, 0x1ec7, +0x1ec9, 0x1ec9, +0x1ecb, 0x1ecb, +0x1ecd, 0x1ecd, +0x1ecf, 0x1ecf, +0x1ed1, 0x1ed1, +0x1ed3, 0x1ed3, +0x1ed5, 0x1ed5, +0x1ed7, 0x1ed7, +0x1ed9, 0x1ed9, +0x1edb, 0x1edb, +0x1edd, 0x1edd, +0x1edf, 0x1edf, +0x1ee1, 0x1ee1, +0x1ee3, 0x1ee3, +0x1ee5, 0x1ee5, +0x1ee7, 0x1ee7, +0x1ee9, 0x1ee9, +0x1eeb, 0x1eeb, +0x1eed, 0x1eed, +0x1eef, 0x1eef, +0x1ef1, 0x1ef1, +0x1ef3, 0x1ef3, +0x1ef5, 0x1ef5, +0x1ef7, 0x1ef7, +0x1ef9, 0x1ef9, +0x1efb, 0x1efb, +0x1efd, 0x1efd, +0x1eff, 0x1f07, +0x1f10, 0x1f15, +0x1f20, 0x1f27, +0x1f30, 0x1f37, +0x1f40, 0x1f45, +0x1f50, 0x1f57, +0x1f60, 0x1f67, +0x1f70, 0x1f7d, +0x1f80, 0x1f87, +0x1f90, 0x1f97, +0x1fa0, 0x1fa7, +0x1fb0, 0x1fb4, +0x1fb6, 0x1fb7, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fc7, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fd7, +0x1fe0, 0x1fe7, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ff7, +0x210a, 0x210a, +0x210e, 0x210f, +0x2113, 0x2113, +0x212f, 0x212f, +0x2134, 0x2134, +0x2139, 0x2139, +0x213c, 0x213d, +0x2146, 0x2149, +0x214e, 0x214e, +0x2184, 0x2184, +0x2c30, 0x2c5f, +0x2c61, 0x2c61, +0x2c65, 0x2c66, +0x2c68, 0x2c68, +0x2c6a, 0x2c6a, +0x2c6c, 0x2c6c, +0x2c71, 0x2c71, +0x2c73, 0x2c74, +0x2c76, 0x2c7b, +0x2c81, 0x2c81, +0x2c83, 0x2c83, +0x2c85, 0x2c85, +0x2c87, 0x2c87, +0x2c89, 0x2c89, +0x2c8b, 0x2c8b, +0x2c8d, 0x2c8d, +0x2c8f, 0x2c8f, +0x2c91, 0x2c91, +0x2c93, 0x2c93, +0x2c95, 0x2c95, +0x2c97, 0x2c97, +0x2c99, 0x2c99, +0x2c9b, 0x2c9b, +0x2c9d, 0x2c9d, +0x2c9f, 0x2c9f, +0x2ca1, 0x2ca1, +0x2ca3, 0x2ca3, +0x2ca5, 0x2ca5, +0x2ca7, 0x2ca7, +0x2ca9, 0x2ca9, +0x2cab, 0x2cab, +0x2cad, 0x2cad, +0x2caf, 0x2caf, +0x2cb1, 0x2cb1, +0x2cb3, 0x2cb3, +0x2cb5, 0x2cb5, +0x2cb7, 0x2cb7, +0x2cb9, 0x2cb9, +0x2cbb, 0x2cbb, +0x2cbd, 0x2cbd, +0x2cbf, 0x2cbf, +0x2cc1, 0x2cc1, +0x2cc3, 0x2cc3, +0x2cc5, 0x2cc5, +0x2cc7, 0x2cc7, +0x2cc9, 0x2cc9, +0x2ccb, 0x2ccb, +0x2ccd, 0x2ccd, +0x2ccf, 0x2ccf, +0x2cd1, 0x2cd1, +0x2cd3, 0x2cd3, +0x2cd5, 0x2cd5, +0x2cd7, 0x2cd7, +0x2cd9, 0x2cd9, +0x2cdb, 0x2cdb, +0x2cdd, 0x2cdd, +0x2cdf, 0x2cdf, +0x2ce1, 0x2ce1, +0x2ce3, 0x2ce4, +0x2cec, 0x2cec, +0x2cee, 0x2cee, +0x2cf3, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0xa641, 0xa641, +0xa643, 0xa643, +0xa645, 0xa645, +0xa647, 0xa647, +0xa649, 0xa649, +0xa64b, 0xa64b, +0xa64d, 0xa64d, +0xa64f, 0xa64f, +0xa651, 0xa651, +0xa653, 0xa653, +0xa655, 0xa655, +0xa657, 0xa657, +0xa659, 0xa659, +0xa65b, 0xa65b, +0xa65d, 0xa65d, +0xa65f, 0xa65f, +0xa661, 0xa661, +0xa663, 0xa663, +0xa665, 0xa665, +0xa667, 0xa667, +0xa669, 0xa669, +0xa66b, 0xa66b, +0xa66d, 0xa66d, +0xa681, 0xa681, +0xa683, 0xa683, +0xa685, 0xa685, +0xa687, 0xa687, +0xa689, 0xa689, +0xa68b, 0xa68b, +0xa68d, 0xa68d, +0xa68f, 0xa68f, +0xa691, 0xa691, +0xa693, 0xa693, +0xa695, 0xa695, +0xa697, 0xa697, +0xa699, 0xa699, +0xa69b, 0xa69b, +0xa723, 0xa723, +0xa725, 0xa725, +0xa727, 0xa727, +0xa729, 0xa729, +0xa72b, 0xa72b, +0xa72d, 0xa72d, +0xa72f, 0xa731, +0xa733, 0xa733, +0xa735, 0xa735, +0xa737, 0xa737, +0xa739, 0xa739, +0xa73b, 0xa73b, +0xa73d, 0xa73d, +0xa73f, 0xa73f, +0xa741, 0xa741, +0xa743, 0xa743, +0xa745, 0xa745, +0xa747, 0xa747, +0xa749, 0xa749, +0xa74b, 0xa74b, +0xa74d, 0xa74d, +0xa74f, 0xa74f, +0xa751, 0xa751, +0xa753, 0xa753, +0xa755, 0xa755, +0xa757, 0xa757, +0xa759, 0xa759, +0xa75b, 0xa75b, +0xa75d, 0xa75d, +0xa75f, 0xa75f, +0xa761, 0xa761, +0xa763, 0xa763, +0xa765, 0xa765, +0xa767, 0xa767, +0xa769, 0xa769, +0xa76b, 0xa76b, +0xa76d, 0xa76d, +0xa76f, 0xa76f, +0xa771, 0xa778, +0xa77a, 0xa77a, +0xa77c, 0xa77c, +0xa77f, 0xa77f, +0xa781, 0xa781, +0xa783, 0xa783, +0xa785, 0xa785, +0xa787, 0xa787, +0xa78c, 0xa78c, +0xa78e, 0xa78e, +0xa791, 0xa791, +0xa793, 0xa795, +0xa797, 0xa797, +0xa799, 0xa799, +0xa79b, 0xa79b, +0xa79d, 0xa79d, +0xa79f, 0xa79f, +0xa7a1, 0xa7a1, +0xa7a3, 0xa7a3, +0xa7a5, 0xa7a5, +0xa7a7, 0xa7a7, +0xa7a9, 0xa7a9, +0xa7af, 0xa7af, +0xa7b5, 0xa7b5, +0xa7b7, 0xa7b7, +0xa7b9, 0xa7b9, +0xa7bb, 0xa7bb, +0xa7bd, 0xa7bd, +0xa7bf, 0xa7bf, +0xa7c1, 0xa7c1, +0xa7c3, 0xa7c3, +0xa7c8, 0xa7c8, +0xa7ca, 0xa7ca, +0xa7cd, 0xa7cd, +0xa7d1, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7d5, +0xa7d7, 0xa7d7, +0xa7d9, 0xa7d9, +0xa7db, 0xa7db, +0xa7f6, 0xa7f6, +0xa7fa, 0xa7fa, +0xab30, 0xab5a, +0xab60, 0xab68, +0xab70, 0xabbf, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xff41, 0xff5a, +0x10428, 0x1044f, +0x104d8, 0x104fb, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x10cc0, 0x10cf2, +0x10d70, 0x10d85, +0x118c0, 0x118df, +0x16e60, 0x16e7f, +0x1d41a, 0x1d433, +0x1d44e, 0x1d454, +0x1d456, 0x1d467, +0x1d482, 0x1d49b, +0x1d4b6, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d4cf, +0x1d4ea, 0x1d503, +0x1d51e, 0x1d537, +0x1d552, 0x1d56b, +0x1d586, 0x1d59f, +0x1d5ba, 0x1d5d3, +0x1d5ee, 0x1d607, +0x1d622, 0x1d63b, +0x1d656, 0x1d66f, +0x1d68a, 0x1d6a5, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6e1, +0x1d6fc, 0x1d714, +0x1d716, 0x1d71b, +0x1d736, 0x1d74e, +0x1d750, 0x1d755, +0x1d770, 0x1d788, +0x1d78a, 0x1d78f, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7c9, +0x1d7cb, 0x1d7cb, +0x1df00, 0x1df09, +0x1df0b, 0x1df1e, +0x1df25, 0x1df2a, +0x1e922, 0x1e943, +}; /* END of CR_Ll */ + +/* PROPERTY: 'Lm': General Category */ +static const OnigCodePoint +CR_Lm[] = { 75, +0x02b0, 0x02c1, +0x02c6, 0x02d1, +0x02e0, 0x02e4, +0x02ec, 0x02ec, +0x02ee, 0x02ee, +0x0374, 0x0374, +0x037a, 0x037a, +0x0559, 0x0559, +0x0640, 0x0640, +0x06e5, 0x06e6, +0x07f4, 0x07f5, +0x07fa, 0x07fa, +0x081a, 0x081a, +0x0824, 0x0824, +0x0828, 0x0828, +0x08c9, 0x08c9, +0x0971, 0x0971, +0x0e46, 0x0e46, +0x0ec6, 0x0ec6, +0x10fc, 0x10fc, +0x17d7, 0x17d7, +0x1843, 0x1843, +0x1aa7, 0x1aa7, +0x1c78, 0x1c7d, +0x1d2c, 0x1d6a, +0x1d78, 0x1d78, +0x1d9b, 0x1dbf, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x2c7c, 0x2c7d, +0x2d6f, 0x2d6f, +0x2e2f, 0x2e2f, +0x3005, 0x3005, +0x3031, 0x3035, +0x303b, 0x303b, +0x309d, 0x309e, +0x30fc, 0x30fe, +0xa015, 0xa015, +0xa4f8, 0xa4fd, +0xa60c, 0xa60c, +0xa67f, 0xa67f, +0xa69c, 0xa69d, +0xa717, 0xa71f, +0xa770, 0xa770, +0xa788, 0xa788, +0xa7f2, 0xa7f4, +0xa7f8, 0xa7f9, +0xa9cf, 0xa9cf, +0xa9e6, 0xa9e6, +0xaa70, 0xaa70, +0xaadd, 0xaadd, +0xaaf3, 0xaaf4, +0xab5c, 0xab5f, +0xab69, 0xab69, +0xff70, 0xff70, +0xff9e, 0xff9f, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10d4e, 0x10d4e, +0x10d6f, 0x10d6f, +0x16b40, 0x16b43, +0x16d40, 0x16d42, +0x16d6b, 0x16d6c, +0x16f93, 0x16f9f, +0x16fe0, 0x16fe1, +0x16fe3, 0x16fe3, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1e030, 0x1e06d, +0x1e137, 0x1e13d, +0x1e4eb, 0x1e4eb, +0x1e94b, 0x1e94b, +}; /* END of CR_Lm */ + +/* PROPERTY: 'Lo': General Category */ +static const OnigCodePoint +CR_Lo[] = { 528, +0x00aa, 0x00aa, +0x00ba, 0x00ba, +0x01bb, 0x01bb, +0x01c0, 0x01c3, +0x0294, 0x0294, +0x05d0, 0x05ea, +0x05ef, 0x05f2, +0x0620, 0x063f, +0x0641, 0x064a, +0x066e, 0x066f, +0x0671, 0x06d3, +0x06d5, 0x06d5, +0x06ee, 0x06ef, +0x06fa, 0x06fc, +0x06ff, 0x06ff, +0x0710, 0x0710, +0x0712, 0x072f, +0x074d, 0x07a5, +0x07b1, 0x07b1, +0x07ca, 0x07ea, +0x0800, 0x0815, +0x0840, 0x0858, +0x0860, 0x086a, +0x0870, 0x0887, +0x0889, 0x088e, +0x08a0, 0x08c8, +0x0904, 0x0939, +0x093d, 0x093d, +0x0950, 0x0950, +0x0958, 0x0961, +0x0972, 0x0980, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bd, 0x09bd, +0x09ce, 0x09ce, +0x09dc, 0x09dd, +0x09df, 0x09e1, +0x09f0, 0x09f1, +0x09fc, 0x09fc, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a72, 0x0a74, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abd, 0x0abd, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae1, +0x0af9, 0x0af9, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3d, 0x0b3d, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b61, +0x0b71, 0x0b71, +0x0b83, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bd0, 0x0bd0, +0x0c05, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3d, 0x0c3d, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c61, +0x0c80, 0x0c80, +0x0c85, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbd, 0x0cbd, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce1, +0x0cf1, 0x0cf2, +0x0d04, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d3a, +0x0d3d, 0x0d3d, +0x0d4e, 0x0d4e, +0x0d54, 0x0d56, +0x0d5f, 0x0d61, +0x0d7a, 0x0d7f, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0e01, 0x0e30, +0x0e32, 0x0e33, +0x0e40, 0x0e45, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0eb0, +0x0eb2, 0x0eb3, +0x0ebd, 0x0ebd, +0x0ec0, 0x0ec4, +0x0edc, 0x0edf, +0x0f00, 0x0f00, +0x0f40, 0x0f47, +0x0f49, 0x0f6c, +0x0f88, 0x0f8c, +0x1000, 0x102a, +0x103f, 0x103f, +0x1050, 0x1055, +0x105a, 0x105d, +0x1061, 0x1061, +0x1065, 0x1066, +0x106e, 0x1070, +0x1075, 0x1081, +0x108e, 0x108e, +0x1100, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x1380, 0x138f, +0x1401, 0x166c, +0x166f, 0x167f, +0x1681, 0x169a, +0x16a0, 0x16ea, +0x16f1, 0x16f8, +0x1700, 0x1711, +0x171f, 0x1731, +0x1740, 0x1751, +0x1760, 0x176c, +0x176e, 0x1770, +0x1780, 0x17b3, +0x17dc, 0x17dc, +0x1820, 0x1842, +0x1844, 0x1878, +0x1880, 0x1884, +0x1887, 0x18a8, +0x18aa, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1950, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x1a00, 0x1a16, +0x1a20, 0x1a54, +0x1b05, 0x1b33, +0x1b45, 0x1b4c, +0x1b83, 0x1ba0, +0x1bae, 0x1baf, +0x1bba, 0x1be5, +0x1c00, 0x1c23, +0x1c4d, 0x1c4f, +0x1c5a, 0x1c77, +0x1ce9, 0x1cec, +0x1cee, 0x1cf3, +0x1cf5, 0x1cf6, +0x1cfa, 0x1cfa, +0x2135, 0x2138, +0x2d30, 0x2d67, +0x2d80, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x3006, 0x3006, +0x303c, 0x303c, +0x3041, 0x3096, +0x309f, 0x309f, +0x30a1, 0x30fa, +0x30ff, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x31a0, 0x31bf, +0x31f0, 0x31ff, +0x3400, 0x4dbf, +0x4e00, 0xa014, +0xa016, 0xa48c, +0xa4d0, 0xa4f7, +0xa500, 0xa60b, +0xa610, 0xa61f, +0xa62a, 0xa62b, +0xa66e, 0xa66e, +0xa6a0, 0xa6e5, +0xa78f, 0xa78f, +0xa7f7, 0xa7f7, +0xa7fb, 0xa801, +0xa803, 0xa805, +0xa807, 0xa80a, +0xa80c, 0xa822, +0xa840, 0xa873, +0xa882, 0xa8b3, +0xa8f2, 0xa8f7, +0xa8fb, 0xa8fb, +0xa8fd, 0xa8fe, +0xa90a, 0xa925, +0xa930, 0xa946, +0xa960, 0xa97c, +0xa984, 0xa9b2, +0xa9e0, 0xa9e4, +0xa9e7, 0xa9ef, +0xa9fa, 0xa9fe, +0xaa00, 0xaa28, +0xaa40, 0xaa42, +0xaa44, 0xaa4b, +0xaa60, 0xaa6f, +0xaa71, 0xaa76, +0xaa7a, 0xaa7a, +0xaa7e, 0xaaaf, +0xaab1, 0xaab1, +0xaab5, 0xaab6, +0xaab9, 0xaabd, +0xaac0, 0xaac0, +0xaac2, 0xaac2, +0xaadb, 0xaadc, +0xaae0, 0xaaea, +0xaaf2, 0xaaf2, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xabc0, 0xabe2, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xf900, 0xfa6d, +0xfa70, 0xfad9, +0xfb1d, 0xfb1d, +0xfb1f, 0xfb28, +0xfb2a, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbb1, +0xfbd3, 0xfd3d, +0xfd50, 0xfd8f, +0xfd92, 0xfdc7, +0xfdf0, 0xfdfb, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0xff66, 0xff6f, +0xff71, 0xff9d, +0xffa0, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x10300, 0x1031f, +0x1032d, 0x10340, +0x10342, 0x10349, +0x10350, 0x10375, +0x10380, 0x1039d, +0x103a0, 0x103c3, +0x103c8, 0x103cf, +0x10450, 0x1049d, +0x10500, 0x10527, +0x10530, 0x10563, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10860, 0x10876, +0x10880, 0x1089e, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x10900, 0x10915, +0x10920, 0x10939, +0x10980, 0x109b7, +0x109be, 0x109bf, +0x10a00, 0x10a00, +0x10a10, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a60, 0x10a7c, +0x10a80, 0x10a9c, +0x10ac0, 0x10ac7, +0x10ac9, 0x10ae4, +0x10b00, 0x10b35, +0x10b40, 0x10b55, +0x10b60, 0x10b72, +0x10b80, 0x10b91, +0x10c00, 0x10c48, +0x10d00, 0x10d23, +0x10d4a, 0x10d4d, +0x10d4f, 0x10d4f, +0x10e80, 0x10ea9, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10f00, 0x10f1c, +0x10f27, 0x10f27, +0x10f30, 0x10f45, +0x10f70, 0x10f81, +0x10fb0, 0x10fc4, +0x10fe0, 0x10ff6, +0x11003, 0x11037, +0x11071, 0x11072, +0x11075, 0x11075, +0x11083, 0x110af, +0x110d0, 0x110e8, +0x11103, 0x11126, +0x11144, 0x11144, +0x11147, 0x11147, +0x11150, 0x11172, +0x11176, 0x11176, +0x11183, 0x111b2, +0x111c1, 0x111c4, +0x111da, 0x111da, +0x111dc, 0x111dc, +0x11200, 0x11211, +0x11213, 0x1122b, +0x1123f, 0x11240, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a8, +0x112b0, 0x112de, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133d, 0x1133d, +0x11350, 0x11350, +0x1135d, 0x11361, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113b7, +0x113d1, 0x113d1, +0x113d3, 0x113d3, +0x11400, 0x11434, +0x11447, 0x1144a, +0x1145f, 0x11461, +0x11480, 0x114af, +0x114c4, 0x114c5, +0x114c7, 0x114c7, +0x11580, 0x115ae, +0x115d8, 0x115db, +0x11600, 0x1162f, +0x11644, 0x11644, +0x11680, 0x116aa, +0x116b8, 0x116b8, +0x11700, 0x1171a, +0x11740, 0x11746, +0x11800, 0x1182b, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x1192f, +0x1193f, 0x1193f, +0x11941, 0x11941, +0x119a0, 0x119a7, +0x119aa, 0x119d0, +0x119e1, 0x119e1, +0x119e3, 0x119e3, +0x11a00, 0x11a00, +0x11a0b, 0x11a32, +0x11a3a, 0x11a3a, +0x11a50, 0x11a50, +0x11a5c, 0x11a89, +0x11a9d, 0x11a9d, +0x11ab0, 0x11af8, +0x11bc0, 0x11be0, +0x11c00, 0x11c08, +0x11c0a, 0x11c2e, +0x11c40, 0x11c40, +0x11c72, 0x11c8f, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d30, +0x11d46, 0x11d46, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d89, +0x11d98, 0x11d98, +0x11ee0, 0x11ef2, +0x11f02, 0x11f02, +0x11f04, 0x11f10, +0x11f12, 0x11f33, +0x11fb0, 0x11fb0, +0x12000, 0x12399, +0x12480, 0x12543, +0x12f90, 0x12ff0, +0x13000, 0x1342f, +0x13441, 0x13446, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x1611d, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a70, 0x16abe, +0x16ad0, 0x16aed, +0x16b00, 0x16b2f, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d43, 0x16d6a, +0x16f00, 0x16f4a, +0x16f50, 0x16f50, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1df0a, 0x1df0a, +0x1e100, 0x1e12c, +0x1e14e, 0x1e14e, +0x1e290, 0x1e2ad, +0x1e2c0, 0x1e2eb, +0x1e4d0, 0x1e4ea, +0x1e5d0, 0x1e5ed, +0x1e5f0, 0x1e5f0, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +}; /* END of CR_Lo */ + +/* PROPERTY: 'Logical_Order_Exception': Binary Property */ +static const OnigCodePoint +CR_Logical_Order_Exception[] = { 7, +0x0e40, 0x0e44, +0x0ec0, 0x0ec4, +0x19b5, 0x19b7, +0x19ba, 0x19ba, +0xaab5, 0xaab6, +0xaab9, 0xaab9, +0xaabb, 0xaabc, +}; /* END of CR_Logical_Order_Exception */ + +/* PROPERTY: 'Lowercase': Derived Property */ +#define CR_Lowercase CR_Lower + +/* PROPERTY: 'Lt': General Category */ +static const OnigCodePoint +CR_Lt[] = { 10, +0x01c5, 0x01c5, +0x01c8, 0x01c8, +0x01cb, 0x01cb, +0x01f2, 0x01f2, +0x1f88, 0x1f8f, +0x1f98, 0x1f9f, +0x1fa8, 0x1faf, +0x1fbc, 0x1fbc, +0x1fcc, 0x1fcc, +0x1ffc, 0x1ffc, +}; /* END of CR_Lt */ + +/* PROPERTY: 'Lu': General Category */ +static const OnigCodePoint +CR_Lu[] = { 651, +0x0041, 0x005a, +0x00c0, 0x00d6, +0x00d8, 0x00de, +0x0100, 0x0100, +0x0102, 0x0102, +0x0104, 0x0104, +0x0106, 0x0106, +0x0108, 0x0108, +0x010a, 0x010a, +0x010c, 0x010c, +0x010e, 0x010e, +0x0110, 0x0110, +0x0112, 0x0112, +0x0114, 0x0114, +0x0116, 0x0116, +0x0118, 0x0118, +0x011a, 0x011a, +0x011c, 0x011c, +0x011e, 0x011e, +0x0120, 0x0120, +0x0122, 0x0122, +0x0124, 0x0124, +0x0126, 0x0126, +0x0128, 0x0128, +0x012a, 0x012a, +0x012c, 0x012c, +0x012e, 0x012e, +0x0130, 0x0130, +0x0132, 0x0132, +0x0134, 0x0134, +0x0136, 0x0136, +0x0139, 0x0139, +0x013b, 0x013b, +0x013d, 0x013d, +0x013f, 0x013f, +0x0141, 0x0141, +0x0143, 0x0143, +0x0145, 0x0145, +0x0147, 0x0147, +0x014a, 0x014a, +0x014c, 0x014c, +0x014e, 0x014e, +0x0150, 0x0150, +0x0152, 0x0152, +0x0154, 0x0154, +0x0156, 0x0156, +0x0158, 0x0158, +0x015a, 0x015a, +0x015c, 0x015c, +0x015e, 0x015e, +0x0160, 0x0160, +0x0162, 0x0162, +0x0164, 0x0164, +0x0166, 0x0166, +0x0168, 0x0168, +0x016a, 0x016a, +0x016c, 0x016c, +0x016e, 0x016e, +0x0170, 0x0170, +0x0172, 0x0172, +0x0174, 0x0174, +0x0176, 0x0176, +0x0178, 0x0179, +0x017b, 0x017b, +0x017d, 0x017d, +0x0181, 0x0182, +0x0184, 0x0184, +0x0186, 0x0187, +0x0189, 0x018b, +0x018e, 0x0191, +0x0193, 0x0194, +0x0196, 0x0198, +0x019c, 0x019d, +0x019f, 0x01a0, +0x01a2, 0x01a2, +0x01a4, 0x01a4, +0x01a6, 0x01a7, +0x01a9, 0x01a9, +0x01ac, 0x01ac, +0x01ae, 0x01af, +0x01b1, 0x01b3, +0x01b5, 0x01b5, +0x01b7, 0x01b8, +0x01bc, 0x01bc, +0x01c4, 0x01c4, +0x01c7, 0x01c7, +0x01ca, 0x01ca, +0x01cd, 0x01cd, +0x01cf, 0x01cf, +0x01d1, 0x01d1, +0x01d3, 0x01d3, +0x01d5, 0x01d5, +0x01d7, 0x01d7, +0x01d9, 0x01d9, +0x01db, 0x01db, +0x01de, 0x01de, +0x01e0, 0x01e0, +0x01e2, 0x01e2, +0x01e4, 0x01e4, +0x01e6, 0x01e6, +0x01e8, 0x01e8, +0x01ea, 0x01ea, +0x01ec, 0x01ec, +0x01ee, 0x01ee, +0x01f1, 0x01f1, +0x01f4, 0x01f4, +0x01f6, 0x01f8, +0x01fa, 0x01fa, +0x01fc, 0x01fc, +0x01fe, 0x01fe, +0x0200, 0x0200, +0x0202, 0x0202, +0x0204, 0x0204, +0x0206, 0x0206, +0x0208, 0x0208, +0x020a, 0x020a, +0x020c, 0x020c, +0x020e, 0x020e, +0x0210, 0x0210, +0x0212, 0x0212, +0x0214, 0x0214, +0x0216, 0x0216, +0x0218, 0x0218, +0x021a, 0x021a, +0x021c, 0x021c, +0x021e, 0x021e, +0x0220, 0x0220, +0x0222, 0x0222, +0x0224, 0x0224, +0x0226, 0x0226, +0x0228, 0x0228, +0x022a, 0x022a, +0x022c, 0x022c, +0x022e, 0x022e, +0x0230, 0x0230, +0x0232, 0x0232, +0x023a, 0x023b, +0x023d, 0x023e, +0x0241, 0x0241, +0x0243, 0x0246, +0x0248, 0x0248, +0x024a, 0x024a, +0x024c, 0x024c, +0x024e, 0x024e, +0x0370, 0x0370, +0x0372, 0x0372, +0x0376, 0x0376, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x038f, +0x0391, 0x03a1, +0x03a3, 0x03ab, +0x03cf, 0x03cf, +0x03d2, 0x03d4, +0x03d8, 0x03d8, +0x03da, 0x03da, +0x03dc, 0x03dc, +0x03de, 0x03de, +0x03e0, 0x03e0, +0x03e2, 0x03e2, +0x03e4, 0x03e4, +0x03e6, 0x03e6, +0x03e8, 0x03e8, +0x03ea, 0x03ea, +0x03ec, 0x03ec, +0x03ee, 0x03ee, +0x03f4, 0x03f4, +0x03f7, 0x03f7, +0x03f9, 0x03fa, +0x03fd, 0x042f, +0x0460, 0x0460, +0x0462, 0x0462, +0x0464, 0x0464, +0x0466, 0x0466, +0x0468, 0x0468, +0x046a, 0x046a, +0x046c, 0x046c, +0x046e, 0x046e, +0x0470, 0x0470, +0x0472, 0x0472, +0x0474, 0x0474, +0x0476, 0x0476, +0x0478, 0x0478, +0x047a, 0x047a, +0x047c, 0x047c, +0x047e, 0x047e, +0x0480, 0x0480, +0x048a, 0x048a, +0x048c, 0x048c, +0x048e, 0x048e, +0x0490, 0x0490, +0x0492, 0x0492, +0x0494, 0x0494, +0x0496, 0x0496, +0x0498, 0x0498, +0x049a, 0x049a, +0x049c, 0x049c, +0x049e, 0x049e, +0x04a0, 0x04a0, +0x04a2, 0x04a2, +0x04a4, 0x04a4, +0x04a6, 0x04a6, +0x04a8, 0x04a8, +0x04aa, 0x04aa, +0x04ac, 0x04ac, +0x04ae, 0x04ae, +0x04b0, 0x04b0, +0x04b2, 0x04b2, +0x04b4, 0x04b4, +0x04b6, 0x04b6, +0x04b8, 0x04b8, +0x04ba, 0x04ba, +0x04bc, 0x04bc, +0x04be, 0x04be, +0x04c0, 0x04c1, +0x04c3, 0x04c3, +0x04c5, 0x04c5, +0x04c7, 0x04c7, +0x04c9, 0x04c9, +0x04cb, 0x04cb, +0x04cd, 0x04cd, +0x04d0, 0x04d0, +0x04d2, 0x04d2, +0x04d4, 0x04d4, +0x04d6, 0x04d6, +0x04d8, 0x04d8, +0x04da, 0x04da, +0x04dc, 0x04dc, +0x04de, 0x04de, +0x04e0, 0x04e0, +0x04e2, 0x04e2, +0x04e4, 0x04e4, +0x04e6, 0x04e6, +0x04e8, 0x04e8, +0x04ea, 0x04ea, +0x04ec, 0x04ec, +0x04ee, 0x04ee, +0x04f0, 0x04f0, +0x04f2, 0x04f2, +0x04f4, 0x04f4, +0x04f6, 0x04f6, +0x04f8, 0x04f8, +0x04fa, 0x04fa, +0x04fc, 0x04fc, +0x04fe, 0x04fe, +0x0500, 0x0500, +0x0502, 0x0502, +0x0504, 0x0504, +0x0506, 0x0506, +0x0508, 0x0508, +0x050a, 0x050a, +0x050c, 0x050c, +0x050e, 0x050e, +0x0510, 0x0510, +0x0512, 0x0512, +0x0514, 0x0514, +0x0516, 0x0516, +0x0518, 0x0518, +0x051a, 0x051a, +0x051c, 0x051c, +0x051e, 0x051e, +0x0520, 0x0520, +0x0522, 0x0522, +0x0524, 0x0524, +0x0526, 0x0526, +0x0528, 0x0528, +0x052a, 0x052a, +0x052c, 0x052c, +0x052e, 0x052e, +0x0531, 0x0556, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x13a0, 0x13f5, +0x1c89, 0x1c89, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1e00, 0x1e00, +0x1e02, 0x1e02, +0x1e04, 0x1e04, +0x1e06, 0x1e06, +0x1e08, 0x1e08, +0x1e0a, 0x1e0a, +0x1e0c, 0x1e0c, +0x1e0e, 0x1e0e, +0x1e10, 0x1e10, +0x1e12, 0x1e12, +0x1e14, 0x1e14, +0x1e16, 0x1e16, +0x1e18, 0x1e18, +0x1e1a, 0x1e1a, +0x1e1c, 0x1e1c, +0x1e1e, 0x1e1e, +0x1e20, 0x1e20, +0x1e22, 0x1e22, +0x1e24, 0x1e24, +0x1e26, 0x1e26, +0x1e28, 0x1e28, +0x1e2a, 0x1e2a, +0x1e2c, 0x1e2c, +0x1e2e, 0x1e2e, +0x1e30, 0x1e30, +0x1e32, 0x1e32, +0x1e34, 0x1e34, +0x1e36, 0x1e36, +0x1e38, 0x1e38, +0x1e3a, 0x1e3a, +0x1e3c, 0x1e3c, +0x1e3e, 0x1e3e, +0x1e40, 0x1e40, +0x1e42, 0x1e42, +0x1e44, 0x1e44, +0x1e46, 0x1e46, +0x1e48, 0x1e48, +0x1e4a, 0x1e4a, +0x1e4c, 0x1e4c, +0x1e4e, 0x1e4e, +0x1e50, 0x1e50, +0x1e52, 0x1e52, +0x1e54, 0x1e54, +0x1e56, 0x1e56, +0x1e58, 0x1e58, +0x1e5a, 0x1e5a, +0x1e5c, 0x1e5c, +0x1e5e, 0x1e5e, +0x1e60, 0x1e60, +0x1e62, 0x1e62, +0x1e64, 0x1e64, +0x1e66, 0x1e66, +0x1e68, 0x1e68, +0x1e6a, 0x1e6a, +0x1e6c, 0x1e6c, +0x1e6e, 0x1e6e, +0x1e70, 0x1e70, +0x1e72, 0x1e72, +0x1e74, 0x1e74, +0x1e76, 0x1e76, +0x1e78, 0x1e78, +0x1e7a, 0x1e7a, +0x1e7c, 0x1e7c, +0x1e7e, 0x1e7e, +0x1e80, 0x1e80, +0x1e82, 0x1e82, +0x1e84, 0x1e84, +0x1e86, 0x1e86, +0x1e88, 0x1e88, +0x1e8a, 0x1e8a, +0x1e8c, 0x1e8c, +0x1e8e, 0x1e8e, +0x1e90, 0x1e90, +0x1e92, 0x1e92, +0x1e94, 0x1e94, +0x1e9e, 0x1e9e, +0x1ea0, 0x1ea0, +0x1ea2, 0x1ea2, +0x1ea4, 0x1ea4, +0x1ea6, 0x1ea6, +0x1ea8, 0x1ea8, +0x1eaa, 0x1eaa, +0x1eac, 0x1eac, +0x1eae, 0x1eae, +0x1eb0, 0x1eb0, +0x1eb2, 0x1eb2, +0x1eb4, 0x1eb4, +0x1eb6, 0x1eb6, +0x1eb8, 0x1eb8, +0x1eba, 0x1eba, +0x1ebc, 0x1ebc, +0x1ebe, 0x1ebe, +0x1ec0, 0x1ec0, +0x1ec2, 0x1ec2, +0x1ec4, 0x1ec4, +0x1ec6, 0x1ec6, +0x1ec8, 0x1ec8, +0x1eca, 0x1eca, +0x1ecc, 0x1ecc, +0x1ece, 0x1ece, +0x1ed0, 0x1ed0, +0x1ed2, 0x1ed2, +0x1ed4, 0x1ed4, +0x1ed6, 0x1ed6, +0x1ed8, 0x1ed8, +0x1eda, 0x1eda, +0x1edc, 0x1edc, +0x1ede, 0x1ede, +0x1ee0, 0x1ee0, +0x1ee2, 0x1ee2, +0x1ee4, 0x1ee4, +0x1ee6, 0x1ee6, +0x1ee8, 0x1ee8, +0x1eea, 0x1eea, +0x1eec, 0x1eec, +0x1eee, 0x1eee, +0x1ef0, 0x1ef0, +0x1ef2, 0x1ef2, +0x1ef4, 0x1ef4, +0x1ef6, 0x1ef6, +0x1ef8, 0x1ef8, +0x1efa, 0x1efa, +0x1efc, 0x1efc, +0x1efe, 0x1efe, +0x1f08, 0x1f0f, +0x1f18, 0x1f1d, +0x1f28, 0x1f2f, +0x1f38, 0x1f3f, +0x1f48, 0x1f4d, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f5f, +0x1f68, 0x1f6f, +0x1fb8, 0x1fbb, +0x1fc8, 0x1fcb, +0x1fd8, 0x1fdb, +0x1fe8, 0x1fec, +0x1ff8, 0x1ffb, +0x2102, 0x2102, +0x2107, 0x2107, +0x210b, 0x210d, +0x2110, 0x2112, +0x2115, 0x2115, +0x2119, 0x211d, +0x2124, 0x2124, +0x2126, 0x2126, +0x2128, 0x2128, +0x212a, 0x212d, +0x2130, 0x2133, +0x213e, 0x213f, +0x2145, 0x2145, +0x2183, 0x2183, +0x2c00, 0x2c2f, +0x2c60, 0x2c60, +0x2c62, 0x2c64, +0x2c67, 0x2c67, +0x2c69, 0x2c69, +0x2c6b, 0x2c6b, +0x2c6d, 0x2c70, +0x2c72, 0x2c72, +0x2c75, 0x2c75, +0x2c7e, 0x2c80, +0x2c82, 0x2c82, +0x2c84, 0x2c84, +0x2c86, 0x2c86, +0x2c88, 0x2c88, +0x2c8a, 0x2c8a, +0x2c8c, 0x2c8c, +0x2c8e, 0x2c8e, +0x2c90, 0x2c90, +0x2c92, 0x2c92, +0x2c94, 0x2c94, +0x2c96, 0x2c96, +0x2c98, 0x2c98, +0x2c9a, 0x2c9a, +0x2c9c, 0x2c9c, +0x2c9e, 0x2c9e, +0x2ca0, 0x2ca0, +0x2ca2, 0x2ca2, +0x2ca4, 0x2ca4, +0x2ca6, 0x2ca6, +0x2ca8, 0x2ca8, +0x2caa, 0x2caa, +0x2cac, 0x2cac, +0x2cae, 0x2cae, +0x2cb0, 0x2cb0, +0x2cb2, 0x2cb2, +0x2cb4, 0x2cb4, +0x2cb6, 0x2cb6, +0x2cb8, 0x2cb8, +0x2cba, 0x2cba, +0x2cbc, 0x2cbc, +0x2cbe, 0x2cbe, +0x2cc0, 0x2cc0, +0x2cc2, 0x2cc2, +0x2cc4, 0x2cc4, +0x2cc6, 0x2cc6, +0x2cc8, 0x2cc8, +0x2cca, 0x2cca, +0x2ccc, 0x2ccc, +0x2cce, 0x2cce, +0x2cd0, 0x2cd0, +0x2cd2, 0x2cd2, +0x2cd4, 0x2cd4, +0x2cd6, 0x2cd6, +0x2cd8, 0x2cd8, +0x2cda, 0x2cda, +0x2cdc, 0x2cdc, +0x2cde, 0x2cde, +0x2ce0, 0x2ce0, +0x2ce2, 0x2ce2, +0x2ceb, 0x2ceb, +0x2ced, 0x2ced, +0x2cf2, 0x2cf2, +0xa640, 0xa640, +0xa642, 0xa642, +0xa644, 0xa644, +0xa646, 0xa646, +0xa648, 0xa648, +0xa64a, 0xa64a, +0xa64c, 0xa64c, +0xa64e, 0xa64e, +0xa650, 0xa650, +0xa652, 0xa652, +0xa654, 0xa654, +0xa656, 0xa656, +0xa658, 0xa658, +0xa65a, 0xa65a, +0xa65c, 0xa65c, +0xa65e, 0xa65e, +0xa660, 0xa660, +0xa662, 0xa662, +0xa664, 0xa664, +0xa666, 0xa666, +0xa668, 0xa668, +0xa66a, 0xa66a, +0xa66c, 0xa66c, +0xa680, 0xa680, +0xa682, 0xa682, +0xa684, 0xa684, +0xa686, 0xa686, +0xa688, 0xa688, +0xa68a, 0xa68a, +0xa68c, 0xa68c, +0xa68e, 0xa68e, +0xa690, 0xa690, +0xa692, 0xa692, +0xa694, 0xa694, +0xa696, 0xa696, +0xa698, 0xa698, +0xa69a, 0xa69a, +0xa722, 0xa722, +0xa724, 0xa724, +0xa726, 0xa726, +0xa728, 0xa728, +0xa72a, 0xa72a, +0xa72c, 0xa72c, +0xa72e, 0xa72e, +0xa732, 0xa732, +0xa734, 0xa734, +0xa736, 0xa736, +0xa738, 0xa738, +0xa73a, 0xa73a, +0xa73c, 0xa73c, +0xa73e, 0xa73e, +0xa740, 0xa740, +0xa742, 0xa742, +0xa744, 0xa744, +0xa746, 0xa746, +0xa748, 0xa748, +0xa74a, 0xa74a, +0xa74c, 0xa74c, +0xa74e, 0xa74e, +0xa750, 0xa750, +0xa752, 0xa752, +0xa754, 0xa754, +0xa756, 0xa756, +0xa758, 0xa758, +0xa75a, 0xa75a, +0xa75c, 0xa75c, +0xa75e, 0xa75e, +0xa760, 0xa760, +0xa762, 0xa762, +0xa764, 0xa764, +0xa766, 0xa766, +0xa768, 0xa768, +0xa76a, 0xa76a, +0xa76c, 0xa76c, +0xa76e, 0xa76e, +0xa779, 0xa779, +0xa77b, 0xa77b, +0xa77d, 0xa77e, +0xa780, 0xa780, +0xa782, 0xa782, +0xa784, 0xa784, +0xa786, 0xa786, +0xa78b, 0xa78b, +0xa78d, 0xa78d, +0xa790, 0xa790, +0xa792, 0xa792, +0xa796, 0xa796, +0xa798, 0xa798, +0xa79a, 0xa79a, +0xa79c, 0xa79c, +0xa79e, 0xa79e, +0xa7a0, 0xa7a0, +0xa7a2, 0xa7a2, +0xa7a4, 0xa7a4, +0xa7a6, 0xa7a6, +0xa7a8, 0xa7a8, +0xa7aa, 0xa7ae, +0xa7b0, 0xa7b4, +0xa7b6, 0xa7b6, +0xa7b8, 0xa7b8, +0xa7ba, 0xa7ba, +0xa7bc, 0xa7bc, +0xa7be, 0xa7be, +0xa7c0, 0xa7c0, +0xa7c2, 0xa7c2, +0xa7c4, 0xa7c7, +0xa7c9, 0xa7c9, +0xa7cb, 0xa7cc, +0xa7d0, 0xa7d0, +0xa7d6, 0xa7d6, +0xa7d8, 0xa7d8, +0xa7da, 0xa7da, +0xa7dc, 0xa7dc, +0xa7f5, 0xa7f5, +0xff21, 0xff3a, +0x10400, 0x10427, +0x104b0, 0x104d3, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10c80, 0x10cb2, +0x10d50, 0x10d65, +0x118a0, 0x118bf, +0x16e40, 0x16e5f, +0x1d400, 0x1d419, +0x1d434, 0x1d44d, +0x1d468, 0x1d481, +0x1d49c, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b5, +0x1d4d0, 0x1d4e9, +0x1d504, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d538, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d56c, 0x1d585, +0x1d5a0, 0x1d5b9, +0x1d5d4, 0x1d5ed, +0x1d608, 0x1d621, +0x1d63c, 0x1d655, +0x1d670, 0x1d689, +0x1d6a8, 0x1d6c0, +0x1d6e2, 0x1d6fa, +0x1d71c, 0x1d734, +0x1d756, 0x1d76e, +0x1d790, 0x1d7a8, +0x1d7ca, 0x1d7ca, +0x1e900, 0x1e921, +}; /* END of CR_Lu */ + +/* PROPERTY: 'Lycian': Script */ +static const OnigCodePoint +CR_Lycian[] = { 1, +0x10280, 0x1029c, +}; /* END of CR_Lycian */ + +/* PROPERTY: 'Lydian': Script */ +static const OnigCodePoint +CR_Lydian[] = { 2, +0x10920, 0x10939, +0x1093f, 0x1093f, +}; /* END of CR_Lydian */ + +/* PROPERTY: 'M': Major Category */ +static const OnigCodePoint +CR_M[] = { 321, +0x0300, 0x036f, +0x0483, 0x0489, +0x0591, 0x05bd, +0x05bf, 0x05bf, +0x05c1, 0x05c2, +0x05c4, 0x05c5, +0x05c7, 0x05c7, +0x0610, 0x061a, +0x064b, 0x065f, +0x0670, 0x0670, +0x06d6, 0x06dc, +0x06df, 0x06e4, +0x06e7, 0x06e8, +0x06ea, 0x06ed, +0x0711, 0x0711, +0x0730, 0x074a, +0x07a6, 0x07b0, +0x07eb, 0x07f3, +0x07fd, 0x07fd, +0x0816, 0x0819, +0x081b, 0x0823, +0x0825, 0x0827, +0x0829, 0x082d, +0x0859, 0x085b, +0x0897, 0x089f, +0x08ca, 0x08e1, +0x08e3, 0x0903, +0x093a, 0x093c, +0x093e, 0x094f, +0x0951, 0x0957, +0x0962, 0x0963, +0x0981, 0x0983, +0x09bc, 0x09bc, +0x09be, 0x09c4, +0x09c7, 0x09c8, +0x09cb, 0x09cd, +0x09d7, 0x09d7, +0x09e2, 0x09e3, +0x09fe, 0x09fe, +0x0a01, 0x0a03, +0x0a3c, 0x0a3c, +0x0a3e, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4d, +0x0a51, 0x0a51, +0x0a70, 0x0a71, +0x0a75, 0x0a75, +0x0a81, 0x0a83, +0x0abc, 0x0abc, +0x0abe, 0x0ac5, +0x0ac7, 0x0ac9, +0x0acb, 0x0acd, +0x0ae2, 0x0ae3, +0x0afa, 0x0aff, +0x0b01, 0x0b03, +0x0b3c, 0x0b3c, +0x0b3e, 0x0b44, +0x0b47, 0x0b48, +0x0b4b, 0x0b4d, +0x0b55, 0x0b57, +0x0b62, 0x0b63, +0x0b82, 0x0b82, +0x0bbe, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcd, +0x0bd7, 0x0bd7, +0x0c00, 0x0c04, +0x0c3c, 0x0c3c, +0x0c3e, 0x0c44, +0x0c46, 0x0c48, +0x0c4a, 0x0c4d, +0x0c55, 0x0c56, +0x0c62, 0x0c63, +0x0c81, 0x0c83, +0x0cbc, 0x0cbc, +0x0cbe, 0x0cc4, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccd, +0x0cd5, 0x0cd6, +0x0ce2, 0x0ce3, +0x0cf3, 0x0cf3, +0x0d00, 0x0d03, +0x0d3b, 0x0d3c, +0x0d3e, 0x0d44, +0x0d46, 0x0d48, +0x0d4a, 0x0d4d, +0x0d57, 0x0d57, +0x0d62, 0x0d63, +0x0d81, 0x0d83, +0x0dca, 0x0dca, +0x0dcf, 0x0dd4, +0x0dd6, 0x0dd6, +0x0dd8, 0x0ddf, +0x0df2, 0x0df3, +0x0e31, 0x0e31, +0x0e34, 0x0e3a, +0x0e47, 0x0e4e, +0x0eb1, 0x0eb1, +0x0eb4, 0x0ebc, +0x0ec8, 0x0ece, +0x0f18, 0x0f19, +0x0f35, 0x0f35, +0x0f37, 0x0f37, +0x0f39, 0x0f39, +0x0f3e, 0x0f3f, +0x0f71, 0x0f84, +0x0f86, 0x0f87, +0x0f8d, 0x0f97, +0x0f99, 0x0fbc, +0x0fc6, 0x0fc6, +0x102b, 0x103e, +0x1056, 0x1059, +0x105e, 0x1060, +0x1062, 0x1064, +0x1067, 0x106d, +0x1071, 0x1074, +0x1082, 0x108d, +0x108f, 0x108f, +0x109a, 0x109d, +0x135d, 0x135f, +0x1712, 0x1715, +0x1732, 0x1734, +0x1752, 0x1753, +0x1772, 0x1773, +0x17b4, 0x17d3, +0x17dd, 0x17dd, +0x180b, 0x180d, +0x180f, 0x180f, +0x1885, 0x1886, +0x18a9, 0x18a9, +0x1920, 0x192b, +0x1930, 0x193b, +0x1a17, 0x1a1b, +0x1a55, 0x1a5e, +0x1a60, 0x1a7c, +0x1a7f, 0x1a7f, +0x1ab0, 0x1ace, +0x1b00, 0x1b04, +0x1b34, 0x1b44, +0x1b6b, 0x1b73, +0x1b80, 0x1b82, +0x1ba1, 0x1bad, +0x1be6, 0x1bf3, +0x1c24, 0x1c37, +0x1cd0, 0x1cd2, +0x1cd4, 0x1ce8, +0x1ced, 0x1ced, +0x1cf4, 0x1cf4, +0x1cf7, 0x1cf9, +0x1dc0, 0x1dff, +0x20d0, 0x20f0, +0x2cef, 0x2cf1, +0x2d7f, 0x2d7f, +0x2de0, 0x2dff, +0x302a, 0x302f, +0x3099, 0x309a, +0xa66f, 0xa672, +0xa674, 0xa67d, +0xa69e, 0xa69f, +0xa6f0, 0xa6f1, +0xa802, 0xa802, +0xa806, 0xa806, +0xa80b, 0xa80b, +0xa823, 0xa827, +0xa82c, 0xa82c, +0xa880, 0xa881, +0xa8b4, 0xa8c5, +0xa8e0, 0xa8f1, +0xa8ff, 0xa8ff, +0xa926, 0xa92d, +0xa947, 0xa953, +0xa980, 0xa983, +0xa9b3, 0xa9c0, +0xa9e5, 0xa9e5, +0xaa29, 0xaa36, +0xaa43, 0xaa43, +0xaa4c, 0xaa4d, +0xaa7b, 0xaa7d, +0xaab0, 0xaab0, +0xaab2, 0xaab4, +0xaab7, 0xaab8, +0xaabe, 0xaabf, +0xaac1, 0xaac1, +0xaaeb, 0xaaef, +0xaaf5, 0xaaf6, +0xabe3, 0xabea, +0xabec, 0xabed, +0xfb1e, 0xfb1e, +0xfe00, 0xfe0f, +0xfe20, 0xfe2f, +0x101fd, 0x101fd, +0x102e0, 0x102e0, +0x10376, 0x1037a, +0x10a01, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a0f, +0x10a38, 0x10a3a, +0x10a3f, 0x10a3f, +0x10ae5, 0x10ae6, +0x10d24, 0x10d27, +0x10d69, 0x10d6d, +0x10eab, 0x10eac, +0x10efc, 0x10eff, +0x10f46, 0x10f50, +0x10f82, 0x10f85, +0x11000, 0x11002, +0x11038, 0x11046, +0x11070, 0x11070, +0x11073, 0x11074, +0x1107f, 0x11082, +0x110b0, 0x110ba, +0x110c2, 0x110c2, +0x11100, 0x11102, +0x11127, 0x11134, +0x11145, 0x11146, +0x11173, 0x11173, +0x11180, 0x11182, +0x111b3, 0x111c0, +0x111c9, 0x111cc, +0x111ce, 0x111cf, +0x1122c, 0x11237, +0x1123e, 0x1123e, +0x11241, 0x11241, +0x112df, 0x112ea, +0x11300, 0x11303, +0x1133b, 0x1133c, +0x1133e, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134d, +0x11357, 0x11357, +0x11362, 0x11363, +0x11366, 0x1136c, +0x11370, 0x11374, +0x113b8, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113d0, +0x113d2, 0x113d2, +0x113e1, 0x113e2, +0x11435, 0x11446, +0x1145e, 0x1145e, +0x114b0, 0x114c3, +0x115af, 0x115b5, +0x115b8, 0x115c0, +0x115dc, 0x115dd, +0x11630, 0x11640, +0x116ab, 0x116b7, +0x1171d, 0x1172b, +0x1182c, 0x1183a, +0x11930, 0x11935, +0x11937, 0x11938, +0x1193b, 0x1193e, +0x11940, 0x11940, +0x11942, 0x11943, +0x119d1, 0x119d7, +0x119da, 0x119e0, +0x119e4, 0x119e4, +0x11a01, 0x11a0a, +0x11a33, 0x11a39, +0x11a3b, 0x11a3e, +0x11a47, 0x11a47, +0x11a51, 0x11a5b, +0x11a8a, 0x11a99, +0x11c2f, 0x11c36, +0x11c38, 0x11c3f, +0x11c92, 0x11ca7, +0x11ca9, 0x11cb6, +0x11d31, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d45, +0x11d47, 0x11d47, +0x11d8a, 0x11d8e, +0x11d90, 0x11d91, +0x11d93, 0x11d97, +0x11ef3, 0x11ef6, +0x11f00, 0x11f01, +0x11f03, 0x11f03, +0x11f34, 0x11f3a, +0x11f3e, 0x11f42, +0x11f5a, 0x11f5a, +0x13440, 0x13440, +0x13447, 0x13455, +0x1611e, 0x1612f, +0x16af0, 0x16af4, +0x16b30, 0x16b36, +0x16f4f, 0x16f4f, +0x16f51, 0x16f87, +0x16f8f, 0x16f92, +0x16fe4, 0x16fe4, +0x16ff0, 0x16ff1, +0x1bc9d, 0x1bc9e, +0x1cf00, 0x1cf2d, +0x1cf30, 0x1cf46, +0x1d165, 0x1d169, +0x1d16d, 0x1d172, +0x1d17b, 0x1d182, +0x1d185, 0x1d18b, +0x1d1aa, 0x1d1ad, +0x1d242, 0x1d244, +0x1da00, 0x1da36, +0x1da3b, 0x1da6c, +0x1da75, 0x1da75, +0x1da84, 0x1da84, +0x1da9b, 0x1da9f, +0x1daa1, 0x1daaf, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e08f, 0x1e08f, +0x1e130, 0x1e136, +0x1e2ae, 0x1e2ae, +0x1e2ec, 0x1e2ef, +0x1e4ec, 0x1e4ef, +0x1e5ee, 0x1e5ef, +0x1e8d0, 0x1e8d6, +0x1e944, 0x1e94a, +0xe0100, 0xe01ef, +}; /* END of CR_M */ + +/* PROPERTY: 'Mahajani': Script */ +static const OnigCodePoint +CR_Mahajani[] = { 1, +0x11150, 0x11176, +}; /* END of CR_Mahajani */ + +/* PROPERTY: 'Makasar': Script */ +static const OnigCodePoint +CR_Makasar[] = { 1, +0x11ee0, 0x11ef8, +}; /* END of CR_Makasar */ + +/* PROPERTY: 'Malayalam': Script */ +static const OnigCodePoint +CR_Malayalam[] = { 7, +0x0d00, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d44, +0x0d46, 0x0d48, +0x0d4a, 0x0d4f, +0x0d54, 0x0d63, +0x0d66, 0x0d7f, +}; /* END of CR_Malayalam */ + +/* PROPERTY: 'Mandaic': Script */ +static const OnigCodePoint +CR_Mandaic[] = { 2, +0x0840, 0x085b, +0x085e, 0x085e, +}; /* END of CR_Mandaic */ + +/* PROPERTY: 'Manichaean': Script */ +static const OnigCodePoint +CR_Manichaean[] = { 2, +0x10ac0, 0x10ae6, +0x10aeb, 0x10af6, +}; /* END of CR_Manichaean */ + +/* PROPERTY: 'Marchen': Script */ +static const OnigCodePoint +CR_Marchen[] = { 3, +0x11c70, 0x11c8f, +0x11c92, 0x11ca7, +0x11ca9, 0x11cb6, +}; /* END of CR_Marchen */ + +/* PROPERTY: 'Masaram_Gondi': Script */ +static const OnigCodePoint +CR_Masaram_Gondi[] = { 7, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d47, +0x11d50, 0x11d59, +}; /* END of CR_Masaram_Gondi */ + +/* PROPERTY: 'Math': Derived Property */ +static const OnigCodePoint +CR_Math[] = { 139, +0x002b, 0x002b, +0x003c, 0x003e, +0x005e, 0x005e, +0x007c, 0x007c, +0x007e, 0x007e, +0x00ac, 0x00ac, +0x00b1, 0x00b1, +0x00d7, 0x00d7, +0x00f7, 0x00f7, +0x03d0, 0x03d2, +0x03d5, 0x03d5, +0x03f0, 0x03f1, +0x03f4, 0x03f6, +0x0606, 0x0608, +0x2016, 0x2016, +0x2032, 0x2034, +0x2040, 0x2040, +0x2044, 0x2044, +0x2052, 0x2052, +0x2061, 0x2064, +0x207a, 0x207e, +0x208a, 0x208e, +0x20d0, 0x20dc, +0x20e1, 0x20e1, +0x20e5, 0x20e6, +0x20eb, 0x20ef, +0x2102, 0x2102, +0x2107, 0x2107, +0x210a, 0x2113, +0x2115, 0x2115, +0x2118, 0x211d, +0x2124, 0x2124, +0x2128, 0x2129, +0x212c, 0x212d, +0x212f, 0x2131, +0x2133, 0x2138, +0x213c, 0x2149, +0x214b, 0x214b, +0x2190, 0x21a7, +0x21a9, 0x21ae, +0x21b0, 0x21b1, +0x21b6, 0x21b7, +0x21bc, 0x21db, +0x21dd, 0x21dd, +0x21e4, 0x21e5, +0x21f4, 0x22ff, +0x2308, 0x230b, +0x2320, 0x2321, +0x237c, 0x237c, +0x239b, 0x23b5, +0x23b7, 0x23b7, +0x23d0, 0x23d0, +0x23dc, 0x23e2, +0x25a0, 0x25a1, +0x25ae, 0x25b7, +0x25bc, 0x25c1, +0x25c6, 0x25c7, +0x25ca, 0x25cb, +0x25cf, 0x25d3, +0x25e2, 0x25e2, +0x25e4, 0x25e4, +0x25e7, 0x25ec, +0x25f8, 0x25ff, +0x2605, 0x2606, +0x2640, 0x2640, +0x2642, 0x2642, +0x2660, 0x2663, +0x266d, 0x266f, +0x27c0, 0x27ff, +0x2900, 0x2aff, +0x2b30, 0x2b44, +0x2b47, 0x2b4c, +0xfb29, 0xfb29, +0xfe61, 0xfe66, +0xfe68, 0xfe68, +0xff0b, 0xff0b, +0xff1c, 0xff1e, +0xff3c, 0xff3c, +0xff3e, 0xff3e, +0xff5c, 0xff5c, +0xff5e, 0xff5e, +0xffe2, 0xffe2, +0xffe9, 0xffec, +0x10d8e, 0x10d8f, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d7cb, +0x1d7ce, 0x1d7ff, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x1eef0, 0x1eef1, +}; /* END of CR_Math */ + +/* PROPERTY: 'Mc': General Category */ +static const OnigCodePoint +CR_Mc[] = { 190, +0x0903, 0x0903, +0x093b, 0x093b, +0x093e, 0x0940, +0x0949, 0x094c, +0x094e, 0x094f, +0x0982, 0x0983, +0x09be, 0x09c0, +0x09c7, 0x09c8, +0x09cb, 0x09cc, +0x09d7, 0x09d7, +0x0a03, 0x0a03, +0x0a3e, 0x0a40, +0x0a83, 0x0a83, +0x0abe, 0x0ac0, +0x0ac9, 0x0ac9, +0x0acb, 0x0acc, +0x0b02, 0x0b03, +0x0b3e, 0x0b3e, +0x0b40, 0x0b40, +0x0b47, 0x0b48, +0x0b4b, 0x0b4c, +0x0b57, 0x0b57, +0x0bbe, 0x0bbf, +0x0bc1, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcc, +0x0bd7, 0x0bd7, +0x0c01, 0x0c03, +0x0c41, 0x0c44, +0x0c82, 0x0c83, +0x0cbe, 0x0cbe, +0x0cc0, 0x0cc4, +0x0cc7, 0x0cc8, +0x0cca, 0x0ccb, +0x0cd5, 0x0cd6, +0x0cf3, 0x0cf3, +0x0d02, 0x0d03, +0x0d3e, 0x0d40, +0x0d46, 0x0d48, +0x0d4a, 0x0d4c, +0x0d57, 0x0d57, +0x0d82, 0x0d83, +0x0dcf, 0x0dd1, +0x0dd8, 0x0ddf, +0x0df2, 0x0df3, +0x0f3e, 0x0f3f, +0x0f7f, 0x0f7f, +0x102b, 0x102c, +0x1031, 0x1031, +0x1038, 0x1038, +0x103b, 0x103c, +0x1056, 0x1057, +0x1062, 0x1064, +0x1067, 0x106d, +0x1083, 0x1084, +0x1087, 0x108c, +0x108f, 0x108f, +0x109a, 0x109c, +0x1715, 0x1715, +0x1734, 0x1734, +0x17b6, 0x17b6, +0x17be, 0x17c5, +0x17c7, 0x17c8, +0x1923, 0x1926, +0x1929, 0x192b, +0x1930, 0x1931, +0x1933, 0x1938, +0x1a19, 0x1a1a, +0x1a55, 0x1a55, +0x1a57, 0x1a57, +0x1a61, 0x1a61, +0x1a63, 0x1a64, +0x1a6d, 0x1a72, +0x1b04, 0x1b04, +0x1b35, 0x1b35, +0x1b3b, 0x1b3b, +0x1b3d, 0x1b41, +0x1b43, 0x1b44, +0x1b82, 0x1b82, +0x1ba1, 0x1ba1, +0x1ba6, 0x1ba7, +0x1baa, 0x1baa, +0x1be7, 0x1be7, +0x1bea, 0x1bec, +0x1bee, 0x1bee, +0x1bf2, 0x1bf3, +0x1c24, 0x1c2b, +0x1c34, 0x1c35, +0x1ce1, 0x1ce1, +0x1cf7, 0x1cf7, +0x302e, 0x302f, +0xa823, 0xa824, +0xa827, 0xa827, +0xa880, 0xa881, +0xa8b4, 0xa8c3, +0xa952, 0xa953, +0xa983, 0xa983, +0xa9b4, 0xa9b5, +0xa9ba, 0xa9bb, +0xa9be, 0xa9c0, +0xaa2f, 0xaa30, +0xaa33, 0xaa34, +0xaa4d, 0xaa4d, +0xaa7b, 0xaa7b, +0xaa7d, 0xaa7d, +0xaaeb, 0xaaeb, +0xaaee, 0xaaef, +0xaaf5, 0xaaf5, +0xabe3, 0xabe4, +0xabe6, 0xabe7, +0xabe9, 0xabea, +0xabec, 0xabec, +0x11000, 0x11000, +0x11002, 0x11002, +0x11082, 0x11082, +0x110b0, 0x110b2, +0x110b7, 0x110b8, +0x1112c, 0x1112c, +0x11145, 0x11146, +0x11182, 0x11182, +0x111b3, 0x111b5, +0x111bf, 0x111c0, +0x111ce, 0x111ce, +0x1122c, 0x1122e, +0x11232, 0x11233, +0x11235, 0x11235, +0x112e0, 0x112e2, +0x11302, 0x11303, +0x1133e, 0x1133f, +0x11341, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134d, +0x11357, 0x11357, +0x11362, 0x11363, +0x113b8, 0x113ba, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113cd, +0x113cf, 0x113cf, +0x11435, 0x11437, +0x11440, 0x11441, +0x11445, 0x11445, +0x114b0, 0x114b2, +0x114b9, 0x114b9, +0x114bb, 0x114be, +0x114c1, 0x114c1, +0x115af, 0x115b1, +0x115b8, 0x115bb, +0x115be, 0x115be, +0x11630, 0x11632, +0x1163b, 0x1163c, +0x1163e, 0x1163e, +0x116ac, 0x116ac, +0x116ae, 0x116af, +0x116b6, 0x116b6, +0x1171e, 0x1171e, +0x11720, 0x11721, +0x11726, 0x11726, +0x1182c, 0x1182e, +0x11838, 0x11838, +0x11930, 0x11935, +0x11937, 0x11938, +0x1193d, 0x1193d, +0x11940, 0x11940, +0x11942, 0x11942, +0x119d1, 0x119d3, +0x119dc, 0x119df, +0x119e4, 0x119e4, +0x11a39, 0x11a39, +0x11a57, 0x11a58, +0x11a97, 0x11a97, +0x11c2f, 0x11c2f, +0x11c3e, 0x11c3e, +0x11ca9, 0x11ca9, +0x11cb1, 0x11cb1, +0x11cb4, 0x11cb4, +0x11d8a, 0x11d8e, +0x11d93, 0x11d94, +0x11d96, 0x11d96, +0x11ef5, 0x11ef6, +0x11f03, 0x11f03, +0x11f34, 0x11f35, +0x11f3e, 0x11f3f, +0x11f41, 0x11f41, +0x1612a, 0x1612c, +0x16f51, 0x16f87, +0x16ff0, 0x16ff1, +0x1d165, 0x1d166, +0x1d16d, 0x1d172, +}; /* END of CR_Mc */ + +/* PROPERTY: 'Me': General Category */ +static const OnigCodePoint +CR_Me[] = { 5, +0x0488, 0x0489, +0x1abe, 0x1abe, +0x20dd, 0x20e0, +0x20e2, 0x20e4, +0xa670, 0xa672, +}; /* END of CR_Me */ + +/* PROPERTY: 'Medefaidrin': Script */ +static const OnigCodePoint +CR_Medefaidrin[] = { 1, +0x16e40, 0x16e9a, +}; /* END of CR_Medefaidrin */ + +/* PROPERTY: 'Meetei_Mayek': Script */ +static const OnigCodePoint +CR_Meetei_Mayek[] = { 3, +0xaae0, 0xaaf6, +0xabc0, 0xabed, +0xabf0, 0xabf9, +}; /* END of CR_Meetei_Mayek */ + +/* PROPERTY: 'Mende_Kikakui': Script */ +static const OnigCodePoint +CR_Mende_Kikakui[] = { 2, +0x1e800, 0x1e8c4, +0x1e8c7, 0x1e8d6, +}; /* END of CR_Mende_Kikakui */ + +/* PROPERTY: 'Meroitic_Cursive': Script */ +static const OnigCodePoint +CR_Meroitic_Cursive[] = { 3, +0x109a0, 0x109b7, +0x109bc, 0x109cf, +0x109d2, 0x109ff, +}; /* END of CR_Meroitic_Cursive */ + +/* PROPERTY: 'Meroitic_Hieroglyphs': Script */ +static const OnigCodePoint +CR_Meroitic_Hieroglyphs[] = { 1, +0x10980, 0x1099f, +}; /* END of CR_Meroitic_Hieroglyphs */ + +/* PROPERTY: 'Miao': Script */ +static const OnigCodePoint +CR_Miao[] = { 3, +0x16f00, 0x16f4a, +0x16f4f, 0x16f87, +0x16f8f, 0x16f9f, +}; /* END of CR_Miao */ + +/* PROPERTY: 'Mn': General Category */ +static const OnigCodePoint +CR_Mn[] = { 357, +0x0300, 0x036f, +0x0483, 0x0487, +0x0591, 0x05bd, +0x05bf, 0x05bf, +0x05c1, 0x05c2, +0x05c4, 0x05c5, +0x05c7, 0x05c7, +0x0610, 0x061a, +0x064b, 0x065f, +0x0670, 0x0670, +0x06d6, 0x06dc, +0x06df, 0x06e4, +0x06e7, 0x06e8, +0x06ea, 0x06ed, +0x0711, 0x0711, +0x0730, 0x074a, +0x07a6, 0x07b0, +0x07eb, 0x07f3, +0x07fd, 0x07fd, +0x0816, 0x0819, +0x081b, 0x0823, +0x0825, 0x0827, +0x0829, 0x082d, +0x0859, 0x085b, +0x0897, 0x089f, +0x08ca, 0x08e1, +0x08e3, 0x0902, +0x093a, 0x093a, +0x093c, 0x093c, +0x0941, 0x0948, +0x094d, 0x094d, +0x0951, 0x0957, +0x0962, 0x0963, +0x0981, 0x0981, +0x09bc, 0x09bc, +0x09c1, 0x09c4, +0x09cd, 0x09cd, +0x09e2, 0x09e3, +0x09fe, 0x09fe, +0x0a01, 0x0a02, +0x0a3c, 0x0a3c, +0x0a41, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4d, +0x0a51, 0x0a51, +0x0a70, 0x0a71, +0x0a75, 0x0a75, +0x0a81, 0x0a82, +0x0abc, 0x0abc, +0x0ac1, 0x0ac5, +0x0ac7, 0x0ac8, +0x0acd, 0x0acd, +0x0ae2, 0x0ae3, +0x0afa, 0x0aff, +0x0b01, 0x0b01, +0x0b3c, 0x0b3c, +0x0b3f, 0x0b3f, +0x0b41, 0x0b44, +0x0b4d, 0x0b4d, +0x0b55, 0x0b56, +0x0b62, 0x0b63, +0x0b82, 0x0b82, +0x0bc0, 0x0bc0, +0x0bcd, 0x0bcd, +0x0c00, 0x0c00, +0x0c04, 0x0c04, +0x0c3c, 0x0c3c, +0x0c3e, 0x0c40, +0x0c46, 0x0c48, +0x0c4a, 0x0c4d, +0x0c55, 0x0c56, +0x0c62, 0x0c63, +0x0c81, 0x0c81, +0x0cbc, 0x0cbc, +0x0cbf, 0x0cbf, +0x0cc6, 0x0cc6, +0x0ccc, 0x0ccd, +0x0ce2, 0x0ce3, +0x0d00, 0x0d01, +0x0d3b, 0x0d3c, +0x0d41, 0x0d44, +0x0d4d, 0x0d4d, +0x0d62, 0x0d63, +0x0d81, 0x0d81, +0x0dca, 0x0dca, +0x0dd2, 0x0dd4, +0x0dd6, 0x0dd6, +0x0e31, 0x0e31, +0x0e34, 0x0e3a, +0x0e47, 0x0e4e, +0x0eb1, 0x0eb1, +0x0eb4, 0x0ebc, +0x0ec8, 0x0ece, +0x0f18, 0x0f19, +0x0f35, 0x0f35, +0x0f37, 0x0f37, +0x0f39, 0x0f39, +0x0f71, 0x0f7e, +0x0f80, 0x0f84, +0x0f86, 0x0f87, +0x0f8d, 0x0f97, +0x0f99, 0x0fbc, +0x0fc6, 0x0fc6, +0x102d, 0x1030, +0x1032, 0x1037, +0x1039, 0x103a, +0x103d, 0x103e, +0x1058, 0x1059, +0x105e, 0x1060, +0x1071, 0x1074, +0x1082, 0x1082, +0x1085, 0x1086, +0x108d, 0x108d, +0x109d, 0x109d, +0x135d, 0x135f, +0x1712, 0x1714, +0x1732, 0x1733, +0x1752, 0x1753, +0x1772, 0x1773, +0x17b4, 0x17b5, +0x17b7, 0x17bd, +0x17c6, 0x17c6, +0x17c9, 0x17d3, +0x17dd, 0x17dd, +0x180b, 0x180d, +0x180f, 0x180f, +0x1885, 0x1886, +0x18a9, 0x18a9, +0x1920, 0x1922, +0x1927, 0x1928, +0x1932, 0x1932, +0x1939, 0x193b, +0x1a17, 0x1a18, +0x1a1b, 0x1a1b, +0x1a56, 0x1a56, +0x1a58, 0x1a5e, +0x1a60, 0x1a60, +0x1a62, 0x1a62, +0x1a65, 0x1a6c, +0x1a73, 0x1a7c, +0x1a7f, 0x1a7f, +0x1ab0, 0x1abd, +0x1abf, 0x1ace, +0x1b00, 0x1b03, +0x1b34, 0x1b34, +0x1b36, 0x1b3a, +0x1b3c, 0x1b3c, +0x1b42, 0x1b42, +0x1b6b, 0x1b73, +0x1b80, 0x1b81, +0x1ba2, 0x1ba5, +0x1ba8, 0x1ba9, +0x1bab, 0x1bad, +0x1be6, 0x1be6, +0x1be8, 0x1be9, +0x1bed, 0x1bed, +0x1bef, 0x1bf1, +0x1c2c, 0x1c33, +0x1c36, 0x1c37, +0x1cd0, 0x1cd2, +0x1cd4, 0x1ce0, +0x1ce2, 0x1ce8, +0x1ced, 0x1ced, +0x1cf4, 0x1cf4, +0x1cf8, 0x1cf9, +0x1dc0, 0x1dff, +0x20d0, 0x20dc, +0x20e1, 0x20e1, +0x20e5, 0x20f0, +0x2cef, 0x2cf1, +0x2d7f, 0x2d7f, +0x2de0, 0x2dff, +0x302a, 0x302d, +0x3099, 0x309a, +0xa66f, 0xa66f, +0xa674, 0xa67d, +0xa69e, 0xa69f, +0xa6f0, 0xa6f1, +0xa802, 0xa802, +0xa806, 0xa806, +0xa80b, 0xa80b, +0xa825, 0xa826, +0xa82c, 0xa82c, +0xa8c4, 0xa8c5, +0xa8e0, 0xa8f1, +0xa8ff, 0xa8ff, +0xa926, 0xa92d, +0xa947, 0xa951, +0xa980, 0xa982, +0xa9b3, 0xa9b3, +0xa9b6, 0xa9b9, +0xa9bc, 0xa9bd, +0xa9e5, 0xa9e5, +0xaa29, 0xaa2e, +0xaa31, 0xaa32, +0xaa35, 0xaa36, +0xaa43, 0xaa43, +0xaa4c, 0xaa4c, +0xaa7c, 0xaa7c, +0xaab0, 0xaab0, +0xaab2, 0xaab4, +0xaab7, 0xaab8, +0xaabe, 0xaabf, +0xaac1, 0xaac1, +0xaaec, 0xaaed, +0xaaf6, 0xaaf6, +0xabe5, 0xabe5, +0xabe8, 0xabe8, +0xabed, 0xabed, +0xfb1e, 0xfb1e, +0xfe00, 0xfe0f, +0xfe20, 0xfe2f, +0x101fd, 0x101fd, +0x102e0, 0x102e0, +0x10376, 0x1037a, +0x10a01, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a0f, +0x10a38, 0x10a3a, +0x10a3f, 0x10a3f, +0x10ae5, 0x10ae6, +0x10d24, 0x10d27, +0x10d69, 0x10d6d, +0x10eab, 0x10eac, +0x10efc, 0x10eff, +0x10f46, 0x10f50, +0x10f82, 0x10f85, +0x11001, 0x11001, +0x11038, 0x11046, +0x11070, 0x11070, +0x11073, 0x11074, +0x1107f, 0x11081, +0x110b3, 0x110b6, +0x110b9, 0x110ba, +0x110c2, 0x110c2, +0x11100, 0x11102, +0x11127, 0x1112b, +0x1112d, 0x11134, +0x11173, 0x11173, +0x11180, 0x11181, +0x111b6, 0x111be, +0x111c9, 0x111cc, +0x111cf, 0x111cf, +0x1122f, 0x11231, +0x11234, 0x11234, +0x11236, 0x11237, +0x1123e, 0x1123e, +0x11241, 0x11241, +0x112df, 0x112df, +0x112e3, 0x112ea, +0x11300, 0x11301, +0x1133b, 0x1133c, +0x11340, 0x11340, +0x11366, 0x1136c, +0x11370, 0x11374, +0x113bb, 0x113c0, +0x113ce, 0x113ce, +0x113d0, 0x113d0, +0x113d2, 0x113d2, +0x113e1, 0x113e2, +0x11438, 0x1143f, +0x11442, 0x11444, +0x11446, 0x11446, +0x1145e, 0x1145e, +0x114b3, 0x114b8, +0x114ba, 0x114ba, +0x114bf, 0x114c0, +0x114c2, 0x114c3, +0x115b2, 0x115b5, +0x115bc, 0x115bd, +0x115bf, 0x115c0, +0x115dc, 0x115dd, +0x11633, 0x1163a, +0x1163d, 0x1163d, +0x1163f, 0x11640, +0x116ab, 0x116ab, +0x116ad, 0x116ad, +0x116b0, 0x116b5, +0x116b7, 0x116b7, +0x1171d, 0x1171d, +0x1171f, 0x1171f, +0x11722, 0x11725, +0x11727, 0x1172b, +0x1182f, 0x11837, +0x11839, 0x1183a, +0x1193b, 0x1193c, +0x1193e, 0x1193e, +0x11943, 0x11943, +0x119d4, 0x119d7, +0x119da, 0x119db, +0x119e0, 0x119e0, +0x11a01, 0x11a0a, +0x11a33, 0x11a38, +0x11a3b, 0x11a3e, +0x11a47, 0x11a47, +0x11a51, 0x11a56, +0x11a59, 0x11a5b, +0x11a8a, 0x11a96, +0x11a98, 0x11a99, +0x11c30, 0x11c36, +0x11c38, 0x11c3d, +0x11c3f, 0x11c3f, +0x11c92, 0x11ca7, +0x11caa, 0x11cb0, +0x11cb2, 0x11cb3, +0x11cb5, 0x11cb6, +0x11d31, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d45, +0x11d47, 0x11d47, +0x11d90, 0x11d91, +0x11d95, 0x11d95, +0x11d97, 0x11d97, +0x11ef3, 0x11ef4, +0x11f00, 0x11f01, +0x11f36, 0x11f3a, +0x11f40, 0x11f40, +0x11f42, 0x11f42, +0x11f5a, 0x11f5a, +0x13440, 0x13440, +0x13447, 0x13455, +0x1611e, 0x16129, +0x1612d, 0x1612f, +0x16af0, 0x16af4, +0x16b30, 0x16b36, +0x16f4f, 0x16f4f, +0x16f8f, 0x16f92, +0x16fe4, 0x16fe4, +0x1bc9d, 0x1bc9e, +0x1cf00, 0x1cf2d, +0x1cf30, 0x1cf46, +0x1d167, 0x1d169, +0x1d17b, 0x1d182, +0x1d185, 0x1d18b, +0x1d1aa, 0x1d1ad, +0x1d242, 0x1d244, +0x1da00, 0x1da36, +0x1da3b, 0x1da6c, +0x1da75, 0x1da75, +0x1da84, 0x1da84, +0x1da9b, 0x1da9f, +0x1daa1, 0x1daaf, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e08f, 0x1e08f, +0x1e130, 0x1e136, +0x1e2ae, 0x1e2ae, +0x1e2ec, 0x1e2ef, +0x1e4ec, 0x1e4ef, +0x1e5ee, 0x1e5ef, +0x1e8d0, 0x1e8d6, +0x1e944, 0x1e94a, +0xe0100, 0xe01ef, +}; /* END of CR_Mn */ + +/* PROPERTY: 'Modi': Script */ +static const OnigCodePoint +CR_Modi[] = { 2, +0x11600, 0x11644, +0x11650, 0x11659, +}; /* END of CR_Modi */ + +/* PROPERTY: 'Modifier_Combining_Mark': Binary Property */ +static const OnigCodePoint +CR_Modifier_Combining_Mark[] = { 9, +0x0654, 0x0655, +0x0658, 0x0658, +0x06dc, 0x06dc, +0x06e3, 0x06e3, +0x06e7, 0x06e8, +0x08ca, 0x08cb, +0x08cd, 0x08cf, +0x08d3, 0x08d3, +0x08f3, 0x08f3, +}; /* END of CR_Modifier_Combining_Mark */ + +/* PROPERTY: 'Mongolian': Script */ +static const OnigCodePoint +CR_Mongolian[] = { 6, +0x1800, 0x1801, +0x1804, 0x1804, +0x1806, 0x1819, +0x1820, 0x1878, +0x1880, 0x18aa, +0x11660, 0x1166c, +}; /* END of CR_Mongolian */ + +/* PROPERTY: 'Mro': Script */ +static const OnigCodePoint +CR_Mro[] = { 3, +0x16a40, 0x16a5e, +0x16a60, 0x16a69, +0x16a6e, 0x16a6f, +}; /* END of CR_Mro */ + +/* PROPERTY: 'Multani': Script */ +static const OnigCodePoint +CR_Multani[] = { 5, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a9, +}; /* END of CR_Multani */ + +/* PROPERTY: 'Myanmar': Script */ +static const OnigCodePoint +CR_Myanmar[] = { 4, +0x1000, 0x109f, +0xa9e0, 0xa9fe, +0xaa60, 0xaa7f, +0x116d0, 0x116e3, +}; /* END of CR_Myanmar */ + +/* PROPERTY: 'N': Major Category */ +static const OnigCodePoint +CR_N[] = { 144, +0x0030, 0x0039, +0x00b2, 0x00b3, +0x00b9, 0x00b9, +0x00bc, 0x00be, +0x0660, 0x0669, +0x06f0, 0x06f9, +0x07c0, 0x07c9, +0x0966, 0x096f, +0x09e6, 0x09ef, +0x09f4, 0x09f9, +0x0a66, 0x0a6f, +0x0ae6, 0x0aef, +0x0b66, 0x0b6f, +0x0b72, 0x0b77, +0x0be6, 0x0bf2, +0x0c66, 0x0c6f, +0x0c78, 0x0c7e, +0x0ce6, 0x0cef, +0x0d58, 0x0d5e, +0x0d66, 0x0d78, +0x0de6, 0x0def, +0x0e50, 0x0e59, +0x0ed0, 0x0ed9, +0x0f20, 0x0f33, +0x1040, 0x1049, +0x1090, 0x1099, +0x1369, 0x137c, +0x16ee, 0x16f0, +0x17e0, 0x17e9, +0x17f0, 0x17f9, +0x1810, 0x1819, +0x1946, 0x194f, +0x19d0, 0x19da, +0x1a80, 0x1a89, +0x1a90, 0x1a99, +0x1b50, 0x1b59, +0x1bb0, 0x1bb9, +0x1c40, 0x1c49, +0x1c50, 0x1c59, +0x2070, 0x2070, +0x2074, 0x2079, +0x2080, 0x2089, +0x2150, 0x2182, +0x2185, 0x2189, +0x2460, 0x249b, +0x24ea, 0x24ff, +0x2776, 0x2793, +0x2cfd, 0x2cfd, +0x3007, 0x3007, +0x3021, 0x3029, +0x3038, 0x303a, +0x3192, 0x3195, +0x3220, 0x3229, +0x3248, 0x324f, +0x3251, 0x325f, +0x3280, 0x3289, +0x32b1, 0x32bf, +0xa620, 0xa629, +0xa6e6, 0xa6ef, +0xa830, 0xa835, +0xa8d0, 0xa8d9, +0xa900, 0xa909, +0xa9d0, 0xa9d9, +0xa9f0, 0xa9f9, +0xaa50, 0xaa59, +0xabf0, 0xabf9, +0xff10, 0xff19, +0x10107, 0x10133, +0x10140, 0x10178, +0x1018a, 0x1018b, +0x102e1, 0x102fb, +0x10320, 0x10323, +0x10341, 0x10341, +0x1034a, 0x1034a, +0x103d1, 0x103d5, +0x104a0, 0x104a9, +0x10858, 0x1085f, +0x10879, 0x1087f, +0x108a7, 0x108af, +0x108fb, 0x108ff, +0x10916, 0x1091b, +0x109bc, 0x109bd, +0x109c0, 0x109cf, +0x109d2, 0x109ff, +0x10a40, 0x10a48, +0x10a7d, 0x10a7e, +0x10a9d, 0x10a9f, +0x10aeb, 0x10aef, +0x10b58, 0x10b5f, +0x10b78, 0x10b7f, +0x10ba9, 0x10baf, +0x10cfa, 0x10cff, +0x10d30, 0x10d39, +0x10d40, 0x10d49, +0x10e60, 0x10e7e, +0x10f1d, 0x10f26, +0x10f51, 0x10f54, +0x10fc5, 0x10fcb, +0x11052, 0x1106f, +0x110f0, 0x110f9, +0x11136, 0x1113f, +0x111d0, 0x111d9, +0x111e1, 0x111f4, +0x112f0, 0x112f9, +0x11450, 0x11459, +0x114d0, 0x114d9, +0x11650, 0x11659, +0x116c0, 0x116c9, +0x116d0, 0x116e3, +0x11730, 0x1173b, +0x118e0, 0x118f2, +0x11950, 0x11959, +0x11bf0, 0x11bf9, +0x11c50, 0x11c6c, +0x11d50, 0x11d59, +0x11da0, 0x11da9, +0x11f50, 0x11f59, +0x11fc0, 0x11fd4, +0x12400, 0x1246e, +0x16130, 0x16139, +0x16a60, 0x16a69, +0x16ac0, 0x16ac9, +0x16b50, 0x16b59, +0x16b5b, 0x16b61, +0x16d70, 0x16d79, +0x16e80, 0x16e96, +0x1ccf0, 0x1ccf9, +0x1d2c0, 0x1d2d3, +0x1d2e0, 0x1d2f3, +0x1d360, 0x1d378, +0x1d7ce, 0x1d7ff, +0x1e140, 0x1e149, +0x1e2f0, 0x1e2f9, +0x1e4f0, 0x1e4f9, +0x1e5f1, 0x1e5fa, +0x1e8c7, 0x1e8cf, +0x1e950, 0x1e959, +0x1ec71, 0x1ecab, +0x1ecad, 0x1ecaf, +0x1ecb1, 0x1ecb4, +0x1ed01, 0x1ed2d, +0x1ed2f, 0x1ed3d, +0x1f100, 0x1f10c, +0x1fbf0, 0x1fbf9, +}; /* END of CR_N */ + +/* PROPERTY: 'Nabataean': Script */ +static const OnigCodePoint +CR_Nabataean[] = { 2, +0x10880, 0x1089e, +0x108a7, 0x108af, +}; /* END of CR_Nabataean */ + +/* PROPERTY: 'Nag_Mundari': Script */ +static const OnigCodePoint +CR_Nag_Mundari[] = { 1, +0x1e4d0, 0x1e4f9, +}; /* END of CR_Nag_Mundari */ + +/* PROPERTY: 'Nandinagari': Script */ +static const OnigCodePoint +CR_Nandinagari[] = { 3, +0x119a0, 0x119a7, +0x119aa, 0x119d7, +0x119da, 0x119e4, +}; /* END of CR_Nandinagari */ + +/* PROPERTY: 'Nd': General Category */ +#define CR_Nd CR_Digit + +/* PROPERTY: 'New_Tai_Lue': Script */ +static const OnigCodePoint +CR_New_Tai_Lue[] = { 4, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x19d0, 0x19da, +0x19de, 0x19df, +}; /* END of CR_New_Tai_Lue */ + +/* PROPERTY: 'Newa': Script */ +static const OnigCodePoint +CR_Newa[] = { 2, +0x11400, 0x1145b, +0x1145d, 0x11461, +}; /* END of CR_Newa */ + +/* PROPERTY: 'Nko': Script */ +static const OnigCodePoint +CR_Nko[] = { 2, +0x07c0, 0x07fa, +0x07fd, 0x07ff, +}; /* END of CR_Nko */ + +/* PROPERTY: 'Nl': General Category */ +static const OnigCodePoint +CR_Nl[] = { 12, +0x16ee, 0x16f0, +0x2160, 0x2182, +0x2185, 0x2188, +0x3007, 0x3007, +0x3021, 0x3029, +0x3038, 0x303a, +0xa6e6, 0xa6ef, +0x10140, 0x10174, +0x10341, 0x10341, +0x1034a, 0x1034a, +0x103d1, 0x103d5, +0x12400, 0x1246e, +}; /* END of CR_Nl */ + +/* PROPERTY: 'No': General Category */ +static const OnigCodePoint +CR_No[] = { 72, +0x00b2, 0x00b3, +0x00b9, 0x00b9, +0x00bc, 0x00be, +0x09f4, 0x09f9, +0x0b72, 0x0b77, +0x0bf0, 0x0bf2, +0x0c78, 0x0c7e, +0x0d58, 0x0d5e, +0x0d70, 0x0d78, +0x0f2a, 0x0f33, +0x1369, 0x137c, +0x17f0, 0x17f9, +0x19da, 0x19da, +0x2070, 0x2070, +0x2074, 0x2079, +0x2080, 0x2089, +0x2150, 0x215f, +0x2189, 0x2189, +0x2460, 0x249b, +0x24ea, 0x24ff, +0x2776, 0x2793, +0x2cfd, 0x2cfd, +0x3192, 0x3195, +0x3220, 0x3229, +0x3248, 0x324f, +0x3251, 0x325f, +0x3280, 0x3289, +0x32b1, 0x32bf, +0xa830, 0xa835, +0x10107, 0x10133, +0x10175, 0x10178, +0x1018a, 0x1018b, +0x102e1, 0x102fb, +0x10320, 0x10323, +0x10858, 0x1085f, +0x10879, 0x1087f, +0x108a7, 0x108af, +0x108fb, 0x108ff, +0x10916, 0x1091b, +0x109bc, 0x109bd, +0x109c0, 0x109cf, +0x109d2, 0x109ff, +0x10a40, 0x10a48, +0x10a7d, 0x10a7e, +0x10a9d, 0x10a9f, +0x10aeb, 0x10aef, +0x10b58, 0x10b5f, +0x10b78, 0x10b7f, +0x10ba9, 0x10baf, +0x10cfa, 0x10cff, +0x10e60, 0x10e7e, +0x10f1d, 0x10f26, +0x10f51, 0x10f54, +0x10fc5, 0x10fcb, +0x11052, 0x11065, +0x111e1, 0x111f4, +0x1173a, 0x1173b, +0x118ea, 0x118f2, +0x11c5a, 0x11c6c, +0x11fc0, 0x11fd4, +0x16b5b, 0x16b61, +0x16e80, 0x16e96, +0x1d2c0, 0x1d2d3, +0x1d2e0, 0x1d2f3, +0x1d360, 0x1d378, +0x1e8c7, 0x1e8cf, +0x1ec71, 0x1ecab, +0x1ecad, 0x1ecaf, +0x1ecb1, 0x1ecb4, +0x1ed01, 0x1ed2d, +0x1ed2f, 0x1ed3d, +0x1f100, 0x1f10c, +}; /* END of CR_No */ + +/* PROPERTY: 'Noncharacter_Code_Point': Binary Property */ +static const OnigCodePoint +CR_Noncharacter_Code_Point[] = { 18, +0xfdd0, 0xfdef, +0xfffe, 0xffff, +0x1fffe, 0x1ffff, +0x2fffe, 0x2ffff, +0x3fffe, 0x3ffff, +0x4fffe, 0x4ffff, +0x5fffe, 0x5ffff, +0x6fffe, 0x6ffff, +0x7fffe, 0x7ffff, +0x8fffe, 0x8ffff, +0x9fffe, 0x9ffff, +0xafffe, 0xaffff, +0xbfffe, 0xbffff, +0xcfffe, 0xcffff, +0xdfffe, 0xdffff, +0xefffe, 0xeffff, +0xffffe, 0xfffff, +0x10fffe, 0x10ffff, +}; /* END of CR_Noncharacter_Code_Point */ + +/* PROPERTY: 'Nushu': Script */ +static const OnigCodePoint +CR_Nushu[] = { 2, +0x16fe1, 0x16fe1, +0x1b170, 0x1b2fb, +}; /* END of CR_Nushu */ + +/* PROPERTY: 'Nyiakeng_Puachue_Hmong': Script */ +static const OnigCodePoint +CR_Nyiakeng_Puachue_Hmong[] = { 4, +0x1e100, 0x1e12c, +0x1e130, 0x1e13d, +0x1e140, 0x1e149, +0x1e14e, 0x1e14f, +}; /* END of CR_Nyiakeng_Puachue_Hmong */ + +/* PROPERTY: 'Ogham': Script */ +static const OnigCodePoint +CR_Ogham[] = { 1, +0x1680, 0x169c, +}; /* END of CR_Ogham */ + +/* PROPERTY: 'Ol_Chiki': Script */ +static const OnigCodePoint +CR_Ol_Chiki[] = { 1, +0x1c50, 0x1c7f, +}; /* END of CR_Ol_Chiki */ + +/* PROPERTY: 'Ol_Onal': Script */ +static const OnigCodePoint +CR_Ol_Onal[] = { 2, +0x1e5d0, 0x1e5fa, +0x1e5ff, 0x1e5ff, +}; /* END of CR_Ol_Onal */ + +/* PROPERTY: 'Old_Hungarian': Script */ +static const OnigCodePoint +CR_Old_Hungarian[] = { 3, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10cfa, 0x10cff, +}; /* END of CR_Old_Hungarian */ + +/* PROPERTY: 'Old_Italic': Script */ +static const OnigCodePoint +CR_Old_Italic[] = { 2, +0x10300, 0x10323, +0x1032d, 0x1032f, +}; /* END of CR_Old_Italic */ + +/* PROPERTY: 'Old_North_Arabian': Script */ +static const OnigCodePoint +CR_Old_North_Arabian[] = { 1, +0x10a80, 0x10a9f, +}; /* END of CR_Old_North_Arabian */ + +/* PROPERTY: 'Old_Permic': Script */ +static const OnigCodePoint +CR_Old_Permic[] = { 1, +0x10350, 0x1037a, +}; /* END of CR_Old_Permic */ + +/* PROPERTY: 'Old_Persian': Script */ +static const OnigCodePoint +CR_Old_Persian[] = { 2, +0x103a0, 0x103c3, +0x103c8, 0x103d5, +}; /* END of CR_Old_Persian */ + +/* PROPERTY: 'Old_Sogdian': Script */ +static const OnigCodePoint +CR_Old_Sogdian[] = { 1, +0x10f00, 0x10f27, +}; /* END of CR_Old_Sogdian */ + +/* PROPERTY: 'Old_South_Arabian': Script */ +static const OnigCodePoint +CR_Old_South_Arabian[] = { 1, +0x10a60, 0x10a7f, +}; /* END of CR_Old_South_Arabian */ + +/* PROPERTY: 'Old_Turkic': Script */ +static const OnigCodePoint +CR_Old_Turkic[] = { 1, +0x10c00, 0x10c48, +}; /* END of CR_Old_Turkic */ + +/* PROPERTY: 'Old_Uyghur': Script */ +static const OnigCodePoint +CR_Old_Uyghur[] = { 1, +0x10f70, 0x10f89, +}; /* END of CR_Old_Uyghur */ + +/* PROPERTY: 'Oriya': Script */ +static const OnigCodePoint +CR_Oriya[] = { 14, +0x0b01, 0x0b03, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3c, 0x0b44, +0x0b47, 0x0b48, +0x0b4b, 0x0b4d, +0x0b55, 0x0b57, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b63, +0x0b66, 0x0b77, +}; /* END of CR_Oriya */ + +/* PROPERTY: 'Osage': Script */ +static const OnigCodePoint +CR_Osage[] = { 2, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +}; /* END of CR_Osage */ + +/* PROPERTY: 'Osmanya': Script */ +static const OnigCodePoint +CR_Osmanya[] = { 2, +0x10480, 0x1049d, +0x104a0, 0x104a9, +}; /* END of CR_Osmanya */ + +/* PROPERTY: 'Other_Alphabetic': Binary Property */ +static const OnigCodePoint +CR_Other_Alphabetic[] = { 250, +0x0345, 0x0345, +0x0363, 0x036f, +0x05b0, 0x05bd, +0x05bf, 0x05bf, +0x05c1, 0x05c2, +0x05c4, 0x05c5, +0x05c7, 0x05c7, +0x0610, 0x061a, +0x064b, 0x0657, +0x0659, 0x065f, +0x0670, 0x0670, +0x06d6, 0x06dc, +0x06e1, 0x06e4, +0x06e7, 0x06e8, +0x06ed, 0x06ed, +0x0711, 0x0711, +0x0730, 0x073f, +0x07a6, 0x07b0, +0x0816, 0x0817, +0x081b, 0x0823, +0x0825, 0x0827, +0x0829, 0x082c, +0x0897, 0x0897, +0x08d4, 0x08df, +0x08e3, 0x08e9, +0x08f0, 0x0903, +0x093a, 0x093b, +0x093e, 0x094c, +0x094e, 0x094f, +0x0955, 0x0957, +0x0962, 0x0963, +0x0981, 0x0983, +0x09be, 0x09c4, +0x09c7, 0x09c8, +0x09cb, 0x09cc, +0x09d7, 0x09d7, +0x09e2, 0x09e3, +0x0a01, 0x0a03, +0x0a3e, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4c, +0x0a51, 0x0a51, +0x0a70, 0x0a71, +0x0a75, 0x0a75, +0x0a81, 0x0a83, +0x0abe, 0x0ac5, +0x0ac7, 0x0ac9, +0x0acb, 0x0acc, +0x0ae2, 0x0ae3, +0x0afa, 0x0afc, +0x0b01, 0x0b03, +0x0b3e, 0x0b44, +0x0b47, 0x0b48, +0x0b4b, 0x0b4c, +0x0b56, 0x0b57, +0x0b62, 0x0b63, +0x0b82, 0x0b82, +0x0bbe, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcc, +0x0bd7, 0x0bd7, +0x0c00, 0x0c04, +0x0c3e, 0x0c44, +0x0c46, 0x0c48, +0x0c4a, 0x0c4c, +0x0c55, 0x0c56, +0x0c62, 0x0c63, +0x0c81, 0x0c83, +0x0cbe, 0x0cc4, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccc, +0x0cd5, 0x0cd6, +0x0ce2, 0x0ce3, +0x0cf3, 0x0cf3, +0x0d00, 0x0d03, +0x0d3e, 0x0d44, +0x0d46, 0x0d48, +0x0d4a, 0x0d4c, +0x0d57, 0x0d57, +0x0d62, 0x0d63, +0x0d81, 0x0d83, +0x0dcf, 0x0dd4, +0x0dd6, 0x0dd6, +0x0dd8, 0x0ddf, +0x0df2, 0x0df3, +0x0e31, 0x0e31, +0x0e34, 0x0e3a, +0x0e4d, 0x0e4d, +0x0eb1, 0x0eb1, +0x0eb4, 0x0eb9, +0x0ebb, 0x0ebc, +0x0ecd, 0x0ecd, +0x0f71, 0x0f83, +0x0f8d, 0x0f97, +0x0f99, 0x0fbc, +0x102b, 0x1036, +0x1038, 0x1038, +0x103b, 0x103e, +0x1056, 0x1059, +0x105e, 0x1060, +0x1062, 0x1064, +0x1067, 0x106d, +0x1071, 0x1074, +0x1082, 0x108d, +0x108f, 0x108f, +0x109a, 0x109d, +0x1712, 0x1713, +0x1732, 0x1733, +0x1752, 0x1753, +0x1772, 0x1773, +0x17b6, 0x17c8, +0x1885, 0x1886, +0x18a9, 0x18a9, +0x1920, 0x192b, +0x1930, 0x1938, +0x1a17, 0x1a1b, +0x1a55, 0x1a5e, +0x1a61, 0x1a74, +0x1abf, 0x1ac0, +0x1acc, 0x1ace, +0x1b00, 0x1b04, +0x1b35, 0x1b43, +0x1b80, 0x1b82, +0x1ba1, 0x1ba9, +0x1bac, 0x1bad, +0x1be7, 0x1bf1, +0x1c24, 0x1c36, +0x1dd3, 0x1df4, +0x24b6, 0x24e9, +0x2de0, 0x2dff, +0xa674, 0xa67b, +0xa69e, 0xa69f, +0xa802, 0xa802, +0xa80b, 0xa80b, +0xa823, 0xa827, +0xa880, 0xa881, +0xa8b4, 0xa8c3, +0xa8c5, 0xa8c5, +0xa8ff, 0xa8ff, +0xa926, 0xa92a, +0xa947, 0xa952, +0xa980, 0xa983, +0xa9b4, 0xa9bf, +0xa9e5, 0xa9e5, +0xaa29, 0xaa36, +0xaa43, 0xaa43, +0xaa4c, 0xaa4d, +0xaa7b, 0xaa7d, +0xaab0, 0xaab0, +0xaab2, 0xaab4, +0xaab7, 0xaab8, +0xaabe, 0xaabe, +0xaaeb, 0xaaef, +0xaaf5, 0xaaf5, +0xabe3, 0xabea, +0xfb1e, 0xfb1e, +0x10376, 0x1037a, +0x10a01, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a0f, +0x10d24, 0x10d27, +0x10d69, 0x10d69, +0x10eab, 0x10eac, +0x10efc, 0x10efc, +0x11000, 0x11002, +0x11038, 0x11045, +0x11073, 0x11074, +0x11080, 0x11082, +0x110b0, 0x110b8, +0x110c2, 0x110c2, +0x11100, 0x11102, +0x11127, 0x11132, +0x11145, 0x11146, +0x11180, 0x11182, +0x111b3, 0x111bf, +0x111ce, 0x111cf, +0x1122c, 0x11234, +0x11237, 0x11237, +0x1123e, 0x1123e, +0x11241, 0x11241, +0x112df, 0x112e8, +0x11300, 0x11303, +0x1133e, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134c, +0x11357, 0x11357, +0x11362, 0x11363, +0x113b8, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113cd, +0x11435, 0x11441, +0x11443, 0x11445, +0x114b0, 0x114c1, +0x115af, 0x115b5, +0x115b8, 0x115be, +0x115dc, 0x115dd, +0x11630, 0x1163e, +0x11640, 0x11640, +0x116ab, 0x116b5, +0x1171d, 0x1172a, +0x1182c, 0x11838, +0x11930, 0x11935, +0x11937, 0x11938, +0x1193b, 0x1193c, +0x11940, 0x11940, +0x11942, 0x11942, +0x119d1, 0x119d7, +0x119da, 0x119df, +0x119e4, 0x119e4, +0x11a01, 0x11a0a, +0x11a35, 0x11a39, +0x11a3b, 0x11a3e, +0x11a51, 0x11a5b, +0x11a8a, 0x11a97, +0x11c2f, 0x11c36, +0x11c38, 0x11c3e, +0x11c92, 0x11ca7, +0x11ca9, 0x11cb6, +0x11d31, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d41, +0x11d43, 0x11d43, +0x11d47, 0x11d47, +0x11d8a, 0x11d8e, +0x11d90, 0x11d91, +0x11d93, 0x11d96, +0x11ef3, 0x11ef6, +0x11f00, 0x11f01, +0x11f03, 0x11f03, +0x11f34, 0x11f3a, +0x11f3e, 0x11f40, +0x1611e, 0x1612e, +0x16f4f, 0x16f4f, +0x16f51, 0x16f87, +0x16f8f, 0x16f92, +0x16ff0, 0x16ff1, +0x1bc9e, 0x1bc9e, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e08f, 0x1e08f, +0x1e947, 0x1e947, +0x1f130, 0x1f149, +0x1f150, 0x1f169, +0x1f170, 0x1f189, +}; /* END of CR_Other_Alphabetic */ + +/* PROPERTY: 'Other_Default_Ignorable_Code_Point': Binary Property */ +static const OnigCodePoint +CR_Other_Default_Ignorable_Code_Point[] = { 11, +0x034f, 0x034f, +0x115f, 0x1160, +0x17b4, 0x17b5, +0x2065, 0x2065, +0x3164, 0x3164, +0xffa0, 0xffa0, +0xfff0, 0xfff8, +0xe0000, 0xe0000, +0xe0002, 0xe001f, +0xe0080, 0xe00ff, +0xe01f0, 0xe0fff, +}; /* END of CR_Other_Default_Ignorable_Code_Point */ + +/* PROPERTY: 'Other_Grapheme_Extend': Binary Property */ +static const OnigCodePoint +CR_Other_Grapheme_Extend[] = { 49, +0x09be, 0x09be, +0x09d7, 0x09d7, +0x0b3e, 0x0b3e, +0x0b57, 0x0b57, +0x0bbe, 0x0bbe, +0x0bd7, 0x0bd7, +0x0cc0, 0x0cc0, +0x0cc2, 0x0cc2, +0x0cc7, 0x0cc8, +0x0cca, 0x0ccb, +0x0cd5, 0x0cd6, +0x0d3e, 0x0d3e, +0x0d57, 0x0d57, +0x0dcf, 0x0dcf, +0x0ddf, 0x0ddf, +0x1715, 0x1715, +0x1734, 0x1734, +0x1b35, 0x1b35, +0x1b3b, 0x1b3b, +0x1b3d, 0x1b3d, +0x1b43, 0x1b44, +0x1baa, 0x1baa, +0x1bf2, 0x1bf3, +0x200c, 0x200c, +0x302e, 0x302f, +0xa953, 0xa953, +0xa9c0, 0xa9c0, +0xff9e, 0xff9f, +0x111c0, 0x111c0, +0x11235, 0x11235, +0x1133e, 0x1133e, +0x1134d, 0x1134d, +0x11357, 0x11357, +0x113b8, 0x113b8, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113c9, +0x113cf, 0x113cf, +0x114b0, 0x114b0, +0x114bd, 0x114bd, +0x115af, 0x115af, +0x116b6, 0x116b6, +0x11930, 0x11930, +0x1193d, 0x1193d, +0x11f41, 0x11f41, +0x16ff0, 0x16ff1, +0x1d165, 0x1d166, +0x1d16d, 0x1d172, +0xe0020, 0xe007f, +}; /* END of CR_Other_Grapheme_Extend */ + +/* PROPERTY: 'Other_ID_Continue': Binary Property */ +static const OnigCodePoint +CR_Other_ID_Continue[] = { 7, +0x00b7, 0x00b7, +0x0387, 0x0387, +0x1369, 0x1371, +0x19da, 0x19da, +0x200c, 0x200d, +0x30fb, 0x30fb, +0xff65, 0xff65, +}; /* END of CR_Other_ID_Continue */ + +/* PROPERTY: 'Other_ID_Start': Binary Property */ +static const OnigCodePoint +CR_Other_ID_Start[] = { 4, +0x1885, 0x1886, +0x2118, 0x2118, +0x212e, 0x212e, +0x309b, 0x309c, +}; /* END of CR_Other_ID_Start */ + +/* PROPERTY: 'Other_Lowercase': Binary Property */ +static const OnigCodePoint +CR_Other_Lowercase[] = { 28, +0x00aa, 0x00aa, +0x00ba, 0x00ba, +0x02b0, 0x02b8, +0x02c0, 0x02c1, +0x02e0, 0x02e4, +0x0345, 0x0345, +0x037a, 0x037a, +0x10fc, 0x10fc, +0x1d2c, 0x1d6a, +0x1d78, 0x1d78, +0x1d9b, 0x1dbf, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x2170, 0x217f, +0x24d0, 0x24e9, +0x2c7c, 0x2c7d, +0xa69c, 0xa69d, +0xa770, 0xa770, +0xa7f2, 0xa7f4, +0xa7f8, 0xa7f9, +0xab5c, 0xab5f, +0xab69, 0xab69, +0x10780, 0x10780, +0x10783, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x1e030, 0x1e06d, +}; /* END of CR_Other_Lowercase */ + +/* PROPERTY: 'Other_Math': Binary Property */ +static const OnigCodePoint +CR_Other_Math[] = { 134, +0x005e, 0x005e, +0x03d0, 0x03d2, +0x03d5, 0x03d5, +0x03f0, 0x03f1, +0x03f4, 0x03f5, +0x2016, 0x2016, +0x2032, 0x2034, +0x2040, 0x2040, +0x2061, 0x2064, +0x207d, 0x207e, +0x208d, 0x208e, +0x20d0, 0x20dc, +0x20e1, 0x20e1, +0x20e5, 0x20e6, +0x20eb, 0x20ef, +0x2102, 0x2102, +0x2107, 0x2107, +0x210a, 0x2113, +0x2115, 0x2115, +0x2119, 0x211d, +0x2124, 0x2124, +0x2128, 0x2129, +0x212c, 0x212d, +0x212f, 0x2131, +0x2133, 0x2138, +0x213c, 0x213f, +0x2145, 0x2149, +0x2195, 0x2199, +0x219c, 0x219f, +0x21a1, 0x21a2, +0x21a4, 0x21a5, +0x21a7, 0x21a7, +0x21a9, 0x21ad, +0x21b0, 0x21b1, +0x21b6, 0x21b7, +0x21bc, 0x21cd, +0x21d0, 0x21d1, +0x21d3, 0x21d3, +0x21d5, 0x21db, +0x21dd, 0x21dd, +0x21e4, 0x21e5, +0x2308, 0x230b, +0x23b4, 0x23b5, +0x23b7, 0x23b7, +0x23d0, 0x23d0, +0x23e2, 0x23e2, +0x25a0, 0x25a1, +0x25ae, 0x25b6, +0x25bc, 0x25c0, +0x25c6, 0x25c7, +0x25ca, 0x25cb, +0x25cf, 0x25d3, +0x25e2, 0x25e2, +0x25e4, 0x25e4, +0x25e7, 0x25ec, +0x2605, 0x2606, +0x2640, 0x2640, +0x2642, 0x2642, +0x2660, 0x2663, +0x266d, 0x266e, +0x27c5, 0x27c6, +0x27e6, 0x27ef, +0x2983, 0x2998, +0x29d8, 0x29db, +0x29fc, 0x29fd, +0xfe61, 0xfe61, +0xfe63, 0xfe63, +0xfe68, 0xfe68, +0xff3c, 0xff3c, +0xff3e, 0xff3e, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d6c0, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6fa, +0x1d6fc, 0x1d714, +0x1d716, 0x1d734, +0x1d736, 0x1d74e, +0x1d750, 0x1d76e, +0x1d770, 0x1d788, +0x1d78a, 0x1d7a8, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7cb, +0x1d7ce, 0x1d7ff, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +}; /* END of CR_Other_Math */ + +/* PROPERTY: 'Other_Uppercase': Binary Property */ +static const OnigCodePoint +CR_Other_Uppercase[] = { 5, +0x2160, 0x216f, +0x24b6, 0x24cf, +0x1f130, 0x1f149, +0x1f150, 0x1f169, +0x1f170, 0x1f189, +}; /* END of CR_Other_Uppercase */ + +/* PROPERTY: 'P': Major Category */ +static const OnigCodePoint +CR_P[] = { 198, +0x0021, 0x0023, +0x0025, 0x002a, +0x002c, 0x002f, +0x003a, 0x003b, +0x003f, 0x0040, +0x005b, 0x005d, +0x005f, 0x005f, +0x007b, 0x007b, +0x007d, 0x007d, +0x00a1, 0x00a1, +0x00a7, 0x00a7, +0x00ab, 0x00ab, +0x00b6, 0x00b7, +0x00bb, 0x00bb, +0x00bf, 0x00bf, +0x037e, 0x037e, +0x0387, 0x0387, +0x055a, 0x055f, +0x0589, 0x058a, +0x05be, 0x05be, +0x05c0, 0x05c0, +0x05c3, 0x05c3, +0x05c6, 0x05c6, +0x05f3, 0x05f4, +0x0609, 0x060a, +0x060c, 0x060d, +0x061b, 0x061b, +0x061d, 0x061f, +0x066a, 0x066d, +0x06d4, 0x06d4, +0x0700, 0x070d, +0x07f7, 0x07f9, +0x0830, 0x083e, +0x085e, 0x085e, +0x0964, 0x0965, +0x0970, 0x0970, +0x09fd, 0x09fd, +0x0a76, 0x0a76, +0x0af0, 0x0af0, +0x0c77, 0x0c77, +0x0c84, 0x0c84, +0x0df4, 0x0df4, +0x0e4f, 0x0e4f, +0x0e5a, 0x0e5b, +0x0f04, 0x0f12, +0x0f14, 0x0f14, +0x0f3a, 0x0f3d, +0x0f85, 0x0f85, +0x0fd0, 0x0fd4, +0x0fd9, 0x0fda, +0x104a, 0x104f, +0x10fb, 0x10fb, +0x1360, 0x1368, +0x1400, 0x1400, +0x166e, 0x166e, +0x169b, 0x169c, +0x16eb, 0x16ed, +0x1735, 0x1736, +0x17d4, 0x17d6, +0x17d8, 0x17da, +0x1800, 0x180a, +0x1944, 0x1945, +0x1a1e, 0x1a1f, +0x1aa0, 0x1aa6, +0x1aa8, 0x1aad, +0x1b4e, 0x1b4f, +0x1b5a, 0x1b60, +0x1b7d, 0x1b7f, +0x1bfc, 0x1bff, +0x1c3b, 0x1c3f, +0x1c7e, 0x1c7f, +0x1cc0, 0x1cc7, +0x1cd3, 0x1cd3, +0x2010, 0x2027, +0x2030, 0x2043, +0x2045, 0x2051, +0x2053, 0x205e, +0x207d, 0x207e, +0x208d, 0x208e, +0x2308, 0x230b, +0x2329, 0x232a, +0x2768, 0x2775, +0x27c5, 0x27c6, +0x27e6, 0x27ef, +0x2983, 0x2998, +0x29d8, 0x29db, +0x29fc, 0x29fd, +0x2cf9, 0x2cfc, +0x2cfe, 0x2cff, +0x2d70, 0x2d70, +0x2e00, 0x2e2e, +0x2e30, 0x2e4f, +0x2e52, 0x2e5d, +0x3001, 0x3003, +0x3008, 0x3011, +0x3014, 0x301f, +0x3030, 0x3030, +0x303d, 0x303d, +0x30a0, 0x30a0, +0x30fb, 0x30fb, +0xa4fe, 0xa4ff, +0xa60d, 0xa60f, +0xa673, 0xa673, +0xa67e, 0xa67e, +0xa6f2, 0xa6f7, +0xa874, 0xa877, +0xa8ce, 0xa8cf, +0xa8f8, 0xa8fa, +0xa8fc, 0xa8fc, +0xa92e, 0xa92f, +0xa95f, 0xa95f, +0xa9c1, 0xa9cd, +0xa9de, 0xa9df, +0xaa5c, 0xaa5f, +0xaade, 0xaadf, +0xaaf0, 0xaaf1, +0xabeb, 0xabeb, +0xfd3e, 0xfd3f, +0xfe10, 0xfe19, +0xfe30, 0xfe52, +0xfe54, 0xfe61, +0xfe63, 0xfe63, +0xfe68, 0xfe68, +0xfe6a, 0xfe6b, +0xff01, 0xff03, +0xff05, 0xff0a, +0xff0c, 0xff0f, +0xff1a, 0xff1b, +0xff1f, 0xff20, +0xff3b, 0xff3d, +0xff3f, 0xff3f, +0xff5b, 0xff5b, +0xff5d, 0xff5d, +0xff5f, 0xff65, +0x10100, 0x10102, +0x1039f, 0x1039f, +0x103d0, 0x103d0, +0x1056f, 0x1056f, +0x10857, 0x10857, +0x1091f, 0x1091f, +0x1093f, 0x1093f, +0x10a50, 0x10a58, +0x10a7f, 0x10a7f, +0x10af0, 0x10af6, +0x10b39, 0x10b3f, +0x10b99, 0x10b9c, +0x10d6e, 0x10d6e, +0x10ead, 0x10ead, +0x10f55, 0x10f59, +0x10f86, 0x10f89, +0x11047, 0x1104d, +0x110bb, 0x110bc, +0x110be, 0x110c1, +0x11140, 0x11143, +0x11174, 0x11175, +0x111c5, 0x111c8, +0x111cd, 0x111cd, +0x111db, 0x111db, +0x111dd, 0x111df, +0x11238, 0x1123d, +0x112a9, 0x112a9, +0x113d4, 0x113d5, +0x113d7, 0x113d8, +0x1144b, 0x1144f, +0x1145a, 0x1145b, +0x1145d, 0x1145d, +0x114c6, 0x114c6, +0x115c1, 0x115d7, +0x11641, 0x11643, +0x11660, 0x1166c, +0x116b9, 0x116b9, +0x1173c, 0x1173e, +0x1183b, 0x1183b, +0x11944, 0x11946, +0x119e2, 0x119e2, +0x11a3f, 0x11a46, +0x11a9a, 0x11a9c, +0x11a9e, 0x11aa2, +0x11b00, 0x11b09, +0x11be1, 0x11be1, +0x11c41, 0x11c45, +0x11c70, 0x11c71, +0x11ef7, 0x11ef8, +0x11f43, 0x11f4f, +0x11fff, 0x11fff, +0x12470, 0x12474, +0x12ff1, 0x12ff2, +0x16a6e, 0x16a6f, +0x16af5, 0x16af5, +0x16b37, 0x16b3b, +0x16b44, 0x16b44, +0x16d6d, 0x16d6f, +0x16e97, 0x16e9a, +0x16fe2, 0x16fe2, +0x1bc9f, 0x1bc9f, +0x1da87, 0x1da8b, +0x1e5ff, 0x1e5ff, +0x1e95e, 0x1e95f, +}; /* END of CR_P */ + +/* PROPERTY: 'Pahawh_Hmong': Script */ +static const OnigCodePoint +CR_Pahawh_Hmong[] = { 5, +0x16b00, 0x16b45, +0x16b50, 0x16b59, +0x16b5b, 0x16b61, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +}; /* END of CR_Pahawh_Hmong */ + +/* PROPERTY: 'Palmyrene': Script */ +static const OnigCodePoint +CR_Palmyrene[] = { 1, +0x10860, 0x1087f, +}; /* END of CR_Palmyrene */ + +/* PROPERTY: 'Pattern_Syntax': Binary Property */ +static const OnigCodePoint +CR_Pattern_Syntax[] = { 28, +0x0021, 0x002f, +0x003a, 0x0040, +0x005b, 0x005e, +0x0060, 0x0060, +0x007b, 0x007e, +0x00a1, 0x00a7, +0x00a9, 0x00a9, +0x00ab, 0x00ac, +0x00ae, 0x00ae, +0x00b0, 0x00b1, +0x00b6, 0x00b6, +0x00bb, 0x00bb, +0x00bf, 0x00bf, +0x00d7, 0x00d7, +0x00f7, 0x00f7, +0x2010, 0x2027, +0x2030, 0x203e, +0x2041, 0x2053, +0x2055, 0x205e, +0x2190, 0x245f, +0x2500, 0x2775, +0x2794, 0x2bff, +0x2e00, 0x2e7f, +0x3001, 0x3003, +0x3008, 0x3020, +0x3030, 0x3030, +0xfd3e, 0xfd3f, +0xfe45, 0xfe46, +}; /* END of CR_Pattern_Syntax */ + +/* PROPERTY: 'Pattern_White_Space': Binary Property */ +static const OnigCodePoint +CR_Pattern_White_Space[] = { 5, +0x0009, 0x000d, +0x0020, 0x0020, +0x0085, 0x0085, +0x200e, 0x200f, +0x2028, 0x2029, +}; /* END of CR_Pattern_White_Space */ + +/* PROPERTY: 'Pau_Cin_Hau': Script */ +static const OnigCodePoint +CR_Pau_Cin_Hau[] = { 1, +0x11ac0, 0x11af8, +}; /* END of CR_Pau_Cin_Hau */ + +/* PROPERTY: 'Pc': General Category */ +static const OnigCodePoint +CR_Pc[] = { 6, +0x005f, 0x005f, +0x203f, 0x2040, +0x2054, 0x2054, +0xfe33, 0xfe34, +0xfe4d, 0xfe4f, +0xff3f, 0xff3f, +}; /* END of CR_Pc */ + +/* PROPERTY: 'Pd': General Category */ +static const OnigCodePoint +CR_Pd[] = { 20, +0x002d, 0x002d, +0x058a, 0x058a, +0x05be, 0x05be, +0x1400, 0x1400, +0x1806, 0x1806, +0x2010, 0x2015, +0x2e17, 0x2e17, +0x2e1a, 0x2e1a, +0x2e3a, 0x2e3b, +0x2e40, 0x2e40, +0x2e5d, 0x2e5d, +0x301c, 0x301c, +0x3030, 0x3030, +0x30a0, 0x30a0, +0xfe31, 0xfe32, +0xfe58, 0xfe58, +0xfe63, 0xfe63, +0xff0d, 0xff0d, +0x10d6e, 0x10d6e, +0x10ead, 0x10ead, +}; /* END of CR_Pd */ + +/* PROPERTY: 'Pe': General Category */ +static const OnigCodePoint +CR_Pe[] = { 76, +0x0029, 0x0029, +0x005d, 0x005d, +0x007d, 0x007d, +0x0f3b, 0x0f3b, +0x0f3d, 0x0f3d, +0x169c, 0x169c, +0x2046, 0x2046, +0x207e, 0x207e, +0x208e, 0x208e, +0x2309, 0x2309, +0x230b, 0x230b, +0x232a, 0x232a, +0x2769, 0x2769, +0x276b, 0x276b, +0x276d, 0x276d, +0x276f, 0x276f, +0x2771, 0x2771, +0x2773, 0x2773, +0x2775, 0x2775, +0x27c6, 0x27c6, +0x27e7, 0x27e7, +0x27e9, 0x27e9, +0x27eb, 0x27eb, +0x27ed, 0x27ed, +0x27ef, 0x27ef, +0x2984, 0x2984, +0x2986, 0x2986, +0x2988, 0x2988, +0x298a, 0x298a, +0x298c, 0x298c, +0x298e, 0x298e, +0x2990, 0x2990, +0x2992, 0x2992, +0x2994, 0x2994, +0x2996, 0x2996, +0x2998, 0x2998, +0x29d9, 0x29d9, +0x29db, 0x29db, +0x29fd, 0x29fd, +0x2e23, 0x2e23, +0x2e25, 0x2e25, +0x2e27, 0x2e27, +0x2e29, 0x2e29, +0x2e56, 0x2e56, +0x2e58, 0x2e58, +0x2e5a, 0x2e5a, +0x2e5c, 0x2e5c, +0x3009, 0x3009, +0x300b, 0x300b, +0x300d, 0x300d, +0x300f, 0x300f, +0x3011, 0x3011, +0x3015, 0x3015, +0x3017, 0x3017, +0x3019, 0x3019, +0x301b, 0x301b, +0x301e, 0x301f, +0xfd3e, 0xfd3e, +0xfe18, 0xfe18, +0xfe36, 0xfe36, +0xfe38, 0xfe38, +0xfe3a, 0xfe3a, +0xfe3c, 0xfe3c, +0xfe3e, 0xfe3e, +0xfe40, 0xfe40, +0xfe42, 0xfe42, +0xfe44, 0xfe44, +0xfe48, 0xfe48, +0xfe5a, 0xfe5a, +0xfe5c, 0xfe5c, +0xfe5e, 0xfe5e, +0xff09, 0xff09, +0xff3d, 0xff3d, +0xff5d, 0xff5d, +0xff60, 0xff60, +0xff63, 0xff63, +}; /* END of CR_Pe */ + +/* PROPERTY: 'Pf': General Category */ +static const OnigCodePoint +CR_Pf[] = { 10, +0x00bb, 0x00bb, +0x2019, 0x2019, +0x201d, 0x201d, +0x203a, 0x203a, +0x2e03, 0x2e03, +0x2e05, 0x2e05, +0x2e0a, 0x2e0a, +0x2e0d, 0x2e0d, +0x2e1d, 0x2e1d, +0x2e21, 0x2e21, +}; /* END of CR_Pf */ + +/* PROPERTY: 'Phags_Pa': Script */ +static const OnigCodePoint +CR_Phags_Pa[] = { 1, +0xa840, 0xa877, +}; /* END of CR_Phags_Pa */ + +/* PROPERTY: 'Phoenician': Script */ +static const OnigCodePoint +CR_Phoenician[] = { 2, +0x10900, 0x1091b, +0x1091f, 0x1091f, +}; /* END of CR_Phoenician */ + +/* PROPERTY: 'Pi': General Category */ +static const OnigCodePoint +CR_Pi[] = { 11, +0x00ab, 0x00ab, +0x2018, 0x2018, +0x201b, 0x201c, +0x201f, 0x201f, +0x2039, 0x2039, +0x2e02, 0x2e02, +0x2e04, 0x2e04, +0x2e09, 0x2e09, +0x2e0c, 0x2e0c, +0x2e1c, 0x2e1c, +0x2e20, 0x2e20, +}; /* END of CR_Pi */ + +/* PROPERTY: 'Po': General Category */ +static const OnigCodePoint +CR_Po[] = { 193, +0x0021, 0x0023, +0x0025, 0x0027, +0x002a, 0x002a, +0x002c, 0x002c, +0x002e, 0x002f, +0x003a, 0x003b, +0x003f, 0x0040, +0x005c, 0x005c, +0x00a1, 0x00a1, +0x00a7, 0x00a7, +0x00b6, 0x00b7, +0x00bf, 0x00bf, +0x037e, 0x037e, +0x0387, 0x0387, +0x055a, 0x055f, +0x0589, 0x0589, +0x05c0, 0x05c0, +0x05c3, 0x05c3, +0x05c6, 0x05c6, +0x05f3, 0x05f4, +0x0609, 0x060a, +0x060c, 0x060d, +0x061b, 0x061b, +0x061d, 0x061f, +0x066a, 0x066d, +0x06d4, 0x06d4, +0x0700, 0x070d, +0x07f7, 0x07f9, +0x0830, 0x083e, +0x085e, 0x085e, +0x0964, 0x0965, +0x0970, 0x0970, +0x09fd, 0x09fd, +0x0a76, 0x0a76, +0x0af0, 0x0af0, +0x0c77, 0x0c77, +0x0c84, 0x0c84, +0x0df4, 0x0df4, +0x0e4f, 0x0e4f, +0x0e5a, 0x0e5b, +0x0f04, 0x0f12, +0x0f14, 0x0f14, +0x0f85, 0x0f85, +0x0fd0, 0x0fd4, +0x0fd9, 0x0fda, +0x104a, 0x104f, +0x10fb, 0x10fb, +0x1360, 0x1368, +0x166e, 0x166e, +0x16eb, 0x16ed, +0x1735, 0x1736, +0x17d4, 0x17d6, +0x17d8, 0x17da, +0x1800, 0x1805, +0x1807, 0x180a, +0x1944, 0x1945, +0x1a1e, 0x1a1f, +0x1aa0, 0x1aa6, +0x1aa8, 0x1aad, +0x1b4e, 0x1b4f, +0x1b5a, 0x1b60, +0x1b7d, 0x1b7f, +0x1bfc, 0x1bff, +0x1c3b, 0x1c3f, +0x1c7e, 0x1c7f, +0x1cc0, 0x1cc7, +0x1cd3, 0x1cd3, +0x2016, 0x2017, +0x2020, 0x2027, +0x2030, 0x2038, +0x203b, 0x203e, +0x2041, 0x2043, +0x2047, 0x2051, +0x2053, 0x2053, +0x2055, 0x205e, +0x2cf9, 0x2cfc, +0x2cfe, 0x2cff, +0x2d70, 0x2d70, +0x2e00, 0x2e01, +0x2e06, 0x2e08, +0x2e0b, 0x2e0b, +0x2e0e, 0x2e16, +0x2e18, 0x2e19, +0x2e1b, 0x2e1b, +0x2e1e, 0x2e1f, +0x2e2a, 0x2e2e, +0x2e30, 0x2e39, +0x2e3c, 0x2e3f, +0x2e41, 0x2e41, +0x2e43, 0x2e4f, +0x2e52, 0x2e54, +0x3001, 0x3003, +0x303d, 0x303d, +0x30fb, 0x30fb, +0xa4fe, 0xa4ff, +0xa60d, 0xa60f, +0xa673, 0xa673, +0xa67e, 0xa67e, +0xa6f2, 0xa6f7, +0xa874, 0xa877, +0xa8ce, 0xa8cf, +0xa8f8, 0xa8fa, +0xa8fc, 0xa8fc, +0xa92e, 0xa92f, +0xa95f, 0xa95f, +0xa9c1, 0xa9cd, +0xa9de, 0xa9df, +0xaa5c, 0xaa5f, +0xaade, 0xaadf, +0xaaf0, 0xaaf1, +0xabeb, 0xabeb, +0xfe10, 0xfe16, +0xfe19, 0xfe19, +0xfe30, 0xfe30, +0xfe45, 0xfe46, +0xfe49, 0xfe4c, +0xfe50, 0xfe52, +0xfe54, 0xfe57, +0xfe5f, 0xfe61, +0xfe68, 0xfe68, +0xfe6a, 0xfe6b, +0xff01, 0xff03, +0xff05, 0xff07, +0xff0a, 0xff0a, +0xff0c, 0xff0c, +0xff0e, 0xff0f, +0xff1a, 0xff1b, +0xff1f, 0xff20, +0xff3c, 0xff3c, +0xff61, 0xff61, +0xff64, 0xff65, +0x10100, 0x10102, +0x1039f, 0x1039f, +0x103d0, 0x103d0, +0x1056f, 0x1056f, +0x10857, 0x10857, +0x1091f, 0x1091f, +0x1093f, 0x1093f, +0x10a50, 0x10a58, +0x10a7f, 0x10a7f, +0x10af0, 0x10af6, +0x10b39, 0x10b3f, +0x10b99, 0x10b9c, +0x10f55, 0x10f59, +0x10f86, 0x10f89, +0x11047, 0x1104d, +0x110bb, 0x110bc, +0x110be, 0x110c1, +0x11140, 0x11143, +0x11174, 0x11175, +0x111c5, 0x111c8, +0x111cd, 0x111cd, +0x111db, 0x111db, +0x111dd, 0x111df, +0x11238, 0x1123d, +0x112a9, 0x112a9, +0x113d4, 0x113d5, +0x113d7, 0x113d8, +0x1144b, 0x1144f, +0x1145a, 0x1145b, +0x1145d, 0x1145d, +0x114c6, 0x114c6, +0x115c1, 0x115d7, +0x11641, 0x11643, +0x11660, 0x1166c, +0x116b9, 0x116b9, +0x1173c, 0x1173e, +0x1183b, 0x1183b, +0x11944, 0x11946, +0x119e2, 0x119e2, +0x11a3f, 0x11a46, +0x11a9a, 0x11a9c, +0x11a9e, 0x11aa2, +0x11b00, 0x11b09, +0x11be1, 0x11be1, +0x11c41, 0x11c45, +0x11c70, 0x11c71, +0x11ef7, 0x11ef8, +0x11f43, 0x11f4f, +0x11fff, 0x11fff, +0x12470, 0x12474, +0x12ff1, 0x12ff2, +0x16a6e, 0x16a6f, +0x16af5, 0x16af5, +0x16b37, 0x16b3b, +0x16b44, 0x16b44, +0x16d6d, 0x16d6f, +0x16e97, 0x16e9a, +0x16fe2, 0x16fe2, +0x1bc9f, 0x1bc9f, +0x1da87, 0x1da8b, +0x1e5ff, 0x1e5ff, +0x1e95e, 0x1e95f, +}; /* END of CR_Po */ + +/* PROPERTY: 'Prepended_Concatenation_Mark': Binary Property */ +static const OnigCodePoint +CR_Prepended_Concatenation_Mark[] = { 7, +0x0600, 0x0605, +0x06dd, 0x06dd, +0x070f, 0x070f, +0x0890, 0x0891, +0x08e2, 0x08e2, +0x110bd, 0x110bd, +0x110cd, 0x110cd, +}; /* END of CR_Prepended_Concatenation_Mark */ + +/* PROPERTY: 'Ps': General Category */ +static const OnigCodePoint +CR_Ps[] = { 79, +0x0028, 0x0028, +0x005b, 0x005b, +0x007b, 0x007b, +0x0f3a, 0x0f3a, +0x0f3c, 0x0f3c, +0x169b, 0x169b, +0x201a, 0x201a, +0x201e, 0x201e, +0x2045, 0x2045, +0x207d, 0x207d, +0x208d, 0x208d, +0x2308, 0x2308, +0x230a, 0x230a, +0x2329, 0x2329, +0x2768, 0x2768, +0x276a, 0x276a, +0x276c, 0x276c, +0x276e, 0x276e, +0x2770, 0x2770, +0x2772, 0x2772, +0x2774, 0x2774, +0x27c5, 0x27c5, +0x27e6, 0x27e6, +0x27e8, 0x27e8, +0x27ea, 0x27ea, +0x27ec, 0x27ec, +0x27ee, 0x27ee, +0x2983, 0x2983, +0x2985, 0x2985, +0x2987, 0x2987, +0x2989, 0x2989, +0x298b, 0x298b, +0x298d, 0x298d, +0x298f, 0x298f, +0x2991, 0x2991, +0x2993, 0x2993, +0x2995, 0x2995, +0x2997, 0x2997, +0x29d8, 0x29d8, +0x29da, 0x29da, +0x29fc, 0x29fc, +0x2e22, 0x2e22, +0x2e24, 0x2e24, +0x2e26, 0x2e26, +0x2e28, 0x2e28, +0x2e42, 0x2e42, +0x2e55, 0x2e55, +0x2e57, 0x2e57, +0x2e59, 0x2e59, +0x2e5b, 0x2e5b, +0x3008, 0x3008, +0x300a, 0x300a, +0x300c, 0x300c, +0x300e, 0x300e, +0x3010, 0x3010, +0x3014, 0x3014, +0x3016, 0x3016, +0x3018, 0x3018, +0x301a, 0x301a, +0x301d, 0x301d, +0xfd3f, 0xfd3f, +0xfe17, 0xfe17, +0xfe35, 0xfe35, +0xfe37, 0xfe37, +0xfe39, 0xfe39, +0xfe3b, 0xfe3b, +0xfe3d, 0xfe3d, +0xfe3f, 0xfe3f, +0xfe41, 0xfe41, +0xfe43, 0xfe43, +0xfe47, 0xfe47, +0xfe59, 0xfe59, +0xfe5b, 0xfe5b, +0xfe5d, 0xfe5d, +0xff08, 0xff08, +0xff3b, 0xff3b, +0xff5b, 0xff5b, +0xff5f, 0xff5f, +0xff62, 0xff62, +}; /* END of CR_Ps */ + +/* PROPERTY: 'Psalter_Pahlavi': Script */ +static const OnigCodePoint +CR_Psalter_Pahlavi[] = { 3, +0x10b80, 0x10b91, +0x10b99, 0x10b9c, +0x10ba9, 0x10baf, +}; /* END of CR_Psalter_Pahlavi */ + +/* PROPERTY: 'Quotation_Mark': Binary Property */ +static const OnigCodePoint +CR_Quotation_Mark[] = { 13, +0x0022, 0x0022, +0x0027, 0x0027, +0x00ab, 0x00ab, +0x00bb, 0x00bb, +0x2018, 0x201f, +0x2039, 0x203a, +0x2e42, 0x2e42, +0x300c, 0x300f, +0x301d, 0x301f, +0xfe41, 0xfe44, +0xff02, 0xff02, +0xff07, 0xff07, +0xff62, 0xff63, +}; /* END of CR_Quotation_Mark */ + +/* PROPERTY: 'Radical': Binary Property */ +static const OnigCodePoint +CR_Radical[] = { 3, +0x2e80, 0x2e99, +0x2e9b, 0x2ef3, +0x2f00, 0x2fd5, +}; /* END of CR_Radical */ + +/* PROPERTY: 'Regional_Indicator': Binary Property */ +static const OnigCodePoint +CR_Regional_Indicator[] = { 1, +0x1f1e6, 0x1f1ff, +}; /* END of CR_Regional_Indicator */ + +/* PROPERTY: 'Rejang': Script */ +static const OnigCodePoint +CR_Rejang[] = { 2, +0xa930, 0xa953, +0xa95f, 0xa95f, +}; /* END of CR_Rejang */ + +/* PROPERTY: 'Runic': Script */ +static const OnigCodePoint +CR_Runic[] = { 2, +0x16a0, 0x16ea, +0x16ee, 0x16f8, +}; /* END of CR_Runic */ + +/* PROPERTY: 'S': Major Category */ +static const OnigCodePoint +CR_S[] = { 236, +0x0024, 0x0024, +0x002b, 0x002b, +0x003c, 0x003e, +0x005e, 0x005e, +0x0060, 0x0060, +0x007c, 0x007c, +0x007e, 0x007e, +0x00a2, 0x00a6, +0x00a8, 0x00a9, +0x00ac, 0x00ac, +0x00ae, 0x00b1, +0x00b4, 0x00b4, +0x00b8, 0x00b8, +0x00d7, 0x00d7, +0x00f7, 0x00f7, +0x02c2, 0x02c5, +0x02d2, 0x02df, +0x02e5, 0x02eb, +0x02ed, 0x02ed, +0x02ef, 0x02ff, +0x0375, 0x0375, +0x0384, 0x0385, +0x03f6, 0x03f6, +0x0482, 0x0482, +0x058d, 0x058f, +0x0606, 0x0608, +0x060b, 0x060b, +0x060e, 0x060f, +0x06de, 0x06de, +0x06e9, 0x06e9, +0x06fd, 0x06fe, +0x07f6, 0x07f6, +0x07fe, 0x07ff, +0x0888, 0x0888, +0x09f2, 0x09f3, +0x09fa, 0x09fb, +0x0af1, 0x0af1, +0x0b70, 0x0b70, +0x0bf3, 0x0bfa, +0x0c7f, 0x0c7f, +0x0d4f, 0x0d4f, +0x0d79, 0x0d79, +0x0e3f, 0x0e3f, +0x0f01, 0x0f03, +0x0f13, 0x0f13, +0x0f15, 0x0f17, +0x0f1a, 0x0f1f, +0x0f34, 0x0f34, +0x0f36, 0x0f36, +0x0f38, 0x0f38, +0x0fbe, 0x0fc5, +0x0fc7, 0x0fcc, +0x0fce, 0x0fcf, +0x0fd5, 0x0fd8, +0x109e, 0x109f, +0x1390, 0x1399, +0x166d, 0x166d, +0x17db, 0x17db, +0x1940, 0x1940, +0x19de, 0x19ff, +0x1b61, 0x1b6a, +0x1b74, 0x1b7c, +0x1fbd, 0x1fbd, +0x1fbf, 0x1fc1, +0x1fcd, 0x1fcf, +0x1fdd, 0x1fdf, +0x1fed, 0x1fef, +0x1ffd, 0x1ffe, +0x2044, 0x2044, +0x2052, 0x2052, +0x207a, 0x207c, +0x208a, 0x208c, +0x20a0, 0x20c0, +0x2100, 0x2101, +0x2103, 0x2106, +0x2108, 0x2109, +0x2114, 0x2114, +0x2116, 0x2118, +0x211e, 0x2123, +0x2125, 0x2125, +0x2127, 0x2127, +0x2129, 0x2129, +0x212e, 0x212e, +0x213a, 0x213b, +0x2140, 0x2144, +0x214a, 0x214d, +0x214f, 0x214f, +0x218a, 0x218b, +0x2190, 0x2307, +0x230c, 0x2328, +0x232b, 0x2429, +0x2440, 0x244a, +0x249c, 0x24e9, +0x2500, 0x2767, +0x2794, 0x27c4, +0x27c7, 0x27e5, +0x27f0, 0x2982, +0x2999, 0x29d7, +0x29dc, 0x29fb, +0x29fe, 0x2b73, +0x2b76, 0x2b95, +0x2b97, 0x2bff, +0x2ce5, 0x2cea, +0x2e50, 0x2e51, +0x2e80, 0x2e99, +0x2e9b, 0x2ef3, +0x2f00, 0x2fd5, +0x2ff0, 0x2fff, +0x3004, 0x3004, +0x3012, 0x3013, +0x3020, 0x3020, +0x3036, 0x3037, +0x303e, 0x303f, +0x309b, 0x309c, +0x3190, 0x3191, +0x3196, 0x319f, +0x31c0, 0x31e5, +0x31ef, 0x31ef, +0x3200, 0x321e, +0x322a, 0x3247, +0x3250, 0x3250, +0x3260, 0x327f, +0x328a, 0x32b0, +0x32c0, 0x33ff, +0x4dc0, 0x4dff, +0xa490, 0xa4c6, +0xa700, 0xa716, +0xa720, 0xa721, +0xa789, 0xa78a, +0xa828, 0xa82b, +0xa836, 0xa839, +0xaa77, 0xaa79, +0xab5b, 0xab5b, +0xab6a, 0xab6b, +0xfb29, 0xfb29, +0xfbb2, 0xfbc2, +0xfd40, 0xfd4f, +0xfdcf, 0xfdcf, +0xfdfc, 0xfdff, +0xfe62, 0xfe62, +0xfe64, 0xfe66, +0xfe69, 0xfe69, +0xff04, 0xff04, +0xff0b, 0xff0b, +0xff1c, 0xff1e, +0xff3e, 0xff3e, +0xff40, 0xff40, +0xff5c, 0xff5c, +0xff5e, 0xff5e, +0xffe0, 0xffe6, +0xffe8, 0xffee, +0xfffc, 0xfffd, +0x10137, 0x1013f, +0x10179, 0x10189, +0x1018c, 0x1018e, +0x10190, 0x1019c, +0x101a0, 0x101a0, +0x101d0, 0x101fc, +0x10877, 0x10878, +0x10ac8, 0x10ac8, +0x10d8e, 0x10d8f, +0x1173f, 0x1173f, +0x11fd5, 0x11ff1, +0x16b3c, 0x16b3f, +0x16b45, 0x16b45, +0x1bc9c, 0x1bc9c, +0x1cc00, 0x1ccef, +0x1cd00, 0x1ceb3, +0x1cf50, 0x1cfc3, +0x1d000, 0x1d0f5, +0x1d100, 0x1d126, +0x1d129, 0x1d164, +0x1d16a, 0x1d16c, +0x1d183, 0x1d184, +0x1d18c, 0x1d1a9, +0x1d1ae, 0x1d1ea, +0x1d200, 0x1d241, +0x1d245, 0x1d245, +0x1d300, 0x1d356, +0x1d6c1, 0x1d6c1, +0x1d6db, 0x1d6db, +0x1d6fb, 0x1d6fb, +0x1d715, 0x1d715, +0x1d735, 0x1d735, +0x1d74f, 0x1d74f, +0x1d76f, 0x1d76f, +0x1d789, 0x1d789, +0x1d7a9, 0x1d7a9, +0x1d7c3, 0x1d7c3, +0x1d800, 0x1d9ff, +0x1da37, 0x1da3a, +0x1da6d, 0x1da74, +0x1da76, 0x1da83, +0x1da85, 0x1da86, +0x1e14f, 0x1e14f, +0x1e2ff, 0x1e2ff, +0x1ecac, 0x1ecac, +0x1ecb0, 0x1ecb0, +0x1ed2e, 0x1ed2e, +0x1eef0, 0x1eef1, +0x1f000, 0x1f02b, +0x1f030, 0x1f093, +0x1f0a0, 0x1f0ae, +0x1f0b1, 0x1f0bf, +0x1f0c1, 0x1f0cf, +0x1f0d1, 0x1f0f5, +0x1f10d, 0x1f1ad, +0x1f1e6, 0x1f202, +0x1f210, 0x1f23b, +0x1f240, 0x1f248, +0x1f250, 0x1f251, +0x1f260, 0x1f265, +0x1f300, 0x1f6d7, +0x1f6dc, 0x1f6ec, +0x1f6f0, 0x1f6fc, +0x1f700, 0x1f776, +0x1f77b, 0x1f7d9, +0x1f7e0, 0x1f7eb, +0x1f7f0, 0x1f7f0, +0x1f800, 0x1f80b, +0x1f810, 0x1f847, +0x1f850, 0x1f859, +0x1f860, 0x1f887, +0x1f890, 0x1f8ad, +0x1f8b0, 0x1f8bb, +0x1f8c0, 0x1f8c1, +0x1f900, 0x1fa53, +0x1fa60, 0x1fa6d, +0x1fa70, 0x1fa7c, +0x1fa80, 0x1fa89, +0x1fa8f, 0x1fac6, +0x1face, 0x1fadc, +0x1fadf, 0x1fae9, +0x1faf0, 0x1faf8, +0x1fb00, 0x1fb92, +0x1fb94, 0x1fbef, +}; /* END of CR_S */ + +/* PROPERTY: 'Samaritan': Script */ +static const OnigCodePoint +CR_Samaritan[] = { 2, +0x0800, 0x082d, +0x0830, 0x083e, +}; /* END of CR_Samaritan */ + +/* PROPERTY: 'Saurashtra': Script */ +static const OnigCodePoint +CR_Saurashtra[] = { 2, +0xa880, 0xa8c5, +0xa8ce, 0xa8d9, +}; /* END of CR_Saurashtra */ + +/* PROPERTY: 'Sc': General Category */ +static const OnigCodePoint +CR_Sc[] = { 21, +0x0024, 0x0024, +0x00a2, 0x00a5, +0x058f, 0x058f, +0x060b, 0x060b, +0x07fe, 0x07ff, +0x09f2, 0x09f3, +0x09fb, 0x09fb, +0x0af1, 0x0af1, +0x0bf9, 0x0bf9, +0x0e3f, 0x0e3f, +0x17db, 0x17db, +0x20a0, 0x20c0, +0xa838, 0xa838, +0xfdfc, 0xfdfc, +0xfe69, 0xfe69, +0xff04, 0xff04, +0xffe0, 0xffe1, +0xffe5, 0xffe6, +0x11fdd, 0x11fe0, +0x1e2ff, 0x1e2ff, +0x1ecb0, 0x1ecb0, +}; /* END of CR_Sc */ + +/* PROPERTY: 'Sentence_Terminal': Binary Property */ +static const OnigCodePoint +CR_Sentence_Terminal[] = { 88, +0x0021, 0x0021, +0x002e, 0x002e, +0x003f, 0x003f, +0x0589, 0x0589, +0x061d, 0x061f, +0x06d4, 0x06d4, +0x0700, 0x0702, +0x07f9, 0x07f9, +0x0837, 0x0837, +0x0839, 0x0839, +0x083d, 0x083e, +0x0964, 0x0965, +0x104a, 0x104b, +0x1362, 0x1362, +0x1367, 0x1368, +0x166e, 0x166e, +0x1735, 0x1736, +0x17d4, 0x17d5, +0x1803, 0x1803, +0x1809, 0x1809, +0x1944, 0x1945, +0x1aa8, 0x1aab, +0x1b4e, 0x1b4f, +0x1b5a, 0x1b5b, +0x1b5e, 0x1b5f, +0x1b7d, 0x1b7f, +0x1c3b, 0x1c3c, +0x1c7e, 0x1c7f, +0x2024, 0x2024, +0x203c, 0x203d, +0x2047, 0x2049, +0x2cf9, 0x2cfb, +0x2e2e, 0x2e2e, +0x2e3c, 0x2e3c, +0x2e53, 0x2e54, +0x3002, 0x3002, +0xa4ff, 0xa4ff, +0xa60e, 0xa60f, +0xa6f3, 0xa6f3, +0xa6f7, 0xa6f7, +0xa876, 0xa877, +0xa8ce, 0xa8cf, +0xa92f, 0xa92f, +0xa9c8, 0xa9c9, +0xaa5d, 0xaa5f, +0xaaf0, 0xaaf1, +0xabeb, 0xabeb, +0xfe12, 0xfe12, +0xfe15, 0xfe16, +0xfe52, 0xfe52, +0xfe56, 0xfe57, +0xff01, 0xff01, +0xff0e, 0xff0e, +0xff1f, 0xff1f, +0xff61, 0xff61, +0x10a56, 0x10a57, +0x10f55, 0x10f59, +0x10f86, 0x10f89, +0x11047, 0x11048, +0x110be, 0x110c1, +0x11141, 0x11143, +0x111c5, 0x111c6, +0x111cd, 0x111cd, +0x111de, 0x111df, +0x11238, 0x11239, +0x1123b, 0x1123c, +0x112a9, 0x112a9, +0x113d4, 0x113d5, +0x1144b, 0x1144c, +0x115c2, 0x115c3, +0x115c9, 0x115d7, +0x11641, 0x11642, +0x1173c, 0x1173e, +0x11944, 0x11944, +0x11946, 0x11946, +0x11a42, 0x11a43, +0x11a9b, 0x11a9c, +0x11c41, 0x11c42, +0x11ef7, 0x11ef8, +0x11f43, 0x11f44, +0x16a6e, 0x16a6f, +0x16af5, 0x16af5, +0x16b37, 0x16b38, +0x16b44, 0x16b44, +0x16d6e, 0x16d6f, +0x16e98, 0x16e98, +0x1bc9f, 0x1bc9f, +0x1da88, 0x1da88, +}; /* END of CR_Sentence_Terminal */ + +/* PROPERTY: 'Sharada': Script */ +static const OnigCodePoint +CR_Sharada[] = { 1, +0x11180, 0x111df, +}; /* END of CR_Sharada */ + +/* PROPERTY: 'Shavian': Script */ +static const OnigCodePoint +CR_Shavian[] = { 1, +0x10450, 0x1047f, +}; /* END of CR_Shavian */ + +/* PROPERTY: 'Siddham': Script */ +static const OnigCodePoint +CR_Siddham[] = { 2, +0x11580, 0x115b5, +0x115b8, 0x115dd, +}; /* END of CR_Siddham */ + +/* PROPERTY: 'SignWriting': Script */ +static const OnigCodePoint +CR_SignWriting[] = { 3, +0x1d800, 0x1da8b, +0x1da9b, 0x1da9f, +0x1daa1, 0x1daaf, +}; /* END of CR_SignWriting */ + +/* PROPERTY: 'Sinhala': Script */ +static const OnigCodePoint +CR_Sinhala[] = { 13, +0x0d81, 0x0d83, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0dca, 0x0dca, +0x0dcf, 0x0dd4, +0x0dd6, 0x0dd6, +0x0dd8, 0x0ddf, +0x0de6, 0x0def, +0x0df2, 0x0df4, +0x111e1, 0x111f4, +}; /* END of CR_Sinhala */ + +/* PROPERTY: 'Sk': General Category */ +static const OnigCodePoint +CR_Sk[] = { 31, +0x005e, 0x005e, +0x0060, 0x0060, +0x00a8, 0x00a8, +0x00af, 0x00af, +0x00b4, 0x00b4, +0x00b8, 0x00b8, +0x02c2, 0x02c5, +0x02d2, 0x02df, +0x02e5, 0x02eb, +0x02ed, 0x02ed, +0x02ef, 0x02ff, +0x0375, 0x0375, +0x0384, 0x0385, +0x0888, 0x0888, +0x1fbd, 0x1fbd, +0x1fbf, 0x1fc1, +0x1fcd, 0x1fcf, +0x1fdd, 0x1fdf, +0x1fed, 0x1fef, +0x1ffd, 0x1ffe, +0x309b, 0x309c, +0xa700, 0xa716, +0xa720, 0xa721, +0xa789, 0xa78a, +0xab5b, 0xab5b, +0xab6a, 0xab6b, +0xfbb2, 0xfbc2, +0xff3e, 0xff3e, +0xff40, 0xff40, +0xffe3, 0xffe3, +0x1f3fb, 0x1f3ff, +}; /* END of CR_Sk */ + +/* PROPERTY: 'Sm': General Category */ +static const OnigCodePoint +CR_Sm[] = { 65, +0x002b, 0x002b, +0x003c, 0x003e, +0x007c, 0x007c, +0x007e, 0x007e, +0x00ac, 0x00ac, +0x00b1, 0x00b1, +0x00d7, 0x00d7, +0x00f7, 0x00f7, +0x03f6, 0x03f6, +0x0606, 0x0608, +0x2044, 0x2044, +0x2052, 0x2052, +0x207a, 0x207c, +0x208a, 0x208c, +0x2118, 0x2118, +0x2140, 0x2144, +0x214b, 0x214b, +0x2190, 0x2194, +0x219a, 0x219b, +0x21a0, 0x21a0, +0x21a3, 0x21a3, +0x21a6, 0x21a6, +0x21ae, 0x21ae, +0x21ce, 0x21cf, +0x21d2, 0x21d2, +0x21d4, 0x21d4, +0x21f4, 0x22ff, +0x2320, 0x2321, +0x237c, 0x237c, +0x239b, 0x23b3, +0x23dc, 0x23e1, +0x25b7, 0x25b7, +0x25c1, 0x25c1, +0x25f8, 0x25ff, +0x266f, 0x266f, +0x27c0, 0x27c4, +0x27c7, 0x27e5, +0x27f0, 0x27ff, +0x2900, 0x2982, +0x2999, 0x29d7, +0x29dc, 0x29fb, +0x29fe, 0x2aff, +0x2b30, 0x2b44, +0x2b47, 0x2b4c, +0xfb29, 0xfb29, +0xfe62, 0xfe62, +0xfe64, 0xfe66, +0xff0b, 0xff0b, +0xff1c, 0xff1e, +0xff5c, 0xff5c, +0xff5e, 0xff5e, +0xffe2, 0xffe2, +0xffe9, 0xffec, +0x10d8e, 0x10d8f, +0x1d6c1, 0x1d6c1, +0x1d6db, 0x1d6db, +0x1d6fb, 0x1d6fb, +0x1d715, 0x1d715, +0x1d735, 0x1d735, +0x1d74f, 0x1d74f, +0x1d76f, 0x1d76f, +0x1d789, 0x1d789, +0x1d7a9, 0x1d7a9, +0x1d7c3, 0x1d7c3, +0x1eef0, 0x1eef1, +}; /* END of CR_Sm */ + +/* PROPERTY: 'So': General Category */ +static const OnigCodePoint +CR_So[] = { 187, +0x00a6, 0x00a6, +0x00a9, 0x00a9, +0x00ae, 0x00ae, +0x00b0, 0x00b0, +0x0482, 0x0482, +0x058d, 0x058e, +0x060e, 0x060f, +0x06de, 0x06de, +0x06e9, 0x06e9, +0x06fd, 0x06fe, +0x07f6, 0x07f6, +0x09fa, 0x09fa, +0x0b70, 0x0b70, +0x0bf3, 0x0bf8, +0x0bfa, 0x0bfa, +0x0c7f, 0x0c7f, +0x0d4f, 0x0d4f, +0x0d79, 0x0d79, +0x0f01, 0x0f03, +0x0f13, 0x0f13, +0x0f15, 0x0f17, +0x0f1a, 0x0f1f, +0x0f34, 0x0f34, +0x0f36, 0x0f36, +0x0f38, 0x0f38, +0x0fbe, 0x0fc5, +0x0fc7, 0x0fcc, +0x0fce, 0x0fcf, +0x0fd5, 0x0fd8, +0x109e, 0x109f, +0x1390, 0x1399, +0x166d, 0x166d, +0x1940, 0x1940, +0x19de, 0x19ff, +0x1b61, 0x1b6a, +0x1b74, 0x1b7c, +0x2100, 0x2101, +0x2103, 0x2106, +0x2108, 0x2109, +0x2114, 0x2114, +0x2116, 0x2117, +0x211e, 0x2123, +0x2125, 0x2125, +0x2127, 0x2127, +0x2129, 0x2129, +0x212e, 0x212e, +0x213a, 0x213b, +0x214a, 0x214a, +0x214c, 0x214d, +0x214f, 0x214f, +0x218a, 0x218b, +0x2195, 0x2199, +0x219c, 0x219f, +0x21a1, 0x21a2, +0x21a4, 0x21a5, +0x21a7, 0x21ad, +0x21af, 0x21cd, +0x21d0, 0x21d1, +0x21d3, 0x21d3, +0x21d5, 0x21f3, +0x2300, 0x2307, +0x230c, 0x231f, +0x2322, 0x2328, +0x232b, 0x237b, +0x237d, 0x239a, +0x23b4, 0x23db, +0x23e2, 0x2429, +0x2440, 0x244a, +0x249c, 0x24e9, +0x2500, 0x25b6, +0x25b8, 0x25c0, +0x25c2, 0x25f7, +0x2600, 0x266e, +0x2670, 0x2767, +0x2794, 0x27bf, +0x2800, 0x28ff, +0x2b00, 0x2b2f, +0x2b45, 0x2b46, +0x2b4d, 0x2b73, +0x2b76, 0x2b95, +0x2b97, 0x2bff, +0x2ce5, 0x2cea, +0x2e50, 0x2e51, +0x2e80, 0x2e99, +0x2e9b, 0x2ef3, +0x2f00, 0x2fd5, +0x2ff0, 0x2fff, +0x3004, 0x3004, +0x3012, 0x3013, +0x3020, 0x3020, +0x3036, 0x3037, +0x303e, 0x303f, +0x3190, 0x3191, +0x3196, 0x319f, +0x31c0, 0x31e5, +0x31ef, 0x31ef, +0x3200, 0x321e, +0x322a, 0x3247, +0x3250, 0x3250, +0x3260, 0x327f, +0x328a, 0x32b0, +0x32c0, 0x33ff, +0x4dc0, 0x4dff, +0xa490, 0xa4c6, +0xa828, 0xa82b, +0xa836, 0xa837, +0xa839, 0xa839, +0xaa77, 0xaa79, +0xfd40, 0xfd4f, +0xfdcf, 0xfdcf, +0xfdfd, 0xfdff, +0xffe4, 0xffe4, +0xffe8, 0xffe8, +0xffed, 0xffee, +0xfffc, 0xfffd, +0x10137, 0x1013f, +0x10179, 0x10189, +0x1018c, 0x1018e, +0x10190, 0x1019c, +0x101a0, 0x101a0, +0x101d0, 0x101fc, +0x10877, 0x10878, +0x10ac8, 0x10ac8, +0x1173f, 0x1173f, +0x11fd5, 0x11fdc, +0x11fe1, 0x11ff1, +0x16b3c, 0x16b3f, +0x16b45, 0x16b45, +0x1bc9c, 0x1bc9c, +0x1cc00, 0x1ccef, +0x1cd00, 0x1ceb3, +0x1cf50, 0x1cfc3, +0x1d000, 0x1d0f5, +0x1d100, 0x1d126, +0x1d129, 0x1d164, +0x1d16a, 0x1d16c, +0x1d183, 0x1d184, +0x1d18c, 0x1d1a9, +0x1d1ae, 0x1d1ea, +0x1d200, 0x1d241, +0x1d245, 0x1d245, +0x1d300, 0x1d356, +0x1d800, 0x1d9ff, +0x1da37, 0x1da3a, +0x1da6d, 0x1da74, +0x1da76, 0x1da83, +0x1da85, 0x1da86, +0x1e14f, 0x1e14f, +0x1ecac, 0x1ecac, +0x1ed2e, 0x1ed2e, +0x1f000, 0x1f02b, +0x1f030, 0x1f093, +0x1f0a0, 0x1f0ae, +0x1f0b1, 0x1f0bf, +0x1f0c1, 0x1f0cf, +0x1f0d1, 0x1f0f5, +0x1f10d, 0x1f1ad, +0x1f1e6, 0x1f202, +0x1f210, 0x1f23b, +0x1f240, 0x1f248, +0x1f250, 0x1f251, +0x1f260, 0x1f265, +0x1f300, 0x1f3fa, +0x1f400, 0x1f6d7, +0x1f6dc, 0x1f6ec, +0x1f6f0, 0x1f6fc, +0x1f700, 0x1f776, +0x1f77b, 0x1f7d9, +0x1f7e0, 0x1f7eb, +0x1f7f0, 0x1f7f0, +0x1f800, 0x1f80b, +0x1f810, 0x1f847, +0x1f850, 0x1f859, +0x1f860, 0x1f887, +0x1f890, 0x1f8ad, +0x1f8b0, 0x1f8bb, +0x1f8c0, 0x1f8c1, +0x1f900, 0x1fa53, +0x1fa60, 0x1fa6d, +0x1fa70, 0x1fa7c, +0x1fa80, 0x1fa89, +0x1fa8f, 0x1fac6, +0x1face, 0x1fadc, +0x1fadf, 0x1fae9, +0x1faf0, 0x1faf8, +0x1fb00, 0x1fb92, +0x1fb94, 0x1fbef, +}; /* END of CR_So */ + +/* PROPERTY: 'Soft_Dotted': Binary Property */ +static const OnigCodePoint +CR_Soft_Dotted[] = { 34, +0x0069, 0x006a, +0x012f, 0x012f, +0x0249, 0x0249, +0x0268, 0x0268, +0x029d, 0x029d, +0x02b2, 0x02b2, +0x03f3, 0x03f3, +0x0456, 0x0456, +0x0458, 0x0458, +0x1d62, 0x1d62, +0x1d96, 0x1d96, +0x1da4, 0x1da4, +0x1da8, 0x1da8, +0x1e2d, 0x1e2d, +0x1ecb, 0x1ecb, +0x2071, 0x2071, +0x2148, 0x2149, +0x2c7c, 0x2c7c, +0x1d422, 0x1d423, +0x1d456, 0x1d457, +0x1d48a, 0x1d48b, +0x1d4be, 0x1d4bf, +0x1d4f2, 0x1d4f3, +0x1d526, 0x1d527, +0x1d55a, 0x1d55b, +0x1d58e, 0x1d58f, +0x1d5c2, 0x1d5c3, +0x1d5f6, 0x1d5f7, +0x1d62a, 0x1d62b, +0x1d65e, 0x1d65f, +0x1d692, 0x1d693, +0x1df1a, 0x1df1a, +0x1e04c, 0x1e04d, +0x1e068, 0x1e068, +}; /* END of CR_Soft_Dotted */ + +/* PROPERTY: 'Sogdian': Script */ +static const OnigCodePoint +CR_Sogdian[] = { 1, +0x10f30, 0x10f59, +}; /* END of CR_Sogdian */ + +/* PROPERTY: 'Sora_Sompeng': Script */ +static const OnigCodePoint +CR_Sora_Sompeng[] = { 2, +0x110d0, 0x110e8, +0x110f0, 0x110f9, +}; /* END of CR_Sora_Sompeng */ + +/* PROPERTY: 'Soyombo': Script */ +static const OnigCodePoint +CR_Soyombo[] = { 1, +0x11a50, 0x11aa2, +}; /* END of CR_Soyombo */ + +/* PROPERTY: 'Sundanese': Script */ +static const OnigCodePoint +CR_Sundanese[] = { 2, +0x1b80, 0x1bbf, +0x1cc0, 0x1cc7, +}; /* END of CR_Sundanese */ + +/* PROPERTY: 'Sunuwar': Script */ +static const OnigCodePoint +CR_Sunuwar[] = { 2, +0x11bc0, 0x11be1, +0x11bf0, 0x11bf9, +}; /* END of CR_Sunuwar */ + +/* PROPERTY: 'Syloti_Nagri': Script */ +static const OnigCodePoint +CR_Syloti_Nagri[] = { 1, +0xa800, 0xa82c, +}; /* END of CR_Syloti_Nagri */ + +/* PROPERTY: 'Syriac': Script */ +static const OnigCodePoint +CR_Syriac[] = { 4, +0x0700, 0x070d, +0x070f, 0x074a, +0x074d, 0x074f, +0x0860, 0x086a, +}; /* END of CR_Syriac */ + +/* PROPERTY: 'Tagalog': Script */ +static const OnigCodePoint +CR_Tagalog[] = { 2, +0x1700, 0x1715, +0x171f, 0x171f, +}; /* END of CR_Tagalog */ + +/* PROPERTY: 'Tagbanwa': Script */ +static const OnigCodePoint +CR_Tagbanwa[] = { 3, +0x1760, 0x176c, +0x176e, 0x1770, +0x1772, 0x1773, +}; /* END of CR_Tagbanwa */ + +/* PROPERTY: 'Tai_Le': Script */ +static const OnigCodePoint +CR_Tai_Le[] = { 2, +0x1950, 0x196d, +0x1970, 0x1974, +}; /* END of CR_Tai_Le */ + +/* PROPERTY: 'Tai_Tham': Script */ +static const OnigCodePoint +CR_Tai_Tham[] = { 5, +0x1a20, 0x1a5e, +0x1a60, 0x1a7c, +0x1a7f, 0x1a89, +0x1a90, 0x1a99, +0x1aa0, 0x1aad, +}; /* END of CR_Tai_Tham */ + +/* PROPERTY: 'Tai_Viet': Script */ +static const OnigCodePoint +CR_Tai_Viet[] = { 2, +0xaa80, 0xaac2, +0xaadb, 0xaadf, +}; /* END of CR_Tai_Viet */ + +/* PROPERTY: 'Takri': Script */ +static const OnigCodePoint +CR_Takri[] = { 2, +0x11680, 0x116b9, +0x116c0, 0x116c9, +}; /* END of CR_Takri */ + +/* PROPERTY: 'Tamil': Script */ +static const OnigCodePoint +CR_Tamil[] = { 18, +0x0b82, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bbe, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcd, +0x0bd0, 0x0bd0, +0x0bd7, 0x0bd7, +0x0be6, 0x0bfa, +0x11fc0, 0x11ff1, +0x11fff, 0x11fff, +}; /* END of CR_Tamil */ + +/* PROPERTY: 'Tangsa': Script */ +static const OnigCodePoint +CR_Tangsa[] = { 2, +0x16a70, 0x16abe, +0x16ac0, 0x16ac9, +}; /* END of CR_Tangsa */ + +/* PROPERTY: 'Tangut': Script */ +static const OnigCodePoint +CR_Tangut[] = { 4, +0x16fe0, 0x16fe0, +0x17000, 0x187f7, +0x18800, 0x18aff, +0x18d00, 0x18d08, +}; /* END of CR_Tangut */ + +/* PROPERTY: 'Telugu': Script */ +static const OnigCodePoint +CR_Telugu[] = { 13, +0x0c00, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3c, 0x0c44, +0x0c46, 0x0c48, +0x0c4a, 0x0c4d, +0x0c55, 0x0c56, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c63, +0x0c66, 0x0c6f, +0x0c77, 0x0c7f, +}; /* END of CR_Telugu */ + +/* PROPERTY: 'Terminal_Punctuation': Binary Property */ +static const OnigCodePoint +CR_Terminal_Punctuation[] = { 116, +0x0021, 0x0021, +0x002c, 0x002c, +0x002e, 0x002e, +0x003a, 0x003b, +0x003f, 0x003f, +0x037e, 0x037e, +0x0387, 0x0387, +0x0589, 0x0589, +0x05c3, 0x05c3, +0x060c, 0x060c, +0x061b, 0x061b, +0x061d, 0x061f, +0x06d4, 0x06d4, +0x0700, 0x070a, +0x070c, 0x070c, +0x07f8, 0x07f9, +0x0830, 0x0835, +0x0837, 0x083e, +0x085e, 0x085e, +0x0964, 0x0965, +0x0e5a, 0x0e5b, +0x0f08, 0x0f08, +0x0f0d, 0x0f12, +0x104a, 0x104b, +0x1361, 0x1368, +0x166e, 0x166e, +0x16eb, 0x16ed, +0x1735, 0x1736, +0x17d4, 0x17d6, +0x17da, 0x17da, +0x1802, 0x1805, +0x1808, 0x1809, +0x1944, 0x1945, +0x1aa8, 0x1aab, +0x1b4e, 0x1b4f, +0x1b5a, 0x1b5b, +0x1b5d, 0x1b5f, +0x1b7d, 0x1b7f, +0x1c3b, 0x1c3f, +0x1c7e, 0x1c7f, +0x2024, 0x2024, +0x203c, 0x203d, +0x2047, 0x2049, +0x2cf9, 0x2cfb, +0x2e2e, 0x2e2e, +0x2e3c, 0x2e3c, +0x2e41, 0x2e41, +0x2e4c, 0x2e4c, +0x2e4e, 0x2e4f, +0x2e53, 0x2e54, +0x3001, 0x3002, +0xa4fe, 0xa4ff, +0xa60d, 0xa60f, +0xa6f3, 0xa6f7, +0xa876, 0xa877, +0xa8ce, 0xa8cf, +0xa92f, 0xa92f, +0xa9c7, 0xa9c9, +0xaa5d, 0xaa5f, +0xaadf, 0xaadf, +0xaaf0, 0xaaf1, +0xabeb, 0xabeb, +0xfe12, 0xfe12, +0xfe15, 0xfe16, +0xfe50, 0xfe52, +0xfe54, 0xfe57, +0xff01, 0xff01, +0xff0c, 0xff0c, +0xff0e, 0xff0e, +0xff1a, 0xff1b, +0xff1f, 0xff1f, +0xff61, 0xff61, +0xff64, 0xff64, +0x1039f, 0x1039f, +0x103d0, 0x103d0, +0x10857, 0x10857, +0x1091f, 0x1091f, +0x10a56, 0x10a57, +0x10af0, 0x10af5, +0x10b3a, 0x10b3f, +0x10b99, 0x10b9c, +0x10f55, 0x10f59, +0x10f86, 0x10f89, +0x11047, 0x1104d, +0x110be, 0x110c1, +0x11141, 0x11143, +0x111c5, 0x111c6, +0x111cd, 0x111cd, +0x111de, 0x111df, +0x11238, 0x1123c, +0x112a9, 0x112a9, +0x113d4, 0x113d5, +0x1144b, 0x1144d, +0x1145a, 0x1145b, +0x115c2, 0x115c5, +0x115c9, 0x115d7, +0x11641, 0x11642, +0x1173c, 0x1173e, +0x11944, 0x11944, +0x11946, 0x11946, +0x11a42, 0x11a43, +0x11a9b, 0x11a9c, +0x11aa1, 0x11aa2, +0x11c41, 0x11c43, +0x11c71, 0x11c71, +0x11ef7, 0x11ef8, +0x11f43, 0x11f44, +0x12470, 0x12474, +0x16a6e, 0x16a6f, +0x16af5, 0x16af5, +0x16b37, 0x16b39, +0x16b44, 0x16b44, +0x16d6e, 0x16d6f, +0x16e97, 0x16e98, +0x1bc9f, 0x1bc9f, +0x1da87, 0x1da8a, +}; /* END of CR_Terminal_Punctuation */ + +/* PROPERTY: 'Thaana': Script */ +static const OnigCodePoint +CR_Thaana[] = { 1, +0x0780, 0x07b1, +}; /* END of CR_Thaana */ + +/* PROPERTY: 'Thai': Script */ +static const OnigCodePoint +CR_Thai[] = { 2, +0x0e01, 0x0e3a, +0x0e40, 0x0e5b, +}; /* END of CR_Thai */ + +/* PROPERTY: 'Tibetan': Script */ +static const OnigCodePoint +CR_Tibetan[] = { 7, +0x0f00, 0x0f47, +0x0f49, 0x0f6c, +0x0f71, 0x0f97, +0x0f99, 0x0fbc, +0x0fbe, 0x0fcc, +0x0fce, 0x0fd4, +0x0fd9, 0x0fda, +}; /* END of CR_Tibetan */ + +/* PROPERTY: 'Tifinagh': Script */ +static const OnigCodePoint +CR_Tifinagh[] = { 3, +0x2d30, 0x2d67, +0x2d6f, 0x2d70, +0x2d7f, 0x2d7f, +}; /* END of CR_Tifinagh */ + +/* PROPERTY: 'Tirhuta': Script */ +static const OnigCodePoint +CR_Tirhuta[] = { 2, +0x11480, 0x114c7, +0x114d0, 0x114d9, +}; /* END of CR_Tirhuta */ + +/* PROPERTY: 'Todhri': Script */ +static const OnigCodePoint +CR_Todhri[] = { 1, +0x105c0, 0x105f3, +}; /* END of CR_Todhri */ + +/* PROPERTY: 'Toto': Script */ +static const OnigCodePoint +CR_Toto[] = { 1, +0x1e290, 0x1e2ae, +}; /* END of CR_Toto */ + +/* PROPERTY: 'Tulu_Tigalari': Script */ +static const OnigCodePoint +CR_Tulu_Tigalari[] = { 11, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113d5, +0x113d7, 0x113d8, +0x113e1, 0x113e2, +}; /* END of CR_Tulu_Tigalari */ + +/* PROPERTY: 'Ugaritic': Script */ +static const OnigCodePoint +CR_Ugaritic[] = { 2, +0x10380, 0x1039d, +0x1039f, 0x1039f, +}; /* END of CR_Ugaritic */ + +/* PROPERTY: 'Unified_Ideograph': Binary Property */ +static const OnigCodePoint +CR_Unified_Ideograph[] = { 17, +0x3400, 0x4dbf, +0x4e00, 0x9fff, +0xfa0e, 0xfa0f, +0xfa11, 0xfa11, +0xfa13, 0xfa14, +0xfa1f, 0xfa1f, +0xfa21, 0xfa21, +0xfa23, 0xfa24, +0xfa27, 0xfa29, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x30000, 0x3134a, +0x31350, 0x323af, +}; /* END of CR_Unified_Ideograph */ + +/* PROPERTY: 'Unknown': Script */ +static const OnigCodePoint +CR_Unknown[] = { 729, +0x0378, 0x0379, +0x0380, 0x0383, +0x038b, 0x038b, +0x038d, 0x038d, +0x03a2, 0x03a2, +0x0530, 0x0530, +0x0557, 0x0558, +0x058b, 0x058c, +0x0590, 0x0590, +0x05c8, 0x05cf, +0x05eb, 0x05ee, +0x05f5, 0x05ff, +0x070e, 0x070e, +0x074b, 0x074c, +0x07b2, 0x07bf, +0x07fb, 0x07fc, +0x082e, 0x082f, +0x083f, 0x083f, +0x085c, 0x085d, +0x085f, 0x085f, +0x086b, 0x086f, +0x088f, 0x088f, +0x0892, 0x0896, +0x0984, 0x0984, +0x098d, 0x098e, +0x0991, 0x0992, +0x09a9, 0x09a9, +0x09b1, 0x09b1, +0x09b3, 0x09b5, +0x09ba, 0x09bb, +0x09c5, 0x09c6, +0x09c9, 0x09ca, +0x09cf, 0x09d6, +0x09d8, 0x09db, +0x09de, 0x09de, +0x09e4, 0x09e5, +0x09ff, 0x0a00, +0x0a04, 0x0a04, +0x0a0b, 0x0a0e, +0x0a11, 0x0a12, +0x0a29, 0x0a29, +0x0a31, 0x0a31, +0x0a34, 0x0a34, +0x0a37, 0x0a37, +0x0a3a, 0x0a3b, +0x0a3d, 0x0a3d, +0x0a43, 0x0a46, +0x0a49, 0x0a4a, +0x0a4e, 0x0a50, +0x0a52, 0x0a58, +0x0a5d, 0x0a5d, +0x0a5f, 0x0a65, +0x0a77, 0x0a80, +0x0a84, 0x0a84, +0x0a8e, 0x0a8e, +0x0a92, 0x0a92, +0x0aa9, 0x0aa9, +0x0ab1, 0x0ab1, +0x0ab4, 0x0ab4, +0x0aba, 0x0abb, +0x0ac6, 0x0ac6, +0x0aca, 0x0aca, +0x0ace, 0x0acf, +0x0ad1, 0x0adf, +0x0ae4, 0x0ae5, +0x0af2, 0x0af8, +0x0b00, 0x0b00, +0x0b04, 0x0b04, +0x0b0d, 0x0b0e, +0x0b11, 0x0b12, +0x0b29, 0x0b29, +0x0b31, 0x0b31, +0x0b34, 0x0b34, +0x0b3a, 0x0b3b, +0x0b45, 0x0b46, +0x0b49, 0x0b4a, +0x0b4e, 0x0b54, +0x0b58, 0x0b5b, +0x0b5e, 0x0b5e, +0x0b64, 0x0b65, +0x0b78, 0x0b81, +0x0b84, 0x0b84, +0x0b8b, 0x0b8d, +0x0b91, 0x0b91, +0x0b96, 0x0b98, +0x0b9b, 0x0b9b, +0x0b9d, 0x0b9d, +0x0ba0, 0x0ba2, +0x0ba5, 0x0ba7, +0x0bab, 0x0bad, +0x0bba, 0x0bbd, +0x0bc3, 0x0bc5, +0x0bc9, 0x0bc9, +0x0bce, 0x0bcf, +0x0bd1, 0x0bd6, +0x0bd8, 0x0be5, +0x0bfb, 0x0bff, +0x0c0d, 0x0c0d, +0x0c11, 0x0c11, +0x0c29, 0x0c29, +0x0c3a, 0x0c3b, +0x0c45, 0x0c45, +0x0c49, 0x0c49, +0x0c4e, 0x0c54, +0x0c57, 0x0c57, +0x0c5b, 0x0c5c, +0x0c5e, 0x0c5f, +0x0c64, 0x0c65, +0x0c70, 0x0c76, +0x0c8d, 0x0c8d, +0x0c91, 0x0c91, +0x0ca9, 0x0ca9, +0x0cb4, 0x0cb4, +0x0cba, 0x0cbb, +0x0cc5, 0x0cc5, +0x0cc9, 0x0cc9, +0x0cce, 0x0cd4, +0x0cd7, 0x0cdc, +0x0cdf, 0x0cdf, +0x0ce4, 0x0ce5, +0x0cf0, 0x0cf0, +0x0cf4, 0x0cff, +0x0d0d, 0x0d0d, +0x0d11, 0x0d11, +0x0d45, 0x0d45, +0x0d49, 0x0d49, +0x0d50, 0x0d53, +0x0d64, 0x0d65, +0x0d80, 0x0d80, +0x0d84, 0x0d84, +0x0d97, 0x0d99, +0x0db2, 0x0db2, +0x0dbc, 0x0dbc, +0x0dbe, 0x0dbf, +0x0dc7, 0x0dc9, +0x0dcb, 0x0dce, +0x0dd5, 0x0dd5, +0x0dd7, 0x0dd7, +0x0de0, 0x0de5, +0x0df0, 0x0df1, +0x0df5, 0x0e00, +0x0e3b, 0x0e3e, +0x0e5c, 0x0e80, +0x0e83, 0x0e83, +0x0e85, 0x0e85, +0x0e8b, 0x0e8b, +0x0ea4, 0x0ea4, +0x0ea6, 0x0ea6, +0x0ebe, 0x0ebf, +0x0ec5, 0x0ec5, +0x0ec7, 0x0ec7, +0x0ecf, 0x0ecf, +0x0eda, 0x0edb, +0x0ee0, 0x0eff, +0x0f48, 0x0f48, +0x0f6d, 0x0f70, +0x0f98, 0x0f98, +0x0fbd, 0x0fbd, +0x0fcd, 0x0fcd, +0x0fdb, 0x0fff, +0x10c6, 0x10c6, +0x10c8, 0x10cc, +0x10ce, 0x10cf, +0x1249, 0x1249, +0x124e, 0x124f, +0x1257, 0x1257, +0x1259, 0x1259, +0x125e, 0x125f, +0x1289, 0x1289, +0x128e, 0x128f, +0x12b1, 0x12b1, +0x12b6, 0x12b7, +0x12bf, 0x12bf, +0x12c1, 0x12c1, +0x12c6, 0x12c7, +0x12d7, 0x12d7, +0x1311, 0x1311, +0x1316, 0x1317, +0x135b, 0x135c, +0x137d, 0x137f, +0x139a, 0x139f, +0x13f6, 0x13f7, +0x13fe, 0x13ff, +0x169d, 0x169f, +0x16f9, 0x16ff, +0x1716, 0x171e, +0x1737, 0x173f, +0x1754, 0x175f, +0x176d, 0x176d, +0x1771, 0x1771, +0x1774, 0x177f, +0x17de, 0x17df, +0x17ea, 0x17ef, +0x17fa, 0x17ff, +0x181a, 0x181f, +0x1879, 0x187f, +0x18ab, 0x18af, +0x18f6, 0x18ff, +0x191f, 0x191f, +0x192c, 0x192f, +0x193c, 0x193f, +0x1941, 0x1943, +0x196e, 0x196f, +0x1975, 0x197f, +0x19ac, 0x19af, +0x19ca, 0x19cf, +0x19db, 0x19dd, +0x1a1c, 0x1a1d, +0x1a5f, 0x1a5f, +0x1a7d, 0x1a7e, +0x1a8a, 0x1a8f, +0x1a9a, 0x1a9f, +0x1aae, 0x1aaf, +0x1acf, 0x1aff, +0x1b4d, 0x1b4d, +0x1bf4, 0x1bfb, +0x1c38, 0x1c3a, +0x1c4a, 0x1c4c, +0x1c8b, 0x1c8f, +0x1cbb, 0x1cbc, +0x1cc8, 0x1ccf, +0x1cfb, 0x1cff, +0x1f16, 0x1f17, +0x1f1e, 0x1f1f, +0x1f46, 0x1f47, +0x1f4e, 0x1f4f, +0x1f58, 0x1f58, +0x1f5a, 0x1f5a, +0x1f5c, 0x1f5c, +0x1f5e, 0x1f5e, +0x1f7e, 0x1f7f, +0x1fb5, 0x1fb5, +0x1fc5, 0x1fc5, +0x1fd4, 0x1fd5, +0x1fdc, 0x1fdc, +0x1ff0, 0x1ff1, +0x1ff5, 0x1ff5, +0x1fff, 0x1fff, +0x2065, 0x2065, +0x2072, 0x2073, +0x208f, 0x208f, +0x209d, 0x209f, +0x20c1, 0x20cf, +0x20f1, 0x20ff, +0x218c, 0x218f, +0x242a, 0x243f, +0x244b, 0x245f, +0x2b74, 0x2b75, +0x2b96, 0x2b96, +0x2cf4, 0x2cf8, +0x2d26, 0x2d26, +0x2d28, 0x2d2c, +0x2d2e, 0x2d2f, +0x2d68, 0x2d6e, +0x2d71, 0x2d7e, +0x2d97, 0x2d9f, +0x2da7, 0x2da7, +0x2daf, 0x2daf, +0x2db7, 0x2db7, +0x2dbf, 0x2dbf, +0x2dc7, 0x2dc7, +0x2dcf, 0x2dcf, +0x2dd7, 0x2dd7, +0x2ddf, 0x2ddf, +0x2e5e, 0x2e7f, +0x2e9a, 0x2e9a, +0x2ef4, 0x2eff, +0x2fd6, 0x2fef, +0x3040, 0x3040, +0x3097, 0x3098, +0x3100, 0x3104, +0x3130, 0x3130, +0x318f, 0x318f, +0x31e6, 0x31ee, +0x321f, 0x321f, +0xa48d, 0xa48f, +0xa4c7, 0xa4cf, +0xa62c, 0xa63f, +0xa6f8, 0xa6ff, +0xa7ce, 0xa7cf, +0xa7d2, 0xa7d2, +0xa7d4, 0xa7d4, +0xa7dd, 0xa7f1, +0xa82d, 0xa82f, +0xa83a, 0xa83f, +0xa878, 0xa87f, +0xa8c6, 0xa8cd, +0xa8da, 0xa8df, +0xa954, 0xa95e, +0xa97d, 0xa97f, +0xa9ce, 0xa9ce, +0xa9da, 0xa9dd, +0xa9ff, 0xa9ff, +0xaa37, 0xaa3f, +0xaa4e, 0xaa4f, +0xaa5a, 0xaa5b, +0xaac3, 0xaada, +0xaaf7, 0xab00, +0xab07, 0xab08, +0xab0f, 0xab10, +0xab17, 0xab1f, +0xab27, 0xab27, +0xab2f, 0xab2f, +0xab6c, 0xab6f, +0xabee, 0xabef, +0xabfa, 0xabff, +0xd7a4, 0xd7af, +0xd7c7, 0xd7ca, +0xd7fc, 0xf8ff, +0xfa6e, 0xfa6f, +0xfada, 0xfaff, +0xfb07, 0xfb12, +0xfb18, 0xfb1c, +0xfb37, 0xfb37, +0xfb3d, 0xfb3d, +0xfb3f, 0xfb3f, +0xfb42, 0xfb42, +0xfb45, 0xfb45, +0xfbc3, 0xfbd2, +0xfd90, 0xfd91, +0xfdc8, 0xfdce, +0xfdd0, 0xfdef, +0xfe1a, 0xfe1f, +0xfe53, 0xfe53, +0xfe67, 0xfe67, +0xfe6c, 0xfe6f, +0xfe75, 0xfe75, +0xfefd, 0xfefe, +0xff00, 0xff00, +0xffbf, 0xffc1, +0xffc8, 0xffc9, +0xffd0, 0xffd1, +0xffd8, 0xffd9, +0xffdd, 0xffdf, +0xffe7, 0xffe7, +0xffef, 0xfff8, +0xfffe, 0xffff, +0x1000c, 0x1000c, +0x10027, 0x10027, +0x1003b, 0x1003b, +0x1003e, 0x1003e, +0x1004e, 0x1004f, +0x1005e, 0x1007f, +0x100fb, 0x100ff, +0x10103, 0x10106, +0x10134, 0x10136, +0x1018f, 0x1018f, +0x1019d, 0x1019f, +0x101a1, 0x101cf, +0x101fe, 0x1027f, +0x1029d, 0x1029f, +0x102d1, 0x102df, +0x102fc, 0x102ff, +0x10324, 0x1032c, +0x1034b, 0x1034f, +0x1037b, 0x1037f, +0x1039e, 0x1039e, +0x103c4, 0x103c7, +0x103d6, 0x103ff, +0x1049e, 0x1049f, +0x104aa, 0x104af, +0x104d4, 0x104d7, +0x104fc, 0x104ff, +0x10528, 0x1052f, +0x10564, 0x1056e, +0x1057b, 0x1057b, +0x1058b, 0x1058b, +0x10593, 0x10593, +0x10596, 0x10596, +0x105a2, 0x105a2, +0x105b2, 0x105b2, +0x105ba, 0x105ba, +0x105bd, 0x105bf, +0x105f4, 0x105ff, +0x10737, 0x1073f, +0x10756, 0x1075f, +0x10768, 0x1077f, +0x10786, 0x10786, +0x107b1, 0x107b1, +0x107bb, 0x107ff, +0x10806, 0x10807, +0x10809, 0x10809, +0x10836, 0x10836, +0x10839, 0x1083b, +0x1083d, 0x1083e, +0x10856, 0x10856, +0x1089f, 0x108a6, +0x108b0, 0x108df, +0x108f3, 0x108f3, +0x108f6, 0x108fa, +0x1091c, 0x1091e, +0x1093a, 0x1093e, +0x10940, 0x1097f, +0x109b8, 0x109bb, +0x109d0, 0x109d1, +0x10a04, 0x10a04, +0x10a07, 0x10a0b, +0x10a14, 0x10a14, +0x10a18, 0x10a18, +0x10a36, 0x10a37, +0x10a3b, 0x10a3e, +0x10a49, 0x10a4f, +0x10a59, 0x10a5f, +0x10aa0, 0x10abf, +0x10ae7, 0x10aea, +0x10af7, 0x10aff, +0x10b36, 0x10b38, +0x10b56, 0x10b57, +0x10b73, 0x10b77, +0x10b92, 0x10b98, +0x10b9d, 0x10ba8, +0x10bb0, 0x10bff, +0x10c49, 0x10c7f, +0x10cb3, 0x10cbf, +0x10cf3, 0x10cf9, +0x10d28, 0x10d2f, +0x10d3a, 0x10d3f, +0x10d66, 0x10d68, +0x10d86, 0x10d8d, +0x10d90, 0x10e5f, +0x10e7f, 0x10e7f, +0x10eaa, 0x10eaa, +0x10eae, 0x10eaf, +0x10eb2, 0x10ec1, +0x10ec5, 0x10efb, +0x10f28, 0x10f2f, +0x10f5a, 0x10f6f, +0x10f8a, 0x10faf, +0x10fcc, 0x10fdf, +0x10ff7, 0x10fff, +0x1104e, 0x11051, +0x11076, 0x1107e, +0x110c3, 0x110cc, +0x110ce, 0x110cf, +0x110e9, 0x110ef, +0x110fa, 0x110ff, +0x11135, 0x11135, +0x11148, 0x1114f, +0x11177, 0x1117f, +0x111e0, 0x111e0, +0x111f5, 0x111ff, +0x11212, 0x11212, +0x11242, 0x1127f, +0x11287, 0x11287, +0x11289, 0x11289, +0x1128e, 0x1128e, +0x1129e, 0x1129e, +0x112aa, 0x112af, +0x112eb, 0x112ef, +0x112fa, 0x112ff, +0x11304, 0x11304, +0x1130d, 0x1130e, +0x11311, 0x11312, +0x11329, 0x11329, +0x11331, 0x11331, +0x11334, 0x11334, +0x1133a, 0x1133a, +0x11345, 0x11346, +0x11349, 0x1134a, +0x1134e, 0x1134f, +0x11351, 0x11356, +0x11358, 0x1135c, +0x11364, 0x11365, +0x1136d, 0x1136f, +0x11375, 0x1137f, +0x1138a, 0x1138a, +0x1138c, 0x1138d, +0x1138f, 0x1138f, +0x113b6, 0x113b6, +0x113c1, 0x113c1, +0x113c3, 0x113c4, +0x113c6, 0x113c6, +0x113cb, 0x113cb, +0x113d6, 0x113d6, +0x113d9, 0x113e0, +0x113e3, 0x113ff, +0x1145c, 0x1145c, +0x11462, 0x1147f, +0x114c8, 0x114cf, +0x114da, 0x1157f, +0x115b6, 0x115b7, +0x115de, 0x115ff, +0x11645, 0x1164f, +0x1165a, 0x1165f, +0x1166d, 0x1167f, +0x116ba, 0x116bf, +0x116ca, 0x116cf, +0x116e4, 0x116ff, +0x1171b, 0x1171c, +0x1172c, 0x1172f, +0x11747, 0x117ff, +0x1183c, 0x1189f, +0x118f3, 0x118fe, +0x11907, 0x11908, +0x1190a, 0x1190b, +0x11914, 0x11914, +0x11917, 0x11917, +0x11936, 0x11936, +0x11939, 0x1193a, +0x11947, 0x1194f, +0x1195a, 0x1199f, +0x119a8, 0x119a9, +0x119d8, 0x119d9, +0x119e5, 0x119ff, +0x11a48, 0x11a4f, +0x11aa3, 0x11aaf, +0x11af9, 0x11aff, +0x11b0a, 0x11bbf, +0x11be2, 0x11bef, +0x11bfa, 0x11bff, +0x11c09, 0x11c09, +0x11c37, 0x11c37, +0x11c46, 0x11c4f, +0x11c6d, 0x11c6f, +0x11c90, 0x11c91, +0x11ca8, 0x11ca8, +0x11cb7, 0x11cff, +0x11d07, 0x11d07, +0x11d0a, 0x11d0a, +0x11d37, 0x11d39, +0x11d3b, 0x11d3b, +0x11d3e, 0x11d3e, +0x11d48, 0x11d4f, +0x11d5a, 0x11d5f, +0x11d66, 0x11d66, +0x11d69, 0x11d69, +0x11d8f, 0x11d8f, +0x11d92, 0x11d92, +0x11d99, 0x11d9f, +0x11daa, 0x11edf, +0x11ef9, 0x11eff, +0x11f11, 0x11f11, +0x11f3b, 0x11f3d, +0x11f5b, 0x11faf, +0x11fb1, 0x11fbf, +0x11ff2, 0x11ffe, +0x1239a, 0x123ff, +0x1246f, 0x1246f, +0x12475, 0x1247f, +0x12544, 0x12f8f, +0x12ff3, 0x12fff, +0x13456, 0x1345f, +0x143fb, 0x143ff, +0x14647, 0x160ff, +0x1613a, 0x167ff, +0x16a39, 0x16a3f, +0x16a5f, 0x16a5f, +0x16a6a, 0x16a6d, +0x16abf, 0x16abf, +0x16aca, 0x16acf, +0x16aee, 0x16aef, +0x16af6, 0x16aff, +0x16b46, 0x16b4f, +0x16b5a, 0x16b5a, +0x16b62, 0x16b62, +0x16b78, 0x16b7c, +0x16b90, 0x16d3f, +0x16d7a, 0x16e3f, +0x16e9b, 0x16eff, +0x16f4b, 0x16f4e, +0x16f88, 0x16f8e, +0x16fa0, 0x16fdf, +0x16fe5, 0x16fef, +0x16ff2, 0x16fff, +0x187f8, 0x187ff, +0x18cd6, 0x18cfe, +0x18d09, 0x1afef, +0x1aff4, 0x1aff4, +0x1affc, 0x1affc, +0x1afff, 0x1afff, +0x1b123, 0x1b131, +0x1b133, 0x1b14f, +0x1b153, 0x1b154, +0x1b156, 0x1b163, +0x1b168, 0x1b16f, +0x1b2fc, 0x1bbff, +0x1bc6b, 0x1bc6f, +0x1bc7d, 0x1bc7f, +0x1bc89, 0x1bc8f, +0x1bc9a, 0x1bc9b, +0x1bca4, 0x1cbff, +0x1ccfa, 0x1ccff, +0x1ceb4, 0x1ceff, +0x1cf2e, 0x1cf2f, +0x1cf47, 0x1cf4f, +0x1cfc4, 0x1cfff, +0x1d0f6, 0x1d0ff, +0x1d127, 0x1d128, +0x1d1eb, 0x1d1ff, +0x1d246, 0x1d2bf, +0x1d2d4, 0x1d2df, +0x1d2f4, 0x1d2ff, +0x1d357, 0x1d35f, +0x1d379, 0x1d3ff, +0x1d455, 0x1d455, +0x1d49d, 0x1d49d, +0x1d4a0, 0x1d4a1, +0x1d4a3, 0x1d4a4, +0x1d4a7, 0x1d4a8, +0x1d4ad, 0x1d4ad, +0x1d4ba, 0x1d4ba, +0x1d4bc, 0x1d4bc, +0x1d4c4, 0x1d4c4, +0x1d506, 0x1d506, +0x1d50b, 0x1d50c, +0x1d515, 0x1d515, +0x1d51d, 0x1d51d, +0x1d53a, 0x1d53a, +0x1d53f, 0x1d53f, +0x1d545, 0x1d545, +0x1d547, 0x1d549, +0x1d551, 0x1d551, +0x1d6a6, 0x1d6a7, +0x1d7cc, 0x1d7cd, +0x1da8c, 0x1da9a, +0x1daa0, 0x1daa0, +0x1dab0, 0x1deff, +0x1df1f, 0x1df24, +0x1df2b, 0x1dfff, +0x1e007, 0x1e007, +0x1e019, 0x1e01a, +0x1e022, 0x1e022, +0x1e025, 0x1e025, +0x1e02b, 0x1e02f, +0x1e06e, 0x1e08e, +0x1e090, 0x1e0ff, +0x1e12d, 0x1e12f, +0x1e13e, 0x1e13f, +0x1e14a, 0x1e14d, +0x1e150, 0x1e28f, +0x1e2af, 0x1e2bf, +0x1e2fa, 0x1e2fe, +0x1e300, 0x1e4cf, +0x1e4fa, 0x1e5cf, +0x1e5fb, 0x1e5fe, +0x1e600, 0x1e7df, +0x1e7e7, 0x1e7e7, +0x1e7ec, 0x1e7ec, +0x1e7ef, 0x1e7ef, +0x1e7ff, 0x1e7ff, +0x1e8c5, 0x1e8c6, +0x1e8d7, 0x1e8ff, +0x1e94c, 0x1e94f, +0x1e95a, 0x1e95d, +0x1e960, 0x1ec70, +0x1ecb5, 0x1ed00, +0x1ed3e, 0x1edff, +0x1ee04, 0x1ee04, +0x1ee20, 0x1ee20, +0x1ee23, 0x1ee23, +0x1ee25, 0x1ee26, +0x1ee28, 0x1ee28, +0x1ee33, 0x1ee33, +0x1ee38, 0x1ee38, +0x1ee3a, 0x1ee3a, +0x1ee3c, 0x1ee41, +0x1ee43, 0x1ee46, +0x1ee48, 0x1ee48, +0x1ee4a, 0x1ee4a, +0x1ee4c, 0x1ee4c, +0x1ee50, 0x1ee50, +0x1ee53, 0x1ee53, +0x1ee55, 0x1ee56, +0x1ee58, 0x1ee58, +0x1ee5a, 0x1ee5a, +0x1ee5c, 0x1ee5c, +0x1ee5e, 0x1ee5e, +0x1ee60, 0x1ee60, +0x1ee63, 0x1ee63, +0x1ee65, 0x1ee66, +0x1ee6b, 0x1ee6b, +0x1ee73, 0x1ee73, +0x1ee78, 0x1ee78, +0x1ee7d, 0x1ee7d, +0x1ee7f, 0x1ee7f, +0x1ee8a, 0x1ee8a, +0x1ee9c, 0x1eea0, +0x1eea4, 0x1eea4, +0x1eeaa, 0x1eeaa, +0x1eebc, 0x1eeef, +0x1eef2, 0x1efff, +0x1f02c, 0x1f02f, +0x1f094, 0x1f09f, +0x1f0af, 0x1f0b0, +0x1f0c0, 0x1f0c0, +0x1f0d0, 0x1f0d0, +0x1f0f6, 0x1f0ff, +0x1f1ae, 0x1f1e5, +0x1f203, 0x1f20f, +0x1f23c, 0x1f23f, +0x1f249, 0x1f24f, +0x1f252, 0x1f25f, +0x1f266, 0x1f2ff, +0x1f6d8, 0x1f6db, +0x1f6ed, 0x1f6ef, +0x1f6fd, 0x1f6ff, +0x1f777, 0x1f77a, +0x1f7da, 0x1f7df, +0x1f7ec, 0x1f7ef, +0x1f7f1, 0x1f7ff, +0x1f80c, 0x1f80f, +0x1f848, 0x1f84f, +0x1f85a, 0x1f85f, +0x1f888, 0x1f88f, +0x1f8ae, 0x1f8af, +0x1f8bc, 0x1f8bf, +0x1f8c2, 0x1f8ff, +0x1fa54, 0x1fa5f, +0x1fa6e, 0x1fa6f, +0x1fa7d, 0x1fa7f, +0x1fa8a, 0x1fa8e, +0x1fac7, 0x1facd, +0x1fadd, 0x1fade, +0x1faea, 0x1faef, +0x1faf9, 0x1faff, +0x1fb93, 0x1fb93, +0x1fbfa, 0x1ffff, +0x2a6e0, 0x2a6ff, +0x2b73a, 0x2b73f, +0x2b81e, 0x2b81f, +0x2cea2, 0x2ceaf, +0x2ebe1, 0x2ebef, +0x2ee5e, 0x2f7ff, +0x2fa1e, 0x2ffff, +0x3134b, 0x3134f, +0x323b0, 0xe0000, +0xe0002, 0xe001f, +0xe0080, 0xe00ff, +0xe01f0, 0x10ffff, +}; /* END of CR_Unknown */ + +/* PROPERTY: 'Uppercase': Derived Property */ +#define CR_Uppercase CR_Upper + +/* PROPERTY: 'Vai': Script */ +static const OnigCodePoint +CR_Vai[] = { 1, +0xa500, 0xa62b, +}; /* END of CR_Vai */ + +/* PROPERTY: 'Variation_Selector': Binary Property */ +static const OnigCodePoint +CR_Variation_Selector[] = { 4, +0x180b, 0x180d, +0x180f, 0x180f, +0xfe00, 0xfe0f, +0xe0100, 0xe01ef, +}; /* END of CR_Variation_Selector */ + +/* PROPERTY: 'Vithkuqi': Script */ +static const OnigCodePoint +CR_Vithkuqi[] = { 8, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +}; /* END of CR_Vithkuqi */ + +/* PROPERTY: 'Wancho': Script */ +static const OnigCodePoint +CR_Wancho[] = { 2, +0x1e2c0, 0x1e2f9, +0x1e2ff, 0x1e2ff, +}; /* END of CR_Wancho */ + +/* PROPERTY: 'Warang_Citi': Script */ +static const OnigCodePoint +CR_Warang_Citi[] = { 2, +0x118a0, 0x118f2, +0x118ff, 0x118ff, +}; /* END of CR_Warang_Citi */ + +/* PROPERTY: 'White_Space': Binary Property */ +#define CR_White_Space CR_Space + +/* PROPERTY: 'XID_Continue': Derived Property */ +static const OnigCodePoint +CR_XID_Continue[] = { 800, +0x0030, 0x0039, +0x0041, 0x005a, +0x005f, 0x005f, +0x0061, 0x007a, +0x00aa, 0x00aa, +0x00b5, 0x00b5, +0x00b7, 0x00b7, +0x00ba, 0x00ba, +0x00c0, 0x00d6, +0x00d8, 0x00f6, +0x00f8, 0x02c1, +0x02c6, 0x02d1, +0x02e0, 0x02e4, +0x02ec, 0x02ec, +0x02ee, 0x02ee, +0x0300, 0x0374, +0x0376, 0x0377, +0x037b, 0x037d, +0x037f, 0x037f, +0x0386, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x03f5, +0x03f7, 0x0481, +0x0483, 0x0487, +0x048a, 0x052f, +0x0531, 0x0556, +0x0559, 0x0559, +0x0560, 0x0588, +0x0591, 0x05bd, +0x05bf, 0x05bf, +0x05c1, 0x05c2, +0x05c4, 0x05c5, +0x05c7, 0x05c7, +0x05d0, 0x05ea, +0x05ef, 0x05f2, +0x0610, 0x061a, +0x0620, 0x0669, +0x066e, 0x06d3, +0x06d5, 0x06dc, +0x06df, 0x06e8, +0x06ea, 0x06fc, +0x06ff, 0x06ff, +0x0710, 0x074a, +0x074d, 0x07b1, +0x07c0, 0x07f5, +0x07fa, 0x07fa, +0x07fd, 0x07fd, +0x0800, 0x082d, +0x0840, 0x085b, +0x0860, 0x086a, +0x0870, 0x0887, +0x0889, 0x088e, +0x0897, 0x08e1, +0x08e3, 0x0963, +0x0966, 0x096f, +0x0971, 0x0983, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bc, 0x09c4, +0x09c7, 0x09c8, +0x09cb, 0x09ce, +0x09d7, 0x09d7, +0x09dc, 0x09dd, +0x09df, 0x09e3, +0x09e6, 0x09f1, +0x09fc, 0x09fc, +0x09fe, 0x09fe, +0x0a01, 0x0a03, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a3c, 0x0a3c, +0x0a3e, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4d, +0x0a51, 0x0a51, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a66, 0x0a75, +0x0a81, 0x0a83, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abc, 0x0ac5, +0x0ac7, 0x0ac9, +0x0acb, 0x0acd, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae3, +0x0ae6, 0x0aef, +0x0af9, 0x0aff, +0x0b01, 0x0b03, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3c, 0x0b44, +0x0b47, 0x0b48, +0x0b4b, 0x0b4d, +0x0b55, 0x0b57, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b63, +0x0b66, 0x0b6f, +0x0b71, 0x0b71, +0x0b82, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bbe, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcd, +0x0bd0, 0x0bd0, +0x0bd7, 0x0bd7, +0x0be6, 0x0bef, +0x0c00, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3c, 0x0c44, +0x0c46, 0x0c48, +0x0c4a, 0x0c4d, +0x0c55, 0x0c56, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c63, +0x0c66, 0x0c6f, +0x0c80, 0x0c83, +0x0c85, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbc, 0x0cc4, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccd, +0x0cd5, 0x0cd6, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce3, +0x0ce6, 0x0cef, +0x0cf1, 0x0cf3, +0x0d00, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d44, +0x0d46, 0x0d48, +0x0d4a, 0x0d4e, +0x0d54, 0x0d57, +0x0d5f, 0x0d63, +0x0d66, 0x0d6f, +0x0d7a, 0x0d7f, +0x0d81, 0x0d83, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0dca, 0x0dca, +0x0dcf, 0x0dd4, +0x0dd6, 0x0dd6, +0x0dd8, 0x0ddf, +0x0de6, 0x0def, +0x0df2, 0x0df3, +0x0e01, 0x0e3a, +0x0e40, 0x0e4e, +0x0e50, 0x0e59, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0ec8, 0x0ece, +0x0ed0, 0x0ed9, +0x0edc, 0x0edf, +0x0f00, 0x0f00, +0x0f18, 0x0f19, +0x0f20, 0x0f29, +0x0f35, 0x0f35, +0x0f37, 0x0f37, +0x0f39, 0x0f39, +0x0f3e, 0x0f47, +0x0f49, 0x0f6c, +0x0f71, 0x0f84, +0x0f86, 0x0f97, +0x0f99, 0x0fbc, +0x0fc6, 0x0fc6, +0x1000, 0x1049, +0x1050, 0x109d, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x10fa, +0x10fc, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x135d, 0x135f, +0x1369, 0x1371, +0x1380, 0x138f, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1401, 0x166c, +0x166f, 0x167f, +0x1681, 0x169a, +0x16a0, 0x16ea, +0x16ee, 0x16f8, +0x1700, 0x1715, +0x171f, 0x1734, +0x1740, 0x1753, +0x1760, 0x176c, +0x176e, 0x1770, +0x1772, 0x1773, +0x1780, 0x17d3, +0x17d7, 0x17d7, +0x17dc, 0x17dd, +0x17e0, 0x17e9, +0x180b, 0x180d, +0x180f, 0x1819, +0x1820, 0x1878, +0x1880, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1920, 0x192b, +0x1930, 0x193b, +0x1946, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x19d0, 0x19da, +0x1a00, 0x1a1b, +0x1a20, 0x1a5e, +0x1a60, 0x1a7c, +0x1a7f, 0x1a89, +0x1a90, 0x1a99, +0x1aa7, 0x1aa7, +0x1ab0, 0x1abd, +0x1abf, 0x1ace, +0x1b00, 0x1b4c, +0x1b50, 0x1b59, +0x1b6b, 0x1b73, +0x1b80, 0x1bf3, +0x1c00, 0x1c37, +0x1c40, 0x1c49, +0x1c4d, 0x1c7d, +0x1c80, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1cd0, 0x1cd2, +0x1cd4, 0x1cfa, +0x1d00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fbc, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fcc, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fe0, 0x1fec, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffc, +0x200c, 0x200d, +0x203f, 0x2040, +0x2054, 0x2054, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x20d0, 0x20dc, +0x20e1, 0x20e1, +0x20e5, 0x20f0, +0x2102, 0x2102, +0x2107, 0x2107, +0x210a, 0x2113, +0x2115, 0x2115, +0x2118, 0x211d, +0x2124, 0x2124, +0x2126, 0x2126, +0x2128, 0x2128, +0x212a, 0x2139, +0x213c, 0x213f, +0x2145, 0x2149, +0x214e, 0x214e, +0x2160, 0x2188, +0x2c00, 0x2ce4, +0x2ceb, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d6f, +0x2d7f, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x2de0, 0x2dff, +0x3005, 0x3007, +0x3021, 0x302f, +0x3031, 0x3035, +0x3038, 0x303c, +0x3041, 0x3096, +0x3099, 0x309a, +0x309d, 0x309f, +0x30a1, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x31a0, 0x31bf, +0x31f0, 0x31ff, +0x3400, 0x4dbf, +0x4e00, 0xa48c, +0xa4d0, 0xa4fd, +0xa500, 0xa60c, +0xa610, 0xa62b, +0xa640, 0xa66f, +0xa674, 0xa67d, +0xa67f, 0xa6f1, +0xa717, 0xa71f, +0xa722, 0xa788, +0xa78b, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa827, +0xa82c, 0xa82c, +0xa840, 0xa873, +0xa880, 0xa8c5, +0xa8d0, 0xa8d9, +0xa8e0, 0xa8f7, +0xa8fb, 0xa8fb, +0xa8fd, 0xa92d, +0xa930, 0xa953, +0xa960, 0xa97c, +0xa980, 0xa9c0, +0xa9cf, 0xa9d9, +0xa9e0, 0xa9fe, +0xaa00, 0xaa36, +0xaa40, 0xaa4d, +0xaa50, 0xaa59, +0xaa60, 0xaa76, +0xaa7a, 0xaac2, +0xaadb, 0xaadd, +0xaae0, 0xaaef, +0xaaf2, 0xaaf6, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab5a, +0xab5c, 0xab69, +0xab70, 0xabea, +0xabec, 0xabed, +0xabf0, 0xabf9, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xf900, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb28, +0xfb2a, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbb1, +0xfbd3, 0xfc5d, +0xfc64, 0xfd3d, +0xfd50, 0xfd8f, +0xfd92, 0xfdc7, +0xfdf0, 0xfdf9, +0xfe00, 0xfe0f, +0xfe20, 0xfe2f, +0xfe33, 0xfe34, +0xfe4d, 0xfe4f, +0xfe71, 0xfe71, +0xfe73, 0xfe73, +0xfe77, 0xfe77, +0xfe79, 0xfe79, +0xfe7b, 0xfe7b, +0xfe7d, 0xfe7d, +0xfe7f, 0xfefc, +0xff10, 0xff19, +0xff21, 0xff3a, +0xff3f, 0xff3f, +0xff41, 0xff5a, +0xff65, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10140, 0x10174, +0x101fd, 0x101fd, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x102e0, 0x102e0, +0x10300, 0x1031f, +0x1032d, 0x1034a, +0x10350, 0x1037a, +0x10380, 0x1039d, +0x103a0, 0x103c3, +0x103c8, 0x103cf, +0x103d1, 0x103d5, +0x10400, 0x1049d, +0x104a0, 0x104a9, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10860, 0x10876, +0x10880, 0x1089e, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x10900, 0x10915, +0x10920, 0x10939, +0x10980, 0x109b7, +0x109be, 0x109bf, +0x10a00, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a38, 0x10a3a, +0x10a3f, 0x10a3f, +0x10a60, 0x10a7c, +0x10a80, 0x10a9c, +0x10ac0, 0x10ac7, +0x10ac9, 0x10ae6, +0x10b00, 0x10b35, +0x10b40, 0x10b55, +0x10b60, 0x10b72, +0x10b80, 0x10b91, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10d00, 0x10d27, +0x10d30, 0x10d39, +0x10d40, 0x10d65, +0x10d69, 0x10d6d, +0x10d6f, 0x10d85, +0x10e80, 0x10ea9, +0x10eab, 0x10eac, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10efc, 0x10f1c, +0x10f27, 0x10f27, +0x10f30, 0x10f50, +0x10f70, 0x10f85, +0x10fb0, 0x10fc4, +0x10fe0, 0x10ff6, +0x11000, 0x11046, +0x11066, 0x11075, +0x1107f, 0x110ba, +0x110c2, 0x110c2, +0x110d0, 0x110e8, +0x110f0, 0x110f9, +0x11100, 0x11134, +0x11136, 0x1113f, +0x11144, 0x11147, +0x11150, 0x11173, +0x11176, 0x11176, +0x11180, 0x111c4, +0x111c9, 0x111cc, +0x111ce, 0x111da, +0x111dc, 0x111dc, +0x11200, 0x11211, +0x11213, 0x11237, +0x1123e, 0x11241, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a8, +0x112b0, 0x112ea, +0x112f0, 0x112f9, +0x11300, 0x11303, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133b, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134d, +0x11350, 0x11350, +0x11357, 0x11357, +0x1135d, 0x11363, +0x11366, 0x1136c, +0x11370, 0x11374, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113d3, +0x113e1, 0x113e2, +0x11400, 0x1144a, +0x11450, 0x11459, +0x1145e, 0x11461, +0x11480, 0x114c5, +0x114c7, 0x114c7, +0x114d0, 0x114d9, +0x11580, 0x115b5, +0x115b8, 0x115c0, +0x115d8, 0x115dd, +0x11600, 0x11640, +0x11644, 0x11644, +0x11650, 0x11659, +0x11680, 0x116b8, +0x116c0, 0x116c9, +0x116d0, 0x116e3, +0x11700, 0x1171a, +0x1171d, 0x1172b, +0x11730, 0x11739, +0x11740, 0x11746, +0x11800, 0x1183a, +0x118a0, 0x118e9, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x11935, +0x11937, 0x11938, +0x1193b, 0x11943, +0x11950, 0x11959, +0x119a0, 0x119a7, +0x119aa, 0x119d7, +0x119da, 0x119e1, +0x119e3, 0x119e4, +0x11a00, 0x11a3e, +0x11a47, 0x11a47, +0x11a50, 0x11a99, +0x11a9d, 0x11a9d, +0x11ab0, 0x11af8, +0x11bc0, 0x11be0, +0x11bf0, 0x11bf9, +0x11c00, 0x11c08, +0x11c0a, 0x11c36, +0x11c38, 0x11c40, +0x11c50, 0x11c59, +0x11c72, 0x11c8f, +0x11c92, 0x11ca7, +0x11ca9, 0x11cb6, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d47, +0x11d50, 0x11d59, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d8e, +0x11d90, 0x11d91, +0x11d93, 0x11d98, +0x11da0, 0x11da9, +0x11ee0, 0x11ef6, +0x11f00, 0x11f10, +0x11f12, 0x11f3a, +0x11f3e, 0x11f42, +0x11f50, 0x11f5a, +0x11fb0, 0x11fb0, +0x12000, 0x12399, +0x12400, 0x1246e, +0x12480, 0x12543, +0x12f90, 0x12ff0, +0x13000, 0x1342f, +0x13440, 0x13455, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x16139, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a60, 0x16a69, +0x16a70, 0x16abe, +0x16ac0, 0x16ac9, +0x16ad0, 0x16aed, +0x16af0, 0x16af4, +0x16b00, 0x16b36, +0x16b40, 0x16b43, +0x16b50, 0x16b59, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d6c, +0x16d70, 0x16d79, +0x16e40, 0x16e7f, +0x16f00, 0x16f4a, +0x16f4f, 0x16f87, +0x16f8f, 0x16f9f, +0x16fe0, 0x16fe1, +0x16fe3, 0x16fe4, +0x16ff0, 0x16ff1, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1bc9d, 0x1bc9e, +0x1ccf0, 0x1ccf9, +0x1cf00, 0x1cf2d, +0x1cf30, 0x1cf46, +0x1d165, 0x1d169, +0x1d16d, 0x1d172, +0x1d17b, 0x1d182, +0x1d185, 0x1d18b, +0x1d1aa, 0x1d1ad, +0x1d242, 0x1d244, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d6c0, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6fa, +0x1d6fc, 0x1d714, +0x1d716, 0x1d734, +0x1d736, 0x1d74e, +0x1d750, 0x1d76e, +0x1d770, 0x1d788, +0x1d78a, 0x1d7a8, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7cb, +0x1d7ce, 0x1d7ff, +0x1da00, 0x1da36, +0x1da3b, 0x1da6c, +0x1da75, 0x1da75, +0x1da84, 0x1da84, +0x1da9b, 0x1da9f, +0x1daa1, 0x1daaf, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e030, 0x1e06d, +0x1e08f, 0x1e08f, +0x1e100, 0x1e12c, +0x1e130, 0x1e13d, +0x1e140, 0x1e149, +0x1e14e, 0x1e14e, +0x1e290, 0x1e2ae, +0x1e2c0, 0x1e2f9, +0x1e4d0, 0x1e4f9, +0x1e5d0, 0x1e5fa, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e8d0, 0x1e8d6, +0x1e900, 0x1e94b, +0x1e950, 0x1e959, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x1fbf0, 0x1fbf9, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +0xe0100, 0xe01ef, +}; /* END of CR_XID_Continue */ + +/* PROPERTY: 'XID_Start': Derived Property */ +static const OnigCodePoint +CR_XID_Start[] = { 684, +0x0041, 0x005a, +0x0061, 0x007a, +0x00aa, 0x00aa, +0x00b5, 0x00b5, +0x00ba, 0x00ba, +0x00c0, 0x00d6, +0x00d8, 0x00f6, +0x00f8, 0x02c1, +0x02c6, 0x02d1, +0x02e0, 0x02e4, +0x02ec, 0x02ec, +0x02ee, 0x02ee, +0x0370, 0x0374, +0x0376, 0x0377, +0x037b, 0x037d, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x03f5, +0x03f7, 0x0481, +0x048a, 0x052f, +0x0531, 0x0556, +0x0559, 0x0559, +0x0560, 0x0588, +0x05d0, 0x05ea, +0x05ef, 0x05f2, +0x0620, 0x064a, +0x066e, 0x066f, +0x0671, 0x06d3, +0x06d5, 0x06d5, +0x06e5, 0x06e6, +0x06ee, 0x06ef, +0x06fa, 0x06fc, +0x06ff, 0x06ff, +0x0710, 0x0710, +0x0712, 0x072f, +0x074d, 0x07a5, +0x07b1, 0x07b1, +0x07ca, 0x07ea, +0x07f4, 0x07f5, +0x07fa, 0x07fa, +0x0800, 0x0815, +0x081a, 0x081a, +0x0824, 0x0824, +0x0828, 0x0828, +0x0840, 0x0858, +0x0860, 0x086a, +0x0870, 0x0887, +0x0889, 0x088e, +0x08a0, 0x08c9, +0x0904, 0x0939, +0x093d, 0x093d, +0x0950, 0x0950, +0x0958, 0x0961, +0x0971, 0x0980, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bd, 0x09bd, +0x09ce, 0x09ce, +0x09dc, 0x09dd, +0x09df, 0x09e1, +0x09f0, 0x09f1, +0x09fc, 0x09fc, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a72, 0x0a74, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abd, 0x0abd, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae1, +0x0af9, 0x0af9, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3d, 0x0b3d, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b61, +0x0b71, 0x0b71, +0x0b83, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bd0, 0x0bd0, +0x0c05, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3d, 0x0c3d, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c61, +0x0c80, 0x0c80, +0x0c85, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbd, 0x0cbd, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce1, +0x0cf1, 0x0cf2, +0x0d04, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d3a, +0x0d3d, 0x0d3d, +0x0d4e, 0x0d4e, +0x0d54, 0x0d56, +0x0d5f, 0x0d61, +0x0d7a, 0x0d7f, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0e01, 0x0e30, +0x0e32, 0x0e32, +0x0e40, 0x0e46, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0eb0, +0x0eb2, 0x0eb2, +0x0ebd, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0edc, 0x0edf, +0x0f00, 0x0f00, +0x0f40, 0x0f47, +0x0f49, 0x0f6c, +0x0f88, 0x0f8c, +0x1000, 0x102a, +0x103f, 0x103f, +0x1050, 0x1055, +0x105a, 0x105d, +0x1061, 0x1061, +0x1065, 0x1066, +0x106e, 0x1070, +0x1075, 0x1081, +0x108e, 0x108e, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x10fa, +0x10fc, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x1380, 0x138f, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1401, 0x166c, +0x166f, 0x167f, +0x1681, 0x169a, +0x16a0, 0x16ea, +0x16ee, 0x16f8, +0x1700, 0x1711, +0x171f, 0x1731, +0x1740, 0x1751, +0x1760, 0x176c, +0x176e, 0x1770, +0x1780, 0x17b3, +0x17d7, 0x17d7, +0x17dc, 0x17dc, +0x1820, 0x1878, +0x1880, 0x18a8, +0x18aa, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1950, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x1a00, 0x1a16, +0x1a20, 0x1a54, +0x1aa7, 0x1aa7, +0x1b05, 0x1b33, +0x1b45, 0x1b4c, +0x1b83, 0x1ba0, +0x1bae, 0x1baf, +0x1bba, 0x1be5, +0x1c00, 0x1c23, +0x1c4d, 0x1c4f, +0x1c5a, 0x1c7d, +0x1c80, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1ce9, 0x1cec, +0x1cee, 0x1cf3, +0x1cf5, 0x1cf6, +0x1cfa, 0x1cfa, +0x1d00, 0x1dbf, +0x1e00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fbc, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fcc, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fe0, 0x1fec, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffc, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x2102, 0x2102, +0x2107, 0x2107, +0x210a, 0x2113, +0x2115, 0x2115, +0x2118, 0x211d, +0x2124, 0x2124, +0x2126, 0x2126, +0x2128, 0x2128, +0x212a, 0x2139, +0x213c, 0x213f, +0x2145, 0x2149, +0x214e, 0x214e, +0x2160, 0x2188, +0x2c00, 0x2ce4, +0x2ceb, 0x2cee, +0x2cf2, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d6f, +0x2d80, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x3005, 0x3007, +0x3021, 0x3029, +0x3031, 0x3035, +0x3038, 0x303c, +0x3041, 0x3096, +0x309d, 0x309f, +0x30a1, 0x30fa, +0x30fc, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x31a0, 0x31bf, +0x31f0, 0x31ff, +0x3400, 0x4dbf, +0x4e00, 0xa48c, +0xa4d0, 0xa4fd, +0xa500, 0xa60c, +0xa610, 0xa61f, +0xa62a, 0xa62b, +0xa640, 0xa66e, +0xa67f, 0xa69d, +0xa6a0, 0xa6ef, +0xa717, 0xa71f, +0xa722, 0xa788, +0xa78b, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa801, +0xa803, 0xa805, +0xa807, 0xa80a, +0xa80c, 0xa822, +0xa840, 0xa873, +0xa882, 0xa8b3, +0xa8f2, 0xa8f7, +0xa8fb, 0xa8fb, +0xa8fd, 0xa8fe, +0xa90a, 0xa925, +0xa930, 0xa946, +0xa960, 0xa97c, +0xa984, 0xa9b2, +0xa9cf, 0xa9cf, +0xa9e0, 0xa9e4, +0xa9e6, 0xa9ef, +0xa9fa, 0xa9fe, +0xaa00, 0xaa28, +0xaa40, 0xaa42, +0xaa44, 0xaa4b, +0xaa60, 0xaa76, +0xaa7a, 0xaa7a, +0xaa7e, 0xaaaf, +0xaab1, 0xaab1, +0xaab5, 0xaab6, +0xaab9, 0xaabd, +0xaac0, 0xaac0, +0xaac2, 0xaac2, +0xaadb, 0xaadd, +0xaae0, 0xaaea, +0xaaf2, 0xaaf4, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab5a, +0xab5c, 0xab69, +0xab70, 0xabe2, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xf900, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb1d, +0xfb1f, 0xfb28, +0xfb2a, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbb1, +0xfbd3, 0xfc5d, +0xfc64, 0xfd3d, +0xfd50, 0xfd8f, +0xfd92, 0xfdc7, +0xfdf0, 0xfdf9, +0xfe71, 0xfe71, +0xfe73, 0xfe73, +0xfe77, 0xfe77, +0xfe79, 0xfe79, +0xfe7b, 0xfe7b, +0xfe7d, 0xfe7d, +0xfe7f, 0xfefc, +0xff21, 0xff3a, +0xff41, 0xff5a, +0xff66, 0xff9d, +0xffa0, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10140, 0x10174, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x10300, 0x1031f, +0x1032d, 0x1034a, +0x10350, 0x10375, +0x10380, 0x1039d, +0x103a0, 0x103c3, +0x103c8, 0x103cf, +0x103d1, 0x103d5, +0x10400, 0x1049d, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10860, 0x10876, +0x10880, 0x1089e, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x10900, 0x10915, +0x10920, 0x10939, +0x10980, 0x109b7, +0x109be, 0x109bf, +0x10a00, 0x10a00, +0x10a10, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a60, 0x10a7c, +0x10a80, 0x10a9c, +0x10ac0, 0x10ac7, +0x10ac9, 0x10ae4, +0x10b00, 0x10b35, +0x10b40, 0x10b55, +0x10b60, 0x10b72, +0x10b80, 0x10b91, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10d00, 0x10d23, +0x10d4a, 0x10d65, +0x10d6f, 0x10d85, +0x10e80, 0x10ea9, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10f00, 0x10f1c, +0x10f27, 0x10f27, +0x10f30, 0x10f45, +0x10f70, 0x10f81, +0x10fb0, 0x10fc4, +0x10fe0, 0x10ff6, +0x11003, 0x11037, +0x11071, 0x11072, +0x11075, 0x11075, +0x11083, 0x110af, +0x110d0, 0x110e8, +0x11103, 0x11126, +0x11144, 0x11144, +0x11147, 0x11147, +0x11150, 0x11172, +0x11176, 0x11176, +0x11183, 0x111b2, +0x111c1, 0x111c4, +0x111da, 0x111da, +0x111dc, 0x111dc, +0x11200, 0x11211, +0x11213, 0x1122b, +0x1123f, 0x11240, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a8, +0x112b0, 0x112de, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133d, 0x1133d, +0x11350, 0x11350, +0x1135d, 0x11361, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113b7, +0x113d1, 0x113d1, +0x113d3, 0x113d3, +0x11400, 0x11434, +0x11447, 0x1144a, +0x1145f, 0x11461, +0x11480, 0x114af, +0x114c4, 0x114c5, +0x114c7, 0x114c7, +0x11580, 0x115ae, +0x115d8, 0x115db, +0x11600, 0x1162f, +0x11644, 0x11644, +0x11680, 0x116aa, +0x116b8, 0x116b8, +0x11700, 0x1171a, +0x11740, 0x11746, +0x11800, 0x1182b, +0x118a0, 0x118df, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x1192f, +0x1193f, 0x1193f, +0x11941, 0x11941, +0x119a0, 0x119a7, +0x119aa, 0x119d0, +0x119e1, 0x119e1, +0x119e3, 0x119e3, +0x11a00, 0x11a00, +0x11a0b, 0x11a32, +0x11a3a, 0x11a3a, +0x11a50, 0x11a50, +0x11a5c, 0x11a89, +0x11a9d, 0x11a9d, +0x11ab0, 0x11af8, +0x11bc0, 0x11be0, +0x11c00, 0x11c08, +0x11c0a, 0x11c2e, +0x11c40, 0x11c40, +0x11c72, 0x11c8f, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d30, +0x11d46, 0x11d46, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d89, +0x11d98, 0x11d98, +0x11ee0, 0x11ef2, +0x11f02, 0x11f02, +0x11f04, 0x11f10, +0x11f12, 0x11f33, +0x11fb0, 0x11fb0, +0x12000, 0x12399, +0x12400, 0x1246e, +0x12480, 0x12543, +0x12f90, 0x12ff0, +0x13000, 0x1342f, +0x13441, 0x13446, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x1611d, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a70, 0x16abe, +0x16ad0, 0x16aed, +0x16b00, 0x16b2f, +0x16b40, 0x16b43, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d6c, +0x16e40, 0x16e7f, +0x16f00, 0x16f4a, +0x16f50, 0x16f50, +0x16f93, 0x16f9f, +0x16fe0, 0x16fe1, +0x16fe3, 0x16fe3, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d6c0, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6fa, +0x1d6fc, 0x1d714, +0x1d716, 0x1d734, +0x1d736, 0x1d74e, +0x1d750, 0x1d76e, +0x1d770, 0x1d788, +0x1d78a, 0x1d7a8, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7cb, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e030, 0x1e06d, +0x1e100, 0x1e12c, +0x1e137, 0x1e13d, +0x1e14e, 0x1e14e, +0x1e290, 0x1e2ad, +0x1e2c0, 0x1e2eb, +0x1e4d0, 0x1e4eb, +0x1e5d0, 0x1e5ed, +0x1e5f0, 0x1e5f0, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e900, 0x1e943, +0x1e94b, 0x1e94b, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +}; /* END of CR_XID_Start */ + +/* PROPERTY: 'Yezidi': Script */ +static const OnigCodePoint +CR_Yezidi[] = { 3, +0x10e80, 0x10ea9, +0x10eab, 0x10ead, +0x10eb0, 0x10eb1, +}; /* END of CR_Yezidi */ + +/* PROPERTY: 'Yi': Script */ +static const OnigCodePoint +CR_Yi[] = { 2, +0xa000, 0xa48c, +0xa490, 0xa4c6, +}; /* END of CR_Yi */ + +/* PROPERTY: 'Z': Major Category */ +static const OnigCodePoint +CR_Z[] = { 8, +0x0020, 0x0020, +0x00a0, 0x00a0, +0x1680, 0x1680, +0x2000, 0x200a, +0x2028, 0x2029, +0x202f, 0x202f, +0x205f, 0x205f, +0x3000, 0x3000, +}; /* END of CR_Z */ + +/* PROPERTY: 'Zanabazar_Square': Script */ +static const OnigCodePoint +CR_Zanabazar_Square[] = { 1, +0x11a00, 0x11a47, +}; /* END of CR_Zanabazar_Square */ + +/* PROPERTY: 'Zl': General Category */ +static const OnigCodePoint +CR_Zl[] = { 1, +0x2028, 0x2028, +}; /* END of CR_Zl */ + +/* PROPERTY: 'Zp': General Category */ +static const OnigCodePoint +CR_Zp[] = { 1, +0x2029, 0x2029, +}; /* END of CR_Zp */ + +/* PROPERTY: 'Zs': General Category */ +static const OnigCodePoint +CR_Zs[] = { 7, +0x0020, 0x0020, +0x00a0, 0x00a0, +0x1680, 0x1680, +0x2000, 0x200a, +0x202f, 0x202f, +0x205f, 0x205f, +0x3000, 0x3000, +}; /* END of CR_Zs */ + +/* PROPERTY: 'In_Basic_Latin': Block */ +#define CR_In_Basic_Latin CR_ASCII + +/* PROPERTY: 'In_Latin_1_Supplement': Block */ +static const OnigCodePoint +CR_In_Latin_1_Supplement[] = { 1, +0x0080, 0x00ff, +}; /* END of CR_In_Latin_1_Supplement */ + +/* PROPERTY: 'In_Latin_Extended_A': Block */ +static const OnigCodePoint +CR_In_Latin_Extended_A[] = { 1, +0x0100, 0x017f, +}; /* END of CR_In_Latin_Extended_A */ + +/* PROPERTY: 'In_Latin_Extended_B': Block */ +static const OnigCodePoint +CR_In_Latin_Extended_B[] = { 1, +0x0180, 0x024f, +}; /* END of CR_In_Latin_Extended_B */ + +/* PROPERTY: 'In_IPA_Extensions': Block */ +static const OnigCodePoint +CR_In_IPA_Extensions[] = { 1, +0x0250, 0x02af, +}; /* END of CR_In_IPA_Extensions */ + +/* PROPERTY: 'In_Spacing_Modifier_Letters': Block */ +static const OnigCodePoint +CR_In_Spacing_Modifier_Letters[] = { 1, +0x02b0, 0x02ff, +}; /* END of CR_In_Spacing_Modifier_Letters */ + +/* PROPERTY: 'In_Combining_Diacritical_Marks': Block */ +static const OnigCodePoint +CR_In_Combining_Diacritical_Marks[] = { 1, +0x0300, 0x036f, +}; /* END of CR_In_Combining_Diacritical_Marks */ + +/* PROPERTY: 'In_Greek_and_Coptic': Block */ +static const OnigCodePoint +CR_In_Greek_and_Coptic[] = { 1, +0x0370, 0x03ff, +}; /* END of CR_In_Greek_and_Coptic */ + +/* PROPERTY: 'In_Cyrillic': Block */ +static const OnigCodePoint +CR_In_Cyrillic[] = { 1, +0x0400, 0x04ff, +}; /* END of CR_In_Cyrillic */ + +/* PROPERTY: 'In_Cyrillic_Supplement': Block */ +static const OnigCodePoint +CR_In_Cyrillic_Supplement[] = { 1, +0x0500, 0x052f, +}; /* END of CR_In_Cyrillic_Supplement */ + +/* PROPERTY: 'In_Armenian': Block */ +static const OnigCodePoint +CR_In_Armenian[] = { 1, +0x0530, 0x058f, +}; /* END of CR_In_Armenian */ + +/* PROPERTY: 'In_Hebrew': Block */ +static const OnigCodePoint +CR_In_Hebrew[] = { 1, +0x0590, 0x05ff, +}; /* END of CR_In_Hebrew */ + +/* PROPERTY: 'In_Arabic': Block */ +static const OnigCodePoint +CR_In_Arabic[] = { 1, +0x0600, 0x06ff, +}; /* END of CR_In_Arabic */ + +/* PROPERTY: 'In_Syriac': Block */ +static const OnigCodePoint +CR_In_Syriac[] = { 1, +0x0700, 0x074f, +}; /* END of CR_In_Syriac */ + +/* PROPERTY: 'In_Arabic_Supplement': Block */ +static const OnigCodePoint +CR_In_Arabic_Supplement[] = { 1, +0x0750, 0x077f, +}; /* END of CR_In_Arabic_Supplement */ + +/* PROPERTY: 'In_Thaana': Block */ +static const OnigCodePoint +CR_In_Thaana[] = { 1, +0x0780, 0x07bf, +}; /* END of CR_In_Thaana */ + +/* PROPERTY: 'In_NKo': Block */ +static const OnigCodePoint +CR_In_NKo[] = { 1, +0x07c0, 0x07ff, +}; /* END of CR_In_NKo */ + +/* PROPERTY: 'In_Samaritan': Block */ +static const OnigCodePoint +CR_In_Samaritan[] = { 1, +0x0800, 0x083f, +}; /* END of CR_In_Samaritan */ + +/* PROPERTY: 'In_Mandaic': Block */ +static const OnigCodePoint +CR_In_Mandaic[] = { 1, +0x0840, 0x085f, +}; /* END of CR_In_Mandaic */ + +/* PROPERTY: 'In_Syriac_Supplement': Block */ +static const OnigCodePoint +CR_In_Syriac_Supplement[] = { 1, +0x0860, 0x086f, +}; /* END of CR_In_Syriac_Supplement */ + +/* PROPERTY: 'In_Arabic_Extended_B': Block */ +static const OnigCodePoint +CR_In_Arabic_Extended_B[] = { 1, +0x0870, 0x089f, +}; /* END of CR_In_Arabic_Extended_B */ + +/* PROPERTY: 'In_Arabic_Extended_A': Block */ +static const OnigCodePoint +CR_In_Arabic_Extended_A[] = { 1, +0x08a0, 0x08ff, +}; /* END of CR_In_Arabic_Extended_A */ + +/* PROPERTY: 'In_Devanagari': Block */ +static const OnigCodePoint +CR_In_Devanagari[] = { 1, +0x0900, 0x097f, +}; /* END of CR_In_Devanagari */ + +/* PROPERTY: 'In_Bengali': Block */ +static const OnigCodePoint +CR_In_Bengali[] = { 1, +0x0980, 0x09ff, +}; /* END of CR_In_Bengali */ + +/* PROPERTY: 'In_Gurmukhi': Block */ +static const OnigCodePoint +CR_In_Gurmukhi[] = { 1, +0x0a00, 0x0a7f, +}; /* END of CR_In_Gurmukhi */ + +/* PROPERTY: 'In_Gujarati': Block */ +static const OnigCodePoint +CR_In_Gujarati[] = { 1, +0x0a80, 0x0aff, +}; /* END of CR_In_Gujarati */ + +/* PROPERTY: 'In_Oriya': Block */ +static const OnigCodePoint +CR_In_Oriya[] = { 1, +0x0b00, 0x0b7f, +}; /* END of CR_In_Oriya */ + +/* PROPERTY: 'In_Tamil': Block */ +static const OnigCodePoint +CR_In_Tamil[] = { 1, +0x0b80, 0x0bff, +}; /* END of CR_In_Tamil */ + +/* PROPERTY: 'In_Telugu': Block */ +static const OnigCodePoint +CR_In_Telugu[] = { 1, +0x0c00, 0x0c7f, +}; /* END of CR_In_Telugu */ + +/* PROPERTY: 'In_Kannada': Block */ +static const OnigCodePoint +CR_In_Kannada[] = { 1, +0x0c80, 0x0cff, +}; /* END of CR_In_Kannada */ + +/* PROPERTY: 'In_Malayalam': Block */ +static const OnigCodePoint +CR_In_Malayalam[] = { 1, +0x0d00, 0x0d7f, +}; /* END of CR_In_Malayalam */ + +/* PROPERTY: 'In_Sinhala': Block */ +static const OnigCodePoint +CR_In_Sinhala[] = { 1, +0x0d80, 0x0dff, +}; /* END of CR_In_Sinhala */ + +/* PROPERTY: 'In_Thai': Block */ +static const OnigCodePoint +CR_In_Thai[] = { 1, +0x0e00, 0x0e7f, +}; /* END of CR_In_Thai */ + +/* PROPERTY: 'In_Lao': Block */ +static const OnigCodePoint +CR_In_Lao[] = { 1, +0x0e80, 0x0eff, +}; /* END of CR_In_Lao */ + +/* PROPERTY: 'In_Tibetan': Block */ +static const OnigCodePoint +CR_In_Tibetan[] = { 1, +0x0f00, 0x0fff, +}; /* END of CR_In_Tibetan */ + +/* PROPERTY: 'In_Myanmar': Block */ +static const OnigCodePoint +CR_In_Myanmar[] = { 1, +0x1000, 0x109f, +}; /* END of CR_In_Myanmar */ + +/* PROPERTY: 'In_Georgian': Block */ +static const OnigCodePoint +CR_In_Georgian[] = { 1, +0x10a0, 0x10ff, +}; /* END of CR_In_Georgian */ + +/* PROPERTY: 'In_Hangul_Jamo': Block */ +static const OnigCodePoint +CR_In_Hangul_Jamo[] = { 1, +0x1100, 0x11ff, +}; /* END of CR_In_Hangul_Jamo */ + +/* PROPERTY: 'In_Ethiopic': Block */ +static const OnigCodePoint +CR_In_Ethiopic[] = { 1, +0x1200, 0x137f, +}; /* END of CR_In_Ethiopic */ + +/* PROPERTY: 'In_Ethiopic_Supplement': Block */ +static const OnigCodePoint +CR_In_Ethiopic_Supplement[] = { 1, +0x1380, 0x139f, +}; /* END of CR_In_Ethiopic_Supplement */ + +/* PROPERTY: 'In_Cherokee': Block */ +static const OnigCodePoint +CR_In_Cherokee[] = { 1, +0x13a0, 0x13ff, +}; /* END of CR_In_Cherokee */ + +/* PROPERTY: 'In_Unified_Canadian_Aboriginal_Syllabics': Block */ +static const OnigCodePoint +CR_In_Unified_Canadian_Aboriginal_Syllabics[] = { 1, +0x1400, 0x167f, +}; /* END of CR_In_Unified_Canadian_Aboriginal_Syllabics */ + +/* PROPERTY: 'In_Ogham': Block */ +static const OnigCodePoint +CR_In_Ogham[] = { 1, +0x1680, 0x169f, +}; /* END of CR_In_Ogham */ + +/* PROPERTY: 'In_Runic': Block */ +static const OnigCodePoint +CR_In_Runic[] = { 1, +0x16a0, 0x16ff, +}; /* END of CR_In_Runic */ + +/* PROPERTY: 'In_Tagalog': Block */ +static const OnigCodePoint +CR_In_Tagalog[] = { 1, +0x1700, 0x171f, +}; /* END of CR_In_Tagalog */ + +/* PROPERTY: 'In_Hanunoo': Block */ +static const OnigCodePoint +CR_In_Hanunoo[] = { 1, +0x1720, 0x173f, +}; /* END of CR_In_Hanunoo */ + +/* PROPERTY: 'In_Buhid': Block */ +static const OnigCodePoint +CR_In_Buhid[] = { 1, +0x1740, 0x175f, +}; /* END of CR_In_Buhid */ + +/* PROPERTY: 'In_Tagbanwa': Block */ +static const OnigCodePoint +CR_In_Tagbanwa[] = { 1, +0x1760, 0x177f, +}; /* END of CR_In_Tagbanwa */ + +/* PROPERTY: 'In_Khmer': Block */ +static const OnigCodePoint +CR_In_Khmer[] = { 1, +0x1780, 0x17ff, +}; /* END of CR_In_Khmer */ + +/* PROPERTY: 'In_Mongolian': Block */ +static const OnigCodePoint +CR_In_Mongolian[] = { 1, +0x1800, 0x18af, +}; /* END of CR_In_Mongolian */ + +/* PROPERTY: 'In_Unified_Canadian_Aboriginal_Syllabics_Extended': Block */ +static const OnigCodePoint +CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended[] = { 1, +0x18b0, 0x18ff, +}; /* END of CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended */ + +/* PROPERTY: 'In_Limbu': Block */ +static const OnigCodePoint +CR_In_Limbu[] = { 1, +0x1900, 0x194f, +}; /* END of CR_In_Limbu */ + +/* PROPERTY: 'In_Tai_Le': Block */ +static const OnigCodePoint +CR_In_Tai_Le[] = { 1, +0x1950, 0x197f, +}; /* END of CR_In_Tai_Le */ + +/* PROPERTY: 'In_New_Tai_Lue': Block */ +static const OnigCodePoint +CR_In_New_Tai_Lue[] = { 1, +0x1980, 0x19df, +}; /* END of CR_In_New_Tai_Lue */ + +/* PROPERTY: 'In_Khmer_Symbols': Block */ +static const OnigCodePoint +CR_In_Khmer_Symbols[] = { 1, +0x19e0, 0x19ff, +}; /* END of CR_In_Khmer_Symbols */ + +/* PROPERTY: 'In_Buginese': Block */ +static const OnigCodePoint +CR_In_Buginese[] = { 1, +0x1a00, 0x1a1f, +}; /* END of CR_In_Buginese */ + +/* PROPERTY: 'In_Tai_Tham': Block */ +static const OnigCodePoint +CR_In_Tai_Tham[] = { 1, +0x1a20, 0x1aaf, +}; /* END of CR_In_Tai_Tham */ + +/* PROPERTY: 'In_Combining_Diacritical_Marks_Extended': Block */ +static const OnigCodePoint +CR_In_Combining_Diacritical_Marks_Extended[] = { 1, +0x1ab0, 0x1aff, +}; /* END of CR_In_Combining_Diacritical_Marks_Extended */ + +/* PROPERTY: 'In_Balinese': Block */ +static const OnigCodePoint +CR_In_Balinese[] = { 1, +0x1b00, 0x1b7f, +}; /* END of CR_In_Balinese */ + +/* PROPERTY: 'In_Sundanese': Block */ +static const OnigCodePoint +CR_In_Sundanese[] = { 1, +0x1b80, 0x1bbf, +}; /* END of CR_In_Sundanese */ + +/* PROPERTY: 'In_Batak': Block */ +static const OnigCodePoint +CR_In_Batak[] = { 1, +0x1bc0, 0x1bff, +}; /* END of CR_In_Batak */ + +/* PROPERTY: 'In_Lepcha': Block */ +static const OnigCodePoint +CR_In_Lepcha[] = { 1, +0x1c00, 0x1c4f, +}; /* END of CR_In_Lepcha */ + +/* PROPERTY: 'In_Ol_Chiki': Block */ +#define CR_In_Ol_Chiki CR_Ol_Chiki + +/* PROPERTY: 'In_Cyrillic_Extended_C': Block */ +static const OnigCodePoint +CR_In_Cyrillic_Extended_C[] = { 1, +0x1c80, 0x1c8f, +}; /* END of CR_In_Cyrillic_Extended_C */ + +/* PROPERTY: 'In_Georgian_Extended': Block */ +static const OnigCodePoint +CR_In_Georgian_Extended[] = { 1, +0x1c90, 0x1cbf, +}; /* END of CR_In_Georgian_Extended */ + +/* PROPERTY: 'In_Sundanese_Supplement': Block */ +static const OnigCodePoint +CR_In_Sundanese_Supplement[] = { 1, +0x1cc0, 0x1ccf, +}; /* END of CR_In_Sundanese_Supplement */ + +/* PROPERTY: 'In_Vedic_Extensions': Block */ +static const OnigCodePoint +CR_In_Vedic_Extensions[] = { 1, +0x1cd0, 0x1cff, +}; /* END of CR_In_Vedic_Extensions */ + +/* PROPERTY: 'In_Phonetic_Extensions': Block */ +static const OnigCodePoint +CR_In_Phonetic_Extensions[] = { 1, +0x1d00, 0x1d7f, +}; /* END of CR_In_Phonetic_Extensions */ + +/* PROPERTY: 'In_Phonetic_Extensions_Supplement': Block */ +static const OnigCodePoint +CR_In_Phonetic_Extensions_Supplement[] = { 1, +0x1d80, 0x1dbf, +}; /* END of CR_In_Phonetic_Extensions_Supplement */ + +/* PROPERTY: 'In_Combining_Diacritical_Marks_Supplement': Block */ +static const OnigCodePoint +CR_In_Combining_Diacritical_Marks_Supplement[] = { 1, +0x1dc0, 0x1dff, +}; /* END of CR_In_Combining_Diacritical_Marks_Supplement */ + +/* PROPERTY: 'In_Latin_Extended_Additional': Block */ +static const OnigCodePoint +CR_In_Latin_Extended_Additional[] = { 1, +0x1e00, 0x1eff, +}; /* END of CR_In_Latin_Extended_Additional */ + +/* PROPERTY: 'In_Greek_Extended': Block */ +static const OnigCodePoint +CR_In_Greek_Extended[] = { 1, +0x1f00, 0x1fff, +}; /* END of CR_In_Greek_Extended */ + +/* PROPERTY: 'In_General_Punctuation': Block */ +static const OnigCodePoint +CR_In_General_Punctuation[] = { 1, +0x2000, 0x206f, +}; /* END of CR_In_General_Punctuation */ + +/* PROPERTY: 'In_Superscripts_and_Subscripts': Block */ +static const OnigCodePoint +CR_In_Superscripts_and_Subscripts[] = { 1, +0x2070, 0x209f, +}; /* END of CR_In_Superscripts_and_Subscripts */ + +/* PROPERTY: 'In_Currency_Symbols': Block */ +static const OnigCodePoint +CR_In_Currency_Symbols[] = { 1, +0x20a0, 0x20cf, +}; /* END of CR_In_Currency_Symbols */ + +/* PROPERTY: 'In_Combining_Diacritical_Marks_for_Symbols': Block */ +static const OnigCodePoint +CR_In_Combining_Diacritical_Marks_for_Symbols[] = { 1, +0x20d0, 0x20ff, +}; /* END of CR_In_Combining_Diacritical_Marks_for_Symbols */ + +/* PROPERTY: 'In_Letterlike_Symbols': Block */ +static const OnigCodePoint +CR_In_Letterlike_Symbols[] = { 1, +0x2100, 0x214f, +}; /* END of CR_In_Letterlike_Symbols */ + +/* PROPERTY: 'In_Number_Forms': Block */ +static const OnigCodePoint +CR_In_Number_Forms[] = { 1, +0x2150, 0x218f, +}; /* END of CR_In_Number_Forms */ + +/* PROPERTY: 'In_Arrows': Block */ +static const OnigCodePoint +CR_In_Arrows[] = { 1, +0x2190, 0x21ff, +}; /* END of CR_In_Arrows */ + +/* PROPERTY: 'In_Mathematical_Operators': Block */ +static const OnigCodePoint +CR_In_Mathematical_Operators[] = { 1, +0x2200, 0x22ff, +}; /* END of CR_In_Mathematical_Operators */ + +/* PROPERTY: 'In_Miscellaneous_Technical': Block */ +static const OnigCodePoint +CR_In_Miscellaneous_Technical[] = { 1, +0x2300, 0x23ff, +}; /* END of CR_In_Miscellaneous_Technical */ + +/* PROPERTY: 'In_Control_Pictures': Block */ +static const OnigCodePoint +CR_In_Control_Pictures[] = { 1, +0x2400, 0x243f, +}; /* END of CR_In_Control_Pictures */ + +/* PROPERTY: 'In_Optical_Character_Recognition': Block */ +static const OnigCodePoint +CR_In_Optical_Character_Recognition[] = { 1, +0x2440, 0x245f, +}; /* END of CR_In_Optical_Character_Recognition */ + +/* PROPERTY: 'In_Enclosed_Alphanumerics': Block */ +static const OnigCodePoint +CR_In_Enclosed_Alphanumerics[] = { 1, +0x2460, 0x24ff, +}; /* END of CR_In_Enclosed_Alphanumerics */ + +/* PROPERTY: 'In_Box_Drawing': Block */ +static const OnigCodePoint +CR_In_Box_Drawing[] = { 1, +0x2500, 0x257f, +}; /* END of CR_In_Box_Drawing */ + +/* PROPERTY: 'In_Block_Elements': Block */ +static const OnigCodePoint +CR_In_Block_Elements[] = { 1, +0x2580, 0x259f, +}; /* END of CR_In_Block_Elements */ + +/* PROPERTY: 'In_Geometric_Shapes': Block */ +static const OnigCodePoint +CR_In_Geometric_Shapes[] = { 1, +0x25a0, 0x25ff, +}; /* END of CR_In_Geometric_Shapes */ + +/* PROPERTY: 'In_Miscellaneous_Symbols': Block */ +static const OnigCodePoint +CR_In_Miscellaneous_Symbols[] = { 1, +0x2600, 0x26ff, +}; /* END of CR_In_Miscellaneous_Symbols */ + +/* PROPERTY: 'In_Dingbats': Block */ +static const OnigCodePoint +CR_In_Dingbats[] = { 1, +0x2700, 0x27bf, +}; /* END of CR_In_Dingbats */ + +/* PROPERTY: 'In_Miscellaneous_Mathematical_Symbols_A': Block */ +static const OnigCodePoint +CR_In_Miscellaneous_Mathematical_Symbols_A[] = { 1, +0x27c0, 0x27ef, +}; /* END of CR_In_Miscellaneous_Mathematical_Symbols_A */ + +/* PROPERTY: 'In_Supplemental_Arrows_A': Block */ +static const OnigCodePoint +CR_In_Supplemental_Arrows_A[] = { 1, +0x27f0, 0x27ff, +}; /* END of CR_In_Supplemental_Arrows_A */ + +/* PROPERTY: 'In_Braille_Patterns': Block */ +#define CR_In_Braille_Patterns CR_Braille + +/* PROPERTY: 'In_Supplemental_Arrows_B': Block */ +static const OnigCodePoint +CR_In_Supplemental_Arrows_B[] = { 1, +0x2900, 0x297f, +}; /* END of CR_In_Supplemental_Arrows_B */ + +/* PROPERTY: 'In_Miscellaneous_Mathematical_Symbols_B': Block */ +static const OnigCodePoint +CR_In_Miscellaneous_Mathematical_Symbols_B[] = { 1, +0x2980, 0x29ff, +}; /* END of CR_In_Miscellaneous_Mathematical_Symbols_B */ + +/* PROPERTY: 'In_Supplemental_Mathematical_Operators': Block */ +static const OnigCodePoint +CR_In_Supplemental_Mathematical_Operators[] = { 1, +0x2a00, 0x2aff, +}; /* END of CR_In_Supplemental_Mathematical_Operators */ + +/* PROPERTY: 'In_Miscellaneous_Symbols_and_Arrows': Block */ +static const OnigCodePoint +CR_In_Miscellaneous_Symbols_and_Arrows[] = { 1, +0x2b00, 0x2bff, +}; /* END of CR_In_Miscellaneous_Symbols_and_Arrows */ + +/* PROPERTY: 'In_Glagolitic': Block */ +static const OnigCodePoint +CR_In_Glagolitic[] = { 1, +0x2c00, 0x2c5f, +}; /* END of CR_In_Glagolitic */ + +/* PROPERTY: 'In_Latin_Extended_C': Block */ +static const OnigCodePoint +CR_In_Latin_Extended_C[] = { 1, +0x2c60, 0x2c7f, +}; /* END of CR_In_Latin_Extended_C */ + +/* PROPERTY: 'In_Coptic': Block */ +static const OnigCodePoint +CR_In_Coptic[] = { 1, +0x2c80, 0x2cff, +}; /* END of CR_In_Coptic */ + +/* PROPERTY: 'In_Georgian_Supplement': Block */ +static const OnigCodePoint +CR_In_Georgian_Supplement[] = { 1, +0x2d00, 0x2d2f, +}; /* END of CR_In_Georgian_Supplement */ + +/* PROPERTY: 'In_Tifinagh': Block */ +static const OnigCodePoint +CR_In_Tifinagh[] = { 1, +0x2d30, 0x2d7f, +}; /* END of CR_In_Tifinagh */ + +/* PROPERTY: 'In_Ethiopic_Extended': Block */ +static const OnigCodePoint +CR_In_Ethiopic_Extended[] = { 1, +0x2d80, 0x2ddf, +}; /* END of CR_In_Ethiopic_Extended */ + +/* PROPERTY: 'In_Cyrillic_Extended_A': Block */ +static const OnigCodePoint +CR_In_Cyrillic_Extended_A[] = { 1, +0x2de0, 0x2dff, +}; /* END of CR_In_Cyrillic_Extended_A */ + +/* PROPERTY: 'In_Supplemental_Punctuation': Block */ +static const OnigCodePoint +CR_In_Supplemental_Punctuation[] = { 1, +0x2e00, 0x2e7f, +}; /* END of CR_In_Supplemental_Punctuation */ + +/* PROPERTY: 'In_CJK_Radicals_Supplement': Block */ +static const OnigCodePoint +CR_In_CJK_Radicals_Supplement[] = { 1, +0x2e80, 0x2eff, +}; /* END of CR_In_CJK_Radicals_Supplement */ + +/* PROPERTY: 'In_Kangxi_Radicals': Block */ +static const OnigCodePoint +CR_In_Kangxi_Radicals[] = { 1, +0x2f00, 0x2fdf, +}; /* END of CR_In_Kangxi_Radicals */ + +/* PROPERTY: 'In_Ideographic_Description_Characters': Block */ +static const OnigCodePoint +CR_In_Ideographic_Description_Characters[] = { 1, +0x2ff0, 0x2fff, +}; /* END of CR_In_Ideographic_Description_Characters */ + +/* PROPERTY: 'In_CJK_Symbols_and_Punctuation': Block */ +static const OnigCodePoint +CR_In_CJK_Symbols_and_Punctuation[] = { 1, +0x3000, 0x303f, +}; /* END of CR_In_CJK_Symbols_and_Punctuation */ + +/* PROPERTY: 'In_Hiragana': Block */ +static const OnigCodePoint +CR_In_Hiragana[] = { 1, +0x3040, 0x309f, +}; /* END of CR_In_Hiragana */ + +/* PROPERTY: 'In_Katakana': Block */ +static const OnigCodePoint +CR_In_Katakana[] = { 1, +0x30a0, 0x30ff, +}; /* END of CR_In_Katakana */ + +/* PROPERTY: 'In_Bopomofo': Block */ +static const OnigCodePoint +CR_In_Bopomofo[] = { 1, +0x3100, 0x312f, +}; /* END of CR_In_Bopomofo */ + +/* PROPERTY: 'In_Hangul_Compatibility_Jamo': Block */ +static const OnigCodePoint +CR_In_Hangul_Compatibility_Jamo[] = { 1, +0x3130, 0x318f, +}; /* END of CR_In_Hangul_Compatibility_Jamo */ + +/* PROPERTY: 'In_Kanbun': Block */ +static const OnigCodePoint +CR_In_Kanbun[] = { 1, +0x3190, 0x319f, +}; /* END of CR_In_Kanbun */ + +/* PROPERTY: 'In_Bopomofo_Extended': Block */ +static const OnigCodePoint +CR_In_Bopomofo_Extended[] = { 1, +0x31a0, 0x31bf, +}; /* END of CR_In_Bopomofo_Extended */ + +/* PROPERTY: 'In_CJK_Strokes': Block */ +static const OnigCodePoint +CR_In_CJK_Strokes[] = { 1, +0x31c0, 0x31ef, +}; /* END of CR_In_CJK_Strokes */ + +/* PROPERTY: 'In_Katakana_Phonetic_Extensions': Block */ +static const OnigCodePoint +CR_In_Katakana_Phonetic_Extensions[] = { 1, +0x31f0, 0x31ff, +}; /* END of CR_In_Katakana_Phonetic_Extensions */ + +/* PROPERTY: 'In_Enclosed_CJK_Letters_and_Months': Block */ +static const OnigCodePoint +CR_In_Enclosed_CJK_Letters_and_Months[] = { 1, +0x3200, 0x32ff, +}; /* END of CR_In_Enclosed_CJK_Letters_and_Months */ + +/* PROPERTY: 'In_CJK_Compatibility': Block */ +static const OnigCodePoint +CR_In_CJK_Compatibility[] = { 1, +0x3300, 0x33ff, +}; /* END of CR_In_CJK_Compatibility */ + +/* PROPERTY: 'In_CJK_Unified_Ideographs_Extension_A': Block */ +static const OnigCodePoint +CR_In_CJK_Unified_Ideographs_Extension_A[] = { 1, +0x3400, 0x4dbf, +}; /* END of CR_In_CJK_Unified_Ideographs_Extension_A */ + +/* PROPERTY: 'In_Yijing_Hexagram_Symbols': Block */ +static const OnigCodePoint +CR_In_Yijing_Hexagram_Symbols[] = { 1, +0x4dc0, 0x4dff, +}; /* END of CR_In_Yijing_Hexagram_Symbols */ + +/* PROPERTY: 'In_CJK_Unified_Ideographs': Block */ +static const OnigCodePoint +CR_In_CJK_Unified_Ideographs[] = { 1, +0x4e00, 0x9fff, +}; /* END of CR_In_CJK_Unified_Ideographs */ + +/* PROPERTY: 'In_Yi_Syllables': Block */ +static const OnigCodePoint +CR_In_Yi_Syllables[] = { 1, +0xa000, 0xa48f, +}; /* END of CR_In_Yi_Syllables */ + +/* PROPERTY: 'In_Yi_Radicals': Block */ +static const OnigCodePoint +CR_In_Yi_Radicals[] = { 1, +0xa490, 0xa4cf, +}; /* END of CR_In_Yi_Radicals */ + +/* PROPERTY: 'In_Lisu': Block */ +static const OnigCodePoint +CR_In_Lisu[] = { 1, +0xa4d0, 0xa4ff, +}; /* END of CR_In_Lisu */ + +/* PROPERTY: 'In_Vai': Block */ +static const OnigCodePoint +CR_In_Vai[] = { 1, +0xa500, 0xa63f, +}; /* END of CR_In_Vai */ + +/* PROPERTY: 'In_Cyrillic_Extended_B': Block */ +static const OnigCodePoint +CR_In_Cyrillic_Extended_B[] = { 1, +0xa640, 0xa69f, +}; /* END of CR_In_Cyrillic_Extended_B */ + +/* PROPERTY: 'In_Bamum': Block */ +static const OnigCodePoint +CR_In_Bamum[] = { 1, +0xa6a0, 0xa6ff, +}; /* END of CR_In_Bamum */ + +/* PROPERTY: 'In_Modifier_Tone_Letters': Block */ +static const OnigCodePoint +CR_In_Modifier_Tone_Letters[] = { 1, +0xa700, 0xa71f, +}; /* END of CR_In_Modifier_Tone_Letters */ + +/* PROPERTY: 'In_Latin_Extended_D': Block */ +static const OnigCodePoint +CR_In_Latin_Extended_D[] = { 1, +0xa720, 0xa7ff, +}; /* END of CR_In_Latin_Extended_D */ + +/* PROPERTY: 'In_Syloti_Nagri': Block */ +static const OnigCodePoint +CR_In_Syloti_Nagri[] = { 1, +0xa800, 0xa82f, +}; /* END of CR_In_Syloti_Nagri */ + +/* PROPERTY: 'In_Common_Indic_Number_Forms': Block */ +static const OnigCodePoint +CR_In_Common_Indic_Number_Forms[] = { 1, +0xa830, 0xa83f, +}; /* END of CR_In_Common_Indic_Number_Forms */ + +/* PROPERTY: 'In_Phags_pa': Block */ +static const OnigCodePoint +CR_In_Phags_pa[] = { 1, +0xa840, 0xa87f, +}; /* END of CR_In_Phags_pa */ + +/* PROPERTY: 'In_Saurashtra': Block */ +static const OnigCodePoint +CR_In_Saurashtra[] = { 1, +0xa880, 0xa8df, +}; /* END of CR_In_Saurashtra */ + +/* PROPERTY: 'In_Devanagari_Extended': Block */ +static const OnigCodePoint +CR_In_Devanagari_Extended[] = { 1, +0xa8e0, 0xa8ff, +}; /* END of CR_In_Devanagari_Extended */ + +/* PROPERTY: 'In_Kayah_Li': Block */ +static const OnigCodePoint +CR_In_Kayah_Li[] = { 1, +0xa900, 0xa92f, +}; /* END of CR_In_Kayah_Li */ + +/* PROPERTY: 'In_Rejang': Block */ +static const OnigCodePoint +CR_In_Rejang[] = { 1, +0xa930, 0xa95f, +}; /* END of CR_In_Rejang */ + +/* PROPERTY: 'In_Hangul_Jamo_Extended_A': Block */ +static const OnigCodePoint +CR_In_Hangul_Jamo_Extended_A[] = { 1, +0xa960, 0xa97f, +}; /* END of CR_In_Hangul_Jamo_Extended_A */ + +/* PROPERTY: 'In_Javanese': Block */ +static const OnigCodePoint +CR_In_Javanese[] = { 1, +0xa980, 0xa9df, +}; /* END of CR_In_Javanese */ + +/* PROPERTY: 'In_Myanmar_Extended_B': Block */ +static const OnigCodePoint +CR_In_Myanmar_Extended_B[] = { 1, +0xa9e0, 0xa9ff, +}; /* END of CR_In_Myanmar_Extended_B */ + +/* PROPERTY: 'In_Cham': Block */ +static const OnigCodePoint +CR_In_Cham[] = { 1, +0xaa00, 0xaa5f, +}; /* END of CR_In_Cham */ + +/* PROPERTY: 'In_Myanmar_Extended_A': Block */ +static const OnigCodePoint +CR_In_Myanmar_Extended_A[] = { 1, +0xaa60, 0xaa7f, +}; /* END of CR_In_Myanmar_Extended_A */ + +/* PROPERTY: 'In_Tai_Viet': Block */ +static const OnigCodePoint +CR_In_Tai_Viet[] = { 1, +0xaa80, 0xaadf, +}; /* END of CR_In_Tai_Viet */ + +/* PROPERTY: 'In_Meetei_Mayek_Extensions': Block */ +static const OnigCodePoint +CR_In_Meetei_Mayek_Extensions[] = { 1, +0xaae0, 0xaaff, +}; /* END of CR_In_Meetei_Mayek_Extensions */ + +/* PROPERTY: 'In_Ethiopic_Extended_A': Block */ +static const OnigCodePoint +CR_In_Ethiopic_Extended_A[] = { 1, +0xab00, 0xab2f, +}; /* END of CR_In_Ethiopic_Extended_A */ + +/* PROPERTY: 'In_Latin_Extended_E': Block */ +static const OnigCodePoint +CR_In_Latin_Extended_E[] = { 1, +0xab30, 0xab6f, +}; /* END of CR_In_Latin_Extended_E */ + +/* PROPERTY: 'In_Cherokee_Supplement': Block */ +static const OnigCodePoint +CR_In_Cherokee_Supplement[] = { 1, +0xab70, 0xabbf, +}; /* END of CR_In_Cherokee_Supplement */ + +/* PROPERTY: 'In_Meetei_Mayek': Block */ +static const OnigCodePoint +CR_In_Meetei_Mayek[] = { 1, +0xabc0, 0xabff, +}; /* END of CR_In_Meetei_Mayek */ + +/* PROPERTY: 'In_Hangul_Syllables': Block */ +static const OnigCodePoint +CR_In_Hangul_Syllables[] = { 1, +0xac00, 0xd7af, +}; /* END of CR_In_Hangul_Syllables */ + +/* PROPERTY: 'In_Hangul_Jamo_Extended_B': Block */ +static const OnigCodePoint +CR_In_Hangul_Jamo_Extended_B[] = { 1, +0xd7b0, 0xd7ff, +}; /* END of CR_In_Hangul_Jamo_Extended_B */ + +/* PROPERTY: 'In_High_Surrogates': Block */ +static const OnigCodePoint +CR_In_High_Surrogates[] = { 1, +0xd800, 0xdb7f, +}; /* END of CR_In_High_Surrogates */ + +/* PROPERTY: 'In_High_Private_Use_Surrogates': Block */ +static const OnigCodePoint +CR_In_High_Private_Use_Surrogates[] = { 1, +0xdb80, 0xdbff, +}; /* END of CR_In_High_Private_Use_Surrogates */ + +/* PROPERTY: 'In_Low_Surrogates': Block */ +static const OnigCodePoint +CR_In_Low_Surrogates[] = { 1, +0xdc00, 0xdfff, +}; /* END of CR_In_Low_Surrogates */ + +/* PROPERTY: 'In_Private_Use_Area': Block */ +static const OnigCodePoint +CR_In_Private_Use_Area[] = { 1, +0xe000, 0xf8ff, +}; /* END of CR_In_Private_Use_Area */ + +/* PROPERTY: 'In_CJK_Compatibility_Ideographs': Block */ +static const OnigCodePoint +CR_In_CJK_Compatibility_Ideographs[] = { 1, +0xf900, 0xfaff, +}; /* END of CR_In_CJK_Compatibility_Ideographs */ + +/* PROPERTY: 'In_Alphabetic_Presentation_Forms': Block */ +static const OnigCodePoint +CR_In_Alphabetic_Presentation_Forms[] = { 1, +0xfb00, 0xfb4f, +}; /* END of CR_In_Alphabetic_Presentation_Forms */ + +/* PROPERTY: 'In_Arabic_Presentation_Forms_A': Block */ +static const OnigCodePoint +CR_In_Arabic_Presentation_Forms_A[] = { 1, +0xfb50, 0xfdff, +}; /* END of CR_In_Arabic_Presentation_Forms_A */ + +/* PROPERTY: 'In_Variation_Selectors': Block */ +static const OnigCodePoint +CR_In_Variation_Selectors[] = { 1, +0xfe00, 0xfe0f, +}; /* END of CR_In_Variation_Selectors */ + +/* PROPERTY: 'In_Vertical_Forms': Block */ +static const OnigCodePoint +CR_In_Vertical_Forms[] = { 1, +0xfe10, 0xfe1f, +}; /* END of CR_In_Vertical_Forms */ + +/* PROPERTY: 'In_Combining_Half_Marks': Block */ +static const OnigCodePoint +CR_In_Combining_Half_Marks[] = { 1, +0xfe20, 0xfe2f, +}; /* END of CR_In_Combining_Half_Marks */ + +/* PROPERTY: 'In_CJK_Compatibility_Forms': Block */ +static const OnigCodePoint +CR_In_CJK_Compatibility_Forms[] = { 1, +0xfe30, 0xfe4f, +}; /* END of CR_In_CJK_Compatibility_Forms */ + +/* PROPERTY: 'In_Small_Form_Variants': Block */ +static const OnigCodePoint +CR_In_Small_Form_Variants[] = { 1, +0xfe50, 0xfe6f, +}; /* END of CR_In_Small_Form_Variants */ + +/* PROPERTY: 'In_Arabic_Presentation_Forms_B': Block */ +static const OnigCodePoint +CR_In_Arabic_Presentation_Forms_B[] = { 1, +0xfe70, 0xfeff, +}; /* END of CR_In_Arabic_Presentation_Forms_B */ + +/* PROPERTY: 'In_Halfwidth_and_Fullwidth_Forms': Block */ +static const OnigCodePoint +CR_In_Halfwidth_and_Fullwidth_Forms[] = { 1, +0xff00, 0xffef, +}; /* END of CR_In_Halfwidth_and_Fullwidth_Forms */ + +/* PROPERTY: 'In_Specials': Block */ +static const OnigCodePoint +CR_In_Specials[] = { 1, +0xfff0, 0xffff, +}; /* END of CR_In_Specials */ + +/* PROPERTY: 'In_Linear_B_Syllabary': Block */ +static const OnigCodePoint +CR_In_Linear_B_Syllabary[] = { 1, +0x10000, 0x1007f, +}; /* END of CR_In_Linear_B_Syllabary */ + +/* PROPERTY: 'In_Linear_B_Ideograms': Block */ +static const OnigCodePoint +CR_In_Linear_B_Ideograms[] = { 1, +0x10080, 0x100ff, +}; /* END of CR_In_Linear_B_Ideograms */ + +/* PROPERTY: 'In_Aegean_Numbers': Block */ +static const OnigCodePoint +CR_In_Aegean_Numbers[] = { 1, +0x10100, 0x1013f, +}; /* END of CR_In_Aegean_Numbers */ + +/* PROPERTY: 'In_Ancient_Greek_Numbers': Block */ +static const OnigCodePoint +CR_In_Ancient_Greek_Numbers[] = { 1, +0x10140, 0x1018f, +}; /* END of CR_In_Ancient_Greek_Numbers */ + +/* PROPERTY: 'In_Ancient_Symbols': Block */ +static const OnigCodePoint +CR_In_Ancient_Symbols[] = { 1, +0x10190, 0x101cf, +}; /* END of CR_In_Ancient_Symbols */ + +/* PROPERTY: 'In_Phaistos_Disc': Block */ +static const OnigCodePoint +CR_In_Phaistos_Disc[] = { 1, +0x101d0, 0x101ff, +}; /* END of CR_In_Phaistos_Disc */ + +/* PROPERTY: 'In_Lycian': Block */ +static const OnigCodePoint +CR_In_Lycian[] = { 1, +0x10280, 0x1029f, +}; /* END of CR_In_Lycian */ + +/* PROPERTY: 'In_Carian': Block */ +static const OnigCodePoint +CR_In_Carian[] = { 1, +0x102a0, 0x102df, +}; /* END of CR_In_Carian */ + +/* PROPERTY: 'In_Coptic_Epact_Numbers': Block */ +static const OnigCodePoint +CR_In_Coptic_Epact_Numbers[] = { 1, +0x102e0, 0x102ff, +}; /* END of CR_In_Coptic_Epact_Numbers */ + +/* PROPERTY: 'In_Old_Italic': Block */ +static const OnigCodePoint +CR_In_Old_Italic[] = { 1, +0x10300, 0x1032f, +}; /* END of CR_In_Old_Italic */ + +/* PROPERTY: 'In_Gothic': Block */ +static const OnigCodePoint +CR_In_Gothic[] = { 1, +0x10330, 0x1034f, +}; /* END of CR_In_Gothic */ + +/* PROPERTY: 'In_Old_Permic': Block */ +static const OnigCodePoint +CR_In_Old_Permic[] = { 1, +0x10350, 0x1037f, +}; /* END of CR_In_Old_Permic */ + +/* PROPERTY: 'In_Ugaritic': Block */ +static const OnigCodePoint +CR_In_Ugaritic[] = { 1, +0x10380, 0x1039f, +}; /* END of CR_In_Ugaritic */ + +/* PROPERTY: 'In_Old_Persian': Block */ +static const OnigCodePoint +CR_In_Old_Persian[] = { 1, +0x103a0, 0x103df, +}; /* END of CR_In_Old_Persian */ + +/* PROPERTY: 'In_Deseret': Block */ +#define CR_In_Deseret CR_Deseret + +/* PROPERTY: 'In_Shavian': Block */ +#define CR_In_Shavian CR_Shavian + +/* PROPERTY: 'In_Osmanya': Block */ +static const OnigCodePoint +CR_In_Osmanya[] = { 1, +0x10480, 0x104af, +}; /* END of CR_In_Osmanya */ + +/* PROPERTY: 'In_Osage': Block */ +static const OnigCodePoint +CR_In_Osage[] = { 1, +0x104b0, 0x104ff, +}; /* END of CR_In_Osage */ + +/* PROPERTY: 'In_Elbasan': Block */ +static const OnigCodePoint +CR_In_Elbasan[] = { 1, +0x10500, 0x1052f, +}; /* END of CR_In_Elbasan */ + +/* PROPERTY: 'In_Caucasian_Albanian': Block */ +static const OnigCodePoint +CR_In_Caucasian_Albanian[] = { 1, +0x10530, 0x1056f, +}; /* END of CR_In_Caucasian_Albanian */ + +/* PROPERTY: 'In_Vithkuqi': Block */ +static const OnigCodePoint +CR_In_Vithkuqi[] = { 1, +0x10570, 0x105bf, +}; /* END of CR_In_Vithkuqi */ + +/* PROPERTY: 'In_Todhri': Block */ +static const OnigCodePoint +CR_In_Todhri[] = { 1, +0x105c0, 0x105ff, +}; /* END of CR_In_Todhri */ + +/* PROPERTY: 'In_Linear_A': Block */ +static const OnigCodePoint +CR_In_Linear_A[] = { 1, +0x10600, 0x1077f, +}; /* END of CR_In_Linear_A */ + +/* PROPERTY: 'In_Latin_Extended_F': Block */ +static const OnigCodePoint +CR_In_Latin_Extended_F[] = { 1, +0x10780, 0x107bf, +}; /* END of CR_In_Latin_Extended_F */ + +/* PROPERTY: 'In_Cypriot_Syllabary': Block */ +static const OnigCodePoint +CR_In_Cypriot_Syllabary[] = { 1, +0x10800, 0x1083f, +}; /* END of CR_In_Cypriot_Syllabary */ + +/* PROPERTY: 'In_Imperial_Aramaic': Block */ +static const OnigCodePoint +CR_In_Imperial_Aramaic[] = { 1, +0x10840, 0x1085f, +}; /* END of CR_In_Imperial_Aramaic */ + +/* PROPERTY: 'In_Palmyrene': Block */ +#define CR_In_Palmyrene CR_Palmyrene + +/* PROPERTY: 'In_Nabataean': Block */ +static const OnigCodePoint +CR_In_Nabataean[] = { 1, +0x10880, 0x108af, +}; /* END of CR_In_Nabataean */ + +/* PROPERTY: 'In_Hatran': Block */ +static const OnigCodePoint +CR_In_Hatran[] = { 1, +0x108e0, 0x108ff, +}; /* END of CR_In_Hatran */ + +/* PROPERTY: 'In_Phoenician': Block */ +static const OnigCodePoint +CR_In_Phoenician[] = { 1, +0x10900, 0x1091f, +}; /* END of CR_In_Phoenician */ + +/* PROPERTY: 'In_Lydian': Block */ +static const OnigCodePoint +CR_In_Lydian[] = { 1, +0x10920, 0x1093f, +}; /* END of CR_In_Lydian */ + +/* PROPERTY: 'In_Meroitic_Hieroglyphs': Block */ +#define CR_In_Meroitic_Hieroglyphs CR_Meroitic_Hieroglyphs + +/* PROPERTY: 'In_Meroitic_Cursive': Block */ +static const OnigCodePoint +CR_In_Meroitic_Cursive[] = { 1, +0x109a0, 0x109ff, +}; /* END of CR_In_Meroitic_Cursive */ + +/* PROPERTY: 'In_Kharoshthi': Block */ +static const OnigCodePoint +CR_In_Kharoshthi[] = { 1, +0x10a00, 0x10a5f, +}; /* END of CR_In_Kharoshthi */ + +/* PROPERTY: 'In_Old_South_Arabian': Block */ +#define CR_In_Old_South_Arabian CR_Old_South_Arabian + +/* PROPERTY: 'In_Old_North_Arabian': Block */ +#define CR_In_Old_North_Arabian CR_Old_North_Arabian + +/* PROPERTY: 'In_Manichaean': Block */ +static const OnigCodePoint +CR_In_Manichaean[] = { 1, +0x10ac0, 0x10aff, +}; /* END of CR_In_Manichaean */ + +/* PROPERTY: 'In_Avestan': Block */ +static const OnigCodePoint +CR_In_Avestan[] = { 1, +0x10b00, 0x10b3f, +}; /* END of CR_In_Avestan */ + +/* PROPERTY: 'In_Inscriptional_Parthian': Block */ +static const OnigCodePoint +CR_In_Inscriptional_Parthian[] = { 1, +0x10b40, 0x10b5f, +}; /* END of CR_In_Inscriptional_Parthian */ + +/* PROPERTY: 'In_Inscriptional_Pahlavi': Block */ +static const OnigCodePoint +CR_In_Inscriptional_Pahlavi[] = { 1, +0x10b60, 0x10b7f, +}; /* END of CR_In_Inscriptional_Pahlavi */ + +/* PROPERTY: 'In_Psalter_Pahlavi': Block */ +static const OnigCodePoint +CR_In_Psalter_Pahlavi[] = { 1, +0x10b80, 0x10baf, +}; /* END of CR_In_Psalter_Pahlavi */ + +/* PROPERTY: 'In_Old_Turkic': Block */ +static const OnigCodePoint +CR_In_Old_Turkic[] = { 1, +0x10c00, 0x10c4f, +}; /* END of CR_In_Old_Turkic */ + +/* PROPERTY: 'In_Old_Hungarian': Block */ +static const OnigCodePoint +CR_In_Old_Hungarian[] = { 1, +0x10c80, 0x10cff, +}; /* END of CR_In_Old_Hungarian */ + +/* PROPERTY: 'In_Hanifi_Rohingya': Block */ +static const OnigCodePoint +CR_In_Hanifi_Rohingya[] = { 1, +0x10d00, 0x10d3f, +}; /* END of CR_In_Hanifi_Rohingya */ + +/* PROPERTY: 'In_Garay': Block */ +static const OnigCodePoint +CR_In_Garay[] = { 1, +0x10d40, 0x10d8f, +}; /* END of CR_In_Garay */ + +/* PROPERTY: 'In_Rumi_Numeral_Symbols': Block */ +static const OnigCodePoint +CR_In_Rumi_Numeral_Symbols[] = { 1, +0x10e60, 0x10e7f, +}; /* END of CR_In_Rumi_Numeral_Symbols */ + +/* PROPERTY: 'In_Yezidi': Block */ +static const OnigCodePoint +CR_In_Yezidi[] = { 1, +0x10e80, 0x10ebf, +}; /* END of CR_In_Yezidi */ + +/* PROPERTY: 'In_Arabic_Extended_C': Block */ +static const OnigCodePoint +CR_In_Arabic_Extended_C[] = { 1, +0x10ec0, 0x10eff, +}; /* END of CR_In_Arabic_Extended_C */ + +/* PROPERTY: 'In_Old_Sogdian': Block */ +static const OnigCodePoint +CR_In_Old_Sogdian[] = { 1, +0x10f00, 0x10f2f, +}; /* END of CR_In_Old_Sogdian */ + +/* PROPERTY: 'In_Sogdian': Block */ +static const OnigCodePoint +CR_In_Sogdian[] = { 1, +0x10f30, 0x10f6f, +}; /* END of CR_In_Sogdian */ + +/* PROPERTY: 'In_Old_Uyghur': Block */ +static const OnigCodePoint +CR_In_Old_Uyghur[] = { 1, +0x10f70, 0x10faf, +}; /* END of CR_In_Old_Uyghur */ + +/* PROPERTY: 'In_Chorasmian': Block */ +static const OnigCodePoint +CR_In_Chorasmian[] = { 1, +0x10fb0, 0x10fdf, +}; /* END of CR_In_Chorasmian */ + +/* PROPERTY: 'In_Elymaic': Block */ +static const OnigCodePoint +CR_In_Elymaic[] = { 1, +0x10fe0, 0x10fff, +}; /* END of CR_In_Elymaic */ + +/* PROPERTY: 'In_Brahmi': Block */ +static const OnigCodePoint +CR_In_Brahmi[] = { 1, +0x11000, 0x1107f, +}; /* END of CR_In_Brahmi */ + +/* PROPERTY: 'In_Kaithi': Block */ +static const OnigCodePoint +CR_In_Kaithi[] = { 1, +0x11080, 0x110cf, +}; /* END of CR_In_Kaithi */ + +/* PROPERTY: 'In_Sora_Sompeng': Block */ +static const OnigCodePoint +CR_In_Sora_Sompeng[] = { 1, +0x110d0, 0x110ff, +}; /* END of CR_In_Sora_Sompeng */ + +/* PROPERTY: 'In_Chakma': Block */ +static const OnigCodePoint +CR_In_Chakma[] = { 1, +0x11100, 0x1114f, +}; /* END of CR_In_Chakma */ + +/* PROPERTY: 'In_Mahajani': Block */ +static const OnigCodePoint +CR_In_Mahajani[] = { 1, +0x11150, 0x1117f, +}; /* END of CR_In_Mahajani */ + +/* PROPERTY: 'In_Sharada': Block */ +#define CR_In_Sharada CR_Sharada + +/* PROPERTY: 'In_Sinhala_Archaic_Numbers': Block */ +static const OnigCodePoint +CR_In_Sinhala_Archaic_Numbers[] = { 1, +0x111e0, 0x111ff, +}; /* END of CR_In_Sinhala_Archaic_Numbers */ + +/* PROPERTY: 'In_Khojki': Block */ +static const OnigCodePoint +CR_In_Khojki[] = { 1, +0x11200, 0x1124f, +}; /* END of CR_In_Khojki */ + +/* PROPERTY: 'In_Multani': Block */ +static const OnigCodePoint +CR_In_Multani[] = { 1, +0x11280, 0x112af, +}; /* END of CR_In_Multani */ + +/* PROPERTY: 'In_Khudawadi': Block */ +static const OnigCodePoint +CR_In_Khudawadi[] = { 1, +0x112b0, 0x112ff, +}; /* END of CR_In_Khudawadi */ + +/* PROPERTY: 'In_Grantha': Block */ +static const OnigCodePoint +CR_In_Grantha[] = { 1, +0x11300, 0x1137f, +}; /* END of CR_In_Grantha */ + +/* PROPERTY: 'In_Tulu_Tigalari': Block */ +static const OnigCodePoint +CR_In_Tulu_Tigalari[] = { 1, +0x11380, 0x113ff, +}; /* END of CR_In_Tulu_Tigalari */ + +/* PROPERTY: 'In_Newa': Block */ +static const OnigCodePoint +CR_In_Newa[] = { 1, +0x11400, 0x1147f, +}; /* END of CR_In_Newa */ + +/* PROPERTY: 'In_Tirhuta': Block */ +static const OnigCodePoint +CR_In_Tirhuta[] = { 1, +0x11480, 0x114df, +}; /* END of CR_In_Tirhuta */ + +/* PROPERTY: 'In_Siddham': Block */ +static const OnigCodePoint +CR_In_Siddham[] = { 1, +0x11580, 0x115ff, +}; /* END of CR_In_Siddham */ + +/* PROPERTY: 'In_Modi': Block */ +static const OnigCodePoint +CR_In_Modi[] = { 1, +0x11600, 0x1165f, +}; /* END of CR_In_Modi */ + +/* PROPERTY: 'In_Mongolian_Supplement': Block */ +static const OnigCodePoint +CR_In_Mongolian_Supplement[] = { 1, +0x11660, 0x1167f, +}; /* END of CR_In_Mongolian_Supplement */ + +/* PROPERTY: 'In_Takri': Block */ +static const OnigCodePoint +CR_In_Takri[] = { 1, +0x11680, 0x116cf, +}; /* END of CR_In_Takri */ + +/* PROPERTY: 'In_Myanmar_Extended_C': Block */ +static const OnigCodePoint +CR_In_Myanmar_Extended_C[] = { 1, +0x116d0, 0x116ff, +}; /* END of CR_In_Myanmar_Extended_C */ + +/* PROPERTY: 'In_Ahom': Block */ +static const OnigCodePoint +CR_In_Ahom[] = { 1, +0x11700, 0x1174f, +}; /* END of CR_In_Ahom */ + +/* PROPERTY: 'In_Dogra': Block */ +static const OnigCodePoint +CR_In_Dogra[] = { 1, +0x11800, 0x1184f, +}; /* END of CR_In_Dogra */ + +/* PROPERTY: 'In_Warang_Citi': Block */ +static const OnigCodePoint +CR_In_Warang_Citi[] = { 1, +0x118a0, 0x118ff, +}; /* END of CR_In_Warang_Citi */ + +/* PROPERTY: 'In_Dives_Akuru': Block */ +static const OnigCodePoint +CR_In_Dives_Akuru[] = { 1, +0x11900, 0x1195f, +}; /* END of CR_In_Dives_Akuru */ + +/* PROPERTY: 'In_Nandinagari': Block */ +static const OnigCodePoint +CR_In_Nandinagari[] = { 1, +0x119a0, 0x119ff, +}; /* END of CR_In_Nandinagari */ + +/* PROPERTY: 'In_Zanabazar_Square': Block */ +static const OnigCodePoint +CR_In_Zanabazar_Square[] = { 1, +0x11a00, 0x11a4f, +}; /* END of CR_In_Zanabazar_Square */ + +/* PROPERTY: 'In_Soyombo': Block */ +static const OnigCodePoint +CR_In_Soyombo[] = { 1, +0x11a50, 0x11aaf, +}; /* END of CR_In_Soyombo */ + +/* PROPERTY: 'In_Unified_Canadian_Aboriginal_Syllabics_Extended_A': Block */ +static const OnigCodePoint +CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended_A[] = { 1, +0x11ab0, 0x11abf, +}; /* END of CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended_A */ + +/* PROPERTY: 'In_Pau_Cin_Hau': Block */ +static const OnigCodePoint +CR_In_Pau_Cin_Hau[] = { 1, +0x11ac0, 0x11aff, +}; /* END of CR_In_Pau_Cin_Hau */ + +/* PROPERTY: 'In_Devanagari_Extended_A': Block */ +static const OnigCodePoint +CR_In_Devanagari_Extended_A[] = { 1, +0x11b00, 0x11b5f, +}; /* END of CR_In_Devanagari_Extended_A */ + +/* PROPERTY: 'In_Sunuwar': Block */ +static const OnigCodePoint +CR_In_Sunuwar[] = { 1, +0x11bc0, 0x11bff, +}; /* END of CR_In_Sunuwar */ + +/* PROPERTY: 'In_Bhaiksuki': Block */ +static const OnigCodePoint +CR_In_Bhaiksuki[] = { 1, +0x11c00, 0x11c6f, +}; /* END of CR_In_Bhaiksuki */ + +/* PROPERTY: 'In_Marchen': Block */ +static const OnigCodePoint +CR_In_Marchen[] = { 1, +0x11c70, 0x11cbf, +}; /* END of CR_In_Marchen */ + +/* PROPERTY: 'In_Masaram_Gondi': Block */ +static const OnigCodePoint +CR_In_Masaram_Gondi[] = { 1, +0x11d00, 0x11d5f, +}; /* END of CR_In_Masaram_Gondi */ + +/* PROPERTY: 'In_Gunjala_Gondi': Block */ +static const OnigCodePoint +CR_In_Gunjala_Gondi[] = { 1, +0x11d60, 0x11daf, +}; /* END of CR_In_Gunjala_Gondi */ + +/* PROPERTY: 'In_Makasar': Block */ +static const OnigCodePoint +CR_In_Makasar[] = { 1, +0x11ee0, 0x11eff, +}; /* END of CR_In_Makasar */ + +/* PROPERTY: 'In_Kawi': Block */ +static const OnigCodePoint +CR_In_Kawi[] = { 1, +0x11f00, 0x11f5f, +}; /* END of CR_In_Kawi */ + +/* PROPERTY: 'In_Lisu_Supplement': Block */ +static const OnigCodePoint +CR_In_Lisu_Supplement[] = { 1, +0x11fb0, 0x11fbf, +}; /* END of CR_In_Lisu_Supplement */ + +/* PROPERTY: 'In_Tamil_Supplement': Block */ +static const OnigCodePoint +CR_In_Tamil_Supplement[] = { 1, +0x11fc0, 0x11fff, +}; /* END of CR_In_Tamil_Supplement */ + +/* PROPERTY: 'In_Cuneiform': Block */ +static const OnigCodePoint +CR_In_Cuneiform[] = { 1, +0x12000, 0x123ff, +}; /* END of CR_In_Cuneiform */ + +/* PROPERTY: 'In_Cuneiform_Numbers_and_Punctuation': Block */ +static const OnigCodePoint +CR_In_Cuneiform_Numbers_and_Punctuation[] = { 1, +0x12400, 0x1247f, +}; /* END of CR_In_Cuneiform_Numbers_and_Punctuation */ + +/* PROPERTY: 'In_Early_Dynastic_Cuneiform': Block */ +static const OnigCodePoint +CR_In_Early_Dynastic_Cuneiform[] = { 1, +0x12480, 0x1254f, +}; /* END of CR_In_Early_Dynastic_Cuneiform */ + +/* PROPERTY: 'In_Cypro_Minoan': Block */ +static const OnigCodePoint +CR_In_Cypro_Minoan[] = { 1, +0x12f90, 0x12fff, +}; /* END of CR_In_Cypro_Minoan */ + +/* PROPERTY: 'In_Egyptian_Hieroglyphs': Block */ +static const OnigCodePoint +CR_In_Egyptian_Hieroglyphs[] = { 1, +0x13000, 0x1342f, +}; /* END of CR_In_Egyptian_Hieroglyphs */ + +/* PROPERTY: 'In_Egyptian_Hieroglyph_Format_Controls': Block */ +static const OnigCodePoint +CR_In_Egyptian_Hieroglyph_Format_Controls[] = { 1, +0x13430, 0x1345f, +}; /* END of CR_In_Egyptian_Hieroglyph_Format_Controls */ + +/* PROPERTY: 'In_Egyptian_Hieroglyphs_Extended_A': Block */ +static const OnigCodePoint +CR_In_Egyptian_Hieroglyphs_Extended_A[] = { 1, +0x13460, 0x143ff, +}; /* END of CR_In_Egyptian_Hieroglyphs_Extended_A */ + +/* PROPERTY: 'In_Anatolian_Hieroglyphs': Block */ +static const OnigCodePoint +CR_In_Anatolian_Hieroglyphs[] = { 1, +0x14400, 0x1467f, +}; /* END of CR_In_Anatolian_Hieroglyphs */ + +/* PROPERTY: 'In_Gurung_Khema': Block */ +static const OnigCodePoint +CR_In_Gurung_Khema[] = { 1, +0x16100, 0x1613f, +}; /* END of CR_In_Gurung_Khema */ + +/* PROPERTY: 'In_Bamum_Supplement': Block */ +static const OnigCodePoint +CR_In_Bamum_Supplement[] = { 1, +0x16800, 0x16a3f, +}; /* END of CR_In_Bamum_Supplement */ + +/* PROPERTY: 'In_Mro': Block */ +static const OnigCodePoint +CR_In_Mro[] = { 1, +0x16a40, 0x16a6f, +}; /* END of CR_In_Mro */ + +/* PROPERTY: 'In_Tangsa': Block */ +static const OnigCodePoint +CR_In_Tangsa[] = { 1, +0x16a70, 0x16acf, +}; /* END of CR_In_Tangsa */ + +/* PROPERTY: 'In_Bassa_Vah': Block */ +static const OnigCodePoint +CR_In_Bassa_Vah[] = { 1, +0x16ad0, 0x16aff, +}; /* END of CR_In_Bassa_Vah */ + +/* PROPERTY: 'In_Pahawh_Hmong': Block */ +static const OnigCodePoint +CR_In_Pahawh_Hmong[] = { 1, +0x16b00, 0x16b8f, +}; /* END of CR_In_Pahawh_Hmong */ + +/* PROPERTY: 'In_Kirat_Rai': Block */ +static const OnigCodePoint +CR_In_Kirat_Rai[] = { 1, +0x16d40, 0x16d7f, +}; /* END of CR_In_Kirat_Rai */ + +/* PROPERTY: 'In_Medefaidrin': Block */ +static const OnigCodePoint +CR_In_Medefaidrin[] = { 1, +0x16e40, 0x16e9f, +}; /* END of CR_In_Medefaidrin */ + +/* PROPERTY: 'In_Miao': Block */ +static const OnigCodePoint +CR_In_Miao[] = { 1, +0x16f00, 0x16f9f, +}; /* END of CR_In_Miao */ + +/* PROPERTY: 'In_Ideographic_Symbols_and_Punctuation': Block */ +static const OnigCodePoint +CR_In_Ideographic_Symbols_and_Punctuation[] = { 1, +0x16fe0, 0x16fff, +}; /* END of CR_In_Ideographic_Symbols_and_Punctuation */ + +/* PROPERTY: 'In_Tangut': Block */ +static const OnigCodePoint +CR_In_Tangut[] = { 1, +0x17000, 0x187ff, +}; /* END of CR_In_Tangut */ + +/* PROPERTY: 'In_Tangut_Components': Block */ +static const OnigCodePoint +CR_In_Tangut_Components[] = { 1, +0x18800, 0x18aff, +}; /* END of CR_In_Tangut_Components */ + +/* PROPERTY: 'In_Khitan_Small_Script': Block */ +static const OnigCodePoint +CR_In_Khitan_Small_Script[] = { 1, +0x18b00, 0x18cff, +}; /* END of CR_In_Khitan_Small_Script */ + +/* PROPERTY: 'In_Tangut_Supplement': Block */ +static const OnigCodePoint +CR_In_Tangut_Supplement[] = { 1, +0x18d00, 0x18d7f, +}; /* END of CR_In_Tangut_Supplement */ + +/* PROPERTY: 'In_Kana_Extended_B': Block */ +static const OnigCodePoint +CR_In_Kana_Extended_B[] = { 1, +0x1aff0, 0x1afff, +}; /* END of CR_In_Kana_Extended_B */ + +/* PROPERTY: 'In_Kana_Supplement': Block */ +static const OnigCodePoint +CR_In_Kana_Supplement[] = { 1, +0x1b000, 0x1b0ff, +}; /* END of CR_In_Kana_Supplement */ + +/* PROPERTY: 'In_Kana_Extended_A': Block */ +static const OnigCodePoint +CR_In_Kana_Extended_A[] = { 1, +0x1b100, 0x1b12f, +}; /* END of CR_In_Kana_Extended_A */ + +/* PROPERTY: 'In_Small_Kana_Extension': Block */ +static const OnigCodePoint +CR_In_Small_Kana_Extension[] = { 1, +0x1b130, 0x1b16f, +}; /* END of CR_In_Small_Kana_Extension */ + +/* PROPERTY: 'In_Nushu': Block */ +static const OnigCodePoint +CR_In_Nushu[] = { 1, +0x1b170, 0x1b2ff, +}; /* END of CR_In_Nushu */ + +/* PROPERTY: 'In_Duployan': Block */ +static const OnigCodePoint +CR_In_Duployan[] = { 1, +0x1bc00, 0x1bc9f, +}; /* END of CR_In_Duployan */ + +/* PROPERTY: 'In_Shorthand_Format_Controls': Block */ +static const OnigCodePoint +CR_In_Shorthand_Format_Controls[] = { 1, +0x1bca0, 0x1bcaf, +}; /* END of CR_In_Shorthand_Format_Controls */ + +/* PROPERTY: 'In_Symbols_for_Legacy_Computing_Supplement': Block */ +static const OnigCodePoint +CR_In_Symbols_for_Legacy_Computing_Supplement[] = { 1, +0x1cc00, 0x1cebf, +}; /* END of CR_In_Symbols_for_Legacy_Computing_Supplement */ + +/* PROPERTY: 'In_Znamenny_Musical_Notation': Block */ +static const OnigCodePoint +CR_In_Znamenny_Musical_Notation[] = { 1, +0x1cf00, 0x1cfcf, +}; /* END of CR_In_Znamenny_Musical_Notation */ + +/* PROPERTY: 'In_Byzantine_Musical_Symbols': Block */ +static const OnigCodePoint +CR_In_Byzantine_Musical_Symbols[] = { 1, +0x1d000, 0x1d0ff, +}; /* END of CR_In_Byzantine_Musical_Symbols */ + +/* PROPERTY: 'In_Musical_Symbols': Block */ +static const OnigCodePoint +CR_In_Musical_Symbols[] = { 1, +0x1d100, 0x1d1ff, +}; /* END of CR_In_Musical_Symbols */ + +/* PROPERTY: 'In_Ancient_Greek_Musical_Notation': Block */ +static const OnigCodePoint +CR_In_Ancient_Greek_Musical_Notation[] = { 1, +0x1d200, 0x1d24f, +}; /* END of CR_In_Ancient_Greek_Musical_Notation */ + +/* PROPERTY: 'In_Kaktovik_Numerals': Block */ +static const OnigCodePoint +CR_In_Kaktovik_Numerals[] = { 1, +0x1d2c0, 0x1d2df, +}; /* END of CR_In_Kaktovik_Numerals */ + +/* PROPERTY: 'In_Mayan_Numerals': Block */ +static const OnigCodePoint +CR_In_Mayan_Numerals[] = { 1, +0x1d2e0, 0x1d2ff, +}; /* END of CR_In_Mayan_Numerals */ + +/* PROPERTY: 'In_Tai_Xuan_Jing_Symbols': Block */ +static const OnigCodePoint +CR_In_Tai_Xuan_Jing_Symbols[] = { 1, +0x1d300, 0x1d35f, +}; /* END of CR_In_Tai_Xuan_Jing_Symbols */ + +/* PROPERTY: 'In_Counting_Rod_Numerals': Block */ +static const OnigCodePoint +CR_In_Counting_Rod_Numerals[] = { 1, +0x1d360, 0x1d37f, +}; /* END of CR_In_Counting_Rod_Numerals */ + +/* PROPERTY: 'In_Mathematical_Alphanumeric_Symbols': Block */ +static const OnigCodePoint +CR_In_Mathematical_Alphanumeric_Symbols[] = { 1, +0x1d400, 0x1d7ff, +}; /* END of CR_In_Mathematical_Alphanumeric_Symbols */ + +/* PROPERTY: 'In_Sutton_SignWriting': Block */ +static const OnigCodePoint +CR_In_Sutton_SignWriting[] = { 1, +0x1d800, 0x1daaf, +}; /* END of CR_In_Sutton_SignWriting */ + +/* PROPERTY: 'In_Latin_Extended_G': Block */ +static const OnigCodePoint +CR_In_Latin_Extended_G[] = { 1, +0x1df00, 0x1dfff, +}; /* END of CR_In_Latin_Extended_G */ + +/* PROPERTY: 'In_Glagolitic_Supplement': Block */ +static const OnigCodePoint +CR_In_Glagolitic_Supplement[] = { 1, +0x1e000, 0x1e02f, +}; /* END of CR_In_Glagolitic_Supplement */ + +/* PROPERTY: 'In_Cyrillic_Extended_D': Block */ +static const OnigCodePoint +CR_In_Cyrillic_Extended_D[] = { 1, +0x1e030, 0x1e08f, +}; /* END of CR_In_Cyrillic_Extended_D */ + +/* PROPERTY: 'In_Nyiakeng_Puachue_Hmong': Block */ +static const OnigCodePoint +CR_In_Nyiakeng_Puachue_Hmong[] = { 1, +0x1e100, 0x1e14f, +}; /* END of CR_In_Nyiakeng_Puachue_Hmong */ + +/* PROPERTY: 'In_Toto': Block */ +static const OnigCodePoint +CR_In_Toto[] = { 1, +0x1e290, 0x1e2bf, +}; /* END of CR_In_Toto */ + +/* PROPERTY: 'In_Wancho': Block */ +static const OnigCodePoint +CR_In_Wancho[] = { 1, +0x1e2c0, 0x1e2ff, +}; /* END of CR_In_Wancho */ + +/* PROPERTY: 'In_Nag_Mundari': Block */ +static const OnigCodePoint +CR_In_Nag_Mundari[] = { 1, +0x1e4d0, 0x1e4ff, +}; /* END of CR_In_Nag_Mundari */ + +/* PROPERTY: 'In_Ol_Onal': Block */ +static const OnigCodePoint +CR_In_Ol_Onal[] = { 1, +0x1e5d0, 0x1e5ff, +}; /* END of CR_In_Ol_Onal */ + +/* PROPERTY: 'In_Ethiopic_Extended_B': Block */ +static const OnigCodePoint +CR_In_Ethiopic_Extended_B[] = { 1, +0x1e7e0, 0x1e7ff, +}; /* END of CR_In_Ethiopic_Extended_B */ + +/* PROPERTY: 'In_Mende_Kikakui': Block */ +static const OnigCodePoint +CR_In_Mende_Kikakui[] = { 1, +0x1e800, 0x1e8df, +}; /* END of CR_In_Mende_Kikakui */ + +/* PROPERTY: 'In_Adlam': Block */ +static const OnigCodePoint +CR_In_Adlam[] = { 1, +0x1e900, 0x1e95f, +}; /* END of CR_In_Adlam */ + +/* PROPERTY: 'In_Indic_Siyaq_Numbers': Block */ +static const OnigCodePoint +CR_In_Indic_Siyaq_Numbers[] = { 1, +0x1ec70, 0x1ecbf, +}; /* END of CR_In_Indic_Siyaq_Numbers */ + +/* PROPERTY: 'In_Ottoman_Siyaq_Numbers': Block */ +static const OnigCodePoint +CR_In_Ottoman_Siyaq_Numbers[] = { 1, +0x1ed00, 0x1ed4f, +}; /* END of CR_In_Ottoman_Siyaq_Numbers */ + +/* PROPERTY: 'In_Arabic_Mathematical_Alphabetic_Symbols': Block */ +static const OnigCodePoint +CR_In_Arabic_Mathematical_Alphabetic_Symbols[] = { 1, +0x1ee00, 0x1eeff, +}; /* END of CR_In_Arabic_Mathematical_Alphabetic_Symbols */ + +/* PROPERTY: 'In_Mahjong_Tiles': Block */ +static const OnigCodePoint +CR_In_Mahjong_Tiles[] = { 1, +0x1f000, 0x1f02f, +}; /* END of CR_In_Mahjong_Tiles */ + +/* PROPERTY: 'In_Domino_Tiles': Block */ +static const OnigCodePoint +CR_In_Domino_Tiles[] = { 1, +0x1f030, 0x1f09f, +}; /* END of CR_In_Domino_Tiles */ + +/* PROPERTY: 'In_Playing_Cards': Block */ +static const OnigCodePoint +CR_In_Playing_Cards[] = { 1, +0x1f0a0, 0x1f0ff, +}; /* END of CR_In_Playing_Cards */ + +/* PROPERTY: 'In_Enclosed_Alphanumeric_Supplement': Block */ +static const OnigCodePoint +CR_In_Enclosed_Alphanumeric_Supplement[] = { 1, +0x1f100, 0x1f1ff, +}; /* END of CR_In_Enclosed_Alphanumeric_Supplement */ + +/* PROPERTY: 'In_Enclosed_Ideographic_Supplement': Block */ +static const OnigCodePoint +CR_In_Enclosed_Ideographic_Supplement[] = { 1, +0x1f200, 0x1f2ff, +}; /* END of CR_In_Enclosed_Ideographic_Supplement */ + +/* PROPERTY: 'In_Miscellaneous_Symbols_and_Pictographs': Block */ +static const OnigCodePoint +CR_In_Miscellaneous_Symbols_and_Pictographs[] = { 1, +0x1f300, 0x1f5ff, +}; /* END of CR_In_Miscellaneous_Symbols_and_Pictographs */ + +/* PROPERTY: 'In_Emoticons': Block */ +static const OnigCodePoint +CR_In_Emoticons[] = { 1, +0x1f600, 0x1f64f, +}; /* END of CR_In_Emoticons */ + +/* PROPERTY: 'In_Ornamental_Dingbats': Block */ +static const OnigCodePoint +CR_In_Ornamental_Dingbats[] = { 1, +0x1f650, 0x1f67f, +}; /* END of CR_In_Ornamental_Dingbats */ + +/* PROPERTY: 'In_Transport_and_Map_Symbols': Block */ +static const OnigCodePoint +CR_In_Transport_and_Map_Symbols[] = { 1, +0x1f680, 0x1f6ff, +}; /* END of CR_In_Transport_and_Map_Symbols */ + +/* PROPERTY: 'In_Alchemical_Symbols': Block */ +static const OnigCodePoint +CR_In_Alchemical_Symbols[] = { 1, +0x1f700, 0x1f77f, +}; /* END of CR_In_Alchemical_Symbols */ + +/* PROPERTY: 'In_Geometric_Shapes_Extended': Block */ +static const OnigCodePoint +CR_In_Geometric_Shapes_Extended[] = { 1, +0x1f780, 0x1f7ff, +}; /* END of CR_In_Geometric_Shapes_Extended */ + +/* PROPERTY: 'In_Supplemental_Arrows_C': Block */ +static const OnigCodePoint +CR_In_Supplemental_Arrows_C[] = { 1, +0x1f800, 0x1f8ff, +}; /* END of CR_In_Supplemental_Arrows_C */ + +/* PROPERTY: 'In_Supplemental_Symbols_and_Pictographs': Block */ +static const OnigCodePoint +CR_In_Supplemental_Symbols_and_Pictographs[] = { 1, +0x1f900, 0x1f9ff, +}; /* END of CR_In_Supplemental_Symbols_and_Pictographs */ + +/* PROPERTY: 'In_Chess_Symbols': Block */ +static const OnigCodePoint +CR_In_Chess_Symbols[] = { 1, +0x1fa00, 0x1fa6f, +}; /* END of CR_In_Chess_Symbols */ + +/* PROPERTY: 'In_Symbols_and_Pictographs_Extended_A': Block */ +static const OnigCodePoint +CR_In_Symbols_and_Pictographs_Extended_A[] = { 1, +0x1fa70, 0x1faff, +}; /* END of CR_In_Symbols_and_Pictographs_Extended_A */ + +/* PROPERTY: 'In_Symbols_for_Legacy_Computing': Block */ +static const OnigCodePoint +CR_In_Symbols_for_Legacy_Computing[] = { 1, +0x1fb00, 0x1fbff, +}; /* END of CR_In_Symbols_for_Legacy_Computing */ + +/* PROPERTY: 'In_CJK_Unified_Ideographs_Extension_B': Block */ +static const OnigCodePoint +CR_In_CJK_Unified_Ideographs_Extension_B[] = { 1, +0x20000, 0x2a6df, +}; /* END of CR_In_CJK_Unified_Ideographs_Extension_B */ + +/* PROPERTY: 'In_CJK_Unified_Ideographs_Extension_C': Block */ +static const OnigCodePoint +CR_In_CJK_Unified_Ideographs_Extension_C[] = { 1, +0x2a700, 0x2b73f, +}; /* END of CR_In_CJK_Unified_Ideographs_Extension_C */ + +/* PROPERTY: 'In_CJK_Unified_Ideographs_Extension_D': Block */ +static const OnigCodePoint +CR_In_CJK_Unified_Ideographs_Extension_D[] = { 1, +0x2b740, 0x2b81f, +}; /* END of CR_In_CJK_Unified_Ideographs_Extension_D */ + +/* PROPERTY: 'In_CJK_Unified_Ideographs_Extension_E': Block */ +static const OnigCodePoint +CR_In_CJK_Unified_Ideographs_Extension_E[] = { 1, +0x2b820, 0x2ceaf, +}; /* END of CR_In_CJK_Unified_Ideographs_Extension_E */ + +/* PROPERTY: 'In_CJK_Unified_Ideographs_Extension_F': Block */ +static const OnigCodePoint +CR_In_CJK_Unified_Ideographs_Extension_F[] = { 1, +0x2ceb0, 0x2ebef, +}; /* END of CR_In_CJK_Unified_Ideographs_Extension_F */ + +/* PROPERTY: 'In_CJK_Unified_Ideographs_Extension_I': Block */ +static const OnigCodePoint +CR_In_CJK_Unified_Ideographs_Extension_I[] = { 1, +0x2ebf0, 0x2ee5f, +}; /* END of CR_In_CJK_Unified_Ideographs_Extension_I */ + +/* PROPERTY: 'In_CJK_Compatibility_Ideographs_Supplement': Block */ +static const OnigCodePoint +CR_In_CJK_Compatibility_Ideographs_Supplement[] = { 1, +0x2f800, 0x2fa1f, +}; /* END of CR_In_CJK_Compatibility_Ideographs_Supplement */ + +/* PROPERTY: 'In_CJK_Unified_Ideographs_Extension_G': Block */ +static const OnigCodePoint +CR_In_CJK_Unified_Ideographs_Extension_G[] = { 1, +0x30000, 0x3134f, +}; /* END of CR_In_CJK_Unified_Ideographs_Extension_G */ + +/* PROPERTY: 'In_CJK_Unified_Ideographs_Extension_H': Block */ +static const OnigCodePoint +CR_In_CJK_Unified_Ideographs_Extension_H[] = { 1, +0x31350, 0x323af, +}; /* END of CR_In_CJK_Unified_Ideographs_Extension_H */ + +/* PROPERTY: 'In_Tags': Block */ +static const OnigCodePoint +CR_In_Tags[] = { 1, +0xe0000, 0xe007f, +}; /* END of CR_In_Tags */ + +/* PROPERTY: 'In_Variation_Selectors_Supplement': Block */ +static const OnigCodePoint +CR_In_Variation_Selectors_Supplement[] = { 1, +0xe0100, 0xe01ef, +}; /* END of CR_In_Variation_Selectors_Supplement */ + +/* PROPERTY: 'In_Supplementary_Private_Use_Area_A': Block */ +static const OnigCodePoint +CR_In_Supplementary_Private_Use_Area_A[] = { 1, +0xf0000, 0xfffff, +}; /* END of CR_In_Supplementary_Private_Use_Area_A */ + +/* PROPERTY: 'In_Supplementary_Private_Use_Area_B': Block */ +static const OnigCodePoint +CR_In_Supplementary_Private_Use_Area_B[] = { 1, +0x100000, 0x10ffff, +}; /* END of CR_In_Supplementary_Private_Use_Area_B */ + +/* PROPERTY: 'In_No_Block': Block */ +static const OnigCodePoint +CR_In_No_Block[] = { 51, +0x2fe0, 0x2fef, +0x10200, 0x1027f, +0x103e0, 0x103ff, +0x107c0, 0x107ff, +0x108b0, 0x108df, +0x10940, 0x1097f, +0x10aa0, 0x10abf, +0x10bb0, 0x10bff, +0x10c50, 0x10c7f, +0x10d90, 0x10e5f, +0x11250, 0x1127f, +0x114e0, 0x1157f, +0x11750, 0x117ff, +0x11850, 0x1189f, +0x11960, 0x1199f, +0x11b60, 0x11bbf, +0x11cc0, 0x11cff, +0x11db0, 0x11edf, +0x11f60, 0x11faf, +0x12550, 0x12f8f, +0x14680, 0x160ff, +0x16140, 0x167ff, +0x16b90, 0x16d3f, +0x16d80, 0x16e3f, +0x16ea0, 0x16eff, +0x16fa0, 0x16fdf, +0x18d80, 0x1afef, +0x1b300, 0x1bbff, +0x1bcb0, 0x1cbff, +0x1cec0, 0x1ceff, +0x1cfd0, 0x1cfff, +0x1d250, 0x1d2bf, +0x1d380, 0x1d3ff, +0x1dab0, 0x1deff, +0x1e090, 0x1e0ff, +0x1e150, 0x1e28f, +0x1e300, 0x1e4cf, +0x1e500, 0x1e5cf, +0x1e600, 0x1e7df, +0x1e8e0, 0x1e8ff, +0x1e960, 0x1ec6f, +0x1ecc0, 0x1ecff, +0x1ed50, 0x1edff, +0x1ef00, 0x1efff, +0x1fc00, 0x1ffff, +0x2a6e0, 0x2a6ff, +0x2ee60, 0x2f7ff, +0x2fa20, 0x2ffff, +0x323b0, 0xdffff, +0xe0080, 0xe00ff, +0xe01f0, 0xeffff, +}; /* END of CR_In_No_Block */ + +static const OnigCodePoint* +const CodeRanges[] = { + CR_NEWLINE, + CR_Alpha, + CR_Blank, + CR_Cntrl, + CR_Digit, + CR_Graph, + CR_Lower, + CR_Print, + CR_PosixPunct, + CR_Space, + CR_Upper, + CR_XDigit, + CR_Word, + CR_Alnum, + CR_ASCII, + CR_ASCII_Hex_Digit, + CR_Adlam, + CR_Ahom, + CR_Alphabetic, + CR_Anatolian_Hieroglyphs, + CR_Any, + CR_Arabic, + CR_Armenian, + CR_Assigned, + CR_Avestan, + CR_Balinese, + CR_Bamum, + CR_Bassa_Vah, + CR_Batak, + CR_Bengali, + CR_Bhaiksuki, + CR_Bidi_Control, + CR_Bopomofo, + CR_Brahmi, + CR_Braille, + CR_Buginese, + CR_Buhid, + CR_C, + CR_Canadian_Aboriginal, + CR_Carian, + CR_Case_Ignorable, + CR_Cased, + CR_Caucasian_Albanian, + CR_Cc, + CR_Cf, + CR_Chakma, + CR_Cham, + CR_Changes_When_Casefolded, + CR_Changes_When_Casemapped, + CR_Changes_When_Lowercased, + CR_Changes_When_Titlecased, + CR_Changes_When_Uppercased, + CR_Cherokee, + CR_Chorasmian, + CR_Cn, + CR_Co, + CR_Common, + CR_Coptic, + CR_Cs, + CR_Cuneiform, + CR_Cypriot, + CR_Cypro_Minoan, + CR_Cyrillic, + CR_Dash, + CR_Default_Ignorable_Code_Point, + CR_Deprecated, + CR_Deseret, + CR_Devanagari, + CR_Diacritic, + CR_Dives_Akuru, + CR_Dogra, + CR_Duployan, + CR_Egyptian_Hieroglyphs, + CR_Elbasan, + CR_Elymaic, + CR_Emoji, + CR_Emoji_Component, + CR_Emoji_Modifier, + CR_Emoji_Modifier_Base, + CR_Emoji_Presentation, + CR_Ethiopic, + CR_Extended_Pictographic, + CR_Extender, + CR_Garay, + CR_Georgian, + CR_Glagolitic, + CR_Gothic, + CR_Grantha, + CR_Grapheme_Base, + CR_Grapheme_Extend, + CR_Grapheme_Link, + CR_Greek, + CR_Gujarati, + CR_Gunjala_Gondi, + CR_Gurmukhi, + CR_Gurung_Khema, + CR_Han, + CR_Hangul, + CR_Hanifi_Rohingya, + CR_Hanunoo, + CR_Hatran, + CR_Hebrew, + CR_Hex_Digit, + CR_Hiragana, + CR_Hyphen, + CR_IDS_Binary_Operator, + CR_IDS_Trinary_Operator, + CR_IDS_Unary_Operator, + CR_ID_Compat_Math_Continue, + CR_ID_Compat_Math_Start, + CR_ID_Continue, + CR_ID_Start, + CR_Ideographic, + CR_Imperial_Aramaic, + CR_InCB, + CR_Inherited, + CR_Inscriptional_Pahlavi, + CR_Inscriptional_Parthian, + CR_Javanese, + CR_Join_Control, + CR_Kaithi, + CR_Kannada, + CR_Katakana, + CR_Kawi, + CR_Kayah_Li, + CR_Kharoshthi, + CR_Khitan_Small_Script, + CR_Khmer, + CR_Khojki, + CR_Khudawadi, + CR_Kirat_Rai, + CR_L, + CR_LC, + CR_Lao, + CR_Latin, + CR_Lepcha, + CR_Limbu, + CR_Linear_A, + CR_Linear_B, + CR_Lisu, + CR_Ll, + CR_Lm, + CR_Lo, + CR_Logical_Order_Exception, + CR_Lowercase, + CR_Lt, + CR_Lu, + CR_Lycian, + CR_Lydian, + CR_M, + CR_Mahajani, + CR_Makasar, + CR_Malayalam, + CR_Mandaic, + CR_Manichaean, + CR_Marchen, + CR_Masaram_Gondi, + CR_Math, + CR_Mc, + CR_Me, + CR_Medefaidrin, + CR_Meetei_Mayek, + CR_Mende_Kikakui, + CR_Meroitic_Cursive, + CR_Meroitic_Hieroglyphs, + CR_Miao, + CR_Mn, + CR_Modi, + CR_Modifier_Combining_Mark, + CR_Mongolian, + CR_Mro, + CR_Multani, + CR_Myanmar, + CR_N, + CR_Nabataean, + CR_Nag_Mundari, + CR_Nandinagari, + CR_Nd, + CR_New_Tai_Lue, + CR_Newa, + CR_Nko, + CR_Nl, + CR_No, + CR_Noncharacter_Code_Point, + CR_Nushu, + CR_Nyiakeng_Puachue_Hmong, + CR_Ogham, + CR_Ol_Chiki, + CR_Ol_Onal, + CR_Old_Hungarian, + CR_Old_Italic, + CR_Old_North_Arabian, + CR_Old_Permic, + CR_Old_Persian, + CR_Old_Sogdian, + CR_Old_South_Arabian, + CR_Old_Turkic, + CR_Old_Uyghur, + CR_Oriya, + CR_Osage, + CR_Osmanya, + CR_Other_Alphabetic, + CR_Other_Default_Ignorable_Code_Point, + CR_Other_Grapheme_Extend, + CR_Other_ID_Continue, + CR_Other_ID_Start, + CR_Other_Lowercase, + CR_Other_Math, + CR_Other_Uppercase, + CR_P, + CR_Pahawh_Hmong, + CR_Palmyrene, + CR_Pattern_Syntax, + CR_Pattern_White_Space, + CR_Pau_Cin_Hau, + CR_Pc, + CR_Pd, + CR_Pe, + CR_Pf, + CR_Phags_Pa, + CR_Phoenician, + CR_Pi, + CR_Po, + CR_Prepended_Concatenation_Mark, + CR_Ps, + CR_Psalter_Pahlavi, + CR_Quotation_Mark, + CR_Radical, + CR_Regional_Indicator, + CR_Rejang, + CR_Runic, + CR_S, + CR_Samaritan, + CR_Saurashtra, + CR_Sc, + CR_Sentence_Terminal, + CR_Sharada, + CR_Shavian, + CR_Siddham, + CR_SignWriting, + CR_Sinhala, + CR_Sk, + CR_Sm, + CR_So, + CR_Soft_Dotted, + CR_Sogdian, + CR_Sora_Sompeng, + CR_Soyombo, + CR_Sundanese, + CR_Sunuwar, + CR_Syloti_Nagri, + CR_Syriac, + CR_Tagalog, + CR_Tagbanwa, + CR_Tai_Le, + CR_Tai_Tham, + CR_Tai_Viet, + CR_Takri, + CR_Tamil, + CR_Tangsa, + CR_Tangut, + CR_Telugu, + CR_Terminal_Punctuation, + CR_Thaana, + CR_Thai, + CR_Tibetan, + CR_Tifinagh, + CR_Tirhuta, + CR_Todhri, + CR_Toto, + CR_Tulu_Tigalari, + CR_Ugaritic, + CR_Unified_Ideograph, + CR_Unknown, + CR_Uppercase, + CR_Vai, + CR_Variation_Selector, + CR_Vithkuqi, + CR_Wancho, + CR_Warang_Citi, + CR_White_Space, + CR_XID_Continue, + CR_XID_Start, + CR_Yezidi, + CR_Yi, + CR_Z, + CR_Zanabazar_Square, + CR_Zl, + CR_Zp, + CR_Zs, + CR_In_Basic_Latin, + CR_In_Latin_1_Supplement, + CR_In_Latin_Extended_A, + CR_In_Latin_Extended_B, + CR_In_IPA_Extensions, + CR_In_Spacing_Modifier_Letters, + CR_In_Combining_Diacritical_Marks, + CR_In_Greek_and_Coptic, + CR_In_Cyrillic, + CR_In_Cyrillic_Supplement, + CR_In_Armenian, + CR_In_Hebrew, + CR_In_Arabic, + CR_In_Syriac, + CR_In_Arabic_Supplement, + CR_In_Thaana, + CR_In_NKo, + CR_In_Samaritan, + CR_In_Mandaic, + CR_In_Syriac_Supplement, + CR_In_Arabic_Extended_B, + CR_In_Arabic_Extended_A, + CR_In_Devanagari, + CR_In_Bengali, + CR_In_Gurmukhi, + CR_In_Gujarati, + CR_In_Oriya, + CR_In_Tamil, + CR_In_Telugu, + CR_In_Kannada, + CR_In_Malayalam, + CR_In_Sinhala, + CR_In_Thai, + CR_In_Lao, + CR_In_Tibetan, + CR_In_Myanmar, + CR_In_Georgian, + CR_In_Hangul_Jamo, + CR_In_Ethiopic, + CR_In_Ethiopic_Supplement, + CR_In_Cherokee, + CR_In_Unified_Canadian_Aboriginal_Syllabics, + CR_In_Ogham, + CR_In_Runic, + CR_In_Tagalog, + CR_In_Hanunoo, + CR_In_Buhid, + CR_In_Tagbanwa, + CR_In_Khmer, + CR_In_Mongolian, + CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended, + CR_In_Limbu, + CR_In_Tai_Le, + CR_In_New_Tai_Lue, + CR_In_Khmer_Symbols, + CR_In_Buginese, + CR_In_Tai_Tham, + CR_In_Combining_Diacritical_Marks_Extended, + CR_In_Balinese, + CR_In_Sundanese, + CR_In_Batak, + CR_In_Lepcha, + CR_In_Ol_Chiki, + CR_In_Cyrillic_Extended_C, + CR_In_Georgian_Extended, + CR_In_Sundanese_Supplement, + CR_In_Vedic_Extensions, + CR_In_Phonetic_Extensions, + CR_In_Phonetic_Extensions_Supplement, + CR_In_Combining_Diacritical_Marks_Supplement, + CR_In_Latin_Extended_Additional, + CR_In_Greek_Extended, + CR_In_General_Punctuation, + CR_In_Superscripts_and_Subscripts, + CR_In_Currency_Symbols, + CR_In_Combining_Diacritical_Marks_for_Symbols, + CR_In_Letterlike_Symbols, + CR_In_Number_Forms, + CR_In_Arrows, + CR_In_Mathematical_Operators, + CR_In_Miscellaneous_Technical, + CR_In_Control_Pictures, + CR_In_Optical_Character_Recognition, + CR_In_Enclosed_Alphanumerics, + CR_In_Box_Drawing, + CR_In_Block_Elements, + CR_In_Geometric_Shapes, + CR_In_Miscellaneous_Symbols, + CR_In_Dingbats, + CR_In_Miscellaneous_Mathematical_Symbols_A, + CR_In_Supplemental_Arrows_A, + CR_In_Braille_Patterns, + CR_In_Supplemental_Arrows_B, + CR_In_Miscellaneous_Mathematical_Symbols_B, + CR_In_Supplemental_Mathematical_Operators, + CR_In_Miscellaneous_Symbols_and_Arrows, + CR_In_Glagolitic, + CR_In_Latin_Extended_C, + CR_In_Coptic, + CR_In_Georgian_Supplement, + CR_In_Tifinagh, + CR_In_Ethiopic_Extended, + CR_In_Cyrillic_Extended_A, + CR_In_Supplemental_Punctuation, + CR_In_CJK_Radicals_Supplement, + CR_In_Kangxi_Radicals, + CR_In_Ideographic_Description_Characters, + CR_In_CJK_Symbols_and_Punctuation, + CR_In_Hiragana, + CR_In_Katakana, + CR_In_Bopomofo, + CR_In_Hangul_Compatibility_Jamo, + CR_In_Kanbun, + CR_In_Bopomofo_Extended, + CR_In_CJK_Strokes, + CR_In_Katakana_Phonetic_Extensions, + CR_In_Enclosed_CJK_Letters_and_Months, + CR_In_CJK_Compatibility, + CR_In_CJK_Unified_Ideographs_Extension_A, + CR_In_Yijing_Hexagram_Symbols, + CR_In_CJK_Unified_Ideographs, + CR_In_Yi_Syllables, + CR_In_Yi_Radicals, + CR_In_Lisu, + CR_In_Vai, + CR_In_Cyrillic_Extended_B, + CR_In_Bamum, + CR_In_Modifier_Tone_Letters, + CR_In_Latin_Extended_D, + CR_In_Syloti_Nagri, + CR_In_Common_Indic_Number_Forms, + CR_In_Phags_pa, + CR_In_Saurashtra, + CR_In_Devanagari_Extended, + CR_In_Kayah_Li, + CR_In_Rejang, + CR_In_Hangul_Jamo_Extended_A, + CR_In_Javanese, + CR_In_Myanmar_Extended_B, + CR_In_Cham, + CR_In_Myanmar_Extended_A, + CR_In_Tai_Viet, + CR_In_Meetei_Mayek_Extensions, + CR_In_Ethiopic_Extended_A, + CR_In_Latin_Extended_E, + CR_In_Cherokee_Supplement, + CR_In_Meetei_Mayek, + CR_In_Hangul_Syllables, + CR_In_Hangul_Jamo_Extended_B, + CR_In_High_Surrogates, + CR_In_High_Private_Use_Surrogates, + CR_In_Low_Surrogates, + CR_In_Private_Use_Area, + CR_In_CJK_Compatibility_Ideographs, + CR_In_Alphabetic_Presentation_Forms, + CR_In_Arabic_Presentation_Forms_A, + CR_In_Variation_Selectors, + CR_In_Vertical_Forms, + CR_In_Combining_Half_Marks, + CR_In_CJK_Compatibility_Forms, + CR_In_Small_Form_Variants, + CR_In_Arabic_Presentation_Forms_B, + CR_In_Halfwidth_and_Fullwidth_Forms, + CR_In_Specials, + CR_In_Linear_B_Syllabary, + CR_In_Linear_B_Ideograms, + CR_In_Aegean_Numbers, + CR_In_Ancient_Greek_Numbers, + CR_In_Ancient_Symbols, + CR_In_Phaistos_Disc, + CR_In_Lycian, + CR_In_Carian, + CR_In_Coptic_Epact_Numbers, + CR_In_Old_Italic, + CR_In_Gothic, + CR_In_Old_Permic, + CR_In_Ugaritic, + CR_In_Old_Persian, + CR_In_Deseret, + CR_In_Shavian, + CR_In_Osmanya, + CR_In_Osage, + CR_In_Elbasan, + CR_In_Caucasian_Albanian, + CR_In_Vithkuqi, + CR_In_Todhri, + CR_In_Linear_A, + CR_In_Latin_Extended_F, + CR_In_Cypriot_Syllabary, + CR_In_Imperial_Aramaic, + CR_In_Palmyrene, + CR_In_Nabataean, + CR_In_Hatran, + CR_In_Phoenician, + CR_In_Lydian, + CR_In_Meroitic_Hieroglyphs, + CR_In_Meroitic_Cursive, + CR_In_Kharoshthi, + CR_In_Old_South_Arabian, + CR_In_Old_North_Arabian, + CR_In_Manichaean, + CR_In_Avestan, + CR_In_Inscriptional_Parthian, + CR_In_Inscriptional_Pahlavi, + CR_In_Psalter_Pahlavi, + CR_In_Old_Turkic, + CR_In_Old_Hungarian, + CR_In_Hanifi_Rohingya, + CR_In_Garay, + CR_In_Rumi_Numeral_Symbols, + CR_In_Yezidi, + CR_In_Arabic_Extended_C, + CR_In_Old_Sogdian, + CR_In_Sogdian, + CR_In_Old_Uyghur, + CR_In_Chorasmian, + CR_In_Elymaic, + CR_In_Brahmi, + CR_In_Kaithi, + CR_In_Sora_Sompeng, + CR_In_Chakma, + CR_In_Mahajani, + CR_In_Sharada, + CR_In_Sinhala_Archaic_Numbers, + CR_In_Khojki, + CR_In_Multani, + CR_In_Khudawadi, + CR_In_Grantha, + CR_In_Tulu_Tigalari, + CR_In_Newa, + CR_In_Tirhuta, + CR_In_Siddham, + CR_In_Modi, + CR_In_Mongolian_Supplement, + CR_In_Takri, + CR_In_Myanmar_Extended_C, + CR_In_Ahom, + CR_In_Dogra, + CR_In_Warang_Citi, + CR_In_Dives_Akuru, + CR_In_Nandinagari, + CR_In_Zanabazar_Square, + CR_In_Soyombo, + CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended_A, + CR_In_Pau_Cin_Hau, + CR_In_Devanagari_Extended_A, + CR_In_Sunuwar, + CR_In_Bhaiksuki, + CR_In_Marchen, + CR_In_Masaram_Gondi, + CR_In_Gunjala_Gondi, + CR_In_Makasar, + CR_In_Kawi, + CR_In_Lisu_Supplement, + CR_In_Tamil_Supplement, + CR_In_Cuneiform, + CR_In_Cuneiform_Numbers_and_Punctuation, + CR_In_Early_Dynastic_Cuneiform, + CR_In_Cypro_Minoan, + CR_In_Egyptian_Hieroglyphs, + CR_In_Egyptian_Hieroglyph_Format_Controls, + CR_In_Egyptian_Hieroglyphs_Extended_A, + CR_In_Anatolian_Hieroglyphs, + CR_In_Gurung_Khema, + CR_In_Bamum_Supplement, + CR_In_Mro, + CR_In_Tangsa, + CR_In_Bassa_Vah, + CR_In_Pahawh_Hmong, + CR_In_Kirat_Rai, + CR_In_Medefaidrin, + CR_In_Miao, + CR_In_Ideographic_Symbols_and_Punctuation, + CR_In_Tangut, + CR_In_Tangut_Components, + CR_In_Khitan_Small_Script, + CR_In_Tangut_Supplement, + CR_In_Kana_Extended_B, + CR_In_Kana_Supplement, + CR_In_Kana_Extended_A, + CR_In_Small_Kana_Extension, + CR_In_Nushu, + CR_In_Duployan, + CR_In_Shorthand_Format_Controls, + CR_In_Symbols_for_Legacy_Computing_Supplement, + CR_In_Znamenny_Musical_Notation, + CR_In_Byzantine_Musical_Symbols, + CR_In_Musical_Symbols, + CR_In_Ancient_Greek_Musical_Notation, + CR_In_Kaktovik_Numerals, + CR_In_Mayan_Numerals, + CR_In_Tai_Xuan_Jing_Symbols, + CR_In_Counting_Rod_Numerals, + CR_In_Mathematical_Alphanumeric_Symbols, + CR_In_Sutton_SignWriting, + CR_In_Latin_Extended_G, + CR_In_Glagolitic_Supplement, + CR_In_Cyrillic_Extended_D, + CR_In_Nyiakeng_Puachue_Hmong, + CR_In_Toto, + CR_In_Wancho, + CR_In_Nag_Mundari, + CR_In_Ol_Onal, + CR_In_Ethiopic_Extended_B, + CR_In_Mende_Kikakui, + CR_In_Adlam, + CR_In_Indic_Siyaq_Numbers, + CR_In_Ottoman_Siyaq_Numbers, + CR_In_Arabic_Mathematical_Alphabetic_Symbols, + CR_In_Mahjong_Tiles, + CR_In_Domino_Tiles, + CR_In_Playing_Cards, + CR_In_Enclosed_Alphanumeric_Supplement, + CR_In_Enclosed_Ideographic_Supplement, + CR_In_Miscellaneous_Symbols_and_Pictographs, + CR_In_Emoticons, + CR_In_Ornamental_Dingbats, + CR_In_Transport_and_Map_Symbols, + CR_In_Alchemical_Symbols, + CR_In_Geometric_Shapes_Extended, + CR_In_Supplemental_Arrows_C, + CR_In_Supplemental_Symbols_and_Pictographs, + CR_In_Chess_Symbols, + CR_In_Symbols_and_Pictographs_Extended_A, + CR_In_Symbols_for_Legacy_Computing, + CR_In_CJK_Unified_Ideographs_Extension_B, + CR_In_CJK_Unified_Ideographs_Extension_C, + CR_In_CJK_Unified_Ideographs_Extension_D, + CR_In_CJK_Unified_Ideographs_Extension_E, + CR_In_CJK_Unified_Ideographs_Extension_F, + CR_In_CJK_Unified_Ideographs_Extension_I, + CR_In_CJK_Compatibility_Ideographs_Supplement, + CR_In_CJK_Unified_Ideographs_Extension_G, + CR_In_CJK_Unified_Ideographs_Extension_H, + CR_In_Tags, + CR_In_Variation_Selectors_Supplement, + CR_In_Supplementary_Private_Use_Area_A, + CR_In_Supplementary_Private_Use_Area_B, + CR_In_No_Block, +}; + +#define pool_offset(s) offsetof(struct unicode_prop_name_pool_t, unicode_prop_name_pool_str##s) + + +#define TOTAL_KEYWORDS 886 +#define MIN_WORD_LENGTH 1 +#define MAX_WORD_LENGTH 45 +#define MIN_HASH_VALUE 12 +#define MAX_HASH_VALUE 6900 +/* maximum key range = 6889, duplicates = 0 */ + +#ifndef GPERF_DOWNCASE +#define GPERF_DOWNCASE 1 +static unsigned char gperf_downcase[256] = + { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255 + }; +#endif + +#ifndef GPERF_CASE_STRNCMP +#define GPERF_CASE_STRNCMP 1 +static int +gperf_case_strncmp (register const char *s1, register const char *s2, register size_t n) +{ + for (; n > 0;) + { + unsigned char c1 = gperf_downcase[(unsigned char)*s1++]; + unsigned char c2 = gperf_downcase[(unsigned char)*s2++]; + if (c1 != 0 && c1 == c2) + { + n--; + continue; + } + return (int)c1 - (int)c2; + } + return 0; +} +#endif + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static unsigned int +hash (register const char *str, register size_t len) +{ + static const unsigned short asso_values[] = + { + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 0, 1564, 118, 343, 36, + 1531, 1146, 1071, 7, 1812, 8, 684, 99, 4, 16, + 1399, 824, 47, 173, 241, 486, 2191, 1723, 940, 1648, + 9, 0, 24, 6901, 6901, 6901, 6901, 0, 1564, 118, + 343, 36, 1531, 1146, 1071, 7, 1812, 8, 684, 99, + 4, 16, 1399, 824, 47, 173, 241, 486, 2191, 1723, + 940, 1648, 9, 0, 24, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901, + 6901, 6901, 6901, 6901, 6901, 6901, 6901, 6901 + }; + register unsigned int hval = (unsigned int )len; + + switch (hval) + { + default: + hval += asso_values[(unsigned char)str[15]]; + /*FALLTHROUGH*/ + case 15: + case 14: + case 13: + case 12: + hval += asso_values[(unsigned char)str[11]]; + /*FALLTHROUGH*/ + case 11: + case 10: + case 9: + case 8: + case 7: + case 6: + hval += asso_values[(unsigned char)str[5]]; + /*FALLTHROUGH*/ + case 5: + hval += asso_values[(unsigned char)str[4]]; + /*FALLTHROUGH*/ + case 4: + case 3: + hval += asso_values[(unsigned char)str[2]]; + /*FALLTHROUGH*/ + case 2: + hval += asso_values[(unsigned char)str[1]]; + /*FALLTHROUGH*/ + case 1: + hval += asso_values[(unsigned char)str[0]+2]; + break; + } + return hval + asso_values[(unsigned char)str[len - 1]]; +} + +struct unicode_prop_name_pool_t + { + char unicode_prop_name_pool_str12[sizeof("lana")]; + char unicode_prop_name_pool_str16[sizeof("yi")]; + char unicode_prop_name_pool_str19[sizeof("lina")]; + char unicode_prop_name_pool_str25[sizeof("yiii")]; + char unicode_prop_name_pool_str26[sizeof("mn")]; + char unicode_prop_name_pool_str28[sizeof("maka")]; + char unicode_prop_name_pool_str31[sizeof("mani")]; + char unicode_prop_name_pool_str34[sizeof("z")]; + char unicode_prop_name_pool_str37[sizeof("inkannada")]; + char unicode_prop_name_pool_str38[sizeof("lo")]; + char unicode_prop_name_pool_str39[sizeof("lao")]; + char unicode_prop_name_pool_str40[sizeof("laoo")]; + char unicode_prop_name_pool_str43[sizeof("miao")]; + char unicode_prop_name_pool_str46[sizeof("cn")]; + char unicode_prop_name_pool_str52[sizeof("ci")]; + char unicode_prop_name_pool_str53[sizeof("innko")]; + char unicode_prop_name_pool_str55[sizeof("zzzz")]; + char unicode_prop_name_pool_str56[sizeof("yezi")]; + char unicode_prop_name_pool_str58[sizeof("gara")]; + char unicode_prop_name_pool_str62[sizeof("gran")]; + char unicode_prop_name_pool_str63[sizeof("pi")]; + char unicode_prop_name_pool_str69[sizeof("lineara")]; + char unicode_prop_name_pool_str70[sizeof("co")]; + char unicode_prop_name_pool_str75[sizeof("mark")]; + char unicode_prop_name_pool_str81[sizeof("po")]; + char unicode_prop_name_pool_str84[sizeof("inkiratrai")]; + char unicode_prop_name_pool_str90[sizeof("me")]; + char unicode_prop_name_pool_str93[sizeof("inkharoshthi")]; + char unicode_prop_name_pool_str94[sizeof("cari")]; + char unicode_prop_name_pool_str95[sizeof("loe")]; + char unicode_prop_name_pool_str97[sizeof("carian")]; + char unicode_prop_name_pool_str98[sizeof("mro")]; + char unicode_prop_name_pool_str99[sizeof("mroo")]; + char unicode_prop_name_pool_str102[sizeof("grek")]; + char unicode_prop_name_pool_str107[sizeof("kana")]; + char unicode_prop_name_pool_str110[sizeof("geor")]; + char unicode_prop_name_pool_str111[sizeof("greek")]; + char unicode_prop_name_pool_str116[sizeof("m")]; + char unicode_prop_name_pool_str119[sizeof("mero")]; + char unicode_prop_name_pool_str121[sizeof("pe")]; + char unicode_prop_name_pool_str126[sizeof("mendekikakui")]; + char unicode_prop_name_pool_str130[sizeof("gonm")]; + char unicode_prop_name_pool_str136[sizeof("inosmanya")]; + char unicode_prop_name_pool_str142[sizeof("inmanichaean")]; + char unicode_prop_name_pool_str146[sizeof("inchakma")]; + char unicode_prop_name_pool_str147[sizeof("cakm")]; + char unicode_prop_name_pool_str148[sizeof("inmro")]; + char unicode_prop_name_pool_str149[sizeof("inmiao")]; + char unicode_prop_name_pool_str150[sizeof("meeteimayek")]; + char unicode_prop_name_pool_str152[sizeof("mandaic")]; + char unicode_prop_name_pool_str155[sizeof("c")]; + char unicode_prop_name_pool_str157[sizeof("krai")]; + char unicode_prop_name_pool_str161[sizeof("inarmenian")]; + char unicode_prop_name_pool_str171[sizeof("inmyanmar")]; + char unicode_prop_name_pool_str175[sizeof("inmakasar")]; + char unicode_prop_name_pool_str181[sizeof("common")]; + char unicode_prop_name_pool_str184[sizeof("qaai")]; + char unicode_prop_name_pool_str185[sizeof("marc")]; + char unicode_prop_name_pool_str195[sizeof("inrunic")]; + char unicode_prop_name_pool_str196[sizeof("incarian")]; + char unicode_prop_name_pool_str204[sizeof("lm")]; + char unicode_prop_name_pool_str209[sizeof("inkhmer")]; + char unicode_prop_name_pool_str213[sizeof("inchorasmian")]; + char unicode_prop_name_pool_str215[sizeof("inideographicsymbolsandpunctuation")]; + char unicode_prop_name_pool_str217[sizeof("cans")]; + char unicode_prop_name_pool_str221[sizeof("merc")]; + char unicode_prop_name_pool_str230[sizeof("combiningmark")]; + char unicode_prop_name_pool_str232[sizeof("inahom")]; + char unicode_prop_name_pool_str233[sizeof("perm")]; + char unicode_prop_name_pool_str234[sizeof("inavestan")]; + char unicode_prop_name_pool_str238[sizeof("connectorpunctuation")]; + char unicode_prop_name_pool_str241[sizeof("insharada")]; + char unicode_prop_name_pool_str242[sizeof("lc")]; + char unicode_prop_name_pool_str244[sizeof("prependedconcatenationmark")]; + char unicode_prop_name_pool_str246[sizeof("incuneiformnumbersandpunctuation")]; + char unicode_prop_name_pool_str250[sizeof("inipaextensions")]; + char unicode_prop_name_pool_str251[sizeof("makasar")]; + char unicode_prop_name_pool_str253[sizeof("latn")]; + char unicode_prop_name_pool_str254[sizeof("mc")]; + char unicode_prop_name_pool_str256[sizeof("inarrows")]; + char unicode_prop_name_pool_str257[sizeof("ri")]; + char unicode_prop_name_pool_str258[sizeof("latin")]; + char unicode_prop_name_pool_str259[sizeof("incherokee")]; + char unicode_prop_name_pool_str261[sizeof("inthaana")]; + char unicode_prop_name_pool_str262[sizeof("masaramgondi")]; + char unicode_prop_name_pool_str271[sizeof("inkatakana")]; + char unicode_prop_name_pool_str272[sizeof("armn")]; + char unicode_prop_name_pool_str273[sizeof("inthai")]; + char unicode_prop_name_pool_str274[sizeof("cc")]; + char unicode_prop_name_pool_str275[sizeof("armi")]; + char unicode_prop_name_pool_str280[sizeof("incuneiform")]; + char unicode_prop_name_pool_str283[sizeof("inkaithi")]; + char unicode_prop_name_pool_str285[sizeof("pc")]; + char unicode_prop_name_pool_str287[sizeof("armenian")]; + char unicode_prop_name_pool_str289[sizeof("inmarchen")]; + char unicode_prop_name_pool_str293[sizeof("qmark")]; + char unicode_prop_name_pool_str295[sizeof("qaac")]; + char unicode_prop_name_pool_str296[sizeof("initialpunctuation")]; + char unicode_prop_name_pool_str298[sizeof("inzanabazarsquare")]; + char unicode_prop_name_pool_str299[sizeof("insamaritan")]; + char unicode_prop_name_pool_str300[sizeof("lineseparator")]; + char unicode_prop_name_pool_str304[sizeof("mtei")]; + char unicode_prop_name_pool_str309[sizeof("inmasaramgondi")]; + char unicode_prop_name_pool_str311[sizeof("inscriptionalparthian")]; + char unicode_prop_name_pool_str312[sizeof("incyrillic")]; + char unicode_prop_name_pool_str322[sizeof("intakri")]; + char unicode_prop_name_pool_str334[sizeof("incham")]; + char unicode_prop_name_pool_str335[sizeof("mcm")]; + char unicode_prop_name_pool_str346[sizeof("prti")]; + char unicode_prop_name_pool_str356[sizeof("katakana")]; + char unicode_prop_name_pool_str358[sizeof("inkhmersymbols")]; + char unicode_prop_name_pool_str365[sizeof("insyriac")]; + char unicode_prop_name_pool_str366[sizeof("pcm")]; + char unicode_prop_name_pool_str367[sizeof("mand")]; + char unicode_prop_name_pool_str372[sizeof("zs")]; + char unicode_prop_name_pool_str382[sizeof("inkanaextendeda")]; + char unicode_prop_name_pool_str384[sizeof("cs")]; + char unicode_prop_name_pool_str386[sizeof("modi")]; + char unicode_prop_name_pool_str388[sizeof("privateuse")]; + char unicode_prop_name_pool_str395[sizeof("ps")]; + char unicode_prop_name_pool_str401[sizeof("brai")]; + char unicode_prop_name_pool_str403[sizeof("mend")]; + char unicode_prop_name_pool_str407[sizeof("ideo")]; + char unicode_prop_name_pool_str408[sizeof("yezidi")]; + char unicode_prop_name_pool_str410[sizeof("inmyanmarextendeda")]; + char unicode_prop_name_pool_str414[sizeof("arabic")]; + char unicode_prop_name_pool_str417[sizeof("letter")]; + char unicode_prop_name_pool_str426[sizeof("xidcontinue")]; + char unicode_prop_name_pool_str428[sizeof("ascii")]; + char unicode_prop_name_pool_str430[sizeof("innandinagari")]; + char unicode_prop_name_pool_str443[sizeof("inoldnortharabian")]; + char unicode_prop_name_pool_str445[sizeof("inmeeteimayek")]; + char unicode_prop_name_pool_str450[sizeof("knda")]; + char unicode_prop_name_pool_str453[sizeof("kannada")]; + char unicode_prop_name_pool_str454[sizeof("intransportandmapsymbols")]; + char unicode_prop_name_pool_str456[sizeof("kiratrai")]; + char unicode_prop_name_pool_str457[sizeof("inruminumeralsymbols")]; + char unicode_prop_name_pool_str458[sizeof("inideographicdescriptioncharacters")]; + char unicode_prop_name_pool_str466[sizeof("incjkcompatibilityforms")]; + char unicode_prop_name_pool_str470[sizeof("letternumber")]; + char unicode_prop_name_pool_str471[sizeof("incjkcompatibilityideographs")]; + char unicode_prop_name_pool_str474[sizeof("inmodi")]; + char unicode_prop_name_pool_str481[sizeof("xidc")]; + char unicode_prop_name_pool_str487[sizeof("inmendekikakui")]; + char unicode_prop_name_pool_str488[sizeof("lt")]; + char unicode_prop_name_pool_str489[sizeof("inemoticons")]; + char unicode_prop_name_pool_str504[sizeof("sk")]; + char unicode_prop_name_pool_str507[sizeof("inolditalic")]; + char unicode_prop_name_pool_str509[sizeof("brahmi")]; + char unicode_prop_name_pool_str513[sizeof("gothic")]; + char unicode_prop_name_pool_str514[sizeof("inmedefaidrin")]; + char unicode_prop_name_pool_str518[sizeof("psalterpahlavi")]; + char unicode_prop_name_pool_str520[sizeof("so")]; + char unicode_prop_name_pool_str522[sizeof("inspecials")]; + char unicode_prop_name_pool_str524[sizeof("kits")]; + char unicode_prop_name_pool_str528[sizeof("inmyanmarextendedc")]; + char unicode_prop_name_pool_str532[sizeof("intoto")]; + char unicode_prop_name_pool_str536[sizeof("xids")]; + char unicode_prop_name_pool_str542[sizeof("inchesssymbols")]; + char unicode_prop_name_pool_str549[sizeof("incjkcompatibilityideographssupplement")]; + char unicode_prop_name_pool_str550[sizeof("inopticalcharacterrecognition")]; + char unicode_prop_name_pool_str553[sizeof("sora")]; + char unicode_prop_name_pool_str558[sizeof("inkanasupplement")]; + char unicode_prop_name_pool_str564[sizeof("inoldsogdian")]; + char unicode_prop_name_pool_str571[sizeof("meroiticcursive")]; + char unicode_prop_name_pool_str572[sizeof("inmiscellaneousmathematicalsymbolsa")]; + char unicode_prop_name_pool_str577[sizeof("grext")]; + char unicode_prop_name_pool_str578[sizeof("patternwhitespace")]; + char unicode_prop_name_pool_str579[sizeof("insundanese")]; + char unicode_prop_name_pool_str585[sizeof("inmandaic")]; + char unicode_prop_name_pool_str588[sizeof("print")]; + char unicode_prop_name_pool_str590[sizeof("idc")]; + char unicode_prop_name_pool_str596[sizeof("batk")]; + char unicode_prop_name_pool_str598[sizeof("inancientsymbols")]; + char unicode_prop_name_pool_str605[sizeof("batak")]; + char unicode_prop_name_pool_str609[sizeof("intaitham")]; + char unicode_prop_name_pool_str612[sizeof("inoldsoutharabian")]; + char unicode_prop_name_pool_str631[sizeof("incommonindicnumberforms")]; + char unicode_prop_name_pool_str635[sizeof("inznamennymusicalnotation")]; + char unicode_prop_name_pool_str636[sizeof("samr")]; + char unicode_prop_name_pool_str639[sizeof("patws")]; + char unicode_prop_name_pool_str645[sizeof("bamum")]; + char unicode_prop_name_pool_str651[sizeof("idsbinaryoperator")]; + char unicode_prop_name_pool_str652[sizeof("samaritan")]; + char unicode_prop_name_pool_str655[sizeof("pauc")]; + char unicode_prop_name_pool_str660[sizeof("s")]; + char unicode_prop_name_pool_str669[sizeof("incjkstrokes")]; + char unicode_prop_name_pool_str673[sizeof("inugaritic")]; + char unicode_prop_name_pool_str674[sizeof("lisu")]; + char unicode_prop_name_pool_str683[sizeof("indominotiles")]; + char unicode_prop_name_pool_str685[sizeof("idsunaryoperator")]; + char unicode_prop_name_pool_str686[sizeof("sm")]; + char unicode_prop_name_pool_str689[sizeof("l")]; + char unicode_prop_name_pool_str692[sizeof("inancientgreekmusicalnotation")]; + char unicode_prop_name_pool_str693[sizeof("bass")]; + char unicode_prop_name_pool_str700[sizeof("ids")]; + char unicode_prop_name_pool_str707[sizeof("inmodifiertoneletters")]; + char unicode_prop_name_pool_str719[sizeof("incontrolpictures")]; + char unicode_prop_name_pool_str724[sizeof("sc")]; + char unicode_prop_name_pool_str730[sizeof("insaurashtra")]; + char unicode_prop_name_pool_str731[sizeof("insunuwar")]; + char unicode_prop_name_pool_str733[sizeof("inlao")]; + char unicode_prop_name_pool_str735[sizeof("pd")]; + char unicode_prop_name_pool_str740[sizeof("inolonal")]; + char unicode_prop_name_pool_str741[sizeof("inoldturkic")]; + char unicode_prop_name_pool_str745[sizeof("inlineara")]; + char unicode_prop_name_pool_str749[sizeof("mongolian")]; + char unicode_prop_name_pool_str752[sizeof("inmusicalsymbols")]; + char unicode_prop_name_pool_str760[sizeof("idcontinue")]; + char unicode_prop_name_pool_str761[sizeof("incaucasianalbanian")]; + char unicode_prop_name_pool_str764[sizeof("grlink")]; + char unicode_prop_name_pool_str769[sizeof("idst")]; + char unicode_prop_name_pool_str782[sizeof("runr")]; + char unicode_prop_name_pool_str794[sizeof("kali")]; + char unicode_prop_name_pool_str802[sizeof("inadlam")]; + char unicode_prop_name_pool_str806[sizeof("inmiscellaneoussymbols")]; + char unicode_prop_name_pool_str810[sizeof("control")]; + char unicode_prop_name_pool_str814[sizeof("indeseret")]; + char unicode_prop_name_pool_str815[sizeof("inmiscellaneoussymbolsandarrows")]; + char unicode_prop_name_pool_str819[sizeof("idstart")]; + char unicode_prop_name_pool_str820[sizeof("inmiscellaneoussymbolsandpictographs")]; + char unicode_prop_name_pool_str833[sizeof("inlycian")]; + char unicode_prop_name_pool_str834[sizeof("palm")]; + char unicode_prop_name_pool_str844[sizeof("sind")]; + char unicode_prop_name_pool_str848[sizeof("onao")]; + char unicode_prop_name_pool_str849[sizeof("xidstart")]; + char unicode_prop_name_pool_str853[sizeof("inancientgreeknumbers")]; + char unicode_prop_name_pool_str854[sizeof("xdigit")]; + char unicode_prop_name_pool_str861[sizeof("inmeeteimayekextensions")]; + char unicode_prop_name_pool_str867[sizeof("inkhudawadi")]; + char unicode_prop_name_pool_str879[sizeof("inspacingmodifierletters")]; + char unicode_prop_name_pool_str883[sizeof("oriya")]; + char unicode_prop_name_pool_str900[sizeof("cased")]; + char unicode_prop_name_pool_str905[sizeof("inmalayalam")]; + char unicode_prop_name_pool_str915[sizeof("inolduyghur")]; + char unicode_prop_name_pool_str929[sizeof("incountingrodnumerals")]; + char unicode_prop_name_pool_str932[sizeof("bamu")]; + char unicode_prop_name_pool_str933[sizeof("insmallkanaextension")]; + char unicode_prop_name_pool_str934[sizeof("bidic")]; + char unicode_prop_name_pool_str937[sizeof("ital")]; + char unicode_prop_name_pool_str946[sizeof("inkaktoviknumerals")]; + char unicode_prop_name_pool_str948[sizeof("joinc")]; + char unicode_prop_name_pool_str952[sizeof("insylotinagri")]; + char unicode_prop_name_pool_str957[sizeof("vai")]; + char unicode_prop_name_pool_str958[sizeof("vaii")]; + char unicode_prop_name_pool_str963[sizeof("inlinearbideograms")]; + char unicode_prop_name_pool_str964[sizeof("inlatinextendeda")]; + char unicode_prop_name_pool_str966[sizeof("sterm")]; + char unicode_prop_name_pool_str967[sizeof("incyrillicsupplement")]; + char unicode_prop_name_pool_str972[sizeof("runic")]; + char unicode_prop_name_pool_str978[sizeof("lu")]; + char unicode_prop_name_pool_str979[sizeof("insiddham")]; + char unicode_prop_name_pool_str984[sizeof("quotationmark")]; + char unicode_prop_name_pool_str987[sizeof("intaile")]; + char unicode_prop_name_pool_str996[sizeof("incherokeesupplement")]; + char unicode_prop_name_pool_str1009[sizeof("alnum")]; + char unicode_prop_name_pool_str1014[sizeof("idsu")]; + char unicode_prop_name_pool_str1015[sizeof("incjkunifiedideographsextensiona")]; + char unicode_prop_name_pool_str1022[sizeof("incjkunifiedideographsextensioni")]; + char unicode_prop_name_pool_str1023[sizeof("saur")]; + char unicode_prop_name_pool_str1024[sizeof("punct")]; + char unicode_prop_name_pool_str1025[sizeof("sundanese")]; + char unicode_prop_name_pool_str1030[sizeof("guru")]; + char unicode_prop_name_pool_str1036[sizeof("inlatinextendede")]; + char unicode_prop_name_pool_str1038[sizeof("bali")]; + char unicode_prop_name_pool_str1039[sizeof("paucinhau")]; + char unicode_prop_name_pool_str1048[sizeof("blank")]; + char unicode_prop_name_pool_str1049[sizeof("gurmukhi")]; + char unicode_prop_name_pool_str1050[sizeof("intamil")]; + char unicode_prop_name_pool_str1051[sizeof("incjkunifiedideographsextensione")]; + char unicode_prop_name_pool_str1052[sizeof("inmultani")]; + char unicode_prop_name_pool_str1058[sizeof("inlydian")]; + char unicode_prop_name_pool_str1074[sizeof("osage")]; + char unicode_prop_name_pool_str1081[sizeof("bengali")]; + char unicode_prop_name_pool_str1087[sizeof("limbu")]; + char unicode_prop_name_pool_str1100[sizeof("osma")]; + char unicode_prop_name_pool_str1110[sizeof("zinh")]; + char unicode_prop_name_pool_str1111[sizeof("balinese")]; + char unicode_prop_name_pool_str1117[sizeof("inhanifirohingya")]; + char unicode_prop_name_pool_str1125[sizeof("plrd")]; + char unicode_prop_name_pool_str1133[sizeof("incjkunifiedideographsextensionc")]; + char unicode_prop_name_pool_str1140[sizeof("inhiragana")]; + char unicode_prop_name_pool_str1143[sizeof("canadianaboriginal")]; + char unicode_prop_name_pool_str1155[sizeof("saurashtra")]; + char unicode_prop_name_pool_str1159[sizeof("phoenician")]; + char unicode_prop_name_pool_str1171[sizeof("ingrantha")]; + char unicode_prop_name_pool_str1174[sizeof("sd")]; + char unicode_prop_name_pool_str1177[sizeof("gong")]; + char unicode_prop_name_pool_str1178[sizeof("incjkunifiedideographs")]; + char unicode_prop_name_pool_str1181[sizeof("marchen")]; + char unicode_prop_name_pool_str1183[sizeof("sidd")]; + char unicode_prop_name_pool_str1184[sizeof("odi")]; + char unicode_prop_name_pool_str1186[sizeof("mong")]; + char unicode_prop_name_pool_str1188[sizeof("sinhala")]; + char unicode_prop_name_pool_str1189[sizeof("graphemelink")]; + char unicode_prop_name_pool_str1193[sizeof("inearlydynasticcuneiform")]; + char unicode_prop_name_pool_str1194[sizeof("cher")]; + char unicode_prop_name_pool_str1197[sizeof("kaithi")]; + char unicode_prop_name_pool_str1199[sizeof("inmahajani")]; + char unicode_prop_name_pool_str1200[sizeof("inlatinextendedc")]; + char unicode_prop_name_pool_str1204[sizeof("multani")]; + char unicode_prop_name_pool_str1205[sizeof("inogham")]; + char unicode_prop_name_pool_str1207[sizeof("gunjalagondi")]; + char unicode_prop_name_pool_str1210[sizeof("cham")]; + char unicode_prop_name_pool_str1211[sizeof("cherokee")]; + char unicode_prop_name_pool_str1212[sizeof("chakma")]; + char unicode_prop_name_pool_str1214[sizeof("khojki")]; + char unicode_prop_name_pool_str1217[sizeof("inosage")]; + char unicode_prop_name_pool_str1221[sizeof("khar")]; + char unicode_prop_name_pool_str1223[sizeof("manichaean")]; + char unicode_prop_name_pool_str1224[sizeof("georgian")]; + char unicode_prop_name_pool_str1226[sizeof("ingeneralpunctuation")]; + char unicode_prop_name_pool_str1233[sizeof("inolchiki")]; + char unicode_prop_name_pool_str1235[sizeof("ingeorgian")]; + char unicode_prop_name_pool_str1245[sizeof("graphemebase")]; + char unicode_prop_name_pool_str1248[sizeof("adlm")]; + char unicode_prop_name_pool_str1254[sizeof("inethiopic")]; + char unicode_prop_name_pool_str1259[sizeof("inkhitansmallscript")]; + char unicode_prop_name_pool_str1269[sizeof("insinhala")]; + char unicode_prop_name_pool_str1276[sizeof("inmongolian")]; + char unicode_prop_name_pool_str1279[sizeof("punctuation")]; + char unicode_prop_name_pool_str1280[sizeof("emoji")]; + char unicode_prop_name_pool_str1287[sizeof("innagmundari")]; + char unicode_prop_name_pool_str1288[sizeof("vs")]; + char unicode_prop_name_pool_str1294[sizeof("casedletter")]; + char unicode_prop_name_pool_str1296[sizeof("oidc")]; + char unicode_prop_name_pool_str1305[sizeof("intamilsupplement")]; + char unicode_prop_name_pool_str1308[sizeof("ahom")]; + char unicode_prop_name_pool_str1310[sizeof("chorasmian")]; + char unicode_prop_name_pool_str1320[sizeof("khmr")]; + char unicode_prop_name_pool_str1321[sizeof("ingurmukhi")]; + char unicode_prop_name_pool_str1323[sizeof("sund")]; + char unicode_prop_name_pool_str1324[sizeof("patternsyntax")]; + char unicode_prop_name_pool_str1331[sizeof("chrs")]; + char unicode_prop_name_pool_str1332[sizeof("math")]; + char unicode_prop_name_pool_str1337[sizeof("inscriptionalpahlavi")]; + char unicode_prop_name_pool_str1339[sizeof("goth")]; + char unicode_prop_name_pool_str1348[sizeof("adlam")]; + char unicode_prop_name_pool_str1351[sizeof("oids")]; + char unicode_prop_name_pool_str1358[sizeof("incjkunifiedideographsextensiond")]; + char unicode_prop_name_pool_str1368[sizeof("khmer")]; + char unicode_prop_name_pool_str1373[sizeof("grantha")]; + char unicode_prop_name_pool_str1374[sizeof("ll")]; + char unicode_prop_name_pool_str1376[sizeof("kharoshthi")]; + char unicode_prop_name_pool_str1380[sizeof("intirhuta")]; + char unicode_prop_name_pool_str1383[sizeof("inhatran")]; + char unicode_prop_name_pool_str1387[sizeof("inmiscellaneoustechnical")]; + char unicode_prop_name_pool_str1392[sizeof("logicalorderexception")]; + char unicode_prop_name_pool_str1393[sizeof("radical")]; + char unicode_prop_name_pool_str1394[sizeof("zl")]; + char unicode_prop_name_pool_str1395[sizeof("insorasompeng")]; + char unicode_prop_name_pool_str1404[sizeof("n")]; + char unicode_prop_name_pool_str1411[sizeof("intangsa")]; + char unicode_prop_name_pool_str1422[sizeof("kthi")]; + char unicode_prop_name_pool_str1431[sizeof("mult")]; + char unicode_prop_name_pool_str1432[sizeof("nandinagari")]; + char unicode_prop_name_pool_str1433[sizeof("no")]; + char unicode_prop_name_pool_str1442[sizeof("nko")]; + char unicode_prop_name_pool_str1443[sizeof("nkoo")]; + char unicode_prop_name_pool_str1444[sizeof("intulutigalari")]; + char unicode_prop_name_pool_str1447[sizeof("p")]; + char unicode_prop_name_pool_str1463[sizeof("emojimodifier")]; + char unicode_prop_name_pool_str1464[sizeof("xpeo")]; + char unicode_prop_name_pool_str1465[sizeof("brah")]; + char unicode_prop_name_pool_str1466[sizeof("sunu")]; + char unicode_prop_name_pool_str1467[sizeof("inoldhungarian")]; + char unicode_prop_name_pool_str1483[sizeof("inphoenician")]; + char unicode_prop_name_pool_str1486[sizeof("incyrillicextendeda")]; + char unicode_prop_name_pool_str1489[sizeof("inherited")]; + char unicode_prop_name_pool_str1496[sizeof("intaixuanjingsymbols")]; + char unicode_prop_name_pool_str1498[sizeof("ingreekandcoptic")]; + char unicode_prop_name_pool_str1512[sizeof("inenclosedideographicsupplement")]; + char unicode_prop_name_pool_str1519[sizeof("glagolitic")]; + char unicode_prop_name_pool_str1521[sizeof("inmeroitichieroglyphs")]; + char unicode_prop_name_pool_str1522[sizeof("bidicontrol")]; + char unicode_prop_name_pool_str1525[sizeof("enclosingmark")]; + char unicode_prop_name_pool_str1530[sizeof("regionalindicator")]; + char unicode_prop_name_pool_str1533[sizeof("beng")]; + char unicode_prop_name_pool_str1535[sizeof("inanatolianhieroglyphs")]; + char unicode_prop_name_pool_str1536[sizeof("joincontrol")]; + char unicode_prop_name_pool_str1539[sizeof("inkangxiradicals")]; + char unicode_prop_name_pool_str1541[sizeof("dia")]; + char unicode_prop_name_pool_str1542[sizeof("cpmn")]; + char unicode_prop_name_pool_str1547[sizeof("di")]; + char unicode_prop_name_pool_str1550[sizeof("diak")]; + char unicode_prop_name_pool_str1554[sizeof("graphemeextend")]; + char unicode_prop_name_pool_str1555[sizeof("indogra")]; + char unicode_prop_name_pool_str1557[sizeof("inphaistosdisc")]; + char unicode_prop_name_pool_str1561[sizeof("lepc")]; + char unicode_prop_name_pool_str1572[sizeof("sinh")]; + char unicode_prop_name_pool_str1575[sizeof("shavian")]; + char unicode_prop_name_pool_str1576[sizeof("gukh")]; + char unicode_prop_name_pool_str1583[sizeof("linb")]; + char unicode_prop_name_pool_str1592[sizeof("ingreekextended")]; + char unicode_prop_name_pool_str1593[sizeof("incyprominoan")]; + char unicode_prop_name_pool_str1595[sizeof("innabataean")]; + char unicode_prop_name_pool_str1596[sizeof("zanb")]; + char unicode_prop_name_pool_str1598[sizeof("inhanunoo")]; + char unicode_prop_name_pool_str1599[sizeof("bhks")]; + char unicode_prop_name_pool_str1600[sizeof("inkanbun")]; + char unicode_prop_name_pool_str1601[sizeof("inbhaiksuki")]; + char unicode_prop_name_pool_str1604[sizeof("incyrillicextendedc")]; + char unicode_prop_name_pool_str1608[sizeof("emod")]; + char unicode_prop_name_pool_str1611[sizeof("bhaiksuki")]; + char unicode_prop_name_pool_str1612[sizeof("xsux")]; + char unicode_prop_name_pool_str1622[sizeof("format")]; + char unicode_prop_name_pool_str1625[sizeof("inelbasan")]; + char unicode_prop_name_pool_str1629[sizeof("emojimodifierbase")]; + char unicode_prop_name_pool_str1633[sizeof("linearb")]; + char unicode_prop_name_pool_str1638[sizeof("olck")]; + char unicode_prop_name_pool_str1643[sizeof("inimperialaramaic")]; + char unicode_prop_name_pool_str1650[sizeof("inlatinextendedd")]; + char unicode_prop_name_pool_str1651[sizeof("insundanesesupplement")]; + char unicode_prop_name_pool_str1652[sizeof("intangut")]; + char unicode_prop_name_pool_str1654[sizeof("cntrl")]; + char unicode_prop_name_pool_str1655[sizeof("olchiki")]; + char unicode_prop_name_pool_str1657[sizeof("inlatinextendedadditional")]; + char unicode_prop_name_pool_str1660[sizeof("olower")]; + char unicode_prop_name_pool_str1666[sizeof("sogdian")]; + char unicode_prop_name_pool_str1668[sizeof("sogo")]; + char unicode_prop_name_pool_str1672[sizeof("ingeometricshapes")]; + char unicode_prop_name_pool_str1677[sizeof("emojicomponent")]; + char unicode_prop_name_pool_str1678[sizeof("limb")]; + char unicode_prop_name_pool_str1682[sizeof("intodhri")]; + char unicode_prop_name_pool_str1684[sizeof("inkayahli")]; + char unicode_prop_name_pool_str1687[sizeof("insogdian")]; + char unicode_prop_name_pool_str1688[sizeof("indingbats")]; + char unicode_prop_name_pool_str1690[sizeof("inoriya")]; + char unicode_prop_name_pool_str1691[sizeof("inyezidi")]; + char unicode_prop_name_pool_str1692[sizeof("insinhalaarchaicnumbers")]; + char unicode_prop_name_pool_str1696[sizeof("copt")]; + char unicode_prop_name_pool_str1697[sizeof("vithkuqi")]; + char unicode_prop_name_pool_str1698[sizeof("incb")]; + char unicode_prop_name_pool_str1699[sizeof("wara")]; + char unicode_prop_name_pool_str1700[sizeof("coptic")]; + char unicode_prop_name_pool_str1701[sizeof("gurungkhema")]; + char unicode_prop_name_pool_str1702[sizeof("inarabic")]; + char unicode_prop_name_pool_str1709[sizeof("ideographic")]; + char unicode_prop_name_pool_str1719[sizeof("diacritic")]; + char unicode_prop_name_pool_str1727[sizeof("cprt")]; + char unicode_prop_name_pool_str1733[sizeof("arab")]; + char unicode_prop_name_pool_str1734[sizeof("inenclosedalphanumerics")]; + char unicode_prop_name_pool_str1735[sizeof("anatolianhieroglyphs")]; + char unicode_prop_name_pool_str1745[sizeof("innewa")]; + char unicode_prop_name_pool_str1748[sizeof("asciihexdigit")]; + char unicode_prop_name_pool_str1750[sizeof("nand")]; + char unicode_prop_name_pool_str1751[sizeof("intags")]; + char unicode_prop_name_pool_str1752[sizeof("ininscriptionalparthian")]; + char unicode_prop_name_pool_str1753[sizeof("innushu")]; + char unicode_prop_name_pool_str1754[sizeof("ininscriptionalpahlavi")]; + char unicode_prop_name_pool_str1763[sizeof("inkawi")]; + char unicode_prop_name_pool_str1774[sizeof("inkatakanaphoneticextensions")]; + char unicode_prop_name_pool_str1775[sizeof("inarabicpresentationformsa")]; + char unicode_prop_name_pool_str1776[sizeof("inbasiclatin")]; + char unicode_prop_name_pool_str1778[sizeof("bopo")]; + char unicode_prop_name_pool_str1781[sizeof("lyci")]; + char unicode_prop_name_pool_str1784[sizeof("lycian")]; + char unicode_prop_name_pool_str1790[sizeof("inoldpersian")]; + char unicode_prop_name_pool_str1792[sizeof("imperialaramaic")]; + char unicode_prop_name_pool_str1801[sizeof("braille")]; + char unicode_prop_name_pool_str1803[sizeof("ingurungkhema")]; + char unicode_prop_name_pool_str1808[sizeof("inwarangciti")]; + char unicode_prop_name_pool_str1811[sizeof("inenclosedalphanumericsupplement")]; + char unicode_prop_name_pool_str1813[sizeof("phli")]; + char unicode_prop_name_pool_str1814[sizeof("mymr")]; + char unicode_prop_name_pool_str1817[sizeof("myanmar")]; + char unicode_prop_name_pool_str1823[sizeof("han")]; + char unicode_prop_name_pool_str1827[sizeof("hani")]; + char unicode_prop_name_pool_str1829[sizeof("incyrillicextendedd")]; + char unicode_prop_name_pool_str1832[sizeof("inbatak")]; + char unicode_prop_name_pool_str1833[sizeof("kawi")]; + char unicode_prop_name_pool_str1836[sizeof("hano")]; + char unicode_prop_name_pool_str1841[sizeof("glag")]; + char unicode_prop_name_pool_str1842[sizeof("lower")]; + char unicode_prop_name_pool_str1847[sizeof("inlisu")]; + char unicode_prop_name_pool_str1850[sizeof("ingeometricshapesextended")]; + char unicode_prop_name_pool_str1859[sizeof("hanunoo")]; + char unicode_prop_name_pool_str1863[sizeof("inkhojki")]; + char unicode_prop_name_pool_str1866[sizeof("intibetan")]; + char unicode_prop_name_pool_str1869[sizeof("grbase")]; + char unicode_prop_name_pool_str1870[sizeof("hira")]; + char unicode_prop_name_pool_str1874[sizeof("insoyombo")]; + char unicode_prop_name_pool_str1880[sizeof("decimalnumber")]; + char unicode_prop_name_pool_str1881[sizeof("inwancho")]; + char unicode_prop_name_pool_str1889[sizeof("inlisusupplement")]; + char unicode_prop_name_pool_str1895[sizeof("sorasompeng")]; + char unicode_prop_name_pool_str1896[sizeof("incoptic")]; + char unicode_prop_name_pool_str1897[sizeof("bopomofo")]; + char unicode_prop_name_pool_str1899[sizeof("inoldpermic")]; + char unicode_prop_name_pool_str1907[sizeof("sharada")]; + char unicode_prop_name_pool_str1909[sizeof("inethiopicsupplement")]; + char unicode_prop_name_pool_str1913[sizeof("incjksymbolsandpunctuation")]; + char unicode_prop_name_pool_str1915[sizeof("spacingmark")]; + char unicode_prop_name_pool_str1917[sizeof("intelugu")]; + char unicode_prop_name_pool_str1922[sizeof("inelymaic")]; + char unicode_prop_name_pool_str1930[sizeof("medf")]; + char unicode_prop_name_pool_str1933[sizeof("insyriacsupplement")]; + char unicode_prop_name_pool_str1934[sizeof("inblockelements")]; + char unicode_prop_name_pool_str1936[sizeof("incjkcompatibility")]; + char unicode_prop_name_pool_str1941[sizeof("medefaidrin")]; + char unicode_prop_name_pool_str1946[sizeof("inkanaextendedb")]; + char unicode_prop_name_pool_str1948[sizeof("oldpersian")]; + char unicode_prop_name_pool_str1950[sizeof("patsyn")]; + char unicode_prop_name_pool_str1951[sizeof("shrd")]; + char unicode_prop_name_pool_str1953[sizeof("lowercase")]; + char unicode_prop_name_pool_str1954[sizeof("orkh")]; + char unicode_prop_name_pool_str1962[sizeof("space")]; + char unicode_prop_name_pool_str1964[sizeof("innumberforms")]; + char unicode_prop_name_pool_str1965[sizeof("assigned")]; + char unicode_prop_name_pool_str1972[sizeof("inarabicextendeda")]; + char unicode_prop_name_pool_str1974[sizeof("inmyanmarextendedb")]; + char unicode_prop_name_pool_str1977[sizeof("inshorthandformatcontrols")]; + char unicode_prop_name_pool_str1980[sizeof("cwcm")]; + char unicode_prop_name_pool_str1986[sizeof("bugi")]; + char unicode_prop_name_pool_str1992[sizeof("variationselector")]; + char unicode_prop_name_pool_str1994[sizeof("inmayannumerals")]; + char unicode_prop_name_pool_str1995[sizeof("sogd")]; + char unicode_prop_name_pool_str1996[sizeof("dsrt")]; + char unicode_prop_name_pool_str2000[sizeof("inbyzantinemusicalsymbols")]; + char unicode_prop_name_pool_str2004[sizeof("ingeorgiansupplement")]; + char unicode_prop_name_pool_str2006[sizeof("lydi")]; + char unicode_prop_name_pool_str2009[sizeof("lydian")]; + char unicode_prop_name_pool_str2013[sizeof("siddham")]; + char unicode_prop_name_pool_str2018[sizeof("inbraillepatterns")]; + char unicode_prop_name_pool_str2024[sizeof("separator")]; + char unicode_prop_name_pool_str2027[sizeof("innewtailue")]; + char unicode_prop_name_pool_str2049[sizeof("sentenceterminal")]; + char unicode_prop_name_pool_str2055[sizeof("inornamentaldingbats")]; + char unicode_prop_name_pool_str2058[sizeof("word")]; + char unicode_prop_name_pool_str2059[sizeof("buginese")]; + char unicode_prop_name_pool_str2061[sizeof("oldpermic")]; + char unicode_prop_name_pool_str2065[sizeof("inyiradicals")]; + char unicode_prop_name_pool_str2066[sizeof("phnx")]; + char unicode_prop_name_pool_str2067[sizeof("hatran")]; + char unicode_prop_name_pool_str2071[sizeof("deseret")]; + char unicode_prop_name_pool_str2073[sizeof("ogam")]; + char unicode_prop_name_pool_str2077[sizeof("insuttonsignwriting")]; + char unicode_prop_name_pool_str2085[sizeof("inunifiedcanadianaboriginalsyllabicsextendeda")]; + char unicode_prop_name_pool_str2086[sizeof("incjkunifiedideographsextensionh")]; + char unicode_prop_name_pool_str2087[sizeof("nd")]; + char unicode_prop_name_pool_str2090[sizeof("inarabicextendedc")]; + char unicode_prop_name_pool_str2092[sizeof("idsb")]; + char unicode_prop_name_pool_str2095[sizeof("caseignorable")]; + char unicode_prop_name_pool_str2101[sizeof("sarb")]; + char unicode_prop_name_pool_str2104[sizeof("hatr")]; + char unicode_prop_name_pool_str2110[sizeof("uideo")]; + char unicode_prop_name_pool_str2120[sizeof("number")]; + char unicode_prop_name_pool_str2129[sizeof("zanabazarsquare")]; + char unicode_prop_name_pool_str2136[sizeof("inmiscellaneousmathematicalsymbolsb")]; + char unicode_prop_name_pool_str2161[sizeof("incjkunifiedideographsextensiong")]; + char unicode_prop_name_pool_str2163[sizeof("innyiakengpuachuehmong")]; + char unicode_prop_name_pool_str2169[sizeof("ahex")]; + char unicode_prop_name_pool_str2170[sizeof("soyo")]; + char unicode_prop_name_pool_str2172[sizeof("cuneiform")]; + char unicode_prop_name_pool_str2173[sizeof("insymbolsforlegacycomputingsupplement")]; + char unicode_prop_name_pool_str2180[sizeof("incopticepactnumbers")]; + char unicode_prop_name_pool_str2183[sizeof("osge")]; + char unicode_prop_name_pool_str2195[sizeof("closepunctuation")]; + char unicode_prop_name_pool_str2201[sizeof("graph")]; + char unicode_prop_name_pool_str2206[sizeof("alpha")]; + char unicode_prop_name_pool_str2211[sizeof("lowercaseletter")]; + char unicode_prop_name_pool_str2215[sizeof("modifierletter")]; + char unicode_prop_name_pool_str2218[sizeof("takri")]; + char unicode_prop_name_pool_str2219[sizeof("olditalic")]; + char unicode_prop_name_pool_str2221[sizeof("inlepcha")]; + char unicode_prop_name_pool_str2222[sizeof("invai")]; + char unicode_prop_name_pool_str2226[sizeof("surrogate")]; + char unicode_prop_name_pool_str2234[sizeof("meroitichieroglyphs")]; + char unicode_prop_name_pool_str2235[sizeof("other")]; + char unicode_prop_name_pool_str2241[sizeof("inpalmyrene")]; + char unicode_prop_name_pool_str2244[sizeof("cwt")]; + char unicode_prop_name_pool_str2245[sizeof("othernumber")]; + char unicode_prop_name_pool_str2247[sizeof("buhd")]; + char unicode_prop_name_pool_str2248[sizeof("otheridcontinue")]; + char unicode_prop_name_pool_str2249[sizeof("inunifiedcanadianaboriginalsyllabics")]; + char unicode_prop_name_pool_str2250[sizeof("takr")]; + char unicode_prop_name_pool_str2260[sizeof("unassigned")]; + char unicode_prop_name_pool_str2263[sizeof("vith")]; + char unicode_prop_name_pool_str2267[sizeof("inbamum")]; + char unicode_prop_name_pool_str2268[sizeof("phag")]; + char unicode_prop_name_pool_str2275[sizeof("taile")]; + char unicode_prop_name_pool_str2277[sizeof("inhanguljamo")]; + char unicode_prop_name_pool_str2280[sizeof("caucasianalbanian")]; + char unicode_prop_name_pool_str2281[sizeof("innoblock")]; + char unicode_prop_name_pool_str2283[sizeof("idstrinaryoperator")]; + char unicode_prop_name_pool_str2303[sizeof("syrc")]; + char unicode_prop_name_pool_str2306[sizeof("inhanguljamoextendeda")]; + char unicode_prop_name_pool_str2313[sizeof("inbalinese")]; + char unicode_prop_name_pool_str2352[sizeof("otheralphabetic")]; + char unicode_prop_name_pool_str2356[sizeof("gujr")]; + char unicode_prop_name_pool_str2361[sizeof("oldhungarian")]; + char unicode_prop_name_pool_str2367[sizeof("gujarati")]; + char unicode_prop_name_pool_str2372[sizeof("tnsa")]; + char unicode_prop_name_pool_str2374[sizeof("tangsa")]; + char unicode_prop_name_pool_str2377[sizeof("term")]; + char unicode_prop_name_pool_str2380[sizeof("inmongoliansupplement")]; + char unicode_prop_name_pool_str2383[sizeof("incombiningdiacriticalmarks")]; + char unicode_prop_name_pool_str2389[sizeof("inshavian")]; + char unicode_prop_name_pool_str2393[sizeof("incombiningdiacriticalmarksforsymbols")]; + char unicode_prop_name_pool_str2396[sizeof("spaceseparator")]; + char unicode_prop_name_pool_str2419[sizeof("cyrl")]; + char unicode_prop_name_pool_str2423[sizeof("syriac")]; + char unicode_prop_name_pool_str2427[sizeof("inunifiedcanadianaboriginalsyllabicsextended")]; + char unicode_prop_name_pool_str2428[sizeof("inethiopicextendeda")]; + char unicode_prop_name_pool_str2431[sizeof("inmathematicalalphanumericsymbols")]; + char unicode_prop_name_pool_str2451[sizeof("mlym")]; + char unicode_prop_name_pool_str2452[sizeof("induployan")]; + char unicode_prop_name_pool_str2456[sizeof("malayalam")]; + char unicode_prop_name_pool_str2461[sizeof("incombiningdiacriticalmarkssupplement")]; + char unicode_prop_name_pool_str2464[sizeof("insymbolsandpictographsextendeda")]; + char unicode_prop_name_pool_str2468[sizeof("toto")]; + char unicode_prop_name_pool_str2469[sizeof("ethi")]; + char unicode_prop_name_pool_str2471[sizeof("palmyrene")]; + char unicode_prop_name_pool_str2478[sizeof("rohg")]; + char unicode_prop_name_pool_str2489[sizeof("taiviet")]; + char unicode_prop_name_pool_str2507[sizeof("ougr")]; + char unicode_prop_name_pool_str2511[sizeof("oldturkic")]; + char unicode_prop_name_pool_str2512[sizeof("inpaucinhau")]; + char unicode_prop_name_pool_str2516[sizeof("lepcha")]; + char unicode_prop_name_pool_str2523[sizeof("orya")]; + char unicode_prop_name_pool_str2532[sizeof("incjkradicalssupplement")]; + char unicode_prop_name_pool_str2546[sizeof("incjkunifiedideographsextensionf")]; + char unicode_prop_name_pool_str2552[sizeof("inglagolitic")]; + char unicode_prop_name_pool_str2554[sizeof("intagalog")]; + char unicode_prop_name_pool_str2561[sizeof("incombiningdiacriticalmarksextended")]; + char unicode_prop_name_pool_str2566[sizeof("inphagspa")]; + char unicode_prop_name_pool_str2571[sizeof("ext")]; + char unicode_prop_name_pool_str2572[sizeof("indevanagari")]; + char unicode_prop_name_pool_str2579[sizeof("incjkunifiedideographsextensionb")]; + char unicode_prop_name_pool_str2585[sizeof("oalpha")]; + char unicode_prop_name_pool_str2591[sizeof("buhid")]; + char unicode_prop_name_pool_str2596[sizeof("ingothic")]; + char unicode_prop_name_pool_str2597[sizeof("avestan")]; + char unicode_prop_name_pool_str2601[sizeof("todr")]; + char unicode_prop_name_pool_str2610[sizeof("indevanagariextendeda")]; + char unicode_prop_name_pool_str2613[sizeof("inottomansiyaqnumbers")]; + char unicode_prop_name_pool_str2617[sizeof("todhri")]; + char unicode_prop_name_pool_str2638[sizeof("inlatin1supplement")]; + char unicode_prop_name_pool_str2648[sizeof("nagm")]; + char unicode_prop_name_pool_str2662[sizeof("inbrahmi")]; + char unicode_prop_name_pool_str2667[sizeof("terminalpunctuation")]; + char unicode_prop_name_pool_str2684[sizeof("otheridstart")]; + char unicode_prop_name_pool_str2687[sizeof("nchar")]; + char unicode_prop_name_pool_str2695[sizeof("inverticalforms")]; + char unicode_prop_name_pool_str2697[sizeof("phagspa")]; + char unicode_prop_name_pool_str2698[sizeof("dogra")]; + char unicode_prop_name_pool_str2700[sizeof("extpict")]; + char unicode_prop_name_pool_str2701[sizeof("intaiviet")]; + char unicode_prop_name_pool_str2719[sizeof("otheruppercase")]; + char unicode_prop_name_pool_str2727[sizeof("avst")]; + char unicode_prop_name_pool_str2729[sizeof("extender")]; + char unicode_prop_name_pool_str2734[sizeof("cwu")]; + char unicode_prop_name_pool_str2737[sizeof("inphoneticextensions")]; + char unicode_prop_name_pool_str2741[sizeof("invariationselectors")]; + char unicode_prop_name_pool_str2742[sizeof("inbengali")]; + char unicode_prop_name_pool_str2744[sizeof("dogr")]; + char unicode_prop_name_pool_str2745[sizeof("softdotted")]; + char unicode_prop_name_pool_str2746[sizeof("incurrencysymbols")]; + char unicode_prop_name_pool_str2751[sizeof("invedicextensions")]; + char unicode_prop_name_pool_str2753[sizeof("sunuwar")]; + char unicode_prop_name_pool_str2755[sizeof("osmanya")]; + char unicode_prop_name_pool_str2761[sizeof("wancho")]; + char unicode_prop_name_pool_str2769[sizeof("nl")]; + char unicode_prop_name_pool_str2770[sizeof("inethiopicextended")]; + char unicode_prop_name_pool_str2772[sizeof("mathsymbol")]; + char unicode_prop_name_pool_str2775[sizeof("inbuginese")]; + char unicode_prop_name_pool_str2779[sizeof("dash")]; + char unicode_prop_name_pool_str2780[sizeof("inlowsurrogates")]; + char unicode_prop_name_pool_str2787[sizeof("ebase")]; + char unicode_prop_name_pool_str2815[sizeof("inphoneticextensionssupplement")]; + char unicode_prop_name_pool_str2819[sizeof("invariationselectorssupplement")]; + char unicode_prop_name_pool_str2824[sizeof("zp")]; + char unicode_prop_name_pool_str2826[sizeof("posixpunct")]; + char unicode_prop_name_pool_str2835[sizeof("noncharactercodepoint")]; + char unicode_prop_name_pool_str2838[sizeof("sylo")]; + char unicode_prop_name_pool_str2840[sizeof("nonspacingmark")]; + char unicode_prop_name_pool_str2845[sizeof("oupper")]; + char unicode_prop_name_pool_str2852[sizeof("inlimbu")]; + char unicode_prop_name_pool_str2857[sizeof("wcho")]; + char unicode_prop_name_pool_str2860[sizeof("ingaray")]; + char unicode_prop_name_pool_str2862[sizeof("warangciti")]; + char unicode_prop_name_pool_str2865[sizeof("ingeorgianextended")]; + char unicode_prop_name_pool_str2870[sizeof("changeswhencasemapped")]; + char unicode_prop_name_pool_str2871[sizeof("currencysymbol")]; + char unicode_prop_name_pool_str2872[sizeof("intifinagh")]; + char unicode_prop_name_pool_str2879[sizeof("java")]; + char unicode_prop_name_pool_str2896[sizeof("titlecaseletter")]; + char unicode_prop_name_pool_str2898[sizeof("olonal")]; + char unicode_prop_name_pool_str2903[sizeof("mahj")]; + char unicode_prop_name_pool_str2904[sizeof("inmeroiticcursive")]; + char unicode_prop_name_pool_str2914[sizeof("mahajani")]; + char unicode_prop_name_pool_str2915[sizeof("tale")]; + char unicode_prop_name_pool_str2917[sizeof("otherlowercase")]; + char unicode_prop_name_pool_str2920[sizeof("ugar")]; + char unicode_prop_name_pool_str2925[sizeof("otherletter")]; + char unicode_prop_name_pool_str2930[sizeof("changeswhentitlecased")]; + char unicode_prop_name_pool_str2943[sizeof("epres")]; + char unicode_prop_name_pool_str2945[sizeof("emojipresentation")]; + char unicode_prop_name_pool_str2946[sizeof("inaegeannumbers")]; + char unicode_prop_name_pool_str2949[sizeof("inindicsiyaqnumbers")]; + char unicode_prop_name_pool_str2952[sizeof("indevanagariextended")]; + char unicode_prop_name_pool_str2959[sizeof("javanese")]; + char unicode_prop_name_pool_str2966[sizeof("hang")]; + char unicode_prop_name_pool_str2970[sizeof("inletterlikesymbols")]; + char unicode_prop_name_pool_str2973[sizeof("intagbanwa")]; + char unicode_prop_name_pool_str2975[sizeof("inalphabeticpresentationforms")]; + char unicode_prop_name_pool_str2978[sizeof("taml")]; + char unicode_prop_name_pool_str2979[sizeof("tirhuta")]; + char unicode_prop_name_pool_str2981[sizeof("whitespace")]; + char unicode_prop_name_pool_str2987[sizeof("ingujarati")]; + char unicode_prop_name_pool_str2992[sizeof("paragraphseparator")]; + char unicode_prop_name_pool_str2997[sizeof("intangutcomponents")]; + char unicode_prop_name_pool_str2999[sizeof("ingunjalagondi")]; + char unicode_prop_name_pool_str3002[sizeof("khoj")]; + char unicode_prop_name_pool_str3003[sizeof("inbassavah")]; + char unicode_prop_name_pool_str3004[sizeof("inbuhid")]; + char unicode_prop_name_pool_str3011[sizeof("khitansmallscript")]; + char unicode_prop_name_pool_str3014[sizeof("narb")]; + char unicode_prop_name_pool_str3017[sizeof("inbopomofo")]; + char unicode_prop_name_pool_str3020[sizeof("hiragana")]; + char unicode_prop_name_pool_str3025[sizeof("inrejang")]; + char unicode_prop_name_pool_str3027[sizeof("oldsogdian")]; + char unicode_prop_name_pool_str3035[sizeof("nushu")]; + char unicode_prop_name_pool_str3050[sizeof("incyrillicextendedb")]; + char unicode_prop_name_pool_str3051[sizeof("othersymbol")]; + char unicode_prop_name_pool_str3052[sizeof("nagmundari")]; + char unicode_prop_name_pool_str3053[sizeof("extendedpictographic")]; + char unicode_prop_name_pool_str3054[sizeof("otherdefaultignorablecodepoint")]; + char unicode_prop_name_pool_str3065[sizeof("hmng")]; + char unicode_prop_name_pool_str3068[sizeof("insymbolsforlegacycomputing")]; + char unicode_prop_name_pool_str3070[sizeof("omath")]; + char unicode_prop_name_pool_str3084[sizeof("sylotinagri")]; + char unicode_prop_name_pool_str3086[sizeof("inlinearbsyllabary")]; + char unicode_prop_name_pool_str3097[sizeof("intangutsupplement")]; + char unicode_prop_name_pool_str3098[sizeof("inarabicmathematicalalphabeticsymbols")]; + char unicode_prop_name_pool_str3100[sizeof("cf")]; + char unicode_prop_name_pool_str3105[sizeof("inenclosedcjklettersandmonths")]; + char unicode_prop_name_pool_str3107[sizeof("inbamumsupplement")]; + char unicode_prop_name_pool_str3111[sizeof("pf")]; + char unicode_prop_name_pool_str3130[sizeof("cwl")]; + char unicode_prop_name_pool_str3133[sizeof("nshu")]; + char unicode_prop_name_pool_str3136[sizeof("inmathematicaloperators")]; + char unicode_prop_name_pool_str3143[sizeof("inhangulsyllables")]; + char unicode_prop_name_pool_str3156[sizeof("incombininghalfmarks")]; + char unicode_prop_name_pool_str3162[sizeof("newa")]; + char unicode_prop_name_pool_str3169[sizeof("tangut")]; + char unicode_prop_name_pool_str3171[sizeof("digit")]; + char unicode_prop_name_pool_str3186[sizeof("changeswhenuppercased")]; + char unicode_prop_name_pool_str3189[sizeof("finalpunctuation")]; + char unicode_prop_name_pool_str3196[sizeof("inpsalterpahlavi")]; + char unicode_prop_name_pool_str3205[sizeof("phlp")]; + char unicode_prop_name_pool_str3207[sizeof("rjng")]; + char unicode_prop_name_pool_str3208[sizeof("nbat")]; + char unicode_prop_name_pool_str3210[sizeof("newtailue")]; + char unicode_prop_name_pool_str3212[sizeof("newline")]; + char unicode_prop_name_pool_str3213[sizeof("cyprominoan")]; + char unicode_prop_name_pool_str3217[sizeof("nabataean")]; + char unicode_prop_name_pool_str3223[sizeof("insuperscriptsandsubscripts")]; + char unicode_prop_name_pool_str3225[sizeof("cyrillic")]; + char unicode_prop_name_pool_str3243[sizeof("ugaritic")]; + char unicode_prop_name_pool_str3244[sizeof("ogham")]; + char unicode_prop_name_pool_str3252[sizeof("insmallformvariants")]; + char unicode_prop_name_pool_str3256[sizeof("inlatinextendedg")]; + char unicode_prop_name_pool_str3266[sizeof("thaa")]; + char unicode_prop_name_pool_str3270[sizeof("inarabicsupplement")]; + char unicode_prop_name_pool_str3272[sizeof("thaana")]; + char unicode_prop_name_pool_str3273[sizeof("thai")]; + char unicode_prop_name_pool_str3284[sizeof("shaw")]; + char unicode_prop_name_pool_str3292[sizeof("insupplementalarrowsa")]; + char unicode_prop_name_pool_str3293[sizeof("inplayingcards")]; + char unicode_prop_name_pool_str3318[sizeof("hmnp")]; + char unicode_prop_name_pool_str3320[sizeof("tirh")]; + char unicode_prop_name_pool_str3335[sizeof("idcompatmathcontinue")]; + char unicode_prop_name_pool_str3339[sizeof("inarabicpresentationformsb")]; + char unicode_prop_name_pool_str3343[sizeof("idcompatmathstart")]; + char unicode_prop_name_pool_str3345[sizeof("tang")]; + char unicode_prop_name_pool_str3349[sizeof("tagbanwa")]; + char unicode_prop_name_pool_str3354[sizeof("cypriot")]; + char unicode_prop_name_pool_str3355[sizeof("garay")]; + char unicode_prop_name_pool_str3362[sizeof("othermath")]; + char unicode_prop_name_pool_str3363[sizeof("sgnw")]; + char unicode_prop_name_pool_str3365[sizeof("talu")]; + char unicode_prop_name_pool_str3375[sizeof("taitham")]; + char unicode_prop_name_pool_str3384[sizeof("changeswhenlowercased")]; + char unicode_prop_name_pool_str3395[sizeof("khudawadi")]; + char unicode_prop_name_pool_str3398[sizeof("elba")]; + char unicode_prop_name_pool_str3401[sizeof("telu")]; + char unicode_prop_name_pool_str3410[sizeof("insupplementalarrowsc")]; + char unicode_prop_name_pool_str3412[sizeof("cwcf")]; + char unicode_prop_name_pool_str3416[sizeof("wspace")]; + char unicode_prop_name_pool_str3421[sizeof("any")]; + char unicode_prop_name_pool_str3432[sizeof("insupplementalmathematicaloperators")]; + char unicode_prop_name_pool_str3445[sizeof("ogrext")]; + char unicode_prop_name_pool_str3452[sizeof("hung")]; + char unicode_prop_name_pool_str3463[sizeof("hebr")]; + char unicode_prop_name_pool_str3473[sizeof("deprecated")]; + char unicode_prop_name_pool_str3485[sizeof("unknown")]; + char unicode_prop_name_pool_str3497[sizeof("oldnortharabian")]; + char unicode_prop_name_pool_str3510[sizeof("modifiercombiningmark")]; + char unicode_prop_name_pool_str3516[sizeof("kayahli")]; + char unicode_prop_name_pool_str3532[sizeof("invithkuqi")]; + char unicode_prop_name_pool_str3536[sizeof("inarabicextendedb")]; + char unicode_prop_name_pool_str3566[sizeof("indivesakuru")]; + char unicode_prop_name_pool_str3578[sizeof("elbasan")]; + char unicode_prop_name_pool_str3581[sizeof("elym")]; + char unicode_prop_name_pool_str3606[sizeof("otherpunctuation")]; + char unicode_prop_name_pool_str3610[sizeof("elymaic")]; + char unicode_prop_name_pool_str3623[sizeof("symbol")]; + char unicode_prop_name_pool_str3635[sizeof("tulutigalari")]; + char unicode_prop_name_pool_str3641[sizeof("inalchemicalsymbols")]; + char unicode_prop_name_pool_str3645[sizeof("inpahawhhmong")]; + char unicode_prop_name_pool_str3661[sizeof("inprivateusearea")]; + char unicode_prop_name_pool_str3663[sizeof("tamil")]; + char unicode_prop_name_pool_str3676[sizeof("hangul")]; + char unicode_prop_name_pool_str3703[sizeof("inyisyllables")]; + char unicode_prop_name_pool_str3731[sizeof("hex")]; + char unicode_prop_name_pool_str3739[sizeof("insupplementalpunctuation")]; + char unicode_prop_name_pool_str3762[sizeof("deva")]; + char unicode_prop_name_pool_str3774[sizeof("inyijinghexagramsymbols")]; + char unicode_prop_name_pool_str3776[sizeof("inhighprivateusesurrogates")]; + char unicode_prop_name_pool_str3779[sizeof("devanagari")]; + char unicode_prop_name_pool_str3786[sizeof("bassavah")]; + char unicode_prop_name_pool_str3836[sizeof("soyombo")]; + char unicode_prop_name_pool_str3849[sizeof("dashpunctuation")]; + char unicode_prop_name_pool_str3865[sizeof("inmahjongtiles")]; + char unicode_prop_name_pool_str3870[sizeof("inhanguljamoextendedb")]; + char unicode_prop_name_pool_str3893[sizeof("alphabetic")]; + char unicode_prop_name_pool_str3903[sizeof("aghb")]; + char unicode_prop_name_pool_str3926[sizeof("incypriotsyllabary")]; + char unicode_prop_name_pool_str3936[sizeof("oldsoutharabian")]; + char unicode_prop_name_pool_str3985[sizeof("inhalfwidthandfullwidthforms")]; + char unicode_prop_name_pool_str3992[sizeof("inethiopicextendedb")]; + char unicode_prop_name_pool_str3999[sizeof("ethiopic")]; + char unicode_prop_name_pool_str4007[sizeof("tibt")]; + char unicode_prop_name_pool_str4014[sizeof("tibetan")]; + char unicode_prop_name_pool_str4026[sizeof("inlatinextendedf")]; + char unicode_prop_name_pool_str4031[sizeof("othergraphemeextend")]; + char unicode_prop_name_pool_str4061[sizeof("injavanese")]; + char unicode_prop_name_pool_str4068[sizeof("tutg")]; + char unicode_prop_name_pool_str4083[sizeof("ecomp")]; + char unicode_prop_name_pool_str4084[sizeof("inglagoliticsupplement")]; + char unicode_prop_name_pool_str4092[sizeof("inlatinextendedb")]; + char unicode_prop_name_pool_str4104[sizeof("dupl")]; + char unicode_prop_name_pool_str4175[sizeof("modifiersymbol")]; + char unicode_prop_name_pool_str4190[sizeof("hexdigit")]; + char unicode_prop_name_pool_str4278[sizeof("inegyptianhieroglyphsextendeda")]; + char unicode_prop_name_pool_str4302[sizeof("changeswhencasefolded")]; + char unicode_prop_name_pool_str4368[sizeof("dep")]; + char unicode_prop_name_pool_str4391[sizeof("rejang")]; + char unicode_prop_name_pool_str4398[sizeof("divesakuru")]; + char unicode_prop_name_pool_str4404[sizeof("openpunctuation")]; + char unicode_prop_name_pool_str4425[sizeof("inhebrew")]; + char unicode_prop_name_pool_str4442[sizeof("inegyptianhieroglyphs")]; + char unicode_prop_name_pool_str4455[sizeof("inegyptianhieroglyphformatcontrols")]; + char unicode_prop_name_pool_str4514[sizeof("hanifirohingya")]; + char unicode_prop_name_pool_str4566[sizeof("signwriting")]; + char unicode_prop_name_pool_str4617[sizeof("defaultignorablecodepoint")]; + char unicode_prop_name_pool_str4620[sizeof("upper")]; + char unicode_prop_name_pool_str4627[sizeof("tavt")]; + char unicode_prop_name_pool_str4635[sizeof("inbopomofoextended")]; + char unicode_prop_name_pool_str4653[sizeof("insupplementaryprivateuseareaa")]; + char unicode_prop_name_pool_str4701[sizeof("olduyghur")]; + char unicode_prop_name_pool_str4709[sizeof("hluw")]; + char unicode_prop_name_pool_str4731[sizeof("uppercase")]; + char unicode_prop_name_pool_str4808[sizeof("inhighsurrogates")]; + char unicode_prop_name_pool_str4812[sizeof("tifinagh")]; + char unicode_prop_name_pool_str4856[sizeof("insupplementalarrowsb")]; + char unicode_prop_name_pool_str4876[sizeof("tfng")]; + char unicode_prop_name_pool_str4905[sizeof("tagb")]; + char unicode_prop_name_pool_str4909[sizeof("hyphen")]; + char unicode_prop_name_pool_str4972[sizeof("zyyy")]; + char unicode_prop_name_pool_str4989[sizeof("uppercaseletter")]; + char unicode_prop_name_pool_str5035[sizeof("telugu")]; + char unicode_prop_name_pool_str5069[sizeof("pahawhhmong")]; + char unicode_prop_name_pool_str5080[sizeof("insupplementalsymbolsandpictographs")]; + char unicode_prop_name_pool_str5081[sizeof("unifiedideograph")]; + char unicode_prop_name_pool_str5092[sizeof("duployan")]; + char unicode_prop_name_pool_str5163[sizeof("inboxdrawing")]; + char unicode_prop_name_pool_str5171[sizeof("tglg")]; + char unicode_prop_name_pool_str5190[sizeof("tagalog")]; + char unicode_prop_name_pool_str5237[sizeof("inhangulcompatibilityjamo")]; + char unicode_prop_name_pool_str5343[sizeof("egyp")]; + char unicode_prop_name_pool_str5453[sizeof("nyiakengpuachuehmong")]; + char unicode_prop_name_pool_str6075[sizeof("egyptianhieroglyphs")]; + char unicode_prop_name_pool_str6217[sizeof("insupplementaryprivateuseareab")]; + char unicode_prop_name_pool_str6900[sizeof("hebrew")]; + }; +static const struct unicode_prop_name_pool_t unicode_prop_name_pool_contents = + { + "lana", + "yi", + "lina", + "yiii", + "mn", + "maka", + "mani", + "z", + "inkannada", + "lo", + "lao", + "laoo", + "miao", + "cn", + "ci", + "innko", + "zzzz", + "yezi", + "gara", + "gran", + "pi", + "lineara", + "co", + "mark", + "po", + "inkiratrai", + "me", + "inkharoshthi", + "cari", + "loe", + "carian", + "mro", + "mroo", + "grek", + "kana", + "geor", + "greek", + "m", + "mero", + "pe", + "mendekikakui", + "gonm", + "inosmanya", + "inmanichaean", + "inchakma", + "cakm", + "inmro", + "inmiao", + "meeteimayek", + "mandaic", + "c", + "krai", + "inarmenian", + "inmyanmar", + "inmakasar", + "common", + "qaai", + "marc", + "inrunic", + "incarian", + "lm", + "inkhmer", + "inchorasmian", + "inideographicsymbolsandpunctuation", + "cans", + "merc", + "combiningmark", + "inahom", + "perm", + "inavestan", + "connectorpunctuation", + "insharada", + "lc", + "prependedconcatenationmark", + "incuneiformnumbersandpunctuation", + "inipaextensions", + "makasar", + "latn", + "mc", + "inarrows", + "ri", + "latin", + "incherokee", + "inthaana", + "masaramgondi", + "inkatakana", + "armn", + "inthai", + "cc", + "armi", + "incuneiform", + "inkaithi", + "pc", + "armenian", + "inmarchen", + "qmark", + "qaac", + "initialpunctuation", + "inzanabazarsquare", + "insamaritan", + "lineseparator", + "mtei", + "inmasaramgondi", + "inscriptionalparthian", + "incyrillic", + "intakri", + "incham", + "mcm", + "prti", + "katakana", + "inkhmersymbols", + "insyriac", + "pcm", + "mand", + "zs", + "inkanaextendeda", + "cs", + "modi", + "privateuse", + "ps", + "brai", + "mend", + "ideo", + "yezidi", + "inmyanmarextendeda", + "arabic", + "letter", + "xidcontinue", + "ascii", + "innandinagari", + "inoldnortharabian", + "inmeeteimayek", + "knda", + "kannada", + "intransportandmapsymbols", + "kiratrai", + "inruminumeralsymbols", + "inideographicdescriptioncharacters", + "incjkcompatibilityforms", + "letternumber", + "incjkcompatibilityideographs", + "inmodi", + "xidc", + "inmendekikakui", + "lt", + "inemoticons", + "sk", + "inolditalic", + "brahmi", + "gothic", + "inmedefaidrin", + "psalterpahlavi", + "so", + "inspecials", + "kits", + "inmyanmarextendedc", + "intoto", + "xids", + "inchesssymbols", + "incjkcompatibilityideographssupplement", + "inopticalcharacterrecognition", + "sora", + "inkanasupplement", + "inoldsogdian", + "meroiticcursive", + "inmiscellaneousmathematicalsymbolsa", + "grext", + "patternwhitespace", + "insundanese", + "inmandaic", + "print", + "idc", + "batk", + "inancientsymbols", + "batak", + "intaitham", + "inoldsoutharabian", + "incommonindicnumberforms", + "inznamennymusicalnotation", + "samr", + "patws", + "bamum", + "idsbinaryoperator", + "samaritan", + "pauc", + "s", + "incjkstrokes", + "inugaritic", + "lisu", + "indominotiles", + "idsunaryoperator", + "sm", + "l", + "inancientgreekmusicalnotation", + "bass", + "ids", + "inmodifiertoneletters", + "incontrolpictures", + "sc", + "insaurashtra", + "insunuwar", + "inlao", + "pd", + "inolonal", + "inoldturkic", + "inlineara", + "mongolian", + "inmusicalsymbols", + "idcontinue", + "incaucasianalbanian", + "grlink", + "idst", + "runr", + "kali", + "inadlam", + "inmiscellaneoussymbols", + "control", + "indeseret", + "inmiscellaneoussymbolsandarrows", + "idstart", + "inmiscellaneoussymbolsandpictographs", + "inlycian", + "palm", + "sind", + "onao", + "xidstart", + "inancientgreeknumbers", + "xdigit", + "inmeeteimayekextensions", + "inkhudawadi", + "inspacingmodifierletters", + "oriya", + "cased", + "inmalayalam", + "inolduyghur", + "incountingrodnumerals", + "bamu", + "insmallkanaextension", + "bidic", + "ital", + "inkaktoviknumerals", + "joinc", + "insylotinagri", + "vai", + "vaii", + "inlinearbideograms", + "inlatinextendeda", + "sterm", + "incyrillicsupplement", + "runic", + "lu", + "insiddham", + "quotationmark", + "intaile", + "incherokeesupplement", + "alnum", + "idsu", + "incjkunifiedideographsextensiona", + "incjkunifiedideographsextensioni", + "saur", + "punct", + "sundanese", + "guru", + "inlatinextendede", + "bali", + "paucinhau", + "blank", + "gurmukhi", + "intamil", + "incjkunifiedideographsextensione", + "inmultani", + "inlydian", + "osage", + "bengali", + "limbu", + "osma", + "zinh", + "balinese", + "inhanifirohingya", + "plrd", + "incjkunifiedideographsextensionc", + "inhiragana", + "canadianaboriginal", + "saurashtra", + "phoenician", + "ingrantha", + "sd", + "gong", + "incjkunifiedideographs", + "marchen", + "sidd", + "odi", + "mong", + "sinhala", + "graphemelink", + "inearlydynasticcuneiform", + "cher", + "kaithi", + "inmahajani", + "inlatinextendedc", + "multani", + "inogham", + "gunjalagondi", + "cham", + "cherokee", + "chakma", + "khojki", + "inosage", + "khar", + "manichaean", + "georgian", + "ingeneralpunctuation", + "inolchiki", + "ingeorgian", + "graphemebase", + "adlm", + "inethiopic", + "inkhitansmallscript", + "insinhala", + "inmongolian", + "punctuation", + "emoji", + "innagmundari", + "vs", + "casedletter", + "oidc", + "intamilsupplement", + "ahom", + "chorasmian", + "khmr", + "ingurmukhi", + "sund", + "patternsyntax", + "chrs", + "math", + "inscriptionalpahlavi", + "goth", + "adlam", + "oids", + "incjkunifiedideographsextensiond", + "khmer", + "grantha", + "ll", + "kharoshthi", + "intirhuta", + "inhatran", + "inmiscellaneoustechnical", + "logicalorderexception", + "radical", + "zl", + "insorasompeng", + "n", + "intangsa", + "kthi", + "mult", + "nandinagari", + "no", + "nko", + "nkoo", + "intulutigalari", + "p", + "emojimodifier", + "xpeo", + "brah", + "sunu", + "inoldhungarian", + "inphoenician", + "incyrillicextendeda", + "inherited", + "intaixuanjingsymbols", + "ingreekandcoptic", + "inenclosedideographicsupplement", + "glagolitic", + "inmeroitichieroglyphs", + "bidicontrol", + "enclosingmark", + "regionalindicator", + "beng", + "inanatolianhieroglyphs", + "joincontrol", + "inkangxiradicals", + "dia", + "cpmn", + "di", + "diak", + "graphemeextend", + "indogra", + "inphaistosdisc", + "lepc", + "sinh", + "shavian", + "gukh", + "linb", + "ingreekextended", + "incyprominoan", + "innabataean", + "zanb", + "inhanunoo", + "bhks", + "inkanbun", + "inbhaiksuki", + "incyrillicextendedc", + "emod", + "bhaiksuki", + "xsux", + "format", + "inelbasan", + "emojimodifierbase", + "linearb", + "olck", + "inimperialaramaic", + "inlatinextendedd", + "insundanesesupplement", + "intangut", + "cntrl", + "olchiki", + "inlatinextendedadditional", + "olower", + "sogdian", + "sogo", + "ingeometricshapes", + "emojicomponent", + "limb", + "intodhri", + "inkayahli", + "insogdian", + "indingbats", + "inoriya", + "inyezidi", + "insinhalaarchaicnumbers", + "copt", + "vithkuqi", + "incb", + "wara", + "coptic", + "gurungkhema", + "inarabic", + "ideographic", + "diacritic", + "cprt", + "arab", + "inenclosedalphanumerics", + "anatolianhieroglyphs", + "innewa", + "asciihexdigit", + "nand", + "intags", + "ininscriptionalparthian", + "innushu", + "ininscriptionalpahlavi", + "inkawi", + "inkatakanaphoneticextensions", + "inarabicpresentationformsa", + "inbasiclatin", + "bopo", + "lyci", + "lycian", + "inoldpersian", + "imperialaramaic", + "braille", + "ingurungkhema", + "inwarangciti", + "inenclosedalphanumericsupplement", + "phli", + "mymr", + "myanmar", + "han", + "hani", + "incyrillicextendedd", + "inbatak", + "kawi", + "hano", + "glag", + "lower", + "inlisu", + "ingeometricshapesextended", + "hanunoo", + "inkhojki", + "intibetan", + "grbase", + "hira", + "insoyombo", + "decimalnumber", + "inwancho", + "inlisusupplement", + "sorasompeng", + "incoptic", + "bopomofo", + "inoldpermic", + "sharada", + "inethiopicsupplement", + "incjksymbolsandpunctuation", + "spacingmark", + "intelugu", + "inelymaic", + "medf", + "insyriacsupplement", + "inblockelements", + "incjkcompatibility", + "medefaidrin", + "inkanaextendedb", + "oldpersian", + "patsyn", + "shrd", + "lowercase", + "orkh", + "space", + "innumberforms", + "assigned", + "inarabicextendeda", + "inmyanmarextendedb", + "inshorthandformatcontrols", + "cwcm", + "bugi", + "variationselector", + "inmayannumerals", + "sogd", + "dsrt", + "inbyzantinemusicalsymbols", + "ingeorgiansupplement", + "lydi", + "lydian", + "siddham", + "inbraillepatterns", + "separator", + "innewtailue", + "sentenceterminal", + "inornamentaldingbats", + "word", + "buginese", + "oldpermic", + "inyiradicals", + "phnx", + "hatran", + "deseret", + "ogam", + "insuttonsignwriting", + "inunifiedcanadianaboriginalsyllabicsextendeda", + "incjkunifiedideographsextensionh", + "nd", + "inarabicextendedc", + "idsb", + "caseignorable", + "sarb", + "hatr", + "uideo", + "number", + "zanabazarsquare", + "inmiscellaneousmathematicalsymbolsb", + "incjkunifiedideographsextensiong", + "innyiakengpuachuehmong", + "ahex", + "soyo", + "cuneiform", + "insymbolsforlegacycomputingsupplement", + "incopticepactnumbers", + "osge", + "closepunctuation", + "graph", + "alpha", + "lowercaseletter", + "modifierletter", + "takri", + "olditalic", + "inlepcha", + "invai", + "surrogate", + "meroitichieroglyphs", + "other", + "inpalmyrene", + "cwt", + "othernumber", + "buhd", + "otheridcontinue", + "inunifiedcanadianaboriginalsyllabics", + "takr", + "unassigned", + "vith", + "inbamum", + "phag", + "taile", + "inhanguljamo", + "caucasianalbanian", + "innoblock", + "idstrinaryoperator", + "syrc", + "inhanguljamoextendeda", + "inbalinese", + "otheralphabetic", + "gujr", + "oldhungarian", + "gujarati", + "tnsa", + "tangsa", + "term", + "inmongoliansupplement", + "incombiningdiacriticalmarks", + "inshavian", + "incombiningdiacriticalmarksforsymbols", + "spaceseparator", + "cyrl", + "syriac", + "inunifiedcanadianaboriginalsyllabicsextended", + "inethiopicextendeda", + "inmathematicalalphanumericsymbols", + "mlym", + "induployan", + "malayalam", + "incombiningdiacriticalmarkssupplement", + "insymbolsandpictographsextendeda", + "toto", + "ethi", + "palmyrene", + "rohg", + "taiviet", + "ougr", + "oldturkic", + "inpaucinhau", + "lepcha", + "orya", + "incjkradicalssupplement", + "incjkunifiedideographsextensionf", + "inglagolitic", + "intagalog", + "incombiningdiacriticalmarksextended", + "inphagspa", + "ext", + "indevanagari", + "incjkunifiedideographsextensionb", + "oalpha", + "buhid", + "ingothic", + "avestan", + "todr", + "indevanagariextendeda", + "inottomansiyaqnumbers", + "todhri", + "inlatin1supplement", + "nagm", + "inbrahmi", + "terminalpunctuation", + "otheridstart", + "nchar", + "inverticalforms", + "phagspa", + "dogra", + "extpict", + "intaiviet", + "otheruppercase", + "avst", + "extender", + "cwu", + "inphoneticextensions", + "invariationselectors", + "inbengali", + "dogr", + "softdotted", + "incurrencysymbols", + "invedicextensions", + "sunuwar", + "osmanya", + "wancho", + "nl", + "inethiopicextended", + "mathsymbol", + "inbuginese", + "dash", + "inlowsurrogates", + "ebase", + "inphoneticextensionssupplement", + "invariationselectorssupplement", + "zp", + "posixpunct", + "noncharactercodepoint", + "sylo", + "nonspacingmark", + "oupper", + "inlimbu", + "wcho", + "ingaray", + "warangciti", + "ingeorgianextended", + "changeswhencasemapped", + "currencysymbol", + "intifinagh", + "java", + "titlecaseletter", + "olonal", + "mahj", + "inmeroiticcursive", + "mahajani", + "tale", + "otherlowercase", + "ugar", + "otherletter", + "changeswhentitlecased", + "epres", + "emojipresentation", + "inaegeannumbers", + "inindicsiyaqnumbers", + "indevanagariextended", + "javanese", + "hang", + "inletterlikesymbols", + "intagbanwa", + "inalphabeticpresentationforms", + "taml", + "tirhuta", + "whitespace", + "ingujarati", + "paragraphseparator", + "intangutcomponents", + "ingunjalagondi", + "khoj", + "inbassavah", + "inbuhid", + "khitansmallscript", + "narb", + "inbopomofo", + "hiragana", + "inrejang", + "oldsogdian", + "nushu", + "incyrillicextendedb", + "othersymbol", + "nagmundari", + "extendedpictographic", + "otherdefaultignorablecodepoint", + "hmng", + "insymbolsforlegacycomputing", + "omath", + "sylotinagri", + "inlinearbsyllabary", + "intangutsupplement", + "inarabicmathematicalalphabeticsymbols", + "cf", + "inenclosedcjklettersandmonths", + "inbamumsupplement", + "pf", + "cwl", + "nshu", + "inmathematicaloperators", + "inhangulsyllables", + "incombininghalfmarks", + "newa", + "tangut", + "digit", + "changeswhenuppercased", + "finalpunctuation", + "inpsalterpahlavi", + "phlp", + "rjng", + "nbat", + "newtailue", + "newline", + "cyprominoan", + "nabataean", + "insuperscriptsandsubscripts", + "cyrillic", + "ugaritic", + "ogham", + "insmallformvariants", + "inlatinextendedg", + "thaa", + "inarabicsupplement", + "thaana", + "thai", + "shaw", + "insupplementalarrowsa", + "inplayingcards", + "hmnp", + "tirh", + "idcompatmathcontinue", + "inarabicpresentationformsb", + "idcompatmathstart", + "tang", + "tagbanwa", + "cypriot", + "garay", + "othermath", + "sgnw", + "talu", + "taitham", + "changeswhenlowercased", + "khudawadi", + "elba", + "telu", + "insupplementalarrowsc", + "cwcf", + "wspace", + "any", + "insupplementalmathematicaloperators", + "ogrext", + "hung", + "hebr", + "deprecated", + "unknown", + "oldnortharabian", + "modifiercombiningmark", + "kayahli", + "invithkuqi", + "inarabicextendedb", + "indivesakuru", + "elbasan", + "elym", + "otherpunctuation", + "elymaic", + "symbol", + "tulutigalari", + "inalchemicalsymbols", + "inpahawhhmong", + "inprivateusearea", + "tamil", + "hangul", + "inyisyllables", + "hex", + "insupplementalpunctuation", + "deva", + "inyijinghexagramsymbols", + "inhighprivateusesurrogates", + "devanagari", + "bassavah", + "soyombo", + "dashpunctuation", + "inmahjongtiles", + "inhanguljamoextendedb", + "alphabetic", + "aghb", + "incypriotsyllabary", + "oldsoutharabian", + "inhalfwidthandfullwidthforms", + "inethiopicextendedb", + "ethiopic", + "tibt", + "tibetan", + "inlatinextendedf", + "othergraphemeextend", + "injavanese", + "tutg", + "ecomp", + "inglagoliticsupplement", + "inlatinextendedb", + "dupl", + "modifiersymbol", + "hexdigit", + "inegyptianhieroglyphsextendeda", + "changeswhencasefolded", + "dep", + "rejang", + "divesakuru", + "openpunctuation", + "inhebrew", + "inegyptianhieroglyphs", + "inegyptianhieroglyphformatcontrols", + "hanifirohingya", + "signwriting", + "defaultignorablecodepoint", + "upper", + "tavt", + "inbopomofoextended", + "insupplementaryprivateuseareaa", + "olduyghur", + "hluw", + "uppercase", + "inhighsurrogates", + "tifinagh", + "insupplementalarrowsb", + "tfng", + "tagb", + "hyphen", + "zyyy", + "uppercaseletter", + "telugu", + "pahawhhmong", + "insupplementalsymbolsandpictographs", + "unifiedideograph", + "duployan", + "inboxdrawing", + "tglg", + "tagalog", + "inhangulcompatibilityjamo", + "egyp", + "nyiakengpuachuehmong", + "egyptianhieroglyphs", + "insupplementaryprivateuseareab", + "hebrew" + }; +#define unicode_prop_name_pool ((const char *) &unicode_prop_name_pool_contents) +static const struct PoolPropertyNameCtype * +unicode_lookup_property_name (register const char *str, register size_t len) +{ + static const struct PoolPropertyNameCtype wordlist[] = + { + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(12), 255}, + {-1}, {-1}, {-1}, + + {pool_offset(16), 284}, + {-1}, {-1}, + + {pool_offset(19), 137}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(25), 284}, + + {pool_offset(26), 166}, + {-1}, + + {pool_offset(28), 151}, + {-1}, {-1}, + + {pool_offset(31), 154}, + {-1}, {-1}, + + {pool_offset(34), 285}, + {-1}, {-1}, + + {pool_offset(37), 319}, + + {pool_offset(38), 142}, + + {pool_offset(39), 133}, + + {pool_offset(40), 133}, + {-1}, {-1}, + + {pool_offset(43), 165}, + {-1}, {-1}, + + {pool_offset(46), 54}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(52), 40}, + + {pool_offset(53), 306}, + {-1}, + + {pool_offset(55), 273}, + + {pool_offset(56), 283}, + {-1}, + + {pool_offset(58), 83}, + {-1}, {-1}, {-1}, + + {pool_offset(62), 87}, + + {pool_offset(63), 221}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(69), 137}, + + {pool_offset(70), 55}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(75), 149}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(81), 222}, + {-1}, {-1}, + + {pool_offset(84), 559}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(90), 159}, + {-1}, {-1}, + + {pool_offset(93), 487}, + + {pool_offset(94), 39}, + + {pool_offset(95), 143}, + {-1}, + + {pool_offset(97), 39}, + + {pool_offset(98), 170}, + + {pool_offset(99), 170}, + {-1}, {-1}, + + {pool_offset(102), 91}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(107), 122}, + {-1}, {-1}, + + {pool_offset(110), 84}, + + {pool_offset(111), 91}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(116), 149}, + {-1}, {-1}, + + {pool_offset(119), 164}, + {-1}, + + {pool_offset(121), 217}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(126), 162}, + {-1}, {-1}, {-1}, + + {pool_offset(130), 156}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(136), 470}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(142), 490}, + {-1}, {-1}, {-1}, + + {pool_offset(146), 510}, + + {pool_offset(147), 45}, + + {pool_offset(148), 555}, + + {pool_offset(149), 561}, + + {pool_offset(150), 161}, + {-1}, + + {pool_offset(152), 153}, + {-1}, {-1}, + + {pool_offset(155), 37}, + {-1}, + + {pool_offset(157), 130}, + {-1}, {-1}, {-1}, + + {pool_offset(161), 300}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(171), 325}, + {-1}, {-1}, {-1}, + + {pool_offset(175), 541}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(181), 56}, + {-1}, {-1}, + + {pool_offset(184), 115}, + + {pool_offset(185), 155}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(195), 333}, + + {pool_offset(196), 461}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(204), 141}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(209), 338}, + {-1}, {-1}, {-1}, + + {pool_offset(213), 505}, + {-1}, + + {pool_offset(215), 562}, + {-1}, + + {pool_offset(217), 38}, + {-1}, {-1}, {-1}, + + {pool_offset(221), 163}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(230), 149}, + {-1}, + + {pool_offset(232), 526}, + + {pool_offset(233), 192}, + + {pool_offset(234), 491}, + {-1}, {-1}, {-1}, + + {pool_offset(238), 215}, + {-1}, {-1}, + + {pool_offset(241), 512}, + + {pool_offset(242), 132}, + {-1}, + + {pool_offset(244), 223}, + {-1}, + + {pool_offset(246), 546}, + {-1}, {-1}, {-1}, + + {pool_offset(250), 294}, + + {pool_offset(251), 151}, + {-1}, + + {pool_offset(253), 134}, + + {pool_offset(254), 158}, + {-1}, + + {pool_offset(256), 368}, + + {pool_offset(257), 228}, + + {pool_offset(258), 134}, + + {pool_offset(259), 330}, + {-1}, + + {pool_offset(261), 305}, + + {pool_offset(262), 156}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(271), 399}, + + {pool_offset(272), 22}, + + {pool_offset(273), 322}, + + {pool_offset(274), 43}, + + {pool_offset(275), 113}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(280), 545}, + {-1}, {-1}, + + {pool_offset(283), 508}, + {-1}, + + {pool_offset(285), 215}, + {-1}, + + {pool_offset(287), 22}, + {-1}, + + {pool_offset(289), 538}, + {-1}, {-1}, {-1}, + + {pool_offset(293), 226}, + {-1}, + + {pool_offset(295), 57}, + + {pool_offset(296), 221}, + {-1}, + + {pool_offset(298), 531}, + + {pool_offset(299), 307}, + + {pool_offset(300), 287}, + {-1}, {-1}, {-1}, + + {pool_offset(304), 161}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(309), 539}, + {-1}, + + {pool_offset(311), 117}, + + {pool_offset(312), 298}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(322), 524}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(334), 429}, + + {pool_offset(335), 168}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(346), 117}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(356), 122}, + {-1}, + + {pool_offset(358), 344}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(365), 303}, + + {pool_offset(366), 223}, + + {pool_offset(367), 153}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(372), 289}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(382), 569}, + {-1}, + + {pool_offset(384), 58}, + {-1}, + + {pool_offset(386), 167}, + {-1}, + + {pool_offset(388), 55}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(395), 224}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(401), 34}, + {-1}, + + {pool_offset(403), 162}, + {-1}, {-1}, {-1}, + + {pool_offset(407), 112}, + + {pool_offset(408), 283}, + {-1}, + + {pool_offset(410), 430}, + {-1}, {-1}, {-1}, + + {pool_offset(414), 21}, + {-1}, {-1}, + + {pool_offset(417), 131}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(426), 281}, + {-1}, + + {pool_offset(428), 14}, + {-1}, + + {pool_offset(430), 530}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(443), 489}, + {-1}, + + {pool_offset(445), 436}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(450), 121}, + {-1}, {-1}, + + {pool_offset(453), 121}, + + {pool_offset(454), 607}, + {-1}, + + {pool_offset(456), 130}, + + {pool_offset(457), 499}, + + {pool_offset(458), 396}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(466), 449}, + {-1}, {-1}, {-1}, + + {pool_offset(470), 181}, + + {pool_offset(471), 443}, + {-1}, {-1}, + + {pool_offset(474), 522}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(481), 281}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(487), 594}, + + {pool_offset(488), 145}, + + {pool_offset(489), 605}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(504), 241}, + {-1}, {-1}, + + {pool_offset(507), 463}, + {-1}, + + {pool_offset(509), 33}, + {-1}, {-1}, {-1}, + + {pool_offset(513), 86}, + + {pool_offset(514), 560}, + {-1}, {-1}, {-1}, + + {pool_offset(518), 225}, + {-1}, + + {pool_offset(520), 243}, + {-1}, + + {pool_offset(522), 453}, + {-1}, + + {pool_offset(524), 126}, + {-1}, {-1}, {-1}, + + {pool_offset(528), 525}, + {-1}, {-1}, {-1}, + + {pool_offset(532), 589}, + {-1}, {-1}, {-1}, + + {pool_offset(536), 282}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(542), 612}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(549), 621}, + + {pool_offset(550), 372}, + {-1}, {-1}, + + {pool_offset(553), 246}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(558), 568}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(564), 502}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(571), 163}, + + {pool_offset(572), 379}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(577), 89}, + + {pool_offset(578), 213}, + + {pool_offset(579), 349}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(585), 308}, + {-1}, {-1}, + + {pool_offset(588), 7}, + {-1}, + + {pool_offset(590), 110}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(596), 28}, + {-1}, + + {pool_offset(598), 458}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(605), 28}, + {-1}, {-1}, {-1}, + + {pool_offset(609), 346}, + {-1}, {-1}, + + {pool_offset(612), 488}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(631), 420}, + {-1}, {-1}, {-1}, + + {pool_offset(635), 575}, + + {pool_offset(636), 232}, + {-1}, {-1}, + + {pool_offset(639), 213}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(645), 26}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(651), 105}, + + {pool_offset(652), 232}, + {-1}, {-1}, + + {pool_offset(655), 214}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(660), 231}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(669), 404}, + {-1}, {-1}, {-1}, + + {pool_offset(673), 466}, + + {pool_offset(674), 139}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(683), 600}, + {-1}, + + {pool_offset(685), 107}, + + {pool_offset(686), 242}, + {-1}, {-1}, + + {pool_offset(689), 131}, + {-1}, {-1}, + + {pool_offset(692), 578}, + + {pool_offset(693), 27}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(700), 111}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(707), 417}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(719), 371}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(724), 234}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(730), 422}, + + {pool_offset(731), 536}, + {-1}, + + {pool_offset(733), 323}, + {-1}, + + {pool_offset(735), 216}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(740), 592}, + + {pool_offset(741), 495}, + {-1}, {-1}, {-1}, + + {pool_offset(745), 476}, + {-1}, {-1}, {-1}, + + {pool_offset(749), 169}, + {-1}, {-1}, + + {pool_offset(752), 577}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(760), 110}, + + {pool_offset(761), 473}, + {-1}, {-1}, + + {pool_offset(764), 90}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(769), 106}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(782), 230}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(794), 124}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(802), 595}, + {-1}, {-1}, {-1}, + + {pool_offset(806), 377}, + {-1}, {-1}, {-1}, + + {pool_offset(810), 43}, + {-1}, {-1}, {-1}, + + {pool_offset(814), 468}, + + {pool_offset(815), 385}, + {-1}, {-1}, {-1}, + + {pool_offset(819), 111}, + + {pool_offset(820), 604}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(833), 460}, + + {pool_offset(834), 211}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(844), 129}, + {-1}, {-1}, {-1}, + + {pool_offset(848), 188}, + + {pool_offset(849), 282}, + {-1}, {-1}, {-1}, + + {pool_offset(853), 457}, + + {pool_offset(854), 11}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(861), 432}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(867), 516}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(879), 295}, + {-1}, {-1}, {-1}, + + {pool_offset(883), 198}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(900), 41}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(905), 320}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(915), 504}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(929), 582}, + {-1}, {-1}, + + {pool_offset(932), 26}, + + {pool_offset(933), 570}, + + {pool_offset(934), 31}, + {-1}, {-1}, + + {pool_offset(937), 190}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(946), 579}, + {-1}, + + {pool_offset(948), 119}, + {-1}, {-1}, {-1}, + + {pool_offset(952), 419}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(957), 275}, + + {pool_offset(958), 275}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(963), 455}, + + {pool_offset(964), 292}, + {-1}, + + {pool_offset(966), 235}, + + {pool_offset(967), 299}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(972), 230}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(978), 146}, + + {pool_offset(979), 521}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(984), 226}, + {-1}, {-1}, + + {pool_offset(987), 342}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(996), 435}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(1009), 13}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1014), 107}, + + {pool_offset(1015), 408}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1022), 620}, + + {pool_offset(1023), 233}, + + {pool_offset(1024), 209}, + + {pool_offset(1025), 248}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1030), 94}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1036), 434}, + {-1}, + + {pool_offset(1038), 25}, + + {pool_offset(1039), 214}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1048), 2}, + + {pool_offset(1049), 94}, + + {pool_offset(1050), 317}, + + {pool_offset(1051), 618}, + + {pool_offset(1052), 515}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1058), 484}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1074), 199}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1081), 29}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1087), 136}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(1100), 200}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1110), 115}, + + {pool_offset(1111), 25}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1117), 497}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1125), 165}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1133), 616}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1140), 398}, + {-1}, {-1}, + + {pool_offset(1143), 38}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(1155), 233}, + {-1}, {-1}, {-1}, + + {pool_offset(1159), 220}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(1171), 517}, + {-1}, {-1}, + + {pool_offset(1174), 244}, + {-1}, {-1}, + + {pool_offset(1177), 93}, + + {pool_offset(1178), 410}, + {-1}, {-1}, + + {pool_offset(1181), 155}, + {-1}, + + {pool_offset(1183), 238}, + + {pool_offset(1184), 202}, + {-1}, + + {pool_offset(1186), 169}, + {-1}, + + {pool_offset(1188), 240}, + + {pool_offset(1189), 90}, + {-1}, {-1}, {-1}, + + {pool_offset(1193), 547}, + + {pool_offset(1194), 52}, + {-1}, {-1}, + + {pool_offset(1197), 120}, + {-1}, + + {pool_offset(1199), 511}, + + {pool_offset(1200), 387}, + {-1}, {-1}, {-1}, + + {pool_offset(1204), 171}, + + {pool_offset(1205), 332}, + {-1}, + + {pool_offset(1207), 93}, + {-1}, {-1}, + + {pool_offset(1210), 46}, + + {pool_offset(1211), 52}, + + {pool_offset(1212), 45}, + {-1}, + + {pool_offset(1214), 128}, + {-1}, {-1}, + + {pool_offset(1217), 471}, + {-1}, {-1}, {-1}, + + {pool_offset(1221), 125}, + {-1}, + + {pool_offset(1223), 154}, + + {pool_offset(1224), 84}, + {-1}, + + {pool_offset(1226), 362}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1233), 352}, + {-1}, + + {pool_offset(1235), 326}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1245), 88}, + {-1}, {-1}, + + {pool_offset(1248), 16}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1254), 328}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1259), 565}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1269), 321}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1276), 339}, + {-1}, {-1}, + + {pool_offset(1279), 209}, + + {pool_offset(1280), 75}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1287), 591}, + + {pool_offset(1288), 276}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1294), 132}, + {-1}, + + {pool_offset(1296), 204}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1305), 544}, + {-1}, {-1}, + + {pool_offset(1308), 17}, + {-1}, + + {pool_offset(1310), 53}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1320), 127}, + + {pool_offset(1321), 314}, + {-1}, + + {pool_offset(1323), 248}, + + {pool_offset(1324), 212}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1331), 53}, + + {pool_offset(1332), 157}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1337), 116}, + {-1}, + + {pool_offset(1339), 86}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1348), 16}, + {-1}, {-1}, + + {pool_offset(1351), 205}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1358), 617}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1368), 127}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1373), 87}, + + {pool_offset(1374), 140}, + {-1}, + + {pool_offset(1376), 125}, + {-1}, {-1}, {-1}, + + {pool_offset(1380), 520}, + {-1}, {-1}, + + {pool_offset(1383), 482}, + {-1}, {-1}, {-1}, + + {pool_offset(1387), 370}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1392), 143}, + + {pool_offset(1393), 227}, + + {pool_offset(1394), 287}, + + {pool_offset(1395), 509}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1404), 173}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1411), 556}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(1422), 120}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1431), 171}, + + {pool_offset(1432), 176}, + + {pool_offset(1433), 182}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1442), 180}, + + {pool_offset(1443), 180}, + + {pool_offset(1444), 518}, + {-1}, {-1}, + + {pool_offset(1447), 209}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1463), 77}, + + {pool_offset(1464), 193}, + + {pool_offset(1465), 33}, + + {pool_offset(1466), 249}, + + {pool_offset(1467), 496}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1483), 483}, + {-1}, {-1}, + + {pool_offset(1486), 392}, + {-1}, {-1}, + + {pool_offset(1489), 115}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1496), 581}, + {-1}, + + {pool_offset(1498), 297}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1512), 603}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1519), 85}, + {-1}, + + {pool_offset(1521), 485}, + + {pool_offset(1522), 31}, + {-1}, {-1}, + + {pool_offset(1525), 159}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1530), 228}, + {-1}, {-1}, + + {pool_offset(1533), 29}, + {-1}, + + {pool_offset(1535), 552}, + + {pool_offset(1536), 119}, + {-1}, {-1}, + + {pool_offset(1539), 395}, + {-1}, + + {pool_offset(1541), 68}, + + {pool_offset(1542), 61}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1547), 64}, + {-1}, {-1}, + + {pool_offset(1550), 69}, + {-1}, {-1}, {-1}, + + {pool_offset(1554), 89}, + + {pool_offset(1555), 527}, + {-1}, + + {pool_offset(1557), 459}, + {-1}, {-1}, {-1}, + + {pool_offset(1561), 135}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(1572), 240}, + {-1}, {-1}, + + {pool_offset(1575), 237}, + + {pool_offset(1576), 95}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1583), 138}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1592), 361}, + + {pool_offset(1593), 548}, + {-1}, + + {pool_offset(1595), 481}, + + {pool_offset(1596), 286}, + {-1}, + + {pool_offset(1598), 335}, + + {pool_offset(1599), 30}, + + {pool_offset(1600), 402}, + + {pool_offset(1601), 537}, + {-1}, {-1}, + + {pool_offset(1604), 353}, + {-1}, {-1}, {-1}, + + {pool_offset(1608), 77}, + {-1}, {-1}, + + {pool_offset(1611), 30}, + + {pool_offset(1612), 59}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1622), 44}, + {-1}, {-1}, + + {pool_offset(1625), 472}, + {-1}, {-1}, {-1}, + + {pool_offset(1629), 78}, + {-1}, {-1}, {-1}, + + {pool_offset(1633), 138}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1638), 187}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1643), 479}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1650), 418}, + + {pool_offset(1651), 355}, + + {pool_offset(1652), 563}, + {-1}, + + {pool_offset(1654), 3}, + + {pool_offset(1655), 187}, + {-1}, + + {pool_offset(1657), 360}, + {-1}, {-1}, + + {pool_offset(1660), 206}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1666), 245}, + {-1}, + + {pool_offset(1668), 194}, + {-1}, {-1}, {-1}, + + {pool_offset(1672), 376}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1677), 76}, + + {pool_offset(1678), 136}, + {-1}, {-1}, {-1}, + + {pool_offset(1682), 475}, + {-1}, + + {pool_offset(1684), 424}, + {-1}, {-1}, + + {pool_offset(1687), 503}, + + {pool_offset(1688), 378}, + {-1}, + + {pool_offset(1690), 316}, + + {pool_offset(1691), 500}, + + {pool_offset(1692), 513}, + {-1}, {-1}, {-1}, + + {pool_offset(1696), 57}, + + {pool_offset(1697), 277}, + + {pool_offset(1698), 114}, + + {pool_offset(1699), 279}, + + {pool_offset(1700), 57}, + + {pool_offset(1701), 95}, + + {pool_offset(1702), 302}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1709), 112}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1719), 68}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1727), 60}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1733), 21}, + + {pool_offset(1734), 373}, + + {pool_offset(1735), 19}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1745), 519}, + {-1}, {-1}, + + {pool_offset(1748), 15}, + {-1}, + + {pool_offset(1750), 176}, + + {pool_offset(1751), 624}, + + {pool_offset(1752), 492}, + + {pool_offset(1753), 571}, + + {pool_offset(1754), 493}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1763), 542}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(1774), 405}, + + {pool_offset(1775), 445}, + + {pool_offset(1776), 290}, + {-1}, + + {pool_offset(1778), 32}, + {-1}, {-1}, + + {pool_offset(1781), 147}, + {-1}, {-1}, + + {pool_offset(1784), 147}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1790), 467}, + {-1}, + + {pool_offset(1792), 113}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1801), 34}, + {-1}, + + {pool_offset(1803), 553}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1808), 528}, + {-1}, {-1}, + + {pool_offset(1811), 602}, + {-1}, + + {pool_offset(1813), 116}, + + {pool_offset(1814), 172}, + {-1}, {-1}, + + {pool_offset(1817), 172}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1823), 96}, + {-1}, {-1}, {-1}, + + {pool_offset(1827), 96}, + {-1}, + + {pool_offset(1829), 587}, + {-1}, {-1}, + + {pool_offset(1832), 350}, + + {pool_offset(1833), 123}, + {-1}, {-1}, + + {pool_offset(1836), 99}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1841), 85}, + + {pool_offset(1842), 6}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1847), 413}, + {-1}, {-1}, + + {pool_offset(1850), 609}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1859), 99}, + {-1}, {-1}, {-1}, + + {pool_offset(1863), 514}, + {-1}, {-1}, + + {pool_offset(1866), 324}, + {-1}, {-1}, + + {pool_offset(1869), 88}, + + {pool_offset(1870), 103}, + {-1}, {-1}, {-1}, + + {pool_offset(1874), 532}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1880), 177}, + + {pool_offset(1881), 590}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1889), 543}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1895), 246}, + + {pool_offset(1896), 388}, + + {pool_offset(1897), 32}, + {-1}, + + {pool_offset(1899), 465}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1907), 236}, + {-1}, + + {pool_offset(1909), 329}, + {-1}, {-1}, {-1}, + + {pool_offset(1913), 397}, + {-1}, + + {pool_offset(1915), 158}, + {-1}, + + {pool_offset(1917), 318}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1922), 506}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1930), 160}, + {-1}, {-1}, + + {pool_offset(1933), 309}, + + {pool_offset(1934), 375}, + {-1}, + + {pool_offset(1936), 407}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1941), 160}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1946), 567}, + {-1}, + + {pool_offset(1948), 193}, + {-1}, + + {pool_offset(1950), 212}, + + {pool_offset(1951), 236}, + {-1}, + + {pool_offset(1953), 144}, + + {pool_offset(1954), 196}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1962), 9}, + {-1}, + + {pool_offset(1964), 367}, + + {pool_offset(1965), 23}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1972), 311}, + {-1}, + + {pool_offset(1974), 428}, + {-1}, {-1}, + + {pool_offset(1977), 573}, + {-1}, {-1}, + + {pool_offset(1980), 48}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1986), 35}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(1992), 276}, + {-1}, + + {pool_offset(1994), 580}, + + {pool_offset(1995), 245}, + + {pool_offset(1996), 66}, + {-1}, {-1}, {-1}, + + {pool_offset(2000), 576}, + {-1}, {-1}, {-1}, + + {pool_offset(2004), 389}, + {-1}, + + {pool_offset(2006), 148}, + {-1}, {-1}, + + {pool_offset(2009), 148}, + {-1}, {-1}, {-1}, + + {pool_offset(2013), 238}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2018), 381}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2024), 285}, + {-1}, {-1}, + + {pool_offset(2027), 343}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(2049), 235}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2055), 606}, + {-1}, {-1}, + + {pool_offset(2058), 12}, + + {pool_offset(2059), 35}, + {-1}, + + {pool_offset(2061), 192}, + {-1}, {-1}, {-1}, + + {pool_offset(2065), 412}, + + {pool_offset(2066), 220}, + + {pool_offset(2067), 100}, + {-1}, {-1}, {-1}, + + {pool_offset(2071), 66}, + {-1}, + + {pool_offset(2073), 186}, + {-1}, {-1}, {-1}, + + {pool_offset(2077), 584}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2085), 533}, + + {pool_offset(2086), 623}, + + {pool_offset(2087), 177}, + {-1}, {-1}, + + {pool_offset(2090), 501}, + {-1}, + + {pool_offset(2092), 105}, + {-1}, {-1}, + + {pool_offset(2095), 40}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2101), 195}, + {-1}, {-1}, + + {pool_offset(2104), 100}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2110), 272}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2120), 173}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2129), 286}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2136), 383}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2161), 622}, + {-1}, + + {pool_offset(2163), 588}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2169), 15}, + + {pool_offset(2170), 247}, + {-1}, + + {pool_offset(2172), 59}, + + {pool_offset(2173), 574}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2180), 462}, + {-1}, {-1}, + + {pool_offset(2183), 199}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(2195), 217}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2201), 5}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2206), 1}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2211), 140}, + {-1}, {-1}, {-1}, + + {pool_offset(2215), 141}, + {-1}, {-1}, + + {pool_offset(2218), 257}, + + {pool_offset(2219), 190}, + {-1}, + + {pool_offset(2221), 351}, + + {pool_offset(2222), 414}, + {-1}, {-1}, {-1}, + + {pool_offset(2226), 58}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2234), 164}, + + {pool_offset(2235), 37}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2241), 480}, + {-1}, {-1}, + + {pool_offset(2244), 50}, + + {pool_offset(2245), 182}, + {-1}, + + {pool_offset(2247), 36}, + + {pool_offset(2248), 204}, + + {pool_offset(2249), 331}, + + {pool_offset(2250), 257}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2260), 54}, + {-1}, {-1}, + + {pool_offset(2263), 277}, + {-1}, {-1}, {-1}, + + {pool_offset(2267), 416}, + + {pool_offset(2268), 219}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2275), 254}, + {-1}, + + {pool_offset(2277), 327}, + {-1}, {-1}, + + {pool_offset(2280), 42}, + + {pool_offset(2281), 628}, + {-1}, + + {pool_offset(2283), 106}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(2303), 251}, + {-1}, {-1}, + + {pool_offset(2306), 426}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2313), 348}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(2352), 201}, + {-1}, {-1}, {-1}, + + {pool_offset(2356), 92}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2361), 189}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2367), 92}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2372), 259}, + {-1}, + + {pool_offset(2374), 259}, + {-1}, {-1}, + + {pool_offset(2377), 262}, + {-1}, {-1}, + + {pool_offset(2380), 523}, + {-1}, {-1}, + + {pool_offset(2383), 296}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2389), 469}, + {-1}, {-1}, {-1}, + + {pool_offset(2393), 365}, + {-1}, {-1}, + + {pool_offset(2396), 289}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2419), 62}, + {-1}, {-1}, {-1}, + + {pool_offset(2423), 251}, + {-1}, {-1}, {-1}, + + {pool_offset(2427), 340}, + + {pool_offset(2428), 433}, + {-1}, {-1}, + + {pool_offset(2431), 583}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(2451), 152}, + + {pool_offset(2452), 572}, + {-1}, {-1}, {-1}, + + {pool_offset(2456), 152}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2461), 359}, + {-1}, {-1}, + + {pool_offset(2464), 613}, + {-1}, {-1}, {-1}, + + {pool_offset(2468), 269}, + + {pool_offset(2469), 80}, + {-1}, + + {pool_offset(2471), 211}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2478), 98}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(2489), 256}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2507), 197}, + {-1}, {-1}, {-1}, + + {pool_offset(2511), 196}, + + {pool_offset(2512), 534}, + {-1}, {-1}, {-1}, + + {pool_offset(2516), 135}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2523), 198}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2532), 394}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2546), 619}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2552), 386}, + {-1}, + + {pool_offset(2554), 334}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2561), 347}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2566), 421}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2571), 82}, + + {pool_offset(2572), 312}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2579), 615}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2585), 201}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2591), 36}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2596), 464}, + + {pool_offset(2597), 24}, + {-1}, {-1}, {-1}, + + {pool_offset(2601), 268}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2610), 535}, + {-1}, {-1}, + + {pool_offset(2613), 597}, + {-1}, {-1}, {-1}, + + {pool_offset(2617), 268}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(2638), 291}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2648), 175}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2662), 507}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2667), 262}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2684), 205}, + {-1}, {-1}, + + {pool_offset(2687), 183}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2695), 447}, + {-1}, + + {pool_offset(2697), 219}, + + {pool_offset(2698), 70}, + {-1}, + + {pool_offset(2700), 81}, + + {pool_offset(2701), 431}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2719), 208}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2727), 24}, + {-1}, + + {pool_offset(2729), 82}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2734), 51}, + {-1}, {-1}, + + {pool_offset(2737), 357}, + {-1}, {-1}, {-1}, + + {pool_offset(2741), 446}, + + {pool_offset(2742), 313}, + {-1}, + + {pool_offset(2744), 70}, + + {pool_offset(2745), 244}, + + {pool_offset(2746), 364}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2751), 356}, + {-1}, + + {pool_offset(2753), 249}, + {-1}, + + {pool_offset(2755), 200}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2761), 278}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2769), 181}, + + {pool_offset(2770), 391}, + {-1}, + + {pool_offset(2772), 242}, + {-1}, {-1}, + + {pool_offset(2775), 345}, + {-1}, {-1}, {-1}, + + {pool_offset(2779), 63}, + + {pool_offset(2780), 441}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2787), 78}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2815), 358}, + {-1}, {-1}, {-1}, + + {pool_offset(2819), 625}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2824), 288}, + {-1}, + + {pool_offset(2826), 8}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2835), 183}, + {-1}, {-1}, + + {pool_offset(2838), 250}, + {-1}, + + {pool_offset(2840), 166}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2845), 208}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2852), 341}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2857), 278}, + {-1}, {-1}, + + {pool_offset(2860), 498}, + {-1}, + + {pool_offset(2862), 279}, + {-1}, {-1}, + + {pool_offset(2865), 354}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2870), 48}, + + {pool_offset(2871), 234}, + + {pool_offset(2872), 390}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2879), 118}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2896), 145}, + {-1}, + + {pool_offset(2898), 188}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2903), 150}, + + {pool_offset(2904), 486}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2914), 150}, + + {pool_offset(2915), 254}, + {-1}, + + {pool_offset(2917), 206}, + {-1}, {-1}, + + {pool_offset(2920), 271}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2925), 142}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2930), 50}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(2943), 79}, + {-1}, + + {pool_offset(2945), 79}, + + {pool_offset(2946), 456}, + {-1}, {-1}, + + {pool_offset(2949), 596}, + {-1}, {-1}, + + {pool_offset(2952), 423}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2959), 118}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2966), 97}, + {-1}, {-1}, {-1}, + + {pool_offset(2970), 366}, + {-1}, {-1}, + + {pool_offset(2973), 337}, + {-1}, + + {pool_offset(2975), 444}, + {-1}, {-1}, + + {pool_offset(2978), 258}, + + {pool_offset(2979), 267}, + {-1}, + + {pool_offset(2981), 280}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2987), 315}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2992), 288}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(2997), 564}, + {-1}, + + {pool_offset(2999), 540}, + {-1}, {-1}, + + {pool_offset(3002), 128}, + + {pool_offset(3003), 557}, + + {pool_offset(3004), 336}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3011), 126}, + {-1}, {-1}, + + {pool_offset(3014), 191}, + {-1}, {-1}, + + {pool_offset(3017), 400}, + {-1}, {-1}, + + {pool_offset(3020), 103}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3025), 425}, + {-1}, + + {pool_offset(3027), 194}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3035), 184}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3050), 415}, + + {pool_offset(3051), 243}, + + {pool_offset(3052), 175}, + + {pool_offset(3053), 81}, + + {pool_offset(3054), 202}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(3065), 210}, + {-1}, {-1}, + + {pool_offset(3068), 614}, + {-1}, + + {pool_offset(3070), 207}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3084), 250}, + {-1}, + + {pool_offset(3086), 454}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(3097), 566}, + + {pool_offset(3098), 598}, + {-1}, + + {pool_offset(3100), 44}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3105), 406}, + {-1}, + + {pool_offset(3107), 554}, + {-1}, {-1}, {-1}, + + {pool_offset(3111), 218}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3130), 49}, + {-1}, {-1}, + + {pool_offset(3133), 184}, + {-1}, {-1}, + + {pool_offset(3136), 369}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3143), 437}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(3156), 448}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3162), 179}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3169), 260}, + {-1}, + + {pool_offset(3171), 4}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3186), 51}, + {-1}, {-1}, + + {pool_offset(3189), 218}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3196), 494}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3205), 225}, + {-1}, + + {pool_offset(3207), 229}, + + {pool_offset(3208), 174}, + {-1}, + + {pool_offset(3210), 178}, + {-1}, + + {pool_offset(3212), 0}, + + {pool_offset(3213), 61}, + {-1}, {-1}, {-1}, + + {pool_offset(3217), 174}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3223), 363}, + {-1}, + + {pool_offset(3225), 62}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3243), 271}, + + {pool_offset(3244), 186}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3252), 450}, + {-1}, {-1}, {-1}, + + {pool_offset(3256), 585}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3266), 263}, + {-1}, {-1}, {-1}, + + {pool_offset(3270), 304}, + {-1}, + + {pool_offset(3272), 263}, + + {pool_offset(3273), 264}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(3284), 237}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3292), 380}, + + {pool_offset(3293), 601}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3318), 185}, + {-1}, + + {pool_offset(3320), 267}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3335), 108}, + {-1}, {-1}, {-1}, + + {pool_offset(3339), 451}, + {-1}, {-1}, {-1}, + + {pool_offset(3343), 109}, + {-1}, + + {pool_offset(3345), 260}, + {-1}, {-1}, {-1}, + + {pool_offset(3349), 253}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3354), 60}, + + {pool_offset(3355), 83}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3362), 207}, + + {pool_offset(3363), 239}, + {-1}, + + {pool_offset(3365), 178}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3375), 255}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3384), 49}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(3395), 129}, + {-1}, {-1}, + + {pool_offset(3398), 73}, + {-1}, {-1}, + + {pool_offset(3401), 261}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3410), 610}, + {-1}, + + {pool_offset(3412), 47}, + {-1}, {-1}, {-1}, + + {pool_offset(3416), 280}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3421), 20}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(3432), 384}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(3445), 203}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3452), 189}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(3463), 101}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3473), 65}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(3485), 273}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(3497), 191}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(3510), 168}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3516), 124}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3532), 474}, + {-1}, {-1}, {-1}, + + {pool_offset(3536), 310}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(3566), 529}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(3578), 73}, + {-1}, {-1}, + + {pool_offset(3581), 74}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3606), 222}, + {-1}, {-1}, {-1}, + + {pool_offset(3610), 74}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(3623), 231}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(3635), 270}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3641), 608}, + {-1}, {-1}, {-1}, + + {pool_offset(3645), 558}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3661), 442}, + {-1}, + + {pool_offset(3663), 258}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(3676), 97}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3703), 411}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3731), 102}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3739), 393}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3762), 67}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(3774), 409}, + {-1}, + + {pool_offset(3776), 440}, + {-1}, {-1}, + + {pool_offset(3779), 67}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3786), 27}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3836), 247}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(3849), 216}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3865), 599}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3870), 438}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3893), 18}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3903), 42}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3926), 478}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3936), 195}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(3985), 452}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3992), 593}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(3999), 80}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4007), 265}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4014), 265}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(4026), 477}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4031), 203}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(4061), 427}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4068), 270}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4083), 76}, + + {pool_offset(4084), 586}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4092), 293}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(4104), 71}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4175), 241}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4190), 102}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4278), 551}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4302), 47}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(4368), 65}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4391), 229}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4398), 69}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4404), 224}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(4425), 301}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4442), 549}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(4455), 550}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4514), 98}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4566), 239}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4617), 64}, + {-1}, {-1}, + + {pool_offset(4620), 10}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4627), 256}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4635), 403}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4653), 626}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + + {pool_offset(4701), 197}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4709), 19}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + + {pool_offset(4731), 274}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4808), 439}, + {-1}, {-1}, {-1}, + + {pool_offset(4812), 266}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4856), 382}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(4876), 266}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(4905), 253}, + {-1}, {-1}, {-1}, + + {pool_offset(4909), 104}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4972), 56}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(4989), 146}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(5035), 261}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(5069), 210}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(5080), 611}, + + {pool_offset(5081), 272}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(5092), 71}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(5163), 374}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(5171), 252}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(5190), 252}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(5237), 401}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(5343), 72}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + + {pool_offset(5453), 185}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(6075), 72}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(6217), 627}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(6900), 101} + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + register unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE) + { + register int o = wordlist[key].name; + if (o >= 0) + { + register const char *s = o + unicode_prop_name_pool; + + if ((((unsigned char)*str ^ (unsigned char)*s) & ~32) == 0 && !gperf_case_strncmp (str, s, len) && s[len] == '\0') + return &wordlist[key]; + } + } + } + return 0; +} + + + +#define UNICODE_PROPERTY_VERSION 160000 +#define UNICODE_EMOJI_VERSION 1600 + +#define PROPERTY_NAME_MAX_SIZE 61 +#define CODE_RANGES_NUM 629 + +#define PROP_INDEX_NEWLINE 0 +#define PROP_INDEX_ALPHA 1 +#define PROP_INDEX_BLANK 2 +#define PROP_INDEX_CNTRL 3 +#define PROP_INDEX_DIGIT 4 +#define PROP_INDEX_GRAPH 5 +#define PROP_INDEX_LOWER 6 +#define PROP_INDEX_PRINT 7 +#define PROP_INDEX_POSIXPUNCT 8 +#define PROP_INDEX_SPACE 9 +#define PROP_INDEX_UPPER 10 +#define PROP_INDEX_XDIGIT 11 +#define PROP_INDEX_WORD 12 +#define PROP_INDEX_ALNUM 13 +#define PROP_INDEX_ASCII 14 +#define PROP_INDEX_ASCIIHEXDIGIT 15 +#define PROP_INDEX_AHEX 15 +#define PROP_INDEX_ADLAM 16 +#define PROP_INDEX_ADLM 16 +#define PROP_INDEX_AHOM 17 +#define PROP_INDEX_ALPHABETIC 18 +#define PROP_INDEX_ANATOLIANHIEROGLYPHS 19 +#define PROP_INDEX_HLUW 19 +#define PROP_INDEX_ANY 20 +#define PROP_INDEX_ARABIC 21 +#define PROP_INDEX_ARAB 21 +#define PROP_INDEX_ARMENIAN 22 +#define PROP_INDEX_ARMN 22 +#define PROP_INDEX_ASSIGNED 23 +#define PROP_INDEX_AVESTAN 24 +#define PROP_INDEX_AVST 24 +#define PROP_INDEX_BALINESE 25 +#define PROP_INDEX_BALI 25 +#define PROP_INDEX_BAMUM 26 +#define PROP_INDEX_BAMU 26 +#define PROP_INDEX_BASSAVAH 27 +#define PROP_INDEX_BASS 27 +#define PROP_INDEX_BATAK 28 +#define PROP_INDEX_BATK 28 +#define PROP_INDEX_BENGALI 29 +#define PROP_INDEX_BENG 29 +#define PROP_INDEX_BHAIKSUKI 30 +#define PROP_INDEX_BHKS 30 +#define PROP_INDEX_BIDICONTROL 31 +#define PROP_INDEX_BIDIC 31 +#define PROP_INDEX_BOPOMOFO 32 +#define PROP_INDEX_BOPO 32 +#define PROP_INDEX_BRAHMI 33 +#define PROP_INDEX_BRAH 33 +#define PROP_INDEX_BRAILLE 34 +#define PROP_INDEX_BRAI 34 +#define PROP_INDEX_BUGINESE 35 +#define PROP_INDEX_BUGI 35 +#define PROP_INDEX_BUHID 36 +#define PROP_INDEX_BUHD 36 +#define PROP_INDEX_C 37 +#define PROP_INDEX_OTHER 37 +#define PROP_INDEX_CANADIANABORIGINAL 38 +#define PROP_INDEX_CANS 38 +#define PROP_INDEX_CARIAN 39 +#define PROP_INDEX_CARI 39 +#define PROP_INDEX_CASEIGNORABLE 40 +#define PROP_INDEX_CI 40 +#define PROP_INDEX_CASED 41 +#define PROP_INDEX_CAUCASIANALBANIAN 42 +#define PROP_INDEX_AGHB 42 +#define PROP_INDEX_CC 43 +#define PROP_INDEX_CONTROL 43 +#define PROP_INDEX_CF 44 +#define PROP_INDEX_FORMAT 44 +#define PROP_INDEX_CHAKMA 45 +#define PROP_INDEX_CAKM 45 +#define PROP_INDEX_CHAM 46 +#define PROP_INDEX_CHANGESWHENCASEFOLDED 47 +#define PROP_INDEX_CWCF 47 +#define PROP_INDEX_CHANGESWHENCASEMAPPED 48 +#define PROP_INDEX_CWCM 48 +#define PROP_INDEX_CHANGESWHENLOWERCASED 49 +#define PROP_INDEX_CWL 49 +#define PROP_INDEX_CHANGESWHENTITLECASED 50 +#define PROP_INDEX_CWT 50 +#define PROP_INDEX_CHANGESWHENUPPERCASED 51 +#define PROP_INDEX_CWU 51 +#define PROP_INDEX_CHEROKEE 52 +#define PROP_INDEX_CHER 52 +#define PROP_INDEX_CHORASMIAN 53 +#define PROP_INDEX_CHRS 53 +#define PROP_INDEX_CN 54 +#define PROP_INDEX_UNASSIGNED 54 +#define PROP_INDEX_CO 55 +#define PROP_INDEX_PRIVATEUSE 55 +#define PROP_INDEX_COMMON 56 +#define PROP_INDEX_ZYYY 56 +#define PROP_INDEX_COPTIC 57 +#define PROP_INDEX_COPT 57 +#define PROP_INDEX_QAAC 57 +#define PROP_INDEX_CS 58 +#define PROP_INDEX_SURROGATE 58 +#define PROP_INDEX_CUNEIFORM 59 +#define PROP_INDEX_XSUX 59 +#define PROP_INDEX_CYPRIOT 60 +#define PROP_INDEX_CPRT 60 +#define PROP_INDEX_CYPROMINOAN 61 +#define PROP_INDEX_CPMN 61 +#define PROP_INDEX_CYRILLIC 62 +#define PROP_INDEX_CYRL 62 +#define PROP_INDEX_DASH 63 +#define PROP_INDEX_DEFAULTIGNORABLECODEPOINT 64 +#define PROP_INDEX_DI 64 +#define PROP_INDEX_DEPRECATED 65 +#define PROP_INDEX_DEP 65 +#define PROP_INDEX_DESERET 66 +#define PROP_INDEX_DSRT 66 +#define PROP_INDEX_DEVANAGARI 67 +#define PROP_INDEX_DEVA 67 +#define PROP_INDEX_DIACRITIC 68 +#define PROP_INDEX_DIA 68 +#define PROP_INDEX_DIVESAKURU 69 +#define PROP_INDEX_DIAK 69 +#define PROP_INDEX_DOGRA 70 +#define PROP_INDEX_DOGR 70 +#define PROP_INDEX_DUPLOYAN 71 +#define PROP_INDEX_DUPL 71 +#define PROP_INDEX_EGYPTIANHIEROGLYPHS 72 +#define PROP_INDEX_EGYP 72 +#define PROP_INDEX_ELBASAN 73 +#define PROP_INDEX_ELBA 73 +#define PROP_INDEX_ELYMAIC 74 +#define PROP_INDEX_ELYM 74 +#define PROP_INDEX_EMOJI 75 +#define PROP_INDEX_EMOJICOMPONENT 76 +#define PROP_INDEX_ECOMP 76 +#define PROP_INDEX_EMOJIMODIFIER 77 +#define PROP_INDEX_EMOD 77 +#define PROP_INDEX_EMOJIMODIFIERBASE 78 +#define PROP_INDEX_EBASE 78 +#define PROP_INDEX_EMOJIPRESENTATION 79 +#define PROP_INDEX_EPRES 79 +#define PROP_INDEX_ETHIOPIC 80 +#define PROP_INDEX_ETHI 80 +#define PROP_INDEX_EXTENDEDPICTOGRAPHIC 81 +#define PROP_INDEX_EXTPICT 81 +#define PROP_INDEX_EXTENDER 82 +#define PROP_INDEX_EXT 82 +#define PROP_INDEX_GARAY 83 +#define PROP_INDEX_GARA 83 +#define PROP_INDEX_GEORGIAN 84 +#define PROP_INDEX_GEOR 84 +#define PROP_INDEX_GLAGOLITIC 85 +#define PROP_INDEX_GLAG 85 +#define PROP_INDEX_GOTHIC 86 +#define PROP_INDEX_GOTH 86 +#define PROP_INDEX_GRANTHA 87 +#define PROP_INDEX_GRAN 87 +#define PROP_INDEX_GRAPHEMEBASE 88 +#define PROP_INDEX_GRBASE 88 +#define PROP_INDEX_GRAPHEMEEXTEND 89 +#define PROP_INDEX_GREXT 89 +#define PROP_INDEX_GRAPHEMELINK 90 +#define PROP_INDEX_GRLINK 90 +#define PROP_INDEX_GREEK 91 +#define PROP_INDEX_GREK 91 +#define PROP_INDEX_GUJARATI 92 +#define PROP_INDEX_GUJR 92 +#define PROP_INDEX_GUNJALAGONDI 93 +#define PROP_INDEX_GONG 93 +#define PROP_INDEX_GURMUKHI 94 +#define PROP_INDEX_GURU 94 +#define PROP_INDEX_GURUNGKHEMA 95 +#define PROP_INDEX_GUKH 95 +#define PROP_INDEX_HAN 96 +#define PROP_INDEX_HANI 96 +#define PROP_INDEX_HANGUL 97 +#define PROP_INDEX_HANG 97 +#define PROP_INDEX_HANIFIROHINGYA 98 +#define PROP_INDEX_ROHG 98 +#define PROP_INDEX_HANUNOO 99 +#define PROP_INDEX_HANO 99 +#define PROP_INDEX_HATRAN 100 +#define PROP_INDEX_HATR 100 +#define PROP_INDEX_HEBREW 101 +#define PROP_INDEX_HEBR 101 +#define PROP_INDEX_HEXDIGIT 102 +#define PROP_INDEX_HEX 102 +#define PROP_INDEX_HIRAGANA 103 +#define PROP_INDEX_HIRA 103 +#define PROP_INDEX_HYPHEN 104 +#define PROP_INDEX_IDSBINARYOPERATOR 105 +#define PROP_INDEX_IDSB 105 +#define PROP_INDEX_IDSTRINARYOPERATOR 106 +#define PROP_INDEX_IDST 106 +#define PROP_INDEX_IDSUNARYOPERATOR 107 +#define PROP_INDEX_IDSU 107 +#define PROP_INDEX_IDCOMPATMATHCONTINUE 108 +#define PROP_INDEX_IDCOMPATMATHSTART 109 +#define PROP_INDEX_IDCONTINUE 110 +#define PROP_INDEX_IDC 110 +#define PROP_INDEX_IDSTART 111 +#define PROP_INDEX_IDS 111 +#define PROP_INDEX_IDEOGRAPHIC 112 +#define PROP_INDEX_IDEO 112 +#define PROP_INDEX_IMPERIALARAMAIC 113 +#define PROP_INDEX_ARMI 113 +#define PROP_INDEX_INCB 114 +#define PROP_INDEX_INHERITED 115 +#define PROP_INDEX_QAAI 115 +#define PROP_INDEX_ZINH 115 +#define PROP_INDEX_INSCRIPTIONALPAHLAVI 116 +#define PROP_INDEX_PHLI 116 +#define PROP_INDEX_INSCRIPTIONALPARTHIAN 117 +#define PROP_INDEX_PRTI 117 +#define PROP_INDEX_JAVANESE 118 +#define PROP_INDEX_JAVA 118 +#define PROP_INDEX_JOINCONTROL 119 +#define PROP_INDEX_JOINC 119 +#define PROP_INDEX_KAITHI 120 +#define PROP_INDEX_KTHI 120 +#define PROP_INDEX_KANNADA 121 +#define PROP_INDEX_KNDA 121 +#define PROP_INDEX_KATAKANA 122 +#define PROP_INDEX_KANA 122 +#define PROP_INDEX_KAWI 123 +#define PROP_INDEX_KAYAHLI 124 +#define PROP_INDEX_KALI 124 +#define PROP_INDEX_KHAROSHTHI 125 +#define PROP_INDEX_KHAR 125 +#define PROP_INDEX_KHITANSMALLSCRIPT 126 +#define PROP_INDEX_KITS 126 +#define PROP_INDEX_KHMER 127 +#define PROP_INDEX_KHMR 127 +#define PROP_INDEX_KHOJKI 128 +#define PROP_INDEX_KHOJ 128 +#define PROP_INDEX_KHUDAWADI 129 +#define PROP_INDEX_SIND 129 +#define PROP_INDEX_KIRATRAI 130 +#define PROP_INDEX_KRAI 130 +#define PROP_INDEX_L 131 +#define PROP_INDEX_LETTER 131 +#define PROP_INDEX_LC 132 +#define PROP_INDEX_CASEDLETTER 132 +#define PROP_INDEX_LAO 133 +#define PROP_INDEX_LAOO 133 +#define PROP_INDEX_LATIN 134 +#define PROP_INDEX_LATN 134 +#define PROP_INDEX_LEPCHA 135 +#define PROP_INDEX_LEPC 135 +#define PROP_INDEX_LIMBU 136 +#define PROP_INDEX_LIMB 136 +#define PROP_INDEX_LINEARA 137 +#define PROP_INDEX_LINA 137 +#define PROP_INDEX_LINEARB 138 +#define PROP_INDEX_LINB 138 +#define PROP_INDEX_LISU 139 +#define PROP_INDEX_LL 140 +#define PROP_INDEX_LOWERCASELETTER 140 +#define PROP_INDEX_LM 141 +#define PROP_INDEX_MODIFIERLETTER 141 +#define PROP_INDEX_LO 142 +#define PROP_INDEX_OTHERLETTER 142 +#define PROP_INDEX_LOGICALORDEREXCEPTION 143 +#define PROP_INDEX_LOE 143 +#define PROP_INDEX_LOWERCASE 144 +#define PROP_INDEX_LT 145 +#define PROP_INDEX_TITLECASELETTER 145 +#define PROP_INDEX_LU 146 +#define PROP_INDEX_UPPERCASELETTER 146 +#define PROP_INDEX_LYCIAN 147 +#define PROP_INDEX_LYCI 147 +#define PROP_INDEX_LYDIAN 148 +#define PROP_INDEX_LYDI 148 +#define PROP_INDEX_M 149 +#define PROP_INDEX_COMBININGMARK 149 +#define PROP_INDEX_MARK 149 +#define PROP_INDEX_MAHAJANI 150 +#define PROP_INDEX_MAHJ 150 +#define PROP_INDEX_MAKASAR 151 +#define PROP_INDEX_MAKA 151 +#define PROP_INDEX_MALAYALAM 152 +#define PROP_INDEX_MLYM 152 +#define PROP_INDEX_MANDAIC 153 +#define PROP_INDEX_MAND 153 +#define PROP_INDEX_MANICHAEAN 154 +#define PROP_INDEX_MANI 154 +#define PROP_INDEX_MARCHEN 155 +#define PROP_INDEX_MARC 155 +#define PROP_INDEX_MASARAMGONDI 156 +#define PROP_INDEX_GONM 156 +#define PROP_INDEX_MATH 157 +#define PROP_INDEX_MC 158 +#define PROP_INDEX_SPACINGMARK 158 +#define PROP_INDEX_ME 159 +#define PROP_INDEX_ENCLOSINGMARK 159 +#define PROP_INDEX_MEDEFAIDRIN 160 +#define PROP_INDEX_MEDF 160 +#define PROP_INDEX_MEETEIMAYEK 161 +#define PROP_INDEX_MTEI 161 +#define PROP_INDEX_MENDEKIKAKUI 162 +#define PROP_INDEX_MEND 162 +#define PROP_INDEX_MEROITICCURSIVE 163 +#define PROP_INDEX_MERC 163 +#define PROP_INDEX_MEROITICHIEROGLYPHS 164 +#define PROP_INDEX_MERO 164 +#define PROP_INDEX_MIAO 165 +#define PROP_INDEX_PLRD 165 +#define PROP_INDEX_MN 166 +#define PROP_INDEX_NONSPACINGMARK 166 +#define PROP_INDEX_MODI 167 +#define PROP_INDEX_MODIFIERCOMBININGMARK 168 +#define PROP_INDEX_MCM 168 +#define PROP_INDEX_MONGOLIAN 169 +#define PROP_INDEX_MONG 169 +#define PROP_INDEX_MRO 170 +#define PROP_INDEX_MROO 170 +#define PROP_INDEX_MULTANI 171 +#define PROP_INDEX_MULT 171 +#define PROP_INDEX_MYANMAR 172 +#define PROP_INDEX_MYMR 172 +#define PROP_INDEX_N 173 +#define PROP_INDEX_NUMBER 173 +#define PROP_INDEX_NABATAEAN 174 +#define PROP_INDEX_NBAT 174 +#define PROP_INDEX_NAGMUNDARI 175 +#define PROP_INDEX_NAGM 175 +#define PROP_INDEX_NANDINAGARI 176 +#define PROP_INDEX_NAND 176 +#define PROP_INDEX_ND 177 +#define PROP_INDEX_DECIMALNUMBER 177 +#define PROP_INDEX_NEWTAILUE 178 +#define PROP_INDEX_TALU 178 +#define PROP_INDEX_NEWA 179 +#define PROP_INDEX_NKO 180 +#define PROP_INDEX_NKOO 180 +#define PROP_INDEX_NL 181 +#define PROP_INDEX_LETTERNUMBER 181 +#define PROP_INDEX_NO 182 +#define PROP_INDEX_OTHERNUMBER 182 +#define PROP_INDEX_NONCHARACTERCODEPOINT 183 +#define PROP_INDEX_NCHAR 183 +#define PROP_INDEX_NUSHU 184 +#define PROP_INDEX_NSHU 184 +#define PROP_INDEX_NYIAKENGPUACHUEHMONG 185 +#define PROP_INDEX_HMNP 185 +#define PROP_INDEX_OGHAM 186 +#define PROP_INDEX_OGAM 186 +#define PROP_INDEX_OLCHIKI 187 +#define PROP_INDEX_OLCK 187 +#define PROP_INDEX_OLONAL 188 +#define PROP_INDEX_ONAO 188 +#define PROP_INDEX_OLDHUNGARIAN 189 +#define PROP_INDEX_HUNG 189 +#define PROP_INDEX_OLDITALIC 190 +#define PROP_INDEX_ITAL 190 +#define PROP_INDEX_OLDNORTHARABIAN 191 +#define PROP_INDEX_NARB 191 +#define PROP_INDEX_OLDPERMIC 192 +#define PROP_INDEX_PERM 192 +#define PROP_INDEX_OLDPERSIAN 193 +#define PROP_INDEX_XPEO 193 +#define PROP_INDEX_OLDSOGDIAN 194 +#define PROP_INDEX_SOGO 194 +#define PROP_INDEX_OLDSOUTHARABIAN 195 +#define PROP_INDEX_SARB 195 +#define PROP_INDEX_OLDTURKIC 196 +#define PROP_INDEX_ORKH 196 +#define PROP_INDEX_OLDUYGHUR 197 +#define PROP_INDEX_OUGR 197 +#define PROP_INDEX_ORIYA 198 +#define PROP_INDEX_ORYA 198 +#define PROP_INDEX_OSAGE 199 +#define PROP_INDEX_OSGE 199 +#define PROP_INDEX_OSMANYA 200 +#define PROP_INDEX_OSMA 200 +#define PROP_INDEX_OTHERALPHABETIC 201 +#define PROP_INDEX_OALPHA 201 +#define PROP_INDEX_OTHERDEFAULTIGNORABLECODEPOINT 202 +#define PROP_INDEX_ODI 202 +#define PROP_INDEX_OTHERGRAPHEMEEXTEND 203 +#define PROP_INDEX_OGREXT 203 +#define PROP_INDEX_OTHERIDCONTINUE 204 +#define PROP_INDEX_OIDC 204 +#define PROP_INDEX_OTHERIDSTART 205 +#define PROP_INDEX_OIDS 205 +#define PROP_INDEX_OTHERLOWERCASE 206 +#define PROP_INDEX_OLOWER 206 +#define PROP_INDEX_OTHERMATH 207 +#define PROP_INDEX_OMATH 207 +#define PROP_INDEX_OTHERUPPERCASE 208 +#define PROP_INDEX_OUPPER 208 +#define PROP_INDEX_P 209 +#define PROP_INDEX_PUNCT 209 +#define PROP_INDEX_PUNCTUATION 209 +#define PROP_INDEX_PAHAWHHMONG 210 +#define PROP_INDEX_HMNG 210 +#define PROP_INDEX_PALMYRENE 211 +#define PROP_INDEX_PALM 211 +#define PROP_INDEX_PATTERNSYNTAX 212 +#define PROP_INDEX_PATSYN 212 +#define PROP_INDEX_PATTERNWHITESPACE 213 +#define PROP_INDEX_PATWS 213 +#define PROP_INDEX_PAUCINHAU 214 +#define PROP_INDEX_PAUC 214 +#define PROP_INDEX_PC 215 +#define PROP_INDEX_CONNECTORPUNCTUATION 215 +#define PROP_INDEX_PD 216 +#define PROP_INDEX_DASHPUNCTUATION 216 +#define PROP_INDEX_PE 217 +#define PROP_INDEX_CLOSEPUNCTUATION 217 +#define PROP_INDEX_PF 218 +#define PROP_INDEX_FINALPUNCTUATION 218 +#define PROP_INDEX_PHAGSPA 219 +#define PROP_INDEX_PHAG 219 +#define PROP_INDEX_PHOENICIAN 220 +#define PROP_INDEX_PHNX 220 +#define PROP_INDEX_PI 221 +#define PROP_INDEX_INITIALPUNCTUATION 221 +#define PROP_INDEX_PO 222 +#define PROP_INDEX_OTHERPUNCTUATION 222 +#define PROP_INDEX_PREPENDEDCONCATENATIONMARK 223 +#define PROP_INDEX_PCM 223 +#define PROP_INDEX_PS 224 +#define PROP_INDEX_OPENPUNCTUATION 224 +#define PROP_INDEX_PSALTERPAHLAVI 225 +#define PROP_INDEX_PHLP 225 +#define PROP_INDEX_QUOTATIONMARK 226 +#define PROP_INDEX_QMARK 226 +#define PROP_INDEX_RADICAL 227 +#define PROP_INDEX_REGIONALINDICATOR 228 +#define PROP_INDEX_RI 228 +#define PROP_INDEX_REJANG 229 +#define PROP_INDEX_RJNG 229 +#define PROP_INDEX_RUNIC 230 +#define PROP_INDEX_RUNR 230 +#define PROP_INDEX_S 231 +#define PROP_INDEX_SYMBOL 231 +#define PROP_INDEX_SAMARITAN 232 +#define PROP_INDEX_SAMR 232 +#define PROP_INDEX_SAURASHTRA 233 +#define PROP_INDEX_SAUR 233 +#define PROP_INDEX_SC 234 +#define PROP_INDEX_CURRENCYSYMBOL 234 +#define PROP_INDEX_SENTENCETERMINAL 235 +#define PROP_INDEX_STERM 235 +#define PROP_INDEX_SHARADA 236 +#define PROP_INDEX_SHRD 236 +#define PROP_INDEX_SHAVIAN 237 +#define PROP_INDEX_SHAW 237 +#define PROP_INDEX_SIDDHAM 238 +#define PROP_INDEX_SIDD 238 +#define PROP_INDEX_SIGNWRITING 239 +#define PROP_INDEX_SGNW 239 +#define PROP_INDEX_SINHALA 240 +#define PROP_INDEX_SINH 240 +#define PROP_INDEX_SK 241 +#define PROP_INDEX_MODIFIERSYMBOL 241 +#define PROP_INDEX_SM 242 +#define PROP_INDEX_MATHSYMBOL 242 +#define PROP_INDEX_SO 243 +#define PROP_INDEX_OTHERSYMBOL 243 +#define PROP_INDEX_SOFTDOTTED 244 +#define PROP_INDEX_SD 244 +#define PROP_INDEX_SOGDIAN 245 +#define PROP_INDEX_SOGD 245 +#define PROP_INDEX_SORASOMPENG 246 +#define PROP_INDEX_SORA 246 +#define PROP_INDEX_SOYOMBO 247 +#define PROP_INDEX_SOYO 247 +#define PROP_INDEX_SUNDANESE 248 +#define PROP_INDEX_SUND 248 +#define PROP_INDEX_SUNUWAR 249 +#define PROP_INDEX_SUNU 249 +#define PROP_INDEX_SYLOTINAGRI 250 +#define PROP_INDEX_SYLO 250 +#define PROP_INDEX_SYRIAC 251 +#define PROP_INDEX_SYRC 251 +#define PROP_INDEX_TAGALOG 252 +#define PROP_INDEX_TGLG 252 +#define PROP_INDEX_TAGBANWA 253 +#define PROP_INDEX_TAGB 253 +#define PROP_INDEX_TAILE 254 +#define PROP_INDEX_TALE 254 +#define PROP_INDEX_TAITHAM 255 +#define PROP_INDEX_LANA 255 +#define PROP_INDEX_TAIVIET 256 +#define PROP_INDEX_TAVT 256 +#define PROP_INDEX_TAKRI 257 +#define PROP_INDEX_TAKR 257 +#define PROP_INDEX_TAMIL 258 +#define PROP_INDEX_TAML 258 +#define PROP_INDEX_TANGSA 259 +#define PROP_INDEX_TNSA 259 +#define PROP_INDEX_TANGUT 260 +#define PROP_INDEX_TANG 260 +#define PROP_INDEX_TELUGU 261 +#define PROP_INDEX_TELU 261 +#define PROP_INDEX_TERMINALPUNCTUATION 262 +#define PROP_INDEX_TERM 262 +#define PROP_INDEX_THAANA 263 +#define PROP_INDEX_THAA 263 +#define PROP_INDEX_THAI 264 +#define PROP_INDEX_TIBETAN 265 +#define PROP_INDEX_TIBT 265 +#define PROP_INDEX_TIFINAGH 266 +#define PROP_INDEX_TFNG 266 +#define PROP_INDEX_TIRHUTA 267 +#define PROP_INDEX_TIRH 267 +#define PROP_INDEX_TODHRI 268 +#define PROP_INDEX_TODR 268 +#define PROP_INDEX_TOTO 269 +#define PROP_INDEX_TULUTIGALARI 270 +#define PROP_INDEX_TUTG 270 +#define PROP_INDEX_UGARITIC 271 +#define PROP_INDEX_UGAR 271 +#define PROP_INDEX_UNIFIEDIDEOGRAPH 272 +#define PROP_INDEX_UIDEO 272 +#define PROP_INDEX_UNKNOWN 273 +#define PROP_INDEX_ZZZZ 273 +#define PROP_INDEX_UPPERCASE 274 +#define PROP_INDEX_VAI 275 +#define PROP_INDEX_VAII 275 +#define PROP_INDEX_VARIATIONSELECTOR 276 +#define PROP_INDEX_VS 276 +#define PROP_INDEX_VITHKUQI 277 +#define PROP_INDEX_VITH 277 +#define PROP_INDEX_WANCHO 278 +#define PROP_INDEX_WCHO 278 +#define PROP_INDEX_WARANGCITI 279 +#define PROP_INDEX_WARA 279 +#define PROP_INDEX_WHITESPACE 280 +#define PROP_INDEX_WSPACE 280 +#define PROP_INDEX_XIDCONTINUE 281 +#define PROP_INDEX_XIDC 281 +#define PROP_INDEX_XIDSTART 282 +#define PROP_INDEX_XIDS 282 +#define PROP_INDEX_YEZIDI 283 +#define PROP_INDEX_YEZI 283 +#define PROP_INDEX_YI 284 +#define PROP_INDEX_YIII 284 +#define PROP_INDEX_Z 285 +#define PROP_INDEX_SEPARATOR 285 +#define PROP_INDEX_ZANABAZARSQUARE 286 +#define PROP_INDEX_ZANB 286 +#define PROP_INDEX_ZL 287 +#define PROP_INDEX_LINESEPARATOR 287 +#define PROP_INDEX_ZP 288 +#define PROP_INDEX_PARAGRAPHSEPARATOR 288 +#define PROP_INDEX_ZS 289 +#define PROP_INDEX_SPACESEPARATOR 289 +#define PROP_INDEX_INBASICLATIN 290 +#define PROP_INDEX_INLATIN1SUPPLEMENT 291 +#define PROP_INDEX_INLATINEXTENDEDA 292 +#define PROP_INDEX_INLATINEXTENDEDB 293 +#define PROP_INDEX_INIPAEXTENSIONS 294 +#define PROP_INDEX_INSPACINGMODIFIERLETTERS 295 +#define PROP_INDEX_INCOMBININGDIACRITICALMARKS 296 +#define PROP_INDEX_INGREEKANDCOPTIC 297 +#define PROP_INDEX_INCYRILLIC 298 +#define PROP_INDEX_INCYRILLICSUPPLEMENT 299 +#define PROP_INDEX_INARMENIAN 300 +#define PROP_INDEX_INHEBREW 301 +#define PROP_INDEX_INARABIC 302 +#define PROP_INDEX_INSYRIAC 303 +#define PROP_INDEX_INARABICSUPPLEMENT 304 +#define PROP_INDEX_INTHAANA 305 +#define PROP_INDEX_INNKO 306 +#define PROP_INDEX_INSAMARITAN 307 +#define PROP_INDEX_INMANDAIC 308 +#define PROP_INDEX_INSYRIACSUPPLEMENT 309 +#define PROP_INDEX_INARABICEXTENDEDB 310 +#define PROP_INDEX_INARABICEXTENDEDA 311 +#define PROP_INDEX_INDEVANAGARI 312 +#define PROP_INDEX_INBENGALI 313 +#define PROP_INDEX_INGURMUKHI 314 +#define PROP_INDEX_INGUJARATI 315 +#define PROP_INDEX_INORIYA 316 +#define PROP_INDEX_INTAMIL 317 +#define PROP_INDEX_INTELUGU 318 +#define PROP_INDEX_INKANNADA 319 +#define PROP_INDEX_INMALAYALAM 320 +#define PROP_INDEX_INSINHALA 321 +#define PROP_INDEX_INTHAI 322 +#define PROP_INDEX_INLAO 323 +#define PROP_INDEX_INTIBETAN 324 +#define PROP_INDEX_INMYANMAR 325 +#define PROP_INDEX_INGEORGIAN 326 +#define PROP_INDEX_INHANGULJAMO 327 +#define PROP_INDEX_INETHIOPIC 328 +#define PROP_INDEX_INETHIOPICSUPPLEMENT 329 +#define PROP_INDEX_INCHEROKEE 330 +#define PROP_INDEX_INUNIFIEDCANADIANABORIGINALSYLLABICS 331 +#define PROP_INDEX_INOGHAM 332 +#define PROP_INDEX_INRUNIC 333 +#define PROP_INDEX_INTAGALOG 334 +#define PROP_INDEX_INHANUNOO 335 +#define PROP_INDEX_INBUHID 336 +#define PROP_INDEX_INTAGBANWA 337 +#define PROP_INDEX_INKHMER 338 +#define PROP_INDEX_INMONGOLIAN 339 +#define PROP_INDEX_INUNIFIEDCANADIANABORIGINALSYLLABICSEXTENDED 340 +#define PROP_INDEX_INLIMBU 341 +#define PROP_INDEX_INTAILE 342 +#define PROP_INDEX_INNEWTAILUE 343 +#define PROP_INDEX_INKHMERSYMBOLS 344 +#define PROP_INDEX_INBUGINESE 345 +#define PROP_INDEX_INTAITHAM 346 +#define PROP_INDEX_INCOMBININGDIACRITICALMARKSEXTENDED 347 +#define PROP_INDEX_INBALINESE 348 +#define PROP_INDEX_INSUNDANESE 349 +#define PROP_INDEX_INBATAK 350 +#define PROP_INDEX_INLEPCHA 351 +#define PROP_INDEX_INOLCHIKI 352 +#define PROP_INDEX_INCYRILLICEXTENDEDC 353 +#define PROP_INDEX_INGEORGIANEXTENDED 354 +#define PROP_INDEX_INSUNDANESESUPPLEMENT 355 +#define PROP_INDEX_INVEDICEXTENSIONS 356 +#define PROP_INDEX_INPHONETICEXTENSIONS 357 +#define PROP_INDEX_INPHONETICEXTENSIONSSUPPLEMENT 358 +#define PROP_INDEX_INCOMBININGDIACRITICALMARKSSUPPLEMENT 359 +#define PROP_INDEX_INLATINEXTENDEDADDITIONAL 360 +#define PROP_INDEX_INGREEKEXTENDED 361 +#define PROP_INDEX_INGENERALPUNCTUATION 362 +#define PROP_INDEX_INSUPERSCRIPTSANDSUBSCRIPTS 363 +#define PROP_INDEX_INCURRENCYSYMBOLS 364 +#define PROP_INDEX_INCOMBININGDIACRITICALMARKSFORSYMBOLS 365 +#define PROP_INDEX_INLETTERLIKESYMBOLS 366 +#define PROP_INDEX_INNUMBERFORMS 367 +#define PROP_INDEX_INARROWS 368 +#define PROP_INDEX_INMATHEMATICALOPERATORS 369 +#define PROP_INDEX_INMISCELLANEOUSTECHNICAL 370 +#define PROP_INDEX_INCONTROLPICTURES 371 +#define PROP_INDEX_INOPTICALCHARACTERRECOGNITION 372 +#define PROP_INDEX_INENCLOSEDALPHANUMERICS 373 +#define PROP_INDEX_INBOXDRAWING 374 +#define PROP_INDEX_INBLOCKELEMENTS 375 +#define PROP_INDEX_INGEOMETRICSHAPES 376 +#define PROP_INDEX_INMISCELLANEOUSSYMBOLS 377 +#define PROP_INDEX_INDINGBATS 378 +#define PROP_INDEX_INMISCELLANEOUSMATHEMATICALSYMBOLSA 379 +#define PROP_INDEX_INSUPPLEMENTALARROWSA 380 +#define PROP_INDEX_INBRAILLEPATTERNS 381 +#define PROP_INDEX_INSUPPLEMENTALARROWSB 382 +#define PROP_INDEX_INMISCELLANEOUSMATHEMATICALSYMBOLSB 383 +#define PROP_INDEX_INSUPPLEMENTALMATHEMATICALOPERATORS 384 +#define PROP_INDEX_INMISCELLANEOUSSYMBOLSANDARROWS 385 +#define PROP_INDEX_INGLAGOLITIC 386 +#define PROP_INDEX_INLATINEXTENDEDC 387 +#define PROP_INDEX_INCOPTIC 388 +#define PROP_INDEX_INGEORGIANSUPPLEMENT 389 +#define PROP_INDEX_INTIFINAGH 390 +#define PROP_INDEX_INETHIOPICEXTENDED 391 +#define PROP_INDEX_INCYRILLICEXTENDEDA 392 +#define PROP_INDEX_INSUPPLEMENTALPUNCTUATION 393 +#define PROP_INDEX_INCJKRADICALSSUPPLEMENT 394 +#define PROP_INDEX_INKANGXIRADICALS 395 +#define PROP_INDEX_INIDEOGRAPHICDESCRIPTIONCHARACTERS 396 +#define PROP_INDEX_INCJKSYMBOLSANDPUNCTUATION 397 +#define PROP_INDEX_INHIRAGANA 398 +#define PROP_INDEX_INKATAKANA 399 +#define PROP_INDEX_INBOPOMOFO 400 +#define PROP_INDEX_INHANGULCOMPATIBILITYJAMO 401 +#define PROP_INDEX_INKANBUN 402 +#define PROP_INDEX_INBOPOMOFOEXTENDED 403 +#define PROP_INDEX_INCJKSTROKES 404 +#define PROP_INDEX_INKATAKANAPHONETICEXTENSIONS 405 +#define PROP_INDEX_INENCLOSEDCJKLETTERSANDMONTHS 406 +#define PROP_INDEX_INCJKCOMPATIBILITY 407 +#define PROP_INDEX_INCJKUNIFIEDIDEOGRAPHSEXTENSIONA 408 +#define PROP_INDEX_INYIJINGHEXAGRAMSYMBOLS 409 +#define PROP_INDEX_INCJKUNIFIEDIDEOGRAPHS 410 +#define PROP_INDEX_INYISYLLABLES 411 +#define PROP_INDEX_INYIRADICALS 412 +#define PROP_INDEX_INLISU 413 +#define PROP_INDEX_INVAI 414 +#define PROP_INDEX_INCYRILLICEXTENDEDB 415 +#define PROP_INDEX_INBAMUM 416 +#define PROP_INDEX_INMODIFIERTONELETTERS 417 +#define PROP_INDEX_INLATINEXTENDEDD 418 +#define PROP_INDEX_INSYLOTINAGRI 419 +#define PROP_INDEX_INCOMMONINDICNUMBERFORMS 420 +#define PROP_INDEX_INPHAGSPA 421 +#define PROP_INDEX_INSAURASHTRA 422 +#define PROP_INDEX_INDEVANAGARIEXTENDED 423 +#define PROP_INDEX_INKAYAHLI 424 +#define PROP_INDEX_INREJANG 425 +#define PROP_INDEX_INHANGULJAMOEXTENDEDA 426 +#define PROP_INDEX_INJAVANESE 427 +#define PROP_INDEX_INMYANMAREXTENDEDB 428 +#define PROP_INDEX_INCHAM 429 +#define PROP_INDEX_INMYANMAREXTENDEDA 430 +#define PROP_INDEX_INTAIVIET 431 +#define PROP_INDEX_INMEETEIMAYEKEXTENSIONS 432 +#define PROP_INDEX_INETHIOPICEXTENDEDA 433 +#define PROP_INDEX_INLATINEXTENDEDE 434 +#define PROP_INDEX_INCHEROKEESUPPLEMENT 435 +#define PROP_INDEX_INMEETEIMAYEK 436 +#define PROP_INDEX_INHANGULSYLLABLES 437 +#define PROP_INDEX_INHANGULJAMOEXTENDEDB 438 +#define PROP_INDEX_INHIGHSURROGATES 439 +#define PROP_INDEX_INHIGHPRIVATEUSESURROGATES 440 +#define PROP_INDEX_INLOWSURROGATES 441 +#define PROP_INDEX_INPRIVATEUSEAREA 442 +#define PROP_INDEX_INCJKCOMPATIBILITYIDEOGRAPHS 443 +#define PROP_INDEX_INALPHABETICPRESENTATIONFORMS 444 +#define PROP_INDEX_INARABICPRESENTATIONFORMSA 445 +#define PROP_INDEX_INVARIATIONSELECTORS 446 +#define PROP_INDEX_INVERTICALFORMS 447 +#define PROP_INDEX_INCOMBININGHALFMARKS 448 +#define PROP_INDEX_INCJKCOMPATIBILITYFORMS 449 +#define PROP_INDEX_INSMALLFORMVARIANTS 450 +#define PROP_INDEX_INARABICPRESENTATIONFORMSB 451 +#define PROP_INDEX_INHALFWIDTHANDFULLWIDTHFORMS 452 +#define PROP_INDEX_INSPECIALS 453 +#define PROP_INDEX_INLINEARBSYLLABARY 454 +#define PROP_INDEX_INLINEARBIDEOGRAMS 455 +#define PROP_INDEX_INAEGEANNUMBERS 456 +#define PROP_INDEX_INANCIENTGREEKNUMBERS 457 +#define PROP_INDEX_INANCIENTSYMBOLS 458 +#define PROP_INDEX_INPHAISTOSDISC 459 +#define PROP_INDEX_INLYCIAN 460 +#define PROP_INDEX_INCARIAN 461 +#define PROP_INDEX_INCOPTICEPACTNUMBERS 462 +#define PROP_INDEX_INOLDITALIC 463 +#define PROP_INDEX_INGOTHIC 464 +#define PROP_INDEX_INOLDPERMIC 465 +#define PROP_INDEX_INUGARITIC 466 +#define PROP_INDEX_INOLDPERSIAN 467 +#define PROP_INDEX_INDESERET 468 +#define PROP_INDEX_INSHAVIAN 469 +#define PROP_INDEX_INOSMANYA 470 +#define PROP_INDEX_INOSAGE 471 +#define PROP_INDEX_INELBASAN 472 +#define PROP_INDEX_INCAUCASIANALBANIAN 473 +#define PROP_INDEX_INVITHKUQI 474 +#define PROP_INDEX_INTODHRI 475 +#define PROP_INDEX_INLINEARA 476 +#define PROP_INDEX_INLATINEXTENDEDF 477 +#define PROP_INDEX_INCYPRIOTSYLLABARY 478 +#define PROP_INDEX_INIMPERIALARAMAIC 479 +#define PROP_INDEX_INPALMYRENE 480 +#define PROP_INDEX_INNABATAEAN 481 +#define PROP_INDEX_INHATRAN 482 +#define PROP_INDEX_INPHOENICIAN 483 +#define PROP_INDEX_INLYDIAN 484 +#define PROP_INDEX_INMEROITICHIEROGLYPHS 485 +#define PROP_INDEX_INMEROITICCURSIVE 486 +#define PROP_INDEX_INKHAROSHTHI 487 +#define PROP_INDEX_INOLDSOUTHARABIAN 488 +#define PROP_INDEX_INOLDNORTHARABIAN 489 +#define PROP_INDEX_INMANICHAEAN 490 +#define PROP_INDEX_INAVESTAN 491 +#define PROP_INDEX_ININSCRIPTIONALPARTHIAN 492 +#define PROP_INDEX_ININSCRIPTIONALPAHLAVI 493 +#define PROP_INDEX_INPSALTERPAHLAVI 494 +#define PROP_INDEX_INOLDTURKIC 495 +#define PROP_INDEX_INOLDHUNGARIAN 496 +#define PROP_INDEX_INHANIFIROHINGYA 497 +#define PROP_INDEX_INGARAY 498 +#define PROP_INDEX_INRUMINUMERALSYMBOLS 499 +#define PROP_INDEX_INYEZIDI 500 +#define PROP_INDEX_INARABICEXTENDEDC 501 +#define PROP_INDEX_INOLDSOGDIAN 502 +#define PROP_INDEX_INSOGDIAN 503 +#define PROP_INDEX_INOLDUYGHUR 504 +#define PROP_INDEX_INCHORASMIAN 505 +#define PROP_INDEX_INELYMAIC 506 +#define PROP_INDEX_INBRAHMI 507 +#define PROP_INDEX_INKAITHI 508 +#define PROP_INDEX_INSORASOMPENG 509 +#define PROP_INDEX_INCHAKMA 510 +#define PROP_INDEX_INMAHAJANI 511 +#define PROP_INDEX_INSHARADA 512 +#define PROP_INDEX_INSINHALAARCHAICNUMBERS 513 +#define PROP_INDEX_INKHOJKI 514 +#define PROP_INDEX_INMULTANI 515 +#define PROP_INDEX_INKHUDAWADI 516 +#define PROP_INDEX_INGRANTHA 517 +#define PROP_INDEX_INTULUTIGALARI 518 +#define PROP_INDEX_INNEWA 519 +#define PROP_INDEX_INTIRHUTA 520 +#define PROP_INDEX_INSIDDHAM 521 +#define PROP_INDEX_INMODI 522 +#define PROP_INDEX_INMONGOLIANSUPPLEMENT 523 +#define PROP_INDEX_INTAKRI 524 +#define PROP_INDEX_INMYANMAREXTENDEDC 525 +#define PROP_INDEX_INAHOM 526 +#define PROP_INDEX_INDOGRA 527 +#define PROP_INDEX_INWARANGCITI 528 +#define PROP_INDEX_INDIVESAKURU 529 +#define PROP_INDEX_INNANDINAGARI 530 +#define PROP_INDEX_INZANABAZARSQUARE 531 +#define PROP_INDEX_INSOYOMBO 532 +#define PROP_INDEX_INUNIFIEDCANADIANABORIGINALSYLLABICSEXTENDEDA 533 +#define PROP_INDEX_INPAUCINHAU 534 +#define PROP_INDEX_INDEVANAGARIEXTENDEDA 535 +#define PROP_INDEX_INSUNUWAR 536 +#define PROP_INDEX_INBHAIKSUKI 537 +#define PROP_INDEX_INMARCHEN 538 +#define PROP_INDEX_INMASARAMGONDI 539 +#define PROP_INDEX_INGUNJALAGONDI 540 +#define PROP_INDEX_INMAKASAR 541 +#define PROP_INDEX_INKAWI 542 +#define PROP_INDEX_INLISUSUPPLEMENT 543 +#define PROP_INDEX_INTAMILSUPPLEMENT 544 +#define PROP_INDEX_INCUNEIFORM 545 +#define PROP_INDEX_INCUNEIFORMNUMBERSANDPUNCTUATION 546 +#define PROP_INDEX_INEARLYDYNASTICCUNEIFORM 547 +#define PROP_INDEX_INCYPROMINOAN 548 +#define PROP_INDEX_INEGYPTIANHIEROGLYPHS 549 +#define PROP_INDEX_INEGYPTIANHIEROGLYPHFORMATCONTROLS 550 +#define PROP_INDEX_INEGYPTIANHIEROGLYPHSEXTENDEDA 551 +#define PROP_INDEX_INANATOLIANHIEROGLYPHS 552 +#define PROP_INDEX_INGURUNGKHEMA 553 +#define PROP_INDEX_INBAMUMSUPPLEMENT 554 +#define PROP_INDEX_INMRO 555 +#define PROP_INDEX_INTANGSA 556 +#define PROP_INDEX_INBASSAVAH 557 +#define PROP_INDEX_INPAHAWHHMONG 558 +#define PROP_INDEX_INKIRATRAI 559 +#define PROP_INDEX_INMEDEFAIDRIN 560 +#define PROP_INDEX_INMIAO 561 +#define PROP_INDEX_INIDEOGRAPHICSYMBOLSANDPUNCTUATION 562 +#define PROP_INDEX_INTANGUT 563 +#define PROP_INDEX_INTANGUTCOMPONENTS 564 +#define PROP_INDEX_INKHITANSMALLSCRIPT 565 +#define PROP_INDEX_INTANGUTSUPPLEMENT 566 +#define PROP_INDEX_INKANAEXTENDEDB 567 +#define PROP_INDEX_INKANASUPPLEMENT 568 +#define PROP_INDEX_INKANAEXTENDEDA 569 +#define PROP_INDEX_INSMALLKANAEXTENSION 570 +#define PROP_INDEX_INNUSHU 571 +#define PROP_INDEX_INDUPLOYAN 572 +#define PROP_INDEX_INSHORTHANDFORMATCONTROLS 573 +#define PROP_INDEX_INSYMBOLSFORLEGACYCOMPUTINGSUPPLEMENT 574 +#define PROP_INDEX_INZNAMENNYMUSICALNOTATION 575 +#define PROP_INDEX_INBYZANTINEMUSICALSYMBOLS 576 +#define PROP_INDEX_INMUSICALSYMBOLS 577 +#define PROP_INDEX_INANCIENTGREEKMUSICALNOTATION 578 +#define PROP_INDEX_INKAKTOVIKNUMERALS 579 +#define PROP_INDEX_INMAYANNUMERALS 580 +#define PROP_INDEX_INTAIXUANJINGSYMBOLS 581 +#define PROP_INDEX_INCOUNTINGRODNUMERALS 582 +#define PROP_INDEX_INMATHEMATICALALPHANUMERICSYMBOLS 583 +#define PROP_INDEX_INSUTTONSIGNWRITING 584 +#define PROP_INDEX_INLATINEXTENDEDG 585 +#define PROP_INDEX_INGLAGOLITICSUPPLEMENT 586 +#define PROP_INDEX_INCYRILLICEXTENDEDD 587 +#define PROP_INDEX_INNYIAKENGPUACHUEHMONG 588 +#define PROP_INDEX_INTOTO 589 +#define PROP_INDEX_INWANCHO 590 +#define PROP_INDEX_INNAGMUNDARI 591 +#define PROP_INDEX_INOLONAL 592 +#define PROP_INDEX_INETHIOPICEXTENDEDB 593 +#define PROP_INDEX_INMENDEKIKAKUI 594 +#define PROP_INDEX_INADLAM 595 +#define PROP_INDEX_ININDICSIYAQNUMBERS 596 +#define PROP_INDEX_INOTTOMANSIYAQNUMBERS 597 +#define PROP_INDEX_INARABICMATHEMATICALALPHABETICSYMBOLS 598 +#define PROP_INDEX_INMAHJONGTILES 599 +#define PROP_INDEX_INDOMINOTILES 600 +#define PROP_INDEX_INPLAYINGCARDS 601 +#define PROP_INDEX_INENCLOSEDALPHANUMERICSUPPLEMENT 602 +#define PROP_INDEX_INENCLOSEDIDEOGRAPHICSUPPLEMENT 603 +#define PROP_INDEX_INMISCELLANEOUSSYMBOLSANDPICTOGRAPHS 604 +#define PROP_INDEX_INEMOTICONS 605 +#define PROP_INDEX_INORNAMENTALDINGBATS 606 +#define PROP_INDEX_INTRANSPORTANDMAPSYMBOLS 607 +#define PROP_INDEX_INALCHEMICALSYMBOLS 608 +#define PROP_INDEX_INGEOMETRICSHAPESEXTENDED 609 +#define PROP_INDEX_INSUPPLEMENTALARROWSC 610 +#define PROP_INDEX_INSUPPLEMENTALSYMBOLSANDPICTOGRAPHS 611 +#define PROP_INDEX_INCHESSSYMBOLS 612 +#define PROP_INDEX_INSYMBOLSANDPICTOGRAPHSEXTENDEDA 613 +#define PROP_INDEX_INSYMBOLSFORLEGACYCOMPUTING 614 +#define PROP_INDEX_INCJKUNIFIEDIDEOGRAPHSEXTENSIONB 615 +#define PROP_INDEX_INCJKUNIFIEDIDEOGRAPHSEXTENSIONC 616 +#define PROP_INDEX_INCJKUNIFIEDIDEOGRAPHSEXTENSIOND 617 +#define PROP_INDEX_INCJKUNIFIEDIDEOGRAPHSEXTENSIONE 618 +#define PROP_INDEX_INCJKUNIFIEDIDEOGRAPHSEXTENSIONF 619 +#define PROP_INDEX_INCJKUNIFIEDIDEOGRAPHSEXTENSIONI 620 +#define PROP_INDEX_INCJKCOMPATIBILITYIDEOGRAPHSSUPPLEMENT 621 +#define PROP_INDEX_INCJKUNIFIEDIDEOGRAPHSEXTENSIONG 622 +#define PROP_INDEX_INCJKUNIFIEDIDEOGRAPHSEXTENSIONH 623 +#define PROP_INDEX_INTAGS 624 +#define PROP_INDEX_INVARIATIONSELECTORSSUPPLEMENT 625 +#define PROP_INDEX_INSUPPLEMENTARYPRIVATEUSEAREAA 626 +#define PROP_INDEX_INSUPPLEMENTARYPRIVATEUSEAREAB 627 +#define PROP_INDEX_INNOBLOCK 628 diff --git a/internal/components/third_party/oniguruma/src/unicode_property_data_posix.h b/internal/components/third_party/oniguruma/src/unicode_property_data_posix.h new file mode 100644 index 0000000000..5edb6d86ed --- /dev/null +++ b/internal/components/third_party/oniguruma/src/unicode_property_data_posix.h @@ -0,0 +1,5968 @@ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: gperf -T -C -c -t -j1 -L ANSI-C --ignore-case --pic -Q unicode_prop_name_pool -N unicode_lookup_property_name --output-file gperf2.tmp unicode_property_data_posix.gperf */ +/* Computed positions: -k'1,3' */ + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +#error "gperf generated tables don't work with this execution character set. Please report a bug to ." +#endif + + + +/* Generated by make_unicode_property_data.py. */ + +/*- + * Copyright (c) 2016-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + +/* PROPERTY: 'NEWLINE': POSIX [[:NEWLINE:]] */ +static const OnigCodePoint +CR_NEWLINE[] = { 1, +0x000a, 0x000a, +}; /* END of CR_NEWLINE */ + +/* PROPERTY: 'Alpha': POSIX [[:Alpha:]] */ +static const OnigCodePoint +CR_Alpha[] = { 757, +0x0041, 0x005a, +0x0061, 0x007a, +0x00aa, 0x00aa, +0x00b5, 0x00b5, +0x00ba, 0x00ba, +0x00c0, 0x00d6, +0x00d8, 0x00f6, +0x00f8, 0x02c1, +0x02c6, 0x02d1, +0x02e0, 0x02e4, +0x02ec, 0x02ec, +0x02ee, 0x02ee, +0x0345, 0x0345, +0x0363, 0x0374, +0x0376, 0x0377, +0x037a, 0x037d, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x03f5, +0x03f7, 0x0481, +0x048a, 0x052f, +0x0531, 0x0556, +0x0559, 0x0559, +0x0560, 0x0588, +0x05b0, 0x05bd, +0x05bf, 0x05bf, +0x05c1, 0x05c2, +0x05c4, 0x05c5, +0x05c7, 0x05c7, +0x05d0, 0x05ea, +0x05ef, 0x05f2, +0x0610, 0x061a, +0x0620, 0x0657, +0x0659, 0x065f, +0x066e, 0x06d3, +0x06d5, 0x06dc, +0x06e1, 0x06e8, +0x06ed, 0x06ef, +0x06fa, 0x06fc, +0x06ff, 0x06ff, +0x0710, 0x073f, +0x074d, 0x07b1, +0x07ca, 0x07ea, +0x07f4, 0x07f5, +0x07fa, 0x07fa, +0x0800, 0x0817, +0x081a, 0x082c, +0x0840, 0x0858, +0x0860, 0x086a, +0x0870, 0x0887, +0x0889, 0x088e, +0x0897, 0x0897, +0x08a0, 0x08c9, +0x08d4, 0x08df, +0x08e3, 0x08e9, +0x08f0, 0x093b, +0x093d, 0x094c, +0x094e, 0x0950, +0x0955, 0x0963, +0x0971, 0x0983, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bd, 0x09c4, +0x09c7, 0x09c8, +0x09cb, 0x09cc, +0x09ce, 0x09ce, +0x09d7, 0x09d7, +0x09dc, 0x09dd, +0x09df, 0x09e3, +0x09f0, 0x09f1, +0x09fc, 0x09fc, +0x0a01, 0x0a03, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a3e, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4c, +0x0a51, 0x0a51, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a70, 0x0a75, +0x0a81, 0x0a83, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abd, 0x0ac5, +0x0ac7, 0x0ac9, +0x0acb, 0x0acc, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae3, +0x0af9, 0x0afc, +0x0b01, 0x0b03, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3d, 0x0b44, +0x0b47, 0x0b48, +0x0b4b, 0x0b4c, +0x0b56, 0x0b57, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b63, +0x0b71, 0x0b71, +0x0b82, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bbe, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcc, +0x0bd0, 0x0bd0, +0x0bd7, 0x0bd7, +0x0c00, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3d, 0x0c44, +0x0c46, 0x0c48, +0x0c4a, 0x0c4c, +0x0c55, 0x0c56, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c63, +0x0c80, 0x0c83, +0x0c85, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbd, 0x0cc4, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccc, +0x0cd5, 0x0cd6, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce3, +0x0cf1, 0x0cf3, +0x0d00, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d3a, +0x0d3d, 0x0d44, +0x0d46, 0x0d48, +0x0d4a, 0x0d4c, +0x0d4e, 0x0d4e, +0x0d54, 0x0d57, +0x0d5f, 0x0d63, +0x0d7a, 0x0d7f, +0x0d81, 0x0d83, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0dcf, 0x0dd4, +0x0dd6, 0x0dd6, +0x0dd8, 0x0ddf, +0x0df2, 0x0df3, +0x0e01, 0x0e3a, +0x0e40, 0x0e46, +0x0e4d, 0x0e4d, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0eb9, +0x0ebb, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0ecd, 0x0ecd, +0x0edc, 0x0edf, +0x0f00, 0x0f00, +0x0f40, 0x0f47, +0x0f49, 0x0f6c, +0x0f71, 0x0f83, +0x0f88, 0x0f97, +0x0f99, 0x0fbc, +0x1000, 0x1036, +0x1038, 0x1038, +0x103b, 0x103f, +0x1050, 0x108f, +0x109a, 0x109d, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x10fa, +0x10fc, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x1380, 0x138f, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1401, 0x166c, +0x166f, 0x167f, +0x1681, 0x169a, +0x16a0, 0x16ea, +0x16ee, 0x16f8, +0x1700, 0x1713, +0x171f, 0x1733, +0x1740, 0x1753, +0x1760, 0x176c, +0x176e, 0x1770, +0x1772, 0x1773, +0x1780, 0x17b3, +0x17b6, 0x17c8, +0x17d7, 0x17d7, +0x17dc, 0x17dc, +0x1820, 0x1878, +0x1880, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1920, 0x192b, +0x1930, 0x1938, +0x1950, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x1a00, 0x1a1b, +0x1a20, 0x1a5e, +0x1a61, 0x1a74, +0x1aa7, 0x1aa7, +0x1abf, 0x1ac0, +0x1acc, 0x1ace, +0x1b00, 0x1b33, +0x1b35, 0x1b43, +0x1b45, 0x1b4c, +0x1b80, 0x1ba9, +0x1bac, 0x1baf, +0x1bba, 0x1be5, +0x1be7, 0x1bf1, +0x1c00, 0x1c36, +0x1c4d, 0x1c4f, +0x1c5a, 0x1c7d, +0x1c80, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1ce9, 0x1cec, +0x1cee, 0x1cf3, +0x1cf5, 0x1cf6, +0x1cfa, 0x1cfa, +0x1d00, 0x1dbf, +0x1dd3, 0x1df4, +0x1e00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fbc, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fcc, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fe0, 0x1fec, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffc, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x2102, 0x2102, +0x2107, 0x2107, +0x210a, 0x2113, +0x2115, 0x2115, +0x2119, 0x211d, +0x2124, 0x2124, +0x2126, 0x2126, +0x2128, 0x2128, +0x212a, 0x212d, +0x212f, 0x2139, +0x213c, 0x213f, +0x2145, 0x2149, +0x214e, 0x214e, +0x2160, 0x2188, +0x24b6, 0x24e9, +0x2c00, 0x2ce4, +0x2ceb, 0x2cee, +0x2cf2, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d6f, +0x2d80, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x2de0, 0x2dff, +0x2e2f, 0x2e2f, +0x3005, 0x3007, +0x3021, 0x3029, +0x3031, 0x3035, +0x3038, 0x303c, +0x3041, 0x3096, +0x309d, 0x309f, +0x30a1, 0x30fa, +0x30fc, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x31a0, 0x31bf, +0x31f0, 0x31ff, +0x3400, 0x4dbf, +0x4e00, 0xa48c, +0xa4d0, 0xa4fd, +0xa500, 0xa60c, +0xa610, 0xa61f, +0xa62a, 0xa62b, +0xa640, 0xa66e, +0xa674, 0xa67b, +0xa67f, 0xa6ef, +0xa717, 0xa71f, +0xa722, 0xa788, +0xa78b, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa805, +0xa807, 0xa827, +0xa840, 0xa873, +0xa880, 0xa8c3, +0xa8c5, 0xa8c5, +0xa8f2, 0xa8f7, +0xa8fb, 0xa8fb, +0xa8fd, 0xa8ff, +0xa90a, 0xa92a, +0xa930, 0xa952, +0xa960, 0xa97c, +0xa980, 0xa9b2, +0xa9b4, 0xa9bf, +0xa9cf, 0xa9cf, +0xa9e0, 0xa9ef, +0xa9fa, 0xa9fe, +0xaa00, 0xaa36, +0xaa40, 0xaa4d, +0xaa60, 0xaa76, +0xaa7a, 0xaabe, +0xaac0, 0xaac0, +0xaac2, 0xaac2, +0xaadb, 0xaadd, +0xaae0, 0xaaef, +0xaaf2, 0xaaf5, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab5a, +0xab5c, 0xab69, +0xab70, 0xabea, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xf900, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb28, +0xfb2a, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbb1, +0xfbd3, 0xfd3d, +0xfd50, 0xfd8f, +0xfd92, 0xfdc7, +0xfdf0, 0xfdfb, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0xff21, 0xff3a, +0xff41, 0xff5a, +0xff66, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10140, 0x10174, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x10300, 0x1031f, +0x1032d, 0x1034a, +0x10350, 0x1037a, +0x10380, 0x1039d, +0x103a0, 0x103c3, +0x103c8, 0x103cf, +0x103d1, 0x103d5, +0x10400, 0x1049d, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10860, 0x10876, +0x10880, 0x1089e, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x10900, 0x10915, +0x10920, 0x10939, +0x10980, 0x109b7, +0x109be, 0x109bf, +0x10a00, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a60, 0x10a7c, +0x10a80, 0x10a9c, +0x10ac0, 0x10ac7, +0x10ac9, 0x10ae4, +0x10b00, 0x10b35, +0x10b40, 0x10b55, +0x10b60, 0x10b72, +0x10b80, 0x10b91, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10d00, 0x10d27, +0x10d4a, 0x10d65, +0x10d69, 0x10d69, +0x10d6f, 0x10d85, +0x10e80, 0x10ea9, +0x10eab, 0x10eac, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10efc, 0x10efc, +0x10f00, 0x10f1c, +0x10f27, 0x10f27, +0x10f30, 0x10f45, +0x10f70, 0x10f81, +0x10fb0, 0x10fc4, +0x10fe0, 0x10ff6, +0x11000, 0x11045, +0x11071, 0x11075, +0x11080, 0x110b8, +0x110c2, 0x110c2, +0x110d0, 0x110e8, +0x11100, 0x11132, +0x11144, 0x11147, +0x11150, 0x11172, +0x11176, 0x11176, +0x11180, 0x111bf, +0x111c1, 0x111c4, +0x111ce, 0x111cf, +0x111da, 0x111da, +0x111dc, 0x111dc, +0x11200, 0x11211, +0x11213, 0x11234, +0x11237, 0x11237, +0x1123e, 0x11241, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a8, +0x112b0, 0x112e8, +0x11300, 0x11303, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133d, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134c, +0x11350, 0x11350, +0x11357, 0x11357, +0x1135d, 0x11363, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113cd, +0x113d1, 0x113d1, +0x113d3, 0x113d3, +0x11400, 0x11441, +0x11443, 0x11445, +0x11447, 0x1144a, +0x1145f, 0x11461, +0x11480, 0x114c1, +0x114c4, 0x114c5, +0x114c7, 0x114c7, +0x11580, 0x115b5, +0x115b8, 0x115be, +0x115d8, 0x115dd, +0x11600, 0x1163e, +0x11640, 0x11640, +0x11644, 0x11644, +0x11680, 0x116b5, +0x116b8, 0x116b8, +0x11700, 0x1171a, +0x1171d, 0x1172a, +0x11740, 0x11746, +0x11800, 0x11838, +0x118a0, 0x118df, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x11935, +0x11937, 0x11938, +0x1193b, 0x1193c, +0x1193f, 0x11942, +0x119a0, 0x119a7, +0x119aa, 0x119d7, +0x119da, 0x119df, +0x119e1, 0x119e1, +0x119e3, 0x119e4, +0x11a00, 0x11a32, +0x11a35, 0x11a3e, +0x11a50, 0x11a97, +0x11a9d, 0x11a9d, +0x11ab0, 0x11af8, +0x11bc0, 0x11be0, +0x11c00, 0x11c08, +0x11c0a, 0x11c36, +0x11c38, 0x11c3e, +0x11c40, 0x11c40, +0x11c72, 0x11c8f, +0x11c92, 0x11ca7, +0x11ca9, 0x11cb6, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d41, +0x11d43, 0x11d43, +0x11d46, 0x11d47, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d8e, +0x11d90, 0x11d91, +0x11d93, 0x11d96, +0x11d98, 0x11d98, +0x11ee0, 0x11ef6, +0x11f00, 0x11f10, +0x11f12, 0x11f3a, +0x11f3e, 0x11f40, +0x11fb0, 0x11fb0, +0x12000, 0x12399, +0x12400, 0x1246e, +0x12480, 0x12543, +0x12f90, 0x12ff0, +0x13000, 0x1342f, +0x13441, 0x13446, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x1612e, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a70, 0x16abe, +0x16ad0, 0x16aed, +0x16b00, 0x16b2f, +0x16b40, 0x16b43, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d6c, +0x16e40, 0x16e7f, +0x16f00, 0x16f4a, +0x16f4f, 0x16f87, +0x16f8f, 0x16f9f, +0x16fe0, 0x16fe1, +0x16fe3, 0x16fe3, +0x16ff0, 0x16ff1, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1bc9e, 0x1bc9e, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d6c0, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6fa, +0x1d6fc, 0x1d714, +0x1d716, 0x1d734, +0x1d736, 0x1d74e, +0x1d750, 0x1d76e, +0x1d770, 0x1d788, +0x1d78a, 0x1d7a8, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7cb, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e030, 0x1e06d, +0x1e08f, 0x1e08f, +0x1e100, 0x1e12c, +0x1e137, 0x1e13d, +0x1e14e, 0x1e14e, +0x1e290, 0x1e2ad, +0x1e2c0, 0x1e2eb, +0x1e4d0, 0x1e4eb, +0x1e5d0, 0x1e5ed, +0x1e5f0, 0x1e5f0, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e900, 0x1e943, +0x1e947, 0x1e947, +0x1e94b, 0x1e94b, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x1f130, 0x1f149, +0x1f150, 0x1f169, +0x1f170, 0x1f189, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +}; /* END of CR_Alpha */ + +/* PROPERTY: 'Blank': POSIX [[:Blank:]] */ +static const OnigCodePoint +CR_Blank[] = { 8, +0x0009, 0x0009, +0x0020, 0x0020, +0x00a0, 0x00a0, +0x1680, 0x1680, +0x2000, 0x200a, +0x202f, 0x202f, +0x205f, 0x205f, +0x3000, 0x3000, +}; /* END of CR_Blank */ + +/* PROPERTY: 'Cntrl': POSIX [[:Cntrl:]] */ +static const OnigCodePoint +CR_Cntrl[] = { 2, +0x0000, 0x001f, +0x007f, 0x009f, +}; /* END of CR_Cntrl */ + +/* PROPERTY: 'Digit': POSIX [[:Digit:]] */ +static const OnigCodePoint +CR_Digit[] = { 71, +0x0030, 0x0039, +0x0660, 0x0669, +0x06f0, 0x06f9, +0x07c0, 0x07c9, +0x0966, 0x096f, +0x09e6, 0x09ef, +0x0a66, 0x0a6f, +0x0ae6, 0x0aef, +0x0b66, 0x0b6f, +0x0be6, 0x0bef, +0x0c66, 0x0c6f, +0x0ce6, 0x0cef, +0x0d66, 0x0d6f, +0x0de6, 0x0def, +0x0e50, 0x0e59, +0x0ed0, 0x0ed9, +0x0f20, 0x0f29, +0x1040, 0x1049, +0x1090, 0x1099, +0x17e0, 0x17e9, +0x1810, 0x1819, +0x1946, 0x194f, +0x19d0, 0x19d9, +0x1a80, 0x1a89, +0x1a90, 0x1a99, +0x1b50, 0x1b59, +0x1bb0, 0x1bb9, +0x1c40, 0x1c49, +0x1c50, 0x1c59, +0xa620, 0xa629, +0xa8d0, 0xa8d9, +0xa900, 0xa909, +0xa9d0, 0xa9d9, +0xa9f0, 0xa9f9, +0xaa50, 0xaa59, +0xabf0, 0xabf9, +0xff10, 0xff19, +0x104a0, 0x104a9, +0x10d30, 0x10d39, +0x10d40, 0x10d49, +0x11066, 0x1106f, +0x110f0, 0x110f9, +0x11136, 0x1113f, +0x111d0, 0x111d9, +0x112f0, 0x112f9, +0x11450, 0x11459, +0x114d0, 0x114d9, +0x11650, 0x11659, +0x116c0, 0x116c9, +0x116d0, 0x116e3, +0x11730, 0x11739, +0x118e0, 0x118e9, +0x11950, 0x11959, +0x11bf0, 0x11bf9, +0x11c50, 0x11c59, +0x11d50, 0x11d59, +0x11da0, 0x11da9, +0x11f50, 0x11f59, +0x16130, 0x16139, +0x16a60, 0x16a69, +0x16ac0, 0x16ac9, +0x16b50, 0x16b59, +0x16d70, 0x16d79, +0x1ccf0, 0x1ccf9, +0x1d7ce, 0x1d7ff, +0x1e140, 0x1e149, +0x1e2f0, 0x1e2f9, +0x1e4f0, 0x1e4f9, +0x1e5f1, 0x1e5fa, +0x1e950, 0x1e959, +0x1fbf0, 0x1fbf9, +}; /* END of CR_Digit */ + +/* PROPERTY: 'Graph': POSIX [[:Graph:]] */ +static const OnigCodePoint +CR_Graph[] = { 737, +0x0021, 0x007e, +0x00a1, 0x0377, +0x037a, 0x037f, +0x0384, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x052f, +0x0531, 0x0556, +0x0559, 0x058a, +0x058d, 0x058f, +0x0591, 0x05c7, +0x05d0, 0x05ea, +0x05ef, 0x05f4, +0x0600, 0x070d, +0x070f, 0x074a, +0x074d, 0x07b1, +0x07c0, 0x07fa, +0x07fd, 0x082d, +0x0830, 0x083e, +0x0840, 0x085b, +0x085e, 0x085e, +0x0860, 0x086a, +0x0870, 0x088e, +0x0890, 0x0891, +0x0897, 0x0983, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bc, 0x09c4, +0x09c7, 0x09c8, +0x09cb, 0x09ce, +0x09d7, 0x09d7, +0x09dc, 0x09dd, +0x09df, 0x09e3, +0x09e6, 0x09fe, +0x0a01, 0x0a03, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a3c, 0x0a3c, +0x0a3e, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4d, +0x0a51, 0x0a51, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a66, 0x0a76, +0x0a81, 0x0a83, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abc, 0x0ac5, +0x0ac7, 0x0ac9, +0x0acb, 0x0acd, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae3, +0x0ae6, 0x0af1, +0x0af9, 0x0aff, +0x0b01, 0x0b03, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3c, 0x0b44, +0x0b47, 0x0b48, +0x0b4b, 0x0b4d, +0x0b55, 0x0b57, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b63, +0x0b66, 0x0b77, +0x0b82, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bbe, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcd, +0x0bd0, 0x0bd0, +0x0bd7, 0x0bd7, +0x0be6, 0x0bfa, +0x0c00, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3c, 0x0c44, +0x0c46, 0x0c48, +0x0c4a, 0x0c4d, +0x0c55, 0x0c56, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c63, +0x0c66, 0x0c6f, +0x0c77, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbc, 0x0cc4, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccd, +0x0cd5, 0x0cd6, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce3, +0x0ce6, 0x0cef, +0x0cf1, 0x0cf3, +0x0d00, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d44, +0x0d46, 0x0d48, +0x0d4a, 0x0d4f, +0x0d54, 0x0d63, +0x0d66, 0x0d7f, +0x0d81, 0x0d83, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0dca, 0x0dca, +0x0dcf, 0x0dd4, +0x0dd6, 0x0dd6, +0x0dd8, 0x0ddf, +0x0de6, 0x0def, +0x0df2, 0x0df4, +0x0e01, 0x0e3a, +0x0e3f, 0x0e5b, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0ec8, 0x0ece, +0x0ed0, 0x0ed9, +0x0edc, 0x0edf, +0x0f00, 0x0f47, +0x0f49, 0x0f6c, +0x0f71, 0x0f97, +0x0f99, 0x0fbc, +0x0fbe, 0x0fcc, +0x0fce, 0x0fda, +0x1000, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x135d, 0x137c, +0x1380, 0x1399, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1400, 0x167f, +0x1681, 0x169c, +0x16a0, 0x16f8, +0x1700, 0x1715, +0x171f, 0x1736, +0x1740, 0x1753, +0x1760, 0x176c, +0x176e, 0x1770, +0x1772, 0x1773, +0x1780, 0x17dd, +0x17e0, 0x17e9, +0x17f0, 0x17f9, +0x1800, 0x1819, +0x1820, 0x1878, +0x1880, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1920, 0x192b, +0x1930, 0x193b, +0x1940, 0x1940, +0x1944, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x19d0, 0x19da, +0x19de, 0x1a1b, +0x1a1e, 0x1a5e, +0x1a60, 0x1a7c, +0x1a7f, 0x1a89, +0x1a90, 0x1a99, +0x1aa0, 0x1aad, +0x1ab0, 0x1ace, +0x1b00, 0x1b4c, +0x1b4e, 0x1bf3, +0x1bfc, 0x1c37, +0x1c3b, 0x1c49, +0x1c4d, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cc7, +0x1cd0, 0x1cfa, +0x1d00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fc4, +0x1fc6, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fdd, 0x1fef, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffe, +0x200b, 0x2027, +0x202a, 0x202e, +0x2030, 0x205e, +0x2060, 0x2064, +0x2066, 0x2071, +0x2074, 0x208e, +0x2090, 0x209c, +0x20a0, 0x20c0, +0x20d0, 0x20f0, +0x2100, 0x218b, +0x2190, 0x2429, +0x2440, 0x244a, +0x2460, 0x2b73, +0x2b76, 0x2b95, +0x2b97, 0x2cf3, +0x2cf9, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d70, +0x2d7f, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x2de0, 0x2e5d, +0x2e80, 0x2e99, +0x2e9b, 0x2ef3, +0x2f00, 0x2fd5, +0x2ff0, 0x2fff, +0x3001, 0x303f, +0x3041, 0x3096, +0x3099, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x3190, 0x31e5, +0x31ef, 0x321e, +0x3220, 0xa48c, +0xa490, 0xa4c6, +0xa4d0, 0xa62b, +0xa640, 0xa6f7, +0xa700, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa82c, +0xa830, 0xa839, +0xa840, 0xa877, +0xa880, 0xa8c5, +0xa8ce, 0xa8d9, +0xa8e0, 0xa953, +0xa95f, 0xa97c, +0xa980, 0xa9cd, +0xa9cf, 0xa9d9, +0xa9de, 0xa9fe, +0xaa00, 0xaa36, +0xaa40, 0xaa4d, +0xaa50, 0xaa59, +0xaa5c, 0xaac2, +0xaadb, 0xaaf6, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab6b, +0xab70, 0xabed, +0xabf0, 0xabf9, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xe000, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbc2, +0xfbd3, 0xfd8f, +0xfd92, 0xfdc7, +0xfdcf, 0xfdcf, +0xfdf0, 0xfe19, +0xfe20, 0xfe52, +0xfe54, 0xfe66, +0xfe68, 0xfe6b, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0xfeff, 0xfeff, +0xff01, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0xffe0, 0xffe6, +0xffe8, 0xffee, +0xfff9, 0xfffd, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10100, 0x10102, +0x10107, 0x10133, +0x10137, 0x1018e, +0x10190, 0x1019c, +0x101a0, 0x101a0, +0x101d0, 0x101fd, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x102e0, 0x102fb, +0x10300, 0x10323, +0x1032d, 0x1034a, +0x10350, 0x1037a, +0x10380, 0x1039d, +0x1039f, 0x103c3, +0x103c8, 0x103d5, +0x10400, 0x1049d, +0x104a0, 0x104a9, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x1056f, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10857, 0x1089e, +0x108a7, 0x108af, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x108fb, 0x1091b, +0x1091f, 0x10939, +0x1093f, 0x1093f, +0x10980, 0x109b7, +0x109bc, 0x109cf, +0x109d2, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a38, 0x10a3a, +0x10a3f, 0x10a48, +0x10a50, 0x10a58, +0x10a60, 0x10a9f, +0x10ac0, 0x10ae6, +0x10aeb, 0x10af6, +0x10b00, 0x10b35, +0x10b39, 0x10b55, +0x10b58, 0x10b72, +0x10b78, 0x10b91, +0x10b99, 0x10b9c, +0x10ba9, 0x10baf, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10cfa, 0x10d27, +0x10d30, 0x10d39, +0x10d40, 0x10d65, +0x10d69, 0x10d85, +0x10d8e, 0x10d8f, +0x10e60, 0x10e7e, +0x10e80, 0x10ea9, +0x10eab, 0x10ead, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10efc, 0x10f27, +0x10f30, 0x10f59, +0x10f70, 0x10f89, +0x10fb0, 0x10fcb, +0x10fe0, 0x10ff6, +0x11000, 0x1104d, +0x11052, 0x11075, +0x1107f, 0x110c2, +0x110cd, 0x110cd, +0x110d0, 0x110e8, +0x110f0, 0x110f9, +0x11100, 0x11134, +0x11136, 0x11147, +0x11150, 0x11176, +0x11180, 0x111df, +0x111e1, 0x111f4, +0x11200, 0x11211, +0x11213, 0x11241, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a9, +0x112b0, 0x112ea, +0x112f0, 0x112f9, +0x11300, 0x11303, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133b, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134d, +0x11350, 0x11350, +0x11357, 0x11357, +0x1135d, 0x11363, +0x11366, 0x1136c, +0x11370, 0x11374, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113d5, +0x113d7, 0x113d8, +0x113e1, 0x113e2, +0x11400, 0x1145b, +0x1145d, 0x11461, +0x11480, 0x114c7, +0x114d0, 0x114d9, +0x11580, 0x115b5, +0x115b8, 0x115dd, +0x11600, 0x11644, +0x11650, 0x11659, +0x11660, 0x1166c, +0x11680, 0x116b9, +0x116c0, 0x116c9, +0x116d0, 0x116e3, +0x11700, 0x1171a, +0x1171d, 0x1172b, +0x11730, 0x11746, +0x11800, 0x1183b, +0x118a0, 0x118f2, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x11935, +0x11937, 0x11938, +0x1193b, 0x11946, +0x11950, 0x11959, +0x119a0, 0x119a7, +0x119aa, 0x119d7, +0x119da, 0x119e4, +0x11a00, 0x11a47, +0x11a50, 0x11aa2, +0x11ab0, 0x11af8, +0x11b00, 0x11b09, +0x11bc0, 0x11be1, +0x11bf0, 0x11bf9, +0x11c00, 0x11c08, +0x11c0a, 0x11c36, +0x11c38, 0x11c45, +0x11c50, 0x11c6c, +0x11c70, 0x11c8f, +0x11c92, 0x11ca7, +0x11ca9, 0x11cb6, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d47, +0x11d50, 0x11d59, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d8e, +0x11d90, 0x11d91, +0x11d93, 0x11d98, +0x11da0, 0x11da9, +0x11ee0, 0x11ef8, +0x11f00, 0x11f10, +0x11f12, 0x11f3a, +0x11f3e, 0x11f5a, +0x11fb0, 0x11fb0, +0x11fc0, 0x11ff1, +0x11fff, 0x12399, +0x12400, 0x1246e, +0x12470, 0x12474, +0x12480, 0x12543, +0x12f90, 0x12ff2, +0x13000, 0x13455, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x16139, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a60, 0x16a69, +0x16a6e, 0x16abe, +0x16ac0, 0x16ac9, +0x16ad0, 0x16aed, +0x16af0, 0x16af5, +0x16b00, 0x16b45, +0x16b50, 0x16b59, +0x16b5b, 0x16b61, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d79, +0x16e40, 0x16e9a, +0x16f00, 0x16f4a, +0x16f4f, 0x16f87, +0x16f8f, 0x16f9f, +0x16fe0, 0x16fe4, +0x16ff0, 0x16ff1, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1bc9c, 0x1bca3, +0x1cc00, 0x1ccf9, +0x1cd00, 0x1ceb3, +0x1cf00, 0x1cf2d, +0x1cf30, 0x1cf46, +0x1cf50, 0x1cfc3, +0x1d000, 0x1d0f5, +0x1d100, 0x1d126, +0x1d129, 0x1d1ea, +0x1d200, 0x1d245, +0x1d2c0, 0x1d2d3, +0x1d2e0, 0x1d2f3, +0x1d300, 0x1d356, +0x1d360, 0x1d378, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d7cb, +0x1d7ce, 0x1da8b, +0x1da9b, 0x1da9f, +0x1daa1, 0x1daaf, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e030, 0x1e06d, +0x1e08f, 0x1e08f, +0x1e100, 0x1e12c, +0x1e130, 0x1e13d, +0x1e140, 0x1e149, +0x1e14e, 0x1e14f, +0x1e290, 0x1e2ae, +0x1e2c0, 0x1e2f9, +0x1e2ff, 0x1e2ff, +0x1e4d0, 0x1e4f9, +0x1e5d0, 0x1e5fa, +0x1e5ff, 0x1e5ff, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e8c7, 0x1e8d6, +0x1e900, 0x1e94b, +0x1e950, 0x1e959, +0x1e95e, 0x1e95f, +0x1ec71, 0x1ecb4, +0x1ed01, 0x1ed3d, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x1eef0, 0x1eef1, +0x1f000, 0x1f02b, +0x1f030, 0x1f093, +0x1f0a0, 0x1f0ae, +0x1f0b1, 0x1f0bf, +0x1f0c1, 0x1f0cf, +0x1f0d1, 0x1f0f5, +0x1f100, 0x1f1ad, +0x1f1e6, 0x1f202, +0x1f210, 0x1f23b, +0x1f240, 0x1f248, +0x1f250, 0x1f251, +0x1f260, 0x1f265, +0x1f300, 0x1f6d7, +0x1f6dc, 0x1f6ec, +0x1f6f0, 0x1f6fc, +0x1f700, 0x1f776, +0x1f77b, 0x1f7d9, +0x1f7e0, 0x1f7eb, +0x1f7f0, 0x1f7f0, +0x1f800, 0x1f80b, +0x1f810, 0x1f847, +0x1f850, 0x1f859, +0x1f860, 0x1f887, +0x1f890, 0x1f8ad, +0x1f8b0, 0x1f8bb, +0x1f8c0, 0x1f8c1, +0x1f900, 0x1fa53, +0x1fa60, 0x1fa6d, +0x1fa70, 0x1fa7c, +0x1fa80, 0x1fa89, +0x1fa8f, 0x1fac6, +0x1face, 0x1fadc, +0x1fadf, 0x1fae9, +0x1faf0, 0x1faf8, +0x1fb00, 0x1fb92, +0x1fb94, 0x1fbf9, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +0xe0001, 0xe0001, +0xe0020, 0xe007f, +0xe0100, 0xe01ef, +0xf0000, 0xffffd, +0x100000, 0x10fffd, +}; /* END of CR_Graph */ + +/* PROPERTY: 'Lower': POSIX [[:Lower:]] */ +static const OnigCodePoint +CR_Lower[] = { 675, +0x0061, 0x007a, +0x00aa, 0x00aa, +0x00b5, 0x00b5, +0x00ba, 0x00ba, +0x00df, 0x00f6, +0x00f8, 0x00ff, +0x0101, 0x0101, +0x0103, 0x0103, +0x0105, 0x0105, +0x0107, 0x0107, +0x0109, 0x0109, +0x010b, 0x010b, +0x010d, 0x010d, +0x010f, 0x010f, +0x0111, 0x0111, +0x0113, 0x0113, +0x0115, 0x0115, +0x0117, 0x0117, +0x0119, 0x0119, +0x011b, 0x011b, +0x011d, 0x011d, +0x011f, 0x011f, +0x0121, 0x0121, +0x0123, 0x0123, +0x0125, 0x0125, +0x0127, 0x0127, +0x0129, 0x0129, +0x012b, 0x012b, +0x012d, 0x012d, +0x012f, 0x012f, +0x0131, 0x0131, +0x0133, 0x0133, +0x0135, 0x0135, +0x0137, 0x0138, +0x013a, 0x013a, +0x013c, 0x013c, +0x013e, 0x013e, +0x0140, 0x0140, +0x0142, 0x0142, +0x0144, 0x0144, +0x0146, 0x0146, +0x0148, 0x0149, +0x014b, 0x014b, +0x014d, 0x014d, +0x014f, 0x014f, +0x0151, 0x0151, +0x0153, 0x0153, +0x0155, 0x0155, +0x0157, 0x0157, +0x0159, 0x0159, +0x015b, 0x015b, +0x015d, 0x015d, +0x015f, 0x015f, +0x0161, 0x0161, +0x0163, 0x0163, +0x0165, 0x0165, +0x0167, 0x0167, +0x0169, 0x0169, +0x016b, 0x016b, +0x016d, 0x016d, +0x016f, 0x016f, +0x0171, 0x0171, +0x0173, 0x0173, +0x0175, 0x0175, +0x0177, 0x0177, +0x017a, 0x017a, +0x017c, 0x017c, +0x017e, 0x0180, +0x0183, 0x0183, +0x0185, 0x0185, +0x0188, 0x0188, +0x018c, 0x018d, +0x0192, 0x0192, +0x0195, 0x0195, +0x0199, 0x019b, +0x019e, 0x019e, +0x01a1, 0x01a1, +0x01a3, 0x01a3, +0x01a5, 0x01a5, +0x01a8, 0x01a8, +0x01aa, 0x01ab, +0x01ad, 0x01ad, +0x01b0, 0x01b0, +0x01b4, 0x01b4, +0x01b6, 0x01b6, +0x01b9, 0x01ba, +0x01bd, 0x01bf, +0x01c6, 0x01c6, +0x01c9, 0x01c9, +0x01cc, 0x01cc, +0x01ce, 0x01ce, +0x01d0, 0x01d0, +0x01d2, 0x01d2, +0x01d4, 0x01d4, +0x01d6, 0x01d6, +0x01d8, 0x01d8, +0x01da, 0x01da, +0x01dc, 0x01dd, +0x01df, 0x01df, +0x01e1, 0x01e1, +0x01e3, 0x01e3, +0x01e5, 0x01e5, +0x01e7, 0x01e7, +0x01e9, 0x01e9, +0x01eb, 0x01eb, +0x01ed, 0x01ed, +0x01ef, 0x01f0, +0x01f3, 0x01f3, +0x01f5, 0x01f5, +0x01f9, 0x01f9, +0x01fb, 0x01fb, +0x01fd, 0x01fd, +0x01ff, 0x01ff, +0x0201, 0x0201, +0x0203, 0x0203, +0x0205, 0x0205, +0x0207, 0x0207, +0x0209, 0x0209, +0x020b, 0x020b, +0x020d, 0x020d, +0x020f, 0x020f, +0x0211, 0x0211, +0x0213, 0x0213, +0x0215, 0x0215, +0x0217, 0x0217, +0x0219, 0x0219, +0x021b, 0x021b, +0x021d, 0x021d, +0x021f, 0x021f, +0x0221, 0x0221, +0x0223, 0x0223, +0x0225, 0x0225, +0x0227, 0x0227, +0x0229, 0x0229, +0x022b, 0x022b, +0x022d, 0x022d, +0x022f, 0x022f, +0x0231, 0x0231, +0x0233, 0x0239, +0x023c, 0x023c, +0x023f, 0x0240, +0x0242, 0x0242, +0x0247, 0x0247, +0x0249, 0x0249, +0x024b, 0x024b, +0x024d, 0x024d, +0x024f, 0x0293, +0x0295, 0x02b8, +0x02c0, 0x02c1, +0x02e0, 0x02e4, +0x0345, 0x0345, +0x0371, 0x0371, +0x0373, 0x0373, +0x0377, 0x0377, +0x037a, 0x037d, +0x0390, 0x0390, +0x03ac, 0x03ce, +0x03d0, 0x03d1, +0x03d5, 0x03d7, +0x03d9, 0x03d9, +0x03db, 0x03db, +0x03dd, 0x03dd, +0x03df, 0x03df, +0x03e1, 0x03e1, +0x03e3, 0x03e3, +0x03e5, 0x03e5, +0x03e7, 0x03e7, +0x03e9, 0x03e9, +0x03eb, 0x03eb, +0x03ed, 0x03ed, +0x03ef, 0x03f3, +0x03f5, 0x03f5, +0x03f8, 0x03f8, +0x03fb, 0x03fc, +0x0430, 0x045f, +0x0461, 0x0461, +0x0463, 0x0463, +0x0465, 0x0465, +0x0467, 0x0467, +0x0469, 0x0469, +0x046b, 0x046b, +0x046d, 0x046d, +0x046f, 0x046f, +0x0471, 0x0471, +0x0473, 0x0473, +0x0475, 0x0475, +0x0477, 0x0477, +0x0479, 0x0479, +0x047b, 0x047b, +0x047d, 0x047d, +0x047f, 0x047f, +0x0481, 0x0481, +0x048b, 0x048b, +0x048d, 0x048d, +0x048f, 0x048f, +0x0491, 0x0491, +0x0493, 0x0493, +0x0495, 0x0495, +0x0497, 0x0497, +0x0499, 0x0499, +0x049b, 0x049b, +0x049d, 0x049d, +0x049f, 0x049f, +0x04a1, 0x04a1, +0x04a3, 0x04a3, +0x04a5, 0x04a5, +0x04a7, 0x04a7, +0x04a9, 0x04a9, +0x04ab, 0x04ab, +0x04ad, 0x04ad, +0x04af, 0x04af, +0x04b1, 0x04b1, +0x04b3, 0x04b3, +0x04b5, 0x04b5, +0x04b7, 0x04b7, +0x04b9, 0x04b9, +0x04bb, 0x04bb, +0x04bd, 0x04bd, +0x04bf, 0x04bf, +0x04c2, 0x04c2, +0x04c4, 0x04c4, +0x04c6, 0x04c6, +0x04c8, 0x04c8, +0x04ca, 0x04ca, +0x04cc, 0x04cc, +0x04ce, 0x04cf, +0x04d1, 0x04d1, +0x04d3, 0x04d3, +0x04d5, 0x04d5, +0x04d7, 0x04d7, +0x04d9, 0x04d9, +0x04db, 0x04db, +0x04dd, 0x04dd, +0x04df, 0x04df, +0x04e1, 0x04e1, +0x04e3, 0x04e3, +0x04e5, 0x04e5, +0x04e7, 0x04e7, +0x04e9, 0x04e9, +0x04eb, 0x04eb, +0x04ed, 0x04ed, +0x04ef, 0x04ef, +0x04f1, 0x04f1, +0x04f3, 0x04f3, +0x04f5, 0x04f5, +0x04f7, 0x04f7, +0x04f9, 0x04f9, +0x04fb, 0x04fb, +0x04fd, 0x04fd, +0x04ff, 0x04ff, +0x0501, 0x0501, +0x0503, 0x0503, +0x0505, 0x0505, +0x0507, 0x0507, +0x0509, 0x0509, +0x050b, 0x050b, +0x050d, 0x050d, +0x050f, 0x050f, +0x0511, 0x0511, +0x0513, 0x0513, +0x0515, 0x0515, +0x0517, 0x0517, +0x0519, 0x0519, +0x051b, 0x051b, +0x051d, 0x051d, +0x051f, 0x051f, +0x0521, 0x0521, +0x0523, 0x0523, +0x0525, 0x0525, +0x0527, 0x0527, +0x0529, 0x0529, +0x052b, 0x052b, +0x052d, 0x052d, +0x052f, 0x052f, +0x0560, 0x0588, +0x10d0, 0x10fa, +0x10fc, 0x10ff, +0x13f8, 0x13fd, +0x1c80, 0x1c88, +0x1c8a, 0x1c8a, +0x1d00, 0x1dbf, +0x1e01, 0x1e01, +0x1e03, 0x1e03, +0x1e05, 0x1e05, +0x1e07, 0x1e07, +0x1e09, 0x1e09, +0x1e0b, 0x1e0b, +0x1e0d, 0x1e0d, +0x1e0f, 0x1e0f, +0x1e11, 0x1e11, +0x1e13, 0x1e13, +0x1e15, 0x1e15, +0x1e17, 0x1e17, +0x1e19, 0x1e19, +0x1e1b, 0x1e1b, +0x1e1d, 0x1e1d, +0x1e1f, 0x1e1f, +0x1e21, 0x1e21, +0x1e23, 0x1e23, +0x1e25, 0x1e25, +0x1e27, 0x1e27, +0x1e29, 0x1e29, +0x1e2b, 0x1e2b, +0x1e2d, 0x1e2d, +0x1e2f, 0x1e2f, +0x1e31, 0x1e31, +0x1e33, 0x1e33, +0x1e35, 0x1e35, +0x1e37, 0x1e37, +0x1e39, 0x1e39, +0x1e3b, 0x1e3b, +0x1e3d, 0x1e3d, +0x1e3f, 0x1e3f, +0x1e41, 0x1e41, +0x1e43, 0x1e43, +0x1e45, 0x1e45, +0x1e47, 0x1e47, +0x1e49, 0x1e49, +0x1e4b, 0x1e4b, +0x1e4d, 0x1e4d, +0x1e4f, 0x1e4f, +0x1e51, 0x1e51, +0x1e53, 0x1e53, +0x1e55, 0x1e55, +0x1e57, 0x1e57, +0x1e59, 0x1e59, +0x1e5b, 0x1e5b, +0x1e5d, 0x1e5d, +0x1e5f, 0x1e5f, +0x1e61, 0x1e61, +0x1e63, 0x1e63, +0x1e65, 0x1e65, +0x1e67, 0x1e67, +0x1e69, 0x1e69, +0x1e6b, 0x1e6b, +0x1e6d, 0x1e6d, +0x1e6f, 0x1e6f, +0x1e71, 0x1e71, +0x1e73, 0x1e73, +0x1e75, 0x1e75, +0x1e77, 0x1e77, +0x1e79, 0x1e79, +0x1e7b, 0x1e7b, +0x1e7d, 0x1e7d, +0x1e7f, 0x1e7f, +0x1e81, 0x1e81, +0x1e83, 0x1e83, +0x1e85, 0x1e85, +0x1e87, 0x1e87, +0x1e89, 0x1e89, +0x1e8b, 0x1e8b, +0x1e8d, 0x1e8d, +0x1e8f, 0x1e8f, +0x1e91, 0x1e91, +0x1e93, 0x1e93, +0x1e95, 0x1e9d, +0x1e9f, 0x1e9f, +0x1ea1, 0x1ea1, +0x1ea3, 0x1ea3, +0x1ea5, 0x1ea5, +0x1ea7, 0x1ea7, +0x1ea9, 0x1ea9, +0x1eab, 0x1eab, +0x1ead, 0x1ead, +0x1eaf, 0x1eaf, +0x1eb1, 0x1eb1, +0x1eb3, 0x1eb3, +0x1eb5, 0x1eb5, +0x1eb7, 0x1eb7, +0x1eb9, 0x1eb9, +0x1ebb, 0x1ebb, +0x1ebd, 0x1ebd, +0x1ebf, 0x1ebf, +0x1ec1, 0x1ec1, +0x1ec3, 0x1ec3, +0x1ec5, 0x1ec5, +0x1ec7, 0x1ec7, +0x1ec9, 0x1ec9, +0x1ecb, 0x1ecb, +0x1ecd, 0x1ecd, +0x1ecf, 0x1ecf, +0x1ed1, 0x1ed1, +0x1ed3, 0x1ed3, +0x1ed5, 0x1ed5, +0x1ed7, 0x1ed7, +0x1ed9, 0x1ed9, +0x1edb, 0x1edb, +0x1edd, 0x1edd, +0x1edf, 0x1edf, +0x1ee1, 0x1ee1, +0x1ee3, 0x1ee3, +0x1ee5, 0x1ee5, +0x1ee7, 0x1ee7, +0x1ee9, 0x1ee9, +0x1eeb, 0x1eeb, +0x1eed, 0x1eed, +0x1eef, 0x1eef, +0x1ef1, 0x1ef1, +0x1ef3, 0x1ef3, +0x1ef5, 0x1ef5, +0x1ef7, 0x1ef7, +0x1ef9, 0x1ef9, +0x1efb, 0x1efb, +0x1efd, 0x1efd, +0x1eff, 0x1f07, +0x1f10, 0x1f15, +0x1f20, 0x1f27, +0x1f30, 0x1f37, +0x1f40, 0x1f45, +0x1f50, 0x1f57, +0x1f60, 0x1f67, +0x1f70, 0x1f7d, +0x1f80, 0x1f87, +0x1f90, 0x1f97, +0x1fa0, 0x1fa7, +0x1fb0, 0x1fb4, +0x1fb6, 0x1fb7, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fc7, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fd7, +0x1fe0, 0x1fe7, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ff7, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x210a, 0x210a, +0x210e, 0x210f, +0x2113, 0x2113, +0x212f, 0x212f, +0x2134, 0x2134, +0x2139, 0x2139, +0x213c, 0x213d, +0x2146, 0x2149, +0x214e, 0x214e, +0x2170, 0x217f, +0x2184, 0x2184, +0x24d0, 0x24e9, +0x2c30, 0x2c5f, +0x2c61, 0x2c61, +0x2c65, 0x2c66, +0x2c68, 0x2c68, +0x2c6a, 0x2c6a, +0x2c6c, 0x2c6c, +0x2c71, 0x2c71, +0x2c73, 0x2c74, +0x2c76, 0x2c7d, +0x2c81, 0x2c81, +0x2c83, 0x2c83, +0x2c85, 0x2c85, +0x2c87, 0x2c87, +0x2c89, 0x2c89, +0x2c8b, 0x2c8b, +0x2c8d, 0x2c8d, +0x2c8f, 0x2c8f, +0x2c91, 0x2c91, +0x2c93, 0x2c93, +0x2c95, 0x2c95, +0x2c97, 0x2c97, +0x2c99, 0x2c99, +0x2c9b, 0x2c9b, +0x2c9d, 0x2c9d, +0x2c9f, 0x2c9f, +0x2ca1, 0x2ca1, +0x2ca3, 0x2ca3, +0x2ca5, 0x2ca5, +0x2ca7, 0x2ca7, +0x2ca9, 0x2ca9, +0x2cab, 0x2cab, +0x2cad, 0x2cad, +0x2caf, 0x2caf, +0x2cb1, 0x2cb1, +0x2cb3, 0x2cb3, +0x2cb5, 0x2cb5, +0x2cb7, 0x2cb7, +0x2cb9, 0x2cb9, +0x2cbb, 0x2cbb, +0x2cbd, 0x2cbd, +0x2cbf, 0x2cbf, +0x2cc1, 0x2cc1, +0x2cc3, 0x2cc3, +0x2cc5, 0x2cc5, +0x2cc7, 0x2cc7, +0x2cc9, 0x2cc9, +0x2ccb, 0x2ccb, +0x2ccd, 0x2ccd, +0x2ccf, 0x2ccf, +0x2cd1, 0x2cd1, +0x2cd3, 0x2cd3, +0x2cd5, 0x2cd5, +0x2cd7, 0x2cd7, +0x2cd9, 0x2cd9, +0x2cdb, 0x2cdb, +0x2cdd, 0x2cdd, +0x2cdf, 0x2cdf, +0x2ce1, 0x2ce1, +0x2ce3, 0x2ce4, +0x2cec, 0x2cec, +0x2cee, 0x2cee, +0x2cf3, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0xa641, 0xa641, +0xa643, 0xa643, +0xa645, 0xa645, +0xa647, 0xa647, +0xa649, 0xa649, +0xa64b, 0xa64b, +0xa64d, 0xa64d, +0xa64f, 0xa64f, +0xa651, 0xa651, +0xa653, 0xa653, +0xa655, 0xa655, +0xa657, 0xa657, +0xa659, 0xa659, +0xa65b, 0xa65b, +0xa65d, 0xa65d, +0xa65f, 0xa65f, +0xa661, 0xa661, +0xa663, 0xa663, +0xa665, 0xa665, +0xa667, 0xa667, +0xa669, 0xa669, +0xa66b, 0xa66b, +0xa66d, 0xa66d, +0xa681, 0xa681, +0xa683, 0xa683, +0xa685, 0xa685, +0xa687, 0xa687, +0xa689, 0xa689, +0xa68b, 0xa68b, +0xa68d, 0xa68d, +0xa68f, 0xa68f, +0xa691, 0xa691, +0xa693, 0xa693, +0xa695, 0xa695, +0xa697, 0xa697, +0xa699, 0xa699, +0xa69b, 0xa69d, +0xa723, 0xa723, +0xa725, 0xa725, +0xa727, 0xa727, +0xa729, 0xa729, +0xa72b, 0xa72b, +0xa72d, 0xa72d, +0xa72f, 0xa731, +0xa733, 0xa733, +0xa735, 0xa735, +0xa737, 0xa737, +0xa739, 0xa739, +0xa73b, 0xa73b, +0xa73d, 0xa73d, +0xa73f, 0xa73f, +0xa741, 0xa741, +0xa743, 0xa743, +0xa745, 0xa745, +0xa747, 0xa747, +0xa749, 0xa749, +0xa74b, 0xa74b, +0xa74d, 0xa74d, +0xa74f, 0xa74f, +0xa751, 0xa751, +0xa753, 0xa753, +0xa755, 0xa755, +0xa757, 0xa757, +0xa759, 0xa759, +0xa75b, 0xa75b, +0xa75d, 0xa75d, +0xa75f, 0xa75f, +0xa761, 0xa761, +0xa763, 0xa763, +0xa765, 0xa765, +0xa767, 0xa767, +0xa769, 0xa769, +0xa76b, 0xa76b, +0xa76d, 0xa76d, +0xa76f, 0xa778, +0xa77a, 0xa77a, +0xa77c, 0xa77c, +0xa77f, 0xa77f, +0xa781, 0xa781, +0xa783, 0xa783, +0xa785, 0xa785, +0xa787, 0xa787, +0xa78c, 0xa78c, +0xa78e, 0xa78e, +0xa791, 0xa791, +0xa793, 0xa795, +0xa797, 0xa797, +0xa799, 0xa799, +0xa79b, 0xa79b, +0xa79d, 0xa79d, +0xa79f, 0xa79f, +0xa7a1, 0xa7a1, +0xa7a3, 0xa7a3, +0xa7a5, 0xa7a5, +0xa7a7, 0xa7a7, +0xa7a9, 0xa7a9, +0xa7af, 0xa7af, +0xa7b5, 0xa7b5, +0xa7b7, 0xa7b7, +0xa7b9, 0xa7b9, +0xa7bb, 0xa7bb, +0xa7bd, 0xa7bd, +0xa7bf, 0xa7bf, +0xa7c1, 0xa7c1, +0xa7c3, 0xa7c3, +0xa7c8, 0xa7c8, +0xa7ca, 0xa7ca, +0xa7cd, 0xa7cd, +0xa7d1, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7d5, +0xa7d7, 0xa7d7, +0xa7d9, 0xa7d9, +0xa7db, 0xa7db, +0xa7f2, 0xa7f4, +0xa7f6, 0xa7f6, +0xa7f8, 0xa7fa, +0xab30, 0xab5a, +0xab5c, 0xab69, +0xab70, 0xabbf, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xff41, 0xff5a, +0x10428, 0x1044f, +0x104d8, 0x104fb, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x10780, 0x10780, +0x10783, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10cc0, 0x10cf2, +0x10d70, 0x10d85, +0x118c0, 0x118df, +0x16e60, 0x16e7f, +0x1d41a, 0x1d433, +0x1d44e, 0x1d454, +0x1d456, 0x1d467, +0x1d482, 0x1d49b, +0x1d4b6, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d4cf, +0x1d4ea, 0x1d503, +0x1d51e, 0x1d537, +0x1d552, 0x1d56b, +0x1d586, 0x1d59f, +0x1d5ba, 0x1d5d3, +0x1d5ee, 0x1d607, +0x1d622, 0x1d63b, +0x1d656, 0x1d66f, +0x1d68a, 0x1d6a5, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6e1, +0x1d6fc, 0x1d714, +0x1d716, 0x1d71b, +0x1d736, 0x1d74e, +0x1d750, 0x1d755, +0x1d770, 0x1d788, +0x1d78a, 0x1d78f, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7c9, +0x1d7cb, 0x1d7cb, +0x1df00, 0x1df09, +0x1df0b, 0x1df1e, +0x1df25, 0x1df2a, +0x1e030, 0x1e06d, +0x1e922, 0x1e943, +}; /* END of CR_Lower */ + +/* PROPERTY: 'Print': POSIX [[:Print:]] */ +static const OnigCodePoint +CR_Print[] = { 733, +0x0020, 0x007e, +0x00a0, 0x0377, +0x037a, 0x037f, +0x0384, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x052f, +0x0531, 0x0556, +0x0559, 0x058a, +0x058d, 0x058f, +0x0591, 0x05c7, +0x05d0, 0x05ea, +0x05ef, 0x05f4, +0x0600, 0x070d, +0x070f, 0x074a, +0x074d, 0x07b1, +0x07c0, 0x07fa, +0x07fd, 0x082d, +0x0830, 0x083e, +0x0840, 0x085b, +0x085e, 0x085e, +0x0860, 0x086a, +0x0870, 0x088e, +0x0890, 0x0891, +0x0897, 0x0983, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bc, 0x09c4, +0x09c7, 0x09c8, +0x09cb, 0x09ce, +0x09d7, 0x09d7, +0x09dc, 0x09dd, +0x09df, 0x09e3, +0x09e6, 0x09fe, +0x0a01, 0x0a03, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a3c, 0x0a3c, +0x0a3e, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4d, +0x0a51, 0x0a51, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a66, 0x0a76, +0x0a81, 0x0a83, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abc, 0x0ac5, +0x0ac7, 0x0ac9, +0x0acb, 0x0acd, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae3, +0x0ae6, 0x0af1, +0x0af9, 0x0aff, +0x0b01, 0x0b03, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3c, 0x0b44, +0x0b47, 0x0b48, +0x0b4b, 0x0b4d, +0x0b55, 0x0b57, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b63, +0x0b66, 0x0b77, +0x0b82, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bbe, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcd, +0x0bd0, 0x0bd0, +0x0bd7, 0x0bd7, +0x0be6, 0x0bfa, +0x0c00, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3c, 0x0c44, +0x0c46, 0x0c48, +0x0c4a, 0x0c4d, +0x0c55, 0x0c56, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c63, +0x0c66, 0x0c6f, +0x0c77, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbc, 0x0cc4, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccd, +0x0cd5, 0x0cd6, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce3, +0x0ce6, 0x0cef, +0x0cf1, 0x0cf3, +0x0d00, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d44, +0x0d46, 0x0d48, +0x0d4a, 0x0d4f, +0x0d54, 0x0d63, +0x0d66, 0x0d7f, +0x0d81, 0x0d83, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0dca, 0x0dca, +0x0dcf, 0x0dd4, +0x0dd6, 0x0dd6, +0x0dd8, 0x0ddf, +0x0de6, 0x0def, +0x0df2, 0x0df4, +0x0e01, 0x0e3a, +0x0e3f, 0x0e5b, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0ec8, 0x0ece, +0x0ed0, 0x0ed9, +0x0edc, 0x0edf, +0x0f00, 0x0f47, +0x0f49, 0x0f6c, +0x0f71, 0x0f97, +0x0f99, 0x0fbc, +0x0fbe, 0x0fcc, +0x0fce, 0x0fda, +0x1000, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x135d, 0x137c, +0x1380, 0x1399, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1400, 0x169c, +0x16a0, 0x16f8, +0x1700, 0x1715, +0x171f, 0x1736, +0x1740, 0x1753, +0x1760, 0x176c, +0x176e, 0x1770, +0x1772, 0x1773, +0x1780, 0x17dd, +0x17e0, 0x17e9, +0x17f0, 0x17f9, +0x1800, 0x1819, +0x1820, 0x1878, +0x1880, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1920, 0x192b, +0x1930, 0x193b, +0x1940, 0x1940, +0x1944, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x19d0, 0x19da, +0x19de, 0x1a1b, +0x1a1e, 0x1a5e, +0x1a60, 0x1a7c, +0x1a7f, 0x1a89, +0x1a90, 0x1a99, +0x1aa0, 0x1aad, +0x1ab0, 0x1ace, +0x1b00, 0x1b4c, +0x1b4e, 0x1bf3, +0x1bfc, 0x1c37, +0x1c3b, 0x1c49, +0x1c4d, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cc7, +0x1cd0, 0x1cfa, +0x1d00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fc4, +0x1fc6, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fdd, 0x1fef, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffe, +0x2000, 0x2027, +0x202a, 0x2064, +0x2066, 0x2071, +0x2074, 0x208e, +0x2090, 0x209c, +0x20a0, 0x20c0, +0x20d0, 0x20f0, +0x2100, 0x218b, +0x2190, 0x2429, +0x2440, 0x244a, +0x2460, 0x2b73, +0x2b76, 0x2b95, +0x2b97, 0x2cf3, +0x2cf9, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d70, +0x2d7f, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x2de0, 0x2e5d, +0x2e80, 0x2e99, +0x2e9b, 0x2ef3, +0x2f00, 0x2fd5, +0x2ff0, 0x303f, +0x3041, 0x3096, +0x3099, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x3190, 0x31e5, +0x31ef, 0x321e, +0x3220, 0xa48c, +0xa490, 0xa4c6, +0xa4d0, 0xa62b, +0xa640, 0xa6f7, +0xa700, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa82c, +0xa830, 0xa839, +0xa840, 0xa877, +0xa880, 0xa8c5, +0xa8ce, 0xa8d9, +0xa8e0, 0xa953, +0xa95f, 0xa97c, +0xa980, 0xa9cd, +0xa9cf, 0xa9d9, +0xa9de, 0xa9fe, +0xaa00, 0xaa36, +0xaa40, 0xaa4d, +0xaa50, 0xaa59, +0xaa5c, 0xaac2, +0xaadb, 0xaaf6, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab6b, +0xab70, 0xabed, +0xabf0, 0xabf9, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xe000, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbc2, +0xfbd3, 0xfd8f, +0xfd92, 0xfdc7, +0xfdcf, 0xfdcf, +0xfdf0, 0xfe19, +0xfe20, 0xfe52, +0xfe54, 0xfe66, +0xfe68, 0xfe6b, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0xfeff, 0xfeff, +0xff01, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0xffe0, 0xffe6, +0xffe8, 0xffee, +0xfff9, 0xfffd, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10100, 0x10102, +0x10107, 0x10133, +0x10137, 0x1018e, +0x10190, 0x1019c, +0x101a0, 0x101a0, +0x101d0, 0x101fd, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x102e0, 0x102fb, +0x10300, 0x10323, +0x1032d, 0x1034a, +0x10350, 0x1037a, +0x10380, 0x1039d, +0x1039f, 0x103c3, +0x103c8, 0x103d5, +0x10400, 0x1049d, +0x104a0, 0x104a9, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x1056f, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10857, 0x1089e, +0x108a7, 0x108af, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x108fb, 0x1091b, +0x1091f, 0x10939, +0x1093f, 0x1093f, +0x10980, 0x109b7, +0x109bc, 0x109cf, +0x109d2, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a38, 0x10a3a, +0x10a3f, 0x10a48, +0x10a50, 0x10a58, +0x10a60, 0x10a9f, +0x10ac0, 0x10ae6, +0x10aeb, 0x10af6, +0x10b00, 0x10b35, +0x10b39, 0x10b55, +0x10b58, 0x10b72, +0x10b78, 0x10b91, +0x10b99, 0x10b9c, +0x10ba9, 0x10baf, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10cfa, 0x10d27, +0x10d30, 0x10d39, +0x10d40, 0x10d65, +0x10d69, 0x10d85, +0x10d8e, 0x10d8f, +0x10e60, 0x10e7e, +0x10e80, 0x10ea9, +0x10eab, 0x10ead, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10efc, 0x10f27, +0x10f30, 0x10f59, +0x10f70, 0x10f89, +0x10fb0, 0x10fcb, +0x10fe0, 0x10ff6, +0x11000, 0x1104d, +0x11052, 0x11075, +0x1107f, 0x110c2, +0x110cd, 0x110cd, +0x110d0, 0x110e8, +0x110f0, 0x110f9, +0x11100, 0x11134, +0x11136, 0x11147, +0x11150, 0x11176, +0x11180, 0x111df, +0x111e1, 0x111f4, +0x11200, 0x11211, +0x11213, 0x11241, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a9, +0x112b0, 0x112ea, +0x112f0, 0x112f9, +0x11300, 0x11303, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133b, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134d, +0x11350, 0x11350, +0x11357, 0x11357, +0x1135d, 0x11363, +0x11366, 0x1136c, +0x11370, 0x11374, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113d5, +0x113d7, 0x113d8, +0x113e1, 0x113e2, +0x11400, 0x1145b, +0x1145d, 0x11461, +0x11480, 0x114c7, +0x114d0, 0x114d9, +0x11580, 0x115b5, +0x115b8, 0x115dd, +0x11600, 0x11644, +0x11650, 0x11659, +0x11660, 0x1166c, +0x11680, 0x116b9, +0x116c0, 0x116c9, +0x116d0, 0x116e3, +0x11700, 0x1171a, +0x1171d, 0x1172b, +0x11730, 0x11746, +0x11800, 0x1183b, +0x118a0, 0x118f2, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x11935, +0x11937, 0x11938, +0x1193b, 0x11946, +0x11950, 0x11959, +0x119a0, 0x119a7, +0x119aa, 0x119d7, +0x119da, 0x119e4, +0x11a00, 0x11a47, +0x11a50, 0x11aa2, +0x11ab0, 0x11af8, +0x11b00, 0x11b09, +0x11bc0, 0x11be1, +0x11bf0, 0x11bf9, +0x11c00, 0x11c08, +0x11c0a, 0x11c36, +0x11c38, 0x11c45, +0x11c50, 0x11c6c, +0x11c70, 0x11c8f, +0x11c92, 0x11ca7, +0x11ca9, 0x11cb6, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d47, +0x11d50, 0x11d59, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d8e, +0x11d90, 0x11d91, +0x11d93, 0x11d98, +0x11da0, 0x11da9, +0x11ee0, 0x11ef8, +0x11f00, 0x11f10, +0x11f12, 0x11f3a, +0x11f3e, 0x11f5a, +0x11fb0, 0x11fb0, +0x11fc0, 0x11ff1, +0x11fff, 0x12399, +0x12400, 0x1246e, +0x12470, 0x12474, +0x12480, 0x12543, +0x12f90, 0x12ff2, +0x13000, 0x13455, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x16139, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a60, 0x16a69, +0x16a6e, 0x16abe, +0x16ac0, 0x16ac9, +0x16ad0, 0x16aed, +0x16af0, 0x16af5, +0x16b00, 0x16b45, +0x16b50, 0x16b59, +0x16b5b, 0x16b61, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d79, +0x16e40, 0x16e9a, +0x16f00, 0x16f4a, +0x16f4f, 0x16f87, +0x16f8f, 0x16f9f, +0x16fe0, 0x16fe4, +0x16ff0, 0x16ff1, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1bc9c, 0x1bca3, +0x1cc00, 0x1ccf9, +0x1cd00, 0x1ceb3, +0x1cf00, 0x1cf2d, +0x1cf30, 0x1cf46, +0x1cf50, 0x1cfc3, +0x1d000, 0x1d0f5, +0x1d100, 0x1d126, +0x1d129, 0x1d1ea, +0x1d200, 0x1d245, +0x1d2c0, 0x1d2d3, +0x1d2e0, 0x1d2f3, +0x1d300, 0x1d356, +0x1d360, 0x1d378, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d7cb, +0x1d7ce, 0x1da8b, +0x1da9b, 0x1da9f, +0x1daa1, 0x1daaf, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e030, 0x1e06d, +0x1e08f, 0x1e08f, +0x1e100, 0x1e12c, +0x1e130, 0x1e13d, +0x1e140, 0x1e149, +0x1e14e, 0x1e14f, +0x1e290, 0x1e2ae, +0x1e2c0, 0x1e2f9, +0x1e2ff, 0x1e2ff, +0x1e4d0, 0x1e4f9, +0x1e5d0, 0x1e5fa, +0x1e5ff, 0x1e5ff, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e8c7, 0x1e8d6, +0x1e900, 0x1e94b, +0x1e950, 0x1e959, +0x1e95e, 0x1e95f, +0x1ec71, 0x1ecb4, +0x1ed01, 0x1ed3d, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x1eef0, 0x1eef1, +0x1f000, 0x1f02b, +0x1f030, 0x1f093, +0x1f0a0, 0x1f0ae, +0x1f0b1, 0x1f0bf, +0x1f0c1, 0x1f0cf, +0x1f0d1, 0x1f0f5, +0x1f100, 0x1f1ad, +0x1f1e6, 0x1f202, +0x1f210, 0x1f23b, +0x1f240, 0x1f248, +0x1f250, 0x1f251, +0x1f260, 0x1f265, +0x1f300, 0x1f6d7, +0x1f6dc, 0x1f6ec, +0x1f6f0, 0x1f6fc, +0x1f700, 0x1f776, +0x1f77b, 0x1f7d9, +0x1f7e0, 0x1f7eb, +0x1f7f0, 0x1f7f0, +0x1f800, 0x1f80b, +0x1f810, 0x1f847, +0x1f850, 0x1f859, +0x1f860, 0x1f887, +0x1f890, 0x1f8ad, +0x1f8b0, 0x1f8bb, +0x1f8c0, 0x1f8c1, +0x1f900, 0x1fa53, +0x1fa60, 0x1fa6d, +0x1fa70, 0x1fa7c, +0x1fa80, 0x1fa89, +0x1fa8f, 0x1fac6, +0x1face, 0x1fadc, +0x1fadf, 0x1fae9, +0x1faf0, 0x1faf8, +0x1fb00, 0x1fb92, +0x1fb94, 0x1fbf9, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +0xe0001, 0xe0001, +0xe0020, 0xe007f, +0xe0100, 0xe01ef, +0xf0000, 0xffffd, +0x100000, 0x10fffd, +}; /* END of CR_Print */ + +/* PROPERTY: 'PosixPunct': POSIX [[:punct:]] */ +static const OnigCodePoint +CR_PosixPunct[] = { 349, +0x0021, 0x002f, +0x003a, 0x0040, +0x005b, 0x0060, +0x007b, 0x007e, +0x00a1, 0x00a9, +0x00ab, 0x00ac, +0x00ae, 0x00b1, +0x00b4, 0x00b4, +0x00b6, 0x00b8, +0x00bb, 0x00bb, +0x00bf, 0x00bf, +0x00d7, 0x00d7, +0x00f7, 0x00f7, +0x02c2, 0x02c5, +0x02d2, 0x02df, +0x02e5, 0x02eb, +0x02ed, 0x02ed, +0x02ef, 0x02ff, +0x0375, 0x0375, +0x037e, 0x037e, +0x0384, 0x0385, +0x0387, 0x0387, +0x03f6, 0x03f6, +0x0482, 0x0482, +0x055a, 0x055f, +0x0589, 0x058a, +0x058d, 0x058f, +0x05be, 0x05be, +0x05c0, 0x05c0, +0x05c3, 0x05c3, +0x05c6, 0x05c6, +0x05f3, 0x05f4, +0x0606, 0x060f, +0x061b, 0x061b, +0x061d, 0x061f, +0x066a, 0x066d, +0x06d4, 0x06d4, +0x06de, 0x06de, +0x06e9, 0x06e9, +0x06fd, 0x06fe, +0x0700, 0x070d, +0x07f6, 0x07f9, +0x07fe, 0x07ff, +0x0830, 0x083e, +0x085e, 0x085e, +0x0888, 0x0888, +0x0964, 0x0965, +0x0970, 0x0970, +0x09f2, 0x09f3, +0x09fa, 0x09fb, +0x09fd, 0x09fd, +0x0a76, 0x0a76, +0x0af0, 0x0af1, +0x0b70, 0x0b70, +0x0bf3, 0x0bfa, +0x0c77, 0x0c77, +0x0c7f, 0x0c7f, +0x0c84, 0x0c84, +0x0d4f, 0x0d4f, +0x0d79, 0x0d79, +0x0df4, 0x0df4, +0x0e3f, 0x0e3f, +0x0e4f, 0x0e4f, +0x0e5a, 0x0e5b, +0x0f01, 0x0f17, +0x0f1a, 0x0f1f, +0x0f34, 0x0f34, +0x0f36, 0x0f36, +0x0f38, 0x0f38, +0x0f3a, 0x0f3d, +0x0f85, 0x0f85, +0x0fbe, 0x0fc5, +0x0fc7, 0x0fcc, +0x0fce, 0x0fda, +0x104a, 0x104f, +0x109e, 0x109f, +0x10fb, 0x10fb, +0x1360, 0x1368, +0x1390, 0x1399, +0x1400, 0x1400, +0x166d, 0x166e, +0x169b, 0x169c, +0x16eb, 0x16ed, +0x1735, 0x1736, +0x17d4, 0x17d6, +0x17d8, 0x17db, +0x1800, 0x180a, +0x1940, 0x1940, +0x1944, 0x1945, +0x19de, 0x19ff, +0x1a1e, 0x1a1f, +0x1aa0, 0x1aa6, +0x1aa8, 0x1aad, +0x1b4e, 0x1b4f, +0x1b5a, 0x1b6a, +0x1b74, 0x1b7f, +0x1bfc, 0x1bff, +0x1c3b, 0x1c3f, +0x1c7e, 0x1c7f, +0x1cc0, 0x1cc7, +0x1cd3, 0x1cd3, +0x1fbd, 0x1fbd, +0x1fbf, 0x1fc1, +0x1fcd, 0x1fcf, +0x1fdd, 0x1fdf, +0x1fed, 0x1fef, +0x1ffd, 0x1ffe, +0x2010, 0x2027, +0x2030, 0x205e, +0x207a, 0x207e, +0x208a, 0x208e, +0x20a0, 0x20c0, +0x2100, 0x2101, +0x2103, 0x2106, +0x2108, 0x2109, +0x2114, 0x2114, +0x2116, 0x2118, +0x211e, 0x2123, +0x2125, 0x2125, +0x2127, 0x2127, +0x2129, 0x2129, +0x212e, 0x212e, +0x213a, 0x213b, +0x2140, 0x2144, +0x214a, 0x214d, +0x214f, 0x214f, +0x218a, 0x218b, +0x2190, 0x2429, +0x2440, 0x244a, +0x249c, 0x24e9, +0x2500, 0x2775, +0x2794, 0x2b73, +0x2b76, 0x2b95, +0x2b97, 0x2bff, +0x2ce5, 0x2cea, +0x2cf9, 0x2cfc, +0x2cfe, 0x2cff, +0x2d70, 0x2d70, +0x2e00, 0x2e2e, +0x2e30, 0x2e5d, +0x2e80, 0x2e99, +0x2e9b, 0x2ef3, +0x2f00, 0x2fd5, +0x2ff0, 0x2fff, +0x3001, 0x3004, +0x3008, 0x3020, +0x3030, 0x3030, +0x3036, 0x3037, +0x303d, 0x303f, +0x309b, 0x309c, +0x30a0, 0x30a0, +0x30fb, 0x30fb, +0x3190, 0x3191, +0x3196, 0x319f, +0x31c0, 0x31e5, +0x31ef, 0x31ef, +0x3200, 0x321e, +0x322a, 0x3247, +0x3250, 0x3250, +0x3260, 0x327f, +0x328a, 0x32b0, +0x32c0, 0x33ff, +0x4dc0, 0x4dff, +0xa490, 0xa4c6, +0xa4fe, 0xa4ff, +0xa60d, 0xa60f, +0xa673, 0xa673, +0xa67e, 0xa67e, +0xa6f2, 0xa6f7, +0xa700, 0xa716, +0xa720, 0xa721, +0xa789, 0xa78a, +0xa828, 0xa82b, +0xa836, 0xa839, +0xa874, 0xa877, +0xa8ce, 0xa8cf, +0xa8f8, 0xa8fa, +0xa8fc, 0xa8fc, +0xa92e, 0xa92f, +0xa95f, 0xa95f, +0xa9c1, 0xa9cd, +0xa9de, 0xa9df, +0xaa5c, 0xaa5f, +0xaa77, 0xaa79, +0xaade, 0xaadf, +0xaaf0, 0xaaf1, +0xab5b, 0xab5b, +0xab6a, 0xab6b, +0xabeb, 0xabeb, +0xfb29, 0xfb29, +0xfbb2, 0xfbc2, +0xfd3e, 0xfd4f, +0xfdcf, 0xfdcf, +0xfdfc, 0xfdff, +0xfe10, 0xfe19, +0xfe30, 0xfe52, +0xfe54, 0xfe66, +0xfe68, 0xfe6b, +0xff01, 0xff0f, +0xff1a, 0xff20, +0xff3b, 0xff40, +0xff5b, 0xff65, +0xffe0, 0xffe6, +0xffe8, 0xffee, +0xfffc, 0xfffd, +0x10100, 0x10102, +0x10137, 0x1013f, +0x10179, 0x10189, +0x1018c, 0x1018e, +0x10190, 0x1019c, +0x101a0, 0x101a0, +0x101d0, 0x101fc, +0x1039f, 0x1039f, +0x103d0, 0x103d0, +0x1056f, 0x1056f, +0x10857, 0x10857, +0x10877, 0x10878, +0x1091f, 0x1091f, +0x1093f, 0x1093f, +0x10a50, 0x10a58, +0x10a7f, 0x10a7f, +0x10ac8, 0x10ac8, +0x10af0, 0x10af6, +0x10b39, 0x10b3f, +0x10b99, 0x10b9c, +0x10d6e, 0x10d6e, +0x10d8e, 0x10d8f, +0x10ead, 0x10ead, +0x10f55, 0x10f59, +0x10f86, 0x10f89, +0x11047, 0x1104d, +0x110bb, 0x110bc, +0x110be, 0x110c1, +0x11140, 0x11143, +0x11174, 0x11175, +0x111c5, 0x111c8, +0x111cd, 0x111cd, +0x111db, 0x111db, +0x111dd, 0x111df, +0x11238, 0x1123d, +0x112a9, 0x112a9, +0x113d4, 0x113d5, +0x113d7, 0x113d8, +0x1144b, 0x1144f, +0x1145a, 0x1145b, +0x1145d, 0x1145d, +0x114c6, 0x114c6, +0x115c1, 0x115d7, +0x11641, 0x11643, +0x11660, 0x1166c, +0x116b9, 0x116b9, +0x1173c, 0x1173f, +0x1183b, 0x1183b, +0x11944, 0x11946, +0x119e2, 0x119e2, +0x11a3f, 0x11a46, +0x11a9a, 0x11a9c, +0x11a9e, 0x11aa2, +0x11b00, 0x11b09, +0x11be1, 0x11be1, +0x11c41, 0x11c45, +0x11c70, 0x11c71, +0x11ef7, 0x11ef8, +0x11f43, 0x11f4f, +0x11fd5, 0x11ff1, +0x11fff, 0x11fff, +0x12470, 0x12474, +0x12ff1, 0x12ff2, +0x16a6e, 0x16a6f, +0x16af5, 0x16af5, +0x16b37, 0x16b3f, +0x16b44, 0x16b45, +0x16d6d, 0x16d6f, +0x16e97, 0x16e9a, +0x16fe2, 0x16fe2, +0x1bc9c, 0x1bc9c, +0x1bc9f, 0x1bc9f, +0x1cc00, 0x1ccef, +0x1cd00, 0x1ceb3, +0x1cf50, 0x1cfc3, +0x1d000, 0x1d0f5, +0x1d100, 0x1d126, +0x1d129, 0x1d164, +0x1d16a, 0x1d16c, +0x1d183, 0x1d184, +0x1d18c, 0x1d1a9, +0x1d1ae, 0x1d1ea, +0x1d200, 0x1d241, +0x1d245, 0x1d245, +0x1d300, 0x1d356, +0x1d6c1, 0x1d6c1, +0x1d6db, 0x1d6db, +0x1d6fb, 0x1d6fb, +0x1d715, 0x1d715, +0x1d735, 0x1d735, +0x1d74f, 0x1d74f, +0x1d76f, 0x1d76f, +0x1d789, 0x1d789, +0x1d7a9, 0x1d7a9, +0x1d7c3, 0x1d7c3, +0x1d800, 0x1d9ff, +0x1da37, 0x1da3a, +0x1da6d, 0x1da74, +0x1da76, 0x1da83, +0x1da85, 0x1da8b, +0x1e14f, 0x1e14f, +0x1e2ff, 0x1e2ff, +0x1e5ff, 0x1e5ff, +0x1e95e, 0x1e95f, +0x1ecac, 0x1ecac, +0x1ecb0, 0x1ecb0, +0x1ed2e, 0x1ed2e, +0x1eef0, 0x1eef1, +0x1f000, 0x1f02b, +0x1f030, 0x1f093, +0x1f0a0, 0x1f0ae, +0x1f0b1, 0x1f0bf, +0x1f0c1, 0x1f0cf, +0x1f0d1, 0x1f0f5, +0x1f10d, 0x1f1ad, +0x1f1e6, 0x1f202, +0x1f210, 0x1f23b, +0x1f240, 0x1f248, +0x1f250, 0x1f251, +0x1f260, 0x1f265, +0x1f300, 0x1f6d7, +0x1f6dc, 0x1f6ec, +0x1f6f0, 0x1f6fc, +0x1f700, 0x1f776, +0x1f77b, 0x1f7d9, +0x1f7e0, 0x1f7eb, +0x1f7f0, 0x1f7f0, +0x1f800, 0x1f80b, +0x1f810, 0x1f847, +0x1f850, 0x1f859, +0x1f860, 0x1f887, +0x1f890, 0x1f8ad, +0x1f8b0, 0x1f8bb, +0x1f8c0, 0x1f8c1, +0x1f900, 0x1fa53, +0x1fa60, 0x1fa6d, +0x1fa70, 0x1fa7c, +0x1fa80, 0x1fa89, +0x1fa8f, 0x1fac6, +0x1face, 0x1fadc, +0x1fadf, 0x1fae9, +0x1faf0, 0x1faf8, +0x1fb00, 0x1fb92, +0x1fb94, 0x1fbef, +}; /* END of CR_PosixPunct */ + +/* PROPERTY: 'Space': POSIX [[:Space:]] */ +static const OnigCodePoint +CR_Space[] = { 10, +0x0009, 0x000d, +0x0020, 0x0020, +0x0085, 0x0085, +0x00a0, 0x00a0, +0x1680, 0x1680, +0x2000, 0x200a, +0x2028, 0x2029, +0x202f, 0x202f, +0x205f, 0x205f, +0x3000, 0x3000, +}; /* END of CR_Space */ + +/* PROPERTY: 'Upper': POSIX [[:Upper:]] */ +static const OnigCodePoint +CR_Upper[] = { 656, +0x0041, 0x005a, +0x00c0, 0x00d6, +0x00d8, 0x00de, +0x0100, 0x0100, +0x0102, 0x0102, +0x0104, 0x0104, +0x0106, 0x0106, +0x0108, 0x0108, +0x010a, 0x010a, +0x010c, 0x010c, +0x010e, 0x010e, +0x0110, 0x0110, +0x0112, 0x0112, +0x0114, 0x0114, +0x0116, 0x0116, +0x0118, 0x0118, +0x011a, 0x011a, +0x011c, 0x011c, +0x011e, 0x011e, +0x0120, 0x0120, +0x0122, 0x0122, +0x0124, 0x0124, +0x0126, 0x0126, +0x0128, 0x0128, +0x012a, 0x012a, +0x012c, 0x012c, +0x012e, 0x012e, +0x0130, 0x0130, +0x0132, 0x0132, +0x0134, 0x0134, +0x0136, 0x0136, +0x0139, 0x0139, +0x013b, 0x013b, +0x013d, 0x013d, +0x013f, 0x013f, +0x0141, 0x0141, +0x0143, 0x0143, +0x0145, 0x0145, +0x0147, 0x0147, +0x014a, 0x014a, +0x014c, 0x014c, +0x014e, 0x014e, +0x0150, 0x0150, +0x0152, 0x0152, +0x0154, 0x0154, +0x0156, 0x0156, +0x0158, 0x0158, +0x015a, 0x015a, +0x015c, 0x015c, +0x015e, 0x015e, +0x0160, 0x0160, +0x0162, 0x0162, +0x0164, 0x0164, +0x0166, 0x0166, +0x0168, 0x0168, +0x016a, 0x016a, +0x016c, 0x016c, +0x016e, 0x016e, +0x0170, 0x0170, +0x0172, 0x0172, +0x0174, 0x0174, +0x0176, 0x0176, +0x0178, 0x0179, +0x017b, 0x017b, +0x017d, 0x017d, +0x0181, 0x0182, +0x0184, 0x0184, +0x0186, 0x0187, +0x0189, 0x018b, +0x018e, 0x0191, +0x0193, 0x0194, +0x0196, 0x0198, +0x019c, 0x019d, +0x019f, 0x01a0, +0x01a2, 0x01a2, +0x01a4, 0x01a4, +0x01a6, 0x01a7, +0x01a9, 0x01a9, +0x01ac, 0x01ac, +0x01ae, 0x01af, +0x01b1, 0x01b3, +0x01b5, 0x01b5, +0x01b7, 0x01b8, +0x01bc, 0x01bc, +0x01c4, 0x01c4, +0x01c7, 0x01c7, +0x01ca, 0x01ca, +0x01cd, 0x01cd, +0x01cf, 0x01cf, +0x01d1, 0x01d1, +0x01d3, 0x01d3, +0x01d5, 0x01d5, +0x01d7, 0x01d7, +0x01d9, 0x01d9, +0x01db, 0x01db, +0x01de, 0x01de, +0x01e0, 0x01e0, +0x01e2, 0x01e2, +0x01e4, 0x01e4, +0x01e6, 0x01e6, +0x01e8, 0x01e8, +0x01ea, 0x01ea, +0x01ec, 0x01ec, +0x01ee, 0x01ee, +0x01f1, 0x01f1, +0x01f4, 0x01f4, +0x01f6, 0x01f8, +0x01fa, 0x01fa, +0x01fc, 0x01fc, +0x01fe, 0x01fe, +0x0200, 0x0200, +0x0202, 0x0202, +0x0204, 0x0204, +0x0206, 0x0206, +0x0208, 0x0208, +0x020a, 0x020a, +0x020c, 0x020c, +0x020e, 0x020e, +0x0210, 0x0210, +0x0212, 0x0212, +0x0214, 0x0214, +0x0216, 0x0216, +0x0218, 0x0218, +0x021a, 0x021a, +0x021c, 0x021c, +0x021e, 0x021e, +0x0220, 0x0220, +0x0222, 0x0222, +0x0224, 0x0224, +0x0226, 0x0226, +0x0228, 0x0228, +0x022a, 0x022a, +0x022c, 0x022c, +0x022e, 0x022e, +0x0230, 0x0230, +0x0232, 0x0232, +0x023a, 0x023b, +0x023d, 0x023e, +0x0241, 0x0241, +0x0243, 0x0246, +0x0248, 0x0248, +0x024a, 0x024a, +0x024c, 0x024c, +0x024e, 0x024e, +0x0370, 0x0370, +0x0372, 0x0372, +0x0376, 0x0376, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x038f, +0x0391, 0x03a1, +0x03a3, 0x03ab, +0x03cf, 0x03cf, +0x03d2, 0x03d4, +0x03d8, 0x03d8, +0x03da, 0x03da, +0x03dc, 0x03dc, +0x03de, 0x03de, +0x03e0, 0x03e0, +0x03e2, 0x03e2, +0x03e4, 0x03e4, +0x03e6, 0x03e6, +0x03e8, 0x03e8, +0x03ea, 0x03ea, +0x03ec, 0x03ec, +0x03ee, 0x03ee, +0x03f4, 0x03f4, +0x03f7, 0x03f7, +0x03f9, 0x03fa, +0x03fd, 0x042f, +0x0460, 0x0460, +0x0462, 0x0462, +0x0464, 0x0464, +0x0466, 0x0466, +0x0468, 0x0468, +0x046a, 0x046a, +0x046c, 0x046c, +0x046e, 0x046e, +0x0470, 0x0470, +0x0472, 0x0472, +0x0474, 0x0474, +0x0476, 0x0476, +0x0478, 0x0478, +0x047a, 0x047a, +0x047c, 0x047c, +0x047e, 0x047e, +0x0480, 0x0480, +0x048a, 0x048a, +0x048c, 0x048c, +0x048e, 0x048e, +0x0490, 0x0490, +0x0492, 0x0492, +0x0494, 0x0494, +0x0496, 0x0496, +0x0498, 0x0498, +0x049a, 0x049a, +0x049c, 0x049c, +0x049e, 0x049e, +0x04a0, 0x04a0, +0x04a2, 0x04a2, +0x04a4, 0x04a4, +0x04a6, 0x04a6, +0x04a8, 0x04a8, +0x04aa, 0x04aa, +0x04ac, 0x04ac, +0x04ae, 0x04ae, +0x04b0, 0x04b0, +0x04b2, 0x04b2, +0x04b4, 0x04b4, +0x04b6, 0x04b6, +0x04b8, 0x04b8, +0x04ba, 0x04ba, +0x04bc, 0x04bc, +0x04be, 0x04be, +0x04c0, 0x04c1, +0x04c3, 0x04c3, +0x04c5, 0x04c5, +0x04c7, 0x04c7, +0x04c9, 0x04c9, +0x04cb, 0x04cb, +0x04cd, 0x04cd, +0x04d0, 0x04d0, +0x04d2, 0x04d2, +0x04d4, 0x04d4, +0x04d6, 0x04d6, +0x04d8, 0x04d8, +0x04da, 0x04da, +0x04dc, 0x04dc, +0x04de, 0x04de, +0x04e0, 0x04e0, +0x04e2, 0x04e2, +0x04e4, 0x04e4, +0x04e6, 0x04e6, +0x04e8, 0x04e8, +0x04ea, 0x04ea, +0x04ec, 0x04ec, +0x04ee, 0x04ee, +0x04f0, 0x04f0, +0x04f2, 0x04f2, +0x04f4, 0x04f4, +0x04f6, 0x04f6, +0x04f8, 0x04f8, +0x04fa, 0x04fa, +0x04fc, 0x04fc, +0x04fe, 0x04fe, +0x0500, 0x0500, +0x0502, 0x0502, +0x0504, 0x0504, +0x0506, 0x0506, +0x0508, 0x0508, +0x050a, 0x050a, +0x050c, 0x050c, +0x050e, 0x050e, +0x0510, 0x0510, +0x0512, 0x0512, +0x0514, 0x0514, +0x0516, 0x0516, +0x0518, 0x0518, +0x051a, 0x051a, +0x051c, 0x051c, +0x051e, 0x051e, +0x0520, 0x0520, +0x0522, 0x0522, +0x0524, 0x0524, +0x0526, 0x0526, +0x0528, 0x0528, +0x052a, 0x052a, +0x052c, 0x052c, +0x052e, 0x052e, +0x0531, 0x0556, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x13a0, 0x13f5, +0x1c89, 0x1c89, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1e00, 0x1e00, +0x1e02, 0x1e02, +0x1e04, 0x1e04, +0x1e06, 0x1e06, +0x1e08, 0x1e08, +0x1e0a, 0x1e0a, +0x1e0c, 0x1e0c, +0x1e0e, 0x1e0e, +0x1e10, 0x1e10, +0x1e12, 0x1e12, +0x1e14, 0x1e14, +0x1e16, 0x1e16, +0x1e18, 0x1e18, +0x1e1a, 0x1e1a, +0x1e1c, 0x1e1c, +0x1e1e, 0x1e1e, +0x1e20, 0x1e20, +0x1e22, 0x1e22, +0x1e24, 0x1e24, +0x1e26, 0x1e26, +0x1e28, 0x1e28, +0x1e2a, 0x1e2a, +0x1e2c, 0x1e2c, +0x1e2e, 0x1e2e, +0x1e30, 0x1e30, +0x1e32, 0x1e32, +0x1e34, 0x1e34, +0x1e36, 0x1e36, +0x1e38, 0x1e38, +0x1e3a, 0x1e3a, +0x1e3c, 0x1e3c, +0x1e3e, 0x1e3e, +0x1e40, 0x1e40, +0x1e42, 0x1e42, +0x1e44, 0x1e44, +0x1e46, 0x1e46, +0x1e48, 0x1e48, +0x1e4a, 0x1e4a, +0x1e4c, 0x1e4c, +0x1e4e, 0x1e4e, +0x1e50, 0x1e50, +0x1e52, 0x1e52, +0x1e54, 0x1e54, +0x1e56, 0x1e56, +0x1e58, 0x1e58, +0x1e5a, 0x1e5a, +0x1e5c, 0x1e5c, +0x1e5e, 0x1e5e, +0x1e60, 0x1e60, +0x1e62, 0x1e62, +0x1e64, 0x1e64, +0x1e66, 0x1e66, +0x1e68, 0x1e68, +0x1e6a, 0x1e6a, +0x1e6c, 0x1e6c, +0x1e6e, 0x1e6e, +0x1e70, 0x1e70, +0x1e72, 0x1e72, +0x1e74, 0x1e74, +0x1e76, 0x1e76, +0x1e78, 0x1e78, +0x1e7a, 0x1e7a, +0x1e7c, 0x1e7c, +0x1e7e, 0x1e7e, +0x1e80, 0x1e80, +0x1e82, 0x1e82, +0x1e84, 0x1e84, +0x1e86, 0x1e86, +0x1e88, 0x1e88, +0x1e8a, 0x1e8a, +0x1e8c, 0x1e8c, +0x1e8e, 0x1e8e, +0x1e90, 0x1e90, +0x1e92, 0x1e92, +0x1e94, 0x1e94, +0x1e9e, 0x1e9e, +0x1ea0, 0x1ea0, +0x1ea2, 0x1ea2, +0x1ea4, 0x1ea4, +0x1ea6, 0x1ea6, +0x1ea8, 0x1ea8, +0x1eaa, 0x1eaa, +0x1eac, 0x1eac, +0x1eae, 0x1eae, +0x1eb0, 0x1eb0, +0x1eb2, 0x1eb2, +0x1eb4, 0x1eb4, +0x1eb6, 0x1eb6, +0x1eb8, 0x1eb8, +0x1eba, 0x1eba, +0x1ebc, 0x1ebc, +0x1ebe, 0x1ebe, +0x1ec0, 0x1ec0, +0x1ec2, 0x1ec2, +0x1ec4, 0x1ec4, +0x1ec6, 0x1ec6, +0x1ec8, 0x1ec8, +0x1eca, 0x1eca, +0x1ecc, 0x1ecc, +0x1ece, 0x1ece, +0x1ed0, 0x1ed0, +0x1ed2, 0x1ed2, +0x1ed4, 0x1ed4, +0x1ed6, 0x1ed6, +0x1ed8, 0x1ed8, +0x1eda, 0x1eda, +0x1edc, 0x1edc, +0x1ede, 0x1ede, +0x1ee0, 0x1ee0, +0x1ee2, 0x1ee2, +0x1ee4, 0x1ee4, +0x1ee6, 0x1ee6, +0x1ee8, 0x1ee8, +0x1eea, 0x1eea, +0x1eec, 0x1eec, +0x1eee, 0x1eee, +0x1ef0, 0x1ef0, +0x1ef2, 0x1ef2, +0x1ef4, 0x1ef4, +0x1ef6, 0x1ef6, +0x1ef8, 0x1ef8, +0x1efa, 0x1efa, +0x1efc, 0x1efc, +0x1efe, 0x1efe, +0x1f08, 0x1f0f, +0x1f18, 0x1f1d, +0x1f28, 0x1f2f, +0x1f38, 0x1f3f, +0x1f48, 0x1f4d, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f5f, +0x1f68, 0x1f6f, +0x1fb8, 0x1fbb, +0x1fc8, 0x1fcb, +0x1fd8, 0x1fdb, +0x1fe8, 0x1fec, +0x1ff8, 0x1ffb, +0x2102, 0x2102, +0x2107, 0x2107, +0x210b, 0x210d, +0x2110, 0x2112, +0x2115, 0x2115, +0x2119, 0x211d, +0x2124, 0x2124, +0x2126, 0x2126, +0x2128, 0x2128, +0x212a, 0x212d, +0x2130, 0x2133, +0x213e, 0x213f, +0x2145, 0x2145, +0x2160, 0x216f, +0x2183, 0x2183, +0x24b6, 0x24cf, +0x2c00, 0x2c2f, +0x2c60, 0x2c60, +0x2c62, 0x2c64, +0x2c67, 0x2c67, +0x2c69, 0x2c69, +0x2c6b, 0x2c6b, +0x2c6d, 0x2c70, +0x2c72, 0x2c72, +0x2c75, 0x2c75, +0x2c7e, 0x2c80, +0x2c82, 0x2c82, +0x2c84, 0x2c84, +0x2c86, 0x2c86, +0x2c88, 0x2c88, +0x2c8a, 0x2c8a, +0x2c8c, 0x2c8c, +0x2c8e, 0x2c8e, +0x2c90, 0x2c90, +0x2c92, 0x2c92, +0x2c94, 0x2c94, +0x2c96, 0x2c96, +0x2c98, 0x2c98, +0x2c9a, 0x2c9a, +0x2c9c, 0x2c9c, +0x2c9e, 0x2c9e, +0x2ca0, 0x2ca0, +0x2ca2, 0x2ca2, +0x2ca4, 0x2ca4, +0x2ca6, 0x2ca6, +0x2ca8, 0x2ca8, +0x2caa, 0x2caa, +0x2cac, 0x2cac, +0x2cae, 0x2cae, +0x2cb0, 0x2cb0, +0x2cb2, 0x2cb2, +0x2cb4, 0x2cb4, +0x2cb6, 0x2cb6, +0x2cb8, 0x2cb8, +0x2cba, 0x2cba, +0x2cbc, 0x2cbc, +0x2cbe, 0x2cbe, +0x2cc0, 0x2cc0, +0x2cc2, 0x2cc2, +0x2cc4, 0x2cc4, +0x2cc6, 0x2cc6, +0x2cc8, 0x2cc8, +0x2cca, 0x2cca, +0x2ccc, 0x2ccc, +0x2cce, 0x2cce, +0x2cd0, 0x2cd0, +0x2cd2, 0x2cd2, +0x2cd4, 0x2cd4, +0x2cd6, 0x2cd6, +0x2cd8, 0x2cd8, +0x2cda, 0x2cda, +0x2cdc, 0x2cdc, +0x2cde, 0x2cde, +0x2ce0, 0x2ce0, +0x2ce2, 0x2ce2, +0x2ceb, 0x2ceb, +0x2ced, 0x2ced, +0x2cf2, 0x2cf2, +0xa640, 0xa640, +0xa642, 0xa642, +0xa644, 0xa644, +0xa646, 0xa646, +0xa648, 0xa648, +0xa64a, 0xa64a, +0xa64c, 0xa64c, +0xa64e, 0xa64e, +0xa650, 0xa650, +0xa652, 0xa652, +0xa654, 0xa654, +0xa656, 0xa656, +0xa658, 0xa658, +0xa65a, 0xa65a, +0xa65c, 0xa65c, +0xa65e, 0xa65e, +0xa660, 0xa660, +0xa662, 0xa662, +0xa664, 0xa664, +0xa666, 0xa666, +0xa668, 0xa668, +0xa66a, 0xa66a, +0xa66c, 0xa66c, +0xa680, 0xa680, +0xa682, 0xa682, +0xa684, 0xa684, +0xa686, 0xa686, +0xa688, 0xa688, +0xa68a, 0xa68a, +0xa68c, 0xa68c, +0xa68e, 0xa68e, +0xa690, 0xa690, +0xa692, 0xa692, +0xa694, 0xa694, +0xa696, 0xa696, +0xa698, 0xa698, +0xa69a, 0xa69a, +0xa722, 0xa722, +0xa724, 0xa724, +0xa726, 0xa726, +0xa728, 0xa728, +0xa72a, 0xa72a, +0xa72c, 0xa72c, +0xa72e, 0xa72e, +0xa732, 0xa732, +0xa734, 0xa734, +0xa736, 0xa736, +0xa738, 0xa738, +0xa73a, 0xa73a, +0xa73c, 0xa73c, +0xa73e, 0xa73e, +0xa740, 0xa740, +0xa742, 0xa742, +0xa744, 0xa744, +0xa746, 0xa746, +0xa748, 0xa748, +0xa74a, 0xa74a, +0xa74c, 0xa74c, +0xa74e, 0xa74e, +0xa750, 0xa750, +0xa752, 0xa752, +0xa754, 0xa754, +0xa756, 0xa756, +0xa758, 0xa758, +0xa75a, 0xa75a, +0xa75c, 0xa75c, +0xa75e, 0xa75e, +0xa760, 0xa760, +0xa762, 0xa762, +0xa764, 0xa764, +0xa766, 0xa766, +0xa768, 0xa768, +0xa76a, 0xa76a, +0xa76c, 0xa76c, +0xa76e, 0xa76e, +0xa779, 0xa779, +0xa77b, 0xa77b, +0xa77d, 0xa77e, +0xa780, 0xa780, +0xa782, 0xa782, +0xa784, 0xa784, +0xa786, 0xa786, +0xa78b, 0xa78b, +0xa78d, 0xa78d, +0xa790, 0xa790, +0xa792, 0xa792, +0xa796, 0xa796, +0xa798, 0xa798, +0xa79a, 0xa79a, +0xa79c, 0xa79c, +0xa79e, 0xa79e, +0xa7a0, 0xa7a0, +0xa7a2, 0xa7a2, +0xa7a4, 0xa7a4, +0xa7a6, 0xa7a6, +0xa7a8, 0xa7a8, +0xa7aa, 0xa7ae, +0xa7b0, 0xa7b4, +0xa7b6, 0xa7b6, +0xa7b8, 0xa7b8, +0xa7ba, 0xa7ba, +0xa7bc, 0xa7bc, +0xa7be, 0xa7be, +0xa7c0, 0xa7c0, +0xa7c2, 0xa7c2, +0xa7c4, 0xa7c7, +0xa7c9, 0xa7c9, +0xa7cb, 0xa7cc, +0xa7d0, 0xa7d0, +0xa7d6, 0xa7d6, +0xa7d8, 0xa7d8, +0xa7da, 0xa7da, +0xa7dc, 0xa7dc, +0xa7f5, 0xa7f5, +0xff21, 0xff3a, +0x10400, 0x10427, +0x104b0, 0x104d3, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10c80, 0x10cb2, +0x10d50, 0x10d65, +0x118a0, 0x118bf, +0x16e40, 0x16e5f, +0x1d400, 0x1d419, +0x1d434, 0x1d44d, +0x1d468, 0x1d481, +0x1d49c, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b5, +0x1d4d0, 0x1d4e9, +0x1d504, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d538, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d56c, 0x1d585, +0x1d5a0, 0x1d5b9, +0x1d5d4, 0x1d5ed, +0x1d608, 0x1d621, +0x1d63c, 0x1d655, +0x1d670, 0x1d689, +0x1d6a8, 0x1d6c0, +0x1d6e2, 0x1d6fa, +0x1d71c, 0x1d734, +0x1d756, 0x1d76e, +0x1d790, 0x1d7a8, +0x1d7ca, 0x1d7ca, +0x1e900, 0x1e921, +0x1f130, 0x1f149, +0x1f150, 0x1f169, +0x1f170, 0x1f189, +}; /* END of CR_Upper */ + +/* PROPERTY: 'XDigit': POSIX [[:XDigit:]] */ +static const OnigCodePoint +CR_XDigit[] = { 3, +0x0030, 0x0039, +0x0041, 0x0046, +0x0061, 0x0066, +}; /* END of CR_XDigit */ + +/* PROPERTY: 'Word': POSIX [[:Word:]] */ +static const OnigCodePoint +CR_Word[] = { 795, +0x0030, 0x0039, +0x0041, 0x005a, +0x005f, 0x005f, +0x0061, 0x007a, +0x00aa, 0x00aa, +0x00b5, 0x00b5, +0x00ba, 0x00ba, +0x00c0, 0x00d6, +0x00d8, 0x00f6, +0x00f8, 0x02c1, +0x02c6, 0x02d1, +0x02e0, 0x02e4, +0x02ec, 0x02ec, +0x02ee, 0x02ee, +0x0300, 0x0374, +0x0376, 0x0377, +0x037a, 0x037d, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x03f5, +0x03f7, 0x0481, +0x0483, 0x052f, +0x0531, 0x0556, +0x0559, 0x0559, +0x0560, 0x0588, +0x0591, 0x05bd, +0x05bf, 0x05bf, +0x05c1, 0x05c2, +0x05c4, 0x05c5, +0x05c7, 0x05c7, +0x05d0, 0x05ea, +0x05ef, 0x05f2, +0x0610, 0x061a, +0x0620, 0x0669, +0x066e, 0x06d3, +0x06d5, 0x06dc, +0x06df, 0x06e8, +0x06ea, 0x06fc, +0x06ff, 0x06ff, +0x0710, 0x074a, +0x074d, 0x07b1, +0x07c0, 0x07f5, +0x07fa, 0x07fa, +0x07fd, 0x07fd, +0x0800, 0x082d, +0x0840, 0x085b, +0x0860, 0x086a, +0x0870, 0x0887, +0x0889, 0x088e, +0x0897, 0x08e1, +0x08e3, 0x0963, +0x0966, 0x096f, +0x0971, 0x0983, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bc, 0x09c4, +0x09c7, 0x09c8, +0x09cb, 0x09ce, +0x09d7, 0x09d7, +0x09dc, 0x09dd, +0x09df, 0x09e3, +0x09e6, 0x09f1, +0x09fc, 0x09fc, +0x09fe, 0x09fe, +0x0a01, 0x0a03, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a3c, 0x0a3c, +0x0a3e, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4d, +0x0a51, 0x0a51, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a66, 0x0a75, +0x0a81, 0x0a83, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abc, 0x0ac5, +0x0ac7, 0x0ac9, +0x0acb, 0x0acd, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae3, +0x0ae6, 0x0aef, +0x0af9, 0x0aff, +0x0b01, 0x0b03, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3c, 0x0b44, +0x0b47, 0x0b48, +0x0b4b, 0x0b4d, +0x0b55, 0x0b57, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b63, +0x0b66, 0x0b6f, +0x0b71, 0x0b71, +0x0b82, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bbe, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcd, +0x0bd0, 0x0bd0, +0x0bd7, 0x0bd7, +0x0be6, 0x0bef, +0x0c00, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3c, 0x0c44, +0x0c46, 0x0c48, +0x0c4a, 0x0c4d, +0x0c55, 0x0c56, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c63, +0x0c66, 0x0c6f, +0x0c80, 0x0c83, +0x0c85, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbc, 0x0cc4, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccd, +0x0cd5, 0x0cd6, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce3, +0x0ce6, 0x0cef, +0x0cf1, 0x0cf3, +0x0d00, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d44, +0x0d46, 0x0d48, +0x0d4a, 0x0d4e, +0x0d54, 0x0d57, +0x0d5f, 0x0d63, +0x0d66, 0x0d6f, +0x0d7a, 0x0d7f, +0x0d81, 0x0d83, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0dca, 0x0dca, +0x0dcf, 0x0dd4, +0x0dd6, 0x0dd6, +0x0dd8, 0x0ddf, +0x0de6, 0x0def, +0x0df2, 0x0df3, +0x0e01, 0x0e3a, +0x0e40, 0x0e4e, +0x0e50, 0x0e59, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0ec8, 0x0ece, +0x0ed0, 0x0ed9, +0x0edc, 0x0edf, +0x0f00, 0x0f00, +0x0f18, 0x0f19, +0x0f20, 0x0f29, +0x0f35, 0x0f35, +0x0f37, 0x0f37, +0x0f39, 0x0f39, +0x0f3e, 0x0f47, +0x0f49, 0x0f6c, +0x0f71, 0x0f84, +0x0f86, 0x0f97, +0x0f99, 0x0fbc, +0x0fc6, 0x0fc6, +0x1000, 0x1049, +0x1050, 0x109d, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x10fa, +0x10fc, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x135d, 0x135f, +0x1380, 0x138f, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1401, 0x166c, +0x166f, 0x167f, +0x1681, 0x169a, +0x16a0, 0x16ea, +0x16ee, 0x16f8, +0x1700, 0x1715, +0x171f, 0x1734, +0x1740, 0x1753, +0x1760, 0x176c, +0x176e, 0x1770, +0x1772, 0x1773, +0x1780, 0x17d3, +0x17d7, 0x17d7, +0x17dc, 0x17dd, +0x17e0, 0x17e9, +0x180b, 0x180d, +0x180f, 0x1819, +0x1820, 0x1878, +0x1880, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1920, 0x192b, +0x1930, 0x193b, +0x1946, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x19d0, 0x19d9, +0x1a00, 0x1a1b, +0x1a20, 0x1a5e, +0x1a60, 0x1a7c, +0x1a7f, 0x1a89, +0x1a90, 0x1a99, +0x1aa7, 0x1aa7, +0x1ab0, 0x1ace, +0x1b00, 0x1b4c, +0x1b50, 0x1b59, +0x1b6b, 0x1b73, +0x1b80, 0x1bf3, +0x1c00, 0x1c37, +0x1c40, 0x1c49, +0x1c4d, 0x1c7d, +0x1c80, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1cd0, 0x1cd2, +0x1cd4, 0x1cfa, +0x1d00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fbc, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fcc, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fe0, 0x1fec, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffc, +0x203f, 0x2040, +0x2054, 0x2054, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x20d0, 0x20f0, +0x2102, 0x2102, +0x2107, 0x2107, +0x210a, 0x2113, +0x2115, 0x2115, +0x2119, 0x211d, +0x2124, 0x2124, +0x2126, 0x2126, +0x2128, 0x2128, +0x212a, 0x212d, +0x212f, 0x2139, +0x213c, 0x213f, +0x2145, 0x2149, +0x214e, 0x214e, +0x2160, 0x2188, +0x24b6, 0x24e9, +0x2c00, 0x2ce4, +0x2ceb, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d6f, +0x2d7f, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x2de0, 0x2dff, +0x2e2f, 0x2e2f, +0x3005, 0x3007, +0x3021, 0x302f, +0x3031, 0x3035, +0x3038, 0x303c, +0x3041, 0x3096, +0x3099, 0x309a, +0x309d, 0x309f, +0x30a1, 0x30fa, +0x30fc, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x31a0, 0x31bf, +0x31f0, 0x31ff, +0x3400, 0x4dbf, +0x4e00, 0xa48c, +0xa4d0, 0xa4fd, +0xa500, 0xa60c, +0xa610, 0xa62b, +0xa640, 0xa672, +0xa674, 0xa67d, +0xa67f, 0xa6f1, +0xa717, 0xa71f, +0xa722, 0xa788, +0xa78b, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa827, +0xa82c, 0xa82c, +0xa840, 0xa873, +0xa880, 0xa8c5, +0xa8d0, 0xa8d9, +0xa8e0, 0xa8f7, +0xa8fb, 0xa8fb, +0xa8fd, 0xa92d, +0xa930, 0xa953, +0xa960, 0xa97c, +0xa980, 0xa9c0, +0xa9cf, 0xa9d9, +0xa9e0, 0xa9fe, +0xaa00, 0xaa36, +0xaa40, 0xaa4d, +0xaa50, 0xaa59, +0xaa60, 0xaa76, +0xaa7a, 0xaac2, +0xaadb, 0xaadd, +0xaae0, 0xaaef, +0xaaf2, 0xaaf6, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab5a, +0xab5c, 0xab69, +0xab70, 0xabea, +0xabec, 0xabed, +0xabf0, 0xabf9, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xf900, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb28, +0xfb2a, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbb1, +0xfbd3, 0xfd3d, +0xfd50, 0xfd8f, +0xfd92, 0xfdc7, +0xfdf0, 0xfdfb, +0xfe00, 0xfe0f, +0xfe20, 0xfe2f, +0xfe33, 0xfe34, +0xfe4d, 0xfe4f, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0xff10, 0xff19, +0xff21, 0xff3a, +0xff3f, 0xff3f, +0xff41, 0xff5a, +0xff66, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10140, 0x10174, +0x101fd, 0x101fd, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x102e0, 0x102e0, +0x10300, 0x1031f, +0x1032d, 0x1034a, +0x10350, 0x1037a, +0x10380, 0x1039d, +0x103a0, 0x103c3, +0x103c8, 0x103cf, +0x103d1, 0x103d5, +0x10400, 0x1049d, +0x104a0, 0x104a9, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10860, 0x10876, +0x10880, 0x1089e, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x10900, 0x10915, +0x10920, 0x10939, +0x10980, 0x109b7, +0x109be, 0x109bf, +0x10a00, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a38, 0x10a3a, +0x10a3f, 0x10a3f, +0x10a60, 0x10a7c, +0x10a80, 0x10a9c, +0x10ac0, 0x10ac7, +0x10ac9, 0x10ae6, +0x10b00, 0x10b35, +0x10b40, 0x10b55, +0x10b60, 0x10b72, +0x10b80, 0x10b91, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10d00, 0x10d27, +0x10d30, 0x10d39, +0x10d40, 0x10d65, +0x10d69, 0x10d6d, +0x10d6f, 0x10d85, +0x10e80, 0x10ea9, +0x10eab, 0x10eac, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10efc, 0x10f1c, +0x10f27, 0x10f27, +0x10f30, 0x10f50, +0x10f70, 0x10f85, +0x10fb0, 0x10fc4, +0x10fe0, 0x10ff6, +0x11000, 0x11046, +0x11066, 0x11075, +0x1107f, 0x110ba, +0x110c2, 0x110c2, +0x110d0, 0x110e8, +0x110f0, 0x110f9, +0x11100, 0x11134, +0x11136, 0x1113f, +0x11144, 0x11147, +0x11150, 0x11173, +0x11176, 0x11176, +0x11180, 0x111c4, +0x111c9, 0x111cc, +0x111ce, 0x111da, +0x111dc, 0x111dc, +0x11200, 0x11211, +0x11213, 0x11237, +0x1123e, 0x11241, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a8, +0x112b0, 0x112ea, +0x112f0, 0x112f9, +0x11300, 0x11303, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133b, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134d, +0x11350, 0x11350, +0x11357, 0x11357, +0x1135d, 0x11363, +0x11366, 0x1136c, +0x11370, 0x11374, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113d3, +0x113e1, 0x113e2, +0x11400, 0x1144a, +0x11450, 0x11459, +0x1145e, 0x11461, +0x11480, 0x114c5, +0x114c7, 0x114c7, +0x114d0, 0x114d9, +0x11580, 0x115b5, +0x115b8, 0x115c0, +0x115d8, 0x115dd, +0x11600, 0x11640, +0x11644, 0x11644, +0x11650, 0x11659, +0x11680, 0x116b8, +0x116c0, 0x116c9, +0x116d0, 0x116e3, +0x11700, 0x1171a, +0x1171d, 0x1172b, +0x11730, 0x11739, +0x11740, 0x11746, +0x11800, 0x1183a, +0x118a0, 0x118e9, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x11935, +0x11937, 0x11938, +0x1193b, 0x11943, +0x11950, 0x11959, +0x119a0, 0x119a7, +0x119aa, 0x119d7, +0x119da, 0x119e1, +0x119e3, 0x119e4, +0x11a00, 0x11a3e, +0x11a47, 0x11a47, +0x11a50, 0x11a99, +0x11a9d, 0x11a9d, +0x11ab0, 0x11af8, +0x11bc0, 0x11be0, +0x11bf0, 0x11bf9, +0x11c00, 0x11c08, +0x11c0a, 0x11c36, +0x11c38, 0x11c40, +0x11c50, 0x11c59, +0x11c72, 0x11c8f, +0x11c92, 0x11ca7, +0x11ca9, 0x11cb6, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d47, +0x11d50, 0x11d59, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d8e, +0x11d90, 0x11d91, +0x11d93, 0x11d98, +0x11da0, 0x11da9, +0x11ee0, 0x11ef6, +0x11f00, 0x11f10, +0x11f12, 0x11f3a, +0x11f3e, 0x11f42, +0x11f50, 0x11f5a, +0x11fb0, 0x11fb0, +0x12000, 0x12399, +0x12400, 0x1246e, +0x12480, 0x12543, +0x12f90, 0x12ff0, +0x13000, 0x1342f, +0x13440, 0x13455, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x16139, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a60, 0x16a69, +0x16a70, 0x16abe, +0x16ac0, 0x16ac9, +0x16ad0, 0x16aed, +0x16af0, 0x16af4, +0x16b00, 0x16b36, +0x16b40, 0x16b43, +0x16b50, 0x16b59, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d6c, +0x16d70, 0x16d79, +0x16e40, 0x16e7f, +0x16f00, 0x16f4a, +0x16f4f, 0x16f87, +0x16f8f, 0x16f9f, +0x16fe0, 0x16fe1, +0x16fe3, 0x16fe4, +0x16ff0, 0x16ff1, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1bc9d, 0x1bc9e, +0x1ccf0, 0x1ccf9, +0x1cf00, 0x1cf2d, +0x1cf30, 0x1cf46, +0x1d165, 0x1d169, +0x1d16d, 0x1d172, +0x1d17b, 0x1d182, +0x1d185, 0x1d18b, +0x1d1aa, 0x1d1ad, +0x1d242, 0x1d244, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d6c0, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6fa, +0x1d6fc, 0x1d714, +0x1d716, 0x1d734, +0x1d736, 0x1d74e, +0x1d750, 0x1d76e, +0x1d770, 0x1d788, +0x1d78a, 0x1d7a8, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7cb, +0x1d7ce, 0x1d7ff, +0x1da00, 0x1da36, +0x1da3b, 0x1da6c, +0x1da75, 0x1da75, +0x1da84, 0x1da84, +0x1da9b, 0x1da9f, +0x1daa1, 0x1daaf, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e030, 0x1e06d, +0x1e08f, 0x1e08f, +0x1e100, 0x1e12c, +0x1e130, 0x1e13d, +0x1e140, 0x1e149, +0x1e14e, 0x1e14e, +0x1e290, 0x1e2ae, +0x1e2c0, 0x1e2f9, +0x1e4d0, 0x1e4f9, +0x1e5d0, 0x1e5fa, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e8d0, 0x1e8d6, +0x1e900, 0x1e94b, +0x1e950, 0x1e959, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x1f130, 0x1f149, +0x1f150, 0x1f169, +0x1f170, 0x1f189, +0x1fbf0, 0x1fbf9, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +0xe0100, 0xe01ef, +}; /* END of CR_Word */ + +/* PROPERTY: 'Alnum': POSIX [[:Alnum:]] */ +static const OnigCodePoint +CR_Alnum[] = { 802, +0x0030, 0x0039, +0x0041, 0x005a, +0x0061, 0x007a, +0x00aa, 0x00aa, +0x00b5, 0x00b5, +0x00ba, 0x00ba, +0x00c0, 0x00d6, +0x00d8, 0x00f6, +0x00f8, 0x02c1, +0x02c6, 0x02d1, +0x02e0, 0x02e4, +0x02ec, 0x02ec, +0x02ee, 0x02ee, +0x0345, 0x0345, +0x0363, 0x0374, +0x0376, 0x0377, +0x037a, 0x037d, +0x037f, 0x037f, +0x0386, 0x0386, +0x0388, 0x038a, +0x038c, 0x038c, +0x038e, 0x03a1, +0x03a3, 0x03f5, +0x03f7, 0x0481, +0x048a, 0x052f, +0x0531, 0x0556, +0x0559, 0x0559, +0x0560, 0x0588, +0x05b0, 0x05bd, +0x05bf, 0x05bf, +0x05c1, 0x05c2, +0x05c4, 0x05c5, +0x05c7, 0x05c7, +0x05d0, 0x05ea, +0x05ef, 0x05f2, +0x0610, 0x061a, +0x0620, 0x0657, +0x0659, 0x0669, +0x066e, 0x06d3, +0x06d5, 0x06dc, +0x06e1, 0x06e8, +0x06ed, 0x06fc, +0x06ff, 0x06ff, +0x0710, 0x073f, +0x074d, 0x07b1, +0x07c0, 0x07ea, +0x07f4, 0x07f5, +0x07fa, 0x07fa, +0x0800, 0x0817, +0x081a, 0x082c, +0x0840, 0x0858, +0x0860, 0x086a, +0x0870, 0x0887, +0x0889, 0x088e, +0x0897, 0x0897, +0x08a0, 0x08c9, +0x08d4, 0x08df, +0x08e3, 0x08e9, +0x08f0, 0x093b, +0x093d, 0x094c, +0x094e, 0x0950, +0x0955, 0x0963, +0x0966, 0x096f, +0x0971, 0x0983, +0x0985, 0x098c, +0x098f, 0x0990, +0x0993, 0x09a8, +0x09aa, 0x09b0, +0x09b2, 0x09b2, +0x09b6, 0x09b9, +0x09bd, 0x09c4, +0x09c7, 0x09c8, +0x09cb, 0x09cc, +0x09ce, 0x09ce, +0x09d7, 0x09d7, +0x09dc, 0x09dd, +0x09df, 0x09e3, +0x09e6, 0x09f1, +0x09fc, 0x09fc, +0x0a01, 0x0a03, +0x0a05, 0x0a0a, +0x0a0f, 0x0a10, +0x0a13, 0x0a28, +0x0a2a, 0x0a30, +0x0a32, 0x0a33, +0x0a35, 0x0a36, +0x0a38, 0x0a39, +0x0a3e, 0x0a42, +0x0a47, 0x0a48, +0x0a4b, 0x0a4c, +0x0a51, 0x0a51, +0x0a59, 0x0a5c, +0x0a5e, 0x0a5e, +0x0a66, 0x0a75, +0x0a81, 0x0a83, +0x0a85, 0x0a8d, +0x0a8f, 0x0a91, +0x0a93, 0x0aa8, +0x0aaa, 0x0ab0, +0x0ab2, 0x0ab3, +0x0ab5, 0x0ab9, +0x0abd, 0x0ac5, +0x0ac7, 0x0ac9, +0x0acb, 0x0acc, +0x0ad0, 0x0ad0, +0x0ae0, 0x0ae3, +0x0ae6, 0x0aef, +0x0af9, 0x0afc, +0x0b01, 0x0b03, +0x0b05, 0x0b0c, +0x0b0f, 0x0b10, +0x0b13, 0x0b28, +0x0b2a, 0x0b30, +0x0b32, 0x0b33, +0x0b35, 0x0b39, +0x0b3d, 0x0b44, +0x0b47, 0x0b48, +0x0b4b, 0x0b4c, +0x0b56, 0x0b57, +0x0b5c, 0x0b5d, +0x0b5f, 0x0b63, +0x0b66, 0x0b6f, +0x0b71, 0x0b71, +0x0b82, 0x0b83, +0x0b85, 0x0b8a, +0x0b8e, 0x0b90, +0x0b92, 0x0b95, +0x0b99, 0x0b9a, +0x0b9c, 0x0b9c, +0x0b9e, 0x0b9f, +0x0ba3, 0x0ba4, +0x0ba8, 0x0baa, +0x0bae, 0x0bb9, +0x0bbe, 0x0bc2, +0x0bc6, 0x0bc8, +0x0bca, 0x0bcc, +0x0bd0, 0x0bd0, +0x0bd7, 0x0bd7, +0x0be6, 0x0bef, +0x0c00, 0x0c0c, +0x0c0e, 0x0c10, +0x0c12, 0x0c28, +0x0c2a, 0x0c39, +0x0c3d, 0x0c44, +0x0c46, 0x0c48, +0x0c4a, 0x0c4c, +0x0c55, 0x0c56, +0x0c58, 0x0c5a, +0x0c5d, 0x0c5d, +0x0c60, 0x0c63, +0x0c66, 0x0c6f, +0x0c80, 0x0c83, +0x0c85, 0x0c8c, +0x0c8e, 0x0c90, +0x0c92, 0x0ca8, +0x0caa, 0x0cb3, +0x0cb5, 0x0cb9, +0x0cbd, 0x0cc4, +0x0cc6, 0x0cc8, +0x0cca, 0x0ccc, +0x0cd5, 0x0cd6, +0x0cdd, 0x0cde, +0x0ce0, 0x0ce3, +0x0ce6, 0x0cef, +0x0cf1, 0x0cf3, +0x0d00, 0x0d0c, +0x0d0e, 0x0d10, +0x0d12, 0x0d3a, +0x0d3d, 0x0d44, +0x0d46, 0x0d48, +0x0d4a, 0x0d4c, +0x0d4e, 0x0d4e, +0x0d54, 0x0d57, +0x0d5f, 0x0d63, +0x0d66, 0x0d6f, +0x0d7a, 0x0d7f, +0x0d81, 0x0d83, +0x0d85, 0x0d96, +0x0d9a, 0x0db1, +0x0db3, 0x0dbb, +0x0dbd, 0x0dbd, +0x0dc0, 0x0dc6, +0x0dcf, 0x0dd4, +0x0dd6, 0x0dd6, +0x0dd8, 0x0ddf, +0x0de6, 0x0def, +0x0df2, 0x0df3, +0x0e01, 0x0e3a, +0x0e40, 0x0e46, +0x0e4d, 0x0e4d, +0x0e50, 0x0e59, +0x0e81, 0x0e82, +0x0e84, 0x0e84, +0x0e86, 0x0e8a, +0x0e8c, 0x0ea3, +0x0ea5, 0x0ea5, +0x0ea7, 0x0eb9, +0x0ebb, 0x0ebd, +0x0ec0, 0x0ec4, +0x0ec6, 0x0ec6, +0x0ecd, 0x0ecd, +0x0ed0, 0x0ed9, +0x0edc, 0x0edf, +0x0f00, 0x0f00, +0x0f20, 0x0f29, +0x0f40, 0x0f47, +0x0f49, 0x0f6c, +0x0f71, 0x0f83, +0x0f88, 0x0f97, +0x0f99, 0x0fbc, +0x1000, 0x1036, +0x1038, 0x1038, +0x103b, 0x1049, +0x1050, 0x109d, +0x10a0, 0x10c5, +0x10c7, 0x10c7, +0x10cd, 0x10cd, +0x10d0, 0x10fa, +0x10fc, 0x1248, +0x124a, 0x124d, +0x1250, 0x1256, +0x1258, 0x1258, +0x125a, 0x125d, +0x1260, 0x1288, +0x128a, 0x128d, +0x1290, 0x12b0, +0x12b2, 0x12b5, +0x12b8, 0x12be, +0x12c0, 0x12c0, +0x12c2, 0x12c5, +0x12c8, 0x12d6, +0x12d8, 0x1310, +0x1312, 0x1315, +0x1318, 0x135a, +0x1380, 0x138f, +0x13a0, 0x13f5, +0x13f8, 0x13fd, +0x1401, 0x166c, +0x166f, 0x167f, +0x1681, 0x169a, +0x16a0, 0x16ea, +0x16ee, 0x16f8, +0x1700, 0x1713, +0x171f, 0x1733, +0x1740, 0x1753, +0x1760, 0x176c, +0x176e, 0x1770, +0x1772, 0x1773, +0x1780, 0x17b3, +0x17b6, 0x17c8, +0x17d7, 0x17d7, +0x17dc, 0x17dc, +0x17e0, 0x17e9, +0x1810, 0x1819, +0x1820, 0x1878, +0x1880, 0x18aa, +0x18b0, 0x18f5, +0x1900, 0x191e, +0x1920, 0x192b, +0x1930, 0x1938, +0x1946, 0x196d, +0x1970, 0x1974, +0x1980, 0x19ab, +0x19b0, 0x19c9, +0x19d0, 0x19d9, +0x1a00, 0x1a1b, +0x1a20, 0x1a5e, +0x1a61, 0x1a74, +0x1a80, 0x1a89, +0x1a90, 0x1a99, +0x1aa7, 0x1aa7, +0x1abf, 0x1ac0, +0x1acc, 0x1ace, +0x1b00, 0x1b33, +0x1b35, 0x1b43, +0x1b45, 0x1b4c, +0x1b50, 0x1b59, +0x1b80, 0x1ba9, +0x1bac, 0x1be5, +0x1be7, 0x1bf1, +0x1c00, 0x1c36, +0x1c40, 0x1c49, +0x1c4d, 0x1c7d, +0x1c80, 0x1c8a, +0x1c90, 0x1cba, +0x1cbd, 0x1cbf, +0x1ce9, 0x1cec, +0x1cee, 0x1cf3, +0x1cf5, 0x1cf6, +0x1cfa, 0x1cfa, +0x1d00, 0x1dbf, +0x1dd3, 0x1df4, +0x1e00, 0x1f15, +0x1f18, 0x1f1d, +0x1f20, 0x1f45, +0x1f48, 0x1f4d, +0x1f50, 0x1f57, +0x1f59, 0x1f59, +0x1f5b, 0x1f5b, +0x1f5d, 0x1f5d, +0x1f5f, 0x1f7d, +0x1f80, 0x1fb4, +0x1fb6, 0x1fbc, +0x1fbe, 0x1fbe, +0x1fc2, 0x1fc4, +0x1fc6, 0x1fcc, +0x1fd0, 0x1fd3, +0x1fd6, 0x1fdb, +0x1fe0, 0x1fec, +0x1ff2, 0x1ff4, +0x1ff6, 0x1ffc, +0x2071, 0x2071, +0x207f, 0x207f, +0x2090, 0x209c, +0x2102, 0x2102, +0x2107, 0x2107, +0x210a, 0x2113, +0x2115, 0x2115, +0x2119, 0x211d, +0x2124, 0x2124, +0x2126, 0x2126, +0x2128, 0x2128, +0x212a, 0x212d, +0x212f, 0x2139, +0x213c, 0x213f, +0x2145, 0x2149, +0x214e, 0x214e, +0x2160, 0x2188, +0x24b6, 0x24e9, +0x2c00, 0x2ce4, +0x2ceb, 0x2cee, +0x2cf2, 0x2cf3, +0x2d00, 0x2d25, +0x2d27, 0x2d27, +0x2d2d, 0x2d2d, +0x2d30, 0x2d67, +0x2d6f, 0x2d6f, +0x2d80, 0x2d96, +0x2da0, 0x2da6, +0x2da8, 0x2dae, +0x2db0, 0x2db6, +0x2db8, 0x2dbe, +0x2dc0, 0x2dc6, +0x2dc8, 0x2dce, +0x2dd0, 0x2dd6, +0x2dd8, 0x2dde, +0x2de0, 0x2dff, +0x2e2f, 0x2e2f, +0x3005, 0x3007, +0x3021, 0x3029, +0x3031, 0x3035, +0x3038, 0x303c, +0x3041, 0x3096, +0x309d, 0x309f, +0x30a1, 0x30fa, +0x30fc, 0x30ff, +0x3105, 0x312f, +0x3131, 0x318e, +0x31a0, 0x31bf, +0x31f0, 0x31ff, +0x3400, 0x4dbf, +0x4e00, 0xa48c, +0xa4d0, 0xa4fd, +0xa500, 0xa60c, +0xa610, 0xa62b, +0xa640, 0xa66e, +0xa674, 0xa67b, +0xa67f, 0xa6ef, +0xa717, 0xa71f, +0xa722, 0xa788, +0xa78b, 0xa7cd, +0xa7d0, 0xa7d1, +0xa7d3, 0xa7d3, +0xa7d5, 0xa7dc, +0xa7f2, 0xa805, +0xa807, 0xa827, +0xa840, 0xa873, +0xa880, 0xa8c3, +0xa8c5, 0xa8c5, +0xa8d0, 0xa8d9, +0xa8f2, 0xa8f7, +0xa8fb, 0xa8fb, +0xa8fd, 0xa92a, +0xa930, 0xa952, +0xa960, 0xa97c, +0xa980, 0xa9b2, +0xa9b4, 0xa9bf, +0xa9cf, 0xa9d9, +0xa9e0, 0xa9fe, +0xaa00, 0xaa36, +0xaa40, 0xaa4d, +0xaa50, 0xaa59, +0xaa60, 0xaa76, +0xaa7a, 0xaabe, +0xaac0, 0xaac0, +0xaac2, 0xaac2, +0xaadb, 0xaadd, +0xaae0, 0xaaef, +0xaaf2, 0xaaf5, +0xab01, 0xab06, +0xab09, 0xab0e, +0xab11, 0xab16, +0xab20, 0xab26, +0xab28, 0xab2e, +0xab30, 0xab5a, +0xab5c, 0xab69, +0xab70, 0xabea, +0xabf0, 0xabf9, +0xac00, 0xd7a3, +0xd7b0, 0xd7c6, +0xd7cb, 0xd7fb, +0xf900, 0xfa6d, +0xfa70, 0xfad9, +0xfb00, 0xfb06, +0xfb13, 0xfb17, +0xfb1d, 0xfb28, +0xfb2a, 0xfb36, +0xfb38, 0xfb3c, +0xfb3e, 0xfb3e, +0xfb40, 0xfb41, +0xfb43, 0xfb44, +0xfb46, 0xfbb1, +0xfbd3, 0xfd3d, +0xfd50, 0xfd8f, +0xfd92, 0xfdc7, +0xfdf0, 0xfdfb, +0xfe70, 0xfe74, +0xfe76, 0xfefc, +0xff10, 0xff19, +0xff21, 0xff3a, +0xff41, 0xff5a, +0xff66, 0xffbe, +0xffc2, 0xffc7, +0xffca, 0xffcf, +0xffd2, 0xffd7, +0xffda, 0xffdc, +0x10000, 0x1000b, +0x1000d, 0x10026, +0x10028, 0x1003a, +0x1003c, 0x1003d, +0x1003f, 0x1004d, +0x10050, 0x1005d, +0x10080, 0x100fa, +0x10140, 0x10174, +0x10280, 0x1029c, +0x102a0, 0x102d0, +0x10300, 0x1031f, +0x1032d, 0x1034a, +0x10350, 0x1037a, +0x10380, 0x1039d, +0x103a0, 0x103c3, +0x103c8, 0x103cf, +0x103d1, 0x103d5, +0x10400, 0x1049d, +0x104a0, 0x104a9, +0x104b0, 0x104d3, +0x104d8, 0x104fb, +0x10500, 0x10527, +0x10530, 0x10563, +0x10570, 0x1057a, +0x1057c, 0x1058a, +0x1058c, 0x10592, +0x10594, 0x10595, +0x10597, 0x105a1, +0x105a3, 0x105b1, +0x105b3, 0x105b9, +0x105bb, 0x105bc, +0x105c0, 0x105f3, +0x10600, 0x10736, +0x10740, 0x10755, +0x10760, 0x10767, +0x10780, 0x10785, +0x10787, 0x107b0, +0x107b2, 0x107ba, +0x10800, 0x10805, +0x10808, 0x10808, +0x1080a, 0x10835, +0x10837, 0x10838, +0x1083c, 0x1083c, +0x1083f, 0x10855, +0x10860, 0x10876, +0x10880, 0x1089e, +0x108e0, 0x108f2, +0x108f4, 0x108f5, +0x10900, 0x10915, +0x10920, 0x10939, +0x10980, 0x109b7, +0x109be, 0x109bf, +0x10a00, 0x10a03, +0x10a05, 0x10a06, +0x10a0c, 0x10a13, +0x10a15, 0x10a17, +0x10a19, 0x10a35, +0x10a60, 0x10a7c, +0x10a80, 0x10a9c, +0x10ac0, 0x10ac7, +0x10ac9, 0x10ae4, +0x10b00, 0x10b35, +0x10b40, 0x10b55, +0x10b60, 0x10b72, +0x10b80, 0x10b91, +0x10c00, 0x10c48, +0x10c80, 0x10cb2, +0x10cc0, 0x10cf2, +0x10d00, 0x10d27, +0x10d30, 0x10d39, +0x10d40, 0x10d65, +0x10d69, 0x10d69, +0x10d6f, 0x10d85, +0x10e80, 0x10ea9, +0x10eab, 0x10eac, +0x10eb0, 0x10eb1, +0x10ec2, 0x10ec4, +0x10efc, 0x10efc, +0x10f00, 0x10f1c, +0x10f27, 0x10f27, +0x10f30, 0x10f45, +0x10f70, 0x10f81, +0x10fb0, 0x10fc4, +0x10fe0, 0x10ff6, +0x11000, 0x11045, +0x11066, 0x1106f, +0x11071, 0x11075, +0x11080, 0x110b8, +0x110c2, 0x110c2, +0x110d0, 0x110e8, +0x110f0, 0x110f9, +0x11100, 0x11132, +0x11136, 0x1113f, +0x11144, 0x11147, +0x11150, 0x11172, +0x11176, 0x11176, +0x11180, 0x111bf, +0x111c1, 0x111c4, +0x111ce, 0x111da, +0x111dc, 0x111dc, +0x11200, 0x11211, +0x11213, 0x11234, +0x11237, 0x11237, +0x1123e, 0x11241, +0x11280, 0x11286, +0x11288, 0x11288, +0x1128a, 0x1128d, +0x1128f, 0x1129d, +0x1129f, 0x112a8, +0x112b0, 0x112e8, +0x112f0, 0x112f9, +0x11300, 0x11303, +0x11305, 0x1130c, +0x1130f, 0x11310, +0x11313, 0x11328, +0x1132a, 0x11330, +0x11332, 0x11333, +0x11335, 0x11339, +0x1133d, 0x11344, +0x11347, 0x11348, +0x1134b, 0x1134c, +0x11350, 0x11350, +0x11357, 0x11357, +0x1135d, 0x11363, +0x11380, 0x11389, +0x1138b, 0x1138b, +0x1138e, 0x1138e, +0x11390, 0x113b5, +0x113b7, 0x113c0, +0x113c2, 0x113c2, +0x113c5, 0x113c5, +0x113c7, 0x113ca, +0x113cc, 0x113cd, +0x113d1, 0x113d1, +0x113d3, 0x113d3, +0x11400, 0x11441, +0x11443, 0x11445, +0x11447, 0x1144a, +0x11450, 0x11459, +0x1145f, 0x11461, +0x11480, 0x114c1, +0x114c4, 0x114c5, +0x114c7, 0x114c7, +0x114d0, 0x114d9, +0x11580, 0x115b5, +0x115b8, 0x115be, +0x115d8, 0x115dd, +0x11600, 0x1163e, +0x11640, 0x11640, +0x11644, 0x11644, +0x11650, 0x11659, +0x11680, 0x116b5, +0x116b8, 0x116b8, +0x116c0, 0x116c9, +0x116d0, 0x116e3, +0x11700, 0x1171a, +0x1171d, 0x1172a, +0x11730, 0x11739, +0x11740, 0x11746, +0x11800, 0x11838, +0x118a0, 0x118e9, +0x118ff, 0x11906, +0x11909, 0x11909, +0x1190c, 0x11913, +0x11915, 0x11916, +0x11918, 0x11935, +0x11937, 0x11938, +0x1193b, 0x1193c, +0x1193f, 0x11942, +0x11950, 0x11959, +0x119a0, 0x119a7, +0x119aa, 0x119d7, +0x119da, 0x119df, +0x119e1, 0x119e1, +0x119e3, 0x119e4, +0x11a00, 0x11a32, +0x11a35, 0x11a3e, +0x11a50, 0x11a97, +0x11a9d, 0x11a9d, +0x11ab0, 0x11af8, +0x11bc0, 0x11be0, +0x11bf0, 0x11bf9, +0x11c00, 0x11c08, +0x11c0a, 0x11c36, +0x11c38, 0x11c3e, +0x11c40, 0x11c40, +0x11c50, 0x11c59, +0x11c72, 0x11c8f, +0x11c92, 0x11ca7, +0x11ca9, 0x11cb6, +0x11d00, 0x11d06, +0x11d08, 0x11d09, +0x11d0b, 0x11d36, +0x11d3a, 0x11d3a, +0x11d3c, 0x11d3d, +0x11d3f, 0x11d41, +0x11d43, 0x11d43, +0x11d46, 0x11d47, +0x11d50, 0x11d59, +0x11d60, 0x11d65, +0x11d67, 0x11d68, +0x11d6a, 0x11d8e, +0x11d90, 0x11d91, +0x11d93, 0x11d96, +0x11d98, 0x11d98, +0x11da0, 0x11da9, +0x11ee0, 0x11ef6, +0x11f00, 0x11f10, +0x11f12, 0x11f3a, +0x11f3e, 0x11f40, +0x11f50, 0x11f59, +0x11fb0, 0x11fb0, +0x12000, 0x12399, +0x12400, 0x1246e, +0x12480, 0x12543, +0x12f90, 0x12ff0, +0x13000, 0x1342f, +0x13441, 0x13446, +0x13460, 0x143fa, +0x14400, 0x14646, +0x16100, 0x1612e, +0x16130, 0x16139, +0x16800, 0x16a38, +0x16a40, 0x16a5e, +0x16a60, 0x16a69, +0x16a70, 0x16abe, +0x16ac0, 0x16ac9, +0x16ad0, 0x16aed, +0x16b00, 0x16b2f, +0x16b40, 0x16b43, +0x16b50, 0x16b59, +0x16b63, 0x16b77, +0x16b7d, 0x16b8f, +0x16d40, 0x16d6c, +0x16d70, 0x16d79, +0x16e40, 0x16e7f, +0x16f00, 0x16f4a, +0x16f4f, 0x16f87, +0x16f8f, 0x16f9f, +0x16fe0, 0x16fe1, +0x16fe3, 0x16fe3, +0x16ff0, 0x16ff1, +0x17000, 0x187f7, +0x18800, 0x18cd5, +0x18cff, 0x18d08, +0x1aff0, 0x1aff3, +0x1aff5, 0x1affb, +0x1affd, 0x1affe, +0x1b000, 0x1b122, +0x1b132, 0x1b132, +0x1b150, 0x1b152, +0x1b155, 0x1b155, +0x1b164, 0x1b167, +0x1b170, 0x1b2fb, +0x1bc00, 0x1bc6a, +0x1bc70, 0x1bc7c, +0x1bc80, 0x1bc88, +0x1bc90, 0x1bc99, +0x1bc9e, 0x1bc9e, +0x1ccf0, 0x1ccf9, +0x1d400, 0x1d454, +0x1d456, 0x1d49c, +0x1d49e, 0x1d49f, +0x1d4a2, 0x1d4a2, +0x1d4a5, 0x1d4a6, +0x1d4a9, 0x1d4ac, +0x1d4ae, 0x1d4b9, +0x1d4bb, 0x1d4bb, +0x1d4bd, 0x1d4c3, +0x1d4c5, 0x1d505, +0x1d507, 0x1d50a, +0x1d50d, 0x1d514, +0x1d516, 0x1d51c, +0x1d51e, 0x1d539, +0x1d53b, 0x1d53e, +0x1d540, 0x1d544, +0x1d546, 0x1d546, +0x1d54a, 0x1d550, +0x1d552, 0x1d6a5, +0x1d6a8, 0x1d6c0, +0x1d6c2, 0x1d6da, +0x1d6dc, 0x1d6fa, +0x1d6fc, 0x1d714, +0x1d716, 0x1d734, +0x1d736, 0x1d74e, +0x1d750, 0x1d76e, +0x1d770, 0x1d788, +0x1d78a, 0x1d7a8, +0x1d7aa, 0x1d7c2, +0x1d7c4, 0x1d7cb, +0x1d7ce, 0x1d7ff, +0x1df00, 0x1df1e, +0x1df25, 0x1df2a, +0x1e000, 0x1e006, +0x1e008, 0x1e018, +0x1e01b, 0x1e021, +0x1e023, 0x1e024, +0x1e026, 0x1e02a, +0x1e030, 0x1e06d, +0x1e08f, 0x1e08f, +0x1e100, 0x1e12c, +0x1e137, 0x1e13d, +0x1e140, 0x1e149, +0x1e14e, 0x1e14e, +0x1e290, 0x1e2ad, +0x1e2c0, 0x1e2eb, +0x1e2f0, 0x1e2f9, +0x1e4d0, 0x1e4eb, +0x1e4f0, 0x1e4f9, +0x1e5d0, 0x1e5ed, +0x1e5f0, 0x1e5fa, +0x1e7e0, 0x1e7e6, +0x1e7e8, 0x1e7eb, +0x1e7ed, 0x1e7ee, +0x1e7f0, 0x1e7fe, +0x1e800, 0x1e8c4, +0x1e900, 0x1e943, +0x1e947, 0x1e947, +0x1e94b, 0x1e94b, +0x1e950, 0x1e959, +0x1ee00, 0x1ee03, +0x1ee05, 0x1ee1f, +0x1ee21, 0x1ee22, +0x1ee24, 0x1ee24, +0x1ee27, 0x1ee27, +0x1ee29, 0x1ee32, +0x1ee34, 0x1ee37, +0x1ee39, 0x1ee39, +0x1ee3b, 0x1ee3b, +0x1ee42, 0x1ee42, +0x1ee47, 0x1ee47, +0x1ee49, 0x1ee49, +0x1ee4b, 0x1ee4b, +0x1ee4d, 0x1ee4f, +0x1ee51, 0x1ee52, +0x1ee54, 0x1ee54, +0x1ee57, 0x1ee57, +0x1ee59, 0x1ee59, +0x1ee5b, 0x1ee5b, +0x1ee5d, 0x1ee5d, +0x1ee5f, 0x1ee5f, +0x1ee61, 0x1ee62, +0x1ee64, 0x1ee64, +0x1ee67, 0x1ee6a, +0x1ee6c, 0x1ee72, +0x1ee74, 0x1ee77, +0x1ee79, 0x1ee7c, +0x1ee7e, 0x1ee7e, +0x1ee80, 0x1ee89, +0x1ee8b, 0x1ee9b, +0x1eea1, 0x1eea3, +0x1eea5, 0x1eea9, +0x1eeab, 0x1eebb, +0x1f130, 0x1f149, +0x1f150, 0x1f169, +0x1f170, 0x1f189, +0x1fbf0, 0x1fbf9, +0x20000, 0x2a6df, +0x2a700, 0x2b739, +0x2b740, 0x2b81d, +0x2b820, 0x2cea1, +0x2ceb0, 0x2ebe0, +0x2ebf0, 0x2ee5d, +0x2f800, 0x2fa1d, +0x30000, 0x3134a, +0x31350, 0x323af, +}; /* END of CR_Alnum */ + +/* PROPERTY: 'ASCII': POSIX [[:ASCII:]] */ +static const OnigCodePoint +CR_ASCII[] = { 1, +0x0000, 0x007f, +}; /* END of CR_ASCII */ + + +static const OnigCodePoint* +const CodeRanges[] = { + CR_NEWLINE, + CR_Alpha, + CR_Blank, + CR_Cntrl, + CR_Digit, + CR_Graph, + CR_Lower, + CR_Print, + CR_PosixPunct, + CR_Space, + CR_Upper, + CR_XDigit, + CR_Word, + CR_Alnum, + CR_ASCII, +}; + +#define pool_offset(s) offsetof(struct unicode_prop_name_pool_t, unicode_prop_name_pool_str##s) + + +#define TOTAL_KEYWORDS 15 +#define MIN_WORD_LENGTH 4 +#define MAX_WORD_LENGTH 10 +#define MIN_HASH_VALUE 5 +#define MAX_HASH_VALUE 19 +/* maximum key range = 15, duplicates = 0 */ + +#ifndef GPERF_DOWNCASE +#define GPERF_DOWNCASE 1 +static unsigned char gperf_downcase[256] = + { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255 + }; +#endif + +#ifndef GPERF_CASE_STRNCMP +#define GPERF_CASE_STRNCMP 1 +static int +gperf_case_strncmp (register const char *s1, register const char *s2, register size_t n) +{ + for (; n > 0;) + { + unsigned char c1 = gperf_downcase[(unsigned char)*s1++]; + unsigned char c2 = gperf_downcase[(unsigned char)*s2++]; + if (c1 != 0 && c1 == c2) + { + n--; + continue; + } + return (int)c1 - (int)c2; + } + return 0; +} +#endif + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static unsigned int +hash (register const char *str, register size_t len) +{ + static const unsigned char asso_values[] = + { + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 0, 14, 8, 1, 20, + 20, 12, 20, 1, 20, 20, 10, 20, 4, 20, + 1, 20, 10, 0, 1, 4, 20, 1, 1, 20, + 20, 20, 20, 20, 20, 20, 20, 0, 14, 8, + 1, 20, 20, 12, 20, 1, 20, 20, 10, 20, + 4, 20, 1, 20, 10, 0, 1, 4, 20, 1, + 1, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20 + }; + return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]]; +} + +struct unicode_prop_name_pool_t + { + char unicode_prop_name_pool_str5[sizeof("space")]; + char unicode_prop_name_pool_str6[sizeof("alpha")]; + char unicode_prop_name_pool_str7[sizeof("print")]; + char unicode_prop_name_pool_str8[sizeof("xdigit")]; + char unicode_prop_name_pool_str9[sizeof("alnum")]; + char unicode_prop_name_pool_str10[sizeof("upper")]; + char unicode_prop_name_pool_str11[sizeof("posixpunct")]; + char unicode_prop_name_pool_str12[sizeof("newline")]; + char unicode_prop_name_pool_str13[sizeof("ascii")]; + char unicode_prop_name_pool_str14[sizeof("cntrl")]; + char unicode_prop_name_pool_str15[sizeof("word")]; + char unicode_prop_name_pool_str16[sizeof("lower")]; + char unicode_prop_name_pool_str17[sizeof("graph")]; + char unicode_prop_name_pool_str18[sizeof("digit")]; + char unicode_prop_name_pool_str19[sizeof("blank")]; + }; +static const struct unicode_prop_name_pool_t unicode_prop_name_pool_contents = + { + "space", + "alpha", + "print", + "xdigit", + "alnum", + "upper", + "posixpunct", + "newline", + "ascii", + "cntrl", + "word", + "lower", + "graph", + "digit", + "blank" + }; +#define unicode_prop_name_pool ((const char *) &unicode_prop_name_pool_contents) +static const struct PoolPropertyNameCtype * +unicode_lookup_property_name (register const char *str, register size_t len) +{ + static const struct PoolPropertyNameCtype wordlist[] = + { + {-1}, {-1}, {-1}, {-1}, {-1}, + + {pool_offset(5), 9}, + + {pool_offset(6), 1}, + + {pool_offset(7), 7}, + + {pool_offset(8), 11}, + + {pool_offset(9), 13}, + + {pool_offset(10), 10}, + + {pool_offset(11), 8}, + + {pool_offset(12), 0}, + + {pool_offset(13), 14}, + + {pool_offset(14), 3}, + + {pool_offset(15), 12}, + + {pool_offset(16), 6}, + + {pool_offset(17), 5}, + + {pool_offset(18), 4}, + + {pool_offset(19), 2} + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + register unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE) + { + register int o = wordlist[key].name; + if (o >= 0) + { + register const char *s = o + unicode_prop_name_pool; + + if ((((unsigned char)*str ^ (unsigned char)*s) & ~32) == 0 && !gperf_case_strncmp (str, s, len) && s[len] == '\0') + return &wordlist[key]; + } + } + } + return 0; +} + + + +#define PROPERTY_NAME_MAX_SIZE 20 +#define CODE_RANGES_NUM 15 + +#define PROP_INDEX_NEWLINE 0 +#define PROP_INDEX_ALPHA 1 +#define PROP_INDEX_BLANK 2 +#define PROP_INDEX_CNTRL 3 +#define PROP_INDEX_DIGIT 4 +#define PROP_INDEX_GRAPH 5 +#define PROP_INDEX_LOWER 6 +#define PROP_INDEX_PRINT 7 +#define PROP_INDEX_POSIXPUNCT 8 +#define PROP_INDEX_SPACE 9 +#define PROP_INDEX_UPPER 10 +#define PROP_INDEX_XDIGIT 11 +#define PROP_INDEX_WORD 12 +#define PROP_INDEX_ALNUM 13 +#define PROP_INDEX_ASCII 14 diff --git a/internal/components/third_party/oniguruma/src/unicode_unfold_key.c b/internal/components/third_party/oniguruma/src/unicode_unfold_key.c new file mode 100644 index 0000000000..37f49b960c --- /dev/null +++ b/internal/components/third_party/oniguruma/src/unicode_unfold_key.c @@ -0,0 +1,3497 @@ +/* This file was converted by gperf_unfold_key_conv.py + from gperf output file. */ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1,0 -N onigenc_unicode_unfold_key unicode_unfold_key.gperf */ +/* Computed positions: -k'1-3' */ + + + +/* This gperf source file was generated by make_unicode_fold_data.py */ + +/*- + * Copyright (c) 2017-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#include "regint.h" + +#define TOTAL_KEYWORDS 1557 +#define MIN_WORD_LENGTH 3 +#define MAX_WORD_LENGTH 3 +#define MIN_HASH_VALUE 8 +#define MAX_HASH_VALUE 2248 +/* maximum key range = 2241, duplicates = 0 */ + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +/*ARGSUSED*/ +static unsigned int +hash(OnigCodePoint codes[]) +{ + static const unsigned short asso_values[] = + { + 9, 7, 4, 52, 130, 1, 169, 2249, 2249, 2249, + 2249, 2249, 2249, 21, 155, 2249, 2249, 78, 2249, 2249, + 100, 2249, 2249, 2249, 2249, 84, 2249, 2249, 2249, 8, + 2249, 2, 3, 2249, 834, 718, 1614, 141, 1598, 712, + 1570, 694, 1668, 706, 1606, 0, 1593, 680, 1584, 651, + 1579, 1006, 1665, 1000, 1560, 688, 1553, 410, 1539, 645, + 1545, 639, 1530, 633, 269, 988, 1662, 966, 1122, 817, + 1647, 751, 994, 743, 379, 789, 1657, 261, 959, 783, + 1651, 771, 599, 826, 381, 1151, 286, 1521, 206, 1516, + 68, 1511, 915, 1431, 1607, 1640, 697, 671, 1531, 1507, + 1434, 1420, 1367, 1257, 1387, 1243, 717, 920, 1125, 613, + 1363, 331, 178, 909, 774, 843, 1451, 829, 1422, 822, + 1026, 724, 510, 1239, 754, 1222, 1324, 1413, 1072, 1409, + 764, 949, 316, 473, 384, 27, 169, 1405, 63, 1206, + 888, 1197, 879, 1189, 873, 386, 371, 1161, 903, 1139, + 807, 347, 613, 1398, 272, 197, 1633, 1449, 279, 1180, + 1, 1383, 286, 510, 1374, 490, 228, 15, 5, 398, + 1130, 595, 6, 464, 363, 574, 566, 457, 1228, 35, + 1112, 357, 1357, 324, 1330, 240, 158, 220, 1348, 432, + 1340, 548, 1326, 539, 1318, 97, 1106, 127, 1105, 85, + 1098, 76, 902, 211, 500, 189, 848, 118, 760, 106, + 1088, 151, 866, 56, 895, 419, 584, 315, 856, 66, + 1048, 303, 1290, 295, 1275, 274, 1257, 805, 657, 443, + 1312, 531, 1081, 1074, 253, 1065, 1311, 482, 1056, 561, + 1301, 1508, 1433, 1043, 1520, 1285, 929, 1634, 392, 1034, + 183, 1022, 42, 1014, 246, 1275, 26, 1266, 76, 1502, + 2249, 604, 70, 1497, 2249, 1491, 50, 1487, 41, 1478, + 342, 1471, 26, 1251, 2249, 666, 88, 1465, 19, 1460, + 46, 1627, 44, 1621, 207, 1443, 13, 1096, 17, 427, + 9 + }; + return asso_values[(unsigned char)onig_codes_byte_at(codes, 2)+35] + asso_values[(unsigned char)onig_codes_byte_at(codes, 1)+1] + asso_values[(unsigned char)onig_codes_byte_at(codes, 0)]; +} + +const struct ByUnfoldKey * +onigenc_unicode_unfold_key(OnigCodePoint code) +{ + static const struct ByUnfoldKey wordlist[] = + { + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x1040a, 3480, 1}, + + {0x2c0a, 2615, 1}, + + {0x040a, 1035, 1}, + + {0x1e0a, 1891, 1}, + + {0x1f0a, 2252, 1}, + + {0x010a, 186, 1}, + + {0x017d, 351, 1}, + + {0xa77d, 1867, 1}, + + {0xab7d, 1645, 1}, + + {0x1f85, 154, 2}, + + {0x1f89, 134, 2}, + + {0x0189, 622, 1}, + + {0xab85, 1669, 1}, + + {0xab89, 1681, 1}, + + {0x1c85, 960, 1}, + + {0x1c89, 1864, 1}, + + {0x2c84, 2759, 1}, + + {0x1ffb, 2429, 1}, + + {0x1e84, 2075, 1}, + + {0x1f84, 149, 2}, + + {0x0184, 360, 1}, + + {0xa784, 3273, 1}, + + {0xab84, 1666, 1}, + + {0x1ff3, 96, 2}, + + {0x1c84, 960, 1}, + + {0x10c85, 3798, 1}, + + {0x10c89, 3810, 1}, + + {0x2ced, 2906, 1}, + + {0x2c64, 682, 1}, + + {0x0464, 1060, 1}, + + {0x1e64, 2027, 1}, + + {0xa684, 3108, 1}, + + {0x0164, 315, 1}, + + {0xa764, 3240, 1}, + + {0x00dd, 162, 1}, + + {0x10c84, 3795, 1}, + + {0x2c90, 2777, 1}, + + {0x0490, 1114, 1}, + + {0x1e90, 2093, 1}, + + {0x1f90, 169, 2}, + + {0x0190, 631, 1}, + + {0xa790, 3282, 1}, + + {0xab90, 1702, 1}, + + {0xa664, 3087, 1}, + + {0x1c90, 1468, 1}, + + {0x1fe9, 2447, 1}, + + {0x1fd9, 2441, 1}, + + {0x01d9, 450, 1}, + + {0x1ff7, 67, 3}, + + {0x01f7, 417, 1}, + + {0x00d9, 150, 1}, + + {0xa690, 3126, 1}, + + {0xa7f5, 3366, 1}, + + {0x020a, 520, 1}, + + {0x1fe7, 47, 3}, + + {0x10c90, 3831, 1}, + + {0x104b2, 3576, 1}, + + {0x2cb2, 2828, 1}, + + {0x04b2, 1165, 1}, + + {0x1eb2, 2129, 1}, + + {0x1fb2, 249, 2}, + + {0x01b2, 706, 1}, + + {0xa7b2, 715, 1}, + + {0xabb2, 1804, 1}, + + {0x2c67, 2738, 1}, + + {0x1cb2, 1570, 1}, + + {0x104b8, 3594, 1}, + + {0x2cb8, 2837, 1}, + + {0x04b8, 1174, 1}, + + {0x1eb8, 2138, 1}, + + {0x1fb8, 2432, 1}, + + {0x01b8, 411, 1}, + + {0xa7b8, 3327, 1}, + + {0xabb8, 1822, 1}, + + {0x1fe3, 41, 3}, + + {0x1cb8, 1588, 1}, + + {0x10cb2, 3933, 1}, + + {0x2ca6, 2810, 1}, + + {0x04a6, 1147, 1}, + + {0x1ea6, 2111, 1}, + + {0x1fa6, 239, 2}, + + {0x01a6, 685, 1}, + + {0xa7a6, 3315, 1}, + + {0xaba6, 1768, 1}, + + {0x00df, 24, 2}, + + {0x1ca6, 1534, 1}, + + {0x2ca4, 2807, 1}, + + {0x04a4, 1144, 1}, + + {0x1ea4, 2108, 1}, + + {0x1fa4, 229, 2}, + + {0x01a4, 393, 1}, + + {0xa7a4, 3312, 1}, + + {0xaba4, 1762, 1}, + + {0x01f1, 486, 1}, + + {0x1ca4, 1528, 1}, + + {0xff37, 3438, 1}, + + {0x10ca6, 3897, 1}, + {0xffffffff, -1, 0}, + + {0x2ca0, 2801, 1}, + + {0x04a0, 1138, 1}, + + {0x1ea0, 2102, 1}, + + {0x1fa0, 209, 2}, + + {0x01a0, 387, 1}, + + {0xa7a0, 3306, 1}, + + {0xaba0, 1750, 1}, + + {0x10ca4, 3891, 1}, + + {0x1ca0, 1516, 1}, + + {0x2cae, 2822, 1}, + + {0x04ae, 1159, 1}, + + {0x1eae, 2123, 1}, + + {0x1fae, 239, 2}, + + {0x01ae, 697, 1}, + + {0xa7ae, 661, 1}, + + {0xabae, 1792, 1}, + + {0x13fb, 1855, 1}, + + {0x1cae, 1558, 1}, + {0xffffffff, -1, 0}, + + {0x10ca0, 3879, 1}, + + {0x13fd, 1861, 1}, + + {0x2cac, 2819, 1}, + + {0x04ac, 1156, 1}, + + {0x1eac, 2120, 1}, + + {0x1fac, 229, 2}, + + {0x01ac, 399, 1}, + + {0xa7ac, 640, 1}, + + {0xabac, 1786, 1}, + + {0x10cae, 3921, 1}, + + {0x1cac, 1552, 1}, + + {0x2ca2, 2804, 1}, + + {0x04a2, 1141, 1}, + + {0x1ea2, 2105, 1}, + + {0x1fa2, 219, 2}, + + {0x01a2, 390, 1}, + + {0xa7a2, 3309, 1}, + + {0xaba2, 1756, 1}, + + {0x10b2, 2966, 1}, + + {0x1ca2, 1522, 1}, + + {0x0389, 745, 1}, + + {0x10cac, 3915, 1}, + + {0x118b2, 4056, 1}, + + {0x03ff, 736, 1}, + + {0x10402, 3456, 1}, + + {0x2c02, 2591, 1}, + + {0x0402, 1011, 1}, + + {0x1e02, 1879, 1}, + + {0x10b8, 2984, 1}, + + {0x0102, 174, 1}, + + {0x10ca2, 3885, 1}, + + {0x03fd, 730, 1}, + + {0x118b8, 4074, 1}, + {0xffffffff, -1, 0}, + + {0x104b0, 3570, 1}, + + {0x2cb0, 2825, 1}, + + {0x04b0, 1162, 1}, + + {0x1eb0, 2126, 1}, + + {0x10a6, 2930, 1}, + {0xffffffff, -1, 0}, + + {0xa7b0, 718, 1}, + + {0xabb0, 1798, 1}, + + {0x118a6, 4020, 1}, + + {0x1cb0, 1564, 1}, + + {0x1e97, 34, 2}, + + {0x1f97, 204, 2}, + + {0x0197, 655, 1}, + + {0x10a4, 2924, 1}, + + {0xab97, 1723, 1}, + + {0x0390, 25, 3}, + + {0x1c97, 1489, 1}, + + {0x118a4, 4014, 1}, + + {0x1057d, 3714, 1}, + + {0x050a, 1297, 1}, + + {0x10cb0, 3927, 1}, + {0xffffffff, -1, 0}, + + {0x10585, 3738, 1}, + + {0x10589, 3750, 1}, + + {0x03f7, 896, 1}, + + {0x10a0, 2912, 1}, + + {0x03f5, 764, 1}, + + {0x10c97, 3852, 1}, + {0xffffffff, -1, 0}, + + {0x118a0, 4002, 1}, + + {0x10d64, 3996, 1}, + + {0x1f4d, 2351, 1}, + + {0x10584, 3735, 1}, + + {0xfb02, 12, 2}, + + {0x10ae, 2954, 1}, + + {0x004d, 34, 1}, + + {0x1fd7, 31, 3}, + + {0x01d7, 447, 1}, + + {0x118ae, 4044, 1}, + + {0x2caa, 2816, 1}, + + {0x04aa, 1153, 1}, + + {0x1eaa, 2117, 1}, + + {0x1faa, 219, 2}, + + {0x0202, 508, 1}, + + {0xa7aa, 652, 1}, + + {0xabaa, 1780, 1}, + + {0x10ac, 2948, 1}, + + {0x1caa, 1546, 1}, + + {0x0478, 1090, 1}, + + {0x1e78, 2057, 1}, + + {0x118ac, 4038, 1}, + + {0x0178, 168, 1}, + + {0x10590, 3768, 1}, + + {0xab78, 1630, 1}, + {0xffffffff, -1, 0}, + + {0x10a2, 2918, 1}, + + {0x03a6, 822, 1}, + + {0x24b8, 2513, 1}, + + {0x10caa, 3909, 1}, + + {0x118a2, 4008, 1}, + + {0x1ff9, 2417, 1}, + + {0x2ca8, 2813, 1}, + + {0x04a8, 1150, 1}, + + {0x1ea8, 2114, 1}, + + {0x1fa8, 209, 2}, + + {0x03a4, 816, 1}, + + {0xa7a8, 3318, 1}, + + {0xaba8, 1774, 1}, + + {0x03f1, 808, 1}, + + {0x1ca8, 1540, 1}, + + {0x2c98, 2789, 1}, + + {0x0498, 1126, 1}, + + {0x1e98, 38, 2}, + + {0x1f98, 169, 2}, + + {0x0198, 375, 1}, + + {0xa798, 3294, 1}, + + {0xab98, 1726, 1}, + + {0x03a0, 804, 1}, + + {0x1c98, 1492, 1}, + + {0x10b0, 2960, 1}, + + {0x10ca8, 3903, 1}, + + {0x1f83, 144, 2}, + + {0xff35, 3432, 1}, + + {0x118b0, 4050, 1}, + + {0xab83, 1663, 1}, + + {0xa698, 3138, 1}, + + {0x1c83, 956, 1}, + + {0x0537, 1372, 1}, + {0xffffffff, -1, 0}, + + {0x10c98, 3855, 1}, + + {0x2c96, 2786, 1}, + + {0x0496, 1123, 1}, + + {0x1e96, 16, 2}, + + {0x1f96, 199, 2}, + + {0x0196, 658, 1}, + + {0xa796, 3291, 1}, + + {0xab96, 1720, 1}, + + {0x10c83, 3792, 1}, + + {0x1c96, 1486, 1}, + + {0x1fdb, 2411, 1}, + + {0x01db, 453, 1}, + + {0x1e90a, 4224, 1}, + + {0x104c7, 3639, 1}, + + {0x00db, 156, 1}, + + {0x04c7, 1195, 1}, + + {0xa696, 3135, 1}, + + {0x1fc7, 15, 3}, + + {0x01c7, 424, 1}, + + {0xa7c7, 3345, 1}, + + {0x10c96, 3849, 1}, + + {0x00c7, 99, 1}, + + {0x2c2a, 2711, 1}, + + {0x042a, 986, 1}, + + {0x1e2a, 1939, 1}, + + {0x1f2a, 2294, 1}, + + {0x012a, 234, 1}, + + {0xa72a, 3156, 1}, + + {0x10aa, 2942, 1}, + + {0x1041d, 3537, 1}, + + {0x2c1d, 2672, 1}, + + {0x041d, 943, 1}, + + {0x118aa, 4032, 1}, + + {0x1f1d, 2285, 1}, + + {0x104be, 3612, 1}, + + {0x2cbe, 2846, 1}, + + {0x04be, 1183, 1}, + + {0x1ebe, 2147, 1}, + + {0x1fbe, 779, 1}, + + {0xab77, 1627, 1}, + + {0xa7be, 3336, 1}, + + {0xabbe, 1840, 1}, + + {0x03b0, 41, 3}, + + {0x1cbe, 1600, 1}, + + {0x017b, 348, 1}, + + {0xa77b, 3261, 1}, + + {0xab7b, 1639, 1}, + + {0x2c7f, 586, 1}, + + {0xff2a, 3399, 1}, + + {0x0397, 771, 1}, + + {0x10a8, 2936, 1}, + + {0x017f, 52, 1}, + {0xffffffff, -1, 0}, + + {0xab7f, 1651, 1}, + + {0x118a8, 4026, 1}, + + {0x104bc, 3606, 1}, + + {0x2cbc, 2843, 1}, + + {0x04bc, 1180, 1}, + + {0x1ebc, 2144, 1}, + + {0x1fbc, 62, 2}, + + {0x01bc, 414, 1}, + + {0xa7bc, 3333, 1}, + + {0xabbc, 1834, 1}, + + {0x104ba, 3600, 1}, + + {0x2cba, 2840, 1}, + + {0x04ba, 1177, 1}, + + {0x1eba, 2141, 1}, + + {0x1fba, 2390, 1}, + + {0x13f9, 1849, 1}, + + {0xa7ba, 3330, 1}, + + {0xabba, 1828, 1}, + + {0x0502, 1285, 1}, + + {0x1cba, 1594, 1}, + + {0xff33, 3426, 1}, + + {0x022a, 565, 1}, + + {0x104b6, 3588, 1}, + + {0x2cb6, 2834, 1}, + + {0x04b6, 1171, 1}, + + {0x1eb6, 2135, 1}, + + {0x1fb6, 58, 2}, + + {0x03aa, 836, 1}, + + {0xa7b6, 3324, 1}, + + {0xabb6, 1816, 1}, + + {0x10d65, 3999, 1}, + + {0x1cb6, 1582, 1}, + + {0x2c94, 2783, 1}, + + {0x0494, 1120, 1}, + + {0x1e94, 2099, 1}, + + {0x1f94, 189, 2}, + + {0x0194, 643, 1}, + {0xffffffff, -1, 0}, + + {0xab94, 1714, 1}, + + {0x10c7, 3026, 1}, + + {0x1c94, 1480, 1}, + + {0x1e4c, 1990, 1}, + + {0x1f4c, 2348, 1}, + + {0x014c, 279, 1}, + + {0xa74c, 3204, 1}, + + {0x03f9, 890, 1}, + + {0x004c, 31, 1}, + + {0xa694, 3132, 1}, + {0xffffffff, -1, 0}, + + {0x03a8, 829, 1}, + + {0x2ceb, 2903, 1}, + + {0x10c94, 3843, 1}, + {0xffffffff, -1, 0}, + + {0x1feb, 2423, 1}, + + {0xa64c, 3051, 1}, + + {0x054d, 1438, 1}, + + {0x0474, 1084, 1}, + + {0x1e74, 2051, 1}, + + {0x0398, 774, 1}, + + {0x0174, 339, 1}, + + {0x10be, 3002, 1}, + + {0xab74, 1618, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x118be, 4092, 1}, + + {0x2c92, 2780, 1}, + + {0x0492, 1117, 1}, + + {0x1e92, 2096, 1}, + + {0x1f92, 179, 2}, + {0xffffffff, -1, 0}, + + {0xa792, 3285, 1}, + + {0xab92, 1708, 1}, + + {0x10578, 3702, 1}, + + {0x1c92, 1474, 1}, + + {0x1f8b, 144, 2}, + + {0x018b, 366, 1}, + + {0xa78b, 3279, 1}, + + {0xab8b, 1687, 1}, + + {0x0396, 768, 1}, + + {0x2c6f, 607, 1}, + + {0xa692, 3129, 1}, + + {0x10bc, 2996, 1}, + + {0x1f6f, 2387, 1}, + + {0x0535, 1366, 1}, + + {0x10c92, 3837, 1}, + + {0x118bc, 4086, 1}, + + {0x10427, 3567, 1}, + + {0x2c27, 2702, 1}, + + {0x0427, 977, 1}, + + {0x10ba, 2990, 1}, + + {0x10c8b, 3816, 1}, + + {0x024c, 601, 1}, + + {0x2c63, 1870, 1}, + + {0x118ba, 4080, 1}, + + {0x2c6e, 673, 1}, + + {0x046e, 1075, 1}, + + {0x1e6e, 2042, 1}, + + {0x1f6e, 2384, 1}, + + {0x016e, 330, 1}, + + {0xa76e, 3255, 1}, + + {0x1e902, 4200, 1}, + + {0x10b6, 2978, 1}, + + {0x24c7, 2558, 1}, + + {0x10583, 3732, 1}, + + {0x01d5, 444, 1}, + + {0x118b6, 4068, 1}, + + {0x2c86, 2762, 1}, + + {0x00d5, 141, 1}, + + {0x1e86, 2078, 1}, + + {0x1f86, 159, 2}, + + {0x0186, 619, 1}, + + {0xa786, 3276, 1}, + + {0xab86, 1672, 1}, + + {0xff27, 3390, 1}, + + {0x1c86, 986, 1}, + + {0xff31, 3420, 1}, + {0xffffffff, -1, 0}, + + {0x10416, 3516, 1}, + + {0x2c16, 2651, 1}, + + {0x0416, 922, 1}, + + {0x1e16, 1909, 1}, + + {0xa686, 3111, 1}, + + {0x0116, 204, 1}, + + {0x24be, 2531, 1}, + + {0x037f, 893, 1}, + + {0x10c86, 3801, 1}, + + {0x104b4, 3582, 1}, + + {0x2cb4, 2831, 1}, + + {0x04b4, 1168, 1}, + + {0x1eb4, 2132, 1}, + + {0x1fb4, 50, 2}, + {0xffffffff, -1, 0}, + + {0xa7b4, 3321, 1}, + + {0xabb4, 1810, 1}, + {0xffffffff, -1, 0}, + + {0x1cb4, 1576, 1}, + + {0x04fe, 1279, 1}, + + {0x1efe, 2243, 1}, + + {0x052a, 1345, 1}, + + {0x01fe, 502, 1}, + + {0x2c9a, 2792, 1}, + + {0x049a, 1129, 1}, + + {0x1e9a, 0, 2}, + + {0x1f9a, 179, 2}, + + {0x24bc, 2525, 1}, + + {0xa79a, 3297, 1}, + + {0xab9a, 1732, 1}, + + {0x10577, 3699, 1}, + + {0x1c9a, 1498, 1}, + {0xffffffff, -1, 0}, + + {0x104c2, 3624, 1}, + + {0x2cc2, 2852, 1}, + + {0x24ba, 2519, 1}, + + {0x1ec2, 2153, 1}, + + {0x1fc2, 253, 2}, + + {0xa69a, 3141, 1}, + + {0xa7c2, 3342, 1}, + {0xffffffff, -1, 0}, + + {0x00c2, 83, 1}, + + {0x10c9a, 3861, 1}, + + {0xfb16, 125, 2}, + + {0x1057f, 3720, 1}, + + {0x0394, 761, 1}, + + {0x0533, 1360, 1}, + + {0x24b6, 2507, 1}, + + {0x2c8e, 2774, 1}, + + {0x048e, 1111, 1}, + + {0x1e8e, 2090, 1}, + + {0x1f8e, 159, 2}, + + {0x018e, 456, 1}, + + {0x0216, 538, 1}, + + {0xab8e, 1696, 1}, + + {0x2c8a, 2768, 1}, + + {0x048a, 1105, 1}, + + {0x1e8a, 2084, 1}, + + {0x1f8a, 139, 2}, + + {0x018a, 625, 1}, + + {0x10d61, 3987, 1}, + + {0xab8a, 1684, 1}, + {0xffffffff, -1, 0}, + + {0xa68e, 3123, 1}, + + {0x2c62, 664, 1}, + + {0x0462, 1056, 1}, + + {0x1e62, 2024, 1}, + + {0x10c8e, 3825, 1}, + + {0x0162, 312, 1}, + + {0xa762, 3237, 1}, + + {0xa68a, 3117, 1}, + {0xffffffff, -1, 0}, + + {0x104ca, 3648, 1}, + + {0x2cca, 2864, 1}, + + {0x10c8a, 3813, 1}, + + {0x1eca, 2165, 1}, + + {0x1fca, 2402, 1}, + + {0x01ca, 428, 1}, + + {0x0392, 754, 1}, + + {0xa662, 3084, 1}, + + {0x00ca, 108, 1}, + + {0x2c82, 2756, 1}, + + {0x10594, 3777, 1}, + + {0x1e82, 2072, 1}, + + {0x1f82, 139, 2}, + + {0x0182, 357, 1}, + + {0xa782, 3270, 1}, + + {0xab82, 1660, 1}, + + {0x10b4, 2972, 1}, + + {0x1c82, 946, 1}, + {0xffffffff, -1, 0}, + + {0x054c, 1435, 1}, + + {0x118b4, 4062, 1}, + {0xffffffff, -1, 0}, + + {0x1fa9, 214, 2}, + + {0x01a9, 691, 1}, + + {0xa682, 3105, 1}, + + {0xaba9, 1777, 1}, + + {0x16e4d, 4137, 1}, + + {0x1ca9, 1543, 1}, + + {0x10c82, 3789, 1}, + + {0x2c80, 2753, 1}, + + {0x0480, 1102, 1}, + + {0x1e80, 2069, 1}, + + {0x1f80, 129, 2}, + + {0x10574, 3690, 1}, + + {0xa780, 3267, 1}, + + {0xab80, 1654, 1}, + + {0x0057, 65, 1}, + + {0x1c80, 908, 1}, + + {0x10ca9, 3906, 1}, + + {0x1e91d, 4281, 1}, + + {0x10c2, 3014, 1}, + + {0x03d5, 822, 1}, + {0xffffffff, -1, 0}, + + {0x10592, 3774, 1}, + + {0xa680, 3102, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x0386, 739, 1}, + + {0x10c80, 3783, 1}, + + {0x104c4, 3630, 1}, + + {0x2cc4, 2855, 1}, + {0xffffffff, -1, 0}, + + {0x1ec4, 2156, 1}, + + {0x1fc4, 54, 2}, + + {0x01c4, 420, 1}, + + {0xa7c4, 3288, 1}, + + {0x10d63, 3993, 1}, + + {0x00c4, 89, 1}, + + {0x2c9e, 2798, 1}, + + {0x049e, 1135, 1}, + + {0x1e9e, 24, 2}, + + {0x1f9e, 199, 2}, + {0xffffffff, -1, 0}, + + {0xa79e, 3303, 1}, + + {0xab9e, 1744, 1}, + {0xffffffff, -1, 0}, + + {0x1c9e, 1510, 1}, + + {0x2c9c, 2795, 1}, + + {0x049c, 1132, 1}, + + {0x0531, 1354, 1}, + + {0x1f9c, 189, 2}, + + {0x019c, 670, 1}, + + {0xa79c, 3300, 1}, + + {0xab9c, 1738, 1}, + {0xffffffff, -1, 0}, + + {0x1c9c, 1504, 1}, + + {0x03fe, 733, 1}, + + {0x10c9e, 3873, 1}, + {0xffffffff, -1, 0}, + + {0x104cc, 3654, 1}, + + {0x2ccc, 2867, 1}, + + {0x039a, 784, 1}, + + {0x1ecc, 2168, 1}, + + {0x1fcc, 71, 2}, + + {0x10586, 3741, 1}, + + {0xa7cc, 3351, 1}, + + {0x10c9c, 3867, 1}, + + {0x00cc, 114, 1}, + + {0x1f8d, 154, 2}, + {0xffffffff, -1, 0}, + + {0xa78d, 649, 1}, + + {0xab8d, 1693, 1}, + + {0x03c2, 812, 1}, + + {0x2c8c, 2771, 1}, + + {0x048c, 1108, 1}, + + {0x1e8c, 2087, 1}, + + {0x1f8c, 149, 2}, + + {0x10a9, 2939, 1}, + + {0x0516, 1315, 1}, + + {0xab8c, 1690, 1}, + {0xffffffff, -1, 0}, + + {0x118a9, 4029, 1}, + + {0x104b5, 3585, 1}, + + {0x24c2, 2543, 1}, + + {0x10c8d, 3822, 1}, + {0xffffffff, -1, 0}, + + {0x038e, 845, 1}, + + {0x01b5, 408, 1}, + + {0xa68c, 3120, 1}, + + {0xabb5, 1813, 1}, + + {0x00b5, 791, 1}, + + {0x1cb5, 1579, 1}, + + {0x10c8c, 3819, 1}, + + {0x038a, 748, 1}, + + {0x2c88, 2765, 1}, + {0xffffffff, -1, 0}, + + {0x1e88, 2081, 1}, + + {0x1f88, 129, 2}, + + {0x2c2f, 2726, 1}, + + {0x042f, 1002, 1}, + + {0xab88, 1678, 1}, + + {0x1f2f, 2309, 1}, + + {0x1c88, 3047, 1}, + + {0x2ce2, 2900, 1}, + + {0x04e2, 1237, 1}, + + {0x1ee2, 2201, 1}, + + {0x1fe2, 36, 3}, + + {0x01e2, 465, 1}, + + {0x10c4, 3020, 1}, + + {0xa688, 3114, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x2c75, 2750, 1}, + + {0x10c88, 3807, 1}, + + {0x1e4a, 1987, 1}, + + {0x1f4a, 2342, 1}, + + {0x014a, 276, 1}, + + {0xa74a, 3201, 1}, + + {0xab75, 1621, 1}, + + {0x004a, 24, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x24ca, 2567, 1}, + + {0x1058e, 3762, 1}, + + {0xff2f, 3414, 1}, + + {0x10d62, 3990, 1}, + {0xffffffff, -1, 0}, + + {0xa64a, 3047, 1}, + {0xffffffff, -1, 0}, + + {0x03a9, 832, 1}, + + {0x1058a, 3753, 1}, + + {0x1041c, 3534, 1}, + + {0x2c1c, 2669, 1}, + + {0x041c, 940, 1}, + + {0x1e1c, 1918, 1}, + + {0x1f1c, 2282, 1}, + + {0x011c, 213, 1}, + + {0x1041a, 3528, 1}, + + {0x2c1a, 2663, 1}, + + {0x041a, 934, 1}, + + {0x1e1a, 1915, 1}, + + {0x1f1a, 2276, 1}, + + {0x011a, 210, 1}, + + {0x10418, 3522, 1}, + + {0x2c18, 2657, 1}, + + {0x0418, 928, 1}, + + {0x1e18, 1912, 1}, + + {0x1f18, 2270, 1}, + + {0x0118, 207, 1}, + + {0x1040e, 3492, 1}, + + {0x2c0e, 2627, 1}, + + {0x040e, 1047, 1}, + + {0x1e0e, 1897, 1}, + + {0x1f0e, 2264, 1}, + + {0x010e, 192, 1}, + + {0x104c1, 3621, 1}, + + {0x10582, 3729, 1}, + + {0x04c1, 1186, 1}, + {0xffffffff, -1, 0}, + + {0x16e4c, 4134, 1}, + + {0x1e916, 4260, 1}, + + {0x10b5, 2975, 1}, + + {0x10d57, 3957, 1}, + + {0x00c1, 80, 1}, + + {0x024a, 598, 1}, + + {0x118b5, 4065, 1}, + + {0x04f0, 1258, 1}, + + {0x1ef0, 2222, 1}, + + {0x039e, 798, 1}, + + {0x01f0, 20, 2}, + {0xffffffff, -1, 0}, + + {0x24c4, 2549, 1}, + + {0x1e3e, 1969, 1}, + + {0x1f3e, 2330, 1}, + {0xffffffff, -1, 0}, + + {0xa73e, 3183, 1}, + + {0x10580, 3723, 1}, + + {0x039c, 791, 1}, + + {0x1040c, 3486, 1}, + + {0x2c0c, 2621, 1}, + + {0x040c, 1041, 1}, + + {0x1e0c, 1894, 1}, + + {0x1f0c, 2258, 1}, + + {0x010c, 189, 1}, + + {0x021c, 547, 1}, + {0xffffffff, -1, 0}, + + {0x10414, 3510, 1}, + + {0x2c14, 2645, 1}, + + {0x0414, 915, 1}, + + {0x1e14, 1906, 1}, + + {0x021a, 544, 1}, + + {0x0114, 201, 1}, + + {0x10406, 3468, 1}, + + {0x2c06, 2603, 1}, + + {0x0406, 1023, 1}, + + {0x1e06, 1885, 1}, + + {0x0218, 541, 1}, + + {0x0106, 180, 1}, + {0xffffffff, -1, 0}, + + {0x1f3d, 2327, 1}, + + {0x013d, 258, 1}, + + {0x24cc, 2573, 1}, + + {0x020e, 526, 1}, + + {0x038c, 842, 1}, + + {0x10408, 3474, 1}, + + {0x2c08, 2609, 1}, + + {0x0408, 1029, 1}, + + {0x1e08, 1888, 1}, + + {0x1f08, 2246, 1}, + + {0x0108, 183, 1}, + + {0x10404, 3462, 1}, + + {0x2c04, 2597, 1}, + + {0x0404, 1017, 1}, + + {0x1e04, 1882, 1}, + {0xffffffff, -1, 0}, + + {0x0104, 177, 1}, + + {0x10400, 3450, 1}, + + {0x2c00, 2585, 1}, + + {0x0400, 1005, 1}, + + {0x1e00, 1876, 1}, + + {0x0147, 273, 1}, + + {0x0100, 171, 1}, + + {0x023e, 2735, 1}, + + {0x0047, 18, 1}, + + {0x0388, 742, 1}, + + {0x1e56, 2005, 1}, + + {0x1f56, 62, 3}, + + {0x0156, 294, 1}, + + {0xa756, 3219, 1}, + + {0xfb14, 109, 2}, + + {0x0056, 62, 1}, + + {0x020c, 523, 1}, + + {0x1058d, 3759, 1}, + + {0x03e2, 869, 1}, + + {0x10c1, 3011, 1}, + + {0xfb06, 29, 2}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0xa656, 3066, 1}, + + {0x0214, 535, 1}, + + {0x1058c, 3756, 1}, + + {0x10426, 3564, 1}, + + {0x2c26, 2699, 1}, + + {0x0426, 974, 1}, + + {0x1e26, 1933, 1}, + + {0x0206, 514, 1}, + + {0x0126, 228, 1}, + + {0xa726, 3150, 1}, + + {0x023d, 378, 1}, + + {0x10424, 3558, 1}, + + {0x2c24, 2693, 1}, + + {0x0424, 968, 1}, + + {0x1e24, 1930, 1}, + + {0xfb04, 5, 3}, + + {0x0124, 225, 1}, + + {0xa724, 3147, 1}, + + {0x1f59, 2354, 1}, + + {0x0208, 517, 1}, + {0xffffffff, -1, 0}, + + {0xfb00, 4, 2}, + + {0x0059, 71, 1}, + + {0x10588, 3747, 1}, + + {0x1fad, 234, 2}, + + {0x0204, 511, 1}, + + {0xa7ad, 667, 1}, + + {0xabad, 1789, 1}, + + {0x1f5f, 2363, 1}, + + {0x1cad, 1555, 1}, + + {0xff26, 3387, 1}, + + {0x0200, 505, 1}, + + {0x2c2e, 2723, 1}, + + {0x042e, 999, 1}, + + {0x1e2e, 1945, 1}, + + {0x1f2e, 2306, 1}, + + {0x012e, 240, 1}, + + {0xa72e, 3162, 1}, + + {0xff24, 3381, 1}, + {0xffffffff, -1, 0}, + + {0x10cad, 3918, 1}, + + {0x10575, 3693, 1}, + + {0x004f, 40, 1}, + + {0x054a, 1429, 1}, + + {0x2c2c, 2717, 1}, + + {0x042c, 993, 1}, + + {0x1e2c, 1942, 1}, + + {0x1f2c, 2300, 1}, + + {0x012c, 237, 1}, + + {0xa72c, 3159, 1}, + + {0x2c28, 2705, 1}, + + {0x0428, 980, 1}, + + {0x1e28, 1936, 1}, + + {0x1f28, 2288, 1}, + + {0x0128, 231, 1}, + + {0xa728, 3153, 1}, + + {0x0226, 559, 1}, + + {0x03f0, 784, 1}, + + {0xff2e, 3411, 1}, + + {0x24c1, 2540, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x051c, 1324, 1}, + + {0x0224, 556, 1}, + + {0x104c0, 3618, 1}, + + {0x2cc0, 2849, 1}, + + {0x04c0, 1207, 1}, + + {0x1ec0, 2150, 1}, + + {0x051a, 1321, 1}, + + {0xff2c, 3405, 1}, + + {0xa7c0, 3339, 1}, + {0xffffffff, -1, 0}, + + {0x00c0, 77, 1}, + + {0xab73, 1615, 1}, + + {0x0518, 1318, 1}, + + {0xff28, 3393, 1}, + + {0x10422, 3552, 1}, + + {0x2c22, 2687, 1}, + + {0x0422, 960, 1}, + + {0x1e22, 1927, 1}, + + {0x050e, 1303, 1}, + + {0x0122, 222, 1}, + + {0xa722, 3144, 1}, + + {0x022e, 571, 1}, + + {0x1e54, 2002, 1}, + + {0x1f54, 57, 3}, + + {0x0154, 291, 1}, + + {0xa754, 3216, 1}, + + {0x1e30, 1948, 1}, + + {0x0054, 56, 1}, + + {0x0130, 261, 2}, + + {0x1e52, 1999, 1}, + + {0x1f52, 52, 3}, + + {0x0152, 288, 1}, + + {0xa752, 3213, 1}, + + {0x022c, 568, 1}, + + {0x0052, 49, 1}, + + {0xa654, 3063, 1}, + + {0x10ad, 2951, 1}, + + {0x16e57, 4167, 1}, + + {0x053e, 1393, 1}, + + {0x0228, 562, 1}, + + {0x118ad, 4041, 1}, + + {0xff22, 3375, 1}, + + {0xa652, 3060, 1}, + + {0x1e50, 1996, 1}, + + {0x1f50, 84, 2}, + + {0x0150, 285, 1}, + + {0xa750, 3210, 1}, + + {0x050c, 1300, 1}, + + {0x0050, 43, 1}, + + {0x1fab, 224, 2}, + + {0xff30, 3417, 1}, + + {0xa7ab, 634, 1}, + + {0xabab, 1783, 1}, + + {0x104b7, 3591, 1}, + + {0x1cab, 1549, 1}, + + {0x0514, 1312, 1}, + + {0xa650, 3057, 1}, + + {0x1fb7, 10, 3}, + + {0x01b7, 712, 1}, + + {0x2164, 2468, 1}, + + {0xabb7, 1819, 1}, + + {0x0506, 1291, 1}, + + {0x1cb7, 1585, 1}, + + {0x104b1, 3573, 1}, + + {0x053d, 1390, 1}, + + {0x10cab, 3912, 1}, + {0xffffffff, -1, 0}, + + {0x0222, 553, 1}, + + {0x01b1, 703, 1}, + + {0xa7b1, 694, 1}, + + {0xabb1, 1801, 1}, + + {0x2c6d, 610, 1}, + + {0x1cb1, 1567, 1}, + + {0x0508, 1294, 1}, + + {0x1f6d, 2381, 1}, + + {0x10d56, 3954, 1}, + + {0x0230, 574, 1}, + + {0x2c6b, 2744, 1}, + {0xffffffff, -1, 0}, + + {0x0504, 1288, 1}, + + {0x1f6b, 2375, 1}, + + {0x10c0, 3008, 1}, + + {0x1e91c, 4278, 1}, + + {0x10cb1, 3930, 1}, + + {0x0547, 1420, 1}, + + {0x0500, 1282, 1}, + + {0x2c69, 2741, 1}, + {0xffffffff, -1, 0}, + + {0x1e91a, 4272, 1}, + + {0x1f69, 2369, 1}, + {0xffffffff, -1, 0}, + + {0x0556, 1465, 1}, + + {0x104b3, 3579, 1}, + {0xffffffff, -1, 0}, + + {0x1e918, 4266, 1}, + + {0x2167, 2477, 1}, + + {0x1fb3, 62, 2}, + + {0x01b3, 405, 1}, + + {0xa7b3, 3369, 1}, + + {0xabb3, 1807, 1}, + + {0x1e90e, 4236, 1}, + + {0x1cb3, 1573, 1}, + {0xffffffff, -1, 0}, + + {0x1fa7, 244, 2}, + + {0x01a7, 396, 1}, + + {0x10d59, 3963, 1}, + + {0xaba7, 1771, 1}, + + {0xab71, 1609, 1}, + + {0x1ca7, 1537, 1}, + + {0x1e4e, 1993, 1}, + + {0x0526, 1339, 1}, + + {0x014e, 282, 1}, + + {0xa74e, 3207, 1}, + {0xffffffff, -1, 0}, + + {0x004e, 37, 1}, + + {0x10d5f, 3981, 1}, + + {0x1f39, 2315, 1}, + + {0x0139, 252, 1}, + + {0x0524, 1336, 1}, + + {0x10ca7, 3900, 1}, + + {0x1e48, 1984, 1}, + + {0x1f48, 2336, 1}, + + {0xa64e, 3054, 1}, + + {0xa748, 3198, 1}, + + {0x10ab, 2945, 1}, + + {0x0048, 21, 1}, + + {0x104d3, 3675, 1}, + {0xffffffff, -1, 0}, + + {0x118ab, 4035, 1}, + + {0x1e90c, 4230, 1}, + + {0x1fd3, 25, 3}, + + {0x01d3, 441, 1}, + + {0x10b7, 2981, 1}, + + {0xa648, 3044, 1}, + + {0x00d3, 135, 1}, + {0xffffffff, -1, 0}, + + {0x118b7, 4071, 1}, + + {0x1e914, 4254, 1}, + + {0x052e, 1351, 1}, + + {0xff39, 3444, 1}, + + {0x16e4a, 4128, 1}, + + {0x054f, 1444, 1}, + + {0x10b1, 2963, 1}, + + {0x1e906, 4212, 1}, + + {0x24c0, 2537, 1}, + {0xffffffff, -1, 0}, + + {0x118b1, 4053, 1}, + + {0x2c60, 2729, 1}, + + {0x0460, 1053, 1}, + + {0x1e60, 2020, 1}, + + {0x052c, 1348, 1}, + + {0x0160, 309, 1}, + + {0xa760, 3234, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x1e908, 4218, 1}, + + {0x0528, 1342, 1}, + + {0x2c2b, 2714, 1}, + + {0x042b, 990, 1}, + + {0x024e, 604, 1}, + + {0x1f2b, 2297, 1}, + + {0x1e904, 4206, 1}, + + {0xa660, 3081, 1}, + + {0x10420, 3546, 1}, + + {0x2c20, 2681, 1}, + + {0x0420, 953, 1}, + + {0x1e20, 1924, 1}, + + {0x1e900, 4194, 1}, + + {0x0120, 219, 1}, + {0xffffffff, -1, 0}, + + {0x0248, 595, 1}, + + {0x10b3, 2969, 1}, + + {0x10573, 3687, 1}, + + {0x10d54, 3948, 1}, + {0xffffffff, -1, 0}, + + {0x118b3, 4059, 1}, + + {0x03ab, 839, 1}, + {0xffffffff, -1, 0}, + + {0x10a7, 2933, 1}, + {0xffffffff, -1, 0}, + + {0x10d52, 3942, 1}, + {0xffffffff, -1, 0}, + + {0x118a7, 4023, 1}, + + {0xff2b, 3402, 1}, + + {0x0522, 1333, 1}, + + {0x1041e, 3540, 1}, + + {0x2c1e, 2675, 1}, + + {0x041e, 946, 1}, + + {0x1e1e, 1921, 1}, + + {0x0554, 1459, 1}, + + {0x011e, 216, 1}, + + {0x10425, 3561, 1}, + + {0x2c25, 2696, 1}, + + {0x0425, 971, 1}, + + {0x10d50, 3936, 1}, + + {0x24b7, 2510, 1}, + + {0x0552, 1453, 1}, + + {0x10412, 3504, 1}, + + {0x2c12, 2639, 1}, + + {0x0412, 908, 1}, + + {0x1e12, 1903, 1}, + + {0x2165, 2471, 1}, + + {0x0112, 198, 1}, + + {0x10410, 3498, 1}, + + {0x2c10, 2633, 1}, + + {0x0410, 902, 1}, + + {0x1e10, 1900, 1}, + {0xffffffff, -1, 0}, + + {0x0110, 195, 1}, + {0xffffffff, -1, 0}, + + {0x0550, 1447, 1}, + {0xffffffff, -1, 0}, + + {0x2cda, 2888, 1}, + + {0x04da, 1225, 1}, + + {0x1eda, 2189, 1}, + + {0x1fda, 2408, 1}, + + {0x0220, 384, 1}, + + {0xa7da, 3363, 1}, + + {0xff25, 3384, 1}, + + {0x00da, 153, 1}, + + {0x2cd8, 2885, 1}, + + {0x04d8, 1222, 1}, + + {0x1ed8, 2186, 1}, + + {0x1fd8, 2438, 1}, + {0xffffffff, -1, 0}, + + {0xa7d8, 3360, 1}, + {0xffffffff, -1, 0}, + + {0x00d8, 147, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x03a7, 826, 1}, + + {0x0055, 59, 1}, + + {0x2cd6, 2882, 1}, + + {0x04d6, 1219, 1}, + + {0x1ed6, 2183, 1}, + + {0x1fd6, 76, 2}, + {0xffffffff, -1, 0}, + + {0xa7d6, 3357, 1}, + + {0x021e, 550, 1}, + + {0x00d6, 144, 1}, + + {0x104d0, 3666, 1}, + + {0x2cd0, 2873, 1}, + + {0x04d0, 1210, 1}, + + {0x1ed0, 2174, 1}, + + {0x16e47, 4119, 1}, + + {0x104b9, 3597, 1}, + + {0xa7d0, 3354, 1}, + {0xffffffff, -1, 0}, + + {0x00d0, 126, 1}, + + {0x1fb9, 2435, 1}, + + {0x0212, 532, 1}, + + {0x16e56, 4164, 1}, + + {0xabb9, 1825, 1}, + + {0x104cb, 3651, 1}, + + {0x1cb9, 1591, 1}, + + {0x04cb, 1201, 1}, + + {0x0210, 529, 1}, + + {0x1fcb, 2405, 1}, + + {0x01cb, 428, 1}, + + {0xa7cb, 646, 1}, + + {0x2183, 2504, 1}, + + {0x00cb, 111, 1}, + + {0x104c8, 3642, 1}, + + {0x2cc8, 2861, 1}, + {0xffffffff, -1, 0}, + + {0x1ec8, 2162, 1}, + + {0x1fc8, 2396, 1}, + + {0x01c8, 424, 1}, + + {0x10571, 3681, 1}, + {0xffffffff, -1, 0}, + + {0x00c8, 102, 1}, + + {0x104c6, 3636, 1}, + + {0x2cc6, 2858, 1}, + + {0x1f5d, 2360, 1}, + + {0x1ec6, 2159, 1}, + + {0x1fc6, 67, 2}, + + {0x054e, 1441, 1}, + + {0xa7c6, 1873, 1}, + + {0x104c5, 3633, 1}, + + {0x00c6, 96, 1}, + + {0x04c5, 1192, 1}, + + {0x16e59, 4173, 1}, + + {0x0539, 1378, 1}, + + {0x01c5, 420, 1}, + + {0xa7c5, 688, 1}, + {0xffffffff, -1, 0}, + + {0x00c5, 92, 1}, + + {0x0548, 1423, 1}, + {0xffffffff, -1, 0}, + + {0x1faf, 244, 2}, + + {0x01af, 402, 1}, + + {0x16e5f, 4191, 1}, + + {0xabaf, 1795, 1}, + + {0x212a, 27, 1}, + + {0x1caf, 1561, 1}, + + {0x04fc, 1276, 1}, + + {0x1efc, 2240, 1}, + + {0x1ffc, 96, 2}, + + {0x01fc, 499, 1}, + + {0x1fa5, 234, 2}, + + {0x10d60, 3984, 1}, + + {0x16e4f, 4143, 1}, + + {0xaba5, 1765, 1}, + {0xffffffff, -1, 0}, + + {0x1ca5, 1531, 1}, + + {0x10caf, 3924, 1}, + + {0x1fa3, 224, 2}, + + {0x1fa1, 214, 2}, + {0xffffffff, -1, 0}, + + {0xaba3, 1759, 1}, + + {0xaba1, 1753, 1}, + + {0x1ca3, 1525, 1}, + + {0x1ca1, 1519, 1}, + + {0x1f91, 174, 2}, + + {0x0191, 369, 1}, + + {0x10ca5, 3894, 1}, + + {0xab91, 1705, 1}, + {0xffffffff, -1, 0}, + + {0x1c91, 1471, 1}, + + {0x10421, 3549, 1}, + + {0x2c21, 2684, 1}, + + {0x0421, 956, 1}, + + {0x10ca3, 3888, 1}, + + {0x10ca1, 3882, 1}, + + {0x10b9, 2987, 1}, + {0xffffffff, -1, 0}, + + {0x1f49, 2339, 1}, + + {0x0149, 46, 2}, + + {0x118b9, 4077, 1}, + + {0x10c91, 3834, 1}, + + {0x0049, 4296, 1}, + + {0x1f87, 164, 2}, + + {0x0187, 363, 1}, + + {0x0520, 1330, 1}, + + {0xab87, 1675, 1}, + {0xffffffff, -1, 0}, + + {0x1c87, 1056, 1}, + + {0x2c72, 2747, 1}, + + {0x0472, 1081, 1}, + + {0x1e72, 2048, 1}, + {0xffffffff, -1, 0}, + + {0x0172, 336, 1}, + + {0x03da, 857, 1}, + + {0xab72, 1612, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0xff21, 3372, 1}, + + {0x10c87, 3804, 1}, + + {0x2161, 2459, 1}, + + {0x16e54, 4158, 1}, + + {0x03d8, 854, 1}, + + {0x1e32, 1951, 1}, + {0xffffffff, -1, 0}, + + {0x0132, 243, 1}, + + {0xa732, 3165, 1}, + + {0x051e, 1327, 1}, + + {0x16e52, 4152, 1}, + + {0x10c5, 3023, 1}, + {0xffffffff, -1, 0}, + + {0x2c70, 613, 1}, + + {0x0470, 1078, 1}, + + {0x1e70, 2045, 1}, + + {0x03d6, 804, 1}, + + {0x0170, 333, 1}, + + {0x10af, 2957, 1}, + + {0xab70, 1606, 1}, + {0xffffffff, -1, 0}, + + {0x0512, 1309, 1}, + + {0x118af, 4047, 1}, + {0xffffffff, -1, 0}, + + {0x16e50, 4146, 1}, + + {0x03d0, 754, 1}, + {0xffffffff, -1, 0}, + + {0x0510, 1306, 1}, + + {0x10a5, 2927, 1}, + + {0xff32, 3423, 1}, + {0xffffffff, -1, 0}, + + {0x10d55, 3951, 1}, + + {0x118a5, 4017, 1}, + + {0x047c, 1096, 1}, + + {0x1e7c, 2063, 1}, + + {0x10a3, 2921, 1}, + + {0x10a1, 2915, 1}, + {0xffffffff, -1, 0}, + + {0xab7c, 1642, 1}, + + {0x118a3, 4011, 1}, + + {0x118a1, 4005, 1}, + + {0x24b9, 2516, 1}, + + {0x046c, 1072, 1}, + + {0x1e6c, 2039, 1}, + + {0x1f6c, 2378, 1}, + + {0x016c, 327, 1}, + + {0xa76c, 3252, 1}, + + {0x0555, 1462, 1}, + + {0x13fc, 1858, 1}, + + {0x24cb, 2570, 1}, + + {0x046a, 1069, 1}, + + {0x1e6a, 2036, 1}, + + {0x1f6a, 2372, 1}, + + {0x016a, 324, 1}, + + {0xa76a, 3249, 1}, + + {0x0232, 577, 1}, + + {0xa66c, 3099, 1}, + + {0x216f, 2501, 1}, + + {0x24c8, 2561, 1}, + + {0x0468, 1066, 1}, + + {0x1e68, 2033, 1}, + + {0x1f68, 2366, 1}, + + {0x0168, 321, 1}, + + {0xa768, 3246, 1}, + + {0xa66a, 3096, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x24c6, 2555, 1}, + {0xffffffff, -1, 0}, + + {0x1e920, 4290, 1}, + + {0x2163, 2465, 1}, + {0xffffffff, -1, 0}, + + {0x216e, 2498, 1}, + + {0xa668, 3093, 1}, + + {0x24c5, 2552, 1}, + {0xffffffff, -1, 0}, + + {0x1e5a, 2011, 1}, + + {0x10d5d, 3975, 1}, + + {0x015a, 300, 1}, + + {0xa75a, 3225, 1}, + + {0x03a5, 819, 1}, + + {0x005a, 74, 1}, + {0xffffffff, -1, 0}, + + {0x1f8f, 164, 2}, + + {0x018f, 628, 1}, + {0xffffffff, -1, 0}, + + {0xab8f, 1699, 1}, + + {0x03a3, 812, 1}, + + {0x03a1, 808, 1}, + + {0xa65a, 3072, 1}, + + {0x16e4e, 4140, 1}, + + {0x1e91e, 4284, 1}, + {0xffffffff, -1, 0}, + + {0x1e58, 2008, 1}, + + {0x0391, 751, 1}, + + {0x0158, 297, 1}, + + {0xa758, 3222, 1}, + + {0x1e46, 1981, 1}, + + {0x0058, 68, 1}, + + {0x10c8f, 3828, 1}, + + {0xa746, 3195, 1}, + + {0x16e48, 4122, 1}, + + {0x0046, 15, 1}, + + {0x1e912, 4248, 1}, + + {0x04ee, 1255, 1}, + + {0x1eee, 2219, 1}, + + {0xa658, 3069, 1}, + + {0x01ee, 483, 1}, + + {0x104bf, 3615, 1}, + + {0x1e910, 4242, 1}, + + {0xa646, 3041, 1}, + + {0x1e44, 1978, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0xa744, 3192, 1}, + + {0xabbf, 1843, 1}, + + {0x0044, 9, 1}, + + {0x1cbf, 1603, 1}, + + {0x2cde, 2894, 1}, + + {0x04de, 1231, 1}, + + {0x1ede, 2195, 1}, + + {0x0372, 724, 1}, + + {0x01de, 459, 1}, + {0xffffffff, -1, 0}, + + {0xa644, 3038, 1}, + + {0x00de, 165, 1}, + + {0x104bd, 3609, 1}, + + {0x2cdc, 2891, 1}, + + {0x04dc, 1228, 1}, + + {0x1edc, 2192, 1}, + {0xffffffff, -1, 0}, + + {0x10591, 3771, 1}, + + {0xa7dc, 381, 1}, + + {0xabbd, 1837, 1}, + + {0x00dc, 159, 1}, + + {0x1cbd, 1597, 1}, + + {0x104d2, 3672, 1}, + + {0x2cd2, 2876, 1}, + + {0x04d2, 1213, 1}, + + {0x1ed2, 2177, 1}, + + {0x1fd2, 20, 3}, + + {0x104bb, 3603, 1}, + {0xffffffff, -1, 0}, + + {0x0370, 721, 1}, + + {0x00d2, 132, 1}, + + {0x1fbb, 2393, 1}, + + {0x0549, 1426, 1}, + + {0x0246, 592, 1}, + + {0xabbb, 1831, 1}, + + {0x10587, 3744, 1}, + {0xffffffff, -1, 0}, + + {0x0587, 105, 2}, + + {0x104cd, 3657, 1}, + {0xffffffff, -1, 0}, + + {0x04cd, 1204, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x01cd, 432, 1}, + + {0x10572, 3684, 1}, + + {0x2162, 2462, 1}, + + {0x00cd, 117, 1}, + + {0x0244, 700, 1}, + + {0x104c9, 3645, 1}, + + {0x104c3, 3627, 1}, + + {0x04c9, 1198, 1}, + + {0x04c3, 1189, 1}, + + {0x1fc9, 2399, 1}, + + {0x1fc3, 71, 2}, + + {0xa7c9, 3348, 1}, + {0xffffffff, -1, 0}, + + {0x00c9, 105, 1}, + + {0x00c3, 86, 1}, + + {0x0532, 1357, 1}, + + {0x1f9f, 204, 2}, + + {0x019f, 679, 1}, + {0xffffffff, -1, 0}, + + {0xab9f, 1747, 1}, + {0xffffffff, -1, 0}, + + {0x1c9f, 1513, 1}, + + {0x1f5b, 2357, 1}, + + {0x10570, 3678, 1}, + + {0x1f9d, 194, 2}, + + {0x019d, 676, 1}, + {0xffffffff, -1, 0}, + + {0xab9d, 1741, 1}, + + {0x1f95, 194, 2}, + + {0x1c9d, 1507, 1}, + + {0x10bf, 3005, 1}, + + {0xab95, 1717, 1}, + + {0x10c9f, 3876, 1}, + + {0x1c95, 1483, 1}, + + {0x118bf, 4095, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x1e9b, 2020, 1}, + + {0x1f9b, 184, 2}, + {0xffffffff, -1, 0}, + + {0x10c9d, 3870, 1}, + + {0xab9b, 1735, 1}, + + {0x1057c, 3711, 1}, + + {0x1c9b, 1501, 1}, + + {0x10c95, 3846, 1}, + + {0x1e99, 42, 2}, + + {0x1f99, 174, 2}, + {0xffffffff, -1, 0}, + + {0x10bd, 2999, 1}, + + {0xab99, 1729, 1}, + + {0x16e55, 4161, 1}, + + {0x1c99, 1495, 1}, + + {0x118bd, 4089, 1}, + + {0x038f, 848, 1}, + + {0x10c9b, 3864, 1}, + + {0x1f93, 184, 2}, + + {0x0193, 637, 1}, + {0xffffffff, -1, 0}, + + {0xab93, 1711, 1}, + {0xffffffff, -1, 0}, + + {0x1c93, 1477, 1}, + + {0x1f4b, 2345, 1}, + + {0x10c99, 3858, 1}, + + {0x10bb, 2993, 1}, + {0xffffffff, -1, 0}, + + {0x004b, 27, 1}, + + {0x0143, 267, 1}, + + {0x118bb, 4083, 1}, + + {0x1e921, 4293, 1}, + + {0x0043, 6, 1}, + + {0x10d5a, 3966, 1}, + + {0x10c93, 3840, 1}, + + {0x1f81, 134, 2}, + + {0x0181, 616, 1}, + + {0x10cd, 3029, 1}, + + {0xab81, 1657, 1}, + + {0x03ee, 887, 1}, + + {0x1c81, 915, 1}, + + {0x2c7e, 583, 1}, + + {0x047e, 1099, 1}, + + {0x1e7e, 2066, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0xa77e, 3264, 1}, + + {0xab7e, 1648, 1}, + + {0x10c3, 3017, 1}, + + {0x0145, 270, 1}, + + {0x10d58, 3960, 1}, + + {0x10c81, 3786, 1}, + + {0x0045, 12, 1}, + + {0x1058f, 3765, 1}, + + {0x03de, 863, 1}, + {0xffffffff, -1, 0}, + + {0x24bf, 2534, 1}, + + {0x0476, 1087, 1}, + + {0x1e76, 2054, 1}, + + {0x16e5d, 4185, 1}, + + {0x0176, 342, 1}, + {0xffffffff, -1, 0}, + + {0xab76, 1624, 1}, + + {0x03dc, 860, 1}, + + {0x0466, 1063, 1}, + + {0x1e66, 2030, 1}, + {0xffffffff, -1, 0}, + + {0x0166, 318, 1}, + + {0xa766, 3243, 1}, + + {0x1e5e, 2017, 1}, + + {0x0546, 1417, 1}, + + {0x015e, 306, 1}, + + {0xa75e, 3231, 1}, + + {0x1e5c, 2014, 1}, + + {0x24bd, 2528, 1}, + + {0x015c, 303, 1}, + + {0xa75c, 3228, 1}, + + {0x0243, 354, 1}, + + {0xa666, 3090, 1}, + {0xffffffff, -1, 0}, + + {0x1e42, 1975, 1}, + {0xffffffff, -1, 0}, + + {0xa65e, 3078, 1}, + + {0xa742, 3189, 1}, + + {0x0544, 1411, 1}, + + {0x0042, 3, 1}, + + {0xa65c, 3075, 1}, + + {0x0053, 52, 1}, + {0xffffffff, -1, 0}, + + {0x24bb, 2522, 1}, + + {0x104cf, 3663, 1}, + + {0x1e3a, 1963, 1}, + + {0x1f3a, 2318, 1}, + + {0xa642, 3035, 1}, + + {0xa73a, 3177, 1}, + + {0x01cf, 435, 1}, + + {0x0141, 264, 1}, + + {0x0245, 709, 1}, + + {0x00cf, 123, 1}, + + {0x0041, 0, 1}, + + {0x24cd, 2576, 1}, + {0xffffffff, -1, 0}, + + {0x04fa, 1273, 1}, + + {0x1efa, 2237, 1}, + + {0x1ffa, 2426, 1}, + + {0x01fa, 496, 1}, + + {0x039f, 801, 1}, + {0xffffffff, -1, 0}, + + {0x047a, 1093, 1}, + + {0x1e7a, 2060, 1}, + + {0x24c9, 2564, 1}, + + {0x24c3, 2546, 1}, + + {0x16e49, 4125, 1}, + + {0xab7a, 1636, 1}, + + {0x039d, 795, 1}, + + {0xff3a, 3447, 1}, + + {0x0051, 46, 1}, + {0xffffffff, -1, 0}, + + {0x0395, 764, 1}, + + {0x04f4, 1264, 1}, + + {0x1ef4, 2228, 1}, + + {0x1ff4, 101, 2}, + + {0x01f4, 490, 1}, + + {0x2cf2, 2909, 1}, + + {0x04f2, 1261, 1}, + + {0x1ef2, 2225, 1}, + + {0x1ff2, 257, 2}, + + {0x01f2, 486, 1}, + + {0x039b, 788, 1}, + {0xffffffff, -1, 0}, + + {0x04ec, 1252, 1}, + + {0x1eec, 2216, 1}, + + {0x1fec, 2450, 1}, + + {0x01ec, 480, 1}, + {0xffffffff, -1, 0}, + + {0x10d5b, 3969, 1}, + + {0x0399, 779, 1}, + + {0x04ea, 1249, 1}, + + {0x1eea, 2213, 1}, + + {0x1fea, 2420, 1}, + + {0x01ea, 477, 1}, + + {0x023a, 2732, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x0241, 589, 1}, + + {0x0393, 758, 1}, + + {0x04e8, 1246, 1}, + + {0x1ee8, 2210, 1}, + + {0x1fe8, 2444, 1}, + + {0x01e8, 474, 1}, + + {0x04e6, 1243, 1}, + + {0x1ee6, 2207, 1}, + + {0x1fe6, 88, 2}, + + {0x01e6, 471, 1}, + {0xffffffff, -1, 0}, + + {0x10595, 3780, 1}, + + {0x04e4, 1240, 1}, + + {0x1ee4, 2204, 1}, + + {0x1fe4, 80, 2}, + + {0x01e4, 468, 1}, + + {0x2ce0, 2897, 1}, + + {0x04e0, 1234, 1}, + + {0x1ee0, 2198, 1}, + {0xffffffff, -1, 0}, + + {0x01e0, 462, 1}, + + {0x104ce, 3660, 1}, + + {0x2cce, 2870, 1}, + + {0x1e40, 1972, 1}, + + {0x1ece, 2171, 1}, + {0xffffffff, -1, 0}, + + {0xa740, 3186, 1}, + + {0x1e38, 1960, 1}, + + {0x1f38, 2312, 1}, + + {0x00ce, 120, 1}, + + {0xa738, 3174, 1}, + + {0x0345, 779, 1}, + + {0x1e36, 1957, 1}, + + {0x104d1, 3669, 1}, + + {0x0136, 249, 1}, + + {0xa736, 3171, 1}, + + {0xa640, 3032, 1}, + + {0x1e34, 1954, 1}, + + {0x01d1, 438, 1}, + + {0x0134, 246, 1}, + + {0xa734, 3168, 1}, + + {0x00d1, 129, 1}, + + {0x0376, 727, 1}, + + {0x1041b, 3531, 1}, + + {0x2c1b, 2666, 1}, + + {0x041b, 937, 1}, + + {0x054b, 1432, 1}, + + {0x1f1b, 2279, 1}, + + {0x1f3f, 2333, 1}, + + {0x013f, 261, 1}, + + {0x0543, 1408, 1}, + + {0xff38, 3441, 1}, + + {0x10417, 3519, 1}, + + {0x2c17, 2654, 1}, + + {0x0417, 925, 1}, + + {0x10581, 3726, 1}, + + {0xff36, 3435, 1}, + + {0x13fa, 1852, 1}, + + {0x10419, 3525, 1}, + + {0x2c19, 2660, 1}, + + {0x0419, 931, 1}, + + {0xff34, 3429, 1}, + + {0x1f19, 2273, 1}, + {0xffffffff, -1, 0}, + + {0x1057e, 3717, 1}, + + {0x16e5a, 4176, 1}, + + {0x10415, 3513, 1}, + + {0x2c15, 2648, 1}, + + {0x0415, 919, 1}, + {0xffffffff, -1, 0}, + + {0x0545, 1414, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x10413, 3507, 1}, + + {0x2c13, 2642, 1}, + + {0x0413, 912, 1}, + + {0x10d5e, 3978, 1}, + + {0x03cf, 851, 1}, + {0xffffffff, -1, 0}, + + {0x10576, 3696, 1}, + + {0x10d5c, 3972, 1}, + {0xffffffff, -1, 0}, + + {0x16e58, 4170, 1}, + + {0x10405, 3465, 1}, + + {0x2c05, 2600, 1}, + + {0x0405, 1020, 1}, + + {0x16e46, 4116, 1}, + + {0x03fa, 899, 1}, + + {0x24cf, 2582, 1}, + + {0x10d53, 3945, 1}, + {0xffffffff, -1, 0}, + + {0x2126, 832, 1}, + + {0x1040f, 3495, 1}, + + {0x2c0f, 2630, 1}, + + {0x040f, 1050, 1}, + + {0xfb17, 117, 2}, + + {0x1f0f, 2267, 1}, + + {0x1040d, 3489, 1}, + + {0x2c0d, 2624, 1}, + + {0x040d, 1044, 1}, + + {0x16e44, 4110, 1}, + + {0x1f0d, 2261, 1}, + {0xffffffff, -1, 0}, + + {0x0542, 1405, 1}, + + {0x03f4, 774, 1}, + + {0x0553, 1456, 1}, + + {0x1040b, 3483, 1}, + + {0x2c0b, 2618, 1}, + + {0x040b, 1038, 1}, + + {0xfb15, 113, 2}, + + {0x1f0b, 2255, 1}, + + {0x10403, 3459, 1}, + + {0x2c03, 2594, 1}, + + {0x0403, 1014, 1}, + + {0x053a, 1381, 1}, + + {0x03ec, 884, 1}, + + {0xfb13, 121, 2}, + + {0x0541, 1402, 1}, + + {0x10d51, 3939, 1}, + + {0x10409, 3477, 1}, + + {0x2c09, 2612, 1}, + + {0x0409, 1032, 1}, + + {0x03ea, 881, 1}, + + {0x1f09, 2249, 1}, + + {0x1f3b, 2321, 1}, + + {0x013b, 255, 1}, + + {0xfb05, 29, 2}, + + {0x10401, 3453, 1}, + + {0x2c01, 2588, 1}, + + {0x0401, 1008, 1}, + + {0x1057a, 3708, 1}, + + {0x03e8, 878, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x0551, 1450, 1}, + + {0x03e6, 875, 1}, + + {0x04f8, 1270, 1}, + + {0x1ef8, 2234, 1}, + + {0x1ff8, 2414, 1}, + + {0x01f8, 493, 1}, + {0xffffffff, -1, 0}, + + {0x03e4, 872, 1}, + + {0x04f6, 1267, 1}, + + {0x1ef6, 2231, 1}, + + {0x1ff6, 92, 2}, + + {0x01f6, 372, 1}, + + {0x03e0, 866, 1}, + {0xffffffff, -1, 0}, + + {0x2cd4, 2879, 1}, + + {0x04d4, 1216, 1}, + + {0x1ed4, 2180, 1}, + + {0x0179, 345, 1}, + + {0xa779, 3258, 1}, + + {0xab79, 1633, 1}, + + {0xfb03, 0, 3}, + + {0x00d4, 138, 1}, + + {0x1e3c, 1966, 1}, + + {0x1f3c, 2324, 1}, + {0xffffffff, -1, 0}, + + {0xa73c, 3180, 1}, + + {0x10423, 3555, 1}, + + {0x2c23, 2690, 1}, + + {0x0423, 965, 1}, + + {0x24ce, 2579, 1}, + + {0x03d1, 774, 1}, + + {0x2c2d, 2720, 1}, + + {0x042d, 996, 1}, + + {0x16e5b, 4179, 1}, + + {0x1f2d, 2303, 1}, + {0xffffffff, -1, 0}, + + {0xfb01, 8, 2}, + + {0x2c29, 2708, 1}, + + {0x0429, 983, 1}, + + {0x023b, 580, 1}, + + {0x1f29, 2291, 1}, + + {0x1041f, 3543, 1}, + + {0x2c1f, 2678, 1}, + + {0x041f, 950, 1}, + + {0x10411, 3501, 1}, + + {0x2c11, 2636, 1}, + + {0x0411, 905, 1}, + + {0x10407, 3471, 1}, + + {0x2c07, 2606, 1}, + + {0x0407, 1026, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0xff23, 3378, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x0540, 1399, 1}, + + {0xff2d, 3408, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x0538, 1375, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0xff29, 3396, 1}, + {0xffffffff, -1, 0}, + + {0x0536, 1369, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x0534, 1363, 1}, + {0xffffffff, -1, 0}, + + {0x16e4b, 4131, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x16e43, 4107, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x053f, 1396, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, + + {0x216d, 2495, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x216b, 2489, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x16e45, 4113, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x13f8, 1846, 1}, + + {0x2169, 2483, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x16e5e, 4188, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x16e5c, 4182, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, + + {0x16e42, 4104, 1}, + {0xffffffff, -1, 0}, + + {0x16e53, 4155, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, + + {0x16e41, 4101, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x053b, 1384, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x16e51, 4149, 1}, + + {0x1e91b, 4275, 1}, + {0xffffffff, -1, 0}, + + {0x2160, 2456, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, + + {0x1e917, 4263, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x212b, 92, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x1e919, 4269, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x10579, 3705, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x1e915, 4257, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x053c, 1387, 1}, + {0xffffffff, -1, 0}, + + {0x1e913, 4251, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x1e905, 4209, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x1e90f, 4239, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x1e90d, 4233, 1}, + + {0x16e40, 4098, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x1e90b, 4227, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x1e903, 4203, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x1e909, 4221, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x1e901, 4197, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x1e91f, 4287, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x1e911, 4245, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x1e907, 4215, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x2132, 2453, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x216c, 2492, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x216a, 2486, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x2168, 2480, 1}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, + + {0x2166, 2474, 1} + }; + + + { + int key = hash(&code); + + if (key <= MAX_HASH_VALUE) + { + OnigCodePoint gcode = wordlist[key].code; + + if (code == gcode && wordlist[key].index >= 0) + return &wordlist[key]; + } + } + return 0; +} diff --git a/internal/components/third_party/oniguruma/src/unicode_wb_data.h b/internal/components/third_party/oniguruma/src/unicode_wb_data.h new file mode 100644 index 0000000000..aa078fb11a --- /dev/null +++ b/internal/components/third_party/oniguruma/src/unicode_wb_data.h @@ -0,0 +1,1138 @@ +/* unicode_wb_data.c: Generated by make_unicode_wb_data.py. */ +/*- + * Copyright (c) 2019-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#define WORD_BREAK_PROPERTY_VERSION 160000 + +/* +ALetter +CR +Double_Quote +Extend +ExtendNumLet +Format +Hebrew_Letter +Katakana +LF +MidLetter +MidNum +MidNumLet +Newline +Numeric +Regional_Indicator +Single_Quote +WSegSpace +ZWJ +*/ + +static int WB_RANGE_NUM = 1085; +static WB_RANGE_TYPE WB_RANGES[] = { + {0x00000a, 0x00000a, WB_LF }, + {0x00000b, 0x00000c, WB_Newline }, + {0x00000d, 0x00000d, WB_CR }, + {0x000020, 0x000020, WB_WSegSpace }, + {0x000022, 0x000022, WB_Double_Quote }, + {0x000027, 0x000027, WB_Single_Quote }, + {0x00002c, 0x00002c, WB_MidNum }, + {0x00002e, 0x00002e, WB_MidNumLet }, + {0x000030, 0x000039, WB_Numeric }, + {0x00003a, 0x00003a, WB_MidLetter }, + {0x00003b, 0x00003b, WB_MidNum }, + {0x000041, 0x00005a, WB_ALetter }, + {0x00005f, 0x00005f, WB_ExtendNumLet }, + {0x000061, 0x00007a, WB_ALetter }, + {0x000085, 0x000085, WB_Newline }, + {0x0000aa, 0x0000aa, WB_ALetter }, + {0x0000ad, 0x0000ad, WB_Format }, + {0x0000b5, 0x0000b5, WB_ALetter }, + {0x0000b7, 0x0000b7, WB_MidLetter }, + {0x0000ba, 0x0000ba, WB_ALetter }, + {0x0000c0, 0x0000d6, WB_ALetter }, + {0x0000d8, 0x0000f6, WB_ALetter }, + {0x0000f8, 0x0002d7, WB_ALetter }, + {0x0002de, 0x0002ff, WB_ALetter }, + {0x000300, 0x00036f, WB_Extend }, + {0x000370, 0x000374, WB_ALetter }, + {0x000376, 0x000377, WB_ALetter }, + {0x00037a, 0x00037d, WB_ALetter }, + {0x00037e, 0x00037e, WB_MidNum }, + {0x00037f, 0x00037f, WB_ALetter }, + {0x000386, 0x000386, WB_ALetter }, + {0x000387, 0x000387, WB_MidLetter }, + {0x000388, 0x00038a, WB_ALetter }, + {0x00038c, 0x00038c, WB_ALetter }, + {0x00038e, 0x0003a1, WB_ALetter }, + {0x0003a3, 0x0003f5, WB_ALetter }, + {0x0003f7, 0x000481, WB_ALetter }, + {0x000483, 0x000489, WB_Extend }, + {0x00048a, 0x00052f, WB_ALetter }, + {0x000531, 0x000556, WB_ALetter }, + {0x000559, 0x00055c, WB_ALetter }, + {0x00055e, 0x00055e, WB_ALetter }, + {0x00055f, 0x00055f, WB_MidLetter }, + {0x000560, 0x000588, WB_ALetter }, + {0x000589, 0x000589, WB_MidNum }, + {0x00058a, 0x00058a, WB_ALetter }, + {0x000591, 0x0005bd, WB_Extend }, + {0x0005bf, 0x0005bf, WB_Extend }, + {0x0005c1, 0x0005c2, WB_Extend }, + {0x0005c4, 0x0005c5, WB_Extend }, + {0x0005c7, 0x0005c7, WB_Extend }, + {0x0005d0, 0x0005ea, WB_Hebrew_Letter }, + {0x0005ef, 0x0005f2, WB_Hebrew_Letter }, + {0x0005f3, 0x0005f3, WB_ALetter }, + {0x0005f4, 0x0005f4, WB_MidLetter }, + {0x000600, 0x000605, WB_Numeric }, + {0x00060c, 0x00060d, WB_MidNum }, + {0x000610, 0x00061a, WB_Extend }, + {0x00061c, 0x00061c, WB_Format }, + {0x000620, 0x00064a, WB_ALetter }, + {0x00064b, 0x00065f, WB_Extend }, + {0x000660, 0x000669, WB_Numeric }, + {0x00066b, 0x00066b, WB_Numeric }, + {0x00066c, 0x00066c, WB_MidNum }, + {0x00066e, 0x00066f, WB_ALetter }, + {0x000670, 0x000670, WB_Extend }, + {0x000671, 0x0006d3, WB_ALetter }, + {0x0006d5, 0x0006d5, WB_ALetter }, + {0x0006d6, 0x0006dc, WB_Extend }, + {0x0006dd, 0x0006dd, WB_Numeric }, + {0x0006df, 0x0006e4, WB_Extend }, + {0x0006e5, 0x0006e6, WB_ALetter }, + {0x0006e7, 0x0006e8, WB_Extend }, + {0x0006ea, 0x0006ed, WB_Extend }, + {0x0006ee, 0x0006ef, WB_ALetter }, + {0x0006f0, 0x0006f9, WB_Numeric }, + {0x0006fa, 0x0006fc, WB_ALetter }, + {0x0006ff, 0x0006ff, WB_ALetter }, + {0x00070f, 0x000710, WB_ALetter }, + {0x000711, 0x000711, WB_Extend }, + {0x000712, 0x00072f, WB_ALetter }, + {0x000730, 0x00074a, WB_Extend }, + {0x00074d, 0x0007a5, WB_ALetter }, + {0x0007a6, 0x0007b0, WB_Extend }, + {0x0007b1, 0x0007b1, WB_ALetter }, + {0x0007c0, 0x0007c9, WB_Numeric }, + {0x0007ca, 0x0007ea, WB_ALetter }, + {0x0007eb, 0x0007f3, WB_Extend }, + {0x0007f4, 0x0007f5, WB_ALetter }, + {0x0007f8, 0x0007f8, WB_MidNum }, + {0x0007fa, 0x0007fa, WB_ALetter }, + {0x0007fd, 0x0007fd, WB_Extend }, + {0x000800, 0x000815, WB_ALetter }, + {0x000816, 0x000819, WB_Extend }, + {0x00081a, 0x00081a, WB_ALetter }, + {0x00081b, 0x000823, WB_Extend }, + {0x000824, 0x000824, WB_ALetter }, + {0x000825, 0x000827, WB_Extend }, + {0x000828, 0x000828, WB_ALetter }, + {0x000829, 0x00082d, WB_Extend }, + {0x000840, 0x000858, WB_ALetter }, + {0x000859, 0x00085b, WB_Extend }, + {0x000860, 0x00086a, WB_ALetter }, + {0x000870, 0x000887, WB_ALetter }, + {0x000889, 0x00088e, WB_ALetter }, + {0x000890, 0x000891, WB_Numeric }, + {0x000897, 0x00089f, WB_Extend }, + {0x0008a0, 0x0008c9, WB_ALetter }, + {0x0008ca, 0x0008e1, WB_Extend }, + {0x0008e2, 0x0008e2, WB_Numeric }, + {0x0008e3, 0x000903, WB_Extend }, + {0x000904, 0x000939, WB_ALetter }, + {0x00093a, 0x00093c, WB_Extend }, + {0x00093d, 0x00093d, WB_ALetter }, + {0x00093e, 0x00094f, WB_Extend }, + {0x000950, 0x000950, WB_ALetter }, + {0x000951, 0x000957, WB_Extend }, + {0x000958, 0x000961, WB_ALetter }, + {0x000962, 0x000963, WB_Extend }, + {0x000966, 0x00096f, WB_Numeric }, + {0x000971, 0x000980, WB_ALetter }, + {0x000981, 0x000983, WB_Extend }, + {0x000985, 0x00098c, WB_ALetter }, + {0x00098f, 0x000990, WB_ALetter }, + {0x000993, 0x0009a8, WB_ALetter }, + {0x0009aa, 0x0009b0, WB_ALetter }, + {0x0009b2, 0x0009b2, WB_ALetter }, + {0x0009b6, 0x0009b9, WB_ALetter }, + {0x0009bc, 0x0009bc, WB_Extend }, + {0x0009bd, 0x0009bd, WB_ALetter }, + {0x0009be, 0x0009c4, WB_Extend }, + {0x0009c7, 0x0009c8, WB_Extend }, + {0x0009cb, 0x0009cd, WB_Extend }, + {0x0009ce, 0x0009ce, WB_ALetter }, + {0x0009d7, 0x0009d7, WB_Extend }, + {0x0009dc, 0x0009dd, WB_ALetter }, + {0x0009df, 0x0009e1, WB_ALetter }, + {0x0009e2, 0x0009e3, WB_Extend }, + {0x0009e6, 0x0009ef, WB_Numeric }, + {0x0009f0, 0x0009f1, WB_ALetter }, + {0x0009fc, 0x0009fc, WB_ALetter }, + {0x0009fe, 0x0009fe, WB_Extend }, + {0x000a01, 0x000a03, WB_Extend }, + {0x000a05, 0x000a0a, WB_ALetter }, + {0x000a0f, 0x000a10, WB_ALetter }, + {0x000a13, 0x000a28, WB_ALetter }, + {0x000a2a, 0x000a30, WB_ALetter }, + {0x000a32, 0x000a33, WB_ALetter }, + {0x000a35, 0x000a36, WB_ALetter }, + {0x000a38, 0x000a39, WB_ALetter }, + {0x000a3c, 0x000a3c, WB_Extend }, + {0x000a3e, 0x000a42, WB_Extend }, + {0x000a47, 0x000a48, WB_Extend }, + {0x000a4b, 0x000a4d, WB_Extend }, + {0x000a51, 0x000a51, WB_Extend }, + {0x000a59, 0x000a5c, WB_ALetter }, + {0x000a5e, 0x000a5e, WB_ALetter }, + {0x000a66, 0x000a6f, WB_Numeric }, + {0x000a70, 0x000a71, WB_Extend }, + {0x000a72, 0x000a74, WB_ALetter }, + {0x000a75, 0x000a75, WB_Extend }, + {0x000a81, 0x000a83, WB_Extend }, + {0x000a85, 0x000a8d, WB_ALetter }, + {0x000a8f, 0x000a91, WB_ALetter }, + {0x000a93, 0x000aa8, WB_ALetter }, + {0x000aaa, 0x000ab0, WB_ALetter }, + {0x000ab2, 0x000ab3, WB_ALetter }, + {0x000ab5, 0x000ab9, WB_ALetter }, + {0x000abc, 0x000abc, WB_Extend }, + {0x000abd, 0x000abd, WB_ALetter }, + {0x000abe, 0x000ac5, WB_Extend }, + {0x000ac7, 0x000ac9, WB_Extend }, + {0x000acb, 0x000acd, WB_Extend }, + {0x000ad0, 0x000ad0, WB_ALetter }, + {0x000ae0, 0x000ae1, WB_ALetter }, + {0x000ae2, 0x000ae3, WB_Extend }, + {0x000ae6, 0x000aef, WB_Numeric }, + {0x000af9, 0x000af9, WB_ALetter }, + {0x000afa, 0x000aff, WB_Extend }, + {0x000b01, 0x000b03, WB_Extend }, + {0x000b05, 0x000b0c, WB_ALetter }, + {0x000b0f, 0x000b10, WB_ALetter }, + {0x000b13, 0x000b28, WB_ALetter }, + {0x000b2a, 0x000b30, WB_ALetter }, + {0x000b32, 0x000b33, WB_ALetter }, + {0x000b35, 0x000b39, WB_ALetter }, + {0x000b3c, 0x000b3c, WB_Extend }, + {0x000b3d, 0x000b3d, WB_ALetter }, + {0x000b3e, 0x000b44, WB_Extend }, + {0x000b47, 0x000b48, WB_Extend }, + {0x000b4b, 0x000b4d, WB_Extend }, + {0x000b55, 0x000b57, WB_Extend }, + {0x000b5c, 0x000b5d, WB_ALetter }, + {0x000b5f, 0x000b61, WB_ALetter }, + {0x000b62, 0x000b63, WB_Extend }, + {0x000b66, 0x000b6f, WB_Numeric }, + {0x000b71, 0x000b71, WB_ALetter }, + {0x000b82, 0x000b82, WB_Extend }, + {0x000b83, 0x000b83, WB_ALetter }, + {0x000b85, 0x000b8a, WB_ALetter }, + {0x000b8e, 0x000b90, WB_ALetter }, + {0x000b92, 0x000b95, WB_ALetter }, + {0x000b99, 0x000b9a, WB_ALetter }, + {0x000b9c, 0x000b9c, WB_ALetter }, + {0x000b9e, 0x000b9f, WB_ALetter }, + {0x000ba3, 0x000ba4, WB_ALetter }, + {0x000ba8, 0x000baa, WB_ALetter }, + {0x000bae, 0x000bb9, WB_ALetter }, + {0x000bbe, 0x000bc2, WB_Extend }, + {0x000bc6, 0x000bc8, WB_Extend }, + {0x000bca, 0x000bcd, WB_Extend }, + {0x000bd0, 0x000bd0, WB_ALetter }, + {0x000bd7, 0x000bd7, WB_Extend }, + {0x000be6, 0x000bef, WB_Numeric }, + {0x000c00, 0x000c04, WB_Extend }, + {0x000c05, 0x000c0c, WB_ALetter }, + {0x000c0e, 0x000c10, WB_ALetter }, + {0x000c12, 0x000c28, WB_ALetter }, + {0x000c2a, 0x000c39, WB_ALetter }, + {0x000c3c, 0x000c3c, WB_Extend }, + {0x000c3d, 0x000c3d, WB_ALetter }, + {0x000c3e, 0x000c44, WB_Extend }, + {0x000c46, 0x000c48, WB_Extend }, + {0x000c4a, 0x000c4d, WB_Extend }, + {0x000c55, 0x000c56, WB_Extend }, + {0x000c58, 0x000c5a, WB_ALetter }, + {0x000c5d, 0x000c5d, WB_ALetter }, + {0x000c60, 0x000c61, WB_ALetter }, + {0x000c62, 0x000c63, WB_Extend }, + {0x000c66, 0x000c6f, WB_Numeric }, + {0x000c80, 0x000c80, WB_ALetter }, + {0x000c81, 0x000c83, WB_Extend }, + {0x000c85, 0x000c8c, WB_ALetter }, + {0x000c8e, 0x000c90, WB_ALetter }, + {0x000c92, 0x000ca8, WB_ALetter }, + {0x000caa, 0x000cb3, WB_ALetter }, + {0x000cb5, 0x000cb9, WB_ALetter }, + {0x000cbc, 0x000cbc, WB_Extend }, + {0x000cbd, 0x000cbd, WB_ALetter }, + {0x000cbe, 0x000cc4, WB_Extend }, + {0x000cc6, 0x000cc8, WB_Extend }, + {0x000cca, 0x000ccd, WB_Extend }, + {0x000cd5, 0x000cd6, WB_Extend }, + {0x000cdd, 0x000cde, WB_ALetter }, + {0x000ce0, 0x000ce1, WB_ALetter }, + {0x000ce2, 0x000ce3, WB_Extend }, + {0x000ce6, 0x000cef, WB_Numeric }, + {0x000cf1, 0x000cf2, WB_ALetter }, + {0x000cf3, 0x000cf3, WB_Extend }, + {0x000d00, 0x000d03, WB_Extend }, + {0x000d04, 0x000d0c, WB_ALetter }, + {0x000d0e, 0x000d10, WB_ALetter }, + {0x000d12, 0x000d3a, WB_ALetter }, + {0x000d3b, 0x000d3c, WB_Extend }, + {0x000d3d, 0x000d3d, WB_ALetter }, + {0x000d3e, 0x000d44, WB_Extend }, + {0x000d46, 0x000d48, WB_Extend }, + {0x000d4a, 0x000d4d, WB_Extend }, + {0x000d4e, 0x000d4e, WB_ALetter }, + {0x000d54, 0x000d56, WB_ALetter }, + {0x000d57, 0x000d57, WB_Extend }, + {0x000d5f, 0x000d61, WB_ALetter }, + {0x000d62, 0x000d63, WB_Extend }, + {0x000d66, 0x000d6f, WB_Numeric }, + {0x000d7a, 0x000d7f, WB_ALetter }, + {0x000d81, 0x000d83, WB_Extend }, + {0x000d85, 0x000d96, WB_ALetter }, + {0x000d9a, 0x000db1, WB_ALetter }, + {0x000db3, 0x000dbb, WB_ALetter }, + {0x000dbd, 0x000dbd, WB_ALetter }, + {0x000dc0, 0x000dc6, WB_ALetter }, + {0x000dca, 0x000dca, WB_Extend }, + {0x000dcf, 0x000dd4, WB_Extend }, + {0x000dd6, 0x000dd6, WB_Extend }, + {0x000dd8, 0x000ddf, WB_Extend }, + {0x000de6, 0x000def, WB_Numeric }, + {0x000df2, 0x000df3, WB_Extend }, + {0x000e31, 0x000e31, WB_Extend }, + {0x000e34, 0x000e3a, WB_Extend }, + {0x000e47, 0x000e4e, WB_Extend }, + {0x000e50, 0x000e59, WB_Numeric }, + {0x000eb1, 0x000eb1, WB_Extend }, + {0x000eb4, 0x000ebc, WB_Extend }, + {0x000ec8, 0x000ece, WB_Extend }, + {0x000ed0, 0x000ed9, WB_Numeric }, + {0x000f00, 0x000f00, WB_ALetter }, + {0x000f18, 0x000f19, WB_Extend }, + {0x000f20, 0x000f29, WB_Numeric }, + {0x000f35, 0x000f35, WB_Extend }, + {0x000f37, 0x000f37, WB_Extend }, + {0x000f39, 0x000f39, WB_Extend }, + {0x000f3e, 0x000f3f, WB_Extend }, + {0x000f40, 0x000f47, WB_ALetter }, + {0x000f49, 0x000f6c, WB_ALetter }, + {0x000f71, 0x000f84, WB_Extend }, + {0x000f86, 0x000f87, WB_Extend }, + {0x000f88, 0x000f8c, WB_ALetter }, + {0x000f8d, 0x000f97, WB_Extend }, + {0x000f99, 0x000fbc, WB_Extend }, + {0x000fc6, 0x000fc6, WB_Extend }, + {0x00102b, 0x00103e, WB_Extend }, + {0x001040, 0x001049, WB_Numeric }, + {0x001056, 0x001059, WB_Extend }, + {0x00105e, 0x001060, WB_Extend }, + {0x001062, 0x001064, WB_Extend }, + {0x001067, 0x00106d, WB_Extend }, + {0x001071, 0x001074, WB_Extend }, + {0x001082, 0x00108d, WB_Extend }, + {0x00108f, 0x00108f, WB_Extend }, + {0x001090, 0x001099, WB_Numeric }, + {0x00109a, 0x00109d, WB_Extend }, + {0x0010a0, 0x0010c5, WB_ALetter }, + {0x0010c7, 0x0010c7, WB_ALetter }, + {0x0010cd, 0x0010cd, WB_ALetter }, + {0x0010d0, 0x0010fa, WB_ALetter }, + {0x0010fc, 0x001248, WB_ALetter }, + {0x00124a, 0x00124d, WB_ALetter }, + {0x001250, 0x001256, WB_ALetter }, + {0x001258, 0x001258, WB_ALetter }, + {0x00125a, 0x00125d, WB_ALetter }, + {0x001260, 0x001288, WB_ALetter }, + {0x00128a, 0x00128d, WB_ALetter }, + {0x001290, 0x0012b0, WB_ALetter }, + {0x0012b2, 0x0012b5, WB_ALetter }, + {0x0012b8, 0x0012be, WB_ALetter }, + {0x0012c0, 0x0012c0, WB_ALetter }, + {0x0012c2, 0x0012c5, WB_ALetter }, + {0x0012c8, 0x0012d6, WB_ALetter }, + {0x0012d8, 0x001310, WB_ALetter }, + {0x001312, 0x001315, WB_ALetter }, + {0x001318, 0x00135a, WB_ALetter }, + {0x00135d, 0x00135f, WB_Extend }, + {0x001380, 0x00138f, WB_ALetter }, + {0x0013a0, 0x0013f5, WB_ALetter }, + {0x0013f8, 0x0013fd, WB_ALetter }, + {0x001401, 0x00166c, WB_ALetter }, + {0x00166f, 0x00167f, WB_ALetter }, + {0x001680, 0x001680, WB_WSegSpace }, + {0x001681, 0x00169a, WB_ALetter }, + {0x0016a0, 0x0016ea, WB_ALetter }, + {0x0016ee, 0x0016f8, WB_ALetter }, + {0x001700, 0x001711, WB_ALetter }, + {0x001712, 0x001715, WB_Extend }, + {0x00171f, 0x001731, WB_ALetter }, + {0x001732, 0x001734, WB_Extend }, + {0x001740, 0x001751, WB_ALetter }, + {0x001752, 0x001753, WB_Extend }, + {0x001760, 0x00176c, WB_ALetter }, + {0x00176e, 0x001770, WB_ALetter }, + {0x001772, 0x001773, WB_Extend }, + {0x0017b4, 0x0017d3, WB_Extend }, + {0x0017dd, 0x0017dd, WB_Extend }, + {0x0017e0, 0x0017e9, WB_Numeric }, + {0x00180b, 0x00180d, WB_Extend }, + {0x00180e, 0x00180e, WB_Format }, + {0x00180f, 0x00180f, WB_Extend }, + {0x001810, 0x001819, WB_Numeric }, + {0x001820, 0x001878, WB_ALetter }, + {0x001880, 0x001884, WB_ALetter }, + {0x001885, 0x001886, WB_Extend }, + {0x001887, 0x0018a8, WB_ALetter }, + {0x0018a9, 0x0018a9, WB_Extend }, + {0x0018aa, 0x0018aa, WB_ALetter }, + {0x0018b0, 0x0018f5, WB_ALetter }, + {0x001900, 0x00191e, WB_ALetter }, + {0x001920, 0x00192b, WB_Extend }, + {0x001930, 0x00193b, WB_Extend }, + {0x001946, 0x00194f, WB_Numeric }, + {0x0019d0, 0x0019da, WB_Numeric }, + {0x001a00, 0x001a16, WB_ALetter }, + {0x001a17, 0x001a1b, WB_Extend }, + {0x001a55, 0x001a5e, WB_Extend }, + {0x001a60, 0x001a7c, WB_Extend }, + {0x001a7f, 0x001a7f, WB_Extend }, + {0x001a80, 0x001a89, WB_Numeric }, + {0x001a90, 0x001a99, WB_Numeric }, + {0x001ab0, 0x001ace, WB_Extend }, + {0x001b00, 0x001b04, WB_Extend }, + {0x001b05, 0x001b33, WB_ALetter }, + {0x001b34, 0x001b44, WB_Extend }, + {0x001b45, 0x001b4c, WB_ALetter }, + {0x001b50, 0x001b59, WB_Numeric }, + {0x001b6b, 0x001b73, WB_Extend }, + {0x001b80, 0x001b82, WB_Extend }, + {0x001b83, 0x001ba0, WB_ALetter }, + {0x001ba1, 0x001bad, WB_Extend }, + {0x001bae, 0x001baf, WB_ALetter }, + {0x001bb0, 0x001bb9, WB_Numeric }, + {0x001bba, 0x001be5, WB_ALetter }, + {0x001be6, 0x001bf3, WB_Extend }, + {0x001c00, 0x001c23, WB_ALetter }, + {0x001c24, 0x001c37, WB_Extend }, + {0x001c40, 0x001c49, WB_Numeric }, + {0x001c4d, 0x001c4f, WB_ALetter }, + {0x001c50, 0x001c59, WB_Numeric }, + {0x001c5a, 0x001c7d, WB_ALetter }, + {0x001c80, 0x001c8a, WB_ALetter }, + {0x001c90, 0x001cba, WB_ALetter }, + {0x001cbd, 0x001cbf, WB_ALetter }, + {0x001cd0, 0x001cd2, WB_Extend }, + {0x001cd4, 0x001ce8, WB_Extend }, + {0x001ce9, 0x001cec, WB_ALetter }, + {0x001ced, 0x001ced, WB_Extend }, + {0x001cee, 0x001cf3, WB_ALetter }, + {0x001cf4, 0x001cf4, WB_Extend }, + {0x001cf5, 0x001cf6, WB_ALetter }, + {0x001cf7, 0x001cf9, WB_Extend }, + {0x001cfa, 0x001cfa, WB_ALetter }, + {0x001d00, 0x001dbf, WB_ALetter }, + {0x001dc0, 0x001dff, WB_Extend }, + {0x001e00, 0x001f15, WB_ALetter }, + {0x001f18, 0x001f1d, WB_ALetter }, + {0x001f20, 0x001f45, WB_ALetter }, + {0x001f48, 0x001f4d, WB_ALetter }, + {0x001f50, 0x001f57, WB_ALetter }, + {0x001f59, 0x001f59, WB_ALetter }, + {0x001f5b, 0x001f5b, WB_ALetter }, + {0x001f5d, 0x001f5d, WB_ALetter }, + {0x001f5f, 0x001f7d, WB_ALetter }, + {0x001f80, 0x001fb4, WB_ALetter }, + {0x001fb6, 0x001fbc, WB_ALetter }, + {0x001fbe, 0x001fbe, WB_ALetter }, + {0x001fc2, 0x001fc4, WB_ALetter }, + {0x001fc6, 0x001fcc, WB_ALetter }, + {0x001fd0, 0x001fd3, WB_ALetter }, + {0x001fd6, 0x001fdb, WB_ALetter }, + {0x001fe0, 0x001fec, WB_ALetter }, + {0x001ff2, 0x001ff4, WB_ALetter }, + {0x001ff6, 0x001ffc, WB_ALetter }, + {0x002000, 0x002006, WB_WSegSpace }, + {0x002008, 0x00200a, WB_WSegSpace }, + {0x00200c, 0x00200c, WB_Extend }, + {0x00200d, 0x00200d, WB_ZWJ }, + {0x00200e, 0x00200f, WB_Format }, + {0x002018, 0x002019, WB_MidNumLet }, + {0x002024, 0x002024, WB_MidNumLet }, + {0x002027, 0x002027, WB_MidLetter }, + {0x002028, 0x002029, WB_Newline }, + {0x00202a, 0x00202e, WB_Format }, + {0x00202f, 0x00202f, WB_ExtendNumLet }, + {0x00203f, 0x002040, WB_ExtendNumLet }, + {0x002044, 0x002044, WB_MidNum }, + {0x002054, 0x002054, WB_ExtendNumLet }, + {0x00205f, 0x00205f, WB_WSegSpace }, + {0x002060, 0x002064, WB_Format }, + {0x002066, 0x00206f, WB_Format }, + {0x002071, 0x002071, WB_ALetter }, + {0x00207f, 0x00207f, WB_ALetter }, + {0x002090, 0x00209c, WB_ALetter }, + {0x0020d0, 0x0020f0, WB_Extend }, + {0x002102, 0x002102, WB_ALetter }, + {0x002107, 0x002107, WB_ALetter }, + {0x00210a, 0x002113, WB_ALetter }, + {0x002115, 0x002115, WB_ALetter }, + {0x002119, 0x00211d, WB_ALetter }, + {0x002124, 0x002124, WB_ALetter }, + {0x002126, 0x002126, WB_ALetter }, + {0x002128, 0x002128, WB_ALetter }, + {0x00212a, 0x00212d, WB_ALetter }, + {0x00212f, 0x002139, WB_ALetter }, + {0x00213c, 0x00213f, WB_ALetter }, + {0x002145, 0x002149, WB_ALetter }, + {0x00214e, 0x00214e, WB_ALetter }, + {0x002160, 0x002188, WB_ALetter }, + {0x0024b6, 0x0024e9, WB_ALetter }, + {0x002c00, 0x002ce4, WB_ALetter }, + {0x002ceb, 0x002cee, WB_ALetter }, + {0x002cef, 0x002cf1, WB_Extend }, + {0x002cf2, 0x002cf3, WB_ALetter }, + {0x002d00, 0x002d25, WB_ALetter }, + {0x002d27, 0x002d27, WB_ALetter }, + {0x002d2d, 0x002d2d, WB_ALetter }, + {0x002d30, 0x002d67, WB_ALetter }, + {0x002d6f, 0x002d6f, WB_ALetter }, + {0x002d7f, 0x002d7f, WB_Extend }, + {0x002d80, 0x002d96, WB_ALetter }, + {0x002da0, 0x002da6, WB_ALetter }, + {0x002da8, 0x002dae, WB_ALetter }, + {0x002db0, 0x002db6, WB_ALetter }, + {0x002db8, 0x002dbe, WB_ALetter }, + {0x002dc0, 0x002dc6, WB_ALetter }, + {0x002dc8, 0x002dce, WB_ALetter }, + {0x002dd0, 0x002dd6, WB_ALetter }, + {0x002dd8, 0x002dde, WB_ALetter }, + {0x002de0, 0x002dff, WB_Extend }, + {0x002e2f, 0x002e2f, WB_ALetter }, + {0x003000, 0x003000, WB_WSegSpace }, + {0x003005, 0x003005, WB_ALetter }, + {0x00302a, 0x00302f, WB_Extend }, + {0x003031, 0x003035, WB_Katakana }, + {0x00303b, 0x00303c, WB_ALetter }, + {0x003099, 0x00309a, WB_Extend }, + {0x00309b, 0x00309c, WB_Katakana }, + {0x0030a0, 0x0030fa, WB_Katakana }, + {0x0030fc, 0x0030ff, WB_Katakana }, + {0x003105, 0x00312f, WB_ALetter }, + {0x003131, 0x00318e, WB_ALetter }, + {0x0031a0, 0x0031bf, WB_ALetter }, + {0x0031f0, 0x0031ff, WB_Katakana }, + {0x0032d0, 0x0032fe, WB_Katakana }, + {0x003300, 0x003357, WB_Katakana }, + {0x00a000, 0x00a48c, WB_ALetter }, + {0x00a4d0, 0x00a4fd, WB_ALetter }, + {0x00a500, 0x00a60c, WB_ALetter }, + {0x00a610, 0x00a61f, WB_ALetter }, + {0x00a620, 0x00a629, WB_Numeric }, + {0x00a62a, 0x00a62b, WB_ALetter }, + {0x00a640, 0x00a66e, WB_ALetter }, + {0x00a66f, 0x00a672, WB_Extend }, + {0x00a674, 0x00a67d, WB_Extend }, + {0x00a67f, 0x00a69d, WB_ALetter }, + {0x00a69e, 0x00a69f, WB_Extend }, + {0x00a6a0, 0x00a6ef, WB_ALetter }, + {0x00a6f0, 0x00a6f1, WB_Extend }, + {0x00a708, 0x00a7cd, WB_ALetter }, + {0x00a7d0, 0x00a7d1, WB_ALetter }, + {0x00a7d3, 0x00a7d3, WB_ALetter }, + {0x00a7d5, 0x00a7dc, WB_ALetter }, + {0x00a7f2, 0x00a801, WB_ALetter }, + {0x00a802, 0x00a802, WB_Extend }, + {0x00a803, 0x00a805, WB_ALetter }, + {0x00a806, 0x00a806, WB_Extend }, + {0x00a807, 0x00a80a, WB_ALetter }, + {0x00a80b, 0x00a80b, WB_Extend }, + {0x00a80c, 0x00a822, WB_ALetter }, + {0x00a823, 0x00a827, WB_Extend }, + {0x00a82c, 0x00a82c, WB_Extend }, + {0x00a840, 0x00a873, WB_ALetter }, + {0x00a880, 0x00a881, WB_Extend }, + {0x00a882, 0x00a8b3, WB_ALetter }, + {0x00a8b4, 0x00a8c5, WB_Extend }, + {0x00a8d0, 0x00a8d9, WB_Numeric }, + {0x00a8e0, 0x00a8f1, WB_Extend }, + {0x00a8f2, 0x00a8f7, WB_ALetter }, + {0x00a8fb, 0x00a8fb, WB_ALetter }, + {0x00a8fd, 0x00a8fe, WB_ALetter }, + {0x00a8ff, 0x00a8ff, WB_Extend }, + {0x00a900, 0x00a909, WB_Numeric }, + {0x00a90a, 0x00a925, WB_ALetter }, + {0x00a926, 0x00a92d, WB_Extend }, + {0x00a930, 0x00a946, WB_ALetter }, + {0x00a947, 0x00a953, WB_Extend }, + {0x00a960, 0x00a97c, WB_ALetter }, + {0x00a980, 0x00a983, WB_Extend }, + {0x00a984, 0x00a9b2, WB_ALetter }, + {0x00a9b3, 0x00a9c0, WB_Extend }, + {0x00a9cf, 0x00a9cf, WB_ALetter }, + {0x00a9d0, 0x00a9d9, WB_Numeric }, + {0x00a9e5, 0x00a9e5, WB_Extend }, + {0x00a9f0, 0x00a9f9, WB_Numeric }, + {0x00aa00, 0x00aa28, WB_ALetter }, + {0x00aa29, 0x00aa36, WB_Extend }, + {0x00aa40, 0x00aa42, WB_ALetter }, + {0x00aa43, 0x00aa43, WB_Extend }, + {0x00aa44, 0x00aa4b, WB_ALetter }, + {0x00aa4c, 0x00aa4d, WB_Extend }, + {0x00aa50, 0x00aa59, WB_Numeric }, + {0x00aa7b, 0x00aa7d, WB_Extend }, + {0x00aab0, 0x00aab0, WB_Extend }, + {0x00aab2, 0x00aab4, WB_Extend }, + {0x00aab7, 0x00aab8, WB_Extend }, + {0x00aabe, 0x00aabf, WB_Extend }, + {0x00aac1, 0x00aac1, WB_Extend }, + {0x00aae0, 0x00aaea, WB_ALetter }, + {0x00aaeb, 0x00aaef, WB_Extend }, + {0x00aaf2, 0x00aaf4, WB_ALetter }, + {0x00aaf5, 0x00aaf6, WB_Extend }, + {0x00ab01, 0x00ab06, WB_ALetter }, + {0x00ab09, 0x00ab0e, WB_ALetter }, + {0x00ab11, 0x00ab16, WB_ALetter }, + {0x00ab20, 0x00ab26, WB_ALetter }, + {0x00ab28, 0x00ab2e, WB_ALetter }, + {0x00ab30, 0x00ab69, WB_ALetter }, + {0x00ab70, 0x00abe2, WB_ALetter }, + {0x00abe3, 0x00abea, WB_Extend }, + {0x00abec, 0x00abed, WB_Extend }, + {0x00abf0, 0x00abf9, WB_Numeric }, + {0x00ac00, 0x00d7a3, WB_ALetter }, + {0x00d7b0, 0x00d7c6, WB_ALetter }, + {0x00d7cb, 0x00d7fb, WB_ALetter }, + {0x00fb00, 0x00fb06, WB_ALetter }, + {0x00fb13, 0x00fb17, WB_ALetter }, + {0x00fb1d, 0x00fb1d, WB_Hebrew_Letter }, + {0x00fb1e, 0x00fb1e, WB_Extend }, + {0x00fb1f, 0x00fb28, WB_Hebrew_Letter }, + {0x00fb2a, 0x00fb36, WB_Hebrew_Letter }, + {0x00fb38, 0x00fb3c, WB_Hebrew_Letter }, + {0x00fb3e, 0x00fb3e, WB_Hebrew_Letter }, + {0x00fb40, 0x00fb41, WB_Hebrew_Letter }, + {0x00fb43, 0x00fb44, WB_Hebrew_Letter }, + {0x00fb46, 0x00fb4f, WB_Hebrew_Letter }, + {0x00fb50, 0x00fbb1, WB_ALetter }, + {0x00fbd3, 0x00fd3d, WB_ALetter }, + {0x00fd50, 0x00fd8f, WB_ALetter }, + {0x00fd92, 0x00fdc7, WB_ALetter }, + {0x00fdf0, 0x00fdfb, WB_ALetter }, + {0x00fe00, 0x00fe0f, WB_Extend }, + {0x00fe13, 0x00fe13, WB_MidLetter }, + {0x00fe20, 0x00fe2f, WB_Extend }, + {0x00fe33, 0x00fe34, WB_ExtendNumLet }, + {0x00fe4d, 0x00fe4f, WB_ExtendNumLet }, + {0x00fe50, 0x00fe50, WB_MidNum }, + {0x00fe52, 0x00fe52, WB_MidNumLet }, + {0x00fe54, 0x00fe54, WB_MidNum }, + {0x00fe55, 0x00fe55, WB_MidLetter }, + {0x00fe70, 0x00fe74, WB_ALetter }, + {0x00fe76, 0x00fefc, WB_ALetter }, + {0x00feff, 0x00feff, WB_Format }, + {0x00ff07, 0x00ff07, WB_MidNumLet }, + {0x00ff0c, 0x00ff0c, WB_MidNum }, + {0x00ff0e, 0x00ff0e, WB_MidNumLet }, + {0x00ff10, 0x00ff19, WB_Numeric }, + {0x00ff1a, 0x00ff1a, WB_MidLetter }, + {0x00ff1b, 0x00ff1b, WB_MidNum }, + {0x00ff21, 0x00ff3a, WB_ALetter }, + {0x00ff3f, 0x00ff3f, WB_ExtendNumLet }, + {0x00ff41, 0x00ff5a, WB_ALetter }, + {0x00ff66, 0x00ff9d, WB_Katakana }, + {0x00ff9e, 0x00ff9f, WB_Extend }, + {0x00ffa0, 0x00ffbe, WB_ALetter }, + {0x00ffc2, 0x00ffc7, WB_ALetter }, + {0x00ffca, 0x00ffcf, WB_ALetter }, + {0x00ffd2, 0x00ffd7, WB_ALetter }, + {0x00ffda, 0x00ffdc, WB_ALetter }, + {0x00fff9, 0x00fffb, WB_Format }, + {0x010000, 0x01000b, WB_ALetter }, + {0x01000d, 0x010026, WB_ALetter }, + {0x010028, 0x01003a, WB_ALetter }, + {0x01003c, 0x01003d, WB_ALetter }, + {0x01003f, 0x01004d, WB_ALetter }, + {0x010050, 0x01005d, WB_ALetter }, + {0x010080, 0x0100fa, WB_ALetter }, + {0x010140, 0x010174, WB_ALetter }, + {0x0101fd, 0x0101fd, WB_Extend }, + {0x010280, 0x01029c, WB_ALetter }, + {0x0102a0, 0x0102d0, WB_ALetter }, + {0x0102e0, 0x0102e0, WB_Extend }, + {0x010300, 0x01031f, WB_ALetter }, + {0x01032d, 0x01034a, WB_ALetter }, + {0x010350, 0x010375, WB_ALetter }, + {0x010376, 0x01037a, WB_Extend }, + {0x010380, 0x01039d, WB_ALetter }, + {0x0103a0, 0x0103c3, WB_ALetter }, + {0x0103c8, 0x0103cf, WB_ALetter }, + {0x0103d1, 0x0103d5, WB_ALetter }, + {0x010400, 0x01049d, WB_ALetter }, + {0x0104a0, 0x0104a9, WB_Numeric }, + {0x0104b0, 0x0104d3, WB_ALetter }, + {0x0104d8, 0x0104fb, WB_ALetter }, + {0x010500, 0x010527, WB_ALetter }, + {0x010530, 0x010563, WB_ALetter }, + {0x010570, 0x01057a, WB_ALetter }, + {0x01057c, 0x01058a, WB_ALetter }, + {0x01058c, 0x010592, WB_ALetter }, + {0x010594, 0x010595, WB_ALetter }, + {0x010597, 0x0105a1, WB_ALetter }, + {0x0105a3, 0x0105b1, WB_ALetter }, + {0x0105b3, 0x0105b9, WB_ALetter }, + {0x0105bb, 0x0105bc, WB_ALetter }, + {0x0105c0, 0x0105f3, WB_ALetter }, + {0x010600, 0x010736, WB_ALetter }, + {0x010740, 0x010755, WB_ALetter }, + {0x010760, 0x010767, WB_ALetter }, + {0x010780, 0x010785, WB_ALetter }, + {0x010787, 0x0107b0, WB_ALetter }, + {0x0107b2, 0x0107ba, WB_ALetter }, + {0x010800, 0x010805, WB_ALetter }, + {0x010808, 0x010808, WB_ALetter }, + {0x01080a, 0x010835, WB_ALetter }, + {0x010837, 0x010838, WB_ALetter }, + {0x01083c, 0x01083c, WB_ALetter }, + {0x01083f, 0x010855, WB_ALetter }, + {0x010860, 0x010876, WB_ALetter }, + {0x010880, 0x01089e, WB_ALetter }, + {0x0108e0, 0x0108f2, WB_ALetter }, + {0x0108f4, 0x0108f5, WB_ALetter }, + {0x010900, 0x010915, WB_ALetter }, + {0x010920, 0x010939, WB_ALetter }, + {0x010980, 0x0109b7, WB_ALetter }, + {0x0109be, 0x0109bf, WB_ALetter }, + {0x010a00, 0x010a00, WB_ALetter }, + {0x010a01, 0x010a03, WB_Extend }, + {0x010a05, 0x010a06, WB_Extend }, + {0x010a0c, 0x010a0f, WB_Extend }, + {0x010a10, 0x010a13, WB_ALetter }, + {0x010a15, 0x010a17, WB_ALetter }, + {0x010a19, 0x010a35, WB_ALetter }, + {0x010a38, 0x010a3a, WB_Extend }, + {0x010a3f, 0x010a3f, WB_Extend }, + {0x010a60, 0x010a7c, WB_ALetter }, + {0x010a80, 0x010a9c, WB_ALetter }, + {0x010ac0, 0x010ac7, WB_ALetter }, + {0x010ac9, 0x010ae4, WB_ALetter }, + {0x010ae5, 0x010ae6, WB_Extend }, + {0x010b00, 0x010b35, WB_ALetter }, + {0x010b40, 0x010b55, WB_ALetter }, + {0x010b60, 0x010b72, WB_ALetter }, + {0x010b80, 0x010b91, WB_ALetter }, + {0x010c00, 0x010c48, WB_ALetter }, + {0x010c80, 0x010cb2, WB_ALetter }, + {0x010cc0, 0x010cf2, WB_ALetter }, + {0x010d00, 0x010d23, WB_ALetter }, + {0x010d24, 0x010d27, WB_Extend }, + {0x010d30, 0x010d39, WB_Numeric }, + {0x010d40, 0x010d49, WB_Numeric }, + {0x010d4a, 0x010d65, WB_ALetter }, + {0x010d69, 0x010d6d, WB_Extend }, + {0x010d6f, 0x010d85, WB_ALetter }, + {0x010e80, 0x010ea9, WB_ALetter }, + {0x010eab, 0x010eac, WB_Extend }, + {0x010eb0, 0x010eb1, WB_ALetter }, + {0x010ec2, 0x010ec4, WB_ALetter }, + {0x010efc, 0x010eff, WB_Extend }, + {0x010f00, 0x010f1c, WB_ALetter }, + {0x010f27, 0x010f27, WB_ALetter }, + {0x010f30, 0x010f45, WB_ALetter }, + {0x010f46, 0x010f50, WB_Extend }, + {0x010f70, 0x010f81, WB_ALetter }, + {0x010f82, 0x010f85, WB_Extend }, + {0x010fb0, 0x010fc4, WB_ALetter }, + {0x010fe0, 0x010ff6, WB_ALetter }, + {0x011000, 0x011002, WB_Extend }, + {0x011003, 0x011037, WB_ALetter }, + {0x011038, 0x011046, WB_Extend }, + {0x011066, 0x01106f, WB_Numeric }, + {0x011070, 0x011070, WB_Extend }, + {0x011071, 0x011072, WB_ALetter }, + {0x011073, 0x011074, WB_Extend }, + {0x011075, 0x011075, WB_ALetter }, + {0x01107f, 0x011082, WB_Extend }, + {0x011083, 0x0110af, WB_ALetter }, + {0x0110b0, 0x0110ba, WB_Extend }, + {0x0110bd, 0x0110bd, WB_Numeric }, + {0x0110c2, 0x0110c2, WB_Extend }, + {0x0110cd, 0x0110cd, WB_Numeric }, + {0x0110d0, 0x0110e8, WB_ALetter }, + {0x0110f0, 0x0110f9, WB_Numeric }, + {0x011100, 0x011102, WB_Extend }, + {0x011103, 0x011126, WB_ALetter }, + {0x011127, 0x011134, WB_Extend }, + {0x011136, 0x01113f, WB_Numeric }, + {0x011144, 0x011144, WB_ALetter }, + {0x011145, 0x011146, WB_Extend }, + {0x011147, 0x011147, WB_ALetter }, + {0x011150, 0x011172, WB_ALetter }, + {0x011173, 0x011173, WB_Extend }, + {0x011176, 0x011176, WB_ALetter }, + {0x011180, 0x011182, WB_Extend }, + {0x011183, 0x0111b2, WB_ALetter }, + {0x0111b3, 0x0111c0, WB_Extend }, + {0x0111c1, 0x0111c4, WB_ALetter }, + {0x0111c9, 0x0111cc, WB_Extend }, + {0x0111ce, 0x0111cf, WB_Extend }, + {0x0111d0, 0x0111d9, WB_Numeric }, + {0x0111da, 0x0111da, WB_ALetter }, + {0x0111dc, 0x0111dc, WB_ALetter }, + {0x011200, 0x011211, WB_ALetter }, + {0x011213, 0x01122b, WB_ALetter }, + {0x01122c, 0x011237, WB_Extend }, + {0x01123e, 0x01123e, WB_Extend }, + {0x01123f, 0x011240, WB_ALetter }, + {0x011241, 0x011241, WB_Extend }, + {0x011280, 0x011286, WB_ALetter }, + {0x011288, 0x011288, WB_ALetter }, + {0x01128a, 0x01128d, WB_ALetter }, + {0x01128f, 0x01129d, WB_ALetter }, + {0x01129f, 0x0112a8, WB_ALetter }, + {0x0112b0, 0x0112de, WB_ALetter }, + {0x0112df, 0x0112ea, WB_Extend }, + {0x0112f0, 0x0112f9, WB_Numeric }, + {0x011300, 0x011303, WB_Extend }, + {0x011305, 0x01130c, WB_ALetter }, + {0x01130f, 0x011310, WB_ALetter }, + {0x011313, 0x011328, WB_ALetter }, + {0x01132a, 0x011330, WB_ALetter }, + {0x011332, 0x011333, WB_ALetter }, + {0x011335, 0x011339, WB_ALetter }, + {0x01133b, 0x01133c, WB_Extend }, + {0x01133d, 0x01133d, WB_ALetter }, + {0x01133e, 0x011344, WB_Extend }, + {0x011347, 0x011348, WB_Extend }, + {0x01134b, 0x01134d, WB_Extend }, + {0x011350, 0x011350, WB_ALetter }, + {0x011357, 0x011357, WB_Extend }, + {0x01135d, 0x011361, WB_ALetter }, + {0x011362, 0x011363, WB_Extend }, + {0x011366, 0x01136c, WB_Extend }, + {0x011370, 0x011374, WB_Extend }, + {0x011380, 0x011389, WB_ALetter }, + {0x01138b, 0x01138b, WB_ALetter }, + {0x01138e, 0x01138e, WB_ALetter }, + {0x011390, 0x0113b5, WB_ALetter }, + {0x0113b7, 0x0113b7, WB_ALetter }, + {0x0113b8, 0x0113c0, WB_Extend }, + {0x0113c2, 0x0113c2, WB_Extend }, + {0x0113c5, 0x0113c5, WB_Extend }, + {0x0113c7, 0x0113ca, WB_Extend }, + {0x0113cc, 0x0113d0, WB_Extend }, + {0x0113d1, 0x0113d1, WB_ALetter }, + {0x0113d2, 0x0113d2, WB_Extend }, + {0x0113d3, 0x0113d3, WB_ALetter }, + {0x0113e1, 0x0113e2, WB_Extend }, + {0x011400, 0x011434, WB_ALetter }, + {0x011435, 0x011446, WB_Extend }, + {0x011447, 0x01144a, WB_ALetter }, + {0x011450, 0x011459, WB_Numeric }, + {0x01145e, 0x01145e, WB_Extend }, + {0x01145f, 0x011461, WB_ALetter }, + {0x011480, 0x0114af, WB_ALetter }, + {0x0114b0, 0x0114c3, WB_Extend }, + {0x0114c4, 0x0114c5, WB_ALetter }, + {0x0114c7, 0x0114c7, WB_ALetter }, + {0x0114d0, 0x0114d9, WB_Numeric }, + {0x011580, 0x0115ae, WB_ALetter }, + {0x0115af, 0x0115b5, WB_Extend }, + {0x0115b8, 0x0115c0, WB_Extend }, + {0x0115d8, 0x0115db, WB_ALetter }, + {0x0115dc, 0x0115dd, WB_Extend }, + {0x011600, 0x01162f, WB_ALetter }, + {0x011630, 0x011640, WB_Extend }, + {0x011644, 0x011644, WB_ALetter }, + {0x011650, 0x011659, WB_Numeric }, + {0x011680, 0x0116aa, WB_ALetter }, + {0x0116ab, 0x0116b7, WB_Extend }, + {0x0116b8, 0x0116b8, WB_ALetter }, + {0x0116c0, 0x0116c9, WB_Numeric }, + {0x0116d0, 0x0116e3, WB_Numeric }, + {0x01171d, 0x01172b, WB_Extend }, + {0x011730, 0x011739, WB_Numeric }, + {0x011800, 0x01182b, WB_ALetter }, + {0x01182c, 0x01183a, WB_Extend }, + {0x0118a0, 0x0118df, WB_ALetter }, + {0x0118e0, 0x0118e9, WB_Numeric }, + {0x0118ff, 0x011906, WB_ALetter }, + {0x011909, 0x011909, WB_ALetter }, + {0x01190c, 0x011913, WB_ALetter }, + {0x011915, 0x011916, WB_ALetter }, + {0x011918, 0x01192f, WB_ALetter }, + {0x011930, 0x011935, WB_Extend }, + {0x011937, 0x011938, WB_Extend }, + {0x01193b, 0x01193e, WB_Extend }, + {0x01193f, 0x01193f, WB_ALetter }, + {0x011940, 0x011940, WB_Extend }, + {0x011941, 0x011941, WB_ALetter }, + {0x011942, 0x011943, WB_Extend }, + {0x011950, 0x011959, WB_Numeric }, + {0x0119a0, 0x0119a7, WB_ALetter }, + {0x0119aa, 0x0119d0, WB_ALetter }, + {0x0119d1, 0x0119d7, WB_Extend }, + {0x0119da, 0x0119e0, WB_Extend }, + {0x0119e1, 0x0119e1, WB_ALetter }, + {0x0119e3, 0x0119e3, WB_ALetter }, + {0x0119e4, 0x0119e4, WB_Extend }, + {0x011a00, 0x011a00, WB_ALetter }, + {0x011a01, 0x011a0a, WB_Extend }, + {0x011a0b, 0x011a32, WB_ALetter }, + {0x011a33, 0x011a39, WB_Extend }, + {0x011a3a, 0x011a3a, WB_ALetter }, + {0x011a3b, 0x011a3e, WB_Extend }, + {0x011a47, 0x011a47, WB_Extend }, + {0x011a50, 0x011a50, WB_ALetter }, + {0x011a51, 0x011a5b, WB_Extend }, + {0x011a5c, 0x011a89, WB_ALetter }, + {0x011a8a, 0x011a99, WB_Extend }, + {0x011a9d, 0x011a9d, WB_ALetter }, + {0x011ab0, 0x011af8, WB_ALetter }, + {0x011bc0, 0x011be0, WB_ALetter }, + {0x011bf0, 0x011bf9, WB_Numeric }, + {0x011c00, 0x011c08, WB_ALetter }, + {0x011c0a, 0x011c2e, WB_ALetter }, + {0x011c2f, 0x011c36, WB_Extend }, + {0x011c38, 0x011c3f, WB_Extend }, + {0x011c40, 0x011c40, WB_ALetter }, + {0x011c50, 0x011c59, WB_Numeric }, + {0x011c72, 0x011c8f, WB_ALetter }, + {0x011c92, 0x011ca7, WB_Extend }, + {0x011ca9, 0x011cb6, WB_Extend }, + {0x011d00, 0x011d06, WB_ALetter }, + {0x011d08, 0x011d09, WB_ALetter }, + {0x011d0b, 0x011d30, WB_ALetter }, + {0x011d31, 0x011d36, WB_Extend }, + {0x011d3a, 0x011d3a, WB_Extend }, + {0x011d3c, 0x011d3d, WB_Extend }, + {0x011d3f, 0x011d45, WB_Extend }, + {0x011d46, 0x011d46, WB_ALetter }, + {0x011d47, 0x011d47, WB_Extend }, + {0x011d50, 0x011d59, WB_Numeric }, + {0x011d60, 0x011d65, WB_ALetter }, + {0x011d67, 0x011d68, WB_ALetter }, + {0x011d6a, 0x011d89, WB_ALetter }, + {0x011d8a, 0x011d8e, WB_Extend }, + {0x011d90, 0x011d91, WB_Extend }, + {0x011d93, 0x011d97, WB_Extend }, + {0x011d98, 0x011d98, WB_ALetter }, + {0x011da0, 0x011da9, WB_Numeric }, + {0x011ee0, 0x011ef2, WB_ALetter }, + {0x011ef3, 0x011ef6, WB_Extend }, + {0x011f00, 0x011f01, WB_Extend }, + {0x011f02, 0x011f02, WB_ALetter }, + {0x011f03, 0x011f03, WB_Extend }, + {0x011f04, 0x011f10, WB_ALetter }, + {0x011f12, 0x011f33, WB_ALetter }, + {0x011f34, 0x011f3a, WB_Extend }, + {0x011f3e, 0x011f42, WB_Extend }, + {0x011f50, 0x011f59, WB_Numeric }, + {0x011f5a, 0x011f5a, WB_Extend }, + {0x011fb0, 0x011fb0, WB_ALetter }, + {0x012000, 0x012399, WB_ALetter }, + {0x012400, 0x01246e, WB_ALetter }, + {0x012480, 0x012543, WB_ALetter }, + {0x012f90, 0x012ff0, WB_ALetter }, + {0x013000, 0x01342f, WB_ALetter }, + {0x013430, 0x01343f, WB_Format }, + {0x013440, 0x013440, WB_Extend }, + {0x013441, 0x013446, WB_ALetter }, + {0x013447, 0x013455, WB_Extend }, + {0x013460, 0x0143fa, WB_ALetter }, + {0x014400, 0x014646, WB_ALetter }, + {0x016100, 0x01611d, WB_ALetter }, + {0x01611e, 0x01612f, WB_Extend }, + {0x016130, 0x016139, WB_Numeric }, + {0x016800, 0x016a38, WB_ALetter }, + {0x016a40, 0x016a5e, WB_ALetter }, + {0x016a60, 0x016a69, WB_Numeric }, + {0x016a70, 0x016abe, WB_ALetter }, + {0x016ac0, 0x016ac9, WB_Numeric }, + {0x016ad0, 0x016aed, WB_ALetter }, + {0x016af0, 0x016af4, WB_Extend }, + {0x016b00, 0x016b2f, WB_ALetter }, + {0x016b30, 0x016b36, WB_Extend }, + {0x016b40, 0x016b43, WB_ALetter }, + {0x016b50, 0x016b59, WB_Numeric }, + {0x016b63, 0x016b77, WB_ALetter }, + {0x016b7d, 0x016b8f, WB_ALetter }, + {0x016d40, 0x016d6c, WB_ALetter }, + {0x016d70, 0x016d79, WB_Numeric }, + {0x016e40, 0x016e7f, WB_ALetter }, + {0x016f00, 0x016f4a, WB_ALetter }, + {0x016f4f, 0x016f4f, WB_Extend }, + {0x016f50, 0x016f50, WB_ALetter }, + {0x016f51, 0x016f87, WB_Extend }, + {0x016f8f, 0x016f92, WB_Extend }, + {0x016f93, 0x016f9f, WB_ALetter }, + {0x016fe0, 0x016fe1, WB_ALetter }, + {0x016fe3, 0x016fe3, WB_ALetter }, + {0x016fe4, 0x016fe4, WB_Extend }, + {0x016ff0, 0x016ff1, WB_Extend }, + {0x01aff0, 0x01aff3, WB_Katakana }, + {0x01aff5, 0x01affb, WB_Katakana }, + {0x01affd, 0x01affe, WB_Katakana }, + {0x01b000, 0x01b000, WB_Katakana }, + {0x01b120, 0x01b122, WB_Katakana }, + {0x01b155, 0x01b155, WB_Katakana }, + {0x01b164, 0x01b167, WB_Katakana }, + {0x01bc00, 0x01bc6a, WB_ALetter }, + {0x01bc70, 0x01bc7c, WB_ALetter }, + {0x01bc80, 0x01bc88, WB_ALetter }, + {0x01bc90, 0x01bc99, WB_ALetter }, + {0x01bc9d, 0x01bc9e, WB_Extend }, + {0x01bca0, 0x01bca3, WB_Format }, + {0x01ccf0, 0x01ccf9, WB_Numeric }, + {0x01cf00, 0x01cf2d, WB_Extend }, + {0x01cf30, 0x01cf46, WB_Extend }, + {0x01d165, 0x01d169, WB_Extend }, + {0x01d16d, 0x01d172, WB_Extend }, + {0x01d173, 0x01d17a, WB_Format }, + {0x01d17b, 0x01d182, WB_Extend }, + {0x01d185, 0x01d18b, WB_Extend }, + {0x01d1aa, 0x01d1ad, WB_Extend }, + {0x01d242, 0x01d244, WB_Extend }, + {0x01d400, 0x01d454, WB_ALetter }, + {0x01d456, 0x01d49c, WB_ALetter }, + {0x01d49e, 0x01d49f, WB_ALetter }, + {0x01d4a2, 0x01d4a2, WB_ALetter }, + {0x01d4a5, 0x01d4a6, WB_ALetter }, + {0x01d4a9, 0x01d4ac, WB_ALetter }, + {0x01d4ae, 0x01d4b9, WB_ALetter }, + {0x01d4bb, 0x01d4bb, WB_ALetter }, + {0x01d4bd, 0x01d4c3, WB_ALetter }, + {0x01d4c5, 0x01d505, WB_ALetter }, + {0x01d507, 0x01d50a, WB_ALetter }, + {0x01d50d, 0x01d514, WB_ALetter }, + {0x01d516, 0x01d51c, WB_ALetter }, + {0x01d51e, 0x01d539, WB_ALetter }, + {0x01d53b, 0x01d53e, WB_ALetter }, + {0x01d540, 0x01d544, WB_ALetter }, + {0x01d546, 0x01d546, WB_ALetter }, + {0x01d54a, 0x01d550, WB_ALetter }, + {0x01d552, 0x01d6a5, WB_ALetter }, + {0x01d6a8, 0x01d6c0, WB_ALetter }, + {0x01d6c2, 0x01d6da, WB_ALetter }, + {0x01d6dc, 0x01d6fa, WB_ALetter }, + {0x01d6fc, 0x01d714, WB_ALetter }, + {0x01d716, 0x01d734, WB_ALetter }, + {0x01d736, 0x01d74e, WB_ALetter }, + {0x01d750, 0x01d76e, WB_ALetter }, + {0x01d770, 0x01d788, WB_ALetter }, + {0x01d78a, 0x01d7a8, WB_ALetter }, + {0x01d7aa, 0x01d7c2, WB_ALetter }, + {0x01d7c4, 0x01d7cb, WB_ALetter }, + {0x01d7ce, 0x01d7ff, WB_Numeric }, + {0x01da00, 0x01da36, WB_Extend }, + {0x01da3b, 0x01da6c, WB_Extend }, + {0x01da75, 0x01da75, WB_Extend }, + {0x01da84, 0x01da84, WB_Extend }, + {0x01da9b, 0x01da9f, WB_Extend }, + {0x01daa1, 0x01daaf, WB_Extend }, + {0x01df00, 0x01df1e, WB_ALetter }, + {0x01df25, 0x01df2a, WB_ALetter }, + {0x01e000, 0x01e006, WB_Extend }, + {0x01e008, 0x01e018, WB_Extend }, + {0x01e01b, 0x01e021, WB_Extend }, + {0x01e023, 0x01e024, WB_Extend }, + {0x01e026, 0x01e02a, WB_Extend }, + {0x01e030, 0x01e06d, WB_ALetter }, + {0x01e08f, 0x01e08f, WB_Extend }, + {0x01e100, 0x01e12c, WB_ALetter }, + {0x01e130, 0x01e136, WB_Extend }, + {0x01e137, 0x01e13d, WB_ALetter }, + {0x01e140, 0x01e149, WB_Numeric }, + {0x01e14e, 0x01e14e, WB_ALetter }, + {0x01e290, 0x01e2ad, WB_ALetter }, + {0x01e2ae, 0x01e2ae, WB_Extend }, + {0x01e2c0, 0x01e2eb, WB_ALetter }, + {0x01e2ec, 0x01e2ef, WB_Extend }, + {0x01e2f0, 0x01e2f9, WB_Numeric }, + {0x01e4d0, 0x01e4eb, WB_ALetter }, + {0x01e4ec, 0x01e4ef, WB_Extend }, + {0x01e4f0, 0x01e4f9, WB_Numeric }, + {0x01e5d0, 0x01e5ed, WB_ALetter }, + {0x01e5ee, 0x01e5ef, WB_Extend }, + {0x01e5f0, 0x01e5f0, WB_ALetter }, + {0x01e5f1, 0x01e5fa, WB_Numeric }, + {0x01e7e0, 0x01e7e6, WB_ALetter }, + {0x01e7e8, 0x01e7eb, WB_ALetter }, + {0x01e7ed, 0x01e7ee, WB_ALetter }, + {0x01e7f0, 0x01e7fe, WB_ALetter }, + {0x01e800, 0x01e8c4, WB_ALetter }, + {0x01e8d0, 0x01e8d6, WB_Extend }, + {0x01e900, 0x01e943, WB_ALetter }, + {0x01e944, 0x01e94a, WB_Extend }, + {0x01e94b, 0x01e94b, WB_ALetter }, + {0x01e950, 0x01e959, WB_Numeric }, + {0x01ee00, 0x01ee03, WB_ALetter }, + {0x01ee05, 0x01ee1f, WB_ALetter }, + {0x01ee21, 0x01ee22, WB_ALetter }, + {0x01ee24, 0x01ee24, WB_ALetter }, + {0x01ee27, 0x01ee27, WB_ALetter }, + {0x01ee29, 0x01ee32, WB_ALetter }, + {0x01ee34, 0x01ee37, WB_ALetter }, + {0x01ee39, 0x01ee39, WB_ALetter }, + {0x01ee3b, 0x01ee3b, WB_ALetter }, + {0x01ee42, 0x01ee42, WB_ALetter }, + {0x01ee47, 0x01ee47, WB_ALetter }, + {0x01ee49, 0x01ee49, WB_ALetter }, + {0x01ee4b, 0x01ee4b, WB_ALetter }, + {0x01ee4d, 0x01ee4f, WB_ALetter }, + {0x01ee51, 0x01ee52, WB_ALetter }, + {0x01ee54, 0x01ee54, WB_ALetter }, + {0x01ee57, 0x01ee57, WB_ALetter }, + {0x01ee59, 0x01ee59, WB_ALetter }, + {0x01ee5b, 0x01ee5b, WB_ALetter }, + {0x01ee5d, 0x01ee5d, WB_ALetter }, + {0x01ee5f, 0x01ee5f, WB_ALetter }, + {0x01ee61, 0x01ee62, WB_ALetter }, + {0x01ee64, 0x01ee64, WB_ALetter }, + {0x01ee67, 0x01ee6a, WB_ALetter }, + {0x01ee6c, 0x01ee72, WB_ALetter }, + {0x01ee74, 0x01ee77, WB_ALetter }, + {0x01ee79, 0x01ee7c, WB_ALetter }, + {0x01ee7e, 0x01ee7e, WB_ALetter }, + {0x01ee80, 0x01ee89, WB_ALetter }, + {0x01ee8b, 0x01ee9b, WB_ALetter }, + {0x01eea1, 0x01eea3, WB_ALetter }, + {0x01eea5, 0x01eea9, WB_ALetter }, + {0x01eeab, 0x01eebb, WB_ALetter }, + {0x01f130, 0x01f149, WB_ALetter }, + {0x01f150, 0x01f169, WB_ALetter }, + {0x01f170, 0x01f189, WB_ALetter }, + {0x01f1e6, 0x01f1ff, WB_Regional_Indicator }, + {0x01f3fb, 0x01f3ff, WB_Extend }, + {0x01fbf0, 0x01fbf9, WB_Numeric }, + {0x0e0001, 0x0e0001, WB_Format }, + {0x0e0020, 0x0e007f, WB_Extend }, + {0x0e0100, 0x0e01ef, WB_Extend } +}; diff --git a/internal/components/third_party/oniguruma/src/utf16_be.c b/internal/components/third_party/oniguruma/src/utf16_be.c new file mode 100644 index 0000000000..69f99e2b09 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/utf16_be.c @@ -0,0 +1,277 @@ +/********************************************************************** + utf16_be.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regint.h" /* for USE_CALLOUT */ + + +static int +init(void) +{ +#ifdef USE_CALLOUT + + int id; + OnigEncoding enc; + char* name; + unsigned int args[4]; + OnigValue opts[4]; + + enc = ONIG_ENCODING_UTF16_BE; + + name = "\000F\000A\000I\000L\000\000"; BC0_P(name, fail); + name = "\000M\000I\000S\000M\000A\000T\000C\000H\000\000"; BC0_P(name, mismatch); + name = "\000S\000K\000I\000P\000\000"; BC0_P(name, skip); + + name = "\000M\000A\000X\000\000"; + args[0] = ONIG_TYPE_TAG | ONIG_TYPE_LONG; + args[1] = ONIG_TYPE_CHAR; + opts[0].c = 'X'; + BC_B_O(name, max, 2, args, 1, opts); + + name = "\000E\000R\000R\000O\000R\000\000"; + args[0] = ONIG_TYPE_LONG; opts[0].l = ONIG_ABORT; + BC_P_O(name, error, 1, args, 1, opts); + + name = "\000C\000O\000U\000N\000T\000\000"; + args[0] = ONIG_TYPE_CHAR; opts[0].c = '>'; + BC_B_O(name, count, 1, args, 1, opts); + + name = "\000T\000O\000T\000A\000L\000_\000C\000O\000U\000N\000T\000\000"; + args[0] = ONIG_TYPE_CHAR; opts[0].c = '>'; + BC_B_O(name, total_count, 1, args, 1, opts); + + name = "\000C\000M\000P\000\000"; + args[0] = ONIG_TYPE_TAG | ONIG_TYPE_LONG; + args[1] = ONIG_TYPE_STRING; + args[2] = ONIG_TYPE_TAG | ONIG_TYPE_LONG; + BC_P(name, cmp, 3, args); + +#endif /* USE_CALLOUT */ + + return ONIG_NORMAL; +} + +static const int EncLen_UTF16[] = { + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 +}; + +static int +utf16be_mbc_enc_len(const UChar* p) +{ + return EncLen_UTF16[*p]; +} + +static int +is_valid_mbc_string(const UChar* s, const UChar* end) +{ + while (s < end) { + int len = utf16be_mbc_enc_len(s); + if (len == 4) { + if (s + 2 >= end) + return FALSE; + if (! UTF16_IS_SURROGATE_SECOND(*(s+2))) + return FALSE; + } + else + if (UTF16_IS_SURROGATE_SECOND(*s)) + return FALSE; + + s += len; + } + + if (s != end) + return FALSE; + else + return TRUE; +} + +static int +utf16be_is_mbc_newline(const UChar* p, const UChar* end) +{ + if (p + 1 < end) { + if (*(p+1) == NEWLINE_CODE && *p == 0x00) + return 1; +#ifdef USE_UNICODE_ALL_LINE_TERMINATORS + if (( +#ifndef USE_CRNL_AS_LINE_TERMINATOR + *(p+1) == 0x0d || +#endif + *(p+1) == 0x85) && *p == 0x00) + return 1; + + if (*p == 0x20 && (*(p+1) == 0x29 || *(p+1) == 0x28)) + return 1; +#endif + } + return 0; +} + +static OnigCodePoint +utf16be_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED) +{ + OnigCodePoint code; + + if (UTF16_IS_SURROGATE_FIRST(*p)) { + code = ((((p[0] - 0xd8) << 2) + ((p[1] & 0xc0) >> 6) + 1) << 16) + + ((((p[1] & 0x3f) << 2) + (p[2] - 0xdc)) << 8) + + p[3]; + } + else { + code = p[0] * 256 + p[1]; + } + return code; +} + +static int +utf16be_code_to_mbclen(OnigCodePoint code) +{ + if (code > 0xffff) { + if (code > 0x10ffff) + return ONIGERR_INVALID_CODE_POINT_VALUE; + else + return 4; + } + else { + return 2; + } +} + +static int +utf16be_code_to_mbc(OnigCodePoint code, UChar *buf) +{ + UChar* p = buf; + + if (code > 0xffff) { + unsigned int plane, high; + + plane = (code >> 16) - 1; + *p++ = (plane >> 2) + 0xd8; + high = (code & 0xff00) >> 8; + *p++ = ((plane & 0x03) << 6) + (high >> 2); + *p++ = (high & 0x03) + 0xdc; + *p = (UChar )(code & 0xff); + return 4; + } + else { + *p++ = (UChar )((code & 0xff00) >> 8); + *p = (UChar )(code & 0xff); + return 2; + } +} + +static int +utf16be_mbc_case_fold(OnigCaseFoldType flag, + const UChar** pp, const UChar* end, UChar* fold) +{ + const UChar* p = *pp; + + if (ONIGENC_IS_ASCII_CODE(*(p+1)) && *p == 0) { + p++; +#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI + if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) { + if (*p == 0x49) { + *fold++ = 0x01; + *fold = 0x31; + (*pp) += 2; + return 2; + } + } +#endif + + *fold++ = 0; + *fold = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); + *pp += 2; + return 2; + } + else + return onigenc_unicode_mbc_case_fold(ONIG_ENCODING_UTF16_BE, flag, + pp, end, fold); +} + +static UChar* +utf16be_left_adjust_char_head(const UChar* start, const UChar* s) +{ + if (s <= start) return (UChar* )s; + + if ((s - start) % 2 == 1) { + s--; + } + + if (UTF16_IS_SURROGATE_SECOND(*s) && s > start + 1 && + UTF16_IS_SURROGATE_FIRST(*(s-2))) + s -= 2; + + return (UChar* )s; +} + +static int +utf16be_get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_unicode_get_case_fold_codes_by_str(ONIG_ENCODING_UTF16_BE, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingUTF16_BE = { + utf16be_mbc_enc_len, + "UTF-16BE", /* name */ + 4, /* max enc length */ + 2, /* min enc length */ + utf16be_is_mbc_newline, + utf16be_mbc_to_code, + utf16be_code_to_mbclen, + utf16be_code_to_mbc, + utf16be_mbc_case_fold, + onigenc_unicode_apply_all_case_fold, + utf16be_get_case_fold_codes_by_str, + onigenc_unicode_property_name_to_ctype, + onigenc_unicode_is_code_ctype, + onigenc_utf16_32_get_ctype_code_range, + utf16be_left_adjust_char_head, + onigenc_always_false_is_allowed_reverse_match, + init, + 0, /* is_initialized */ + is_valid_mbc_string, + ENC_FLAG_UNICODE|ENC_FLAG_SKIP_OFFSET_2, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/utf16_le.c b/internal/components/third_party/oniguruma/src/utf16_le.c new file mode 100644 index 0000000000..11804fe168 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/utf16_le.c @@ -0,0 +1,277 @@ +/********************************************************************** + utf16_le.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2024 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#include "regint.h" /* for USE_CALLOUT */ + +static int +init(void) +{ +#ifdef USE_CALLOUT + + int id; + OnigEncoding enc; + char* name; + unsigned int args[4]; + OnigValue opts[4]; + + enc = ONIG_ENCODING_UTF16_LE; + + name = "F\000A\000I\000L\000\000\000"; BC0_P(name, fail); + name = "M\000I\000S\000M\000A\000T\000C\000H\000\000\000"; BC0_P(name, mismatch); + name = "S\000K\000I\000P\000\000\000"; BC0_P(name, skip); + + name = "M\000A\000X\000\000\000"; + args[0] = ONIG_TYPE_TAG | ONIG_TYPE_LONG; + args[1] = ONIG_TYPE_CHAR; + opts[0].c = 'X'; + BC_B_O(name, max, 2, args, 1, opts); + + name = "E\000R\000R\000O\000R\000\000\000"; + args[0] = ONIG_TYPE_LONG; opts[0].l = ONIG_ABORT; + BC_P_O(name, error, 1, args, 1, opts); + + name = "C\000O\000U\000N\000T\000\000\000"; + args[0] = ONIG_TYPE_CHAR; opts[0].c = '>'; + BC_B_O(name, count, 1, args, 1, opts); + + name = "T\000O\000T\000A\000L\000_\000C\000O\000U\000N\000T\000\000\000"; + args[0] = ONIG_TYPE_CHAR; opts[0].c = '>'; + BC_B_O(name, total_count, 1, args, 1, opts); + + name = "C\000M\000P\000\000\000"; + args[0] = ONIG_TYPE_TAG | ONIG_TYPE_LONG; + args[1] = ONIG_TYPE_STRING; + args[2] = ONIG_TYPE_TAG | ONIG_TYPE_LONG; + BC_P(name, cmp, 3, args); + +#endif /* USE_CALLOUT */ + + return ONIG_NORMAL; +} + +static const int EncLen_UTF16[] = { + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 +}; + +static int +utf16le_code_to_mbclen(OnigCodePoint code) +{ + if (code > 0xffff) { + if (code > 0x10ffff) + return ONIGERR_INVALID_CODE_POINT_VALUE; + else + return 4; + } + else { + return 2; + } +} + +static int +utf16le_mbc_enc_len(const UChar* p) +{ + return EncLen_UTF16[*(p+1)]; +} + +static int +is_valid_mbc_string(const UChar* p, const UChar* end) +{ + const UChar* end1 = end - 1; + + while (p < end1) { + int len = utf16le_mbc_enc_len(p); + if (len == 4) { + if (p + 3 < end && ! UTF16_IS_SURROGATE_SECOND(*(p + 3))) + return FALSE; + } + else + if (UTF16_IS_SURROGATE_SECOND(*(p + 1))) + return FALSE; + + p += len; + } + + if (p != end) + return FALSE; + else + return TRUE; +} + +static int +utf16le_is_mbc_newline(const UChar* p, const UChar* end) +{ + if (p + 1 < end) { + if (*p == NEWLINE_CODE && *(p+1) == 0x00) + return 1; +#ifdef USE_UNICODE_ALL_LINE_TERMINATORS + if (( +#ifndef USE_CRNL_AS_LINE_TERMINATOR + *p == 0x0d || +#endif + *p == 0x85) && *(p+1) == 0x00) + return 1; + + if (*(p+1) == 0x20 && (*p == 0x29 || *p == 0x28)) + return 1; +#endif + } + return 0; +} + +static OnigCodePoint +utf16le_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED) +{ + OnigCodePoint code; + UChar c0 = *p; + UChar c1 = *(p+1); + + if (UTF16_IS_SURROGATE_FIRST(c1)) { + code = ((((c1 - 0xd8) << 2) + ((c0 & 0xc0) >> 6) + 1) << 16) + + ((((c0 & 0x3f) << 2) + (p[3] - 0xdc)) << 8) + + p[2]; + } + else { + code = c1 * 256 + p[0]; + } + return code; +} + +static int +utf16le_code_to_mbc(OnigCodePoint code, UChar *buf) +{ + UChar* p = buf; + + if (code > 0xffff) { + unsigned int plane, high; + + plane = (code >> 16) - 1; + high = (code & 0xff00) >> 8; + + *p++ = ((plane & 0x03) << 6) + (high >> 2); + *p++ = (plane >> 2) + 0xd8; + *p++ = (UChar )(code & 0xff); + *p = (high & 0x03) + 0xdc; + return 4; + } + else { + *p++ = (UChar )(code & 0xff); + *p = (UChar )((code & 0xff00) >> 8); + return 2; + } +} + +static int +utf16le_mbc_case_fold(OnigCaseFoldType flag, + const UChar** pp, const UChar* end, UChar* fold) +{ + const UChar* p = *pp; + + if (ONIGENC_IS_ASCII_CODE(*p) && *(p+1) == 0) { +#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI + if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) { + if (*p == 0x49) { + *fold++ = 0x31; + *fold = 0x01; + (*pp) += 2; + return 2; + } + } +#endif + + *fold++ = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); + *fold = 0; + *pp += 2; + return 2; + } + else + return onigenc_unicode_mbc_case_fold(ONIG_ENCODING_UTF16_LE, flag, pp, end, + fold); +} + +static UChar* +utf16le_left_adjust_char_head(const UChar* start, const UChar* s) +{ + if (s <= start) return (UChar* )s; + + if ((s - start) % 2 != 0) { + s--; + } + + if (UTF16_IS_SURROGATE_SECOND(*(s+1)) && s > start + 1 && + UTF16_IS_SURROGATE_FIRST(*(s-1))) + s -= 2; + + return (UChar* )s; +} + +static int +utf16le_get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_unicode_get_case_fold_codes_by_str(ONIG_ENCODING_UTF16_LE, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingUTF16_LE = { + utf16le_mbc_enc_len, + "UTF-16LE", /* name */ + 4, /* max enc length */ + 2, /* min enc length */ + utf16le_is_mbc_newline, + utf16le_mbc_to_code, + utf16le_code_to_mbclen, + utf16le_code_to_mbc, + utf16le_mbc_case_fold, + onigenc_unicode_apply_all_case_fold, + utf16le_get_case_fold_codes_by_str, + onigenc_unicode_property_name_to_ctype, + onigenc_unicode_is_code_ctype, + onigenc_utf16_32_get_ctype_code_range, + utf16le_left_adjust_char_head, + onigenc_always_false_is_allowed_reverse_match, + init, + 0, /* is_initialized */ + is_valid_mbc_string, + ENC_FLAG_UNICODE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/utf32_be.c b/internal/components/third_party/oniguruma/src/utf32_be.c new file mode 100644 index 0000000000..31bd98b7f0 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/utf32_be.c @@ -0,0 +1,166 @@ +/********************************************************************** + utf32_be.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +static int +utf32be_mbc_enc_len(const UChar* p ARG_UNUSED) +{ + return 4; +} + +static int +is_valid_mbc_string(const UChar* s, const UChar* end) +{ + return onigenc_length_check_is_valid_mbc_string(ONIG_ENCODING_UTF32_BE, s, end); +} + +static int +utf32be_is_mbc_newline(const UChar* p, const UChar* end) +{ + if (p + 3 < end) { + if (*(p+3) == NEWLINE_CODE && *(p+2) == 0 && *(p+1) == 0 && *p == 0) + return 1; +#ifdef USE_UNICODE_ALL_LINE_TERMINATORS + if (( +#ifndef USE_CRNL_AS_LINE_TERMINATOR + *(p+3) == 0x0d || +#endif + *(p+3) == 0x85) + && *(p+2) == 0 && *(p+1) == 0 && *p == 0x00) + return 1; + + if (*(p+2) == 0x20 && (*(p+3) == 0x29 || *(p+3) == 0x28) + && *(p+1) == 0 && *p == 0) + return 1; +#endif + } + return 0; +} + +static OnigCodePoint +utf32be_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED) +{ + OnigCodePoint code; + + code = (OnigCodePoint )((((p[0] & 0x7f) * 256 + p[1]) * 256 + p[2]) * 256 + p[3]); + return code; +} + +static int +utf32be_code_to_mbclen(OnigCodePoint code ARG_UNUSED) +{ + return 4; +} + +static int +utf32be_code_to_mbc(OnigCodePoint code, UChar *buf) +{ + UChar* p = buf; + + *p++ = (UChar )((code & 0xff000000) >>24); + *p++ = (UChar )((code & 0xff0000) >>16); + *p++ = (UChar )((code & 0xff00) >> 8); + *p++ = (UChar ) (code & 0xff); + return 4; +} + +static int +utf32be_mbc_case_fold(OnigCaseFoldType flag, + const UChar** pp, const UChar* end, UChar* fold) +{ + const UChar* p = *pp; + + if (ONIGENC_IS_ASCII_CODE(*(p+3)) && *(p+2) == 0 && *(p+1) == 0 && *p == 0) { + *fold++ = 0; + *fold++ = 0; + +#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI + if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) { + if (*(p+3) == 0x49) { + *fold++ = 0x01; + *fold = 0x31; + (*pp) += 4; + return 4; + } + } +#endif + + *fold++ = 0; + *fold = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*(p+3)); + *pp += 4; + return 4; + } + else + return onigenc_unicode_mbc_case_fold(ONIG_ENCODING_UTF32_BE, flag, pp, end, + fold); +} + +static UChar* +utf32be_left_adjust_char_head(const UChar* start, const UChar* s) +{ + int rem; + + if (s <= start) return (UChar* )s; + + rem = (s - start) % 4; + return (UChar* )(s - rem); +} + +static int +utf32be_get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_unicode_get_case_fold_codes_by_str(ONIG_ENCODING_UTF32_BE, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingUTF32_BE = { + utf32be_mbc_enc_len, + "UTF-32BE", /* name */ + 4, /* max enc length */ + 4, /* min enc length */ + utf32be_is_mbc_newline, + utf32be_mbc_to_code, + utf32be_code_to_mbclen, + utf32be_code_to_mbc, + utf32be_mbc_case_fold, + onigenc_unicode_apply_all_case_fold, + utf32be_get_case_fold_codes_by_str, + onigenc_unicode_property_name_to_ctype, + onigenc_unicode_is_code_ctype, + onigenc_utf16_32_get_ctype_code_range, + utf32be_left_adjust_char_head, + onigenc_always_false_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + is_valid_mbc_string, + ENC_FLAG_UNICODE|ENC_FLAG_SKIP_OFFSET_4, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/utf32_le.c b/internal/components/third_party/oniguruma/src/utf32_le.c new file mode 100644 index 0000000000..f50cab7f15 --- /dev/null +++ b/internal/components/third_party/oniguruma/src/utf32_le.c @@ -0,0 +1,167 @@ +/********************************************************************** + utf32_le.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2020 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +static int +utf32le_mbc_enc_len(const UChar* p ARG_UNUSED) +{ + return 4; +} + +static int +is_valid_mbc_string(const UChar* s, const UChar* end) +{ + return onigenc_length_check_is_valid_mbc_string(ONIG_ENCODING_UTF32_LE, s, end); +} + +static int +utf32le_is_mbc_newline(const UChar* p, const UChar* end) +{ + if (p + 3 < end) { + if (*p == NEWLINE_CODE && *(p+1) == 0 && *(p+2) == 0 && *(p+3) == 0) + return 1; +#ifdef USE_UNICODE_ALL_LINE_TERMINATORS + if (( +#ifndef USE_CRNL_AS_LINE_TERMINATOR + *p == 0x0d || +#endif + *p == 0x85) + && *(p+1) == 0x00 && (p+2) == 0x00 && *(p+3) == 0x00) + return 1; + + if (*(p+1) == 0x20 && (*p == 0x29 || *p == 0x28) + && *(p+2) == 0x00 && *(p+3) == 0x00) + return 1; +#endif + } + return 0; +} + +static OnigCodePoint +utf32le_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED) +{ + OnigCodePoint code; + + code = (OnigCodePoint )((((p[3] & 0x7f) * 256 + p[2]) * 256 + p[1]) * 256 + p[0]); + return code; +} + +static int +utf32le_code_to_mbclen(OnigCodePoint code ARG_UNUSED) +{ + return 4; +} + +static int +utf32le_code_to_mbc(OnigCodePoint code, UChar *buf) +{ + UChar* p = buf; + + *p++ = (UChar ) (code & 0xff); + *p++ = (UChar )((code & 0xff00) >> 8); + *p++ = (UChar )((code & 0xff0000) >>16); + *p++ = (UChar )((code & 0xff000000) >>24); + return 4; +} + +static int +utf32le_mbc_case_fold(OnigCaseFoldType flag, + const UChar** pp, const UChar* end, UChar* fold) +{ + const UChar* p = *pp; + + if (ONIGENC_IS_ASCII_CODE(*p) && *(p+1) == 0 && *(p+2) == 0 && *(p+3) == 0) { +#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI + if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) { + if (*p == 0x49) { + *fold++ = 0x31; + *fold++ = 0x01; + } + } + else { +#endif + *fold++ = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); + *fold++ = 0; +#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI + } +#endif + + *fold++ = 0; + *fold = 0; + *pp += 4; + return 4; + } + else + return onigenc_unicode_mbc_case_fold(ONIG_ENCODING_UTF32_LE, flag, pp, end, + fold); +} + +static UChar* +utf32le_left_adjust_char_head(const UChar* start, const UChar* s) +{ + int rem; + + if (s <= start) return (UChar* )s; + + rem = (s - start) % 4; + return (UChar* )(s - rem); +} + +static int +utf32le_get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_unicode_get_case_fold_codes_by_str(ONIG_ENCODING_UTF32_LE, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingUTF32_LE = { + utf32le_mbc_enc_len, + "UTF-32LE", /* name */ + 4, /* max enc length */ + 4, /* min enc length */ + utf32le_is_mbc_newline, + utf32le_mbc_to_code, + utf32le_code_to_mbclen, + utf32le_code_to_mbc, + utf32le_mbc_case_fold, + onigenc_unicode_apply_all_case_fold, + utf32le_get_case_fold_codes_by_str, + onigenc_unicode_property_name_to_ctype, + onigenc_unicode_is_code_ctype, + onigenc_utf16_32_get_ctype_code_range, + utf32le_left_adjust_char_head, + onigenc_always_false_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + is_valid_mbc_string, + ENC_FLAG_UNICODE|ENC_FLAG_SKIP_OFFSET_1, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/src/utf8.c b/internal/components/third_party/oniguruma/src/utf8.c new file mode 100644 index 0000000000..1178d09a6b --- /dev/null +++ b/internal/components/third_party/oniguruma/src/utf8.c @@ -0,0 +1,290 @@ +/********************************************************************** + utf8.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2019 K.Kosako + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "regenc.h" + +/* U+0000 - U+10FFFF */ +#define USE_RFC3629_RANGE + +/* #define USE_INVALID_CODE_SCHEME */ + +#ifdef USE_INVALID_CODE_SCHEME +/* virtual codepoint values for invalid encoding byte 0xfe and 0xff */ +#define INVALID_CODE_FE 0xfffffffe +#define INVALID_CODE_FF 0xffffffff +#define VALID_CODE_LIMIT 0x7fffffff +#endif + +#define utf8_islead(c) ((UChar )((c) & 0xc0) != 0x80) +#define utf8_istail(c) ((UChar )((c) & 0xc0) == 0x80) + +static const int EncLen_UTF8[] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, +#ifdef USE_RFC3629_RANGE + 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +#else + 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 1, 1 +#endif +}; + +static int +mbc_enc_len(const UChar* p) +{ + return EncLen_UTF8[*p]; +} + +static int +is_valid_mbc_string(const UChar* p, const UChar* end) +{ + int i, len; + + while (p < end) { + if (! utf8_islead(*p)) + return FALSE; + + len = mbc_enc_len(p++); + if (len > 1) { + for (i = 1; i < len; i++) { + if (p == end) + return FALSE; + + if (! utf8_istail(*p++)) + return FALSE; + } + } + } + + return TRUE; +} + +static OnigCodePoint +mbc_to_code(const UChar* p, const UChar* end) +{ + int c, len; + OnigCodePoint n; + + len = mbc_enc_len(p); + if (len > (int )(end - p)) len = (int )(end - p); + + c = *p++; + if (len > 1) { + len--; + n = c & ((1 << (6 - len)) - 1); + while (len--) { + c = *p++; + n = (n << 6) | (c & ((1 << 6) - 1)); + } + return n; + } + else { +#ifdef USE_INVALID_CODE_SCHEME + if (c > 0xfd) { + return ((c == 0xfe) ? INVALID_CODE_FE : INVALID_CODE_FF); + } +#endif + return (OnigCodePoint )c; + } +} + +static int +code_to_mbclen(OnigCodePoint code) +{ + if ((code & 0xffffff80) == 0) return 1; + else if ((code & 0xfffff800) == 0) return 2; + else if ((code & 0xffff0000) == 0) return 3; + else if ((code & 0xffe00000) == 0) return 4; +#ifndef USE_RFC3629_RANGE + else if ((code & 0xfc000000) == 0) return 5; + else if ((code & 0x80000000) == 0) return 6; +#endif +#ifdef USE_INVALID_CODE_SCHEME + else if (code == INVALID_CODE_FE) return 1; + else if (code == INVALID_CODE_FF) return 1; +#endif + else + return ONIGERR_INVALID_CODE_POINT_VALUE; +} + +static int +code_to_mbc(OnigCodePoint code, UChar *buf) +{ +#define UTF8_TRAILS(code, shift) (UChar )((((code) >> (shift)) & 0x3f) | 0x80) +#define UTF8_TRAIL0(code) (UChar )(((code) & 0x3f) | 0x80) + + if ((code & 0xffffff80) == 0) { + *buf = (UChar )code; + return 1; + } + else { + UChar *p = buf; + + if ((code & 0xfffff800) == 0) { + *p++ = (UChar )(((code>>6)& 0x1f) | 0xc0); + } + else if ((code & 0xffff0000) == 0) { + *p++ = (UChar )(((code>>12) & 0x0f) | 0xe0); + *p++ = UTF8_TRAILS(code, 6); + } + else if ((code & 0xffe00000) == 0) { + *p++ = (UChar )(((code>>18) & 0x07) | 0xf0); + *p++ = UTF8_TRAILS(code, 12); + *p++ = UTF8_TRAILS(code, 6); + } +#ifndef USE_RFC3629_RANGE + else if ((code & 0xfc000000) == 0) { + *p++ = (UChar )(((code>>24) & 0x03) | 0xf8); + *p++ = UTF8_TRAILS(code, 18); + *p++ = UTF8_TRAILS(code, 12); + *p++ = UTF8_TRAILS(code, 6); + } + else if ((code & 0x80000000) == 0) { + *p++ = (UChar )(((code>>30) & 0x01) | 0xfc); + *p++ = UTF8_TRAILS(code, 24); + *p++ = UTF8_TRAILS(code, 18); + *p++ = UTF8_TRAILS(code, 12); + *p++ = UTF8_TRAILS(code, 6); + } +#endif +#ifdef USE_INVALID_CODE_SCHEME + else if (code == INVALID_CODE_FE) { + *p = 0xfe; + return 1; + } + else if (code == INVALID_CODE_FF) { + *p = 0xff; + return 1; + } +#endif + else { + return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE; + } + + *p++ = UTF8_TRAIL0(code); + return (int )(p - buf); + } +} + +static int +mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, + const UChar* end, UChar* fold) +{ + const UChar* p = *pp; + + if (ONIGENC_IS_MBC_ASCII(p)) { +#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI + if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) { + if (*p == 0x49) { + *fold++ = 0xc4; + *fold = 0xb1; + (*pp)++; + return 2; + } + } +#endif + + *fold = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); + (*pp)++; + return 1; /* return byte length of converted char to lower */ + } + else { + return onigenc_unicode_mbc_case_fold(ONIG_ENCODING_UTF8, flag, + pp, end, fold); + } +} + +static int +get_ctype_code_range(OnigCtype ctype, OnigCodePoint *sb_out, + const OnigCodePoint* ranges[]) +{ + *sb_out = 0x80; + return onigenc_unicode_ctype_code_range(ctype, ranges); +} + + +static UChar* +left_adjust_char_head(const UChar* start, const UChar* s) +{ + const UChar *p; + + if (s <= start) return (UChar* )s; + p = s; + + while (!utf8_islead(*p) && p > start) p--; + return (UChar* )p; +} + +static int +get_case_fold_codes_by_str(OnigCaseFoldType flag, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + return onigenc_unicode_get_case_fold_codes_by_str(ONIG_ENCODING_UTF8, + flag, p, end, items); +} + +OnigEncodingType OnigEncodingUTF8 = { + mbc_enc_len, + "UTF-8", /* name */ +#ifdef USE_RFC3629_RANGE + 4, /* max enc length */ +#else + 6, +#endif + 1, /* min enc length */ + onigenc_is_mbc_newline_0x0a, + mbc_to_code, + code_to_mbclen, + code_to_mbc, + mbc_case_fold, + onigenc_unicode_apply_all_case_fold, + get_case_fold_codes_by_str, + onigenc_unicode_property_name_to_ctype, + onigenc_unicode_is_code_ctype, + get_ctype_code_range, + left_adjust_char_head, + onigenc_always_true_is_allowed_reverse_match, + NULL, /* init */ + NULL, /* is_initialized */ + is_valid_mbc_string, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_UNICODE|ENC_FLAG_SKIP_OFFSET_1_OR_0, + 0, 0 +}; diff --git a/internal/components/third_party/oniguruma/test-driver b/internal/components/third_party/oniguruma/test-driver new file mode 100755 index 0000000000..9759384aa7 --- /dev/null +++ b/internal/components/third_party/oniguruma/test-driver @@ -0,0 +1,150 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 2011-2020 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <$log_file 2>&1 +estatus=$? + +if test $enable_hard_errors = no && test $estatus -eq 99; then + tweaked_estatus=1 +else + tweaked_estatus=$estatus +fi + +case $tweaked_estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report the test outcome and exit status in the logs, so that one can +# know whether the test passed or failed simply by looking at the '.log' +# file, without the need of also peaking into the corresponding '.trs' +# file (automake bug#11814). +echo "$res $test_name (exit status: $estatus)" >>$log_file + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/internal/components/third_party/oniguruma/test/CMakeLists.txt b/internal/components/third_party/oniguruma/test/CMakeLists.txt new file mode 100644 index 0000000000..a508f6ad11 --- /dev/null +++ b/internal/components/third_party/oniguruma/test/CMakeLists.txt @@ -0,0 +1,55 @@ +if(MSVC) + if(MSVC_VERSION LESS "1900") + # < VS2015, no "/utf-8" option, can not build test + return() + endif() +endif() + +enable_testing() + +add_executable(test_utf8 test_utf8.c) +target_link_libraries(test_utf8 onig) +if(MSVC) + target_compile_options(test_utf8 PRIVATE /utf-8) +endif(MSVC) + +add_executable(test_syntax test_syntax.c) +target_link_libraries(test_syntax onig) +if(MSVC) + target_compile_options(test_syntax PRIVATE /utf-8) +endif(MSVC) + +add_executable(test_options test_options.c) +target_link_libraries(test_options onig) +if(MSVC) + target_compile_options(test_options PRIVATE /utf-8) +endif(MSVC) + +if(NOT MSVC) + # EUC + add_executable(testc testc.c) + target_link_libraries(testc onig) + if (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU") + target_compile_options(testc PRIVATE -Wall -Wno-invalid-source-encoding) + endif() +endif(NOT MSVC) + +if(ENABLE_POSIX_API) + add_executable(testp testp.c) + target_link_libraries(testp onig) +endif() + +add_executable(testcu testu.c) +target_link_libraries(testcu onig) + +add_executable(test_regset test_regset.c) +target_link_libraries(test_regset onig) +if(MSVC) + target_compile_options(test_regset PRIVATE /utf-8) +endif(MSVC) + +add_executable(test_back test_back.c) +target_link_libraries(test_back onig) +if(MSVC) + target_compile_options(test_back PRIVATE /utf-8) +endif(MSVC) diff --git a/internal/components/third_party/oniguruma/test/Makefile.am b/internal/components/third_party/oniguruma/test/Makefile.am new file mode 100644 index 0000000000..94739a24ab --- /dev/null +++ b/internal/components/third_party/oniguruma/test/Makefile.am @@ -0,0 +1,83 @@ +## Makefile.am for Oniguruma +lib_onig = ../src/libonig.la + +AM_LDFLAGS = -L$(libdir) +AM_CFLAGS = -Wall -Wno-invalid-source-encoding +AM_CPPFLAGS = -I$(top_srcdir)/src + +if ENABLE_POSIX_API +TESTS = test_utf8 test_syntax test_options testc testp testcu test_regset test_back +else +TESTS = test_utf8 test_syntax test_options testc testcu test_regset test_back +endif + +check_PROGRAMS = $(TESTS) + +test: test_uchar test_regex_t $(TESTS) + @echo "[Oniguruma API, UTF-8 check]" + @./test_utf8 | grep RESULT + @echo "[Oniguruma API, SYNTAX check]" + @./test_syntax | grep RESULT + @echo "[Oniguruma API, Options check]" + @./test_options | grep RESULT + @echo "[Oniguruma API, EUC-JP check]" + @./testc | grep RESULT +if ENABLE_POSIX_API + @echo "[POSIX API, UTF-8 check]" + @./testp | grep RESULT +endif + @echo "[Oniguruma API, UTF-16 check]" + @./testcu | grep RESULT + @echo "" + @echo "[Oniguruma API, regset check]" + @./test_regset + @echo "[Oniguruma API, backward search check]" + @./test_back | grep RESULT + +test_uchar: + @echo "[UChar in oniguruma.h check]" + @grep "\(^\|[^g]\)UChar" $(top_srcdir)/src/oniguruma.h + @echo "" + +test_regex_t: + @echo "[regex_t in oniguruma.h check]" + @grep "\(^\|[^[:alnum:]]\)regex_t" $(top_srcdir)/src/oniguruma.h + @echo "" + + +test_utf8_SOURCES = test_utf8.c +test_utf8_LDADD = $(lib_onig) + +test_syntax_SOURCES = test_syntax.c +test_syntax_LDADD = $(lib_onig) + +test_options_SOURCES = test_options.c +test_options_LDADD = $(lib_onig) + +testc_SOURCES = testc.c +testc_LDADD = $(lib_onig) + +testp_SOURCES = testp.c +testp_LDADD = $(lib_onig) + +testcu_SOURCES = testu.c +testcu_LDADD = $(lib_onig) + +test_regset_SOURCES = test_regset.c +test_regset_LDADD = $(lib_onig) + +test_back_SOURCES = test_back.c +test_back_LDADD = $(lib_onig) + + +gcov: + make CFLAGS="--coverage" test_utf8 + make CFLAGS="--coverage" test_syntax + make CFLAGS="--coverage" test_options + make CFLAGS="--coverage" testc +if ENABLE_POSIX_API + make CFLAGS="--coverage" testp +endif + make CFLAGS="--coverage" testcu + make CFLAGS="--coverage" test_regset + make CFLAGS="--coverage" test_back diff --git a/internal/components/third_party/oniguruma/test/test.sh b/internal/components/third_party/oniguruma/test/test.sh new file mode 100755 index 0000000000..08c52a8436 --- /dev/null +++ b/internal/components/third_party/oniguruma/test/test.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +echo "[Oniguruma API, UTF-8 check]" +./test_utf8 | grep RESULT +echo "[Oniguruma API, SYNTAX check]" +./test_syntax | grep RESULT +echo "[Oniguruma API, Options check]" +./test_options | grep RESULT +echo "[Oniguruma API, EUC-JP check]" +./testc | grep RESULT +echo "[Oniguruma API, UTF-16 check]" +./testcu | grep RESULT +echo "" +echo "[Oniguruma API, regset check]" +./test_regset +echo "[Oniguruma API, backward search check]" +./test_back | grep RESULT diff --git a/internal/components/third_party/oniguruma/test/test_back.c b/internal/components/third_party/oniguruma/test/test_back.c new file mode 100644 index 0000000000..52f2e58f9f --- /dev/null +++ b/internal/components/third_party/oniguruma/test/test_back.c @@ -0,0 +1,1450 @@ +/* + * test_back.c + * Copyright (c) 2020-2024 K.Kosako + */ +#ifdef ONIG_ESCAPE_UCHAR_COLLISION +#undef ONIG_ESCAPE_UCHAR_COLLISION +#endif +#include + +#include "oniguruma.h" + +#include + +#define SLEN(s) strlen(s) + +static int nsucc = 0; +static int nfail = 0; +static int nerror = 0; + +#ifdef __TRUSTINSOFT_ANALYZER__ +static int nall = 0; +#endif + +static FILE* err_file; + +static OnigRegion* region; + +static void xx(char* pattern, char* str, int from, int to, int mem, int not, + int error_no, int line_no) +{ +#ifdef __TRUSTINSOFT_ANALYZER__ + if (nall++ % TIS_TEST_CHOOSE_MAX != TIS_TEST_CHOOSE_CURRENT) return; +#endif + + int r; + regex_t* reg; + OnigErrorInfo einfo; + + r = onig_new(®, (UChar* )pattern, (UChar* )(pattern + SLEN(pattern)), + ONIG_OPTION_DEFAULT, ONIG_ENCODING_UTF8, ONIG_SYNTAX_DEFAULT, &einfo); + if (r) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + + if (error_no == 0) { + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(err_file, "ERROR: %s /%s/ #%d\n", s, pattern, line_no); + nerror++; + } + else { + if (r == error_no) { + fprintf(stdout, "OK(ERROR): /%s/ %d #%d\n", pattern, r, line_no); + nsucc++; + } + else { + fprintf(stdout, "FAIL(ERROR): /%s/ '%s', %d, %d #%d\n", pattern, str, + error_no, r, line_no); + nfail++; + } + } + + return ; + } + + r = onig_search(reg, (UChar* )str, (UChar* )(str + SLEN(str)), + (UChar* )(str + SLEN(str)), (UChar* )str, + region, ONIG_OPTION_NONE); + if (r < ONIG_MISMATCH || error_no < ONIG_MISMATCH) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + + if (error_no == 0) { + onig_error_code_to_str((UChar* )s, r); + fprintf(err_file, "ERROR: %s /%s/ #%d\n", s, pattern, line_no); + nerror++; + } + else { + if (r == error_no) { + fprintf(stdout, "OK(ERROR): /%s/ '%s', %d #%d\n", pattern, str, r, line_no); + nsucc++; + } + else { + fprintf(stdout, "FAIL ERROR NO: /%s/ '%s', %d, %d #%d\n", pattern, + str, error_no, r, line_no); + nfail++; + } + } + + return ; + } + + if (r == ONIG_MISMATCH) { + if (not) { + fprintf(stdout, "OK(N): /%s/ '%s' #%d\n", pattern, str, line_no); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s' #%d\n", pattern, str, line_no); + nfail++; + } + } + else { + if (not) { + fprintf(stdout, "FAIL(N): /%s/ '%s' #%d\n", pattern, str, line_no); + nfail++; + } + else { + if (region->beg[mem] == from && region->end[mem] == to) { + fprintf(stdout, "OK: /%s/ '%s' #%d\n", pattern, str, line_no); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d #%d\n", pattern, str, + from, to, region->beg[mem], region->end[mem], line_no); + nfail++; + } + } + } + onig_free(reg); +} + +static void xx2(char* pattern, char* str, int from, int to, int line_no) +{ + xx(pattern, str, from, to, 0, 0, 0, line_no); +} + +static void xx3(char* pattern, char* str, int from, int to, int mem, int line_no) +{ + xx(pattern, str, from, to, mem, 0, 0, line_no); +} + +static void xn(char* pattern, char* str, int line_no) +{ + xx(pattern, str, 0, 0, 0, 1, 0, line_no); +} + +static void xe(char* pattern, char* str, int error_no, int line_no) +{ + xx(pattern, str, 0, 0, 0, 0, error_no, line_no); +} + +#define x2(p,s,f,t) xx2(p,s,f,t, __LINE__) +#define x3(p,s,f,t,m) xx3(p,s,f,t,m, __LINE__) +#define n(p,s) xn(p,s, __LINE__) +#define e(p,s,en) xe(p,s,en, __LINE__) + +extern int main(int argc, char* argv[]) +{ + OnigEncoding use_encs[1]; + + use_encs[0] = ONIG_ENCODING_UTF8; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + + err_file = stdout; + + region = onig_region_new(); + + x2("", "", 0, 0); + x2("^", "", 0, 0); + x2("^a", "\na", 1, 2); + x2("$", "", 0, 0); + x2("$\\O", "bb\n", 2, 3); + x2("\\G", "", 0, 0); + x2("\\A", "", 0, 0); + x2("\\Z", "", 0, 0); + x2("\\z", "", 0, 0); + x2("^$", "", 0, 0); + x2("\\ca", "\001", 0, 1); + x2("\\C-b", "\002", 0, 1); + x2("\\c\\\\", "\034", 0, 1); + x2("q[\\c\\\\]", "q\034", 0, 2); + x2("", "a", 1, 1); + x2("a", "a", 0, 1); + x2("\\x61", "a", 0, 1); + x2("aa", "aa", 0, 2); + x2("aaa", "aaa", 0, 3); + x2("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 0, 35); + x2("ab", "ab", 0, 2); + x2("b", "ab", 1, 2); + x2("bc", "abc", 1, 3); + x2("(?i:#RET#)", "#INS##RET#", 5, 10); + x2("\\17", "\017", 0, 1); + x2("\\x1f", "\x1f", 0, 1); + x2("a(?#....\\\\JJJJ)b", "ab", 0, 2); + x2("(?x) G (o O(?-x)oO) g L", "GoOoOgLe", 0, 7); + x2(".", "a", 0, 1); + n(".", ""); + x2("..", "ab", 0, 2); + x2("\\w", "e", 0, 1); + n("\\W", "e"); + x2("\\s", " ", 0, 1); + x2("\\S", "b", 0, 1); + x2("\\d", "4", 0, 1); + n("\\D", "4"); + x2("\\b", "z ", 1, 1); + x2("\\b", " z", 2, 2); + x2("\\b", " z ", 3, 3); + x2("\\B", "zz ", 3, 3); + x2("\\B", "z ", 2, 2); + x2("\\B", " z", 0, 0); + x2("[ab]", "b", 0, 1); + n("[ab]", "c"); + x2("[a-z]", "t", 0, 1); + n("[^a]", "a"); + x2("[^a]", "\n", 0, 1); + x2("[]]", "]", 0, 1); + n("[^]]", "]"); + x2("[\\^]+", "0^^1", 2, 3); + x2("[b-]", "b", 0, 1); + x2("[b-]", "-", 0, 1); + x2("[\\w]", "z", 0, 1); + n("[\\w]", " "); + x2("[\\W]", "b$", 1, 2); + x2("[\\d]", "5", 0, 1); + n("[\\d]", "e"); + x2("[\\D]", "t", 0, 1); + n("[\\D]", "3"); + x2("[\\s]", " ", 0, 1); + n("[\\s]", "a"); + x2("[\\S]", "b", 0, 1); + n("[\\S]", " "); + x2("[\\w\\d]", "2", 0, 1); + n("[\\w\\d]", " "); + x2("[[:upper:]]", "B", 0, 1); + x2("[*[:xdigit:]+]", "+", 0, 1); + x2("[*[:xdigit:]+]", "GHIKK-9+*", 8, 9); + x2("[*[:xdigit:]+]", "-@^+", 3, 4); + n("[[:upper]]", "A"); + x2("[[:upper]]", ":", 0, 1); + x2("[\\044-\\047]", "\046", 0, 1); + x2("[\\x5a-\\x5c]", "\x5b", 0, 1); + x2("[\\x6A-\\x6D]", "\x6c", 0, 1); + n("[\\x6A-\\x6D]", "\x6E"); + n("^[0-9A-F]+ 0+ UNDEF ", "75F 00000000 SECT14A notype () External | _rb_apply"); + x2("[\\[]", "[", 0, 1); + x2("[\\]]", "]", 0, 1); + x2("[&]", "&", 0, 1); + x2("[[ab]]", "b", 0, 1); + x2("[[ab]c]", "c", 0, 1); + n("[[^a]]", "a"); + n("[^[a]]", "a"); + x2("[[ab]&&bc]", "b", 0, 1); + n("[[ab]&&bc]", "a"); + n("[[ab]&&bc]", "c"); + x2("[a-z&&b-y&&c-x]", "w", 0, 1); + n("[^a-z&&b-y&&c-x]", "w"); + x2("[[^a&&a]&&a-z]", "b", 0, 1); + n("[[^a&&a]&&a-z]", "a"); + x2("[[^a-z&&bcdef]&&[^c-g]]", "h", 0, 1); + n("[[^a-z&&bcdef]&&[^c-g]]", "c"); + x2("[^[^abc]&&[^cde]]", "c", 0, 1); + x2("[^[^abc]&&[^cde]]", "e", 0, 1); + n("[^[^abc]&&[^cde]]", "f"); + x2("[a-&&-a]", "-", 0, 1); + n("[a\\-&&\\-a]", "&"); + n("\\wabc", " abc"); + x2("a\\Wbc", "a bc", 0, 4); + x2("a.b.c", "aabbc", 0, 5); + x2(".\\wb\\W..c", "abb bcc", 0, 7); + x2("\\s\\wzzz", " zzzz", 0, 5); + x2("aa.b", "aabb", 0, 4); + n(".a", "ab"); + x2(".a", "aa", 0, 2); + x2("^a", "a", 0, 1); + x2("^a$", "a", 0, 1); + x2("^\\w$", "a", 0, 1); + n("^\\w$", " "); + x2("^\\wab$", "zab", 0, 3); + x2("^\\wabcdef$", "zabcdef", 0, 7); + x2("^\\w...def$", "zabcdef", 0, 7); + x2("\\w\\w\\s\\Waaa\\d", "aa aaa4", 0, 8); + x2("\\A\\Z", "", 0, 0); + x2("\\Axyz", "xyz", 0, 3); + x2("xyz\\Z", "xyz", 0, 3); + x2("xyz\\z", "xyz", 0, 3); + x2("a\\Z", "a", 0, 1); + n("\\Gaz", "az"); + n("\\Gz", "bza"); + x2("az\\G", "az", 0, 2); + n("az\\A", "az"); + n("a\\Az", "az"); + x2("\\^\\$", "^$", 0, 2); + x2("^x?y", "xy", 0, 2); + x2("^(x?y)", "xy", 0, 2); + x2("\\w", "_", 0, 1); + n("\\W", "_"); + x2("(?=z)z", "z", 0, 1); + n("(?=z).", "a"); + x2("(?!z)a", "a", 0, 1); + n("(?!z)a", "z"); + x2("(?i:a)", "a", 0, 1); + x2("(?i:a)", "A", 0, 1); + x2("(?i:A)", "a", 0, 1); + x2("(?i:i)", "I", 0, 1); + x2("(?i:I)", "i", 0, 1); + x2("(?i:[A-Z])", "i", 0, 1); + x2("(?i:[a-z])", "I", 0, 1); + n("(?i:A)", "b"); + x2("(?i:ss)", "ss", 0, 2); + x2("(?i:ss)", "Ss", 0, 2); + x2("(?i:ss)", "SS", 0, 2); + /* 0xc5,0xbf == 017F: # LATIN SMALL LETTER LONG S */ + x2("(?i:ss)", "\xc5\xbfS", 0, 3); + x2("(?i:ss)", "s\xc5\xbf", 0, 3); + /* 0xc3,0x9f == 00DF: # LATIN SMALL LETTER SHARP S */ + x2("(?i:ss)", "\xc3\x9f", 0, 2); + /* 0xe1,0xba,0x9e == 1E9E # LATIN CAPITAL LETTER SHARP S */ + x2("(?i:ss)", "\xe1\xba\x9e", 0, 3); + x2("(?i:xssy)", "xssy", 0, 4); + x2("(?i:xssy)", "xSsy", 0, 4); + x2("(?i:xssy)", "xSSy", 0, 4); + x2("(?i:xssy)", "x\xc5\xbfSy", 0, 5); + x2("(?i:xssy)", "xs\xc5\xbfy", 0, 5); + x2("(?i:xssy)", "x\xc3\x9fy", 0, 4); + x2("(?i:xssy)", "x\xe1\xba\x9ey", 0, 5); + x2("(?i:x\xc3\x9fy)", "xssy", 0, 4); + x2("(?i:x\xc3\x9fy)", "xSSy", 0, 4); + x2("(?i:\xc3\x9f)", "ss", 0, 2); + x2("(?i:\xc3\x9f)", "SS", 0, 2); + x2("(?i:[\xc3\x9f])", "ss", 0, 2); + x2("(?i:[\xc3\x9f])", "SS", 0, 2); + x2("(?i)(?a|abd)c", "abdc"); + x2("(?>abd|a)c", "abdc", 0, 4); + x2("a?|b", "a", 1, 1); + x2("a?|b", "b", 1, 1); + x2("a?|b", "", 0, 0); + x2("a*|b", "aa", 2, 2); + x2("a*|b*", "ba", 2, 2); + x2("a*|b*", "ab", 2, 2); + x2("a+|b*", "", 0, 0); + x2("a+|b*", "bbb", 3, 3); + x2("a+|b*", "abbb", 4, 4); + n("a+|b+", ""); + x2("(a|b)?", "b", 1, 1); + x2("(a|b)*", "ba", 2, 2); + x2("(a|b)+", "bab", 2, 3); + x2("(ab|ca)+", "caabbc", 2, 4); + x2("(ab|ca)+", "aabca", 3, 5); + x2("(ab|ca)+", "abzca", 3, 5); + x2("(a|bab)+", "ababa", 4, 5); + x2("(a|bab)+", "ba", 1, 2); + x2("(a|bab)+", "baaaba", 5, 6); + x2("(?:a|b)(?:a|b)", "ab", 0, 2); + x2("(?:a*|b*)(?:a*|b*)", "aaabbb", 6, 6); + x2("(?:a*|b*)(?:a+|b+)", "aaabbb", 5, 6); + x2("(?:a+|b+){2}", "aaabbb", 4, 6); + x2("h{0,}", "hhhh", 4, 4); + x2("(?:a+|b+){1,2}", "aaabbb", 5, 6); + n("ax{2}*a", "0axxxa1"); + n("a.{0,2}a", "0aXXXa0"); + n("a.{0,2}?a", "0aXXXa0"); + n("a.{0,2}?a", "0aXXXXa0"); + x2("^a{2,}?a$", "aaa", 0, 3); + x2("^[a-z]{2,}?$", "aaa", 0, 3); + x2("(?:a+|\\Ab*)cc", "cc", 0, 2); + n("(?:a+|\\Ab*)cc", "abcc"); + x2("(?:^a+|b+)*c", "aabbbabc", 7, 8); + x2("(?:^a+|b+)*c", "aabbbbc", 6, 7); + x2("a|(?i)c", "C", 0, 1); + x2("(?i)c|a", "C", 0, 1); + x2("(?i)c|a", "A", 0, 1); + x2("a(?i)b|c", "aB", 0, 2); + x2("a(?i)b|c", "aC", 0, 2); + n("a(?i)b|c", "AC"); + n("a(?:(?i)b)|c", "aC"); + x2("(?i:c)|a", "C", 0, 1); + n("(?i:c)|a", "A"); + x2("[abc]?", "abc", 3, 3); + x2("[abc]*", "abc", 3, 3); + x2("[^abc]*", "abc", 3, 3); + n("[^abc]+", "abc"); + x2("a?\?", "aaa", 3, 3); + x2("ba?\?b", "bab", 0, 3); + x2("a*?", "aaa", 3, 3); + x2("ba*?", "baa", 0, 1); + x2("ba*?b", "baab", 0, 4); + x2("a+?", "aaa", 2, 3); + x2("ba+?", "baa", 0, 2); + x2("ba+?b", "baab", 0, 4); + x2("(?:a?)?\?", "a", 1, 1); + x2("(?:a?\?)?", "a", 1, 1); + x2("(?:a?)+?", "aaa", 3, 3); + x2("(?:a+)?\?", "aaa", 3, 3); + x2("(?:a+)?\?b", "aaab", 3, 4); + x2("(?:ab)?{2}", "", 0, 0); + x2("(?:ab)?{2}", "ababa", 5, 5); + x2("(?:ab)*{0}", "ababa", 5, 5); + x2("(?:ab){3,}", "abababab", 2, 8); + n("(?:ab){3,}", "abab"); + x2("(?:ab){2,4}", "ababab", 2, 6); + x2("(?:ab){2,4}", "ababababab", 6, 10); + x2("(?:ab){2,4}?", "ababababab", 6, 10); + x2("(?:ab){,}", "ab{,}", 0, 5); + x2("(?:abc)+?{2}", "abcabcabc", 3, 9); + x2("(?:X*)(?i:xa)", "XXXa", 2, 4); + x2("(d+)([^abc]z)", "dddz", 1, 4); + x2("([^abc]*)([^abc]z)", "dddz", 2, 4); + x2("(\\w+)(\\wz)", "dddz", 1, 4); + x3("(a)", "a", 0, 1, 1); + x3("(ab)", "ab", 0, 2, 1); + x2("((ab))", "ab", 0, 2); + x3("((ab))", "ab", 0, 2, 1); + x3("((ab))", "ab", 0, 2, 2); + x3("((((((((((((((((((((ab))))))))))))))))))))", "ab", 0, 2, 20); + x3("(ab)(cd)", "abcd", 0, 2, 1); + x3("(ab)(cd)", "abcd", 2, 4, 2); + x3("()(a)bc(def)ghijk", "abcdefghijk", 3, 6, 3); + x3("(()(a)bc(def)ghijk)", "abcdefghijk", 3, 6, 4); + x2("(^a)", "a", 0, 1); + x3("(a)|(a)", "ba", 1, 2, 1); + x3("(^a)|(a)", "ba", 1, 2, 2); + x3("(a?)", "aaa", 3, 3, 1); + x3("(a*)", "aaa", 3, 3, 1); + x3("(a*)", "", 0, 0, 1); + x3("(a+)", "aaaaaaa", 6, 7, 1); + x3("(a+|b*)", "bbbaa", 5, 5, 1); + x3("(a+|b?)", "bbbaa", 5, 5, 1); + x3("(abc)?", "abc", -1, -1, 1); + x3("(abc)*", "abc", -1, -1, 1); + x3("(abc)+", "abc", 0, 3, 1); + x3("(xyz|abc)+", "abc", 0, 3, 1); + x3("([xyz][abc]|abc)+", "abc", 0, 3, 1); + x3("((?i:abc))", "AbC", 0, 3, 1); + x2("(abc)(?i:\\1)", "abcABC", 0, 6); + x3("((?m:a.c))", "a\nc", 0, 3, 1); + x3("((?=az)a)", "azb", 0, 1, 1); + x3("abc|(.abd)", "zabd", 0, 4, 1); + x2("(?:abc)|(ABC)", "abc", 0, 3); + x3("(?i:(abc))|(zzz)", "ABC", 0, 3, 1); + x3("a*(.)", "aaaaz", 4, 5, 1); + x3("a*?(.)", "aaaaz", 4, 5, 1); + x3("a*?(c)", "aaaac", 4, 5, 1); + x3("[bcd]a*(.)", "caaaaz", 5, 6, 1); + x3("(\\Abb)cc", "bbcc", 0, 2, 1); + n("(\\Abb)cc", "zbbcc"); + x3("(^bb)cc", "bbcc", 0, 2, 1); + n("(^bb)cc", "zbbcc"); + x3("cc(bb$)", "ccbb", 2, 4, 1); + n("cc(bb$)", "ccbbb"); + n("(\\1)", ""); + n("\\1(a)", "aa"); + n("(a(b)\\1)\\2+", "ababb"); + n("(?:(?:\\1|z)(a))+$", "zaa"); + x2("(?:(?:\\1|z)(a))+$", "zaaa", 0, 4); + x2("(a)(?=\\1)", "aa", 0, 1); + n("(a)$|\\1", "az"); + x2("(a)\\1", "aa", 0, 2); + n("(a)\\1", "ab"); + x2("(a?)\\1", "aa", 2, 2); + x2("(a?\?)\\1", "aa", 2, 2); + x2("(a*)\\1", "aaaaa", 5, 5); + x3("(a*)\\1", "aaaaa", 5, 5, 1); + x2("a(b*)\\1", "abbbb", 0, 5); + x2("a(b*)\\1", "ab", 0, 1); + x2("(a*)(b*)\\1\\2", "aaabbaaabb", 10, 10); + x2("(a*)(b*)\\2", "aaabbbb", 7, 7); + x2("(((((((a*)b))))))c\\7", "aaabcaaa", 3, 5); + x3("(((((((a*)b))))))c\\7", "aaabcaaa", 3, 3, 7); + x2("(a)(b)(c)\\2\\1\\3", "abcbac", 0, 6); + x2("([a-d])\\1", "cc", 0, 2); + x2("(\\w\\d\\s)\\1", "f5 f5 ", 0, 6); + n("(\\w\\d\\s)\\1", "f5 f5"); + x2("(who|[a-c]{3})\\1", "whowho", 0, 6); + x2("...(who|[a-c]{3})\\1", "abcwhowho", 0, 9); + x2("(who|[a-c]{3})\\1", "cbccbc", 0, 6); + x2("(^a)\\1", "aa", 0, 2); + n("(^a)\\1", "baa"); + n("(a$)\\1", "aa"); + n("(ab\\Z)\\1", "ab"); + x2("(a*\\Z)\\1", "a", 1, 1); + x2(".(a*\\Z)\\1", "ba", 1, 2); + x3("(.(abc)\\2)", "zabcabc", 0, 7, 1); + x3("(.(..\\d.)\\2)", "z12341234", 0, 9, 1); + x2("((?i:az))\\1", "AzAz", 0, 4); + n("((?i:az))\\1", "Azaz"); + x2("(?<=a)b", "ab", 1, 2); + n("(?<=a)b", "bb"); + x2("(?<=a|b)b", "bb", 1, 2); + x2("(?<=a|bc)b", "bcb", 2, 3); + x2("(?<=a|bc)b", "ab", 1, 2); + x2("(?<=a|bc||defghij|klmnopq|r)z", "rz", 1, 2); + x3("(?<=(abc))d", "abcd", 0, 3, 1); + x2("(?<=(?i:abc))d", "ABCd", 3, 4); + x2("(a)\\g<1>", "aa", 0, 2); + x2("(?a)", "a", 0, 1); + x2("(?ab)\\g", "abab", 0, 4); + x2("(?.zv.)\\k", "azvbazvb", 0, 8); + x2("(?<=\\g)|-\\zEND (?XyZ)", "XyZ", 3, 3); + x2("(?|a\\g)+", "", 0, 0); + x2("(?|\\(\\g\\))+$", "()(())", 6, 6); + x3("\\g(?.){0}", "X", 0, 1, 1); + x2("\\g(abc|df(?.YZ){2,8}){0}", "XYZ", 0, 3); + x2("\\A(?(a\\g)|)\\z", "aaaa", 0, 4); + x2("(?|\\g\\g)\\z|\\zEND (?a|(b)\\g)", "bbbbabba", 8, 8); + x2("(?\\w+\\sx)a+\\k", " fg xaaaaaaaafg x", 2, 18); + x3("(z)()()(?<_9>a)\\g<_9>", "zaa", 2, 3, 1); + x2("(.)(((?<_>a)))\\k<_>", "zaa", 0, 3); + x2("((?\\d)|(?\\w))(\\k|\\k)", "ff", 0, 2); + x2("(?:(?)|(?efg))\\k", "", 0, 0); + x2("(?:(?abc)|(?efg))\\k", "abcefgefg", 3, 9); + n("(?:(?abc)|(?efg))\\k", "abcefg"); + x2("(?:(?.)|(?..)|(?...)|(?....)|(?.....)|(?......)|(?.......)|(?........)|(?.........)|(?..........)|(?...........)|(?............)|(?.............)|(?..............))\\k$", "a-pyumpyum", 2, 10); + x3("(?:(?.)|(?..)|(?...)|(?....)|(?.....)|(?......)|(?.......)|(?........)|(?.........)|(?..........)|(?...........)|(?............)|(?.............)|(?..............))\\k$", "xxxxabcdefghijklmnabcdefghijklmn", 4, 18, 14); + x3("(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?aaa)(?)$", "aaa", 0, 3, 16); + x2("(?a|\\(\\g\\))", "a", 0, 1); + x2("(?a|\\(\\g\\))", "((((((a))))))", 6, 7); + x3("(?a|\\(\\g\\))", "((((((((a))))))))", 8, 9, 1); + x2("\\g|\\zEND(?.*abc$)", "abcxxxabc", 6, 9); + x2("\\g<1>|\\zEND(.a.)", "bac", 0, 3); + x3("\\g<_A>\\g<_A>|\\zEND(.a.)(?<_A>.b.)", "xbxyby", 3, 6, 1); + x2("\\A(?:\\g|\\g|\\zEND (?a|c\\gc)(?b|d\\gd))$", "cdcbcdc", 0, 7); + x2("\\A(?|a\\g)\\z|\\zEND (?\\g)", "aaaa", 0, 4); + x2("(?(a|b\\gc){3,5})", "baaaaca", 2, 5); + x2("(?(a|b\\gc){3,5})", "baaaacaaaaa", 8, 11); + x2("(?\\(([^\\(\\)]++|\\g)*+\\))", "((a))", 1, 4); + x2("()*\\1", "", 0, 0); + x2("(?:()|())*\\1\\2", "", 0, 0); + x2("(?:a*|b*)*c", "abadc", 4, 5); + x3("(?:\\1a|())*", "a", 1, 1, 1); + x2("x((.)*)*x", "0x1x2x3", 3, 6); + x2("x((.)*)*x(?i:\\1)\\Z", "0x1x2x1X2", 1, 9); + x2("(?:()|()|()|()|()|())*\\2\\5", "", 0, 0); + x2("(?:()|()|()|(x)|()|())*\\2b\\5", "b", 0, 1); + x2("[0-9-a]", "-", 0, 1); // PR#44 + n("[0-9-a]", ":"); // PR#44 + x3("(\\(((?:[^(]|\\g<1>)*)\\))", "(abc)(abc)", 6, 9, 2); // PR#43 + x2("\\o{101}", "A", 0, 1); + x2("\\A(a|b\\g<1>c)\\k<1+3>\\z", "bbacca", 0, 6); + n("\\A(a|b\\g<1>c)\\k<1+3>\\z", "bbaccb"); + x2("(?i)\\A(a|b\\g<1>c)\\k<1+2>\\z", "bBACcbac", 0, 8); + x2("(?i)(?aa)|(?bb)\\k", "BBbb", 0, 4); + x2("(?:\\k'+1'B|(A)C)*", "ACAB", 4, 4); // relative backref by positive number + x2("\\g<+2>(abc)(ABC){0}", "ABCabc", 0, 6); // relative call by positive number + x2("A\\g'0'|B()", "AAAAB", 4, 5); + x3("(A\\g'0')|B", "AAAAB", -1, -1, 1); + x2("(a*)(?(1))aa", "aaaaa", 3, 5); + x2("(a*)(?(-1))aa", "aaaaa", 3, 5); + x2("(?aaa)(?('name'))aa", "aaaaa", 0, 5); + x2("(a)(?(1)aa|bb)a", "aaaaa", 1, 5); + x2("(?:aa|())(?(<1>)aa|bb)a", "aabba", 0, 5); + x2("(?:aa|())(?('1')aa|bb|cc)a", "aacca", 0, 5); + x3("(a*)(?(1)aa|a)b", "aaab", 1, 1, 1); + n("(a)(?(1)a|b)c", "abc"); + x2("(a)(?(1)|)c", "ac", 0, 2); + n("(?()aaa|bbb)", "bbb"); + x2("(a)(?(1+0)b|c)d", "abd", 0, 3); + x2("(?:(?'name'a)|(?'name'b))(?('name')c|d)e", "ace", 0, 3); + x2("(?:(?'name'a)|(?'name'b))(?('name')c|d)e", "bce", 0, 3); + x2("\\R", "\r\n", 1, 2); + x2("\\R", "\r", 0, 1); + x2("\\R", "\n", 0, 1); + x2("\\R", "\x0b", 0, 1); + n("\\R\\n", "\r\n"); + x2("\\R", "\xc2\x85", 0, 2); + x2("\\N", "a", 0, 1); + n("\\N", "\n"); + n("(?m:\\N)", "\n"); + n("(?-m:\\N)", "\n"); + x2("\\O", "a", 0, 1); + x2("\\O", "\n", 0, 1); + x2("(?m:\\O)", "\n", 0, 1); + x2("(?-m:\\O)", "\n", 0, 1); + x2("\\K", "a", 1, 1); + x2("a\\K", "a", 1, 1); + x2("a\\Kb", "ab", 1, 2); + x2("(a\\Kb|ac\\Kd)", "acd", 2, 3); + x2("(a\\Kb|\\Kac\\K)*", "acababacab", 10, 10); + x2("(?:()|())*\\1", "abc", 3, 3); + x2("(?:()|())*\\2", "abc", 3, 3); + x2("(?:()|()|())*\\3\\1", "abc", 3, 3); + x2("(|(?:a(?:\\g'1')*))b|", "abc", 3, 3); + x2("^(\"|)(.*)\\1$", "XX", 0, 2); + x2("(abc|def|ghi|jkl|mno|pqr|stu){0,10}?\\z", "admno", 5, 5); + x2("(abc|(def|ghi|jkl|mno|pqr){0,7}?){5}\\z", "adpqrpqrpqr", 11, 11); // cover OP_REPEAT_INC_NG_SG + x2("(?!abc).*\\z", "abcde", 5, 5); // cover OP_PREC_READ_NOT_END + x2("(.{2,})?", "abcde", 5, 5); // up coverage + x2("((a|b|c|d|e|f|g|h|i|j|k|l|m|n)+)?", "abcde", 5, 5); // up coverage + x2("((a|b|c|d|e|f|g|h|i|j|k|l|m|n){3,})?", "abcde", 5, 5); // up coverage + x2("((?:a(?:b|c|d|e|f|g|h|i|j|k|l|m|n))+)?", "abacadae", 8, 8); // up coverage + x2("((?:a(?:b|c|d|e|f|g|h|i|j|k|l|m|n))+?)?z", "abacadaez", 8, 9); // up coverage + x2("\\A((a|b)\?\?)?z", "bz", 0, 2); // up coverage + x2("((?abc){0}a\\gd)+", "aabcd", 0, 5); // up coverage + x2("((?(abc)true|false))+", "false", 0, 5); // up coverage + x2("((?i:abc)d)+", "abcdABCd", 4, 8); // up coverage + x2("((?ab)(?()a|b)", "aba", 0, 3); // up coverage + x2("(?<=a.b)c", "azbc", 3, 4); // up coverage + n("(?<=(?:abcde){30})z", "abc"); // up coverage + x2("(?<=(?(a)a|bb))z", "aaz", 2, 3); // up coverage + x2("[a]*\\W", "aa@", 2, 3); // up coverage + x2("[a]*[b]", "aab", 2, 3); // up coverage + n("a*\\W", "aaa"); // up coverage + n("(?W)a*\\W", "aaa"); // up coverage + x2("(?<=ab(?<=ab))", "ab", 2, 2); // up coverage + x2("(?a)(?b)(\\k)+", "abbaab", 0, 6); // up coverage + x2("()(\\1)(\\2)", "abc", 3, 3); // up coverage + x2("((?(a)b|c))(\\1)", "abab", 0, 4); // up coverage + x2("(?$|b\\g)", "bbb", 3, 3); // up coverage + x2("(?(?(a)a|b)|c\\g)", "cccb", 3, 4); // up coverage + x2("(a)(?(1)a*|b*)+", "aaaa", 3, 4); // up coverage + x2("[[^abc]&&cde]*", "de", 2, 2); // up coverage + n("(a){10}{10}", "aa"); // up coverage + x2("(?:a?)+", "aa", 2, 2); // up coverage + x2("(?:a?)*?", "a", 1, 1); // up coverage + x2("(?:a*)*?", "a", 1, 1); // up coverage + x2("(?:a+?)*", "a", 1, 1); // up coverage + x2("\\h", "5", 0, 1); // up coverage + x2("\\H", "z", 0, 1); // up coverage + x2("[\\h]", "5", 0, 1); // up coverage + x2("[\\H]", "z", 0, 1); // up coverage + x2("[\\o{101}]", "A", 0, 1); // up coverage + x2("[\\u0041]", "A", 0, 1); // up coverage + + x2("(?~)", "", 0, 0); + x2("(?~)", "A", 1, 1); + x2("aaaaa(?~)", "aaaaaaaaaa", 5, 10); + x2("(?~(?:|aaa))", "aaa", 3, 3); + x2("(?~aaa|)", "aaa", 3, 3); + x2("a(?~(?~)).", "abcdefghijklmnopqrstuvwxyz", 0, 26); // !!! + x2("/\\*(?~\\*/)\\*/", "/* */ */", 0, 5); + x2("(?~\\w+)zzzzz", "zzzzz", 0, 5); + x2("(?~\\w*)zzzzz", "zzzzz", 0, 5); + x2("(?~A.C|B)", "ABC", 3, 3); + x2("(?~XYZ|ABC)a", "ABCa", 3, 4); + x2("(?~XYZ|ABC)a", "aABCa", 4, 5); + x2("<[^>]*>(?~[<>])]*>", "vvv ", 13, 22); + x2("(?~ab)", "ccc\ndab", 7, 7); + x2("(?m:(?~ab))", "ccc\ndab", 7, 7); + x2("(?-m:(?~ab))", "ccc\ndab", 7, 7); + x2("(?~abc)xyz", "xyz012345678901234567890123456789abc", 0, 3); + + // absent with expr + x2("(?~|78|\\d*)", "123456789", 9, 9); + x2("(?~|def|(?:abc|de|f){0,100})", "abcdedeabcfdefabc", 17, 17); + x2("(?~|ab|.*)", "ccc\nddd", 7, 7); + x2("(?~|ab|\\O*)", "ccc\ndab", 7, 7); + x2("(?~|ab|\\O{2,10})", "ccc\ndab", 3, 5); + x2("(?~|ab|\\O{1,10})", "ab", 1, 2); + n("(?~|ab|\\O{2,10})", "ab"); + x2("(?~|abc|\\O{1,10})", "abc", 2, 3); + x2("(?~|ab|\\O{5,10})|abc", "abc", 0, 3); + x2("(?~|ab|\\O{1,10})", "cccccccccccab", 12, 13); + x2("(?~|aaa|)", "aaa", 3, 3); + x2("(?~||a*)", "aaaaaa", 6, 6); + x2("(?~||a*?)", "aaaaaa", 6, 6); + x2("(a)(?~|b|\\1)", "aaaaaa", 4, 6); + x2("(a)(?~|bb|(?:a\\1)*)", "aaaaaa", 5, 6); + x2("(b|c)(?~|abac|(?:a\\1)*)", "abababacabab", 11, 12); + n("(?~|c|a*+)a", "aaaaa"); + x2("(?~|aaaaa|a*+)", "aaaaa", 5, 5); + x2("(?~|aaaaaa|a*+)b", "aaaaaab", 6, 7); + x2("(?~|abcd|(?>))", "zzzabcd", 7, 7); + x2("(?~|abc|a*?)", "aaaabc", 6, 6); + + // absent range cutter + x2("(?~|abc)a*", "aaaaaabc", 8, 8); + x2("(?~|abc)a*z|aaaaaabc", "aaaaaabc", 0, 8); + x2("(?~|aaaaaa)a*", "aaaaaa", 6, 6); + x2("(?~|abc)aaaa|aaaabc", "aaaabc", 0, 6); + x2("(?>(?~|abc))aaaa|aaaabc", "aaaabc", 0, 6); + x2("(?~|)a", "a", 0, 1); + n("(?~|a)a", "a"); + x2("(?~|a)(?~|)a", "a", 0, 1); + x2("(?~|a).*(?~|)a", "bbbbbbbbbbbbbbbbbbbba", 20, 21); + x2("(?~|abc).*(xyz|pqr)(?~|)abc", "aaaaxyzaaapqrabc", 10, 16); + x2("(?~|abc).*(xyz|pqr)(?~|)abc", "aaaaxyzaaaabcpqrabc", 13, 19); + n("\\A(?~|abc).*(xyz|pqrabc)(?~|)abc", "aaaaxyzaaaabcpqrabcabc"); + + x2("", "ã‚", 3, 3); + x2("ã‚", "ã‚", 0, 3); + n("ã„", "ã‚"); + x2("ã†ã†", "ã†ã†", 0, 6); + x2("ã‚ã„ã†", "ã‚ã„ã†", 0, 9); + x2("ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“", "ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“", 0, 105); + x2("ã‚", "ã„ã‚", 3, 6); + x2("ã„ã†", "ã‚ã„ã†", 3, 9); + x2("\\xca\\xb8", "\xca\xb8", 0, 2); + x2(".", "ã‚", 0, 3); + x2("..", "ã‹ã", 0, 6); + x2("\\w", "ãŠ", 0, 3); + n("\\W", "ã‚"); + x2("[\\W]", "ã†$", 3, 4); + x2("\\S", "ã", 0, 3); + x2("\\S", "æ¼¢", 0, 3); + x2("\\b", "æ°— ", 3, 3); + x2("\\b", " ã»", 4, 4); + x2("\\B", "ã›ã ", 7, 7); + x2("\\B", "ㆠ", 4, 4); + x2("\\B", " ã„", 0, 0); + x2("[ãŸã¡]", "ã¡", 0, 3); + n("[ãªã«]", "ã¬"); + x2("[ã†-ãŠ]", "ãˆ", 0, 3); + n("[^ã‘]", "ã‘"); + x2("[\\w]", "ã­", 0, 3); + n("[\\d]", "ãµ"); + x2("[\\D]", "ã¯", 0, 3); + n("[\\s]", "ã"); + x2("[\\S]", "ã¸", 0, 3); + x2("[\\w\\d]", "よ", 0, 3); + x2("[\\w\\d]", " よ", 3, 6); + n("\\w鬼車", " 鬼車"); + x2("鬼\\W車", "鬼 車", 0, 7); + x2("ã‚.ã„.ã†", "ã‚ã‚ã„ã„ã†", 0, 15); + x2(".\\wã†\\W..ãž", "ãˆã†ã† ã†ãžãž", 0, 19); + x2("\\s\\wã“ã“ã“", " ã“ã“ã“ã“", 0, 13); + x2("ã‚ã‚.ã‘", "ã‚ã‚ã‘ã‘", 0, 12); + n(".ã„", "ã„ãˆ"); + x2(".ãŠ", "ãŠãŠ", 0, 6); + x2("^ã‚", "ã‚", 0, 3); + x2("^ã‚€$", "ã‚€", 0, 3); + x2("^\\w$", "ã«", 0, 3); + x2("^\\wã‹ããã‘ã“$", "zã‹ããã‘ã“", 0, 16); + x2("^\\w...ã†ãˆãŠ$", "zã‚ã„ã†ã†ãˆãŠ", 0, 19); + x2("\\w\\w\\s\\WãŠãŠãŠ\\d", "a㊠ãŠãŠãŠ4", 0, 16); + x2("\\AãŸã¡ã¤", "ãŸã¡ã¤", 0, 9); + x2("ã‚€ã‚ã‚‚\\Z", "ã‚€ã‚ã‚‚", 0, 9); + x2("ã‹ãã\\z", "ã‹ãã", 0, 9); + x2("ã‹ãã\\Z", "ã‹ãã\n", 0, 9); + n("\\Gã½ã´", "ã½ã´"); + n("\\Gãˆ", "ã†ãˆãŠ"); + x2("ã¨ã¦\\G", "ã¨ã¦", 0, 6); + n("ã¾ã¿\\A", "ã¾ã¿"); + n("ã¾\\Aã¿", "ã¾ã¿"); + x2("(?=ã›)ã›", "ã›", 0, 3); + n("(?=ã†).", "ã„"); + x2("(?!ã†)ã‹", "ã‹", 0, 3); + n("(?!ã¨)ã‚", "ã¨"); + x2("(?i:ã‚)", "ã‚", 0, 3); + x2("(?i:ã¶ã¹)", "ã¶ã¹", 0, 6); + n("(?i:ã„)", "ã†"); + x2("(?m:よ.)", "よ\n", 0, 4); + x2("(?m:.ã‚)", "ã¾\nã‚", 3, 7); + x2("ã‚?", "", 0, 0); + x2("変?", "化", 3, 3); + x2("変?", "変", 3, 3); + x2("é‡*", "", 0, 0); + x2("é‡*", "é‡", 3, 3); + x2("å­*", "å­å­å­", 9, 9); + x2("馬*", "鹿馬馬馬馬", 15, 15); + n("å±±+", ""); + x2("æ²³+", "æ²³", 0, 3); + x2("時+", "時時時時", 9, 12); + x2("ãˆ+", "ãˆãˆã†ã†ã†", 3, 6); + x2("ã†+", "ãŠã†ã†ã†ã†", 12, 15); + x2(".?", "ãŸ", 3, 3); + x2(".*", "ã±ã´ã·ãº", 12, 12); + x2(".+", "ã‚", 0, 3); + x2(".+", "ã„ã†ãˆã‹\n", 9, 12); + x2("ã‚|ã„", "ã‚", 0, 3); + x2("ã‚|ã„", "ã„", 0, 3); + x2("ã‚ã„|ã„ã†", "ã‚ã„", 0, 6); + x2("ã‚ã„|ã„ã†", "ã„ã†", 0, 6); + x2("ã‚’(?:ã‹ã|ãã)", "ã‚’ã‹ã", 0, 9); + x2("ã‚’(?:ã‹ã|ãã)ã‘", "ã‚’ããã‘", 0, 12); + x2("ã‚ã„|(?:ã‚ã†|ã‚ã‚’)", "ã‚ã‚’", 0, 6); + x2("ã‚|ã„|ã†", "ãˆã†", 3, 6); + x2("ã‚|ã„|ã†ãˆ|ãŠã‹ã|ã|ã‘ã“ã•|ã—ã™ã›|ã|ãŸã¡|ã¤ã¦ã¨ãªã«|ã¬ã­", "ã—ã™ã›", 0, 9); + n("ã‚|ã„|ã†ãˆ|ãŠã‹ã|ã|ã‘ã“ã•|ã—ã™ã›|ã|ãŸã¡|ã¤ã¦ã¨ãªã«|ã¬ã­", "ã™ã›"); + x2("ã‚|^ã‚", "ã¶ã‚", 3, 6); + x2("ã‚|^ã‚’", "ã‚’ã‚", 3, 6); + x2("鬼|\\G車", "ã‘車鬼", 6, 9); + x2("鬼|\\G車", "車鬼", 3, 6); + x2("鬼|\\A車", "b車鬼", 4, 7); + x2("鬼|\\A車", "車", 0, 3); + x2("鬼|車\\Z", "車鬼", 3, 6); + x2("鬼|車\\Z", "車", 0, 3); + x2("鬼|車\\Z", "車\n", 0, 3); + x2("鬼|車\\z", "車鬼", 3, 6); + x2("鬼|車\\z", "車", 0, 3); + x2("\\w|\\s", "ãŠ", 0, 3); + x2("\\w|%", "%ãŠ", 1, 4); + x2("\\w|[&$]", "ã†&", 3, 4); + x2("[ã„-ã‘]", "ã†", 0, 3); + x2("[ã„-ã‘]|[^ã‹-ã“]", "ã‚", 0, 3); + x2("[ã„-ã‘]|[^ã‹-ã“]", "ã‹", 0, 3); + x2("[^ã‚]", "\n", 0, 1); + x2("(?:ã‚|[ã†-ã])|ã„ã‚’", "ã†ã‚’", 0, 3); + x2("(?:ã‚|[ã†-ã])|ã„ã‚’", "ã„ã‚’", 0, 6); + x2("ã‚ã„ã†|(?=ã‘ã‘)..ã»", "ã‘ã‘ã»", 0, 9); + x2("ã‚ã„ã†|(?!ã‘ã‘)..ã»", "ã‚ã„ã»", 0, 9); + x2("(?=ã‚’ã‚)..ã‚|(?=ã‚’ã‚’)..ã‚", "ã‚’ã‚’ã‚", 0, 9); + x2("(?<=ã‚|ã„ã†)ã„", "ã„ã†ã„", 6, 9); + n("(?>ã‚|ã‚ã„ãˆ)ã†", "ã‚ã„ãˆã†"); + x2("(?>ã‚ã„ãˆ|ã‚)ã†", "ã‚ã„ãˆã†", 0, 12); + x2("ã‚?|ã„", "ã‚", 3, 3); + x2("ã‚?|ã„", "ã„", 3, 3); + x2("ã‚?|ã„", "", 0, 0); + x2("ã‚*|ã„", "ã‚ã‚", 6, 6); + x2("ã‚*|ã„*", "ã„ã‚", 6, 6); + x2("ã‚*|ã„*", "ã‚ã„", 6, 6); + x2("[aã‚]*|ã„*", "aã‚ã„ã„ã„", 13, 13); + x2("ã‚+|ã„*", "", 0, 0); + x2("ã‚+|ã„*", "ã„ã„ã„", 9, 9); + x2("ã‚+|ã„*", "ã‚ã„ã„ã„", 12, 12); + x2("ã‚+|ã„*", "aã‚ã„ã„ã„", 13, 13); + n("ã‚+|ã„+", ""); + x2("(ã‚|ã„)?", "ã„", 3, 3); + x2("(ã‚|ã„)*", "ã„ã‚", 6, 6); + x2("(ã‚|ã„)+", "ã„ã‚ã„", 6, 9); + x2("(ã‚ã„|ã†ã‚)+", "ã†ã‚ã‚ã„ã†ãˆ", 6, 12); + x2("(ã‚ã„|ã†ãˆ)+", "ã†ã‚ã‚ã„ã†ãˆ", 12, 18); + x2("(ã‚ã„|ã†ã‚)+", "ã‚ã‚ã„ã†ã‚", 9, 15); + x2("(ã‚ã„|ã†ã‚)+", "ã‚ã„ã‚’ã†ã‚", 9, 15); + x2("(ã‚ã„|ã†ã‚)+", "$$zzzzã‚ã„ã‚’ã†ã‚", 15, 21); + x2("(ã‚|ã„ã‚ã„)+", "ã‚ã„ã‚ã„ã‚", 12, 15); + x2("(ã‚|ã„ã‚ã„)+", "ã„ã‚", 3, 6); + x2("(ã‚|ã„ã‚ã„)+", "ã„ã‚ã‚ã‚ã„ã‚", 15, 18); + x2("(?:ã‚|ã„)(?:ã‚|ã„)", "ã‚ã„", 0, 6); + x2("(?:ã‚*|ã„*)(?:ã‚*|ã„*)", "ã‚ã‚ã‚ã„ã„ã„", 18, 18); + x2("(?:ã‚*|ã„*)(?:ã‚+|ã„+)", "ã‚ã‚ã‚ã„ã„ã„", 15, 18); + x2("(?:ã‚+|ã„+){2}", "ã‚ã‚ã‚ã„ã„ã„", 12, 18); + x2("(?:ã‚+|ã„+){1,2}", "ã‚ã‚ã‚ã„ã„ã„", 15, 18); + x2("(?:ã‚+|\\Aã„*)ã†ã†", "ã†ã†", 0, 6); + n("(?:ã‚+|\\Aã„*)ã†ã†", "ã‚ã„ã†ã†"); + x2("(?:^ã‚+|ã„+)*ã†", "ã‚ã‚ã„ã„ã„ã‚ã„ã†", 21, 24); + x2("(?:^ã‚+|ã„+)*ã†", "ã‚ã‚ã„ã„ã„ã„ã†", 18, 21); + x2("ã†{0,}", "ã†ã†ã†ã†", 12, 12); + x2("ã‚|(?i)c", "C", 0, 1); + x2("(?i)c|ã‚", "C", 0, 1); + x2("(?i:ã‚)|a", "a", 0, 1); + n("(?i:ã‚)|a", "A"); + x2("[ã‚ã„ã†]?", "ã‚ã„ã†", 9, 9); + x2("[ã‚ã„ã†]*", "ã‚ã„ã†", 9, 9); + x2("[^ã‚ã„ã†]*", "ã‚ã„ã†", 9, 9); + n("[^ã‚ã„ã†]+", "ã‚ã„ã†"); + x2("ã‚?\?", "ã‚ã‚ã‚", 9, 9); + x2("ã„ã‚?\?ã„", "ã„ã‚ã„", 0, 9); + x2("ã‚*?", "ã‚ã‚ã‚", 9, 9); + x2("ã„ã‚*?", "ã„ã‚ã‚", 0, 3); + x2("ã„ã‚*?ã„", "ã„ã‚ã‚ã„", 0, 12); + x2("ã‚+?", "ã‚ã‚ã‚", 6, 9); + x2("ã„ã‚+?", "ã„ã‚ã‚", 0, 6); + x2("ã„ã‚+?ã„", "ã„ã‚ã‚ã„", 0, 12); + x2("(?:天?)?\?", "天", 3, 3); + x2("(?:天?\?)?", "天", 3, 3); + x2("(?:夢?)+?", "夢夢夢", 9, 9); + x2("(?:風+)?\?", "風風風", 9, 9); + x2("(?:雪+)?\?霜", "雪雪雪霜", 9, 12); + x2("(?:ã‚ã„)?{2}", "", 0, 0); + x2("(?:鬼車)?{2}", "鬼車鬼車鬼", 15, 15); + x2("(?:鬼車)*{0}", "鬼車鬼車鬼", 15, 15); + x2("(?:鬼車){3,}", "鬼車鬼車鬼車鬼車", 6, 24); + n("(?:鬼車){3,}", "鬼車鬼車"); + x2("(?:鬼車){2,4}", "鬼車鬼車鬼車", 6, 18); + x2("(?:鬼車){2,4}", "鬼車鬼車鬼車鬼車鬼車", 18, 30); + x2("(?:鬼車){2,4}?", "鬼車鬼車鬼車鬼車鬼車", 18, 30); + x2("(?:鬼車){,}", "鬼車{,}", 0, 9); + x2("(?:ã‹ãã)+?{2}", "ã‹ããã‹ããã‹ãã", 9, 27); + x3("(ç«)", "ç«", 0, 3, 1); + x3("(ç«æ°´)", "ç«æ°´", 0, 6, 1); + x2("((時間))", "時間", 0, 6); + x3("((風水))", "風水", 0, 6, 1); + x3("((昨日))", "昨日", 0, 6, 2); + x3("((((((((((((((((((((é‡å­))))))))))))))))))))", "é‡å­", 0, 6, 20); + x3("(ã‚ã„)(ã†ãˆ)", "ã‚ã„ã†ãˆ", 0, 6, 1); + x3("(ã‚ã„)(ã†ãˆ)", "ã‚ã„ã†ãˆ", 6, 12, 2); + x3("()(ã‚)ã„ã†(ãˆãŠã‹)ããã‘ã“", "ã‚ã„ã†ãˆãŠã‹ããã‘ã“", 9, 18, 3); + x3("(()(ã‚)ã„ã†(ãˆãŠã‹)ããã‘ã“)", "ã‚ã„ã†ãˆãŠã‹ããã‘ã“", 9, 18, 4); + x3(".*(フォ)ン・マ(ン()シュタ)イン", "フォン・マンシュタイン", 15, 27, 2); + x2("(^ã‚)", "ã‚", 0, 3); + x3("(ã‚)|(ã‚)", "ã„ã‚", 3, 6, 1); + x3("(^ã‚)|(ã‚)", "ã„ã‚", 3, 6, 2); + x3("(ã‚?)", "ã‚ã‚ã‚", 9, 9, 1); + x3("(ã¾*)", "ã¾ã¾ã¾", 9, 9, 1); + x3("(ã¨*)", "", 0, 0, 1); + x3("(ã‚‹+)", "ã‚‹ã‚‹ã‚‹ã‚‹ã‚‹ã‚‹ã‚‹", 18, 21, 1); + x3("(ãµ+|ã¸*)", "ãµãµãµã¸ã¸", 15, 15, 1); + x3("(ã‚+|ã„?)", "ã„ã„ã„ã‚ã‚", 15, 15, 1); + x3("(ã‚ã„ã†)?", "ã‚ã„ã†", -1, -1, 1); + x3("(ã‚ã„ã†)*", "ã‚ã„ã†", -1, -1, 1); + x3("(ã‚ã„ã†)+", "ã‚ã„ã†", 0, 9, 1); + x3("(ã•ã—ã™|ã‚ã„ã†)+", "ã‚ã„ã†", 0, 9, 1); + x3("([ãªã«ã¬][ã‹ãã]|ã‹ãã)+", "ã‹ãã", 0, 9, 1); + x3("((?i:ã‚ã„ã†))", "ã‚ã„ã†", 0, 9, 1); + x3("((?m:ã‚.ã†))", "ã‚\nã†", 0, 7, 1); + x3("((?=ã‚ã‚“)ã‚)", "ã‚ã‚“ã„", 0, 3, 1); + x3("ã‚ã„ã†|(.ã‚ã„ãˆ)", "ã‚“ã‚ã„ãˆ", 0, 12, 1); + x3("ã‚*(.)", "ã‚ã‚ã‚ã‚ã‚“", 12, 15, 1); + x3("ã‚*?(.)", "ã‚ã‚ã‚ã‚ã‚“", 12, 15, 1); + x3("ã‚*?(ã‚“)", "ã‚ã‚ã‚ã‚ã‚“", 12, 15, 1); + x3("[ã„ã†ãˆ]ã‚*(.)", "ãˆã‚ã‚ã‚ã‚ã‚“", 15, 18, 1); + x3("(\\Aã„ã„)ã†ã†", "ã„ã„ã†ã†", 0, 6, 1); + n("(\\Aã„ã„)ã†ã†", "ã‚“ã„ã„ã†ã†"); + x3("(^ã„ã„)ã†ã†", "ã„ã„ã†ã†", 0, 6, 1); + n("(^ã„ã„)ã†ã†", "ã‚“ã„ã„ã†ã†"); + x3("ã‚ã‚(ã‚‹ã‚‹$)", "ã‚ã‚ã‚‹ã‚‹", 6, 12, 1); + n("ã‚ã‚(ã‚‹ã‚‹$)", "ã‚ã‚ã‚‹ã‚‹ã‚‹"); + x2("(ç„¡)\\1", "ç„¡ç„¡", 0, 6); + n("(ç„¡)\\1", "ç„¡æ­¦"); + x2("(空?)\\1", "空空", 6, 6); + x2("(空?\?)\\1", "空空", 6, 6); + x2("(空*)\\1", "空空空空空", 15, 15); + x3("(空*)\\1", "空空空空空", 15, 15, 1); + x2("ã‚(ã„*)\\1", "ã‚ã„ã„ã„ã„", 0, 15); + x2("ã‚(ã„*)\\1", "ã‚ã„", 0, 3); + x2("(ã‚*)(ã„*)\\1\\2", "ã‚ã‚ã‚ã„ã„ã‚ã‚ã‚ã„ã„", 30, 30); + x2("(ã‚*)(ã„*)\\2", "ã‚ã‚ã‚ã„ã„ã„ã„", 21, 21); + x3("(ã‚*)(ã„*)\\2", "ã‚ã‚ã‚ã„ã„ã„ã„", 21, 21, 2); + x2("(((((((ã½*)ãº))))))ã´\\7", "ã½ã½ã½ãºã´ã½ã½ã½", 9, 15); + x3("(((((((ã½*)ãº))))))ã´\\7", "ã½ã½ã½ãºã´ã½ã½ã½", 9, 9, 7); + x2("(ã¯)(ã²)(ãµ)\\2\\1\\3", "ã¯ã²ãµã²ã¯ãµ", 0, 18); + x2("([ã-ã‘])\\1", "ãã", 0, 6); + x2("(\\w\\d\\s)\\1", "ã‚5 ã‚5 ", 0, 10); + n("(\\w\\d\\s)\\1", "ã‚5 ã‚5"); + x2("(誰?|[ã‚-ã†]{3})\\1", "誰?誰?", 0, 12); + x2("...(誰?|[ã‚-ã†]{3})\\1", "ã‚aã‚誰?誰?", 0, 19); + x2("(誰?|[ã‚-ã†]{3})\\1", "ã†ã„ã†ã†ã„ã†", 0, 18); + x2("(^ã“)\\1", "ã“ã“", 0, 6); + n("(^ã‚€)\\1", "ã‚むむ"); + n("(ã‚$)\\1", "ã‚ã‚"); + n("(ã‚ã„\\Z)\\1", "ã‚ã„"); + x2("(ã‚*\\Z)\\1", "ã‚", 3, 3); + x2(".(ã‚*\\Z)\\1", "ã„ã‚", 3, 6); + x3("(.(ã‚„ã„ゆ)\\2)", "zã‚„ã„ゆやã„ゆ", 0, 19, 1); + x3("(.(..\\d.)\\2)", "ã‚12341234", 0, 11, 1); + x2("((?i:ã‚vãš))\\1", "ã‚vãšã‚vãš", 0, 14); + x2("(?<愚ã‹>変|\\(\\g<愚ã‹>\\))", "((((((変))))))", 6, 9); + x2("\\A(?:\\g<阿_1>|\\g<云_2>|\\z終了 (?<阿_1>観|自\\g<云_2>自)(?<云_2>在|è©è–©\\g<阿_1>è©è–©))$", "è©è–©è‡ªè©è–©è‡ªåœ¨è‡ªè©è–©è‡ªè©è–©", 0, 39); + x2("[[ã²ãµ]]", "ãµ", 0, 3); + x2("[[ã„ãŠã†]ã‹]", "ã‹", 0, 3); + n("[[^ã‚]]", "ã‚"); + n("[^[ã‚]]", "ã‚"); + x2("[^[^ã‚]]", "ã‚", 0, 3); + x2("[[ã‹ãã]&&ãã]", "ã", 0, 3); + n("[[ã‹ãã]&&ãã]", "ã‹"); + n("[[ã‹ãã]&&ãã]", "ã‘"); + x2("[ã‚-ã‚“&&ã„-ã‚’&&ã†-ã‚‘]", "ã‚‘", 0, 3); + n("[^ã‚-ã‚“&&ã„-ã‚’&&ã†-ã‚‘]", "ã‚‘"); + x2("[[^ã‚&&ã‚]&&ã‚-ã‚“]", "ã„", 0, 3); + n("[[^ã‚&&ã‚]&&ã‚-ã‚“]", "ã‚"); + x2("[[^ã‚-ã‚“&&ã„ã†ãˆãŠ]&&[^ã†-ã‹]]", "ã", 0, 3); + n("[[^ã‚-ã‚“&&ã„ã†ãˆãŠ]&&[^ã†-ã‹]]", "ã„"); + x2("[^[^ã‚ã„ã†]&&[^ã†ãˆãŠ]]", "ã†", 0, 3); + x2("[^[^ã‚ã„ã†]&&[^ã†ãˆãŠ]]", "ãˆ", 0, 3); + n("[^[^ã‚ã„ã†]&&[^ã†ãˆãŠ]]", "ã‹"); + x2("[ã‚-&&-ã‚]", "-", 0, 1); + x2("[^[^a-zã‚ã„ã†]&&[^bcdefgã†ãˆãŠ]q-w]", "ãˆ", 0, 3); + x2("[^[^a-zã‚ã„ã†]&&[^bcdefgã†ãˆãŠ]g-w]", "f", 0, 1); + x2("[^[^a-zã‚ã„ã†]&&[^bcdefgã†ãˆãŠ]g-w]", "g", 0, 1); + n("[^[^a-zã‚ã„ã†]&&[^bcdefgã†ãˆãŠ]g-w]", "2"); + x2("aãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰<\\/b>", "aãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰", 0, 44); + x2(".ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰<\\/b>", "aãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰", 0, 44); + x2("\\n?\\z", "ã“ã‚“ã«ã¡ã¯", 15, 15); + x2("(?m).*", "é’赤黄", 9, 9); + x2("(?m).*a", "é’赤黄a", 9, 10); + + x2("\\p{Hiragana}", "ã´", 0, 3); + n("\\P{Hiragana}", "ã´"); + x2("\\p{Emoji}", "\xE2\xAD\x90", 0, 3); + x2("\\p{^Emoji}", "\xEF\xBC\x93", 0, 3); + x2("\\p{Extended_Pictographic}", "\xE2\x9A\xA1", 0, 3); + n("\\p{Extended_Pictographic}", "\xE3\x81\x82"); + + x2("\\p{Word}", "ã“", 0, 3); + n("\\p{^Word}", "ã“"); + x2("[\\p{Word}]", "ã“", 0, 3); + n("[\\p{^Word}]", "ã“"); + n("[^\\p{Word}]", "ã“"); + x2("[^\\p{^Word}]", "ã“", 0, 3); + x2("[^\\p{^Word}&&\\p{ASCII}]", "ã“", 0, 3); + x2("[^\\p{^Word}&&\\p{ASCII}]", "a", 0, 1); + n("[^\\p{^Word}&&\\p{ASCII}]", "#"); + x2("[^[\\p{^Word}]&&[\\p{ASCII}]]", "ã“", 0, 3); + x2("[^[\\p{ASCII}]&&[^\\p{Word}]]", "ã“", 0, 3); + n("[[\\p{ASCII}]&&[^\\p{Word}]]", "ã“"); + x2("[^[\\p{^Word}]&&[^\\p{ASCII}]]", "ã“", 0, 3); + x2("[^\\x{104a}]", "ã“", 0, 3); + x2("[^\\p{^Word}&&[^\\x{104a}]]", "ã“", 0, 3); + x2("[^[\\p{^Word}]&&[^\\x{104a}]]", "ã“", 0, 3); + n("[^\\p{Word}||[^\\x{104a}]]", "ã“"); + + x2("\\p{^Cntrl}", "ã“", 0, 3); + n("\\p{Cntrl}", "ã“"); + x2("[\\p{^Cntrl}]", "ã“", 0, 3); + n("[\\p{Cntrl}]", "ã“"); + n("[^\\p{^Cntrl}]", "ã“"); + x2("[^\\p{Cntrl}]", "ã“", 0, 3); + x2("[^\\p{Cntrl}&&\\p{ASCII}]", "ã“", 0, 3); + x2("[^\\p{Cntrl}&&\\p{ASCII}]", "a", 0, 1); + n("[^\\p{^Cntrl}&&\\p{ASCII}]", "#"); + x2("[^[\\p{^Cntrl}]&&[\\p{ASCII}]]", "ã“", 0, 3); + x2("[^[\\p{ASCII}]&&[^\\p{Cntrl}]]", "ã“", 0, 3); + n("[[\\p{ASCII}]&&[^\\p{Cntrl}]]", "ã“"); + n("[^[\\p{^Cntrl}]&&[^\\p{ASCII}]]", "ã“"); + n("[^\\p{^Cntrl}&&[^\\x{104a}]]", "ã“"); + n("[^[\\p{^Cntrl}]&&[^\\x{104a}]]", "ã“"); + n("[^\\p{Cntrl}||[^\\x{104a}]]", "ã“"); + + x2("(?-W:\\p{Word})", "ã“", 0, 3); + n("(?W:\\p{Word})", "ã“"); + x2("(?W:\\p{Word})", "k", 0, 1); + x2("(?-W:[[:word:]])", "ã“", 0, 3); + n("(?W:[[:word:]])", "ã“"); + x2("(?-D:\\p{Digit})", "3", 0, 3); + n("(?D:\\p{Digit})", "3"); + x2("(?-S:\\p{Space})", "\xc2\x85", 0, 2); + n("(?S:\\p{Space})", "\xc2\x85"); + x2("(?-P:\\p{Word})", "ã“", 0, 3); + n("(?P:\\p{Word})", "ã“"); + x2("(?-W:\\w)", "ã“", 0, 3); + n("(?W:\\w)", "ã“"); + x2("(?-W:\\w)", "k", 0, 1); + x2("(?W:\\w)", "k", 0, 1); + n("(?-W:\\W)", "ã“"); + x2("(?W:\\W)", "ã“", 0, 3); + n("(?-W:\\W)", "k"); + n("(?W:\\W)", "k"); + + x2("(?-W:\\b)", "ã“", 3, 3); + n("(?W:\\b)", "ã“"); + x2("(?-W:\\b)", "h", 1, 1); + x2("(?W:\\b)", "h", 1, 1); + n("(?-W:\\B)", "ã“"); + x2("(?W:\\B)", "ã“", 3, 3); + n("(?-W:\\B)", "h"); + n("(?W:\\B)", "h"); + x2("(?-P:\\b)", "ã“", 3, 3); + n("(?P:\\b)", "ã“"); + x2("(?-P:\\b)", "h", 1, 1); + x2("(?P:\\b)", "h", 1, 1); + n("(?-P:\\B)", "ã“"); + x2("(?P:\\B)", "ã“", 3, 3); + n("(?-P:\\B)", "h"); + n("(?P:\\B)", "h"); + + x2("\\p{InBasicLatin}", "\x41", 0, 1); + //x2("\\p{Grapheme_Cluster_Break_Regional_Indicator}", "\xF0\x9F\x87\xA9", 0, 4); + //n("\\p{Grapheme_Cluster_Break_Regional_Indicator}", "\xF0\x9F\x87\xA5"); + + // extended grapheme cluster + + // CR + LF + n(".\\y\\O", "\x0d\x0a"); + x2(".\\Y\\O", "\x0d\x0a", 0, 2); + + // LATIN SMALL LETTER G, COMBINING DIAERESIS + n("^.\\y.$", "\x67\xCC\x88"); + x2(".\\Y.", "\x67\xCC\x88", 0, 3); + x2("\\y.\\Y.\\y", "\x67\xCC\x88", 0, 3); + // HANGUL SYLLABLE GAG + x2("\\y.\\y", "\xEA\xB0\x81", 0, 3); + // HANGUL CHOSEONG KIYEOK, HANGUL JUNGSEONG A, HANGUL JONGSEONG KIYEOK + x2("^.\\Y.\\Y.$", "\xE1\x84\x80\xE1\x85\xA1\xE1\x86\xA8", 0, 9); + n("^.\\y.\\Y.$", "\xE1\x84\x80\xE1\x85\xA1\xE1\x86\xA8"); + // TAMIL LETTER NA, TAMIL VOWEL SIGN I, + x2(".\\Y.", "\xE0\xAE\xA8\xE0\xAE\xBF", 0, 6); + n(".\\y.", "\xE0\xAE\xA8\xE0\xAE\xBF"); + // THAI CHARACTER KO KAI, THAI CHARACTER SARA AM + x2(".\\Y.", "\xE0\xB8\x81\xE0\xB8\xB3", 0, 6); + n(".\\y.", "\xE0\xB8\x81\xE0\xB8\xB3"); + // DEVANAGARI LETTER SSA, DEVANAGARI VOWEL SIGN I + x2(".\\Y.", "\xE0\xA4\xB7\xE0\xA4\xBF", 0, 6); + n(".\\y.", "\xE0\xA4\xB7\xE0\xA4\xBF"); + + // {Extended_Pictographic} Extend* ZWJ x {Extended_Pictographic} + x2("..\\Y.", "\xE3\x80\xB0\xE2\x80\x8D\xE2\xAD\x95", 0, 9); + x2("...\\Y.", "\xE3\x80\xB0\xCC\x82\xE2\x80\x8D\xE2\xAD\x95", 0, 11); + n("...\\Y.", "\xE3\x80\xB0\xCD\xB0\xE2\x80\x8D\xE2\xAD\x95"); + + // CR + LF + n("^\\X\\X$", "\x0d\x0a"); + x2("^\\X$", "\x0d\x0a", 0, 2); + // LATIN SMALL LETTER G, COMBINING DIAERESIS + n("^\\X\\X.$", "\x67\xCC\x88"); + x2("^\\X$", "\x67\xCC\x88", 0, 3); + // HANGUL CHOSEONG KIYEOK, HANGUL JUNGSEONG A, HANGUL JONGSEONG KIYEOK + x2("^\\X$", "\xE1\x84\x80\xE1\x85\xA1\xE1\x86\xA8", 0, 9); + n("^\\X\\X\\X$", "\xE1\x84\x80\xE1\x85\xA1\xE1\x86\xA8"); + // TAMIL LETTER NA, TAMIL VOWEL SIGN I, + x2("^\\X$", "\xE0\xAE\xA8\xE0\xAE\xBF", 0, 6); + n("\\X\\X", "\xE0\xAE\xA8\xE0\xAE\xBF"); + // THAI CHARACTER KO KAI, THAI CHARACTER SARA AM + x2("^\\X$", "\xE0\xB8\x81\xE0\xB8\xB3", 0, 6); + n("\\X\\X", "\xE0\xB8\x81\xE0\xB8\xB3"); + // DEVANAGARI LETTER SSA, DEVANAGARI VOWEL SIGN I + x2("^\\X$", "\xE0\xA4\xB7\xE0\xA4\xBF", 0, 6); + n("\\X\\X", "\xE0\xA4\xB7\xE0\xA4\xBF"); + + n("^\\X.$", "\xE0\xAE\xA8\xE0\xAE\xBF"); + + // a + COMBINING GRAVE ACCENT (U+0300) + x2("h\\Xllo", "ha\xCC\x80llo", 0, 7); + + // Text Segment: Extended Grapheme Cluster <-> Word Boundary + x2("(?y{g})\\yabc\\y", "abc", 0, 3); + x2("(?y{g})\\y\\X\\y", "abc", 2, 3); + x2("(?y{w})\\yabc\\y", "abc", 0, 3); // WB1, WB2 + x2("(?y{w})\\y\\X", "\r\n", 0, 2); // WB3 + x2("(?y{w})\\X", "\x0cz", 1, 2); // WB3a + x2("(?y{w})\\X", "q\x0c", 1, 2); // WB3b + x2("(?y{w})\\y\\X", "\xE2\x80\x8D\xE2\x9D\x87", 0, 6); // WB3c + x2("(?y{w})\\y\\X", "\x20\x20", 0, 2); // WB3d + x2("(?y{w})\\y\\X", "a\xE2\x80\x8D", 0, 4); // WB4 + x2("(?y{w})\\y\\X\\y", "abc", 0, 3); // WB5 + x2("(?y{w})\\y\\X\\y", "v\xCE\x87w", 0, 4); // WB6, WB7 + x2("(?y{w})\\y\\X\\y", "\xD7\x93\x27", 0, 3); // WB7a + x2("(?y{w})\\y\\X\\y", "\xD7\x93\x22\xD7\x93", 0, 5); // WB7b, WB7c + x2("(?y{w})\\y\\X", "14 45", 3, 5); // WB8 + x2("(?y{w})\\y\\X", "a14", 0, 3); // WB9 + x2("(?y{w})\\y\\X", "832e", 0, 4); // WB10 + x2("(?y{w})\\y\\X", "8\xEF\xBC\x8C\xDB\xB0", 0, 6); // WB11, WB12 + x2("(?y{w})\\y\\X\\y", "ケン", 0, 6); // WB13 + x2("(?y{w})\\y\\X\\y", "ケン\xE2\x80\xAFã‚¿", 0, 12); // WB13a, WB13b + x2("(?y{w})\\y\\X\\y", "\x21\x23", 1, 2); // WB999 + x2("(?y{w})\\y\\X\\y", "山ア", 3, 6); + x2("(?y{w})\\y\\X", "3.14", 0, 4); + x2("(?y{w})\\y\\X", "3 14", 2, 4); + + x2("\\x40", "@", 0, 1); + x2("\\x1", "\x01", 0, 1); + x2("\\x{1}", "\x01", 0, 1); + x2("\\x{4E38}", "\xE4\xB8\xB8", 0, 3); + x2("\\u4E38", "\xE4\xB8\xB8", 0, 3); + x2("\\u0040", "@", 0, 1); + + x2("c.*\\b", "abc", 2, 3); + x2("\\b.*abc.*\\b", "abc", 0, 3); + x2("((?()0+)+++(((0\\g<0>)0)|())++++((?(1)(0\\g<0>))++++++0*())++++((?(1)(0\\g<1>)+)++++++++++*())++++((?(1)((0)\\g<0>)+)++())+0++*+++(((0\\g<0>))*())++++((?(1)(0\\g<0>)+)++++++++++*|)++++*+++((?(1)((0)\\g<0>)+)+++++++++())++*|)++++((?()0))|", "abcde", 5, 5); // #139 + + n("(*FAIL)", "abcdefg"); + n("abcd(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)", "abcdefg"); + x2("(?:[ab]|(*MAX{2}).)*", "abcbaaccaaa", 11, 11); + x2("(?:(*COUNT[AB]{X})[ab]|(*COUNT[CD]{X})[cd])*(*CMP{AB,<,CD})", + "abababcdab", 7, 8); + x2("(?(?{....})123|456)", "123", 0, 3); + x2("(?(*FAIL)123|456)", "456", 0, 3); + + x2("\\g'0'++{,0}", "abcdefgh", 8, 8); + x2("\\g'0'++{,0}?", "abcdefgh", 8, 8); + x2("\\g'0'++{,0}b", "abcdefgh", 1, 2); + x2("\\g'0'++{,0}?def", "abcdefgh", 3, 6); + x2("a{1,3}?", "aaa", 2, 3); + x2("a{3}", "aaa", 0, 3); + x2("a{3}?", "aaa", 3, 3); + x2("a{3}?", "aa", 2, 2); + x2("a{3,3}?", "aaa", 0, 3); + n("a{3,3}?", "aa"); + x2("a{1,3}+", "aaaaaa", 5, 6); + x2("a{3}+", "aaaaaa", 3, 6); + x2("a{3,3}+", "aaaaaa", 3, 6); + n("a{2,3}?", "a"); + n("a{3,2}a", "aaa"); + x2("a{3,2}b", "aaab", 1, 4); + x2("a{3,2}b", "aaaab", 2, 5); + x2("a{3,2}b", "aab", 0, 3); + x2("a{3,2}?", "", 0, 0); /* == (?:a{3,2})?*/ + x2("a{2,3}+a", "aaa", 0, 3); /* == (?:a{2,3})+*/ + x2("[\\x{0}-\\x{7fffffff}]", "a", 0, 1); + x2("[\\x{7f}-\\x{7fffffff}]", "\xe5\xae\xb6", 0, 3); + x2("[a[cdef]]", "a", 0, 1); + n("[a[xyz]-c]", "b"); + x2("[a[xyz]-c]", "a", 0, 1); + x2("[a[xyz]-c]", "-", 0, 1); + x2("[a[xyz]-c]", "c", 0, 1); + x2("(a.c|def)(.{4})(?<=\\1)", "abcdabc", 0, 7); + x2("(a.c|de)(.{4})(?<=\\1)", "abcdabc", 0, 7); + x2("(a.c|def)(.{5})(?<=d\\1e)", "abcdabce", 0, 8); + x2("(a.c|.)d(?<=\\k<1>d)", "zzzzzabcdabc", 7, 9); + x2("(?<=az*)abc", "azzzzzzzzzzabcdabcabc", 11, 14); + x2("(?<=ab|abc|abcd)ef", "abcdef", 4, 6); + x2("(?<=ta+|tb+|tc+|td+)zz", "tcccccccccczz", 11, 13); + x2("(?<=t.{7}|t.{5}|t.{2}|t.)zz", "tczz", 2, 4); + x2("(?<=t.{7}|t.{5}|t.{2})zz", "tczzzz", 3, 5); + x2("(?<=t.{7}|t.{5}|t.{3})zz", "tczzazzbzz", 8, 10); + n("(?<=t.{7}|t.{5}|t.{3})zz", "tczzazzbczz"); + x2("(?<=(ab|abc|abcd))ef", "abcdef", 4, 6); + x2("(?<=(ta+|tb+|tc+|td+))zz", "tcccccccccczz", 11, 13); + x2("(?<=(t.{7}|t.{5}|t.{2}|t.))zz", "tczz", 2, 4); + x2("(?<=(t.{7}|t.{5}|t.{2}))zz", "tczzzz", 3, 5); + x2("(?<=(t.{7}|t.{5}|t.{3}))zz", "tczzazzbzz", 8, 10); + n("(?<=(t.{7}|t.{5}|t.{3}))zz", "tczzazzbczz"); + x2("(.{1,4})(.{1,4})(?<=\\2\\1)", "abaaba", 2, 4); + x2("(.{1,4})(.{1,4})(?<=\\2\\1)", "ababab", 2, 6); + n("(.{1,4})(.{1,4})(?<=\\2\\1)", "abcdabce"); + x2("(.{1,4})(.{1,4})(?<=\\2\\1)", "abcdabceabce", 4, 12); + x2("(?<=a)", "a", 1, 1); + x2("(?<=a.*\\w)z", "abbbz", 4, 5); + n("(?<=a.*\\w)z", "abb z"); + x2("(?<=a.*\\W)z", "abb z", 4, 5); + x2("(?<=a.*\\b)z", "abb z", 4, 5); + x2("(?<=(?>abc))", "abc", 3, 3); + x2("(?<=a\\Xz)", "abz", 3, 3); + n("(?<=^a*)bc", "zabc"); + n("(?<=a*\\b)b", "abc"); + x2("(?<=a+.*[efg])z", "abcdfz", 5, 6); + x2("(?<=a+.*[efg])z", "abcdfgz", 6, 7); + n("(?<=a+.*[efg])z", "bcdfz"); + x2("(?<=a*.*[efg])z", "bcdfz", 4, 5); + n("(?<=a+.*[efg])z", "abcdz"); + x2("(?<=v|t|a+.*[efg])z", "abcdfz", 5, 6); + x2("(?<=v|t|^a+.*[efg])z", "abcdfz", 5, 6); + x2("(?<=^(?:v|t|a+.*[efg]))z", "abcdfz", 5, 6); + x2("(?<=v|^t|a+.*[efg])z", "uabcdfz", 6, 7); + n("^..(?<=(a{,2}))\\1z", "aaaaz"); // !!! look-behind is shortest priority + x2("^..(?<=(a{,2}))\\1z", "aaz", 0, 3); // shortest priority + e("(?<=(?~|zoo)a.*z)", "abcdefz", ONIGERR_INVALID_LOOK_BEHIND_PATTERN); + e("(?<=(?~|)a.*z)", "abcdefz", ONIGERR_INVALID_LOOK_BEHIND_PATTERN); + e("(a(?~|boo)z){0}(?<=\\g<1>)", "abcdefz", ONIGERR_INVALID_LOOK_BEHIND_PATTERN); + x2("(?<=(?<= )| )", "abcde fg", 6, 6); // #173 + x2("(?<=D|)(?<=@!nnnnnnnnnIIIIn;{1}D?()|;{1}x)", "(?<=D|)(?<=@!nnnnnnnnnIIIIn;{1}D?()|;{1}x)", 55, 55); // #173 + x2("(?<=;()|)\\g<1>", "", 0, 0); // reduced #173 + x2("(?<=;()|)\\k<1>", ";", 1, 1); + x2("(())\\g<3>{0}(?<=|())", "abc", 3, 3); // #175 + x2("(?<=()|)\\1{0}", "abc", 3, 3); + e("(?|b))", "aab", 2, 3); + x2("((?(a)\\g<1>))", "aab", 3, 3); + x2("(b(?(a)|\\g<1>))", "bba", 1, 3); + e("(()(?(2)\\g<1>))", "", ONIGERR_NEVER_ENDING_RECURSION); + x2("(?(a)(?:b|c))", "ac", 2, 2); + n("^(?(a)b|c)", "ac"); + x2("(?i)a|b", "B", 0, 1); + n("((?i)a|b.)|c", "C"); + n("c(?i)a.|b.", "Caz"); + x2("c(?i)a|b", "cB", 0, 2); /* == c(?i:a|b) */ + x2("c(?i)a.|b.", "cBb", 0, 3); + + x2("(?i)st", "st", 0, 2); + x2("(?i)st", "St", 0, 2); + x2("(?i)st", "sT", 0, 2); + x2("(?i)st", "\xC5\xBFt", 0, 3); // U+017F + x2("(?i)st", "\xEF\xAC\x85", 0, 3); // U+FB05 + x2("(?i)st", "\xEF\xAC\x86", 0, 3); // U+FB06 + x2("(?i)ast", "Ast", 0, 3); + x2("(?i)ast", "ASt", 0, 3); + x2("(?i)ast", "AsT", 0, 3); + x2("(?i)ast", "A\xC5\xBFt", 0, 4); // U+017F + x2("(?i)ast", "A\xEF\xAC\x85", 0, 4); // U+FB05 + x2("(?i)ast", "A\xEF\xAC\x86", 0, 4); // U+FB06 + x2("(?i)stZ", "stz", 0, 3); + x2("(?i)stZ", "Stz", 0, 3); + x2("(?i)stZ", "sTz", 0, 3); + x2("(?i)stZ", "\xC5\xBFtz", 0, 4); // U+017F + x2("(?i)stZ", "\xEF\xAC\x85z", 0, 4); // U+FB05 + x2("(?i)stZ", "\xEF\xAC\x86z", 0, 4); // U+FB06 + x2("(?i)BstZ", "bstz", 0, 4); + x2("(?i)BstZ", "bStz", 0, 4); + x2("(?i)BstZ", "bsTz", 0, 4); + x2("(?i)BstZ", "b\xC5\xBFtz", 0, 5); // U+017F + x2("(?i)BstZ", "b\xEF\xAC\x85z", 0, 5); // U+FB05 + x2("(?i)BstZ", "b\xEF\xAC\x86z", 0, 5); // U+FB06 + x2("(?i).*st\\z", "tttssss\xC5\xBFt", 7, 10); // U+017F + x2("(?i).*st\\z", "tttssss\xEF\xAC\x85", 7, 10); // U+FB05 + x2("(?i).*st\\z", "tttssss\xEF\xAC\x86", 7, 10); // U+FB06 + x2("(?i).*ã‚stã„\\z", "tttssssã‚\xC5\xBFtã„", 7, 16); // U+017F + x2("(?i).*ã‚stã„\\z", "tttssssã‚\xEF\xAC\x85ã„", 7, 16); // U+FB05 + x2("(?i).*ã‚stã„\\z", "tttssssã‚\xEF\xAC\x86ã„", 7, 16); // U+FB06 + x2("(?i).*\xC5\xBFt\\z", "tttssssst", 7, 9); // U+017F + x2("(?i).*\xEF\xAC\x85\\z", "tttssssã‚st", 10, 12); // U+FB05 + x2("(?i).*\xEF\xAC\x86ã„\\z", "tttssssstã„", 7, 12); // U+FB06 + x2("(?i).*\xEF\xAC\x85\\z", "tttssssã‚\xEF\xAC\x85", 10, 13); + + x2("(?i).*ss", "abcdefghijklmnopqrstuvwxyz\xc3\x9f", 26, 28); // U+00DF + x2("(?i).*ss.*", "abcdefghijklmnopqrstuvwxyz\xc3\x9fxyz", 26, 31); // U+00DF + x2("(?i).*\xc3\x9f", "abcdefghijklmnopqrstuvwxyzss", 26, 28); // U+00DF + x2("(?i).*ss.*", "abcdefghijklmnopqrstuvwxyzSSxyz", 26, 31); + + x2("(?i)ssv", "\xc3\x9fv", 0, 3); // U+00DF + x2("(?i)(?<=ss)v", "SSv", 2, 3); + x2("(?i)(?<=\xc3\x9f)v", "\xc3\x9fv", 2, 3); + //x2("(?i)(?<=\xc3\x9f)v", "ssv", 2, 3); + //x2("(?i)(?<=ss)v", "\xc3\x9fv", 2, 3); + + /* #156 U+01F0 (UTF-8: C7 B0) */ + x2("(?i).+Isssǰ", ".+Isssǰ", 1, 8); + x2(".+Isssǰ", ".+Isssǰ", 1, 8); + x2("(?i)ǰ", "ǰ", 0, 2); + x2("(?i)ǰ", "j\xcc\x8c", 0, 3); + x2("(?i)j\xcc\x8c", "ǰ", 0, 2); + x2("(?i)5ǰ", "5ǰ", 0, 3); + x2("(?i)5ǰ", "5j\xcc\x8c", 0, 4); + x2("(?i)5j\xcc\x8c", "5ǰ", 0, 3); + x2("(?i)ǰv", "ǰV", 0, 3); + x2("(?i)ǰv", "j\xcc\x8cV", 0, 4); + x2("(?i)j\xcc\x8cv", "ǰV", 0, 3); + x2("(?i)[ǰ]", "ǰ", 0, 2); + x2("(?i)[ǰ]", "j\xcc\x8c", 0, 3); + //x2("(?i)[j]\xcc\x8c", "ǰ", 0, 2); + x2("(?i)\ufb00a", "ffa", 0, 3); + x2("(?i)ffz", "\xef\xac\x80z", 0, 4); + x2("(?i)\u2126", "\xcf\x89", 0, 2); + x2("a(?i)\u2126", "a\xcf\x89", 0, 3); + x2("(?i)A\u2126", "a\xcf\x89", 0, 3); + x2("(?i)A\u2126=", "a\xcf\x89=", 0, 4); + x2("(?i:ss)=1234567890", "\xc5\xbf\xc5\xbf=1234567890", 0, 15); + + n("a(b|)+d", "abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcd"); /* https://www.haijin-boys.com/discussions/5079 */ + n(" \xfd", ""); /* https://bugs.php.net/bug.php?id=77370 */ + /* can't use \xfc00.. because compiler error: hex escape sequence out of range */ + n("()0\\xfc00000\\xfc00000\\xfc00000\xfc", ""); /* https://bugs.php.net/bug.php?id=77371 */ + x2("000||0\xfa", "0", 1, 1); + e("(?i)000000000000000000000\xf0", "", ONIGERR_INVALID_CODE_POINT_VALUE); /* https://bugs.php.net/bug.php?id=77382 */ + n("0000\\\xf5", "0"); /* https://bugs.php.net/bug.php?id=77385 */ + n("(?i)FFF00000000000000000\xfd", ""); /* https://bugs.php.net/bug.php?id=77394 */ + e("x{55380}{77590}", "", ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE); + e("(xyz){40000}{99999}(?vv)", "", ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE); + e("f{90000,90000}{80000,80000}", "", ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE); + n("f{90000,90000}{80000,80001}", ""); + + x2("\\p{Common}", "\xe3\x8b\xbf", 0, 3); /* U+32FF */ + x2("\\p{In_Enclosed_CJK_Letters_and_Months}", "\xe3\x8b\xbf", 0, 3); /* U+32FF */ + + e("\\x{7fffffff}", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("[\\x{7fffffff}]", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("\\u040", "@", ONIGERR_INVALID_CODE_POINT_VALUE); + e("(?\\g)", "zzzz", ONIGERR_NEVER_ENDING_RECURSION); + e("(*FOO)", "abcdefg", ONIGERR_UNDEFINED_CALLOUT_NAME); + e("*", "abc", ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED); + e("|*", "abc", ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED); + e("(?i)*", "abc", ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED); + e("(?:*)", "abc", ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED); + e("(?m:*)", "abc", ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED); + x2("(?:)*", "abc", 3, 3); + e("^*", "abc", ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID); + + fprintf(stdout, + "\nRESULT SUCC: %4d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n", + nsucc, nfail, nerror, onig_version()); + + onig_region_free(region, 1); + onig_end(); + + return ((nfail == 0 && nerror == 0) ? 0 : -1); +} diff --git a/internal/components/third_party/oniguruma/test/test_options.c b/internal/components/third_party/oniguruma/test/test_options.c new file mode 100644 index 0000000000..9aa2538d59 --- /dev/null +++ b/internal/components/third_party/oniguruma/test/test_options.c @@ -0,0 +1,228 @@ +/* + * test_options.c + * Copyright (c) 2020-2024 K.Kosako + */ +#ifdef ONIG_ESCAPE_UCHAR_COLLISION +#undef ONIG_ESCAPE_UCHAR_COLLISION +#endif +#include + +#include "oniguruma.h" + +#include + +#define SLEN(s) strlen(s) + +static int nsucc = 0; +static int nfail = 0; +static int nerror = 0; + +#ifdef __TRUSTINSOFT_ANALYZER__ +static int nall = 0; +#endif + +static FILE* err_file; + +static OnigRegion* region; + +static void xx(OnigOptionType options, char* pattern, char* str, + int from, int to, int mem, int not, int error_no, int line_no) +{ +#ifdef __TRUSTINSOFT_ANALYZER__ + if (nall++ % TIS_TEST_CHOOSE_MAX != TIS_TEST_CHOOSE_CURRENT) return; +#endif + + int r; + regex_t* reg; + OnigErrorInfo einfo; + + r = onig_new(®, (UChar* )pattern, (UChar* )(pattern + SLEN(pattern)), + options, ONIG_ENCODING_UTF8, ONIG_SYNTAX_DEFAULT, &einfo); + if (r) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + + if (error_no == 0) { + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(err_file, "ERROR: %s /%s/ #%d\n", s, pattern, line_no); + nerror++; + } + else { + if (r == error_no) { + fprintf(stdout, "OK(ERROR): /%s/ %d #%d\n", pattern, r, line_no); + nsucc++; + } + else { + fprintf(stdout, "FAIL(ERROR): /%s/ '%s', %d, %d #%d\n", pattern, str, + error_no, r, line_no); + nfail++; + } + } + + return ; + } + + r = onig_search(reg, (UChar* )str, (UChar* )(str + SLEN(str)), + (UChar* )str, (UChar* )(str + SLEN(str)), + region, options); + if (r < ONIG_MISMATCH || error_no < ONIG_MISMATCH) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + + if (error_no == 0) { + onig_error_code_to_str((UChar* )s, r); + fprintf(err_file, "ERROR: %s /%s/ #%d\n", s, pattern, line_no); + nerror++; + } + else { + if (r == error_no) { + fprintf(stdout, "OK(ERROR): /%s/ '%s', %d #%d\n", + pattern, str, r, line_no); + nsucc++; + } + else { + fprintf(stdout, "FAIL ERROR NO: /%s/ '%s', %d, %d #%d\n", + pattern, str, error_no, r, line_no); + nfail++; + } + } + + return ; + } + + if (r == ONIG_MISMATCH) { + if (not) { + fprintf(stdout, "OK(N): /%s/ '%s' #%d\n", pattern, str, line_no); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s' #%d\n", pattern, str, line_no); + nfail++; + } + } + else { + if (not) { + fprintf(stdout, "FAIL(N): /%s/ '%s' #%d\n", pattern, str, line_no); + nfail++; + } + else { + if (region->beg[mem] == from && region->end[mem] == to) { + fprintf(stdout, "OK: /%s/ '%s' #%d\n", pattern, str, line_no); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d #%d\n", pattern, str, + from, to, region->beg[mem], region->end[mem], line_no); + nfail++; + } + } + } + onig_free(reg); +} + +static void xx2(OnigOptionType options, char* pattern, char* str, + int from, int to, int line_no) +{ + xx(options, pattern, str, from, to, 0, 0, 0, line_no); +} + +static void xx3(OnigOptionType options, char* pattern, char* str, + int from, int to, int mem, int line_no) +{ + xx(options, pattern, str, from, to, mem, 0, 0, line_no); +} + +static void xn(OnigOptionType options, char* pattern, char* str, int line_no) +{ + xx(options, pattern, str, 0, 0, 0, 1, 0, line_no); +} + +#if 0 +static void xe(OnigOptionType options, char* pattern, char* str, + int error_no, int line_no) +{ + xx(options, pattern, str, 0, 0, 0, 0, error_no, line_no); +} +#endif + +#define x2(o,p,s,f,t) xx2(o,p,s,f,t, __LINE__) +#define x3(o,p,s,f,t,m) xx3(o,p,s,f,t,m, __LINE__) +#define n(o,p,s) xn(o,p,s, __LINE__) +#define e(o,p,s,en) xe(o,p,s,en, __LINE__) + +#define OIA (ONIG_OPTION_IGNORECASE | ONIG_OPTION_IGNORECASE_IS_ASCII) + +extern int main(int argc, char* argv[]) +{ + OnigEncoding use_encs[1]; + + use_encs[0] = ONIG_ENCODING_UTF8; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + + err_file = stdout; + + region = onig_region_new(); + + x2(ONIG_OPTION_IGNORECASE, "a", "A", 0, 1); + n(ONIG_OPTION_IGNORECASE_IS_ASCII, "a", "A"); + /* KELVIN SIGN */ + x2(ONIG_OPTION_IGNORECASE, "\xe2\x84\xaa", "k", 0, 1); + x2(ONIG_OPTION_IGNORECASE, "k", "\xe2\x84\xaa", 0, 3); + n(OIA, "\xe2\x84\xaa", "k"); + n(OIA, "k", "\xe2\x84\xaa"); + x2(OIA, "a", "a", 0, 1); + x2(OIA, "A", "A", 0, 1); + x2(OIA, "a", "A", 0, 1); + x2(OIA, "A", "a", 0, 1); + x2(OIA, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz", 0, 26); + x2(OIA, "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 0, 26); + x2(OIA, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "ABCabcdefghijklmnopqrstuvwxyz", 3, 29); + x2(OIA, "abcdefghijklmnopqrstuvwxyz", "abcABCDEFGHIJKLMNOPQRSTUVWXYZ", 3, 29); + x3(OIA, "#%(a!;)(b&)", "#%A!;B&", 5, 7, 2); + + x2(ONIG_OPTION_IGNORECASE, "ss", "\xc3\x9f", 0, 2); + x2(ONIG_OPTION_IGNORECASE, "\xc3\x9f", "SS", 0, 2); + n(OIA, "ss", "\xc3\x9f"); + n(OIA, "\xc3\x9f", "ss"); + x2(OIA, "ss", "SS", 0, 2); + x2(OIA, "Ss", "sS", 0, 2); + + n(ONIG_OPTION_NOTBOL, "^ab", "ab"); + n(ONIG_OPTION_NOTBOL, "\\Aab", "ab"); + n(ONIG_OPTION_NOTEOL, "ab$", "ab"); + n(ONIG_OPTION_NOTEOL, "ab\\z", "ab"); + n(ONIG_OPTION_NOTEOL, "ab\\Z", "ab"); + n(ONIG_OPTION_NOTEOL, "ab\\Z", "ab\n"); + + n(ONIG_OPTION_NOT_BEGIN_STRING, "\\Aab", "ab"); + n(ONIG_OPTION_NOT_END_STRING, "ab\\z", "ab"); + n(ONIG_OPTION_NOT_END_STRING, "ab\\Z", "ab"); + n(ONIG_OPTION_NOT_END_STRING, "ab\\Z", "ab\n"); + + x2(ONIG_OPTION_NONE, "a|abc", "abc", 0, 1); + x2(ONIG_OPTION_NONE, "(a|abc)\\Z", "abc", 0, 3); + x2(ONIG_OPTION_MATCH_WHOLE_STRING, "a|abc", "abc", 0, 3); + x2(ONIG_OPTION_MATCH_WHOLE_STRING, "a|abc", "a", 0, 1); + + x2(ONIG_OPTION_WORD_IS_ASCII, "\\w", "@g", 1, 2); + n(ONIG_OPTION_WORD_IS_ASCII, "\\w", "ã‚"); + x2(ONIG_OPTION_NONE, "\\d", "1", 0, 3); + n(ONIG_OPTION_DIGIT_IS_ASCII, "\\d", "1"); + x2(ONIG_OPTION_SPACE_IS_ASCII, "\\s", " ", 0, 1); + x2(ONIG_OPTION_NONE, "\\s", " ", 0, 3); + n(ONIG_OPTION_SPACE_IS_ASCII, "\\s", " "); + + x2(ONIG_OPTION_POSIX_IS_ASCII, "\\w\\d\\s", "c3 ", 0, 3); + n(ONIG_OPTION_POSIX_IS_ASCII, "\\w|\\d|\\s", "ã‚4 "); + + x2(ONIG_OPTION_EXTEND, " abc \n def", "abcdef", 0, 6); + x2(ONIG_OPTION_FIND_LONGEST, "\\w+", "abc defg hij", 4, 8); + x2(ONIG_OPTION_FIND_NOT_EMPTY, "\\w*", "@@@ abc defg hij", 4, 7); + + + fprintf(stdout, + "\nRESULT SUCC: %4d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n", + nsucc, nfail, nerror, onig_version()); + + onig_region_free(region, 1); + onig_end(); + return ((nfail == 0 && nerror == 0) ? 0 : -1); +} diff --git a/internal/components/third_party/oniguruma/test/test_regset.c b/internal/components/third_party/oniguruma/test/test_regset.c new file mode 100644 index 0000000000..7476ec4572 --- /dev/null +++ b/internal/components/third_party/oniguruma/test/test_regset.c @@ -0,0 +1,466 @@ +/* + * test_regset.c --- test for regset API + * Copyright (c) 2019 K.Kosako + */ +#include +#include +#include +#include + +#include "oniguruma.h" + +static int nsucc = 0; +static int nfail = 0; +static int nerror = 0; + + +static int +make_regset(int line_no, int n, char* pat[], OnigRegSet** rset, int error_no) +{ + int r; + int i; + OnigRegSet* set; + regex_t* reg; + OnigErrorInfo einfo; + + *rset = NULL; + r = onig_regset_new(&set, 0, NULL); + if (r != 0) return r; + + for (i = 0; i < n; i++) { + r = onig_new(®, (UChar* )pat[i], (UChar* )(pat[i] + strlen(pat[i])), + ONIG_OPTION_DEFAULT, ONIG_ENCODING_UTF8, ONIG_SYNTAX_DEFAULT, + &einfo); + if (r != 0) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + + if (error_no == 0) { + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(stderr, "ERROR: %d: %s /%s/\n", line_no, s, pat[i]); + nerror++; + } + else { + if (r == error_no) { + fprintf(stdout, "OK(ERROR): %d: /%s/ %d\n", line_no, pat[i], r); + nsucc++; + } + else { + fprintf(stdout, "FAIL(ERROR): %d: /%s/ %d, %d\n", + line_no, pat[i], error_no, r); + nfail++; + } + } + onig_regset_free(set); + return r; + } + + r = onig_regset_add(set, reg); + if (r != 0) { + onig_regset_free(set); + fprintf(stderr, "ERROR: %d: onig_regset_add(): /%s/\n", line_no, pat[i]); + nerror++; + return r; + } + } + + *rset = set; + return 0; +} + +static double +get_sec(clock_t start, clock_t end) +{ + double t; + + t = (double )(end - start) / CLOCKS_PER_SEC; + return t; +} + +/* use clock(), because clock_gettime() doesn't exist in Windows and old Unix. */ + +static int +time_test(int repeat, int n, char* ps[], char* s, char* end, double* rt_set, double* rt_reg) +{ + int r; + int i; + int match_pos; + OnigRegSet* set; + clock_t ts1, ts2; + double t_set, t_reg; + + r = make_regset(0, n, ps, &set, 0); + if (r != 0) return r; + + ts1 = clock(); + for (i = 0; i < repeat; i++) { + r = onig_regset_search(set, (UChar* )s, (UChar* )end, (UChar* )s, (UChar* )end, + ONIG_REGSET_POSITION_LEAD, ONIG_OPTION_NONE, &match_pos); + if (r < 0) { + fprintf(stderr, "FAIL onig_regset_search(POSITION_LEAD): %d\n", r); + onig_regset_free(set); + return r; + } + } + + ts2 = clock(); + t_set = get_sec(ts1, ts2); + + ts1 = clock(); + for (i = 0; i < repeat; i++) { + r = onig_regset_search(set, (UChar* )s, (UChar* )end, (UChar* )s, (UChar* )end, + ONIG_REGSET_REGEX_LEAD, ONIG_OPTION_NONE, &match_pos); + if (r < 0) { + fprintf(stderr, "FAIL onig_regset_search(REGEX_LEAD): %d\n", r); + onig_regset_free(set); + return r; + } + } + + ts2 = clock(); + t_reg = get_sec(ts1, ts2); + + onig_regset_free(set); + + *rt_set = t_set; + *rt_reg = t_reg; + return 0; +} + +static void +fisher_yates_shuffle(int n, char* ps[], char* cps[]) +{ +#define GET_RAND(n) (rand()%(n+1)) +#define SWAP(a,b) { char* tmp = a; a = b; b = tmp; } + + int i; + + for (i = 0; i < n; i++) + cps[i] = ps[i]; + + for (i = n - 1; i > 0; i--) { + int x = GET_RAND(i); + SWAP(cps[i], cps[x]); + } +} + +static void +time_compare(int n, char* ps[], char* s, char* end) +{ + int r; + int i; + int repeat; + double t_set, t_reg; + double total_set, total_reg; + char** cps; + + cps = (char** )malloc(sizeof(char*) * n); + if (cps == 0) return ; + + repeat = 100 / n; + total_set = total_reg = 0.0; + for (i = 0; i < n; i++) { + fisher_yates_shuffle(n, ps, cps); + r = time_test(repeat, n, cps, s, end, &t_set, &t_reg); + if (r != 0) { + free(cps); + return ; + } + total_set += t_set; + total_reg += t_reg; + } + + free(cps); + + fprintf(stdout, "POS lead: %6.2lfmsec. REG lead: %6.2lfmsec.\n", + total_set * 1000.0, total_reg * 1000.0); +} + + +static OnigRegSetLead XX_LEAD = ONIG_REGSET_POSITION_LEAD; + +static void +xx(int line_no, int n, char* ps[], char* s, int from, int to, int mem, int not, int error_no) +{ + int r; + int match_pos; + int match_index; + OnigRegSet* set; + char *end; + + r = make_regset(line_no, n, ps, &set, error_no); + if (r != 0) return ; + + end = s + strlen(s); + + r = onig_regset_search(set, (UChar* )s, (UChar* )end, (UChar* )s, (UChar* )end, + XX_LEAD, ONIG_OPTION_NONE, &match_pos); + if (r < 0) { + if (r == ONIG_MISMATCH) { + if (not) { + fprintf(stdout, "OK(N): %d\n", line_no); + nsucc++; + } + else { + fprintf(stdout, "FAIL: %d\n", line_no); + nfail++; + } + } + else { + if (error_no == 0) { + char buf[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )buf, r); + fprintf(stderr, "ERROR: %d: %s\n", line_no, buf); + nerror++; + } + else { + if (r == error_no) { + fprintf(stdout, "OK(ERROR): %d: %d\n", line_no, r); + nsucc++; + } + else { + fprintf(stdout, "FAIL ERROR NO: %d: %d, %d\n", line_no, error_no, r); + nfail++; + } + } + } + } + else { + if (not) { + fprintf(stdout, "FAIL(N): %d\n", line_no); + nfail++; + } + else { + OnigRegion* region; + + match_index = r; + region = onig_regset_get_region(set, match_index); + if (region == 0) { + fprintf(stderr, "ERROR: %d: can't get region.\n", line_no); + nerror++; + onig_regset_free(set); + return ; + } + + if (region->beg[mem] == from && region->end[mem] == to) { + fprintf(stdout, "OK: %d\n", line_no); + nsucc++; + } + else { + char buf[1000]; + int len; + len = region->end[mem] - region->beg[mem]; + strncpy(buf, s + region->beg[mem], len); + buf[len] = '\0'; + fprintf(stdout, "FAIL: %d: %d-%d : %d-%d (%s)\n", line_no, + from, to, region->beg[mem], region->end[mem], buf); + nfail++; + } + } + } + + onig_regset_free(set); +} + +static void +x2(int line_no, int n, char* ps[], char* s, int from, int to) +{ + xx(line_no, n, ps, s, from, to, 0, 0, 0); +} + +static void +x3(int line_no, int n, char* ps[], char* s, int from, int to, int mem) +{ + xx(line_no, n, ps, s, from, to, mem, 0, 0); +} + +static void +n(int line_no, int n, char* ps[], char* s) +{ + xx(line_no, n, ps, s, 0, 0, 0, 1, 0); +} + +#define ASIZE(a) sizeof(a)/sizeof(a[0]) +#define X2(ps,s,from,to) x2(__LINE__,ASIZE(ps),ps,s,from,to) +#define X3(ps,s,from,to,mem) x3(__LINE__,ASIZE(ps),ps,s,from,to,mem) +#define N(ps,s) n(__LINE__,ASIZE(ps),ps,s) +#define NZERO(s) n(__LINE__,0,(char** )0,s) + +#ifndef _WIN32 + +/* getdelim() doesn't exist in Windows */ + +static int +get_all_content_of_file(char* path, char** rs, char** rend) +{ + ssize_t len; + size_t n; + char* line; + FILE* fp; + + fp = fopen(path, "r"); + if (fp == 0) return -1; + + n = 0; + line = NULL; + len = getdelim(&line, &n, EOF, fp); + fclose(fp); + if (len < 0) return -2; + + *rs = line; + *rend = line + len; + return 0; +} +#endif + + +#define TEXT_PATH "kofu-utf8.txt" + +/* --- To get kofu.txt --- + $ wget https://www.aozora.gr.jp/cards/000148/files/774_ruby_1640.zip + $ unzip 774_ruby_1640.zip + $ nkf -Lu -w8 kofu.txt > kofu-utf8.txt + (convert encoding to utf-8 with BOM and line terminator to be Unix-form) +*/ + +static char* p1[] = { + "abc", + "(bca)", + "(cab)" +}; + +static char* p2[] = { + "å°èª¬", + "9", + "å¤ç›®æ¼±çŸ³", +}; + +static char* p3[] = { + "^ã„る。", + "^æ ¡æ­£", + "^底本", + "^ 翌日", +}; + +static char* p4[] = { + "《[^》]{5}》", + "《[^》]{6}》", + "《[^》]{7}》", + "《[^》]{8}》", + "《[^》]{9}》", + "《[^》]{10}》", + "《[^》]{11}》", + "《[^》]{12}》", + "《[^》]{13}》", + "《[^》]{14}》", + "《[^》]{15}》", + "《[^》]{16}》", + "《[^》]{17}》", + "《[^》]{18}》", + "《[^》]{19}》", + "《[^》]{20}》", +}; + +static char* p5[] = { + "å°å®¤åœ­", + "bbbbbb", + "ドナルド・トランプ", + "筑摩書房", + "æ¾åŽŸ", + "aaaaaaaaa", + "bbbbbbbbb", + "ccccc", + "ddddddddddd", + "eee", + "ffffffffffff", + "gggggggggg", + "hhhhhhhhhhhhhh", + "iiiiiii", +}; + +static char* p6[] = { + "^.{1000,}", + "æ¾åŽŸ", + "å°å®¤åœ­", + "ドナルド・トランプ", + "筑摩書房", +}; + +static char* p7[] = { + "0+", "1+", "2+", "3+", "4+", "5+", "6+", "7+", "8+", "9+", +}; + +static char* p8[] = {"a", ".*"}; + +extern int +main(int argc, char* argv[]) +{ +#ifndef _WIN32 + int file_exist; +#endif + int r; + char *s, *end; + OnigEncoding use_encs[1]; + + use_encs[0] = ONIG_ENCODING_UTF8; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + + srand(12345); + + XX_LEAD = ONIG_REGSET_POSITION_LEAD; + + NZERO(" abab bccab ca"); + X2(p1, " abab bccab ca", 8, 11); + X3(p1, " abab bccab ca", 8, 11, 1); + N(p2, " XXXX AAA 1223 012345678bbb"); + X2(p2, "0123456789", 9, 10); + X2(p7, "abcde 555 qwert", 6, 9); + X2(p8, "", 0, 0); + + XX_LEAD = ONIG_REGSET_REGEX_LEAD; + + NZERO(" abab bccab ca"); + X2(p1, " abab bccab ca", 8, 11); + X3(p1, " abab bccab ca", 8, 11, 1); + N(p2, " XXXX AAA 1223 012345678bbb"); + X2(p2, "0123456789", 9, 10); + X2(p7, "abcde 555 qwert", 6, 9); + +#ifndef _WIN32 + r = get_all_content_of_file(TEXT_PATH, &s, &end); + if (r == 0) { + fprintf(stdout, "FILE: %s, size: %d\n", TEXT_PATH, (int )(end - s)); + file_exist = 1; + } + else { + fprintf(stdout, "Ignore %s\n", TEXT_PATH); + file_exist = 0; + } + + if (file_exist != 0) { + X2(p2, s, 10, 22); + X2(p3, s, 496079, 496088); + X2(p4, s, 1294, 1315); + } +#endif + + fprintf(stdout, + "\nRESULT SUCC: %4d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n", + nsucc, nfail, nerror, onig_version()); + +#ifndef _WIN32 + if (file_exist != 0) { + fprintf(stdout, "\n"); + time_compare(ASIZE(p2), p2, s, end); + time_compare(ASIZE(p3), p3, s, end); + time_compare(ASIZE(p4), p4, s, end); + time_compare(ASIZE(p5), p5, s, end); + time_compare(ASIZE(p6), p6, s, end); + fprintf(stdout, "\n"); + free(s); + } +#endif + + onig_end(); + + return ((nfail == 0 && nerror == 0) ? 0 : -1); +} diff --git a/internal/components/third_party/oniguruma/test/test_syntax.c b/internal/components/third_party/oniguruma/test/test_syntax.c new file mode 100644 index 0000000000..4dcecf8929 --- /dev/null +++ b/internal/components/third_party/oniguruma/test/test_syntax.c @@ -0,0 +1,417 @@ +/* + * test_syntax.c + * Copyright (c) 2019-2024 K.Kosako + */ +#ifdef ONIG_ESCAPE_UCHAR_COLLISION +#undef ONIG_ESCAPE_UCHAR_COLLISION +#endif + +#include +#include +#include "oniguruma.h" + +#define SLEN(s) strlen(s) + +static int nsucc = 0; +static int nfail = 0; +static int nerror = 0; + +#ifdef __TRUSTINSOFT_ANALYZER__ +static int nall = 0; +#endif + +static FILE* err_file; + +static OnigRegion* region; + +static OnigSyntaxType* Syntax; + +static void xx(char* pattern, char* str, int from, int to, int mem, int not, + int error_no) +{ +#ifdef __TRUSTINSOFT_ANALYZER__ + if (nall++ % TIS_TEST_CHOOSE_MAX != TIS_TEST_CHOOSE_CURRENT) return; +#endif + + int r; + regex_t* reg; + OnigErrorInfo einfo; + + r = onig_new(®, (UChar* )pattern, (UChar* )(pattern + SLEN(pattern)), + ONIG_OPTION_DEFAULT, ONIG_ENCODING_UTF8, Syntax, &einfo); + if (r) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + + if (error_no == 0) { + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(err_file, "ERROR: %s /%s/\n", s, pattern); + nerror++; + } + else { + if (r == error_no) { + fprintf(stdout, "OK(ERROR): /%s/ %d\n", pattern, r); + nsucc++; + } + else { + fprintf(stdout, "FAIL(ERROR): /%s/ '%s', %d, %d\n", pattern, str, + error_no, r); + nfail++; + } + } + + return ; + } + + r = onig_search(reg, (UChar* )str, (UChar* )(str + SLEN(str)), + (UChar* )str, (UChar* )(str + SLEN(str)), + region, ONIG_OPTION_NONE); + if (r < ONIG_MISMATCH || error_no < ONIG_MISMATCH) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + + if (error_no == 0) { + onig_error_code_to_str((UChar* )s, r); + fprintf(err_file, "ERROR: %s /%s/\n", s, pattern); + nerror++; + } + else { + if (r == error_no) { + fprintf(stdout, "OK(ERROR): /%s/ '%s', %d\n", pattern, str, r); + nsucc++; + } + else { + fprintf(stdout, "FAIL ERROR NO: /%s/ '%s', %d, %d\n", pattern, str, + error_no, r); + nfail++; + } + } + + return ; + } + + if (r == ONIG_MISMATCH) { + if (not) { + fprintf(stdout, "OK(N): /%s/ '%s'\n", pattern, str); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s'\n", pattern, str); + nfail++; + } + } + else { + if (not) { + fprintf(stdout, "FAIL(N): /%s/ '%s'\n", pattern, str); + nfail++; + } + else { + if (region->beg[mem] == from && region->end[mem] == to) { + fprintf(stdout, "OK: /%s/ '%s'\n", pattern, str); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str, + from, to, region->beg[mem], region->end[mem]); + nfail++; + } + } + } + onig_free(reg); +} + +static void x2(char* pattern, char* str, int from, int to) +{ + xx(pattern, str, from, to, 0, 0, 0); +} + +static void x3(char* pattern, char* str, int from, int to, int mem) +{ + xx(pattern, str, from, to, mem, 0, 0); +} + +static void n(char* pattern, char* str) +{ + xx(pattern, str, 0, 0, 0, 1, 0); +} + +static void e(char* pattern, char* str, int error_no) +{ + xx(pattern, str, 0, 0, 0, 0, error_no); +} + +static int test_reluctant_interval() +{ + x2("a{1,3}?", "aaa", 0, 1); + x2("a{3}", "aaa", 0, 3); + x2("a{3}?", "aaa", 0, 3); + n("a{3}?", "aa"); + x2("a{3,3}?", "aaa", 0, 3); + n("a{3,3}?", "aa"); + + return 0; +} + +static int test_possessive_interval() +{ + x2("a{1,3}+", "aaaaaa", 0, 3); + x2("a{3}+", "aaaaaa", 0, 3); + x2("a{3,3}+", "aaaaaa", 0, 3); + + return 0; +} + +static int test_isolated_option() +{ + x2("", "", 0, 0); + x2("^", "", 0, 0); + n("^a", "\na"); + n(".", "\n"); + x2("(?s:.)", "\n", 0, 1); + x2("(?s).", "\n", 0, 1); + x2("(?s)a|.", "\n", 0, 1); + n("(?s:a)|.", "\n"); + x2("b(?s)a|.", "\n", 0, 1); + n("((?s)a)|.", "\n"); + n("b(?:(?s)a)|z|.", "\n"); + n(".|b(?s)a", "\n"); + n(".(?s)", "\n"); + n("(?s)(?-s)a|.", "\n"); + x2("(?s)a|.(?-s)", "\n", 0, 1); + x2("(?s)a|((?-s)).", "\n", 0, 1); + x2("(?s)a|(?:(?-s)).", "\n", 0, 1); // !!! Perl 5.26.1 returns empty match + x2("(?s)a|(?:).", "\n", 0, 1); // !!! Perl 5.26.1 returns empty match + x2("(?s)a|(?:.)", "\n", 0, 1); + x2("(?s)a|(?:a*).", "\n", 0, 1); + n("a|(?:).", "\n"); // !!! Perl 5.26.1 returns empty match + n("a|(?:)(.)", "\n"); + x2("(?s)a|(?:)(.)", "\n", 0, 1); + x2("b(?s)a|(?:)(.)", "\n", 0, 1); + n("b((?s)a)|(?:)(.)", "\n"); + + return 0; +} + +static int test_prec_read() +{ + x2("(?=a).b", "ab", 0, 2); + x2("(?=ab|(.))\\1", "ab", 1, 2); // doesn't backtrack if success once in prec-read + n("(?!(.)z)a\\1", "aa"); // ! Perl 5.26.1 match with "aa" + + return 0; +} + +static int test_look_behind() +{ + x2("(?<=a)b", "ab", 1, 2); + x2("(?<=a|b)c", "abc", 2, 3); + x2("(?<=a|(.))\\1", "abcc", 3, 4); + + // #295 + n("(?abc)", "abc", 0, 3); + x2("(?Pabc)(?P=name)", "abcabc", 0, 6); + x2("(?Pabc){0}(?P>name)", "abc", 0, 3); + x2("(?P[^()]+|\\((?P>expr)\\)){0}(?P>expr)", "((((xyz))))", 0, 11); + x2("\\u0041", "A", 0, 1); + x2("\\U00000041", "A", 0, 1); + e("\\U0041", "A", ONIGERR_INVALID_CODE_POINT_VALUE); + + Syntax = ONIG_SYNTAX_POSIX_BASIC; + test_BRE_anchors(); + + Syntax = ONIG_SYNTAX_GREP; + test_BRE_anchors(); + x2("zz\\|^ab", "ab", 0, 2); + x2("ab$\\|zz", "ab", 0, 2); + x2("*", "*", 0, 1); + x2("^*", "*", 0, 1); + x2("abc\\|?", "?", 0, 1); + x2("\\{1\\}", "{1}", 0, 3); + x2("^\\{1\\}", "{1}", 0, 3); + x2("\\(\\{1\\}\\)", "{1}", 0, 3); + x2("^\\(\\{1\\}\\)", "{1}", 0, 3); + x2("{1}", "{1}", 0, 3); + x2("^{1}", "{1}", 0, 3); + x2("\\({1}\\)", "{1}", 0, 3); + x2("^\\({1}\\)", "{1}", 0, 3); + x2("{1,2}", "{1,2}", 0, 5); + x2("^{1,2}", "{1,2}", 0, 5); + x2("\\({1,2}\\)", "{1,2}", 0, 5); + x2("^\\({1,2}\\)", "{1,2}", 0, 5); + + Syntax = ONIG_SYNTAX_EMACS; + x2("\\(abc\\)", "abc", 0, 3); + x2("\\(?:abc\\)", "abc", 0, 3); + x3("\\(?:abc\\)\\(xyz\\)", "abcxyz", 3, 6, 1); + + Syntax = ONIG_SYNTAX_PERL_NG; + + x2("(?i)test", "test", 0, 4); + x2("(?-i)test", "test", 0, 4); + x2("(?i)test", "TEST", 0, 4); + n("(?-i)test", "teSt"); + x2("(?i)te(?-i)st", "TEst", 0, 4); + n("(?i)te(?-i)st", "TesT"); + + x2("(abc)(?-1)", "abcabc", 0, 6); + x2("(?+1)(abc)", "abcabc", 0, 6); + x2("(abc)(?1)", "abcabc", 0, 6); + + fprintf(stdout, + "\nRESULT SUCC: %4d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n", + nsucc, nfail, nerror, onig_version()); + + onig_region_free(region, 1); + onig_end(); + + return ((nfail == 0 && nerror == 0) ? 0 : -1); +} diff --git a/internal/components/third_party/oniguruma/test/test_utf8.c b/internal/components/third_party/oniguruma/test/test_utf8.c new file mode 100644 index 0000000000..01c0a5c29a --- /dev/null +++ b/internal/components/third_party/oniguruma/test/test_utf8.c @@ -0,0 +1,1775 @@ +/* + * test_utf8.c + * Copyright (c) 2019-2024 K.Kosako + */ +#ifdef ONIG_ESCAPE_UCHAR_COLLISION +#undef ONIG_ESCAPE_UCHAR_COLLISION +#endif +#include + +#include "oniguruma.h" + +#include + +#define SLEN(s) strlen(s) + +static int nsucc = 0; +static int nfail = 0; +static int nerror = 0; + +#ifdef __TRUSTINSOFT_ANALYZER__ +static int nall = 0; +#endif + +static FILE* err_file; + +static OnigRegion* region; + +static void xx(char* pattern, char* str, int from, int to, int mem, int not, + int error_no, int line_no) +{ +#ifdef __TRUSTINSOFT_ANALYZER__ + if (nall++ % TIS_TEST_CHOOSE_MAX != TIS_TEST_CHOOSE_CURRENT) return; +#endif + + int r; + regex_t* reg; + OnigErrorInfo einfo; + + r = onig_new(®, (UChar* )pattern, (UChar* )(pattern + SLEN(pattern)), + ONIG_OPTION_DEFAULT, ONIG_ENCODING_UTF8, ONIG_SYNTAX_DEFAULT, &einfo); + if (r) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + + if (error_no == 0) { + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(err_file, "ERROR: %s /%s/ #%d\n", s, pattern, line_no); + nerror++; + } + else { + if (r == error_no) { + fprintf(stdout, "OK(ERROR): /%s/ %d #%d\n", pattern, r, line_no); + nsucc++; + } + else { + fprintf(stdout, "FAIL(ERROR): /%s/ '%s', %d, %d #%d\n", pattern, str, + error_no, r, line_no); + nfail++; + } + } + + return ; + } + + r = onig_search(reg, (UChar* )str, (UChar* )(str + SLEN(str)), + (UChar* )str, (UChar* )(str + SLEN(str)), + region, ONIG_OPTION_NONE); + if (r < ONIG_MISMATCH || error_no < ONIG_MISMATCH) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + + if (error_no == 0) { + onig_error_code_to_str((UChar* )s, r); + fprintf(err_file, "ERROR: %s /%s/ #%d\n", s, pattern, line_no); + nerror++; + } + else { + if (r == error_no) { + fprintf(stdout, "OK(ERROR): /%s/ '%s', %d #%d\n", + pattern, str, r, line_no); + nsucc++; + } + else { + fprintf(stdout, "FAIL ERROR NO: /%s/ '%s', %d, %d #%d\n", + pattern, str, error_no, r, line_no); + nfail++; + } + } + + return ; + } + + if (r == ONIG_MISMATCH) { + if (not) { + fprintf(stdout, "OK(N): /%s/ '%s' #%d\n", pattern, str, line_no); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s' #%d\n", pattern, str, line_no); + nfail++; + } + } + else { + if (not) { + fprintf(stdout, "FAIL(N): /%s/ '%s' #%d\n", pattern, str, line_no); + nfail++; + } + else { + if (region->beg[mem] == from && region->end[mem] == to) { + fprintf(stdout, "OK: /%s/ '%s' #%d\n", pattern, str, line_no); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d #%d\n", pattern, str, + from, to, region->beg[mem], region->end[mem], line_no); + nfail++; + } + } + } + onig_free(reg); +} + +static void xx2(char* pattern, char* str, int from, int to, int line_no) +{ + xx(pattern, str, from, to, 0, 0, 0, line_no); +} + +static void xx3(char* pattern, char* str, int from, int to, int mem, int line_no) +{ + xx(pattern, str, from, to, mem, 0, 0, line_no); +} + +static void xn(char* pattern, char* str, int line_no) +{ + xx(pattern, str, 0, 0, 0, 1, 0, line_no); +} + +static void xe(char* pattern, char* str, int error_no, int line_no) +{ + xx(pattern, str, 0, 0, 0, 0, error_no, line_no); +} + +#define x2(p,s,f,t) xx2(p,s,f,t, __LINE__) +#define x3(p,s,f,t,m) xx3(p,s,f,t,m, __LINE__) +#define n(p,s) xn(p,s, __LINE__) +#define e(p,s,en) xe(p,s,en, __LINE__) + +extern int main(int argc, char* argv[]) +{ + OnigEncoding use_encs[1]; + + use_encs[0] = ONIG_ENCODING_UTF8; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + + err_file = stdout; + + region = onig_region_new(); + + x2("", "", 0, 0); + x2("^", "", 0, 0); + x2("^a", "\na", 1, 2); + x2("$", "", 0, 0); + x2("$\\O", "bb\n", 2, 3); + x2("\\G", "", 0, 0); + x2("\\A", "", 0, 0); + x2("\\Z", "", 0, 0); + x2("\\z", "", 0, 0); + x2("^$", "", 0, 0); + x2("\\ca", "\001", 0, 1); + x2("\\C-b", "\002", 0, 1); + x2("\\c\\\\", "\034", 0, 1); + x2("q[\\c\\\\]", "q\034", 0, 2); + x2("", "a", 0, 0); + x2("a", "a", 0, 1); + x2("\\x61", "a", 0, 1); + x2("aa", "aa", 0, 2); + x2("aaa", "aaa", 0, 3); + x2("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 0, 35); + x2("ab", "ab", 0, 2); + x2("b", "ab", 1, 2); + x2("bc", "abc", 1, 3); + x2("(?i:#RET#)", "#INS##RET#", 5, 10); + x2("\\17", "\017", 0, 1); + x2("\\x1f", "\x1f", 0, 1); + x2("a(?#....\\\\JJJJ)b", "ab", 0, 2); + x2("(?x) G (o O(?-x)oO) g L", "GoOoOgLe", 0, 7); + x2(".", "a", 0, 1); + n(".", ""); + x2("..", "ab", 0, 2); + x2("\\w", "e", 0, 1); + n("\\W", "e"); + x2("\\s", " ", 0, 1); + x2("\\S", "b", 0, 1); + x2("\\d", "4", 0, 1); + n("\\D", "4"); + x2("\\b", "z ", 0, 0); + x2("\\b", " z", 1, 1); + x2("\\b", " z ", 2, 2); + x2("\\B", "zz ", 1, 1); + x2("\\B", "z ", 2, 2); + x2("\\B", " z", 0, 0); + x2("[ab]", "b", 0, 1); + n("[ab]", "c"); + x2("[a-z]", "t", 0, 1); + n("[^a]", "a"); + x2("[^a]", "\n", 0, 1); + x2("[]]", "]", 0, 1); + n("[^]]", "]"); + x2("[\\^]+", "0^^1", 1, 3); + x2("[b-]", "b", 0, 1); + x2("[b-]", "-", 0, 1); + x2("[\\w]", "z", 0, 1); + n("[\\w]", " "); + x2("[\\W]", "b$", 1, 2); + x2("[\\d]", "5", 0, 1); + n("[\\d]", "e"); + x2("[\\D]", "t", 0, 1); + n("[\\D]", "3"); + x2("[\\s]", " ", 0, 1); + n("[\\s]", "a"); + x2("[\\S]", "b", 0, 1); + n("[\\S]", " "); + x2("[\\w\\d]", "2", 0, 1); + n("[\\w\\d]", " "); + x2("[[:upper:]]", "B", 0, 1); + x2("[*[:xdigit:]+]", "+", 0, 1); + x2("[*[:xdigit:]+]", "GHIKK-9+*", 6, 7); + x2("[*[:xdigit:]+]", "-@^+", 3, 4); + n("[[:upper]]", "A"); + x2("[[:upper]]", ":", 0, 1); + n("[[:upper:]]", "a"); + x2("[[:^upper:]]", "a", 0, 1); + n("[[:lower:]]", "A"); + x2("[[:^lower:]]", "A", 0, 1); + + // Issue #253 + e("[[:::]", ":[", ONIGERR_PREMATURE_END_OF_CHAR_CLASS); + e("[[:\\]:]", ":]", ONIGERR_PREMATURE_END_OF_CHAR_CLASS); + e("[[:\\[:]", ":[", ONIGERR_PREMATURE_END_OF_CHAR_CLASS); + e("[[:\\]]", ":]", ONIGERR_PREMATURE_END_OF_CHAR_CLASS); + e("[[:u:]]", "", ONIGERR_INVALID_POSIX_BRACKET_TYPE); + e("[[:upp:]]", "", ONIGERR_INVALID_POSIX_BRACKET_TYPE); + e("[[:uppers:]]", "", ONIGERR_INVALID_POSIX_BRACKET_TYPE); + x2("[[:upper\\] :]]", "]", 0, 1); + + x2("[[::]]", ":", 0, 1); + x2("[[:::]]", ":", 0, 1); + x2("[[:\\]:]]*", ":]", 0, 2); + x2("[[:\\[:]]*", ":[", 0, 2); + x2("[[:\\]]]*", ":]", 0, 2); + + x2("[\\044-\\047]", "\046", 0, 1); + x2("[\\x5a-\\x5c]", "\x5b", 0, 1); + x2("[\\x6A-\\x6D]", "\x6c", 0, 1); + n("[\\x6A-\\x6D]", "\x6E"); + n("^[0-9A-F]+ 0+ UNDEF ", "75F 00000000 SECT14A notype () External | _rb_apply"); + x2("[\\[]", "[", 0, 1); + x2("[\\]]", "]", 0, 1); + x2("[&]", "&", 0, 1); + x2("[[ab]]", "b", 0, 1); + x2("[[ab]c]", "c", 0, 1); + n("[[^a]]", "a"); + n("[^[a]]", "a"); + x2("[[ab]&&bc]", "b", 0, 1); + n("[[ab]&&bc]", "a"); + n("[[ab]&&bc]", "c"); + x2("[a-z&&b-y&&c-x]", "w", 0, 1); + n("[^a-z&&b-y&&c-x]", "w"); + x2("[[^a&&a]&&a-z]", "b", 0, 1); + n("[[^a&&a]&&a-z]", "a"); + x2("[[^a-z&&bcdef]&&[^c-g]]", "h", 0, 1); + n("[[^a-z&&bcdef]&&[^c-g]]", "c"); + x2("[^[^abc]&&[^cde]]", "c", 0, 1); + x2("[^[^abc]&&[^cde]]", "e", 0, 1); + n("[^[^abc]&&[^cde]]", "f"); + x2("[a-&&-a]", "-", 0, 1); + n("[a\\-&&\\-a]", "&"); + n("\\wabc", " abc"); + x2("a\\Wbc", "a bc", 0, 4); + x2("a.b.c", "aabbc", 0, 5); + x2(".\\wb\\W..c", "abb bcc", 0, 7); + x2("\\s\\wzzz", " zzzz", 0, 5); + x2("aa.b", "aabb", 0, 4); + n(".a", "ab"); + x2(".a", "aa", 0, 2); + x2("^a", "a", 0, 1); + x2("^a$", "a", 0, 1); + x2("^\\w$", "a", 0, 1); + n("^\\w$", " "); + x2("^\\wab$", "zab", 0, 3); + x2("^\\wabcdef$", "zabcdef", 0, 7); + x2("^\\w...def$", "zabcdef", 0, 7); + x2("\\w\\w\\s\\Waaa\\d", "aa aaa4", 0, 8); + x2("\\A\\Z", "", 0, 0); + x2("\\Axyz", "xyz", 0, 3); + x2("xyz\\Z", "xyz", 0, 3); + x2("xyz\\z", "xyz", 0, 3); + x2("a\\Z", "a", 0, 1); + x2("\\Gaz", "az", 0, 2); + n("\\Gz", "bza"); + n("az\\G", "az"); + n("az\\A", "az"); + n("a\\Az", "az"); + x2("\\^\\$", "^$", 0, 2); + x2("^x?y", "xy", 0, 2); + x2("^(x?y)", "xy", 0, 2); + x2("\\w", "_", 0, 1); + n("\\W", "_"); + x2("(?=z)z", "z", 0, 1); + n("(?=z).", "a"); + x2("(?!z)a", "a", 0, 1); + n("(?!z)a", "z"); + x2("(?i:a)", "a", 0, 1); + x2("(?i:a)", "A", 0, 1); + x2("(?i:A)", "a", 0, 1); + x2("(?i:i)", "I", 0, 1); + x2("(?i:I)", "i", 0, 1); + x2("(?i:[A-Z])", "i", 0, 1); + x2("(?i:[a-z])", "I", 0, 1); + n("(?i:A)", "b"); + x2("(?i:ss)", "ss", 0, 2); + x2("(?i:ss)", "Ss", 0, 2); + x2("(?i:ss)", "SS", 0, 2); + /* 0xc5,0xbf == 017F: # LATIN SMALL LETTER LONG S */ + x2("(?i:ss)", "\xc5\xbfS", 0, 3); + x2("(?i:ss)", "s\xc5\xbf", 0, 3); + /* 0xc3,0x9f == 00DF: # LATIN SMALL LETTER SHARP S */ + x2("(?i:ss)", "\xc3\x9f", 0, 2); + /* 0xe1,0xba,0x9e == 1E9E # LATIN CAPITAL LETTER SHARP S */ + x2("(?i:ss)", "\xe1\xba\x9e", 0, 3); + x2("(?i:xssy)", "xssy", 0, 4); + x2("(?i:xssy)", "xSsy", 0, 4); + x2("(?i:xssy)", "xSSy", 0, 4); + x2("(?i:xssy)", "x\xc5\xbfSy", 0, 5); + x2("(?i:xssy)", "xs\xc5\xbfy", 0, 5); + x2("(?i:xssy)", "x\xc3\x9fy", 0, 4); + x2("(?i:xssy)", "x\xe1\xba\x9ey", 0, 5); + x2("(?i:x\xc3\x9fy)", "xssy", 0, 4); + x2("(?i:x\xc3\x9fy)", "xSSy", 0, 4); + x2("(?i:\xc3\x9f)", "ss", 0, 2); + x2("(?i:\xc3\x9f)", "SS", 0, 2); + x2("(?i:[\xc3\x9f])", "ss", 0, 2); + x2("(?i:[\xc3\x9f])", "SS", 0, 2); + x2("(?i)(?a|abd)c", "abdc"); + x2("(?>abd|a)c", "abdc", 0, 4); + x2("a?|b", "a", 0, 1); + x2("a?|b", "b", 0, 0); + x2("a?|b", "", 0, 0); + x2("a*|b", "aa", 0, 2); + x2("a*|b*", "ba", 0, 0); + x2("a*|b*", "ab", 0, 1); + x2("a+|b*", "", 0, 0); + x2("a+|b*", "bbb", 0, 3); + x2("a+|b*", "abbb", 0, 1); + n("a+|b+", ""); + x2("(a|b)?", "b", 0, 1); + x2("(a|b)*", "ba", 0, 2); + x2("(a|b)+", "bab", 0, 3); + x2("(ab|ca)+", "caabbc", 0, 4); + x2("(ab|ca)+", "aabca", 1, 5); + x2("(ab|ca)+", "abzca", 0, 2); + x2("(a|bab)+", "ababa", 0, 5); + x2("(a|bab)+", "ba", 1, 2); + x2("(a|bab)+", "baaaba", 1, 4); + x2("(?:a|b)(?:a|b)", "ab", 0, 2); + x2("(?:a*|b*)(?:a*|b*)", "aaabbb", 0, 3); + x2("(?:a*|b*)(?:a+|b+)", "aaabbb", 0, 6); + x2("(?:a+|b+){2}", "aaabbb", 0, 6); + x2("h{0,}", "hhhh", 0, 4); + x2("(?:a+|b+){1,2}", "aaabbb", 0, 6); + n("ax{2}*a", "0axxxa1"); + n("a.{0,2}a", "0aXXXa0"); + n("a.{0,2}?a", "0aXXXa0"); + n("a.{0,2}?a", "0aXXXXa0"); + x2("^a{2,}?a$", "aaa", 0, 3); + x2("^[a-z]{2,}?$", "aaa", 0, 3); + x2("(?:a+|\\Ab*)cc", "cc", 0, 2); + n("(?:a+|\\Ab*)cc", "abcc"); + x2("(?:^a+|b+)*c", "aabbbabc", 6, 8); + x2("(?:^a+|b+)*c", "aabbbbc", 0, 7); + x2("a|(?i)c", "C", 0, 1); + x2("(?i)c|a", "C", 0, 1); + x2("(?i)c|a", "A", 0, 1); + x2("a(?i)b|c", "aB", 0, 2); + x2("a(?i)b|c", "aC", 0, 2); + n("a(?i)b|c", "AC"); + n("a(?:(?i)b)|c", "aC"); + x2("(?i:c)|a", "C", 0, 1); + n("(?i:c)|a", "A"); + x2("[abc]?", "abc", 0, 1); + x2("[abc]*", "abc", 0, 3); + x2("[^abc]*", "abc", 0, 0); + n("[^abc]+", "abc"); + x2("a?\?", "aaa", 0, 0); + x2("ba?\?b", "bab", 0, 3); + x2("a*?", "aaa", 0, 0); + x2("ba*?", "baa", 0, 1); + x2("ba*?b", "baab", 0, 4); + x2("a+?", "aaa", 0, 1); + x2("ba+?", "baa", 0, 2); + x2("ba+?b", "baab", 0, 4); + x2("(?:a?)?\?", "a", 0, 0); + x2("(?:a?\?)?", "a", 0, 0); + x2("(?:a?)+?", "aaa", 0, 1); + x2("(?:a+)?\?", "aaa", 0, 0); + x2("(?:a+)?\?b", "aaab", 0, 4); + x2("(?:ab)?{2}", "", 0, 0); + x2("(?:ab)?{2}", "ababa", 0, 4); + x2("(?:ab)*{0}", "ababa", 0, 0); + x2("(?:ab){3,}", "abababab", 0, 8); + n("(?:ab){3,}", "abab"); + x2("(?:ab){2,4}", "ababab", 0, 6); + x2("(?:ab){2,4}", "ababababab", 0, 8); + x2("(?:ab){2,4}?", "ababababab", 0, 4); + x2("(?:ab){,}", "ab{,}", 0, 5); + x2("(?:abc)+?{2}", "abcabcabc", 0, 6); + x2("(?:X*)(?i:xa)", "XXXa", 0, 4); + x2("(d+)([^abc]z)", "dddz", 0, 4); + x2("([^abc]*)([^abc]z)", "dddz", 0, 4); + x2("(\\w+)(\\wz)", "dddz", 0, 4); + x3("(a)", "a", 0, 1, 1); + x3("(ab)", "ab", 0, 2, 1); + x2("((ab))", "ab", 0, 2); + x3("((ab))", "ab", 0, 2, 1); + x3("((ab))", "ab", 0, 2, 2); + x3("((((((((((((((((((((ab))))))))))))))))))))", "ab", 0, 2, 20); + x3("(ab)(cd)", "abcd", 0, 2, 1); + x3("(ab)(cd)", "abcd", 2, 4, 2); + x3("()(a)bc(def)ghijk", "abcdefghijk", 3, 6, 3); + x3("(()(a)bc(def)ghijk)", "abcdefghijk", 3, 6, 4); + x2("(^a)", "a", 0, 1); + x3("(a)|(a)", "ba", 1, 2, 1); + x3("(^a)|(a)", "ba", 1, 2, 2); + x3("(a?)", "aaa", 0, 1, 1); + x3("(a*)", "aaa", 0, 3, 1); + x3("(a*)", "", 0, 0, 1); + x3("(a+)", "aaaaaaa", 0, 7, 1); + x3("(a+|b*)", "bbbaa", 0, 3, 1); + x3("(a+|b?)", "bbbaa", 0, 1, 1); + x3("(abc)?", "abc", 0, 3, 1); + x3("(abc)*", "abc", 0, 3, 1); + x3("(abc)+", "abc", 0, 3, 1); + x3("(xyz|abc)+", "abc", 0, 3, 1); + x3("([xyz][abc]|abc)+", "abc", 0, 3, 1); + x3("((?i:abc))", "AbC", 0, 3, 1); + x2("(abc)(?i:\\1)", "abcABC", 0, 6); + x3("((?m:a.c))", "a\nc", 0, 3, 1); + x3("((?=az)a)", "azb", 0, 1, 1); + x3("abc|(.abd)", "zabd", 0, 4, 1); + x2("(?:abc)|(ABC)", "abc", 0, 3); + x3("(?i:(abc))|(zzz)", "ABC", 0, 3, 1); + x3("a*(.)", "aaaaz", 4, 5, 1); + x3("a*?(.)", "aaaaz", 0, 1, 1); + x3("a*?(c)", "aaaac", 4, 5, 1); + x3("[bcd]a*(.)", "caaaaz", 5, 6, 1); + x3("(\\Abb)cc", "bbcc", 0, 2, 1); + n("(\\Abb)cc", "zbbcc"); + x3("(^bb)cc", "bbcc", 0, 2, 1); + n("(^bb)cc", "zbbcc"); + x3("cc(bb$)", "ccbb", 2, 4, 1); + n("cc(bb$)", "ccbbb"); + n("(\\1)", ""); + n("\\1(a)", "aa"); + n("(a(b)\\1)\\2+", "ababb"); + n("(?:(?:\\1|z)(a))+$", "zaa"); + x2("(?:(?:\\1|z)(a))+$", "zaaa", 0, 4); + x2("(a)(?=\\1)", "aa", 0, 1); + n("(a)$|\\1", "az"); + x2("(a)\\1", "aa", 0, 2); + n("(a)\\1", "ab"); + x2("(a?)\\1", "aa", 0, 2); + x2("(a?\?)\\1", "aa", 0, 0); + x2("(a*)\\1", "aaaaa", 0, 4); + x3("(a*)\\1", "aaaaa", 0, 2, 1); + x2("a(b*)\\1", "abbbb", 0, 5); + x2("a(b*)\\1", "ab", 0, 1); + x2("(a*)(b*)\\1\\2", "aaabbaaabb", 0, 10); + x2("(a*)(b*)\\2", "aaabbbb", 0, 7); + x2("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 8); + x3("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 3, 7); + x2("(a)(b)(c)\\2\\1\\3", "abcbac", 0, 6); + x2("([a-d])\\1", "cc", 0, 2); + x2("(\\w\\d\\s)\\1", "f5 f5 ", 0, 6); + n("(\\w\\d\\s)\\1", "f5 f5"); + x2("(who|[a-c]{3})\\1", "whowho", 0, 6); + x2("...(who|[a-c]{3})\\1", "abcwhowho", 0, 9); + x2("(who|[a-c]{3})\\1", "cbccbc", 0, 6); + x2("(^a)\\1", "aa", 0, 2); + n("(^a)\\1", "baa"); + n("(a$)\\1", "aa"); + n("(ab\\Z)\\1", "ab"); + x2("(a*\\Z)\\1", "a", 1, 1); + x2(".(a*\\Z)\\1", "ba", 1, 2); + x3("(.(abc)\\2)", "zabcabc", 0, 7, 1); + x3("(.(..\\d.)\\2)", "z12341234", 0, 9, 1); + x2("((?i:az))\\1", "AzAz", 0, 4); + n("((?i:az))\\1", "Azaz"); + x2("(?<=a)b", "ab", 1, 2); + n("(?<=a)b", "bb"); + x2("(?<=a|b)b", "bb", 1, 2); + x2("(?<=a|bc)b", "bcb", 2, 3); + x2("(?<=a|bc)b", "ab", 1, 2); + x2("(?<=a|bc||defghij|klmnopq|r)z", "rz", 1, 2); + x3("(?<=(abc))d", "abcd", 0, 3, 1); + x2("(?<=(?i:abc))d", "ABCd", 3, 4); + x2("(?<=^|b)c", " cbc", 3, 4); + x2("(?<=a|^|b)c", " cbc", 3, 4); + x2("(?<=a|(^)|b)c", " cbc", 3, 4); + x2("(?<=a|(^)|b)c", "cbc", 0, 1); + n("(Q)|(?<=a|(?(1))|b)c", "czc"); + x2("(Q)(?<=a|(?(1))|b)c", "cQc", 1, 3); + x2("(?<=a|(?~END)|b)c", "ENDc", 3, 4); + n("(?", "aa", 0, 2); + x2("(?a)", "a", 0, 1); + x2("(?ab)\\g", "abab", 0, 4); + x2("(?.zv.)\\k", "azvbazvb", 0, 8); + x2("(?<=\\g)|-\\zEND (?XyZ)", "XyZ", 3, 3); + x2("(?|a\\g)+", "", 0, 0); + x2("(?|\\(\\g\\))+$", "()(())", 0, 6); + x3("\\g(?.){0}", "X", 0, 1, 1); + x2("\\g(abc|df(?.YZ){2,8}){0}", "XYZ", 0, 3); + x2("\\A(?(a\\g)|)\\z", "aaaa", 0, 4); + x2("(?|\\g\\g)\\z|\\zEND (?a|(b)\\g)", "bbbbabba", 0, 8); + x2("(?\\w+\\sx)a+\\k", " fg xaaaaaaaafg x", 2, 18); + x3("(z)()()(?<_9>a)\\g<_9>", "zaa", 2, 3, 1); + x2("(.)(((?<_>a)))\\k<_>", "zaa", 0, 3); + x2("((?\\d)|(?\\w))(\\k|\\k)", "ff", 0, 2); + x2("(?:(?)|(?efg))\\k", "", 0, 0); + x2("(?:(?abc)|(?efg))\\k", "abcefgefg", 3, 9); + n("(?:(?abc)|(?efg))\\k", "abcefg"); + x2("(?x)(?xx)\\k", "xxxx", 0, 4); + x2("(?x)(?xx)\\k", "xxxxz", 0, 4); + x2("(?:(?.)|(?..)|(?...)|(?....)|(?.....)|(?......)|(?.......)|(?........)|(?.........)|(?..........)|(?...........)|(?............)|(?.............)|(?..............))\\k$", "a-pyumpyum", 2, 10); + x3("(?:(?.)|(?..)|(?...)|(?....)|(?.....)|(?......)|(?.......)|(?........)|(?.........)|(?..........)|(?...........)|(?............)|(?.............)|(?..............))\\k$", "xxxxabcdefghijklmnabcdefghijklmn", 4, 18, 14); + x3("(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?aaa)(?)$", "aaa", 0, 3, 16); + x2("(?a|\\(\\g\\))", "a", 0, 1); + x2("(?a|\\(\\g\\))", "((((((a))))))", 0, 13); + x3("(?a|\\(\\g\\))", "((((((((a))))))))", 0, 17, 1); + x2("\\g|\\zEND(?.*abc$)", "abcxxxabc", 0, 9); + x2("\\g<1>|\\zEND(.a.)", "bac", 0, 3); + x3("\\g<_A>\\g<_A>|\\zEND(.a.)(?<_A>.b.)", "xbxyby", 3, 6, 1); + x2("\\A(?:\\g|\\g|\\zEND (?a|c\\gc)(?b|d\\gd))$", "cdcbcdc", 0, 7); + x2("\\A(?|a\\g)\\z|\\zEND (?\\g)", "aaaa", 0, 4); + x2("(?(a|b\\gc){3,5})", "baaaaca", 1, 5); + x2("(?(a|b\\gc){3,5})", "baaaacaaaaa", 0, 10); + x2("(?\\(([^\\(\\)]++|\\g)*+\\))", "((a))", 0, 5); + x2("()*\\1", "", 0, 0); + x2("(?:()|())*\\1\\2", "", 0, 0); + x2("(?:a*|b*)*c", "abadc", 4, 5); + x3("(?:\\1a|())*", "a", 0, 0, 1); + x2("x((.)*)*x", "0x1x2x3", 1, 6); + x2("x((.)*)*x(?i:\\1)\\Z", "0x1x2x1X2", 1, 9); + x2("(?:()|()|()|()|()|())*\\2\\5", "", 0, 0); + x2("(?:()|()|()|(x)|()|())*\\2b\\5", "b", 0, 1); + x2("[0-9-a]", "-", 0, 1); // PR#44 + n("[0-9-a]", ":"); // PR#44 + x3("(\\(((?:[^(]|\\g<1>)*)\\))", "(abc)(abc)", 1, 4, 2); // PR#43 + x2("\\o{101}", "A", 0, 1); + x2("\\A(a|b\\g<1>c)\\k<1+3>\\z", "bbacca", 0, 6); + n("\\A(a|b\\g<1>c)\\k<1+3>\\z", "bbaccb"); + x2("(?i)\\A(a|b\\g<1>c)\\k<1+2>\\z", "bBACcbac", 0, 8); + x2("(?i)(?aa)|(?bb)\\k", "BBbb", 0, 4); + x2("(?:\\k'+1'B|(A)C)*", "ACAB", 0, 4); // relative backref by positive number + x2("\\g<+2>(abc)(ABC){0}", "ABCabc", 0, 6); // relative call by positive number + x2("A\\g'0'|B()", "AAAAB", 0, 5); + x3("(A\\g'0')|B", "AAAAB", 0, 5, 1); + x2("(a*)(?(1))aa", "aaaaa", 0, 5); + x2("(a*)(?(-1))aa", "aaaaa", 0, 5); + x2("(?aaa)(?('name'))aa", "aaaaa", 0, 5); + x2("(a)(?(1)aa|bb)a", "aaaaa", 0, 4); + x2("(?:aa|())(?(<1>)aa|bb)a", "aabba", 0, 5); + x2("(?:aa|())(?('1')aa|bb|cc)a", "aacca", 0, 5); + x3("(a*)(?(1)aa|a)b", "aaab", 0, 1, 1); + n("(a)(?(1)a|b)c", "abc"); + x2("(a)(?(1)|)c", "ac", 0, 2); + n("(?()aaa|bbb)", "bbb"); + x2("(a)(?(1+0)b|c)d", "abd", 0, 3); + x2("(?:(?'name'a)|(?'name'b))(?('name')c|d)e", "ace", 0, 3); + x2("(?:(?'name'a)|(?'name'b))(?('name')c|d)e", "bce", 0, 3); + x2("\\R", "\r\n", 0, 2); + x2("\\R", "\r", 0, 1); + x2("\\R", "\n", 0, 1); + x2("\\R", "\x0b", 0, 1); + n("\\R\\n", "\r\n"); + x2("\\R", "\xc2\x85", 0, 2); + x2("\\N", "a", 0, 1); + n("\\N", "\n"); + n("(?m:\\N)", "\n"); + n("(?-m:\\N)", "\n"); + x2("\\O", "a", 0, 1); + x2("\\O", "\n", 0, 1); + x2("(?m:\\O)", "\n", 0, 1); + x2("(?-m:\\O)", "\n", 0, 1); + x2("\\K", "a", 0, 0); + x2("a\\K", "a", 1, 1); + x2("a\\Kb", "ab", 1, 2); + x2("(a\\Kb|ac\\Kd)", "acd", 2, 3); + x2("(a\\Kb|\\Kac\\K)*", "acababacab", 9, 10); + x2("(?:()|())*\\1", "abc", 0, 0); + x2("(?:()|())*\\2", "abc", 0, 0); + x2("(?:()|()|())*\\3\\1", "abc", 0, 0); + x2("(|(?:a(?:\\g'1')*))b|", "abc", 0, 2); + x2("^(\"|)(.*)\\1$", "XX", 0, 2); + x2("(abc|def|ghi|jkl|mno|pqr|stu){0,10}?\\z", "admno", 2, 5); + x2("(abc|(def|ghi|jkl|mno|pqr){0,7}?){5}\\z", "adpqrpqrpqr", 2, 11); // cover OP_REPEAT_INC_NG_SG + x2("(?!abc).*\\z", "abcde", 1, 5); // cover OP_PREC_READ_NOT_END + x2("(.{2,})?", "abcde", 0, 5); // up coverage + x2("((a|b|c|d|e|f|g|h|i|j|k|l|m|n)+)?", "abcde", 0, 5); // up coverage + x2("((a|b|c|d|e|f|g|h|i|j|k|l|m|n){3,})?", "abcde", 0, 5); // up coverage + x2("((?:a(?:b|c|d|e|f|g|h|i|j|k|l|m|n))+)?", "abacadae", 0, 8); // up coverage + x2("((?:a(?:b|c|d|e|f|g|h|i|j|k|l|m|n))+?)?z", "abacadaez", 0, 9); // up coverage + x2("\\A((a|b)\?\?)?z", "bz", 0, 2); // up coverage + x2("((?abc){0}a\\gd)+", "aabcd", 0, 5); // up coverage + x2("((?(abc)true|false))+", "false", 0, 5); // up coverage + x2("((?i:abc)d)+", "abcdABCd", 0, 8); // up coverage + x2("((?ab)(?()a|b)", "aba", 0, 3); // up coverage + x2("(?<=a.b)c", "azbc", 3, 4); // up coverage + n("(?<=(?:abcde){30})z", "abc"); // up coverage + x2("(?<=(?(a)a|bb))z", "aaz", 2, 3); // up coverage + x2("[a]*\\W", "aa@", 0, 3); // up coverage + x2("[a]*[b]", "aab", 0, 3); // up coverage + n("a*\\W", "aaa"); // up coverage + n("(?W)a*\\W", "aaa"); // up coverage + x2("(?<=ab(?<=ab))", "ab", 2, 2); // up coverage + x2("(?a)(?b)(\\k)+", "abbaab", 0, 6); // up coverage + x2("()(\\1)(\\2)", "abc", 0, 0); // up coverage + x2("((?(a)b|c))(\\1)", "abab", 0, 4); // up coverage + x2("(?$|b\\g)", "bbb", 0, 3); // up coverage + x2("(?(?(a)a|b)|c\\g)", "cccb", 0, 4); // up coverage + x2("(a)(?(1)a*|b*)+", "aaaa", 0, 4); // up coverage + x2("[[^abc]&&cde]*", "de", 0, 2); // up coverage + n("(a){10}{10}", "aa"); // up coverage + x2("(?:a?)+", "aa", 0, 2); // up coverage + x2("(?:a?)*?", "a", 0, 0); // up coverage + x2("(?:a*)*?", "a", 0, 0); // up coverage + x2("(?:a+?)*", "a", 0, 1); // up coverage + x2("\\h", "5", 0, 1); // up coverage + x2("\\H", "z", 0, 1); // up coverage + x2("[\\h]", "5", 0, 1); // up coverage + x2("[\\H]", "z", 0, 1); // up coverage + x2("[\\o{101}]", "A", 0, 1); // up coverage + x2("[\\u0041]", "A", 0, 1); // up coverage + + x2("(?~)", "", 0, 0); + x2("(?~)", "A", 0, 0); + x2("(?~ab)", "abc", 0, 0); + x2("(?~abc)", "abc", 0, 0); + x2("(?~abc|ab)", "abc", 0, 0); + x2("(?~ab|abc)", "abc", 0, 0); + x2("(?~a.c)", "abc", 0, 0); + x2("(?~a.c|ab)", "abc", 0, 0); + x2("(?~ab|a.c)", "abc", 0, 0); + x2("aaaaa(?~)", "aaaaaaaaaa", 0, 5); + x2("(?~(?:|aaa))", "aaa", 0, 0); + x2("(?~aaa|)", "aaa", 0, 0); + x2("a(?~(?~)).", "abcdefghijklmnopqrstuvwxyz", 0, 26); // nested absent functions cause strange result + x2("/\\*(?~\\*/)\\*/", "/* */ */", 0, 5); + x2("(?~\\w+)zzzzz", "zzzzz", 0, 5); + x2("(?~\\w*)zzzzz", "zzzzz", 0, 5); + x2("(?~A.C|B)", "ABC", 0, 0); + x2("(?~XYZ|ABC)a", "ABCa", 1, 4); + x2("(?~XYZ|ABC)a", "aABCa", 0, 1); + x2("<[^>]*>(?~[<>])]*>", "vvv ", 0, 10); + x2("(?~ab)", "ccc\ndab", 0, 5); + x2("(?m:(?~ab))", "ccc\ndab", 0, 5); + x2("(?-m:(?~ab))", "ccc\ndab", 0, 5); + x2("(?~abc)xyz", "xyz012345678901234567890123456789abc", 0, 3); + + // absent with expr + x2("(?~|78|\\d*)", "123456789", 0, 6); + x2("(?~|def|(?:abc|de|f){0,100})", "abcdedeabcfdefabc", 0, 11); + x2("(?~|ab|.*)", "ccc\nddd", 0, 3); + x2("(?~|ab|\\O*)", "ccc\ndab", 0, 5); + x2("(?~|ab|\\O{2,10})", "ccc\ndab", 0, 5); + x2("(?~|ab|\\O{1,10})", "ab", 1, 2); + n("(?~|ab|\\O{2,10})", "ab"); + x2("(?~|abc|\\O{1,10})", "abc", 1, 3); + x2("(?~|ab|\\O{5,10})|abc", "abc", 0, 3); + x2("(?~|ab|\\O{1,10})", "cccccccccccab", 0, 10); + x2("(?~|aaa|)", "aaa", 0, 0); + x2("(?~||a*)", "aaaaaa", 0, 0); + x2("(?~||a*?)", "aaaaaa", 0, 0); + x2("(a)(?~|b|\\1)", "aaaaaa", 0, 2); + x2("(a)(?~|bb|(?:a\\1)*)", "aaaaaa", 0, 5); + x2("(b|c)(?~|abac|(?:a\\1)*)", "abababacabab", 1, 4); + n("(?~|c|a*+)a", "aaaaa"); + x2("(?~|aaaaa|a*+)", "aaaaa", 0, 0); + x2("(?~|aaaaaa|a*+)b", "aaaaaab", 1, 7); + x2("(?~|abcd|(?>))", "zzzabcd", 0, 0); + x2("(?~|abc|a*?)", "aaaabc", 0, 0); + + // absent range cutter + x2("(?~|abc)a*", "aaaaaabc", 0, 5); + x2("(?~|abc)a*z|aaaaaabc", "aaaaaabc", 0, 8); + x2("(?~|aaaaaa)a*", "aaaaaa", 0, 0); + x2("(?~|abc)aaaa|aaaabc", "aaaabc", 0, 6); + x2("(?>(?~|abc))aaaa|aaaabc", "aaaabc", 0, 6); + x2("(?~|)a", "a", 0, 1); + n("(?~|a)a", "a"); + x2("(?~|a)(?~|)a", "a", 0, 1); + x2("(?~|a).*(?~|)a", "bbbbbbbbbbbbbbbbbbbba", 0, 21); + x2("(?~|abc).*(xyz|pqr)(?~|)abc", "aaaaxyzaaapqrabc", 0, 16); + x2("(?~|abc).*(xyz|pqr)(?~|)abc", "aaaaxyzaaaabcpqrabc", 11, 19); + n("\\A(?~|abc).*(xyz|pqrabc)(?~|)abc", "aaaaxyzaaaabcpqrabcabc"); + + x2("", "ã‚", 0, 0); + x2("ã‚", "ã‚", 0, 3); + n("ã„", "ã‚"); + x2("ã†ã†", "ã†ã†", 0, 6); + x2("ã‚ã„ã†", "ã‚ã„ã†", 0, 9); + x2("ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“", "ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“ã“", 0, 105); + x2("ã‚", "ã„ã‚", 3, 6); + x2("ã„ã†", "ã‚ã„ã†", 3, 9); + x2("\\xca\\xb8", "\xca\xb8", 0, 2); + x2(".", "ã‚", 0, 3); + x2("..", "ã‹ã", 0, 6); + x2("\\w", "ãŠ", 0, 3); + n("\\W", "ã‚"); + x2("[\\W]", "ã†$", 3, 4); + x2("\\S", "ã", 0, 3); + x2("\\S", "æ¼¢", 0, 3); + x2("\\b", "æ°— ", 0, 0); + x2("\\b", " ã»", 1, 1); + x2("\\B", "ã›ã ", 3, 3); + x2("\\B", "ㆠ", 4, 4); + x2("\\B", " ã„", 0, 0); + x2("[ãŸã¡]", "ã¡", 0, 3); + n("[ãªã«]", "ã¬"); + x2("[ã†-ãŠ]", "ãˆ", 0, 3); + n("[^ã‘]", "ã‘"); + x2("[\\w]", "ã­", 0, 3); + n("[\\d]", "ãµ"); + x2("[\\D]", "ã¯", 0, 3); + n("[\\s]", "ã"); + x2("[\\S]", "ã¸", 0, 3); + x2("[\\w\\d]", "よ", 0, 3); + x2("[\\w\\d]", " よ", 3, 6); + n("\\w鬼車", " 鬼車"); + x2("鬼\\W車", "鬼 車", 0, 7); + x2("ã‚.ã„.ã†", "ã‚ã‚ã„ã„ã†", 0, 15); + x2(".\\wã†\\W..ãž", "ãˆã†ã† ã†ãžãž", 0, 19); + x2("\\s\\wã“ã“ã“", " ã“ã“ã“ã“", 0, 13); + x2("ã‚ã‚.ã‘", "ã‚ã‚ã‘ã‘", 0, 12); + n(".ã„", "ã„ãˆ"); + x2(".ãŠ", "ãŠãŠ", 0, 6); + x2("^ã‚", "ã‚", 0, 3); + x2("^ã‚€$", "ã‚€", 0, 3); + x2("^\\w$", "ã«", 0, 3); + x2("^\\wã‹ããã‘ã“$", "zã‹ããã‘ã“", 0, 16); + x2("^\\w...ã†ãˆãŠ$", "zã‚ã„ã†ã†ãˆãŠ", 0, 19); + x2("\\w\\w\\s\\WãŠãŠãŠ\\d", "a㊠ãŠãŠãŠ4", 0, 16); + x2("\\AãŸã¡ã¤", "ãŸã¡ã¤", 0, 9); + x2("ã‚€ã‚ã‚‚\\Z", "ã‚€ã‚ã‚‚", 0, 9); + x2("ã‹ãã\\z", "ã‹ãã", 0, 9); + x2("ã‹ãã\\Z", "ã‹ãã\n", 0, 9); + x2("\\Gã½ã´", "ã½ã´", 0, 6); + n("\\Gãˆ", "ã†ãˆãŠ"); + n("ã¨ã¦\\G", "ã¨ã¦"); + n("ã¾ã¿\\A", "ã¾ã¿"); + n("ã¾\\Aã¿", "ã¾ã¿"); + x2("(?=ã›)ã›", "ã›", 0, 3); + n("(?=ã†).", "ã„"); + x2("(?!ã†)ã‹", "ã‹", 0, 3); + n("(?!ã¨)ã‚", "ã¨"); + x2("(?i:ã‚)", "ã‚", 0, 3); + x2("(?i:ã¶ã¹)", "ã¶ã¹", 0, 6); + n("(?i:ã„)", "ã†"); + x2("(?m:よ.)", "よ\n", 0, 4); + x2("(?m:.ã‚)", "ã¾\nã‚", 3, 7); + x2("ã‚?", "", 0, 0); + x2("変?", "化", 0, 0); + x2("変?", "変", 0, 3); + x2("é‡*", "", 0, 0); + x2("é‡*", "é‡", 0, 3); + x2("å­*", "å­å­å­", 0, 9); + x2("馬*", "鹿馬馬馬馬", 0, 0); + n("å±±+", ""); + x2("æ²³+", "æ²³", 0, 3); + x2("時+", "時時時時", 0, 12); + x2("ãˆ+", "ãˆãˆã†ã†ã†", 0, 6); + x2("ã†+", "ãŠã†ã†ã†ã†", 3, 15); + x2(".?", "ãŸ", 0, 3); + x2(".*", "ã±ã´ã·ãº", 0, 12); + x2(".+", "ã‚", 0, 3); + x2(".+", "ã„ã†ãˆã‹\n", 0, 12); + x2("ã‚|ã„", "ã‚", 0, 3); + x2("ã‚|ã„", "ã„", 0, 3); + x2("ã‚ã„|ã„ã†", "ã‚ã„", 0, 6); + x2("ã‚ã„|ã„ã†", "ã„ã†", 0, 6); + x2("ã‚’(?:ã‹ã|ãã)", "ã‚’ã‹ã", 0, 9); + x2("ã‚’(?:ã‹ã|ãã)ã‘", "ã‚’ããã‘", 0, 12); + x2("ã‚ã„|(?:ã‚ã†|ã‚ã‚’)", "ã‚ã‚’", 0, 6); + x2("ã‚|ã„|ã†", "ãˆã†", 3, 6); + x2("ã‚|ã„|ã†ãˆ|ãŠã‹ã|ã|ã‘ã“ã•|ã—ã™ã›|ã|ãŸã¡|ã¤ã¦ã¨ãªã«|ã¬ã­", "ã—ã™ã›", 0, 9); + n("ã‚|ã„|ã†ãˆ|ãŠã‹ã|ã|ã‘ã“ã•|ã—ã™ã›|ã|ãŸã¡|ã¤ã¦ã¨ãªã«|ã¬ã­", "ã™ã›"); + x2("ã‚|^ã‚", "ã¶ã‚", 3, 6); + x2("ã‚|^ã‚’", "ã‚’ã‚", 0, 3); + x2("鬼|\\G車", "ã‘車鬼", 6, 9); + x2("鬼|\\G車", "車鬼", 0, 3); + x2("鬼|\\A車", "b車鬼", 4, 7); + x2("鬼|\\A車", "車", 0, 3); + x2("鬼|車\\Z", "車鬼", 3, 6); + x2("鬼|車\\Z", "車", 0, 3); + x2("鬼|車\\Z", "車\n", 0, 3); + x2("鬼|車\\z", "車鬼", 3, 6); + x2("鬼|車\\z", "車", 0, 3); + x2("\\w|\\s", "ãŠ", 0, 3); + x2("\\w|%", "%ãŠ", 0, 1); + x2("\\w|[&$]", "ã†&", 0, 3); + x2("[ã„-ã‘]", "ã†", 0, 3); + x2("[ã„-ã‘]|[^ã‹-ã“]", "ã‚", 0, 3); + x2("[ã„-ã‘]|[^ã‹-ã“]", "ã‹", 0, 3); + x2("[^ã‚]", "\n", 0, 1); + x2("(?:ã‚|[ã†-ã])|ã„ã‚’", "ã†ã‚’", 0, 3); + x2("(?:ã‚|[ã†-ã])|ã„ã‚’", "ã„ã‚’", 0, 6); + x2("ã‚ã„ã†|(?=ã‘ã‘)..ã»", "ã‘ã‘ã»", 0, 9); + x2("ã‚ã„ã†|(?!ã‘ã‘)..ã»", "ã‚ã„ã»", 0, 9); + x2("(?=ã‚’ã‚)..ã‚|(?=ã‚’ã‚’)..ã‚", "ã‚’ã‚’ã‚", 0, 9); + x2("(?<=ã‚|ã„ã†)ã„", "ã„ã†ã„", 6, 9); + n("(?>ã‚|ã‚ã„ãˆ)ã†", "ã‚ã„ãˆã†"); + x2("(?>ã‚ã„ãˆ|ã‚)ã†", "ã‚ã„ãˆã†", 0, 12); + x2("ã‚?|ã„", "ã‚", 0, 3); + x2("ã‚?|ã„", "ã„", 0, 0); + x2("ã‚?|ã„", "", 0, 0); + x2("ã‚*|ã„", "ã‚ã‚", 0, 6); + x2("ã‚*|ã„*", "ã„ã‚", 0, 0); + x2("ã‚*|ã„*", "ã‚ã„", 0, 3); + x2("[aã‚]*|ã„*", "aã‚ã„ã„ã„", 0, 4); + x2("ã‚+|ã„*", "", 0, 0); + x2("ã‚+|ã„*", "ã„ã„ã„", 0, 9); + x2("ã‚+|ã„*", "ã‚ã„ã„ã„", 0, 3); + x2("ã‚+|ã„*", "aã‚ã„ã„ã„", 0, 0); + n("ã‚+|ã„+", ""); + x2("(ã‚|ã„)?", "ã„", 0, 3); + x2("(ã‚|ã„)*", "ã„ã‚", 0, 6); + x2("(ã‚|ã„)+", "ã„ã‚ã„", 0, 9); + x2("(ã‚ã„|ã†ã‚)+", "ã†ã‚ã‚ã„ã†ãˆ", 0, 12); + x2("(ã‚ã„|ã†ãˆ)+", "ã†ã‚ã‚ã„ã†ãˆ", 6, 18); + x2("(ã‚ã„|ã†ã‚)+", "ã‚ã‚ã„ã†ã‚", 3, 15); + x2("(ã‚ã„|ã†ã‚)+", "ã‚ã„ã‚’ã†ã‚", 0, 6); + x2("(ã‚ã„|ã†ã‚)+", "$$zzzzã‚ã„ã‚’ã†ã‚", 6, 12); + x2("(ã‚|ã„ã‚ã„)+", "ã‚ã„ã‚ã„ã‚", 0, 15); + x2("(ã‚|ã„ã‚ã„)+", "ã„ã‚", 3, 6); + x2("(ã‚|ã„ã‚ã„)+", "ã„ã‚ã‚ã‚ã„ã‚", 3, 12); + x2("(?:ã‚|ã„)(?:ã‚|ã„)", "ã‚ã„", 0, 6); + x2("(?:ã‚*|ã„*)(?:ã‚*|ã„*)", "ã‚ã‚ã‚ã„ã„ã„", 0, 9); + x2("(?:ã‚*|ã„*)(?:ã‚+|ã„+)", "ã‚ã‚ã‚ã„ã„ã„", 0, 18); + x2("(?:ã‚+|ã„+){2}", "ã‚ã‚ã‚ã„ã„ã„", 0, 18); + x2("(?:ã‚+|ã„+){1,2}", "ã‚ã‚ã‚ã„ã„ã„", 0, 18); + x2("(?:ã‚+|\\Aã„*)ã†ã†", "ã†ã†", 0, 6); + n("(?:ã‚+|\\Aã„*)ã†ã†", "ã‚ã„ã†ã†"); + x2("(?:^ã‚+|ã„+)*ã†", "ã‚ã‚ã„ã„ã„ã‚ã„ã†", 18, 24); + x2("(?:^ã‚+|ã„+)*ã†", "ã‚ã‚ã„ã„ã„ã„ã†", 0, 21); + x2("ã†{0,}", "ã†ã†ã†ã†", 0, 12); + x2("ã‚|(?i)c", "C", 0, 1); + x2("(?i)c|ã‚", "C", 0, 1); + x2("(?i:ã‚)|a", "a", 0, 1); + n("(?i:ã‚)|a", "A"); + x2("[ã‚ã„ã†]?", "ã‚ã„ã†", 0, 3); + x2("[ã‚ã„ã†]*", "ã‚ã„ã†", 0, 9); + x2("[^ã‚ã„ã†]*", "ã‚ã„ã†", 0, 0); + n("[^ã‚ã„ã†]+", "ã‚ã„ã†"); + x2("ã‚?\?", "ã‚ã‚ã‚", 0, 0); + x2("ã„ã‚?\?ã„", "ã„ã‚ã„", 0, 9); + x2("ã‚*?", "ã‚ã‚ã‚", 0, 0); + x2("ã„ã‚*?", "ã„ã‚ã‚", 0, 3); + x2("ã„ã‚*?ã„", "ã„ã‚ã‚ã„", 0, 12); + x2("ã‚+?", "ã‚ã‚ã‚", 0, 3); + x2("ã„ã‚+?", "ã„ã‚ã‚", 0, 6); + x2("ã„ã‚+?ã„", "ã„ã‚ã‚ã„", 0, 12); + x2("(?:天?)?\?", "天", 0, 0); + x2("(?:天?\?)?", "天", 0, 0); + x2("(?:夢?)+?", "夢夢夢", 0, 3); + x2("(?:風+)?\?", "風風風", 0, 0); + x2("(?:雪+)?\?霜", "雪雪雪霜", 0, 12); + x2("(?:ã‚ã„)?{2}", "", 0, 0); + x2("(?:鬼車)?{2}", "鬼車鬼車鬼", 0, 12); + x2("(?:鬼車)*{0}", "鬼車鬼車鬼", 0, 0); + x2("(?:鬼車){3,}", "鬼車鬼車鬼車鬼車", 0, 24); + n("(?:鬼車){3,}", "鬼車鬼車"); + x2("(?:鬼車){2,4}", "鬼車鬼車鬼車", 0, 18); + x2("(?:鬼車){2,4}", "鬼車鬼車鬼車鬼車鬼車", 0, 24); + x2("(?:鬼車){2,4}?", "鬼車鬼車鬼車鬼車鬼車", 0, 12); + x2("(?:鬼車){,}", "鬼車{,}", 0, 9); + x2("(?:ã‹ãã)+?{2}", "ã‹ããã‹ããã‹ãã", 0, 18); + x3("(ç«)", "ç«", 0, 3, 1); + x3("(ç«æ°´)", "ç«æ°´", 0, 6, 1); + x2("((時間))", "時間", 0, 6); + x3("((風水))", "風水", 0, 6, 1); + x3("((昨日))", "昨日", 0, 6, 2); + x3("((((((((((((((((((((é‡å­))))))))))))))))))))", "é‡å­", 0, 6, 20); + x3("(ã‚ã„)(ã†ãˆ)", "ã‚ã„ã†ãˆ", 0, 6, 1); + x3("(ã‚ã„)(ã†ãˆ)", "ã‚ã„ã†ãˆ", 6, 12, 2); + x3("()(ã‚)ã„ã†(ãˆãŠã‹)ããã‘ã“", "ã‚ã„ã†ãˆãŠã‹ããã‘ã“", 9, 18, 3); + x3("(()(ã‚)ã„ã†(ãˆãŠã‹)ããã‘ã“)", "ã‚ã„ã†ãˆãŠã‹ããã‘ã“", 9, 18, 4); + x3(".*(フォ)ン・マ(ン()シュタ)イン", "フォン・マンシュタイン", 15, 27, 2); + x2("(^ã‚)", "ã‚", 0, 3); + x3("(ã‚)|(ã‚)", "ã„ã‚", 3, 6, 1); + x3("(^ã‚)|(ã‚)", "ã„ã‚", 3, 6, 2); + x3("(ã‚?)", "ã‚ã‚ã‚", 0, 3, 1); + x3("(ã¾*)", "ã¾ã¾ã¾", 0, 9, 1); + x3("(ã¨*)", "", 0, 0, 1); + x3("(ã‚‹+)", "ã‚‹ã‚‹ã‚‹ã‚‹ã‚‹ã‚‹ã‚‹", 0, 21, 1); + x3("(ãµ+|ã¸*)", "ãµãµãµã¸ã¸", 0, 9, 1); + x3("(ã‚+|ã„?)", "ã„ã„ã„ã‚ã‚", 0, 3, 1); + x3("(ã‚ã„ã†)?", "ã‚ã„ã†", 0, 9, 1); + x3("(ã‚ã„ã†)*", "ã‚ã„ã†", 0, 9, 1); + x3("(ã‚ã„ã†)+", "ã‚ã„ã†", 0, 9, 1); + x3("(ã•ã—ã™|ã‚ã„ã†)+", "ã‚ã„ã†", 0, 9, 1); + x3("([ãªã«ã¬][ã‹ãã]|ã‹ãã)+", "ã‹ãã", 0, 9, 1); + x3("((?i:ã‚ã„ã†))", "ã‚ã„ã†", 0, 9, 1); + x3("((?m:ã‚.ã†))", "ã‚\nã†", 0, 7, 1); + x3("((?=ã‚ã‚“)ã‚)", "ã‚ã‚“ã„", 0, 3, 1); + x3("ã‚ã„ã†|(.ã‚ã„ãˆ)", "ã‚“ã‚ã„ãˆ", 0, 12, 1); + x3("ã‚*(.)", "ã‚ã‚ã‚ã‚ã‚“", 12, 15, 1); + x3("ã‚*?(.)", "ã‚ã‚ã‚ã‚ã‚“", 0, 3, 1); + x3("ã‚*?(ã‚“)", "ã‚ã‚ã‚ã‚ã‚“", 12, 15, 1); + x3("[ã„ã†ãˆ]ã‚*(.)", "ãˆã‚ã‚ã‚ã‚ã‚“", 15, 18, 1); + x3("(\\Aã„ã„)ã†ã†", "ã„ã„ã†ã†", 0, 6, 1); + n("(\\Aã„ã„)ã†ã†", "ã‚“ã„ã„ã†ã†"); + x3("(^ã„ã„)ã†ã†", "ã„ã„ã†ã†", 0, 6, 1); + n("(^ã„ã„)ã†ã†", "ã‚“ã„ã„ã†ã†"); + x3("ã‚ã‚(ã‚‹ã‚‹$)", "ã‚ã‚ã‚‹ã‚‹", 6, 12, 1); + n("ã‚ã‚(ã‚‹ã‚‹$)", "ã‚ã‚ã‚‹ã‚‹ã‚‹"); + x2("(ç„¡)\\1", "ç„¡ç„¡", 0, 6); + n("(ç„¡)\\1", "ç„¡æ­¦"); + x2("(空?)\\1", "空空", 0, 6); + x2("(空?\?)\\1", "空空", 0, 0); + x2("(空*)\\1", "空空空空空", 0, 12); + x3("(空*)\\1", "空空空空空", 0, 6, 1); + x2("ã‚(ã„*)\\1", "ã‚ã„ã„ã„ã„", 0, 15); + x2("ã‚(ã„*)\\1", "ã‚ã„", 0, 3); + x2("(ã‚*)(ã„*)\\1\\2", "ã‚ã‚ã‚ã„ã„ã‚ã‚ã‚ã„ã„", 0, 30); + x2("(ã‚*)(ã„*)\\2", "ã‚ã‚ã‚ã„ã„ã„ã„", 0, 21); + x3("(ã‚*)(ã„*)\\2", "ã‚ã‚ã‚ã„ã„ã„ã„", 9, 15, 2); + x2("(((((((ã½*)ãº))))))ã´\\7", "ã½ã½ã½ãºã´ã½ã½ã½", 0, 24); + x3("(((((((ã½*)ãº))))))ã´\\7", "ã½ã½ã½ãºã´ã½ã½ã½", 0, 9, 7); + x2("(ã¯)(ã²)(ãµ)\\2\\1\\3", "ã¯ã²ãµã²ã¯ãµ", 0, 18); + x2("([ã-ã‘])\\1", "ãã", 0, 6); + x2("(\\w\\d\\s)\\1", "ã‚5 ã‚5 ", 0, 10); + n("(\\w\\d\\s)\\1", "ã‚5 ã‚5"); + x2("(誰?|[ã‚-ã†]{3})\\1", "誰?誰?", 0, 12); + x2("...(誰?|[ã‚-ã†]{3})\\1", "ã‚aã‚誰?誰?", 0, 19); + x2("(誰?|[ã‚-ã†]{3})\\1", "ã†ã„ã†ã†ã„ã†", 0, 18); + x2("(^ã“)\\1", "ã“ã“", 0, 6); + n("(^ã‚€)\\1", "ã‚むむ"); + n("(ã‚$)\\1", "ã‚ã‚"); + n("(ã‚ã„\\Z)\\1", "ã‚ã„"); + x2("(ã‚*\\Z)\\1", "ã‚", 3, 3); + x2(".(ã‚*\\Z)\\1", "ã„ã‚", 3, 6); + x3("(.(ã‚„ã„ゆ)\\2)", "zã‚„ã„ゆやã„ゆ", 0, 19, 1); + x3("(.(..\\d.)\\2)", "ã‚12341234", 0, 11, 1); + x2("((?i:ã‚vãš))\\1", "ã‚vãšã‚vãš", 0, 14); + x2("(?<愚ã‹>変|\\(\\g<愚ã‹>\\))", "((((((変))))))", 0, 15); + x2("\\A(?:\\g<阿_1>|\\g<云_2>|\\z終了 (?<阿_1>観|自\\g<云_2>自)(?<云_2>在|è©è–©\\g<阿_1>è©è–©))$", "è©è–©è‡ªè©è–©è‡ªåœ¨è‡ªè©è–©è‡ªè©è–©", 0, 39); + x2("[[ã²ãµ]]", "ãµ", 0, 3); + x2("[[ã„ãŠã†]ã‹]", "ã‹", 0, 3); + n("[[^ã‚]]", "ã‚"); + n("[^[ã‚]]", "ã‚"); + x2("[^[^ã‚]]", "ã‚", 0, 3); + x2("[[ã‹ãã]&&ãã]", "ã", 0, 3); + n("[[ã‹ãã]&&ãã]", "ã‹"); + n("[[ã‹ãã]&&ãã]", "ã‘"); + x2("[ã‚-ã‚“&&ã„-ã‚’&&ã†-ã‚‘]", "ã‚‘", 0, 3); + n("[^ã‚-ã‚“&&ã„-ã‚’&&ã†-ã‚‘]", "ã‚‘"); + x2("[[^ã‚&&ã‚]&&ã‚-ã‚“]", "ã„", 0, 3); + n("[[^ã‚&&ã‚]&&ã‚-ã‚“]", "ã‚"); + x2("[[^ã‚-ã‚“&&ã„ã†ãˆãŠ]&&[^ã†-ã‹]]", "ã", 0, 3); + n("[[^ã‚-ã‚“&&ã„ã†ãˆãŠ]&&[^ã†-ã‹]]", "ã„"); + x2("[^[^ã‚ã„ã†]&&[^ã†ãˆãŠ]]", "ã†", 0, 3); + x2("[^[^ã‚ã„ã†]&&[^ã†ãˆãŠ]]", "ãˆ", 0, 3); + n("[^[^ã‚ã„ã†]&&[^ã†ãˆãŠ]]", "ã‹"); + x2("[ã‚-&&-ã‚]", "-", 0, 1); + x2("[^[^a-zã‚ã„ã†]&&[^bcdefgã†ãˆãŠ]q-w]", "ãˆ", 0, 3); + x2("[^[^a-zã‚ã„ã†]&&[^bcdefgã†ãˆãŠ]g-w]", "f", 0, 1); + x2("[^[^a-zã‚ã„ã†]&&[^bcdefgã†ãˆãŠ]g-w]", "g", 0, 1); + n("[^[^a-zã‚ã„ã†]&&[^bcdefgã†ãˆãŠ]g-w]", "2"); + x2("aãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰<\\/b>", "aãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰", 0, 44); + x2(".ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰<\\/b>", "aãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰", 0, 44); + x2("\\n?\\z", "ã“ã‚“ã«ã¡ã¯", 15, 15); + x2("(?m).*", "é’赤黄", 0, 9); + x2("(?m).*a", "é’赤黄a", 0, 10); + + x2("\\p{Hiragana}", "ã´", 0, 3); + n("\\P{Hiragana}", "ã´"); + x2("\\p{Emoji}", "\xE2\xAD\x90", 0, 3); + x2("\\p{^Emoji}", "\xEF\xBC\x93", 0, 3); + x2("\\p{Extended_Pictographic}", "\xE2\x9A\xA1", 0, 3); + n("\\p{Extended_Pictographic}", "\xE3\x81\x82"); + + x2("\\p{Word}", "ã“", 0, 3); + n("\\p{^Word}", "ã“"); + x2("[\\p{Word}]", "ã“", 0, 3); + n("[\\p{^Word}]", "ã“"); + n("[^\\p{Word}]", "ã“"); + x2("[^\\p{^Word}]", "ã“", 0, 3); + x2("[^\\p{^Word}&&\\p{ASCII}]", "ã“", 0, 3); + x2("[^\\p{^Word}&&\\p{ASCII}]", "a", 0, 1); + n("[^\\p{^Word}&&\\p{ASCII}]", "#"); + x2("[^[\\p{^Word}]&&[\\p{ASCII}]]", "ã“", 0, 3); + x2("[^[\\p{ASCII}]&&[^\\p{Word}]]", "ã“", 0, 3); + n("[[\\p{ASCII}]&&[^\\p{Word}]]", "ã“"); + x2("[^[\\p{^Word}]&&[^\\p{ASCII}]]", "ã“", 0, 3); + x2("[^\\x{104a}]", "ã“", 0, 3); + x2("[^\\p{^Word}&&[^\\x{104a}]]", "ã“", 0, 3); + x2("[^[\\p{^Word}]&&[^\\x{104a}]]", "ã“", 0, 3); + n("[^\\p{Word}||[^\\x{104a}]]", "ã“"); + + x2("\\p{^Cntrl}", "ã“", 0, 3); + n("\\p{Cntrl}", "ã“"); + x2("[\\p{^Cntrl}]", "ã“", 0, 3); + n("[\\p{Cntrl}]", "ã“"); + n("[^\\p{^Cntrl}]", "ã“"); + x2("[^\\p{Cntrl}]", "ã“", 0, 3); + x2("[^\\p{Cntrl}&&\\p{ASCII}]", "ã“", 0, 3); + x2("[^\\p{Cntrl}&&\\p{ASCII}]", "a", 0, 1); + n("[^\\p{^Cntrl}&&\\p{ASCII}]", "#"); + x2("[^[\\p{^Cntrl}]&&[\\p{ASCII}]]", "ã“", 0, 3); + x2("[^[\\p{ASCII}]&&[^\\p{Cntrl}]]", "ã“", 0, 3); + n("[[\\p{ASCII}]&&[^\\p{Cntrl}]]", "ã“"); + n("[^[\\p{^Cntrl}]&&[^\\p{ASCII}]]", "ã“"); + n("[^\\p{^Cntrl}&&[^\\x{104a}]]", "ã“"); + n("[^[\\p{^Cntrl}]&&[^\\x{104a}]]", "ã“"); + n("[^\\p{Cntrl}||[^\\x{104a}]]", "ã“"); + + x2("(?-W:\\p{Word})", "ã“", 0, 3); + n("(?W:\\p{Word})", "ã“"); + x2("(?W:\\p{Word})", "k", 0, 1); + x2("(?-W:[[:word:]])", "ã“", 0, 3); + n("(?W:[[:word:]])", "ã“"); + x2("(?-D:\\p{Digit})", "3", 0, 3); + n("(?D:\\p{Digit})", "3"); + x2("(?-S:\\p{Space})", "\xc2\x85", 0, 2); + n("(?S:\\p{Space})", "\xc2\x85"); + x2("(?-P:\\p{Word})", "ã“", 0, 3); + n("(?P:\\p{Word})", "ã“"); + x2("(?-W:\\w)", "ã“", 0, 3); + n("(?W:\\w)", "ã“"); + x2("(?-W:\\w)", "k", 0, 1); + x2("(?W:\\w)", "k", 0, 1); + n("(?-W:\\W)", "ã“"); + x2("(?W:\\W)", "ã“", 0, 3); + n("(?-W:\\W)", "k"); + n("(?W:\\W)", "k"); + + x2("(?-W:\\b)", "ã“", 0, 0); + n("(?W:\\b)", "ã“"); + x2("(?-W:\\b)", "h", 0, 0); + x2("(?W:\\b)", "h", 0, 0); + n("(?-W:\\B)", "ã“"); + x2("(?W:\\B)", "ã“", 0, 0); + n("(?-W:\\B)", "h"); + n("(?W:\\B)", "h"); + x2("(?-P:\\b)", "ã“", 0, 0); + n("(?P:\\b)", "ã“"); + x2("(?-P:\\b)", "h", 0, 0); + x2("(?P:\\b)", "h", 0, 0); + n("(?-P:\\B)", "ã“"); + x2("(?P:\\B)", "ã“", 0, 0); + n("(?-P:\\B)", "h"); + n("(?P:\\B)", "h"); + + x2("\\p{InBasicLatin}", "\x41", 0, 1); + //x2("\\p{Grapheme_Cluster_Break_Regional_Indicator}", "\xF0\x9F\x87\xA9", 0, 4); + //n("\\p{Grapheme_Cluster_Break_Regional_Indicator}", "\xF0\x9F\x87\xA5"); + + // extended grapheme cluster + + // CR + LF + n(".\\y\\O", "\x0d\x0a"); + x2(".\\Y\\O", "\x0d\x0a", 0, 2); + + // LATIN SMALL LETTER G, COMBINING DIAERESIS + n("^.\\y.$", "\x67\xCC\x88"); + x2(".\\Y.", "\x67\xCC\x88", 0, 3); + x2("\\y.\\Y.\\y", "\x67\xCC\x88", 0, 3); + // HANGUL SYLLABLE GAG + x2("\\y.\\y", "\xEA\xB0\x81", 0, 3); + // HANGUL CHOSEONG KIYEOK, HANGUL JUNGSEONG A, HANGUL JONGSEONG KIYEOK + x2("^.\\Y.\\Y.$", "\xE1\x84\x80\xE1\x85\xA1\xE1\x86\xA8", 0, 9); + n("^.\\y.\\Y.$", "\xE1\x84\x80\xE1\x85\xA1\xE1\x86\xA8"); + // TAMIL LETTER NA, TAMIL VOWEL SIGN I, + x2(".\\Y.", "\xE0\xAE\xA8\xE0\xAE\xBF", 0, 6); + n(".\\y.", "\xE0\xAE\xA8\xE0\xAE\xBF"); + // THAI CHARACTER KO KAI, THAI CHARACTER SARA AM + x2(".\\Y.", "\xE0\xB8\x81\xE0\xB8\xB3", 0, 6); + n(".\\y.", "\xE0\xB8\x81\xE0\xB8\xB3"); + // DEVANAGARI LETTER SSA, DEVANAGARI VOWEL SIGN I + x2(".\\Y.", "\xE0\xA4\xB7\xE0\xA4\xBF", 0, 6); + n(".\\y.", "\xE0\xA4\xB7\xE0\xA4\xBF"); + + // {Extended_Pictographic} Extend* ZWJ x {Extended_Pictographic} + x2("..\\Y.", "\xE3\x80\xB0\xE2\x80\x8D\xE2\xAD\x95", 0, 9); + x2("...\\Y.", "\xE3\x80\xB0\xCC\x82\xE2\x80\x8D\xE2\xAD\x95", 0, 11); + n("...\\Y.", "\xE3\x80\xB0\xCD\xB0\xE2\x80\x8D\xE2\xAD\x95"); + + // CR + LF + n("^\\X\\X$", "\x0d\x0a"); + x2("^\\X$", "\x0d\x0a", 0, 2); + // LATIN SMALL LETTER G, COMBINING DIAERESIS + n("^\\X\\X.$", "\x67\xCC\x88"); + x2("^\\X$", "\x67\xCC\x88", 0, 3); + // HANGUL CHOSEONG KIYEOK, HANGUL JUNGSEONG A, HANGUL JONGSEONG KIYEOK + x2("^\\X$", "\xE1\x84\x80\xE1\x85\xA1\xE1\x86\xA8", 0, 9); + n("^\\X\\X\\X$", "\xE1\x84\x80\xE1\x85\xA1\xE1\x86\xA8"); + // TAMIL LETTER NA, TAMIL VOWEL SIGN I, + x2("^\\X$", "\xE0\xAE\xA8\xE0\xAE\xBF", 0, 6); + n("\\X\\X", "\xE0\xAE\xA8\xE0\xAE\xBF"); + // THAI CHARACTER KO KAI, THAI CHARACTER SARA AM + x2("^\\X$", "\xE0\xB8\x81\xE0\xB8\xB3", 0, 6); + n("\\X\\X", "\xE0\xB8\x81\xE0\xB8\xB3"); + // DEVANAGARI LETTER SSA, DEVANAGARI VOWEL SIGN I + x2("^\\X$", "\xE0\xA4\xB7\xE0\xA4\xBF", 0, 6); + n("\\X\\X", "\xE0\xA4\xB7\xE0\xA4\xBF"); + + n("^\\X.$", "\xE0\xAE\xA8\xE0\xAE\xBF"); + + // a + COMBINING GRAVE ACCENT (U+0300) + x2("h\\Xllo", "ha\xCC\x80llo", 0, 7); + + // Text Segment: Extended Grapheme Cluster <-> Word Boundary + x2("(?y{g})\\yabc\\y", "abc", 0, 3); + x2("(?y{g})\\y\\X\\y", "abc", 0, 1); + x2("(?y{w})\\yabc\\y", "abc", 0, 3); // WB1, WB2 + x2("(?y{w})\\X", "\r\n", 0, 2); // WB3 + x2("(?y{w})\\X", "\x0cz", 0, 1); // WB3a + x2("(?y{w})\\X", "q\x0c", 0, 1); // WB3b + x2("(?y{w})\\X", "\xE2\x80\x8D\xE2\x9D\x87", 0, 6); // WB3c + x2("(?y{w})\\X", "\x20\x20", 0, 2); // WB3d + x2("(?y{w})\\X", "a\xE2\x80\x8D", 0, 4); // WB4 + x2("(?y{w})\\y\\X\\y", "abc", 0, 3); // WB5 + x2("(?y{w})\\y\\X\\y", "v\xCE\x87w", 0, 4); // WB6, WB7 + x2("(?y{w})\\y\\X\\y", "\xD7\x93\x27", 0, 3); // WB7a + x2("(?y{w})\\y\\X\\y", "\xD7\x93\x22\xD7\x93", 0, 5); // WB7b, WB7c + x2("(?y{w})\\X", "14 45", 0, 2); // WB8 + x2("(?y{w})\\X", "a14", 0, 3); // WB9 + x2("(?y{w})\\X", "832e", 0, 4); // WB10 + x2("(?y{w})\\X", "8\xEF\xBC\x8C\xDB\xB0", 0, 6); // WB11, WB12 + x2("(?y{w})\\y\\X\\y", "ケン", 0, 6); // WB13 + x2("(?y{w})\\y\\X\\y", "ケン\xE2\x80\xAFã‚¿", 0, 12); // WB13a, WB13b + x2("(?y{w})\\y\\X\\y", "\x21\x23", 0, 1); // WB999 + x2("(?y{w})\\y\\X\\y", "山ア", 0, 3); + x2("(?y{w})\\X", "3.14", 0, 4); + x2("(?y{w})\\X", "3 14", 0, 1); + + x2("\\x40", "@", 0, 1); + x2("\\x1", "\x01", 0, 1); + x2("\\x{1}", "\x01", 0, 1); + x2("\\x{4E38}", "\xE4\xB8\xB8", 0, 3); + x2("\\u4E38", "\xE4\xB8\xB8", 0, 3); + x2("\\u0040", "@", 0, 1); + + x2("c.*\\b", "abc", 2, 3); + x2("\\b.*abc.*\\b", "abc", 0, 3); + x2("((?()0+)+++(((0\\g<0>)0)|())++++((?(1)(0\\g<0>))++++++0*())++++((?(1)(0\\g<1>)+)++++++++++*())++++((?(1)((0)\\g<0>)+)++())+0++*+++(((0\\g<0>))*())++++((?(1)(0\\g<0>)+)++++++++++*|)++++*+++((?(1)((0)\\g<0>)+)+++++++++())++*|)++++((?()0))|", "abcde", 0, 0); // #139 + + n("(*FAIL)", "abcdefg"); + n("abcd(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)(*FAIL)", "abcdefg"); + x2("(?:[ab]|(*MAX{2}).)*", "abcbaaccaaa", 0, 7); + x2("(?:(*COUNT[AB]{X})[ab]|(*COUNT[CD]{X})[cd])*(*CMP{AB,<,CD})", + "abababcdab", 5, 8); + x2("(?(?{....})123|456)", "123", 0, 3); + x2("(?(*FAIL)123|456)", "456", 0, 3); + + x2("\\g'0'++{,0}", "abcdefgh", 0, 0); + x2("\\g'0'++{,0}?", "abcdefgh", 0, 0); + x2("\\g'0'++{,0}b", "abcdefgh", 1, 2); + x2("\\g'0'++{,0}?def", "abcdefgh", 3, 6); + x2("a{1,3}?", "aaa", 0, 1); + x2("a{3}", "aaa", 0, 3); + x2("a{3}?", "aaa", 0, 3); + x2("a{3}?", "aa", 0, 0); + x2("a{3,3}?", "aaa", 0, 3); + n("a{3,3}?", "aa"); + x2("a{1,3}+", "aaaaaa", 0, 6); + x2("a{3}+", "aaaaaa", 0, 6); + x2("a{3,3}+", "aaaaaa", 0, 6); + n("a{2,3}?", "a"); + n("a{3,2}a", "aaa"); + x2("a{3,2}b", "aaab", 0, 4); + x2("a{3,2}b", "aaaab", 1, 5); + x2("a{3,2}b", "aab", 0, 3); + x2("a{3,2}?", "", 0, 0); /* == (?:a{3,2})?*/ + x2("a{2,3}+a", "aaa", 0, 3); /* == (?:a{2,3})+*/ + x2("[\\x{0}-\\x{7fffffff}]", "a", 0, 1); + x2("[\\x{7f}-\\x{7fffffff}]", "\xe5\xae\xb6", 0, 3); + x2("[a[cdef]]", "a", 0, 1); + n("[a[xyz]-c]", "b"); + x2("[a[xyz]-c]", "a", 0, 1); + x2("[a[xyz]-c]", "-", 0, 1); + x2("[a[xyz]-c]", "c", 0, 1); + x2("(a.c|def)(.{4})(?<=\\1)", "abcdabc", 0, 7); + x2("(a.c|de)(.{4})(?<=\\1)", "abcdabc", 0, 7); + x2("(a.c|def)(.{5})(?<=d\\1e)", "abcdabce", 0, 8); + x2("(a.c|.)d(?<=\\k<1>d)", "zzzzzabcdabc", 5, 9); + x2("(?<=az*)abc", "azzzzzzzzzzabcdabcabc", 11, 14); + x2("(?<=ab|abc|abcd)ef", "abcdef", 4, 6); + x2("(?<=ta+|tb+|tc+|td+)zz", "tcccccccccczz", 11, 13); + x2("(?<=t.{7}|t.{5}|t.{2}|t.)zz", "tczz", 2, 4); + x2("(?<=t.{7}|t.{5}|t.{2})zz", "tczzzz", 3, 5); + x2("(?<=t.{7}|t.{5}|t.{3})zz", "tczzazzbzz", 8, 10); + n("(?<=t.{7}|t.{5}|t.{3})zz", "tczzazzbczz"); + x2("(?<=(ab|abc|abcd))ef", "abcdef", 4, 6); + x2("(?<=(ta+|tb+|tc+|td+))zz", "tcccccccccczz", 11, 13); + x2("(?<=(t.{7}|t.{5}|t.{2}|t.))zz", "tczz", 2, 4); + x2("(?<=(t.{7}|t.{5}|t.{2}))zz", "tczzzz", 3, 5); + x2("(?<=(t.{7}|t.{5}|t.{3}))zz", "tczzazzbzz", 8, 10); + n("(?<=(t.{7}|t.{5}|t.{3}))zz", "tczzazzbczz"); + x2("(.{1,4})(.{1,4})(?<=\\2\\1)", "abaaba", 0, 6); + x2("(.{1,4})(.{1,4})(?<=\\2\\1)", "ababab", 0, 6); + n("(.{1,4})(.{1,4})(?<=\\2\\1)", "abcdabce"); + x2("(.{1,4})(.{1,4})(?<=\\2\\1)", "abcdabceabce", 4, 12); + x2("(?<=a)", "a", 1, 1); + x2("(?<=a.*\\w)z", "abbbz", 4, 5); + n("(?<=a.*\\w)z", "abb z"); + x2("(?<=a.*\\W)z", "abb z", 4, 5); + x2("(?<=a.*\\b)z", "abb z", 4, 5); + x2("(?<=(?>abc))", "abc", 3, 3); + x2("(?<=a\\Xz)", "abz", 3, 3); + n("(?<=^a*)bc", "zabc"); + n("(?<=a*\\b)b", "abc"); + x2("(?<=a+.*[efg])z", "abcdfz", 5, 6); + x2("(?<=a+.*[efg])z", "abcdfgz", 6, 7); + n("(?<=a+.*[efg])z", "bcdfz"); + x2("(?<=a*.*[efg])z", "bcdfz", 4, 5); + n("(?<=a+.*[efg])z", "abcdz"); + x2("(?<=v|t|a+.*[efg])z", "abcdfz", 5, 6); + x2("(?<=v|t|^a+.*[efg])z", "abcdfz", 5, 6); + x2("(?<=^(?:v|t|a+.*[efg]))z", "abcdfz", 5, 6); + x2("(?<=v|^t|a+.*[efg])z", "uabcdfz", 6, 7); + n("^..(?<=(a{,2}))\\1z", "aaaaz"); // !!! look-behind is shortest priority + x2("^..(?<=(a{,2}))\\1z", "aaz", 0, 3); // shortest priority + e("(?<=(?~|zoo)a.*z)", "abcdefz", ONIGERR_INVALID_LOOK_BEHIND_PATTERN); + e("(?<=(?~|)a.*z)", "abcdefz", ONIGERR_INVALID_LOOK_BEHIND_PATTERN); + e("(a(?~|boo)z){0}(?<=\\g<1>)", "abcdefz", ONIGERR_INVALID_LOOK_BEHIND_PATTERN); + x2("(?<=(?<= )| )", "abcde fg", 6, 6); // #173 + x2("(?<=D|)(?<=@!nnnnnnnnnIIIIn;{1}D?()|;{1}x)", "(?<=D|)(?<=@!nnnnnnnnnIIIIn;{1}D?()|;{1}x)", 55, 55); // #173 + x2("(?<=;()|)\\g<1>", "", 0, 0); // reduced #173 + x2("(?<=;()|)\\k<1>", ";", 1, 1); + x2("(())\\g<3>{0}(?<=|())", "abc", 0, 0); // #175 + x2("(?<=()|)\\1{0}", "abc", 0, 0); + e("(?)|(?<=(\\k<1>))", ""); + x2("(a|\\k<2>)|(?<=(\\k<1>))", "a", 0, 1); + x2("(a|\\k<2>)|(?<=b(\\k<1>))", "ba", 1, 2); + // #295 + n("(?|b))", "aab", 0, 3); + x2("((?(a)\\g<1>))", "aab", 0, 2); + x2("((?(a)\\g<1>))", "", 0, 0); + x2("(b(?(a)|\\g<1>))", "bba", 0, 3); + e("(()(?(2)\\g<1>))", "", ONIGERR_NEVER_ENDING_RECURSION); + x2("(?(a)(?:b|c))", "ac", 0, 2); + x2("(?(a)(?:b|c))", "", 0, 0); + x2("(?(a)b)", "", 0, 0); + n("^(?(a)b|c)", "ac"); + x2("(?i)a|b", "B", 0, 1); + n("((?i)a|b.)|c", "C"); + n("c(?i)a.|b.", "Caz"); + x2("c(?i)a|b", "cB", 0, 2); /* == c(?i:a|b) */ + x2("c(?i)a.|b.", "cBb", 0, 3); + + x2("(?i)st", "st", 0, 2); + x2("(?i)st", "St", 0, 2); + x2("(?i)st", "sT", 0, 2); + x2("(?i)st", "\xC5\xBFt", 0, 3); // U+017F + x2("(?i)st", "\xEF\xAC\x85", 0, 3); // U+FB05 + x2("(?i)st", "\xEF\xAC\x86", 0, 3); // U+FB06 + x2("(?i)ast", "Ast", 0, 3); + x2("(?i)ast", "ASt", 0, 3); + x2("(?i)ast", "AsT", 0, 3); + x2("(?i)ast", "A\xC5\xBFt", 0, 4); // U+017F + x2("(?i)ast", "A\xEF\xAC\x85", 0, 4); // U+FB05 + x2("(?i)ast", "A\xEF\xAC\x86", 0, 4); // U+FB06 + x2("(?i)stZ", "stz", 0, 3); + x2("(?i)stZ", "Stz", 0, 3); + x2("(?i)stZ", "sTz", 0, 3); + x2("(?i)stZ", "\xC5\xBFtz", 0, 4); // U+017F + x2("(?i)stZ", "\xEF\xAC\x85z", 0, 4); // U+FB05 + x2("(?i)stZ", "\xEF\xAC\x86z", 0, 4); // U+FB06 + x2("(?i)BstZ", "bstz", 0, 4); + x2("(?i)BstZ", "bStz", 0, 4); + x2("(?i)BstZ", "bsTz", 0, 4); + x2("(?i)BstZ", "b\xC5\xBFtz", 0, 5); // U+017F + x2("(?i)BstZ", "b\xEF\xAC\x85z", 0, 5); // U+FB05 + x2("(?i)BstZ", "b\xEF\xAC\x86z", 0, 5); // U+FB06 + x2("(?i).*st\\z", "tttssss\xC5\xBFt", 0, 10); // U+017F + x2("(?i).*st\\z", "tttssss\xEF\xAC\x85", 0, 10); // U+FB05 + x2("(?i).*st\\z", "tttssss\xEF\xAC\x86", 0, 10); // U+FB06 + x2("(?i).*ã‚stã„\\z", "tttssssã‚\xC5\xBFtã„", 0, 16); // U+017F + x2("(?i).*ã‚stã„\\z", "tttssssã‚\xEF\xAC\x85ã„", 0, 16); // U+FB05 + x2("(?i).*ã‚stã„\\z", "tttssssã‚\xEF\xAC\x86ã„", 0, 16); // U+FB06 + x2("(?i).*\xC5\xBFt\\z", "tttssssst", 0, 9); // U+017F + x2("(?i).*\xEF\xAC\x85\\z", "tttssssã‚st", 0, 12); // U+FB05 + x2("(?i).*\xEF\xAC\x86ã„\\z", "tttssssstã„", 0, 12); // U+FB06 + x2("(?i).*\xEF\xAC\x85\\z", "tttssssã‚\xEF\xAC\x85", 0, 13); + + x2("(?i).*ss", "abcdefghijklmnopqrstuvwxyz\xc3\x9f", 0, 28); // U+00DF + x2("(?i).*ss.*", "abcdefghijklmnopqrstuvwxyz\xc3\x9fxyz", 0, 31); // U+00DF + x2("(?i).*\xc3\x9f", "abcdefghijklmnopqrstuvwxyzss", 0, 28); // U+00DF + x2("(?i).*ss.*", "abcdefghijklmnopqrstuvwxyzSSxyz", 0, 31); + + x2("(?i)ssv", "\xc3\x9fv", 0, 3); // U+00DF + x2("(?i)(?<=ss)v", "SSv", 2, 3); + x2("(?i)(?<=\xc3\x9f)v", "\xc3\x9fv", 2, 3); + //x2("(?i)(?<=\xc3\x9f)v", "ssv", 2, 3); + //x2("(?i)(?<=ss)v", "\xc3\x9fv", 2, 3); + + /* #156 U+01F0 (UTF-8: C7 B0) */ + x2("(?i).+Isssǰ", ".+Isssǰ", 0, 8); + x2(".+Isssǰ", ".+Isssǰ", 0, 8); + x2("(?i)ǰ", "ǰ", 0, 2); + x2("(?i)ǰ", "j\xcc\x8c", 0, 3); + x2("(?i)j\xcc\x8c", "ǰ", 0, 2); + x2("(?i)5ǰ", "5ǰ", 0, 3); + x2("(?i)5ǰ", "5j\xcc\x8c", 0, 4); + x2("(?i)5j\xcc\x8c", "5ǰ", 0, 3); + x2("(?i)ǰv", "ǰV", 0, 3); + x2("(?i)ǰv", "j\xcc\x8cV", 0, 4); + x2("(?i)j\xcc\x8cv", "ǰV", 0, 3); + x2("(?i)[ǰ]", "ǰ", 0, 2); + x2("(?i)[ǰ]", "j\xcc\x8c", 0, 3); + //x2("(?i)[j]\xcc\x8c", "ǰ", 0, 2); + x2("(?i)\ufb00a", "ffa", 0, 3); + x2("(?i)ffz", "\xef\xac\x80z", 0, 4); + x2("(?i)\u2126", "\xcf\x89", 0, 2); + x2("a(?i)\u2126", "a\xcf\x89", 0, 3); + x2("(?i)A\u2126", "a\xcf\x89", 0, 3); + x2("(?i)A\u2126=", "a\xcf\x89=", 0, 4); + x2("(?i:ss)=1234567890", "\xc5\xbf\xc5\xbf=1234567890", 0, 15); + + x2("\\x{000A}", "\x0a", 0, 1); + x2("\\x{000A 002f}", "\x0a\x2f", 0, 2); + x2("\\x{000A 002f }", "\x0a\x2f", 0, 2); + x2("\\x{007C 001b}", "\x7c\x1b", 0, 2); + x2("\\x{1 2 3 4 5 6 7 8 9 a b c d e f}", "\x01\x02\x3\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", 0, 15); + x2("a\\x{000A 002f}@", "a\x0a\x2f@", 0, 4); + x2("a\\x{0060\n0063}@", "a\x60\x63@", 0, 4); + e("\\x{00000001 000000012}", "", ONIGERR_TOO_LONG_WIDE_CHAR_VALUE); + e("\\x{000A 00000002f}", "", ONIGERR_TOO_LONG_WIDE_CHAR_VALUE); + e("\\x{000A 002f/", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("\\x{000A 002f /", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("\\x{000A", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("\\x{000A ", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("\\x{000A 002f ", "", ONIGERR_INVALID_CODE_POINT_VALUE); + x2("\\o{102}", "B", 0, 1); + x2("\\o{102 103}", "BC", 0, 2); + x2("\\o{0160 0000161}", "pq", 0, 2); + x2("\\o{1 2 3 4 5 6 7 10 11 12 13 14 15 16 17}", "\x01\x02\x3\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", 0, 15); + x2("\\o{0007 0010 }", "\x07\x08", 0, 2); + e("\\o{0000 0015/", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("\\o{0000 0015 /", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("\\o{0015", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("\\o{0015 ", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("\\o{0007 002f}", "", ONIGERR_INVALID_CODE_POINT_VALUE); + x2("[\\x{000A}]", "\x0a", 0, 1); + x2("[\\x{000A 002f}]+", "\x0a\x2f\x2e", 0, 2); + x2("[\\x{01 0F 1A 2c 4B}]+", "\x20\x01\x0f\x1a\x2c\x4b\x1b", 1, 6); + x2("[\\x{0020 0024}-\\x{0026}]+", "\x25\x24\x26\x23", 0, 3); + x2("[\\x{0030}-\\x{0033 005a}]+", "\x30\x31\x32\x33\x5a\34", 0, 5); + e("[\\x{000A]", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("[\\x{000A ]", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("[\\x{000A }]", "", ONIGERR_INVALID_CODE_POINT_VALUE); + x2("[\\o{102}]", "B", 0, 1); + x2("[\\o{102 103}]*", "BC", 0, 2); + e("[a\\o{002 003]bcde|zzz", "", ONIGERR_INVALID_CODE_POINT_VALUE); + x2("[\\x{0030-0039}]+", "abc0123456789def", 3, 13); + x2("[\\x{0030 - 0039 }]+", "abc0123456789def", 3, 13); + x2("[\\x{0030 - 0039 0063 0064}]+", "abc0123456789def", 2, 14); + x2("[\\x{0030 - 0039 0063-0065}]+", "acde019b", 1, 7); + e("[\\x{0030 - 0039-0063 0064}]+", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("[\\x{0030 - }]+", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("[\\x{0030 -- 0040}]+", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("[\\x{0030--0040}]+", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("[\\x{0030 - - 0040}]+", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("[\\x{0030 0044 - }]+", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("[a-\\x{0070 - 0039}]+", "", ONIGERR_INVALID_CODE_POINT_VALUE); + x2("[a-\\x{0063 0071}]+", "dabcqz", 1, 5); + x2("[-\\x{0063-0065}]+", "ace-df", 1, 5); + x2("[\\x61-\\x{0063 0065}]+", "abced", 0, 4); + e("[\\x61-\\x{0063-0065}]+", "", ONIGERR_INVALID_CODE_POINT_VALUE); + x2("[t\\x{0063 0071}]+", "tcqb", 0, 3); + x2("[\\W\\x{0063 0071}]+", "*cqa", 0, 3); + x2("(\\O|(?=z\\g<2>*))(\\g<0>){0}", "a", 0, 1); + + /* whole options */ + x2("(?Ii)abc", "abc", 0, 3); + x2("(?Ii)abc", "ABC", 0, 3); + x2("(?Ii:abc)", "abc", 0, 3); + x2("(?Ii)xyz|abc", "aBc", 0, 3); + x2("(?Ii:zz|abc|AZ)", "ABc", 0, 3); + e("(?Ii:abc)d", "abc", ONIGERR_INVALID_GROUP_OPTION); + e("(?-Ii:abc)", "abc", ONIGERR_INVALID_GROUP_OPTION); + x2("(?I-i:abc)", "abc", 0, 3); + e("(?i-I:abc)", "abc", ONIGERR_INVALID_GROUP_OPTION); + x2("(?i)\xe2\x84\xaa", "k", 0, 1); + n("(?Ii)\xe2\x84\xaa", "k"); + e("((?Ii)abc)", "", ONIGERR_INVALID_GROUP_OPTION); + x2("(?:(?Ii)abc)", "ABC", 0, 3); + x2("(?:(?:(?Ii)abc))", "ABC", 0, 3); + e("x(?Ii)", "", ONIGERR_INVALID_GROUP_OPTION); + e("()(?Ii)", "", ONIGERR_INVALID_GROUP_OPTION); + e("(?:)(?Ii)", "", ONIGERR_INVALID_GROUP_OPTION); + e("^(?Ii)", "", ONIGERR_INVALID_GROUP_OPTION); + x2("(?Ii)$", "", 0, 0); + x2("(?Ii)|", "", 0, 0); + e("(?Ii)|(?Ii)", "", ONIGERR_INVALID_GROUP_OPTION); + x2("a*", "aabcaaa", 0, 2); + x2("(?L)a*", "aabcaaa", 4, 7); + x2("(?L)a{4}|a{3}|b*", "baaaaabbb", 1, 5); + x2("(?L)a{3}|a{4}|b*", "baaaaabbb", 1, 5); + e("x(?L)xxxxx", "", ONIGERR_INVALID_GROUP_OPTION); + e("(?-L)x", "", ONIGERR_INVALID_GROUP_OPTION); + x3("(..)\\1", "abab", 0, 2, 1); + e("(?C)(..)\\1", "abab", ONIGERR_INVALID_BACKREF); + e("(?-C)", "", ONIGERR_INVALID_GROUP_OPTION); + e("(?C)(.)(.)(.)(?.)\\1", "abcdd", ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED); + x2("(?L)z|a\\g<0>a", "aazaa", 0, 5); + x2("(?Li)z|a\\g<0>a", "aazAA", 0, 5); + x2("(?Li:z|a\\g<0>a)", "aazAA", 0, 5); + x2("(?L)z|a\\g<0>a", "aazaaaazaaaa", 3, 12); + + // Issue #264 + n("(?iI)s", "\xc5\xbf"); + n("(?iI)[s]", "\xc5\xbf"); // FAIL + n("(?iI:s)", "\xc5\xbf"); + n("(?iI:[s])", "\xc5\xbf"); // FAIL + x2("(?iI)(?:[[:word:]])", "\xc5\xbf", 0, 2); + n("(?iI)(?W:[[:word:]])", "\xc5\xbf"); // FAIL + n("(?iI)(?W:\\w)", "\xc5\xbf"); + n("(?iI)(?W:[\\w])", "\xc5\xbf"); // FAIL + n("(?iI)(?W:\\p{Word})", "\xc5\xbf"); + n("(?iI)(?W:[\\p{Word}])", "\xc5\xbf"); // FAIL + + x2("(?iW:[[:word:]])", "\xc5\xbf", 0, 2); + x2("(?iW:[\\p{Word}])", "\xc5\xbf", 0, 2); + x2("(?iW:[\\w])", "\xc5\xbf", 0, 2); + n("(?iW:\\p{Word})", "\xc5\xbf"); + n("(?iW:\\w)", "\xc5\xbf"); + x2("(?i)\\p{Word}", "\xc5\xbf", 0, 2); + x2("(?i)\\w", "\xc5\xbf", 0, 2); + + x2("(?iW:[[:^word:]])", "\xc5\xbf", 0, 2); + x2("(?iW:[\\P{Word}])", "\xc5\xbf", 0, 2); + x2("(?iW:[\\W])", "\xc5\xbf", 0, 2); + x2("(?iW:\\P{Word})", "\xc5\xbf", 0, 2); + x2("(?iW:\\W)", "\xc5\xbf", 0, 2); + n("(?i)\\P{Word}", "\xc5\xbf"); + n("(?i)\\W", "\xc5\xbf"); + + x2("(?iW:[[:^word:]])", "s", 0, 1); + x2("(?iW:[\\P{Word}])", "s", 0, 1); + x2("(?iW:[\\W])", "s", 0, 1); + n("(?iW:\\P{Word})", "s"); + n("(?iW:\\W)", "s"); + n("(?i)\\P{Word}", "s"); + n("(?i)\\W", "s"); + + x2("[[:punct:]]", ":", 0, 1); + x2("[[:punct:]]", "$", 0, 1); + x2("[[:punct:]]+", "$+<=>^`|~", 0, 9); + n("[[:punct:]]", "a"); + n("[[:punct:]]", "7"); + x2("\\p{PosixPunct}+", "$¦", 0, 3); + + x2("\\A.*\\R", "\n", 0, 1); + x2("\\A\\O*\\R", "\n", 0, 1); + x2("\\A\\n*\\R", "\n", 0, 1); + x2("\\A\\R*\\R", "\n", 0, 1); + x2("\\At*\\R", "\n", 0, 1); + + x2("\\A.{0,99}\\R", "\n", 0, 1); + x2("\\A\\O{0,99}\\R", "\n", 0, 1); + x2("\\A\\n{0,99}\\R", "\n", 0, 1); + x2("\\A\\R{0,99}\\R", "\n", 0, 1); + x2("\\At{0,99}\\R", "\n", 0, 1); + + x2("\\A.*\\n", "\n", 0, 1); // \n + x2("\\A.{0,99}\\n", "\n", 0, 1); + x2("\\A.*\\O", "\n", 0, 1); // \O + x2("\\A.{0,99}\\O", "\n", 0, 1); + x2("\\A.*\\s", "\n", 0, 1); // \s + x2("\\A.{0,99}\\s", "\n", 0, 1); + + + n("a(b|)+d", "abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcd"); /* https://www.haijin-boys.com/discussions/5079 */ + n(" \xfd", ""); /* https://bugs.php.net/bug.php?id=77370 */ + /* can't use \xfc00.. because compiler error: hex escape sequence out of range */ + n("()0\\xfc00000\\xfc00000\\xfc00000\xfc", ""); /* https://bugs.php.net/bug.php?id=77371 */ + x2("000||0\xfa", "0", 0, 0); /* https://bugs.php.net/bug.php?id=77381 */ + e("(?i)000000000000000000000\xf0", "", ONIGERR_INVALID_CODE_POINT_VALUE); /* https://bugs.php.net/bug.php?id=77382 */ + n("0000\\\xf5", "0"); /* https://bugs.php.net/bug.php?id=77385 */ + n("(?i)FFF00000000000000000\xfd", ""); /* https://bugs.php.net/bug.php?id=77394 */ + n("(?x)\n (?:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?))", " while (i < len && f(array[i]))"); /* Issue #192 */ + + x2("aaaaaaaaaaaaaaaaaaaaaaaã‚b", "aaaaaaaaaaaaaaaaaaaaaaaã‚b", 0, 27); /* Issue #221 */ + n("d{65538}+{61533} ", "d{65538}+{61533} "); + + e("x{55380}{77590}", "", ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE); + e("(xyz){40000}{99999}(?vv)", "", ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE); + e("f{90000,90000}{80000,80000}", "", ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE); + n("f{90000,90000}{80000,80001}", ""); + + x2("\\p{Common}", "\xe3\x8b\xbf", 0, 3); /* U+32FF */ + x2("\\p{In_Enclosed_CJK_Letters_and_Months}", "\xe3\x8b\xbf", 0, 3); /* U+32FF */ + + e("\\x{7fffffff}", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("[\\x{7fffffff}]", "", ONIGERR_INVALID_CODE_POINT_VALUE); + e("\\u040", "@", ONIGERR_INVALID_CODE_POINT_VALUE); + e("(?\\g)", "zzzz", ONIGERR_NEVER_ENDING_RECURSION); + e("(*FOO)", "abcdefg", ONIGERR_UNDEFINED_CALLOUT_NAME); + e("*", "abc", ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED); + e("|*", "abc", ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED); + e("(?i)*", "abc", ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED); + e("(?:*)", "abc", ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED); + e("(?m:*)", "abc", ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED); + x2("(?:)*", "abc", 0, 0); + e("^*", "abc", ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID); + e("abc|?", "", ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED); + + fprintf(stdout, + "\nRESULT SUCC: %4d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n", + nsucc, nfail, nerror, onig_version()); + + onig_region_free(region, 1); + onig_end(); + + return ((nfail == 0 && nerror == 0) ? 0 : -1); +} diff --git a/internal/components/third_party/oniguruma/test/testc.c b/internal/components/third_party/oniguruma/test/testc.c new file mode 100644 index 0000000000..6c4125c0c3 --- /dev/null +++ b/internal/components/third_party/oniguruma/test/testc.c @@ -0,0 +1,914 @@ +/* + * testc.c + * Copyright (c) 2019-2021 K.Kosako + */ +#include +#include + +#include "oniguruma.h" + +#define SLEN(s) strlen(s) + +static int nsucc = 0; +static int nfail = 0; +static int nerror = 0; + +#ifdef __TRUSTINSOFT_ANALYZER__ +static int nall = 0; +#endif + +static FILE* err_file; +static OnigRegion* region; + +static void xx(char* pattern, char* str, int from, int to, int mem, int not) +{ +#ifdef __TRUSTINSOFT_ANALYZER__ + if (nall++ % TIS_TEST_CHOOSE_MAX != TIS_TEST_CHOOSE_CURRENT) return; +#endif + + int r; + regex_t* reg; + OnigErrorInfo einfo; + + r = onig_new(®, (UChar* )pattern, (UChar* )(pattern + SLEN(pattern)), + ONIG_OPTION_DEFAULT, ONIG_ENCODING_EUC_JP, ONIG_SYNTAX_DEFAULT, &einfo); + if (r) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(err_file, "ERROR: %s\n", s); + nerror++; + return ; + } + + r = onig_search(reg, (UChar* )str, (UChar* )(str + SLEN(str)), + (UChar* )str, (UChar* )(str + SLEN(str)), + region, ONIG_OPTION_NONE); + if (r < ONIG_MISMATCH) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + fprintf(err_file, "ERROR: %s\n", s); + nerror++; + return ; + } + + if (r == ONIG_MISMATCH) { + if (not) { + fprintf(stdout, "OK(N): /%s/ '%s'\n", pattern, str); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s'\n", pattern, str); + nfail++; + } + } + else { + if (not) { + fprintf(stdout, "FAIL(N): /%s/ '%s'\n", pattern, str); + nfail++; + } + else { + if (region->beg[mem] == from && region->end[mem] == to) { + fprintf(stdout, "OK: /%s/ '%s'\n", pattern, str); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str, + from, to, region->beg[mem], region->end[mem]); + nfail++; + } + } + } + onig_free(reg); +} + +static void x2(char* pattern, char* str, int from, int to) +{ + xx(pattern, str, from, to, 0, 0); +} + +static void x3(char* pattern, char* str, int from, int to, int mem) +{ + xx(pattern, str, from, to, mem, 0); +} + +static void n(char* pattern, char* str) +{ + xx(pattern, str, 0, 0, 0, 1); +} + +extern int main(int argc, char* argv[]) +{ + OnigEncoding use_encs[1]; + + use_encs[0] = ONIG_ENCODING_EUC_JP; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + + err_file = stdout; + region = onig_region_new(); + + x2("", "", 0, 0); + x2("^", "", 0, 0); + x2("$", "", 0, 0); + x2("\\G", "", 0, 0); + x2("\\A", "", 0, 0); + x2("\\Z", "", 0, 0); + x2("\\z", "", 0, 0); + x2("^$", "", 0, 0); + x2("\\ca", "\001", 0, 1); + x2("\\C-b", "\002", 0, 1); + x2("\\c\\\\", "\034", 0, 1); + x2("q[\\c\\\\]", "q\034", 0, 2); + x2("", "a", 0, 0); + x2("a", "a", 0, 1); + x2("\\x61", "a", 0, 1); + x2("aa", "aa", 0, 2); + x2("aaa", "aaa", 0, 3); + x2("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 0, 35); + x2("ab", "ab", 0, 2); + x2("b", "ab", 1, 2); + x2("bc", "abc", 1, 3); + x2("(?i:#RET#)", "#INS##RET#", 5, 10); + x2("\\17", "\017", 0, 1); + x2("\\x1f", "\x1f", 0, 1); + x2("a(?#....\\\\JJJJ)b", "ab", 0, 2); + x2("(?x) G (o O(?-x)oO) g L", "GoOoOgLe", 0, 7); + x2(".", "a", 0, 1); + n(".", ""); + x2("..", "ab", 0, 2); + x2("\\w", "e", 0, 1); + n("\\W", "e"); + x2("\\s", " ", 0, 1); + x2("\\S", "b", 0, 1); + x2("\\d", "4", 0, 1); + n("\\D", "4"); + x2("\\b", "z ", 0, 0); + x2("\\b", " z", 1, 1); + x2("\\B", "zz ", 1, 1); + x2("\\B", "z ", 2, 2); + x2("\\B", " z", 0, 0); + x2("[ab]", "b", 0, 1); + n("[ab]", "c"); + x2("[a-z]", "t", 0, 1); + n("[^a]", "a"); + x2("[^a]", "\n", 0, 1); + x2("[]]", "]", 0, 1); + n("[^]]", "]"); + x2("[\\^]+", "0^^1", 1, 3); + x2("[b-]", "b", 0, 1); + x2("[b-]", "-", 0, 1); + x2("[\\w]", "z", 0, 1); + n("[\\w]", " "); + x2("[\\W]", "b$", 1, 2); + x2("[\\d]", "5", 0, 1); + n("[\\d]", "e"); + x2("[\\D]", "t", 0, 1); + n("[\\D]", "3"); + x2("[\\s]", " ", 0, 1); + n("[\\s]", "a"); + x2("[\\S]", "b", 0, 1); + n("[\\S]", " "); + x2("[\\w\\d]", "2", 0, 1); + n("[\\w\\d]", " "); + x2("[[:upper:]]", "B", 0, 1); + x2("[*[:xdigit:]+]", "+", 0, 1); + x2("[*[:xdigit:]+]", "GHIKK-9+*", 6, 7); + x2("[*[:xdigit:]+]", "-@^+", 3, 4); + n("[[:upper]]", "A"); + x2("[[:upper]]", ":", 0, 1); + x2("[\\044-\\047]", "\046", 0, 1); + x2("[\\x5a-\\x5c]", "\x5b", 0, 1); + x2("[\\x6A-\\x6D]", "\x6c", 0, 1); + n("[\\x6A-\\x6D]", "\x6E"); + n("^[0-9A-F]+ 0+ UNDEF ", "75F 00000000 SECT14A notype () External | _rb_apply"); + x2("[\\[]", "[", 0, 1); + x2("[\\]]", "]", 0, 1); + x2("[&]", "&", 0, 1); + x2("[[ab]]", "b", 0, 1); + x2("[[ab]c]", "c", 0, 1); + n("[[^a]]", "a"); + n("[^[a]]", "a"); + x2("[[ab]&&bc]", "b", 0, 1); + n("[[ab]&&bc]", "a"); + n("[[ab]&&bc]", "c"); + x2("[a-z&&b-y&&c-x]", "w", 0, 1); + n("[^a-z&&b-y&&c-x]", "w"); + x2("[[^a&&a]&&a-z]", "b", 0, 1); + n("[[^a&&a]&&a-z]", "a"); + x2("[[^a-z&&bcdef]&&[^c-g]]", "h", 0, 1); + n("[[^a-z&&bcdef]&&[^c-g]]", "c"); + x2("[^[^abc]&&[^cde]]", "c", 0, 1); + x2("[^[^abc]&&[^cde]]", "e", 0, 1); + n("[^[^abc]&&[^cde]]", "f"); + x2("[a-&&-a]", "-", 0, 1); + n("[a\\-&&\\-a]", "&"); + n("\\wabc", " abc"); + x2("a\\Wbc", "a bc", 0, 4); + x2("a.b.c", "aabbc", 0, 5); + x2(".\\wb\\W..c", "abb bcc", 0, 7); + x2("\\s\\wzzz", " zzzz", 0, 5); + x2("aa.b", "aabb", 0, 4); + n(".a", "ab"); + x2(".a", "aa", 0, 2); + x2("^a", "a", 0, 1); + x2("^a$", "a", 0, 1); + x2("^\\w$", "a", 0, 1); + n("^\\w$", " "); + x2("^\\wab$", "zab", 0, 3); + x2("^\\wabcdef$", "zabcdef", 0, 7); + x2("^\\w...def$", "zabcdef", 0, 7); + x2("\\w\\w\\s\\Waaa\\d", "aa aaa4", 0, 8); + x2("\\A\\Z", "", 0, 0); + x2("\\Axyz", "xyz", 0, 3); + x2("xyz\\Z", "xyz", 0, 3); + x2("xyz\\z", "xyz", 0, 3); + x2("a\\Z", "a", 0, 1); + x2("\\Gaz", "az", 0, 2); + n("\\Gz", "bza"); + n("az\\G", "az"); + n("az\\A", "az"); + n("a\\Az", "az"); + x2("\\^\\$", "^$", 0, 2); + x2("^x?y", "xy", 0, 2); + x2("^(x?y)", "xy", 0, 2); + x2("\\w", "_", 0, 1); + n("\\W", "_"); + x2("(?=z)z", "z", 0, 1); + n("(?=z).", "a"); + x2("(?!z)a", "a", 0, 1); + n("(?!z)a", "z"); + x2("(?i:a)", "a", 0, 1); + x2("(?i:a)", "A", 0, 1); + x2("(?i:A)", "a", 0, 1); + n("(?i:A)", "b"); + x2("(?i:[A-Z])", "a", 0, 1); + x2("(?i:[f-m])", "H", 0, 1); + x2("(?i:[f-m])", "h", 0, 1); + n("(?i:[f-m])", "e"); + x2("(?i:[A-c])", "D", 0, 1); + n("(?i:[^a-z])", "A"); + n("(?i:[^a-z])", "a"); + x2("(?i:[!-k])", "Z", 0, 1); + x2("(?i:[!-k])", "7", 0, 1); + x2("(?i:[T-}])", "b", 0, 1); + x2("(?i:[T-}])", "{", 0, 1); + x2("(?i:\\?a)", "?A", 0, 2); + x2("(?i:\\*A)", "*a", 0, 2); + n(".", "\n"); + x2("(?m:.)", "\n", 0, 1); + x2("(?m:a.)", "a\n", 0, 2); + x2("(?m:.b)", "a\nb", 1, 3); + x2(".*abc", "dddabdd\nddabc", 8, 13); + x2("(?m:.*abc)", "dddabddabc", 0, 10); + n("(?i)(?-i)a", "A"); + n("(?i)(?-i:a)", "A"); + x2("a?", "", 0, 0); + x2("a?", "b", 0, 0); + x2("a?", "a", 0, 1); + x2("a*", "", 0, 0); + x2("a*", "a", 0, 1); + x2("a*", "aaa", 0, 3); + x2("a*", "baaaa", 0, 0); + n("a+", ""); + x2("a+", "a", 0, 1); + x2("a+", "aaaa", 0, 4); + x2("a+", "aabbb", 0, 2); + x2("a+", "baaaa", 1, 5); + x2(".?", "", 0, 0); + x2(".?", "f", 0, 1); + x2(".?", "\n", 0, 0); + x2(".*", "", 0, 0); + x2(".*", "abcde", 0, 5); + x2(".+", "z", 0, 1); + x2(".+", "zdswer\n", 0, 6); + x2("(.*)a\\1f", "babfbac", 0, 4); + x2("(.*)a\\1f", "bacbabf", 3, 7); + x2("((.*)a\\2f)", "bacbabf", 3, 7); + x2("(.*)a\\1f", "baczzzzzz\nbazz\nzzzzbabf", 19, 23); + x2("a|b", "a", 0, 1); + x2("a|b", "b", 0, 1); + x2("|a", "a", 0, 0); + x2("(|a)", "a", 0, 0); + x2("ab|bc", "ab", 0, 2); + x2("ab|bc", "bc", 0, 2); + x2("z(?:ab|bc)", "zbc", 0, 3); + x2("a(?:ab|bc)c", "aabc", 0, 4); + x2("ab|(?:ac|az)", "az", 0, 2); + x2("a|b|c", "dc", 1, 2); + x2("a|b|cd|efg|h|ijk|lmn|o|pq|rstuvwx|yz", "pqr", 0, 2); + n("a|b|cd|efg|h|ijk|lmn|o|pq|rstuvwx|yz", "mn"); + x2("a|^z", "ba", 1, 2); + x2("a|^z", "za", 0, 1); + x2("a|\\Gz", "bza", 2, 3); + x2("a|\\Gz", "za", 0, 1); + x2("a|\\Az", "bza", 2, 3); + x2("a|\\Az", "za", 0, 1); + x2("a|b\\Z", "ba", 1, 2); + x2("a|b\\Z", "b", 0, 1); + x2("a|b\\z", "ba", 1, 2); + x2("a|b\\z", "b", 0, 1); + x2("\\w|\\s", " ", 0, 1); + n("\\w|\\w", " "); + x2("\\w|%", "%", 0, 1); + x2("\\w|[&$]", "&", 0, 1); + x2("[b-d]|[^e-z]", "a", 0, 1); + x2("(?:a|[c-f])|bz", "dz", 0, 1); + x2("(?:a|[c-f])|bz", "bz", 0, 2); + x2("abc|(?=zz)..f", "zzf", 0, 3); + x2("abc|(?!zz)..f", "abf", 0, 3); + x2("(?=za)..a|(?=zz)..a", "zza", 0, 3); + n("(?>a|abd)c", "abdc"); + x2("(?>abd|a)c", "abdc", 0, 4); + x2("a?|b", "a", 0, 1); + x2("a?|b", "b", 0, 0); + x2("a?|b", "", 0, 0); + x2("a*|b", "aa", 0, 2); + x2("a*|b*", "ba", 0, 0); + x2("a*|b*", "ab", 0, 1); + x2("a+|b*", "", 0, 0); + x2("a+|b*", "bbb", 0, 3); + x2("a+|b*", "abbb", 0, 1); + n("a+|b+", ""); + x2("(a|b)?", "b", 0, 1); + x2("(a|b)*", "ba", 0, 2); + x2("(a|b)+", "bab", 0, 3); + x2("(ab|ca)+", "caabbc", 0, 4); + x2("(ab|ca)+", "aabca", 1, 5); + x2("(ab|ca)+", "abzca", 0, 2); + x2("(a|bab)+", "ababa", 0, 5); + x2("(a|bab)+", "ba", 1, 2); + x2("(a|bab)+", "baaaba", 1, 4); + x2("(?:a|b)(?:a|b)", "ab", 0, 2); + x2("(?:a*|b*)(?:a*|b*)", "aaabbb", 0, 3); + x2("(?:a*|b*)(?:a+|b+)", "aaabbb", 0, 6); + x2("(?:a+|b+){2}", "aaabbb", 0, 6); + x2("h{0,}", "hhhh", 0, 4); + x2("(?:a+|b+){1,2}", "aaabbb", 0, 6); + n("ax{2}*a", "0axxxa1"); + n("a.{0,2}a", "0aXXXa0"); + n("a.{0,2}?a", "0aXXXa0"); + n("a.{0,2}?a", "0aXXXXa0"); + x2("^a{2,}?a$", "aaa", 0, 3); + x2("^[a-z]{2,}?$", "aaa", 0, 3); + x2("(?:a+|\\Ab*)cc", "cc", 0, 2); + n("(?:a+|\\Ab*)cc", "abcc"); + x2("(?:^a+|b+)*c", "aabbbabc", 6, 8); + x2("(?:^a+|b+)*c", "aabbbbc", 0, 7); + x2("a|(?i)c", "C", 0, 1); + x2("(?i)c|a", "C", 0, 1); + x2("(?i)c|a", "A", 0, 1); + x2("(?i:c)|a", "C", 0, 1); + n("(?i:c)|a", "A"); + x2("[abc]?", "abc", 0, 1); + x2("[abc]*", "abc", 0, 3); + x2("[^abc]*", "abc", 0, 0); + n("[^abc]+", "abc"); + x2("a?\?", "aaa", 0, 0); + x2("ba?\?b", "bab", 0, 3); + x2("a*?", "aaa", 0, 0); + x2("ba*?", "baa", 0, 1); + x2("ba*?b", "baab", 0, 4); + x2("a+?", "aaa", 0, 1); + x2("ba+?", "baa", 0, 2); + x2("ba+?b", "baab", 0, 4); + x2("(?:a?)?\?", "a", 0, 0); + x2("(?:a?\?)?", "a", 0, 0); + x2("(?:a?)+?", "aaa", 0, 1); + x2("(?:a+)?\?", "aaa", 0, 0); + x2("(?:a+)?\?b", "aaab", 0, 4); + x2("(?:ab)?{2}", "", 0, 0); + x2("(?:ab)?{2}", "ababa", 0, 4); + x2("(?:ab)*{0}", "ababa", 0, 0); + x2("(?:ab){3,}", "abababab", 0, 8); + n("(?:ab){3,}", "abab"); + x2("(?:ab){2,4}", "ababab", 0, 6); + x2("(?:ab){2,4}", "ababababab", 0, 8); + x2("(?:ab){2,4}?", "ababababab", 0, 4); + x2("(?:ab){,}", "ab{,}", 0, 5); + x2("(?:abc)+?{2}", "abcabcabc", 0, 6); + x2("(?:X*)(?i:xa)", "XXXa", 0, 4); + x2("(d+)([^abc]z)", "dddz", 0, 4); + x2("([^abc]*)([^abc]z)", "dddz", 0, 4); + x2("(\\w+)(\\wz)", "dddz", 0, 4); + x3("(a)", "a", 0, 1, 1); + x3("(ab)", "ab", 0, 2, 1); + x2("((ab))", "ab", 0, 2); + x3("((ab))", "ab", 0, 2, 1); + x3("((ab))", "ab", 0, 2, 2); + x3("((((((((((((((((((((ab))))))))))))))))))))", "ab", 0, 2, 20); + x3("(ab)(cd)", "abcd", 0, 2, 1); + x3("(ab)(cd)", "abcd", 2, 4, 2); + x3("()(a)bc(def)ghijk", "abcdefghijk", 3, 6, 3); + x3("(()(a)bc(def)ghijk)", "abcdefghijk", 3, 6, 4); + x2("(^a)", "a", 0, 1); + x3("(a)|(a)", "ba", 1, 2, 1); + x3("(^a)|(a)", "ba", 1, 2, 2); + x3("(a?)", "aaa", 0, 1, 1); + x3("(a*)", "aaa", 0, 3, 1); + x3("(a*)", "", 0, 0, 1); + x3("(a+)", "aaaaaaa", 0, 7, 1); + x3("(a+|b*)", "bbbaa", 0, 3, 1); + x3("(a+|b?)", "bbbaa", 0, 1, 1); + x3("(abc)?", "abc", 0, 3, 1); + x3("(abc)*", "abc", 0, 3, 1); + x3("(abc)+", "abc", 0, 3, 1); + x3("(xyz|abc)+", "abc", 0, 3, 1); + x3("([xyz][abc]|abc)+", "abc", 0, 3, 1); + x3("((?i:abc))", "AbC", 0, 3, 1); + x2("(abc)(?i:\\1)", "abcABC", 0, 6); + x3("((?m:a.c))", "a\nc", 0, 3, 1); + x3("((?=az)a)", "azb", 0, 1, 1); + x3("abc|(.abd)", "zabd", 0, 4, 1); + x2("(?:abc)|(ABC)", "abc", 0, 3); + x3("(?i:(abc))|(zzz)", "ABC", 0, 3, 1); + x3("a*(.)", "aaaaz", 4, 5, 1); + x3("a*?(.)", "aaaaz", 0, 1, 1); + x3("a*?(c)", "aaaac", 4, 5, 1); + x3("[bcd]a*(.)", "caaaaz", 5, 6, 1); + x3("(\\Abb)cc", "bbcc", 0, 2, 1); + n("(\\Abb)cc", "zbbcc"); + x3("(^bb)cc", "bbcc", 0, 2, 1); + n("(^bb)cc", "zbbcc"); + x3("cc(bb$)", "ccbb", 2, 4, 1); + n("cc(bb$)", "ccbbb"); + n("(\\1)", ""); + n("\\1(a)", "aa"); + n("(a(b)\\1)\\2+", "ababb"); + n("(?:(?:\\1|z)(a))+$", "zaa"); + x2("(?:(?:\\1|z)(a))+$", "zaaa", 0, 4); + x2("(a)(?=\\1)", "aa", 0, 1); + n("(a)$|\\1", "az"); + x2("(a)\\1", "aa", 0, 2); + n("(a)\\1", "ab"); + x2("(a?)\\1", "aa", 0, 2); + x2("(a?\?)\\1", "aa", 0, 0); + x2("(a*)\\1", "aaaaa", 0, 4); + x3("(a*)\\1", "aaaaa", 0, 2, 1); + x2("a(b*)\\1", "abbbb", 0, 5); + x2("a(b*)\\1", "ab", 0, 1); + x2("(a*)(b*)\\1\\2", "aaabbaaabb", 0, 10); + x2("(a*)(b*)\\2", "aaabbbb", 0, 7); + x2("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 8); + x3("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 3, 7); + x2("(a)(b)(c)\\2\\1\\3", "abcbac", 0, 6); + x2("([a-d])\\1", "cc", 0, 2); + x2("(\\w\\d\\s)\\1", "f5 f5 ", 0, 6); + n("(\\w\\d\\s)\\1", "f5 f5"); + x2("(who|[a-c]{3})\\1", "whowho", 0, 6); + x2("...(who|[a-c]{3})\\1", "abcwhowho", 0, 9); + x2("(who|[a-c]{3})\\1", "cbccbc", 0, 6); + x2("(^a)\\1", "aa", 0, 2); + n("(^a)\\1", "baa"); + n("(a$)\\1", "aa"); + n("(ab\\Z)\\1", "ab"); + x2("(a*\\Z)\\1", "a", 1, 1); + x2(".(a*\\Z)\\1", "ba", 1, 2); + x3("(.(abc)\\2)", "zabcabc", 0, 7, 1); + x3("(.(..\\d.)\\2)", "z12341234", 0, 9, 1); + x2("((?i:az))\\1", "AzAz", 0, 4); + n("((?i:az))\\1", "Azaz"); + x2("(?<=a)b", "ab", 1, 2); + n("(?<=a)b", "bb"); + x2("(?<=a|b)b", "bb", 1, 2); + x2("(?<=a|bc)b", "bcb", 2, 3); + x2("(?<=a|bc)b", "ab", 1, 2); + x2("(?<=a|bc||defghij|klmnopq|r)z", "rz", 1, 2); + x2("(a)\\g<1>", "aa", 0, 2); + x2("(?a)", "a", 0, 1); + x2("(?ab)\\g", "abab", 0, 4); + x2("(?.zv.)\\k", "azvbazvb", 0, 8); + x2("(?<=\\g)|-\\zEND (?XyZ)", "XyZ", 3, 3); + x2("(?|a\\g)+", "", 0, 0); + x2("(?|\\(\\g\\))+$", "()(())", 0, 6); + x3("\\g(?.){0}", "X", 0, 1, 1); + x2("\\g(abc|df(?.YZ){2,8}){0}", "XYZ", 0, 3); + x2("\\A(?(a\\g)|)\\z", "aaaa", 0, 4); + x2("(?|\\g\\g)\\z|\\zEND (?a|(b)\\g)", "bbbbabba", 0, 8); + x2("(?\\w+\\sx)a+\\k", " fg xaaaaaaaafg x", 2, 18); + x3("(z)()()(?<_9>a)\\g<_9>", "zaa", 2, 3, 1); + x2("(.)(((?<_>a)))\\k<_>", "zaa", 0, 3); + x2("((?\\d)|(?\\w))(\\k|\\k)", "ff", 0, 2); + x2("(?:(?)|(?efg))\\k", "", 0, 0); + x2("(?:(?abc)|(?efg))\\k", "abcefgefg", 3, 9); + n("(?:(?abc)|(?efg))\\k", "abcefg"); + x2("(?:(?.)|(?..)|(?...)|(?....)|(?.....)|(?......)|(?.......)|(?........)|(?.........)|(?..........)|(?...........)|(?............)|(?.............)|(?..............))\\k$", "a-pyumpyum", 2, 10); + x3("(?:(?.)|(?..)|(?...)|(?....)|(?.....)|(?......)|(?.......)|(?........)|(?.........)|(?..........)|(?...........)|(?............)|(?.............)|(?..............))\\k$", "xxxxabcdefghijklmnabcdefghijklmn", 4, 18, 14); + x3("(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?aaa)(?)$", "aaa", 0, 3, 16); + x2("(?a|\\(\\g\\))", "a", 0, 1); + x2("(?a|\\(\\g\\))", "((((((a))))))", 0, 13); + x3("(?a|\\(\\g\\))", "((((((((a))))))))", 0, 17, 1); + x2("\\g|\\zEND(?.*abc$)", "abcxxxabc", 0, 9); + x2("\\g<1>|\\zEND(.a.)", "bac", 0, 3); + x3("\\g<_A>\\g<_A>|\\zEND(.a.)(?<_A>.b.)", "xbxyby", 3, 6, 1); + x2("\\A(?:\\g|\\g|\\zEND (?a|c\\gc)(?b|d\\gd))$", "cdcbcdc", 0, 7); + x2("\\A(?|a\\g)\\z|\\zEND (?\\g)", "aaaa", 0, 4); + x2("(?(a|b\\gc){3,5})", "baaaaca", 1, 5); + x2("(?(a|b\\gc){3,5})", "baaaacaaaaa", 0, 10); + x2("(?\\(([^\\(\\)]++|\\g)*+\\))", "((a))", 0, 5); + x2("()*\\1", "", 0, 0); + x2("(?:()|())*\\1\\2", "", 0, 0); + x3("(?:\\1a|())*", "a", 0, 0, 1); + x2("x((.)*)*x", "0x1x2x3", 1, 6); + x2("x((.)*)*x(?i:\\1)\\Z", "0x1x2x1X2", 1, 9); + x2("(?:()|()|()|()|()|())*\\2\\5", "", 0, 0); + x2("(?:()|()|()|(x)|()|())*\\2b\\5", "b", 0, 1); + x2("\\xED\\xF2", "\xed\xf2", 0, 2); + x2("[0-9-a]", "-", 0, 1); // PR#44 + n("[0-9-a]", ":"); // PR#44 + x3("(\\(((?:[^(]|\\g<1>)*)\\))", "(abc)(abc)", 1, 4, 2); // PR#43 + x2("\\o{101}", "A", 0, 1); + x2("(?:\\k'+1'B|(A)C)*", "ACAB", 0, 4); // relative backref by positive number + x2("\\g<+2>(abc)(ABC){0}", "ABCabc", 0, 6); // relative call by positive number + x2("A\\g'0'|B()", "AAAAB", 0, 5); + x3("(A\\g'0')|B", "AAAAB", 0, 5, 1); + x2("(a*)(?(1))aa", "aaaaa", 0, 5); + x2("(a*)(?(-1))aa", "aaaaa", 0, 5); + x2("(?aaa)(?('name'))aa", "aaaaa", 0, 5); + x2("(a)(?(1)aa|bb)a", "aaaaa", 0, 4); + x2("(?:aa|())(?(<1>)aa|bb)a", "aabba", 0, 5); + x2("(?:aa|())(?('1')aa|bb|cc)a", "aacca", 0, 5); + x3("(a*)(?(1)aa|a)b", "aaab", 0, 1, 1); + n("(a)(?(1)a|b)c", "abc"); + x2("(a)(?(1)|)c", "ac", 0, 2); + n("(?()aaa|bbb)", "bbb"); + x2("(a)(?(1+0)b|c)d", "abd", 0, 3); + x2("(?:(?'name'a)|(?'name'b))(?('name')c|d)e", "ace", 0, 3); + x2("(?:(?'name'a)|(?'name'b))(?('name')c|d)e", "bce", 0, 3); + x2("\\R", "\r\n", 0, 2); + x2("\\R", "\r", 0, 1); + x2("\\R", "\n", 0, 1); + x2("\\R", "\x0b", 0, 1); + n("\\R\\n", "\r\n"); + n("\\R", "\xc2\x85"); // because euc-jp is not Unicode + x2("\\N", "a", 0, 1); + n("\\N", "\n"); + n("(?m:\\N)", "\n"); + n("(?-m:\\N)", "\n"); + x2("\\O", "a", 0, 1); + x2("\\O", "\n", 0, 1); + x2("(?m:\\O)", "\n", 0, 1); + x2("(?-m:\\O)", "\n", 0, 1); + x2("\\K", "a", 0, 0); + x2("a\\K", "a", 1, 1); + x2("a\\Kb", "ab", 1, 2); + x2("(a\\Kb|ac\\Kd)", "acd", 2, 3); + x2("(a\\Kb|\\Kac\\K)*", "acababacab", 9, 10); + + x2("(?~)", "", 0, 0); + x2("(?~)", "A", 0, 0); + x2("aaaaa(?~)", "aaaaaaaaaa", 0, 5); + x2("(?~(?:|aaa))", "aaa", 0, 0); + x2("(?~aaa|)", "aaa", 0, 0); + x2("a(?~(?~)).", "abcdefghijklmnopqrstuvwxyz", 0, 26); // !!! + x2("/\\*(?~\\*/)\\*/", "/* */ */", 0, 5); + x2("(?~\\w+)zzzzz", "zzzzz", 0, 5); + x2("(?~\\w*)zzzzz", "zzzzz", 0, 5); + x2("(?~A.C|B)", "ABC", 0, 0); + x2("(?~XYZ|ABC)a", "ABCa", 1, 4); + x2("(?~XYZ|ABC)a", "aABCa", 0, 1); + x2("<[^>]*>(?~[<>])]*>", "vvv ", 0, 10); + x2("(?~ab)", "ccc\ndab", 0, 5); + x2("(?m:(?~ab))", "ccc\ndab", 0, 5); + x2("(?-m:(?~ab))", "ccc\ndab", 0, 5); + x2("(?~abc)xyz", "xyz012345678901234567890123456789abc", 0, 3); + + // absent with expr + x2("(?~|78|\\d*)", "123456789", 0, 6); + x2("(?~|def|(?:abc|de|f){0,100})", "abcdedeabcfdefabc", 0, 11); + x2("(?~|ab|.*)", "ccc\nddd", 0, 3); + x2("(?~|ab|\\O*)", "ccc\ndab", 0, 5); + x2("(?~|ab|\\O{2,10})", "ccc\ndab", 0, 5); + x2("(?~|ab|\\O{1,10})", "ab", 1, 2); + n("(?~|ab|\\O{2,10})", "ab"); + x2("(?~|abc|\\O{1,10})", "abc", 1, 3); + x2("(?~|ab|\\O{5,10})|abc", "abc", 0, 3); + x2("(?~|ab|\\O{1,10})", "cccccccccccab", 0, 10); + x2("(?~|aaa|)", "aaa", 0, 0); + x2("(?~||a*)", "aaaaaa", 0, 0); + x2("(?~||a*?)", "aaaaaa", 0, 0); + x2("(a)(?~|b|\\1)", "aaaaaa", 0, 2); + x2("(a)(?~|bb|(?:a\\1)*)", "aaaaaa", 0, 5); + x2("(b|c)(?~|abac|(?:a\\1)*)", "abababacabab", 1, 4); + n("(?~|c|a*+)a", "aaaaa"); + x2("(?~|aaaaa|a*+)", "aaaaa", 0, 0); + x2("(?~|aaaaaa|a*+)b", "aaaaaab", 1, 7); + x2("(?~|abcd|(?>))", "zzzabcd", 0, 0); + x2("(?~|abc|a*?)", "aaaabc", 0, 0); + + // absent stopper + x2("(?~|abc)a*", "aaaaaabc", 0, 5); + x2("(?~|abc)a*z|aaaaaabc", "aaaaaabc", 0, 8); + x2("(?~|aaaaaa)a*", "aaaaaa", 0, 0); + x2("(?~|abc)aaaa|aaaabc", "aaaabc", 0, 6); + x2("(?>(?~|abc))aaaa|aaaabc", "aaaabc", 0, 6); + x2("(?~|)a", "a", 0, 1); + n("(?~|a)a", "a"); + x2("(?~|a)(?~|)a", "a", 0, 1); + x2("(?~|a).*(?~|)a", "bbbbbbbbbbbbbbbbbbbba", 0, 21); + x2("(?~|abc).*(xyz|pqr)(?~|)abc", "aaaaxyzaaapqrabc", 0, 16); + x2("(?~|abc).*(xyz|pqr)(?~|)abc", "aaaaxyzaaaabcpqrabc", 11, 19); + n("\\A(?~|abc).*(xyz|pqrabc)(?~|)abc", "aaaaxyzaaaabcpqrabcabc"); + x2("(?~|a)(?~|)c|ab|a|", "ab", 0, 2); + x2("(?~|a)((?~|)c|ab|a|)", "ab", 0, 0); + x2("(?~|a)((?>(?~|))c|ab|a|)", "ab", 0, 0); + + // extended grapheme cluster + + // CR + LF + n(".\\y\\O", "\x0d\x0a"); + x2(".\\Y\\O", "\x0d\x0a", 0, 2); + n("\\X\\X", "\x0d\x0a"); + x2("^\\X$", "\x0d\x0a", 0, 2); + x2("^\\X\\X\\X$", "ab\x0d\x0a", 0, 4); + + x2("", "¤¢", 0, 0); + x2("¤¢", "¤¢", 0, 2); + n("¤¤", "¤¢"); + x2("¤¦¤¦", "¤¦¤¦", 0, 4); + x2("¤¢¤¤¤¦", "¤¢¤¤¤¦", 0, 6); + x2("¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³", "¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³¤³", 0, 70); + x2("¤¢", "¤¤¤¢", 2, 4); + x2("¤¤¤¦", "¤¢¤¤¤¦", 2, 6); + x2("\\xca\\xb8", "\xca\xb8", 0, 2); + x2(".", "¤¢", 0, 2); + x2("..", "¤«¤­", 0, 4); + x2("\\w", "¤ª", 0, 2); + n("\\W", "¤¢"); + x2("[\\W]", "¤¦$", 2, 3); + x2("\\S", "¤½", 0, 2); + x2("\\S", "´Á", 0, 2); + x2("\\b", "µ¤ ", 0, 0); + x2("\\b", " ¤Û", 1, 1); + x2("\\B", "¤»¤½ ", 2, 2); + x2("\\B", "¤¦ ", 3, 3); + x2("\\B", " ¤¤", 0, 0); + x2("[¤¿¤Á]", "¤Á", 0, 2); + n("[¤Ê¤Ë]", "¤Ì"); + x2("[¤¦-¤ª]", "¤¨", 0, 2); + n("[^¤±]", "¤±"); + x2("[\\w]", "¤Í", 0, 2); + n("[\\d]", "¤Õ"); + x2("[\\D]", "¤Ï", 0, 2); + n("[\\s]", "¤¯"); + x2("[\\S]", "¤Ø", 0, 2); + x2("[\\w\\d]", "¤è", 0, 2); + x2("[\\w\\d]", " ¤è", 3, 5); + n("\\wµ´¼Ö", " µ´¼Ö"); + x2("µ´\\W¼Ö", "µ´ ¼Ö", 0, 5); + x2("¤¢.¤¤.¤¦", "¤¢¤¢¤¤¤¤¤¦", 0, 10); + x2(".\\w¤¦\\W..¤¾", "¤¨¤¦¤¦ ¤¦¤¾¤¾", 0, 13); + x2("\\s\\w¤³¤³¤³", " ¤³¤³¤³¤³", 0, 9); + x2("¤¢¤¢.¤±", "¤¢¤¢¤±¤±", 0, 8); + n(".¤¤", "¤¤¤¨"); + x2(".¤ª", "¤ª¤ª", 0, 4); + x2("^¤¢", "¤¢", 0, 2); + x2("^¤à$", "¤à", 0, 2); + x2("^\\w$", "¤Ë", 0, 2); + x2("^\\w¤«¤­¤¯¤±¤³$", "z¤«¤­¤¯¤±¤³", 0, 11); + x2("^\\w...¤¦¤¨¤ª$", "z¤¢¤¤¤¦¤¦¤¨¤ª", 0, 13); + x2("\\w\\w\\s\\W¤ª¤ª¤ª\\d", "a¤ª ¤ª¤ª¤ª4", 0, 12); + x2("\\A¤¿¤Á¤Ä", "¤¿¤Á¤Ä", 0, 6); + x2("¤à¤á¤â\\Z", "¤à¤á¤â", 0, 6); + x2("¤«¤­¤¯\\z", "¤«¤­¤¯", 0, 6); + x2("¤«¤­¤¯\\Z", "¤«¤­¤¯\n", 0, 6); + x2("\\G¤Ý¤Ô", "¤Ý¤Ô", 0, 4); + n("\\G¤¨", "¤¦¤¨¤ª"); + n("¤È¤Æ\\G", "¤È¤Æ"); + n("¤Þ¤ß\\A", "¤Þ¤ß"); + n("¤Þ\\A¤ß", "¤Þ¤ß"); + x2("(?=¤»)¤»", "¤»", 0, 2); + n("(?=¤¦).", "¤¤"); + x2("(?!¤¦)¤«", "¤«", 0, 2); + n("(?!¤È)¤¢", "¤È"); + x2("(?i:¤¢)", "¤¢", 0, 2); + x2("(?i:¤Ö¤Ù)", "¤Ö¤Ù", 0, 4); + n("(?i:¤¤)", "¤¦"); + x2("(?m:¤è.)", "¤è\n", 0, 3); + x2("(?m:.¤á)", "¤Þ\n¤á", 2, 5); + x2("¤¢?", "", 0, 0); + x2("ÊÑ?", "²½", 0, 0); + x2("ÊÑ?", "ÊÑ", 0, 2); + x2("ÎÌ*", "", 0, 0); + x2("ÎÌ*", "ÎÌ", 0, 2); + x2("»Ò*", "»Ò»Ò»Ò", 0, 6); + x2("ÇÏ*", "¼¯ÇÏÇÏÇÏÇÏ", 0, 0); + n("»³+", ""); + x2("²Ï+", "²Ï", 0, 2); + x2("»þ+", "»þ»þ»þ»þ", 0, 8); + x2("¤¨+", "¤¨¤¨¤¦¤¦¤¦", 0, 4); + x2("¤¦+", "¤ª¤¦¤¦¤¦¤¦", 2, 10); + x2(".?", "¤¿", 0, 2); + x2(".*", "¤Ñ¤Ô¤×¤Ú", 0, 8); + x2(".+", "¤í", 0, 2); + x2(".+", "¤¤¤¦¤¨¤«\n", 0, 8); + x2("¤¢|¤¤", "¤¢", 0, 2); + x2("¤¢|¤¤", "¤¤", 0, 2); + x2("¤¢¤¤|¤¤¤¦", "¤¢¤¤", 0, 4); + x2("¤¢¤¤|¤¤¤¦", "¤¤¤¦", 0, 4); + x2("¤ò(?:¤«¤­|¤­¤¯)", "¤ò¤«¤­", 0, 6); + x2("¤ò(?:¤«¤­|¤­¤¯)¤±", "¤ò¤­¤¯¤±", 0, 8); + x2("¤¢¤¤|(?:¤¢¤¦|¤¢¤ò)", "¤¢¤ò", 0, 4); + x2("¤¢|¤¤|¤¦", "¤¨¤¦", 2, 4); + x2("¤¢|¤¤|¤¦¤¨|¤ª¤«¤­|¤¯|¤±¤³¤µ|¤·¤¹¤»|¤½|¤¿¤Á|¤Ä¤Æ¤È¤Ê¤Ë|¤Ì¤Í", "¤·¤¹¤»", 0, 6); + n("¤¢|¤¤|¤¦¤¨|¤ª¤«¤­|¤¯|¤±¤³¤µ|¤·¤¹¤»|¤½|¤¿¤Á|¤Ä¤Æ¤È¤Ê¤Ë|¤Ì¤Í", "¤¹¤»"); + x2("¤¢|^¤ï", "¤Ö¤¢", 2, 4); + x2("¤¢|^¤ò", "¤ò¤¢", 0, 2); + x2("µ´|\\G¼Ö", "¤±¼Öµ´", 4, 6); + x2("µ´|\\G¼Ö", "¼Öµ´", 0, 2); + x2("µ´|\\A¼Ö", "b¼Öµ´", 3, 5); + x2("µ´|\\A¼Ö", "¼Ö", 0, 2); + x2("µ´|¼Ö\\Z", "¼Öµ´", 2, 4); + x2("µ´|¼Ö\\Z", "¼Ö", 0, 2); + x2("µ´|¼Ö\\Z", "¼Ö\n", 0, 2); + x2("µ´|¼Ö\\z", "¼Öµ´", 2, 4); + x2("µ´|¼Ö\\z", "¼Ö", 0, 2); + x2("\\w|\\s", "¤ª", 0, 2); + x2("\\w|%", "%¤ª", 0, 1); + x2("\\w|[&$]", "¤¦&", 0, 2); + x2("[¤¤-¤±]", "¤¦", 0, 2); + x2("[¤¤-¤±]|[^¤«-¤³]", "¤¢", 0, 2); + x2("[¤¤-¤±]|[^¤«-¤³]", "¤«", 0, 2); + x2("[^¤¢]", "\n", 0, 1); + x2("(?:¤¢|[¤¦-¤­])|¤¤¤ò", "¤¦¤ò", 0, 2); + x2("(?:¤¢|[¤¦-¤­])|¤¤¤ò", "¤¤¤ò", 0, 4); + x2("¤¢¤¤¤¦|(?=¤±¤±)..¤Û", "¤±¤±¤Û", 0, 6); + x2("¤¢¤¤¤¦|(?!¤±¤±)..¤Û", "¤¢¤¤¤Û", 0, 6); + x2("(?=¤ò¤¢)..¤¢|(?=¤ò¤ò)..¤¢", "¤ò¤ò¤¢", 0, 6); + x2("(?<=¤¢|¤¤¤¦)¤¤", "¤¤¤¦¤¤", 4, 6); + n("(?>¤¢|¤¢¤¤¤¨)¤¦", "¤¢¤¤¤¨¤¦"); + x2("(?>¤¢¤¤¤¨|¤¢)¤¦", "¤¢¤¤¤¨¤¦", 0, 8); + x2("¤¢?|¤¤", "¤¢", 0, 2); + x2("¤¢?|¤¤", "¤¤", 0, 0); + x2("¤¢?|¤¤", "", 0, 0); + x2("¤¢*|¤¤", "¤¢¤¢", 0, 4); + x2("¤¢*|¤¤*", "¤¤¤¢", 0, 0); + x2("¤¢*|¤¤*", "¤¢¤¤", 0, 2); + x2("[a¤¢]*|¤¤*", "a¤¢¤¤¤¤¤¤", 0, 3); + x2("¤¢+|¤¤*", "", 0, 0); + x2("¤¢+|¤¤*", "¤¤¤¤¤¤", 0, 6); + x2("¤¢+|¤¤*", "¤¢¤¤¤¤¤¤", 0, 2); + x2("¤¢+|¤¤*", "a¤¢¤¤¤¤¤¤", 0, 0); + n("¤¢+|¤¤+", ""); + x2("(¤¢|¤¤)?", "¤¤", 0, 2); + x2("(¤¢|¤¤)*", "¤¤¤¢", 0, 4); + x2("(¤¢|¤¤)+", "¤¤¤¢¤¤", 0, 6); + x2("(¤¢¤¤|¤¦¤¢)+", "¤¦¤¢¤¢¤¤¤¦¤¨", 0, 8); + x2("(¤¢¤¤|¤¦¤¨)+", "¤¦¤¢¤¢¤¤¤¦¤¨", 4, 12); + x2("(¤¢¤¤|¤¦¤¢)+", "¤¢¤¢¤¤¤¦¤¢", 2, 10); + x2("(¤¢¤¤|¤¦¤¢)+", "¤¢¤¤¤ò¤¦¤¢", 0, 4); + x2("(¤¢¤¤|¤¦¤¢)+", "$$zzzz¤¢¤¤¤ò¤¦¤¢", 6, 10); + x2("(¤¢|¤¤¤¢¤¤)+", "¤¢¤¤¤¢¤¤¤¢", 0, 10); + x2("(¤¢|¤¤¤¢¤¤)+", "¤¤¤¢", 2, 4); + x2("(¤¢|¤¤¤¢¤¤)+", "¤¤¤¢¤¢¤¢¤¤¤¢", 2, 8); + x2("(?:¤¢|¤¤)(?:¤¢|¤¤)", "¤¢¤¤", 0, 4); + x2("(?:¤¢*|¤¤*)(?:¤¢*|¤¤*)", "¤¢¤¢¤¢¤¤¤¤¤¤", 0, 6); + x2("(?:¤¢*|¤¤*)(?:¤¢+|¤¤+)", "¤¢¤¢¤¢¤¤¤¤¤¤", 0, 12); + x2("(?:¤¢+|¤¤+){2}", "¤¢¤¢¤¢¤¤¤¤¤¤", 0, 12); + x2("(?:¤¢+|¤¤+){1,2}", "¤¢¤¢¤¢¤¤¤¤¤¤", 0, 12); + x2("(?:¤¢+|\\A¤¤*)¤¦¤¦", "¤¦¤¦", 0, 4); + n("(?:¤¢+|\\A¤¤*)¤¦¤¦", "¤¢¤¤¤¦¤¦"); + x2("(?:^¤¢+|¤¤+)*¤¦", "¤¢¤¢¤¤¤¤¤¤¤¢¤¤¤¦", 12, 16); + x2("(?:^¤¢+|¤¤+)*¤¦", "¤¢¤¢¤¤¤¤¤¤¤¤¤¦", 0, 14); + x2("¤¦{0,}", "¤¦¤¦¤¦¤¦", 0, 8); + x2("¤¢|(?i)c", "C", 0, 1); + x2("(?i)c|¤¢", "C", 0, 1); + x2("(?i:¤¢)|a", "a", 0, 1); + n("(?i:¤¢)|a", "A"); + x2("[¤¢¤¤¤¦]?", "¤¢¤¤¤¦", 0, 2); + x2("[¤¢¤¤¤¦]*", "¤¢¤¤¤¦", 0, 6); + x2("[^¤¢¤¤¤¦]*", "¤¢¤¤¤¦", 0, 0); + n("[^¤¢¤¤¤¦]+", "¤¢¤¤¤¦"); + x2("¤¢?\?", "¤¢¤¢¤¢", 0, 0); + x2("¤¤¤¢?\?¤¤", "¤¤¤¢¤¤", 0, 6); + x2("¤¢*?", "¤¢¤¢¤¢", 0, 0); + x2("¤¤¤¢*?", "¤¤¤¢¤¢", 0, 2); + x2("¤¤¤¢*?¤¤", "¤¤¤¢¤¢¤¤", 0, 8); + x2("¤¢+?", "¤¢¤¢¤¢", 0, 2); + x2("¤¤¤¢+?", "¤¤¤¢¤¢", 0, 4); + x2("¤¤¤¢+?¤¤", "¤¤¤¢¤¢¤¤", 0, 8); + x2("(?:Å·?)?\?", "Å·", 0, 0); + x2("(?:Å·?\?)?", "Å·", 0, 0); + x2("(?:Ì´?)+?", "Ì´Ì´Ì´", 0, 2); + x2("(?:É÷+)?\?", "É÷É÷É÷", 0, 0); + x2("(?:Àã+)?\?Áú", "ÀãÀãÀãÁú", 0, 8); + x2("(?:¤¢¤¤)?{2}", "", 0, 0); + x2("(?:µ´¼Ö)?{2}", "µ´¼Öµ´¼Öµ´", 0, 8); + x2("(?:µ´¼Ö)*{0}", "µ´¼Öµ´¼Öµ´", 0, 0); + x2("(?:µ´¼Ö){3,}", "µ´¼Öµ´¼Öµ´¼Öµ´¼Ö", 0, 16); + n("(?:µ´¼Ö){3,}", "µ´¼Öµ´¼Ö"); + x2("(?:µ´¼Ö){2,4}", "µ´¼Öµ´¼Öµ´¼Ö", 0, 12); + x2("(?:µ´¼Ö){2,4}", "µ´¼Öµ´¼Öµ´¼Öµ´¼Öµ´¼Ö", 0, 16); + x2("(?:µ´¼Ö){2,4}?", "µ´¼Öµ´¼Öµ´¼Öµ´¼Öµ´¼Ö", 0, 8); + x2("(?:µ´¼Ö){,}", "µ´¼Ö{,}", 0, 7); + x2("(?:¤«¤­¤¯)+?{2}", "¤«¤­¤¯¤«¤­¤¯¤«¤­¤¯", 0, 12); + x3("(²Ð)", "²Ð", 0, 2, 1); + x3("(²Ð¿å)", "²Ð¿å", 0, 4, 1); + x2("((»þ´Ö))", "»þ´Ö", 0, 4); + x3("((É÷¿å))", "É÷¿å", 0, 4, 1); + x3("((ºòÆü))", "ºòÆü", 0, 4, 2); + x3("((((((((((((((((((((ÎÌ»Ò))))))))))))))))))))", "ÎÌ»Ò", 0, 4, 20); + x3("(¤¢¤¤)(¤¦¤¨)", "¤¢¤¤¤¦¤¨", 0, 4, 1); + x3("(¤¢¤¤)(¤¦¤¨)", "¤¢¤¤¤¦¤¨", 4, 8, 2); + x3("()(¤¢)¤¤¤¦(¤¨¤ª¤«)¤­¤¯¤±¤³", "¤¢¤¤¤¦¤¨¤ª¤«¤­¤¯¤±¤³", 6, 12, 3); + x3("(()(¤¢)¤¤¤¦(¤¨¤ª¤«)¤­¤¯¤±¤³)", "¤¢¤¤¤¦¤¨¤ª¤«¤­¤¯¤±¤³", 6, 12, 4); + x3(".*(¥Õ¥©)¥ó¡¦¥Þ(¥ó()¥·¥å¥¿)¥¤¥ó", "¥Õ¥©¥ó¡¦¥Þ¥ó¥·¥å¥¿¥¤¥ó", 10, 18, 2); + x2("(^¤¢)", "¤¢", 0, 2); + x3("(¤¢)|(¤¢)", "¤¤¤¢", 2, 4, 1); + x3("(^¤¢)|(¤¢)", "¤¤¤¢", 2, 4, 2); + x3("(¤¢?)", "¤¢¤¢¤¢", 0, 2, 1); + x3("(¤Þ*)", "¤Þ¤Þ¤Þ", 0, 6, 1); + x3("(¤È*)", "", 0, 0, 1); + x3("(¤ë+)", "¤ë¤ë¤ë¤ë¤ë¤ë¤ë", 0, 14, 1); + x3("(¤Õ+|¤Ø*)", "¤Õ¤Õ¤Õ¤Ø¤Ø", 0, 6, 1); + x3("(¤¢+|¤¤?)", "¤¤¤¤¤¤¤¢¤¢", 0, 2, 1); + x3("(¤¢¤¤¤¦)?", "¤¢¤¤¤¦", 0, 6, 1); + x3("(¤¢¤¤¤¦)*", "¤¢¤¤¤¦", 0, 6, 1); + x3("(¤¢¤¤¤¦)+", "¤¢¤¤¤¦", 0, 6, 1); + x3("(¤µ¤·¤¹|¤¢¤¤¤¦)+", "¤¢¤¤¤¦", 0, 6, 1); + x3("([¤Ê¤Ë¤Ì][¤«¤­¤¯]|¤«¤­¤¯)+", "¤«¤­¤¯", 0, 6, 1); + x3("((?i:¤¢¤¤¤¦))", "¤¢¤¤¤¦", 0, 6, 1); + x3("((?m:¤¢.¤¦))", "¤¢\n¤¦", 0, 5, 1); + x3("((?=¤¢¤ó)¤¢)", "¤¢¤ó¤¤", 0, 2, 1); + x3("¤¢¤¤¤¦|(.¤¢¤¤¤¨)", "¤ó¤¢¤¤¤¨", 0, 8, 1); + x3("¤¢*(.)", "¤¢¤¢¤¢¤¢¤ó", 8, 10, 1); + x3("¤¢*?(.)", "¤¢¤¢¤¢¤¢¤ó", 0, 2, 1); + x3("¤¢*?(¤ó)", "¤¢¤¢¤¢¤¢¤ó", 8, 10, 1); + x3("[¤¤¤¦¤¨]¤¢*(.)", "¤¨¤¢¤¢¤¢¤¢¤ó", 10, 12, 1); + x3("(\\A¤¤¤¤)¤¦¤¦", "¤¤¤¤¤¦¤¦", 0, 4, 1); + n("(\\A¤¤¤¤)¤¦¤¦", "¤ó¤¤¤¤¤¦¤¦"); + x3("(^¤¤¤¤)¤¦¤¦", "¤¤¤¤¤¦¤¦", 0, 4, 1); + n("(^¤¤¤¤)¤¦¤¦", "¤ó¤¤¤¤¤¦¤¦"); + x3("¤í¤í(¤ë¤ë$)", "¤í¤í¤ë¤ë", 4, 8, 1); + n("¤í¤í(¤ë¤ë$)", "¤í¤í¤ë¤ë¤ë"); + x2("(̵)\\1", "̵̵", 0, 4); + n("(̵)\\1", "̵Éð"); + x2("(¶õ?)\\1", "¶õ¶õ", 0, 4); + x2("(¶õ?\?)\\1", "¶õ¶õ", 0, 0); + x2("(¶õ*)\\1", "¶õ¶õ¶õ¶õ¶õ", 0, 8); + x3("(¶õ*)\\1", "¶õ¶õ¶õ¶õ¶õ", 0, 4, 1); + x2("¤¢(¤¤*)\\1", "¤¢¤¤¤¤¤¤¤¤", 0, 10); + x2("¤¢(¤¤*)\\1", "¤¢¤¤", 0, 2); + x2("(¤¢*)(¤¤*)\\1\\2", "¤¢¤¢¤¢¤¤¤¤¤¢¤¢¤¢¤¤¤¤", 0, 20); + x2("(¤¢*)(¤¤*)\\2", "¤¢¤¢¤¢¤¤¤¤¤¤¤¤", 0, 14); + x3("(¤¢*)(¤¤*)\\2", "¤¢¤¢¤¢¤¤¤¤¤¤¤¤", 6, 10, 2); + x2("(((((((¤Ý*)¤Ú))))))¤Ô\\7", "¤Ý¤Ý¤Ý¤Ú¤Ô¤Ý¤Ý¤Ý", 0, 16); + x3("(((((((¤Ý*)¤Ú))))))¤Ô\\7", "¤Ý¤Ý¤Ý¤Ú¤Ô¤Ý¤Ý¤Ý", 0, 6, 7); + x2("(¤Ï)(¤Ò)(¤Õ)\\2\\1\\3", "¤Ï¤Ò¤Õ¤Ò¤Ï¤Õ", 0, 12); + x2("([¤­-¤±])\\1", "¤¯¤¯", 0, 4); + x2("(\\w\\d\\s)\\1", "¤¢5 ¤¢5 ", 0, 8); + n("(\\w\\d\\s)\\1", "¤¢5 ¤¢5"); + x2("(ï¡©|[¤¢-¤¦]{3})\\1", "ï¡©", 0, 8); + x2("...(ï¡©|[¤¢-¤¦]{3})\\1", "¤¢a¤¢Ã¯¡©Ã¯¡©", 0, 13); + x2("(ï¡©|[¤¢-¤¦]{3})\\1", "¤¦¤¤¤¦¤¦¤¤¤¦", 0, 12); + x2("(^¤³)\\1", "¤³¤³", 0, 4); + n("(^¤à)\\1", "¤á¤à¤à"); + n("(¤¢$)\\1", "¤¢¤¢"); + n("(¤¢¤¤\\Z)\\1", "¤¢¤¤"); + x2("(¤¢*\\Z)\\1", "¤¢", 2, 2); + x2(".(¤¢*\\Z)\\1", "¤¤¤¢", 2, 4); + x3("(.(¤ä¤¤¤æ)\\2)", "z¤ä¤¤¤æ¤ä¤¤¤æ", 0, 13, 1); + x3("(.(..\\d.)\\2)", "¤¢12341234", 0, 10, 1); + x2("((?i:¤¢v¤º))\\1", "¤¢v¤º¤¢v¤º", 0, 10); + x2("(?<¶ò¤«>ÊÑ|\\(\\g<¶ò¤«>\\))", "((((((ÊÑ))))))", 0, 14); + x2("\\A(?:\\g<°¤_1>|\\g<±¾_2>|\\z½ªÎ» (?<°¤_1>´Ñ|¼«\\g<±¾_2>¼«)(?<±¾_2>ºß|Êî»§\\g<°¤_1>Êî»§))$", "Êî»§¼«Êî»§¼«ºß¼«Êî»§¼«Êî»§", 0, 26); + x2("[[¤Ò¤Õ]]", "¤Õ", 0, 2); + x2("[[¤¤¤ª¤¦]¤«]", "¤«", 0, 2); + n("[[^¤¢]]", "¤¢"); + n("[^[¤¢]]", "¤¢"); + x2("[^[^¤¢]]", "¤¢", 0, 2); + x2("[[¤«¤­¤¯]&&¤­¤¯]", "¤¯", 0, 2); + n("[[¤«¤­¤¯]&&¤­¤¯]", "¤«"); + n("[[¤«¤­¤¯]&&¤­¤¯]", "¤±"); + x2("[¤¢-¤ó&&¤¤-¤ò&&¤¦-¤ñ]", "¤ñ", 0, 2); + n("[^¤¢-¤ó&&¤¤-¤ò&&¤¦-¤ñ]", "¤ñ"); + x2("[[^¤¢&&¤¢]&&¤¢-¤ó]", "¤¤", 0, 2); + n("[[^¤¢&&¤¢]&&¤¢-¤ó]", "¤¢"); + x2("[[^¤¢-¤ó&&¤¤¤¦¤¨¤ª]&&[^¤¦-¤«]]", "¤­", 0, 2); + n("[[^¤¢-¤ó&&¤¤¤¦¤¨¤ª]&&[^¤¦-¤«]]", "¤¤"); + x2("[^[^¤¢¤¤¤¦]&&[^¤¦¤¨¤ª]]", "¤¦", 0, 2); + x2("[^[^¤¢¤¤¤¦]&&[^¤¦¤¨¤ª]]", "¤¨", 0, 2); + n("[^[^¤¢¤¤¤¦]&&[^¤¦¤¨¤ª]]", "¤«"); + x2("[¤¢-&&-¤¢]", "-", 0, 1); + x2("[^[^a-z¤¢¤¤¤¦]&&[^bcdefg¤¦¤¨¤ª]q-w]", "¤¨", 0, 2); + x2("[^[^a-z¤¢¤¤¤¦]&&[^bcdefg¤¦¤¨¤ª]g-w]", "f", 0, 1); + x2("[^[^a-z¤¢¤¤¤¦]&&[^bcdefg¤¦¤¨¤ª]g-w]", "g", 0, 1); + n("[^[^a-z¤¢¤¤¤¦]&&[^bcdefg¤¦¤¨¤ª]g-w]", "2"); + x2("a¥Ð¡¼¥¸¥ç¥ó¤Î¥À¥¦¥ó¥í¡¼¥É<\\/b>", "a¥Ð¡¼¥¸¥ç¥ó¤Î¥À¥¦¥ó¥í¡¼¥É", 0, 32); + x2(".¥Ð¡¼¥¸¥ç¥ó¤Î¥À¥¦¥ó¥í¡¼¥É<\\/b>", "a¥Ð¡¼¥¸¥ç¥ó¤Î¥À¥¦¥ó¥í¡¼¥É", 0, 32); + x2("\\n?\\z", "¤³¤ó¤Ë¤Á¤Ï", 10, 10); + + x2("\\p{Hiragana}", "¤Ô", 0, 2); + n("\\P{Hiragana}", "¤Ô"); + + fprintf(stdout, + "\nRESULT SUCC: %4d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n", + nsucc, nfail, nerror, onig_version()); + + onig_region_free(region, 1); + onig_end(); + + return ((nfail == 0 && nerror == 0) ? 0 : -1); +} diff --git a/internal/components/third_party/oniguruma/test/testp.c b/internal/components/third_party/oniguruma/test/testp.c new file mode 100644 index 0000000000..de577a2d2f --- /dev/null +++ b/internal/components/third_party/oniguruma/test/testp.c @@ -0,0 +1,613 @@ +/* + * testp.c + * Copyright (c) 2020-2021 K.Kosako + */ +#include +#include + +#include "onigposix.h" + +#define SLEN(s) strlen(s) + +static int nsucc = 0; +static int nfail = 0; +static int nerror = 0; + +static FILE* err_file; + +static void +xx(char* pattern, char* str, int from, int to, int mem, int not) +{ + int r; + regex_t reg; + char buf[200]; + regmatch_t pmatch[25]; + + r = regcomp(®, pattern, REG_EXTENDED | REG_NEWLINE); + if (r) { + regerror(r, ®, buf, sizeof(buf)); + fprintf(err_file, "ERROR: %s\n", buf); + nerror++; + return ; + } + + r = regexec(®, str, reg.re_nsub + 1, pmatch, 0); + if (r != 0 && r != REG_NOMATCH) { + regerror(r, ®, buf, sizeof(buf)); + fprintf(err_file, "ERROR: %s\n", buf); + nerror++; + return ; + } + + if (r == REG_NOMATCH) { + if (not) { + fprintf(stdout, "OK(N): /%s/ '%s'\n", pattern, str); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s'\n", pattern, str); + nfail++; + } + } + else { + if (not) { + fprintf(stdout, "FAIL(N): /%s/ '%s'\n", pattern, str); + nfail++; + } + else { + if (pmatch[mem].rm_so == from && pmatch[mem].rm_eo == to) { + fprintf(stdout, "OK: /%s/ '%s'\n", pattern, str); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str, + from, to, pmatch[mem].rm_so, pmatch[mem].rm_eo); + nfail++; + } + } + } + regfree(®); +} + +static void x2(char* pattern, char* str, int from, int to) +{ + xx(pattern, str, from, to, 0, 0); +} + +static void x3(char* pattern, char* str, int from, int to, int mem) +{ + xx(pattern, str, from, to, mem, 0); +} + +static void n(char* pattern, char* str) +{ + xx(pattern, str, 0, 0, 0, 1); +} + +extern int main(int argc, char* argv[]) +{ + err_file = stdout; + + reg_set_encoding(REG_POSIX_ENCODING_UTF8); + + x2("", "", 0, 0); + x2("^", "", 0, 0); + x2("$", "", 0, 0); + x2("\\G", "", 0, 0); + x2("\\A", "", 0, 0); + x2("\\Z", "", 0, 0); + x2("\\z", "", 0, 0); + x2("^$", "", 0, 0); + x2("\\ca", "\001", 0, 1); + x2("\\C-b", "\002", 0, 1); + x2("\\c\\\\", "\034", 0, 1); + x2("q[\\c\\\\]", "q\034", 0, 2); + x2("", "a", 0, 0); + x2("a", "a", 0, 1); + x2("\\x61", "a", 0, 1); + x2("aa", "aa", 0, 2); + x2("aaa", "aaa", 0, 3); + x2("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 0, 35); + x2("ab", "ab", 0, 2); + x2("b", "ab", 1, 2); + x2("bc", "abc", 1, 3); + x2("(?i:#RET#)", "#INS##RET#", 5, 10); + x2("\\17", "\017", 0, 1); + x2("\\x1f", "\x1f", 0, 1); + x2("a(?#....\\\\JJJJ)b", "ab", 0, 2); + x2("(?x) G (o O(?-x)oO) g L", "GoOoOgLe", 0, 7); + x2(".", "a", 0, 1); + n(".", ""); + x2("..", "ab", 0, 2); + x2("\\w", "e", 0, 1); + n("\\W", "e"); + x2("\\s", " ", 0, 1); + x2("\\S", "b", 0, 1); + x2("\\d", "4", 0, 1); + n("\\D", "4"); + x2("\\b", "z ", 0, 0); + x2("\\b", " z", 1, 1); + x2("\\B", "zz ", 1, 1); + x2("\\B", "z ", 2, 2); + x2("\\B", " z", 0, 0); + x2("[ab]", "b", 0, 1); + n("[ab]", "c"); + x2("[a-z]", "t", 0, 1); + n("[^a]", "a"); + x2("[^a]", "\n", 0, 1); + x2("[]]", "]", 0, 1); + n("[^]]", "]"); + x2("[\\^]+", "0^^1", 1, 3); + x2("[b-]", "b", 0, 1); + x2("[b-]", "-", 0, 1); + x2("[\\w]", "z", 0, 1); + n("[\\w]", " "); + x2("[\\W]", "b$", 1, 2); + x2("[\\d]", "5", 0, 1); + n("[\\d]", "e"); + x2("[\\D]", "t", 0, 1); + n("[\\D]", "3"); + x2("[\\s]", " ", 0, 1); + n("[\\s]", "a"); + x2("[\\S]", "b", 0, 1); + n("[\\S]", " "); + x2("[\\w\\d]", "2", 0, 1); + n("[\\w\\d]", " "); + x2("[[:upper:]]", "B", 0, 1); + x2("[*[:xdigit:]+]", "+", 0, 1); + x2("[*[:xdigit:]+]", "GHIKK-9+*", 6, 7); + x2("[*[:xdigit:]+]", "-@^+", 3, 4); + n("[[:upper]]", "A"); + x2("[[:upper]]", ":", 0, 1); + x2("[\\044-\\047]", "\046", 0, 1); + x2("[\\x5a-\\x5c]", "\x5b", 0, 1); + x2("[\\x6A-\\x6D]", "\x6c", 0, 1); + n("[\\x6A-\\x6D]", "\x6E"); + n("^[0-9A-F]+ 0+ UNDEF ", "75F 00000000 SECT14A notype () External | _rb_apply"); + x2("[\\[]", "[", 0, 1); + x2("[\\]]", "]", 0, 1); + x2("[&]", "&", 0, 1); + x2("[[ab]]", "b", 0, 1); + x2("[[ab]c]", "c", 0, 1); + n("[[^a]]", "a"); + n("[^[a]]", "a"); + x2("[[ab]&&bc]", "b", 0, 1); + n("[[ab]&&bc]", "a"); + n("[[ab]&&bc]", "c"); + x2("[a-z&&b-y&&c-x]", "w", 0, 1); + n("[^a-z&&b-y&&c-x]", "w"); + x2("[[^a&&a]&&a-z]", "b", 0, 1); + n("[[^a&&a]&&a-z]", "a"); + x2("[[^a-z&&bcdef]&&[^c-g]]", "h", 0, 1); + n("[[^a-z&&bcdef]&&[^c-g]]", "c"); + x2("[^[^abc]&&[^cde]]", "c", 0, 1); + x2("[^[^abc]&&[^cde]]", "e", 0, 1); + n("[^[^abc]&&[^cde]]", "f"); + x2("[a-&&-a]", "-", 0, 1); + n("[a\\-&&\\-a]", "&"); + n("\\wabc", " abc"); + x2("a\\Wbc", "a bc", 0, 4); + x2("a.b.c", "aabbc", 0, 5); + x2(".\\wb\\W..c", "abb bcc", 0, 7); + x2("\\s\\wzzz", " zzzz", 0, 5); + x2("aa.b", "aabb", 0, 4); + n(".a", "ab"); + x2(".a", "aa", 0, 2); + x2("^a", "a", 0, 1); + x2("^a$", "a", 0, 1); + x2("^\\w$", "a", 0, 1); + n("^\\w$", " "); + x2("^\\wab$", "zab", 0, 3); + x2("^\\wabcdef$", "zabcdef", 0, 7); + x2("^\\w...def$", "zabcdef", 0, 7); + x2("\\w\\w\\s\\Waaa\\d", "aa aaa4", 0, 8); + x2("\\A\\Z", "", 0, 0); + x2("\\Axyz", "xyz", 0, 3); + x2("xyz\\Z", "xyz", 0, 3); + x2("xyz\\z", "xyz", 0, 3); + x2("a\\Z", "a", 0, 1); + x2("\\Gaz", "az", 0, 2); + n("\\Gz", "bza"); + n("az\\G", "az"); + n("az\\A", "az"); + n("a\\Az", "az"); + x2("\\^\\$", "^$", 0, 2); + x2("^x?y", "xy", 0, 2); + x2("^(x?y)", "xy", 0, 2); + x2("\\w", "_", 0, 1); + n("\\W", "_"); + x2("(?=z)z", "z", 0, 1); + n("(?=z).", "a"); + x2("(?!z)a", "a", 0, 1); + n("(?!z)a", "z"); + x2("(?i:a)", "a", 0, 1); + x2("(?i:a)", "A", 0, 1); + x2("(?i:A)", "a", 0, 1); + n("(?i:A)", "b"); + x2("(?i:[A-Z])", "a", 0, 1); + x2("(?i:[f-m])", "H", 0, 1); + x2("(?i:[f-m])", "h", 0, 1); + n("(?i:[f-m])", "e"); + x2("(?i:[A-c])", "D", 0, 1); + n("(?i:[^a-z])", "A"); + n("(?i:[^a-z])", "a"); + x2("(?i:[!-k])", "Z", 0, 1); + x2("(?i:[!-k])", "7", 0, 1); + x2("(?i:[T-}])", "b", 0, 1); + x2("(?i:[T-}])", "{", 0, 1); + x2("(?i:\\?a)", "?A", 0, 2); + x2("(?i:\\*A)", "*a", 0, 2); + n(".", "\n"); + x2("(?m:.)", "\n", 0, 1); + x2("(?m:a.)", "a\n", 0, 2); + x2("(?m:.b)", "a\nb", 1, 3); + x2(".*abc", "dddabdd\nddabc", 8, 13); + x2("(?m:.*abc)", "dddabddabc", 0, 10); + n("(?i)(?-i)a", "A"); + n("(?i)(?-i:a)", "A"); + x2("a?", "", 0, 0); + x2("a?", "b", 0, 0); + x2("a?", "a", 0, 1); + x2("a*", "", 0, 0); + x2("a*", "a", 0, 1); + x2("a*", "aaa", 0, 3); + x2("a*", "baaaa", 0, 0); + n("a+", ""); + x2("a+", "a", 0, 1); + x2("a+", "aaaa", 0, 4); + x2("a+", "aabbb", 0, 2); + x2("a+", "baaaa", 1, 5); + x2(".?", "", 0, 0); + x2(".?", "f", 0, 1); + x2(".?", "\n", 0, 0); + x2(".*", "", 0, 0); + x2(".*", "abcde", 0, 5); + x2(".+", "z", 0, 1); + x2(".+", "zdswer\n", 0, 6); + x2("(.*)a\\1f", "babfbac", 0, 4); + x2("(.*)a\\1f", "bacbabf", 3, 7); + x2("((.*)a\\2f)", "bacbabf", 3, 7); + x2("(.*)a\\1f", "baczzzzzz\nbazz\nzzzzbabf", 19, 23); + x2("a|b", "a", 0, 1); + x2("a|b", "b", 0, 1); + x2("|a", "a", 0, 0); + x2("(|a)", "a", 0, 0); + x2("ab|bc", "ab", 0, 2); + x2("ab|bc", "bc", 0, 2); + x2("z(?:ab|bc)", "zbc", 0, 3); + x2("a(?:ab|bc)c", "aabc", 0, 4); + x2("ab|(?:ac|az)", "az", 0, 2); + x2("a|b|c", "dc", 1, 2); + x2("a|b|cd|efg|h|ijk|lmn|o|pq|rstuvwx|yz", "pqr", 0, 2); + n("a|b|cd|efg|h|ijk|lmn|o|pq|rstuvwx|yz", "mn"); + x2("a|^z", "ba", 1, 2); + x2("a|^z", "za", 0, 1); + x2("a|\\Gz", "bza", 2, 3); + x2("a|\\Gz", "za", 0, 1); + x2("a|\\Az", "bza", 2, 3); + x2("a|\\Az", "za", 0, 1); + x2("a|b\\Z", "ba", 1, 2); + x2("a|b\\Z", "b", 0, 1); + x2("a|b\\z", "ba", 1, 2); + x2("a|b\\z", "b", 0, 1); + x2("\\w|\\s", " ", 0, 1); + n("\\w|\\w", " "); + x2("\\w|%", "%", 0, 1); + x2("\\w|[&$]", "&", 0, 1); + x2("[b-d]|[^e-z]", "a", 0, 1); + x2("(?:a|[c-f])|bz", "dz", 0, 1); + x2("(?:a|[c-f])|bz", "bz", 0, 2); + x2("abc|(?=zz)..f", "zzf", 0, 3); + x2("abc|(?!zz)..f", "abf", 0, 3); + x2("(?=za)..a|(?=zz)..a", "zza", 0, 3); + n("(?>a|abd)c", "abdc"); + x2("(?>abd|a)c", "abdc", 0, 4); + x2("a?|b", "a", 0, 1); + x2("a?|b", "b", 0, 0); + x2("a?|b", "", 0, 0); + x2("a*|b", "aa", 0, 2); + x2("a*|b*", "ba", 0, 0); + x2("a*|b*", "ab", 0, 1); + x2("a+|b*", "", 0, 0); + x2("a+|b*", "bbb", 0, 3); + x2("a+|b*", "abbb", 0, 1); + n("a+|b+", ""); + x2("(a|b)?", "b", 0, 1); + x2("(a|b)*", "ba", 0, 2); + x2("(a|b)+", "bab", 0, 3); + x2("(ab|ca)+", "caabbc", 0, 4); + x2("(ab|ca)+", "aabca", 1, 5); + x2("(ab|ca)+", "abzca", 0, 2); + x2("(a|bab)+", "ababa", 0, 5); + x2("(a|bab)+", "ba", 1, 2); + x2("(a|bab)+", "baaaba", 1, 4); + x2("(?:a|b)(?:a|b)", "ab", 0, 2); + x2("(?:a*|b*)(?:a*|b*)", "aaabbb", 0, 3); + x2("(?:a*|b*)(?:a+|b+)", "aaabbb", 0, 6); + x2("(?:a+|b+){2}", "aaabbb", 0, 6); + x2("h{0,}", "hhhh", 0, 4); + x2("(?:a+|b+){1,2}", "aaabbb", 0, 6); + n("ax{2}*a", "0axxxa1"); + n("a.{0,2}a", "0aXXXa0"); + n("a.{0,2}?a", "0aXXXa0"); + n("a.{0,2}?a", "0aXXXXa0"); + x2("^a{2,}?a$", "aaa", 0, 3); + x2("^[a-z]{2,}?$", "aaa", 0, 3); + x2("(?:a+|\\Ab*)cc", "cc", 0, 2); + n("(?:a+|\\Ab*)cc", "abcc"); + x2("(?:^a+|b+)*c", "aabbbabc", 6, 8); + x2("(?:^a+|b+)*c", "aabbbbc", 0, 7); + x2("a|(?i)c", "C", 0, 1); + x2("(?i)c|a", "C", 0, 1); + x2("(?i)c|a", "A", 0, 1); + x2("(?i:c)|a", "C", 0, 1); + n("(?i:c)|a", "A"); + x2("[abc]?", "abc", 0, 1); + x2("[abc]*", "abc", 0, 3); + x2("[^abc]*", "abc", 0, 0); + n("[^abc]+", "abc"); + x2("a?\?", "aaa", 0, 0); + x2("ba?\?b", "bab", 0, 3); + x2("a*?", "aaa", 0, 0); + x2("ba*?", "baa", 0, 1); + x2("ba*?b", "baab", 0, 4); + x2("a+?", "aaa", 0, 1); + x2("ba+?", "baa", 0, 2); + x2("ba+?b", "baab", 0, 4); + x2("(?:a?)?\?", "a", 0, 0); + x2("(?:a?\?)?", "a", 0, 0); + x2("(?:a?)+?", "aaa", 0, 1); + x2("(?:a+)?\?", "aaa", 0, 0); + x2("(?:a+)?\?b", "aaab", 0, 4); + x2("(?:ab)?{2}", "", 0, 0); + x2("(?:ab)?{2}", "ababa", 0, 4); + x2("(?:ab)*{0}", "ababa", 0, 0); + x2("(?:ab){3,}", "abababab", 0, 8); + n("(?:ab){3,}", "abab"); + x2("(?:ab){2,4}", "ababab", 0, 6); + x2("(?:ab){2,4}", "ababababab", 0, 8); + x2("(?:ab){2,4}?", "ababababab", 0, 4); + x2("(?:ab){,}", "ab{,}", 0, 5); + x2("(?:abc)+?{2}", "abcabcabc", 0, 6); + x2("(?:X*)(?i:xa)", "XXXa", 0, 4); + x2("(d+)([^abc]z)", "dddz", 0, 4); + x2("([^abc]*)([^abc]z)", "dddz", 0, 4); + x2("(\\w+)(\\wz)", "dddz", 0, 4); + x3("(a)", "a", 0, 1, 1); + x3("(ab)", "ab", 0, 2, 1); + x2("((ab))", "ab", 0, 2); + x3("((ab))", "ab", 0, 2, 1); + x3("((ab))", "ab", 0, 2, 2); + x3("((((((((((((((((((((ab))))))))))))))))))))", "ab", 0, 2, 20); + x3("(ab)(cd)", "abcd", 0, 2, 1); + x3("(ab)(cd)", "abcd", 2, 4, 2); + x3("()(a)bc(def)ghijk", "abcdefghijk", 3, 6, 3); + x3("(()(a)bc(def)ghijk)", "abcdefghijk", 3, 6, 4); + x2("(^a)", "a", 0, 1); + x3("(a)|(a)", "ba", 1, 2, 1); + x3("(^a)|(a)", "ba", 1, 2, 2); + x3("(a?)", "aaa", 0, 1, 1); + x3("(a*)", "aaa", 0, 3, 1); + x3("(a*)", "", 0, 0, 1); + x3("(a+)", "aaaaaaa", 0, 7, 1); + x3("(a+|b*)", "bbbaa", 0, 3, 1); + x3("(a+|b?)", "bbbaa", 0, 1, 1); + x3("(abc)?", "abc", 0, 3, 1); + x3("(abc)*", "abc", 0, 3, 1); + x3("(abc)+", "abc", 0, 3, 1); + x3("(xyz|abc)+", "abc", 0, 3, 1); + x3("([xyz][abc]|abc)+", "abc", 0, 3, 1); + x3("((?i:abc))", "AbC", 0, 3, 1); + x2("(abc)(?i:\\1)", "abcABC", 0, 6); + x3("((?m:a.c))", "a\nc", 0, 3, 1); + x3("((?=az)a)", "azb", 0, 1, 1); + x3("abc|(.abd)", "zabd", 0, 4, 1); + x2("(?:abc)|(ABC)", "abc", 0, 3); + x3("(?i:(abc))|(zzz)", "ABC", 0, 3, 1); + x3("a*(.)", "aaaaz", 4, 5, 1); + x3("a*?(.)", "aaaaz", 0, 1, 1); + x3("a*?(c)", "aaaac", 4, 5, 1); + x3("[bcd]a*(.)", "caaaaz", 5, 6, 1); + x3("(\\Abb)cc", "bbcc", 0, 2, 1); + n("(\\Abb)cc", "zbbcc"); + x3("(^bb)cc", "bbcc", 0, 2, 1); + n("(^bb)cc", "zbbcc"); + x3("cc(bb$)", "ccbb", 2, 4, 1); + n("cc(bb$)", "ccbbb"); + n("(\\1)", ""); + n("\\1(a)", "aa"); + n("(a(b)\\1)\\2+", "ababb"); + n("(?:(?:\\1|z)(a))+$", "zaa"); + x2("(?:(?:\\1|z)(a))+$", "zaaa", 0, 4); + x2("(a)(?=\\1)", "aa", 0, 1); + n("(a)$|\\1", "az"); + x2("(a)\\1", "aa", 0, 2); + n("(a)\\1", "ab"); + x2("(a?)\\1", "aa", 0, 2); + x2("(a?\?)\\1", "aa", 0, 0); + x2("(a*)\\1", "aaaaa", 0, 4); + x3("(a*)\\1", "aaaaa", 0, 2, 1); + x2("a(b*)\\1", "abbbb", 0, 5); + x2("a(b*)\\1", "ab", 0, 1); + x2("(a*)(b*)\\1\\2", "aaabbaaabb", 0, 10); + x2("(a*)(b*)\\2", "aaabbbb", 0, 7); + x2("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 8); + x3("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 3, 7); + x2("(a)(b)(c)\\2\\1\\3", "abcbac", 0, 6); + x2("([a-d])\\1", "cc", 0, 2); + x2("(\\w\\d\\s)\\1", "f5 f5 ", 0, 6); + n("(\\w\\d\\s)\\1", "f5 f5"); + x2("(who|[a-c]{3})\\1", "whowho", 0, 6); + x2("...(who|[a-c]{3})\\1", "abcwhowho", 0, 9); + x2("(who|[a-c]{3})\\1", "cbccbc", 0, 6); + x2("(^a)\\1", "aa", 0, 2); + n("(^a)\\1", "baa"); + n("(a$)\\1", "aa"); + n("(ab\\Z)\\1", "ab"); + x2("(a*\\Z)\\1", "a", 1, 1); + x2(".(a*\\Z)\\1", "ba", 1, 2); + x3("(.(abc)\\2)", "zabcabc", 0, 7, 1); + x3("(.(..\\d.)\\2)", "z12341234", 0, 9, 1); + x2("((?i:az))\\1", "AzAz", 0, 4); + n("((?i:az))\\1", "Azaz"); + x2("(?<=a)b", "ab", 1, 2); + n("(?<=a)b", "bb"); + x2("(?<=a|b)b", "bb", 1, 2); + x2("(?<=a|bc)b", "bcb", 2, 3); + x2("(?<=a|bc)b", "ab", 1, 2); + x2("(?<=a|bc||defghij|klmnopq|r)z", "rz", 1, 2); + x2("(a)\\g<1>", "aa", 0, 2); + x2("(?a)", "a", 0, 1); + x2("(?ab)\\g", "abab", 0, 4); + x2("(?.zv.)\\k", "azvbazvb", 0, 8); + x2("(?<=\\g)|-\\zEND (?XyZ)", "XyZ", 3, 3); + x2("(?|a\\g)+", "", 0, 0); + x2("(?|\\(\\g\\))+$", "()(())", 0, 6); + x3("\\g(?.){0}", "X", 0, 1, 1); + x2("\\g(abc|df(?.YZ){2,8}){0}", "XYZ", 0, 3); + x2("\\A(?(a\\g)|)\\z", "aaaa", 0, 4); + x2("(?|\\g\\g)\\z|\\zEND (?a|(b)\\g)", "bbbbabba", 0, 8); + x2("(?\\w+\\sx)a+\\k", " fg xaaaaaaaafg x", 2, 18); + x3("(z)()()(?<_9>a)\\g<_9>", "zaa", 2, 3, 1); + x2("(.)(((?<_>a)))\\k<_>", "zaa", 0, 3); + x2("((?\\d)|(?\\w))(\\k|\\k)", "ff", 0, 2); + x2("(?:(?)|(?efg))\\k", "", 0, 0); + x2("(?:(?abc)|(?efg))\\k", "abcefgefg", 3, 9); + n("(?:(?abc)|(?efg))\\k", "abcefg"); + x2("(?:(?.)|(?..)|(?...)|(?....)|(?.....)|(?......)|(?.......)|(?........)|(?.........)|(?..........)|(?...........)|(?............)|(?.............)|(?..............))\\k$", "a-pyumpyum", 2, 10); + x3("(?:(?.)|(?..)|(?...)|(?....)|(?.....)|(?......)|(?.......)|(?........)|(?.........)|(?..........)|(?...........)|(?............)|(?.............)|(?..............))\\k$", "xxxxabcdefghijklmnabcdefghijklmn", 4, 18, 14); + x3("(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?aaa)(?)$", "aaa", 0, 3, 16); + x2("(?a|\\(\\g\\))", "a", 0, 1); + x2("(?a|\\(\\g\\))", "((((((a))))))", 0, 13); + x3("(?a|\\(\\g\\))", "((((((((a))))))))", 0, 17, 1); + x2("\\g|\\zEND(?.*abc$)", "abcxxxabc", 0, 9); + x2("\\g<1>|\\zEND(.a.)", "bac", 0, 3); + x3("\\g<_A>\\g<_A>|\\zEND(.a.)(?<_A>.b.)", "xbxyby", 3, 6, 1); + x2("\\A(?:\\g|\\g|\\zEND (?a|c\\gc)(?b|d\\gd))$", "cdcbcdc", 0, 7); + x2("\\A(?|a\\g)\\z|\\zEND (?\\g)", "aaaa", 0, 4); + x2("(?(a|b\\gc){3,5})", "baaaaca", 1, 5); + x2("(?(a|b\\gc){3,5})", "baaaacaaaaa", 0, 10); + x2("(?\\(([^\\(\\)]++|\\g)*+\\))", "((a))", 0, 5); + x2("()*\\1", "", 0, 0); + x2("(?:()|())*\\1\\2", "", 0, 0); + x3("(?:\\1a|())*", "a", 0, 0, 1); + x2("x((.)*)*x", "0x1x2x3", 1, 6); + x2("x((.)*)*x(?i:\\1)\\Z", "0x1x2x1X2", 1, 9); + x2("(?:()|()|()|()|()|())*\\2\\5", "", 0, 0); + x2("(?:()|()|()|(x)|()|())*\\2b\\5", "b", 0, 1); + x2("[0-9-a]", "-", 0, 1); // PR#44 + n("[0-9-a]", ":"); // PR#44 + x3("(\\(((?:[^(]|\\g<1>)*)\\))", "(abc)(abc)", 1, 4, 2); // PR#43 + x2("\\o{101}", "A", 0, 1); + x2("(?:\\k'+1'B|(A)C)*", "ACAB", 0, 4); // relative backref by positive number + x2("\\g<+2>(abc)(ABC){0}", "ABCabc", 0, 6); // relative call by positive number + x2("A\\g'0'|B()", "AAAAB", 0, 5); + x3("(A\\g'0')|B", "AAAAB", 0, 5, 1); + x2("(a*)(?(1))aa", "aaaaa", 0, 5); + x2("(a*)(?(-1))aa", "aaaaa", 0, 5); + x2("(?aaa)(?('name'))aa", "aaaaa", 0, 5); + x2("(a)(?(1)aa|bb)a", "aaaaa", 0, 4); + x2("(?:aa|())(?(<1>)aa|bb)a", "aabba", 0, 5); + x2("(?:aa|())(?('1')aa|bb|cc)a", "aacca", 0, 5); + x3("(a*)(?(1)aa|a)b", "aaab", 0, 1, 1); + n("(a)(?(1)a|b)c", "abc"); + x2("(a)(?(1)|)c", "ac", 0, 2); + n("(?()aaa|bbb)", "bbb"); + x2("(a)(?(1+0)b|c)d", "abd", 0, 3); + x2("(?:(?'name'a)|(?'name'b))(?('name')c|d)e", "ace", 0, 3); + x2("(?:(?'name'a)|(?'name'b))(?('name')c|d)e", "bce", 0, 3); + x2("\\R", "\r\n", 0, 2); + x2("\\R", "\r", 0, 1); + x2("\\R", "\n", 0, 1); + x2("\\R", "\x0b", 0, 1); + n("\\R\\n", "\r\n"); + x2("\\N", "a", 0, 1); + n("\\N", "\n"); + n("(?m:\\N)", "\n"); + n("(?-m:\\N)", "\n"); + x2("\\O", "a", 0, 1); + x2("\\O", "\n", 0, 1); + x2("(?m:\\O)", "\n", 0, 1); + x2("(?-m:\\O)", "\n", 0, 1); + x2("\\K", "a", 0, 0); + x2("a\\K", "a", 1, 1); + x2("a\\Kb", "ab", 1, 2); + x2("(a\\Kb|ac\\Kd)", "acd", 2, 3); + x2("(a\\Kb|\\Kac\\K)*", "acababacab", 9, 10); + + x2("(?~)", "", 0, 0); + x2("(?~)", "A", 0, 0); + x2("aaaaa(?~)", "aaaaaaaaaa", 0, 5); + x2("(?~(?:|aaa))", "aaa", 0, 0); + x2("(?~aaa|)", "aaa", 0, 0); + x2("a(?~(?~)).", "abcdefghijklmnopqrstuvwxyz", 0, 26); // !!! + x2("/\\*(?~\\*/)\\*/", "/* */ */", 0, 5); + x2("(?~\\w+)zzzzz", "zzzzz", 0, 5); + x2("(?~\\w*)zzzzz", "zzzzz", 0, 5); + x2("(?~A.C|B)", "ABC", 0, 0); + x2("(?~XYZ|ABC)a", "ABCa", 1, 4); + x2("(?~XYZ|ABC)a", "aABCa", 0, 1); + x2("<[^>]*>(?~[<>])]*>", "vvv ", 0, 10); + x2("(?~ab)", "ccc\ndab", 0, 5); + x2("(?m:(?~ab))", "ccc\ndab", 0, 5); + x2("(?-m:(?~ab))", "ccc\ndab", 0, 5); + x2("(?~abc)xyz", "xyz012345678901234567890123456789abc", 0, 3); + + // absent with expr + x2("(?~|78|\\d*)", "123456789", 0, 6); + x2("(?~|def|(?:abc|de|f){0,100})", "abcdedeabcfdefabc", 0, 11); + x2("(?~|ab|.*)", "ccc\nddd", 0, 3); + x2("(?~|ab|\\O*)", "ccc\ndab", 0, 5); + x2("(?~|ab|\\O{2,10})", "ccc\ndab", 0, 5); + x2("(?~|ab|\\O{1,10})", "ab", 1, 2); + n("(?~|ab|\\O{2,10})", "ab"); + x2("(?~|abc|\\O{1,10})", "abc", 1, 3); + x2("(?~|ab|\\O{5,10})|abc", "abc", 0, 3); + x2("(?~|ab|\\O{1,10})", "cccccccccccab", 0, 10); + x2("(?~|aaa|)", "aaa", 0, 0); + x2("(?~||a*)", "aaaaaa", 0, 0); + x2("(?~||a*?)", "aaaaaa", 0, 0); + x2("(a)(?~|b|\\1)", "aaaaaa", 0, 2); + x2("(a)(?~|bb|(?:a\\1)*)", "aaaaaa", 0, 5); + x2("(b|c)(?~|abac|(?:a\\1)*)", "abababacabab", 1, 4); + n("(?~|c|a*+)a", "aaaaa"); + x2("(?~|aaaaa|a*+)", "aaaaa", 0, 0); + x2("(?~|aaaaaa|a*+)b", "aaaaaab", 1, 7); + x2("(?~|abcd|(?>))", "zzzabcd", 0, 0); + x2("(?~|abc|a*?)", "aaaabc", 0, 0); + + // absent stopper + x2("(?~|abc)a*", "aaaaaabc", 0, 5); + x2("(?~|abc)a*z|aaaaaabc", "aaaaaabc", 0, 8); + x2("(?~|aaaaaa)a*", "aaaaaa", 0, 0); + x2("(?~|abc)aaaa|aaaabc", "aaaabc", 0, 6); + x2("(?>(?~|abc))aaaa|aaaabc", "aaaabc", 0, 6); + x2("(?~|)a", "a", 0, 1); + n("(?~|a)a", "a"); + x2("(?~|a)(?~|)a", "a", 0, 1); + x2("(?~|a).*(?~|)a", "bbbbbbbbbbbbbbbbbbbba", 0, 21); + x2("(?~|abc).*(xyz|pqr)(?~|)abc", "aaaaxyzaaapqrabc", 0, 16); + x2("(?~|abc).*(xyz|pqr)(?~|)abc", "aaaaxyzaaaabcpqrabc", 11, 19); + n("\\A(?~|abc).*(xyz|pqrabc)(?~|)abc", "aaaaxyzaaaabcpqrabcabc"); + x2("(?~|a)(?~|)c|ab|a|", "ab", 0, 2); + x2("(?~|a)((?~|)c|ab|a|)", "ab", 0, 0); + x2("(?~|a)((?>(?~|))c|ab|a|)", "ab", 0, 0); + + // extended grapheme cluster + // CR + LF + n(".\\y\\O", "\x0d\x0a"); + x2(".\\Y\\O", "\x0d\x0a", 0, 2); + n("\\X\\X", "\x0d\x0a"); + x2("^\\X$", "\x0d\x0a", 0, 2); + x2("^\\X\\X\\X$", "ab\x0d\x0a", 0, 4); + + fprintf(stdout, + "\nRESULT SUCC: %4d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n", + nsucc, nfail, nerror, onig_version()); + + return ((nfail == 0 && nerror == 0) ? 0 : -1); +} diff --git a/internal/components/third_party/oniguruma/test/testu.c b/internal/components/third_party/oniguruma/test/testu.c new file mode 100644 index 0000000000..c1971e7fcd --- /dev/null +++ b/internal/components/third_party/oniguruma/test/testu.c @@ -0,0 +1,963 @@ +/* + * testu.c + * Copyright (c) 2019 K.Kosako + */ +#include + +#ifdef POSIX_TEST +#include "onigposix.h" +#else +#include "oniguruma.h" +#endif + +static int nsucc = 0; +static int nfail = 0; +static int nerror = 0; + +#ifdef __TRUSTINSOFT_ANALYZER__ +static int nall = 0; +#endif + +static FILE* err_file; + +#ifndef POSIX_TEST +static OnigRegion* region; +static OnigEncoding ENC; +#endif + +#define ulen(p) onigenc_str_bytelen_null(ENC, (UChar* )p) + +static void uconv(char* from, char* to, int len) +{ + int i; + unsigned char c; + char *q; + + q = to; + + for (i = 0; i < len; i += 2) { + c = (unsigned char )from[i]; + if (c == 0) { + c = (unsigned char )from[i+1]; + if (c < 0x20 || c >= 0x7f || c == 0x5c || c == 0x22) { + sprintf(q, "\\%03o", (unsigned int )c); + q += 4; + } + else { + sprintf(q, "%c", c); + q++; + } + } + else { + sprintf(q, "\\%03o", (unsigned int )c); + q += 4; + c = (unsigned char )from[i+1]; + sprintf(q, "\\%03o", (unsigned int )c); + q += 4; + } + } + + *q = 0; +} + +static void xx(char* pattern, char* str, int from, int to, int mem, int not) +{ +#ifdef __TRUSTINSOFT_ANALYZER__ + if (nall++ % TIS_TEST_CHOOSE_MAX != TIS_TEST_CHOOSE_CURRENT) return; +#endif + + int r; + char cpat[4000], cstr[4000]; + +#ifdef POSIX_TEST + regex_t reg; + char buf[200]; + regmatch_t pmatch[20]; + + uconv(pattern, cpat, ulen(pattern)); + uconv(str, cstr, ulen(str)); + + r = regcomp(®, pattern, REG_EXTENDED | REG_NEWLINE); + if (r) { + regerror(r, ®, buf, sizeof(buf)); + fprintf(err_file, "ERROR: %s\n", buf); + nerror++; + return ; + } + + r = regexec(®, str, reg.re_nsub + 1, pmatch, 0); + if (r != 0 && r != REG_NOMATCH) { + regerror(r, ®, buf, sizeof(buf)); + fprintf(err_file, "ERROR: %s\n", buf); + nerror++; + return ; + } + + if (r == REG_NOMATCH) { + if (not) { + fprintf(stdout, "OK(N): /%s/ '%s'\n", cpat, cstr); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s'\n", cpat, cstr); + nfail++; + } + } + else { + if (not) { + fprintf(stdout, "FAIL(N): /%s/ '%s'\n", cpat, cstr); + nfail++; + } + else { + if (pmatch[mem].rm_so == from && pmatch[mem].rm_eo == to) { + fprintf(stdout, "OK: /%s/ '%s'\n", cpat, cstr); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", cpat, cstr, + from, to, pmatch[mem].rm_so, pmatch[mem].rm_eo); + nfail++; + } + } + } + regfree(®); + +#else + regex_t* reg; + OnigErrorInfo einfo; + + uconv(pattern, cpat, ulen(pattern)); + uconv(str, cstr, ulen(str)); + + r = onig_new(®, (UChar* )pattern, (UChar* )(pattern + ulen(pattern)), + ONIG_OPTION_DEFAULT, ENC, ONIG_SYNTAX_DEFAULT, &einfo); + if (r) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(err_file, "ERROR: %s\n", s); + nerror++; + return ; + } + + r = onig_search(reg, (UChar* )str, (UChar* )(str + ulen(str)), + (UChar* )str, (UChar* )(str + ulen(str)), + region, ONIG_OPTION_NONE); + if (r < ONIG_MISMATCH) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + fprintf(err_file, "ERROR: %s\n", s); + nerror++; + return ; + } + + if (r == ONIG_MISMATCH) { + if (not) { + fprintf(stdout, "OK(N): /%s/ '%s'\n", cpat, cstr); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s'\n", cpat, cstr); + nfail++; + } + } + else { + if (not) { + fprintf(stdout, "FAIL(N): /%s/ '%s'\n", cpat, cstr); + nfail++; + } + else { + if (region->beg[mem] == from && region->end[mem] == to) { + fprintf(stdout, "OK: /%s/ '%s'\n", cpat, cstr); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", cpat, cstr, + from, to, region->beg[mem], region->end[mem]); + nfail++; + } + } + } + onig_free(reg); +#endif +} + +static void x2(char* pattern, char* str, int from, int to) +{ + xx(pattern, str, from, to, 0, 0); +} + +static void x3(char* pattern, char* str, int from, int to, int mem) +{ + xx(pattern, str, from, to, mem, 0); +} + +static void n(char* pattern, char* str) +{ + xx(pattern, str, 0, 0, 0, 1); +} + +extern int main(int argc, char* argv[]) +{ + OnigEncoding use_encs[1]; + + use_encs[0] = ONIG_ENCODING_UTF16_BE; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + + err_file = stdout; + +#ifndef POSIX_TEST + region = onig_region_new(); +#endif +#ifdef POSIX_TEST + reg_set_encoding(REG_POSIX_ENCODING_UTF16_BE); +#else + ENC = ONIG_ENCODING_UTF16_BE; +#endif + x2("\000\000", "\000\000", 0, 0); + x2("\000^\000\000", "\000\000", 0, 0); + x2("\000$\000\000", "\000\000", 0, 0); + x2("\000\134\000G\000\000", "\000\000", 0, 0); + x2("\000\134\000A\000\000", "\000\000", 0, 0); + x2("\000\134\000Z\000\000", "\000\000", 0, 0); + x2("\000\134\000z\000\000", "\000\000", 0, 0); + x2("\000^\000$\000\000", "\000\000", 0, 0); + x2("\000\134\000c\000a\000\000", "\000\001\000\000", 0, 2); + x2("\000\134\000C\000-\000b\000\000", "\000\002\000\000", 0, 2); + x2("\000\134\000c\000\134\000\134\000\000", "\000\034\000\000", 0, 2); + x2("\000q\000[\000\134\000c\000\134\000\134\000]\000\000", "\000q\000\034\000\000", 0, 4); + x2("\000\000", "\000a\000\000", 0, 0); + x2("\000a\000\000", "\000a\000\000", 0, 2); + x2("\000\134\000x\0000\0000\000\134\000x\0006\0001\000\000", "\000a\000\000", 0, 2); + x2("\000a\000a\000\000", "\000a\000a\000\000", 0, 4); + x2("\000a\000a\000a\000\000", "\000a\000a\000a\000\000", 0, 6); + x2("\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000\000", "\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000\000", 0, 70); + x2("\000a\000b\000\000", "\000a\000b\000\000", 0, 4); + x2("\000b\000\000", "\000a\000b\000\000", 2, 4); + x2("\000b\000c\000\000", "\000a\000b\000c\000\000", 2, 6); + x2("\000(\000?\000i\000:\000#\000R\000E\000T\000#\000)\000\000", "\000#\000I\000N\000S\000#\000#\000R\000E\000T\000#\000\000", 10, 20); + x2("\000\134\0000\0000\0000\000\134\0001\0007\000\000", "\000\017\000\000", 0, 2); + x2("\000\134\000x\0000\0000\000\134\000x\0001\000f\000\000", "\000\037\000\000", 0, 2); + x2("\000a\000(\000?\000#\000.\000.\000.\000.\000\134\000\134\000J\000J\000J\000J\000)\000b\000\000", "\000a\000b\000\000", 0, 4); + x2("\000(\000?\000x\000)\000 \000 \000G\000 \000(\000o\000 \000O\000(\000?\000-\000x\000)\000o\000O\000)\000 \000g\000 \000L\000\000", "\000G\000o\000O\000o\000O\000g\000L\000e\000\000", 0, 14); + x2("\000.\000\000", "\000a\000\000", 0, 2); + n("\000.\000\000", "\000\000"); + x2("\000.\000.\000\000", "\000a\000b\000\000", 0, 4); + x2("\000\134\000w\000\000", "\000e\000\000", 0, 2); + n("\000\134\000W\000\000", "\000e\000\000"); + x2("\000\134\000s\000\000", "\000 \000\000", 0, 2); + x2("\000\134\000S\000\000", "\000b\000\000", 0, 2); + x2("\000\134\000d\000\000", "\0004\000\000", 0, 2); + n("\000\134\000D\000\000", "\0004\000\000"); + x2("\000\134\000b\000\000", "\000z\000 \000\000", 0, 0); + x2("\000\134\000b\000\000", "\000 \000z\000\000", 2, 2); + x2("\000\134\000B\000\000", "\000z\000z\000 \000\000", 2, 2); + x2("\000\134\000B\000\000", "\000z\000 \000\000", 4, 4); + x2("\000\134\000B\000\000", "\000 \000z\000\000", 0, 0); + x2("\000[\000a\000b\000]\000\000", "\000b\000\000", 0, 2); + n("\000[\000a\000b\000]\000\000", "\000c\000\000"); + x2("\000[\000a\000-\000z\000]\000\000", "\000t\000\000", 0, 2); + n("\000[\000^\000a\000]\000\000", "\000a\000\000"); + x2("\000[\000^\000a\000]\000\000", "\000\012\000\000", 0, 2); + x2("\000[\000]\000]\000\000", "\000]\000\000", 0, 2); + n("\000[\000^\000]\000]\000\000", "\000]\000\000"); + x2("\000[\000\134\000^\000]\000+\000\000", "\0000\000^\000^\0001\000\000", 2, 6); + x2("\000[\000b\000-\000]\000\000", "\000b\000\000", 0, 2); + x2("\000[\000b\000-\000]\000\000", "\000-\000\000", 0, 2); + x2("\000[\000\134\000w\000]\000\000", "\000z\000\000", 0, 2); + n("\000[\000\134\000w\000]\000\000", "\000 \000\000"); + x2("\000[\000\134\000W\000]\000\000", "\000b\000$\000\000", 2, 4); + x2("\000[\000\134\000d\000]\000\000", "\0005\000\000", 0, 2); + n("\000[\000\134\000d\000]\000\000", "\000e\000\000"); + x2("\000[\000\134\000D\000]\000\000", "\000t\000\000", 0, 2); + n("\000[\000\134\000D\000]\000\000", "\0003\000\000"); + x2("\000[\000\134\000s\000]\000\000", "\000 \000\000", 0, 2); + n("\000[\000\134\000s\000]\000\000", "\000a\000\000"); + x2("\000[\000\134\000S\000]\000\000", "\000b\000\000", 0, 2); + n("\000[\000\134\000S\000]\000\000", "\000 \000\000"); + x2("\000[\000\134\000w\000\134\000d\000]\000\000", "\0002\000\000", 0, 2); + n("\000[\000\134\000w\000\134\000d\000]\000\000", "\000 \000\000"); + x2("\000[\000[\000:\000u\000p\000p\000e\000r\000:\000]\000]\000\000", "\000B\000\000", 0, 2); + x2("\000[\000*\000[\000:\000x\000d\000i\000g\000i\000t\000:\000]\000+\000]\000\000", "\000+\000\000", 0, 2); + x2("\000[\000*\000[\000:\000x\000d\000i\000g\000i\000t\000:\000]\000+\000]\000\000", "\000G\000H\000I\000K\000K\000-\0009\000+\000*\000\000", 12, 14); + x2("\000[\000*\000[\000:\000x\000d\000i\000g\000i\000t\000:\000]\000+\000]\000\000", "\000-\000@\000^\000+\000\000", 6, 8); + n("\000[\000[\000:\000u\000p\000p\000e\000r\000]\000]\000\000", "\000A\000\000"); + x2("\000[\000[\000:\000u\000p\000p\000e\000r\000]\000]\000\000", "\000:\000\000", 0, 2); + x2("\000[\000\134\0000\0000\0000\000\134\0000\0004\0004\000-\000\134\0000\0000\0000\000\134\0000\0004\0007\000]\000\000", "\000&\000\000", 0, 2); + x2("\000[\000\134\000x\0000\0000\000\134\000x\0005\000a\000-\000\134\000x\0000\0000\000\134\000x\0005\000c\000]\000\000", "\000[\000\000", 0, 2); + x2("\000[\000\134\000x\0000\0000\000\134\000x\0006\000A\000-\000\134\000x\0000\0000\000\134\000x\0006\000D\000]\000\000", "\000l\000\000", 0, 2); + n("\000[\000\134\000x\0000\0000\000\134\000x\0006\000A\000-\000\134\000x\0000\0000\000\134\000x\0006\000D\000]\000\000", "\000n\000\000"); + n("\000^\000[\0000\000-\0009\000A\000-\000F\000]\000+\000 \0000\000+\000 \000U\000N\000D\000E\000F\000 \000\000", "\0007\0005\000F\000 \0000\0000\0000\0000\0000\0000\0000\0000\000 \000S\000E\000C\000T\0001\0004\000A\000 \000n\000o\000t\000y\000p\000e\000 \000(\000)\000 \000 \000 \000 \000E\000x\000t\000e\000r\000n\000a\000l\000 \000 \000 \000 \000|\000 \000_\000r\000b\000_\000a\000p\000p\000l\000y\000\000"); + x2("\000[\000\134\000[\000]\000\000", "\000[\000\000", 0, 2); + x2("\000[\000\134\000]\000]\000\000", "\000]\000\000", 0, 2); + x2("\000[\000&\000]\000\000", "\000&\000\000", 0, 2); + x2("\000[\000[\000a\000b\000]\000]\000\000", "\000b\000\000", 0, 2); + x2("\000[\000[\000a\000b\000]\000c\000]\000\000", "\000c\000\000", 0, 2); + n("\000[\000[\000^\000a\000]\000]\000\000", "\000a\000\000"); + n("\000[\000^\000[\000a\000]\000]\000\000", "\000a\000\000"); + x2("\000[\000[\000a\000b\000]\000&\000&\000b\000c\000]\000\000", "\000b\000\000", 0, 2); + n("\000[\000[\000a\000b\000]\000&\000&\000b\000c\000]\000\000", "\000a\000\000"); + n("\000[\000[\000a\000b\000]\000&\000&\000b\000c\000]\000\000", "\000c\000\000"); + x2("\000[\000a\000-\000z\000&\000&\000b\000-\000y\000&\000&\000c\000-\000x\000]\000\000", "\000w\000\000", 0, 2); + n("\000[\000^\000a\000-\000z\000&\000&\000b\000-\000y\000&\000&\000c\000-\000x\000]\000\000", "\000w\000\000"); + x2("\000[\000[\000^\000a\000&\000&\000a\000]\000&\000&\000a\000-\000z\000]\000\000", "\000b\000\000", 0, 2); + n("\000[\000[\000^\000a\000&\000&\000a\000]\000&\000&\000a\000-\000z\000]\000\000", "\000a\000\000"); + x2("\000[\000[\000^\000a\000-\000z\000&\000&\000b\000c\000d\000e\000f\000]\000&\000&\000[\000^\000c\000-\000g\000]\000]\000\000", "\000h\000\000", 0, 2); + n("\000[\000[\000^\000a\000-\000z\000&\000&\000b\000c\000d\000e\000f\000]\000&\000&\000[\000^\000c\000-\000g\000]\000]\000\000", "\000c\000\000"); + x2("\000[\000^\000[\000^\000a\000b\000c\000]\000&\000&\000[\000^\000c\000d\000e\000]\000]\000\000", "\000c\000\000", 0, 2); + x2("\000[\000^\000[\000^\000a\000b\000c\000]\000&\000&\000[\000^\000c\000d\000e\000]\000]\000\000", "\000e\000\000", 0, 2); + n("\000[\000^\000[\000^\000a\000b\000c\000]\000&\000&\000[\000^\000c\000d\000e\000]\000]\000\000", "\000f\000\000"); + x2("\000[\000a\000-\000&\000&\000-\000a\000]\000\000", "\000-\000\000", 0, 2); + n("\000[\000a\000\134\000-\000&\000&\000\134\000-\000a\000]\000\000", "\000&\000\000"); + n("\000\134\000w\000a\000b\000c\000\000", "\000 \000a\000b\000c\000\000"); + x2("\000a\000\134\000W\000b\000c\000\000", "\000a\000 \000b\000c\000\000", 0, 8); + x2("\000a\000.\000b\000.\000c\000\000", "\000a\000a\000b\000b\000c\000\000", 0, 10); + x2("\000.\000\134\000w\000b\000\134\000W\000.\000.\000c\000\000", "\000a\000b\000b\000 \000b\000c\000c\000\000", 0, 14); + x2("\000\134\000s\000\134\000w\000z\000z\000z\000\000", "\000 \000z\000z\000z\000z\000\000", 0, 10); + x2("\000a\000a\000.\000b\000\000", "\000a\000a\000b\000b\000\000", 0, 8); + n("\000.\000a\000\000", "\000a\000b\000\000"); + x2("\000.\000a\000\000", "\000a\000a\000\000", 0, 4); + x2("\000^\000a\000\000", "\000a\000\000", 0, 2); + x2("\000^\000a\000$\000\000", "\000a\000\000", 0, 2); + x2("\000^\000\134\000w\000$\000\000", "\000a\000\000", 0, 2); + n("\000^\000\134\000w\000$\000\000", "\000 \000\000"); + x2("\000^\000\134\000w\000a\000b\000$\000\000", "\000z\000a\000b\000\000", 0, 6); + x2("\000^\000\134\000w\000a\000b\000c\000d\000e\000f\000$\000\000", "\000z\000a\000b\000c\000d\000e\000f\000\000", 0, 14); + x2("\000^\000\134\000w\000.\000.\000.\000d\000e\000f\000$\000\000", "\000z\000a\000b\000c\000d\000e\000f\000\000", 0, 14); + x2("\000\134\000w\000\134\000w\000\134\000s\000\134\000W\000a\000a\000a\000\134\000d\000\000", "\000a\000a\000 \000 \000a\000a\000a\0004\000\000", 0, 16); + x2("\000\134\000A\000\134\000Z\000\000", "\000\000", 0, 0); + x2("\000\134\000A\000x\000y\000z\000\000", "\000x\000y\000z\000\000", 0, 6); + x2("\000x\000y\000z\000\134\000Z\000\000", "\000x\000y\000z\000\000", 0, 6); + x2("\000x\000y\000z\000\134\000z\000\000", "\000x\000y\000z\000\000", 0, 6); + x2("\000a\000\134\000Z\000\000", "\000a\000\000", 0, 2); + x2("\000\134\000G\000a\000z\000\000", "\000a\000z\000\000", 0, 4); + n("\000\134\000G\000z\000\000", "\000b\000z\000a\000\000"); + n("\000a\000z\000\134\000G\000\000", "\000a\000z\000\000"); + n("\000a\000z\000\134\000A\000\000", "\000a\000z\000\000"); + n("\000a\000\134\000A\000z\000\000", "\000a\000z\000\000"); + x2("\000\134\000^\000\134\000$\000\000", "\000^\000$\000\000", 0, 4); + x2("\000^\000x\000?\000y\000\000", "\000x\000y\000\000", 0, 4); + x2("\000^\000(\000x\000?\000y\000)\000\000", "\000x\000y\000\000", 0, 4); + x2("\000\134\000w\000\000", "\000_\000\000", 0, 2); + n("\000\134\000W\000\000", "\000_\000\000"); + x2("\000(\000?\000=\000z\000)\000z\000\000", "\000z\000\000", 0, 2); + n("\000(\000?\000=\000z\000)\000.\000\000", "\000a\000\000"); + x2("\000(\000?\000!\000z\000)\000a\000\000", "\000a\000\000", 0, 2); + n("\000(\000?\000!\000z\000)\000a\000\000", "\000z\000\000"); + x2("\000(\000?\000i\000:\000a\000)\000\000", "\000a\000\000", 0, 2); + x2("\000(\000?\000i\000:\000a\000)\000\000", "\000A\000\000", 0, 2); + x2("\000(\000?\000i\000:\000A\000)\000\000", "\000a\000\000", 0, 2); + n("\000(\000?\000i\000:\000A\000)\000\000", "\000b\000\000"); + x2("\000(\000?\000i\000:\000[\000A\000-\000Z\000]\000)\000\000", "\000a\000\000", 0, 2); + x2("\000(\000?\000i\000:\000[\000f\000-\000m\000]\000)\000\000", "\000H\000\000", 0, 2); + x2("\000(\000?\000i\000:\000[\000f\000-\000m\000]\000)\000\000", "\000h\000\000", 0, 2); + n("\000(\000?\000i\000:\000[\000f\000-\000m\000]\000)\000\000", "\000e\000\000"); + x2("\000(\000?\000i\000:\000[\000A\000-\000c\000]\000)\000\000", "\000D\000\000", 0, 2); + n("\000(\000?\000i\000:\000[\000^\000a\000-\000z\000]\000)\000\000", "\000A\000\000"); + n("\000(\000?\000i\000:\000[\000^\000a\000-\000z\000]\000)\000\000", "\000a\000\000"); + x2("\000(\000?\000i\000:\000[\000!\000-\000k\000]\000)\000\000", "\000Z\000\000", 0, 2); + x2("\000(\000?\000i\000:\000[\000!\000-\000k\000]\000)\000\000", "\0007\000\000", 0, 2); + x2("\000(\000?\000i\000:\000[\000T\000-\000}\000]\000)\000\000", "\000b\000\000", 0, 2); + x2("\000(\000?\000i\000:\000[\000T\000-\000}\000]\000)\000\000", "\000{\000\000", 0, 2); + x2("\000(\000?\000i\000:\000\134\000?\000a\000)\000\000", "\000?\000A\000\000", 0, 4); + x2("\000(\000?\000i\000:\000\134\000*\000A\000)\000\000", "\000*\000a\000\000", 0, 4); + n("\000.\000\000", "\000\012\000\000"); + x2("\000(\000?\000m\000:\000.\000)\000\000", "\000\012\000\000", 0, 2); + x2("\000(\000?\000m\000:\000a\000.\000)\000\000", "\000a\000\012\000\000", 0, 4); + x2("\000(\000?\000m\000:\000.\000b\000)\000\000", "\000a\000\012\000b\000\000", 2, 6); + x2("\000.\000*\000a\000b\000c\000\000", "\000d\000d\000d\000a\000b\000d\000d\000\012\000d\000d\000a\000b\000c\000\000", 16, 26); + x2("\000(\000?\000m\000:\000.\000*\000a\000b\000c\000)\000\000", "\000d\000d\000d\000a\000b\000d\000d\000a\000b\000c\000\000", 0, 20); + n("\000(\000?\000i\000)\000(\000?\000-\000i\000)\000a\000\000", "\000A\000\000"); + n("\000(\000?\000i\000)\000(\000?\000-\000i\000:\000a\000)\000\000", "\000A\000\000"); + x2("\000a\000?\000\000", "\000\000", 0, 0); + x2("\000a\000?\000\000", "\000b\000\000", 0, 0); + x2("\000a\000?\000\000", "\000a\000\000", 0, 2); + x2("\000a\000*\000\000", "\000\000", 0, 0); + x2("\000a\000*\000\000", "\000a\000\000", 0, 2); + x2("\000a\000*\000\000", "\000a\000a\000a\000\000", 0, 6); + x2("\000a\000*\000\000", "\000b\000a\000a\000a\000a\000\000", 0, 0); + n("\000a\000+\000\000", "\000\000"); + x2("\000a\000+\000\000", "\000a\000\000", 0, 2); + x2("\000a\000+\000\000", "\000a\000a\000a\000a\000\000", 0, 8); + x2("\000a\000+\000\000", "\000a\000a\000b\000b\000b\000\000", 0, 4); + x2("\000a\000+\000\000", "\000b\000a\000a\000a\000a\000\000", 2, 10); + x2("\000.\000?\000\000", "\000\000", 0, 0); + x2("\000.\000?\000\000", "\000f\000\000", 0, 2); + x2("\000.\000?\000\000", "\000\012\000\000", 0, 0); + x2("\000.\000*\000\000", "\000\000", 0, 0); + x2("\000.\000*\000\000", "\000a\000b\000c\000d\000e\000\000", 0, 10); + x2("\000.\000+\000\000", "\000z\000\000", 0, 2); + x2("\000.\000+\000\000", "\000z\000d\000s\000w\000e\000r\000\012\000\000", 0, 12); + x2("\000(\000.\000*\000)\000a\000\134\0001\000f\000\000", "\000b\000a\000b\000f\000b\000a\000c\000\000", 0, 8); + x2("\000(\000.\000*\000)\000a\000\134\0001\000f\000\000", "\000b\000a\000c\000b\000a\000b\000f\000\000", 6, 14); + x2("\000(\000(\000.\000*\000)\000a\000\134\0002\000f\000)\000\000", "\000b\000a\000c\000b\000a\000b\000f\000\000", 6, 14); + x2("\000(\000.\000*\000)\000a\000\134\0001\000f\000\000", "\000b\000a\000c\000z\000z\000z\000z\000z\000z\000\012\000b\000a\000z\000z\000\012\000z\000z\000z\000z\000b\000a\000b\000f\000\000", 38, 46); + x2("\000a\000|\000b\000\000", "\000a\000\000", 0, 2); + x2("\000a\000|\000b\000\000", "\000b\000\000", 0, 2); + x2("\000|\000a\000\000", "\000a\000\000", 0, 0); + x2("\000(\000|\000a\000)\000\000", "\000a\000\000", 0, 0); + x2("\000a\000b\000|\000b\000c\000\000", "\000a\000b\000\000", 0, 4); + x2("\000a\000b\000|\000b\000c\000\000", "\000b\000c\000\000", 0, 4); + x2("\000z\000(\000?\000:\000a\000b\000|\000b\000c\000)\000\000", "\000z\000b\000c\000\000", 0, 6); + x2("\000a\000(\000?\000:\000a\000b\000|\000b\000c\000)\000c\000\000", "\000a\000a\000b\000c\000\000", 0, 8); + x2("\000a\000b\000|\000(\000?\000:\000a\000c\000|\000a\000z\000)\000\000", "\000a\000z\000\000", 0, 4); + x2("\000a\000|\000b\000|\000c\000\000", "\000d\000c\000\000", 2, 4); + x2("\000a\000|\000b\000|\000c\000d\000|\000e\000f\000g\000|\000h\000|\000i\000j\000k\000|\000l\000m\000n\000|\000o\000|\000p\000q\000|\000r\000s\000t\000u\000v\000w\000x\000|\000y\000z\000\000", "\000p\000q\000r\000\000", 0, 4); + n("\000a\000|\000b\000|\000c\000d\000|\000e\000f\000g\000|\000h\000|\000i\000j\000k\000|\000l\000m\000n\000|\000o\000|\000p\000q\000|\000r\000s\000t\000u\000v\000w\000x\000|\000y\000z\000\000", "\000m\000n\000\000"); + x2("\000a\000|\000^\000z\000\000", "\000b\000a\000\000", 2, 4); + x2("\000a\000|\000^\000z\000\000", "\000z\000a\000\000", 0, 2); + x2("\000a\000|\000\134\000G\000z\000\000", "\000b\000z\000a\000\000", 4, 6); + x2("\000a\000|\000\134\000G\000z\000\000", "\000z\000a\000\000", 0, 2); + x2("\000a\000|\000\134\000A\000z\000\000", "\000b\000z\000a\000\000", 4, 6); + x2("\000a\000|\000\134\000A\000z\000\000", "\000z\000a\000\000", 0, 2); + x2("\000a\000|\000b\000\134\000Z\000\000", "\000b\000a\000\000", 2, 4); + x2("\000a\000|\000b\000\134\000Z\000\000", "\000b\000\000", 0, 2); + x2("\000a\000|\000b\000\134\000z\000\000", "\000b\000a\000\000", 2, 4); + x2("\000a\000|\000b\000\134\000z\000\000", "\000b\000\000", 0, 2); + x2("\000\134\000w\000|\000\134\000s\000\000", "\000 \000\000", 0, 2); + n("\000\134\000w\000|\000\134\000w\000\000", "\000 \000\000"); + x2("\000\134\000w\000|\000%\000\000", "\000%\000\000", 0, 2); + x2("\000\134\000w\000|\000[\000&\000$\000]\000\000", "\000&\000\000", 0, 2); + x2("\000[\000b\000-\000d\000]\000|\000[\000^\000e\000-\000z\000]\000\000", "\000a\000\000", 0, 2); + x2("\000(\000?\000:\000a\000|\000[\000c\000-\000f\000]\000)\000|\000b\000z\000\000", "\000d\000z\000\000", 0, 2); + x2("\000(\000?\000:\000a\000|\000[\000c\000-\000f\000]\000)\000|\000b\000z\000\000", "\000b\000z\000\000", 0, 4); + x2("\000a\000b\000c\000|\000(\000?\000=\000z\000z\000)\000.\000.\000f\000\000", "\000z\000z\000f\000\000", 0, 6); + x2("\000a\000b\000c\000|\000(\000?\000!\000z\000z\000)\000.\000.\000f\000\000", "\000a\000b\000f\000\000", 0, 6); + x2("\000(\000?\000=\000z\000a\000)\000.\000.\000a\000|\000(\000?\000=\000z\000z\000)\000.\000.\000a\000\000", "\000z\000z\000a\000\000", 0, 6); + n("\000(\000?\000>\000a\000|\000a\000b\000d\000)\000c\000\000", "\000a\000b\000d\000c\000\000"); + x2("\000(\000?\000>\000a\000b\000d\000|\000a\000)\000c\000\000", "\000a\000b\000d\000c\000\000", 0, 8); + x2("\000a\000?\000|\000b\000\000", "\000a\000\000", 0, 2); + x2("\000a\000?\000|\000b\000\000", "\000b\000\000", 0, 0); + x2("\000a\000?\000|\000b\000\000", "\000\000", 0, 0); + x2("\000a\000*\000|\000b\000\000", "\000a\000a\000\000", 0, 4); + x2("\000a\000*\000|\000b\000*\000\000", "\000b\000a\000\000", 0, 0); + x2("\000a\000*\000|\000b\000*\000\000", "\000a\000b\000\000", 0, 2); + x2("\000a\000+\000|\000b\000*\000\000", "\000\000", 0, 0); + x2("\000a\000+\000|\000b\000*\000\000", "\000b\000b\000b\000\000", 0, 6); + x2("\000a\000+\000|\000b\000*\000\000", "\000a\000b\000b\000b\000\000", 0, 2); + n("\000a\000+\000|\000b\000+\000\000", "\000\000"); + x2("\000(\000a\000|\000b\000)\000?\000\000", "\000b\000\000", 0, 2); + x2("\000(\000a\000|\000b\000)\000*\000\000", "\000b\000a\000\000", 0, 4); + x2("\000(\000a\000|\000b\000)\000+\000\000", "\000b\000a\000b\000\000", 0, 6); + x2("\000(\000a\000b\000|\000c\000a\000)\000+\000\000", "\000c\000a\000a\000b\000b\000c\000\000", 0, 8); + x2("\000(\000a\000b\000|\000c\000a\000)\000+\000\000", "\000a\000a\000b\000c\000a\000\000", 2, 10); + x2("\000(\000a\000b\000|\000c\000a\000)\000+\000\000", "\000a\000b\000z\000c\000a\000\000", 0, 4); + x2("\000(\000a\000|\000b\000a\000b\000)\000+\000\000", "\000a\000b\000a\000b\000a\000\000", 0, 10); + x2("\000(\000a\000|\000b\000a\000b\000)\000+\000\000", "\000b\000a\000\000", 2, 4); + x2("\000(\000a\000|\000b\000a\000b\000)\000+\000\000", "\000b\000a\000a\000a\000b\000a\000\000", 2, 8); + x2("\000(\000?\000:\000a\000|\000b\000)\000(\000?\000:\000a\000|\000b\000)\000\000", "\000a\000b\000\000", 0, 4); + x2("\000(\000?\000:\000a\000*\000|\000b\000*\000)\000(\000?\000:\000a\000*\000|\000b\000*\000)\000\000", "\000a\000a\000a\000b\000b\000b\000\000", 0, 6); + x2("\000(\000?\000:\000a\000*\000|\000b\000*\000)\000(\000?\000:\000a\000+\000|\000b\000+\000)\000\000", "\000a\000a\000a\000b\000b\000b\000\000", 0, 12); + x2("\000(\000?\000:\000a\000+\000|\000b\000+\000)\000{\0002\000}\000\000", "\000a\000a\000a\000b\000b\000b\000\000", 0, 12); + x2("\000h\000{\0000\000,\000}\000\000", "\000h\000h\000h\000h\000\000", 0, 8); + x2("\000(\000?\000:\000a\000+\000|\000b\000+\000)\000{\0001\000,\0002\000}\000\000", "\000a\000a\000a\000b\000b\000b\000\000", 0, 12); + n("\000a\000x\000{\0002\000}\000*\000a\000\000", "\0000\000a\000x\000x\000x\000a\0001\000\000"); + n("\000a\000.\000{\0000\000,\0002\000}\000a\000\000", "\0000\000a\000X\000X\000X\000a\0000\000\000"); + n("\000a\000.\000{\0000\000,\0002\000}\000?\000a\000\000", "\0000\000a\000X\000X\000X\000a\0000\000\000"); + n("\000a\000.\000{\0000\000,\0002\000}\000?\000a\000\000", "\0000\000a\000X\000X\000X\000X\000a\0000\000\000"); + x2("\000^\000a\000{\0002\000,\000}\000?\000a\000$\000\000", "\000a\000a\000a\000\000", 0, 6); + x2("\000^\000[\000a\000-\000z\000]\000{\0002\000,\000}\000?\000$\000\000", "\000a\000a\000a\000\000", 0, 6); + x2("\000(\000?\000:\000a\000+\000|\000\134\000A\000b\000*\000)\000c\000c\000\000", "\000c\000c\000\000", 0, 4); + n("\000(\000?\000:\000a\000+\000|\000\134\000A\000b\000*\000)\000c\000c\000\000", "\000a\000b\000c\000c\000\000"); + x2("\000(\000?\000:\000^\000a\000+\000|\000b\000+\000)\000*\000c\000\000", "\000a\000a\000b\000b\000b\000a\000b\000c\000\000", 12, 16); + x2("\000(\000?\000:\000^\000a\000+\000|\000b\000+\000)\000*\000c\000\000", "\000a\000a\000b\000b\000b\000b\000c\000\000", 0, 14); + x2("\000a\000|\000(\000?\000i\000)\000c\000\000", "\000C\000\000", 0, 2); + x2("\000(\000?\000i\000)\000c\000|\000a\000\000", "\000C\000\000", 0, 2); + x2("\000(\000?\000i\000)\000c\000|\000a\000\000", "\000A\000\000", 0, 2); + x2("\000(\000?\000i\000:\000c\000)\000|\000a\000\000", "\000C\000\000", 0, 2); + n("\000(\000?\000i\000:\000c\000)\000|\000a\000\000", "\000A\000\000"); + x2("\000[\000a\000b\000c\000]\000?\000\000", "\000a\000b\000c\000\000", 0, 2); + x2("\000[\000a\000b\000c\000]\000*\000\000", "\000a\000b\000c\000\000", 0, 6); + x2("\000[\000^\000a\000b\000c\000]\000*\000\000", "\000a\000b\000c\000\000", 0, 0); + n("\000[\000^\000a\000b\000c\000]\000+\000\000", "\000a\000b\000c\000\000"); + x2("\000a\000?\000?\000\000", "\000a\000a\000a\000\000", 0, 0); + x2("\000b\000a\000?\000?\000b\000\000", "\000b\000a\000b\000\000", 0, 6); + x2("\000a\000*\000?\000\000", "\000a\000a\000a\000\000", 0, 0); + x2("\000b\000a\000*\000?\000\000", "\000b\000a\000a\000\000", 0, 2); + x2("\000b\000a\000*\000?\000b\000\000", "\000b\000a\000a\000b\000\000", 0, 8); + x2("\000a\000+\000?\000\000", "\000a\000a\000a\000\000", 0, 2); + x2("\000b\000a\000+\000?\000\000", "\000b\000a\000a\000\000", 0, 4); + x2("\000b\000a\000+\000?\000b\000\000", "\000b\000a\000a\000b\000\000", 0, 8); + x2("\000(\000?\000:\000a\000?\000)\000?\000?\000\000", "\000a\000\000", 0, 0); + x2("\000(\000?\000:\000a\000?\000?\000)\000?\000\000", "\000a\000\000", 0, 0); + x2("\000(\000?\000:\000a\000?\000)\000+\000?\000\000", "\000a\000a\000a\000\000", 0, 2); + x2("\000(\000?\000:\000a\000+\000)\000?\000?\000\000", "\000a\000a\000a\000\000", 0, 0); + x2("\000(\000?\000:\000a\000+\000)\000?\000?\000b\000\000", "\000a\000a\000a\000b\000\000", 0, 8); + x2("\000(\000?\000:\000a\000b\000)\000?\000{\0002\000}\000\000", "\000\000", 0, 0); + x2("\000(\000?\000:\000a\000b\000)\000?\000{\0002\000}\000\000", "\000a\000b\000a\000b\000a\000\000", 0, 8); + x2("\000(\000?\000:\000a\000b\000)\000*\000{\0000\000}\000\000", "\000a\000b\000a\000b\000a\000\000", 0, 0); + x2("\000(\000?\000:\000a\000b\000)\000{\0003\000,\000}\000\000", "\000a\000b\000a\000b\000a\000b\000a\000b\000\000", 0, 16); + n("\000(\000?\000:\000a\000b\000)\000{\0003\000,\000}\000\000", "\000a\000b\000a\000b\000\000"); + x2("\000(\000?\000:\000a\000b\000)\000{\0002\000,\0004\000}\000\000", "\000a\000b\000a\000b\000a\000b\000\000", 0, 12); + x2("\000(\000?\000:\000a\000b\000)\000{\0002\000,\0004\000}\000\000", "\000a\000b\000a\000b\000a\000b\000a\000b\000a\000b\000\000", 0, 16); + x2("\000(\000?\000:\000a\000b\000)\000{\0002\000,\0004\000}\000?\000\000", "\000a\000b\000a\000b\000a\000b\000a\000b\000a\000b\000\000", 0, 8); + x2("\000(\000?\000:\000a\000b\000)\000{\000,\000}\000\000", "\000a\000b\000{\000,\000}\000\000", 0, 10); + x2("\000(\000?\000:\000a\000b\000c\000)\000+\000?\000{\0002\000}\000\000", "\000a\000b\000c\000a\000b\000c\000a\000b\000c\000\000", 0, 12); + x2("\000(\000?\000:\000X\000*\000)\000(\000?\000i\000:\000x\000a\000)\000\000", "\000X\000X\000X\000a\000\000", 0, 8); + x2("\000(\000d\000+\000)\000(\000[\000^\000a\000b\000c\000]\000z\000)\000\000", "\000d\000d\000d\000z\000\000", 0, 8); + x2("\000(\000[\000^\000a\000b\000c\000]\000*\000)\000(\000[\000^\000a\000b\000c\000]\000z\000)\000\000", "\000d\000d\000d\000z\000\000", 0, 8); + x2("\000(\000\134\000w\000+\000)\000(\000\134\000w\000z\000)\000\000", "\000d\000d\000d\000z\000\000", 0, 8); + x3("\000(\000a\000)\000\000", "\000a\000\000", 0, 2, 1); + x3("\000(\000a\000b\000)\000\000", "\000a\000b\000\000", 0, 4, 1); + x2("\000(\000(\000a\000b\000)\000)\000\000", "\000a\000b\000\000", 0, 4); + x3("\000(\000(\000a\000b\000)\000)\000\000", "\000a\000b\000\000", 0, 4, 1); + x3("\000(\000(\000a\000b\000)\000)\000\000", "\000a\000b\000\000", 0, 4, 2); + x3("\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000a\000b\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000\000", "\000a\000b\000\000", 0, 4, 20); + x3("\000(\000a\000b\000)\000(\000c\000d\000)\000\000", "\000a\000b\000c\000d\000\000", 0, 4, 1); + x3("\000(\000a\000b\000)\000(\000c\000d\000)\000\000", "\000a\000b\000c\000d\000\000", 4, 8, 2); + x3("\000(\000)\000(\000a\000)\000b\000c\000(\000d\000e\000f\000)\000g\000h\000i\000j\000k\000\000", "\000a\000b\000c\000d\000e\000f\000g\000h\000i\000j\000k\000\000", 6, 12, 3); + x3("\000(\000(\000)\000(\000a\000)\000b\000c\000(\000d\000e\000f\000)\000g\000h\000i\000j\000k\000)\000\000", "\000a\000b\000c\000d\000e\000f\000g\000h\000i\000j\000k\000\000", 6, 12, 4); + x2("\000(\000^\000a\000)\000\000", "\000a\000\000", 0, 2); + x3("\000(\000a\000)\000|\000(\000a\000)\000\000", "\000b\000a\000\000", 2, 4, 1); + x3("\000(\000^\000a\000)\000|\000(\000a\000)\000\000", "\000b\000a\000\000", 2, 4, 2); + x3("\000(\000a\000?\000)\000\000", "\000a\000a\000a\000\000", 0, 2, 1); + x3("\000(\000a\000*\000)\000\000", "\000a\000a\000a\000\000", 0, 6, 1); + x3("\000(\000a\000*\000)\000\000", "\000\000", 0, 0, 1); + x3("\000(\000a\000+\000)\000\000", "\000a\000a\000a\000a\000a\000a\000a\000\000", 0, 14, 1); + x3("\000(\000a\000+\000|\000b\000*\000)\000\000", "\000b\000b\000b\000a\000a\000\000", 0, 6, 1); + x3("\000(\000a\000+\000|\000b\000?\000)\000\000", "\000b\000b\000b\000a\000a\000\000", 0, 2, 1); + x3("\000(\000a\000b\000c\000)\000?\000\000", "\000a\000b\000c\000\000", 0, 6, 1); + x3("\000(\000a\000b\000c\000)\000*\000\000", "\000a\000b\000c\000\000", 0, 6, 1); + x3("\000(\000a\000b\000c\000)\000+\000\000", "\000a\000b\000c\000\000", 0, 6, 1); + x3("\000(\000x\000y\000z\000|\000a\000b\000c\000)\000+\000\000", "\000a\000b\000c\000\000", 0, 6, 1); + x3("\000(\000[\000x\000y\000z\000]\000[\000a\000b\000c\000]\000|\000a\000b\000c\000)\000+\000\000", "\000a\000b\000c\000\000", 0, 6, 1); + x3("\000(\000(\000?\000i\000:\000a\000b\000c\000)\000)\000\000", "\000A\000b\000C\000\000", 0, 6, 1); + x2("\000(\000a\000b\000c\000)\000(\000?\000i\000:\000\134\0001\000)\000\000", "\000a\000b\000c\000A\000B\000C\000\000", 0, 12); + x3("\000(\000(\000?\000m\000:\000a\000.\000c\000)\000)\000\000", "\000a\000\012\000c\000\000", 0, 6, 1); + x3("\000(\000(\000?\000=\000a\000z\000)\000a\000)\000\000", "\000a\000z\000b\000\000", 0, 2, 1); + x3("\000a\000b\000c\000|\000(\000.\000a\000b\000d\000)\000\000", "\000z\000a\000b\000d\000\000", 0, 8, 1); + x2("\000(\000?\000:\000a\000b\000c\000)\000|\000(\000A\000B\000C\000)\000\000", "\000a\000b\000c\000\000", 0, 6); + x3("\000(\000?\000i\000:\000(\000a\000b\000c\000)\000)\000|\000(\000z\000z\000z\000)\000\000", "\000A\000B\000C\000\000", 0, 6, 1); + x3("\000a\000*\000(\000.\000)\000\000", "\000a\000a\000a\000a\000z\000\000", 8, 10, 1); + x3("\000a\000*\000?\000(\000.\000)\000\000", "\000a\000a\000a\000a\000z\000\000", 0, 2, 1); + x3("\000a\000*\000?\000(\000c\000)\000\000", "\000a\000a\000a\000a\000c\000\000", 8, 10, 1); + x3("\000[\000b\000c\000d\000]\000a\000*\000(\000.\000)\000\000", "\000c\000a\000a\000a\000a\000z\000\000", 10, 12, 1); + x3("\000(\000\134\000A\000b\000b\000)\000c\000c\000\000", "\000b\000b\000c\000c\000\000", 0, 4, 1); + n("\000(\000\134\000A\000b\000b\000)\000c\000c\000\000", "\000z\000b\000b\000c\000c\000\000"); + x3("\000(\000^\000b\000b\000)\000c\000c\000\000", "\000b\000b\000c\000c\000\000", 0, 4, 1); + n("\000(\000^\000b\000b\000)\000c\000c\000\000", "\000z\000b\000b\000c\000c\000\000"); + x3("\000c\000c\000(\000b\000b\000$\000)\000\000", "\000c\000c\000b\000b\000\000", 4, 8, 1); + n("\000c\000c\000(\000b\000b\000$\000)\000\000", "\000c\000c\000b\000b\000b\000\000"); + n("\000(\000\134\0001\000)\000\000", "\000\000"); + n("\000\134\0001\000(\000a\000)\000\000", "\000a\000a\000\000"); + n("\000(\000a\000(\000b\000)\000\134\0001\000)\000\134\0002\000+\000\000", "\000a\000b\000a\000b\000b\000\000"); + n("\000(\000?\000:\000(\000?\000:\000\134\0001\000|\000z\000)\000(\000a\000)\000)\000+\000$\000\000", "\000z\000a\000a\000\000"); + x2("\000(\000?\000:\000(\000?\000:\000\134\0001\000|\000z\000)\000(\000a\000)\000)\000+\000$\000\000", "\000z\000a\000a\000a\000\000", 0, 8); + x2("\000(\000a\000)\000(\000?\000=\000\134\0001\000)\000\000", "\000a\000a\000\000", 0, 2); + n("\000(\000a\000)\000$\000|\000\134\0001\000\000", "\000a\000z\000\000"); + x2("\000(\000a\000)\000\134\0001\000\000", "\000a\000a\000\000", 0, 4); + n("\000(\000a\000)\000\134\0001\000\000", "\000a\000b\000\000"); + x2("\000(\000a\000?\000)\000\134\0001\000\000", "\000a\000a\000\000", 0, 4); + x2("\000(\000a\000?\000?\000)\000\134\0001\000\000", "\000a\000a\000\000", 0, 0); + x2("\000(\000a\000*\000)\000\134\0001\000\000", "\000a\000a\000a\000a\000a\000\000", 0, 8); + x3("\000(\000a\000*\000)\000\134\0001\000\000", "\000a\000a\000a\000a\000a\000\000", 0, 4, 1); + x2("\000a\000(\000b\000*\000)\000\134\0001\000\000", "\000a\000b\000b\000b\000b\000\000", 0, 10); + x2("\000a\000(\000b\000*\000)\000\134\0001\000\000", "\000a\000b\000\000", 0, 2); + x2("\000(\000a\000*\000)\000(\000b\000*\000)\000\134\0001\000\134\0002\000\000", "\000a\000a\000a\000b\000b\000a\000a\000a\000b\000b\000\000", 0, 20); + x2("\000(\000a\000*\000)\000(\000b\000*\000)\000\134\0002\000\000", "\000a\000a\000a\000b\000b\000b\000b\000\000", 0, 14); + x2("\000(\000(\000(\000(\000(\000(\000(\000a\000*\000)\000b\000)\000)\000)\000)\000)\000)\000c\000\134\0007\000\000", "\000a\000a\000a\000b\000c\000a\000a\000a\000\000", 0, 16); + x3("\000(\000(\000(\000(\000(\000(\000(\000a\000*\000)\000b\000)\000)\000)\000)\000)\000)\000c\000\134\0007\000\000", "\000a\000a\000a\000b\000c\000a\000a\000a\000\000", 0, 6, 7); + x2("\000(\000a\000)\000(\000b\000)\000(\000c\000)\000\134\0002\000\134\0001\000\134\0003\000\000", "\000a\000b\000c\000b\000a\000c\000\000", 0, 12); + x2("\000(\000[\000a\000-\000d\000]\000)\000\134\0001\000\000", "\000c\000c\000\000", 0, 4); + x2("\000(\000\134\000w\000\134\000d\000\134\000s\000)\000\134\0001\000\000", "\000f\0005\000 \000f\0005\000 \000\000", 0, 12); + n("\000(\000\134\000w\000\134\000d\000\134\000s\000)\000\134\0001\000\000", "\000f\0005\000 \000f\0005\000\000"); + x2("\000(\000w\000h\000o\000|\000[\000a\000-\000c\000]\000{\0003\000}\000)\000\134\0001\000\000", "\000w\000h\000o\000w\000h\000o\000\000", 0, 12); + x2("\000.\000.\000.\000(\000w\000h\000o\000|\000[\000a\000-\000c\000]\000{\0003\000}\000)\000\134\0001\000\000", "\000a\000b\000c\000w\000h\000o\000w\000h\000o\000\000", 0, 18); + x2("\000(\000w\000h\000o\000|\000[\000a\000-\000c\000]\000{\0003\000}\000)\000\134\0001\000\000", "\000c\000b\000c\000c\000b\000c\000\000", 0, 12); + x2("\000(\000^\000a\000)\000\134\0001\000\000", "\000a\000a\000\000", 0, 4); + n("\000(\000^\000a\000)\000\134\0001\000\000", "\000b\000a\000a\000\000"); + n("\000(\000a\000$\000)\000\134\0001\000\000", "\000a\000a\000\000"); + n("\000(\000a\000b\000\134\000Z\000)\000\134\0001\000\000", "\000a\000b\000\000"); + x2("\000(\000a\000*\000\134\000Z\000)\000\134\0001\000\000", "\000a\000\000", 2, 2); + x2("\000.\000(\000a\000*\000\134\000Z\000)\000\134\0001\000\000", "\000b\000a\000\000", 2, 4); + x3("\000(\000.\000(\000a\000b\000c\000)\000\134\0002\000)\000\000", "\000z\000a\000b\000c\000a\000b\000c\000\000", 0, 14, 1); + x3("\000(\000.\000(\000.\000.\000\134\000d\000.\000)\000\134\0002\000)\000\000", "\000z\0001\0002\0003\0004\0001\0002\0003\0004\000\000", 0, 18, 1); + x2("\000(\000(\000?\000i\000:\000a\000z\000)\000)\000\134\0001\000\000", "\000A\000z\000A\000z\000\000", 0, 8); + n("\000(\000(\000?\000i\000:\000a\000z\000)\000)\000\134\0001\000\000", "\000A\000z\000a\000z\000\000"); + x2("\000(\000?\000<\000=\000a\000)\000b\000\000", "\000a\000b\000\000", 2, 4); + n("\000(\000?\000<\000=\000a\000)\000b\000\000", "\000b\000b\000\000"); + x2("\000(\000?\000<\000=\000a\000|\000b\000)\000b\000\000", "\000b\000b\000\000", 2, 4); + x2("\000(\000?\000<\000=\000a\000|\000b\000c\000)\000b\000\000", "\000b\000c\000b\000\000", 4, 6); + x2("\000(\000?\000<\000=\000a\000|\000b\000c\000)\000b\000\000", "\000a\000b\000\000", 2, 4); + x2("\000(\000?\000<\000=\000a\000|\000b\000c\000|\000|\000d\000e\000f\000g\000h\000i\000j\000|\000k\000l\000m\000n\000o\000p\000q\000|\000r\000)\000z\000\000", "\000r\000z\000\000", 2, 4); + x2("\000(\000a\000)\000\134\000g\000<\0001\000>\000\000", "\000a\000a\000\000", 0, 4); + x2("\000(\000?\000<\000!\000a\000)\000b\000\000", "\000c\000b\000\000", 2, 4); + n("\000(\000?\000<\000!\000a\000)\000b\000\000", "\000a\000b\000\000"); + x2("\000(\000?\000<\000!\000a\000|\000b\000c\000)\000b\000\000", "\000b\000b\000b\000\000", 0, 2); + n("\000(\000?\000<\000!\000a\000|\000b\000c\000)\000z\000\000", "\000b\000c\000z\000\000"); + x2("\000(\000?\000<\000n\000a\000m\000e\0001\000>\000a\000)\000\000", "\000a\000\000", 0, 2); + x2("\000(\000?\000<\000n\000a\000m\000e\000_\0002\000>\000a\000b\000)\000\134\000g\000<\000n\000a\000m\000e\000_\0002\000>\000\000", "\000a\000b\000a\000b\000\000", 0, 8); + x2("\000(\000?\000<\000n\000a\000m\000e\000_\0003\000>\000.\000z\000v\000.\000)\000\134\000k\000<\000n\000a\000m\000e\000_\0003\000>\000\000", "\000a\000z\000v\000b\000a\000z\000v\000b\000\000", 0, 16); + x2("\000(\000?\000<\000=\000\134\000g\000<\000a\000b\000>\000)\000|\000-\000\134\000z\000E\000N\000D\000 \000(\000?\000<\000a\000b\000>\000X\000y\000Z\000)\000\000", "\000X\000y\000Z\000\000", 6, 6); + x2("\000(\000?\000<\000n\000>\000|\000a\000\134\000g\000<\000n\000>\000)\000+\000\000", "\000\000", 0, 0); + x2("\000(\000?\000<\000n\000>\000|\000\134\000(\000\134\000g\000<\000n\000>\000\134\000)\000)\000+\000$\000\000", "\000(\000)\000(\000(\000)\000)\000\000", 0, 12); + x3("\000\134\000g\000<\000n\000>\000(\000?\000<\000n\000>\000.\000)\000{\0000\000}\000\000", "\000X\000\000", 0, 2, 1); + x2("\000\134\000g\000<\000n\000>\000(\000a\000b\000c\000|\000d\000f\000(\000?\000<\000n\000>\000.\000Y\000Z\000)\000{\0002\000,\0008\000}\000)\000{\0000\000}\000\000", "\000X\000Y\000Z\000\000", 0, 6); + x2("\000\134\000A\000(\000?\000<\000n\000>\000(\000a\000\134\000g\000<\000n\000>\000)\000|\000)\000\134\000z\000\000", "\000a\000a\000a\000a\000\000", 0, 8); + x2("\000(\000?\000<\000n\000>\000|\000\134\000g\000<\000m\000>\000\134\000g\000<\000n\000>\000)\000\134\000z\000|\000\134\000z\000E\000N\000D\000 \000(\000?\000<\000m\000>\000a\000|\000(\000b\000)\000\134\000g\000<\000m\000>\000)\000\000", "\000b\000b\000b\000b\000a\000b\000b\000a\000\000", 0, 16); + x2("\000(\000?\000<\000n\000a\000m\000e\0001\0002\0004\0000\000>\000\134\000w\000+\000\134\000s\000x\000)\000a\000+\000\134\000k\000<\000n\000a\000m\000e\0001\0002\0004\0000\000>\000\000", "\000 \000 \000f\000g\000 \000x\000a\000a\000a\000a\000a\000a\000a\000a\000f\000g\000 \000x\000\000", 4, 36); + x3("\000(\000z\000)\000(\000)\000(\000)\000(\000?\000<\000_\0009\000>\000a\000)\000\134\000g\000<\000_\0009\000>\000\000", "\000z\000a\000a\000\000", 4, 6, 1); + x2("\000(\000.\000)\000(\000(\000(\000?\000<\000_\000>\000a\000)\000)\000)\000\134\000k\000<\000_\000>\000\000", "\000z\000a\000a\000\000", 0, 6); + x2("\000(\000(\000?\000<\000n\000a\000m\000e\0001\000>\000\134\000d\000)\000|\000(\000?\000<\000n\000a\000m\000e\0002\000>\000\134\000w\000)\000)\000(\000\134\000k\000<\000n\000a\000m\000e\0001\000>\000|\000\134\000k\000<\000n\000a\000m\000e\0002\000>\000)\000\000", "\000f\000f\000\000", 0, 4); + x2("\000(\000?\000:\000(\000?\000<\000x\000>\000)\000|\000(\000?\000<\000x\000>\000e\000f\000g\000)\000)\000\134\000k\000<\000x\000>\000\000", "\000\000", 0, 0); + x2("\000(\000?\000:\000(\000?\000<\000x\000>\000a\000b\000c\000)\000|\000(\000?\000<\000x\000>\000e\000f\000g\000)\000)\000\134\000k\000<\000x\000>\000\000", "\000a\000b\000c\000e\000f\000g\000e\000f\000g\000\000", 6, 18); + n("\000(\000?\000:\000(\000?\000<\000x\000>\000a\000b\000c\000)\000|\000(\000?\000<\000x\000>\000e\000f\000g\000)\000)\000\134\000k\000<\000x\000>\000\000", "\000a\000b\000c\000e\000f\000g\000\000"); + x2("\000(\000?\000:\000(\000?\000<\000n\0001\000>\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000)\000\134\000k\000<\000n\0001\000>\000$\000\000", "\000a\000-\000p\000y\000u\000m\000p\000y\000u\000m\000\000", 4, 20); + x3("\000(\000?\000:\000(\000?\000<\000n\0001\000>\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000)\000\134\000k\000<\000n\0001\000>\000$\000\000", "\000x\000x\000x\000x\000a\000b\000c\000d\000e\000f\000g\000h\000i\000j\000k\000l\000m\000n\000a\000b\000c\000d\000e\000f\000g\000h\000i\000j\000k\000l\000m\000n\000\000", 8, 36, 14); + x3("\000(\000?\000<\000n\000a\000m\000e\0001\000>\000)\000(\000?\000<\000n\000a\000m\000e\0002\000>\000)\000(\000?\000<\000n\000a\000m\000e\0003\000>\000)\000(\000?\000<\000n\000a\000m\000e\0004\000>\000)\000(\000?\000<\000n\000a\000m\000e\0005\000>\000)\000(\000?\000<\000n\000a\000m\000e\0006\000>\000)\000(\000?\000<\000n\000a\000m\000e\0007\000>\000)\000(\000?\000<\000n\000a\000m\000e\0008\000>\000)\000(\000?\000<\000n\000a\000m\000e\0009\000>\000)\000(\000?\000<\000n\000a\000m\000e\0001\0000\000>\000)\000(\000?\000<\000n\000a\000m\000e\0001\0001\000>\000)\000(\000?\000<\000n\000a\000m\000e\0001\0002\000>\000)\000(\000?\000<\000n\000a\000m\000e\0001\0003\000>\000)\000(\000?\000<\000n\000a\000m\000e\0001\0004\000>\000)\000(\000?\000<\000n\000a\000m\000e\0001\0005\000>\000)\000(\000?\000<\000n\000a\000m\000e\0001\0006\000>\000a\000a\000a\000)\000(\000?\000<\000n\000a\000m\000e\0001\0007\000>\000)\000$\000\000", "\000a\000a\000a\000\000", 0, 6, 16); + x2("\000(\000?\000<\000f\000o\000o\000>\000a\000|\000\134\000(\000\134\000g\000<\000f\000o\000o\000>\000\134\000)\000)\000\000", "\000a\000\000", 0, 2); + x2("\000(\000?\000<\000f\000o\000o\000>\000a\000|\000\134\000(\000\134\000g\000<\000f\000o\000o\000>\000\134\000)\000)\000\000", "\000(\000(\000(\000(\000(\000(\000a\000)\000)\000)\000)\000)\000)\000\000", 0, 26); + x3("\000(\000?\000<\000f\000o\000o\000>\000a\000|\000\134\000(\000\134\000g\000<\000f\000o\000o\000>\000\134\000)\000)\000\000", "\000(\000(\000(\000(\000(\000(\000(\000(\000a\000)\000)\000)\000)\000)\000)\000)\000)\000\000", 0, 34, 1); + x2("\000\134\000g\000<\000b\000a\000r\000>\000|\000\134\000z\000E\000N\000D\000(\000?\000<\000b\000a\000r\000>\000.\000*\000a\000b\000c\000$\000)\000\000", "\000a\000b\000c\000x\000x\000x\000a\000b\000c\000\000", 0, 18); + x2("\000\134\000g\000<\0001\000>\000|\000\134\000z\000E\000N\000D\000(\000.\000a\000.\000)\000\000", "\000b\000a\000c\000\000", 0, 6); + x3("\000\134\000g\000<\000_\000A\000>\000\134\000g\000<\000_\000A\000>\000|\000\134\000z\000E\000N\000D\000(\000.\000a\000.\000)\000(\000?\000<\000_\000A\000>\000.\000b\000.\000)\000\000", "\000x\000b\000x\000y\000b\000y\000\000", 6, 12, 1); + x2("\000\134\000A\000(\000?\000:\000\134\000g\000<\000p\000o\000n\000>\000|\000\134\000g\000<\000p\000a\000n\000>\000|\000\134\000z\000E\000N\000D\000 \000 \000(\000?\000<\000p\000a\000n\000>\000a\000|\000c\000\134\000g\000<\000p\000o\000n\000>\000c\000)\000(\000?\000<\000p\000o\000n\000>\000b\000|\000d\000\134\000g\000<\000p\000a\000n\000>\000d\000)\000)\000$\000\000", "\000c\000d\000c\000b\000c\000d\000c\000\000", 0, 14); + x2("\000\134\000A\000(\000?\000<\000n\000>\000|\000a\000\134\000g\000<\000m\000>\000)\000\134\000z\000|\000\134\000z\000E\000N\000D\000 \000(\000?\000<\000m\000>\000\134\000g\000<\000n\000>\000)\000\000", "\000a\000a\000a\000a\000\000", 0, 8); + x2("\000(\000?\000<\000n\000>\000(\000a\000|\000b\000\134\000g\000<\000n\000>\000c\000)\000{\0003\000,\0005\000}\000)\000\000", "\000b\000a\000a\000a\000a\000c\000a\000\000", 2, 10); + x2("\000(\000?\000<\000n\000>\000(\000a\000|\000b\000\134\000g\000<\000n\000>\000c\000)\000{\0003\000,\0005\000}\000)\000\000", "\000b\000a\000a\000a\000a\000c\000a\000a\000a\000a\000a\000\000", 0, 20); + x2("\000(\000?\000<\000p\000a\000r\000e\000>\000\134\000(\000(\000[\000^\000\134\000(\000\134\000)\000]\000+\000+\000|\000\134\000g\000<\000p\000a\000r\000e\000>\000)\000*\000+\000\134\000)\000)\000\000", "\000(\000(\000a\000)\000)\000\000", 0, 10); + x2("\000(\000)\000*\000\134\0001\000\000", "\000\000", 0, 0); + x2("\000(\000?\000:\000(\000)\000|\000(\000)\000)\000*\000\134\0001\000\134\0002\000\000", "\000\000", 0, 0); + x3("\000(\000?\000:\000\134\0001\000a\000|\000(\000)\000)\000*\000\000", "\000a\000\000", 0, 0, 1); + x2("\000x\000(\000(\000.\000)\000*\000)\000*\000x\000\000", "\0000\000x\0001\000x\0002\000x\0003\000\000", 2, 12); + x2("\000x\000(\000(\000.\000)\000*\000)\000*\000x\000(\000?\000i\000:\000\134\0001\000)\000\134\000Z\000\000", "\0000\000x\0001\000x\0002\000x\0001\000X\0002\000\000", 2, 18); + x2("\000(\000?\000:\000(\000)\000|\000(\000)\000|\000(\000)\000|\000(\000)\000|\000(\000)\000|\000(\000)\000)\000*\000\134\0002\000\134\0005\000\000", "\000\000", 0, 0); + x2("\000(\000?\000:\000(\000)\000|\000(\000)\000|\000(\000)\000|\000(\000x\000)\000|\000(\000)\000|\000(\000)\000)\000*\000\134\0002\000b\000\134\0005\000\000", "\000b\000\000", 0, 2); + x2("\217\372\000\000", "\217\372\000\000", 0, 2); + x2("\000\000", "0B\000\000", 0, 0); + x2("0B\000\000", "0B\000\000", 0, 2); + n("0D\000\000", "0B\000\000"); + x2("0F0F\000\000", "0F0F\000\000", 0, 4); + x2("0B0D0F\000\000", "0B0D0F\000\000", 0, 6); + x2("0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S\000\000", "0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S\000\000", 0, 70); + x2("0B\000\000", "0D0B\000\000", 2, 4); + x2("0D0F\000\000", "0B0D0F\000\000", 2, 6); + x2("e\207\000\000", "e\207\000\000", 0, 2); + x2("\000.\000\000", "0B\000\000", 0, 2); + x2("\000.\000.\000\000", "0K0M\000\000", 0, 4); + x2("\000\134\000w\000\000", "0J\000\000", 0, 2); + n("\000\134\000W\000\000", "0B\000\000"); + x2("\000[\000\134\000W\000]\000\000", "0F\000$\000\000", 2, 4); + x2("\000\134\000S\000\000", "0]\000\000", 0, 2); + x2("\000\134\000S\000\000", "o\042\000\000", 0, 2); + x2("\000\134\000b\000\000", "l\027\000 \000\000", 0, 0); + x2("\000\134\000b\000\000", "\000 0{\000\000", 2, 2); + x2("\000\134\000B\000\000", "0[0]\000 \000\000", 2, 2); + x2("\000\134\000B\000\000", "0F\000 \000\000", 4, 4); + x2("\000\134\000B\000\000", "\000 0D\000\000", 0, 0); + x2("\000[0_0a\000]\000\000", "0a\000\000", 0, 2); + n("\000[0j0k\000]\000\000", "0l\000\000"); + x2("\000[0F\000-0J\000]\000\000", "0H\000\000", 0, 2); + n("\000[\000^0Q\000]\000\000", "0Q\000\000"); + x2("\000[\000\134\000w\000]\000\000", "0m\000\000", 0, 2); + n("\000[\000\134\000d\000]\000\000", "0u\000\000"); + x2("\000[\000\134\000D\000]\000\000", "0o\000\000", 0, 2); + n("\000[\000\134\000s\000]\000\000", "0O\000\000"); + x2("\000[\000\134\000S\000]\000\000", "0x\000\000", 0, 2); + x2("\000[\000\134\000w\000\134\000d\000]\000\000", "0\210\000\000", 0, 2); + x2("\000[\000\134\000w\000\134\000d\000]\000\000", "\000 \000 \000 0\210\000\000", 6, 8); + n("\000\134\000w\233<\216\312\000\000", "\000 \233<\216\312\000\000"); + x2("\233<\000\134\000W\216\312\000\000", "\233<\000 \216\312\000\000", 0, 6); + x2("0B\000.0D\000.0F\000\000", "0B0B0D0D0F\000\000", 0, 10); + x2("\000.\000\134\000w0F\000\134\000W\000.\000.0^\000\000", "0H0F0F\000 0F0^0^\000\000", 0, 14); + x2("\000\134\000s\000\134\000w0S0S0S\000\000", "\000 0S0S0S0S\000\000", 0, 10); + x2("0B0B\000.0Q\000\000", "0B0B0Q0Q\000\000", 0, 8); + n("\000.0D\000\000", "0D0H\000\000"); + x2("\000.0J\000\000", "0J0J\000\000", 0, 4); + x2("\000^0B\000\000", "0B\000\000", 0, 2); + x2("\000^0\200\000$\000\000", "0\200\000\000", 0, 2); + x2("\000^\000\134\000w\000$\000\000", "0k\000\000", 0, 2); + x2("\000^\000\134\000w0K0M0O0Q0S\000$\000\000", "\000z0K0M0O0Q0S\000\000", 0, 12); + x2("\000^\000\134\000w\000.\000.\000.0F0H0J\000$\000\000", "\000z0B0D0F0F0H0J\000\000", 0, 14); + x2("\000\134\000w\000\134\000w\000\134\000s\000\134\000W0J0J0J\000\134\000d\000\000", "\000a0J\000 \000 0J0J0J\0004\000\000", 0, 16); + x2("\000\134\000A0_0a0d\000\000", "0_0a0d\000\000", 0, 6); + x2("0\2000\2010\202\000\134\000Z\000\000", "0\2000\2010\202\000\000", 0, 6); + x2("0K0M0O\000\134\000z\000\000", "0K0M0O\000\000", 0, 6); + x2("0K0M0O\000\134\000Z\000\000", "0K0M0O\000\012\000\000", 0, 6); + x2("\000\134\000G0}0t\000\000", "0}0t\000\000", 0, 4); + n("\000\134\000G0H\000\000", "0F0H0J\000\000"); + n("0h0f\000\134\000G\000\000", "0h0f\000\000"); + n("0~0\177\000\134\000A\000\000", "0~0\177\000\000"); + n("0~\000\134\000A0\177\000\000", "0~0\177\000\000"); + x2("\000(\000?\000=0[\000)0[\000\000", "0[\000\000", 0, 2); + n("\000(\000?\000=0F\000)\000.\000\000", "0D\000\000"); + x2("\000(\000?\000!0F\000)0K\000\000", "0K\000\000", 0, 2); + n("\000(\000?\000!0h\000)0B\000\000", "0h\000\000"); + x2("\000(\000?\000i\000:0B\000)\000\000", "0B\000\000", 0, 2); + x2("\000(\000?\000i\000:0v0y\000)\000\000", "0v0y\000\000", 0, 4); + n("\000(\000?\000i\000:0D\000)\000\000", "0F\000\000"); + x2("\000(\000?\000m\000:0\210\000.\000)\000\000", "0\210\000\012\000\000", 0, 4); + x2("\000(\000?\000m\000:\000.0\201\000)\000\000", "0~\000\0120\201\000\000", 2, 6); + x2("0B\000?\000\000", "\000\000", 0, 0); + x2("Y\011\000?\000\000", "S\026\000\000", 0, 0); + x2("Y\011\000?\000\000", "Y\011\000\000", 0, 2); + x2("\221\317\000*\000\000", "\000\000", 0, 0); + x2("\221\317\000*\000\000", "\221\317\000\000", 0, 2); + x2("[P\000*\000\000", "[P[P[P\000\000", 0, 6); + x2("\231\254\000*\000\000", "\236\177\231\254\231\254\231\254\231\254\000\000", 0, 0); + n("\134q\000+\000\000", "\000\000"); + x2("l\263\000+\000\000", "l\263\000\000", 0, 2); + x2("fB\000+\000\000", "fBfBfBfB\000\000", 0, 8); + x2("0H\000+\000\000", "0H0H0F0F0F\000\000", 0, 4); + x2("0F\000+\000\000", "0J0F0F0F0F\000\000", 2, 10); + x2("\000.\000?\000\000", "0_\000\000", 0, 2); + x2("\000.\000*\000\000", "0q0t0w0z\000\000", 0, 8); + x2("\000.\000+\000\000", "0\215\000\000", 0, 2); + x2("\000.\000+\000\000", "0D0F0H0K\000\012\000\000", 0, 8); + x2("0B\000|0D\000\000", "0B\000\000", 0, 2); + x2("0B\000|0D\000\000", "0D\000\000", 0, 2); + x2("0B0D\000|0D0F\000\000", "0B0D\000\000", 0, 4); + x2("0B0D\000|0D0F\000\000", "0D0F\000\000", 0, 4); + x2("0\222\000(\000?\000:0K0M\000|0M0O\000)\000\000", "0\2220K0M\000\000", 0, 6); + x2("0\222\000(\000?\000:0K0M\000|0M0O\000)0Q\000\000", "0\2220M0O0Q\000\000", 0, 8); + x2("0B0D\000|\000(\000?\000:0B0F\000|0B0\222\000)\000\000", "0B0\222\000\000", 0, 4); + x2("0B\000|0D\000|0F\000\000", "0H0F\000\000", 2, 4); + x2("0B\000|0D\000|0F0H\000|0J0K0M\000|0O\000|0Q0S0U\000|0W0Y0[\000|0]\000|0_0a\000|0d0f0h0j0k\000|0l0m\000\000", "0W0Y0[\000\000", 0, 6); + n("0B\000|0D\000|0F0H\000|0J0K0M\000|0O\000|0Q0S0U\000|0W0Y0[\000|0]\000|0_0a\000|0d0f0h0j0k\000|0l0m\000\000", "0Y0[\000\000"); + x2("0B\000|\000^0\217\000\000", "0v0B\000\000", 2, 4); + x2("0B\000|\000^0\222\000\000", "0\2220B\000\000", 0, 2); + x2("\233<\000|\000\134\000G\216\312\000\000", "0Q\216\312\233<\000\000", 4, 6); + x2("\233<\000|\000\134\000G\216\312\000\000", "\216\312\233<\000\000", 0, 2); + x2("\233<\000|\000\134\000A\216\312\000\000", "\000b\216\312\233<\000\000", 4, 6); + x2("\233<\000|\000\134\000A\216\312\000\000", "\216\312\000\000", 0, 2); + x2("\233<\000|\216\312\000\134\000Z\000\000", "\216\312\233<\000\000", 2, 4); + x2("\233<\000|\216\312\000\134\000Z\000\000", "\216\312\000\000", 0, 2); + x2("\233<\000|\216\312\000\134\000Z\000\000", "\216\312\000\012\000\000", 0, 2); + x2("\233<\000|\216\312\000\134\000z\000\000", "\216\312\233<\000\000", 2, 4); + x2("\233<\000|\216\312\000\134\000z\000\000", "\216\312\000\000", 0, 2); + x2("\000\134\000w\000|\000\134\000s\000\000", "0J\000\000", 0, 2); + x2("\000\134\000w\000|\000%\000\000", "\000%0J\000\000", 0, 2); + x2("\000\134\000w\000|\000[\000&\000$\000]\000\000", "0F\000&\000\000", 0, 2); + x2("\000[0D\000-0Q\000]\000\000", "0F\000\000", 0, 2); + x2("\000[0D\000-0Q\000]\000|\000[\000^0K\000-0S\000]\000\000", "0B\000\000", 0, 2); + x2("\000[0D\000-0Q\000]\000|\000[\000^0K\000-0S\000]\000\000", "0K\000\000", 0, 2); + x2("\000[\000^0B\000]\000\000", "\000\012\000\000", 0, 2); + x2("\000(\000?\000:0B\000|\000[0F\000-0M\000]\000)\000|0D0\222\000\000", "0F0\222\000\000", 0, 2); + x2("\000(\000?\000:0B\000|\000[0F\000-0M\000]\000)\000|0D0\222\000\000", "0D0\222\000\000", 0, 4); + x2("0B0D0F\000|\000(\000?\000=0Q0Q\000)\000.\000.0{\000\000", "0Q0Q0{\000\000", 0, 6); + x2("0B0D0F\000|\000(\000?\000!0Q0Q\000)\000.\000.0{\000\000", "0B0D0{\000\000", 0, 6); + x2("\000(\000?\000=0\2220B\000)\000.\000.0B\000|\000(\000?\000=0\2220\222\000)\000.\000.0B\000\000", "0\2220\2220B\000\000", 0, 6); + x2("\000(\000?\000<\000=0B\000|0D0F\000)0D\000\000", "0D0F0D\000\000", 4, 6); + n("\000(\000?\000>0B\000|0B0D0H\000)0F\000\000", "0B0D0H0F\000\000"); + x2("\000(\000?\000>0B0D0H\000|0B\000)0F\000\000", "0B0D0H0F\000\000", 0, 8); + x2("0B\000?\000|0D\000\000", "0B\000\000", 0, 2); + x2("0B\000?\000|0D\000\000", "0D\000\000", 0, 0); + x2("0B\000?\000|0D\000\000", "\000\000", 0, 0); + x2("0B\000*\000|0D\000\000", "0B0B\000\000", 0, 4); + x2("0B\000*\000|0D\000*\000\000", "0D0B\000\000", 0, 0); + x2("0B\000*\000|0D\000*\000\000", "0B0D\000\000", 0, 2); + x2("\000[\000a0B\000]\000*\000|0D\000*\000\000", "\000a0B0D0D0D\000\000", 0, 4); + x2("0B\000+\000|0D\000*\000\000", "\000\000", 0, 0); + x2("0B\000+\000|0D\000*\000\000", "0D0D0D\000\000", 0, 6); + x2("0B\000+\000|0D\000*\000\000", "0B0D0D0D\000\000", 0, 2); + x2("0B\000+\000|0D\000*\000\000", "\000a0B0D0D0D\000\000", 0, 0); + n("0B\000+\000|0D\000+\000\000", "\000\000"); + x2("\000(0B\000|0D\000)\000?\000\000", "0D\000\000", 0, 2); + x2("\000(0B\000|0D\000)\000*\000\000", "0D0B\000\000", 0, 4); + x2("\000(0B\000|0D\000)\000+\000\000", "0D0B0D\000\000", 0, 6); + x2("\000(0B0D\000|0F0B\000)\000+\000\000", "0F0B0B0D0F0H\000\000", 0, 8); + x2("\000(0B0D\000|0F0H\000)\000+\000\000", "0F0B0B0D0F0H\000\000", 4, 12); + x2("\000(0B0D\000|0F0B\000)\000+\000\000", "0B0B0D0F0B\000\000", 2, 10); + x2("\000(0B0D\000|0F0B\000)\000+\000\000", "0B0D0\2220F0B\000\000", 0, 4); + x2("\000(0B0D\000|0F0B\000)\000+\000\000", "\000$\000$\000z\000z\000z\000z0B0D0\2220F0B\000\000", 12, 16); + x2("\000(0B\000|0D0B0D\000)\000+\000\000", "0B0D0B0D0B\000\000", 0, 10); + x2("\000(0B\000|0D0B0D\000)\000+\000\000", "0D0B\000\000", 2, 4); + x2("\000(0B\000|0D0B0D\000)\000+\000\000", "0D0B0B0B0D0B\000\000", 2, 8); + x2("\000(\000?\000:0B\000|0D\000)\000(\000?\000:0B\000|0D\000)\000\000", "0B0D\000\000", 0, 4); + x2("\000(\000?\000:0B\000*\000|0D\000*\000)\000(\000?\000:0B\000*\000|0D\000*\000)\000\000", "0B0B0B0D0D0D\000\000", 0, 6); + x2("\000(\000?\000:0B\000*\000|0D\000*\000)\000(\000?\000:0B\000+\000|0D\000+\000)\000\000", "0B0B0B0D0D0D\000\000", 0, 12); + x2("\000(\000?\000:0B\000+\000|0D\000+\000)\000{\0002\000}\000\000", "0B0B0B0D0D0D\000\000", 0, 12); + x2("\000(\000?\000:0B\000+\000|0D\000+\000)\000{\0001\000,\0002\000}\000\000", "0B0B0B0D0D0D\000\000", 0, 12); + x2("\000(\000?\000:0B\000+\000|\000\134\000A0D\000*\000)0F0F\000\000", "0F0F\000\000", 0, 4); + n("\000(\000?\000:0B\000+\000|\000\134\000A0D\000*\000)0F0F\000\000", "0B0D0F0F\000\000"); + x2("\000(\000?\000:\000^0B\000+\000|0D\000+\000)\000*0F\000\000", "0B0B0D0D0D0B0D0F\000\000", 12, 16); + x2("\000(\000?\000:\000^0B\000+\000|0D\000+\000)\000*0F\000\000", "0B0B0D0D0D0D0F\000\000", 0, 14); + x2("0F\000{\0000\000,\000}\000\000", "0F0F0F0F\000\000", 0, 8); + x2("0B\000|\000(\000?\000i\000)\000c\000\000", "\000C\000\000", 0, 2); + x2("\000(\000?\000i\000)\000c\000|0B\000\000", "\000C\000\000", 0, 2); + x2("\000(\000?\000i\000:0B\000)\000|\000a\000\000", "\000a\000\000", 0, 2); + n("\000(\000?\000i\000:0B\000)\000|\000a\000\000", "\000A\000\000"); + x2("\000[0B0D0F\000]\000?\000\000", "0B0D0F\000\000", 0, 2); + x2("\000[0B0D0F\000]\000*\000\000", "0B0D0F\000\000", 0, 6); + x2("\000[\000^0B0D0F\000]\000*\000\000", "0B0D0F\000\000", 0, 0); + n("\000[\000^0B0D0F\000]\000+\000\000", "0B0D0F\000\000"); + x2("0B\000?\000?\000\000", "0B0B0B\000\000", 0, 0); + x2("0D0B\000?\000?0D\000\000", "0D0B0D\000\000", 0, 6); + x2("0B\000*\000?\000\000", "0B0B0B\000\000", 0, 0); + x2("0D0B\000*\000?\000\000", "0D0B0B\000\000", 0, 2); + x2("0D0B\000*\000?0D\000\000", "0D0B0B0D\000\000", 0, 8); + x2("0B\000+\000?\000\000", "0B0B0B\000\000", 0, 2); + x2("0D0B\000+\000?\000\000", "0D0B0B\000\000", 0, 4); + x2("0D0B\000+\000?0D\000\000", "0D0B0B0D\000\000", 0, 8); + x2("\000(\000?\000:Y)\000?\000)\000?\000?\000\000", "Y)\000\000", 0, 0); + x2("\000(\000?\000:Y)\000?\000?\000)\000?\000\000", "Y)\000\000", 0, 0); + x2("\000(\000?\000:Y\042\000?\000)\000+\000?\000\000", "Y\042Y\042Y\042\000\000", 0, 2); + x2("\000(\000?\000:\230\250\000+\000)\000?\000?\000\000", "\230\250\230\250\230\250\000\000", 0, 0); + x2("\000(\000?\000:\226\352\000+\000)\000?\000?\227\034\000\000", "\226\352\226\352\226\352\227\034\000\000", 0, 8); + x2("\000(\000?\000:0B0D\000)\000?\000{\0002\000}\000\000", "\000\000", 0, 0); + x2("\000(\000?\000:\233<\216\312\000)\000?\000{\0002\000}\000\000", "\233<\216\312\233<\216\312\233<\000\000", 0, 8); + x2("\000(\000?\000:\233<\216\312\000)\000*\000{\0000\000}\000\000", "\233<\216\312\233<\216\312\233<\000\000", 0, 0); + x2("\000(\000?\000:\233<\216\312\000)\000{\0003\000,\000}\000\000", "\233<\216\312\233<\216\312\233<\216\312\233<\216\312\000\000", 0, 16); + n("\000(\000?\000:\233<\216\312\000)\000{\0003\000,\000}\000\000", "\233<\216\312\233<\216\312\000\000"); + x2("\000(\000?\000:\233<\216\312\000)\000{\0002\000,\0004\000}\000\000", "\233<\216\312\233<\216\312\233<\216\312\000\000", 0, 12); + x2("\000(\000?\000:\233<\216\312\000)\000{\0002\000,\0004\000}\000\000", "\233<\216\312\233<\216\312\233<\216\312\233<\216\312\233<\216\312\000\000", 0, 16); + x2("\000(\000?\000:\233<\216\312\000)\000{\0002\000,\0004\000}\000?\000\000", "\233<\216\312\233<\216\312\233<\216\312\233<\216\312\233<\216\312\000\000", 0, 8); + x2("\000(\000?\000:\233<\216\312\000)\000{\000,\000}\000\000", "\233<\216\312\000{\000,\000}\000\000", 0, 10); + x2("\000(\000?\000:0K0M0O\000)\000+\000?\000{\0002\000}\000\000", "0K0M0O0K0M0O0K0M0O\000\000", 0, 12); + x3("\000(pk\000)\000\000", "pk\000\000", 0, 2, 1); + x3("\000(pkl4\000)\000\000", "pkl4\000\000", 0, 4, 1); + x2("\000(\000(fB\225\223\000)\000)\000\000", "fB\225\223\000\000", 0, 4); + x3("\000(\000(\230\250l4\000)\000)\000\000", "\230\250l4\000\000", 0, 4, 1); + x3("\000(\000(f(e\345\000)\000)\000\000", "f(e\345\000\000", 0, 4, 2); + x3("\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\221\317[P\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000\000", "\221\317[P\000\000", 0, 4, 20); + x3("\000(0B0D\000)\000(0F0H\000)\000\000", "0B0D0F0H\000\000", 0, 4, 1); + x3("\000(0B0D\000)\000(0F0H\000)\000\000", "0B0D0F0H\000\000", 4, 8, 2); + x3("\000(\000)\000(0B\000)0D0F\000(0H0J0K\000)0M0O0Q0S\000\000", "0B0D0F0H0J0K0M0O0Q0S\000\000", 6, 12, 3); + x3("\000(\000(\000)\000(0B\000)0D0F\000(0H0J0K\000)0M0O0Q0S\000)\000\000", "0B0D0F0H0J0K0M0O0Q0S\000\000", 6, 12, 4); + x3("\000.\000*\000(0\3250\251\000)0\3630\3730\336\000(0\363\000(\000)0\2670\3450\277\000)0\2440\363\000\000", "0\3250\2510\3630\3730\3360\3630\2670\3450\2770\2440\363\000\000", 10, 18, 2); + x2("\000(\000^0B\000)\000\000", "0B\000\000", 0, 2); + x3("\000(0B\000)\000|\000(0B\000)\000\000", "0D0B\000\000", 2, 4, 1); + x3("\000(\000^0B\000)\000|\000(0B\000)\000\000", "0D0B\000\000", 2, 4, 2); + x3("\000(0B\000?\000)\000\000", "0B0B0B\000\000", 0, 2, 1); + x3("\000(0~\000*\000)\000\000", "0~0~0~\000\000", 0, 6, 1); + x3("\000(0h\000*\000)\000\000", "\000\000", 0, 0, 1); + x3("\000(0\213\000+\000)\000\000", "0\2130\2130\2130\2130\2130\2130\213\000\000", 0, 14, 1); + x3("\000(0u\000+\000|0x\000*\000)\000\000", "0u0u0u0x0x\000\000", 0, 6, 1); + x3("\000(0B\000+\000|0D\000?\000)\000\000", "0D0D0D0B0B\000\000", 0, 2, 1); + x3("\000(0B0D0F\000)\000?\000\000", "0B0D0F\000\000", 0, 6, 1); + x3("\000(0B0D0F\000)\000*\000\000", "0B0D0F\000\000", 0, 6, 1); + x3("\000(0B0D0F\000)\000+\000\000", "0B0D0F\000\000", 0, 6, 1); + x3("\000(0U0W0Y\000|0B0D0F\000)\000+\000\000", "0B0D0F\000\000", 0, 6, 1); + x3("\000(\000[0j0k0l\000]\000[0K0M0O\000]\000|0K0M0O\000)\000+\000\000", "0K0M0O\000\000", 0, 6, 1); + x3("\000(\000(\000?\000i\000:0B0D0F\000)\000)\000\000", "0B0D0F\000\000", 0, 6, 1); + x3("\000(\000(\000?\000m\000:0B\000.0F\000)\000)\000\000", "0B\000\0120F\000\000", 0, 6, 1); + x3("\000(\000(\000?\000=0B0\223\000)0B\000)\000\000", "0B0\2230D\000\000", 0, 2, 1); + x3("0B0D0F\000|\000(\000.0B0D0H\000)\000\000", "0\2230B0D0H\000\000", 0, 8, 1); + x3("0B\000*\000(\000.\000)\000\000", "0B0B0B0B0\223\000\000", 8, 10, 1); + x3("0B\000*\000?\000(\000.\000)\000\000", "0B0B0B0B0\223\000\000", 0, 2, 1); + x3("0B\000*\000?\000(0\223\000)\000\000", "0B0B0B0B0\223\000\000", 8, 10, 1); + x3("\000[0D0F0H\000]0B\000*\000(\000.\000)\000\000", "0H0B0B0B0B0\223\000\000", 10, 12, 1); + x3("\000(\000\134\000A0D0D\000)0F0F\000\000", "0D0D0F0F\000\000", 0, 4, 1); + n("\000(\000\134\000A0D0D\000)0F0F\000\000", "0\2230D0D0F0F\000\000"); + x3("\000(\000^0D0D\000)0F0F\000\000", "0D0D0F0F\000\000", 0, 4, 1); + n("\000(\000^0D0D\000)0F0F\000\000", "0\2230D0D0F0F\000\000"); + x3("0\2150\215\000(0\2130\213\000$\000)\000\000", "0\2150\2150\2130\213\000\000", 4, 8, 1); + n("0\2150\215\000(0\2130\213\000$\000)\000\000", "0\2150\2150\2130\2130\213\000\000"); + x2("\000(q!\000)\000\134\0001\000\000", "q!q!\000\000", 0, 4); + n("\000(q!\000)\000\134\0001\000\000", "q!kf\000\000"); + x2("\000(zz\000?\000)\000\134\0001\000\000", "zzzz\000\000", 0, 4); + x2("\000(zz\000?\000?\000)\000\134\0001\000\000", "zzzz\000\000", 0, 0); + x2("\000(zz\000*\000)\000\134\0001\000\000", "zzzzzzzzzz\000\000", 0, 8); + x3("\000(zz\000*\000)\000\134\0001\000\000", "zzzzzzzzzz\000\000", 0, 4, 1); + x2("0B\000(0D\000*\000)\000\134\0001\000\000", "0B0D0D0D0D\000\000", 0, 10); + x2("0B\000(0D\000*\000)\000\134\0001\000\000", "0B0D\000\000", 0, 2); + x2("\000(0B\000*\000)\000(0D\000*\000)\000\134\0001\000\134\0002\000\000", "0B0B0B0D0D0B0B0B0D0D\000\000", 0, 20); + x2("\000(0B\000*\000)\000(0D\000*\000)\000\134\0002\000\000", "0B0B0B0D0D0D0D\000\000", 0, 14); + x3("\000(0B\000*\000)\000(0D\000*\000)\000\134\0002\000\000", "0B0B0B0D0D0D0D\000\000", 6, 10, 2); + x2("\000(\000(\000(\000(\000(\000(\000(0}\000*\000)0z\000)\000)\000)\000)\000)\000)0t\000\134\0007\000\000", "0}0}0}0z0t0}0}0}\000\000", 0, 16); + x3("\000(\000(\000(\000(\000(\000(\000(0}\000*\000)0z\000)\000)\000)\000)\000)\000)0t\000\134\0007\000\000", "0}0}0}0z0t0}0}0}\000\000", 0, 6, 7); + x2("\000(0o\000)\000(0r\000)\000(0u\000)\000\134\0002\000\134\0001\000\134\0003\000\000", "0o0r0u0r0o0u\000\000", 0, 12); + x2("\000(\000[0M\000-0Q\000]\000)\000\134\0001\000\000", "0O0O\000\000", 0, 4); + x2("\000(\000\134\000w\000\134\000d\000\134\000s\000)\000\134\0001\000\000", "0B\0005\000 0B\0005\000 \000\000", 0, 12); + n("\000(\000\134\000w\000\134\000d\000\134\000s\000)\000\134\0001\000\000", "0B\0005\000 0B\0005\000\000"); + x2("\000(\212\260\377\037\000|\000[0B\000-0F\000]\000{\0003\000}\000)\000\134\0001\000\000", "\212\260\377\037\212\260\377\037\000\000", 0, 8); + x2("\000.\000.\000.\000(\212\260\377\037\000|\000[0B\000-0F\000]\000{\0003\000}\000)\000\134\0001\000\000", "0B\000a0B\212\260\377\037\212\260\377\037\000\000", 0, 14); + x2("\000(\212\260\377\037\000|\000[0B\000-0F\000]\000{\0003\000}\000)\000\134\0001\000\000", "0F0D0F0F0D0F\000\000", 0, 12); + x2("\000(\000^0S\000)\000\134\0001\000\000", "0S0S\000\000", 0, 4); + n("\000(\000^0\200\000)\000\134\0001\000\000", "0\2010\2000\200\000\000"); + n("\000(0B\000$\000)\000\134\0001\000\000", "0B0B\000\000"); + n("\000(0B0D\000\134\000Z\000)\000\134\0001\000\000", "0B0D\000\000"); + x2("\000(0B\000*\000\134\000Z\000)\000\134\0001\000\000", "0B\000\000", 2, 2); + x2("\000.\000(0B\000*\000\134\000Z\000)\000\134\0001\000\000", "0D0B\000\000", 2, 4); + x3("\000(\000.\000(0\2040D0\206\000)\000\134\0002\000)\000\000", "\000z0\2040D0\2060\2040D0\206\000\000", 0, 14, 1); + x3("\000(\000.\000(\000.\000.\000\134\000d\000.\000)\000\134\0002\000)\000\000", "0B\0001\0002\0003\0004\0001\0002\0003\0004\000\000", 0, 18, 1); + x2("\000(\000(\000?\000i\000:0B\000v0Z\000)\000)\000\134\0001\000\000", "0B\000v0Z0B\000v0Z\000\000", 0, 12); + x2("\000(\000?\000Y\011\000|\000\134\000(\000\134\000g\000\000\134\000)\000)\000\000", "\000(\000(\000(\000(\000(\000(Y\011\000)\000)\000)\000)\000)\000)\000\000", 0, 26); + x2("\000\134\000A\000(\000?\000:\000\134\000g\000<\226?\000_\0001\000>\000|\000\134\000g\000\000|\000\134\000z}BN\206\000 \000 \000(\000?\000<\226?\000_\0001\000>\211\263\000|\201\352\000\134\000g\000\201\352\000)\000(\000?\000W(\000|\203\351\205\251\000\134\000g\000<\226?\000_\0001\000>\203\351\205\251\000)\000)\000$\000\000", "\203\351\205\251\201\352\203\351\205\251\201\352W(\201\352\203\351\205\251\201\352\203\351\205\251\000\000", 0, 26); + x2("\000[\000[0r0u\000]\000]\000\000", "0u\000\000", 0, 2); + x2("\000[\000[0D0J0F\000]0K\000]\000\000", "0K\000\000", 0, 2); + n("\000[\000[\000^0B\000]\000]\000\000", "0B\000\000"); + n("\000[\000^\000[0B\000]\000]\000\000", "0B\000\000"); + x2("\000[\000^\000[\000^0B\000]\000]\000\000", "0B\000\000", 0, 2); + x2("\000[\000[0K0M0O\000]\000&\000&0M0O\000]\000\000", "0O\000\000", 0, 2); + n("\000[\000[0K0M0O\000]\000&\000&0M0O\000]\000\000", "0K\000\000"); + n("\000[\000[0K0M0O\000]\000&\000&0M0O\000]\000\000", "0Q\000\000"); + x2("\000[0B\000-0\223\000&\000&0D\000-0\222\000&\000&0F\000-0\221\000]\000\000", "0\221\000\000", 0, 2); + n("\000[\000^0B\000-0\223\000&\000&0D\000-0\222\000&\000&0F\000-0\221\000]\000\000", "0\221\000\000"); + x2("\000[\000[\000^0B\000&\000&0B\000]\000&\000&0B\000-0\223\000]\000\000", "0D\000\000", 0, 2); + n("\000[\000[\000^0B\000&\000&0B\000]\000&\000&0B\000-0\223\000]\000\000", "0B\000\000"); + x2("\000[\000[\000^0B\000-0\223\000&\000&0D0F0H0J\000]\000&\000&\000[\000^0F\000-0K\000]\000]\000\000", "0M\000\000", 0, 2); + n("\000[\000[\000^0B\000-0\223\000&\000&0D0F0H0J\000]\000&\000&\000[\000^0F\000-0K\000]\000]\000\000", "0D\000\000"); + x2("\000[\000^\000[\000^0B0D0F\000]\000&\000&\000[\000^0F0H0J\000]\000]\000\000", "0F\000\000", 0, 2); + x2("\000[\000^\000[\000^0B0D0F\000]\000&\000&\000[\000^0F0H0J\000]\000]\000\000", "0H\000\000", 0, 2); + n("\000[\000^\000[\000^0B0D0F\000]\000&\000&\000[\000^0F0H0J\000]\000]\000\000", "0K\000\000"); + x2("\000[0B\000-\000&\000&\000-0B\000]\000\000", "\000-\000\000", 0, 2); + x2("\000[\000^\000[\000^\000a\000-\000z0B0D0F\000]\000&\000&\000[\000^\000b\000c\000d\000e\000f\000g0F0H0J\000]\000q\000-\000w\000]\000\000", "0H\000\000", 0, 2); + x2("\000[\000^\000[\000^\000a\000-\000z0B0D0F\000]\000&\000&\000[\000^\000b\000c\000d\000e\000f\000g0F0H0J\000]\000g\000-\000w\000]\000\000", "\000f\000\000", 0, 2); + x2("\000[\000^\000[\000^\000a\000-\000z0B0D0F\000]\000&\000&\000[\000^\000b\000c\000d\000e\000f\000g0F0H0J\000]\000g\000-\000w\000]\000\000", "\000g\000\000", 0, 2); + n("\000[\000^\000[\000^\000a\000-\000z0B0D0F\000]\000&\000&\000[\000^\000b\000c\000d\000e\000f\000g0F0H0J\000]\000g\000-\000w\000]\000\000", "\0002\000\000"); + x2("\000a\000<\000b\000>0\3200\3740\2700\3470\3630n0\3000\2460\3630\3550\3740\311\000<\000\134\000/\000b\000>\000\000", "\000a\000<\000b\000>0\3200\3740\2700\3470\3630n0\3000\2460\3630\3550\3740\311\000<\000/\000b\000>\000\000", 0, 40); + x2("\000.\000<\000b\000>0\3200\3740\2700\3470\3630n0\3000\2460\3630\3550\3740\311\000<\000\134\000/\000b\000>\000\000", "\000a\000<\000b\000>0\3200\3740\2700\3470\3630n0\3000\2460\3630\3550\3740\311\000<\000/\000b\000>\000\000", 0, 40); + x2("\000^\000\\\000p\000{\000K\000a\000t\000a\000k\000a\000n\000a\000}\000$\000\000", "\060\277\000\000", 0, 2); + x2("\000\\\000o\000{\0001\0000\0001\000}\000\000", "\000A\000\000", 0, 2); + x2("\000\\\000o\000{\0001\0001\0000\0007\0002\0001\000}\000\000", "\221\321\000\000", 0, 2); + x2("\000\\\000R\000\000", "\000\015\000\012\000\000", 0, 4); // \R: general newline + x2("\000\\\000R\000\000", "\000\012\000\000", 0, 2); + x2("\000\\\000R\000\000", "\000\015\000\000", 0, 2); + x2("\000\\\000R\000\000", "\000\013\000\000", 0, 2); + n("\000\\\000R\000\012\000\000", "\000\015\000\012\000\000"); + x2("\000\\\000R\000\000", "\x00\x85\000\000", 0, 2); + x2("\000\\\000R\000\000", "\x20\x28\000\000", 0, 2); + x2("\000\\\000R\000\000", "\x20\x29\000\000", 0, 2); + n("\000\\\000R\000\000", "\x20\x2a\000\000"); + + x2("\000\\\000w\000\000", "\x01\x00\000\000", 0, 2); + n("\000\\\000W\000\000", "\x01\x00\000\000"); + x2("\000\\\000d\000\000", "\x0b\x66\000\000", 0, 2); + n("\000\\\000D\000\000", "\x0b\x66\000\000"); + x2("\000\\\000s\000\000", "\x20\x01\000\000", 0, 2); + n("\000\\\000S\000\000", "\x20\x01\000\000"); + x2("\000\\\000b\000\000", "\x00\x20\x01\x00\000\000", 2, 2); + n("\000\\\000B\000\000", "\x01\x00\000\000"); + x2("\000\\\000B\000\000", "\x00\x20\000\000", 0, 0); + x2("\000[\000[\000:\000g\000r\000a\000p\000h\000:\000]\000]\000\000", + "\x0d\x30\000\000", 0, 2); + n("\000[\000[\000:\000g\000r\000a\000p\000h\000:\000]\000]\000\000", + "\x0a\x00\000\000"); + + // extended grapheme cluster + + // CR + LF + n("\000.\000\\\000y\000\\\000O\000\000", "\x00\x0d\x00\x0a\000\000"); + x2("\000.\000\\\000Y\000\\\000O\000\000", "\x00\x0d\x00\x0a\000\000", 0, 4); + + // LATIN SMALL LETTER G, COMBINING DIAERESIS + n("\000^\000.\000\\\000y\000.\000$\000\000", "\x00\x67\x03\x08\000\000"); + x2("\000.\000\\\000Y\000.\000\000", "\x00\x67\x03\x08\000\000", 0, 4); + x2("\000\\\000y\000.\000\\\000Y\000.\000\\\000y\000\000", + "\x00\x67\x03\x08\000\000", 0, 4); + // TAMIL LETTER NA, TAMIL VOWEL SIGN I, + x2("\000.\000\\\000Y\000.\000\000", "\x0B\xA8\x0B\xBF\000\000", 0, 4); + n("\000.\000\\\000y\000.\000\000", "\x0B\xA8\x0B\xBF\000\000"); + + // CR + LF + n("\000\\\000X\000\\\000X\000\000", "\x00\x0d\x00\x0a\000\000"); + x2("\000^\000\\\000X\000$\000\000", "\x00\x0d\x00\x0a\000\000", 0, 4); + // LATIN SMALL LETTER G, COMBINING DIAERESIS + n("\000\\\000X\000\\\000X\000\000", "\x00\x67\x03\x08\000\000"); + x2("\000^\000\\\000X\000$\000\000", "\x00\x67\x03\x08\000\000", 0, 4); + // TAMIL LETTER NA, TAMIL VOWEL SIGN I, + x2("\000^\000\\\000X\000$\000\000", "\x0B\xA8\x0B\xBF\000\000", 0, 4); + n("\000\\\000X\000\\\000X\000\000", "\x0B\xA8\x0B\xBF\000\000"); + + + fprintf(stdout, + "\nRESULT SUCC: %4d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n", + nsucc, nfail, nerror, onig_version()); + +#ifndef POSIX_TEST + onig_region_free(region, 1); + onig_end(); +#endif + + return ((nfail == 0 && nerror == 0) ? 0 : -1); +} diff --git a/internal/components/third_party/oniguruma/tis-ci/config.h b/internal/components/third_party/oniguruma/tis-ci/config.h new file mode 100644 index 0000000000..940060509e --- /dev/null +++ b/internal/components/third_party/oniguruma/tis-ci/config.h @@ -0,0 +1,109 @@ +/* src/config.h. Generated from config.h.in by configure. */ +/* src/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#define HAVE_ALLOCA_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIMES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "onig" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "onig" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "onig 6.9.4" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "onig" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "6.9.4" + +/* The size of `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `void*', as computed by sizeof. */ +#define SIZEOF_VOIDP 8 + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if enable CR+NL as line terminator */ +/* #undef USE_CRNL_AS_LINE_TERMINATOR */ + +/* Version number of package */ +#define VERSION "6.9.4" + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/internal/components/third_party/oniguruma/tis-ci/stub.c b/internal/components/third_party/oniguruma/tis-ci/stub.c new file mode 100644 index 0000000000..11f1570ef5 --- /dev/null +++ b/internal/components/third_party/oniguruma/tis-ci/stub.c @@ -0,0 +1,3 @@ +void srand(unsigned int seed) { + return; +} diff --git a/internal/components/third_party/oniguruma/tis-ci/test_back.config b/internal/components/third_party/oniguruma/tis-ci/test_back.config new file mode 100644 index 0000000000..a0ab67fad9 --- /dev/null +++ b/internal/components/third_party/oniguruma/tis-ci/test_back.config @@ -0,0 +1,26 @@ +{ + "compilation_cmd": "-I ../tis-ci -I ../src -D alloca=__builtin_alloca", + "files": [ + "../test/test_back.c", + "../src/unicode.c", + "../src/regcomp.c", + "../src/regenc.c", + "../src/utf16_be.c", + "../src/regparse.c", + "../src/st.c", + "../src/regexec.c", + "../src/unicode_unfold_key.c", + "../src/unicode_fold3_key.c", + "../src/unicode_fold2_key.c", + "../src/unicode_fold1_key.c", + "../src/utf8.c", + "../src/regerror.c", + "../src/regversion.c", + "../src/ascii.c" + ], + "machdep": "gcc_x86_64", + "main": "main", + "name": "test_back.c FULL", + "address-alignment": 65536, /* hexadecimal 0x10000 */ + "val-warn-undefined-pointer-comparison": "none" +} diff --git a/internal/components/third_party/oniguruma/tis-ci/test_regset.config b/internal/components/third_party/oniguruma/tis-ci/test_regset.config new file mode 100644 index 0000000000..2589b5ad5d --- /dev/null +++ b/internal/components/third_party/oniguruma/tis-ci/test_regset.config @@ -0,0 +1,20 @@ +{ + "compilation_cmd": "-I ../tis-ci -I ../src -D alloca=__builtin_alloca", + "files": [ + "../test/test_regset.c", + "../tis-ci/stub.c", + "../src/regcomp.c", + "../src/regenc.c", + "../src/utf8.c", + "../src/regexec.c", + "../src/ascii.c", + "../src/regparse.c", + "../src/st.c", + "../src/regversion.c" + ], + "machdep": "gcc_x86_64", + "main": "main", + "name": "test_regset.c FULL", + "address-alignment": 65536, /* hexadecimal 0x10000 */ + "val-warn-undefined-pointer-comparison": "none" +} diff --git a/internal/components/third_party/oniguruma/tis-ci/test_syntax.config b/internal/components/third_party/oniguruma/tis-ci/test_syntax.config new file mode 100644 index 0000000000..92b040f6ff --- /dev/null +++ b/internal/components/third_party/oniguruma/tis-ci/test_syntax.config @@ -0,0 +1,26 @@ +{ + "compilation_cmd": "-I ../tis-ci -I ../src -D alloca=__builtin_alloca", + "files": [ + "../test/test_syntax.c", + "../src/unicode.c", + "../src/regcomp.c", + "../src/regenc.c", + "../src/utf16_be.c", + "../src/regparse.c", + "../src/st.c", + "../src/regexec.c", + "../src/unicode_unfold_key.c", + "../src/unicode_fold3_key.c", + "../src/unicode_fold2_key.c", + "../src/unicode_fold1_key.c", + "../src/utf8.c", + "../src/regsyntax.c", + "../src/ascii.c", + "../src/regversion.c" + ], + "machdep": "gcc_x86_64", + "main": "main", + "name": "test_syntax.c FULL", + "address-alignment": 65536, /* hexadecimal 0x10000 */ + "val-warn-undefined-pointer-comparison": "none" +} diff --git a/internal/components/third_party/oniguruma/tis-ci/test_utf8.config b/internal/components/third_party/oniguruma/tis-ci/test_utf8.config new file mode 100644 index 0000000000..5ae259ebca --- /dev/null +++ b/internal/components/third_party/oniguruma/tis-ci/test_utf8.config @@ -0,0 +1,25 @@ +{ + "compilation_cmd": "-I ../tis-ci -I ../src -D alloca=__builtin_alloca", + "files": [ + "../test/test_utf8.c", + "../tis-ci/stub.c", + "../src/regcomp.c", + "../src/regenc.c", + "../src/utf8.c", + "../src/regexec.c", + "../src/ascii.c", + "../src/regparse.c", + "../src/st.c", + "../src/unicode.c", + "../src/unicode_unfold_key.c", + "../src/unicode_fold3_key.c", + "../src/unicode_fold2_key.c", + "../src/unicode_fold1_key.c", + "../src/regversion.c" + ], + "machdep": "gcc_x86_64", + "main": "main", + "name": "test_utf8.c FULL", + "address-alignment": 65536, /* hexadecimal 0x10000 */ + "val-warn-undefined-pointer-comparison": "none" +} diff --git a/internal/components/third_party/oniguruma/tis-ci/testc.config b/internal/components/third_party/oniguruma/tis-ci/testc.config new file mode 100644 index 0000000000..57a1e6f0ae --- /dev/null +++ b/internal/components/third_party/oniguruma/tis-ci/testc.config @@ -0,0 +1,26 @@ +{ + "compilation_cmd": "-I ../tis-ci -I ../src -D alloca=__builtin_alloca", + "files": [ + "../test/testc.c", + "../src/unicode.c", + "../src/regcomp.c", + "../src/regenc.c", + "../src/utf16_be.c", + "../src/regparse.c", + "../src/st.c", + "../src/regexec.c", + "../src/unicode_unfold_key.c", + "../src/unicode_fold3_key.c", + "../src/unicode_fold2_key.c", + "../src/unicode_fold1_key.c", + "../src/euc_jp.c", + "../src/euc_jp_prop.c", + "../src/ascii.c", + "../src/regversion.c" + ], + "machdep": "gcc_x86_64", + "main": "main", + "name": "testc.c FULL", + "address-alignment": 65536, /* hexadecimal 0x10000 */ + "val-warn-undefined-pointer-comparison": "none" +} diff --git a/internal/components/third_party/oniguruma/tis-ci/testu.config b/internal/components/third_party/oniguruma/tis-ci/testu.config new file mode 100644 index 0000000000..c4f88a7514 --- /dev/null +++ b/internal/components/third_party/oniguruma/tis-ci/testu.config @@ -0,0 +1,24 @@ +{ + "compilation_cmd": "-I ../tis-ci -I ../src -D alloca=__builtin_alloca", + "files": [ + "../test/testu.c", + "../src/unicode.c", + "../src/regcomp.c", + "../src/regenc.c", + "../src/utf16_be.c", + "../src/regparse.c", + "../src/st.c", + "../src/regexec.c", + "../src/unicode_unfold_key.c", + "../src/unicode_fold3_key.c", + "../src/unicode_fold2_key.c", + "../src/unicode_fold1_key.c", + "../src/utf8.c", + "../src/regversion.c" + ], + "machdep": "gcc_x86_64", + "main": "main", + "name": "testu.c FULL", + "address-alignment": 65536, /* hexadecimal 0x10000 */ + "val-warn-undefined-pointer-comparison": "none" +} diff --git a/internal/components/third_party/oniguruma/tis.config b/internal/components/third_party/oniguruma/tis.config new file mode 100644 index 0000000000..aba448ea2c --- /dev/null +++ b/internal/components/third_party/oniguruma/tis.config @@ -0,0 +1,1336 @@ +[ + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=1", + "name": "test_utf8.c (1/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=2", + "name": "test_utf8.c (2/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=3", + "name": "test_utf8.c (3/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=4", + "name": "test_utf8.c (4/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=5", + "name": "test_utf8.c (5/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=6", + "name": "test_utf8.c (6/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=7", + "name": "test_utf8.c (7/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=8", + "name": "test_utf8.c (8/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=9", + "name": "test_utf8.c (9/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=10", + "name": "test_utf8.c (10/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=11", + "name": "test_utf8.c (11/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=12", + "name": "test_utf8.c (12/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=13", + "name": "test_utf8.c (13/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=14", + "name": "test_utf8.c (14/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=15", + "name": "test_utf8.c (15/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=16", + "name": "test_utf8.c (16/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=17", + "name": "test_utf8.c (17/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=18", + "name": "test_utf8.c (18/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=19", + "name": "test_utf8.c (19/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=20", + "name": "test_utf8.c (20/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=21", + "name": "test_utf8.c (21/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=22", + "name": "test_utf8.c (22/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=23", + "name": "test_utf8.c (23/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=24", + "name": "test_utf8.c (24/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=25", + "name": "test_utf8.c (25/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=26", + "name": "test_utf8.c (26/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=27", + "name": "test_utf8.c (27/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=28", + "name": "test_utf8.c (28/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=29", + "name": "test_utf8.c (29/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=30", + "name": "test_utf8.c (30/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=31", + "name": "test_utf8.c (31/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=32", + "name": "test_utf8.c (32/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=33", + "name": "test_utf8.c (33/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=34", + "name": "test_utf8.c (34/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=35", + "name": "test_utf8.c (35/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=36", + "name": "test_utf8.c (36/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=37", + "name": "test_utf8.c (37/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=38", + "name": "test_utf8.c (38/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=39", + "name": "test_utf8.c (39/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=40", + "name": "test_utf8.c (40/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=41", + "name": "test_utf8.c (41/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=42", + "name": "test_utf8.c (42/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=43", + "name": "test_utf8.c (43/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=44", + "name": "test_utf8.c (44/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=45", + "name": "test_utf8.c (45/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=46", + "name": "test_utf8.c (46/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=47", + "name": "test_utf8.c (47/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=48", + "name": "test_utf8.c (48/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=49", + "name": "test_utf8.c (49/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=50", + "name": "test_utf8.c (50/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=51", + "name": "test_utf8.c (51/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=52", + "name": "test_utf8.c (52/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=53", + "name": "test_utf8.c (53/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=54", + "name": "test_utf8.c (54/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=55", + "name": "test_utf8.c (55/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=56", + "name": "test_utf8.c (56/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=57", + "name": "test_utf8.c (57/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=58", + "name": "test_utf8.c (58/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=59", + "name": "test_utf8.c (59/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=60", + "name": "test_utf8.c (60/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=61", + "name": "test_utf8.c (61/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=62", + "name": "test_utf8.c (62/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=63", + "name": "test_utf8.c (63/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=64", + "name": "test_utf8.c (64/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=65", + "name": "test_utf8.c (65/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=66", + "name": "test_utf8.c (66/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=67", + "name": "test_utf8.c (67/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=68", + "name": "test_utf8.c (68/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=69", + "name": "test_utf8.c (69/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=70", + "name": "test_utf8.c (70/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=71", + "name": "test_utf8.c (71/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=72", + "name": "test_utf8.c (72/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=73", + "name": "test_utf8.c (73/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=74", + "name": "test_utf8.c (74/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=75", + "name": "test_utf8.c (75/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=76", + "name": "test_utf8.c (76/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=77", + "name": "test_utf8.c (77/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=78", + "name": "test_utf8.c (78/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=79", + "name": "test_utf8.c (79/80)" + }, + { + "include": "tis-ci/test_utf8.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=0", + "name": "test_utf8.c (80/80)" + }, + { + "include": "tis-ci/test_regset.config", + "name": "test_regset.c FULL" + }, + { + "include": "tis-ci/test_syntax.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=6 -DTIS_TEST_CHOOSE_CURRENT=1", + "name": "test_syntax.c (1/6)" + }, + { + "include": "tis-ci/test_syntax.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=6 -DTIS_TEST_CHOOSE_CURRENT=2", + "name": "test_syntax.c (2/6)" + }, + { + "include": "tis-ci/test_syntax.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=6 -DTIS_TEST_CHOOSE_CURRENT=3", + "name": "test_syntax.c (3/6)" + }, + { + "include": "tis-ci/test_syntax.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=6 -DTIS_TEST_CHOOSE_CURRENT=4", + "name": "test_syntax.c (4/6)" + }, + { + "include": "tis-ci/test_syntax.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=6 -DTIS_TEST_CHOOSE_CURRENT=5", + "name": "test_syntax.c (5/6)" + }, + { + "include": "tis-ci/test_syntax.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=6 -DTIS_TEST_CHOOSE_CURRENT=0", + "name": "test_syntax.c (6/6)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=1", + "name": "testu.c (1/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=2", + "name": "testu.c (2/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=3", + "name": "testu.c (3/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=4", + "name": "testu.c (4/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=5", + "name": "testu.c (5/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=6", + "name": "testu.c (6/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=7", + "name": "testu.c (7/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=8", + "name": "testu.c (8/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=9", + "name": "testu.c (9/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=10", + "name": "testu.c (10/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=11", + "name": "testu.c (11/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=12", + "name": "testu.c (12/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=13", + "name": "testu.c (13/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=14", + "name": "testu.c (14/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=15", + "name": "testu.c (15/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=16", + "name": "testu.c (16/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=17", + "name": "testu.c (17/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=18", + "name": "testu.c (18/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=19", + "name": "testu.c (19/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=20", + "name": "testu.c (20/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=21", + "name": "testu.c (21/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=22", + "name": "testu.c (22/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=23", + "name": "testu.c (23/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=24", + "name": "testu.c (24/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=25", + "name": "testu.c (25/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=26", + "name": "testu.c (26/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=27", + "name": "testu.c (27/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=28", + "name": "testu.c (28/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=29", + "name": "testu.c (29/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=30", + "name": "testu.c (30/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=31", + "name": "testu.c (31/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=32", + "name": "testu.c (32/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=33", + "name": "testu.c (33/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=34", + "name": "testu.c (34/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=35", + "name": "testu.c (35/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=36", + "name": "testu.c (36/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=37", + "name": "testu.c (37/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=38", + "name": "testu.c (38/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=39", + "name": "testu.c (39/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=40", + "name": "testu.c (40/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=41", + "name": "testu.c (41/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=42", + "name": "testu.c (42/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=43", + "name": "testu.c (43/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=44", + "name": "testu.c (44/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=45", + "name": "testu.c (45/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=46", + "name": "testu.c (46/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=47", + "name": "testu.c (47/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=48", + "name": "testu.c (48/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=49", + "name": "testu.c (49/50)" + }, + { + "include": "tis-ci/testu.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=0", + "name": "testu.c (50/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=1", + "name": "testc.c (1/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=2", + "name": "testc.c (2/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=3", + "name": "testc.c (3/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=4", + "name": "testc.c (4/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=5", + "name": "testc.c (5/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=6", + "name": "testc.c (6/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=7", + "name": "testc.c (7/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=8", + "name": "testc.c (8/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=9", + "name": "testc.c (9/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=10", + "name": "testc.c (10/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=11", + "name": "testc.c (11/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=12", + "name": "testc.c (12/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=13", + "name": "testc.c (13/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=14", + "name": "testc.c (14/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=15", + "name": "testc.c (15/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=16", + "name": "testc.c (16/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=17", + "name": "testc.c (17/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=18", + "name": "testc.c (18/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=19", + "name": "testc.c (19/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=20", + "name": "testc.c (20/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=21", + "name": "testc.c (21/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=22", + "name": "testc.c (22/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=23", + "name": "testc.c (23/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=24", + "name": "testc.c (24/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=25", + "name": "testc.c (25/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=26", + "name": "testc.c (26/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=27", + "name": "testc.c (27/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=28", + "name": "testc.c (28/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=29", + "name": "testc.c (29/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=30", + "name": "testc.c (30/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=31", + "name": "testc.c (31/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=32", + "name": "testc.c (32/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=33", + "name": "testc.c (33/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=34", + "name": "testc.c (34/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=35", + "name": "testc.c (35/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=36", + "name": "testc.c (36/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=37", + "name": "testc.c (37/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=38", + "name": "testc.c (38/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=39", + "name": "testc.c (39/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=40", + "name": "testc.c (40/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=41", + "name": "testc.c (41/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=42", + "name": "testc.c (42/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=43", + "name": "testc.c (43/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=44", + "name": "testc.c (44/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=45", + "name": "testc.c (45/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=46", + "name": "testc.c (46/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=47", + "name": "testc.c (47/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=48", + "name": "testc.c (48/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=49", + "name": "testc.c (49/50)" + }, + { + "include": "tis-ci/testc.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=50 -DTIS_TEST_CHOOSE_CURRENT=0", + "name": "testc.c (50/50)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=1", + "name": "test_back.c (1/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=2", + "name": "test_back.c (2/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=3", + "name": "test_back.c (3/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=4", + "name": "test_back.c (4/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=5", + "name": "test_back.c (5/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=6", + "name": "test_back.c (6/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=7", + "name": "test_back.c (7/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=8", + "name": "test_back.c (8/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=9", + "name": "test_back.c (9/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=10", + "name": "test_back.c (10/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=11", + "name": "test_back.c (11/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=12", + "name": "test_back.c (12/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=13", + "name": "test_back.c (13/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=14", + "name": "test_back.c (14/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=15", + "name": "test_back.c (15/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=16", + "name": "test_back.c (16/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=17", + "name": "test_back.c (17/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=18", + "name": "test_back.c (18/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=19", + "name": "test_back.c (19/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=20", + "name": "test_back.c (20/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=21", + "name": "test_back.c (21/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=22", + "name": "test_back.c (22/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=23", + "name": "test_back.c (23/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=24", + "name": "test_back.c (24/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=25", + "name": "test_back.c (25/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=26", + "name": "test_back.c (26/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=27", + "name": "test_back.c (27/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=28", + "name": "test_back.c (28/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=29", + "name": "test_back.c (29/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=30", + "name": "test_back.c (30/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=31", + "name": "test_back.c (31/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=32", + "name": "test_back.c (32/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=33", + "name": "test_back.c (33/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=34", + "name": "test_back.c (34/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=35", + "name": "test_back.c (35/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=36", + "name": "test_back.c (36/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=37", + "name": "test_back.c (37/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=38", + "name": "test_back.c (38/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=39", + "name": "test_back.c (39/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=40", + "name": "test_back.c (40/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=41", + "name": "test_back.c (41/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=42", + "name": "test_back.c (42/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=43", + "name": "test_back.c (43/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=44", + "name": "test_back.c (44/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=45", + "name": "test_back.c (45/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=46", + "name": "test_back.c (46/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=47", + "name": "test_back.c (47/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=48", + "name": "test_back.c (48/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=49", + "name": "test_back.c (49/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=50", + "name": "test_back.c (50/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=51", + "name": "test_back.c (51/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=52", + "name": "test_back.c (52/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=53", + "name": "test_back.c (53/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=54", + "name": "test_back.c (54/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=55", + "name": "test_back.c (55/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=56", + "name": "test_back.c (56/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=57", + "name": "test_back.c (57/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=58", + "name": "test_back.c (58/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=59", + "name": "test_back.c (59/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=60", + "name": "test_back.c (60/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=61", + "name": "test_back.c (61/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=62", + "name": "test_back.c (62/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=63", + "name": "test_back.c (63/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=64", + "name": "test_back.c (64/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=65", + "name": "test_back.c (65/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=66", + "name": "test_back.c (66/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=67", + "name": "test_back.c (67/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=68", + "name": "test_back.c (68/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=69", + "name": "test_back.c (69/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=70", + "name": "test_back.c (70/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=71", + "name": "test_back.c (71/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=72", + "name": "test_back.c (72/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=73", + "name": "test_back.c (73/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=74", + "name": "test_back.c (74/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=75", + "name": "test_back.c (75/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=76", + "name": "test_back.c (76/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=77", + "name": "test_back.c (77/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=78", + "name": "test_back.c (78/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=79", + "name": "test_back.c (79/80)" + }, + { + "include": "tis-ci/test_back.config", + "compilation_cmd": "-DTIS_TEST_CHOOSE_MAX=80 -DTIS_TEST_CHOOSE_CURRENT=0", + "name": "test_back.c (80/80)" + } +] diff --git a/internal/components/third_party/oniguruma/windows/CMakeLists.txt b/internal/components/third_party/oniguruma/windows/CMakeLists.txt new file mode 100644 index 0000000000..ed592114c2 --- /dev/null +++ b/internal/components/third_party/oniguruma/windows/CMakeLists.txt @@ -0,0 +1,8 @@ + +add_executable(testc_windows testc.c) +target_link_libraries(testc_windows onig) +if(NOT MSVC) + target_compile_options(testc_windows + PRIVATE -finput-charset=cp932 -fexec-charset=cp932 + ) +endif(NOT MSVC) diff --git a/internal/components/third_party/oniguruma/windows/testc.c b/internal/components/third_party/oniguruma/windows/testc.c new file mode 100644 index 0000000000..b657682a66 --- /dev/null +++ b/internal/components/third_party/oniguruma/windows/testc.c @@ -0,0 +1,865 @@ +/* + * This program was generated by testconv.rb. + */ +#ifdef ONIG_ESCAPE_UCHAR_COLLISION +#undef ONIG_ESCAPE_UCHAR_COLLISION +#endif +#include + +#ifdef POSIX_TEST +#include "onigposix.h" +#else +#include "oniguruma.h" +#endif + +#include + +#define SLEN(s) strlen(s) + +static int nsucc = 0; +static int nfail = 0; +static int nerror = 0; + +static FILE* err_file; + +#ifndef POSIX_TEST +static OnigRegion* region; +#endif + +static void xx(char* pattern, char* str, int from, int to, int mem, int not) +{ + int r; + +#ifdef POSIX_TEST + regex_t reg; + char buf[200]; + regmatch_t pmatch[25]; + + r = regcomp(®, pattern, REG_EXTENDED | REG_NEWLINE); + if (r) { + regerror(r, ®, buf, sizeof(buf)); + fprintf(err_file, "ERROR: %s\n", buf); + nerror++; + return ; + } + + r = regexec(®, str, reg.re_nsub + 1, pmatch, 0); + if (r != 0 && r != REG_NOMATCH) { + regerror(r, ®, buf, sizeof(buf)); + fprintf(err_file, "ERROR: %s\n", buf); + nerror++; + return ; + } + + if (r == REG_NOMATCH) { + if (not) { + fprintf(stdout, "OK(N): /%s/ '%s'\n", pattern, str); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s'\n", pattern, str); + nfail++; + } + } + else { + if (not) { + fprintf(stdout, "FAIL(N): /%s/ '%s'\n", pattern, str); + nfail++; + } + else { + if (pmatch[mem].rm_so == from && pmatch[mem].rm_eo == to) { + fprintf(stdout, "OK: /%s/ '%s'\n", pattern, str); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str, + from, to, pmatch[mem].rm_so, pmatch[mem].rm_eo); + nfail++; + } + } + } + regfree(®); + +#else + regex_t* reg; + OnigErrorInfo einfo; + + r = onig_new(®, (UChar* )pattern, (UChar* )(pattern + SLEN(pattern)), + ONIG_OPTION_DEFAULT, ONIG_ENCODING_SJIS, ONIG_SYNTAX_DEFAULT, &einfo); + if (r) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r, &einfo); + fprintf(err_file, "ERROR: %s\n", s); + nerror++; + return ; + } + + r = onig_search(reg, (UChar* )str, (UChar* )(str + SLEN(str)), + (UChar* )str, (UChar* )(str + SLEN(str)), + region, ONIG_OPTION_NONE); + if (r < ONIG_MISMATCH) { + char s[ONIG_MAX_ERROR_MESSAGE_LEN]; + onig_error_code_to_str((UChar* )s, r); + fprintf(err_file, "ERROR: %s\n", s); + nerror++; + return ; + } + + if (r == ONIG_MISMATCH) { + if (not) { + fprintf(stdout, "OK(N): /%s/ '%s'\n", pattern, str); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s'\n", pattern, str); + nfail++; + } + } + else { + if (not) { + fprintf(stdout, "FAIL(N): /%s/ '%s'\n", pattern, str); + nfail++; + } + else { + if (region->beg[mem] == from && region->end[mem] == to) { + fprintf(stdout, "OK: /%s/ '%s'\n", pattern, str); + nsucc++; + } + else { + fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str, + from, to, region->beg[mem], region->end[mem]); + nfail++; + } + } + } + onig_free(reg); +#endif +} + +static void x2(char* pattern, char* str, int from, int to) +{ + xx(pattern, str, from, to, 0, 0); +} + +static void x3(char* pattern, char* str, int from, int to, int mem) +{ + xx(pattern, str, from, to, mem, 0); +} + +static void n(char* pattern, char* str) +{ + xx(pattern, str, 0, 0, 0, 1); +} + +extern int main(int argc, char* argv[]) +{ +#ifndef POSIX_TEST + static OnigEncoding use_encs[1]; + + use_encs[0] = ONIG_ENCODING_SJIS; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); +#endif + + err_file = stdout; + +#ifdef POSIX_TEST + reg_set_encoding(REG_POSIX_ENCODING_SJIS); +#else + region = onig_region_new(); +#endif + + x2("", "", 0, 0); + x2("^", "", 0, 0); + x2("$", "", 0, 0); + x2("\\G", "", 0, 0); + x2("\\A", "", 0, 0); + x2("\\Z", "", 0, 0); + x2("\\z", "", 0, 0); + x2("^$", "", 0, 0); + x2("\\ca", "\001", 0, 1); + x2("\\C-b", "\002", 0, 1); + x2("\\c\\\\", "\034", 0, 1); + x2("q[\\c\\\\]", "q\034", 0, 2); + x2("", "a", 0, 0); + x2("a", "a", 0, 1); + x2("\\x61", "a", 0, 1); + x2("aa", "aa", 0, 2); + x2("aaa", "aaa", 0, 3); + x2("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 0, 35); + x2("ab", "ab", 0, 2); + x2("b", "ab", 1, 2); + x2("bc", "abc", 1, 3); + x2("(?i:#RET#)", "#INS##RET#", 5, 10); + x2("\\17", "\017", 0, 1); + x2("\\x1f", "\x1f", 0, 1); + x2("a(?#....\\\\JJJJ)b", "ab", 0, 2); + x2("(?x) G (o O(?-x)oO) g L", "GoOoOgLe", 0, 7); + x2(".", "a", 0, 1); + n(".", ""); + x2("..", "ab", 0, 2); + x2("\\w", "e", 0, 1); + n("\\W", "e"); + x2("\\s", " ", 0, 1); + x2("\\S", "b", 0, 1); + x2("\\d", "4", 0, 1); + n("\\D", "4"); + x2("\\b", "z ", 0, 0); + x2("\\b", " z", 1, 1); + x2("\\B", "zz ", 1, 1); + x2("\\B", "z ", 2, 2); + x2("\\B", " z", 0, 0); + x2("[ab]", "b", 0, 1); + n("[ab]", "c"); + x2("[a-z]", "t", 0, 1); + n("[^a]", "a"); + x2("[^a]", "\n", 0, 1); + x2("[]]", "]", 0, 1); + n("[^]]", "]"); + x2("[\\^]+", "0^^1", 1, 3); + x2("[b-]", "b", 0, 1); + x2("[b-]", "-", 0, 1); + x2("[\\w]", "z", 0, 1); + n("[\\w]", " "); + x2("[\\W]", "b$", 1, 2); + x2("[\\d]", "5", 0, 1); + n("[\\d]", "e"); + x2("[\\D]", "t", 0, 1); + n("[\\D]", "3"); + x2("[\\s]", " ", 0, 1); + n("[\\s]", "a"); + x2("[\\S]", "b", 0, 1); + n("[\\S]", " "); + x2("[\\w\\d]", "2", 0, 1); + n("[\\w\\d]", " "); + x2("[[:upper:]]", "B", 0, 1); + x2("[*[:xdigit:]+]", "+", 0, 1); + x2("[*[:xdigit:]+]", "GHIKK-9+*", 6, 7); + x2("[*[:xdigit:]+]", "-@^+", 3, 4); + n("[[:upper]]", "A"); + x2("[[:upper]]", ":", 0, 1); + x2("[\\044-\\047]", "\046", 0, 1); + x2("[\\x5a-\\x5c]", "\x5b", 0, 1); + x2("[\\x6A-\\x6D]", "\x6c", 0, 1); + n("[\\x6A-\\x6D]", "\x6E"); + n("^[0-9A-F]+ 0+ UNDEF ", "75F 00000000 SECT14A notype () External | _rb_apply"); + x2("[\\[]", "[", 0, 1); + x2("[\\]]", "]", 0, 1); + x2("[&]", "&", 0, 1); + x2("[[ab]]", "b", 0, 1); + x2("[[ab]c]", "c", 0, 1); + n("[[^a]]", "a"); + n("[^[a]]", "a"); + x2("[[ab]&&bc]", "b", 0, 1); + n("[[ab]&&bc]", "a"); + n("[[ab]&&bc]", "c"); + x2("[a-z&&b-y&&c-x]", "w", 0, 1); + n("[^a-z&&b-y&&c-x]", "w"); + x2("[[^a&&a]&&a-z]", "b", 0, 1); + n("[[^a&&a]&&a-z]", "a"); + x2("[[^a-z&&bcdef]&&[^c-g]]", "h", 0, 1); + n("[[^a-z&&bcdef]&&[^c-g]]", "c"); + x2("[^[^abc]&&[^cde]]", "c", 0, 1); + x2("[^[^abc]&&[^cde]]", "e", 0, 1); + n("[^[^abc]&&[^cde]]", "f"); + x2("[a-&&-a]", "-", 0, 1); + n("[a\\-&&\\-a]", "&"); + n("\\wabc", " abc"); + x2("a\\Wbc", "a bc", 0, 4); + x2("a.b.c", "aabbc", 0, 5); + x2(".\\wb\\W..c", "abb bcc", 0, 7); + x2("\\s\\wzzz", " zzzz", 0, 5); + x2("aa.b", "aabb", 0, 4); + n(".a", "ab"); + x2(".a", "aa", 0, 2); + x2("^a", "a", 0, 1); + x2("^a$", "a", 0, 1); + x2("^\\w$", "a", 0, 1); + n("^\\w$", " "); + x2("^\\wab$", "zab", 0, 3); + x2("^\\wabcdef$", "zabcdef", 0, 7); + x2("^\\w...def$", "zabcdef", 0, 7); + x2("\\w\\w\\s\\Waaa\\d", "aa aaa4", 0, 8); + x2("\\A\\Z", "", 0, 0); + x2("\\Axyz", "xyz", 0, 3); + x2("xyz\\Z", "xyz", 0, 3); + x2("xyz\\z", "xyz", 0, 3); + x2("a\\Z", "a", 0, 1); + x2("\\Gaz", "az", 0, 2); + n("\\Gz", "bza"); + n("az\\G", "az"); + n("az\\A", "az"); + n("a\\Az", "az"); + x2("\\^\\$", "^$", 0, 2); + x2("^x?y", "xy", 0, 2); + x2("^(x?y)", "xy", 0, 2); + x2("\\w", "_", 0, 1); + n("\\W", "_"); + x2("(?=z)z", "z", 0, 1); + n("(?=z).", "a"); + x2("(?!z)a", "a", 0, 1); + n("(?!z)a", "z"); + x2("(?i:a)", "a", 0, 1); + x2("(?i:a)", "A", 0, 1); + x2("(?i:A)", "a", 0, 1); + n("(?i:A)", "b"); + x2("(?i:[A-Z])", "a", 0, 1); + x2("(?i:[f-m])", "H", 0, 1); + x2("(?i:[f-m])", "h", 0, 1); + n("(?i:[f-m])", "e"); + x2("(?i:[A-c])", "D", 0, 1); + n("(?i:[^a-z])", "A"); + n("(?i:[^a-z])", "a"); + x2("(?i:[!-k])", "Z", 0, 1); + x2("(?i:[!-k])", "7", 0, 1); + x2("(?i:[T-}])", "b", 0, 1); + x2("(?i:[T-}])", "{", 0, 1); + x2("(?i:\\?a)", "?A", 0, 2); + x2("(?i:\\*A)", "*a", 0, 2); + n(".", "\n"); + x2("(?m:.)", "\n", 0, 1); + x2("(?m:a.)", "a\n", 0, 2); + x2("(?m:.b)", "a\nb", 1, 3); + x2(".*abc", "dddabdd\nddabc", 8, 13); + x2("(?m:.*abc)", "dddabddabc", 0, 10); + n("(?i)(?-i)a", "A"); + n("(?i)(?-i:a)", "A"); + x2("a?", "", 0, 0); + x2("a?", "b", 0, 0); + x2("a?", "a", 0, 1); + x2("a*", "", 0, 0); + x2("a*", "a", 0, 1); + x2("a*", "aaa", 0, 3); + x2("a*", "baaaa", 0, 0); + n("a+", ""); + x2("a+", "a", 0, 1); + x2("a+", "aaaa", 0, 4); + x2("a+", "aabbb", 0, 2); + x2("a+", "baaaa", 1, 5); + x2(".?", "", 0, 0); + x2(".?", "f", 0, 1); + x2(".?", "\n", 0, 0); + x2(".*", "", 0, 0); + x2(".*", "abcde", 0, 5); + x2(".+", "z", 0, 1); + x2(".+", "zdswer\n", 0, 6); + x2("(.*)a\\1f", "babfbac", 0, 4); + x2("(.*)a\\1f", "bacbabf", 3, 7); + x2("((.*)a\\2f)", "bacbabf", 3, 7); + x2("(.*)a\\1f", "baczzzzzz\nbazz\nzzzzbabf", 19, 23); + x2("a|b", "a", 0, 1); + x2("a|b", "b", 0, 1); + x2("|a", "a", 0, 0); + x2("(|a)", "a", 0, 0); + x2("ab|bc", "ab", 0, 2); + x2("ab|bc", "bc", 0, 2); + x2("z(?:ab|bc)", "zbc", 0, 3); + x2("a(?:ab|bc)c", "aabc", 0, 4); + x2("ab|(?:ac|az)", "az", 0, 2); + x2("a|b|c", "dc", 1, 2); + x2("a|b|cd|efg|h|ijk|lmn|o|pq|rstuvwx|yz", "pqr", 0, 2); + n("a|b|cd|efg|h|ijk|lmn|o|pq|rstuvwx|yz", "mn"); + x2("a|^z", "ba", 1, 2); + x2("a|^z", "za", 0, 1); + x2("a|\\Gz", "bza", 2, 3); + x2("a|\\Gz", "za", 0, 1); + x2("a|\\Az", "bza", 2, 3); + x2("a|\\Az", "za", 0, 1); + x2("a|b\\Z", "ba", 1, 2); + x2("a|b\\Z", "b", 0, 1); + x2("a|b\\z", "ba", 1, 2); + x2("a|b\\z", "b", 0, 1); + x2("\\w|\\s", " ", 0, 1); + n("\\w|\\w", " "); + x2("\\w|%", "%", 0, 1); + x2("\\w|[&$]", "&", 0, 1); + x2("[b-d]|[^e-z]", "a", 0, 1); + x2("(?:a|[c-f])|bz", "dz", 0, 1); + x2("(?:a|[c-f])|bz", "bz", 0, 2); + x2("abc|(?=zz)..f", "zzf", 0, 3); + x2("abc|(?!zz)..f", "abf", 0, 3); + x2("(?=za)..a|(?=zz)..a", "zza", 0, 3); + n("(?>a|abd)c", "abdc"); + x2("(?>abd|a)c", "abdc", 0, 4); + x2("a?|b", "a", 0, 1); + x2("a?|b", "b", 0, 0); + x2("a?|b", "", 0, 0); + x2("a*|b", "aa", 0, 2); + x2("a*|b*", "ba", 0, 0); + x2("a*|b*", "ab", 0, 1); + x2("a+|b*", "", 0, 0); + x2("a+|b*", "bbb", 0, 3); + x2("a+|b*", "abbb", 0, 1); + n("a+|b+", ""); + x2("(a|b)?", "b", 0, 1); + x2("(a|b)*", "ba", 0, 2); + x2("(a|b)+", "bab", 0, 3); + x2("(ab|ca)+", "caabbc", 0, 4); + x2("(ab|ca)+", "aabca", 1, 5); + x2("(ab|ca)+", "abzca", 0, 2); + x2("(a|bab)+", "ababa", 0, 5); + x2("(a|bab)+", "ba", 1, 2); + x2("(a|bab)+", "baaaba", 1, 4); + x2("(?:a|b)(?:a|b)", "ab", 0, 2); + x2("(?:a*|b*)(?:a*|b*)", "aaabbb", 0, 3); + x2("(?:a*|b*)(?:a+|b+)", "aaabbb", 0, 6); + x2("(?:a+|b+){2}", "aaabbb", 0, 6); + x2("h{0,}", "hhhh", 0, 4); + x2("(?:a+|b+){1,2}", "aaabbb", 0, 6); + n("ax{2}*a", "0axxxa1"); + n("a.{0,2}a", "0aXXXa0"); + n("a.{0,2}?a", "0aXXXa0"); + n("a.{0,2}?a", "0aXXXXa0"); + x2("^a{2,}?a$", "aaa", 0, 3); + x2("^[a-z]{2,}?$", "aaa", 0, 3); + x2("(?:a+|\\Ab*)cc", "cc", 0, 2); + n("(?:a+|\\Ab*)cc", "abcc"); + x2("(?:^a+|b+)*c", "aabbbabc", 6, 8); + x2("(?:^a+|b+)*c", "aabbbbc", 0, 7); + x2("a|(?i)c", "C", 0, 1); + x2("(?i)c|a", "C", 0, 1); + x2("(?i)c|a", "A", 0, 1); + x2("(?i:c)|a", "C", 0, 1); + n("(?i:c)|a", "A"); + x2("[abc]?", "abc", 0, 1); + x2("[abc]*", "abc", 0, 3); + x2("[^abc]*", "abc", 0, 0); + n("[^abc]+", "abc"); + x2("a?\?", "aaa", 0, 0); + x2("ba?\?b", "bab", 0, 3); + x2("a*?", "aaa", 0, 0); + x2("ba*?", "baa", 0, 1); + x2("ba*?b", "baab", 0, 4); + x2("a+?", "aaa", 0, 1); + x2("ba+?", "baa", 0, 2); + x2("ba+?b", "baab", 0, 4); + x2("(?:a?)?\?", "a", 0, 0); + x2("(?:a?\?)?", "a", 0, 0); + x2("(?:a?)+?", "aaa", 0, 1); + x2("(?:a+)?\?", "aaa", 0, 0); + x2("(?:a+)?\?b", "aaab", 0, 4); + x2("(?:ab)?{2}", "", 0, 0); + x2("(?:ab)?{2}", "ababa", 0, 4); + x2("(?:ab)*{0}", "ababa", 0, 0); + x2("(?:ab){3,}", "abababab", 0, 8); + n("(?:ab){3,}", "abab"); + x2("(?:ab){2,4}", "ababab", 0, 6); + x2("(?:ab){2,4}", "ababababab", 0, 8); + x2("(?:ab){2,4}?", "ababababab", 0, 4); + x2("(?:ab){,}", "ab{,}", 0, 5); + x2("(?:abc)+?{2}", "abcabcabc", 0, 6); + x2("(?:X*)(?i:xa)", "XXXa", 0, 4); + x2("(d+)([^abc]z)", "dddz", 0, 4); + x2("([^abc]*)([^abc]z)", "dddz", 0, 4); + x2("(\\w+)(\\wz)", "dddz", 0, 4); + x3("(a)", "a", 0, 1, 1); + x3("(ab)", "ab", 0, 2, 1); + x2("((ab))", "ab", 0, 2); + x3("((ab))", "ab", 0, 2, 1); + x3("((ab))", "ab", 0, 2, 2); + x3("((((((((((((((((((((ab))))))))))))))))))))", "ab", 0, 2, 20); + x3("(ab)(cd)", "abcd", 0, 2, 1); + x3("(ab)(cd)", "abcd", 2, 4, 2); + x3("()(a)bc(def)ghijk", "abcdefghijk", 3, 6, 3); + x3("(()(a)bc(def)ghijk)", "abcdefghijk", 3, 6, 4); + x2("(^a)", "a", 0, 1); + x3("(a)|(a)", "ba", 1, 2, 1); + x3("(^a)|(a)", "ba", 1, 2, 2); + x3("(a?)", "aaa", 0, 1, 1); + x3("(a*)", "aaa", 0, 3, 1); + x3("(a*)", "", 0, 0, 1); + x3("(a+)", "aaaaaaa", 0, 7, 1); + x3("(a+|b*)", "bbbaa", 0, 3, 1); + x3("(a+|b?)", "bbbaa", 0, 1, 1); + x3("(abc)?", "abc", 0, 3, 1); + x3("(abc)*", "abc", 0, 3, 1); + x3("(abc)+", "abc", 0, 3, 1); + x3("(xyz|abc)+", "abc", 0, 3, 1); + x3("([xyz][abc]|abc)+", "abc", 0, 3, 1); + x3("((?i:abc))", "AbC", 0, 3, 1); + x2("(abc)(?i:\\1)", "abcABC", 0, 6); + x3("((?m:a.c))", "a\nc", 0, 3, 1); + x3("((?=az)a)", "azb", 0, 1, 1); + x3("abc|(.abd)", "zabd", 0, 4, 1); + x2("(?:abc)|(ABC)", "abc", 0, 3); + x3("(?i:(abc))|(zzz)", "ABC", 0, 3, 1); + x3("a*(.)", "aaaaz", 4, 5, 1); + x3("a*?(.)", "aaaaz", 0, 1, 1); + x3("a*?(c)", "aaaac", 4, 5, 1); + x3("[bcd]a*(.)", "caaaaz", 5, 6, 1); + x3("(\\Abb)cc", "bbcc", 0, 2, 1); + n("(\\Abb)cc", "zbbcc"); + x3("(^bb)cc", "bbcc", 0, 2, 1); + n("(^bb)cc", "zbbcc"); + x3("cc(bb$)", "ccbb", 2, 4, 1); + n("cc(bb$)", "ccbbb"); + n("(\\1)", ""); + n("\\1(a)", "aa"); + n("(a(b)\\1)\\2+", "ababb"); + n("(?:(?:\\1|z)(a))+$", "zaa"); + x2("(?:(?:\\1|z)(a))+$", "zaaa", 0, 4); + x2("(a)(?=\\1)", "aa", 0, 1); + n("(a)$|\\1", "az"); + x2("(a)\\1", "aa", 0, 2); + n("(a)\\1", "ab"); + x2("(a?)\\1", "aa", 0, 2); + x2("(a?\?)\\1", "aa", 0, 0); + x2("(a*)\\1", "aaaaa", 0, 4); + x3("(a*)\\1", "aaaaa", 0, 2, 1); + x2("a(b*)\\1", "abbbb", 0, 5); + x2("a(b*)\\1", "ab", 0, 1); + x2("(a*)(b*)\\1\\2", "aaabbaaabb", 0, 10); + x2("(a*)(b*)\\2", "aaabbbb", 0, 7); + x2("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 8); + x3("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 3, 7); + x2("(a)(b)(c)\\2\\1\\3", "abcbac", 0, 6); + x2("([a-d])\\1", "cc", 0, 2); + x2("(\\w\\d\\s)\\1", "f5 f5 ", 0, 6); + n("(\\w\\d\\s)\\1", "f5 f5"); + x2("(who|[a-c]{3})\\1", "whowho", 0, 6); + x2("...(who|[a-c]{3})\\1", "abcwhowho", 0, 9); + x2("(who|[a-c]{3})\\1", "cbccbc", 0, 6); + x2("(^a)\\1", "aa", 0, 2); + n("(^a)\\1", "baa"); + n("(a$)\\1", "aa"); + n("(ab\\Z)\\1", "ab"); + x2("(a*\\Z)\\1", "a", 1, 1); + x2(".(a*\\Z)\\1", "ba", 1, 2); + x3("(.(abc)\\2)", "zabcabc", 0, 7, 1); + x3("(.(..\\d.)\\2)", "z12341234", 0, 9, 1); + x2("((?i:az))\\1", "AzAz", 0, 4); + n("((?i:az))\\1", "Azaz"); + x2("(?<=a)b", "ab", 1, 2); + n("(?<=a)b", "bb"); + x2("(?<=a|b)b", "bb", 1, 2); + x2("(?<=a|bc)b", "bcb", 2, 3); + x2("(?<=a|bc)b", "ab", 1, 2); + x2("(?<=a|bc||defghij|klmnopq|r)z", "rz", 1, 2); + x2("(a)\\g<1>", "aa", 0, 2); + x2("(?a)", "a", 0, 1); + x2("(?ab)\\g", "abab", 0, 4); + x2("(?.zv.)\\k", "azvbazvb", 0, 8); + x2("(?<=\\g)|-\\zEND (?XyZ)", "XyZ", 3, 3); + x2("(?|a\\g)+", "", 0, 0); + x2("(?|\\(\\g\\))+$", "()(())", 0, 6); + x3("\\g(?.){0}", "X", 0, 1, 1); + x2("\\g(abc|df(?.YZ){2,8}){0}", "XYZ", 0, 3); + x2("\\A(?(a\\g)|)\\z", "aaaa", 0, 4); + x2("(?|\\g\\g)\\z|\\zEND (?a|(b)\\g)", "bbbbabba", 0, 8); + x2("(?\\w+\\sx)a+\\k", " fg xaaaaaaaafg x", 2, 18); + x3("(z)()()(?<_9>a)\\g<_9>", "zaa", 2, 3, 1); + x2("(.)(((?<_>a)))\\k<_>", "zaa", 0, 3); + x2("((?\\d)|(?\\w))(\\k|\\k)", "ff", 0, 2); + x2("(?:(?)|(?efg))\\k", "", 0, 0); + x2("(?:(?abc)|(?efg))\\k", "abcefgefg", 3, 9); + n("(?:(?abc)|(?efg))\\k", "abcefg"); + x2("(?:(?.)|(?..)|(?...)|(?....)|(?.....)|(?......)|(?.......)|(?........)|(?.........)|(?..........)|(?...........)|(?............)|(?.............)|(?..............))\\k$", "a-pyumpyum", 2, 10); + x3("(?:(?.)|(?..)|(?...)|(?....)|(?.....)|(?......)|(?.......)|(?........)|(?.........)|(?..........)|(?...........)|(?............)|(?.............)|(?..............))\\k$", "xxxxabcdefghijklmnabcdefghijklmn", 4, 18, 14); + x3("(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?)(?aaa)(?)$", "aaa", 0, 3, 16); + x2("(?a|\\(\\g\\))", "a", 0, 1); + x2("(?a|\\(\\g\\))", "((((((a))))))", 0, 13); + x3("(?a|\\(\\g\\))", "((((((((a))))))))", 0, 17, 1); + x2("\\g|\\zEND(?.*abc$)", "abcxxxabc", 0, 9); + x2("\\g<1>|\\zEND(.a.)", "bac", 0, 3); + x3("\\g<_A>\\g<_A>|\\zEND(.a.)(?<_A>.b.)", "xbxyby", 3, 6, 1); + x2("\\A(?:\\g|\\g|\\zEND (?a|c\\gc)(?b|d\\gd))$", "cdcbcdc", 0, 7); + x2("\\A(?|a\\g)\\z|\\zEND (?\\g)", "aaaa", 0, 4); + x2("(?(a|b\\gc){3,5})", "baaaaca", 1, 5); + x2("(?(a|b\\gc){3,5})", "baaaacaaaaa", 0, 10); + x2("(?\\(([^\\(\\)]++|\\g)*+\\))", "((a))", 0, 5); + x2("()*\\1", "", 0, 0); + x2("(?:()|())*\\1\\2", "", 0, 0); + x3("(?:\\1a|())*", "a", 0, 0, 1); + x2("x((.)*)*x", "0x1x2x3", 1, 6); + x2("x((.)*)*x(?i:\\1)\\Z", "0x1x2x1X2", 1, 9); + x2("(?:()|()|()|()|()|())*\\2\\5", "", 0, 0); + x2("(?:()|()|()|(x)|()|())*\\2b\\5", "b", 0, 1); + x2("\\xED\\xF2", "\xed\xf2", 0, 2); + x2("", "‚ ", 0, 0); + x2("‚ ", "‚ ", 0, 2); + n("‚¢", "‚ "); + x2("‚¤‚¤", "‚¤‚¤", 0, 4); + x2("‚ ‚¢‚¤", "‚ ‚¢‚¤", 0, 6); + x2("‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±", "‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±‚±", 0, 70); + x2("‚ ", "‚¢‚ ", 2, 4); + x2("‚¢‚¤", "‚ ‚¢‚¤", 2, 6); + x2("\\xca\\xb8", "\xca\xb8", 0, 2); + x2(".", "‚ ", 0, 2); + x2("..", "‚©‚«", 0, 4); + x2("\\w", "‚¨", 0, 2); + n("\\W", "‚ "); + x2("[\\W]", "‚¤$", 2, 3); + x2("\\S", "‚»", 0, 2); + x2("\\S", "Š¿", 0, 2); + x2("\\b", "‹C ", 0, 0); + x2("\\b", " ‚Ù", 1, 1); + x2("\\B", "‚¹‚» ", 2, 2); + x2("\\B", "‚¤ ", 3, 3); + x2("\\B", " ‚¢", 0, 0); + x2("[‚½‚¿]", "‚¿", 0, 2); + n("[‚È‚É]", "‚Ê"); + x2("[‚¤-‚¨]", "‚¦", 0, 2); + n("[^‚¯]", "‚¯"); + x2("[\\w]", "‚Ë", 0, 2); + n("[\\d]", "‚Ó"); + x2("[\\D]", "‚Í", 0, 2); + n("[\\s]", "‚­"); + x2("[\\S]", "‚Ö", 0, 2); + x2("[\\w\\d]", "‚æ", 0, 2); + x2("[\\w\\d]", " ‚æ", 3, 5); + n("\\w‹SŽÔ", " ‹SŽÔ"); + x2("‹S\\WŽÔ", "‹S ŽÔ", 0, 5); + x2("‚ .‚¢.‚¤", "‚ ‚ ‚¢‚¢‚¤", 0, 10); + x2(".\\w‚¤\\W..‚¼", "‚¦‚¤‚¤ ‚¤‚¼‚¼", 0, 13); + x2("\\s\\w‚±‚±‚±", " ‚±‚±‚±‚±", 0, 9); + x2("‚ ‚ .‚¯", "‚ ‚ ‚¯‚¯", 0, 8); + n(".‚¢", "‚¢‚¦"); + x2(".‚¨", "‚¨‚¨", 0, 4); + x2("^‚ ", "‚ ", 0, 2); + x2("^‚Þ$", "‚Þ", 0, 2); + x2("^\\w$", "‚É", 0, 2); + x2("^\\w‚©‚«‚­‚¯‚±$", "z‚©‚«‚­‚¯‚±", 0, 11); + x2("^\\w...‚¤‚¦‚¨$", "z‚ ‚¢‚¤‚¤‚¦‚¨", 0, 13); + x2("\\w\\w\\s\\W‚¨‚¨‚¨\\d", "a‚¨ ‚¨‚¨‚¨4", 0, 12); + x2("\\A‚½‚¿‚Â", "‚½‚¿‚Â", 0, 6); + x2("‚Þ‚ß‚à\\Z", "‚Þ‚ß‚à", 0, 6); + x2("‚©‚«‚­\\z", "‚©‚«‚­", 0, 6); + x2("‚©‚«‚­\\Z", "‚©‚«‚­\n", 0, 6); + x2("\\G‚Û‚Ò", "‚Û‚Ò", 0, 4); + n("\\G‚¦", "‚¤‚¦‚¨"); + n("‚Æ‚Ä\\G", "‚Æ‚Ä"); + n("‚Ü‚Ý\\A", "‚Ü‚Ý"); + n("‚Ü\\A‚Ý", "‚Ü‚Ý"); + x2("(?=‚¹)‚¹", "‚¹", 0, 2); + n("(?=‚¤).", "‚¢"); + x2("(?!‚¤)‚©", "‚©", 0, 2); + n("(?!‚Æ)‚ ", "‚Æ"); + x2("(?i:‚ )", "‚ ", 0, 2); + x2("(?i:‚Ô‚×)", "‚Ô‚×", 0, 4); + n("(?i:‚¢)", "‚¤"); + x2("(?m:‚æ.)", "‚æ\n", 0, 3); + x2("(?m:.‚ß)", "‚Ü\n‚ß", 2, 5); + x2("‚ ?", "", 0, 0); + x2("•Ï?", "‰»", 0, 0); + x2("•Ï?", "•Ï", 0, 2); + x2("—Ê*", "", 0, 0); + x2("—Ê*", "—Ê", 0, 2); + x2("Žq*", "ŽqŽqŽq", 0, 6); + x2("”n*", "Ž­”n”n”n”n", 0, 0); + n("ŽR+", ""); + x2("‰Í+", "‰Í", 0, 2); + x2("Žž+", "ŽžŽžŽžŽž", 0, 8); + x2("‚¦+", "‚¦‚¦‚¤‚¤‚¤", 0, 4); + x2("‚¤+", "‚¨‚¤‚¤‚¤‚¤", 2, 10); + x2(".?", "‚½", 0, 2); + x2(".*", "‚ς҂ՂØ", 0, 8); + x2(".+", "‚ë", 0, 2); + x2(".+", "‚¢‚¤‚¦‚©\n", 0, 8); + x2("‚ |‚¢", "‚ ", 0, 2); + x2("‚ |‚¢", "‚¢", 0, 2); + x2("‚ ‚¢|‚¢‚¤", "‚ ‚¢", 0, 4); + x2("‚ ‚¢|‚¢‚¤", "‚¢‚¤", 0, 4); + x2("‚ð(?:‚©‚«|‚«‚­)", "‚ð‚©‚«", 0, 6); + x2("‚ð(?:‚©‚«|‚«‚­)‚¯", "‚ð‚«‚­‚¯", 0, 8); + x2("‚ ‚¢|(?:‚ ‚¤|‚ ‚ð)", "‚ ‚ð", 0, 4); + x2("‚ |‚¢|‚¤", "‚¦‚¤", 2, 4); + x2("‚ |‚¢|‚¤‚¦|‚¨‚©‚«|‚­|‚¯‚±‚³|‚µ‚·‚¹|‚»|‚½‚¿|‚‚ĂƂȂÉ|‚Ê‚Ë", "‚µ‚·‚¹", 0, 6); + n("‚ |‚¢|‚¤‚¦|‚¨‚©‚«|‚­|‚¯‚±‚³|‚µ‚·‚¹|‚»|‚½‚¿|‚‚ĂƂȂÉ|‚Ê‚Ë", "‚·‚¹"); + x2("‚ |^‚í", "‚Ô‚ ", 2, 4); + x2("‚ |^‚ð", "‚ð‚ ", 0, 2); + x2("‹S|\\GŽÔ", "‚¯ŽÔ‹S", 4, 6); + x2("‹S|\\GŽÔ", "ŽÔ‹S", 0, 2); + x2("‹S|\\AŽÔ", "bŽÔ‹S", 3, 5); + x2("‹S|\\AŽÔ", "ŽÔ", 0, 2); + x2("‹S|ŽÔ\\Z", "ŽÔ‹S", 2, 4); + x2("‹S|ŽÔ\\Z", "ŽÔ", 0, 2); + x2("‹S|ŽÔ\\Z", "ŽÔ\n", 0, 2); + x2("‹S|ŽÔ\\z", "ŽÔ‹S", 2, 4); + x2("‹S|ŽÔ\\z", "ŽÔ", 0, 2); + x2("\\w|\\s", "‚¨", 0, 2); + x2("\\w|%", "%‚¨", 0, 1); + x2("\\w|[&$]", "‚¤&", 0, 2); + x2("[‚¢-‚¯]", "‚¤", 0, 2); + x2("[‚¢-‚¯]|[^‚©-‚±]", "‚ ", 0, 2); + x2("[‚¢-‚¯]|[^‚©-‚±]", "‚©", 0, 2); + x2("[^‚ ]", "\n", 0, 1); + x2("(?:‚ |[‚¤-‚«])|‚¢‚ð", "‚¤‚ð", 0, 2); + x2("(?:‚ |[‚¤-‚«])|‚¢‚ð", "‚¢‚ð", 0, 4); + x2("‚ ‚¢‚¤|(?=‚¯‚¯)..‚Ù", "‚¯‚¯‚Ù", 0, 6); + x2("‚ ‚¢‚¤|(?!‚¯‚¯)..‚Ù", "‚ ‚¢‚Ù", 0, 6); + x2("(?=‚ð‚ )..‚ |(?=‚ð‚ð)..‚ ", "‚ð‚ð‚ ", 0, 6); + x2("(?<=‚ |‚¢‚¤)‚¢", "‚¢‚¤‚¢", 4, 6); + n("(?>‚ |‚ ‚¢‚¦)‚¤", "‚ ‚¢‚¦‚¤"); + x2("(?>‚ ‚¢‚¦|‚ )‚¤", "‚ ‚¢‚¦‚¤", 0, 8); + x2("‚ ?|‚¢", "‚ ", 0, 2); + x2("‚ ?|‚¢", "‚¢", 0, 0); + x2("‚ ?|‚¢", "", 0, 0); + x2("‚ *|‚¢", "‚ ‚ ", 0, 4); + x2("‚ *|‚¢*", "‚¢‚ ", 0, 0); + x2("‚ *|‚¢*", "‚ ‚¢", 0, 2); + x2("[a‚ ]*|‚¢*", "a‚ ‚¢‚¢‚¢", 0, 3); + x2("‚ +|‚¢*", "", 0, 0); + x2("‚ +|‚¢*", "‚¢‚¢‚¢", 0, 6); + x2("‚ +|‚¢*", "‚ ‚¢‚¢‚¢", 0, 2); + x2("‚ +|‚¢*", "a‚ ‚¢‚¢‚¢", 0, 0); + n("‚ +|‚¢+", ""); + x2("(‚ |‚¢)?", "‚¢", 0, 2); + x2("(‚ |‚¢)*", "‚¢‚ ", 0, 4); + x2("(‚ |‚¢)+", "‚¢‚ ‚¢", 0, 6); + x2("(‚ ‚¢|‚¤‚ )+", "‚¤‚ ‚ ‚¢‚¤‚¦", 0, 8); + x2("(‚ ‚¢|‚¤‚¦)+", "‚¤‚ ‚ ‚¢‚¤‚¦", 4, 12); + x2("(‚ ‚¢|‚¤‚ )+", "‚ ‚ ‚¢‚¤‚ ", 2, 10); + x2("(‚ ‚¢|‚¤‚ )+", "‚ ‚¢‚ð‚¤‚ ", 0, 4); + x2("(‚ ‚¢|‚¤‚ )+", "$$zzzz‚ ‚¢‚ð‚¤‚ ", 6, 10); + x2("(‚ |‚¢‚ ‚¢)+", "‚ ‚¢‚ ‚¢‚ ", 0, 10); + x2("(‚ |‚¢‚ ‚¢)+", "‚¢‚ ", 2, 4); + x2("(‚ |‚¢‚ ‚¢)+", "‚¢‚ ‚ ‚ ‚¢‚ ", 2, 8); + x2("(?:‚ |‚¢)(?:‚ |‚¢)", "‚ ‚¢", 0, 4); + x2("(?:‚ *|‚¢*)(?:‚ *|‚¢*)", "‚ ‚ ‚ ‚¢‚¢‚¢", 0, 6); + x2("(?:‚ *|‚¢*)(?:‚ +|‚¢+)", "‚ ‚ ‚ ‚¢‚¢‚¢", 0, 12); + x2("(?:‚ +|‚¢+){2}", "‚ ‚ ‚ ‚¢‚¢‚¢", 0, 12); + x2("(?:‚ +|‚¢+){1,2}", "‚ ‚ ‚ ‚¢‚¢‚¢", 0, 12); + x2("(?:‚ +|\\A‚¢*)‚¤‚¤", "‚¤‚¤", 0, 4); + n("(?:‚ +|\\A‚¢*)‚¤‚¤", "‚ ‚¢‚¤‚¤"); + x2("(?:^‚ +|‚¢+)*‚¤", "‚ ‚ ‚¢‚¢‚¢‚ ‚¢‚¤", 12, 16); + x2("(?:^‚ +|‚¢+)*‚¤", "‚ ‚ ‚¢‚¢‚¢‚¢‚¤", 0, 14); + x2("‚¤{0,}", "‚¤‚¤‚¤‚¤", 0, 8); + x2("‚ |(?i)c", "C", 0, 1); + x2("(?i)c|‚ ", "C", 0, 1); + x2("(?i:‚ )|a", "a", 0, 1); + n("(?i:‚ )|a", "A"); + x2("[‚ ‚¢‚¤]?", "‚ ‚¢‚¤", 0, 2); + x2("[‚ ‚¢‚¤]*", "‚ ‚¢‚¤", 0, 6); + x2("[^‚ ‚¢‚¤]*", "‚ ‚¢‚¤", 0, 0); + n("[^‚ ‚¢‚¤]+", "‚ ‚¢‚¤"); + x2("‚ ?\?", "‚ ‚ ‚ ", 0, 0); + x2("‚¢‚ ?\?‚¢", "‚¢‚ ‚¢", 0, 6); + x2("‚ *?", "‚ ‚ ‚ ", 0, 0); + x2("‚¢‚ *?", "‚¢‚ ‚ ", 0, 2); + x2("‚¢‚ *?‚¢", "‚¢‚ ‚ ‚¢", 0, 8); + x2("‚ +?", "‚ ‚ ‚ ", 0, 2); + x2("‚¢‚ +?", "‚¢‚ ‚ ", 0, 4); + x2("‚¢‚ +?‚¢", "‚¢‚ ‚ ‚¢", 0, 8); + x2("(?:“V?)?\?", "“V", 0, 0); + x2("(?:“V?\?)?", "“V", 0, 0); + x2("(?:–²?)+?", "–²–²–²", 0, 2); + x2("(?:•—+)?\?", "•—•—•—", 0, 0); + x2("(?:á+)?\?‘š", "ááᑚ", 0, 8); + x2("(?:‚ ‚¢)?{2}", "", 0, 0); + x2("(?:‹SŽÔ)?{2}", "‹SŽÔ‹SŽÔ‹S", 0, 8); + x2("(?:‹SŽÔ)*{0}", "‹SŽÔ‹SŽÔ‹S", 0, 0); + x2("(?:‹SŽÔ){3,}", "‹SŽÔ‹SŽÔ‹SŽÔ‹SŽÔ", 0, 16); + n("(?:‹SŽÔ){3,}", "‹SŽÔ‹SŽÔ"); + x2("(?:‹SŽÔ){2,4}", "‹SŽÔ‹SŽÔ‹SŽÔ", 0, 12); + x2("(?:‹SŽÔ){2,4}", "‹SŽÔ‹SŽÔ‹SŽÔ‹SŽÔ‹SŽÔ", 0, 16); + x2("(?:‹SŽÔ){2,4}?", "‹SŽÔ‹SŽÔ‹SŽÔ‹SŽÔ‹SŽÔ", 0, 8); + x2("(?:‹SŽÔ){,}", "‹SŽÔ{,}", 0, 7); + x2("(?:‚©‚«‚­)+?{2}", "‚©‚«‚­‚©‚«‚­‚©‚«‚­", 0, 12); + x3("(‰Î)", "‰Î", 0, 2, 1); + x3("(‰Î…)", "‰Î…", 0, 4, 1); + x2("((ŽžŠÔ))", "ŽžŠÔ", 0, 4); + x3("((•—…))", "•—…", 0, 4, 1); + x3("((ð“ú))", "ð“ú", 0, 4, 2); + x3("((((((((((((((((((((—ÊŽq))))))))))))))))))))", "—ÊŽq", 0, 4, 20); + x3("(‚ ‚¢)(‚¤‚¦)", "‚ ‚¢‚¤‚¦", 0, 4, 1); + x3("(‚ ‚¢)(‚¤‚¦)", "‚ ‚¢‚¤‚¦", 4, 8, 2); + x3("()(‚ )‚¢‚¤(‚¦‚¨‚©)‚«‚­‚¯‚±", "‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±", 6, 12, 3); + x3("(()(‚ )‚¢‚¤(‚¦‚¨‚©)‚«‚­‚¯‚±)", "‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±", 6, 12, 4); + x3(".*(ƒtƒH)ƒ“Eƒ}(ƒ“()ƒVƒ…ƒ^)ƒCƒ“", "ƒtƒHƒ“Eƒ}ƒ“ƒVƒ…ƒ^ƒCƒ“", 10, 18, 2); + x2("(^‚ )", "‚ ", 0, 2); + x3("(‚ )|(‚ )", "‚¢‚ ", 2, 4, 1); + x3("(^‚ )|(‚ )", "‚¢‚ ", 2, 4, 2); + x3("(‚ ?)", "‚ ‚ ‚ ", 0, 2, 1); + x3("(‚Ü*)", "‚܂܂Ü", 0, 6, 1); + x3("(‚Æ*)", "", 0, 0, 1); + x3("(‚é+)", "‚é‚é‚é‚é‚é‚é‚é", 0, 14, 1); + x3("(‚Ó+|‚Ö*)", "‚Ó‚Ó‚Ó‚Ö‚Ö", 0, 6, 1); + x3("(‚ +|‚¢?)", "‚¢‚¢‚¢‚ ‚ ", 0, 2, 1); + x3("(‚ ‚¢‚¤)?", "‚ ‚¢‚¤", 0, 6, 1); + x3("(‚ ‚¢‚¤)*", "‚ ‚¢‚¤", 0, 6, 1); + x3("(‚ ‚¢‚¤)+", "‚ ‚¢‚¤", 0, 6, 1); + x3("(‚³‚µ‚·|‚ ‚¢‚¤)+", "‚ ‚¢‚¤", 0, 6, 1); + x3("([‚ȂɂÊ][‚©‚«‚­]|‚©‚«‚­)+", "‚©‚«‚­", 0, 6, 1); + x3("((?i:‚ ‚¢‚¤))", "‚ ‚¢‚¤", 0, 6, 1); + x3("((?m:‚ .‚¤))", "‚ \n‚¤", 0, 5, 1); + x3("((?=‚ ‚ñ)‚ )", "‚ ‚ñ‚¢", 0, 2, 1); + x3("‚ ‚¢‚¤|(.‚ ‚¢‚¦)", "‚ñ‚ ‚¢‚¦", 0, 8, 1); + x3("‚ *(.)", "‚ ‚ ‚ ‚ ‚ñ", 8, 10, 1); + x3("‚ *?(.)", "‚ ‚ ‚ ‚ ‚ñ", 0, 2, 1); + x3("‚ *?(‚ñ)", "‚ ‚ ‚ ‚ ‚ñ", 8, 10, 1); + x3("[‚¢‚¤‚¦]‚ *(.)", "‚¦‚ ‚ ‚ ‚ ‚ñ", 10, 12, 1); + x3("(\\A‚¢‚¢)‚¤‚¤", "‚¢‚¢‚¤‚¤", 0, 4, 1); + n("(\\A‚¢‚¢)‚¤‚¤", "‚ñ‚¢‚¢‚¤‚¤"); + x3("(^‚¢‚¢)‚¤‚¤", "‚¢‚¢‚¤‚¤", 0, 4, 1); + n("(^‚¢‚¢)‚¤‚¤", "‚ñ‚¢‚¢‚¤‚¤"); + x3("‚ë‚ë(‚é‚é$)", "‚ë‚ë‚é‚é", 4, 8, 1); + n("‚ë‚ë(‚é‚é$)", "‚ë‚ë‚é‚é‚é"); + x2("(–³)\\1", "–³–³", 0, 4); + n("(–³)\\1", "–³•"); + x2("(‹ó?)\\1", "‹ó‹ó", 0, 4); + x2("(‹ó?\?)\\1", "‹ó‹ó", 0, 0); + x2("(‹ó*)\\1", "‹ó‹ó‹ó‹ó‹ó", 0, 8); + x3("(‹ó*)\\1", "‹ó‹ó‹ó‹ó‹ó", 0, 4, 1); + x2("‚ (‚¢*)\\1", "‚ ‚¢‚¢‚¢‚¢", 0, 10); + x2("‚ (‚¢*)\\1", "‚ ‚¢", 0, 2); + x2("(‚ *)(‚¢*)\\1\\2", "‚ ‚ ‚ ‚¢‚¢‚ ‚ ‚ ‚¢‚¢", 0, 20); + x2("(‚ *)(‚¢*)\\2", "‚ ‚ ‚ ‚¢‚¢‚¢‚¢", 0, 14); + x3("(‚ *)(‚¢*)\\2", "‚ ‚ ‚ ‚¢‚¢‚¢‚¢", 6, 10, 2); + x2("(((((((‚Û*)‚Ø))))))‚Ò\\7", "‚ۂۂۂ؂҂ۂۂÛ", 0, 16); + x3("(((((((‚Û*)‚Ø))))))‚Ò\\7", "‚ۂۂۂ؂҂ۂۂÛ", 0, 6, 7); + x2("(‚Í)(‚Ð)(‚Ó)\\2\\1\\3", "‚͂ЂӂЂ͂Ó", 0, 12); + x2("([‚«-‚¯])\\1", "‚­‚­", 0, 4); + x2("(\\w\\d\\s)\\1", "‚ 5 ‚ 5 ", 0, 8); + n("(\\w\\d\\s)\\1", "‚ 5 ‚ 5"); + x2("(’NH|[‚ -‚¤]{3})\\1", "’NH’NH", 0, 8); + x2("...(’NH|[‚ -‚¤]{3})\\1", "‚ a‚ ’NH’NH", 0, 13); + x2("(’NH|[‚ -‚¤]{3})\\1", "‚¤‚¢‚¤‚¤‚¢‚¤", 0, 12); + x2("(^‚±)\\1", "‚±‚±", 0, 4); + n("(^‚Þ)\\1", "‚߂ނÞ"); + n("(‚ $)\\1", "‚ ‚ "); + n("(‚ ‚¢\\Z)\\1", "‚ ‚¢"); + x2("(‚ *\\Z)\\1", "‚ ", 2, 2); + x2(".(‚ *\\Z)\\1", "‚¢‚ ", 2, 4); + x3("(.(‚â‚¢‚ä)\\2)", "z‚â‚¢‚ä‚â‚¢‚ä", 0, 13, 1); + x3("(.(..\\d.)\\2)", "‚ 12341234", 0, 10, 1); + x2("((?i:‚ v‚¸))\\1", "‚ v‚¸‚ v‚¸", 0, 10); + x2("(?<‹ð‚©>•Ï|\\(\\g<‹ð‚©>\\))", "((((((•Ï))))))", 0, 14); + x2("\\A(?:\\g<ˆ¢_1>|\\g<‰]_2>|\\zI—¹ (?<ˆ¢_1>ŠÏ|Ž©\\g<‰]_2>Ž©)(?<‰]_2>Ý|•ìŽF\\g<ˆ¢_1>•ìŽF))$", "•ìŽFŽ©•ìŽFŽ©ÝŽ©•ìŽFŽ©•ìŽF", 0, 26); + x2("[[‚ЂÓ]]", "‚Ó", 0, 2); + x2("[[‚¢‚¨‚¤]‚©]", "‚©", 0, 2); + n("[[^‚ ]]", "‚ "); + n("[^[‚ ]]", "‚ "); + x2("[^[^‚ ]]", "‚ ", 0, 2); + x2("[[‚©‚«‚­]&&‚«‚­]", "‚­", 0, 2); + n("[[‚©‚«‚­]&&‚«‚­]", "‚©"); + n("[[‚©‚«‚­]&&‚«‚­]", "‚¯"); + x2("[‚ -‚ñ&&‚¢-‚ð&&‚¤-‚ï]", "‚ï", 0, 2); + n("[^‚ -‚ñ&&‚¢-‚ð&&‚¤-‚ï]", "‚ï"); + x2("[[^‚ &&‚ ]&&‚ -‚ñ]", "‚¢", 0, 2); + n("[[^‚ &&‚ ]&&‚ -‚ñ]", "‚ "); + x2("[[^‚ -‚ñ&&‚¢‚¤‚¦‚¨]&&[^‚¤-‚©]]", "‚«", 0, 2); + n("[[^‚ -‚ñ&&‚¢‚¤‚¦‚¨]&&[^‚¤-‚©]]", "‚¢"); + x2("[^[^‚ ‚¢‚¤]&&[^‚¤‚¦‚¨]]", "‚¤", 0, 2); + x2("[^[^‚ ‚¢‚¤]&&[^‚¤‚¦‚¨]]", "‚¦", 0, 2); + n("[^[^‚ ‚¢‚¤]&&[^‚¤‚¦‚¨]]", "‚©"); + x2("[‚ -&&-‚ ]", "-", 0, 1); + x2("[^[^a-z‚ ‚¢‚¤]&&[^bcdefg‚¤‚¦‚¨]q-w]", "‚¦", 0, 2); + x2("[^[^a-z‚ ‚¢‚¤]&&[^bcdefg‚¤‚¦‚¨]g-w]", "f", 0, 1); + x2("[^[^a-z‚ ‚¢‚¤]&&[^bcdefg‚¤‚¦‚¨]g-w]", "g", 0, 1); + n("[^[^a-z‚ ‚¢‚¤]&&[^bcdefg‚¤‚¦‚¨]g-w]", "2"); + x2("aƒo[ƒWƒ‡ƒ“‚̃_ƒEƒ“ƒ[ƒh<\\/b>", "aƒo[ƒWƒ‡ƒ“‚̃_ƒEƒ“ƒ[ƒh", 0, 32); + x2(".ƒo[ƒWƒ‡ƒ“‚̃_ƒEƒ“ƒ[ƒh<\\/b>", "aƒo[ƒWƒ‡ƒ“‚̃_ƒEƒ“ƒ[ƒh", 0, 32); + fprintf(stdout, + "\nRESULT SUCC: %d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n", + nsucc, nfail, nerror, onig_version()); + +#ifndef POSIX_TEST + onig_region_free(region, 1); + onig_end(); +#endif + + return ((nfail == 0 && nerror == 0) ? 0 : -1); +} diff --git a/internal/distrogen/README.md b/internal/distrogen/README.md new file mode 100644 index 0000000000..523f6b3ace --- /dev/null +++ b/internal/distrogen/README.md @@ -0,0 +1,127 @@ +# distrogen + +This tool generates OpenTelemetry Collector distributions. + +* Generates distributions from a simple yaml spec +* Features a full set of robust templates that most distributions will use +* Features a registry for all `opentelemetry-collector` and `opentelemetry-collector-contrib` components +* Allows you to provide your own templates and registry to build custom collectors that work for your use case + +## Usage + +Given a spec file such as: +```yaml +name: basic-distro +display_name: Basic OTel +version: 0.121.0 +description: "A basic distribution of the OpenTelemetry Collector" +blurb: "A basic collector distro" +opentelemetry_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +binary_name: otelcol-basic +collector_cgo: false +go_version: 1.24.0 + +docker_repo: us-docker.pkg.dev/pretend-repo/otelcol-basic + +components: + receivers: + - otlp + processors: + - batch + - memorylimiter + exporters: + - otlp + extensions: + - pprof + connectors: + - forward + providers: + - yaml +``` +Run `distrogen generate` with your spec: +``` +distrogen generate --spec spec.yaml +``` +It will generate a `basic-distro` directory. In that directory you can run `make build` to build a binary, or `make image-build` to build a binary as well as the resulting Docker container. + +## Custom Registries + +`distrogen` comes with a [registry embedded in the binary](./registry.yaml) that contains all [opentelemetry-collector](https://github.com/open-telemetry/opentelemetry-collector/blob/main/versions.yaml) and [opentelemetry-collector-contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/versions.yaml) components. If you would like to provide components in other locations (local or in other repositories) you can provide your own registry files that will get merged with the embedded registry. If you provide any components with the same name, the component from your custom registry will override the entry in the embedded registry. + +You can provide the following custom registry: +```yaml +receivers: + # Provide an entry for a custom receiver + custom: + gomod: github.com/my-org/my-components/receiver/customreceiver v0.0.0 + docs_url: github.com/my-org/my-components/tree/main/receiver/customreceiver/README.md + +processors: + # Provide an entry that overwrites resourcedetection from the + # embedded registry with a local copy. + resourcedetection: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor + # The local path to the receiver based on the distribution + # directory generated by distrogen. + path: "../processor/resourcedetectionprocessor" + docs_url: ../processor/resourcedetectionprocessor/README.md +``` +And reference the component in your spec: +```yaml +name: basic-distro +display_name: Basic OTel +version: 0.121.0 +description: "A basic distribution of the OpenTelemetry Collector" +blurb: "A basic collector distro" +opentelemetry_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +binary_name: otelcol-basic +collector_cgo: false +go_version: 1.24.0 + +docker_repo: us-docker.pkg.dev/pretend-repo/otelcol-basic + +components: + receivers: + - otlp + - custom + processors: + - batch + - memorylimiter + - resourcedetection + exporters: + - otlp + extensions: + - pprof + connectors: + - forward + providers: + - yaml +``` +And finally, provide any number of registries to `distrogen` when generating: +``` +distrogen generate --spec spec.yaml --registry registry.yaml # --registry another_registry.yaml to provide another +``` + +## Custom Templates + +`distrogen` comes with a [sane set of templates embedded in the binary](./templates). These templates are rendered using the [a `TemplateContext` type as the context](./distribution.go). + +If you want to provide additional templates, or you wish to override one of the templates provided by `distrogen`, you can provide a folder of your own templates. These templates must be named with a `.go.tmpl` extension to be recognized by the tool. If any templates in your custom folder have the same name/path as one of the templates embedded in `distrogen`, your custom template will override it. Custom templates will be rendered using the same `TemplateContext` type as the context. + +Given a directory like this: +``` +-rw-r----- 1 user user 1801 Mar 19 01:37 config.yaml.go.tmpl +-rw-r----- 1 user user 1726 Mar 20 01:54 Dockerfile.alternate.go.tmpl +drwxr-x--- 3 user user 4096 Mar 20 00:07 docs +-rw-r----- 1 user user 300 Mar 20 01:49 local.mk.go.tmpl +``` +* `local.mk.go.tmpl` and `Dockerfile.alternate.go.tmpl` are new additional templates, and will be rendered along with the default templates +* `config.yaml.go.tmpl` matches the name of `config.yaml.go.tmpl` from the embedded template set, so the custom directory will be chosen instead +* `docs` is a directory with more templates, which will be rendered in the distribution folder with the same structure as they are in the template folder + +Provide your custom template directory to `distrogen`: +``` +distrogen generate --spec spec.yaml --templates ./templates +``` \ No newline at end of file diff --git a/internal/distrogen/component.go b/internal/distrogen/component.go new file mode 100644 index 0000000000..206f702646 --- /dev/null +++ b/internal/distrogen/component.go @@ -0,0 +1,113 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "errors" + "fmt" + "io/fs" + "os" + "path/filepath" +) + +var errInvalidComponentType = errors.New("invalid component type") + +type ComponentGenerator struct { + Spec *DistributionSpec + FileMode fs.FileMode + + Type ComponentType + Name string + Path string + ModuleURL string +} + +func NewComponentGenerator(spec *DistributionSpec, componentType ComponentType, componentName string) (*ComponentGenerator, error) { + if spec.ComponentModuleBase == "" { + return nil, errors.New("must supply a component_module_base in spec") + } + + g := &ComponentGenerator{ + Spec: spec, + FileMode: DefaultProjectFileMode, + Type: componentType, + Name: componentName, + } + + switch componentType { + case Receiver: + fallthrough + case Processor: + fallthrough + case Exporter: + fallthrough + case Connector: + fallthrough + case Extension: + fallthrough + case Provider: + g.Path = filepath.Join( + "components", + string(componentType), + fmt.Sprintf("%s%s", componentName, componentType), + ) + + default: + return nil, fmt.Errorf("%w: %s", errInvalidComponentType, componentType) + } + + g.ModuleURL = fmt.Sprintf("%s/%s", spec.Module, g.Path) + + return g, nil +} + +func (g *ComponentGenerator) Generate() error { + componentTemplates, err := GetIndividualComponentTemplateSet(g, g.FileMode) + if err != nil { + return err + } + + if err := os.MkdirAll(g.Path, g.FileMode); err != nil { + return err + } + + if err := GenerateTemplateSet(g.Path, componentTemplates); err != nil { + return err + } + + registryPath := componentRegistryPath + registry, err := LoadRegistry(registryPath) + if err != nil { + if !os.IsNotExist(err) { + return err + } + registry = NewRegistry() + registry.Path = registryPath + } + + registry.Add(g.Type, &RegistryComponent{ + GoMod: &GoModuleID{ + URL: g.ModuleURL, + AllowBlankTag: true, + }, + Name: g.Name, + Path: "../" + g.Path, + }) + if err := registry.Save(); err != nil { + return err + } + + return nil +} diff --git a/internal/distrogen/components_registry_generator.go b/internal/distrogen/components_registry_generator.go new file mode 100644 index 0000000000..e57a054c57 --- /dev/null +++ b/internal/distrogen/components_registry_generator.go @@ -0,0 +1,71 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "errors" + "io/fs" + "os" + "path/filepath" +) + +var componentRegistryPath = filepath.Join("components", "registry.yaml") + +type ComponentsRegistryGenerator struct { + FileMode fs.FileMode + + Path string +} + +func NewComponentsRegistryGenerator() *ComponentsRegistryGenerator { + g := &ComponentsRegistryGenerator{ + FileMode: DefaultProjectFileMode, + Path: ".", + } + return g +} + +// The component registry is for custom components built within this repository. +// Upstream components are managed in the internal registry at cmd/distrogen/registry.yaml. +func (g *ComponentsRegistryGenerator) Generate() error { + registry := NewRegistry() + + generateComponentsPath := filepath.Join(g.Path, "components") + registry.Path = filepath.Join(generateComponentsPath, "registry.yaml") + + var dirErrors []error + if err := os.MkdirAll(generateComponentsPath, g.FileMode); err != nil { + dirErrors = append(dirErrors, err) + } + + if len(dirErrors) > 0 { + return errors.Join(dirErrors...) + } + + if err := registry.Save(); err != nil { + return err + } + + templates, err := GetComponentsTemplateSet(g, g.FileMode) + if err != nil { + return err + } + + if err := GenerateTemplateSet(generateComponentsPath, templates); err != nil { + logger.Debug("failed to get component templates", "err", err) + return err + } + return nil +} diff --git a/internal/distrogen/distribution.go b/internal/distrogen/distribution.go new file mode 100644 index 0000000000..abcd14233c --- /dev/null +++ b/internal/distrogen/distribution.go @@ -0,0 +1,520 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "errors" + "fmt" + "io/fs" + "os" + "path/filepath" + "reflect" + "strings" + + "github.com/google/go-cmp/cmp" +) + +var ErrNoDiff = errors.New("no differences found with previous generation") + +// -rw-r--r-- +var DefaultFileMode fs.FileMode = 0644 + +type BuildContainerOption string + +const ( + Alpine BuildContainerOption = "alpine" + Debian BuildContainerOption = "debian" +) + +// DistributionSpec is the specification for a new OpenTelemetry Collector distribution. +// It contains all the information that will be formatted into the default set of +// templates/user provided templates. +type DistributionSpec struct { + Path string `yaml:"-"` + Name string `yaml:"name"` + Module string `yaml:"module"` + DisplayName string `yaml:"display_name"` + Description string `yaml:"description"` + Blurb string `yaml:"blurb"` + BuildContainer BuildContainerOption `yaml:"build_container"` + Version string `yaml:"version"` + OpenTelemetryVersion string `yaml:"opentelemetry_version"` + OpenTelemetryContribVersion string `yaml:"opentelemetry_contrib_version"` + OpenTelemetryStableVersion string `yaml:"opentelemetry_stable_version"` + GoVersion string `yaml:"go_version"` + BinaryName string `yaml:"binary_name"` + BuildTags string `yaml:"build_tags"` + BoringCrypto bool `yaml:"boringcrypto"` + DockerRepo string `yaml:"docker_repo"` + Components *DistributionComponents `yaml:"components"` + Replaces ComponentReplaces `yaml:"replaces,omitempty"` + CustomValues map[string]any `yaml:"custom_values,omitempty"` + FeatureGates FeatureGates `yaml:"feature_gates,omitempty"` + GoProxy string `yaml:"go_proxy,omitempty"` + + // CollectorCGO determines whether the Collector will be built with CGO. + CollectorCGO bool `yaml:"collector_cgo,omitempty"` + ComponentModuleBase string `yaml:"component_module_base"` + DistrogenVersion string `yaml:"distrogen_version"` +} + +// RenderGoMajorVersion will parse the GoVersion in the spec and return a version without a patch +func (s *DistributionSpec) RenderGoMajorVersion() string { + split := strings.Split(s.GoVersion, ".") + if len(split) < 2 { + return s.GoVersion + } + return fmt.Sprintf("%s.%s", split[0], split[1]) +} + +// Diff will compare two different DistributionSpecs. +func (s *DistributionSpec) Diff(s2 *DistributionSpec) bool { + diff := cmp.Diff(s, s2) + return diff != "" +} + +var ErrQueryValueNotFound = errors.New("not found in spec") +var ErrQueryValueInvalid = errors.New("found in spec but unsupported type") + +// Query will get a field from a loaded spec based on the yaml +// field name. +func (s *DistributionSpec) Query(field string) (string, error) { + v := reflect.ValueOf(s).Elem() + t := v.Type() + + for i := 0; i < t.NumField(); i++ { + structField := t.Field(i) + yamlTag := structField.Tag.Get("yaml") + + // Handle tags like "replaces,omitempty" + tagName := strings.Split(yamlTag, ",")[0] + + if tagName == field { + fieldValue := v.Field(i) + // Convert the field value to string. + // This handles basic types like string, int, bool. + if fieldValue.IsValid() && fieldValue.CanInterface() { + return fmt.Sprintf("%v", fieldValue.Interface()), nil + } + return "", fmt.Errorf("field '%s': %w", field, ErrQueryValueInvalid) + } + } + return "", fmt.Errorf("field '%s': %w", field, ErrQueryValueNotFound) +} + +var ( + ErrSpecValidationBoringCryptoWithoutCGO = errors.New("boringcrypto build is not possible with collector_cgo turned off") + ErrSpecValidationBoringCryptoWithoutDebian = errors.New("boringcrypto is only possible with the debian build container") +) + +// NewDistributionSpec loads the DistributionSpec from a yaml file. +func NewDistributionSpec(path string) (*DistributionSpec, error) { + spec, err := yamlUnmarshalFromFile[DistributionSpec](path) + if err != nil { + return nil, err + } + + if spec.BuildContainer == "" { + spec.BuildContainer = Debian + } + + // If BoringCrypto is set, CGO must be enabled and only the debian + // build container can be used. + if spec.BoringCrypto { + // If CGO was manually set to false in the config, return a validation error. + if !spec.CollectorCGO { + return nil, ErrSpecValidationBoringCryptoWithoutCGO + } + // If build container is manually set to something other than debian, return a validation error. + if spec.BuildContainer != Debian { + return nil, fmt.Errorf("%w, build_container was set to %s", ErrSpecValidationBoringCryptoWithoutDebian, spec.BuildContainer) + } + } + + // The name of the spec.yaml file might be different from the binary name + spec.Path = filepath.Base(path) + + // It is a rare case where the contrib version falls out of sync with + // the canonical OpenTelemetry version, most of the time it is the same. + if spec.OpenTelemetryContribVersion == "" { + spec.OpenTelemetryContribVersion = spec.OpenTelemetryVersion + } + + return spec, nil +} + +// DistributionComponents is a set of components with RegistryComponent names +// that defines all the components included in this collector distribution. +type DistributionComponents struct { + Receivers []string `yaml:"receivers,omitempty"` + Processors []string `yaml:"processors,omitempty"` + Exporters []string `yaml:"exporters,omitempty"` + Connectors []string `yaml:"connectors,omitempty"` + Extensions []string `yaml:"extensions,omitempty"` + Providers []string `yaml:"providers,omitempty"` +} + +// DistributionGenerator contains all the facilities to generate a distribution +// from a DistributionSpec. +type DistributionGenerator struct { + Spec *DistributionSpec + GenerateDirName string + GeneratePath string + Registry *Registry + CustomTemplatesDir fs.FS + FileMode fs.FileMode +} + +// NewDistributionGenerator creates a DistributionGenerator. +func NewDistributionGenerator(spec *DistributionSpec, registry *Registry, forceGenerate bool) (*DistributionGenerator, error) { + d := DistributionGenerator{ + Spec: spec, + Registry: registry, + // -rw-r--r-- + FileMode: DefaultFileMode, + } + d.GenerateDirName = spec.Name + + if !forceGenerate { + specCache, err := yamlUnmarshalFromFile[DistributionSpec](filepath.Join(d.GenerateDirName, "spec.yaml")) + if err != nil { + logger.Debug(fmt.Sprintf("generated spec could not be read: %v", err)) + if !os.IsNotExist(err) { + return nil, err + } + } else { + if !d.Spec.Diff(specCache) { + return nil, ErrNoDiff + } + } + } + + tmpDir, err := os.MkdirTemp(".", d.GenerateDirName) + if err != nil { + return nil, err + } + d.GeneratePath = tmpDir + return &d, nil +} + +// Generate will generate the distribution. It will generate the distribution +// in a temporary local directory, and upon there no errors in the generation +// will move it into the destination path. +func (d *DistributionGenerator) Generate() error { + templateContext, err := NewTemplateContextFromSpec(d.Spec, d.Registry) + if err != nil { + return err + } + templates, err := GetDistributionTemplateSet(templateContext, d.FileMode) + if err != nil { + return err + } + + if d.CustomTemplatesDir != nil { + customTemplates, err := GetTemplateSetFromDir(d.CustomTemplatesDir, templateContext, d.FileMode) + if err != nil { + return err + } + + // This merge means that any custom templates named the same as the embedded + // defaults will overwrite the embedded version with the custom version. + mapMerge(templates, customTemplates) + } + + templates.RenameExceptionalTemplates(d.Spec) + for _, tmpl := range templates { + if err := tmpl.Render(d.GeneratePath); err != nil { + return err + } + } + if err := d.WriteSpec(); err != nil { + return err + } + + return nil +} + +// WriteSpec renders the DistributionSpec in a yaml file that lives in the generated +// distribution. This is a human readable way to keep track of what spec was used for +// this existing generation, as well as a method of detecting whether a new generation +// needs to be done at all (if no spec changes no need to generate). +func (d *DistributionGenerator) WriteSpec() error { + return yamlMarshalToFile(d.Spec, filepath.Join(d.GeneratePath, "spec.yaml"), d.FileMode) +} + +// MoveGeneratedDirToWd performs the final step of the generation, moving the generated temp +// directory to the destination path. It tries to do this in a way where nothing is destroyed +// until everything is confirmed to work. +func (d *DistributionGenerator) MoveGeneratedDirToWd() (err error) { + wd, err := os.Getwd() + if err != nil { + return err + } + + generateDest := filepath.Join(wd, d.GenerateDirName) + bkpPath := generateDest + "-bkp" + + // Check if the distribution directory exists, rename it to backup + // if it does. + if _, err := os.Open(generateDest); err == nil { + if err := os.Rename(generateDest, bkpPath); err != nil { + return err + } + + // Delete the backup. Sets the named `err` return value + // if removal of backup fails. + defer func() { + err = os.RemoveAll(bkpPath) + }() + } + + // Move generated directory to working directory. + if err := os.Rename(d.GeneratePath, generateDest); err != nil { + return err + } + + return nil +} + +type generatedFile struct { + path string + content string + checked bool +} + +var ErrDistroFolderDoesNotExist = errors.New("distribution folder not generated") +var ErrDistroFolderDiff = errors.New("existing distro folder differs from generation") + +// Compare will deeply compare the newly generated distro against the existing one. +func (d *DistributionGenerator) Compare() error { + wd, err := os.Getwd() + if err != nil { + return fmt.Errorf("could not get working directory: %w", err) + } + + _, err = os.Stat(d.GeneratePath) + if err != nil { + if os.IsNotExist(err) { + panic(fmt.Sprintf("generated directory %s does not exist, if you see this it's a code error in distrogen", d.GeneratePath)) + } + return wrapExitCodeError( + unexpectErrExitCode, + fmt.Errorf("could not stat generated directory: %w", err), + ) + } + generateDest := filepath.Join(wd, d.GenerateDirName) + + _, err = os.Stat(generateDest) + if err != nil { + if os.IsNotExist(err) { + return fmt.Errorf("%w: %s", ErrDistroFolderDoesNotExist, generateDest) + } + return wrapExitCodeError( + unexpectErrExitCode, + fmt.Errorf("could not stat existing distro directory: %w", err), + ) + } + + logger.Debug("comparing ", d.GeneratePath, generateDest) + + generatedContent, err := d.getGeneratedFilesInDir(d.GeneratePath) + if err != nil { + return wrapExitCodeError( + unexpectErrExitCode, + fmt.Errorf("could not get generated files: %w", err), + ) + } + existingContent, err := d.getGeneratedFilesInDir(generateDest) + if err != nil { + return wrapExitCodeError( + unexpectErrExitCode, + fmt.Errorf("could not get existing files: %w", err), + ) + } + + errs := make(CollectionError) + for name, existingFile := range existingContent { + generatedFile, ok := generatedContent[name] + if !ok { + errs[name] = fmt.Errorf("existing file not found in generated distribution") + continue + } + existingFile.checked = true + generatedFile.checked = true + diff := cmp.Diff(existingFile.content, generatedFile.content) + if diff != "" { + errs[name] = fmt.Errorf("existing file differs from generated distribution:\n%s", diff) + } + } + + for name, generatedFile := range generatedContent { + if !generatedFile.checked { + errs[name] = fmt.Errorf("generated file not found in existing distribution") + } + } + + if len(errs) > 0 { + return fmt.Errorf("%s: %w:\n\n%v", d.Spec.Name, ErrDistroFolderDiff, errs) + } + + return nil +} + +func (dg *DistributionGenerator) getGeneratedFilesInDir(dir string) (map[string]*generatedFile, error) { + files := map[string]*generatedFile{} + + err := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error { + if err != nil { + return err + } + + if d.IsDir() { + return nil + } + + // Don't include .tools directory in comparison. + if strings.Contains(path, "/.tools/") { + return nil + } + + if d.Name() == dg.Spec.BinaryName { + return nil + } + + content, err := os.ReadFile(path) + if err != nil { + return err + } + files[d.Name()] = &generatedFile{ + path: path, + content: string(content), + } + return nil + }) + + return files, err +} + +// Clean will remove the temporary directory used for generation. +func (d *DistributionGenerator) Clean() { + if err := os.RemoveAll(d.GeneratePath); err != nil && !os.IsNotExist(err) { + logger.Error("failed to clean generated directory", "err", err) + } +} + +// TemplateContext is the context that will be passed into any default or user +// provided templates. +type TemplateContext struct { + *DistributionSpec + + Receivers RegistryComponents + Processors RegistryComponents + Exporters RegistryComponents + Extensions RegistryComponents + Connectors RegistryComponents + Providers RegistryComponents + + SystemdServiceName string + SystemdConfFileName string +} + +// NewTemplateContextFromSpec creates a TemplateContext from a DistributionSpec and a Registry. +// It is expected that this registry will be already merged with the registries provided by the +// user. +func NewTemplateContextFromSpec(spec *DistributionSpec, registry *Registry) (*TemplateContext, error) { + context := TemplateContext{DistributionSpec: spec} + + otelVersion := otelComponentVersion{ + core: spec.OpenTelemetryVersion, + coreStable: spec.OpenTelemetryStableVersion, + contrib: spec.OpenTelemetryContribVersion, + } + + errs := make(CollectionError) + var err CollectionError + context.Receivers, err = registry.Receivers.LoadAllComponents(spec.Components.Receivers, otelVersion) + mapMerge(errs, err) + context.Processors, err = registry.Processors.LoadAllComponents(spec.Components.Processors, otelVersion) + mapMerge(errs, err) + context.Exporters, err = registry.Exporters.LoadAllComponents(spec.Components.Exporters, otelVersion) + mapMerge(errs, err) + context.Connectors, err = registry.Connectors.LoadAllComponents(spec.Components.Connectors, otelVersion) + mapMerge(errs, err) + context.Extensions, err = registry.Extensions.LoadAllComponents(spec.Components.Extensions, otelVersion) + mapMerge(errs, err) + context.Providers, err = registry.Providers.LoadAllComponents(spec.Components.Providers, otelVersion) + mapMerge(errs, err) + + context.SystemdServiceName = spec.BinaryName + ".service" + context.SystemdConfFileName = spec.BinaryName + ".conf" + + if len(errs) > 0 { + return nil, errs + } + return &context, nil +} + +// FeatureGates is a list of feature gate names to enable in a +// collector. +type FeatureGates []string + +// Render will render the feature gates in a comma separated list. +func (fgs FeatureGates) Render() string { + // This case should never come up in template rendering, + // but it's here as a backup in case. + if len(fgs) == 0 { + return "" + } + + gates := "" + for i, fg := range fgs { + gates += fg + if i < len(fgs)-1 { + gates += "," + } + } + return gates +} + +// ComponentReplace is a Go module replacement that will be +// rendered into the OCB manifest. +type ComponentReplace struct { + From *GoModuleID `yaml:"from"` + To *GoModuleID `yaml:"to"` + Reason string `yaml:"reason"` +} + +// String renders the component replace for an OCB manifest. +func (r *ComponentReplace) String() string { + r.From.AllowBlankTag = true + r.To.AllowBlankTag = true + // This is pretty awkward and it would be nice to implement yaml.Marshaler + // on here instead, but this was the only nice way I could find to render + // the Reason field as a comment above the replacement entry. + return fmt.Sprintf("# %s\n- %s => %s", r.Reason, r.From, r.To) +} + +// ComponentReplaces is a collection of component replacements. +type ComponentReplaces []*ComponentReplace + +// Render renders the component replaces all at once +// for an OCB manifest. +func (rs ComponentReplaces) Render() string { + result := "" + for _, r := range rs { + result += fmt.Sprintf("%s\n", r) + } + return result +} diff --git a/internal/distrogen/distribution_test.go b/internal/distrogen/distribution_test.go new file mode 100644 index 0000000000..942f975fc8 --- /dev/null +++ b/internal/distrogen/distribution_test.go @@ -0,0 +1,114 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "os" + "path/filepath" + "testing" + + "gotest.tools/v3/assert" +) + +var ( + testdataSubpath = filepath.Join("generator", "distribution") + testdataFullDistributionPath = filepath.Join("testdata", "generator", "distribution") +) + +func TestDistributionTemplateGeneration(t *testing.T) { + registry, err := LoadEmbeddedRegistry() + assert.NilError(t, err) + + testDirs, err := os.ReadDir(testdataFullDistributionPath) + assert.NilError(t, err) + for _, d := range testDirs { + if !d.IsDir() { + continue + } + + name := d.Name() + t.Run(name, func(t *testing.T) { + testGeneratorCase(t, registry, name) + }) + } +} + +func testGeneratorCase(t *testing.T, registry *Registry, testFolder string) { + specPath := filepath.Join(testdataFullDistributionPath, testFolder, "spec.yaml") + + d, err := NewDistributionSpec(specPath) + assert.NilError(t, err) + + g, err := NewDistributionGenerator(d, registry, true) + assert.NilError(t, err) + + // If custom templates exist for the test case, use them. + customTemplates := filepath.Join(testdataFullDistributionPath, testFolder, "templates") + if _, err := os.Stat(customTemplates); err == nil { + g.CustomTemplatesDir = os.DirFS(customTemplates) + } + + err = g.Generate() + assert.NilError(t, err) + t.Cleanup(func() { + g.Clean() + }) + + goldenPath := filepath.Join(testdataFullDistributionPath, testFolder, "golden") + goldenSubPath := filepath.Join(testdataSubpath, testFolder, "golden") + assertGoldenFiles(t, g.GeneratePath, goldenPath, goldenSubPath) +} + +func TestSpecValidationError(t *testing.T) { + testCases := []struct { + name string + expectedErr error + }{ + { + name: "boringcrypto_alpine_build_container", + expectedErr: ErrSpecValidationBoringCryptoWithoutDebian, + }, + { + name: "boringcrypto_cgo_off", + expectedErr: ErrSpecValidationBoringCryptoWithoutCGO, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + + testConfigPath := filepath.Join("testdata", "invalid", tc.name+".yaml") + _, err := NewDistributionSpec(testConfigPath) + assert.ErrorIs(t, err, tc.expectedErr) + }) + } +} + +func TestSpecQuery(t *testing.T) { + otelVer := "v0.124.0" + spec := &DistributionSpec{ + OpenTelemetryVersion: otelVer, + } + val, err := spec.Query("opentelemetry_version") + assert.NilError(t, err) + assert.Equal(t, val, otelVer) +} + +func TestSpecQueryNotFound(t *testing.T) { + spec := &DistributionSpec{} + _, err := spec.Query("random_field_name") + assert.ErrorIs(t, err, ErrQueryValueNotFound) +} diff --git a/internal/distrogen/errors.go b/internal/distrogen/errors.go new file mode 100644 index 0000000000..5a9f312ca0 --- /dev/null +++ b/internal/distrogen/errors.go @@ -0,0 +1,54 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import "fmt" + +// CollectionError is a map of errors. It is used for operations +// where you want to complete the full set of operations, i.e. something +// on a full directory, and collect the results. +type CollectionError map[string]error + +// Error implements the error interface. It formats the error +// with the intention of being output to stderr. +func (e CollectionError) Error() string { + msg := "" + for name, err := range e { + combinedErr := fmt.Errorf("%s: %w", name, err) + msg += fmt.Sprintf("%v\n", combinedErr) + } + return msg +} + +// ExitCodeError is a wrapped error that, if propogated to the main +// function of the program, will cause the program to exit with the +// specified exit code. +type ExitCodeError struct { + exitCode int + err error +} + +// Error implements the error interface. +func (e *ExitCodeError) Error() string { + return e.err.Error() +} + +// wrapExitCodeError wraps an existing error with an exit code. +func wrapExitCodeError(exitCode int, err error) error { + return &ExitCodeError{ + exitCode: exitCode, + err: err, + } +} diff --git a/internal/distrogen/go.mod b/internal/distrogen/go.mod new file mode 100644 index 0000000000..f8fa402c5b --- /dev/null +++ b/internal/distrogen/go.mod @@ -0,0 +1,8 @@ +module github.com/GoogleCloudPlatform/opentelemetry-operations-collector/cmd/distrogen + +go 1.25.0 + +require ( + github.com/spf13/pflag v1.0.6 + gopkg.in/yaml.v3 v3.0.1 +) diff --git a/internal/distrogen/internal/command/command.go b/internal/distrogen/internal/command/command.go new file mode 100644 index 0000000000..7caedc77d0 --- /dev/null +++ b/internal/distrogen/internal/command/command.go @@ -0,0 +1,83 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package command + +import ( + "errors" + "fmt" + "log" + "os" +) + +var errCommandNotFound = errors.New("command not found") + +// Command is a type that parses args from the command +// line and can run. Intended to be registered by a +// Runner. +type Command interface { + Run() error + ParseArgs(args []string) error +} + +// Runner has a set of registered named commands that +// can be requested by a caller. +type Runner struct { + // Dir is set if the working directory of the commands + // should be changed before running. + Dir string + + commands map[string]Command +} + +func NewRunner() *Runner { + return &Runner{ + commands: make(map[string]Command), + } +} + +func (cs *Runner) Register(name string, cmd Command) { + if _, exists := cs.commands[name]; exists { + log.Panicf(`developer error: command with name "%s" already exists`, name) + } + cs.commands[name] = cmd +} + +func (cs *Runner) Run(name string) (err error) { + if cs.Dir != "" { + originalDir, err := os.Getwd() + if err != nil { + return err + } + if err := os.Chdir(cs.Dir); err != nil { + return err + } + defer func() { + err = os.Chdir(originalDir) + }() + } + + cmd, ok := cs.commands[name] + if !ok { + return fmt.Errorf("%w: %s", errCommandNotFound, name) + } + args := []string{} + if len(os.Args) > 2 { + args = os.Args[2:] + } + if err := cmd.ParseArgs(args); err != nil { + return err + } + return cmd.Run() +} diff --git a/internal/distrogen/main.go b/internal/distrogen/main.go new file mode 100644 index 0000000000..0e17c6d57c --- /dev/null +++ b/internal/distrogen/main.go @@ -0,0 +1,326 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "bufio" + "errors" + "fmt" + "io" + "log" + "log/slog" + "net/http" + "os" + "slices" + + "github.com/GoogleCloudPlatform/opentelemetry-operations-collector/cmd/distrogen/internal/command" + flag "github.com/spf13/pflag" + "gopkg.in/yaml.v3" +) + +var ( + logLevel = new(slog.LevelVar) + logger = slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{Level: logLevel})) + unexpectErrExitCode = 2 + + errNoSpecFlag = errors.New("missing --spec flag") +) + +func main() { + runner := command.NewRunner() + + runner.Register("generate", &generateCommand{}) + runner.Register("query", &queryCommand{}) + runner.Register("otel_component_versions", &otelComponentVersionsCommand{}) + runner.Register("project", &projectCommand{}) + runner.Register("component", &componentCommand{}) + runner.Register("registry", ®istryCommand{}) + + detectVerboseFlag() + + var exitCodeErr *ExitCodeError + if err := runner.Run(os.Args[1]); err != nil { + if errors.Is(err, ErrNoDiff) { + // No diff means we just want to log the error + // but not exit with code 1. + log.Println(err) + } else if errors.As(err, &exitCodeErr) { + logger.Error(fmt.Sprintf("unexpected error: %v", err)) + os.Exit(exitCodeErr.exitCode) + } else { + log.Fatal(err) + } + } +} + +func detectVerboseFlag() { + verboseArg := slices.Index(os.Args, "--verbose") + vArg := slices.Index(os.Args, "-v") + if vArg != -1 { + logLevel.Set(slog.LevelDebug) + os.Args = slices.Delete(os.Args, vArg, vArg+1) + } + if verboseArg != -1 { + logLevel.Set(slog.LevelDebug) + os.Args = slices.Delete(os.Args, verboseArg, verboseArg+1) + } +} + +func setSpecFlag(flags *flag.FlagSet) *string { + return flags.String("spec", "", "The distribution specification to use") +} + +type generateCommand struct { + flags flag.FlagSet + + registries *[]string + spec *string + force *bool + templates *string + compare *bool +} + +func (cmd *generateCommand) ParseArgs(args []string) error { + cmd.spec = setSpecFlag(&cmd.flags) + cmd.force = cmd.flags.BoolP("force", "f", false, "Force generate even if there are no differences detected") + cmd.registries = cmd.flags.StringArray("registry", []string{}, "Provide additional component registries") + cmd.templates = cmd.flags.String("templates", "", "Path to custom templates directory") + cmd.compare = cmd.flags.Bool("compare", false, "Allows you to compare the generated distribution to the existing") + + return cmd.flags.Parse(args) +} + +func (cmd *generateCommand) Run() error { + if *cmd.spec == "" { + return errNoSpecFlag + } + + spec, err := NewDistributionSpec(*cmd.spec) + if err != nil { + return err + } + + registry, err := LoadEmbeddedRegistry() + if err != nil { + return err + } + + for _, registryPath := range *cmd.registries { + additionalRegistry, err := LoadRegistry(registryPath) + if err != nil { + return err + } + registry.Merge(additionalRegistry) + } + + generator, err := NewDistributionGenerator(spec, registry, *cmd.force) + if err != nil { + return err + } + defer generator.Clean() + + if *cmd.templates != "" { + generator.CustomTemplatesDir = os.DirFS(*cmd.templates) + } + + if err := generator.Generate(); err != nil { + return err + } + + if *cmd.compare { + return generator.Compare() + } + + return generator.MoveGeneratedDirToWd() +} + +type queryCommand struct { + flags flag.FlagSet + + spec *string + field *string +} + +func (cmd *queryCommand) ParseArgs(args []string) error { + cmd.spec = setSpecFlag(&cmd.flags) + cmd.field = cmd.flags.String("field", "", "Field to query from the spec") + + return cmd.flags.Parse(args) +} + +func (cmd *queryCommand) Run() error { + if *cmd.spec == "" { + return errNoSpecFlag + } + + spec, err := NewDistributionSpec(*cmd.spec) + if err != nil { + return err + } + + val, err := spec.Query(*cmd.field) + if err != nil { + return err + } + + // Using Println instead of logger since the results + // may be piped to another program. + fmt.Println(val) + return nil +} + +type otelComponentVersionsCommand struct { + flags flag.FlagSet + + otelVersion *string +} + +func (cmd *otelComponentVersionsCommand) ParseArgs(args []string) error { + cmd.otelVersion = cmd.flags.String("otel_version", "", "The OpenTelemetry version to fetch component versions for") + + return cmd.flags.Parse(args) +} + +func (cmd *otelComponentVersionsCommand) Run() error { + type moduleSet struct { + Version string `yaml:"version"` + Modules []string `yaml:"modules"` + } + type versions struct { + ModuleSets map[string]moduleSet `yaml:"module-sets"` + ExcludedModules []string `yaml:"excluded-modules"` + } + + if *cmd.otelVersion == "" { + return fmt.Errorf("otel_version flag is required") + } + + s := bufio.NewScanner(os.Stdin) + var allModules []string + for s.Scan() { + allModules = append(allModules, s.Text()) + } + if err := s.Err(); err != nil { + return err + } + + response, err := http.Get(fmt.Sprintf("https://raw.githubusercontent.com/open-telemetry/opentelemetry-collector/refs/tags/%s/versions.yaml", *cmd.otelVersion)) + if err != nil { + return err + } + defer response.Body.Close() + content, err := io.ReadAll(response.Body) + if err != nil { + return err + } + var componentVersions versions + if err := yaml.Unmarshal(content, &componentVersions); err != nil { + return err + } + + for _, moduleSet := range componentVersions.ModuleSets { + for _, module := range allModules { + if slices.Contains(moduleSet.Modules, module) { + fmt.Printf("%s@%s\n", module, moduleSet.Version) + } + } + } + + return nil +} + +type projectCommand struct { + flags flag.FlagSet + tools *[]string + spec *string +} + +func (cmd *projectCommand) ParseArgs(args []string) error { + cmd.spec = setSpecFlag(&cmd.flags) + cmd.tools = cmd.flags.StringArray("tools", []string{}, "Provide additional tools to install") + + return cmd.flags.Parse(args) +} + +func (cmd *projectCommand) Run() error { + if *cmd.spec == "" { + return errNoSpecFlag + } + + spec, err := NewDistributionSpec(*cmd.spec) + if err != nil { + return err + } + + generator, err := NewProjectGenerator(spec) + if err != nil { + return err + } + + return generator.Generate() +} + +type componentCommand struct { + flags flag.FlagSet + + spec *string + componentType *string + componentName *string +} + +func (cmd *componentCommand) ParseArgs(args []string) error { + cmd.spec = setSpecFlag(&cmd.flags) + cmd.componentType = cmd.flags.String("type", "", "Type of component") + cmd.componentName = cmd.flags.String("name", "", "Name of component") + + return cmd.flags.Parse(args) +} + +func (cmd *componentCommand) Run() error { + if *cmd.spec == "" { + return errNoSpecFlag + } + if *cmd.componentType == "" { + return errors.New("missing --type flag") + } + if *cmd.componentName == "" { + return errors.New("missing --name flag") + } + + spec, err := NewDistributionSpec(*cmd.spec) + if err != nil { + return err + } + + generator, err := NewComponentGenerator(spec, ComponentType(*cmd.componentType), *cmd.componentName) + if err != nil { + return err + } + + return generator.Generate() +} + +type registryCommand struct { +} + +func (cmd *registryCommand) ParseArgs(args []string) error { + return nil +} + +func (cmd *registryCommand) Run() error { + generator := NewComponentsRegistryGenerator() + + return generator.Generate() +} diff --git a/internal/distrogen/otel_config.go b/internal/distrogen/otel_config.go new file mode 100644 index 0000000000..3413b71ad6 --- /dev/null +++ b/internal/distrogen/otel_config.go @@ -0,0 +1,64 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "errors" + "fmt" +) + +var ErrSectionNotFound = errors.New("could not find section") + +// ComponentsFromOTelConfig will take an OpenTelemetry Collector +// configuration map and load the component names that would +// be loaded from a registry on distribution generation. +func ComponentsFromOTelConfig(otelConfig map[string]any) (*DistributionComponents, error) { + components := &DistributionComponents{} + var err error + components.Receivers, err = readComponentsFromSection("receivers", otelConfig) + if err != nil && !errors.Is(err, ErrSectionNotFound) { + return nil, err + } + components.Processors, err = readComponentsFromSection("processors", otelConfig) + if err != nil && !errors.Is(err, ErrSectionNotFound) { + return nil, err + } + components.Exporters, err = readComponentsFromSection("exporters", otelConfig) + if err != nil && !errors.Is(err, ErrSectionNotFound) { + return nil, err + } + components.Connectors, err = readComponentsFromSection("connectors", otelConfig) + if err != nil && !errors.Is(err, ErrSectionNotFound) { + return nil, err + } + components.Extensions, err = readComponentsFromSection("extensions", otelConfig) + if err != nil && !errors.Is(err, ErrSectionNotFound) { + return nil, err + } + return components, nil +} + +func readComponentsFromSection(sectionName string, otelConfig map[string]any) ([]string, error) { + var section map[string]any + rawSection, ok := otelConfig[sectionName] + if !ok { + return nil, fmt.Errorf("reading section %s: %w", sectionName, ErrSectionNotFound) + } + section, ok = rawSection.(map[string]any) + if !ok { + return nil, fmt.Errorf("reading section %s: invalid section data", sectionName) + } + return mapKeys(section), nil +} diff --git a/internal/distrogen/project.go b/internal/distrogen/project.go new file mode 100644 index 0000000000..b8413d77ef --- /dev/null +++ b/internal/distrogen/project.go @@ -0,0 +1,110 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "errors" + "io/fs" + "os" + "path/filepath" +) + +var ( + DefaultProjectFileMode = fs.ModePerm +) + +type ProjectGenerator struct { + Spec *DistributionSpec + FileMode fs.FileMode + CustomPath string +} + +func NewProjectGenerator(spec *DistributionSpec) (*ProjectGenerator, error) { + return &ProjectGenerator{ + Spec: spec, + FileMode: DefaultProjectFileMode, + }, nil +} + +func (pg *ProjectGenerator) Generate() error { + makeTemplates, err := GetMakeTemplateSet(pg, pg.FileMode) + if err != nil { + logger.Debug("failed to get make templates", "err", err) + return err + } + projectTemplates, err := GetProjectTemplateSet(pg, pg.FileMode) + if err != nil { + logger.Debug("failed to get project templates", "err", err) + return err + } + distrogenTemplateSet, err := GetDistrogenTemplateSet(pg, pg.FileMode) + if err != nil { + logger.Debug("failed to get component templates", "err", err) + return err + } + scriptTemplateSet, err := GetScriptTemplateSet(pg, pg.FileMode) + if err != nil { + logger.Debug("failed to get script templates", "err", err) + return err + } + + crg := NewComponentsRegistryGenerator() + + generatePath := "." + if pg.CustomPath != "" { + generatePath = pg.CustomPath + crg.Path = generatePath + } + + if err := crg.Generate(); err != nil { + return err + } + + generateMakePath := filepath.Join(generatePath, "make") + generateScriptsPath := filepath.Join(generatePath, "scripts") + + var dirErrors []error + if err := os.MkdirAll(generateMakePath, pg.FileMode); err != nil { + dirErrors = append(dirErrors, err) + } + if err := os.MkdirAll(filepath.Join(generatePath, "templates"), pg.FileMode); err != nil { + dirErrors = append(dirErrors, err) + } + if err := os.MkdirAll(generateScriptsPath, pg.FileMode); err != nil { + dirErrors = append(dirErrors, err) + } + if _, err := os.Create(filepath.Join(generatePath, "templates", EMPTY_FILE_NAME)); err != nil { + dirErrors = append(dirErrors, err) + } + + if len(dirErrors) > 0 { + return errors.Join(dirErrors...) + } + + if err := GenerateTemplateSet(generateMakePath, makeTemplates); err != nil { + return err + } + if err := GenerateTemplateSet(generateScriptsPath, scriptTemplateSet); err != nil { + return err + } + if err := GenerateTemplateSet(filepath.Join(generatePath, "."), projectTemplates); err != nil { + return err + } + if err := GenerateTemplateSet(filepath.Join(generatePath, ".distrogen"), distrogenTemplateSet); err != nil { + return err + } + + return nil +} diff --git a/internal/distrogen/project_test.go b/internal/distrogen/project_test.go new file mode 100644 index 0000000000..a33d8a9a5f --- /dev/null +++ b/internal/distrogen/project_test.go @@ -0,0 +1,68 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "os" + "path/filepath" + "testing" + + "gotest.tools/v3/assert" +) + +var ( + testdataFullProjectPath = filepath.Join("testdata", "generator", "project") +) + +func TestProjectTemplateGeneration(t *testing.T) { + registry, err := LoadEmbeddedRegistry() + assert.NilError(t, err) + + t.Run("project", func(t *testing.T) { + testProjectGeneratorCase(t, registry, "project") + }) +} + +func testProjectGeneratorCase(t *testing.T, registry *Registry, testFolder string) { + specPath := filepath.Join(testdataFullProjectPath, "spec.yaml") + + // Create a temporary directory to generate files in, to avoid polluting testdata. + tempDir, err := os.MkdirTemp("", "project-generator-test") + assert.NilError(t, err) + t.Cleanup(func() { + os.RemoveAll(tempDir) + }) + + // The generator expects the spec file to be in the project path, so copy it there. + specData, err := os.ReadFile(specPath) + assert.NilError(t, err) + tempSpecPath := filepath.Join(tempDir, "spec.yaml") + err = os.WriteFile(tempSpecPath, specData, 0644) + assert.NilError(t, err) + + d, err := NewDistributionSpec(tempSpecPath) + assert.NilError(t, err) + + p, err := NewProjectGenerator(d) + assert.NilError(t, err) + p.CustomPath = tempDir + + err = p.Generate() + assert.NilError(t, err) + + goldenPath := filepath.Join(testdataFullProjectPath, "golden") + goldenSubPath := filepath.Join("generator", "project", "golden") + assertGoldenFiles(t, p.CustomPath, goldenPath, goldenSubPath) +} diff --git a/internal/distrogen/registry.go b/internal/distrogen/registry.go new file mode 100644 index 0000000000..50992d843d --- /dev/null +++ b/internal/distrogen/registry.go @@ -0,0 +1,302 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + _ "embed" + "errors" + "fmt" + "log/slog" + "slices" + "strings" + + "gopkg.in/yaml.v3" +) + +//go:embed registry.yaml +var registryContent []byte + +var ErrComponentNotFound = errors.New("component not found") + +type ComponentType string + +const ( + Receiver ComponentType = "receiver" + Processor ComponentType = "processor" + Exporter ComponentType = "exporter" + Connector ComponentType = "connector" + Extension ComponentType = "extension" + Provider ComponentType = "provider" +) + +// Registry is a collection of components that can be used in +// a collector distribution. +type Registry struct { + Receivers RegistryComponents `yaml:"receivers"` + Processors RegistryComponents `yaml:"processors"` + Exporters RegistryComponents `yaml:"exporters"` + Connectors RegistryComponents `yaml:"connectors"` + Extensions RegistryComponents `yaml:"extensions"` + Providers RegistryComponents `yaml:"providers"` + Path string `yaml:"-"` +} + +// NewRegistry will create an empty registry object with the +// component lists preallocated. +func NewRegistry() *Registry { + return &Registry{ + Receivers: RegistryComponents{}, + Processors: RegistryComponents{}, + Exporters: RegistryComponents{}, + Connectors: RegistryComponents{}, + Extensions: RegistryComponents{}, + Providers: RegistryComponents{}, + } +} + +// LoadEmbeddedRegistry will load the registry embedded in the +// distrogen binary. +func LoadEmbeddedRegistry() (*Registry, error) { + var r Registry + if err := yaml.Unmarshal(registryContent, &r); err != nil { + return nil, err + } + return &r, nil +} + +// LoadRegistry will load a registry from a yaml file. +func LoadRegistry(path string) (*Registry, error) { + r := NewRegistry() + err := yamlUnmarshalFromFileInto(path, r) + r.Path = path + return r, err +} + +// Merge will merge another registry into this one. If the provided +// registry contains any of the same entry keys as the current +// registry, it will be overridden. +func (r *Registry) Merge(r2 *Registry) { + mapMerge(r.Receivers, r2.Receivers) + mapMerge(r.Processors, r2.Processors) + mapMerge(r.Exporters, r2.Exporters) + mapMerge(r.Connectors, r2.Connectors) + mapMerge(r.Extensions, r2.Extensions) + mapMerge(r.Providers, r2.Providers) +} + +func (r *Registry) Add(componentType ComponentType, component *RegistryComponent) { + switch componentType { + case Receiver: + r.Receivers[component.Name] = component + case Processor: + r.Processors[component.Name] = component + case Exporter: + r.Exporters[component.Name] = component + case Connector: + r.Connectors[component.Name] = component + case Extension: + r.Extensions[component.Name] = component + case Provider: + r.Providers[component.Name] = component + } +} + +func (r *Registry) Save() error { + if r.Path == "" { + return errors.New("cannot save registry: no path set") + } + + if err := yamlMarshalToFile(r, r.Path, DefaultProjectFileMode); err != nil { + return err + } + + return nil +} + +// GoModuleID is intended for stringifying/unmarshalling to +// a Go module ID, i.e. github.com/package/name v0.0.0 format. +type GoModuleID struct { + URL string + Tag string + AllowBlankTag bool +} + +// String outputs the GoModuleID details in proper format. +func (gm *GoModuleID) String() string { + tag := gm.Tag + if tag == "" { + // There are certain cases (like local paths) where + // the tag for a Go Module ID is allowed to be blank. + if gm.AllowBlankTag { + return gm.URL + } + + // Otherwise if there is no tag specified, then it is assumed that this module + // will be replaced. Use the tag v0.0.0 since it will be ignored + // in the replace anyway. + logger.Debug("no tag detected for module, using v0.0.0", slog.String("module", gm.URL)) + tag = "v0.0.0" + } + return fmt.Sprintf("%s %s", gm.URL, tag) +} + +// UnmarshalYAML implements the yaml.Unmarshaler interface. +// It takes a properly formed Go Module ID string and unpacks +// it into the struct. +func (gm *GoModuleID) UnmarshalYAML(value *yaml.Node) error { + // The module ID may have a version. + moduleStr := value.Value + moduleComponents := strings.Split(moduleStr, " ") + gm.URL = moduleComponents[0] + if len(moduleComponents) > 1 { + gm.Tag = moduleComponents[1] + } + return nil +} + +// MarshalYAML implements the yaml.Marshaler interface. It leverages +// the String method to allow outputting the value into a YAML document +// in the module ID string form. +func (gm *GoModuleID) MarshalYAML() (interface{}, error) { + return gm.String(), nil +} + +type otelComponentVersion struct { + core string + coreStable string + contrib string +} + +// RegistryComponent is the type used as a basis for Registry. +// It contains all the information needed to output a +type RegistryComponent struct { + Name string `yaml:"-"` + + GoMod *GoModuleID `yaml:"gomod"` + Import string `yaml:"import,omitempty"` + Path string `yaml:"path,omitempty"` + Stable bool `yaml:"stable,omitempty"` + StartRevision string `yaml:"start_revision,omitempty"` + DocsURL string `yaml:"docs_url,omitempty"` +} + +// RenderDocsURL renders the docs URL into a template. +func (c *RegistryComponent) RenderDocsURL() string { + if c.DocsURL == "" { + return "No docs linked for component" + } + return c.DocsURL +} + +// IsContrib determines whether the module comes from the opentelemetry-collector-contrib repo. +func (c *RegistryComponent) IsContrib() bool { + return strings.Contains(c.GoMod.URL, "github.com/open-telemetry/opentelemetry-collector-contrib") +} + +func (c *RegistryComponent) ApplyOTelVersion(otelVersion otelComponentVersion) { + c.GoMod.Tag = "v" + otelVersion.core + if c.Stable { + c.GoMod.Tag = "v" + otelVersion.coreStable + } else if c.IsContrib() { + c.GoMod.Tag = "v" + otelVersion.contrib + } +} + +// OCBManifestComponent is a reflection of the fields for an +// entry in an OCB manifest yaml. +type OCBManifestComponent struct { + GoMod *GoModuleID `yaml:"gomod"` + Import string `yaml:"import,omitempty"` + Name string `yaml:"string,omitempty"` + Path string `yaml:"path,omitempty"` +} + +// GetOCBComponent will return an OCBManifestComponent using +// the details from this RegistryComponent. +func (c *RegistryComponent) GetOCBComponent() OCBManifestComponent { + return OCBManifestComponent{ + GoMod: c.GoMod, + Import: c.Import, + Name: c.Name, + Path: c.Path, + } +} + +// RegistryComponentRelease is a particular tag of a component that declares +// the Collector library version it supports. +type RegistryComponentRelease struct { + Tag string `yaml:"version"` + OpenTelemetryVersion string `yaml:"opentelemetry_version"` + OpenTelemetryContribVersion string `yaml:"opentelemetry_contrib_version,omitempty"` +} + +// RegistryComponents is a map of registry component names to component +// details. +type RegistryComponents map[string]*RegistryComponent + +// LoadAllComponents will take a list of component names and load them +// from the registry, attaching the appropriate version tag. +func (rl RegistryComponents) LoadAllComponents(names []string, otelVersion otelComponentVersion) (RegistryComponents, CollectionError) { + components := RegistryComponents{} + errs := make(CollectionError) + + for _, name := range names { + entry, err := rl.LoadComponent(name, otelVersion) + if err != nil { + errs[name] = ErrComponentNotFound + continue + } + components[name] = entry + } + + return components, errs +} + +func (rl RegistryComponents) LoadComponent(name string, otelVersion otelComponentVersion) (*RegistryComponent, error) { + entry, ok := rl[name] + if !ok { + return nil, ErrComponentNotFound + } + entry.ApplyOTelVersion(otelVersion) + return entry, nil +} + +// Validate is intended to be called before template rendering. +// This way, calling the Render method from the template can assume +// no error. +func (cs RegistryComponents) Validate() error { + _, err := yaml.Marshal(cs) + return err +} + +// RenderOCBComponents will render the registry entries as +func (cs RegistryComponents) RenderOCBComponents() string { + if len(cs) == 0 { + return "" + } + + renderComponents := []OCBManifestComponent{} + for _, c := range cs { + renderComponents = append(renderComponents, c.GetOCBComponent()) + } + + // The component list is sorted here to ensure that re-generating will always + // have a consistent order. + slices.SortFunc(renderComponents, func(a OCBManifestComponent, b OCBManifestComponent) int { + return strings.Compare(a.GoMod.URL, b.GoMod.URL) + }) + + return renderYaml(renderComponents) +} diff --git a/internal/distrogen/registry.yaml b/internal/distrogen/registry.yaml new file mode 100755 index 0000000000..cc4c663ef4 --- /dev/null +++ b/internal/distrogen/registry.yaml @@ -0,0 +1,664 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +receivers: + activedirectoryds: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/activedirectorydsreceiver/README.md + aerospike: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/aerospikereceiver/README.md + apache: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/apachereceiver/README.md + apachespark: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachesparkreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/apachesparkreceiver/README.md + awscloudwatch: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscloudwatchreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/awscloudwatchreceiver/README.md + awscontainerinsight: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/awscontainerinsightreceiver/README.md + awsecscontainermetrics: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/awsecscontainermetricsreceiver/README.md + awsfirehose: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/awsfirehosereceiver/README.md + awsxray: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/awsxrayreceiver/README.md + azureblob: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureblobreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/azureblobreceiver/README.md + azureeventhub: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureeventhubreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/azureeventhubreceiver/README.md + azuremonitor: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azuremonitorreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/azuremonitorreceiver/README.md + bigip: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/bigipreceiver/README.md + carbon: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/carbonreceiver/README.md + chrony: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/chronyreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/chronyreceiver/README.md + cloudflare: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudflarereceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/cloudflarereceiver/README.md + cloudfoundry: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/cloudfoundryreceiver/README.md + collectd: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/collectdreceiver/README.md + couchdb: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/couchdbreceiver/README.md + creator: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/receivercreator/README.md + datadog: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/datadogreceiver/README.md + dockerstats: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/dockerstatsreceiver/README.md + elasticsearch: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/elasticsearchreceiver/README.md + expvar: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/expvarreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/expvarreceiver/README.md + filelog: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver/README.md + filestats: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filestatsreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filestatsreceiver/README.md + flinkmetrics: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/flinkmetricsreceiver/README.md + fluentforward: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/fluentforwardreceiver/README.md + googlecloudmonitoring: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudmonitoringreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/googlecloudmonitoringreceiver/README.md + googlecloudpubsub: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/googlecloudpubsubreceiver/README.md + haproxy: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/haproxyreceiver/README.md + hostmetrics: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver/README.md + httpcheck: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/httpcheckreceiver/README.md + iis: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/iisreceiver/README.md + influxdb: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/influxdbreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/influxdbreceiver/README.md + jaeger: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jaegerreceiver/README.md + jmx: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jmxreceiver/README.md + journald: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/journaldreceiver/README.md + k8scluster: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/k8sclusterreceiver/README.md + k8sevents: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/k8seventsreceiver/README.md + k8sobjects: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/k8sobjectsreceiver/README.md + kafka: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/kafkareceiver/README.md + kafkametrics: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkametricsreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/kafkametricsreceiver/README.md + kubeletstats: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kubeletstatsreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/kubeletstatsreceiver/README.md + loki: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/lokireceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/lokireceiver/README.md + memcached: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/memcachedreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/memcachedreceiver/README.md + mongodb: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/mongodbreceiver/README.md + mongodbatlas: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/mongodbatlasreceiver/README.md + mysql: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/mysqlreceiver/README.md + namedpipe: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/namedpipereceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/namedpipereceiver/README.md + nginx: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/nginxreceiver/README.md + nop: + gomod: go.opentelemetry.io/collector/receiver/nopreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/nopreceiver/README.md + nsxt: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/nsxtreceiver/README.md + opencensus: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/opencensusreceiver/README.md + oracledb: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/oracledbreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/oracledbreceiver/README.md + otelarrow: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otelarrowreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/otelarrowreceiver/README.md + otlp: + gomod: go.opentelemetry.io/collector/receiver/otlpreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver/README.md + otlpjsonfile: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/otlpjsonfilereceiver/README.md + podman: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/podmanreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/podmanreceiver/README.md + postgresql: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/postgresqlreceiver/README.md + prometheus: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/prometheusreceiver/README.md + prometheusremotewrite: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusremotewritereceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/prometheusremotewritereceiver/README.md + pulsar: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/pulsarreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/pulsarreceiver/README.md + purefa: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefareceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/purefareceiver/README.md + purefb: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefbreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/purefbreceiver/README.md + rabbitmq: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/rabbitmqreceiver/README.md + receivercreator: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/receivercreator/README.md + redis: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/redisreceiver/README.md + riak: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/riakreceiver/README.md + sapm: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/sapmreceiver/README.md + signalfx: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/signalfxreceiver/README.md + simpleprometheus: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/simpleprometheusreceiver/README.md + skywalking: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/skywalkingreceiver/README.md + snmp: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/snmpreceiver/README.md + snowflake: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/snowflakereceiver/README.md + solace: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/solacereceiver/README.md + splunkenterprise: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkenterprisereceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/splunkenterprisereceiver/README.md + splunkhec: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/splunkhecreceiver/README.md + sqlquery: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/sqlqueryreceiver/README.md + sqlserver: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/sqlserverreceiver/README.md + sshcheck: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sshcheckreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/sshcheckreceiver/README.md + statsd: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/statsdreceiver/README.md + syslog: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/syslogreceiver/README.md + tcplog: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/tcplogreceiver/README.md + udplog: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/udplogreceiver/README.md + vcenter: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/vcenterreceiver/README.md + wavefront: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/wavefrontreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/wavefrontreceiver/README.md + webhookevent: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/webhookeventreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/webhookeventreceiver/README.md + windowseventlog: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/windowseventlogreceiver/README.md + windowsperfcounters: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/windowsperfcountersreceiver/README.md + zipkin: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/zipkinreceiver/README.md + zookeeper: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/zookeeperreceiver/README.md +processors: + attributes: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/attributesprocessor/README.md + batch: + gomod: go.opentelemetry.io/collector/processor/batchprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor/README.md + cumulativetodelta: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/cumulativetodeltaprocessor/README.md + deltatocumulative: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/deltatocumulativeprocessor/README.md + deltatorate: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/deltatorateprocessor/README.md + filter: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/filterprocessor/README.md + geoip: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/geoipprocessor/README.md + groupbyattrs: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/groupbyattrsprocessor/README.md + groupbytrace: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/groupbytraceprocessor/README.md + k8sattributes: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/k8sattributesprocessor/README.md + logdedup: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/logdedupprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/logdedupprocessor/README.md + logstransform: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/logstransformprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/logstransformprocessor/README.md + memorylimiter: + gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor/README.md + metricsgeneration: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricsgenerationprocessor/README.md + metricstarttime: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstarttimeprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricstarttimeprocessor/README.md + metricstransform: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricstransformprocessor/README.md + probabilisticsampler: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/probabilisticsamplerprocessor/README.md + redaction: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/redactionprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/redactionprocessor/README.md + remotetap: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/remotetapprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/remotetapprocessor/README.md + resource: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourceprocessor/README.md + resourcedetection: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor/README.md + routing: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/routingprocessor/README.md + span: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/spanprocessor/README.md + sumologic: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/sumologicprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/sumologicprocessor/README.md + tailsampling: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/tailsamplingprocessor/README.md + transform: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/transformprocessor/README.md + interval: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/intervalprocessor v0.119.0 + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/intervalprocessor/README.md + +exporters: + alibabacloudlogservice: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/alibabacloudlogserviceexporter/README.md + awscloudwatchlogs: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/awscloudwatchlogsexporter/README.md + awsemf: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/awsemfexporter/README.md + awskinesis: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/awskinesisexporter/README.md + awss3: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/awss3exporter/README.md + awsxray: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/awsxrayexporter/README.md + azuredataexplorer: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/azuredataexplorerexporter/README.md + azuremonitor: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/azuremonitorexporter/README.md + carbon: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/carbonexporter/README.md + cassandra: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/cassandraexporter/README.md + clickhouse: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/clickhouseexporter/README.md + coralogix: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/coralogixexporter/README.md + datadog: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/datadogexporter/README.md + dataset: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/datasetexporter/README.md + debug: + gomod: go.opentelemetry.io/collector/exporter/debugexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/debugexporter/README.md + elasticsearch: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/elasticsearchexporter/README.md + file: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/fileexporter/README.md + googlecloud: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/googlecloudexporter/README.md + googlecloudpubsub: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/googlecloudpubsubexporter/README.md + googlemanagedprometheus: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/googlemanagedprometheusexporter/README.md + honeycombmarker: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/honeycombmarkerexporter/README.md + influxdb: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/influxdbexporter/README.md + kafka: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/kafkaexporter/README.md + loadbalancing: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/loadbalancingexporter/README.md + logicmonitor: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/logicmonitorexporter/README.md + logzio: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/logzioexporter/README.md + loki: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/lokiexporter/README.md + mezmo: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/mezmoexporter/README.md + nop: + gomod: go.opentelemetry.io/collector/exporter/nopexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/nopexporter/README.md + opencensus: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/opencensusexporter/README.md + opensearch: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/opensearchexporter/README.md + otelarrow: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/otelarrowexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/otelarrowexporter/README.md + otlp: + gomod: go.opentelemetry.io/collector/exporter/otlpexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlpexporter/README.md + otlphttp: + gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter/README.md + prometheus: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/prometheusexporter/README.md + prometheusremotewrite: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/prometheusremotewriteexporter/README.md + pulsar: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsarexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/pulsarexporter/README.md + rabbitmq: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/rabbitmqexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/rabbitmqexporter/README.md + sapm: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/sapmexporter/README.md + sentry: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/sentryexporter/README.md + signalfx: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/signalfxexporter/README.md + splunkhec: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/splunkhecexporter/README.md + sumologic: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/sumologicexporter/README.md + syslog: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/syslogexporter/README.md + tencentcloudlogservice: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/tencentcloudlogserviceexporter/README.md + zipkin: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter/README.md + +connectors: + count: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/countconnector/README.md + datadog: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/datadogconnector/README.md + exceptions: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/exceptionsconnector/README.md + failover: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/failoverconnector/README.md + forward: + gomod: go.opentelemetry.io/collector/connector/forwardconnector + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/connector/forwardconnector/README.md + grafanacloud: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/grafanacloudconnector/README.md + otlpjson: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/otlpjsonconnector + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/otlpjsonconnector/README.md + roundrobin: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/roundrobinconnector + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/roundrobinconnector/README.md + routing: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/routingconnector/README.md + servicegraph: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/servicegraphconnector/README.md + spanmetrics: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/spanmetricsconnector/README.md + signaltometrics: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/signaltometricsconnector + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/signaltometricsconnector/README.md + +extensions: + ack: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/ackextension/README.md + asapauth: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/asapauthextension/README.md + awsproxy: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/awsproxy/README.md + basicauth: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/basicauthextension/README.md + bearertokenauth: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/bearertokenauthextension/README.md + dbstorage: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/storage/README.md + dockerobserver: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/observer/README.md + ecsobserver: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/observer/README.md + ecstaskobserver: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecstaskobserver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/observer/README.md + filestorage: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/storage/filestorage/README.md + googleclientauth: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/googleclientauthextension/README.md + headerssetter: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/headerssetterextension/README.md + healthcheck: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/healthcheckextension/README.md + healthcheckv2: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckv2extension + docs_url: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/extension/healthcheckv2extension/README.md + hostobserver: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/hostobserver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/observer/README.md + httpforwarder: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/httpforwarderextension/README.md + jaegerencoding: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jaegerencodingextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/encoding/README.md + jaegerremotesampling: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/jaegerremotesampling/README.md + jsonlogencoding: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jsonlogencodingextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/encoding/README.md + k8sobserver: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/observer/README.md + oauth2clientauth: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/oauth2clientauthextension/README.md + oidcauth: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/oidcauthextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/oidcauthextension/README.md + opamp: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/opampextension/README.md + otlpencoding: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/encoding/README.md + pprof: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/pprofextension/README.md + sigv4auth: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/sigv4authextension/README.md + sumologic: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/sumologicextension/README.md + zipkinencoding: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/zipkinencodingextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/encoding/README.md + zpages: + gomod: go.opentelemetry.io/collector/extension/zpagesextension + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/extension/zpagesextension/README.md +providers: + env: + gomod: go.opentelemetry.io/collector/confmap/provider/envprovider + stable: true + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/confmap/provider/envprovider + file: + gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider + stable: true + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/confmap/provider/fileprovider + http: + gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider + stable: true + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/confmap/provider/httpprovider + https: + gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider + stable: true + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/confmap/provider/httpsprovider + yaml: + gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider + stable: true + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/confmap/provider/yamlprovider + googlesecretmanager: + gomod: github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/googlesecretmanagerprovider + docs_url: https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/confmap/provider/googlesecretmanagerprovider diff --git a/internal/distrogen/registry_test.go b/internal/distrogen/registry_test.go new file mode 100644 index 0000000000..2381c4127f --- /dev/null +++ b/internal/distrogen/registry_test.go @@ -0,0 +1,391 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "os" + "path/filepath" + "strings" + "testing" + + "gopkg.in/yaml.v3" + "gotest.tools/v3/assert" +) + +func registryTestData(filename string) string { return filepath.Join("testdata", "registry", filename) } + +func TestLoadEmbeddedRegistry(t *testing.T) { + registry, err := LoadEmbeddedRegistry() + assert.NilError(t, err) + assert.Assert(t, registry != nil) +} + +func TestLoadRegistry(t *testing.T) { + registry, err := LoadRegistry(registryTestData("basic_registry.yaml")) + assert.NilError(t, err) + assert.Assert(t, registry != nil) + assert.Assert(t, registry.Receivers["testreceiver"] != nil, "Expected 'testreceiver' to be loaded") + assert.Equal(t, registry.Receivers["testreceiver"].GoMod.URL, "github.com/test/receiver") + assert.Assert(t, registry.Processors["testprocessor"] != nil, "Expected 'testprocessor' to be loaded") + assert.Equal(t, registry.Processors["testprocessor"].GoMod.URL, "github.com/test/processor") + assert.Assert(t, registry.Exporters["testexporter"] != nil, "Expected 'testexporter' to be loaded") + assert.Equal(t, registry.Exporters["testexporter"].GoMod.URL, "github.com/test/exporter") + assert.Assert(t, registry.Connectors["testconnector"] != nil, "Expected 'testconnector' to be loaded") + assert.Equal(t, registry.Connectors["testconnector"].GoMod.URL, "github.com/test/connector") + assert.Assert(t, registry.Extensions["testextension"] != nil, "Expected 'testextension' to be loaded") + assert.Equal(t, registry.Extensions["testextension"].GoMod.URL, "github.com/test/extension") +} + +func TestLoadRegistry_Error(t *testing.T) { + testCases := []struct { + name string + path string + errCheck func(err error) bool + }{ + { + name: "Nonexistent File", + path: "nonexistent_file.yaml", + errCheck: func(err error) bool { + return os.IsNotExist(err) + }, + }, + { + name: "Invalid YAML", + path: "invalid_yaml.yaml", + errCheck: func(err error) bool { + // The yaml package doesn't return a typed error when the + // parsing fails so we have to use an ugly string compare. + // This yaml package is abandoned so it is unlikely to change + // any time soon. + return strings.Contains(err.Error(), "yaml: line") + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + _, err := LoadRegistry(registryTestData(tc.path)) + assert.Assert(t, tc.errCheck(err), "error check failed for %v", err) + }) + } +} + +func TestRegistry_Merge(t *testing.T) { + testCases := []struct { + name string + r1 func() *Registry + r2 func() *Registry + expectedReceivers int + expectedProcessors int + }{ + { + name: "Merge Different Components", + r1: func() *Registry { + r := NewRegistry() + r.Receivers = RegistryComponents{ + "receiver1": {GoMod: &GoModuleID{URL: "github.com/r1"}}, + } + return r + }, + r2: func() *Registry { + r := NewRegistry() + r.Receivers = RegistryComponents{ + "receiver2": {GoMod: &GoModuleID{URL: "github.com/r2"}}, + } + r.Processors = RegistryComponents{ + "processor1": {GoMod: &GoModuleID{URL: "github.com/p1"}}, + } + return r + }, + expectedReceivers: 2, + expectedProcessors: 1, + }, + { + name: "Override Existing Component", + r1: func() *Registry { + r := NewRegistry() + r.Receivers = RegistryComponents{ + "receiver1": {GoMod: &GoModuleID{URL: "github.com/r1"}}, + } + return r + }, + r2: func() *Registry { + r := NewRegistry() + r.Receivers = RegistryComponents{ + "receiver1": {GoMod: &GoModuleID{URL: "github.com/r2"}}, + } + return r + }, + expectedReceivers: 1, + expectedProcessors: 0, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + r1 := tc.r1() + r2 := tc.r2() + r1.Merge(r2) + assert.Equal(t, len(r1.Receivers), tc.expectedReceivers) + assert.Equal(t, len(r1.Processors), tc.expectedProcessors) + }) + } +} + +func TestGoModuleID_String(t *testing.T) { + testCases := []struct { + name string + gm *GoModuleID + expected string + }{ + { + name: "With Tag", + gm: &GoModuleID{URL: "github.com/test/module", Tag: "v1.2.3"}, + expected: "github.com/test/module v1.2.3", + }, + { + name: "Without Tag", + gm: &GoModuleID{URL: "github.com/test/module"}, + expected: "github.com/test/module v0.0.0", + }, + { + name: "Without Tag Allow Blank Tag", + gm: &GoModuleID{URL: "github.com/test/module", AllowBlankTag: true}, + expected: "github.com/test/module", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + assert.Equal(t, tc.gm.String(), tc.expected) + }) + } +} + +func TestGoModuleID_UnmarshalYAML(t *testing.T) { + testCases := []struct { + name string + input string + expectedURL string + expectedTag string + expectedError bool + }{ + { + name: "Valid Module ID with Tag", + input: "github.com/test/module v1.2.3", + expectedURL: "github.com/test/module", + expectedTag: "v1.2.3", + }, + { + name: "Valid Module ID without Tag", + input: "github.com/test/module", + expectedURL: "github.com/test/module", + expectedTag: "", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + var gm GoModuleID + node := yaml.Node{Value: tc.input} + err := gm.UnmarshalYAML(&node) + + if tc.expectedError { + assert.Error(t, err, "") + } else { + assert.NilError(t, err) + assert.Equal(t, gm.URL, tc.expectedURL) + assert.Equal(t, gm.Tag, tc.expectedTag) + } + }) + } +} + +func TestGoModuleID_MarshalYAML(t *testing.T) { + gm := &GoModuleID{URL: "github.com/test/module", Tag: "v1.2.3"} + result, err := gm.MarshalYAML() + assert.NilError(t, err) + assert.Equal(t, result.(string), "github.com/test/module v1.2.3") +} + +func TestRegistryComponent_RenderDocsURL(t *testing.T) { + testCases := []struct { + name string + docsURL string + expected string + }{ + { + name: "With Docs URL", + docsURL: "https://example.com/docs", + expected: "https://example.com/docs", + }, + { + name: "Without Docs URL", + docsURL: "", + expected: "No docs linked for component", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + c := &RegistryComponent{DocsURL: tc.docsURL} + assert.Equal(t, c.RenderDocsURL(), tc.expected) + }) + } +} + +func TestRegistryComponent_IsContrib(t *testing.T) { + testCases := []struct { + name string + url string + expected bool + }{ + { + name: "Is Contrib", + url: "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/test", + expected: true, + }, + { + name: "Is Not Contrib", + url: "github.com/test/module", + expected: false, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + c := &RegistryComponent{GoMod: &GoModuleID{URL: tc.url}} + assert.Equal(t, c.IsContrib(), tc.expected) + }) + } +} + +func TestRegistryComponent_ApplyOTelVersion(t *testing.T) { + otelVersion := otelComponentVersion{ + core: "1.2.3", + coreStable: "1.0.0", + contrib: "0.5.0", + } + + testCases := []struct { + name string + url string + stable bool + expected string + }{ + { + name: "Core Component", + url: "github.com/test/module", + expected: "v1.2.3", + }, + { + name: "Stable Core Component", + url: "github.com/test/module", + stable: true, + expected: "v1.0.0", + }, + { + name: "Contrib Component", + url: "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/test", + expected: "v0.5.0", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + c := &RegistryComponent{GoMod: &GoModuleID{URL: tc.url}, Stable: tc.stable} + c.ApplyOTelVersion(otelVersion) + assert.Equal(t, c.GoMod.Tag, tc.expected) + }) + } +} + +func TestRegistryComponent_GetOCBComponent(t *testing.T) { + gm := &GoModuleID{URL: "github.com/test/module", Tag: "v1.2.3"} + c := &RegistryComponent{GoMod: gm, Import: "github.com/test/module/test", Name: "test", Path: "test/path"} + ocb := c.GetOCBComponent() + assert.DeepEqual(t, ocb.GoMod, gm) + assert.Equal(t, ocb.Import, c.Import) + assert.Equal(t, ocb.Name, c.Name) + assert.Equal(t, ocb.Path, c.Path) +} + +func TestRegistryComponents_LoadAllComponents(t *testing.T) { + otelVersion := otelComponentVersion{core: "1.2.3", coreStable: "1.0.0", contrib: "0.5.0"} + rl := RegistryComponents{ + "component1": {GoMod: &GoModuleID{URL: "github.com/c1"}}, + "component2": {GoMod: &GoModuleID{URL: "github.com/c2"}}, + } + names := []string{"component1", "component2", "component3"} + components, errs := rl.LoadAllComponents(names, otelVersion) + assert.Equal(t, len(components), 2) + assert.Equal(t, len(errs), 1) + assert.ErrorContains(t, errs["component3"], "component not found") + assert.Equal(t, components["component1"].GoMod.Tag, "v1.2.3") +} + +func TestRegistryComponents_LoadComponent(t *testing.T) { + otelVersion := otelComponentVersion{core: "1.2.3", coreStable: "1.0.0", contrib: "0.5.0"} + rl := RegistryComponents{ + "component1": {GoMod: &GoModuleID{URL: "github.com/c1"}}, + } + component, err := rl.LoadComponent("component1", otelVersion) + assert.NilError(t, err) + assert.Equal(t, component.GoMod.URL, "github.com/c1") + assert.Equal(t, component.GoMod.Tag, "v1.2.3") + + _, err = rl.LoadComponent("nonexistent", otelVersion) + assert.ErrorIs(t, err, ErrComponentNotFound) +} + +func TestRegistryComponents_Validate(t *testing.T) { + rl := RegistryComponents{ + "component1": {GoMod: &GoModuleID{URL: "github.com/c1"}}, + } + err := rl.Validate() + assert.NilError(t, err) +} + +func TestRegistryComponents_RenderOCBComponents(t *testing.T) { + testCases := []struct { + name string + rl RegistryComponents + expected string + }{ + { + name: "Multiple Components", + rl: RegistryComponents{ + "component1": {GoMod: &GoModuleID{URL: "github.com/c1", Tag: "v1.0.0"}, Import: "github.com/c1/import", Name: "c1", Path: "c1/path"}, + "component2": {GoMod: &GoModuleID{URL: "github.com/a2", Tag: "v1.0.0"}, Import: "github.com/a2/import", Name: "a2", Path: "a2/path"}, + }, + expected: "github.com/a2", + }, + { + name: "Empty Components", + rl: RegistryComponents{}, + expected: "", + }, + } + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + result := tc.rl.RenderOCBComponents() + if tc.expected == "" { + assert.Equal(t, result, "") + } else { + assert.Assert(t, strings.Contains(result, tc.expected)) + } + }) + } +} diff --git a/internal/distrogen/templates.go b/internal/distrogen/templates.go new file mode 100644 index 0000000000..f42223b09e --- /dev/null +++ b/internal/distrogen/templates.go @@ -0,0 +1,248 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "bytes" + "embed" + "errors" + "fmt" + "io/fs" + "os" + "path/filepath" + "strings" + "text/template" +) + +const EMPTY_FILE_NAME = ".empty" + +//go:embed templates/component/* +var embeddedComponentTemplatesFS embed.FS + +//go:embed templates/components/* +var embeddedComponentsTemplatesFS embed.FS + +//go:embed templates/distribution/* +var embeddedDistributionTemplatesFS embed.FS + +//go:embed templates/make/* +var embeddedMakeTemplatesFS embed.FS + +//go:embed templates/project/* +var embeddedProjectTemplatesFS embed.FS + +//go:embed templates/scripts/* +var embeddedScriptsTemplatesFS embed.FS + +// TemplateFile is the information about a template file +// that will be rendered for a distribution. +type TemplateFile struct { + Name string + FilePath string + FSPath string + Context any + FS fs.FS + FileMode fs.FileMode +} + +func GenerateTemplateSet(outDir string, templateSet TemplateSet) error { + for _, tmpl := range templateSet { + if err := tmpl.Render(outDir); err != nil { + logger.Debug(fmt.Sprintf("failed to render %s", tmpl.Name), "err", err) + return err + } + } + return nil +} + +// outputPath gets the intended destination output path for the rendered template. +func (tf *TemplateFile) outputPath() string { + tfPath := strings.TrimSuffix(tf.FilePath, filepath.Base(tf.FilePath)) + return tfPath +} + +// getTextTemplate retrieves the text tempalte from the template file's +// provided filesystem. This may be the embedded filesystem or another +// set provided by the user. +func (tf *TemplateFile) getTextTemplate() (*template.Template, error) { + return template. + New(filepath.Base(tf.FilePath)). + ParseFS(tf.FS, tf.FilePath) +} + +// Render will render the template into a file in the +// requested destination. +func (tf *TemplateFile) Render(outDir string) error { + tmpl, err := tf.getTextTemplate() + if err != nil { + return err + } + buf := bytes.Buffer{} + if err := tmpl.Execute(&buf, tf.Context); err != nil { + return err + } + tmplPath := tf.outputPath() + if tmplPath != "" { + // If the template is meant to go in a sub-directory, we need to mkdir -p + // to make sure we can write the file to the directory it belongs in. + if err := os.MkdirAll(filepath.Join(outDir, tmplPath), fs.ModePerm); err != nil { + return err + } + } + generateFilePath := filepath.Join(outDir, tmplPath, tf.Name) + if err := os.WriteFile( + generateFilePath, + buf.Bytes(), + tf.FileMode, + ); err != nil { + return err + } + // HACK: WriteFile respects `umask` on the system but we don't want to. + // We truly do want read acces to any group in the files we create. + return os.Chmod(generateFilePath, tf.FileMode) +} + +var ( + ErrInvalidTemplateName = errors.New("invalid template name, must end with .go.tmpl") + ErrTemplateNotFound = errors.New("template not found") +) + +// TemplateSet is a map of template names to a template file. +type TemplateSet map[string]*TemplateFile + +// AddTemplate will add a template to the template set. If a template +// is added with a name that already exists, AddTemplate will overwrite +// the template it has. +func (ts TemplateSet) AddTemplate(path string, templateContext any, dir fs.FS, fileMode fs.FileMode) error { + name := filepath.Base(path) + ts[name] = &TemplateFile{ + FilePath: path, + FSPath: path, + Name: strings.TrimSuffix(name, ".go.tmpl"), + Context: templateContext, + FS: dir, + FileMode: fileMode, + } + return nil +} + +// GetTemplate will retrieve a template from the template set. +func (ts TemplateSet) GetTemplate(name string) (*TemplateFile, error) { + tf, ok := ts[name] + if !ok { + return nil, fmt.Errorf("%w: %s", ErrTemplateNotFound, name) + } + return tf, nil +} + +// RenameExceptionalTemplates will take known names from the TemplateSet +// and replace the rendering name with something else. This is generally +// used for templates that need to be named something different depending +// on the contents of the spec. +func (ts TemplateSet) RenameExceptionalTemplates(spec *DistributionSpec) { + if file, ok := ts["systemd-unit.service.go.tmpl"]; ok { + file.Name = spec.BinaryName + ".service" + } + if file, ok := ts["conf-file.conf.go.tmpl"]; ok { + file.Name = spec.BinaryName + ".conf" + } +} + +// GetTemplateSetFromDir will walk an FS for any *.go.tmpl files and +// will collect them into a TemplateSet. +func GetTemplateSetFromDir(dir fs.FS, templateContext any, fileMode fs.FileMode) (TemplateSet, error) { + templates := TemplateSet{} + + err := fs.WalkDir(dir, ".", func(path string, d fs.DirEntry, err error) error { + if err != nil { + return err + } + if d.IsDir() || !strings.HasSuffix(d.Name(), ".go.tmpl") { + return nil + } + if filepath.Base(path) == EMPTY_FILE_NAME { + return nil + } + return templates.AddTemplate(path, templateContext, dir, fileMode) + }) + + return templates, err +} + +func GetDistributionTemplateSet(templateContext any, fileMode fs.FileMode) (TemplateSet, error) { + embedFSSub, err := fs.Sub(embeddedDistributionTemplatesFS, filepath.Join("templates", "distribution")) + if err != nil { + return nil, err + } + return getEmbeddedTemplateSet(templateContext, embedFSSub, fileMode) +} + +func GetComponentsTemplateSet(templateContext any, fileMode fs.FileMode) (TemplateSet, error) { + embedFSSub, err := fs.Sub(embeddedComponentsTemplatesFS, filepath.Join("templates", "components")) + if err != nil { + return nil, err + } + return getEmbeddedTemplateSet(templateContext, embedFSSub, fileMode) +} + +func GetIndividualComponentTemplateSet(templateContext any, fileMode fs.FileMode) (TemplateSet, error) { + embedFSSub, err := fs.Sub(embeddedComponentTemplatesFS, filepath.Join("templates", "component")) + if err != nil { + return nil, err + } + return getEmbeddedTemplateSet(templateContext, embedFSSub, fileMode) +} + +func GetMakeTemplateSet(templateContext any, fileMode fs.FileMode) (TemplateSet, error) { + embedFSSub, err := fs.Sub(embeddedMakeTemplatesFS, filepath.Join("templates", "make")) + if err != nil { + return nil, err + } + return getEmbeddedTemplateSet(templateContext, embedFSSub, fileMode) +} + +func GetProjectTemplateSet(templateContext any, fileMode fs.FileMode) (TemplateSet, error) { + embedFSSub, err := fs.Sub(embeddedProjectTemplatesFS, filepath.Join("templates", "project")) + if err != nil { + return nil, err + } + return getEmbeddedTemplateSet(templateContext, embedFSSub, fileMode) +} + +func GetDistrogenTemplateSet(templateContext any, fileMode fs.FileMode) (TemplateSet, error) { + embedFSSub, err := fs.Sub(embeddedProjectTemplatesFS, filepath.Join("templates", "project", ".distrogen")) + if err != nil { + return nil, err + } + return getEmbeddedTemplateSet(templateContext, embedFSSub, fileMode) +} + +func GetScriptTemplateSet(templateContext any, fileMode fs.FileMode) (TemplateSet, error) { + embedFSSub, err := fs.Sub(embeddedScriptsTemplatesFS, filepath.Join("templates", "scripts")) + if err != nil { + return nil, err + } + return getEmbeddedTemplateSet(templateContext, embedFSSub, fileMode) +} + +// GetDistributionTemplateSet will get the template set from the template FS embedded +// into the distrogen binary. +func getEmbeddedTemplateSet(templateContext any, embeddedFs fs.FS, fileMode fs.FileMode) (TemplateSet, error) { + templates, err := GetTemplateSetFromDir(embeddedFs, templateContext, fileMode) + if err != nil { + return nil, err + } + return templates, nil +} diff --git a/internal/distrogen/templates/component/Makefile.go.tmpl b/internal/distrogen/templates/component/Makefile.go.tmpl new file mode 100644 index 0000000000..58fb2e4ed3 --- /dev/null +++ b/internal/distrogen/templates/component/Makefile.go.tmpl @@ -0,0 +1,3 @@ +include ../../../make/maintenance.mk +include ../../../make/common.mk +include ../../../make/otel_component.mk diff --git a/internal/distrogen/templates/component/go.mod.go.tmpl b/internal/distrogen/templates/component/go.mod.go.tmpl new file mode 100644 index 0000000000..4d5d8215c7 --- /dev/null +++ b/internal/distrogen/templates/component/go.mod.go.tmpl @@ -0,0 +1,3 @@ +module {{ .ModuleURL }} + +go {{ .Spec.GoMajorVersion }} \ No newline at end of file diff --git a/internal/distrogen/templates/component/metadata.yaml.go.tmpl b/internal/distrogen/templates/component/metadata.yaml.go.tmpl new file mode 100644 index 0000000000..23efed0975 --- /dev/null +++ b/internal/distrogen/templates/component/metadata.yaml.go.tmpl @@ -0,0 +1,6 @@ +type: {{ .Name }} + +status: + class: {{ .Type }} + stability: + development: [logs, metrics, traces] \ No newline at end of file diff --git a/internal/distrogen/templates/components/Makefile.go.tmpl b/internal/distrogen/templates/components/Makefile.go.tmpl new file mode 100644 index 0000000000..93f6819141 --- /dev/null +++ b/internal/distrogen/templates/components/Makefile.go.tmpl @@ -0,0 +1,30 @@ +.PHONY: update-components +update-components: export OTEL_VERSION := $(OTEL_VERSION) +update-components: export OTEL_CONTRIB_VERSION := $(OTEL_CONTRIB_VERSION) +update-components: update-deps tidy-components generate-components + +.PHONY: update-deps +update-deps: + TARGET="update-components" $(MAKE) target-all-modules + +.PHONY: generate-components +generate-components: + TARGET="generate" $(MAKE) target-all-modules + +.PHONY: tidy-components +tidy-components: + TARGET="tidy" $(MAKE) target-all-modules + +.PHONY: test-components +test-components: + TARGET="test" $(MAKE) target-all-modules + +.PHONY: target-all-modules +target-all-modules: +ifndef TARGET + @echo "No TARGET defined." +else + go list -f '{{`{{ .Dir }}`}}' -m | grep ".*$(PWD).*" | grep -v ".*internal/tools.*" |\ + GOWORK=off \ + xargs -t -I '{}' $(MAKE) -C {} $(TARGET) +endif diff --git a/internal/distrogen/templates/distribution/.goreleaser.yaml.go.tmpl b/internal/distrogen/templates/distribution/.goreleaser.yaml.go.tmpl new file mode 100644 index 0000000000..0796967bce --- /dev/null +++ b/internal/distrogen/templates/distribution/.goreleaser.yaml.go.tmpl @@ -0,0 +1,101 @@ +version: 2 +project_name: opentelemetry-operations-collector + +snapshot: + version_template: {{ .Version }} + +env: + - LD_FLAGS=-s -w + - CGO_ENABLED=0 # TODO: CGO is not supported in goreleaser yet. + - BUILD_FLAGS=-trimpath + - GOWORK=off + +builds: + - id: {{ .BinaryName }}-linux + goos: + - linux + goarch: + - amd64 + - arm64 + binary: {{ .BinaryName }} + dir: _build + ldflags: + - "-s -w" + flags: + - "-trimpath" + - "-buildvcs=false" + + - id: {{ .BinaryName }}-windows + goos: + - windows + goarch: + - amd64 + binary: {{ .BinaryName }} + dir: _build + ldflags: + - "-s -w" + flags: + - "-trimpath" + - "-buildvcs=false" + +nfpms: + - package_name: {{ .BinaryName }} + contents: + - src: {{ .SystemdServiceName }} + dst: /lib/systemd/system/{{ .SystemdServiceName }} + - src: {{ .SystemdConfFileName }} + dst: /etc/{{ .BinaryName }}/{{ .SystemdConfFileName }} + type: config|noreplace + file_info: + mode: 0644 + - src: config.yaml + dst: /etc/{{ .BinaryName }}/config.yaml + type: config|noreplace + file_info: + mode: 0644 + scripts: + preinstall: preinstall.sh + postinstall: postinstall.sh + preremove: preremove.sh + overrides: + rpm: + dependencies: + - /bin/sh + ids: + - {{ .BinaryName }}-linux + formats: + - deb + - rpm + umask: 0 + maintainer: Google Cloud Platform # something better than this + description: {{ .Description }} + license: Apache 2.0 + +archives: + - id: "{{ .BinaryName }}-tarball" + ids: + - "{{ .BinaryName }}-linux" + - "{{ .BinaryName }}-windows" + formats: + - "tar.gz" + name_template: "{{ .BinaryName }}_{{ "{{" }} .Version {{ "}}" }}_{{ "{{" }} .Os {{ "}}" }}_{{ "{{" }} .Arch {{ "}}" }}" + format_overrides: + - goos: windows + formats: + - "zip" + +signs: + - cmd: cosign + signature: ${artifact}.sig + certificate: ${artifact}.pem + args: + - "sign-blob" + - "--output-signature" + - "${signature}" + - "--output-certificate" + - "${certificate}" + - "${artifact}" + - "--yes" + artifacts: archive + env: + - SIGSTORE_NO_CACHE=true diff --git a/internal/distrogen/templates/distribution/Dockerfile.build.go.tmpl b/internal/distrogen/templates/distribution/Dockerfile.build.go.tmpl new file mode 100644 index 0000000000..f2cc87b395 --- /dev/null +++ b/internal/distrogen/templates/distribution/Dockerfile.build.go.tmpl @@ -0,0 +1,61 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +# This Dockerfile provides the same resulting container as +# the main Dockerfile, but it also performs the build within +# an earlier layer. The resulting container will be scratch and +# should be functionally identical. + +# By default, this container should have the root of your project +# where all distributions are container. The generated version will +# use the respective distribution as the working directory for builds. +# The whole project is copied to the container in case you provide +# any custom components contained within your full project structure. +ARG PROJECT_ROOT="." +ARG CERT_CONTAINER="alpine:3" +{{ if eq .BuildContainer "debian" -}} +ARG BUILD_CONTAINER="debian" +FROM --platform=${BUILDPLATFORM:-linux/amd64} ${BUILD_CONTAINER} AS build + +RUN apt-get update && apt-get install -y make curl{{ if .CollectorCGO }} build-essential{{ end }} + +{{ else -}} +ARG BUILD_CONTAINER="alpine" +FROM --platform=${BUILDPLATFORM:-linux/amd64} ${BUILD_CONTAINER} AS build + +RUN apk --update add make curl{{ if .CollectorCGO }} alpine-sdk{{ end }} + +{{ end -}} + +ARG PROJECT_ROOT +COPY ${PROJECT_ROOT} / + +WORKDIR /{{ .Name }} + +ARG BUILDARCH +ARG BUILDOS +ARG TARGETOS +ARG TARGETARCH +{{ if .CollectorCGO -}} +RUN if [ "${TARGETARCH}" = "arm64" ] && [ "${BUILDARCH}" != "arm64" ]; then \ + apt-get install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross; \ + CC=aarch64-linux-gnu-gcc; \ + fi && \ + CC=${CC} make build +{{ else -}} +RUN make build +{{ end -}} + +FROM ${CERT_CONTAINER} AS certs +RUN apk --update add ca-certificates + +FROM scratch + +ARG USER_UID=10001 +USER ${USER_UID} + +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --from=build --chmod=755 /{{ .Name }}/{{ .BinaryName }} /{{ .BinaryName }} +COPY --from=build --chmod=644 /{{ .Name }}/config.yaml /etc/{{ .BinaryName }}/config.yaml + +ENTRYPOINT ["/{{ .BinaryName }}"{{ $length := len .FeatureGates }}{{ if gt $length 0 }}, "--feature-gates={{ .FeatureGates.Render }}"{{ end }}] +CMD ["--config=/etc/{{ .BinaryName }}/config.yaml"] diff --git a/internal/distrogen/templates/distribution/Dockerfile.go.tmpl b/internal/distrogen/templates/distribution/Dockerfile.go.tmpl new file mode 100644 index 0000000000..0d064eb0dd --- /dev/null +++ b/internal/distrogen/templates/distribution/Dockerfile.go.tmpl @@ -0,0 +1,15 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +FROM alpine:3.19 as certs +RUN apk --update add ca-certificates + +FROM scratch + +ARG USER_UID=10001 +USER ${USER_UID} + +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --chmod=755 {{ .BinaryName }} /{{ .BinaryName }} +COPY config.yaml /etc/{{ .BinaryName }}/config.yaml +ENTRYPOINT ["/{{ .BinaryName }}"{{ $length := len .FeatureGates }}{{ if gt $length 0 }}, "--feature-gates={{ .FeatureGates.Render }}"{{ end }}] +CMD ["--config=/etc/{{ .BinaryName }}/config.yaml"] diff --git a/internal/distrogen/templates/distribution/Dockerfile.goreleaser_releaser.go.tmpl b/internal/distrogen/templates/distribution/Dockerfile.goreleaser_releaser.go.tmpl new file mode 100644 index 0000000000..05cf29f356 --- /dev/null +++ b/internal/distrogen/templates/distribution/Dockerfile.goreleaser_releaser.go.tmpl @@ -0,0 +1,32 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +# This Dockerfile provides the same resulting container as +# the main Dockerfile, but it also performs the build within +# an earlier layer. The resulting container will be scratch and +# should be functionally identical. + +# By default, this container should have the root of your project +# where all distributions are container. The generated version will +# use the respective distribution as the working directory for builds. +# The whole project is copied to the container in case you provide +# any custom components contained within your full project structure. +ARG PROJECT_ROOT="." +{{ if eq .BuildContainer "debian" -}} +ARG BUILD_CONTAINER="debian" +FROM ${BUILD_CONTAINER} AS build + +RUN apt-get update && apt-get install -y make curl git{{ if .CollectorCGO }} build-essential{{ end }} + +{{ else -}} +ARG BUILD_CONTAINER="alpine" +FROM ${BUILD_CONTAINER} AS build + +RUN apk --update add make curl git{{ if .CollectorCGO }} alpine-sdk{{ end }} + +{{ end -}} + +ARG PROJECT_ROOT +COPY ${PROJECT_ROOT} / + +WORKDIR /{{ .Name }} +RUN make goreleaser-release diff --git a/internal/distrogen/templates/distribution/Makefile.go.tmpl b/internal/distrogen/templates/distribution/Makefile.go.tmpl new file mode 100644 index 0000000000..41ea45d963 --- /dev/null +++ b/internal/distrogen/templates/distribution/Makefile.go.tmpl @@ -0,0 +1,238 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +DISTRIBUTION_NAME = {{ .Name }} + +# Variables filled in from distro specification +VERSION ?= {{ .Version }} +OTEL_VERSION ?= {{ .OpenTelemetryVersion }} +OTEL_VERSION_TAG = v$(OTEL_VERSION) +COLLECTOR_BINARY_NAME = {{ .BinaryName }} +COLLECTOR_BUILD_TEMP_DIR = $(PWD)/_build +COLLECTOR_CGO = {{ if .CollectorCGO }}1{{else}}0{{end}} +COLLECTOR_BUILDVCS ?= false +COLLECTOR_BUILD_TAGS ?= {{ .BuildTags }} + +{{ if ne .DockerRepo "" -}} +DOCKER_REPO ?= {{ .DockerRepo }} +{{ end -}} +DOCKER_LOCAL_IMAGE_TAG ?= $(COLLECTOR_BINARY_NAME) +DOCKER_IMAGE_TAG = $(DOCKER_REPO)/$(COLLECTOR_BINARY_NAME):$(VERSION) + +# Tools Variables + +TOOLS_DIR = $(PWD)/.tools + +OCB_BIN ?= $(TOOLS_DIR)/ocb + +GO_VERSION = {{ .GoVersion }} +GO_BIN_DIR ?= $(TOOLS_DIR)/go/bin +GO_BIN ?= $(GO_BIN_DIR)/go +SET_GO_BIN_PATH ?= PATH="$(GO_BIN_DIR):$$PATH" + +USE_GO_PROXY ?= {{ .GoProxy }} + +GORELEASER_BIN ?= $(TOOLS_DIR)/goreleaser + +COSIGN_BIN ?= $(TOOLS_DIR)/cosign +SET_COSIGN_BIN_PATH ?= PATH="$(TOOLS_DIR):$$PATH" + +.PHONY: build +build: $(COLLECTOR_BINARY_NAME) + +.PHONY: image +image: image-build image-push + +.PHONY: image-full +image-full: image-build-full image-push + +.PHONY: clean +clean: clean-tools clean-collector + +.PHONY: install-tools +install-tools: go ocb + +################### +# Image Build +################### +# These targets are for building a collector image +# and pushing it to a Docker repo. + +BUILDOS ?= linux +BUILDARCH ?= amd64 +TARGETOS ?= linux +TARGETARCH ?= amd64 + +DOCKER_BUILDER ?= amd-arm-builder + +.PHONY: multiplatform-builder +multiplatform-builder: + docker buildx create \ + --name $(DOCKER_BUILDER) \ + --driver docker-container \ + --bootstrap + +# Using a local collector binary, build an image +# that uses this collector. +.PHONY: image-build +image-build: $(COLLECTOR_BINARY_NAME) + docker buildx build -t $(DOCKER_LOCAL_IMAGE_TAG) . + +# Build an image by leveraging Dockerfile.build, which will +# build the collector binary within Docker as well. +.PHONY: image-build-full +image-build-full: + docker buildx build \ + -f Dockerfile.build \ + -t $(DOCKER_LOCAL_IMAGE_TAG) .. + +.PHONY: image-build-cross-platform +image-build-cross-platform: +ifndef DOCKER_REPO + $(error "Must set DOCKER_REPO to push") +endif + docker buildx build \ + --builder $(DOCKER_BUILDER) \ + --platform linux/amd64,linux/arm64 \ + -t $(DOCKER_IMAGE_TAG) \ + --push \ + -f Dockerfile.build .. + +# After an image is built, pushes it to the specified docker repository. +.PHONY: image-push +image-push: +ifndef DOCKER_REPO + $(error "Must set DOCKER_REPO to push") +endif + docker tag $(DOCKER_LOCAL_IMAGE_TAG) $(DOCKER_IMAGE_TAG) + docker push $(DOCKER_IMAGE_TAG) + +################### +# Collector Build +################### +# These targets are for building a collector binary. + +# Unconditionally build a new collector. +.PHONY: collector-build +collector-build: clean-collector $(COLLECTOR_BINARY_NAME) + +.PHONY: ocb-generate +ocb-generate: $(OCB_BIN) + $(SET_GO_BIN_PATH) $(if $(USE_GO_PROXY),GOPROXY=$(USE_GO_PROXY),) $(OCB_BIN) --skip-compilation --verbose --config manifest.yaml + +COLLECTOR_LD_FLAGS ?= +COLLECTOR_LD_FLAGS_STRIP ?= -s -w +COLLECTOR_LD_FLAGS_STATIC_LINK ?= {{ if .BoringCrypto }}-linkmode=external -extldflags=-static{{ end }} + +# Using OCB and the local manifest file, build a collector. +$(COLLECTOR_BINARY_NAME): ocb-generate + cd $(COLLECTOR_BUILD_TEMP_DIR) && \ + GOWORK=off \ + {{ if .BoringCrypto -}} + GOEXPERIMENT=boringcrypto \ + {{ end -}} + CGO_ENABLED=$(COLLECTOR_CGO) \ + GOOS=$(TARGETOS) GOARCH=$(TARGETARCH) \ + $(GO_BIN) build \ + -buildvcs=$(COLLECTOR_BUILDVCS) \ + -tags=$(COLLECTOR_BUILD_TAGS) \ + -ldflags="$(COLLECTOR_LD_FLAGS_STRIP) $(COLLECTOR_LD_FLAGS_STATIC_LINK) $(COLLECTOR_LD_FLAGS)" \ + -o ../{{ .BinaryName }} \ + . + $(MAKE) clean-build-dir + +.PHONY: collector-module-list +collector-module-list: ocb-generate + cd $(COLLECTOR_BUILD_TEMP_DIR) && \ + GOWORK=off go list -deps -f '{{`{{ .Module }}`}}' ./... |\ + grep -v '' |\ + sort -u > ../packages.txt + +# Delete any existing built collector binary. +.PHONY: clean-collector +clean-collector: clean-build-dir + rm -f $(COLLECTOR_BINARY_NAME) + +.PHONY: clean-build-dir +clean-build-dir: + rm -rf $(COLLECTOR_BUILD_TEMP_DIR) + +################### +# Goreleaser build +################### +# These targets are for invoking goreleaser. + +.PHONY: goreleaser-release +goreleaser-release: $(GORELEASER_BIN) $(COSIGN_BIN) ocb-generate + $(SET_GO_BIN_PATH) $(SET_COSIGN_BIN_PATH) $(GORELEASER_BIN) release --snapshot --clean + # I love umask it's my favourite + chmod -R o+r ./dist + +.PHONY: local-container-goreleaser +local-container-goreleaser: + docker buildx build \ + --progress=plain \ + -t $(COLLECTOR_BINARY_NAME)-build \ + -f Dockerfile.goreleaser_releaser \ + .. + CONTAINER_ID=$$(docker create $(COLLECTOR_BINARY_NAME)-build) && \ + docker cp $$CONTAINER_ID:/$(DISTRIBUTION_NAME)/dist . &&\ + docker rm --force $$CONTAINER_ID + +################### +# Tools +################### +# These targets are for installing separate tools +# required for the build process. + +.PHONY: ocb +ocb: $(OCB_BIN) + +.PHONY: go +go: $(GO_BIN) + +.PHONY: goreleaser +goreleaser: $(GORELEASER_BIN) + +.PHONY: cosign +cosign: $(COSIGN_BIN) + +# Install the required version of Go. +$(GO_BIN): GO_ARCHIVE = go$(GO_VERSION).$(BUILDOS)-$(BUILDARCH).tar.gz +$(GO_BIN): + @{ \ + set -e ;\ + mkdir -p $(TOOLS_DIR) ;\ + echo "Installing go$(GO_VERSION) at $(TOOLS_DIR)" ;\ + curl -LO https://go.dev/dl/$(GO_ARCHIVE) ;\ + tar -C $(TOOLS_DIR) -xzf $(GO_ARCHIVE) ;\ + rm $(GO_ARCHIVE) ;\ + } + +$(OCB_BIN): $(GO_BIN) + @{ \ + set -e ;\ + mkdir -p $(TOOLS_DIR) ;\ + echo "Installing ocb at $(TOOLS_DIR)" ;\ + GOBIN=$(TOOLS_DIR) $(if $(USE_GO_PROXY),GOPROXY=$(USE_GO_PROXY),) CGO_ENABLED=0 GOARCH=$(BUILDARCH) $(GO_BIN) install -trimpath -ldflags="-s -w" go.opentelemetry.io/collector/cmd/builder@$(OTEL_VERSION_TAG) ;\ + mv $(TOOLS_DIR)/builder $(OCB_BIN) ;\ + } + +$(GORELEASER_BIN): $(GO_BIN) $(OCB_BIN) + @{ \ + set -e ;\ + mkdir -p $(TOOLS_DIR) ;\ + echo "Installing goreleaser at $(TOOLS_DIR)" ;\ + GOBIN=$(TOOLS_DIR) CGO_ENABLED=0 $(GO_BIN) install -trimpath -ldflags="-s -w" github.com/goreleaser/goreleaser/v2@latest ;\ + } + +$(COSIGN_BIN): $(GO_BIN) $(OCB_BIN) + @{ \ + set -e ;\ + mkdir -p $(TOOLS_DIR) ;\ + echo "Installing cosign at $(TOOLS_DIR)" ;\ + GOBIN=$(TOOLS_DIR) CGO_ENABLED=0 $(GO_BIN) install -trimpath -ldflags="-s -w" github.com/sigstore/cosign/v2/cmd/cosign@latest ;\ + } + +.PHONY: clean-tools +clean-tools: + rm -rf $(TOOLS_DIR) diff --git a/internal/distrogen/templates/distribution/README.md.go.tmpl b/internal/distrogen/templates/distribution/README.md.go.tmpl new file mode 100644 index 0000000000..0f5e0dce07 --- /dev/null +++ b/internal/distrogen/templates/distribution/README.md.go.tmpl @@ -0,0 +1,53 @@ +# {{ .DisplayName }} + +{{ .Blurb }} + +# Components + +## Receivers + +| Component Name | Documentation | +| -------------- | ------------- | +{{ range $name, $component := .Receivers -}} +| {{ $name }} | [docs]({{ $component.RenderDocsURL }}) | +{{ end }} + +## Processors + +| Component Name | Documentation | +| -------------- | ------------- | +{{ range $name, $component := .Processors -}} +| {{ $name }} | [docs]({{ $component.RenderDocsURL }}) | +{{ end }} + +## Exporters + +| Component Name | Documentation | +| -------------- | ------------- | +{{ range $name, $component := .Exporters -}} +| {{ $name }} | [docs]({{ $component.RenderDocsURL }}) | +{{ end }} + +## Extensions + +| Component Name | Documentation | +| -------------- | ------------- | +{{ range $name, $component := .Extensions -}} +| {{ $name }} | [docs]({{ $component.RenderDocsURL }}) | +{{ end }} + +## Connectors + +| Component Name | Documentation | +| -------------- | ------------- | +{{ range $name, $component := .Connectors -}} +| {{ $name }} | [docs]({{ $component.RenderDocsURL }}) | +{{ end }} + +## Providers + +| Component Name | Documentation | +| -------------- | ------------- | +{{ range $name, $component := .Providers -}} +| {{ $name }} | [docs]({{ $component.RenderDocsURL }}) | +{{ end }} diff --git a/internal/distrogen/templates/distribution/conf-file.conf.go.tmpl b/internal/distrogen/templates/distribution/conf-file.conf.go.tmpl new file mode 100644 index 0000000000..d2df449935 --- /dev/null +++ b/internal/distrogen/templates/distribution/conf-file.conf.go.tmpl @@ -0,0 +1,5 @@ +# Systemd environment file for the {{ .BinaryName }} service + +# Command-line options for the {{ .BinaryName }} service. +# Run `/usr/bin/{{ .BinaryName }} --help` to see all available options. +OTELCOL_OPTIONS="--config=/etc/{{ .BinaryName }}/config.yaml" diff --git a/internal/distrogen/templates/distribution/config.yaml.go.tmpl b/internal/distrogen/templates/distribution/config.yaml.go.tmpl new file mode 100644 index 0000000000..45f4c5b9b3 --- /dev/null +++ b/internal/distrogen/templates/distribution/config.yaml.go.tmpl @@ -0,0 +1 @@ +# NOTE: File generated by distrogen. Do not manually edit. diff --git a/internal/distrogen/templates/distribution/manifest.yaml.go.tmpl b/internal/distrogen/templates/distribution/manifest.yaml.go.tmpl new file mode 100644 index 0000000000..5222022413 --- /dev/null +++ b/internal/distrogen/templates/distribution/manifest.yaml.go.tmpl @@ -0,0 +1,23 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +dist: + module: {{ .Module }} + name: {{ .BinaryName }} + description: {{ .Description }} + version: {{ .Version }} + output_path: ./_build + +receivers: +{{ .Receivers.RenderOCBComponents }} +processors: +{{ .Processors.RenderOCBComponents }} +exporters: +{{ .Exporters.RenderOCBComponents }} +extensions: +{{ .Extensions.RenderOCBComponents }} +connectors: +{{ .Connectors.RenderOCBComponents }} +providers: +{{ .Providers.RenderOCBComponents }} +replaces: +{{ .Replaces.Render }} diff --git a/internal/distrogen/templates/distribution/postinstall.sh.go.tmpl b/internal/distrogen/templates/distribution/postinstall.sh.go.tmpl new file mode 100644 index 0000000000..52d45d3e55 --- /dev/null +++ b/internal/distrogen/templates/distribution/postinstall.sh.go.tmpl @@ -0,0 +1,11 @@ +if command -v systemctl >/dev/null 2>&1; then + if [ -d /run/systemd/system ]; then + systemctl daemon-reload + fi + systemctl enable {{ .BinaryName }}.service + if [ -f /etc/{{ .BinaryName }}/config.yaml ]; then + if [ -d /run/systemd/system ]; then + systemctl restart {{ .BinaryName }}.service + fi + fi +fi diff --git a/internal/distrogen/templates/distribution/preinstall.sh.go.tmpl b/internal/distrogen/templates/distribution/preinstall.sh.go.tmpl new file mode 100644 index 0000000000..a93b8debb4 --- /dev/null +++ b/internal/distrogen/templates/distribution/preinstall.sh.go.tmpl @@ -0,0 +1 @@ +getent passwd {{ .BinaryName }} >/dev/null || useradd --system --user-group --no-create-home --shell /sbin/nologin {{ .BinaryName }} diff --git a/internal/distrogen/templates/distribution/preremove.sh.go.tmpl b/internal/distrogen/templates/distribution/preremove.sh.go.tmpl new file mode 100644 index 0000000000..78bb9c1cf0 --- /dev/null +++ b/internal/distrogen/templates/distribution/preremove.sh.go.tmpl @@ -0,0 +1,6 @@ +if [ "$1" != "1" ]; then + if command -v systemctl >/dev/null 2>&1; then + systemctl stop {{ .BinaryName }}.service + systemctl disable {{ .BinaryName }}.service + fi +fi diff --git a/internal/distrogen/templates/distribution/systemd-unit.service.go.tmpl b/internal/distrogen/templates/distribution/systemd-unit.service.go.tmpl new file mode 100644 index 0000000000..369c30910a --- /dev/null +++ b/internal/distrogen/templates/distribution/systemd-unit.service.go.tmpl @@ -0,0 +1,15 @@ +[Unit] +Description={{ .Description }} +After=network.target + +[Service] +EnvironmentFile=/etc/{{ .BinaryName }}/{{ .BinaryName }}.conf +ExecStart=/usr/bin/{{ .BinaryName }} $OTELCOL_OPTIONS +KillMode=mixed +Restart=on-failure +Type=simple +User={{ .BinaryName }} +Group={{ .BinaryName }} + +[Install] +WantedBy=multi-user.target diff --git a/internal/distrogen/templates/make/common.mk.go.tmpl b/internal/distrogen/templates/make/common.mk.go.tmpl new file mode 100644 index 0000000000..f6dfdc265b --- /dev/null +++ b/internal/distrogen/templates/make/common.mk.go.tmpl @@ -0,0 +1,12 @@ +# TODO: This could be better +.PHONY: test +test: + go test ./... + +.PHONY: tidy +tidy: + go mod tidy + +.PHONY: generate +generate: + go generate ./... diff --git a/internal/distrogen/templates/make/gpu_common.mk.go.tmpl b/internal/distrogen/templates/make/gpu_common.mk.go.tmpl new file mode 100644 index 0000000000..5286e85cfd --- /dev/null +++ b/internal/distrogen/templates/make/gpu_common.mk.go.tmpl @@ -0,0 +1,19 @@ +# TODO: This could be better +# In gpu receivers, we run test twice. Once with gpu support and once without. +# Both need to pass for the component to be "passing tests". +.PHONY: test +test: + go test ./... + go test -tags=gpu ./... + +.PHONY: tidy +tidy: + go mod tidy + +# We don't want to use the `generated_component_test.go` from mdatagen +# because it doesn't account for the expected error when gpu support +# is turned off. +.PHONY: generate +generate: + go generate -tags=gpu ./... + rm generated_component_test.go \ No newline at end of file diff --git a/internal/distrogen/templates/make/maintenance.mk.go.tmpl b/internal/distrogen/templates/make/maintenance.mk.go.tmpl new file mode 100644 index 0000000000..8b46838a2d --- /dev/null +++ b/internal/distrogen/templates/make/maintenance.mk.go.tmpl @@ -0,0 +1,10 @@ +.PHONY: update-go-module +update-go-module: GO_MOD_VERSION ?= latest +update-go-module: +ifndef GO_MOD + @echo "Missing a GO_MOD to update" +else + @FOUND_MOD=$$(go list -m all | grep '^$(GO_MOD)') && \ + [ -n "$$FOUND_MOD" ] && \ + go get -u $(GO_MOD)@$(GO_MOD_VERSION) || echo "module $(GO_MOD) not found in ${PWD}" +endif diff --git a/internal/distrogen/templates/make/otel_component.mk.go.tmpl b/internal/distrogen/templates/make/otel_component.mk.go.tmpl new file mode 100644 index 0000000000..a6eaa123b6 --- /dev/null +++ b/internal/distrogen/templates/make/otel_component.mk.go.tmpl @@ -0,0 +1,45 @@ +DISTROGEN_BIN ?= distrogen + +OTEL_VERSION ?= latest +OTEL_CONTRIB_VERSION ?= latest + +STABLE_COMPONENTS_PATTERN = -e "^go.opentelemetry.io/collector/pdata" \ + -e "^go.opentelemetry.io/collector/featuregate" \ + -e "^go.opentelemetry.io/collector/client" \ + -e "^go.opentelemetry.io/collector/featuregate" \ + -e "^go.opentelemetry.io/collector/pdata" \ + -e "^go.opentelemetry.io/collector/confmap" \ + -e "^go.opentelemetry.io/collector/confmap/provider/envprovider" \ + -e "^go.opentelemetry.io/collector/confmap/provider/fileprovider" \ + -e "^go.opentelemetry.io/collector/confmap/provider/httpprovider" \ + -e "^go.opentelemetry.io/collector/confmap/provider/httpsprovider" \ + -e "^go.opentelemetry.io/collector/confmap/provider/yamlprovider" \ + -e "^go.opentelemetry.io/collector/config/configopaque" \ + -e "^go.opentelemetry.io/collector/config/configcompression" \ + -e "^go.opentelemetry.io/collector/config/configretry" \ + -e "^go.opentelemetry.io/collector/config/configtls" \ + -e "^go.opentelemetry.io/collector/config/confignet" \ + -e "^go.opentelemetry.io/collector/consumer" + +LIST_DIRECT_MODULES = go list -m -f '{{`{{if not (or .Indirect .Main)}}{{.Path}}{{end}}`}}' all +INCLUDE_COLLECTOR_CORE_COMPONENTS = grep "^go.opentelemetry.io" | grep -v "^go.opentelemetry.io/otel" +INCLUDE_COLLECTOR_STABLE_CORE_COMPONENTS = grep $(STABLE_COMPONENTS_PATTERN) +EXCLUDE_COLLECTOR_STABLE_CORE_COMPONENTS = grep -v $(STABLE_COMPONENTS_PATTERN) +INCLUDE_CONTRIB_COMPONENTS = grep "^github.com/open-telemetry/opentelemetry-collector-contrib" +GO_GET_ALL = xargs --no-run-if-empty -t -I '{}' go get -tags=gpu {} + +.PHONY: update-components +update-components: core-components contrib-components + +.PHONY: core-components +core-components: + $(LIST_DIRECT_MODULES) | \ + $(INCLUDE_COLLECTOR_CORE_COMPONENTS) | \ + $(DISTROGEN_BIN) otel_component_versions -otel_version $(OTEL_VERSION) | \ + $(GO_GET_ALL) + +.PHONY: contrib-components +contrib-components: + $(LIST_DIRECT_MODULES) | \ + $(INCLUDE_CONTRIB_COMPONENTS) | \ + $(GO_GET_ALL)@$(OTEL_CONTRIB_VERSION) diff --git a/internal/distrogen/templates/project/.distrogen/VERSION.go.tmpl b/internal/distrogen/templates/project/.distrogen/VERSION.go.tmpl new file mode 100644 index 0000000000..4e287bb7fc --- /dev/null +++ b/internal/distrogen/templates/project/.distrogen/VERSION.go.tmpl @@ -0,0 +1 @@ +{{ .Spec.DistrogenVersion }} diff --git a/internal/distrogen/templates/project/Makefile.go.tmpl b/internal/distrogen/templates/project/Makefile.go.tmpl new file mode 100644 index 0000000000..d4ca3a64e9 --- /dev/null +++ b/internal/distrogen/templates/project/Makefile.go.tmpl @@ -0,0 +1,93 @@ +include ./make/common.mk +include ./make/maintenance.mk + +MAKEFLAGS += --no-print-directory + +SPEC_FILE = {{ .Spec.Path }} + +####### +# Tools +####### + +TOOLS_DIR ?= $(PWD)/.tools +DISTROGEN_BIN ?= $(TOOLS_DIR)/distrogen +MDATAGEN_BIN ?= $(TOOLS_DIR)/mdatagen + +$(DISTROGEN_BIN): + $(MAKE) tools-dir + GOBIN=$(TOOLS_DIR) go install github.com/GoogleCloudPlatform/opentelemetry-operations-collector/cmd/distrogen@$(shell cat .distrogen/VERSION) + +$(MDATAGEN_BIN): + $(MAKE) tools-dir + GOBIN=$(TOOLS_DIR) bash ./scripts/download_mdatagen.sh v$(OTEL_VERSION) + +# This is a PHONY target cause if you make it as a normal recipe +# it gets very confused because the creation date of the .tools +# directory is newer than the tools inside it. +.PHONY: tools-dir +tools-dir: + @mkdir -p $(TOOLS_DIR) + +.PHONY: distrogen +distrogen: $(DISTROGEN_BIN) + +########################## +# Updating OTel Components +########################## + +COMPONENT_DIR = components + +update-otel-components: workspace-update $(MDATAGEN_BIN) + export PATH="$(TOOLS_DIR):${PATH}" && cd components &&\ + $(MAKE) OTEL_VERSION=v$(OTEL_VERSION) OTEL_CONTRIB_VERSION=v$(OTEL_CONTRIB_VERSION) update-components + +.PHONY: test-otel-components +test-otel-components: go.work + cd $(COMPONENT_DIR) && $(MAKE) test-components + +.PHONY: tidy-otel-components +tidy-otel-components: go.work + cd $(COMPONENT_DIR) && $(MAKE) tidy-components + +################### +# Distro Generation +################### + +GEN_OTEL = $(DISTROGEN_BIN) generate --spec $(SPEC_FILE) \ + --registry ./components/registry.yaml \ + --templates ./templates + +.PHONY: gen +gen: distrogen + @$(GEN_OTEL) + +.PHONY: regen +regen: distrogen + @$(GEN_OTEL) --force + +regen-v: distrogen + @$(GEN_OTEL) --force -v + +########### +# Workspace +########### + +ALL_DIRECTORIES = find . -type d -print0 +EXCLUDE_TOOLS_DIRS = grep -z -v ".*\.tools.*" +EXCLUDE_BUILD_DIRS = grep -z -v -e ".*_build.*" -e ".*dist.*" + +go.work: + go work init + $(MAKE) workspace-update + +.PHONY: workspace-update +workspace-update: go.work + $(ALL_DIRECTORIES) |\ + $(EXCLUDE_TOOLS_DIRS) |\ + $(EXCLUDE_BUILD_DIRS) |\ + xargs -0 go work use + +.PHONY: clean-workspace +clean-workspace: + rm -f go.work + rm -f go.work.sum diff --git a/internal/distrogen/templates/project/go.mod.go.tmpl b/internal/distrogen/templates/project/go.mod.go.tmpl new file mode 100644 index 0000000000..f5c3fdf68c --- /dev/null +++ b/internal/distrogen/templates/project/go.mod.go.tmpl @@ -0,0 +1,4 @@ +module {{ .Spec.Module }} + +go {{ .Spec.RenderGoMajorVersion }} + diff --git a/internal/distrogen/templates/scripts/download_mdatagen.sh.go.tmpl b/internal/distrogen/templates/scripts/download_mdatagen.sh.go.tmpl new file mode 100644 index 0000000000..f344ac018d --- /dev/null +++ b/internal/distrogen/templates/scripts/download_mdatagen.sh.go.tmpl @@ -0,0 +1,23 @@ +#!/bin/bash + +# This script will download mdatagen at the otel version specified in the first argument. +# This script is needed to circumvent this issue: +# https://github.com/open-telemetry/opentelemetry-collector/issues/9281 + +set -e + +OTEL_VERSION=$1 + +if [[ -z "$OTEL_VERSION" ]]; then + echo "Please specify the OpenTelemetry Collector version to use." + exit 1 +fi + +TMP_DIR=$(mktemp -d) + +cd $TMP_DIR +go mod init tempmod +go get -u go.opentelemetry.io/collector/cmd/mdatagen@$OTEL_VERSION +go install go.opentelemetry.io/collector/cmd/mdatagen + +rm -rf $TMP_DIR diff --git a/internal/distrogen/testdata/generator/boringcrypto/golden/.goreleaser.yaml b/internal/distrogen/testdata/generator/boringcrypto/golden/.goreleaser.yaml new file mode 100644 index 0000000000..23b011c1ee --- /dev/null +++ b/internal/distrogen/testdata/generator/boringcrypto/golden/.goreleaser.yaml @@ -0,0 +1,72 @@ +version: 2 +project_name: opentelemetry-operations-collector + +snapshot: + version_template: 0.121.0 + +env: + - LD_FLAGS=-s -w + - CGO_ENABLED=0 # TODO: CGO is not supported in goreleaser yet. + - BUILD_FLAGS=-trimpath + - GOWORK=off + +builds: + - id: otelcol-basic-linux + goos: + - linux + goarch: + - amd64 + - arm64 + binary: otelcol-basic + dir: _build + ldflags: + - "-s -w" + flags: + - "-trimpath" + - "-buildvcs=false" + + - id: otelcol-basic-windows + goos: + - windows + goarch: + - amd64 + binary: otelcol-basic + dir: _build + ldflags: + - "-s -w" + flags: + - "-trimpath" + - "-buildvcs=false" + +nfpms: + - package_name: otelcol-basic + contents: + - src: otelcol-basic.service + dst: /lib/systemd/system/otelcol-basic.service + - src: otelcol-basic.conf + dst: /etc/otelcol-basic/otelcol-basic.conf + type: config|noreplace + file_info: + mode: 0644 + - src: config.yaml + dst: /etc/otelcol-basic/config.yaml + type: config|noreplace + file_info: + mode: 0644 + scripts: + preinstall: preinstall.sh + postinstall: postinstall.sh + preremove: preremove.sh + overrides: + rpm: + dependencies: + - /bin/sh + ids: + - otelcol-basic-linux + formats: + - deb + - rpm + umask: 0 + maintainer: Google Cloud Platform # something better than this + description: A basic distribution of the OpenTelemetry Collector + license: Apache 2.0 diff --git a/internal/distrogen/testdata/generator/boringcrypto/golden/Dockerfile b/internal/distrogen/testdata/generator/boringcrypto/golden/Dockerfile new file mode 100644 index 0000000000..1c2507f8d7 --- /dev/null +++ b/internal/distrogen/testdata/generator/boringcrypto/golden/Dockerfile @@ -0,0 +1,15 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +FROM alpine:3.19 as certs +RUN apk --update add ca-certificates + +FROM scratch + +ARG USER_UID=10001 +USER ${USER_UID} + +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --chmod=755 otelcol-basic /otelcol-basic +COPY config.yaml /etc/otelcol-basic/config.yaml +ENTRYPOINT ["/otelcol-basic", "--feature-gates=exporter.googlemanagedprometheus.intToDouble"] +CMD ["--config=/etc/otelcol-basic/config.yaml"] diff --git a/internal/distrogen/testdata/generator/boringcrypto/golden/Dockerfile.build b/internal/distrogen/testdata/generator/boringcrypto/golden/Dockerfile.build new file mode 100644 index 0000000000..9886d6c81d --- /dev/null +++ b/internal/distrogen/testdata/generator/boringcrypto/golden/Dockerfile.build @@ -0,0 +1,47 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +# This Dockerfile provides the same resulting container as +# the main Dockerfile, but it also performs the build within +# an earlier layer. The resulting container will be scratch and +# should be functionally identical. + +# By default, this container should have the root of your project +# where all distributions are container. The generated version will +# use the respective distribution as the working directory for builds. +# The whole project is copied to the container in case you provide +# any custom components contained within your full project structure. +ARG PROJECT_ROOT="." +ARG CERT_CONTAINER="alpine:3" +ARG BUILD_CONTAINER="debian" +FROM --platform=${BUILDPLATFORM:-linux/amd64} ${BUILD_CONTAINER} AS build + +RUN apt-get update && apt-get install -y make curl build-essential + +ARG PROJECT_ROOT +COPY ${PROJECT_ROOT} / + +WORKDIR /basic-distro + +ARG BUILDARCH +ARG BUILDOS +ARG TARGETOS +ARG TARGETARCH +RUN if [ "${TARGETARCH}" = "arm64" ] && [ "${BUILDARCH}" != "arm64" ]; then \ + apt-get install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross; \ + CC=aarch64-linux-gnu-gcc; \ + fi && \ + CC=${CC} make build +FROM ${CERT_CONTAINER} AS certs +RUN apk --update add ca-certificates + +FROM scratch + +ARG USER_UID=10001 +USER ${USER_UID} + +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --from=build --chmod=755 /basic-distro/otelcol-basic /otelcol-basic +COPY --from=build --chmod=644 /basic-distro/config.yaml /etc/otelcol-basic/config.yaml + +ENTRYPOINT ["/otelcol-basic", "--feature-gates=exporter.googlemanagedprometheus.intToDouble"] +CMD ["--config=/etc/otelcol-basic/config.yaml"] diff --git a/internal/distrogen/testdata/generator/boringcrypto/golden/Dockerfile.goreleaser_releaser b/internal/distrogen/testdata/generator/boringcrypto/golden/Dockerfile.goreleaser_releaser new file mode 100644 index 0000000000..efaab0a881 --- /dev/null +++ b/internal/distrogen/testdata/generator/boringcrypto/golden/Dockerfile.goreleaser_releaser @@ -0,0 +1,23 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +# This Dockerfile provides the same resulting container as +# the main Dockerfile, but it also performs the build within +# an earlier layer. The resulting container will be scratch and +# should be functionally identical. + +# By default, this container should have the root of your project +# where all distributions are container. The generated version will +# use the respective distribution as the working directory for builds. +# The whole project is copied to the container in case you provide +# any custom components contained within your full project structure. +ARG PROJECT_ROOT="." +ARG BUILD_CONTAINER="debian" +FROM ${BUILD_CONTAINER} AS build + +RUN apt-get update && apt-get install -y make curl git build-essential + +ARG PROJECT_ROOT +COPY ${PROJECT_ROOT} / + +WORKDIR /basic-distro +RUN make goreleaser-release diff --git a/internal/distrogen/testdata/generator/boringcrypto/golden/README.md b/internal/distrogen/testdata/generator/boringcrypto/golden/README.md new file mode 100644 index 0000000000..174c5e20c0 --- /dev/null +++ b/internal/distrogen/testdata/generator/boringcrypto/golden/README.md @@ -0,0 +1,48 @@ +# Basic OTel + +A basic collector distro + +# Components + +## Receivers + +| Component Name | Documentation | +| -------------- | ------------- | +| otlp | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver/README.md) | + + +## Processors + +| Component Name | Documentation | +| -------------- | ------------- | +| batch | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor/README.md) | +| memorylimiter | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor/README.md) | + + +## Exporters + +| Component Name | Documentation | +| -------------- | ------------- | +| otlp | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlpexporter/README.md) | + + +## Extensions + +| Component Name | Documentation | +| -------------- | ------------- | +| pprof | [docs](https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/pprofextension/README.md) | + + +## Connectors + +| Component Name | Documentation | +| -------------- | ------------- | +| forward | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/connector/forwardconnector/README.md) | + + +## Providers + +| Component Name | Documentation | +| -------------- | ------------- | +| yaml | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/confmap/provider/yamlprovider) | + diff --git a/internal/distrogen/testdata/generator/boringcrypto/golden/config.yaml b/internal/distrogen/testdata/generator/boringcrypto/golden/config.yaml new file mode 100644 index 0000000000..45f4c5b9b3 --- /dev/null +++ b/internal/distrogen/testdata/generator/boringcrypto/golden/config.yaml @@ -0,0 +1 @@ +# NOTE: File generated by distrogen. Do not manually edit. diff --git a/internal/distrogen/testdata/generator/boringcrypto/golden/manifest.yaml b/internal/distrogen/testdata/generator/boringcrypto/golden/manifest.yaml new file mode 100644 index 0000000000..6efcbcc330 --- /dev/null +++ b/internal/distrogen/testdata/generator/boringcrypto/golden/manifest.yaml @@ -0,0 +1,30 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +dist: + module: + name: otelcol-basic + description: A basic distribution of the OpenTelemetry Collector + version: 0.121.0 + output_path: ./_build + +receivers: +- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.121.0 + +processors: +- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.121.0 +- gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.121.0 + +exporters: +- gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.121.0 + +extensions: +- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.121.0 + +connectors: +- gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.121.0 + +providers: +- gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.27.0 + +replaces: + diff --git a/internal/distrogen/testdata/generator/boringcrypto/golden/otelcol-basic.conf b/internal/distrogen/testdata/generator/boringcrypto/golden/otelcol-basic.conf new file mode 100644 index 0000000000..345817940a --- /dev/null +++ b/internal/distrogen/testdata/generator/boringcrypto/golden/otelcol-basic.conf @@ -0,0 +1,5 @@ +# Systemd environment file for the otelcol-basic service + +# Command-line options for the otelcol-basic service. +# Run `/usr/bin/otelcol-basic --help` to see all available options. +OTELCOL_OPTIONS="--config=/etc/otelcol-basic/config.yaml" diff --git a/internal/distrogen/testdata/generator/boringcrypto/golden/otelcol-basic.service b/internal/distrogen/testdata/generator/boringcrypto/golden/otelcol-basic.service new file mode 100644 index 0000000000..615b738a70 --- /dev/null +++ b/internal/distrogen/testdata/generator/boringcrypto/golden/otelcol-basic.service @@ -0,0 +1,15 @@ +[Unit] +Description=A basic distribution of the OpenTelemetry Collector +After=network.target + +[Service] +EnvironmentFile=/etc/otelcol-basic/otelcol-basic.conf +ExecStart=/usr/bin/otelcol-basic $OTELCOL_OPTIONS +KillMode=mixed +Restart=on-failure +Type=simple +User=otelcol-basic +Group=otelcol-basic + +[Install] +WantedBy=multi-user.target diff --git a/internal/distrogen/testdata/generator/boringcrypto/golden/postinstall.sh b/internal/distrogen/testdata/generator/boringcrypto/golden/postinstall.sh new file mode 100644 index 0000000000..e860f64b3e --- /dev/null +++ b/internal/distrogen/testdata/generator/boringcrypto/golden/postinstall.sh @@ -0,0 +1,11 @@ +if command -v systemctl >/dev/null 2>&1; then + if [ -d /run/systemd/system ]; then + systemctl daemon-reload + fi + systemctl enable otelcol-basic.service + if [ -f /etc/otelcol-basic/config.yaml ]; then + if [ -d /run/systemd/system ]; then + systemctl restart otelcol-basic.service + fi + fi +fi diff --git a/internal/distrogen/testdata/generator/boringcrypto/golden/preinstall.sh b/internal/distrogen/testdata/generator/boringcrypto/golden/preinstall.sh new file mode 100644 index 0000000000..79812f9c05 --- /dev/null +++ b/internal/distrogen/testdata/generator/boringcrypto/golden/preinstall.sh @@ -0,0 +1 @@ +getent passwd otelcol-basic >/dev/null || useradd --system --user-group --no-create-home --shell /sbin/nologin otelcol-basic diff --git a/internal/distrogen/testdata/generator/boringcrypto/golden/preremove.sh b/internal/distrogen/testdata/generator/boringcrypto/golden/preremove.sh new file mode 100644 index 0000000000..1ca0c097f8 --- /dev/null +++ b/internal/distrogen/testdata/generator/boringcrypto/golden/preremove.sh @@ -0,0 +1,6 @@ +if [ "$1" != "1" ]; then + if command -v systemctl >/dev/null 2>&1; then + systemctl stop otelcol-basic.service + systemctl disable otelcol-basic.service + fi +fi diff --git a/internal/distrogen/testdata/generator/boringcrypto/golden/release.mk b/internal/distrogen/testdata/generator/boringcrypto/golden/release.mk new file mode 100644 index 0000000000..14bbf322f3 --- /dev/null +++ b/internal/distrogen/testdata/generator/boringcrypto/golden/release.mk @@ -0,0 +1,10 @@ +.PHONY: local-container-goreleaser +local-container-goreleaser: + docker buildx build \ + --progress=plain \ + -t otelcol-basic-build \ + -f Dockerfile.goreleaser_releaser \ + .. + CONTAINER_ID=$$(docker create otelcol-basic-build) && \ + docker cp $$CONTAINER_ID:/basic-distro/dist . &&\ + docker rm --force $$CONTAINER_ID diff --git a/internal/distrogen/testdata/generator/boringcrypto/golden/spec.yaml b/internal/distrogen/testdata/generator/boringcrypto/golden/spec.yaml new file mode 100644 index 0000000000..9c9c5c3fa6 --- /dev/null +++ b/internal/distrogen/testdata/generator/boringcrypto/golden/spec.yaml @@ -0,0 +1,32 @@ +name: basic-distro +module: "" +display_name: Basic OTel +description: A basic distribution of the OpenTelemetry Collector +blurb: A basic collector distro +build_container: debian +version: 0.121.0 +opentelemetry_version: 0.121.0 +opentelemetry_contrib_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +go_version: 1.24.0 +binary_name: otelcol-basic +build_tags: "" +boringcrypto: true +docker_repo: us-docker.pkg.dev/pretend-repo/otelcol-basic +components: + receivers: + - otlp + processors: + - batch + - memorylimiter + exporters: + - otlp + connectors: + - forward + extensions: + - pprof + providers: + - yaml +feature_gates: + - exporter.googlemanagedprometheus.intToDouble +collector_cgo: true diff --git a/internal/distrogen/testdata/generator/boringcrypto/spec.yaml b/internal/distrogen/testdata/generator/boringcrypto/spec.yaml new file mode 100644 index 0000000000..9b3a7c1ea3 --- /dev/null +++ b/internal/distrogen/testdata/generator/boringcrypto/spec.yaml @@ -0,0 +1,54 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: basic-distro + +# What this test case is testing. +boringcrypto: true +# Collector CGO needs to be set to true manually. +collector_cgo: true + +display_name: Basic OTel +version: 0.121.0 +description: "A basic distribution of the OpenTelemetry Collector" +blurb: "A basic collector distro" +opentelemetry_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +binary_name: otelcol-basic +go_version: 1.24.0 + +feature_gates: + - exporter.googlemanagedprometheus.intToDouble + +docker_repo: us-docker.pkg.dev/pretend-repo/otelcol-basic + +components: + receivers: + - otlp + + processors: + - batch + - memorylimiter + + exporters: + - otlp + + extensions: + - pprof + + connectors: + - forward + + providers: + - yaml diff --git a/internal/distrogen/testdata/generator/distribution/basic/golden/.goreleaser.yaml b/internal/distrogen/testdata/generator/distribution/basic/golden/.goreleaser.yaml new file mode 100644 index 0000000000..f5ef563e1a --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/basic/golden/.goreleaser.yaml @@ -0,0 +1,101 @@ +version: 2 +project_name: opentelemetry-operations-collector + +snapshot: + version_template: 0.121.0 + +env: + - LD_FLAGS=-s -w + - CGO_ENABLED=0 # TODO: CGO is not supported in goreleaser yet. + - BUILD_FLAGS=-trimpath + - GOWORK=off + +builds: + - id: otelcol-basic-linux + goos: + - linux + goarch: + - amd64 + - arm64 + binary: otelcol-basic + dir: _build + ldflags: + - "-s -w" + flags: + - "-trimpath" + - "-buildvcs=false" + + - id: otelcol-basic-windows + goos: + - windows + goarch: + - amd64 + binary: otelcol-basic + dir: _build + ldflags: + - "-s -w" + flags: + - "-trimpath" + - "-buildvcs=false" + +nfpms: + - package_name: otelcol-basic + contents: + - src: otelcol-basic.service + dst: /lib/systemd/system/otelcol-basic.service + - src: otelcol-basic.conf + dst: /etc/otelcol-basic/otelcol-basic.conf + type: config|noreplace + file_info: + mode: 0644 + - src: config.yaml + dst: /etc/otelcol-basic/config.yaml + type: config|noreplace + file_info: + mode: 0644 + scripts: + preinstall: preinstall.sh + postinstall: postinstall.sh + preremove: preremove.sh + overrides: + rpm: + dependencies: + - /bin/sh + ids: + - otelcol-basic-linux + formats: + - deb + - rpm + umask: 0 + maintainer: Google Cloud Platform # something better than this + description: A basic distribution of the OpenTelemetry Collector + license: Apache 2.0 + +archives: + - id: "otelcol-basic-tarball" + ids: + - "otelcol-basic-linux" + - "otelcol-basic-windows" + formats: + - "tar.gz" + name_template: "otelcol-basic_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + format_overrides: + - goos: windows + formats: + - "zip" + +signs: + - cmd: cosign + signature: ${artifact}.sig + certificate: ${artifact}.pem + args: + - "sign-blob" + - "--output-signature" + - "${signature}" + - "--output-certificate" + - "${certificate}" + - "${artifact}" + - "--yes" + artifacts: archive + env: + - SIGSTORE_NO_CACHE=true diff --git a/internal/distrogen/testdata/generator/distribution/basic/golden/Dockerfile b/internal/distrogen/testdata/generator/distribution/basic/golden/Dockerfile new file mode 100644 index 0000000000..1c2507f8d7 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/basic/golden/Dockerfile @@ -0,0 +1,15 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +FROM alpine:3.19 as certs +RUN apk --update add ca-certificates + +FROM scratch + +ARG USER_UID=10001 +USER ${USER_UID} + +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --chmod=755 otelcol-basic /otelcol-basic +COPY config.yaml /etc/otelcol-basic/config.yaml +ENTRYPOINT ["/otelcol-basic", "--feature-gates=exporter.googlemanagedprometheus.intToDouble"] +CMD ["--config=/etc/otelcol-basic/config.yaml"] diff --git a/internal/distrogen/testdata/generator/distribution/basic/golden/Dockerfile.build b/internal/distrogen/testdata/generator/distribution/basic/golden/Dockerfile.build new file mode 100644 index 0000000000..3094949187 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/basic/golden/Dockerfile.build @@ -0,0 +1,43 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +# This Dockerfile provides the same resulting container as +# the main Dockerfile, but it also performs the build within +# an earlier layer. The resulting container will be scratch and +# should be functionally identical. + +# By default, this container should have the root of your project +# where all distributions are container. The generated version will +# use the respective distribution as the working directory for builds. +# The whole project is copied to the container in case you provide +# any custom components contained within your full project structure. +ARG PROJECT_ROOT="." +ARG CERT_CONTAINER="alpine:3" +ARG BUILD_CONTAINER="debian" +FROM --platform=${BUILDPLATFORM:-linux/amd64} ${BUILD_CONTAINER} AS build + +RUN apt-get update && apt-get install -y make curl + +ARG PROJECT_ROOT +COPY ${PROJECT_ROOT} / + +WORKDIR /basic-distro + +ARG BUILDARCH +ARG BUILDOS +ARG TARGETOS +ARG TARGETARCH +RUN make build +FROM ${CERT_CONTAINER} AS certs +RUN apk --update add ca-certificates + +FROM scratch + +ARG USER_UID=10001 +USER ${USER_UID} + +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --from=build --chmod=755 /basic-distro/otelcol-basic /otelcol-basic +COPY --from=build --chmod=644 /basic-distro/config.yaml /etc/otelcol-basic/config.yaml + +ENTRYPOINT ["/otelcol-basic", "--feature-gates=exporter.googlemanagedprometheus.intToDouble"] +CMD ["--config=/etc/otelcol-basic/config.yaml"] diff --git a/internal/distrogen/testdata/generator/distribution/basic/golden/Dockerfile.goreleaser_releaser b/internal/distrogen/testdata/generator/distribution/basic/golden/Dockerfile.goreleaser_releaser new file mode 100644 index 0000000000..499bee8c67 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/basic/golden/Dockerfile.goreleaser_releaser @@ -0,0 +1,23 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +# This Dockerfile provides the same resulting container as +# the main Dockerfile, but it also performs the build within +# an earlier layer. The resulting container will be scratch and +# should be functionally identical. + +# By default, this container should have the root of your project +# where all distributions are container. The generated version will +# use the respective distribution as the working directory for builds. +# The whole project is copied to the container in case you provide +# any custom components contained within your full project structure. +ARG PROJECT_ROOT="." +ARG BUILD_CONTAINER="debian" +FROM ${BUILD_CONTAINER} AS build + +RUN apt-get update && apt-get install -y make curl git + +ARG PROJECT_ROOT +COPY ${PROJECT_ROOT} / + +WORKDIR /basic-distro +RUN make goreleaser-release diff --git a/internal/distrogen/testdata/generator/distribution/basic/golden/README.md b/internal/distrogen/testdata/generator/distribution/basic/golden/README.md new file mode 100644 index 0000000000..174c5e20c0 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/basic/golden/README.md @@ -0,0 +1,48 @@ +# Basic OTel + +A basic collector distro + +# Components + +## Receivers + +| Component Name | Documentation | +| -------------- | ------------- | +| otlp | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver/README.md) | + + +## Processors + +| Component Name | Documentation | +| -------------- | ------------- | +| batch | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor/README.md) | +| memorylimiter | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor/README.md) | + + +## Exporters + +| Component Name | Documentation | +| -------------- | ------------- | +| otlp | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlpexporter/README.md) | + + +## Extensions + +| Component Name | Documentation | +| -------------- | ------------- | +| pprof | [docs](https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/pprofextension/README.md) | + + +## Connectors + +| Component Name | Documentation | +| -------------- | ------------- | +| forward | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/connector/forwardconnector/README.md) | + + +## Providers + +| Component Name | Documentation | +| -------------- | ------------- | +| yaml | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/confmap/provider/yamlprovider) | + diff --git a/internal/distrogen/testdata/generator/distribution/basic/golden/config.yaml b/internal/distrogen/testdata/generator/distribution/basic/golden/config.yaml new file mode 100644 index 0000000000..45f4c5b9b3 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/basic/golden/config.yaml @@ -0,0 +1 @@ +# NOTE: File generated by distrogen. Do not manually edit. diff --git a/internal/distrogen/testdata/generator/distribution/basic/golden/manifest.yaml b/internal/distrogen/testdata/generator/distribution/basic/golden/manifest.yaml new file mode 100644 index 0000000000..6efcbcc330 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/basic/golden/manifest.yaml @@ -0,0 +1,30 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +dist: + module: + name: otelcol-basic + description: A basic distribution of the OpenTelemetry Collector + version: 0.121.0 + output_path: ./_build + +receivers: +- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.121.0 + +processors: +- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.121.0 +- gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.121.0 + +exporters: +- gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.121.0 + +extensions: +- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.121.0 + +connectors: +- gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.121.0 + +providers: +- gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.27.0 + +replaces: + diff --git a/internal/distrogen/testdata/generator/distribution/basic/golden/otelcol-basic.conf b/internal/distrogen/testdata/generator/distribution/basic/golden/otelcol-basic.conf new file mode 100644 index 0000000000..345817940a --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/basic/golden/otelcol-basic.conf @@ -0,0 +1,5 @@ +# Systemd environment file for the otelcol-basic service + +# Command-line options for the otelcol-basic service. +# Run `/usr/bin/otelcol-basic --help` to see all available options. +OTELCOL_OPTIONS="--config=/etc/otelcol-basic/config.yaml" diff --git a/internal/distrogen/testdata/generator/distribution/basic/golden/otelcol-basic.service b/internal/distrogen/testdata/generator/distribution/basic/golden/otelcol-basic.service new file mode 100644 index 0000000000..615b738a70 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/basic/golden/otelcol-basic.service @@ -0,0 +1,15 @@ +[Unit] +Description=A basic distribution of the OpenTelemetry Collector +After=network.target + +[Service] +EnvironmentFile=/etc/otelcol-basic/otelcol-basic.conf +ExecStart=/usr/bin/otelcol-basic $OTELCOL_OPTIONS +KillMode=mixed +Restart=on-failure +Type=simple +User=otelcol-basic +Group=otelcol-basic + +[Install] +WantedBy=multi-user.target diff --git a/internal/distrogen/testdata/generator/distribution/basic/golden/postinstall.sh b/internal/distrogen/testdata/generator/distribution/basic/golden/postinstall.sh new file mode 100644 index 0000000000..e860f64b3e --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/basic/golden/postinstall.sh @@ -0,0 +1,11 @@ +if command -v systemctl >/dev/null 2>&1; then + if [ -d /run/systemd/system ]; then + systemctl daemon-reload + fi + systemctl enable otelcol-basic.service + if [ -f /etc/otelcol-basic/config.yaml ]; then + if [ -d /run/systemd/system ]; then + systemctl restart otelcol-basic.service + fi + fi +fi diff --git a/internal/distrogen/testdata/generator/distribution/basic/golden/preinstall.sh b/internal/distrogen/testdata/generator/distribution/basic/golden/preinstall.sh new file mode 100644 index 0000000000..79812f9c05 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/basic/golden/preinstall.sh @@ -0,0 +1 @@ +getent passwd otelcol-basic >/dev/null || useradd --system --user-group --no-create-home --shell /sbin/nologin otelcol-basic diff --git a/internal/distrogen/testdata/generator/distribution/basic/golden/preremove.sh b/internal/distrogen/testdata/generator/distribution/basic/golden/preremove.sh new file mode 100644 index 0000000000..1ca0c097f8 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/basic/golden/preremove.sh @@ -0,0 +1,6 @@ +if [ "$1" != "1" ]; then + if command -v systemctl >/dev/null 2>&1; then + systemctl stop otelcol-basic.service + systemctl disable otelcol-basic.service + fi +fi diff --git a/internal/distrogen/testdata/generator/distribution/basic/golden/spec.yaml b/internal/distrogen/testdata/generator/distribution/basic/golden/spec.yaml new file mode 100644 index 0000000000..9b937a2c25 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/basic/golden/spec.yaml @@ -0,0 +1,33 @@ +name: basic-distro +module: "" +display_name: Basic OTel +description: A basic distribution of the OpenTelemetry Collector +blurb: A basic collector distro +build_container: debian +version: 0.121.0 +opentelemetry_version: 0.121.0 +opentelemetry_contrib_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +go_version: 1.24.0 +binary_name: otelcol-basic +build_tags: "" +boringcrypto: false +docker_repo: us-docker.pkg.dev/pretend-repo/otelcol-basic +components: + receivers: + - otlp + processors: + - batch + - memorylimiter + exporters: + - otlp + connectors: + - forward + extensions: + - pprof + providers: + - yaml +feature_gates: + - exporter.googlemanagedprometheus.intToDouble +component_module_base: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/basic +distrogen_version: v0.130.1-0.20250724183747-261516e1bff1 diff --git a/internal/distrogen/testdata/generator/distribution/basic/spec.yaml b/internal/distrogen/testdata/generator/distribution/basic/spec.yaml new file mode 100644 index 0000000000..5ed5602bef --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/basic/spec.yaml @@ -0,0 +1,52 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: basic-distro +display_name: Basic OTel +version: 0.121.0 +description: "A basic distribution of the OpenTelemetry Collector" +blurb: "A basic collector distro" +opentelemetry_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +binary_name: otelcol-basic +collector_cgo: false +go_version: 1.24.0 +distrogen_version: v0.130.1-0.20250724183747-261516e1bff1 +component_module_base: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/basic + + +feature_gates: + - exporter.googlemanagedprometheus.intToDouble + +docker_repo: us-docker.pkg.dev/pretend-repo/otelcol-basic + +components: + receivers: + - otlp + + processors: + - batch + - memorylimiter + + exporters: + - otlp + + extensions: + - pprof + + connectors: + - forward + + providers: + - yaml diff --git a/internal/distrogen/testdata/generator/distribution/build_container/golden/.goreleaser.yaml b/internal/distrogen/testdata/generator/distribution/build_container/golden/.goreleaser.yaml new file mode 100644 index 0000000000..f5ef563e1a --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/build_container/golden/.goreleaser.yaml @@ -0,0 +1,101 @@ +version: 2 +project_name: opentelemetry-operations-collector + +snapshot: + version_template: 0.121.0 + +env: + - LD_FLAGS=-s -w + - CGO_ENABLED=0 # TODO: CGO is not supported in goreleaser yet. + - BUILD_FLAGS=-trimpath + - GOWORK=off + +builds: + - id: otelcol-basic-linux + goos: + - linux + goarch: + - amd64 + - arm64 + binary: otelcol-basic + dir: _build + ldflags: + - "-s -w" + flags: + - "-trimpath" + - "-buildvcs=false" + + - id: otelcol-basic-windows + goos: + - windows + goarch: + - amd64 + binary: otelcol-basic + dir: _build + ldflags: + - "-s -w" + flags: + - "-trimpath" + - "-buildvcs=false" + +nfpms: + - package_name: otelcol-basic + contents: + - src: otelcol-basic.service + dst: /lib/systemd/system/otelcol-basic.service + - src: otelcol-basic.conf + dst: /etc/otelcol-basic/otelcol-basic.conf + type: config|noreplace + file_info: + mode: 0644 + - src: config.yaml + dst: /etc/otelcol-basic/config.yaml + type: config|noreplace + file_info: + mode: 0644 + scripts: + preinstall: preinstall.sh + postinstall: postinstall.sh + preremove: preremove.sh + overrides: + rpm: + dependencies: + - /bin/sh + ids: + - otelcol-basic-linux + formats: + - deb + - rpm + umask: 0 + maintainer: Google Cloud Platform # something better than this + description: A basic distribution of the OpenTelemetry Collector + license: Apache 2.0 + +archives: + - id: "otelcol-basic-tarball" + ids: + - "otelcol-basic-linux" + - "otelcol-basic-windows" + formats: + - "tar.gz" + name_template: "otelcol-basic_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + format_overrides: + - goos: windows + formats: + - "zip" + +signs: + - cmd: cosign + signature: ${artifact}.sig + certificate: ${artifact}.pem + args: + - "sign-blob" + - "--output-signature" + - "${signature}" + - "--output-certificate" + - "${certificate}" + - "${artifact}" + - "--yes" + artifacts: archive + env: + - SIGSTORE_NO_CACHE=true diff --git a/internal/distrogen/testdata/generator/distribution/build_container/golden/Dockerfile b/internal/distrogen/testdata/generator/distribution/build_container/golden/Dockerfile new file mode 100644 index 0000000000..1c2507f8d7 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/build_container/golden/Dockerfile @@ -0,0 +1,15 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +FROM alpine:3.19 as certs +RUN apk --update add ca-certificates + +FROM scratch + +ARG USER_UID=10001 +USER ${USER_UID} + +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --chmod=755 otelcol-basic /otelcol-basic +COPY config.yaml /etc/otelcol-basic/config.yaml +ENTRYPOINT ["/otelcol-basic", "--feature-gates=exporter.googlemanagedprometheus.intToDouble"] +CMD ["--config=/etc/otelcol-basic/config.yaml"] diff --git a/internal/distrogen/testdata/generator/distribution/build_container/golden/Dockerfile.build b/internal/distrogen/testdata/generator/distribution/build_container/golden/Dockerfile.build new file mode 100644 index 0000000000..9886d6c81d --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/build_container/golden/Dockerfile.build @@ -0,0 +1,47 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +# This Dockerfile provides the same resulting container as +# the main Dockerfile, but it also performs the build within +# an earlier layer. The resulting container will be scratch and +# should be functionally identical. + +# By default, this container should have the root of your project +# where all distributions are container. The generated version will +# use the respective distribution as the working directory for builds. +# The whole project is copied to the container in case you provide +# any custom components contained within your full project structure. +ARG PROJECT_ROOT="." +ARG CERT_CONTAINER="alpine:3" +ARG BUILD_CONTAINER="debian" +FROM --platform=${BUILDPLATFORM:-linux/amd64} ${BUILD_CONTAINER} AS build + +RUN apt-get update && apt-get install -y make curl build-essential + +ARG PROJECT_ROOT +COPY ${PROJECT_ROOT} / + +WORKDIR /basic-distro + +ARG BUILDARCH +ARG BUILDOS +ARG TARGETOS +ARG TARGETARCH +RUN if [ "${TARGETARCH}" = "arm64" ] && [ "${BUILDARCH}" != "arm64" ]; then \ + apt-get install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross; \ + CC=aarch64-linux-gnu-gcc; \ + fi && \ + CC=${CC} make build +FROM ${CERT_CONTAINER} AS certs +RUN apk --update add ca-certificates + +FROM scratch + +ARG USER_UID=10001 +USER ${USER_UID} + +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --from=build --chmod=755 /basic-distro/otelcol-basic /otelcol-basic +COPY --from=build --chmod=644 /basic-distro/config.yaml /etc/otelcol-basic/config.yaml + +ENTRYPOINT ["/otelcol-basic", "--feature-gates=exporter.googlemanagedprometheus.intToDouble"] +CMD ["--config=/etc/otelcol-basic/config.yaml"] diff --git a/internal/distrogen/testdata/generator/distribution/build_container/golden/Dockerfile.goreleaser_releaser b/internal/distrogen/testdata/generator/distribution/build_container/golden/Dockerfile.goreleaser_releaser new file mode 100644 index 0000000000..efaab0a881 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/build_container/golden/Dockerfile.goreleaser_releaser @@ -0,0 +1,23 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +# This Dockerfile provides the same resulting container as +# the main Dockerfile, but it also performs the build within +# an earlier layer. The resulting container will be scratch and +# should be functionally identical. + +# By default, this container should have the root of your project +# where all distributions are container. The generated version will +# use the respective distribution as the working directory for builds. +# The whole project is copied to the container in case you provide +# any custom components contained within your full project structure. +ARG PROJECT_ROOT="." +ARG BUILD_CONTAINER="debian" +FROM ${BUILD_CONTAINER} AS build + +RUN apt-get update && apt-get install -y make curl git build-essential + +ARG PROJECT_ROOT +COPY ${PROJECT_ROOT} / + +WORKDIR /basic-distro +RUN make goreleaser-release diff --git a/internal/distrogen/testdata/generator/distribution/build_container/golden/README.md b/internal/distrogen/testdata/generator/distribution/build_container/golden/README.md new file mode 100644 index 0000000000..174c5e20c0 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/build_container/golden/README.md @@ -0,0 +1,48 @@ +# Basic OTel + +A basic collector distro + +# Components + +## Receivers + +| Component Name | Documentation | +| -------------- | ------------- | +| otlp | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver/README.md) | + + +## Processors + +| Component Name | Documentation | +| -------------- | ------------- | +| batch | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor/README.md) | +| memorylimiter | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor/README.md) | + + +## Exporters + +| Component Name | Documentation | +| -------------- | ------------- | +| otlp | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlpexporter/README.md) | + + +## Extensions + +| Component Name | Documentation | +| -------------- | ------------- | +| pprof | [docs](https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/pprofextension/README.md) | + + +## Connectors + +| Component Name | Documentation | +| -------------- | ------------- | +| forward | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/connector/forwardconnector/README.md) | + + +## Providers + +| Component Name | Documentation | +| -------------- | ------------- | +| yaml | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/confmap/provider/yamlprovider) | + diff --git a/internal/distrogen/testdata/generator/distribution/build_container/golden/config.yaml b/internal/distrogen/testdata/generator/distribution/build_container/golden/config.yaml new file mode 100644 index 0000000000..45f4c5b9b3 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/build_container/golden/config.yaml @@ -0,0 +1 @@ +# NOTE: File generated by distrogen. Do not manually edit. diff --git a/internal/distrogen/testdata/generator/distribution/build_container/golden/manifest.yaml b/internal/distrogen/testdata/generator/distribution/build_container/golden/manifest.yaml new file mode 100644 index 0000000000..6efcbcc330 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/build_container/golden/manifest.yaml @@ -0,0 +1,30 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +dist: + module: + name: otelcol-basic + description: A basic distribution of the OpenTelemetry Collector + version: 0.121.0 + output_path: ./_build + +receivers: +- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.121.0 + +processors: +- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.121.0 +- gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.121.0 + +exporters: +- gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.121.0 + +extensions: +- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.121.0 + +connectors: +- gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.121.0 + +providers: +- gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.27.0 + +replaces: + diff --git a/internal/distrogen/testdata/generator/distribution/build_container/golden/otelcol-basic.conf b/internal/distrogen/testdata/generator/distribution/build_container/golden/otelcol-basic.conf new file mode 100644 index 0000000000..345817940a --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/build_container/golden/otelcol-basic.conf @@ -0,0 +1,5 @@ +# Systemd environment file for the otelcol-basic service + +# Command-line options for the otelcol-basic service. +# Run `/usr/bin/otelcol-basic --help` to see all available options. +OTELCOL_OPTIONS="--config=/etc/otelcol-basic/config.yaml" diff --git a/internal/distrogen/testdata/generator/distribution/build_container/golden/otelcol-basic.service b/internal/distrogen/testdata/generator/distribution/build_container/golden/otelcol-basic.service new file mode 100644 index 0000000000..615b738a70 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/build_container/golden/otelcol-basic.service @@ -0,0 +1,15 @@ +[Unit] +Description=A basic distribution of the OpenTelemetry Collector +After=network.target + +[Service] +EnvironmentFile=/etc/otelcol-basic/otelcol-basic.conf +ExecStart=/usr/bin/otelcol-basic $OTELCOL_OPTIONS +KillMode=mixed +Restart=on-failure +Type=simple +User=otelcol-basic +Group=otelcol-basic + +[Install] +WantedBy=multi-user.target diff --git a/internal/distrogen/testdata/generator/distribution/build_container/golden/postinstall.sh b/internal/distrogen/testdata/generator/distribution/build_container/golden/postinstall.sh new file mode 100644 index 0000000000..e860f64b3e --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/build_container/golden/postinstall.sh @@ -0,0 +1,11 @@ +if command -v systemctl >/dev/null 2>&1; then + if [ -d /run/systemd/system ]; then + systemctl daemon-reload + fi + systemctl enable otelcol-basic.service + if [ -f /etc/otelcol-basic/config.yaml ]; then + if [ -d /run/systemd/system ]; then + systemctl restart otelcol-basic.service + fi + fi +fi diff --git a/internal/distrogen/testdata/generator/distribution/build_container/golden/preinstall.sh b/internal/distrogen/testdata/generator/distribution/build_container/golden/preinstall.sh new file mode 100644 index 0000000000..79812f9c05 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/build_container/golden/preinstall.sh @@ -0,0 +1 @@ +getent passwd otelcol-basic >/dev/null || useradd --system --user-group --no-create-home --shell /sbin/nologin otelcol-basic diff --git a/internal/distrogen/testdata/generator/distribution/build_container/golden/preremove.sh b/internal/distrogen/testdata/generator/distribution/build_container/golden/preremove.sh new file mode 100644 index 0000000000..1ca0c097f8 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/build_container/golden/preremove.sh @@ -0,0 +1,6 @@ +if [ "$1" != "1" ]; then + if command -v systemctl >/dev/null 2>&1; then + systemctl stop otelcol-basic.service + systemctl disable otelcol-basic.service + fi +fi diff --git a/internal/distrogen/testdata/generator/distribution/build_container/golden/spec.yaml b/internal/distrogen/testdata/generator/distribution/build_container/golden/spec.yaml new file mode 100644 index 0000000000..1884d47a79 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/build_container/golden/spec.yaml @@ -0,0 +1,34 @@ +name: basic-distro +module: "" +display_name: Basic OTel +description: A basic distribution of the OpenTelemetry Collector +blurb: A basic collector distro +build_container: debian +version: 0.121.0 +opentelemetry_version: 0.121.0 +opentelemetry_contrib_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +go_version: 1.24.0 +binary_name: otelcol-basic +build_tags: "" +boringcrypto: false +docker_repo: us-docker.pkg.dev/pretend-repo/otelcol-basic +components: + receivers: + - otlp + processors: + - batch + - memorylimiter + exporters: + - otlp + connectors: + - forward + extensions: + - pprof + providers: + - yaml +feature_gates: + - exporter.googlemanagedprometheus.intToDouble +collector_cgo: true +component_module_base: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/basic +distrogen_version: v0.130.1-0.20250724183747-261516e1bff1 diff --git a/internal/distrogen/testdata/generator/distribution/build_container/spec.yaml b/internal/distrogen/testdata/generator/distribution/build_container/spec.yaml new file mode 100644 index 0000000000..a5b8c48a41 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/build_container/spec.yaml @@ -0,0 +1,55 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: basic-distro + +# What this test case is testing. +build_container: debian +collector_cgo: true + +display_name: Basic OTel +version: 0.121.0 +description: "A basic distribution of the OpenTelemetry Collector" +blurb: "A basic collector distro" +opentelemetry_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +binary_name: otelcol-basic +go_version: 1.24.0 +distrogen_version: v0.130.1-0.20250724183747-261516e1bff1 +component_module_base: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/basic + +feature_gates: + - exporter.googlemanagedprometheus.intToDouble + +docker_repo: us-docker.pkg.dev/pretend-repo/otelcol-basic + +components: + receivers: + - otlp + + processors: + - batch + - memorylimiter + + exporters: + - otlp + + extensions: + - pprof + + connectors: + - forward + + providers: + - yaml diff --git a/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/.goreleaser.yaml b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/.goreleaser.yaml new file mode 100644 index 0000000000..f5ef563e1a --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/.goreleaser.yaml @@ -0,0 +1,101 @@ +version: 2 +project_name: opentelemetry-operations-collector + +snapshot: + version_template: 0.121.0 + +env: + - LD_FLAGS=-s -w + - CGO_ENABLED=0 # TODO: CGO is not supported in goreleaser yet. + - BUILD_FLAGS=-trimpath + - GOWORK=off + +builds: + - id: otelcol-basic-linux + goos: + - linux + goarch: + - amd64 + - arm64 + binary: otelcol-basic + dir: _build + ldflags: + - "-s -w" + flags: + - "-trimpath" + - "-buildvcs=false" + + - id: otelcol-basic-windows + goos: + - windows + goarch: + - amd64 + binary: otelcol-basic + dir: _build + ldflags: + - "-s -w" + flags: + - "-trimpath" + - "-buildvcs=false" + +nfpms: + - package_name: otelcol-basic + contents: + - src: otelcol-basic.service + dst: /lib/systemd/system/otelcol-basic.service + - src: otelcol-basic.conf + dst: /etc/otelcol-basic/otelcol-basic.conf + type: config|noreplace + file_info: + mode: 0644 + - src: config.yaml + dst: /etc/otelcol-basic/config.yaml + type: config|noreplace + file_info: + mode: 0644 + scripts: + preinstall: preinstall.sh + postinstall: postinstall.sh + preremove: preremove.sh + overrides: + rpm: + dependencies: + - /bin/sh + ids: + - otelcol-basic-linux + formats: + - deb + - rpm + umask: 0 + maintainer: Google Cloud Platform # something better than this + description: A basic distribution of the OpenTelemetry Collector + license: Apache 2.0 + +archives: + - id: "otelcol-basic-tarball" + ids: + - "otelcol-basic-linux" + - "otelcol-basic-windows" + formats: + - "tar.gz" + name_template: "otelcol-basic_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + format_overrides: + - goos: windows + formats: + - "zip" + +signs: + - cmd: cosign + signature: ${artifact}.sig + certificate: ${artifact}.pem + args: + - "sign-blob" + - "--output-signature" + - "${signature}" + - "--output-certificate" + - "${certificate}" + - "${artifact}" + - "--yes" + artifacts: archive + env: + - SIGSTORE_NO_CACHE=true diff --git a/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/Dockerfile b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/Dockerfile new file mode 100644 index 0000000000..1c2507f8d7 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/Dockerfile @@ -0,0 +1,15 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +FROM alpine:3.19 as certs +RUN apk --update add ca-certificates + +FROM scratch + +ARG USER_UID=10001 +USER ${USER_UID} + +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --chmod=755 otelcol-basic /otelcol-basic +COPY config.yaml /etc/otelcol-basic/config.yaml +ENTRYPOINT ["/otelcol-basic", "--feature-gates=exporter.googlemanagedprometheus.intToDouble"] +CMD ["--config=/etc/otelcol-basic/config.yaml"] diff --git a/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/Dockerfile.build b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/Dockerfile.build new file mode 100644 index 0000000000..3094949187 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/Dockerfile.build @@ -0,0 +1,43 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +# This Dockerfile provides the same resulting container as +# the main Dockerfile, but it also performs the build within +# an earlier layer. The resulting container will be scratch and +# should be functionally identical. + +# By default, this container should have the root of your project +# where all distributions are container. The generated version will +# use the respective distribution as the working directory for builds. +# The whole project is copied to the container in case you provide +# any custom components contained within your full project structure. +ARG PROJECT_ROOT="." +ARG CERT_CONTAINER="alpine:3" +ARG BUILD_CONTAINER="debian" +FROM --platform=${BUILDPLATFORM:-linux/amd64} ${BUILD_CONTAINER} AS build + +RUN apt-get update && apt-get install -y make curl + +ARG PROJECT_ROOT +COPY ${PROJECT_ROOT} / + +WORKDIR /basic-distro + +ARG BUILDARCH +ARG BUILDOS +ARG TARGETOS +ARG TARGETARCH +RUN make build +FROM ${CERT_CONTAINER} AS certs +RUN apk --update add ca-certificates + +FROM scratch + +ARG USER_UID=10001 +USER ${USER_UID} + +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --from=build --chmod=755 /basic-distro/otelcol-basic /otelcol-basic +COPY --from=build --chmod=644 /basic-distro/config.yaml /etc/otelcol-basic/config.yaml + +ENTRYPOINT ["/otelcol-basic", "--feature-gates=exporter.googlemanagedprometheus.intToDouble"] +CMD ["--config=/etc/otelcol-basic/config.yaml"] diff --git a/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/Dockerfile.goreleaser_releaser b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/Dockerfile.goreleaser_releaser new file mode 100644 index 0000000000..499bee8c67 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/Dockerfile.goreleaser_releaser @@ -0,0 +1,23 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +# This Dockerfile provides the same resulting container as +# the main Dockerfile, but it also performs the build within +# an earlier layer. The resulting container will be scratch and +# should be functionally identical. + +# By default, this container should have the root of your project +# where all distributions are container. The generated version will +# use the respective distribution as the working directory for builds. +# The whole project is copied to the container in case you provide +# any custom components contained within your full project structure. +ARG PROJECT_ROOT="." +ARG BUILD_CONTAINER="debian" +FROM ${BUILD_CONTAINER} AS build + +RUN apt-get update && apt-get install -y make curl git + +ARG PROJECT_ROOT +COPY ${PROJECT_ROOT} / + +WORKDIR /basic-distro +RUN make goreleaser-release diff --git a/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/README.md b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/README.md new file mode 100644 index 0000000000..174c5e20c0 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/README.md @@ -0,0 +1,48 @@ +# Basic OTel + +A basic collector distro + +# Components + +## Receivers + +| Component Name | Documentation | +| -------------- | ------------- | +| otlp | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver/README.md) | + + +## Processors + +| Component Name | Documentation | +| -------------- | ------------- | +| batch | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor/README.md) | +| memorylimiter | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor/README.md) | + + +## Exporters + +| Component Name | Documentation | +| -------------- | ------------- | +| otlp | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlpexporter/README.md) | + + +## Extensions + +| Component Name | Documentation | +| -------------- | ------------- | +| pprof | [docs](https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/pprofextension/README.md) | + + +## Connectors + +| Component Name | Documentation | +| -------------- | ------------- | +| forward | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/connector/forwardconnector/README.md) | + + +## Providers + +| Component Name | Documentation | +| -------------- | ------------- | +| yaml | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/confmap/provider/yamlprovider) | + diff --git a/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/config.yaml b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/config.yaml new file mode 100644 index 0000000000..45f4c5b9b3 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/config.yaml @@ -0,0 +1 @@ +# NOTE: File generated by distrogen. Do not manually edit. diff --git a/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/docs/documentation.md b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/docs/documentation.md new file mode 100644 index 0000000000..47709bb56a --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/docs/documentation.md @@ -0,0 +1 @@ +Documentation for basic-distro \ No newline at end of file diff --git a/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/manifest.yaml b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/manifest.yaml new file mode 100644 index 0000000000..6efcbcc330 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/manifest.yaml @@ -0,0 +1,30 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +dist: + module: + name: otelcol-basic + description: A basic distribution of the OpenTelemetry Collector + version: 0.121.0 + output_path: ./_build + +receivers: +- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.121.0 + +processors: +- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.121.0 +- gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.121.0 + +exporters: +- gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.121.0 + +extensions: +- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.121.0 + +connectors: +- gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.121.0 + +providers: +- gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.27.0 + +replaces: + diff --git a/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/otelcol-basic.conf b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/otelcol-basic.conf new file mode 100644 index 0000000000..345817940a --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/otelcol-basic.conf @@ -0,0 +1,5 @@ +# Systemd environment file for the otelcol-basic service + +# Command-line options for the otelcol-basic service. +# Run `/usr/bin/otelcol-basic --help` to see all available options. +OTELCOL_OPTIONS="--config=/etc/otelcol-basic/config.yaml" diff --git a/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/otelcol-basic.service b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/otelcol-basic.service new file mode 100644 index 0000000000..615b738a70 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/otelcol-basic.service @@ -0,0 +1,15 @@ +[Unit] +Description=A basic distribution of the OpenTelemetry Collector +After=network.target + +[Service] +EnvironmentFile=/etc/otelcol-basic/otelcol-basic.conf +ExecStart=/usr/bin/otelcol-basic $OTELCOL_OPTIONS +KillMode=mixed +Restart=on-failure +Type=simple +User=otelcol-basic +Group=otelcol-basic + +[Install] +WantedBy=multi-user.target diff --git a/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/postinstall.sh b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/postinstall.sh new file mode 100644 index 0000000000..e860f64b3e --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/postinstall.sh @@ -0,0 +1,11 @@ +if command -v systemctl >/dev/null 2>&1; then + if [ -d /run/systemd/system ]; then + systemctl daemon-reload + fi + systemctl enable otelcol-basic.service + if [ -f /etc/otelcol-basic/config.yaml ]; then + if [ -d /run/systemd/system ]; then + systemctl restart otelcol-basic.service + fi + fi +fi diff --git a/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/preinstall.sh b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/preinstall.sh new file mode 100644 index 0000000000..79812f9c05 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/preinstall.sh @@ -0,0 +1 @@ +getent passwd otelcol-basic >/dev/null || useradd --system --user-group --no-create-home --shell /sbin/nologin otelcol-basic diff --git a/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/preremove.sh b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/preremove.sh new file mode 100644 index 0000000000..1ca0c097f8 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/preremove.sh @@ -0,0 +1,6 @@ +if [ "$1" != "1" ]; then + if command -v systemctl >/dev/null 2>&1; then + systemctl stop otelcol-basic.service + systemctl disable otelcol-basic.service + fi +fi diff --git a/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/spec.yaml b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/spec.yaml new file mode 100644 index 0000000000..a4eed489f2 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/golden/spec.yaml @@ -0,0 +1,33 @@ +name: basic-distro +module: "" +display_name: Basic OTel +description: A basic distribution of the OpenTelemetry Collector +blurb: A basic collector distro +build_container: debian +version: 0.121.0 +opentelemetry_version: 0.121.0 +opentelemetry_contrib_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +go_version: 1.24.0 +binary_name: otelcol-basic +build_tags: "" +boringcrypto: false +docker_repo: us-docker.pkg.dev/experimental-braydonk/google-otel +components: + receivers: + - otlp + processors: + - batch + - memorylimiter + exporters: + - otlp + connectors: + - forward + extensions: + - pprof + providers: + - yaml +feature_gates: + - exporter.googlemanagedprometheus.intToDouble +component_module_base: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/basic +distrogen_version: v0.130.1-0.20250724183747-261516e1bff1 diff --git a/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/spec.yaml b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/spec.yaml new file mode 100644 index 0000000000..b212b660a7 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/spec.yaml @@ -0,0 +1,51 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: basic-distro +display_name: Basic OTel +version: 0.121.0 +description: "A basic distribution of the OpenTelemetry Collector" +blurb: "A basic collector distro" +opentelemetry_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +binary_name: otelcol-basic +collector_cgo: false +go_version: 1.24.0 +distrogen_version: v0.130.1-0.20250724183747-261516e1bff1 +component_module_base: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/basic + +feature_gates: + - exporter.googlemanagedprometheus.intToDouble + +docker_repo: us-docker.pkg.dev/experimental-braydonk/google-otel + +components: + receivers: + - otlp + + processors: + - batch + - memorylimiter + + exporters: + - otlp + + extensions: + - pprof + + connectors: + - forward + + providers: + - yaml diff --git a/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/templates/docs/documentation.md.go.tmpl b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/templates/docs/documentation.md.go.tmpl new file mode 100644 index 0000000000..814c10a43f --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/custom_templates_subdir/templates/docs/documentation.md.go.tmpl @@ -0,0 +1 @@ +Documentation for {{ .Name }} \ No newline at end of file diff --git a/internal/distrogen/testdata/generator/distribution/go_proxy/golden/.goreleaser.yaml b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/.goreleaser.yaml new file mode 100644 index 0000000000..f5ef563e1a --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/.goreleaser.yaml @@ -0,0 +1,101 @@ +version: 2 +project_name: opentelemetry-operations-collector + +snapshot: + version_template: 0.121.0 + +env: + - LD_FLAGS=-s -w + - CGO_ENABLED=0 # TODO: CGO is not supported in goreleaser yet. + - BUILD_FLAGS=-trimpath + - GOWORK=off + +builds: + - id: otelcol-basic-linux + goos: + - linux + goarch: + - amd64 + - arm64 + binary: otelcol-basic + dir: _build + ldflags: + - "-s -w" + flags: + - "-trimpath" + - "-buildvcs=false" + + - id: otelcol-basic-windows + goos: + - windows + goarch: + - amd64 + binary: otelcol-basic + dir: _build + ldflags: + - "-s -w" + flags: + - "-trimpath" + - "-buildvcs=false" + +nfpms: + - package_name: otelcol-basic + contents: + - src: otelcol-basic.service + dst: /lib/systemd/system/otelcol-basic.service + - src: otelcol-basic.conf + dst: /etc/otelcol-basic/otelcol-basic.conf + type: config|noreplace + file_info: + mode: 0644 + - src: config.yaml + dst: /etc/otelcol-basic/config.yaml + type: config|noreplace + file_info: + mode: 0644 + scripts: + preinstall: preinstall.sh + postinstall: postinstall.sh + preremove: preremove.sh + overrides: + rpm: + dependencies: + - /bin/sh + ids: + - otelcol-basic-linux + formats: + - deb + - rpm + umask: 0 + maintainer: Google Cloud Platform # something better than this + description: A basic distribution of the OpenTelemetry Collector + license: Apache 2.0 + +archives: + - id: "otelcol-basic-tarball" + ids: + - "otelcol-basic-linux" + - "otelcol-basic-windows" + formats: + - "tar.gz" + name_template: "otelcol-basic_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + format_overrides: + - goos: windows + formats: + - "zip" + +signs: + - cmd: cosign + signature: ${artifact}.sig + certificate: ${artifact}.pem + args: + - "sign-blob" + - "--output-signature" + - "${signature}" + - "--output-certificate" + - "${certificate}" + - "${artifact}" + - "--yes" + artifacts: archive + env: + - SIGSTORE_NO_CACHE=true diff --git a/internal/distrogen/testdata/generator/distribution/go_proxy/golden/Dockerfile b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/Dockerfile new file mode 100644 index 0000000000..1c2507f8d7 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/Dockerfile @@ -0,0 +1,15 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +FROM alpine:3.19 as certs +RUN apk --update add ca-certificates + +FROM scratch + +ARG USER_UID=10001 +USER ${USER_UID} + +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --chmod=755 otelcol-basic /otelcol-basic +COPY config.yaml /etc/otelcol-basic/config.yaml +ENTRYPOINT ["/otelcol-basic", "--feature-gates=exporter.googlemanagedprometheus.intToDouble"] +CMD ["--config=/etc/otelcol-basic/config.yaml"] diff --git a/internal/distrogen/testdata/generator/distribution/go_proxy/golden/Dockerfile.build b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/Dockerfile.build new file mode 100644 index 0000000000..3094949187 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/Dockerfile.build @@ -0,0 +1,43 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +# This Dockerfile provides the same resulting container as +# the main Dockerfile, but it also performs the build within +# an earlier layer. The resulting container will be scratch and +# should be functionally identical. + +# By default, this container should have the root of your project +# where all distributions are container. The generated version will +# use the respective distribution as the working directory for builds. +# The whole project is copied to the container in case you provide +# any custom components contained within your full project structure. +ARG PROJECT_ROOT="." +ARG CERT_CONTAINER="alpine:3" +ARG BUILD_CONTAINER="debian" +FROM --platform=${BUILDPLATFORM:-linux/amd64} ${BUILD_CONTAINER} AS build + +RUN apt-get update && apt-get install -y make curl + +ARG PROJECT_ROOT +COPY ${PROJECT_ROOT} / + +WORKDIR /basic-distro + +ARG BUILDARCH +ARG BUILDOS +ARG TARGETOS +ARG TARGETARCH +RUN make build +FROM ${CERT_CONTAINER} AS certs +RUN apk --update add ca-certificates + +FROM scratch + +ARG USER_UID=10001 +USER ${USER_UID} + +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --from=build --chmod=755 /basic-distro/otelcol-basic /otelcol-basic +COPY --from=build --chmod=644 /basic-distro/config.yaml /etc/otelcol-basic/config.yaml + +ENTRYPOINT ["/otelcol-basic", "--feature-gates=exporter.googlemanagedprometheus.intToDouble"] +CMD ["--config=/etc/otelcol-basic/config.yaml"] diff --git a/internal/distrogen/testdata/generator/distribution/go_proxy/golden/Dockerfile.goreleaser_releaser b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/Dockerfile.goreleaser_releaser new file mode 100644 index 0000000000..499bee8c67 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/Dockerfile.goreleaser_releaser @@ -0,0 +1,23 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +# This Dockerfile provides the same resulting container as +# the main Dockerfile, but it also performs the build within +# an earlier layer. The resulting container will be scratch and +# should be functionally identical. + +# By default, this container should have the root of your project +# where all distributions are container. The generated version will +# use the respective distribution as the working directory for builds. +# The whole project is copied to the container in case you provide +# any custom components contained within your full project structure. +ARG PROJECT_ROOT="." +ARG BUILD_CONTAINER="debian" +FROM ${BUILD_CONTAINER} AS build + +RUN apt-get update && apt-get install -y make curl git + +ARG PROJECT_ROOT +COPY ${PROJECT_ROOT} / + +WORKDIR /basic-distro +RUN make goreleaser-release diff --git a/internal/distrogen/testdata/generator/distribution/go_proxy/golden/README.md b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/README.md new file mode 100644 index 0000000000..174c5e20c0 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/README.md @@ -0,0 +1,48 @@ +# Basic OTel + +A basic collector distro + +# Components + +## Receivers + +| Component Name | Documentation | +| -------------- | ------------- | +| otlp | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver/README.md) | + + +## Processors + +| Component Name | Documentation | +| -------------- | ------------- | +| batch | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor/README.md) | +| memorylimiter | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor/README.md) | + + +## Exporters + +| Component Name | Documentation | +| -------------- | ------------- | +| otlp | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlpexporter/README.md) | + + +## Extensions + +| Component Name | Documentation | +| -------------- | ------------- | +| pprof | [docs](https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/pprofextension/README.md) | + + +## Connectors + +| Component Name | Documentation | +| -------------- | ------------- | +| forward | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/connector/forwardconnector/README.md) | + + +## Providers + +| Component Name | Documentation | +| -------------- | ------------- | +| yaml | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/confmap/provider/yamlprovider) | + diff --git a/internal/distrogen/testdata/generator/distribution/go_proxy/golden/config.yaml b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/config.yaml new file mode 100644 index 0000000000..45f4c5b9b3 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/config.yaml @@ -0,0 +1 @@ +# NOTE: File generated by distrogen. Do not manually edit. diff --git a/internal/distrogen/testdata/generator/distribution/go_proxy/golden/manifest.yaml b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/manifest.yaml new file mode 100644 index 0000000000..6efcbcc330 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/manifest.yaml @@ -0,0 +1,30 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +dist: + module: + name: otelcol-basic + description: A basic distribution of the OpenTelemetry Collector + version: 0.121.0 + output_path: ./_build + +receivers: +- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.121.0 + +processors: +- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.121.0 +- gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.121.0 + +exporters: +- gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.121.0 + +extensions: +- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.121.0 + +connectors: +- gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.121.0 + +providers: +- gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.27.0 + +replaces: + diff --git a/internal/distrogen/testdata/generator/distribution/go_proxy/golden/otelcol-basic.conf b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/otelcol-basic.conf new file mode 100644 index 0000000000..345817940a --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/otelcol-basic.conf @@ -0,0 +1,5 @@ +# Systemd environment file for the otelcol-basic service + +# Command-line options for the otelcol-basic service. +# Run `/usr/bin/otelcol-basic --help` to see all available options. +OTELCOL_OPTIONS="--config=/etc/otelcol-basic/config.yaml" diff --git a/internal/distrogen/testdata/generator/distribution/go_proxy/golden/otelcol-basic.service b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/otelcol-basic.service new file mode 100644 index 0000000000..615b738a70 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/otelcol-basic.service @@ -0,0 +1,15 @@ +[Unit] +Description=A basic distribution of the OpenTelemetry Collector +After=network.target + +[Service] +EnvironmentFile=/etc/otelcol-basic/otelcol-basic.conf +ExecStart=/usr/bin/otelcol-basic $OTELCOL_OPTIONS +KillMode=mixed +Restart=on-failure +Type=simple +User=otelcol-basic +Group=otelcol-basic + +[Install] +WantedBy=multi-user.target diff --git a/internal/distrogen/testdata/generator/distribution/go_proxy/golden/postinstall.sh b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/postinstall.sh new file mode 100644 index 0000000000..e860f64b3e --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/postinstall.sh @@ -0,0 +1,11 @@ +if command -v systemctl >/dev/null 2>&1; then + if [ -d /run/systemd/system ]; then + systemctl daemon-reload + fi + systemctl enable otelcol-basic.service + if [ -f /etc/otelcol-basic/config.yaml ]; then + if [ -d /run/systemd/system ]; then + systemctl restart otelcol-basic.service + fi + fi +fi diff --git a/internal/distrogen/testdata/generator/distribution/go_proxy/golden/preinstall.sh b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/preinstall.sh new file mode 100644 index 0000000000..79812f9c05 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/preinstall.sh @@ -0,0 +1 @@ +getent passwd otelcol-basic >/dev/null || useradd --system --user-group --no-create-home --shell /sbin/nologin otelcol-basic diff --git a/internal/distrogen/testdata/generator/distribution/go_proxy/golden/preremove.sh b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/preremove.sh new file mode 100644 index 0000000000..1ca0c097f8 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/preremove.sh @@ -0,0 +1,6 @@ +if [ "$1" != "1" ]; then + if command -v systemctl >/dev/null 2>&1; then + systemctl stop otelcol-basic.service + systemctl disable otelcol-basic.service + fi +fi diff --git a/internal/distrogen/testdata/generator/distribution/go_proxy/golden/spec.yaml b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/spec.yaml new file mode 100644 index 0000000000..b238fd3462 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/go_proxy/golden/spec.yaml @@ -0,0 +1,34 @@ +name: basic-distro +module: "" +display_name: Basic OTel +description: A basic distribution of the OpenTelemetry Collector +blurb: A basic collector distro +build_container: debian +version: 0.121.0 +opentelemetry_version: 0.121.0 +opentelemetry_contrib_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +go_version: 1.24.0 +binary_name: otelcol-basic +build_tags: "" +boringcrypto: false +docker_repo: us-docker.pkg.dev/pretend-repo/otelcol-basic +components: + receivers: + - otlp + processors: + - batch + - memorylimiter + exporters: + - otlp + connectors: + - forward + extensions: + - pprof + providers: + - yaml +feature_gates: + - exporter.googlemanagedprometheus.intToDouble +go_proxy: https://not-real.org,direct +component_module_base: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/basic +distrogen_version: v0.130.1-0.20250724183747-261516e1bff1 diff --git a/internal/distrogen/testdata/generator/distribution/go_proxy/spec.yaml b/internal/distrogen/testdata/generator/distribution/go_proxy/spec.yaml new file mode 100644 index 0000000000..99695ba513 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/go_proxy/spec.yaml @@ -0,0 +1,53 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: basic-distro +display_name: Basic OTel +version: 0.121.0 +description: "A basic distribution of the OpenTelemetry Collector" +blurb: "A basic collector distro" +opentelemetry_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +binary_name: otelcol-basic +collector_cgo: false +go_version: 1.24.0 +distrogen_version: v0.130.1-0.20250724183747-261516e1bff1 +component_module_base: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/basic + +go_proxy: https://not-real.org,direct + +feature_gates: + - exporter.googlemanagedprometheus.intToDouble + +docker_repo: us-docker.pkg.dev/pretend-repo/otelcol-basic + +components: + receivers: + - otlp + + processors: + - batch + - memorylimiter + + exporters: + - otlp + + extensions: + - pprof + + connectors: + - forward + + providers: + - yaml diff --git a/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/.goreleaser.yaml b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/.goreleaser.yaml new file mode 100644 index 0000000000..f5ef563e1a --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/.goreleaser.yaml @@ -0,0 +1,101 @@ +version: 2 +project_name: opentelemetry-operations-collector + +snapshot: + version_template: 0.121.0 + +env: + - LD_FLAGS=-s -w + - CGO_ENABLED=0 # TODO: CGO is not supported in goreleaser yet. + - BUILD_FLAGS=-trimpath + - GOWORK=off + +builds: + - id: otelcol-basic-linux + goos: + - linux + goarch: + - amd64 + - arm64 + binary: otelcol-basic + dir: _build + ldflags: + - "-s -w" + flags: + - "-trimpath" + - "-buildvcs=false" + + - id: otelcol-basic-windows + goos: + - windows + goarch: + - amd64 + binary: otelcol-basic + dir: _build + ldflags: + - "-s -w" + flags: + - "-trimpath" + - "-buildvcs=false" + +nfpms: + - package_name: otelcol-basic + contents: + - src: otelcol-basic.service + dst: /lib/systemd/system/otelcol-basic.service + - src: otelcol-basic.conf + dst: /etc/otelcol-basic/otelcol-basic.conf + type: config|noreplace + file_info: + mode: 0644 + - src: config.yaml + dst: /etc/otelcol-basic/config.yaml + type: config|noreplace + file_info: + mode: 0644 + scripts: + preinstall: preinstall.sh + postinstall: postinstall.sh + preremove: preremove.sh + overrides: + rpm: + dependencies: + - /bin/sh + ids: + - otelcol-basic-linux + formats: + - deb + - rpm + umask: 0 + maintainer: Google Cloud Platform # something better than this + description: A basic distribution of the OpenTelemetry Collector + license: Apache 2.0 + +archives: + - id: "otelcol-basic-tarball" + ids: + - "otelcol-basic-linux" + - "otelcol-basic-windows" + formats: + - "tar.gz" + name_template: "otelcol-basic_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + format_overrides: + - goos: windows + formats: + - "zip" + +signs: + - cmd: cosign + signature: ${artifact}.sig + certificate: ${artifact}.pem + args: + - "sign-blob" + - "--output-signature" + - "${signature}" + - "--output-certificate" + - "${certificate}" + - "${artifact}" + - "--yes" + artifacts: archive + env: + - SIGSTORE_NO_CACHE=true diff --git a/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/Dockerfile b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/Dockerfile new file mode 100644 index 0000000000..1c2507f8d7 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/Dockerfile @@ -0,0 +1,15 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +FROM alpine:3.19 as certs +RUN apk --update add ca-certificates + +FROM scratch + +ARG USER_UID=10001 +USER ${USER_UID} + +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --chmod=755 otelcol-basic /otelcol-basic +COPY config.yaml /etc/otelcol-basic/config.yaml +ENTRYPOINT ["/otelcol-basic", "--feature-gates=exporter.googlemanagedprometheus.intToDouble"] +CMD ["--config=/etc/otelcol-basic/config.yaml"] diff --git a/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/Dockerfile.build b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/Dockerfile.build new file mode 100644 index 0000000000..3094949187 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/Dockerfile.build @@ -0,0 +1,43 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +# This Dockerfile provides the same resulting container as +# the main Dockerfile, but it also performs the build within +# an earlier layer. The resulting container will be scratch and +# should be functionally identical. + +# By default, this container should have the root of your project +# where all distributions are container. The generated version will +# use the respective distribution as the working directory for builds. +# The whole project is copied to the container in case you provide +# any custom components contained within your full project structure. +ARG PROJECT_ROOT="." +ARG CERT_CONTAINER="alpine:3" +ARG BUILD_CONTAINER="debian" +FROM --platform=${BUILDPLATFORM:-linux/amd64} ${BUILD_CONTAINER} AS build + +RUN apt-get update && apt-get install -y make curl + +ARG PROJECT_ROOT +COPY ${PROJECT_ROOT} / + +WORKDIR /basic-distro + +ARG BUILDARCH +ARG BUILDOS +ARG TARGETOS +ARG TARGETARCH +RUN make build +FROM ${CERT_CONTAINER} AS certs +RUN apk --update add ca-certificates + +FROM scratch + +ARG USER_UID=10001 +USER ${USER_UID} + +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --from=build --chmod=755 /basic-distro/otelcol-basic /otelcol-basic +COPY --from=build --chmod=644 /basic-distro/config.yaml /etc/otelcol-basic/config.yaml + +ENTRYPOINT ["/otelcol-basic", "--feature-gates=exporter.googlemanagedprometheus.intToDouble"] +CMD ["--config=/etc/otelcol-basic/config.yaml"] diff --git a/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/Dockerfile.goreleaser_releaser b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/Dockerfile.goreleaser_releaser new file mode 100644 index 0000000000..499bee8c67 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/Dockerfile.goreleaser_releaser @@ -0,0 +1,23 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +# This Dockerfile provides the same resulting container as +# the main Dockerfile, but it also performs the build within +# an earlier layer. The resulting container will be scratch and +# should be functionally identical. + +# By default, this container should have the root of your project +# where all distributions are container. The generated version will +# use the respective distribution as the working directory for builds. +# The whole project is copied to the container in case you provide +# any custom components contained within your full project structure. +ARG PROJECT_ROOT="." +ARG BUILD_CONTAINER="debian" +FROM ${BUILD_CONTAINER} AS build + +RUN apt-get update && apt-get install -y make curl git + +ARG PROJECT_ROOT +COPY ${PROJECT_ROOT} / + +WORKDIR /basic-distro +RUN make goreleaser-release diff --git a/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/README.md b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/README.md new file mode 100644 index 0000000000..174c5e20c0 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/README.md @@ -0,0 +1,48 @@ +# Basic OTel + +A basic collector distro + +# Components + +## Receivers + +| Component Name | Documentation | +| -------------- | ------------- | +| otlp | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver/README.md) | + + +## Processors + +| Component Name | Documentation | +| -------------- | ------------- | +| batch | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor/README.md) | +| memorylimiter | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor/README.md) | + + +## Exporters + +| Component Name | Documentation | +| -------------- | ------------- | +| otlp | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlpexporter/README.md) | + + +## Extensions + +| Component Name | Documentation | +| -------------- | ------------- | +| pprof | [docs](https://www.github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/pprofextension/README.md) | + + +## Connectors + +| Component Name | Documentation | +| -------------- | ------------- | +| forward | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/connector/forwardconnector/README.md) | + + +## Providers + +| Component Name | Documentation | +| -------------- | ------------- | +| yaml | [docs](https://www.github.com/open-telemetry/opentelemetry-collector/tree/main/confmap/provider/yamlprovider) | + diff --git a/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/config.yaml b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/config.yaml new file mode 100644 index 0000000000..45f4c5b9b3 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/config.yaml @@ -0,0 +1 @@ +# NOTE: File generated by distrogen. Do not manually edit. diff --git a/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/manifest.yaml b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/manifest.yaml new file mode 100644 index 0000000000..6efcbcc330 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/manifest.yaml @@ -0,0 +1,30 @@ +# NOTE: File generated by distrogen. Do not manually edit. + +dist: + module: + name: otelcol-basic + description: A basic distribution of the OpenTelemetry Collector + version: 0.121.0 + output_path: ./_build + +receivers: +- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.121.0 + +processors: +- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.121.0 +- gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.121.0 + +exporters: +- gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.121.0 + +extensions: +- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.121.0 + +connectors: +- gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.121.0 + +providers: +- gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.27.0 + +replaces: + diff --git a/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/otelcol-basic.conf b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/otelcol-basic.conf new file mode 100644 index 0000000000..345817940a --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/otelcol-basic.conf @@ -0,0 +1,5 @@ +# Systemd environment file for the otelcol-basic service + +# Command-line options for the otelcol-basic service. +# Run `/usr/bin/otelcol-basic --help` to see all available options. +OTELCOL_OPTIONS="--config=/etc/otelcol-basic/config.yaml" diff --git a/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/otelcol-basic.service b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/otelcol-basic.service new file mode 100644 index 0000000000..615b738a70 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/otelcol-basic.service @@ -0,0 +1,15 @@ +[Unit] +Description=A basic distribution of the OpenTelemetry Collector +After=network.target + +[Service] +EnvironmentFile=/etc/otelcol-basic/otelcol-basic.conf +ExecStart=/usr/bin/otelcol-basic $OTELCOL_OPTIONS +KillMode=mixed +Restart=on-failure +Type=simple +User=otelcol-basic +Group=otelcol-basic + +[Install] +WantedBy=multi-user.target diff --git a/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/postinstall.sh b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/postinstall.sh new file mode 100644 index 0000000000..e860f64b3e --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/postinstall.sh @@ -0,0 +1,11 @@ +if command -v systemctl >/dev/null 2>&1; then + if [ -d /run/systemd/system ]; then + systemctl daemon-reload + fi + systemctl enable otelcol-basic.service + if [ -f /etc/otelcol-basic/config.yaml ]; then + if [ -d /run/systemd/system ]; then + systemctl restart otelcol-basic.service + fi + fi +fi diff --git a/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/preinstall.sh b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/preinstall.sh new file mode 100644 index 0000000000..79812f9c05 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/preinstall.sh @@ -0,0 +1 @@ +getent passwd otelcol-basic >/dev/null || useradd --system --user-group --no-create-home --shell /sbin/nologin otelcol-basic diff --git a/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/preremove.sh b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/preremove.sh new file mode 100644 index 0000000000..1ca0c097f8 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/preremove.sh @@ -0,0 +1,6 @@ +if [ "$1" != "1" ]; then + if command -v systemctl >/dev/null 2>&1; then + systemctl stop otelcol-basic.service + systemctl disable otelcol-basic.service + fi +fi diff --git a/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/spec.yaml b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/spec.yaml new file mode 100644 index 0000000000..e86374ad9c --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/no_docker_repo/golden/spec.yaml @@ -0,0 +1,33 @@ +name: basic-distro +module: "" +display_name: Basic OTel +description: A basic distribution of the OpenTelemetry Collector +blurb: A basic collector distro +build_container: debian +version: 0.121.0 +opentelemetry_version: 0.121.0 +opentelemetry_contrib_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +go_version: 1.24.0 +binary_name: otelcol-basic +build_tags: "" +boringcrypto: false +docker_repo: "" +components: + receivers: + - otlp + processors: + - batch + - memorylimiter + exporters: + - otlp + connectors: + - forward + extensions: + - pprof + providers: + - yaml +feature_gates: + - exporter.googlemanagedprometheus.intToDouble +component_module_base: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/basic +distrogen_version: v0.130.1-0.20250724183747-261516e1bff1 diff --git a/internal/distrogen/testdata/generator/distribution/no_docker_repo/spec.yaml b/internal/distrogen/testdata/generator/distribution/no_docker_repo/spec.yaml new file mode 100644 index 0000000000..faa47e0792 --- /dev/null +++ b/internal/distrogen/testdata/generator/distribution/no_docker_repo/spec.yaml @@ -0,0 +1,49 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: basic-distro +display_name: Basic OTel +version: 0.121.0 +description: "A basic distribution of the OpenTelemetry Collector" +blurb: "A basic collector distro" +opentelemetry_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +binary_name: otelcol-basic +collector_cgo: false +go_version: 1.24.0 +distrogen_version: v0.130.1-0.20250724183747-261516e1bff1 +component_module_base: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/basic + +feature_gates: + - exporter.googlemanagedprometheus.intToDouble + +components: + receivers: + - otlp + + processors: + - batch + - memorylimiter + + exporters: + - otlp + + extensions: + - pprof + + connectors: + - forward + + providers: + - yaml diff --git a/internal/distrogen/testdata/generator/project/golden/.distrogen/VERSION b/internal/distrogen/testdata/generator/project/golden/.distrogen/VERSION new file mode 100644 index 0000000000..8728de48c1 --- /dev/null +++ b/internal/distrogen/testdata/generator/project/golden/.distrogen/VERSION @@ -0,0 +1 @@ +v0.130.1-0.20250724183747-261516e1bff1 diff --git a/internal/distrogen/testdata/generator/project/golden/components/registry.yaml b/internal/distrogen/testdata/generator/project/golden/components/registry.yaml new file mode 100644 index 0000000000..ff1ad3c386 --- /dev/null +++ b/internal/distrogen/testdata/generator/project/golden/components/registry.yaml @@ -0,0 +1,6 @@ +receivers: {} +processors: {} +exporters: {} +connectors: {} +extensions: {} +providers: {} diff --git a/internal/distrogen/testdata/generator/project/golden/go.mod b/internal/distrogen/testdata/generator/project/golden/go.mod new file mode 100644 index 0000000000..0f3435d948 --- /dev/null +++ b/internal/distrogen/testdata/generator/project/golden/go.mod @@ -0,0 +1,4 @@ +module github.com/GoogleCloudPlatform/opentelemetry-operations-collector/google-built-opentelemetry-collector/cmd/distrogen/testdata/generator/project/golden + +go 1.24 + diff --git a/internal/distrogen/testdata/generator/project/golden/make/common.mk b/internal/distrogen/testdata/generator/project/golden/make/common.mk new file mode 100644 index 0000000000..f6dfdc265b --- /dev/null +++ b/internal/distrogen/testdata/generator/project/golden/make/common.mk @@ -0,0 +1,12 @@ +# TODO: This could be better +.PHONY: test +test: + go test ./... + +.PHONY: tidy +tidy: + go mod tidy + +.PHONY: generate +generate: + go generate ./... diff --git a/internal/distrogen/testdata/generator/project/golden/make/gpu_common.mk b/internal/distrogen/testdata/generator/project/golden/make/gpu_common.mk new file mode 100644 index 0000000000..5286e85cfd --- /dev/null +++ b/internal/distrogen/testdata/generator/project/golden/make/gpu_common.mk @@ -0,0 +1,19 @@ +# TODO: This could be better +# In gpu receivers, we run test twice. Once with gpu support and once without. +# Both need to pass for the component to be "passing tests". +.PHONY: test +test: + go test ./... + go test -tags=gpu ./... + +.PHONY: tidy +tidy: + go mod tidy + +# We don't want to use the `generated_component_test.go` from mdatagen +# because it doesn't account for the expected error when gpu support +# is turned off. +.PHONY: generate +generate: + go generate -tags=gpu ./... + rm generated_component_test.go \ No newline at end of file diff --git a/internal/distrogen/testdata/generator/project/golden/make/maintenance.mk b/internal/distrogen/testdata/generator/project/golden/make/maintenance.mk new file mode 100644 index 0000000000..8b46838a2d --- /dev/null +++ b/internal/distrogen/testdata/generator/project/golden/make/maintenance.mk @@ -0,0 +1,10 @@ +.PHONY: update-go-module +update-go-module: GO_MOD_VERSION ?= latest +update-go-module: +ifndef GO_MOD + @echo "Missing a GO_MOD to update" +else + @FOUND_MOD=$$(go list -m all | grep '^$(GO_MOD)') && \ + [ -n "$$FOUND_MOD" ] && \ + go get -u $(GO_MOD)@$(GO_MOD_VERSION) || echo "module $(GO_MOD) not found in ${PWD}" +endif diff --git a/internal/distrogen/testdata/generator/project/golden/make/otel_component.mk b/internal/distrogen/testdata/generator/project/golden/make/otel_component.mk new file mode 100644 index 0000000000..85105c4341 --- /dev/null +++ b/internal/distrogen/testdata/generator/project/golden/make/otel_component.mk @@ -0,0 +1,45 @@ +DISTROGEN_BIN ?= distrogen + +OTEL_VERSION ?= latest +OTEL_CONTRIB_VERSION ?= latest + +STABLE_COMPONENTS_PATTERN = -e "^go.opentelemetry.io/collector/pdata" \ + -e "^go.opentelemetry.io/collector/featuregate" \ + -e "^go.opentelemetry.io/collector/client" \ + -e "^go.opentelemetry.io/collector/featuregate" \ + -e "^go.opentelemetry.io/collector/pdata" \ + -e "^go.opentelemetry.io/collector/confmap" \ + -e "^go.opentelemetry.io/collector/confmap/provider/envprovider" \ + -e "^go.opentelemetry.io/collector/confmap/provider/fileprovider" \ + -e "^go.opentelemetry.io/collector/confmap/provider/httpprovider" \ + -e "^go.opentelemetry.io/collector/confmap/provider/httpsprovider" \ + -e "^go.opentelemetry.io/collector/confmap/provider/yamlprovider" \ + -e "^go.opentelemetry.io/collector/config/configopaque" \ + -e "^go.opentelemetry.io/collector/config/configcompression" \ + -e "^go.opentelemetry.io/collector/config/configretry" \ + -e "^go.opentelemetry.io/collector/config/configtls" \ + -e "^go.opentelemetry.io/collector/config/confignet" \ + -e "^go.opentelemetry.io/collector/consumer" + +LIST_DIRECT_MODULES = go list -m -f '{{if not (or .Indirect .Main)}}{{.Path}}{{end}}' all +INCLUDE_COLLECTOR_CORE_COMPONENTS = grep "^go.opentelemetry.io" | grep -v "^go.opentelemetry.io/otel" +INCLUDE_COLLECTOR_STABLE_CORE_COMPONENTS = grep $(STABLE_COMPONENTS_PATTERN) +EXCLUDE_COLLECTOR_STABLE_CORE_COMPONENTS = grep -v $(STABLE_COMPONENTS_PATTERN) +INCLUDE_CONTRIB_COMPONENTS = grep "^github.com/open-telemetry/opentelemetry-collector-contrib" +GO_GET_ALL = xargs --no-run-if-empty -t -I '{}' go get -tags=gpu {} + +.PHONY: update-components +update-components: core-components contrib-components + +.PHONY: core-components +core-components: + $(LIST_DIRECT_MODULES) | \ + $(INCLUDE_COLLECTOR_CORE_COMPONENTS) | \ + $(DISTROGEN_BIN) otel_component_versions -otel_version $(OTEL_VERSION) | \ + $(GO_GET_ALL) + +.PHONY: contrib-components +contrib-components: + $(LIST_DIRECT_MODULES) | \ + $(INCLUDE_CONTRIB_COMPONENTS) | \ + $(GO_GET_ALL)@$(OTEL_CONTRIB_VERSION) diff --git a/internal/distrogen/testdata/generator/project/golden/scripts/download_mdatagen.sh b/internal/distrogen/testdata/generator/project/golden/scripts/download_mdatagen.sh new file mode 100644 index 0000000000..f344ac018d --- /dev/null +++ b/internal/distrogen/testdata/generator/project/golden/scripts/download_mdatagen.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# This script will download mdatagen at the otel version specified in the first argument. +# This script is needed to circumvent this issue: +# https://github.com/open-telemetry/opentelemetry-collector/issues/9281 + +set -e + +OTEL_VERSION=$1 + +if [[ -z "$OTEL_VERSION" ]]; then + echo "Please specify the OpenTelemetry Collector version to use." + exit 1 +fi + +TMP_DIR=$(mktemp -d) + +cd $TMP_DIR +go mod init tempmod +go get -u go.opentelemetry.io/collector/cmd/mdatagen@$OTEL_VERSION +go install go.opentelemetry.io/collector/cmd/mdatagen + +rm -rf $TMP_DIR diff --git a/internal/distrogen/testdata/generator/project/golden/spec.yaml b/internal/distrogen/testdata/generator/project/golden/spec.yaml new file mode 100644 index 0000000000..3392b59494 --- /dev/null +++ b/internal/distrogen/testdata/generator/project/golden/spec.yaml @@ -0,0 +1,51 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: basic-distro +display_name: Basic OTel +module: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/google-built-opentelemetry-collector/cmd/distrogen/testdata/generator/project/golden +version: 0.121.0 +description: "A basic distribution of the OpenTelemetry Collector" +blurb: "A basic collector distro" +opentelemetry_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +binary_name: otelcol-basic +collector_cgo: false +go_version: 1.24.0 +distrogen_version: v0.130.1-0.20250724183747-261516e1bff1 + +feature_gates: + - exporter.googlemanagedprometheus.intToDouble + +docker_repo: us-docker.pkg.dev/pretend-repo/otelcol-basic + +components: + receivers: + - otlp + + processors: + - batch + - memorylimiter + + exporters: + - otlp + + extensions: + - pprof + + connectors: + - forward + + providers: + - yaml diff --git a/internal/distrogen/testdata/generator/project/golden/templates/.empty b/internal/distrogen/testdata/generator/project/golden/templates/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/internal/distrogen/testdata/generator/project/spec.yaml b/internal/distrogen/testdata/generator/project/spec.yaml new file mode 100644 index 0000000000..3392b59494 --- /dev/null +++ b/internal/distrogen/testdata/generator/project/spec.yaml @@ -0,0 +1,51 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: basic-distro +display_name: Basic OTel +module: github.com/GoogleCloudPlatform/opentelemetry-operations-collector/google-built-opentelemetry-collector/cmd/distrogen/testdata/generator/project/golden +version: 0.121.0 +description: "A basic distribution of the OpenTelemetry Collector" +blurb: "A basic collector distro" +opentelemetry_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +binary_name: otelcol-basic +collector_cgo: false +go_version: 1.24.0 +distrogen_version: v0.130.1-0.20250724183747-261516e1bff1 + +feature_gates: + - exporter.googlemanagedprometheus.intToDouble + +docker_repo: us-docker.pkg.dev/pretend-repo/otelcol-basic + +components: + receivers: + - otlp + + processors: + - batch + - memorylimiter + + exporters: + - otlp + + extensions: + - pprof + + connectors: + - forward + + providers: + - yaml diff --git a/internal/distrogen/testdata/invalid/boringcrypto_alpine_build_container.yaml b/internal/distrogen/testdata/invalid/boringcrypto_alpine_build_container.yaml new file mode 100644 index 0000000000..64b01cfd2b --- /dev/null +++ b/internal/distrogen/testdata/invalid/boringcrypto_alpine_build_container.yaml @@ -0,0 +1,40 @@ +name: basic-distro + +# What this test case is testing. +boringcrypto: true +collector_cgo: true +build_container: alpine + +display_name: Basic OTel +version: 0.121.0 +description: "A basic distribution of the OpenTelemetry Collector" +blurb: "A basic collector distro" +opentelemetry_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +binary_name: otelcol-basic +go_version: 1.24.0 + +feature_gates: + - exporter.googlemanagedprometheus.intToDouble + +docker_repo: us-docker.pkg.dev/pretend-repo/otelcol-basic + +components: + receivers: + - otlp + + processors: + - batch + - memorylimiter + + exporters: + - otlp + + extensions: + - pprof + + connectors: + - forward + + providers: + - yaml diff --git a/internal/distrogen/testdata/invalid/boringcrypto_cgo_off.yaml b/internal/distrogen/testdata/invalid/boringcrypto_cgo_off.yaml new file mode 100644 index 0000000000..2ac51e698d --- /dev/null +++ b/internal/distrogen/testdata/invalid/boringcrypto_cgo_off.yaml @@ -0,0 +1,39 @@ +name: basic-distro + +# What this test case is testing. +boringcrypto: true +collector_cgo: false + +display_name: Basic OTel +version: 0.121.0 +description: "A basic distribution of the OpenTelemetry Collector" +blurb: "A basic collector distro" +opentelemetry_version: 0.121.0 +opentelemetry_stable_version: 1.27.0 +binary_name: otelcol-basic +go_version: 1.24.0 + +feature_gates: + - exporter.googlemanagedprometheus.intToDouble + +docker_repo: us-docker.pkg.dev/pretend-repo/otelcol-basic + +components: + receivers: + - otlp + + processors: + - batch + - memorylimiter + + exporters: + - otlp + + extensions: + - pprof + + connectors: + - forward + + providers: + - yaml diff --git a/internal/distrogen/testdata/registry/basic_registry.yaml b/internal/distrogen/testdata/registry/basic_registry.yaml new file mode 100644 index 0000000000..110914ec61 --- /dev/null +++ b/internal/distrogen/testdata/registry/basic_registry.yaml @@ -0,0 +1,33 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +receivers: + testreceiver: + gomod: github.com/test/receiver v1.0.0 + +processors: + testprocessor: + gomod: github.com/test/processor v1.0.0 + +exporters: + testexporter: + gomod: github.com/test/exporter v1.0.0 + +connectors: + testconnector: + gomod: github.com/test/connector v1.0.0 + +extensions: + testextension: + gomod: github.com/test/extension v1.0.0 \ No newline at end of file diff --git a/internal/distrogen/testdata/registry/invalid_yaml.yaml b/internal/distrogen/testdata/registry/invalid_yaml.yaml new file mode 100644 index 0000000000..30d538d50c --- /dev/null +++ b/internal/distrogen/testdata/registry/invalid_yaml.yaml @@ -0,0 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +receivers: a + r: + gomod: blah \ No newline at end of file diff --git a/internal/distrogen/utils_test.go b/internal/distrogen/utils_test.go new file mode 100644 index 0000000000..bbe661821a --- /dev/null +++ b/internal/distrogen/utils_test.go @@ -0,0 +1,82 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "os" + "path/filepath" + "testing" + + "gotest.tools/v3/assert" + "gotest.tools/v3/golden" +) + +// filesInDirAsSet returns the set of file names within a given directory. +func filesInDirAsSet(dir string) (map[string]struct{}, error) { + files, err := os.ReadDir(dir) + if err != nil { + // Let the caller handle os.IsNotExist if they choose to. + return nil, err + } + + fileSet := make(map[string]struct{}) + for _, file := range files { + if file.IsDir() { + nestedFileSet, err := filesInDirAsSet(filepath.Join(dir, file.Name())) + if err != nil { + return nil, err + } + for f := range nestedFileSet { + fileSet[filepath.Join(file.Name(), f)] = struct{}{} + } + } else { + fileSet[file.Name()] = struct{}{} + } + } + return fileSet, nil +} + +// assertGoldenFiles compares files in a generated directory against a golden directory. +// It fails the test if the file sets or their contents do not match. +// It handles the creation of golden files when the -update flag is used. +func assertGoldenFiles(t *testing.T, generatedPath, goldenPath, goldenSubPath string) { + t.Helper() + + generatedSet, err := filesInDirAsSet(generatedPath) + assert.NilError(t, err) + + // In update mode, `golden.Assert` will create/update the golden files. + // In verify mode, it compares generated content against existing golden files. + for file := range generatedSet { + generatedContent, err := os.ReadFile(filepath.Join(generatedPath, file)) + assert.NilError(t, err) + golden.Assert(t, string(generatedContent), filepath.Join(goldenSubPath, file)) + } + + // In verify mode, we must also ensure the set of generated files is identical + // to the set of golden files. + if !golden.FlagUpdate() { + goldenSet, err := filesInDirAsSet(goldenPath) + if os.IsNotExist(err) { + // Golden directory doesn't exist; treat it as an empty set. + goldenSet = make(map[string]struct{}) + } else { + assert.NilError(t, err) + } + + // This provides a clean diff if the sets of files are not identical. + assert.DeepEqual(t, goldenSet, generatedSet) + } +} diff --git a/internal/distrogen/yaml.go b/internal/distrogen/yaml.go new file mode 100644 index 0000000000..46ab770cae --- /dev/null +++ b/internal/distrogen/yaml.go @@ -0,0 +1,80 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "fmt" + "io/fs" + "os" + + "gopkg.in/yaml.v3" +) + +func yamlUnmarshalFromFile[T any](path string) (*T, error) { + content, err := os.ReadFile(path) + if err != nil { + return nil, err + } + + var result T + err = yaml.Unmarshal(content, &result) + if err != nil { + return nil, fmt.Errorf("error parsing %s: %w", path, err) + } + return &result, nil +} + +func yamlUnmarshalFromFileInto[T any](path string, value *T) error { + content, err := os.ReadFile(path) + if err != nil { + return err + } + + err = yaml.Unmarshal(content, &value) + if err != nil { + return fmt.Errorf("error parsing %s: %w", path, err) + } + return nil +} + +func yamlMarshalToFile[T any](value *T, path string, mode fs.FileMode) error { + content, err := yaml.Marshal(value) + if err != nil { + return err + } + return os.WriteFile(path, content, mode) +} + +func renderYaml(value any) string { + content, _ := yaml.Marshal(value) + return string(content) +} + +func mapMerge[K comparable, V any](m map[K]V, m2 map[K]V) { + if m == nil { + m = make(map[K]V, len(m2)) + } + for k, v := range m2 { + m[k] = v + } +} + +func mapKeys[K comparable, V any](m map[K]V) []K { + keys := make([]K, 0, len(m)) + for k := range m { + keys = append(keys, k) + } + return keys +}