7#if !defined(TETENGO_JSON_JSONGRAMMAR_HPP)
8#define TETENGO_JSON_JSONGRAMMAR_HPP
13#include <unordered_map>
15#include <boost/core/noncopyable.hpp>
83 const std::unordered_map<std::string_view, std::string_view>& attributes)>;
123 std::unique_ptr<impl> m_p_impl;
A JSON grammar.
Definition json_grammar.hpp:29
bool parse(reader &reader_) const
Parses a text.
~json_grammar()
Destroys the JSON grammar.
std::function< bool(primitive_type_type type, const std::string_view &value)> primitive_handler_type
The primitive handler type.
Definition json_grammar.hpp:52
structure_type_type
The structure type type.
Definition json_grammar.hpp:56
primitive_type_type
The primitive type type.
Definition json_grammar.hpp:35
json_grammar(primitive_handler_type primitive_handler, structure_handler_type structure_handler)
Creates a JSON grammar.
structure_open_close_type
The structure open-close type.
Definition json_grammar.hpp:64
std::function< bool( structure_type_type type, structure_open_close_type open_close, const std::unordered_map< std::string_view, std::string_view > &attributes)> structure_handler_type
The structure handler type.
Definition json_grammar.hpp:80
A reader.
Definition reader.hpp:19