Iros
 
Loading...
Searching...
No Matches
di::parser Namespace Reference

Namespaces

namespace  detail
 

Classes

struct  IntegralSet
 
struct  InvertedIntegralSet
 
struct  MatchOne
 
struct  MatchRange
 
class  ParserBase
 
class  StringViewParserContext
 
class  ZStringParserContext
 

Enumerations

enum class  ZStringError { Invalid , Overflow , Underflow }
 
enum class  IntegerError { Overflow , Underflow }
 
enum class  IntegerMode { Improved , CStandard }
 Mode to use when parsing an integer. More...
 

Functions

template<concepts::DecayConstructible Left, concepts::DecayConstructible Right>
requires (concepts::DerivedFrom<Left, ParserBase<Left>> && concepts::DerivedFrom<Right, ParserBase<Right>>)
constexpr auto operator| (Left &&left, Right &&right)
 
template<concepts::DecayConstructible Left, concepts::DecayConstructible Right>
requires (concepts::DerivedFrom<Left, ParserBase<Left>> && concepts::DerivedFrom<Right, ParserBase<Right>> && !concepts::DerivedFrom<Left, detail::AlternationParserMarker> && concepts::DerivedFrom<Right, detail::AlternationParserMarker>)
constexpr auto operator| (Left &&left, Right &&right)
 
template<concepts::DecayConstructible Left, concepts::DecayConstructible Right>
requires (concepts::DerivedFrom<Left, ParserBase<Left>> && concepts::DerivedFrom<Right, ParserBase<Right>> && concepts::DerivedFrom<Left, detail::AlternationParserMarker> && !concepts::DerivedFrom<Right, detail::AlternationParserMarker>)
constexpr auto operator| (Left &&left, Right &&right)
 
template<concepts::DecayConstructible Left, concepts::DecayConstructible Right>
requires (concepts::DerivedFrom<Left, ParserBase<Left>> && concepts::DerivedFrom<Right, ParserBase<Right>> && concepts::DerivedFrom<Left, detail::AlternationParserMarker> && concepts::DerivedFrom<Right, detail::AlternationParserMarker>)
constexpr auto operator| (Left &&left, Right &&right)
 
template<concepts::DecayConstructible Parser, concepts::DecayConstructible Fun>
requires (concepts::DerivedFrom<Parser, ParserBase<Parser>>)
constexpr auto operator<< (Parser &&parser, Fun &&function)
 
template<concepts::DecayConstructible Parser>
requires (concepts::DerivedFrom<Parser, ParserBase<Parser>>)
constexpr auto operator~ (Parser &&parser)
 
template<concepts::DecayConstructible Parser>
requires (concepts::DerivedFrom<Parser, ParserBase<Parser>>)
constexpr auto operator- (Parser &&parser)
 
template<concepts::DecayConstructible Left, concepts::DecayConstructible Right>
requires (concepts::DerivedFrom<Left, ParserBase<Left>> && concepts::DerivedFrom<Right, ParserBase<Right>>)
constexpr auto operator>> (Left &&left, Right &&right)
 
template<concepts::DecayConstructible Left, concepts::DecayConstructible Right>
requires (concepts::DerivedFrom<Left, ParserBase<Left>> && concepts::DerivedFrom<Right, ParserBase<Right>> && !concepts::DerivedFrom<Left, detail::SequenceParserMarker> && concepts::DerivedFrom<Right, detail::SequenceParserMarker>)
constexpr auto operator>> (Left &&left, Right &&right)
 
template<concepts::DecayConstructible Left, concepts::DecayConstructible Right>
requires (concepts::DerivedFrom<Left, ParserBase<Left>> && concepts::DerivedFrom<Right, ParserBase<Right>> && concepts::DerivedFrom<Left, detail::SequenceParserMarker> && !concepts::DerivedFrom<Right, detail::SequenceParserMarker>)
constexpr auto operator>> (Left &&left, Right &&right)
 
template<concepts::DecayConstructible Left, concepts::DecayConstructible Right>
requires (concepts::DerivedFrom<Left, ParserBase<Left>> && concepts::DerivedFrom<Right, ParserBase<Right>> && concepts::DerivedFrom<Left, detail::SequenceParserMarker> && concepts::DerivedFrom<Right, detail::SequenceParserMarker>)
constexpr auto operator>> (Left &&left, Right &&right)
 
template<concepts::DecayConstructible Parser, concepts::DecayConstructible Fun>
requires (concepts::DerivedFrom<Parser, ParserBase<Parser>>)
constexpr auto operator% (Parser &&parser, Fun &&function)
 
template<concepts::Integral T>
constexpr auto operator~ (MatchOne< T > value)
 
