Ruby  2.0.0p648(2015-12-16revision53162)
Macros | Functions
parser.c File Reference
#include "yaml_private.h"

Go to the source code of this file.

Macros

#define PEEK_TOKEN(parser)
 
#define SKIP_TOKEN(parser)
 

Functions

 yaml_parser_parse (yaml_parser_t *parser, yaml_event_t *event)
 Parse the input stream and produce the next parsing event. More...
 
static int yaml_parser_set_parser_error (yaml_parser_t *parser, const char *problem, yaml_mark_t problem_mark)
 
static int yaml_parser_set_parser_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_state_machine (yaml_parser_t *parser, yaml_event_t *event)
 
static int yaml_parser_parse_stream_start (yaml_parser_t *parser, yaml_event_t *event)
 
static int yaml_parser_parse_document_start (yaml_parser_t *parser, yaml_event_t *event, int implicit)
 
static int yaml_parser_parse_document_content (yaml_parser_t *parser, yaml_event_t *event)
 
static int yaml_parser_parse_document_end (yaml_parser_t *parser, yaml_event_t *event)
 
static int yaml_parser_parse_node (yaml_parser_t *parser, yaml_event_t *event, int block, int indentless_sequence)
 
static int yaml_parser_parse_block_sequence_entry (yaml_parser_t *parser, yaml_event_t *event, int first)
 
static int yaml_parser_parse_indentless_sequence_entry (yaml_parser_t *parser, yaml_event_t *event)
 
static int yaml_parser_parse_block_mapping_key (yaml_parser_t *parser, yaml_event_t *event, int first)
 
static int yaml_parser_parse_block_mapping_value (yaml_parser_t *parser, yaml_event_t *event)
 
static int yaml_parser_parse_flow_sequence_entry (yaml_parser_t *parser, yaml_event_t *event, int first)
 
static int yaml_parser_parse_flow_sequence_entry_mapping_key (yaml_parser_t *parser, yaml_event_t *event)
 
static int yaml_parser_parse_flow_sequence_entry_mapping_value (yaml_parser_t *parser, yaml_event_t *event)
 
static int yaml_parser_parse_flow_sequence_entry_mapping_end (yaml_parser_t *parser, yaml_event_t *event)
 
static int yaml_parser_parse_flow_mapping_key (yaml_parser_t *parser, yaml_event_t *event, int first)
 
static int yaml_parser_parse_flow_mapping_value (yaml_parser_t *parser, yaml_event_t *event, int empty)
 
static int yaml_parser_process_empty_scalar (yaml_parser_t *parser, yaml_event_t *event, yaml_mark_t mark)
 
static int yaml_parser_process_directives (yaml_parser_t *parser, yaml_version_directive_t **version_directive_ref, yaml_tag_directive_t **tag_directives_start_ref, yaml_tag_directive_t **tag_directives_end_ref)
 
static int yaml_parser_append_tag_directive (yaml_parser_t *parser, yaml_tag_directive_t value, int allow_duplicates, yaml_mark_t mark)
 

Macro Definition Documentation

◆ PEEK_TOKEN

#define PEEK_TOKEN (   parser)

◆ SKIP_TOKEN

#define SKIP_TOKEN (   parser)

Function Documentation

◆ yaml_parser_append_tag_directive()

static int yaml_parser_append_tag_directive ( yaml_parser_t parser,
yaml_tag_directive_t  value,
int  allow_duplicates,
yaml_mark_t  mark 
)
static

◆ yaml_parser_parse_block_mapping_key()

static int yaml_parser_parse_block_mapping_key ( yaml_parser_t parser,
yaml_event_t event,
int  first 
)
static

◆ yaml_parser_parse_block_mapping_value()

static int yaml_parser_parse_block_mapping_value ( yaml_parser_t parser,
yaml_event_t event 
)
static

◆ yaml_parser_parse_block_sequence_entry()

static int yaml_parser_parse_block_sequence_entry ( yaml_parser_t parser,
yaml_event_t event,
int  first 
)
static

◆ yaml_parser_parse_document_content()

static int yaml_parser_parse_document_content ( yaml_parser_t parser,
yaml_event_t event 
)
static

◆ yaml_parser_parse_document_end()

static int yaml_parser_parse_document_end ( yaml_parser_t parser,
yaml_event_t event 
)
static

◆ yaml_parser_parse_document_start()

static int yaml_parser_parse_document_start ( yaml_parser_t parser,
yaml_event_t event,
int  implicit 
)
static

◆ yaml_parser_parse_flow_mapping_key()

static int yaml_parser_parse_flow_mapping_key ( yaml_parser_t parser,
yaml_event_t event,
int  first 
)
static

◆ yaml_parser_parse_flow_mapping_value()

static int yaml_parser_parse_flow_mapping_value ( yaml_parser_t parser,
yaml_event_t event,
int  empty 
)
static

◆ yaml_parser_parse_flow_sequence_entry()

static int yaml_parser_parse_flow_sequence_entry ( yaml_parser_t parser,
yaml_event_t event,
int  first 
)
static

◆ yaml_parser_parse_flow_sequence_entry_mapping_end()

static int yaml_parser_parse_flow_sequence_entry_mapping_end ( yaml_parser_t parser,
yaml_event_t event 
)
static

◆ yaml_parser_parse_flow_sequence_entry_mapping_key()

