Ruby 2.0.0p353(2013-11-22revision43784)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Functions
loader.c File Reference
`#include "yaml_private.h"`
Include dependency graph for loader.c:

Go to the source code of this file.

## Functions
| yaml_parser_load (yaml_parser_t *parser, yaml_document_t *document)
| Parse the input stream and produce the next YAML document. More...
static int | yaml_parser_set_composer_error (yaml_parser_t *parser, const char *problem, yaml_mark_t problem_mark)
static int | yaml_parser_set_composer_error_context (yaml_parser_t *parser, const char *context, yaml_mark_t context_mark, const char *problem, yaml_mark_t problem_mark)
static int | yaml_parser_register_anchor (yaml_parser_t *parser, int index, yaml_char_t *anchor)
static void | yaml_parser_delete_aliases (yaml_parser_t *parser)
static int | yaml_parser_load_document (yaml_parser_t *parser, yaml_event_t *first_event)
static int | yaml_parser_load_node (yaml_parser_t *parser, yaml_event_t *first_event)
static int | yaml_parser_load_alias (yaml_parser_t *parser, yaml_event_t *first_event)
static int | yaml_parser_load_scalar (yaml_parser_t *parser, yaml_event_t *first_event)
static int | yaml_parser_load_sequence (yaml_parser_t *parser, yaml_event_t *first_event)
static int | yaml_parser_load_mapping (yaml_parser_t *parser, yaml_event_t *first_event)

## Function Documentation

static void yaml_parser_delete_aliases | ( | yaml_parser_t * | parser | ) |
| static

Definition at line 152 of file loader.c.

References yaml_parser_s::aliases, POP, STACK_DEL, STACK_EMPTY, and yaml_free().

Referenced by yaml_parser_load().

static int yaml_parser_load_alias | ( | yaml_parser_t * | parser,
|  | yaml_event_t * | first_event
| ) |  |
| static

Definition at line 260 of file loader.c.

References yaml_event_s::alias, yaml_parser_s::aliases, yaml_alias_data_s::anchor, yaml_event_s::data, yaml_alias_data_s::index, yaml_parser_s::start, yaml_event_s::start_mark, yaml_parser_s::top, yaml_free(), and yaml_parser_set_composer_error().

Referenced by yaml_parser_load_node().

static int yaml_parser_load_document | ( | yaml_parser_t * | parser,
|  | yaml_event_t * | first_event
| ) |  |
| static

Definition at line 165 of file loader.c.

References assert, yaml_event_s::data, yaml_parser_s::document, yaml_event_s::document_start, yaml_document_s::end, yaml_document_s::end_implicit, yaml_document_s::end_mark, yaml_document_s::start, yaml_document_s::start_implicit, yaml_event_s::start_mark, yaml_document_s::start_mark, yaml_document_s::tag_directives, yaml_event_s::type, yaml_document_s::version_directive, YAML_DOCUMENT_END_EVENT, YAML_DOCUMENT_START_EVENT, yaml_parser_load_node(), and yaml_parser_parse().

Referenced by yaml_parser_load().

static int yaml_parser_load_mapping | ( | yaml_parser_t * | parser,
|  | yaml_event_t * | first_event
| ) |  |
| static

Definition at line 377 of file loader.c.

References yaml_event_s::data, yaml_node_s::data, yaml_parser_s::document, end, yaml_event_s::end_mark, yaml_node_s::end_mark, index, INITIAL_STACK_SIZE, yaml_node_pair_s::key, yaml_node_s::mapping, MAPPING_NODE_INIT, yaml_event_s::mapping_start, yaml_document_s::nodes, NULL, pair, PUSH, STACK_INIT, yaml_node_s::start, yaml_document_s::start, yaml_event_s::start_mark, yaml_document_s::top, top, yaml_event_s::type, yaml_node_pair_s::value, YAML_DEFAULT_MAPPING_TAG, yaml_free(), YAML_MAPPING_END_EVENT, yaml_parser_load_node(), yaml_parser_parse(), yaml_parser_register_anchor(), and yaml_strdup().