template<concepts::Integral T>
constexpr auto operator~ (MatchRange< T > value)
 
template<concepts::Integral T, size_t N>
constexpr auto operator~ (IntegralSet< T, N > value)
 
template<concepts::Integral T>
constexpr auto operator- (MatchOne< T > a, MatchOne< T > b)
 
template<concepts::Integral T>
constexpr auto operator|| (MatchOne< T > a, MatchOne< T > b)
 
template<concepts::Integral T>
constexpr auto operator|| (MatchOne< T > a, MatchRange< T > b)
 
template<concepts::Integral T>
constexpr auto operator|| (MatchRange< T > a, MatchOne< T > b)
 
template<concepts::Integral T>
constexpr auto operator|| (MatchRange< T > a, MatchRange< T > b)
 
template<concepts::Integral T, size_t N>
constexpr auto operator|| (IntegralSet< T, N > a, MatchOne< T > b)
 
template<concepts::Integral T, size_t N>
constexpr auto operator|| (MatchOne< T > a, IntegralSet< T, N > b)
 
template<concepts::Integral T, size_t N>
constexpr auto operator|| (IntegralSet< T, N > a, MatchRange< T > b)
 
template<concepts::Integral T, size_t N>
constexpr auto operator|| (MatchRange< T > a, IntegralSet< T, N > b)
 
template<concepts::Integral T, size_t N1, size_t N2>
constexpr auto operator|| (IntegralSet< T, N1 > a, IntegralSet< T, N2 > b)
 

Variables

constexpr auto as_c32 = detail::AsC32Function {}
 
constexpr auto code_point = detail::CodePointFunction {}
 
constexpr auto eof = detail::EofFunction {}
 
template<concepts::Integer T, IntegerMode mode = IntegerMode::Improved>
constexpr auto integer = detail::IntegerFunction<T, mode> {}
 
constexpr auto match_exactly = detail::MatchExactlyFunction {}
 
constexpr auto match_one = detail::MatchOneFunction {}
 
constexpr auto match_one_or_more = detail::MatchOneOrMoreFunction {}
 
constexpr auto match_zero_or_more = detail::MatchZeroOrMoreFunction {}
 
constexpr auto alternation = detail::AlternationFunction {}
 
constexpr auto and_then = detail::AndThenFunction {}
 
constexpr auto ignore = detail::IgnoreFunction {}
 
constexpr auto optional = detail::OptionalFunction {}
 
constexpr auto sequence = detail::SequenceFunction {}
 
constexpr auto transform = detail::TransformFunction {}
 
constexpr auto create_parser_in_place = detail::CreateParserInPlaceFunction {}
 
template<typename T>
constexpr auto create_parser = detail::CreateParserFunction<T> {}
 
constexpr auto into_parser_context = detail::IntoParseContextFunction {}
 
constexpr auto make_error = detail::MakeErrorFunction {}
 
template<typename T>
constexpr auto parse = detail::ParseFunction<T> {}
 
template<typename T>
constexpr auto parse_partial = detail::ParsePartialFunction<T> {}
 
template<typename T>
constexpr auto parse_unchecked = detail::ParseUncheckedFunction<T> {}
 
constexpr auto run_parser = detail::RunParserFunction {}
 
constexpr auto run_parser_partial = function::curry(detail::RunParserPartialFunction {}, meta::c_<2ZU>)
 
constexpr auto run_parser_unchecked = function::curry(detail::RunParserUncheckedFunction {}, meta::c_<2ZU>)
 

Enumeration Type Documentation

◆ IntegerError

enum class di::parser::IntegerError
strong
Enumerator
Overflow 
Underflow 

◆ IntegerMode

enum class di::parser::IntegerMode
strong

Mode to use when parsing an integer.

For compatibility with C, applications can pass the CStandard mode. This works as defined by strtol() and strtoul(). However, this is often not clear. In the Improved mode, the parser accepts 0b and 0o as additional prefixes, and doesn't consider a leading 0 to be an octal prefix. Additionally, you cannot negate an unsigned integer in the Improved mode.

Enumerator
Improved 
CStandard 

◆ ZStringError

enum class di::parser::ZStringError
strong
Enumerator
Invalid 
Overflow 
Underflow 

Function Documentation

◆ operator%()

template<concepts::DecayConstructible Parser, concepts::DecayConstructible Fun>
requires (concepts::DerivedFrom<Parser, ParserBase<Parser>>)
auto di::parser::operator% ( Parser && parser,
Fun && function )
constexpr

◆ operator-() [1/2]

template<concepts::Integral T>
auto di::parser::operator- ( MatchOne< T > a,
MatchOne< T > b )
constexpr

