8 #ifndef INCLUDED_ORCUS_PARSER_BASE_HPP 9 #define INCLUDED_ORCUS_PARSER_BASE_HPP 11 #include "orcus/env.hpp" 12 #include "orcus/exception.hpp" 22 std::ptrdiff_t m_offset;
24 parse_error(
const std::string& msg, std::ptrdiff_t offset);
25 parse_error(
const std::string& cls,
const std::string& msg, std::ptrdiff_t offset);
27 static std::string build_message(
const char* msg_before,
char c,
const char* msg_after);
28 static std::string build_message(
const char* msg_before,
const char* p,
size_t n,
const char* msg_after);
31 std::ptrdiff_t offset()
const;
44 bool has_char()
const {
return mp_char != mp_end; }
45 bool has_next()
const {
return (mp_char+1) != mp_end; }
47 void next(
size_t inc=1);
48 void prev(
size_t dec=1);
49 char cur_char()
const;
50 char next_char()
const;
52 void skip(
const char* chars_to_skip);
63 bool parse_expected(
const char* expected);
71 double parse_double();
81 size_t remaining_size()
const;
88 std::ptrdiff_t offset()
const;
Definition: exception.hpp:18
Definition: parser_base.hpp:34
Definition: parser_base.hpp:20
Definition: base64.hpp:15