Ruby 2.0.0p353(2013-11-22revision43784)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Typedefs | Functions
parser.h File Reference
`#include "ruby.h"`
`#include "ruby/st.h"`
Include dependency graph for parser.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | JSON_ParserStruct

## Macros
#define | option_given_p(opts, key) RTEST(rb_funcall(opts, i_key_p, 1, key))
#define | UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD
#define | UNI_SUR_HIGH_START (UTF32)0xD800
#define | UNI_SUR_HIGH_END (UTF32)0xDBFF
#define | UNI_SUR_LOW_START (UTF32)0xDC00
#define | UNI_SUR_LOW_END (UTF32)0xDFFF
#define | GET_PARSER
#define | GET_PARSER_INIT
#define | MinusInfinity "-Infinity"
#define | EVIL 0x666

## Typedefs
typedef unsigned long | UTF32
typedef unsigned short | UTF16
typedef unsigned char | UTF8
typedef struct JSON_ParserStruct | JSON_Parser

## Functions
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)
static char * | JSON_parse_value (JSON_Parser *json, char *p, char *pe, VALUE *result)
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)
static VALUE | json_string_unescape (VALUE result, char *string, char *stringEnd)
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 JSON_Parser * | JSON_allocate ()
static void | JSON_mark (JSON_Parser *json)
static void | JSON_free (JSON_Parser *json)
static VALUE | cJSON_parser_s_allocate (VALUE klass)
static VALUE | cParser_source (VALUE self)

## Macro Definition Documentation

#define EVIL 0x666

Definition at line 57 of file parser.h.

Referenced by cParser_parse_quirks_mode(), cParser_parse_strict(), JSON_parse_array(), JSON_parse_float(), JSON_parse_integer(), JSON_parse_object(), JSON_parse_string(), and JSON_parse_value().

#define GET_PARSER

Value:
GET_PARSER_INIT; \
if (!json->Vsource) rb_raise(rb_eTypeError, "uninitialized instance")
rb_eTypeError
VALUE rb_eTypeError
Definition: error.c:511
rb_raise
void rb_raise(VALUE exc, const char *fmt,...)
Definition: error.c:1780
GET_PARSER_INIT
#define GET_PARSER_INIT
Definition: parser.h:52
if
if(RB_TYPE_P(r, T_FLOAT))
Definition: bigdecimal.c:1186

Definition at line 49 of file parser.h.

Referenced by cParser_parse(), cParser_parse_quirks_mode(), cParser_parse_strict(), cParser_quirks_mode_p(), and cParser_source().

#define GET_PARSER_INIT

Value:
JSON_Parser *json; \
Data_Get_Struct(self, JSON_Parser, json)
Data_Get_Struct
#define Data_Get_Struct(obj, type, sval)
JSON_ParserStruct
Definition: parser.h:30

Definition at line 52 of file parser.h.

Referenced by cParser_initialize().

#define MinusInfinity "-Infinity"

Definition at line 56 of file parser.h.

Referenced by JSON_parse_value().

#define option_given_p | ( |  | opts,
|  |  | key
| ) |  | RTEST(rb_funcall(opts, i_key_p, 1, key))

Definition at line 16 of file parser.h.

#define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD

Definition at line 24 of file parser.h.

#define UNI_SUR_HIGH_END (UTF32)0xDBFF

Definition at line 26 of file parser.h.

#define UNI_SUR_HIGH_START (UTF32)0xD800

Definition at line 25 of file parser.h.

#define UNI_SUR_LOW_END (UTF32)0xDFFF

Definition at line 28 of file parser.h.

#define UNI_SUR_LOW_START (UTF32)0xDC00

Definition at line 27 of file parser.h.

## Typedef Documentation

typedef struct JSON_ParserStruct JSON_Parser

typedef unsigned short UTF16

Definition at line 21 of file parser.h.

typedef unsigned long UTF32

Definition at line 20 of file parser.h.

typedef unsigned char UTF8

Definition at line 22 of file parser.h.

## Function Documentation

static VALUE cJSON_parser_s_allocate | ( | VALUE | klass | ) |
| static

static VALUE convert_encoding | ( | VALUE | source | ) |
| static

static int convert_UTF32_to_UTF8 | ( | char * | buf,
|  | UTF32 | ch
| ) |  |
| static

static VALUE cParser_initialize | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |
| static

static VALUE cParser_parse | ( | VALUE | self | ) |
| static

static VALUE cParser_source | ( | VALUE | self | ) |
| static

static JSON_Parser* JSON_allocate | ( |  | ) |
| static

static void JSON_free | ( | JSON_Parser * | json | ) |
| static

static void JSON_mark | ( | JSON_Parser * | json | ) |
| static

static char* JSON_parse_array | ( | JSON_Parser * | json,
|  | char * | p,
|  | char * | pe,
|  | VALUE * | result
| ) |  |
| static

static char* JSON_parse_float | ( | JSON_Parser * | json,
|  | char * | p,
|  | char * | pe,
|  | VALUE * | result
| ) |  |
| static

static char* JSON_parse_integer | ( | JSON_Parser * | json,
|  | char * | p,
|  | char * | pe,
|  | VALUE * | result
| ) |  |
| static

static char* JSON_parse_object | ( | JSON_Parser * | json,
|  | char * | p,
|  | char * | pe,
|  | VALUE * | result
| ) |  |
| static

static char* JSON_parse_string | ( | JSON_Parser * | json,
|  | char * | p,
|  | char * | pe,
|  | VALUE * | result
| ) |  |
| static

static char* JSON_parse_value | ( | JSON_Parser * | json,
|  | char * | p,
|  | char * | pe,
|  | VALUE * | result
| ) |  |
| static

static VALUE json_string_unescape | ( | VALUE | result,
|  | char * | string,
|  | char * | stringEnd
| ) |  |
| static

static UTF32 unescape_unicode | ( | const unsigned char * | p | ) |
| static