-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
106 changed files
with
778 additions
and
682 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright (c) 2022-2023 Dr. Colin Hirsch and Daniel Frey | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#ifndef TAO_PEGTL_ENUMS_HPP | ||
#define TAO_PEGTL_ENUMS_HPP | ||
|
||
#include "config.hpp" | ||
|
||
#include "internal/endian.hpp" | ||
#include "internal/peek_endian.hpp" | ||
#include "internal/result_on_found.hpp" | ||
#include "internal/rules.hpp" | ||
|
||
namespace TAO_PEGTL_NAMESPACE | ||
{ | ||
namespace enums_be | ||
{ | ||
// clang-format off | ||
template< auto E, decltype( E )... Es > struct not_one : internal::one< internal::result_on_found::failure, internal::peek_endian< decltype( E ), internal::big_endian >, E, Es... > {}; | ||
template< auto Lo, decltype( Lo ) Hi > struct not_range : internal::range< internal::result_on_found::failure, internal::peek_endian< decltype( Lo ), internal::big_endian >, Lo, Hi > {}; | ||
template< auto E, decltype( E )... Es > struct one : internal::one< internal::result_on_found::success, internal::peek_endian< decltype( E ), internal::big_endian >, E, Es... > {}; | ||
template< auto Lo, decltype( Lo ) Hi > struct range : internal::range< internal::result_on_found::success, internal::peek_endian< decltype( Lo ), internal::big_endian >, Lo, Hi > {}; | ||
template< auto E, decltype( E )... Es > struct ranges : internal::ranges< internal::peek_endian< decltype( E ), internal::big_endian >, E, Es... > {}; | ||
template< auto E, decltype( E )... Es > struct string : internal::seq< internal::one< internal::result_on_found::success, internal::peek_endian< decltype( E ), internal::big_endian >, E >, internal::one< internal::result_on_found::success, internal::peek_endian< decltype( E ), internal::big_endian >, Es >... > {}; | ||
// clang-format on | ||
|
||
} // namespace enums_be | ||
|
||
namespace enums_le | ||
{ | ||
// clang-format off | ||
template< auto E, decltype( E )... Es > struct not_one : internal::one< internal::result_on_found::failure, internal::peek_endian< decltype( E ), internal::little_endian >, E, Es... > {}; | ||
template< auto Lo, decltype( Lo ) Hi > struct not_range : internal::range< internal::result_on_found::failure, internal::peek_endian< decltype( Lo ), internal::little_endian >, Lo, Hi > {}; | ||
template< auto E, decltype( E )... Es > struct one : internal::one< internal::result_on_found::success, internal::peek_endian< decltype( E ), internal::little_endian >, E, Es... > {}; | ||
template< auto Lo, decltype( Lo ) Hi > struct range : internal::range< internal::result_on_found::success, internal::peek_endian< decltype( Lo ), internal::little_endian >, Lo, Hi > {}; | ||
template< auto E, decltype( E )... Es > struct ranges : internal::ranges< internal::peek_endian< decltype( E ), internal::little_endian >, E, Es... > {}; | ||
template< auto E, decltype( E )... Es > struct string : internal::seq< internal::one< internal::result_on_found::success, internal::peek_endian< decltype( E ), internal::little_endian >, E >, internal::one< internal::result_on_found::success, internal::peek_endian< decltype( E ), internal::little_endian >, Es >... > {}; | ||
// clang-format on | ||
|
||
} // namespace enums_le | ||
|
||
} // namespace TAO_PEGTL_NAMESPACE | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Copyright (c) 2018-2023 Dr. Colin Hirsch and Daniel Frey | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#ifndef TAO_PEGTL_INT16_HPP | ||
#define TAO_PEGTL_INT16_HPP | ||
|
||
#include "config.hpp" | ||
|
||
#include "internal/peek_integer.hpp" | ||
#include "internal/result_on_found.hpp" | ||
#include "internal/rules.hpp" | ||
|
||
namespace TAO_PEGTL_NAMESPACE | ||
{ | ||
namespace int16_be | ||
{ | ||
// clang-format off | ||
struct any : internal::any< internal::peek_int16_be > {}; | ||
template< unsigned Count > struct many : internal::many< Count, internal::peek_int16_be > {}; | ||
|
||
template< std::int16_t... Cs > struct not_one : internal::one< internal::result_on_found::failure, internal::peek_int16_be, Cs... > {}; | ||
template< std::int16_t Lo, std::int16_t Hi > struct not_range : internal::range< internal::result_on_found::failure, internal::peek_int16_be, Lo, Hi > {}; | ||
template< std::int16_t... Cs > struct one : internal::one< internal::result_on_found::success, internal::peek_int16_be, Cs... > {}; | ||
template< std::int16_t Lo, std::int16_t Hi > struct range : internal::range< internal::result_on_found::success, internal::peek_int16_be, Lo, Hi > {}; | ||
template< std::int16_t... Cs > struct ranges : internal::ranges< internal::peek_int16_be, Cs... > {}; | ||
template< std::int16_t... Cs > struct string : internal::seq< internal::one< internal::result_on_found::success, internal::peek_int16_be, Cs >... > {}; | ||
// clang-format on | ||
|
||
} // namespace int16_be | ||
|
||
namespace int16_le | ||
{ | ||
// clang-format off | ||
struct any : internal::any< internal::peek_int16_le > {}; | ||
template< unsigned Count > struct many : internal::many< Count, internal::peek_int16_le > {}; | ||
|
||
template< std::int16_t... Cs > struct not_one : internal::one< internal::result_on_found::failure, internal::peek_int16_le, Cs... > {}; | ||
template< std::int16_t Lo, std::int16_t Hi > struct not_range : internal::range< internal::result_on_found::failure, internal::peek_int16_le, Lo, Hi > {}; | ||
template< std::int16_t... Cs > struct one : internal::one< internal::result_on_found::success, internal::peek_int16_le, Cs... > {}; | ||
template< std::int16_t Lo, std::int16_t Hi > struct range : internal::range< internal::result_on_found::success, internal::peek_int16_le, Lo, Hi > {}; | ||
template< std::int16_t... Cs > struct ranges : internal::ranges< internal::peek_int16_le, Cs... > {}; | ||
template< std::int16_t... Cs > struct string : internal::seq< internal::one< internal::result_on_found::success, internal::peek_int16_le, Cs >... > {}; | ||
// clang-format on | ||
|
||
} // namespace int16_le | ||
|
||
} // namespace TAO_PEGTL_NAMESPACE | ||
|
||
#endif |
Oops, something went wrong.