◆ operator-() [2/2]

template<concepts::DecayConstructible Parser>
requires (concepts::DerivedFrom<Parser, ParserBase<Parser>>)
auto di::parser::operator- ( Parser && parser)
constexpr

◆ operator<<()

template<concepts::DecayConstructible Parser, concepts::DecayConstructible Fun>
requires (concepts::DerivedFrom<Parser, ParserBase<Parser>>)
auto di::parser::operator<< ( Parser && parser,
Fun && function )
constexpr

◆ operator>>() [1/4]

template<concepts::DecayConstructible Left, concepts::DecayConstructible Right>
requires (concepts::DerivedFrom<Left, ParserBase<Left>> && concepts::DerivedFrom<Right, ParserBase<Right>>)
auto di::parser::operator>> ( Left && left,
Right && right )
constexpr

◆ operator>>() [2/4]

template<concepts::DecayConstructible Left, concepts::DecayConstructible Right>
requires (concepts::DerivedFrom<Left, ParserBase<Left>> && concepts::DerivedFrom<Right, ParserBase<Right>> && !concepts::DerivedFrom<Left, detail::SequenceParserMarker> && concepts::DerivedFrom<Right, detail::SequenceParserMarker>)
auto di::parser::operator>> ( Left && left,
Right && right )
constexpr

◆ operator>>() [3/4]

template<concepts::DecayConstructible Left, concepts::DecayConstructible Right>
requires (concepts::DerivedFrom<Left, ParserBase<Left>> && concepts::DerivedFrom<Right, ParserBase<Right>> && concepts::DerivedFrom<Left, detail::SequenceParserMarker> && !concepts::DerivedFrom<Right, detail::SequenceParserMarker>)
auto di::parser::operator>> ( Left && left,
Right && right )
constexpr

◆ operator>>() [4/4]

template<concepts::DecayConstructible Left, concepts::DecayConstructible Right>
requires (concepts::DerivedFrom<Left, ParserBase<Left>> && concepts::DerivedFrom<Right, ParserBase<Right>> && concepts::DerivedFrom<Left, detail::SequenceParserMarker> && concepts::DerivedFrom<Right, detail::SequenceParserMarker>)
auto di::parser::operator>> ( Left && left,
Right && right )
constexpr

◆ operator|() [1/4]

template<concepts::DecayConstructible Left, concepts::DecayConstructible Right>
requires (concepts::DerivedFrom<Left, ParserBase<Left>> && concepts::DerivedFrom<Right, ParserBase<Right>>)
auto di::parser::operator| ( Left && left,
Right && right )
constexpr

◆ operator|() [2/4]

template<concepts::DecayConstructible Left, concepts::DecayConstructible Right>
requires (concepts::DerivedFrom<Left, ParserBase<Left>> && concepts::DerivedFrom<Right, ParserBase<Right>> && !concepts::DerivedFrom<Left, detail::AlternationParserMarker> && concepts::DerivedFrom<Right, detail::AlternationParserMarker>)
auto di::parser::operator| ( Left && left,
Right && right )
constexpr

◆ operator|() [3/4]

template<concepts::DecayConstructible Left, concepts::DecayConstructible Right>
requires (concepts::DerivedFrom<Left, ParserBase<Left>> && concepts::DerivedFrom<Right, ParserBase<Right>> && concepts::DerivedFrom<Left, detail::AlternationParserMarker> && !concepts::DerivedFrom<Right, detail::AlternationParserMarker>)
auto di::parser::operator| ( Left && left,
Right && right )
constexpr

◆ operator|() [4/4]

template<concepts::DecayConstructible Left, concepts::DecayConstructible Right>
requires (concepts::DerivedFrom<Left, ParserBase<Left>> && concepts::DerivedFrom<Right, ParserBase<Right>> && concepts::DerivedFrom<Left, detail::AlternationParserMarker> && concepts::DerivedFrom<Right, detail::AlternationParserMarker>)
auto di::parser::operator| ( Left && left,
Right && right )
constexpr

◆ operator||() [1/9]

template<concepts::Integral T, size_t N>
auto di::parser::operator|| ( IntegralSet< T, N > a,
MatchOne< T > b )
constexpr

◆ operator||() [2/9]

template<concepts::Integral T, size_t N>
auto di::parser::operator|| ( IntegralSet< T, N > a,
MatchRange< T > b )
constexpr

◆ operator||() [3/9]

template<concepts::Integral T, size_t N1, size_t N2>
auto di::parser::operator|| ( IntegralSet< T, N1 > a,
IntegralSet< T, N2 > b )
constexpr

◆ operator||() [4/9]

