SIRIUS 7.5.0
Electronic structure library and applications
|
syntax analysis More...
#include <nlohmann_json.hpp>
Public Member Functions | |
parser (InputAdapterType &&adapter, const parser_callback_t< BasicJsonType > cb=nullptr, const bool allow_exceptions_=true, const bool skip_comments=false) | |
a parser reading from an input adapter More... | |
void | parse (const bool strict, BasicJsonType &result) |
public parser interface More... | |
bool | accept (const bool strict=true) |
public accept interface More... | |
template<typename SAX > | |
bool | sax_parse (SAX *sax, const bool strict=true) |
Private Types | |
using | number_integer_t = typename BasicJsonType::number_integer_t |
using | number_unsigned_t = typename BasicJsonType::number_unsigned_t |
using | number_float_t = typename BasicJsonType::number_float_t |
using | string_t = typename BasicJsonType::string_t |
using | lexer_t = lexer< BasicJsonType, InputAdapterType > |
using | token_type = typename lexer_t::token_type |
Private Member Functions | |
template<typename SAX > | |
bool | sax_parse_internal (SAX *sax) |
token_type | get_token () |
get next token from lexer More... | |
std::string | exception_message (const token_type expected, const std::string &context) |
Private Attributes | |
const parser_callback_t< BasicJsonType > | callback = nullptr |
callback function More... | |
token_type | last_token = token_type::uninitialized |
the type of the last read token More... | |
lexer_t | m_lexer |
the lexer More... | |
const bool | allow_exceptions = true |
whether to throw exceptions in case of errors More... | |
syntax analysis
This class implements a recursive descent parser.
Definition at line 12162 of file nlohmann_json.hpp.
|
private |
Definition at line 12164 of file nlohmann_json.hpp.
|
private |
Definition at line 12165 of file nlohmann_json.hpp.
|
private |
Definition at line 12166 of file nlohmann_json.hpp.
|
private |
Definition at line 12167 of file nlohmann_json.hpp.
|
private |
Definition at line 12168 of file nlohmann_json.hpp.
|
private |
Definition at line 12169 of file nlohmann_json.hpp.
|
inlineexplicit |
a parser reading from an input adapter
Definition at line 12173 of file nlohmann_json.hpp.
|
inline |
public parser interface
[in] | strict | whether to expect the last token to be EOF |
[in,out] | result | parsed JSON value |
parse_error.101 | in case of an unexpected token |
parse_error.102 | if to_unicode fails or surrogate error |
parse_error.103 | if to_unicode fails |
Definition at line 12195 of file nlohmann_json.hpp.
|
inline |
public accept interface
[in] | strict | whether to expect the last token to be EOF |
Definition at line 12255 of file nlohmann_json.hpp.
|
inline |
Definition at line 12263 of file nlohmann_json.hpp.
|
inlineprivate |
Definition at line 12282 of file nlohmann_json.hpp.
|
inlineprivate |
get next token from lexer
Definition at line 12563 of file nlohmann_json.hpp.
|
inlineprivate |
Definition at line 12568 of file nlohmann_json.hpp.
|
private |
callback function
Definition at line 12599 of file nlohmann_json.hpp.
|
private |
the type of the last read token
Definition at line 12601 of file nlohmann_json.hpp.
|
private |
the lexer
Definition at line 12603 of file nlohmann_json.hpp.
|
private |
whether to throw exceptions in case of errors
Definition at line 12605 of file nlohmann_json.hpp.