8#ifndef INCLUDED_ORCUS_YAML_PARSER_BASE_HPP
9#define INCLUDED_ORCUS_YAML_PARSER_BASE_HPP
11#include "orcus/parser_base.hpp"
16namespace orcus {
namespace yaml {
36enum class parse_token_t
60 begin_sequence_element
68 std::unique_ptr<impl> mp_impl;
73 static const size_t parse_indent_blank_line;
76 static const size_t parse_indent_end_of_stream;
78 static const size_t scope_empty;
83 std::string_view value;
93 void push_parse_token(detail::parse_token_t t);
95 detail::parse_token_t get_last_parse_token()
const;
126 void reset_on_new_line();
128 size_t get_scope()
const;
130 void push_scope(
size_t scope_width);
134 detail::scope_t get_scope_type()
const;
136 void set_scope_type(detail::scope_t type);
145 void push_line_back(
const char* p,
size_t n);
147 std::string_view pop_line_front();
149 bool has_line_buffer()
const;
151 size_t get_line_buffer_count()
const;
153 std::string_view merge_line_buffer();
172 detail::keyword_t parse_keyword(
const char* p,
size_t len);
174 key_value parse_key_value(
const char* p,
size_t len);
176 std::string_view parse_single_quoted_string_value(
const char*& p,
size_t max_length);
178 std::string_view parse_double_quoted_string_value(
const char*& p,
size_t max_length);
180 void skip_blanks(
const char*& p,
size_t len);
182 void start_literal_block();
184 bool in_literal_block()
const;
186 void handle_line_in_literal(
size_t indent);
188 void handle_line_in_multi_line_string();
Definition parser_base.hpp:23
Definition yaml_parser_base.hpp:66
std::string_view parse_to_end_of_line()
const char * get_doc_hash() const
void set_doc_hash(const char *hash)
size_t offset_last_char_of_line() const
Definition yaml_parser_base.hpp:81