template<concepts::Integral T, size_t N>
auto di::parser::operator|| ( MatchOne< T > a,
IntegralSet< T, N > b )
constexpr

◆ operator||() [5/9]

template<concepts::Integral T>
auto di::parser::operator|| ( MatchOne< T > a,
MatchOne< T > b )
constexpr

◆ operator||() [6/9]

template<concepts::Integral T>
auto di::parser::operator|| ( MatchOne< T > a,
MatchRange< T > b )
constexpr

◆ operator||() [7/9]

template<concepts::Integral T, size_t N>
auto di::parser::operator|| ( MatchRange< T > a,
IntegralSet< T, N > b )
constexpr

◆ operator||() [8/9]

template<concepts::Integral T>
auto di::parser::operator|| ( MatchRange< T > a,
MatchOne< T > b )
constexpr

◆ operator||() [9/9]

template<concepts::Integral T>
auto di::parser::operator|| ( MatchRange< T > a,
MatchRange< T > b )
constexpr

◆ operator~() [1/4]

template<concepts::Integral T, size_t N>
auto di::parser::operator~ ( IntegralSet< T, N > value)
constexpr

◆ operator~() [2/4]

template<concepts::Integral T>
auto di::parser::operator~ ( MatchOne< T > value)
constexpr

◆ operator~() [3/4]

template<concepts::Integral T>
auto di::parser::operator~ ( MatchRange< T > value)
constexpr

◆ operator~() [4/4]

template<concepts::DecayConstructible Parser>
requires (concepts::DerivedFrom<Parser, ParserBase<Parser>>)
auto di::parser::operator~ ( Parser && parser)
constexpr

Variable Documentation

◆ alternation

auto di::parser::alternation = detail::AlternationFunction {}
inlineconstexpr

◆ and_then

auto di::parser::and_then = detail::AndThenFunction {}
inlineconstexpr

◆ as_c32

auto di::parser::as_c32 = detail::AsC32Function {}
inlineconstexpr

◆ code_point

auto di::parser::code_point = detail::CodePointFunction {}
inlineconstexpr

◆ create_parser

template<typename T>
auto di::parser::create_parser = detail::CreateParserFunction<T> {}
inlineconstexpr

◆ create_parser_in_place

auto di::parser::create_parser_in_place = detail::CreateParserInPlaceFunction {}
inlineconstexpr

◆ eof

auto di::parser::eof = detail::EofFunction {}
inlineconstexpr

◆ ignore

auto di::parser::ignore = detail::IgnoreFunction {}
inlineconstexpr

◆ integer

template<concepts::Integer T, IntegerMode mode = IntegerMode::Improved>
auto di::parser::integer = detail::IntegerFunction<T, mode> {}
inlineconstexpr

◆ into_parser_context

auto di::parser::into_parser_context = detail::IntoParseContextFunction {}
inlineconstexpr

◆ make_error

auto di::parser::make_error = detail::MakeErrorFunction {}
inlineconstexpr

◆ match_exactly

auto di::parser::match_exactly = detail::MatchExactlyFunction {}
inlineconstexpr

◆ match_one

auto di::parser::match_one = detail::MatchOneFunction {}
inlineconstexpr

◆ match_one_or_more

auto di::parser::match_one_or_more = detail::MatchOneOrMoreFunction {}
inlineconstexpr

◆ match_zero_or_more

auto di::parser::match_zero_or_more = detail::MatchZeroOrMoreFunction {}
inlineconstexpr

◆ optional

auto di::parser::optional = detail::OptionalFunction {}
inlineconstexpr

◆ parse

template<typename T>
auto di::parser::parse = detail::ParseFunction<T> {}
inlineconstexpr

◆ parse_partial

template<typename T>
auto di::parser::parse_partial = detail::ParsePartialFunction<T> {}
inlineconstexpr

◆ parse_unchecked

template<typename T>
auto di::parser::parse_unchecked = detail::ParseUncheckedFunction<T> {}
inlineconstexpr

◆ run_parser

auto di::parser::run_parser = detail::RunParserFunction {}
inlineconstexpr

◆ run_parser_partial

auto di::parser::run_parser_partial = function::curry(detail::RunParserPartialFunction {}, meta::c_<2ZU>)
inlineconstexpr

◆ run_parser_unchecked

auto di::parser::run_parser_unchecked = function::curry(detail::RunParserUncheckedFunction {}, meta::c_<2ZU>)
inlineconstexpr

◆ sequence

auto di::parser::sequence = detail::SequenceFunction {}
inlineconstexpr

◆ transform

auto di::parser::transform = detail::TransformFunction {}
inlineconstexpr