diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 139e0ff68..3e018a6b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,14 +14,13 @@ concurrency: cancel-in-progress: true env: - BOOST_SPIRIT_X4_BUILD_JOBS: 4 + IRIS_X4_BUILD_JOBS: 4 jobs: changes: runs-on: ubuntu-latest outputs: - spirit_component: ${{ steps.filter.outputs.changes }} - x4: ${{ steps.filter.outputs.x4 }} + x4_component: ${{ steps.filter.outputs.changes }} steps: - uses: actions/checkout@v5 - uses: dorny/paths-filter@v3 @@ -32,15 +31,19 @@ jobs: - '.github/workflows/*.yml' - 'CMakeLists.txt' - 'test/CMakeLists.txt' - - 'include/boost/spirit/x4/**/*' - - 'include/boost/spirit/x4.hpp' + - 'include/iris/config.hpp' + - 'include/iris/core/**/*.hpp' + - 'include/iris/x4/**/*' + - 'include/iris/x4.hpp' - 'test/x4/**/*' + # ^^^ TODO: move `config.hpp` and `core/*` to `iris-cpp/iris` and remove the corresponding paths from above + build: - name: "[${{ matrix.cpp_version.name }}] ${{ matrix.spirit_component }} | ${{ matrix.compiler.toolset }}-${{ matrix.compiler.version }} (${{ matrix.build_type.name }}) @ ${{ matrix.os.name }}-${{ matrix.os.version }}" + name: "[${{ matrix.cpp_version.name }}] ${{ matrix.x4_component }} | ${{ matrix.compiler.toolset }}-${{ matrix.compiler.version }} (${{ matrix.build_type.name }}) @ ${{ matrix.os.name }}-${{ matrix.os.version }}" needs: changes - if: ${{ needs.changes.outputs.spirit_component != '[]' && needs.changes.outputs.spirit_component != '' }} + if: ${{ needs.changes.outputs.x4_component != '[]' && needs.changes.outputs.x4_component != '' }} runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }} @@ -80,7 +83,7 @@ jobs: builder_additional_args: -- "-consoleLoggerParameters:ForceConsoleColor" executable: cl - spirit_component: ${{ fromJSON(needs.changes.outputs.spirit_component) }} + x4_component: ${{ fromJSON(needs.changes.outputs.x4_component) }} exclude: # Blacklist all invalid combinations of environments @@ -212,7 +215,7 @@ jobs: shell: bash run: | set -xe - rm -rf libs/spirit_x4 + rm -rf libs/iris_x4 ./bootstrap.sh --with-toolset=${{ matrix.compiler.toolset }} ./b2 -d0 headers @@ -223,7 +226,7 @@ jobs: working-directory: ${{ steps.env-info.outputs.BOOST_ROOT }} shell: cmd run: | - rd /s /q libs\spirit_x4 + rd /s /q libs\iris_x4 .\bootstrap.bat --with-toolset=${{ matrix.compiler.toolset }} .\b2 -d0 headers @@ -241,7 +244,7 @@ jobs: uses: actions/cache/restore@v4 with: key: deps-${{ matrix.os.name }}-${{ matrix.os.version }}-${{ matrix.compiler.toolset }}-${{ steps.env-info.outputs.compiler-full-version }}-${{ matrix.cpp_version.name }}-${{ matrix.build_type.name }} - path: ${{ steps.env-info.outputs.BOOST_ROOT }}/libs/spirit_x4/build/_deps + path: ${{ steps.env-info.outputs.BOOST_ROOT }}/libs/iris_x4/build/_deps # Adapt CMP0168; enable caching in CI # https://cmake.org/cmake/help/latest/module/FetchContent.html#variable:FETCHCONTENT_UPDATES_DISCONNECTED @@ -250,9 +253,9 @@ jobs: shell: bash run: | if [ "${{ steps.cache-deps.outputs.cache-hit }}" = "true" ]; then - echo "BOOST_SPIRIT_X4_CMAKE_ARGS=-DFETCHCONTENT_FULLY_DISCONNECTED=ON" >> "$GITHUB_OUTPUT" + echo "IRIS_X4_CMAKE_ARGS=-DFETCHCONTENT_FULLY_DISCONNECTED=ON" >> "$GITHUB_OUTPUT" else - echo "BOOST_SPIRIT_X4_CMAKE_ARGS=" >> "$GITHUB_OUTPUT" + echo "IRIS_X4_CMAKE_ARGS=" >> "$GITHUB_OUTPUT" fi - name: Configure @@ -262,9 +265,9 @@ jobs: shell: bash run: | set -xe - cp -rp "${{ github.workspace }}" libs/spirit_x4 - cd libs/spirit_x4 - cmake ${{ steps.deps-info.outputs.BOOST_SPIRIT_X4_CMAKE_ARGS }} -B build \ + cp -rp "${{ github.workspace }}" libs/iris_x4 + cd libs/iris_x4 + cmake ${{ steps.deps-info.outputs.IRIS_X4_CMAKE_ARGS }} -B build \ -DCMAKE_CXX_COMPILER=${{ matrix.compiler.executable }} \ -DCMAKE_CXX_FLAGS="${{ matrix.compiler.cxxflags }}" \ -DCMAKE_CXX_STANDARD=${{ matrix.cpp_version.number }} \ @@ -272,19 +275,19 @@ jobs: -S . - name: Build Tests - working-directory: ${{ steps.env-info.outputs.BOOST_ROOT }}/libs/spirit_x4 + working-directory: ${{ steps.env-info.outputs.BOOST_ROOT }}/libs/iris_x4 run: | - cmake --build build --config ${{ matrix.build_type.name }} -j${{ env.BOOST_SPIRIT_X4_BUILD_JOBS }} ${{ matrix.compiler.builder_additional_args }} + cmake --build build --config ${{ matrix.build_type.name }} -j${{ env.IRIS_X4_BUILD_JOBS }} ${{ matrix.compiler.builder_additional_args }} - name: Cache CMake Dependencies (save) if: steps.cache-deps.outputs.cache-hit != 'true' uses: actions/cache/save@v4 with: key: ${{ steps.cache-deps.outputs.cache-primary-key }} - path: ${{ steps.env-info.outputs.BOOST_ROOT }}/libs/spirit_x4/build/_deps + path: ${{ steps.env-info.outputs.BOOST_ROOT }}/libs/iris_x4/build/_deps - name: Test env: CLICOLOR_FORCE: 1 - working-directory: ${{ steps.env-info.outputs.BOOST_ROOT }}/libs/spirit_x4/build/test + working-directory: ${{ steps.env-info.outputs.BOOST_ROOT }}/libs/iris_x4/build/test run: ctest --output-on-failure -C ${{ matrix.build_type.name }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 59596d722..1acab46b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,3 @@ -# Originally generated by `boostdep --cmake spirit`; modified by maintainers. -# DO NOT OVERWRITE THIS FILE WITH AUTO-GENERATED SCRIPTS. -# # Copyright 2020 Peter Dimov # Copyright 2025 Nana Sakisaka # @@ -16,15 +13,7 @@ if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE) ) endif() -if(DEFINED BOOST_SUPERPROJECT_VERSION) - set(BOOST_SPIRIT_X4_STANDALONE OFF) - set(BOOST_SPIRIT_X4_VERSION ${BOOST_SUPERPROJECT_VERSION}) -else() - set(BOOST_SPIRIT_X4_STANDALONE ON) - set(BOOST_SPIRIT_X4_VERSION 99.1.0) -endif() - -project(boost_spirit_x4 VERSION ${BOOST_SPIRIT_X4_VERSION} LANGUAGES CXX) +project(iris_x4 VERSION 1.0.0 LANGUAGES CXX) # ----------------------------------------------------------------- @@ -35,10 +24,10 @@ project(boost_spirit_x4 VERSION ${BOOST_SPIRIT_X4_VERSION} LANGUAGES CXX) set(CMAKE_COLOR_DIAGNOSTICS ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON) -option(BOOST_SPIRIT_X4_REMOVE_MINSIZEREL_CONFIG "Remove rarely used MinSizeRel config" ON) +option(IRIS_X4_REMOVE_MINSIZEREL_CONFIG "Remove rarely used MinSizeRel config" ON) if(MSVC) - if(BOOST_SPIRIT_X4_REMOVE_MINSIZEREL_CONFIG OR PROJECT_IS_TOP_LEVEL) + if(IRIS_X4_REMOVE_MINSIZEREL_CONFIG OR PROJECT_IS_TOP_LEVEL) list(REMOVE_ITEM CMAKE_CONFIGURATION_TYPES MinSizeRel) endif() endif() @@ -48,84 +37,84 @@ endif() # Create common base targets # Private component; do not depend on this. -add_library(_boost_spirit_x4_cxx_common INTERFACE) -set_target_properties(_boost_spirit_x4_cxx_common PROPERTIES CXX_EXTENSIONS OFF) +add_library(_iris_x4_cxx_common INTERFACE) +set_target_properties(_iris_x4_cxx_common PROPERTIES CXX_EXTENSIONS OFF) # ----------------------------------------------------------------- -# Create the main Spirit target +# Create the main X4 target if(MSVC) - add_library(boost_spirit_x4 OBJECT EXCLUDE_FROM_ALL) + add_library(iris_x4 OBJECT EXCLUDE_FROM_ALL) target_sources( - boost_spirit_x4 + iris_x4 PRIVATE # required for determining correct `/std:` flag "${PROJECT_SOURCE_DIR}/test/dummy.cpp" # "${PROJECT_SOURCE_DIR}/cpp.hint" # TODO - # "${PROJECT_SOURCE_DIR}/boost_spirit_x4.natvis" # TODO + # "${PROJECT_SOURCE_DIR}/iris_x4.natvis" # TODO ) else() - add_library(boost_spirit_x4 INTERFACE) + add_library(iris_x4 INTERFACE) endif() -add_library(Boost::spirit_x4 ALIAS boost_spirit_x4) -set_target_properties(boost_spirit_x4 PROPERTIES CXX_EXTENSIONS OFF) -target_link_libraries(boost_spirit_x4 INTERFACE _boost_spirit_x4_cxx_common) +add_library(Iris::X4 ALIAS iris_x4) +set_target_properties(iris_x4 PROPERTIES CXX_EXTENSIONS OFF) +target_link_libraries(iris_x4 INTERFACE _iris_x4_cxx_common) # ----------------------------------------------------------------- # Configure C++ version # Set minimal C++ version explicitly; avoid "/std:c++latest" -set(BOOST_SPIRIT_X4_CXX_FEATURE cxx_std_23) +set(IRIS_X4_CXX_FEATURE cxx_std_23) if(MSVC) if(CMAKE_CXX_STANDARD EQUAL 23) set(CMAKE_CXX23_STANDARD_COMPILE_OPTION "/std:c++23preview") set(CMAKE_CXX23_EXTENSION_COMPILE_OPTION "/std:c++23preview") - target_compile_options(_boost_spirit_x4_cxx_common INTERFACE /std:c++23preview) - target_compile_options(boost_spirit_x4 PRIVATE /std:c++23preview) # Set strict version for dummy.cpp + target_compile_options(_iris_x4_cxx_common INTERFACE /std:c++23preview) + target_compile_options(iris_x4 PRIVATE /std:c++23preview) # Set strict version for dummy.cpp else() # may become /std:c++latest only on this case - target_compile_features(_boost_spirit_x4_cxx_common INTERFACE ${BOOST_SPIRIT_X4_CXX_FEATURE}) - target_link_libraries(boost_spirit_x4 PRIVATE _boost_spirit_x4_cxx_common) # Virtually sets `/std:c++latest` for dummy.cpp + target_compile_features(_iris_x4_cxx_common INTERFACE ${IRIS_X4_CXX_FEATURE}) + target_link_libraries(iris_x4 PRIVATE _iris_x4_cxx_common) # Virtually sets `/std:c++latest` for dummy.cpp endif() else() # Non-MSVC - target_compile_features(_boost_spirit_x4_cxx_common INTERFACE ${BOOST_SPIRIT_X4_CXX_FEATURE}) # Sets appropriate `-std=c++XX` + target_compile_features(_iris_x4_cxx_common INTERFACE ${IRIS_X4_CXX_FEATURE}) # Sets appropriate `-std=c++XX` endif() -unset(BOOST_SPIRIT_X4_CXX_FEATURE) +unset(IRIS_X4_CXX_FEATURE) # ----------------------------------------------------------------- # Advanced compile/link settings if(MSVC) - # Don't set too strict flags for this! They must go to `boost_spirit_x4_cxx_test`. + # Don't set too strict flags for this! They must go to `iris_x4_cxx_test`. # ABI-dependent configurations MUST be set here. target_compile_definitions( - _boost_spirit_x4_cxx_common + _iris_x4_cxx_common INTERFACE UNICODE _UNICODE ) target_compile_options( - _boost_spirit_x4_cxx_common + _iris_x4_cxx_common INTERFACE /EHsc /MP /utf-8 /Zc:preprocessor /permissive- # $<$:/fsanitize=address> # TODO ) target_link_options( - _boost_spirit_x4_cxx_common + _iris_x4_cxx_common INTERFACE # $<$:/INCREMENTAL:NO> # TODO ) else() target_compile_options( - _boost_spirit_x4_cxx_common + _iris_x4_cxx_common INTERFACE # $<$:-fsanitize=undefined,address> # TODO ) target_link_options( - _boost_spirit_x4_cxx_common + _iris_x4_cxx_common INTERFACE # $<$:-fsanitize=undefined,address> # TODO ) @@ -135,77 +124,77 @@ endif() # ----------------------------------------------------------------- # External libraries -set(boost_spirit_x4_boost_deps "") +set(iris_x4_boost_deps "") # Everything required by `fusion` (manually confirmed) -list(APPEND boost_spirit_x4_boost_deps fusion) -list(APPEND boost_spirit_x4_boost_deps config) -list(APPEND boost_spirit_x4_boost_deps container_hash) -list(APPEND boost_spirit_x4_boost_deps describe) -list(APPEND boost_spirit_x4_boost_deps mp11) -list(APPEND boost_spirit_x4_boost_deps core) -list(APPEND boost_spirit_x4_boost_deps assert) -list(APPEND boost_spirit_x4_boost_deps static_assert) -list(APPEND boost_spirit_x4_boost_deps throw_exception) -list(APPEND boost_spirit_x4_boost_deps function_types) -list(APPEND boost_spirit_x4_boost_deps detail) -list(APPEND boost_spirit_x4_boost_deps mpl) -list(APPEND boost_spirit_x4_boost_deps preprocessor) -list(APPEND boost_spirit_x4_boost_deps type_traits) -list(APPEND boost_spirit_x4_boost_deps predef) -list(APPEND boost_spirit_x4_boost_deps utility) -list(APPEND boost_spirit_x4_boost_deps io) -list(APPEND boost_spirit_x4_boost_deps tuple) -list(APPEND boost_spirit_x4_boost_deps typeof) -list(APPEND boost_spirit_x4_boost_deps functional) -list(APPEND boost_spirit_x4_boost_deps function) -list(APPEND boost_spirit_x4_boost_deps bind) +list(APPEND iris_x4_boost_deps fusion) +list(APPEND iris_x4_boost_deps config) +list(APPEND iris_x4_boost_deps container_hash) +list(APPEND iris_x4_boost_deps describe) +list(APPEND iris_x4_boost_deps mp11) +list(APPEND iris_x4_boost_deps core) +list(APPEND iris_x4_boost_deps assert) +list(APPEND iris_x4_boost_deps static_assert) +list(APPEND iris_x4_boost_deps throw_exception) +list(APPEND iris_x4_boost_deps function_types) +list(APPEND iris_x4_boost_deps detail) +list(APPEND iris_x4_boost_deps mpl) +list(APPEND iris_x4_boost_deps preprocessor) +list(APPEND iris_x4_boost_deps type_traits) +list(APPEND iris_x4_boost_deps predef) +list(APPEND iris_x4_boost_deps utility) +list(APPEND iris_x4_boost_deps io) +list(APPEND iris_x4_boost_deps tuple) +list(APPEND iris_x4_boost_deps typeof) +list(APPEND iris_x4_boost_deps functional) +list(APPEND iris_x4_boost_deps function) +list(APPEND iris_x4_boost_deps bind) # Everything required by `variant` (manually confirmed) -list(APPEND boost_spirit_x4_boost_deps variant) -list(APPEND boost_spirit_x4_boost_deps integer) -list(APPEND boost_spirit_x4_boost_deps type_index) -list(APPEND boost_spirit_x4_boost_deps assert) -list(APPEND boost_spirit_x4_boost_deps config) -list(APPEND boost_spirit_x4_boost_deps container_hash) -list(APPEND boost_spirit_x4_boost_deps core) -list(APPEND boost_spirit_x4_boost_deps detail) -list(APPEND boost_spirit_x4_boost_deps mpl) -list(APPEND boost_spirit_x4_boost_deps preprocessor) -list(APPEND boost_spirit_x4_boost_deps static_assert) -list(APPEND boost_spirit_x4_boost_deps throw_exception) -list(APPEND boost_spirit_x4_boost_deps type_traits) -list(APPEND boost_spirit_x4_boost_deps utility) -list(APPEND boost_spirit_x4_boost_deps describe) -list(APPEND boost_spirit_x4_boost_deps mp11) -list(APPEND boost_spirit_x4_boost_deps predef) -list(APPEND boost_spirit_x4_boost_deps io) +list(APPEND iris_x4_boost_deps variant) +list(APPEND iris_x4_boost_deps integer) +list(APPEND iris_x4_boost_deps type_index) +list(APPEND iris_x4_boost_deps assert) +list(APPEND iris_x4_boost_deps config) +list(APPEND iris_x4_boost_deps container_hash) +list(APPEND iris_x4_boost_deps core) +list(APPEND iris_x4_boost_deps detail) +list(APPEND iris_x4_boost_deps mpl) +list(APPEND iris_x4_boost_deps preprocessor) +list(APPEND iris_x4_boost_deps static_assert) +list(APPEND iris_x4_boost_deps throw_exception) +list(APPEND iris_x4_boost_deps type_traits) +list(APPEND iris_x4_boost_deps utility) +list(APPEND iris_x4_boost_deps describe) +list(APPEND iris_x4_boost_deps mp11) +list(APPEND iris_x4_boost_deps predef) +list(APPEND iris_x4_boost_deps io) # Everything required by `preprocessor` (manually confirmed) -list(APPEND boost_spirit_x4_boost_deps preprocessor) +list(APPEND iris_x4_boost_deps preprocessor) # Everything required by `core` (manually confirmed) -list(APPEND boost_spirit_x4_boost_deps core) -list(APPEND boost_spirit_x4_boost_deps assert) -list(APPEND boost_spirit_x4_boost_deps config) -list(APPEND boost_spirit_x4_boost_deps static_assert) -list(APPEND boost_spirit_x4_boost_deps throw_exception) +list(APPEND iris_x4_boost_deps core) +list(APPEND iris_x4_boost_deps assert) +list(APPEND iris_x4_boost_deps config) +list(APPEND iris_x4_boost_deps static_assert) +list(APPEND iris_x4_boost_deps throw_exception) # --------------------------------------------- -list(REMOVE_DUPLICATES boost_spirit_x4_boost_deps) +list(REMOVE_DUPLICATES iris_x4_boost_deps) -if(BOOST_SPIRIT_X4_STANDALONE) - foreach(dep IN LISTS boost_spirit_x4_boost_deps) - add_subdirectory(../${dep} build_deps/${dep}) - endforeach() +foreach(dep IN LISTS iris_x4_boost_deps) + add_subdirectory(../${dep} build_deps/${dep}) +endforeach() - # find_package(...) - # target_link_libraries(boost_spirit_x4 INTERFACE ...) -endif() +# find_package(...) +# target_link_libraries(iris_x4 INTERFACE ...) + +# TODO: link Iris::iris -foreach(dep IN LISTS boost_spirit_x4_boost_deps) +foreach(dep IN LISTS iris_x4_boost_deps) target_link_libraries( - boost_spirit_x4 + iris_x4 INTERFACE Boost::${dep} ) @@ -213,23 +202,23 @@ endforeach() # ----------------------------------------------------------------- -# Configure Spirit main target +# Configure X4 main target file( - GLOB_RECURSE BOOST_SPIRIT_X4_HEADERS - ${PROJECT_SOURCE_DIR}/include/boost/spirit/*.hpp - ${PROJECT_SOURCE_DIR}/include/boost/spirit/*.ipp + GLOB_RECURSE IRIS_X4_HEADERS + ${PROJECT_SOURCE_DIR}/include/iris/*.hpp + ${PROJECT_SOURCE_DIR}/include/iris/*.ipp ) target_sources( - boost_spirit_x4 - PRIVATE FILE_SET HEADERS TYPE HEADERS FILES ${BOOST_SPIRIT_X4_HEADERS} + iris_x4 + PRIVATE FILE_SET HEADERS TYPE HEADERS FILES ${IRIS_X4_HEADERS} ) source_group( - TREE ${PROJECT_SOURCE_DIR}/include/boost FILES ${BOOST_SPIRIT_X4_HEADERS} + TREE ${PROJECT_SOURCE_DIR}/include/iris PREFIX iris FILES ${IRIS_X4_HEADERS} ) target_include_directories( - boost_spirit_x4 + iris_x4 INTERFACE ${PROJECT_SOURCE_DIR}/include ) @@ -245,6 +234,6 @@ if(BUILD_TESTING) add_subdirectory(test) if(MSVC) - set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT Boost::spirit_x4) + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT Iris::X4) endif() endif() diff --git a/README.md b/README.md index c0cd39bf4..90c822c13 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,6 @@ -# Spirit.X4 [![Build Status](https://github.com/boostorg/spirit_x4/actions/workflows/ci.yml/badge.svg)](https://github.com/boostorg/spirit_x4/actions/workflows/ci.yml) +# Iris.X4 [![Build Status](https://github.com/iris-cpp/x4/actions/workflows/ci.yml/badge.svg)](https://github.com/iris-cpp/x4/actions/workflows/ci.yml) -> **Spirit.X4 is currently under heavy development.** -> -> **This library is official, but still under progress, and is not part of the `boostorg/boost` superproject (yet).** -> -> For background information, see: -> -> - -> - -> - - - -[**Boost.Spirit.X4**](https://github.com/boostorg/spirit_x4) is a modern, header-only PEG parser combinator library for C++23. It lets you write EBNF-like grammars directly in C++ with deterministic, top-down parsing (ordered choice, lookahead, greedy repetition). +[**Iris.X4**](https://github.com/iris-cpp/x4) is a modern, header-only PEG parser combinator library for C++23. It lets you write EBNF-like grammars directly in C++ with deterministic, top-down parsing (ordered choice, lookahead, greedy repetition). X4 succeeds [Boost.Spirit.X3](https://github.com/boostorg/spirit) and is redesigned for clarity, maintainability, and performance using modern C++ features such as concepts and constexpr. @@ -24,10 +13,12 @@ X4 scales from quick prototypes to production parsers for DSLs, data formats, an - Clang 21 - MSVC 2022 -## How to use Spirit +## How to use X4 ### Step 1. Setup the Boost superproject +Note: Boost dependency is going to be removed entirely in the near future. + #### For applications: ```console @@ -36,23 +27,21 @@ cd my_app git submodule add https://github.com/boostorg/boost.git modules/boost cd modules/boost -# Not required after X4 is officially shipped -git submodule add https://github.com/boostorg/spirit_x4.git libs/spirit_x4 +git submodule add https://github.com/iris-cpp/x4.git libs/iris_x4 ``` -#### For Spirit development: +#### For X4 development: ```console git clone https://github.com/boostorg/boost.git cd boost -# Not required after X4 is officially shipped -git clone https://github.com/boostorg/spirit_x4.git libs/spirit_x4 +git clone https://github.com/iris-cpp/x4.git libs/iris_x4 ``` ### Step 2. Setup the dependent Boost libraries -We're trying hard to reduce these dependencies. We aim to remove these entirely in the future. +Note: Boost dependency is going to be removed entirely in the near future. ```console git submodule update --init --depth 1 --recursive -- \ @@ -72,41 +61,20 @@ git submodule update --init --depth 1 --recursive -- \ .\b2 headers ``` -### Step 3. Start using Spirit +### Step 3. Start using X4 #### For applications: Edit your `CMakeLists.txt`: ```cmake -add_subdirectory(modules/boost/libs/spirit_x4) -target_link_libraries(my_app PRIVATE Boost::spirit_x4) +add_subdirectory(modules/boost/libs/iris_x4) +target_link_libraries(my_app PRIVATE Iris::X4) ``` -#### For developing Spirit: +#### For developing X4: ```console -cd libs/spirit_x4 +cd iris_x4 cmake -B build ``` - - -## History - -Date | Boost | Commit | Event ----------- | ----- | ------- | ----------------------------------------------- -2025-09-18 | N/A | `60c08ab` | Full CMake support added to X4. -2025-09-13 | N/A | `9c0fc51` | Spirit.X3 and V2 are officially deprecated in favor of X4. Obsolete versions are feature-frozen and will accept security patches only. -2025-09-12 | N/A | N/A | The modernization effort was [officially approved](https://lists.boost.org/archives/list/boost@lists.boost.org/thread/K3EQLEQJHEUBROB6ODUKTZHFP2FDUS2E/?sort=date) as the independent library, [Spirit.X4]. Note: it is not part of the `boostorg/boost` superproject at this moment yet. -2025-09-05 | N/A | `d21af8b` | The development of the C++23 modernization began. -2014-03-18 | 1.56 | `8a35332` | Spirit.X3 is added. -2013-12-14 | 1.56 | `c0537c8` | Phoenix V2 is retired. -2011-03-28 | 1.47 | `400a764` | [Phoenix V3] support is added to Spirit V2. -2009-04-30 | 1.41 | `5963a39` | [Spirit.Repository] appeared. -2008-04-13 | 1.36 | `ffd0cc1` | Spirit V2 (Qi, Karma, Lex, Phoenix V2) is added. -2006-08-23 | 1.35 | `2dc892b` | Fusion V1 is retired. -2003‑01‑31 | 1.30 | `8190791` | Spirit joined the Boost C++ Libraries. - -[Spirit.X4]: https://github.com/boostorg/spirit_x4 -[Phoenix V3]: http://boost.org/libs/phoenix -[Spirit.Repository]: http://www.boost.org/doc/libs/develop/libs/spirit/doc/html/spirit/repository.html diff --git a/include/boost/spirit/x4/char.hpp b/include/boost/spirit/x4/char.hpp deleted file mode 100644 index 109ed21c9..000000000 --- a/include/boost/spirit/x4/char.hpp +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_HPP -#define BOOST_SPIRIT_X4_CHAR_HPP - -/*============================================================================= - Copyright (c) 2001-2014 Joel de Guzman - Copyright (c) 2025 Nana Sakisaka - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -==============================================================================*/ - -#include -#include -#include -#include -#include -#include - -#ifdef BOOST_SPIRIT_X4_UNICODE -# include -#endif - -#endif diff --git a/include/boost/spirit/x4/char/unicode_char_class.hpp b/include/boost/spirit/x4/char/unicode_char_class.hpp deleted file mode 100644 index 3a84158a2..000000000 --- a/include/boost/spirit/x4/char/unicode_char_class.hpp +++ /dev/null @@ -1,812 +0,0 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_UNICODE_CHAR_CLASS_HPP -#define BOOST_SPIRIT_X4_CHAR_UNICODE_CHAR_CLASS_HPP - -/*============================================================================= - Copyright (c) 2001-2014 Joel de Guzman - Copyright (c) 2025 Nana Sakisaka - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -==============================================================================*/ - -#include -#include -#include -#include - -namespace boost::spirit::x4 { - -namespace char_classes::unicode { - -// Common Categories (semantically compatible with `standard::*` variants) - -using char_tag = char_classes::char_tag; -using alnum_tag = char_classes::alnum_tag; -using alpha_tag = char_classes::alpha_tag; -using digit_tag = char_classes::digit_tag; -using xdigit_tag = char_classes::xdigit_tag; -using cntrl_tag = char_classes::cntrl_tag; -using graph_tag = char_classes::graph_tag; -using lower_tag = char_classes::lower_tag; -using print_tag = char_classes::print_tag; -using punct_tag = char_classes::punct_tag; -using space_tag = char_classes::space_tag; -using blank_tag = char_classes::blank_tag; -using upper_tag = char_classes::upper_tag; - -// Unicode Major Categories - -struct letter_tag {}; -struct mark_tag {}; -struct number_tag {}; -struct separator_tag {}; -struct other_tag {}; -struct punctuation_tag {}; -struct symbol_tag {}; - -// Unicode General Categories - -struct uppercase_letter_tag {}; -struct lowercase_letter_tag {}; -struct titlecase_letter_tag {}; -struct modifier_letter_tag {}; -struct other_letter_tag {}; - -struct nonspacing_mark_tag {}; -struct enclosing_mark_tag {}; -struct spacing_mark_tag {}; - -struct decimal_number_tag {}; -struct letter_number_tag {}; -struct other_number_tag {}; - -struct space_separator_tag {}; -struct line_separator_tag {}; -struct paragraph_separator_tag {}; - -struct control_tag {}; -struct format_tag {}; -struct private_use_tag {}; -struct surrogate_tag {}; -struct unassigned_tag {}; - -struct dash_punctuation_tag {}; -struct open_punctuation_tag {}; -struct close_punctuation_tag {}; -struct connector_punctuation_tag {}; -struct other_punctuation_tag {}; -struct initial_punctuation_tag {}; -struct final_punctuation_tag {}; - -struct math_symbol_tag {}; -struct currency_symbol_tag {}; -struct modifier_symbol_tag {}; -struct other_symbol_tag {}; - -// Unicode Derived Categories - -struct alphabetic_tag {}; -struct uppercase_tag {}; -struct lowercase_tag {}; -struct white_space_tag {}; -struct hex_digit_tag {}; -struct noncharacter_code_point_tag {}; -struct default_ignorable_code_point_tag {}; - -// Unicode Scripts - -struct adlam_tag {}; -struct caucasian_albanian_tag {}; -struct ahom_tag {}; -struct arabic_tag {}; -struct imperial_aramaic_tag {}; -struct armenian_tag {}; -struct avestan_tag {}; -struct balinese_tag {}; -struct bamum_tag {}; -struct bassa_vah_tag {}; -struct batak_tag {}; -struct bengali_tag {}; -struct bhaiksuki_tag {}; -struct bopomofo_tag {}; -struct brahmi_tag {}; -struct braille_tag {}; -struct buginese_tag {}; -struct buhid_tag {}; -struct chakma_tag {}; -struct canadian_aboriginal_tag {}; -struct carian_tag {}; -struct cham_tag {}; -struct cherokee_tag {}; -struct chorasmian_tag {}; -struct coptic_tag {}; -struct cypro_minoan_tag {}; -struct cypriot_tag {}; -struct cyrillic_tag {}; -struct devanagari_tag {}; -struct dives_akuru_tag {}; -struct dogra_tag {}; -struct deseret_tag {}; -struct duployan_tag {}; -struct egyptian_hieroglyphs_tag {}; -struct elbasan_tag {}; -struct elymaic_tag {}; -struct ethiopic_tag {}; -struct georgian_tag {}; -struct glagolitic_tag {}; -struct gunjala_gondi_tag {}; -struct masaram_gondi_tag {}; -struct gothic_tag {}; -struct grantha_tag {}; -struct greek_tag {}; -struct gujarati_tag {}; -struct gurmukhi_tag {}; -struct hangul_tag {}; -struct han_tag {}; -struct hanunoo_tag {}; -struct hatran_tag {}; -struct hebrew_tag {}; -struct hiragana_tag {}; -struct anatolian_hieroglyphs_tag {}; -struct pahawh_hmong_tag {}; -struct nyiakeng_puachue_hmong_tag {}; -struct katakana_or_hiragana_tag {}; -struct old_hungarian_tag {}; -struct old_italic_tag {}; -struct javanese_tag {}; -struct kayah_li_tag {}; -struct katakana_tag {}; -struct kawi_tag {}; -struct kharoshthi_tag {}; -struct khmer_tag {}; -struct khojki_tag {}; -struct khitan_small_script_tag {}; -struct kannada_tag {}; -struct kaithi_tag {}; -struct tai_tham_tag {}; -struct lao_tag {}; -struct latin_tag {}; -struct lepcha_tag {}; -struct limbu_tag {}; -struct linear_a_tag {}; -struct linear_b_tag {}; -struct lisu_tag {}; -struct lycian_tag {}; -struct lydian_tag {}; -struct mahajani_tag {}; -struct makasar_tag {}; -struct mandaic_tag {}; -struct manichaean_tag {}; -struct marchen_tag {}; -struct medefaidrin_tag {}; -struct mende_kikakui_tag {}; -struct meroitic_cursive_tag {}; -struct meroitic_hieroglyphs_tag {}; -struct malayalam_tag {}; -struct modi_tag {}; -struct mongolian_tag {}; -struct mro_tag {}; -struct meetei_mayek_tag {}; -struct multani_tag {}; -struct myanmar_tag {}; -struct nag_mundari_tag {}; -struct nandinagari_tag {}; -struct old_north_arabian_tag {}; -struct nabataean_tag {}; -struct newa_tag {}; -struct nko_tag {}; -struct nushu_tag {}; -struct ogham_tag {}; -struct ol_chiki_tag {}; -struct old_turkic_tag {}; -struct oriya_tag {}; -struct osage_tag {}; -struct osmanya_tag {}; -struct old_uyghur_tag {}; -struct palmyrene_tag {}; -struct pau_cin_hau_tag {}; -struct old_permic_tag {}; -struct phags_pa_tag {}; -struct inscriptional_pahlavi_tag {}; -struct psalter_pahlavi_tag {}; -struct phoenician_tag {}; -struct miao_tag {}; -struct inscriptional_parthian_tag {}; -struct rejang_tag {}; -struct hanifi_rohingya_tag {}; -struct runic_tag {}; -struct samaritan_tag {}; -struct old_south_arabian_tag {}; -struct saurashtra_tag {}; -struct signwriting_tag {}; -struct shavian_tag {}; -struct sharada_tag {}; -struct siddham_tag {}; -struct khudawadi_tag {}; -struct sinhala_tag {}; -struct sogdian_tag {}; -struct old_sogdian_tag {}; -struct sora_sompeng_tag {}; -struct soyombo_tag {}; -struct sundanese_tag {}; -struct syloti_nagri_tag {}; -struct syriac_tag {}; -struct tagbanwa_tag {}; -struct takri_tag {}; -struct tai_le_tag {}; -struct new_tai_lue_tag {}; -struct tamil_tag {}; -struct tangut_tag {}; -struct tai_viet_tag {}; -struct telugu_tag {}; -struct tifinagh_tag {}; -struct tagalog_tag {}; -struct thaana_tag {}; -struct thai_tag {}; -struct tibetan_tag {}; -struct tirhuta_tag {}; -struct tangsa_tag {}; -struct toto_tag {}; -struct ugaritic_tag {}; -struct vai_tag {}; -struct vithkuqi_tag {}; -struct warang_citi_tag {}; -struct wancho_tag {}; -struct old_persian_tag {}; -struct cuneiform_tag {}; -struct yezidi_tag {}; -struct yi_tag {}; -struct zanabazar_square_tag {}; -struct inherited_tag {}; -struct common_tag {}; -struct unknown_tag {}; - -} // char_classes::unicode - -namespace detail { - -struct unicode_char_class_base -{ - using encoding_type = char_encoding::unicode; - using char_type = char_encoding::unicode::char_type; - -#define BOOST_SPIRIT_X4_BASIC_CLASSIFY(name) \ - template \ - static constexpr bool \ - is(char_classes::unicode::name##_tag, Char ch) noexcept \ - { \ - return (encoding_type::is##name)(detail::cast_char(ch)); \ - } - -#define BOOST_SPIRIT_X4_CLASSIFY(name) \ - template \ - static constexpr bool \ - is(char_classes::unicode::name##_tag, Char ch) noexcept \ - { \ - return (encoding_type::is_##name)(detail::cast_char(ch)); \ - } - - // Unicode Major Categories - - BOOST_SPIRIT_X4_BASIC_CLASSIFY(char) - BOOST_SPIRIT_X4_BASIC_CLASSIFY(alnum) - BOOST_SPIRIT_X4_BASIC_CLASSIFY(alpha) - BOOST_SPIRIT_X4_BASIC_CLASSIFY(digit) - BOOST_SPIRIT_X4_BASIC_CLASSIFY(xdigit) - BOOST_SPIRIT_X4_BASIC_CLASSIFY(cntrl) - BOOST_SPIRIT_X4_BASIC_CLASSIFY(graph) - BOOST_SPIRIT_X4_BASIC_CLASSIFY(lower) - BOOST_SPIRIT_X4_BASIC_CLASSIFY(print) - BOOST_SPIRIT_X4_BASIC_CLASSIFY(punct) - BOOST_SPIRIT_X4_BASIC_CLASSIFY(space) - BOOST_SPIRIT_X4_BASIC_CLASSIFY(blank) - BOOST_SPIRIT_X4_BASIC_CLASSIFY(upper) - - // Unicode Major Categories - - BOOST_SPIRIT_X4_CLASSIFY(letter) - BOOST_SPIRIT_X4_CLASSIFY(mark) - BOOST_SPIRIT_X4_CLASSIFY(number) - BOOST_SPIRIT_X4_CLASSIFY(separator) - BOOST_SPIRIT_X4_CLASSIFY(other) - BOOST_SPIRIT_X4_CLASSIFY(punctuation) - BOOST_SPIRIT_X4_CLASSIFY(symbol) - - // Unicode General Categories - - BOOST_SPIRIT_X4_CLASSIFY(uppercase_letter) - BOOST_SPIRIT_X4_CLASSIFY(lowercase_letter) - BOOST_SPIRIT_X4_CLASSIFY(titlecase_letter) - BOOST_SPIRIT_X4_CLASSIFY(modifier_letter) - BOOST_SPIRIT_X4_CLASSIFY(other_letter) - - BOOST_SPIRIT_X4_CLASSIFY(nonspacing_mark) - BOOST_SPIRIT_X4_CLASSIFY(enclosing_mark) - BOOST_SPIRIT_X4_CLASSIFY(spacing_mark) - - BOOST_SPIRIT_X4_CLASSIFY(decimal_number) - BOOST_SPIRIT_X4_CLASSIFY(letter_number) - BOOST_SPIRIT_X4_CLASSIFY(other_number) - - BOOST_SPIRIT_X4_CLASSIFY(space_separator) - BOOST_SPIRIT_X4_CLASSIFY(line_separator) - BOOST_SPIRIT_X4_CLASSIFY(paragraph_separator) - - BOOST_SPIRIT_X4_CLASSIFY(control) - BOOST_SPIRIT_X4_CLASSIFY(format) - BOOST_SPIRIT_X4_CLASSIFY(private_use) - BOOST_SPIRIT_X4_CLASSIFY(surrogate) - BOOST_SPIRIT_X4_CLASSIFY(unassigned) - - BOOST_SPIRIT_X4_CLASSIFY(dash_punctuation) - BOOST_SPIRIT_X4_CLASSIFY(open_punctuation) - BOOST_SPIRIT_X4_CLASSIFY(close_punctuation) - BOOST_SPIRIT_X4_CLASSIFY(connector_punctuation) - BOOST_SPIRIT_X4_CLASSIFY(other_punctuation) - BOOST_SPIRIT_X4_CLASSIFY(initial_punctuation) - BOOST_SPIRIT_X4_CLASSIFY(final_punctuation) - - BOOST_SPIRIT_X4_CLASSIFY(math_symbol) - BOOST_SPIRIT_X4_CLASSIFY(currency_symbol) - BOOST_SPIRIT_X4_CLASSIFY(modifier_symbol) - BOOST_SPIRIT_X4_CLASSIFY(other_symbol) - - // Unicode Derived Categories - - BOOST_SPIRIT_X4_CLASSIFY(alphabetic) - BOOST_SPIRIT_X4_CLASSIFY(uppercase) - BOOST_SPIRIT_X4_CLASSIFY(lowercase) - BOOST_SPIRIT_X4_CLASSIFY(white_space) - BOOST_SPIRIT_X4_CLASSIFY(hex_digit) - BOOST_SPIRIT_X4_CLASSIFY(noncharacter_code_point) - BOOST_SPIRIT_X4_CLASSIFY(default_ignorable_code_point) - - // Unicode Scripts - - BOOST_SPIRIT_X4_CLASSIFY(adlam) - BOOST_SPIRIT_X4_CLASSIFY(caucasian_albanian) - BOOST_SPIRIT_X4_CLASSIFY(ahom) - BOOST_SPIRIT_X4_CLASSIFY(arabic) - BOOST_SPIRIT_X4_CLASSIFY(imperial_aramaic) - BOOST_SPIRIT_X4_CLASSIFY(armenian) - BOOST_SPIRIT_X4_CLASSIFY(avestan) - BOOST_SPIRIT_X4_CLASSIFY(balinese) - BOOST_SPIRIT_X4_CLASSIFY(bamum) - BOOST_SPIRIT_X4_CLASSIFY(bassa_vah) - BOOST_SPIRIT_X4_CLASSIFY(batak) - BOOST_SPIRIT_X4_CLASSIFY(bengali) - BOOST_SPIRIT_X4_CLASSIFY(bhaiksuki) - BOOST_SPIRIT_X4_CLASSIFY(bopomofo) - BOOST_SPIRIT_X4_CLASSIFY(brahmi) - BOOST_SPIRIT_X4_CLASSIFY(braille) - BOOST_SPIRIT_X4_CLASSIFY(buginese) - BOOST_SPIRIT_X4_CLASSIFY(buhid) - BOOST_SPIRIT_X4_CLASSIFY(chakma) - BOOST_SPIRIT_X4_CLASSIFY(canadian_aboriginal) - BOOST_SPIRIT_X4_CLASSIFY(carian) - BOOST_SPIRIT_X4_CLASSIFY(cham) - BOOST_SPIRIT_X4_CLASSIFY(cherokee) - BOOST_SPIRIT_X4_CLASSIFY(chorasmian) - BOOST_SPIRIT_X4_CLASSIFY(coptic) - BOOST_SPIRIT_X4_CLASSIFY(cypro_minoan) - BOOST_SPIRIT_X4_CLASSIFY(cypriot) - BOOST_SPIRIT_X4_CLASSIFY(cyrillic) - BOOST_SPIRIT_X4_CLASSIFY(devanagari) - BOOST_SPIRIT_X4_CLASSIFY(dives_akuru) - BOOST_SPIRIT_X4_CLASSIFY(dogra) - BOOST_SPIRIT_X4_CLASSIFY(deseret) - BOOST_SPIRIT_X4_CLASSIFY(duployan) - BOOST_SPIRIT_X4_CLASSIFY(egyptian_hieroglyphs) - BOOST_SPIRIT_X4_CLASSIFY(elbasan) - BOOST_SPIRIT_X4_CLASSIFY(elymaic) - BOOST_SPIRIT_X4_CLASSIFY(ethiopic) - BOOST_SPIRIT_X4_CLASSIFY(georgian) - BOOST_SPIRIT_X4_CLASSIFY(glagolitic) - BOOST_SPIRIT_X4_CLASSIFY(gunjala_gondi) - BOOST_SPIRIT_X4_CLASSIFY(masaram_gondi) - BOOST_SPIRIT_X4_CLASSIFY(gothic) - BOOST_SPIRIT_X4_CLASSIFY(grantha) - BOOST_SPIRIT_X4_CLASSIFY(greek) - BOOST_SPIRIT_X4_CLASSIFY(gujarati) - BOOST_SPIRIT_X4_CLASSIFY(gurmukhi) - BOOST_SPIRIT_X4_CLASSIFY(hangul) - BOOST_SPIRIT_X4_CLASSIFY(han) - BOOST_SPIRIT_X4_CLASSIFY(hanunoo) - BOOST_SPIRIT_X4_CLASSIFY(hatran) - BOOST_SPIRIT_X4_CLASSIFY(hebrew) - BOOST_SPIRIT_X4_CLASSIFY(hiragana) - BOOST_SPIRIT_X4_CLASSIFY(anatolian_hieroglyphs) - BOOST_SPIRIT_X4_CLASSIFY(pahawh_hmong) - BOOST_SPIRIT_X4_CLASSIFY(nyiakeng_puachue_hmong) - BOOST_SPIRIT_X4_CLASSIFY(katakana_or_hiragana) - BOOST_SPIRIT_X4_CLASSIFY(old_hungarian) - BOOST_SPIRIT_X4_CLASSIFY(old_italic) - BOOST_SPIRIT_X4_CLASSIFY(javanese) - BOOST_SPIRIT_X4_CLASSIFY(kayah_li) - BOOST_SPIRIT_X4_CLASSIFY(katakana) - BOOST_SPIRIT_X4_CLASSIFY(kawi) - BOOST_SPIRIT_X4_CLASSIFY(kharoshthi) - BOOST_SPIRIT_X4_CLASSIFY(khmer) - BOOST_SPIRIT_X4_CLASSIFY(khojki) - BOOST_SPIRIT_X4_CLASSIFY(khitan_small_script) - BOOST_SPIRIT_X4_CLASSIFY(kannada) - BOOST_SPIRIT_X4_CLASSIFY(kaithi) - BOOST_SPIRIT_X4_CLASSIFY(tai_tham) - BOOST_SPIRIT_X4_CLASSIFY(lao) - BOOST_SPIRIT_X4_CLASSIFY(latin) - BOOST_SPIRIT_X4_CLASSIFY(lepcha) - BOOST_SPIRIT_X4_CLASSIFY(limbu) - BOOST_SPIRIT_X4_CLASSIFY(linear_a) - BOOST_SPIRIT_X4_CLASSIFY(linear_b) - BOOST_SPIRIT_X4_CLASSIFY(lisu) - BOOST_SPIRIT_X4_CLASSIFY(lycian) - BOOST_SPIRIT_X4_CLASSIFY(lydian) - BOOST_SPIRIT_X4_CLASSIFY(mahajani) - BOOST_SPIRIT_X4_CLASSIFY(makasar) - BOOST_SPIRIT_X4_CLASSIFY(mandaic) - BOOST_SPIRIT_X4_CLASSIFY(manichaean) - BOOST_SPIRIT_X4_CLASSIFY(marchen) - BOOST_SPIRIT_X4_CLASSIFY(medefaidrin) - BOOST_SPIRIT_X4_CLASSIFY(mende_kikakui) - BOOST_SPIRIT_X4_CLASSIFY(meroitic_cursive) - BOOST_SPIRIT_X4_CLASSIFY(meroitic_hieroglyphs) - BOOST_SPIRIT_X4_CLASSIFY(malayalam) - BOOST_SPIRIT_X4_CLASSIFY(modi) - BOOST_SPIRIT_X4_CLASSIFY(mongolian) - BOOST_SPIRIT_X4_CLASSIFY(mro) - BOOST_SPIRIT_X4_CLASSIFY(meetei_mayek) - BOOST_SPIRIT_X4_CLASSIFY(multani) - BOOST_SPIRIT_X4_CLASSIFY(myanmar) - BOOST_SPIRIT_X4_CLASSIFY(nag_mundari) - BOOST_SPIRIT_X4_CLASSIFY(nandinagari) - BOOST_SPIRIT_X4_CLASSIFY(old_north_arabian) - BOOST_SPIRIT_X4_CLASSIFY(nabataean) - BOOST_SPIRIT_X4_CLASSIFY(newa) - BOOST_SPIRIT_X4_CLASSIFY(nko) - BOOST_SPIRIT_X4_CLASSIFY(nushu) - BOOST_SPIRIT_X4_CLASSIFY(ogham) - BOOST_SPIRIT_X4_CLASSIFY(ol_chiki) - BOOST_SPIRIT_X4_CLASSIFY(old_turkic) - BOOST_SPIRIT_X4_CLASSIFY(oriya) - BOOST_SPIRIT_X4_CLASSIFY(osage) - BOOST_SPIRIT_X4_CLASSIFY(osmanya) - BOOST_SPIRIT_X4_CLASSIFY(old_uyghur) - BOOST_SPIRIT_X4_CLASSIFY(palmyrene) - BOOST_SPIRIT_X4_CLASSIFY(pau_cin_hau) - BOOST_SPIRIT_X4_CLASSIFY(old_permic) - BOOST_SPIRIT_X4_CLASSIFY(phags_pa) - BOOST_SPIRIT_X4_CLASSIFY(inscriptional_pahlavi) - BOOST_SPIRIT_X4_CLASSIFY(psalter_pahlavi) - BOOST_SPIRIT_X4_CLASSIFY(phoenician) - BOOST_SPIRIT_X4_CLASSIFY(miao) - BOOST_SPIRIT_X4_CLASSIFY(inscriptional_parthian) - BOOST_SPIRIT_X4_CLASSIFY(rejang) - BOOST_SPIRIT_X4_CLASSIFY(hanifi_rohingya) - BOOST_SPIRIT_X4_CLASSIFY(runic) - BOOST_SPIRIT_X4_CLASSIFY(samaritan) - BOOST_SPIRIT_X4_CLASSIFY(old_south_arabian) - BOOST_SPIRIT_X4_CLASSIFY(saurashtra) - BOOST_SPIRIT_X4_CLASSIFY(signwriting) - BOOST_SPIRIT_X4_CLASSIFY(shavian) - BOOST_SPIRIT_X4_CLASSIFY(sharada) - BOOST_SPIRIT_X4_CLASSIFY(siddham) - BOOST_SPIRIT_X4_CLASSIFY(khudawadi) - BOOST_SPIRIT_X4_CLASSIFY(sinhala) - BOOST_SPIRIT_X4_CLASSIFY(sogdian) - BOOST_SPIRIT_X4_CLASSIFY(old_sogdian) - BOOST_SPIRIT_X4_CLASSIFY(sora_sompeng) - BOOST_SPIRIT_X4_CLASSIFY(soyombo) - BOOST_SPIRIT_X4_CLASSIFY(sundanese) - BOOST_SPIRIT_X4_CLASSIFY(syloti_nagri) - BOOST_SPIRIT_X4_CLASSIFY(syriac) - BOOST_SPIRIT_X4_CLASSIFY(tagbanwa) - BOOST_SPIRIT_X4_CLASSIFY(takri) - BOOST_SPIRIT_X4_CLASSIFY(tai_le) - BOOST_SPIRIT_X4_CLASSIFY(new_tai_lue) - BOOST_SPIRIT_X4_CLASSIFY(tamil) - BOOST_SPIRIT_X4_CLASSIFY(tangut) - BOOST_SPIRIT_X4_CLASSIFY(tai_viet) - BOOST_SPIRIT_X4_CLASSIFY(telugu) - BOOST_SPIRIT_X4_CLASSIFY(tifinagh) - BOOST_SPIRIT_X4_CLASSIFY(tagalog) - BOOST_SPIRIT_X4_CLASSIFY(thaana) - BOOST_SPIRIT_X4_CLASSIFY(thai) - BOOST_SPIRIT_X4_CLASSIFY(tibetan) - BOOST_SPIRIT_X4_CLASSIFY(tirhuta) - BOOST_SPIRIT_X4_CLASSIFY(tangsa) - BOOST_SPIRIT_X4_CLASSIFY(toto) - BOOST_SPIRIT_X4_CLASSIFY(ugaritic) - BOOST_SPIRIT_X4_CLASSIFY(vai) - BOOST_SPIRIT_X4_CLASSIFY(vithkuqi) - BOOST_SPIRIT_X4_CLASSIFY(warang_citi) - BOOST_SPIRIT_X4_CLASSIFY(wancho) - BOOST_SPIRIT_X4_CLASSIFY(old_persian) - BOOST_SPIRIT_X4_CLASSIFY(cuneiform) - BOOST_SPIRIT_X4_CLASSIFY(yezidi) - BOOST_SPIRIT_X4_CLASSIFY(yi) - BOOST_SPIRIT_X4_CLASSIFY(zanabazar_square) - BOOST_SPIRIT_X4_CLASSIFY(inherited) - BOOST_SPIRIT_X4_CLASSIFY(common) - BOOST_SPIRIT_X4_CLASSIFY(unknown) - -#undef BOOST_SPIRIT_X4_BASIC_CLASSIFY -#undef BOOST_SPIRIT_X4_CLASSIFY -}; - -} // detail - -template -struct unicode_char_class : char_parser> -{ - using encoding_type = char_encoding::unicode; - using tag = Tag; - using char_type = typename encoding_type::char_type; - using attribute_type = char_type; - - static constexpr bool has_attribute = true; - - [[nodiscard]] static constexpr bool - test(char_encoding::unicode::classify_type const classify_ch, auto const& /* ctx */) noexcept - { - static_assert(noexcept(encoding_type::ischar(classify_ch) && detail::unicode_char_class_base::is(tag{}, classify_ch))); - return encoding_type::ischar(classify_ch) && detail::unicode_char_class_base::is(tag{}, classify_ch); - } - - static constexpr void test(auto const, auto const&) = delete; // Mixing incompatible char types is not allowed -}; - -#define BOOST_SPIRIT_X4_CHAR_CLASS(name) \ - namespace unicode { \ - [[maybe_unused]] inline constexpr unicode_char_class name{}; \ - } /* unicode */ \ - namespace parsers::unicode { \ - using x4::unicode::name; \ - } /* parsers::unicode */ - -// Unicode Major Categories - -BOOST_SPIRIT_X4_CHAR_CLASS(alnum) -BOOST_SPIRIT_X4_CHAR_CLASS(alpha) -BOOST_SPIRIT_X4_CHAR_CLASS(digit) -BOOST_SPIRIT_X4_CHAR_CLASS(xdigit) -BOOST_SPIRIT_X4_CHAR_CLASS(cntrl) -BOOST_SPIRIT_X4_CHAR_CLASS(graph) -BOOST_SPIRIT_X4_CHAR_CLASS(lower) -BOOST_SPIRIT_X4_CHAR_CLASS(print) -BOOST_SPIRIT_X4_CHAR_CLASS(punct) -BOOST_SPIRIT_X4_CHAR_CLASS(space) -BOOST_SPIRIT_X4_CHAR_CLASS(blank) -BOOST_SPIRIT_X4_CHAR_CLASS(upper) - -// Unicode Major Categories - -BOOST_SPIRIT_X4_CHAR_CLASS(letter) -BOOST_SPIRIT_X4_CHAR_CLASS(mark) -BOOST_SPIRIT_X4_CHAR_CLASS(number) -BOOST_SPIRIT_X4_CHAR_CLASS(separator) -BOOST_SPIRIT_X4_CHAR_CLASS(other) -BOOST_SPIRIT_X4_CHAR_CLASS(punctuation) -BOOST_SPIRIT_X4_CHAR_CLASS(symbol) - -// Unicode General Categories - -BOOST_SPIRIT_X4_CHAR_CLASS(uppercase_letter) -BOOST_SPIRIT_X4_CHAR_CLASS(lowercase_letter) -BOOST_SPIRIT_X4_CHAR_CLASS(titlecase_letter) -BOOST_SPIRIT_X4_CHAR_CLASS(modifier_letter) -BOOST_SPIRIT_X4_CHAR_CLASS(other_letter) - -BOOST_SPIRIT_X4_CHAR_CLASS(nonspacing_mark) -BOOST_SPIRIT_X4_CHAR_CLASS(enclosing_mark) -BOOST_SPIRIT_X4_CHAR_CLASS(spacing_mark) - -BOOST_SPIRIT_X4_CHAR_CLASS(decimal_number) -BOOST_SPIRIT_X4_CHAR_CLASS(letter_number) -BOOST_SPIRIT_X4_CHAR_CLASS(other_number) - -BOOST_SPIRIT_X4_CHAR_CLASS(space_separator) -BOOST_SPIRIT_X4_CHAR_CLASS(line_separator) -BOOST_SPIRIT_X4_CHAR_CLASS(paragraph_separator) - -BOOST_SPIRIT_X4_CHAR_CLASS(control) -BOOST_SPIRIT_X4_CHAR_CLASS(format) -BOOST_SPIRIT_X4_CHAR_CLASS(private_use) -BOOST_SPIRIT_X4_CHAR_CLASS(surrogate) -BOOST_SPIRIT_X4_CHAR_CLASS(unassigned) - -BOOST_SPIRIT_X4_CHAR_CLASS(dash_punctuation) -BOOST_SPIRIT_X4_CHAR_CLASS(open_punctuation) -BOOST_SPIRIT_X4_CHAR_CLASS(close_punctuation) -BOOST_SPIRIT_X4_CHAR_CLASS(connector_punctuation) -BOOST_SPIRIT_X4_CHAR_CLASS(other_punctuation) -BOOST_SPIRIT_X4_CHAR_CLASS(initial_punctuation) -BOOST_SPIRIT_X4_CHAR_CLASS(final_punctuation) - -BOOST_SPIRIT_X4_CHAR_CLASS(math_symbol) -BOOST_SPIRIT_X4_CHAR_CLASS(currency_symbol) -BOOST_SPIRIT_X4_CHAR_CLASS(modifier_symbol) -BOOST_SPIRIT_X4_CHAR_CLASS(other_symbol) - -// Unicode Derived Categories - -BOOST_SPIRIT_X4_CHAR_CLASS(alphabetic) -BOOST_SPIRIT_X4_CHAR_CLASS(uppercase) -BOOST_SPIRIT_X4_CHAR_CLASS(lowercase) -BOOST_SPIRIT_X4_CHAR_CLASS(white_space) -BOOST_SPIRIT_X4_CHAR_CLASS(hex_digit) -BOOST_SPIRIT_X4_CHAR_CLASS(noncharacter_code_point) -BOOST_SPIRIT_X4_CHAR_CLASS(default_ignorable_code_point) - -// Unicode Scripts - -BOOST_SPIRIT_X4_CHAR_CLASS(adlam) -BOOST_SPIRIT_X4_CHAR_CLASS(caucasian_albanian) -BOOST_SPIRIT_X4_CHAR_CLASS(ahom) -BOOST_SPIRIT_X4_CHAR_CLASS(arabic) -BOOST_SPIRIT_X4_CHAR_CLASS(imperial_aramaic) -BOOST_SPIRIT_X4_CHAR_CLASS(armenian) -BOOST_SPIRIT_X4_CHAR_CLASS(avestan) -BOOST_SPIRIT_X4_CHAR_CLASS(balinese) -BOOST_SPIRIT_X4_CHAR_CLASS(bamum) -BOOST_SPIRIT_X4_CHAR_CLASS(bassa_vah) -BOOST_SPIRIT_X4_CHAR_CLASS(batak) -BOOST_SPIRIT_X4_CHAR_CLASS(bengali) -BOOST_SPIRIT_X4_CHAR_CLASS(bhaiksuki) -BOOST_SPIRIT_X4_CHAR_CLASS(bopomofo) -BOOST_SPIRIT_X4_CHAR_CLASS(brahmi) -BOOST_SPIRIT_X4_CHAR_CLASS(braille) -BOOST_SPIRIT_X4_CHAR_CLASS(buginese) -BOOST_SPIRIT_X4_CHAR_CLASS(buhid) -BOOST_SPIRIT_X4_CHAR_CLASS(chakma) -BOOST_SPIRIT_X4_CHAR_CLASS(canadian_aboriginal) -BOOST_SPIRIT_X4_CHAR_CLASS(carian) -BOOST_SPIRIT_X4_CHAR_CLASS(cham) -BOOST_SPIRIT_X4_CHAR_CLASS(cherokee) -BOOST_SPIRIT_X4_CHAR_CLASS(chorasmian) -BOOST_SPIRIT_X4_CHAR_CLASS(coptic) -BOOST_SPIRIT_X4_CHAR_CLASS(cypro_minoan) -BOOST_SPIRIT_X4_CHAR_CLASS(cypriot) -BOOST_SPIRIT_X4_CHAR_CLASS(cyrillic) -BOOST_SPIRIT_X4_CHAR_CLASS(devanagari) -BOOST_SPIRIT_X4_CHAR_CLASS(dives_akuru) -BOOST_SPIRIT_X4_CHAR_CLASS(dogra) -BOOST_SPIRIT_X4_CHAR_CLASS(deseret) -BOOST_SPIRIT_X4_CHAR_CLASS(duployan) -BOOST_SPIRIT_X4_CHAR_CLASS(egyptian_hieroglyphs) -BOOST_SPIRIT_X4_CHAR_CLASS(elbasan) -BOOST_SPIRIT_X4_CHAR_CLASS(elymaic) -BOOST_SPIRIT_X4_CHAR_CLASS(ethiopic) -BOOST_SPIRIT_X4_CHAR_CLASS(georgian) -BOOST_SPIRIT_X4_CHAR_CLASS(glagolitic) -BOOST_SPIRIT_X4_CHAR_CLASS(gunjala_gondi) -BOOST_SPIRIT_X4_CHAR_CLASS(masaram_gondi) -BOOST_SPIRIT_X4_CHAR_CLASS(gothic) -BOOST_SPIRIT_X4_CHAR_CLASS(grantha) -BOOST_SPIRIT_X4_CHAR_CLASS(greek) -BOOST_SPIRIT_X4_CHAR_CLASS(gujarati) -BOOST_SPIRIT_X4_CHAR_CLASS(gurmukhi) -BOOST_SPIRIT_X4_CHAR_CLASS(hangul) -BOOST_SPIRIT_X4_CHAR_CLASS(han) -BOOST_SPIRIT_X4_CHAR_CLASS(hanunoo) -BOOST_SPIRIT_X4_CHAR_CLASS(hatran) -BOOST_SPIRIT_X4_CHAR_CLASS(hebrew) -BOOST_SPIRIT_X4_CHAR_CLASS(hiragana) -BOOST_SPIRIT_X4_CHAR_CLASS(anatolian_hieroglyphs) -BOOST_SPIRIT_X4_CHAR_CLASS(pahawh_hmong) -BOOST_SPIRIT_X4_CHAR_CLASS(nyiakeng_puachue_hmong) -BOOST_SPIRIT_X4_CHAR_CLASS(katakana_or_hiragana) -BOOST_SPIRIT_X4_CHAR_CLASS(old_hungarian) -BOOST_SPIRIT_X4_CHAR_CLASS(old_italic) -BOOST_SPIRIT_X4_CHAR_CLASS(javanese) -BOOST_SPIRIT_X4_CHAR_CLASS(kayah_li) -BOOST_SPIRIT_X4_CHAR_CLASS(katakana) -BOOST_SPIRIT_X4_CHAR_CLASS(kawi) -BOOST_SPIRIT_X4_CHAR_CLASS(kharoshthi) -BOOST_SPIRIT_X4_CHAR_CLASS(khmer) -BOOST_SPIRIT_X4_CHAR_CLASS(khojki) -BOOST_SPIRIT_X4_CHAR_CLASS(khitan_small_script) -BOOST_SPIRIT_X4_CHAR_CLASS(kannada) -BOOST_SPIRIT_X4_CHAR_CLASS(kaithi) -BOOST_SPIRIT_X4_CHAR_CLASS(tai_tham) -BOOST_SPIRIT_X4_CHAR_CLASS(lao) -BOOST_SPIRIT_X4_CHAR_CLASS(latin) -BOOST_SPIRIT_X4_CHAR_CLASS(lepcha) -BOOST_SPIRIT_X4_CHAR_CLASS(limbu) -BOOST_SPIRIT_X4_CHAR_CLASS(linear_a) -BOOST_SPIRIT_X4_CHAR_CLASS(linear_b) -BOOST_SPIRIT_X4_CHAR_CLASS(lisu) -BOOST_SPIRIT_X4_CHAR_CLASS(lycian) -BOOST_SPIRIT_X4_CHAR_CLASS(lydian) -BOOST_SPIRIT_X4_CHAR_CLASS(mahajani) -BOOST_SPIRIT_X4_CHAR_CLASS(makasar) -BOOST_SPIRIT_X4_CHAR_CLASS(mandaic) -BOOST_SPIRIT_X4_CHAR_CLASS(manichaean) -BOOST_SPIRIT_X4_CHAR_CLASS(marchen) -BOOST_SPIRIT_X4_CHAR_CLASS(medefaidrin) -BOOST_SPIRIT_X4_CHAR_CLASS(mende_kikakui) -BOOST_SPIRIT_X4_CHAR_CLASS(meroitic_cursive) -BOOST_SPIRIT_X4_CHAR_CLASS(meroitic_hieroglyphs) -BOOST_SPIRIT_X4_CHAR_CLASS(malayalam) -BOOST_SPIRIT_X4_CHAR_CLASS(modi) -BOOST_SPIRIT_X4_CHAR_CLASS(mongolian) -BOOST_SPIRIT_X4_CHAR_CLASS(mro) -BOOST_SPIRIT_X4_CHAR_CLASS(meetei_mayek) -BOOST_SPIRIT_X4_CHAR_CLASS(multani) -BOOST_SPIRIT_X4_CHAR_CLASS(myanmar) -BOOST_SPIRIT_X4_CHAR_CLASS(nag_mundari) -BOOST_SPIRIT_X4_CHAR_CLASS(nandinagari) -BOOST_SPIRIT_X4_CHAR_CLASS(old_north_arabian) -BOOST_SPIRIT_X4_CHAR_CLASS(nabataean) -BOOST_SPIRIT_X4_CHAR_CLASS(newa) -BOOST_SPIRIT_X4_CHAR_CLASS(nko) -BOOST_SPIRIT_X4_CHAR_CLASS(nushu) -BOOST_SPIRIT_X4_CHAR_CLASS(ogham) -BOOST_SPIRIT_X4_CHAR_CLASS(ol_chiki) -BOOST_SPIRIT_X4_CHAR_CLASS(old_turkic) -BOOST_SPIRIT_X4_CHAR_CLASS(oriya) -BOOST_SPIRIT_X4_CHAR_CLASS(osage) -BOOST_SPIRIT_X4_CHAR_CLASS(osmanya) -BOOST_SPIRIT_X4_CHAR_CLASS(old_uyghur) -BOOST_SPIRIT_X4_CHAR_CLASS(palmyrene) -BOOST_SPIRIT_X4_CHAR_CLASS(pau_cin_hau) -BOOST_SPIRIT_X4_CHAR_CLASS(old_permic) -BOOST_SPIRIT_X4_CHAR_CLASS(phags_pa) -BOOST_SPIRIT_X4_CHAR_CLASS(inscriptional_pahlavi) -BOOST_SPIRIT_X4_CHAR_CLASS(psalter_pahlavi) -BOOST_SPIRIT_X4_CHAR_CLASS(phoenician) -BOOST_SPIRIT_X4_CHAR_CLASS(miao) -BOOST_SPIRIT_X4_CHAR_CLASS(inscriptional_parthian) -BOOST_SPIRIT_X4_CHAR_CLASS(rejang) -BOOST_SPIRIT_X4_CHAR_CLASS(hanifi_rohingya) -BOOST_SPIRIT_X4_CHAR_CLASS(runic) -BOOST_SPIRIT_X4_CHAR_CLASS(samaritan) -BOOST_SPIRIT_X4_CHAR_CLASS(old_south_arabian) -BOOST_SPIRIT_X4_CHAR_CLASS(saurashtra) -BOOST_SPIRIT_X4_CHAR_CLASS(signwriting) -BOOST_SPIRIT_X4_CHAR_CLASS(shavian) -BOOST_SPIRIT_X4_CHAR_CLASS(sharada) -BOOST_SPIRIT_X4_CHAR_CLASS(siddham) -BOOST_SPIRIT_X4_CHAR_CLASS(khudawadi) -BOOST_SPIRIT_X4_CHAR_CLASS(sinhala) -BOOST_SPIRIT_X4_CHAR_CLASS(sogdian) -BOOST_SPIRIT_X4_CHAR_CLASS(old_sogdian) -BOOST_SPIRIT_X4_CHAR_CLASS(sora_sompeng) -BOOST_SPIRIT_X4_CHAR_CLASS(soyombo) -BOOST_SPIRIT_X4_CHAR_CLASS(sundanese) -BOOST_SPIRIT_X4_CHAR_CLASS(syloti_nagri) -BOOST_SPIRIT_X4_CHAR_CLASS(syriac) -BOOST_SPIRIT_X4_CHAR_CLASS(tagbanwa) -BOOST_SPIRIT_X4_CHAR_CLASS(takri) -BOOST_SPIRIT_X4_CHAR_CLASS(tai_le) -BOOST_SPIRIT_X4_CHAR_CLASS(new_tai_lue) -BOOST_SPIRIT_X4_CHAR_CLASS(tamil) -BOOST_SPIRIT_X4_CHAR_CLASS(tangut) -BOOST_SPIRIT_X4_CHAR_CLASS(tai_viet) -BOOST_SPIRIT_X4_CHAR_CLASS(telugu) -BOOST_SPIRIT_X4_CHAR_CLASS(tifinagh) -BOOST_SPIRIT_X4_CHAR_CLASS(tagalog) -BOOST_SPIRIT_X4_CHAR_CLASS(thaana) -BOOST_SPIRIT_X4_CHAR_CLASS(thai) -BOOST_SPIRIT_X4_CHAR_CLASS(tibetan) -BOOST_SPIRIT_X4_CHAR_CLASS(tirhuta) -BOOST_SPIRIT_X4_CHAR_CLASS(tangsa) -BOOST_SPIRIT_X4_CHAR_CLASS(toto) -BOOST_SPIRIT_X4_CHAR_CLASS(ugaritic) -BOOST_SPIRIT_X4_CHAR_CLASS(vai) -BOOST_SPIRIT_X4_CHAR_CLASS(vithkuqi) -BOOST_SPIRIT_X4_CHAR_CLASS(warang_citi) -BOOST_SPIRIT_X4_CHAR_CLASS(wancho) -BOOST_SPIRIT_X4_CHAR_CLASS(old_persian) -BOOST_SPIRIT_X4_CHAR_CLASS(cuneiform) -BOOST_SPIRIT_X4_CHAR_CLASS(yezidi) -BOOST_SPIRIT_X4_CHAR_CLASS(yi) -BOOST_SPIRIT_X4_CHAR_CLASS(zanabazar_square) -BOOST_SPIRIT_X4_CHAR_CLASS(inherited) -BOOST_SPIRIT_X4_CHAR_CLASS(common) -BOOST_SPIRIT_X4_CHAR_CLASS(unknown) - -#undef BOOST_SPIRIT_X4_CHAR_CLASS - -} // boost::spirit::x4 - -#endif diff --git a/include/boost/spirit/x4/char_encoding/unicode.hpp b/include/boost/spirit/x4/char_encoding/unicode.hpp deleted file mode 100644 index f96b2f514..000000000 --- a/include/boost/spirit/x4/char_encoding/unicode.hpp +++ /dev/null @@ -1,436 +0,0 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_ENCODING_UNICODE_HPP -#define BOOST_SPIRIT_X4_CHAR_ENCODING_UNICODE_HPP - -/*============================================================================= - Copyright (c) 2001-2011 Hartmut Kaiser - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2025 Nana Sakisaka - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ - -#include - -#include - -namespace boost::spirit::x4::char_encoding { - -struct unicode -{ - using char_type = char32_t; - using classify_type = x4::unicode::classify_type; - - [[nodiscard]] static constexpr bool - isascii_(classify_type ch) noexcept - { - return 0 == (ch & ~0x7f); - } - - [[nodiscard]] static constexpr bool - ischar(classify_type ch) noexcept - { - // unicode code points in the range 0x00 to 0x10FFFF - return ch <= 0x10FFFF; - } - - [[nodiscard]] static constexpr bool - isalnum(classify_type ch) noexcept - { - return x4::unicode::is_alphanumeric(ch); - } - - [[nodiscard]] static constexpr bool - isalpha(classify_type ch) noexcept - { - return x4::unicode::is_alphabetic(ch); - } - - [[nodiscard]] static constexpr bool - isdigit(classify_type ch) noexcept - { - return x4::unicode::is_decimal_number(ch); - } - - [[nodiscard]] static constexpr bool - isxdigit(classify_type ch) noexcept - { - return x4::unicode::is_hex_digit(ch); - } - - [[nodiscard]] static constexpr bool - iscntrl(classify_type ch) noexcept - { - return x4::unicode::is_control(ch); - } - - [[nodiscard]] static constexpr bool - isgraph(classify_type ch) noexcept - { - return x4::unicode::is_graph(ch); - } - - [[nodiscard]] static constexpr bool - islower(classify_type ch) noexcept - { - return x4::unicode::is_lowercase(ch); - } - - [[nodiscard]] static constexpr bool - isprint(classify_type ch) noexcept - { - return x4::unicode::is_print(ch); - } - - [[nodiscard]] static constexpr bool - ispunct(classify_type ch) noexcept - { - return x4::unicode::is_punctuation(ch); - } - - [[nodiscard]] static constexpr bool - isspace(classify_type ch) noexcept - { - return x4::unicode::is_white_space(ch); - } - - [[nodiscard]] static constexpr bool - (isblank)(classify_type ch) noexcept - { - return x4::unicode::is_blank(ch); - } - - [[nodiscard]] static constexpr bool - isupper(classify_type ch) noexcept - { - return x4::unicode::is_uppercase(ch); - } - - // Mixing character encodings is semantically wrong - static constexpr void isascii_(char) = delete; - static constexpr void isascii_(wchar_t) = delete; - static constexpr void ischar(char) = delete; - static constexpr void ischar(wchar_t) = delete; - static constexpr void isalnum(char) = delete; - static constexpr void isalnum(wchar_t) = delete; - static constexpr void isalpha(char) = delete; - static constexpr void isalpha(wchar_t) = delete; - static constexpr void isdigit(char) = delete; - static constexpr void isdigit(wchar_t) = delete; - static constexpr void isxdigit(char) = delete; - static constexpr void isxdigit(wchar_t) = delete; - static constexpr void iscntrl(char) = delete; - static constexpr void iscntrl(wchar_t) = delete; - static constexpr void isgraph(char) = delete; - static constexpr void isgraph(wchar_t) = delete; - static constexpr void islower(char) = delete; - static constexpr void islower(wchar_t) = delete; - static constexpr void isprint(char) = delete; - static constexpr void isprint(wchar_t) = delete; - static constexpr void ispunct(char) = delete; - static constexpr void ispunct(wchar_t) = delete; - static constexpr void isspace(char) = delete; - static constexpr void isspace(wchar_t) = delete; - static constexpr void isblank(char) = delete; - static constexpr void isblank(wchar_t) = delete; - static constexpr void isupper(char) = delete; - static constexpr void isupper(wchar_t) = delete; - - // Simple character conversions - - [[nodiscard]] static constexpr classify_type - tolower(classify_type ch) noexcept - { - return x4::unicode::to_lowercase(ch); - } - - [[nodiscard]] static constexpr classify_type - toupper(classify_type ch) noexcept - { - return x4::unicode::to_uppercase(ch); - } - - [[nodiscard]] static constexpr std::uint32_t - toucs4(classify_type ch) noexcept - { - return ch; - } - - static constexpr void tolower(char) = delete; - static constexpr void tolower(wchar_t) = delete; - static constexpr void toupper(char) = delete; - static constexpr void toupper(wchar_t) = delete; - static constexpr void toucs4(char) = delete; - static constexpr void toucs4(wchar_t) = delete; - - // Major Categories -#define BOOST_SPIRIT_X4_MAJOR_CATEGORY(name) \ - [[nodiscard]] static constexpr bool \ - is_##name(classify_type ch) noexcept \ - { \ - return x4::unicode::get_major_category(ch) == x4::unicode::properties::name; \ - } \ - static constexpr void is_##name(char) = delete; \ - static constexpr void is_##name(wchar_t) = delete; - - BOOST_SPIRIT_X4_MAJOR_CATEGORY(letter) - BOOST_SPIRIT_X4_MAJOR_CATEGORY(mark) - BOOST_SPIRIT_X4_MAJOR_CATEGORY(number) - BOOST_SPIRIT_X4_MAJOR_CATEGORY(separator) - BOOST_SPIRIT_X4_MAJOR_CATEGORY(other) - BOOST_SPIRIT_X4_MAJOR_CATEGORY(punctuation) - BOOST_SPIRIT_X4_MAJOR_CATEGORY(symbol) - -#undef BOOST_SPIRIT_X4_MAJOR_CATEGORY - - // General Categories -#define BOOST_SPIRIT_X4_CATEGORY(name) \ - [[nodiscard]] static constexpr bool \ - is_##name(classify_type ch) noexcept \ - { \ - return x4::unicode::get_category(ch) == x4::unicode::properties::name; \ - } \ - static constexpr void is_##name(char) = delete; \ - static constexpr void is_##name(wchar_t) = delete; - - BOOST_SPIRIT_X4_CATEGORY(uppercase_letter) - BOOST_SPIRIT_X4_CATEGORY(lowercase_letter) - BOOST_SPIRIT_X4_CATEGORY(titlecase_letter) - BOOST_SPIRIT_X4_CATEGORY(modifier_letter) - BOOST_SPIRIT_X4_CATEGORY(other_letter) - - BOOST_SPIRIT_X4_CATEGORY(nonspacing_mark) - BOOST_SPIRIT_X4_CATEGORY(enclosing_mark) - BOOST_SPIRIT_X4_CATEGORY(spacing_mark) - - BOOST_SPIRIT_X4_CATEGORY(decimal_number) - BOOST_SPIRIT_X4_CATEGORY(letter_number) - BOOST_SPIRIT_X4_CATEGORY(other_number) - - BOOST_SPIRIT_X4_CATEGORY(space_separator) - BOOST_SPIRIT_X4_CATEGORY(line_separator) - BOOST_SPIRIT_X4_CATEGORY(paragraph_separator) - - BOOST_SPIRIT_X4_CATEGORY(control) - BOOST_SPIRIT_X4_CATEGORY(format) - BOOST_SPIRIT_X4_CATEGORY(private_use) - BOOST_SPIRIT_X4_CATEGORY(surrogate) - BOOST_SPIRIT_X4_CATEGORY(unassigned) - - BOOST_SPIRIT_X4_CATEGORY(dash_punctuation) - BOOST_SPIRIT_X4_CATEGORY(open_punctuation) - BOOST_SPIRIT_X4_CATEGORY(close_punctuation) - BOOST_SPIRIT_X4_CATEGORY(connector_punctuation) - BOOST_SPIRIT_X4_CATEGORY(other_punctuation) - BOOST_SPIRIT_X4_CATEGORY(initial_punctuation) - BOOST_SPIRIT_X4_CATEGORY(final_punctuation) - - BOOST_SPIRIT_X4_CATEGORY(math_symbol) - BOOST_SPIRIT_X4_CATEGORY(currency_symbol) - BOOST_SPIRIT_X4_CATEGORY(modifier_symbol) - BOOST_SPIRIT_X4_CATEGORY(other_symbol) - -#undef BOOST_SPIRIT_X4_CATEGORY - - // Derived Categories -#define BOOST_SPIRIT_X4_DERIVED_CATEGORY(name) \ - [[nodiscard]] static constexpr bool \ - is_##name(classify_type ch) noexcept \ - { \ - return x4::unicode::is_##name(ch); \ - } \ - static constexpr void is_##name(char) = delete; \ - static constexpr void is_##name(wchar_t) = delete; - - BOOST_SPIRIT_X4_DERIVED_CATEGORY(alphabetic) - BOOST_SPIRIT_X4_DERIVED_CATEGORY(uppercase) - BOOST_SPIRIT_X4_DERIVED_CATEGORY(lowercase) - BOOST_SPIRIT_X4_DERIVED_CATEGORY(white_space) - BOOST_SPIRIT_X4_DERIVED_CATEGORY(hex_digit) - BOOST_SPIRIT_X4_DERIVED_CATEGORY(noncharacter_code_point) - BOOST_SPIRIT_X4_DERIVED_CATEGORY(default_ignorable_code_point) - -#undef BOOST_SPIRIT_X4_DERIVED_CATEGORY - - // Scripts -#define BOOST_SPIRIT_X4_SCRIPT(name) \ - [[nodiscard]] static constexpr bool \ - is_##name(classify_type ch) noexcept \ - { \ - return x4::unicode::get_script(ch) == x4::unicode::properties::name; \ - } \ - static constexpr void is_##name(char) = delete; \ - static constexpr void is_##name(wchar_t) = delete; - - BOOST_SPIRIT_X4_SCRIPT(adlam) - BOOST_SPIRIT_X4_SCRIPT(caucasian_albanian) - BOOST_SPIRIT_X4_SCRIPT(ahom) - BOOST_SPIRIT_X4_SCRIPT(arabic) - BOOST_SPIRIT_X4_SCRIPT(imperial_aramaic) - BOOST_SPIRIT_X4_SCRIPT(armenian) - BOOST_SPIRIT_X4_SCRIPT(avestan) - BOOST_SPIRIT_X4_SCRIPT(balinese) - BOOST_SPIRIT_X4_SCRIPT(bamum) - BOOST_SPIRIT_X4_SCRIPT(bassa_vah) - BOOST_SPIRIT_X4_SCRIPT(batak) - BOOST_SPIRIT_X4_SCRIPT(bengali) - BOOST_SPIRIT_X4_SCRIPT(bhaiksuki) - BOOST_SPIRIT_X4_SCRIPT(bopomofo) - BOOST_SPIRIT_X4_SCRIPT(brahmi) - BOOST_SPIRIT_X4_SCRIPT(braille) - BOOST_SPIRIT_X4_SCRIPT(buginese) - BOOST_SPIRIT_X4_SCRIPT(buhid) - BOOST_SPIRIT_X4_SCRIPT(chakma) - BOOST_SPIRIT_X4_SCRIPT(canadian_aboriginal) - BOOST_SPIRIT_X4_SCRIPT(carian) - BOOST_SPIRIT_X4_SCRIPT(cham) - BOOST_SPIRIT_X4_SCRIPT(cherokee) - BOOST_SPIRIT_X4_SCRIPT(chorasmian) - BOOST_SPIRIT_X4_SCRIPT(coptic) - BOOST_SPIRIT_X4_SCRIPT(cypro_minoan) - BOOST_SPIRIT_X4_SCRIPT(cypriot) - BOOST_SPIRIT_X4_SCRIPT(cyrillic) - BOOST_SPIRIT_X4_SCRIPT(devanagari) - BOOST_SPIRIT_X4_SCRIPT(dives_akuru) - BOOST_SPIRIT_X4_SCRIPT(dogra) - BOOST_SPIRIT_X4_SCRIPT(deseret) - BOOST_SPIRIT_X4_SCRIPT(duployan) - BOOST_SPIRIT_X4_SCRIPT(egyptian_hieroglyphs) - BOOST_SPIRIT_X4_SCRIPT(elbasan) - BOOST_SPIRIT_X4_SCRIPT(elymaic) - BOOST_SPIRIT_X4_SCRIPT(ethiopic) - BOOST_SPIRIT_X4_SCRIPT(georgian) - BOOST_SPIRIT_X4_SCRIPT(glagolitic) - BOOST_SPIRIT_X4_SCRIPT(gunjala_gondi) - BOOST_SPIRIT_X4_SCRIPT(masaram_gondi) - BOOST_SPIRIT_X4_SCRIPT(gothic) - BOOST_SPIRIT_X4_SCRIPT(grantha) - BOOST_SPIRIT_X4_SCRIPT(greek) - BOOST_SPIRIT_X4_SCRIPT(gujarati) - BOOST_SPIRIT_X4_SCRIPT(gurmukhi) - BOOST_SPIRIT_X4_SCRIPT(hangul) - BOOST_SPIRIT_X4_SCRIPT(han) - BOOST_SPIRIT_X4_SCRIPT(hanunoo) - BOOST_SPIRIT_X4_SCRIPT(hatran) - BOOST_SPIRIT_X4_SCRIPT(hebrew) - BOOST_SPIRIT_X4_SCRIPT(hiragana) - BOOST_SPIRIT_X4_SCRIPT(anatolian_hieroglyphs) - BOOST_SPIRIT_X4_SCRIPT(pahawh_hmong) - BOOST_SPIRIT_X4_SCRIPT(nyiakeng_puachue_hmong) - BOOST_SPIRIT_X4_SCRIPT(katakana_or_hiragana) - BOOST_SPIRIT_X4_SCRIPT(old_hungarian) - BOOST_SPIRIT_X4_SCRIPT(old_italic) - BOOST_SPIRIT_X4_SCRIPT(javanese) - BOOST_SPIRIT_X4_SCRIPT(kayah_li) - BOOST_SPIRIT_X4_SCRIPT(katakana) - BOOST_SPIRIT_X4_SCRIPT(kawi) - BOOST_SPIRIT_X4_SCRIPT(kharoshthi) - BOOST_SPIRIT_X4_SCRIPT(khmer) - BOOST_SPIRIT_X4_SCRIPT(khojki) - BOOST_SPIRIT_X4_SCRIPT(khitan_small_script) - BOOST_SPIRIT_X4_SCRIPT(kannada) - BOOST_SPIRIT_X4_SCRIPT(kaithi) - BOOST_SPIRIT_X4_SCRIPT(tai_tham) - BOOST_SPIRIT_X4_SCRIPT(lao) - BOOST_SPIRIT_X4_SCRIPT(latin) - BOOST_SPIRIT_X4_SCRIPT(lepcha) - BOOST_SPIRIT_X4_SCRIPT(limbu) - BOOST_SPIRIT_X4_SCRIPT(linear_a) - BOOST_SPIRIT_X4_SCRIPT(linear_b) - BOOST_SPIRIT_X4_SCRIPT(lisu) - BOOST_SPIRIT_X4_SCRIPT(lycian) - BOOST_SPIRIT_X4_SCRIPT(lydian) - BOOST_SPIRIT_X4_SCRIPT(mahajani) - BOOST_SPIRIT_X4_SCRIPT(makasar) - BOOST_SPIRIT_X4_SCRIPT(mandaic) - BOOST_SPIRIT_X4_SCRIPT(manichaean) - BOOST_SPIRIT_X4_SCRIPT(marchen) - BOOST_SPIRIT_X4_SCRIPT(medefaidrin) - BOOST_SPIRIT_X4_SCRIPT(mende_kikakui) - BOOST_SPIRIT_X4_SCRIPT(meroitic_cursive) - BOOST_SPIRIT_X4_SCRIPT(meroitic_hieroglyphs) - BOOST_SPIRIT_X4_SCRIPT(malayalam) - BOOST_SPIRIT_X4_SCRIPT(modi) - BOOST_SPIRIT_X4_SCRIPT(mongolian) - BOOST_SPIRIT_X4_SCRIPT(mro) - BOOST_SPIRIT_X4_SCRIPT(meetei_mayek) - BOOST_SPIRIT_X4_SCRIPT(multani) - BOOST_SPIRIT_X4_SCRIPT(myanmar) - BOOST_SPIRIT_X4_SCRIPT(nag_mundari) - BOOST_SPIRIT_X4_SCRIPT(nandinagari) - BOOST_SPIRIT_X4_SCRIPT(old_north_arabian) - BOOST_SPIRIT_X4_SCRIPT(nabataean) - BOOST_SPIRIT_X4_SCRIPT(newa) - BOOST_SPIRIT_X4_SCRIPT(nko) - BOOST_SPIRIT_X4_SCRIPT(nushu) - BOOST_SPIRIT_X4_SCRIPT(ogham) - BOOST_SPIRIT_X4_SCRIPT(ol_chiki) - BOOST_SPIRIT_X4_SCRIPT(old_turkic) - BOOST_SPIRIT_X4_SCRIPT(oriya) - BOOST_SPIRIT_X4_SCRIPT(osage) - BOOST_SPIRIT_X4_SCRIPT(osmanya) - BOOST_SPIRIT_X4_SCRIPT(old_uyghur) - BOOST_SPIRIT_X4_SCRIPT(palmyrene) - BOOST_SPIRIT_X4_SCRIPT(pau_cin_hau) - BOOST_SPIRIT_X4_SCRIPT(old_permic) - BOOST_SPIRIT_X4_SCRIPT(phags_pa) - BOOST_SPIRIT_X4_SCRIPT(inscriptional_pahlavi) - BOOST_SPIRIT_X4_SCRIPT(psalter_pahlavi) - BOOST_SPIRIT_X4_SCRIPT(phoenician) - BOOST_SPIRIT_X4_SCRIPT(miao) - BOOST_SPIRIT_X4_SCRIPT(inscriptional_parthian) - BOOST_SPIRIT_X4_SCRIPT(rejang) - BOOST_SPIRIT_X4_SCRIPT(hanifi_rohingya) - BOOST_SPIRIT_X4_SCRIPT(runic) - BOOST_SPIRIT_X4_SCRIPT(samaritan) - BOOST_SPIRIT_X4_SCRIPT(old_south_arabian) - BOOST_SPIRIT_X4_SCRIPT(saurashtra) - BOOST_SPIRIT_X4_SCRIPT(signwriting) - BOOST_SPIRIT_X4_SCRIPT(shavian) - BOOST_SPIRIT_X4_SCRIPT(sharada) - BOOST_SPIRIT_X4_SCRIPT(siddham) - BOOST_SPIRIT_X4_SCRIPT(khudawadi) - BOOST_SPIRIT_X4_SCRIPT(sinhala) - BOOST_SPIRIT_X4_SCRIPT(sogdian) - BOOST_SPIRIT_X4_SCRIPT(old_sogdian) - BOOST_SPIRIT_X4_SCRIPT(sora_sompeng) - BOOST_SPIRIT_X4_SCRIPT(soyombo) - BOOST_SPIRIT_X4_SCRIPT(sundanese) - BOOST_SPIRIT_X4_SCRIPT(syloti_nagri) - BOOST_SPIRIT_X4_SCRIPT(syriac) - BOOST_SPIRIT_X4_SCRIPT(tagbanwa) - BOOST_SPIRIT_X4_SCRIPT(takri) - BOOST_SPIRIT_X4_SCRIPT(tai_le) - BOOST_SPIRIT_X4_SCRIPT(new_tai_lue) - BOOST_SPIRIT_X4_SCRIPT(tamil) - BOOST_SPIRIT_X4_SCRIPT(tangut) - BOOST_SPIRIT_X4_SCRIPT(tai_viet) - BOOST_SPIRIT_X4_SCRIPT(telugu) - BOOST_SPIRIT_X4_SCRIPT(tifinagh) - BOOST_SPIRIT_X4_SCRIPT(tagalog) - BOOST_SPIRIT_X4_SCRIPT(thaana) - BOOST_SPIRIT_X4_SCRIPT(thai) - BOOST_SPIRIT_X4_SCRIPT(tibetan) - BOOST_SPIRIT_X4_SCRIPT(tirhuta) - BOOST_SPIRIT_X4_SCRIPT(tangsa) - BOOST_SPIRIT_X4_SCRIPT(toto) - BOOST_SPIRIT_X4_SCRIPT(ugaritic) - BOOST_SPIRIT_X4_SCRIPT(vai) - BOOST_SPIRIT_X4_SCRIPT(vithkuqi) - BOOST_SPIRIT_X4_SCRIPT(warang_citi) - BOOST_SPIRIT_X4_SCRIPT(wancho) - BOOST_SPIRIT_X4_SCRIPT(old_persian) - BOOST_SPIRIT_X4_SCRIPT(cuneiform) - BOOST_SPIRIT_X4_SCRIPT(yezidi) - BOOST_SPIRIT_X4_SCRIPT(yi) - BOOST_SPIRIT_X4_SCRIPT(zanabazar_square) - BOOST_SPIRIT_X4_SCRIPT(inherited) - BOOST_SPIRIT_X4_SCRIPT(common) - BOOST_SPIRIT_X4_SCRIPT(unknown) - -#undef BOOST_SPIRIT_X4_SCRIPT -}; - -} // boost::spirit::x4::char_encoding - -#endif diff --git a/include/boost/spirit/x4/directive.hpp b/include/boost/spirit/x4/directive.hpp deleted file mode 100644 index 6dcdbdaa6..000000000 --- a/include/boost/spirit/x4/directive.hpp +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef BOOST_SPIRIT_X4_DIRECTIVE_HPP -#define BOOST_SPIRIT_X4_DIRECTIVE_HPP - -/*============================================================================= - Copyright (c) 2001-2015 Joel de Guzman - Copyright (c) 2025 Nana Sakisaka - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -==============================================================================*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/include/boost/spirit/x4/operator.hpp b/include/boost/spirit/x4/operator.hpp deleted file mode 100644 index 50c37a384..000000000 --- a/include/boost/spirit/x4/operator.hpp +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef BOOST_SPIRIT_X4_OPERATOR_HPP -#define BOOST_SPIRIT_X4_OPERATOR_HPP - -/*============================================================================= - Copyright (c) 2001-2014 Joel de Guzman - Copyright (c) 2025 Nana Sakisaka - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -==============================================================================*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/include/boost/spirit/config.hpp b/include/iris/config.hpp similarity index 58% rename from include/boost/spirit/config.hpp rename to include/iris/config.hpp index b970c10dd..82f50acfa 100644 --- a/include/boost/spirit/config.hpp +++ b/include/iris/config.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CONFIG_HPP -#define BOOST_SPIRIT_X4_CONFIG_HPP +#ifndef IRIS_X4_CONFIG_HPP +#define IRIS_X4_CONFIG_HPP /*============================================================================= Copyright (c) 2025 Nana Sakisaka @@ -10,12 +10,12 @@ #include -#define BOOST_SPIRIT_STRINGIZE_I(x) #x -#define BOOST_SPIRIT_STRINGIZE(x) BOOST_SPIRIT_STRINGIZE_I(x) +#define IRIS_STRINGIZE_I(x) #x +#define IRIS_STRINGIZE(x) IRIS_STRINGIZE_I(x) -#define BOOST_SPIRIT_CONCAT_I_I(a, b) a##b -#define BOOST_SPIRIT_CONCAT_I(a, b) BOOST_SPIRIT_CONCAT_I_I(a, b) -#define BOOST_SPIRIT_CONCAT(a, b) BOOST_SPIRIT_CONCAT_I(a, b) +#define IRIS_CONCAT_I_I(a, b) a##b +#define IRIS_CONCAT_I(a, b) IRIS_CONCAT_I_I(a, b) +#define IRIS_CONCAT(a, b) IRIS_CONCAT_I(a, b) #if _MSC_VER # include @@ -29,22 +29,22 @@ #endif #if _MSC_VER && __INTELLISENSE__ // Memory Layout view shows wrong layout without this workaround -# define BOOST_SPIRIT_NO_UNIQUE_ADDRESS [[msvc::no_unique_address, no_unique_address]] +# define IRIS_NO_UNIQUE_ADDRESS [[msvc::no_unique_address, no_unique_address]] #elif _MSC_VER // normal MSVC -# define BOOST_SPIRIT_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]] +# define IRIS_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]] #else // other compilers -# define BOOST_SPIRIT_NO_UNIQUE_ADDRESS [[no_unique_address]] +# define IRIS_NO_UNIQUE_ADDRESS [[no_unique_address]] #endif -#ifndef BOOST_SPIRIT_LIFETIMEBOUND +#ifndef IRIS_LIFETIMEBOUND # ifdef __clang__ -# define BOOST_SPIRIT_LIFETIMEBOUND [[clang::lifetimebound]] +# define IRIS_LIFETIMEBOUND [[clang::lifetimebound]] # elifdef _MSC_VER -# define BOOST_SPIRIT_LIFETIMEBOUND [[msvc::lifetimebound]] +# define IRIS_LIFETIMEBOUND [[msvc::lifetimebound]] # else -# define BOOST_SPIRIT_LIFETIMEBOUND +# define IRIS_LIFETIMEBOUND # endif #endif diff --git a/include/boost/spirit/core/type_traits.hpp b/include/iris/core/type_traits.hpp similarity index 87% rename from include/boost/spirit/core/type_traits.hpp rename to include/iris/core/type_traits.hpp index 09a924daf..a85b0f8fa 100644 --- a/include/boost/spirit/core/type_traits.hpp +++ b/include/iris/core/type_traits.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_CORE_TYPE_TRAITS_HPP -#define BOOST_SPIRIT_CORE_TYPE_TRAITS_HPP +#ifndef IRIS_CORE_TYPE_TRAITS_HPP +#define IRIS_CORE_TYPE_TRAITS_HPP /*============================================================================= Copyright (c) 2025 Nana Sakisaka @@ -8,11 +8,11 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include +#include #include -namespace boost::spirit { +namespace iris { template class TT> struct is_ttp_specialization_of : std::false_type {}; @@ -33,6 +33,6 @@ struct is_nttp_specialization_of, TT> : std::true_type {}; template class TT> inline constexpr bool is_nttp_specialization_of_v = is_nttp_specialization_of::value; -} // boost::spirit +} // iris #endif diff --git a/include/boost/spirit/x4.hpp b/include/iris/x4.hpp similarity index 50% rename from include/boost/spirit/x4.hpp rename to include/iris/x4.hpp index e9e75a6c7..b7323e803 100644 --- a/include/boost/spirit/x4.hpp +++ b/include/iris/x4.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_HPP -#define BOOST_SPIRIT_X4_HPP +#ifndef IRIS_X4_HPP +#define IRIS_X4_HPP /*============================================================================= Copyright (c) 2001-2013 Joel de Guzman @@ -9,14 +9,14 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif diff --git a/include/boost/spirit/x4/allocator.hpp b/include/iris/x4/allocator.hpp similarity index 98% rename from include/boost/spirit/x4/allocator.hpp rename to include/iris/x4/allocator.hpp index 53592f05c..4d7061bf0 100644 --- a/include/boost/spirit/x4/allocator.hpp +++ b/include/iris/x4/allocator.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_ALLOCATOR_HPP -#define BOOST_SPIRIT_X4_ALLOCATOR_HPP +#ifndef IRIS_X4_ALLOCATOR_HPP +#define IRIS_X4_ALLOCATOR_HPP /*============================================================================= Copyright (c) 2025 Nana Sakisaka @@ -8,7 +8,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include +#include #include #include @@ -16,7 +16,7 @@ #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct allocator_ops @@ -218,6 +218,6 @@ struct allocator_ops } }; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/ast/position_tagged.hpp b/include/iris/x4/ast/position_tagged.hpp similarity index 93% rename from include/boost/spirit/x4/ast/position_tagged.hpp rename to include/iris/x4/ast/position_tagged.hpp index 87f1f359f..21a4c9b2c 100644 --- a/include/boost/spirit/x4/ast/position_tagged.hpp +++ b/include/iris/x4/ast/position_tagged.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_AST_POSITION_TAGGED_HPP -#define BOOST_SPIRIT_X4_AST_POSITION_TAGGED_HPP +#ifndef IRIS_X4_AST_POSITION_TAGGED_HPP +#define IRIS_X4_AST_POSITION_TAGGED_HPP /*============================================================================= Copyright (c) 2014 Joel de Guzman @@ -9,12 +9,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include +#include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { namespace ast { @@ -98,6 +98,6 @@ using position_tagged [[deprecated("Use `ast::`")]] = ast::position_tagged; template using position_cache [[deprecated("Use `ast::`")]] = ast::position_cache; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/auxiliary.hpp b/include/iris/x4/auxiliary.hpp similarity index 60% rename from include/boost/spirit/x4/auxiliary.hpp rename to include/iris/x4/auxiliary.hpp index 8c9496303..d605700a3 100644 --- a/include/boost/spirit/x4/auxiliary.hpp +++ b/include/iris/x4/auxiliary.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_AUXILIARY_HPP -#define BOOST_SPIRIT_X4_AUXILIARY_HPP +#ifndef IRIS_X4_AUXILIARY_HPP +#define IRIS_X4_AUXILIARY_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,10 +10,10 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #endif diff --git a/include/boost/spirit/x4/auxiliary/attr.hpp b/include/iris/x4/auxiliary/attr.hpp similarity index 91% rename from include/boost/spirit/x4/auxiliary/attr.hpp rename to include/iris/x4/auxiliary/attr.hpp index e2f00a8d6..671e6ec68 100644 --- a/include/boost/spirit/x4/auxiliary/attr.hpp +++ b/include/iris/x4/auxiliary/attr.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_AUXILIARY_ATTR_HPP -#define BOOST_SPIRIT_X4_AUXILIARY_ATTR_HPP +#ifndef IRIS_X4_AUXILIARY_ATTR_HPP +#define IRIS_X4_AUXILIARY_ATTR_HPP /*============================================================================= Copyright (c) 2001-2011 Hartmut Kaiser @@ -11,11 +11,11 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include +#include +#include -#include -#include +#include +#include #include #include @@ -23,7 +23,7 @@ #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct attr_parser : parser> @@ -125,6 +125,6 @@ namespace parsers { using parsers::attr; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/auxiliary/eoi.hpp b/include/iris/x4/auxiliary/eoi.hpp similarity index 82% rename from include/boost/spirit/x4/auxiliary/eoi.hpp rename to include/iris/x4/auxiliary/eoi.hpp index b9cc4481d..e139221de 100644 --- a/include/boost/spirit/x4/auxiliary/eoi.hpp +++ b/include/iris/x4/auxiliary/eoi.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_AUXILIARY_EOI_HPP -#define BOOST_SPIRIT_X4_AUXILIARY_EOI_HPP +#ifndef IRIS_X4_AUXILIARY_EOI_HPP +#define IRIS_X4_AUXILIARY_EOI_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,13 +10,13 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include +#include +#include +#include #include -namespace boost::spirit::x4 { +namespace iris::x4 { struct eoi_parser : parser { @@ -50,6 +50,6 @@ namespace parsers { using parsers::eoi; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/auxiliary/eol.hpp b/include/iris/x4/auxiliary/eol.hpp similarity index 85% rename from include/boost/spirit/x4/auxiliary/eol.hpp rename to include/iris/x4/auxiliary/eol.hpp index d9dde33b9..46bd0872a 100644 --- a/include/boost/spirit/x4/auxiliary/eol.hpp +++ b/include/iris/x4/auxiliary/eol.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_AUXILIARY_EOL_HPP -#define BOOST_SPIRIT_X4_AUXILIARY_EOL_HPP +#ifndef IRIS_X4_AUXILIARY_EOL_HPP +#define IRIS_X4_AUXILIARY_EOL_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,13 +10,13 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include +#include +#include +#include #include -namespace boost::spirit::x4 { +namespace iris::x4 { struct eol_parser : parser { @@ -62,6 +62,6 @@ namespace parsers { using parsers::eol; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/auxiliary/eps.hpp b/include/iris/x4/auxiliary/eps.hpp similarity index 93% rename from include/boost/spirit/x4/auxiliary/eps.hpp rename to include/iris/x4/auxiliary/eps.hpp index c4ef143e8..3d18208d6 100644 --- a/include/boost/spirit/x4/auxiliary/eps.hpp +++ b/include/iris/x4/auxiliary/eps.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_AUXILIARY_EPS_HPP -#define BOOST_SPIRIT_X4_AUXILIARY_EPS_HPP +#ifndef IRIS_X4_AUXILIARY_EPS_HPP +#define IRIS_X4_AUXILIARY_EPS_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,16 +9,16 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include +#include +#include +#include #include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { namespace detail { @@ -124,6 +124,6 @@ namespace parsers { using parsers::eps; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/iris/x4/char.hpp b/include/iris/x4/char.hpp new file mode 100644 index 000000000..9ee3b7261 --- /dev/null +++ b/include/iris/x4/char.hpp @@ -0,0 +1,23 @@ +#ifndef IRIS_X4_CHAR_HPP +#define IRIS_X4_CHAR_HPP + +/*============================================================================= + Copyright (c) 2001-2014 Joel de Guzman + Copyright (c) 2025 Nana Sakisaka + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include +#include +#include +#include +#include +#include + +#ifdef IRIS_X4_UNICODE +# include +#endif + +#endif diff --git a/include/boost/spirit/x4/char/any_char.hpp b/include/iris/x4/char/any_char.hpp similarity index 90% rename from include/boost/spirit/x4/char/any_char.hpp rename to include/iris/x4/char/any_char.hpp index b1d0b77ca..65647d7a3 100644 --- a/include/boost/spirit/x4/char/any_char.hpp +++ b/include/iris/x4/char/any_char.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_ANY_CHAR_HPP -#define BOOST_SPIRIT_X4_CHAR_ANY_CHAR_HPP +#ifndef IRIS_X4_CHAR_ANY_CHAR_HPP +#define IRIS_X4_CHAR_ANY_CHAR_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,11 +9,11 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include +#include +#include +#include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct any_char : char_parser> @@ -84,6 +84,6 @@ struct any_char : char_parser> } }; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/char/char.hpp b/include/iris/x4/char/char.hpp similarity index 84% rename from include/boost/spirit/x4/char/char.hpp rename to include/iris/x4/char/char.hpp index 807a9d5b1..d7270723c 100644 --- a/include/boost/spirit/x4/char/char.hpp +++ b/include/iris/x4/char/char.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_CHAR_HPP -#define BOOST_SPIRIT_X4_CHAR_CHAR_HPP +#ifndef IRIS_X4_CHAR_CHAR_HPP +#define IRIS_X4_CHAR_CHAR_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,21 +9,21 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include +#include +#include +#include -#include +#include -#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE -# include +#ifndef IRIS_X4_NO_STANDARD_WIDE +# include #endif -#ifdef BOOST_SPIRIT_X4_UNICODE -# include +#ifdef IRIS_X4_UNICODE +# include #endif -namespace boost::spirit::x4 { +namespace iris::x4 { namespace standard { @@ -61,7 +61,7 @@ constexpr void lit(traits::CharIncompatibleWith auto) = delete; // Mixing using standard::helpers::lit; -#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE +#ifndef IRIS_X4_NO_STANDARD_WIDE namespace standard_wide { [[maybe_unused]] inline constexpr any_char char_{}; @@ -88,10 +88,10 @@ constexpr void lit(traits::CharIncompatibleWith auto) = delete; // Mixi } // standard_wide using standard_wide::helpers::lit; -#endif // BOOST_SPIRIT_X4_NO_STANDARD_WIDE +#endif // IRIS_X4_NO_STANDARD_WIDE -#ifdef BOOST_SPIRIT_X4_UNICODE +#ifdef IRIS_X4_UNICODE namespace unicode { [[maybe_unused]] inline constexpr any_char char_{}; @@ -121,7 +121,7 @@ constexpr void lit(traits::CharIncompatibleWith auto) = delete; // Mix using unicode::helpers::lit; -#endif // BOOST_SPIRIT_X4_UNICODE +#endif // IRIS_X4_UNICODE namespace parsers { @@ -131,14 +131,14 @@ using x4::standard::char_; using x4::standard::lit; } // standard -#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE +#ifndef IRIS_X4_NO_STANDARD_WIDE namespace standard_wide { using x4::standard_wide::char_; using x4::standard_wide::lit; } // standard_wide #endif -#ifdef BOOST_SPIRIT_X4_UNICODE +#ifdef IRIS_X4_UNICODE namespace unicode { using x4::unicode::char_; using x4::unicode::lit; @@ -165,7 +165,7 @@ struct as_parser } }; -#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE +#ifndef IRIS_X4_NO_STANDARD_WIDE template<> struct as_parser { @@ -191,7 +191,7 @@ struct as_parser } }; -#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE +#ifndef IRIS_X4_NO_STANDARD_WIDE template<> struct as_parser { @@ -203,10 +203,10 @@ struct as_parser return {ch[0]}; } }; -#endif // BOOST_SPIRIT_X4_NO_STANDARD_WIDE +#endif // IRIS_X4_NO_STANDARD_WIDE } // extension -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/char/char_class.hpp b/include/iris/x4/char/char_class.hpp similarity index 55% rename from include/boost/spirit/x4/char/char_class.hpp rename to include/iris/x4/char/char_class.hpp index 336371071..37840deac 100644 --- a/include/boost/spirit/x4/char/char_class.hpp +++ b/include/iris/x4/char/char_class.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_CHAR_CLASS_HPP -#define BOOST_SPIRIT_X4_CHAR_CHAR_CLASS_HPP +#ifndef IRIS_X4_CHAR_CHAR_CLASS_HPP +#define IRIS_X4_CHAR_CHAR_CLASS_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,23 +9,23 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include +#include +#include +#include -#include +#include -#include +#include -#include +#include -#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE -# include +#ifndef IRIS_X4_NO_STANDARD_WIDE +# include #endif #include -namespace boost::spirit::x4 { +namespace iris::x4 { namespace detail { @@ -34,7 +34,7 @@ struct char_class_base { using classify_type = typename Encoding::classify_type; -#define BOOST_SPIRIT_X4_CLASSIFY(name) \ +#define IRIS_X4_CLASSIFY(name) \ template \ [[nodiscard]] static constexpr bool \ is(char_classes::name##_tag, Char ch) noexcept \ @@ -43,21 +43,21 @@ struct char_class_base return (Encoding::is##name)(detail::cast_char(ch)); \ } - BOOST_SPIRIT_X4_CLASSIFY(char) - BOOST_SPIRIT_X4_CLASSIFY(alnum) - BOOST_SPIRIT_X4_CLASSIFY(alpha) - BOOST_SPIRIT_X4_CLASSIFY(digit) - BOOST_SPIRIT_X4_CLASSIFY(xdigit) - BOOST_SPIRIT_X4_CLASSIFY(cntrl) - BOOST_SPIRIT_X4_CLASSIFY(graph) - BOOST_SPIRIT_X4_CLASSIFY(lower) - BOOST_SPIRIT_X4_CLASSIFY(print) - BOOST_SPIRIT_X4_CLASSIFY(punct) - BOOST_SPIRIT_X4_CLASSIFY(space) - BOOST_SPIRIT_X4_CLASSIFY(blank) - BOOST_SPIRIT_X4_CLASSIFY(upper) - -#undef BOOST_SPIRIT_X4_CLASSIFY + IRIS_X4_CLASSIFY(char) + IRIS_X4_CLASSIFY(alnum) + IRIS_X4_CLASSIFY(alpha) + IRIS_X4_CLASSIFY(digit) + IRIS_X4_CLASSIFY(xdigit) + IRIS_X4_CLASSIFY(cntrl) + IRIS_X4_CLASSIFY(graph) + IRIS_X4_CLASSIFY(lower) + IRIS_X4_CLASSIFY(print) + IRIS_X4_CLASSIFY(punct) + IRIS_X4_CLASSIFY(space) + IRIS_X4_CLASSIFY(blank) + IRIS_X4_CLASSIFY(upper) + +#undef IRIS_X4_CLASSIFY }; } // detail @@ -86,7 +86,7 @@ struct char_class_parser : char_parser(ch)`? }; -#define BOOST_SPIRIT_X4_CHAR_CLASS(encoding, name) \ +#define IRIS_X4_CHAR_CLASS(encoding, name) \ namespace encoding { \ [[maybe_unused]] inline constexpr char_class_parser name{}; \ } /* encoding */ \ @@ -94,28 +94,28 @@ struct char_class_parser : char_parser -#include -#include +#include +#include +#include -#include +#include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct char_parser : parser @@ -85,6 +85,6 @@ struct char_parser : parser } }; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/char/char_set.hpp b/include/iris/x4/char/char_set.hpp similarity index 91% rename from include/boost/spirit/x4/char/char_set.hpp rename to include/iris/x4/char/char_set.hpp index 79e8d841b..2e3a641c1 100644 --- a/include/boost/spirit/x4/char/char_set.hpp +++ b/include/iris/x4/char/char_set.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_CHAR_SET_HPP -#define BOOST_SPIRIT_X4_CHAR_CHAR_SET_HPP +#ifndef IRIS_X4_CHAR_CHAR_SET_HPP +#define IRIS_X4_CHAR_CHAR_SET_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,16 +9,16 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { // Parser for a character range template @@ -125,6 +125,6 @@ struct get_info> } }; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/char/detail/basic_chset.hpp b/include/iris/x4/char/detail/basic_chset.hpp similarity index 95% rename from include/boost/spirit/x4/char/detail/basic_chset.hpp rename to include/iris/x4/char/detail/basic_chset.hpp index d5d655804..e90f6e528 100644 --- a/include/boost/spirit/x4/char/detail/basic_chset.hpp +++ b/include/iris/x4/char/detail/basic_chset.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_DETAIL_BASIC_CHSET_HPP -#define BOOST_SPIRIT_X4_CHAR_DETAIL_BASIC_CHSET_HPP +#ifndef IRIS_X4_CHAR_DETAIL_BASIC_CHSET_HPP +#define IRIS_X4_CHAR_DETAIL_BASIC_CHSET_HPP /*============================================================================= Copyright (c) 2001-2011 Joel de Guzman @@ -10,12 +10,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include +#include #include #include -namespace boost::spirit::x4::detail { +namespace iris::x4::detail { // basic character set implementation using `char_range_run` template @@ -225,7 +225,7 @@ struct basic_chset #endif // #if (CHAR_BIT == 8) -} // boost::spirit::x4::detail +} // iris::x4::detail #endif diff --git a/include/boost/spirit/x4/char/detail/cast_char.hpp b/include/iris/x4/char/detail/cast_char.hpp similarity index 92% rename from include/boost/spirit/x4/char/detail/cast_char.hpp rename to include/iris/x4/char/detail/cast_char.hpp index 82a26881c..4b49e40b8 100644 --- a/include/boost/spirit/x4/char/detail/cast_char.hpp +++ b/include/iris/x4/char/detail/cast_char.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_DETAIL_CAST_CHAR_HPP -#define BOOST_SPIRIT_X4_CHAR_DETAIL_CAST_CHAR_HPP +#ifndef IRIS_X4_CHAR_DETAIL_CAST_CHAR_HPP +#define IRIS_X4_CHAR_DETAIL_CAST_CHAR_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -13,7 +13,7 @@ #include #include -namespace boost::spirit::x4::detail { +namespace iris::x4::detail { // Here's the thing... typical encodings (except ASCII) deal with unsigned // integers > 127 (ASCII uses only 127). Yet, most char and wchar_t are signed. @@ -51,6 +51,6 @@ concept cast_char_noexcept = requires(SourceChar ch) { { cast_char(ch) } noexcept -> std::convertible_to; }; -} // boost::spirit::x4::detail +} // iris::x4::detail #endif diff --git a/include/boost/spirit/x4/char/detail/char_range.hpp b/include/iris/x4/char/detail/char_range.hpp similarity index 87% rename from include/boost/spirit/x4/char/detail/char_range.hpp rename to include/iris/x4/char/detail/char_range.hpp index 9eee030b6..cafe1f089 100644 --- a/include/boost/spirit/x4/char/detail/char_range.hpp +++ b/include/iris/x4/char/detail/char_range.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_DETAIL_CHAR_RANGE_HPP -#define BOOST_SPIRIT_X4_CHAR_DETAIL_CHAR_RANGE_HPP +#ifndef IRIS_X4_CHAR_DETAIL_CHAR_RANGE_HPP +#define IRIS_X4_CHAR_DETAIL_CHAR_RANGE_HPP /*============================================================================= Copyright (c) 2001-2011 Joel de Guzman @@ -12,7 +12,7 @@ #include #include -namespace boost::spirit::x4::detail { +namespace iris::x4::detail { // A closed range [first, last] template @@ -37,6 +37,6 @@ struct char_range CharT last{}; }; -} // boost::spirit::x4::detail +} // iris::x4::detail #endif diff --git a/include/boost/spirit/x4/char/detail/char_range_functions.hpp b/include/iris/x4/char/detail/char_range_functions.hpp similarity index 91% rename from include/boost/spirit/x4/char/detail/char_range_functions.hpp rename to include/iris/x4/char/detail/char_range_functions.hpp index 393276a0a..5051302f8 100644 --- a/include/boost/spirit/x4/char/detail/char_range_functions.hpp +++ b/include/iris/x4/char/detail/char_range_functions.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_DETAIL_CHAR_RANGE_FUNCTIONS_HPP -#define BOOST_SPIRIT_X4_CHAR_DETAIL_CHAR_RANGE_FUNCTIONS_HPP +#ifndef IRIS_X4_CHAR_DETAIL_CHAR_RANGE_FUNCTIONS_HPP +#define IRIS_X4_CHAR_DETAIL_CHAR_RANGE_FUNCTIONS_HPP /*============================================================================= Copyright (c) 2001-2011 Joel de Guzman @@ -9,12 +9,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include +#include #include #include -namespace boost::spirit::x4::detail { +namespace iris::x4::detail { template [[nodiscard]] constexpr bool @@ -103,6 +103,6 @@ struct char_range_compare } }; -} // boost::spirit::x4::detail +} // iris::x4::detail #endif diff --git a/include/boost/spirit/x4/char/detail/char_range_run.hpp b/include/iris/x4/char/detail/char_range_run.hpp similarity index 95% rename from include/boost/spirit/x4/char/detail/char_range_run.hpp rename to include/iris/x4/char/detail/char_range_run.hpp index 56a1f8a37..6962c0b6a 100644 --- a/include/boost/spirit/x4/char/detail/char_range_run.hpp +++ b/include/iris/x4/char/detail/char_range_run.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_DETAIL_CHAR_RANGE_RUN_HPP -#define BOOST_SPIRIT_X4_CHAR_DETAIL_CHAR_RANGE_RUN_HPP +#ifndef IRIS_X4_CHAR_DETAIL_CHAR_RANGE_RUN_HPP +#define IRIS_X4_CHAR_DETAIL_CHAR_RANGE_RUN_HPP /*============================================================================= Copyright (c) 2001-2011 Joel de Guzman @@ -9,8 +9,8 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include +#include +#include #include #include @@ -18,7 +18,7 @@ #include -namespace boost::spirit::x4::detail { +namespace iris::x4::detail { // An implementation of a sparse bit (boolean) set. The set uses // a sorted vector of disjoint ranges. This class implements the @@ -172,6 +172,6 @@ class char_range_run storage_type run_; }; -} // boost::spirit::x4::detail +} // iris::x4::detail #endif diff --git a/include/boost/spirit/x4/char/literal_char.hpp b/include/iris/x4/char/literal_char.hpp similarity index 88% rename from include/boost/spirit/x4/char/literal_char.hpp rename to include/iris/x4/char/literal_char.hpp index 619abe1f4..c0ed69fac 100644 --- a/include/boost/spirit/x4/char/literal_char.hpp +++ b/include/iris/x4/char/literal_char.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_LITERAL_CHAR_HPP -#define BOOST_SPIRIT_X4_CHAR_LITERAL_CHAR_HPP +#ifndef IRIS_X4_CHAR_LITERAL_CHAR_HPP +#define IRIS_X4_CHAR_LITERAL_CHAR_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,14 +9,14 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include +#include +#include +#include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct literal_char : char_parser> @@ -64,6 +64,6 @@ struct get_info> } }; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/char/negated_char.hpp b/include/iris/x4/char/negated_char.hpp similarity index 91% rename from include/boost/spirit/x4/char/negated_char.hpp rename to include/iris/x4/char/negated_char.hpp index 92617d43e..9c0c9cbb6 100644 --- a/include/boost/spirit/x4/char/negated_char.hpp +++ b/include/iris/x4/char/negated_char.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_NEGATED_CHAR_HPP -#define BOOST_SPIRIT_X4_CHAR_NEGATED_CHAR_HPP +#ifndef IRIS_X4_CHAR_NEGATED_CHAR_HPP +#define IRIS_X4_CHAR_NEGATED_CHAR_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,12 +9,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include +#include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { // `negated_char_parser` handles `~cp`, where `cp` is a `char_parser` template @@ -66,6 +66,6 @@ operator~(negated_char_parser const& cp) noexcept return cp.positive(); } -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/iris/x4/char/unicode_char_class.hpp b/include/iris/x4/char/unicode_char_class.hpp new file mode 100644 index 000000000..ad8f51832 --- /dev/null +++ b/include/iris/x4/char/unicode_char_class.hpp @@ -0,0 +1,812 @@ +#ifndef IRIS_X4_CHAR_UNICODE_CHAR_CLASS_HPP +#define IRIS_X4_CHAR_UNICODE_CHAR_CLASS_HPP + +/*============================================================================= + Copyright (c) 2001-2014 Joel de Guzman + Copyright (c) 2025 Nana Sakisaka + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include +#include +#include +#include + +namespace iris::x4 { + +namespace char_classes::unicode { + +// Common Categories (semantically compatible with `standard::*` variants) + +using char_tag = char_classes::char_tag; +using alnum_tag = char_classes::alnum_tag; +using alpha_tag = char_classes::alpha_tag; +using digit_tag = char_classes::digit_tag; +using xdigit_tag = char_classes::xdigit_tag; +using cntrl_tag = char_classes::cntrl_tag; +using graph_tag = char_classes::graph_tag; +using lower_tag = char_classes::lower_tag; +using print_tag = char_classes::print_tag; +using punct_tag = char_classes::punct_tag; +using space_tag = char_classes::space_tag; +using blank_tag = char_classes::blank_tag; +using upper_tag = char_classes::upper_tag; + +// Unicode Major Categories + +struct letter_tag {}; +struct mark_tag {}; +struct number_tag {}; +struct separator_tag {}; +struct other_tag {}; +struct punctuation_tag {}; +struct symbol_tag {}; + +// Unicode General Categories + +struct uppercase_letter_tag {}; +struct lowercase_letter_tag {}; +struct titlecase_letter_tag {}; +struct modifier_letter_tag {}; +struct other_letter_tag {}; + +struct nonspacing_mark_tag {}; +struct enclosing_mark_tag {}; +struct spacing_mark_tag {}; + +struct decimal_number_tag {}; +struct letter_number_tag {}; +struct other_number_tag {}; + +struct space_separator_tag {}; +struct line_separator_tag {}; +struct paragraph_separator_tag {}; + +struct control_tag {}; +struct format_tag {}; +struct private_use_tag {}; +struct surrogate_tag {}; +struct unassigned_tag {}; + +struct dash_punctuation_tag {}; +struct open_punctuation_tag {}; +struct close_punctuation_tag {}; +struct connector_punctuation_tag {}; +struct other_punctuation_tag {}; +struct initial_punctuation_tag {}; +struct final_punctuation_tag {}; + +struct math_symbol_tag {}; +struct currency_symbol_tag {}; +struct modifier_symbol_tag {}; +struct other_symbol_tag {}; + +// Unicode Derived Categories + +struct alphabetic_tag {}; +struct uppercase_tag {}; +struct lowercase_tag {}; +struct white_space_tag {}; +struct hex_digit_tag {}; +struct noncharacter_code_point_tag {}; +struct default_ignorable_code_point_tag {}; + +// Unicode Scripts + +struct adlam_tag {}; +struct caucasian_albanian_tag {}; +struct ahom_tag {}; +struct arabic_tag {}; +struct imperial_aramaic_tag {}; +struct armenian_tag {}; +struct avestan_tag {}; +struct balinese_tag {}; +struct bamum_tag {}; +struct bassa_vah_tag {}; +struct batak_tag {}; +struct bengali_tag {}; +struct bhaiksuki_tag {}; +struct bopomofo_tag {}; +struct brahmi_tag {}; +struct braille_tag {}; +struct buginese_tag {}; +struct buhid_tag {}; +struct chakma_tag {}; +struct canadian_aboriginal_tag {}; +struct carian_tag {}; +struct cham_tag {}; +struct cherokee_tag {}; +struct chorasmian_tag {}; +struct coptic_tag {}; +struct cypro_minoan_tag {}; +struct cypriot_tag {}; +struct cyrillic_tag {}; +struct devanagari_tag {}; +struct dives_akuru_tag {}; +struct dogra_tag {}; +struct deseret_tag {}; +struct duployan_tag {}; +struct egyptian_hieroglyphs_tag {}; +struct elbasan_tag {}; +struct elymaic_tag {}; +struct ethiopic_tag {}; +struct georgian_tag {}; +struct glagolitic_tag {}; +struct gunjala_gondi_tag {}; +struct masaram_gondi_tag {}; +struct gothic_tag {}; +struct grantha_tag {}; +struct greek_tag {}; +struct gujarati_tag {}; +struct gurmukhi_tag {}; +struct hangul_tag {}; +struct han_tag {}; +struct hanunoo_tag {}; +struct hatran_tag {}; +struct hebrew_tag {}; +struct hiragana_tag {}; +struct anatolian_hieroglyphs_tag {}; +struct pahawh_hmong_tag {}; +struct nyiakeng_puachue_hmong_tag {}; +struct katakana_or_hiragana_tag {}; +struct old_hungarian_tag {}; +struct old_italic_tag {}; +struct javanese_tag {}; +struct kayah_li_tag {}; +struct katakana_tag {}; +struct kawi_tag {}; +struct kharoshthi_tag {}; +struct khmer_tag {}; +struct khojki_tag {}; +struct khitan_small_script_tag {}; +struct kannada_tag {}; +struct kaithi_tag {}; +struct tai_tham_tag {}; +struct lao_tag {}; +struct latin_tag {}; +struct lepcha_tag {}; +struct limbu_tag {}; +struct linear_a_tag {}; +struct linear_b_tag {}; +struct lisu_tag {}; +struct lycian_tag {}; +struct lydian_tag {}; +struct mahajani_tag {}; +struct makasar_tag {}; +struct mandaic_tag {}; +struct manichaean_tag {}; +struct marchen_tag {}; +struct medefaidrin_tag {}; +struct mende_kikakui_tag {}; +struct meroitic_cursive_tag {}; +struct meroitic_hieroglyphs_tag {}; +struct malayalam_tag {}; +struct modi_tag {}; +struct mongolian_tag {}; +struct mro_tag {}; +struct meetei_mayek_tag {}; +struct multani_tag {}; +struct myanmar_tag {}; +struct nag_mundari_tag {}; +struct nandinagari_tag {}; +struct old_north_arabian_tag {}; +struct nabataean_tag {}; +struct newa_tag {}; +struct nko_tag {}; +struct nushu_tag {}; +struct ogham_tag {}; +struct ol_chiki_tag {}; +struct old_turkic_tag {}; +struct oriya_tag {}; +struct osage_tag {}; +struct osmanya_tag {}; +struct old_uyghur_tag {}; +struct palmyrene_tag {}; +struct pau_cin_hau_tag {}; +struct old_permic_tag {}; +struct phags_pa_tag {}; +struct inscriptional_pahlavi_tag {}; +struct psalter_pahlavi_tag {}; +struct phoenician_tag {}; +struct miao_tag {}; +struct inscriptional_parthian_tag {}; +struct rejang_tag {}; +struct hanifi_rohingya_tag {}; +struct runic_tag {}; +struct samaritan_tag {}; +struct old_south_arabian_tag {}; +struct saurashtra_tag {}; +struct signwriting_tag {}; +struct shavian_tag {}; +struct sharada_tag {}; +struct siddham_tag {}; +struct khudawadi_tag {}; +struct sinhala_tag {}; +struct sogdian_tag {}; +struct old_sogdian_tag {}; +struct sora_sompeng_tag {}; +struct soyombo_tag {}; +struct sundanese_tag {}; +struct syloti_nagri_tag {}; +struct syriac_tag {}; +struct tagbanwa_tag {}; +struct takri_tag {}; +struct tai_le_tag {}; +struct new_tai_lue_tag {}; +struct tamil_tag {}; +struct tangut_tag {}; +struct tai_viet_tag {}; +struct telugu_tag {}; +struct tifinagh_tag {}; +struct tagalog_tag {}; +struct thaana_tag {}; +struct thai_tag {}; +struct tibetan_tag {}; +struct tirhuta_tag {}; +struct tangsa_tag {}; +struct toto_tag {}; +struct ugaritic_tag {}; +struct vai_tag {}; +struct vithkuqi_tag {}; +struct warang_citi_tag {}; +struct wancho_tag {}; +struct old_persian_tag {}; +struct cuneiform_tag {}; +struct yezidi_tag {}; +struct yi_tag {}; +struct zanabazar_square_tag {}; +struct inherited_tag {}; +struct common_tag {}; +struct unknown_tag {}; + +} // char_classes::unicode + +namespace detail { + +struct unicode_char_class_base +{ + using encoding_type = char_encoding::unicode; + using char_type = char_encoding::unicode::char_type; + +#define IRIS_X4_BASIC_CLASSIFY(name) \ + template \ + static constexpr bool \ + is(char_classes::unicode::name##_tag, Char ch) noexcept \ + { \ + return (encoding_type::is##name)(detail::cast_char(ch)); \ + } + +#define IRIS_X4_CLASSIFY(name) \ + template \ + static constexpr bool \ + is(char_classes::unicode::name##_tag, Char ch) noexcept \ + { \ + return (encoding_type::is_##name)(detail::cast_char(ch)); \ + } + + // Unicode Major Categories + + IRIS_X4_BASIC_CLASSIFY(char) + IRIS_X4_BASIC_CLASSIFY(alnum) + IRIS_X4_BASIC_CLASSIFY(alpha) + IRIS_X4_BASIC_CLASSIFY(digit) + IRIS_X4_BASIC_CLASSIFY(xdigit) + IRIS_X4_BASIC_CLASSIFY(cntrl) + IRIS_X4_BASIC_CLASSIFY(graph) + IRIS_X4_BASIC_CLASSIFY(lower) + IRIS_X4_BASIC_CLASSIFY(print) + IRIS_X4_BASIC_CLASSIFY(punct) + IRIS_X4_BASIC_CLASSIFY(space) + IRIS_X4_BASIC_CLASSIFY(blank) + IRIS_X4_BASIC_CLASSIFY(upper) + + // Unicode Major Categories + + IRIS_X4_CLASSIFY(letter) + IRIS_X4_CLASSIFY(mark) + IRIS_X4_CLASSIFY(number) + IRIS_X4_CLASSIFY(separator) + IRIS_X4_CLASSIFY(other) + IRIS_X4_CLASSIFY(punctuation) + IRIS_X4_CLASSIFY(symbol) + + // Unicode General Categories + + IRIS_X4_CLASSIFY(uppercase_letter) + IRIS_X4_CLASSIFY(lowercase_letter) + IRIS_X4_CLASSIFY(titlecase_letter) + IRIS_X4_CLASSIFY(modifier_letter) + IRIS_X4_CLASSIFY(other_letter) + + IRIS_X4_CLASSIFY(nonspacing_mark) + IRIS_X4_CLASSIFY(enclosing_mark) + IRIS_X4_CLASSIFY(spacing_mark) + + IRIS_X4_CLASSIFY(decimal_number) + IRIS_X4_CLASSIFY(letter_number) + IRIS_X4_CLASSIFY(other_number) + + IRIS_X4_CLASSIFY(space_separator) + IRIS_X4_CLASSIFY(line_separator) + IRIS_X4_CLASSIFY(paragraph_separator) + + IRIS_X4_CLASSIFY(control) + IRIS_X4_CLASSIFY(format) + IRIS_X4_CLASSIFY(private_use) + IRIS_X4_CLASSIFY(surrogate) + IRIS_X4_CLASSIFY(unassigned) + + IRIS_X4_CLASSIFY(dash_punctuation) + IRIS_X4_CLASSIFY(open_punctuation) + IRIS_X4_CLASSIFY(close_punctuation) + IRIS_X4_CLASSIFY(connector_punctuation) + IRIS_X4_CLASSIFY(other_punctuation) + IRIS_X4_CLASSIFY(initial_punctuation) + IRIS_X4_CLASSIFY(final_punctuation) + + IRIS_X4_CLASSIFY(math_symbol) + IRIS_X4_CLASSIFY(currency_symbol) + IRIS_X4_CLASSIFY(modifier_symbol) + IRIS_X4_CLASSIFY(other_symbol) + + // Unicode Derived Categories + + IRIS_X4_CLASSIFY(alphabetic) + IRIS_X4_CLASSIFY(uppercase) + IRIS_X4_CLASSIFY(lowercase) + IRIS_X4_CLASSIFY(white_space) + IRIS_X4_CLASSIFY(hex_digit) + IRIS_X4_CLASSIFY(noncharacter_code_point) + IRIS_X4_CLASSIFY(default_ignorable_code_point) + + // Unicode Scripts + + IRIS_X4_CLASSIFY(adlam) + IRIS_X4_CLASSIFY(caucasian_albanian) + IRIS_X4_CLASSIFY(ahom) + IRIS_X4_CLASSIFY(arabic) + IRIS_X4_CLASSIFY(imperial_aramaic) + IRIS_X4_CLASSIFY(armenian) + IRIS_X4_CLASSIFY(avestan) + IRIS_X4_CLASSIFY(balinese) + IRIS_X4_CLASSIFY(bamum) + IRIS_X4_CLASSIFY(bassa_vah) + IRIS_X4_CLASSIFY(batak) + IRIS_X4_CLASSIFY(bengali) + IRIS_X4_CLASSIFY(bhaiksuki) + IRIS_X4_CLASSIFY(bopomofo) + IRIS_X4_CLASSIFY(brahmi) + IRIS_X4_CLASSIFY(braille) + IRIS_X4_CLASSIFY(buginese) + IRIS_X4_CLASSIFY(buhid) + IRIS_X4_CLASSIFY(chakma) + IRIS_X4_CLASSIFY(canadian_aboriginal) + IRIS_X4_CLASSIFY(carian) + IRIS_X4_CLASSIFY(cham) + IRIS_X4_CLASSIFY(cherokee) + IRIS_X4_CLASSIFY(chorasmian) + IRIS_X4_CLASSIFY(coptic) + IRIS_X4_CLASSIFY(cypro_minoan) + IRIS_X4_CLASSIFY(cypriot) + IRIS_X4_CLASSIFY(cyrillic) + IRIS_X4_CLASSIFY(devanagari) + IRIS_X4_CLASSIFY(dives_akuru) + IRIS_X4_CLASSIFY(dogra) + IRIS_X4_CLASSIFY(deseret) + IRIS_X4_CLASSIFY(duployan) + IRIS_X4_CLASSIFY(egyptian_hieroglyphs) + IRIS_X4_CLASSIFY(elbasan) + IRIS_X4_CLASSIFY(elymaic) + IRIS_X4_CLASSIFY(ethiopic) + IRIS_X4_CLASSIFY(georgian) + IRIS_X4_CLASSIFY(glagolitic) + IRIS_X4_CLASSIFY(gunjala_gondi) + IRIS_X4_CLASSIFY(masaram_gondi) + IRIS_X4_CLASSIFY(gothic) + IRIS_X4_CLASSIFY(grantha) + IRIS_X4_CLASSIFY(greek) + IRIS_X4_CLASSIFY(gujarati) + IRIS_X4_CLASSIFY(gurmukhi) + IRIS_X4_CLASSIFY(hangul) + IRIS_X4_CLASSIFY(han) + IRIS_X4_CLASSIFY(hanunoo) + IRIS_X4_CLASSIFY(hatran) + IRIS_X4_CLASSIFY(hebrew) + IRIS_X4_CLASSIFY(hiragana) + IRIS_X4_CLASSIFY(anatolian_hieroglyphs) + IRIS_X4_CLASSIFY(pahawh_hmong) + IRIS_X4_CLASSIFY(nyiakeng_puachue_hmong) + IRIS_X4_CLASSIFY(katakana_or_hiragana) + IRIS_X4_CLASSIFY(old_hungarian) + IRIS_X4_CLASSIFY(old_italic) + IRIS_X4_CLASSIFY(javanese) + IRIS_X4_CLASSIFY(kayah_li) + IRIS_X4_CLASSIFY(katakana) + IRIS_X4_CLASSIFY(kawi) + IRIS_X4_CLASSIFY(kharoshthi) + IRIS_X4_CLASSIFY(khmer) + IRIS_X4_CLASSIFY(khojki) + IRIS_X4_CLASSIFY(khitan_small_script) + IRIS_X4_CLASSIFY(kannada) + IRIS_X4_CLASSIFY(kaithi) + IRIS_X4_CLASSIFY(tai_tham) + IRIS_X4_CLASSIFY(lao) + IRIS_X4_CLASSIFY(latin) + IRIS_X4_CLASSIFY(lepcha) + IRIS_X4_CLASSIFY(limbu) + IRIS_X4_CLASSIFY(linear_a) + IRIS_X4_CLASSIFY(linear_b) + IRIS_X4_CLASSIFY(lisu) + IRIS_X4_CLASSIFY(lycian) + IRIS_X4_CLASSIFY(lydian) + IRIS_X4_CLASSIFY(mahajani) + IRIS_X4_CLASSIFY(makasar) + IRIS_X4_CLASSIFY(mandaic) + IRIS_X4_CLASSIFY(manichaean) + IRIS_X4_CLASSIFY(marchen) + IRIS_X4_CLASSIFY(medefaidrin) + IRIS_X4_CLASSIFY(mende_kikakui) + IRIS_X4_CLASSIFY(meroitic_cursive) + IRIS_X4_CLASSIFY(meroitic_hieroglyphs) + IRIS_X4_CLASSIFY(malayalam) + IRIS_X4_CLASSIFY(modi) + IRIS_X4_CLASSIFY(mongolian) + IRIS_X4_CLASSIFY(mro) + IRIS_X4_CLASSIFY(meetei_mayek) + IRIS_X4_CLASSIFY(multani) + IRIS_X4_CLASSIFY(myanmar) + IRIS_X4_CLASSIFY(nag_mundari) + IRIS_X4_CLASSIFY(nandinagari) + IRIS_X4_CLASSIFY(old_north_arabian) + IRIS_X4_CLASSIFY(nabataean) + IRIS_X4_CLASSIFY(newa) + IRIS_X4_CLASSIFY(nko) + IRIS_X4_CLASSIFY(nushu) + IRIS_X4_CLASSIFY(ogham) + IRIS_X4_CLASSIFY(ol_chiki) + IRIS_X4_CLASSIFY(old_turkic) + IRIS_X4_CLASSIFY(oriya) + IRIS_X4_CLASSIFY(osage) + IRIS_X4_CLASSIFY(osmanya) + IRIS_X4_CLASSIFY(old_uyghur) + IRIS_X4_CLASSIFY(palmyrene) + IRIS_X4_CLASSIFY(pau_cin_hau) + IRIS_X4_CLASSIFY(old_permic) + IRIS_X4_CLASSIFY(phags_pa) + IRIS_X4_CLASSIFY(inscriptional_pahlavi) + IRIS_X4_CLASSIFY(psalter_pahlavi) + IRIS_X4_CLASSIFY(phoenician) + IRIS_X4_CLASSIFY(miao) + IRIS_X4_CLASSIFY(inscriptional_parthian) + IRIS_X4_CLASSIFY(rejang) + IRIS_X4_CLASSIFY(hanifi_rohingya) + IRIS_X4_CLASSIFY(runic) + IRIS_X4_CLASSIFY(samaritan) + IRIS_X4_CLASSIFY(old_south_arabian) + IRIS_X4_CLASSIFY(saurashtra) + IRIS_X4_CLASSIFY(signwriting) + IRIS_X4_CLASSIFY(shavian) + IRIS_X4_CLASSIFY(sharada) + IRIS_X4_CLASSIFY(siddham) + IRIS_X4_CLASSIFY(khudawadi) + IRIS_X4_CLASSIFY(sinhala) + IRIS_X4_CLASSIFY(sogdian) + IRIS_X4_CLASSIFY(old_sogdian) + IRIS_X4_CLASSIFY(sora_sompeng) + IRIS_X4_CLASSIFY(soyombo) + IRIS_X4_CLASSIFY(sundanese) + IRIS_X4_CLASSIFY(syloti_nagri) + IRIS_X4_CLASSIFY(syriac) + IRIS_X4_CLASSIFY(tagbanwa) + IRIS_X4_CLASSIFY(takri) + IRIS_X4_CLASSIFY(tai_le) + IRIS_X4_CLASSIFY(new_tai_lue) + IRIS_X4_CLASSIFY(tamil) + IRIS_X4_CLASSIFY(tangut) + IRIS_X4_CLASSIFY(tai_viet) + IRIS_X4_CLASSIFY(telugu) + IRIS_X4_CLASSIFY(tifinagh) + IRIS_X4_CLASSIFY(tagalog) + IRIS_X4_CLASSIFY(thaana) + IRIS_X4_CLASSIFY(thai) + IRIS_X4_CLASSIFY(tibetan) + IRIS_X4_CLASSIFY(tirhuta) + IRIS_X4_CLASSIFY(tangsa) + IRIS_X4_CLASSIFY(toto) + IRIS_X4_CLASSIFY(ugaritic) + IRIS_X4_CLASSIFY(vai) + IRIS_X4_CLASSIFY(vithkuqi) + IRIS_X4_CLASSIFY(warang_citi) + IRIS_X4_CLASSIFY(wancho) + IRIS_X4_CLASSIFY(old_persian) + IRIS_X4_CLASSIFY(cuneiform) + IRIS_X4_CLASSIFY(yezidi) + IRIS_X4_CLASSIFY(yi) + IRIS_X4_CLASSIFY(zanabazar_square) + IRIS_X4_CLASSIFY(inherited) + IRIS_X4_CLASSIFY(common) + IRIS_X4_CLASSIFY(unknown) + +#undef IRIS_X4_BASIC_CLASSIFY +#undef IRIS_X4_CLASSIFY +}; + +} // detail + +template +struct unicode_char_class : char_parser> +{ + using encoding_type = char_encoding::unicode; + using tag = Tag; + using char_type = typename encoding_type::char_type; + using attribute_type = char_type; + + static constexpr bool has_attribute = true; + + [[nodiscard]] static constexpr bool + test(char_encoding::unicode::classify_type const classify_ch, auto const& /* ctx */) noexcept + { + static_assert(noexcept(encoding_type::ischar(classify_ch) && detail::unicode_char_class_base::is(tag{}, classify_ch))); + return encoding_type::ischar(classify_ch) && detail::unicode_char_class_base::is(tag{}, classify_ch); + } + + static constexpr void test(auto const, auto const&) = delete; // Mixing incompatible char types is not allowed +}; + +#define IRIS_X4_CHAR_CLASS(name) \ + namespace unicode { \ + [[maybe_unused]] inline constexpr unicode_char_class name{}; \ + } /* unicode */ \ + namespace parsers::unicode { \ + using x4::unicode::name; \ + } /* parsers::unicode */ + +// Unicode Major Categories + +IRIS_X4_CHAR_CLASS(alnum) +IRIS_X4_CHAR_CLASS(alpha) +IRIS_X4_CHAR_CLASS(digit) +IRIS_X4_CHAR_CLASS(xdigit) +IRIS_X4_CHAR_CLASS(cntrl) +IRIS_X4_CHAR_CLASS(graph) +IRIS_X4_CHAR_CLASS(lower) +IRIS_X4_CHAR_CLASS(print) +IRIS_X4_CHAR_CLASS(punct) +IRIS_X4_CHAR_CLASS(space) +IRIS_X4_CHAR_CLASS(blank) +IRIS_X4_CHAR_CLASS(upper) + +// Unicode Major Categories + +IRIS_X4_CHAR_CLASS(letter) +IRIS_X4_CHAR_CLASS(mark) +IRIS_X4_CHAR_CLASS(number) +IRIS_X4_CHAR_CLASS(separator) +IRIS_X4_CHAR_CLASS(other) +IRIS_X4_CHAR_CLASS(punctuation) +IRIS_X4_CHAR_CLASS(symbol) + +// Unicode General Categories + +IRIS_X4_CHAR_CLASS(uppercase_letter) +IRIS_X4_CHAR_CLASS(lowercase_letter) +IRIS_X4_CHAR_CLASS(titlecase_letter) +IRIS_X4_CHAR_CLASS(modifier_letter) +IRIS_X4_CHAR_CLASS(other_letter) + +IRIS_X4_CHAR_CLASS(nonspacing_mark) +IRIS_X4_CHAR_CLASS(enclosing_mark) +IRIS_X4_CHAR_CLASS(spacing_mark) + +IRIS_X4_CHAR_CLASS(decimal_number) +IRIS_X4_CHAR_CLASS(letter_number) +IRIS_X4_CHAR_CLASS(other_number) + +IRIS_X4_CHAR_CLASS(space_separator) +IRIS_X4_CHAR_CLASS(line_separator) +IRIS_X4_CHAR_CLASS(paragraph_separator) + +IRIS_X4_CHAR_CLASS(control) +IRIS_X4_CHAR_CLASS(format) +IRIS_X4_CHAR_CLASS(private_use) +IRIS_X4_CHAR_CLASS(surrogate) +IRIS_X4_CHAR_CLASS(unassigned) + +IRIS_X4_CHAR_CLASS(dash_punctuation) +IRIS_X4_CHAR_CLASS(open_punctuation) +IRIS_X4_CHAR_CLASS(close_punctuation) +IRIS_X4_CHAR_CLASS(connector_punctuation) +IRIS_X4_CHAR_CLASS(other_punctuation) +IRIS_X4_CHAR_CLASS(initial_punctuation) +IRIS_X4_CHAR_CLASS(final_punctuation) + +IRIS_X4_CHAR_CLASS(math_symbol) +IRIS_X4_CHAR_CLASS(currency_symbol) +IRIS_X4_CHAR_CLASS(modifier_symbol) +IRIS_X4_CHAR_CLASS(other_symbol) + +// Unicode Derived Categories + +IRIS_X4_CHAR_CLASS(alphabetic) +IRIS_X4_CHAR_CLASS(uppercase) +IRIS_X4_CHAR_CLASS(lowercase) +IRIS_X4_CHAR_CLASS(white_space) +IRIS_X4_CHAR_CLASS(hex_digit) +IRIS_X4_CHAR_CLASS(noncharacter_code_point) +IRIS_X4_CHAR_CLASS(default_ignorable_code_point) + +// Unicode Scripts + +IRIS_X4_CHAR_CLASS(adlam) +IRIS_X4_CHAR_CLASS(caucasian_albanian) +IRIS_X4_CHAR_CLASS(ahom) +IRIS_X4_CHAR_CLASS(arabic) +IRIS_X4_CHAR_CLASS(imperial_aramaic) +IRIS_X4_CHAR_CLASS(armenian) +IRIS_X4_CHAR_CLASS(avestan) +IRIS_X4_CHAR_CLASS(balinese) +IRIS_X4_CHAR_CLASS(bamum) +IRIS_X4_CHAR_CLASS(bassa_vah) +IRIS_X4_CHAR_CLASS(batak) +IRIS_X4_CHAR_CLASS(bengali) +IRIS_X4_CHAR_CLASS(bhaiksuki) +IRIS_X4_CHAR_CLASS(bopomofo) +IRIS_X4_CHAR_CLASS(brahmi) +IRIS_X4_CHAR_CLASS(braille) +IRIS_X4_CHAR_CLASS(buginese) +IRIS_X4_CHAR_CLASS(buhid) +IRIS_X4_CHAR_CLASS(chakma) +IRIS_X4_CHAR_CLASS(canadian_aboriginal) +IRIS_X4_CHAR_CLASS(carian) +IRIS_X4_CHAR_CLASS(cham) +IRIS_X4_CHAR_CLASS(cherokee) +IRIS_X4_CHAR_CLASS(chorasmian) +IRIS_X4_CHAR_CLASS(coptic) +IRIS_X4_CHAR_CLASS(cypro_minoan) +IRIS_X4_CHAR_CLASS(cypriot) +IRIS_X4_CHAR_CLASS(cyrillic) +IRIS_X4_CHAR_CLASS(devanagari) +IRIS_X4_CHAR_CLASS(dives_akuru) +IRIS_X4_CHAR_CLASS(dogra) +IRIS_X4_CHAR_CLASS(deseret) +IRIS_X4_CHAR_CLASS(duployan) +IRIS_X4_CHAR_CLASS(egyptian_hieroglyphs) +IRIS_X4_CHAR_CLASS(elbasan) +IRIS_X4_CHAR_CLASS(elymaic) +IRIS_X4_CHAR_CLASS(ethiopic) +IRIS_X4_CHAR_CLASS(georgian) +IRIS_X4_CHAR_CLASS(glagolitic) +IRIS_X4_CHAR_CLASS(gunjala_gondi) +IRIS_X4_CHAR_CLASS(masaram_gondi) +IRIS_X4_CHAR_CLASS(gothic) +IRIS_X4_CHAR_CLASS(grantha) +IRIS_X4_CHAR_CLASS(greek) +IRIS_X4_CHAR_CLASS(gujarati) +IRIS_X4_CHAR_CLASS(gurmukhi) +IRIS_X4_CHAR_CLASS(hangul) +IRIS_X4_CHAR_CLASS(han) +IRIS_X4_CHAR_CLASS(hanunoo) +IRIS_X4_CHAR_CLASS(hatran) +IRIS_X4_CHAR_CLASS(hebrew) +IRIS_X4_CHAR_CLASS(hiragana) +IRIS_X4_CHAR_CLASS(anatolian_hieroglyphs) +IRIS_X4_CHAR_CLASS(pahawh_hmong) +IRIS_X4_CHAR_CLASS(nyiakeng_puachue_hmong) +IRIS_X4_CHAR_CLASS(katakana_or_hiragana) +IRIS_X4_CHAR_CLASS(old_hungarian) +IRIS_X4_CHAR_CLASS(old_italic) +IRIS_X4_CHAR_CLASS(javanese) +IRIS_X4_CHAR_CLASS(kayah_li) +IRIS_X4_CHAR_CLASS(katakana) +IRIS_X4_CHAR_CLASS(kawi) +IRIS_X4_CHAR_CLASS(kharoshthi) +IRIS_X4_CHAR_CLASS(khmer) +IRIS_X4_CHAR_CLASS(khojki) +IRIS_X4_CHAR_CLASS(khitan_small_script) +IRIS_X4_CHAR_CLASS(kannada) +IRIS_X4_CHAR_CLASS(kaithi) +IRIS_X4_CHAR_CLASS(tai_tham) +IRIS_X4_CHAR_CLASS(lao) +IRIS_X4_CHAR_CLASS(latin) +IRIS_X4_CHAR_CLASS(lepcha) +IRIS_X4_CHAR_CLASS(limbu) +IRIS_X4_CHAR_CLASS(linear_a) +IRIS_X4_CHAR_CLASS(linear_b) +IRIS_X4_CHAR_CLASS(lisu) +IRIS_X4_CHAR_CLASS(lycian) +IRIS_X4_CHAR_CLASS(lydian) +IRIS_X4_CHAR_CLASS(mahajani) +IRIS_X4_CHAR_CLASS(makasar) +IRIS_X4_CHAR_CLASS(mandaic) +IRIS_X4_CHAR_CLASS(manichaean) +IRIS_X4_CHAR_CLASS(marchen) +IRIS_X4_CHAR_CLASS(medefaidrin) +IRIS_X4_CHAR_CLASS(mende_kikakui) +IRIS_X4_CHAR_CLASS(meroitic_cursive) +IRIS_X4_CHAR_CLASS(meroitic_hieroglyphs) +IRIS_X4_CHAR_CLASS(malayalam) +IRIS_X4_CHAR_CLASS(modi) +IRIS_X4_CHAR_CLASS(mongolian) +IRIS_X4_CHAR_CLASS(mro) +IRIS_X4_CHAR_CLASS(meetei_mayek) +IRIS_X4_CHAR_CLASS(multani) +IRIS_X4_CHAR_CLASS(myanmar) +IRIS_X4_CHAR_CLASS(nag_mundari) +IRIS_X4_CHAR_CLASS(nandinagari) +IRIS_X4_CHAR_CLASS(old_north_arabian) +IRIS_X4_CHAR_CLASS(nabataean) +IRIS_X4_CHAR_CLASS(newa) +IRIS_X4_CHAR_CLASS(nko) +IRIS_X4_CHAR_CLASS(nushu) +IRIS_X4_CHAR_CLASS(ogham) +IRIS_X4_CHAR_CLASS(ol_chiki) +IRIS_X4_CHAR_CLASS(old_turkic) +IRIS_X4_CHAR_CLASS(oriya) +IRIS_X4_CHAR_CLASS(osage) +IRIS_X4_CHAR_CLASS(osmanya) +IRIS_X4_CHAR_CLASS(old_uyghur) +IRIS_X4_CHAR_CLASS(palmyrene) +IRIS_X4_CHAR_CLASS(pau_cin_hau) +IRIS_X4_CHAR_CLASS(old_permic) +IRIS_X4_CHAR_CLASS(phags_pa) +IRIS_X4_CHAR_CLASS(inscriptional_pahlavi) +IRIS_X4_CHAR_CLASS(psalter_pahlavi) +IRIS_X4_CHAR_CLASS(phoenician) +IRIS_X4_CHAR_CLASS(miao) +IRIS_X4_CHAR_CLASS(inscriptional_parthian) +IRIS_X4_CHAR_CLASS(rejang) +IRIS_X4_CHAR_CLASS(hanifi_rohingya) +IRIS_X4_CHAR_CLASS(runic) +IRIS_X4_CHAR_CLASS(samaritan) +IRIS_X4_CHAR_CLASS(old_south_arabian) +IRIS_X4_CHAR_CLASS(saurashtra) +IRIS_X4_CHAR_CLASS(signwriting) +IRIS_X4_CHAR_CLASS(shavian) +IRIS_X4_CHAR_CLASS(sharada) +IRIS_X4_CHAR_CLASS(siddham) +IRIS_X4_CHAR_CLASS(khudawadi) +IRIS_X4_CHAR_CLASS(sinhala) +IRIS_X4_CHAR_CLASS(sogdian) +IRIS_X4_CHAR_CLASS(old_sogdian) +IRIS_X4_CHAR_CLASS(sora_sompeng) +IRIS_X4_CHAR_CLASS(soyombo) +IRIS_X4_CHAR_CLASS(sundanese) +IRIS_X4_CHAR_CLASS(syloti_nagri) +IRIS_X4_CHAR_CLASS(syriac) +IRIS_X4_CHAR_CLASS(tagbanwa) +IRIS_X4_CHAR_CLASS(takri) +IRIS_X4_CHAR_CLASS(tai_le) +IRIS_X4_CHAR_CLASS(new_tai_lue) +IRIS_X4_CHAR_CLASS(tamil) +IRIS_X4_CHAR_CLASS(tangut) +IRIS_X4_CHAR_CLASS(tai_viet) +IRIS_X4_CHAR_CLASS(telugu) +IRIS_X4_CHAR_CLASS(tifinagh) +IRIS_X4_CHAR_CLASS(tagalog) +IRIS_X4_CHAR_CLASS(thaana) +IRIS_X4_CHAR_CLASS(thai) +IRIS_X4_CHAR_CLASS(tibetan) +IRIS_X4_CHAR_CLASS(tirhuta) +IRIS_X4_CHAR_CLASS(tangsa) +IRIS_X4_CHAR_CLASS(toto) +IRIS_X4_CHAR_CLASS(ugaritic) +IRIS_X4_CHAR_CLASS(vai) +IRIS_X4_CHAR_CLASS(vithkuqi) +IRIS_X4_CHAR_CLASS(warang_citi) +IRIS_X4_CHAR_CLASS(wancho) +IRIS_X4_CHAR_CLASS(old_persian) +IRIS_X4_CHAR_CLASS(cuneiform) +IRIS_X4_CHAR_CLASS(yezidi) +IRIS_X4_CHAR_CLASS(yi) +IRIS_X4_CHAR_CLASS(zanabazar_square) +IRIS_X4_CHAR_CLASS(inherited) +IRIS_X4_CHAR_CLASS(common) +IRIS_X4_CHAR_CLASS(unknown) + +#undef IRIS_X4_CHAR_CLASS + +} // iris::x4 + +#endif diff --git a/include/boost/spirit/x4/char_encoding/standard.hpp b/include/iris/x4/char_encoding/standard.hpp similarity index 95% rename from include/boost/spirit/x4/char_encoding/standard.hpp rename to include/iris/x4/char_encoding/standard.hpp index 2c5ad341b..b5284ef0e 100644 --- a/include/boost/spirit/x4/char_encoding/standard.hpp +++ b/include/iris/x4/char_encoding/standard.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_ENCODING_STANDARD_HPP -#define BOOST_SPIRIT_X4_CHAR_ENCODING_STANDARD_HPP +#ifndef IRIS_X4_CHAR_ENCODING_STANDARD_HPP +#define IRIS_X4_CHAR_ENCODING_STANDARD_HPP /*============================================================================= Copyright (c) 2001-2011 Hartmut Kaiser @@ -15,7 +15,7 @@ #include #include -namespace boost::spirit::x4::char_encoding { +namespace iris::x4::char_encoding { // Test characters for specified conditions (using std functions) struct standard @@ -158,6 +158,6 @@ struct standard } }; -} // boost::spirit::x4::char_encoding +} // iris::x4::char_encoding #endif diff --git a/include/boost/spirit/x4/char_encoding/standard_wide.hpp b/include/iris/x4/char_encoding/standard_wide.hpp similarity index 95% rename from include/boost/spirit/x4/char_encoding/standard_wide.hpp rename to include/iris/x4/char_encoding/standard_wide.hpp index e48b2d356..75c23f793 100644 --- a/include/boost/spirit/x4/char_encoding/standard_wide.hpp +++ b/include/iris/x4/char_encoding/standard_wide.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_ENCODING_STANDARD_WIDE_HPP -#define BOOST_SPIRIT_X4_CHAR_ENCODING_STANDARD_WIDE_HPP +#ifndef IRIS_X4_CHAR_ENCODING_STANDARD_WIDE_HPP +#define IRIS_X4_CHAR_ENCODING_STANDARD_WIDE_HPP /*============================================================================= Copyright (c) 2001-2011 Hartmut Kaiser @@ -16,7 +16,7 @@ #include #include -namespace boost::spirit::x4::char_encoding { +namespace iris::x4::char_encoding { // Test characters for specified conditions (using std wchar_t functions) @@ -157,6 +157,6 @@ struct standard_wide } }; -} // boost::spirit::x4::char_encoding +} // iris::x4::char_encoding #endif diff --git a/include/iris/x4/char_encoding/unicode.hpp b/include/iris/x4/char_encoding/unicode.hpp new file mode 100644 index 000000000..cd033f501 --- /dev/null +++ b/include/iris/x4/char_encoding/unicode.hpp @@ -0,0 +1,436 @@ +#ifndef IRIS_X4_CHAR_ENCODING_UNICODE_HPP +#define IRIS_X4_CHAR_ENCODING_UNICODE_HPP + +/*============================================================================= + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2025 Nana Sakisaka + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include + +#include + +namespace iris::x4::char_encoding { + +struct unicode +{ + using char_type = char32_t; + using classify_type = x4::unicode::classify_type; + + [[nodiscard]] static constexpr bool + isascii_(classify_type ch) noexcept + { + return 0 == (ch & ~0x7f); + } + + [[nodiscard]] static constexpr bool + ischar(classify_type ch) noexcept + { + // unicode code points in the range 0x00 to 0x10FFFF + return ch <= 0x10FFFF; + } + + [[nodiscard]] static constexpr bool + isalnum(classify_type ch) noexcept + { + return x4::unicode::is_alphanumeric(ch); + } + + [[nodiscard]] static constexpr bool + isalpha(classify_type ch) noexcept + { + return x4::unicode::is_alphabetic(ch); + } + + [[nodiscard]] static constexpr bool + isdigit(classify_type ch) noexcept + { + return x4::unicode::is_decimal_number(ch); + } + + [[nodiscard]] static constexpr bool + isxdigit(classify_type ch) noexcept + { + return x4::unicode::is_hex_digit(ch); + } + + [[nodiscard]] static constexpr bool + iscntrl(classify_type ch) noexcept + { + return x4::unicode::is_control(ch); + } + + [[nodiscard]] static constexpr bool + isgraph(classify_type ch) noexcept + { + return x4::unicode::is_graph(ch); + } + + [[nodiscard]] static constexpr bool + islower(classify_type ch) noexcept + { + return x4::unicode::is_lowercase(ch); + } + + [[nodiscard]] static constexpr bool + isprint(classify_type ch) noexcept + { + return x4::unicode::is_print(ch); + } + + [[nodiscard]] static constexpr bool + ispunct(classify_type ch) noexcept + { + return x4::unicode::is_punctuation(ch); + } + + [[nodiscard]] static constexpr bool + isspace(classify_type ch) noexcept + { + return x4::unicode::is_white_space(ch); + } + + [[nodiscard]] static constexpr bool + (isblank)(classify_type ch) noexcept + { + return x4::unicode::is_blank(ch); + } + + [[nodiscard]] static constexpr bool + isupper(classify_type ch) noexcept + { + return x4::unicode::is_uppercase(ch); + } + + // Mixing character encodings is semantically wrong + static constexpr void isascii_(char) = delete; + static constexpr void isascii_(wchar_t) = delete; + static constexpr void ischar(char) = delete; + static constexpr void ischar(wchar_t) = delete; + static constexpr void isalnum(char) = delete; + static constexpr void isalnum(wchar_t) = delete; + static constexpr void isalpha(char) = delete; + static constexpr void isalpha(wchar_t) = delete; + static constexpr void isdigit(char) = delete; + static constexpr void isdigit(wchar_t) = delete; + static constexpr void isxdigit(char) = delete; + static constexpr void isxdigit(wchar_t) = delete; + static constexpr void iscntrl(char) = delete; + static constexpr void iscntrl(wchar_t) = delete; + static constexpr void isgraph(char) = delete; + static constexpr void isgraph(wchar_t) = delete; + static constexpr void islower(char) = delete; + static constexpr void islower(wchar_t) = delete; + static constexpr void isprint(char) = delete; + static constexpr void isprint(wchar_t) = delete; + static constexpr void ispunct(char) = delete; + static constexpr void ispunct(wchar_t) = delete; + static constexpr void isspace(char) = delete; + static constexpr void isspace(wchar_t) = delete; + static constexpr void isblank(char) = delete; + static constexpr void isblank(wchar_t) = delete; + static constexpr void isupper(char) = delete; + static constexpr void isupper(wchar_t) = delete; + + // Simple character conversions + + [[nodiscard]] static constexpr classify_type + tolower(classify_type ch) noexcept + { + return x4::unicode::to_lowercase(ch); + } + + [[nodiscard]] static constexpr classify_type + toupper(classify_type ch) noexcept + { + return x4::unicode::to_uppercase(ch); + } + + [[nodiscard]] static constexpr std::uint32_t + toucs4(classify_type ch) noexcept + { + return ch; + } + + static constexpr void tolower(char) = delete; + static constexpr void tolower(wchar_t) = delete; + static constexpr void toupper(char) = delete; + static constexpr void toupper(wchar_t) = delete; + static constexpr void toucs4(char) = delete; + static constexpr void toucs4(wchar_t) = delete; + + // Major Categories +#define IRIS_X4_MAJOR_CATEGORY(name) \ + [[nodiscard]] static constexpr bool \ + is_##name(classify_type ch) noexcept \ + { \ + return x4::unicode::get_major_category(ch) == x4::unicode::properties::name; \ + } \ + static constexpr void is_##name(char) = delete; \ + static constexpr void is_##name(wchar_t) = delete; + + IRIS_X4_MAJOR_CATEGORY(letter) + IRIS_X4_MAJOR_CATEGORY(mark) + IRIS_X4_MAJOR_CATEGORY(number) + IRIS_X4_MAJOR_CATEGORY(separator) + IRIS_X4_MAJOR_CATEGORY(other) + IRIS_X4_MAJOR_CATEGORY(punctuation) + IRIS_X4_MAJOR_CATEGORY(symbol) + +#undef IRIS_X4_MAJOR_CATEGORY + + // General Categories +#define IRIS_X4_CATEGORY(name) \ + [[nodiscard]] static constexpr bool \ + is_##name(classify_type ch) noexcept \ + { \ + return x4::unicode::get_category(ch) == x4::unicode::properties::name; \ + } \ + static constexpr void is_##name(char) = delete; \ + static constexpr void is_##name(wchar_t) = delete; + + IRIS_X4_CATEGORY(uppercase_letter) + IRIS_X4_CATEGORY(lowercase_letter) + IRIS_X4_CATEGORY(titlecase_letter) + IRIS_X4_CATEGORY(modifier_letter) + IRIS_X4_CATEGORY(other_letter) + + IRIS_X4_CATEGORY(nonspacing_mark) + IRIS_X4_CATEGORY(enclosing_mark) + IRIS_X4_CATEGORY(spacing_mark) + + IRIS_X4_CATEGORY(decimal_number) + IRIS_X4_CATEGORY(letter_number) + IRIS_X4_CATEGORY(other_number) + + IRIS_X4_CATEGORY(space_separator) + IRIS_X4_CATEGORY(line_separator) + IRIS_X4_CATEGORY(paragraph_separator) + + IRIS_X4_CATEGORY(control) + IRIS_X4_CATEGORY(format) + IRIS_X4_CATEGORY(private_use) + IRIS_X4_CATEGORY(surrogate) + IRIS_X4_CATEGORY(unassigned) + + IRIS_X4_CATEGORY(dash_punctuation) + IRIS_X4_CATEGORY(open_punctuation) + IRIS_X4_CATEGORY(close_punctuation) + IRIS_X4_CATEGORY(connector_punctuation) + IRIS_X4_CATEGORY(other_punctuation) + IRIS_X4_CATEGORY(initial_punctuation) + IRIS_X4_CATEGORY(final_punctuation) + + IRIS_X4_CATEGORY(math_symbol) + IRIS_X4_CATEGORY(currency_symbol) + IRIS_X4_CATEGORY(modifier_symbol) + IRIS_X4_CATEGORY(other_symbol) + +#undef IRIS_X4_CATEGORY + + // Derived Categories +#define IRIS_X4_DERIVED_CATEGORY(name) \ + [[nodiscard]] static constexpr bool \ + is_##name(classify_type ch) noexcept \ + { \ + return x4::unicode::is_##name(ch); \ + } \ + static constexpr void is_##name(char) = delete; \ + static constexpr void is_##name(wchar_t) = delete; + + IRIS_X4_DERIVED_CATEGORY(alphabetic) + IRIS_X4_DERIVED_CATEGORY(uppercase) + IRIS_X4_DERIVED_CATEGORY(lowercase) + IRIS_X4_DERIVED_CATEGORY(white_space) + IRIS_X4_DERIVED_CATEGORY(hex_digit) + IRIS_X4_DERIVED_CATEGORY(noncharacter_code_point) + IRIS_X4_DERIVED_CATEGORY(default_ignorable_code_point) + +#undef IRIS_X4_DERIVED_CATEGORY + + // Scripts +#define IRIS_X4_SCRIPT(name) \ + [[nodiscard]] static constexpr bool \ + is_##name(classify_type ch) noexcept \ + { \ + return x4::unicode::get_script(ch) == x4::unicode::properties::name; \ + } \ + static constexpr void is_##name(char) = delete; \ + static constexpr void is_##name(wchar_t) = delete; + + IRIS_X4_SCRIPT(adlam) + IRIS_X4_SCRIPT(caucasian_albanian) + IRIS_X4_SCRIPT(ahom) + IRIS_X4_SCRIPT(arabic) + IRIS_X4_SCRIPT(imperial_aramaic) + IRIS_X4_SCRIPT(armenian) + IRIS_X4_SCRIPT(avestan) + IRIS_X4_SCRIPT(balinese) + IRIS_X4_SCRIPT(bamum) + IRIS_X4_SCRIPT(bassa_vah) + IRIS_X4_SCRIPT(batak) + IRIS_X4_SCRIPT(bengali) + IRIS_X4_SCRIPT(bhaiksuki) + IRIS_X4_SCRIPT(bopomofo) + IRIS_X4_SCRIPT(brahmi) + IRIS_X4_SCRIPT(braille) + IRIS_X4_SCRIPT(buginese) + IRIS_X4_SCRIPT(buhid) + IRIS_X4_SCRIPT(chakma) + IRIS_X4_SCRIPT(canadian_aboriginal) + IRIS_X4_SCRIPT(carian) + IRIS_X4_SCRIPT(cham) + IRIS_X4_SCRIPT(cherokee) + IRIS_X4_SCRIPT(chorasmian) + IRIS_X4_SCRIPT(coptic) + IRIS_X4_SCRIPT(cypro_minoan) + IRIS_X4_SCRIPT(cypriot) + IRIS_X4_SCRIPT(cyrillic) + IRIS_X4_SCRIPT(devanagari) + IRIS_X4_SCRIPT(dives_akuru) + IRIS_X4_SCRIPT(dogra) + IRIS_X4_SCRIPT(deseret) + IRIS_X4_SCRIPT(duployan) + IRIS_X4_SCRIPT(egyptian_hieroglyphs) + IRIS_X4_SCRIPT(elbasan) + IRIS_X4_SCRIPT(elymaic) + IRIS_X4_SCRIPT(ethiopic) + IRIS_X4_SCRIPT(georgian) + IRIS_X4_SCRIPT(glagolitic) + IRIS_X4_SCRIPT(gunjala_gondi) + IRIS_X4_SCRIPT(masaram_gondi) + IRIS_X4_SCRIPT(gothic) + IRIS_X4_SCRIPT(grantha) + IRIS_X4_SCRIPT(greek) + IRIS_X4_SCRIPT(gujarati) + IRIS_X4_SCRIPT(gurmukhi) + IRIS_X4_SCRIPT(hangul) + IRIS_X4_SCRIPT(han) + IRIS_X4_SCRIPT(hanunoo) + IRIS_X4_SCRIPT(hatran) + IRIS_X4_SCRIPT(hebrew) + IRIS_X4_SCRIPT(hiragana) + IRIS_X4_SCRIPT(anatolian_hieroglyphs) + IRIS_X4_SCRIPT(pahawh_hmong) + IRIS_X4_SCRIPT(nyiakeng_puachue_hmong) + IRIS_X4_SCRIPT(katakana_or_hiragana) + IRIS_X4_SCRIPT(old_hungarian) + IRIS_X4_SCRIPT(old_italic) + IRIS_X4_SCRIPT(javanese) + IRIS_X4_SCRIPT(kayah_li) + IRIS_X4_SCRIPT(katakana) + IRIS_X4_SCRIPT(kawi) + IRIS_X4_SCRIPT(kharoshthi) + IRIS_X4_SCRIPT(khmer) + IRIS_X4_SCRIPT(khojki) + IRIS_X4_SCRIPT(khitan_small_script) + IRIS_X4_SCRIPT(kannada) + IRIS_X4_SCRIPT(kaithi) + IRIS_X4_SCRIPT(tai_tham) + IRIS_X4_SCRIPT(lao) + IRIS_X4_SCRIPT(latin) + IRIS_X4_SCRIPT(lepcha) + IRIS_X4_SCRIPT(limbu) + IRIS_X4_SCRIPT(linear_a) + IRIS_X4_SCRIPT(linear_b) + IRIS_X4_SCRIPT(lisu) + IRIS_X4_SCRIPT(lycian) + IRIS_X4_SCRIPT(lydian) + IRIS_X4_SCRIPT(mahajani) + IRIS_X4_SCRIPT(makasar) + IRIS_X4_SCRIPT(mandaic) + IRIS_X4_SCRIPT(manichaean) + IRIS_X4_SCRIPT(marchen) + IRIS_X4_SCRIPT(medefaidrin) + IRIS_X4_SCRIPT(mende_kikakui) + IRIS_X4_SCRIPT(meroitic_cursive) + IRIS_X4_SCRIPT(meroitic_hieroglyphs) + IRIS_X4_SCRIPT(malayalam) + IRIS_X4_SCRIPT(modi) + IRIS_X4_SCRIPT(mongolian) + IRIS_X4_SCRIPT(mro) + IRIS_X4_SCRIPT(meetei_mayek) + IRIS_X4_SCRIPT(multani) + IRIS_X4_SCRIPT(myanmar) + IRIS_X4_SCRIPT(nag_mundari) + IRIS_X4_SCRIPT(nandinagari) + IRIS_X4_SCRIPT(old_north_arabian) + IRIS_X4_SCRIPT(nabataean) + IRIS_X4_SCRIPT(newa) + IRIS_X4_SCRIPT(nko) + IRIS_X4_SCRIPT(nushu) + IRIS_X4_SCRIPT(ogham) + IRIS_X4_SCRIPT(ol_chiki) + IRIS_X4_SCRIPT(old_turkic) + IRIS_X4_SCRIPT(oriya) + IRIS_X4_SCRIPT(osage) + IRIS_X4_SCRIPT(osmanya) + IRIS_X4_SCRIPT(old_uyghur) + IRIS_X4_SCRIPT(palmyrene) + IRIS_X4_SCRIPT(pau_cin_hau) + IRIS_X4_SCRIPT(old_permic) + IRIS_X4_SCRIPT(phags_pa) + IRIS_X4_SCRIPT(inscriptional_pahlavi) + IRIS_X4_SCRIPT(psalter_pahlavi) + IRIS_X4_SCRIPT(phoenician) + IRIS_X4_SCRIPT(miao) + IRIS_X4_SCRIPT(inscriptional_parthian) + IRIS_X4_SCRIPT(rejang) + IRIS_X4_SCRIPT(hanifi_rohingya) + IRIS_X4_SCRIPT(runic) + IRIS_X4_SCRIPT(samaritan) + IRIS_X4_SCRIPT(old_south_arabian) + IRIS_X4_SCRIPT(saurashtra) + IRIS_X4_SCRIPT(signwriting) + IRIS_X4_SCRIPT(shavian) + IRIS_X4_SCRIPT(sharada) + IRIS_X4_SCRIPT(siddham) + IRIS_X4_SCRIPT(khudawadi) + IRIS_X4_SCRIPT(sinhala) + IRIS_X4_SCRIPT(sogdian) + IRIS_X4_SCRIPT(old_sogdian) + IRIS_X4_SCRIPT(sora_sompeng) + IRIS_X4_SCRIPT(soyombo) + IRIS_X4_SCRIPT(sundanese) + IRIS_X4_SCRIPT(syloti_nagri) + IRIS_X4_SCRIPT(syriac) + IRIS_X4_SCRIPT(tagbanwa) + IRIS_X4_SCRIPT(takri) + IRIS_X4_SCRIPT(tai_le) + IRIS_X4_SCRIPT(new_tai_lue) + IRIS_X4_SCRIPT(tamil) + IRIS_X4_SCRIPT(tangut) + IRIS_X4_SCRIPT(tai_viet) + IRIS_X4_SCRIPT(telugu) + IRIS_X4_SCRIPT(tifinagh) + IRIS_X4_SCRIPT(tagalog) + IRIS_X4_SCRIPT(thaana) + IRIS_X4_SCRIPT(thai) + IRIS_X4_SCRIPT(tibetan) + IRIS_X4_SCRIPT(tirhuta) + IRIS_X4_SCRIPT(tangsa) + IRIS_X4_SCRIPT(toto) + IRIS_X4_SCRIPT(ugaritic) + IRIS_X4_SCRIPT(vai) + IRIS_X4_SCRIPT(vithkuqi) + IRIS_X4_SCRIPT(warang_citi) + IRIS_X4_SCRIPT(wancho) + IRIS_X4_SCRIPT(old_persian) + IRIS_X4_SCRIPT(cuneiform) + IRIS_X4_SCRIPT(yezidi) + IRIS_X4_SCRIPT(yi) + IRIS_X4_SCRIPT(zanabazar_square) + IRIS_X4_SCRIPT(inherited) + IRIS_X4_SCRIPT(common) + IRIS_X4_SCRIPT(unknown) + +#undef IRIS_X4_SCRIPT +}; + +} // iris::x4::char_encoding + +#endif diff --git a/include/boost/spirit/x4/char_encoding/unicode/classification.hpp b/include/iris/x4/char_encoding/unicode/classification.hpp similarity index 94% rename from include/boost/spirit/x4/char_encoding/unicode/classification.hpp rename to include/iris/x4/char_encoding/unicode/classification.hpp index aff6e142f..eecc9444e 100644 --- a/include/boost/spirit/x4/char_encoding/unicode/classification.hpp +++ b/include/iris/x4/char_encoding/unicode/classification.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CHAR_ENCODING_UNICODE_CLASSIFICATION_HPP -#define BOOST_SPIRIT_X4_CHAR_ENCODING_UNICODE_CLASSIFICATION_HPP +#ifndef IRIS_X4_CHAR_ENCODING_UNICODE_CLASSIFICATION_HPP +#define IRIS_X4_CHAR_ENCODING_UNICODE_CLASSIFICATION_HPP /*============================================================================= Copyright (c) 2001-2011 Joel de Guzman @@ -12,14 +12,14 @@ table builder) (c) Peter Kankowski, 2008 ==============================================================================*/ -#include -#include -#include -#include +#include +#include +#include +#include #include -namespace boost::spirit::x4::unicode { +namespace iris::x4::unicode { using classify_type = std::uint32_t; @@ -379,6 +379,6 @@ enum script return r == 0 ? ch : r; } -} // boost::spirit::x4::unicode +} // iris::x4::unicode #endif diff --git a/include/boost/spirit/x4/char_encoding/unicode/detail/category_table.hpp b/include/iris/x4/char_encoding/unicode/detail/category_table.hpp similarity index 99% rename from include/boost/spirit/x4/char_encoding/unicode/detail/category_table.hpp rename to include/iris/x4/char_encoding/unicode/detail/category_table.hpp index bf3deddb8..548729f65 100644 --- a/include/boost/spirit/x4/char_encoding/unicode/detail/category_table.hpp +++ b/include/iris/x4/char_encoding/unicode/detail/category_table.hpp @@ -10,7 +10,7 @@ #include -namespace boost::spirit::x4::unicode::detail { +namespace iris::x4::unicode::detail { [[maybe_unused]] inline constexpr std::uint8_t category_stage1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, @@ -3315,4 +3315,4 @@ namespace boost::spirit::x4::unicode::detail { return category_stage2[block_offset + ch % 256]; } -} // boost::spirit::x4::unicode::detail +} // iris::x4::unicode::detail diff --git a/include/boost/spirit/x4/char_encoding/unicode/detail/lowercase_table.hpp b/include/iris/x4/char_encoding/unicode/detail/lowercase_table.hpp similarity index 99% rename from include/boost/spirit/x4/char_encoding/unicode/detail/lowercase_table.hpp rename to include/iris/x4/char_encoding/unicode/detail/lowercase_table.hpp index 7b3a64ed6..b4cd70700 100644 --- a/include/boost/spirit/x4/char_encoding/unicode/detail/lowercase_table.hpp +++ b/include/iris/x4/char_encoding/unicode/detail/lowercase_table.hpp @@ -10,7 +10,7 @@ #include -namespace boost::spirit::x4::unicode::detail { +namespace iris::x4::unicode::detail { [[maybe_unused]] inline constexpr std::uint8_t lowercase_stage1[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, @@ -750,4 +750,4 @@ namespace boost::spirit::x4::unicode::detail { return lowercase_stage2[block_offset + ch % 256]; } -} // boost::spirit::x4::unicode::detail +} // iris::x4::unicode::detail diff --git a/include/boost/spirit/x4/char_encoding/unicode/detail/script_table.hpp b/include/iris/x4/char_encoding/unicode/detail/script_table.hpp similarity index 99% rename from include/boost/spirit/x4/char_encoding/unicode/detail/script_table.hpp rename to include/iris/x4/char_encoding/unicode/detail/script_table.hpp index 2654f70e5..d96831e53 100644 --- a/include/boost/spirit/x4/char_encoding/unicode/detail/script_table.hpp +++ b/include/iris/x4/char_encoding/unicode/detail/script_table.hpp @@ -10,7 +10,7 @@ #include -namespace boost::spirit::x4::unicode::detail { +namespace iris::x4::unicode::detail { [[maybe_unused]] inline constexpr std::uint8_t script_stage1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, @@ -3315,4 +3315,4 @@ namespace boost::spirit::x4::unicode::detail { return script_stage2[block_offset + ch % 256]; } -} // boost::spirit::x4::unicode::detail +} // iris::x4::unicode::detail diff --git a/include/boost/spirit/x4/char_encoding/unicode/detail/uppercase_table.hpp b/include/iris/x4/char_encoding/unicode/detail/uppercase_table.hpp similarity index 99% rename from include/boost/spirit/x4/char_encoding/unicode/detail/uppercase_table.hpp rename to include/iris/x4/char_encoding/unicode/detail/uppercase_table.hpp index 45904c420..1adcd6875 100644 --- a/include/boost/spirit/x4/char_encoding/unicode/detail/uppercase_table.hpp +++ b/include/iris/x4/char_encoding/unicode/detail/uppercase_table.hpp @@ -10,7 +10,7 @@ #include -namespace boost::spirit::x4::unicode::detail { +namespace iris::x4::unicode::detail { [[maybe_unused]] inline constexpr std::uint8_t uppercase_stage1[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, @@ -807,4 +807,4 @@ namespace boost::spirit::x4::unicode::detail { return uppercase_stage2[block_offset + ch % 256]; } -} // boost::spirit::x4::unicode::detail +} // iris::x4::unicode::detail diff --git a/include/boost/spirit/x4/core/action.hpp b/include/iris/x4/core/action.hpp similarity index 97% rename from include/boost/spirit/x4/core/action.hpp rename to include/iris/x4/core/action.hpp index 2ae4c75f1..a24be8ef3 100644 --- a/include/boost/spirit/x4/core/action.hpp +++ b/include/iris/x4/core/action.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CORE_ACTION_HPP -#define BOOST_SPIRIT_X4_CORE_ACTION_HPP +#ifndef IRIS_X4_CORE_ACTION_HPP +#define IRIS_X4_CORE_ACTION_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,9 +9,9 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include +#include +#include +#include #include #include @@ -19,7 +19,7 @@ #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { namespace detail { @@ -237,6 +237,6 @@ operator/(Subject&& p, Action&& f) return {as_parser(std::forward(p)), std::forward(f)}; } -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/core/action_context.hpp b/include/iris/x4/core/action_context.hpp similarity index 85% rename from include/boost/spirit/x4/core/action_context.hpp rename to include/iris/x4/core/action_context.hpp index 2bf2899ba..c41d3a470 100644 --- a/include/boost/spirit/x4/core/action_context.hpp +++ b/include/iris/x4/core/action_context.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CORE_ACTION_CONTEXT_HPP -#define BOOST_SPIRIT_X4_CORE_ACTION_CONTEXT_HPP +#ifndef IRIS_X4_CORE_ACTION_CONTEXT_HPP +#define IRIS_X4_CORE_ACTION_CONTEXT_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,10 +9,10 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include +#include +#include -namespace boost::spirit::x4 { +namespace iris::x4 { namespace contexts { @@ -56,7 +56,7 @@ struct _rule_var_fn { template [[nodiscard]] static constexpr auto&& - operator()(Context const& ctx BOOST_SPIRIT_LIFETIMEBOUND) noexcept + operator()(Context const& ctx IRIS_LIFETIMEBOUND) noexcept { return x4::get(ctx); } @@ -69,7 +69,7 @@ struct _as_var_fn { template [[nodiscard]] static constexpr auto&& - operator()(Context const& ctx BOOST_SPIRIT_LIFETIMEBOUND) noexcept + operator()(Context const& ctx IRIS_LIFETIMEBOUND) noexcept { return x4::get(ctx); } @@ -89,7 +89,7 @@ struct _attr_fn { template [[nodiscard]] static constexpr auto&& - operator()(Context const& ctx BOOST_SPIRIT_LIFETIMEBOUND) noexcept + operator()(Context const& ctx IRIS_LIFETIMEBOUND) noexcept { return x4::get(ctx); } @@ -115,6 +115,6 @@ inline constexpr detail::_rule_var_fn _val{}; } // cpos -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/core/attribute.hpp b/include/iris/x4/core/attribute.hpp similarity index 89% rename from include/boost/spirit/x4/core/attribute.hpp rename to include/iris/x4/core/attribute.hpp index 3e6a46bc3..225a2b38c 100644 --- a/include/boost/spirit/x4/core/attribute.hpp +++ b/include/iris/x4/core/attribute.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CORE_ATTRIBUTE_HPP -#define BOOST_SPIRIT_X4_CORE_ATTRIBUTE_HPP +#ifndef IRIS_X4_CORE_ATTRIBUTE_HPP +#define IRIS_X4_CORE_ATTRIBUTE_HPP /*============================================================================= Copyright (c) 2025 Nana Sakisaka @@ -8,13 +8,13 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { struct unused_type; struct unused_container_type; @@ -43,9 +43,9 @@ concept X4NonUnusedAttribute = template concept X4Attribute = X4UnusedAttribute || X4NonUnusedAttribute; -} // boost::spirit::x4 +} // iris::x4 -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { // Pseudo attribute is a parser attribute whose actual type can only be determined at // parse time. Such attribute is dependent on at least one of It/Se/Context. @@ -64,6 +64,6 @@ struct pseudo_attribute } }; -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/include/boost/spirit/x4/core/container_appender.hpp b/include/iris/x4/core/container_appender.hpp similarity index 93% rename from include/boost/spirit/x4/core/container_appender.hpp rename to include/iris/x4/core/container_appender.hpp index ab5ba55d3..06ee7d709 100644 --- a/include/boost/spirit/x4/core/container_appender.hpp +++ b/include/iris/x4/core/container_appender.hpp @@ -1,15 +1,15 @@ -#ifndef BOOST_SPIRIT_X4_CORE_CONTAINER_APPENDER_HPP -#define BOOST_SPIRIT_X4_CORE_CONTAINER_APPENDER_HPP +#ifndef IRIS_X4_CORE_CONTAINER_APPENDER_HPP +#define IRIS_X4_CORE_CONTAINER_APPENDER_HPP -#include -#include -#include +#include +#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { namespace detail { @@ -162,6 +162,6 @@ struct transform_attribute> } // traits -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/core/context.hpp b/include/iris/x4/core/context.hpp similarity index 92% rename from include/boost/spirit/x4/core/context.hpp rename to include/iris/x4/core/context.hpp index 20f7b0b16..410045329 100644 --- a/include/boost/spirit/x4/core/context.hpp +++ b/include/iris/x4/core/context.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CORE_CONTEXT_HPP -#define BOOST_SPIRIT_X4_CORE_CONTEXT_HPP +#ifndef IRIS_X4_CORE_CONTEXT_HPP +#define IRIS_X4_CORE_CONTEXT_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,16 +9,16 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include +#include +#include -#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct context; @@ -138,13 +138,13 @@ struct context_storage static_assert(ContextNextType); // lvalue{lvalue} or non-reference{lvalue} - constexpr context_storage(T& val BOOST_SPIRIT_LIFETIMEBOUND, std::remove_cvref_t const& next) noexcept + constexpr context_storage(T& val IRIS_LIFETIMEBOUND, std::remove_cvref_t const& next) noexcept : val(val) , next(next) {} // non-reference{rvalue} - constexpr context_storage(T& val BOOST_SPIRIT_LIFETIMEBOUND, std::remove_cvref_t&& next) + constexpr context_storage(T& val IRIS_LIFETIMEBOUND, std::remove_cvref_t&& next) noexcept(std::is_nothrow_constructible_v>) requires (!std::is_lvalue_reference_v) : val(val) @@ -152,7 +152,7 @@ struct context_storage {} // non-reference{const rvalue} - constexpr context_storage(T& val BOOST_SPIRIT_LIFETIMEBOUND, std::remove_cvref_t const&& next) + constexpr context_storage(T& val IRIS_LIFETIMEBOUND, std::remove_cvref_t const&& next) noexcept(std::is_nothrow_constructible_v const>) requires (!std::is_lvalue_reference_v) : val(val) @@ -163,18 +163,18 @@ struct context_storage context_storage(std::remove_const_t const&, std::remove_cvref_t const&&) requires std::is_lvalue_reference_v = delete; context_storage(std::remove_const_t const&&, std::remove_cvref_t const&) = delete; - [[nodiscard]] constexpr T& get(std::type_identity const&) const noexcept BOOST_SPIRIT_LIFETIMEBOUND + [[nodiscard]] constexpr T& get(std::type_identity const&) const noexcept IRIS_LIFETIMEBOUND { return val; } - [[nodiscard]] constexpr decltype(auto) get(auto const& id) const noexcept BOOST_SPIRIT_LIFETIMEBOUND + [[nodiscard]] constexpr decltype(auto) get(auto const& id) const noexcept IRIS_LIFETIMEBOUND { return next.get(id); } T& val; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members) - BOOST_SPIRIT_NO_UNIQUE_ADDRESS Next next; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members) + IRIS_NO_UNIQUE_ADDRESS Next next; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members) }; template @@ -183,18 +183,18 @@ struct context_storage { static_assert(ContextValueType); - constexpr explicit context_storage(T& val BOOST_SPIRIT_LIFETIMEBOUND) noexcept + constexpr explicit context_storage(T& val IRIS_LIFETIMEBOUND) noexcept : val(val) {} - constexpr context_storage(T& val BOOST_SPIRIT_LIFETIMEBOUND, unused_type const&) noexcept + constexpr context_storage(T& val IRIS_LIFETIMEBOUND, unused_type const&) noexcept : val(val) {} context_storage(std::remove_const_t const&&) = delete; context_storage(std::remove_const_t const&&, unused_type const&) = delete; - [[nodiscard]] constexpr T& get(std::type_identity const&) const noexcept BOOST_SPIRIT_LIFETIMEBOUND + [[nodiscard]] constexpr T& get(std::type_identity const&) const noexcept IRIS_LIFETIMEBOUND { return val; } @@ -204,7 +204,7 @@ struct context_storage T& val; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members) }; -#define BOOST_SPIRIT_X4_UNUSED_CONTEXT_VALUE_TYPE_ERROR \ +#define IRIS_X4_UNUSED_CONTEXT_VALUE_TYPE_ERROR \ "Assigning `unused` to a unique context is prohibited for maintainability because " \ "unique context is binary: it either holds a value or is empty. Introducing " \ "`unused` makes it tri-state. If you want to propagate `unused` as a placeholder " \ @@ -218,7 +218,7 @@ struct context_storage static_assert( !detail::UniqueContextID || detail::AllowUnusedContextID, - BOOST_SPIRIT_X4_UNUSED_CONTEXT_VALUE_TYPE_ERROR + IRIS_X4_UNUSED_CONTEXT_VALUE_TYPE_ERROR ); // lvalue{lvalue} or non-reference{lvalue} @@ -253,7 +253,7 @@ struct context_storage return next.get(id); } - BOOST_SPIRIT_NO_UNIQUE_ADDRESS Next next; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members) + IRIS_NO_UNIQUE_ADDRESS Next next; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members) }; template @@ -264,7 +264,7 @@ struct context_storage { static_assert( !detail::UniqueContextID || detail::AllowUnusedContextID, - BOOST_SPIRIT_X4_UNUSED_CONTEXT_VALUE_TYPE_ERROR + IRIS_X4_UNUSED_CONTEXT_VALUE_TYPE_ERROR ); constexpr context_storage() noexcept = default; @@ -279,7 +279,7 @@ struct context_storage static void get(auto const&) = delete; // ID not found }; -#undef BOOST_SPIRIT_X4_UNUSED_CONTEXT_VALUE_TYPE_ERROR +#undef IRIS_X4_UNUSED_CONTEXT_VALUE_TYPE_ERROR } // detail @@ -454,7 +454,7 @@ template [[nodiscard]] constexpr decltype(auto) replace_first_context( context const& ctx, - NewVal& new_val BOOST_SPIRIT_LIFETIMEBOUND + NewVal& new_val IRIS_LIFETIMEBOUND ) noexcept { static_assert(!is_ttp_specialization_of_v, context>, "context's value type cannot be context"); @@ -510,7 +510,7 @@ template [[nodiscard]] constexpr decltype(auto) replace_first_context( unused_type const&, - NewVal& new_val BOOST_SPIRIT_LIFETIMEBOUND + NewVal& new_val IRIS_LIFETIMEBOUND ) noexcept { static_assert(!is_ttp_specialization_of_v, context>, "context's value type cannot be context"); @@ -531,6 +531,6 @@ replace_first_context( template void replace_first_context(context const&, NewVal const&&) = delete; // dangling -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/core/detail/parse_alternative.hpp b/include/iris/x4/core/detail/parse_alternative.hpp similarity index 91% rename from include/boost/spirit/x4/core/detail/parse_alternative.hpp rename to include/iris/x4/core/detail/parse_alternative.hpp index 17e522583..b442239ae 100644 --- a/include/boost/spirit/x4/core/detail/parse_alternative.hpp +++ b/include/iris/x4/core/detail/parse_alternative.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CORE_DETAIL_PARSE_ALTERNATIVE_HPP -#define BOOST_SPIRIT_X4_CORE_DETAIL_PARSE_ALTERNATIVE_HPP +#ifndef IRIS_X4_CORE_DETAIL_PARSE_ALTERNATIVE_HPP +#define IRIS_X4_CORE_DETAIL_PARSE_ALTERNATIVE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,15 +9,15 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include +#include +#include +#include -#include -#include +#include +#include -#include -#include +#include +#include #include @@ -25,14 +25,14 @@ #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct alternative; -} // boost::spirit::x4 +} // iris::x4 -namespace boost::spirit::x4::detail { +namespace iris::x4::detail { struct pass_variant_unused { @@ -110,7 +110,7 @@ template struct pass_non_variant_attribute { using attr_type = typename std::remove_reference_t< - typename fusion::result_of::front::type + typename boost::fusion::result_of::front::type >; using pass = pass_parser_attribute; using type = typename pass::type; @@ -118,9 +118,9 @@ struct pass_non_variant_attribute template [[nodiscard]] static constexpr type call(Attr_& attr) - noexcept(noexcept(pass::call(fusion::front(attr)))) + noexcept(noexcept(pass::call(boost::fusion::front(attr)))) { - return pass::call(fusion::front(attr)); + return pass::call(boost::fusion::front(attr)); } }; @@ -253,6 +253,6 @@ struct parse_into_container_impl> } }; -} // boost::spirit::x4::detail +} // iris::x4::detail #endif diff --git a/include/boost/spirit/x4/core/detail/parse_into_container.hpp b/include/iris/x4/core/detail/parse_into_container.hpp similarity index 92% rename from include/boost/spirit/x4/core/detail/parse_into_container.hpp rename to include/iris/x4/core/detail/parse_into_container.hpp index 7fa40f3b4..344d091fc 100644 --- a/include/boost/spirit/x4/core/detail/parse_into_container.hpp +++ b/include/iris/x4/core/detail/parse_into_container.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CORE_DETAIL_PARSE_INTO_CONTAINER_HPP -#define BOOST_SPIRIT_X4_CORE_DETAIL_PARSE_INTO_CONTAINER_HPP +#ifndef IRIS_X4_CORE_DETAIL_PARSE_INTO_CONTAINER_HPP +#define IRIS_X4_CORE_DETAIL_PARSE_INTO_CONTAINER_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,12 +9,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include +#include +#include +#include -#include -#include +#include +#include #include #include @@ -26,7 +26,7 @@ #include #include -namespace boost::spirit::x4::detail { +namespace iris::x4::detail { template struct parser_accepts_container @@ -90,7 +90,7 @@ struct parse_into_container_base_impl template Se, class Context, X4Attribute Attr> requires has_attribute_v && - (!fusion::traits::is_sequence::value) + (!boost::fusion::traits::is_sequence::value) [[nodiscard]] static constexpr bool call( Parser const& parser, It& first, Se const& last, @@ -105,16 +105,16 @@ struct parse_into_container_base_impl template Se, class Context, X4Attribute Attr> requires has_attribute_v && - fusion::traits::is_sequence::value + boost::fusion::traits::is_sequence::value [[nodiscard]] static constexpr bool call( Parser const& parser, It& first, Se const& last, Context const& ctx, Attr& attr - ) noexcept(noexcept(parse_into_container_base_impl::call_synthesize(parser, first, last, ctx, fusion::front(attr)))) + ) noexcept(noexcept(parse_into_container_base_impl::call_synthesize(parser, first, last, ctx, boost::fusion::front(attr)))) { static_assert(traits::has_size_v, "Expecting a single element fusion sequence"); // TODO: reduce call stack while keeping maintainability - return parse_into_container_base_impl::call_synthesize(parser, first, last, ctx, fusion::front(attr)); + return parse_into_container_base_impl::call_synthesize(parser, first, last, ctx, boost::fusion::front(attr)); } // Parser has no attribute (pass unused) @@ -214,6 +214,6 @@ parse_into_container( return parse_into_container_impl::call(parser, first, last, ctx, attr); } -} // boost::spirit::x4::detail +} // iris::x4::detail #endif diff --git a/include/boost/spirit/x4/core/detail/parse_sequence.hpp b/include/iris/x4/core/detail/parse_sequence.hpp similarity index 87% rename from include/boost/spirit/x4/core/detail/parse_sequence.hpp rename to include/iris/x4/core/detail/parse_sequence.hpp index 47a694bbf..10dd0181b 100644 --- a/include/boost/spirit/x4/core/detail/parse_sequence.hpp +++ b/include/iris/x4/core/detail/parse_sequence.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CORE_DETAIL_PARSE_SEQUENCE_HPP -#define BOOST_SPIRIT_X4_CORE_DETAIL_PARSE_SEQUENCE_HPP +#ifndef IRIS_X4_CORE_DETAIL_PARSE_SEQUENCE_HPP +#define IRIS_X4_CORE_DETAIL_PARSE_SEQUENCE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,14 +9,14 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include +#include +#include +#include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -29,14 +29,14 @@ #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct sequence; -} // boost::spirit::x4 +} // iris::x4 -namespace boost::spirit::x4::detail { +namespace iris::x4::detail { struct pass_sequence_attribute_unused { @@ -53,15 +53,15 @@ struct pass_sequence_attribute_unused template struct pass_sequence_attribute_size_one_view { - using type = typename fusion::result_of::deref< - typename fusion::result_of::begin::type + using type = typename boost::fusion::result_of::deref< + typename boost::fusion::result_of::begin::type >::type; [[nodiscard]] static constexpr type call(Attr& attribute) - noexcept(noexcept(fusion::deref(fusion::begin(attribute)))) + noexcept(noexcept(boost::fusion::deref(boost::fusion::begin(attribute)))) { - return fusion::deref(fusion::begin(attribute)); + return boost::fusion::deref(boost::fusion::begin(attribute)); } }; @@ -112,7 +112,7 @@ struct partition_attribute static constexpr std::size_t l_size = parser_traits::sequence_size; static constexpr std::size_t r_size = parser_traits::sequence_size; - static constexpr std::size_t actual_size = static_cast(fusion::result_of::size::value); + static constexpr std::size_t actual_size = static_cast(boost::fusion::result_of::size::value); static constexpr std::size_t expected_size = l_size + r_size; // If you got an error here, then you are trying to pass @@ -127,27 +127,27 @@ struct partition_attribute "Sequence size of the passed attribute is greater than expected." ); - using l_begin = fusion::result_of::begin::type; - using l_end = fusion::result_of::advance_c::type; - using r_end = fusion::result_of::end::type; - using l_part = fusion::iterator_range; - using r_part = fusion::iterator_range; + using l_begin = boost::fusion::result_of::begin::type; + using l_end = boost::fusion::result_of::advance_c::type; + using r_end = boost::fusion::result_of::end::type; + using l_part = boost::fusion::iterator_range; + using r_part = boost::fusion::iterator_range; using l_pass = pass_sequence_attribute; using r_pass = pass_sequence_attribute; [[nodiscard]] static constexpr l_part left(Attr& s) // TODO: noexcept { - auto i = fusion::begin(s); - return l_part(i, fusion::advance_c(i)); + auto i = boost::fusion::begin(s); + return l_part(i, boost::fusion::advance_c(i)); } [[nodiscard]] static constexpr r_part right(Attr& s) // TODO: noexcept { return r_part( - fusion::advance_c(fusion::begin(s)), - fusion::end(s) + boost::fusion::advance_c(boost::fusion::begin(s)), + boost::fusion::end(s) ); } }; @@ -336,6 +336,6 @@ struct parse_into_container_impl> } }; -} // boost::spirit::x4::detail +} // iris::x4::detail #endif diff --git a/include/boost/spirit/x4/core/expectation.hpp b/include/iris/x4/core/expectation.hpp similarity index 94% rename from include/boost/spirit/x4/core/expectation.hpp rename to include/iris/x4/core/expectation.hpp index d4cd3f001..49ad14afa 100644 --- a/include/boost/spirit/x4/core/expectation.hpp +++ b/include/iris/x4/core/expectation.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CORE_EXPECTATION_HPP -#define BOOST_SPIRIT_X4_CORE_EXPECTATION_HPP +#ifndef IRIS_X4_CORE_EXPECTATION_HPP +#define IRIS_X4_CORE_EXPECTATION_HPP /*============================================================================= Copyright (c) 2017 wanghan02 @@ -9,9 +9,9 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include // for `x4::what` -#include +#include +#include // for `x4::what` +#include #include #include @@ -20,7 +20,7 @@ #include -namespace boost::spirit::x4 { +namespace iris::x4 { namespace contexts { @@ -164,6 +164,6 @@ constexpr void clear_expectation_failure(Context const& ctx) noexcept x4::get(ctx).clear(); } -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/core/move_to.hpp b/include/iris/x4/core/move_to.hpp similarity index 89% rename from include/boost/spirit/x4/core/move_to.hpp rename to include/iris/x4/core/move_to.hpp index d6d0130e6..3e287b5e7 100644 --- a/include/boost/spirit/x4/core/move_to.hpp +++ b/include/iris/x4/core/move_to.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CORE_MOVE_TO_HPP -#define BOOST_SPIRIT_X4_CORE_MOVE_TO_HPP +#ifndef IRIS_X4_CORE_MOVE_TO_HPP +#define IRIS_X4_CORE_MOVE_TO_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,12 +10,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include +#include +#include -#include -#include -#include +#include +#include +#include #include #include @@ -27,7 +27,7 @@ #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template constexpr void move_to(Source&&, Dest&) = delete; // `Source` and `Dest` do not fall into any of the overload below. @@ -116,10 +116,10 @@ template constexpr void move_to(Source&& src, Dest& dest) - noexcept(noexcept(dest = std::forward_like(fusion::front(std::forward(src))))) + noexcept(noexcept(dest = std::forward_like(boost::fusion::front(std::forward(src))))) { static_assert(!std::same_as, Dest>, "[BUG] This call should instead resolve to the overload handling identical types"); - dest = std::forward_like(fusion::front(std::forward(src))); + dest = std::forward_like(boost::fusion::front(std::forward(src))); } template Dest> @@ -141,16 +141,16 @@ constexpr void move_to(Source&& src, Dest& dest) noexcept( std::is_rvalue_reference_v ? - noexcept(fusion::move(std::move(src), dest)) : - noexcept(fusion::copy(src, dest)) + noexcept(boost::fusion::move(std::move(src), dest)) : + noexcept(boost::fusion::copy(src, dest)) ) { static_assert(!std::same_as, Dest>, "[BUG] This call should instead resolve to the overload handling identical types"); if constexpr (std::is_rvalue_reference_v) { - fusion::move(std::move(src), dest); + boost::fusion::move(std::move(src), dest); } else { - fusion::copy(src, dest); + boost::fusion::copy(src, dest); } } @@ -171,7 +171,7 @@ template && (!traits::variant_has_substitute_v) constexpr void move_to(Source&& src, Dest& dest) - noexcept(noexcept(dest = std::forward_like(fusion::front(std::forward(src))))) + noexcept(noexcept(dest = std::forward_like(boost::fusion::front(std::forward(src))))) { static_assert(!std::same_as, Dest>, "[BUG] This call should instead resolve to the overload handling identical types"); @@ -180,11 +180,11 @@ move_to(Source&& src, Dest& dest) // Make sure that the Dest variant can really hold Source static_assert( - traits::variant_has_substitute_v::type>, + traits::variant_has_substitute_v::type>, "Error! The destination variant (Dest) cannot hold the source type (Source)" ); - dest = std::forward_like(fusion::front(std::forward(src))); + dest = std::forward_like(boost::fusion::front(std::forward(src))); } template Dest> @@ -245,9 +245,9 @@ template Se, traits::Categorized requires traits::is_size_one_sequence_v constexpr void move_to(It first, Se last, Dest& dest) - noexcept(noexcept(x4::move_to(first, last, fusion::front(dest)))) + noexcept(noexcept(x4::move_to(first, last, boost::fusion::front(dest)))) { - x4::move_to(first, last, fusion::front(dest)); + x4::move_to(first, last, boost::fusion::front(dest)); } // Move non-container `src` into container `dest`. @@ -288,11 +288,11 @@ template constexpr void move_to(Source&& src, Dest& dest) - noexcept(noexcept(x4::move_to(std::forward(src), fusion::front(dest)))) + noexcept(noexcept(x4::move_to(std::forward(src), boost::fusion::front(dest)))) { static_assert(!std::same_as, Dest>, "[BUG] This call should instead resolve to the overload handling identical types"); - x4::move_to(std::forward(src), fusion::front(dest)); + x4::move_to(std::forward(src), boost::fusion::front(dest)); } template @@ -300,6 +300,6 @@ concept X4Movable = requires { x4::move_to(std::declval(), std::declval()); }; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/core/parser.hpp b/include/iris/x4/core/parser.hpp similarity index 97% rename from include/boost/spirit/x4/core/parser.hpp rename to include/iris/x4/core/parser.hpp index 92b9be638..98e74dcf0 100644 --- a/include/boost/spirit/x4/core/parser.hpp +++ b/include/iris/x4/core/parser.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CORE_PARSER_HPP -#define BOOST_SPIRIT_X4_CORE_PARSER_HPP +#ifndef IRIS_X4_CORE_PARSER_HPP +#define IRIS_X4_CORE_PARSER_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,10 +10,10 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -21,11 +21,11 @@ #include #include -#ifndef BOOST_SPIRIT_X4_NO_RTTI +#ifndef IRIS_X4_NO_RTTI #include #endif -namespace boost::spirit::x4 { +namespace iris::x4 { template struct action; @@ -141,8 +141,8 @@ struct binary_parser : parser {} // TODO: [MSVC 2022 BUG] "overruns" in constexpr, test case in `lit.cpp` - /*BOOST_SPIRIT_NO_UNIQUE_ADDRESS*/ Left left; - /*BOOST_SPIRIT_NO_UNIQUE_ADDRESS*/ Right right; + /*IRIS_NO_UNIQUE_ADDRESS*/ Left left; + /*IRIS_NO_UNIQUE_ADDRESS*/ Right right; }; namespace extension { @@ -474,7 +474,7 @@ struct get_info } else { (void)subject; - #ifndef BOOST_SPIRIT_X4_NO_RTTI + #ifndef IRIS_X4_NO_RTTI return typeid(Subject).name(); #else return "(get_info undefined)"; @@ -505,6 +505,6 @@ inline namespace cpos { } // cpos -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/core/parser_traits.hpp b/include/iris/x4/core/parser_traits.hpp similarity index 91% rename from include/boost/spirit/x4/core/parser_traits.hpp rename to include/iris/x4/core/parser_traits.hpp index 7a7716000..c34333a38 100644 --- a/include/boost/spirit/x4/core/parser_traits.hpp +++ b/include/iris/x4/core/parser_traits.hpp @@ -1,7 +1,7 @@ -#ifndef BOOST_SPIRIT_X4_CORE_PARSER_TRAITS_HPP -#define BOOST_SPIRIT_X4_CORE_PARSER_TRAITS_HPP +#ifndef IRIS_X4_CORE_PARSER_TRAITS_HPP +#define IRIS_X4_CORE_PARSER_TRAITS_HPP -#include +#include #include @@ -11,7 +11,7 @@ // specialization of any entity defined in this header, the // program is ill-formed, no diagnostic required. -namespace boost::spirit::x4 { +namespace iris::x4 { struct unused_type; struct unused_container_type; @@ -72,7 +72,7 @@ struct get_sequence_size } // detail -// A global facade exposing all traits recognized and used by the Spirit core. +// A global facade exposing all traits recognized and used by X4 core. // // This class is not placed under the `traits/` directory because this is NOT // a customization point. @@ -109,6 +109,6 @@ struct parser_traits static constexpr bool need_rcontext = Parser::need_rcontext; }; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/core/skip_over.hpp b/include/iris/x4/core/skip_over.hpp similarity index 93% rename from include/boost/spirit/x4/core/skip_over.hpp rename to include/iris/x4/core/skip_over.hpp index 085f89e0f..05bba2364 100644 --- a/include/boost/spirit/x4/core/skip_over.hpp +++ b/include/iris/x4/core/skip_over.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CORE_SKIP_OVER_HPP -#define BOOST_SPIRIT_X4_CORE_SKIP_OVER_HPP +#ifndef IRIS_X4_CORE_SKIP_OVER_HPP +#define IRIS_X4_CORE_SKIP_OVER_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,16 +10,16 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { namespace contexts { @@ -69,7 +69,7 @@ struct is_unused_skipper : std::true_type {}; template [[nodiscard]] constexpr Skipper const& -get_unused_skipper(Skipper const& skipper BOOST_SPIRIT_LIFETIMEBOUND) noexcept +get_unused_skipper(Skipper const& skipper IRIS_LIFETIMEBOUND) noexcept { static_assert(X4Subject); return skipper; @@ -189,6 +189,6 @@ constexpr void skip_over(It& first, Se const& last, Context const& ctx) detail::skip_over(first, last, ctx, x4::get(ctx)); } -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/core/unused.hpp b/include/iris/x4/core/unused.hpp similarity index 91% rename from include/boost/spirit/x4/core/unused.hpp rename to include/iris/x4/core/unused.hpp index 2592e6a4c..ca832d72f 100644 --- a/include/boost/spirit/x4/core/unused.hpp +++ b/include/iris/x4/core/unused.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_CORE_UNUSED_HPP -#define BOOST_SPIRIT_X4_CORE_UNUSED_HPP +#ifndef IRIS_X4_CORE_UNUSED_HPP +#define IRIS_X4_CORE_UNUSED_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,11 +10,11 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include +#include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct context; @@ -64,6 +64,6 @@ assume_container(unused_type const&) noexcept return unused_container; } -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/debug/annotate_on_success.hpp b/include/iris/x4/debug/annotate_on_success.hpp similarity index 86% rename from include/boost/spirit/x4/debug/annotate_on_success.hpp rename to include/iris/x4/debug/annotate_on_success.hpp index 9b1d3728e..e457ac056 100644 --- a/include/boost/spirit/x4/debug/annotate_on_success.hpp +++ b/include/iris/x4/debug/annotate_on_success.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DEBUG_ANNOTATE_ON_SUCCESS_HPP -#define BOOST_SPIRIT_X4_DEBUG_ANNOTATE_ON_SUCCESS_HPP +#ifndef IRIS_X4_DEBUG_ANNOTATE_ON_SUCCESS_HPP +#define IRIS_X4_DEBUG_ANNOTATE_ON_SUCCESS_HPP /*============================================================================= Copyright (c) 2001-2015 Joel de Guzman @@ -9,15 +9,15 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include +#include +#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { namespace contexts { @@ -61,6 +61,6 @@ struct annotate_on_success } }; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/debug/debug_handler_state.hpp b/include/iris/x4/debug/debug_handler_state.hpp similarity index 75% rename from include/boost/spirit/x4/debug/debug_handler_state.hpp rename to include/iris/x4/debug/debug_handler_state.hpp index 24b3b6e14..d4b61aad4 100644 --- a/include/boost/spirit/x4/debug/debug_handler_state.hpp +++ b/include/iris/x4/debug/debug_handler_state.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DEBUG_DEBUG_HANDLER_STATE_HPP -#define BOOST_SPIRIT_X4_DEBUG_DEBUG_HANDLER_STATE_HPP +#ifndef IRIS_X4_DEBUG_DEBUG_HANDLER_STATE_HPP +#define IRIS_X4_DEBUG_DEBUG_HANDLER_STATE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,7 +9,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -namespace boost::spirit::x4 { +namespace iris::x4 { enum class debug_handler_state : char { @@ -18,6 +18,6 @@ enum class debug_handler_state : char failed_parse, }; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/debug/detail/parse_callback.hpp b/include/iris/x4/debug/detail/parse_callback.hpp similarity index 95% rename from include/boost/spirit/x4/debug/detail/parse_callback.hpp rename to include/iris/x4/debug/detail/parse_callback.hpp index 3cd0d8964..3edeb0d0d 100644 --- a/include/boost/spirit/x4/debug/detail/parse_callback.hpp +++ b/include/iris/x4/debug/detail/parse_callback.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_X4_DEBUG_DETAIL_PARSE_CALLBACK_HPP -#define BOOST_SPIRIT_X4_X4_DEBUG_DETAIL_PARSE_CALLBACK_HPP +#ifndef IRIS_X4_X4_DEBUG_DETAIL_PARSE_CALLBACK_HPP +#define IRIS_X4_X4_DEBUG_DETAIL_PARSE_CALLBACK_HPP /*============================================================================= Copyright (c) 2025 Nana Sakisaka @@ -8,13 +8,13 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include +#include #include #include #include -namespace boost::spirit::x4::detail { +namespace iris::x4::detail { template concept HasImmutableOnErrorOverload = @@ -146,6 +146,6 @@ struct has_on_success : std::false_type ); }; -} // boost::spirit::x4::detail +} // iris::x4::detail #endif diff --git a/include/boost/spirit/x4/debug/error_reporting.hpp b/include/iris/x4/debug/error_reporting.hpp similarity index 95% rename from include/boost/spirit/x4/debug/error_reporting.hpp rename to include/iris/x4/debug/error_reporting.hpp index a397d27ce..3114b84be 100644 --- a/include/boost/spirit/x4/debug/error_reporting.hpp +++ b/include/iris/x4/debug/error_reporting.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DEBUG_ERROR_REPORTING_HPP -#define BOOST_SPIRIT_X4_DEBUG_ERROR_REPORTING_HPP +#ifndef IRIS_X4_DEBUG_ERROR_REPORTING_HPP +#define IRIS_X4_DEBUG_ERROR_REPORTING_HPP /*============================================================================= Copyright (c) 2014 Joel de Guzman @@ -9,13 +9,13 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include +#include +#include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { // Tag used to get our error handler from the context @@ -201,6 +201,6 @@ void error_handler::operator()(It err_first, It err_last, std::string const& err_out << " <<-- Here" << '\n'; } -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/debug/print_attribute.hpp b/include/iris/x4/debug/print_attribute.hpp similarity index 88% rename from include/boost/spirit/x4/debug/print_attribute.hpp rename to include/iris/x4/debug/print_attribute.hpp index d5b3fa1c8..9cab90b7e 100644 --- a/include/boost/spirit/x4/debug/print_attribute.hpp +++ b/include/iris/x4/debug/print_attribute.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DEBUG_PRINT_ATTRIBUTE_HPP -#define BOOST_SPIRIT_X4_DEBUG_PRINT_ATTRIBUTE_HPP +#ifndef IRIS_X4_DEBUG_PRINT_ATTRIBUTE_HPP +#define IRIS_X4_DEBUG_PRINT_ATTRIBUTE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,19 +10,19 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ================================================_==============================*/ -#include -#include +#include +#include #include #include #include // TODO: remove this -#ifdef BOOST_SPIRIT_X4_UNICODE -# include +#ifdef IRIS_X4_UNICODE +# include #endif -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { template void print_attribute(Out& out, T const& val); @@ -56,7 +56,7 @@ struct print_fusion_sequence // print elements in a variant template -struct print_visitor : static_visitor<> +struct print_visitor : boost::static_visitor<> { print_visitor(Out& out) : out(out) @@ -91,7 +91,7 @@ struct print_attribute_debug out << val; } -#ifdef BOOST_SPIRIT_X4_UNICODE +#ifdef IRIS_X4_UNICODE static void call(Out& out, char_encoding::unicode::char_type const& val) { if (val >= 0 && val < 127) { @@ -118,7 +118,7 @@ struct print_attribute_debug static void call(Out& out, CategorizedAttr auto const& val) { out << '['; - fusion::for_each(val, detail::print_fusion_sequence(out)); + boost::fusion::for_each(val, detail::print_fusion_sequence(out)); out << ']'; } @@ -162,6 +162,6 @@ void print_attribute(Out& out, T const& val) print_attribute_debug::call(out, val); } -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/include/boost/spirit/x4/debug/print_token.hpp b/include/iris/x4/debug/print_token.hpp similarity index 93% rename from include/boost/spirit/x4/debug/print_token.hpp rename to include/iris/x4/debug/print_token.hpp index ef733bf21..af054e376 100644 --- a/include/boost/spirit/x4/debug/print_token.hpp +++ b/include/iris/x4/debug/print_token.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DEBUG_PRINT_TOKEN_HPP -#define BOOST_SPIRIT_X4_DEBUG_PRINT_TOKEN_HPP +#ifndef IRIS_X4_DEBUG_PRINT_TOKEN_HPP +#define IRIS_X4_DEBUG_PRINT_TOKEN_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -15,7 +15,7 @@ #include -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { namespace detail { @@ -81,6 +81,6 @@ void print_token(Out& out, T const& val) token_printer_debug::print(out, val); } -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/include/boost/spirit/x4/debug/simple_trace.hpp b/include/iris/x4/debug/simple_trace.hpp similarity index 85% rename from include/boost/spirit/x4/debug/simple_trace.hpp rename to include/iris/x4/debug/simple_trace.hpp index 64eef01c2..f16afb6a0 100644 --- a/include/boost/spirit/x4/debug/simple_trace.hpp +++ b/include/iris/x4/debug/simple_trace.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DEBUG_SIMPLE_TRACE_HPP -#define BOOST_SPIRIT_X4_DEBUG_SIMPLE_TRACE_HPP +#ifndef IRIS_X4_DEBUG_SIMPLE_TRACE_HPP +#define IRIS_X4_DEBUG_SIMPLE_TRACE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,32 +10,32 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include +#include -#include -#include -#include +#include +#include +#include #include #include #include // The stream to use for debug output -#ifndef BOOST_SPIRIT_X4_DEBUG_OUT -#define BOOST_SPIRIT_X4_DEBUG_OUT std::cerr +#ifndef IRIS_X4_DEBUG_OUT +#define IRIS_X4_DEBUG_OUT std::cerr #endif // number of tokens to print while debugging -#ifndef BOOST_SPIRIT_X4_DEBUG_PRINT_SOME -#define BOOST_SPIRIT_X4_DEBUG_PRINT_SOME 20 +#ifndef IRIS_X4_DEBUG_PRINT_SOME +#define IRIS_X4_DEBUG_PRINT_SOME 20 #endif // number of spaces to indent -#ifndef BOOST_SPIRIT_X4_DEBUG_INDENT -#define BOOST_SPIRIT_X4_DEBUG_INDENT 2 +#ifndef IRIS_X4_DEBUG_INDENT +#define IRIS_X4_DEBUG_INDENT 2 #endif -namespace boost::spirit::x4 { +namespace iris::x4 { namespace detail { @@ -124,14 +124,14 @@ struct simple_trace namespace detail { using simple_trace_type = simple_trace< - BOOST_SPIRIT_X4_DEBUG_INDENT, - BOOST_SPIRIT_X4_DEBUG_PRINT_SOME + IRIS_X4_DEBUG_INDENT, + IRIS_X4_DEBUG_PRINT_SOME >; [[nodiscard]] inline simple_trace_type& get_simple_trace() { - static simple_trace_type tracer(BOOST_SPIRIT_X4_DEBUG_OUT); + static simple_trace_type tracer(IRIS_X4_DEBUG_OUT); return tracer; } @@ -178,6 +178,6 @@ struct [[nodiscard]] scoped_rule_debug } // detail -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/iris/x4/directive.hpp b/include/iris/x4/directive.hpp new file mode 100644 index 000000000..36c4d6352 --- /dev/null +++ b/include/iris/x4/directive.hpp @@ -0,0 +1,27 @@ +#ifndef IRIS_X4_DIRECTIVE_HPP +#define IRIS_X4_DIRECTIVE_HPP + +/*============================================================================= + Copyright (c) 2001-2015 Joel de Guzman + Copyright (c) 2025 Nana Sakisaka + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/include/boost/spirit/x4/directive/as.hpp b/include/iris/x4/directive/as.hpp similarity index 95% rename from include/boost/spirit/x4/directive/as.hpp rename to include/iris/x4/directive/as.hpp index aaee6d7db..62cae1680 100644 --- a/include/boost/spirit/x4/directive/as.hpp +++ b/include/iris/x4/directive/as.hpp @@ -1,16 +1,16 @@ -#ifndef BOOST_SPIRIT_X4_DIRECTIVE_AS_HPP -#define BOOST_SPIRIT_X4_DIRECTIVE_AS_HPP +#ifndef IRIS_X4_DIRECTIVE_AS_HPP +#define IRIS_X4_DIRECTIVE_AS_HPP -#include -#include -#include +#include +#include +#include #include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { namespace detail { @@ -144,6 +144,6 @@ template using parsers::directive::as; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/directive/expect.hpp b/include/iris/x4/directive/expect.hpp similarity index 89% rename from include/boost/spirit/x4/directive/expect.hpp rename to include/iris/x4/directive/expect.hpp index ec3d3d911..b652e17af 100644 --- a/include/boost/spirit/x4/directive/expect.hpp +++ b/include/iris/x4/directive/expect.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DIRECTIVE_EXPECT_HPP -#define BOOST_SPIRIT_X4_DIRECTIVE_EXPECT_HPP +#ifndef IRIS_X4_DIRECTIVE_EXPECT_HPP +#define IRIS_X4_DIRECTIVE_EXPECT_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,15 +10,15 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include +#include +#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct expect_directive : proxy_parser> @@ -68,9 +68,9 @@ namespace parsers::directive { using parsers::directive::expect; -} // boost::spirit::x4 +} // iris::x4 -namespace boost::spirit::x4::detail { +namespace iris::x4::detail { // Special case handling for expect expressions. template @@ -100,6 +100,6 @@ struct parse_into_container_impl> } }; -} // boost::spirit::x4::detail +} // iris::x4::detail #endif diff --git a/include/boost/spirit/x4/directive/lexeme.hpp b/include/iris/x4/directive/lexeme.hpp similarity index 90% rename from include/boost/spirit/x4/directive/lexeme.hpp rename to include/iris/x4/directive/lexeme.hpp index a3311e02b..00a750525 100644 --- a/include/boost/spirit/x4/directive/lexeme.hpp +++ b/include/iris/x4/directive/lexeme.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DIRECTIVE_LEXEME_HPP -#define BOOST_SPIRIT_X4_DIRECTIVE_LEXEME_HPP +#ifndef IRIS_X4_DIRECTIVE_LEXEME_HPP +#define IRIS_X4_DIRECTIVE_LEXEME_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,15 +9,15 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include +#include +#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct lexeme_directive : proxy_parser> @@ -84,6 +84,6 @@ namespace parsers::directive { using parsers::directive::lexeme; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/directive/matches.hpp b/include/iris/x4/directive/matches.hpp similarity index 85% rename from include/boost/spirit/x4/directive/matches.hpp rename to include/iris/x4/directive/matches.hpp index 7f2afc85b..07d8884f3 100644 --- a/include/boost/spirit/x4/directive/matches.hpp +++ b/include/iris/x4/directive/matches.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DIRECTIVE_MATCHES_HPP -#define BOOST_SPIRIT_X4_DIRECTIVE_MATCHES_HPP +#ifndef IRIS_X4_DIRECTIVE_MATCHES_HPP +#define IRIS_X4_DIRECTIVE_MATCHES_HPP /*============================================================================= Copyright (c) 2015 Mario Lang @@ -11,16 +11,16 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct matches_directive : unary_parser> @@ -71,6 +71,6 @@ namespace parsers::directive { using parsers::directive::matches; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/directive/no_case.hpp b/include/iris/x4/directive/no_case.hpp similarity index 86% rename from include/boost/spirit/x4/directive/no_case.hpp rename to include/iris/x4/directive/no_case.hpp index 541d7e546..5238ed3c7 100644 --- a/include/boost/spirit/x4/directive/no_case.hpp +++ b/include/iris/x4/directive/no_case.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DIRECTIVE_NO_CASE_HPP -#define BOOST_SPIRIT_X4_DIRECTIVE_NO_CASE_HPP +#ifndef IRIS_X4_DIRECTIVE_NO_CASE_HPP +#define IRIS_X4_DIRECTIVE_NO_CASE_HPP /*============================================================================= Copyright (c) 2014 Thomas Bernard @@ -9,16 +9,16 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include +#include +#include -#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { // propagate no_case information through the context template @@ -66,6 +66,6 @@ namespace parsers::directive { using parsers::directive::no_case; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/directive/no_skip.hpp b/include/iris/x4/directive/no_skip.hpp similarity index 90% rename from include/boost/spirit/x4/directive/no_skip.hpp rename to include/iris/x4/directive/no_skip.hpp index 394750113..c7b710d00 100644 --- a/include/boost/spirit/x4/directive/no_skip.hpp +++ b/include/iris/x4/directive/no_skip.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DIRECTIVE_NO_SKIP_HPP -#define BOOST_SPIRIT_X4_DIRECTIVE_NO_SKIP_HPP +#ifndef IRIS_X4_DIRECTIVE_NO_SKIP_HPP +#define IRIS_X4_DIRECTIVE_NO_SKIP_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -11,15 +11,15 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include +#include +#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { // Same as `lexeme[...]`, but does not pre-skip template @@ -91,6 +91,6 @@ namespace parsers::directive { using parsers::directive::no_skip; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/directive/omit.hpp b/include/iris/x4/directive/omit.hpp similarity index 88% rename from include/boost/spirit/x4/directive/omit.hpp rename to include/iris/x4/directive/omit.hpp index 465725ba8..000a57e10 100644 --- a/include/boost/spirit/x4/directive/omit.hpp +++ b/include/iris/x4/directive/omit.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DIRECTIVE_OMIT_HPP -#define BOOST_SPIRIT_X4_DIRECTIVE_OMIT_HPP +#ifndef IRIS_X4_DIRECTIVE_OMIT_HPP +#define IRIS_X4_DIRECTIVE_OMIT_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,14 +9,14 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include +#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { // `omit_directive` forces the attribute of subject parser // to be `unused_type` @@ -60,6 +60,6 @@ namespace parsers::directive { using parsers::directive::omit; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/directive/raw.hpp b/include/iris/x4/directive/raw.hpp similarity index 89% rename from include/boost/spirit/x4/directive/raw.hpp rename to include/iris/x4/directive/raw.hpp index 41937bf7c..c38084851 100644 --- a/include/boost/spirit/x4/directive/raw.hpp +++ b/include/iris/x4/directive/raw.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DIRECTIVE_RAW_HPP -#define BOOST_SPIRIT_X4_DIRECTIVE_RAW_HPP +#ifndef IRIS_X4_DIRECTIVE_RAW_HPP +#define IRIS_X4_DIRECTIVE_RAW_HPP /*============================================================================= Copyright (c) 2014 Joel de Guzman @@ -9,16 +9,16 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include +#include +#include +#include #include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { namespace detail { @@ -84,9 +84,9 @@ namespace parsers::directive { using parsers::directive::raw; -} // boost::spirit::x4 +} // iris::x4 -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { template Se, class Context> struct pseudo_attribute @@ -100,6 +100,6 @@ struct pseudo_attribute } }; -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/include/boost/spirit/x4/directive/repeat.hpp b/include/iris/x4/directive/repeat.hpp similarity index 95% rename from include/boost/spirit/x4/directive/repeat.hpp rename to include/iris/x4/directive/repeat.hpp index 0593853dc..eeb31ca7d 100644 --- a/include/boost/spirit/x4/directive/repeat.hpp +++ b/include/iris/x4/directive/repeat.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DIRECTIVE_REPEAT_HPP -#define BOOST_SPIRIT_X4_DIRECTIVE_REPEAT_HPP +#ifndef IRIS_X4_DIRECTIVE_REPEAT_HPP +#define IRIS_X4_DIRECTIVE_REPEAT_HPP /*============================================================================= Copyright (c) 2001-2011 Joel de Guzman @@ -12,16 +12,16 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include +#include +#include +#include #include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { namespace detail { @@ -195,6 +195,6 @@ namespace parsers::directive { using parsers::directive::repeat; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/directive/seek.hpp b/include/iris/x4/directive/seek.hpp similarity index 89% rename from include/boost/spirit/x4/directive/seek.hpp rename to include/iris/x4/directive/seek.hpp index 93447e7c6..b7d5a5969 100644 --- a/include/boost/spirit/x4/directive/seek.hpp +++ b/include/iris/x4/directive/seek.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DIRECTIVE_SEEK_HPP -#define BOOST_SPIRIT_X4_DIRECTIVE_SEEK_HPP +#ifndef IRIS_X4_DIRECTIVE_SEEK_HPP +#define IRIS_X4_DIRECTIVE_SEEK_HPP /*============================================================================= Copyright (c) 2011 Jamboree @@ -11,14 +11,14 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include +#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct seek_directive : proxy_parser> @@ -68,6 +68,6 @@ namespace parsers::directive { using parsers::directive::seek; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/directive/skip.hpp b/include/iris/x4/directive/skip.hpp similarity index 95% rename from include/boost/spirit/x4/directive/skip.hpp rename to include/iris/x4/directive/skip.hpp index 3d9645f6a..b6766d9a1 100644 --- a/include/boost/spirit/x4/directive/skip.hpp +++ b/include/iris/x4/directive/skip.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DIRECTIVE_SKIP_HPP -#define BOOST_SPIRIT_X4_DIRECTIVE_SKIP_HPP +#ifndef IRIS_X4_DIRECTIVE_SKIP_HPP +#define IRIS_X4_DIRECTIVE_SKIP_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,16 +10,16 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include +#include +#include +#include #include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct reskip_directive : proxy_parser> @@ -179,6 +179,6 @@ namespace parsers::directive { using parsers::directive::skip; using parsers::directive::reskip; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/directive/with.hpp b/include/iris/x4/directive/with.hpp similarity index 95% rename from include/boost/spirit/x4/directive/with.hpp rename to include/iris/x4/directive/with.hpp index 6ee857f73..7c7dd9a2e 100644 --- a/include/boost/spirit/x4/directive/with.hpp +++ b/include/iris/x4/directive/with.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_DIRECTIVE_WITH_HPP -#define BOOST_SPIRIT_X4_DIRECTIVE_WITH_HPP +#ifndef IRIS_X4_DIRECTIVE_WITH_HPP +#define IRIS_X4_DIRECTIVE_WITH_HPP /*============================================================================= Copyright (c) 2014 Joel de Guzman @@ -9,13 +9,13 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct with_directive; @@ -75,7 +75,7 @@ struct with_directive_impl requires std::is_constructible_v && std::is_constructible_v - constexpr with_directive_impl(SubjectT&& subject, U& val BOOST_SPIRIT_LIFETIMEBOUND) + constexpr with_directive_impl(SubjectT&& subject, U& val IRIS_LIFETIMEBOUND) noexcept(std::is_nothrow_constructible_v) : base_type(std::forward(subject)) , val_(val) @@ -113,7 +113,7 @@ struct with_directive : detail::with_directive_impl // The internal context type. This can be used to determine the composed // context type used in `x4::parse`/`x4::phrase_parse`. It is required for - // the argument of `BOOST_SPIRIT_X4_INSTANTIATE`. + // the argument of `IRIS_X4_INSTANTIATE`. template using context_t = context, Context>; @@ -217,6 +217,6 @@ template using parsers::directive::with; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/directive/with_local.hpp b/include/iris/x4/directive/with_local.hpp similarity index 91% rename from include/boost/spirit/x4/directive/with_local.hpp rename to include/iris/x4/directive/with_local.hpp index a9d2a60c4..8b0da22dd 100644 --- a/include/boost/spirit/x4/directive/with_local.hpp +++ b/include/iris/x4/directive/with_local.hpp @@ -1,15 +1,15 @@ -#ifndef BOOST_SPIRIT_X4_DIRECTIVE_WITH_LOCAL_HPP -#define BOOST_SPIRIT_X4_DIRECTIVE_WITH_LOCAL_HPP +#ifndef IRIS_X4_DIRECTIVE_WITH_LOCAL_HPP +#define IRIS_X4_DIRECTIVE_WITH_LOCAL_HPP -#include -#include +#include +#include #include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { namespace contexts { @@ -100,6 +100,6 @@ template using parsers::directive::with_local; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/numeric.hpp b/include/iris/x4/numeric.hpp similarity index 59% rename from include/boost/spirit/x4/numeric.hpp rename to include/iris/x4/numeric.hpp index 1313f3ef1..7199fb6d3 100644 --- a/include/boost/spirit/x4/numeric.hpp +++ b/include/iris/x4/numeric.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_NUMERIC_HPP -#define BOOST_SPIRIT_X4_NUMERIC_HPP +#ifndef IRIS_X4_NUMERIC_HPP +#define IRIS_X4_NUMERIC_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,10 +9,10 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #endif diff --git a/include/boost/spirit/x4/numeric/bool.hpp b/include/iris/x4/numeric/bool.hpp similarity index 95% rename from include/boost/spirit/x4/numeric/bool.hpp rename to include/iris/x4/numeric/bool.hpp index eb6e1d288..e8a2e294b 100644 --- a/include/boost/spirit/x4/numeric/bool.hpp +++ b/include/iris/x4/numeric/bool.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_NUMERIC_BOOL_HPP -#define BOOST_SPIRIT_X4_NUMERIC_BOOL_HPP +#ifndef IRIS_X4_NUMERIC_BOOL_HPP +#define IRIS_X4_NUMERIC_BOOL_HPP /*============================================================================= Copyright (c) 2009 Hartmut Kaiser @@ -10,11 +10,11 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include +#include +#include +#include -#include +#include #include #include @@ -22,7 +22,7 @@ #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { // Default boolean policies template @@ -204,7 +204,7 @@ using x4::standard::false_; } // parsers::standard -#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE +#ifndef IRIS_X4_NO_STANDARD_WIDE namespace standard_wide { [[maybe_unused]] inline constexpr bool_parser bool_{}; @@ -236,6 +236,6 @@ using x4::standard::false_; } // parsers -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/numeric/int.hpp b/include/iris/x4/numeric/int.hpp similarity index 88% rename from include/boost/spirit/x4/numeric/int.hpp rename to include/iris/x4/numeric/int.hpp index 6b4513a21..4967b7f0b 100644 --- a/include/boost/spirit/x4/numeric/int.hpp +++ b/include/iris/x4/numeric/int.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_NUMERIC_INT_HPP -#define BOOST_SPIRIT_X4_NUMERIC_INT_HPP +#ifndef IRIS_X4_NUMERIC_INT_HPP +#define IRIS_X4_NUMERIC_INT_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,16 +9,16 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include +#include +#include +#include #include #include // TODO: use `std::from_chars` -namespace boost::spirit::x4 { +namespace iris::x4 { template< class T, @@ -74,6 +74,6 @@ using parsers::int16; using parsers::int32; using parsers::int64; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/numeric/real.hpp b/include/iris/x4/numeric/real.hpp similarity index 95% rename from include/boost/spirit/x4/numeric/real.hpp rename to include/iris/x4/numeric/real.hpp index a6727917a..49d7f43b1 100644 --- a/include/boost/spirit/x4/numeric/real.hpp +++ b/include/iris/x4/numeric/real.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_NUMERIC_REAL_HPP -#define BOOST_SPIRIT_X4_NUMERIC_REAL_HPP +#ifndef IRIS_X4_NUMERIC_REAL_HPP +#define IRIS_X4_NUMERIC_REAL_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,13 +10,13 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include +#include +#include -#include -#include +#include +#include -#include +#include #include #include @@ -26,7 +26,7 @@ // TODO: use `std::from_chars` -namespace boost::spirit::x4 { +namespace iris::x4 { // Default unsigned real number policies template @@ -264,6 +264,6 @@ using parsers::float_; using parsers::double_; using parsers::long_double; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/numeric/uint.hpp b/include/iris/x4/numeric/uint.hpp similarity index 89% rename from include/boost/spirit/x4/numeric/uint.hpp rename to include/iris/x4/numeric/uint.hpp index dcfb20a01..ca6aea44c 100644 --- a/include/boost/spirit/x4/numeric/uint.hpp +++ b/include/iris/x4/numeric/uint.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_NUMERIC_UINT_HPP -#define BOOST_SPIRIT_X4_NUMERIC_UINT_HPP +#ifndef IRIS_X4_NUMERIC_UINT_HPP +#define IRIS_X4_NUMERIC_UINT_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,16 +10,16 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include +#include +#include +#include #include #include // TODO: use `std::from_chars` -namespace boost::spirit::x4 { +namespace iris::x4 { template< class T, @@ -81,6 +81,6 @@ using parsers::bin; using parsers::oct; using parsers::hex; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/numeric/utils/extract_int.hpp b/include/iris/x4/numeric/utils/extract_int.hpp similarity index 94% rename from include/boost/spirit/x4/numeric/utils/extract_int.hpp rename to include/iris/x4/numeric/utils/extract_int.hpp index aab9b57a5..9187f1e3e 100644 --- a/include/boost/spirit/x4/numeric/utils/extract_int.hpp +++ b/include/iris/x4/numeric/utils/extract_int.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_NUMERIC_UTILS_EXTRACT_INT_HPP -#define BOOST_SPIRIT_X4_NUMERIC_UTILS_EXTRACT_INT_HPP +#ifndef IRIS_X4_NUMERIC_UTILS_EXTRACT_INT_HPP +#define IRIS_X4_NUMERIC_UTILS_EXTRACT_INT_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -13,11 +13,11 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include +#include +#include -#include -#include +#include +#include #include #include @@ -32,11 +32,11 @@ #include -#ifndef BOOST_SPIRIT_X4_NUMERICS_LOOP_UNROLL -# define BOOST_SPIRIT_X4_NUMERICS_LOOP_UNROLL 3 +#ifndef IRIS_X4_NUMERICS_LOOP_UNROLL +# define IRIS_X4_NUMERICS_LOOP_UNROLL 3 #endif -namespace boost::spirit::x4::numeric { +namespace iris::x4::numeric { namespace detail { @@ -53,7 +53,7 @@ template struct digits2_to_n; // lookup table for log2(x) : 2 <= x <= 36 -#define BOOST_SPIRIT_X4_LOG2 (#error)(#error) \ +#define IRIS_X4_LOG2 (#error)(#error) \ (1000000)(1584960)(2000000)(2321920)(2584960)(2807350) \ (3000000)(3169920)(3321920)(3459430)(3584960)(3700430) \ (3807350)(3906890)(4000000)(4087460)(4169920)(4247920) \ @@ -66,14 +66,14 @@ struct digits2_to_n; template struct digits2_to_n \ { \ static constexpr int value = static_cast( \ - (Digits * 1000000) / BOOST_PP_SEQ_ELEM(Radix, BOOST_SPIRIT_X4_LOG2)); \ + (Digits * 1000000) / BOOST_PP_SEQ_ELEM(Radix, IRIS_X4_LOG2)); \ }; #define BOOST_PP_LOCAL_LIMITS (2, 36) #include BOOST_PP_LOCAL_ITERATE() #undef BOOST_PP_LOCAL_MACRO -#undef BOOST_SPIRIT_X4_LOG2 +#undef IRIS_X4_LOG2 template struct digits_traits : digits2_to_n::digits, Radix> @@ -246,7 +246,7 @@ struct check_max_digits<-1> }; // extract_int: main code for extracting integers -#define BOOST_SPIRIT_X4_NUMERIC_INNER_LOOP(z, x, data) \ +#define IRIS_X4_NUMERIC_INNER_LOOP(z, x, data) \ if (!check_max_digits::call(count + leading_zeros) || it == last) break; \ ch = *it; \ if (!radix_check::is_valid(ch) || !extractor::call(ch, count, val)) break; \ @@ -289,7 +289,7 @@ struct extract_int char_type ch; while (true) { - BOOST_PP_REPEAT(BOOST_SPIRIT_X4_NUMERICS_LOOP_UNROLL, BOOST_SPIRIT_X4_NUMERIC_INNER_LOOP, _) + BOOST_PP_REPEAT(IRIS_X4_NUMERICS_LOOP_UNROLL, IRIS_X4_NUMERIC_INNER_LOOP, _) } if (count + leading_zeros >= MinDigits) { @@ -327,11 +327,11 @@ struct extract_int return extract_int::parse_main(first, last, attr); } }; -#undef BOOST_SPIRIT_X4_NUMERIC_INNER_LOOP +#undef IRIS_X4_NUMERIC_INNER_LOOP // extract_int: main code for extracting integers // common case where MinDigits == 1 and MaxDigits = -1 -#define BOOST_SPIRIT_X4_NUMERIC_INNER_LOOP(z, x, data) \ +#define IRIS_X4_NUMERIC_INNER_LOOP(z, x, data) \ if (it == last) break; \ ch = *it; \ if (!radix_check::is_valid(ch)) break; \ @@ -389,7 +389,7 @@ struct extract_int count = 0; ++it; while (true) { - BOOST_PP_REPEAT(BOOST_SPIRIT_X4_NUMERICS_LOOP_UNROLL, BOOST_SPIRIT_X4_NUMERIC_INNER_LOOP, _) + BOOST_PP_REPEAT(IRIS_X4_NUMERICS_LOOP_UNROLL, IRIS_X4_NUMERIC_INNER_LOOP, _) } x4::move_to(std::move(val), attr); @@ -425,7 +425,7 @@ struct extract_int } }; -#undef BOOST_SPIRIT_X4_NUMERIC_INNER_LOOP +#undef IRIS_X4_NUMERIC_INNER_LOOP // Extract the prefix sign (- or +), return true if a '-' was found template Se> @@ -556,6 +556,6 @@ struct extract_int } }; -} // boost::spirit::x4::numeric +} // iris::x4::numeric #endif diff --git a/include/boost/spirit/x4/numeric/utils/extract_real.hpp b/include/iris/x4/numeric/utils/extract_real.hpp similarity index 94% rename from include/boost/spirit/x4/numeric/utils/extract_real.hpp rename to include/iris/x4/numeric/utils/extract_real.hpp index 8fb1b31f7..729a92974 100644 --- a/include/boost/spirit/x4/numeric/utils/extract_real.hpp +++ b/include/iris/x4/numeric/utils/extract_real.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_NUMERIC_UTILS_EXTRACT_REAL_HPP -#define BOOST_SPIRIT_X4_NUMERIC_UTILS_EXTRACT_REAL_HPP +#ifndef IRIS_X4_NUMERIC_UTILS_EXTRACT_REAL_HPP +#define IRIS_X4_NUMERIC_UTILS_EXTRACT_REAL_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,10 +10,10 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include +#include +#include -#include +#include #include #include @@ -29,7 +29,7 @@ # pragma warning(disable: 4100) // 'p': unreferenced formal parameter #endif -namespace boost::spirit::x4::extension { +namespace iris::x4::extension { template [[nodiscard]] constexpr bool @@ -123,9 +123,9 @@ negate(bool /*neg*/, unused_type n) noexcept // no-op for unused_type return n; } -} // boost::spirit::x4::extension +} // iris::x4::extension -namespace boost::spirit::x4::numeric { +namespace iris::x4::numeric { template struct extract_real @@ -256,6 +256,6 @@ struct extract_real # pragma warning(pop) #endif -} // boost::spirit::x4::numeric +} // iris::x4::numeric #endif diff --git a/include/boost/spirit/x4/numeric/utils/pow10.hpp b/include/iris/x4/numeric/utils/pow10.hpp similarity index 94% rename from include/boost/spirit/x4/numeric/utils/pow10.hpp rename to include/iris/x4/numeric/utils/pow10.hpp index 94790a313..4a5489a76 100644 --- a/include/boost/spirit/x4/numeric/utils/pow10.hpp +++ b/include/iris/x4/numeric/utils/pow10.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_NUMERIC_UTILS_POW10_HPP -#define BOOST_SPIRIT_X4_NUMERIC_UTILS_POW10_HPP +#ifndef IRIS_X4_NUMERIC_UTILS_POW10_HPP +#define IRIS_X4_NUMERIC_UTILS_POW10_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,8 +10,8 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include +#include +#include #include @@ -19,7 +19,7 @@ #include #include -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { namespace detail { @@ -118,6 +118,6 @@ template return pow10_helper::call(dim); } -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/include/iris/x4/operator.hpp b/include/iris/x4/operator.hpp new file mode 100644 index 000000000..414b9c9ff --- /dev/null +++ b/include/iris/x4/operator.hpp @@ -0,0 +1,23 @@ +#ifndef IRIS_X4_OPERATOR_HPP +#define IRIS_X4_OPERATOR_HPP + +/*============================================================================= + Copyright (c) 2001-2014 Joel de Guzman + Copyright (c) 2025 Nana Sakisaka + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/include/boost/spirit/x4/operator/alternative.hpp b/include/iris/x4/operator/alternative.hpp similarity index 91% rename from include/boost/spirit/x4/operator/alternative.hpp rename to include/iris/x4/operator/alternative.hpp index cc507a2c8..c3dc061e7 100644 --- a/include/boost/spirit/x4/operator/alternative.hpp +++ b/include/iris/x4/operator/alternative.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_OPERATOR_ALTERNATIVE_HPP -#define BOOST_SPIRIT_X4_OPERATOR_ALTERNATIVE_HPP +#ifndef IRIS_X4_OPERATOR_ALTERNATIVE_HPP +#define IRIS_X4_OPERATOR_ALTERNATIVE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,13 +10,13 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include -#include +#include +#include +#include +#include -#include -#include +#include +#include #include // TODO: remove this @@ -25,7 +25,7 @@ #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct alternative : binary_parser> @@ -51,9 +51,11 @@ struct alternative : binary_parser> } } - // If you're changing these semantics, you should: - // - Understand https://github.com/boostorg/spirit/issues/378 - // - Add test to `attribute.cpp`. This is mandatory. + // If you're changing these logic, you should read the PR below to + // understand the rationale: + // https://github.com/boostorg/spirit_x4/pull/50 + // + // You also should add test to `attribute.cpp`. template Se, class Context, class Attr> requires (!traits::X4Container) @@ -171,6 +173,6 @@ operator|(Left&& left, Right&& right) }; } -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/operator/and_predicate.hpp b/include/iris/x4/operator/and_predicate.hpp similarity index 87% rename from include/boost/spirit/x4/operator/and_predicate.hpp rename to include/iris/x4/operator/and_predicate.hpp index 7d2b0d570..9166b1a36 100644 --- a/include/boost/spirit/x4/operator/and_predicate.hpp +++ b/include/iris/x4/operator/and_predicate.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_OPERATOR_AND_PREDICATE_HPP -#define BOOST_SPIRIT_X4_OPERATOR_AND_PREDICATE_HPP +#ifndef IRIS_X4_OPERATOR_AND_PREDICATE_HPP +#define IRIS_X4_OPERATOR_AND_PREDICATE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,13 +9,13 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct and_predicate : unary_parser> @@ -45,6 +45,6 @@ operator&(Subject&& subject) return {as_parser(std::forward(subject))}; } -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/operator/difference.hpp b/include/iris/x4/operator/difference.hpp similarity index 91% rename from include/boost/spirit/x4/operator/difference.hpp rename to include/iris/x4/operator/difference.hpp index 39753dbac..39499e7b3 100644 --- a/include/boost/spirit/x4/operator/difference.hpp +++ b/include/iris/x4/operator/difference.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_OPERATOR_DIFFERENCE_HPP -#define BOOST_SPIRIT_X4_OPERATOR_DIFFERENCE_HPP +#ifndef IRIS_X4_OPERATOR_DIFFERENCE_HPP +#define IRIS_X4_OPERATOR_DIFFERENCE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,14 +10,14 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include +#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct difference : binary_parser> @@ -73,6 +73,6 @@ operator-(Left&& left, Right&& right) return {as_parser(std::forward(left)), as_parser(std::forward(right))}; } -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/operator/kleene.hpp b/include/iris/x4/operator/kleene.hpp similarity index 81% rename from include/boost/spirit/x4/operator/kleene.hpp rename to include/iris/x4/operator/kleene.hpp index 9d62b186c..b2f5ed798 100644 --- a/include/boost/spirit/x4/operator/kleene.hpp +++ b/include/iris/x4/operator/kleene.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_OPERATOR_KLEENE_HPP -#define BOOST_SPIRIT_X4_OPERATOR_KLEENE_HPP +#ifndef IRIS_X4_OPERATOR_KLEENE_HPP +#define IRIS_X4_OPERATOR_KLEENE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -11,18 +11,18 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct kleene : unary_parser> @@ -55,6 +55,6 @@ operator*(Subject&& subject) return {as_parser(std::forward(subject))}; } -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/operator/list.hpp b/include/iris/x4/operator/list.hpp similarity index 87% rename from include/boost/spirit/x4/operator/list.hpp rename to include/iris/x4/operator/list.hpp index 7ffd4a08d..ec720ca18 100644 --- a/include/boost/spirit/x4/operator/list.hpp +++ b/include/iris/x4/operator/list.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_OPERATOR_LIST_HPP -#define BOOST_SPIRIT_X4_OPERATOR_LIST_HPP +#ifndef IRIS_X4_OPERATOR_LIST_HPP +#define IRIS_X4_OPERATOR_LIST_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -11,18 +11,18 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct list : binary_parser> @@ -80,6 +80,6 @@ operator%(Left&& left, Right&& right) return {as_parser(std::forward(left)), as_parser(std::forward(right))}; } -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/operator/not_predicate.hpp b/include/iris/x4/operator/not_predicate.hpp similarity index 87% rename from include/boost/spirit/x4/operator/not_predicate.hpp rename to include/iris/x4/operator/not_predicate.hpp index 46c914f64..8e734d950 100644 --- a/include/boost/spirit/x4/operator/not_predicate.hpp +++ b/include/iris/x4/operator/not_predicate.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_OPERATOR_NOT_PREDICATE_HPP -#define BOOST_SPIRIT_X4_OPERATOR_NOT_PREDICATE_HPP +#ifndef IRIS_X4_OPERATOR_NOT_PREDICATE_HPP +#define IRIS_X4_OPERATOR_NOT_PREDICATE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,14 +10,14 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include +#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct not_predicate : unary_parser> @@ -53,6 +53,6 @@ operator!(Subject&& subject) return {as_parser(std::forward(subject))}; } -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/operator/optional.hpp b/include/iris/x4/operator/optional.hpp similarity index 87% rename from include/boost/spirit/x4/operator/optional.hpp rename to include/iris/x4/operator/optional.hpp index 2f78ad54c..e777dc639 100644 --- a/include/boost/spirit/x4/operator/optional.hpp +++ b/include/iris/x4/operator/optional.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_OPERATOR_OPTIONAL_HPP -#define BOOST_SPIRIT_X4_OPERATOR_OPTIONAL_HPP +#ifndef IRIS_X4_OPERATOR_OPTIONAL_HPP +#define IRIS_X4_OPERATOR_OPTIONAL_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -11,20 +11,20 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -#include -#include +#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct optional : unary_parser> @@ -112,6 +112,6 @@ operator-(Subject&& subject) return {as_parser(std::forward(subject))}; } -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/operator/plus.hpp b/include/iris/x4/operator/plus.hpp similarity index 82% rename from include/boost/spirit/x4/operator/plus.hpp rename to include/iris/x4/operator/plus.hpp index 8fc2719fb..8683e39fa 100644 --- a/include/boost/spirit/x4/operator/plus.hpp +++ b/include/iris/x4/operator/plus.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_OPERATOR_PLUS_HPP -#define BOOST_SPIRIT_X4_OPERATOR_PLUS_HPP +#ifndef IRIS_X4_OPERATOR_PLUS_HPP +#define IRIS_X4_OPERATOR_PLUS_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -11,18 +11,18 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct plus : unary_parser> @@ -59,6 +59,6 @@ operator+(Subject&& subject) return {as_parser(std::forward(subject))}; } -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/operator/sequence.hpp b/include/iris/x4/operator/sequence.hpp similarity index 90% rename from include/boost/spirit/x4/operator/sequence.hpp rename to include/iris/x4/operator/sequence.hpp index 873269be5..d5ac47758 100644 --- a/include/boost/spirit/x4/operator/sequence.hpp +++ b/include/iris/x4/operator/sequence.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_OPERATOR_SEQUENCE_HPP -#define BOOST_SPIRIT_X4_OPERATOR_SEQUENCE_HPP +#ifndef IRIS_X4_OPERATOR_SEQUENCE_HPP +#define IRIS_X4_OPERATOR_SEQUENCE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,13 +10,13 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include +#include +#include +#include -#include +#include -#include +#include #include // TODO: remove this @@ -25,7 +25,7 @@ #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct sequence : binary_parser> @@ -114,6 +114,6 @@ operator>(Left&& left, Right&& right) }; } -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/parse.hpp b/include/iris/x4/parse.hpp similarity index 94% rename from include/boost/spirit/x4/parse.hpp rename to include/iris/x4/parse.hpp index 27352e4bb..ae6e0326f 100644 --- a/include/boost/spirit/x4/parse.hpp +++ b/include/iris/x4/parse.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_PARSE_HPP -#define BOOST_SPIRIT_X4_PARSE_HPP +#ifndef IRIS_X4_PARSE_HPP +#define IRIS_X4_PARSE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,16 +9,16 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include // intentionally eagerly included -#include -#include -#include +#include +#include +#include // intentionally eagerly included +#include +#include +#include -#include +#include -#include +#include #include #include @@ -26,7 +26,7 @@ #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { enum class root_skipper_flag : char { @@ -82,13 +82,13 @@ struct phrase_parse_context_for_impl } // detail -// Used for determining the context type required in `BOOST_SPIRIT_X4_INSTANTIATE`. +// Used for determining the context type required in `IRIS_X4_INSTANTIATE`. // Note that sentinel is not required, because only the iterator is needed for error info. // We keep the empty parameter as the noop placeholder to make the interface consistent with `phrase_parse_context_for`. template using parse_context_for = typename detail::parse_context_for_impl::type; -// Used for determining the context type required in `BOOST_SPIRIT_X4_INSTANTIATE`. +// Used for determining the context type required in `IRIS_X4_INSTANTIATE`. template using phrase_parse_context_for = typename detail::phrase_parse_context_for_impl::type; @@ -384,11 +384,11 @@ inline namespace cpos { [[maybe_unused]] inline constexpr detail::parse_fn parse{}; -[[maybe_unused, deprecated("Use `parse(...)`. Spirit can now dispatch overloads correctly.")]] +[[maybe_unused, deprecated("Use `parse(...)`. X4 can now dispatch overloads correctly.")]] inline constexpr detail::parse_fn phrase_parse{}; } // cpos -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/parse_result.hpp b/include/iris/x4/parse_result.hpp similarity index 94% rename from include/boost/spirit/x4/parse_result.hpp rename to include/iris/x4/parse_result.hpp index 8410abdf2..26e605ade 100644 --- a/include/boost/spirit/x4/parse_result.hpp +++ b/include/iris/x4/parse_result.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_PARSE_RESULT_HPP -#define BOOST_SPIRIT_X4_PARSE_RESULT_HPP +#ifndef IRIS_X4_PARSE_RESULT_HPP +#define IRIS_X4_PARSE_RESULT_HPP /*============================================================================= Copyright (c) 2025 Nana Sakisaka @@ -8,16 +8,16 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include +#include +#include +#include #include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template Se = It> struct [[nodiscard]] parse_result @@ -131,6 +131,6 @@ struct range_parse_parser_impl template using parse_result_for = typename detail::parse_result_for_impl::type; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/rule.hpp b/include/iris/x4/rule.hpp similarity index 85% rename from include/boost/spirit/x4/rule.hpp rename to include/iris/x4/rule.hpp index f5f5bfa17..f18f3da80 100644 --- a/include/boost/spirit/x4/rule.hpp +++ b/include/iris/x4/rule.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_RULE_HPP -#define BOOST_SPIRIT_X4_RULE_HPP +#ifndef IRIS_X4_RULE_HPP +#define IRIS_X4_RULE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,23 +10,23 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include +#include +#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -#include +#include -#ifdef BOOST_SPIRIT_X4_DEBUG -# include +#ifdef IRIS_X4_DEBUG +# include #endif -#include +#include #include #include @@ -39,7 +39,7 @@ #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct rule; @@ -60,7 +60,7 @@ enum struct default_parse_rule_result : bool {}; // This overload will only be selected when there exists no user-defined // definition for `parse_rule`. // -// When a user invokes `BOOST_SPIRIT_X4_DEFINE_`, an unconstrained overload +// When a user invokes `IRIS_X4_DEFINE_`, an unconstrained overload // is generated at the user's namespace scope. It will never conflict with // this (vvvvv) overload, as the generated one is never directly called with // a context containing `RuleID`. @@ -86,7 +86,7 @@ template Se, class requires (!has_context_v) constexpr void parse_rule(rule_id, It&, Se const&, Context const&, Attr&) - = delete; // BOOST_SPIRIT_X4_DEFINE undefined for this rule + = delete; // IRIS_X4_DEFINE undefined for this rule template @@ -122,7 +122,7 @@ struct rule_impl template [[nodiscard]] static constexpr Context const& - make_rcontext(Context const& ctx BOOST_SPIRIT_LIFETIMEBOUND, RHSAttr&) noexcept + make_rcontext(Context const& ctx IRIS_LIFETIMEBOUND, RHSAttr&) noexcept { static_assert(!need_rcontext); // sanity check @@ -155,7 +155,7 @@ struct rule_impl template requires need_rcontext [[nodiscard]] static constexpr decltype(auto) - make_rcontext(Context const& ctx BOOST_SPIRIT_LIFETIMEBOUND, RHSAttr& rhs_attr BOOST_SPIRIT_LIFETIMEBOUND) noexcept + make_rcontext(Context const& ctx IRIS_LIFETIMEBOUND, RHSAttr& rhs_attr IRIS_LIFETIMEBOUND) noexcept { return x4::replace_first_context(ctx, rhs_attr); } @@ -171,7 +171,7 @@ struct rule_impl RContext const& rcontext, RHSAttr& rhs_attr ) // never noexcept; requires complex handling { - // See if the user has `BOOST_SPIRIT_X4_DEFINE` for this rule + // See if the user has `IRIS_X4_DEFINE` for this rule constexpr bool is_default_parse_rule = std::same_as< decltype(parse_rule( // ADL std::declval>(), first, last, @@ -195,7 +195,7 @@ struct rule_impl ok = rhs.parse(first, last, rcontext, rhs_attr); } else { - // If there is no `BOOST_SPIRIT_X4_DEFINE` for this rule, + // If there is no `IRIS_X4_DEFINE` for this rule, // we'll make a context for this rule tagged by its `RuleID` // so we can extract the rule later on in the default // `parse_rule` overload. @@ -263,7 +263,7 @@ struct rule_impl // called inside the following scope. bool parse_ok; { - #ifdef BOOST_SPIRIT_X4_DEBUG + #ifdef IRIS_X4_DEBUG parse_ok = false; // Debug on destructor, i.e., before any modifications are made to the @@ -434,7 +434,7 @@ struct rule : parser> // the (potentially ADL-found) `parse_rule` function to be rule-agnostic. // If we don't do this, the specialized function signature becomes // nondeterministic, and we lose the opportunity to do explicit template - // instantiation in `BOOST_SPIRIT_X4_INSTANTIATE`. + // instantiation in `IRIS_X4_INSTANTIATE`. // // Note that this removal is possible only because the actual invocation of // `parse_rule` *ALWAYS* results in subsequent invocation of `call_rule_definition`, @@ -586,68 +586,68 @@ using x4::rule; // ------------------------------------------------------------- -#define BOOST_SPIRIT_X4_DEPRECATED_MACRO_WARN_I(x) _Pragma(#x) -#define BOOST_SPIRIT_X4_DEPRECATED_MACRO_WARN(msg) BOOST_SPIRIT_X4_DEPRECATED_MACRO_WARN_I(message(msg)) +#define IRIS_X4_DEPRECATED_MACRO_WARN_I(x) _Pragma(#x) +#define IRIS_X4_DEPRECATED_MACRO_WARN(msg) IRIS_X4_DEPRECATED_MACRO_WARN_I(message(msg)) -#define BOOST_SPIRIT_X4_DECLARE_(r, constexpr_, rule_type) \ +#define IRIS_X4_DECLARE_(r, constexpr_, rule_type) \ template Se, class Context> \ [[nodiscard]] constexpr_ bool \ parse_rule( \ - ::boost::spirit::x4::detail::rule_id::id>, \ + ::iris::x4::detail::rule_id::id>, \ It& first, Se const& last, \ Context const& ctx, \ typename std::remove_cvref_t::attribute_type& attr \ ); -#define BOOST_SPIRIT_X4_DECLARE(rule_type) BOOST_SPIRIT_X4_DECLARE_(,, rule_type) -#define BOOST_SPIRIT_X4_DECLARE_CONSTEXPR(rule_type) BOOST_SPIRIT_X4_DECLARE_(, constexpr, rule_type) +#define IRIS_X4_DECLARE(rule_type) IRIS_X4_DECLARE_(,, rule_type) +#define IRIS_X4_DECLARE_CONSTEXPR(rule_type) IRIS_X4_DECLARE_(, constexpr, rule_type) // NB: This can't be `constexpr`, because a constexpr declaration // cannot be used with explicit template instantiation. We simply -// can't drop (legit) use cases of `BOOST_SPIRIT_X4_INSTANTIATE`, so +// can't drop (legit) use cases of `IRIS_X4_INSTANTIATE`, so // this is a pure technical limitation. If you need `constexpr` -// support in your rule, use `BOOST_SPIRIT_X4_DECLARE_CONSTEXPR`. -#define BOOST_SPIRIT_DECLARE(...) \ - BOOST_SPIRIT_X4_DEPRECATED_MACRO_WARN( \ - "Use of variadic arguments with `BOOST_SPIRIT_DECLARE` is deprecated due to the heavy compile-time cost of " \ - "`BOOST_PP_SEQ_*`. Just apply `BOOST_SPIRIT_X4_DECLARE` for each of your rules." \ +// support in your rule, use `IRIS_X4_DECLARE_CONSTEXPR`. +#define IRIS_DECLARE(...) \ + IRIS_X4_DEPRECATED_MACRO_WARN( \ + "Use of variadic arguments with `IRIS_DECLARE` is deprecated due to the heavy compile-time cost of " \ + "`BOOST_PP_SEQ_*`. Just apply `IRIS_X4_DECLARE` for each of your rules." \ ) \ - BOOST_PP_SEQ_FOR_EACH(BOOST_SPIRIT_X4_DECLARE_,, BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)) + BOOST_PP_SEQ_FOR_EACH(IRIS_X4_DECLARE_,, BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)) // ------------------------------------------------------------- -#define BOOST_SPIRIT_X4_DEFINE_(r, constexpr_, rule_name) \ +#define IRIS_X4_DEFINE_(r, constexpr_, rule_name) \ template Se, class Context> \ [[nodiscard]] constexpr_ bool \ parse_rule( \ - ::boost::spirit::x4::detail::rule_id::id>, \ + ::iris::x4::detail::rule_id::id>, \ It& first, Se const& last, \ Context const& ctx, \ typename std::remove_cvref_t::attribute_type& attr \ ) { \ using rule_t = std::remove_cvref_t; \ - return ::boost::spirit::x4::detail::rule_impl< \ + return ::iris::x4::detail::rule_impl< \ typename rule_t::id, typename rule_t::attribute_type, true \ >::call_rule_definition( \ - BOOST_SPIRIT_CONCAT(rule_name, _def), rule_name.name, \ + IRIS_CONCAT(rule_name, _def), rule_name.name, \ first, last, ctx, attr \ ); \ } -#define BOOST_SPIRIT_X4_DEFINE(rule_type) BOOST_SPIRIT_X4_DEFINE_(,, rule_type) -#define BOOST_SPIRIT_X4_DEFINE_CONSTEXPR(rule_type) BOOST_SPIRIT_X4_DEFINE_(, constexpr, rule_type) +#define IRIS_X4_DEFINE(rule_type) IRIS_X4_DEFINE_(,, rule_type) +#define IRIS_X4_DEFINE_CONSTEXPR(rule_type) IRIS_X4_DEFINE_(, constexpr, rule_type) // NB: This can't be `constexpr`, because a constexpr declaration // cannot be used with explicit template instantiation. We simply -// can't drop (legit) use cases of `BOOST_SPIRIT_INSTANTIATE`, so +// can't drop (legit) use cases of `IRIS_INSTANTIATE`, so // this is a pure technical limitation. If you need `constexpr` -// support in your rule, use `BOOST_SPIRIT_X4_DEFINE_CONSTEXPR`. -#define BOOST_SPIRIT_DEFINE(...) \ - BOOST_SPIRIT_X4_DEPRECATED_MACRO_WARN( \ - "Use of variadic arguments with `BOOST_SPIRIT_DEFINE` is deprecated due to the heavy compile-time cost of " \ - "`BOOST_PP_SEQ_*`. Just apply `BOOST_SPIRIT_X4_DEFINE` for each of your rules." \ +// support in your rule, use `IRIS_X4_DEFINE_CONSTEXPR`. +#define IRIS_DEFINE(...) \ + IRIS_X4_DEPRECATED_MACRO_WARN( \ + "Use of variadic arguments with `IRIS_DEFINE` is deprecated due to the heavy compile-time cost of " \ + "`BOOST_PP_SEQ_*`. Just apply `IRIS_X4_DEFINE` for each of your rules." \ ) \ - BOOST_PP_SEQ_FOR_EACH(BOOST_SPIRIT_X4_DEFINE_,, BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)) + BOOST_PP_SEQ_FOR_EACH(IRIS_X4_DEFINE_,, BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)) // ------------------------------------------------------------- @@ -678,32 +678,32 @@ struct instantiate_macro_helper } // detail -#define BOOST_SPIRIT_X4_INSTANTIATE_(rule_type, It, Se, Context) \ +#define IRIS_X4_INSTANTIATE_(rule_type, It, Se, Context) \ template bool parse_rule( \ - ::boost::spirit::x4::detail::rule_id::id>, \ + ::iris::x4::detail::rule_id::id>, \ It&, Se const&, Context const&, \ typename std::remove_cvref_t::attribute_type& \ ); -#define BOOST_SPIRIT_X4_INSTANTIATE_WRAP(...) __VA_ARGS__ +#define IRIS_X4_INSTANTIATE_WRAP(...) __VA_ARGS__ // NB: This can't be `constexpr`, because a constexpr declaration // cannot be used with explicit template instantiation. -#define BOOST_SPIRIT_X4_INSTANTIATE(...) \ - BOOST_SPIRIT_X4_INSTANTIATE_( \ - BOOST_SPIRIT_X4_INSTANTIATE_WRAP(typename ::boost::spirit::x4::detail::instantiate_macro_helper<__VA_ARGS__>::rule_type), \ - BOOST_SPIRIT_X4_INSTANTIATE_WRAP(typename ::boost::spirit::x4::detail::instantiate_macro_helper<__VA_ARGS__>::iterator_type), \ - BOOST_SPIRIT_X4_INSTANTIATE_WRAP(typename ::boost::spirit::x4::detail::instantiate_macro_helper<__VA_ARGS__>::sentinel_type), \ - BOOST_SPIRIT_X4_INSTANTIATE_WRAP(typename ::boost::spirit::x4::detail::instantiate_macro_helper<__VA_ARGS__>::context_type) \ +#define IRIS_X4_INSTANTIATE(...) \ + IRIS_X4_INSTANTIATE_( \ + IRIS_X4_INSTANTIATE_WRAP(typename ::iris::x4::detail::instantiate_macro_helper<__VA_ARGS__>::rule_type), \ + IRIS_X4_INSTANTIATE_WRAP(typename ::iris::x4::detail::instantiate_macro_helper<__VA_ARGS__>::iterator_type), \ + IRIS_X4_INSTANTIATE_WRAP(typename ::iris::x4::detail::instantiate_macro_helper<__VA_ARGS__>::sentinel_type), \ + IRIS_X4_INSTANTIATE_WRAP(typename ::iris::x4::detail::instantiate_macro_helper<__VA_ARGS__>::context_type) \ ) -#define BOOST_SPIRIT_INSTANTIATE(...) \ - BOOST_SPIRIT_X4_DEPRECATED_MACRO_WARN( \ - "Use `BOOST_SPIRIT_X4_INSTANTIATE`. `BOOST_SPIRIT_INSTANTIATE` is deprecated because " \ +#define IRIS_INSTANTIATE(...) \ + IRIS_X4_DEPRECATED_MACRO_WARN( \ + "Use `IRIS_X4_INSTANTIATE`. `IRIS_INSTANTIATE` is deprecated because " \ "the name was not correctly prefixed with `X4`." \ ) \ - BOOST_SPIRIT_X4_INSTANTIATE(__VA_ARGS__) + IRIS_X4_INSTANTIATE(__VA_ARGS__) -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/string.hpp b/include/iris/x4/string.hpp similarity index 66% rename from include/boost/spirit/x4/string.hpp rename to include/iris/x4/string.hpp index 5c59688f7..a75cecf84 100644 --- a/include/boost/spirit/x4/string.hpp +++ b/include/iris/x4/string.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_STRING_HPP -#define BOOST_SPIRIT_X4_STRING_HPP +#ifndef IRIS_X4_STRING_HPP +#define IRIS_X4_STRING_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,8 +9,8 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include +#include +#include +#include #endif diff --git a/include/boost/spirit/x4/string/case_compare.hpp b/include/iris/x4/string/case_compare.hpp similarity index 88% rename from include/boost/spirit/x4/string/case_compare.hpp rename to include/iris/x4/string/case_compare.hpp index f8b598b43..b987a3884 100644 --- a/include/boost/spirit/x4/string/case_compare.hpp +++ b/include/iris/x4/string/case_compare.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_STRING_CASE_COMPARE_HPP -#define BOOST_SPIRIT_X4_STRING_CASE_COMPARE_HPP +#ifndef IRIS_X4_STRING_CASE_COMPARE_HPP +#define IRIS_X4_STRING_CASE_COMPARE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,22 +9,22 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include +#include +#include -#include +#include -#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE -# include +#ifndef IRIS_X4_NO_STANDARD_WIDE +# include #endif -#ifdef BOOST_SPIRIT_X4_UNICODE -# include +#ifdef IRIS_X4_UNICODE +# include #endif #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct case_compare @@ -129,6 +129,6 @@ get_case_compare(Context const&) noexcept } } -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/string/detail/string_parse.hpp b/include/iris/x4/string/detail/string_parse.hpp similarity index 92% rename from include/boost/spirit/x4/string/detail/string_parse.hpp rename to include/iris/x4/string/detail/string_parse.hpp index 306a89e1b..a88d06e1f 100644 --- a/include/boost/spirit/x4/string/detail/string_parse.hpp +++ b/include/iris/x4/string/detail/string_parse.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_STRING_DETAIL_STRING_PARSE_HPP -#define BOOST_SPIRIT_X4_STRING_DETAIL_STRING_PARSE_HPP +#ifndef IRIS_X4_STRING_DETAIL_STRING_PARSE_HPP +#define IRIS_X4_STRING_DETAIL_STRING_PARSE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,17 +9,17 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include -namespace boost::spirit::x4::detail { +namespace iris::x4::detail { template Se, X4Attribute Attr, class CaseCompareFunc> [[nodiscard]] constexpr bool @@ -115,6 +115,6 @@ string_parse( It&, Se const&, unused_type const& ) = delete; // The call site is lacking `x4::assume_container(attr)` -} // boost::spirit::x4::detail +} // iris::x4::detail #endif diff --git a/include/boost/spirit/x4/string/detail/tst_node.hpp b/include/iris/x4/string/detail/tst_node.hpp similarity index 93% rename from include/boost/spirit/x4/string/detail/tst_node.hpp rename to include/iris/x4/string/detail/tst_node.hpp index 5e0f74924..853843657 100644 --- a/include/boost/spirit/x4/string/detail/tst_node.hpp +++ b/include/iris/x4/string/detail/tst_node.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_STRING_DETAIL_TST_NODE_HPP -#define BOOST_SPIRIT_X4_STRING_DETAIL_TST_NODE_HPP +#ifndef IRIS_X4_STRING_DETAIL_TST_NODE_HPP +#define IRIS_X4_STRING_DETAIL_TST_NODE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,8 +9,8 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include +#include +#include #include #include @@ -18,7 +18,7 @@ #include #include -namespace boost::spirit::x4::detail { +namespace iris::x4::detail { template> struct tst_node @@ -155,8 +155,8 @@ struct tst_node friend struct allocator_ops; - BOOST_SPIRIT_NO_UNIQUE_ADDRESS Alloc alloc; - BOOST_SPIRIT_NO_UNIQUE_ADDRESS node_allocator_type node_alloc; + IRIS_NO_UNIQUE_ADDRESS Alloc alloc; + IRIS_NO_UNIQUE_ADDRESS node_allocator_type node_alloc; Char id; // the node's identity character T* data = nullptr; // optional data tst_node* lt = nullptr; // left pointer @@ -164,6 +164,6 @@ struct tst_node tst_node* gt = nullptr; // right pointer }; -} // boost::spirit::x4::detail +} // iris::x4::detail #endif diff --git a/include/boost/spirit/x4/string/literal_string.hpp b/include/iris/x4/string/literal_string.hpp similarity index 86% rename from include/boost/spirit/x4/string/literal_string.hpp rename to include/iris/x4/string/literal_string.hpp index 30b04082e..3f0ad96f0 100644 --- a/include/boost/spirit/x4/string/literal_string.hpp +++ b/include/iris/x4/string/literal_string.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_STRING_LITERAL_STRING_HPP -#define BOOST_SPIRIT_X4_STRING_LITERAL_STRING_HPP +#ifndef IRIS_X4_STRING_LITERAL_STRING_HPP +#define IRIS_X4_STRING_LITERAL_STRING_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,21 +9,21 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include +#include -#include -#include -#include +#include +#include +#include -#include -#include +#include +#include #include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template> struct literal_string : parser> @@ -78,6 +78,6 @@ struct get_info> } }; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/string/string.hpp b/include/iris/x4/string/string.hpp similarity index 90% rename from include/boost/spirit/x4/string/string.hpp rename to include/iris/x4/string/string.hpp index 5e0b8bc1c..88f54c82a 100644 --- a/include/boost/spirit/x4/string/string.hpp +++ b/include/iris/x4/string/string.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_STRING_STRING_HPP -#define BOOST_SPIRIT_X4_STRING_STRING_HPP +#ifndef IRIS_X4_STRING_STRING_HPP +#define IRIS_X4_STRING_STRING_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,18 +9,18 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include // required for "c" -> 'c' optimization -#include +#include +#include // required for "c" -> 'c' optimization +#include -#include +#include -#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE -# include +#ifndef IRIS_X4_NO_STANDARD_WIDE +# include #endif -#ifdef BOOST_SPIRIT_X4_UNICODE -# include +#ifdef IRIS_X4_UNICODE +# include #endif #include @@ -28,7 +28,7 @@ #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { namespace standard { @@ -75,7 +75,7 @@ constexpr void string(T&&) = delete; // Mixing incompatible character types is n using standard::helpers::string; using standard::helpers::lit; -#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE +#ifndef IRIS_X4_NO_STANDARD_WIDE namespace standard_wide { inline namespace helpers { @@ -122,7 +122,7 @@ using standard_wide::helpers::string; using standard_wide::helpers::lit; #endif -#ifdef BOOST_SPIRIT_X4_UNICODE +#ifdef IRIS_X4_UNICODE namespace unicode { inline namespace helpers { @@ -178,14 +178,14 @@ using x4::standard::string; using x4::standard::lit; } // standard -#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE +#ifndef IRIS_X4_NO_STANDARD_WIDE namespace standard_wide { using x4::standard_wide::string; using x4::standard_wide::lit; } // standard_wide #endif -#ifdef BOOST_SPIRIT_X4_UNICODE +#ifdef IRIS_X4_UNICODE namespace unicode { using x4::unicode::string; using x4::unicode::lit; @@ -257,6 +257,6 @@ struct as_parser> } // extension -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/string/tst.hpp b/include/iris/x4/string/tst.hpp similarity index 94% rename from include/boost/spirit/x4/string/tst.hpp rename to include/iris/x4/string/tst.hpp index c0f703651..edaf1c863 100644 --- a/include/boost/spirit/x4/string/tst.hpp +++ b/include/iris/x4/string/tst.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_STRING_TST_HPP -#define BOOST_SPIRIT_X4_STRING_TST_HPP +#ifndef IRIS_X4_STRING_TST_HPP +#define IRIS_X4_STRING_TST_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,9 +9,9 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include +#include +#include +#include #include #include @@ -21,7 +21,7 @@ #include -namespace boost::spirit::x4 { +namespace iris::x4 { struct tst_pass_through { @@ -193,11 +193,11 @@ struct tst } } - BOOST_SPIRIT_NO_UNIQUE_ADDRESS Alloc alloc_; - BOOST_SPIRIT_NO_UNIQUE_ADDRESS node_allocator_type node_alloc_; + IRIS_NO_UNIQUE_ADDRESS Alloc alloc_; + IRIS_NO_UNIQUE_ADDRESS node_allocator_type node_alloc_; node* root_ = nullptr; }; -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/string/utf8.hpp b/include/iris/x4/string/utf8.hpp similarity index 97% rename from include/boost/spirit/x4/string/utf8.hpp rename to include/iris/x4/string/utf8.hpp index 4473e6bc6..6aa4b8491 100644 --- a/include/boost/spirit/x4/string/utf8.hpp +++ b/include/iris/x4/string/utf8.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_STRING_UTF8_HPP -#define BOOST_SPIRIT_X4_STRING_UTF8_HPP +#ifndef IRIS_X4_STRING_UTF8_HPP +#define IRIS_X4_STRING_UTF8_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -14,7 +14,7 @@ #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { namespace detail { @@ -156,6 +156,6 @@ to_utf8(std::basic_string const& str) } #endif -} // boost::spirit::x4 +} // iris::x4 #endif diff --git a/include/boost/spirit/x4/symbols.hpp b/include/iris/x4/symbols.hpp similarity index 91% rename from include/boost/spirit/x4/symbols.hpp rename to include/iris/x4/symbols.hpp index fdc30dfc2..dce59bc64 100644 --- a/include/boost/spirit/x4/symbols.hpp +++ b/include/iris/x4/symbols.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_SYMBOLS_HPP -#define BOOST_SPIRIT_X4_SYMBOLS_HPP +#ifndef IRIS_X4_SYMBOLS_HPP +#define IRIS_X4_SYMBOLS_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,22 +10,22 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -#include +#include -#include -#include +#include +#include -#include -#include +#include +#include -#ifdef BOOST_SPIRIT_X4_UNICODE -# include +#ifdef IRIS_X4_UNICODE +# include #endif #include @@ -37,7 +37,7 @@ #include #include -#define BOOST_SPIRIT_X4_IMPLICIT_SHARED_SYMBOLS_WARNING(old_api) \ +#define IRIS_X4_IMPLICIT_SHARED_SYMBOLS_WARNING(old_api) \ "Use `unique_" old_api "` instead. `" old_api "` has had a " \ "*implicit* trait where the underlying storage is shared via " \ "`std::shared_ptr`. This disallows `constexpr` usage in generic " \ @@ -46,7 +46,7 @@ "represent this trait, so the usage of the old API is strongly " \ "discouraged." -namespace boost::spirit::x4 { +namespace iris::x4 { namespace detail { @@ -338,7 +338,7 @@ struct shared_symbols_parser }; template> -struct [[deprecated(BOOST_SPIRIT_X4_IMPLICIT_SHARED_SYMBOLS_WARNING("symbols_parser"))]] +struct [[deprecated(IRIS_X4_IMPLICIT_SHARED_SYMBOLS_WARNING("symbols_parser"))]] symbols_parser : shared_symbols_parser { using base_type = shared_symbols_parser; @@ -380,7 +380,7 @@ struct get_info> namespace standard { template -using symbols [[deprecated(BOOST_SPIRIT_X4_IMPLICIT_SHARED_SYMBOLS_WARNING("symbols"))]] +using symbols [[deprecated(IRIS_X4_IMPLICIT_SHARED_SYMBOLS_WARNING("symbols"))]] = shared_symbols_parser; template @@ -401,11 +401,11 @@ using x4::standard::shared_symbols; using x4::standard::unique_symbols; } // parsers::standard -#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE +#ifndef IRIS_X4_NO_STANDARD_WIDE namespace standard_wide { template -using symbols [[deprecated(BOOST_SPIRIT_X4_IMPLICIT_SHARED_SYMBOLS_WARNING("symbols"))]] +using symbols [[deprecated(IRIS_X4_IMPLICIT_SHARED_SYMBOLS_WARNING("symbols"))]] = shared_symbols_parser; template @@ -422,7 +422,7 @@ using x4::standard_wide::unique_symbols; } // parsers::standard_wide #endif -#ifdef BOOST_SPIRIT_X4_UNICODE +#ifdef IRIS_X4_UNICODE namespace unicode { template @@ -439,8 +439,8 @@ using x4::unicode::unique_symbols; } // parsers::unicode #endif -} // boost::spirit::x4 +} // iris::x4 -#undef BOOST_SPIRIT_X4_IMPLICIT_SHARED_SYMBOLS_WARNING +#undef IRIS_X4_IMPLICIT_SHARED_SYMBOLS_WARNING #endif diff --git a/include/boost/spirit/x4/traits/attribute_category.hpp b/include/iris/x4/traits/attribute_category.hpp similarity index 84% rename from include/boost/spirit/x4/traits/attribute_category.hpp rename to include/iris/x4/traits/attribute_category.hpp index e30b8a266..4338cb785 100644 --- a/include/boost/spirit/x4/traits/attribute_category.hpp +++ b/include/iris/x4/traits/attribute_category.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_TRAITS_ATTRIBUTE_CATEGORY_HPP -#define BOOST_SPIRIT_X4_TRAITS_ATTRIBUTE_CATEGORY_HPP +#ifndef IRIS_X4_TRAITS_ATTRIBUTE_CATEGORY_HPP +#define IRIS_X4_TRAITS_ATTRIBUTE_CATEGORY_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,24 +9,24 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { struct unused_type; struct unused_container_type; -} // boost::spirit::x4 +} // iris::x4 -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { struct unused_attr {}; struct plain_attr {}; @@ -88,8 +88,7 @@ concept NonUnusedAttr = !std::is_same_v>::type, unused_attr>; template - requires - fusion::traits::is_sequence>::value + requires boost::fusion::traits::is_sequence>::value struct attribute_category { using type = tuple_attr; @@ -123,6 +122,6 @@ struct attribute_category using type = container_attr; }; -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/include/boost/spirit/x4/traits/attribute_of_binary.hpp b/include/iris/x4/traits/attribute_of_binary.hpp similarity index 88% rename from include/boost/spirit/x4/traits/attribute_of_binary.hpp rename to include/iris/x4/traits/attribute_of_binary.hpp index c1299f21f..9090f246b 100644 --- a/include/boost/spirit/x4/traits/attribute_of_binary.hpp +++ b/include/iris/x4/traits/attribute_of_binary.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_TRAITS_ATTRIBUTE_OF_BINARY_HPP -#define BOOST_SPIRIT_X4_TRAITS_ATTRIBUTE_OF_BINARY_HPP +#ifndef IRIS_X4_TRAITS_ATTRIBUTE_OF_BINARY_HPP +#define IRIS_X4_TRAITS_ATTRIBUTE_OF_BINARY_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -11,13 +11,13 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include +#include +#include +#include #include -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { namespace detail { @@ -92,6 +92,6 @@ struct attribute_of_binary >::type; }; -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/include/boost/spirit/x4/traits/char_encoding_traits.hpp b/include/iris/x4/traits/char_encoding_traits.hpp similarity index 73% rename from include/boost/spirit/x4/traits/char_encoding_traits.hpp rename to include/iris/x4/traits/char_encoding_traits.hpp index e52612ca8..989f95920 100644 --- a/include/boost/spirit/x4/traits/char_encoding_traits.hpp +++ b/include/iris/x4/traits/char_encoding_traits.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_TRAITS_CHAR_ENCODING_TRAITS_HPP -#define BOOST_SPIRIT_X4_TRAITS_CHAR_ENCODING_TRAITS_HPP +#ifndef IRIS_X4_TRAITS_CHAR_ENCODING_TRAITS_HPP +#define IRIS_X4_TRAITS_CHAR_ENCODING_TRAITS_HPP /*============================================================================= Copyright (c) 2025 Nana Sakisaka @@ -8,17 +8,17 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#include +#include -#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE -# include +#ifndef IRIS_X4_NO_STANDARD_WIDE +# include #endif -#ifdef BOOST_SPIRIT_X4_UNICODE -# include +#ifdef IRIS_X4_UNICODE +# include #endif -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { namespace detail { @@ -50,16 +50,16 @@ struct char_encoding_traits; template<> struct char_encoding_traits : detail::char_encoding_traits_impl {}; -#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE +#ifndef IRIS_X4_NO_STANDARD_WIDE template<> struct char_encoding_traits : detail::char_encoding_traits_impl {}; #endif -#ifdef BOOST_SPIRIT_X4_UNICODE +#ifdef IRIS_X4_UNICODE template<> struct char_encoding_traits : detail::char_encoding_traits_impl {}; #endif -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/include/boost/spirit/x4/traits/container_traits.hpp b/include/iris/x4/traits/container_traits.hpp similarity index 97% rename from include/boost/spirit/x4/traits/container_traits.hpp rename to include/iris/x4/traits/container_traits.hpp index c66711468..770e19ca3 100644 --- a/include/boost/spirit/x4/traits/container_traits.hpp +++ b/include/iris/x4/traits/container_traits.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_TRAITS_CONTAINER_TRAITS_HPP -#define BOOST_SPIRIT_X4_TRAITS_CONTAINER_TRAITS_HPP +#ifndef IRIS_X4_TRAITS_CONTAINER_TRAITS_HPP +#define IRIS_X4_TRAITS_CONTAINER_TRAITS_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,8 +10,8 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include +#include +#include #include #include @@ -24,14 +24,14 @@ #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { template struct container_appender; -} // boost::spirit::x4 +} // iris::x4 -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { // Customization point template @@ -431,7 +431,7 @@ struct is_container> template requires // required; fusion pollutes ADL on `size`, which is called by `std::ranges::empty` on Clang 22 - (!fusion::traits::is_sequence>::value) && + (!boost::fusion::traits::is_sequence>::value) && std::default_initializable && @@ -519,6 +519,6 @@ struct build_container using type = std::basic_string; }; -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/include/boost/spirit/x4/traits/numeric_traits.hpp b/include/iris/x4/traits/numeric_traits.hpp similarity index 79% rename from include/boost/spirit/x4/traits/numeric_traits.hpp rename to include/iris/x4/traits/numeric_traits.hpp index c9bc9f169..d185ce186 100644 --- a/include/boost/spirit/x4/traits/numeric_traits.hpp +++ b/include/iris/x4/traits/numeric_traits.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_TRAITS_NUMERIC_TRAITS_HPP -#define BOOST_SPIRIT_X4_TRAITS_NUMERIC_TRAITS_HPP +#ifndef IRIS_X4_TRAITS_NUMERIC_TRAITS_HPP +#define IRIS_X4_TRAITS_NUMERIC_TRAITS_HPP /*============================================================================= Copyright (c) 2001-2011 Hartmut Kaiser @@ -12,7 +12,7 @@ #include #include -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { // Customization points for numeric operations @@ -23,6 +23,6 @@ template struct check_overflow : std::bool_constant::is_bounded> {}; -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/include/boost/spirit/x4/traits/optional_traits.hpp b/include/iris/x4/traits/optional_traits.hpp similarity index 85% rename from include/boost/spirit/x4/traits/optional_traits.hpp rename to include/iris/x4/traits/optional_traits.hpp index 82cc4f946..6839b8b07 100644 --- a/include/boost/spirit/x4/traits/optional_traits.hpp +++ b/include/iris/x4/traits/optional_traits.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_TRAITS_OPTIONAL_TRAITS_HPP -#define BOOST_SPIRIT_X4_TRAITS_OPTIONAL_TRAITS_HPP +#ifndef IRIS_X4_TRAITS_OPTIONAL_TRAITS_HPP +#define IRIS_X4_TRAITS_OPTIONAL_TRAITS_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,20 +10,20 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include +#include #include #include -namespace boost::spirit::x4 { +namespace iris::x4 { struct unused_type; struct unused_container_type; -} // boost::spirit::x4 +} // iris::x4 -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { template struct is_optional : std::false_type {}; @@ -83,6 +83,6 @@ struct optional_value using type = unused_type; }; -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/include/boost/spirit/x4/traits/string_traits.hpp b/include/iris/x4/traits/string_traits.hpp similarity index 78% rename from include/boost/spirit/x4/traits/string_traits.hpp rename to include/iris/x4/traits/string_traits.hpp index 9fa5435e2..1887d507c 100644 --- a/include/boost/spirit/x4/traits/string_traits.hpp +++ b/include/iris/x4/traits/string_traits.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_TRAITS_STRING_TRAITS_HPP -#define BOOST_SPIRIT_X4_TRAITS_STRING_TRAITS_HPP +#ifndef IRIS_X4_TRAITS_STRING_TRAITS_HPP +#define IRIS_X4_TRAITS_STRING_TRAITS_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -11,20 +11,20 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ================================================_==============================*/ -#if defined(BOOST_SPIRIT_UNICODE) && !defined(BOOST_SPIRIT_X4_UNICODE) -# error "`BOOST_SPIRIT_UNICODE` has no effect on X4. #define `BOOST_SPIRIT_X4_UNICODE`" +#if defined(IRIS_UNICODE) && !defined(IRIS_X4_UNICODE) +# error "`IRIS_UNICODE` has no effect on X4. #define `IRIS_X4_UNICODE`" #endif -#if defined(BOOST_SPIRIT_X3_UNICODE) && !defined(BOOST_SPIRIT_X4_UNICODE) -# error "`BOOST_SPIRIT_X3_UNICODE` has no effect on X4. #define `BOOST_SPIRIT_X4_UNICODE`" +#if defined(IRIS_X3_UNICODE) && !defined(IRIS_X4_UNICODE) +# error "`IRIS_X3_UNICODE` has no effect on X4. #define `IRIS_X4_UNICODE`" #endif -#if defined(BOOST_SPIRIT_NO_STANDARD_WIDE) && !defined(BOOST_SPIRIT_X4_NO_STANDARD_WIDE) -# error "`BOOST_SPIRIT_NO_STANDARD_WIDE` has no effect on X4. #define `BOOST_SPIRIT_X4_NO_STANDARD_WIDE`" +#if defined(IRIS_NO_STANDARD_WIDE) && !defined(IRIS_X4_NO_STANDARD_WIDE) +# error "`IRIS_NO_STANDARD_WIDE` has no effect on X4. #define `IRIS_X4_NO_STANDARD_WIDE`" #endif -#if defined(BOOST_SPIRIT_X3_NO_STANDARD_WIDE) && !defined(BOOST_SPIRIT_X4_NO_STANDARD_WIDE) -# error "`BOOST_SPIRIT_X3_NO_STANDARD_WIDE` has no effect on X4. #define `BOOST_SPIRIT_X4_NO_STANDARD_WIDE`" +#if defined(IRIS_X3_NO_STANDARD_WIDE) && !defined(IRIS_X4_NO_STANDARD_WIDE) +# error "`IRIS_X3_NO_STANDARD_WIDE` has no effect on X4. #define `IRIS_X4_NO_STANDARD_WIDE`" #endif #include @@ -32,21 +32,21 @@ #include #include -namespace boost::spirit::x4::char_encoding { +namespace iris::x4::char_encoding { struct standard; -#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE +#ifndef IRIS_X4_NO_STANDARD_WIDE struct standard_wide; #endif -#ifdef BOOST_SPIRIT_X4_UNICODE +#ifdef IRIS_X4_UNICODE struct unicode; #endif -} // boost::spirit::x4::char_encoding +} // iris::x4::char_encoding -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { template concept CharLike = @@ -111,11 +111,11 @@ namespace detail { template struct char_encoding_for_impl; template<> struct char_encoding_for_impl { using type = char_encoding::standard; }; -#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE +#ifndef IRIS_X4_NO_STANDARD_WIDE template<> struct char_encoding_for_impl { using type = char_encoding::standard_wide; }; #endif -#ifdef BOOST_SPIRIT_X4_UNICODE +#ifdef IRIS_X4_UNICODE template<> struct char_encoding_for_impl { using type = char_encoding::unicode; }; template<> struct char_encoding_for_impl { using type = char_encoding::unicode; }; template<> struct char_encoding_for_impl { using type = char_encoding::unicode; }; @@ -132,6 +132,6 @@ using maybe_owning_string = std::conditional_t< template using char_encoding_for = typename detail::char_encoding_for_impl::type; -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/include/boost/spirit/x4/traits/subrange_traits.hpp b/include/iris/x4/traits/subrange_traits.hpp similarity index 82% rename from include/boost/spirit/x4/traits/subrange_traits.hpp rename to include/iris/x4/traits/subrange_traits.hpp index 865b7ac0f..d992f1bba 100644 --- a/include/boost/spirit/x4/traits/subrange_traits.hpp +++ b/include/iris/x4/traits/subrange_traits.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_TRAITS_SUBRANGE_TRAITS_HPP -#define BOOST_SPIRIT_X4_TRAITS_SUBRANGE_TRAITS_HPP +#ifndef IRIS_X4_TRAITS_SUBRANGE_TRAITS_HPP +#define IRIS_X4_TRAITS_SUBRANGE_TRAITS_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -13,7 +13,7 @@ #include #include -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { template struct is_subrange : std::false_type {}; @@ -24,6 +24,6 @@ constexpr bool is_subrange_v = is_subrange::value; template Se, std::ranges::subrange_kind Kind> struct is_subrange> : std::true_type {}; -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/include/boost/spirit/x4/traits/substitution.hpp b/include/iris/x4/traits/substitution.hpp similarity index 83% rename from include/boost/spirit/x4/traits/substitution.hpp rename to include/iris/x4/traits/substitution.hpp index c74731db2..7521ebf26 100644 --- a/include/boost/spirit/x4/traits/substitution.hpp +++ b/include/iris/x4/traits/substitution.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_TRAITS_SUBSTITUTION_HPP -#define BOOST_SPIRIT_X4_TRAITS_SUBSTITUTION_HPP +#ifndef IRIS_X4_TRAITS_SUBSTITUTION_HPP +#define IRIS_X4_TRAITS_SUBSTITUTION_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,9 +9,9 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include +#include +#include +#include #include @@ -22,7 +22,7 @@ #include #include -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { template struct is_variant; @@ -51,11 +51,11 @@ struct is_substitute_impl : std::false_type {}; template requires std::conjunction_v< - fusion::traits::is_sequence, - fusion::traits::is_sequence + boost::fusion::traits::is_sequence, + boost::fusion::traits::is_sequence > struct is_substitute_impl - : mpl::equal> + : boost::mpl::equal> {}; template @@ -104,6 +104,6 @@ struct is_substitute, std::optional> : is_substitute {}; -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/include/boost/spirit/x4/traits/transform_attribute.hpp b/include/iris/x4/traits/transform_attribute.hpp similarity index 93% rename from include/boost/spirit/x4/traits/transform_attribute.hpp rename to include/iris/x4/traits/transform_attribute.hpp index 9ce9208cb..8c4aa103a 100644 --- a/include/boost/spirit/x4/traits/transform_attribute.hpp +++ b/include/iris/x4/traits/transform_attribute.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_TRAITS_TRANSFORM_ATTRIBUTE_HPP -#define BOOST_SPIRIT_X4_TRAITS_TRANSFORM_ATTRIBUTE_HPP +#ifndef IRIS_X4_TRAITS_TRANSFORM_ATTRIBUTE_HPP +#define IRIS_X4_TRAITS_TRANSFORM_ATTRIBUTE_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -10,14 +10,14 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include +#include +#include #include #include #include -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { template struct transform_attribute @@ -113,6 +113,6 @@ struct transform_attribute static_assert(!std::is_reference_v, "Transformed cannot be a reference type"); }; -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/include/boost/spirit/x4/traits/tuple_traits.hpp b/include/iris/x4/traits/tuple_traits.hpp similarity index 72% rename from include/boost/spirit/x4/traits/tuple_traits.hpp rename to include/iris/x4/traits/tuple_traits.hpp index 37b3076aa..8bc5d53f2 100644 --- a/include/boost/spirit/x4/traits/tuple_traits.hpp +++ b/include/iris/x4/traits/tuple_traits.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_TRAITS_TUPLE_TRAITS_HPP -#define BOOST_SPIRIT_X4_TRAITS_TUPLE_TRAITS_HPP +#ifndef IRIS_X4_TRAITS_TUPLE_TRAITS_HPP +#define IRIS_X4_TRAITS_TUPLE_TRAITS_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -16,13 +16,13 @@ #include -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { template struct has_same_size : std::bool_constant< - fusion::result_of::size>::value == - fusion::result_of::size>::value + boost::fusion::result_of::size>::value == + boost::fusion::result_of::size>::value > {}; @@ -31,7 +31,7 @@ constexpr bool has_same_size_v = has_same_size::value; template struct has_size - : std::bool_constant>::value == N> + : std::bool_constant>::value == N> {}; template @@ -40,8 +40,8 @@ constexpr bool has_size_v = has_size::value; template struct is_same_size_sequence : std::bool_constant>, - fusion::traits::is_sequence>, + boost::fusion::traits::is_sequence>, + boost::fusion::traits::is_sequence>, has_same_size >> {}; @@ -52,7 +52,7 @@ constexpr bool is_same_size_sequence_v = is_same_size_sequence::value; template struct is_size_one_sequence : std::bool_constant>, + boost::fusion::traits::is_sequence>, has_size >> {}; @@ -63,7 +63,7 @@ constexpr bool is_size_one_sequence_v = is_size_one_sequence::value; template struct is_size_one_view : std::bool_constant>, + boost::fusion::traits::is_view>, has_size >> {}; @@ -85,9 +85,9 @@ template requires is_size_one_sequence_v> struct synthesized_value { - using type = std::remove_cvref_t::type>; + using type = std::remove_cvref_t::type>; }; -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/include/boost/spirit/x4/traits/variant_traits.hpp b/include/iris/x4/traits/variant_traits.hpp similarity index 79% rename from include/boost/spirit/x4/traits/variant_traits.hpp rename to include/iris/x4/traits/variant_traits.hpp index 817684584..b6a27cf91 100644 --- a/include/boost/spirit/x4/traits/variant_traits.hpp +++ b/include/iris/x4/traits/variant_traits.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_TRAITS_VARIANT_TRAITS_HPP -#define BOOST_SPIRIT_X4_TRAITS_VARIANT_TRAITS_HPP +#ifndef IRIS_X4_TRAITS_VARIANT_TRAITS_HPP +#define IRIS_X4_TRAITS_VARIANT_TRAITS_HPP /*============================================================================= Copyright (c) 2001-2014 Joel de Guzman @@ -9,9 +9,9 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include +#include -#include +#include #include // TODO: remove this @@ -23,7 +23,7 @@ #include -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { // TODO: define a legit concept for determining variant-like types @@ -34,7 +34,7 @@ template constexpr bool is_variant_v = is_variant::value; // By declaring a nested struct named `adapted_variant_tag` in -// your class, you tell spirit that it is regarded as a variant type. +// your class, you tell X4 that it is regarded as a variant type. // The minimum required interface for such a variant is that it has // constructors for various types supported by your variant and // `::types` which is an mpl sequence of the contained types. @@ -63,20 +63,20 @@ struct variant_find_substitute using variant_type = Variant; using types = typename variant_type::types; - using end = typename mpl::end::type; + using end = typename boost::mpl::end::type; - using iter_1 = typename mpl::find::type; + using iter_1 = typename boost::mpl::find::type; - using iter = typename mpl::eval_if< + using iter = typename boost::mpl::eval_if< std::is_same, - mpl::find_if>, + boost::mpl::find_if>, std::type_identity >::type; - using type = typename mpl::eval_if< + using type = typename boost::mpl::eval_if< std::is_same, std::type_identity, - mpl::deref + boost::mpl::deref >::type; }; @@ -100,12 +100,12 @@ struct variant_has_substitute_impl using variant_type = Variant; using types = typename variant_type::types; - using end = typename mpl::end::type; - using iter_1 = typename mpl::find::type; + using end = typename boost::mpl::end::type; + using iter_1 = typename boost::mpl::find::type; - using iter = typename mpl::eval_if< + using iter = typename boost::mpl::eval_if< std::is_same, - mpl::find_if>, + boost::mpl::find_if>, std::type_identity >::type; @@ -128,6 +128,6 @@ struct variant_has_substitute : std::true_type {}; template struct variant_has_substitute : std::true_type {}; -} // boost::spirit::x4::traits +} // iris::x4::traits #endif diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 953248798..1d0ea98cc 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -3,29 +3,29 @@ # Distributed under the Boost Software License, Version 1.0. # https://www.boost.org/LICENSE_1_0.txt -# For Spirit-specific tests. -add_library(boost_spirit_x4_cxx_test INTERFACE) -set_target_properties(boost_spirit_x4_cxx_test PROPERTIES CXX_EXTENSIONS OFF) -target_link_libraries(boost_spirit_x4_cxx_test INTERFACE _boost_spirit_x4_cxx_common) +# For X4-specific tests. +add_library(iris_x4_cxx_test INTERFACE) +set_target_properties(iris_x4_cxx_test PROPERTIES CXX_EXTENSIONS OFF) +target_link_libraries(iris_x4_cxx_test INTERFACE _iris_x4_cxx_common) # For external libraries. Excludes strict warning, etc. -add_library(boost_spirit_x4_cxx_external INTERFACE) -set_target_properties(boost_spirit_x4_cxx_external PROPERTIES CXX_EXTENSIONS OFF) -target_link_libraries(boost_spirit_x4_cxx_external INTERFACE _boost_spirit_x4_cxx_common) +add_library(iris_x4_cxx_external INTERFACE) +set_target_properties(iris_x4_cxx_external PROPERTIES CXX_EXTENSIONS OFF) +target_link_libraries(iris_x4_cxx_external INTERFACE _iris_x4_cxx_common) if(MSVC) target_compile_options( - boost_spirit_x4_cxx_test + iris_x4_cxx_test INTERFACE /W4 /analyze /analyze:external- ) target_compile_options( - boost_spirit_x4_cxx_external + iris_x4_cxx_external INTERFACE /analyze- ) else() # non-MSVC target_compile_options( - boost_spirit_x4_cxx_test + iris_x4_cxx_test INTERFACE -Wall -Wextra -pedantic ) @@ -48,10 +48,10 @@ FetchContent_MakeAvailable(Catch2) set_target_properties(Catch2 PROPERTIES CXX_EXTENSIONS OFF) target_compile_definitions(Catch2 PUBLIC DO_NOT_USE_WMAIN) -target_link_libraries(Catch2 PRIVATE boost_spirit_x4_cxx_external) -target_link_libraries(Catch2WithMain PRIVATE boost_spirit_x4_cxx_external) +target_link_libraries(Catch2 PRIVATE iris_x4_cxx_external) +target_link_libraries(Catch2WithMain PRIVATE iris_x4_cxx_external) -target_link_libraries(boost_spirit_x4_cxx_test INTERFACE Catch2::Catch2WithMain) +target_link_libraries(iris_x4_cxx_test INTERFACE Catch2::Catch2WithMain) # -------------------------------------------- diff --git a/test/x4/CMakeLists.txt b/test/x4/CMakeLists.txt index 6fc4d9af8..87b8da656 100644 --- a/test/x4/CMakeLists.txt +++ b/test/x4/CMakeLists.txt @@ -24,7 +24,7 @@ function(x4_define_test test_name) if(MSVC) # Prevent "Warning: Conflicting entries detected" error # set_source_files_properties( - # "${PROJECT_SOURCE_DIR}/boost_spirit_x4.natvis" + # "${PROJECT_SOURCE_DIR}/iris_x4.natvis" # TARGET_DIRECTORY x4_${test_name}_test # PROPERTIES VS_SETTINGS "ExcludedFromBuild=true" # ) @@ -34,7 +34,7 @@ function(x4_define_test test_name) target_link_libraries( x4_${test_name}_test - PRIVATE Boost::spirit_x4 boost_spirit_x4_cxx_test + PRIVATE Iris::X4 iris_x4_cxx_test ) add_test( NAME x4_${test_name}_test diff --git a/test/x4/actions.cpp b/test/x4/actions.cpp index 75c1dda68..e8c609e80 100644 --- a/test/x4/actions.cpp +++ b/test/x4/actions.cpp @@ -8,17 +8,17 @@ #include "test.hpp" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include TEST_CASE("action") { using x4::int_; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(x4::int_[std::true_type{}]); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(x4::int_[std::true_type{}]); { int x = 0; @@ -42,8 +42,8 @@ TEST_CASE("action") // ensure no unneeded synthesization, copying and moving occurred auto p = '{' >> int_ >> '}'; - spirit_test::stationary st { 0 }; - static_assert(x4::X4Attribute); + x4_test::stationary st { 0 }; + static_assert(x4::X4Attribute); REQUIRE(parse("{42}", p[([]{})], st)); CHECK(st.val == 42); diff --git a/test/x4/alternative.cpp b/test/x4/alternative.cpp index 0b86af587..38a16f4d7 100644 --- a/test/x4/alternative.cpp +++ b/test/x4/alternative.cpp @@ -9,19 +9,19 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -62,7 +62,7 @@ TEST_CASE("alternative") using x4::omit; using x4::eps; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(char_ | char_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(char_ | char_); { CHECK(parse("a", char_ | char_)); @@ -251,7 +251,7 @@ TEST_CASE("alternative") // ensure no unneeded synthesization, copying and moving occurred constexpr auto p = '{' >> int_ >> '}'; - spirit_test::stationary st { 0 }; + x4_test::stationary st {0}; REQUIRE(parse("{42}", p | eps | p, st)); CHECK(st.val == 42); } diff --git a/test/x4/and_predicate.cpp b/test/x4/and_predicate.cpp index ef61bb69a..db62bb24e 100644 --- a/test/x4/and_predicate.cpp +++ b/test/x4/and_predicate.cpp @@ -8,14 +8,14 @@ #include "test.hpp" -#include -#include +#include +#include TEST_CASE("and_predicate") { using x4::int_; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(&int_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(&int_); CHECK(parse("1234", &int_).is_partial_match()); CHECK(!parse("abcd", &int_)); diff --git a/test/x4/as.cpp b/test/x4/as.cpp index b660b260d..cec156912 100644 --- a/test/x4/as.cpp +++ b/test/x4/as.cpp @@ -7,18 +7,18 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/test/x4/attr.cpp b/test/x4/attr.cpp index d68750ec3..0a2a0bdf4 100644 --- a/test/x4/attr.cpp +++ b/test/x4/attr.cpp @@ -8,10 +8,10 @@ #include "test.hpp" -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -86,12 +86,12 @@ TEST_CASE("attr") STATIC_CHECK(std::same_as, x4::attr_parser>>); } - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(attr(1)); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(attr("asd")); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(attr(1)); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(attr("asd")); { constexpr char s[] = "asd"; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(attr(s)); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(attr(s)); } { diff --git a/test/x4/attribute.cpp b/test/x4/attribute.cpp index 669bca72f..6e2a2b51b 100644 --- a/test/x4/attribute.cpp +++ b/test/x4/attribute.cpp @@ -7,15 +7,15 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include diff --git a/test/x4/attribute_type_check.cpp b/test/x4/attribute_type_check.cpp index f34992118..429812cb4 100644 --- a/test/x4/attribute_type_check.cpp +++ b/test/x4/attribute_type_check.cpp @@ -8,9 +8,9 @@ #include "test.hpp" -#include -#include -#include +#include +#include +#include #include #include diff --git a/test/x4/bool.cpp b/test/x4/bool.cpp index 3fee4c396..26833807b 100644 --- a/test/x4/bool.cpp +++ b/test/x4/bool.cpp @@ -7,12 +7,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#define BOOST_SPIRIT_X4_UNICODE +#define IRIS_X4_UNICODE #include "test.hpp" -#include -#include +#include +#include #include #include @@ -27,7 +27,7 @@ struct backwards_bool_policies : x4::bool_policies<> parse_false(It& first, Se const& last, Attr& attr, CaseCompare const& case_compare) { using namespace std::string_view_literals; - namespace x4 = boost::spirit::x4; + namespace x4 = iris::x4; if (x4::detail::string_parse("eurt"sv, first, last, unused_container, case_compare)) { x4::move_to(false, attr); // result is false return true; @@ -52,7 +52,7 @@ TEST_CASE("bool") static_assert(x4::detail::BoolPolicy); { - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(bool_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(bool_); CHECK(parse("true", bool_)); CHECK(parse("false", bool_)); @@ -60,8 +60,8 @@ TEST_CASE("bool") } { - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(true_); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(false_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(true_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(false_); CHECK(parse("true", true_)); CHECK(!parse("true", false_)); @@ -93,7 +93,7 @@ TEST_CASE("bool") using backwards_bool_type = x4::bool_parser; constexpr backwards_bool_type backwards_bool{}; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(backwards_bool); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(backwards_bool); CHECK(parse("true", backwards_bool)); CHECK(parse("eurt", backwards_bool)); @@ -126,7 +126,7 @@ TEST_CASE("bool") using bool_test_type = x4::bool_parser; constexpr bool_test_type test_bool{}; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(test_bool); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(test_bool); CHECK(parse("true", test_bool)); CHECK(parse("false", test_bool)); diff --git a/test/x4/char.cpp b/test/x4/char.cpp index 31ca49956..b9bfc3eef 100644 --- a/test/x4/char.cpp +++ b/test/x4/char.cpp @@ -8,15 +8,15 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#define BOOST_SPIRIT_X4_UNICODE +#define IRIS_X4_UNICODE #include "test.hpp" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -66,13 +66,13 @@ TEST_CASE("char") { using namespace x4::standard; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(char_); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(char_('x')); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(char_('a', 'z')); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(~char_('x')); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(~char_('a', 'z')); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(~~char_('x')); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(~~char_('a', 'z')); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(char_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(char_('x')); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(char_('a', 'z')); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(~char_('x')); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(~char_('a', 'z')); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(~~char_('x')); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(~~char_('a', 'z')); CHECK(parse("x", 'x')); CHECK(parse(L"x", L'x')); @@ -109,13 +109,13 @@ TEST_CASE("char") { using namespace x4::standard_wide; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(char_); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(char_(L'x')); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(char_(L'a', L'z')); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(~char_(L'x')); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(~char_(L'a', L'z')); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(~~char_(L'x')); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(~~char_(L'a', L'z')); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(char_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(char_(L'x')); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(char_(L'a', L'z')); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(~char_(L'x')); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(~char_(L'a', L'z')); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(~~char_(L'x')); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(~~char_(L'a', L'z')); CHECK(parse(L"x", char_)); CHECK(parse(L"x", char_(L'x'))); diff --git a/test/x4/char_class.cpp b/test/x4/char_class.cpp index 44b140b60..88035a8dd 100644 --- a/test/x4/char_class.cpp +++ b/test/x4/char_class.cpp @@ -7,14 +7,14 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#define BOOST_SPIRIT_X4_UNICODE +#define IRIS_X4_UNICODE #include "test.hpp" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -40,18 +40,18 @@ TEST_CASE("char_class") { using namespace x4::standard; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(alnum); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(alpha); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(digit); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(xdigit); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(cntrl); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(graph); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(lower); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(print); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(punct); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(space); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(blank); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(upper); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(alnum); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(alpha); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(digit); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(xdigit); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(cntrl); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(graph); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(lower); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(print); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(punct); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(space); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(blank); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(upper); CHECK(parse("1", alnum)); CHECK(!parse(" ", alnum)); CHECK(!parse("1", alpha)); @@ -79,18 +79,18 @@ TEST_CASE("char_class") { using namespace x4::standard_wide; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(alnum); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(alpha); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(digit); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(xdigit); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(cntrl); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(graph); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(lower); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(print); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(punct); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(space); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(blank); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(upper); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(alnum); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(alpha); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(digit); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(xdigit); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(cntrl); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(graph); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(lower); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(print); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(punct); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(space); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(blank); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(upper); CHECK(parse(L"1", alnum)); CHECK(!parse(L" ", alnum)); CHECK(!parse(L"1", alpha)); @@ -117,18 +117,18 @@ TEST_CASE("char_class") { using namespace x4::unicode; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(alnum); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(alpha); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(digit); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(xdigit); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(cntrl); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(graph); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(lower); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(print); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(punct); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(space); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(blank); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(upper); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(alnum); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(alpha); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(digit); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(xdigit); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(cntrl); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(graph); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(lower); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(print); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(punct); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(space); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(blank); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(upper); CHECK(parse(U"1", alnum)); CHECK(!parse(U" ", alnum)); CHECK(!parse(U"1", alpha)); diff --git a/test/x4/container_support.cpp b/test/x4/container_support.cpp index 13a10a079..2573a7a8c 100644 --- a/test/x4/container_support.cpp +++ b/test/x4/container_support.cpp @@ -9,14 +9,14 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -30,7 +30,7 @@ #include #include -namespace x4 = boost::spirit::x4; +namespace x4 = iris::x4; // check if we did not break user defined specializations namespace check_substitute { @@ -42,7 +42,7 @@ template struct is_bar> : std::true_type {}; } // check_substitute -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { using namespace check_substitute; @@ -57,7 +57,7 @@ struct is_substitute : is_substitute {}; -} // boost::spirit::x4::traits +} // iris::x4::traits namespace check_substitute { @@ -77,8 +77,8 @@ constexpr x4::rule string_rule("string"); constexpr auto pair_rule_def = string_rule >> x4::lit('=') >> string_rule; constexpr auto string_rule_def = x4::lexeme[*x4::standard::alnum]; -BOOST_SPIRIT_X4_DEFINE(pair_rule) -BOOST_SPIRIT_X4_DEFINE(string_rule) +IRIS_X4_DEFINE(pair_rule) +IRIS_X4_DEFINE(string_rule) template void test_map_support() diff --git a/test/x4/context.cpp b/test/x4/context.cpp index f5c4c350f..edbdf1965 100644 --- a/test/x4/context.cpp +++ b/test/x4/context.cpp @@ -7,7 +7,7 @@ #include "test.hpp" -#include +#include #include #include diff --git a/test/x4/debug.cpp b/test/x4/debug.cpp index 354a1137f..2049f94be 100644 --- a/test/x4/debug.cpp +++ b/test/x4/debug.cpp @@ -6,20 +6,20 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#define BOOST_SPIRIT_X4_DEBUG +#define IRIS_X4_DEBUG #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include diff --git a/test/x4/difference.cpp b/test/x4/difference.cpp index d248909fc..aa88c3adc 100644 --- a/test/x4/difference.cpp +++ b/test/x4/difference.cpp @@ -8,12 +8,12 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include @@ -24,7 +24,7 @@ TEST_CASE("difference") using x4::lit; using x4::_attr; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(char_ - 'a'); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(char_ - 'a'); // Basic tests { diff --git a/test/x4/eoi.cpp b/test/x4/eoi.cpp index 5638d0bdc..1a6621652 100644 --- a/test/x4/eoi.cpp +++ b/test/x4/eoi.cpp @@ -8,13 +8,13 @@ #include "test.hpp" -#include +#include TEST_CASE("eoi") { using x4::eoi; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(eoi); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(eoi); CHECK(parse("", eoi)); CHECK(!(parse("x", eoi))); diff --git a/test/x4/eol.cpp b/test/x4/eol.cpp index 2a41a09db..3ad5a197e 100644 --- a/test/x4/eol.cpp +++ b/test/x4/eol.cpp @@ -8,13 +8,13 @@ #include "test.hpp" -#include +#include TEST_CASE("eol") { using x4::eol; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(eol); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(eol); CHECK(parse("\r\n", eol)); CHECK(parse("\r", eol)); diff --git a/test/x4/eps.cpp b/test/x4/eps.cpp index c2467258f..c80919429 100644 --- a/test/x4/eps.cpp +++ b/test/x4/eps.cpp @@ -8,15 +8,15 @@ #include "test.hpp" -#include -#include +#include +#include TEST_CASE("eps") { using x4::eps; { - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(eps); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(eps); CHECK(parse("", eps)); CHECK(parse("xxx", eps).is_partial_match()); CHECK(!parse("", !eps)); @@ -24,7 +24,7 @@ TEST_CASE("eps") { // test non-lazy semantic predicate - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(eps(true)); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(eps(true)); CHECK(parse("", eps(true))); CHECK(!parse("", eps(false))); CHECK(parse("", !eps(false))); @@ -35,7 +35,7 @@ TEST_CASE("eps") constexpr auto true_fn = [] { return true; }; constexpr auto false_Fn = [] { return false; }; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(eps(std::true_type{})); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(eps(std::true_type{})); CHECK(parse("", eps(true_fn))); CHECK(!parse("", eps(false_Fn))); CHECK(parse("", !eps(false_Fn))); diff --git a/test/x4/error_handler.cpp b/test/x4/error_handler.cpp index b0abbcc6e..80e6f8f4e 100644 --- a/test/x4/error_handler.cpp +++ b/test/x4/error_handler.cpp @@ -8,14 +8,14 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -42,8 +42,8 @@ x4::rule const test_rule; auto const test_inner_rule_def = x4::lit("bar"); auto const test_rule_def = x4::lit("foo") > test_inner_rule > x4::lit("git"); -BOOST_SPIRIT_X4_DEFINE(test_inner_rule) -BOOST_SPIRIT_X4_DEFINE(test_rule) +IRIS_X4_DEFINE(test_inner_rule) +IRIS_X4_DEFINE(test_rule) void do_parse(std::string const& line_break) { diff --git a/test/x4/expect.cpp b/test/x4/expect.cpp index 7eefe542a..107319339 100644 --- a/test/x4/expect.cpp +++ b/test/x4/expect.cpp @@ -14,38 +14,38 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -315,8 +315,8 @@ TEST_CASE("expect") using boost::fusion::vector; using boost::fusion::at_c; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(expect['x']); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(char_ > char_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(expect['x']); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(char_ > char_); { TEST_SUCCESS_PASS("aa", char_ >> expect[char_]); @@ -346,7 +346,7 @@ TEST_CASE("expect") } { - #ifndef BOOST_SPIRIT_X4_NO_RTTI + #ifndef IRIS_X4_NO_RTTI TEST_FAILURE("ay:a", char_ > char_('x') >> ':' > 'a', { CHECK(x.which().find("sequence") != std::string::npos); diff --git a/test/x4/extract_int.cpp b/test/x4/extract_int.cpp index 984c581d1..465bfecd0 100644 --- a/test/x4/extract_int.cpp +++ b/test/x4/extract_int.cpp @@ -8,7 +8,7 @@ #include "test.hpp" -#include +#include #include diff --git a/test/x4/grammar.cpp b/test/x4/grammar.cpp index 5cd2f424b..aa8120f50 100644 --- a/test/x4/grammar.cpp +++ b/test/x4/grammar.cpp @@ -9,12 +9,12 @@ #include "grammar.hpp" -#include +#include constexpr auto grammar_def = x4::int_; -BOOST_SPIRIT_X4_DEFINE(grammar) -BOOST_SPIRIT_X4_INSTANTIATE( +IRIS_X4_DEFINE(grammar) +IRIS_X4_INSTANTIATE( grammar_type, std::string_view::const_iterator, x4::parse_context_for diff --git a/test/x4/grammar.hpp b/test/x4/grammar.hpp index f44716053..5965f2b71 100644 --- a/test/x4/grammar.hpp +++ b/test/x4/grammar.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_TEST_X4_GRAMMAR_HPP -#define BOOST_SPIRIT_X4_TEST_X4_GRAMMAR_HPP +#ifndef IRIS_X4_TEST_X4_GRAMMAR_HPP +#define IRIS_X4_TEST_X4_GRAMMAR_HPP /*============================================================================= Copyright (c) 2019 Joel de Guzman @@ -12,12 +12,12 @@ #include "test.hpp" -#include +#include -namespace x4 = boost::spirit::x4; +namespace x4 = iris::x4; x4::rule const grammar; using grammar_type = decltype(grammar); -BOOST_SPIRIT_X4_DECLARE(grammar_type) +IRIS_X4_DECLARE(grammar_type) #endif diff --git a/test/x4/int.cpp b/test/x4/int.cpp index d553442ce..1d9e0eb7c 100644 --- a/test/x4/int.cpp +++ b/test/x4/int.cpp @@ -10,8 +10,8 @@ #include "test.hpp" -#include -#include +#include +#include #include #include @@ -76,11 +76,11 @@ TEST_CASE("int") using x4::_attr; using x4::int_parser; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(int8); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(short_); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(int_); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(long_); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(long_long); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(int8); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(short_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(int_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(long_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(long_long); // signed integer tests { @@ -199,7 +199,7 @@ TEST_CASE("int") // int_parser tests { constexpr int_parser any_int{}; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(any_int); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(any_int); CHECK(parse("123456", any_int)); CHECK(parse("-123456", any_int)); diff --git a/test/x4/iterator.cpp b/test/x4/iterator.cpp index 44636dc8d..10b611712 100644 --- a/test/x4/iterator.cpp +++ b/test/x4/iterator.cpp @@ -7,45 +7,45 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#define BOOST_SPIRIT_X4_UNICODE +#define IRIS_X4_UNICODE #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/test/x4/kleene.cpp b/test/x4/kleene.cpp index 762f8b378..9592e4cb7 100644 --- a/test/x4/kleene.cpp +++ b/test/x4/kleene.cpp @@ -8,19 +8,19 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include struct x_attr {}; -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { template<> struct container_value @@ -49,7 +49,7 @@ TEST_CASE("kleene") using x4::int_; using x4::lexeme; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(*char_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(*char_); CHECK(parse("aaaaaaaa", *char_)); CHECK(parse("a", *char_)); @@ -130,16 +130,13 @@ TEST_CASE("kleene") } { - // attribute customization - x_attr x; (void)parse("abcde", *char_, x); } { - // test move only types - std::vector v; - REQUIRE(parse("sss", *spirit_test::synth_move_only, v)); + std::vector v; + REQUIRE(parse("sss", *x4_test::synth_move_only, v)); CHECK(v.size() == 3); } } diff --git a/test/x4/lexeme.cpp b/test/x4/lexeme.cpp index 35614c6fd..dc9154393 100644 --- a/test/x4/lexeme.cpp +++ b/test/x4/lexeme.cpp @@ -8,11 +8,11 @@ #include "test.hpp" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include TEST_CASE("lexeme") { @@ -21,7 +21,7 @@ TEST_CASE("lexeme") using x4::lexeme; using x4::rule; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(lexeme['x']); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(lexeme['x']); CHECK(parse(" 1 2 3 4 5", +digit, space)); CHECK(!parse(" 1 2 3 4 5", lexeme[+digit], space)); diff --git a/test/x4/list.cpp b/test/x4/list.cpp index 068767e23..4c7e858a9 100644 --- a/test/x4/list.cpp +++ b/test/x4/list.cpp @@ -8,14 +8,14 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -30,7 +30,7 @@ TEST_CASE("list") using x4::omit; using x4::_attr; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(char_ % ','); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(char_ % ','); CHECK(parse("a,b,c,d,e,f,g,h", char_ % ',')); CHECK(parse("a,b,c,d,e,f,g,h,", char_ % ',').is_partial_match()); @@ -119,8 +119,8 @@ TEST_CASE("list") { // test move only types - std::vector v; - REQUIRE(parse("s.s.s.s", spirit_test::synth_move_only % '.', v)); + std::vector v; + REQUIRE(parse("s.s.s.s", x4_test::synth_move_only % '.', v)); CHECK(v.size() == 4); } } diff --git a/test/x4/lit.cpp b/test/x4/lit.cpp index b37906c2e..001717caf 100644 --- a/test/x4/lit.cpp +++ b/test/x4/lit.cpp @@ -7,13 +7,13 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#define BOOST_SPIRIT_X4_UNICODE +#define IRIS_X4_UNICODE #include "test.hpp" -#include -#include -#include +#include +#include +#include #include #include diff --git a/test/x4/matches.cpp b/test/x4/matches.cpp index 2321f3619..0f1037070 100644 --- a/test/x4/matches.cpp +++ b/test/x4/matches.cpp @@ -9,15 +9,15 @@ #include "test.hpp" -#include -#include +#include +#include TEST_CASE("matches") { using x4::matches; using x4::char_; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(matches['x']); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(matches['x']); { CHECK(parse("x", matches[char_])); diff --git a/test/x4/no_case.cpp b/test/x4/no_case.cpp index c12f8b832..d4af912a6 100644 --- a/test/x4/no_case.cpp +++ b/test/x4/no_case.cpp @@ -8,16 +8,16 @@ #include "test.hpp" -#include -#include -#include -#include +#include +#include +#include +#include TEST_CASE("no_case") { using x4::no_case; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(no_case['x']); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(no_case['x']); { using namespace x4::standard; diff --git a/test/x4/no_skip.cpp b/test/x4/no_skip.cpp index fb9c09f25..de9a1ce41 100644 --- a/test/x4/no_skip.cpp +++ b/test/x4/no_skip.cpp @@ -9,13 +9,13 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include TEST_CASE("no_skip") { @@ -24,7 +24,7 @@ TEST_CASE("no_skip") using x4::lexeme; using x4::no_skip; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(no_skip['x']); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(no_skip['x']); // without skipping no_skip is equivalent to lexeme { diff --git a/test/x4/not_predicate.cpp b/test/x4/not_predicate.cpp index 18e2d7ca6..8832ce46d 100644 --- a/test/x4/not_predicate.cpp +++ b/test/x4/not_predicate.cpp @@ -8,14 +8,14 @@ #include "test.hpp" -#include -#include +#include +#include TEST_CASE("not_predicate") { using x4::int_; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(!int_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(!int_); CHECK(!parse("1234", !int_)); CHECK(parse("abcd", !int_).is_partial_match()); diff --git a/test/x4/omit.cpp b/test/x4/omit.cpp index 773925761..efda3f60f 100644 --- a/test/x4/omit.cpp +++ b/test/x4/omit.cpp @@ -8,13 +8,13 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -31,8 +31,8 @@ constexpr rule indirect_rule = "indirect_rule"; constexpr auto direct_rule_def = x4::int_; constexpr auto indirect_rule_def = direct_rule; -BOOST_SPIRIT_X4_DEFINE(direct_rule) -BOOST_SPIRIT_X4_DEFINE(indirect_rule) +IRIS_X4_DEFINE(direct_rule) +IRIS_X4_DEFINE(indirect_rule) } // anonymous @@ -46,7 +46,7 @@ TEST_CASE("omit") using boost::fusion::vector; using boost::fusion::at_c; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(omit['x']); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(omit['x']); CHECK(parse("a", omit['a'])); diff --git a/test/x4/optional.cpp b/test/x4/optional.cpp index fe526351d..f0d8e60c6 100644 --- a/test/x4/optional.cpp +++ b/test/x4/optional.cpp @@ -8,14 +8,14 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -63,7 +63,7 @@ TEST_CASE("optional") using x4::standard::char_; using x4::_attr; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(-int_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(-int_); CHECK(parse("1234", -int_)); CHECK(parse("abcd", -int_).is_partial_match()); @@ -185,8 +185,8 @@ TEST_CASE("optional") { // test move only types - std::optional o; - REQUIRE(parse("s", -spirit_test::synth_move_only, o)); + std::optional o; + REQUIRE(parse("s", -x4_test::synth_move_only, o)); CHECK(o.has_value()); } } diff --git a/test/x4/parser.cpp b/test/x4/parser.cpp index 6e1d6776e..5b24c522e 100644 --- a/test/x4/parser.cpp +++ b/test/x4/parser.cpp @@ -7,9 +7,9 @@ #include "test.hpp" -#include -#include -#include +#include +#include +#include #include #include diff --git a/test/x4/plus.cpp b/test/x4/plus.cpp index 59acb7e8d..39e343675 100644 --- a/test/x4/plus.cpp +++ b/test/x4/plus.cpp @@ -8,14 +8,14 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -25,7 +25,7 @@ struct x_attr {}; -namespace boost::spirit::x4::traits { +namespace iris::x4::traits { template<> struct container_value @@ -58,7 +58,7 @@ TEST_CASE("plus") using x4::lexeme; using x4::_attr; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(+char_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(+char_); CHECK(parse("aaaaaaaa", +char_)); CHECK(parse("a", +char_)); @@ -142,8 +142,8 @@ TEST_CASE("plus") { // test move only types - std::vector v; - REQUIRE(parse("sss", +spirit_test::synth_move_only, v)); + std::vector v; + REQUIRE(parse("sss", +x4_test::synth_move_only, v)); CHECK(v.size() == 3); } } diff --git a/test/x4/raw.cpp b/test/x4/raw.cpp index c44de6630..8c74f4339 100644 --- a/test/x4/raw.cpp +++ b/test/x4/raw.cpp @@ -8,16 +8,16 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -35,8 +35,8 @@ rule indirect_rule = "indirect_rule"; auto const direct_rule_def = x4::int_; auto const indirect_rule_def = direct_rule; -BOOST_SPIRIT_X4_DEFINE(direct_rule) -BOOST_SPIRIT_X4_DEFINE(indirect_rule) +IRIS_X4_DEFINE(direct_rule) +IRIS_X4_DEFINE(indirect_rule) } // anonymous @@ -50,7 +50,7 @@ TEST_CASE("raw") using x4::int_; using x4::char_; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(raw['x']); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(raw['x']); { std::ranges::subrange range; diff --git a/test/x4/real.hpp b/test/x4/real.hpp index 4dcfcee6e..9099bd21b 100644 --- a/test/x4/real.hpp +++ b/test/x4/real.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_TEST_X4_REAL_HPP -#define BOOST_SPIRIT_X4_TEST_X4_REAL_HPP +#ifndef IRIS_X4_TEST_X4_REAL_HPP +#define IRIS_X4_TEST_X4_REAL_HPP /*============================================================================= Copyright (c) 2001-2010 Joel de Guzman @@ -12,9 +12,9 @@ #include "test.hpp" -#include -#include -#include +#include +#include +#include #include #include diff --git a/test/x4/real1.cpp b/test/x4/real1.cpp index 6569351bc..a54d78e26 100644 --- a/test/x4/real1.cpp +++ b/test/x4/real1.cpp @@ -10,9 +10,9 @@ #include "real.hpp" -#include -#include -#include +#include +#include +#include TEST_CASE("real1") { @@ -52,7 +52,7 @@ TEST_CASE("real1") constexpr real_parser> udouble; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(udouble); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(udouble); { double d = 0; diff --git a/test/x4/real2.cpp b/test/x4/real2.cpp index 581cdff0e..f4165dfdc 100644 --- a/test/x4/real2.cpp +++ b/test/x4/real2.cpp @@ -62,9 +62,9 @@ TEST_CASE("real2") { using x4::double_; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(x4::float_); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(x4::double_); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(x4::long_double); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(x4::float_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(x4::double_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(x4::long_double); // signed real number tests basic_real_parser_test(x4::float_); diff --git a/test/x4/real3.cpp b/test/x4/real3.cpp index a7f38512d..5be7abfa0 100644 --- a/test/x4/real3.cpp +++ b/test/x4/real3.cpp @@ -20,8 +20,8 @@ TEST_CASE("real3") constexpr real_parser> strict_udouble; constexpr real_parser> strict_double; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(strict_udouble); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(strict_double); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(strict_udouble); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(strict_double); CHECK(!parse("1234", strict_udouble)); { @@ -60,8 +60,8 @@ TEST_CASE("real3") constexpr real_parser> notrdot_real; constexpr real_parser> nolddot_real; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(notrdot_real); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(nolddot_real); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(notrdot_real); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(nolddot_real); CHECK(!parse("1234.", notrdot_real)); // Bad trailing dot CHECK(!parse(".1234", nolddot_real)); // Bad leading dot @@ -73,7 +73,7 @@ TEST_CASE("real3") using x4::real_parser; constexpr real_parser> ts_real; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(ts_real); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(ts_real); CHECK(parse("123.01", ts_real)); { diff --git a/test/x4/repeat.cpp b/test/x4/repeat.cpp index 50e3e0511..f24d4c362 100644 --- a/test/x4/repeat.cpp +++ b/test/x4/repeat.cpp @@ -8,15 +8,15 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -31,10 +31,10 @@ TEST_CASE("repeat") using x4::lexeme; using x4::char_; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(*x4::lit('x')); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(repeat(3)['x']); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(repeat(3, 5)['x']); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(repeat(3, repeat_inf)['x']); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(*x4::lit('x')); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(repeat(3)['x']); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(repeat(3, 5)['x']); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(repeat(3, repeat_inf)['x']); { CHECK(parse("aaaaaaaa", *char_)); @@ -175,8 +175,8 @@ TEST_CASE("repeat") { // test move only types - std::vector v; - REQUIRE(parse("sss", repeat(3)[spirit_test::synth_move_only], v)); + std::vector v; + REQUIRE(parse("sss", repeat(3)[x4_test::synth_move_only], v)); CHECK(v.size() == 3); } } diff --git a/test/x4/rule1.cpp b/test/x4/rule1.cpp index debd32b9b..b99cc00d8 100644 --- a/test/x4/rule1.cpp +++ b/test/x4/rule1.cpp @@ -8,13 +8,13 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include TEST_CASE("rule1") { @@ -25,11 +25,11 @@ TEST_CASE("rule1") using x4::phrase_parse; using x4::root_skipper_flag; -#ifdef BOOST_SPIRIT_X4_NO_RTTI - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(rule{}); +#ifdef IRIS_X4_NO_RTTI + IRIS_X4_ASSERT_CONSTEXPR_CTORS(rule{}); #endif - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(rule{"r"}); - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(rule{"r"} = 'x'); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(rule{"r"}); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(rule{"r"} = 'x'); // check attribute advertising static_assert( x4::has_attribute_v>); diff --git a/test/x4/rule2.cpp b/test/x4/rule2.cpp index 76429cf39..d4dbf2627 100644 --- a/test/x4/rule2.cpp +++ b/test/x4/rule2.cpp @@ -8,11 +8,11 @@ #include "test.hpp" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/test/x4/rule3.cpp b/test/x4/rule3.cpp index 1fe5dac17..f154e4849 100644 --- a/test/x4/rule3.cpp +++ b/test/x4/rule3.cpp @@ -8,15 +8,15 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -34,14 +34,14 @@ namespace check_stationary { -x4::rule const a; -x4::rule const b; +x4::rule const a; +x4::rule const b; auto const a_def = '{' >> x4::int_ >> '}'; auto const b_def = a; -BOOST_SPIRIT_X4_DEFINE(a) -BOOST_SPIRIT_X4_DEFINE(b) +IRIS_X4_DEFINE(a) +IRIS_X4_DEFINE(b) } // check_stationary @@ -56,7 +56,7 @@ x4::rule const grammar; auto const grammar_def = '[' >> grammar % ',' >> ']' | x4::int_; -BOOST_SPIRIT_X4_DEFINE(grammar) +IRIS_X4_DEFINE(grammar) } // check_recursive @@ -84,9 +84,9 @@ using iterator_type = std::string_view::const_iterator; x4::rule const grammar; auto const grammar_def = x4::int_ >> ('{' >> grammar % ',' >> '}' | x4::eps); -BOOST_SPIRIT_X4_DEFINE(grammar) +IRIS_X4_DEFINE(grammar) -BOOST_SPIRIT_X4_INSTANTIATE(decltype(grammar), iterator_type, x4::parse_context_for) +IRIS_X4_INSTANTIATE(decltype(grammar), iterator_type, x4::parse_context_for) } // check_recursive_tuple @@ -138,7 +138,7 @@ TEST_CASE("rule3") // ensure no unneeded synthesization, copying and moving occurred { - spirit_test::stationary st { 0 }; + x4_test::stationary st { 0 }; REQUIRE(parse("{42}", check_stationary::b, st)); CHECK(st.val == 42); } diff --git a/test/x4/rule4.cpp b/test/x4/rule4.cpp index 58615450b..bbe119261 100644 --- a/test/x4/rule4.cpp +++ b/test/x4/rule4.cpp @@ -8,12 +8,12 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/test/x4/rule_separate_tu.cpp b/test/x4/rule_separate_tu.cpp index e30b3c35e..cf337813e 100644 --- a/test/x4/rule_separate_tu.cpp +++ b/test/x4/rule_separate_tu.cpp @@ -20,19 +20,19 @@ constexpr auto nop = [](auto const&) {}; constexpr x4::rule used_attr1 = "used_attr1"; constexpr auto used_attr1_def = used_attr::grammar[nop]; -BOOST_SPIRIT_X4_DEFINE(used_attr1); +IRIS_X4_DEFINE(used_attr1); constexpr x4::rule used_attr2 = "used_attr2"; constexpr auto used_attr2_def = unused_attr::grammar[nop]; -BOOST_SPIRIT_X4_DEFINE(used_attr2); +IRIS_X4_DEFINE(used_attr2); constexpr x4::rule unused_attr1 = "unused_attr1"; constexpr auto unused_attr1_def = used_attr::grammar[nop]; -BOOST_SPIRIT_X4_DEFINE(unused_attr1); +IRIS_X4_DEFINE(unused_attr1); constexpr x4::rule unused_attr2 = "unused_attr2"; constexpr auto unused_attr2_def = unused_attr::grammar[nop]; -BOOST_SPIRIT_X4_DEFINE(unused_attr2); +IRIS_X4_DEFINE(unused_attr2); } // sem_act diff --git a/test/x4/rule_separate_tu_grammar.cpp b/test/x4/rule_separate_tu_grammar.cpp index c6569330a..7c118704f 100644 --- a/test/x4/rule_separate_tu_grammar.cpp +++ b/test/x4/rule_separate_tu_grammar.cpp @@ -8,29 +8,29 @@ #include "rule_separate_tu_grammar.hpp" -#include -#include -#include -#include +#include +#include +#include +#include namespace unused_attr { using iterator_type = std::string_view::const_iterator; constexpr auto skipper_def = x4::standard::lit('*'); -BOOST_SPIRIT_X4_DEFINE(skipper) -BOOST_SPIRIT_X4_INSTANTIATE(skipper_type, iterator_type, x4::parse_context_for) +IRIS_X4_DEFINE(skipper) +IRIS_X4_INSTANTIATE(skipper_type, iterator_type, x4::parse_context_for) constexpr auto skipper2_def = x4::standard::lit('#'); -BOOST_SPIRIT_X4_DEFINE(skipper2) -BOOST_SPIRIT_X4_INSTANTIATE(skipper2_type, iterator_type, x4::parse_context_for) +IRIS_X4_DEFINE(skipper2) +IRIS_X4_INSTANTIATE(skipper2_type, iterator_type, x4::parse_context_for) constexpr auto grammar_def = *x4::standard::lit('='); -BOOST_SPIRIT_X4_DEFINE(grammar) +IRIS_X4_DEFINE(grammar) -BOOST_SPIRIT_X4_INSTANTIATE(grammar_type, iterator_type, x4::parse_context_for) -BOOST_SPIRIT_X4_INSTANTIATE(grammar_type, iterator_type, x4::phrase_parse_context_for) -BOOST_SPIRIT_X4_INSTANTIATE(grammar_type, iterator_type, x4::phrase_parse_context_for) +IRIS_X4_INSTANTIATE(grammar_type, iterator_type, x4::parse_context_for) +IRIS_X4_INSTANTIATE(grammar_type, iterator_type, x4::phrase_parse_context_for) +IRIS_X4_INSTANTIATE(grammar_type, iterator_type, x4::phrase_parse_context_for) } // unused_attr @@ -39,13 +39,13 @@ namespace used_attr { using iterator_type = std::string_view::const_iterator; constexpr auto skipper_def = x4::standard::space; -BOOST_SPIRIT_X4_DEFINE(skipper) -BOOST_SPIRIT_X4_INSTANTIATE(skipper_type, iterator_type, x4::parse_context_for) +IRIS_X4_DEFINE(skipper) +IRIS_X4_INSTANTIATE(skipper_type, iterator_type, x4::parse_context_for) constexpr auto grammar_def = x4::int_; -BOOST_SPIRIT_X4_DEFINE(grammar) -BOOST_SPIRIT_X4_INSTANTIATE(grammar_type, iterator_type, x4::parse_context_for) +IRIS_X4_DEFINE(grammar) +IRIS_X4_INSTANTIATE(grammar_type, iterator_type, x4::parse_context_for) -BOOST_SPIRIT_X4_INSTANTIATE(grammar_type, iterator_type, x4::phrase_parse_context_for) +IRIS_X4_INSTANTIATE(grammar_type, iterator_type, x4::phrase_parse_context_for) } // used_attr diff --git a/test/x4/rule_separate_tu_grammar.hpp b/test/x4/rule_separate_tu_grammar.hpp index a361e9081..1bae89922 100644 --- a/test/x4/rule_separate_tu_grammar.hpp +++ b/test/x4/rule_separate_tu_grammar.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_TEST_X4_RULE_SEPARATE_TU_GRAMMAR_HPP -#define BOOST_SPIRIT_X4_TEST_X4_RULE_SEPARATE_TU_GRAMMAR_HPP +#ifndef IRIS_X4_TEST_X4_RULE_SEPARATE_TU_GRAMMAR_HPP +#define IRIS_X4_TEST_X4_RULE_SEPARATE_TU_GRAMMAR_HPP /*============================================================================= Copyright (c) 2019 Nikita Kniazev @@ -11,9 +11,9 @@ #include "test.hpp" -#include +#include -// Check that `BOOST_SPIRIT_X4_INSTANTIATE` instantiates `parse_rule` with proper +// Check that `IRIS_X4_INSTANTIATE` instantiates `parse_rule` with proper // types when the rule has no attribute. namespace unused_attr { @@ -21,17 +21,17 @@ namespace unused_attr { // skipper must have no attribute, check `parse` and `skip_over` using skipper_type = x4::rule; constexpr skipper_type skipper = "skipper"; -BOOST_SPIRIT_X4_DECLARE(skipper_type) +IRIS_X4_DECLARE(skipper_type) // the `unused_type const` must have the same effect as no attribute using skipper2_type = x4::rule; constexpr skipper2_type skipper2 = "skipper2"; -BOOST_SPIRIT_X4_DECLARE(skipper2_type) +IRIS_X4_DECLARE(skipper2_type) // grammar must have no attribute, check `parse` and `phrase_parse` using grammar_type = x4::rule; constexpr grammar_type grammar = "grammar"; -BOOST_SPIRIT_X4_DECLARE(grammar_type) +IRIS_X4_DECLARE(grammar_type) } // unused_attr @@ -41,11 +41,11 @@ namespace used_attr { using skipper_type = x4::rule; constexpr skipper_type skipper = "skipper"; -BOOST_SPIRIT_X4_DECLARE(skipper_type) +IRIS_X4_DECLARE(skipper_type) using grammar_type = x4::rule; constexpr grammar_type grammar = "grammar"; -BOOST_SPIRIT_X4_DECLARE(grammar_type) +IRIS_X4_DECLARE(grammar_type) } // used_attr diff --git a/test/x4/seek.cpp b/test/x4/seek.cpp index 23f73f6e1..9cc1807bb 100644 --- a/test/x4/seek.cpp +++ b/test/x4/seek.cpp @@ -9,20 +9,20 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include TEST_CASE("seek") { - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(x4::seek['x']); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(x4::seek['x']); // test eoi CHECK(parse("", x4::seek[x4::eoi])); diff --git a/test/x4/sequence.cpp b/test/x4/sequence.cpp index eaa775d1e..ba65c6c18 100644 --- a/test/x4/sequence.cpp +++ b/test/x4/sequence.cpp @@ -8,22 +8,22 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -57,7 +57,7 @@ TEST_CASE("sequence") using boost::fusion::deque; using boost::fusion::at_c; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(char_ >> char_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(char_ >> char_); CHECK(parse("aa", char_ >> char_)); CHECK(parse("aa", char_ >> 'a')); @@ -439,9 +439,8 @@ TEST_CASE("sequence") } { - // Test move only type + using T = std::vector; - using T = std::vector; STATIC_CHECK(requires(T& c) { typename T::value_type; }); @@ -474,11 +473,11 @@ TEST_CASE("sequence") traits::clear(c); }); - STATIC_CHECK(traits::is_container_v>); - STATIC_CHECK(traits::CategorizedAttr, x4::traits::container_attr>); + STATIC_CHECK(traits::is_container_v>); + STATIC_CHECK(traits::CategorizedAttr, x4::traits::container_attr>); - std::vector v; - REQUIRE(parse("ssszs", *spirit_test::synth_move_only >> 'z' >> spirit_test::synth_move_only, v)); + std::vector v; + REQUIRE(parse("ssszs", *x4_test::synth_move_only >> 'z' >> x4_test::synth_move_only, v)); CHECK(v.size() == 4); } } diff --git a/test/x4/skip.cpp b/test/x4/skip.cpp index 1e3454330..d0b232f3e 100644 --- a/test/x4/skip.cpp +++ b/test/x4/skip.cpp @@ -9,12 +9,12 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include TEST_CASE("skip") { @@ -26,7 +26,7 @@ TEST_CASE("skip") using x4::reskip; using x4::lit; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(skip('x')['y']); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(skip('x')['y']); CHECK(parse("a b c d", skip(space)[*char_])); diff --git a/test/x4/symbols1.cpp b/test/x4/symbols1.cpp index 508dab717..1df8e4b0d 100644 --- a/test/x4/symbols1.cpp +++ b/test/x4/symbols1.cpp @@ -8,10 +8,10 @@ #include "test.hpp" -#include -#include -#include -#include +#include +#include +#include +#include namespace { diff --git a/test/x4/symbols2.cpp b/test/x4/symbols2.cpp index d6d1c1532..d503395d5 100644 --- a/test/x4/symbols2.cpp +++ b/test/x4/symbols2.cpp @@ -8,8 +8,8 @@ #include "test.hpp" -#include -#include +#include +#include TEST_CASE("symbols2") { diff --git a/test/x4/symbols3.cpp b/test/x4/symbols3.cpp index 0d505579c..67c9ed5e5 100644 --- a/test/x4/symbols3.cpp +++ b/test/x4/symbols3.cpp @@ -7,15 +7,15 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#define BOOST_SPIRIT_X4_DEBUG -#define BOOST_SPIRIT_X4_UNICODE +#define IRIS_X4_DEBUG +#define IRIS_X4_UNICODE #include "test.hpp" -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/test/x4/test.hpp b/test/x4/test.hpp index 502e1de20..d9865cd5c 100644 --- a/test/x4/test.hpp +++ b/test/x4/test.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SPIRIT_X4_TEST_X4_TEST_HPP -#define BOOST_SPIRIT_X4_TEST_X4_TEST_HPP +#ifndef IRIS_X4_TEST_X4_TEST_HPP +#define IRIS_X4_TEST_X4_TEST_HPP /*============================================================================= Copyright (c) 2001-2013 Joel de Guzman @@ -10,12 +10,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include -#include -#include -#include +#include +#include +#include +#include -#if BOOST_SPIRIT_CI_IS_B2 +#if IRIS_CI_IS_B2 # include "catch_amalgamated.hpp" #else # include @@ -27,15 +27,14 @@ #include #include -namespace spirit = boost::spirit; -namespace x4 = spirit::x4; +namespace x4 = iris::x4; using x4::unused_type; using x4::unused; using x4::unused_container_type; using x4::unused_container; -namespace spirit_test { +namespace x4_test { namespace detail { @@ -178,11 +177,11 @@ constexpr synth_parser synth{}; constexpr synth_parser synth_move_only{}; -} // spirit_test +} // x4_test -using spirit_test::parse; +using x4_test::parse; -#define BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(...) \ - static_assert(::spirit_test::test_constexpr_copy_move_ctors(__VA_ARGS__)) +#define IRIS_X4_ASSERT_CONSTEXPR_CTORS(...) \ + static_assert(::x4_test::test_constexpr_copy_move_ctors(__VA_ARGS__)) #endif diff --git a/test/x4/to_utf8.cpp b/test/x4/to_utf8.cpp index 7267631ca..1191cc159 100644 --- a/test/x4/to_utf8.cpp +++ b/test/x4/to_utf8.cpp @@ -8,7 +8,7 @@ #include "test.hpp" -#include +#include #include diff --git a/test/x4/tst.cpp b/test/x4/tst.cpp index fa558c79a..78224e702 100644 --- a/test/x4/tst.cpp +++ b/test/x4/tst.cpp @@ -8,11 +8,11 @@ #include "test.hpp" -#include -#include +#include +#include -#include -#include +#include +#include #include #include diff --git a/test/x4/uint.cpp b/test/x4/uint.cpp index 83409d0ec..33530e332 100644 --- a/test/x4/uint.cpp +++ b/test/x4/uint.cpp @@ -10,8 +10,8 @@ #include "test.hpp" -#include -#include +#include +#include #include @@ -62,7 +62,7 @@ TEST_CASE("uint") using x4::uint_; unsigned u = 0; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(uint_); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(uint_); CHECK(parse("123456", uint_)); REQUIRE(parse("123456", uint_, u)); @@ -81,7 +81,7 @@ TEST_CASE("uint") using x4::bin; unsigned u = 0; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(bin); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(bin); CHECK(parse("11111110", bin)); REQUIRE(parse("11111110", bin, u)); @@ -100,7 +100,7 @@ TEST_CASE("uint") using x4::oct; unsigned u = 0; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(oct); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(oct); CHECK(parse("12545674515", oct)); REQUIRE(parse("12545674515", oct, u)); @@ -119,7 +119,7 @@ TEST_CASE("uint") using x4::hex; unsigned u = 0; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(hex); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(hex); CHECK(parse("95BC8DF", hex)); REQUIRE(parse("95BC8DF", hex, u)); @@ -143,7 +143,7 @@ TEST_CASE("uint") { constexpr uint_parser uint3{}; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(uint3); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(uint3); CHECK(parse("123456", uint3).is_partial_match()); @@ -153,7 +153,7 @@ TEST_CASE("uint") } { constexpr uint_parser uint4{}; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(uint4); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(uint4); CHECK(parse("123456", uint4).is_partial_match()); @@ -176,7 +176,7 @@ TEST_CASE("uint") } constexpr uint_parser uint_exact4{}; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(uint_exact4); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(uint_exact4); { unsigned u = 1; diff --git a/test/x4/uint_radix.cpp b/test/x4/uint_radix.cpp index 064c10aa5..c73c101b3 100644 --- a/test/x4/uint_radix.cpp +++ b/test/x4/uint_radix.cpp @@ -8,7 +8,7 @@ #include "test.hpp" -#include +#include #include diff --git a/test/x4/unused.cpp b/test/x4/unused.cpp index 1477ba5e2..46d45cced 100644 --- a/test/x4/unused.cpp +++ b/test/x4/unused.cpp @@ -8,10 +8,10 @@ #include "test.hpp" -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/test/x4/with.cpp b/test/x4/with.cpp index fc01d27ca..8ac6236dd 100644 --- a/test/x4/with.cpp +++ b/test/x4/with.cpp @@ -8,12 +8,12 @@ #include "test.hpp" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -59,11 +59,11 @@ constexpr auto value_equals = int_[([](auto&& ctx) { TEST_CASE("with") { - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(with(0)['x']); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(with(0)['x']); { constexpr int i = 0; - BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(with(i)['x']); + IRIS_X4_ASSERT_CONSTEXPR_CTORS(with(i)['x']); } // check various value categories @@ -108,11 +108,11 @@ TEST_CASE("with") // lvalue `move_only` { - spirit_test::move_only mo; + x4_test::move_only mo; (void)with(mo)[int_]; } { - spirit_test::move_only mo; + x4_test::move_only mo; auto with_gen = with(mo); // passed-by-reference (void)with_gen[int_]; // permitted, never copies (void)std::move(with_gen)[int_]; @@ -120,10 +120,10 @@ TEST_CASE("with") // rvalue `move_only` { - (void)with(spirit_test::move_only{})[int_]; + (void)with(x4_test::move_only{})[int_]; } { - auto with_gen = with(spirit_test::move_only{}); + auto with_gen = with(x4_test::move_only{}); // (void)with_gen[int_]; // requires copy-constructible (void)std::move(with_gen)[int_]; } diff --git a/test/x4/with_local.cpp b/test/x4/with_local.cpp index 14b3f60b0..219d6eaa5 100644 --- a/test/x4/with_local.cpp +++ b/test/x4/with_local.cpp @@ -7,11 +7,11 @@ #include "test.hpp" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/test/x4/x3_rule_problem.cpp b/test/x4/x3_rule_problem.cpp index 0ce8bcd9c..d8c51b5a5 100644 --- a/test/x4/x3_rule_problem.cpp +++ b/test/x4/x3_rule_problem.cpp @@ -7,7 +7,7 @@ #include "test.hpp" -#include +#include #include #include