RflySimSDK v4.10
RflySimSDK说明文档
载入中...
搜索中...
未找到
lexer< BasicJsonType, InputAdapterType > 模板类 参考

lexical analysis 更多...

#include <lexer.hpp>

类 lexer< BasicJsonType, InputAdapterType > 继承关系图:
lexer< BasicJsonType, InputAdapterType > 的协作图:

Public 类型

using token_type = typename lexer_base<BasicJsonType>::token_type
Public 类型 继承自 lexer_base< BasicJsonType >
enum class  token_type {
  uninitialized , literal_true , literal_false , literal_null ,
  value_string , value_unsigned , value_integer , value_float ,
  begin_array , begin_object , end_array , end_object ,
  name_separator , value_separator , parse_error , end_of_input ,
  literal_or_value
}
 token types for the parser 更多...

Public 成员函数

 lexer (InputAdapterType &&adapter, bool ignore_comments_=false) noexcept
 lexer (const lexer &)=delete
 lexer (lexer &&)=default
lexer & operator= (lexer &)=delete
lexer & operator= (lexer &&)=default
constexpr number_integer_t get_number_integer () const noexcept
 return integer value
constexpr number_unsigned_t get_number_unsigned () const noexcept
 return unsigned integer value
constexpr number_float_t get_number_float () const noexcept
 return floating-point value
string_t & get_string ()
 return current string value (implicitly resets the token; useful only once)
constexpr position_t get_position () const noexcept
 return position of last read token
std::string get_token_string () const
JSON_HEDLEY_RETURNS_NON_NULL constexpr const char * get_error_message () const noexcept
 return syntax error message
bool skip_bom ()
 skip the UTF-8 byte order mark
void skip_whitespace ()
token_type scan ()

额外继承的成员函数

静态 Public 成员函数 继承自 lexer_base< BasicJsonType >
JSON_HEDLEY_RETURNS_NON_NULL static JSON_HEDLEY_CONST const char * token_type_name (const token_type t) noexcept
 return name of values of type token_type (only used for errors)

详细描述

template<typename BasicJsonType, typename InputAdapterType>
class detail::lexer< BasicJsonType, InputAdapterType >

lexical analysis

This class organizes the lexical analysis during JSON deserialization.

成员函数说明

◆ get_error_message()

template<typename BasicJsonType, typename InputAdapterType>
JSON_HEDLEY_RETURNS_NON_NULL constexpr const char * get_error_message ( ) const
inlineconstexprnoexcept

return syntax error message

◆ get_number_float()

template<typename BasicJsonType, typename InputAdapterType>
number_float_t get_number_float ( ) const
inlineconstexprnoexcept

return floating-point value

◆ get_number_integer()

template<typename BasicJsonType, typename InputAdapterType>
number_integer_t get_number_integer ( ) const
inlineconstexprnoexcept

return integer value

◆ get_number_unsigned()

template<typename BasicJsonType, typename InputAdapterType>
number_unsigned_t get_number_unsigned ( ) const
inlineconstexprnoexcept

return unsigned integer value

◆ get_position()

template<typename BasicJsonType, typename InputAdapterType>
position_t get_position ( ) const
inlineconstexprnoexcept

return position of last read token

◆ get_string()

template<typename BasicJsonType, typename InputAdapterType>
string_t & get_string ( )
inline

return current string value (implicitly resets the token; useful only once)

◆ get_token_string()

template<typename BasicJsonType, typename InputAdapterType>
std::string get_token_string ( ) const
inline

return the last read token (for errors only). Will never contain EOF (an arbitrary value that is not a valid char value, often -1), because 255 may legitimately occur. May contain NUL, which should be escaped.

◆ skip_bom()

template<typename BasicJsonType, typename InputAdapterType>
bool skip_bom ( )
inline

skip the UTF-8 byte order mark

返回
true iff there is no BOM or the correct BOM has been skipped

该类的文档由以下文件生成: