14 #ifndef ZYPP_CORE_PARSER_JSON_PARSER_H 15 #define ZYPP_CORE_PARSER_JSON_PARSER_H 24 #include "../JsonValue.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>
Parser & operator=(const Parser &)=delete
zyppng::expected< Array > parseArray()
std::istream::char_type popChar()
zyppng::expected< T > makeParseError(const std::string &message, exception_detail::CodeLocation &&loc)
zyppng::expected< void > consumeString(const std::string &str)
String related utilities and Regular expression matching.
zyppng::expected< Value > parse(const InputStream &input_r)
Parse the stream.
static expected< std::decay_t< Type >, Err > make_expected_success(Type &&t)
zyppng::expected< UInt > uintFromString(const std::string &str)
zyppng::expected< Token > parseBoolToken()
static std::istream::char_type eofChar()
std::istream::char_type peekChar()
zyppng::expected< Token > parseNullToken()
Provides API related macros.
zyppng::expected< Value > finishParseValue(Token begin)
zyppng::expected< Object > parseObject()
zyppng::expected< Token > nextToken()
zyppng::expected< Value > parseValue()
zyppng::expected< Token > parseStringToken()
Parser()=default
Default ctor.
Keep FILE, FUNCTION and LINE.
ResultType and_then(const expected< T, E > &exp, Function &&f)
auto mtry(F &&f, Args &&...args)
std::exception_ptr do_ZYPP_EXCPT_PTR(TExcpt &&excpt_r, CodeLocation &&where_r)
Helper for ZYPP_EXCPT_PTR( Exception ).
zyppng::expected< Number > numberFromString(const std::string &str)
fromString helpers — only callable from within the tokeniser.
zyppng::expected< Int > intFromString(const std::string &str)
zyppng::expected< Token > parseNumberToken()
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
std::optional< InputStream > _stream