Referenced by yaml_parser_load_node().

static int yaml_parser_load_node | ( | yaml_parser_t * | parser,
|  | yaml_event_t * | first_event
| ) |  |
| static

Definition at line 201 of file loader.c.

References assert, yaml_event_s::type, YAML_ALIAS_EVENT, YAML_MAPPING_START_EVENT, yaml_parser_load_alias(), yaml_parser_load_mapping(), yaml_parser_load_scalar(), yaml_parser_load_sequence(), YAML_SCALAR_EVENT, and YAML_SEQUENCE_START_EVENT.

Referenced by yaml_parser_load_document(), yaml_parser_load_mapping(), and yaml_parser_load_sequence().

static int yaml_parser_load_scalar | ( | yaml_parser_t * | parser,
|  | yaml_event_t * | first_event
| ) |  |
| static

Definition at line 283 of file loader.c.

References yaml_event_s::data, yaml_parser_s::document, yaml_event_s::end_mark, index, yaml_document_s::nodes, PUSH, yaml_event_s::scalar, SCALAR_NODE_INIT, yaml_document_s::start, yaml_event_s::start_mark, yaml_document_s::top, YAML_DEFAULT_SCALAR_TAG, yaml_free(), yaml_parser_register_anchor(), and yaml_strdup().

Referenced by yaml_parser_load_node().

static int yaml_parser_load_sequence | ( | yaml_parser_t * | parser,
|  | yaml_event_t * | first_event
| ) |  |
| static

Definition at line 320 of file loader.c.

References yaml_event_s::data, yaml_node_s::data, yaml_parser_s::document, end, yaml_event_s::end_mark, yaml_node_s::end_mark, index, INITIAL_STACK_SIZE, yaml_document_s::nodes, NULL, PUSH, yaml_node_s::sequence, SEQUENCE_NODE_INIT, yaml_event_s::sequence_start, STACK_INIT, yaml_node_s::start, yaml_document_s::start, yaml_event_s::start_mark, yaml_document_s::top, top, yaml_event_s::type, YAML_DEFAULT_SEQUENCE_TAG, yaml_free(), yaml_parser_load_node(), yaml_parser_parse(), yaml_parser_register_anchor(), YAML_SEQUENCE_END_EVENT, and yaml_strdup().

Referenced by yaml_parser_load_node().

static int yaml_parser_register_anchor | ( | yaml_parser_t * | parser,
|  | int | index,
|  | yaml_char_t * | anchor
| ) |  |
| static

Definition at line 225 of file loader.c.

References yaml_parser_s::aliases, yaml_alias_data_s::anchor, data, yaml_parser_s::document, yaml_alias_data_s::index, index, yaml_alias_data_s::mark, yaml_document_s::nodes, PUSH, yaml_document_s::start, yaml_parser_s::start, yaml_node_s::start_mark, yaml_parser_s::top, yaml_free(), and yaml_parser_set_composer_error_context().

Referenced by yaml_parser_load_mapping(), yaml_parser_load_scalar(), and yaml_parser_load_sequence().

static int yaml_parser_set_composer_error | ( | yaml_parser_t * | parser,
|  | const char * | problem,
|  | yaml_mark_t | problem_mark
| ) |  |
| static

Definition at line 119 of file loader.c.

References yaml_parser_s::error, yaml_parser_s::problem, yaml_parser_s::problem_mark, and YAML_COMPOSER_ERROR.

Referenced by yaml_parser_load_alias().

static int yaml_parser_set_composer_error_context | ( | yaml_parser_t * | parser,
|  | const char * | context,
|  | yaml_mark_t | context_mark,
|  | const char * | problem,
|  | yaml_mark_t | problem_mark
| ) |  |
| static

Definition at line 134 of file loader.c.

References yaml_parser_s::context, yaml_parser_s::context_mark, yaml_parser_s::error, yaml_parser_s::problem, yaml_parser_s::problem_mark, and YAML_COMPOSER_ERROR.

Referenced by yaml_parser_register_anchor().