diff --git a/.clang-tidy b/.clang-tidy index bc854d57f8a..532b0f37b81 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,6 +1,14 @@ +# To run clang-tidy from CMake, build ClickHouse with -DENABLE_CLANG_TIDY=1. To show all warnings, it is +# recommended to pass "-k0" to Ninja. + # Enable all checks + disale selected checks. Feel free to remove disabled checks from below list if # a) the new check is not controversial (this includes many checks in readability-* and google-*) or # b) too noisy (checks with > 100 new warnings are considered noisy, this includes e.g. cppcoreguidelines-*). + +# TODO Let clang-tidy check headers in further directories +# --> HeaderFilterRegex: '^.*/(src|base|programs|utils)/.*(h|hpp)$' +HeaderFilterRegex: '^.*/(base)/.*(h|hpp)$' + Checks: '*, -abseil-*, @@ -14,6 +22,8 @@ Checks: '*, -bugprone-implicit-widening-of-multiplication-result, -bugprone-narrowing-conversions, -bugprone-not-null-terminated-result, + -bugprone-unchecked-optional-access, + -bugprone-assignment-in-if-condition, -cert-dcl16-c, -cert-err58-cpp, @@ -54,8 +64,6 @@ Checks: '*, -cppcoreguidelines-slicing, -cppcoreguidelines-special-member-functions, - -concurrency-mt-unsafe, - -darwin-*, -fuchsia-*, @@ -97,6 +105,7 @@ Checks: '*, -misc-no-recursion, -misc-non-private-member-variables-in-classes, + -misc-const-correctness, -modernize-avoid-c-arrays, -modernize-concat-nested-namespaces, @@ -108,6 +117,7 @@ Checks: '*, -modernize-use-nodiscard, -modernize-use-override, -modernize-use-trailing-return-type, + -modernize-macro-to-enum, -performance-inefficient-string-concatenation, -performance-no-int-to-ptr, @@ -129,6 +139,7 @@ Checks: '*, -readability-suspicious-call-argument, -readability-uppercase-literal-suffix, -readability-use-anyofallof, + -readability-simplify-boolean-expr, -zirkon-*, ' diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 00000000000..06e893fabb3 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,15 @@ +# This is a file that can be used by git-blame to ignore some revisions. +# (git 2.23+, released in August 2019) +# +# Can be configured as follow: +# +# $ git config blame.ignoreRevsFile .git-blame-ignore-revs +# +# For more information you can look at git-blame(1) man page. + +# Changed tabs to spaces in code [#CLICKHOUSE-3] +137ad95929ee016cc6d3c03bccb5586941c163ff + +# dbms/ → src/ +# (though it is unlikely that you will see it in blame) +06446b4f08a142d6f1bc30664c47ded88ab51782 diff --git a/.github/workflows/backport_branches.yml b/.github/workflows/backport_branches.yml index e1b2b1fad01..1c51d06f395 100644 --- a/.github/workflows/backport_branches.yml +++ b/.github/workflows/backport_branches.yml @@ -349,6 +349,100 @@ jobs: # shellcheck disable=SC2046 docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" + BuilderBinDarwin: + needs: [DockerHubPush] + runs-on: [self-hosted, builder] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/build_check + IMAGES_PATH=${{runner.temp}}/images_path + REPO_COPY=${{runner.temp}}/build_check/ClickHouse + CACHES_PATH=${{runner.temp}}/../ccaches + BUILD_NAME=binary_darwin + EOF + - name: Download changed images + uses: actions/download-artifact@v2 + with: + name: changed_images + path: ${{ env.IMAGES_PATH }} + - name: Clear repository + run: | + sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" + - name: Check out repository code + uses: actions/checkout@v2 + with: + fetch-depth: 0 # otherwise we will have no info about contributors + - name: Build + run: | + git -C "$GITHUB_WORKSPACE" submodule sync --recursive + git -C "$GITHUB_WORKSPACE" submodule update --depth=1 --recursive --init --jobs=10 + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" && python3 build_check.py "$BUILD_NAME" + - name: Upload build URLs to artifacts + if: ${{ success() || failure() }} + uses: actions/upload-artifact@v2 + with: + name: ${{ env.BUILD_URLS }} + path: ${{ env.TEMP_PATH }}/${{ env.BUILD_URLS }}.json + - name: Cleanup + if: always() + run: | + # shellcheck disable=SC2046 + docker kill $(docker ps -q) ||: + # shellcheck disable=SC2046 + docker rm -f $(docker ps -a -q) ||: + sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" + BuilderBinDarwinAarch64: + needs: [DockerHubPush] + runs-on: [self-hosted, builder] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/build_check + IMAGES_PATH=${{runner.temp}}/images_path + REPO_COPY=${{runner.temp}}/build_check/ClickHouse + CACHES_PATH=${{runner.temp}}/../ccaches + BUILD_NAME=binary_darwin_aarch64 + EOF + - name: Download changed images + uses: actions/download-artifact@v2 + with: + name: changed_images + path: ${{ env.IMAGES_PATH }} + - name: Clear repository + run: | + sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" + - name: Check out repository code + uses: actions/checkout@v2 + with: + fetch-depth: 0 # otherwise we will have no info about contributors + - name: Build + run: | + git -C "$GITHUB_WORKSPACE" submodule sync --recursive + git -C "$GITHUB_WORKSPACE" submodule update --depth=1 --recursive --init --jobs=10 + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" && python3 build_check.py "$BUILD_NAME" + - name: Upload build URLs to artifacts + if: ${{ success() || failure() }} + uses: actions/upload-artifact@v2 + with: + name: ${{ env.BUILD_URLS }} + path: ${{ env.TEMP_PATH }}/${{ env.BUILD_URLS }}.json + - name: Cleanup + if: always() + run: | + # shellcheck disable=SC2046 + docker kill $(docker ps -q) ||: + # shellcheck disable=SC2046 + docker rm -f $(docker ps -a -q) ||: + sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" ############################################################################################ ##################################### Docker images ####################################### ############################################################################################ @@ -425,6 +519,46 @@ jobs: # shellcheck disable=SC2046 docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" + BuilderSpecialReport: + needs: + - BuilderBinDarwin + - BuilderBinDarwinAarch64 + runs-on: [self-hosted, style-checker] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/report_check + REPORTS_PATH=${{runner.temp}}/reports_dir + CHECK_NAME=ClickHouse special build check + NEEDS_DATA_PATH=${{runner.temp}}/needs.json + EOF + - name: Download json reports + uses: actions/download-artifact@v2 + with: + path: ${{ env.REPORTS_PATH }} + - name: Clear repository + run: | + sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" + - name: Check out repository code + uses: actions/checkout@v2 + - name: Report Builder + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cat > "$NEEDS_DATA_PATH" << 'EOF' + ${{ toJSON(needs) }} + EOF + cd "$GITHUB_WORKSPACE/tests/ci" + python3 build_report_check.py "$CHECK_NAME" + - name: Cleanup + if: always() + run: | + # shellcheck disable=SC2046 + docker kill $(docker ps -q) ||: + # shellcheck disable=SC2046 + docker rm -f $(docker ps -a -q) ||: + sudo rm -fr "$TEMP_PATH" ############################################################################################## ########################### FUNCTIONAl STATELESS TESTS ####################################### ############################################################################################## @@ -437,7 +571,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_debug REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (address) + CHECK_NAME=Stateless tests (asan) REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse KILL_TIMEOUT=10800 EOF @@ -521,7 +655,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stress_thread REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stress test (thread) + CHECK_NAME=Stress test (tsan) REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse EOF - name: Download json reports @@ -592,6 +726,7 @@ jobs: - DockerHubPush - DockerServerImages - BuilderReport + - BuilderSpecialReport - FunctionalStatelessTestAsan - FunctionalStatefulTestDebug - StressTestTsan diff --git a/.github/workflows/docs_release.yml b/.github/workflows/docs_release.yml index aed691844da..e0fdb0c2f7b 100644 --- a/.github/workflows/docs_release.yml +++ b/.github/workflows/docs_release.yml @@ -13,7 +13,6 @@ concurrency: - master paths: - '.github/**' - - 'benchmark/**' - 'docker/docs/release/**' - 'docs/**' - 'utils/list-versions/version_date.tsv' diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 162c03a37d5..d3a303eb7ab 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -151,8 +151,8 @@ jobs: # shellcheck disable=SC2046 docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" - SplitBuildSmokeTest: - needs: [BuilderDebSplitted] + SharedBuildSmokeTest: + needs: [BuilderDebShared] runs-on: [self-hosted, style-checker] steps: - name: Set envs @@ -171,7 +171,7 @@ jobs: uses: actions/download-artifact@v2 with: path: ${{ env.REPORTS_PATH }} - - name: Split build check + - name: Shared build check run: | sudo rm -fr "$TEMP_PATH" mkdir -p "$TEMP_PATH" @@ -598,7 +598,7 @@ jobs: ########################################################################################## ##################################### SPECIAL BUILDS ##################################### ########################################################################################## - BuilderDebSplitted: + BuilderDebShared: needs: [DockerHubPush] runs-on: [self-hosted, builder] steps: @@ -609,7 +609,7 @@ jobs: IMAGES_PATH=${{runner.temp}}/images_path REPO_COPY=${{runner.temp}}/build_check/ClickHouse CACHES_PATH=${{runner.temp}}/../ccaches - BUILD_NAME=binary_splitted + BUILD_NAME=binary_shared EOF - name: Download changed images uses: actions/download-artifact@v2 @@ -923,6 +923,53 @@ jobs: # shellcheck disable=SC2046 docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" + BuilderBinAmd64SSE2: + needs: [DockerHubPush] + runs-on: [self-hosted, builder] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/build_check + IMAGES_PATH=${{runner.temp}}/images_path + REPO_COPY=${{runner.temp}}/build_check/ClickHouse + CACHES_PATH=${{runner.temp}}/../ccaches + BUILD_NAME=binary_amd64sse2 + EOF + - name: Download changed images + uses: actions/download-artifact@v2 + with: + name: changed_images + path: ${{ env.IMAGES_PATH }} + - name: Clear repository + run: | + sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" + - name: Check out repository code + uses: actions/checkout@v2 + with: + fetch-depth: 0 # otherwise we will have no info about contributors + - name: Build + run: | + git -C "$GITHUB_WORKSPACE" submodule sync --recursive + git -C "$GITHUB_WORKSPACE" submodule update --depth=1 --recursive --init --jobs=10 + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" && python3 build_check.py "$BUILD_NAME" + - name: Upload build URLs to artifacts + if: ${{ success() || failure() }} + uses: actions/upload-artifact@v2 + with: + name: ${{ env.BUILD_URLS }} + path: ${{ env.TEMP_PATH }}/${{ env.BUILD_URLS }}.json + - name: Cleanup + if: always() + run: | + # shellcheck disable=SC2046 + docker kill $(docker ps -q) ||: + # shellcheck disable=SC2046 + docker rm -f $(docker ps -a -q) ||: + sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" ############################################################################################ ##################################### Docker images ####################################### ############################################################################################ @@ -1011,8 +1058,9 @@ jobs: - BuilderBinFreeBSD # - BuilderBinGCC - BuilderBinPPC64 + - BuilderBinAmd64SSE2 - BuilderBinClangTidy - - BuilderDebSplitted + - BuilderDebShared runs-on: [self-hosted, style-checker] steps: - name: Set envs @@ -1126,6 +1174,84 @@ jobs: # shellcheck disable=SC2046 docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" + FunctionalStatelessTestReleaseDatabaseReplicated0: + needs: [BuilderDebRelease] + runs-on: [self-hosted, func-tester] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/stateless_database_replicated + REPORTS_PATH=${{runner.temp}}/reports_dir + CHECK_NAME=Stateless tests (release, DatabaseReplicated) + REPO_COPY=${{runner.temp}}/stateless_database_replicated/ClickHouse + KILL_TIMEOUT=10800 + RUN_BY_HASH_NUM=0 + RUN_BY_HASH_TOTAL=2 + EOF + - name: Download json reports + uses: actions/download-artifact@v2 + with: + path: ${{ env.REPORTS_PATH }} + - name: Clear repository + run: | + sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" + - name: Check out repository code + uses: actions/checkout@v2 + - name: Functional test + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" + python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT" + - name: Cleanup + if: always() + run: | + # shellcheck disable=SC2046 + docker kill $(docker ps -q) ||: + # shellcheck disable=SC2046 + docker rm -f $(docker ps -a -q) ||: + sudo rm -fr "$TEMP_PATH" + FunctionalStatelessTestReleaseDatabaseReplicated1: + needs: [BuilderDebRelease] + runs-on: [self-hosted, func-tester] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/stateless_database_replicated + REPORTS_PATH=${{runner.temp}}/reports_dir + CHECK_NAME=Stateless tests (release, DatabaseReplicated) + REPO_COPY=${{runner.temp}}/stateless_database_replicated/ClickHouse + KILL_TIMEOUT=10800 + RUN_BY_HASH_NUM=1 + RUN_BY_HASH_TOTAL=2 + EOF + - name: Download json reports + uses: actions/download-artifact@v2 + with: + path: ${{ env.REPORTS_PATH }} + - name: Clear repository + run: | + sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" + - name: Check out repository code + uses: actions/checkout@v2 + - name: Functional test + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" + python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT" + - name: Cleanup + if: always() + run: | + # shellcheck disable=SC2046 + docker kill $(docker ps -q) ||: + # shellcheck disable=SC2046 + docker rm -f $(docker ps -a -q) ||: + sudo rm -fr "$TEMP_PATH" FunctionalStatelessTestReleaseS3: needs: [BuilderDebRelease] runs-on: [self-hosted, func-tester] @@ -1209,7 +1335,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_debug REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (address) + CHECK_NAME=Stateless tests (asan) REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=0 @@ -1248,7 +1374,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_debug REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (address) + CHECK_NAME=Stateless tests (asan) REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=1 @@ -1287,7 +1413,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (thread) + CHECK_NAME=Stateless tests (tsan) REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=0 @@ -1326,7 +1452,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (thread) + CHECK_NAME=Stateless tests (tsan) REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=1 @@ -1365,7 +1491,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (thread) + CHECK_NAME=Stateless tests (tsan) REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=2 @@ -1441,7 +1567,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_memory REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (memory) + CHECK_NAME=Stateless tests (msan) REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=0 @@ -1480,7 +1606,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_memory REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (memory) + CHECK_NAME=Stateless tests (msan) REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=1 @@ -1519,7 +1645,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_memory REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (memory) + CHECK_NAME=Stateless tests (msan) REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=2 @@ -1706,43 +1832,6 @@ jobs: # shellcheck disable=SC2046 docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" - FunctionalStatefulTestReleaseDatabaseOrdinary: - needs: [BuilderDebRelease] - runs-on: [self-hosted, func-tester] - steps: - - name: Set envs - run: | - cat >> "$GITHUB_ENV" << 'EOF' - TEMP_PATH=${{runner.temp}}/stateful_release_database_ordinary - REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateful tests (release, DatabaseOrdinary) - REPO_COPY=${{runner.temp}}/stateful_release_database_ordinary/ClickHouse - KILL_TIMEOUT=3600 - EOF - - name: Download json reports - uses: actions/download-artifact@v2 - with: - path: ${{ env.REPORTS_PATH }} - - name: Clear repository - run: | - sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" - - name: Check out repository code - uses: actions/checkout@v2 - - name: Functional test - run: | - sudo rm -fr "$TEMP_PATH" - mkdir -p "$TEMP_PATH" - cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" - cd "$REPO_COPY/tests/ci" - python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT" - - name: Cleanup - if: always() - run: | - # shellcheck disable=SC2046 - docker kill $(docker ps -q) ||: - # shellcheck disable=SC2046 - docker rm -f $(docker ps -a -q) ||: - sudo rm -fr "$TEMP_PATH" FunctionalStatefulTestAarch64: needs: [BuilderDebAarch64] runs-on: [self-hosted, func-tester-aarch64] @@ -1789,7 +1878,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateful_debug REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateful tests (address) + CHECK_NAME=Stateful tests (asan) REPO_COPY=${{runner.temp}}/stateful_debug/ClickHouse KILL_TIMEOUT=3600 EOF @@ -1826,7 +1915,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateful_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateful tests (thread) + CHECK_NAME=Stateful tests (tsan) REPO_COPY=${{runner.temp}}/stateful_tsan/ClickHouse KILL_TIMEOUT=3600 EOF @@ -1863,7 +1952,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateful_msan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateful tests (memory) + CHECK_NAME=Stateful tests (msan) REPO_COPY=${{runner.temp}}/stateful_msan/ClickHouse KILL_TIMEOUT=3600 EOF @@ -1977,7 +2066,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stress_thread REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stress test (address) + CHECK_NAME=Stress test (asan) REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse EOF - name: Download json reports @@ -2017,7 +2106,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stress_thread REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stress test (thread) + CHECK_NAME=Stress test (tsan) REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse EOF - name: Download json reports @@ -2053,7 +2142,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stress_memory REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stress test (memory) + CHECK_NAME=Stress test (msan) REPO_COPY=${{runner.temp}}/stress_memory/ClickHouse EOF - name: Download json reports @@ -2089,7 +2178,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stress_undefined REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stress test (undefined) + CHECK_NAME=Stress test (ubsan) REPO_COPY=${{runner.temp}}/stress_undefined/ClickHouse EOF - name: Download json reports @@ -2278,7 +2367,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/integration_tests_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Integration tests (thread) + CHECK_NAME=Integration tests (tsan) REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse RUN_BY_HASH_NUM=0 RUN_BY_HASH_TOTAL=4 @@ -2316,7 +2405,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/integration_tests_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Integration tests (thread) + CHECK_NAME=Integration tests (tsan) REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse RUN_BY_HASH_NUM=1 RUN_BY_HASH_TOTAL=4 @@ -2354,7 +2443,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/integration_tests_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Integration tests (thread) + CHECK_NAME=Integration tests (tsan) REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse RUN_BY_HASH_NUM=2 RUN_BY_HASH_TOTAL=4 @@ -2392,7 +2481,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/integration_tests_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Integration tests (thread) + CHECK_NAME=Integration tests (tsan) REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse RUN_BY_HASH_NUM=3 RUN_BY_HASH_TOTAL=4 @@ -2509,7 +2598,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/ast_fuzzer_asan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=AST fuzzer (ASan) + CHECK_NAME=AST fuzzer (asan) REPO_COPY=${{runner.temp}}/ast_fuzzer_asan/ClickHouse EOF - name: Download json reports @@ -2545,7 +2634,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/ast_fuzzer_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=AST fuzzer (TSan) + CHECK_NAME=AST fuzzer (tsan) REPO_COPY=${{runner.temp}}/ast_fuzzer_tsan/ClickHouse EOF - name: Download json reports @@ -2581,7 +2670,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/ast_fuzzer_ubsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=AST fuzzer (UBSan) + CHECK_NAME=AST fuzzer (ubsan) REPO_COPY=${{runner.temp}}/ast_fuzzer_ubsan/ClickHouse EOF - name: Download json reports @@ -2617,7 +2706,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/ast_fuzzer_msan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=AST fuzzer (MSan) + CHECK_NAME=AST fuzzer (msan) REPO_COPY=${{runner.temp}}/ast_fuzzer_msan/ClickHouse EOF - name: Download json reports @@ -3063,6 +3152,8 @@ jobs: - FunctionalStatelessTestDebug2 - FunctionalStatelessTestRelease - FunctionalStatelessTestReleaseDatabaseOrdinary + - FunctionalStatelessTestReleaseDatabaseReplicated0 + - FunctionalStatelessTestReleaseDatabaseReplicated1 - FunctionalStatelessTestAarch64 - FunctionalStatelessTestAsan0 - FunctionalStatelessTestAsan1 @@ -3075,7 +3166,6 @@ jobs: - FunctionalStatelessTestUBsan - FunctionalStatefulTestDebug - FunctionalStatefulTestRelease - - FunctionalStatefulTestReleaseDatabaseOrdinary - FunctionalStatelessTestReleaseS3 - FunctionalStatefulTestAarch64 - FunctionalStatefulTestAsan @@ -3111,7 +3201,7 @@ jobs: - UnitTestsMsan - UnitTestsUBsan - UnitTestsReleaseClang - - SplitBuildSmokeTest + - SharedBuildSmokeTest runs-on: [self-hosted, style-checker] steps: - name: Clear repository diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 958916b2d16..3f4e5d7bb00 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -216,8 +216,8 @@ jobs: # shellcheck disable=SC2046 docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" - SplitBuildSmokeTest: - needs: [BuilderDebSplitted] + SharedBuildSmokeTest: + needs: [BuilderDebShared] runs-on: [self-hosted, style-checker] steps: - name: Set envs @@ -236,7 +236,7 @@ jobs: uses: actions/download-artifact@v2 with: path: ${{ env.REPORTS_PATH }} - - name: Split build check + - name: Shared build check run: | sudo rm -fr "$TEMP_PATH" mkdir -p "$TEMP_PATH" @@ -254,7 +254,7 @@ jobs: #################################### ORDINARY BUILDS #################################### ######################################################################################### BuilderDebRelease: - needs: [DockerHubPush, FastTest] + needs: [DockerHubPush, FastTest, StyleCheck] runs-on: [self-hosted, builder] steps: - name: Set envs @@ -301,7 +301,7 @@ jobs: docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" BuilderBinRelease: - needs: [DockerHubPush, FastTest] + needs: [DockerHubPush, FastTest, StyleCheck] runs-on: [self-hosted, builder] steps: - name: Set envs @@ -345,53 +345,8 @@ jobs: # shellcheck disable=SC2046 docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" - # BuilderBinGCC: - # needs: [DockerHubPush, FastTest] - # runs-on: [self-hosted, builder] - # steps: - # - name: Set envs - # run: | - # cat >> "$GITHUB_ENV" << 'EOF' - # TEMP_PATH=${{runner.temp}}/build_check - # IMAGES_PATH=${{runner.temp}}/images_path - # REPO_COPY=${{runner.temp}}/build_check/ClickHouse - # CACHES_PATH=${{runner.temp}}/../ccaches - # BUILD_NAME=binary_gcc - # EOF - # - name: Download changed images - # uses: actions/download-artifact@v2 - # with: - # name: changed_images - # path: ${{ runner.temp }}/images_path - # - name: Clear repository - # run: | - # sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" - # - name: Check out repository code - # uses: actions/checkout@v2 - # - name: Build - # run: | - # git -C "$GITHUB_WORKSPACE" submodule sync --recursive - # git -C "$GITHUB_WORKSPACE" submodule update --depth=1 --recursive --init --jobs=10 - # sudo rm -fr "$TEMP_PATH" - # mkdir -p "$TEMP_PATH" - # cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" - # cd "$REPO_COPY/tests/ci" && python3 build_check.py "$BUILD_NAME" - # - name: Upload build URLs to artifacts - # if: ${{ success() || failure() }} - # uses: actions/upload-artifact@v2 - # with: - # name: ${{ env.BUILD_URLS }} - # path: ${{ env.TEMP_PATH }}/${{ env.BUILD_URLS }}.json - # - name: Cleanup - # if: always() - # run: | - # # shellcheck disable=SC2046 - # docker kill $(docker ps -q) ||: - # # shellcheck disable=SC2046 - # docker rm -f $(docker ps -a -q) ||: - # sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" BuilderDebAarch64: - needs: [DockerHubPush, FastTest] + needs: [DockerHubPush, FastTest, StyleCheck] runs-on: [self-hosted, builder] steps: - name: Set envs @@ -438,7 +393,7 @@ jobs: docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" BuilderDebAsan: - needs: [DockerHubPush, FastTest] + needs: [DockerHubPush, FastTest, StyleCheck] runs-on: [self-hosted, builder] steps: - name: Set envs @@ -483,7 +438,7 @@ jobs: docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" BuilderDebUBsan: - needs: [DockerHubPush, FastTest] + needs: [DockerHubPush, FastTest, StyleCheck] runs-on: [self-hosted, builder] steps: - name: Set envs @@ -528,7 +483,7 @@ jobs: docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" BuilderDebTsan: - needs: [DockerHubPush, FastTest] + needs: [DockerHubPush, FastTest, StyleCheck] runs-on: [self-hosted, builder] steps: - name: Set envs @@ -573,7 +528,7 @@ jobs: docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" BuilderDebMsan: - needs: [DockerHubPush, FastTest] + needs: [DockerHubPush, FastTest, StyleCheck] runs-on: [self-hosted, builder] steps: - name: Set envs @@ -618,7 +573,7 @@ jobs: docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" BuilderDebDebug: - needs: [DockerHubPush, FastTest] + needs: [DockerHubPush, FastTest, StyleCheck] runs-on: [self-hosted, builder] steps: - name: Set envs @@ -665,8 +620,8 @@ jobs: ########################################################################################## ##################################### SPECIAL BUILDS ##################################### ########################################################################################## - BuilderDebSplitted: - needs: [DockerHubPush, FastTest] + BuilderDebShared: + needs: [DockerHubPush, FastTest, StyleCheck] runs-on: [self-hosted, builder] steps: - name: Set envs @@ -676,7 +631,7 @@ jobs: IMAGES_PATH=${{runner.temp}}/images_path REPO_COPY=${{runner.temp}}/build_check/ClickHouse CACHES_PATH=${{runner.temp}}/../ccaches - BUILD_NAME=binary_splitted + BUILD_NAME=binary_shared EOF - name: Download changed images uses: actions/download-artifact@v2 @@ -711,7 +666,7 @@ jobs: docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" BuilderBinClangTidy: - needs: [DockerHubPush, FastTest] + needs: [DockerHubPush, FastTest, StyleCheck] runs-on: [self-hosted, builder] steps: - name: Set envs @@ -756,7 +711,7 @@ jobs: docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" BuilderBinDarwin: - needs: [DockerHubPush, FastTest] + needs: [DockerHubPush, FastTest, StyleCheck] runs-on: [self-hosted, builder] steps: - name: Set envs @@ -801,7 +756,7 @@ jobs: docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" BuilderBinAarch64: - needs: [DockerHubPush, FastTest] + needs: [DockerHubPush, FastTest, StyleCheck] runs-on: [self-hosted, builder] steps: - name: Set envs @@ -846,7 +801,7 @@ jobs: docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" BuilderBinFreeBSD: - needs: [DockerHubPush, FastTest] + needs: [DockerHubPush, FastTest, StyleCheck] runs-on: [self-hosted, builder] steps: - name: Set envs @@ -891,7 +846,7 @@ jobs: docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" BuilderBinDarwinAarch64: - needs: [DockerHubPush, FastTest] + needs: [DockerHubPush, FastTest, StyleCheck] runs-on: [self-hosted, builder] steps: - name: Set envs @@ -936,7 +891,7 @@ jobs: docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" BuilderBinPPC64: - needs: [DockerHubPush, FastTest] + needs: [DockerHubPush, FastTest, StyleCheck] runs-on: [self-hosted, builder] steps: - name: Set envs @@ -980,6 +935,51 @@ jobs: # shellcheck disable=SC2046 docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" + BuilderBinAmd64SSE2: + needs: [DockerHubPush, FastTest, StyleCheck] + runs-on: [self-hosted, builder] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/build_check + IMAGES_PATH=${{runner.temp}}/images_path + REPO_COPY=${{runner.temp}}/build_check/ClickHouse + CACHES_PATH=${{runner.temp}}/../ccaches + BUILD_NAME=binary_amd64sse2 + EOF + - name: Download changed images + uses: actions/download-artifact@v2 + with: + name: changed_images + path: ${{ env.IMAGES_PATH }} + - name: Clear repository + run: | + sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" + - name: Check out repository code + uses: actions/checkout@v2 + - name: Build + run: | + git -C "$GITHUB_WORKSPACE" submodule sync --recursive + git -C "$GITHUB_WORKSPACE" submodule update --depth=1 --recursive --init --jobs=10 + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" && python3 build_check.py "$BUILD_NAME" + - name: Upload build URLs to artifacts + if: ${{ success() || failure() }} + uses: actions/upload-artifact@v2 + with: + name: ${{ env.BUILD_URLS }} + path: ${{ env.TEMP_PATH }}/${{ env.BUILD_URLS }}.json + - name: Cleanup + if: always() + run: | + # shellcheck disable=SC2046 + docker kill $(docker ps -q) ||: + # shellcheck disable=SC2046 + docker rm -f $(docker ps -a -q) ||: + sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" ############################################################################################ ##################################### Docker images ####################################### ############################################################################################ @@ -1068,8 +1068,9 @@ jobs: - BuilderBinFreeBSD # - BuilderBinGCC - BuilderBinPPC64 + - BuilderBinAmd64SSE2 - BuilderBinClangTidy - - BuilderDebSplitted + - BuilderDebShared runs-on: [self-hosted, style-checker] if: ${{ success() || failure() }} steps: @@ -1299,6 +1300,228 @@ jobs: # shellcheck disable=SC2046 docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" + FunctionalStatelessTestS3Debug0: + needs: [BuilderDebDebug] + runs-on: [self-hosted, func-tester] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/stateless_s3_storage_debug + REPORTS_PATH=${{runner.temp}}/reports_dir + CHECK_NAME=Stateless tests (debug, s3 storage) + REPO_COPY=${{runner.temp}}/stateless_s3_storage_debug/ClickHouse + KILL_TIMEOUT=10800 + RUN_BY_HASH_NUM=0 + RUN_BY_HASH_TOTAL=3 + EOF + - name: Download json reports + uses: actions/download-artifact@v2 + with: + path: ${{ env.REPORTS_PATH }} + - name: Clear repository + run: | + sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" + - name: Check out repository code + uses: actions/checkout@v2 + - name: Functional test + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" + python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT" + - name: Cleanup + if: always() + run: | + docker kill "$(docker ps -q)" ||: + docker rm -f "$(docker ps -a -q)" ||: + sudo rm -fr "$TEMP_PATH" + FunctionalStatelessTestS3Debug1: + needs: [BuilderDebDebug] + runs-on: [self-hosted, func-tester] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/stateless_s3_storage_debug + REPORTS_PATH=${{runner.temp}}/reports_dir + CHECK_NAME=Stateless tests (debug, s3 storage) + REPO_COPY=${{runner.temp}}/stateless_s3_storage_debug/ClickHouse + KILL_TIMEOUT=10800 + RUN_BY_HASH_NUM=1 + RUN_BY_HASH_TOTAL=3 + EOF + - name: Download json reports + uses: actions/download-artifact@v2 + with: + path: ${{ env.REPORTS_PATH }} + - name: Clear repository + run: | + sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" + - name: Check out repository code + uses: actions/checkout@v2 + - name: Functional test + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" + python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT" + - name: Cleanup + if: always() + run: | + docker kill "$(docker ps -q)" ||: + docker rm -f "$(docker ps -a -q)" ||: + sudo rm -fr "$TEMP_PATH" + FunctionalStatelessTestS3Debug2: + needs: [BuilderDebDebug] + runs-on: [self-hosted, func-tester] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/stateless_s3_storage_debug + REPORTS_PATH=${{runner.temp}}/reports_dir + CHECK_NAME=Stateless tests (debug, s3 storage) + REPO_COPY=${{runner.temp}}/stateless_s3_storage_debug/ClickHouse + KILL_TIMEOUT=10800 + RUN_BY_HASH_NUM=2 + RUN_BY_HASH_TOTAL=3 + EOF + - name: Download json reports + uses: actions/download-artifact@v2 + with: + path: ${{ env.REPORTS_PATH }} + - name: Clear repository + run: | + sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" + - name: Check out repository code + uses: actions/checkout@v2 + - name: Functional test + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" + python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT" + - name: Cleanup + if: always() + run: | + docker kill "$(docker ps -q)" ||: + docker rm -f "$(docker ps -a -q)" ||: + sudo rm -fr "$TEMP_PATH" + FunctionalStatelessTestS3Tsan0: + needs: [BuilderDebTsan] + runs-on: [self-hosted, func-tester] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/stateless_s3_storage_tsan + REPORTS_PATH=${{runner.temp}}/reports_dir + CHECK_NAME=Stateless tests (tsan, s3 storage) + REPO_COPY=${{runner.temp}}/stateless_s3_storage_tsan/ClickHouse + KILL_TIMEOUT=10800 + RUN_BY_HASH_NUM=0 + RUN_BY_HASH_TOTAL=3 + EOF + - name: Download json reports + uses: actions/download-artifact@v2 + with: + path: ${{ env.REPORTS_PATH }} + - name: Clear repository + run: | + sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" + - name: Check out repository code + uses: actions/checkout@v2 + - name: Functional test + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" + python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT" + - name: Cleanup + if: always() + run: | + docker kill "$(docker ps -q)" ||: + docker rm -f "$(docker ps -a -q)" ||: + sudo rm -fr "$TEMP_PATH" + FunctionalStatelessTestS3Tsan1: + needs: [BuilderDebTsan] + runs-on: [self-hosted, func-tester] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/stateless_s3_storage_tsan + REPORTS_PATH=${{runner.temp}}/reports_dir + CHECK_NAME=Stateless tests (tsan, s3 storage) + REPO_COPY=${{runner.temp}}/stateless_s3_storage_tsan/ClickHouse + KILL_TIMEOUT=10800 + RUN_BY_HASH_NUM=1 + RUN_BY_HASH_TOTAL=3 + EOF + - name: Download json reports + uses: actions/download-artifact@v2 + with: + path: ${{ env.REPORTS_PATH }} + - name: Clear repository + run: | + sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" + - name: Check out repository code + uses: actions/checkout@v2 + - name: Functional test + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" + python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT" + - name: Cleanup + if: always() + run: | + docker kill "$(docker ps -q)" ||: + docker rm -f "$(docker ps -a -q)" ||: + sudo rm -fr "$TEMP_PATH" + FunctionalStatelessTestS3Tsan2: + needs: [BuilderDebTsan] + runs-on: [self-hosted, func-tester] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/stateless_s3_storage_tsan + REPORTS_PATH=${{runner.temp}}/reports_dir + CHECK_NAME=Stateless tests (tsan, s3 storage) + REPO_COPY=${{runner.temp}}/stateless_s3_storage_tsan/ClickHouse + KILL_TIMEOUT=10800 + RUN_BY_HASH_NUM=2 + RUN_BY_HASH_TOTAL=3 + EOF + - name: Download json reports + uses: actions/download-artifact@v2 + with: + path: ${{ env.REPORTS_PATH }} + - name: Clear repository + run: | + sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" + - name: Check out repository code + uses: actions/checkout@v2 + - name: Functional test + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" + python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT" + - name: Cleanup + if: always() + run: | + docker kill "$(docker ps -q)" ||: + docker rm -f "$(docker ps -a -q)" ||: + sudo rm -fr "$TEMP_PATH" FunctionalStatelessTestAarch64: needs: [BuilderDebAarch64] runs-on: [self-hosted, func-tester-aarch64] @@ -1345,7 +1568,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_debug REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (address) + CHECK_NAME=Stateless tests (asan) REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=0 @@ -1384,7 +1607,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_debug REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (address) + CHECK_NAME=Stateless tests (asan) REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=1 @@ -1423,7 +1646,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (thread) + CHECK_NAME=Stateless tests (tsan) REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=0 @@ -1462,7 +1685,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (thread) + CHECK_NAME=Stateless tests (tsan) REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=1 @@ -1501,7 +1724,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (thread) + CHECK_NAME=Stateless tests (tsan) REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=2 @@ -1577,7 +1800,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_memory REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (memory) + CHECK_NAME=Stateless tests (msan) REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=0 @@ -1616,7 +1839,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_memory REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (memory) + CHECK_NAME=Stateless tests (msan) REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=1 @@ -1655,7 +1878,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_memory REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (memory) + CHECK_NAME=Stateless tests (msan) REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=2 @@ -1811,7 +2034,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_flaky_asan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests flaky check (address) + CHECK_NAME=Stateless tests flaky check (asan) REPO_COPY=${{runner.temp}}/stateless_flaky_asan/ClickHouse KILL_TIMEOUT=3600 EOF @@ -1972,7 +2195,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateful_debug REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateful tests (address) + CHECK_NAME=Stateful tests (asan) REPO_COPY=${{runner.temp}}/stateful_debug/ClickHouse KILL_TIMEOUT=3600 EOF @@ -2009,7 +2232,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateful_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateful tests (thread) + CHECK_NAME=Stateful tests (tsan) REPO_COPY=${{runner.temp}}/stateful_tsan/ClickHouse KILL_TIMEOUT=3600 EOF @@ -2046,7 +2269,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateful_msan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateful tests (memory) + CHECK_NAME=Stateful tests (msan) REPO_COPY=${{runner.temp}}/stateful_msan/ClickHouse KILL_TIMEOUT=3600 EOF @@ -2160,7 +2383,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stress_thread REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stress test (address) + CHECK_NAME=Stress test (asan) REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse EOF - name: Download json reports @@ -2200,7 +2423,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stress_thread REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stress test (thread) + CHECK_NAME=Stress test (tsan) REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse EOF - name: Download json reports @@ -2236,7 +2459,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stress_memory REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stress test (memory) + CHECK_NAME=Stress test (msan) REPO_COPY=${{runner.temp}}/stress_memory/ClickHouse EOF - name: Download json reports @@ -2272,7 +2495,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stress_undefined REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stress test (undefined) + CHECK_NAME=Stress test (ubsan) REPO_COPY=${{runner.temp}}/stress_undefined/ClickHouse EOF - name: Download json reports @@ -2347,7 +2570,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/ast_fuzzer_asan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=AST fuzzer (ASan) + CHECK_NAME=AST fuzzer (asan) REPO_COPY=${{runner.temp}}/ast_fuzzer_asan/ClickHouse EOF - name: Download json reports @@ -2383,7 +2606,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/ast_fuzzer_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=AST fuzzer (TSan) + CHECK_NAME=AST fuzzer (tsan) REPO_COPY=${{runner.temp}}/ast_fuzzer_tsan/ClickHouse EOF - name: Download json reports @@ -2419,7 +2642,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/ast_fuzzer_ubsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=AST fuzzer (UBSan) + CHECK_NAME=AST fuzzer (ubsan) REPO_COPY=${{runner.temp}}/ast_fuzzer_ubsan/ClickHouse EOF - name: Download json reports @@ -2455,7 +2678,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/ast_fuzzer_msan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=AST fuzzer (MSan) + CHECK_NAME=AST fuzzer (msan) REPO_COPY=${{runner.temp}}/ast_fuzzer_msan/ClickHouse EOF - name: Download json reports @@ -2644,7 +2867,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/integration_tests_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Integration tests (thread) + CHECK_NAME=Integration tests (tsan) REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse RUN_BY_HASH_NUM=0 RUN_BY_HASH_TOTAL=4 @@ -2682,7 +2905,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/integration_tests_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Integration tests (thread) + CHECK_NAME=Integration tests (tsan) REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse RUN_BY_HASH_NUM=1 RUN_BY_HASH_TOTAL=4 @@ -2720,7 +2943,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/integration_tests_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Integration tests (thread) + CHECK_NAME=Integration tests (tsan) REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse RUN_BY_HASH_NUM=2 RUN_BY_HASH_TOTAL=4 @@ -2758,7 +2981,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/integration_tests_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Integration tests (thread) + CHECK_NAME=Integration tests (tsan) REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse RUN_BY_HASH_NUM=3 RUN_BY_HASH_TOTAL=4 @@ -2974,42 +3197,6 @@ jobs: # shellcheck disable=SC2046 docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" - # UnitTestsReleaseGCC: - # needs: [BuilderBinGCC] - # runs-on: [self-hosted, fuzzer-unit-tester] - # steps: - # - name: Set envs - # run: | - # cat >> "$GITHUB_ENV" << 'EOF' - # TEMP_PATH=${{runner.temp}}/unit_tests_asan - # REPORTS_PATH=${{runner.temp}}/reports_dir - # CHECK_NAME=Unit tests (release-gcc) - # REPO_COPY=${{runner.temp}}/unit_tests_asan/ClickHouse - # EOF - # - name: Download json reports - # uses: actions/download-artifact@v2 - # with: - # path: ${{ env.REPORTS_PATH }} - # - name: Clear repository - # run: | - # sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" - # - name: Check out repository code - # uses: actions/checkout@v2 - # - name: Unit test - # run: | - # sudo rm -fr "$TEMP_PATH" - # mkdir -p "$TEMP_PATH" - # cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" - # cd "$REPO_COPY/tests/ci" - # python3 unit_tests_check.py "$CHECK_NAME" - # - name: Cleanup - # if: always() - # run: | - # # shellcheck disable=SC2046 - # docker kill $(docker ps -q) ||: - # # shellcheck disable=SC2046 - # docker rm -f $(docker ps -a -q) ||: - # sudo rm -fr "$TEMP_PATH" UnitTestsTsan: needs: [BuilderDebTsan] runs-on: [self-hosted, fuzzer-unit-tester] @@ -3429,6 +3616,10 @@ jobs: ###################################### JEPSEN TESTS ######################################### ############################################################################################# Jepsen: + # This is special test NOT INCLUDED in FinishCheck + # When it's skipped, all dependent tasks will be skipped too. + # DO NOT add it there + if: contains(github.event.pull_request.labels.*.name, 'jepsen-test') needs: [BuilderBinRelease] uses: ./.github/workflows/jepsen.yml @@ -3465,6 +3656,12 @@ jobs: - FunctionalStatefulTestMsan - FunctionalStatefulTestUBsan - FunctionalStatelessTestReleaseS3 + - FunctionalStatelessTestS3Debug0 + - FunctionalStatelessTestS3Debug1 + - FunctionalStatelessTestS3Debug2 + - FunctionalStatelessTestS3Tsan0 + - FunctionalStatelessTestS3Tsan1 + - FunctionalStatelessTestS3Tsan2 - StressTestDebug - StressTestAsan - StressTestTsan @@ -3497,10 +3694,9 @@ jobs: - UnitTestsMsan - UnitTestsUBsan - UnitTestsReleaseClang - - SplitBuildSmokeTest + - SharedBuildSmokeTest - CompatibilityCheck - IntegrationTestsFlakyCheck - - Jepsen runs-on: [self-hosted, style-checker] steps: - name: Clear repository diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d57ae450c4..001f6d9e669 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: ReleaseWorkflow +name: PublishedReleaseCI # - Gets artifacts from S3 # - Sends it to JFROG Artifactory # - Adds them to the release assets @@ -15,7 +15,7 @@ jobs: - name: Set envs run: | cat >> "$GITHUB_ENV" << 'EOF' - JFROG_API_KEY=${{ secrets.JFROG_KEY_API_PACKAGES }} + JFROG_API_KEY=${{ secrets.JFROG_ARTIFACTORY_API_KEY }} TEMP_PATH=${{runner.temp}}/release_packages REPO_COPY=${{runner.temp}}/release_packages/ClickHouse EOF @@ -29,8 +29,13 @@ jobs: rm -rf "$TEMP_PATH" && mkdir -p "$TEMP_PATH" cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" cd "$REPO_COPY" - python3 ./tests/ci/push_to_artifactory.py --release "${{ github.ref }}" \ - --commit '${{ github.sha }}' --all + # Download and push packages to artifactory + python3 ./tests/ci/push_to_artifactory.py --release '${{ github.ref }}' \ + --commit '${{ github.sha }}' --artifactory-url '${{ secrets.JFROG_ARTIFACTORY_URL }}' --all + # Download macos binaries to ${{runner.temp}}/download_binary + python3 ./tests/ci/download_binary.py --version '${{ github.ref }}' \ + --commit '${{ github.sha }}' binary_darwin binary_darwin_aarch64 + mv '${{runner.temp}}/download_binary/'clickhouse-* '${{runner.temp}}/push_to_artifactory' - name: Upload packages to release assets uses: svenstaro/upload-release-action@v2 with: diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index fdfedc56f5d..f579d1fee63 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -1,4 +1,4 @@ -name: ReleaseCI +name: ReleaseBranchCI env: # Force the stdout and stderr streams to be unbuffered @@ -426,6 +426,100 @@ jobs: # shellcheck disable=SC2046 docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" + BuilderBinDarwin: + needs: [DockerHubPush] + runs-on: [self-hosted, builder] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/build_check + IMAGES_PATH=${{runner.temp}}/images_path + REPO_COPY=${{runner.temp}}/build_check/ClickHouse + CACHES_PATH=${{runner.temp}}/../ccaches + BUILD_NAME=binary_darwin + EOF + - name: Download changed images + uses: actions/download-artifact@v2 + with: + name: changed_images + path: ${{ env.IMAGES_PATH }} + - name: Clear repository + run: | + sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" + - name: Check out repository code + uses: actions/checkout@v2 + with: + fetch-depth: 0 # otherwise we will have no info about contributors + - name: Build + run: | + git -C "$GITHUB_WORKSPACE" submodule sync --recursive + git -C "$GITHUB_WORKSPACE" submodule update --depth=1 --recursive --init --jobs=10 + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" && python3 build_check.py "$BUILD_NAME" + - name: Upload build URLs to artifacts + if: ${{ success() || failure() }} + uses: actions/upload-artifact@v2 + with: + name: ${{ env.BUILD_URLS }} + path: ${{ env.TEMP_PATH }}/${{ env.BUILD_URLS }}.json + - name: Cleanup + if: always() + run: | + # shellcheck disable=SC2046 + docker kill $(docker ps -q) ||: + # shellcheck disable=SC2046 + docker rm -f $(docker ps -a -q) ||: + sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" + BuilderBinDarwinAarch64: + needs: [DockerHubPush] + runs-on: [self-hosted, builder] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/build_check + IMAGES_PATH=${{runner.temp}}/images_path + REPO_COPY=${{runner.temp}}/build_check/ClickHouse + CACHES_PATH=${{runner.temp}}/../ccaches + BUILD_NAME=binary_darwin_aarch64 + EOF + - name: Download changed images + uses: actions/download-artifact@v2 + with: + name: changed_images + path: ${{ env.IMAGES_PATH }} + - name: Clear repository + run: | + sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" + - name: Check out repository code + uses: actions/checkout@v2 + with: + fetch-depth: 0 # otherwise we will have no info about contributors + - name: Build + run: | + git -C "$GITHUB_WORKSPACE" submodule sync --recursive + git -C "$GITHUB_WORKSPACE" submodule update --depth=1 --recursive --init --jobs=10 + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" && python3 build_check.py "$BUILD_NAME" + - name: Upload build URLs to artifacts + if: ${{ success() || failure() }} + uses: actions/upload-artifact@v2 + with: + name: ${{ env.BUILD_URLS }} + path: ${{ env.TEMP_PATH }}/${{ env.BUILD_URLS }}.json + - name: Cleanup + if: always() + run: | + # shellcheck disable=SC2046 + docker kill $(docker ps -q) ||: + # shellcheck disable=SC2046 + docker rm -f $(docker ps -a -q) ||: + sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" ############################################################################################ ##################################### Docker images ####################################### ############################################################################################ @@ -505,6 +599,46 @@ jobs: # shellcheck disable=SC2046 docker rm -f $(docker ps -a -q) ||: sudo rm -fr "$TEMP_PATH" + BuilderSpecialReport: + needs: + - BuilderBinDarwin + - BuilderBinDarwinAarch64 + runs-on: [self-hosted, style-checker] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/report_check + REPORTS_PATH=${{runner.temp}}/reports_dir + CHECK_NAME=ClickHouse special build check + NEEDS_DATA_PATH=${{runner.temp}}/needs.json + EOF + - name: Download json reports + uses: actions/download-artifact@v2 + with: + path: ${{ env.REPORTS_PATH }} + - name: Clear repository + run: | + sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE" + - name: Check out repository code + uses: actions/checkout@v2 + - name: Report Builder + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cat > "$NEEDS_DATA_PATH" << 'EOF' + ${{ toJSON(needs) }} + EOF + cd "$GITHUB_WORKSPACE/tests/ci" + python3 build_report_check.py "$CHECK_NAME" + - name: Cleanup + if: always() + run: | + # shellcheck disable=SC2046 + docker kill $(docker ps -q) ||: + # shellcheck disable=SC2046 + docker rm -f $(docker ps -a -q) ||: + sudo rm -fr "$TEMP_PATH" ############################################################################################## ########################### FUNCTIONAl STATELESS TESTS ####################################### ############################################################################################## @@ -591,7 +725,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_debug REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (address) + CHECK_NAME=Stateless tests (asan) REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=0 @@ -630,7 +764,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_debug REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (address) + CHECK_NAME=Stateless tests (asan) REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=1 @@ -669,7 +803,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (thread) + CHECK_NAME=Stateless tests (tsan) REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=0 @@ -708,7 +842,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (thread) + CHECK_NAME=Stateless tests (tsan) REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=1 @@ -747,7 +881,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (thread) + CHECK_NAME=Stateless tests (tsan) REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=2 @@ -823,7 +957,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_memory REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (memory) + CHECK_NAME=Stateless tests (msan) REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=0 @@ -862,7 +996,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_memory REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (memory) + CHECK_NAME=Stateless tests (msan) REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=1 @@ -901,7 +1035,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateless_memory REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateless tests (memory) + CHECK_NAME=Stateless tests (msan) REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse KILL_TIMEOUT=10800 RUN_BY_HASH_NUM=2 @@ -1134,7 +1268,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateful_debug REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateful tests (address) + CHECK_NAME=Stateful tests (asan) REPO_COPY=${{runner.temp}}/stateful_debug/ClickHouse KILL_TIMEOUT=3600 EOF @@ -1171,7 +1305,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateful_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateful tests (thread) + CHECK_NAME=Stateful tests (tsan) REPO_COPY=${{runner.temp}}/stateful_tsan/ClickHouse KILL_TIMEOUT=3600 EOF @@ -1208,7 +1342,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stateful_msan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stateful tests (memory) + CHECK_NAME=Stateful tests (msan) REPO_COPY=${{runner.temp}}/stateful_msan/ClickHouse KILL_TIMEOUT=3600 EOF @@ -1322,7 +1456,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stress_thread REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stress test (address) + CHECK_NAME=Stress test (asan) REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse EOF - name: Download json reports @@ -1362,7 +1496,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stress_thread REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stress test (thread) + CHECK_NAME=Stress test (tsan) REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse EOF - name: Download json reports @@ -1398,7 +1532,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stress_memory REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stress test (memory) + CHECK_NAME=Stress test (msan) REPO_COPY=${{runner.temp}}/stress_memory/ClickHouse EOF - name: Download json reports @@ -1434,7 +1568,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/stress_undefined REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Stress test (undefined) + CHECK_NAME=Stress test (ubsan) REPO_COPY=${{runner.temp}}/stress_undefined/ClickHouse EOF - name: Download json reports @@ -1623,7 +1757,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/integration_tests_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Integration tests (thread) + CHECK_NAME=Integration tests (tsan) REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse RUN_BY_HASH_NUM=0 RUN_BY_HASH_TOTAL=4 @@ -1661,7 +1795,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/integration_tests_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Integration tests (thread) + CHECK_NAME=Integration tests (tsan) REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse RUN_BY_HASH_NUM=1 RUN_BY_HASH_TOTAL=4 @@ -1699,7 +1833,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/integration_tests_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Integration tests (thread) + CHECK_NAME=Integration tests (tsan) REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse RUN_BY_HASH_NUM=2 RUN_BY_HASH_TOTAL=4 @@ -1737,7 +1871,7 @@ jobs: cat >> "$GITHUB_ENV" << 'EOF' TEMP_PATH=${{runner.temp}}/integration_tests_tsan REPORTS_PATH=${{runner.temp}}/reports_dir - CHECK_NAME=Integration tests (thread) + CHECK_NAME=Integration tests (tsan) REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse RUN_BY_HASH_NUM=3 RUN_BY_HASH_TOTAL=4 @@ -1847,6 +1981,7 @@ jobs: - DockerHubPush - DockerServerImages - BuilderReport + - BuilderSpecialReport - FunctionalStatelessTestDebug0 - FunctionalStatelessTestDebug1 - FunctionalStatelessTestDebug2 diff --git a/.github/workflows/tags_stable.yml b/.github/workflows/tags_stable.yml index 0e0eefb4a35..a9172a8a2e2 100644 --- a/.github/workflows/tags_stable.yml +++ b/.github/workflows/tags_stable.yml @@ -13,13 +13,24 @@ on: # yamllint disable-line rule:truthy - 'v*-prestable' - 'v*-stable' - 'v*-lts' + workflow_dispatch: + inputs: + tag: + description: 'Test tag' + required: true + type: string jobs: UpdateVersions: runs-on: [self-hosted, style-checker] steps: + - name: Set test tag + if: github.event_name == 'workflow_dispatch' + run: | + echo "GITHUB_TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV" - name: Get tag name + if: github.event_name != 'workflow_dispatch' run: | echo "GITHUB_TAG=${GITHUB_REF#refs/tags/}" >> "$GITHUB_ENV" - name: Check out repository code @@ -29,25 +40,29 @@ jobs: fetch-depth: 0 - name: Generate versions env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN }} run: | ./utils/list-versions/list-versions.sh > ./utils/list-versions/version_date.tsv + ./utils/list-versions/update-docker-version.sh GID=$(id -g "${UID}") docker run -u "${UID}:${GID}" -e PYTHONUNBUFFERED=1 \ --volume="${GITHUB_WORKSPACE}:/ClickHouse" clickhouse/style-test \ - /ClickHouse/utils/changelog/changelog.py -vv --gh-user-or-token="$GITHUB_TOKEN" \ - --output="/ClickHouse/docs/changelogs/${GITHUB_TAG}.md" --jobs=5 "${GITHUB_TAG}" + /ClickHouse/utils/changelog/changelog.py -v --debug-helpers \ + --gh-user-or-token="$GITHUB_TOKEN" --jobs=5 \ + --output="/ClickHouse/docs/changelogs/${GITHUB_TAG}.md" "${GITHUB_TAG}" git add "./docs/changelogs/${GITHUB_TAG}.md" git diff HEAD - name: Create Pull Request uses: peter-evans/create-pull-request@v3 with: author: "robot-clickhouse " + token: ${{ secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN }} committer: "robot-clickhouse " commit-message: Update version_date.tsv and changelogs after ${{ env.GITHUB_TAG }} branch: auto/${{ env.GITHUB_TAG }} delete-branch: true title: Update version_date.tsv and changelogs after ${{ env.GITHUB_TAG }} + labels: do not test body: | Update version_date.tsv and changelogs after ${{ env.GITHUB_TAG }} diff --git a/.gitignore b/.gitignore index e517dfd63c2..dd632eba85d 100644 --- a/.gitignore +++ b/.gitignore @@ -58,6 +58,10 @@ cmake_install.cmake CTestTestfile.cmake *.a *.o +*.so +*.dll +*.lib +*.dylib cmake-build-* # Python cache diff --git a/.gitmodules b/.gitmodules index b4e21f4a4a8..62b2f9d7766 100644 --- a/.gitmodules +++ b/.gitmodules @@ -201,7 +201,7 @@ [submodule "contrib/boringssl"] path = contrib/boringssl url = https://github.com/ClickHouse/boringssl.git - branch = MergeWithUpstream + branch = unknown_branch_from_artur [submodule "contrib/NuRaft"] path = contrib/NuRaft url = https://github.com/ClickHouse/NuRaft.git diff --git a/CHANGELOG.md b/CHANGELOG.md index d7e2684380c..3198c15b15c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ### Table of Contents +**[ClickHouse release v22.8, 2022-08-18](#228)**
**[ClickHouse release v22.7, 2022-07-21](#227)**
**[ClickHouse release v22.6, 2022-06-16](#226)**
**[ClickHouse release v22.5, 2022-05-19](#225)**
@@ -8,6 +9,148 @@ **[ClickHouse release v22.1, 2022-01-18](#221)**
**[Changelog for 2021](https://clickhouse.com/docs/en/whats-new/changelog/2021/)**
+ +### ClickHouse release 22.8, 2022-08-18 + +#### Backward Incompatible Change +* Extended range of `Date32` and `DateTime64` to support dates from the year 1900 to 2299. In previous versions, the supported interval was only from the year 1925 to 2283. The implementation is using the proleptic Gregorian calendar (which is conformant with [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601):2004 (clause 3.2.1 The Gregorian calendar)) instead of accounting for historical transitions from the Julian to the Gregorian calendar. This change affects implementation-specific behavior for out-of-range arguments. E.g. if in previous versions the value of `1899-01-01` was clamped to `1925-01-01`, in the new version it will be clamped to `1900-01-01`. It changes the behavior of rounding with `toStartOfInterval` if you pass `INTERVAL 3 QUARTER` up to one quarter because the intervals are counted from an implementation-specific point of time. Closes [#28216](https://github.com/ClickHouse/ClickHouse/issues/28216), improves [#38393](https://github.com/ClickHouse/ClickHouse/issues/38393). [#39425](https://github.com/ClickHouse/ClickHouse/pull/39425) ([Roman Vasin](https://github.com/rvasin)). +* Now, all relevant dictionary sources respect `remote_url_allow_hosts` setting. It was already done for HTTP, Cassandra, Redis. Added ClickHouse, MongoDB, MySQL, PostgreSQL. Host is checked only for dictionaries created from DDL. [#39184](https://github.com/ClickHouse/ClickHouse/pull/39184) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Make the remote filesystem cache composable, allow not to evict certain files (regarding idx, mrk, ..), delete old cache version. Now it is possible to configure cache over Azure blob storage disk, over Local disk, over StaticWeb disk, etc. This PR is marked backward incompatible because cache configuration changes and in order for cache to work need to update the config file. Old cache will still be used with new configuration. The server will startup fine with the old cache configuration. Closes https://github.com/ClickHouse/ClickHouse/issues/36140. Closes https://github.com/ClickHouse/ClickHouse/issues/37889. ([Kseniia Sumarokova](https://github.com/kssenii)). [#36171](https://github.com/ClickHouse/ClickHouse/pull/36171)) + +#### New Feature +* Query parameters can be set in interactive mode as `SET param_abc = 'def'` and transferred via the native protocol as settings. [#39906](https://github.com/ClickHouse/ClickHouse/pull/39906) ([Nikita Taranov](https://github.com/nickitat)). +* Quota key can be set in the native protocol ([Yakov Olkhovsky](https://github.com/ClickHouse/ClickHouse/pull/39874)). +* Added a setting `exact_rows_before_limit` (0/1). When enabled, ClickHouse will provide exact value for `rows_before_limit_at_least` statistic, but with the cost that the data before limit will have to be read completely. This closes [#6613](https://github.com/ClickHouse/ClickHouse/issues/6613). [#25333](https://github.com/ClickHouse/ClickHouse/pull/25333) ([kevin wan](https://github.com/MaxWk)). +* Added support for parallel distributed insert select with `s3Cluster` table function into tables with `Distributed` and `Replicated` engine [#34670](https://github.com/ClickHouse/ClickHouse/issues/34670). [#39107](https://github.com/ClickHouse/ClickHouse/pull/39107) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Add new settings to control schema inference from text formats: - `input_format_try_infer_dates` - try infer dates from strings. - `input_format_try_infer_datetimes` - try infer datetimes from strings. - `input_format_try_infer_integers` - try infer `Int64` instead of `Float64`. - `input_format_json_try_infer_numbers_from_strings` - try infer numbers from json strings in JSON formats. [#39186](https://github.com/ClickHouse/ClickHouse/pull/39186) ([Kruglov Pavel](https://github.com/Avogar)). +* An option to provide JSON formatted log output. The purpose is to allow easier ingestion and query in log analysis tools. [#39277](https://github.com/ClickHouse/ClickHouse/pull/39277) ([Mallik Hassan](https://github.com/SadiHassan)). +* Add function `nowInBlock` which allows getting the current time during long-running and continuous queries. Closes [#39522](https://github.com/ClickHouse/ClickHouse/issues/39522). Notes: there are no functions `now64InBlock` neither `todayInBlock`. [#39533](https://github.com/ClickHouse/ClickHouse/pull/39533) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add ability to specify settings for an `executable()` table function. [#39681](https://github.com/ClickHouse/ClickHouse/pull/39681) ([Constantine Peresypkin](https://github.com/pkit)). +* Implemented automatic conversion of database engine from `Ordinary` to `Atomic`. Create empty `convert_ordinary_to_atomic` file in `flags` directory and all `Ordinary` databases will be converted automatically on next server start. Resolves [#39546](https://github.com/ClickHouse/ClickHouse/issues/39546). [#39933](https://github.com/ClickHouse/ClickHouse/pull/39933) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Support `SELECT ... INTO OUTFILE '...' AND STDOUT`. [#37490](https://github.com/ClickHouse/ClickHouse/issues/37490). [#39054](https://github.com/ClickHouse/ClickHouse/pull/39054) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)). +* Add formats `PrettyMonoBlock`, `PrettyNoEscapesMonoBlock`, `PrettyCompactNoEscapes`, `PrettyCompactNoEscapesMonoBlock`, `PrettySpaceNoEscapes`, `PrettySpaceMonoBlock`, `PrettySpaceNoEscapesMonoBlock`. [#39646](https://github.com/ClickHouse/ClickHouse/pull/39646) ([Kruglov Pavel](https://github.com/Avogar)). +* Add new setting schema_inference_hints that allows to specify structure hints in schema inference for specific columns. Closes [#39569](https://github.com/ClickHouse/ClickHouse/issues/39569). [#40068](https://github.com/ClickHouse/ClickHouse/pull/40068) ([Kruglov Pavel](https://github.com/Avogar)). + +#### Experimental Feature +* Support SQL standard DELETE FROM syntax on merge tree tables and lightweight delete implementation for merge tree families. [#37893](https://github.com/ClickHouse/ClickHouse/pull/37893) ([Jianmei Zhang](https://github.com/zhangjmruc)) ([Alexander Gololobov](https://github.com/davenger)). Note: this new feature does not make ClickHouse an HTAP DBMS. + +#### Performance Improvement +* Improved memory usage during memory efficient merging of aggregation results. [#39429](https://github.com/ClickHouse/ClickHouse/pull/39429) ([Nikita Taranov](https://github.com/nickitat)). +* Added concurrency control logic to limit total number of concurrent threads created by queries. [#37558](https://github.com/ClickHouse/ClickHouse/pull/37558) ([Sergei Trifonov](https://github.com/serxa)). Add `concurrent_threads_soft_limit parameter` to increase performance in case of high QPS by means of limiting total number of threads for all queries. [#37285](https://github.com/ClickHouse/ClickHouse/pull/37285) ([Roman Vasin](https://github.com/rvasin)). +* Add `SLRU` cache policy for uncompressed cache and marks cache. ([Kseniia Sumarokova](https://github.com/kssenii)). [#34651](https://github.com/ClickHouse/ClickHouse/pull/34651) ([alexX512](https://github.com/alexX512)). Decoupling local cache function and cache algorithm [#38048](https://github.com/ClickHouse/ClickHouse/pull/38048) ([Han Shukai](https://github.com/KinderRiven)). +* Intel® In-Memory Analytics Accelerator (Intel® IAA) is a hardware accelerator available in the upcoming generation of Intel® Xeon® Scalable processors ("Sapphire Rapids"). Its goal is to speed up common operations in analytics like data (de)compression and filtering. ClickHouse gained the new "DeflateQpl" compression codec which utilizes the Intel® IAA offloading technology to provide a high-performance DEFLATE implementation. The codec uses the [Intel® Query Processing Library (QPL)](https://github.com/intel/qpl) which abstracts access to the hardware accelerator, respectively to a software fallback in case the hardware accelerator is not available. DEFLATE provides in general higher compression rates than ClickHouse's LZ4 default codec, and as a result, offers less disk I/O and lower main memory consumption. [#36654](https://github.com/ClickHouse/ClickHouse/pull/36654) ([jasperzhu](https://github.com/jinjunzh)). [#39494](https://github.com/ClickHouse/ClickHouse/pull/39494) ([Robert Schulze](https://github.com/rschu1ze)). +* `DISTINCT` in order with `ORDER BY`: Deduce way to sort based on input stream sort description. Skip sorting if input stream is already sorted. [#38719](https://github.com/ClickHouse/ClickHouse/pull/38719) ([Igor Nikonov](https://github.com/devcrafter)). Improve memory usage (significantly) and query execution time + use `DistinctSortedChunkTransform` for final distinct when `DISTINCT` columns match `ORDER BY` columns, but rename to `DistinctSortedStreamTransform` in `EXPLAIN PIPELINE` → this improves memory usage significantly + remove unnecessary allocations in hot loop in `DistinctSortedChunkTransform`. [#39432](https://github.com/ClickHouse/ClickHouse/pull/39432) ([Igor Nikonov](https://github.com/devcrafter)). Use `DistinctSortedTransform` only when sort description is applicable to DISTINCT columns, otherwise fall back to ordinary DISTINCT implementation + it allows making less checks during `DistinctSortedTransform` execution. [#39528](https://github.com/ClickHouse/ClickHouse/pull/39528) ([Igor Nikonov](https://github.com/devcrafter)). Fix: `DistinctSortedTransform` didn't take advantage of sorting. It never cleared HashSet since clearing_columns were detected incorrectly (always empty). So, it basically worked as ordinary `DISTINCT` (`DistinctTransform`). The fix reduces memory usage significantly. [#39538](https://github.com/ClickHouse/ClickHouse/pull/39538) ([Igor Nikonov](https://github.com/devcrafter)). +* Use local node as first priority to get structure of remote table when executing `cluster` and similar table functions. [#39440](https://github.com/ClickHouse/ClickHouse/pull/39440) ([Mingliang Pan](https://github.com/liangliangpan)). +* Optimize filtering by numeric columns with AVX512VBMI2 compress store. [#39633](https://github.com/ClickHouse/ClickHouse/pull/39633) ([Guo Wangyang](https://github.com/guowangy)). For systems with AVX512 VBMI2, this PR improves performance by ca. 6% for SSB benchmark queries queries 3.1, 3.2 and 3.3 (SF=100). Tested on Intel Icelake Xeon 8380 * 2 socket. [#40033](https://github.com/ClickHouse/ClickHouse/pull/40033) ([Robert Schulze](https://github.com/rschu1ze)). +* Optimize index analysis with functional expressions in multi-thread scenario. [#39812](https://github.com/ClickHouse/ClickHouse/pull/39812) ([Guo Wangyang](https://github.com/guowangy)). +* Optimizations for complex queries: Don't visit the AST for UDFs if none are registered. [#40069](https://github.com/ClickHouse/ClickHouse/pull/40069) ([Raúl Marín](https://github.com/Algunenano)). Optimize CurrentMemoryTracker alloc and free. [#40078](https://github.com/ClickHouse/ClickHouse/pull/40078) ([Raúl Marín](https://github.com/Algunenano)). +* Improved Base58 encoding/decoding. [#39292](https://github.com/ClickHouse/ClickHouse/pull/39292) ([Andrey Zvonov](https://github.com/zvonand)). +* Improve bytes to bits mask transform for SSE/AVX/AVX512. [#39586](https://github.com/ClickHouse/ClickHouse/pull/39586) ([Guo Wangyang](https://github.com/guowangy)). + +#### Improvement +* Normalize `AggregateFunction` types and state representations because optimizations like [#35788](https://github.com/ClickHouse/ClickHouse/pull/35788) will treat `count(not null columns)` as `count()`, which might confuses distributed interpreters with the following error : `Conversion from AggregateFunction(count) to AggregateFunction(count, Int64) is not supported`. [#39420](https://github.com/ClickHouse/ClickHouse/pull/39420) ([Amos Bird](https://github.com/amosbird)). The functions with identical states can be used in materialized views interchangeably. +* Rework and simplify the `system.backups` table, remove the `internal` column, allow user to set the ID of operation, add columns `num_files`, `uncompressed_size`, `compressed_size`, `start_time`, `end_time`. [#39503](https://github.com/ClickHouse/ClickHouse/pull/39503) ([Vitaly Baranov](https://github.com/vitlibar)). +* Improved structure of DDL query result table for `Replicated` database (separate columns with shard and replica name, more clear status) - `CREATE TABLE ... ON CLUSTER` queries can be normalized on initiator first if `distributed_ddl_entry_format_version` is set to 3 (default value). It means that `ON CLUSTER` queries may not work if initiator does not belong to the cluster that specified in query. Fixes [#37318](https://github.com/ClickHouse/ClickHouse/issues/37318), [#39500](https://github.com/ClickHouse/ClickHouse/issues/39500) - Ignore `ON CLUSTER` clause if database is `Replicated` and cluster name equals to database name. Related to [#35570](https://github.com/ClickHouse/ClickHouse/issues/35570) - Miscellaneous minor fixes for `Replicated` database engine - Check metadata consistency when starting up `Replicated` database, start replica recovery in case of mismatch of local metadata and metadata in Keeper. Resolves [#24880](https://github.com/ClickHouse/ClickHouse/issues/24880). [#37198](https://github.com/ClickHouse/ClickHouse/pull/37198) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Add result_rows and result_bytes to progress reports (`X-ClickHouse-Summary`). [#39567](https://github.com/ClickHouse/ClickHouse/pull/39567) ([Raúl Marín](https://github.com/Algunenano)). +* Improve primary key analysis for MergeTree. [#25563](https://github.com/ClickHouse/ClickHouse/pull/25563) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* `timeSlots` now works with DateTime64; subsecond duration and slot size available when working with DateTime64. [#37951](https://github.com/ClickHouse/ClickHouse/pull/37951) ([Andrey Zvonov](https://github.com/zvonand)). +* Added support of `LEFT SEMI` and `LEFT ANTI` direct join with `EmbeddedRocksDB` tables. [#38956](https://github.com/ClickHouse/ClickHouse/pull/38956) ([Vladimir C](https://github.com/vdimir)). +* Add profile events for fsync operations. [#39179](https://github.com/ClickHouse/ClickHouse/pull/39179) ([Azat Khuzhin](https://github.com/azat)). +* Add the second argument to the ordinary function `file(path[, default])`, which function returns in the case when a file does not exists. [#39218](https://github.com/ClickHouse/ClickHouse/pull/39218) ([Nikolay Degterinsky](https://github.com/evillique)). +* Some small fixes for reading via http, allow to retry partial content in case if 200 OK. [#39244](https://github.com/ClickHouse/ClickHouse/pull/39244) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Support queries `CREATE TEMPORARY TABLE ... () AS ...`. [#39462](https://github.com/ClickHouse/ClickHouse/pull/39462) ([Kruglov Pavel](https://github.com/Avogar)). +* Add support of `!`/`*` (exclamation/asterisk) in custom TLDs (`cutToFirstSignificantSubdomainCustom()`/`cutToFirstSignificantSubdomainCustomWithWWW()`/`firstSignificantSubdomainCustom()`). [#39496](https://github.com/ClickHouse/ClickHouse/pull/39496) ([Azat Khuzhin](https://github.com/azat)). +* Add support for TLS connections to NATS. Implements [#39525](https://github.com/ClickHouse/ClickHouse/issues/39525). [#39527](https://github.com/ClickHouse/ClickHouse/pull/39527) ([Constantine Peresypkin](https://github.com/pkit)). +* `clickhouse-obfuscator` (a tool for database obfuscation for testing and load generation) now has the new `--save` and `--load` parameters to work with pre-trained models. This closes [#39534](https://github.com/ClickHouse/ClickHouse/issues/39534). [#39541](https://github.com/ClickHouse/ClickHouse/pull/39541) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix incorrect behavior of log rotation during restart. [#39558](https://github.com/ClickHouse/ClickHouse/pull/39558) ([Nikolay Degterinsky](https://github.com/evillique)). +* Fix building aggregate projections when external aggregation is on. Mark as improvement because the case is rare and there exists easy workaround to fix it via changing settings. This fixes [#39667](https://github.com/ClickHouse/ClickHouse/issues/39667) . [#39671](https://github.com/ClickHouse/ClickHouse/pull/39671) ([Amos Bird](https://github.com/amosbird)). +* Allow to execute hash functions with arguments of type `Map`. [#39685](https://github.com/ClickHouse/ClickHouse/pull/39685) ([Anton Popov](https://github.com/CurtizJ)). +* Add a configuration parameter to hide addresses in stack traces. It may improve security a little but generally, it is harmful and should not be used. [#39690](https://github.com/ClickHouse/ClickHouse/pull/39690) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Change the prefix size of AggregateFunctionDistinct to make sure nested function data memory segment is aligned. [#39696](https://github.com/ClickHouse/ClickHouse/pull/39696) ([Pxl](https://github.com/BiteTheDDDDt)). +* Properly escape credentials passed to the `clickhouse-diagnostic` tool. [#39707](https://github.com/ClickHouse/ClickHouse/pull/39707) ([Dale McDiarmid](https://github.com/gingerwizard)). +* ClickHouse Keeper improvement: create a snapshot on exit. It can be controlled with the config `keeper_server.create_snapshot_on_exit`, `true` by default. [#39755](https://github.com/ClickHouse/ClickHouse/pull/39755) ([Antonio Andelic](https://github.com/antonio2368)). +* Support primary key analysis for `row_policy_filter` and `additional_filter`. It also helps fix issues like [#37454](https://github.com/ClickHouse/ClickHouse/issues/37454) . [#39826](https://github.com/ClickHouse/ClickHouse/pull/39826) ([Amos Bird](https://github.com/amosbird)). +* Fix two usability issues in Play UI: - it was non-pixel-perfect on iPad due to parasitic border radius and margins; - the progress indication did not display after the first query. This closes [#39957](https://github.com/ClickHouse/ClickHouse/issues/39957). This closes [#39960](https://github.com/ClickHouse/ClickHouse/issues/39960). [#39961](https://github.com/ClickHouse/ClickHouse/pull/39961) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Play UI: add row numbers; add cell selection on click; add hysteresis for table cells. [#39962](https://github.com/ClickHouse/ClickHouse/pull/39962) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Play UI: recognize tab key in textarea, but at the same time don't mess up with tab navigation. [#40053](https://github.com/ClickHouse/ClickHouse/pull/40053) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* The client will show server-side elapsed time. This is important for the performance comparison of ClickHouse services in remote datacenters. This closes [#38070](https://github.com/ClickHouse/ClickHouse/issues/38070). See also [this](https://github.com/ClickHouse/ClickBench/blob/main/hardware/benchmark-cloud.sh#L37) for motivation. [#39968](https://github.com/ClickHouse/ClickHouse/pull/39968) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Adds `parseDateTime64BestEffortUS`, `parseDateTime64BestEffortUSOrNull`, `parseDateTime64BestEffortUSOrZero` functions, closing [#37492](https://github.com/ClickHouse/ClickHouse/issues/37492). [#40015](https://github.com/ClickHouse/ClickHouse/pull/40015) ([Tanya Bragin](https://github.com/tbragin)). +* Extend the `system.processors_profile_log` with more information such as input rows. [#40121](https://github.com/ClickHouse/ClickHouse/pull/40121) ([Amos Bird](https://github.com/amosbird)). +* Display server-side time in `clickhouse-benchmark` by default if it is available (since ClickHouse version 22.8). This is needed to correctly compare the performance of clouds. This behavior can be changed with the new `--client-side-time` command line option. Change the `--randomize` command line option from `--randomize 1` to the form without argument. [#40193](https://github.com/ClickHouse/ClickHouse/pull/40193) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Add counters (ProfileEvents) for cases when query complexity limitation has been set and has reached (a separate counter for `overflow_mode` = `break` and `throw`). For example, if you have set up `max_rows_to_read` with `read_overflow_mode = 'break'`, looking at the value of `OverflowBreak` counter will allow distinguishing incomplete results. [#40205](https://github.com/ClickHouse/ClickHouse/pull/40205) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix memory accounting in case of "Memory limit exceeded" errors (previously [peak] memory usage was takes failed allocations into account). [#40249](https://github.com/ClickHouse/ClickHouse/pull/40249) ([Azat Khuzhin](https://github.com/azat)). +* Add metrics for filesystem cache: `FilesystemCacheSize` and `FilesystemCacheElements`. [#40260](https://github.com/ClickHouse/ClickHouse/pull/40260) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Support hadoop secure RPC transfer (hadoop.rpc.protection=privacy and hadoop.rpc.protection=integrity). [#39411](https://github.com/ClickHouse/ClickHouse/pull/39411) ([michael1589](https://github.com/michael1589)). +* Avoid continuously growing memory consumption of pattern cache when using functions multi(Fuzzy)Match(Any|AllIndices|AnyIndex)(). [#40264](https://github.com/ClickHouse/ClickHouse/pull/40264) ([Robert Schulze](https://github.com/rschu1ze)). +* Add cache for schema inference for file/s3/hdfs/url table functions. Now, schema inference will be performed only on the first query to the file, all subsequent queries to the same file will use the schema from cache if data wasn't changed. Add system table system.schema_inference_cache with all current schemas in cache and system queries SYSTEM DROP SCHEMA CACHE [FOR FILE/S3/HDFS/URL] to drop schemas from cache. [#38286](https://github.com/ClickHouse/ClickHouse/pull/38286) ([Kruglov Pavel](https://github.com/Avogar)). +* Add support for LARGE_BINARY/LARGE_STRING with Arrow (Closes [#32401](https://github.com/ClickHouse/ClickHouse/issues/32401)). [#40293](https://github.com/ClickHouse/ClickHouse/pull/40293) ([Josh Taylor](https://github.com/joshuataylor)). + +#### Build/Testing/Packaging Improvement +* [ClickFiddle](https://fiddle.clickhouse.com/): A new tool for testing ClickHouse versions in read/write mode (**Igor Baliuk**). +* ClickHouse binary is made self-extracting [#35775](https://github.com/ClickHouse/ClickHouse/pull/35775) ([Yakov Olkhovskiy, Arthur Filatenkov](https://github.com/yakov-olkhovskiy)). +* Update tzdata to 2022b to support the new timezone changes. See https://github.com/google/cctz/pull/226. Chile's 2022 DST start is delayed from September 4 to September 11. Iran plans to stop observing DST permanently, after it falls back on 2022-09-21. There are corrections of the historical time zone of Asia/Tehran in the year 1977: Iran adopted standard time in 1935, not 1946. In 1977 it observed DST from 03-21 23:00 to 10-20 24:00; its 1978 transitions were on 03-24 and 08-05, not 03-20 and 10-20; and its spring 1979 transition was on 05-27, not 03-21 (https://data.iana.org/time-zones/tzdb/NEWS). ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Former packages used to install systemd.service file to `/etc`. The files there are marked as `conf` and are not cleaned out, and not updated automatically. This PR cleans them out. [#39323](https://github.com/ClickHouse/ClickHouse/pull/39323) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Ensure LSan is effective. [#39430](https://github.com/ClickHouse/ClickHouse/pull/39430) ([Azat Khuzhin](https://github.com/azat)). +* TSAN has issues with clang-14 (https://github.com/google/sanitizers/issues/1552, https://github.com/google/sanitizers/issues/1540), so here we build the TSAN binaries with clang-15. [#39450](https://github.com/ClickHouse/ClickHouse/pull/39450) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Remove the option to build ClickHouse tools as separate executable programs. This fixes [#37847](https://github.com/ClickHouse/ClickHouse/issues/37847). [#39520](https://github.com/ClickHouse/ClickHouse/pull/39520) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Small preparations for build on s390x (which is big-endian). [#39627](https://github.com/ClickHouse/ClickHouse/pull/39627) ([Harry Lee](https://github.com/HarryLeeIBM)). [#39656](https://github.com/ClickHouse/ClickHouse/pull/39656) ([Harry Lee](https://github.com/HarryLeeIBM)). Fixed Endian issue in BitHelpers for s390x. [#39656](https://github.com/ClickHouse/ClickHouse/pull/39656) ([Harry Lee](https://github.com/HarryLeeIBM)). Implement a piece of code related to SipHash for s390x architecture (which is not supported by ClickHouse). [#39732](https://github.com/ClickHouse/ClickHouse/pull/39732) ([Harry Lee](https://github.com/HarryLeeIBM)). Fixed an Endian issue in Coordination snapshot code for s390x architecture (which is not supported by ClickHouse). [#39931](https://github.com/ClickHouse/ClickHouse/pull/39931) ([Harry Lee](https://github.com/HarryLeeIBM)). Fixed Endian issues in Codec code for s390x architecture (which is not supported by ClickHouse). [#40008](https://github.com/ClickHouse/ClickHouse/pull/40008) ([Harry Lee](https://github.com/HarryLeeIBM)). Fixed Endian issues in reading/writing BigEndian binary data in ReadHelpers and WriteHelpers code for s390x architecture (which is not supported by ClickHouse). [#40179](https://github.com/ClickHouse/ClickHouse/pull/40179) ([Harry Lee](https://github.com/HarryLeeIBM)). +* Support build with `clang-16` (trunk). This closes [#39949](https://github.com/ClickHouse/ClickHouse/issues/39949). [#40181](https://github.com/ClickHouse/ClickHouse/pull/40181) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Prepare RISC-V 64 build to run in CI. This is for [#40141](https://github.com/ClickHouse/ClickHouse/issues/40141). [#40197](https://github.com/ClickHouse/ClickHouse/pull/40197) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Simplified function registration macro interface (`FUNCTION_REGISTER*`) to eliminate the step to add and call an extern function in the registerFunctions.cpp, it also makes incremental builds of a new function faster. [#38615](https://github.com/ClickHouse/ClickHouse/pull/38615) ([Li Yin](https://github.com/liyinsg)). +* Docker: Now entrypoint.sh in docker image creates and executes chown for all folders it found in config for multidisk setup [#17717](https://github.com/ClickHouse/ClickHouse/issues/17717). [#39121](https://github.com/ClickHouse/ClickHouse/pull/39121) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). + +#### Bug Fix +* Fix possible segfault in `CapnProto` input format. This bug was found and send through ClickHouse bug-bounty [program](https://github.com/ClickHouse/ClickHouse/issues/38986) by *kiojj*. [#40241](https://github.com/ClickHouse/ClickHouse/pull/40241) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix a very rare case of incorrect behavior of array subscript operator. This closes [#28720](https://github.com/ClickHouse/ClickHouse/issues/28720). [#40185](https://github.com/ClickHouse/ClickHouse/pull/40185) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix insufficient argument check for encryption functions (found by query fuzzer). This closes [#39987](https://github.com/ClickHouse/ClickHouse/issues/39987). [#40194](https://github.com/ClickHouse/ClickHouse/pull/40194) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix the case when the order of columns can be incorrect if the `IN` operator is used with a table with `ENGINE = Set` containing multiple columns. This fixes [#13014](https://github.com/ClickHouse/ClickHouse/issues/13014). [#40225](https://github.com/ClickHouse/ClickHouse/pull/40225) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix seeking while reading from encrypted disk. This PR fixes [#38381](https://github.com/ClickHouse/ClickHouse/issues/38381). [#39687](https://github.com/ClickHouse/ClickHouse/pull/39687) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix duplicate columns in join plan. Finally, solve [#26809](https://github.com/ClickHouse/ClickHouse/issues/26809). [#40009](https://github.com/ClickHouse/ClickHouse/pull/40009) ([Vladimir C](https://github.com/vdimir)). +* Fixed query hanging for SELECT with ORDER BY WITH FILL with different date/time types. [#37849](https://github.com/ClickHouse/ClickHouse/pull/37849) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Fix ORDER BY that matches projections ORDER BY (before it simply returns unsorted result). [#38725](https://github.com/ClickHouse/ClickHouse/pull/38725) ([Azat Khuzhin](https://github.com/azat)). +* Do not optimise functions in GROUP BY statements if they shadow one of the table columns or expressions. Fixes [#37032](https://github.com/ClickHouse/ClickHouse/issues/37032). [#39103](https://github.com/ClickHouse/ClickHouse/pull/39103) ([Anton Kozlov](https://github.com/tonickkozlov)). +* Fix wrong table name in logs after RENAME TABLE. This fixes [#38018](https://github.com/ClickHouse/ClickHouse/issues/38018). [#39227](https://github.com/ClickHouse/ClickHouse/pull/39227) ([Amos Bird](https://github.com/amosbird)). +* Fix positional arguments in case of columns pruning when optimising the query. Closes [#38433](https://github.com/ClickHouse/ClickHouse/issues/38433). [#39293](https://github.com/ClickHouse/ClickHouse/pull/39293) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix bug in schema inference in case of empty messages in Protobuf/CapnProto formats that allowed to create column with empty `Tuple` type. Closes [#39051](https://github.com/ClickHouse/ClickHouse/issues/39051) Add 2 new settings `input_format_{protobuf/capnproto}_skip_fields_with_unsupported_types_in_schema_inference` that allow to skip fields with unsupported types while schema inference for Protobuf and CapnProto formats. [#39357](https://github.com/ClickHouse/ClickHouse/pull/39357) ([Kruglov Pavel](https://github.com/Avogar)). +* (Window View is an experimental feature) Fix segmentation fault on `CREATE WINDOW VIEW .. ON CLUSTER ... INNER`. Closes [#39363](https://github.com/ClickHouse/ClickHouse/issues/39363). [#39384](https://github.com/ClickHouse/ClickHouse/pull/39384) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix WriteBuffer finalize when cancelling insert into function (in previous versions it may leat to std::terminate). [#39458](https://github.com/ClickHouse/ClickHouse/pull/39458) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix storing of columns of type `Object` in sparse serialization. [#39464](https://github.com/ClickHouse/ClickHouse/pull/39464) ([Anton Popov](https://github.com/CurtizJ)). +* Fix possible "Not found column in block" exception when using projections. This closes [#39469](https://github.com/ClickHouse/ClickHouse/issues/39469). [#39470](https://github.com/ClickHouse/ClickHouse/pull/39470) ([小路](https://github.com/nicelulu)). +* Fix exception on race between DROP and INSERT with materialized views. [#39477](https://github.com/ClickHouse/ClickHouse/pull/39477) ([Azat Khuzhin](https://github.com/azat)). +* A bug in Apache Avro library: fix data race and possible heap-buffer-overflow in Avro format. Closes [#39094](https://github.com/ClickHouse/ClickHouse/issues/39094) Closes [#33652](https://github.com/ClickHouse/ClickHouse/issues/33652). [#39498](https://github.com/ClickHouse/ClickHouse/pull/39498) ([Kruglov Pavel](https://github.com/Avogar)). +* Fix rare bug in asynchronous reading (with setting `local_filesystem_read_method='pread_threadpool'`) with enabled `O_DIRECT` (enabled by setting `min_bytes_to_use_direct_io`). [#39506](https://github.com/ClickHouse/ClickHouse/pull/39506) ([Anton Popov](https://github.com/CurtizJ)). +* (only on FreeBSD) Fixes "Code: 49. DB::Exception: FunctionFactory: the function name '' is not unique. (LOGICAL_ERROR)" observed on FreeBSD when starting clickhouse. [#39551](https://github.com/ClickHouse/ClickHouse/pull/39551) ([Alexander Gololobov](https://github.com/davenger)). +* Fix bug with the recently introduced "maxsplit" argument for `splitByChar`, which was not working correctly. [#39552](https://github.com/ClickHouse/ClickHouse/pull/39552) ([filimonov](https://github.com/filimonov)). +* Fix bug in ASOF JOIN with `enable_optimize_predicate_expression`, close [#37813](https://github.com/ClickHouse/ClickHouse/issues/37813). [#39556](https://github.com/ClickHouse/ClickHouse/pull/39556) ([Vladimir C](https://github.com/vdimir)). +* Fixed `CREATE/DROP INDEX` query with `ON CLUSTER` or `Replicated` database and `ReplicatedMergeTree`. It used to be executed on all replicas (causing error or DDL queue stuck). Fixes [#39511](https://github.com/ClickHouse/ClickHouse/issues/39511). [#39565](https://github.com/ClickHouse/ClickHouse/pull/39565) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix "column not found" error for push down with join, close [#39505](https://github.com/ClickHouse/ClickHouse/issues/39505). [#39575](https://github.com/ClickHouse/ClickHouse/pull/39575) ([Vladimir C](https://github.com/vdimir)). +* Fix the wrong `REGEXP_REPLACE` alias. This fixes https://github.com/ClickHouse/ClickBench/issues/9. [#39592](https://github.com/ClickHouse/ClickHouse/pull/39592) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fixed point of origin for exponential decay window functions to the last value in window. Previously, decay was calculated by formula `exp((t - curr_row_t) / decay_length)`, which is incorrect when right boundary of window is not `CURRENT ROW`. It was changed to: `exp((t - last_row_t) / decay_length)`. There is no change in results for windows with `ROWS BETWEEN (smth) AND CURRENT ROW`. [#39593](https://github.com/ClickHouse/ClickHouse/pull/39593) ([Vladimir Chebotaryov](https://github.com/quickhouse)). +* Fix Decimal division overflow, which can be detected based on operands scale. [#39600](https://github.com/ClickHouse/ClickHouse/pull/39600) ([Andrey Zvonov](https://github.com/zvonand)). +* Fix settings `output_format_arrow_string_as_string` and `output_format_arrow_low_cardinality_as_dictionary` work in combination. Closes [#39624](https://github.com/ClickHouse/ClickHouse/issues/39624). [#39647](https://github.com/ClickHouse/ClickHouse/pull/39647) ([Kruglov Pavel](https://github.com/Avogar)). +* Fixed a bug in default database resolution in distributed table reads. [#39674](https://github.com/ClickHouse/ClickHouse/pull/39674) ([Anton Kozlov](https://github.com/tonickkozlov)). +* (Only with the obsolete Ordinary databases) Select might read data of dropped table if cache for mmap IO is used and database engine is Ordinary and new tables was created with the same name as dropped one had. It's fixed. [#39708](https://github.com/ClickHouse/ClickHouse/pull/39708) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix possible error `Invalid column type for ColumnUnique::insertRangeFrom. Expected String, got ColumnLowCardinality` Fixes [#38460](https://github.com/ClickHouse/ClickHouse/issues/38460). [#39716](https://github.com/ClickHouse/ClickHouse/pull/39716) ([Arthur Passos](https://github.com/arthurpassos)). +* Field names in the `meta` section of JSON format were erroneously double escaped. This closes [#39693](https://github.com/ClickHouse/ClickHouse/issues/39693). [#39747](https://github.com/ClickHouse/ClickHouse/pull/39747) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Fix wrong index analysis with tuples and operator `IN`, which could lead to wrong query result. [#39752](https://github.com/ClickHouse/ClickHouse/pull/39752) ([Anton Popov](https://github.com/CurtizJ)). +* Fix `EmbeddedRocksDB` tables filtering by key using params. [#39757](https://github.com/ClickHouse/ClickHouse/pull/39757) ([Antonio Andelic](https://github.com/antonio2368)). +* Fix error `Invalid number of columns in chunk pushed to OutputPort` which was caused by ARRAY JOIN optimization. Fixes [#39164](https://github.com/ClickHouse/ClickHouse/issues/39164). [#39799](https://github.com/ClickHouse/ClickHouse/pull/39799) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* A workaround for a bug in Linux kernel. Fix `CANNOT_READ_ALL_DATA` exception with `local_filesystem_read_method=pread_threadpool`. This bug affected only Linux kernel version 5.9 and 5.10 according to [man](https://manpages.debian.org/testing/manpages-dev/preadv2.2.en.html#BUGS). [#39800](https://github.com/ClickHouse/ClickHouse/pull/39800) ([Anton Popov](https://github.com/CurtizJ)). +* (Only on NFS) Fix broken NFS mkdir for root-squashed volumes. [#39898](https://github.com/ClickHouse/ClickHouse/pull/39898) ([Constantine Peresypkin](https://github.com/pkit)). +* Remove dictionaries from prometheus metrics on DETACH/DROP. [#39926](https://github.com/ClickHouse/ClickHouse/pull/39926) ([Azat Khuzhin](https://github.com/azat)). +* Fix read of StorageFile with virtual columns. Closes [#39907](https://github.com/ClickHouse/ClickHouse/issues/39907). [#39943](https://github.com/ClickHouse/ClickHouse/pull/39943) ([flynn](https://github.com/ucasfl)). +* Fix big memory usage during fetches. Fixes [#39915](https://github.com/ClickHouse/ClickHouse/issues/39915). [#39990](https://github.com/ClickHouse/ClickHouse/pull/39990) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* (experimental feature) Fix `hashId` crash and salt parameter not being used. [#40002](https://github.com/ClickHouse/ClickHouse/pull/40002) ([Raúl Marín](https://github.com/Algunenano)). +* `EXCEPT` and `INTERSECT` operators may lead to crash if a specific combination of constant and non-constant columns were used. [#40020](https://github.com/ClickHouse/ClickHouse/pull/40020) ([Duc Canh Le](https://github.com/canhld94)). +* Fixed "Part directory doesn't exist" and "`tmp_` ... No such file or directory" errors during too slow INSERT or too long merge/mutation. Also fixed issue that may cause some replication queue entries to stuck without any errors or warnings in logs if previous attempt to fetch part failed, but `tmp-fetch_` directory was not cleaned up. [#40031](https://github.com/ClickHouse/ClickHouse/pull/40031) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Fix rare cases of parsing of arrays of tuples in format `Values`. [#40034](https://github.com/ClickHouse/ClickHouse/pull/40034) ([Anton Popov](https://github.com/CurtizJ)). +* Fixes ArrowColumn format Dictionary(X) & Dictionary(Nullable(X)) conversion to ClickHouse LowCardinality(X) & LowCardinality(Nullable(X)) respectively. [#40037](https://github.com/ClickHouse/ClickHouse/pull/40037) ([Arthur Passos](https://github.com/arthurpassos)). +* Fix potential deadlock in writing to S3 during task scheduling failure. [#40070](https://github.com/ClickHouse/ClickHouse/pull/40070) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix bug in collectFilesToSkip() by adding correct file extension (.idx or idx2) for indexes to be recalculated, avoid wrong hard links. Fixed [#39896](https://github.com/ClickHouse/ClickHouse/issues/39896). [#40095](https://github.com/ClickHouse/ClickHouse/pull/40095) ([Jianmei Zhang](https://github.com/zhangjmruc)). +* A fix for reverse DNS resolution. [#40134](https://github.com/ClickHouse/ClickHouse/pull/40134) ([Arthur Passos](https://github.com/arthurpassos)). +* Fix unexpected result `arrayDifference` of `Array(UInt32). [#40211](https://github.com/ClickHouse/ClickHouse/pull/40211) ([Duc Canh Le](https://github.com/canhld94)). + + ### ClickHouse release 22.7, 2022-07-21 #### Upgrade Notes @@ -258,7 +401,7 @@ * Allows providing `NULL`/`NOT NULL` right after type in column declaration. [#37337](https://github.com/ClickHouse/ClickHouse/pull/37337) ([Igor Nikonov](https://github.com/devcrafter)). * optimize file segment PARTIALLY_DOWNLOADED get read buffer. [#37338](https://github.com/ClickHouse/ClickHouse/pull/37338) ([xiedeyantu](https://github.com/xiedeyantu)). * Try to improve short circuit functions processing to fix problems with stress tests. [#37384](https://github.com/ClickHouse/ClickHouse/pull/37384) ([Kruglov Pavel](https://github.com/Avogar)). -* Closes [#37395](https://github.com/ClickHouse/ClickHouse/issues/37395). [#37415](https://github.com/ClickHouse/ClickHouse/pull/37415) ([Memo](https://github.com/Joeywzr)). +* Generate multiple columns with UUID (generateUUIDv4(1), generateUUIDv4(2)) [#37395](https://github.com/ClickHouse/ClickHouse/issues/37395). [#37415](https://github.com/ClickHouse/ClickHouse/pull/37415) ([Memo](https://github.com/Joeywzr)). * Fix extremely rare deadlock during part fetch in zero-copy replication. Fixes [#37423](https://github.com/ClickHouse/ClickHouse/issues/37423). [#37424](https://github.com/ClickHouse/ClickHouse/pull/37424) ([metahys](https://github.com/metahys)). * Don't allow to create storage with unknown data format. [#37450](https://github.com/ClickHouse/ClickHouse/pull/37450) ([Kruglov Pavel](https://github.com/Avogar)). * Set `global_memory_usage_overcommit_max_wait_microseconds` default value to 5 seconds. Add info about `OvercommitTracker` to OOM exception message. Add `MemoryOvercommitWaitTimeMicroseconds` profile event. [#37460](https://github.com/ClickHouse/ClickHouse/pull/37460) ([Dmitry Novik](https://github.com/novikd)). diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a93449495c..64fb870b61b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,10 +77,9 @@ option(USE_STATIC_LIBRARIES "Disable to use shared libraries" ON) # DEVELOPER ONLY. # Faster linking if turned on. option(SPLIT_SHARED_LIBRARIES "Keep all internal libraries as separate .so files" OFF) -option(CLICKHOUSE_SPLIT_BINARY "Make several binaries (clickhouse-server, clickhouse-client etc.) instead of one bundled" OFF) -if (USE_STATIC_LIBRARIES AND (SPLIT_SHARED_LIBRARIES OR CLICKHOUSE_SPLIT_BINARY)) - message(FATAL_ERROR "SPLIT_SHARED_LIBRARIES=1 or CLICKHOUSE_SPLIT_BINARY=1 must not be used together with USE_STATIC_LIBRARIES=1") +if (USE_STATIC_LIBRARIES AND SPLIT_SHARED_LIBRARIES) + message(FATAL_ERROR "SPLIT_SHARED_LIBRARIES=1 must not be used together with USE_STATIC_LIBRARIES=1") endif() if (NOT USE_STATIC_LIBRARIES AND SPLIT_SHARED_LIBRARIES) @@ -144,6 +143,8 @@ include (cmake/add_warning.cmake) if (COMPILER_CLANG) # generate ranges for fast "addr2line" search if (NOT CMAKE_BUILD_TYPE_UC STREQUAL "RELEASE") + # NOTE: that clang has a bug because of it does not emit .debug_aranges + # with ThinLTO, so custom ld.lld wrapper is shipped in docker images. set(COMPILER_FLAGS "${COMPILER_FLAGS} -gdwarf-aranges") endif () @@ -154,6 +155,8 @@ if (COMPILER_CLANG) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Xclang -fuse-ctor-homing") endif() endif() + + no_warning(enum-constexpr-conversion) # breaks Protobuf in clang-16 endif () # If compiler has support for -Wreserved-identifier. It is difficult to detect by clang version, @@ -163,7 +166,6 @@ if (HAS_RESERVED_IDENTIFIER) add_compile_definitions (HAS_RESERVED_IDENTIFIER) endif () -# If turned `ON`, assumes the user has either the system GTest library or the bundled one. option(ENABLE_TESTS "Provide unit_test_dbms target with Google.Test unit tests" ON) option(ENABLE_EXAMPLES "Build all example programs in 'examples' subdirectories" OFF) @@ -199,8 +201,8 @@ endif () option(ADD_GDB_INDEX_FOR_GOLD "Add .gdb-index to resulting binaries for gold linker.") if (NOT CMAKE_BUILD_TYPE_UC STREQUAL "RELEASE") - # Can be lld or ld-lld. - if (LINKER_NAME MATCHES "lld$") + # Can be lld or ld-lld or lld-13 or /path/to/lld. + if (LINKER_NAME MATCHES "lld") set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gdb-index") set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gdb-index") message (STATUS "Adding .gdb-index via --gdb-index linker option.") @@ -245,7 +247,8 @@ else () endif () # Create BuildID when using lld. For other linkers it is created by default. -if (LINKER_NAME MATCHES "lld$") +# (NOTE: LINKER_NAME can be either path or name, and in different variants) +if (LINKER_NAME MATCHES "lld") # SHA1 is not cryptographically secure but it is the best what lld is offering. set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id=sha1") endif () @@ -502,7 +505,7 @@ endif () message (STATUS "Building for: ${CMAKE_SYSTEM} ${CMAKE_SYSTEM_PROCESSOR} ${CMAKE_LIBRARY_ARCHITECTURE} ; USE_STATIC_LIBRARIES=${USE_STATIC_LIBRARIES} - SPLIT_SHARED=${SPLIT_SHARED_LIBRARIES}") + SPLIT_SHARED_LIBRARIES=${SPLIT_SHARED_LIBRARIES}") include (GNUInstallDirs) @@ -599,6 +602,8 @@ if (NATIVE_BUILD_TARGETS COMMAND ${CMAKE_COMMAND} "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}" "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}" + "-DENABLE_CCACHE=${ENABLE_CCACHE}" + "-DENABLE_CLICKHOUSE_SELF_EXTRACTING=${ENABLE_CLICKHOUSE_SELF_EXTRACTING}" ${CMAKE_SOURCE_DIR} WORKING_DIRECTORY "${NATIVE_BUILD_DIR}" COMMAND_ECHO STDOUT) @@ -607,4 +612,3 @@ if (NATIVE_BUILD_TARGETS COMMAND ${CMAKE_COMMAND} --build "${NATIVE_BUILD_DIR}" --target ${NATIVE_BUILD_TARGETS} COMMAND_ECHO STDOUT) endif () - diff --git a/PreLoad.cmake b/PreLoad.cmake index 95f65b85f7f..b11ab080430 100644 --- a/PreLoad.cmake +++ b/PreLoad.cmake @@ -7,12 +7,8 @@ # How to install Ninja on Ubuntu: # sudo apt-get install ninja-build -# CLion does not support Ninja -# You can add your vote on CLion task tracker: -# https://youtrack.jetbrains.com/issue/CPP-2659 -# https://youtrack.jetbrains.com/issue/CPP-870 -if (NOT DEFINED ENV{CLION_IDE} AND NOT DEFINED ENV{XCODE_IDE}) +if (NOT DEFINED ENV{XCODE_IDE}) find_program(NINJA_PATH ninja) if (NINJA_PATH) set(CMAKE_GENERATOR "Ninja" CACHE INTERNAL "") diff --git a/README.md b/README.md index 1d0146582a6..49aed14f719 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![ClickHouse — open source distributed column-oriented DBMS](https://github.com/ClickHouse/ClickHouse/raw/master/website/images/logo-400x240.png)](https://clickhouse.com) +[![ClickHouse — open source distributed column-oriented DBMS](https://github.com/ClickHouse/clickhouse-presentations/raw/master/images/logo-400x240.png)](https://clickhouse.com) ClickHouse® is an open-source column-oriented database management system that allows generating analytical data reports in real-time. @@ -12,11 +12,8 @@ ClickHouse® is an open-source column-oriented database management system that a * [Blog](https://clickhouse.com/blog/en/) contains various ClickHouse-related articles, as well as announcements and reports about events. * [Code Browser (Woboq)](https://clickhouse.com/codebrowser/ClickHouse/index.html) with syntax highlight and navigation. * [Code Browser (github.dev)](https://github.dev/ClickHouse/ClickHouse) with syntax highlight, powered by github.dev. -* [Contacts](https://clickhouse.com/company/#contact) can help to get your questions answered if there are any. +* [Contacts](https://clickhouse.com/company/contact) can help to get your questions answered if there are any. ## Upcoming events -* [v22.7 Release Webinar](https://clickhouse.com/company/events/v22-7-release-webinar/) Original creator, co-founder, and CTO of ClickHouse Alexey Milovidov will walk us through the highlights of the release, provide live demos, and share vision into what is coming in the roadmap. -* [ClickHouse Meetup at the Cloudflare office in London](https://www.meetup.com/clickhouse-london-user-group/events/286891586/) ClickHouse meetup at the Cloudflare office space in central London -* [ClickHouse Meetup at the Metoda office in Munich](https://www.meetup.com/clickhouse-meetup-munich/events/286891667/) ClickHouse meetup at the Metoda office in Munich - - +* [**v22.9 Release Webinar**](https://clickhouse.com/company/events/v22-9-release-webinar) Original creator, co-founder, and CTO of ClickHouse Alexey Milovidov will walk us through the highlights of the release, provide live demos, and share vision into what is coming in the roadmap. +* [**ClickHouse for Analytics @ Barracuda Networks**](https://www.meetup.com/clickhouse-silicon-valley-meetup-group/events/288140358/) Join us for this in person meetup hosted by our friends at Barracuda in Bay Area. diff --git a/SECURITY.md b/SECURITY.md index 81d2fd18fb2..fb6caa92cb8 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -10,9 +10,11 @@ The following versions of ClickHouse server are currently being supported with s | Version | Supported | |:-|:-| +| 22.8 | ✔️ | +| 22.7 | ✔️ | | 22.6 | ✔️ | -| 22.5 | ✔️ | -| 22.4 | ✔️ | +| 22.5 | ❌ | +| 22.4 | ❌ | | 22.3 | ✔️ | | 22.2 | ❌ | | 22.1 | ❌ | @@ -20,7 +22,7 @@ The following versions of ClickHouse server are currently being supported with s | 21.11 | ❌ | | 21.10 | ❌ | | 21.9 | ❌ | -| 21.8 | ✔️ | +| 21.8 | ❌ | | 21.7 | ❌ | | 21.6 | ❌ | | 21.5 | ❌ | @@ -57,5 +59,5 @@ As the security issue moves from triage, to identified fix, to release planning ## Public Disclosure Timing -A public disclosure date is negotiated by the ClickHouse maintainers and the bug submitter. We prefer to fully disclose the bug as soon as possible once a user mitigation is available. It is reasonable to delay disclosure when the bug or the fix is not yet fully understood, the solution is not well-tested, or for vendor coordination. The timeframe for disclosure is from immediate (especially if it's already publicly known) to 90 days. For a vulnerability with a straightforward mitigation, we expect report date to disclosure date to be on the order of 7 days. +A public disclosure date is negotiated by the ClickHouse maintainers and the bug submitter. We prefer to fully disclose the bug as soon as possible once a user mitigation is available. It is reasonable to delay disclosure when the bug or the fix is not yet fully understood, the solution is not well-tested, or for vendor coordination. The timeframe for disclosure is from immediate (especially if it's already publicly known) to 90 days. For a vulnerability with a straightforward mitigation, we expect the report date to disclosure date to be on the order of 7 days. diff --git a/base/base/Decimal.h b/base/base/Decimal.h index 1efb8ba8d92..22cb577b1b2 100644 --- a/base/base/Decimal.h +++ b/base/base/Decimal.h @@ -52,15 +52,15 @@ struct Decimal constexpr Decimal(Decimal &&) noexcept = default; constexpr Decimal(const Decimal &) = default; - constexpr Decimal(const T & value_): value(value_) {} + constexpr Decimal(const T & value_): value(value_) {} // NOLINT(google-explicit-constructor) template - constexpr Decimal(const Decimal & x): value(x.value) {} + constexpr Decimal(const Decimal & x): value(x.value) {} // NOLINT(google-explicit-constructor) constexpr Decimal & operator=(Decimal &&) noexcept = default; constexpr Decimal & operator = (const Decimal &) = default; - constexpr operator T () const { return value; } + constexpr operator T () const { return value; } // NOLINT(google-explicit-constructor) template constexpr U convertTo() const @@ -111,7 +111,7 @@ public: using Base::Base; using NativeType = Base::NativeType; - constexpr DateTime64(const Base & v): Base(v) {} + constexpr DateTime64(const Base & v): Base(v) {} // NOLINT(google-explicit-constructor) }; } diff --git a/base/base/DecomposedFloat.h b/base/base/DecomposedFloat.h index 652b28966b2..f152637b94e 100644 --- a/base/base/DecomposedFloat.h +++ b/base/base/DecomposedFloat.h @@ -36,14 +36,14 @@ struct DecomposedFloat { using Traits = FloatTraits; - DecomposedFloat(T x) + explicit DecomposedFloat(T x) { memcpy(&x_uint, &x, sizeof(x)); } typename Traits::UInt x_uint; - bool is_negative() const + bool isNegative() const { return x_uint >> (Traits::bits - 1); } @@ -53,7 +53,7 @@ struct DecomposedFloat { return (exponent() == 0 && mantissa() == 0) ? 0 - : (is_negative() + : (isNegative() ? -1 : 1); } @@ -63,7 +63,7 @@ struct DecomposedFloat return (x_uint >> (Traits::mantissa_bits)) & (((1ull << (Traits::exponent_bits + 1)) - 1) >> 1); } - int16_t normalized_exponent() const + int16_t normalizedExponent() const { return int16_t(exponent()) - ((1ull << (Traits::exponent_bits - 1)) - 1); } @@ -73,20 +73,20 @@ struct DecomposedFloat return x_uint & ((1ull << Traits::mantissa_bits) - 1); } - int64_t mantissa_with_sign() const + int64_t mantissaWithSign() const { - return is_negative() ? -mantissa() : mantissa(); + return isNegative() ? -mantissa() : mantissa(); } /// NOTE Probably floating point instructions can be better. - bool is_integer_in_representable_range() const + bool isIntegerInRepresentableRange() const { return x_uint == 0 - || (normalized_exponent() >= 0 /// The number is not less than one + || (normalizedExponent() >= 0 /// The number is not less than one /// The number is inside the range where every integer has exact representation in float - && normalized_exponent() <= static_cast(Traits::mantissa_bits) + && normalizedExponent() <= static_cast(Traits::mantissa_bits) /// After multiplying by 2^exp, the fractional part becomes zero, means the number is integer - && ((mantissa() & ((1ULL << (Traits::mantissa_bits - normalized_exponent())) - 1)) == 0)); + && ((mantissa() & ((1ULL << (Traits::mantissa_bits - normalizedExponent())) - 1)) == 0)); } @@ -102,15 +102,15 @@ struct DecomposedFloat return sign(); /// Different signs - if (is_negative() && rhs > 0) + if (isNegative() && rhs > 0) return -1; - if (!is_negative() && rhs < 0) + if (!isNegative() && rhs < 0) return 1; /// Fractional number with magnitude less than one - if (normalized_exponent() < 0) + if (normalizedExponent() < 0) { - if (!is_negative()) + if (!isNegative()) return rhs > 0 ? -1 : 1; else return rhs >= 0 ? -1 : 1; @@ -121,11 +121,11 @@ struct DecomposedFloat { if (rhs == std::numeric_limits::lowest()) { - assert(is_negative()); + assert(isNegative()); - if (normalized_exponent() < static_cast(8 * sizeof(Int) - is_signed_v)) + if (normalizedExponent() < static_cast(8 * sizeof(Int) - is_signed_v)) return 1; - if (normalized_exponent() > static_cast(8 * sizeof(Int) - is_signed_v)) + if (normalizedExponent() > static_cast(8 * sizeof(Int) - is_signed_v)) return -1; if (mantissa() == 0) @@ -136,44 +136,44 @@ struct DecomposedFloat } /// Too large number: abs(float) > abs(rhs). Also the case with infinities and NaN. - if (normalized_exponent() >= static_cast(8 * sizeof(Int) - is_signed_v)) - return is_negative() ? -1 : 1; + if (normalizedExponent() >= static_cast(8 * sizeof(Int) - is_signed_v)) + return isNegative() ? -1 : 1; using UInt = std::conditional_t<(sizeof(Int) > sizeof(typename Traits::UInt)), make_unsigned_t, typename Traits::UInt>; UInt uint_rhs = rhs < 0 ? -rhs : rhs; /// Smaller octave: abs(rhs) < abs(float) /// FYI, TIL: octave is also called "binade", https://en.wikipedia.org/wiki/Binade - if (uint_rhs < (static_cast(1) << normalized_exponent())) - return is_negative() ? -1 : 1; + if (uint_rhs < (static_cast(1) << normalizedExponent())) + return isNegative() ? -1 : 1; /// Larger octave: abs(rhs) > abs(float) - if (normalized_exponent() + 1 < static_cast(8 * sizeof(Int) - is_signed_v) - && uint_rhs >= (static_cast(1) << (normalized_exponent() + 1))) - return is_negative() ? 1 : -1; + if (normalizedExponent() + 1 < static_cast(8 * sizeof(Int) - is_signed_v) + && uint_rhs >= (static_cast(1) << (normalizedExponent() + 1))) + return isNegative() ? 1 : -1; /// The same octave - /// uint_rhs == 2 ^ normalized_exponent + mantissa * 2 ^ (normalized_exponent - mantissa_bits) + /// uint_rhs == 2 ^ normalizedExponent + mantissa * 2 ^ (normalizedExponent - mantissa_bits) - bool large_and_always_integer = normalized_exponent() >= static_cast(Traits::mantissa_bits); + bool large_and_always_integer = normalizedExponent() >= static_cast(Traits::mantissa_bits); UInt a = large_and_always_integer - ? static_cast(mantissa()) << (normalized_exponent() - Traits::mantissa_bits) - : static_cast(mantissa()) >> (Traits::mantissa_bits - normalized_exponent()); + ? static_cast(mantissa()) << (normalizedExponent() - Traits::mantissa_bits) + : static_cast(mantissa()) >> (Traits::mantissa_bits - normalizedExponent()); - UInt b = uint_rhs - (static_cast(1) << normalized_exponent()); + UInt b = uint_rhs - (static_cast(1) << normalizedExponent()); if (a < b) - return is_negative() ? 1 : -1; + return isNegative() ? 1 : -1; if (a > b) - return is_negative() ? -1 : 1; + return isNegative() ? -1 : 1; /// Float has no fractional part means that the numbers are equal. - if (large_and_always_integer || (mantissa() & ((1ULL << (Traits::mantissa_bits - normalized_exponent())) - 1)) == 0) + if (large_and_always_integer || (mantissa() & ((1ULL << (Traits::mantissa_bits - normalizedExponent())) - 1)) == 0) return 0; else /// Float has fractional part means its abs value is larger. - return is_negative() ? -1 : 1; + return isNegative() ? -1 : 1; } diff --git a/base/base/JSON.cpp b/base/base/JSON.cpp index 92350ea0e18..315bcce38da 100644 --- a/base/base/JSON.cpp +++ b/base/base/JSON.cpp @@ -22,7 +22,7 @@ POCO_IMPLEMENT_EXCEPTION(JSONException, Poco::Exception, "JSONException") // NOL #endif -/// Прочитать беззнаковое целое в простом формате из не-0-terminated строки. +/// Read unsigned integer in a simple form from a non-0-terminated string. static UInt64 readUIntText(const char * buf, const char * end) { UInt64 x = 0; @@ -59,7 +59,7 @@ static UInt64 readUIntText(const char * buf, const char * end) } -/// Прочитать знаковое целое в простом формате из не-0-terminated строки. +/// Read signed integer in a simple form from a non-0-terminated string. static Int64 readIntText(const char * buf, const char * end) { bool negative = false; @@ -102,7 +102,7 @@ static Int64 readIntText(const char * buf, const char * end) } -/// Прочитать число с плавающей запятой в простом формате, с грубым округлением, из не-0-terminated строки. +/// Read floating point number in simple format, imprecisely, from a non-0-terminated string. static double readFloatText(const char * buf, const char * end) { bool negative = false; @@ -151,8 +151,8 @@ static double readFloatText(const char * buf, const char * end) case 'E': { ++buf; - Int32 exponent = readIntText(buf, end); - x *= preciseExp10(exponent); + auto exponent = readIntText(buf, end); + x *= preciseExp10(static_cast(exponent)); run = false; break; @@ -207,7 +207,7 @@ JSON::ElementType JSON::getType() const return TYPE_NUMBER; case '"': { - /// Проверим - это просто строка или name-value pair + /// Is it a string or a name-value pair? Pos after_string = skipString(); if (after_string < ptr_end && *after_string == ':') return TYPE_NAME_VALUE_PAIR; @@ -229,15 +229,13 @@ void JSON::checkPos(Pos pos) const JSON::Pos JSON::skipString() const { - //std::cerr << "skipString()\t" << data() << std::endl; - Pos pos = ptr_begin; checkPos(pos); if (*pos != '"') throw JSONException(std::string("JSON: expected \", got ") + *pos); ++pos; - /// fast path: находим следующую двойную кавычку. Если перед ней нет бэкслеша - значит это конец строки (при допущении корректности JSON). + /// fast path: find next double quote. If it is not escaped by backslash - then it's an end of string (assuming JSON is valid). Pos closing_quote = reinterpret_cast(memchr(reinterpret_cast(pos), '\"', ptr_end - pos)); if (nullptr != closing_quote && closing_quote[-1] != '\\') return closing_quote + 1; @@ -269,8 +267,6 @@ JSON::Pos JSON::skipString() const JSON::Pos JSON::skipNumber() const { - //std::cerr << "skipNumber()\t" << data() << std::endl; - Pos pos = ptr_begin; checkPos(pos); @@ -296,8 +292,6 @@ JSON::Pos JSON::skipNumber() const JSON::Pos JSON::skipBool() const { - //std::cerr << "skipBool()\t" << data() << std::endl; - Pos pos = ptr_begin; checkPos(pos); @@ -314,16 +308,12 @@ JSON::Pos JSON::skipBool() const JSON::Pos JSON::skipNull() const { - //std::cerr << "skipNull()\t" << data() << std::endl; - return ptr_begin + 4; } JSON::Pos JSON::skipNameValuePair() const { - //std::cerr << "skipNameValuePair()\t" << data() << std::endl; - Pos pos = skipString(); checkPos(pos); @@ -338,8 +328,6 @@ JSON::Pos JSON::skipNameValuePair() const JSON::Pos JSON::skipArray() const { - //std::cerr << "skipArray()\t" << data() << std::endl; - if (!isArray()) throw JSONException("JSON: expected ["); Pos pos = ptr_begin; @@ -370,8 +358,6 @@ JSON::Pos JSON::skipArray() const JSON::Pos JSON::skipObject() const { - //std::cerr << "skipObject()\t" << data() << std::endl; - if (!isObject()) throw JSONException("JSON: expected {"); Pos pos = ptr_begin; @@ -402,8 +388,6 @@ JSON::Pos JSON::skipObject() const JSON::Pos JSON::skipElement() const { - //std::cerr << "skipElement()\t" << data() << std::endl; - ElementType type = getType(); switch (type) @@ -640,7 +624,7 @@ std::string JSON::getString() const { throw JSONException("JSON: incorrect syntax: incorrect HEX code."); } - buf.resize(buf.size() + 6); /// максимальный размер UTF8 многобайтовой последовательности + buf.resize(buf.size() + 6); /// Max size of UTF-8 sequence, including pre-standard mapping of UCS-4 to UTF-8. int res = utf8.convert(unicode, reinterpret_cast(const_cast(buf.data())) + buf.size() - 6, 6); if (!res) @@ -754,8 +738,6 @@ JSON::iterator JSON::iterator::begin() const if (type != TYPE_ARRAY && type != TYPE_OBJECT) throw JSONException("JSON: not array or object when calling begin() method."); - //std::cerr << "begin()\t" << data() << std::endl; - Pos pos = ptr_begin + 1; checkPos(pos); if (*pos == '}' || *pos == ']') @@ -846,4 +828,3 @@ bool JSON::isType() const { return isBool(); } - diff --git a/base/base/JSON.h b/base/base/JSON.h index 214e9f88e9b..850b74715c6 100644 --- a/base/base/JSON.h +++ b/base/base/JSON.h @@ -38,6 +38,7 @@ */ +// NOLINTBEGIN(google-explicit-constructor) #ifdef __clang__ # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec" @@ -46,6 +47,7 @@ POCO_DECLARE_EXCEPTION(Foundation_API, JSONException, Poco::Exception) #ifdef __clang__ # pragma clang diagnostic pop #endif +// NOLINTEND(google-explicit-constructor) class JSON { @@ -61,7 +63,7 @@ public: checkInit(); } - JSON(const std::string & s) : ptr_begin(s.data()), ptr_end(s.data() + s.size()), level(0) + explicit JSON(std::string_view s) : ptr_begin(s.data()), ptr_end(s.data() + s.size()), level(0) { checkInit(); } @@ -71,13 +73,7 @@ public: *this = rhs; } - JSON & operator=(const JSON & rhs) - { - ptr_begin = rhs.ptr_begin; - ptr_end = rhs.ptr_end; - level = rhs.level; - return *this; - } + JSON & operator=(const JSON & rhs) = default; const char * data() const { return ptr_begin; } const char * dataEnd() const { return ptr_end; } @@ -169,7 +165,7 @@ public: /// Перейти к следующему элементу массива или следующей name-value паре объекта. iterator & operator++(); - iterator operator++(int); + iterator operator++(int); // NOLINT(cert-dcl21-cpp) /// Есть ли в строке escape-последовательности bool hasEscapes() const; diff --git a/base/base/ReplxxLineReader.cpp b/base/base/ReplxxLineReader.cpp index bd26ec69c89..75c48f690f8 100644 --- a/base/base/ReplxxLineReader.cpp +++ b/base/base/ReplxxLineReader.cpp @@ -27,7 +27,7 @@ void trim(String & s) std::string getEditor() { - const char * editor = std::getenv("EDITOR"); + const char * editor = std::getenv("EDITOR"); // NOLINT(concurrency-mt-unsafe) if (!editor || !*editor) editor = "vim"; @@ -76,7 +76,7 @@ void convertHistoryFile(const std::string & path, replxx::Replxx & rx) if (!in) { rx.print("Cannot open %s reading (for conversion): %s\n", - path.c_str(), errnoToString(errno).c_str()); + path.c_str(), errnoToString().c_str()); return; } @@ -84,7 +84,7 @@ void convertHistoryFile(const std::string & path, replxx::Replxx & rx) if (getline(in, line).bad()) { rx.print("Cannot read from %s (for conversion): %s\n", - path.c_str(), errnoToString(errno).c_str()); + path.c_str(), errnoToString().c_str()); return; } @@ -113,7 +113,7 @@ void convertHistoryFile(const std::string & path, replxx::Replxx & rx) if (!out) { rx.print("Cannot open %s for writing (for conversion): %s\n", - path.c_str(), errnoToString(errno).c_str()); + path.c_str(), errnoToString().c_str()); return; } @@ -151,7 +151,7 @@ ReplxxLineReader::ReplxxLineReader( history_file_fd = open(history_file_path.c_str(), O_RDWR); if (history_file_fd < 0) { - rx.print("Open of history file failed: %s\n", errnoToString(errno).c_str()); + rx.print("Open of history file failed: %s\n", errnoToString().c_str()); } else { @@ -159,18 +159,18 @@ ReplxxLineReader::ReplxxLineReader( if (flock(history_file_fd, LOCK_SH)) { - rx.print("Shared lock of history file failed: %s\n", errnoToString(errno).c_str()); + rx.print("Shared lock of history file failed: %s\n", errnoToString().c_str()); } else { if (!rx.history_load(history_file_path)) { - rx.print("Loading history failed: %s\n", errnoToString(errno).c_str()); + rx.print("Loading history failed: %s\n", errnoToString().c_str()); } if (flock(history_file_fd, LOCK_UN)) { - rx.print("Unlock of history file failed: %s\n", errnoToString(errno).c_str()); + rx.print("Unlock of history file failed: %s\n", errnoToString().c_str()); } } } @@ -220,12 +220,41 @@ ReplxxLineReader::ReplxxLineReader( rx.bind_key(Replxx::KEY::control('W'), [this](char32_t code) { return rx.invoke(Replxx::ACTION::KILL_TO_WHITESPACE_ON_LEFT, code); }); rx.bind_key(Replxx::KEY::meta('E'), [this](char32_t) { openEditor(); return Replxx::ACTION_RESULT::CONTINUE; }); + + /// readline insert-comment + auto insert_comment_action = [this](char32_t code) + { + replxx::Replxx::State state(rx.get_state()); + const char * line = state.text(); + const char * line_end = line + strlen(line); + + std::string commented_line; + if (std::find(line, line_end, '\n') != line_end) + { + /// If query has multiple lines, multiline comment is used over + /// commenting each line separately for easier uncomment (though + /// with invoking editor it is simpler to uncomment multiple lines) + /// + /// Note, that using multiline comment is OK even with nested + /// comments, since nested comments are supported. + commented_line = fmt::format("/* {} */", state.text()); + } + else + { + // In a simplest case use simple comment. + commented_line = fmt::format("-- {}", state.text()); + } + rx.set_state(replxx::Replxx::State(commented_line.c_str(), commented_line.size())); + + return rx.invoke(Replxx::ACTION::COMMIT_LINE, code); + }; + rx.bind_key(Replxx::KEY::meta('#'), insert_comment_action); } ReplxxLineReader::~ReplxxLineReader() { if (close(history_file_fd)) - rx.print("Close of history file failed: %s\n", errnoToString(errno).c_str()); + rx.print("Close of history file failed: %s\n", errnoToString().c_str()); } LineReader::InputStatus ReplxxLineReader::readOneLine(const String & prompt) @@ -250,7 +279,7 @@ void ReplxxLineReader::addToHistory(const String & line) // and that is why flock() is added here. bool locked = false; if (flock(history_file_fd, LOCK_EX)) - rx.print("Lock of history file failed: %s\n", errnoToString(errno).c_str()); + rx.print("Lock of history file failed: %s\n", errnoToString().c_str()); else locked = true; @@ -258,10 +287,10 @@ void ReplxxLineReader::addToHistory(const String & line) // flush changes to the disk if (!rx.history_save(history_file_path)) - rx.print("Saving history failed: %s\n", errnoToString(errno).c_str()); + rx.print("Saving history failed: %s\n", errnoToString().c_str()); if (locked && 0 != flock(history_file_fd, LOCK_UN)) - rx.print("Unlock of history file failed: %s\n", errnoToString(errno).c_str()); + rx.print("Unlock of history file failed: %s\n", errnoToString().c_str()); } /// See comments in ShellCommand::executeImpl() @@ -275,7 +304,7 @@ int ReplxxLineReader::executeEditor(const std::string & path) static void * real_vfork = dlsym(RTLD_DEFAULT, "vfork"); if (!real_vfork) { - rx.print("Cannot find symbol vfork in myself: %s\n", errnoToString(errno).c_str()); + rx.print("Cannot find symbol vfork in myself: %s\n", errnoToString().c_str()); return -1; } @@ -283,7 +312,7 @@ int ReplxxLineReader::executeEditor(const std::string & path) if (-1 == pid) { - rx.print("Cannot vfork: %s\n", errnoToString(errno).c_str()); + rx.print("Cannot vfork: %s\n", errnoToString().c_str()); return -1; } @@ -292,11 +321,11 @@ int ReplxxLineReader::executeEditor(const std::string & path) { sigset_t mask; sigemptyset(&mask); - sigprocmask(0, nullptr, &mask); - sigprocmask(SIG_UNBLOCK, &mask, nullptr); + sigprocmask(0, nullptr, &mask); // NOLINT(concurrency-mt-unsafe) // ok in newly created process + sigprocmask(SIG_UNBLOCK, &mask, nullptr); // NOLINT(concurrency-mt-unsafe) // ok in newly created process execvp(editor.c_str(), argv); - rx.print("Cannot execute %s: %s\n", editor.c_str(), errnoToString(errno).c_str()); + rx.print("Cannot execute %s: %s\n", editor.c_str(), errnoToString().c_str()); _exit(-1); } @@ -309,7 +338,7 @@ int ReplxxLineReader::executeEditor(const std::string & path) if (errno == EINTR) continue; - rx.print("Cannot waitpid: %s\n", errnoToString(errno).c_str()); + rx.print("Cannot waitpid: %s\n", errnoToString().c_str()); return -1; } else @@ -324,7 +353,7 @@ void ReplxxLineReader::openEditor() int fd = ::mkstemps(filename, 4); if (-1 == fd) { - rx.print("Cannot create temporary file to edit query: %s\n", errnoToString(errno).c_str()); + rx.print("Cannot create temporary file to edit query: %s\n", errnoToString().c_str()); return; } @@ -338,7 +367,7 @@ void ReplxxLineReader::openEditor() ssize_t res = ::write(fd, begin + bytes_written, offset - bytes_written); if ((-1 == res || 0 == res) && errno != EINTR) { - rx.print("Cannot write to temporary query file %s: %s\n", filename, errnoToString(errno).c_str()); + rx.print("Cannot write to temporary query file %s: %s\n", filename, errnoToString().c_str()); break; } bytes_written += res; @@ -346,7 +375,7 @@ void ReplxxLineReader::openEditor() if (0 != ::close(fd)) { - rx.print("Cannot close temporary query file %s: %s\n", filename, errnoToString(errno).c_str()); + rx.print("Cannot close temporary query file %s: %s\n", filename, errnoToString().c_str()); return; } @@ -364,7 +393,7 @@ void ReplxxLineReader::openEditor() } catch (...) { - rx.print("Cannot read from temporary query file %s: %s\n", filename, errnoToString(errno).c_str()); + rx.print("Cannot read from temporary query file %s: %s\n", filename, errnoToString().c_str()); return; } } @@ -373,7 +402,7 @@ void ReplxxLineReader::openEditor() enableBracketedPaste(); if (0 != ::unlink(filename)) - rx.print("Cannot remove temporary query file %s: %s\n", filename, errnoToString(errno).c_str()); + rx.print("Cannot remove temporary query file %s: %s\n", filename, errnoToString().c_str()); } void ReplxxLineReader::enableBracketedPaste() diff --git a/base/base/StringRef.h b/base/base/StringRef.h index 459172eb107..5ee197021ca 100644 --- a/base/base/StringRef.h +++ b/base/base/StringRef.h @@ -55,18 +55,12 @@ struct StringRef bool empty() const { return size == 0; } std::string toString() const { return std::string(data, size); } - explicit operator std::string() const { return toString(); } - std::string_view toView() const { return std::string_view(data, size); } + std::string_view toView() const { return std::string_view(data, size); } constexpr explicit operator std::string_view() const { return std::string_view(data, size); } }; -/// Here constexpr doesn't implicate inline, see https://www.viva64.com/en/w/v1043/ -/// nullptr can't be used because the StringRef values are used in SipHash's pointer arithmetic -/// and the UBSan thinks that something like nullptr + 8 is UB. -constexpr const inline char empty_string_ref_addr{}; -constexpr const inline StringRef EMPTY_STRING_REF{&empty_string_ref_addr, 0}; using StringRefs = std::vector; @@ -228,7 +222,7 @@ inline UInt64 shiftMix(UInt64 val) return val ^ (val >> 47); } -inline UInt64 rotateByAtLeast1(UInt64 val, int shift) +inline UInt64 rotateByAtLeast1(UInt64 val, UInt8 shift) { return (val >> shift) | (val << (64 - shift)); } @@ -250,7 +244,7 @@ inline size_t hashLessThan8(const char * data, size_t size) uint8_t b = data[size >> 1]; uint8_t c = data[size - 1]; uint32_t y = static_cast(a) + (static_cast(b) << 8); - uint32_t z = size + (static_cast(c) << 2); + uint32_t z = static_cast(size) + (static_cast(c) << 2); return shiftMix(y * k2 ^ z * k3) * k2; } @@ -263,7 +257,7 @@ inline size_t hashLessThan16(const char * data, size_t size) { UInt64 a = unalignedLoad(data); UInt64 b = unalignedLoad(data + size - 8); - return hashLen16(a, rotateByAtLeast1(b + size, size)) ^ b; + return hashLen16(a, rotateByAtLeast1(b + size, static_cast(size))) ^ b; } return hashLessThan8(data, size); diff --git a/base/base/arithmeticOverflow.h b/base/base/arithmeticOverflow.h index 9a0e27505e1..d7242058658 100644 --- a/base/base/arithmeticOverflow.h +++ b/base/base/arithmeticOverflow.h @@ -3,6 +3,7 @@ #include #include +// NOLINTBEGIN(google-runtime-int) namespace common { @@ -206,3 +207,5 @@ namespace common return false; } } + +// NOLINTEND(google-runtime-int) diff --git a/base/base/bit_cast.h b/base/base/bit_cast.h index 5b4b0931b62..d1246b45590 100644 --- a/base/base/bit_cast.h +++ b/base/base/bit_cast.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/base/base/defines.h b/base/base/defines.h index c8c408b9c93..671253ed9e8 100644 --- a/base/base/defines.h +++ b/base/base/defines.h @@ -143,8 +143,8 @@ /// Macros for suppressing TSA warnings for specific reads/writes (instead of suppressing it for the whole function) /// Consider adding a comment before using these macros. -# define TSA_SUPPRESS_WARNING_FOR_READ(x) [&]() TSA_NO_THREAD_SAFETY_ANALYSIS -> const auto & { return (x); }() -# define TSA_SUPPRESS_WARNING_FOR_WRITE(x) [&]() TSA_NO_THREAD_SAFETY_ANALYSIS -> auto & { return (x); }() +# define TSA_SUPPRESS_WARNING_FOR_READ(x) ([&]() TSA_NO_THREAD_SAFETY_ANALYSIS -> const auto & { return (x); }()) +# define TSA_SUPPRESS_WARNING_FOR_WRITE(x) ([&]() TSA_NO_THREAD_SAFETY_ANALYSIS -> auto & { return (x); }()) /// This macro is useful when only one thread writes to a member /// and you want to read this member from the same thread without locking a mutex. diff --git a/base/base/errnoToString.cpp b/base/base/errnoToString.cpp index c6d1139a9de..b73979f9e07 100644 --- a/base/base/errnoToString.cpp +++ b/base/base/errnoToString.cpp @@ -3,10 +3,11 @@ #include -std::string errnoToString(int code, int the_errno) +std::string errnoToString(int the_errno) { const size_t buf_size = 128; char buf[buf_size]; + #ifndef _GNU_SOURCE int rc = strerror_r(the_errno, buf, buf_size); #ifdef OS_DARWIN @@ -15,7 +16,7 @@ std::string errnoToString(int code, int the_errno) if (rc != 0) #endif { - std::string tmp = std::to_string(code); + std::string tmp = std::to_string(the_errno); const char * code_str = tmp.c_str(); const char * unknown_message = "Unknown error "; strcpy(buf, unknown_message); @@ -23,7 +24,6 @@ std::string errnoToString(int code, int the_errno) } return fmt::format("errno: {}, strerror: {}", the_errno, buf); #else - (void)code; return fmt::format("errno: {}, strerror: {}", the_errno, strerror_r(the_errno, buf, sizeof(buf))); #endif } diff --git a/base/base/errnoToString.h b/base/base/errnoToString.h index fd5f81ec2c7..50cff786f37 100644 --- a/base/base/errnoToString.h +++ b/base/base/errnoToString.h @@ -3,4 +3,4 @@ #include #include -std::string errnoToString(int code, int the_errno = errno); +std::string errnoToString(int the_errno = errno); diff --git a/base/base/extended_types.h b/base/base/extended_types.h index 7deb8e17b8e..b58df45a97e 100644 --- a/base/base/extended_types.h +++ b/base/base/extended_types.h @@ -5,7 +5,6 @@ #include #include - using Int128 = wide::integer<128, signed>; using UInt128 = wide::integer<128, unsigned>; using Int256 = wide::integer<256, signed>; @@ -18,7 +17,7 @@ static_assert(sizeof(UInt256) == 32); /// (std::common_type), are "set in stone". Attempting to specialize them causes undefined behavior. /// So instead of using the std type_traits, we use our own version which allows extension. template -struct is_signed +struct is_signed // NOLINT(readability-identifier-naming) { static constexpr bool value = std::is_signed_v; }; @@ -30,7 +29,7 @@ template inline constexpr bool is_signed_v = is_signed::value; template -struct is_unsigned +struct is_unsigned // NOLINT(readability-identifier-naming) { static constexpr bool value = std::is_unsigned_v; }; @@ -51,7 +50,7 @@ template concept is_integer = template concept is_floating_point = std::is_floating_point_v; template -struct is_arithmetic +struct is_arithmetic // NOLINT(readability-identifier-naming) { static constexpr bool value = std::is_arithmetic_v; }; @@ -66,9 +65,9 @@ template inline constexpr bool is_arithmetic_v = is_arithmetic::value; template -struct make_unsigned +struct make_unsigned // NOLINT(readability-identifier-naming) { - typedef std::make_unsigned_t type; + using type = std::make_unsigned_t; }; template <> struct make_unsigned { using type = UInt128; }; @@ -79,9 +78,9 @@ template <> struct make_unsigned { using type = UInt256; }; template using make_unsigned_t = typename make_unsigned::type; template -struct make_signed +struct make_signed // NOLINT(readability-identifier-naming) { - typedef std::make_signed_t type; + using type = std::make_signed_t; }; template <> struct make_signed { using type = Int128; }; @@ -92,7 +91,7 @@ template <> struct make_signed { using type = Int256; }; template using make_signed_t = typename make_signed::type; template -struct is_big_int +struct is_big_int // NOLINT(readability-identifier-naming) { static constexpr bool value = false; }; @@ -104,4 +103,3 @@ template <> struct is_big_int { static constexpr bool value = true; }; template inline constexpr bool is_big_int_v = is_big_int::value; - diff --git a/base/base/find_symbols.h b/base/base/find_symbols.h index b28749afda6..83f53773ae7 100644 --- a/base/base/find_symbols.h +++ b/base/base/find_symbols.h @@ -15,7 +15,7 @@ * * Allow to search for next character from the set of 'symbols...' in a string. * It is similar to 'strpbrk', 'strcspn' (and 'strchr', 'memchr' in the case of one symbol and '\0'), - * but with the following differencies: + * but with the following differences: * - works with any memory ranges, including containing zero bytes; * - doesn't require terminating zero byte: end of memory range is passed explicitly; * - if not found, returns pointer to end instead of nullptr; diff --git a/base/base/getThreadId.cpp b/base/base/getThreadId.cpp index 21167b19d32..b6c22bb8856 100644 --- a/base/base/getThreadId.cpp +++ b/base/base/getThreadId.cpp @@ -22,7 +22,7 @@ uint64_t getThreadId() #if defined(OS_ANDROID) current_tid = gettid(); #elif defined(OS_LINUX) - current_tid = syscall(SYS_gettid); /// This call is always successful. - man gettid + current_tid = static_cast(syscall(SYS_gettid)); /// This call is always successful. - man gettid #elif defined(OS_FREEBSD) current_tid = pthread_getthreadid_np(); #elif defined(OS_SUNOS) diff --git a/base/base/iostream_debug_helpers.h b/base/base/iostream_debug_helpers.h index 3a3f1a741ad..db974c911df 100644 --- a/base/base/iostream_debug_helpers.h +++ b/base/base/iostream_debug_helpers.h @@ -120,6 +120,7 @@ Out & dumpDispatchPriorities(Out & out, T && x, std::decay_t(out, x); } +// NOLINTNEXTLINE(google-explicit-constructor) struct LowPriority { LowPriority(void *) {} }; template diff --git a/base/base/itoa.h b/base/base/itoa.h index da7c2ffc73e..5e0b18d50c0 100644 --- a/base/base/itoa.h +++ b/base/base/itoa.h @@ -91,10 +91,10 @@ template using DivisionBy10PowN = typename SelectType < N, - Division, /// divide by 10 - Division, /// divide by 100 - Division, /// divide by 10000 - Division /// divide by 100000000 + Division, /// divide by 10 + Division, /// divide by 100 + Division, /// divide by 10000 + Division /// divide by 100000000 >::Result; template @@ -352,7 +352,7 @@ static inline char * writeUIntText(T x, char * p) static_assert(is_unsigned_v); int len = digits10(x); - auto pp = p + len; + auto * pp = p + len; while (x >= 100) { const auto i = x % 100; diff --git a/base/base/scope_guard.h b/base/base/scope_guard.h index 3d8f8ba0fe0..8524beac7ea 100644 --- a/base/base/scope_guard.h +++ b/base/base/scope_guard.h @@ -5,13 +5,13 @@ #include template -class [[nodiscard]] basic_scope_guard +class [[nodiscard]] BasicScopeGuard { public: - constexpr basic_scope_guard() = default; - constexpr basic_scope_guard(basic_scope_guard && src) : function{src.release()} {} + constexpr BasicScopeGuard() = default; + constexpr BasicScopeGuard(BasicScopeGuard && src) : function{src.release()} {} // NOLINT(hicpp-noexcept-move, performance-noexcept-move-constructor) - constexpr basic_scope_guard & operator=(basic_scope_guard && src) + constexpr BasicScopeGuard & operator=(BasicScopeGuard && src) // NOLINT(hicpp-noexcept-move, performance-noexcept-move-constructor) { if (this != &src) { @@ -23,11 +23,11 @@ public: template requires std::is_convertible_v - constexpr basic_scope_guard(basic_scope_guard && src) : function{src.release()} {} + constexpr BasicScopeGuard(BasicScopeGuard && src) : function{src.release()} {} // NOLINT(google-explicit-constructor) template requires std::is_convertible_v - constexpr basic_scope_guard & operator=(basic_scope_guard && src) + constexpr BasicScopeGuard & operator=(BasicScopeGuard && src) { if (this != &src) { @@ -39,13 +39,13 @@ public: template requires std::is_convertible_v - constexpr basic_scope_guard(const G & function_) : function{function_} {} + constexpr BasicScopeGuard(const G & function_) : function{function_} {} // NOLINT(google-explicit-constructor) template requires std::is_convertible_v - constexpr basic_scope_guard(G && function_) : function{std::move(function_)} {} + constexpr BasicScopeGuard(G && function_) : function{std::move(function_)} {} // NOLINT(google-explicit-constructor, bugprone-forwarding-reference-overload, bugprone-move-forwarding-reference) - ~basic_scope_guard() { invoke(); } + ~BasicScopeGuard() { invoke(); } static constexpr bool is_nullable = std::is_constructible_v; @@ -70,7 +70,7 @@ public: template requires std::is_convertible_v - basic_scope_guard & join(basic_scope_guard && other) + BasicScopeGuard & join(BasicScopeGuard && other) { if (other.function) { @@ -102,14 +102,13 @@ private: F function = F{}; }; -using scope_guard = basic_scope_guard>; +using scope_guard = BasicScopeGuard>; template -inline basic_scope_guard make_scope_guard(F && function_) { return std::forward(function_); } +inline BasicScopeGuard make_scope_guard(F && function_) { return std::forward(function_); } #define SCOPE_EXIT_CONCAT(n, ...) \ const auto scope_exit##n = make_scope_guard([&] { __VA_ARGS__; }) #define SCOPE_EXIT_FWD(n, ...) SCOPE_EXIT_CONCAT(n, __VA_ARGS__) #define SCOPE_EXIT(...) SCOPE_EXIT_FWD(__LINE__, __VA_ARGS__) - diff --git a/base/base/setTerminalEcho.cpp b/base/base/setTerminalEcho.cpp index 2f478f10933..759dca19119 100644 --- a/base/base/setTerminalEcho.cpp +++ b/base/base/setTerminalEcho.cpp @@ -16,7 +16,7 @@ void setTerminalEcho(bool enable) struct termios tty{}; if (0 != tcgetattr(STDIN_FILENO, &tty)) - throw std::runtime_error(std::string("setTerminalEcho failed get: ") + errnoToString(errno)); + throw std::runtime_error(std::string("setTerminalEcho failed get: ") + errnoToString()); if (enable) tty.c_lflag |= ECHO; @@ -24,5 +24,5 @@ void setTerminalEcho(bool enable) tty.c_lflag &= ~ECHO; if (0 != tcsetattr(STDIN_FILENO, TCSANOW, &tty)) - throw std::runtime_error(std::string("setTerminalEcho failed set: ") + errnoToString(errno)); + throw std::runtime_error(std::string("setTerminalEcho failed set: ") + errnoToString()); } diff --git a/base/base/shift10.cpp b/base/base/shift10.cpp index db2f4a6963e..5429bcc23b2 100644 --- a/base/base/shift10.cpp +++ b/base/base/shift10.cpp @@ -14,37 +14,37 @@ static T shift10Impl(T x, int exponent) static const long double powers10[] = { 1e-323L, 1e-322L, 1e-321L, 1e-320L, 1e-319L, 1e-318L, 1e-317L, 1e-316L, 1e-315L, 1e-314L, 1e-313L, 1e-312L, 1e-311L, - 1e-310L,1e-309L,1e-308L,1e-307L,1e-306L,1e-305L,1e-304L,1e-303L,1e-302L,1e-301L,1e-300L,1e-299L,1e-298L,1e-297L,1e-296L,1e-295L,1e-294L,1e-293L,1e-292L,1e-291L, - 1e-290L,1e-289L,1e-288L,1e-287L,1e-286L,1e-285L,1e-284L,1e-283L,1e-282L,1e-281L,1e-280L,1e-279L,1e-278L,1e-277L,1e-276L,1e-275L,1e-274L,1e-273L,1e-272L,1e-271L, - 1e-270L,1e-269L,1e-268L,1e-267L,1e-266L,1e-265L,1e-264L,1e-263L,1e-262L,1e-261L,1e-260L,1e-259L,1e-258L,1e-257L,1e-256L,1e-255L,1e-254L,1e-253L,1e-252L,1e-251L, - 1e-250L,1e-249L,1e-248L,1e-247L,1e-246L,1e-245L,1e-244L,1e-243L,1e-242L,1e-241L,1e-240L,1e-239L,1e-238L,1e-237L,1e-236L,1e-235L,1e-234L,1e-233L,1e-232L,1e-231L, - 1e-230L,1e-229L,1e-228L,1e-227L,1e-226L,1e-225L,1e-224L,1e-223L,1e-222L,1e-221L,1e-220L,1e-219L,1e-218L,1e-217L,1e-216L,1e-215L,1e-214L,1e-213L,1e-212L,1e-211L, - 1e-210L,1e-209L,1e-208L,1e-207L,1e-206L,1e-205L,1e-204L,1e-203L,1e-202L,1e-201L,1e-200L,1e-199L,1e-198L,1e-197L,1e-196L,1e-195L,1e-194L,1e-193L,1e-192L,1e-191L, - 1e-190L,1e-189L,1e-188L,1e-187L,1e-186L,1e-185L,1e-184L,1e-183L,1e-182L,1e-181L,1e-180L,1e-179L,1e-178L,1e-177L,1e-176L,1e-175L,1e-174L,1e-173L,1e-172L,1e-171L, - 1e-170L,1e-169L,1e-168L,1e-167L,1e-166L,1e-165L,1e-164L,1e-163L,1e-162L,1e-161L,1e-160L,1e-159L,1e-158L,1e-157L,1e-156L,1e-155L,1e-154L,1e-153L,1e-152L,1e-151L, - 1e-150L,1e-149L,1e-148L,1e-147L,1e-146L,1e-145L,1e-144L,1e-143L,1e-142L,1e-141L,1e-140L,1e-139L,1e-138L,1e-137L,1e-136L,1e-135L,1e-134L,1e-133L,1e-132L,1e-131L, - 1e-130L,1e-129L,1e-128L,1e-127L,1e-126L,1e-125L,1e-124L,1e-123L,1e-122L,1e-121L,1e-120L,1e-119L,1e-118L,1e-117L,1e-116L,1e-115L,1e-114L,1e-113L,1e-112L,1e-111L, - 1e-110L,1e-109L,1e-108L,1e-107L,1e-106L,1e-105L,1e-104L,1e-103L,1e-102L,1e-101L,1e-100L,1e-99L,1e-98L,1e-97L,1e-96L,1e-95L,1e-94L,1e-93L,1e-92L,1e-91L,1e-90L, - 1e-89L,1e-88L,1e-87L,1e-86L,1e-85L,1e-84L,1e-83L,1e-82L,1e-81L,1e-80L,1e-79L,1e-78L,1e-77L,1e-76L,1e-75L,1e-74L,1e-73L,1e-72L,1e-71L,1e-70, - 1e-69L,1e-68L,1e-67L,1e-66L,1e-65L,1e-64L,1e-63L,1e-62L,1e-61L,1e-60L,1e-59L,1e-58L,1e-57L,1e-56L,1e-55L,1e-54L,1e-53L,1e-52L,1e-51L,1e-50, - 1e-49L,1e-48L,1e-47L,1e-46L,1e-45L,1e-44L,1e-43L,1e-42L,1e-41L,1e-40L,1e-39L,1e-38L,1e-37L,1e-36L,1e-35L,1e-34L,1e-33L,1e-32L,1e-31L,1e-30, - 1e-29L,1e-28L,1e-27L,1e-26L,1e-25L,1e-24L,1e-23L,1e-22L,1e-21L,1e-20L,1e-19L,1e-18L,1e-17L,1e-16L,1e-15L,1e-14L,1e-13L,1e-12L,1e-11L,1e-10, - 1e-9L,1e-8L,1e-7L,1e-6L,1e-5L,1e-4L,1e-3L,1e-2L,1e-1L,1e0L,1e1L,1e2L,1e3L,1e4L,1e5L,1e6L,1e7L,1e8L,1e9L,1e10, - 1e11L,1e12L,1e13L,1e14L,1e15L,1e16L,1e17L,1e18L,1e19L,1e20L,1e21L,1e22L,1e23L,1e24L,1e25L,1e26L,1e27L,1e28L,1e29L,1e30, - 1e31L,1e32L,1e33L,1e34L,1e35L,1e36L,1e37L,1e38L,1e39L,1e40L,1e41L,1e42L,1e43L,1e44L,1e45L,1e46L,1e47L,1e48L,1e49L,1e50, - 1e51L,1e52L,1e53L,1e54L,1e55L,1e56L,1e57L,1e58L,1e59L,1e60L,1e61L,1e62L,1e63L,1e64L,1e65L,1e66L,1e67L,1e68L,1e69L,1e70, - 1e71L,1e72L,1e73L,1e74L,1e75L,1e76L,1e77L,1e78L,1e79L,1e80L,1e81L,1e82L,1e83L,1e84L,1e85L,1e86L,1e87L,1e88L,1e89L,1e90, - 1e91L,1e92L,1e93L,1e94L,1e95L,1e96L,1e97L,1e98L,1e99L,1e100L,1e101L,1e102L,1e103L,1e104L,1e105L,1e106L,1e107L,1e108L,1e109L,1e110, - 1e111L,1e112L,1e113L,1e114L,1e115L,1e116L,1e117L,1e118L,1e119L,1e120L,1e121L,1e122L,1e123L,1e124L,1e125L,1e126L,1e127L,1e128L,1e129L,1e130, - 1e131L,1e132L,1e133L,1e134L,1e135L,1e136L,1e137L,1e138L,1e139L,1e140L,1e141L,1e142L,1e143L,1e144L,1e145L,1e146L,1e147L,1e148L,1e149L,1e150, - 1e151L,1e152L,1e153L,1e154L,1e155L,1e156L,1e157L,1e158L,1e159L,1e160L,1e161L,1e162L,1e163L,1e164L,1e165L,1e166L,1e167L,1e168L,1e169L,1e170, - 1e171L,1e172L,1e173L,1e174L,1e175L,1e176L,1e177L,1e178L,1e179L,1e180L,1e181L,1e182L,1e183L,1e184L,1e185L,1e186L,1e187L,1e188L,1e189L,1e190, - 1e191L,1e192L,1e193L,1e194L,1e195L,1e196L,1e197L,1e198L,1e199L,1e200L,1e201L,1e202L,1e203L,1e204L,1e205L,1e206L,1e207L,1e208L,1e209L,1e210, - 1e211L,1e212L,1e213L,1e214L,1e215L,1e216L,1e217L,1e218L,1e219L,1e220L,1e221L,1e222L,1e223L,1e224L,1e225L,1e226L,1e227L,1e228L,1e229L,1e230, - 1e231L,1e232L,1e233L,1e234L,1e235L,1e236L,1e237L,1e238L,1e239L,1e240L,1e241L,1e242L,1e243L,1e244L,1e245L,1e246L,1e247L,1e248L,1e249L,1e250, - 1e251L,1e252L,1e253L,1e254L,1e255L,1e256L,1e257L,1e258L,1e259L,1e260L,1e261L,1e262L,1e263L,1e264L,1e265L,1e266L,1e267L,1e268L,1e269L,1e270, - 1e271L,1e272L,1e273L,1e274L,1e275L,1e276L,1e277L,1e278L,1e279L,1e280L,1e281L,1e282L,1e283L,1e284L,1e285L,1e286L,1e287L,1e288L,1e289L,1e290, - 1e291L,1e292L,1e293L,1e294L,1e295L,1e296L,1e297L,1e298L,1e299L,1e300L,1e301L,1e302L,1e303L,1e304L,1e305L,1e306L,1e307L,1e308L + 1e-310L, 1e-309L, 1e-308L, 1e-307L, 1e-306L, 1e-305L, 1e-304L, 1e-303L, 1e-302L, 1e-301L, 1e-300L, 1e-299L, 1e-298L, 1e-297L, 1e-296L, 1e-295L, 1e-294L, 1e-293L, 1e-292L, 1e-291L, + 1e-290L, 1e-289L, 1e-288L, 1e-287L, 1e-286L, 1e-285L, 1e-284L, 1e-283L, 1e-282L, 1e-281L, 1e-280L, 1e-279L, 1e-278L, 1e-277L, 1e-276L, 1e-275L, 1e-274L, 1e-273L, 1e-272L, 1e-271L, + 1e-270L, 1e-269L, 1e-268L, 1e-267L, 1e-266L, 1e-265L, 1e-264L, 1e-263L, 1e-262L, 1e-261L, 1e-260L, 1e-259L, 1e-258L, 1e-257L, 1e-256L, 1e-255L, 1e-254L, 1e-253L, 1e-252L, 1e-251L, + 1e-250L, 1e-249L, 1e-248L, 1e-247L, 1e-246L, 1e-245L, 1e-244L, 1e-243L, 1e-242L, 1e-241L, 1e-240L, 1e-239L, 1e-238L, 1e-237L, 1e-236L, 1e-235L, 1e-234L, 1e-233L, 1e-232L, 1e-231L, + 1e-230L, 1e-229L, 1e-228L, 1e-227L, 1e-226L, 1e-225L, 1e-224L, 1e-223L, 1e-222L, 1e-221L, 1e-220L, 1e-219L, 1e-218L, 1e-217L, 1e-216L, 1e-215L, 1e-214L, 1e-213L, 1e-212L, 1e-211L, + 1e-210L, 1e-209L, 1e-208L, 1e-207L, 1e-206L, 1e-205L, 1e-204L, 1e-203L, 1e-202L, 1e-201L, 1e-200L, 1e-199L, 1e-198L, 1e-197L, 1e-196L, 1e-195L, 1e-194L, 1e-193L, 1e-192L, 1e-191L, + 1e-190L, 1e-189L, 1e-188L, 1e-187L, 1e-186L, 1e-185L, 1e-184L, 1e-183L, 1e-182L, 1e-181L, 1e-180L, 1e-179L, 1e-178L, 1e-177L, 1e-176L, 1e-175L, 1e-174L, 1e-173L, 1e-172L, 1e-171L, + 1e-170L, 1e-169L, 1e-168L, 1e-167L, 1e-166L, 1e-165L, 1e-164L, 1e-163L, 1e-162L, 1e-161L, 1e-160L, 1e-159L, 1e-158L, 1e-157L, 1e-156L, 1e-155L, 1e-154L, 1e-153L, 1e-152L, 1e-151L, + 1e-150L, 1e-149L, 1e-148L, 1e-147L, 1e-146L, 1e-145L, 1e-144L, 1e-143L, 1e-142L, 1e-141L, 1e-140L, 1e-139L, 1e-138L, 1e-137L, 1e-136L, 1e-135L, 1e-134L, 1e-133L, 1e-132L, 1e-131L, + 1e-130L, 1e-129L, 1e-128L, 1e-127L, 1e-126L, 1e-125L, 1e-124L, 1e-123L, 1e-122L, 1e-121L, 1e-120L, 1e-119L, 1e-118L, 1e-117L, 1e-116L, 1e-115L, 1e-114L, 1e-113L, 1e-112L, 1e-111L, + 1e-110L, 1e-109L, 1e-108L, 1e-107L, 1e-106L, 1e-105L, 1e-104L, 1e-103L, 1e-102L, 1e-101L, 1e-100L, 1e-99L, 1e-98L, 1e-97L, 1e-96L, 1e-95L, 1e-94L, 1e-93L, 1e-92L, 1e-91L, 1e-90L, + 1e-89L, 1e-88L, 1e-87L, 1e-86L, 1e-85L, 1e-84L, 1e-83L, 1e-82L, 1e-81L, 1e-80L, 1e-79L, 1e-78L, 1e-77L, 1e-76L, 1e-75L, 1e-74L, 1e-73L, 1e-72L, 1e-71L, 1e-70, + 1e-69L, 1e-68L, 1e-67L, 1e-66L, 1e-65L, 1e-64L, 1e-63L, 1e-62L, 1e-61L, 1e-60L, 1e-59L, 1e-58L, 1e-57L, 1e-56L, 1e-55L, 1e-54L, 1e-53L, 1e-52L, 1e-51L, 1e-50, + 1e-49L, 1e-48L, 1e-47L, 1e-46L, 1e-45L, 1e-44L, 1e-43L, 1e-42L, 1e-41L, 1e-40L, 1e-39L, 1e-38L, 1e-37L, 1e-36L, 1e-35L, 1e-34L, 1e-33L, 1e-32L, 1e-31L, 1e-30, + 1e-29L, 1e-28L, 1e-27L, 1e-26L, 1e-25L, 1e-24L, 1e-23L, 1e-22L, 1e-21L, 1e-20L, 1e-19L, 1e-18L, 1e-17L, 1e-16L, 1e-15L, 1e-14L, 1e-13L, 1e-12L, 1e-11L, 1e-10, + 1e-9L, 1e-8L, 1e-7L, 1e-6L, 1e-5L, 1e-4L, 1e-3L, 1e-2L, 1e-1L, 1e0L, 1e1L, 1e2L, 1e3L, 1e4L, 1e5L, 1e6L, 1e7L, 1e8L, 1e9L, 1e10, + 1e11L, 1e12L, 1e13L, 1e14L, 1e15L, 1e16L, 1e17L, 1e18L, 1e19L, 1e20L, 1e21L, 1e22L, 1e23L, 1e24L, 1e25L, 1e26L, 1e27L, 1e28L, 1e29L, 1e30, + 1e31L, 1e32L, 1e33L, 1e34L, 1e35L, 1e36L, 1e37L, 1e38L, 1e39L, 1e40L, 1e41L, 1e42L, 1e43L, 1e44L, 1e45L, 1e46L, 1e47L, 1e48L, 1e49L, 1e50, + 1e51L, 1e52L, 1e53L, 1e54L, 1e55L, 1e56L, 1e57L, 1e58L, 1e59L, 1e60L, 1e61L, 1e62L, 1e63L, 1e64L, 1e65L, 1e66L, 1e67L, 1e68L, 1e69L, 1e70, + 1e71L, 1e72L, 1e73L, 1e74L, 1e75L, 1e76L, 1e77L, 1e78L, 1e79L, 1e80L, 1e81L, 1e82L, 1e83L, 1e84L, 1e85L, 1e86L, 1e87L, 1e88L, 1e89L, 1e90, + 1e91L, 1e92L, 1e93L, 1e94L, 1e95L, 1e96L, 1e97L, 1e98L, 1e99L, 1e100L, 1e101L, 1e102L, 1e103L, 1e104L, 1e105L, 1e106L, 1e107L, 1e108L, 1e109L, 1e110, + 1e111L, 1e112L, 1e113L, 1e114L, 1e115L, 1e116L, 1e117L, 1e118L, 1e119L, 1e120L, 1e121L, 1e122L, 1e123L, 1e124L, 1e125L, 1e126L, 1e127L, 1e128L, 1e129L, 1e130, + 1e131L, 1e132L, 1e133L, 1e134L, 1e135L, 1e136L, 1e137L, 1e138L, 1e139L, 1e140L, 1e141L, 1e142L, 1e143L, 1e144L, 1e145L, 1e146L, 1e147L, 1e148L, 1e149L, 1e150, + 1e151L, 1e152L, 1e153L, 1e154L, 1e155L, 1e156L, 1e157L, 1e158L, 1e159L, 1e160L, 1e161L, 1e162L, 1e163L, 1e164L, 1e165L, 1e166L, 1e167L, 1e168L, 1e169L, 1e170, + 1e171L, 1e172L, 1e173L, 1e174L, 1e175L, 1e176L, 1e177L, 1e178L, 1e179L, 1e180L, 1e181L, 1e182L, 1e183L, 1e184L, 1e185L, 1e186L, 1e187L, 1e188L, 1e189L, 1e190, + 1e191L, 1e192L, 1e193L, 1e194L, 1e195L, 1e196L, 1e197L, 1e198L, 1e199L, 1e200L, 1e201L, 1e202L, 1e203L, 1e204L, 1e205L, 1e206L, 1e207L, 1e208L, 1e209L, 1e210, + 1e211L, 1e212L, 1e213L, 1e214L, 1e215L, 1e216L, 1e217L, 1e218L, 1e219L, 1e220L, 1e221L, 1e222L, 1e223L, 1e224L, 1e225L, 1e226L, 1e227L, 1e228L, 1e229L, 1e230, + 1e231L, 1e232L, 1e233L, 1e234L, 1e235L, 1e236L, 1e237L, 1e238L, 1e239L, 1e240L, 1e241L, 1e242L, 1e243L, 1e244L, 1e245L, 1e246L, 1e247L, 1e248L, 1e249L, 1e250, + 1e251L, 1e252L, 1e253L, 1e254L, 1e255L, 1e256L, 1e257L, 1e258L, 1e259L, 1e260L, 1e261L, 1e262L, 1e263L, 1e264L, 1e265L, 1e266L, 1e267L, 1e268L, 1e269L, 1e270, + 1e271L, 1e272L, 1e273L, 1e274L, 1e275L, 1e276L, 1e277L, 1e278L, 1e279L, 1e280L, 1e281L, 1e282L, 1e283L, 1e284L, 1e285L, 1e286L, 1e287L, 1e288L, 1e289L, 1e290, + 1e291L, 1e292L, 1e293L, 1e294L, 1e295L, 1e296L, 1e297L, 1e298L, 1e299L, 1e300L, 1e301L, 1e302L, 1e303L, 1e304L, 1e305L, 1e306L, 1e307L, 1e308L }; if (unlikely(exponent < min_exponent)) /// Note: there are some values below MIN_EXPONENT that is greater than zero. @@ -52,7 +52,7 @@ static T shift10Impl(T x, int exponent) else if (unlikely(exponent > max_exponent)) x *= std::numeric_limits::infinity(); /// Multiplying to keep the sign of infinity. else - x *= powers10[exponent - min_exponent]; + x *= static_cast(powers10[exponent - min_exponent]); return x; } @@ -68,12 +68,12 @@ float shift10(float x, int exponent) return shift10Impl(x, exponent); } -double shift10(UInt64 x, int exponent) +long double shift10(UInt64 x, int exponent) { return shift10Impl(static_cast(x), exponent); } -double shift10(Int64 x, int exponent) +long double shift10(Int64 x, int exponent) { return shift10Impl(static_cast(x), exponent); } diff --git a/base/base/shift10.h b/base/base/shift10.h index 0f54d1f2988..2332194591b 100644 --- a/base/base/shift10.h +++ b/base/base/shift10.h @@ -12,5 +12,5 @@ double shift10(double x, int exponent); float shift10(float x, int exponent); -double shift10(UInt64 x, int exponent); -double shift10(Int64 x, int exponent); +long double shift10(UInt64 x, int exponent); +long double shift10(Int64 x, int exponent); diff --git a/base/base/sort.h b/base/base/sort.h index 589469fffaa..912545979dc 100644 --- a/base/base/sort.h +++ b/base/base/sort.h @@ -14,7 +14,7 @@ template class DebugLessComparator { public: - constexpr DebugLessComparator(Comparator & cmp_) + constexpr DebugLessComparator(Comparator & cmp_) // NOLINT(google-explicit-constructor) : cmp(cmp_) {} diff --git a/base/base/strong_typedef.h b/base/base/strong_typedef.h index c9ea30b73fd..2ddea6412f5 100644 --- a/base/base/strong_typedef.h +++ b/base/base/strong_typedef.h @@ -34,8 +34,10 @@ public: template ::type> Self & operator=(T && rhs) { t = std::move(rhs); return *this;} + // NOLINTBEGIN(google-explicit-constructor) operator const T & () const { return t; } operator T & () { return t; } + // NOLINTEND(google-explicit-constructor) bool operator==(const Self & rhs) const { return t == rhs.t; } bool operator<(const Self & rhs) const { return t < rhs.t; } @@ -58,7 +60,10 @@ namespace std }; } +// NOLINTBEGIN(bugprone-macro-parentheses) + #define STRONG_TYPEDEF(T, D) \ struct D ## Tag {}; \ using D = StrongTypedef; \ +// NOLINTEND(bugprone-macro-parentheses) diff --git a/base/base/terminalColors.cpp b/base/base/terminalColors.cpp index 4c2013c6499..fbb0e28a193 100644 --- a/base/base/terminalColors.cpp +++ b/base/base/terminalColors.cpp @@ -11,12 +11,12 @@ std::string setColor(UInt64 hash) /// It still looks awesome. UInt8 y = 128; - UInt8 cb = hash % 256; - UInt8 cr = hash / 256 % 256; + UInt8 cb = static_cast(hash % 256); + UInt8 cr = static_cast(hash / 256 % 256); - UInt8 r = std::max(0.0, std::min(255.0, y + 1.402 * (cr - 128))); - UInt8 g = std::max(0.0, std::min(255.0, y - 0.344136 * (cb - 128) - 0.714136 * (cr - 128))); - UInt8 b = std::max(0.0, std::min(255.0, y + 1.772 * (cb - 128))); + UInt8 r = static_cast(std::max(0.0, std::min(255.0, y + 1.402 * (cr - 128)))); + UInt8 g = static_cast(std::max(0.0, std::min(255.0, y - 0.344136 * (cb - 128) - 0.714136 * (cr - 128)))); + UInt8 b = static_cast(std::max(0.0, std::min(255.0, y + 1.772 * (cb - 128)))); /// ANSI escape sequence to set 24-bit foreground font color in terminal. return "\033[38;2;" + std::to_string(r) + ";" + std::to_string(g) + ";" + std::to_string(b) + "m"; diff --git a/base/base/unaligned.h b/base/base/unaligned.h index 013aa5274e9..fcaaa38f2fe 100644 --- a/base/base/unaligned.h +++ b/base/base/unaligned.h @@ -2,8 +2,47 @@ #include #include +#include +inline void reverseMemcpy(void * dst, const void * src, size_t size) +{ + uint8_t * uint_dst = reinterpret_cast(dst); + const uint8_t * uint_src = reinterpret_cast(src); + + uint_dst += size; + while (size) + { + --uint_dst; + *uint_dst = *uint_src; + ++uint_src; + --size; + } +} + +template +inline T unalignedLoadLE(const void * address) +{ + T res {}; + if constexpr (std::endian::native == std::endian::little) + memcpy(&res, address, sizeof(res)); + else + reverseMemcpy(&res, address, sizeof(res)); + return res; +} + + +template +inline void unalignedStoreLE(void * address, + const typename std::enable_if::type & src) +{ + static_assert(std::is_trivially_copyable_v); + if constexpr (std::endian::native == std::endian::little) + memcpy(address, &src, sizeof(src)); + else + reverseMemcpy(address, &src, sizeof(src)); +} + template inline T unalignedLoad(const void * address) { diff --git a/base/base/unit.h b/base/base/unit.h index 682b43512fc..1fb530be1f0 100644 --- a/base/base/unit.h +++ b/base/base/unit.h @@ -10,9 +10,11 @@ constexpr size_t GiB = 1024 * MiB; # pragma clang diagnostic ignored "-Wreserved-identifier" #endif +// NOLINTBEGIN(google-runtime-int) constexpr size_t operator"" _KiB(unsigned long long val) { return val * KiB; } constexpr size_t operator"" _MiB(unsigned long long val) { return val * MiB; } constexpr size_t operator"" _GiB(unsigned long long val) { return val * GiB; } +// NOLINTEND(google-runtime-int) #ifdef HAS_RESERVED_IDENTIFIER # pragma clang diagnostic pop diff --git a/base/base/wide_integer_impl.h b/base/base/wide_integer_impl.h index 5e32b286871..eb2edcb98ff 100644 --- a/base/base/wide_integer_impl.h +++ b/base/base/wide_integer_impl.h @@ -453,7 +453,7 @@ private: if constexpr (sizeof(T) <= sizeof(base_type)) { if (0 == idx) - return x; + return static_cast(x); } else if (idx * sizeof(base_type) < sizeof(T)) return x >> (idx * base_bits); // & std::numeric_limits::max() @@ -1239,13 +1239,13 @@ constexpr integer::operator long double() const noexcept template constexpr integer::operator double() const noexcept { - return static_cast(*this); + return static_cast(static_cast(*this)); } template constexpr integer::operator float() const noexcept { - return static_cast(*this); + return static_cast(static_cast(*this)); } // Unary operators diff --git a/base/base/wide_integer_to_string.h b/base/base/wide_integer_to_string.h index 8b794fe9bcb..160bf599516 100644 --- a/base/base/wide_integer_to_string.h +++ b/base/base/wide_integer_to_string.h @@ -51,8 +51,8 @@ struct fmt::formatter> { constexpr auto parse(format_parse_context & ctx) { - auto it = ctx.begin(); - auto end = ctx.end(); + const auto * it = ctx.begin(); + const auto * end = ctx.end(); /// Only support {}. if (it != end && *it != '}') diff --git a/base/glibc-compatibility/memcpy/memcpy.h b/base/glibc-compatibility/memcpy/memcpy.h index 9bee26a3722..0930dfb5c67 100644 --- a/base/glibc-compatibility/memcpy/memcpy.h +++ b/base/glibc-compatibility/memcpy/memcpy.h @@ -63,7 +63,7 @@ * Very large size of memcpy typically indicates suboptimal (not cache friendly) algorithms in code or unrealistic scenarios, * so we don't pay attention to using non-temporary stores. * - * On recent Intel CPUs, the presence of "erms" makes "rep movsb" the most benefitial, + * On recent Intel CPUs, the presence of "erms" makes "rep movsb" the most beneficial, * even comparing to non-temporary aligned unrolled stores even with the most wide registers. * * memcpy can be written in asm, C or C++. The latter can also use inline asm. @@ -214,4 +214,3 @@ tail: return ret; } - diff --git a/base/glibc-compatibility/musl/dup3.c b/base/glibc-compatibility/musl/dup3.c new file mode 100644 index 00000000000..4da17d4bc9f --- /dev/null +++ b/base/glibc-compatibility/musl/dup3.c @@ -0,0 +1,22 @@ +#define _GNU_SOURCE +#include +#include +#include +#include "syscall.h" + +int dup3(int old, int new, int flags) +{ + int r; +#ifdef SYS_dup2 + if (old==new) return __syscall_ret(-EINVAL); + if (flags & O_CLOEXEC) { + while ((r=__syscall(SYS_dup3, old, new, flags))==-EBUSY); + if (r!=-ENOSYS) return __syscall_ret(r); + } + while ((r=__syscall(SYS_dup2, old, new))==-EBUSY); + if (flags & O_CLOEXEC) __syscall(SYS_fcntl, new, F_SETFD, FD_CLOEXEC); +#else + while ((r=__syscall(SYS_dup3, old, new, flags))==-EBUSY); +#endif + return __syscall_ret(r); +} diff --git a/base/glibc-compatibility/musl/inotify.c b/base/glibc-compatibility/musl/inotify.c new file mode 100644 index 00000000000..df5e48b31b7 --- /dev/null +++ b/base/glibc-compatibility/musl/inotify.c @@ -0,0 +1,26 @@ +#include +#include +#include "syscall.h" + +int inotify_init() +{ + return inotify_init1(0); +} +int inotify_init1(int flags) +{ + int r = __syscall(SYS_inotify_init1, flags); +#ifdef SYS_inotify_init + if (r==-ENOSYS && !flags) r = __syscall(SYS_inotify_init); +#endif + return __syscall_ret(r); +} + +int inotify_add_watch(int fd, const char *pathname, uint32_t mask) +{ + return syscall(SYS_inotify_add_watch, fd, pathname, mask); +} + +int inotify_rm_watch(int fd, int wd) +{ + return syscall(SYS_inotify_rm_watch, fd, wd); +} diff --git a/base/pcg-random/pcg_extras.hpp b/base/pcg-random/pcg_extras.hpp index f5ba4d48849..78ce726d48b 100644 --- a/base/pcg-random/pcg_extras.hpp +++ b/base/pcg-random/pcg_extras.hpp @@ -49,6 +49,8 @@ #include #endif +// NOLINTBEGIN(readability-identifier-naming, modernize-use-using, bugprone-macro-parentheses, google-explicit-constructor) + /* * Abstractions for compiler-specific directives */ @@ -90,8 +92,6 @@ #define PCG_EMULATED_128BIT_MATH 1 #endif -// NOLINTBEGIN(*) - namespace pcg_extras { /* @@ -553,6 +553,6 @@ std::ostream& operator<<(std::ostream& out, printable_typename) { } // namespace pcg_extras -// NOLINTEND(*) +// NOLINTEND(readability-identifier-naming, modernize-use-using, bugprone-macro-parentheses, google-explicit-constructor) #endif // PCG_EXTRAS_HPP_INCLUDED diff --git a/base/pcg-random/pcg_random.hpp b/base/pcg-random/pcg_random.hpp index 94e43e1007b..db7c3d7f66c 100644 --- a/base/pcg-random/pcg_random.hpp +++ b/base/pcg-random/pcg_random.hpp @@ -101,7 +101,7 @@ #endif /* - * The pcg_extras namespace contains some support code that is likley to + * The pcg_extras namespace contains some support code that is likely to * be useful for a variety of RNGs, including: * - 128-bit int support for platforms where it isn't available natively * - bit twiddling operations diff --git a/base/pcg-random/pcg_uint128.hpp b/base/pcg-random/pcg_uint128.hpp index 1a1f61b9366..3452ba6f1c4 100644 --- a/base/pcg-random/pcg_uint128.hpp +++ b/base/pcg-random/pcg_uint128.hpp @@ -22,7 +22,7 @@ /* * This code provides a a C++ class that can provide 128-bit (or higher) * integers. To produce 2K-bit integers, it uses two K-bit integers, - * placed in a union that allowes the code to also see them as four K/2 bit + * placed in a union that allows the code to also see them as four K/2 bit * integers (and access them either directly name, or by index). * * It may seem like we're reinventing the wheel here, because several diff --git a/cmake/autogenerated_versions.txt b/cmake/autogenerated_versions.txt index edc7805150b..5999a089331 100644 --- a/cmake/autogenerated_versions.txt +++ b/cmake/autogenerated_versions.txt @@ -2,11 +2,11 @@ # NOTE: has nothing common with DBMS_TCP_PROTOCOL_VERSION, # only DBMS_TCP_PROTOCOL_VERSION should be incremented on protocol changes. -SET(VERSION_REVISION 54465) +SET(VERSION_REVISION 54466) SET(VERSION_MAJOR 22) -SET(VERSION_MINOR 8) +SET(VERSION_MINOR 9) SET(VERSION_PATCH 1) -SET(VERSION_GITHASH f4f05ec786a8b8966dd0ea2a2d7e39a8c7db24f4) -SET(VERSION_DESCRIBE v22.8.1.1-testing) -SET(VERSION_STRING 22.8.1.1) +SET(VERSION_GITHASH 09a2ff88435f79e5279745bbe1dc0e5e401df38d) +SET(VERSION_DESCRIBE v22.9.1.1-testing) +SET(VERSION_STRING 22.9.1.1) # end of autochange diff --git a/cmake/clang_tidy.cmake b/cmake/clang_tidy.cmake index fc25c68b11a..200282234ca 100644 --- a/cmake/clang_tidy.cmake +++ b/cmake/clang_tidy.cmake @@ -3,7 +3,7 @@ option (ENABLE_CLANG_TIDY "Use clang-tidy static analyzer" OFF) if (ENABLE_CLANG_TIDY) - find_program (CLANG_TIDY_PATH NAMES "clang-tidy" "clang-tidy-14" "clang-tidy-13" "clang-tidy-12") + find_program (CLANG_TIDY_PATH NAMES "clang-tidy" "clang-tidy-15" "clang-tidy-14" "clang-tidy-13" "clang-tidy-12") if (CLANG_TIDY_PATH) message(STATUS diff --git a/cmake/cpu_features.cmake b/cmake/cpu_features.cmake index 1fc3c2db804..218b4deedce 100644 --- a/cmake/cpu_features.cmake +++ b/cmake/cpu_features.cmake @@ -24,6 +24,23 @@ option (ENABLE_BMI "Use BMI instructions on x86_64" 0) option (ENABLE_AVX2_FOR_SPEC_OP "Use avx2 instructions for specific operations on x86_64" 0) option (ENABLE_AVX512_FOR_SPEC_OP "Use avx512 instructions for specific operations on x86_64" 0) +# X86: Allow compilation for a SSE2-only target machine. Done by a special build in CI for embedded or very old hardware. +option (NO_SSE3_OR_HIGHER "Disable SSE3 or higher on x86_64" 0) +if (NO_SSE3_OR_HIGHER) + SET(ENABLE_SSSE3 0) + SET(ENABLE_SSE41 0) + SET(ENABLE_SSE42 0) + SET(ENABLE_PCLMULQDQ 0) + SET(ENABLE_POPCNT 0) + SET(ENABLE_AVX 0) + SET(ENABLE_AVX2 0) + SET(ENABLE_AVX512 0) + SET(ENABLE_AVX512_VBMI 0) + SET(ENABLE_BMI 0) + SET(ENABLE_AVX2_FOR_SPEC_OP 0) + SET(ENABLE_AVX512_FOR_SPEC_OP 0) +endif() + option (ARCH_NATIVE "Add -march=native compiler flag. This makes your binaries non-portable but more performant code may be generated. This option overrides ENABLE_* options for specific instruction set. Highly not recommended to use." 0) if (ARCH_NATIVE) diff --git a/cmake/ld.lld.in b/cmake/ld.lld.in new file mode 100755 index 00000000000..9736dab1bc3 --- /dev/null +++ b/cmake/ld.lld.in @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# This is a workaround for bug in llvm/clang, +# that does not produce .debug_aranges with LTO +# +# NOTE: this is a temporary solution, that should be removed once [1] will be +# resolved. +# +# [1]: https://discourse.llvm.org/t/clang-does-not-produce-full-debug-aranges-section-with-thinlto/64898/8 + +# NOTE: only -flto=thin is supported. +# NOTE: it is not possible to check was there -gdwarf-aranges initially or not. +if [[ "$*" =~ -plugin-opt=thinlto ]]; then + exec "@LLD_PATH@" -mllvm -generate-arange-section "$@" +else + exec "@LLD_PATH@" "$@" +fi diff --git a/cmake/limit_jobs.cmake b/cmake/limit_jobs.cmake index 96c6b75bc43..a8f105b8987 100644 --- a/cmake/limit_jobs.cmake +++ b/cmake/limit_jobs.cmake @@ -3,7 +3,7 @@ # set (MAX_LINKER_MEMORY 3500 CACHE INTERNAL "") # include (cmake/limit_jobs.cmake) -cmake_host_system_information(RESULT AVAILABLE_PHYSICAL_MEMORY QUERY AVAILABLE_PHYSICAL_MEMORY) # Not available under freebsd +cmake_host_system_information(RESULT TOTAL_PHYSICAL_MEMORY QUERY TOTAL_PHYSICAL_MEMORY) # Not available under freebsd cmake_host_system_information(RESULT NUMBER_OF_LOGICAL_CORES QUERY NUMBER_OF_LOGICAL_CORES) # 1 if not set @@ -12,8 +12,8 @@ option(PARALLEL_COMPILE_JOBS "Maximum number of concurrent compilation jobs" "") # 1 if not set option(PARALLEL_LINK_JOBS "Maximum number of concurrent link jobs" "") -if (NOT PARALLEL_COMPILE_JOBS AND AVAILABLE_PHYSICAL_MEMORY AND MAX_COMPILER_MEMORY) - math(EXPR PARALLEL_COMPILE_JOBS ${AVAILABLE_PHYSICAL_MEMORY}/${MAX_COMPILER_MEMORY}) +if (NOT PARALLEL_COMPILE_JOBS AND TOTAL_PHYSICAL_MEMORY AND MAX_COMPILER_MEMORY) + math(EXPR PARALLEL_COMPILE_JOBS ${TOTAL_PHYSICAL_MEMORY}/${MAX_COMPILER_MEMORY}) if (NOT PARALLEL_COMPILE_JOBS) set (PARALLEL_COMPILE_JOBS 1) @@ -27,8 +27,8 @@ if (PARALLEL_COMPILE_JOBS AND (NOT NUMBER_OF_LOGICAL_CORES OR PARALLEL_COMPILE_J endif () -if (NOT PARALLEL_LINK_JOBS AND AVAILABLE_PHYSICAL_MEMORY AND MAX_LINKER_MEMORY) - math(EXPR PARALLEL_LINK_JOBS ${AVAILABLE_PHYSICAL_MEMORY}/${MAX_LINKER_MEMORY}) +if (NOT PARALLEL_LINK_JOBS AND TOTAL_PHYSICAL_MEMORY AND MAX_LINKER_MEMORY) + math(EXPR PARALLEL_LINK_JOBS ${TOTAL_PHYSICAL_MEMORY}/${MAX_LINKER_MEMORY}) if (NOT PARALLEL_LINK_JOBS) set (PARALLEL_LINK_JOBS 1) @@ -54,6 +54,6 @@ endif () if (PARALLEL_COMPILE_JOBS OR PARALLEL_LINK_JOBS) message(STATUS - "${CMAKE_CURRENT_SOURCE_DIR}: Have ${AVAILABLE_PHYSICAL_MEMORY} megabytes of memory. + "${CMAKE_CURRENT_SOURCE_DIR}: Have ${TOTAL_PHYSICAL_MEMORY} megabytes of memory. Limiting concurrent linkers jobs to ${PARALLEL_LINK_JOBS} and compiler jobs to ${PARALLEL_COMPILE_JOBS} (system has ${NUMBER_OF_LOGICAL_CORES} logical cores)") endif () diff --git a/cmake/linux/toolchain-riscv64.cmake b/cmake/linux/toolchain-riscv64.cmake index cb0a9482a72..02c3d0c97fc 100644 --- a/cmake/linux/toolchain-riscv64.cmake +++ b/cmake/linux/toolchain-riscv64.cmake @@ -21,6 +21,11 @@ set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}") set (CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=bfd") set (CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=bfd") +# Currently, lld does not work with the error: +# ld.lld: error: section size decrease is too large +# But GNU BinUtils work. +set (LINKER_NAME "riscv64-linux-gnu-ld.bfd" CACHE STRING "Linker name" FORCE) + set (HAS_PRE_1970_EXITCODE "0" CACHE STRING "Result from TRY_RUN" FORCE) set (HAS_PRE_1970_EXITCODE__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE) diff --git a/cmake/split_debug_symbols.cmake b/cmake/split_debug_symbols.cmake index 12182ed9c20..a9c2158359a 100644 --- a/cmake/split_debug_symbols.cmake +++ b/cmake/split_debug_symbols.cmake @@ -20,7 +20,7 @@ macro(clickhouse_split_debug_symbols) COMMAND mkdir -p "${STRIP_DESTINATION_DIR}/bin" COMMAND cp "${STRIP_BINARY_PATH}" "${STRIP_DESTINATION_DIR}/bin/${STRIP_TARGET}" # Splits debug symbols into separate file, leaves the binary untouched: - COMMAND "${OBJCOPY_PATH}" --only-keep-debug --compress-debug-sections "${STRIP_DESTINATION_DIR}/bin/${STRIP_TARGET}" "${STRIP_DESTINATION_DIR}/lib/debug/bin/${STRIP_TARGET}.debug" + COMMAND "${OBJCOPY_PATH}" --only-keep-debug "${STRIP_DESTINATION_DIR}/bin/${STRIP_TARGET}" "${STRIP_DESTINATION_DIR}/lib/debug/bin/${STRIP_TARGET}.debug" COMMAND chmod 0644 "${STRIP_DESTINATION_DIR}/lib/debug/bin/${STRIP_TARGET}.debug" # Strips binary, sections '.note' & '.comment' are removed in line with Debian's stripping policy: www.debian.org/doc/debian-policy/ch-files.html, section '.clickhouse.hash' is needed for integrity check: COMMAND "${STRIP_PATH}" --remove-section=.comment --remove-section=.note --keep-section=.clickhouse.hash "${STRIP_DESTINATION_DIR}/bin/${STRIP_TARGET}" diff --git a/cmake/target.cmake b/cmake/target.cmake index 0fb5e8a20de..ae360758701 100644 --- a/cmake/target.cmake +++ b/cmake/target.cmake @@ -45,6 +45,7 @@ if (CMAKE_CROSSCOMPILING) endif () if (USE_MUSL) + # use of undeclared identifier 'PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' set (ENABLE_SENTRY OFF CACHE INTERNAL "") set (ENABLE_ODBC OFF CACHE INTERNAL "") set (ENABLE_GRPC OFF CACHE INTERNAL "") diff --git a/cmake/tools.cmake b/cmake/tools.cmake index 5b005a6f1f9..57d39899a40 100644 --- a/cmake/tools.cmake +++ b/cmake/tools.cmake @@ -94,8 +94,13 @@ if (LINKER_NAME) if (NOT LLD_PATH) message (FATAL_ERROR "Using linker ${LINKER_NAME} but can't find its path.") endif () - set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --ld-path=${LLD_PATH}") - set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --ld-path=${LLD_PATH}") + + # This a temporary quirk to emit .debug_aranges with ThinLTO + set (LLD_WRAPPER "${CMAKE_CURRENT_BINARY_DIR}/ld.lld") + configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/cmake/ld.lld.in" "${LLD_WRAPPER}" @ONLY) + + set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --ld-path=${LLD_WRAPPER}") + set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --ld-path=${LLD_WRAPPER}") else () set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=${LINKER_NAME}") set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=${LINKER_NAME}") diff --git a/cmake/warnings.cmake b/cmake/warnings.cmake index 994f14c6149..042935a835f 100644 --- a/cmake/warnings.cmake +++ b/cmake/warnings.cmake @@ -23,6 +23,7 @@ if (COMPILER_CLANG) no_warning(zero-length-array) no_warning(c++98-compat-pedantic) no_warning(c++98-compat) + no_warning(c++20-compat) # Use constinit in C++20 without warnings no_warning(conversion) no_warning(ctad-maybe-unsupported) # clang 9+, linux-only no_warning(disabled-macro-expansion) @@ -41,6 +42,7 @@ if (COMPILER_CLANG) no_warning(weak-template-vtables) no_warning(weak-vtables) no_warning(thread-safety-negative) # experimental flag, too many false positives + no_warning(enum-constexpr-conversion) # breaks magic-enum library in clang-16 # TODO Enable conversion, sign-conversion, double-promotion warnings. elseif (COMPILER_GCC) # Add compiler options only to c++ compiler diff --git a/contrib/NuRaft b/contrib/NuRaft index 1334b9ae725..e15858f8ad0 160000 --- a/contrib/NuRaft +++ b/contrib/NuRaft @@ -1 +1 @@ -Subproject commit 1334b9ae72576821a698d657d08838861cf33007 +Subproject commit e15858f8ad0ce8aba85cf74e3763874c76bf927c diff --git a/contrib/arrow b/contrib/arrow index efdcd015cfd..450a5638704 160000 --- a/contrib/arrow +++ b/contrib/arrow @@ -1 +1 @@ -Subproject commit efdcd015cfdee1b6aa349c9ca227ca12c3d697f5 +Subproject commit 450a5638704386356f8e520080468fc9bc8bcaf8 diff --git a/contrib/azure b/contrib/azure index ac4b763d4ca..ef75afc075f 160000 --- a/contrib/azure +++ b/contrib/azure @@ -1 +1 @@ -Subproject commit ac4b763d4ca40122275f1497cbdc5451337461d9 +Subproject commit ef75afc075fc71fbcd8fe28dcda3794ae265fd1c diff --git a/contrib/azure-cmake/CMakeLists.txt b/contrib/azure-cmake/CMakeLists.txt index 19f2940cbf0..1e2a4c97824 100644 --- a/contrib/azure-cmake/CMakeLists.txt +++ b/contrib/azure-cmake/CMakeLists.txt @@ -1,6 +1,6 @@ option (ENABLE_AZURE_BLOB_STORAGE "Enable Azure blob storage" ${ENABLE_LIBRARIES}) -if (NOT ENABLE_AZURE_BLOB_STORAGE) +if (NOT ENABLE_AZURE_BLOB_STORAGE OR BUILD_STANDALONE_KEEPER OR OS_FREEBSD) message(STATUS "Not using Azure blob storage") return() endif() diff --git a/contrib/boost b/contrib/boost index c0807e83f28..03d9ec9cd15 160000 --- a/contrib/boost +++ b/contrib/boost @@ -1 +1 @@ -Subproject commit c0807e83f2824e8dd67a15b355496a9b784cdcd5 +Subproject commit 03d9ec9cd159d14bd0b17c05138098451a1ea606 diff --git a/contrib/boringssl b/contrib/boringssl index c1e01a441d6..8061ac62d67 160000 --- a/contrib/boringssl +++ b/contrib/boringssl @@ -1 +1 @@ -Subproject commit c1e01a441d6db234f4f12e63a7657d1f9e6db9c1 +Subproject commit 8061ac62d67953e61b793042e33baf1352e67510 diff --git a/contrib/c-ares-cmake/CMakeLists.txt b/contrib/c-ares-cmake/CMakeLists.txt index 603c1f8b65c..4b1170f9dd1 100644 --- a/contrib/c-ares-cmake/CMakeLists.txt +++ b/contrib/c-ares-cmake/CMakeLists.txt @@ -1,35 +1,95 @@ -# Choose to build static or shared library for c-ares. -if (USE_STATIC_LIBRARIES) - set(CARES_STATIC ON CACHE BOOL "" FORCE) - set(CARES_SHARED OFF CACHE BOOL "" FORCE) -else () - set(CARES_STATIC OFF CACHE BOOL "" FORCE) - set(CARES_SHARED ON CACHE BOOL "" FORCE) -endif () +set(LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/c-ares") -# Disable looking for libnsl on a platforms that has gethostbyname in glibc -# -# c-ares searching for gethostbyname in the libnsl library, however in the -# version that shipped with gRPC it doing it wrong [1], since it uses -# CHECK_LIBRARY_EXISTS(), which will return TRUE even if the function exists in -# another dependent library. The upstream already contains correct macro [2], -# but it is not included in gRPC (even upstream gRPC, not the one that is -# shipped with clickhousee). -# -# [1]: https://github.com/c-ares/c-ares/blob/e982924acee7f7313b4baa4ee5ec000c5e373c30/CMakeLists.txt#L125 -# [2]: https://github.com/c-ares/c-ares/blob/44fbc813685a1fa8aa3f27fcd7544faf612d376a/CMakeLists.txt#L146 -# -# And because if you by some reason have libnsl [3] installed, clickhouse will -# reject to start w/o it. While this is completelly different library. -# -# [3]: https://packages.debian.org/bullseye/libnsl2 -if (NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS") - set(HAVE_LIBNSL OFF CACHE BOOL "" FORCE) +# Generated from contrib/c-ares/src/lib/Makefile.inc +SET(SRCS + "${LIBRARY_DIR}/src/lib/ares__addrinfo2hostent.c" + "${LIBRARY_DIR}/src/lib/ares__addrinfo_localhost.c" + "${LIBRARY_DIR}/src/lib/ares__close_sockets.c" + "${LIBRARY_DIR}/src/lib/ares__get_hostent.c" + "${LIBRARY_DIR}/src/lib/ares__parse_into_addrinfo.c" + "${LIBRARY_DIR}/src/lib/ares__readaddrinfo.c" + "${LIBRARY_DIR}/src/lib/ares__sortaddrinfo.c" + "${LIBRARY_DIR}/src/lib/ares__read_line.c" + "${LIBRARY_DIR}/src/lib/ares__timeval.c" + "${LIBRARY_DIR}/src/lib/ares_android.c" + "${LIBRARY_DIR}/src/lib/ares_cancel.c" + "${LIBRARY_DIR}/src/lib/ares_data.c" + "${LIBRARY_DIR}/src/lib/ares_destroy.c" + "${LIBRARY_DIR}/src/lib/ares_expand_name.c" + "${LIBRARY_DIR}/src/lib/ares_expand_string.c" + "${LIBRARY_DIR}/src/lib/ares_fds.c" + "${LIBRARY_DIR}/src/lib/ares_free_hostent.c" + "${LIBRARY_DIR}/src/lib/ares_free_string.c" + "${LIBRARY_DIR}/src/lib/ares_freeaddrinfo.c" + "${LIBRARY_DIR}/src/lib/ares_getaddrinfo.c" + "${LIBRARY_DIR}/src/lib/ares_getenv.c" + "${LIBRARY_DIR}/src/lib/ares_gethostbyaddr.c" + "${LIBRARY_DIR}/src/lib/ares_gethostbyname.c" + "${LIBRARY_DIR}/src/lib/ares_getnameinfo.c" + "${LIBRARY_DIR}/src/lib/ares_getsock.c" + "${LIBRARY_DIR}/src/lib/ares_init.c" + "${LIBRARY_DIR}/src/lib/ares_library_init.c" + "${LIBRARY_DIR}/src/lib/ares_llist.c" + "${LIBRARY_DIR}/src/lib/ares_mkquery.c" + "${LIBRARY_DIR}/src/lib/ares_create_query.c" + "${LIBRARY_DIR}/src/lib/ares_nowarn.c" + "${LIBRARY_DIR}/src/lib/ares_options.c" + "${LIBRARY_DIR}/src/lib/ares_parse_a_reply.c" + "${LIBRARY_DIR}/src/lib/ares_parse_aaaa_reply.c" + "${LIBRARY_DIR}/src/lib/ares_parse_caa_reply.c" + "${LIBRARY_DIR}/src/lib/ares_parse_mx_reply.c" + "${LIBRARY_DIR}/src/lib/ares_parse_naptr_reply.c" + "${LIBRARY_DIR}/src/lib/ares_parse_ns_reply.c" + "${LIBRARY_DIR}/src/lib/ares_parse_ptr_reply.c" + "${LIBRARY_DIR}/src/lib/ares_parse_soa_reply.c" + "${LIBRARY_DIR}/src/lib/ares_parse_srv_reply.c" + "${LIBRARY_DIR}/src/lib/ares_parse_txt_reply.c" + "${LIBRARY_DIR}/src/lib/ares_parse_uri_reply.c" + "${LIBRARY_DIR}/src/lib/ares_platform.c" + "${LIBRARY_DIR}/src/lib/ares_process.c" + "${LIBRARY_DIR}/src/lib/ares_query.c" + "${LIBRARY_DIR}/src/lib/ares_search.c" + "${LIBRARY_DIR}/src/lib/ares_send.c" + "${LIBRARY_DIR}/src/lib/ares_strcasecmp.c" + "${LIBRARY_DIR}/src/lib/ares_strdup.c" + "${LIBRARY_DIR}/src/lib/ares_strerror.c" + "${LIBRARY_DIR}/src/lib/ares_strsplit.c" + "${LIBRARY_DIR}/src/lib/ares_timeout.c" + "${LIBRARY_DIR}/src/lib/ares_version.c" + "${LIBRARY_DIR}/src/lib/ares_writev.c" + "${LIBRARY_DIR}/src/lib/bitncmp.c" + "${LIBRARY_DIR}/src/lib/inet_net_pton.c" + "${LIBRARY_DIR}/src/lib/inet_ntop.c" + "${LIBRARY_DIR}/src/lib/windows_port.c" +) + +if (USE_STATIC_LIBRARIES) + add_library(_c-ares STATIC ${SRCS}) + target_compile_definitions(_c-ares PUBLIC CARES_STATICLIB) +else() + add_library(_c-ares SHARED ${SRCS}) + target_compile_definitions(_c-ares PUBLIC CARES_BUILDING_LIBRARY) endif() -# Force use of c-ares inet_net_pton instead of libresolv one -set(HAVE_INET_NET_PTON OFF CACHE BOOL "" FORCE) +target_compile_definitions(_c-ares PRIVATE HAVE_CONFIG_H=1) -add_subdirectory("../c-ares/" "../c-ares/") +target_include_directories(_c-ares SYSTEM PUBLIC + "${LIBRARY_DIR}/src/lib" + "${LIBRARY_DIR}/include" +) -add_library(ch_contrib::c-ares ALIAS c-ares) \ No newline at end of file +# Platform-specific include directories. The original build system does a lot of checks to eventually generate two header files with defines: +# ares_build.h and ares_config.h. To update, run the original CMake build in c-ares for each platform and copy the headers into the +# platform-specific folder. +# For the platform-specific compile definitions, see c-ares top-level CMakeLists.txt. +if (OS_LINUX) + target_include_directories(_c-ares SYSTEM PUBLIC "${ClickHouse_SOURCE_DIR}/contrib/c-ares-cmake/linux") + target_compile_definitions(_c-ares PRIVATE -D_GNU_SOURCE -D_POSIX_C_SOURCE=199309L -D_XOPEN_SOURCE=600) +elseif (OS_DARWIN) + target_include_directories(_c-ares SYSTEM PUBLIC "${ClickHouse_SOURCE_DIR}/contrib/c-ares-cmake/darwin") + target_compile_definitions(_c-ares PRIVATE -D_DARWIN_C_SOURCE) +elseif (OS_FREEBSD) + target_include_directories(_c-ares SYSTEM PUBLIC "${ClickHouse_SOURCE_DIR}/contrib/c-ares-cmake/freebsd") +endif() + +add_library(ch_contrib::c-ares ALIAS _c-ares) diff --git a/contrib/c-ares-cmake/darwin/ares_build.h b/contrib/c-ares-cmake/darwin/ares_build.h new file mode 100644 index 00000000000..bf7402e7997 --- /dev/null +++ b/contrib/c-ares-cmake/darwin/ares_build.h @@ -0,0 +1,43 @@ +#ifndef __CARES_BUILD_H +#define __CARES_BUILD_H + +#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t +#define CARES_TYPEOF_ARES_SSIZE_T ssize_t + +/* Prefix names with CARES_ to make sure they don't conflict with other config.h + * files. We need to include some dependent headers that may be system specific + * for C-Ares */ +#define CARES_HAVE_SYS_TYPES_H +#define CARES_HAVE_SYS_SOCKET_H +/* #undef CARES_HAVE_WINDOWS_H */ +/* #undef CARES_HAVE_WS2TCPIP_H */ +/* #undef CARES_HAVE_WINSOCK2_H */ +/* #undef CARES_HAVE_WINDOWS_H */ +#define CARES_HAVE_ARPA_NAMESER_H +#define CARES_HAVE_ARPA_NAMESER_COMPAT_H + +#ifdef CARES_HAVE_SYS_TYPES_H +# include +#endif + +#ifdef CARES_HAVE_SYS_SOCKET_H +# include +#endif + +#ifdef CARES_HAVE_WINSOCK2_H +# include +#endif + +#ifdef CARES_HAVE_WS2TCPIP_H +# include +#endif + +#ifdef CARES_HAVE_WINDOWS_H +# include +#endif + + +typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t; +typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t; + +#endif /* __CARES_BUILD_H */ diff --git a/contrib/c-ares-cmake/darwin/ares_config.h b/contrib/c-ares-cmake/darwin/ares_config.h new file mode 100644 index 00000000000..64af3836f3f --- /dev/null +++ b/contrib/c-ares-cmake/darwin/ares_config.h @@ -0,0 +1,432 @@ +/* Generated from ares_config.h.cmake */ + +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + +/* define this if ares is built for a big endian system */ +#undef ARES_BIG_ENDIAN + +/* when building as static part of libcurl */ +#undef BUILDING_LIBCURL + +/* Defined for build that exposes internal static functions for testing. */ +#undef CARES_EXPOSE_STATICS + +/* Defined for build with symbol hiding. */ +#undef CARES_SYMBOL_HIDING + +/* Definition to make a library symbol externally visible. */ +#undef CARES_SYMBOL_SCOPE_EXTERN + +/* Use resolver library to configure cares */ +/* #undef CARES_USE_LIBRESOLV */ + +/* if a /etc/inet dir is being used */ +#undef ETC_INET + +/* Define to the type of arg 2 for gethostname. */ +#define GETHOSTNAME_TYPE_ARG2 size_t + +/* Define to the type qualifier of arg 1 for getnameinfo. */ +#define GETNAMEINFO_QUAL_ARG1 + +/* Define to the type of arg 1 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * + +/* Define to the type of arg 2 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG2 socklen_t + +/* Define to the type of args 4 and 6 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG46 socklen_t + +/* Define to the type of arg 7 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG7 int + +/* Specifies the number of arguments to getservbyport_r */ +#define GETSERVBYPORT_R_ARGS + +/* Specifies the number of arguments to getservbyname_r */ +#define GETSERVBYNAME_R_ARGS + +/* Define to 1 if you have AF_INET6. */ +#define HAVE_AF_INET6 + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_NAMESER_COMPAT_H + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_NAMESER_H + +/* Define to 1 if you have the header file. */ +#define HAVE_ASSERT_H + +/* Define to 1 if you have the `bitncmp' function. */ +/* #undef HAVE_BITNCMP */ + +/* Define to 1 if bool is an available type. */ +#define HAVE_BOOL_T + +/* Define to 1 if you have the clock_gettime function and monotonic timer. */ +#define HAVE_CLOCK_GETTIME_MONOTONIC + +/* Define to 1 if you have the closesocket function. */ +/* #undef HAVE_CLOSESOCKET */ + +/* Define to 1 if you have the CloseSocket camel case function. */ +/* #undef HAVE_CLOSESOCKET_CAMEL */ + +/* Define to 1 if you have the connect function. */ +#define HAVE_CONNECT + +/* define if the compiler supports basic C++11 syntax */ +/* #undef HAVE_CXX11 */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H + +/* Define to 1 if you have the fcntl function. */ +#define HAVE_FCNTL + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H + +/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ +#define HAVE_FCNTL_O_NONBLOCK + +/* Define to 1 if you have the freeaddrinfo function. */ +#define HAVE_FREEADDRINFO + +/* Define to 1 if you have a working getaddrinfo function. */ +#define HAVE_GETADDRINFO + +/* Define to 1 if the getaddrinfo function is threadsafe. */ +#define HAVE_GETADDRINFO_THREADSAFE + +/* Define to 1 if you have the getenv function. */ +#define HAVE_GETENV + +/* Define to 1 if you have the gethostbyaddr function. */ +#define HAVE_GETHOSTBYADDR + +/* Define to 1 if you have the gethostbyname function. */ +#define HAVE_GETHOSTBYNAME + +/* Define to 1 if you have the gethostname function. */ +#define HAVE_GETHOSTNAME + +/* Define to 1 if you have the getnameinfo function. */ +#define HAVE_GETNAMEINFO + +/* Define to 1 if you have the getservbyport_r function. */ +/* #undef HAVE_GETSERVBYPORT_R */ + +/* Define to 1 if you have the getservbyname_r function. */ +/* #undef HAVE_GETSERVBYNAME_R */ + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the `if_indextoname' function. */ +#define HAVE_IF_INDEXTONAME + +/* Define to 1 if you have a IPv6 capable working inet_net_pton function. */ +/* #undef HAVE_INET_NET_PTON */ + +/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ +#define HAVE_INET_NTOP + +/* Define to 1 if you have a IPv6 capable working inet_pton function. */ +#define HAVE_INET_PTON + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H + +/* Define to 1 if you have the ioctl function. */ +#define HAVE_IOCTL + +/* Define to 1 if you have the ioctlsocket function. */ +/* #undef HAVE_IOCTLSOCKET */ + +/* Define to 1 if you have the IoctlSocket camel case function. */ +/* #undef HAVE_IOCTLSOCKET_CAMEL */ + +/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. + */ +/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ + +/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ +/* #undef HAVE_IOCTLSOCKET_FIONBIO */ + +/* Define to 1 if you have a working ioctl FIONBIO function. */ +#define HAVE_IOCTL_FIONBIO + +/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ +#define HAVE_IOCTL_SIOCGIFADDR + +/* Define to 1 if you have the `resolve' library (-lresolve). */ +/* #undef HAVE_LIBRESOLV */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H + +/* if your compiler supports LL */ +#define HAVE_LL + +/* Define to 1 if the compiler supports the 'long long' data type. */ +#define HAVE_LONGLONG + +/* Define to 1 if you have the malloc.h header file. */ +/* #undef HAVE_MALLOC_H */ + +/* Define to 1 if you have the memory.h header file. */ +#define HAVE_MEMORY_H + +/* Define to 1 if you have the MSG_NOSIGNAL flag. */ +/* #undef HAVE_MSG_NOSIGNAL */ + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_TCP_H + +/* Define to 1 if you have the header file. */ +#define HAVE_NET_IF_H + +/* Define to 1 if you have PF_INET6. */ +#define HAVE_PF_INET6 + +/* Define to 1 if you have the recv function. */ +#define HAVE_RECV + +/* Define to 1 if you have the recvfrom function. */ +#define HAVE_RECVFROM + +/* Define to 1 if you have the send function. */ +#define HAVE_SEND + +/* Define to 1 if you have the setsockopt function. */ +#define HAVE_SETSOCKOPT + +/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ +/* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SIGNAL_H + +/* Define to 1 if sig_atomic_t is an available typedef. */ +#define HAVE_SIG_ATOMIC_T + +/* Define to 1 if sig_atomic_t is already defined as volatile. */ +/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ + +/* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */ +#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID + +/* Define to 1 if you have the socket function. */ +#define HAVE_SOCKET + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SOCKET_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDBOOL_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H + +/* Define to 1 if you have the strcasecmp function. */ +#define HAVE_STRCASECMP + +/* Define to 1 if you have the strcmpi function. */ +/* #undef HAVE_STRCMPI */ + +/* Define to 1 if you have the strdup function. */ +#define HAVE_STRDUP + +/* Define to 1 if you have the stricmp function. */ +/* #undef HAVE_STRICMP */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H + +/* Define to 1 if you have the strncasecmp function. */ +#define HAVE_STRNCASECMP + +/* Define to 1 if you have the strncmpi function. */ +/* #undef HAVE_STRNCMPI */ + +/* Define to 1 if you have the strnicmp function. */ +/* #undef HAVE_STRNICMP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STROPTS_H */ + +/* Define to 1 if you have struct addrinfo. */ +#define HAVE_STRUCT_ADDRINFO + +/* Define to 1 if you have struct in6_addr. */ +#define HAVE_STRUCT_IN6_ADDR + +/* Define to 1 if you have struct sockaddr_in6. */ +#define HAVE_STRUCT_SOCKADDR_IN6 + +/* if struct sockaddr_storage is defined */ +#define HAVE_STRUCT_SOCKADDR_STORAGE + +/* Define to 1 if you have the timeval struct. */ +#define HAVE_STRUCT_TIMEVAL + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H + +/* Define to 1 if you have the windows.h header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to 1 if you have the winsock2.h header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define to 1 if you have the winsock.h header file. */ +/* #undef HAVE_WINSOCK_H */ + +/* Define to 1 if you have the writev function. */ +#define HAVE_WRITEV + +/* Define to 1 if you have the ws2tcpip.h header file. */ +/* #undef HAVE_WS2TCPIP_H */ + +/* Define to 1 if you have the __system_property_get function */ +#define HAVE___SYSTEM_PROPERTY_GET + +/* Define to 1 if you need the malloc.h header file even with stdlib.h */ +/* #undef NEED_MALLOC_H */ + +/* Define to 1 if you need the memory.h header file even with stdlib.h */ +/* #undef NEED_MEMORY_H */ + +/* a suitable file/device to read random data from */ +#define CARES_RANDOM_FILE "/dev/urandom" + +/* Define to the type qualifier pointed by arg 5 for recvfrom. */ +#define RECVFROM_QUAL_ARG5 + +/* Define to the type of arg 1 for recvfrom. */ +#define RECVFROM_TYPE_ARG1 int + +/* Define to the type pointed by arg 2 for recvfrom. */ +#define RECVFROM_TYPE_ARG2 void * + +/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ +#define RECVFROM_TYPE_ARG2_IS_VOID 0 + +/* Define to the type of arg 3 for recvfrom. */ +#define RECVFROM_TYPE_ARG3 size_t + +/* Define to the type of arg 4 for recvfrom. */ +#define RECVFROM_TYPE_ARG4 int + +/* Define to the type pointed by arg 5 for recvfrom. */ +#define RECVFROM_TYPE_ARG5 struct sockaddr * + +/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ +#define RECVFROM_TYPE_ARG5_IS_VOID 0 + +/* Define to the type pointed by arg 6 for recvfrom. */ +#define RECVFROM_TYPE_ARG6 socklen_t * + +/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ +#define RECVFROM_TYPE_ARG6_IS_VOID 0 + +/* Define to the function return type for recvfrom. */ +#define RECVFROM_TYPE_RETV ssize_t + +/* Define to the type of arg 1 for recv. */ +#define RECV_TYPE_ARG1 int + +/* Define to the type of arg 2 for recv. */ +#define RECV_TYPE_ARG2 void * + +/* Define to the type of arg 3 for recv. */ +#define RECV_TYPE_ARG3 size_t + +/* Define to the type of arg 4 for recv. */ +#define RECV_TYPE_ARG4 int + +/* Define to the function return type for recv. */ +#define RECV_TYPE_RETV ssize_t + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE + +/* Define to the type qualifier of arg 2 for send. */ +#define SEND_QUAL_ARG2 + +/* Define to the type of arg 1 for send. */ +#define SEND_TYPE_ARG1 int + +/* Define to the type of arg 2 for send. */ +#define SEND_TYPE_ARG2 void * + +/* Define to the type of arg 3 for send. */ +#define SEND_TYPE_ARG3 size_t + +/* Define to the type of arg 4 for send. */ +#define SEND_TYPE_ARG4 int + +/* Define to the function return type for send. */ +#define SEND_TYPE_RETV ssize_t + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME + +/* Define to disable non-blocking sockets. */ +#undef USE_BLOCKING_SOCKETS + +/* Define to avoid automatic inclusion of winsock.h */ +#undef WIN32_LEAN_AND_MEAN + +/* Type to use in place of in_addr_t when system does not provide it. */ +#undef in_addr_t + diff --git a/contrib/c-ares-cmake/freebsd/ares_build.h b/contrib/c-ares-cmake/freebsd/ares_build.h new file mode 100644 index 00000000000..bf7402e7997 --- /dev/null +++ b/contrib/c-ares-cmake/freebsd/ares_build.h @@ -0,0 +1,43 @@ +#ifndef __CARES_BUILD_H +#define __CARES_BUILD_H + +#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t +#define CARES_TYPEOF_ARES_SSIZE_T ssize_t + +/* Prefix names with CARES_ to make sure they don't conflict with other config.h + * files. We need to include some dependent headers that may be system specific + * for C-Ares */ +#define CARES_HAVE_SYS_TYPES_H +#define CARES_HAVE_SYS_SOCKET_H +/* #undef CARES_HAVE_WINDOWS_H */ +/* #undef CARES_HAVE_WS2TCPIP_H */ +/* #undef CARES_HAVE_WINSOCK2_H */ +/* #undef CARES_HAVE_WINDOWS_H */ +#define CARES_HAVE_ARPA_NAMESER_H +#define CARES_HAVE_ARPA_NAMESER_COMPAT_H + +#ifdef CARES_HAVE_SYS_TYPES_H +# include +#endif + +#ifdef CARES_HAVE_SYS_SOCKET_H +# include +#endif + +#ifdef CARES_HAVE_WINSOCK2_H +# include +#endif + +#ifdef CARES_HAVE_WS2TCPIP_H +# include +#endif + +#ifdef CARES_HAVE_WINDOWS_H +# include +#endif + + +typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t; +typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t; + +#endif /* __CARES_BUILD_H */ diff --git a/contrib/c-ares-cmake/freebsd/ares_config.h b/contrib/c-ares-cmake/freebsd/ares_config.h new file mode 100644 index 00000000000..a7836e0e802 --- /dev/null +++ b/contrib/c-ares-cmake/freebsd/ares_config.h @@ -0,0 +1,432 @@ +/* Generated from ares_config.h.cmake */ + +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + +/* define this if ares is built for a big endian system */ +#undef ARES_BIG_ENDIAN + +/* when building as static part of libcurl */ +#undef BUILDING_LIBCURL + +/* Defined for build that exposes internal static functions for testing. */ +#undef CARES_EXPOSE_STATICS + +/* Defined for build with symbol hiding. */ +#undef CARES_SYMBOL_HIDING + +/* Definition to make a library symbol externally visible. */ +#undef CARES_SYMBOL_SCOPE_EXTERN + +/* Use resolver library to configure cares */ +/* #undef CARES_USE_LIBRESOLV */ + +/* if a /etc/inet dir is being used */ +#undef ETC_INET + +/* Define to the type of arg 2 for gethostname. */ +#define GETHOSTNAME_TYPE_ARG2 size_t + +/* Define to the type qualifier of arg 1 for getnameinfo. */ +#define GETNAMEINFO_QUAL_ARG1 + +/* Define to the type of arg 1 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * + +/* Define to the type of arg 2 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG2 socklen_t + +/* Define to the type of args 4 and 6 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG46 socklen_t + +/* Define to the type of arg 7 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG7 int + +/* Specifies the number of arguments to getservbyport_r */ +#define GETSERVBYPORT_R_ARGS 6 + +/* Specifies the number of arguments to getservbyname_r */ +#define GETSERVBYNAME_R_ARGS 6 + +/* Define to 1 if you have AF_INET6. */ +#define HAVE_AF_INET6 + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_NAMESER_COMPAT_H + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_NAMESER_H + +/* Define to 1 if you have the header file. */ +#define HAVE_ASSERT_H + +/* Define to 1 if you have the `bitncmp' function. */ +/* #undef HAVE_BITNCMP */ + +/* Define to 1 if bool is an available type. */ +#define HAVE_BOOL_T + +/* Define to 1 if you have the clock_gettime function and monotonic timer. */ +#define HAVE_CLOCK_GETTIME_MONOTONIC + +/* Define to 1 if you have the closesocket function. */ +/* #undef HAVE_CLOSESOCKET */ + +/* Define to 1 if you have the CloseSocket camel case function. */ +/* #undef HAVE_CLOSESOCKET_CAMEL */ + +/* Define to 1 if you have the connect function. */ +#define HAVE_CONNECT + +/* define if the compiler supports basic C++11 syntax */ +/* #undef HAVE_CXX11 */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H + +/* Define to 1 if you have the fcntl function. */ +#define HAVE_FCNTL + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H + +/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ +#define HAVE_FCNTL_O_NONBLOCK + +/* Define to 1 if you have the freeaddrinfo function. */ +#define HAVE_FREEADDRINFO + +/* Define to 1 if you have a working getaddrinfo function. */ +#define HAVE_GETADDRINFO + +/* Define to 1 if the getaddrinfo function is threadsafe. */ +#define HAVE_GETADDRINFO_THREADSAFE + +/* Define to 1 if you have the getenv function. */ +#define HAVE_GETENV + +/* Define to 1 if you have the gethostbyaddr function. */ +#define HAVE_GETHOSTBYADDR + +/* Define to 1 if you have the gethostbyname function. */ +#define HAVE_GETHOSTBYNAME + +/* Define to 1 if you have the gethostname function. */ +#define HAVE_GETHOSTNAME + +/* Define to 1 if you have the getnameinfo function. */ +#define HAVE_GETNAMEINFO + +/* Define to 1 if you have the getservbyport_r function. */ +#define HAVE_GETSERVBYPORT_R + +/* Define to 1 if you have the getservbyname_r function. */ +#define HAVE_GETSERVBYNAME_R + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the `if_indextoname' function. */ +#define HAVE_IF_INDEXTONAME + +/* Define to 1 if you have a IPv6 capable working inet_net_pton function. */ +/* #undef HAVE_INET_NET_PTON */ + +/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ +#define HAVE_INET_NTOP + +/* Define to 1 if you have a IPv6 capable working inet_pton function. */ +#define HAVE_INET_PTON + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H + +/* Define to 1 if you have the ioctl function. */ +#define HAVE_IOCTL + +/* Define to 1 if you have the ioctlsocket function. */ +/* #undef HAVE_IOCTLSOCKET */ + +/* Define to 1 if you have the IoctlSocket camel case function. */ +/* #undef HAVE_IOCTLSOCKET_CAMEL */ + +/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. + */ +/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ + +/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ +/* #undef HAVE_IOCTLSOCKET_FIONBIO */ + +/* Define to 1 if you have a working ioctl FIONBIO function. */ +#define HAVE_IOCTL_FIONBIO + +/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ +#define HAVE_IOCTL_SIOCGIFADDR + +/* Define to 1 if you have the `resolve' library (-lresolve). */ +/* #undef HAVE_LIBRESOLV */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H + +/* if your compiler supports LL */ +#define HAVE_LL + +/* Define to 1 if the compiler supports the 'long long' data type. */ +#define HAVE_LONGLONG + +/* Define to 1 if you have the malloc.h header file. */ +/* #undef HAVE_MALLOC_H */ + +/* Define to 1 if you have the memory.h header file. */ +#define HAVE_MEMORY_H + +/* Define to 1 if you have the MSG_NOSIGNAL flag. */ +#define HAVE_MSG_NOSIGNAL + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_TCP_H + +/* Define to 1 if you have the header file. */ +#define HAVE_NET_IF_H + +/* Define to 1 if you have PF_INET6. */ +#define HAVE_PF_INET6 + +/* Define to 1 if you have the recv function. */ +#define HAVE_RECV + +/* Define to 1 if you have the recvfrom function. */ +#define HAVE_RECVFROM + +/* Define to 1 if you have the send function. */ +#define HAVE_SEND + +/* Define to 1 if you have the setsockopt function. */ +#define HAVE_SETSOCKOPT + +/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ +/* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SIGNAL_H + +/* Define to 1 if sig_atomic_t is an available typedef. */ +#define HAVE_SIG_ATOMIC_T + +/* Define to 1 if sig_atomic_t is already defined as volatile. */ +/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ + +/* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */ +#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID + +/* Define to 1 if you have the socket function. */ +#define HAVE_SOCKET + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SOCKET_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDBOOL_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H + +/* Define to 1 if you have the strcasecmp function. */ +#define HAVE_STRCASECMP + +/* Define to 1 if you have the strcmpi function. */ +/* #undef HAVE_STRCMPI */ + +/* Define to 1 if you have the strdup function. */ +#define HAVE_STRDUP + +/* Define to 1 if you have the stricmp function. */ +/* #undef HAVE_STRICMP */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H + +/* Define to 1 if you have the strncasecmp function. */ +#define HAVE_STRNCASECMP + +/* Define to 1 if you have the strncmpi function. */ +/* #undef HAVE_STRNCMPI */ + +/* Define to 1 if you have the strnicmp function. */ +/* #undef HAVE_STRNICMP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STROPTS_H */ + +/* Define to 1 if you have struct addrinfo. */ +#define HAVE_STRUCT_ADDRINFO + +/* Define to 1 if you have struct in6_addr. */ +#define HAVE_STRUCT_IN6_ADDR + +/* Define to 1 if you have struct sockaddr_in6. */ +#define HAVE_STRUCT_SOCKADDR_IN6 + +/* if struct sockaddr_storage is defined */ +#define HAVE_STRUCT_SOCKADDR_STORAGE + +/* Define to 1 if you have the timeval struct. */ +#define HAVE_STRUCT_TIMEVAL + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H + +/* Define to 1 if you have the windows.h header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to 1 if you have the winsock2.h header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define to 1 if you have the winsock.h header file. */ +/* #undef HAVE_WINSOCK_H */ + +/* Define to 1 if you have the writev function. */ +#define HAVE_WRITEV + +/* Define to 1 if you have the ws2tcpip.h header file. */ +/* #undef HAVE_WS2TCPIP_H */ + +/* Define to 1 if you have the __system_property_get function */ +#define HAVE___SYSTEM_PROPERTY_GET + +/* Define to 1 if you need the malloc.h header file even with stdlib.h */ +/* #undef NEED_MALLOC_H */ + +/* Define to 1 if you need the memory.h header file even with stdlib.h */ +/* #undef NEED_MEMORY_H */ + +/* a suitable file/device to read random data from */ +#define CARES_RANDOM_FILE "/dev/urandom" + +/* Define to the type qualifier pointed by arg 5 for recvfrom. */ +#define RECVFROM_QUAL_ARG5 + +/* Define to the type of arg 1 for recvfrom. */ +#define RECVFROM_TYPE_ARG1 int + +/* Define to the type pointed by arg 2 for recvfrom. */ +#define RECVFROM_TYPE_ARG2 void * + +/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ +#define RECVFROM_TYPE_ARG2_IS_VOID 0 + +/* Define to the type of arg 3 for recvfrom. */ +#define RECVFROM_TYPE_ARG3 size_t + +/* Define to the type of arg 4 for recvfrom. */ +#define RECVFROM_TYPE_ARG4 int + +/* Define to the type pointed by arg 5 for recvfrom. */ +#define RECVFROM_TYPE_ARG5 struct sockaddr * + +/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ +#define RECVFROM_TYPE_ARG5_IS_VOID 0 + +/* Define to the type pointed by arg 6 for recvfrom. */ +#define RECVFROM_TYPE_ARG6 socklen_t * + +/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ +#define RECVFROM_TYPE_ARG6_IS_VOID 0 + +/* Define to the function return type for recvfrom. */ +#define RECVFROM_TYPE_RETV ssize_t + +/* Define to the type of arg 1 for recv. */ +#define RECV_TYPE_ARG1 int + +/* Define to the type of arg 2 for recv. */ +#define RECV_TYPE_ARG2 void * + +/* Define to the type of arg 3 for recv. */ +#define RECV_TYPE_ARG3 size_t + +/* Define to the type of arg 4 for recv. */ +#define RECV_TYPE_ARG4 int + +/* Define to the function return type for recv. */ +#define RECV_TYPE_RETV ssize_t + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE + +/* Define to the type qualifier of arg 2 for send. */ +#define SEND_QUAL_ARG2 + +/* Define to the type of arg 1 for send. */ +#define SEND_TYPE_ARG1 int + +/* Define to the type of arg 2 for send. */ +#define SEND_TYPE_ARG2 void * + +/* Define to the type of arg 3 for send. */ +#define SEND_TYPE_ARG3 size_t + +/* Define to the type of arg 4 for send. */ +#define SEND_TYPE_ARG4 int + +/* Define to the function return type for send. */ +#define SEND_TYPE_RETV ssize_t + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME + +/* Define to disable non-blocking sockets. */ +#undef USE_BLOCKING_SOCKETS + +/* Define to avoid automatic inclusion of winsock.h */ +#undef WIN32_LEAN_AND_MEAN + +/* Type to use in place of in_addr_t when system does not provide it. */ +#undef in_addr_t + diff --git a/contrib/c-ares-cmake/linux/ares_build.h b/contrib/c-ares-cmake/linux/ares_build.h new file mode 100644 index 00000000000..bf7402e7997 --- /dev/null +++ b/contrib/c-ares-cmake/linux/ares_build.h @@ -0,0 +1,43 @@ +#ifndef __CARES_BUILD_H +#define __CARES_BUILD_H + +#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t +#define CARES_TYPEOF_ARES_SSIZE_T ssize_t + +/* Prefix names with CARES_ to make sure they don't conflict with other config.h + * files. We need to include some dependent headers that may be system specific + * for C-Ares */ +#define CARES_HAVE_SYS_TYPES_H +#define CARES_HAVE_SYS_SOCKET_H +/* #undef CARES_HAVE_WINDOWS_H */ +/* #undef CARES_HAVE_WS2TCPIP_H */ +/* #undef CARES_HAVE_WINSOCK2_H */ +/* #undef CARES_HAVE_WINDOWS_H */ +#define CARES_HAVE_ARPA_NAMESER_H +#define CARES_HAVE_ARPA_NAMESER_COMPAT_H + +#ifdef CARES_HAVE_SYS_TYPES_H +# include +#endif + +#ifdef CARES_HAVE_SYS_SOCKET_H +# include +#endif + +#ifdef CARES_HAVE_WINSOCK2_H +# include +#endif + +#ifdef CARES_HAVE_WS2TCPIP_H +# include +#endif + +#ifdef CARES_HAVE_WINDOWS_H +# include +#endif + + +typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t; +typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t; + +#endif /* __CARES_BUILD_H */ diff --git a/contrib/c-ares-cmake/linux/ares_config.h b/contrib/c-ares-cmake/linux/ares_config.h new file mode 100644 index 00000000000..e0ebf86e842 --- /dev/null +++ b/contrib/c-ares-cmake/linux/ares_config.h @@ -0,0 +1,432 @@ +/* Generated from ares_config.h.cmake */ + +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + +/* define this if ares is built for a big endian system */ +#undef ARES_BIG_ENDIAN + +/* when building as static part of libcurl */ +#undef BUILDING_LIBCURL + +/* Defined for build that exposes internal static functions for testing. */ +#undef CARES_EXPOSE_STATICS + +/* Defined for build with symbol hiding. */ +#undef CARES_SYMBOL_HIDING + +/* Definition to make a library symbol externally visible. */ +#undef CARES_SYMBOL_SCOPE_EXTERN + +/* Use resolver library to configure cares */ +/* #undef CARES_USE_LIBRESOLV */ + +/* if a /etc/inet dir is being used */ +#undef ETC_INET + +/* Define to the type of arg 2 for gethostname. */ +#define GETHOSTNAME_TYPE_ARG2 size_t + +/* Define to the type qualifier of arg 1 for getnameinfo. */ +#define GETNAMEINFO_QUAL_ARG1 + +/* Define to the type of arg 1 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * + +/* Define to the type of arg 2 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG2 socklen_t + +/* Define to the type of args 4 and 6 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG46 socklen_t + +/* Define to the type of arg 7 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG7 int + +/* Specifies the number of arguments to getservbyport_r */ +#define GETSERVBYPORT_R_ARGS 6 + +/* Specifies the number of arguments to getservbyname_r */ +#define GETSERVBYNAME_R_ARGS 6 + +/* Define to 1 if you have AF_INET6. */ +#define HAVE_AF_INET6 + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_NAMESER_COMPAT_H + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_NAMESER_H + +/* Define to 1 if you have the header file. */ +#define HAVE_ASSERT_H + +/* Define to 1 if you have the `bitncmp' function. */ +/* #undef HAVE_BITNCMP */ + +/* Define to 1 if bool is an available type. */ +#define HAVE_BOOL_T + +/* Define to 1 if you have the clock_gettime function and monotonic timer. */ +#define HAVE_CLOCK_GETTIME_MONOTONIC + +/* Define to 1 if you have the closesocket function. */ +/* #undef HAVE_CLOSESOCKET */ + +/* Define to 1 if you have the CloseSocket camel case function. */ +/* #undef HAVE_CLOSESOCKET_CAMEL */ + +/* Define to 1 if you have the connect function. */ +#define HAVE_CONNECT + +/* define if the compiler supports basic C++11 syntax */ +/* #undef HAVE_CXX11 */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H + +/* Define to 1 if you have the fcntl function. */ +#define HAVE_FCNTL + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H + +/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ +#define HAVE_FCNTL_O_NONBLOCK + +/* Define to 1 if you have the freeaddrinfo function. */ +#define HAVE_FREEADDRINFO + +/* Define to 1 if you have a working getaddrinfo function. */ +#define HAVE_GETADDRINFO + +/* Define to 1 if the getaddrinfo function is threadsafe. */ +/* #undef HAVE_GETADDRINFO_THREADSAFE */ + +/* Define to 1 if you have the getenv function. */ +#define HAVE_GETENV + +/* Define to 1 if you have the gethostbyaddr function. */ +#define HAVE_GETHOSTBYADDR + +/* Define to 1 if you have the gethostbyname function. */ +#define HAVE_GETHOSTBYNAME + +/* Define to 1 if you have the gethostname function. */ +#define HAVE_GETHOSTNAME + +/* Define to 1 if you have the getnameinfo function. */ +#define HAVE_GETNAMEINFO + +/* Define to 1 if you have the getservbyport_r function. */ +#define HAVE_GETSERVBYPORT_R + +/* Define to 1 if you have the getservbyname_r function. */ +#define HAVE_GETSERVBYNAME_R + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the `if_indextoname' function. */ +#define HAVE_IF_INDEXTONAME + +/* Define to 1 if you have a IPv6 capable working inet_net_pton function. */ +/* #undef HAVE_INET_NET_PTON */ + +/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ +#define HAVE_INET_NTOP + +/* Define to 1 if you have a IPv6 capable working inet_pton function. */ +#define HAVE_INET_PTON + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H + +/* Define to 1 if you have the ioctl function. */ +#define HAVE_IOCTL + +/* Define to 1 if you have the ioctlsocket function. */ +/* #undef HAVE_IOCTLSOCKET */ + +/* Define to 1 if you have the IoctlSocket camel case function. */ +/* #undef HAVE_IOCTLSOCKET_CAMEL */ + +/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. + */ +/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ + +/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ +/* #undef HAVE_IOCTLSOCKET_FIONBIO */ + +/* Define to 1 if you have a working ioctl FIONBIO function. */ +#define HAVE_IOCTL_FIONBIO + +/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ +#define HAVE_IOCTL_SIOCGIFADDR + +/* Define to 1 if you have the `resolve' library (-lresolve). */ +/* #undef HAVE_LIBRESOLV */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H + +/* if your compiler supports LL */ +#define HAVE_LL + +/* Define to 1 if the compiler supports the 'long long' data type. */ +#define HAVE_LONGLONG + +/* Define to 1 if you have the malloc.h header file. */ +#define HAVE_MALLOC_H + +/* Define to 1 if you have the memory.h header file. */ +#define HAVE_MEMORY_H + +/* Define to 1 if you have the MSG_NOSIGNAL flag. */ +#define HAVE_MSG_NOSIGNAL + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_TCP_H + +/* Define to 1 if you have the header file. */ +#define HAVE_NET_IF_H + +/* Define to 1 if you have PF_INET6. */ +#define HAVE_PF_INET6 + +/* Define to 1 if you have the recv function. */ +#define HAVE_RECV + +/* Define to 1 if you have the recvfrom function. */ +#define HAVE_RECVFROM + +/* Define to 1 if you have the send function. */ +#define HAVE_SEND + +/* Define to 1 if you have the setsockopt function. */ +#define HAVE_SETSOCKOPT + +/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ +/* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SIGNAL_H + +/* Define to 1 if sig_atomic_t is an available typedef. */ +#define HAVE_SIG_ATOMIC_T + +/* Define to 1 if sig_atomic_t is already defined as volatile. */ +/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ + +/* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */ +#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID + +/* Define to 1 if you have the socket function. */ +#define HAVE_SOCKET + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SOCKET_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDBOOL_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H + +/* Define to 1 if you have the strcasecmp function. */ +#define HAVE_STRCASECMP + +/* Define to 1 if you have the strcmpi function. */ +/* #undef HAVE_STRCMPI */ + +/* Define to 1 if you have the strdup function. */ +#define HAVE_STRDUP + +/* Define to 1 if you have the stricmp function. */ +/* #undef HAVE_STRICMP */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H + +/* Define to 1 if you have the strncasecmp function. */ +#define HAVE_STRNCASECMP + +/* Define to 1 if you have the strncmpi function. */ +/* #undef HAVE_STRNCMPI */ + +/* Define to 1 if you have the strnicmp function. */ +/* #undef HAVE_STRNICMP */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STROPTS_H + +/* Define to 1 if you have struct addrinfo. */ +#define HAVE_STRUCT_ADDRINFO + +/* Define to 1 if you have struct in6_addr. */ +#define HAVE_STRUCT_IN6_ADDR + +/* Define to 1 if you have struct sockaddr_in6. */ +#define HAVE_STRUCT_SOCKADDR_IN6 + +/* if struct sockaddr_storage is defined */ +#define HAVE_STRUCT_SOCKADDR_STORAGE + +/* Define to 1 if you have the timeval struct. */ +#define HAVE_STRUCT_TIMEVAL + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H + +/* Define to 1 if you have the windows.h header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to 1 if you have the winsock2.h header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define to 1 if you have the winsock.h header file. */ +/* #undef HAVE_WINSOCK_H */ + +/* Define to 1 if you have the writev function. */ +#define HAVE_WRITEV + +/* Define to 1 if you have the ws2tcpip.h header file. */ +/* #undef HAVE_WS2TCPIP_H */ + +/* Define to 1 if you have the __system_property_get function */ +#define HAVE___SYSTEM_PROPERTY_GET + +/* Define to 1 if you need the malloc.h header file even with stdlib.h */ +/* #undef NEED_MALLOC_H */ + +/* Define to 1 if you need the memory.h header file even with stdlib.h */ +/* #undef NEED_MEMORY_H */ + +/* a suitable file/device to read random data from */ +#define CARES_RANDOM_FILE "/dev/urandom" + +/* Define to the type qualifier pointed by arg 5 for recvfrom. */ +#define RECVFROM_QUAL_ARG5 + +/* Define to the type of arg 1 for recvfrom. */ +#define RECVFROM_TYPE_ARG1 int + +/* Define to the type pointed by arg 2 for recvfrom. */ +#define RECVFROM_TYPE_ARG2 void * + +/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ +#define RECVFROM_TYPE_ARG2_IS_VOID 0 + +/* Define to the type of arg 3 for recvfrom. */ +#define RECVFROM_TYPE_ARG3 size_t + +/* Define to the type of arg 4 for recvfrom. */ +#define RECVFROM_TYPE_ARG4 int + +/* Define to the type pointed by arg 5 for recvfrom. */ +#define RECVFROM_TYPE_ARG5 struct sockaddr * + +/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ +#define RECVFROM_TYPE_ARG5_IS_VOID 0 + +/* Define to the type pointed by arg 6 for recvfrom. */ +#define RECVFROM_TYPE_ARG6 socklen_t * + +/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ +#define RECVFROM_TYPE_ARG6_IS_VOID 0 + +/* Define to the function return type for recvfrom. */ +#define RECVFROM_TYPE_RETV ssize_t + +/* Define to the type of arg 1 for recv. */ +#define RECV_TYPE_ARG1 int + +/* Define to the type of arg 2 for recv. */ +#define RECV_TYPE_ARG2 void * + +/* Define to the type of arg 3 for recv. */ +#define RECV_TYPE_ARG3 size_t + +/* Define to the type of arg 4 for recv. */ +#define RECV_TYPE_ARG4 int + +/* Define to the function return type for recv. */ +#define RECV_TYPE_RETV ssize_t + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE + +/* Define to the type qualifier of arg 2 for send. */ +#define SEND_QUAL_ARG2 + +/* Define to the type of arg 1 for send. */ +#define SEND_TYPE_ARG1 int + +/* Define to the type of arg 2 for send. */ +#define SEND_TYPE_ARG2 void * + +/* Define to the type of arg 3 for send. */ +#define SEND_TYPE_ARG3 size_t + +/* Define to the type of arg 4 for send. */ +#define SEND_TYPE_ARG4 int + +/* Define to the function return type for send. */ +#define SEND_TYPE_RETV ssize_t + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME + +/* Define to disable non-blocking sockets. */ +#undef USE_BLOCKING_SOCKETS + +/* Define to avoid automatic inclusion of winsock.h */ +#undef WIN32_LEAN_AND_MEAN + +/* Type to use in place of in_addr_t when system does not provide it. */ +#undef in_addr_t + diff --git a/contrib/capnproto b/contrib/capnproto index c8189ec3c27..2e88221d3dd 160000 --- a/contrib/capnproto +++ b/contrib/capnproto @@ -1 +1 @@ -Subproject commit c8189ec3c27dacbd4a3288e682473010e377f593 +Subproject commit 2e88221d3dde22266bfccf40eaee6ff9b40d113d diff --git a/contrib/cctz b/contrib/cctz index 8c71d74bdf7..49c656c62fb 160000 --- a/contrib/cctz +++ b/contrib/cctz @@ -1 +1 @@ -Subproject commit 8c71d74bdf76c3fa401da845089ae60a6c0aeefa +Subproject commit 49c656c62fbd36a1bc20d64c476853bdb7cf7bb9 diff --git a/contrib/curl-cmake/curl_config.h b/contrib/curl-cmake/curl_config.h index 1efdd88600f..f56ba3eccd5 100644 --- a/contrib/curl-cmake/curl_config.h +++ b/contrib/curl-cmake/curl_config.h @@ -44,6 +44,8 @@ #define HAVE_SETJMP_H #define HAVE_SYS_STAT_H #define HAVE_UNISTD_H +#define HAVE_POLL_H +#define HAVE_PTHREAD_H #define ENABLE_IPV6 #define USE_OPENSSL diff --git a/contrib/datasketches-cpp b/contrib/datasketches-cpp index 7d73d7610db..7abd49bb2e7 160000 --- a/contrib/datasketches-cpp +++ b/contrib/datasketches-cpp @@ -1 +1 @@ -Subproject commit 7d73d7610db31d4e1ecde0fb3a7ee90ef371207f +Subproject commit 7abd49bb2e72bf9a5029993d31dcb1872da88292 diff --git a/contrib/jemalloc-cmake/include_linux_x86_64_musl/jemalloc/internal/jemalloc_internal_defs.h.in b/contrib/jemalloc-cmake/include_linux_x86_64_musl/jemalloc/internal/jemalloc_internal_defs.h.in index ff97d297d8f..e08a2bed2ec 100644 --- a/contrib/jemalloc-cmake/include_linux_x86_64_musl/jemalloc/internal/jemalloc_internal_defs.h.in +++ b/contrib/jemalloc-cmake/include_linux_x86_64_musl/jemalloc/internal/jemalloc_internal_defs.h.in @@ -415,7 +415,7 @@ /* * Defined if strerror_r returns char * if _GNU_SOURCE is defined. */ -#define JEMALLOC_STRERROR_R_RETURNS_CHAR_WITH_GNU_SOURCE +/* #undef JEMALLOC_STRERROR_R_RETURNS_CHAR_WITH_GNU_SOURCE */ /* Performs additional safety checks when defined. */ /* #undef JEMALLOC_OPT_SAFETY_CHECKS */ diff --git a/contrib/krb5 b/contrib/krb5 index 5149dea4e2b..d879821c7a4 160000 --- a/contrib/krb5 +++ b/contrib/krb5 @@ -1 +1 @@ -Subproject commit 5149dea4e2be0f67707383d2682b897c14631374 +Subproject commit d879821c7a4c70b0c3ad739d9951d1a2b1903df7 diff --git a/contrib/krb5-cmake/autoconf_linux.h b/contrib/krb5-cmake/autoconf_linux.h index 7b71d962d9a..54951f866a5 100644 --- a/contrib/krb5-cmake/autoconf_linux.h +++ b/contrib/krb5-cmake/autoconf_linux.h @@ -440,7 +440,9 @@ #define HAVE_STRERROR 1 /* Define to 1 if you have the `strerror_r' function. */ +#ifndef USE_MUSL #define HAVE_STRERROR_R 1 +#endif /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 diff --git a/contrib/libcpuid b/contrib/libcpuid index 8db3b8d2d32..503083acb77 160000 --- a/contrib/libcpuid +++ b/contrib/libcpuid @@ -1 +1 @@ -Subproject commit 8db3b8d2d32d22437f063ce692a1b9bb15e42d18 +Subproject commit 503083acb77edf9fbce22a05826307dff2ce96e6 diff --git a/contrib/libcxx-cmake/CMakeLists.txt b/contrib/libcxx-cmake/CMakeLists.txt index a501c4df64f..6f42a479588 100644 --- a/contrib/libcxx-cmake/CMakeLists.txt +++ b/contrib/libcxx-cmake/CMakeLists.txt @@ -54,9 +54,8 @@ set(SRCS add_library(cxx ${SRCS}) set_target_properties(cxx PROPERTIES FOLDER "contrib/libcxx-cmake") -target_include_directories(cxx SYSTEM BEFORE PUBLIC - $ - $/src) +target_include_directories(cxx SYSTEM BEFORE PRIVATE $) +target_include_directories(cxx SYSTEM BEFORE PUBLIC $) target_compile_definitions(cxx PRIVATE -D_LIBCPP_BUILDING_LIBRARY -DLIBCXX_BUILDING_LIBCXXABI) # Enable capturing stack traces for all exceptions. diff --git a/contrib/libgsasl b/contrib/libgsasl index 383ee28e82f..0324680f13f 160000 --- a/contrib/libgsasl +++ b/contrib/libgsasl @@ -1 +1 @@ -Subproject commit 383ee28e82f69fa16ed43b48bd9c8ee5b313ab84 +Subproject commit 0324680f13f22bb43df5353a08e26453d7d640ac diff --git a/contrib/libpq-cmake/CMakeLists.txt b/contrib/libpq-cmake/CMakeLists.txt index 280c0381393..91326422b43 100644 --- a/contrib/libpq-cmake/CMakeLists.txt +++ b/contrib/libpq-cmake/CMakeLists.txt @@ -63,6 +63,13 @@ target_include_directories (_libpq SYSTEM PUBLIC ${LIBPQ_SOURCE_DIR}) target_include_directories (_libpq SYSTEM PUBLIC "${LIBPQ_SOURCE_DIR}/include") target_include_directories (_libpq SYSTEM PRIVATE "${LIBPQ_SOURCE_DIR}/configs") +# NOTE: this is a dirty hack to avoid and instead pg_config.h should be shipped +# for different OS'es like for jemalloc, not one generic for all OS'es like +# now. +if (OS_DARWIN OR OS_FREEBSD OR USE_MUSL) + target_compile_definitions(_libpq PRIVATE -DSTRERROR_R_INT=1) +endif() + target_link_libraries (_libpq PRIVATE OpenSSL::SSL) add_library(ch_contrib::libpq ALIAS _libpq) diff --git a/contrib/librdkafka b/contrib/librdkafka index 6062e711a91..6f3b483426a 160000 --- a/contrib/librdkafka +++ b/contrib/librdkafka @@ -1 +1 @@ -Subproject commit 6062e711a919fb3b669b243b7dceabd045d0e4a2 +Subproject commit 6f3b483426a8c8ec950e27e446bec175cf8b553f diff --git a/contrib/libuv b/contrib/libuv index 95081e7c16c..3a85b2eb3d8 160000 --- a/contrib/libuv +++ b/contrib/libuv @@ -1 +1 @@ -Subproject commit 95081e7c16c9857babe6d4e2bc1c779198ea89ae +Subproject commit 3a85b2eb3d83f369b8a8cafd329d7e9dc28f60cf diff --git a/contrib/libuv-cmake/CMakeLists.txt b/contrib/libuv-cmake/CMakeLists.txt index 1a7714e47ce..ba6bc746c59 100644 --- a/contrib/libuv-cmake/CMakeLists.txt +++ b/contrib/libuv-cmake/CMakeLists.txt @@ -15,6 +15,7 @@ set(uv_sources src/inet.c src/random.c src/strscpy.c + src/strtok.c src/threadpool.c src/timer.c src/uv-common.c @@ -75,13 +76,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") list(APPEND uv_defines _GNU_SOURCE _POSIX_C_SOURCE=200112) list(APPEND uv_libraries rt) list(APPEND uv_sources + src/unix/epoll.c src/unix/linux-core.c src/unix/linux-inotify.c src/unix/linux-syscalls.c src/unix/procfs-exepath.c src/unix/random-getrandom.c - src/unix/random-sysctl-linux.c - src/unix/sysinfo-loadavg.c) + src/unix/random-sysctl-linux.c) endif() if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD") @@ -111,6 +112,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OS/390") src/unix/pthread-fixes.c src/unix/pthread-barrier.c src/unix/os390.c + src/unix/os390-proctitle.c src/unix/os390-syscalls.c) endif() diff --git a/contrib/llvm b/contrib/llvm index 20607e61728..0db5bf5bd24 160000 --- a/contrib/llvm +++ b/contrib/llvm @@ -1 +1 @@ -Subproject commit 20607e61728e97c969e536644c3c0c1bb1a50672 +Subproject commit 0db5bf5bd2452cd8f1283a1fcdc04845af705bfc diff --git a/contrib/nats-io b/contrib/nats-io index 6b2227f3675..1e2597c5461 160000 --- a/contrib/nats-io +++ b/contrib/nats-io @@ -1 +1 @@ -Subproject commit 6b2227f36757da090321e2d317569d2bd42c4cc1 +Subproject commit 1e2597c54616015077e53a26d56b6bac448eb1b6 diff --git a/contrib/nats-io-cmake/CMakeLists.txt b/contrib/nats-io-cmake/CMakeLists.txt index 5588d5750c4..579bf6f8ae4 100644 --- a/contrib/nats-io-cmake/CMakeLists.txt +++ b/contrib/nats-io-cmake/CMakeLists.txt @@ -18,6 +18,8 @@ elseif(WIN32) set(NATS_PLATFORM_INCLUDE "apple") endif() +add_definitions(-DNATS_HAS_TLS) + file(GLOB PS_SOURCES "${NATS_IO_SOURCE_DIR}/${NATS_PLATFORM_INCLUDE}/*.c") set(SRCS "${NATS_IO_SOURCE_DIR}/asynccb.c" diff --git a/contrib/sentry-native b/contrib/sentry-native index f431047ac8d..ae10fb8c224 160000 --- a/contrib/sentry-native +++ b/contrib/sentry-native @@ -1 +1 @@ -Subproject commit f431047ac8da13179c488018dddf1c0d0771a997 +Subproject commit ae10fb8c224c3f41571446e1ed7fd57b9e5e366b diff --git a/contrib/vectorscan b/contrib/vectorscan index 73695e419c2..f6250ae3e5a 160000 --- a/contrib/vectorscan +++ b/contrib/vectorscan @@ -1 +1 @@ -Subproject commit 73695e419c27af7fe2a099c7aa57931cc02aea5d +Subproject commit f6250ae3e5a3085000239313ad0689cc1e00cdc2 diff --git a/contrib/vectorscan-cmake/CMakeLists.txt b/contrib/vectorscan-cmake/CMakeLists.txt index bc17105be99..d6c626c1612 100644 --- a/contrib/vectorscan-cmake/CMakeLists.txt +++ b/contrib/vectorscan-cmake/CMakeLists.txt @@ -1,11 +1,9 @@ # We use vectorscan, a portable and API/ABI-compatible drop-in replacement for hyperscan. -if (ARCH_AMD64) +if ((ARCH_AMD64 AND NOT NO_SSE3_OR_HIGHER) OR ARCH_AARCH64) option (ENABLE_VECTORSCAN "Enable vectorscan library" ${ENABLE_LIBRARIES}) endif() -# TODO: vectorscan supports ARM yet some tests involving cyrillic letters fail (PR #38171) ... needs further investigation - # TODO PPC should generally work but needs manual generation of ppc/config.h file on a PPC machine if (NOT ENABLE_VECTORSCAN) @@ -236,11 +234,27 @@ set (SRCS # The original build system invokes ragel on src/parser/{Parser|control_verbs}.rl (+ a few more .rl files which are unneeded). To avoid a # build-time dependency on ragel (via contrib/ or find_program()), add the manually generated output of ragel to the sources. -# Please regenerate these files if you update vectorscan. -list (APPEND SRCS - "${LIBRARY_DIR}/../vectorscan-cmake/rageled_files/Parser.cpp" - "${LIBRARY_DIR}/../vectorscan-cmake/rageled_files/control_verbs.cpp" -) +# +# Please regenerate these files if you update vectorscan. They must be regenerated for each platform separately because ragel produces for +# weird reasons different constants in the output. +# +# Also, please use upstream versions of colm and ragel, the packages in Ubuntu 22.04 seem to produce wrong output on ARM. +if (ARCH_AMD64) + list (APPEND SRCS + "${LIBRARY_DIR}/../vectorscan-cmake/rageled_files/amd64/Parser.cpp" + "${LIBRARY_DIR}/../vectorscan-cmake/rageled_files/amd64/control_verbs.cpp" + ) +elseif (ARCH_AARCH64) + list (APPEND SRCS + "${LIBRARY_DIR}/../vectorscan-cmake/rageled_files/aarch64/Parser.cpp" + "${LIBRARY_DIR}/../vectorscan-cmake/rageled_files/aarch64/control_verbs.cpp" + ) + set_source_files_properties( + "${LIBRARY_DIR}/../vectorscan-cmake/rageled_files/aarch64/Parser.cpp" + "${LIBRARY_DIR}/../vectorscan-cmake/rageled_files/aarch64/control_verbs.cpp" + COMPILE_FLAGS -Wno-c++11-narrowing + ) +endif() # Platform-dependent files if (ARCH_AMD64) @@ -290,7 +304,7 @@ target_include_directories (_vectorscan SYSTEM PUBLIC "${LIBRARY_DIR}/src") # Please regenerate these files if you update vectorscan. if (ARCH_AMD64) - target_include_directories (_vectorscan PRIVATE x86_64) + target_include_directories (_vectorscan PRIVATE amd64) endif () if (ARCH_AARCH64) diff --git a/contrib/vectorscan-cmake/x86_64/config.h b/contrib/vectorscan-cmake/amd64/config.h similarity index 100% rename from contrib/vectorscan-cmake/x86_64/config.h rename to contrib/vectorscan-cmake/amd64/config.h diff --git a/contrib/vectorscan-cmake/rageled_files/Parser.cpp b/contrib/vectorscan-cmake/rageled_files/Parser.cpp deleted file mode 100644 index aebbd7ace1e..00000000000 --- a/contrib/vectorscan-cmake/rageled_files/Parser.cpp +++ /dev/null @@ -1,5605 +0,0 @@ - -#line 1 "Parser.rl" -/* - * Copyright (c) 2015-2017, Intel Corporation - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * 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. - * * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. - */ - -/** \file - * \brief Parser code (generated with Ragel from Parser.rl). - */ - -#include "config.h" - -/* Parser.cpp is a built source, may not be in same dir as parser files */ -#include "parser/check_refs.h" -#include "parser/control_verbs.h" -#include "parser/ComponentAlternation.h" -#include "parser/ComponentAssertion.h" -#include "parser/ComponentAtomicGroup.h" -#include "parser/ComponentBackReference.h" -#include "parser/ComponentBoundary.h" -#include "parser/ComponentByte.h" -#include "parser/ComponentClass.h" -#include "parser/ComponentCondReference.h" -#include "parser/ComponentEmpty.h" -#include "parser/ComponentEUS.h" -#include "parser/Component.h" -#include "parser/ComponentRepeat.h" -#include "parser/ComponentSequence.h" -#include "parser/ComponentWordBoundary.h" -#include "parser/parse_error.h" -#include "parser/Parser.h" -#include "ue2common.h" -#include "util/compare.h" -#include "util/flat_containers.h" -#include "util/unicode_def.h" -#include "util/verify_types.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace std; - -namespace ue2 { - -#define PUSH_SEQUENCE do {\ - sequences.push_back(ExprState(currentSeq, (size_t)(ts - ptr), \ - mode)); \ - } while(0) -#define POP_SEQUENCE do {\ - currentSeq = sequences.back().seq; \ - mode = sequences.back().mode; \ - sequences.pop_back(); \ - } while(0) - -namespace { - -/** \brief Structure representing current state as we're parsing (current - * sequence, current options). Stored in the 'sequences' vector. */ -struct ExprState { - ExprState(ComponentSequence *seq_in, size_t offset, - const ParseMode &mode_in) : - seq(seq_in), seqOffset(offset), mode(mode_in) {} - - ComponentSequence *seq; //!< current sequence - size_t seqOffset; //!< offset seq was entered, for error reporting - ParseMode mode; //!< current mode flags -}; - -} // namespace - -static -unsigned parseAsDecimal(unsigned oct) { - // The input was parsed as octal, but should have been parsed as decimal. - // Deconstruct the octal number and reconstruct into decimal - unsigned ret = 0; - unsigned multiplier = 1; - while (oct) { - ret += (oct & 0x7) * multiplier; - oct >>= 3; - multiplier *= 10; - } - return ret; -} - -/** \brief Maximum value for a positive integer. We use INT_MAX, as that's what - * PCRE uses. */ -static constexpr u32 MAX_NUMBER = INT_MAX; - -static -void pushDec(u32 *acc, char raw_digit) { - assert(raw_digit >= '0' && raw_digit <= '9'); - u32 digit_val = raw_digit - '0'; - - // Ensure that we don't overflow. - u64a val = ((u64a)*acc * 10) + digit_val; - if (val > MAX_NUMBER) { - throw LocatedParseError("Number is too big"); - } - - *acc = verify_u32(val); -} - -static -void pushOct(u32 *acc, char raw_digit) { - assert(raw_digit >= '0' && raw_digit <= '7'); - u32 digit_val = raw_digit - '0'; - - // Ensure that we don't overflow. - u64a val = ((u64a)*acc * 8) + digit_val; - if (val > MAX_NUMBER) { - throw LocatedParseError("Number is too big"); - } - - *acc = verify_u32(val); -} - -static -void throwInvalidRepeat(void) { - throw LocatedParseError("Invalid repeat"); -} - -static -void throwInvalidUtf8(void) { - throw ParseError("Expression is not valid UTF-8."); -} - -/** - * Adds the given child component to the parent sequence, returning a pointer - * to the new (child) "current sequence". - */ -static -ComponentSequence *enterSequence(ComponentSequence *parent, - unique_ptr child) { - assert(parent); - assert(child); - - ComponentSequence *seq = child.get(); - parent->addComponent(move(child)); - return seq; -} - -static -void addLiteral(ComponentSequence *currentSeq, char c, const ParseMode &mode) { - if (mode.utf8 && mode.caseless) { - /* leverage ComponentClass to generate the vertices */ - auto cc = getComponentClass(mode); - assert(cc); - cc->add(c); - cc->finalize(); - currentSeq->addComponent(move(cc)); - } else { - currentSeq->addComponent(getLiteralComponentClass(c, mode.caseless)); - } -} - -static -void addEscaped(ComponentSequence *currentSeq, unichar accum, - const ParseMode &mode, const char *err_msg) { - if (mode.utf8) { - /* leverage ComponentClass to generate the vertices */ - auto cc = getComponentClass(mode); - assert(cc); - cc->add(accum); - cc->finalize(); - currentSeq->addComponent(move(cc)); - } else { - if (accum > 255) { - throw LocatedParseError(err_msg); - } - addLiteral(currentSeq, (char)accum, mode); - } -} - -static -void addEscapedOctal(ComponentSequence *currentSeq, unichar accum, - const ParseMode &mode) { - addEscaped(currentSeq, accum, mode, "Octal value is greater than \\377"); -} - -static -void addEscapedHex(ComponentSequence *currentSeq, unichar accum, - const ParseMode &mode) { - addEscaped(currentSeq, accum, mode, - "Hexadecimal value is greater than \\xFF"); -} - -#define SLASH_C_ERROR "\\c must be followed by an ASCII character" - -static -u8 decodeCtrl(char raw) { - if (raw & 0x80) { - throw LocatedParseError(SLASH_C_ERROR); - } - return mytoupper(raw) ^ 0x40; -} - -static -unichar readUtf8CodePoint2c(const char *s) { - auto *ts = (const u8 *)s; - assert(ts[0] >= 0xc0 && ts[0] < 0xe0); - assert(ts[1] >= 0x80 && ts[1] < 0xc0); - unichar val = ts[0] & 0x1f; - val <<= 6; - val |= ts[1] & 0x3f; - DEBUG_PRINTF("utf8 %02hhx %02hhx ->\\x{%x}\n", ts[0], - ts[1], val); - return val; -} - -static -unichar readUtf8CodePoint3c(const char *s) { - auto *ts = (const u8 *)s; - assert(ts[0] >= 0xe0 && ts[0] < 0xf0); - assert(ts[1] >= 0x80 && ts[1] < 0xc0); - assert(ts[2] >= 0x80 && ts[2] < 0xc0); - unichar val = ts[0] & 0x0f; - val <<= 6; - val |= ts[1] & 0x3f; - val <<= 6; - val |= ts[2] & 0x3f; - DEBUG_PRINTF("utf8 %02hhx %02hhx %02hhx ->\\x{%x}\n", ts[0], - ts[1], ts[2], val); - return val; -} - -static -unichar readUtf8CodePoint4c(const char *s) { - auto *ts = (const u8 *)s; - assert(ts[0] >= 0xf0 && ts[0] < 0xf8); - assert(ts[1] >= 0x80 && ts[1] < 0xc0); - assert(ts[2] >= 0x80 && ts[2] < 0xc0); - assert(ts[3] >= 0x80 && ts[3] < 0xc0); - unichar val = ts[0] & 0x07; - val <<= 6; - val |= ts[1] & 0x3f; - val <<= 6; - val |= ts[2] & 0x3f; - val <<= 6; - val |= ts[3] & 0x3f; - DEBUG_PRINTF("utf8 %02hhx %02hhx %02hhx %02hhx ->\\x{%x}\n", ts[0], - ts[1], ts[2], ts[3], val); - return val; -} - - -#line 1909 "Parser.rl" - - - -#line 281 "Parser.cpp" -static const short _regex_actions[] = { - 0, 1, 0, 1, 1, 1, 2, 1, - 3, 1, 4, 1, 7, 1, 8, 1, - 9, 1, 10, 1, 11, 1, 12, 1, - 13, 1, 15, 1, 16, 1, 17, 1, - 18, 1, 19, 1, 20, 1, 21, 1, - 22, 1, 23, 1, 24, 1, 25, 1, - 26, 1, 27, 1, 28, 1, 29, 1, - 30, 1, 31, 1, 32, 1, 33, 1, - 34, 1, 35, 1, 36, 1, 37, 1, - 38, 1, 39, 1, 40, 1, 41, 1, - 42, 1, 43, 1, 44, 1, 45, 1, - 46, 1, 47, 1, 48, 1, 49, 1, - 50, 1, 51, 1, 52, 1, 53, 1, - 54, 1, 55, 1, 56, 1, 57, 1, - 58, 1, 59, 1, 60, 1, 61, 1, - 62, 1, 63, 1, 64, 1, 65, 1, - 66, 1, 67, 1, 68, 1, 69, 1, - 70, 1, 71, 1, 72, 1, 73, 1, - 74, 1, 75, 1, 76, 1, 77, 1, - 78, 1, 79, 1, 80, 1, 81, 1, - 82, 1, 83, 1, 84, 1, 85, 1, - 86, 1, 87, 1, 88, 1, 89, 1, - 90, 1, 91, 1, 92, 1, 93, 1, - 94, 1, 95, 1, 96, 1, 97, 1, - 98, 1, 99, 1, 100, 1, 101, 1, - 102, 1, 103, 1, 104, 1, 105, 1, - 106, 1, 107, 1, 108, 1, 109, 1, - 110, 1, 111, 1, 112, 1, 113, 1, - 114, 1, 115, 1, 116, 1, 117, 1, - 118, 1, 119, 1, 120, 1, 121, 1, - 122, 1, 123, 1, 124, 1, 125, 1, - 126, 1, 127, 1, 128, 1, 129, 1, - 130, 1, 131, 1, 132, 1, 133, 1, - 134, 1, 135, 1, 136, 1, 137, 1, - 138, 1, 139, 1, 140, 1, 141, 1, - 142, 1, 143, 1, 144, 1, 145, 1, - 146, 1, 147, 1, 148, 1, 149, 1, - 150, 1, 151, 1, 152, 1, 153, 1, - 154, 1, 155, 1, 156, 1, 157, 1, - 158, 1, 159, 1, 160, 1, 161, 1, - 162, 1, 163, 1, 164, 1, 165, 1, - 166, 1, 167, 1, 168, 1, 169, 1, - 170, 1, 171, 1, 172, 1, 173, 1, - 174, 1, 175, 1, 176, 1, 177, 1, - 178, 1, 179, 1, 180, 1, 181, 1, - 182, 1, 183, 1, 184, 1, 185, 1, - 186, 1, 187, 1, 188, 1, 189, 1, - 190, 1, 191, 1, 192, 1, 193, 1, - 194, 1, 195, 1, 196, 1, 197, 1, - 198, 1, 199, 1, 200, 1, 201, 1, - 202, 1, 203, 1, 204, 1, 205, 1, - 206, 1, 207, 1, 208, 1, 209, 1, - 210, 1, 211, 1, 212, 1, 213, 1, - 214, 1, 215, 1, 216, 1, 217, 1, - 218, 1, 219, 1, 220, 1, 221, 1, - 222, 1, 223, 1, 224, 1, 225, 1, - 226, 1, 227, 1, 228, 1, 229, 1, - 230, 1, 231, 1, 232, 1, 233, 1, - 234, 1, 235, 1, 236, 1, 237, 1, - 240, 1, 242, 1, 243, 1, 244, 1, - 245, 1, 246, 1, 247, 1, 248, 1, - 249, 1, 250, 1, 251, 1, 252, 1, - 253, 1, 254, 1, 255, 1, 256, 1, - 257, 1, 258, 1, 259, 1, 260, 1, - 261, 1, 262, 1, 263, 1, 264, 1, - 265, 1, 266, 1, 267, 1, 268, 1, - 269, 1, 270, 1, 271, 1, 272, 1, - 273, 1, 274, 1, 275, 1, 276, 1, - 277, 1, 278, 1, 279, 1, 280, 1, - 281, 1, 282, 1, 283, 1, 284, 1, - 285, 1, 286, 1, 287, 1, 288, 1, - 289, 1, 290, 1, 291, 1, 292, 1, - 293, 1, 294, 1, 295, 1, 296, 1, - 297, 1, 298, 1, 299, 1, 300, 1, - 301, 1, 302, 1, 303, 1, 307, 1, - 308, 1, 309, 1, 310, 1, 311, 1, - 312, 1, 313, 1, 314, 1, 315, 1, - 316, 1, 317, 1, 318, 1, 319, 1, - 320, 1, 321, 1, 322, 1, 323, 1, - 324, 1, 325, 1, 326, 1, 327, 1, - 328, 1, 329, 1, 330, 1, 331, 1, - 332, 1, 333, 1, 334, 1, 335, 1, - 336, 1, 337, 1, 338, 1, 342, 1, - 343, 1, 344, 1, 345, 1, 346, 1, - 347, 1, 348, 1, 349, 1, 350, 1, - 352, 1, 353, 1, 354, 1, 355, 1, - 356, 1, 357, 1, 358, 1, 359, 1, - 360, 1, 361, 1, 362, 1, 363, 1, - 364, 1, 365, 1, 366, 1, 367, 1, - 368, 1, 369, 1, 370, 1, 371, 1, - 372, 1, 373, 1, 374, 1, 375, 1, - 376, 1, 377, 1, 378, 1, 379, 1, - 380, 1, 381, 1, 382, 1, 383, 1, - 384, 1, 385, 1, 386, 1, 387, 1, - 388, 1, 389, 1, 390, 1, 391, 1, - 392, 1, 393, 1, 394, 1, 395, 1, - 396, 1, 397, 1, 398, 1, 399, 1, - 400, 1, 401, 1, 402, 1, 403, 1, - 404, 1, 405, 1, 406, 1, 407, 1, - 408, 1, 409, 1, 410, 1, 411, 1, - 412, 1, 413, 1, 414, 1, 415, 1, - 416, 1, 417, 1, 418, 1, 419, 1, - 420, 1, 421, 1, 422, 1, 423, 1, - 424, 1, 425, 1, 426, 1, 427, 1, - 428, 1, 429, 1, 430, 1, 431, 1, - 432, 1, 433, 1, 434, 1, 435, 1, - 436, 2, 3, 0, 2, 4, 5, 2, - 5, 1, 2, 9, 10, 2, 9, 238, - 2, 9, 239, 2, 9, 339, 2, 10, - 1, 2, 10, 340, 2, 10, 341, 2, - 11, 241, 2, 11, 351, 2, 12, 241, - 2, 12, 351, 2, 13, 241, 2, 13, - 351, 2, 14, 375, 2, 14, 376, 2, - 25, 0, 2, 25, 3, 2, 25, 6, - 2, 25, 14, 3, 25, 5, 306, 3, - 25, 10, 305, 3, 25, 14, 15, 4, - 25, 9, 304, 10 -}; - -static const char _regex_cond_offsets[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,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3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, - 18, 19, 20, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 27, 28, 29, 31, 31, 36, - 36, 37, 38, 39, 44, 44, 45, 46, - 47, 47 -}; - -static const char _regex_cond_lengths[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0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 0, 5, 0, - 1, 1, 1, 5, 0, 1, 1, 1, - 0, 0 -}; - -static const short _regex_cond_keys[] = { - -128, -65, -128, -65, -128, -65, -128, -65, - -128, -65, -128, -65, -128, -65, -128, -65, - -128, -65, -128, -65, -128, -65, -128, -65, - -128, -65, -64, -33, -32, -17, -16, -9, - -8, -1, 35, 35, -128, -65, -128, -65, - -128, -65, -128, -65, -64, -33, -32, -17, - -16, -9, -8, -1, -128, -65, -128, -65, - -128, -65, 93, 93, 94, 94, -128, -65, - -64, -33, -32, -17, -16, -9, -8, -1, - -128, -65, -128, -65, -128, -65, -128, -65, - -64, -33, -32, -17, -16, -9, -8, -1, - -128, -65, -128, -65, -128, -65, 0 -}; - -static const char _regex_cond_spaces[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -static const short _regex_key_offsets[] = { - 0, 0, 1, 23, 31, 39, 46, 54, - 55, 63, 71, 79, 86, 94, 97, 99, - 108, 115, 123, 131, 134, 140, 148, 151, - 158, 165, 173, 180, 184, 191, 194, 197, - 199, 202, 205, 207, 210, 213, 215, 216, - 218, 219, 227, 229, 232, 235, 236, 244, - 252, 260, 268, 275, 283, 290, 298, 305, - 313, 315, 318, 325, 329, 332, 335, 337, - 339, 341, 342, 344, 345, 347, 349, 350, - 351, 353, 354, 355, 356, 357, 358, 359, - 360, 361, 362, 363, 364, 365, 366, 369, - 370, 371, 372, 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, 383, 384, 385, - 386, 387, 388, 389, 390, 392, 393, 394, - 395, 396, 397, 399, 400, 401, 402, 403, - 404, 405, 406, 408, 409, 410, 411, 412, - 413, 414, 415, 416, 417, 418, 419, 420, - 421, 422, 423, 424, 425, 426, 427, 429, - 430, 431, 432, 433, 434, 435, 436, 437, - 438, 439, 440, 441, 442, 443, 444, 445, - 446, 447, 448, 450, 451, 452, 453, 454, - 455, 456, 457, 458, 459, 461, 462, 463, - 464, 465, 466, 467, 468, 469, 470, 471, - 472, 473, 474, 475, 476, 477, 478, 479, - 480, 481, 482, 483, 484, 485, 486, 487, - 488, 489, 490, 491, 492, 493, 494, 495, - 496, 497, 498, 499, 500, 501, 502, 503, - 504, 505, 506, 507, 508, 509, 510, 511, - 512, 513, 514, 515, 516, 517, 519, 520, - 521, 522, 523, 524, 525, 526, 527, 528, - 529, 530, 531, 532, 533, 534, 535, 536, - 537, 538, 539, 540, 541, 542, 543, 544, - 545, 546, 547, 548, 549, 550, 551, 552, - 553, 554, 555, 556, 557, 558, 559, 561, - 562, 563, 564, 565, 566, 567, 568, 569, - 570, 571, 572, 573, 574, 575, 576, 577, - 578, 579, 580, 582, 583, 584, 585, 586, - 587, 588, 589, 590, 591, 592, 593, 594, - 595, 596, 597, 601, 602, 603, 604, 605, - 606, 607, 608, 609, 610, 611, 612, 613, - 614, 615, 616, 617, 618, 620, 621, 622, - 623, 624, 625, 626, 627, 628, 629, 631, - 632, 633, 634, 635, 636, 637, 640, 641, - 642, 643, 644, 645, 646, 647, 648, 650, - 651, 652, 653, 654, 655, 656, 658, 659, - 660, 661, 662, 663, 664, 665, 666, 667, - 668, 669, 670, 671, 672, 673, 674, 675, - 676, 677, 678, 679, 680, 681, 682, 683, - 684, 685, 686, 687, 688, 689, 690, 691, - 692, 693, 694, 695, 696, 697, 698, 699, - 700, 701, 702, 704, 705, 706, 707, 708, - 709, 710, 714, 715, 716, 717, 718, 719, - 720, 721, 722, 723, 724, 725, 726, 727, - 728, 729, 730, 731, 732, 733, 734, 735, - 736, 737, 738, 739, 740, 741, 742, 743, - 744, 745, 746, 747, 748, 749, 750, 752, - 753, 754, 755, 756, 757, 758, 759, 760, - 761, 762, 763, 764, 765, 766, 767, 768, - 769, 770, 771, 773, 774, 775, 776, 777, - 778, 779, 780, 781, 782, 783, 784, 785, - 786, 787, 788, 789, 790, 791, 792, 793, - 794, 795, 796, 797, 798, 799, 800, 801, - 802, 803, 805, 806, 807, 808, 809, 810, - 811, 812, 813, 814, 815, 816, 817, 820, - 822, 823, 824, 825, 826, 827, 828, 829, - 830, 833, 834, 835, 836, 837, 838, 839, - 840, 841, 842, 843, 844, 845, 846, 847, - 849, 850, 851, 853, 854, 855, 856, 857, - 858, 859, 860, 861, 862, 863, 864, 865, - 866, 867, 868, 869, 870, 871, 872, 873, - 874, 875, 876, 877, 880, 883, 885, 900, - 903, 906, 908, 922, 927, 932, 936, 940, - 943, 946, 950, 954, 957, 960, 964, 968, - 972, 975, 978, 982, 986, 990, 994, 997, - 1000, 1004, 1008, 1012, 1016, 1019, 1022, 1026, - 1030, 1034, 1038, 1041, 1044, 1048, 1052, 1056, - 1060, 1063, 1066, 1070, 1074, 1078, 1082, 1085, - 1088, 1093, 1097, 1101, 1105, 1108, 1111, 1115, - 1119, 1123, 1126, 1129, 1133, 1137, 1141, 1145, - 1148, 1151, 1155, 1159, 1163, 1167, 1170, 1173, - 1177, 1181, 1185, 1188, 1191, 1195, 1199, 1203, - 1207, 1211, 1214, 1217, 1222, 1227, 1231, 1235, - 1238, 1241, 1245, 1249, 1252, 1255, 1259, 1263, - 1267, 1270, 1273, 1277, 1281, 1285, 1289, 1292, - 1295, 1299, 1303, 1307, 1311, 1314, 1317, 1321, - 1325, 1329, 1333, 1336, 1339, 1343, 1347, 1351, - 1355, 1358, 1361, 1365, 1369, 1373, 1377, 1380, - 1383, 1388, 1392, 1396, 1400, 1403, 1406, 1410, - 1414, 1418, 1421, 1424, 1428, 1432, 1436, 1440, - 1443, 1446, 1450, 1454, 1458, 1462, 1465, 1468, - 1472, 1476, 1480, 1483, 1486, 1490, 1494, 1498, - 1502, 1506, 1509, 1512, 1515, 1518, 1520, 1522, - 1525, 1532, 1534, 1536, 1538, 1540, 1542, 1544, - 1546, 1548, 1550, 1584, 1586, 1593, 1600, 1614, - 1616, 1622, 1625, 1634, 1635, 1638, 1641, 1648, - 1650, 1652, 1654, 1657, 1702, 1704, 1706, 1710, - 1714, 1716, 1717, 1717, 1723, 1725, 1727, 1729, - 1731, 1734, 1735, 1736, 1743, 1749, 1755, 1757, - 1759, 1761, 1763, 1765, 1767, 1768, 1771, 1794, - 1797, 1802, 1811, 1813, 1814, 1816, 1821, 1824, - 1826, 1828, 1829, 1831, 1841, 1847, 1848, 1853, - 1857, 1865, 1867, 1876, 1880, 1881, 1882, 1886, - 1887, 1890, 1890, 1897, 1913, 1916, 1955, 1957, - 1959, 1961, 1963, 1964, 1964, 1965, 1966, 1973, - 1979, 1985, 1987, 1989, 1991, 2000, 2002, 2015, - 2016, 2018, 2020, 2022, 2035, 2036, 2038, 2040, - 2042, 2043 -}; - -static const short _regex_trans_keys[] = { - 41, 33, 35, 38, 39, 40, 41, 43, - 45, 58, 60, 61, 62, 63, 67, 80, - 105, 109, 115, 120, 123, 48, 57, 41, - 95, 48, 57, 65, 90, 97, 122, 39, - 95, 48, 57, 65, 90, 97, 122, 95, - 48, 57, 65, 90, 97, 122, 39, 95, - 48, 57, 65, 90, 97, 122, 41, 41, - 95, 48, 57, 65, 90, 97, 122, 41, - 95, 48, 57, 65, 90, 97, 122, 41, - 95, 48, 57, 65, 90, 97, 122, 95, - 48, 57, 65, 90, 97, 122, 62, 95, - 48, 57, 65, 90, 97, 122, 33, 60, - 61, 33, 61, 38, 41, 95, 48, 57, - 65, 90, 97, 122, 95, 48, 57, 65, - 90, 97, 122, 41, 95, 48, 57, 65, - 90, 97, 122, 41, 95, 48, 57, 65, - 90, 97, 122, 41, 48, 57, 41, 58, - 105, 109, 115, 120, 62, 95, 48, 57, - 65, 90, 97, 122, 41, 48, 57, 95, - 48, 57, 65, 90, 97, 122, 95, 48, - 57, 65, 90, 97, 122, 41, 95, 48, - 57, 65, 90, 97, 122, 95, 48, 57, - 65, 90, 97, 122, 105, 109, 115, 120, - 41, 45, 58, 105, 109, 115, 120, 46, - 92, 93, 46, 92, 93, 46, 92, 58, - 92, 93, 58, 92, 93, 58, 92, 61, - 92, 93, 61, 92, 93, 61, 92, 39, - 48, 57, 62, 45, 95, 48, 57, 65, - 90, 97, 122, 48, 57, 125, 48, 57, - 125, 48, 57, 125, 95, 125, 48, 57, - 65, 90, 97, 122, 95, 125, 48, 57, - 65, 90, 97, 122, 95, 125, 48, 57, - 65, 90, 97, 122, 95, 125, 48, 57, - 65, 90, 97, 122, 95, 48, 57, 65, - 90, 97, 122, 39, 95, 48, 57, 65, - 90, 97, 122, 95, 48, 57, 65, 90, - 97, 122, 62, 95, 48, 57, 65, 90, - 97, 122, 95, 48, 57, 65, 90, 97, - 122, 95, 125, 48, 57, 65, 90, 97, - 122, 48, 55, 125, 48, 55, 125, 48, - 57, 65, 70, 97, 102, 44, 125, 48, - 57, 125, 48, 57, 125, 48, 57, 384, - 447, 384, 447, 384, 447, 41, 41, 80, - 41, 41, 70, 41, 56, 41, 121, 97, - 109, 98, 105, 99, 101, 110, 105, 97, - 110, 101, 115, 116, 97, 110, 108, 109, - 116, 105, 110, 101, 115, 101, 117, 109, - 97, 107, 110, 103, 97, 108, 105, 112, - 111, 109, 111, 102, 111, 97, 104, 105, - 109, 105, 108, 108, 101, 103, 104, 105, - 110, 101, 115, 101, 105, 100, 110, 114, - 97, 100, 105, 97, 110, 95, 65, 98, - 111, 114, 105, 103, 105, 110, 97, 108, - 105, 97, 110, 97, 101, 109, 114, 111, - 107, 101, 101, 109, 111, 110, 116, 105, - 99, 110, 101, 105, 102, 111, 114, 109, - 112, 114, 114, 105, 111, 116, 105, 108, - 108, 105, 99, 115, 118, 101, 114, 101, - 116, 97, 110, 97, 103, 97, 114, 105, - 121, 112, 116, 105, 97, 110, 95, 72, - 105, 101, 114, 111, 103, 108, 121, 112, - 104, 115, 104, 105, 111, 112, 105, 99, - 111, 114, 103, 105, 97, 110, 97, 103, - 111, 108, 105, 116, 105, 99, 116, 104, - 105, 99, 101, 101, 107, 106, 114, 97, - 114, 97, 116, 105, 109, 117, 107, 104, - 105, 110, 117, 108, 110, 111, 111, 98, - 114, 101, 119, 114, 97, 103, 97, 110, - 97, 112, 101, 114, 105, 97, 108, 95, - 65, 114, 97, 109, 97, 105, 99, 104, - 115, 101, 114, 105, 116, 101, 100, 99, - 114, 105, 112, 116, 105, 111, 110, 97, - 108, 95, 80, 97, 104, 114, 108, 97, - 118, 105, 116, 104, 105, 97, 110, 118, - 97, 110, 101, 115, 101, 105, 110, 116, - 121, 116, 104, 105, 110, 97, 100, 97, - 97, 107, 97, 110, 97, 97, 104, 95, - 76, 105, 97, 109, 114, 111, 115, 104, - 116, 104, 105, 101, 114, 111, 116, 105, - 110, 112, 99, 104, 97, 109, 110, 115, - 98, 117, 101, 97, 114, 95, 66, 117, - 99, 100, 105, 97, 110, 105, 97, 110, - 108, 110, 97, 121, 97, 108, 97, 109, - 100, 97, 105, 99, 116, 101, 105, 95, - 77, 97, 121, 101, 107, 110, 103, 111, - 108, 105, 97, 110, 97, 110, 109, 97, - 114, 119, 95, 84, 97, 105, 95, 76, - 117, 101, 111, 104, 97, 109, 95, 100, - 67, 104, 105, 107, 105, 95, 73, 80, - 83, 84, 116, 97, 108, 105, 99, 101, - 114, 115, 105, 97, 110, 111, 117, 116, - 104, 95, 65, 114, 97, 98, 105, 97, - 110, 117, 114, 107, 105, 99, 105, 121, - 97, 109, 97, 110, 121, 97, 97, 111, - 103, 115, 95, 80, 97, 101, 110, 105, - 99, 105, 97, 110, 106, 97, 110, 103, - 110, 105, 99, 109, 117, 97, 114, 105, - 116, 97, 110, 114, 97, 115, 104, 116, - 114, 97, 97, 118, 105, 97, 110, 110, - 104, 97, 108, 97, 110, 100, 97, 110, - 101, 115, 101, 108, 114, 111, 116, 105, - 95, 78, 97, 103, 114, 105, 105, 97, - 99, 103, 105, 109, 97, 98, 108, 111, - 103, 97, 110, 119, 97, 95, 76, 84, - 86, 101, 104, 97, 109, 105, 101, 116, - 105, 108, 108, 117, 103, 117, 97, 97, - 105, 110, 97, 98, 102, 101, 116, 97, - 110, 105, 110, 97, 103, 104, 97, 114, - 105, 116, 105, 99, 105, 110, 115, 112, - 100, 123, 94, 125, 94, 46, 92, 93, - 46, 92, 93, 46, 92, 58, 92, 93, - 94, 97, 98, 99, 100, 103, 108, 112, - 115, 117, 119, 120, 58, 92, 93, 58, - 92, 93, 58, 92, 58, 92, 93, 97, - 98, 99, 100, 103, 108, 112, 115, 117, - 119, 120, 58, 92, 93, 108, 115, 58, - 92, 93, 110, 112, 58, 92, 93, 117, - 58, 92, 93, 109, 58, 92, 93, 58, - 92, 93, 58, 92, 93, 104, 58, 92, - 93, 97, 58, 92, 93, 58, 92, 93, - 58, 92, 93, 99, 58, 92, 93, 105, - 58, 92, 93, 105, 58, 92, 93, 58, - 92, 93, 58, 92, 93, 108, 58, 92, - 93, 97, 58, 92, 93, 110, 58, 92, - 93, 107, 58, 92, 93, 58, 92, 93, - 58, 92, 93, 110, 58, 92, 93, 116, - 58, 92, 93, 114, 58, 92, 93, 108, - 58, 92, 93, 58, 92, 93, 58, 92, - 93, 105, 58, 92, 93, 103, 58, 92, - 93, 105, 58, 92, 93, 116, 58, 92, - 93, 58, 92, 93, 58, 92, 93, 114, - 58, 92, 93, 97, 58, 92, 93, 112, - 58, 92, 93, 104, 58, 92, 93, 58, - 92, 93, 58, 92, 93, 111, 58, 92, - 93, 119, 58, 92, 93, 101, 58, 92, - 93, 114, 58, 92, 93, 58, 92, 93, - 58, 92, 93, 114, 117, 58, 92, 93, - 105, 58, 92, 93, 110, 58, 92, 93, - 116, 58, 92, 93, 58, 92, 93, 58, - 92, 93, 110, 58, 92, 93, 99, 58, - 92, 93, 116, 58, 92, 93, 58, 92, - 93, 58, 92, 93, 112, 58, 92, 93, - 97, 58, 92, 93, 99, 58, 92, 93, - 101, 58, 92, 93, 58, 92, 93, 58, - 92, 93, 112, 58, 92, 93, 112, 58, - 92, 93, 101, 58, 92, 93, 114, 58, - 92, 93, 58, 92, 93, 58, 92, 93, - 111, 58, 92, 93, 114, 58, 92, 93, - 100, 58, 92, 93, 58, 92, 93, 58, - 92, 93, 100, 58, 92, 93, 105, 58, - 92, 93, 103, 58, 92, 93, 105, 58, - 92, 93, 116, 58, 92, 93, 58, 92, - 93, 58, 92, 93, 108, 115, 58, 92, - 93, 110, 112, 58, 92, 93, 117, 58, - 92, 93, 109, 58, 92, 93, 58, 92, - 93, 58, 92, 93, 104, 58, 92, 93, - 97, 58, 92, 93, 58, 92, 93, 58, - 92, 93, 99, 58, 92, 93, 105, 58, - 92, 93, 105, 58, 92, 93, 58, 92, - 93, 58, 92, 93, 108, 58, 92, 93, - 97, 58, 92, 93, 110, 58, 92, 93, - 107, 58, 92, 93, 58, 92, 93, 58, - 92, 93, 110, 58, 92, 93, 116, 58, - 92, 93, 114, 58, 92, 93, 108, 58, - 92, 93, 58, 92, 93, 58, 92, 93, - 105, 58, 92, 93, 103, 58, 92, 93, - 105, 58, 92, 93, 116, 58, 92, 93, - 58, 92, 93, 58, 92, 93, 114, 58, - 92, 93, 97, 58, 92, 93, 112, 58, - 92, 93, 104, 58, 92, 93, 58, 92, - 93, 58, 92, 93, 111, 58, 92, 93, - 119, 58, 92, 93, 101, 58, 92, 93, - 114, 58, 92, 93, 58, 92, 93, 58, - 92, 93, 114, 117, 58, 92, 93, 105, - 58, 92, 93, 110, 58, 92, 93, 116, - 58, 92, 93, 58, 92, 93, 58, 92, - 93, 110, 58, 92, 93, 99, 58, 92, - 93, 116, 58, 92, 93, 58, 92, 93, - 58, 92, 93, 112, 58, 92, 93, 97, - 58, 92, 93, 99, 58, 92, 93, 101, - 58, 92, 93, 58, 92, 93, 58, 92, - 93, 112, 58, 92, 93, 112, 58, 92, - 93, 101, 58, 92, 93, 114, 58, 92, - 93, 58, 92, 93, 58, 92, 93, 111, - 58, 92, 93, 114, 58, 92, 93, 100, - 58, 92, 93, 58, 92, 93, 58, 92, - 93, 100, 58, 92, 93, 105, 58, 92, - 93, 103, 58, 92, 93, 105, 58, 92, - 93, 116, 58, 92, 93, 58, 92, 93, - 61, 92, 93, 61, 92, 93, 61, 92, - 48, 55, 125, 48, 55, 125, 48, 57, - 65, 70, 97, 102, 384, 447, 384, 447, - 384, 447, 384, 447, 384, 447, 384, 447, - 384, 447, 384, 447, 384, 447, 0, 32, - 36, 40, 41, 42, 43, 46, 63, 91, - 92, 94, 123, 124, 1315, 1571, 1, 8, - 9, 13, 14, 34, 37, 255, 384, 447, - 448, 479, 480, 495, 496, 503, 504, 511, - 42, 63, 95, 48, 57, 65, 90, 97, - 122, 95, 48, 57, 65, 90, 97, 122, - 39, 48, 60, 63, 82, 95, 49, 55, - 56, 57, 65, 90, 97, 122, 48, 57, - 105, 109, 115, 120, 48, 57, 41, 48, - 57, 33, 61, 95, 48, 57, 65, 90, - 97, 122, 123, 41, 48, 57, 60, 61, - 62, 41, 45, 58, 105, 109, 115, 120, - 43, 63, 43, 63, 43, 63, 46, 58, - 61, 48, 65, 66, 67, 68, 69, 71, - 72, 75, 76, 78, 80, 81, 82, 83, - 85, 86, 87, 88, 90, 97, 98, 99, - 100, 101, 102, 103, 104, 107, 108, 110, - 111, 112, 114, 115, 116, 117, 118, 119, - 120, 122, 49, 55, 56, 57, 48, 55, - 48, 55, 48, 55, 56, 57, 48, 55, - 56, 57, 48, 57, 123, 39, 45, 60, - 123, 48, 57, 48, 57, 48, 57, 48, - 57, 48, 57, 39, 60, 123, 123, 123, - 123, 48, 57, 65, 70, 97, 102, 48, - 57, 65, 70, 97, 102, 48, 57, 65, - 70, 97, 102, 48, 57, 43, 63, 384, - 447, 384, 447, 384, 447, 41, 85, 41, - 41, 67, 84, 65, 66, 67, 68, 69, - 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 82, 83, 84, 85, 86, 88, - 89, 90, 110, 114, 118, 97, 101, 111, - 114, 117, 97, 99, 102, 104, 110, 111, - 115, 117, 121, 109, 112, 101, 103, 116, - 101, 108, 111, 114, 117, 97, 101, 105, - 103, 117, 109, 110, 97, 97, 104, 38, - 97, 101, 105, 108, 109, 111, 116, 117, - 121, 97, 99, 101, 110, 111, 121, 101, - 100, 101, 107, 108, 111, 103, 108, 114, - 115, 99, 100, 101, 102, 104, 105, 111, - 115, 101, 117, 97, 99, 104, 105, 107, - 109, 111, 117, 121, 97, 101, 104, 105, - 103, 97, 97, 112, 115, 119, 105, 108, - 112, 115, 67, 76, 77, 78, 80, 83, - 90, 45, 91, 92, 93, 0, 255, 384, - 447, 448, 479, 480, 495, 496, 503, 504, - 511, 46, 58, 61, 48, 68, 69, 72, - 76, 78, 80, 81, 83, 85, 86, 87, - 97, 98, 99, 100, 101, 102, 103, 104, - 108, 110, 111, 112, 114, 115, 116, 117, - 118, 119, 120, 49, 55, 56, 57, 65, - 90, 105, 122, 48, 55, 48, 55, 48, - 55, 48, 55, 123, 123, 123, 123, 48, - 57, 65, 70, 97, 102, 48, 57, 65, - 70, 97, 102, 48, 57, 65, 70, 97, - 102, 384, 447, 384, 447, 384, 447, 92, - 1117, 1118, -128, 91, 95, 127, 861, 862, - 69, 81, 92, 0, 255, 384, 447, 448, - 479, 480, 495, 496, 503, 504, 511, 69, - 384, 447, 384, 447, 384, 447, 92, 0, - 255, 384, 447, 448, 479, 480, 495, 496, - 503, 504, 511, 69, 384, 447, 384, 447, - 384, 447, 41, 10, 0 -}; - -static const char _regex_single_lengths[] = { - 0, 1, 20, 2, 2, 1, 2, 1, - 2, 2, 2, 1, 2, 3, 2, 3, - 1, 2, 2, 1, 6, 2, 1, 1, - 1, 2, 1, 4, 7, 3, 3, 2, - 3, 3, 2, 3, 3, 2, 1, 0, - 1, 2, 0, 1, 1, 1, 2, 2, - 2, 2, 1, 2, 1, 2, 1, 2, - 0, 1, 1, 2, 1, 1, 0, 0, - 0, 1, 2, 1, 2, 2, 1, 1, - 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 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 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 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, - 3, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 9, 0, 3, 3, 4, 1, - 1, 1, 3, 0, 1, 0, 0, 0, - 0, 0, 0, 2, 1, 1, 2, 2, - 1, 0, 0, 1, 1, 1, 1, 1, - 0, 0, 0, 3, 3, 3, 1, 0, - 1, 1, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 6, 0, 4, 1, 1, - 1, 1, 0, 0, 0, 0, 3, 3, - 3, 1, 1, 1, 3, 0, 6, 0, - 1, 1, 1, 6, 0, 1, 1, 1, - 0, 0 -}; - -static const short _regex_index_offsets[] = { - 0, 0, 2, 24, 30, 36, 41, 47, - 49, 55, 61, 67, 72, 78, 82, 85, - 92, 97, 103, 109, 112, 119, 125, 128, - 133, 138, 144, 149, 154, 162, 166, 170, - 173, 177, 181, 184, 188, 192, 195, 197, - 199, 201, 207, 209, 212, 215, 217, 223, - 229, 235, 241, 246, 252, 257, 263, 268, - 274, 276, 279, 284, 288, 291, 294, 296, - 298, 300, 302, 305, 307, 310, 313, 315, - 317, 320, 322, 324, 326, 328, 330, 332, - 334, 336, 338, 340, 342, 344, 346, 350, - 352, 354, 356, 358, 360, 362, 364, 366, - 368, 370, 372, 374, 376, 378, 380, 382, - 384, 386, 388, 390, 392, 395, 397, 399, - 401, 403, 405, 408, 410, 412, 414, 416, - 418, 420, 422, 425, 427, 429, 431, 433, - 435, 437, 439, 441, 443, 445, 447, 449, - 451, 453, 455, 457, 459, 461, 463, 466, - 468, 470, 472, 474, 476, 478, 480, 482, - 484, 486, 488, 490, 492, 494, 496, 498, - 500, 502, 504, 507, 509, 511, 513, 515, - 517, 519, 521, 523, 525, 528, 530, 532, - 534, 536, 538, 540, 542, 544, 546, 548, - 550, 552, 554, 556, 558, 560, 562, 564, - 566, 568, 570, 572, 574, 576, 578, 580, - 582, 584, 586, 588, 590, 592, 594, 596, - 598, 600, 602, 604, 606, 608, 610, 612, - 614, 616, 618, 620, 622, 624, 626, 628, - 630, 632, 634, 636, 638, 640, 643, 645, - 647, 649, 651, 653, 655, 657, 659, 661, - 663, 665, 667, 669, 671, 673, 675, 677, - 679, 681, 683, 685, 687, 689, 691, 693, - 695, 697, 699, 701, 703, 705, 707, 709, - 711, 713, 715, 717, 719, 721, 723, 726, - 728, 730, 732, 734, 736, 738, 740, 742, - 744, 746, 748, 750, 752, 754, 756, 758, - 760, 762, 764, 767, 769, 771, 773, 775, - 777, 779, 781, 783, 785, 787, 789, 791, - 793, 795, 797, 802, 804, 806, 808, 810, - 812, 814, 816, 818, 820, 822, 824, 826, - 828, 830, 832, 834, 836, 839, 841, 843, - 845, 847, 849, 851, 853, 855, 857, 860, - 862, 864, 866, 868, 870, 872, 876, 878, - 880, 882, 884, 886, 888, 890, 892, 895, - 897, 899, 901, 903, 905, 907, 910, 912, - 914, 916, 918, 920, 922, 924, 926, 928, - 930, 932, 934, 936, 938, 940, 942, 944, - 946, 948, 950, 952, 954, 956, 958, 960, - 962, 964, 966, 968, 970, 972, 974, 976, - 978, 980, 982, 984, 986, 988, 990, 992, - 994, 996, 998, 1001, 1003, 1005, 1007, 1009, - 1011, 1013, 1018, 1020, 1022, 1024, 1026, 1028, - 1030, 1032, 1034, 1036, 1038, 1040, 1042, 1044, - 1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, - 1062, 1064, 1066, 1068, 1070, 1072, 1074, 1076, - 1078, 1080, 1082, 1084, 1086, 1088, 1090, 1093, - 1095, 1097, 1099, 1101, 1103, 1105, 1107, 1109, - 1111, 1113, 1115, 1117, 1119, 1121, 1123, 1125, - 1127, 1129, 1131, 1134, 1136, 1138, 1140, 1142, - 1144, 1146, 1148, 1150, 1152, 1154, 1156, 1158, - 1160, 1162, 1164, 1166, 1168, 1170, 1172, 1174, - 1176, 1178, 1180, 1182, 1184, 1186, 1188, 1190, - 1192, 1194, 1197, 1199, 1201, 1203, 1205, 1207, - 1209, 1211, 1213, 1215, 1217, 1219, 1221, 1225, - 1228, 1230, 1232, 1234, 1236, 1238, 1240, 1242, - 1244, 1248, 1250, 1252, 1254, 1256, 1258, 1260, - 1262, 1264, 1266, 1268, 1270, 1272, 1274, 1276, - 1279, 1281, 1283, 1286, 1288, 1290, 1292, 1294, - 1296, 1298, 1300, 1302, 1304, 1306, 1308, 1310, - 1312, 1314, 1316, 1318, 1320, 1322, 1324, 1326, - 1328, 1330, 1332, 1334, 1338, 1342, 1345, 1361, - 1365, 1369, 1372, 1387, 1393, 1399, 1404, 1409, - 1413, 1417, 1422, 1427, 1431, 1435, 1440, 1445, - 1450, 1454, 1458, 1463, 1468, 1473, 1478, 1482, - 1486, 1491, 1496, 1501, 1506, 1510, 1514, 1519, - 1524, 1529, 1534, 1538, 1542, 1547, 1552, 1557, - 1562, 1566, 1570, 1575, 1580, 1585, 1590, 1594, - 1598, 1604, 1609, 1614, 1619, 1623, 1627, 1632, - 1637, 1642, 1646, 1650, 1655, 1660, 1665, 1670, - 1674, 1678, 1683, 1688, 1693, 1698, 1702, 1706, - 1711, 1716, 1721, 1725, 1729, 1734, 1739, 1744, - 1749, 1754, 1758, 1762, 1768, 1774, 1779, 1784, - 1788, 1792, 1797, 1802, 1806, 1810, 1815, 1820, - 1825, 1829, 1833, 1838, 1843, 1848, 1853, 1857, - 1861, 1866, 1871, 1876, 1881, 1885, 1889, 1894, - 1899, 1904, 1909, 1913, 1917, 1922, 1927, 1932, - 1937, 1941, 1945, 1950, 1955, 1960, 1965, 1969, - 1973, 1979, 1984, 1989, 1994, 1998, 2002, 2007, - 2012, 2017, 2021, 2025, 2030, 2035, 2040, 2045, - 2049, 2053, 2058, 2063, 2068, 2073, 2077, 2081, - 2086, 2091, 2096, 2100, 2104, 2109, 2114, 2119, - 2124, 2129, 2133, 2137, 2141, 2145, 2148, 2150, - 2153, 2158, 2160, 2162, 2164, 2166, 2168, 2170, - 2172, 2174, 2176, 2202, 2205, 2210, 2215, 2226, - 2228, 2234, 2237, 2244, 2246, 2249, 2253, 2261, - 2264, 2267, 2270, 2274, 2318, 2320, 2322, 2325, - 2328, 2330, 2332, 2333, 2339, 2341, 2343, 2345, - 2347, 2351, 2353, 2355, 2360, 2364, 2368, 2370, - 2373, 2375, 2377, 2379, 2382, 2384, 2388, 2412, - 2416, 2422, 2432, 2435, 2437, 2440, 2446, 2450, - 2453, 2456, 2458, 2461, 2472, 2479, 2481, 2487, - 2492, 2501, 2504, 2514, 2519, 2521, 2523, 2528, - 2530, 2534, 2535, 2543, 2554, 2558, 2594, 2596, - 2598, 2600, 2602, 2604, 2605, 2607, 2609, 2614, - 2618, 2622, 2624, 2626, 2628, 2635, 2638, 2646, - 2648, 2650, 2652, 2654, 2662, 2664, 2666, 2668, - 2670, 2672 -}; - -static const short _regex_indicies[] = { - 0, 1, 3, 4, 5, 6, 7, 8, - 9, 10, 12, 13, 14, 15, 16, 17, - 18, 19, 19, 19, 19, 20, 11, 2, - 22, 23, 23, 23, 23, 21, 24, 25, - 25, 25, 25, 21, 27, 27, 27, 27, - 26, 28, 27, 27, 27, 27, 26, 29, - 26, 29, 30, 30, 30, 30, 26, 31, - 30, 32, 30, 30, 26, 29, 30, 32, - 30, 30, 26, 33, 33, 33, 33, 26, - 28, 33, 33, 33, 33, 26, 34, 35, - 36, 26, 37, 38, 26, 39, 40, 30, - 41, 30, 30, 26, 42, 42, 42, 42, - 26, 40, 42, 42, 42, 42, 26, 40, - 30, 41, 30, 30, 26, 43, 44, 21, - 45, 46, 47, 47, 47, 47, 21, 24, - 48, 48, 48, 48, 21, 49, 50, 21, - 48, 48, 48, 48, 21, 51, 51, 51, - 51, 21, 52, 51, 51, 51, 51, 21, - 23, 23, 23, 23, 21, 47, 47, 47, - 47, 21, 45, 53, 46, 54, 54, 54, - 54, 21, 57, 58, 55, 56, 57, 58, - 59, 56, 57, 58, 56, 61, 62, 55, - 60, 61, 62, 63, 60, 61, 62, 60, - 65, 66, 55, 64, 65, 66, 59, 64, - 65, 66, 64, 69, 68, 70, 67, 69, - 71, 72, 74, 73, 74, 74, 67, 75, - 67, 77, 76, 67, 77, 78, 67, 77, - 67, 74, 80, 79, 74, 74, 67, 74, - 80, 81, 74, 74, 67, 74, 80, 74, - 74, 74, 67, 74, 82, 74, 74, 74, - 67, 84, 84, 84, 84, 83, 85, 84, - 84, 84, 84, 83, 86, 86, 86, 86, - 83, 87, 86, 86, 86, 86, 83, 88, - 88, 88, 88, 83, 88, 89, 88, 88, - 88, 83, 91, 90, 92, 91, 90, 95, - 94, 94, 94, 93, 97, 99, 98, 96, - 101, 100, 96, 102, 100, 96, 104, 103, - 105, 103, 106, 103, 109, 108, 109, 110, - 108, 111, 108, 109, 112, 108, 113, 114, - 108, 115, 108, 117, 116, 118, 119, 116, - 120, 116, 121, 116, 122, 116, 123, 116, - 124, 116, 125, 116, 126, 116, 127, 116, - 128, 116, 129, 116, 130, 116, 131, 116, - 132, 116, 133, 134, 135, 116, 136, 116, - 137, 116, 138, 116, 139, 116, 140, 116, - 141, 116, 142, 116, 143, 116, 144, 116, - 145, 116, 146, 116, 147, 116, 148, 116, - 149, 116, 150, 116, 151, 116, 152, 116, - 153, 116, 154, 116, 155, 116, 156, 116, - 157, 158, 116, 159, 116, 160, 116, 161, - 116, 162, 116, 163, 116, 164, 165, 116, - 166, 116, 167, 116, 168, 116, 169, 116, - 170, 116, 171, 116, 172, 116, 174, 175, - 173, 176, 173, 177, 173, 178, 173, 179, - 173, 180, 173, 181, 173, 182, 173, 183, - 173, 184, 173, 185, 173, 186, 173, 187, - 173, 188, 173, 189, 173, 190, 173, 191, - 173, 192, 173, 193, 173, 194, 173, 195, - 196, 173, 197, 173, 198, 173, 199, 173, - 200, 173, 201, 173, 202, 173, 204, 203, - 205, 203, 206, 203, 207, 203, 208, 203, - 209, 203, 210, 173, 211, 173, 212, 173, - 213, 173, 214, 173, 215, 173, 216, 173, - 217, 218, 173, 219, 173, 220, 173, 221, - 173, 222, 173, 223, 173, 224, 173, 225, - 173, 226, 173, 227, 173, 228, 229, 116, - 230, 116, 231, 116, 232, 116, 233, 116, - 234, 116, 235, 116, 236, 116, 237, 116, - 238, 116, 239, 116, 240, 116, 241, 116, - 242, 116, 243, 116, 244, 116, 245, 116, - 246, 116, 247, 116, 248, 116, 249, 116, - 250, 116, 251, 116, 252, 116, 253, 116, - 254, 116, 255, 116, 256, 116, 257, 116, - 258, 116, 259, 116, 260, 116, 261, 116, - 262, 116, 263, 116, 264, 116, 265, 116, - 266, 116, 267, 116, 268, 116, 269, 116, - 270, 116, 271, 116, 272, 116, 273, 116, - 274, 116, 275, 116, 276, 116, 277, 116, - 278, 116, 279, 116, 280, 116, 281, 116, - 282, 116, 283, 116, 284, 116, 285, 116, - 286, 287, 116, 288, 116, 289, 116, 290, - 116, 291, 116, 292, 116, 293, 116, 294, - 116, 295, 116, 296, 116, 297, 116, 298, - 116, 300, 299, 301, 299, 302, 299, 303, - 299, 304, 299, 305, 116, 306, 116, 307, - 116, 308, 116, 309, 116, 310, 116, 311, - 116, 312, 116, 313, 116, 314, 116, 315, - 116, 316, 116, 317, 116, 318, 116, 319, - 116, 320, 116, 321, 116, 322, 116, 323, - 116, 324, 116, 325, 116, 326, 116, 327, - 116, 328, 116, 329, 330, 116, 331, 116, - 332, 116, 333, 116, 334, 116, 335, 116, - 336, 116, 337, 116, 338, 116, 339, 116, - 340, 116, 341, 116, 342, 116, 343, 116, - 344, 116, 345, 116, 346, 116, 347, 116, - 348, 116, 349, 116, 350, 351, 116, 352, - 116, 353, 116, 354, 116, 355, 116, 356, - 116, 357, 116, 358, 116, 359, 116, 360, - 116, 361, 116, 362, 116, 363, 116, 364, - 116, 365, 116, 366, 116, 367, 368, 369, - 370, 116, 371, 116, 372, 116, 373, 116, - 374, 116, 375, 116, 376, 116, 377, 116, - 378, 116, 379, 116, 380, 116, 381, 116, - 382, 116, 383, 116, 384, 116, 385, 116, - 386, 116, 387, 116, 388, 389, 116, 390, - 116, 391, 116, 392, 116, 393, 116, 394, - 116, 395, 116, 396, 116, 397, 116, 398, - 116, 400, 401, 399, 402, 399, 403, 399, - 404, 399, 405, 399, 406, 399, 407, 399, - 408, 409, 410, 399, 411, 399, 412, 399, - 413, 399, 414, 399, 415, 399, 416, 399, - 417, 399, 418, 399, 419, 420, 399, 421, - 399, 422, 399, 423, 399, 424, 399, 425, - 399, 426, 399, 428, 429, 427, 430, 427, - 431, 427, 432, 427, 433, 427, 434, 427, - 435, 427, 436, 427, 437, 427, 438, 427, - 439, 427, 441, 440, 442, 440, 443, 440, - 444, 440, 445, 440, 446, 440, 447, 440, - 448, 440, 449, 440, 450, 427, 451, 427, - 452, 427, 453, 427, 454, 427, 455, 427, - 456, 427, 457, 427, 458, 427, 459, 427, - 460, 427, 461, 427, 463, 462, 464, 462, - 465, 462, 466, 462, 467, 462, 468, 462, - 469, 462, 470, 462, 471, 462, 472, 462, - 473, 116, 474, 116, 475, 116, 476, 477, - 116, 478, 116, 479, 116, 480, 116, 481, - 116, 482, 116, 483, 116, 484, 485, 486, - 487, 116, 488, 116, 489, 116, 490, 116, - 491, 116, 492, 116, 493, 116, 494, 116, - 495, 116, 496, 116, 497, 116, 498, 116, - 499, 116, 500, 116, 501, 116, 502, 116, - 503, 116, 504, 116, 505, 116, 506, 116, - 507, 116, 508, 116, 509, 116, 510, 116, - 511, 116, 512, 116, 513, 116, 514, 116, - 515, 116, 516, 116, 517, 116, 518, 116, - 519, 116, 520, 116, 521, 116, 522, 116, - 523, 116, 525, 526, 524, 527, 524, 528, - 524, 529, 524, 530, 524, 531, 524, 532, - 524, 533, 524, 534, 524, 535, 524, 536, - 524, 537, 524, 538, 524, 539, 116, 540, - 116, 541, 116, 542, 116, 543, 116, 544, - 116, 545, 116, 547, 548, 546, 549, 546, - 550, 546, 551, 546, 552, 546, 553, 546, - 554, 546, 555, 546, 556, 546, 557, 546, - 558, 546, 559, 546, 560, 546, 561, 546, - 562, 546, 563, 546, 564, 546, 565, 546, - 566, 546, 567, 546, 568, 546, 569, 546, - 570, 546, 571, 546, 572, 546, 573, 546, - 574, 546, 575, 546, 576, 546, 577, 546, - 578, 546, 579, 580, 546, 581, 546, 582, - 546, 583, 546, 584, 546, 585, 546, 586, - 546, 587, 546, 588, 546, 589, 546, 590, - 546, 591, 546, 592, 546, 593, 594, 595, - 116, 596, 597, 116, 598, 116, 599, 116, - 600, 116, 601, 116, 602, 116, 603, 116, - 604, 116, 605, 116, 606, 607, 608, 116, - 609, 116, 610, 116, 611, 116, 612, 116, - 613, 116, 614, 116, 615, 116, 616, 116, - 617, 116, 618, 116, 619, 116, 620, 116, - 621, 116, 622, 116, 623, 624, 116, 625, - 116, 626, 116, 627, 628, 116, 629, 116, - 630, 116, 631, 116, 632, 116, 633, 116, - 634, 116, 635, 116, 636, 116, 637, 116, - 638, 116, 639, 116, 640, 116, 641, 116, - 642, 116, 643, 116, 644, 116, 645, 116, - 646, 116, 647, 116, 648, 116, 650, 649, - 652, 651, 653, 649, 649, 651, 656, 657, - 654, 655, 656, 657, 658, 655, 656, 657, - 655, 660, 661, 654, 662, 663, 664, 665, - 666, 667, 668, 669, 670, 671, 672, 673, - 659, 660, 661, 654, 659, 660, 661, 674, - 659, 660, 661, 659, 660, 661, 654, 675, - 676, 677, 678, 679, 680, 681, 682, 683, - 684, 685, 659, 660, 661, 654, 686, 687, - 659, 660, 661, 654, 688, 689, 659, 660, - 661, 654, 690, 659, 660, 661, 654, 691, - 659, 692, 661, 654, 659, 660, 661, 693, - 659, 660, 661, 654, 694, 659, 660, 661, - 654, 695, 659, 696, 661, 654, 659, 660, - 661, 697, 659, 660, 661, 654, 698, 659, - 660, 661, 654, 699, 659, 660, 661, 654, - 700, 659, 701, 661, 654, 659, 660, 661, - 702, 659, 660, 661, 654, 703, 659, 660, - 661, 654, 704, 659, 660, 661, 654, 705, - 659, 660, 661, 654, 706, 659, 707, 661, - 654, 659, 660, 661, 708, 659, 660, 661, - 654, 709, 659, 660, 661, 654, 710, 659, - 660, 661, 654, 711, 659, 660, 661, 654, - 712, 659, 713, 661, 654, 659, 660, 661, - 714, 659, 660, 661, 654, 715, 659, 660, - 661, 654, 716, 659, 660, 661, 654, 717, - 659, 660, 661, 654, 718, 659, 719, 661, - 654, 659, 660, 661, 720, 659, 660, 661, - 654, 721, 659, 660, 661, 654, 722, 659, - 660, 661, 654, 723, 659, 660, 661, 654, - 724, 659, 725, 661, 654, 659, 660, 661, - 726, 659, 660, 661, 654, 727, 659, 660, - 661, 654, 728, 659, 660, 661, 654, 729, - 659, 660, 661, 654, 730, 659, 731, 661, - 654, 659, 660, 661, 732, 659, 660, 661, - 654, 733, 734, 659, 660, 661, 654, 735, - 659, 660, 661, 654, 736, 659, 660, 661, - 654, 737, 659, 738, 661, 654, 659, 660, - 661, 739, 659, 660, 661, 654, 740, 659, - 660, 661, 654, 741, 659, 660, 661, 654, - 742, 659, 743, 661, 654, 659, 660, 661, - 744, 659, 660, 661, 654, 745, 659, 660, - 661, 654, 746, 659, 660, 661, 654, 747, - 659, 660, 661, 654, 748, 659, 749, 661, - 654, 659, 660, 661, 750, 659, 660, 661, - 654, 751, 659, 660, 661, 654, 752, 659, - 660, 661, 654, 753, 659, 660, 661, 654, - 754, 659, 755, 661, 654, 659, 660, 661, - 756, 659, 660, 661, 654, 757, 659, 660, - 661, 654, 758, 659, 660, 661, 654, 759, - 659, 760, 661, 654, 659, 660, 661, 761, - 659, 660, 661, 654, 762, 659, 660, 661, - 654, 763, 659, 660, 661, 654, 764, 659, - 660, 661, 654, 765, 659, 660, 661, 654, - 766, 659, 767, 661, 654, 659, 660, 661, - 768, 659, 660, 661, 654, 769, 770, 659, - 660, 661, 654, 771, 772, 659, 660, 661, - 654, 773, 659, 660, 661, 654, 774, 659, - 775, 661, 654, 659, 660, 661, 776, 659, - 660, 661, 654, 777, 659, 660, 661, 654, - 778, 659, 779, 661, 654, 659, 660, 661, - 780, 659, 660, 661, 654, 781, 659, 660, - 661, 654, 782, 659, 660, 661, 654, 783, - 659, 784, 661, 654, 659, 660, 661, 785, - 659, 660, 661, 654, 786, 659, 660, 661, - 654, 787, 659, 660, 661, 654, 788, 659, - 660, 661, 654, 789, 659, 790, 661, 654, - 659, 660, 661, 791, 659, 660, 661, 654, - 792, 659, 660, 661, 654, 793, 659, 660, - 661, 654, 794, 659, 660, 661, 654, 795, - 659, 796, 661, 654, 659, 660, 661, 797, - 659, 660, 661, 654, 798, 659, 660, 661, - 654, 799, 659, 660, 661, 654, 800, 659, - 660, 661, 654, 801, 659, 802, 661, 654, - 659, 660, 661, 803, 659, 660, 661, 654, - 804, 659, 660, 661, 654, 805, 659, 660, - 661, 654, 806, 659, 660, 661, 654, 807, - 659, 808, 661, 654, 659, 660, 661, 809, - 659, 660, 661, 654, 810, 659, 660, 661, - 654, 811, 659, 660, 661, 654, 812, 659, - 660, 661, 654, 813, 659, 814, 661, 654, - 659, 660, 661, 815, 659, 660, 661, 654, - 816, 817, 659, 660, 661, 654, 818, 659, - 660, 661, 654, 819, 659, 660, 661, 654, - 820, 659, 821, 661, 654, 659, 660, 661, - 822, 659, 660, 661, 654, 823, 659, 660, - 661, 654, 824, 659, 660, 661, 654, 825, - 659, 826, 661, 654, 659, 660, 661, 827, - 659, 660, 661, 654, 828, 659, 660, 661, - 654, 829, 659, 660, 661, 654, 830, 659, - 660, 661, 654, 831, 659, 832, 661, 654, - 659, 660, 661, 833, 659, 660, 661, 654, - 834, 659, 660, 661, 654, 835, 659, 660, - 661, 654, 836, 659, 660, 661, 654, 837, - 659, 838, 661, 654, 659, 660, 661, 839, - 659, 660, 661, 654, 840, 659, 660, 661, - 654, 841, 659, 660, 661, 654, 842, 659, - 843, 661, 654, 659, 660, 661, 844, 659, - 660, 661, 654, 845, 659, 660, 661, 654, - 846, 659, 660, 661, 654, 847, 659, 660, - 661, 654, 848, 659, 660, 661, 654, 849, - 659, 850, 661, 654, 659, 660, 661, 851, - 659, 853, 854, 654, 852, 853, 854, 658, - 852, 853, 854, 852, 856, 855, 857, 856, - 855, 860, 859, 859, 859, 858, 862, 861, - 863, 861, 864, 861, 866, 865, 867, 865, - 868, 865, 870, 869, 871, 869, 872, 869, - 873, 876, 877, 878, 879, 880, 881, 882, - 883, 884, 885, 886, 887, 888, 875, 893, - 875, 876, 875, 875, 889, 890, 891, 892, - 889, 874, 895, 896, 894, 23, 23, 23, - 23, 897, 25, 25, 25, 25, 897, 899, - 30, 902, 903, 904, 30, 900, 901, 30, - 30, 898, 44, 897, 47, 47, 47, 47, - 44, 897, 43, 44, 897, 905, 906, 48, - 48, 48, 48, 897, 907, 897, 49, 50, - 897, 908, 909, 910, 897, 45, 53, 46, - 54, 54, 54, 54, 897, 912, 913, 911, - 915, 916, 914, 918, 919, 917, 56, 60, - 64, 920, 923, 926, 927, 928, 929, 930, - 931, 932, 933, 934, 934, 935, 936, 937, - 938, 934, 939, 940, 941, 942, 943, 944, - 945, 946, 947, 948, 949, 950, 951, 934, - 952, 953, 954, 955, 956, 957, 934, 958, - 959, 960, 961, 924, 925, 922, 963, 962, - 964, 962, 966, 967, 965, 969, 967, 968, - 967, 970, 973, 972, 975, 68, 977, 71, - 979, 978, 976, 981, 980, 982, 980, 984, - 983, 985, 983, 987, 988, 989, 986, 991, - 990, 994, 993, 999, 996, 997, 998, 995, - 1000, 1001, 1002, 995, 94, 94, 94, 1003, - 98, 1004, 1006, 1007, 1005, 1009, 1008, 1010, - 1008, 1011, 1008, 1013, 1014, 1012, 109, 108, - 109, 1016, 1017, 108, 1019, 1020, 1021, 1022, - 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, - 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, - 1039, 1040, 1041, 1018, 1043, 1044, 1045, 1042, - 1046, 1047, 1048, 1049, 1050, 1042, 1052, 1053, - 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1051, - 1062, 1063, 1061, 1064, 1042, 1065, 1066, 1042, - 1067, 1068, 1069, 1070, 1071, 1042, 1072, 1073, - 1074, 1042, 1076, 1077, 1075, 1078, 1079, 1042, - 1080, 1042, 1081, 1082, 1042, 1084, 1085, 1086, - 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1083, - 1095, 1096, 1097, 1098, 1099, 1100, 1094, 1102, - 1101, 1104, 1105, 1106, 1107, 1108, 1103, 1109, - 1110, 1111, 1112, 1042, 1114, 1115, 1116, 1117, - 1118, 1119, 1120, 1121, 1113, 1122, 1123, 1042, - 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, - 1133, 1124, 1134, 1135, 1136, 1137, 1042, 1138, - 1042, 1139, 1042, 1140, 1141, 1142, 1143, 1042, - 1144, 1042, 1146, 1147, 1148, 1145, 649, 1150, - 1151, 1152, 1153, 1154, 1155, 1156, 1149, 1158, - 1159, 1160, 1161, 1157, 1162, 1163, 1164, 1165, - 1162, 874, 655, 1167, 852, 1166, 1169, 1173, - 1174, 1175, 1176, 1176, 1177, 1178, 1179, 1176, - 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, - 1188, 1189, 1176, 1190, 1191, 1192, 1193, 1194, - 1195, 1176, 1196, 1197, 1198, 1170, 1171, 1172, - 1172, 1168, 1200, 1199, 1201, 1199, 1203, 1202, - 1204, 1202, 1207, 1206, 1209, 1211, 1210, 1214, - 1213, 1219, 1216, 1217, 1218, 1215, 1220, 1221, - 1222, 1215, 859, 859, 859, 1223, 1225, 1224, - 1226, 1224, 1227, 1224, 1229, 1230, 1231, 1228, - 1228, 1228, 874, 1233, 1234, 1232, 1236, 1235, - 1237, 1238, 1239, 1240, 1237, 874, 1242, 1241, - 1244, 1243, 1245, 1243, 1246, 1243, 1248, 1247, - 1249, 1250, 1251, 1252, 1249, 874, 1254, 1253, - 1256, 1255, 1257, 1255, 1258, 1255, 1260, 1259, - 1262, 1261, 0 -}; - -static const short _regex_trans_targs[] = { - 746, 746, 746, 746, 746, 748, 749, 750, - 746, 751, 752, 753, 746, 754, 746, 746, - 755, 756, 757, 758, 746, 746, 746, 3, - 746, 4, 746, 6, 7, 746, 8, 746, - 9, 12, 746, 14, 746, 746, 746, 16, - 746, 18, 17, 746, 19, 746, 746, 20, - 21, 746, 22, 25, 746, 27, 28, 746, - 29, 30, 31, 746, 32, 33, 34, 746, - 35, 36, 37, 746, 38, 746, 772, 40, - 42, 46, 49, 43, 44, 746, 45, 47, - 746, 48, 746, 746, 51, 746, 53, 746, - 55, 746, 746, 57, 746, 746, 58, 746, - 746, 60, 59, 783, 61, 783, 783, 746, - 746, 64, 746, 787, 65, 787, 67, 787, - 69, 787, 70, 787, 790, 790, 73, 76, - 74, 75, 790, 77, 78, 79, 80, 790, - 82, 83, 84, 85, 790, 87, 92, 94, - 88, 89, 90, 91, 790, 93, 790, 95, - 790, 97, 98, 99, 100, 790, 102, 103, - 104, 105, 106, 790, 108, 109, 111, 110, - 790, 112, 113, 790, 115, 120, 116, 117, - 118, 119, 790, 121, 790, 790, 123, 139, - 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 790, - 140, 141, 790, 143, 144, 790, 145, 146, - 147, 148, 790, 790, 150, 151, 790, 153, - 154, 790, 156, 157, 158, 159, 160, 161, - 790, 163, 167, 164, 165, 166, 790, 168, - 169, 170, 171, 790, 173, 177, 174, 175, - 176, 790, 178, 179, 180, 181, 182, 183, - 790, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 790, 203, 204, 205, 206, 207, - 790, 209, 210, 211, 212, 213, 790, 215, - 216, 217, 218, 219, 220, 221, 790, 223, - 224, 225, 790, 227, 228, 790, 230, 235, - 231, 232, 233, 234, 790, 236, 237, 238, - 239, 790, 799, 790, 242, 790, 244, 245, - 790, 247, 248, 249, 790, 251, 252, 253, - 254, 255, 790, 257, 258, 259, 260, 261, - 262, 263, 264, 265, 266, 267, 268, 269, - 790, 271, 277, 272, 273, 274, 275, 276, - 790, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 295, - 292, 293, 294, 790, 296, 297, 298, 299, - 790, 301, 302, 303, 304, 305, 790, 307, - 310, 314, 319, 308, 309, 790, 311, 312, - 313, 790, 315, 316, 317, 318, 790, 320, - 321, 322, 323, 790, 325, 332, 326, 327, - 328, 329, 330, 331, 790, 333, 790, 790, - 790, 335, 336, 790, 338, 339, 340, 790, - 342, 344, 349, 343, 790, 345, 346, 347, - 348, 790, 790, 351, 354, 352, 353, 790, - 355, 356, 790, 790, 358, 364, 359, 360, - 361, 362, 363, 790, 365, 366, 367, 790, - 790, 369, 370, 371, 372, 373, 374, 375, - 376, 790, 378, 379, 380, 381, 382, 383, - 790, 385, 386, 387, 388, 790, 790, 390, - 391, 392, 393, 394, 395, 396, 397, 790, - 790, 400, 401, 790, 403, 408, 404, 405, - 406, 407, 790, 409, 410, 415, 421, 433, - 411, 412, 413, 414, 790, 416, 417, 418, - 419, 420, 790, 422, 423, 424, 425, 426, - 427, 428, 429, 430, 431, 432, 790, 434, - 435, 436, 437, 790, 439, 440, 790, 442, - 443, 444, 445, 790, 790, 447, 452, 448, - 449, 450, 451, 790, 453, 454, 455, 456, - 457, 458, 790, 460, 461, 462, 790, 464, - 465, 790, 790, 467, 473, 468, 469, 470, - 471, 472, 790, 474, 475, 476, 477, 478, - 479, 790, 481, 482, 483, 484, 790, 486, - 487, 488, 489, 790, 491, 492, 493, 494, - 495, 496, 790, 498, 507, 499, 500, 501, - 502, 503, 504, 505, 506, 790, 508, 509, - 790, 511, 519, 528, 512, 515, 513, 514, - 790, 516, 517, 518, 790, 520, 521, 522, - 525, 790, 523, 524, 790, 526, 527, 790, - 529, 790, 531, 532, 533, 790, 535, 536, - 790, 537, 790, 539, 543, 540, 541, 542, - 790, 544, 545, 546, 547, 790, 549, 550, - 551, 552, 553, 790, 790, 790, 790, 790, - 790, 0, 560, 561, 562, 817, 819, 563, - 564, 565, 819, 567, 568, 569, 570, 651, - 666, 672, 678, 684, 690, 696, 707, 713, - 719, 724, 819, 571, 586, 592, 598, 604, - 610, 616, 627, 633, 639, 644, 572, 581, - 573, 577, 574, 575, 576, 819, 578, 579, - 580, 819, 582, 583, 584, 585, 819, 587, - 588, 589, 590, 591, 819, 593, 594, 595, - 596, 597, 819, 599, 600, 601, 602, 603, - 819, 605, 606, 607, 608, 609, 819, 611, - 612, 613, 614, 615, 819, 617, 622, 618, - 619, 620, 621, 819, 623, 624, 625, 626, - 819, 628, 629, 630, 631, 632, 819, 634, - 635, 636, 637, 638, 819, 640, 641, 642, - 643, 819, 645, 646, 647, 648, 649, 650, - 819, 652, 661, 653, 657, 654, 655, 656, - 819, 658, 659, 660, 819, 662, 663, 664, - 665, 819, 667, 668, 669, 670, 671, 819, - 673, 674, 675, 676, 677, 819, 679, 680, - 681, 682, 683, 819, 685, 686, 687, 688, - 689, 819, 691, 692, 693, 694, 695, 819, - 697, 702, 698, 699, 700, 701, 819, 703, - 704, 705, 706, 819, 708, 709, 710, 711, - 712, 819, 714, 715, 716, 717, 718, 819, - 720, 721, 722, 723, 819, 725, 726, 727, - 728, 729, 730, 819, 731, 732, 733, 819, - 735, 819, 819, 736, 819, 819, 819, 739, - 819, 838, 838, 742, 838, 843, 843, 745, - 843, 746, 0, 746, 746, 746, 747, 746, - 759, 760, 746, 761, 762, 763, 746, 782, - 746, 746, 784, 785, 786, 746, 746, 1, - 2, 746, 746, 5, 9, 10, 11, 13, - 15, 746, 746, 746, 23, 24, 26, 746, - 746, 746, 746, 746, 746, 746, 746, 746, - 746, 746, 746, 764, 766, 768, 746, 746, - 746, 746, 746, 746, 746, 746, 746, 769, - 746, 746, 746, 746, 746, 746, 746, 746, - 746, 770, 746, 746, 746, 771, 746, 776, - 746, 777, 778, 746, 746, 746, 746, 746, - 779, 746, 746, 765, 746, 746, 767, 768, - 746, 768, 746, 746, 746, 746, 746, 746, - 746, 39, 774, 41, 746, 773, 746, 746, - 775, 746, 746, 50, 52, 54, 746, 56, - 746, 746, 746, 746, 780, 780, 780, 781, - 746, 746, 746, 746, 746, 746, 746, 746, - 746, 746, 62, 63, 788, 787, 789, 787, - 66, 68, 790, 791, 792, 793, 795, 796, - 797, 798, 800, 801, 802, 803, 804, 806, - 807, 808, 809, 810, 811, 812, 813, 814, - 815, 816, 790, 71, 72, 81, 86, 96, - 101, 107, 114, 790, 122, 790, 790, 142, - 790, 794, 790, 155, 162, 790, 149, 152, - 172, 184, 202, 208, 214, 222, 226, 229, - 240, 246, 250, 790, 241, 243, 256, 270, - 300, 306, 324, 790, 790, 334, 337, 341, - 790, 790, 790, 790, 790, 350, 790, 357, - 790, 805, 790, 377, 384, 790, 368, 790, - 790, 389, 398, 790, 790, 399, 402, 438, - 441, 790, 790, 790, 790, 790, 446, 790, - 790, 790, 459, 463, 790, 466, 790, 480, - 485, 790, 790, 790, 490, 497, 510, 530, - 534, 538, 548, 554, 555, 556, 557, 558, - 790, 790, 790, 790, 790, 818, 818, 818, - 818, 818, 818, 818, 818, 819, 819, 820, - 821, 819, 819, 833, 834, 835, 819, 566, - 819, 822, 824, 819, 819, 819, 819, 819, - 819, 826, 819, 819, 819, 819, 819, 819, - 827, 819, 819, 819, 819, 819, 819, 828, - 829, 819, 819, 819, 819, 819, 830, 819, - 823, 819, 819, 825, 819, 819, 819, 819, - 819, 819, 819, 734, 819, 819, 819, 819, - 831, 831, 831, 832, 819, 819, 819, 819, - 819, 819, 737, 738, 836, 837, 836, 836, - 836, 836, 836, 838, 839, 838, 840, 841, - 842, 838, 838, 838, 838, 740, 741, 843, - 844, 843, 845, 846, 847, 843, 843, 843, - 843, 743, 744, 848, 848, 849, 849 -}; - -static const short _regex_trans_actions[] = { - 827, 631, 765, 731, 723, 45, 903, 903, - 897, 45, 912, 45, 900, 903, 729, 741, - 0, 45, 45, 923, 737, 841, 747, 0, - 743, 3, 839, 3, 0, 761, 3, 759, - 870, 3, 751, 0, 749, 755, 753, 0, - 757, 3, 0, 745, 0, 725, 727, 27, - 3, 763, 0, 3, 673, 0, 25, 829, - 0, 0, 0, 603, 0, 0, 0, 601, - 0, 0, 0, 831, 0, 675, 17, 0, - 7, 870, 3, 17, 17, 663, 17, 870, - 661, 870, 665, 837, 3, 671, 3, 669, - 3, 667, 833, 0, 677, 835, 0, 679, - 845, 0, 11, 29, 13, 31, 0, 843, - 769, 0, 771, 59, 0, 53, 0, 51, - 0, 49, 0, 47, 359, 315, 0, 0, - 0, 0, 127, 0, 0, 0, 0, 129, - 0, 0, 0, 0, 131, 0, 0, 0, - 0, 0, 0, 0, 133, 0, 135, 0, - 137, 0, 0, 0, 0, 139, 0, 0, - 0, 0, 0, 141, 0, 0, 0, 0, - 143, 0, 0, 145, 0, 0, 0, 0, - 0, 0, 147, 0, 149, 341, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 151, - 0, 0, 153, 0, 0, 155, 0, 0, - 0, 0, 157, 343, 0, 0, 159, 0, - 0, 161, 0, 0, 0, 0, 0, 0, - 163, 0, 0, 0, 0, 0, 165, 0, - 0, 0, 0, 167, 0, 0, 0, 0, - 0, 169, 0, 0, 0, 0, 0, 0, - 171, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 173, 0, 0, 0, 0, 0, - 175, 0, 0, 0, 0, 0, 177, 0, - 0, 0, 0, 0, 0, 0, 179, 0, - 0, 0, 181, 0, 0, 183, 0, 0, - 0, 0, 0, 0, 185, 0, 0, 0, - 0, 187, 45, 357, 0, 189, 0, 0, - 191, 0, 0, 0, 193, 0, 0, 0, - 0, 0, 195, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 197, 0, 0, 0, 0, 0, 0, 0, - 199, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 201, 0, 0, 0, 0, - 203, 0, 0, 0, 0, 0, 205, 0, - 0, 0, 0, 0, 0, 207, 0, 0, - 0, 209, 0, 0, 0, 0, 211, 0, - 0, 0, 0, 213, 0, 0, 0, 0, - 0, 0, 0, 0, 215, 0, 217, 345, - 219, 0, 0, 221, 0, 0, 0, 223, - 0, 0, 0, 0, 225, 0, 0, 0, - 0, 227, 229, 0, 0, 0, 0, 231, - 0, 0, 233, 347, 0, 0, 0, 0, - 0, 0, 0, 235, 0, 0, 0, 237, - 349, 0, 0, 0, 0, 0, 0, 0, - 0, 239, 0, 0, 0, 0, 0, 0, - 241, 0, 0, 0, 0, 243, 351, 0, - 0, 0, 0, 0, 0, 0, 0, 245, - 247, 0, 0, 249, 0, 0, 0, 0, - 0, 0, 251, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 253, 0, 0, 0, - 0, 0, 255, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 257, 0, - 0, 0, 0, 259, 0, 0, 261, 0, - 0, 0, 0, 263, 353, 0, 0, 0, - 0, 0, 0, 265, 0, 0, 0, 0, - 0, 0, 267, 0, 0, 0, 269, 0, - 0, 271, 355, 0, 0, 0, 0, 0, - 0, 0, 273, 0, 0, 0, 0, 0, - 0, 275, 0, 0, 0, 0, 277, 0, - 0, 0, 0, 279, 0, 0, 0, 0, - 0, 0, 281, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 283, 0, 0, - 285, 0, 0, 0, 0, 0, 0, 0, - 287, 0, 0, 0, 289, 0, 0, 0, - 0, 291, 0, 0, 293, 0, 0, 295, - 0, 297, 0, 0, 0, 299, 0, 0, - 303, 0, 301, 0, 0, 0, 0, 0, - 305, 0, 0, 0, 0, 307, 0, 0, - 0, 0, 0, 309, 311, 119, 121, 123, - 125, 39, 0, 35, 33, 37, 539, 0, - 0, 0, 377, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 435, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 381, 0, 0, - 0, 385, 0, 0, 0, 0, 389, 0, - 0, 0, 0, 0, 393, 0, 0, 0, - 0, 0, 397, 0, 0, 0, 0, 0, - 401, 0, 0, 0, 0, 0, 405, 0, - 0, 0, 0, 0, 409, 0, 0, 0, - 0, 0, 0, 413, 0, 0, 0, 0, - 417, 0, 0, 0, 0, 0, 421, 0, - 0, 0, 0, 0, 425, 0, 0, 0, - 0, 429, 0, 0, 0, 0, 0, 0, - 433, 0, 0, 0, 0, 0, 0, 0, - 379, 0, 0, 0, 383, 0, 0, 0, - 0, 387, 0, 0, 0, 0, 0, 391, - 0, 0, 0, 0, 0, 395, 0, 0, - 0, 0, 0, 399, 0, 0, 0, 0, - 0, 403, 0, 0, 0, 0, 0, 407, - 0, 0, 0, 0, 0, 0, 411, 0, - 0, 0, 0, 415, 0, 0, 0, 0, - 0, 419, 0, 0, 0, 0, 0, 423, - 0, 0, 0, 0, 427, 0, 0, 0, - 0, 0, 0, 431, 0, 0, 0, 533, - 0, 471, 535, 0, 475, 537, 503, 0, - 505, 569, 557, 0, 559, 587, 575, 0, - 577, 633, 0, 777, 775, 637, 45, 597, - 0, 0, 609, 0, 45, 0, 635, 909, - 599, 773, 0, 45, 45, 629, 779, 0, - 0, 821, 819, 1, 855, 855, 1, 0, - 3, 735, 733, 739, 1, 1, 0, 783, - 615, 613, 785, 619, 617, 787, 623, 621, - 781, 817, 721, 5, 852, 915, 639, 647, - 611, 695, 607, 717, 699, 715, 683, 0, - 605, 713, 691, 703, 687, 719, 641, 657, - 645, 0, 693, 659, 655, 906, 697, 45, - 651, 45, 0, 653, 689, 649, 701, 685, - 7, 643, 791, 15, 867, 795, 858, 919, - 793, 927, 847, 811, 711, 709, 809, 681, - 801, 7, 17, 849, 799, 17, 876, 797, - 17, 873, 815, 1, 1, 1, 803, 0, - 813, 707, 705, 805, 19, 23, 21, 45, - 882, 894, 888, 807, 825, 789, 627, 625, - 823, 767, 0, 0, 45, 55, 45, 57, - 0, 0, 317, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, - 0, 0, 339, 0, 0, 0, 0, 0, - 0, 0, 0, 319, 0, 61, 63, 0, - 65, 45, 67, 0, 0, 321, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 337, 0, 0, 0, 0, - 0, 0, 0, 323, 79, 0, 0, 0, - 69, 71, 73, 75, 77, 0, 325, 0, - 81, 45, 83, 0, 0, 327, 0, 329, - 85, 0, 0, 87, 89, 0, 0, 0, - 0, 331, 91, 93, 95, 97, 0, 99, - 101, 103, 0, 0, 333, 0, 105, 0, - 0, 107, 109, 111, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 313, 335, 113, 115, 117, 375, 361, 363, - 365, 367, 369, 371, 373, 509, 491, 45, - 0, 511, 507, 0, 45, 45, 531, 0, - 499, 5, 9, 473, 497, 489, 439, 457, - 493, 0, 437, 485, 461, 481, 451, 441, - 0, 487, 453, 449, 495, 455, 445, 45, - 0, 447, 483, 443, 459, 479, 7, 517, - 15, 861, 519, 15, 864, 513, 469, 467, - 527, 477, 521, 0, 515, 465, 463, 523, - 19, 23, 21, 45, 879, 891, 885, 525, - 529, 501, 0, 0, 549, 0, 543, 541, - 551, 547, 545, 563, 0, 561, 0, 45, - 45, 567, 553, 565, 555, 0, 0, 581, - 0, 579, 0, 45, 45, 585, 571, 583, - 573, 0, 0, 591, 589, 595, 593 -}; - -static const short _regex_to_state_actions[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,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0 -}; - -static const short _regex_eof_trans[] = { - 0, 1, 1, 22, 22, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 84, 84, 84, 84, 84, 84, - 91, 91, 94, 97, 97, 97, 104, 104, - 104, 108, 108, 108, 108, 108, 108, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 204, 204, 204, - 204, 204, 204, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 300, 300, 300, 300, 300, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 400, 400, - 400, 400, 400, 400, 400, 400, 400, 400, - 400, 400, 400, 400, 400, 400, 400, 400, - 400, 400, 400, 400, 400, 428, 428, 428, - 428, 428, 428, 428, 428, 428, 428, 428, - 441, 441, 441, 441, 441, 441, 441, 441, - 441, 428, 428, 428, 428, 428, 428, 428, - 428, 428, 428, 428, 428, 463, 463, 463, - 463, 463, 463, 463, 463, 463, 463, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 525, 525, - 525, 525, 525, 525, 525, 525, 525, 525, - 525, 525, 525, 117, 117, 117, 117, 117, - 117, 117, 547, 547, 547, 547, 547, 547, - 547, 547, 547, 547, 547, 547, 547, 547, - 547, 547, 547, 547, 547, 547, 547, 547, - 547, 547, 547, 547, 547, 547, 547, 547, - 547, 547, 547, 547, 547, 547, 547, 547, - 547, 547, 547, 547, 547, 547, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 0, - 0, 0, 0, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 655, 655, - 655, 655, 655, 655, 655, 655, 856, 856, - 859, 862, 862, 862, 866, 866, 866, 870, - 870, 870, 0, 895, 898, 898, 899, 898, - 898, 898, 898, 898, 898, 898, 898, 912, - 915, 918, 921, 922, 963, 963, 966, 969, - 971, 972, 975, 977, 981, 981, 984, 984, - 987, 991, 993, 996, 996, 1004, 1005, 1006, - 1009, 1009, 1009, 0, 1016, 1016, 0, 1043, - 1043, 1052, 1062, 1043, 1043, 1043, 1043, 1076, - 1043, 1043, 1043, 1084, 1095, 1102, 1104, 1043, - 1114, 1043, 1125, 1043, 1043, 1043, 1043, 1043, - 1146, 0, 0, 0, 1167, 1167, 1200, 1200, - 1203, 1203, 1206, 1209, 1211, 1213, 1216, 1216, - 1224, 1225, 1225, 1225, 0, 1233, 0, 1242, - 1244, 1244, 1244, 0, 1254, 1256, 1256, 1256, - 0, 0 -}; - -static const int regex_start = 746; -static const int regex_error = 0; - -static const int regex_en_readVerb = 787; -static const int regex_en_readUCP = 790; -static const int regex_en_readBracedUCP = 559; -static const int regex_en_readUCPSingle = 818; -static const int regex_en_charClassGuts = 819; -static const int regex_en_readClass = 836; -static const int regex_en_readQuotedLiteral = 838; -static const int regex_en_readQuotedClass = 843; -static const int regex_en_readComment = 848; -static const int regex_en_readNewlineTerminatedComment = 849; -static const int regex_en_main = 746; - - -#line 1912 "Parser.rl" - -/** \brief Main parser call, returns root Component or nullptr. */ -unique_ptr parse(const char *ptr, ParseMode &globalMode) { - assert(ptr); - - const char *p = ptr; - const char *pe = ptr + strlen(ptr); - - // First, read the control verbs, set any global mode flags and move the - // ptr forward. - p = read_control_verbs(p, pe, 0, globalMode); - - const char *eof = pe; - int cs; - UNUSED int act; - int top; - vector stack; - const char *ts, *te; - unichar accumulator = 0; - unichar octAccumulator = 0; /* required as we are also accumulating for - * back ref when looking for octals */ - unsigned repeatN = 0; - unsigned repeatM = 0; - string label; - - ParseMode mode = globalMode; - ParseMode newMode; - - bool negated = false; - bool inComment = false; - - // Stack of sequences and flags used to store state when we enter - // sub-sequences. - vector sequences; - - // Index of the next capturing group. Note that zero is reserved for the - // root sequence. - unsigned groupIndex = 1; - - // Set storing group names that are currently in use. - flat_set groupNames; - - // Root sequence. - unique_ptr rootSeq = std::make_unique(); - rootSeq->setCaptureIndex(0); - - // Current sequence being appended to - ComponentSequence *currentSeq = rootSeq.get(); - - // The current character class being appended to. This is used as the - // accumulator for both character class and UCP properties. - unique_ptr currentCls; - - // True if the machine is currently inside a character class, i.e. square - // brackets [..]. - bool inCharClass = false; - - // True if the machine is inside a character class but it has not processed - // any "real" elements yet, i.e. it's still processing meta-characters like - // '^'. - bool inCharClassEarly = false; - - // Location at which the current character class began. - const char *currentClsBegin = p; - - // We throw exceptions on various parsing failures beyond this point: we - // use a try/catch block here to clean up our allocated memory before we - // re-throw the exception to the caller. - try { - // Embed the Ragel machine here - -#line 2533 "Parser.cpp" - { - cs = regex_start; - top = 0; - ts = 0; - te = 0; - act = 0; - } - -#line 1983 "Parser.rl" - -#line 2544 "Parser.cpp" - { - int _klen; - unsigned int _trans; - short _widec; - const short *_acts; - unsigned int _nacts; - const short *_keys; - - if ( p == pe ) - goto _test_eof; - if ( cs == 0 ) - goto _out; -_resume: - _acts = _regex_actions + _regex_from_state_actions[cs]; - _nacts = (unsigned int) *_acts++; - while ( _nacts-- > 0 ) { - switch ( *_acts++ ) { - case 24: -#line 1 "NONE" - {ts = p;} - break; -#line 2566 "Parser.cpp" - } - } - - _widec = (*p); - _klen = _regex_cond_lengths[cs]; - _keys = _regex_cond_keys + (_regex_cond_offsets[cs]*2); - if ( _klen > 0 ) { - const short *_lower = _keys; - const short *_mid; - const short *_upper = _keys + (_klen<<1) - 2; - while (1) { - if ( _upper < _lower ) - break; - - _mid = _lower + (((_upper-_lower) >> 1) & ~1); - if ( _widec < _mid[0] ) - _upper = _mid - 2; - else if ( _widec > _mid[1] ) - _lower = _mid + 2; - else { - switch ( _regex_cond_spaces[_regex_cond_offsets[cs] + ((_mid - _keys)>>1)] ) { - case 0: { - _widec = (short)(128 + ((*p) - -128)); - if ( -#line 475 "Parser.rl" - mode.utf8 ) _widec += 256; - break; - } - case 1: { - _widec = (short)(1152 + ((*p) - -128)); - if ( -#line 476 "Parser.rl" - mode.ignore_space ) _widec += 256; - break; - } - case 2: { - _widec = (short)(640 + ((*p) - -128)); - if ( -#line 477 "Parser.rl" - inCharClassEarly ) _widec += 256; - break; - } - } - break; - } - } - } - - _keys = _regex_trans_keys + _regex_key_offsets[cs]; - _trans = _regex_index_offsets[cs]; - - _klen = _regex_single_lengths[cs]; - if ( _klen > 0 ) { - const short *_lower = _keys; - const short *_mid; - const short *_upper = _keys + _klen - 1; - while (1) { - if ( _upper < _lower ) - break; - - _mid = _lower + ((_upper-_lower) >> 1); - if ( _widec < *_mid ) - _upper = _mid - 1; - else if ( _widec > *_mid ) - _lower = _mid + 1; - else { - _trans += (unsigned int)(_mid - _keys); - goto _match; - } - } - _keys += _klen; - _trans += _klen; - } - - _klen = _regex_range_lengths[cs]; - if ( _klen > 0 ) { - const short *_lower = _keys; - const short *_mid; - const short *_upper = _keys + (_klen<<1) - 2; - while (1) { - if ( _upper < _lower ) - break; - - _mid = _lower + (((_upper-_lower) >> 1) & ~1); - if ( _widec < _mid[0] ) - _upper = _mid - 2; - else if ( _widec > _mid[1] ) - _lower = _mid + 2; - else { - _trans += (unsigned int)((_mid - _keys)>>1); - goto _match; - } - } - _trans += _klen; - } - -_match: - _trans = _regex_indicies[_trans]; -_eof_trans: - cs = _regex_trans_targs[_trans]; - - if ( _regex_trans_actions[_trans] == 0 ) - goto _again; - - _acts = _regex_actions + _regex_trans_actions[_trans]; - _nacts = (unsigned int) *_acts++; - while ( _nacts-- > 0 ) - { - switch ( *_acts++ ) - { - case 0: -#line 285 "Parser.rl" - { label.clear();} - break; - case 1: -#line 286 "Parser.rl" - { label.push_back((*p));} - break; - case 2: -#line 287 "Parser.rl" - { octAccumulator = 0;} - break; - case 3: -#line 288 "Parser.rl" - { accumulator = 0;} - break; - case 4: -#line 289 "Parser.rl" - { - octAccumulator = 0; - pushOct(&octAccumulator, (*p)); - } - break; - case 5: -#line 293 "Parser.rl" - { - accumulator = 0; - pushDec(&accumulator, (*p)); - } - break; - case 6: -#line 297 "Parser.rl" - { repeatN = 0; repeatM = 0; } - break; - case 7: -#line 298 "Parser.rl" - { pushDec(&repeatN, (*p)); } - break; - case 8: -#line 299 "Parser.rl" - { pushDec(&repeatM, (*p)); } - break; - case 9: -#line 300 "Parser.rl" - { pushOct(&octAccumulator, (*p)); } - break; - case 10: -#line 301 "Parser.rl" - { pushDec(&accumulator, (*p)); } - break; - case 11: -#line 302 "Parser.rl" - { - accumulator *= 16; - accumulator += (*p) - '0'; - } - break; - case 12: -#line 306 "Parser.rl" - { - accumulator *= 16; - accumulator += 10 + (*p) - 'a'; - } - break; - case 13: -#line 310 "Parser.rl" - { - accumulator *= 16; - accumulator += 10 + (*p) - 'A'; - } - break; - case 14: -#line 430 "Parser.rl" - { - newMode = mode; - } - break; - case 15: -#line 437 "Parser.rl" - { - switch ((*p)) { - case 'i': - newMode.caseless = true; - break; - case 'm': - newMode.multiline = true; - break; - case 's': - newMode.dotall = true; - break; - case 'x': - newMode.ignore_space = true; - break; - default: - assert(0); // this action only called for [imsx] - break; - } - } - break; - case 16: -#line 456 "Parser.rl" - { - switch ((*p)) { - case 'i': - newMode.caseless = false; - break; - case 'm': - newMode.multiline = false; - break; - case 's': - newMode.dotall = false; - break; - case 'x': - newMode.ignore_space = false; - break; - default: - assert(0); // this action only called for [imsx] - break; - } - } - break; - case 17: -#line 510 "Parser.rl" - {repeatM = repeatN;} - break; - case 18: -#line 510 "Parser.rl" - {repeatM = ComponentRepeat::NoLimit;} - break; - case 19: -#line 722 "Parser.rl" - { negated = !negated; } - break; - case 20: -#line 723 "Parser.rl" - { p--; { - DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); - if ((int)stack.size() == top) { - stack.resize(2 * (top + 1)); - } - {stack[top++] = cs; cs = 790;goto _again;}} } - break; - case 21: -#line 724 "Parser.rl" - { if (!inCharClass) { // not inside [..] - currentCls->finalize(); - currentSeq->addComponent(move(currentCls)); - } - {cs = stack[--top]; goto _again;} - } - break; - case 22: -#line 730 "Parser.rl" - { throw LocatedParseError("Malformed property"); } - break; - case 25: -#line 1 "NONE" - {te = p+1;} - break; - case 26: -#line 550 "Parser.rl" - {te = p+1;{ - throw LocatedParseError("(*UTF8) must be at start of " - "expression, encountered"); - }} - break; - case 27: -#line 554 "Parser.rl" - {te = p+1;{ - throw LocatedParseError("(*UTF) must be at start of " - "expression, encountered"); - }} - break; - case 28: -#line 558 "Parser.rl" - {te = p+1;{ - throw LocatedParseError("(*UCP) must be at start of " - "expression, encountered"); - }} - break; - case 29: -#line 564 "Parser.rl" - {te = p+1;{ - ParseMode temp_mode; - assert(ts - 2 >= ptr); // parser needs the '(*' at the start too. - read_control_verbs(ts - 2, te, (ts - 2 - ptr), temp_mode); - assert(0); // Should have thrown a parse error. - throw LocatedParseError("Unknown control verb"); - }} - break; - case 30: -#line 571 "Parser.rl" - {te = p+1;{ - throw LocatedParseError("Unknown control verb"); - }} - break; - case 31: -#line 571 "Parser.rl" - {te = p;p--;{ - throw LocatedParseError("Unknown control verb"); - }} - break; - case 32: -#line 571 "Parser.rl" - {{p = ((te))-1;}{ - throw LocatedParseError("Unknown control verb"); - }} - break; - case 33: -#line 581 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_CC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 34: -#line 582 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_CF, negated); {cs = stack[--top]; goto _again;} }} - break; - case 35: -#line 583 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_CN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 36: -#line 585 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_CS, negated); {cs = stack[--top]; goto _again;} }} - break; - case 37: -#line 587 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_LL, negated); {cs = stack[--top]; goto _again;} }} - break; - case 38: -#line 588 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_LM, negated); {cs = stack[--top]; goto _again;} }} - break; - case 39: -#line 589 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_LO, negated); {cs = stack[--top]; goto _again;} }} - break; - case 40: -#line 590 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_LT, negated); {cs = stack[--top]; goto _again;} }} - break; - case 41: -#line 591 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_LU, negated); {cs = stack[--top]; goto _again;} }} - break; - case 42: -#line 592 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_L_AND, negated); {cs = stack[--top]; goto _again;} }} - break; - case 43: -#line 594 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_MC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 44: -#line 596 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_MN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 45: -#line 598 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_ND, negated); {cs = stack[--top]; goto _again;} }} - break; - case 46: -#line 599 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_NL, negated); {cs = stack[--top]; goto _again;} }} - break; - case 47: -#line 600 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_NO, negated); {cs = stack[--top]; goto _again;} }} - break; - case 48: -#line 602 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_PC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 49: -#line 603 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_PD, negated); {cs = stack[--top]; goto _again;} }} - break; - case 50: -#line 604 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_PE, negated); {cs = stack[--top]; goto _again;} }} - break; - case 51: -#line 605 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_PF, negated); {cs = stack[--top]; goto _again;} }} - break; - case 52: -#line 606 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_PI, negated); {cs = stack[--top]; goto _again;} }} - break; - case 53: -#line 607 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_PO, negated); {cs = stack[--top]; goto _again;} }} - break; - case 54: -#line 608 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_PS, negated); {cs = stack[--top]; goto _again;} }} - break; - case 55: -#line 610 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_SC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 56: -#line 611 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_SK, negated); {cs = stack[--top]; goto _again;} }} - break; - case 57: -#line 612 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_SM, negated); {cs = stack[--top]; goto _again;} }} - break; - case 58: -#line 613 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_SO, negated); {cs = stack[--top]; goto _again;} }} - break; - case 59: -#line 615 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_ZL, negated); {cs = stack[--top]; goto _again;} }} - break; - case 60: -#line 616 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_ZP, negated); {cs = stack[--top]; goto _again;} }} - break; - case 61: -#line 617 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_ZS, negated); {cs = stack[--top]; goto _again;} }} - break; - case 62: -#line 618 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_XAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 63: -#line 619 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_XPS, negated); {cs = stack[--top]; goto _again;} }} - break; - case 64: -#line 620 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_XSP, negated); {cs = stack[--top]; goto _again;} }} - break; - case 65: -#line 621 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_XWD, negated); {cs = stack[--top]; goto _again;} }} - break; - case 66: -#line 622 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_ARABIC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 67: -#line 623 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_ARMENIAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 68: -#line 624 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_AVESTAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 69: -#line 625 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_BALINESE, negated); {cs = stack[--top]; goto _again;} }} - break; - case 70: -#line 626 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_BAMUM, negated); {cs = stack[--top]; goto _again;} }} - break; - case 71: -#line 627 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_BATAK, negated); {cs = stack[--top]; goto _again;} }} - break; - case 72: -#line 628 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_BENGALI, negated); {cs = stack[--top]; goto _again;} }} - break; - case 73: -#line 629 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_BOPOMOFO, negated); {cs = stack[--top]; goto _again;} }} - break; - case 74: -#line 630 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_BRAHMI, negated); {cs = stack[--top]; goto _again;} }} - break; - case 75: -#line 631 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_BRAILLE, negated); {cs = stack[--top]; goto _again;} }} - break; - case 76: -#line 632 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_BUGINESE, negated); {cs = stack[--top]; goto _again;} }} - break; - case 77: -#line 633 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_BUHID, negated); {cs = stack[--top]; goto _again;} }} - break; - case 78: -#line 634 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_CANADIAN_ABORIGINAL, negated); {cs = stack[--top]; goto _again;} }} - break; - case 79: -#line 635 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_CARIAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 80: -#line 636 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_CHAM, negated); {cs = stack[--top]; goto _again;} }} - break; - case 81: -#line 637 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_CHEROKEE, negated); {cs = stack[--top]; goto _again;} }} - break; - case 82: -#line 638 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_COMMON, negated); {cs = stack[--top]; goto _again;} }} - break; - case 83: -#line 639 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_COPTIC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 84: -#line 640 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_CUNEIFORM, negated); {cs = stack[--top]; goto _again;} }} - break; - case 85: -#line 641 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_CYPRIOT, negated); {cs = stack[--top]; goto _again;} }} - break; - case 86: -#line 642 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_CYRILLIC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 87: -#line 643 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_DESERET, negated); {cs = stack[--top]; goto _again;} }} - break; - case 88: -#line 644 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_DEVANAGARI, negated); {cs = stack[--top]; goto _again;} }} - break; - case 89: -#line 645 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_EGYPTIAN_HIEROGLYPHS, negated); {cs = stack[--top]; goto _again;} }} - break; - case 90: -#line 646 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_ETHIOPIC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 91: -#line 647 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_GEORGIAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 92: -#line 648 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_GLAGOLITIC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 93: -#line 649 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_GOTHIC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 94: -#line 650 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_GREEK, negated); {cs = stack[--top]; goto _again;} }} - break; - case 95: -#line 651 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_GUJARATI, negated); {cs = stack[--top]; goto _again;} }} - break; - case 96: -#line 652 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_GURMUKHI, negated); {cs = stack[--top]; goto _again;} }} - break; - case 97: -#line 654 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_HANGUL, negated); {cs = stack[--top]; goto _again;} }} - break; - case 98: -#line 655 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_HANUNOO, negated); {cs = stack[--top]; goto _again;} }} - break; - case 99: -#line 656 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_HEBREW, negated); {cs = stack[--top]; goto _again;} }} - break; - case 100: -#line 657 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_HIRAGANA, negated); {cs = stack[--top]; goto _again;} }} - break; - case 101: -#line 658 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_IMPERIAL_ARAMAIC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 102: -#line 659 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_INHERITED, negated); {cs = stack[--top]; goto _again;} }} - break; - case 103: -#line 660 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_INSCRIPTIONAL_PAHLAVI, negated); {cs = stack[--top]; goto _again;} }} - break; - case 104: -#line 661 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_INSCRIPTIONAL_PARTHIAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 105: -#line 662 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_JAVANESE, negated); {cs = stack[--top]; goto _again;} }} - break; - case 106: -#line 663 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_KAITHI, negated); {cs = stack[--top]; goto _again;} }} - break; - case 107: -#line 664 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_KANNADA, negated); {cs = stack[--top]; goto _again;} }} - break; - case 108: -#line 665 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_KATAKANA, negated); {cs = stack[--top]; goto _again;} }} - break; - case 109: -#line 666 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_KAYAH_LI, negated); {cs = stack[--top]; goto _again;} }} - break; - case 110: -#line 667 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_KHAROSHTHI, negated); {cs = stack[--top]; goto _again;} }} - break; - case 111: -#line 668 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_KHMER, negated); {cs = stack[--top]; goto _again;} }} - break; - case 112: -#line 669 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_LAO, negated); {cs = stack[--top]; goto _again;} }} - break; - case 113: -#line 670 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_LATIN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 114: -#line 671 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_LEPCHA, negated); {cs = stack[--top]; goto _again;} }} - break; - case 115: -#line 672 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_LIMBU, negated); {cs = stack[--top]; goto _again;} }} - break; - case 116: -#line 673 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_LINEAR_B, negated); {cs = stack[--top]; goto _again;} }} - break; - case 117: -#line 674 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_LISU, negated); {cs = stack[--top]; goto _again;} }} - break; - case 118: -#line 675 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_LYCIAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 119: -#line 676 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_LYDIAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 120: -#line 677 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_MALAYALAM, negated); {cs = stack[--top]; goto _again;} }} - break; - case 121: -#line 678 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_MANDAIC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 122: -#line 679 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_MEETEI_MAYEK, negated); {cs = stack[--top]; goto _again;} }} - break; - case 123: -#line 680 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_MONGOLIAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 124: -#line 681 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_MYANMAR, negated); {cs = stack[--top]; goto _again;} }} - break; - case 125: -#line 682 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_NEW_TAI_LUE, negated); {cs = stack[--top]; goto _again;} }} - break; - case 126: -#line 683 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_NKO, negated); {cs = stack[--top]; goto _again;} }} - break; - case 127: -#line 684 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_OGHAM, negated); {cs = stack[--top]; goto _again;} }} - break; - case 128: -#line 685 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_OL_CHIKI, negated); {cs = stack[--top]; goto _again;} }} - break; - case 129: -#line 686 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_OLD_ITALIC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 130: -#line 687 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_OLD_PERSIAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 131: -#line 688 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_OLD_SOUTH_ARABIAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 132: -#line 689 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_OLD_TURKIC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 133: -#line 690 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_ORIYA, negated); {cs = stack[--top]; goto _again;} }} - break; - case 134: -#line 691 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_OSMANYA, negated); {cs = stack[--top]; goto _again;} }} - break; - case 135: -#line 692 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_PHAGS_PA, negated); {cs = stack[--top]; goto _again;} }} - break; - case 136: -#line 693 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_PHOENICIAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 137: -#line 694 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_REJANG, negated); {cs = stack[--top]; goto _again;} }} - break; - case 138: -#line 695 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_RUNIC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 139: -#line 696 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_SAMARITAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 140: -#line 697 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_SAURASHTRA, negated); {cs = stack[--top]; goto _again;} }} - break; - case 141: -#line 698 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_SHAVIAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 142: -#line 699 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_SINHALA, negated); {cs = stack[--top]; goto _again;} }} - break; - case 143: -#line 700 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_SUNDANESE, negated); {cs = stack[--top]; goto _again;} }} - break; - case 144: -#line 701 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_SYLOTI_NAGRI, negated); {cs = stack[--top]; goto _again;} }} - break; - case 145: -#line 702 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_SYRIAC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 146: -#line 703 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_TAGALOG, negated); {cs = stack[--top]; goto _again;} }} - break; - case 147: -#line 704 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_TAGBANWA, negated); {cs = stack[--top]; goto _again;} }} - break; - case 148: -#line 705 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_TAI_LE, negated); {cs = stack[--top]; goto _again;} }} - break; - case 149: -#line 706 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_TAI_THAM, negated); {cs = stack[--top]; goto _again;} }} - break; - case 150: -#line 707 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_TAI_VIET, negated); {cs = stack[--top]; goto _again;} }} - break; - case 151: -#line 708 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_TAMIL, negated); {cs = stack[--top]; goto _again;} }} - break; - case 152: -#line 709 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_TELUGU, negated); {cs = stack[--top]; goto _again;} }} - break; - case 153: -#line 710 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_THAANA, negated); {cs = stack[--top]; goto _again;} }} - break; - case 154: -#line 711 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_THAI, negated); {cs = stack[--top]; goto _again;} }} - break; - case 155: -#line 712 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_TIBETAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 156: -#line 713 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_TIFINAGH, negated); {cs = stack[--top]; goto _again;} }} - break; - case 157: -#line 714 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_UGARITIC, negated); {cs = stack[--top]; goto _again;} }} - break; - case 158: -#line 715 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_VAI, negated); {cs = stack[--top]; goto _again;} }} - break; - case 159: -#line 716 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_SCRIPT_YI, negated); {cs = stack[--top]; goto _again;} }} - break; - case 160: -#line 717 "Parser.rl" - {te = p+1;{ currentCls->add(CLASS_UCP_ANY, negated); {cs = stack[--top]; goto _again;} }} - break; - case 161: -#line 718 "Parser.rl" - {te = p+1;{ throw LocatedParseError("Unknown property"); }} - break; - case 162: -#line 580 "Parser.rl" - {te = p;p--;{ currentCls->add(CLASS_UCP_C, negated); {cs = stack[--top]; goto _again;} }} - break; - case 163: -#line 584 "Parser.rl" - {te = p;p--;{ currentCls->add(CLASS_UCP_CO, negated); {cs = stack[--top]; goto _again;} }} - break; - case 164: -#line 586 "Parser.rl" - {te = p;p--;{ currentCls->add(CLASS_UCP_L, negated); {cs = stack[--top]; goto _again;} }} - break; - case 165: -#line 593 "Parser.rl" - {te = p;p--;{ currentCls->add(CLASS_UCP_M, negated); {cs = stack[--top]; goto _again;} }} - break; - case 166: -#line 595 "Parser.rl" - {te = p;p--;{ currentCls->add(CLASS_UCP_ME, negated); {cs = stack[--top]; goto _again;} }} - break; - case 167: -#line 597 "Parser.rl" - {te = p;p--;{ currentCls->add(CLASS_UCP_N, negated); {cs = stack[--top]; goto _again;} }} - break; - case 168: -#line 601 "Parser.rl" - {te = p;p--;{ currentCls->add(CLASS_UCP_P, negated); {cs = stack[--top]; goto _again;} }} - break; - case 169: -#line 609 "Parser.rl" - {te = p;p--;{ currentCls->add(CLASS_UCP_S, negated); {cs = stack[--top]; goto _again;} }} - break; - case 170: -#line 614 "Parser.rl" - {te = p;p--;{ currentCls->add(CLASS_UCP_Z, negated); {cs = stack[--top]; goto _again;} }} - break; - case 171: -#line 653 "Parser.rl" - {te = p;p--;{ currentCls->add(CLASS_SCRIPT_HAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 172: -#line 718 "Parser.rl" - {te = p;p--;{ throw LocatedParseError("Unknown property"); }} - break; - case 173: -#line 580 "Parser.rl" - {{p = ((te))-1;}{ currentCls->add(CLASS_UCP_C, negated); {cs = stack[--top]; goto _again;} }} - break; - case 174: -#line 584 "Parser.rl" - {{p = ((te))-1;}{ currentCls->add(CLASS_UCP_CO, negated); {cs = stack[--top]; goto _again;} }} - break; - case 175: -#line 586 "Parser.rl" - {{p = ((te))-1;}{ currentCls->add(CLASS_UCP_L, negated); {cs = stack[--top]; goto _again;} }} - break; - case 176: -#line 593 "Parser.rl" - {{p = ((te))-1;}{ currentCls->add(CLASS_UCP_M, negated); {cs = stack[--top]; goto _again;} }} - break; - case 177: -#line 595 "Parser.rl" - {{p = ((te))-1;}{ currentCls->add(CLASS_UCP_ME, negated); {cs = stack[--top]; goto _again;} }} - break; - case 178: -#line 597 "Parser.rl" - {{p = ((te))-1;}{ currentCls->add(CLASS_UCP_N, negated); {cs = stack[--top]; goto _again;} }} - break; - case 179: -#line 601 "Parser.rl" - {{p = ((te))-1;}{ currentCls->add(CLASS_UCP_P, negated); {cs = stack[--top]; goto _again;} }} - break; - case 180: -#line 609 "Parser.rl" - {{p = ((te))-1;}{ currentCls->add(CLASS_UCP_S, negated); {cs = stack[--top]; goto _again;} }} - break; - case 181: -#line 653 "Parser.rl" - {{p = ((te))-1;}{ currentCls->add(CLASS_SCRIPT_HAN, negated); {cs = stack[--top]; goto _again;} }} - break; - case 182: -#line 718 "Parser.rl" - {{p = ((te))-1;}{ throw LocatedParseError("Unknown property"); }} - break; - case 183: -#line 733 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_UCP_C, negated); - if (!inCharClass) { - currentCls->finalize(); - currentSeq->addComponent(move(currentCls)); - } - {cs = stack[--top]; goto _again;} - }} - break; - case 184: -#line 741 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_UCP_L, negated); - if (!inCharClass) { - currentCls->finalize(); - currentSeq->addComponent(move(currentCls)); - } - {cs = stack[--top]; goto _again;} - }} - break; - case 185: -#line 749 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_UCP_M, negated); - if (!inCharClass) { - currentCls->finalize(); - currentSeq->addComponent(move(currentCls)); - } - {cs = stack[--top]; goto _again;} - }} - break; - case 186: -#line 757 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_UCP_N, negated); - if (!inCharClass) { - currentCls->finalize(); - currentSeq->addComponent(move(currentCls)); - } - {cs = stack[--top]; goto _again;} - }} - break; - case 187: -#line 765 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_UCP_P, negated); - if (!inCharClass) { - currentCls->finalize(); - currentSeq->addComponent(move(currentCls)); - } - {cs = stack[--top]; goto _again;} - }} - break; - case 188: -#line 773 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_UCP_S, negated); - if (!inCharClass) { - currentCls->finalize(); - currentSeq->addComponent(move(currentCls)); - } - {cs = stack[--top]; goto _again;} - }} - break; - case 189: -#line 781 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_UCP_Z, negated); - if (!inCharClass) { - currentCls->finalize(); - currentSeq->addComponent(move(currentCls)); - } - {cs = stack[--top]; goto _again;} - }} - break; - case 190: -#line 790 "Parser.rl" - {te = p+1;{ throw LocatedParseError("Unknown property"); }} - break; - case 191: -#line 796 "Parser.rl" - {te = p+1;{ - throw LocatedParseError("Unsupported POSIX collating " - "element"); - }} - break; - case 192: -#line 803 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_ALNUM, false); - }} - break; - case 193: -#line 806 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_ALNUM, true); - }} - break; - case 194: -#line 809 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_ALPHA, false); - }} - break; - case 195: -#line 812 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_ALPHA, true); - }} - break; - case 196: -#line 815 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_ASCII, false); - }} - break; - case 197: -#line 818 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_ASCII, true); - }} - break; - case 198: -#line 821 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_BLANK, false); - }} - break; - case 199: -#line 824 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_BLANK, true); - }} - break; - case 200: -#line 827 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_CNTRL, false); - }} - break; - case 201: -#line 830 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_CNTRL, true); - }} - break; - case 202: -#line 833 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_DIGIT, false); - }} - break; - case 203: -#line 836 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_DIGIT, true); - }} - break; - case 204: -#line 839 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_GRAPH, false); - }} - break; - case 205: -#line 842 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_GRAPH, true); - }} - break; - case 206: -#line 845 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_LOWER, false); - }} - break; - case 207: -#line 848 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_LOWER, true); - }} - break; - case 208: -#line 851 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_PRINT, false); - }} - break; - case 209: -#line 854 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_PRINT, true); - }} - break; - case 210: -#line 857 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_PUNCT, false); - }} - break; - case 211: -#line 860 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_PUNCT, true); - }} - break; - case 212: -#line 864 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_SPACE, false); - }} - break; - case 213: -#line 867 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_SPACE, true); - }} - break; - case 214: -#line 870 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_UPPER, false); - }} - break; - case 215: -#line 873 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_UPPER, true); - }} - break; - case 216: -#line 876 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_WORD, false); - }} - break; - case 217: -#line 879 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_WORD, true); - }} - break; - case 218: -#line 882 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_XDIGIT, false); - }} - break; - case 219: -#line 885 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_XDIGIT, true); - }} - break; - case 220: -#line 890 "Parser.rl" - {te = p+1;{ - throw LocatedParseError("Invalid POSIX named class"); - }} - break; - case 221: -#line 893 "Parser.rl" - {te = p+1;{ - { - DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); - if ((int)stack.size() == top) { - stack.resize(2 * (top + 1)); - } - {stack[top++] = cs; cs = 843;goto _again;}} - }} - break; - case 222: -#line 896 "Parser.rl" - {te = p+1;{ /*noop*/}} - break; - case 223: -#line 898 "Parser.rl" - {te = p+1;{ - currentCls->add('\x08'); - }} - break; - case 224: -#line 902 "Parser.rl" - {te = p+1;{ - currentCls->add('\x09'); - }} - break; - case 225: -#line 906 "Parser.rl" - {te = p+1;{ - currentCls->add('\x0a'); - }} - break; - case 226: -#line 910 "Parser.rl" - {te = p+1;{ - currentCls->add('\x0d'); - }} - break; - case 227: -#line 914 "Parser.rl" - {te = p+1;{ - currentCls->add('\x0c'); - }} - break; - case 228: -#line 918 "Parser.rl" - {te = p+1;{ - currentCls->add('\x07'); - }} - break; - case 229: -#line 922 "Parser.rl" - {te = p+1;{ - currentCls->add('\x1b'); - }} - break; - case 230: -#line 926 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_HORZ, false); - }} - break; - case 231: -#line 930 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_HORZ, true); - }} - break; - case 232: -#line 934 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_VERT, false); - }} - break; - case 233: -#line 938 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_VERT, true); - }} - break; - case 234: -#line 942 "Parser.rl" - {te = p+1;{ - negated = false; - p--; - { - DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); - if ((int)stack.size() == top) { - stack.resize(2 * (top + 1)); - } - {stack[top++] = cs; cs = 559;goto _again;}} - }} - break; - case 235: -#line 948 "Parser.rl" - {te = p+1;{ - negated = false; - p--; - { - DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); - if ((int)stack.size() == top) { - stack.resize(2 * (top + 1)); - } - {stack[top++] = cs; cs = 818;goto _again;}} - }} - break; - case 236: -#line 954 "Parser.rl" - {te = p+1;{ - negated = true; - p--; - { - DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); - if ((int)stack.size() == top) { - stack.resize(2 * (top + 1)); - } - {stack[top++] = cs; cs = 559;goto _again;}} - }} - break; - case 237: -#line 960 "Parser.rl" - {te = p+1;{ - negated = true; - p--; - { - DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); - if ((int)stack.size() == top) { - stack.resize(2 * (top + 1)); - } - {stack[top++] = cs; cs = 818;goto _again;}} - }} - break; - case 238: -#line 970 "Parser.rl" - {te = p+1;{ - currentCls->add(octAccumulator); - }} - break; - case 239: -#line 973 "Parser.rl" - {te = p+1;{ - currentCls->add(octAccumulator); - }} - break; - case 240: -#line 977 "Parser.rl" - {te = p+1;{ - string oct(ts + 3, te - ts - 4); - unsigned long val; - try { - val = stoul(oct, nullptr, 8); - } catch (const std::out_of_range &) { - val = MAX_UNICODE + 1; - } - if ((!mode.utf8 && val > 255) || val > MAX_UNICODE) { - throw LocatedParseError("Value in \\o{...} sequence is too large"); - } - currentCls->add((unichar)val); - }} - break; - case 241: -#line 997 "Parser.rl" - {te = p+1;{ - currentCls->add(accumulator); - }} - break; - case 242: -#line 1001 "Parser.rl" - {te = p+1;{ - // whatever we found here - currentCls->add(*(ts + 1)); - - }} - break; - case 243: -#line 1007 "Parser.rl" - {te = p+1;{ - string hex(ts + 3, te - ts - 4); - unsigned long val; - try { - val = stoul(hex, nullptr, 16); - } catch (const std::out_of_range &) { - val = MAX_UNICODE + 1; - } - if (val > MAX_UNICODE) { - throw LocatedParseError("Value in \\x{...} sequence is too large"); - } - currentCls->add((unichar)val); - }} - break; - case 244: -#line 1025 "Parser.rl" - {te = p+1;{ - if (te - ts < 3) { - assert(te - ts == 2); - throw LocatedParseError(SLASH_C_ERROR); - } else { - assert(te - ts == 3); - currentCls->add(decodeCtrl(ts[2])); - } - }} - break; - case 245: -#line 1035 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_WORD, false); - }} - break; - case 246: -#line 1039 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_WORD, true); - }} - break; - case 247: -#line 1043 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_SPACE, false); - }} - break; - case 248: -#line 1047 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_SPACE, true); - }} - break; - case 249: -#line 1051 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_DIGIT, false); - }} - break; - case 250: -#line 1055 "Parser.rl" - {te = p+1;{ - currentCls->add(CLASS_DIGIT, true); - }} - break; - case 251: -#line 1058 "Parser.rl" - {te = p+1;{ - currentCls->addDash(); - }} - break; - case 252: -#line 276 "Parser.rl" - {te = p+1;{ - ostringstream str; - str << "'\\" << *(ts + 1) << "' at index " << ts - ptr - << " not supported in a character class."; - throw ParseError(str.str()); - }} - break; - case 253: -#line 276 "Parser.rl" - {te = p+1;{ - ostringstream str; - str << "'\\" << *(ts + 1) << "' at index " << ts - ptr - << " not supported in a character class."; - throw ParseError(str.str()); - }} - break; - case 254: -#line 276 "Parser.rl" - {te = p+1;{ - ostringstream str; - str << "'\\" << *(ts + 1) << "' at index " << ts - ptr - << " not supported in a character class."; - throw ParseError(str.str()); - }} - break; - case 255: -#line 1075 "Parser.rl" - {te = p+1;{ - // add the literal char - currentCls->add(*(ts + 1)); - }} - break; - case 256: -#line 1081 "Parser.rl" - {te = p+1;{ - assert(mode.utf8); - currentCls->add(readUtf8CodePoint2c(ts)); - }} - break; - case 257: -#line 1086 "Parser.rl" - {te = p+1;{ - assert(mode.utf8); - currentCls->add(readUtf8CodePoint3c(ts)); - }} - break; - case 258: -#line 1091 "Parser.rl" - {te = p+1;{ - assert(mode.utf8); - currentCls->add(readUtf8CodePoint4c(ts)); - }} - break; - case 259: -#line 1096 "Parser.rl" - {te = p+1;{ - assert(mode.utf8); - throwInvalidUtf8(); - }} - break; - case 260: -#line 1102 "Parser.rl" - {te = p+1;{ - currentCls->add((u8)*ts); - }} - break; - case 261: -#line 1106 "Parser.rl" - {te = p+1;{ - currentCls->finalize(); - currentSeq->addComponent(move(currentCls)); - inCharClass = false; - {cs = 746;goto _again;} - }} - break; - case 262: -#line 966 "Parser.rl" - {te = p;p--;{ throw LocatedParseError("Malformed property"); }} - break; - case 263: -#line 967 "Parser.rl" - {te = p;p--;{ throw LocatedParseError("Malformed property"); }} - break; - case 264: -#line 970 "Parser.rl" - {te = p;p--;{ - currentCls->add(octAccumulator); - }} - break; - case 265: -#line 973 "Parser.rl" - {te = p;p--;{ - currentCls->add(octAccumulator); - }} - break; - case 266: -#line 992 "Parser.rl" - {te = p;p--;{ - throw LocatedParseError("Value in \\o{...} sequence is non-octal or missing braces"); - }} - break; - case 267: -#line 997 "Parser.rl" - {te = p;p--;{ - currentCls->add(accumulator); - }} - break; - case 268: -#line 1021 "Parser.rl" - {te = p;p--;{ - throw LocatedParseError("Value in \\x{...} sequence is non-hex or missing }"); - }} - break; - case 269: -#line 1025 "Parser.rl" - {te = p;p--;{ - if (te - ts < 3) { - assert(te - ts == 2); - throw LocatedParseError(SLASH_C_ERROR); - } else { - assert(te - ts == 3); - currentCls->add(decodeCtrl(ts[2])); - } - }} - break; - case 270: -#line 1096 "Parser.rl" - {te = p;p--;{ - assert(mode.utf8); - throwInvalidUtf8(); - }} - break; - case 271: -#line 1102 "Parser.rl" - {te = p;p--;{ - currentCls->add((u8)*ts); - }} - break; - case 272: -#line 992 "Parser.rl" - {{p = ((te))-1;}{ - throw LocatedParseError("Value in \\o{...} sequence is non-octal or missing braces"); - }} - break; - case 273: -#line 1021 "Parser.rl" - {{p = ((te))-1;}{ - throw LocatedParseError("Value in \\x{...} sequence is non-hex or missing }"); - }} - break; - case 274: -#line 1096 "Parser.rl" - {{p = ((te))-1;}{ - assert(mode.utf8); - throwInvalidUtf8(); - }} - break; - case 275: -#line 1102 "Parser.rl" - {{p = ((te))-1;}{ - currentCls->add((u8)*ts); - }} - break; - case 276: -#line 1120 "Parser.rl" - {te = p+1;{ - if (currentCls->isNegated()) { - // Already seen a caret; the second one is not a meta-character. - inCharClassEarly = false; - p--; {cs = 819;goto _again;} - } else { - currentCls->negate(); - // Note: we cannot switch off inCharClassEarly here, as /[^]]/ - // needs to use the right square bracket path below. - } - }} - break; - case 277: -#line 1133 "Parser.rl" - {te = p+1;{ - currentCls->add(']'); - inCharClassEarly = false; - }} - break; - case 278: -#line 1138 "Parser.rl" - {te = p+1;{ { - DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); - if ((int)stack.size() == top) { - stack.resize(2 * (top + 1)); - } - {stack[top++] = cs; cs = 843;goto _again;}} }} - break; - case 279: -#line 1139 "Parser.rl" - {te = p+1;{ /*noop*/}} - break; - case 280: -#line 1142 "Parser.rl" - {te = p+1;{ - inCharClassEarly = false; - p--; - {cs = 819;goto _again;} - }} - break; - case 281: -#line 1142 "Parser.rl" - {te = p;p--;{ - inCharClassEarly = false; - p--; - {cs = 819;goto _again;} - }} - break; - case 282: -#line 1154 "Parser.rl" - {te = p+1;{ - {cs = 746;goto _again;} - }} - break; - case 283: -#line 1159 "Parser.rl" - {te = p+1;{ - assert(mode.utf8); - /* leverage ComponentClass to generate the vertices */ - auto cc = getComponentClass(mode); - cc->add(readUtf8CodePoint2c(ts)); - cc->finalize(); - currentSeq->addComponent(move(cc)); - }} - break; - case 284: -#line 1168 "Parser.rl" - {te = p+1;{ - assert(mode.utf8); - /* leverage ComponentClass to generate the vertices */ - auto cc = getComponentClass(mode); - cc->add(readUtf8CodePoint3c(ts)); - cc->finalize(); - currentSeq->addComponent(move(cc)); - }} - break; - case 285: -#line 1177 "Parser.rl" - {te = p+1;{ - assert(mode.utf8); - /* leverage ComponentClass to generate the vertices */ - auto cc = getComponentClass(mode); - cc->add(readUtf8CodePoint4c(ts)); - cc->finalize(); - currentSeq->addComponent(move(cc)); - }} - break; - case 286: -#line 1186 "Parser.rl" - {te = p+1;{ - assert(mode.utf8); - throwInvalidUtf8(); - }} - break; - case 287: -#line 1192 "Parser.rl" - {te = p+1;{ - addLiteral(currentSeq, *ts, mode); - }} - break; - case 288: -#line 1186 "Parser.rl" - {te = p;p--;{ - assert(mode.utf8); - throwInvalidUtf8(); - }} - break; - case 289: -#line 1192 "Parser.rl" - {te = p;p--;{ - addLiteral(currentSeq, *ts, mode); - }} - break; - case 290: -#line 1186 "Parser.rl" - {{p = ((te))-1;}{ - assert(mode.utf8); - throwInvalidUtf8(); - }} - break; - case 291: -#line 1202 "Parser.rl" - {te = p+1;{ - {cs = stack[--top]; goto _again;} - }} - break; - case 292: -#line 1207 "Parser.rl" - {te = p+1;{ - assert(mode.utf8); - currentCls->add(readUtf8CodePoint2c(ts)); - inCharClassEarly = false; - }} - break; - case 293: -#line 1213 "Parser.rl" - {te = p+1;{ - assert(mode.utf8); - currentCls->add(readUtf8CodePoint3c(ts)); - inCharClassEarly = false; - }} - break; - case 294: -#line 1219 "Parser.rl" - {te = p+1;{ - assert(mode.utf8); - currentCls->add(readUtf8CodePoint4c(ts)); - inCharClassEarly = false; - }} - break; - case 295: -#line 1225 "Parser.rl" - {te = p+1;{ - assert(mode.utf8); - throwInvalidUtf8(); - }} - break; - case 296: -#line 1231 "Parser.rl" - {te = p+1;{ - currentCls->add(*ts); - inCharClassEarly = false; - }} - break; - case 297: -#line 1225 "Parser.rl" - {te = p;p--;{ - assert(mode.utf8); - throwInvalidUtf8(); - }} - break; - case 298: -#line 1231 "Parser.rl" - {te = p;p--;{ - currentCls->add(*ts); - inCharClassEarly = false; - }} - break; - case 299: -#line 1225 "Parser.rl" - {{p = ((te))-1;}{ - assert(mode.utf8); - throwInvalidUtf8(); - }} - break; - case 300: -#line 1243 "Parser.rl" - {te = p+1;{ inComment = false; {cs = 746;goto _again;} }} - break; - case 301: -#line 1247 "Parser.rl" - {te = p+1;} - break; - case 302: -#line 1255 "Parser.rl" - {te = p+1;{ inComment = false; {cs = 746;goto _again;} }} - break; - case 303: -#line 1259 "Parser.rl" - {te = p+1;} - break; - case 304: -#line 1491 "Parser.rl" - {act = 288;} - break; - case 305: -#line 1508 "Parser.rl" - {act = 290;} - break; - case 306: -#line 1737 "Parser.rl" - {act = 330;} - break; - case 307: -#line 362 "Parser.rl" - {te = p+1;{ - if (sequences.empty()) { - throw LocatedParseError("Unmatched parentheses"); - } - currentSeq->finalize(); - POP_SEQUENCE; - }} - break; - case 308: -#line 1274 "Parser.rl" - {te = p+1;{ - currentSeq->addAlternation(); - }} - break; - case 309: -#line 1279 "Parser.rl" - {te = p+1;{ - throw LocatedParseError("POSIX named classes are only " - "supported inside a class"); - }} - break; - case 310: -#line 1286 "Parser.rl" - {te = p+1;{ - throw LocatedParseError("Unsupported POSIX collating " - "element"); - }} - break; - case 311: -#line 1293 "Parser.rl" - {te = p+1;{ - {cs = 838;goto _again;} - }} - break; - case 312: -#line 1297 "Parser.rl" - {te = p+1;{ /* noop */ }} - break; - case 313: -#line 1299 "Parser.rl" - {te = p+1;{ - currentSeq->addComponent(generateComponent(CLASS_ANY, false, mode)); - }} - break; - case 314: -#line 1303 "Parser.rl" - {te = p+1;{ - if (mode.utf8) { - throw LocatedParseError("\\C is unsupported in UTF8"); - } - currentSeq->addComponent(std::make_unique()); - }} - break; - case 315: -#line 1317 "Parser.rl" - {te = p+1;{ - if (!currentSeq->addRepeat(0, ComponentRepeat::NoLimit, - ComponentRepeat::REPEAT_NONGREEDY)) { - throwInvalidRepeat(); - } - }} - break; - case 316: -#line 1324 "Parser.rl" - {te = p+1;{ - if (!currentSeq->addRepeat(0, ComponentRepeat::NoLimit, - ComponentRepeat::REPEAT_POSSESSIVE)) { - throwInvalidRepeat(); - } - }} - break; - case 317: -#line 1338 "Parser.rl" - {te = p+1;{ - if (!currentSeq->addRepeat(1, ComponentRepeat::NoLimit, - ComponentRepeat::REPEAT_NONGREEDY)) { - throwInvalidRepeat(); - } - }} - break; - case 318: -#line 1345 "Parser.rl" - {te = p+1;{ - if (!currentSeq->addRepeat(1, ComponentRepeat::NoLimit, - ComponentRepeat::REPEAT_POSSESSIVE)) { - throwInvalidRepeat(); - } - }} - break; - case 319: -#line 1359 "Parser.rl" - {te = p+1;{ - if (!currentSeq->addRepeat( - 0, 1, ComponentRepeat::REPEAT_NONGREEDY)) { - throwInvalidRepeat(); - } - }} - break; - case 320: -#line 1366 "Parser.rl" - {te = p+1;{ - if (!currentSeq->addRepeat( - 0, 1, ComponentRepeat::REPEAT_POSSESSIVE)) { - throwInvalidRepeat(); - } - }} - break; - case 321: -#line 1383 "Parser.rl" - {te = p+1;{ - if (repeatN > repeatM || repeatM == 0) { - throwInvalidRepeat(); - } else if (!currentSeq->addRepeat( - repeatN, repeatM, - ComponentRepeat::REPEAT_NONGREEDY)) { - throwInvalidRepeat(); - } - }} - break; - case 322: -#line 1393 "Parser.rl" - {te = p+1;{ - if (repeatN > repeatM || repeatM == 0) { - throwInvalidRepeat(); - } else if (!currentSeq->addRepeat( - repeatN, repeatM, - ComponentRepeat::REPEAT_POSSESSIVE)) { - throwInvalidRepeat(); - } - }} - break; - case 323: -#line 322 "Parser.rl" - {te = p+1;{ - inComment = true; - {cs = 849;goto _again;} - }} - break; - case 324: -#line 1410 "Parser.rl" - {te = p+1;{ p--; { - DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); - if ((int)stack.size() == top) { - stack.resize(2 * (top + 1)); - } - {stack[top++] = cs; cs = 787;goto _again;}} }} - break; - case 325: -#line 1414 "Parser.rl" - {te = p+1;{ assert(0); {p++; goto _out; } }} - break; - case 326: -#line 1421 "Parser.rl" - {te = p+1;{ - auto bound = mode.multiline ? ComponentBoundary::BEGIN_LINE - : ComponentBoundary::BEGIN_STRING; - currentSeq->addComponent(std::make_unique(bound)); - }} - break; - case 327: -#line 1428 "Parser.rl" - {te = p+1;{ - auto bound = mode.multiline ? ComponentBoundary::END_LINE - : ComponentBoundary::END_STRING_OPTIONAL_LF; - currentSeq->addComponent(std::make_unique(bound)); - }} - break; - case 328: -#line 1434 "Parser.rl" - {te = p+1;{ - auto bound = ComponentBoundary::BEGIN_STRING; - currentSeq->addComponent(std::make_unique(bound)); - }} - break; - case 329: -#line 1439 "Parser.rl" - {te = p+1;{ - auto bound = ComponentBoundary::END_STRING_OPTIONAL_LF; - currentSeq->addComponent(std::make_unique(bound)); - }} - break; - case 330: -#line 1444 "Parser.rl" - {te = p+1;{ - auto bound = ComponentBoundary::END_STRING; - currentSeq->addComponent(std::make_unique(bound)); - }} - break; - case 331: -#line 1449 "Parser.rl" - {te = p+1;{ - currentSeq->addComponent( - std::make_unique(ts - ptr, false, mode)); - }} - break; - case 332: -#line 1454 "Parser.rl" - {te = p+1;{ - currentSeq->addComponent( - std::make_unique(ts - ptr, true, mode)); - }} - break; - case 333: -#line 1464 "Parser.rl" - {te = p+1;{ - addLiteral(currentSeq, '\x09', mode); - }} - break; - case 334: -#line 1468 "Parser.rl" - {te = p+1;{ - addLiteral(currentSeq, '\x0a', mode); - }} - break; - case 335: -#line 1472 "Parser.rl" - {te = p+1;{ - addLiteral(currentSeq, '\x0d', mode); - }} - break; - case 336: -#line 1476 "Parser.rl" - {te = p+1;{ - addLiteral(currentSeq, '\x0c', mode); - }} - break; - case 337: -#line 1480 "Parser.rl" - {te = p+1;{ - addLiteral(currentSeq, '\x07', mode); - }} - break; - case 338: -#line 1484 "Parser.rl" - {te = p+1;{ - addLiteral(currentSeq, '\x1b', mode); - }} - break; - case 339: -#line 1488 "Parser.rl" - {te = p+1;{ - addLiteral(currentSeq, octAccumulator, mode); - }} - break; - case 340: -#line 479 "Parser.rl" - {te = p+1;{ - if (accumulator == 0) { - throw LocatedParseError("Numbered reference cannot be zero"); - } - currentSeq->addComponent(std::make_unique(accumulator)); - }} - break; - case 341: -#line 486 "Parser.rl" - {te = p+1;{ - // Accumulator is a negative offset. - if (accumulator == 0) { - throw LocatedParseError("Numbered reference cannot be zero"); - } - if (accumulator >= groupIndex) { - throw LocatedParseError("Invalid reference"); - } - unsigned idx = groupIndex - accumulator; - currentSeq->addComponent(std::make_unique(idx)); - }} - break; - case 342: -#line 479 "Parser.rl" - {te = p+1;{ - if (accumulator == 0) { - throw LocatedParseError("Numbered reference cannot be zero"); - } - currentSeq->addComponent(std::make_unique(accumulator)); - }} - break; - case 343: -#line 486 "Parser.rl" - {te = p+1;{ - // Accumulator is a negative offset. - if (accumulator == 0) { - throw LocatedParseError("Numbered reference cannot be zero"); - } - if (accumulator >= groupIndex) { - throw LocatedParseError("Invalid reference"); - } - unsigned idx = groupIndex - accumulator; - currentSeq->addComponent(std::make_unique(idx)); - }} - break; - case 344: -#line 498 "Parser.rl" - {te = p+1;{ - currentSeq->addComponent(std::make_unique(label)); - }} - break; - case 345: -#line 498 "Parser.rl" - {te = p+1;{ - currentSeq->addComponent(std::make_unique(label)); - }} - break; - case 346: -#line 498 "Parser.rl" - {te = p+1;{ - currentSeq->addComponent(std::make_unique(label)); - }} - break; - case 347: -#line 498 "Parser.rl" - {te = p+1;{ - currentSeq->addComponent(std::make_unique(label)); - }} - break; - case 348: -#line 498 "Parser.rl" - {te = p+1;{ - currentSeq->addComponent(std::make_unique(label)); - }} - break; - case 349: -#line 1549 "Parser.rl" - {te = p+1;{ - ostringstream str; - str << "Onigiruma subroutine call at index " << ts - ptr << - " not supported."; - throw ParseError(str.str()); - }} - break; - case 350: -#line 1560 "Parser.rl" - {te = p+1;{ - string oct(ts + 3, te - ts - 4); - unsigned long val; - try { - val = stoul(oct, nullptr, 8); - } catch (const std::out_of_range &) { - val = MAX_UNICODE + 1; - } - if ((!mode.utf8 && val > 255) || val > MAX_UNICODE) { - throw LocatedParseError("Value in \\o{...} sequence is too large"); - } - addEscapedOctal(currentSeq, (unichar)val, mode); - }} - break; - case 351: -#line 1578 "Parser.rl" - {te = p+1;{ - addEscapedHex(currentSeq, accumulator, mode); - }} - break; - case 352: -#line 1582 "Parser.rl" - {te = p+1;{ - string hex(ts + 3, te - ts - 4); - unsigned long val; - try { - val = stoul(hex, nullptr, 16); - } catch (const std::out_of_range &) { - val = MAX_UNICODE + 1; - } - if (val > MAX_UNICODE) { - throw LocatedParseError("Value in \\x{...} sequence is too large"); - } - addEscapedHex(currentSeq, (unichar)val, mode); - }} - break; - case 353: -#line 1600 "Parser.rl" - {te = p+1;{ - if (te - ts < 3) { - assert(te - ts == 2); - throw LocatedParseError(SLASH_C_ERROR); - } else { - assert(te - ts == 3); - addLiteral(currentSeq, decodeCtrl(ts[2]), mode); - } - }} - break; - case 354: -#line 1610 "Parser.rl" - {te = p+1;{ - ostringstream str; - str << "'\\" << *(ts + 1) << "' at index " << ts - ptr - << " not supported."; - throw ParseError(str.str()); - }} - break; - case 355: -#line 1618 "Parser.rl" - {te = p+1;{ - auto cc = generateComponent(CLASS_WORD, false, mode); - currentSeq->addComponent(move(cc)); - }} - break; - case 356: -#line 1623 "Parser.rl" - {te = p+1;{ - auto cc = generateComponent(CLASS_WORD, true, mode); - currentSeq->addComponent(move(cc)); - }} - break; - case 357: -#line 1628 "Parser.rl" - {te = p+1;{ - auto cc = generateComponent(CLASS_SPACE, false, mode); - currentSeq->addComponent(move(cc)); - }} - break; - case 358: -#line 1633 "Parser.rl" - {te = p+1;{ - auto cc = generateComponent(CLASS_SPACE, true, mode); - currentSeq->addComponent(move(cc)); - }} - break; - case 359: -#line 1638 "Parser.rl" - {te = p+1;{ - auto cc = generateComponent(CLASS_DIGIT, false, mode); - currentSeq->addComponent(move(cc)); - }} - break; - case 360: -#line 1643 "Parser.rl" - {te = p+1;{ - auto cc = generateComponent(CLASS_DIGIT, true, mode); - currentSeq->addComponent(move(cc)); - }} - break; - case 361: -#line 1648 "Parser.rl" - {te = p+1;{ - auto cc = generateComponent(CLASS_HORZ, false, mode); - currentSeq->addComponent(move(cc)); - }} - break; - case 362: -#line 1653 "Parser.rl" - {te = p+1;{ - auto cc = generateComponent(CLASS_HORZ, true, mode); - currentSeq->addComponent(move(cc)); - }} - break; - case 363: -#line 1658 "Parser.rl" - {te = p+1;{ - auto cc = generateComponent(CLASS_VERT, false, mode); - currentSeq->addComponent(move(cc)); - }} - break; - case 364: -#line 1663 "Parser.rl" - {te = p+1;{ - auto cc = generateComponent(CLASS_VERT, true, mode); - currentSeq->addComponent(move(cc)); - }} - break; - case 365: -#line 1668 "Parser.rl" - {te = p+1;{ - assert(!currentCls && !inCharClass); - currentCls = getComponentClass(mode); - negated = false; - p--; - { - DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); - if ((int)stack.size() == top) { - stack.resize(2 * (top + 1)); - } - {stack[top++] = cs; cs = 559;goto _again;}} - }} - break; - case 366: -#line 1676 "Parser.rl" - {te = p+1;{ - assert(!currentCls && !inCharClass); - currentCls = getComponentClass(mode); - negated = false; - p--; - { - DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); - if ((int)stack.size() == top) { - stack.resize(2 * (top + 1)); - } - {stack[top++] = cs; cs = 818;goto _again;}} - }} - break; - case 367: -#line 1684 "Parser.rl" - {te = p+1;{ - assert(!currentCls && !inCharClass); - currentCls = getComponentClass(mode); - negated = true; - p--; - { - DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); - if ((int)stack.size() == top) { - stack.resize(2 * (top + 1)); - } - {stack[top++] = cs; cs = 559;goto _again;}} - }} - break; - case 368: -#line 1692 "Parser.rl" - {te = p+1;{ - assert(!currentCls && !inCharClass); - currentCls = getComponentClass(mode); - negated = true; - p--; - { - DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); - if ((int)stack.size() == top) { - stack.resize(2 * (top + 1)); - } - {stack[top++] = cs; cs = 818;goto _again;}} - }} - break; - case 369: -#line 1704 "Parser.rl" - {te = p+1;{ - ostringstream str; - str << "\\R at index " << ts - ptr << " not supported."; - throw ParseError(str.str()); - }} - break; - case 370: -#line 1711 "Parser.rl" - {te = p+1;{ - ostringstream str; - str << "\\K at index " << ts - ptr << " not supported."; - throw ParseError(str.str()); - }} - break; - case 371: -#line 1726 "Parser.rl" - {te = p+1;{ - ostringstream str; - str << "\\G at index " << ts - ptr << " not supported."; - throw ParseError(str.str()); - }} - break; - case 372: -#line 1732 "Parser.rl" - {te = p+1;{ - currentSeq->addComponent(std::make_unique(ts - ptr, mode)); - }} - break; - case 373: -#line 1737 "Parser.rl" - {te = p+1;{ - addLiteral(currentSeq, *(ts + 1), mode); - }} - break; - case 374: -#line 316 "Parser.rl" - {te = p+1;{ - inComment = true; - {cs = 848;goto _again;} - }} - break; - case 375: -#line 433 "Parser.rl" - {te = p+1;{ - mode = newMode; - currentSeq->addComponent(std::make_unique()); - }} - break; - case 376: -#line 355 "Parser.rl" - {te = p+1;{ - PUSH_SEQUENCE; - mode = newMode; - currentSeq = - enterSequence(currentSeq, std::make_unique()); - }} - break; - case 377: -#line 369 "Parser.rl" - {te = p+1;{ - PUSH_SEQUENCE; - currentSeq = enterSequence(currentSeq, - std::make_unique(ComponentAssertion::LOOKAHEAD, - ComponentAssertion::POS)); - }} - break; - case 378: -#line 375 "Parser.rl" - {te = p+1;{ - PUSH_SEQUENCE; - currentSeq = enterSequence(currentSeq, - std::make_unique(ComponentAssertion::LOOKAHEAD, - ComponentAssertion::NEG)); - }} - break; - case 379: -#line 381 "Parser.rl" - {te = p+1;{ - PUSH_SEQUENCE; - currentSeq = enterSequence(currentSeq, - std::make_unique(ComponentAssertion::LOOKBEHIND, - ComponentAssertion::POS)); - }} - break; - case 380: -#line 387 "Parser.rl" - {te = p+1;{ - PUSH_SEQUENCE; - currentSeq = enterSequence(currentSeq, - std::make_unique(ComponentAssertion::LOOKBEHIND, - ComponentAssertion::NEG)); - }} - break; - case 381: -#line 393 "Parser.rl" - {te = p+1;{ - throw LocatedParseError("Embedded code is not supported"); - }} - break; - case 382: -#line 393 "Parser.rl" - {te = p+1;{ - throw LocatedParseError("Embedded code is not supported"); - }} - break; - case 383: -#line 416 "Parser.rl" - {te = p+1;{ - PUSH_SEQUENCE; - currentSeq = enterSequence(currentSeq, - std::make_unique()); - }} - break; - case 384: -#line 336 "Parser.rl" - {te = p+1;{ - assert(!label.empty()); // should be guaranteed by machine - char c = *label.begin(); - if (c >= '0' && c <= '9') { - throw LocatedParseError("Group name cannot begin with a digit"); - } - if (!groupNames.insert(label).second) { - throw LocatedParseError("Two named subpatterns use the name '" + label + "'"); - } - PUSH_SEQUENCE; - auto seq = std::make_unique(); - seq->setCaptureIndex(groupIndex++); - seq->setCaptureName(label); - currentSeq = enterSequence(currentSeq, move(seq)); - }} - break; - case 385: -#line 399 "Parser.rl" - {te = p+1;{ - throw LocatedParseError("Subpattern reference unsupported"); - }} - break; - case 386: -#line 399 "Parser.rl" - {te = p+1;{ - throw LocatedParseError("Subpattern reference unsupported"); - }} - break; - case 387: -#line 1783 "Parser.rl" - {te = p+1;{ - auto a = std::make_unique( - ComponentAssertion::LOOKAHEAD, ComponentAssertion::POS); - ComponentAssertion *a_seq = a.get(); - PUSH_SEQUENCE; - currentSeq = enterSequence(currentSeq, - std::make_unique(move(a))); - PUSH_SEQUENCE; - currentSeq = a_seq; - }} - break; - case 388: -#line 1794 "Parser.rl" - {te = p+1;{ - auto a = std::make_unique( - ComponentAssertion::LOOKAHEAD, ComponentAssertion::NEG); - ComponentAssertion *a_seq = a.get(); - PUSH_SEQUENCE; - currentSeq = enterSequence(currentSeq, - std::make_unique(move(a))); - PUSH_SEQUENCE; - currentSeq = a_seq; - }} - break; - case 389: -#line 1805 "Parser.rl" - {te = p+1;{ - auto a = std::make_unique( - ComponentAssertion::LOOKBEHIND, ComponentAssertion::POS); - ComponentAssertion *a_seq = a.get(); - PUSH_SEQUENCE; - currentSeq = enterSequence(currentSeq, - std::make_unique(move(a))); - PUSH_SEQUENCE; - currentSeq = a_seq; - }} - break; - case 390: -#line 1816 "Parser.rl" - {te = p+1;{ - auto a = std::make_unique( - ComponentAssertion::LOOKBEHIND, ComponentAssertion::NEG); - ComponentAssertion *a_seq = a.get(); - PUSH_SEQUENCE; - currentSeq = enterSequence(currentSeq, - std::make_unique(move(a))); - PUSH_SEQUENCE; - currentSeq = a_seq; - }} - break; - case 391: -#line 1828 "Parser.rl" - {te = p+1;{ - throw LocatedParseError("Pattern recursion not supported"); - }} - break; - case 392: -#line 402 "Parser.rl" - {te = p+1;{ - if (accumulator == 0) { - throw LocatedParseError("Numbered reference cannot be zero"); - } - PUSH_SEQUENCE; - currentSeq = enterSequence(currentSeq, - std::make_unique(accumulator)); - }} - break; - case 393: -#line 410 "Parser.rl" - {te = p+1;{ - PUSH_SEQUENCE; - assert(!label.empty()); - currentSeq = enterSequence(currentSeq, - std::make_unique(label)); - }} - break; - case 394: -#line 1844 "Parser.rl" - {te = p+1;{ - ostringstream str; - str << "Callout at index " << ts - ptr << " not supported."; - throw ParseError(str.str()); - }} - break; - case 395: -#line 1852 "Parser.rl" - {te = p+1;{ - throw LocatedParseError("Unrecognised character after (?"); - }} - break; - case 396: -#line 1857 "Parser.rl" - {te = p+1;{ - assert(mode.utf8); - /* leverage ComponentClass to generate the vertices */ - auto cc = getComponentClass(mode); - cc->add(readUtf8CodePoint2c(ts)); - cc->finalize(); - currentSeq->addComponent(move(cc)); - }} - break; - case 397: -#line 1866 "Parser.rl" - {te = p+1;{ - assert(mode.utf8); - /* leverage ComponentClass to generate the vertices */ - auto cc = getComponentClass(mode); - cc->add(readUtf8CodePoint3c(ts)); - cc->finalize(); - currentSeq->addComponent(move(cc)); - }} - break; - case 398: -#line 1875 "Parser.rl" - {te = p+1;{ - assert(mode.utf8); - /* leverage ComponentClass to generate the vertices */ - auto cc = getComponentClass(mode); - cc->add(readUtf8CodePoint4c(ts)); - cc->finalize(); - currentSeq->addComponent(move(cc)); - }} - break; - case 399: -#line 1884 "Parser.rl" - {te = p+1;{ - assert(mode.utf8); - throwInvalidUtf8(); - }} - break; - case 400: -#line 1893 "Parser.rl" - {te = p+1;{ - if (mode.ignore_space == false) { - addLiteral(currentSeq, *ts, mode); - } - }} - break; - case 401: -#line 1898 "Parser.rl" - {te = p+1;{ - addLiteral(currentSeq, *ts, mode); - }} - break; - case 402: -#line 328 "Parser.rl" - {te = p;p--;{ - PUSH_SEQUENCE; - auto seq = std::make_unique(); - seq->setCaptureIndex(groupIndex++); - currentSeq = enterSequence(currentSeq, move(seq)); - }} - break; - case 403: -#line 421 "Parser.rl" - {te = p;p--;{ - assert(!currentCls); - assert(!inCharClass); // not reentrant - currentCls = getComponentClass(mode); - inCharClass = true; - inCharClassEarly = true; - currentClsBegin = ts; - {cs = 836;goto _again;} - }} - break; - case 404: -#line 1310 "Parser.rl" - {te = p;p--;{ - if (!currentSeq->addRepeat(0, ComponentRepeat::NoLimit, - ComponentRepeat::REPEAT_GREEDY)) { - throwInvalidRepeat(); - } - }} - break; - case 405: -#line 1331 "Parser.rl" - {te = p;p--;{ - if (!currentSeq->addRepeat(1, ComponentRepeat::NoLimit, - ComponentRepeat::REPEAT_GREEDY)) { - throwInvalidRepeat(); - } - }} - break; - case 406: -#line 1352 "Parser.rl" - {te = p;p--;{ - if (!currentSeq->addRepeat( - 0, 1, ComponentRepeat::REPEAT_GREEDY)) { - throwInvalidRepeat(); - } - }} - break; - case 407: -#line 1373 "Parser.rl" - {te = p;p--;{ - if (repeatN > repeatM || repeatM == 0) { - throwInvalidRepeat(); - } else if (!currentSeq->addRepeat( - repeatN, repeatM, - ComponentRepeat::REPEAT_GREEDY)) { - throwInvalidRepeat(); - } - }} - break; - case 408: -#line 1488 "Parser.rl" - {te = p;p--;{ - addLiteral(currentSeq, octAccumulator, mode); - }} - break; - case 409: -#line 1491 "Parser.rl" - {te = p;p--;{ - // If there are enough capturing sub expressions, this may be - // a back reference - accumulator = parseAsDecimal(octAccumulator); - if (accumulator < groupIndex) { - currentSeq->addComponent(std::make_unique(accumulator)); - } else { - addEscapedOctal(currentSeq, octAccumulator, mode); - } - }} - break; - case 410: -#line 479 "Parser.rl" - {te = p;p--;{ - if (accumulator == 0) { - throw LocatedParseError("Numbered reference cannot be zero"); - } - currentSeq->addComponent(std::make_unique(accumulator)); - }} - break; - case 411: -#line 479 "Parser.rl" - {te = p;p--;{ - if (accumulator == 0) { - throw LocatedParseError("Numbered reference cannot be zero"); - } - currentSeq->addComponent(std::make_unique(accumulator)); - }} - break; - case 412: -#line 486 "Parser.rl" - {te = p;p--;{ - // Accumulator is a negative offset. - if (accumulator == 0) { - throw LocatedParseError("Numbered reference cannot be zero"); - } - if (accumulator >= groupIndex) { - throw LocatedParseError("Invalid reference"); - } - unsigned idx = groupIndex - accumulator; - currentSeq->addComponent(std::make_unique(idx)); - }} - break; - case 413: -#line 1557 "Parser.rl" - {te = p;p--;{ - throw LocatedParseError("Invalid reference after \\g"); - }} - break; - case 414: -#line 1574 "Parser.rl" - {te = p;p--;{ - throw LocatedParseError("Value in \\o{...} sequence is non-octal or missing braces"); - }} - break; - case 415: -#line 1578 "Parser.rl" - {te = p;p--;{ - addEscapedHex(currentSeq, accumulator, mode); - }} - break; - case 416: -#line 1596 "Parser.rl" - {te = p;p--;{ - throw LocatedParseError("Value in \\x{...} sequence is non-hex or missing }"); - }} - break; - case 417: -#line 1600 "Parser.rl" - {te = p;p--;{ - if (te - ts < 3) { - assert(te - ts == 2); - throw LocatedParseError(SLASH_C_ERROR); - } else { - assert(te - ts == 3); - addLiteral(currentSeq, decodeCtrl(ts[2]), mode); - } - }} - break; - case 418: -#line 1700 "Parser.rl" - {te = p;p--;{ throw LocatedParseError("Malformed property"); }} - break; - case 419: -#line 1701 "Parser.rl" - {te = p;p--;{ throw LocatedParseError("Malformed property"); }} - break; - case 420: -#line 1719 "Parser.rl" - {te = p;p--;{ - ostringstream str; - str << "\\k at index " << ts - ptr << " not supported."; - throw ParseError(str.str()); - }} - break; - case 421: -#line 1742 "Parser.rl" - {te = p;p--;{ - assert(ts + 1 == pe); - ostringstream str; - str << "Unescaped \\ at end of input, index " << ts - ptr << "."; - throw ParseError(str.str()); - }} - break; - case 422: -#line 396 "Parser.rl" - {te = p;p--;{ - throw LocatedParseError("Conditional subpattern unsupported"); - }} - break; - case 423: -#line 1852 "Parser.rl" - {te = p;p--;{ - throw LocatedParseError("Unrecognised character after (?"); - }} - break; - case 424: -#line 1884 "Parser.rl" - {te = p;p--;{ - assert(mode.utf8); - throwInvalidUtf8(); - }} - break; - case 425: -#line 1898 "Parser.rl" - {te = p;p--;{ - addLiteral(currentSeq, *ts, mode); - }} - break; - case 426: -#line 328 "Parser.rl" - {{p = ((te))-1;}{ - PUSH_SEQUENCE; - auto seq = std::make_unique(); - seq->setCaptureIndex(groupIndex++); - currentSeq = enterSequence(currentSeq, move(seq)); - }} - break; - case 427: -#line 421 "Parser.rl" - {{p = ((te))-1;}{ - assert(!currentCls); - assert(!inCharClass); // not reentrant - currentCls = getComponentClass(mode); - inCharClass = true; - inCharClassEarly = true; - currentClsBegin = ts; - {cs = 836;goto _again;} - }} - break; - case 428: -#line 1557 "Parser.rl" - {{p = ((te))-1;}{ - throw LocatedParseError("Invalid reference after \\g"); - }} - break; - case 429: -#line 1574 "Parser.rl" - {{p = ((te))-1;}{ - throw LocatedParseError("Value in \\o{...} sequence is non-octal or missing braces"); - }} - break; - case 430: -#line 1596 "Parser.rl" - {{p = ((te))-1;}{ - throw LocatedParseError("Value in \\x{...} sequence is non-hex or missing }"); - }} - break; - case 431: -#line 1719 "Parser.rl" - {{p = ((te))-1;}{ - ostringstream str; - str << "\\k at index " << ts - ptr << " not supported."; - throw ParseError(str.str()); - }} - break; - case 432: -#line 396 "Parser.rl" - {{p = ((te))-1;}{ - throw LocatedParseError("Conditional subpattern unsupported"); - }} - break; - case 433: -#line 1852 "Parser.rl" - {{p = ((te))-1;}{ - throw LocatedParseError("Unrecognised character after (?"); - }} - break; - case 434: -#line 1884 "Parser.rl" - {{p = ((te))-1;}{ - assert(mode.utf8); - throwInvalidUtf8(); - }} - break; - case 435: -#line 1898 "Parser.rl" - {{p = ((te))-1;}{ - addLiteral(currentSeq, *ts, mode); - }} - break; - case 436: -#line 1 "NONE" - { switch( act ) { - case 288: - {{p = ((te))-1;} - // If there are enough capturing sub expressions, this may be - // a back reference - accumulator = parseAsDecimal(octAccumulator); - if (accumulator < groupIndex) { - currentSeq->addComponent(std::make_unique(accumulator)); - } else { - addEscapedOctal(currentSeq, octAccumulator, mode); - } - } - break; - case 290: - {{p = ((te))-1;} - // if there are enough left parens to this point, back ref - if (accumulator < groupIndex) { - currentSeq->addComponent(std::make_unique(accumulator)); - } else { - // Otherwise, we interpret the first three digits as an - // octal escape, and the remaining characters stand for - // themselves as literals. - const char *s = ts; - unsigned int accum = 0; - unsigned int oct_digits = 0; - assert(*s == '\\'); // token starts at backslash - for (++s; s < te && oct_digits < 3; ++oct_digits, ++s) { - u8 digit = *s - '0'; - if (digit < 8) { - accum = digit + accum * 8; - } else { - break; - } - } - - if (oct_digits > 0) { - addEscapedOctal(currentSeq, accum, mode); - } - - // And then the rest of the digits, if any, are literal. - for (; s < te; ++s) { - addLiteral(currentSeq, *s, mode); - } - } - } - break; - case 330: - {{p = ((te))-1;} - addLiteral(currentSeq, *(ts + 1), mode); - } - break; - } - } - break; -#line 5508 "Parser.cpp" - } - } - -_again: - _acts = _regex_actions + _regex_to_state_actions[cs]; - _nacts = (unsigned int) *_acts++; - while ( _nacts-- > 0 ) { - switch ( *_acts++ ) { - case 23: -#line 1 "NONE" - {ts = 0;} - break; -#line 5521 "Parser.cpp" - } - } - - if ( cs == 0 ) - goto _out; - if ( ++p != pe ) - goto _resume; - _test_eof: {} - if ( p == eof ) - { - if ( _regex_eof_trans[cs] > 0 ) { - _trans = _regex_eof_trans[cs] - 1; - goto _eof_trans; - } - const short *__acts = _regex_actions + _regex_eof_actions[cs]; - unsigned int __nacts = (unsigned int) *__acts++; - while ( __nacts-- > 0 ) { - switch ( *__acts++ ) { - case 22: -#line 730 "Parser.rl" - { throw LocatedParseError("Malformed property"); } - break; -#line 5544 "Parser.cpp" - } - } - } - - _out: {} - } - -#line 1984 "Parser.rl" - - if (p != pe && *p != '\0') { - // didn't make it to the end of our input, but we didn't throw a ParseError? - assert(0); - ostringstream str; - str << "Parse error at index " << (p - ptr) << "."; - throw ParseError(str.str()); - } - - if (currentCls) { - assert(inCharClass); - assert(currentClsBegin); - ostringstream oss; - oss << "Unterminated character class starting at index " - << currentClsBegin - ptr << "."; - throw ParseError(oss.str()); - } - - if (inComment) { - throw ParseError("Unterminated comment."); - } - - if (!sequences.empty()) { - ostringstream str; - str << "Missing close parenthesis for group started at index " - << sequences.back().seqOffset << "."; - throw ParseError(str.str()); - } - - // Unlikely, but possible - if (groupIndex > 65535) { - throw ParseError("The maximum number of capturing subexpressions is 65535."); - } - - // Finalize the top-level sequence, which will take care of any - // top-level alternation. - currentSeq->finalize(); - assert(currentSeq == rootSeq.get()); - - // Ensure that all references are valid. - checkReferences(*rootSeq, groupIndex, groupNames); - - return move(rootSeq); - } catch (LocatedParseError &error) { - if (ts >= ptr && ts <= pe) { - error.locate(ts - ptr); - } else { - error.locate(0); - } - throw; - } -} - -} // namespace ue2 diff --git a/contrib/vectorscan-cmake/rageled_files/aarch64/Parser.cpp b/contrib/vectorscan-cmake/rageled_files/aarch64/Parser.cpp new file mode 100644 index 00000000000..fd58ead4128 --- /dev/null +++ b/contrib/vectorscan-cmake/rageled_files/aarch64/Parser.cpp @@ -0,0 +1,10725 @@ +#line 1 "Parser.rl" +/* +* Copyright (c) 2015-2017, Intel Corporation +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* +* * Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. +* * 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. +* * Neither the name of Intel Corporation nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. +*/ + +/** \file +* \brief Parser code (generated with Ragel from Parser.rl). +*/ + +#include "config.h" + +/* Parser.cpp is a built source, may not be in same dir as parser files */ +#include "parser/check_refs.h" +#include "parser/control_verbs.h" +#include "parser/ComponentAlternation.h" +#include "parser/ComponentAssertion.h" +#include "parser/ComponentAtomicGroup.h" +#include "parser/ComponentBackReference.h" +#include "parser/ComponentBoundary.h" +#include "parser/ComponentByte.h" +#include "parser/ComponentClass.h" +#include "parser/ComponentCondReference.h" +#include "parser/ComponentEmpty.h" +#include "parser/ComponentEUS.h" +#include "parser/Component.h" +#include "parser/ComponentRepeat.h" +#include "parser/ComponentSequence.h" +#include "parser/ComponentWordBoundary.h" +#include "parser/parse_error.h" +#include "parser/Parser.h" +#include "ue2common.h" +#include "util/compare.h" +#include "util/flat_containers.h" +#include "util/unicode_def.h" +#include "util/verify_types.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +namespace ue2 { + +#define PUSH_SEQUENCE do {\ + sequences.push_back(ExprState(currentSeq, (size_t)(ts - ptr), \ + mode)); \ + } while(0) +#define POP_SEQUENCE do {\ + currentSeq = sequences.back().seq; \ + mode = sequences.back().mode; \ + sequences.pop_back(); \ + } while(0) + + namespace { + + /** \brief Structure representing current state as we're parsing (current + * sequence, current options). Stored in the 'sequences' vector. */ + struct ExprState { + ExprState(ComponentSequence *seq_in, size_t offset, + const ParseMode &mode_in) : + seq(seq_in), seqOffset(offset), mode(mode_in) {} + + ComponentSequence *seq; //!< current sequence + size_t seqOffset; //!< offset seq was entered, for error reporting + ParseMode mode; //!< current mode flags + }; + + } // namespace + + static + unsigned parseAsDecimal(unsigned oct) { + // The input was parsed as octal, but should have been parsed as decimal. + // Deconstruct the octal number and reconstruct into decimal + unsigned ret = 0; + unsigned multiplier = 1; + while (oct) { + ret += (oct & 0x7) * multiplier; + oct >>= 3; + multiplier *= 10; + } + return ret; + } + + /** \brief Maximum value for a positive integer. We use INT_MAX, as that's what + * PCRE uses. */ + static constexpr u32 MAX_NUMBER = INT_MAX; + + static + void pushDec(u32 *acc, char raw_digit) { + assert(raw_digit >= '0' && raw_digit <= '9'); + u32 digit_val = raw_digit - '0'; + + // Ensure that we don't overflow. + u64a val = ((u64a)*acc * 10) + digit_val; + if (val > MAX_NUMBER) { + throw LocatedParseError("Number is too big"); + } + + *acc = verify_u32(val); + } + + static + void pushOct(u32 *acc, char raw_digit) { + assert(raw_digit >= '0' && raw_digit <= '7'); + u32 digit_val = raw_digit - '0'; + + // Ensure that we don't overflow. + u64a val = ((u64a)*acc * 8) + digit_val; + if (val > MAX_NUMBER) { + throw LocatedParseError("Number is too big"); + } + + *acc = verify_u32(val); + } + + static + void throwInvalidRepeat(void) { + throw LocatedParseError("Invalid repeat"); + } + + static + void throwInvalidUtf8(void) { + throw ParseError("Expression is not valid UTF-8."); + } + + /** + * Adds the given child component to the parent sequence, returning a pointer + * to the new (child) "current sequence". + */ + static + ComponentSequence *enterSequence(ComponentSequence *parent, + unique_ptr child) { + assert(parent); + assert(child); + + ComponentSequence *seq = child.get(); + parent->addComponent(move(child)); + return seq; + } + + static + void addLiteral(ComponentSequence *currentSeq, char c, const ParseMode &mode) { + if (mode.utf8 && mode.caseless) { + /* leverage ComponentClass to generate the vertices */ + auto cc = getComponentClass(mode); + assert(cc); + cc->add(c); + cc->finalize(); + currentSeq->addComponent(move(cc)); + } else { + currentSeq->addComponent(getLiteralComponentClass(c, mode.caseless)); + } + } + + static + void addEscaped(ComponentSequence *currentSeq, unichar accum, + const ParseMode &mode, const char *err_msg) { + if (mode.utf8) { + /* leverage ComponentClass to generate the vertices */ + auto cc = getComponentClass(mode); + assert(cc); + cc->add(accum); + cc->finalize(); + currentSeq->addComponent(move(cc)); + } else { + if (accum > 255) { + throw LocatedParseError(err_msg); + } + addLiteral(currentSeq, (char)accum, mode); + } + } + + static + void addEscapedOctal(ComponentSequence *currentSeq, unichar accum, + const ParseMode &mode) { + addEscaped(currentSeq, accum, mode, "Octal value is greater than \\377"); + } + + static + void addEscapedHex(ComponentSequence *currentSeq, unichar accum, + const ParseMode &mode) { + addEscaped(currentSeq, accum, mode, + "Hexadecimal value is greater than \\xFF"); + } + +#define SLASH_C_ERROR "\\c must be followed by an ASCII character" + + static + u8 decodeCtrl(char raw) { + if (raw & 0x80) { + throw LocatedParseError(SLASH_C_ERROR); + } + return mytoupper(raw) ^ 0x40; + } + + static + unichar readUtf8CodePoint2c(const char *s) { + auto *ts = (const u8 *)s; + assert(ts[0] >= 0xc0 && ts[0] < 0xe0); + assert(ts[1] >= 0x80 && ts[1] < 0xc0); + unichar val = ts[0] & 0x1f; + val <<= 6; + val |= ts[1] & 0x3f; + DEBUG_PRINTF("utf8 %02hhx %02hhx ->\\x{%x}\n", ts[0], + ts[1], val); + return val; + } + + static + unichar readUtf8CodePoint3c(const char *s) { + auto *ts = (const u8 *)s; + assert(ts[0] >= 0xe0 && ts[0] < 0xf0); + assert(ts[1] >= 0x80 && ts[1] < 0xc0); + assert(ts[2] >= 0x80 && ts[2] < 0xc0); + unichar val = ts[0] & 0x0f; + val <<= 6; + val |= ts[1] & 0x3f; + val <<= 6; + val |= ts[2] & 0x3f; + DEBUG_PRINTF("utf8 %02hhx %02hhx %02hhx ->\\x{%x}\n", ts[0], + ts[1], ts[2], val); + return val; + } + + static + unichar readUtf8CodePoint4c(const char *s) { + auto *ts = (const u8 *)s; + assert(ts[0] >= 0xf0 && ts[0] < 0xf8); + assert(ts[1] >= 0x80 && ts[1] < 0xc0); + assert(ts[2] >= 0x80 && ts[2] < 0xc0); + assert(ts[3] >= 0x80 && ts[3] < 0xc0); + unichar val = ts[0] & 0x07; + val <<= 6; + val |= ts[1] & 0x3f; + val <<= 6; + val |= ts[2] & 0x3f; + val <<= 6; + val |= ts[3] & 0x3f; + DEBUG_PRINTF("utf8 %02hhx %02hhx %02hhx %02hhx ->\\x{%x}\n", ts[0], + ts[1], ts[2], ts[3], val); + return val; + } + + +#line 1909 "Parser.rl" + + + +#line 277 "Parser.cpp" +static const short _regex_actions[] = { + 0, 1, 0, 1, 1, 1, 2, 1, + 3, 1, 4, 1, 7, 1, 8, 1, + 9, 1, 10, 1, 11, 1, 12, 1, + 13, 1, 15, 1, 16, 1, 17, 1, + 18, 1, 19, 1, 20, 1, 21, 1, + 22, 1, 23, 1, 24, 1, 25, 1, + 26, 1, 27, 1, 28, 1, 29, 1, + 30, 1, 31, 1, 32, 1, 33, 1, + 34, 1, 35, 1, 36, 1, 37, 1, + 38, 1, 39, 1, 40, 1, 41, 1, + 42, 1, 43, 1, 44, 1, 45, 1, + 46, 1, 47, 1, 48, 1, 49, 1, + 50, 1, 51, 1, 52, 1, 53, 1, + 54, 1, 55, 1, 56, 1, 57, 1, + 58, 1, 59, 1, 60, 1, 61, 1, + 62, 1, 63, 1, 64, 1, 65, 1, + 66, 1, 67, 1, 68, 1, 69, 1, + 70, 1, 71, 1, 72, 1, 73, 1, + 74, 1, 75, 1, 76, 1, 77, 1, + 78, 1, 79, 1, 80, 1, 81, 1, + 82, 1, 83, 1, 84, 1, 85, 1, + 86, 1, 87, 1, 88, 1, 89, 1, + 90, 1, 91, 1, 92, 1, 93, 1, + 94, 1, 95, 1, 96, 1, 97, 1, + 98, 1, 99, 1, 100, 1, 101, 1, + 102, 1, 103, 1, 104, 1, 105, 1, + 106, 1, 107, 1, 108, 1, 109, 1, + 110, 1, 111, 1, 112, 1, 113, 1, + 114, 1, 115, 1, 116, 1, 117, 1, + 118, 1, 119, 1, 120, 1, 121, 1, + 122, 1, 123, 1, 124, 1, 125, 1, + 126, 1, 127, 1, 128, 1, 129, 1, + 130, 1, 131, 1, 132, 1, 133, 1, + 134, 1, 135, 1, 136, 1, 137, 1, + 138, 1, 139, 1, 140, 1, 141, 1, + 142, 1, 143, 1, 144, 1, 145, 1, + 146, 1, 147, 1, 148, 1, 149, 1, + 150, 1, 151, 1, 152, 1, 153, 1, + 154, 1, 155, 1, 156, 1, 157, 1, + 158, 1, 159, 1, 160, 1, 161, 1, + 162, 1, 163, 1, 164, 1, 165, 1, + 166, 1, 167, 1, 168, 1, 169, 1, + 170, 1, 171, 1, 172, 1, 173, 1, + 174, 1, 175, 1, 176, 1, 177, 1, + 178, 1, 179, 1, 180, 1, 181, 1, + 182, 1, 183, 1, 184, 1, 185, 1, + 186, 1, 187, 1, 188, 1, 189, 1, + 190, 1, 191, 1, 192, 1, 193, 1, + 194, 1, 195, 1, 196, 1, 197, 1, + 198, 1, 199, 1, 200, 1, 201, 1, + 202, 1, 203, 1, 204, 1, 205, 1, + 206, 1, 207, 1, 208, 1, 209, 1, + 210, 1, 211, 1, 212, 1, 213, 1, + 214, 1, 215, 1, 216, 1, 217, 1, + 218, 1, 219, 1, 220, 1, 221, 1, + 222, 1, 223, 1, 224, 1, 225, 1, + 226, 1, 227, 1, 228, 1, 229, 1, + 230, 1, 231, 1, 232, 1, 233, 1, + 234, 1, 235, 1, 236, 1, 237, 1, + 240, 1, 242, 1, 243, 1, 244, 1, + 245, 1, 246, 1, 247, 1, 248, 1, + 249, 1, 250, 1, 251, 1, 252, 1, + 253, 1, 254, 1, 255, 1, 256, 1, + 257, 1, 258, 1, 259, 1, 260, 1, + 261, 1, 262, 1, 263, 1, 264, 1, + 265, 1, 266, 1, 267, 1, 268, 1, + 269, 1, 270, 1, 271, 1, 272, 1, + 273, 1, 274, 1, 275, 1, 276, 1, + 277, 1, 278, 1, 279, 1, 280, 1, + 281, 1, 282, 1, 283, 1, 284, 1, + 285, 1, 286, 1, 287, 1, 288, 1, + 289, 1, 290, 1, 291, 1, 292, 1, + 293, 1, 294, 1, 295, 1, 296, 1, + 297, 1, 298, 1, 299, 1, 300, 1, + 301, 1, 302, 1, 303, 1, 307, 1, + 308, 1, 309, 1, 310, 1, 311, 1, + 312, 1, 313, 1, 314, 1, 315, 1, + 316, 1, 317, 1, 318, 1, 319, 1, + 320, 1, 321, 1, 322, 1, 323, 1, + 324, 1, 325, 1, 326, 1, 327, 1, + 328, 1, 329, 1, 330, 1, 331, 1, + 332, 1, 333, 1, 334, 1, 335, 1, + 336, 1, 337, 1, 338, 1, 342, 1, + 343, 1, 344, 1, 345, 1, 346, 1, + 347, 1, 348, 1, 349, 1, 350, 1, + 352, 1, 353, 1, 354, 1, 355, 1, + 356, 1, 357, 1, 358, 1, 359, 1, + 360, 1, 361, 1, 362, 1, 363, 1, + 364, 1, 365, 1, 366, 1, 367, 1, + 368, 1, 369, 1, 370, 1, 371, 1, + 372, 1, 373, 1, 374, 1, 375, 1, + 376, 1, 377, 1, 378, 1, 379, 1, + 380, 1, 381, 1, 382, 1, 383, 1, + 384, 1, 385, 1, 386, 1, 387, 1, + 388, 1, 389, 1, 390, 1, 391, 1, + 392, 1, 393, 1, 394, 1, 395, 1, + 396, 1, 397, 1, 398, 1, 399, 1, + 400, 1, 401, 1, 402, 1, 403, 1, + 404, 1, 405, 1, 406, 1, 407, 1, + 408, 1, 409, 1, 410, 1, 411, 1, + 412, 1, 413, 1, 414, 1, 415, 1, + 416, 1, 417, 1, 418, 1, 419, 1, + 420, 1, 421, 1, 422, 1, 423, 1, + 424, 1, 425, 1, 426, 1, 427, 1, + 428, 1, 429, 1, 430, 1, 431, 1, + 432, 1, 433, 1, 434, 1, 435, 1, + 436, 2, 3, 0, 2, 4, 5, 2, + 5, 1, 2, 9, 10, 2, 9, 238, + 2, 9, 239, 2, 9, 339, 2, 10, + 1, 2, 10, 340, 2, 10, 341, 2, + 11, 241, 2, 11, 351, 2, 12, 241, + 2, 12, 351, 2, 13, 241, 2, 13, + 351, 2, 14, 375, 2, 14, 376, 2, + 25, 0, 2, 25, 3, 2, 25, 6, + 2, 25, 14, 3, 25, 5, 306, 3, + 25, 10, 305, 3, 25, 14, 15, 4, + 25, 9, 304, 10, 0 + }; + + static const short _regex_key_offsets[] = { + 0, 0, 1, 23, 31, 39, 46, 54, + 55, 63, 71, 79, 86, 94, 97, 99, + 108, 115, 123, 131, 134, 140, 148, 151, + 158, 165, 173, 180, 184, 191, 194, 197, + 199, 202, 205, 207, 210, 213, 215, 216, + 218, 219, 227, 229, 232, 235, 236, 244, + 252, 260, 268, 275, 283, 290, 298, 305, + 313, 315, 318, 325, 329, 332, 335, 337, + 339, 341, 342, 344, 345, 347, 349, 350, + 351, 353, 354, 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, 365, 366, 369, + 370, 371, 372, 373, 374, 375, 376, 377, + 378, 379, 380, 381, 382, 383, 384, 385, + 386, 387, 388, 389, 390, 392, 393, 394, + 395, 396, 397, 399, 400, 401, 402, 403, + 404, 405, 406, 408, 409, 410, 411, 412, + 413, 414, 415, 416, 417, 418, 419, 420, + 421, 422, 423, 424, 425, 426, 427, 429, + 430, 431, 432, 433, 434, 435, 436, 437, + 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 450, 451, 452, 453, 454, + 455, 456, 457, 458, 459, 461, 462, 463, + 464, 465, 466, 467, 468, 469, 470, 471, + 472, 473, 474, 475, 476, 477, 478, 479, + 480, 481, 482, 483, 484, 485, 486, 487, + 488, 489, 490, 491, 492, 493, 494, 495, + 496, 497, 498, 499, 500, 501, 502, 503, + 504, 505, 506, 507, 508, 509, 510, 511, + 512, 513, 514, 515, 516, 517, 519, 520, + 521, 522, 523, 524, 525, 526, 527, 528, + 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, + 545, 546, 547, 548, 549, 550, 551, 552, + 553, 554, 555, 556, 557, 558, 559, 561, + 562, 563, 564, 565, 566, 567, 568, 569, + 570, 571, 572, 573, 574, 575, 576, 577, + 578, 579, 580, 582, 583, 584, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 601, 602, 603, 604, 605, + 606, 607, 608, 609, 610, 611, 612, 613, + 614, 615, 616, 617, 618, 620, 621, 622, + 623, 624, 625, 626, 627, 628, 629, 631, + 632, 633, 634, 635, 636, 637, 640, 641, + 642, 643, 644, 645, 646, 647, 648, 650, + 651, 652, 653, 654, 655, 656, 658, 659, + 660, 661, 662, 663, 664, 665, 666, 667, + 668, 669, 670, 671, 672, 673, 674, 675, + 676, 677, 678, 679, 680, 681, 682, 683, + 684, 685, 686, 687, 688, 689, 690, 691, + 692, 693, 694, 695, 696, 697, 698, 699, + 700, 701, 702, 704, 705, 706, 707, 708, + 709, 710, 714, 715, 716, 717, 718, 719, + 720, 721, 722, 723, 724, 725, 726, 727, + 728, 729, 730, 731, 732, 733, 734, 735, + 736, 737, 738, 739, 740, 741, 742, 743, + 744, 745, 746, 747, 748, 749, 750, 752, + 753, 754, 755, 756, 757, 758, 759, 760, + 761, 762, 763, 764, 765, 766, 767, 768, + 769, 770, 771, 773, 774, 775, 776, 777, + 778, 779, 780, 781, 782, 783, 784, 785, + 786, 787, 788, 789, 790, 791, 792, 793, + 794, 795, 796, 797, 798, 799, 800, 801, + 802, 803, 805, 806, 807, 808, 809, 810, + 811, 812, 813, 814, 815, 816, 817, 820, + 822, 823, 824, 825, 826, 827, 828, 829, + 830, 833, 834, 835, 836, 837, 838, 839, + 840, 841, 842, 843, 844, 845, 846, 847, + 849, 850, 851, 853, 854, 855, 856, 857, + 858, 859, 860, 861, 862, 863, 864, 865, + 866, 867, 868, 869, 870, 871, 872, 873, + 874, 875, 876, 877, 880, 883, 885, 900, + 903, 906, 908, 922, 927, 932, 936, 940, + 943, 946, 950, 954, 957, 960, 964, 968, + 972, 975, 978, 982, 986, 990, 994, 997, + 1000, 1004, 1008, 1012, 1016, 1019, 1022, 1026, + 1030, 1034, 1038, 1041, 1044, 1048, 1052, 1056, + 1060, 1063, 1066, 1070, 1074, 1078, 1082, 1085, + 1088, 1093, 1097, 1101, 1105, 1108, 1111, 1115, + 1119, 1123, 1126, 1129, 1133, 1137, 1141, 1145, + 1148, 1151, 1155, 1159, 1163, 1167, 1170, 1173, + 1177, 1181, 1185, 1188, 1191, 1195, 1199, 1203, + 1207, 1211, 1214, 1217, 1222, 1227, 1231, 1235, + 1238, 1241, 1245, 1249, 1252, 1255, 1259, 1263, + 1267, 1270, 1273, 1277, 1281, 1285, 1289, 1292, + 1295, 1299, 1303, 1307, 1311, 1314, 1317, 1321, + 1325, 1329, 1333, 1336, 1339, 1343, 1347, 1351, + 1355, 1358, 1361, 1365, 1369, 1373, 1377, 1380, + 1383, 1388, 1392, 1396, 1400, 1403, 1406, 1410, + 1414, 1418, 1421, 1424, 1428, 1432, 1436, 1440, + 1443, 1446, 1450, 1454, 1458, 1462, 1465, 1468, + 1472, 1476, 1480, 1483, 1486, 1490, 1494, 1498, + 1502, 1506, 1509, 1512, 1515, 1518, 1520, 1522, + 1525, 1532, 1534, 1536, 1538, 1540, 1542, 1544, + 1546, 1548, 1550, 1577, 1579, 1586, 1593, 1607, + 1609, 1615, 1618, 1627, 1628, 1631, 1634, 1641, + 1643, 1645, 1647, 1650, 1695, 1697, 1699, 1703, + 1707, 1709, 1710, 1710, 1716, 1718, 1720, 1722, + 1724, 1727, 1728, 1729, 1736, 1742, 1748, 1750, + 1752, 1754, 1756, 1758, 1760, 1761, 1764, 1787, + 1790, 1795, 1804, 1806, 1807, 1809, 1814, 1817, + 1819, 1821, 1822, 1824, 1834, 1840, 1841, 1846, + 1850, 1858, 1860, 1869, 1873, 1874, 1875, 1879, + 1880, 1883, 1883, 1890, 1904, 1907, 1946, 1948, + 1950, 1952, 1954, 1955, 1955, 1956, 1957, 1964, + 1970, 1976, 1978, 1980, 1982, 1985, 1987, 1998, + 1999, 2001, 2003, 2005, 2016, 2017, 2019, 2021, + 2023, 2024, 0 + }; + + static const char _regex_trans_keys[] = { + 41u, 33u, 35u, 38u, 39u, 40u, 41u, 43u, + 45u, 58u, 60u, 61u, 62u, 63u, 67u, 80u, + 105u, 109u, 115u, 120u, 123u, 48u, 57u, 41u, + 95u, 48u, 57u, 65u, 90u, 97u, 122u, 39u, + 95u, 48u, 57u, 65u, 90u, 97u, 122u, 95u, + 48u, 57u, 65u, 90u, 97u, 122u, 39u, 95u, + 48u, 57u, 65u, 90u, 97u, 122u, 41u, 41u, + 95u, 48u, 57u, 65u, 90u, 97u, 122u, 41u, + 95u, 48u, 57u, 65u, 90u, 97u, 122u, 41u, + 95u, 48u, 57u, 65u, 90u, 97u, 122u, 95u, + 48u, 57u, 65u, 90u, 97u, 122u, 62u, 95u, + 48u, 57u, 65u, 90u, 97u, 122u, 33u, 60u, + 61u, 33u, 61u, 38u, 41u, 95u, 48u, 57u, + 65u, 90u, 97u, 122u, 95u, 48u, 57u, 65u, + 90u, 97u, 122u, 41u, 95u, 48u, 57u, 65u, + 90u, 97u, 122u, 41u, 95u, 48u, 57u, 65u, + 90u, 97u, 122u, 41u, 48u, 57u, 41u, 58u, + 105u, 109u, 115u, 120u, 62u, 95u, 48u, 57u, + 65u, 90u, 97u, 122u, 41u, 48u, 57u, 95u, + 48u, 57u, 65u, 90u, 97u, 122u, 95u, 48u, + 57u, 65u, 90u, 97u, 122u, 41u, 95u, 48u, + 57u, 65u, 90u, 97u, 122u, 95u, 48u, 57u, + 65u, 90u, 97u, 122u, 105u, 109u, 115u, 120u, + 41u, 45u, 58u, 105u, 109u, 115u, 120u, 46u, + 92u, 93u, 46u, 92u, 93u, 46u, 92u, 58u, + 92u, 93u, 58u, 92u, 93u, 58u, 92u, 61u, + 92u, 93u, 61u, 92u, 93u, 61u, 92u, 39u, + 48u, 57u, 62u, 45u, 95u, 48u, 57u, 65u, + 90u, 97u, 122u, 48u, 57u, 125u, 48u, 57u, + 125u, 48u, 57u, 125u, 95u, 125u, 48u, 57u, + 65u, 90u, 97u, 122u, 95u, 125u, 48u, 57u, + 65u, 90u, 97u, 122u, 95u, 125u, 48u, 57u, + 65u, 90u, 97u, 122u, 95u, 125u, 48u, 57u, + 65u, 90u, 97u, 122u, 95u, 48u, 57u, 65u, + 90u, 97u, 122u, 39u, 95u, 48u, 57u, 65u, + 90u, 97u, 122u, 95u, 48u, 57u, 65u, 90u, + 97u, 122u, 62u, 95u, 48u, 57u, 65u, 90u, + 97u, 122u, 95u, 48u, 57u, 65u, 90u, 97u, + 122u, 95u, 125u, 48u, 57u, 65u, 90u, 97u, + 122u, 48u, 55u, 125u, 48u, 55u, 125u, 48u, + 57u, 65u, 70u, 97u, 102u, 44u, 125u, 48u, + 57u, 125u, 48u, 57u, 125u, 48u, 57u, 128u, + 191u, 128u, 191u, 128u, 191u, 41u, 41u, 80u, + 41u, 41u, 70u, 41u, 56u, 41u, 121u, 97u, + 109u, 98u, 105u, 99u, 101u, 110u, 105u, 97u, + 110u, 101u, 115u, 116u, 97u, 110u, 108u, 109u, + 116u, 105u, 110u, 101u, 115u, 101u, 117u, 109u, + 97u, 107u, 110u, 103u, 97u, 108u, 105u, 112u, + 111u, 109u, 111u, 102u, 111u, 97u, 104u, 105u, + 109u, 105u, 108u, 108u, 101u, 103u, 104u, 105u, + 110u, 101u, 115u, 101u, 105u, 100u, 110u, 114u, + 97u, 100u, 105u, 97u, 110u, 95u, 65u, 98u, + 111u, 114u, 105u, 103u, 105u, 110u, 97u, 108u, + 105u, 97u, 110u, 97u, 101u, 109u, 114u, 111u, + 107u, 101u, 101u, 109u, 111u, 110u, 116u, 105u, + 99u, 110u, 101u, 105u, 102u, 111u, 114u, 109u, + 112u, 114u, 114u, 105u, 111u, 116u, 105u, 108u, + 108u, 105u, 99u, 115u, 118u, 101u, 114u, 101u, + 116u, 97u, 110u, 97u, 103u, 97u, 114u, 105u, + 121u, 112u, 116u, 105u, 97u, 110u, 95u, 72u, + 105u, 101u, 114u, 111u, 103u, 108u, 121u, 112u, + 104u, 115u, 104u, 105u, 111u, 112u, 105u, 99u, + 111u, 114u, 103u, 105u, 97u, 110u, 97u, 103u, + 111u, 108u, 105u, 116u, 105u, 99u, 116u, 104u, + 105u, 99u, 101u, 101u, 107u, 106u, 114u, 97u, + 114u, 97u, 116u, 105u, 109u, 117u, 107u, 104u, + 105u, 110u, 117u, 108u, 110u, 111u, 111u, 98u, + 114u, 101u, 119u, 114u, 97u, 103u, 97u, 110u, + 97u, 112u, 101u, 114u, 105u, 97u, 108u, 95u, + 65u, 114u, 97u, 109u, 97u, 105u, 99u, 104u, + 115u, 101u, 114u, 105u, 116u, 101u, 100u, 99u, + 114u, 105u, 112u, 116u, 105u, 111u, 110u, 97u, + 108u, 95u, 80u, 97u, 104u, 114u, 108u, 97u, + 118u, 105u, 116u, 104u, 105u, 97u, 110u, 118u, + 97u, 110u, 101u, 115u, 101u, 105u, 110u, 116u, + 121u, 116u, 104u, 105u, 110u, 97u, 100u, 97u, + 97u, 107u, 97u, 110u, 97u, 97u, 104u, 95u, + 76u, 105u, 97u, 109u, 114u, 111u, 115u, 104u, + 116u, 104u, 105u, 101u, 114u, 111u, 116u, 105u, + 110u, 112u, 99u, 104u, 97u, 109u, 110u, 115u, + 98u, 117u, 101u, 97u, 114u, 95u, 66u, 117u, + 99u, 100u, 105u, 97u, 110u, 105u, 97u, 110u, + 108u, 110u, 97u, 121u, 97u, 108u, 97u, 109u, + 100u, 97u, 105u, 99u, 116u, 101u, 105u, 95u, + 77u, 97u, 121u, 101u, 107u, 110u, 103u, 111u, + 108u, 105u, 97u, 110u, 97u, 110u, 109u, 97u, + 114u, 119u, 95u, 84u, 97u, 105u, 95u, 76u, + 117u, 101u, 111u, 104u, 97u, 109u, 95u, 100u, + 67u, 104u, 105u, 107u, 105u, 95u, 73u, 80u, + 83u, 84u, 116u, 97u, 108u, 105u, 99u, 101u, + 114u, 115u, 105u, 97u, 110u, 111u, 117u, 116u, + 104u, 95u, 65u, 114u, 97u, 98u, 105u, 97u, + 110u, 117u, 114u, 107u, 105u, 99u, 105u, 121u, + 97u, 109u, 97u, 110u, 121u, 97u, 97u, 111u, + 103u, 115u, 95u, 80u, 97u, 101u, 110u, 105u, + 99u, 105u, 97u, 110u, 106u, 97u, 110u, 103u, + 110u, 105u, 99u, 109u, 117u, 97u, 114u, 105u, + 116u, 97u, 110u, 114u, 97u, 115u, 104u, 116u, + 114u, 97u, 97u, 118u, 105u, 97u, 110u, 110u, + 104u, 97u, 108u, 97u, 110u, 100u, 97u, 110u, + 101u, 115u, 101u, 108u, 114u, 111u, 116u, 105u, + 95u, 78u, 97u, 103u, 114u, 105u, 105u, 97u, + 99u, 103u, 105u, 109u, 97u, 98u, 108u, 111u, + 103u, 97u, 110u, 119u, 97u, 95u, 76u, 84u, + 86u, 101u, 104u, 97u, 109u, 105u, 101u, 116u, + 105u, 108u, 108u, 117u, 103u, 117u, 97u, 97u, + 105u, 110u, 97u, 98u, 102u, 101u, 116u, 97u, + 110u, 105u, 110u, 97u, 103u, 104u, 97u, 114u, + 105u, 116u, 105u, 99u, 105u, 110u, 115u, 112u, + 100u, 123u, 94u, 125u, 94u, 46u, 92u, 93u, + 46u, 92u, 93u, 46u, 92u, 58u, 92u, 93u, + 94u, 97u, 98u, 99u, 100u, 103u, 108u, 112u, + 115u, 117u, 119u, 120u, 58u, 92u, 93u, 58u, + 92u, 93u, 58u, 92u, 58u, 92u, 93u, 97u, + 98u, 99u, 100u, 103u, 108u, 112u, 115u, 117u, + 119u, 120u, 58u, 92u, 93u, 108u, 115u, 58u, + 92u, 93u, 110u, 112u, 58u, 92u, 93u, 117u, + 58u, 92u, 93u, 109u, 58u, 92u, 93u, 58u, + 92u, 93u, 58u, 92u, 93u, 104u, 58u, 92u, + 93u, 97u, 58u, 92u, 93u, 58u, 92u, 93u, + 58u, 92u, 93u, 99u, 58u, 92u, 93u, 105u, + 58u, 92u, 93u, 105u, 58u, 92u, 93u, 58u, + 92u, 93u, 58u, 92u, 93u, 108u, 58u, 92u, + 93u, 97u, 58u, 92u, 93u, 110u, 58u, 92u, + 93u, 107u, 58u, 92u, 93u, 58u, 92u, 93u, + 58u, 92u, 93u, 110u, 58u, 92u, 93u, 116u, + 58u, 92u, 93u, 114u, 58u, 92u, 93u, 108u, + 58u, 92u, 93u, 58u, 92u, 93u, 58u, 92u, + 93u, 105u, 58u, 92u, 93u, 103u, 58u, 92u, + 93u, 105u, 58u, 92u, 93u, 116u, 58u, 92u, + 93u, 58u, 92u, 93u, 58u, 92u, 93u, 114u, + 58u, 92u, 93u, 97u, 58u, 92u, 93u, 112u, + 58u, 92u, 93u, 104u, 58u, 92u, 93u, 58u, + 92u, 93u, 58u, 92u, 93u, 111u, 58u, 92u, + 93u, 119u, 58u, 92u, 93u, 101u, 58u, 92u, + 93u, 114u, 58u, 92u, 93u, 58u, 92u, 93u, + 58u, 92u, 93u, 114u, 117u, 58u, 92u, 93u, + 105u, 58u, 92u, 93u, 110u, 58u, 92u, 93u, + 116u, 58u, 92u, 93u, 58u, 92u, 93u, 58u, + 92u, 93u, 110u, 58u, 92u, 93u, 99u, 58u, + 92u, 93u, 116u, 58u, 92u, 93u, 58u, 92u, + 93u, 58u, 92u, 93u, 112u, 58u, 92u, 93u, + 97u, 58u, 92u, 93u, 99u, 58u, 92u, 93u, + 101u, 58u, 92u, 93u, 58u, 92u, 93u, 58u, + 92u, 93u, 112u, 58u, 92u, 93u, 112u, 58u, + 92u, 93u, 101u, 58u, 92u, 93u, 114u, 58u, + 92u, 93u, 58u, 92u, 93u, 58u, 92u, 93u, + 111u, 58u, 92u, 93u, 114u, 58u, 92u, 93u, + 100u, 58u, 92u, 93u, 58u, 92u, 93u, 58u, + 92u, 93u, 100u, 58u, 92u, 93u, 105u, 58u, + 92u, 93u, 103u, 58u, 92u, 93u, 105u, 58u, + 92u, 93u, 116u, 58u, 92u, 93u, 58u, 92u, + 93u, 58u, 92u, 93u, 108u, 115u, 58u, 92u, + 93u, 110u, 112u, 58u, 92u, 93u, 117u, 58u, + 92u, 93u, 109u, 58u, 92u, 93u, 58u, 92u, + 93u, 58u, 92u, 93u, 104u, 58u, 92u, 93u, + 97u, 58u, 92u, 93u, 58u, 92u, 93u, 58u, + 92u, 93u, 99u, 58u, 92u, 93u, 105u, 58u, + 92u, 93u, 105u, 58u, 92u, 93u, 58u, 92u, + 93u, 58u, 92u, 93u, 108u, 58u, 92u, 93u, + 97u, 58u, 92u, 93u, 110u, 58u, 92u, 93u, + 107u, 58u, 92u, 93u, 58u, 92u, 93u, 58u, + 92u, 93u, 110u, 58u, 92u, 93u, 116u, 58u, + 92u, 93u, 114u, 58u, 92u, 93u, 108u, 58u, + 92u, 93u, 58u, 92u, 93u, 58u, 92u, 93u, + 105u, 58u, 92u, 93u, 103u, 58u, 92u, 93u, + 105u, 58u, 92u, 93u, 116u, 58u, 92u, 93u, + 58u, 92u, 93u, 58u, 92u, 93u, 114u, 58u, + 92u, 93u, 97u, 58u, 92u, 93u, 112u, 58u, + 92u, 93u, 104u, 58u, 92u, 93u, 58u, 92u, + 93u, 58u, 92u, 93u, 111u, 58u, 92u, 93u, + 119u, 58u, 92u, 93u, 101u, 58u, 92u, 93u, + 114u, 58u, 92u, 93u, 58u, 92u, 93u, 58u, + 92u, 93u, 114u, 117u, 58u, 92u, 93u, 105u, + 58u, 92u, 93u, 110u, 58u, 92u, 93u, 116u, + 58u, 92u, 93u, 58u, 92u, 93u, 58u, 92u, + 93u, 110u, 58u, 92u, 93u, 99u, 58u, 92u, + 93u, 116u, 58u, 92u, 93u, 58u, 92u, 93u, + 58u, 92u, 93u, 112u, 58u, 92u, 93u, 97u, + 58u, 92u, 93u, 99u, 58u, 92u, 93u, 101u, + 58u, 92u, 93u, 58u, 92u, 93u, 58u, 92u, + 93u, 112u, 58u, 92u, 93u, 112u, 58u, 92u, + 93u, 101u, 58u, 92u, 93u, 114u, 58u, 92u, + 93u, 58u, 92u, 93u, 58u, 92u, 93u, 111u, + 58u, 92u, 93u, 114u, 58u, 92u, 93u, 100u, + 58u, 92u, 93u, 58u, 92u, 93u, 58u, 92u, + 93u, 100u, 58u, 92u, 93u, 105u, 58u, 92u, + 93u, 103u, 58u, 92u, 93u, 105u, 58u, 92u, + 93u, 116u, 58u, 92u, 93u, 58u, 92u, 93u, + 61u, 92u, 93u, 61u, 92u, 93u, 61u, 92u, + 48u, 55u, 125u, 48u, 55u, 125u, 48u, 57u, + 65u, 70u, 97u, 102u, 128u, 191u, 128u, 191u, + 128u, 191u, 128u, 191u, 128u, 191u, 128u, 191u, + 128u, 191u, 128u, 191u, 128u, 191u, 0u, 32u, + 35u, 36u, 40u, 41u, 42u, 43u, 46u, 63u, + 91u, 92u, 94u, 123u, 124u, 9u, 13u, 128u, + 191u, 192u, 223u, 224u, 239u, 240u, 247u, 248u, + 255u, 42u, 63u, 95u, 48u, 57u, 65u, 90u, + 97u, 122u, 95u, 48u, 57u, 65u, 90u, 97u, + 122u, 39u, 48u, 60u, 63u, 82u, 95u, 49u, + 55u, 56u, 57u, 65u, 90u, 97u, 122u, 48u, + 57u, 105u, 109u, 115u, 120u, 48u, 57u, 41u, + 48u, 57u, 33u, 61u, 95u, 48u, 57u, 65u, + 90u, 97u, 122u, 123u, 41u, 48u, 57u, 60u, + 61u, 62u, 41u, 45u, 58u, 105u, 109u, 115u, + 120u, 43u, 63u, 43u, 63u, 43u, 63u, 46u, + 58u, 61u, 48u, 65u, 66u, 67u, 68u, 69u, + 71u, 72u, 75u, 76u, 78u, 80u, 81u, 82u, + 83u, 85u, 86u, 87u, 88u, 90u, 97u, 98u, + 99u, 100u, 101u, 102u, 103u, 104u, 107u, 108u, + 110u, 111u, 112u, 114u, 115u, 116u, 117u, 118u, + 119u, 120u, 122u, 49u, 55u, 56u, 57u, 48u, + 55u, 48u, 55u, 48u, 55u, 56u, 57u, 48u, + 55u, 56u, 57u, 48u, 57u, 123u, 39u, 45u, + 60u, 123u, 48u, 57u, 48u, 57u, 48u, 57u, + 48u, 57u, 48u, 57u, 39u, 60u, 123u, 123u, + 123u, 123u, 48u, 57u, 65u, 70u, 97u, 102u, + 48u, 57u, 65u, 70u, 97u, 102u, 48u, 57u, + 65u, 70u, 97u, 102u, 48u, 57u, 43u, 63u, + 128u, 191u, 128u, 191u, 128u, 191u, 41u, 85u, + 41u, 41u, 67u, 84u, 65u, 66u, 67u, 68u, + 69u, 71u, 72u, 73u, 74u, 75u, 76u, 77u, + 78u, 79u, 80u, 82u, 83u, 84u, 85u, 86u, + 88u, 89u, 90u, 110u, 114u, 118u, 97u, 101u, + 111u, 114u, 117u, 97u, 99u, 102u, 104u, 110u, + 111u, 115u, 117u, 121u, 109u, 112u, 101u, 103u, + 116u, 101u, 108u, 111u, 114u, 117u, 97u, 101u, + 105u, 103u, 117u, 109u, 110u, 97u, 97u, 104u, + 38u, 97u, 101u, 105u, 108u, 109u, 111u, 116u, + 117u, 121u, 97u, 99u, 101u, 110u, 111u, 121u, + 101u, 100u, 101u, 107u, 108u, 111u, 103u, 108u, + 114u, 115u, 99u, 100u, 101u, 102u, 104u, 105u, + 111u, 115u, 101u, 117u, 97u, 99u, 104u, 105u, + 107u, 109u, 111u, 117u, 121u, 97u, 101u, 104u, + 105u, 103u, 97u, 97u, 112u, 115u, 119u, 105u, + 108u, 112u, 115u, 67u, 76u, 77u, 78u, 80u, + 83u, 90u, 45u, 91u, 92u, 93u, 128u, 191u, + 192u, 223u, 224u, 239u, 240u, 247u, 248u, 255u, + 46u, 58u, 61u, 48u, 68u, 69u, 72u, 76u, + 78u, 80u, 81u, 83u, 85u, 86u, 87u, 97u, + 98u, 99u, 100u, 101u, 102u, 103u, 104u, 108u, + 110u, 111u, 112u, 114u, 115u, 116u, 117u, 118u, + 119u, 120u, 49u, 55u, 56u, 57u, 65u, 90u, + 105u, 122u, 48u, 55u, 48u, 55u, 48u, 55u, + 48u, 55u, 123u, 123u, 123u, 123u, 48u, 57u, + 65u, 70u, 97u, 102u, 48u, 57u, 65u, 70u, + 97u, 102u, 48u, 57u, 65u, 70u, 97u, 102u, + 128u, 191u, 128u, 191u, 128u, 191u, 92u, 93u, + 94u, 69u, 81u, 92u, 128u, 191u, 192u, 223u, + 224u, 239u, 240u, 247u, 248u, 255u, 69u, 128u, + 191u, 128u, 191u, 128u, 191u, 92u, 128u, 191u, + 192u, 223u, 224u, 239u, 240u, 247u, 248u, 255u, + 69u, 128u, 191u, 128u, 191u, 128u, 191u, 41u, + 10u, 0u + }; + +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 1, 1, + 0, 0, 0, 3, 3, 3, 1, 0, + 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 0, 4, 1, 1, + 1, 1, 0, 0, 0, 0, 3, 3, + 3, 1, 1, 1, 0, 0, 5, 0, + 1, 1, 1, 5, 0, 1, 1, 1, + 0, 0, 0 + }; + + static const short _regex_index_offsets[] = { + 0, 0, 2, 24, 30, 36, 41, 47, + 49, 55, 61, 67, 72, 78, 82, 85, + 92, 97, 103, 109, 112, 119, 125, 128, + 133, 138, 144, 149, 154, 162, 166, 170, + 173, 177, 181, 184, 188, 192, 195, 197, + 199, 201, 207, 209, 212, 215, 217, 223, + 229, 235, 241, 246, 252, 257, 263, 268, + 274, 276, 279, 284, 288, 291, 294, 296, + 298, 300, 302, 305, 307, 310, 313, 315, + 317, 320, 322, 324, 326, 328, 330, 332, + 334, 336, 338, 340, 342, 344, 346, 350, + 352, 354, 356, 358, 360, 362, 364, 366, + 368, 370, 372, 374, 376, 378, 380, 382, + 384, 386, 388, 390, 392, 395, 397, 399, + 401, 403, 405, 408, 410, 412, 414, 416, + 418, 420, 422, 425, 427, 429, 431, 433, + 435, 437, 439, 441, 443, 445, 447, 449, + 451, 453, 455, 457, 459, 461, 463, 466, + 468, 470, 472, 474, 476, 478, 480, 482, + 484, 486, 488, 490, 492, 494, 496, 498, + 500, 502, 504, 507, 509, 511, 513, 515, + 517, 519, 521, 523, 525, 528, 530, 532, + 534, 536, 538, 540, 542, 544, 546, 548, + 550, 552, 554, 556, 558, 560, 562, 564, + 566, 568, 570, 572, 574, 576, 578, 580, + 582, 584, 586, 588, 590, 592, 594, 596, + 598, 600, 602, 604, 606, 608, 610, 612, + 614, 616, 618, 620, 622, 624, 626, 628, + 630, 632, 634, 636, 638, 640, 643, 645, + 647, 649, 651, 653, 655, 657, 659, 661, + 663, 665, 667, 669, 671, 673, 675, 677, + 679, 681, 683, 685, 687, 689, 691, 693, + 695, 697, 699, 701, 703, 705, 707, 709, + 711, 713, 715, 717, 719, 721, 723, 726, + 728, 730, 732, 734, 736, 738, 740, 742, + 744, 746, 748, 750, 752, 754, 756, 758, + 760, 762, 764, 767, 769, 771, 773, 775, + 777, 779, 781, 783, 785, 787, 789, 791, + 793, 795, 797, 802, 804, 806, 808, 810, + 812, 814, 816, 818, 820, 822, 824, 826, + 828, 830, 832, 834, 836, 839, 841, 843, + 845, 847, 849, 851, 853, 855, 857, 860, + 862, 864, 866, 868, 870, 872, 876, 878, + 880, 882, 884, 886, 888, 890, 892, 895, + 897, 899, 901, 903, 905, 907, 910, 912, + 914, 916, 918, 920, 922, 924, 926, 928, + 930, 932, 934, 936, 938, 940, 942, 944, + 946, 948, 950, 952, 954, 956, 958, 960, + 962, 964, 966, 968, 970, 972, 974, 976, + 978, 980, 982, 984, 986, 988, 990, 992, + 994, 996, 998, 1001, 1003, 1005, 1007, 1009, + 1011, 1013, 1018, 1020, 1022, 1024, 1026, 1028, + 1030, 1032, 1034, 1036, 1038, 1040, 1042, 1044, + 1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, + 1062, 1064, 1066, 1068, 1070, 1072, 1074, 1076, + 1078, 1080, 1082, 1084, 1086, 1088, 1090, 1093, + 1095, 1097, 1099, 1101, 1103, 1105, 1107, 1109, + 1111, 1113, 1115, 1117, 1119, 1121, 1123, 1125, + 1127, 1129, 1131, 1134, 1136, 1138, 1140, 1142, + 1144, 1146, 1148, 1150, 1152, 1154, 1156, 1158, + 1160, 1162, 1164, 1166, 1168, 1170, 1172, 1174, + 1176, 1178, 1180, 1182, 1184, 1186, 1188, 1190, + 1192, 1194, 1197, 1199, 1201, 1203, 1205, 1207, + 1209, 1211, 1213, 1215, 1217, 1219, 1221, 1225, + 1228, 1230, 1232, 1234, 1236, 1238, 1240, 1242, + 1244, 1248, 1250, 1252, 1254, 1256, 1258, 1260, + 1262, 1264, 1266, 1268, 1270, 1272, 1274, 1276, + 1279, 1281, 1283, 1286, 1288, 1290, 1292, 1294, + 1296, 1298, 1300, 1302, 1304, 1306, 1308, 1310, + 1312, 1314, 1316, 1318, 1320, 1322, 1324, 1326, + 1328, 1330, 1332, 1334, 1338, 1342, 1345, 1361, + 1365, 1369, 1372, 1387, 1393, 1399, 1404, 1409, + 1413, 1417, 1422, 1427, 1431, 1435, 1440, 1445, + 1450, 1454, 1458, 1463, 1468, 1473, 1478, 1482, + 1486, 1491, 1496, 1501, 1506, 1510, 1514, 1519, + 1524, 1529, 1534, 1538, 1542, 1547, 1552, 1557, + 1562, 1566, 1570, 1575, 1580, 1585, 1590, 1594, + 1598, 1604, 1609, 1614, 1619, 1623, 1627, 1632, + 1637, 1642, 1646, 1650, 1655, 1660, 1665, 1670, + 1674, 1678, 1683, 1688, 1693, 1698, 1702, 1706, + 1711, 1716, 1721, 1725, 1729, 1734, 1739, 1744, + 1749, 1754, 1758, 1762, 1768, 1774, 1779, 1784, + 1788, 1792, 1797, 1802, 1806, 1810, 1815, 1820, + 1825, 1829, 1833, 1838, 1843, 1848, 1853, 1857, + 1861, 1866, 1871, 1876, 1881, 1885, 1889, 1894, + 1899, 1904, 1909, 1913, 1917, 1922, 1927, 1932, + 1937, 1941, 1945, 1950, 1955, 1960, 1965, 1969, + 1973, 1979, 1984, 1989, 1994, 1998, 2002, 2007, + 2012, 2017, 2021, 2025, 2030, 2035, 2040, 2045, + 2049, 2053, 2058, 2063, 2068, 2073, 2077, 2081, + 2086, 2091, 2096, 2100, 2104, 2109, 2114, 2119, + 2124, 2129, 2133, 2137, 2141, 2145, 2148, 2150, + 2153, 2158, 2160, 2162, 2164, 2166, 2168, 2170, + 2172, 2174, 2176, 2198, 2201, 2206, 2211, 2222, + 2224, 2230, 2233, 2240, 2242, 2245, 2249, 2257, + 2260, 2263, 2266, 2270, 2314, 2316, 2318, 2321, + 2324, 2326, 2328, 2329, 2335, 2337, 2339, 2341, + 2343, 2347, 2349, 2351, 2356, 2360, 2364, 2366, + 2369, 2371, 2373, 2375, 2378, 2380, 2384, 2408, + 2412, 2418, 2428, 2431, 2433, 2436, 2442, 2446, + 2449, 2452, 2454, 2457, 2468, 2475, 2477, 2483, + 2488, 2497, 2500, 2510, 2515, 2517, 2519, 2524, + 2526, 2530, 2531, 2539, 2549, 2553, 2589, 2591, + 2593, 2595, 2597, 2599, 2600, 2602, 2604, 2609, + 2613, 2617, 2619, 2621, 2623, 2627, 2630, 2637, + 2639, 2641, 2643, 2645, 2652, 2654, 2656, 2658, + 2660, 2662, 0 + }; + + static const signed char _regex_trans_cond_spaces[] = { + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -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, + 0, -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, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -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, + 0, -1, 0, -1, 0, -1, 0, -1, + 0, -1, 0, -1, 0, -1, 0, -1, + -1, -1, 1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 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, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -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, 0, -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, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -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, 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, -1, -1, -1, -1, -1, + -1, 0, -1, 0, -1, 0, -1, -1, + 2, 2, -1, -1, -1, -1, -1, 0, + 0, 0, 0, 0, -1, -1, -1, 0, + -1, 0, -1, 0, -1, -1, 0, 0, + 0, 0, 0, -1, -1, -1, 0, -1, + 0, -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, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -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 + }; + + static const short _regex_trans_offsets[] = { + 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, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 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, + 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 296, + 297, 299, 300, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, + 323, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, + 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, + 363, 364, 365, 366, 367, 368, 369, 370, + 371, 372, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 384, 385, 386, + 387, 388, 389, 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 406, 407, 408, 409, 410, + 411, 412, 413, 414, 415, 416, 417, 418, + 419, 420, 421, 422, 423, 424, 425, 426, + 427, 428, 429, 430, 431, 432, 433, 434, + 435, 436, 437, 438, 439, 440, 441, 442, + 443, 444, 445, 446, 447, 448, 449, 450, + 451, 452, 453, 454, 455, 456, 457, 458, + 459, 460, 461, 462, 463, 464, 465, 466, + 467, 468, 469, 470, 471, 472, 473, 474, + 475, 476, 477, 478, 479, 480, 481, 482, + 483, 484, 485, 486, 487, 488, 489, 490, + 491, 492, 493, 494, 495, 496, 497, 498, + 499, 500, 501, 502, 503, 504, 505, 506, + 507, 508, 509, 510, 511, 512, 513, 514, + 515, 516, 517, 518, 519, 520, 521, 522, + 523, 524, 525, 526, 527, 528, 529, 530, + 531, 532, 533, 534, 535, 536, 537, 538, + 539, 540, 541, 542, 543, 544, 545, 546, + 547, 548, 549, 550, 551, 552, 553, 554, + 555, 556, 557, 558, 559, 560, 561, 562, + 563, 564, 565, 566, 567, 568, 569, 570, + 571, 572, 573, 574, 575, 576, 577, 578, + 579, 580, 581, 582, 583, 584, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, + 603, 604, 605, 606, 607, 608, 609, 610, + 611, 612, 613, 614, 615, 616, 617, 618, + 619, 620, 621, 622, 623, 624, 625, 626, + 627, 628, 629, 630, 631, 632, 633, 634, + 635, 636, 637, 638, 639, 640, 641, 642, + 643, 644, 645, 646, 647, 648, 649, 650, + 651, 652, 653, 654, 655, 656, 657, 658, + 659, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 670, 671, 672, 673, 674, + 675, 676, 677, 678, 679, 680, 681, 682, + 683, 684, 685, 686, 687, 688, 689, 690, + 691, 692, 693, 694, 695, 696, 697, 698, + 699, 700, 701, 702, 703, 704, 705, 706, + 707, 708, 709, 710, 711, 712, 713, 714, + 715, 716, 717, 718, 719, 720, 721, 722, + 723, 724, 725, 726, 727, 728, 729, 730, + 731, 732, 733, 734, 735, 736, 737, 738, + 739, 740, 741, 742, 743, 744, 745, 746, + 747, 748, 749, 750, 751, 752, 753, 754, + 755, 756, 757, 758, 759, 760, 761, 762, + 763, 764, 765, 766, 767, 768, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 778, + 779, 780, 781, 782, 783, 784, 785, 786, + 787, 788, 789, 790, 791, 792, 793, 794, + 795, 796, 797, 798, 799, 800, 801, 802, + 803, 804, 805, 806, 807, 808, 809, 810, + 811, 812, 813, 814, 815, 816, 817, 818, + 819, 820, 821, 822, 823, 824, 825, 826, + 827, 828, 829, 830, 831, 832, 833, 834, + 835, 836, 837, 838, 839, 840, 841, 842, + 843, 844, 845, 846, 847, 848, 849, 850, + 851, 852, 853, 854, 855, 856, 857, 858, + 859, 860, 861, 862, 863, 864, 865, 866, + 867, 868, 869, 870, 871, 872, 873, 874, + 875, 876, 877, 878, 879, 880, 881, 882, + 883, 884, 885, 886, 887, 888, 889, 890, + 891, 892, 893, 894, 895, 896, 897, 898, + 899, 900, 901, 902, 903, 904, 905, 906, + 907, 908, 909, 910, 911, 912, 913, 914, + 915, 916, 917, 918, 919, 920, 921, 922, + 923, 924, 925, 926, 927, 928, 929, 930, + 931, 932, 933, 934, 935, 936, 937, 938, + 939, 940, 941, 942, 943, 944, 945, 946, + 947, 948, 949, 950, 951, 952, 953, 954, + 955, 956, 957, 958, 959, 960, 961, 962, + 963, 964, 965, 966, 967, 968, 969, 970, + 971, 972, 973, 974, 975, 976, 977, 978, + 979, 980, 981, 982, 983, 984, 985, 986, + 987, 988, 989, 990, 991, 992, 993, 994, + 995, 996, 997, 998, 999, 1000, 1001, 1002, + 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, + 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, + 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, + 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, + 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, + 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, + 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, + 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, + 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, + 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, + 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, + 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, + 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, + 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, + 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, + 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, + 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, + 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, + 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, + 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1162, + 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, + 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, + 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, + 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, + 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, + 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, + 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, + 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, + 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, + 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, + 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, + 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, + 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, + 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, + 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, + 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, + 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, + 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, + 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, + 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, + 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, + 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, + 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, + 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, + 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, + 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, + 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, + 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, + 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, + 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, + 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, + 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, + 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, + 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, + 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, + 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, + 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, + 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, + 1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, + 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, + 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, + 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, + 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, + 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, + 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, + 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, + 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, + 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1546, + 1547, 1548, 1549, 1550, 1551, 1552, 1553, 1554, + 1555, 1556, 1557, 1558, 1559, 1560, 1561, 1562, + 1563, 1564, 1565, 1566, 1567, 1568, 1569, 1570, + 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, + 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1586, + 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, + 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1602, + 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, + 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, + 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, + 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, + 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642, + 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, + 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, + 1659, 1660, 1661, 1662, 1663, 1664, 1665, 1666, + 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, + 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, + 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690, + 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, + 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706, + 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, + 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, + 1723, 1724, 1725, 1726, 1727, 1728, 1729, 1730, + 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, + 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, + 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, + 1755, 1756, 1757, 1758, 1759, 1760, 1761, 1762, + 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, + 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, + 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, + 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, + 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, + 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, + 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, + 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1826, + 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, + 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, + 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, + 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, + 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, + 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, + 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, + 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, + 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, + 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, + 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, + 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, + 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, + 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, + 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, + 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, + 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, + 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, + 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, + 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, + 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, + 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, + 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, + 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, + 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, + 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, + 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, + 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, + 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, + 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, + 2075, 2076, 2077, 2078, 2079, 2080, 2081, 2082, + 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, + 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, + 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, + 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114, + 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, + 2123, 2124, 2125, 2126, 2127, 2128, 2129, 2130, + 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, + 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2146, + 2147, 2148, 2149, 2150, 2151, 2152, 2153, 2154, + 2155, 2156, 2157, 2158, 2159, 2160, 2161, 2163, + 2164, 2166, 2167, 2169, 2170, 2172, 2173, 2175, + 2176, 2178, 2179, 2181, 2182, 2184, 2185, 2187, + 2188, 2189, 2190, 2192, 2193, 2194, 2195, 2196, + 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, + 2205, 2207, 2209, 2211, 2213, 2215, 2216, 2217, + 2218, 2219, 2220, 2221, 2222, 2223, 2224, 2225, + 2226, 2227, 2228, 2229, 2230, 2231, 2232, 2233, + 2234, 2235, 2236, 2237, 2238, 2239, 2240, 2241, + 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, + 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, + 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, + 2266, 2267, 2268, 2269, 2270, 2271, 2272, 2273, + 2274, 2275, 2276, 2277, 2278, 2279, 2280, 2281, + 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, + 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, + 2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305, + 2306, 2307, 2308, 2309, 2310, 2311, 2312, 2313, + 2314, 2315, 2316, 2317, 2318, 2319, 2320, 2321, + 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, + 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, + 2338, 2339, 2340, 2341, 2342, 2343, 2344, 2345, + 2346, 2347, 2348, 2349, 2350, 2351, 2352, 2353, + 2354, 2355, 2356, 2357, 2358, 2359, 2360, 2361, + 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, + 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, + 2378, 2379, 2380, 2381, 2382, 2383, 2384, 2385, + 2386, 2387, 2389, 2390, 2392, 2393, 2395, 2396, + 2397, 2398, 2399, 2400, 2401, 2402, 2403, 2404, + 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412, + 2413, 2414, 2415, 2416, 2417, 2418, 2419, 2420, + 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, + 2429, 2430, 2431, 2432, 2433, 2434, 2435, 2436, + 2437, 2438, 2439, 2440, 2441, 2442, 2443, 2444, + 2445, 2446, 2447, 2448, 2449, 2450, 2451, 2452, + 2453, 2454, 2455, 2456, 2457, 2458, 2459, 2460, + 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, + 2469, 2470, 2471, 2472, 2473, 2474, 2475, 2476, + 2477, 2478, 2479, 2480, 2481, 2482, 2483, 2484, + 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2492, + 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, + 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, + 2509, 2510, 2511, 2512, 2513, 2514, 2515, 2516, + 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, + 2525, 2526, 2527, 2528, 2529, 2530, 2531, 2532, + 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, + 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548, + 2549, 2550, 2551, 2552, 2553, 2554, 2555, 2556, + 2557, 2558, 2559, 2560, 2561, 2562, 2563, 2564, + 2566, 2568, 2570, 2572, 2574, 2575, 2576, 2577, + 2578, 2579, 2580, 2581, 2582, 2583, 2584, 2585, + 2586, 2587, 2588, 2589, 2590, 2591, 2592, 2593, + 2594, 2595, 2596, 2597, 2598, 2599, 2600, 2601, + 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, + 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617, + 2618, 2619, 2620, 2621, 2622, 2623, 2624, 2625, + 2626, 2627, 2628, 2629, 2630, 2631, 2632, 2633, + 2634, 2635, 2636, 2637, 2638, 2639, 2640, 2641, + 2642, 2643, 2645, 2646, 2648, 2649, 2651, 2652, + 2653, 2655, 2657, 2658, 2659, 2660, 2661, 2662, + 2664, 2666, 2668, 2670, 2672, 2673, 2674, 2675, + 2677, 2678, 2680, 2681, 2683, 2684, 2685, 2687, + 2689, 2691, 2693, 2695, 2696, 2697, 2698, 2700, + 2701, 2703, 2704, 2706, 2707, 2708, 2709, 2710, + 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, + 2719, 2720, 2721, 2722, 2723, 2724, 2725, 2726, + 2727, 2728, 2729, 2730, 2731, 2732, 2733, 2734, + 2735, 2736, 2737, 2738, 2739, 2740, 2741, 2742, + 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, + 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758, + 2759, 2760, 2761, 2762, 2763, 2764, 2765, 2766, + 2767, 2768, 2769, 2770, 2771, 2772, 2773, 2774, + 2775, 2776, 2777, 2778, 2779, 2780, 2781, 2782, + 2783, 2784, 2785, 2786, 2787, 2788, 2789, 2790, + 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, + 2799, 2800, 2801, 2802, 2803, 2804, 2805, 2806, + 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, + 2815, 2816, 2817, 2818, 2819, 2820, 2821, 2822, + 2823, 2824, 2825, 2826, 2827, 2828, 2829, 2830, + 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, + 2839, 2840, 2841, 2842, 2843, 2844, 2845, 2846, + 2847, 2848, 2849, 2850, 2851, 2852, 2853, 2854, + 2855, 2856, 2857, 2858, 2859, 2860, 2861, 2862, + 2863, 2864, 2865, 2866, 2867, 2868, 2869, 2870, + 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, + 2879, 2880, 2881, 2882, 2883, 2884, 2885, 2886, + 2887, 2888, 2889, 2890, 2891, 2892, 2893, 2894, + 2895, 2896, 2897, 2898, 2899, 2900, 2901, 2902, + 2903, 2904, 2905, 2906, 2907, 2908, 2909, 2910, + 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, + 2919, 2920, 2921, 2922, 2923, 2924, 2925, 2926, + 2927, 2928, 2929, 2930, 2931, 2932, 2933, 2934, + 2935, 2936, 2937, 2938, 2939, 2940, 2941, 2942, + 2943, 2944, 2945, 2946, 2947, 2948, 2949, 2950, + 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, + 2959, 2960, 2961, 2962, 2963, 2964, 2965, 2966, + 2967, 2968, 2969, 2970, 2971, 2972, 2973, 2974, + 2975, 2976, 2977, 2978, 2979, 2980, 2981, 2982, + 2983, 2984, 2985, 2986, 2987, 2988, 2989, 2990, + 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, + 2999, 3000, 3001, 3002, 3003, 3004, 3005, 3006, + 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, + 3015, 3016, 3017, 3018, 3019, 3020, 3021, 3022, + 3023, 3024, 3025, 3026, 3027, 3028, 3029, 3030, + 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, + 3039, 3040, 3041, 3042, 3043, 3044, 3045, 3046, + 3047, 3048, 3049, 3050, 3051, 3052, 3053, 3054, + 3055, 3056, 3057, 3058, 3059, 3060, 3061, 3062, + 3063, 3064, 3065, 3066, 3067, 3068, 3069, 3070, + 3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, + 3079, 3080, 3081, 3082, 3083, 3084, 3085, 3086, + 3087, 3088, 3089, 3090, 3091, 3092, 3093, 3094, + 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, + 3103, 3104, 3105, 3106, 3107, 3108, 3109, 3110, + 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, + 3119, 3120, 3121, 3122, 3123, 3124, 3125, 3126, + 3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134, + 3135, 3136, 3137, 3138, 3139, 3140, 3141, 3142, + 3143, 3144, 3145, 3146, 3147, 3148, 3149, 3150, + 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, + 3159, 3160, 3161, 3162, 3163, 3164, 3165, 3166, + 3167, 3168, 3169, 3170, 3171, 3172, 3173, 3174, + 3175, 3176, 3177, 3178, 3179, 3180, 3181, 3182, + 3183, 3184, 3185, 3186, 3187, 3188, 3189, 3190, + 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198, + 3199, 3200, 3201, 3202, 3203, 3204, 3205, 3206, + 3207, 3208, 3209, 3210, 3211, 3212, 3213, 3214, + 3215, 3216, 3217, 3218, 3219, 3220, 3221, 3222, + 3223, 3224, 3225, 3226, 3227, 3228, 3229, 3230, + 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238, + 3239, 3240, 3241, 3242, 3243, 3244, 3245, 3246, + 3247, 3248, 3249, 3250, 3251, 3252, 3253, 3254, + 3255, 3256, 3257, 3258, 3259, 3260, 3261, 3262, + 3263, 3264, 3265, 3266, 3267, 3268, 3269, 3270, + 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, + 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, + 3287, 3288, 3289, 3290, 3291, 3292, 3293, 3294, + 3295, 3296, 3297, 3298, 3299, 3300, 3301, 3302, + 3303, 3304, 3305, 3306, 3307, 3308, 3309, 3310, + 3311, 3312, 3313, 3314, 3315, 3316, 3317, 3318, + 3319, 3320, 3321, 3322, 3323, 3324, 3325, 3326, + 3327, 3328, 3329, 3330, 3331, 3332, 3333, 3334, + 3335, 3336, 3337, 3338, 3339, 3340, 3341, 3342, + 3343, 3344, 3345, 3346, 3347, 3348, 3349, 3350, + 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3358, + 3359, 3360, 3361, 3362, 3363, 3364, 3365, 3366, + 3367, 3368, 3369, 3370, 3371, 3372, 3373, 3374, + 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, + 3383, 3384, 3385, 3386, 3387, 3388, 3389, 3390, + 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, + 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406, + 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, + 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422, + 3423, 3424, 3425, 3426, 3427, 3428, 3429, 3430, + 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, + 3439, 3440, 3441, 3442, 3443, 3444, 3445, 3446, + 3447, 3448, 3449, 3450, 3451, 3452, 3453, 3454, + 3455, 3456, 3457, 3458, 3459, 3460, 3461, 3462, + 3463, 3464, 3465, 3466, 3467, 3468, 3469, 3470, + 3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, + 3479, 3480, 3481, 3482, 3483, 3484, 3485, 3486, + 3487, 3488, 3489, 3490, 3491, 3492, 3493, 3494, + 3495, 3496, 3497, 3498, 3499, 3500, 3501, 3502, + 3503, 3504, 3505, 3506, 3507, 3508, 3509, 3510, + 3511, 3512, 3513, 3514, 3515, 3516, 3517, 3518, + 3519, 3520, 3521, 3522, 3523, 3524, 3525, 3526, + 3527, 3528, 3529, 3530, 3531, 3532, 3533, 3534, + 3535, 3536, 3537, 3538, 3539, 3540, 3541, 3542, + 3543, 3544, 3545, 3546, 3547, 3548, 3549, 3550, + 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558, + 3559, 3560, 0 + }; + + static const signed char _regex_trans_lengths[] = { + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1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, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0 + }; + + static const short _regex_cond_targs[] = { + 746, 746, 746, 746, 748, 749, 750, 746, + 751, 752, 746, 754, 746, 746, 755, 756, + 757, 758, 758, 758, 758, 746, 753, 746, + 746, 3, 3, 3, 3, 746, 746, 4, + 4, 4, 4, 746, 6, 6, 6, 6, + 746, 7, 6, 6, 6, 6, 746, 746, + 746, 746, 8, 8, 8, 8, 746, 746, + 8, 9, 8, 8, 746, 746, 8, 9, + 8, 8, 746, 12, 12, 12, 12, 746, + 7, 12, 12, 12, 12, 746, 746, 14, + 746, 746, 746, 746, 746, 16, 746, 8, + 18, 8, 8, 746, 17, 17, 17, 17, + 746, 746, 17, 17, 17, 17, 746, 746, + 8, 18, 8, 8, 746, 746, 19, 746, + 746, 746, 20, 20, 20, 20, 746, 746, + 21, 21, 21, 21, 746, 746, 22, 746, + 21, 21, 21, 21, 746, 25, 25, 25, + 25, 746, 746, 25, 25, 25, 25, 746, + 3, 3, 3, 3, 746, 20, 20, 20, + 20, 746, 746, 27, 746, 28, 28, 28, + 28, 746, 30, 31, 746, 29, 30, 31, + 746, 29, 30, 31, 29, 33, 34, 746, + 32, 33, 34, 746, 32, 33, 34, 32, + 36, 37, 746, 35, 36, 37, 746, 35, + 36, 37, 35, 746, 38, 772, 746, 746, + 40, 42, 49, 46, 49, 49, 746, 43, + 746, 746, 44, 746, 746, 45, 746, 746, + 746, 49, 746, 47, 49, 49, 746, 49, + 746, 48, 49, 49, 746, 49, 746, 49, + 49, 49, 746, 49, 746, 49, 49, 49, + 746, 51, 51, 51, 51, 746, 746, 51, + 51, 51, 51, 746, 53, 53, 53, 53, + 746, 746, 53, 53, 53, 53, 746, 55, + 55, 55, 55, 746, 55, 746, 55, 55, + 55, 746, 57, 746, 746, 57, 746, 746, + 58, 58, 58, 746, 60, 783, 59, 746, + 783, 61, 746, 783, 61, 746, 746, 746, + 746, 746, 64, 746, 746, 746, 746, 787, + 65, 787, 67, 65, 787, 65, 787, 69, + 65, 787, 70, 65, 787, 65, 790, 790, + 73, 76, 790, 74, 790, 75, 790, 790, + 790, 77, 790, 78, 790, 79, 790, 80, + 790, 790, 790, 82, 790, 83, 790, 84, + 790, 85, 790, 790, 790, 87, 92, 94, + 790, 88, 790, 89, 790, 90, 790, 91, + 790, 790, 790, 93, 790, 790, 790, 95, + 790, 790, 790, 97, 790, 98, 790, 99, + 790, 100, 790, 790, 790, 102, 790, 103, + 790, 104, 790, 105, 790, 106, 790, 790, + 790, 108, 790, 109, 111, 790, 110, 790, + 790, 790, 112, 790, 113, 790, 790, 790, + 115, 120, 790, 116, 790, 117, 790, 118, + 790, 119, 790, 790, 790, 121, 790, 790, + 790, 123, 139, 790, 124, 790, 125, 790, + 126, 790, 127, 790, 128, 790, 129, 790, + 130, 790, 131, 790, 132, 790, 133, 790, + 134, 790, 135, 790, 136, 790, 137, 790, + 138, 790, 790, 790, 140, 790, 141, 790, + 790, 790, 143, 144, 790, 790, 790, 145, + 790, 146, 790, 147, 790, 148, 790, 790, + 790, 150, 790, 151, 790, 790, 790, 153, + 790, 154, 790, 790, 790, 156, 790, 157, + 790, 158, 790, 159, 790, 160, 790, 161, + 790, 790, 790, 163, 167, 790, 164, 790, + 165, 790, 166, 790, 790, 790, 168, 790, + 169, 790, 170, 790, 171, 790, 790, 790, + 173, 177, 790, 174, 790, 175, 790, 176, + 790, 790, 790, 178, 790, 179, 790, 180, + 790, 181, 790, 182, 790, 183, 790, 790, + 790, 185, 790, 186, 790, 187, 790, 188, + 790, 189, 790, 190, 790, 191, 790, 192, + 790, 193, 790, 194, 790, 195, 790, 196, + 790, 197, 790, 198, 790, 199, 790, 200, + 790, 201, 790, 790, 790, 203, 790, 204, + 790, 205, 790, 206, 790, 207, 790, 790, + 790, 209, 790, 210, 790, 211, 790, 212, + 790, 213, 790, 790, 790, 215, 790, 216, + 790, 217, 790, 218, 790, 219, 790, 220, + 790, 221, 790, 790, 790, 223, 790, 224, + 790, 225, 790, 790, 790, 227, 790, 228, + 790, 790, 790, 230, 235, 790, 231, 790, + 232, 790, 233, 790, 234, 790, 790, 790, + 236, 790, 237, 790, 238, 790, 239, 790, + 790, 790, 799, 790, 242, 790, 790, 790, + 244, 790, 245, 790, 790, 790, 247, 790, + 248, 790, 249, 790, 790, 790, 251, 790, + 252, 790, 253, 790, 254, 790, 255, 790, + 790, 790, 257, 790, 258, 790, 259, 790, + 260, 790, 261, 790, 262, 790, 263, 790, + 264, 790, 265, 790, 266, 790, 267, 790, + 268, 790, 269, 790, 790, 790, 271, 277, + 790, 272, 790, 273, 790, 274, 790, 275, + 790, 276, 790, 790, 790, 278, 790, 279, + 790, 280, 790, 281, 790, 282, 790, 283, + 790, 284, 790, 285, 790, 286, 790, 287, + 790, 288, 790, 289, 790, 290, 790, 291, + 295, 790, 292, 790, 293, 790, 294, 790, + 790, 790, 296, 790, 297, 790, 298, 790, + 299, 790, 790, 790, 301, 790, 302, 790, + 303, 790, 304, 790, 305, 790, 790, 790, + 307, 310, 314, 319, 790, 308, 790, 309, + 790, 790, 790, 311, 790, 312, 790, 313, + 790, 790, 790, 315, 790, 316, 790, 317, + 790, 318, 790, 790, 790, 320, 790, 321, + 790, 322, 790, 323, 790, 790, 790, 325, + 332, 790, 326, 790, 327, 790, 328, 790, + 329, 790, 330, 790, 331, 790, 790, 790, + 333, 790, 790, 790, 790, 335, 790, 336, + 790, 790, 790, 338, 790, 339, 790, 340, + 790, 790, 790, 342, 344, 349, 790, 343, + 790, 790, 790, 345, 790, 346, 790, 347, + 790, 348, 790, 790, 790, 790, 790, 351, + 354, 790, 352, 790, 353, 790, 790, 790, + 355, 790, 356, 790, 790, 790, 358, 364, + 790, 359, 790, 360, 790, 361, 790, 362, + 790, 363, 790, 790, 790, 365, 790, 366, + 790, 367, 790, 790, 790, 369, 790, 370, + 790, 371, 790, 372, 790, 373, 790, 374, + 790, 375, 790, 376, 790, 790, 790, 378, + 790, 379, 790, 380, 790, 381, 790, 382, + 790, 383, 790, 790, 790, 385, 790, 386, + 790, 387, 790, 388, 790, 790, 790, 390, + 790, 391, 790, 392, 790, 393, 790, 394, + 790, 395, 790, 396, 790, 397, 790, 790, + 790, 790, 790, 400, 790, 401, 790, 790, + 790, 403, 408, 790, 404, 790, 405, 790, + 406, 790, 407, 790, 790, 790, 409, 790, + 410, 415, 421, 433, 790, 411, 790, 412, + 790, 413, 790, 414, 790, 790, 790, 416, + 790, 417, 790, 418, 790, 419, 790, 420, + 790, 790, 790, 422, 790, 423, 790, 424, + 790, 425, 790, 426, 790, 427, 790, 428, + 790, 429, 790, 430, 790, 431, 790, 432, + 790, 790, 790, 434, 790, 435, 790, 436, + 790, 437, 790, 790, 790, 439, 790, 440, + 790, 790, 790, 442, 790, 443, 790, 444, + 790, 445, 790, 790, 790, 447, 452, 790, + 448, 790, 449, 790, 450, 790, 451, 790, + 790, 790, 453, 790, 454, 790, 455, 790, + 456, 790, 457, 790, 458, 790, 790, 790, + 460, 790, 461, 790, 462, 790, 790, 790, + 464, 790, 465, 790, 790, 790, 467, 473, + 790, 468, 790, 469, 790, 470, 790, 471, + 790, 472, 790, 790, 790, 474, 790, 475, + 790, 476, 790, 477, 790, 478, 790, 479, + 790, 790, 790, 481, 790, 482, 790, 483, + 790, 484, 790, 790, 790, 486, 790, 487, + 790, 488, 790, 489, 790, 790, 790, 491, + 790, 492, 790, 493, 790, 494, 790, 495, + 790, 496, 790, 790, 790, 498, 507, 790, + 499, 790, 500, 790, 501, 790, 502, 790, + 503, 790, 504, 790, 505, 790, 506, 790, + 790, 790, 508, 790, 509, 790, 790, 790, + 511, 519, 528, 790, 512, 515, 790, 513, + 790, 514, 790, 790, 790, 516, 790, 517, + 790, 518, 790, 790, 790, 520, 790, 521, + 522, 525, 790, 790, 790, 523, 790, 524, + 790, 790, 790, 526, 790, 527, 790, 790, + 790, 529, 790, 790, 790, 531, 790, 532, + 790, 533, 790, 790, 790, 535, 790, 536, + 790, 790, 537, 790, 790, 790, 539, 543, + 790, 540, 790, 541, 790, 542, 790, 790, + 790, 544, 790, 545, 790, 546, 790, 547, + 790, 790, 790, 549, 790, 550, 790, 551, + 790, 552, 790, 553, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 560, 0, 562, 561, 817, 0, 0, + 561, 564, 565, 819, 563, 564, 565, 819, + 563, 564, 565, 563, 568, 569, 819, 570, + 651, 666, 672, 678, 684, 690, 696, 707, + 713, 719, 724, 567, 568, 569, 819, 567, + 568, 569, 819, 567, 568, 569, 567, 568, + 569, 819, 571, 586, 592, 598, 604, 610, + 616, 627, 633, 639, 644, 567, 568, 569, + 819, 572, 581, 567, 568, 569, 819, 573, + 577, 567, 568, 569, 819, 574, 567, 568, + 569, 819, 575, 567, 576, 569, 819, 567, + 568, 569, 819, 567, 568, 569, 819, 578, + 567, 568, 569, 819, 579, 567, 580, 569, + 819, 567, 568, 569, 819, 567, 568, 569, + 819, 582, 567, 568, 569, 819, 583, 567, + 568, 569, 819, 584, 567, 585, 569, 819, + 567, 568, 569, 819, 567, 568, 569, 819, + 587, 567, 568, 569, 819, 588, 567, 568, + 569, 819, 589, 567, 568, 569, 819, 590, + 567, 591, 569, 819, 567, 568, 569, 819, + 567, 568, 569, 819, 593, 567, 568, 569, + 819, 594, 567, 568, 569, 819, 595, 567, + 568, 569, 819, 596, 567, 597, 569, 819, + 567, 568, 569, 819, 567, 568, 569, 819, + 599, 567, 568, 569, 819, 600, 567, 568, + 569, 819, 601, 567, 568, 569, 819, 602, + 567, 603, 569, 819, 567, 568, 569, 819, + 567, 568, 569, 819, 605, 567, 568, 569, + 819, 606, 567, 568, 569, 819, 607, 567, + 568, 569, 819, 608, 567, 609, 569, 819, + 567, 568, 569, 819, 567, 568, 569, 819, + 611, 567, 568, 569, 819, 612, 567, 568, + 569, 819, 613, 567, 568, 569, 819, 614, + 567, 615, 569, 819, 567, 568, 569, 819, + 567, 568, 569, 819, 617, 622, 567, 568, + 569, 819, 618, 567, 568, 569, 819, 619, + 567, 568, 569, 819, 620, 567, 621, 569, + 819, 567, 568, 569, 819, 567, 568, 569, + 819, 623, 567, 568, 569, 819, 624, 567, + 568, 569, 819, 625, 567, 626, 569, 819, + 567, 568, 569, 819, 567, 568, 569, 819, + 628, 567, 568, 569, 819, 629, 567, 568, + 569, 819, 630, 567, 568, 569, 819, 631, + 567, 632, 569, 819, 567, 568, 569, 819, + 567, 568, 569, 819, 634, 567, 568, 569, + 819, 635, 567, 568, 569, 819, 636, 567, + 568, 569, 819, 637, 567, 638, 569, 819, + 567, 568, 569, 819, 567, 568, 569, 819, + 640, 567, 568, 569, 819, 641, 567, 568, + 569, 819, 642, 567, 643, 569, 819, 567, + 568, 569, 819, 567, 568, 569, 819, 645, + 567, 568, 569, 819, 646, 567, 568, 569, + 819, 647, 567, 568, 569, 819, 648, 567, + 568, 569, 819, 649, 567, 650, 569, 819, + 567, 568, 569, 819, 567, 568, 569, 819, + 652, 661, 567, 568, 569, 819, 653, 657, + 567, 568, 569, 819, 654, 567, 568, 569, + 819, 655, 567, 656, 569, 819, 567, 568, + 569, 819, 567, 568, 569, 819, 658, 567, + 568, 569, 819, 659, 567, 660, 569, 819, + 567, 568, 569, 819, 567, 568, 569, 819, + 662, 567, 568, 569, 819, 663, 567, 568, + 569, 819, 664, 567, 665, 569, 819, 567, + 568, 569, 819, 567, 568, 569, 819, 667, + 567, 568, 569, 819, 668, 567, 568, 569, + 819, 669, 567, 568, 569, 819, 670, 567, + 671, 569, 819, 567, 568, 569, 819, 567, + 568, 569, 819, 673, 567, 568, 569, 819, + 674, 567, 568, 569, 819, 675, 567, 568, + 569, 819, 676, 567, 677, 569, 819, 567, + 568, 569, 819, 567, 568, 569, 819, 679, + 567, 568, 569, 819, 680, 567, 568, 569, + 819, 681, 567, 568, 569, 819, 682, 567, + 683, 569, 819, 567, 568, 569, 819, 567, + 568, 569, 819, 685, 567, 568, 569, 819, + 686, 567, 568, 569, 819, 687, 567, 568, + 569, 819, 688, 567, 689, 569, 819, 567, + 568, 569, 819, 567, 568, 569, 819, 691, + 567, 568, 569, 819, 692, 567, 568, 569, + 819, 693, 567, 568, 569, 819, 694, 567, + 695, 569, 819, 567, 568, 569, 819, 567, + 568, 569, 819, 697, 702, 567, 568, 569, + 819, 698, 567, 568, 569, 819, 699, 567, + 568, 569, 819, 700, 567, 701, 569, 819, + 567, 568, 569, 819, 567, 568, 569, 819, + 703, 567, 568, 569, 819, 704, 567, 568, + 569, 819, 705, 567, 706, 569, 819, 567, + 568, 569, 819, 567, 568, 569, 819, 708, + 567, 568, 569, 819, 709, 567, 568, 569, + 819, 710, 567, 568, 569, 819, 711, 567, + 712, 569, 819, 567, 568, 569, 819, 567, + 568, 569, 819, 714, 567, 568, 569, 819, + 715, 567, 568, 569, 819, 716, 567, 568, + 569, 819, 717, 567, 718, 569, 819, 567, + 568, 569, 819, 567, 568, 569, 819, 720, + 567, 568, 569, 819, 721, 567, 568, 569, + 819, 722, 567, 723, 569, 819, 567, 568, + 569, 819, 567, 568, 569, 819, 725, 567, + 568, 569, 819, 726, 567, 568, 569, 819, + 727, 567, 568, 569, 819, 728, 567, 568, + 569, 819, 729, 567, 730, 569, 819, 567, + 568, 569, 819, 567, 732, 733, 819, 731, + 732, 733, 819, 731, 732, 733, 731, 735, + 819, 819, 735, 819, 819, 736, 736, 736, + 819, 819, 819, 819, 819, 739, 819, 819, + 819, 819, 838, 838, 838, 838, 742, 838, + 838, 838, 838, 843, 843, 843, 843, 745, + 843, 843, 843, 843, 746, 746, 746, 746, + 746, 747, 746, 759, 760, 746, 761, 762, + 763, 746, 782, 746, 746, 746, 746, 746, + 784, 746, 785, 746, 786, 746, 746, 746, + 1, 2, 746, 3, 3, 3, 3, 746, + 4, 4, 4, 4, 746, 5, 8, 11, + 13, 15, 8, 9, 10, 8, 8, 746, + 19, 746, 20, 20, 20, 20, 19, 746, + 746, 19, 746, 746, 746, 21, 21, 21, + 21, 746, 746, 746, 746, 22, 746, 23, + 24, 26, 746, 746, 27, 746, 28, 28, + 28, 28, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 29, 32, 35, 746, + 764, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 769, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 770, 746, + 746, 746, 771, 746, 776, 746, 746, 777, + 778, 746, 746, 746, 746, 746, 746, 779, + 746, 766, 768, 746, 765, 746, 746, 746, + 767, 768, 746, 768, 768, 746, 768, 746, + 746, 746, 746, 38, 39, 40, 41, 774, + 746, 773, 746, 746, 746, 775, 746, 746, + 746, 50, 52, 54, 746, 56, 746, 746, + 746, 781, 780, 780, 780, 746, 746, 746, + 746, 746, 58, 58, 58, 746, 59, 746, + 746, 746, 746, 746, 746, 746, 746, 62, + 746, 746, 63, 746, 787, 789, 788, 787, + 65, 787, 66, 68, 65, 791, 792, 793, + 795, 796, 797, 798, 800, 801, 802, 803, + 804, 806, 807, 808, 809, 810, 811, 812, + 813, 814, 815, 816, 790, 71, 72, 81, + 790, 86, 96, 101, 107, 114, 790, 122, + 790, 790, 142, 790, 794, 790, 155, 162, + 790, 149, 152, 790, 172, 790, 184, 202, + 790, 208, 214, 222, 226, 229, 790, 240, + 246, 250, 790, 241, 243, 790, 256, 270, + 790, 300, 790, 306, 324, 790, 790, 334, + 337, 341, 790, 790, 790, 790, 790, 350, + 790, 357, 790, 805, 790, 377, 384, 790, + 368, 790, 790, 389, 398, 790, 790, 790, + 399, 402, 438, 441, 790, 790, 790, 790, + 790, 446, 790, 790, 790, 790, 459, 463, + 790, 466, 790, 480, 485, 790, 790, 790, + 490, 497, 790, 510, 530, 534, 538, 790, + 548, 790, 554, 790, 555, 556, 557, 558, + 790, 790, 790, 790, 790, 790, 790, 0, + 818, 818, 818, 818, 818, 818, 818, 818, + 819, 820, 821, 819, 819, 819, 819, 833, + 819, 834, 819, 835, 819, 819, 819, 563, + 566, 731, 819, 822, 819, 819, 819, 819, + 819, 826, 819, 819, 819, 819, 819, 819, + 819, 827, 819, 819, 819, 819, 819, 819, + 819, 828, 829, 819, 819, 819, 819, 819, + 819, 830, 824, 819, 819, 819, 819, 823, + 819, 819, 819, 825, 819, 819, 819, 819, + 819, 819, 734, 819, 819, 819, 832, 831, + 831, 831, 819, 819, 819, 819, 819, 736, + 736, 736, 819, 819, 819, 819, 819, 737, + 819, 819, 738, 819, 837, 836, 836, 836, + 836, 836, 836, 836, 836, 839, 838, 838, + 838, 840, 838, 841, 838, 842, 838, 838, + 838, 838, 838, 838, 838, 838, 838, 740, + 838, 838, 741, 838, 844, 843, 843, 843, + 845, 843, 846, 843, 847, 843, 843, 843, + 843, 843, 843, 843, 843, 843, 743, 843, + 843, 744, 843, 848, 848, 849, 849, 0, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 787, 787, 787, 787, 787, 787, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 559, 560, + 561, 562, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 838, 838, 838, 843, 843, + 843, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 787, 787, 787, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 817, 818, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 836, 836, 838, 838, 838, + 838, 838, 843, 843, 843, 843, 843, 848, + 849, 0 + }; + + static const short _regex_cond_actions[] = { + 827, 631, 731, 723, 45, 903, 903, 897, + 45, 912, 900, 903, 729, 741, 0, 45, + 45, 923, 923, 923, 923, 737, 45, 765, + 747, 0, 0, 0, 0, 841, 743, 3, + 3, 3, 3, 841, 3, 3, 3, 3, + 839, 0, 3, 3, 3, 3, 839, 761, + 839, 761, 3, 3, 3, 3, 839, 759, + 3, 870, 3, 3, 839, 761, 3, 870, + 3, 3, 839, 3, 3, 3, 3, 839, + 0, 3, 3, 3, 3, 839, 751, 0, + 749, 839, 755, 753, 839, 0, 757, 3, + 3, 3, 3, 839, 0, 0, 0, 0, + 839, 757, 0, 0, 0, 0, 839, 757, + 3, 3, 3, 3, 839, 745, 0, 841, + 725, 727, 27, 27, 27, 27, 841, 743, + 3, 3, 3, 3, 841, 763, 0, 841, + 3, 3, 3, 3, 841, 3, 3, 3, + 3, 841, 673, 3, 3, 3, 3, 841, + 0, 0, 0, 0, 841, 27, 27, 27, + 27, 841, 725, 0, 727, 25, 25, 25, + 25, 841, 0, 0, 829, 0, 0, 0, + 603, 0, 0, 0, 0, 0, 0, 829, + 0, 0, 0, 601, 0, 0, 0, 0, + 0, 0, 829, 0, 0, 0, 603, 0, + 0, 0, 0, 675, 0, 17, 831, 675, + 0, 7, 3, 870, 3, 3, 831, 17, + 831, 663, 17, 831, 663, 17, 831, 663, + 831, 3, 661, 870, 3, 3, 831, 3, + 661, 870, 3, 3, 831, 3, 661, 3, + 3, 3, 831, 3, 665, 3, 3, 3, + 831, 3, 3, 3, 3, 837, 671, 3, + 3, 3, 3, 837, 3, 3, 3, 3, + 837, 669, 3, 3, 3, 3, 837, 3, + 3, 3, 3, 837, 3, 667, 3, 3, + 3, 837, 0, 833, 677, 0, 833, 679, + 0, 0, 0, 835, 0, 29, 11, 845, + 31, 13, 845, 0, 13, 845, 843, 769, + 843, 843, 0, 843, 843, 771, 843, 53, + 0, 53, 0, 0, 51, 0, 53, 0, + 0, 49, 0, 0, 47, 0, 315, 359, + 0, 0, 359, 0, 359, 0, 359, 127, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 129, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 131, 359, 0, 0, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 133, 359, 0, 359, 135, 359, 0, + 359, 137, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 139, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 141, + 359, 0, 359, 0, 0, 359, 0, 359, + 143, 359, 0, 359, 0, 359, 145, 359, + 0, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 147, 359, 0, 359, 149, + 359, 0, 0, 341, 0, 341, 0, 341, + 0, 341, 0, 341, 0, 341, 0, 341, + 0, 341, 0, 341, 0, 341, 0, 341, + 0, 341, 0, 341, 0, 341, 0, 341, + 0, 341, 151, 341, 0, 341, 0, 341, + 153, 341, 0, 0, 341, 155, 341, 0, + 341, 0, 341, 0, 341, 0, 341, 157, + 341, 0, 343, 0, 343, 159, 343, 0, + 343, 0, 343, 161, 343, 0, 341, 0, + 341, 0, 341, 0, 341, 0, 341, 0, + 341, 163, 341, 0, 0, 341, 0, 341, + 0, 341, 0, 341, 165, 341, 0, 341, + 0, 341, 0, 341, 0, 341, 167, 341, + 0, 0, 359, 0, 359, 0, 359, 0, + 359, 169, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 171, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 173, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 175, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 177, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 179, 359, 0, 359, 0, + 359, 0, 359, 181, 359, 0, 359, 0, + 359, 183, 359, 0, 0, 359, 0, 359, + 0, 359, 0, 359, 0, 359, 185, 359, + 0, 359, 0, 359, 0, 359, 0, 359, + 187, 359, 45, 359, 0, 357, 189, 357, + 0, 357, 0, 357, 191, 357, 0, 359, + 0, 359, 0, 359, 193, 359, 0, 359, + 0, 359, 0, 359, 0, 359, 0, 359, + 195, 359, 0, 359, 0, 359, 0, 359, + 0, 359, 0, 359, 0, 359, 0, 359, + 0, 359, 0, 359, 0, 359, 0, 359, + 0, 359, 0, 359, 197, 359, 0, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 199, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 0, 359, 0, 359, 0, 359, 0, 359, + 201, 359, 0, 359, 0, 359, 0, 359, + 0, 359, 203, 359, 0, 359, 0, 359, + 0, 359, 0, 359, 0, 359, 205, 359, + 0, 0, 0, 0, 359, 0, 359, 0, + 359, 207, 359, 0, 359, 0, 359, 0, + 359, 209, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 211, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 213, 359, 0, + 0, 359, 0, 359, 0, 359, 0, 359, + 0, 359, 0, 359, 0, 359, 215, 359, + 0, 359, 217, 359, 219, 0, 345, 0, + 345, 221, 345, 0, 345, 0, 345, 0, + 345, 223, 345, 0, 0, 0, 345, 0, + 345, 225, 345, 0, 345, 0, 345, 0, + 345, 0, 345, 227, 345, 229, 345, 0, + 0, 345, 0, 345, 0, 345, 231, 345, + 0, 345, 0, 345, 233, 345, 0, 0, + 347, 0, 347, 0, 347, 0, 347, 0, + 347, 0, 347, 235, 347, 0, 347, 0, + 347, 0, 347, 237, 347, 0, 349, 0, + 349, 0, 349, 0, 349, 0, 349, 0, + 349, 0, 349, 0, 349, 239, 349, 0, + 347, 0, 347, 0, 347, 0, 347, 0, + 347, 0, 347, 241, 347, 0, 347, 0, + 347, 0, 347, 0, 347, 243, 347, 0, + 351, 0, 351, 0, 351, 0, 351, 0, + 351, 0, 351, 0, 351, 0, 351, 245, + 351, 247, 351, 0, 359, 0, 359, 249, + 359, 0, 0, 359, 0, 359, 0, 359, + 0, 359, 0, 359, 251, 359, 0, 359, + 0, 0, 0, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 253, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 255, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 257, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 259, 359, 0, 359, 0, + 359, 261, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 263, 359, 0, 0, 353, + 0, 353, 0, 353, 0, 353, 0, 353, + 265, 353, 0, 353, 0, 353, 0, 353, + 0, 353, 0, 353, 0, 353, 267, 353, + 0, 359, 0, 359, 0, 359, 269, 359, + 0, 359, 0, 359, 271, 359, 0, 0, + 355, 0, 355, 0, 355, 0, 355, 0, + 355, 0, 355, 273, 355, 0, 355, 0, + 355, 0, 355, 0, 355, 0, 355, 0, + 355, 275, 355, 0, 355, 0, 355, 0, + 355, 0, 355, 277, 355, 0, 355, 0, + 355, 0, 355, 0, 355, 279, 355, 0, + 355, 0, 355, 0, 355, 0, 355, 0, + 355, 0, 355, 281, 355, 0, 0, 355, + 0, 355, 0, 355, 0, 355, 0, 355, + 0, 355, 0, 355, 0, 355, 0, 355, + 283, 355, 0, 355, 0, 355, 285, 355, + 0, 0, 0, 359, 0, 0, 359, 0, + 359, 0, 359, 287, 359, 0, 359, 0, + 359, 0, 359, 289, 359, 0, 359, 0, + 0, 0, 359, 291, 359, 0, 359, 0, + 359, 293, 359, 0, 359, 0, 359, 295, + 359, 0, 359, 297, 359, 0, 359, 0, + 359, 0, 359, 299, 359, 0, 359, 0, + 303, 359, 0, 359, 301, 359, 0, 0, + 359, 0, 359, 0, 359, 0, 359, 305, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 307, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 309, 359, 311, + 359, 119, 359, 121, 359, 123, 359, 125, + 359, 0, 39, 33, 35, 37, 39, 39, + 35, 0, 0, 539, 0, 0, 0, 377, + 0, 0, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 539, 0, + 0, 0, 435, 0, 0, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 539, 0, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 381, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 385, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 389, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 393, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 397, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 401, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 405, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 409, + 0, 0, 0, 539, 0, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 413, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 417, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 421, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 425, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 429, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 433, 0, 0, 0, 539, + 0, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 379, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 383, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 387, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 391, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 395, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 399, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 403, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 407, 0, + 0, 0, 539, 0, 0, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 411, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 415, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 419, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 423, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 427, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 431, 0, 0, 0, 539, 0, + 0, 0, 377, 0, 0, 0, 0, 0, + 533, 471, 0, 533, 475, 0, 0, 0, + 535, 537, 503, 537, 537, 0, 537, 537, + 505, 537, 569, 557, 569, 569, 0, 569, + 569, 559, 569, 587, 575, 587, 587, 0, + 587, 587, 577, 587, 633, 775, 777, 629, + 637, 45, 597, 0, 0, 609, 0, 45, + 0, 635, 909, 599, 775, 777, 773, 777, + 0, 777, 45, 777, 45, 777, 773, 777, + 0, 0, 779, 0, 0, 0, 0, 821, + 3, 3, 3, 3, 821, 1, 3, 1, + 0, 3, 3, 855, 855, 3, 3, 819, + 0, 821, 27, 27, 27, 27, 0, 821, + 745, 0, 821, 735, 733, 3, 3, 3, + 3, 821, 739, 821, 763, 0, 821, 1, + 1, 0, 821, 725, 0, 727, 25, 25, + 25, 25, 821, 615, 613, 783, 619, 617, + 785, 623, 621, 787, 0, 0, 0, 781, + 5, 639, 647, 611, 695, 607, 717, 699, + 715, 683, 683, 0, 605, 713, 691, 683, + 703, 687, 719, 641, 657, 645, 0, 693, + 659, 655, 906, 697, 45, 683, 651, 45, + 0, 653, 689, 649, 683, 701, 685, 7, + 643, 852, 915, 721, 15, 791, 867, 791, + 858, 919, 795, 927, 919, 793, 919, 847, + 709, 711, 681, 0, 7, 0, 849, 17, + 801, 17, 799, 876, 799, 17, 797, 873, + 797, 1, 1, 1, 815, 0, 803, 705, + 707, 45, 19, 23, 21, 805, 882, 894, + 888, 805, 0, 0, 0, 807, 11, 825, + 627, 625, 789, 823, 767, 823, 823, 0, + 823, 823, 0, 823, 55, 45, 45, 53, + 0, 53, 0, 0, 0, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 0, 0, 317, 0, 0, 0, + 339, 0, 0, 0, 0, 0, 339, 0, + 61, 63, 0, 65, 45, 67, 0, 0, + 319, 0, 0, 321, 0, 339, 0, 0, + 339, 0, 0, 0, 0, 0, 339, 0, + 0, 0, 339, 0, 0, 337, 0, 0, + 339, 0, 339, 0, 0, 339, 79, 0, + 0, 0, 69, 71, 73, 75, 77, 0, + 323, 0, 81, 45, 83, 0, 0, 325, + 0, 327, 85, 0, 0, 87, 89, 329, + 0, 0, 0, 0, 339, 91, 93, 95, + 97, 0, 99, 101, 103, 331, 0, 0, + 339, 0, 105, 0, 0, 107, 109, 111, + 0, 0, 333, 0, 0, 0, 0, 339, + 0, 339, 0, 339, 0, 0, 0, 0, + 339, 313, 339, 113, 115, 117, 335, 39, + 361, 363, 365, 367, 369, 371, 373, 375, + 491, 45, 0, 511, 509, 507, 509, 0, + 509, 45, 509, 45, 509, 507, 509, 0, + 0, 0, 531, 5, 489, 439, 457, 493, + 493, 0, 437, 485, 493, 461, 481, 451, + 441, 0, 487, 453, 449, 495, 455, 493, + 445, 45, 0, 447, 483, 443, 493, 459, + 479, 7, 9, 473, 497, 497, 499, 15, + 517, 861, 517, 15, 519, 864, 519, 467, + 469, 477, 0, 521, 463, 465, 45, 19, + 23, 21, 523, 879, 891, 885, 523, 0, + 0, 0, 525, 529, 501, 529, 529, 0, + 529, 529, 0, 529, 0, 549, 543, 549, + 541, 549, 547, 545, 551, 0, 563, 561, + 563, 0, 563, 45, 563, 45, 563, 561, + 563, 553, 567, 565, 555, 565, 565, 0, + 565, 565, 0, 565, 0, 581, 579, 581, + 0, 581, 45, 581, 45, 581, 579, 581, + 571, 585, 583, 573, 583, 583, 0, 583, + 583, 0, 583, 589, 591, 593, 595, 0, + 827, 827, 841, 841, 839, 839, 839, 839, + 839, 839, 839, 839, 839, 839, 839, 839, + 839, 839, 841, 841, 841, 841, 841, 841, + 841, 841, 841, 841, 829, 829, 829, 829, + 829, 829, 829, 829, 829, 831, 831, 831, + 831, 831, 831, 831, 831, 831, 831, 831, + 831, 837, 837, 837, 837, 837, 837, 833, + 833, 835, 845, 845, 845, 843, 843, 843, + 59, 59, 59, 59, 59, 59, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 341, 341, 341, 341, 341, 341, 341, + 341, 341, 341, 341, 341, 341, 341, 341, + 341, 341, 341, 341, 341, 341, 341, 341, + 341, 341, 341, 341, 343, 343, 343, 343, + 343, 343, 341, 341, 341, 341, 341, 341, + 341, 341, 341, 341, 341, 341, 341, 341, + 341, 341, 341, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 357, 357, 357, 357, 357, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 347, 347, 347, 347, + 347, 347, 347, 347, 347, 347, 347, 349, + 349, 349, 349, 349, 349, 349, 349, 349, + 347, 347, 347, 347, 347, 347, 347, 347, + 347, 347, 347, 347, 351, 351, 351, 351, + 351, 351, 351, 351, 351, 351, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 353, 353, 353, + 353, 353, 353, 353, 353, 353, 353, 353, + 353, 353, 359, 359, 359, 359, 359, 359, + 359, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 39, 39, + 39, 39, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 533, 533, 535, + 537, 537, 537, 569, 569, 569, 587, 587, + 587, 0, 779, 821, 821, 819, 821, 821, + 821, 821, 821, 821, 821, 821, 783, 785, + 787, 781, 817, 791, 791, 795, 793, 847, + 811, 809, 801, 799, 799, 797, 797, 815, + 803, 813, 805, 805, 807, 825, 789, 823, + 823, 823, 0, 57, 57, 0, 339, 339, + 319, 321, 339, 339, 339, 339, 337, 339, + 339, 339, 323, 325, 327, 329, 339, 331, + 339, 333, 339, 339, 339, 339, 339, 335, + 0, 0, 0, 531, 531, 517, 517, 519, + 519, 513, 527, 521, 515, 523, 523, 525, + 529, 529, 529, 0, 551, 0, 567, 565, + 565, 565, 0, 585, 583, 583, 583, 0, + 0, 0 + }; + + static const signed char _regex_to_state_actions[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 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0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 43, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 43, 0, 0, 43, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 43, 43, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 43, 0, 43, 0, + 0, 0, 0, 43, 0, 0, 0, 0, + 43, 43, 0 + }; + + static const short _regex_eof_trans[] = { + 2665, 2666, 2667, 2668, 2669, 2670, 2671, 2672, + 2673, 2674, 2675, 2676, 2677, 2678, 2679, 2680, + 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, + 2689, 2690, 2691, 2692, 2693, 2694, 2695, 2696, + 2697, 2698, 2699, 2700, 2701, 2702, 2703, 2704, + 2705, 2706, 2707, 2708, 2709, 2710, 2711, 2712, + 2713, 2714, 2715, 2716, 2717, 2718, 2719, 2720, + 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, + 2729, 2730, 2731, 2732, 2733, 2734, 2735, 2736, + 2737, 2738, 2739, 2740, 2741, 2742, 2743, 2744, + 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, + 2753, 2754, 2755, 2756, 2757, 2758, 2759, 2760, + 2761, 2762, 2763, 2764, 2765, 2766, 2767, 2768, + 2769, 2770, 2771, 2772, 2773, 2774, 2775, 2776, + 2777, 2778, 2779, 2780, 2781, 2782, 2783, 2784, + 2785, 2786, 2787, 2788, 2789, 2790, 2791, 2792, + 2793, 2794, 2795, 2796, 2797, 2798, 2799, 2800, + 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, + 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, + 2817, 2818, 2819, 2820, 2821, 2822, 2823, 2824, + 2825, 2826, 2827, 2828, 2829, 2830, 2831, 2832, + 2833, 2834, 2835, 2836, 2837, 2838, 2839, 2840, + 2841, 2842, 2843, 2844, 2845, 2846, 2847, 2848, + 2849, 2850, 2851, 2852, 2853, 2854, 2855, 2856, + 2857, 2858, 2859, 2860, 2861, 2862, 2863, 2864, + 2865, 2866, 2867, 2868, 2869, 2870, 2871, 2872, + 2873, 2874, 2875, 2876, 2877, 2878, 2879, 2880, + 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, + 2889, 2890, 2891, 2892, 2893, 2894, 2895, 2896, + 2897, 2898, 2899, 2900, 2901, 2902, 2903, 2904, + 2905, 2906, 2907, 2908, 2909, 2910, 2911, 2912, + 2913, 2914, 2915, 2916, 2917, 2918, 2919, 2920, + 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, + 2929, 2930, 2931, 2932, 2933, 2934, 2935, 2936, + 2937, 2938, 2939, 2940, 2941, 2942, 2943, 2944, + 2945, 2946, 2947, 2948, 2949, 2950, 2951, 2952, + 2953, 2954, 2955, 2956, 2957, 2958, 2959, 2960, + 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, + 2969, 2970, 2971, 2972, 2973, 2974, 2975, 2976, + 2977, 2978, 2979, 2980, 2981, 2982, 2983, 2984, + 2985, 2986, 2987, 2988, 2989, 2990, 2991, 2992, + 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3000, + 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, + 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, + 3017, 3018, 3019, 3020, 3021, 3022, 3023, 3024, + 3025, 3026, 3027, 3028, 3029, 3030, 3031, 3032, + 3033, 3034, 3035, 3036, 3037, 3038, 3039, 3040, + 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, + 3049, 3050, 3051, 3052, 3053, 3054, 3055, 3056, + 3057, 3058, 3059, 3060, 3061, 3062, 3063, 3064, + 3065, 3066, 3067, 3068, 3069, 3070, 3071, 3072, + 3073, 3074, 3075, 3076, 3077, 3078, 3079, 3080, + 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, + 3089, 3090, 3091, 3092, 3093, 3094, 3095, 3096, + 3097, 3098, 3099, 3100, 3101, 3102, 3103, 3104, + 3105, 3106, 3107, 3108, 3109, 3110, 3111, 3112, + 3113, 3114, 3115, 3116, 3117, 3118, 3119, 3120, + 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128, + 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3136, + 3137, 3138, 3139, 3140, 3141, 3142, 3143, 3144, + 3145, 3146, 3147, 3148, 3149, 3150, 3151, 3152, + 3153, 3154, 3155, 3156, 3157, 3158, 3159, 3160, + 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168, + 3169, 3170, 3171, 3172, 3173, 3174, 3175, 3176, + 3177, 3178, 3179, 3180, 3181, 3182, 3183, 3184, + 3185, 3186, 3187, 3188, 3189, 3190, 3191, 3192, + 3193, 3194, 3195, 3196, 3197, 3198, 3199, 3200, + 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, + 3209, 3210, 3211, 3212, 3213, 3214, 3215, 3216, + 3217, 3218, 3219, 3220, 3221, 3222, 3223, 3224, + 3225, 3226, 3227, 3228, 3229, 3230, 3231, 3232, + 3233, 3234, 3235, 3236, 3237, 3238, 3239, 3240, + 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, + 3249, 3250, 3251, 3252, 3253, 3254, 3255, 3256, + 3257, 3258, 3259, 3260, 3261, 3262, 3263, 3264, + 3265, 3266, 3267, 3268, 3269, 3270, 3271, 3272, + 3273, 3274, 3275, 3276, 3277, 3278, 3279, 3280, + 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, + 3289, 3290, 3291, 3292, 3293, 3294, 3295, 3296, + 3297, 3298, 3299, 3300, 3301, 3302, 3303, 3304, + 3305, 3306, 3307, 3308, 3309, 3310, 3311, 3312, + 3313, 3314, 3315, 3316, 3317, 3318, 3319, 3320, + 3321, 3322, 3323, 3324, 3325, 3326, 3327, 3328, + 3329, 3330, 3331, 3332, 3333, 3334, 3335, 3336, + 3337, 3338, 3339, 3340, 3341, 3342, 3343, 3344, + 3345, 3346, 3347, 3348, 3349, 3350, 3351, 3352, + 3353, 3354, 3355, 3356, 3357, 3358, 3359, 3360, + 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, + 3369, 3370, 3371, 3372, 3373, 3374, 3375, 3376, + 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384, + 3385, 3386, 3387, 3388, 3389, 3390, 3391, 3392, + 3393, 3394, 3395, 3396, 3397, 3398, 3399, 3400, + 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, + 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, + 3417, 3418, 3419, 3420, 3421, 3422, 3423, 3424, + 3425, 3426, 3427, 3428, 3429, 3430, 3431, 3432, + 3433, 3434, 3435, 3436, 3437, 3438, 3439, 3440, + 3441, 3442, 3443, 3444, 3445, 3446, 3447, 3448, + 3449, 3450, 3451, 3452, 3453, 3454, 3455, 3456, + 3457, 3458, 3459, 3460, 3461, 3462, 3463, 3464, + 3465, 3466, 3467, 3468, 3469, 3470, 3471, 3472, + 3473, 3474, 3475, 3476, 3477, 3478, 3479, 3480, + 3481, 3482, 3483, 3484, 3485, 3486, 3487, 3488, + 3489, 3490, 3491, 3492, 3493, 3494, 3495, 3496, + 3497, 3498, 3499, 3500, 3501, 3502, 3503, 3504, + 3505, 3506, 3507, 3508, 3509, 3510, 3511, 3512, + 3513, 3514, 0 + }; + + static const int regex_start = 746; + static const int regex_error = 0; + + static const int regex_en_readVerb = 787; + static const int regex_en_readUCP = 790; + static const int regex_en_readBracedUCP = 559; + static const int regex_en_readUCPSingle = 818; + static const int regex_en_charClassGuts = 819; + static const int regex_en_readClass = 836; + static const int regex_en_readQuotedLiteral = 838; + static const int regex_en_readQuotedClass = 843; + static const int regex_en_readComment = 848; + static const int regex_en_readNewlineTerminatedComment = 849; + static const int regex_en_main = 746; + + +#line 1911 "Parser.rl" + + + /** \brief Main parser call, returns root Component or nullptr. */ + unique_ptr parse(const char *ptr, ParseMode &globalMode) { + assert(ptr); + + const char *p = ptr; + const char *pe = ptr + strlen(ptr); + + // First, read the control verbs, set any global mode flags and move the + // ptr forward. + p = read_control_verbs(p, pe, 0, globalMode); + + const char *eof = pe; + int cs; + UNUSED int act; + int top; + vector stack; + const char *ts, *te; + unichar accumulator = 0; + unichar octAccumulator = 0; /* required as we are also accumulating for + * back ref when looking for octals */ + unsigned repeatN = 0; + unsigned repeatM = 0; + string label; + + ParseMode mode = globalMode; + ParseMode newMode; + + bool negated = false; + bool inComment = false; + + // Stack of sequences and flags used to store state when we enter + // sub-sequences. + vector sequences; + + // Index of the next capturing group. Note that zero is reserved for the + // root sequence. + unsigned groupIndex = 1; + + // Set storing group names that are currently in use. + flat_set groupNames; + + // Root sequence. + unique_ptr rootSeq = std::make_unique(); + rootSeq->setCaptureIndex(0); + + // Current sequence being appended to + ComponentSequence *currentSeq = rootSeq.get(); + + // The current character class being appended to. This is used as the + // accumulator for both character class and UCP properties. + unique_ptr currentCls; + + // True if the machine is currently inside a character class, i.e. square + // brackets [..]. + bool inCharClass = false; + + // True if the machine is inside a character class but it has not processed + // any "real" elements yet, i.e. it's still processing meta-characters like + // '^'. + bool inCharClassEarly = false; + + // Location at which the current character class began. + const char *currentClsBegin = p; + + // We throw exceptions on various parsing failures beyond this point: we + // use a try/catch block here to clean up our allocated memory before we + // re-throw the exception to the caller. + try { + // Embed the Ragel machine here + +#line 4187 "Parser.cpp" + { + cs = (int)regex_start; + top = 0; + ts = 0; + te = 0; + act = 0; + } + +#line 1982 "Parser.rl" + + +#line 4196 "Parser.cpp" + { + int _cpc; + int _klen; + const signed char * _ckeys; + unsigned int _trans = 0; + unsigned int _cond = 0; + const char * _keys; + const short * _acts; + unsigned int _nacts; + _resume: {} + if ( p == pe && p != eof ) + goto _out; + _acts = ( _regex_actions + (_regex_from_state_actions[cs])); + _nacts = (unsigned int)(*( _acts)); + _acts += 1; + while ( _nacts > 0 ) { + switch ( (*( _acts)) ) { + case 24: { + { +#line 1 "NONE" + {ts = p;}} + +#line 4218 "Parser.cpp" + + break; + } + } + _nacts -= 1; + _acts += 1; + } + + if ( p == eof ) { + if ( _regex_eof_trans[cs] > 0 ) { + _trans = (unsigned int)_regex_eof_trans[cs] - 1; + } + } + else { + _keys = ( _regex_trans_keys + (_regex_key_offsets[cs])); + _trans = (unsigned int)_regex_index_offsets[cs]; + + _klen = (int)_regex_single_lengths[cs]; + if ( _klen > 0 ) { + const char *_lower = _keys; + const char *_upper = _keys + _klen - 1; + const char *_mid; + while ( 1 ) { + if ( _upper < _lower ) { + _keys += _klen; + _trans += (unsigned int)_klen; + break; + } + + _mid = _lower + ((_upper-_lower) >> 1); + if ( ( (*( p))) < (*( _mid)) ) + _upper = _mid - 1; + else if ( ( (*( p))) > (*( _mid)) ) + _lower = _mid + 1; + else { + _trans += (unsigned int)(_mid - _keys); + goto _match; + } + } + } + + _klen = (int)_regex_range_lengths[cs]; + if ( _klen > 0 ) { + const char *_lower = _keys; + const char *_upper = _keys + (_klen<<1) - 2; + const char *_mid; + while ( 1 ) { + if ( _upper < _lower ) { + _trans += (unsigned int)_klen; + break; + } + + _mid = _lower + (((_upper-_lower) >> 1) & ~1); + if ( ( (*( p))) < (*( _mid)) ) + _upper = _mid - 2; + else if ( ( (*( p))) > (*( _mid + 1)) ) + _lower = _mid + 2; + else { + _trans += (unsigned int)((_mid - _keys)>>1); + break; + } + } + } + + _match: {} + } + _ckeys = ( _regex_cond_keys + (_regex_trans_offsets[_trans])); + _klen = (int)_regex_trans_lengths[_trans]; + _cond = (unsigned int)_regex_trans_offsets[_trans]; + + _cpc = 0; + switch ( _regex_trans_cond_spaces[_trans] ) { + + case 0: { + if ( ( mode.utf8 ) +#line 4293 "Parser.cpp" + ) _cpc += 1; + break; + } + case 1: { + if ( ( mode.ignore_space ) +#line 4298 "Parser.cpp" + ) _cpc += 1; + break; + } + case 2: { + if ( ( inCharClassEarly ) +#line 4303 "Parser.cpp" + ) _cpc += 1; + break; + } + } + { + const signed char *_lower = _ckeys; + const signed char *_upper = _ckeys + _klen - 1; + const signed char *_mid; + while ( 1 ) { + if ( _upper < _lower ) { + _cond = 3561; + + break; + } + + _mid = _lower + ((_upper-_lower) >> 1); + if ( _cpc < (int)(*( _mid)) ) + _upper = _mid - 1; + else if ( _cpc > (int)(*( _mid)) ) + _lower = _mid + 1; + else { + _cond += (unsigned int)(_mid - _ckeys); + + break; + } + } + } + cs = (int)_regex_cond_targs[_cond]; + + if ( _regex_cond_actions[_cond] != 0 ) { + + _acts = ( _regex_actions + (_regex_cond_actions[_cond])); + _nacts = (unsigned int)(*( _acts)); + _acts += 1; + while ( _nacts > 0 ) { + switch ( (*( _acts)) ) + { + case 0: { + { +#line 285 "Parser.rl" + label.clear();} + +#line 4345 "Parser.cpp" + + break; + } + case 1: { + { +#line 286 "Parser.rl" + label.push_back((( (*( p)))));} + +#line 4353 "Parser.cpp" + + break; + } + case 2: { + { +#line 287 "Parser.rl" + octAccumulator = 0;} + +#line 4361 "Parser.cpp" + + break; + } + case 3: { + { +#line 288 "Parser.rl" + accumulator = 0;} + +#line 4369 "Parser.cpp" + + break; + } + case 4: { + { +#line 289 "Parser.rl" + + octAccumulator = 0; + pushOct(&octAccumulator, (( (*( p))))); + } + +#line 4380 "Parser.cpp" + + break; + } + case 5: { + { +#line 293 "Parser.rl" + + accumulator = 0; + pushDec(&accumulator, (( (*( p))))); + } + +#line 4391 "Parser.cpp" + + break; + } + case 6: { + { +#line 297 "Parser.rl" + repeatN = 0; repeatM = 0; } + +#line 4399 "Parser.cpp" + + break; + } + case 7: { + { +#line 298 "Parser.rl" + pushDec(&repeatN, (( (*( p))))); } + +#line 4407 "Parser.cpp" + + break; + } + case 8: { + { +#line 299 "Parser.rl" + pushDec(&repeatM, (( (*( p))))); } + +#line 4415 "Parser.cpp" + + break; + } + case 9: { + { +#line 300 "Parser.rl" + pushOct(&octAccumulator, (( (*( p))))); } + +#line 4423 "Parser.cpp" + + break; + } + case 10: { + { +#line 301 "Parser.rl" + pushDec(&accumulator, (( (*( p))))); } + +#line 4431 "Parser.cpp" + + break; + } + case 11: { + { +#line 302 "Parser.rl" + + accumulator *= 16; + accumulator += (( (*( p)))) - '0'; + } + +#line 4442 "Parser.cpp" + + break; + } + case 12: { + { +#line 306 "Parser.rl" + + accumulator *= 16; + accumulator += 10 + (( (*( p)))) - 'a'; + } + +#line 4453 "Parser.cpp" + + break; + } + case 13: { + { +#line 310 "Parser.rl" + + accumulator *= 16; + accumulator += 10 + (( (*( p)))) - 'A'; + } + +#line 4464 "Parser.cpp" + + break; + } + case 14: { + { +#line 430 "Parser.rl" + + newMode = mode; + } + +#line 4474 "Parser.cpp" + + break; + } + case 15: { + { +#line 437 "Parser.rl" + + switch ((( (*( p))))) { + case 'i': + newMode.caseless = true; + break; + case 'm': + newMode.multiline = true; + break; + case 's': + newMode.dotall = true; + break; + case 'x': + newMode.ignore_space = true; + break; + default: + assert(0); // this action only called for [imsx] + break; + } + } + +#line 4500 "Parser.cpp" + + break; + } + case 16: { + { +#line 456 "Parser.rl" + + switch ((( (*( p))))) { + case 'i': + newMode.caseless = false; + break; + case 'm': + newMode.multiline = false; + break; + case 's': + newMode.dotall = false; + break; + case 'x': + newMode.ignore_space = false; + break; + default: + assert(0); // this action only called for [imsx] + break; + } + } + +#line 4526 "Parser.cpp" + + break; + } + case 17: { + { +#line 510 "Parser.rl" + repeatM = repeatN;} + +#line 4534 "Parser.cpp" + + break; + } + case 18: { + { +#line 510 "Parser.rl" + repeatM = ComponentRepeat::NoLimit;} + +#line 4542 "Parser.cpp" + + break; + } + case 19: { + { +#line 722 "Parser.rl" + negated = !negated; } + +#line 4550 "Parser.cpp" + + break; + } + case 20: { + { +#line 723 "Parser.rl" + {p = p - 1; } {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 790;goto _again;}} + +#line 4566 "Parser.cpp" + + break; + } + case 21: { + { +#line 724 "Parser.rl" + if (!inCharClass) { // not inside [..] + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + } + {top -= 1;cs = stack[top];goto _again;} + } + +#line 4579 "Parser.cpp" + + break; + } + case 22: { + { +#line 730 "Parser.rl" + throw LocatedParseError("Malformed property"); } + +#line 4587 "Parser.cpp" + + break; + } + case 25: { + { +#line 1 "NONE" + {te = p+1;}} + +#line 4595 "Parser.cpp" + + break; + } + case 26: { + { +#line 550 "Parser.rl" + {te = p+1;{ +#line 550 "Parser.rl" + + throw LocatedParseError("(*UTF8) must be at start of " + "expression, encountered"); + } + }} + +#line 4609 "Parser.cpp" + + break; + } + case 27: { + { +#line 554 "Parser.rl" + {te = p+1;{ +#line 554 "Parser.rl" + + throw LocatedParseError("(*UTF) must be at start of " + "expression, encountered"); + } + }} + +#line 4623 "Parser.cpp" + + break; + } + case 28: { + { +#line 558 "Parser.rl" + {te = p+1;{ +#line 558 "Parser.rl" + + throw LocatedParseError("(*UCP) must be at start of " + "expression, encountered"); + } + }} + +#line 4637 "Parser.cpp" + + break; + } + case 29: { + { +#line 564 "Parser.rl" + {te = p+1;{ +#line 564 "Parser.rl" + + ParseMode temp_mode; + assert(ts - 2 >= ptr); // parser needs the '(*' at the start too. + read_control_verbs(ts - 2, te, (ts - 2 - ptr), temp_mode); + assert(0); // Should have thrown a parse error. + throw LocatedParseError("Unknown control verb"); + } + }} + +#line 4654 "Parser.cpp" + + break; + } + case 30: { + { +#line 571 "Parser.rl" + {te = p+1;{ +#line 571 "Parser.rl" + + throw LocatedParseError("Unknown control verb"); + } + }} + +#line 4667 "Parser.cpp" + + break; + } + case 31: { + { +#line 571 "Parser.rl" + {te = p;p = p - 1;{ +#line 571 "Parser.rl" + + throw LocatedParseError("Unknown control verb"); + } + }} + +#line 4680 "Parser.cpp" + + break; + } + case 32: { + { +#line 571 "Parser.rl" + {p = ((te))-1; + { +#line 571 "Parser.rl" + + throw LocatedParseError("Unknown control verb"); + } + }} + +#line 4694 "Parser.cpp" + + break; + } + case 33: { + { +#line 581 "Parser.rl" + {te = p+1;{ +#line 581 "Parser.rl" + currentCls->add(CLASS_UCP_CC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4705 "Parser.cpp" + + break; + } + case 34: { + { +#line 582 "Parser.rl" + {te = p+1;{ +#line 582 "Parser.rl" + currentCls->add(CLASS_UCP_CF, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4716 "Parser.cpp" + + break; + } + case 35: { + { +#line 583 "Parser.rl" + {te = p+1;{ +#line 583 "Parser.rl" + currentCls->add(CLASS_UCP_CN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4727 "Parser.cpp" + + break; + } + case 36: { + { +#line 585 "Parser.rl" + {te = p+1;{ +#line 585 "Parser.rl" + currentCls->add(CLASS_UCP_CS, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4738 "Parser.cpp" + + break; + } + case 37: { + { +#line 587 "Parser.rl" + {te = p+1;{ +#line 587 "Parser.rl" + currentCls->add(CLASS_UCP_LL, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4749 "Parser.cpp" + + break; + } + case 38: { + { +#line 588 "Parser.rl" + {te = p+1;{ +#line 588 "Parser.rl" + currentCls->add(CLASS_UCP_LM, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4760 "Parser.cpp" + + break; + } + case 39: { + { +#line 589 "Parser.rl" + {te = p+1;{ +#line 589 "Parser.rl" + currentCls->add(CLASS_UCP_LO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4771 "Parser.cpp" + + break; + } + case 40: { + { +#line 590 "Parser.rl" + {te = p+1;{ +#line 590 "Parser.rl" + currentCls->add(CLASS_UCP_LT, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4782 "Parser.cpp" + + break; + } + case 41: { + { +#line 591 "Parser.rl" + {te = p+1;{ +#line 591 "Parser.rl" + currentCls->add(CLASS_UCP_LU, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4793 "Parser.cpp" + + break; + } + case 42: { + { +#line 592 "Parser.rl" + {te = p+1;{ +#line 592 "Parser.rl" + currentCls->add(CLASS_UCP_L_AND, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4804 "Parser.cpp" + + break; + } + case 43: { + { +#line 594 "Parser.rl" + {te = p+1;{ +#line 594 "Parser.rl" + currentCls->add(CLASS_UCP_MC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4815 "Parser.cpp" + + break; + } + case 44: { + { +#line 596 "Parser.rl" + {te = p+1;{ +#line 596 "Parser.rl" + currentCls->add(CLASS_UCP_MN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4826 "Parser.cpp" + + break; + } + case 45: { + { +#line 598 "Parser.rl" + {te = p+1;{ +#line 598 "Parser.rl" + currentCls->add(CLASS_UCP_ND, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4837 "Parser.cpp" + + break; + } + case 46: { + { +#line 599 "Parser.rl" + {te = p+1;{ +#line 599 "Parser.rl" + currentCls->add(CLASS_UCP_NL, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4848 "Parser.cpp" + + break; + } + case 47: { + { +#line 600 "Parser.rl" + {te = p+1;{ +#line 600 "Parser.rl" + currentCls->add(CLASS_UCP_NO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4859 "Parser.cpp" + + break; + } + case 48: { + { +#line 602 "Parser.rl" + {te = p+1;{ +#line 602 "Parser.rl" + currentCls->add(CLASS_UCP_PC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4870 "Parser.cpp" + + break; + } + case 49: { + { +#line 603 "Parser.rl" + {te = p+1;{ +#line 603 "Parser.rl" + currentCls->add(CLASS_UCP_PD, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4881 "Parser.cpp" + + break; + } + case 50: { + { +#line 604 "Parser.rl" + {te = p+1;{ +#line 604 "Parser.rl" + currentCls->add(CLASS_UCP_PE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4892 "Parser.cpp" + + break; + } + case 51: { + { +#line 605 "Parser.rl" + {te = p+1;{ +#line 605 "Parser.rl" + currentCls->add(CLASS_UCP_PF, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4903 "Parser.cpp" + + break; + } + case 52: { + { +#line 606 "Parser.rl" + {te = p+1;{ +#line 606 "Parser.rl" + currentCls->add(CLASS_UCP_PI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4914 "Parser.cpp" + + break; + } + case 53: { + { +#line 607 "Parser.rl" + {te = p+1;{ +#line 607 "Parser.rl" + currentCls->add(CLASS_UCP_PO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4925 "Parser.cpp" + + break; + } + case 54: { + { +#line 608 "Parser.rl" + {te = p+1;{ +#line 608 "Parser.rl" + currentCls->add(CLASS_UCP_PS, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4936 "Parser.cpp" + + break; + } + case 55: { + { +#line 610 "Parser.rl" + {te = p+1;{ +#line 610 "Parser.rl" + currentCls->add(CLASS_UCP_SC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4947 "Parser.cpp" + + break; + } + case 56: { + { +#line 611 "Parser.rl" + {te = p+1;{ +#line 611 "Parser.rl" + currentCls->add(CLASS_UCP_SK, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4958 "Parser.cpp" + + break; + } + case 57: { + { +#line 612 "Parser.rl" + {te = p+1;{ +#line 612 "Parser.rl" + currentCls->add(CLASS_UCP_SM, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4969 "Parser.cpp" + + break; + } + case 58: { + { +#line 613 "Parser.rl" + {te = p+1;{ +#line 613 "Parser.rl" + currentCls->add(CLASS_UCP_SO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4980 "Parser.cpp" + + break; + } + case 59: { + { +#line 615 "Parser.rl" + {te = p+1;{ +#line 615 "Parser.rl" + currentCls->add(CLASS_UCP_ZL, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4991 "Parser.cpp" + + break; + } + case 60: { + { +#line 616 "Parser.rl" + {te = p+1;{ +#line 616 "Parser.rl" + currentCls->add(CLASS_UCP_ZP, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5002 "Parser.cpp" + + break; + } + case 61: { + { +#line 617 "Parser.rl" + {te = p+1;{ +#line 617 "Parser.rl" + currentCls->add(CLASS_UCP_ZS, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5013 "Parser.cpp" + + break; + } + case 62: { + { +#line 618 "Parser.rl" + {te = p+1;{ +#line 618 "Parser.rl" + currentCls->add(CLASS_UCP_XAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5024 "Parser.cpp" + + break; + } + case 63: { + { +#line 619 "Parser.rl" + {te = p+1;{ +#line 619 "Parser.rl" + currentCls->add(CLASS_UCP_XPS, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5035 "Parser.cpp" + + break; + } + case 64: { + { +#line 620 "Parser.rl" + {te = p+1;{ +#line 620 "Parser.rl" + currentCls->add(CLASS_UCP_XSP, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5046 "Parser.cpp" + + break; + } + case 65: { + { +#line 621 "Parser.rl" + {te = p+1;{ +#line 621 "Parser.rl" + currentCls->add(CLASS_UCP_XWD, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5057 "Parser.cpp" + + break; + } + case 66: { + { +#line 622 "Parser.rl" + {te = p+1;{ +#line 622 "Parser.rl" + currentCls->add(CLASS_SCRIPT_ARABIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5068 "Parser.cpp" + + break; + } + case 67: { + { +#line 623 "Parser.rl" + {te = p+1;{ +#line 623 "Parser.rl" + currentCls->add(CLASS_SCRIPT_ARMENIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5079 "Parser.cpp" + + break; + } + case 68: { + { +#line 624 "Parser.rl" + {te = p+1;{ +#line 624 "Parser.rl" + currentCls->add(CLASS_SCRIPT_AVESTAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5090 "Parser.cpp" + + break; + } + case 69: { + { +#line 625 "Parser.rl" + {te = p+1;{ +#line 625 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BALINESE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5101 "Parser.cpp" + + break; + } + case 70: { + { +#line 626 "Parser.rl" + {te = p+1;{ +#line 626 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BAMUM, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5112 "Parser.cpp" + + break; + } + case 71: { + { +#line 627 "Parser.rl" + {te = p+1;{ +#line 627 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BATAK, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5123 "Parser.cpp" + + break; + } + case 72: { + { +#line 628 "Parser.rl" + {te = p+1;{ +#line 628 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BENGALI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5134 "Parser.cpp" + + break; + } + case 73: { + { +#line 629 "Parser.rl" + {te = p+1;{ +#line 629 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BOPOMOFO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5145 "Parser.cpp" + + break; + } + case 74: { + { +#line 630 "Parser.rl" + {te = p+1;{ +#line 630 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BRAHMI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5156 "Parser.cpp" + + break; + } + case 75: { + { +#line 631 "Parser.rl" + {te = p+1;{ +#line 631 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BRAILLE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5167 "Parser.cpp" + + break; + } + case 76: { + { +#line 632 "Parser.rl" + {te = p+1;{ +#line 632 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BUGINESE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5178 "Parser.cpp" + + break; + } + case 77: { + { +#line 633 "Parser.rl" + {te = p+1;{ +#line 633 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BUHID, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5189 "Parser.cpp" + + break; + } + case 78: { + { +#line 634 "Parser.rl" + {te = p+1;{ +#line 634 "Parser.rl" + currentCls->add(CLASS_SCRIPT_CANADIAN_ABORIGINAL, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5200 "Parser.cpp" + + break; + } + case 79: { + { +#line 635 "Parser.rl" + {te = p+1;{ +#line 635 "Parser.rl" + currentCls->add(CLASS_SCRIPT_CARIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5211 "Parser.cpp" + + break; + } + case 80: { + { +#line 636 "Parser.rl" + {te = p+1;{ +#line 636 "Parser.rl" + currentCls->add(CLASS_SCRIPT_CHAM, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5222 "Parser.cpp" + + break; + } + case 81: { + { +#line 637 "Parser.rl" + {te = p+1;{ +#line 637 "Parser.rl" + currentCls->add(CLASS_SCRIPT_CHEROKEE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5233 "Parser.cpp" + + break; + } + case 82: { + { +#line 638 "Parser.rl" + {te = p+1;{ +#line 638 "Parser.rl" + currentCls->add(CLASS_SCRIPT_COMMON, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5244 "Parser.cpp" + + break; + } + case 83: { + { +#line 639 "Parser.rl" + {te = p+1;{ +#line 639 "Parser.rl" + currentCls->add(CLASS_SCRIPT_COPTIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5255 "Parser.cpp" + + break; + } + case 84: { + { +#line 640 "Parser.rl" + {te = p+1;{ +#line 640 "Parser.rl" + currentCls->add(CLASS_SCRIPT_CUNEIFORM, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5266 "Parser.cpp" + + break; + } + case 85: { + { +#line 641 "Parser.rl" + {te = p+1;{ +#line 641 "Parser.rl" + currentCls->add(CLASS_SCRIPT_CYPRIOT, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5277 "Parser.cpp" + + break; + } + case 86: { + { +#line 642 "Parser.rl" + {te = p+1;{ +#line 642 "Parser.rl" + currentCls->add(CLASS_SCRIPT_CYRILLIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5288 "Parser.cpp" + + break; + } + case 87: { + { +#line 643 "Parser.rl" + {te = p+1;{ +#line 643 "Parser.rl" + currentCls->add(CLASS_SCRIPT_DESERET, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5299 "Parser.cpp" + + break; + } + case 88: { + { +#line 644 "Parser.rl" + {te = p+1;{ +#line 644 "Parser.rl" + currentCls->add(CLASS_SCRIPT_DEVANAGARI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5310 "Parser.cpp" + + break; + } + case 89: { + { +#line 645 "Parser.rl" + {te = p+1;{ +#line 645 "Parser.rl" + currentCls->add(CLASS_SCRIPT_EGYPTIAN_HIEROGLYPHS, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5321 "Parser.cpp" + + break; + } + case 90: { + { +#line 646 "Parser.rl" + {te = p+1;{ +#line 646 "Parser.rl" + currentCls->add(CLASS_SCRIPT_ETHIOPIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5332 "Parser.cpp" + + break; + } + case 91: { + { +#line 647 "Parser.rl" + {te = p+1;{ +#line 647 "Parser.rl" + currentCls->add(CLASS_SCRIPT_GEORGIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5343 "Parser.cpp" + + break; + } + case 92: { + { +#line 648 "Parser.rl" + {te = p+1;{ +#line 648 "Parser.rl" + currentCls->add(CLASS_SCRIPT_GLAGOLITIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5354 "Parser.cpp" + + break; + } + case 93: { + { +#line 649 "Parser.rl" + {te = p+1;{ +#line 649 "Parser.rl" + currentCls->add(CLASS_SCRIPT_GOTHIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5365 "Parser.cpp" + + break; + } + case 94: { + { +#line 650 "Parser.rl" + {te = p+1;{ +#line 650 "Parser.rl" + currentCls->add(CLASS_SCRIPT_GREEK, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5376 "Parser.cpp" + + break; + } + case 95: { + { +#line 651 "Parser.rl" + {te = p+1;{ +#line 651 "Parser.rl" + currentCls->add(CLASS_SCRIPT_GUJARATI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5387 "Parser.cpp" + + break; + } + case 96: { + { +#line 652 "Parser.rl" + {te = p+1;{ +#line 652 "Parser.rl" + currentCls->add(CLASS_SCRIPT_GURMUKHI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5398 "Parser.cpp" + + break; + } + case 97: { + { +#line 654 "Parser.rl" + {te = p+1;{ +#line 654 "Parser.rl" + currentCls->add(CLASS_SCRIPT_HANGUL, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5409 "Parser.cpp" + + break; + } + case 98: { + { +#line 655 "Parser.rl" + {te = p+1;{ +#line 655 "Parser.rl" + currentCls->add(CLASS_SCRIPT_HANUNOO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5420 "Parser.cpp" + + break; + } + case 99: { + { +#line 656 "Parser.rl" + {te = p+1;{ +#line 656 "Parser.rl" + currentCls->add(CLASS_SCRIPT_HEBREW, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5431 "Parser.cpp" + + break; + } + case 100: { + { +#line 657 "Parser.rl" + {te = p+1;{ +#line 657 "Parser.rl" + currentCls->add(CLASS_SCRIPT_HIRAGANA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5442 "Parser.cpp" + + break; + } + case 101: { + { +#line 658 "Parser.rl" + {te = p+1;{ +#line 658 "Parser.rl" + currentCls->add(CLASS_SCRIPT_IMPERIAL_ARAMAIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5453 "Parser.cpp" + + break; + } + case 102: { + { +#line 659 "Parser.rl" + {te = p+1;{ +#line 659 "Parser.rl" + currentCls->add(CLASS_SCRIPT_INHERITED, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5464 "Parser.cpp" + + break; + } + case 103: { + { +#line 660 "Parser.rl" + {te = p+1;{ +#line 660 "Parser.rl" + currentCls->add(CLASS_SCRIPT_INSCRIPTIONAL_PAHLAVI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5475 "Parser.cpp" + + break; + } + case 104: { + { +#line 661 "Parser.rl" + {te = p+1;{ +#line 661 "Parser.rl" + currentCls->add(CLASS_SCRIPT_INSCRIPTIONAL_PARTHIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5486 "Parser.cpp" + + break; + } + case 105: { + { +#line 662 "Parser.rl" + {te = p+1;{ +#line 662 "Parser.rl" + currentCls->add(CLASS_SCRIPT_JAVANESE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5497 "Parser.cpp" + + break; + } + case 106: { + { +#line 663 "Parser.rl" + {te = p+1;{ +#line 663 "Parser.rl" + currentCls->add(CLASS_SCRIPT_KAITHI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5508 "Parser.cpp" + + break; + } + case 107: { + { +#line 664 "Parser.rl" + {te = p+1;{ +#line 664 "Parser.rl" + currentCls->add(CLASS_SCRIPT_KANNADA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5519 "Parser.cpp" + + break; + } + case 108: { + { +#line 665 "Parser.rl" + {te = p+1;{ +#line 665 "Parser.rl" + currentCls->add(CLASS_SCRIPT_KATAKANA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5530 "Parser.cpp" + + break; + } + case 109: { + { +#line 666 "Parser.rl" + {te = p+1;{ +#line 666 "Parser.rl" + currentCls->add(CLASS_SCRIPT_KAYAH_LI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5541 "Parser.cpp" + + break; + } + case 110: { + { +#line 667 "Parser.rl" + {te = p+1;{ +#line 667 "Parser.rl" + currentCls->add(CLASS_SCRIPT_KHAROSHTHI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5552 "Parser.cpp" + + break; + } + case 111: { + { +#line 668 "Parser.rl" + {te = p+1;{ +#line 668 "Parser.rl" + currentCls->add(CLASS_SCRIPT_KHMER, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5563 "Parser.cpp" + + break; + } + case 112: { + { +#line 669 "Parser.rl" + {te = p+1;{ +#line 669 "Parser.rl" + currentCls->add(CLASS_SCRIPT_LAO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5574 "Parser.cpp" + + break; + } + case 113: { + { +#line 670 "Parser.rl" + {te = p+1;{ +#line 670 "Parser.rl" + currentCls->add(CLASS_SCRIPT_LATIN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5585 "Parser.cpp" + + break; + } + case 114: { + { +#line 671 "Parser.rl" + {te = p+1;{ +#line 671 "Parser.rl" + currentCls->add(CLASS_SCRIPT_LEPCHA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5596 "Parser.cpp" + + break; + } + case 115: { + { +#line 672 "Parser.rl" + {te = p+1;{ +#line 672 "Parser.rl" + currentCls->add(CLASS_SCRIPT_LIMBU, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5607 "Parser.cpp" + + break; + } + case 116: { + { +#line 673 "Parser.rl" + {te = p+1;{ +#line 673 "Parser.rl" + currentCls->add(CLASS_SCRIPT_LINEAR_B, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5618 "Parser.cpp" + + break; + } + case 117: { + { +#line 674 "Parser.rl" + {te = p+1;{ +#line 674 "Parser.rl" + currentCls->add(CLASS_SCRIPT_LISU, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5629 "Parser.cpp" + + break; + } + case 118: { + { +#line 675 "Parser.rl" + {te = p+1;{ +#line 675 "Parser.rl" + currentCls->add(CLASS_SCRIPT_LYCIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5640 "Parser.cpp" + + break; + } + case 119: { + { +#line 676 "Parser.rl" + {te = p+1;{ +#line 676 "Parser.rl" + currentCls->add(CLASS_SCRIPT_LYDIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5651 "Parser.cpp" + + break; + } + case 120: { + { +#line 677 "Parser.rl" + {te = p+1;{ +#line 677 "Parser.rl" + currentCls->add(CLASS_SCRIPT_MALAYALAM, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5662 "Parser.cpp" + + break; + } + case 121: { + { +#line 678 "Parser.rl" + {te = p+1;{ +#line 678 "Parser.rl" + currentCls->add(CLASS_SCRIPT_MANDAIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5673 "Parser.cpp" + + break; + } + case 122: { + { +#line 679 "Parser.rl" + {te = p+1;{ +#line 679 "Parser.rl" + currentCls->add(CLASS_SCRIPT_MEETEI_MAYEK, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5684 "Parser.cpp" + + break; + } + case 123: { + { +#line 680 "Parser.rl" + {te = p+1;{ +#line 680 "Parser.rl" + currentCls->add(CLASS_SCRIPT_MONGOLIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5695 "Parser.cpp" + + break; + } + case 124: { + { +#line 681 "Parser.rl" + {te = p+1;{ +#line 681 "Parser.rl" + currentCls->add(CLASS_SCRIPT_MYANMAR, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5706 "Parser.cpp" + + break; + } + case 125: { + { +#line 682 "Parser.rl" + {te = p+1;{ +#line 682 "Parser.rl" + currentCls->add(CLASS_SCRIPT_NEW_TAI_LUE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5717 "Parser.cpp" + + break; + } + case 126: { + { +#line 683 "Parser.rl" + {te = p+1;{ +#line 683 "Parser.rl" + currentCls->add(CLASS_SCRIPT_NKO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5728 "Parser.cpp" + + break; + } + case 127: { + { +#line 684 "Parser.rl" + {te = p+1;{ +#line 684 "Parser.rl" + currentCls->add(CLASS_SCRIPT_OGHAM, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5739 "Parser.cpp" + + break; + } + case 128: { + { +#line 685 "Parser.rl" + {te = p+1;{ +#line 685 "Parser.rl" + currentCls->add(CLASS_SCRIPT_OL_CHIKI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5750 "Parser.cpp" + + break; + } + case 129: { + { +#line 686 "Parser.rl" + {te = p+1;{ +#line 686 "Parser.rl" + currentCls->add(CLASS_SCRIPT_OLD_ITALIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5761 "Parser.cpp" + + break; + } + case 130: { + { +#line 687 "Parser.rl" + {te = p+1;{ +#line 687 "Parser.rl" + currentCls->add(CLASS_SCRIPT_OLD_PERSIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5772 "Parser.cpp" + + break; + } + case 131: { + { +#line 688 "Parser.rl" + {te = p+1;{ +#line 688 "Parser.rl" + currentCls->add(CLASS_SCRIPT_OLD_SOUTH_ARABIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5783 "Parser.cpp" + + break; + } + case 132: { + { +#line 689 "Parser.rl" + {te = p+1;{ +#line 689 "Parser.rl" + currentCls->add(CLASS_SCRIPT_OLD_TURKIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5794 "Parser.cpp" + + break; + } + case 133: { + { +#line 690 "Parser.rl" + {te = p+1;{ +#line 690 "Parser.rl" + currentCls->add(CLASS_SCRIPT_ORIYA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5805 "Parser.cpp" + + break; + } + case 134: { + { +#line 691 "Parser.rl" + {te = p+1;{ +#line 691 "Parser.rl" + currentCls->add(CLASS_SCRIPT_OSMANYA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5816 "Parser.cpp" + + break; + } + case 135: { + { +#line 692 "Parser.rl" + {te = p+1;{ +#line 692 "Parser.rl" + currentCls->add(CLASS_SCRIPT_PHAGS_PA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5827 "Parser.cpp" + + break; + } + case 136: { + { +#line 693 "Parser.rl" + {te = p+1;{ +#line 693 "Parser.rl" + currentCls->add(CLASS_SCRIPT_PHOENICIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5838 "Parser.cpp" + + break; + } + case 137: { + { +#line 694 "Parser.rl" + {te = p+1;{ +#line 694 "Parser.rl" + currentCls->add(CLASS_SCRIPT_REJANG, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5849 "Parser.cpp" + + break; + } + case 138: { + { +#line 695 "Parser.rl" + {te = p+1;{ +#line 695 "Parser.rl" + currentCls->add(CLASS_SCRIPT_RUNIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5860 "Parser.cpp" + + break; + } + case 139: { + { +#line 696 "Parser.rl" + {te = p+1;{ +#line 696 "Parser.rl" + currentCls->add(CLASS_SCRIPT_SAMARITAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5871 "Parser.cpp" + + break; + } + case 140: { + { +#line 697 "Parser.rl" + {te = p+1;{ +#line 697 "Parser.rl" + currentCls->add(CLASS_SCRIPT_SAURASHTRA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5882 "Parser.cpp" + + break; + } + case 141: { + { +#line 698 "Parser.rl" + {te = p+1;{ +#line 698 "Parser.rl" + currentCls->add(CLASS_SCRIPT_SHAVIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5893 "Parser.cpp" + + break; + } + case 142: { + { +#line 699 "Parser.rl" + {te = p+1;{ +#line 699 "Parser.rl" + currentCls->add(CLASS_SCRIPT_SINHALA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5904 "Parser.cpp" + + break; + } + case 143: { + { +#line 700 "Parser.rl" + {te = p+1;{ +#line 700 "Parser.rl" + currentCls->add(CLASS_SCRIPT_SUNDANESE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5915 "Parser.cpp" + + break; + } + case 144: { + { +#line 701 "Parser.rl" + {te = p+1;{ +#line 701 "Parser.rl" + currentCls->add(CLASS_SCRIPT_SYLOTI_NAGRI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5926 "Parser.cpp" + + break; + } + case 145: { + { +#line 702 "Parser.rl" + {te = p+1;{ +#line 702 "Parser.rl" + currentCls->add(CLASS_SCRIPT_SYRIAC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5937 "Parser.cpp" + + break; + } + case 146: { + { +#line 703 "Parser.rl" + {te = p+1;{ +#line 703 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TAGALOG, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5948 "Parser.cpp" + + break; + } + case 147: { + { +#line 704 "Parser.rl" + {te = p+1;{ +#line 704 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TAGBANWA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5959 "Parser.cpp" + + break; + } + case 148: { + { +#line 705 "Parser.rl" + {te = p+1;{ +#line 705 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TAI_LE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5970 "Parser.cpp" + + break; + } + case 149: { + { +#line 706 "Parser.rl" + {te = p+1;{ +#line 706 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TAI_THAM, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5981 "Parser.cpp" + + break; + } + case 150: { + { +#line 707 "Parser.rl" + {te = p+1;{ +#line 707 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TAI_VIET, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5992 "Parser.cpp" + + break; + } + case 151: { + { +#line 708 "Parser.rl" + {te = p+1;{ +#line 708 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TAMIL, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6003 "Parser.cpp" + + break; + } + case 152: { + { +#line 709 "Parser.rl" + {te = p+1;{ +#line 709 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TELUGU, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6014 "Parser.cpp" + + break; + } + case 153: { + { +#line 710 "Parser.rl" + {te = p+1;{ +#line 710 "Parser.rl" + currentCls->add(CLASS_SCRIPT_THAANA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6025 "Parser.cpp" + + break; + } + case 154: { + { +#line 711 "Parser.rl" + {te = p+1;{ +#line 711 "Parser.rl" + currentCls->add(CLASS_SCRIPT_THAI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6036 "Parser.cpp" + + break; + } + case 155: { + { +#line 712 "Parser.rl" + {te = p+1;{ +#line 712 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TIBETAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6047 "Parser.cpp" + + break; + } + case 156: { + { +#line 713 "Parser.rl" + {te = p+1;{ +#line 713 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TIFINAGH, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6058 "Parser.cpp" + + break; + } + case 157: { + { +#line 714 "Parser.rl" + {te = p+1;{ +#line 714 "Parser.rl" + currentCls->add(CLASS_SCRIPT_UGARITIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6069 "Parser.cpp" + + break; + } + case 158: { + { +#line 715 "Parser.rl" + {te = p+1;{ +#line 715 "Parser.rl" + currentCls->add(CLASS_SCRIPT_VAI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6080 "Parser.cpp" + + break; + } + case 159: { + { +#line 716 "Parser.rl" + {te = p+1;{ +#line 716 "Parser.rl" + currentCls->add(CLASS_SCRIPT_YI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6091 "Parser.cpp" + + break; + } + case 160: { + { +#line 717 "Parser.rl" + {te = p+1;{ +#line 717 "Parser.rl" + currentCls->add(CLASS_UCP_ANY, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6102 "Parser.cpp" + + break; + } + case 161: { + { +#line 718 "Parser.rl" + {te = p+1;{ +#line 718 "Parser.rl" + throw LocatedParseError("Unknown property"); } + }} + +#line 6113 "Parser.cpp" + + break; + } + case 162: { + { +#line 580 "Parser.rl" + {te = p;p = p - 1;{ +#line 580 "Parser.rl" + currentCls->add(CLASS_UCP_C, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6124 "Parser.cpp" + + break; + } + case 163: { + { +#line 584 "Parser.rl" + {te = p;p = p - 1;{ +#line 584 "Parser.rl" + currentCls->add(CLASS_UCP_CO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6135 "Parser.cpp" + + break; + } + case 164: { + { +#line 586 "Parser.rl" + {te = p;p = p - 1;{ +#line 586 "Parser.rl" + currentCls->add(CLASS_UCP_L, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6146 "Parser.cpp" + + break; + } + case 165: { + { +#line 593 "Parser.rl" + {te = p;p = p - 1;{ +#line 593 "Parser.rl" + currentCls->add(CLASS_UCP_M, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6157 "Parser.cpp" + + break; + } + case 166: { + { +#line 595 "Parser.rl" + {te = p;p = p - 1;{ +#line 595 "Parser.rl" + currentCls->add(CLASS_UCP_ME, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6168 "Parser.cpp" + + break; + } + case 167: { + { +#line 597 "Parser.rl" + {te = p;p = p - 1;{ +#line 597 "Parser.rl" + currentCls->add(CLASS_UCP_N, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6179 "Parser.cpp" + + break; + } + case 168: { + { +#line 601 "Parser.rl" + {te = p;p = p - 1;{ +#line 601 "Parser.rl" + currentCls->add(CLASS_UCP_P, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6190 "Parser.cpp" + + break; + } + case 169: { + { +#line 609 "Parser.rl" + {te = p;p = p - 1;{ +#line 609 "Parser.rl" + currentCls->add(CLASS_UCP_S, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6201 "Parser.cpp" + + break; + } + case 170: { + { +#line 614 "Parser.rl" + {te = p;p = p - 1;{ +#line 614 "Parser.rl" + currentCls->add(CLASS_UCP_Z, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6212 "Parser.cpp" + + break; + } + case 171: { + { +#line 653 "Parser.rl" + {te = p;p = p - 1;{ +#line 653 "Parser.rl" + currentCls->add(CLASS_SCRIPT_HAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6223 "Parser.cpp" + + break; + } + case 172: { + { +#line 718 "Parser.rl" + {te = p;p = p - 1;{ +#line 718 "Parser.rl" + throw LocatedParseError("Unknown property"); } + }} + +#line 6234 "Parser.cpp" + + break; + } + case 173: { + { +#line 580 "Parser.rl" + {p = ((te))-1; + { +#line 580 "Parser.rl" + currentCls->add(CLASS_UCP_C, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6246 "Parser.cpp" + + break; + } + case 174: { + { +#line 584 "Parser.rl" + {p = ((te))-1; + { +#line 584 "Parser.rl" + currentCls->add(CLASS_UCP_CO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6258 "Parser.cpp" + + break; + } + case 175: { + { +#line 586 "Parser.rl" + {p = ((te))-1; + { +#line 586 "Parser.rl" + currentCls->add(CLASS_UCP_L, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6270 "Parser.cpp" + + break; + } + case 176: { + { +#line 593 "Parser.rl" + {p = ((te))-1; + { +#line 593 "Parser.rl" + currentCls->add(CLASS_UCP_M, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6282 "Parser.cpp" + + break; + } + case 177: { + { +#line 595 "Parser.rl" + {p = ((te))-1; + { +#line 595 "Parser.rl" + currentCls->add(CLASS_UCP_ME, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6294 "Parser.cpp" + + break; + } + case 178: { + { +#line 597 "Parser.rl" + {p = ((te))-1; + { +#line 597 "Parser.rl" + currentCls->add(CLASS_UCP_N, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6306 "Parser.cpp" + + break; + } + case 179: { + { +#line 601 "Parser.rl" + {p = ((te))-1; + { +#line 601 "Parser.rl" + currentCls->add(CLASS_UCP_P, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6318 "Parser.cpp" + + break; + } + case 180: { + { +#line 609 "Parser.rl" + {p = ((te))-1; + { +#line 609 "Parser.rl" + currentCls->add(CLASS_UCP_S, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6330 "Parser.cpp" + + break; + } + case 181: { + { +#line 653 "Parser.rl" + {p = ((te))-1; + { +#line 653 "Parser.rl" + currentCls->add(CLASS_SCRIPT_HAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6342 "Parser.cpp" + + break; + } + case 182: { + { +#line 718 "Parser.rl" + {p = ((te))-1; + { +#line 718 "Parser.rl" + throw LocatedParseError("Unknown property"); } + }} + +#line 6354 "Parser.cpp" + + break; + } + case 183: { + { +#line 733 "Parser.rl" + {te = p+1;{ +#line 733 "Parser.rl" + + currentCls->add(CLASS_UCP_C, negated); + if (!inCharClass) { + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + } + {top -= 1;cs = stack[top];goto _again;} + } + }} + +#line 6372 "Parser.cpp" + + break; + } + case 184: { + { +#line 741 "Parser.rl" + {te = p+1;{ +#line 741 "Parser.rl" + + currentCls->add(CLASS_UCP_L, negated); + if (!inCharClass) { + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + } + {top -= 1;cs = stack[top];goto _again;} + } + }} + +#line 6390 "Parser.cpp" + + break; + } + case 185: { + { +#line 749 "Parser.rl" + {te = p+1;{ +#line 749 "Parser.rl" + + currentCls->add(CLASS_UCP_M, negated); + if (!inCharClass) { + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + } + {top -= 1;cs = stack[top];goto _again;} + } + }} + +#line 6408 "Parser.cpp" + + break; + } + case 186: { + { +#line 757 "Parser.rl" + {te = p+1;{ +#line 757 "Parser.rl" + + currentCls->add(CLASS_UCP_N, negated); + if (!inCharClass) { + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + } + {top -= 1;cs = stack[top];goto _again;} + } + }} + +#line 6426 "Parser.cpp" + + break; + } + case 187: { + { +#line 765 "Parser.rl" + {te = p+1;{ +#line 765 "Parser.rl" + + currentCls->add(CLASS_UCP_P, negated); + if (!inCharClass) { + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + } + {top -= 1;cs = stack[top];goto _again;} + } + }} + +#line 6444 "Parser.cpp" + + break; + } + case 188: { + { +#line 773 "Parser.rl" + {te = p+1;{ +#line 773 "Parser.rl" + + currentCls->add(CLASS_UCP_S, negated); + if (!inCharClass) { + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + } + {top -= 1;cs = stack[top];goto _again;} + } + }} + +#line 6462 "Parser.cpp" + + break; + } + case 189: { + { +#line 781 "Parser.rl" + {te = p+1;{ +#line 781 "Parser.rl" + + currentCls->add(CLASS_UCP_Z, negated); + if (!inCharClass) { + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + } + {top -= 1;cs = stack[top];goto _again;} + } + }} + +#line 6480 "Parser.cpp" + + break; + } + case 190: { + { +#line 790 "Parser.rl" + {te = p+1;{ +#line 790 "Parser.rl" + throw LocatedParseError("Unknown property"); } + }} + +#line 6491 "Parser.cpp" + + break; + } + case 191: { + { +#line 796 "Parser.rl" + {te = p+1;{ +#line 796 "Parser.rl" + + throw LocatedParseError("Unsupported POSIX collating " + "element"); + } + }} + +#line 6505 "Parser.cpp" + + break; + } + case 192: { + { +#line 803 "Parser.rl" + {te = p+1;{ +#line 803 "Parser.rl" + + currentCls->add(CLASS_ALNUM, false); + } + }} + +#line 6518 "Parser.cpp" + + break; + } + case 193: { + { +#line 806 "Parser.rl" + {te = p+1;{ +#line 806 "Parser.rl" + + currentCls->add(CLASS_ALNUM, true); + } + }} + +#line 6531 "Parser.cpp" + + break; + } + case 194: { + { +#line 809 "Parser.rl" + {te = p+1;{ +#line 809 "Parser.rl" + + currentCls->add(CLASS_ALPHA, false); + } + }} + +#line 6544 "Parser.cpp" + + break; + } + case 195: { + { +#line 812 "Parser.rl" + {te = p+1;{ +#line 812 "Parser.rl" + + currentCls->add(CLASS_ALPHA, true); + } + }} + +#line 6557 "Parser.cpp" + + break; + } + case 196: { + { +#line 815 "Parser.rl" + {te = p+1;{ +#line 815 "Parser.rl" + + currentCls->add(CLASS_ASCII, false); + } + }} + +#line 6570 "Parser.cpp" + + break; + } + case 197: { + { +#line 818 "Parser.rl" + {te = p+1;{ +#line 818 "Parser.rl" + + currentCls->add(CLASS_ASCII, true); + } + }} + +#line 6583 "Parser.cpp" + + break; + } + case 198: { + { +#line 821 "Parser.rl" + {te = p+1;{ +#line 821 "Parser.rl" + + currentCls->add(CLASS_BLANK, false); + } + }} + +#line 6596 "Parser.cpp" + + break; + } + case 199: { + { +#line 824 "Parser.rl" + {te = p+1;{ +#line 824 "Parser.rl" + + currentCls->add(CLASS_BLANK, true); + } + }} + +#line 6609 "Parser.cpp" + + break; + } + case 200: { + { +#line 827 "Parser.rl" + {te = p+1;{ +#line 827 "Parser.rl" + + currentCls->add(CLASS_CNTRL, false); + } + }} + +#line 6622 "Parser.cpp" + + break; + } + case 201: { + { +#line 830 "Parser.rl" + {te = p+1;{ +#line 830 "Parser.rl" + + currentCls->add(CLASS_CNTRL, true); + } + }} + +#line 6635 "Parser.cpp" + + break; + } + case 202: { + { +#line 833 "Parser.rl" + {te = p+1;{ +#line 833 "Parser.rl" + + currentCls->add(CLASS_DIGIT, false); + } + }} + +#line 6648 "Parser.cpp" + + break; + } + case 203: { + { +#line 836 "Parser.rl" + {te = p+1;{ +#line 836 "Parser.rl" + + currentCls->add(CLASS_DIGIT, true); + } + }} + +#line 6661 "Parser.cpp" + + break; + } + case 204: { + { +#line 839 "Parser.rl" + {te = p+1;{ +#line 839 "Parser.rl" + + currentCls->add(CLASS_GRAPH, false); + } + }} + +#line 6674 "Parser.cpp" + + break; + } + case 205: { + { +#line 842 "Parser.rl" + {te = p+1;{ +#line 842 "Parser.rl" + + currentCls->add(CLASS_GRAPH, true); + } + }} + +#line 6687 "Parser.cpp" + + break; + } + case 206: { + { +#line 845 "Parser.rl" + {te = p+1;{ +#line 845 "Parser.rl" + + currentCls->add(CLASS_LOWER, false); + } + }} + +#line 6700 "Parser.cpp" + + break; + } + case 207: { + { +#line 848 "Parser.rl" + {te = p+1;{ +#line 848 "Parser.rl" + + currentCls->add(CLASS_LOWER, true); + } + }} + +#line 6713 "Parser.cpp" + + break; + } + case 208: { + { +#line 851 "Parser.rl" + {te = p+1;{ +#line 851 "Parser.rl" + + currentCls->add(CLASS_PRINT, false); + } + }} + +#line 6726 "Parser.cpp" + + break; + } + case 209: { + { +#line 854 "Parser.rl" + {te = p+1;{ +#line 854 "Parser.rl" + + currentCls->add(CLASS_PRINT, true); + } + }} + +#line 6739 "Parser.cpp" + + break; + } + case 210: { + { +#line 857 "Parser.rl" + {te = p+1;{ +#line 857 "Parser.rl" + + currentCls->add(CLASS_PUNCT, false); + } + }} + +#line 6752 "Parser.cpp" + + break; + } + case 211: { + { +#line 860 "Parser.rl" + {te = p+1;{ +#line 860 "Parser.rl" + + currentCls->add(CLASS_PUNCT, true); + } + }} + +#line 6765 "Parser.cpp" + + break; + } + case 212: { + { +#line 864 "Parser.rl" + {te = p+1;{ +#line 864 "Parser.rl" + + currentCls->add(CLASS_SPACE, false); + } + }} + +#line 6778 "Parser.cpp" + + break; + } + case 213: { + { +#line 867 "Parser.rl" + {te = p+1;{ +#line 867 "Parser.rl" + + currentCls->add(CLASS_SPACE, true); + } + }} + +#line 6791 "Parser.cpp" + + break; + } + case 214: { + { +#line 870 "Parser.rl" + {te = p+1;{ +#line 870 "Parser.rl" + + currentCls->add(CLASS_UPPER, false); + } + }} + +#line 6804 "Parser.cpp" + + break; + } + case 215: { + { +#line 873 "Parser.rl" + {te = p+1;{ +#line 873 "Parser.rl" + + currentCls->add(CLASS_UPPER, true); + } + }} + +#line 6817 "Parser.cpp" + + break; + } + case 216: { + { +#line 876 "Parser.rl" + {te = p+1;{ +#line 876 "Parser.rl" + + currentCls->add(CLASS_WORD, false); + } + }} + +#line 6830 "Parser.cpp" + + break; + } + case 217: { + { +#line 879 "Parser.rl" + {te = p+1;{ +#line 879 "Parser.rl" + + currentCls->add(CLASS_WORD, true); + } + }} + +#line 6843 "Parser.cpp" + + break; + } + case 218: { + { +#line 882 "Parser.rl" + {te = p+1;{ +#line 882 "Parser.rl" + + currentCls->add(CLASS_XDIGIT, false); + } + }} + +#line 6856 "Parser.cpp" + + break; + } + case 219: { + { +#line 885 "Parser.rl" + {te = p+1;{ +#line 885 "Parser.rl" + + currentCls->add(CLASS_XDIGIT, true); + } + }} + +#line 6869 "Parser.cpp" + + break; + } + case 220: { + { +#line 890 "Parser.rl" + {te = p+1;{ +#line 890 "Parser.rl" + + throw LocatedParseError("Invalid POSIX named class"); + } + }} + +#line 6882 "Parser.cpp" + + break; + } + case 221: { + { +#line 893 "Parser.rl" + {te = p+1;{ +#line 893 "Parser.rl" + + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 843;goto _again;}} + }} + +#line 6902 "Parser.cpp" + + break; + } + case 222: { + { +#line 896 "Parser.rl" + {te = p+1;{ +#line 896 "Parser.rl" + /*noop*/} + }} + +#line 6913 "Parser.cpp" + + break; + } + case 223: { + { +#line 898 "Parser.rl" + {te = p+1;{ +#line 898 "Parser.rl" + + currentCls->add('\x08'); + } + }} + +#line 6926 "Parser.cpp" + + break; + } + case 224: { + { +#line 902 "Parser.rl" + {te = p+1;{ +#line 902 "Parser.rl" + + currentCls->add('\x09'); + } + }} + +#line 6939 "Parser.cpp" + + break; + } + case 225: { + { +#line 906 "Parser.rl" + {te = p+1;{ +#line 906 "Parser.rl" + + currentCls->add('\x0a'); + } + }} + +#line 6952 "Parser.cpp" + + break; + } + case 226: { + { +#line 910 "Parser.rl" + {te = p+1;{ +#line 910 "Parser.rl" + + currentCls->add('\x0d'); + } + }} + +#line 6965 "Parser.cpp" + + break; + } + case 227: { + { +#line 914 "Parser.rl" + {te = p+1;{ +#line 914 "Parser.rl" + + currentCls->add('\x0c'); + } + }} + +#line 6978 "Parser.cpp" + + break; + } + case 228: { + { +#line 918 "Parser.rl" + {te = p+1;{ +#line 918 "Parser.rl" + + currentCls->add('\x07'); + } + }} + +#line 6991 "Parser.cpp" + + break; + } + case 229: { + { +#line 922 "Parser.rl" + {te = p+1;{ +#line 922 "Parser.rl" + + currentCls->add('\x1b'); + } + }} + +#line 7004 "Parser.cpp" + + break; + } + case 230: { + { +#line 926 "Parser.rl" + {te = p+1;{ +#line 926 "Parser.rl" + + currentCls->add(CLASS_HORZ, false); + } + }} + +#line 7017 "Parser.cpp" + + break; + } + case 231: { + { +#line 930 "Parser.rl" + {te = p+1;{ +#line 930 "Parser.rl" + + currentCls->add(CLASS_HORZ, true); + } + }} + +#line 7030 "Parser.cpp" + + break; + } + case 232: { + { +#line 934 "Parser.rl" + {te = p+1;{ +#line 934 "Parser.rl" + + currentCls->add(CLASS_VERT, false); + } + }} + +#line 7043 "Parser.cpp" + + break; + } + case 233: { + { +#line 938 "Parser.rl" + {te = p+1;{ +#line 938 "Parser.rl" + + currentCls->add(CLASS_VERT, true); + } + }} + +#line 7056 "Parser.cpp" + + break; + } + case 234: { + { +#line 942 "Parser.rl" + {te = p+1;{ +#line 942 "Parser.rl" + + negated = false; + {p = p - 1; } + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 559;goto _again;}} + }} + +#line 7078 "Parser.cpp" + + break; + } + case 235: { + { +#line 948 "Parser.rl" + {te = p+1;{ +#line 948 "Parser.rl" + + negated = false; + {p = p - 1; } + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 818;goto _again;}} + }} + +#line 7100 "Parser.cpp" + + break; + } + case 236: { + { +#line 954 "Parser.rl" + {te = p+1;{ +#line 954 "Parser.rl" + + negated = true; + {p = p - 1; } + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 559;goto _again;}} + }} + +#line 7122 "Parser.cpp" + + break; + } + case 237: { + { +#line 960 "Parser.rl" + {te = p+1;{ +#line 960 "Parser.rl" + + negated = true; + {p = p - 1; } + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 818;goto _again;}} + }} + +#line 7144 "Parser.cpp" + + break; + } + case 238: { + { +#line 970 "Parser.rl" + {te = p+1;{ +#line 970 "Parser.rl" + + currentCls->add(octAccumulator); + } + }} + +#line 7157 "Parser.cpp" + + break; + } + case 239: { + { +#line 973 "Parser.rl" + {te = p+1;{ +#line 973 "Parser.rl" + + currentCls->add(octAccumulator); + } + }} + +#line 7170 "Parser.cpp" + + break; + } + case 240: { + { +#line 977 "Parser.rl" + {te = p+1;{ +#line 977 "Parser.rl" + + string oct(ts + 3, te - ts - 4); + unsigned long val; + try { + val = stoul(oct, nullptr, 8); + } catch (const std::out_of_range &) { + val = MAX_UNICODE + 1; + } + if ((!mode.utf8 && val > 255) || val > MAX_UNICODE) { + throw LocatedParseError("Value in \\o{...} sequence is too large"); + } + currentCls->add((unichar)val); + } + }} + +#line 7193 "Parser.cpp" + + break; + } + case 241: { + { +#line 997 "Parser.rl" + {te = p+1;{ +#line 997 "Parser.rl" + + currentCls->add(accumulator); + } + }} + +#line 7206 "Parser.cpp" + + break; + } + case 242: { + { +#line 1001 "Parser.rl" + {te = p+1;{ +#line 1001 "Parser.rl" + + // whatever we found here + currentCls->add(*(ts + 1)); + + } + }} + +#line 7221 "Parser.cpp" + + break; + } + case 243: { + { +#line 1007 "Parser.rl" + {te = p+1;{ +#line 1007 "Parser.rl" + + string hex(ts + 3, te - ts - 4); + unsigned long val; + try { + val = stoul(hex, nullptr, 16); + } catch (const std::out_of_range &) { + val = MAX_UNICODE + 1; + } + if (val > MAX_UNICODE) { + throw LocatedParseError("Value in \\x{...} sequence is too large"); + } + currentCls->add((unichar)val); + } + }} + +#line 7244 "Parser.cpp" + + break; + } + case 244: { + { +#line 1025 "Parser.rl" + {te = p+1;{ +#line 1025 "Parser.rl" + + if (te - ts < 3) { + assert(te - ts == 2); + throw LocatedParseError(SLASH_C_ERROR); + } else { + assert(te - ts == 3); + currentCls->add(decodeCtrl(ts[2])); + } + } + }} + +#line 7263 "Parser.cpp" + + break; + } + case 245: { + { +#line 1035 "Parser.rl" + {te = p+1;{ +#line 1035 "Parser.rl" + + currentCls->add(CLASS_WORD, false); + } + }} + +#line 7276 "Parser.cpp" + + break; + } + case 246: { + { +#line 1039 "Parser.rl" + {te = p+1;{ +#line 1039 "Parser.rl" + + currentCls->add(CLASS_WORD, true); + } + }} + +#line 7289 "Parser.cpp" + + break; + } + case 247: { + { +#line 1043 "Parser.rl" + {te = p+1;{ +#line 1043 "Parser.rl" + + currentCls->add(CLASS_SPACE, false); + } + }} + +#line 7302 "Parser.cpp" + + break; + } + case 248: { + { +#line 1047 "Parser.rl" + {te = p+1;{ +#line 1047 "Parser.rl" + + currentCls->add(CLASS_SPACE, true); + } + }} + +#line 7315 "Parser.cpp" + + break; + } + case 249: { + { +#line 1051 "Parser.rl" + {te = p+1;{ +#line 1051 "Parser.rl" + + currentCls->add(CLASS_DIGIT, false); + } + }} + +#line 7328 "Parser.cpp" + + break; + } + case 250: { + { +#line 1055 "Parser.rl" + {te = p+1;{ +#line 1055 "Parser.rl" + + currentCls->add(CLASS_DIGIT, true); + } + }} + +#line 7341 "Parser.cpp" + + break; + } + case 251: { + { +#line 1058 "Parser.rl" + {te = p+1;{ +#line 1058 "Parser.rl" + + currentCls->addDash(); + } + }} + +#line 7354 "Parser.cpp" + + break; + } + case 252: { + { +#line 276 "Parser.rl" + {te = p+1;{ +#line 276 "Parser.rl" + + ostringstream str; + str << "'\\" << *(ts + 1) << "' at index " << ts - ptr + << " not supported in a character class."; + throw ParseError(str.str()); + } + }} + +#line 7370 "Parser.cpp" + + break; + } + case 253: { + { +#line 276 "Parser.rl" + {te = p+1;{ +#line 276 "Parser.rl" + + ostringstream str; + str << "'\\" << *(ts + 1) << "' at index " << ts - ptr + << " not supported in a character class."; + throw ParseError(str.str()); + } + }} + +#line 7386 "Parser.cpp" + + break; + } + case 254: { + { +#line 276 "Parser.rl" + {te = p+1;{ +#line 276 "Parser.rl" + + ostringstream str; + str << "'\\" << *(ts + 1) << "' at index " << ts - ptr + << " not supported in a character class."; + throw ParseError(str.str()); + } + }} + +#line 7402 "Parser.cpp" + + break; + } + case 255: { + { +#line 1075 "Parser.rl" + {te = p+1;{ +#line 1075 "Parser.rl" + + // add the literal char + currentCls->add(*(ts + 1)); + } + }} + +#line 7416 "Parser.cpp" + + break; + } + case 256: { + { +#line 1081 "Parser.rl" + {te = p+1;{ +#line 1081 "Parser.rl" + + assert(mode.utf8); + currentCls->add(readUtf8CodePoint2c(ts)); + } + }} + +#line 7430 "Parser.cpp" + + break; + } + case 257: { + { +#line 1086 "Parser.rl" + {te = p+1;{ +#line 1086 "Parser.rl" + + assert(mode.utf8); + currentCls->add(readUtf8CodePoint3c(ts)); + } + }} + +#line 7444 "Parser.cpp" + + break; + } + case 258: { + { +#line 1091 "Parser.rl" + {te = p+1;{ +#line 1091 "Parser.rl" + + assert(mode.utf8); + currentCls->add(readUtf8CodePoint4c(ts)); + } + }} + +#line 7458 "Parser.cpp" + + break; + } + case 259: { + { +#line 1096 "Parser.rl" + {te = p+1;{ +#line 1096 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 7472 "Parser.cpp" + + break; + } + case 260: { + { +#line 1102 "Parser.rl" + {te = p+1;{ +#line 1102 "Parser.rl" + + currentCls->add((u8)*ts); + } + }} + +#line 7485 "Parser.cpp" + + break; + } + case 261: { + { +#line 1106 "Parser.rl" + {te = p+1;{ +#line 1106 "Parser.rl" + + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + inCharClass = false; + {cs = 746;goto _again;}} + }} + +#line 7500 "Parser.cpp" + + break; + } + case 262: { + { +#line 966 "Parser.rl" + {te = p;p = p - 1;{ +#line 966 "Parser.rl" + throw LocatedParseError("Malformed property"); } + }} + +#line 7511 "Parser.cpp" + + break; + } + case 263: { + { +#line 967 "Parser.rl" + {te = p;p = p - 1;{ +#line 967 "Parser.rl" + throw LocatedParseError("Malformed property"); } + }} + +#line 7522 "Parser.cpp" + + break; + } + case 264: { + { +#line 970 "Parser.rl" + {te = p;p = p - 1;{ +#line 970 "Parser.rl" + + currentCls->add(octAccumulator); + } + }} + +#line 7535 "Parser.cpp" + + break; + } + case 265: { + { +#line 973 "Parser.rl" + {te = p;p = p - 1;{ +#line 973 "Parser.rl" + + currentCls->add(octAccumulator); + } + }} + +#line 7548 "Parser.cpp" + + break; + } + case 266: { + { +#line 992 "Parser.rl" + {te = p;p = p - 1;{ +#line 992 "Parser.rl" + + throw LocatedParseError("Value in \\o{...} sequence is non-octal or missing braces"); + } + }} + +#line 7561 "Parser.cpp" + + break; + } + case 267: { + { +#line 997 "Parser.rl" + {te = p;p = p - 1;{ +#line 997 "Parser.rl" + + currentCls->add(accumulator); + } + }} + +#line 7574 "Parser.cpp" + + break; + } + case 268: { + { +#line 1021 "Parser.rl" + {te = p;p = p - 1;{ +#line 1021 "Parser.rl" + + throw LocatedParseError("Value in \\x{...} sequence is non-hex or missing }"); + } + }} + +#line 7587 "Parser.cpp" + + break; + } + case 269: { + { +#line 1025 "Parser.rl" + {te = p;p = p - 1;{ +#line 1025 "Parser.rl" + + if (te - ts < 3) { + assert(te - ts == 2); + throw LocatedParseError(SLASH_C_ERROR); + } else { + assert(te - ts == 3); + currentCls->add(decodeCtrl(ts[2])); + } + } + }} + +#line 7606 "Parser.cpp" + + break; + } + case 270: { + { +#line 1096 "Parser.rl" + {te = p;p = p - 1;{ +#line 1096 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 7620 "Parser.cpp" + + break; + } + case 271: { + { +#line 1102 "Parser.rl" + {te = p;p = p - 1;{ +#line 1102 "Parser.rl" + + currentCls->add((u8)*ts); + } + }} + +#line 7633 "Parser.cpp" + + break; + } + case 272: { + { +#line 992 "Parser.rl" + {p = ((te))-1; + { +#line 992 "Parser.rl" + + throw LocatedParseError("Value in \\o{...} sequence is non-octal or missing braces"); + } + }} + +#line 7647 "Parser.cpp" + + break; + } + case 273: { + { +#line 1021 "Parser.rl" + {p = ((te))-1; + { +#line 1021 "Parser.rl" + + throw LocatedParseError("Value in \\x{...} sequence is non-hex or missing }"); + } + }} + +#line 7661 "Parser.cpp" + + break; + } + case 274: { + { +#line 1096 "Parser.rl" + {p = ((te))-1; + { +#line 1096 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 7676 "Parser.cpp" + + break; + } + case 275: { + { +#line 1102 "Parser.rl" + {p = ((te))-1; + { +#line 1102 "Parser.rl" + + currentCls->add((u8)*ts); + } + }} + +#line 7690 "Parser.cpp" + + break; + } + case 276: { + { +#line 1120 "Parser.rl" + {te = p+1;{ +#line 1120 "Parser.rl" + + if (currentCls->isNegated()) { + // Already seen a caret; the second one is not a meta-character. + inCharClassEarly = false; + {p = p - 1; } {cs = 819;goto _again;}} else { + currentCls->negate(); + // Note: we cannot switch off inCharClassEarly here, as /[^]]/ + // needs to use the right square bracket path below. + } + } + }} + +#line 7710 "Parser.cpp" + + break; + } + case 277: { + { +#line 1133 "Parser.rl" + {te = p+1;{ +#line 1133 "Parser.rl" + + currentCls->add(']'); + inCharClassEarly = false; + } + }} + +#line 7724 "Parser.cpp" + + break; + } + case 278: { + { +#line 1138 "Parser.rl" + {te = p+1;{ +#line 1138 "Parser.rl" + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 843;goto _again;}} + }} + +#line 7743 "Parser.cpp" + + break; + } + case 279: { + { +#line 1139 "Parser.rl" + {te = p+1;{ +#line 1139 "Parser.rl" + /*noop*/} + }} + +#line 7754 "Parser.cpp" + + break; + } + case 280: { + { +#line 1142 "Parser.rl" + {te = p+1;{ +#line 1142 "Parser.rl" + + inCharClassEarly = false; + {p = p - 1; } + {cs = 819;goto _again;}} + }} + +#line 7768 "Parser.cpp" + + break; + } + case 281: { + { +#line 1142 "Parser.rl" + {te = p;p = p - 1;{ +#line 1142 "Parser.rl" + + inCharClassEarly = false; + {p = p - 1; } + {cs = 819;goto _again;}} + }} + +#line 7782 "Parser.cpp" + + break; + } + case 282: { + { +#line 1154 "Parser.rl" + {te = p+1;{ +#line 1154 "Parser.rl" + + {cs = 746;goto _again;}} + }} + +#line 7794 "Parser.cpp" + + break; + } + case 283: { + { +#line 1159 "Parser.rl" + {te = p+1;{ +#line 1159 "Parser.rl" + + assert(mode.utf8); + /* leverage ComponentClass to generate the vertices */ + auto cc = getComponentClass(mode); + cc->add(readUtf8CodePoint2c(ts)); + cc->finalize(); + currentSeq->addComponent(move(cc)); + } + }} + +#line 7812 "Parser.cpp" + + break; + } + case 284: { + { +#line 1168 "Parser.rl" + {te = p+1;{ +#line 1168 "Parser.rl" + + assert(mode.utf8); + /* leverage ComponentClass to generate the vertices */ + auto cc = getComponentClass(mode); + cc->add(readUtf8CodePoint3c(ts)); + cc->finalize(); + currentSeq->addComponent(move(cc)); + } + }} + +#line 7830 "Parser.cpp" + + break; + } + case 285: { + { +#line 1177 "Parser.rl" + {te = p+1;{ +#line 1177 "Parser.rl" + + assert(mode.utf8); + /* leverage ComponentClass to generate the vertices */ + auto cc = getComponentClass(mode); + cc->add(readUtf8CodePoint4c(ts)); + cc->finalize(); + currentSeq->addComponent(move(cc)); + } + }} + +#line 7848 "Parser.cpp" + + break; + } + case 286: { + { +#line 1186 "Parser.rl" + {te = p+1;{ +#line 1186 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 7862 "Parser.cpp" + + break; + } + case 287: { + { +#line 1192 "Parser.rl" + {te = p+1;{ +#line 1192 "Parser.rl" + + addLiteral(currentSeq, *ts, mode); + } + }} + +#line 7875 "Parser.cpp" + + break; + } + case 288: { + { +#line 1186 "Parser.rl" + {te = p;p = p - 1;{ +#line 1186 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 7889 "Parser.cpp" + + break; + } + case 289: { + { +#line 1192 "Parser.rl" + {te = p;p = p - 1;{ +#line 1192 "Parser.rl" + + addLiteral(currentSeq, *ts, mode); + } + }} + +#line 7902 "Parser.cpp" + + break; + } + case 290: { + { +#line 1186 "Parser.rl" + {p = ((te))-1; + { +#line 1186 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 7917 "Parser.cpp" + + break; + } + case 291: { + { +#line 1202 "Parser.rl" + {te = p+1;{ +#line 1202 "Parser.rl" + + {top -= 1;cs = stack[top];goto _again;} + } + }} + +#line 7930 "Parser.cpp" + + break; + } + case 292: { + { +#line 1207 "Parser.rl" + {te = p+1;{ +#line 1207 "Parser.rl" + + assert(mode.utf8); + currentCls->add(readUtf8CodePoint2c(ts)); + inCharClassEarly = false; + } + }} + +#line 7945 "Parser.cpp" + + break; + } + case 293: { + { +#line 1213 "Parser.rl" + {te = p+1;{ +#line 1213 "Parser.rl" + + assert(mode.utf8); + currentCls->add(readUtf8CodePoint3c(ts)); + inCharClassEarly = false; + } + }} + +#line 7960 "Parser.cpp" + + break; + } + case 294: { + { +#line 1219 "Parser.rl" + {te = p+1;{ +#line 1219 "Parser.rl" + + assert(mode.utf8); + currentCls->add(readUtf8CodePoint4c(ts)); + inCharClassEarly = false; + } + }} + +#line 7975 "Parser.cpp" + + break; + } + case 295: { + { +#line 1225 "Parser.rl" + {te = p+1;{ +#line 1225 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 7989 "Parser.cpp" + + break; + } + case 296: { + { +#line 1231 "Parser.rl" + {te = p+1;{ +#line 1231 "Parser.rl" + + currentCls->add(*ts); + inCharClassEarly = false; + } + }} + +#line 8003 "Parser.cpp" + + break; + } + case 297: { + { +#line 1225 "Parser.rl" + {te = p;p = p - 1;{ +#line 1225 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 8017 "Parser.cpp" + + break; + } + case 298: { + { +#line 1231 "Parser.rl" + {te = p;p = p - 1;{ +#line 1231 "Parser.rl" + + currentCls->add(*ts); + inCharClassEarly = false; + } + }} + +#line 8031 "Parser.cpp" + + break; + } + case 299: { + { +#line 1225 "Parser.rl" + {p = ((te))-1; + { +#line 1225 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 8046 "Parser.cpp" + + break; + } + case 300: { + { +#line 1243 "Parser.rl" + {te = p+1;{ +#line 1243 "Parser.rl" + inComment = false; {cs = 746;goto _again;}} + }} + +#line 8057 "Parser.cpp" + + break; + } + case 301: { + { +#line 1 "-" + {te = p+1;}} + +#line 8065 "Parser.cpp" + + break; + } + case 302: { + { +#line 1255 "Parser.rl" + {te = p+1;{ +#line 1255 "Parser.rl" + inComment = false; {cs = 746;goto _again;}} + }} + +#line 8076 "Parser.cpp" + + break; + } + case 303: { + { +#line 1 "-" + {te = p+1;}} + +#line 8084 "Parser.cpp" + + break; + } + case 304: { + { +#line 1491 "Parser.rl" + {act = 288;}} + +#line 8092 "Parser.cpp" + + break; + } + case 305: { + { +#line 1508 "Parser.rl" + {act = 290;}} + +#line 8100 "Parser.cpp" + + break; + } + case 306: { + { +#line 1737 "Parser.rl" + {act = 330;}} + +#line 8108 "Parser.cpp" + + break; + } + case 307: { + { +#line 362 "Parser.rl" + {te = p+1;{ +#line 362 "Parser.rl" + + if (sequences.empty()) { + throw LocatedParseError("Unmatched parentheses"); + } + currentSeq->finalize(); + POP_SEQUENCE; + } + }} + +#line 8125 "Parser.cpp" + + break; + } + case 308: { + { +#line 1274 "Parser.rl" + {te = p+1;{ +#line 1274 "Parser.rl" + + currentSeq->addAlternation(); + } + }} + +#line 8138 "Parser.cpp" + + break; + } + case 309: { + { +#line 1279 "Parser.rl" + {te = p+1;{ +#line 1279 "Parser.rl" + + throw LocatedParseError("POSIX named classes are only " + "supported inside a class"); + } + }} + +#line 8152 "Parser.cpp" + + break; + } + case 310: { + { +#line 1286 "Parser.rl" + {te = p+1;{ +#line 1286 "Parser.rl" + + throw LocatedParseError("Unsupported POSIX collating " + "element"); + } + }} + +#line 8166 "Parser.cpp" + + break; + } + case 311: { + { +#line 1293 "Parser.rl" + {te = p+1;{ +#line 1293 "Parser.rl" + + {cs = 838;goto _again;}} + }} + +#line 8178 "Parser.cpp" + + break; + } + case 312: { + { +#line 1297 "Parser.rl" + {te = p+1;{ +#line 1297 "Parser.rl" + /* noop */ } + }} + +#line 8189 "Parser.cpp" + + break; + } + case 313: { + { +#line 1299 "Parser.rl" + {te = p+1;{ +#line 1299 "Parser.rl" + + currentSeq->addComponent(generateComponent(CLASS_ANY, false, mode)); + } + }} + +#line 8202 "Parser.cpp" + + break; + } + case 314: { + { +#line 1303 "Parser.rl" + {te = p+1;{ +#line 1303 "Parser.rl" + + if (mode.utf8) { + throw LocatedParseError("\\C is unsupported in UTF8"); + } + currentSeq->addComponent(std::make_unique()); + } + }} + +#line 8218 "Parser.cpp" + + break; + } + case 315: { + { +#line 1317 "Parser.rl" + {te = p+1;{ +#line 1317 "Parser.rl" + + if (!currentSeq->addRepeat(0, ComponentRepeat::NoLimit, + ComponentRepeat::REPEAT_NONGREEDY)) { + throwInvalidRepeat(); + } + } + }} + +#line 8234 "Parser.cpp" + + break; + } + case 316: { + { +#line 1324 "Parser.rl" + {te = p+1;{ +#line 1324 "Parser.rl" + + if (!currentSeq->addRepeat(0, ComponentRepeat::NoLimit, + ComponentRepeat::REPEAT_POSSESSIVE)) { + throwInvalidRepeat(); + } + } + }} + +#line 8250 "Parser.cpp" + + break; + } + case 317: { + { +#line 1338 "Parser.rl" + {te = p+1;{ +#line 1338 "Parser.rl" + + if (!currentSeq->addRepeat(1, ComponentRepeat::NoLimit, + ComponentRepeat::REPEAT_NONGREEDY)) { + throwInvalidRepeat(); + } + } + }} + +#line 8266 "Parser.cpp" + + break; + } + case 318: { + { +#line 1345 "Parser.rl" + {te = p+1;{ +#line 1345 "Parser.rl" + + if (!currentSeq->addRepeat(1, ComponentRepeat::NoLimit, + ComponentRepeat::REPEAT_POSSESSIVE)) { + throwInvalidRepeat(); + } + } + }} + +#line 8282 "Parser.cpp" + + break; + } + case 319: { + { +#line 1359 "Parser.rl" + {te = p+1;{ +#line 1359 "Parser.rl" + + if (!currentSeq->addRepeat( + 0, 1, ComponentRepeat::REPEAT_NONGREEDY)) { + throwInvalidRepeat(); + } + } + }} + +#line 8298 "Parser.cpp" + + break; + } + case 320: { + { +#line 1366 "Parser.rl" + {te = p+1;{ +#line 1366 "Parser.rl" + + if (!currentSeq->addRepeat( + 0, 1, ComponentRepeat::REPEAT_POSSESSIVE)) { + throwInvalidRepeat(); + } + } + }} + +#line 8314 "Parser.cpp" + + break; + } + case 321: { + { +#line 1383 "Parser.rl" + {te = p+1;{ +#line 1383 "Parser.rl" + + if (repeatN > repeatM || repeatM == 0) { + throwInvalidRepeat(); + } else if (!currentSeq->addRepeat( + repeatN, repeatM, + ComponentRepeat::REPEAT_NONGREEDY)) { + throwInvalidRepeat(); + } + } + }} + +#line 8333 "Parser.cpp" + + break; + } + case 322: { + { +#line 1393 "Parser.rl" + {te = p+1;{ +#line 1393 "Parser.rl" + + if (repeatN > repeatM || repeatM == 0) { + throwInvalidRepeat(); + } else if (!currentSeq->addRepeat( + repeatN, repeatM, + ComponentRepeat::REPEAT_POSSESSIVE)) { + throwInvalidRepeat(); + } + } + }} + +#line 8352 "Parser.cpp" + + break; + } + case 323: { + { +#line 322 "Parser.rl" + {te = p+1;{ +#line 322 "Parser.rl" + + inComment = true; + {cs = 849;goto _again;}} + }} + +#line 8365 "Parser.cpp" + + break; + } + case 324: { + { +#line 1410 "Parser.rl" + {te = p+1;{ +#line 1410 "Parser.rl" + {p = p - 1; } {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 787;goto _again;}} + }} + +#line 8384 "Parser.cpp" + + break; + } + case 325: { + { +#line 1414 "Parser.rl" + {te = p+1;{ +#line 1414 "Parser.rl" + assert(0); {p += 1; goto _out; } } + }} + +#line 8395 "Parser.cpp" + + break; + } + case 326: { + { +#line 1421 "Parser.rl" + {te = p+1;{ +#line 1421 "Parser.rl" + + auto bound = mode.multiline ? ComponentBoundary::BEGIN_LINE + : ComponentBoundary::BEGIN_STRING; + currentSeq->addComponent(std::make_unique(bound)); + } + }} + +#line 8410 "Parser.cpp" + + break; + } + case 327: { + { +#line 1428 "Parser.rl" + {te = p+1;{ +#line 1428 "Parser.rl" + + auto bound = mode.multiline ? ComponentBoundary::END_LINE + : ComponentBoundary::END_STRING_OPTIONAL_LF; + currentSeq->addComponent(std::make_unique(bound)); + } + }} + +#line 8425 "Parser.cpp" + + break; + } + case 328: { + { +#line 1434 "Parser.rl" + {te = p+1;{ +#line 1434 "Parser.rl" + + auto bound = ComponentBoundary::BEGIN_STRING; + currentSeq->addComponent(std::make_unique(bound)); + } + }} + +#line 8439 "Parser.cpp" + + break; + } + case 329: { + { +#line 1439 "Parser.rl" + {te = p+1;{ +#line 1439 "Parser.rl" + + auto bound = ComponentBoundary::END_STRING_OPTIONAL_LF; + currentSeq->addComponent(std::make_unique(bound)); + } + }} + +#line 8453 "Parser.cpp" + + break; + } + case 330: { + { +#line 1444 "Parser.rl" + {te = p+1;{ +#line 1444 "Parser.rl" + + auto bound = ComponentBoundary::END_STRING; + currentSeq->addComponent(std::make_unique(bound)); + } + }} + +#line 8467 "Parser.cpp" + + break; + } + case 331: { + { +#line 1449 "Parser.rl" + {te = p+1;{ +#line 1449 "Parser.rl" + + currentSeq->addComponent( + std::make_unique(ts - ptr, false, mode)); + } + }} + +#line 8481 "Parser.cpp" + + break; + } + case 332: { + { +#line 1454 "Parser.rl" + {te = p+1;{ +#line 1454 "Parser.rl" + + currentSeq->addComponent( + std::make_unique(ts - ptr, true, mode)); + } + }} + +#line 8495 "Parser.cpp" + + break; + } + case 333: { + { +#line 1464 "Parser.rl" + {te = p+1;{ +#line 1464 "Parser.rl" + + addLiteral(currentSeq, '\x09', mode); + } + }} + +#line 8508 "Parser.cpp" + + break; + } + case 334: { + { +#line 1468 "Parser.rl" + {te = p+1;{ +#line 1468 "Parser.rl" + + addLiteral(currentSeq, '\x0a', mode); + } + }} + +#line 8521 "Parser.cpp" + + break; + } + case 335: { + { +#line 1472 "Parser.rl" + {te = p+1;{ +#line 1472 "Parser.rl" + + addLiteral(currentSeq, '\x0d', mode); + } + }} + +#line 8534 "Parser.cpp" + + break; + } + case 336: { + { +#line 1476 "Parser.rl" + {te = p+1;{ +#line 1476 "Parser.rl" + + addLiteral(currentSeq, '\x0c', mode); + } + }} + +#line 8547 "Parser.cpp" + + break; + } + case 337: { + { +#line 1480 "Parser.rl" + {te = p+1;{ +#line 1480 "Parser.rl" + + addLiteral(currentSeq, '\x07', mode); + } + }} + +#line 8560 "Parser.cpp" + + break; + } + case 338: { + { +#line 1484 "Parser.rl" + {te = p+1;{ +#line 1484 "Parser.rl" + + addLiteral(currentSeq, '\x1b', mode); + } + }} + +#line 8573 "Parser.cpp" + + break; + } + case 339: { + { +#line 1488 "Parser.rl" + {te = p+1;{ +#line 1488 "Parser.rl" + + addLiteral(currentSeq, octAccumulator, mode); + } + }} + +#line 8586 "Parser.cpp" + + break; + } + case 340: { + { +#line 479 "Parser.rl" + {te = p+1;{ +#line 479 "Parser.rl" + + if (accumulator == 0) { + throw LocatedParseError("Numbered reference cannot be zero"); + } + currentSeq->addComponent(std::make_unique(accumulator)); + } + }} + +#line 8602 "Parser.cpp" + + break; + } + case 341: { + { +#line 486 "Parser.rl" + {te = p+1;{ +#line 486 "Parser.rl" + + // Accumulator is a negative offset. + if (accumulator == 0) { + throw LocatedParseError("Numbered reference cannot be zero"); + } + if (accumulator >= groupIndex) { + throw LocatedParseError("Invalid reference"); + } + unsigned idx = groupIndex - accumulator; + currentSeq->addComponent(std::make_unique(idx)); + } + }} + +#line 8623 "Parser.cpp" + + break; + } + case 342: { + { +#line 479 "Parser.rl" + {te = p+1;{ +#line 479 "Parser.rl" + + if (accumulator == 0) { + throw LocatedParseError("Numbered reference cannot be zero"); + } + currentSeq->addComponent(std::make_unique(accumulator)); + } + }} + +#line 8639 "Parser.cpp" + + break; + } + case 343: { + { +#line 486 "Parser.rl" + {te = p+1;{ +#line 486 "Parser.rl" + + // Accumulator is a negative offset. + if (accumulator == 0) { + throw LocatedParseError("Numbered reference cannot be zero"); + } + if (accumulator >= groupIndex) { + throw LocatedParseError("Invalid reference"); + } + unsigned idx = groupIndex - accumulator; + currentSeq->addComponent(std::make_unique(idx)); + } + }} + +#line 8660 "Parser.cpp" + + break; + } + case 344: { + { +#line 498 "Parser.rl" + {te = p+1;{ +#line 498 "Parser.rl" + + currentSeq->addComponent(std::make_unique(label)); + } + }} + +#line 8673 "Parser.cpp" + + break; + } + case 345: { + { +#line 498 "Parser.rl" + {te = p+1;{ +#line 498 "Parser.rl" + + currentSeq->addComponent(std::make_unique(label)); + } + }} + +#line 8686 "Parser.cpp" + + break; + } + case 346: { + { +#line 498 "Parser.rl" + {te = p+1;{ +#line 498 "Parser.rl" + + currentSeq->addComponent(std::make_unique(label)); + } + }} + +#line 8699 "Parser.cpp" + + break; + } + case 347: { + { +#line 498 "Parser.rl" + {te = p+1;{ +#line 498 "Parser.rl" + + currentSeq->addComponent(std::make_unique(label)); + } + }} + +#line 8712 "Parser.cpp" + + break; + } + case 348: { + { +#line 498 "Parser.rl" + {te = p+1;{ +#line 498 "Parser.rl" + + currentSeq->addComponent(std::make_unique(label)); + } + }} + +#line 8725 "Parser.cpp" + + break; + } + case 349: { + { +#line 1549 "Parser.rl" + {te = p+1;{ +#line 1549 "Parser.rl" + + ostringstream str; + str << "Onigiruma subroutine call at index " << ts - ptr << + " not supported."; + throw ParseError(str.str()); + } + }} + +#line 8741 "Parser.cpp" + + break; + } + case 350: { + { +#line 1560 "Parser.rl" + {te = p+1;{ +#line 1560 "Parser.rl" + + string oct(ts + 3, te - ts - 4); + unsigned long val; + try { + val = stoul(oct, nullptr, 8); + } catch (const std::out_of_range &) { + val = MAX_UNICODE + 1; + } + if ((!mode.utf8 && val > 255) || val > MAX_UNICODE) { + throw LocatedParseError("Value in \\o{...} sequence is too large"); + } + addEscapedOctal(currentSeq, (unichar)val, mode); + } + }} + +#line 8764 "Parser.cpp" + + break; + } + case 351: { + { +#line 1578 "Parser.rl" + {te = p+1;{ +#line 1578 "Parser.rl" + + addEscapedHex(currentSeq, accumulator, mode); + } + }} + +#line 8777 "Parser.cpp" + + break; + } + case 352: { + { +#line 1582 "Parser.rl" + {te = p+1;{ +#line 1582 "Parser.rl" + + string hex(ts + 3, te - ts - 4); + unsigned long val; + try { + val = stoul(hex, nullptr, 16); + } catch (const std::out_of_range &) { + val = MAX_UNICODE + 1; + } + if (val > MAX_UNICODE) { + throw LocatedParseError("Value in \\x{...} sequence is too large"); + } + addEscapedHex(currentSeq, (unichar)val, mode); + } + }} + +#line 8800 "Parser.cpp" + + break; + } + case 353: { + { +#line 1600 "Parser.rl" + {te = p+1;{ +#line 1600 "Parser.rl" + + if (te - ts < 3) { + assert(te - ts == 2); + throw LocatedParseError(SLASH_C_ERROR); + } else { + assert(te - ts == 3); + addLiteral(currentSeq, decodeCtrl(ts[2]), mode); + } + } + }} + +#line 8819 "Parser.cpp" + + break; + } + case 354: { + { +#line 1610 "Parser.rl" + {te = p+1;{ +#line 1610 "Parser.rl" + + ostringstream str; + str << "'\\" << *(ts + 1) << "' at index " << ts - ptr + << " not supported."; + throw ParseError(str.str()); + } + }} + +#line 8835 "Parser.cpp" + + break; + } + case 355: { + { +#line 1618 "Parser.rl" + {te = p+1;{ +#line 1618 "Parser.rl" + + auto cc = generateComponent(CLASS_WORD, false, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8849 "Parser.cpp" + + break; + } + case 356: { + { +#line 1623 "Parser.rl" + {te = p+1;{ +#line 1623 "Parser.rl" + + auto cc = generateComponent(CLASS_WORD, true, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8863 "Parser.cpp" + + break; + } + case 357: { + { +#line 1628 "Parser.rl" + {te = p+1;{ +#line 1628 "Parser.rl" + + auto cc = generateComponent(CLASS_SPACE, false, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8877 "Parser.cpp" + + break; + } + case 358: { + { +#line 1633 "Parser.rl" + {te = p+1;{ +#line 1633 "Parser.rl" + + auto cc = generateComponent(CLASS_SPACE, true, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8891 "Parser.cpp" + + break; + } + case 359: { + { +#line 1638 "Parser.rl" + {te = p+1;{ +#line 1638 "Parser.rl" + + auto cc = generateComponent(CLASS_DIGIT, false, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8905 "Parser.cpp" + + break; + } + case 360: { + { +#line 1643 "Parser.rl" + {te = p+1;{ +#line 1643 "Parser.rl" + + auto cc = generateComponent(CLASS_DIGIT, true, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8919 "Parser.cpp" + + break; + } + case 361: { + { +#line 1648 "Parser.rl" + {te = p+1;{ +#line 1648 "Parser.rl" + + auto cc = generateComponent(CLASS_HORZ, false, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8933 "Parser.cpp" + + break; + } + case 362: { + { +#line 1653 "Parser.rl" + {te = p+1;{ +#line 1653 "Parser.rl" + + auto cc = generateComponent(CLASS_HORZ, true, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8947 "Parser.cpp" + + break; + } + case 363: { + { +#line 1658 "Parser.rl" + {te = p+1;{ +#line 1658 "Parser.rl" + + auto cc = generateComponent(CLASS_VERT, false, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8961 "Parser.cpp" + + break; + } + case 364: { + { +#line 1663 "Parser.rl" + {te = p+1;{ +#line 1663 "Parser.rl" + + auto cc = generateComponent(CLASS_VERT, true, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8975 "Parser.cpp" + + break; + } + case 365: { + { +#line 1668 "Parser.rl" + {te = p+1;{ +#line 1668 "Parser.rl" + + assert(!currentCls && !inCharClass); + currentCls = getComponentClass(mode); + negated = false; + {p = p - 1; } + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 559;goto _again;}} + }} + +#line 8999 "Parser.cpp" + + break; + } + case 366: { + { +#line 1676 "Parser.rl" + {te = p+1;{ +#line 1676 "Parser.rl" + + assert(!currentCls && !inCharClass); + currentCls = getComponentClass(mode); + negated = false; + {p = p - 1; } + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 818;goto _again;}} + }} + +#line 9023 "Parser.cpp" + + break; + } + case 367: { + { +#line 1684 "Parser.rl" + {te = p+1;{ +#line 1684 "Parser.rl" + + assert(!currentCls && !inCharClass); + currentCls = getComponentClass(mode); + negated = true; + {p = p - 1; } + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 559;goto _again;}} + }} + +#line 9047 "Parser.cpp" + + break; + } + case 368: { + { +#line 1692 "Parser.rl" + {te = p+1;{ +#line 1692 "Parser.rl" + + assert(!currentCls && !inCharClass); + currentCls = getComponentClass(mode); + negated = true; + {p = p - 1; } + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 818;goto _again;}} + }} + +#line 9071 "Parser.cpp" + + break; + } + case 369: { + { +#line 1704 "Parser.rl" + {te = p+1;{ +#line 1704 "Parser.rl" + + ostringstream str; + str << "\\R at index " << ts - ptr << " not supported."; + throw ParseError(str.str()); + } + }} + +#line 9086 "Parser.cpp" + + break; + } + case 370: { + { +#line 1711 "Parser.rl" + {te = p+1;{ +#line 1711 "Parser.rl" + + ostringstream str; + str << "\\K at index " << ts - ptr << " not supported."; + throw ParseError(str.str()); + } + }} + +#line 9101 "Parser.cpp" + + break; + } + case 371: { + { +#line 1726 "Parser.rl" + {te = p+1;{ +#line 1726 "Parser.rl" + + ostringstream str; + str << "\\G at index " << ts - ptr << " not supported."; + throw ParseError(str.str()); + } + }} + +#line 9116 "Parser.cpp" + + break; + } + case 372: { + { +#line 1732 "Parser.rl" + {te = p+1;{ +#line 1732 "Parser.rl" + + currentSeq->addComponent(std::make_unique(ts - ptr, mode)); + } + }} + +#line 9129 "Parser.cpp" + + break; + } + case 373: { + { +#line 1737 "Parser.rl" + {te = p+1;{ +#line 1737 "Parser.rl" + + addLiteral(currentSeq, *(ts + 1), mode); + } + }} + +#line 9142 "Parser.cpp" + + break; + } + case 374: { + { +#line 316 "Parser.rl" + {te = p+1;{ +#line 316 "Parser.rl" + + inComment = true; + {cs = 848;goto _again;}} + }} + +#line 9155 "Parser.cpp" + + break; + } + case 375: { + { +#line 433 "Parser.rl" + {te = p+1;{ +#line 433 "Parser.rl" + + mode = newMode; + currentSeq->addComponent(std::make_unique()); + } + }} + +#line 9169 "Parser.cpp" + + break; + } + case 376: { + { +#line 355 "Parser.rl" + {te = p+1;{ +#line 355 "Parser.rl" + + PUSH_SEQUENCE; + mode = newMode; + currentSeq = + enterSequence(currentSeq, std::make_unique()); + } + }} + +#line 9185 "Parser.cpp" + + break; + } + case 377: { + { +#line 369 "Parser.rl" + {te = p+1;{ +#line 369 "Parser.rl" + + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(ComponentAssertion::LOOKAHEAD, + ComponentAssertion::POS)); + } + }} + +#line 9201 "Parser.cpp" + + break; + } + case 378: { + { +#line 375 "Parser.rl" + {te = p+1;{ +#line 375 "Parser.rl" + + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(ComponentAssertion::LOOKAHEAD, + ComponentAssertion::NEG)); + } + }} + +#line 9217 "Parser.cpp" + + break; + } + case 379: { + { +#line 381 "Parser.rl" + {te = p+1;{ +#line 381 "Parser.rl" + + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(ComponentAssertion::LOOKBEHIND, + ComponentAssertion::POS)); + } + }} + +#line 9233 "Parser.cpp" + + break; + } + case 380: { + { +#line 387 "Parser.rl" + {te = p+1;{ +#line 387 "Parser.rl" + + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(ComponentAssertion::LOOKBEHIND, + ComponentAssertion::NEG)); + } + }} + +#line 9249 "Parser.cpp" + + break; + } + case 381: { + { +#line 393 "Parser.rl" + {te = p+1;{ +#line 393 "Parser.rl" + + throw LocatedParseError("Embedded code is not supported"); + } + }} + +#line 9262 "Parser.cpp" + + break; + } + case 382: { + { +#line 393 "Parser.rl" + {te = p+1;{ +#line 393 "Parser.rl" + + throw LocatedParseError("Embedded code is not supported"); + } + }} + +#line 9275 "Parser.cpp" + + break; + } + case 383: { + { +#line 416 "Parser.rl" + {te = p+1;{ +#line 416 "Parser.rl" + + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique()); + } + }} + +#line 9290 "Parser.cpp" + + break; + } + case 384: { + { +#line 336 "Parser.rl" + {te = p+1;{ +#line 336 "Parser.rl" + + assert(!label.empty()); // should be guaranteed by machine + char c = *label.begin(); + if (c >= '0' && c <= '9') { + throw LocatedParseError("Group name cannot begin with a digit"); + } + if (!groupNames.insert(label).second) { + throw LocatedParseError("Two named subpatterns use the name '" + label + "'"); + } + PUSH_SEQUENCE; + auto seq = std::make_unique(); + seq->setCaptureIndex(groupIndex++); + seq->setCaptureName(label); + currentSeq = enterSequence(currentSeq, move(seq)); + } + }} + +#line 9315 "Parser.cpp" + + break; + } + case 385: { + { +#line 399 "Parser.rl" + {te = p+1;{ +#line 399 "Parser.rl" + + throw LocatedParseError("Subpattern reference unsupported"); + } + }} + +#line 9328 "Parser.cpp" + + break; + } + case 386: { + { +#line 399 "Parser.rl" + {te = p+1;{ +#line 399 "Parser.rl" + + throw LocatedParseError("Subpattern reference unsupported"); + } + }} + +#line 9341 "Parser.cpp" + + break; + } + case 387: { + { +#line 1783 "Parser.rl" + {te = p+1;{ +#line 1783 "Parser.rl" + + auto a = std::make_unique( + ComponentAssertion::LOOKAHEAD, ComponentAssertion::POS); + ComponentAssertion *a_seq = a.get(); + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(move(a))); + PUSH_SEQUENCE; + currentSeq = a_seq; + } + }} + +#line 9361 "Parser.cpp" + + break; + } + case 388: { + { +#line 1794 "Parser.rl" + {te = p+1;{ +#line 1794 "Parser.rl" + + auto a = std::make_unique( + ComponentAssertion::LOOKAHEAD, ComponentAssertion::NEG); + ComponentAssertion *a_seq = a.get(); + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(move(a))); + PUSH_SEQUENCE; + currentSeq = a_seq; + } + }} + +#line 9381 "Parser.cpp" + + break; + } + case 389: { + { +#line 1805 "Parser.rl" + {te = p+1;{ +#line 1805 "Parser.rl" + + auto a = std::make_unique( + ComponentAssertion::LOOKBEHIND, ComponentAssertion::POS); + ComponentAssertion *a_seq = a.get(); + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(move(a))); + PUSH_SEQUENCE; + currentSeq = a_seq; + } + }} + +#line 9401 "Parser.cpp" + + break; + } + case 390: { + { +#line 1816 "Parser.rl" + {te = p+1;{ +#line 1816 "Parser.rl" + + auto a = std::make_unique( + ComponentAssertion::LOOKBEHIND, ComponentAssertion::NEG); + ComponentAssertion *a_seq = a.get(); + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(move(a))); + PUSH_SEQUENCE; + currentSeq = a_seq; + } + }} + +#line 9421 "Parser.cpp" + + break; + } + case 391: { + { +#line 1828 "Parser.rl" + {te = p+1;{ +#line 1828 "Parser.rl" + + throw LocatedParseError("Pattern recursion not supported"); + } + }} + +#line 9434 "Parser.cpp" + + break; + } + case 392: { + { +#line 402 "Parser.rl" + {te = p+1;{ +#line 402 "Parser.rl" + + if (accumulator == 0) { + throw LocatedParseError("Numbered reference cannot be zero"); + } + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(accumulator)); + } + }} + +#line 9452 "Parser.cpp" + + break; + } + case 393: { + { +#line 410 "Parser.rl" + {te = p+1;{ +#line 410 "Parser.rl" + + PUSH_SEQUENCE; + assert(!label.empty()); + currentSeq = enterSequence(currentSeq, + std::make_unique(label)); + } + }} + +#line 9468 "Parser.cpp" + + break; + } + case 394: { + { +#line 1844 "Parser.rl" + {te = p+1;{ +#line 1844 "Parser.rl" + + ostringstream str; + str << "Callout at index " << ts - ptr << " not supported."; + throw ParseError(str.str()); + } + }} + +#line 9483 "Parser.cpp" + + break; + } + case 395: { + { +#line 1852 "Parser.rl" + {te = p+1;{ +#line 1852 "Parser.rl" + + throw LocatedParseError("Unrecognised character after (?"); + } + }} + +#line 9496 "Parser.cpp" + + break; + } + case 396: { + { +#line 1857 "Parser.rl" + {te = p+1;{ +#line 1857 "Parser.rl" + + assert(mode.utf8); + /* leverage ComponentClass to generate the vertices */ + auto cc = getComponentClass(mode); + cc->add(readUtf8CodePoint2c(ts)); + cc->finalize(); + currentSeq->addComponent(move(cc)); + } + }} + +#line 9514 "Parser.cpp" + + break; + } + case 397: { + { +#line 1866 "Parser.rl" + {te = p+1;{ +#line 1866 "Parser.rl" + + assert(mode.utf8); + /* leverage ComponentClass to generate the vertices */ + auto cc = getComponentClass(mode); + cc->add(readUtf8CodePoint3c(ts)); + cc->finalize(); + currentSeq->addComponent(move(cc)); + } + }} + +#line 9532 "Parser.cpp" + + break; + } + case 398: { + { +#line 1875 "Parser.rl" + {te = p+1;{ +#line 1875 "Parser.rl" + + assert(mode.utf8); + /* leverage ComponentClass to generate the vertices */ + auto cc = getComponentClass(mode); + cc->add(readUtf8CodePoint4c(ts)); + cc->finalize(); + currentSeq->addComponent(move(cc)); + } + }} + +#line 9550 "Parser.cpp" + + break; + } + case 399: { + { +#line 1884 "Parser.rl" + {te = p+1;{ +#line 1884 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 9564 "Parser.cpp" + + break; + } + case 400: { + { +#line 1893 "Parser.rl" + {te = p+1;{ +#line 1893 "Parser.rl" + + if (mode.ignore_space == false) { + addLiteral(currentSeq, *ts, mode); + } + } + }} + +#line 9579 "Parser.cpp" + + break; + } + case 401: { + { +#line 1898 "Parser.rl" + {te = p+1;{ +#line 1898 "Parser.rl" + + addLiteral(currentSeq, *ts, mode); + } + }} + +#line 9592 "Parser.cpp" + + break; + } + case 402: { + { +#line 328 "Parser.rl" + {te = p;p = p - 1;{ +#line 328 "Parser.rl" + + PUSH_SEQUENCE; + auto seq = std::make_unique(); + seq->setCaptureIndex(groupIndex++); + currentSeq = enterSequence(currentSeq, move(seq)); + } + }} + +#line 9608 "Parser.cpp" + + break; + } + case 403: { + { +#line 421 "Parser.rl" + {te = p;p = p - 1;{ +#line 421 "Parser.rl" + + assert(!currentCls); + assert(!inCharClass); // not reentrant + currentCls = getComponentClass(mode); + inCharClass = true; + inCharClassEarly = true; + currentClsBegin = ts; + {cs = 836;goto _again;}} + }} + +#line 9626 "Parser.cpp" + + break; + } + case 404: { + { +#line 1310 "Parser.rl" + {te = p;p = p - 1;{ +#line 1310 "Parser.rl" + + if (!currentSeq->addRepeat(0, ComponentRepeat::NoLimit, + ComponentRepeat::REPEAT_GREEDY)) { + throwInvalidRepeat(); + } + } + }} + +#line 9642 "Parser.cpp" + + break; + } + case 405: { + { +#line 1331 "Parser.rl" + {te = p;p = p - 1;{ +#line 1331 "Parser.rl" + + if (!currentSeq->addRepeat(1, ComponentRepeat::NoLimit, + ComponentRepeat::REPEAT_GREEDY)) { + throwInvalidRepeat(); + } + } + }} + +#line 9658 "Parser.cpp" + + break; + } + case 406: { + { +#line 1352 "Parser.rl" + {te = p;p = p - 1;{ +#line 1352 "Parser.rl" + + if (!currentSeq->addRepeat( + 0, 1, ComponentRepeat::REPEAT_GREEDY)) { + throwInvalidRepeat(); + } + } + }} + +#line 9674 "Parser.cpp" + + break; + } + case 407: { + { +#line 1373 "Parser.rl" + {te = p;p = p - 1;{ +#line 1373 "Parser.rl" + + if (repeatN > repeatM || repeatM == 0) { + throwInvalidRepeat(); + } else if (!currentSeq->addRepeat( + repeatN, repeatM, + ComponentRepeat::REPEAT_GREEDY)) { + throwInvalidRepeat(); + } + } + }} + +#line 9693 "Parser.cpp" + + break; + } + case 408: { + { +#line 1488 "Parser.rl" + {te = p;p = p - 1;{ +#line 1488 "Parser.rl" + + addLiteral(currentSeq, octAccumulator, mode); + } + }} + +#line 9706 "Parser.cpp" + + break; + } + case 409: { + { +#line 1491 "Parser.rl" + {te = p;p = p - 1;{ +#line 1491 "Parser.rl" + + // If there are enough capturing sub expressions, this may be + // a back reference + accumulator = parseAsDecimal(octAccumulator); + if (accumulator < groupIndex) { + currentSeq->addComponent(std::make_unique(accumulator)); + } else { + addEscapedOctal(currentSeq, octAccumulator, mode); + } + } + }} + +#line 9726 "Parser.cpp" + + break; + } + case 410: { + { +#line 479 "Parser.rl" + {te = p;p = p - 1;{ +#line 479 "Parser.rl" + + if (accumulator == 0) { + throw LocatedParseError("Numbered reference cannot be zero"); + } + currentSeq->addComponent(std::make_unique(accumulator)); + } + }} + +#line 9742 "Parser.cpp" + + break; + } + case 411: { + { +#line 479 "Parser.rl" + {te = p;p = p - 1;{ +#line 479 "Parser.rl" + + if (accumulator == 0) { + throw LocatedParseError("Numbered reference cannot be zero"); + } + currentSeq->addComponent(std::make_unique(accumulator)); + } + }} + +#line 9758 "Parser.cpp" + + break; + } + case 412: { + { +#line 486 "Parser.rl" + {te = p;p = p - 1;{ +#line 486 "Parser.rl" + + // Accumulator is a negative offset. + if (accumulator == 0) { + throw LocatedParseError("Numbered reference cannot be zero"); + } + if (accumulator >= groupIndex) { + throw LocatedParseError("Invalid reference"); + } + unsigned idx = groupIndex - accumulator; + currentSeq->addComponent(std::make_unique(idx)); + } + }} + +#line 9779 "Parser.cpp" + + break; + } + case 413: { + { +#line 1557 "Parser.rl" + {te = p;p = p - 1;{ +#line 1557 "Parser.rl" + + throw LocatedParseError("Invalid reference after \\g"); + } + }} + +#line 9792 "Parser.cpp" + + break; + } + case 414: { + { +#line 1574 "Parser.rl" + {te = p;p = p - 1;{ +#line 1574 "Parser.rl" + + throw LocatedParseError("Value in \\o{...} sequence is non-octal or missing braces"); + } + }} + +#line 9805 "Parser.cpp" + + break; + } + case 415: { + { +#line 1578 "Parser.rl" + {te = p;p = p - 1;{ +#line 1578 "Parser.rl" + + addEscapedHex(currentSeq, accumulator, mode); + } + }} + +#line 9818 "Parser.cpp" + + break; + } + case 416: { + { +#line 1596 "Parser.rl" + {te = p;p = p - 1;{ +#line 1596 "Parser.rl" + + throw LocatedParseError("Value in \\x{...} sequence is non-hex or missing }"); + } + }} + +#line 9831 "Parser.cpp" + + break; + } + case 417: { + { +#line 1600 "Parser.rl" + {te = p;p = p - 1;{ +#line 1600 "Parser.rl" + + if (te - ts < 3) { + assert(te - ts == 2); + throw LocatedParseError(SLASH_C_ERROR); + } else { + assert(te - ts == 3); + addLiteral(currentSeq, decodeCtrl(ts[2]), mode); + } + } + }} + +#line 9850 "Parser.cpp" + + break; + } + case 418: { + { +#line 1700 "Parser.rl" + {te = p;p = p - 1;{ +#line 1700 "Parser.rl" + throw LocatedParseError("Malformed property"); } + }} + +#line 9861 "Parser.cpp" + + break; + } + case 419: { + { +#line 1701 "Parser.rl" + {te = p;p = p - 1;{ +#line 1701 "Parser.rl" + throw LocatedParseError("Malformed property"); } + }} + +#line 9872 "Parser.cpp" + + break; + } + case 420: { + { +#line 1719 "Parser.rl" + {te = p;p = p - 1;{ +#line 1719 "Parser.rl" + + ostringstream str; + str << "\\k at index " << ts - ptr << " not supported."; + throw ParseError(str.str()); + } + }} + +#line 9887 "Parser.cpp" + + break; + } + case 421: { + { +#line 1742 "Parser.rl" + {te = p;p = p - 1;{ +#line 1742 "Parser.rl" + + assert(ts + 1 == pe); + ostringstream str; + str << "Unescaped \\ at end of input, index " << ts - ptr << "."; + throw ParseError(str.str()); + } + }} + +#line 9903 "Parser.cpp" + + break; + } + case 422: { + { +#line 396 "Parser.rl" + {te = p;p = p - 1;{ +#line 396 "Parser.rl" + + throw LocatedParseError("Conditional subpattern unsupported"); + } + }} + +#line 9916 "Parser.cpp" + + break; + } + case 423: { + { +#line 1852 "Parser.rl" + {te = p;p = p - 1;{ +#line 1852 "Parser.rl" + + throw LocatedParseError("Unrecognised character after (?"); + } + }} + +#line 9929 "Parser.cpp" + + break; + } + case 424: { + { +#line 1884 "Parser.rl" + {te = p;p = p - 1;{ +#line 1884 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 9943 "Parser.cpp" + + break; + } + case 425: { + { +#line 1898 "Parser.rl" + {te = p;p = p - 1;{ +#line 1898 "Parser.rl" + + addLiteral(currentSeq, *ts, mode); + } + }} + +#line 9956 "Parser.cpp" + + break; + } + case 426: { + { +#line 328 "Parser.rl" + {p = ((te))-1; + { +#line 328 "Parser.rl" + + PUSH_SEQUENCE; + auto seq = std::make_unique(); + seq->setCaptureIndex(groupIndex++); + currentSeq = enterSequence(currentSeq, move(seq)); + } + }} + +#line 9973 "Parser.cpp" + + break; + } + case 427: { + { +#line 421 "Parser.rl" + {p = ((te))-1; + { +#line 421 "Parser.rl" + + assert(!currentCls); + assert(!inCharClass); // not reentrant + currentCls = getComponentClass(mode); + inCharClass = true; + inCharClassEarly = true; + currentClsBegin = ts; + {cs = 836;goto _again;}} + }} + +#line 9992 "Parser.cpp" + + break; + } + case 428: { + { +#line 1557 "Parser.rl" + {p = ((te))-1; + { +#line 1557 "Parser.rl" + + throw LocatedParseError("Invalid reference after \\g"); + } + }} + +#line 10006 "Parser.cpp" + + break; + } + case 429: { + { +#line 1574 "Parser.rl" + {p = ((te))-1; + { +#line 1574 "Parser.rl" + + throw LocatedParseError("Value in \\o{...} sequence is non-octal or missing braces"); + } + }} + +#line 10020 "Parser.cpp" + + break; + } + case 430: { + { +#line 1596 "Parser.rl" + {p = ((te))-1; + { +#line 1596 "Parser.rl" + + throw LocatedParseError("Value in \\x{...} sequence is non-hex or missing }"); + } + }} + +#line 10034 "Parser.cpp" + + break; + } + case 431: { + { +#line 1719 "Parser.rl" + {p = ((te))-1; + { +#line 1719 "Parser.rl" + + ostringstream str; + str << "\\k at index " << ts - ptr << " not supported."; + throw ParseError(str.str()); + } + }} + +#line 10050 "Parser.cpp" + + break; + } + case 432: { + { +#line 396 "Parser.rl" + {p = ((te))-1; + { +#line 396 "Parser.rl" + + throw LocatedParseError("Conditional subpattern unsupported"); + } + }} + +#line 10064 "Parser.cpp" + + break; + } + case 433: { + { +#line 1852 "Parser.rl" + {p = ((te))-1; + { +#line 1852 "Parser.rl" + + throw LocatedParseError("Unrecognised character after (?"); + } + }} + +#line 10078 "Parser.cpp" + + break; + } + case 434: { + { +#line 1884 "Parser.rl" + {p = ((te))-1; + { +#line 1884 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 10093 "Parser.cpp" + + break; + } + case 435: { + { +#line 1898 "Parser.rl" + {p = ((te))-1; + { +#line 1898 "Parser.rl" + + addLiteral(currentSeq, *ts, mode); + } + }} + +#line 10107 "Parser.cpp" + + break; + } + case 436: { + { +#line 1 "NONE" + {switch( act ) { + case 288: { + p = ((te))-1; + { +#line 1491 "Parser.rl" + + // If there are enough capturing sub expressions, this may be + // a back reference + accumulator = parseAsDecimal(octAccumulator); + if (accumulator < groupIndex) { + currentSeq->addComponent(std::make_unique(accumulator)); + } else { + addEscapedOctal(currentSeq, octAccumulator, mode); + } + } + break; + } + case 290: { + p = ((te))-1; + { +#line 1508 "Parser.rl" + + // if there are enough left parens to this point, back ref + if (accumulator < groupIndex) { + currentSeq->addComponent(std::make_unique(accumulator)); + } else { + // Otherwise, we interpret the first three digits as an + // octal escape, and the remaining characters stand for + // themselves as literals. + const char *s = ts; + unsigned int accum = 0; + unsigned int oct_digits = 0; + assert(*s == '\\'); // token starts at backslash + for (++s; s < te && oct_digits < 3; ++oct_digits, ++s) { + u8 digit = *s - '0'; + if (digit < 8) { + accum = digit + accum * 8; + } else { + break; + } + } + + if (oct_digits > 0) { + addEscapedOctal(currentSeq, accum, mode); + } + + // And then the rest of the digits, if any, are literal. + for (; s < te; ++s) { + addLiteral(currentSeq, *s, mode); + } + } + } + break; + } + case 330: { + p = ((te))-1; + { +#line 1737 "Parser.rl" + + addLiteral(currentSeq, *(ts + 1), mode); + } + break; + } + }} + } + +#line 10179 "Parser.cpp" + + break; + } + } + _nacts -= 1; + _acts += 1; + } + +} + +_again: {} +if ( p == eof ) { + if ( cs >= 746 ) + goto _out; +} +else { + _acts = ( _regex_actions + (_regex_to_state_actions[cs])); + _nacts = (unsigned int)(*( _acts)); + _acts += 1; + while ( _nacts > 0 ) { + switch ( (*( _acts)) ) { + case 23: { + { +#line 1 "NONE" + {ts = 0;}} + +#line 10205 "Parser.cpp" + + break; + } + } + _nacts -= 1; + _acts += 1; + } + + if ( cs != 0 ) { + p += 1; + goto _resume; + } +} +_out: {} +} + +#line 1983 "Parser.rl" + + +if (p != pe && *p != '\0') { +// didn't make it to the end of our input, but we didn't throw a ParseError? +assert(0); +ostringstream str; +str << "Parse error at index " << (p - ptr) << "."; +throw ParseError(str.str()); +} + +if (currentCls) { +assert(inCharClass); +assert(currentClsBegin); +ostringstream oss; +oss << "Unterminated character class starting at index " +<< currentClsBegin - ptr << "."; +throw ParseError(oss.str()); +} + +if (inComment) { +throw ParseError("Unterminated comment."); +} + +if (!sequences.empty()) { +ostringstream str; +str << "Missing close parenthesis for group started at index " +<< sequences.back().seqOffset << "."; +throw ParseError(str.str()); +} + +// Unlikely, but possible +if (groupIndex > 65535) { +throw ParseError("The maximum number of capturing subexpressions is 65535."); +} + +// Finalize the top-level sequence, which will take care of any +// top-level alternation. +currentSeq->finalize(); +assert(currentSeq == rootSeq.get()); + +// Ensure that all references are valid. +checkReferences(*rootSeq, groupIndex, groupNames); + +return move(rootSeq); +} catch (LocatedParseError &error) { +if (ts >= ptr && ts <= pe) { +error.locate(ts - ptr); +} else { +error.locate(0); +} +throw; +} +} + +} // namespace ue2 diff --git a/contrib/vectorscan-cmake/rageled_files/aarch64/control_verbs.cpp b/contrib/vectorscan-cmake/rageled_files/aarch64/control_verbs.cpp new file mode 100644 index 00000000000..6204fc0a314 --- /dev/null +++ b/contrib/vectorscan-cmake/rageled_files/aarch64/control_verbs.cpp @@ -0,0 +1,547 @@ +#line 1 "control_verbs.rl" +/* +* Copyright (c) 2017, Intel Corporation +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* +* * Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. +* * 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. +* * Neither the name of Intel Corporation nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. +*/ + +/** +* \file +* \brief Parser for control verbs that can occur at the beginning of a pattern. +*/ + +#include "parser/control_verbs.h" + +#include "parser/Parser.h" +#include "parser/parse_error.h" + +#include +#include + +using namespace std; + +namespace ue2 { + + const char *read_control_verbs(const char *ptr, const char *end, size_t start, + ParseMode &mode) { + const char *p = ptr; + const char *pe = end; + const char *eof = pe; + const char *ts, *te; + int cs; + UNUSED int act; + + +#line 56 "control_verbs.cpp" +static const signed char _ControlVerbs_actions[] = { + 0, 1, 0, 1, 1, 1, 2, 1, + 3, 1, 4, 1, 5, 1, 6, 1, + 7, 1, 8, 1, 9, 0 + }; + + static const short _ControlVerbs_key_offsets[] = { + 0, 7, 8, 10, 12, 14, 16, 18, + 20, 21, 23, 25, 27, 30, 32, 34, + 36, 38, 40, 42, 44, 46, 48, 50, + 52, 55, 57, 59, 61, 63, 66, 68, + 70, 72, 74, 76, 79, 82, 84, 86, + 88, 90, 92, 94, 96, 98, 100, 102, + 105, 107, 109, 111, 113, 115, 117, 119, + 121, 123, 125, 127, 129, 131, 133, 135, + 137, 139, 141, 143, 146, 148, 149, 151, + 155, 157, 159, 160, 161, 0 + }; + + static const char _ControlVerbs_trans_keys[] = { + 41u, 65u, 66u, 67u, 76u, 78u, 85u, 41u, + 41u, 78u, 41u, 89u, 41u, 67u, 41u, 82u, + 41u, 76u, 41u, 70u, 41u, 41u, 83u, 41u, + 82u, 41u, 95u, 41u, 65u, 85u, 41u, 78u, + 41u, 89u, 41u, 67u, 41u, 78u, 41u, 73u, + 41u, 67u, 41u, 79u, 41u, 68u, 41u, 69u, + 41u, 82u, 41u, 76u, 41u, 70u, 73u, 41u, + 77u, 41u, 73u, 41u, 84u, 41u, 95u, 41u, + 77u, 82u, 41u, 65u, 41u, 84u, 41u, 67u, + 41u, 72u, 41u, 61u, 41u, 48u, 57u, 41u, + 48u, 57u, 41u, 69u, 41u, 67u, 41u, 85u, + 41u, 82u, 41u, 83u, 41u, 73u, 41u, 79u, + 41u, 78u, 41u, 79u, 41u, 95u, 41u, 65u, + 83u, 41u, 85u, 41u, 84u, 41u, 79u, 41u, + 95u, 41u, 80u, 41u, 79u, 41u, 83u, 41u, + 83u, 41u, 69u, 41u, 83u, 41u, 83u, 41u, + 84u, 41u, 65u, 41u, 82u, 41u, 84u, 41u, + 95u, 41u, 79u, 41u, 80u, 41u, 84u, 41u, + 67u, 84u, 41u, 80u, 41u, 41u, 70u, 41u, + 49u, 51u, 56u, 41u, 54u, 41u, 50u, 41u, + 40u, 42u, 0u + }; + + static const signed char _ControlVerbs_single_lengths[] = { + 7, 1, 2, 2, 2, 2, 2, 2, + 1, 2, 2, 2, 3, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 3, 2, 2, 2, 2, 3, 2, 2, + 2, 2, 2, 1, 1, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 3, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 3, 2, 1, 2, 4, + 2, 2, 1, 1, 1, 0 + }; + + static const signed char _ControlVerbs_range_lengths[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 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, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0 + }; + + static const short _ControlVerbs_index_offsets[] = { + 0, 8, 10, 13, 16, 19, 22, 25, + 28, 30, 33, 36, 39, 43, 46, 49, + 52, 55, 58, 61, 64, 67, 70, 73, + 76, 80, 83, 86, 89, 92, 96, 99, + 102, 105, 108, 111, 114, 117, 120, 123, + 126, 129, 132, 135, 138, 141, 144, 147, + 151, 154, 157, 160, 163, 166, 169, 172, + 175, 178, 181, 184, 187, 190, 193, 196, + 199, 202, 205, 208, 212, 215, 217, 220, + 225, 228, 231, 233, 235, 0 + }; + + static const signed char _ControlVerbs_cond_targs[] = { + 75, 2, 9, 22, 24, 45, 67, 1, + 75, 1, 75, 3, 1, 75, 4, 1, + 75, 5, 1, 75, 6, 1, 75, 7, + 1, 75, 8, 1, 75, 1, 75, 10, + 1, 75, 11, 1, 75, 12, 1, 75, + 13, 16, 1, 75, 14, 1, 75, 15, + 1, 75, 5, 1, 75, 17, 1, 75, + 18, 1, 75, 19, 1, 75, 20, 1, + 75, 21, 1, 75, 8, 1, 75, 23, + 1, 75, 7, 1, 75, 8, 25, 1, + 75, 26, 1, 75, 27, 1, 75, 28, + 1, 75, 29, 1, 75, 30, 37, 1, + 75, 31, 1, 75, 32, 1, 75, 33, + 1, 75, 34, 1, 75, 35, 1, 75, + 36, 1, 75, 36, 1, 75, 38, 1, + 75, 39, 1, 75, 40, 1, 75, 41, + 1, 75, 42, 1, 75, 43, 1, 75, + 44, 1, 75, 34, 1, 75, 46, 1, + 75, 47, 1, 75, 48, 59, 1, 75, + 49, 1, 75, 50, 1, 75, 51, 1, + 75, 52, 1, 75, 53, 1, 75, 54, + 1, 75, 55, 1, 75, 56, 1, 75, + 57, 1, 75, 58, 1, 75, 8, 1, + 75, 60, 1, 75, 61, 1, 75, 62, + 1, 75, 63, 1, 75, 64, 1, 75, + 65, 1, 75, 66, 1, 75, 8, 1, + 75, 68, 70, 1, 75, 69, 1, 75, + 1, 75, 71, 1, 75, 72, 73, 74, + 1, 75, 8, 1, 75, 8, 1, 75, + 1, 76, 75, 0, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 0 + }; + + static const signed char _ControlVerbs_cond_actions[] = { + 19, 0, 0, 0, 0, 0, 0, 0, + 13, 0, 13, 0, 0, 13, 0, 0, + 11, 0, 0, 13, 0, 0, 13, 0, + 0, 13, 0, 0, 11, 0, 13, 0, + 0, 13, 0, 0, 13, 0, 0, 13, + 0, 0, 0, 13, 0, 0, 13, 0, + 0, 13, 0, 0, 13, 0, 0, 13, + 0, 0, 13, 0, 0, 13, 0, 0, + 13, 0, 0, 13, 0, 0, 13, 0, + 0, 11, 0, 0, 13, 0, 0, 0, + 13, 0, 0, 13, 0, 0, 13, 0, + 0, 13, 0, 0, 13, 0, 0, 0, + 13, 0, 0, 13, 0, 0, 13, 0, + 0, 13, 0, 0, 13, 0, 0, 13, + 0, 0, 11, 0, 0, 13, 0, 0, + 13, 0, 0, 13, 0, 0, 13, 0, + 0, 13, 0, 0, 13, 0, 0, 13, + 0, 0, 13, 0, 0, 13, 0, 0, + 13, 0, 0, 13, 0, 0, 0, 13, + 0, 0, 13, 0, 0, 13, 0, 0, + 13, 0, 0, 13, 0, 0, 13, 0, + 0, 13, 0, 0, 13, 0, 0, 13, + 0, 0, 13, 0, 0, 13, 0, 0, + 13, 0, 0, 13, 0, 0, 13, 0, + 0, 13, 0, 0, 13, 0, 0, 13, + 0, 0, 13, 0, 0, 13, 0, 0, + 13, 0, 0, 0, 13, 0, 0, 9, + 0, 13, 0, 0, 7, 0, 0, 0, + 0, 13, 0, 0, 13, 0, 0, 7, + 0, 5, 15, 0, 17, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 0, 17, 0 + }; + + static const signed char _ControlVerbs_to_state_actions[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 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, 0, 0 + }; + + static const signed char _ControlVerbs_from_state_actions[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0 + }; + + static const short _ControlVerbs_eof_trans[] = { + 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 0 + }; + + static const int ControlVerbs_start = 75; + static const int ControlVerbs_first_final = 75; + static const int ControlVerbs_error = -1; + + static const int ControlVerbs_en_main = 75; + + +#line 269 "control_verbs.cpp" + { + cs = (int)ControlVerbs_start; + ts = 0; + te = 0; + } + +#line 105 "control_verbs.rl" + + + try { + +#line 278 "control_verbs.cpp" + { + int _klen; + unsigned int _trans = 0; + const char * _keys; + const signed char * _acts; + unsigned int _nacts; + _resume: {} + if ( p == pe && p != eof ) + goto _out; + _acts = ( _ControlVerbs_actions + (_ControlVerbs_from_state_actions[cs])); + _nacts = (unsigned int)(*( _acts)); + _acts += 1; + while ( _nacts > 0 ) { + switch ( (*( _acts)) ) { + case 1: { + { +#line 1 "NONE" + {ts = p;}} + +#line 297 "control_verbs.cpp" + + break; + } + } + _nacts -= 1; + _acts += 1; + } + + if ( p == eof ) { + if ( _ControlVerbs_eof_trans[cs] > 0 ) { + _trans = (unsigned int)_ControlVerbs_eof_trans[cs] - 1; + } + } + else { + _keys = ( _ControlVerbs_trans_keys + (_ControlVerbs_key_offsets[cs])); + _trans = (unsigned int)_ControlVerbs_index_offsets[cs]; + + _klen = (int)_ControlVerbs_single_lengths[cs]; + if ( _klen > 0 ) { + const char *_lower = _keys; + const char *_upper = _keys + _klen - 1; + const char *_mid; + while ( 1 ) { + if ( _upper < _lower ) { + _keys += _klen; + _trans += (unsigned int)_klen; + break; + } + + _mid = _lower + ((_upper-_lower) >> 1); + if ( ( (*( p))) < (*( _mid)) ) + _upper = _mid - 1; + else if ( ( (*( p))) > (*( _mid)) ) + _lower = _mid + 1; + else { + _trans += (unsigned int)(_mid - _keys); + goto _match; + } + } + } + + _klen = (int)_ControlVerbs_range_lengths[cs]; + if ( _klen > 0 ) { + const char *_lower = _keys; + const char *_upper = _keys + (_klen<<1) - 2; + const char *_mid; + while ( 1 ) { + if ( _upper < _lower ) { + _trans += (unsigned int)_klen; + break; + } + + _mid = _lower + (((_upper-_lower) >> 1) & ~1); + if ( ( (*( p))) < (*( _mid)) ) + _upper = _mid - 2; + else if ( ( (*( p))) > (*( _mid + 1)) ) + _lower = _mid + 2; + else { + _trans += (unsigned int)((_mid - _keys)>>1); + break; + } + } + } + + _match: {} + } + cs = (int)_ControlVerbs_cond_targs[_trans]; + + if ( _ControlVerbs_cond_actions[_trans] != 0 ) { + + _acts = ( _ControlVerbs_actions + (_ControlVerbs_cond_actions[_trans])); + _nacts = (unsigned int)(*( _acts)); + _acts += 1; + while ( _nacts > 0 ) { + switch ( (*( _acts)) ) + { + case 2: { + { +#line 1 "NONE" + {te = p+1;}} + +#line 378 "control_verbs.cpp" + + break; + } + case 3: { + { +#line 76 "control_verbs.rl" + {te = p+1;{ +#line 76 "control_verbs.rl" + + mode.utf8 = true; + } + }} + +#line 391 "control_verbs.cpp" + + break; + } + case 4: { + { +#line 80 "control_verbs.rl" + {te = p+1;{ +#line 80 "control_verbs.rl" + + mode.ucp = true; + } + }} + +#line 404 "control_verbs.cpp" + + break; + } + case 5: { + { +#line 84 "control_verbs.rl" + {te = p+1;{ +#line 84 "control_verbs.rl" + + ostringstream str; + str << "Unsupported control verb " << string(ts, te - ts); + throw LocatedParseError(str.str()); + } + }} + +#line 419 "control_verbs.cpp" + + break; + } + case 6: { + { +#line 90 "control_verbs.rl" + {te = p+1;{ +#line 90 "control_verbs.rl" + + ostringstream str; + str << "Unknown control verb " << string(ts, te - ts); + throw LocatedParseError(str.str()); + } + }} + +#line 434 "control_verbs.cpp" + + break; + } + case 7: { + { +#line 97 "control_verbs.rl" + {te = p+1;{ +#line 97 "control_verbs.rl" + + {p = p - 1; } + {p += 1; goto _out; } + } + }} + +#line 448 "control_verbs.cpp" + + break; + } + case 8: { + { +#line 97 "control_verbs.rl" + {te = p;p = p - 1;{ +#line 97 "control_verbs.rl" + + {p = p - 1; } + {p += 1; goto _out; } + } + }} + +#line 462 "control_verbs.cpp" + + break; + } + case 9: { + { +#line 97 "control_verbs.rl" + {p = ((te))-1; + { +#line 97 "control_verbs.rl" + + {p = p - 1; } + {p += 1; goto _out; } + } + }} + +#line 477 "control_verbs.cpp" + + break; + } + } + _nacts -= 1; + _acts += 1; + } + + } + + if ( p == eof ) { + if ( cs >= 75 ) + goto _out; + } + else { + _acts = ( _ControlVerbs_actions + (_ControlVerbs_to_state_actions[cs])); + _nacts = (unsigned int)(*( _acts)); + _acts += 1; + while ( _nacts > 0 ) { + switch ( (*( _acts)) ) { + case 0: { + { +#line 1 "NONE" + {ts = 0;}} + +#line 502 "control_verbs.cpp" + + break; + } + } + _nacts -= 1; + _acts += 1; + } + + p += 1; + goto _resume; + } + _out: {} + } + +#line 108 "control_verbs.rl" + + } catch (LocatedParseError &error) { + if (ts >= ptr && ts <= pe) { + error.locate(ts - ptr + start); + } else { + error.locate(0); + } + throw; + } + + return p; + } + +} // namespace ue2 diff --git a/contrib/vectorscan-cmake/rageled_files/amd64/Parser.cpp b/contrib/vectorscan-cmake/rageled_files/amd64/Parser.cpp new file mode 100644 index 00000000000..ffda1515582 --- /dev/null +++ b/contrib/vectorscan-cmake/rageled_files/amd64/Parser.cpp @@ -0,0 +1,10725 @@ +#line 1 "Parser.rl" +/* +* Copyright (c) 2015-2017, Intel Corporation +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* +* * Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. +* * 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. +* * Neither the name of Intel Corporation nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. +*/ + +/** \file +* \brief Parser code (generated with Ragel from Parser.rl). +*/ + +#include "config.h" + +/* Parser.cpp is a built source, may not be in same dir as parser files */ +#include "parser/check_refs.h" +#include "parser/control_verbs.h" +#include "parser/ComponentAlternation.h" +#include "parser/ComponentAssertion.h" +#include "parser/ComponentAtomicGroup.h" +#include "parser/ComponentBackReference.h" +#include "parser/ComponentBoundary.h" +#include "parser/ComponentByte.h" +#include "parser/ComponentClass.h" +#include "parser/ComponentCondReference.h" +#include "parser/ComponentEmpty.h" +#include "parser/ComponentEUS.h" +#include "parser/Component.h" +#include "parser/ComponentRepeat.h" +#include "parser/ComponentSequence.h" +#include "parser/ComponentWordBoundary.h" +#include "parser/parse_error.h" +#include "parser/Parser.h" +#include "ue2common.h" +#include "util/compare.h" +#include "util/flat_containers.h" +#include "util/unicode_def.h" +#include "util/verify_types.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +namespace ue2 { + +#define PUSH_SEQUENCE do {\ + sequences.push_back(ExprState(currentSeq, (size_t)(ts - ptr), \ + mode)); \ + } while(0) +#define POP_SEQUENCE do {\ + currentSeq = sequences.back().seq; \ + mode = sequences.back().mode; \ + sequences.pop_back(); \ + } while(0) + + namespace { + + /** \brief Structure representing current state as we're parsing (current + * sequence, current options). Stored in the 'sequences' vector. */ + struct ExprState { + ExprState(ComponentSequence *seq_in, size_t offset, + const ParseMode &mode_in) : + seq(seq_in), seqOffset(offset), mode(mode_in) {} + + ComponentSequence *seq; //!< current sequence + size_t seqOffset; //!< offset seq was entered, for error reporting + ParseMode mode; //!< current mode flags + }; + + } // namespace + + static + unsigned parseAsDecimal(unsigned oct) { + // The input was parsed as octal, but should have been parsed as decimal. + // Deconstruct the octal number and reconstruct into decimal + unsigned ret = 0; + unsigned multiplier = 1; + while (oct) { + ret += (oct & 0x7) * multiplier; + oct >>= 3; + multiplier *= 10; + } + return ret; + } + + /** \brief Maximum value for a positive integer. We use INT_MAX, as that's what + * PCRE uses. */ + static constexpr u32 MAX_NUMBER = INT_MAX; + + static + void pushDec(u32 *acc, char raw_digit) { + assert(raw_digit >= '0' && raw_digit <= '9'); + u32 digit_val = raw_digit - '0'; + + // Ensure that we don't overflow. + u64a val = ((u64a)*acc * 10) + digit_val; + if (val > MAX_NUMBER) { + throw LocatedParseError("Number is too big"); + } + + *acc = verify_u32(val); + } + + static + void pushOct(u32 *acc, char raw_digit) { + assert(raw_digit >= '0' && raw_digit <= '7'); + u32 digit_val = raw_digit - '0'; + + // Ensure that we don't overflow. + u64a val = ((u64a)*acc * 8) + digit_val; + if (val > MAX_NUMBER) { + throw LocatedParseError("Number is too big"); + } + + *acc = verify_u32(val); + } + + static + void throwInvalidRepeat(void) { + throw LocatedParseError("Invalid repeat"); + } + + static + void throwInvalidUtf8(void) { + throw ParseError("Expression is not valid UTF-8."); + } + + /** + * Adds the given child component to the parent sequence, returning a pointer + * to the new (child) "current sequence". + */ + static + ComponentSequence *enterSequence(ComponentSequence *parent, + unique_ptr child) { + assert(parent); + assert(child); + + ComponentSequence *seq = child.get(); + parent->addComponent(move(child)); + return seq; + } + + static + void addLiteral(ComponentSequence *currentSeq, char c, const ParseMode &mode) { + if (mode.utf8 && mode.caseless) { + /* leverage ComponentClass to generate the vertices */ + auto cc = getComponentClass(mode); + assert(cc); + cc->add(c); + cc->finalize(); + currentSeq->addComponent(move(cc)); + } else { + currentSeq->addComponent(getLiteralComponentClass(c, mode.caseless)); + } + } + + static + void addEscaped(ComponentSequence *currentSeq, unichar accum, + const ParseMode &mode, const char *err_msg) { + if (mode.utf8) { + /* leverage ComponentClass to generate the vertices */ + auto cc = getComponentClass(mode); + assert(cc); + cc->add(accum); + cc->finalize(); + currentSeq->addComponent(move(cc)); + } else { + if (accum > 255) { + throw LocatedParseError(err_msg); + } + addLiteral(currentSeq, (char)accum, mode); + } + } + + static + void addEscapedOctal(ComponentSequence *currentSeq, unichar accum, + const ParseMode &mode) { + addEscaped(currentSeq, accum, mode, "Octal value is greater than \\377"); + } + + static + void addEscapedHex(ComponentSequence *currentSeq, unichar accum, + const ParseMode &mode) { + addEscaped(currentSeq, accum, mode, + "Hexadecimal value is greater than \\xFF"); + } + +#define SLASH_C_ERROR "\\c must be followed by an ASCII character" + + static + u8 decodeCtrl(char raw) { + if (raw & 0x80) { + throw LocatedParseError(SLASH_C_ERROR); + } + return mytoupper(raw) ^ 0x40; + } + + static + unichar readUtf8CodePoint2c(const char *s) { + auto *ts = (const u8 *)s; + assert(ts[0] >= 0xc0 && ts[0] < 0xe0); + assert(ts[1] >= 0x80 && ts[1] < 0xc0); + unichar val = ts[0] & 0x1f; + val <<= 6; + val |= ts[1] & 0x3f; + DEBUG_PRINTF("utf8 %02hhx %02hhx ->\\x{%x}\n", ts[0], + ts[1], val); + return val; + } + + static + unichar readUtf8CodePoint3c(const char *s) { + auto *ts = (const u8 *)s; + assert(ts[0] >= 0xe0 && ts[0] < 0xf0); + assert(ts[1] >= 0x80 && ts[1] < 0xc0); + assert(ts[2] >= 0x80 && ts[2] < 0xc0); + unichar val = ts[0] & 0x0f; + val <<= 6; + val |= ts[1] & 0x3f; + val <<= 6; + val |= ts[2] & 0x3f; + DEBUG_PRINTF("utf8 %02hhx %02hhx %02hhx ->\\x{%x}\n", ts[0], + ts[1], ts[2], val); + return val; + } + + static + unichar readUtf8CodePoint4c(const char *s) { + auto *ts = (const u8 *)s; + assert(ts[0] >= 0xf0 && ts[0] < 0xf8); + assert(ts[1] >= 0x80 && ts[1] < 0xc0); + assert(ts[2] >= 0x80 && ts[2] < 0xc0); + assert(ts[3] >= 0x80 && ts[3] < 0xc0); + unichar val = ts[0] & 0x07; + val <<= 6; + val |= ts[1] & 0x3f; + val <<= 6; + val |= ts[2] & 0x3f; + val <<= 6; + val |= ts[3] & 0x3f; + DEBUG_PRINTF("utf8 %02hhx %02hhx %02hhx %02hhx ->\\x{%x}\n", ts[0], + ts[1], ts[2], ts[3], val); + return val; + } + + +#line 1909 "Parser.rl" + + + +#line 277 "Parser.cpp" +static const short _regex_actions[] = { + 0, 1, 0, 1, 1, 1, 2, 1, + 3, 1, 4, 1, 7, 1, 8, 1, + 9, 1, 10, 1, 11, 1, 12, 1, + 13, 1, 15, 1, 16, 1, 17, 1, + 18, 1, 19, 1, 20, 1, 21, 1, + 22, 1, 23, 1, 24, 1, 25, 1, + 26, 1, 27, 1, 28, 1, 29, 1, + 30, 1, 31, 1, 32, 1, 33, 1, + 34, 1, 35, 1, 36, 1, 37, 1, + 38, 1, 39, 1, 40, 1, 41, 1, + 42, 1, 43, 1, 44, 1, 45, 1, + 46, 1, 47, 1, 48, 1, 49, 1, + 50, 1, 51, 1, 52, 1, 53, 1, + 54, 1, 55, 1, 56, 1, 57, 1, + 58, 1, 59, 1, 60, 1, 61, 1, + 62, 1, 63, 1, 64, 1, 65, 1, + 66, 1, 67, 1, 68, 1, 69, 1, + 70, 1, 71, 1, 72, 1, 73, 1, + 74, 1, 75, 1, 76, 1, 77, 1, + 78, 1, 79, 1, 80, 1, 81, 1, + 82, 1, 83, 1, 84, 1, 85, 1, + 86, 1, 87, 1, 88, 1, 89, 1, + 90, 1, 91, 1, 92, 1, 93, 1, + 94, 1, 95, 1, 96, 1, 97, 1, + 98, 1, 99, 1, 100, 1, 101, 1, + 102, 1, 103, 1, 104, 1, 105, 1, + 106, 1, 107, 1, 108, 1, 109, 1, + 110, 1, 111, 1, 112, 1, 113, 1, + 114, 1, 115, 1, 116, 1, 117, 1, + 118, 1, 119, 1, 120, 1, 121, 1, + 122, 1, 123, 1, 124, 1, 125, 1, + 126, 1, 127, 1, 128, 1, 129, 1, + 130, 1, 131, 1, 132, 1, 133, 1, + 134, 1, 135, 1, 136, 1, 137, 1, + 138, 1, 139, 1, 140, 1, 141, 1, + 142, 1, 143, 1, 144, 1, 145, 1, + 146, 1, 147, 1, 148, 1, 149, 1, + 150, 1, 151, 1, 152, 1, 153, 1, + 154, 1, 155, 1, 156, 1, 157, 1, + 158, 1, 159, 1, 160, 1, 161, 1, + 162, 1, 163, 1, 164, 1, 165, 1, + 166, 1, 167, 1, 168, 1, 169, 1, + 170, 1, 171, 1, 172, 1, 173, 1, + 174, 1, 175, 1, 176, 1, 177, 1, + 178, 1, 179, 1, 180, 1, 181, 1, + 182, 1, 183, 1, 184, 1, 185, 1, + 186, 1, 187, 1, 188, 1, 189, 1, + 190, 1, 191, 1, 192, 1, 193, 1, + 194, 1, 195, 1, 196, 1, 197, 1, + 198, 1, 199, 1, 200, 1, 201, 1, + 202, 1, 203, 1, 204, 1, 205, 1, + 206, 1, 207, 1, 208, 1, 209, 1, + 210, 1, 211, 1, 212, 1, 213, 1, + 214, 1, 215, 1, 216, 1, 217, 1, + 218, 1, 219, 1, 220, 1, 221, 1, + 222, 1, 223, 1, 224, 1, 225, 1, + 226, 1, 227, 1, 228, 1, 229, 1, + 230, 1, 231, 1, 232, 1, 233, 1, + 234, 1, 235, 1, 236, 1, 237, 1, + 240, 1, 242, 1, 243, 1, 244, 1, + 245, 1, 246, 1, 247, 1, 248, 1, + 249, 1, 250, 1, 251, 1, 252, 1, + 253, 1, 254, 1, 255, 1, 256, 1, + 257, 1, 258, 1, 259, 1, 260, 1, + 261, 1, 262, 1, 263, 1, 264, 1, + 265, 1, 266, 1, 267, 1, 268, 1, + 269, 1, 270, 1, 271, 1, 272, 1, + 273, 1, 274, 1, 275, 1, 276, 1, + 277, 1, 278, 1, 279, 1, 280, 1, + 281, 1, 282, 1, 283, 1, 284, 1, + 285, 1, 286, 1, 287, 1, 288, 1, + 289, 1, 290, 1, 291, 1, 292, 1, + 293, 1, 294, 1, 295, 1, 296, 1, + 297, 1, 298, 1, 299, 1, 300, 1, + 301, 1, 302, 1, 303, 1, 307, 1, + 308, 1, 309, 1, 310, 1, 311, 1, + 312, 1, 313, 1, 314, 1, 315, 1, + 316, 1, 317, 1, 318, 1, 319, 1, + 320, 1, 321, 1, 322, 1, 323, 1, + 324, 1, 325, 1, 326, 1, 327, 1, + 328, 1, 329, 1, 330, 1, 331, 1, + 332, 1, 333, 1, 334, 1, 335, 1, + 336, 1, 337, 1, 338, 1, 342, 1, + 343, 1, 344, 1, 345, 1, 346, 1, + 347, 1, 348, 1, 349, 1, 350, 1, + 352, 1, 353, 1, 354, 1, 355, 1, + 356, 1, 357, 1, 358, 1, 359, 1, + 360, 1, 361, 1, 362, 1, 363, 1, + 364, 1, 365, 1, 366, 1, 367, 1, + 368, 1, 369, 1, 370, 1, 371, 1, + 372, 1, 373, 1, 374, 1, 375, 1, + 376, 1, 377, 1, 378, 1, 379, 1, + 380, 1, 381, 1, 382, 1, 383, 1, + 384, 1, 385, 1, 386, 1, 387, 1, + 388, 1, 389, 1, 390, 1, 391, 1, + 392, 1, 393, 1, 394, 1, 395, 1, + 396, 1, 397, 1, 398, 1, 399, 1, + 400, 1, 401, 1, 402, 1, 403, 1, + 404, 1, 405, 1, 406, 1, 407, 1, + 408, 1, 409, 1, 410, 1, 411, 1, + 412, 1, 413, 1, 414, 1, 415, 1, + 416, 1, 417, 1, 418, 1, 419, 1, + 420, 1, 421, 1, 422, 1, 423, 1, + 424, 1, 425, 1, 426, 1, 427, 1, + 428, 1, 429, 1, 430, 1, 431, 1, + 432, 1, 433, 1, 434, 1, 435, 1, + 436, 2, 3, 0, 2, 4, 5, 2, + 5, 1, 2, 9, 10, 2, 9, 238, + 2, 9, 239, 2, 9, 339, 2, 10, + 1, 2, 10, 340, 2, 10, 341, 2, + 11, 241, 2, 11, 351, 2, 12, 241, + 2, 12, 351, 2, 13, 241, 2, 13, + 351, 2, 14, 375, 2, 14, 376, 2, + 25, 0, 2, 25, 3, 2, 25, 6, + 2, 25, 14, 3, 25, 5, 306, 3, + 25, 10, 305, 3, 25, 14, 15, 4, + 25, 9, 304, 10, 0 + }; + + static const short _regex_key_offsets[] = { + 0, 0, 2, 4, 6, 7, 29, 37, + 45, 52, 60, 61, 69, 77, 85, 92, + 100, 103, 105, 114, 121, 129, 137, 140, + 146, 154, 157, 164, 171, 179, 186, 190, + 197, 200, 203, 205, 208, 211, 213, 216, + 219, 221, 222, 224, 225, 233, 235, 238, + 241, 242, 250, 258, 266, 274, 281, 289, + 296, 304, 311, 319, 321, 324, 331, 335, + 338, 341, 342, 344, 345, 347, 349, 350, + 351, 353, 354, 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, 365, 366, 369, + 370, 371, 372, 373, 374, 375, 376, 377, + 378, 379, 380, 381, 382, 383, 384, 385, + 386, 387, 388, 389, 390, 392, 393, 394, + 395, 396, 397, 399, 400, 401, 402, 403, + 404, 405, 406, 408, 409, 410, 411, 412, + 413, 414, 415, 416, 417, 418, 419, 420, + 421, 422, 423, 424, 425, 426, 427, 429, + 430, 431, 432, 433, 434, 435, 436, 437, + 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 450, 451, 452, 453, 454, + 455, 456, 457, 458, 459, 461, 462, 463, + 464, 465, 466, 467, 468, 469, 470, 471, + 472, 473, 474, 475, 476, 477, 478, 479, + 480, 481, 482, 483, 484, 485, 486, 487, + 488, 489, 490, 491, 492, 493, 494, 495, + 496, 497, 498, 499, 500, 501, 502, 503, + 504, 505, 506, 507, 508, 509, 510, 511, + 512, 513, 514, 515, 516, 517, 519, 520, + 521, 522, 523, 524, 525, 526, 527, 528, + 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, + 545, 546, 547, 548, 549, 550, 551, 552, + 553, 554, 555, 556, 557, 558, 559, 561, + 562, 563, 564, 565, 566, 567, 568, 569, + 570, 571, 572, 573, 574, 575, 576, 577, + 578, 579, 580, 582, 583, 584, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 601, 602, 603, 604, 605, + 606, 607, 608, 609, 610, 611, 612, 613, + 614, 615, 616, 617, 618, 620, 621, 622, + 623, 624, 625, 626, 627, 628, 629, 631, + 632, 633, 634, 635, 636, 637, 640, 641, + 642, 643, 644, 645, 646, 647, 648, 650, + 651, 652, 653, 654, 655, 656, 658, 659, + 660, 661, 662, 663, 664, 665, 666, 667, + 668, 669, 670, 671, 672, 673, 674, 675, + 676, 677, 678, 679, 680, 681, 682, 683, + 684, 685, 686, 687, 688, 689, 690, 691, + 692, 693, 694, 695, 696, 697, 698, 699, + 700, 701, 702, 704, 705, 706, 707, 708, + 709, 710, 714, 715, 716, 717, 718, 719, + 720, 721, 722, 723, 724, 725, 726, 727, + 728, 729, 730, 731, 732, 733, 734, 735, + 736, 737, 738, 739, 740, 741, 742, 743, + 744, 745, 746, 747, 748, 749, 750, 752, + 753, 754, 755, 756, 757, 758, 759, 760, + 761, 762, 763, 764, 765, 766, 767, 768, + 769, 770, 771, 773, 774, 775, 776, 777, + 778, 779, 780, 781, 782, 783, 784, 785, + 786, 787, 788, 789, 790, 791, 792, 793, + 794, 795, 796, 797, 798, 799, 800, 801, + 802, 803, 805, 806, 807, 808, 809, 810, + 811, 812, 813, 814, 815, 816, 817, 820, + 822, 823, 824, 825, 826, 827, 828, 829, + 830, 833, 834, 835, 836, 837, 838, 839, + 840, 841, 842, 843, 844, 845, 846, 847, + 849, 850, 851, 853, 854, 855, 856, 857, + 858, 859, 860, 861, 862, 863, 864, 865, + 866, 867, 868, 869, 870, 871, 872, 873, + 874, 875, 876, 877, 879, 881, 883, 886, + 889, 891, 906, 909, 912, 914, 928, 933, + 938, 942, 946, 949, 952, 956, 960, 963, + 966, 970, 974, 978, 981, 984, 988, 992, + 996, 1000, 1003, 1006, 1010, 1014, 1018, 1022, + 1025, 1028, 1032, 1036, 1040, 1044, 1047, 1050, + 1054, 1058, 1062, 1066, 1069, 1072, 1076, 1080, + 1084, 1088, 1091, 1094, 1099, 1103, 1107, 1111, + 1114, 1117, 1121, 1125, 1129, 1132, 1135, 1139, + 1143, 1147, 1151, 1154, 1157, 1161, 1165, 1169, + 1173, 1176, 1179, 1183, 1187, 1191, 1194, 1197, + 1201, 1205, 1209, 1213, 1217, 1220, 1223, 1228, + 1233, 1237, 1241, 1244, 1247, 1251, 1255, 1258, + 1261, 1265, 1269, 1273, 1276, 1279, 1283, 1287, + 1291, 1295, 1298, 1301, 1305, 1309, 1313, 1317, + 1320, 1323, 1327, 1331, 1335, 1339, 1342, 1345, + 1349, 1353, 1357, 1361, 1364, 1367, 1371, 1375, + 1379, 1383, 1386, 1389, 1394, 1398, 1402, 1406, + 1409, 1412, 1416, 1420, 1424, 1427, 1430, 1434, + 1438, 1442, 1446, 1449, 1452, 1456, 1460, 1464, + 1468, 1471, 1474, 1478, 1482, 1486, 1489, 1492, + 1496, 1500, 1504, 1508, 1512, 1515, 1518, 1521, + 1524, 1526, 1528, 1531, 1538, 1540, 1542, 1544, + 1546, 1548, 1550, 1577, 1579, 1581, 1583, 1585, + 1592, 1599, 1613, 1615, 1621, 1624, 1633, 1634, + 1637, 1640, 1647, 1649, 1651, 1653, 1656, 1701, + 1703, 1705, 1709, 1713, 1715, 1716, 1716, 1722, + 1724, 1726, 1728, 1730, 1733, 1734, 1735, 1742, + 1748, 1754, 1756, 1758, 1760, 1761, 1764, 1787, + 1790, 1795, 1804, 1806, 1807, 1809, 1814, 1817, + 1819, 1821, 1822, 1824, 1834, 1840, 1841, 1846, + 1850, 1858, 1860, 1869, 1873, 1874, 1875, 1879, + 1880, 1883, 1883, 1890, 1904, 1906, 1908, 1910, + 1913, 1952, 1954, 1956, 1958, 1960, 1961, 1961, + 1962, 1963, 1970, 1976, 1982, 1985, 1987, 1998, + 2000, 2002, 2004, 2005, 2016, 2018, 2020, 2022, + 2023, 2024, 0 + }; + + static const char _regex_trans_keys[] = { + -128, -65, -128, -65, -128, -65, 41, 33, + 35, 38, 39, 40, 41, 43, 45, 58, + 60, 61, 62, 63, 67, 80, 105, 109, + 115, 120, 123, 48, 57, 41, 95, 48, + 57, 65, 90, 97, 122, 39, 95, 48, + 57, 65, 90, 97, 122, 95, 48, 57, + 65, 90, 97, 122, 39, 95, 48, 57, + 65, 90, 97, 122, 41, 41, 95, 48, + 57, 65, 90, 97, 122, 41, 95, 48, + 57, 65, 90, 97, 122, 41, 95, 48, + 57, 65, 90, 97, 122, 95, 48, 57, + 65, 90, 97, 122, 62, 95, 48, 57, + 65, 90, 97, 122, 33, 60, 61, 33, + 61, 38, 41, 95, 48, 57, 65, 90, + 97, 122, 95, 48, 57, 65, 90, 97, + 122, 41, 95, 48, 57, 65, 90, 97, + 122, 41, 95, 48, 57, 65, 90, 97, + 122, 41, 48, 57, 41, 58, 105, 109, + 115, 120, 62, 95, 48, 57, 65, 90, + 97, 122, 41, 48, 57, 95, 48, 57, + 65, 90, 97, 122, 95, 48, 57, 65, + 90, 97, 122, 41, 95, 48, 57, 65, + 90, 97, 122, 95, 48, 57, 65, 90, + 97, 122, 105, 109, 115, 120, 41, 45, + 58, 105, 109, 115, 120, 46, 92, 93, + 46, 92, 93, 46, 92, 58, 92, 93, + 58, 92, 93, 58, 92, 61, 92, 93, + 61, 92, 93, 61, 92, 39, 48, 57, + 62, 45, 95, 48, 57, 65, 90, 97, + 122, 48, 57, 125, 48, 57, 125, 48, + 57, 125, 95, 125, 48, 57, 65, 90, + 97, 122, 95, 125, 48, 57, 65, 90, + 97, 122, 95, 125, 48, 57, 65, 90, + 97, 122, 95, 125, 48, 57, 65, 90, + 97, 122, 95, 48, 57, 65, 90, 97, + 122, 39, 95, 48, 57, 65, 90, 97, + 122, 95, 48, 57, 65, 90, 97, 122, + 62, 95, 48, 57, 65, 90, 97, 122, + 95, 48, 57, 65, 90, 97, 122, 95, + 125, 48, 57, 65, 90, 97, 122, 48, + 55, 125, 48, 55, 125, 48, 57, 65, + 70, 97, 102, 44, 125, 48, 57, 125, + 48, 57, 125, 48, 57, 41, 41, 80, + 41, 41, 70, 41, 56, 41, 121, 97, + 109, 98, 105, 99, 101, 110, 105, 97, + 110, 101, 115, 116, 97, 110, 108, 109, + 116, 105, 110, 101, 115, 101, 117, 109, + 97, 107, 110, 103, 97, 108, 105, 112, + 111, 109, 111, 102, 111, 97, 104, 105, + 109, 105, 108, 108, 101, 103, 104, 105, + 110, 101, 115, 101, 105, 100, 110, 114, + 97, 100, 105, 97, 110, 95, 65, 98, + 111, 114, 105, 103, 105, 110, 97, 108, + 105, 97, 110, 97, 101, 109, 114, 111, + 107, 101, 101, 109, 111, 110, 116, 105, + 99, 110, 101, 105, 102, 111, 114, 109, + 112, 114, 114, 105, 111, 116, 105, 108, + 108, 105, 99, 115, 118, 101, 114, 101, + 116, 97, 110, 97, 103, 97, 114, 105, + 121, 112, 116, 105, 97, 110, 95, 72, + 105, 101, 114, 111, 103, 108, 121, 112, + 104, 115, 104, 105, 111, 112, 105, 99, + 111, 114, 103, 105, 97, 110, 97, 103, + 111, 108, 105, 116, 105, 99, 116, 104, + 105, 99, 101, 101, 107, 106, 114, 97, + 114, 97, 116, 105, 109, 117, 107, 104, + 105, 110, 117, 108, 110, 111, 111, 98, + 114, 101, 119, 114, 97, 103, 97, 110, + 97, 112, 101, 114, 105, 97, 108, 95, + 65, 114, 97, 109, 97, 105, 99, 104, + 115, 101, 114, 105, 116, 101, 100, 99, + 114, 105, 112, 116, 105, 111, 110, 97, + 108, 95, 80, 97, 104, 114, 108, 97, + 118, 105, 116, 104, 105, 97, 110, 118, + 97, 110, 101, 115, 101, 105, 110, 116, + 121, 116, 104, 105, 110, 97, 100, 97, + 97, 107, 97, 110, 97, 97, 104, 95, + 76, 105, 97, 109, 114, 111, 115, 104, + 116, 104, 105, 101, 114, 111, 116, 105, + 110, 112, 99, 104, 97, 109, 110, 115, + 98, 117, 101, 97, 114, 95, 66, 117, + 99, 100, 105, 97, 110, 105, 97, 110, + 108, 110, 97, 121, 97, 108, 97, 109, + 100, 97, 105, 99, 116, 101, 105, 95, + 77, 97, 121, 101, 107, 110, 103, 111, + 108, 105, 97, 110, 97, 110, 109, 97, + 114, 119, 95, 84, 97, 105, 95, 76, + 117, 101, 111, 104, 97, 109, 95, 100, + 67, 104, 105, 107, 105, 95, 73, 80, + 83, 84, 116, 97, 108, 105, 99, 101, + 114, 115, 105, 97, 110, 111, 117, 116, + 104, 95, 65, 114, 97, 98, 105, 97, + 110, 117, 114, 107, 105, 99, 105, 121, + 97, 109, 97, 110, 121, 97, 97, 111, + 103, 115, 95, 80, 97, 101, 110, 105, + 99, 105, 97, 110, 106, 97, 110, 103, + 110, 105, 99, 109, 117, 97, 114, 105, + 116, 97, 110, 114, 97, 115, 104, 116, + 114, 97, 97, 118, 105, 97, 110, 110, + 104, 97, 108, 97, 110, 100, 97, 110, + 101, 115, 101, 108, 114, 111, 116, 105, + 95, 78, 97, 103, 114, 105, 105, 97, + 99, 103, 105, 109, 97, 98, 108, 111, + 103, 97, 110, 119, 97, 95, 76, 84, + 86, 101, 104, 97, 109, 105, 101, 116, + 105, 108, 108, 117, 103, 117, 97, 97, + 105, 110, 97, 98, 102, 101, 116, 97, + 110, 105, 110, 97, 103, 104, 97, 114, + 105, 116, 105, 99, 105, 110, 115, 112, + 100, 123, 94, 125, 94, -128, -65, -128, + -65, -128, -65, 46, 92, 93, 46, 92, + 93, 46, 92, 58, 92, 93, 94, 97, + 98, 99, 100, 103, 108, 112, 115, 117, + 119, 120, 58, 92, 93, 58, 92, 93, + 58, 92, 58, 92, 93, 97, 98, 99, + 100, 103, 108, 112, 115, 117, 119, 120, + 58, 92, 93, 108, 115, 58, 92, 93, + 110, 112, 58, 92, 93, 117, 58, 92, + 93, 109, 58, 92, 93, 58, 92, 93, + 58, 92, 93, 104, 58, 92, 93, 97, + 58, 92, 93, 58, 92, 93, 58, 92, + 93, 99, 58, 92, 93, 105, 58, 92, + 93, 105, 58, 92, 93, 58, 92, 93, + 58, 92, 93, 108, 58, 92, 93, 97, + 58, 92, 93, 110, 58, 92, 93, 107, + 58, 92, 93, 58, 92, 93, 58, 92, + 93, 110, 58, 92, 93, 116, 58, 92, + 93, 114, 58, 92, 93, 108, 58, 92, + 93, 58, 92, 93, 58, 92, 93, 105, + 58, 92, 93, 103, 58, 92, 93, 105, + 58, 92, 93, 116, 58, 92, 93, 58, + 92, 93, 58, 92, 93, 114, 58, 92, + 93, 97, 58, 92, 93, 112, 58, 92, + 93, 104, 58, 92, 93, 58, 92, 93, + 58, 92, 93, 111, 58, 92, 93, 119, + 58, 92, 93, 101, 58, 92, 93, 114, + 58, 92, 93, 58, 92, 93, 58, 92, + 93, 114, 117, 58, 92, 93, 105, 58, + 92, 93, 110, 58, 92, 93, 116, 58, + 92, 93, 58, 92, 93, 58, 92, 93, + 110, 58, 92, 93, 99, 58, 92, 93, + 116, 58, 92, 93, 58, 92, 93, 58, + 92, 93, 112, 58, 92, 93, 97, 58, + 92, 93, 99, 58, 92, 93, 101, 58, + 92, 93, 58, 92, 93, 58, 92, 93, + 112, 58, 92, 93, 112, 58, 92, 93, + 101, 58, 92, 93, 114, 58, 92, 93, + 58, 92, 93, 58, 92, 93, 111, 58, + 92, 93, 114, 58, 92, 93, 100, 58, + 92, 93, 58, 92, 93, 58, 92, 93, + 100, 58, 92, 93, 105, 58, 92, 93, + 103, 58, 92, 93, 105, 58, 92, 93, + 116, 58, 92, 93, 58, 92, 93, 58, + 92, 93, 108, 115, 58, 92, 93, 110, + 112, 58, 92, 93, 117, 58, 92, 93, + 109, 58, 92, 93, 58, 92, 93, 58, + 92, 93, 104, 58, 92, 93, 97, 58, + 92, 93, 58, 92, 93, 58, 92, 93, + 99, 58, 92, 93, 105, 58, 92, 93, + 105, 58, 92, 93, 58, 92, 93, 58, + 92, 93, 108, 58, 92, 93, 97, 58, + 92, 93, 110, 58, 92, 93, 107, 58, + 92, 93, 58, 92, 93, 58, 92, 93, + 110, 58, 92, 93, 116, 58, 92, 93, + 114, 58, 92, 93, 108, 58, 92, 93, + 58, 92, 93, 58, 92, 93, 105, 58, + 92, 93, 103, 58, 92, 93, 105, 58, + 92, 93, 116, 58, 92, 93, 58, 92, + 93, 58, 92, 93, 114, 58, 92, 93, + 97, 58, 92, 93, 112, 58, 92, 93, + 104, 58, 92, 93, 58, 92, 93, 58, + 92, 93, 111, 58, 92, 93, 119, 58, + 92, 93, 101, 58, 92, 93, 114, 58, + 92, 93, 58, 92, 93, 58, 92, 93, + 114, 117, 58, 92, 93, 105, 58, 92, + 93, 110, 58, 92, 93, 116, 58, 92, + 93, 58, 92, 93, 58, 92, 93, 110, + 58, 92, 93, 99, 58, 92, 93, 116, + 58, 92, 93, 58, 92, 93, 58, 92, + 93, 112, 58, 92, 93, 97, 58, 92, + 93, 99, 58, 92, 93, 101, 58, 92, + 93, 58, 92, 93, 58, 92, 93, 112, + 58, 92, 93, 112, 58, 92, 93, 101, + 58, 92, 93, 114, 58, 92, 93, 58, + 92, 93, 58, 92, 93, 111, 58, 92, + 93, 114, 58, 92, 93, 100, 58, 92, + 93, 58, 92, 93, 58, 92, 93, 100, + 58, 92, 93, 105, 58, 92, 93, 103, + 58, 92, 93, 105, 58, 92, 93, 116, + 58, 92, 93, 58, 92, 93, 61, 92, + 93, 61, 92, 93, 61, 92, 48, 55, + 125, 48, 55, 125, 48, 57, 65, 70, + 97, 102, -128, -65, -128, -65, -128, -65, + -128, -65, -128, -65, -128, -65, 0, 32, + 35, 36, 40, 41, 42, 43, 46, 63, + 91, 92, 94, 123, 124, -128, -65, -64, + -33, -32, -17, -16, -9, -8, -1, 9, + 13, -128, -65, -128, -65, -128, -65, 42, + 63, 95, 48, 57, 65, 90, 97, 122, + 95, 48, 57, 65, 90, 97, 122, 39, + 48, 60, 63, 82, 95, 49, 55, 56, + 57, 65, 90, 97, 122, 48, 57, 105, + 109, 115, 120, 48, 57, 41, 48, 57, + 33, 61, 95, 48, 57, 65, 90, 97, + 122, 123, 41, 48, 57, 60, 61, 62, + 41, 45, 58, 105, 109, 115, 120, 43, + 63, 43, 63, 43, 63, 46, 58, 61, + 48, 65, 66, 67, 68, 69, 71, 72, + 75, 76, 78, 80, 81, 82, 83, 85, + 86, 87, 88, 90, 97, 98, 99, 100, + 101, 102, 103, 104, 107, 108, 110, 111, + 112, 114, 115, 116, 117, 118, 119, 120, + 122, 49, 55, 56, 57, 48, 55, 48, + 55, 48, 55, 56, 57, 48, 55, 56, + 57, 48, 57, 123, 39, 45, 60, 123, + 48, 57, 48, 57, 48, 57, 48, 57, + 48, 57, 39, 60, 123, 123, 123, 123, + 48, 57, 65, 70, 97, 102, 48, 57, + 65, 70, 97, 102, 48, 57, 65, 70, + 97, 102, 48, 57, 43, 63, 41, 85, + 41, 41, 67, 84, 65, 66, 67, 68, + 69, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 82, 83, 84, 85, 86, + 88, 89, 90, 110, 114, 118, 97, 101, + 111, 114, 117, 97, 99, 102, 104, 110, + 111, 115, 117, 121, 109, 112, 101, 103, + 116, 101, 108, 111, 114, 117, 97, 101, + 105, 103, 117, 109, 110, 97, 97, 104, + 38, 97, 101, 105, 108, 109, 111, 116, + 117, 121, 97, 99, 101, 110, 111, 121, + 101, 100, 101, 107, 108, 111, 103, 108, + 114, 115, 99, 100, 101, 102, 104, 105, + 111, 115, 101, 117, 97, 99, 104, 105, + 107, 109, 111, 117, 121, 97, 101, 104, + 105, 103, 97, 97, 112, 115, 119, 105, + 108, 112, 115, 67, 76, 77, 78, 80, + 83, 90, 45, 91, 92, 93, -128, -65, + -64, -33, -32, -17, -16, -9, -8, -1, + -128, -65, -128, -65, -128, -65, 46, 58, + 61, 48, 68, 69, 72, 76, 78, 80, + 81, 83, 85, 86, 87, 97, 98, 99, + 100, 101, 102, 103, 104, 108, 110, 111, + 112, 114, 115, 116, 117, 118, 119, 120, + 49, 55, 56, 57, 65, 90, 105, 122, + 48, 55, 48, 55, 48, 55, 48, 55, + 123, 123, 123, 123, 48, 57, 65, 70, + 97, 102, 48, 57, 65, 70, 97, 102, + 48, 57, 65, 70, 97, 102, 92, 93, + 94, 69, 81, 92, -128, -65, -64, -33, + -32, -17, -16, -9, -8, -1, -128, -65, + -128, -65, -128, -65, 69, 92, -128, -65, + -64, -33, -32, -17, -16, -9, -8, -1, + -128, -65, -128, -65, -128, -65, 69, 41, + 10, 0 + }; + + static const signed char _regex_single_lengths[] = { + 0, 0, 0, 0, 1, 20, 2, 2, + 1, 2, 1, 2, 2, 2, 1, 2, + 3, 2, 3, 1, 2, 2, 1, 6, + 2, 1, 1, 1, 2, 1, 4, 7, + 3, 3, 2, 3, 3, 2, 3, 3, + 2, 1, 0, 1, 2, 0, 1, 1, + 1, 2, 2, 2, 2, 1, 2, 1, + 2, 1, 2, 0, 1, 1, 2, 1, + 1, 1, 2, 1, 2, 2, 1, 1, + 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 1, 1, 1, 1, 1, 1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88, 91, 98, 103, 109, 115, 118, + 125, 131, 134, 139, 144, 150, 155, 160, + 168, 172, 176, 179, 183, 187, 190, 194, + 198, 201, 203, 205, 207, 213, 215, 218, + 221, 223, 229, 235, 241, 247, 252, 258, + 263, 269, 274, 280, 282, 285, 290, 294, + 297, 300, 302, 305, 307, 310, 313, 315, + 317, 320, 322, 324, 326, 328, 330, 332, + 334, 336, 338, 340, 342, 344, 346, 350, + 352, 354, 356, 358, 360, 362, 364, 366, + 368, 370, 372, 374, 376, 378, 380, 382, + 384, 386, 388, 390, 392, 395, 397, 399, + 401, 403, 405, 408, 410, 412, 414, 416, + 418, 420, 422, 425, 427, 429, 431, 433, + 435, 437, 439, 441, 443, 445, 447, 449, + 451, 453, 455, 457, 459, 461, 463, 466, + 468, 470, 472, 474, 476, 478, 480, 482, + 484, 486, 488, 490, 492, 494, 496, 498, + 500, 502, 504, 507, 509, 511, 513, 515, + 517, 519, 521, 523, 525, 528, 530, 532, + 534, 536, 538, 540, 542, 544, 546, 548, + 550, 552, 554, 556, 558, 560, 562, 564, + 566, 568, 570, 572, 574, 576, 578, 580, + 582, 584, 586, 588, 590, 592, 594, 596, + 598, 600, 602, 604, 606, 608, 610, 612, + 614, 616, 618, 620, 622, 624, 626, 628, + 630, 632, 634, 636, 638, 640, 643, 645, + 647, 649, 651, 653, 655, 657, 659, 661, + 663, 665, 667, 669, 671, 673, 675, 677, + 679, 681, 683, 685, 687, 689, 691, 693, + 695, 697, 699, 701, 703, 705, 707, 709, + 711, 713, 715, 717, 719, 721, 723, 726, + 728, 730, 732, 734, 736, 738, 740, 742, + 744, 746, 748, 750, 752, 754, 756, 758, + 760, 762, 764, 767, 769, 771, 773, 775, + 777, 779, 781, 783, 785, 787, 789, 791, + 793, 795, 797, 802, 804, 806, 808, 810, + 812, 814, 816, 818, 820, 822, 824, 826, + 828, 830, 832, 834, 836, 839, 841, 843, + 845, 847, 849, 851, 853, 855, 857, 860, + 862, 864, 866, 868, 870, 872, 876, 878, + 880, 882, 884, 886, 888, 890, 892, 895, + 897, 899, 901, 903, 905, 907, 910, 912, + 914, 916, 918, 920, 922, 924, 926, 928, + 930, 932, 934, 936, 938, 940, 942, 944, + 946, 948, 950, 952, 954, 956, 958, 960, + 962, 964, 966, 968, 970, 972, 974, 976, + 978, 980, 982, 984, 986, 988, 990, 992, + 994, 996, 998, 1001, 1003, 1005, 1007, 1009, + 1011, 1013, 1018, 1020, 1022, 1024, 1026, 1028, + 1030, 1032, 1034, 1036, 1038, 1040, 1042, 1044, + 1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, + 1062, 1064, 1066, 1068, 1070, 1072, 1074, 1076, + 1078, 1080, 1082, 1084, 1086, 1088, 1090, 1093, + 1095, 1097, 1099, 1101, 1103, 1105, 1107, 1109, + 1111, 1113, 1115, 1117, 1119, 1121, 1123, 1125, + 1127, 1129, 1131, 1134, 1136, 1138, 1140, 1142, + 1144, 1146, 1148, 1150, 1152, 1154, 1156, 1158, + 1160, 1162, 1164, 1166, 1168, 1170, 1172, 1174, + 1176, 1178, 1180, 1182, 1184, 1186, 1188, 1190, + 1192, 1194, 1197, 1199, 1201, 1203, 1205, 1207, + 1209, 1211, 1213, 1215, 1217, 1219, 1221, 1225, + 1228, 1230, 1232, 1234, 1236, 1238, 1240, 1242, + 1244, 1248, 1250, 1252, 1254, 1256, 1258, 1260, + 1262, 1264, 1266, 1268, 1270, 1272, 1274, 1276, + 1279, 1281, 1283, 1286, 1288, 1290, 1292, 1294, + 1296, 1298, 1300, 1302, 1304, 1306, 1308, 1310, + 1312, 1314, 1316, 1318, 1320, 1322, 1324, 1326, + 1328, 1330, 1332, 1334, 1336, 1338, 1340, 1344, + 1348, 1351, 1367, 1371, 1375, 1378, 1393, 1399, + 1405, 1410, 1415, 1419, 1423, 1428, 1433, 1437, + 1441, 1446, 1451, 1456, 1460, 1464, 1469, 1474, + 1479, 1484, 1488, 1492, 1497, 1502, 1507, 1512, + 1516, 1520, 1525, 1530, 1535, 1540, 1544, 1548, + 1553, 1558, 1563, 1568, 1572, 1576, 1581, 1586, + 1591, 1596, 1600, 1604, 1610, 1615, 1620, 1625, + 1629, 1633, 1638, 1643, 1648, 1652, 1656, 1661, + 1666, 1671, 1676, 1680, 1684, 1689, 1694, 1699, + 1704, 1708, 1712, 1717, 1722, 1727, 1731, 1735, + 1740, 1745, 1750, 1755, 1760, 1764, 1768, 1774, + 1780, 1785, 1790, 1794, 1798, 1803, 1808, 1812, + 1816, 1821, 1826, 1831, 1835, 1839, 1844, 1849, + 1854, 1859, 1863, 1867, 1872, 1877, 1882, 1887, + 1891, 1895, 1900, 1905, 1910, 1915, 1919, 1923, + 1928, 1933, 1938, 1943, 1947, 1951, 1956, 1961, + 1966, 1971, 1975, 1979, 1985, 1990, 1995, 2000, + 2004, 2008, 2013, 2018, 2023, 2027, 2031, 2036, + 2041, 2046, 2051, 2055, 2059, 2064, 2069, 2074, + 2079, 2083, 2087, 2092, 2097, 2102, 2106, 2110, + 2115, 2120, 2125, 2130, 2135, 2139, 2143, 2147, + 2151, 2154, 2156, 2159, 2164, 2166, 2168, 2170, + 2172, 2174, 2176, 2198, 2200, 2202, 2204, 2207, + 2212, 2217, 2228, 2230, 2236, 2239, 2246, 2248, + 2251, 2255, 2263, 2266, 2269, 2272, 2276, 2320, + 2322, 2324, 2327, 2330, 2332, 2334, 2335, 2341, + 2343, 2345, 2347, 2349, 2353, 2355, 2357, 2362, + 2366, 2370, 2372, 2375, 2378, 2380, 2384, 2408, + 2412, 2418, 2428, 2431, 2433, 2436, 2442, 2446, + 2449, 2452, 2454, 2457, 2468, 2475, 2477, 2483, + 2488, 2497, 2500, 2510, 2515, 2517, 2519, 2524, + 2526, 2530, 2531, 2539, 2549, 2551, 2553, 2555, + 2559, 2595, 2597, 2599, 2601, 2603, 2605, 2606, + 2608, 2610, 2615, 2619, 2623, 2627, 2630, 2637, + 2639, 2641, 2643, 2645, 2652, 2654, 2656, 2658, + 2660, 2662, 0 + }; + + static const signed char _regex_trans_cond_spaces[] = { + 0, -1, 0, -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, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -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, + 0, -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, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -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, 0, -1, + 0, -1, 0, -1, 0, -1, 0, -1, + -1, -1, 1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 0, + 0, 0, 0, 0, -1, -1, 0, -1, + 0, -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, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -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, 0, 0, -1, 0, -1, 0, + -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, + 2, 2, -1, -1, -1, -1, -1, 0, + 0, 0, 0, 0, -1, 0, -1, 0, + -1, 0, -1, -1, -1, -1, 0, 0, + 0, 0, 0, -1, 0, -1, 0, -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, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -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 + }; + + static const short _regex_trans_offsets[] = { + 0, 2, 3, 5, 6, 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, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, + 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, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, + 323, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, + 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, + 363, 364, 365, 366, 367, 368, 369, 370, + 371, 372, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 384, 385, 386, + 387, 388, 389, 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 406, 407, 408, 409, 410, + 411, 412, 413, 414, 415, 416, 417, 418, + 419, 420, 421, 422, 423, 424, 425, 426, + 427, 428, 429, 430, 431, 432, 433, 434, + 435, 436, 437, 438, 439, 440, 441, 442, + 443, 444, 445, 446, 447, 448, 449, 450, + 451, 452, 453, 454, 455, 456, 457, 458, + 459, 460, 461, 462, 463, 464, 465, 466, + 467, 468, 469, 470, 471, 472, 473, 474, + 475, 476, 477, 478, 479, 480, 481, 482, + 483, 484, 485, 486, 487, 488, 489, 490, + 491, 492, 493, 494, 495, 496, 497, 498, + 499, 500, 501, 502, 503, 504, 505, 506, + 507, 508, 509, 510, 511, 512, 513, 514, + 515, 516, 517, 518, 519, 520, 521, 522, + 523, 524, 525, 526, 527, 528, 529, 530, + 531, 532, 533, 534, 535, 536, 537, 538, + 539, 540, 541, 542, 543, 544, 545, 546, + 547, 548, 549, 550, 551, 552, 553, 554, + 555, 556, 557, 558, 559, 560, 561, 562, + 563, 564, 565, 566, 567, 568, 569, 570, + 571, 572, 573, 574, 575, 576, 577, 578, + 579, 580, 581, 582, 583, 584, 585, 586, + 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, + 603, 604, 605, 606, 607, 608, 609, 610, + 611, 612, 613, 614, 615, 616, 617, 618, + 619, 620, 621, 622, 623, 624, 625, 626, + 627, 628, 629, 630, 631, 632, 633, 634, + 635, 636, 637, 638, 639, 640, 641, 642, + 643, 644, 645, 646, 647, 648, 649, 650, + 651, 652, 653, 654, 655, 656, 657, 658, + 659, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 670, 671, 672, 673, 674, + 675, 676, 677, 678, 679, 680, 681, 682, + 683, 684, 685, 686, 687, 688, 689, 690, + 691, 692, 693, 694, 695, 696, 697, 698, + 699, 700, 701, 702, 703, 704, 705, 706, + 707, 708, 709, 710, 711, 712, 713, 714, + 715, 716, 717, 718, 719, 720, 721, 722, + 723, 724, 725, 726, 727, 728, 729, 730, + 731, 732, 733, 734, 735, 736, 737, 738, + 739, 740, 741, 742, 743, 744, 745, 746, + 747, 748, 749, 750, 751, 752, 753, 754, + 755, 756, 757, 758, 759, 760, 761, 762, + 763, 764, 765, 766, 767, 768, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 778, + 779, 780, 781, 782, 783, 784, 785, 786, + 787, 788, 789, 790, 791, 792, 793, 794, + 795, 796, 797, 798, 799, 800, 801, 802, + 803, 804, 805, 806, 807, 808, 809, 810, + 811, 812, 813, 814, 815, 816, 817, 818, + 819, 820, 821, 822, 823, 824, 825, 826, + 827, 828, 829, 830, 831, 832, 833, 834, + 835, 836, 837, 838, 839, 840, 841, 842, + 843, 844, 845, 846, 847, 848, 849, 850, + 851, 852, 853, 854, 855, 856, 857, 858, + 859, 860, 861, 862, 863, 864, 865, 866, + 867, 868, 869, 870, 871, 872, 873, 874, + 875, 876, 877, 878, 879, 880, 881, 882, + 883, 884, 885, 886, 887, 888, 889, 890, + 891, 892, 893, 894, 895, 896, 897, 898, + 899, 900, 901, 902, 903, 904, 905, 906, + 907, 908, 909, 910, 911, 912, 913, 914, + 915, 916, 917, 918, 919, 920, 921, 922, + 923, 924, 925, 926, 927, 928, 929, 930, + 931, 932, 933, 934, 935, 936, 937, 938, + 939, 940, 941, 942, 943, 944, 945, 946, + 947, 948, 949, 950, 951, 952, 953, 954, + 955, 956, 957, 958, 959, 960, 961, 962, + 963, 964, 965, 966, 967, 968, 969, 970, + 971, 972, 973, 974, 975, 976, 977, 978, + 979, 980, 981, 982, 983, 984, 985, 986, + 987, 988, 989, 990, 991, 992, 993, 994, + 995, 996, 997, 998, 999, 1000, 1001, 1002, + 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, + 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, + 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, + 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, + 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, + 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, + 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, + 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, + 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, + 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, + 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, + 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, + 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, + 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, + 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, + 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, + 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, + 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, + 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, + 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1162, + 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, + 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, + 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, + 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, + 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, + 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, + 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, + 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, + 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, + 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, + 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, + 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, + 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, + 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, + 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, + 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, + 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, + 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, + 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, + 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, + 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, + 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1339, + 1340, 1342, 1343, 1345, 1346, 1347, 1348, 1349, + 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, + 1358, 1359, 1360, 1361, 1362, 1363, 1364, 1365, + 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, + 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, + 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, + 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, + 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, + 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, + 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, + 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, + 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, + 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, + 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, + 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, + 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, + 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, + 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, + 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, + 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, + 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, + 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, + 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, + 1526, 1527, 1528, 1529, 1530, 1531, 1532, 1533, + 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, + 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, + 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, + 1558, 1559, 1560, 1561, 1562, 1563, 1564, 1565, + 1566, 1567, 1568, 1569, 1570, 1571, 1572, 1573, + 1574, 1575, 1576, 1577, 1578, 1579, 1580, 1581, + 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, + 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, + 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, + 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, + 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, + 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, + 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, + 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, + 1646, 1647, 1648, 1649, 1650, 1651, 1652, 1653, + 1654, 1655, 1656, 1657, 1658, 1659, 1660, 1661, + 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, + 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, + 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, + 1686, 1687, 1688, 1689, 1690, 1691, 1692, 1693, + 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, + 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, + 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, + 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, + 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, + 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, + 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, + 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, + 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, + 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, + 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, + 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, + 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, + 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1805, + 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, + 1814, 1815, 1816, 1817, 1818, 1819, 1820, 1821, + 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, + 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, + 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1845, + 1846, 1847, 1848, 1849, 1850, 1851, 1852, 1853, + 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, + 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, + 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, + 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, + 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, + 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, + 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, + 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, + 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, + 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, + 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, + 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, + 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, + 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, + 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, + 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, + 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, + 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, + 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, + 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, + 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, + 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, + 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, + 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, + 2054, 2055, 2056, 2057, 2058, 2059, 2060, 2061, + 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, + 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, + 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, + 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, + 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101, + 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, + 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, + 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, + 2126, 2127, 2128, 2129, 2130, 2131, 2132, 2133, + 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, + 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, + 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, + 2158, 2159, 2160, 2161, 2162, 2163, 2164, 2165, + 2166, 2167, 2168, 2169, 2170, 2172, 2173, 2175, + 2176, 2178, 2179, 2181, 2182, 2184, 2185, 2187, + 2188, 2189, 2190, 2192, 2193, 2194, 2195, 2196, + 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, + 2206, 2208, 2210, 2212, 2214, 2215, 2216, 2218, + 2219, 2221, 2222, 2224, 2225, 2226, 2227, 2228, + 2229, 2230, 2231, 2232, 2233, 2234, 2235, 2236, + 2237, 2238, 2239, 2240, 2241, 2242, 2243, 2244, + 2245, 2246, 2247, 2248, 2249, 2250, 2251, 2252, + 2253, 2254, 2255, 2256, 2257, 2258, 2259, 2260, + 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, + 2269, 2270, 2271, 2272, 2273, 2274, 2275, 2276, + 2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, + 2285, 2286, 2287, 2288, 2289, 2290, 2291, 2292, + 2293, 2294, 2295, 2296, 2297, 2298, 2299, 2300, + 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, + 2309, 2310, 2311, 2312, 2313, 2314, 2315, 2316, + 2317, 2318, 2319, 2320, 2321, 2322, 2323, 2324, + 2325, 2326, 2327, 2328, 2329, 2330, 2331, 2332, + 2333, 2334, 2335, 2336, 2337, 2338, 2339, 2340, + 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, + 2349, 2350, 2351, 2352, 2353, 2354, 2355, 2356, + 2357, 2358, 2359, 2360, 2361, 2362, 2363, 2364, + 2365, 2366, 2367, 2368, 2369, 2370, 2371, 2372, + 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, + 2381, 2382, 2383, 2384, 2385, 2386, 2387, 2388, + 2389, 2390, 2391, 2392, 2393, 2394, 2395, 2396, + 2397, 2398, 2399, 2400, 2401, 2402, 2403, 2404, + 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412, + 2413, 2414, 2415, 2416, 2417, 2418, 2419, 2420, + 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, + 2429, 2430, 2431, 2432, 2433, 2434, 2435, 2436, + 2437, 2438, 2439, 2440, 2441, 2442, 2443, 2444, + 2445, 2446, 2447, 2448, 2449, 2450, 2451, 2452, + 2453, 2454, 2455, 2456, 2457, 2458, 2459, 2460, + 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, + 2469, 2470, 2471, 2472, 2473, 2474, 2475, 2476, + 2477, 2478, 2479, 2480, 2481, 2482, 2483, 2484, + 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2492, + 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, + 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, + 2509, 2510, 2511, 2512, 2513, 2514, 2515, 2516, + 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, + 2525, 2526, 2527, 2528, 2529, 2530, 2531, 2532, + 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, + 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548, + 2549, 2550, 2551, 2552, 2553, 2554, 2555, 2556, + 2557, 2558, 2559, 2560, 2561, 2562, 2563, 2564, + 2566, 2568, 2570, 2572, 2574, 2575, 2577, 2578, + 2580, 2581, 2583, 2584, 2585, 2586, 2587, 2588, + 2589, 2590, 2591, 2592, 2593, 2594, 2595, 2596, + 2597, 2598, 2599, 2600, 2601, 2602, 2603, 2604, + 2605, 2606, 2607, 2608, 2609, 2610, 2611, 2612, + 2613, 2614, 2615, 2616, 2617, 2618, 2619, 2620, + 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, + 2629, 2630, 2631, 2632, 2633, 2634, 2635, 2636, + 2637, 2638, 2639, 2640, 2641, 2642, 2643, 2644, + 2645, 2646, 2647, 2648, 2649, 2650, 2651, 2652, + 2653, 2655, 2657, 2658, 2659, 2660, 2661, 2662, + 2664, 2666, 2668, 2670, 2672, 2673, 2675, 2676, + 2678, 2679, 2681, 2682, 2683, 2684, 2685, 2687, + 2689, 2691, 2693, 2695, 2696, 2698, 2699, 2701, + 2702, 2704, 2705, 2706, 2707, 2708, 2709, 2710, + 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, + 2719, 2720, 2721, 2722, 2723, 2724, 2725, 2726, + 2727, 2728, 2729, 2730, 2731, 2732, 2733, 2734, + 2735, 2736, 2737, 2738, 2739, 2740, 2741, 2742, + 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, + 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758, + 2759, 2760, 2761, 2762, 2763, 2764, 2765, 2766, + 2767, 2768, 2769, 2770, 2771, 2772, 2773, 2774, + 2775, 2776, 2777, 2778, 2779, 2780, 2781, 2782, + 2783, 2784, 2785, 2786, 2787, 2788, 2789, 2790, + 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, + 2799, 2800, 2801, 2802, 2803, 2804, 2805, 2806, + 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, + 2815, 2816, 2817, 2818, 2819, 2820, 2821, 2822, + 2823, 2824, 2825, 2826, 2827, 2828, 2829, 2830, + 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, + 2839, 2840, 2841, 2842, 2843, 2844, 2845, 2846, + 2847, 2848, 2849, 2850, 2851, 2852, 2853, 2854, + 2855, 2856, 2857, 2858, 2859, 2860, 2861, 2862, + 2863, 2864, 2865, 2866, 2867, 2868, 2869, 2870, + 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, + 2879, 2880, 2881, 2882, 2883, 2884, 2885, 2886, + 2887, 2888, 2889, 2890, 2891, 2892, 2893, 2894, + 2895, 2896, 2897, 2898, 2899, 2900, 2901, 2902, + 2903, 2904, 2905, 2906, 2907, 2908, 2909, 2910, + 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, + 2919, 2920, 2921, 2922, 2923, 2924, 2925, 2926, + 2927, 2928, 2929, 2930, 2931, 2932, 2933, 2934, + 2935, 2936, 2937, 2938, 2939, 2940, 2941, 2942, + 2943, 2944, 2945, 2946, 2947, 2948, 2949, 2950, + 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, + 2959, 2960, 2961, 2962, 2963, 2964, 2965, 2966, + 2967, 2968, 2969, 2970, 2971, 2972, 2973, 2974, + 2975, 2976, 2977, 2978, 2979, 2980, 2981, 2982, + 2983, 2984, 2985, 2986, 2987, 2988, 2989, 2990, + 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, + 2999, 3000, 3001, 3002, 3003, 3004, 3005, 3006, + 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, + 3015, 3016, 3017, 3018, 3019, 3020, 3021, 3022, + 3023, 3024, 3025, 3026, 3027, 3028, 3029, 3030, + 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, + 3039, 3040, 3041, 3042, 3043, 3044, 3045, 3046, + 3047, 3048, 3049, 3050, 3051, 3052, 3053, 3054, + 3055, 3056, 3057, 3058, 3059, 3060, 3061, 3062, + 3063, 3064, 3065, 3066, 3067, 3068, 3069, 3070, + 3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, + 3079, 3080, 3081, 3082, 3083, 3084, 3085, 3086, + 3087, 3088, 3089, 3090, 3091, 3092, 3093, 3094, + 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, + 3103, 3104, 3105, 3106, 3107, 3108, 3109, 3110, + 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, + 3119, 3120, 3121, 3122, 3123, 3124, 3125, 3126, + 3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134, + 3135, 3136, 3137, 3138, 3139, 3140, 3141, 3142, + 3143, 3144, 3145, 3146, 3147, 3148, 3149, 3150, + 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, + 3159, 3160, 3161, 3162, 3163, 3164, 3165, 3166, + 3167, 3168, 3169, 3170, 3171, 3172, 3173, 3174, + 3175, 3176, 3177, 3178, 3179, 3180, 3181, 3182, + 3183, 3184, 3185, 3186, 3187, 3188, 3189, 3190, + 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198, + 3199, 3200, 3201, 3202, 3203, 3204, 3205, 3206, + 3207, 3208, 3209, 3210, 3211, 3212, 3213, 3214, + 3215, 3216, 3217, 3218, 3219, 3220, 3221, 3222, + 3223, 3224, 3225, 3226, 3227, 3228, 3229, 3230, + 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238, + 3239, 3240, 3241, 3242, 3243, 3244, 3245, 3246, + 3247, 3248, 3249, 3250, 3251, 3252, 3253, 3254, + 3255, 3256, 3257, 3258, 3259, 3260, 3261, 3262, + 3263, 3264, 3265, 3266, 3267, 3268, 3269, 3270, + 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, + 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, + 3287, 3288, 3289, 3290, 3291, 3292, 3293, 3294, + 3295, 3296, 3297, 3298, 3299, 3300, 3301, 3302, + 3303, 3304, 3305, 3306, 3307, 3308, 3309, 3310, + 3311, 3312, 3313, 3314, 3315, 3316, 3317, 3318, + 3319, 3320, 3321, 3322, 3323, 3324, 3325, 3326, + 3327, 3328, 3329, 3330, 3331, 3332, 3333, 3334, + 3335, 3336, 3337, 3338, 3339, 3340, 3341, 3342, + 3343, 3344, 3345, 3346, 3347, 3348, 3349, 3350, + 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3358, + 3359, 3360, 3361, 3362, 3363, 3364, 3365, 3366, + 3367, 3368, 3369, 3370, 3371, 3372, 3373, 3374, + 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, + 3383, 3384, 3385, 3386, 3387, 3388, 3389, 3390, + 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, + 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406, + 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, + 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422, + 3423, 3424, 3425, 3426, 3427, 3428, 3429, 3430, + 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, + 3439, 3440, 3441, 3442, 3443, 3444, 3445, 3446, + 3447, 3448, 3449, 3450, 3451, 3452, 3453, 3454, + 3455, 3456, 3457, 3458, 3459, 3460, 3461, 3462, + 3463, 3464, 3465, 3466, 3467, 3468, 3469, 3470, + 3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, + 3479, 3480, 3481, 3482, 3483, 3484, 3485, 3486, + 3487, 3488, 3489, 3490, 3491, 3492, 3493, 3494, + 3495, 3496, 3497, 3498, 3499, 3500, 3501, 3502, + 3503, 3504, 3505, 3506, 3507, 3508, 3509, 3510, + 3511, 3512, 3513, 3514, 3515, 3516, 3517, 3518, + 3519, 3520, 3521, 3522, 3523, 3524, 3525, 3526, + 3527, 3528, 3529, 3530, 3531, 3532, 3533, 3534, + 3535, 3536, 3537, 3538, 3539, 3540, 3541, 3542, + 3543, 3544, 3545, 3546, 3547, 3548, 3549, 3550, + 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558, + 3559, 3560, 0 + }; + + static const signed char _regex_trans_lengths[] = { + 2, 1, 2, 1, 2, 1, 1, 1, + 1, 1, 1, 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 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0 + }; + + static const short _regex_cond_targs[] = { + 746, 746, 746, 746, 3, 746, 746, 746, + 746, 746, 746, 746, 746, 751, 752, 753, + 746, 754, 755, 746, 757, 746, 746, 758, + 759, 760, 761, 761, 761, 761, 746, 756, + 746, 746, 6, 6, 6, 6, 746, 746, + 7, 7, 7, 7, 746, 9, 9, 9, + 9, 746, 10, 9, 9, 9, 9, 746, + 746, 746, 746, 11, 11, 11, 11, 746, + 746, 11, 12, 11, 11, 746, 746, 11, + 12, 11, 11, 746, 15, 15, 15, 15, + 746, 10, 15, 15, 15, 15, 746, 746, + 17, 746, 746, 746, 746, 746, 19, 746, + 11, 21, 11, 11, 746, 20, 20, 20, + 20, 746, 746, 20, 20, 20, 20, 746, + 746, 11, 21, 11, 11, 746, 746, 22, + 746, 746, 746, 23, 23, 23, 23, 746, + 746, 24, 24, 24, 24, 746, 746, 25, + 746, 24, 24, 24, 24, 746, 28, 28, + 28, 28, 746, 746, 28, 28, 28, 28, + 746, 6, 6, 6, 6, 746, 23, 23, + 23, 23, 746, 746, 30, 746, 31, 31, + 31, 31, 746, 33, 34, 746, 32, 33, + 34, 746, 32, 33, 34, 32, 36, 37, + 746, 35, 36, 37, 746, 35, 36, 37, + 35, 39, 40, 746, 38, 39, 40, 746, + 38, 39, 40, 38, 746, 41, 775, 746, + 746, 43, 45, 52, 49, 52, 52, 746, + 46, 746, 746, 47, 746, 746, 48, 746, + 746, 746, 52, 746, 50, 52, 52, 746, + 52, 746, 51, 52, 52, 746, 52, 746, + 52, 52, 52, 746, 52, 746, 52, 52, + 52, 746, 54, 54, 54, 54, 746, 746, + 54, 54, 54, 54, 746, 56, 56, 56, + 56, 746, 746, 56, 56, 56, 56, 746, + 58, 58, 58, 58, 746, 58, 746, 58, + 58, 58, 746, 60, 746, 746, 60, 746, + 746, 61, 61, 61, 746, 63, 786, 62, + 746, 786, 64, 746, 786, 64, 746, 787, + 65, 787, 67, 65, 787, 65, 787, 69, + 65, 787, 70, 65, 787, 65, 790, 790, + 73, 76, 790, 74, 790, 75, 790, 790, + 790, 77, 790, 78, 790, 79, 790, 80, + 790, 790, 790, 82, 790, 83, 790, 84, + 790, 85, 790, 790, 790, 87, 92, 94, + 790, 88, 790, 89, 790, 90, 790, 91, + 790, 790, 790, 93, 790, 790, 790, 95, + 790, 790, 790, 97, 790, 98, 790, 99, + 790, 100, 790, 790, 790, 102, 790, 103, + 790, 104, 790, 105, 790, 106, 790, 790, + 790, 108, 790, 109, 111, 790, 110, 790, + 790, 790, 112, 790, 113, 790, 790, 790, + 115, 120, 790, 116, 790, 117, 790, 118, + 790, 119, 790, 790, 790, 121, 790, 790, + 790, 123, 139, 790, 124, 790, 125, 790, + 126, 790, 127, 790, 128, 790, 129, 790, + 130, 790, 131, 790, 132, 790, 133, 790, + 134, 790, 135, 790, 136, 790, 137, 790, + 138, 790, 790, 790, 140, 790, 141, 790, + 790, 790, 143, 144, 790, 790, 790, 145, + 790, 146, 790, 147, 790, 148, 790, 790, + 790, 150, 790, 151, 790, 790, 790, 153, + 790, 154, 790, 790, 790, 156, 790, 157, + 790, 158, 790, 159, 790, 160, 790, 161, + 790, 790, 790, 163, 167, 790, 164, 790, + 165, 790, 166, 790, 790, 790, 168, 790, + 169, 790, 170, 790, 171, 790, 790, 790, + 173, 177, 790, 174, 790, 175, 790, 176, + 790, 790, 790, 178, 790, 179, 790, 180, + 790, 181, 790, 182, 790, 183, 790, 790, + 790, 185, 790, 186, 790, 187, 790, 188, + 790, 189, 790, 190, 790, 191, 790, 192, + 790, 193, 790, 194, 790, 195, 790, 196, + 790, 197, 790, 198, 790, 199, 790, 200, + 790, 201, 790, 790, 790, 203, 790, 204, + 790, 205, 790, 206, 790, 207, 790, 790, + 790, 209, 790, 210, 790, 211, 790, 212, + 790, 213, 790, 790, 790, 215, 790, 216, + 790, 217, 790, 218, 790, 219, 790, 220, + 790, 221, 790, 790, 790, 223, 790, 224, + 790, 225, 790, 790, 790, 227, 790, 228, + 790, 790, 790, 230, 235, 790, 231, 790, + 232, 790, 233, 790, 234, 790, 790, 790, + 236, 790, 237, 790, 238, 790, 239, 790, + 790, 790, 799, 790, 242, 790, 790, 790, + 244, 790, 245, 790, 790, 790, 247, 790, + 248, 790, 249, 790, 790, 790, 251, 790, + 252, 790, 253, 790, 254, 790, 255, 790, + 790, 790, 257, 790, 258, 790, 259, 790, + 260, 790, 261, 790, 262, 790, 263, 790, + 264, 790, 265, 790, 266, 790, 267, 790, + 268, 790, 269, 790, 790, 790, 271, 277, + 790, 272, 790, 273, 790, 274, 790, 275, + 790, 276, 790, 790, 790, 278, 790, 279, + 790, 280, 790, 281, 790, 282, 790, 283, + 790, 284, 790, 285, 790, 286, 790, 287, + 790, 288, 790, 289, 790, 290, 790, 291, + 295, 790, 292, 790, 293, 790, 294, 790, + 790, 790, 296, 790, 297, 790, 298, 790, + 299, 790, 790, 790, 301, 790, 302, 790, + 303, 790, 304, 790, 305, 790, 790, 790, + 307, 310, 314, 319, 790, 308, 790, 309, + 790, 790, 790, 311, 790, 312, 790, 313, + 790, 790, 790, 315, 790, 316, 790, 317, + 790, 318, 790, 790, 790, 320, 790, 321, + 790, 322, 790, 323, 790, 790, 790, 325, + 332, 790, 326, 790, 327, 790, 328, 790, + 329, 790, 330, 790, 331, 790, 790, 790, + 333, 790, 790, 790, 790, 335, 790, 336, + 790, 790, 790, 338, 790, 339, 790, 340, + 790, 790, 790, 342, 344, 349, 790, 343, + 790, 790, 790, 345, 790, 346, 790, 347, + 790, 348, 790, 790, 790, 790, 790, 351, + 354, 790, 352, 790, 353, 790, 790, 790, + 355, 790, 356, 790, 790, 790, 358, 364, + 790, 359, 790, 360, 790, 361, 790, 362, + 790, 363, 790, 790, 790, 365, 790, 366, + 790, 367, 790, 790, 790, 369, 790, 370, + 790, 371, 790, 372, 790, 373, 790, 374, + 790, 375, 790, 376, 790, 790, 790, 378, + 790, 379, 790, 380, 790, 381, 790, 382, + 790, 383, 790, 790, 790, 385, 790, 386, + 790, 387, 790, 388, 790, 790, 790, 390, + 790, 391, 790, 392, 790, 393, 790, 394, + 790, 395, 790, 396, 790, 397, 790, 790, + 790, 790, 790, 400, 790, 401, 790, 790, + 790, 403, 408, 790, 404, 790, 405, 790, + 406, 790, 407, 790, 790, 790, 409, 790, + 410, 415, 421, 433, 790, 411, 790, 412, + 790, 413, 790, 414, 790, 790, 790, 416, + 790, 417, 790, 418, 790, 419, 790, 420, + 790, 790, 790, 422, 790, 423, 790, 424, + 790, 425, 790, 426, 790, 427, 790, 428, + 790, 429, 790, 430, 790, 431, 790, 432, + 790, 790, 790, 434, 790, 435, 790, 436, + 790, 437, 790, 790, 790, 439, 790, 440, + 790, 790, 790, 442, 790, 443, 790, 444, + 790, 445, 790, 790, 790, 447, 452, 790, + 448, 790, 449, 790, 450, 790, 451, 790, + 790, 790, 453, 790, 454, 790, 455, 790, + 456, 790, 457, 790, 458, 790, 790, 790, + 460, 790, 461, 790, 462, 790, 790, 790, + 464, 790, 465, 790, 790, 790, 467, 473, + 790, 468, 790, 469, 790, 470, 790, 471, + 790, 472, 790, 790, 790, 474, 790, 475, + 790, 476, 790, 477, 790, 478, 790, 479, + 790, 790, 790, 481, 790, 482, 790, 483, + 790, 484, 790, 790, 790, 486, 790, 487, + 790, 488, 790, 489, 790, 790, 790, 491, + 790, 492, 790, 493, 790, 494, 790, 495, + 790, 496, 790, 790, 790, 498, 507, 790, + 499, 790, 500, 790, 501, 790, 502, 790, + 503, 790, 504, 790, 505, 790, 506, 790, + 790, 790, 508, 790, 509, 790, 790, 790, + 511, 519, 528, 790, 512, 515, 790, 513, + 790, 514, 790, 790, 790, 516, 790, 517, + 790, 518, 790, 790, 790, 520, 790, 521, + 522, 525, 790, 790, 790, 523, 790, 524, + 790, 790, 790, 526, 790, 527, 790, 790, + 790, 529, 790, 790, 790, 531, 790, 532, + 790, 533, 790, 790, 790, 535, 790, 536, + 790, 790, 537, 790, 790, 790, 539, 543, + 790, 540, 790, 541, 790, 542, 790, 790, + 790, 544, 790, 545, 790, 546, 790, 547, + 790, 790, 790, 549, 790, 550, 790, 551, + 790, 552, 790, 553, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 560, 0, 562, 561, 817, 0, 0, + 561, 819, 819, 819, 819, 565, 819, 819, + 819, 819, 567, 568, 819, 566, 567, 568, + 819, 566, 567, 568, 566, 571, 572, 819, + 573, 654, 669, 675, 681, 687, 693, 699, + 710, 716, 722, 727, 570, 571, 572, 819, + 570, 571, 572, 819, 570, 571, 572, 570, + 571, 572, 819, 574, 589, 595, 601, 607, + 613, 619, 630, 636, 642, 647, 570, 571, + 572, 819, 575, 584, 570, 571, 572, 819, + 576, 580, 570, 571, 572, 819, 577, 570, + 571, 572, 819, 578, 570, 579, 572, 819, + 570, 571, 572, 819, 570, 571, 572, 819, + 581, 570, 571, 572, 819, 582, 570, 583, + 572, 819, 570, 571, 572, 819, 570, 571, + 572, 819, 585, 570, 571, 572, 819, 586, + 570, 571, 572, 819, 587, 570, 588, 572, + 819, 570, 571, 572, 819, 570, 571, 572, + 819, 590, 570, 571, 572, 819, 591, 570, + 571, 572, 819, 592, 570, 571, 572, 819, + 593, 570, 594, 572, 819, 570, 571, 572, + 819, 570, 571, 572, 819, 596, 570, 571, + 572, 819, 597, 570, 571, 572, 819, 598, + 570, 571, 572, 819, 599, 570, 600, 572, + 819, 570, 571, 572, 819, 570, 571, 572, + 819, 602, 570, 571, 572, 819, 603, 570, + 571, 572, 819, 604, 570, 571, 572, 819, + 605, 570, 606, 572, 819, 570, 571, 572, + 819, 570, 571, 572, 819, 608, 570, 571, + 572, 819, 609, 570, 571, 572, 819, 610, + 570, 571, 572, 819, 611, 570, 612, 572, + 819, 570, 571, 572, 819, 570, 571, 572, + 819, 614, 570, 571, 572, 819, 615, 570, + 571, 572, 819, 616, 570, 571, 572, 819, + 617, 570, 618, 572, 819, 570, 571, 572, + 819, 570, 571, 572, 819, 620, 625, 570, + 571, 572, 819, 621, 570, 571, 572, 819, + 622, 570, 571, 572, 819, 623, 570, 624, + 572, 819, 570, 571, 572, 819, 570, 571, + 572, 819, 626, 570, 571, 572, 819, 627, + 570, 571, 572, 819, 628, 570, 629, 572, + 819, 570, 571, 572, 819, 570, 571, 572, + 819, 631, 570, 571, 572, 819, 632, 570, + 571, 572, 819, 633, 570, 571, 572, 819, + 634, 570, 635, 572, 819, 570, 571, 572, + 819, 570, 571, 572, 819, 637, 570, 571, + 572, 819, 638, 570, 571, 572, 819, 639, + 570, 571, 572, 819, 640, 570, 641, 572, + 819, 570, 571, 572, 819, 570, 571, 572, + 819, 643, 570, 571, 572, 819, 644, 570, + 571, 572, 819, 645, 570, 646, 572, 819, + 570, 571, 572, 819, 570, 571, 572, 819, + 648, 570, 571, 572, 819, 649, 570, 571, + 572, 819, 650, 570, 571, 572, 819, 651, + 570, 571, 572, 819, 652, 570, 653, 572, + 819, 570, 571, 572, 819, 570, 571, 572, + 819, 655, 664, 570, 571, 572, 819, 656, + 660, 570, 571, 572, 819, 657, 570, 571, + 572, 819, 658, 570, 659, 572, 819, 570, + 571, 572, 819, 570, 571, 572, 819, 661, + 570, 571, 572, 819, 662, 570, 663, 572, + 819, 570, 571, 572, 819, 570, 571, 572, + 819, 665, 570, 571, 572, 819, 666, 570, + 571, 572, 819, 667, 570, 668, 572, 819, + 570, 571, 572, 819, 570, 571, 572, 819, + 670, 570, 571, 572, 819, 671, 570, 571, + 572, 819, 672, 570, 571, 572, 819, 673, + 570, 674, 572, 819, 570, 571, 572, 819, + 570, 571, 572, 819, 676, 570, 571, 572, + 819, 677, 570, 571, 572, 819, 678, 570, + 571, 572, 819, 679, 570, 680, 572, 819, + 570, 571, 572, 819, 570, 571, 572, 819, + 682, 570, 571, 572, 819, 683, 570, 571, + 572, 819, 684, 570, 571, 572, 819, 685, + 570, 686, 572, 819, 570, 571, 572, 819, + 570, 571, 572, 819, 688, 570, 571, 572, + 819, 689, 570, 571, 572, 819, 690, 570, + 571, 572, 819, 691, 570, 692, 572, 819, + 570, 571, 572, 819, 570, 571, 572, 819, + 694, 570, 571, 572, 819, 695, 570, 571, + 572, 819, 696, 570, 571, 572, 819, 697, + 570, 698, 572, 819, 570, 571, 572, 819, + 570, 571, 572, 819, 700, 705, 570, 571, + 572, 819, 701, 570, 571, 572, 819, 702, + 570, 571, 572, 819, 703, 570, 704, 572, + 819, 570, 571, 572, 819, 570, 571, 572, + 819, 706, 570, 571, 572, 819, 707, 570, + 571, 572, 819, 708, 570, 709, 572, 819, + 570, 571, 572, 819, 570, 571, 572, 819, + 711, 570, 571, 572, 819, 712, 570, 571, + 572, 819, 713, 570, 571, 572, 819, 714, + 570, 715, 572, 819, 570, 571, 572, 819, + 570, 571, 572, 819, 717, 570, 571, 572, + 819, 718, 570, 571, 572, 819, 719, 570, + 571, 572, 819, 720, 570, 721, 572, 819, + 570, 571, 572, 819, 570, 571, 572, 819, + 723, 570, 571, 572, 819, 724, 570, 571, + 572, 819, 725, 570, 726, 572, 819, 570, + 571, 572, 819, 570, 571, 572, 819, 728, + 570, 571, 572, 819, 729, 570, 571, 572, + 819, 730, 570, 571, 572, 819, 731, 570, + 571, 572, 819, 732, 570, 733, 572, 819, + 570, 571, 572, 819, 570, 735, 736, 819, + 734, 735, 736, 819, 734, 735, 736, 734, + 738, 819, 819, 738, 819, 819, 739, 739, + 739, 819, 838, 838, 838, 838, 742, 838, + 838, 838, 838, 843, 843, 843, 843, 745, + 843, 843, 843, 843, 746, 746, 746, 746, + 746, 750, 746, 762, 763, 746, 764, 765, + 766, 746, 785, 746, 746, 746, 746, 747, + 746, 748, 746, 749, 746, 746, 746, 746, + 746, 746, 746, 746, 1, 746, 746, 2, + 746, 4, 5, 746, 6, 6, 6, 6, + 746, 7, 7, 7, 7, 746, 8, 11, + 14, 16, 18, 11, 12, 13, 11, 11, + 746, 22, 746, 23, 23, 23, 23, 22, + 746, 746, 22, 746, 746, 746, 24, 24, + 24, 24, 746, 746, 746, 746, 25, 746, + 26, 27, 29, 746, 746, 30, 746, 31, + 31, 31, 31, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 32, 35, 38, + 746, 767, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 772, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 773, + 746, 746, 746, 774, 746, 779, 746, 746, + 780, 781, 746, 746, 746, 746, 746, 746, + 782, 746, 769, 771, 746, 768, 746, 746, + 746, 770, 771, 746, 771, 771, 746, 771, + 746, 746, 746, 746, 41, 42, 43, 44, + 777, 746, 776, 746, 746, 746, 778, 746, + 746, 746, 53, 55, 57, 746, 59, 746, + 746, 746, 784, 783, 783, 783, 746, 746, + 746, 746, 746, 61, 61, 61, 746, 62, + 746, 746, 746, 746, 787, 789, 788, 787, + 65, 787, 66, 68, 65, 791, 792, 793, + 795, 796, 797, 798, 800, 801, 802, 803, + 804, 806, 807, 808, 809, 810, 811, 812, + 813, 814, 815, 816, 790, 71, 72, 81, + 790, 86, 96, 101, 107, 114, 790, 122, + 790, 790, 142, 790, 794, 790, 155, 162, + 790, 149, 152, 790, 172, 790, 184, 202, + 790, 208, 214, 222, 226, 229, 790, 240, + 246, 250, 790, 241, 243, 790, 256, 270, + 790, 300, 790, 306, 324, 790, 790, 334, + 337, 341, 790, 790, 790, 790, 790, 350, + 790, 357, 790, 805, 790, 377, 384, 790, + 368, 790, 790, 389, 398, 790, 790, 790, + 399, 402, 438, 441, 790, 790, 790, 790, + 790, 446, 790, 790, 790, 790, 459, 463, + 790, 466, 790, 480, 485, 790, 790, 790, + 490, 497, 790, 510, 530, 534, 538, 790, + 548, 790, 554, 790, 555, 556, 557, 558, + 790, 790, 790, 790, 790, 790, 790, 0, + 818, 818, 818, 818, 818, 818, 818, 818, + 819, 823, 824, 819, 819, 819, 819, 820, + 819, 821, 819, 822, 819, 819, 819, 819, + 819, 819, 819, 563, 819, 819, 564, 819, + 566, 569, 734, 819, 825, 819, 819, 819, + 819, 819, 829, 819, 819, 819, 819, 819, + 819, 819, 830, 819, 819, 819, 819, 819, + 819, 819, 831, 832, 819, 819, 819, 819, + 819, 819, 833, 827, 819, 819, 819, 819, + 826, 819, 819, 819, 828, 819, 819, 819, + 819, 819, 819, 737, 819, 819, 819, 835, + 834, 834, 834, 819, 819, 819, 819, 819, + 739, 739, 739, 819, 837, 836, 836, 836, + 836, 836, 836, 836, 836, 842, 838, 838, + 838, 839, 838, 840, 838, 841, 838, 838, + 838, 838, 838, 838, 838, 740, 838, 838, + 741, 838, 838, 838, 847, 843, 843, 843, + 844, 843, 845, 843, 846, 843, 843, 843, + 843, 843, 843, 843, 743, 843, 843, 744, + 843, 843, 843, 848, 848, 849, 849, 0, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 787, 787, 787, 787, 787, 787, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 559, 560, + 561, 562, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 838, 838, 838, 843, 843, + 843, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 746, 746, 746, 746, 746, 746, + 746, 746, 787, 787, 787, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, + 817, 818, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 836, 836, 838, 838, 838, + 838, 838, 843, 843, 843, 843, 843, 848, + 849, 0 + }; + + static const short _regex_cond_actions[] = { + 843, 769, 843, 843, 0, 843, 843, 771, + 843, 827, 631, 731, 723, 45, 903, 903, + 897, 45, 912, 900, 903, 729, 741, 0, + 45, 45, 923, 923, 923, 923, 737, 45, + 765, 747, 0, 0, 0, 0, 841, 743, + 3, 3, 3, 3, 841, 3, 3, 3, + 3, 839, 0, 3, 3, 3, 3, 839, + 761, 839, 761, 3, 3, 3, 3, 839, + 759, 3, 870, 3, 3, 839, 761, 3, + 870, 3, 3, 839, 3, 3, 3, 3, + 839, 0, 3, 3, 3, 3, 839, 751, + 0, 749, 839, 755, 753, 839, 0, 757, + 3, 3, 3, 3, 839, 0, 0, 0, + 0, 839, 757, 0, 0, 0, 0, 839, + 757, 3, 3, 3, 3, 839, 745, 0, + 841, 725, 727, 27, 27, 27, 27, 841, + 743, 3, 3, 3, 3, 841, 763, 0, + 841, 3, 3, 3, 3, 841, 3, 3, + 3, 3, 841, 673, 3, 3, 3, 3, + 841, 0, 0, 0, 0, 841, 27, 27, + 27, 27, 841, 725, 0, 727, 25, 25, + 25, 25, 841, 0, 0, 829, 0, 0, + 0, 603, 0, 0, 0, 0, 0, 0, + 829, 0, 0, 0, 601, 0, 0, 0, + 0, 0, 0, 829, 0, 0, 0, 603, + 0, 0, 0, 0, 675, 0, 17, 831, + 675, 0, 7, 3, 870, 3, 3, 831, + 17, 831, 663, 17, 831, 663, 17, 831, + 663, 831, 3, 661, 870, 3, 3, 831, + 3, 661, 870, 3, 3, 831, 3, 661, + 3, 3, 3, 831, 3, 665, 3, 3, + 3, 831, 3, 3, 3, 3, 837, 671, + 3, 3, 3, 3, 837, 3, 3, 3, + 3, 837, 669, 3, 3, 3, 3, 837, + 3, 3, 3, 3, 837, 3, 667, 3, + 3, 3, 837, 0, 833, 677, 0, 833, + 679, 0, 0, 0, 835, 0, 29, 11, + 845, 31, 13, 845, 0, 13, 845, 53, + 0, 53, 0, 0, 51, 0, 53, 0, + 0, 49, 0, 0, 47, 0, 315, 359, + 0, 0, 359, 0, 359, 0, 359, 127, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 129, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 131, 359, 0, 0, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 133, 359, 0, 359, 135, 359, 0, + 359, 137, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 139, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 141, + 359, 0, 359, 0, 0, 359, 0, 359, + 143, 359, 0, 359, 0, 359, 145, 359, + 0, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 147, 359, 0, 359, 149, + 359, 0, 0, 341, 0, 341, 0, 341, + 0, 341, 0, 341, 0, 341, 0, 341, + 0, 341, 0, 341, 0, 341, 0, 341, + 0, 341, 0, 341, 0, 341, 0, 341, + 0, 341, 151, 341, 0, 341, 0, 341, + 153, 341, 0, 0, 341, 155, 341, 0, + 341, 0, 341, 0, 341, 0, 341, 157, + 341, 0, 343, 0, 343, 159, 343, 0, + 343, 0, 343, 161, 343, 0, 341, 0, + 341, 0, 341, 0, 341, 0, 341, 0, + 341, 163, 341, 0, 0, 341, 0, 341, + 0, 341, 0, 341, 165, 341, 0, 341, + 0, 341, 0, 341, 0, 341, 167, 341, + 0, 0, 359, 0, 359, 0, 359, 0, + 359, 169, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 171, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 173, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 175, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 177, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 179, 359, 0, 359, 0, + 359, 0, 359, 181, 359, 0, 359, 0, + 359, 183, 359, 0, 0, 359, 0, 359, + 0, 359, 0, 359, 0, 359, 185, 359, + 0, 359, 0, 359, 0, 359, 0, 359, + 187, 359, 45, 359, 0, 357, 189, 357, + 0, 357, 0, 357, 191, 357, 0, 359, + 0, 359, 0, 359, 193, 359, 0, 359, + 0, 359, 0, 359, 0, 359, 0, 359, + 195, 359, 0, 359, 0, 359, 0, 359, + 0, 359, 0, 359, 0, 359, 0, 359, + 0, 359, 0, 359, 0, 359, 0, 359, + 0, 359, 0, 359, 197, 359, 0, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 199, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 0, 359, 0, 359, 0, 359, 0, 359, + 201, 359, 0, 359, 0, 359, 0, 359, + 0, 359, 203, 359, 0, 359, 0, 359, + 0, 359, 0, 359, 0, 359, 205, 359, + 0, 0, 0, 0, 359, 0, 359, 0, + 359, 207, 359, 0, 359, 0, 359, 0, + 359, 209, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 211, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 213, 359, 0, + 0, 359, 0, 359, 0, 359, 0, 359, + 0, 359, 0, 359, 0, 359, 215, 359, + 0, 359, 217, 359, 219, 0, 345, 0, + 345, 221, 345, 0, 345, 0, 345, 0, + 345, 223, 345, 0, 0, 0, 345, 0, + 345, 225, 345, 0, 345, 0, 345, 0, + 345, 0, 345, 227, 345, 229, 345, 0, + 0, 345, 0, 345, 0, 345, 231, 345, + 0, 345, 0, 345, 233, 345, 0, 0, + 347, 0, 347, 0, 347, 0, 347, 0, + 347, 0, 347, 235, 347, 0, 347, 0, + 347, 0, 347, 237, 347, 0, 349, 0, + 349, 0, 349, 0, 349, 0, 349, 0, + 349, 0, 349, 0, 349, 239, 349, 0, + 347, 0, 347, 0, 347, 0, 347, 0, + 347, 0, 347, 241, 347, 0, 347, 0, + 347, 0, 347, 0, 347, 243, 347, 0, + 351, 0, 351, 0, 351, 0, 351, 0, + 351, 0, 351, 0, 351, 0, 351, 245, + 351, 247, 351, 0, 359, 0, 359, 249, + 359, 0, 0, 359, 0, 359, 0, 359, + 0, 359, 0, 359, 251, 359, 0, 359, + 0, 0, 0, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 253, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 255, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 257, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 259, 359, 0, 359, 0, + 359, 261, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 263, 359, 0, 0, 353, + 0, 353, 0, 353, 0, 353, 0, 353, + 265, 353, 0, 353, 0, 353, 0, 353, + 0, 353, 0, 353, 0, 353, 267, 353, + 0, 359, 0, 359, 0, 359, 269, 359, + 0, 359, 0, 359, 271, 359, 0, 0, + 355, 0, 355, 0, 355, 0, 355, 0, + 355, 0, 355, 273, 355, 0, 355, 0, + 355, 0, 355, 0, 355, 0, 355, 0, + 355, 275, 355, 0, 355, 0, 355, 0, + 355, 0, 355, 277, 355, 0, 355, 0, + 355, 0, 355, 0, 355, 279, 355, 0, + 355, 0, 355, 0, 355, 0, 355, 0, + 355, 0, 355, 281, 355, 0, 0, 355, + 0, 355, 0, 355, 0, 355, 0, 355, + 0, 355, 0, 355, 0, 355, 0, 355, + 283, 355, 0, 355, 0, 355, 285, 355, + 0, 0, 0, 359, 0, 0, 359, 0, + 359, 0, 359, 287, 359, 0, 359, 0, + 359, 0, 359, 289, 359, 0, 359, 0, + 0, 0, 359, 291, 359, 0, 359, 0, + 359, 293, 359, 0, 359, 0, 359, 295, + 359, 0, 359, 297, 359, 0, 359, 0, + 359, 0, 359, 299, 359, 0, 359, 0, + 303, 359, 0, 359, 301, 359, 0, 0, + 359, 0, 359, 0, 359, 0, 359, 305, + 359, 0, 359, 0, 359, 0, 359, 0, + 359, 307, 359, 0, 359, 0, 359, 0, + 359, 0, 359, 0, 359, 309, 359, 311, + 359, 119, 359, 121, 359, 123, 359, 125, + 359, 0, 39, 33, 35, 37, 39, 39, + 35, 537, 503, 537, 537, 0, 537, 537, + 505, 537, 0, 0, 539, 0, 0, 0, + 377, 0, 0, 0, 0, 0, 0, 539, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 539, + 0, 0, 0, 435, 0, 0, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 0, 539, + 0, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 381, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 385, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 389, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 393, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 397, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 401, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 405, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 409, 0, 0, 0, 539, 0, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 413, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 417, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 421, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 425, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 429, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 433, 0, 0, 0, + 539, 0, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 379, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 383, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 387, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 391, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 395, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 399, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 403, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 407, + 0, 0, 0, 539, 0, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 411, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 415, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 419, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 423, 0, 0, 0, 539, + 0, 0, 0, 0, 539, 0, 0, 0, + 0, 539, 0, 0, 0, 0, 539, 0, + 0, 0, 427, 0, 0, 0, 539, 0, + 0, 0, 0, 539, 0, 0, 0, 0, + 539, 0, 0, 0, 0, 539, 0, 0, + 0, 0, 539, 0, 0, 0, 0, 539, + 0, 0, 0, 431, 0, 0, 0, 539, + 0, 0, 0, 377, 0, 0, 0, 0, + 0, 533, 471, 0, 533, 475, 0, 0, + 0, 535, 569, 557, 569, 569, 0, 569, + 569, 559, 569, 587, 575, 587, 587, 0, + 587, 587, 577, 587, 633, 775, 777, 629, + 637, 45, 597, 0, 0, 609, 0, 45, + 0, 635, 909, 599, 777, 773, 777, 0, + 777, 45, 777, 45, 777, 773, 775, 777, + 823, 767, 823, 823, 0, 823, 823, 0, + 823, 0, 0, 779, 0, 0, 0, 0, + 821, 3, 3, 3, 3, 821, 1, 3, + 1, 0, 3, 3, 855, 855, 3, 3, + 819, 0, 821, 27, 27, 27, 27, 0, + 821, 745, 0, 821, 735, 733, 3, 3, + 3, 3, 821, 739, 821, 763, 0, 821, + 1, 1, 0, 821, 725, 0, 727, 25, + 25, 25, 25, 821, 615, 613, 783, 619, + 617, 785, 623, 621, 787, 0, 0, 0, + 781, 5, 639, 647, 611, 695, 607, 717, + 699, 715, 683, 683, 0, 605, 713, 691, + 683, 703, 687, 719, 641, 657, 645, 0, + 693, 659, 655, 906, 697, 45, 683, 651, + 45, 0, 653, 689, 649, 683, 701, 685, + 7, 643, 852, 915, 721, 15, 791, 867, + 791, 858, 919, 795, 927, 919, 793, 919, + 847, 709, 711, 681, 0, 7, 0, 849, + 17, 801, 17, 799, 876, 799, 17, 797, + 873, 797, 1, 1, 1, 815, 0, 803, + 705, 707, 45, 19, 23, 21, 805, 882, + 894, 888, 805, 0, 0, 0, 807, 11, + 825, 627, 625, 789, 55, 45, 45, 53, + 0, 53, 0, 0, 0, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 0, 0, 317, 0, 0, 0, + 339, 0, 0, 0, 0, 0, 339, 0, + 61, 63, 0, 65, 45, 67, 0, 0, + 319, 0, 0, 321, 0, 339, 0, 0, + 339, 0, 0, 0, 0, 0, 339, 0, + 0, 0, 339, 0, 0, 337, 0, 0, + 339, 0, 339, 0, 0, 339, 79, 0, + 0, 0, 69, 71, 73, 75, 77, 0, + 323, 0, 81, 45, 83, 0, 0, 325, + 0, 327, 85, 0, 0, 87, 89, 329, + 0, 0, 0, 0, 339, 91, 93, 95, + 97, 0, 99, 101, 103, 331, 0, 0, + 339, 0, 105, 0, 0, 107, 109, 111, + 0, 0, 333, 0, 0, 0, 0, 339, + 0, 339, 0, 339, 0, 0, 0, 0, + 339, 313, 339, 113, 115, 117, 335, 39, + 361, 363, 365, 367, 369, 371, 373, 375, + 491, 45, 0, 511, 509, 507, 509, 0, + 509, 45, 509, 45, 509, 507, 509, 529, + 501, 529, 529, 0, 529, 529, 0, 529, + 0, 0, 0, 531, 5, 489, 439, 457, + 493, 493, 0, 437, 485, 493, 461, 481, + 451, 441, 0, 487, 453, 449, 495, 455, + 493, 445, 45, 0, 447, 483, 443, 493, + 459, 479, 7, 9, 473, 497, 497, 499, + 15, 517, 861, 517, 15, 519, 864, 519, + 467, 469, 477, 0, 521, 463, 465, 45, + 19, 23, 21, 523, 879, 891, 885, 523, + 0, 0, 0, 525, 0, 549, 543, 549, + 541, 549, 547, 545, 551, 0, 563, 561, + 563, 0, 563, 45, 563, 45, 563, 561, + 563, 565, 555, 565, 565, 0, 565, 565, + 0, 565, 553, 567, 0, 581, 579, 581, + 0, 581, 45, 581, 45, 581, 579, 581, + 583, 573, 583, 583, 0, 583, 583, 0, + 583, 571, 585, 589, 591, 593, 595, 0, + 843, 843, 843, 827, 827, 841, 841, 839, + 839, 839, 839, 839, 839, 839, 839, 839, + 839, 839, 839, 839, 839, 841, 841, 841, + 841, 841, 841, 841, 841, 841, 841, 829, + 829, 829, 829, 829, 829, 829, 829, 829, + 831, 831, 831, 831, 831, 831, 831, 831, + 831, 831, 831, 831, 837, 837, 837, 837, + 837, 837, 833, 833, 835, 845, 845, 845, + 59, 59, 59, 59, 59, 59, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 341, 341, 341, 341, 341, 341, 341, + 341, 341, 341, 341, 341, 341, 341, 341, + 341, 341, 341, 341, 341, 341, 341, 341, + 341, 341, 341, 341, 343, 343, 343, 343, + 343, 343, 341, 341, 341, 341, 341, 341, + 341, 341, 341, 341, 341, 341, 341, 341, + 341, 341, 341, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 357, 357, 357, 357, 357, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 347, 347, 347, 347, + 347, 347, 347, 347, 347, 347, 347, 349, + 349, 349, 349, 349, 349, 349, 349, 349, + 347, 347, 347, 347, 347, 347, 347, 347, + 347, 347, 347, 347, 351, 351, 351, 351, + 351, 351, 351, 351, 351, 351, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 353, 353, 353, + 353, 353, 353, 353, 353, 353, 353, 353, + 353, 353, 359, 359, 359, 359, 359, 359, + 359, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 359, 359, 359, 39, 39, + 39, 39, 537, 537, 537, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, + 533, 533, 535, 569, 569, 569, 587, 587, + 587, 0, 823, 823, 823, 779, 821, 821, + 819, 821, 821, 821, 821, 821, 821, 821, + 821, 783, 785, 787, 781, 817, 791, 791, + 795, 793, 847, 811, 809, 801, 799, 799, + 797, 797, 815, 803, 813, 805, 805, 807, + 825, 789, 0, 57, 57, 0, 339, 339, + 319, 321, 339, 339, 339, 339, 337, 339, + 339, 339, 323, 325, 327, 329, 339, 331, + 339, 333, 339, 339, 339, 339, 339, 335, + 0, 0, 0, 529, 529, 529, 531, 531, + 517, 517, 519, 519, 513, 527, 521, 515, + 523, 523, 525, 0, 551, 0, 565, 565, + 565, 567, 0, 583, 583, 583, 585, 0, + 0, 0 + }; + + static const signed char _regex_to_state_actions[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 43, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 43, 0, 0, 43, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 43, 43, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 43, 0, 43, 0, + 0, 0, 0, 43, 0, 0, 0, 0, + 43, 43, 0 + }; + + static const short _regex_eof_trans[] = { + 2665, 2666, 2667, 2668, 2669, 2670, 2671, 2672, + 2673, 2674, 2675, 2676, 2677, 2678, 2679, 2680, + 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, + 2689, 2690, 2691, 2692, 2693, 2694, 2695, 2696, + 2697, 2698, 2699, 2700, 2701, 2702, 2703, 2704, + 2705, 2706, 2707, 2708, 2709, 2710, 2711, 2712, + 2713, 2714, 2715, 2716, 2717, 2718, 2719, 2720, + 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, + 2729, 2730, 2731, 2732, 2733, 2734, 2735, 2736, + 2737, 2738, 2739, 2740, 2741, 2742, 2743, 2744, + 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, + 2753, 2754, 2755, 2756, 2757, 2758, 2759, 2760, + 2761, 2762, 2763, 2764, 2765, 2766, 2767, 2768, + 2769, 2770, 2771, 2772, 2773, 2774, 2775, 2776, + 2777, 2778, 2779, 2780, 2781, 2782, 2783, 2784, + 2785, 2786, 2787, 2788, 2789, 2790, 2791, 2792, + 2793, 2794, 2795, 2796, 2797, 2798, 2799, 2800, + 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, + 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, + 2817, 2818, 2819, 2820, 2821, 2822, 2823, 2824, + 2825, 2826, 2827, 2828, 2829, 2830, 2831, 2832, + 2833, 2834, 2835, 2836, 2837, 2838, 2839, 2840, + 2841, 2842, 2843, 2844, 2845, 2846, 2847, 2848, + 2849, 2850, 2851, 2852, 2853, 2854, 2855, 2856, + 2857, 2858, 2859, 2860, 2861, 2862, 2863, 2864, + 2865, 2866, 2867, 2868, 2869, 2870, 2871, 2872, + 2873, 2874, 2875, 2876, 2877, 2878, 2879, 2880, + 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, + 2889, 2890, 2891, 2892, 2893, 2894, 2895, 2896, + 2897, 2898, 2899, 2900, 2901, 2902, 2903, 2904, + 2905, 2906, 2907, 2908, 2909, 2910, 2911, 2912, + 2913, 2914, 2915, 2916, 2917, 2918, 2919, 2920, + 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, + 2929, 2930, 2931, 2932, 2933, 2934, 2935, 2936, + 2937, 2938, 2939, 2940, 2941, 2942, 2943, 2944, + 2945, 2946, 2947, 2948, 2949, 2950, 2951, 2952, + 2953, 2954, 2955, 2956, 2957, 2958, 2959, 2960, + 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, + 2969, 2970, 2971, 2972, 2973, 2974, 2975, 2976, + 2977, 2978, 2979, 2980, 2981, 2982, 2983, 2984, + 2985, 2986, 2987, 2988, 2989, 2990, 2991, 2992, + 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3000, + 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, + 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, + 3017, 3018, 3019, 3020, 3021, 3022, 3023, 3024, + 3025, 3026, 3027, 3028, 3029, 3030, 3031, 3032, + 3033, 3034, 3035, 3036, 3037, 3038, 3039, 3040, + 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, + 3049, 3050, 3051, 3052, 3053, 3054, 3055, 3056, + 3057, 3058, 3059, 3060, 3061, 3062, 3063, 3064, + 3065, 3066, 3067, 3068, 3069, 3070, 3071, 3072, + 3073, 3074, 3075, 3076, 3077, 3078, 3079, 3080, + 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, + 3089, 3090, 3091, 3092, 3093, 3094, 3095, 3096, + 3097, 3098, 3099, 3100, 3101, 3102, 3103, 3104, + 3105, 3106, 3107, 3108, 3109, 3110, 3111, 3112, + 3113, 3114, 3115, 3116, 3117, 3118, 3119, 3120, + 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128, + 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3136, + 3137, 3138, 3139, 3140, 3141, 3142, 3143, 3144, + 3145, 3146, 3147, 3148, 3149, 3150, 3151, 3152, + 3153, 3154, 3155, 3156, 3157, 3158, 3159, 3160, + 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168, + 3169, 3170, 3171, 3172, 3173, 3174, 3175, 3176, + 3177, 3178, 3179, 3180, 3181, 3182, 3183, 3184, + 3185, 3186, 3187, 3188, 3189, 3190, 3191, 3192, + 3193, 3194, 3195, 3196, 3197, 3198, 3199, 3200, + 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, + 3209, 3210, 3211, 3212, 3213, 3214, 3215, 3216, + 3217, 3218, 3219, 3220, 3221, 3222, 3223, 3224, + 3225, 3226, 3227, 3228, 3229, 3230, 3231, 3232, + 3233, 3234, 3235, 3236, 3237, 3238, 3239, 3240, + 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, + 3249, 3250, 3251, 3252, 3253, 3254, 3255, 3256, + 3257, 3258, 3259, 3260, 3261, 3262, 3263, 3264, + 3265, 3266, 3267, 3268, 3269, 3270, 3271, 3272, + 3273, 3274, 3275, 3276, 3277, 3278, 3279, 3280, + 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, + 3289, 3290, 3291, 3292, 3293, 3294, 3295, 3296, + 3297, 3298, 3299, 3300, 3301, 3302, 3303, 3304, + 3305, 3306, 3307, 3308, 3309, 3310, 3311, 3312, + 3313, 3314, 3315, 3316, 3317, 3318, 3319, 3320, + 3321, 3322, 3323, 3324, 3325, 3326, 3327, 3328, + 3329, 3330, 3331, 3332, 3333, 3334, 3335, 3336, + 3337, 3338, 3339, 3340, 3341, 3342, 3343, 3344, + 3345, 3346, 3347, 3348, 3349, 3350, 3351, 3352, + 3353, 3354, 3355, 3356, 3357, 3358, 3359, 3360, + 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, + 3369, 3370, 3371, 3372, 3373, 3374, 3375, 3376, + 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384, + 3385, 3386, 3387, 3388, 3389, 3390, 3391, 3392, + 3393, 3394, 3395, 3396, 3397, 3398, 3399, 3400, + 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, + 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, + 3417, 3418, 3419, 3420, 3421, 3422, 3423, 3424, + 3425, 3426, 3427, 3428, 3429, 3430, 3431, 3432, + 3433, 3434, 3435, 3436, 3437, 3438, 3439, 3440, + 3441, 3442, 3443, 3444, 3445, 3446, 3447, 3448, + 3449, 3450, 3451, 3452, 3453, 3454, 3455, 3456, + 3457, 3458, 3459, 3460, 3461, 3462, 3463, 3464, + 3465, 3466, 3467, 3468, 3469, 3470, 3471, 3472, + 3473, 3474, 3475, 3476, 3477, 3478, 3479, 3480, + 3481, 3482, 3483, 3484, 3485, 3486, 3487, 3488, + 3489, 3490, 3491, 3492, 3493, 3494, 3495, 3496, + 3497, 3498, 3499, 3500, 3501, 3502, 3503, 3504, + 3505, 3506, 3507, 3508, 3509, 3510, 3511, 3512, + 3513, 3514, 0 + }; + + static const int regex_start = 746; + static const int regex_error = 0; + + static const int regex_en_readVerb = 787; + static const int regex_en_readUCP = 790; + static const int regex_en_readBracedUCP = 559; + static const int regex_en_readUCPSingle = 818; + static const int regex_en_charClassGuts = 819; + static const int regex_en_readClass = 836; + static const int regex_en_readQuotedLiteral = 838; + static const int regex_en_readQuotedClass = 843; + static const int regex_en_readComment = 848; + static const int regex_en_readNewlineTerminatedComment = 849; + static const int regex_en_main = 746; + + +#line 1911 "Parser.rl" + + + /** \brief Main parser call, returns root Component or nullptr. */ + unique_ptr parse(const char *ptr, ParseMode &globalMode) { + assert(ptr); + + const char *p = ptr; + const char *pe = ptr + strlen(ptr); + + // First, read the control verbs, set any global mode flags and move the + // ptr forward. + p = read_control_verbs(p, pe, 0, globalMode); + + const char *eof = pe; + int cs; + UNUSED int act; + int top; + vector stack; + const char *ts, *te; + unichar accumulator = 0; + unichar octAccumulator = 0; /* required as we are also accumulating for + * back ref when looking for octals */ + unsigned repeatN = 0; + unsigned repeatM = 0; + string label; + + ParseMode mode = globalMode; + ParseMode newMode; + + bool negated = false; + bool inComment = false; + + // Stack of sequences and flags used to store state when we enter + // sub-sequences. + vector sequences; + + // Index of the next capturing group. Note that zero is reserved for the + // root sequence. + unsigned groupIndex = 1; + + // Set storing group names that are currently in use. + flat_set groupNames; + + // Root sequence. + unique_ptr rootSeq = std::make_unique(); + rootSeq->setCaptureIndex(0); + + // Current sequence being appended to + ComponentSequence *currentSeq = rootSeq.get(); + + // The current character class being appended to. This is used as the + // accumulator for both character class and UCP properties. + unique_ptr currentCls; + + // True if the machine is currently inside a character class, i.e. square + // brackets [..]. + bool inCharClass = false; + + // True if the machine is inside a character class but it has not processed + // any "real" elements yet, i.e. it's still processing meta-characters like + // '^'. + bool inCharClassEarly = false; + + // Location at which the current character class began. + const char *currentClsBegin = p; + + // We throw exceptions on various parsing failures beyond this point: we + // use a try/catch block here to clean up our allocated memory before we + // re-throw the exception to the caller. + try { + // Embed the Ragel machine here + +#line 4187 "Parser.cpp" + { + cs = (int)regex_start; + top = 0; + ts = 0; + te = 0; + act = 0; + } + +#line 1982 "Parser.rl" + + +#line 4196 "Parser.cpp" + { + int _cpc; + int _klen; + const signed char * _ckeys; + unsigned int _trans = 0; + unsigned int _cond = 0; + const char * _keys; + const short * _acts; + unsigned int _nacts; + _resume: {} + if ( p == pe && p != eof ) + goto _out; + _acts = ( _regex_actions + (_regex_from_state_actions[cs])); + _nacts = (unsigned int)(*( _acts)); + _acts += 1; + while ( _nacts > 0 ) { + switch ( (*( _acts)) ) { + case 24: { + { +#line 1 "NONE" + {ts = p;}} + +#line 4218 "Parser.cpp" + + break; + } + } + _nacts -= 1; + _acts += 1; + } + + if ( p == eof ) { + if ( _regex_eof_trans[cs] > 0 ) { + _trans = (unsigned int)_regex_eof_trans[cs] - 1; + } + } + else { + _keys = ( _regex_trans_keys + (_regex_key_offsets[cs])); + _trans = (unsigned int)_regex_index_offsets[cs]; + + _klen = (int)_regex_single_lengths[cs]; + if ( _klen > 0 ) { + const char *_lower = _keys; + const char *_upper = _keys + _klen - 1; + const char *_mid; + while ( 1 ) { + if ( _upper < _lower ) { + _keys += _klen; + _trans += (unsigned int)_klen; + break; + } + + _mid = _lower + ((_upper-_lower) >> 1); + if ( ( (*( p))) < (*( _mid)) ) + _upper = _mid - 1; + else if ( ( (*( p))) > (*( _mid)) ) + _lower = _mid + 1; + else { + _trans += (unsigned int)(_mid - _keys); + goto _match; + } + } + } + + _klen = (int)_regex_range_lengths[cs]; + if ( _klen > 0 ) { + const char *_lower = _keys; + const char *_upper = _keys + (_klen<<1) - 2; + const char *_mid; + while ( 1 ) { + if ( _upper < _lower ) { + _trans += (unsigned int)_klen; + break; + } + + _mid = _lower + (((_upper-_lower) >> 1) & ~1); + if ( ( (*( p))) < (*( _mid)) ) + _upper = _mid - 2; + else if ( ( (*( p))) > (*( _mid + 1)) ) + _lower = _mid + 2; + else { + _trans += (unsigned int)((_mid - _keys)>>1); + break; + } + } + } + + _match: {} + } + _ckeys = ( _regex_cond_keys + (_regex_trans_offsets[_trans])); + _klen = (int)_regex_trans_lengths[_trans]; + _cond = (unsigned int)_regex_trans_offsets[_trans]; + + _cpc = 0; + switch ( _regex_trans_cond_spaces[_trans] ) { + + case 0: { + if ( ( mode.utf8 ) +#line 4293 "Parser.cpp" + ) _cpc += 1; + break; + } + case 1: { + if ( ( mode.ignore_space ) +#line 4298 "Parser.cpp" + ) _cpc += 1; + break; + } + case 2: { + if ( ( inCharClassEarly ) +#line 4303 "Parser.cpp" + ) _cpc += 1; + break; + } + } + { + const signed char *_lower = _ckeys; + const signed char *_upper = _ckeys + _klen - 1; + const signed char *_mid; + while ( 1 ) { + if ( _upper < _lower ) { + _cond = 3561; + + break; + } + + _mid = _lower + ((_upper-_lower) >> 1); + if ( _cpc < (int)(*( _mid)) ) + _upper = _mid - 1; + else if ( _cpc > (int)(*( _mid)) ) + _lower = _mid + 1; + else { + _cond += (unsigned int)(_mid - _ckeys); + + break; + } + } + } + cs = (int)_regex_cond_targs[_cond]; + + if ( _regex_cond_actions[_cond] != 0 ) { + + _acts = ( _regex_actions + (_regex_cond_actions[_cond])); + _nacts = (unsigned int)(*( _acts)); + _acts += 1; + while ( _nacts > 0 ) { + switch ( (*( _acts)) ) + { + case 0: { + { +#line 285 "Parser.rl" + label.clear();} + +#line 4345 "Parser.cpp" + + break; + } + case 1: { + { +#line 286 "Parser.rl" + label.push_back((( (*( p)))));} + +#line 4353 "Parser.cpp" + + break; + } + case 2: { + { +#line 287 "Parser.rl" + octAccumulator = 0;} + +#line 4361 "Parser.cpp" + + break; + } + case 3: { + { +#line 288 "Parser.rl" + accumulator = 0;} + +#line 4369 "Parser.cpp" + + break; + } + case 4: { + { +#line 289 "Parser.rl" + + octAccumulator = 0; + pushOct(&octAccumulator, (( (*( p))))); + } + +#line 4380 "Parser.cpp" + + break; + } + case 5: { + { +#line 293 "Parser.rl" + + accumulator = 0; + pushDec(&accumulator, (( (*( p))))); + } + +#line 4391 "Parser.cpp" + + break; + } + case 6: { + { +#line 297 "Parser.rl" + repeatN = 0; repeatM = 0; } + +#line 4399 "Parser.cpp" + + break; + } + case 7: { + { +#line 298 "Parser.rl" + pushDec(&repeatN, (( (*( p))))); } + +#line 4407 "Parser.cpp" + + break; + } + case 8: { + { +#line 299 "Parser.rl" + pushDec(&repeatM, (( (*( p))))); } + +#line 4415 "Parser.cpp" + + break; + } + case 9: { + { +#line 300 "Parser.rl" + pushOct(&octAccumulator, (( (*( p))))); } + +#line 4423 "Parser.cpp" + + break; + } + case 10: { + { +#line 301 "Parser.rl" + pushDec(&accumulator, (( (*( p))))); } + +#line 4431 "Parser.cpp" + + break; + } + case 11: { + { +#line 302 "Parser.rl" + + accumulator *= 16; + accumulator += (( (*( p)))) - '0'; + } + +#line 4442 "Parser.cpp" + + break; + } + case 12: { + { +#line 306 "Parser.rl" + + accumulator *= 16; + accumulator += 10 + (( (*( p)))) - 'a'; + } + +#line 4453 "Parser.cpp" + + break; + } + case 13: { + { +#line 310 "Parser.rl" + + accumulator *= 16; + accumulator += 10 + (( (*( p)))) - 'A'; + } + +#line 4464 "Parser.cpp" + + break; + } + case 14: { + { +#line 430 "Parser.rl" + + newMode = mode; + } + +#line 4474 "Parser.cpp" + + break; + } + case 15: { + { +#line 437 "Parser.rl" + + switch ((( (*( p))))) { + case 'i': + newMode.caseless = true; + break; + case 'm': + newMode.multiline = true; + break; + case 's': + newMode.dotall = true; + break; + case 'x': + newMode.ignore_space = true; + break; + default: + assert(0); // this action only called for [imsx] + break; + } + } + +#line 4500 "Parser.cpp" + + break; + } + case 16: { + { +#line 456 "Parser.rl" + + switch ((( (*( p))))) { + case 'i': + newMode.caseless = false; + break; + case 'm': + newMode.multiline = false; + break; + case 's': + newMode.dotall = false; + break; + case 'x': + newMode.ignore_space = false; + break; + default: + assert(0); // this action only called for [imsx] + break; + } + } + +#line 4526 "Parser.cpp" + + break; + } + case 17: { + { +#line 510 "Parser.rl" + repeatM = repeatN;} + +#line 4534 "Parser.cpp" + + break; + } + case 18: { + { +#line 510 "Parser.rl" + repeatM = ComponentRepeat::NoLimit;} + +#line 4542 "Parser.cpp" + + break; + } + case 19: { + { +#line 722 "Parser.rl" + negated = !negated; } + +#line 4550 "Parser.cpp" + + break; + } + case 20: { + { +#line 723 "Parser.rl" + {p = p - 1; } {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 790;goto _again;}} + +#line 4566 "Parser.cpp" + + break; + } + case 21: { + { +#line 724 "Parser.rl" + if (!inCharClass) { // not inside [..] + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + } + {top -= 1;cs = stack[top];goto _again;} + } + +#line 4579 "Parser.cpp" + + break; + } + case 22: { + { +#line 730 "Parser.rl" + throw LocatedParseError("Malformed property"); } + +#line 4587 "Parser.cpp" + + break; + } + case 25: { + { +#line 1 "NONE" + {te = p+1;}} + +#line 4595 "Parser.cpp" + + break; + } + case 26: { + { +#line 550 "Parser.rl" + {te = p+1;{ +#line 550 "Parser.rl" + + throw LocatedParseError("(*UTF8) must be at start of " + "expression, encountered"); + } + }} + +#line 4609 "Parser.cpp" + + break; + } + case 27: { + { +#line 554 "Parser.rl" + {te = p+1;{ +#line 554 "Parser.rl" + + throw LocatedParseError("(*UTF) must be at start of " + "expression, encountered"); + } + }} + +#line 4623 "Parser.cpp" + + break; + } + case 28: { + { +#line 558 "Parser.rl" + {te = p+1;{ +#line 558 "Parser.rl" + + throw LocatedParseError("(*UCP) must be at start of " + "expression, encountered"); + } + }} + +#line 4637 "Parser.cpp" + + break; + } + case 29: { + { +#line 564 "Parser.rl" + {te = p+1;{ +#line 564 "Parser.rl" + + ParseMode temp_mode; + assert(ts - 2 >= ptr); // parser needs the '(*' at the start too. + read_control_verbs(ts - 2, te, (ts - 2 - ptr), temp_mode); + assert(0); // Should have thrown a parse error. + throw LocatedParseError("Unknown control verb"); + } + }} + +#line 4654 "Parser.cpp" + + break; + } + case 30: { + { +#line 571 "Parser.rl" + {te = p+1;{ +#line 571 "Parser.rl" + + throw LocatedParseError("Unknown control verb"); + } + }} + +#line 4667 "Parser.cpp" + + break; + } + case 31: { + { +#line 571 "Parser.rl" + {te = p;p = p - 1;{ +#line 571 "Parser.rl" + + throw LocatedParseError("Unknown control verb"); + } + }} + +#line 4680 "Parser.cpp" + + break; + } + case 32: { + { +#line 571 "Parser.rl" + {p = ((te))-1; + { +#line 571 "Parser.rl" + + throw LocatedParseError("Unknown control verb"); + } + }} + +#line 4694 "Parser.cpp" + + break; + } + case 33: { + { +#line 581 "Parser.rl" + {te = p+1;{ +#line 581 "Parser.rl" + currentCls->add(CLASS_UCP_CC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4705 "Parser.cpp" + + break; + } + case 34: { + { +#line 582 "Parser.rl" + {te = p+1;{ +#line 582 "Parser.rl" + currentCls->add(CLASS_UCP_CF, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4716 "Parser.cpp" + + break; + } + case 35: { + { +#line 583 "Parser.rl" + {te = p+1;{ +#line 583 "Parser.rl" + currentCls->add(CLASS_UCP_CN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4727 "Parser.cpp" + + break; + } + case 36: { + { +#line 585 "Parser.rl" + {te = p+1;{ +#line 585 "Parser.rl" + currentCls->add(CLASS_UCP_CS, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4738 "Parser.cpp" + + break; + } + case 37: { + { +#line 587 "Parser.rl" + {te = p+1;{ +#line 587 "Parser.rl" + currentCls->add(CLASS_UCP_LL, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4749 "Parser.cpp" + + break; + } + case 38: { + { +#line 588 "Parser.rl" + {te = p+1;{ +#line 588 "Parser.rl" + currentCls->add(CLASS_UCP_LM, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4760 "Parser.cpp" + + break; + } + case 39: { + { +#line 589 "Parser.rl" + {te = p+1;{ +#line 589 "Parser.rl" + currentCls->add(CLASS_UCP_LO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4771 "Parser.cpp" + + break; + } + case 40: { + { +#line 590 "Parser.rl" + {te = p+1;{ +#line 590 "Parser.rl" + currentCls->add(CLASS_UCP_LT, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4782 "Parser.cpp" + + break; + } + case 41: { + { +#line 591 "Parser.rl" + {te = p+1;{ +#line 591 "Parser.rl" + currentCls->add(CLASS_UCP_LU, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4793 "Parser.cpp" + + break; + } + case 42: { + { +#line 592 "Parser.rl" + {te = p+1;{ +#line 592 "Parser.rl" + currentCls->add(CLASS_UCP_L_AND, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4804 "Parser.cpp" + + break; + } + case 43: { + { +#line 594 "Parser.rl" + {te = p+1;{ +#line 594 "Parser.rl" + currentCls->add(CLASS_UCP_MC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4815 "Parser.cpp" + + break; + } + case 44: { + { +#line 596 "Parser.rl" + {te = p+1;{ +#line 596 "Parser.rl" + currentCls->add(CLASS_UCP_MN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4826 "Parser.cpp" + + break; + } + case 45: { + { +#line 598 "Parser.rl" + {te = p+1;{ +#line 598 "Parser.rl" + currentCls->add(CLASS_UCP_ND, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4837 "Parser.cpp" + + break; + } + case 46: { + { +#line 599 "Parser.rl" + {te = p+1;{ +#line 599 "Parser.rl" + currentCls->add(CLASS_UCP_NL, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4848 "Parser.cpp" + + break; + } + case 47: { + { +#line 600 "Parser.rl" + {te = p+1;{ +#line 600 "Parser.rl" + currentCls->add(CLASS_UCP_NO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4859 "Parser.cpp" + + break; + } + case 48: { + { +#line 602 "Parser.rl" + {te = p+1;{ +#line 602 "Parser.rl" + currentCls->add(CLASS_UCP_PC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4870 "Parser.cpp" + + break; + } + case 49: { + { +#line 603 "Parser.rl" + {te = p+1;{ +#line 603 "Parser.rl" + currentCls->add(CLASS_UCP_PD, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4881 "Parser.cpp" + + break; + } + case 50: { + { +#line 604 "Parser.rl" + {te = p+1;{ +#line 604 "Parser.rl" + currentCls->add(CLASS_UCP_PE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4892 "Parser.cpp" + + break; + } + case 51: { + { +#line 605 "Parser.rl" + {te = p+1;{ +#line 605 "Parser.rl" + currentCls->add(CLASS_UCP_PF, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4903 "Parser.cpp" + + break; + } + case 52: { + { +#line 606 "Parser.rl" + {te = p+1;{ +#line 606 "Parser.rl" + currentCls->add(CLASS_UCP_PI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4914 "Parser.cpp" + + break; + } + case 53: { + { +#line 607 "Parser.rl" + {te = p+1;{ +#line 607 "Parser.rl" + currentCls->add(CLASS_UCP_PO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4925 "Parser.cpp" + + break; + } + case 54: { + { +#line 608 "Parser.rl" + {te = p+1;{ +#line 608 "Parser.rl" + currentCls->add(CLASS_UCP_PS, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4936 "Parser.cpp" + + break; + } + case 55: { + { +#line 610 "Parser.rl" + {te = p+1;{ +#line 610 "Parser.rl" + currentCls->add(CLASS_UCP_SC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4947 "Parser.cpp" + + break; + } + case 56: { + { +#line 611 "Parser.rl" + {te = p+1;{ +#line 611 "Parser.rl" + currentCls->add(CLASS_UCP_SK, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4958 "Parser.cpp" + + break; + } + case 57: { + { +#line 612 "Parser.rl" + {te = p+1;{ +#line 612 "Parser.rl" + currentCls->add(CLASS_UCP_SM, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4969 "Parser.cpp" + + break; + } + case 58: { + { +#line 613 "Parser.rl" + {te = p+1;{ +#line 613 "Parser.rl" + currentCls->add(CLASS_UCP_SO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4980 "Parser.cpp" + + break; + } + case 59: { + { +#line 615 "Parser.rl" + {te = p+1;{ +#line 615 "Parser.rl" + currentCls->add(CLASS_UCP_ZL, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 4991 "Parser.cpp" + + break; + } + case 60: { + { +#line 616 "Parser.rl" + {te = p+1;{ +#line 616 "Parser.rl" + currentCls->add(CLASS_UCP_ZP, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5002 "Parser.cpp" + + break; + } + case 61: { + { +#line 617 "Parser.rl" + {te = p+1;{ +#line 617 "Parser.rl" + currentCls->add(CLASS_UCP_ZS, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5013 "Parser.cpp" + + break; + } + case 62: { + { +#line 618 "Parser.rl" + {te = p+1;{ +#line 618 "Parser.rl" + currentCls->add(CLASS_UCP_XAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5024 "Parser.cpp" + + break; + } + case 63: { + { +#line 619 "Parser.rl" + {te = p+1;{ +#line 619 "Parser.rl" + currentCls->add(CLASS_UCP_XPS, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5035 "Parser.cpp" + + break; + } + case 64: { + { +#line 620 "Parser.rl" + {te = p+1;{ +#line 620 "Parser.rl" + currentCls->add(CLASS_UCP_XSP, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5046 "Parser.cpp" + + break; + } + case 65: { + { +#line 621 "Parser.rl" + {te = p+1;{ +#line 621 "Parser.rl" + currentCls->add(CLASS_UCP_XWD, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5057 "Parser.cpp" + + break; + } + case 66: { + { +#line 622 "Parser.rl" + {te = p+1;{ +#line 622 "Parser.rl" + currentCls->add(CLASS_SCRIPT_ARABIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5068 "Parser.cpp" + + break; + } + case 67: { + { +#line 623 "Parser.rl" + {te = p+1;{ +#line 623 "Parser.rl" + currentCls->add(CLASS_SCRIPT_ARMENIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5079 "Parser.cpp" + + break; + } + case 68: { + { +#line 624 "Parser.rl" + {te = p+1;{ +#line 624 "Parser.rl" + currentCls->add(CLASS_SCRIPT_AVESTAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5090 "Parser.cpp" + + break; + } + case 69: { + { +#line 625 "Parser.rl" + {te = p+1;{ +#line 625 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BALINESE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5101 "Parser.cpp" + + break; + } + case 70: { + { +#line 626 "Parser.rl" + {te = p+1;{ +#line 626 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BAMUM, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5112 "Parser.cpp" + + break; + } + case 71: { + { +#line 627 "Parser.rl" + {te = p+1;{ +#line 627 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BATAK, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5123 "Parser.cpp" + + break; + } + case 72: { + { +#line 628 "Parser.rl" + {te = p+1;{ +#line 628 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BENGALI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5134 "Parser.cpp" + + break; + } + case 73: { + { +#line 629 "Parser.rl" + {te = p+1;{ +#line 629 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BOPOMOFO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5145 "Parser.cpp" + + break; + } + case 74: { + { +#line 630 "Parser.rl" + {te = p+1;{ +#line 630 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BRAHMI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5156 "Parser.cpp" + + break; + } + case 75: { + { +#line 631 "Parser.rl" + {te = p+1;{ +#line 631 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BRAILLE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5167 "Parser.cpp" + + break; + } + case 76: { + { +#line 632 "Parser.rl" + {te = p+1;{ +#line 632 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BUGINESE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5178 "Parser.cpp" + + break; + } + case 77: { + { +#line 633 "Parser.rl" + {te = p+1;{ +#line 633 "Parser.rl" + currentCls->add(CLASS_SCRIPT_BUHID, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5189 "Parser.cpp" + + break; + } + case 78: { + { +#line 634 "Parser.rl" + {te = p+1;{ +#line 634 "Parser.rl" + currentCls->add(CLASS_SCRIPT_CANADIAN_ABORIGINAL, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5200 "Parser.cpp" + + break; + } + case 79: { + { +#line 635 "Parser.rl" + {te = p+1;{ +#line 635 "Parser.rl" + currentCls->add(CLASS_SCRIPT_CARIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5211 "Parser.cpp" + + break; + } + case 80: { + { +#line 636 "Parser.rl" + {te = p+1;{ +#line 636 "Parser.rl" + currentCls->add(CLASS_SCRIPT_CHAM, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5222 "Parser.cpp" + + break; + } + case 81: { + { +#line 637 "Parser.rl" + {te = p+1;{ +#line 637 "Parser.rl" + currentCls->add(CLASS_SCRIPT_CHEROKEE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5233 "Parser.cpp" + + break; + } + case 82: { + { +#line 638 "Parser.rl" + {te = p+1;{ +#line 638 "Parser.rl" + currentCls->add(CLASS_SCRIPT_COMMON, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5244 "Parser.cpp" + + break; + } + case 83: { + { +#line 639 "Parser.rl" + {te = p+1;{ +#line 639 "Parser.rl" + currentCls->add(CLASS_SCRIPT_COPTIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5255 "Parser.cpp" + + break; + } + case 84: { + { +#line 640 "Parser.rl" + {te = p+1;{ +#line 640 "Parser.rl" + currentCls->add(CLASS_SCRIPT_CUNEIFORM, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5266 "Parser.cpp" + + break; + } + case 85: { + { +#line 641 "Parser.rl" + {te = p+1;{ +#line 641 "Parser.rl" + currentCls->add(CLASS_SCRIPT_CYPRIOT, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5277 "Parser.cpp" + + break; + } + case 86: { + { +#line 642 "Parser.rl" + {te = p+1;{ +#line 642 "Parser.rl" + currentCls->add(CLASS_SCRIPT_CYRILLIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5288 "Parser.cpp" + + break; + } + case 87: { + { +#line 643 "Parser.rl" + {te = p+1;{ +#line 643 "Parser.rl" + currentCls->add(CLASS_SCRIPT_DESERET, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5299 "Parser.cpp" + + break; + } + case 88: { + { +#line 644 "Parser.rl" + {te = p+1;{ +#line 644 "Parser.rl" + currentCls->add(CLASS_SCRIPT_DEVANAGARI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5310 "Parser.cpp" + + break; + } + case 89: { + { +#line 645 "Parser.rl" + {te = p+1;{ +#line 645 "Parser.rl" + currentCls->add(CLASS_SCRIPT_EGYPTIAN_HIEROGLYPHS, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5321 "Parser.cpp" + + break; + } + case 90: { + { +#line 646 "Parser.rl" + {te = p+1;{ +#line 646 "Parser.rl" + currentCls->add(CLASS_SCRIPT_ETHIOPIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5332 "Parser.cpp" + + break; + } + case 91: { + { +#line 647 "Parser.rl" + {te = p+1;{ +#line 647 "Parser.rl" + currentCls->add(CLASS_SCRIPT_GEORGIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5343 "Parser.cpp" + + break; + } + case 92: { + { +#line 648 "Parser.rl" + {te = p+1;{ +#line 648 "Parser.rl" + currentCls->add(CLASS_SCRIPT_GLAGOLITIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5354 "Parser.cpp" + + break; + } + case 93: { + { +#line 649 "Parser.rl" + {te = p+1;{ +#line 649 "Parser.rl" + currentCls->add(CLASS_SCRIPT_GOTHIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5365 "Parser.cpp" + + break; + } + case 94: { + { +#line 650 "Parser.rl" + {te = p+1;{ +#line 650 "Parser.rl" + currentCls->add(CLASS_SCRIPT_GREEK, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5376 "Parser.cpp" + + break; + } + case 95: { + { +#line 651 "Parser.rl" + {te = p+1;{ +#line 651 "Parser.rl" + currentCls->add(CLASS_SCRIPT_GUJARATI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5387 "Parser.cpp" + + break; + } + case 96: { + { +#line 652 "Parser.rl" + {te = p+1;{ +#line 652 "Parser.rl" + currentCls->add(CLASS_SCRIPT_GURMUKHI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5398 "Parser.cpp" + + break; + } + case 97: { + { +#line 654 "Parser.rl" + {te = p+1;{ +#line 654 "Parser.rl" + currentCls->add(CLASS_SCRIPT_HANGUL, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5409 "Parser.cpp" + + break; + } + case 98: { + { +#line 655 "Parser.rl" + {te = p+1;{ +#line 655 "Parser.rl" + currentCls->add(CLASS_SCRIPT_HANUNOO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5420 "Parser.cpp" + + break; + } + case 99: { + { +#line 656 "Parser.rl" + {te = p+1;{ +#line 656 "Parser.rl" + currentCls->add(CLASS_SCRIPT_HEBREW, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5431 "Parser.cpp" + + break; + } + case 100: { + { +#line 657 "Parser.rl" + {te = p+1;{ +#line 657 "Parser.rl" + currentCls->add(CLASS_SCRIPT_HIRAGANA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5442 "Parser.cpp" + + break; + } + case 101: { + { +#line 658 "Parser.rl" + {te = p+1;{ +#line 658 "Parser.rl" + currentCls->add(CLASS_SCRIPT_IMPERIAL_ARAMAIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5453 "Parser.cpp" + + break; + } + case 102: { + { +#line 659 "Parser.rl" + {te = p+1;{ +#line 659 "Parser.rl" + currentCls->add(CLASS_SCRIPT_INHERITED, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5464 "Parser.cpp" + + break; + } + case 103: { + { +#line 660 "Parser.rl" + {te = p+1;{ +#line 660 "Parser.rl" + currentCls->add(CLASS_SCRIPT_INSCRIPTIONAL_PAHLAVI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5475 "Parser.cpp" + + break; + } + case 104: { + { +#line 661 "Parser.rl" + {te = p+1;{ +#line 661 "Parser.rl" + currentCls->add(CLASS_SCRIPT_INSCRIPTIONAL_PARTHIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5486 "Parser.cpp" + + break; + } + case 105: { + { +#line 662 "Parser.rl" + {te = p+1;{ +#line 662 "Parser.rl" + currentCls->add(CLASS_SCRIPT_JAVANESE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5497 "Parser.cpp" + + break; + } + case 106: { + { +#line 663 "Parser.rl" + {te = p+1;{ +#line 663 "Parser.rl" + currentCls->add(CLASS_SCRIPT_KAITHI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5508 "Parser.cpp" + + break; + } + case 107: { + { +#line 664 "Parser.rl" + {te = p+1;{ +#line 664 "Parser.rl" + currentCls->add(CLASS_SCRIPT_KANNADA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5519 "Parser.cpp" + + break; + } + case 108: { + { +#line 665 "Parser.rl" + {te = p+1;{ +#line 665 "Parser.rl" + currentCls->add(CLASS_SCRIPT_KATAKANA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5530 "Parser.cpp" + + break; + } + case 109: { + { +#line 666 "Parser.rl" + {te = p+1;{ +#line 666 "Parser.rl" + currentCls->add(CLASS_SCRIPT_KAYAH_LI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5541 "Parser.cpp" + + break; + } + case 110: { + { +#line 667 "Parser.rl" + {te = p+1;{ +#line 667 "Parser.rl" + currentCls->add(CLASS_SCRIPT_KHAROSHTHI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5552 "Parser.cpp" + + break; + } + case 111: { + { +#line 668 "Parser.rl" + {te = p+1;{ +#line 668 "Parser.rl" + currentCls->add(CLASS_SCRIPT_KHMER, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5563 "Parser.cpp" + + break; + } + case 112: { + { +#line 669 "Parser.rl" + {te = p+1;{ +#line 669 "Parser.rl" + currentCls->add(CLASS_SCRIPT_LAO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5574 "Parser.cpp" + + break; + } + case 113: { + { +#line 670 "Parser.rl" + {te = p+1;{ +#line 670 "Parser.rl" + currentCls->add(CLASS_SCRIPT_LATIN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5585 "Parser.cpp" + + break; + } + case 114: { + { +#line 671 "Parser.rl" + {te = p+1;{ +#line 671 "Parser.rl" + currentCls->add(CLASS_SCRIPT_LEPCHA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5596 "Parser.cpp" + + break; + } + case 115: { + { +#line 672 "Parser.rl" + {te = p+1;{ +#line 672 "Parser.rl" + currentCls->add(CLASS_SCRIPT_LIMBU, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5607 "Parser.cpp" + + break; + } + case 116: { + { +#line 673 "Parser.rl" + {te = p+1;{ +#line 673 "Parser.rl" + currentCls->add(CLASS_SCRIPT_LINEAR_B, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5618 "Parser.cpp" + + break; + } + case 117: { + { +#line 674 "Parser.rl" + {te = p+1;{ +#line 674 "Parser.rl" + currentCls->add(CLASS_SCRIPT_LISU, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5629 "Parser.cpp" + + break; + } + case 118: { + { +#line 675 "Parser.rl" + {te = p+1;{ +#line 675 "Parser.rl" + currentCls->add(CLASS_SCRIPT_LYCIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5640 "Parser.cpp" + + break; + } + case 119: { + { +#line 676 "Parser.rl" + {te = p+1;{ +#line 676 "Parser.rl" + currentCls->add(CLASS_SCRIPT_LYDIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5651 "Parser.cpp" + + break; + } + case 120: { + { +#line 677 "Parser.rl" + {te = p+1;{ +#line 677 "Parser.rl" + currentCls->add(CLASS_SCRIPT_MALAYALAM, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5662 "Parser.cpp" + + break; + } + case 121: { + { +#line 678 "Parser.rl" + {te = p+1;{ +#line 678 "Parser.rl" + currentCls->add(CLASS_SCRIPT_MANDAIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5673 "Parser.cpp" + + break; + } + case 122: { + { +#line 679 "Parser.rl" + {te = p+1;{ +#line 679 "Parser.rl" + currentCls->add(CLASS_SCRIPT_MEETEI_MAYEK, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5684 "Parser.cpp" + + break; + } + case 123: { + { +#line 680 "Parser.rl" + {te = p+1;{ +#line 680 "Parser.rl" + currentCls->add(CLASS_SCRIPT_MONGOLIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5695 "Parser.cpp" + + break; + } + case 124: { + { +#line 681 "Parser.rl" + {te = p+1;{ +#line 681 "Parser.rl" + currentCls->add(CLASS_SCRIPT_MYANMAR, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5706 "Parser.cpp" + + break; + } + case 125: { + { +#line 682 "Parser.rl" + {te = p+1;{ +#line 682 "Parser.rl" + currentCls->add(CLASS_SCRIPT_NEW_TAI_LUE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5717 "Parser.cpp" + + break; + } + case 126: { + { +#line 683 "Parser.rl" + {te = p+1;{ +#line 683 "Parser.rl" + currentCls->add(CLASS_SCRIPT_NKO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5728 "Parser.cpp" + + break; + } + case 127: { + { +#line 684 "Parser.rl" + {te = p+1;{ +#line 684 "Parser.rl" + currentCls->add(CLASS_SCRIPT_OGHAM, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5739 "Parser.cpp" + + break; + } + case 128: { + { +#line 685 "Parser.rl" + {te = p+1;{ +#line 685 "Parser.rl" + currentCls->add(CLASS_SCRIPT_OL_CHIKI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5750 "Parser.cpp" + + break; + } + case 129: { + { +#line 686 "Parser.rl" + {te = p+1;{ +#line 686 "Parser.rl" + currentCls->add(CLASS_SCRIPT_OLD_ITALIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5761 "Parser.cpp" + + break; + } + case 130: { + { +#line 687 "Parser.rl" + {te = p+1;{ +#line 687 "Parser.rl" + currentCls->add(CLASS_SCRIPT_OLD_PERSIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5772 "Parser.cpp" + + break; + } + case 131: { + { +#line 688 "Parser.rl" + {te = p+1;{ +#line 688 "Parser.rl" + currentCls->add(CLASS_SCRIPT_OLD_SOUTH_ARABIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5783 "Parser.cpp" + + break; + } + case 132: { + { +#line 689 "Parser.rl" + {te = p+1;{ +#line 689 "Parser.rl" + currentCls->add(CLASS_SCRIPT_OLD_TURKIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5794 "Parser.cpp" + + break; + } + case 133: { + { +#line 690 "Parser.rl" + {te = p+1;{ +#line 690 "Parser.rl" + currentCls->add(CLASS_SCRIPT_ORIYA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5805 "Parser.cpp" + + break; + } + case 134: { + { +#line 691 "Parser.rl" + {te = p+1;{ +#line 691 "Parser.rl" + currentCls->add(CLASS_SCRIPT_OSMANYA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5816 "Parser.cpp" + + break; + } + case 135: { + { +#line 692 "Parser.rl" + {te = p+1;{ +#line 692 "Parser.rl" + currentCls->add(CLASS_SCRIPT_PHAGS_PA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5827 "Parser.cpp" + + break; + } + case 136: { + { +#line 693 "Parser.rl" + {te = p+1;{ +#line 693 "Parser.rl" + currentCls->add(CLASS_SCRIPT_PHOENICIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5838 "Parser.cpp" + + break; + } + case 137: { + { +#line 694 "Parser.rl" + {te = p+1;{ +#line 694 "Parser.rl" + currentCls->add(CLASS_SCRIPT_REJANG, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5849 "Parser.cpp" + + break; + } + case 138: { + { +#line 695 "Parser.rl" + {te = p+1;{ +#line 695 "Parser.rl" + currentCls->add(CLASS_SCRIPT_RUNIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5860 "Parser.cpp" + + break; + } + case 139: { + { +#line 696 "Parser.rl" + {te = p+1;{ +#line 696 "Parser.rl" + currentCls->add(CLASS_SCRIPT_SAMARITAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5871 "Parser.cpp" + + break; + } + case 140: { + { +#line 697 "Parser.rl" + {te = p+1;{ +#line 697 "Parser.rl" + currentCls->add(CLASS_SCRIPT_SAURASHTRA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5882 "Parser.cpp" + + break; + } + case 141: { + { +#line 698 "Parser.rl" + {te = p+1;{ +#line 698 "Parser.rl" + currentCls->add(CLASS_SCRIPT_SHAVIAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5893 "Parser.cpp" + + break; + } + case 142: { + { +#line 699 "Parser.rl" + {te = p+1;{ +#line 699 "Parser.rl" + currentCls->add(CLASS_SCRIPT_SINHALA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5904 "Parser.cpp" + + break; + } + case 143: { + { +#line 700 "Parser.rl" + {te = p+1;{ +#line 700 "Parser.rl" + currentCls->add(CLASS_SCRIPT_SUNDANESE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5915 "Parser.cpp" + + break; + } + case 144: { + { +#line 701 "Parser.rl" + {te = p+1;{ +#line 701 "Parser.rl" + currentCls->add(CLASS_SCRIPT_SYLOTI_NAGRI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5926 "Parser.cpp" + + break; + } + case 145: { + { +#line 702 "Parser.rl" + {te = p+1;{ +#line 702 "Parser.rl" + currentCls->add(CLASS_SCRIPT_SYRIAC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5937 "Parser.cpp" + + break; + } + case 146: { + { +#line 703 "Parser.rl" + {te = p+1;{ +#line 703 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TAGALOG, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5948 "Parser.cpp" + + break; + } + case 147: { + { +#line 704 "Parser.rl" + {te = p+1;{ +#line 704 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TAGBANWA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5959 "Parser.cpp" + + break; + } + case 148: { + { +#line 705 "Parser.rl" + {te = p+1;{ +#line 705 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TAI_LE, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5970 "Parser.cpp" + + break; + } + case 149: { + { +#line 706 "Parser.rl" + {te = p+1;{ +#line 706 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TAI_THAM, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5981 "Parser.cpp" + + break; + } + case 150: { + { +#line 707 "Parser.rl" + {te = p+1;{ +#line 707 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TAI_VIET, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 5992 "Parser.cpp" + + break; + } + case 151: { + { +#line 708 "Parser.rl" + {te = p+1;{ +#line 708 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TAMIL, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6003 "Parser.cpp" + + break; + } + case 152: { + { +#line 709 "Parser.rl" + {te = p+1;{ +#line 709 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TELUGU, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6014 "Parser.cpp" + + break; + } + case 153: { + { +#line 710 "Parser.rl" + {te = p+1;{ +#line 710 "Parser.rl" + currentCls->add(CLASS_SCRIPT_THAANA, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6025 "Parser.cpp" + + break; + } + case 154: { + { +#line 711 "Parser.rl" + {te = p+1;{ +#line 711 "Parser.rl" + currentCls->add(CLASS_SCRIPT_THAI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6036 "Parser.cpp" + + break; + } + case 155: { + { +#line 712 "Parser.rl" + {te = p+1;{ +#line 712 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TIBETAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6047 "Parser.cpp" + + break; + } + case 156: { + { +#line 713 "Parser.rl" + {te = p+1;{ +#line 713 "Parser.rl" + currentCls->add(CLASS_SCRIPT_TIFINAGH, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6058 "Parser.cpp" + + break; + } + case 157: { + { +#line 714 "Parser.rl" + {te = p+1;{ +#line 714 "Parser.rl" + currentCls->add(CLASS_SCRIPT_UGARITIC, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6069 "Parser.cpp" + + break; + } + case 158: { + { +#line 715 "Parser.rl" + {te = p+1;{ +#line 715 "Parser.rl" + currentCls->add(CLASS_SCRIPT_VAI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6080 "Parser.cpp" + + break; + } + case 159: { + { +#line 716 "Parser.rl" + {te = p+1;{ +#line 716 "Parser.rl" + currentCls->add(CLASS_SCRIPT_YI, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6091 "Parser.cpp" + + break; + } + case 160: { + { +#line 717 "Parser.rl" + {te = p+1;{ +#line 717 "Parser.rl" + currentCls->add(CLASS_UCP_ANY, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6102 "Parser.cpp" + + break; + } + case 161: { + { +#line 718 "Parser.rl" + {te = p+1;{ +#line 718 "Parser.rl" + throw LocatedParseError("Unknown property"); } + }} + +#line 6113 "Parser.cpp" + + break; + } + case 162: { + { +#line 580 "Parser.rl" + {te = p;p = p - 1;{ +#line 580 "Parser.rl" + currentCls->add(CLASS_UCP_C, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6124 "Parser.cpp" + + break; + } + case 163: { + { +#line 584 "Parser.rl" + {te = p;p = p - 1;{ +#line 584 "Parser.rl" + currentCls->add(CLASS_UCP_CO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6135 "Parser.cpp" + + break; + } + case 164: { + { +#line 586 "Parser.rl" + {te = p;p = p - 1;{ +#line 586 "Parser.rl" + currentCls->add(CLASS_UCP_L, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6146 "Parser.cpp" + + break; + } + case 165: { + { +#line 593 "Parser.rl" + {te = p;p = p - 1;{ +#line 593 "Parser.rl" + currentCls->add(CLASS_UCP_M, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6157 "Parser.cpp" + + break; + } + case 166: { + { +#line 595 "Parser.rl" + {te = p;p = p - 1;{ +#line 595 "Parser.rl" + currentCls->add(CLASS_UCP_ME, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6168 "Parser.cpp" + + break; + } + case 167: { + { +#line 597 "Parser.rl" + {te = p;p = p - 1;{ +#line 597 "Parser.rl" + currentCls->add(CLASS_UCP_N, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6179 "Parser.cpp" + + break; + } + case 168: { + { +#line 601 "Parser.rl" + {te = p;p = p - 1;{ +#line 601 "Parser.rl" + currentCls->add(CLASS_UCP_P, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6190 "Parser.cpp" + + break; + } + case 169: { + { +#line 609 "Parser.rl" + {te = p;p = p - 1;{ +#line 609 "Parser.rl" + currentCls->add(CLASS_UCP_S, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6201 "Parser.cpp" + + break; + } + case 170: { + { +#line 614 "Parser.rl" + {te = p;p = p - 1;{ +#line 614 "Parser.rl" + currentCls->add(CLASS_UCP_Z, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6212 "Parser.cpp" + + break; + } + case 171: { + { +#line 653 "Parser.rl" + {te = p;p = p - 1;{ +#line 653 "Parser.rl" + currentCls->add(CLASS_SCRIPT_HAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6223 "Parser.cpp" + + break; + } + case 172: { + { +#line 718 "Parser.rl" + {te = p;p = p - 1;{ +#line 718 "Parser.rl" + throw LocatedParseError("Unknown property"); } + }} + +#line 6234 "Parser.cpp" + + break; + } + case 173: { + { +#line 580 "Parser.rl" + {p = ((te))-1; + { +#line 580 "Parser.rl" + currentCls->add(CLASS_UCP_C, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6246 "Parser.cpp" + + break; + } + case 174: { + { +#line 584 "Parser.rl" + {p = ((te))-1; + { +#line 584 "Parser.rl" + currentCls->add(CLASS_UCP_CO, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6258 "Parser.cpp" + + break; + } + case 175: { + { +#line 586 "Parser.rl" + {p = ((te))-1; + { +#line 586 "Parser.rl" + currentCls->add(CLASS_UCP_L, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6270 "Parser.cpp" + + break; + } + case 176: { + { +#line 593 "Parser.rl" + {p = ((te))-1; + { +#line 593 "Parser.rl" + currentCls->add(CLASS_UCP_M, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6282 "Parser.cpp" + + break; + } + case 177: { + { +#line 595 "Parser.rl" + {p = ((te))-1; + { +#line 595 "Parser.rl" + currentCls->add(CLASS_UCP_ME, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6294 "Parser.cpp" + + break; + } + case 178: { + { +#line 597 "Parser.rl" + {p = ((te))-1; + { +#line 597 "Parser.rl" + currentCls->add(CLASS_UCP_N, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6306 "Parser.cpp" + + break; + } + case 179: { + { +#line 601 "Parser.rl" + {p = ((te))-1; + { +#line 601 "Parser.rl" + currentCls->add(CLASS_UCP_P, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6318 "Parser.cpp" + + break; + } + case 180: { + { +#line 609 "Parser.rl" + {p = ((te))-1; + { +#line 609 "Parser.rl" + currentCls->add(CLASS_UCP_S, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6330 "Parser.cpp" + + break; + } + case 181: { + { +#line 653 "Parser.rl" + {p = ((te))-1; + { +#line 653 "Parser.rl" + currentCls->add(CLASS_SCRIPT_HAN, negated); {top -= 1;cs = stack[top];goto _again;} } + }} + +#line 6342 "Parser.cpp" + + break; + } + case 182: { + { +#line 718 "Parser.rl" + {p = ((te))-1; + { +#line 718 "Parser.rl" + throw LocatedParseError("Unknown property"); } + }} + +#line 6354 "Parser.cpp" + + break; + } + case 183: { + { +#line 733 "Parser.rl" + {te = p+1;{ +#line 733 "Parser.rl" + + currentCls->add(CLASS_UCP_C, negated); + if (!inCharClass) { + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + } + {top -= 1;cs = stack[top];goto _again;} + } + }} + +#line 6372 "Parser.cpp" + + break; + } + case 184: { + { +#line 741 "Parser.rl" + {te = p+1;{ +#line 741 "Parser.rl" + + currentCls->add(CLASS_UCP_L, negated); + if (!inCharClass) { + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + } + {top -= 1;cs = stack[top];goto _again;} + } + }} + +#line 6390 "Parser.cpp" + + break; + } + case 185: { + { +#line 749 "Parser.rl" + {te = p+1;{ +#line 749 "Parser.rl" + + currentCls->add(CLASS_UCP_M, negated); + if (!inCharClass) { + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + } + {top -= 1;cs = stack[top];goto _again;} + } + }} + +#line 6408 "Parser.cpp" + + break; + } + case 186: { + { +#line 757 "Parser.rl" + {te = p+1;{ +#line 757 "Parser.rl" + + currentCls->add(CLASS_UCP_N, negated); + if (!inCharClass) { + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + } + {top -= 1;cs = stack[top];goto _again;} + } + }} + +#line 6426 "Parser.cpp" + + break; + } + case 187: { + { +#line 765 "Parser.rl" + {te = p+1;{ +#line 765 "Parser.rl" + + currentCls->add(CLASS_UCP_P, negated); + if (!inCharClass) { + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + } + {top -= 1;cs = stack[top];goto _again;} + } + }} + +#line 6444 "Parser.cpp" + + break; + } + case 188: { + { +#line 773 "Parser.rl" + {te = p+1;{ +#line 773 "Parser.rl" + + currentCls->add(CLASS_UCP_S, negated); + if (!inCharClass) { + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + } + {top -= 1;cs = stack[top];goto _again;} + } + }} + +#line 6462 "Parser.cpp" + + break; + } + case 189: { + { +#line 781 "Parser.rl" + {te = p+1;{ +#line 781 "Parser.rl" + + currentCls->add(CLASS_UCP_Z, negated); + if (!inCharClass) { + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + } + {top -= 1;cs = stack[top];goto _again;} + } + }} + +#line 6480 "Parser.cpp" + + break; + } + case 190: { + { +#line 790 "Parser.rl" + {te = p+1;{ +#line 790 "Parser.rl" + throw LocatedParseError("Unknown property"); } + }} + +#line 6491 "Parser.cpp" + + break; + } + case 191: { + { +#line 796 "Parser.rl" + {te = p+1;{ +#line 796 "Parser.rl" + + throw LocatedParseError("Unsupported POSIX collating " + "element"); + } + }} + +#line 6505 "Parser.cpp" + + break; + } + case 192: { + { +#line 803 "Parser.rl" + {te = p+1;{ +#line 803 "Parser.rl" + + currentCls->add(CLASS_ALNUM, false); + } + }} + +#line 6518 "Parser.cpp" + + break; + } + case 193: { + { +#line 806 "Parser.rl" + {te = p+1;{ +#line 806 "Parser.rl" + + currentCls->add(CLASS_ALNUM, true); + } + }} + +#line 6531 "Parser.cpp" + + break; + } + case 194: { + { +#line 809 "Parser.rl" + {te = p+1;{ +#line 809 "Parser.rl" + + currentCls->add(CLASS_ALPHA, false); + } + }} + +#line 6544 "Parser.cpp" + + break; + } + case 195: { + { +#line 812 "Parser.rl" + {te = p+1;{ +#line 812 "Parser.rl" + + currentCls->add(CLASS_ALPHA, true); + } + }} + +#line 6557 "Parser.cpp" + + break; + } + case 196: { + { +#line 815 "Parser.rl" + {te = p+1;{ +#line 815 "Parser.rl" + + currentCls->add(CLASS_ASCII, false); + } + }} + +#line 6570 "Parser.cpp" + + break; + } + case 197: { + { +#line 818 "Parser.rl" + {te = p+1;{ +#line 818 "Parser.rl" + + currentCls->add(CLASS_ASCII, true); + } + }} + +#line 6583 "Parser.cpp" + + break; + } + case 198: { + { +#line 821 "Parser.rl" + {te = p+1;{ +#line 821 "Parser.rl" + + currentCls->add(CLASS_BLANK, false); + } + }} + +#line 6596 "Parser.cpp" + + break; + } + case 199: { + { +#line 824 "Parser.rl" + {te = p+1;{ +#line 824 "Parser.rl" + + currentCls->add(CLASS_BLANK, true); + } + }} + +#line 6609 "Parser.cpp" + + break; + } + case 200: { + { +#line 827 "Parser.rl" + {te = p+1;{ +#line 827 "Parser.rl" + + currentCls->add(CLASS_CNTRL, false); + } + }} + +#line 6622 "Parser.cpp" + + break; + } + case 201: { + { +#line 830 "Parser.rl" + {te = p+1;{ +#line 830 "Parser.rl" + + currentCls->add(CLASS_CNTRL, true); + } + }} + +#line 6635 "Parser.cpp" + + break; + } + case 202: { + { +#line 833 "Parser.rl" + {te = p+1;{ +#line 833 "Parser.rl" + + currentCls->add(CLASS_DIGIT, false); + } + }} + +#line 6648 "Parser.cpp" + + break; + } + case 203: { + { +#line 836 "Parser.rl" + {te = p+1;{ +#line 836 "Parser.rl" + + currentCls->add(CLASS_DIGIT, true); + } + }} + +#line 6661 "Parser.cpp" + + break; + } + case 204: { + { +#line 839 "Parser.rl" + {te = p+1;{ +#line 839 "Parser.rl" + + currentCls->add(CLASS_GRAPH, false); + } + }} + +#line 6674 "Parser.cpp" + + break; + } + case 205: { + { +#line 842 "Parser.rl" + {te = p+1;{ +#line 842 "Parser.rl" + + currentCls->add(CLASS_GRAPH, true); + } + }} + +#line 6687 "Parser.cpp" + + break; + } + case 206: { + { +#line 845 "Parser.rl" + {te = p+1;{ +#line 845 "Parser.rl" + + currentCls->add(CLASS_LOWER, false); + } + }} + +#line 6700 "Parser.cpp" + + break; + } + case 207: { + { +#line 848 "Parser.rl" + {te = p+1;{ +#line 848 "Parser.rl" + + currentCls->add(CLASS_LOWER, true); + } + }} + +#line 6713 "Parser.cpp" + + break; + } + case 208: { + { +#line 851 "Parser.rl" + {te = p+1;{ +#line 851 "Parser.rl" + + currentCls->add(CLASS_PRINT, false); + } + }} + +#line 6726 "Parser.cpp" + + break; + } + case 209: { + { +#line 854 "Parser.rl" + {te = p+1;{ +#line 854 "Parser.rl" + + currentCls->add(CLASS_PRINT, true); + } + }} + +#line 6739 "Parser.cpp" + + break; + } + case 210: { + { +#line 857 "Parser.rl" + {te = p+1;{ +#line 857 "Parser.rl" + + currentCls->add(CLASS_PUNCT, false); + } + }} + +#line 6752 "Parser.cpp" + + break; + } + case 211: { + { +#line 860 "Parser.rl" + {te = p+1;{ +#line 860 "Parser.rl" + + currentCls->add(CLASS_PUNCT, true); + } + }} + +#line 6765 "Parser.cpp" + + break; + } + case 212: { + { +#line 864 "Parser.rl" + {te = p+1;{ +#line 864 "Parser.rl" + + currentCls->add(CLASS_SPACE, false); + } + }} + +#line 6778 "Parser.cpp" + + break; + } + case 213: { + { +#line 867 "Parser.rl" + {te = p+1;{ +#line 867 "Parser.rl" + + currentCls->add(CLASS_SPACE, true); + } + }} + +#line 6791 "Parser.cpp" + + break; + } + case 214: { + { +#line 870 "Parser.rl" + {te = p+1;{ +#line 870 "Parser.rl" + + currentCls->add(CLASS_UPPER, false); + } + }} + +#line 6804 "Parser.cpp" + + break; + } + case 215: { + { +#line 873 "Parser.rl" + {te = p+1;{ +#line 873 "Parser.rl" + + currentCls->add(CLASS_UPPER, true); + } + }} + +#line 6817 "Parser.cpp" + + break; + } + case 216: { + { +#line 876 "Parser.rl" + {te = p+1;{ +#line 876 "Parser.rl" + + currentCls->add(CLASS_WORD, false); + } + }} + +#line 6830 "Parser.cpp" + + break; + } + case 217: { + { +#line 879 "Parser.rl" + {te = p+1;{ +#line 879 "Parser.rl" + + currentCls->add(CLASS_WORD, true); + } + }} + +#line 6843 "Parser.cpp" + + break; + } + case 218: { + { +#line 882 "Parser.rl" + {te = p+1;{ +#line 882 "Parser.rl" + + currentCls->add(CLASS_XDIGIT, false); + } + }} + +#line 6856 "Parser.cpp" + + break; + } + case 219: { + { +#line 885 "Parser.rl" + {te = p+1;{ +#line 885 "Parser.rl" + + currentCls->add(CLASS_XDIGIT, true); + } + }} + +#line 6869 "Parser.cpp" + + break; + } + case 220: { + { +#line 890 "Parser.rl" + {te = p+1;{ +#line 890 "Parser.rl" + + throw LocatedParseError("Invalid POSIX named class"); + } + }} + +#line 6882 "Parser.cpp" + + break; + } + case 221: { + { +#line 893 "Parser.rl" + {te = p+1;{ +#line 893 "Parser.rl" + + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 843;goto _again;}} + }} + +#line 6902 "Parser.cpp" + + break; + } + case 222: { + { +#line 896 "Parser.rl" + {te = p+1;{ +#line 896 "Parser.rl" + /*noop*/} + }} + +#line 6913 "Parser.cpp" + + break; + } + case 223: { + { +#line 898 "Parser.rl" + {te = p+1;{ +#line 898 "Parser.rl" + + currentCls->add('\x08'); + } + }} + +#line 6926 "Parser.cpp" + + break; + } + case 224: { + { +#line 902 "Parser.rl" + {te = p+1;{ +#line 902 "Parser.rl" + + currentCls->add('\x09'); + } + }} + +#line 6939 "Parser.cpp" + + break; + } + case 225: { + { +#line 906 "Parser.rl" + {te = p+1;{ +#line 906 "Parser.rl" + + currentCls->add('\x0a'); + } + }} + +#line 6952 "Parser.cpp" + + break; + } + case 226: { + { +#line 910 "Parser.rl" + {te = p+1;{ +#line 910 "Parser.rl" + + currentCls->add('\x0d'); + } + }} + +#line 6965 "Parser.cpp" + + break; + } + case 227: { + { +#line 914 "Parser.rl" + {te = p+1;{ +#line 914 "Parser.rl" + + currentCls->add('\x0c'); + } + }} + +#line 6978 "Parser.cpp" + + break; + } + case 228: { + { +#line 918 "Parser.rl" + {te = p+1;{ +#line 918 "Parser.rl" + + currentCls->add('\x07'); + } + }} + +#line 6991 "Parser.cpp" + + break; + } + case 229: { + { +#line 922 "Parser.rl" + {te = p+1;{ +#line 922 "Parser.rl" + + currentCls->add('\x1b'); + } + }} + +#line 7004 "Parser.cpp" + + break; + } + case 230: { + { +#line 926 "Parser.rl" + {te = p+1;{ +#line 926 "Parser.rl" + + currentCls->add(CLASS_HORZ, false); + } + }} + +#line 7017 "Parser.cpp" + + break; + } + case 231: { + { +#line 930 "Parser.rl" + {te = p+1;{ +#line 930 "Parser.rl" + + currentCls->add(CLASS_HORZ, true); + } + }} + +#line 7030 "Parser.cpp" + + break; + } + case 232: { + { +#line 934 "Parser.rl" + {te = p+1;{ +#line 934 "Parser.rl" + + currentCls->add(CLASS_VERT, false); + } + }} + +#line 7043 "Parser.cpp" + + break; + } + case 233: { + { +#line 938 "Parser.rl" + {te = p+1;{ +#line 938 "Parser.rl" + + currentCls->add(CLASS_VERT, true); + } + }} + +#line 7056 "Parser.cpp" + + break; + } + case 234: { + { +#line 942 "Parser.rl" + {te = p+1;{ +#line 942 "Parser.rl" + + negated = false; + {p = p - 1; } + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 559;goto _again;}} + }} + +#line 7078 "Parser.cpp" + + break; + } + case 235: { + { +#line 948 "Parser.rl" + {te = p+1;{ +#line 948 "Parser.rl" + + negated = false; + {p = p - 1; } + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 818;goto _again;}} + }} + +#line 7100 "Parser.cpp" + + break; + } + case 236: { + { +#line 954 "Parser.rl" + {te = p+1;{ +#line 954 "Parser.rl" + + negated = true; + {p = p - 1; } + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 559;goto _again;}} + }} + +#line 7122 "Parser.cpp" + + break; + } + case 237: { + { +#line 960 "Parser.rl" + {te = p+1;{ +#line 960 "Parser.rl" + + negated = true; + {p = p - 1; } + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 818;goto _again;}} + }} + +#line 7144 "Parser.cpp" + + break; + } + case 238: { + { +#line 970 "Parser.rl" + {te = p+1;{ +#line 970 "Parser.rl" + + currentCls->add(octAccumulator); + } + }} + +#line 7157 "Parser.cpp" + + break; + } + case 239: { + { +#line 973 "Parser.rl" + {te = p+1;{ +#line 973 "Parser.rl" + + currentCls->add(octAccumulator); + } + }} + +#line 7170 "Parser.cpp" + + break; + } + case 240: { + { +#line 977 "Parser.rl" + {te = p+1;{ +#line 977 "Parser.rl" + + string oct(ts + 3, te - ts - 4); + unsigned long val; + try { + val = stoul(oct, nullptr, 8); + } catch (const std::out_of_range &) { + val = MAX_UNICODE + 1; + } + if ((!mode.utf8 && val > 255) || val > MAX_UNICODE) { + throw LocatedParseError("Value in \\o{...} sequence is too large"); + } + currentCls->add((unichar)val); + } + }} + +#line 7193 "Parser.cpp" + + break; + } + case 241: { + { +#line 997 "Parser.rl" + {te = p+1;{ +#line 997 "Parser.rl" + + currentCls->add(accumulator); + } + }} + +#line 7206 "Parser.cpp" + + break; + } + case 242: { + { +#line 1001 "Parser.rl" + {te = p+1;{ +#line 1001 "Parser.rl" + + // whatever we found here + currentCls->add(*(ts + 1)); + + } + }} + +#line 7221 "Parser.cpp" + + break; + } + case 243: { + { +#line 1007 "Parser.rl" + {te = p+1;{ +#line 1007 "Parser.rl" + + string hex(ts + 3, te - ts - 4); + unsigned long val; + try { + val = stoul(hex, nullptr, 16); + } catch (const std::out_of_range &) { + val = MAX_UNICODE + 1; + } + if (val > MAX_UNICODE) { + throw LocatedParseError("Value in \\x{...} sequence is too large"); + } + currentCls->add((unichar)val); + } + }} + +#line 7244 "Parser.cpp" + + break; + } + case 244: { + { +#line 1025 "Parser.rl" + {te = p+1;{ +#line 1025 "Parser.rl" + + if (te - ts < 3) { + assert(te - ts == 2); + throw LocatedParseError(SLASH_C_ERROR); + } else { + assert(te - ts == 3); + currentCls->add(decodeCtrl(ts[2])); + } + } + }} + +#line 7263 "Parser.cpp" + + break; + } + case 245: { + { +#line 1035 "Parser.rl" + {te = p+1;{ +#line 1035 "Parser.rl" + + currentCls->add(CLASS_WORD, false); + } + }} + +#line 7276 "Parser.cpp" + + break; + } + case 246: { + { +#line 1039 "Parser.rl" + {te = p+1;{ +#line 1039 "Parser.rl" + + currentCls->add(CLASS_WORD, true); + } + }} + +#line 7289 "Parser.cpp" + + break; + } + case 247: { + { +#line 1043 "Parser.rl" + {te = p+1;{ +#line 1043 "Parser.rl" + + currentCls->add(CLASS_SPACE, false); + } + }} + +#line 7302 "Parser.cpp" + + break; + } + case 248: { + { +#line 1047 "Parser.rl" + {te = p+1;{ +#line 1047 "Parser.rl" + + currentCls->add(CLASS_SPACE, true); + } + }} + +#line 7315 "Parser.cpp" + + break; + } + case 249: { + { +#line 1051 "Parser.rl" + {te = p+1;{ +#line 1051 "Parser.rl" + + currentCls->add(CLASS_DIGIT, false); + } + }} + +#line 7328 "Parser.cpp" + + break; + } + case 250: { + { +#line 1055 "Parser.rl" + {te = p+1;{ +#line 1055 "Parser.rl" + + currentCls->add(CLASS_DIGIT, true); + } + }} + +#line 7341 "Parser.cpp" + + break; + } + case 251: { + { +#line 1058 "Parser.rl" + {te = p+1;{ +#line 1058 "Parser.rl" + + currentCls->addDash(); + } + }} + +#line 7354 "Parser.cpp" + + break; + } + case 252: { + { +#line 276 "Parser.rl" + {te = p+1;{ +#line 276 "Parser.rl" + + ostringstream str; + str << "'\\" << *(ts + 1) << "' at index " << ts - ptr + << " not supported in a character class."; + throw ParseError(str.str()); + } + }} + +#line 7370 "Parser.cpp" + + break; + } + case 253: { + { +#line 276 "Parser.rl" + {te = p+1;{ +#line 276 "Parser.rl" + + ostringstream str; + str << "'\\" << *(ts + 1) << "' at index " << ts - ptr + << " not supported in a character class."; + throw ParseError(str.str()); + } + }} + +#line 7386 "Parser.cpp" + + break; + } + case 254: { + { +#line 276 "Parser.rl" + {te = p+1;{ +#line 276 "Parser.rl" + + ostringstream str; + str << "'\\" << *(ts + 1) << "' at index " << ts - ptr + << " not supported in a character class."; + throw ParseError(str.str()); + } + }} + +#line 7402 "Parser.cpp" + + break; + } + case 255: { + { +#line 1075 "Parser.rl" + {te = p+1;{ +#line 1075 "Parser.rl" + + // add the literal char + currentCls->add(*(ts + 1)); + } + }} + +#line 7416 "Parser.cpp" + + break; + } + case 256: { + { +#line 1081 "Parser.rl" + {te = p+1;{ +#line 1081 "Parser.rl" + + assert(mode.utf8); + currentCls->add(readUtf8CodePoint2c(ts)); + } + }} + +#line 7430 "Parser.cpp" + + break; + } + case 257: { + { +#line 1086 "Parser.rl" + {te = p+1;{ +#line 1086 "Parser.rl" + + assert(mode.utf8); + currentCls->add(readUtf8CodePoint3c(ts)); + } + }} + +#line 7444 "Parser.cpp" + + break; + } + case 258: { + { +#line 1091 "Parser.rl" + {te = p+1;{ +#line 1091 "Parser.rl" + + assert(mode.utf8); + currentCls->add(readUtf8CodePoint4c(ts)); + } + }} + +#line 7458 "Parser.cpp" + + break; + } + case 259: { + { +#line 1096 "Parser.rl" + {te = p+1;{ +#line 1096 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 7472 "Parser.cpp" + + break; + } + case 260: { + { +#line 1102 "Parser.rl" + {te = p+1;{ +#line 1102 "Parser.rl" + + currentCls->add((u8)*ts); + } + }} + +#line 7485 "Parser.cpp" + + break; + } + case 261: { + { +#line 1106 "Parser.rl" + {te = p+1;{ +#line 1106 "Parser.rl" + + currentCls->finalize(); + currentSeq->addComponent(move(currentCls)); + inCharClass = false; + {cs = 746;goto _again;}} + }} + +#line 7500 "Parser.cpp" + + break; + } + case 262: { + { +#line 966 "Parser.rl" + {te = p;p = p - 1;{ +#line 966 "Parser.rl" + throw LocatedParseError("Malformed property"); } + }} + +#line 7511 "Parser.cpp" + + break; + } + case 263: { + { +#line 967 "Parser.rl" + {te = p;p = p - 1;{ +#line 967 "Parser.rl" + throw LocatedParseError("Malformed property"); } + }} + +#line 7522 "Parser.cpp" + + break; + } + case 264: { + { +#line 970 "Parser.rl" + {te = p;p = p - 1;{ +#line 970 "Parser.rl" + + currentCls->add(octAccumulator); + } + }} + +#line 7535 "Parser.cpp" + + break; + } + case 265: { + { +#line 973 "Parser.rl" + {te = p;p = p - 1;{ +#line 973 "Parser.rl" + + currentCls->add(octAccumulator); + } + }} + +#line 7548 "Parser.cpp" + + break; + } + case 266: { + { +#line 992 "Parser.rl" + {te = p;p = p - 1;{ +#line 992 "Parser.rl" + + throw LocatedParseError("Value in \\o{...} sequence is non-octal or missing braces"); + } + }} + +#line 7561 "Parser.cpp" + + break; + } + case 267: { + { +#line 997 "Parser.rl" + {te = p;p = p - 1;{ +#line 997 "Parser.rl" + + currentCls->add(accumulator); + } + }} + +#line 7574 "Parser.cpp" + + break; + } + case 268: { + { +#line 1021 "Parser.rl" + {te = p;p = p - 1;{ +#line 1021 "Parser.rl" + + throw LocatedParseError("Value in \\x{...} sequence is non-hex or missing }"); + } + }} + +#line 7587 "Parser.cpp" + + break; + } + case 269: { + { +#line 1025 "Parser.rl" + {te = p;p = p - 1;{ +#line 1025 "Parser.rl" + + if (te - ts < 3) { + assert(te - ts == 2); + throw LocatedParseError(SLASH_C_ERROR); + } else { + assert(te - ts == 3); + currentCls->add(decodeCtrl(ts[2])); + } + } + }} + +#line 7606 "Parser.cpp" + + break; + } + case 270: { + { +#line 1096 "Parser.rl" + {te = p;p = p - 1;{ +#line 1096 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 7620 "Parser.cpp" + + break; + } + case 271: { + { +#line 1102 "Parser.rl" + {te = p;p = p - 1;{ +#line 1102 "Parser.rl" + + currentCls->add((u8)*ts); + } + }} + +#line 7633 "Parser.cpp" + + break; + } + case 272: { + { +#line 992 "Parser.rl" + {p = ((te))-1; + { +#line 992 "Parser.rl" + + throw LocatedParseError("Value in \\o{...} sequence is non-octal or missing braces"); + } + }} + +#line 7647 "Parser.cpp" + + break; + } + case 273: { + { +#line 1021 "Parser.rl" + {p = ((te))-1; + { +#line 1021 "Parser.rl" + + throw LocatedParseError("Value in \\x{...} sequence is non-hex or missing }"); + } + }} + +#line 7661 "Parser.cpp" + + break; + } + case 274: { + { +#line 1096 "Parser.rl" + {p = ((te))-1; + { +#line 1096 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 7676 "Parser.cpp" + + break; + } + case 275: { + { +#line 1102 "Parser.rl" + {p = ((te))-1; + { +#line 1102 "Parser.rl" + + currentCls->add((u8)*ts); + } + }} + +#line 7690 "Parser.cpp" + + break; + } + case 276: { + { +#line 1120 "Parser.rl" + {te = p+1;{ +#line 1120 "Parser.rl" + + if (currentCls->isNegated()) { + // Already seen a caret; the second one is not a meta-character. + inCharClassEarly = false; + {p = p - 1; } {cs = 819;goto _again;}} else { + currentCls->negate(); + // Note: we cannot switch off inCharClassEarly here, as /[^]]/ + // needs to use the right square bracket path below. + } + } + }} + +#line 7710 "Parser.cpp" + + break; + } + case 277: { + { +#line 1133 "Parser.rl" + {te = p+1;{ +#line 1133 "Parser.rl" + + currentCls->add(']'); + inCharClassEarly = false; + } + }} + +#line 7724 "Parser.cpp" + + break; + } + case 278: { + { +#line 1138 "Parser.rl" + {te = p+1;{ +#line 1138 "Parser.rl" + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 843;goto _again;}} + }} + +#line 7743 "Parser.cpp" + + break; + } + case 279: { + { +#line 1139 "Parser.rl" + {te = p+1;{ +#line 1139 "Parser.rl" + /*noop*/} + }} + +#line 7754 "Parser.cpp" + + break; + } + case 280: { + { +#line 1142 "Parser.rl" + {te = p+1;{ +#line 1142 "Parser.rl" + + inCharClassEarly = false; + {p = p - 1; } + {cs = 819;goto _again;}} + }} + +#line 7768 "Parser.cpp" + + break; + } + case 281: { + { +#line 1142 "Parser.rl" + {te = p;p = p - 1;{ +#line 1142 "Parser.rl" + + inCharClassEarly = false; + {p = p - 1; } + {cs = 819;goto _again;}} + }} + +#line 7782 "Parser.cpp" + + break; + } + case 282: { + { +#line 1154 "Parser.rl" + {te = p+1;{ +#line 1154 "Parser.rl" + + {cs = 746;goto _again;}} + }} + +#line 7794 "Parser.cpp" + + break; + } + case 283: { + { +#line 1159 "Parser.rl" + {te = p+1;{ +#line 1159 "Parser.rl" + + assert(mode.utf8); + /* leverage ComponentClass to generate the vertices */ + auto cc = getComponentClass(mode); + cc->add(readUtf8CodePoint2c(ts)); + cc->finalize(); + currentSeq->addComponent(move(cc)); + } + }} + +#line 7812 "Parser.cpp" + + break; + } + case 284: { + { +#line 1168 "Parser.rl" + {te = p+1;{ +#line 1168 "Parser.rl" + + assert(mode.utf8); + /* leverage ComponentClass to generate the vertices */ + auto cc = getComponentClass(mode); + cc->add(readUtf8CodePoint3c(ts)); + cc->finalize(); + currentSeq->addComponent(move(cc)); + } + }} + +#line 7830 "Parser.cpp" + + break; + } + case 285: { + { +#line 1177 "Parser.rl" + {te = p+1;{ +#line 1177 "Parser.rl" + + assert(mode.utf8); + /* leverage ComponentClass to generate the vertices */ + auto cc = getComponentClass(mode); + cc->add(readUtf8CodePoint4c(ts)); + cc->finalize(); + currentSeq->addComponent(move(cc)); + } + }} + +#line 7848 "Parser.cpp" + + break; + } + case 286: { + { +#line 1186 "Parser.rl" + {te = p+1;{ +#line 1186 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 7862 "Parser.cpp" + + break; + } + case 287: { + { +#line 1192 "Parser.rl" + {te = p+1;{ +#line 1192 "Parser.rl" + + addLiteral(currentSeq, *ts, mode); + } + }} + +#line 7875 "Parser.cpp" + + break; + } + case 288: { + { +#line 1186 "Parser.rl" + {te = p;p = p - 1;{ +#line 1186 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 7889 "Parser.cpp" + + break; + } + case 289: { + { +#line 1192 "Parser.rl" + {te = p;p = p - 1;{ +#line 1192 "Parser.rl" + + addLiteral(currentSeq, *ts, mode); + } + }} + +#line 7902 "Parser.cpp" + + break; + } + case 290: { + { +#line 1186 "Parser.rl" + {p = ((te))-1; + { +#line 1186 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 7917 "Parser.cpp" + + break; + } + case 291: { + { +#line 1202 "Parser.rl" + {te = p+1;{ +#line 1202 "Parser.rl" + + {top -= 1;cs = stack[top];goto _again;} + } + }} + +#line 7930 "Parser.cpp" + + break; + } + case 292: { + { +#line 1207 "Parser.rl" + {te = p+1;{ +#line 1207 "Parser.rl" + + assert(mode.utf8); + currentCls->add(readUtf8CodePoint2c(ts)); + inCharClassEarly = false; + } + }} + +#line 7945 "Parser.cpp" + + break; + } + case 293: { + { +#line 1213 "Parser.rl" + {te = p+1;{ +#line 1213 "Parser.rl" + + assert(mode.utf8); + currentCls->add(readUtf8CodePoint3c(ts)); + inCharClassEarly = false; + } + }} + +#line 7960 "Parser.cpp" + + break; + } + case 294: { + { +#line 1219 "Parser.rl" + {te = p+1;{ +#line 1219 "Parser.rl" + + assert(mode.utf8); + currentCls->add(readUtf8CodePoint4c(ts)); + inCharClassEarly = false; + } + }} + +#line 7975 "Parser.cpp" + + break; + } + case 295: { + { +#line 1225 "Parser.rl" + {te = p+1;{ +#line 1225 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 7989 "Parser.cpp" + + break; + } + case 296: { + { +#line 1231 "Parser.rl" + {te = p+1;{ +#line 1231 "Parser.rl" + + currentCls->add(*ts); + inCharClassEarly = false; + } + }} + +#line 8003 "Parser.cpp" + + break; + } + case 297: { + { +#line 1225 "Parser.rl" + {te = p;p = p - 1;{ +#line 1225 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 8017 "Parser.cpp" + + break; + } + case 298: { + { +#line 1231 "Parser.rl" + {te = p;p = p - 1;{ +#line 1231 "Parser.rl" + + currentCls->add(*ts); + inCharClassEarly = false; + } + }} + +#line 8031 "Parser.cpp" + + break; + } + case 299: { + { +#line 1225 "Parser.rl" + {p = ((te))-1; + { +#line 1225 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 8046 "Parser.cpp" + + break; + } + case 300: { + { +#line 1243 "Parser.rl" + {te = p+1;{ +#line 1243 "Parser.rl" + inComment = false; {cs = 746;goto _again;}} + }} + +#line 8057 "Parser.cpp" + + break; + } + case 301: { + { +#line 1 "-" + {te = p+1;}} + +#line 8065 "Parser.cpp" + + break; + } + case 302: { + { +#line 1255 "Parser.rl" + {te = p+1;{ +#line 1255 "Parser.rl" + inComment = false; {cs = 746;goto _again;}} + }} + +#line 8076 "Parser.cpp" + + break; + } + case 303: { + { +#line 1 "-" + {te = p+1;}} + +#line 8084 "Parser.cpp" + + break; + } + case 304: { + { +#line 1491 "Parser.rl" + {act = 288;}} + +#line 8092 "Parser.cpp" + + break; + } + case 305: { + { +#line 1508 "Parser.rl" + {act = 290;}} + +#line 8100 "Parser.cpp" + + break; + } + case 306: { + { +#line 1737 "Parser.rl" + {act = 330;}} + +#line 8108 "Parser.cpp" + + break; + } + case 307: { + { +#line 362 "Parser.rl" + {te = p+1;{ +#line 362 "Parser.rl" + + if (sequences.empty()) { + throw LocatedParseError("Unmatched parentheses"); + } + currentSeq->finalize(); + POP_SEQUENCE; + } + }} + +#line 8125 "Parser.cpp" + + break; + } + case 308: { + { +#line 1274 "Parser.rl" + {te = p+1;{ +#line 1274 "Parser.rl" + + currentSeq->addAlternation(); + } + }} + +#line 8138 "Parser.cpp" + + break; + } + case 309: { + { +#line 1279 "Parser.rl" + {te = p+1;{ +#line 1279 "Parser.rl" + + throw LocatedParseError("POSIX named classes are only " + "supported inside a class"); + } + }} + +#line 8152 "Parser.cpp" + + break; + } + case 310: { + { +#line 1286 "Parser.rl" + {te = p+1;{ +#line 1286 "Parser.rl" + + throw LocatedParseError("Unsupported POSIX collating " + "element"); + } + }} + +#line 8166 "Parser.cpp" + + break; + } + case 311: { + { +#line 1293 "Parser.rl" + {te = p+1;{ +#line 1293 "Parser.rl" + + {cs = 838;goto _again;}} + }} + +#line 8178 "Parser.cpp" + + break; + } + case 312: { + { +#line 1297 "Parser.rl" + {te = p+1;{ +#line 1297 "Parser.rl" + /* noop */ } + }} + +#line 8189 "Parser.cpp" + + break; + } + case 313: { + { +#line 1299 "Parser.rl" + {te = p+1;{ +#line 1299 "Parser.rl" + + currentSeq->addComponent(generateComponent(CLASS_ANY, false, mode)); + } + }} + +#line 8202 "Parser.cpp" + + break; + } + case 314: { + { +#line 1303 "Parser.rl" + {te = p+1;{ +#line 1303 "Parser.rl" + + if (mode.utf8) { + throw LocatedParseError("\\C is unsupported in UTF8"); + } + currentSeq->addComponent(std::make_unique()); + } + }} + +#line 8218 "Parser.cpp" + + break; + } + case 315: { + { +#line 1317 "Parser.rl" + {te = p+1;{ +#line 1317 "Parser.rl" + + if (!currentSeq->addRepeat(0, ComponentRepeat::NoLimit, + ComponentRepeat::REPEAT_NONGREEDY)) { + throwInvalidRepeat(); + } + } + }} + +#line 8234 "Parser.cpp" + + break; + } + case 316: { + { +#line 1324 "Parser.rl" + {te = p+1;{ +#line 1324 "Parser.rl" + + if (!currentSeq->addRepeat(0, ComponentRepeat::NoLimit, + ComponentRepeat::REPEAT_POSSESSIVE)) { + throwInvalidRepeat(); + } + } + }} + +#line 8250 "Parser.cpp" + + break; + } + case 317: { + { +#line 1338 "Parser.rl" + {te = p+1;{ +#line 1338 "Parser.rl" + + if (!currentSeq->addRepeat(1, ComponentRepeat::NoLimit, + ComponentRepeat::REPEAT_NONGREEDY)) { + throwInvalidRepeat(); + } + } + }} + +#line 8266 "Parser.cpp" + + break; + } + case 318: { + { +#line 1345 "Parser.rl" + {te = p+1;{ +#line 1345 "Parser.rl" + + if (!currentSeq->addRepeat(1, ComponentRepeat::NoLimit, + ComponentRepeat::REPEAT_POSSESSIVE)) { + throwInvalidRepeat(); + } + } + }} + +#line 8282 "Parser.cpp" + + break; + } + case 319: { + { +#line 1359 "Parser.rl" + {te = p+1;{ +#line 1359 "Parser.rl" + + if (!currentSeq->addRepeat( + 0, 1, ComponentRepeat::REPEAT_NONGREEDY)) { + throwInvalidRepeat(); + } + } + }} + +#line 8298 "Parser.cpp" + + break; + } + case 320: { + { +#line 1366 "Parser.rl" + {te = p+1;{ +#line 1366 "Parser.rl" + + if (!currentSeq->addRepeat( + 0, 1, ComponentRepeat::REPEAT_POSSESSIVE)) { + throwInvalidRepeat(); + } + } + }} + +#line 8314 "Parser.cpp" + + break; + } + case 321: { + { +#line 1383 "Parser.rl" + {te = p+1;{ +#line 1383 "Parser.rl" + + if (repeatN > repeatM || repeatM == 0) { + throwInvalidRepeat(); + } else if (!currentSeq->addRepeat( + repeatN, repeatM, + ComponentRepeat::REPEAT_NONGREEDY)) { + throwInvalidRepeat(); + } + } + }} + +#line 8333 "Parser.cpp" + + break; + } + case 322: { + { +#line 1393 "Parser.rl" + {te = p+1;{ +#line 1393 "Parser.rl" + + if (repeatN > repeatM || repeatM == 0) { + throwInvalidRepeat(); + } else if (!currentSeq->addRepeat( + repeatN, repeatM, + ComponentRepeat::REPEAT_POSSESSIVE)) { + throwInvalidRepeat(); + } + } + }} + +#line 8352 "Parser.cpp" + + break; + } + case 323: { + { +#line 322 "Parser.rl" + {te = p+1;{ +#line 322 "Parser.rl" + + inComment = true; + {cs = 849;goto _again;}} + }} + +#line 8365 "Parser.cpp" + + break; + } + case 324: { + { +#line 1410 "Parser.rl" + {te = p+1;{ +#line 1410 "Parser.rl" + {p = p - 1; } {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 787;goto _again;}} + }} + +#line 8384 "Parser.cpp" + + break; + } + case 325: { + { +#line 1414 "Parser.rl" + {te = p+1;{ +#line 1414 "Parser.rl" + assert(0); {p += 1; goto _out; } } + }} + +#line 8395 "Parser.cpp" + + break; + } + case 326: { + { +#line 1421 "Parser.rl" + {te = p+1;{ +#line 1421 "Parser.rl" + + auto bound = mode.multiline ? ComponentBoundary::BEGIN_LINE + : ComponentBoundary::BEGIN_STRING; + currentSeq->addComponent(std::make_unique(bound)); + } + }} + +#line 8410 "Parser.cpp" + + break; + } + case 327: { + { +#line 1428 "Parser.rl" + {te = p+1;{ +#line 1428 "Parser.rl" + + auto bound = mode.multiline ? ComponentBoundary::END_LINE + : ComponentBoundary::END_STRING_OPTIONAL_LF; + currentSeq->addComponent(std::make_unique(bound)); + } + }} + +#line 8425 "Parser.cpp" + + break; + } + case 328: { + { +#line 1434 "Parser.rl" + {te = p+1;{ +#line 1434 "Parser.rl" + + auto bound = ComponentBoundary::BEGIN_STRING; + currentSeq->addComponent(std::make_unique(bound)); + } + }} + +#line 8439 "Parser.cpp" + + break; + } + case 329: { + { +#line 1439 "Parser.rl" + {te = p+1;{ +#line 1439 "Parser.rl" + + auto bound = ComponentBoundary::END_STRING_OPTIONAL_LF; + currentSeq->addComponent(std::make_unique(bound)); + } + }} + +#line 8453 "Parser.cpp" + + break; + } + case 330: { + { +#line 1444 "Parser.rl" + {te = p+1;{ +#line 1444 "Parser.rl" + + auto bound = ComponentBoundary::END_STRING; + currentSeq->addComponent(std::make_unique(bound)); + } + }} + +#line 8467 "Parser.cpp" + + break; + } + case 331: { + { +#line 1449 "Parser.rl" + {te = p+1;{ +#line 1449 "Parser.rl" + + currentSeq->addComponent( + std::make_unique(ts - ptr, false, mode)); + } + }} + +#line 8481 "Parser.cpp" + + break; + } + case 332: { + { +#line 1454 "Parser.rl" + {te = p+1;{ +#line 1454 "Parser.rl" + + currentSeq->addComponent( + std::make_unique(ts - ptr, true, mode)); + } + }} + +#line 8495 "Parser.cpp" + + break; + } + case 333: { + { +#line 1464 "Parser.rl" + {te = p+1;{ +#line 1464 "Parser.rl" + + addLiteral(currentSeq, '\x09', mode); + } + }} + +#line 8508 "Parser.cpp" + + break; + } + case 334: { + { +#line 1468 "Parser.rl" + {te = p+1;{ +#line 1468 "Parser.rl" + + addLiteral(currentSeq, '\x0a', mode); + } + }} + +#line 8521 "Parser.cpp" + + break; + } + case 335: { + { +#line 1472 "Parser.rl" + {te = p+1;{ +#line 1472 "Parser.rl" + + addLiteral(currentSeq, '\x0d', mode); + } + }} + +#line 8534 "Parser.cpp" + + break; + } + case 336: { + { +#line 1476 "Parser.rl" + {te = p+1;{ +#line 1476 "Parser.rl" + + addLiteral(currentSeq, '\x0c', mode); + } + }} + +#line 8547 "Parser.cpp" + + break; + } + case 337: { + { +#line 1480 "Parser.rl" + {te = p+1;{ +#line 1480 "Parser.rl" + + addLiteral(currentSeq, '\x07', mode); + } + }} + +#line 8560 "Parser.cpp" + + break; + } + case 338: { + { +#line 1484 "Parser.rl" + {te = p+1;{ +#line 1484 "Parser.rl" + + addLiteral(currentSeq, '\x1b', mode); + } + }} + +#line 8573 "Parser.cpp" + + break; + } + case 339: { + { +#line 1488 "Parser.rl" + {te = p+1;{ +#line 1488 "Parser.rl" + + addLiteral(currentSeq, octAccumulator, mode); + } + }} + +#line 8586 "Parser.cpp" + + break; + } + case 340: { + { +#line 479 "Parser.rl" + {te = p+1;{ +#line 479 "Parser.rl" + + if (accumulator == 0) { + throw LocatedParseError("Numbered reference cannot be zero"); + } + currentSeq->addComponent(std::make_unique(accumulator)); + } + }} + +#line 8602 "Parser.cpp" + + break; + } + case 341: { + { +#line 486 "Parser.rl" + {te = p+1;{ +#line 486 "Parser.rl" + + // Accumulator is a negative offset. + if (accumulator == 0) { + throw LocatedParseError("Numbered reference cannot be zero"); + } + if (accumulator >= groupIndex) { + throw LocatedParseError("Invalid reference"); + } + unsigned idx = groupIndex - accumulator; + currentSeq->addComponent(std::make_unique(idx)); + } + }} + +#line 8623 "Parser.cpp" + + break; + } + case 342: { + { +#line 479 "Parser.rl" + {te = p+1;{ +#line 479 "Parser.rl" + + if (accumulator == 0) { + throw LocatedParseError("Numbered reference cannot be zero"); + } + currentSeq->addComponent(std::make_unique(accumulator)); + } + }} + +#line 8639 "Parser.cpp" + + break; + } + case 343: { + { +#line 486 "Parser.rl" + {te = p+1;{ +#line 486 "Parser.rl" + + // Accumulator is a negative offset. + if (accumulator == 0) { + throw LocatedParseError("Numbered reference cannot be zero"); + } + if (accumulator >= groupIndex) { + throw LocatedParseError("Invalid reference"); + } + unsigned idx = groupIndex - accumulator; + currentSeq->addComponent(std::make_unique(idx)); + } + }} + +#line 8660 "Parser.cpp" + + break; + } + case 344: { + { +#line 498 "Parser.rl" + {te = p+1;{ +#line 498 "Parser.rl" + + currentSeq->addComponent(std::make_unique(label)); + } + }} + +#line 8673 "Parser.cpp" + + break; + } + case 345: { + { +#line 498 "Parser.rl" + {te = p+1;{ +#line 498 "Parser.rl" + + currentSeq->addComponent(std::make_unique(label)); + } + }} + +#line 8686 "Parser.cpp" + + break; + } + case 346: { + { +#line 498 "Parser.rl" + {te = p+1;{ +#line 498 "Parser.rl" + + currentSeq->addComponent(std::make_unique(label)); + } + }} + +#line 8699 "Parser.cpp" + + break; + } + case 347: { + { +#line 498 "Parser.rl" + {te = p+1;{ +#line 498 "Parser.rl" + + currentSeq->addComponent(std::make_unique(label)); + } + }} + +#line 8712 "Parser.cpp" + + break; + } + case 348: { + { +#line 498 "Parser.rl" + {te = p+1;{ +#line 498 "Parser.rl" + + currentSeq->addComponent(std::make_unique(label)); + } + }} + +#line 8725 "Parser.cpp" + + break; + } + case 349: { + { +#line 1549 "Parser.rl" + {te = p+1;{ +#line 1549 "Parser.rl" + + ostringstream str; + str << "Onigiruma subroutine call at index " << ts - ptr << + " not supported."; + throw ParseError(str.str()); + } + }} + +#line 8741 "Parser.cpp" + + break; + } + case 350: { + { +#line 1560 "Parser.rl" + {te = p+1;{ +#line 1560 "Parser.rl" + + string oct(ts + 3, te - ts - 4); + unsigned long val; + try { + val = stoul(oct, nullptr, 8); + } catch (const std::out_of_range &) { + val = MAX_UNICODE + 1; + } + if ((!mode.utf8 && val > 255) || val > MAX_UNICODE) { + throw LocatedParseError("Value in \\o{...} sequence is too large"); + } + addEscapedOctal(currentSeq, (unichar)val, mode); + } + }} + +#line 8764 "Parser.cpp" + + break; + } + case 351: { + { +#line 1578 "Parser.rl" + {te = p+1;{ +#line 1578 "Parser.rl" + + addEscapedHex(currentSeq, accumulator, mode); + } + }} + +#line 8777 "Parser.cpp" + + break; + } + case 352: { + { +#line 1582 "Parser.rl" + {te = p+1;{ +#line 1582 "Parser.rl" + + string hex(ts + 3, te - ts - 4); + unsigned long val; + try { + val = stoul(hex, nullptr, 16); + } catch (const std::out_of_range &) { + val = MAX_UNICODE + 1; + } + if (val > MAX_UNICODE) { + throw LocatedParseError("Value in \\x{...} sequence is too large"); + } + addEscapedHex(currentSeq, (unichar)val, mode); + } + }} + +#line 8800 "Parser.cpp" + + break; + } + case 353: { + { +#line 1600 "Parser.rl" + {te = p+1;{ +#line 1600 "Parser.rl" + + if (te - ts < 3) { + assert(te - ts == 2); + throw LocatedParseError(SLASH_C_ERROR); + } else { + assert(te - ts == 3); + addLiteral(currentSeq, decodeCtrl(ts[2]), mode); + } + } + }} + +#line 8819 "Parser.cpp" + + break; + } + case 354: { + { +#line 1610 "Parser.rl" + {te = p+1;{ +#line 1610 "Parser.rl" + + ostringstream str; + str << "'\\" << *(ts + 1) << "' at index " << ts - ptr + << " not supported."; + throw ParseError(str.str()); + } + }} + +#line 8835 "Parser.cpp" + + break; + } + case 355: { + { +#line 1618 "Parser.rl" + {te = p+1;{ +#line 1618 "Parser.rl" + + auto cc = generateComponent(CLASS_WORD, false, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8849 "Parser.cpp" + + break; + } + case 356: { + { +#line 1623 "Parser.rl" + {te = p+1;{ +#line 1623 "Parser.rl" + + auto cc = generateComponent(CLASS_WORD, true, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8863 "Parser.cpp" + + break; + } + case 357: { + { +#line 1628 "Parser.rl" + {te = p+1;{ +#line 1628 "Parser.rl" + + auto cc = generateComponent(CLASS_SPACE, false, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8877 "Parser.cpp" + + break; + } + case 358: { + { +#line 1633 "Parser.rl" + {te = p+1;{ +#line 1633 "Parser.rl" + + auto cc = generateComponent(CLASS_SPACE, true, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8891 "Parser.cpp" + + break; + } + case 359: { + { +#line 1638 "Parser.rl" + {te = p+1;{ +#line 1638 "Parser.rl" + + auto cc = generateComponent(CLASS_DIGIT, false, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8905 "Parser.cpp" + + break; + } + case 360: { + { +#line 1643 "Parser.rl" + {te = p+1;{ +#line 1643 "Parser.rl" + + auto cc = generateComponent(CLASS_DIGIT, true, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8919 "Parser.cpp" + + break; + } + case 361: { + { +#line 1648 "Parser.rl" + {te = p+1;{ +#line 1648 "Parser.rl" + + auto cc = generateComponent(CLASS_HORZ, false, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8933 "Parser.cpp" + + break; + } + case 362: { + { +#line 1653 "Parser.rl" + {te = p+1;{ +#line 1653 "Parser.rl" + + auto cc = generateComponent(CLASS_HORZ, true, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8947 "Parser.cpp" + + break; + } + case 363: { + { +#line 1658 "Parser.rl" + {te = p+1;{ +#line 1658 "Parser.rl" + + auto cc = generateComponent(CLASS_VERT, false, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8961 "Parser.cpp" + + break; + } + case 364: { + { +#line 1663 "Parser.rl" + {te = p+1;{ +#line 1663 "Parser.rl" + + auto cc = generateComponent(CLASS_VERT, true, mode); + currentSeq->addComponent(move(cc)); + } + }} + +#line 8975 "Parser.cpp" + + break; + } + case 365: { + { +#line 1668 "Parser.rl" + {te = p+1;{ +#line 1668 "Parser.rl" + + assert(!currentCls && !inCharClass); + currentCls = getComponentClass(mode); + negated = false; + {p = p - 1; } + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 559;goto _again;}} + }} + +#line 8999 "Parser.cpp" + + break; + } + case 366: { + { +#line 1676 "Parser.rl" + {te = p+1;{ +#line 1676 "Parser.rl" + + assert(!currentCls && !inCharClass); + currentCls = getComponentClass(mode); + negated = false; + {p = p - 1; } + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 818;goto _again;}} + }} + +#line 9023 "Parser.cpp" + + break; + } + case 367: { + { +#line 1684 "Parser.rl" + {te = p+1;{ +#line 1684 "Parser.rl" + + assert(!currentCls && !inCharClass); + currentCls = getComponentClass(mode); + negated = true; + {p = p - 1; } + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 559;goto _again;}} + }} + +#line 9047 "Parser.cpp" + + break; + } + case 368: { + { +#line 1692 "Parser.rl" + {te = p+1;{ +#line 1692 "Parser.rl" + + assert(!currentCls && !inCharClass); + currentCls = getComponentClass(mode); + negated = true; + {p = p - 1; } + {{ +#line 1903 "Parser.rl" + + DEBUG_PRINTF("stack %zu top %d\n", stack.size(), top); + if ((int)stack.size() == top) { + stack.resize(2 * (top + 1)); + } + } + stack[top] = cs; top += 1;cs = 818;goto _again;}} + }} + +#line 9071 "Parser.cpp" + + break; + } + case 369: { + { +#line 1704 "Parser.rl" + {te = p+1;{ +#line 1704 "Parser.rl" + + ostringstream str; + str << "\\R at index " << ts - ptr << " not supported."; + throw ParseError(str.str()); + } + }} + +#line 9086 "Parser.cpp" + + break; + } + case 370: { + { +#line 1711 "Parser.rl" + {te = p+1;{ +#line 1711 "Parser.rl" + + ostringstream str; + str << "\\K at index " << ts - ptr << " not supported."; + throw ParseError(str.str()); + } + }} + +#line 9101 "Parser.cpp" + + break; + } + case 371: { + { +#line 1726 "Parser.rl" + {te = p+1;{ +#line 1726 "Parser.rl" + + ostringstream str; + str << "\\G at index " << ts - ptr << " not supported."; + throw ParseError(str.str()); + } + }} + +#line 9116 "Parser.cpp" + + break; + } + case 372: { + { +#line 1732 "Parser.rl" + {te = p+1;{ +#line 1732 "Parser.rl" + + currentSeq->addComponent(std::make_unique(ts - ptr, mode)); + } + }} + +#line 9129 "Parser.cpp" + + break; + } + case 373: { + { +#line 1737 "Parser.rl" + {te = p+1;{ +#line 1737 "Parser.rl" + + addLiteral(currentSeq, *(ts + 1), mode); + } + }} + +#line 9142 "Parser.cpp" + + break; + } + case 374: { + { +#line 316 "Parser.rl" + {te = p+1;{ +#line 316 "Parser.rl" + + inComment = true; + {cs = 848;goto _again;}} + }} + +#line 9155 "Parser.cpp" + + break; + } + case 375: { + { +#line 433 "Parser.rl" + {te = p+1;{ +#line 433 "Parser.rl" + + mode = newMode; + currentSeq->addComponent(std::make_unique()); + } + }} + +#line 9169 "Parser.cpp" + + break; + } + case 376: { + { +#line 355 "Parser.rl" + {te = p+1;{ +#line 355 "Parser.rl" + + PUSH_SEQUENCE; + mode = newMode; + currentSeq = + enterSequence(currentSeq, std::make_unique()); + } + }} + +#line 9185 "Parser.cpp" + + break; + } + case 377: { + { +#line 369 "Parser.rl" + {te = p+1;{ +#line 369 "Parser.rl" + + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(ComponentAssertion::LOOKAHEAD, + ComponentAssertion::POS)); + } + }} + +#line 9201 "Parser.cpp" + + break; + } + case 378: { + { +#line 375 "Parser.rl" + {te = p+1;{ +#line 375 "Parser.rl" + + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(ComponentAssertion::LOOKAHEAD, + ComponentAssertion::NEG)); + } + }} + +#line 9217 "Parser.cpp" + + break; + } + case 379: { + { +#line 381 "Parser.rl" + {te = p+1;{ +#line 381 "Parser.rl" + + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(ComponentAssertion::LOOKBEHIND, + ComponentAssertion::POS)); + } + }} + +#line 9233 "Parser.cpp" + + break; + } + case 380: { + { +#line 387 "Parser.rl" + {te = p+1;{ +#line 387 "Parser.rl" + + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(ComponentAssertion::LOOKBEHIND, + ComponentAssertion::NEG)); + } + }} + +#line 9249 "Parser.cpp" + + break; + } + case 381: { + { +#line 393 "Parser.rl" + {te = p+1;{ +#line 393 "Parser.rl" + + throw LocatedParseError("Embedded code is not supported"); + } + }} + +#line 9262 "Parser.cpp" + + break; + } + case 382: { + { +#line 393 "Parser.rl" + {te = p+1;{ +#line 393 "Parser.rl" + + throw LocatedParseError("Embedded code is not supported"); + } + }} + +#line 9275 "Parser.cpp" + + break; + } + case 383: { + { +#line 416 "Parser.rl" + {te = p+1;{ +#line 416 "Parser.rl" + + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique()); + } + }} + +#line 9290 "Parser.cpp" + + break; + } + case 384: { + { +#line 336 "Parser.rl" + {te = p+1;{ +#line 336 "Parser.rl" + + assert(!label.empty()); // should be guaranteed by machine + char c = *label.begin(); + if (c >= '0' && c <= '9') { + throw LocatedParseError("Group name cannot begin with a digit"); + } + if (!groupNames.insert(label).second) { + throw LocatedParseError("Two named subpatterns use the name '" + label + "'"); + } + PUSH_SEQUENCE; + auto seq = std::make_unique(); + seq->setCaptureIndex(groupIndex++); + seq->setCaptureName(label); + currentSeq = enterSequence(currentSeq, move(seq)); + } + }} + +#line 9315 "Parser.cpp" + + break; + } + case 385: { + { +#line 399 "Parser.rl" + {te = p+1;{ +#line 399 "Parser.rl" + + throw LocatedParseError("Subpattern reference unsupported"); + } + }} + +#line 9328 "Parser.cpp" + + break; + } + case 386: { + { +#line 399 "Parser.rl" + {te = p+1;{ +#line 399 "Parser.rl" + + throw LocatedParseError("Subpattern reference unsupported"); + } + }} + +#line 9341 "Parser.cpp" + + break; + } + case 387: { + { +#line 1783 "Parser.rl" + {te = p+1;{ +#line 1783 "Parser.rl" + + auto a = std::make_unique( + ComponentAssertion::LOOKAHEAD, ComponentAssertion::POS); + ComponentAssertion *a_seq = a.get(); + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(move(a))); + PUSH_SEQUENCE; + currentSeq = a_seq; + } + }} + +#line 9361 "Parser.cpp" + + break; + } + case 388: { + { +#line 1794 "Parser.rl" + {te = p+1;{ +#line 1794 "Parser.rl" + + auto a = std::make_unique( + ComponentAssertion::LOOKAHEAD, ComponentAssertion::NEG); + ComponentAssertion *a_seq = a.get(); + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(move(a))); + PUSH_SEQUENCE; + currentSeq = a_seq; + } + }} + +#line 9381 "Parser.cpp" + + break; + } + case 389: { + { +#line 1805 "Parser.rl" + {te = p+1;{ +#line 1805 "Parser.rl" + + auto a = std::make_unique( + ComponentAssertion::LOOKBEHIND, ComponentAssertion::POS); + ComponentAssertion *a_seq = a.get(); + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(move(a))); + PUSH_SEQUENCE; + currentSeq = a_seq; + } + }} + +#line 9401 "Parser.cpp" + + break; + } + case 390: { + { +#line 1816 "Parser.rl" + {te = p+1;{ +#line 1816 "Parser.rl" + + auto a = std::make_unique( + ComponentAssertion::LOOKBEHIND, ComponentAssertion::NEG); + ComponentAssertion *a_seq = a.get(); + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(move(a))); + PUSH_SEQUENCE; + currentSeq = a_seq; + } + }} + +#line 9421 "Parser.cpp" + + break; + } + case 391: { + { +#line 1828 "Parser.rl" + {te = p+1;{ +#line 1828 "Parser.rl" + + throw LocatedParseError("Pattern recursion not supported"); + } + }} + +#line 9434 "Parser.cpp" + + break; + } + case 392: { + { +#line 402 "Parser.rl" + {te = p+1;{ +#line 402 "Parser.rl" + + if (accumulator == 0) { + throw LocatedParseError("Numbered reference cannot be zero"); + } + PUSH_SEQUENCE; + currentSeq = enterSequence(currentSeq, + std::make_unique(accumulator)); + } + }} + +#line 9452 "Parser.cpp" + + break; + } + case 393: { + { +#line 410 "Parser.rl" + {te = p+1;{ +#line 410 "Parser.rl" + + PUSH_SEQUENCE; + assert(!label.empty()); + currentSeq = enterSequence(currentSeq, + std::make_unique(label)); + } + }} + +#line 9468 "Parser.cpp" + + break; + } + case 394: { + { +#line 1844 "Parser.rl" + {te = p+1;{ +#line 1844 "Parser.rl" + + ostringstream str; + str << "Callout at index " << ts - ptr << " not supported."; + throw ParseError(str.str()); + } + }} + +#line 9483 "Parser.cpp" + + break; + } + case 395: { + { +#line 1852 "Parser.rl" + {te = p+1;{ +#line 1852 "Parser.rl" + + throw LocatedParseError("Unrecognised character after (?"); + } + }} + +#line 9496 "Parser.cpp" + + break; + } + case 396: { + { +#line 1857 "Parser.rl" + {te = p+1;{ +#line 1857 "Parser.rl" + + assert(mode.utf8); + /* leverage ComponentClass to generate the vertices */ + auto cc = getComponentClass(mode); + cc->add(readUtf8CodePoint2c(ts)); + cc->finalize(); + currentSeq->addComponent(move(cc)); + } + }} + +#line 9514 "Parser.cpp" + + break; + } + case 397: { + { +#line 1866 "Parser.rl" + {te = p+1;{ +#line 1866 "Parser.rl" + + assert(mode.utf8); + /* leverage ComponentClass to generate the vertices */ + auto cc = getComponentClass(mode); + cc->add(readUtf8CodePoint3c(ts)); + cc->finalize(); + currentSeq->addComponent(move(cc)); + } + }} + +#line 9532 "Parser.cpp" + + break; + } + case 398: { + { +#line 1875 "Parser.rl" + {te = p+1;{ +#line 1875 "Parser.rl" + + assert(mode.utf8); + /* leverage ComponentClass to generate the vertices */ + auto cc = getComponentClass(mode); + cc->add(readUtf8CodePoint4c(ts)); + cc->finalize(); + currentSeq->addComponent(move(cc)); + } + }} + +#line 9550 "Parser.cpp" + + break; + } + case 399: { + { +#line 1884 "Parser.rl" + {te = p+1;{ +#line 1884 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 9564 "Parser.cpp" + + break; + } + case 400: { + { +#line 1893 "Parser.rl" + {te = p+1;{ +#line 1893 "Parser.rl" + + if (mode.ignore_space == false) { + addLiteral(currentSeq, *ts, mode); + } + } + }} + +#line 9579 "Parser.cpp" + + break; + } + case 401: { + { +#line 1898 "Parser.rl" + {te = p+1;{ +#line 1898 "Parser.rl" + + addLiteral(currentSeq, *ts, mode); + } + }} + +#line 9592 "Parser.cpp" + + break; + } + case 402: { + { +#line 328 "Parser.rl" + {te = p;p = p - 1;{ +#line 328 "Parser.rl" + + PUSH_SEQUENCE; + auto seq = std::make_unique(); + seq->setCaptureIndex(groupIndex++); + currentSeq = enterSequence(currentSeq, move(seq)); + } + }} + +#line 9608 "Parser.cpp" + + break; + } + case 403: { + { +#line 421 "Parser.rl" + {te = p;p = p - 1;{ +#line 421 "Parser.rl" + + assert(!currentCls); + assert(!inCharClass); // not reentrant + currentCls = getComponentClass(mode); + inCharClass = true; + inCharClassEarly = true; + currentClsBegin = ts; + {cs = 836;goto _again;}} + }} + +#line 9626 "Parser.cpp" + + break; + } + case 404: { + { +#line 1310 "Parser.rl" + {te = p;p = p - 1;{ +#line 1310 "Parser.rl" + + if (!currentSeq->addRepeat(0, ComponentRepeat::NoLimit, + ComponentRepeat::REPEAT_GREEDY)) { + throwInvalidRepeat(); + } + } + }} + +#line 9642 "Parser.cpp" + + break; + } + case 405: { + { +#line 1331 "Parser.rl" + {te = p;p = p - 1;{ +#line 1331 "Parser.rl" + + if (!currentSeq->addRepeat(1, ComponentRepeat::NoLimit, + ComponentRepeat::REPEAT_GREEDY)) { + throwInvalidRepeat(); + } + } + }} + +#line 9658 "Parser.cpp" + + break; + } + case 406: { + { +#line 1352 "Parser.rl" + {te = p;p = p - 1;{ +#line 1352 "Parser.rl" + + if (!currentSeq->addRepeat( + 0, 1, ComponentRepeat::REPEAT_GREEDY)) { + throwInvalidRepeat(); + } + } + }} + +#line 9674 "Parser.cpp" + + break; + } + case 407: { + { +#line 1373 "Parser.rl" + {te = p;p = p - 1;{ +#line 1373 "Parser.rl" + + if (repeatN > repeatM || repeatM == 0) { + throwInvalidRepeat(); + } else if (!currentSeq->addRepeat( + repeatN, repeatM, + ComponentRepeat::REPEAT_GREEDY)) { + throwInvalidRepeat(); + } + } + }} + +#line 9693 "Parser.cpp" + + break; + } + case 408: { + { +#line 1488 "Parser.rl" + {te = p;p = p - 1;{ +#line 1488 "Parser.rl" + + addLiteral(currentSeq, octAccumulator, mode); + } + }} + +#line 9706 "Parser.cpp" + + break; + } + case 409: { + { +#line 1491 "Parser.rl" + {te = p;p = p - 1;{ +#line 1491 "Parser.rl" + + // If there are enough capturing sub expressions, this may be + // a back reference + accumulator = parseAsDecimal(octAccumulator); + if (accumulator < groupIndex) { + currentSeq->addComponent(std::make_unique(accumulator)); + } else { + addEscapedOctal(currentSeq, octAccumulator, mode); + } + } + }} + +#line 9726 "Parser.cpp" + + break; + } + case 410: { + { +#line 479 "Parser.rl" + {te = p;p = p - 1;{ +#line 479 "Parser.rl" + + if (accumulator == 0) { + throw LocatedParseError("Numbered reference cannot be zero"); + } + currentSeq->addComponent(std::make_unique(accumulator)); + } + }} + +#line 9742 "Parser.cpp" + + break; + } + case 411: { + { +#line 479 "Parser.rl" + {te = p;p = p - 1;{ +#line 479 "Parser.rl" + + if (accumulator == 0) { + throw LocatedParseError("Numbered reference cannot be zero"); + } + currentSeq->addComponent(std::make_unique(accumulator)); + } + }} + +#line 9758 "Parser.cpp" + + break; + } + case 412: { + { +#line 486 "Parser.rl" + {te = p;p = p - 1;{ +#line 486 "Parser.rl" + + // Accumulator is a negative offset. + if (accumulator == 0) { + throw LocatedParseError("Numbered reference cannot be zero"); + } + if (accumulator >= groupIndex) { + throw LocatedParseError("Invalid reference"); + } + unsigned idx = groupIndex - accumulator; + currentSeq->addComponent(std::make_unique(idx)); + } + }} + +#line 9779 "Parser.cpp" + + break; + } + case 413: { + { +#line 1557 "Parser.rl" + {te = p;p = p - 1;{ +#line 1557 "Parser.rl" + + throw LocatedParseError("Invalid reference after \\g"); + } + }} + +#line 9792 "Parser.cpp" + + break; + } + case 414: { + { +#line 1574 "Parser.rl" + {te = p;p = p - 1;{ +#line 1574 "Parser.rl" + + throw LocatedParseError("Value in \\o{...} sequence is non-octal or missing braces"); + } + }} + +#line 9805 "Parser.cpp" + + break; + } + case 415: { + { +#line 1578 "Parser.rl" + {te = p;p = p - 1;{ +#line 1578 "Parser.rl" + + addEscapedHex(currentSeq, accumulator, mode); + } + }} + +#line 9818 "Parser.cpp" + + break; + } + case 416: { + { +#line 1596 "Parser.rl" + {te = p;p = p - 1;{ +#line 1596 "Parser.rl" + + throw LocatedParseError("Value in \\x{...} sequence is non-hex or missing }"); + } + }} + +#line 9831 "Parser.cpp" + + break; + } + case 417: { + { +#line 1600 "Parser.rl" + {te = p;p = p - 1;{ +#line 1600 "Parser.rl" + + if (te - ts < 3) { + assert(te - ts == 2); + throw LocatedParseError(SLASH_C_ERROR); + } else { + assert(te - ts == 3); + addLiteral(currentSeq, decodeCtrl(ts[2]), mode); + } + } + }} + +#line 9850 "Parser.cpp" + + break; + } + case 418: { + { +#line 1700 "Parser.rl" + {te = p;p = p - 1;{ +#line 1700 "Parser.rl" + throw LocatedParseError("Malformed property"); } + }} + +#line 9861 "Parser.cpp" + + break; + } + case 419: { + { +#line 1701 "Parser.rl" + {te = p;p = p - 1;{ +#line 1701 "Parser.rl" + throw LocatedParseError("Malformed property"); } + }} + +#line 9872 "Parser.cpp" + + break; + } + case 420: { + { +#line 1719 "Parser.rl" + {te = p;p = p - 1;{ +#line 1719 "Parser.rl" + + ostringstream str; + str << "\\k at index " << ts - ptr << " not supported."; + throw ParseError(str.str()); + } + }} + +#line 9887 "Parser.cpp" + + break; + } + case 421: { + { +#line 1742 "Parser.rl" + {te = p;p = p - 1;{ +#line 1742 "Parser.rl" + + assert(ts + 1 == pe); + ostringstream str; + str << "Unescaped \\ at end of input, index " << ts - ptr << "."; + throw ParseError(str.str()); + } + }} + +#line 9903 "Parser.cpp" + + break; + } + case 422: { + { +#line 396 "Parser.rl" + {te = p;p = p - 1;{ +#line 396 "Parser.rl" + + throw LocatedParseError("Conditional subpattern unsupported"); + } + }} + +#line 9916 "Parser.cpp" + + break; + } + case 423: { + { +#line 1852 "Parser.rl" + {te = p;p = p - 1;{ +#line 1852 "Parser.rl" + + throw LocatedParseError("Unrecognised character after (?"); + } + }} + +#line 9929 "Parser.cpp" + + break; + } + case 424: { + { +#line 1884 "Parser.rl" + {te = p;p = p - 1;{ +#line 1884 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 9943 "Parser.cpp" + + break; + } + case 425: { + { +#line 1898 "Parser.rl" + {te = p;p = p - 1;{ +#line 1898 "Parser.rl" + + addLiteral(currentSeq, *ts, mode); + } + }} + +#line 9956 "Parser.cpp" + + break; + } + case 426: { + { +#line 328 "Parser.rl" + {p = ((te))-1; + { +#line 328 "Parser.rl" + + PUSH_SEQUENCE; + auto seq = std::make_unique(); + seq->setCaptureIndex(groupIndex++); + currentSeq = enterSequence(currentSeq, move(seq)); + } + }} + +#line 9973 "Parser.cpp" + + break; + } + case 427: { + { +#line 421 "Parser.rl" + {p = ((te))-1; + { +#line 421 "Parser.rl" + + assert(!currentCls); + assert(!inCharClass); // not reentrant + currentCls = getComponentClass(mode); + inCharClass = true; + inCharClassEarly = true; + currentClsBegin = ts; + {cs = 836;goto _again;}} + }} + +#line 9992 "Parser.cpp" + + break; + } + case 428: { + { +#line 1557 "Parser.rl" + {p = ((te))-1; + { +#line 1557 "Parser.rl" + + throw LocatedParseError("Invalid reference after \\g"); + } + }} + +#line 10006 "Parser.cpp" + + break; + } + case 429: { + { +#line 1574 "Parser.rl" + {p = ((te))-1; + { +#line 1574 "Parser.rl" + + throw LocatedParseError("Value in \\o{...} sequence is non-octal or missing braces"); + } + }} + +#line 10020 "Parser.cpp" + + break; + } + case 430: { + { +#line 1596 "Parser.rl" + {p = ((te))-1; + { +#line 1596 "Parser.rl" + + throw LocatedParseError("Value in \\x{...} sequence is non-hex or missing }"); + } + }} + +#line 10034 "Parser.cpp" + + break; + } + case 431: { + { +#line 1719 "Parser.rl" + {p = ((te))-1; + { +#line 1719 "Parser.rl" + + ostringstream str; + str << "\\k at index " << ts - ptr << " not supported."; + throw ParseError(str.str()); + } + }} + +#line 10050 "Parser.cpp" + + break; + } + case 432: { + { +#line 396 "Parser.rl" + {p = ((te))-1; + { +#line 396 "Parser.rl" + + throw LocatedParseError("Conditional subpattern unsupported"); + } + }} + +#line 10064 "Parser.cpp" + + break; + } + case 433: { + { +#line 1852 "Parser.rl" + {p = ((te))-1; + { +#line 1852 "Parser.rl" + + throw LocatedParseError("Unrecognised character after (?"); + } + }} + +#line 10078 "Parser.cpp" + + break; + } + case 434: { + { +#line 1884 "Parser.rl" + {p = ((te))-1; + { +#line 1884 "Parser.rl" + + assert(mode.utf8); + throwInvalidUtf8(); + } + }} + +#line 10093 "Parser.cpp" + + break; + } + case 435: { + { +#line 1898 "Parser.rl" + {p = ((te))-1; + { +#line 1898 "Parser.rl" + + addLiteral(currentSeq, *ts, mode); + } + }} + +#line 10107 "Parser.cpp" + + break; + } + case 436: { + { +#line 1 "NONE" + {switch( act ) { + case 288: { + p = ((te))-1; + { +#line 1491 "Parser.rl" + + // If there are enough capturing sub expressions, this may be + // a back reference + accumulator = parseAsDecimal(octAccumulator); + if (accumulator < groupIndex) { + currentSeq->addComponent(std::make_unique(accumulator)); + } else { + addEscapedOctal(currentSeq, octAccumulator, mode); + } + } + break; + } + case 290: { + p = ((te))-1; + { +#line 1508 "Parser.rl" + + // if there are enough left parens to this point, back ref + if (accumulator < groupIndex) { + currentSeq->addComponent(std::make_unique(accumulator)); + } else { + // Otherwise, we interpret the first three digits as an + // octal escape, and the remaining characters stand for + // themselves as literals. + const char *s = ts; + unsigned int accum = 0; + unsigned int oct_digits = 0; + assert(*s == '\\'); // token starts at backslash + for (++s; s < te && oct_digits < 3; ++oct_digits, ++s) { + u8 digit = *s - '0'; + if (digit < 8) { + accum = digit + accum * 8; + } else { + break; + } + } + + if (oct_digits > 0) { + addEscapedOctal(currentSeq, accum, mode); + } + + // And then the rest of the digits, if any, are literal. + for (; s < te; ++s) { + addLiteral(currentSeq, *s, mode); + } + } + } + break; + } + case 330: { + p = ((te))-1; + { +#line 1737 "Parser.rl" + + addLiteral(currentSeq, *(ts + 1), mode); + } + break; + } + }} + } + +#line 10179 "Parser.cpp" + + break; + } + } + _nacts -= 1; + _acts += 1; + } + +} + +_again: {} +if ( p == eof ) { + if ( cs >= 746 ) + goto _out; +} +else { + _acts = ( _regex_actions + (_regex_to_state_actions[cs])); + _nacts = (unsigned int)(*( _acts)); + _acts += 1; + while ( _nacts > 0 ) { + switch ( (*( _acts)) ) { + case 23: { + { +#line 1 "NONE" + {ts = 0;}} + +#line 10205 "Parser.cpp" + + break; + } + } + _nacts -= 1; + _acts += 1; + } + + if ( cs != 0 ) { + p += 1; + goto _resume; + } +} +_out: {} +} + +#line 1983 "Parser.rl" + + +if (p != pe && *p != '\0') { +// didn't make it to the end of our input, but we didn't throw a ParseError? +assert(0); +ostringstream str; +str << "Parse error at index " << (p - ptr) << "."; +throw ParseError(str.str()); +} + +if (currentCls) { +assert(inCharClass); +assert(currentClsBegin); +ostringstream oss; +oss << "Unterminated character class starting at index " +<< currentClsBegin - ptr << "."; +throw ParseError(oss.str()); +} + +if (inComment) { +throw ParseError("Unterminated comment."); +} + +if (!sequences.empty()) { +ostringstream str; +str << "Missing close parenthesis for group started at index " +<< sequences.back().seqOffset << "."; +throw ParseError(str.str()); +} + +// Unlikely, but possible +if (groupIndex > 65535) { +throw ParseError("The maximum number of capturing subexpressions is 65535."); +} + +// Finalize the top-level sequence, which will take care of any +// top-level alternation. +currentSeq->finalize(); +assert(currentSeq == rootSeq.get()); + +// Ensure that all references are valid. +checkReferences(*rootSeq, groupIndex, groupNames); + +return move(rootSeq); +} catch (LocatedParseError &error) { +if (ts >= ptr && ts <= pe) { +error.locate(ts - ptr); +} else { +error.locate(0); +} +throw; +} +} + +} // namespace ue2 diff --git a/contrib/vectorscan-cmake/rageled_files/amd64/control_verbs.cpp b/contrib/vectorscan-cmake/rageled_files/amd64/control_verbs.cpp new file mode 100644 index 00000000000..e0393e49355 --- /dev/null +++ b/contrib/vectorscan-cmake/rageled_files/amd64/control_verbs.cpp @@ -0,0 +1,547 @@ +#line 1 "control_verbs.rl" +/* +* Copyright (c) 2017, Intel Corporation +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* +* * Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. +* * 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. +* * Neither the name of Intel Corporation nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. +*/ + +/** +* \file +* \brief Parser for control verbs that can occur at the beginning of a pattern. +*/ + +#include "parser/control_verbs.h" + +#include "parser/Parser.h" +#include "parser/parse_error.h" + +#include +#include + +using namespace std; + +namespace ue2 { + + const char *read_control_verbs(const char *ptr, const char *end, size_t start, + ParseMode &mode) { + const char *p = ptr; + const char *pe = end; + const char *eof = pe; + const char *ts, *te; + int cs; + UNUSED int act; + + +#line 56 "control_verbs.cpp" +static const signed char _ControlVerbs_actions[] = { + 0, 1, 0, 1, 1, 1, 2, 1, + 3, 1, 4, 1, 5, 1, 6, 1, + 7, 1, 8, 1, 9, 0 + }; + + static const short _ControlVerbs_key_offsets[] = { + 0, 7, 8, 10, 12, 14, 16, 18, + 20, 21, 23, 25, 27, 30, 32, 34, + 36, 38, 40, 42, 44, 46, 48, 50, + 52, 55, 57, 59, 61, 63, 66, 68, + 70, 72, 74, 76, 79, 82, 84, 86, + 88, 90, 92, 94, 96, 98, 100, 102, + 105, 107, 109, 111, 113, 115, 117, 119, + 121, 123, 125, 127, 129, 131, 133, 135, + 137, 139, 141, 143, 146, 148, 149, 151, + 155, 157, 159, 160, 161, 0 + }; + + static const char _ControlVerbs_trans_keys[] = { + 41, 65, 66, 67, 76, 78, 85, 41, + 41, 78, 41, 89, 41, 67, 41, 82, + 41, 76, 41, 70, 41, 41, 83, 41, + 82, 41, 95, 41, 65, 85, 41, 78, + 41, 89, 41, 67, 41, 78, 41, 73, + 41, 67, 41, 79, 41, 68, 41, 69, + 41, 82, 41, 76, 41, 70, 73, 41, + 77, 41, 73, 41, 84, 41, 95, 41, + 77, 82, 41, 65, 41, 84, 41, 67, + 41, 72, 41, 61, 41, 48, 57, 41, + 48, 57, 41, 69, 41, 67, 41, 85, + 41, 82, 41, 83, 41, 73, 41, 79, + 41, 78, 41, 79, 41, 95, 41, 65, + 83, 41, 85, 41, 84, 41, 79, 41, + 95, 41, 80, 41, 79, 41, 83, 41, + 83, 41, 69, 41, 83, 41, 83, 41, + 84, 41, 65, 41, 82, 41, 84, 41, + 95, 41, 79, 41, 80, 41, 84, 41, + 67, 84, 41, 80, 41, 41, 70, 41, + 49, 51, 56, 41, 54, 41, 50, 41, + 40, 42, 0 + }; + + static const signed char _ControlVerbs_single_lengths[] = { + 7, 1, 2, 2, 2, 2, 2, 2, + 1, 2, 2, 2, 3, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 3, 2, 2, 2, 2, 3, 2, 2, + 2, 2, 2, 1, 1, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 3, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 3, 2, 1, 2, 4, + 2, 2, 1, 1, 1, 0 + }; + + static const signed char _ControlVerbs_range_lengths[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 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, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0 + }; + + static const short _ControlVerbs_index_offsets[] = { + 0, 8, 10, 13, 16, 19, 22, 25, + 28, 30, 33, 36, 39, 43, 46, 49, + 52, 55, 58, 61, 64, 67, 70, 73, + 76, 80, 83, 86, 89, 92, 96, 99, + 102, 105, 108, 111, 114, 117, 120, 123, + 126, 129, 132, 135, 138, 141, 144, 147, + 151, 154, 157, 160, 163, 166, 169, 172, + 175, 178, 181, 184, 187, 190, 193, 196, + 199, 202, 205, 208, 212, 215, 217, 220, + 225, 228, 231, 233, 235, 0 + }; + + static const signed char _ControlVerbs_cond_targs[] = { + 75, 2, 9, 22, 24, 45, 67, 1, + 75, 1, 75, 3, 1, 75, 4, 1, + 75, 5, 1, 75, 6, 1, 75, 7, + 1, 75, 8, 1, 75, 1, 75, 10, + 1, 75, 11, 1, 75, 12, 1, 75, + 13, 16, 1, 75, 14, 1, 75, 15, + 1, 75, 5, 1, 75, 17, 1, 75, + 18, 1, 75, 19, 1, 75, 20, 1, + 75, 21, 1, 75, 8, 1, 75, 23, + 1, 75, 7, 1, 75, 8, 25, 1, + 75, 26, 1, 75, 27, 1, 75, 28, + 1, 75, 29, 1, 75, 30, 37, 1, + 75, 31, 1, 75, 32, 1, 75, 33, + 1, 75, 34, 1, 75, 35, 1, 75, + 36, 1, 75, 36, 1, 75, 38, 1, + 75, 39, 1, 75, 40, 1, 75, 41, + 1, 75, 42, 1, 75, 43, 1, 75, + 44, 1, 75, 34, 1, 75, 46, 1, + 75, 47, 1, 75, 48, 59, 1, 75, + 49, 1, 75, 50, 1, 75, 51, 1, + 75, 52, 1, 75, 53, 1, 75, 54, + 1, 75, 55, 1, 75, 56, 1, 75, + 57, 1, 75, 58, 1, 75, 8, 1, + 75, 60, 1, 75, 61, 1, 75, 62, + 1, 75, 63, 1, 75, 64, 1, 75, + 65, 1, 75, 66, 1, 75, 8, 1, + 75, 68, 70, 1, 75, 69, 1, 75, + 1, 75, 71, 1, 75, 72, 73, 74, + 1, 75, 8, 1, 75, 8, 1, 75, + 1, 76, 75, 0, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 0 + }; + + static const signed char _ControlVerbs_cond_actions[] = { + 19, 0, 0, 0, 0, 0, 0, 0, + 13, 0, 13, 0, 0, 13, 0, 0, + 11, 0, 0, 13, 0, 0, 13, 0, + 0, 13, 0, 0, 11, 0, 13, 0, + 0, 13, 0, 0, 13, 0, 0, 13, + 0, 0, 0, 13, 0, 0, 13, 0, + 0, 13, 0, 0, 13, 0, 0, 13, + 0, 0, 13, 0, 0, 13, 0, 0, + 13, 0, 0, 13, 0, 0, 13, 0, + 0, 11, 0, 0, 13, 0, 0, 0, + 13, 0, 0, 13, 0, 0, 13, 0, + 0, 13, 0, 0, 13, 0, 0, 0, + 13, 0, 0, 13, 0, 0, 13, 0, + 0, 13, 0, 0, 13, 0, 0, 13, + 0, 0, 11, 0, 0, 13, 0, 0, + 13, 0, 0, 13, 0, 0, 13, 0, + 0, 13, 0, 0, 13, 0, 0, 13, + 0, 0, 13, 0, 0, 13, 0, 0, + 13, 0, 0, 13, 0, 0, 0, 13, + 0, 0, 13, 0, 0, 13, 0, 0, + 13, 0, 0, 13, 0, 0, 13, 0, + 0, 13, 0, 0, 13, 0, 0, 13, + 0, 0, 13, 0, 0, 13, 0, 0, + 13, 0, 0, 13, 0, 0, 13, 0, + 0, 13, 0, 0, 13, 0, 0, 13, + 0, 0, 13, 0, 0, 13, 0, 0, + 13, 0, 0, 0, 13, 0, 0, 9, + 0, 13, 0, 0, 7, 0, 0, 0, + 0, 13, 0, 0, 13, 0, 0, 7, + 0, 5, 15, 0, 17, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 0, 17, 0 + }; + + static const signed char _ControlVerbs_to_state_actions[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 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, 0, 0 + }; + + static const signed char _ControlVerbs_from_state_actions[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 0, 0 + }; + + static const short _ControlVerbs_eof_trans[] = { + 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 0 + }; + + static const int ControlVerbs_start = 75; + static const int ControlVerbs_first_final = 75; + static const int ControlVerbs_error = -1; + + static const int ControlVerbs_en_main = 75; + + +#line 269 "control_verbs.cpp" + { + cs = (int)ControlVerbs_start; + ts = 0; + te = 0; + } + +#line 105 "control_verbs.rl" + + + try { + +#line 278 "control_verbs.cpp" + { + int _klen; + unsigned int _trans = 0; + const char * _keys; + const signed char * _acts; + unsigned int _nacts; + _resume: {} + if ( p == pe && p != eof ) + goto _out; + _acts = ( _ControlVerbs_actions + (_ControlVerbs_from_state_actions[cs])); + _nacts = (unsigned int)(*( _acts)); + _acts += 1; + while ( _nacts > 0 ) { + switch ( (*( _acts)) ) { + case 1: { + { +#line 1 "NONE" + {ts = p;}} + +#line 297 "control_verbs.cpp" + + break; + } + } + _nacts -= 1; + _acts += 1; + } + + if ( p == eof ) { + if ( _ControlVerbs_eof_trans[cs] > 0 ) { + _trans = (unsigned int)_ControlVerbs_eof_trans[cs] - 1; + } + } + else { + _keys = ( _ControlVerbs_trans_keys + (_ControlVerbs_key_offsets[cs])); + _trans = (unsigned int)_ControlVerbs_index_offsets[cs]; + + _klen = (int)_ControlVerbs_single_lengths[cs]; + if ( _klen > 0 ) { + const char *_lower = _keys; + const char *_upper = _keys + _klen - 1; + const char *_mid; + while ( 1 ) { + if ( _upper < _lower ) { + _keys += _klen; + _trans += (unsigned int)_klen; + break; + } + + _mid = _lower + ((_upper-_lower) >> 1); + if ( ( (*( p))) < (*( _mid)) ) + _upper = _mid - 1; + else if ( ( (*( p))) > (*( _mid)) ) + _lower = _mid + 1; + else { + _trans += (unsigned int)(_mid - _keys); + goto _match; + } + } + } + + _klen = (int)_ControlVerbs_range_lengths[cs]; + if ( _klen > 0 ) { + const char *_lower = _keys; + const char *_upper = _keys + (_klen<<1) - 2; + const char *_mid; + while ( 1 ) { + if ( _upper < _lower ) { + _trans += (unsigned int)_klen; + break; + } + + _mid = _lower + (((_upper-_lower) >> 1) & ~1); + if ( ( (*( p))) < (*( _mid)) ) + _upper = _mid - 2; + else if ( ( (*( p))) > (*( _mid + 1)) ) + _lower = _mid + 2; + else { + _trans += (unsigned int)((_mid - _keys)>>1); + break; + } + } + } + + _match: {} + } + cs = (int)_ControlVerbs_cond_targs[_trans]; + + if ( _ControlVerbs_cond_actions[_trans] != 0 ) { + + _acts = ( _ControlVerbs_actions + (_ControlVerbs_cond_actions[_trans])); + _nacts = (unsigned int)(*( _acts)); + _acts += 1; + while ( _nacts > 0 ) { + switch ( (*( _acts)) ) + { + case 2: { + { +#line 1 "NONE" + {te = p+1;}} + +#line 378 "control_verbs.cpp" + + break; + } + case 3: { + { +#line 76 "control_verbs.rl" + {te = p+1;{ +#line 76 "control_verbs.rl" + + mode.utf8 = true; + } + }} + +#line 391 "control_verbs.cpp" + + break; + } + case 4: { + { +#line 80 "control_verbs.rl" + {te = p+1;{ +#line 80 "control_verbs.rl" + + mode.ucp = true; + } + }} + +#line 404 "control_verbs.cpp" + + break; + } + case 5: { + { +#line 84 "control_verbs.rl" + {te = p+1;{ +#line 84 "control_verbs.rl" + + ostringstream str; + str << "Unsupported control verb " << string(ts, te - ts); + throw LocatedParseError(str.str()); + } + }} + +#line 419 "control_verbs.cpp" + + break; + } + case 6: { + { +#line 90 "control_verbs.rl" + {te = p+1;{ +#line 90 "control_verbs.rl" + + ostringstream str; + str << "Unknown control verb " << string(ts, te - ts); + throw LocatedParseError(str.str()); + } + }} + +#line 434 "control_verbs.cpp" + + break; + } + case 7: { + { +#line 97 "control_verbs.rl" + {te = p+1;{ +#line 97 "control_verbs.rl" + + {p = p - 1; } + {p += 1; goto _out; } + } + }} + +#line 448 "control_verbs.cpp" + + break; + } + case 8: { + { +#line 97 "control_verbs.rl" + {te = p;p = p - 1;{ +#line 97 "control_verbs.rl" + + {p = p - 1; } + {p += 1; goto _out; } + } + }} + +#line 462 "control_verbs.cpp" + + break; + } + case 9: { + { +#line 97 "control_verbs.rl" + {p = ((te))-1; + { +#line 97 "control_verbs.rl" + + {p = p - 1; } + {p += 1; goto _out; } + } + }} + +#line 477 "control_verbs.cpp" + + break; + } + } + _nacts -= 1; + _acts += 1; + } + + } + + if ( p == eof ) { + if ( cs >= 75 ) + goto _out; + } + else { + _acts = ( _ControlVerbs_actions + (_ControlVerbs_to_state_actions[cs])); + _nacts = (unsigned int)(*( _acts)); + _acts += 1; + while ( _nacts > 0 ) { + switch ( (*( _acts)) ) { + case 0: { + { +#line 1 "NONE" + {ts = 0;}} + +#line 502 "control_verbs.cpp" + + break; + } + } + _nacts -= 1; + _acts += 1; + } + + p += 1; + goto _resume; + } + _out: {} + } + +#line 108 "control_verbs.rl" + + } catch (LocatedParseError &error) { + if (ts >= ptr && ts <= pe) { + error.locate(ts - ptr + start); + } else { + error.locate(0); + } + throw; + } + + return p; + } + +} // namespace ue2 diff --git a/contrib/vectorscan-cmake/rageled_files/control_verbs.cpp b/contrib/vectorscan-cmake/rageled_files/control_verbs.cpp deleted file mode 100644 index 19b5c6955e1..00000000000 --- a/contrib/vectorscan-cmake/rageled_files/control_verbs.cpp +++ /dev/null @@ -1,443 +0,0 @@ - -#line 1 "control_verbs.rl" -/* - * Copyright (c) 2017, Intel Corporation - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * 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. - * * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. - */ - -/** - * \file - * \brief Parser for control verbs that can occur at the beginning of a pattern. - */ - -#include "parser/control_verbs.h" - -#include "parser/Parser.h" -#include "parser/parse_error.h" - -#include -#include - -using namespace std; - -namespace ue2 { - -const char *read_control_verbs(const char *ptr, const char *end, size_t start, - ParseMode &mode) { - const char *p = ptr; - const char *pe = end; - const char *eof = pe; - const char *ts, *te; - int cs; - UNUSED int act; - - -#line 59 "control_verbs.cpp" -static const char _ControlVerbs_actions[] = { - 0, 1, 0, 1, 1, 1, 2, 1, - 3, 1, 4, 1, 5, 1, 6, 1, - 7, 1, 8, 1, 9 -}; - -static const unsigned char _ControlVerbs_key_offsets[] = { - 0, 7, 8, 10, 12, 14, 16, 18, - 20, 21, 23, 25, 27, 30, 32, 34, - 36, 38, 40, 42, 44, 46, 48, 50, - 52, 55, 57, 59, 61, 63, 66, 68, - 70, 72, 74, 76, 79, 82, 84, 86, - 88, 90, 92, 94, 96, 98, 100, 102, - 105, 107, 109, 111, 113, 115, 117, 119, - 121, 123, 125, 127, 129, 131, 133, 135, - 137, 139, 141, 143, 146, 148, 149, 151, - 155, 157, 159, 160, 161 -}; - -static const char _ControlVerbs_trans_keys[] = { - 41, 65, 66, 67, 76, 78, 85, 41, - 41, 78, 41, 89, 41, 67, 41, 82, - 41, 76, 41, 70, 41, 41, 83, 41, - 82, 41, 95, 41, 65, 85, 41, 78, - 41, 89, 41, 67, 41, 78, 41, 73, - 41, 67, 41, 79, 41, 68, 41, 69, - 41, 82, 41, 76, 41, 70, 73, 41, - 77, 41, 73, 41, 84, 41, 95, 41, - 77, 82, 41, 65, 41, 84, 41, 67, - 41, 72, 41, 61, 41, 48, 57, 41, - 48, 57, 41, 69, 41, 67, 41, 85, - 41, 82, 41, 83, 41, 73, 41, 79, - 41, 78, 41, 79, 41, 95, 41, 65, - 83, 41, 85, 41, 84, 41, 79, 41, - 95, 41, 80, 41, 79, 41, 83, 41, - 83, 41, 69, 41, 83, 41, 83, 41, - 84, 41, 65, 41, 82, 41, 84, 41, - 95, 41, 79, 41, 80, 41, 84, 41, - 67, 84, 41, 80, 41, 41, 70, 41, - 49, 51, 56, 41, 54, 41, 50, 41, - 40, 42, 0 -}; - -static const char _ControlVerbs_single_lengths[] = { - 7, 1, 2, 2, 2, 2, 2, 2, - 1, 2, 2, 2, 3, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 3, 2, 2, 2, 2, 3, 2, 2, - 2, 2, 2, 1, 1, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 3, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 3, 2, 1, 2, 4, - 2, 2, 1, 1, 1 -}; - -static const char _ControlVerbs_range_lengths[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 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, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0 -}; - -static const short _ControlVerbs_index_offsets[] = { - 0, 8, 10, 13, 16, 19, 22, 25, - 28, 30, 33, 36, 39, 43, 46, 49, - 52, 55, 58, 61, 64, 67, 70, 73, - 76, 80, 83, 86, 89, 92, 96, 99, - 102, 105, 108, 111, 114, 117, 120, 123, - 126, 129, 132, 135, 138, 141, 144, 147, - 151, 154, 157, 160, 163, 166, 169, 172, - 175, 178, 181, 184, 187, 190, 193, 196, - 199, 202, 205, 208, 212, 215, 217, 220, - 225, 228, 231, 233, 235 -}; - -static const char _ControlVerbs_indicies[] = { - 0, 2, 3, 4, 5, 6, 7, 1, - 8, 1, 8, 9, 1, 8, 10, 1, - 11, 12, 1, 8, 13, 1, 8, 14, - 1, 8, 15, 1, 11, 1, 8, 16, - 1, 8, 17, 1, 8, 18, 1, 8, - 19, 20, 1, 8, 21, 1, 8, 22, - 1, 8, 12, 1, 8, 23, 1, 8, - 24, 1, 8, 25, 1, 8, 26, 1, - 8, 27, 1, 8, 15, 1, 8, 28, - 1, 11, 14, 1, 8, 15, 29, 1, - 8, 30, 1, 8, 31, 1, 8, 32, - 1, 8, 33, 1, 8, 34, 35, 1, - 8, 36, 1, 8, 37, 1, 8, 38, - 1, 8, 39, 1, 8, 40, 1, 8, - 41, 1, 11, 41, 1, 8, 42, 1, - 8, 43, 1, 8, 44, 1, 8, 45, - 1, 8, 46, 1, 8, 47, 1, 8, - 48, 1, 8, 39, 1, 8, 49, 1, - 8, 50, 1, 8, 51, 52, 1, 8, - 53, 1, 8, 54, 1, 8, 55, 1, - 8, 56, 1, 8, 57, 1, 8, 58, - 1, 8, 59, 1, 8, 60, 1, 8, - 61, 1, 8, 62, 1, 8, 15, 1, - 8, 63, 1, 8, 64, 1, 8, 65, - 1, 8, 66, 1, 8, 67, 1, 8, - 68, 1, 8, 69, 1, 8, 15, 1, - 8, 70, 71, 1, 8, 72, 1, 73, - 1, 8, 74, 1, 75, 76, 77, 78, - 1, 8, 15, 1, 8, 15, 1, 75, - 1, 80, 79, 82, 81, 0 -}; - -static const char _ControlVerbs_trans_targs[] = { - 75, 1, 2, 9, 22, 24, 45, 67, - 75, 3, 4, 75, 5, 6, 7, 8, - 10, 11, 12, 13, 16, 14, 15, 17, - 18, 19, 20, 21, 23, 25, 26, 27, - 28, 29, 30, 37, 31, 32, 33, 34, - 35, 36, 38, 39, 40, 41, 42, 43, - 44, 46, 47, 48, 59, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 60, - 61, 62, 63, 64, 65, 66, 68, 70, - 69, 75, 71, 75, 72, 73, 74, 75, - 76, 75, 0 -}; - -static const char _ControlVerbs_trans_actions[] = { - 19, 0, 0, 0, 0, 0, 0, 0, - 13, 0, 0, 11, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 9, 0, 7, 0, 0, 0, 15, - 5, 17, 0 -}; - -static const char _ControlVerbs_to_state_actions[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 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, 0 -}; - -static const char _ControlVerbs_from_state_actions[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0 -}; - -static const short _ControlVerbs_eof_trans[] = { - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 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, 82 -}; - -static const int ControlVerbs_start = 75; -static const int ControlVerbs_first_final = 75; -static const int ControlVerbs_error = -1; - -static const int ControlVerbs_en_main = 75; - - -#line 249 "control_verbs.cpp" - { - cs = ControlVerbs_start; - ts = 0; - te = 0; - act = 0; - } - -#line 105 "control_verbs.rl" - - - try { - -#line 262 "control_verbs.cpp" - { - int _klen; - unsigned int _trans; - const char *_acts; - unsigned int _nacts; - const char *_keys; - - if ( p == pe ) - goto _test_eof; -_resume: - _acts = _ControlVerbs_actions + _ControlVerbs_from_state_actions[cs]; - _nacts = (unsigned int) *_acts++; - while ( _nacts-- > 0 ) { - switch ( *_acts++ ) { - case 1: -#line 1 "NONE" - {ts = p;} - break; -#line 281 "control_verbs.cpp" - } - } - - _keys = _ControlVerbs_trans_keys + _ControlVerbs_key_offsets[cs]; - _trans = _ControlVerbs_index_offsets[cs]; - - _klen = _ControlVerbs_single_lengths[cs]; - if ( _klen > 0 ) { - const char *_lower = _keys; - const char *_mid; - const char *_upper = _keys + _klen - 1; - while (1) { - if ( _upper < _lower ) - break; - - _mid = _lower + ((_upper-_lower) >> 1); - if ( (*p) < *_mid ) - _upper = _mid - 1; - else if ( (*p) > *_mid ) - _lower = _mid + 1; - else { - _trans += (unsigned int)(_mid - _keys); - goto _match; - } - } - _keys += _klen; - _trans += _klen; - } - - _klen = _ControlVerbs_range_lengths[cs]; - if ( _klen > 0 ) { - const char *_lower = _keys; - const char *_mid; - const char *_upper = _keys + (_klen<<1) - 2; - while (1) { - if ( _upper < _lower ) - break; - - _mid = _lower + (((_upper-_lower) >> 1) & ~1); - if ( (*p) < _mid[0] ) - _upper = _mid - 2; - else if ( (*p) > _mid[1] ) - _lower = _mid + 2; - else { - _trans += (unsigned int)((_mid - _keys)>>1); - goto _match; - } - } - _trans += _klen; - } - -_match: - _trans = _ControlVerbs_indicies[_trans]; -_eof_trans: - cs = _ControlVerbs_trans_targs[_trans]; - - if ( _ControlVerbs_trans_actions[_trans] == 0 ) - goto _again; - - _acts = _ControlVerbs_actions + _ControlVerbs_trans_actions[_trans]; - _nacts = (unsigned int) *_acts++; - while ( _nacts-- > 0 ) - { - switch ( *_acts++ ) - { - case 2: -#line 1 "NONE" - {te = p+1;} - break; - case 3: -#line 76 "control_verbs.rl" - {te = p+1;{ - mode.utf8 = true; - }} - break; - case 4: -#line 80 "control_verbs.rl" - {te = p+1;{ - mode.ucp = true; - }} - break; - case 5: -#line 84 "control_verbs.rl" - {te = p+1;{ - ostringstream str; - str << "Unsupported control verb " << string(ts, te - ts); - throw LocatedParseError(str.str()); - }} - break; - case 6: -#line 90 "control_verbs.rl" - {te = p+1;{ - ostringstream str; - str << "Unknown control verb " << string(ts, te - ts); - throw LocatedParseError(str.str()); - }} - break; - case 7: -#line 97 "control_verbs.rl" - {te = p+1;{ - p--; - {p++; goto _out; } - }} - break; - case 8: -#line 97 "control_verbs.rl" - {te = p;p--;{ - p--; - {p++; goto _out; } - }} - break; - case 9: -#line 97 "control_verbs.rl" - {{p = ((te))-1;}{ - p--; - {p++; goto _out; } - }} - break; -#line 400 "control_verbs.cpp" - } - } - -_again: - _acts = _ControlVerbs_actions + _ControlVerbs_to_state_actions[cs]; - _nacts = (unsigned int) *_acts++; - while ( _nacts-- > 0 ) { - switch ( *_acts++ ) { - case 0: -#line 1 "NONE" - {ts = 0;} - break; -#line 413 "control_verbs.cpp" - } - } - - if ( ++p != pe ) - goto _resume; - _test_eof: {} - if ( p == eof ) - { - if ( _ControlVerbs_eof_trans[cs] > 0 ) { - _trans = _ControlVerbs_eof_trans[cs] - 1; - goto _eof_trans; - } - } - - _out: {} - } - -#line 109 "control_verbs.rl" - } catch (LocatedParseError &error) { - if (ts >= ptr && ts <= pe) { - error.locate(ts - ptr + start); - } else { - error.locate(0); - } - throw; - } - - return p; -} - -} // namespace ue2 diff --git a/docker/images.json b/docker/images.json index 181452f17bc..8339205b52f 100644 --- a/docker/images.json +++ b/docker/images.json @@ -29,6 +29,7 @@ "docker/test/util": { "name": "clickhouse/test-util", "dependent": [ + "docker/packager/binary", "docker/test/base", "docker/test/fasttest" ] diff --git a/docker/packager/binary/Dockerfile b/docker/packager/binary/Dockerfile index d57c447e2af..c4244504923 100644 --- a/docker/packager/binary/Dockerfile +++ b/docker/packager/binary/Dockerfile @@ -1,62 +1,7 @@ # rebuild in #33610 # docker build -t clickhouse/binary-builder . -FROM ubuntu:20.04 - -# ARG for quick switch to a given ubuntu mirror -ARG apt_archive="http://archive.ubuntu.com" -RUN sed -i "s|http://archive.ubuntu.com|$apt_archive|g" /etc/apt/sources.list - -ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=14 - -RUN apt-get update \ - && apt-get install \ - apt-transport-https \ - apt-utils \ - ca-certificates \ - dnsutils \ - gnupg \ - iputils-ping \ - lsb-release \ - wget \ - --yes --no-install-recommends --verbose-versions \ - && export LLVM_PUBKEY_HASH="bda960a8da687a275a2078d43c111d66b1c6a893a3275271beedf266c1ff4a0cdecb429c7a5cccf9f486ea7aa43fd27f" \ - && wget -nv -O /tmp/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key \ - && echo "${LLVM_PUBKEY_HASH} /tmp/llvm-snapshot.gpg.key" | sha384sum -c \ - && apt-key add /tmp/llvm-snapshot.gpg.key \ - && export CODENAME="$(lsb_release --codename --short | tr 'A-Z' 'a-z')" \ - && echo "deb [trusted=yes] https://apt.llvm.org/${CODENAME}/ llvm-toolchain-${CODENAME}-${LLVM_VERSION} main" >> \ - /etc/apt/sources.list \ - && apt-get clean - -# initial packages -RUN apt-get update \ - && apt-get install \ - bash \ - build-essential \ - ccache \ - clang-${LLVM_VERSION} \ - clang-tidy-${LLVM_VERSION} \ - cmake \ - curl \ - fakeroot \ - gdb \ - git \ - gperf \ - lld-${LLVM_VERSION} \ - llvm-${LLVM_VERSION} \ - llvm-${LLVM_VERSION}-dev \ - moreutils \ - ninja-build \ - pigz \ - rename \ - software-properties-common \ - tzdata \ - nasm \ - --yes --no-install-recommends \ - && apt-get clean - -# This symlink required by gcc to find lld compiler -RUN ln -s /usr/bin/lld-${LLVM_VERSION} /usr/bin/ld.lld +ARG FROM_TAG=latest +FROM clickhouse/test-util:$FROM_TAG ENV CC=clang-${LLVM_VERSION} ENV CXX=clang++-${LLVM_VERSION} @@ -96,6 +41,9 @@ RUN add-apt-repository ppa:ubuntu-toolchain-r/test --yes \ && apt-get install gcc-11 g++-11 --yes \ && apt-get clean +# A cross-linker for RISC-V 64 (we need it, because LLVM's LLD does not work): +RUN apt-get install binutils-riscv64-linux-gnu + # Architecture of the image when BuildKit/buildx is used ARG TARGETARCH ARG NFPM_VERSION=2.16.0 diff --git a/docker/packager/binary/build.sh b/docker/packager/binary/build.sh index 87f98df2ad8..c2de0e33d82 100755 --- a/docker/packager/binary/build.sh +++ b/docker/packager/binary/build.sh @@ -3,7 +3,7 @@ set -x -e exec &> >(ts) -cache_status () { +ccache_status () { ccache --show-config ||: ccache --show-stats ||: } @@ -48,14 +48,14 @@ if [ -n "$MAKE_DEB" ]; then fi -cache_status +ccache_status # clear cache stats ccache --zero-stats ||: if [ "$BUILD_MUSL_KEEPER" == "1" ] then # build keeper with musl separately - cmake --debug-trycompile --verbose=1 -DBUILD_STANDALONE_KEEPER=1 -DENABLE_CLICKHOUSE_KEEPER=1 -DCMAKE_VERBOSE_MAKEFILE=1 -DUSE_MUSL=1 -LA -DCMAKE_TOOLCHAIN_FILE=/build/cmake/linux/toolchain-x86_64-musl.cmake "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" "-DSANITIZE=$SANITIZER" -DENABLE_CHECK_HEAVY_BUILDS=1 "${CMAKE_FLAGS[@]}" .. + cmake --debug-trycompile -DBUILD_STANDALONE_KEEPER=1 -DENABLE_CLICKHOUSE_KEEPER=1 -DCMAKE_VERBOSE_MAKEFILE=1 -DUSE_MUSL=1 -LA -DCMAKE_TOOLCHAIN_FILE=/build/cmake/linux/toolchain-x86_64-musl.cmake "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" "-DSANITIZE=$SANITIZER" -DENABLE_CHECK_HEAVY_BUILDS=1 "${CMAKE_FLAGS[@]}" .. # shellcheck disable=SC2086 # No quotes because I want it to expand to nothing if empty. ninja $NINJA_FLAGS clickhouse-keeper @@ -70,10 +70,10 @@ then rm -f CMakeCache.txt # Build the rest of binaries - cmake --debug-trycompile --verbose=1 -DBUILD_STANDALONE_KEEPER=0 -DCREATE_KEEPER_SYMLINK=0 -DCMAKE_VERBOSE_MAKEFILE=1 -LA "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" "-DSANITIZE=$SANITIZER" -DENABLE_CHECK_HEAVY_BUILDS=1 "${CMAKE_FLAGS[@]}" .. + cmake --debug-trycompile -DBUILD_STANDALONE_KEEPER=0 -DCREATE_KEEPER_SYMLINK=0 -DCMAKE_VERBOSE_MAKEFILE=1 -LA "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" "-DSANITIZE=$SANITIZER" -DENABLE_CHECK_HEAVY_BUILDS=1 "${CMAKE_FLAGS[@]}" .. else # Build everything - cmake --debug-trycompile --verbose=1 -DCMAKE_VERBOSE_MAKEFILE=1 -LA "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" "-DSANITIZE=$SANITIZER" -DENABLE_CHECK_HEAVY_BUILDS=1 "${CMAKE_FLAGS[@]}" .. + cmake --debug-trycompile -DCMAKE_VERBOSE_MAKEFILE=1 -LA "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" "-DSANITIZE=$SANITIZER" -DENABLE_CHECK_HEAVY_BUILDS=1 "${CMAKE_FLAGS[@]}" .. fi if [ "coverity" == "$COMBINED_OUTPUT" ] @@ -88,11 +88,11 @@ fi # No quotes because I want it to expand to nothing if empty. # shellcheck disable=SC2086 # No quotes because I want it to expand to nothing if empty. -$SCAN_WRAPPER ninja $NINJA_FLAGS clickhouse-bundle +$SCAN_WRAPPER ninja $NINJA_FLAGS $BUILD_TARGET ls -la ./programs -cache_status +ccache_status if [ -n "$MAKE_DEB" ]; then # No quotes because I want it to expand to nothing if empty. @@ -104,6 +104,7 @@ if [ -n "$MAKE_DEB" ]; then fi mv ./programs/clickhouse* /output +[ -x ./programs/self-extracting/clickhouse ] && mv ./programs/self-extracting/clickhouse /output mv ./src/unit_tests_dbms /output ||: # may not exist for some binary builds find . -name '*.so' -print -exec mv '{}' /output \; find . -name '*.so.*' -print -exec mv '{}' /output \; @@ -178,7 +179,8 @@ then mv "coverity-scan.tgz" /output fi -cache_status +ccache_status +ccache --evict-older-than 1d if [ "${CCACHE_DEBUG:-}" == "1" ] then diff --git a/docker/packager/packager b/docker/packager/packager index 7c0f046b76c..9da787e9006 100755 --- a/docker/packager/packager +++ b/docker/packager/packager @@ -62,7 +62,7 @@ def pre_build(repo_path: str, env_variables: List[str]): f"git -C {repo_path} fetch --no-recurse-submodules " "--no-tags origin master:master" ) - logging.info("Getting master branch for performance artifact: ''%s'", cmd) + logging.info("Getting master branch for performance artifact: '%s'", cmd) subprocess.check_call(cmd, shell=True) @@ -100,12 +100,12 @@ def run_docker_image_with_env( subprocess.check_call(cmd, shell=True) -def is_release_build(build_type, package_type, sanitizer, split_binary): +def is_release_build(build_type, package_type, sanitizer, shared_libraries): return ( build_type == "" and package_type == "deb" and sanitizer == "" - and not split_binary + and not shared_libraries ) @@ -116,7 +116,7 @@ def parse_env_variables( package_type, cache, distcc_hosts, - split_binary, + shared_libraries, clang_tidy, version, author, @@ -130,16 +130,19 @@ def parse_env_variables( ARM_SUFFIX = "-aarch64" FREEBSD_SUFFIX = "-freebsd" PPC_SUFFIX = "-ppc64le" + AMD64_SSE2_SUFFIX = "-amd64sse2" result = [] result.append("OUTPUT_DIR=/output") cmake_flags = ["$CMAKE_FLAGS"] + build_target = "clickhouse-bundle" is_cross_darwin = compiler.endswith(DARWIN_SUFFIX) is_cross_darwin_arm = compiler.endswith(DARWIN_ARM_SUFFIX) is_cross_arm = compiler.endswith(ARM_SUFFIX) is_cross_ppc = compiler.endswith(PPC_SUFFIX) is_cross_freebsd = compiler.endswith(FREEBSD_SUFFIX) + is_amd64_sse2 = compiler.endswith(AMD64_SSE2_SUFFIX) if is_cross_darwin: cc = compiler[: -len(DARWIN_SUFFIX)] @@ -185,6 +188,10 @@ def parse_env_variables( cmake_flags.append( "-DCMAKE_TOOLCHAIN_FILE=/build/cmake/linux/toolchain-ppc64le.cmake" ) + elif is_amd64_sse2: + cc = compiler[: -len(AMD64_SSE2_SUFFIX)] + result.append("DEB_ARCH=amd64") + cmake_flags.append("-DNO_SSE3_OR_HIGHER=1") else: cc = compiler result.append("DEB_ARCH=amd64") @@ -201,7 +208,7 @@ def parse_env_variables( cmake_flags.append("-DCMAKE_INSTALL_PREFIX=/usr") cmake_flags.append("-DCMAKE_INSTALL_SYSCONFDIR=/etc") cmake_flags.append("-DCMAKE_INSTALL_LOCALSTATEDIR=/var") - if is_release_build(build_type, package_type, sanitizer, split_binary): + if is_release_build(build_type, package_type, sanitizer, shared_libraries): cmake_flags.append("-DSPLIT_DEBUG_SYMBOLS=ON") result.append("WITH_PERFORMANCE=1") if is_cross_arm: @@ -214,11 +221,11 @@ def parse_env_variables( cmake_flags.append(f"-DCMAKE_C_COMPILER={cc}") cmake_flags.append(f"-DCMAKE_CXX_COMPILER={cxx}") - # Create combined output archive for split build and for performance tests. + # Create combined output archive for shared library build and for performance tests. if package_type == "coverity": result.append("COMBINED_OUTPUT=coverity") result.append('COVERITY_TOKEN="$COVERITY_TOKEN"') - elif split_binary: + elif shared_libraries: result.append("COMBINED_OUTPUT=shared_build") if sanitizer: @@ -233,11 +240,15 @@ def parse_env_variables( if cache: result.append("CCACHE_DIR=/ccache") + result.append("CCACHE_COMPRESSLEVEL=5") result.append("CCACHE_BASEDIR=/build") result.append("CCACHE_NOHASHDIR=true") result.append("CCACHE_COMPILERCHECK=content") - result.append("CCACHE_MAXSIZE=15G") - # result.append("CCACHE_UMASK=777") + cache_maxsize = "15G" + if clang_tidy: + # 15G is not enough for tidy build + cache_maxsize = "25G" + result.append(f"CCACHE_MAXSIZE={cache_maxsize}") if distcc_hosts: hosts_with_params = [f"{host}/24,lzo" for host in distcc_hosts] + [ @@ -259,24 +270,28 @@ def parse_env_variables( result.append("BINARY_OUTPUT=tests") cmake_flags.append("-DENABLE_TESTS=1") - if split_binary: + if shared_libraries: cmake_flags.append( - "-DUSE_STATIC_LIBRARIES=0 -DSPLIT_SHARED_LIBRARIES=1 " - "-DCLICKHOUSE_SPLIT_BINARY=1" + "-DUSE_STATIC_LIBRARIES=0 -DSPLIT_SHARED_LIBRARIES=1" ) # We can't always build utils because it requires too much space, but - # we have to build them at least in some way in CI. The split build is - # probably the least heavy disk-wise. + # we have to build them at least in some way in CI. The shared library + # build is probably the least heavy disk-wise. cmake_flags.append("-DENABLE_UTILS=1") + # utils are not included into clickhouse-bundle, so build everything + build_target = "all" if clang_tidy: cmake_flags.append("-DENABLE_CLANG_TIDY=1") - cmake_flags.append("-DENABLE_UTILS=1") cmake_flags.append("-DENABLE_TESTS=1") cmake_flags.append("-DENABLE_EXAMPLES=1") # Don't stop on first error to find more clang-tidy errors in one run. result.append("NINJA_FLAGS=-k0") + cmake_flags.append("-DENABLE_UTILS=1") + # utils are not included into clickhouse-bundle, so build everything + build_target = "all" + if with_coverage: cmake_flags.append("-DWITH_COVERAGE=1") @@ -290,6 +305,7 @@ def parse_env_variables( cmake_flags.append("-DCLICKHOUSE_OFFICIAL_BUILD=1") result.append('CMAKE_FLAGS="' + " ".join(cmake_flags) + '"') + result.append(f"BUILD_TARGET={build_target}") return result @@ -323,15 +339,16 @@ if __name__ == "__main__": parser.add_argument( "--compiler", choices=( - "clang-14", - "clang-14-darwin", - "clang-14-darwin-aarch64", - "clang-14-aarch64", - "clang-14-ppc64le", - "clang-14-freebsd", + "clang-15", + "clang-15-darwin", + "clang-15-darwin-aarch64", + "clang-15-aarch64", + "clang-15-ppc64le", + "clang-15-amd64sse2", + "clang-15-freebsd", "gcc-11", ), - default="clang-14", + default="clang-15", help="a compiler to use", ) parser.add_argument( @@ -340,7 +357,7 @@ if __name__ == "__main__": default="", ) - parser.add_argument("--split-binary", action="store_true") + parser.add_argument("--shared-libraries", action="store_true") parser.add_argument("--clang-tidy", action="store_true") parser.add_argument("--cache", choices=("ccache", "distcc", ""), default="") parser.add_argument( @@ -393,7 +410,7 @@ if __name__ == "__main__": args.package_type, args.cache, args.distcc_hosts, - args.split_binary, + args.shared_libraries, args.clang_tidy, args.version, args.author, diff --git a/docker/server/Dockerfile.alpine b/docker/server/Dockerfile.alpine index b01dba1e22f..1a672f30a74 100644 --- a/docker/server/Dockerfile.alpine +++ b/docker/server/Dockerfile.alpine @@ -33,7 +33,7 @@ RUN arch=${TARGETARCH:-amd64} \ # lts / testing / prestable / etc ARG REPO_CHANNEL="stable" ARG REPOSITORY="https://packages.clickhouse.com/tgz/${REPO_CHANNEL}" -ARG VERSION="20.9.3.45" +ARG VERSION="22.8.5.29" ARG PACKAGES="clickhouse-client clickhouse-server clickhouse-common-static" # user/group precreated explicitly with fixed uid/gid on purpose. diff --git a/docker/server/Dockerfile.ubuntu b/docker/server/Dockerfile.ubuntu index 7c0108f8b2c..db76a9fab1d 100644 --- a/docker/server/Dockerfile.ubuntu +++ b/docker/server/Dockerfile.ubuntu @@ -21,19 +21,16 @@ RUN sed -i "s|http://archive.ubuntu.com|${apt_archive}|g" /etc/apt/sources.list ARG REPO_CHANNEL="stable" ARG REPOSITORY="deb https://packages.clickhouse.com/deb ${REPO_CHANNEL} main" -ARG VERSION=22.6.1.* +ARG VERSION="22.8.5.29" ARG PACKAGES="clickhouse-client clickhouse-server clickhouse-common-static" # set non-empty deb_location_url url to create a docker image # from debs created by CI build, for example: -# docker build . --network host --build-arg version="21.4.1.6282" --build-arg deb_location_url="https://clickhouse-builds.s3.yandex.net/21852/069cfbff388b3d478d1a16dc7060b48073f5d522/clickhouse_build_check/clang-11_relwithdebuginfo_none_bundled_unsplitted_disable_False_deb/" -t filimonovq/clickhouse-server:pr21852 +# docker build . --network host --build-arg version="21.4.1.6282" --build-arg deb_location_url="https://..." -t ... ARG deb_location_url="" # set non-empty single_binary_location_url to create docker image # from a single binary url (useful for non-standard builds - with sanitizers, for arm64). -# for example (run on aarch64 server): -# docker build . --network host --build-arg single_binary_location_url="https://builds.clickhouse.com/master/aarch64/clickhouse" -t altinity/clickhouse-server:master-testing-arm -# note: clickhouse-odbc-bridge is not supported there. ARG single_binary_location_url="" # user/group precreated explicitly with fixed uid/gid on purpose. diff --git a/docker/server/entrypoint.sh b/docker/server/entrypoint.sh index e0a730e5547..dfd1000d809 100755 --- a/docker/server/entrypoint.sh +++ b/docker/server/entrypoint.sh @@ -37,7 +37,8 @@ if [ -n "$ERROR_LOG_PATH" ]; then ERROR_LOG_DIR="$(dirname "$ERROR_LOG_PATH")"; FORMAT_SCHEMA_PATH="$(clickhouse extract-from-config --config-file "$CLICKHOUSE_CONFIG" --key=format_schema_path || true)" # There could be many disks declared in config -readarray -t FILESYSTEM_CACHE_PATHS < <(clickhouse extract-from-config --config-file "$CLICKHOUSE_CONFIG" --key='storage_configuration.disks.*.data_cache_path' || true) +readarray -t DISKS_PATHS < <(clickhouse extract-from-config --config-file "$CLICKHOUSE_CONFIG" --key='storage_configuration.disks.*.path' || true) +readarray -t DISKS_METADATA_PATHS < <(clickhouse extract-from-config --config-file "$CLICKHOUSE_CONFIG" --key='storage_configuration.disks.*.metadata_path' || true) CLICKHOUSE_USER="${CLICKHOUSE_USER:-default}" CLICKHOUSE_PASSWORD="${CLICKHOUSE_PASSWORD:-}" @@ -50,12 +51,21 @@ for dir in "$DATA_DIR" \ "$TMP_DIR" \ "$USER_PATH" \ "$FORMAT_SCHEMA_PATH" \ - "${FILESYSTEM_CACHE_PATHS[@]}" + "${DISKS_PATHS[@]}" \ + "${DISKS_METADATA_PATHS[@]}" do # check if variable not empty [ -z "$dir" ] && continue # ensure directories exist - if ! mkdir -p "$dir"; then + if [ "$DO_CHOWN" = "1" ]; then + mkdir="mkdir" + else + # if DO_CHOWN=0 it means that the system does not map root user to "admin" permissions + # it mainly happens on NFS mounts where root==nobody for security reasons + # thus mkdir MUST run with user id/gid and not from nobody that has zero permissions + mkdir="/usr/bin/clickhouse su "${USER}:${GROUP}" mkdir" + fi + if ! $mkdir -p "$dir"; then echo "Couldn't create necessary directory: $dir" exit 1 fi @@ -97,6 +107,13 @@ fi if [ -n "$(ls /docker-entrypoint-initdb.d/)" ] || [ -n "$CLICKHOUSE_DB" ]; then # port is needed to check if clickhouse-server is ready for connections HTTP_PORT="$(clickhouse extract-from-config --config-file "$CLICKHOUSE_CONFIG" --key=http_port)" + HTTPS_PORT="$(clickhouse extract-from-config --config-file "$CLICKHOUSE_CONFIG" --key=https_port)" + + if [ -n "$HTTP_PORT" ]; then + URL="http://127.0.0.1:$HTTP_PORT/ping" + else + URL="https://127.0.0.1:$HTTPS_PORT/ping" + fi # Listen only on localhost until the initialization is done /usr/bin/clickhouse su "${USER}:${GROUP}" /usr/bin/clickhouse-server --config-file="$CLICKHOUSE_CONFIG" -- --listen_host=127.0.0.1 & @@ -105,7 +122,7 @@ if [ -n "$(ls /docker-entrypoint-initdb.d/)" ] || [ -n "$CLICKHOUSE_DB" ]; then # check if clickhouse is ready to accept connections # will try to send ping clickhouse via http_port (max 12 retries by default, with 1 sec timeout and 1 sec delay between retries) tries=${CLICKHOUSE_INIT_TIMEOUT:-12} - while ! wget --spider -T 1 -q "http://127.0.0.1:$HTTP_PORT/ping" 2>/dev/null; do + while ! wget --spider --no-check-certificate -T 1 -q "$URL" 2>/dev/null; do if [ "$tries" -le "0" ]; then echo >&2 'ClickHouse init process failed.' exit 1 diff --git a/docker/test/base/Dockerfile b/docker/test/base/Dockerfile index a1ae77343cb..4e42fce1a1d 100644 --- a/docker/test/base/Dockerfile +++ b/docker/test/base/Dockerfile @@ -3,59 +3,12 @@ ARG FROM_TAG=latest FROM clickhouse/test-util:$FROM_TAG -# ARG for quick switch to a given ubuntu mirror -ARG apt_archive="http://archive.ubuntu.com" -RUN sed -i "s|http://archive.ubuntu.com|$apt_archive|g" /etc/apt/sources.list - -ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=14 - -RUN apt-get update \ - && apt-get install ca-certificates lsb-release wget gnupg apt-transport-https \ - --yes --no-install-recommends --verbose-versions \ - && export LLVM_PUBKEY_HASH="bda960a8da687a275a2078d43c111d66b1c6a893a3275271beedf266c1ff4a0cdecb429c7a5cccf9f486ea7aa43fd27f" \ - && wget -nv -O /tmp/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key \ - && echo "${LLVM_PUBKEY_HASH} /tmp/llvm-snapshot.gpg.key" | sha384sum -c \ - && apt-key add /tmp/llvm-snapshot.gpg.key \ - && export CODENAME="$(lsb_release --codename --short | tr 'A-Z' 'a-z')" \ - && echo "deb [trusted=yes] http://apt.llvm.org/${CODENAME}/ llvm-toolchain-${CODENAME}-${LLVM_VERSION} main" >> \ - /etc/apt/sources.list - -# initial packages RUN apt-get update \ && apt-get install \ - bash \ - fakeroot \ - ccache \ - curl \ - software-properties-common \ - --yes --no-install-recommends - -# Architecture of the image when BuildKit/buildx is used -ARG TARGETARCH - -# Special dpkg-deb (https://github.com/ClickHouse-Extras/dpkg) version which is able -# to compress files using pigz (https://zlib.net/pigz/) instead of gzip. -# Significantly increase deb packaging speed and compatible with old systems -RUN arch=${TARGETARCH:-amd64} \ - && curl -Lo /usr/bin/dpkg-deb https://github.com/ClickHouse-Extras/dpkg/releases/download/1.21.1-clickhouse/dpkg-deb-${arch} - -RUN apt-get update \ - && apt-get install \ - clang-${LLVM_VERSION} \ - debhelper \ - devscripts \ - gdb \ - git \ - gperf \ lcov \ - llvm-${LLVM_VERSION} \ - moreutils \ + netbase \ perl \ - pigz \ - pkg-config \ - tzdata \ pv \ - nasm \ --yes --no-install-recommends # Sanitizer options for services (clickhouse-server) @@ -63,11 +16,10 @@ RUN apt-get update \ # and MEMORY_LIMIT_EXCEEDED exceptions in Functional tests (total memory limit in Functional tests is ~55.24 GiB). # TSAN will flush shadow memory when reaching this limit. # It may cause false-negatives, but it's better than OOM. -RUN echo "TSAN_OPTIONS='verbosity=1000 halt_on_error=1 history_size=7 memory_limit_mb=46080'" >> /etc/environment; \ - echo "UBSAN_OPTIONS='print_stacktrace=1'" >> /etc/environment; \ - echo "MSAN_OPTIONS='abort_on_error=1 poison_in_dtor=1'" >> /etc/environment; \ - echo "LSAN_OPTIONS='suppressions=/usr/share/clickhouse-test/config/lsan_suppressions.txt'" >> /etc/environment; \ - ln -s /usr/lib/llvm-${LLVM_VERSION}/bin/llvm-symbolizer /usr/bin/llvm-symbolizer; +RUN echo "TSAN_OPTIONS='verbosity=1000 halt_on_error=1 history_size=7 memory_limit_mb=46080'" >> /etc/environment +RUN echo "UBSAN_OPTIONS='print_stacktrace=1'" >> /etc/environment +RUN echo "MSAN_OPTIONS='abort_on_error=1 poison_in_dtor=1'" >> /etc/environment +RUN echo "LSAN_OPTIONS='suppressions=/usr/share/clickhouse-test/config/lsan_suppressions.txt'" >> /etc/environment # Sanitizer options for current shell (not current, but the one that will be spawned on "docker run") # (but w/o verbosity for TSAN, otherwise test.reference will not match) ENV TSAN_OPTIONS='halt_on_error=1 history_size=7 memory_limit_mb=46080' diff --git a/docker/test/codebrowser/Dockerfile b/docker/test/codebrowser/Dockerfile index c7aed618f6a..ceed93c3ac7 100644 --- a/docker/test/codebrowser/Dockerfile +++ b/docker/test/codebrowser/Dockerfile @@ -8,16 +8,41 @@ FROM clickhouse/binary-builder:$FROM_TAG ARG apt_archive="http://archive.ubuntu.com" RUN sed -i "s|http://archive.ubuntu.com|$apt_archive|g" /etc/apt/sources.list -RUN apt-get update && apt-get --yes --allow-unauthenticated install clang-14 libllvm14 libclang-14-dev libmlir-14-dev +RUN apt-get update && apt-get --yes --allow-unauthenticated install libclang-${LLVM_VERSION}-dev libmlir-${LLVM_VERSION}-dev + +# libclang-15-dev does not contain proper symlink: +# +# This is what cmake will search for: +# +# # readlink -f /usr/lib/llvm-15/lib/libclang-15.so.1 +# /usr/lib/x86_64-linux-gnu/libclang-15.so.1 +# +# This is what exists: +# +# # ls -l /usr/lib/x86_64-linux-gnu/libclang-15* +# lrwxrwxrwx 1 root root 16 Sep 5 13:31 /usr/lib/x86_64-linux-gnu/libclang-15.so -> libclang-15.so.1 +# lrwxrwxrwx 1 root root 21 Sep 5 13:31 /usr/lib/x86_64-linux-gnu/libclang-15.so.15 -> libclang-15.so.15.0.0 +# -rw-r--r-- 1 root root 31835760 Sep 5 13:31 /usr/lib/x86_64-linux-gnu/libclang-15.so.15.0.0 +# +ARG TARGETARCH +RUN arch=${TARGETARCH:-amd64} \ + && case $arch in \ + amd64) rarch=x86_64 ;; \ + arm64) rarch=aarch64 ;; \ + *) exit 1 ;; \ + esac \ + && ln -rsf /usr/lib/$rarch-linux-gnu/libclang-15.so.15 /usr/lib/$rarch-linux-gnu/libclang-15.so.1 # repo versions doesn't work correctly with C++17 # also we push reports to s3, so we add index.html to subfolder urls # https://github.com/ClickHouse-Extras/woboq_codebrowser/commit/37e15eaf377b920acb0b48dbe82471be9203f76b # TODO: remove branch in a few weeks after merge, e.g. in May or June 2022 -RUN git clone https://github.com/ClickHouse-Extras/woboq_codebrowser --branch llvm-14 \ +# +# FIXME: update location of a repo +RUN git clone https://github.com/azat/woboq_codebrowser --branch llvm-15 \ && cd woboq_codebrowser \ - && cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang\+\+-14 -DCMAKE_C_COMPILER=clang-14 \ - && make -j \ + && cmake . -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang\+\+-${LLVM_VERSION} -DCMAKE_C_COMPILER=clang-${LLVM_VERSION} \ + && ninja \ && cd .. \ && rm -rf woboq_codebrowser @@ -32,7 +57,7 @@ ENV SHA=nosha ENV DATA="https://s3.amazonaws.com/clickhouse-test-reports/codebrowser/data" CMD mkdir -p $BUILD_DIRECTORY && cd $BUILD_DIRECTORY && \ - cmake $SOURCE_DIRECTORY -DCMAKE_CXX_COMPILER=/usr/bin/clang\+\+-14 -DCMAKE_C_COMPILER=/usr/bin/clang-14 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DENABLE_EMBEDDED_COMPILER=0 -DENABLE_S3=0 && \ + cmake $SOURCE_DIRECTORY -DCMAKE_CXX_COMPILER=/usr/bin/clang\+\+-${LLVM_VERSION} -DCMAKE_C_COMPILER=/usr/bin/clang-${LLVM_VERSION} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DENABLE_EMBEDDED_COMPILER=0 -DENABLE_S3=0 && \ mkdir -p $HTML_RESULT_DIRECTORY && \ $CODEGEN -b $BUILD_DIRECTORY -a -o $HTML_RESULT_DIRECTORY -p ClickHouse:$SOURCE_DIRECTORY:$SHA -d $DATA | ts '%Y-%m-%d %H:%M:%S' && \ cp -r $STATIC_DATA $HTML_RESULT_DIRECTORY/ &&\ diff --git a/docker/test/fasttest/Dockerfile b/docker/test/fasttest/Dockerfile index 699e2c7ceb9..7f7a8008d4e 100644 --- a/docker/test/fasttest/Dockerfile +++ b/docker/test/fasttest/Dockerfile @@ -3,83 +3,24 @@ ARG FROM_TAG=latest FROM clickhouse/test-util:$FROM_TAG -# ARG for quick switch to a given ubuntu mirror -ARG apt_archive="http://archive.ubuntu.com" -RUN sed -i "s|http://archive.ubuntu.com|$apt_archive|g" /etc/apt/sources.list - -ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=14 - -RUN apt-get update \ - && apt-get install ca-certificates lsb-release wget gnupg apt-transport-https \ - --yes --no-install-recommends --verbose-versions \ - && export LLVM_PUBKEY_HASH="bda960a8da687a275a2078d43c111d66b1c6a893a3275271beedf266c1ff4a0cdecb429c7a5cccf9f486ea7aa43fd27f" \ - && wget -nv -O /tmp/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key \ - && echo "${LLVM_PUBKEY_HASH} /tmp/llvm-snapshot.gpg.key" | sha384sum -c \ - && apt-key add /tmp/llvm-snapshot.gpg.key \ - && export CODENAME="$(lsb_release --codename --short | tr 'A-Z' 'a-z')" \ - && echo "deb [trusted=yes] https://apt.llvm.org/${CODENAME}/ llvm-toolchain-${CODENAME}-${LLVM_VERSION} main" >> \ - /etc/apt/sources.list - -# initial packages RUN apt-get update \ && apt-get install \ - bash \ - fakeroot \ - ccache \ - curl \ - software-properties-common \ - --yes --no-install-recommends - -# Architecture of the image when BuildKit/buildx is used -ARG TARGETARCH - -# Special dpkg-deb (https://github.com/ClickHouse-Extras/dpkg) version which is able -# to compress files using pigz (https://zlib.net/pigz/) instead of gzip. -# Significantly increase deb packaging speed and compatible with old systems -RUN arch=${TARGETARCH:-amd64} \ - && curl -Lo /usr/bin/dpkg-deb https://github.com/ClickHouse-Extras/dpkg/releases/download/1.21.1-clickhouse/dpkg-deb-${arch} - -RUN apt-get update \ - && apt-get install \ - apt-transport-https \ - bash \ brotli \ - build-essential \ - ca-certificates \ - ccache \ - clang-${LLVM_VERSION} \ - clang-tidy-${LLVM_VERSION} \ - cmake \ - curl \ expect \ - fakeroot \ - gdb \ - git \ - gperf \ - lld-${LLVM_VERSION} \ - llvm-${LLVM_VERSION} \ + file \ lsof \ - moreutils \ - ninja-build \ psmisc \ python3 \ python3-lxml \ python3-pip \ python3-requests \ python3-termcolor \ - rename \ - software-properties-common \ - tzdata \ unixodbc \ - file \ - nasm \ - --yes --no-install-recommends + pv \ + --yes --no-install-recommends RUN pip3 install numpy scipy pandas Jinja2 -# This symlink required by gcc to find lld compiler -RUN ln -s /usr/bin/lld-${LLVM_VERSION} /usr/bin/ld.lld - ARG odbc_driver_url="https://github.com/ClickHouse/clickhouse-odbc/releases/download/v1.1.4.20200302/clickhouse-odbc-1.1.4-Linux.tar.gz" RUN mkdir -p /tmp/clickhouse-odbc-tmp \ diff --git a/docker/test/fasttest/run.sh b/docker/test/fasttest/run.sh index 6b8109a15b2..377b816b2b6 100755 --- a/docker/test/fasttest/run.sh +++ b/docker/test/fasttest/run.sh @@ -160,9 +160,8 @@ function run_cmake "-DENABLE_REPLXX=1" ) - # TODO remove this? we don't use ccache anyway. An option would be to download it - # from S3 simultaneously with cloning. export CCACHE_DIR="$FASTTEST_WORKSPACE/ccache" + export CCACHE_COMPRESSLEVEL=5 export CCACHE_BASEDIR="$FASTTEST_SOURCE" export CCACHE_NOHASHDIR=true export CCACHE_COMPILERCHECK=content @@ -191,6 +190,7 @@ function build gzip "$FASTTEST_OUTPUT/clickhouse-stripped" fi ccache --show-stats ||: + ccache --evict-older-than 1d ||: ) } diff --git a/docker/test/fuzzer/run-fuzzer.sh b/docker/test/fuzzer/run-fuzzer.sh index f74760e3339..bab87865b42 100755 --- a/docker/test/fuzzer/run-fuzzer.sh +++ b/docker/test/fuzzer/run-fuzzer.sh @@ -1,8 +1,15 @@ #!/bin/bash # shellcheck disable=SC2086,SC2001,SC2046,SC2030,SC2031 -set -eux +set -x + +# core.COMM.PID-TID +sysctl kernel.core_pattern='core.%e.%p-%P' + +set -e +set -u set -o pipefail + trap "exit" INT TERM # The watchdog is in the separate process group, so we have to kill it separately # if the script terminates earlier. @@ -12,7 +19,7 @@ stage=${stage:-} script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" echo "$script_dir" repo_dir=ch -BINARY_TO_DOWNLOAD=${BINARY_TO_DOWNLOAD:="clang-14_debug_none_bundled_unsplitted_disable_False_binary"} +BINARY_TO_DOWNLOAD=${BINARY_TO_DOWNLOAD:="clang-15_debug_none_unsplitted_disable_False_binary"} BINARY_URL_TO_DOWNLOAD=${BINARY_URL_TO_DOWNLOAD:="https://clickhouse-builds.s3.amazonaws.com/$PR_TO_TEST/$SHA_TO_TEST/clickhouse_build_check/$BINARY_TO_DOWNLOAD/clickhouse"} function clone @@ -69,6 +76,8 @@ function download wget_with_retry "$BINARY_URL_TO_DOWNLOAD" chmod +x clickhouse + # clickhouse may be compressed - run once to decompress + ./clickhouse ||: ln -s ./clickhouse ./clickhouse-server ln -s ./clickhouse ./clickhouse-client @@ -85,6 +94,19 @@ function configure # TODO figure out which ones are needed cp -av --dereference "$repo_dir"/tests/config/config.d/listen.xml db/config.d cp -av --dereference "$script_dir"/query-fuzzer-tweaks-users.xml db/users.d + + cat > db/config.d/core.xml < + + + 107374182400 + + + $PWD + +EOL } function watchdog @@ -178,7 +200,6 @@ handle SIGUSR2 nostop noprint pass handle SIG$RTMIN nostop noprint pass info signals continue -gcore backtrace full thread apply all backtrace full info registers diff --git a/docker/test/integration/base/Dockerfile b/docker/test/integration/base/Dockerfile index eaf0f01e36d..9b6318a5426 100644 --- a/docker/test/integration/base/Dockerfile +++ b/docker/test/integration/base/Dockerfile @@ -34,13 +34,14 @@ RUN apt-get update \ ARG TARGETARCH # Install MySQL ODBC driver from RHEL rpm +# For reference https://downloads.mysql.com/archives/c-odbc/ RHEL RUN arch=${TARGETARCH:-amd64} \ && case $arch in \ amd64) rarch=x86_64 ;; \ arm64) rarch=aarch64 ;; \ esac \ && cd /tmp \ - && curl -o mysql-odbc.rpm "https://cdn.mysql.com/Downloads/Connector-ODBC/8.0/mysql-connector-odbc-8.0.27-1.el8.${rarch}.rpm" \ + && curl -o mysql-odbc.rpm "https://cdn.mysql.com/archives/mysql-connector-odbc-8.0/mysql-connector-odbc-8.0.27-1.el8.${rarch}.rpm" \ && rpm2archive mysql-odbc.rpm \ && tar xf mysql-odbc.rpm.tgz -C / ./usr/lib64/ \ && LINK_DIR=$(dpkg -L libodbc1 | grep '^/usr/lib/.*-linux-gnu/odbc$') \ diff --git a/docker/test/integration/runner/compose/docker_compose_keeper.yml b/docker/test/integration/runner/compose/docker_compose_keeper.yml index 811bbdd800d..8524823ed87 100644 --- a/docker/test/integration/runner/compose/docker_compose_keeper.yml +++ b/docker/test/integration/runner/compose/docker_compose_keeper.yml @@ -8,6 +8,9 @@ services: - type: bind source: ${keeper_binary:-} target: /usr/bin/clickhouse + - type: bind + source: ${keeper_binary:-} + target: /usr/bin/clickhouse-keeper - type: bind source: ${keeper_config_dir1:-} target: /etc/clickhouse-keeper @@ -38,6 +41,9 @@ services: - type: bind source: ${keeper_binary:-} target: /usr/bin/clickhouse + - type: bind + source: ${keeper_binary:-} + target: /usr/bin/clickhouse-keeper - type: bind source: ${keeper_config_dir2:-} target: /etc/clickhouse-keeper @@ -68,6 +74,9 @@ services: - type: bind source: ${keeper_binary:-} target: /usr/bin/clickhouse + - type: bind + source: ${keeper_binary:-} + target: /usr/bin/clickhouse-keeper - type: bind source: ${keeper_config_dir3:-} target: /etc/clickhouse-keeper diff --git a/docker/test/integration/runner/compose/docker_compose_nats.yml b/docker/test/integration/runner/compose/docker_compose_nats.yml index 19ae4c162b1..2122f0f639f 100644 --- a/docker/test/integration/runner/compose/docker_compose_nats.yml +++ b/docker/test/integration/runner/compose/docker_compose_nats.yml @@ -4,4 +4,8 @@ services: image: nats ports: - "${NATS_EXTERNAL_PORT}:${NATS_INTERNAL_PORT}" - command: "-p 4444 --user click --pass house" \ No newline at end of file + command: "-p 4444 --user click --pass house --tls --tlscert=/etc/certs/server-cert.pem --tlskey=/etc/certs/server-key.pem" + volumes: + - type: bind + source: "${NATS_CERT_DIR}/nats" + target: /etc/certs diff --git a/docker/test/keeper-jepsen/run.sh b/docker/test/keeper-jepsen/run.sh index 460c0db54c3..adf99c029a9 100644 --- a/docker/test/keeper-jepsen/run.sh +++ b/docker/test/keeper-jepsen/run.sh @@ -2,7 +2,7 @@ set -euo pipefail -CLICKHOUSE_PACKAGE=${CLICKHOUSE_PACKAGE:="https://clickhouse-builds.s3.amazonaws.com/$PR_TO_TEST/$SHA_TO_TEST/clickhouse_build_check/clang-14_relwithdebuginfo_none_bundled_unsplitted_disable_False_binary/clickhouse"} +CLICKHOUSE_PACKAGE=${CLICKHOUSE_PACKAGE:="https://clickhouse-builds.s3.amazonaws.com/$PR_TO_TEST/$SHA_TO_TEST/clickhouse_build_check/clang-15_relwithdebuginfo_none_unsplitted_disable_False_binary/clickhouse"} CLICKHOUSE_REPO_PATH=${CLICKHOUSE_REPO_PATH:=""} diff --git a/docker/test/performance-comparison/compare.sh b/docker/test/performance-comparison/compare.sh index 3b0b7a4d95a..b0b5ebdb2e2 100755 --- a/docker/test/performance-comparison/compare.sh +++ b/docker/test/performance-comparison/compare.sh @@ -61,7 +61,7 @@ function configure cp -rv right/config left ||: # Start a temporary server to rename the tables - while pkill clickhouse-serv; do echo . ; sleep 1 ; done + while pkill -f clickhouse-serv ; do echo . ; sleep 1 ; done echo all killed set -m # Spawn temporary in its own process groups @@ -88,7 +88,7 @@ function configure clickhouse-client --port $LEFT_SERVER_PORT --query "create database test" ||: clickhouse-client --port $LEFT_SERVER_PORT --query "rename table datasets.hits_v1 to test.hits" ||: - while pkill clickhouse-serv; do echo . ; sleep 1 ; done + while pkill -f clickhouse-serv ; do echo . ; sleep 1 ; done echo all killed # Make copies of the original db for both servers. Use hardlinks instead @@ -106,7 +106,7 @@ function configure function restart { - while pkill clickhouse-serv; do echo . ; sleep 1 ; done + while pkill -f clickhouse-serv ; do echo . ; sleep 1 ; done echo all killed # Change the jemalloc settings here. @@ -284,13 +284,21 @@ function run_tests # Use awk because bash doesn't support floating point arithmetic. profile_seconds=$(awk "BEGIN { print ($profile_seconds_left > 0 ? 10 : 0) }") + if [ "$(grep -c $(basename $test) changed-test-definitions.txt)" -gt 0 ] + then + # Run all queries from changed test files to ensure that all new queries will be tested. + max_queries=0 + else + max_queries=$CHPC_MAX_QUERIES + fi + ( set +x argv=( --host localhost localhost --port "$LEFT_SERVER_PORT" "$RIGHT_SERVER_PORT" --runs "$CHPC_RUNS" - --max-queries "$CHPC_MAX_QUERIES" + --max-queries "$max_queries" --profile-seconds "$profile_seconds" "$test" @@ -1392,7 +1400,7 @@ case "$stage" in while env kill -- -$watchdog_pid ; do sleep 1; done # Stop the servers to free memory for the subsequent query analysis. - while pkill clickhouse-serv; do echo . ; sleep 1 ; done + while pkill -f clickhouse-serv ; do echo . ; sleep 1 ; done echo Servers stopped. ;& "analyze_queries") diff --git a/docker/test/performance-comparison/report.py b/docker/test/performance-comparison/report.py index 4c1b6e1dd57..960f23be95c 100755 --- a/docker/test/performance-comparison/report.py +++ b/docker/test/performance-comparison/report.py @@ -41,24 +41,9 @@ color_good = "#b0d050" header_template = """ - + + +
+
+
+ + + +
+
+ + 🌚🌞 +
+
+
+
+
+ + + diff --git a/programs/server/embedded.xml b/programs/server/embedded.xml index 0f11efab8a3..c2336e0d582 100644 --- a/programs/server/embedded.xml +++ b/programs/server/embedded.xml @@ -1,4 +1,3 @@ - diff --git a/programs/server/js/uplot.js b/programs/server/js/uplot.js new file mode 100644 index 00000000000..657479be7e1 --- /dev/null +++ b/programs/server/js/uplot.js @@ -0,0 +1,2 @@ +/*! https://github.com/leeoniya/uPlot (v1.6.21) */ +var uPlot=function(){"use strict";const e="u-off",t="u-label",l="width",n="height",i="top",o="bottom",s="left",r="right",u="#000",a="mousemove",f="mousedown",c="mouseup",h="mouseenter",d="mouseleave",p="dblclick",m="change",g="dppxchange",x="undefined"!=typeof window,w=x?document:null,_=x?window:null,k=x?navigator:null;let b,v;function y(e,t){if(null!=t){let l=e.classList;!l.contains(t)&&l.add(t)}}function M(e,t){let l=e.classList;l.contains(t)&&l.remove(t)}function S(e,t,l){e.style[t]=l+"px"}function E(e,t,l,n){let i=w.createElement(e);return null!=t&&y(i,t),null!=l&&l.insertBefore(i,n),i}function D(e,t){return E("div",e,t)}const z=new WeakMap;function T(t,l,n,i,o){let s="translate("+l+"px,"+n+"px)";s!=z.get(t)&&(t.style.transform=s,z.set(t,s),0>l||0>n||l>i||n>o?y(t,e):M(t,e))}const P=new WeakMap;function A(e,t,l){let n=t+l;n!=P.get(e)&&(P.set(e,n),e.style.background=t,e.style.borderColor=l)}const W=new WeakMap;function Y(e,t,l,n){let i=t+""+l;i!=W.get(e)&&(W.set(e,i),e.style.height=l+"px",e.style.width=t+"px",e.style.marginLeft=n?-t/2+"px":0,e.style.marginTop=n?-l/2+"px":0)}const C={passive:!0},F={...C,capture:!0};function H(e,t,l,n){t.addEventListener(e,l,n?F:C)}function R(e,t,l,n){t.removeEventListener(e,l,n?F:C)}function G(e,t,l,n){let i;l=l||0;let o=2147483647>=(n=n||t.length-1);for(;n-l>1;)i=o?l+n>>1:te((l+n)/2),e>t[i]?l=i:n=i;return e-t[l]>t[n]-e?n:l}function L(e,t,l,n){for(let i=1==n?t:l;i>=t&&l>=i;i+=n)if(null!=e[i])return i;return-1}x&&function e(){let t=devicePixelRatio;b!=t&&(b=t,v&&R(m,v,e),v=matchMedia(`(min-resolution: ${b-.001}dppx) and (max-resolution: ${b+.001}dppx)`),H(m,v,e),_.dispatchEvent(new CustomEvent(g)))}();const I=[0,0];function O(e,t,l,n){return I[0]=0>l?ye(e,-l):e,I[1]=0>n?ye(t,-n):t,I}function N(e,t,l,n){let i,o,s,r=re(e),u=10==l?ue:ae;return e==t&&(-1==r?(e*=l,t/=l):(e/=l,t*=l)),n?(i=te(u(e)),o=ne(u(t)),s=O(se(l,i),se(l,o),i,o),e=s[0],t=s[1]):(i=te(u(ee(e))),o=te(u(ee(t))),s=O(se(l,i),se(l,o),i,o),e=ve(e,s[0]),t=be(t,s[1])),[e,t]}function j(e,t,l,n){let i=N(e,t,l,n);return 0==e&&(i[0]=0),0==t&&(i[1]=0),i}const B={mode:3,pad:.1},U={pad:0,soft:null,mode:0},V={min:U,max:U};function J(e,t,l,n){return We(l)?K(e,t,l):(U.pad=l,U.soft=n?0:null,U.mode=n?3:0,K(e,t,V))}function q(e,t){return null==e?t:e}function K(e,t,l){let n=l.min,i=l.max,o=q(n.pad,0),s=q(i.pad,0),r=q(n.hard,-ce),u=q(i.hard,ce),a=q(n.soft,ce),f=q(i.soft,-ce),c=q(n.mode,0),h=q(i.mode,0),d=t-e;1e-9>d&&(d=0,0!=e&&0!=t||(d=1e-9,2==c&&a!=ce&&(o=0),2==h&&f!=-ce&&(s=0)));let p=d||ee(t)||1e3,m=ue(p),g=se(10,te(m)),x=ye(ve(e-p*(0==d?0==e?.1:1:o),g/10),9),w=a>e||1!=c&&(3!=c||x>a)&&(2!=c||a>x)?ce:a,_=oe(r,w>x&&e>=w?w:ie(w,x)),k=ye(be(t+p*(0==d?0==t?.1:1:s),g/10),9),b=t>f||1!=h&&(3!=h||f>k)&&(2!=h||k>f)?-ce:f,v=ie(u,k>b&&b>=t?b:oe(b,k));return _==v&&0==_&&(v=100),[_,v]}const Z=new Intl.NumberFormat(x?k.language:"en-US"),$=e=>Z.format(e),X=Math,Q=X.PI,ee=X.abs,te=X.floor,le=X.round,ne=X.ceil,ie=X.min,oe=X.max,se=X.pow,re=X.sign,ue=X.log10,ae=X.log2,fe=(e,t=1)=>X.asinh(e/t),ce=1/0;function he(e){return 1+(0|ue((e^e>>31)-(e>>31)))}function de(e,t){return le(e/t)*t}function pe(e,t,l){return ie(oe(e,t),l)}function me(e){return"function"==typeof e?e:()=>e}const ge=e=>e,xe=(e,t)=>t,we=()=>null,_e=()=>!0,ke=(e,t)=>e==t;function be(e,t){return ne(e/t)*t}function ve(e,t){return te(e/t)*t}function ye(e,t){return le(e*(t=10**t))/t}const Me=new Map;function Se(e){return((""+e).split(".")[1]||"").length}function Ee(e,t,l,n){let i=[],o=n.map(Se);for(let s=t;l>s;s++){let t=ee(s),l=ye(se(e,s),t);for(let e=0;n.length>e;e++){let r=n[e]*l,u=(0>r||0>s?t:0)+(o[e]>s?o[e]:0),a=ye(r,u);i.push(a),Me.set(a,u)}}return i}const De={},ze=[],Te=[null,null],Pe=Array.isArray;function Ae(e){return"string"==typeof e}function We(e){let t=!1;if(null!=e){let l=e.constructor;t=null==l||l==Object}return t}function Ye(e){return null!=e&&"object"==typeof e}function Ce(e,t=We){let l;if(Pe(e)){let n=e.find((e=>null!=e));if(Pe(n)||t(n)){l=Array(e.length);for(let n=0;e.length>n;n++)l[n]=Ce(e[n],t)}else l=e.slice()}else if(t(e)){l={};for(let n in e)l[n]=Ce(e[n],t)}else l=e;return l}function Fe(e){let t=arguments;for(let l=1;t.length>l;l++){let n=t[l];for(let t in n)We(e[t])?Fe(e[t],Ce(n[t])):e[t]=Ce(n[t])}return e}function He(e,t,l){for(let n,i=0,o=-1;t.length>i;i++){let s=t[i];if(s>o){for(n=s-1;n>=0&&null==e[n];)e[n--]=null;for(n=s+1;l>n&&null==e[n];)e[o=n++]=null}}}const Re="undefined"==typeof queueMicrotask?e=>Promise.resolve().then(e):queueMicrotask,Ge=["January","February","March","April","May","June","July","August","September","October","November","December"],Le=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Ie(e){return e.slice(0,3)}const Oe=Le.map(Ie),Ne=Ge.map(Ie),je={MMMM:Ge,MMM:Ne,WWWW:Le,WWW:Oe};function Be(e){return(10>e?"0":"")+e}const Ue={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,t)=>t.MMMM[e.getMonth()],MMM:(e,t)=>t.MMM[e.getMonth()],MM:e=>Be(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>Be(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>Be(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return 0==t?12:t>12?t-12:t},AA:e=>12>e.getHours()?"AM":"PM",aa:e=>12>e.getHours()?"am":"pm",a:e=>12>e.getHours()?"a":"p",mm:e=>Be(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>Be(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>function(e){return(10>e?"00":100>e?"0":"")+e}(e.getMilliseconds())};function Ve(e,t){t=t||je;let l,n=[],i=/\{([a-z]+)\}|[^{]+/gi;for(;l=i.exec(e);)n.push("{"==l[0][0]?Ue[l[1]]:l[0]);return e=>{let l="";for(let i=0;n.length>i;i++)l+="string"==typeof n[i]?n[i]:n[i](e,t);return l}}const Je=(new Intl.DateTimeFormat).resolvedOptions().timeZone,qe=e=>e%1==0,Ke=[1,2,2.5,5],Ze=Ee(10,-16,0,Ke),$e=Ee(10,0,16,Ke),Xe=$e.filter(qe),Qe=Ze.concat($e),et="{YYYY}",tt="\n"+et,lt="{M}/{D}",nt="\n"+lt,it=nt+"/{YY}",ot="{aa}",st="{h}:{mm}"+ot,rt="\n"+st,ut=":{ss}",at=null;function ft(e){let t=1e3*e,l=60*t,n=60*l,i=24*n,o=30*i,s=365*i;return[(1==e?Ee(10,0,3,Ke).filter(qe):Ee(10,-3,0,Ke)).concat([t,5*t,10*t,15*t,30*t,l,5*l,10*l,15*l,30*l,n,2*n,3*n,4*n,6*n,8*n,12*n,i,2*i,3*i,4*i,5*i,6*i,7*i,8*i,9*i,10*i,15*i,o,2*o,3*o,4*o,6*o,s,2*s,5*s,10*s,25*s,50*s,100*s]),[[s,et,at,at,at,at,at,at,1],[28*i,"{MMM}",tt,at,at,at,at,at,1],[i,lt,tt,at,at,at,at,at,1],[n,"{h}"+ot,it,at,nt,at,at,at,1],[l,st,it,at,nt,at,at,at,1],[t,ut,it+" "+st,at,nt+" "+st,at,rt,at,1],[e,ut+".{fff}",it+" "+st,at,nt+" "+st,at,rt,at,1]],function(t){return(r,u,a,f,c,h)=>{let d=[],p=c>=s,m=c>=o&&s>c,g=t(a),x=ye(g*e,3),w=_t(g.getFullYear(),p?0:g.getMonth(),m||p?1:g.getDate()),_=ye(w*e,3);if(m||p){let l=m?c/o:0,n=p?c/s:0,i=x==_?x:ye(_t(w.getFullYear()+n,w.getMonth()+l,1)*e,3),r=new Date(le(i/e)),u=r.getFullYear(),a=r.getMonth();for(let o=0;f>=i;o++){let s=_t(u+n*o,a+l*o,1),r=s-t(ye(s*e,3));i=ye((+s+r)*e,3),i>f||d.push(i)}}else{let o=i>c?c:i,s=_+(te(a)-te(x))+be(x-_,o);d.push(s);let p=t(s),m=p.getHours()+p.getMinutes()/l+p.getSeconds()/n,g=c/n,w=h/r.axes[u]._space;for(;s=ye(s+c,1==e?0:3),f>=s;)if(g>1){let e=te(ye(m+g,6))%24,l=t(s).getHours()-e;l>1&&(l=-1),s-=l*n,m=(m+g)%24,.7>ye((s-d[d.length-1])/c,3)*w||d.push(s)}else d.push(s)}return d}}]}const[ct,ht,dt]=ft(1),[pt,mt,gt]=ft(.001);function xt(e,t){return e.map((e=>e.map(((l,n)=>0==n||8==n||null==l?l:t(1==n||0==e[8]?l:e[1]+l)))))}function wt(e,t){return(l,n,i,o,s)=>{let r,u,a,f,c,h,d=t.find((e=>s>=e[0]))||t[t.length-1];return n.map((t=>{let l=e(t),n=l.getFullYear(),i=l.getMonth(),o=l.getDate(),s=l.getHours(),p=l.getMinutes(),m=l.getSeconds(),g=n!=r&&d[2]||i!=u&&d[3]||o!=a&&d[4]||s!=f&&d[5]||p!=c&&d[6]||m!=h&&d[7]||d[1];return r=n,u=i,a=o,f=s,c=p,h=m,g(l)}))}}function _t(e,t,l){return new Date(e,t,l)}function kt(e,t){return t(e)}function bt(e,t){return(l,n)=>t(e(n))}Ee(2,-53,53,[1]);const vt={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:function(e,t){let l=e.series[t];return l.width?l.stroke(e,t):l.points.width?l.points.stroke(e,t):null},fill:function(e,t){return e.series[t].fill(e,t)},dash:"solid"},idx:null,idxs:null,values:[]},yt=[0,0];function Mt(e,t,l){return e=>{0==e.button&&l(e)}}function St(e,t,l){return l}const Et={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,l){return yt[0]=t,yt[1]=l,yt},points:{show:function(e,t){let i=e.cursor.points,o=D(),s=i.size(e,t);S(o,l,s),S(o,n,s);let r=s/-2;S(o,"marginLeft",r),S(o,"marginTop",r);let u=i.width(e,t,s);return u&&S(o,"borderWidth",u),o},size:function(e,t){return Vt(e.series[t].points.width,1)},width:0,stroke:function(e,t){let l=e.series[t].points;return l._stroke||l._fill},fill:function(e,t){let l=e.series[t].points;return l._fill||l._stroke}},bind:{mousedown:Mt,mouseup:Mt,click:Mt,dblclick:Mt,mousemove:St,mouseleave:St,mouseenter:St},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:function(e,t,l){return l},idxs:null},Dt={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},zt=Fe({},Dt,{filter:xe}),Tt=Fe({},zt,{size:10}),Pt=Fe({},Dt,{show:!1}),At='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Wt="bold "+At,Yt={show:!0,scale:"x",stroke:u,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Wt,side:2,grid:zt,ticks:Tt,border:Pt,font:At,rotate:0},Ct={show:!0,scale:"x",auto:!1,sorted:1,min:ce,max:-ce,idxs:[]};function Ft(e,t){return t.map((e=>null==e?"":$(e)))}function Ht(e,t,l,n,i,o,s){let r=[],u=Me.get(i)||0;for(let e=l=s?l:ye(be(l,i),u);n>=e;e=ye(e+i,u))r.push(Object.is(e,-0)?0:e);return r}function Rt(e,t,l,n,i){const o=[],s=e.scales[e.axes[t].scale].log,r=te((10==s?ue:ae)(l));i=se(s,r),0>r&&(i=ye(i,-r));let u=l;do{o.push(u),u=ye(u+i,Me.get(i)),i*s>u||(i=u)}while(n>=u);return o}function Gt(e,t,l,n,i){let o=e.scales[e.axes[t].scale].asinh,s=n>o?Rt(e,t,oe(o,l),n,i):[o],r=0>n||l>0?[]:[0];return(-o>l?Rt(e,t,oe(o,-n),-l,i):[o]).reverse().map((e=>-e)).concat(r,s)}const Lt=/./,It=/[12357]/,Ot=/[125]/,Nt=/1/;function jt(e,t,l){let n=e.axes[l],i=n.scale,o=e.scales[i];if(3==o.distr&&2==o.log)return t;let s=e.valToPos,r=n._space,u=s(10,i),a=s(9,i)-u4==o.distr&&0==e||a.test(e)?e:null))}function Bt(e,t){return null==t?"":$(t)}const Ut={show:!0,scale:"y",stroke:u,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Wt,side:3,grid:zt,ticks:Tt,border:Pt,font:At,rotate:0};function Vt(e,t){return ye((3+2*(e||1))*t,3)}const Jt={scale:null,auto:!0,sorted:0,min:ce,max:-ce},qt={show:!0,auto:!0,sorted:0,alpha:1,facets:[Fe({},Jt,{scale:"x"}),Fe({},Jt,{scale:"y"})]},Kt={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:(e,t,l,n,i)=>i,alpha:1,points:{show:function(e,t){let{scale:l,idxs:n}=e.series[0],i=e._data[0],o=e.valToPos(i[n[0]],l,!0),s=e.valToPos(i[n[1]],l,!0);return ee(s-o)/(e.series[t].points.space*b)>=n[1]-n[0]},filter:null},values:null,min:ce,max:-ce,idxs:[],path:null,clip:null};function Zt(e,t,l){return l/10}const $t={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Xt=Fe({},$t,{time:!1,ori:1}),Qt={};function el(e){let t=Qt[e];return t||(t={key:e,plots:[],sub(e){t.plots.push(e)},unsub(e){t.plots=t.plots.filter((t=>t!=e))},pub(e,l,n,i,o,s,r){for(let u=0;t.plots.length>u;u++)t.plots[u]!=l&&t.plots[u].pub(e,l,n,i,o,s,r)}},null!=e&&(Qt[e]=t)),t}function tl(e,t,l){const n=e.series[t],i=e.scales,o=e.bbox;let s=e._data[0],r=e._data[t],u=2==e.mode?i[n.facets[0].scale]:i[e.series[0].scale],a=2==e.mode?i[n.facets[1].scale]:i[n.scale],f=o.left,c=o.top,h=o.width,d=o.height,p=e.valToPosH,m=e.valToPosV;return 0==u.ori?l(n,s,r,u,a,p,m,f,c,h,d,al,cl,dl,ml,xl):l(n,s,r,u,a,m,p,c,f,d,h,fl,hl,pl,gl,wl)}function ll(e,t){let l=0,n=0,i=q(e.bands,ze);for(let e=0;i.length>e;e++){let o=i[e];o.series[0]==t?l=o.dir:o.series[1]==t&&(n|=1==o.dir?1:2)}return[l,1==n?-1:2==n?1:3==n?2:0]}function nl(e,t,l,n,i){let o=e.scales[e.series[t].scale];return-1==i?o.min:1==i?o.max:3==o.distr?1==o.dir?o.min:o.max:0}function il(e,t,l,n,i,o){return tl(e,t,((e,t,s,r,u,a,f,c,h,d,p)=>{let m=e.pxRound;const g=0==r.ori?cl:hl;let x,w;1==r.dir*(0==r.ori?1:-1)?(x=l,w=n):(x=n,w=l);let _=m(a(t[x],r,d,c)),k=m(f(s[x],u,p,h)),b=m(a(t[w],r,d,c)),v=m(f(1==o?u.max:u.min,u,p,h)),y=new Path2D(i);return g(y,b,v),g(y,_,v),g(y,_,k),y}))}function ol(e,t,l,n,i,o){let s=null;if(e.length>0){s=new Path2D;const r=0==t?dl:pl;let u=l;for(let t=0;e.length>t;t++){let l=e[t];if(l[1]>l[0]){let e=l[0]-u;e>0&&r(s,u,n,e,n+o),u=l[1]}}let a=l+i-u;a>0&&r(s,u,n,a,n+o)}return s}function sl(e,t,l,n,i,o,s){let r=[];for(let u=1==i?l:n;u>=l&&n>=u;u+=i)if(null===t[u]){let a=u,f=u;if(1==i)for(;++u<=n&&null===t[u];)f=u;else for(;--u>=l&&null===t[u];)f=u;let c=o(e[a]),h=f==a?c:o(e[f]);c=s>0?c:o(e[a-i]),h=0>s?h:o(e[f+i]),c>h||r.push([c,h])}return r}function rl(e){return 0==e?ge:1==e?le:t=>de(t,e)}function ul(e){let t=0==e?al:fl,l=0==e?(e,t,l,n,i,o)=>{e.arcTo(t,l,n,i,o)}:(e,t,l,n,i,o)=>{e.arcTo(l,t,i,n,o)},n=0==e?(e,t,l,n,i)=>{e.rect(t,l,n,i)}:(e,t,l,n,i)=>{e.rect(l,t,i,n)};return(e,i,o,s,r,u=0)=>{0==u?n(e,i,o,s,r):(u=ie(u,s/2,r/2),t(e,i+u,o),l(e,i+s,o,i+s,o+r,u),l(e,i+s,o+r,i,o+r,u),l(e,i,o+r,i,o,u),l(e,i,o,i+s,o,u),e.closePath())}}const al=(e,t,l)=>{e.moveTo(t,l)},fl=(e,t,l)=>{e.moveTo(l,t)},cl=(e,t,l)=>{e.lineTo(t,l)},hl=(e,t,l)=>{e.lineTo(l,t)},dl=ul(0),pl=ul(1),ml=(e,t,l,n,i,o)=>{e.arc(t,l,n,i,o)},gl=(e,t,l,n,i,o)=>{e.arc(l,t,n,i,o)},xl=(e,t,l,n,i,o,s)=>{e.bezierCurveTo(t,l,n,i,o,s)},wl=(e,t,l,n,i,o,s)=>{e.bezierCurveTo(l,t,i,n,s,o)};function _l(){return(e,t,l,n,i)=>tl(e,t,((t,o,s,r,u,a,f,c,h,d,p)=>{let m,g,{pxRound:x,points:w}=t;0==r.ori?(m=al,g=ml):(m=fl,g=gl);const _=ye(w.width*b,3);let k=(w.size-w.width)/2*b,v=ye(2*k,3),y=new Path2D,M=new Path2D,{left:S,top:E,width:D,height:z}=e.bbox;dl(M,S-v,E-v,D+2*v,z+2*v);const T=e=>{if(null!=s[e]){let t=x(a(o[e],r,d,c)),l=x(f(s[e],u,p,h));m(y,t+k,l),g(y,t,l,k,0,2*Q)}};if(i)i.forEach(T);else for(let e=l;n>=e;e++)T(e);return{stroke:_>0?y:null,fill:y,clip:M,flags:3}}))}function kl(e){return(t,l,n,i,o,s)=>{n!=i&&(o!=n&&s!=n&&e(t,l,n),o!=i&&s!=i&&e(t,l,i),e(t,l,s))}}const bl=kl(cl),vl=kl(hl);function yl(e){const t=q(e?.alignGaps,0);return(e,l,n,i)=>tl(e,l,((o,s,r,u,a,f,c,h,d,p,m)=>{let g,x,w=o.pxRound,_=e=>w(f(e,u,p,h)),k=e=>w(c(e,a,m,d));0==u.ori?(g=cl,x=bl):(g=hl,x=vl);const b=u.dir*(0==u.ori?1:-1),v={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},y=v.stroke;let M,S,E,D=ce,z=-ce,T=_(s[1==b?n:i]),P=L(r,n,i,1*b),A=L(r,n,i,-1*b),W=_(s[P]),Y=_(s[A]);for(let e=1==b?n:i;e>=n&&i>=e;e+=b){let t=_(s[e]);t==T?null!=r[e]&&(S=k(r[e]),D==ce&&(g(y,t,S),M=S),D=ie(S,D),z=oe(S,z)):(D!=ce&&(x(y,T,D,z,M,S),E=T),null!=r[e]?(S=k(r[e]),g(y,t,S),D=z=M=S):(D=ce,z=-ce),T=t)}D!=ce&&D!=z&&E!=T&&x(y,T,D,z,M,S);let[C,F]=ll(e,l);if(null!=o.fill||0!=C){let t=v.fill=new Path2D(y),n=k(o.fillTo(e,l,o.min,o.max,C));g(t,Y,n),g(t,W,n)}if(!o.spanGaps){let a=[];a.push(...sl(s,r,n,i,b,_,t)),v.gaps=a=o.gaps(e,l,n,i,a),v.clip=ol(a,u.ori,h,d,p,m)}return 0!=F&&(v.band=2==F?[il(e,l,n,i,y,-1),il(e,l,n,i,y,1)]:il(e,l,n,i,y,F)),v}))}function Ml(e,t,l,n,i){const o=e.length;if(2>o)return null;const s=new Path2D;if(l(s,e[0],t[0]),2==o)n(s,e[1],t[1]);else{let l=Array(o),n=Array(o-1),r=Array(o-1),u=Array(o-1);for(let l=0;o-1>l;l++)r[l]=t[l+1]-t[l],u[l]=e[l+1]-e[l],n[l]=r[l]/u[l];l[0]=n[0];for(let e=1;o-1>e;e++)0===n[e]||0===n[e-1]||n[e-1]>0!=n[e]>0?l[e]=0:(l[e]=3*(u[e-1]+u[e])/((2*u[e]+u[e-1])/n[e-1]+(u[e]+2*u[e-1])/n[e]),isFinite(l[e])||(l[e]=0));l[o-1]=n[o-2];for(let n=0;o-1>n;n++)i(s,e[n]+u[n]/3,t[n]+l[n]*u[n]/3,e[n+1]-u[n]/3,t[n+1]-l[n+1]*u[n]/3,e[n+1],t[n+1])}return s}const Sl=new Set;function El(){Sl.forEach((e=>{e.syncRect(!0)}))}x&&(H("resize",_,El),H("scroll",_,El,!0),H(g,_,(()=>{Ol.pxRatio=b})));const Dl=yl(),zl=_l();function Tl(e,t,l,n){return(n?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map(((e,n)=>Pl(e,n,t,l)))}function Pl(e,t,l,n){return Fe({},0==t?l:n,e)}function Al(e,t,l){return null==t?Te:[t,l]}const Wl=Al;function Yl(e,t,l){return null==t?Te:J(t,l,.1,!0)}function Cl(e,t,l,n){return null==t?Te:N(t,l,e.scales[n].log,!1)}const Fl=Cl;function Hl(e,t,l,n){return null==t?Te:j(t,l,e.scales[n].log,!1)}const Rl=Hl;function Gl(e,t,l,n,i){let o=oe(he(e),he(t)),s=t-e,r=G(i/n*s,l);do{let e=l[r],t=n*e/s;if(t>=i&&17>=o+(5>e?Me.get(e):0))return[e,t]}while(++r(t=le((l=+n)*b))+"px")),t,l]}function Il(e){e.show&&[e.font,e.labelFont].forEach((e=>{let t=ye(e[2]*b,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t}))}function Ol(u,m,x){const k={mode:q(u.mode,1)},v=k.mode;function z(e,t){return((3==t.distr?ue(e>0?e:t.clamp(k,e,t.min,t.max,t.key)):4==t.distr?fe(e,t.asinh):e)-t._min)/(t._max-t._min)}function P(e,t,l,n){let i=z(e,t);return n+l*(-1==t.dir?1-i:i)}function W(e,t,l,n){let i=z(e,t);return n+l*(-1==t.dir?i:1-i)}function C(e,t,l,n){return 0==t.ori?P(e,t,l,n):W(e,t,l,n)}k.valToPosH=P,k.valToPosV=W;let F=!1;k.status=0;const L=k.root=D("uplot");null!=u.id&&(L.id=u.id),y(L,u.class),u.title&&(D("u-title",L).textContent=u.title);const I=E("canvas"),O=k.ctx=I.getContext("2d"),U=D("u-wrap",L),V=k.under=D("u-under",U);U.appendChild(I);const K=k.over=D("u-over",U),Z=+q((u=Ce(u)).pxAlign,1),$=rl(Z);(u.plugins||[]).forEach((e=>{e.opts&&(u=e.opts(k,u)||u)}));const te=u.ms||.001,re=k.series=1==v?Tl(u.series||[],Ct,Kt,!1):function(e,t){return e.map(((e,l)=>0==l?null:Fe({},t,e)))}(u.series||[null],qt),ae=k.axes=Tl(u.axes||[],Yt,Ut,!0),he=k.scales={},ge=k.bands=u.bands||[];ge.forEach((e=>{e.fill=me(e.fill||null),e.dir=q(e.dir,-1)}));const ve=2==v?re[1].facets[0].scale:re[0].scale,Me={axes:function(){for(let e=0;ae.length>e;e++){let t=ae[e];if(!t.show||!t._show)continue;let l,n,u=t.side,a=u%2,f=t.stroke(k,e),c=0==u||3==u?-1:1;if(t.label){let e=le((t._lpos+t.labelGap*c)*b);ql(t.labelFont[0],f,"center",2==u?i:o),O.save(),1==a?(l=n=0,O.translate(e,le(At+Lt/2)),O.rotate((3==u?-Q:Q)/2)):(l=le(Pt+Wt/2),n=e),O.fillText(t.label,l,n),O.restore()}let[h,d]=t._found;if(0==d)continue;let p=he[t.scale],m=0==a?Wt:Lt,g=0==a?Pt:At,x=le(t.gap*b),w=t._splits,_=2==p.distr?w.map((e=>jl[e])):w,v=2==p.distr?jl[w[1]]-jl[w[0]]:h,y=t.ticks,M=t.border,S=y.show?le(y.size*b):0,E=t._rotate*-Q/180,D=$(t._pos*b),z=D+(S+x)*c;n=0==a?z:0,l=1==a?z:0,ql(t.font[0],f,1==t.align?s:2==t.align?r:E>0?s:0>E?r:0==a?"center":3==u?r:s,E||1==a?"middle":2==u?i:o);let T=1.5*t.font[1],P=w.map((e=>$(C(e,p,m,g)))),A=t._values;for(let e=0;A.length>e;e++){let t=A[e];if(null!=t){0==a?l=P[e]:n=P[e],t=""+t;let i=-1==t.indexOf("\n")?[t]:t.split(/\n/gm);for(let e=0;i.length>e;e++){let t=i[e];E?(O.save(),O.translate(l,n+e*T),O.rotate(E),O.fillText(t,0,0),O.restore()):O.fillText(t,l,n+e*T)}}}y.show&&tn(P,y.filter(k,_,e,d,v),a,u,D,S,ye(y.width*b,3),y.stroke(k,e),y.dash,y.cap);let W=t.grid;W.show&&tn(P,W.filter(k,_,e,d,v),a,0==a?2:1,0==a?At:Pt,0==a?Lt:Wt,ye(W.width*b,3),W.stroke(k,e),W.dash,W.cap),M.show&&tn([D],[1],0==a?1:0,0==a?1:2,1==a?At:Pt,1==a?Lt:Wt,ye(M.width*b,3),M.stroke(k,e),M.dash,M.cap)}ti("drawAxes")},series:function(){pl>0&&(re.forEach(((e,t)=>{if(t>0&&e.show&&null==e._paths){let l=function(e){let t=pe(ml-1,0,pl-1),l=pe(gl+1,0,pl-1);for(;null==e[t]&&t>0;)t--;for(;null==e[l]&&pl-1>l;)l++;return[t,l]}(m[t]);e._paths=e.paths(k,t,l[0],l[1])}})),re.forEach(((e,t)=>{if(t>0&&e.show){Nl!=e.alpha&&(O.globalAlpha=Nl=e.alpha),Zl(t,!1),e._paths&&$l(t,!1);{Zl(t,!0);let l=e.points.show(k,t,ml,gl),n=e.points.filter(k,t,l,e._paths?e._paths.gaps:null);(l||n)&&(e.points._paths=e.points.paths(k,t,ml,gl,n),$l(t,!0))}1!=Nl&&(O.globalAlpha=Nl=1),ti("drawSeries",t)}})))}},Se=(u.drawOrder||["axes","series"]).map((e=>Me[e]));function Ee(e){let t=he[e];if(null==t){let l=(u.scales||De)[e]||De;if(null!=l.from)Ee(l.from),he[e]=Fe({},he[l.from],l,{key:e});else{t=he[e]=Fe({},e==ve?$t:Xt,l),t.key=e;let n=t.time,i=t.range,o=Pe(i);if((e!=ve||2==v&&!n)&&(!o||null!=i[0]&&null!=i[1]||(i={min:null==i[0]?B:{mode:1,hard:i[0],soft:i[0]},max:null==i[1]?B:{mode:1,hard:i[1],soft:i[1]}},o=!1),!o&&We(i))){let e=i;i=(t,l,n)=>null==l?Te:J(l,n,e)}t.range=me(i||(n?Wl:e==ve?3==t.distr?Fl:4==t.distr?Rl:Al:3==t.distr?Cl:4==t.distr?Hl:Yl)),t.auto=me(!o&&t.auto),t.clamp=me(t.clamp||Zt),t._min=t._max=null}}}Ee("x"),Ee("y"),1==v&&re.forEach((e=>{Ee(e.scale)})),ae.forEach((e=>{Ee(e.scale)}));for(let e in u.scales)Ee(e);const He=he[ve],Ge=He.distr;let Le,Ie;0==He.ori?(y(L,"u-hz"),Le=P,Ie=W):(y(L,"u-vt"),Le=W,Ie=P);const Oe={};for(let e in he){let t=he[e];null==t.min&&null==t.max||(Oe[e]={min:t.min,max:t.max},t.min=t.max=null)}const Ne=u.tzDate||(e=>new Date(le(e/te))),je=u.fmtDate||Ve,Be=1==te?dt(Ne):gt(Ne),Ue=wt(Ne,xt(1==te?ht:mt,je)),Je=bt(Ne,kt("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",je)),qe=[],Ke=k.legend=Fe({},vt,u.legend),Ze=Ke.show,$e=Ke.markers;let et;Ke.idxs=qe,$e.width=me($e.width),$e.dash=me($e.dash),$e.stroke=me($e.stroke),$e.fill=me($e.fill);let tt,lt=[],nt=[],it=!1,ot={};if(Ke.live){const e=re[1]?re[1].values:null;it=null!=e,tt=it?e(k,1,0):{_:0};for(let e in tt)ot[e]="--"}if(Ze)if(et=E("table","u-legend",L),it){let e=E("tr","u-thead",et);for(var st in E("th",null,e),tt)E("th",t,e).textContent=st}else y(et,"u-inline"),Ke.live&&y(et,"u-live");const rt={show:!0},ut={show:!1},at=new Map;function ft(e,t,l){const n=at.get(t)||{},i=il.bind[e](k,t,l);i&&(H(e,t,n[e]=i),at.set(t,n))}function _t(e,t){const l=at.get(t)||{};for(let n in l)null!=e&&n!=e||(R(n,t,l[n]),delete l[n]);null==e&&at.delete(t)}let yt=0,Mt=0,St=0,Dt=0,zt=0,Tt=0,Pt=0,At=0,Wt=0,Lt=0;k.bbox={};let It=!1,Ot=!1,Nt=!1,Jt=!1,Qt=!1;function tl(e,t,l){(l||e!=k.width||t!=k.height)&&ll(e,t),on(!1),Nt=!0,Ot=!0,Jt=Qt=il.left>=0,_n()}function ll(e,t){k.width=yt=St=e,k.height=Mt=Dt=t,zt=Tt=0,function(){let e=!1,t=!1,l=!1,n=!1;ae.forEach((i=>{if(i.show&&i._show){let{side:o,_size:s}=i,r=o%2,u=s+(null!=i.label?i.labelSize:0);u>0&&(r?(St-=u,3==o?(zt+=u,n=!0):l=!0):(Dt-=u,0==o?(Tt+=u,e=!0):t=!0))}})),fl[0]=e,fl[1]=l,fl[2]=t,fl[3]=n,St-=dl[1]+dl[3],zt+=dl[3],Dt-=dl[2]+dl[0],Tt+=dl[0]}(),function(){let e=zt+St,t=Tt+Dt,l=zt,n=Tt;function i(i,o){switch(i){case 1:return e+=o,e-o;case 2:return t+=o,t-o;case 3:return l-=o,l+o;case 0:return n-=o,n+o}}ae.forEach((e=>{if(e.show&&e._show){let t=e.side;e._pos=i(t,e._size),null!=e.label&&(e._lpos=i(t,e.labelSize))}}))}();let l=k.bbox;Pt=l.left=de(zt*b,.5),At=l.top=de(Tt*b,.5),Wt=l.width=de(St*b,.5),Lt=l.height=de(Dt*b,.5)}k.setSize=function({width:e,height:t}){tl(e,t)};const il=k.cursor=Fe({},Et,{drag:{y:2==v}},u.cursor);{il.idxs=qe,il._lock=!1;let e=il.points;e.show=me(e.show),e.size=me(e.size),e.stroke=me(e.stroke),e.width=me(e.width),e.fill=me(e.fill)}const ol=k.focus=Fe({},u.focus||{alpha:.3},il.focus),sl=ol.prox>=0;let ul=[null];function al(l,n){if(1==v||n>0){let e=1==v&&he[l.scale].time,t=l.value;l.value=e?Ae(t)?bt(Ne,kt(t,je)):t||Je:t||Bt,l.label=l.label||(e?"Time":"Value")}if(n>0){l.width=null==l.width?1:l.width,l.paths=l.paths||Dl||we,l.fillTo=me(l.fillTo||nl),l.pxAlign=+q(l.pxAlign,Z),l.pxRound=rl(l.pxAlign),l.stroke=me(l.stroke||null),l.fill=me(l.fill||null),l._stroke=l._fill=l._paths=l._focus=null;let e=Vt(l.width,1),t=l.points=Fe({},{size:e,width:oe(1,.2*e),stroke:l.stroke,space:2*e,paths:zl,_stroke:null,_fill:null},l.points);t.show=me(t.show),t.filter=me(t.filter),t.fill=me(t.fill),t.stroke=me(t.stroke),t.paths=me(t.paths),t.pxAlign=l.pxAlign}if(Ze){let i=function(l,n){if(0==n&&(it||!Ke.live||2==v))return Te;let i=[],o=E("tr","u-series",et,et.childNodes[n]);y(o,l.class),l.show||y(o,e);let s=E("th",null,o);if($e.show){let e=D("u-marker",s);if(n>0){let t=$e.width(k,n);t&&(e.style.border=t+"px "+$e.dash(k,n)+" "+$e.stroke(k,n)),e.style.background=$e.fill(k,n)}}let r=D(t,s);for(var u in r.textContent=l.label,n>0&&($e.show||(r.style.color=l.width>0?$e.stroke(k,n):$e.fill(k,n)),ft("click",s,(e=>{if(il._lock)return;let t=re.indexOf(l);if((e.ctrlKey||e.metaKey)!=Ke.isolate){let e=re.some(((e,l)=>l>0&&l!=t&&e.show));re.forEach(((l,n)=>{n>0&&Pn(n,e?n==t?rt:ut:rt,!0,li.setSeries)}))}else Pn(t,{show:!l.show},!0,li.setSeries)})),sl&&ft(h,s,(()=>{il._lock||Pn(re.indexOf(l),Cn,!0,li.setSeries)}))),tt){let e=E("td","u-value",o);e.textContent="--",i.push(e)}return[o,i]}(l,n);lt.splice(n,0,i[0]),nt.splice(n,0,i[1]),Ke.values.push(null)}if(il.show){qe.splice(n,0,null);let e=function(e,t){if(t>0){let l=il.points.show(k,t);if(l)return y(l,"u-cursor-pt"),y(l,e.class),T(l,-10,-10,St,Dt),K.insertBefore(l,ul[t]),l}}(l,n);e&&ul.splice(n,0,e)}ti("addSeries",n)}k.addSeries=function(e,t){e=Pl(e,t=null==t?re.length:t,Ct,Kt),re.splice(t,0,e),al(re[t],t)},k.delSeries=function(e){if(re.splice(e,1),Ze){Ke.values.splice(e,1),nt.splice(e,1);let t=lt.splice(e,1)[0];_t(null,t.firstChild),t.remove()}il.show&&(qe.splice(e,1),ul.length>1&&ul.splice(e,1)[0].remove()),ti("delSeries",e)};const fl=[!1,!1,!1,!1];function cl(e,t,l){let[n,i,o,s]=l,r=t%2,u=0;return 0==r&&(s||i)&&(u=0==t&&!n||2==t&&!o?le(Yt.size/3):0),1==r&&(n||o)&&(u=1==t&&!i||3==t&&!s?le(Ut.size/2):0),u}const hl=k.padding=(u.padding||[cl,cl,cl,cl]).map((e=>me(q(e,cl)))),dl=k._padding=hl.map(((e,t)=>e(k,t,fl,0)));let pl,ml=null,gl=null;const xl=1==v?re[0].idxs:null;let wl,_l,kl,bl,vl,yl,Ml,El,Ol,Nl,jl=null,Bl=!1;function Ul(e,t){if(m=null==e?[]:Ce(e,Ye),2==v){pl=0;for(let e=1;re.length>e;e++)pl+=m[e][0].length;k.data=m=e}else if(null==m[0]&&(m[0]=[]),k.data=m.slice(),jl=m[0],pl=jl.length,2==Ge){m[0]=Array(pl);for(let e=0;pl>e;e++)m[0][e]=e}if(k._data=m,on(!0),ti("setData"),!1!==t){let e=He;e.auto(k,Bl)?Vl():Tn(ve,e.min,e.max),Jt=il.left>=0,Qt=!0,_n()}}function Vl(){let e,t;Bl=!0,1==v&&(pl>0?(ml=xl[0]=0,gl=xl[1]=pl-1,e=m[0][ml],t=m[0][gl],2==Ge?(e=ml,t=gl):1==pl&&(3==Ge?[e,t]=N(e,e,He.log,!1):4==Ge?[e,t]=j(e,e,He.log,!1):He.time?t=e+le(86400/te):[e,t]=J(e,t,.1,!0))):(ml=xl[0]=e=null,gl=xl[1]=t=null)),Tn(ve,e,t)}function Jl(e="#0000",t,l=ze,n="butt",i="#0000",o="round"){e!=wl&&(O.strokeStyle=wl=e),i!=_l&&(O.fillStyle=_l=i),t!=kl&&(O.lineWidth=kl=t),o!=vl&&(O.lineJoin=vl=o),n!=yl&&(O.lineCap=yl=n),l!=bl&&O.setLineDash(bl=l)}function ql(e,t,l,n){t!=_l&&(O.fillStyle=_l=t),e!=Ml&&(O.font=Ml=e),l!=El&&(O.textAlign=El=l),n!=Ol&&(O.textBaseline=Ol=n)}function Kl(e,t,l,n,i=0){if(n.length>0&&e.auto(k,Bl)&&(null==t||null==t.min)){let t=q(ml,0),o=q(gl,n.length-1),s=null==l.min?3==e.distr?function(e,t,l){let n=ce,i=-ce;for(let o=t;l>=o;o++)e[o]>0&&(n=ie(n,e[o]),i=oe(i,e[o]));return[n==ce?1:n,i==-ce?10:i]}(n,t,o):function(e,t,l,n){let i=ce,o=-ce;if(1==n)i=e[t],o=e[l];else if(-1==n)i=e[l],o=e[t];else for(let n=t;l>=n;n++)null!=e[n]&&(i=ie(i,e[n]),o=oe(o,e[n]));return[i,o]}(n,t,o,i):[l.min,l.max];e.min=ie(e.min,l.min=s[0]),e.max=oe(e.max,l.max=s[1])}}function Zl(e,t){let l=t?re[e].points:re[e];l._stroke=l.stroke(k,e),l._fill=l.fill(k,e)}function $l(e,t){let l=t?re[e].points:re[e],n=l._stroke,i=l._fill,{stroke:o,fill:s,clip:r,flags:u}=l._paths,a=null,f=ye(l.width*b,3),c=f%2/2;t&&null==i&&(i=f>0?"#fff":n);let h=1==l.pxAlign;if(h&&O.translate(c,c),!t){let e=Pt,t=At,n=Wt,i=Lt,o=f*b/2;0==l.min&&(i+=o),0==l.max&&(t-=o,i+=o),a=new Path2D,a.rect(e,t,n,i)}t?Xl(n,f,l.dash,l.cap,i,o,s,u,r):function(e,t,l,n,i,o,s,r,u,a,f){let c=!1;ge.forEach(((h,d)=>{if(h.series[0]==e){let e,p=re[h.series[1]],g=m[h.series[1]],x=(p._paths||De).band;Pe(x)&&(x=1==h.dir?x[0]:x[1]);let w=null;p.show&&x&&function(e,t,l){for(t=q(t,0),l=q(l,e.length-1);l>=t;){if(null!=e[t])return!0;t++}return!1}(g,ml,gl)?(w=h.fill(k,d)||o,e=p._paths.clip):x=null,Xl(t,l,n,i,w,s,r,u,a,f,e,x),c=!0}})),c||Xl(t,l,n,i,o,s,r,u,a,f)}(e,n,f,l.dash,l.cap,i,o,s,u,a,r),h&&O.translate(-c,-c)}function Xl(e,t,l,n,i,o,s,r,u,a,f,c){Jl(e,t,l,n,i),(u||a||c)&&(O.save(),u&&O.clip(u),a&&O.clip(a)),c?3==(3&r)?(O.clip(c),f&&O.clip(f),en(i,s),Ql(e,o,t)):2&r?(en(i,s),O.clip(c),Ql(e,o,t)):1&r&&(O.save(),O.clip(c),f&&O.clip(f),en(i,s),O.restore(),Ql(e,o,t)):(en(i,s),Ql(e,o,t)),(u||a||c)&&O.restore()}function Ql(e,t,l){l>0&&(t instanceof Map?t.forEach(((e,t)=>{O.strokeStyle=wl=t,O.stroke(e)})):null!=t&&e&&O.stroke(t))}function en(e,t){t instanceof Map?t.forEach(((e,t)=>{O.fillStyle=_l=t,O.fill(e)})):null!=t&&e&&O.fill(t)}function tn(e,t,l,n,i,o,s,r,u,a){let f=s%2/2;1==Z&&O.translate(f,f),Jl(r,s,u,a,r),O.beginPath();let c,h,d,p,m=i+(0==n||3==n?-o:o);0==l?(h=i,p=m):(c=i,d=m);for(let n=0;e.length>n;n++)null!=t[n]&&(0==l?c=d=e[n]:h=p=e[n],O.moveTo(c,h),O.lineTo(d,p));O.stroke(),1==Z&&O.translate(-f,-f)}function ln(e){let t=!0;return ae.forEach(((l,n)=>{if(!l.show)return;let i=he[l.scale];if(null==i.min)return void(l._show&&(t=!1,l._show=!1,on(!1)));l._show||(t=!1,l._show=!0,on(!1));let o=l.side,s=o%2,{min:r,max:u}=i,[a,f]=function(e,t,l,n){let i,o=ae[e];if(n>0){let s=o._space=o.space(k,e,t,l,n);i=Gl(t,l,o._incrs=o.incrs(k,e,t,l,n,s),n,s)}else i=[0,0];return o._found=i}(n,r,u,0==s?St:Dt);if(0==f)return;let c=l._splits=l.splits(k,n,r,u,a,f,2==i.distr),h=2==i.distr?c.map((e=>jl[e])):c,d=2==i.distr?jl[c[1]]-jl[c[0]]:a,p=l._values=l.values(k,l.filter(k,h,n,f,d),n,f,d);l._rotate=2==o?l.rotate(k,p,n,f):0;let m=l._size;l._size=ne(l.size(k,p,n,e)),null!=m&&l._size!=m&&(t=!1)})),t}function nn(e){let t=!0;return hl.forEach(((l,n)=>{let i=l(k,n,fl,e);i!=dl[n]&&(t=!1),dl[n]=i})),t}function on(e){re.forEach(((t,l)=>{l>0&&(t._paths=null,e&&(1==v?(t.min=null,t.max=null):t.facets.forEach((e=>{e.min=null,e.max=null}))))}))}k.setData=Ul;let sn,rn,un,an,fn,cn,hn,dn,pn,mn,gn,xn,wn=!1;function _n(){wn||(Re(kn),wn=!0)}function kn(){It&&(function(){let e=Ce(he,Ye);for(let t in e){let l=e[t],n=Oe[t];if(null!=n&&null!=n.min)Fe(l,n),t==ve&&on(!0);else if(t!=ve||2==v)if(0==pl&&null==l.from){let e=l.range(k,null,null,t);l.min=e[0],l.max=e[1]}else l.min=ce,l.max=-ce}if(pl>0){re.forEach(((t,l)=>{if(1==v){let n=t.scale,i=e[n],o=Oe[n];if(0==l){let e=i.range(k,i.min,i.max,n);i.min=e[0],i.max=e[1],ml=G(i.min,m[0]),gl=G(i.max,m[0]),i.min>m[0][ml]&&ml++,m[0][gl]>i.max&&gl--,t.min=jl[ml],t.max=jl[gl]}else t.show&&t.auto&&Kl(i,o,t,m[l],t.sorted);t.idxs[0]=ml,t.idxs[1]=gl}else if(l>0&&t.show&&t.auto){let[n,i]=t.facets,o=n.scale,s=i.scale,[r,u]=m[l];Kl(e[o],Oe[o],n,r,n.sorted),Kl(e[s],Oe[s],i,u,i.sorted),t.min=i.min,t.max=i.max}}));for(let t in e){let l=e[t],n=Oe[t];if(null==l.from&&(null==n||null==n.min)){let e=l.range(k,l.min==ce?null:l.min,l.max==-ce?null:l.max,t);l.min=e[0],l.max=e[1]}}}for(let t in e){let l=e[t];if(null!=l.from){let n=e[l.from];if(null==n.min)l.min=l.max=null;else{let e=l.range(k,n.min,n.max,t);l.min=e[0],l.max=e[1]}}}let t={},l=!1;for(let n in e){let i=e[n],o=he[n];if(o.min!=i.min||o.max!=i.max){o.min=i.min,o.max=i.max;let e=o.distr;o._min=3==e?ue(o.min):4==e?fe(o.min,o.asinh):o.min,o._max=3==e?ue(o.max):4==e?fe(o.max,o.asinh):o.max,t[n]=l=!0}}if(l){re.forEach(((e,l)=>{2==v?l>0&&t.y&&(e._paths=null):t[e.scale]&&(e._paths=null)}));for(let e in t)Nt=!0,ti("setScale",e);il.show&&(Jt=Qt=il.left>=0)}for(let e in Oe)Oe[e]=null}(),It=!1),Nt&&(function(){let e=!1,t=0;for(;!e;){t++;let l=ln(t),n=nn(t);e=3==t||l&&n,e||(ll(k.width,k.height),Ot=!0)}}(),Nt=!1),Ot&&(S(V,s,zt),S(V,i,Tt),S(V,l,St),S(V,n,Dt),S(K,s,zt),S(K,i,Tt),S(K,l,St),S(K,n,Dt),S(U,l,yt),S(U,n,Mt),I.width=le(yt*b),I.height=le(Mt*b),ae.forEach((({_el:t,_show:l,_size:n,_pos:i,side:o})=>{if(null!=t)if(l){let l=o%2==1;S(t,l?"left":"top",i-(3===o||0===o?n:0)),S(t,l?"width":"height",n),S(t,l?"top":"left",l?Tt:zt),S(t,l?"height":"width",l?Dt:St),M(t,e)}else y(t,e)})),wl=_l=kl=vl=yl=Ml=El=Ol=bl=null,Nl=1,Bn(!0),ti("setSize"),Ot=!1),yt>0&&Mt>0&&(O.clearRect(0,0,I.width,I.height),ti("drawClear"),Se.forEach((e=>e())),ti("draw")),il.show&&Jt&&(Nn(null,!0,!1),Jt=!1),F||(F=!0,k.status=1,ti("ready")),Bl=!1,wn=!1}function bn(e,t){let l=he[e];if(null==l.from){if(0==pl){let n=l.range(k,t.min,t.max,e);t.min=n[0],t.max=n[1]}if(t.min>t.max){let e=t.min;t.min=t.max,t.max=e}if(pl>1&&null!=t.min&&null!=t.max&&1e-16>t.max-t.min)return;e==ve&&2==l.distr&&pl>0&&(t.min=G(t.min,m[0]),t.max=G(t.max,m[0]),t.min==t.max&&t.max++),Oe[e]=t,It=!0,_n()}}k.redraw=(e,t)=>{Nt=t||!1,!1!==e?Tn(ve,He.min,He.max):_n()},k.setScale=bn;let vn=!1;const yn=il.drag;let Mn=yn.x,Sn=yn.y;il.show&&(il.x&&(sn=D("u-cursor-x",K)),il.y&&(rn=D("u-cursor-y",K)),0==He.ori?(un=sn,an=rn):(un=rn,an=sn),gn=il.left,xn=il.top);const En=k.select=Fe({show:!0,over:!0,left:0,width:0,top:0,height:0},u.select),Dn=En.show?D("u-select",En.over?K:V):null;function zn(e,t){if(En.show){for(let t in e)S(Dn,t,En[t]=e[t]);!1!==t&&ti("setSelect")}}function Tn(e,t,l){bn(e,{min:t,max:l})}function Pn(t,l,n,i){null!=l.focus&&function(e){if(e!=Yn){let t=null==e,l=1!=ol.alpha;re.forEach(((n,i)=>{let o=t||0==i||i==e;n._focus=t?null:o,l&&function(e,t){re[e].alpha=t,il.show&&ul[e]&&(ul[e].style.opacity=t),Ze&<[e]&&(lt[e].style.opacity=t)}(i,o?1:ol.alpha)})),Yn=e,l&&_n()}}(t),null!=l.show&&re.forEach(((n,i)=>{0>=i||t!=i&&null!=t||(n.show=l.show,function(t){let l=Ze?lt[t]:null;re[t].show?l&&M(l,e):(l&&y(l,e),ul.length>1&&T(ul[t],-10,-10,St,Dt))}(i),Tn(2==v?n.facets[1].scale:n.scale,null,null),_n())})),!1!==n&&ti("setSeries",t,l),i&&oi("setSeries",k,t,l)}let An,Wn,Yn;k.setSelect=zn,k.setSeries=Pn,k.addBand=function(e,t){e.fill=me(e.fill||null),e.dir=q(e.dir,-1),ge.splice(t=null==t?ge.length:t,0,e)},k.setBand=function(e,t){Fe(ge[e],t)},k.delBand=function(e){null==e?ge.length=0:ge.splice(e,1)};const Cn={focus:!0};function Fn(e,t,l){let n=he[t];l&&(e=e/b-(1==n.ori?Tt:zt));let i=St;1==n.ori&&(i=Dt,e=i-e),-1==n.dir&&(e=i-e);let o=n._min,s=o+e/i*(n._max-o),r=n.distr;return 3==r?se(10,s):4==r?((e,t=1)=>X.sinh(e)*t)(s,n.asinh):s}function Hn(e,t){S(Dn,s,En.left=e),S(Dn,l,En.width=t)}function Rn(e,t){S(Dn,i,En.top=e),S(Dn,n,En.height=t)}Ze&&sl&&H(d,et,(()=>{il._lock||null!=Yn&&Pn(null,Cn,!0,li.setSeries)})),k.valToIdx=e=>G(e,m[0]),k.posToIdx=function(e,t){return G(Fn(e,ve,t),m[0],ml,gl)},k.posToVal=Fn,k.valToPos=(e,t,l)=>0==he[t].ori?P(e,he[t],l?Wt:St,l?Pt:0):W(e,he[t],l?Lt:Dt,l?At:0),k.batch=function(e){e(k),_n()},k.setCursor=(e,t,l)=>{gn=e.left,xn=e.top,Nn(null,t,l)};let Gn=0==He.ori?Hn:Rn,Ln=1==He.ori?Hn:Rn;function In(e,t){if(null!=e){let t=e.idx;Ke.idx=t,re.forEach(((e,l)=>{(l>0||!it)&&On(l,t)}))}Ze&&Ke.live&&function(){if(Ze&&Ke.live)for(let e=2==v?1:0;re.length>e;e++){if(0==e&&it)continue;let t=Ke.values[e],l=0;for(let n in t)nt[e][l++].firstChild.nodeValue=t[n]}}(),Qt=!1,!1!==t&&ti("setLegend")}function On(e,t){let l;if(null==t)l=ot;else{let n=re[e],i=0==e&&2==Ge?jl:m[e];l=it?n.values(k,e,t):{_:n.value(k,i[t],e,t)}}Ke.values[e]=l}function Nn(e,t,l){let n;pn=gn,mn=xn,[gn,xn]=il.move(k,gn,xn),il.show&&(un&&T(un,le(gn),0,St,Dt),an&&T(an,0,le(xn),St,Dt)),An=ce;let i=0==He.ori?St:Dt,o=1==He.ori?St:Dt;if(0>gn||0==pl||ml>gl){n=null;for(let e=0;re.length>e;e++)e>0&&ul.length>1&&T(ul[e],-10,-10,St,Dt);if(sl&&Pn(null,Cn,!0,null==e&&li.setSeries),Ke.live){qe.fill(null),Qt=!0;for(let e=0;re.length>e;e++)Ke.values[e]=ot}}else{let e,t,l;1==v&&(e=0==He.ori?gn:xn,t=Fn(e,ve),n=G(t,m[0],ml,gl),l=be(Le(m[0][n],He,i,0),.5));for(let e=2==v?1:0;re.length>e;e++){let s=re[e],r=qe[e],u=1==v?m[e][r]:m[e][1][r],a=il.dataIdx(k,e,n,t),f=1==v?m[e][a]:m[e][1][a];Qt=Qt||f!=u||a!=r,qe[e]=a;let c=a==n?l:be(Le(1==v?m[0][a]:m[e][0][a],He,i,0),.5);if(e>0&&s.show){let t,l,n=null==f?-10:be(Ie(f,1==v?he[s.scale]:he[s.facets[1].scale],o,0),.5);if(n>0&&1==v){let t=ee(n-xn);t>An||(An=t,Wn=e)}if(0==He.ori?(t=c,l=n):(t=n,l=c),Qt&&ul.length>1){A(ul[e],il.points.fill(k,e),il.points.stroke(k,e));let n,i,o,s,r=!0,u=il.points.bbox;if(null!=u){r=!1;let t=u(k,e);o=t.left,s=t.top,n=t.width,i=t.height}else o=t,s=l,n=i=il.points.size(k,e);Y(ul[e],n,i,r),T(ul[e],o,s,St,Dt)}}if(Ke.live){if(!Qt||0==e&&it)continue;On(e,a)}}}if(il.idx=n,il.left=gn,il.top=xn,Qt&&(Ke.idx=n,In()),En.show&&vn)if(null!=e){let[t,l]=li.scales,[n,s]=li.match,[r,u]=e.cursor.sync.scales,a=e.cursor.drag;if(Mn=a._x,Sn=a._y,Mn||Sn){let a,f,c,h,d,{left:p,top:m,width:g,height:x}=e.select,w=e.scales[t].ori,_=e.posToVal,k=null!=t&&n(t,r),b=null!=l&&s(l,u);k&&Mn?(0==w?(a=p,f=g):(a=m,f=x),c=he[t],h=Le(_(a,r),c,i,0),d=Le(_(a+f,r),c,i,0),Gn(ie(h,d),ee(d-h))):Gn(0,i),b&&Sn?(1==w?(a=p,f=g):(a=m,f=x),c=he[l],h=Ie(_(a,u),c,o,0),d=Ie(_(a+f,u),c,o,0),Ln(ie(h,d),ee(d-h))):Ln(0,o)}else qn()}else{let e=ee(pn-fn),t=ee(mn-cn);if(1==He.ori){let l=e;e=t,t=l}Mn=yn.x&&e>=yn.dist,Sn=yn.y&&t>=yn.dist;let l,n,s=yn.uni;null!=s?Mn&&Sn&&(Mn=e>=s,Sn=t>=s,Mn||Sn||(t>e?Sn=!0:Mn=!0)):yn.x&&yn.y&&(Mn||Sn)&&(Mn=Sn=!0),Mn&&(0==He.ori?(l=hn,n=gn):(l=dn,n=xn),Gn(ie(l,n),ee(n-l)),Sn||Ln(0,o)),Sn&&(1==He.ori?(l=hn,n=gn):(l=dn,n=xn),Ln(ie(l,n),ee(n-l)),Mn||Gn(0,i)),Mn||Sn||(Gn(0,0),Ln(0,0))}if(yn._x=Mn,yn._y=Sn,null==e){if(l){if(null!=ni){let[e,t]=li.scales;li.values[0]=null!=e?Fn(0==He.ori?gn:xn,e):null,li.values[1]=null!=t?Fn(1==He.ori?gn:xn,t):null}oi(a,k,gn,xn,St,Dt,n)}if(sl){let e=l&&li.setSeries,t=ol.prox;null==Yn?An>t||Pn(Wn,Cn,!0,e):An>t?Pn(null,Cn,!0,e):Wn!=Yn&&Pn(Wn,Cn,!0,e)}}F&&!1!==t&&ti("setCursor")}k.setLegend=In;let jn=null;function Bn(e){!0===e?jn=null:(jn=K.getBoundingClientRect(),ti("syncRect",jn))}function Un(e,t,l,n,i,o){il._lock||(Vn(e,t,l,n,i,o,0,!1,null!=e),null!=e?Nn(null,!0,!0):Nn(t,!0,!1))}function Vn(e,t,l,n,i,o,s,r,u){if(null==jn&&Bn(!1),null!=e)l=e.clientX-jn.left,n=e.clientY-jn.top;else{if(0>l||0>n)return gn=-10,void(xn=-10);let[e,s]=li.scales,r=t.cursor.sync,[u,a]=r.values,[f,c]=r.scales,[h,d]=li.match,p=t.axes[0].side%2==1,m=0==He.ori?St:Dt,g=1==He.ori?St:Dt,x=p?o:i,w=p?i:o,_=p?n:l,k=p?l:n;if(l=null!=f?h(e,f)?C(u,he[e],m,0):-10:m*(_/x),n=null!=c?d(s,c)?C(a,he[s],g,0):-10:g*(k/w),1==He.ori){let e=l;l=n,n=e}}u&&(l>1&&St-1>l||(l=de(l,St)),n>1&&Dt-1>n||(n=de(n,Dt))),r?(fn=l,cn=n,[hn,dn]=il.move(k,l,n)):(gn=l,xn=n)}const Jn={width:0,height:0};function qn(){zn(Jn,!1)}function Kn(e,t,l,n,i,o){vn=!0,Mn=Sn=yn._x=yn._y=!1,Vn(e,t,l,n,i,o,0,!0,!1),null!=e&&(ft(c,w,Zn),oi(f,k,hn,dn,St,Dt,null))}function Zn(e,t,l,n,i,o){vn=yn._x=yn._y=!1,Vn(e,t,l,n,i,o,0,!1,!0);let{left:s,top:r,width:u,height:a}=En,f=u>0||a>0;if(f&&zn(En),yn.setScale&&f){let e=s,t=u,l=r,n=a;if(1==He.ori&&(e=r,t=a,l=s,n=u),Mn&&Tn(ve,Fn(e,ve),Fn(e+t,ve)),Sn)for(let e in he){let t=he[e];e!=ve&&null==t.from&&t.min!=ce&&Tn(e,Fn(l+n,e),Fn(l,e))}qn()}else il.lock&&(il._lock=!il._lock,il._lock||Nn(null,!0,!1));null!=e&&(_t(c,w),oi(c,k,gn,xn,St,Dt,null))}function $n(e){Vl(),qn(),null!=e&&oi(p,k,gn,xn,St,Dt,null)}function Xn(){ae.forEach(Il),tl(k.width,k.height,!0)}H(g,_,Xn);const Qn={};Qn.mousedown=Kn,Qn.mousemove=Un,Qn.mouseup=Zn,Qn.dblclick=$n,Qn.setSeries=(e,t,l,n)=>{Pn(l,n,!0,!1)},il.show&&(ft(f,K,Kn),ft(a,K,Un),ft(h,K,Bn),ft(d,K,(function(){if(!il._lock){let e=vn;if(vn){let e,t,l=!0,n=!0,i=10;0==He.ori?(e=Mn,t=Sn):(e=Sn,t=Mn),e&&t&&(l=i>=gn||gn>=St-i,n=i>=xn||xn>=Dt-i),e&&l&&(gn=hn>gn?0:St),t&&n&&(xn=dn>xn?0:Dt),Nn(null,!0,!0),vn=!1}gn=-10,xn=-10,Nn(null,!0,!0),e&&(vn=e)}})),ft(p,K,$n),Sl.add(k),k.syncRect=Bn);const ei=k.hooks=u.hooks||{};function ti(e,t,l){e in ei&&ei[e].forEach((e=>{e.call(null,k,t,l)}))}(u.plugins||[]).forEach((e=>{for(let t in e.hooks)ei[t]=(ei[t]||[]).concat(e.hooks[t])}));const li=Fe({key:null,setSeries:!1,filters:{pub:_e,sub:_e},scales:[ve,re[1]?re[1].scale:null],match:[ke,ke],values:[null,null]},il.sync);il.sync=li;const ni=li.key,ii=el(ni);function oi(e,t,l,n,i,o,s){li.filters.pub(e,t,l,n,i,o,s)&&ii.pub(e,t,l,n,i,o,s)}function si(){ti("init",u,m),Ul(m||u.data,!1),Oe[ve]?bn(ve,Oe[ve]):Vl(),tl(u.width,u.height),Nn(null,!0,!1),zn(En,!1)}return ii.sub(k),k.pub=function(e,t,l,n,i,o,s){li.filters.sub(e,t,l,n,i,o,s)&&Qn[e](null,t,l,n,i,o,s)},k.destroy=function(){ii.unsub(k),Sl.delete(k),at.clear(),R(g,_,Xn),L.remove(),ti("destroy")},re.forEach(al),ae.forEach((function(e,t){if(e._show=e.show,e.show){let l=e.side%2,n=he[e.scale];null==n&&(e.scale=l?re[1].scale:ve,n=he[e.scale]);let i=n.time;e.size=me(e.size),e.space=me(e.space),e.rotate=me(e.rotate),e.incrs=me(e.incrs||(2==n.distr?Xe:i?1==te?ct:pt:Qe)),e.splits=me(e.splits||(i&&1==n.distr?Be:3==n.distr?Rt:4==n.distr?Gt:Ht)),e.stroke=me(e.stroke),e.grid.stroke=me(e.grid.stroke),e.ticks.stroke=me(e.ticks.stroke),e.border.stroke=me(e.border.stroke);let o=e.values;e.values=Pe(o)&&!Pe(o[0])?me(o):i?Pe(o)?wt(Ne,xt(o,je)):Ae(o)?function(e,t){let l=Ve(t);return(t,n)=>n.map((t=>l(e(t))))}(Ne,o):o||Ue:o||Ft,e.filter=me(e.filter||(3>n.distr?xe:jt)),e.font=Ll(e.font),e.labelFont=Ll(e.labelFont),e._size=e.size(k,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(fl[t]=!0,e._el=D("u-axis",U))}})),x?x instanceof HTMLElement?(x.appendChild(L),si()):x(k,si):si(),k}Ol.assign=Fe,Ol.fmtNum=$,Ol.rangeNum=J,Ol.rangeLog=N,Ol.rangeAsinh=j,Ol.orient=tl,Ol.pxRatio=b,Ol.join=function(e,t){let l=new Set;for(let t=0;e.length>t;t++){let n=e[t][0],i=n.length;for(let e=0;i>e;e++)l.add(n[e])}let n=[Array.from(l).sort(((e,t)=>e-t))],i=n[0].length,o=new Map;for(let e=0;i>e;e++)o.set(n[0][e],e);for(let l=0;e.length>l;l++){let s=e[l],r=s[0];for(let e=1;s.length>e;e++){let u=s[e],a=Array(i).fill(void 0),f=t?t[l][e]:1,c=[];for(let e=0;u.length>e;e++){let t=u[e],l=o.get(r[e]);null===t?0!=f&&(a[l]=t,2==f&&c.push(l)):a[l]=t}He(a,c,i),n.push(a)}}return n},Ol.fmtDate=Ve,Ol.tzDate=function(e,t){let l;return"UTC"==t||"Etc/UTC"==t?l=new Date(+e+6e4*e.getTimezoneOffset()):t==Je?l=e:(l=new Date(e.toLocaleString("en-US",{timeZone:t})),l.setMilliseconds(e.getMilliseconds())),l},Ol.sync=el;{Ol.addGap=function(e,t,l){let n=e[e.length-1];n&&n[0]==t?n[1]=l:e.push([t,l])},Ol.clipGaps=ol;let e=Ol.paths={points:_l};e.linear=yl,e.stepped=function(e){const t=q(e.align,1),l=q(e.ascDesc,!1),n=q(e.alignGaps,0);return(e,i,o,s)=>tl(e,i,((r,u,a,f,c,h,d,p,m,g,x)=>{let w=r.pxRound,_=e=>w(h(e,f,g,p)),k=e=>w(d(e,c,x,m)),v=0==f.ori?cl:hl;const y={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},M=y.stroke,S=f.dir*(0==f.ori?1:-1);o=L(a,o,s,1),s=L(a,o,s,-1);let E=k(a[1==S?o:s]),D=_(u[1==S?o:s]),z=D;v(M,D,E);for(let e=1==S?o:s;e>=o&&s>=e;e+=S){let l=a[e];if(null==l)continue;let n=_(u[e]),i=k(l);1==t?v(M,n,E):v(M,z,i),v(M,n,i),E=i,z=n}let[T,P]=ll(e,i);if(null!=r.fill||0!=T){let t=y.fill=new Path2D(M),l=k(r.fillTo(e,i,r.min,r.max,T));v(t,z,l),v(t,D,l)}if(!r.spanGaps){let c=[];c.push(...sl(u,a,o,s,S,_,n));let h=r.width*b/2,d=l||1==t?h:-h,w=l||-1==t?-h:h;c.forEach((e=>{e[0]+=d,e[1]+=w})),y.gaps=c=r.gaps(e,i,o,s,c),y.clip=ol(c,f.ori,p,m,g,x)}return 0!=P&&(y.band=2==P?[il(e,i,o,s,M,-1),il(e,i,o,s,M,1)]:il(e,i,o,s,M,P)),y}))},e.bars=function(e){const t=q((e=e||De).size,[.6,ce,1]),l=e.align||0,n=(e.gap||0)*b,i=q(e.radius,0),o=1-t[0],s=q(t[1],ce)*b,r=q(t[2],1)*b,u=q(e.disp,De),a=q(e.each,(()=>{})),{fill:f,stroke:c}=u;return(e,t,h,d)=>tl(e,t,((p,m,g,x,w,_,k,v,y,M,S)=>{let E=p.pxRound;const D=x.dir*(0==x.ori?1:-1),z=w.dir*(1==w.ori?1:-1);let T,P,A=0==x.ori?dl:pl,W=0==x.ori?a:(e,t,l,n,i,o,s)=>{a(e,t,l,i,n,s,o)},[Y,C]=ll(e,t),F=3==w.distr?1==Y?w.max:w.min:0,H=k(F,w,S,y),R=E(p.width*b),G=!1,L=null,I=null,O=null,N=null;null==f||0!=R&&null==c||(G=!0,L=f.values(e,t,h,d),I=new Map,new Set(L).forEach((e=>{null!=e&&I.set(e,new Path2D)})),R>0&&(O=c.values(e,t,h,d),N=new Map,new Set(O).forEach((e=>{null!=e&&N.set(e,new Path2D)}))));let{x0:j,size:B}=u;if(null!=j&&null!=B){m=j.values(e,t,h,d),2==j.unit&&(m=m.map((t=>e.posToVal(v+t*M,x.key,!0))));let l=B.values(e,t,h,d);P=2==B.unit?l[0]*M:_(l[0],x,M,v)-_(0,x,M,v),P=E(P-R),T=1==D?-R/2:P+R/2}else{let e=M;if(m.length>1){let t=null;for(let l=0,n=1/0;m.length>l;l++)if(void 0!==g[l]){if(null!=t){let i=ee(m[l]-m[t]);n>i&&(n=i,e=ee(_(m[l],x,M,v)-_(m[t],x,M,v)))}t=l}}P=E(ie(s,oe(r,e-e*o))-R-n),T=(0==l?P/2:l==D?0:P)-l*D*n/2}const U={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:3};let V;0!=C&&(U.band=new Path2D,V=E(k(1==C?w.max:w.min,w,S,y)));const J=G?null:new Path2D,K=U.band;let{y0:Z,y1:$}=u,X=null;null!=Z&&null!=$&&(g=$.values(e,t,h,d),X=Z.values(e,t,h,d));for(let l=1==D?h:d;l>=h&&d>=l;l+=D){let n=g[l],o=_(2!=x.distr||null!=u?m[l]:l,x,M,v),s=k(q(n,F),w,S,y);null!=X&&null!=n&&(H=k(X[l],w,S,y));let r=E(o-T),a=E(oe(s,H)),f=E(ie(s,H)),c=a-f,h=i*P;null!=n&&(G?(R>0&&null!=O[l]&&A(N.get(O[l]),r,f+te(R/2),P,oe(0,c-R),h),null!=L[l]&&A(I.get(L[l]),r,f+te(R/2),P,oe(0,c-R),h)):A(J,r,f+te(R/2),P,oe(0,c-R),h),W(e,t,l,r-R/2,f,P+R,c)),0!=C&&(z*C==1?(a=f,f=V):(f=a,a=V),c=a-f,A(K,r-R/2,f,P+R,oe(0,c),0))}return R>0&&(U.stroke=G?N:J),U.fill=G?I:J,U}))},e.spline=function(e){return function(e,t){const l=q(t?.alignGaps,0);return(t,n,i,o)=>tl(t,n,((s,r,u,a,f,c,h,d,p,m,g)=>{let x,w,_,k=s.pxRound,b=e=>k(c(e,a,m,d)),v=e=>k(h(e,f,g,p));0==a.ori?(x=al,_=cl,w=xl):(x=fl,_=hl,w=wl);const y=a.dir*(0==a.ori?1:-1);i=L(u,i,o,1),o=L(u,i,o,-1);let M=b(r[1==y?i:o]),S=M,E=[],D=[];for(let e=1==y?i:o;e>=i&&o>=e;e+=y)if(null!=u[e]){let t=b(r[e]);E.push(S=t),D.push(v(u[e]))}const z={stroke:e(E,D,x,_,w,k),fill:null,clip:null,band:null,gaps:null,flags:1},T=z.stroke;let[P,A]=ll(t,n);if(null!=s.fill||0!=P){let e=z.fill=new Path2D(T),l=v(s.fillTo(t,n,s.min,s.max,P));_(e,S,l),_(e,M,l)}if(!s.spanGaps){let e=[];e.push(...sl(r,u,i,o,y,b,l)),z.gaps=e=s.gaps(t,n,i,o,e),z.clip=ol(e,a.ori,d,p,m,g)}return 0!=A&&(z.band=2==A?[il(t,n,i,o,T,-1),il(t,n,i,o,T,1)]:il(t,n,i,o,T,A)),z}))}(Ml,e)}}return Ol}(); diff --git a/programs/server/play.html b/programs/server/play.html index c7ea5e4ef12..c511d13cf91 100644 --- a/programs/server/play.html +++ b/programs/server/play.html @@ -75,6 +75,10 @@ * { box-sizing: border-box; + /* For iPad */ + margin: 0; + border-radius: 0; + tab-size: 4; } html, body @@ -275,13 +279,23 @@ display: none; } - /* When mouse pointer is over table cell, will display full text (with wrap) instead of cut. */ - td.left:hover + /* When mouse pointer is over table cell, will display full text (with wrap) instead of cut. + * We also keep it for some time on mouseout for "hysteresis" effect. + */ + td.left:hover, .td-hover-hysteresis { white-space: pre-wrap; max-width: none; } + .td-selected + { + white-space: pre-wrap; + max-width: none; + background-color: var(--table-hover-color); + border: 2px solid var(--border-color); + } + td.transposed { max-width: none; @@ -295,6 +309,14 @@ vertical-align: middle; } + .row-number + { + width: 1%; + text-align: right; + background-color: var(--table-header-color); + color: var(--misc-text-color); + } + div.empty-result { opacity: 10%; @@ -501,20 +523,27 @@ const server_address = document.getElementById('url').value; - const url = server_address + + var url = server_address + (server_address.indexOf('?') >= 0 ? '&' : '?') + /// Ask server to allow cross-domain requests. 'add_http_cors_header=1' + - '&user=' + encodeURIComponent(user) + - '&password=' + encodeURIComponent(password) + '&default_format=JSONCompact' + /// Safety settings to prevent results that browser cannot display. '&max_result_rows=1000&max_result_bytes=10000000&result_overflow_mode=break'; + // If play.html is opened locally, append username and password to the URL parameter to avoid CORS issue. + if (document.location.href.startsWith("file://")) { + url += '&user=' + encodeURIComponent(user) + + '&password=' + encodeURIComponent(password) + } + const xhr = new XMLHttpRequest; xhr.open('POST', url, true); - + // If play.html is open normally, use Basic auth to prevent username and password being exposed in URL parameters + if (!document.location.href.startsWith("file://")) { + xhr.setRequestHeader("Authorization", "Basic " + btoa(user+":"+password)); + } xhr.onreadystatechange = function() { if (posted_request_num != request_num) { @@ -581,11 +610,13 @@ } } + let query_area = document.getElementById('query'); + window.onpopstate = function(event) { if (!event.state) { return; } - document.getElementById('query').value = event.state.query; + query_area.value = event.state.query; if (!event.state.response) { clear(); return; @@ -594,13 +625,13 @@ }; if (window.location.hash) { - document.getElementById('query').value = window.atob(window.location.hash.substr(1)); + query_area.value = window.atob(window.location.hash.substr(1)); } function post() { ++request_num; - let query = document.getElementById('query').value; + let query = query_area.value; postImpl(request_num, query); } @@ -617,6 +648,32 @@ } } + /// Pressing Tab in textarea will increase indentation. + /// But for accessibility reasons, we will fall back to tab navigation if the user already used Tab for that. + + let user_prefers_tab_navigation = false; + + [...document.querySelectorAll('input')].map(elem => { + elem.onkeydown = (e) => { + if (e.key == 'Tab') { user_prefers_tab_navigation = true; } + }; + }); + + query_area.onkeydown = (e) => { + if (e.key == 'Tab' && !event.shiftKey && !user_prefers_tab_navigation) { + let elem = e.target; + let selection_start = elem.selectionStart; + let selection_end = elem.selectionEnd; + + elem.value = elem.value.substring(0, elem.selectionStart) + ' ' + elem.value.substring(elem.selectionEnd); + elem.selectionStart = selection_start + 4; + elem.selectionEnd = selection_start + 4; + + e.preventDefault(); + return false; + } + }; + function clearElement(id) { let elem = document.getElementById(id); @@ -633,10 +690,9 @@ clearElement('chart'); clearElement('data-unparsed'); clearElement('error'); - clearElement('hourglass'); - document.getElementById('check-mark').innerText = ''; - document.getElementById('hourglass').innerText = ''; + document.getElementById('check-mark').display = 'none'; + document.getElementById('hourglass').display = 'none'; document.getElementById('stats').innerText = ''; document.getElementById('logo-container').style.display = 'block'; } @@ -674,7 +730,7 @@ stats.innerText = `Elapsed: ${seconds} sec, read ${formatted_rows} rows, ${formatted_bytes}.`; /// We can also render graphs if user performed EXPLAIN PIPELINE graph=1 or EXPLAIN AST graph = 1 - if (response.data.length > 3 && document.getElementById('query').value.match(/^\s*EXPLAIN/i) && typeof(response.data[0][0]) === "string" && response.data[0][0].startsWith("digraph")) { + if (response.data.length > 3 && query_area.value.match(/^\s*EXPLAIN/i) && typeof(response.data[0][0]) === "string" && response.data[0][0].startsWith("digraph")) { renderGraph(response); } else { renderTable(response); @@ -784,7 +840,17 @@ return; } + const should_display_row_numbers = response.data.length > 3; + let thead = document.createElement('thead'); + + if (should_display_row_numbers) { + let th = document.createElement('th'); + th.className = 'row-number'; + th.appendChild(document.createTextNode('№')); + thead.appendChild(th); + } + for (let idx in response.meta) { let th = document.createElement('th'); const name = document.createTextNode(response.meta[idx].name); @@ -794,7 +860,9 @@ /// To prevent hanging the browser, limit the number of cells in a table. /// It's important to have the limit on number of cells, not just rows, because tables may be wide or narrow. + /// Also we permit rendering of more records but only if elapsed time is not large. const max_rows = 10000 / response.meta.length; + const max_render_ms = 200; let row_num = 0; const column_is_number = response.meta.map(elem => !!elem.type.match(/^(Nullable\()?(U?Int|Decimal|Float)/)); @@ -810,18 +878,35 @@ column_need_render_bars: column_need_render_bars, }; + const start_time = performance.now(); + let tbody = document.createElement('tbody'); for (let row_idx in response.data) { let tr = document.createElement('tr'); + if (should_display_row_numbers) { + let td = document.createElement('td'); + td.className = 'row-number'; + td.appendChild(document.createTextNode(1 + +row_idx)); + tr.appendChild(td); + } for (let col_idx in response.data[row_idx]) { let cell = response.data[row_idx][col_idx]; const td = renderCell(cell, col_idx, settings); + + td.onclick = () => { td.classList.add('td-selected') }; + td.onmouseenter = () => { + td.classList.add('td-hover-hysteresis'); + td.onmouseleave = () => { + setTimeout(() => { td && td.classList.remove('td-hover-hysteresis') }, 1000); + }; + }; + tr.appendChild(td); } tbody.appendChild(tr); ++row_num; - if (row_num >= max_rows) { + if (row_num >= max_rows && performance.now() - start_time >= max_render_ms) { break; } } diff --git a/programs/server/users.d/allow_introspection_functions.xml b/programs/server/users.d/allow_introspection_functions.xml index cfde1b4525d..ec3057c82d7 100644 --- a/programs/server/users.d/allow_introspection_functions.xml +++ b/programs/server/users.d/allow_introspection_functions.xml @@ -1,4 +1,3 @@ - diff --git a/programs/server/users.d/allow_only_from_localhost.xml b/programs/server/users.d/allow_only_from_localhost.xml index b1b38686133..406b89b4d7c 100644 --- a/programs/server/users.d/allow_only_from_localhost.xml +++ b/programs/server/users.d/allow_only_from_localhost.xml @@ -1,4 +1,3 @@ - diff --git a/programs/server/users.xml b/programs/server/users.xml index 96067d01a6b..5e2ff51bf4d 100644 --- a/programs/server/users.xml +++ b/programs/server/users.xml @@ -1,4 +1,3 @@ - @@ -6,15 +5,6 @@ - - random diff --git a/programs/static-files-disk-uploader/static-files-disk-uploader.cpp b/programs/static-files-disk-uploader/static-files-disk-uploader.cpp index 07c066b0d59..786ae1f559f 100644 --- a/programs/static-files-disk-uploader/static-files-disk-uploader.cpp +++ b/programs/static-files-disk-uploader/static-files-disk-uploader.cpp @@ -160,7 +160,7 @@ try if (options.empty() || options.count("help")) { std::cout << description << std::endl; - exit(0); + exit(0); // NOLINT(concurrency-mt-unsafe) } String metadata_path; diff --git a/programs/su/CMakeLists.txt b/programs/su/CMakeLists.txt index df207e16f6e..3228eef8b8d 100644 --- a/programs/su/CMakeLists.txt +++ b/programs/su/CMakeLists.txt @@ -1,3 +1,3 @@ -set (CLICKHOUSE_SU_SOURCES clickhouse-su.cpp) +set (CLICKHOUSE_SU_SOURCES clickhouse-su.cpp su.cpp) set (CLICKHOUSE_SU_LINK PRIVATE dbms) clickhouse_program_add(su) diff --git a/programs/su/clickhouse-su.cpp b/programs/su/clickhouse-su.cpp index 0979abf353d..bb0967ca271 100644 --- a/programs/su/clickhouse-su.cpp +++ b/programs/su/clickhouse-su.cpp @@ -1,145 +1,2 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - - -/// "su" means "set user" -/// In fact, this program can set Unix user and group. -/// -/// Usage: -/// clickhouse su user[:group] args... -/// -/// - will set user and, optionally, group and exec the remaining args. -/// user and group can be numeric identifiers or strings. -/// -/// The motivation for this tool is very obscure and idiosyncratic. It is needed for Docker. -/// People want to run programs inside Docker with dropped privileges (less than root). -/// But the standard Linux "su" program is not suitable for usage inside Docker, -/// because it is creating pseudoterminals to avoid hijacking input from the terminal, for security, -/// but Docker is also doing something with the terminal and it is incompatible. -/// For this reason, people use alternative and less "secure" versions of "su" tools like "gosu" or "su-exec". -/// But it would be very strange to use 3rd-party software only to do two-three syscalls. -/// That's why we provide this tool. -/// -/// Note: ClickHouse does not need Docker at all and works better without Docker. -/// ClickHouse has no dependencies, it is packaged and distributed in single binary. -/// There is no reason to use Docker unless you are already running all your software in Docker. - -namespace DB -{ - -namespace ErrorCodes -{ - extern const int BAD_ARGUMENTS; - extern const int SYSTEM_ERROR; -} - -void setUserAndGroup(std::string arg_uid, std::string arg_gid) -{ - static constexpr size_t buf_size = 16384; /// Linux man page says it is enough. Nevertheless, we will check if it's not enough and throw. - std::unique_ptr buf(new char[buf_size]); - - /// Set the group first, because if we set user, the privileges will be already dropped and we will not be able to set the group later. - - if (!arg_gid.empty()) - { - gid_t gid = 0; - if (!tryParse(gid, arg_gid) || gid == 0) - { - group entry{}; - group * result{}; - - if (0 != getgrnam_r(arg_gid.data(), &entry, buf.get(), buf_size, &result)) - throwFromErrno(fmt::format("Cannot do 'getgrnam_r' to obtain gid from group name ({})", arg_gid), ErrorCodes::SYSTEM_ERROR); - - if (!result) - throw Exception(ErrorCodes::BAD_ARGUMENTS, "Group {} is not found in the system", arg_gid); - - gid = entry.gr_gid; - } - - if (gid == 0 && getgid() != 0) - throw Exception("Group has id 0, but dropping privileges to gid 0 does not make sense", ErrorCodes::BAD_ARGUMENTS); - - if (0 != setgid(gid)) - throwFromErrno(fmt::format("Cannot do 'setgid' to user ({})", arg_gid), ErrorCodes::SYSTEM_ERROR); - } - - if (!arg_uid.empty()) - { - /// Is it numeric id or name? - uid_t uid = 0; - if (!tryParse(uid, arg_uid) || uid == 0) - { - passwd entry{}; - passwd * result{}; - - if (0 != getpwnam_r(arg_uid.data(), &entry, buf.get(), buf_size, &result)) - throwFromErrno(fmt::format("Cannot do 'getpwnam_r' to obtain uid from user name ({})", arg_uid), ErrorCodes::SYSTEM_ERROR); - - if (!result) - throw Exception(ErrorCodes::BAD_ARGUMENTS, "User {} is not found in the system", arg_uid); - - uid = entry.pw_uid; - } - - if (uid == 0 && getuid() != 0) - throw Exception("User has id 0, but dropping privileges to uid 0 does not make sense", ErrorCodes::BAD_ARGUMENTS); - - if (0 != setuid(uid)) - throwFromErrno(fmt::format("Cannot do 'setuid' to user ({})", arg_uid), ErrorCodes::SYSTEM_ERROR); - } -} - -} - - -int mainEntryClickHouseSU(int argc, char ** argv) -try -{ - using namespace DB; - - if (argc < 3) - { - std::cout << "Usage: ./clickhouse su user:group ..." << std::endl; - exit(0); - } - - std::string_view user_and_group = argv[1]; - - std::string user; - std::string group; - - auto pos = user_and_group.find(':'); - if (pos == std::string_view::npos) - { - user = user_and_group; - } - else - { - user = user_and_group.substr(0, pos); - group = user_and_group.substr(pos + 1); - } - - setUserAndGroup(std::move(user), std::move(group)); - - std::vector new_argv; - new_argv.reserve(argc - 1); - new_argv.insert(new_argv.begin(), argv + 2, argv + argc); - new_argv.push_back(nullptr); - - execvp(new_argv.front(), new_argv.data()); - - throwFromErrno("Cannot execvp", ErrorCodes::SYSTEM_ERROR); -} -catch (...) -{ - std::cerr << DB::getCurrentExceptionMessage(false) << '\n'; - return 1; -} +int mainEntryClickHouseSU(int argc, char ** argv); +int main(int argc_, char ** argv_) { return mainEntryClickHouseSU(argc_, argv_); } diff --git a/programs/su/su.cpp b/programs/su/su.cpp new file mode 100644 index 00000000000..95e7a0b709c --- /dev/null +++ b/programs/su/su.cpp @@ -0,0 +1,145 @@ +#include +#include +#include +#include + +#include +#include +#include +#include + + +/// "su" means "set user" +/// In fact, this program can set Unix user and group. +/// +/// Usage: +/// clickhouse su user[:group] args... +/// +/// - will set user and, optionally, group and exec the remaining args. +/// user and group can be numeric identifiers or strings. +/// +/// The motivation for this tool is very obscure and idiosyncratic. It is needed for Docker. +/// People want to run programs inside Docker with dropped privileges (less than root). +/// But the standard Linux "su" program is not suitable for usage inside Docker, +/// because it is creating pseudoterminals to avoid hijacking input from the terminal, for security, +/// but Docker is also doing something with the terminal and it is incompatible. +/// For this reason, people use alternative and less "secure" versions of "su" tools like "gosu" or "su-exec". +/// But it would be very strange to use 3rd-party software only to do two-three syscalls. +/// That's why we provide this tool. +/// +/// Note: ClickHouse does not need Docker at all and works better without Docker. +/// ClickHouse has no dependencies, it is packaged and distributed in single binary. +/// There is no reason to use Docker unless you are already running all your software in Docker. + +namespace DB +{ + +namespace ErrorCodes +{ + extern const int BAD_ARGUMENTS; + extern const int SYSTEM_ERROR; +} + +void setUserAndGroup(std::string arg_uid, std::string arg_gid) +{ + static constexpr size_t buf_size = 16384; /// Linux man page says it is enough. Nevertheless, we will check if it's not enough and throw. + std::unique_ptr buf(new char[buf_size]); + + /// Set the group first, because if we set user, the privileges will be already dropped and we will not be able to set the group later. + + if (!arg_gid.empty()) + { + gid_t gid = 0; + if (!tryParse(gid, arg_gid) || gid == 0) + { + group entry{}; + group * result{}; + + if (0 != getgrnam_r(arg_gid.data(), &entry, buf.get(), buf_size, &result)) + throwFromErrno(fmt::format("Cannot do 'getgrnam_r' to obtain gid from group name ({})", arg_gid), ErrorCodes::SYSTEM_ERROR); + + if (!result) + throw Exception(ErrorCodes::BAD_ARGUMENTS, "Group {} is not found in the system", arg_gid); + + gid = entry.gr_gid; + } + + if (gid == 0 && getgid() != 0) + throw Exception("Group has id 0, but dropping privileges to gid 0 does not make sense", ErrorCodes::BAD_ARGUMENTS); + + if (0 != setgid(gid)) + throwFromErrno(fmt::format("Cannot do 'setgid' to user ({})", arg_gid), ErrorCodes::SYSTEM_ERROR); + } + + if (!arg_uid.empty()) + { + /// Is it numeric id or name? + uid_t uid = 0; + if (!tryParse(uid, arg_uid) || uid == 0) + { + passwd entry{}; + passwd * result{}; + + if (0 != getpwnam_r(arg_uid.data(), &entry, buf.get(), buf_size, &result)) + throwFromErrno(fmt::format("Cannot do 'getpwnam_r' to obtain uid from user name ({})", arg_uid), ErrorCodes::SYSTEM_ERROR); + + if (!result) + throw Exception(ErrorCodes::BAD_ARGUMENTS, "User {} is not found in the system", arg_uid); + + uid = entry.pw_uid; + } + + if (uid == 0 && getuid() != 0) + throw Exception("User has id 0, but dropping privileges to uid 0 does not make sense", ErrorCodes::BAD_ARGUMENTS); + + if (0 != setuid(uid)) + throwFromErrno(fmt::format("Cannot do 'setuid' to user ({})", arg_uid), ErrorCodes::SYSTEM_ERROR); + } +} + +} + + +int mainEntryClickHouseSU(int argc, char ** argv) +try +{ + using namespace DB; + + if (argc < 3) + { + std::cout << "Usage: ./clickhouse su user:group ..." << std::endl; + exit(0); // NOLINT(concurrency-mt-unsafe) + } + + std::string_view user_and_group = argv[1]; + + std::string user; + std::string group; + + auto pos = user_and_group.find(':'); + if (pos == std::string_view::npos) + { + user = user_and_group; + } + else + { + user = user_and_group.substr(0, pos); + group = user_and_group.substr(pos + 1); + } + + setUserAndGroup(std::move(user), std::move(group)); + + std::vector new_argv; + new_argv.reserve(argc - 1); + new_argv.insert(new_argv.begin(), argv + 2, argv + argc); + new_argv.push_back(nullptr); + + execvp(new_argv.front(), new_argv.data()); + + throwFromErrno("Cannot execvp", ErrorCodes::SYSTEM_ERROR); +} +catch (...) +{ + std::cerr << DB::getCurrentExceptionMessage(false) << '\n'; + return 1; +} diff --git a/src/Access/AccessControl.cpp b/src/Access/AccessControl.cpp index c6729459988..89292fe9272 100644 --- a/src/Access/AccessControl.cpp +++ b/src/Access/AccessControl.cpp @@ -79,7 +79,7 @@ public: /// No user, probably the user has been dropped while it was in the cache. cache.remove(params); } - auto res = std::shared_ptr(new ContextAccess(access_control, params)); + auto res = std::make_shared(access_control, params); res->initialize(); cache.add(params, res); return res; diff --git a/src/Access/Common/AccessType.h b/src/Access/Common/AccessType.h index 38e006f18e7..e8d3b453188 100644 --- a/src/Access/Common/AccessType.h +++ b/src/Access/Common/AccessType.h @@ -140,6 +140,7 @@ enum class AccessType M(SYSTEM_DROP_MMAP_CACHE, "SYSTEM DROP MMAP, DROP MMAP CACHE, DROP MMAP", GLOBAL, SYSTEM_DROP_CACHE) \ M(SYSTEM_DROP_COMPILED_EXPRESSION_CACHE, "SYSTEM DROP COMPILED EXPRESSION, DROP COMPILED EXPRESSION CACHE, DROP COMPILED EXPRESSIONS", GLOBAL, SYSTEM_DROP_CACHE) \ M(SYSTEM_DROP_FILESYSTEM_CACHE, "SYSTEM DROP FILESYSTEM CACHE, DROP FILESYSTEM CACHE", GLOBAL, SYSTEM_DROP_CACHE) \ + M(SYSTEM_DROP_SCHEMA_CACHE, "SYSTEM DROP SCHEMA CACHE, DROP SCHEMA CACHE", GLOBAL, SYSTEM_DROP_CACHE) \ M(SYSTEM_DROP_CACHE, "DROP CACHE", GROUP, SYSTEM) \ M(SYSTEM_RELOAD_CONFIG, "RELOAD CONFIG", GLOBAL, SYSTEM_RELOAD) \ M(SYSTEM_RELOAD_SYMBOLS, "RELOAD SYMBOLS", GLOBAL, SYSTEM_RELOAD) \ diff --git a/src/Access/Common/AllowedClientHosts.cpp b/src/Access/Common/AllowedClientHosts.cpp index efbdf3924e8..2f8151bf757 100644 --- a/src/Access/Common/AllowedClientHosts.cpp +++ b/src/Access/Common/AllowedClientHosts.cpp @@ -110,7 +110,7 @@ namespace } /// Returns the host name by its address. - Strings getHostsByAddress(const IPAddress & address) + std::unordered_set getHostsByAddress(const IPAddress & address) { auto hosts = DNSResolver::instance().reverseResolve(address); @@ -526,7 +526,7 @@ bool AllowedClientHosts::contains(const IPAddress & client_address) const return true; /// Check `name_regexps`. - std::optional resolved_hosts; + std::optional> resolved_hosts; auto check_name_regexp = [&](const String & name_regexp_) { try diff --git a/src/Access/ContextAccess.cpp b/src/Access/ContextAccess.cpp index 49736c76994..4e409946666 100644 --- a/src/Access/ContextAccess.cpp +++ b/src/Access/ContextAccess.cpp @@ -410,7 +410,7 @@ std::shared_ptr ContextAccess::getFullAccess() { static const std::shared_ptr res = [] { - auto full_access = std::shared_ptr(new ContextAccess); + auto full_access = std::make_shared(); full_access->is_full_access = true; full_access->access = std::make_shared(AccessRights::getFullAccess()); full_access->access_with_implicit = full_access->access; diff --git a/src/Access/ContextAccess.h b/src/Access/ContextAccess.h index fa3523977e7..ce1ea2d1220 100644 --- a/src/Access/ContextAccess.h +++ b/src/Access/ContextAccess.h @@ -69,6 +69,9 @@ public: using Params = ContextAccessParams; const Params & getParams() const { return params; } + ContextAccess() { } /// NOLINT + ContextAccess(const AccessControl & access_control_, const Params & params_); + /// Returns the current user. Throws if user is nullptr. UserPtr getUser() const; /// Same as above, but can return nullptr. @@ -167,8 +170,6 @@ public: private: friend class AccessControl; - ContextAccess() {} /// NOLINT - ContextAccess(const AccessControl & access_control_, const Params & params_); void initialize(); void setUser(const UserPtr & user_) const; diff --git a/src/Access/MultipleAccessStorage.h b/src/Access/MultipleAccessStorage.h index 58cf09fd0ff..bc9a4705785 100644 --- a/src/Access/MultipleAccessStorage.h +++ b/src/Access/MultipleAccessStorage.h @@ -2,7 +2,7 @@ #include #include -#include +#include #include @@ -63,7 +63,7 @@ private: std::shared_ptr getStoragesInternal() const; std::shared_ptr nested_storages TSA_GUARDED_BY(mutex); - mutable LRUCache ids_cache TSA_GUARDED_BY(mutex); + mutable CacheBase ids_cache TSA_GUARDED_BY(mutex); mutable std::mutex mutex; }; diff --git a/src/Access/examples/kerberos_init.cpp b/src/Access/examples/kerberos_init.cpp index 5dbe92a5b57..f9f9d882ece 100644 --- a/src/Access/examples/kerberos_init.cpp +++ b/src/Access/examples/kerberos_init.cpp @@ -25,7 +25,7 @@ int main(int argc, char ** argv) return 0; } - String cache_name = ""; + const char * cache_name = ""; if (argc == 4) cache_name = argv[3]; diff --git a/src/AggregateFunctions/AggregateFunctionArray.h b/src/AggregateFunctions/AggregateFunctionArray.h index c32cf8f2418..85e0dfc8050 100644 --- a/src/AggregateFunctions/AggregateFunctionArray.h +++ b/src/AggregateFunctions/AggregateFunctionArray.h @@ -49,6 +49,16 @@ public: return nested_func->getReturnType(); } + const IAggregateFunction & getBaseAggregateFunctionWithSameStateRepresentation() const override + { + return nested_func->getBaseAggregateFunctionWithSameStateRepresentation(); + } + + DataTypePtr getNormalizedStateType() const override + { + return nested_func->getNormalizedStateType(); + } + bool isVersioned() const override { return nested_func->isVersioned(); diff --git a/src/AggregateFunctions/AggregateFunctionCount.h b/src/AggregateFunctions/AggregateFunctionCount.h index 4199cb55409..a58eecf5aca 100644 --- a/src/AggregateFunctions/AggregateFunctionCount.h +++ b/src/AggregateFunctions/AggregateFunctionCount.h @@ -5,9 +5,11 @@ #include #include +#include #include #include #include +#include #include #include @@ -102,6 +104,19 @@ public: } } + bool haveSameStateRepresentationImpl(const IAggregateFunction & rhs) const override + { + return this->getName() == rhs.getName(); + } + + DataTypePtr getNormalizedStateType() const override + { + /// Return normalized state type: count() + AggregateFunctionProperties properties; + return std::make_shared( + AggregateFunctionFactory::instance().get(getName(), {}, {}, properties), DataTypes{}, Array{}); + } + void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, Arena *) const override { data(place).count += data(rhs).count; @@ -240,6 +255,19 @@ public: } } + bool haveSameStateRepresentationImpl(const IAggregateFunction & rhs) const override + { + return this->getName() == rhs.getName(); + } + + DataTypePtr getNormalizedStateType() const override + { + /// Return normalized state type: count() + AggregateFunctionProperties properties; + return std::make_shared( + AggregateFunctionFactory::instance().get(getName(), {}, {}, properties), DataTypes{}, Array{}); + } + void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, Arena *) const override { data(place).count += data(rhs).count; diff --git a/src/AggregateFunctions/AggregateFunctionDistinct.h b/src/AggregateFunctions/AggregateFunctionDistinct.h index 91e25ddfdfd..5afe104bcc0 100644 --- a/src/AggregateFunctions/AggregateFunctionDistinct.h +++ b/src/AggregateFunctions/AggregateFunctionDistinct.h @@ -152,8 +152,8 @@ template class AggregateFunctionDistinct : public IAggregateFunctionDataHelper> { private: - static constexpr auto prefix_size = sizeof(Data); AggregateFunctionPtr nested_func; + size_t prefix_size; size_t arguments_num; AggregateDataPtr getNestedPlace(AggregateDataPtr __restrict place) const noexcept @@ -170,7 +170,11 @@ public: AggregateFunctionDistinct(AggregateFunctionPtr nested_func_, const DataTypes & arguments, const Array & params_) : IAggregateFunctionDataHelper(arguments, params_) , nested_func(nested_func_) - , arguments_num(arguments.size()) {} + , arguments_num(arguments.size()) + { + size_t nested_size = nested_func->alignOfData(); + prefix_size = (sizeof(Data) + nested_size - 1) / nested_size * nested_size; + } void add(AggregateDataPtr __restrict place, const IColumn ** columns, size_t row_num, Arena * arena) const override { diff --git a/src/AggregateFunctions/AggregateFunctionFactory.cpp b/src/AggregateFunctions/AggregateFunctionFactory.cpp index 766d8af0d8c..a8385ad8b59 100644 --- a/src/AggregateFunctions/AggregateFunctionFactory.cpp +++ b/src/AggregateFunctions/AggregateFunctionFactory.cpp @@ -176,11 +176,6 @@ AggregateFunctionPtr AggregateFunctionFactory::getImpl( /// storage stores AggregateFunction(uniqCombinedIf) and in SELECT you /// need to filter aggregation result based on another column. -#if defined(UNBUNDLED) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wstringop-overread" -#endif - if (!combinator->supportsNesting() && nested_name.ends_with(combinator_name)) { throw Exception(ErrorCodes::ILLEGAL_AGGREGATION, @@ -188,10 +183,6 @@ AggregateFunctionPtr AggregateFunctionFactory::getImpl( combinator_name); } -#if defined(UNBUNDLED) -#pragma GCC diagnostic pop -#endif - DataTypes nested_types = combinator->transformArguments(argument_types); Array nested_parameters = combinator->transformParameters(parameters); diff --git a/src/AggregateFunctions/AggregateFunctionIf.cpp b/src/AggregateFunctions/AggregateFunctionIf.cpp index fa5e6b85a1e..0cf92585b77 100644 --- a/src/AggregateFunctions/AggregateFunctionIf.cpp +++ b/src/AggregateFunctions/AggregateFunctionIf.cpp @@ -278,6 +278,71 @@ public: } } + void addBatchSinglePlace( + size_t row_begin, size_t row_end, AggregateDataPtr __restrict place, const IColumn ** columns, Arena * arena, ssize_t) const final + { + std::unique_ptr final_null_flags = std::make_unique(row_end); + const size_t filter_column_num = number_of_arguments - 1; + + if (is_nullable[filter_column_num]) + { + const ColumnNullable * nullable_column = assert_cast(columns[filter_column_num]); + const IColumn & filter_column = nullable_column->getNestedColumn(); + const UInt8 * filter_null_map = nullable_column->getNullMapColumn().getData().data(); + const UInt8 * filter_values = assert_cast(filter_column).getData().data(); + + for (size_t i = row_begin; i < row_end; i++) + { + final_null_flags[i] = (null_is_skipped && filter_null_map[i]) || !filter_values[i]; + } + } + else + { + const IColumn * filter_column = columns[filter_column_num]; + const UInt8 * filter_values = assert_cast(filter_column)->getData().data(); + for (size_t i = row_begin; i < row_end; i++) + final_null_flags[i] = !filter_values[i]; + } + + const IColumn * nested_columns[number_of_arguments]; + for (size_t arg = 0; arg < number_of_arguments; arg++) + { + if (is_nullable[arg]) + { + const ColumnNullable & nullable_col = assert_cast(*columns[arg]); + if (null_is_skipped && (arg != filter_column_num)) + { + const ColumnUInt8 & nullmap_column = nullable_col.getNullMapColumn(); + const UInt8 * col_null_map = nullmap_column.getData().data(); + for (size_t r = row_begin; r < row_end; r++) + { + final_null_flags[r] |= col_null_map[r]; + } + } + nested_columns[arg] = &nullable_col.getNestedColumn(); + } + else + nested_columns[arg] = columns[arg]; + } + + bool at_least_one = false; + for (size_t i = row_begin; i < row_end; i++) + { + if (!final_null_flags[i]) + { + at_least_one = true; + break; + } + } + + if (at_least_one) + { + this->setFlag(place); + this->nested_function->addBatchSinglePlaceNotNull( + row_begin, row_end, this->nestedPlace(place), nested_columns, final_null_flags.get(), arena, -1); + } + } + #if USE_EMBEDDED_COMPILER void compileAdd(llvm::IRBuilderBase & builder, llvm::Value * aggregate_data_ptr, const DataTypes & arguments_types, const std::vector & argument_values) const override diff --git a/src/AggregateFunctions/AggregateFunctionIf.h b/src/AggregateFunctions/AggregateFunctionIf.h index f3221ae66e9..18104f94fad 100644 --- a/src/AggregateFunctions/AggregateFunctionIf.h +++ b/src/AggregateFunctions/AggregateFunctionIf.h @@ -56,6 +56,16 @@ public: return nested_func->getReturnType(); } + const IAggregateFunction & getBaseAggregateFunctionWithSameStateRepresentation() const override + { + return nested_func->getBaseAggregateFunctionWithSameStateRepresentation(); + } + + DataTypePtr getNormalizedStateType() const override + { + return nested_func->getNormalizedStateType(); + } + bool isVersioned() const override { return nested_func->isVersioned(); diff --git a/src/AggregateFunctions/AggregateFunctionMerge.cpp b/src/AggregateFunctions/AggregateFunctionMerge.cpp index cdf399585f5..a6d3a0771ab 100644 --- a/src/AggregateFunctions/AggregateFunctionMerge.cpp +++ b/src/AggregateFunctions/AggregateFunctionMerge.cpp @@ -23,14 +23,20 @@ public: DataTypes transformArguments(const DataTypes & arguments) const override { if (arguments.size() != 1) - throw Exception("Incorrect number of arguments for aggregate function with " + getName() + " suffix", ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH); + throw Exception( + ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, + "Incorrect number of arguments for aggregate function with {} suffix", + getName()); const DataTypePtr & argument = arguments[0]; const DataTypeAggregateFunction * function = typeid_cast(argument.get()); if (!function) - throw Exception("Illegal type " + argument->getName() + " of argument for aggregate function with " + getName() + " suffix" - + " must be AggregateFunction(...)", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT); + throw Exception( + ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, + "Illegal type {} of argument for aggregate function with {} suffix. It must be AggregateFunction(...)", + argument->getName(), + getName()); return function->getArgumentsDataTypes(); } @@ -45,13 +51,21 @@ public: const DataTypeAggregateFunction * function = typeid_cast(argument.get()); if (!function) - throw Exception("Illegal type " + argument->getName() + " of argument for aggregate function with " + getName() + " suffix" - + " must be AggregateFunction(...)", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT); + throw Exception( + ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, + "Illegal type {} of argument for aggregate function with {} suffix. It must be AggregateFunction(...)", + argument->getName(), + getName()); - if (nested_function->getName() != function->getFunctionName()) - throw Exception("Illegal type " + argument->getName() + " of argument for aggregate function with " + getName() + " suffix" - + ", because it corresponds to different aggregate function: " + function->getFunctionName() + " instead of " + nested_function->getName(), - ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT); + if (!nested_function->haveSameStateRepresentation(*function->getFunction())) + throw Exception( + ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, + "Illegal type {} of argument for aggregate function with {} suffix. because it corresponds to different aggregate " + "function: {} instead of {}", + argument->getName(), + getName(), + function->getFunctionName(), + nested_function->getName()); return std::make_shared(nested_function, argument, params); } diff --git a/src/AggregateFunctions/AggregateFunctionMerge.h b/src/AggregateFunctions/AggregateFunctionMerge.h index 8058e104415..7bf0f5ea00f 100644 --- a/src/AggregateFunctions/AggregateFunctionMerge.h +++ b/src/AggregateFunctions/AggregateFunctionMerge.h @@ -50,6 +50,11 @@ public: return nested_func->getReturnType(); } + const IAggregateFunction & getBaseAggregateFunctionWithSameStateRepresentation() const override + { + return nested_func->getBaseAggregateFunctionWithSameStateRepresentation(); + } + bool isVersioned() const override { return nested_func->isVersioned(); diff --git a/src/AggregateFunctions/AggregateFunctionNull.h b/src/AggregateFunctions/AggregateFunctionNull.h index ca284680800..1e2c9326142 100644 --- a/src/AggregateFunctions/AggregateFunctionNull.h +++ b/src/AggregateFunctions/AggregateFunctionNull.h @@ -414,6 +414,109 @@ public: this->nested_function->add(this->nestedPlace(place), nested_columns, row_num, arena); } + void addBatchSinglePlace( + size_t row_begin, + size_t row_end, + AggregateDataPtr __restrict place, + const IColumn ** columns, + Arena * arena, + ssize_t if_argument_pos) const final + { + /// We are going to merge all the flags into a single one to be able to call the nested batching functions + std::vector nullable_filters; + const IColumn * nested_columns[number_of_arguments]; + + std::unique_ptr final_flags = nullptr; + const UInt8 * final_flags_ptr = nullptr; + + if (if_argument_pos >= 0) + { + final_flags = std::make_unique(row_end); + final_flags_ptr = final_flags.get(); + + bool included_elements = 0; + const auto & flags = assert_cast(*columns[if_argument_pos]).getData(); + for (size_t i = row_begin; i < row_end; i++) + { + final_flags[i] = !flags.data()[i]; + included_elements += !!flags.data()[i]; + } + + if (included_elements == 0) + return; + if (included_elements != (row_end - row_begin)) + { + nullable_filters.push_back(final_flags_ptr); + } + } + + for (size_t i = 0; i < number_of_arguments; ++i) + { + if (is_nullable[i]) + { + const ColumnNullable & nullable_col = assert_cast(*columns[i]); + nested_columns[i] = &nullable_col.getNestedColumn(); + if constexpr (null_is_skipped) + { + const ColumnUInt8 & nullmap_column = nullable_col.getNullMapColumn(); + nullable_filters.push_back(nullmap_column.getData().data()); + } + } + else + { + nested_columns[i] = columns[i]; + } + } + + bool found_one = false; + + chassert(nullable_filters.size() > 0); /// We work under the assumption that we reach this because one argument was NULL + if (nullable_filters.size() == 1) + { + /// We can avoid making copies of the only filter but we still need to check that there is data to be added + final_flags_ptr = nullable_filters[0]; + for (size_t i = row_begin; i < row_end; i++) + { + if (!final_flags_ptr[i]) + { + found_one = true; + break; + } + } + } + else + { + if (!final_flags) + { + final_flags = std::make_unique(row_end); + final_flags_ptr = final_flags.get(); + } + + const size_t filter_start = nullable_filters[0] == final_flags_ptr ? 1 : 0; + for (size_t filter = filter_start; filter < nullable_filters.size(); filter++) + { + for (size_t i = row_begin; i < row_end; i++) + final_flags[i] |= nullable_filters[filter][i]; + } + + for (size_t i = row_begin; i < row_end; i++) + { + if (!final_flags_ptr[i]) + { + found_one = true; + break; + } + } + } + + if (!found_one) + return; // Nothing to do and nothing to mark + + this->setFlag(place); + this->nested_function->addBatchSinglePlaceNotNull( + row_begin, row_end, this->nestedPlace(place), nested_columns, final_flags_ptr, arena, -1); + } + #if USE_EMBEDDED_COMPILER diff --git a/src/AggregateFunctions/AggregateFunctionQuantile.cpp b/src/AggregateFunctions/AggregateFunctionQuantile.cpp index 6783a55418a..38b3c91be69 100644 --- a/src/AggregateFunctions/AggregateFunctionQuantile.cpp +++ b/src/AggregateFunctions/AggregateFunctionQuantile.cpp @@ -1,8 +1,9 @@ #include - +#include #include #include - +#include +#include #include @@ -21,70 +22,6 @@ namespace template using FuncQuantile = AggregateFunctionQuantile, NameQuantile, false, std::conditional_t, false>; template using FuncQuantiles = AggregateFunctionQuantile, NameQuantiles, false, std::conditional_t, true>; -template using FuncQuantileDeterministic = AggregateFunctionQuantile, NameQuantileDeterministic, true, std::conditional_t, false>; -template using FuncQuantilesDeterministic = AggregateFunctionQuantile, NameQuantilesDeterministic, true, std::conditional_t, true>; - -template using FuncQuantileExact = AggregateFunctionQuantile, NameQuantileExact, false, void, false>; -template using FuncQuantilesExact = AggregateFunctionQuantile, NameQuantilesExact, false, void, true>; - -template using FuncQuantileExactLow = AggregateFunctionQuantile, NameQuantileExactLow, false, void, false>; -template using FuncQuantilesExactLow = AggregateFunctionQuantile, NameQuantilesExactLow, false, void, true>; -template using FuncQuantileExactHigh = AggregateFunctionQuantile, NameQuantileExactHigh, false, void, false>; -template using FuncQuantilesExactHigh = AggregateFunctionQuantile, NameQuantilesExactHigh, false, void, true>; - -template using FuncQuantileExactExclusive = AggregateFunctionQuantile, NameQuantileExactExclusive, false, Float64, false>; -template using FuncQuantilesExactExclusive = AggregateFunctionQuantile, NameQuantilesExactExclusive, false, Float64, true>; - -template using FuncQuantileExactInclusive = AggregateFunctionQuantile, NameQuantileExactInclusive, false, Float64, false>; -template using FuncQuantilesExactInclusive = AggregateFunctionQuantile, NameQuantilesExactInclusive, false, Float64, true>; - -template using FuncQuantileExactWeighted = AggregateFunctionQuantile, NameQuantileExactWeighted, true, void, false>; -template using FuncQuantilesExactWeighted = AggregateFunctionQuantile, NameQuantilesExactWeighted, true, void, true>; - -template using FuncQuantileTiming = AggregateFunctionQuantile, NameQuantileTiming, false, Float32, false>; -template using FuncQuantilesTiming = AggregateFunctionQuantile, NameQuantilesTiming, false, Float32, true>; - -template using FuncQuantileTimingWeighted = AggregateFunctionQuantile, NameQuantileTimingWeighted, true, Float32, false>; -template using FuncQuantilesTimingWeighted = AggregateFunctionQuantile, NameQuantilesTimingWeighted, true, Float32, true>; - -template using FuncQuantileTDigest = AggregateFunctionQuantile, NameQuantileTDigest, false, std::conditional_t, false>; -template using FuncQuantilesTDigest = AggregateFunctionQuantile, NameQuantilesTDigest, false, std::conditional_t, true>; - -template using FuncQuantileTDigestWeighted = AggregateFunctionQuantile, NameQuantileTDigestWeighted, true, std::conditional_t, false>; -template using FuncQuantilesTDigestWeighted = AggregateFunctionQuantile, NameQuantilesTDigestWeighted, true, std::conditional_t, true>; - -template using FuncQuantileBFloat16 = AggregateFunctionQuantile, NameQuantileBFloat16, false, std::conditional_t, false>; -template using FuncQuantilesBFloat16 = AggregateFunctionQuantile, NameQuantilesBFloat16, false, std::conditional_t, true>; - -template using FuncQuantileBFloat16Weighted = AggregateFunctionQuantile, NameQuantileBFloat16Weighted, true, std::conditional_t, false>; -template using FuncQuantilesBFloat16Weighted = AggregateFunctionQuantile, NameQuantilesBFloat16Weighted, true, std::conditional_t, true>; - -template