Go to the documentation of this file.
4 #ifndef LEXY_ACTION_SCAN_HPP_INCLUDED
5 #define LEXY_ACTION_SCAN_HPP_INCLUDED
13 template <
typename ControlProduction>
20 return "scanner control production";
26 template <
typename ControlProduction>
27 struct _scp : ControlProduction,
_scp<void>
30 template <
typename ControlProduction,
typename Input,
typename State,
typename ErrorCallback>
32 lexy::input_reader<Input>>
40 constexpr
explicit scanner(
const Input& input, State* state,
const ErrorCallback&
callback)
49 return *
_context.control_block->parse_state;
62 .template get_result<validate_result<ErrorCallback>>(
parse_result);
79 template <
typename ControlProduction =
void,
typename Input,
typename ErrorCallback>
80 constexpr
auto scan(
const Input& input,
const ErrorCallback&
callback)
85 template <
typename ControlProduction =
void,
typename Input,
typename State,
typename ErrorCallback>
86 constexpr
auto scan(
const Input& input, State& state,
const ErrorCallback&
callback)
90 template <
typename ControlProduction =
void,
typename Input,
typename State,
typename ErrorCallback>
91 constexpr
auto scan(
const Input& input,
const State& state,
const ErrorCallback&
callback)
97 #endif // LEXY_ACTION_SCAN_HPP_INCLUDED
constexpr auto noop
A callback with sink that does nothing.
_pc< _handler, State, _production > _context
constexpr auto finish() &&-> lexy::validate_result< ErrorCallback >
constexpr void * no_parse_state
constexpr auto callback(Fns &&... fns)
Creates a callback.
static LEXY_CONSTEVAL auto name()
constexpr auto _get_error_sink(const Callback &callback)
_detail::parse_context_control_block< _handler, State > _cb
_detail::any_holder< const Input * > _input
auto & context() noexcept
LEXY_CONSTEVAL std::size_t max_recursion_depth()
constexpr lexy::input_reader< Input > & reader() noexcept
constexpr auto scan(const Input &input, const State &state, const ErrorCallback &callback)
constexpr auto position() const noexcept -> typename lexy::input_reader< Input > ::iterator
constexpr auto scan(const Input &input, const ErrorCallback &callback)
constexpr scanner(const Input &input, State *state, const ErrorCallback &callback)
constexpr const auto & parse_state() const
_detail::any_holder< _error_sink_t< ErrorCallback > > _sink
decltype(LEXY_DECLVAL(Input).reader()) input_reader