Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Macros | |
#define | EXC_ENCODING rb_utf8_encoding(), |
#define | rb_enc_raise enc_raise |
Enumerations | |
enum | { JSON_object_start = 1 } |
enum | { JSON_object_first_final = 27 } |
enum | { JSON_object_error = 0 } |
enum | { JSON_object_en_main = 1 } |
enum | { JSON_value_start = 1 } |
enum | { JSON_value_first_final = 29 } |
enum | { JSON_value_error = 0 } |
enum | { JSON_value_en_main = 1 } |
enum | { JSON_integer_start = 1 } |
enum | { JSON_integer_first_final = 3 } |
enum | { JSON_integer_error = 0 } |
enum | { JSON_integer_en_main = 1 } |
enum | { JSON_float_start = 1 } |
enum | { JSON_float_first_final = 8 } |
enum | { JSON_float_error = 0 } |
enum | { JSON_float_en_main = 1 } |
enum | { JSON_array_start = 1 } |
enum | { JSON_array_first_final = 17 } |
enum | { JSON_array_error = 0 } |
enum | { JSON_array_en_main = 1 } |
enum | { JSON_string_start = 1 } |
enum | { JSON_string_first_final = 8 } |
enum | { JSON_string_error = 0 } |
enum | { JSON_string_en_main = 1 } |
enum | { JSON_start = 1 } |
enum | { JSON_first_final = 10 } |
enum | { JSON_error = 0 } |
enum | { JSON_en_main = 1 } |
Functions | |
static void | enc_raise (rb_encoding *enc, VALUE exc, const char *fmt,...) |
static UTF32 | unescape_unicode (const unsigned char *p) |
static int | convert_UTF32_to_UTF8 (char *buf, UTF32 ch) |
static char * | JSON_parse_object (JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting) |
static char * | JSON_parse_value (JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting) |
static char * | JSON_parse_integer (JSON_Parser *json, char *p, char *pe, VALUE *result) |
static char * | JSON_parse_float (JSON_Parser *json, char *p, char *pe, VALUE *result) |
static char * | JSON_parse_array (JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting) |
static VALUE | json_string_unescape (VALUE result, char *string, char *stringEnd) |
static int | match_i (VALUE regexp, VALUE klass, VALUE memo) |
static char * | JSON_parse_string (JSON_Parser *json, char *p, char *pe, VALUE *result) |
static VALUE | convert_encoding (VALUE source) |
static VALUE | cParser_initialize (int argc, VALUE *argv, VALUE self) |
static VALUE | cParser_parse (VALUE self) |
static void | JSON_mark (void *ptr) |
static void | JSON_free (void *ptr) |
static size_t | JSON_memsize (const void *ptr) |
static VALUE | cJSON_parser_s_allocate (VALUE klass) |
static VALUE | cParser_source (VALUE self) |
void | Init_parser (void) |
Variables | |
static const char | digit_values [256] |
static VALUE | mJSON |
static VALUE | mExt |
static VALUE | cParser |
static VALUE | eParserError |
static VALUE | eNestingError |
static VALUE | CNaN |
static VALUE | CInfinity |
static VALUE | CMinusInfinity |
static ID | i_json_creatable_p |
static ID | i_json_create |
static ID | i_create_id |
static ID | i_create_additions |
static ID | i_chr |
static ID | i_max_nesting |
static ID | i_allow_nan |
static ID | i_symbolize_names |
static ID | i_object_class |
static ID | i_array_class |
static ID | i_key_p |
static ID | i_deep_const_get |
static ID | i_match |
static ID | i_match_string |
static ID | i_aset |
static ID | i_aref |
static ID | i_leftshift |
static const rb_data_type_t | JSON_Parser_type |
#define EXC_ENCODING rb_utf8_encoding(), |
Definition at line 7 of file parser.c.
Referenced by cParser_parse(), JSON_parse_array(), JSON_parse_value(), and json_string_unescape().
#define rb_enc_raise enc_raise |
Definition at line 21 of file parser.c.
Referenced by cParser_parse(), JSON_parse_array(), JSON_parse_value(), and json_string_unescape().
Definition at line 2030 of file parser.c.
References JSON_ParserStruct::fbuffer, fbuffer_alloc(), and TypedData_Make_Struct.
Referenced by Init_parser().
Definition at line 1676 of file parser.c.
References FORCE_UTF8, OBJ_FROZEN, rb_ascii8bit_encoding(), rb_enc_get(), rb_str_conv_enc(), rb_str_dup(), and rb_utf8_encoding().
Referenced by cParser_initialize().
|
static |
Definition at line 1719 of file parser.c.
References Check_Type, convert_encoding(), FIX2INT, GET_PARSER_INIT, i_allow_nan, i_array_class, i_create_additions, i_create_id, i_match_string, i_max_nesting, i_object_class, i_symbolize_names, ID2SYM, match_string(), mJSON, NIL_P, option_given_p, Qnil, rb_convert_type(), rb_eArgError, rb_eTypeError, rb_funcall(), rb_hash_aref(), rb_raise(), rb_scan_args(), RSTRING_LEN, RSTRING_PTR, RTEST, StringValue, T_FIXNUM, and T_HASH.
Referenced by Init_parser().
Definition at line 1836 of file parser.c.
References eParserError, EVIL, EXC_ENCODING, GET_PARSER, JSON_first_final, JSON_parse_value(), JSON_start, NULL, Qnil, rb_enc_raise, and result.
Referenced by Init_parser().
Definition at line 2044 of file parser.c.
References GET_PARSER, and rb_str_dup().
Referenced by Init_parser().
|
static |
Definition at line 10 of file parser.c.
References rb_enc_vsprintf(), rb_exc_new3, and rb_exc_raise().
void Init_parser | ( | void | ) |
Definition at line 2050 of file parser.c.
References CInfinity, cJSON_parser_s_allocate(), CMinusInfinity, CNaN, cParser, cParser_initialize(), cParser_parse(), cParser_source(), eNestingError, eParserError, i_allow_nan, i_aref, i_array_class, i_aset, i_chr, i_create_additions, i_create_id, i_deep_const_get, i_json_creatable_p, i_json_create, i_key_p, i_leftshift, i_match, i_match_string, i_max_nesting, i_object_class, i_symbolize_names, mExt, mJSON, rb_cObject, rb_const_get(), rb_define_alloc_func(), rb_define_class_under(), rb_define_method(), rb_define_module(), rb_define_module_under(), rb_intern, rb_path2class(), and rb_require().
|
static |
Definition at line 2006 of file parser.c.
References JSON_ParserStruct::fbuffer, fbuffer_free(), and ruby_xfree().
|
static |
Definition at line 1996 of file parser.c.
References JSON_ParserStruct::array_class, JSON_ParserStruct::create_id, JSON_ParserStruct::match_string, JSON_ParserStruct::object_class, rb_gc_mark_maybe(), and JSON_ParserStruct::Vsource.
|
static |
Definition at line 2013 of file parser.c.
References JSON_ParserStruct::fbuffer, and FBUFFER_CAPA.
|
static |
Definition at line 1153 of file parser.c.
References JSON_ParserStruct::array_class, eNestingError, eParserError, EVIL, EXC_ENCODING, i_leftshift, JSON_array_first_final, JSON_array_start, JSON_parse_value(), JSON_ParserStruct::max_nesting, NIL_P, NULL, Qnil, rb_ary_new(), rb_ary_push(), rb_class_new_instance(), rb_enc_raise, rb_funcall(), and rb_raise().
Referenced by JSON_parse_value().
|
static |
Definition at line 987 of file parser.c.
References EVIL, JSON_ParserStruct::fbuffer, fbuffer_append(), fbuffer_append_char(), fbuffer_clear(), FBUFFER_PTR, JSON_float_first_final, JSON_float_start, len, JSON_ParserStruct::memo, NULL, rb_cstr_to_dbl(), and rb_float_new.
Referenced by JSON_parse_value().
|
static |
Definition at line 888 of file parser.c.
References EVIL, JSON_ParserStruct::fbuffer, fbuffer_append(), fbuffer_append_char(), fbuffer_clear(), FBUFFER_PTR, JSON_integer_first_final, JSON_integer_start, len, JSON_ParserStruct::memo, NULL, and rb_cstr2inum().
Referenced by JSON_parse_value().
|
static |
Definition at line 116 of file parser.c.
References JSON_ParserStruct::create_additions, JSON_ParserStruct::create_id, eNestingError, EVIL, i_aref, i_aset, i_deep_const_get, i_json_creatable_p, i_json_create, JSON_object_first_final, JSON_object_start, JSON_parse_string(), JSON_parse_value(), JSON_ParserStruct::max_nesting, mJSON, NIL_P, NULL, JSON_ParserStruct::object_class, JSON_ParserStruct::parsing_name, Qnil, rb_class_new_instance(), rb_funcall(), rb_hash_aref(), rb_hash_aset(), rb_hash_new(), rb_raise(), and RTEST.
Referenced by JSON_parse_value().
|
static |
Definition at line 1505 of file parser.c.
References JSON_ParserStruct::create_additions, EVIL, FORCE_UTF8, i_json_create, JSON_string_first_final, JSON_string_start, json_string_unescape(), match_i(), JSON_ParserStruct::match_string, match_string(), JSON_ParserStruct::memo, NIL_P, NULL, JSON_ParserStruct::parsing_name, rb_ary_entry(), rb_ary_new2, rb_ary_push(), rb_funcall(), rb_hash_foreach(), rb_str_buf_new(), rb_str_intern(), rb_str_resize(), RSTRING_LEN, RTEST, and JSON_ParserStruct::symbolize_names.
Referenced by JSON_parse_object(), and JSON_parse_value().
|
static |
Definition at line 494 of file parser.c.
References JSON_ParserStruct::allow_nan, CInfinity, CMinusInfinity, CNaN, eParserError, EVIL, EXC_ENCODING, JSON_parse_array(), JSON_parse_float(), JSON_parse_integer(), JSON_parse_object(), JSON_parse_string(), JSON_value_first_final, JSON_value_start, MinusInfinity, NULL, Qfalse, Qnil, Qtrue, and rb_enc_raise.
Referenced by cParser_parse(), JSON_parse_array(), and JSON_parse_object().
Definition at line 1403 of file parser.c.
References buf, convert_UTF32_to_UTF8(), eParserError, EXC_ENCODING, rb_enc_raise, rb_str_buf_cat(), result, unescape_unicode(), and UNI_SUR_HIGH_START.
Referenced by JSON_parse_string().
Definition at line 1494 of file parser.c.
References i_json_creatable_p, i_match, Qundef, rb_ary_entry(), rb_ary_push(), rb_funcall(), RTEST, ST_CONTINUE, and ST_STOP.
Referenced by JSON_parse_string().
Definition at line 47 of file parser.c.
References digit_values, result, and UNI_REPLACEMENT_CHAR.
Referenced by json_string_unescape().
|
static |
Definition at line 93 of file parser.c.
Referenced by Init_parser(), and JSON_parse_value().
|
static |
Definition at line 93 of file parser.c.
Referenced by Init_parser(), and JSON_parse_value().
|
static |
Definition at line 93 of file parser.c.
Referenced by Init_parser(), and JSON_parse_value().
|
static |
Definition at line 92 of file parser.c.
Referenced by Init_parser().
|
static |
Definition at line 30 of file parser.c.
Referenced by unescape_unicode().
|
static |
Definition at line 92 of file parser.c.
Referenced by Init_parser(), JSON_parse_array(), and JSON_parse_object().
|
static |
Definition at line 92 of file parser.c.
Referenced by cParser_parse(), Init_parser(), JSON_parse_array(), JSON_parse_value(), and json_string_unescape().
|
static |
Definition at line 95 of file parser.c.
Referenced by cParser_initialize(), and Init_parser().
|
static |
Definition at line 95 of file parser.c.
Referenced by Init_parser(), and JSON_parse_object().
|
static |
Definition at line 95 of file parser.c.
Referenced by cParser_initialize(), and Init_parser().
|
static |
Definition at line 95 of file parser.c.
Referenced by Init_parser(), and JSON_parse_object().
|
static |
Definition at line 95 of file parser.c.
Referenced by Init_parser().
|
static |
Definition at line 95 of file parser.c.
Referenced by cParser_initialize(), and Init_parser().
|
static |
Definition at line 95 of file parser.c.
Referenced by cParser_initialize(), and Init_parser().
|
static |
Definition at line 95 of file parser.c.
Referenced by Init_parser(), and JSON_parse_object().
|
static |
Definition at line 95 of file parser.c.
Referenced by Init_parser(), JSON_parse_object(), and match_i().
|
static |
Definition at line 95 of file parser.c.
Referenced by Init_parser(), JSON_parse_object(), and JSON_parse_string().
|
static |
Definition at line 95 of file parser.c.
Referenced by Init_parser().
|
static |
Definition at line 95 of file parser.c.
Referenced by Init_parser(), and JSON_parse_array().
|
static |
Definition at line 95 of file parser.c.
Referenced by Init_parser(), and match_i().
|
static |
Definition at line 95 of file parser.c.
Referenced by cParser_initialize(), and Init_parser().
|
static |
Definition at line 95 of file parser.c.
Referenced by cParser_initialize(), and Init_parser().
|
static |
Definition at line 95 of file parser.c.
Referenced by cParser_initialize(), and Init_parser().
|
static |
Definition at line 95 of file parser.c.
Referenced by cParser_initialize(), and Init_parser().
|
static |
|
static |
Definition at line 92 of file parser.c.
Referenced by Init_parser().
|
static |
Definition at line 92 of file parser.c.
Referenced by cParser_initialize(), Init_parser(), and JSON_parse_object().