static int yaml_parser_parse_flow_sequence_entry_mapping_key ( yaml_parser_t parser,
yaml_event_t event 
)
static

◆ yaml_parser_parse_flow_sequence_entry_mapping_value()

static int yaml_parser_parse_flow_sequence_entry_mapping_value ( yaml_parser_t parser,
yaml_event_t event 
)
static

◆ yaml_parser_parse_indentless_sequence_entry()

static int yaml_parser_parse_indentless_sequence_entry ( yaml_parser_t parser,
yaml_event_t event 
)
static

◆ yaml_parser_parse_node()

static int yaml_parser_parse_node ( yaml_parser_t parser,
yaml_event_t event,
int  block,
int  indentless_sequence 
)
static

Definition at line 529 of file parser.c.

References ALIAS_EVENT_INIT, yaml_parser_s::error, yaml_tag_directive_s::handle, MAPPING_START_EVENT_INIT, NULL, PEEK_TOKEN, POP, yaml_tag_directive_s::prefix, SCALAR_EVENT_INIT, SEQUENCE_START_EVENT_INIT, SKIP_TOKEN, yaml_parser_s::start, yaml_parser_s::state, yaml_parser_s::states, strlen(), yaml_parser_s::tag_directives, token, yaml_parser_s::top, YAML_ALIAS_TOKEN, YAML_ANCHOR_TOKEN, YAML_BLOCK_ENTRY_TOKEN, YAML_BLOCK_MAPPING_START_TOKEN, YAML_BLOCK_MAPPING_STYLE, YAML_BLOCK_SEQUENCE_START_TOKEN, YAML_BLOCK_SEQUENCE_STYLE, YAML_FLOW_MAPPING_START_TOKEN, YAML_FLOW_MAPPING_STYLE, YAML_FLOW_SEQUENCE_START_TOKEN, YAML_FLOW_SEQUENCE_STYLE, yaml_free(), yaml_malloc(), YAML_MEMORY_ERROR, YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE, YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE, YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE, YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE, YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE, yaml_parser_set_parser_error_context(), YAML_PLAIN_SCALAR_STYLE, YAML_SCALAR_TOKEN, and YAML_TAG_TOKEN.

Referenced by yaml_parser_parse_block_mapping_key(), yaml_parser_parse_block_mapping_value(), yaml_parser_parse_block_sequence_entry(), yaml_parser_parse_document_content(), yaml_parser_parse_flow_mapping_key(), yaml_parser_parse_flow_mapping_value(), yaml_parser_parse_flow_sequence_entry(), yaml_parser_parse_flow_sequence_entry_mapping_key(), yaml_parser_parse_flow_sequence_entry_mapping_value(), yaml_parser_parse_indentless_sequence_entry(), and yaml_parser_state_machine().

◆ yaml_parser_parse_stream_start()

static int yaml_parser_parse_stream_start ( yaml_parser_t parser,
yaml_event_t event 
)
static

◆ yaml_parser_process_directives()

static int yaml_parser_process_directives ( yaml_parser_t parser,
yaml_version_directive_t **  version_directive_ref,
yaml_tag_directive_t **  tag_directives_start_ref,
yaml_tag_directive_t **  tag_directives_end_ref 
)
static

◆ yaml_parser_process_empty_scalar()

static int yaml_parser_process_empty_scalar ( yaml_parser_t parser,
yaml_event_t event,
yaml_mark_t  mark 
)
static

◆ yaml_parser_set_parser_error()

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

◆ yaml_parser_set_parser_error_context()

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

◆ yaml_parser_state_machine()

static int yaml_parser_state_machine ( yaml_parser_t parser,
yaml_event_t event 
)
static

Definition at line 226 of file parser.c.

References assert, yaml_parser_s::state, YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE, YAML_PARSE_BLOCK_MAPPING_KEY_STATE, YAML_PARSE_BLOCK_MAPPING_VALUE_STATE, YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE, YAML_PARSE_BLOCK_NODE_STATE, YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE, YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE, YAML_PARSE_DOCUMENT_CONTENT_STATE, YAML_PARSE_DOCUMENT_END_STATE, YAML_PARSE_DOCUMENT_START_STATE, YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE, YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE, YAML_PARSE_FLOW_MAPPING_KEY_STATE, YAML_PARSE_FLOW_MAPPING_VALUE_STATE, YAML_PARSE_FLOW_NODE_STATE, YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE, YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE, YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE, YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE, YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE, YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE, YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE, YAML_PARSE_STREAM_START_STATE, yaml_parser_parse_block_mapping_key(), yaml_parser_parse_block_mapping_value(), yaml_parser_parse_block_sequence_entry(), yaml_parser_parse_document_content(), yaml_parser_parse_document_end(), yaml_parser_parse_document_start(), yaml_parser_parse_flow_mapping_key(), yaml_parser_parse_flow_mapping_value(), yaml_parser_parse_flow_sequence_entry(), yaml_parser_parse_flow_sequence_entry_mapping_end(), yaml_parser_parse_flow_sequence_entry_mapping_key(), yaml_parser_parse_flow_sequence_entry_mapping_value(), yaml_parser_parse_indentless_sequence_entry(), yaml_parser_parse_node(), and yaml_parser_parse_stream_start().

Referenced by yaml_parser_parse().