14#ifndef ZYPP_CORE_PARSER_JSON_PARSER_H
15#define ZYPP_CORE_PARSER_JSON_PARSER_H
32 using zyppng::operators::operator|;
39 using zyppng::operators::operator|;
46 using zyppng::operators::operator|;
114 std::istream::char_type
popChar();
120 static inline std::istream::char_type
eofChar() {
121 return std::istream::traits_type::eof();
124 template <
typename T = Token>
Provides API related macros.
zyppng::expected< Token > parseNumberToken()
zyppng::expected< void > consumeString(const std::string &str)
static std::istream::char_type eofChar()
Parser & operator=(Parser &&)=delete
zyppng::expected< Token > parseBoolToken()
Parser(const Parser &)=delete
zyppng::expected< Value > parseValue()
std::istream::char_type popChar()
std::istream::char_type peekChar()
zyppng::expected< T > makeParseError(const std::string &message, exception_detail::CodeLocation &&loc)
zyppng::expected< Token > parseStringToken()
Parser & operator=(const Parser &)=delete
zyppng::expected< Token > nextToken()
zyppng::expected< Array > parseArray()
std::optional< InputStream > _stream
zyppng::expected< Value > finishParseValue(Token begin)
zyppng::expected< Object > parseObject()
zyppng::expected< Value > parse(const InputStream &input_r)
Parse the stream.
Parser()=default
Default ctor.
zyppng::expected< Token > parseNullToken()
String related utilities and Regular expression matching.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
std::exception_ptr do_ZYPP_EXCPT_PTR(TExcpt &&excpt_r, CodeLocation &&where_r)
Helper for ZYPP_EXCPT_PTR( Exception ).
zyppng::expected< UInt > uintFromString(const std::string &str)
zyppng::expected< Number > numberFromString(const std::string &str)
fromString helpers — only callable from within the tokeniser.
zyppng::expected< Int > intFromString(const std::string &str)
auto and_then(Fun &&function)
static expected< std::decay_t< Type >, Err > make_expected_success(Type &&t)
auto mtry(F &&f, Args &&...args)
Keep FILE, FUNCTION and LINE.