...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
BOOST_PARSER_NO_RUNTIME_ASSERTIONS BOOST_PARSER_ASSERT(condition) BOOST_PARSER_DISABLE_CONCEPTS BOOST_PARSER_USE_HANA_TUPLE BOOST_PARSER_MAX_AGGREGATE_SIZE BOOST_PARSER_SUBRANGE BOOST_PARSER_TRACE_TO_VS_OUTPUT BOOST_PARSER_ALGO_CONSTEXPR BOOST_PARSER_USE_CONCEPTS BOOST_PARSER_USE_STD_TUPLE BOOST_PARSER_CONSTEXPR BOOST_PARSER_TRACE_OSTREAM
namespace boost { namespace parser { struct callback_error_handler; struct rethrow_error_handler; struct vs_output_error_handler; template<typename Iter, typename Sentinel> std::ostream & write_formatted_message(std::ostream &, std::string_view, Iter, Iter, Sentinel, std::string_view, int64_t = 80, int64_t = 40); template<typename Iter, typename Sentinel> std::ostream & write_formatted_expectation_failure_error_message(std::ostream &, std::string_view, Iter, Sentinel, parse_error< Iter > const &, int64_t = 80, int64_t = 40); template<typename Iter> line_position< Iter > find_line_position(Iter, Iter); template<typename Iter, typename Sentinel> Iter find_line_end(Iter, Sentinel); } }
namespace boost { namespace parser { struct default_error_handler; template<typename Iter> struct line_position; template<typename Iter> struct parse_error; struct stream_error_handler; enum error_handler_result; enum diagnostic_kind; template<typename Iter, typename Sentinel> std::ostream & write_formatted_message(std::ostream &, std::wstring_view, Iter, Iter, Sentinel, std::string_view, int64_t = 80, int64_t = 40); template<typename Iter, typename Sentinel> std::ostream & write_formatted_expectation_failure_error_message(std::ostream &, std::wstring_view, Iter, Sentinel, parse_error< Iter > const &, int64_t = 80, int64_t = 40); } }
BOOST_PARSER_DEFINE_RULES(...)
namespace boost { namespace parser { template<typename R, typename Parser> struct attribute; template<typename Parser, typename DelimiterParser> struct delimited_seq_parser; template<template< class > class Parser> struct directive; template<typename Predicate> struct if_directive; struct merge_directive; struct none; template<typename Parser> struct one_plus_parser; template<typename Parser> struct opt_parser; template<typename ParserTuple> struct or_parser; template<typename Parser, typename GlobalState, typename ErrorHandler> struct parser_interface; template<typename ParserTuple> struct perm_parser; template<typename Quotes, typename Escapes> struct quoted_string_parser; template<typename MinType, typename MaxType> struct repeat_directive; struct separate_directive; template<typename SkipParser = unspecified> struct skip_directive; template<typename T> struct symbols; template<typename F> struct transform_directive; template<typename Parser> struct zero_plus_parser; enum trace; unspecified _p; int64_t const Inf; constexpr directive< omit_parser > omit; constexpr directive< raw_parser > raw; constexpr directive< string_view_parser > string_view; constexpr directive< lexeme_parser > lexeme; constexpr directive< no_case_parser > no_case; constexpr skip_directive skip; constexpr merge_directive merge; constexpr separate_directive separate; unspecified eps; constexpr parser_interface< eoi_parser > eoi; unspecified char_; unspecified cp; unspecified cu; constexpr parser_interface< quoted_string_parser<> > quoted_string; constexpr parser_interface< ws_parser< true, false > > eol; constexpr parser_interface< ws_parser< false, false > > ws; constexpr parser_interface< ws_parser< false, true > > blank; constexpr parser_interface< digit_parser > digit; unspecified hex_digit; unspecified control; unspecified punct; unspecified lower; unspecified upper; constexpr parser_interface< bool_parser > bool_; constexpr parser_interface< uint_parser< unsigned int, 2 > > bin; constexpr parser_interface< uint_parser< unsigned int, 8 > > oct; constexpr parser_interface< uint_parser< unsigned int, 16 > > hex; constexpr parser_interface< uint_parser< unsigned short > > ushort_; constexpr parser_interface< uint_parser< unsigned int > > uint_; constexpr parser_interface< uint_parser< unsigned long > > ulong_; constexpr parser_interface< uint_parser< unsigned long long > > ulong_long; constexpr parser_interface< int_parser< short > > short_; constexpr parser_interface< int_parser< int > > int_; constexpr parser_interface< int_parser< long > > long_; constexpr parser_interface< int_parser< long long > > long_long; constexpr parser_interface< float_parser< float > > float_; constexpr parser_interface< float_parser< double > > double_; template<typename Parser, typename GlobalState, typename ErrorHandler> auto with_globals(unspecified, GlobalState &); template<typename Parser, typename GlobalState, typename ErrorHandler> auto with_error_handler(parser_interface< Parser, GlobalState, default_error_handler > const &, ErrorHandler &); template<typename T> constexpr repeat_directive< T, T > repeat(T); template<typename MinType, typename MaxType> constexpr repeat_directive< MinType, MaxType > repeat(MinType, MaxType); template<typename F> auto transform(F); template<typename Attribute> constexpr auto attr(Attribute); constexpr auto lit(char); constexpr auto lit(char8_t); constexpr auto lit(char32_t); template<parsable_range_like R> constexpr auto string(R &&); template<parsable_range_like R> constexpr auto lit(R &&); template<typename Predicate> constexpr auto if_(Predicate); template<typename T> constexpr auto switch_(T); template<typename Parser> constexpr auto operator>>(char, parser_interface< Parser >); template<typename Parser> constexpr auto operator>>(char32_t, parser_interface< Parser >); template<parsable_range_like R, typename Parser> constexpr auto operator>>(R &&, parser_interface< Parser >); template<typename Parser> constexpr auto operator>(char, parser_interface< Parser >); template<typename Parser> constexpr auto operator>(char32_t, parser_interface< Parser >); template<parsable_range_like R, typename Parser> constexpr auto operator>(R &&, parser_interface< Parser >); template<typename Parser> constexpr auto operator|(char, parser_interface< Parser >); template<typename Parser> constexpr auto operator|(char32_t, parser_interface< Parser >); template<parsable_range_like R, typename Parser> constexpr auto operator|(R &&, parser_interface< Parser >); template<typename Parser> constexpr auto operator-(char, parser_interface< Parser >); template<typename Parser> constexpr auto operator-(char32_t, parser_interface< Parser >); template<parsable_range_like R, typename Parser> constexpr auto operator-(R &&, parser_interface< Parser >); template<typename Parser> constexpr auto operator%(char, parser_interface< Parser >); template<typename Parser> constexpr auto operator%(char32_t, parser_interface< Parser >); template<parsable_range_like R, typename Parser> constexpr auto operator%(R &&, parser_interface< Parser >); template<parsable_iter I, std::sentinel_for< I > S, typename Parser, typename GlobalState, error_handler< I, S, GlobalState > ErrorHandler, typename Attr> bool prefix_parse(I &, S, parser_interface< Parser, GlobalState, ErrorHandler > const &, Attr &, trace = trace::off); template<parsable_range R, typename Parser, typename GlobalState, typename ErrorHandler, typename Attr> bool parse(R const &, parser_interface< Parser, GlobalState, ErrorHandler > const &, Attr &, trace = trace::off); template<parsable_iter I, std::sentinel_for< I > S, typename Parser, typename GlobalState, error_handler< I, S, GlobalState > ErrorHandler> auto prefix_parse(I &, S, parser_interface< Parser, GlobalState, ErrorHandler > const &, trace = trace::off); template<parsable_range R, typename Parser, typename GlobalState, typename ErrorHandler> auto parse(R const &, parser_interface< Parser, GlobalState, ErrorHandler > const &, trace = trace::off); template<parsable_iter I, std::sentinel_for< I > S, typename Parser, typename GlobalState, error_handler< I, S, GlobalState > ErrorHandler, typename SkipParser, typename Attr> bool prefix_parse(I &, S, parser_interface< Parser, GlobalState, ErrorHandler > const &, parser_interface< SkipParser > const &, Attr &, trace = trace::off); template<parsable_range R, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser, typename Attr> bool parse(R const &, parser_interface< Parser, GlobalState, ErrorHandler > const &, parser_interface< SkipParser > const &, Attr &, trace = trace::off); template<parsable_iter I, std::sentinel_for< I > S, typename Parser, typename GlobalState, error_handler< I, S, GlobalState > ErrorHandler, typename SkipParser> auto prefix_parse(I &, S, parser_interface< Parser, GlobalState, ErrorHandler > const &, parser_interface< SkipParser > const &, trace = trace::off); template<parsable_range R, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser> auto parse(R const &, parser_interface< Parser, GlobalState, ErrorHandler > const &, parser_interface< SkipParser > const &, trace = trace::off); template<parsable_iter I, std::sentinel_for< I > S, typename Parser, typename GlobalState, error_handler< I, S, GlobalState > ErrorHandler, typename Callbacks> bool callback_prefix_parse(I &, S, parser_interface< Parser, GlobalState, ErrorHandler > const &, Callbacks const &, trace = trace::off); template<parsable_range R, typename Parser, typename GlobalState, typename ErrorHandler, typename Callbacks> bool callback_parse(R const &, parser_interface< Parser, GlobalState, ErrorHandler > const &, Callbacks const &, trace = trace::off); template<parsable_iter I, std::sentinel_for< I > S, typename Parser, typename GlobalState, error_handler< I, S, GlobalState > ErrorHandler, typename SkipParser, typename Callbacks> bool callback_prefix_parse(I &, S, parser_interface< Parser, GlobalState, ErrorHandler > const &, parser_interface< SkipParser > const &, Callbacks const &, trace = trace::off); template<parsable_range R, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser, typename Callbacks> bool callback_parse(R const &, parser_interface< Parser, GlobalState, ErrorHandler > const &, parser_interface< SkipParser > const &, Callbacks const &, trace = trace::off); namespace literals { constexpr auto operator""_l(char); constexpr auto operator""_l(char8_t); constexpr auto operator""_l(char32_t); constexpr auto operator""_l(char const *, std::size_t); constexpr auto operator""_l(char8_t const *, std::size_t); constexpr auto operator""_l(char32_t const *, std::size_t); constexpr auto operator""_p(char); constexpr auto operator""_p(char8_t); constexpr auto operator""_p(char32_t); constexpr auto operator""_p(char const *, std::size_t); constexpr auto operator""_p(char8_t const *, std::size_t); constexpr auto operator""_p(char32_t const *, std::size_t); } } }
namespace boost { namespace parser { template<typename Parser, typename Action> struct action_parser; template<typename Attribute> struct attr_parser; template<typename TagType, typename Attribute = no_attribute, typename LocalState = no_local_state, typename ParamsTuple = no_params> struct callback_rule; template<typename Expected, typename AttributeType = void> struct char_parser; template<typename Tag> struct char_set_parser; template<typename Tag> struct char_subrange_parser; template<typename Predicate> struct eps_parser; template<typename Parser, bool FailOnMatch> struct expect_parser; template<typename T> struct float_parser; template<typename T, int Radix = 10, int MinDigits = 1, int MaxDigits = -1, typename Expected = unspecified> struct int_parser; template<typename Parser> struct lexeme_parser; template<typename Parser> struct no_case_parser; template<typename Parser> struct omit_parser; template<typename Parser> struct raw_parser; template<typename Parser, typename DelimiterParser = unspecified, typename MinType = int64_t, typename MaxType = int64_t> struct repeat_parser; template<typename TagType, typename Attribute = no_attribute, typename LocalState = no_local_state, typename ParamsTuple = no_params> struct rule; template<bool CanUseCallbacks, typename TagType, typename Attribute, typename LocalState, typename ParamsTuple> struct rule_parser; template<typename ParserTuple, typename BacktrackingTuple, typename CombiningGroups> struct seq_parser; template<typename Parser, typename SkipParser = unspecified> struct skip_parser; struct sorted_t; template<typename StrIter, typename StrSentinel> struct string_parser; template<typename Parser> struct string_view_parser; template<typename SwitchValue, typename OrParser = unspecified> struct switch_parser; template<typename T> struct symbol_parser; template<typename Parser, typename F> struct transform_parser; template<typename T, int Radix = 10, int MinDigits = 1, int MaxDigits = -1, typename Expected = unspecified> struct uint_parser; template<bool NewlinesOnly, bool NoNewlines> struct ws_parser; typedef unspecified null_sentinel_t; typedef typename attribute< R, Parser >::type attribute_t; typedef unspecified no_attribute; typedef unspecified no_local_state; typedef unspecified no_params; constexpr bool enable_optional; constexpr bool enable_variant; constexpr sorted_t sorted; template<typename CharT> constexpr auto null_term(CharT *); decltype(auto) _val(Context const &); template<typename Context> decltype(auto) _attr(Context const &); template<typename Context> decltype(auto) _where(Context const &); template<typename Context> decltype(auto) _begin(Context const &); template<typename Context> decltype(auto) _end(Context const &); template<typename Context> decltype(auto) _pass(Context const &); template<typename Context> decltype(auto) _locals(Context const &); template<typename Context> decltype(auto) _params(Context const &); template<typename Context> decltype(auto) _globals(Context const &); template<typename Context> decltype(auto) _error_handler(Context const &); template<std::forward_iterator I, typename Context> void _report_error(Context const &, std::string_view, I); template<typename Context> void _report_error(Context const &, std::string_view); template<std::forward_iterator I, typename Context> void _report_warning(Context const &, std::string_view, I); template<typename Context> void _report_warning(Context const &, std::string_view); } }
namespace boost { namespace parser { template<std::ranges::viewable_range V, std::ranges::viewable_range ReplacementV, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser> struct replace_view; unspecified replace; template<typename V, typename ReplacementV, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser> replace_view(V &&, parser_interface< Parser, GlobalState, ErrorHandler >, parser_interface< SkipParser >, ReplacementV &&, trace); template<typename V, typename ReplacementV, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser> replace_view(V &&, parser_interface< Parser, GlobalState, ErrorHandler >, parser_interface< SkipParser >, ReplacementV &&); template<typename V, typename ReplacementV, typename Parser, typename GlobalState, typename ErrorHandler> replace_view(V &&, parser_interface< Parser, GlobalState, ErrorHandler >, ReplacementV &&, trace); template<typename V, typename ReplacementV, typename Parser, typename GlobalState, typename ErrorHandler> replace_view(V &&, parser_interface< Parser, GlobalState, ErrorHandler >, ReplacementV &&); } }
namespace boost { namespace parser { template<std::ranges::viewable_range V, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser> struct search_all_view; unspecified search_all; template<parsable_range R, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser> auto search(R &&, parser_interface< Parser, GlobalState, ErrorHandler > const &, parser_interface< SkipParser > const &, trace = trace::off); template<parsable_iter I, std::sentinel_for< I > S, typename Parser, typename SkipParser, typename GlobalState, error_handler< I, S, GlobalState > ErrorHandler> auto search(I, S, parser_interface< Parser, GlobalState, ErrorHandler > const &, parser_interface< SkipParser > const &, trace = trace::off); template<parsable_range R, typename Parser, typename GlobalState, typename ErrorHandler> auto search(R &&, parser_interface< Parser, GlobalState, ErrorHandler > const &, trace = trace::off); template<parsable_iter I, std::sentinel_for< I > S, typename Parser, typename GlobalState, error_handler< I, S, GlobalState > ErrorHandler> auto search(I, S, parser_interface< Parser, GlobalState, ErrorHandler > const &, trace = trace::off); template<typename V, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser> search_all_view(V &&, parser_interface< Parser, GlobalState, ErrorHandler >, parser_interface< SkipParser >, trace); template<typename V, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser> search_all_view(V &&, parser_interface< Parser, GlobalState, ErrorHandler >, parser_interface< SkipParser >); template<typename V, typename Parser, typename GlobalState, typename ErrorHandler> search_all_view(V &&, parser_interface< Parser, GlobalState, ErrorHandler >, trace); template<typename V, typename Parser, typename GlobalState, typename ErrorHandler> search_all_view(V &&, parser_interface< Parser, GlobalState, ErrorHandler >); } }
namespace boost { namespace parser { template<std::ranges::viewable_range V, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser> struct split_view; unspecified split; template<typename V, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser> split_view(V &&, parser_interface< Parser, GlobalState, ErrorHandler >, parser_interface< SkipParser >, trace); template<typename V, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser> split_view(V &&, parser_interface< Parser, GlobalState, ErrorHandler >, parser_interface< SkipParser >); template<typename V, typename Parser, typename GlobalState, typename ErrorHandler> split_view(V &&, parser_interface< Parser, GlobalState, ErrorHandler >, trace); template<typename V, typename Parser, typename GlobalState, typename ErrorHandler> split_view(V &&, parser_interface< Parser, GlobalState, ErrorHandler >); } }
namespace boost { namespace parser { template<std::forward_iterator I, std::sentinel_for< I > S = I> struct subrange; template<std::forward_iterator I, std::sentinel_for< I > S = I> constexpr subrange< I, S > make_subrange(I, S); } }namespace std { namespace ranges { } }
namespace boost { namespace parser { template<unspecified V> class utf16_view; template<unspecified V> class utf32_view; template<unspecified V> class utf8_view; typedef unspecified format; constexpr auto as_utf8; constexpr auto as_utf16; constexpr auto as_utf32; } }
namespace boost { namespace parser { template<std::ranges::viewable_range V, std::move_constructible F, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser> struct transform_replace_view; unspecified transform_replace; template<typename V, typename F, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser> transform_replace_view(V &&, parser_interface< Parser, GlobalState, ErrorHandler >, parser_interface< SkipParser >, F &&, trace); template<typename V, typename F, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser> transform_replace_view(V &&, parser_interface< Parser, GlobalState, ErrorHandler >, parser_interface< SkipParser >, F &&); template<typename V, typename F, typename Parser, typename GlobalState, typename ErrorHandler> transform_replace_view(V &&, parser_interface< Parser, GlobalState, ErrorHandler >, F &&, trace); template<typename V, typename F, typename Parser, typename GlobalState, typename ErrorHandler> transform_replace_view(V &&, parser_interface< Parser, GlobalState, ErrorHandler >, F &&); } }
namespace boost { namespace parser { typedef hana::tuple< Args... > tuple; typedef hana::integral_constant< T, I > integral_constant; typedef integral_constant< long long, I > llong; template<typename T, typename U, U I> constexpr decltype(auto) get(T &&, integral_constant< U, I >); namespace literals { template<char... chars> constexpr auto operator""_c(); } } }