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>
36 constexpr
auto peek() const noexcept
44 constexpr
void bump() noexcept
71 template <
typename Encoding>
80 template <
typename Encoding,
typename Iterator,
typename Sentinel>
83 if constexpr (std::is_pointer_v<Iterator>)
85 if constexpr (std::is_same_v<Encoding, lexy::default_encoding>)
87 else if constexpr (std::is_same_v<Encoding, lexy::utf8_encoding>)
89 else if constexpr (std::is_same_v<Encoding, lexy::utf8_char_encoding>)
91 else if constexpr (std::is_same_v<Encoding, lexy::byte_encoding>)
105 template <
typename Input>
108 template <
typename Input>
111 template <
typename Reader,
typename CharT>
113 = (std::is_same_v<CharT, typename Reader::encoding::char_type>)
114 || Reader::encoding::template is_secondary_char_type<CharT>();
119 template <
typename Reader>
132 template <
typename Reader>
134 typename Reader::iterator
end)
140 template <
typename Reader>
147 #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 bool char_type_compatible_with_reader
constexpr void reset(marker m) noexcept
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.
constexpr marker current() const noexcept
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
constexpr iterator position() const noexcept