Go to the documentation of this file.
4 #ifndef LEXY_INPUT_BASE_HPP_INCLUDED
5 #define LEXY_INPUT_BASE_HPP_INCLUDED
14 template <
typename Encoding,
typename Iterator,
typename Sentinel = Iterator>
26 constexpr
auto peek() const noexcept
34 constexpr
void bump() noexcept
57 template <
typename Encoding>
66 template <
typename Encoding,
typename Iterator,
typename Sentinel>
69 if constexpr (std::is_pointer_v<Iterator>)
71 if constexpr (std::is_same_v<Encoding, lexy::default_encoding>)
73 else if constexpr (std::is_same_v<Encoding, lexy::utf8_encoding>)
75 else if constexpr (std::is_same_v<Encoding, lexy::utf8_char_encoding>)
77 else if constexpr (std::is_same_v<Encoding, lexy::byte_encoding>)
91 template <
typename Input>
94 template <
typename Input>
97 template <
typename Reader,
typename CharT>
99 = (std::is_same_v<CharT, typename Reader::encoding::char_type>)
100 || Reader::encoding::template is_secondary_char_type<CharT>();
105 template <
typename Reader>
118 template <
typename Reader>
120 typename Reader::iterator
end)
126 template <
typename Reader>
133 #endif // LEXY_INPUT_BASE_HPP_INCLUDED
LEXY_INSTANTIATION_NEWTYPE(_pr, _rr, Encoding, const typename Encoding::char_type *)
string_view::value_type char_type
constexpr auto peek() const noexcept
constexpr bool precedes([[maybe_unused]] Iterator first, [[maybe_unused]] Sentinel after)
constexpr iterator position() const noexcept
constexpr void bump() noexcept
#define LEXY_PRECONDITION(Expr)
constexpr auto end(const C &c) -> decltype(c.end())
constexpr void set_position(iterator new_pos) noexcept
constexpr bool char_type_compatible_with_reader
An encoding where the input is just raw bytes, not characters.
LEXY_EMPTY_MEMBER Sentinel _end
An encoding where the input is assumed to be valid UTF-8.
An encoding where the input is some 8bit encoding (ASCII, UTF-8, extended ASCII etc....
constexpr auto partial_input(const Reader &, typename Reader::iterator begin, typename Reader::iterator end)
constexpr auto _range_reader(Iterator begin, Sentinel end)
An encoding where the input is assumed to be valid UTF-8, but the char type is char.
constexpr auto begin(const C &c) -> decltype(c.begin())
#define LEXY_EMPTY_MEMBER
constexpr bool input_is_view
#define LEXY_DECLVAL(...)
constexpr _rr(Iterator begin, Sentinel end) noexcept
constexpr auto eof
Matches EOF.
decltype(LEXY_DECLVAL(Input).reader()) input_reader