Go to the documentation of this file.
4 #ifndef LEXY_ACTION_PARSE_HPP_INCLUDED
5 #define LEXY_ACTION_PARSE_HPP_INCLUDED
15 template <
typename T,
typename ErrorCallback>
26 constexpr
explicit operator bool() const noexcept
51 return static_cast<bool>(
_value);
54 constexpr decltype(
auto)
value() const& noexcept
58 constexpr decltype(
auto)
value() && noexcept
69 constexpr
const auto&
errors() const& noexcept
73 constexpr
auto&&
errors() && noexcept
92 template <
typename Reader>
99 template <
typename Reader>
105 template <
typename Input,
typename Sink>
118 template <
typename Production,
typename State>
121 template <
typename Result,
typename T>
122 constexpr
auto get_result(
bool rule_parse_result, T&& result) &&
128 template <
typename Result>
139 template <
typename State,
typename Input,
typename ErrorCallback>
149 template <
typename T>
153 template <
typename U = State>
158 template <
typename Production>
163 auto reader =
input.reader();
164 return lexy::do_action<Production, result_type>(
handler(input_holder, sink),
_state,
170 template <
typename Production,
typename Input,
typename ErrorCallback>
178 template <
typename Production,
typename Input,
typename State,
typename ErrorCallback>
179 constexpr
auto parse(
const Input& input, State& state,
const ErrorCallback&
callback)
183 template <
typename Production,
typename Input,
typename State,
typename ErrorCallback>
184 constexpr
auto parse(
const Input& input,
const State& state,
const ErrorCallback&
callback)
190 #endif // LEXY_ACTION_PARSE_HPP_INCLUDED
lexy::_detail::lazy_init< T > _value
constexpr auto get_result(bool rule_parse_result) &&
constexpr parse_result(_impl_t &&impl, U &&v) noexcept
typename Reader::iterator iterator
constexpr auto get_result(bool rule_parse_result, T &&result) &&
const ErrorCallback * _callback
constexpr const auto & errors() const &noexcept
#define LEXY_PRECONDITION(Expr)
typename _impl_t::error_type error_type
constexpr bool is_fatal_error() const noexcept
constexpr auto && errors() &&noexcept
constexpr auto callback(Fns &&... fns)
Creates a callback.
constexpr parse_action(U &state, const ErrorCallback &callback)
constexpr std::size_t error_count() const noexcept
constexpr parse_action(const ErrorCallback &callback)
constexpr std::size_t error_count() const noexcept
constexpr auto parse(const Input &input, const ErrorCallback &callback)
Parses the production into a value, invoking the callback on error.
constexpr auto _get_error_sink(const Callback &callback)
constexpr bool is_fatal_error() const noexcept
constexpr bool is_success() const noexcept
constexpr const auto & errors() const &noexcept
constexpr bool has_value() const noexcept
constexpr _ph(const _detail::any_holder< const Input * > &input, _detail::any_holder< Sink > &sink)
constexpr bool is_success() const noexcept
ErrorCallback error_callback
constexpr bool is_error() const noexcept
constexpr parse_result(_impl_t &&impl) noexcept
constexpr bool is_recovered_error() const noexcept
constexpr bool is_recovered_error() const noexcept
Expected< std::monostate > Result
constexpr decltype(auto) value() const &noexcept
typename _sink_t::return_type error_type
constexpr auto operator()(Production, const Input &input) const
_ph< lexy::input_reader< Input > > handler
typename _vh< Reader >::event_handler event_handler
constexpr bool is_error() const noexcept