Ruby 2.0.0p247(2013-06-27revision41674)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

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

Go to the source code of this file.

## Macros
#define | CACHE(parser, length)
#define | SKIP(parser)
#define | SKIP_LINE(parser)
#define | READ(parser, string)
#define | READ_LINE(parser, string)
#define | MAX_NUMBER_LENGTH 9

## Functions
| yaml_parser_scan (yaml_parser_t *parser, yaml_token_t *token)
| Scan the input stream and produce the next token. More...
static int | yaml_parser_set_scanner_error (yaml_parser_t *parser, const char *context, yaml_mark_t context_mark, const char *problem)
| yaml_parser_fetch_more_tokens (yaml_parser_t *parser)
static int | yaml_parser_fetch_next_token (yaml_parser_t *parser)
static int | yaml_parser_stale_simple_keys (yaml_parser_t *parser)
static int | yaml_parser_save_simple_key (yaml_parser_t *parser)
static int | yaml_parser_remove_simple_key (yaml_parser_t *parser)
static int | yaml_parser_increase_flow_level (yaml_parser_t *parser)
static int | yaml_parser_decrease_flow_level (yaml_parser_t *parser)
static int | yaml_parser_roll_indent (yaml_parser_t *parser, int column, int number, yaml_token_type_t type, yaml_mark_t mark)
static int | yaml_parser_unroll_indent (yaml_parser_t *parser, int column)
static int | yaml_parser_fetch_stream_start (yaml_parser_t *parser)
static int | yaml_parser_fetch_stream_end (yaml_parser_t *parser)
static int | yaml_parser_fetch_directive (yaml_parser_t *parser)
static int | yaml_parser_fetch_document_indicator (yaml_parser_t *parser, yaml_token_type_t type)
static int | yaml_parser_fetch_flow_collection_start (yaml_parser_t *parser, yaml_token_type_t type)
static int | yaml_parser_fetch_flow_collection_end (yaml_parser_t *parser, yaml_token_type_t type)
static int | yaml_parser_fetch_flow_entry (yaml_parser_t *parser)
static int | yaml_parser_fetch_block_entry (yaml_parser_t *parser)
static int | yaml_parser_fetch_key (yaml_parser_t *parser)
static int | yaml_parser_fetch_value (yaml_parser_t *parser)
static int | yaml_parser_fetch_anchor (yaml_parser_t *parser, yaml_token_type_t type)
static int | yaml_parser_fetch_tag (yaml_parser_t *parser)
static int | yaml_parser_fetch_block_scalar (yaml_parser_t *parser, int literal)
static int | yaml_parser_fetch_flow_scalar (yaml_parser_t *parser, int single)
static int | yaml_parser_fetch_plain_scalar (yaml_parser_t *parser)
static int | yaml_parser_scan_to_next_token (yaml_parser_t *parser)
static int | yaml_parser_scan_directive (yaml_parser_t *parser, yaml_token_t *token)
static int | yaml_parser_scan_directive_name (yaml_parser_t *parser, yaml_mark_t start_mark, yaml_char_t **name)
static int | yaml_parser_scan_version_directive_value (yaml_parser_t *parser, yaml_mark_t start_mark, int *major, int *minor)
static int | yaml_parser_scan_version_directive_number (yaml_parser_t *parser, yaml_mark_t start_mark, int *number)
static int | yaml_parser_scan_tag_directive_value (yaml_parser_t *parser, yaml_mark_t mark, yaml_char_t **handle, yaml_char_t **prefix)
static int | yaml_parser_scan_anchor (yaml_parser_t *parser, yaml_token_t *token, yaml_token_type_t type)
static int | yaml_parser_scan_tag (yaml_parser_t *parser, yaml_token_t *token)
static int | yaml_parser_scan_tag_handle (yaml_parser_t *parser, int directive, yaml_mark_t start_mark, yaml_char_t **handle)
static int | yaml_parser_scan_tag_uri (yaml_parser_t *parser, int directive, yaml_char_t *head, yaml_mark_t start_mark, yaml_char_t **uri)
static int | yaml_parser_scan_uri_escapes (yaml_parser_t *parser, int directive, yaml_mark_t start_mark, yaml_string_t *string)
static int | yaml_parser_scan_block_scalar (yaml_parser_t *parser, yaml_token_t *token, int literal)
static int | yaml_parser_scan_block_scalar_breaks (yaml_parser_t *parser, int *indent, yaml_string_t *breaks, yaml_mark_t start_mark, yaml_mark_t *end_mark)
static int | yaml_parser_scan_flow_scalar (yaml_parser_t *parser, yaml_token_t *token, int single)
static int | yaml_parser_scan_plain_scalar (yaml_parser_t *parser, yaml_token_t *token)

## Macro Definition Documentation

#define CACHE | ( |  | parser,
|  |  | length
| ) |  |

Value:
(parser->unread >= (length) \
? 1 \
: yaml_parser_update_buffer(parser, (length)))

Definition at line 485 of file scanner.c.

Referenced by yaml_parser_fetch_next_token(), yaml_parser_scan_anchor(), yaml_parser_scan_block_scalar(), yaml_parser_scan_block_scalar_breaks(), yaml_parser_scan_directive(), yaml_parser_scan_directive_name(), yaml_parser_scan_flow_scalar(), yaml_parser_scan_plain_scalar(), yaml_parser_scan_tag(), yaml_parser_scan_tag_directive_value(), yaml_parser_scan_tag_handle(), yaml_parser_scan_tag_uri(), yaml_parser_scan_to_next_token(), yaml_parser_scan_uri_escapes(), yaml_parser_scan_version_directive_number(), and yaml_parser_scan_version_directive_value().

#define MAX_NUMBER_LENGTH 9

Definition at line 2195 of file scanner.c.

Referenced by yaml_parser_scan_version_directive_number().

#define READ | ( |  | parser,
|  |  | string
| ) |  |

Value:
(STRING_EXTEND(parser,string) ? \
(COPY(string,parser->buffer), \
parser->mark.index ++, \
parser->mark.column ++, \
parser->unread --, \
1) : 0)

Definition at line 518 of file scanner.c.

Referenced by yaml_parser_scan_anchor(), yaml_parser_scan_block_scalar(), yaml_parser_scan_directive_name(), yaml_parser_scan_flow_scalar(), yaml_parser_scan_plain_scalar(), yaml_parser_scan_tag_handle(), and yaml_parser_scan_tag_uri().

#define READ_LINE | ( |  | parser,
|  |  | string
| ) |  |

Definition at line 530 of file scanner.c.

Referenced by yaml_parser_scan_block_scalar(), yaml_parser_scan_block_scalar_breaks(), yaml_parser_scan_flow_scalar(), and yaml_parser_scan_plain_scalar().

#define SKIP | ( |  | parser) |  |

Value:
(parser->mark.index ++, \
parser->mark.column ++, \
parser->unread --, \
parser->buffer.pointer += WIDTH(parser->buffer))

Definition at line 494 of file scanner.c.

Referenced by yaml_parser_fetch_block_entry(), yaml_parser_fetch_document_indicator(), yaml_parser_fetch_flow_collection_end(), yaml_parser_fetch_flow_collection_start(), yaml_parser_fetch_flow_entry(), yaml_parser_fetch_key(), yaml_parser_fetch_value(), yaml_parser_scan_anchor(), yaml_parser_scan_block_scalar(), yaml_parser_scan_block_scalar_breaks(), yaml_parser_scan_directive(), yaml_parser_scan_flow_scalar(), yaml_parser_scan_plain_scalar(), yaml_parser_scan_tag(), yaml_parser_scan_tag_directive_value(), yaml_parser_scan_to_next_token(), yaml_parser_scan_uri_escapes(), yaml_parser_scan_version_directive_number(), and yaml_parser_scan_version_directive_value().

#define SKIP_LINE | ( |  | parser) |  |

Value:
(IS_CRLF(parser->buffer) ? \
(parser->mark.index += 2, \
parser->mark.column = 0, \
parser->mark.line ++, \
parser->unread -= 2, \
parser->buffer.pointer += 2) : \
IS_BREAK(parser->buffer) ? \
(parser->mark.index ++, \
parser->mark.column = 0, \
parser->mark.line ++, \
parser->unread --, \
parser->buffer.pointer += WIDTH(parser->buffer)) : 0)

Definition at line 500 of file scanner.c.

Referenced by yaml_parser_scan_block_scalar(), yaml_parser_scan_directive(), yaml_parser_scan_flow_scalar(), and yaml_parser_scan_to_next_token().

## Function Documentation

static int yaml_parser_decrease_flow_level | ( | yaml_parser_t * | parser) |  |
| static

Definition at line 1189 of file scanner.c.

References yaml_parser_s::flow_level, POP, and yaml_parser_s::simple_keys.

Referenced by yaml_parser_fetch_flow_collection_end().

static int yaml_parser_fetch_anchor | ( | yaml_parser_t * | parser,
|  | yaml_token_type_t | type
| ) |  |
| static

Definition at line 1764 of file scanner.c.

References ENQUEUE, yaml_parser_s::simple_key_allowed, token, yaml_parser_s::tokens, yaml_parser_save_simple_key(), yaml_parser_scan_anchor(), and yaml_token_delete().

Referenced by yaml_parser_fetch_next_token().

static int yaml_parser_fetch_block_entry | ( | yaml_parser_t * | parser) |  |
| static

Definition at line 1568 of file scanner.c.

References yaml_mark_s::column, ENQUEUE, yaml_parser_s::flow_level, yaml_parser_s::mark, NULL, yaml_parser_s::simple_key_allowed, SKIP, token, TOKEN_INIT, yaml_parser_s::tokens, YAML_BLOCK_ENTRY_TOKEN, YAML_BLOCK_SEQUENCE_START_TOKEN, yaml_parser_remove_simple_key(), yaml_parser_roll_indent(), and yaml_parser_set_scanner_error().

Referenced by yaml_parser_fetch_next_token().

static int yaml_parser_fetch_block_scalar | ( | yaml_parser_t * | parser,
|  | int | literal
| ) |  |
| static

Definition at line 1825 of file scanner.c.

References ENQUEUE, yaml_parser_s::simple_key_allowed, token, yaml_parser_s::tokens, yaml_parser_remove_simple_key(), yaml_parser_scan_block_scalar(), and yaml_token_delete().

Referenced by yaml_parser_fetch_next_token().

static int yaml_parser_fetch_directive | ( | yaml_parser_t * | parser) |  |
| static

Definition at line 1366 of file scanner.c.

References ENQUEUE, yaml_parser_s::simple_key_allowed, token, yaml_parser_s::tokens, yaml_parser_remove_simple_key(), yaml_parser_scan_directive(), yaml_parser_unroll_indent(), and yaml_token_delete().

Referenced by yaml_parser_fetch_next_token().

static int yaml_parser_fetch_document_indicator | ( | yaml_parser_t * | parser,
|  | yaml_token_type_t | type
| ) |  |
| static

Definition at line 1402 of file scanner.c.

References ENQUEUE, yaml_parser_s::mark, yaml_parser_s::simple_key_allowed, SKIP, token, TOKEN_INIT, yaml_parser_s::tokens, yaml_parser_remove_simple_key(), and yaml_parser_unroll_indent().

Referenced by yaml_parser_fetch_next_token().

static int yaml_parser_fetch_flow_collection_end | ( | yaml_parser_t * | parser,
|  | yaml_token_type_t | type
| ) |  |
| static

Definition at line 1490 of file scanner.c.

References ENQUEUE, yaml_parser_s::mark, yaml_parser_s::simple_key_allowed, SKIP, token, TOKEN_INIT, yaml_parser_s::tokens, yaml_parser_decrease_flow_level(), and yaml_parser_remove_simple_key().

Referenced by yaml_parser_fetch_next_token().

static int yaml_parser_fetch_flow_collection_start | ( | yaml_parser_t * | parser,
|  | yaml_token_type_t | type
| ) |  |
| static

Definition at line 1447 of file scanner.c.

References ENQUEUE, yaml_parser_s::mark, yaml_parser_s::simple_key_allowed, SKIP, token, TOKEN_INIT, yaml_parser_s::tokens, yaml_parser_increase_flow_level(), and yaml_parser_save_simple_key().

Referenced by yaml_parser_fetch_next_token().

static int yaml_parser_fetch_flow_entry | ( | yaml_parser_t * | parser) |  |
| static

Definition at line 1533 of file scanner.c.

References ENQUEUE, yaml_parser_s::mark, yaml_parser_s::simple_key_allowed, SKIP, token, TOKEN_INIT, yaml_parser_s::tokens, YAML_FLOW_ENTRY_TOKEN, and yaml_parser_remove_simple_key().

Referenced by yaml_parser_fetch_next_token().

static int yaml_parser_fetch_flow_scalar | ( | yaml_parser_t * | parser,
|  | int | single
| ) |  |
| static

Definition at line 1856 of file scanner.c.

References ENQUEUE, yaml_parser_s::simple_key_allowed, token, yaml_parser_s::tokens, yaml_parser_save_simple_key(), yaml_parser_scan_flow_scalar(), and yaml_token_delete().

Referenced by yaml_parser_fetch_next_token().

static int yaml_parser_fetch_key | ( | yaml_parser_t * | parser) |  |
| static

Definition at line 1629 of file scanner.c.

References yaml_mark_s::column, ENQUEUE, yaml_parser_s::flow_level, yaml_parser_s::mark, NULL, yaml_parser_s::simple_key_allowed, SKIP, token, TOKEN_INIT, yaml_parser_s::tokens, YAML_BLOCK_MAPPING_START_TOKEN, YAML_KEY_TOKEN, yaml_parser_remove_simple_key(), yaml_parser_roll_indent(), and yaml_parser_set_scanner_error().

Referenced by yaml_parser_fetch_next_token().

yaml_parser_fetch_more_tokens | ( | yaml_parser_t * | parser) |  |

Definition at line 800 of file scanner.c.

References yaml_simple_key_s::possible, yaml_simple_key_s::token_number, yaml_parser_fetch_next_token(), and yaml_parser_stale_simple_keys().

Referenced by yaml_parser_scan().

static int yaml_parser_fetch_next_token | ( | yaml_parser_t * | parser) |  |
| static

Definition at line 860 of file scanner.c.

References yaml_parser_s::buffer, CACHE, CHECK, CHECK_AT, yaml_mark_s::column, yaml_parser_s::flow_level, IS_BLANK_AT, IS_BLANKZ, IS_BLANKZ_AT, IS_Z, yaml_parser_s::mark, yaml_parser_s::stream_start_produced, YAML_ALIAS_TOKEN, YAML_ANCHOR_TOKEN, YAML_DOCUMENT_END_TOKEN, YAML_DOCUMENT_START_TOKEN, YAML_FLOW_MAPPING_END_TOKEN, YAML_FLOW_MAPPING_START_TOKEN, YAML_FLOW_SEQUENCE_END_TOKEN, YAML_FLOW_SEQUENCE_START_TOKEN, yaml_parser_fetch_anchor(), yaml_parser_fetch_block_entry(), yaml_parser_fetch_block_scalar(), yaml_parser_fetch_directive(), yaml_parser_fetch_document_indicator(), yaml_parser_fetch_flow_collection_end(), yaml_parser_fetch_flow_collection_start(), yaml_parser_fetch_flow_entry(), yaml_parser_fetch_flow_scalar(), yaml_parser_fetch_key(), yaml_parser_fetch_plain_scalar(), yaml_parser_fetch_stream_end(), yaml_parser_fetch_stream_start(), yaml_parser_fetch_tag(), yaml_parser_fetch_value(), yaml_parser_scan_to_next_token(), yaml_parser_set_scanner_error(), yaml_parser_stale_simple_keys(), and yaml_parser_unroll_indent().

Referenced by yaml_parser_fetch_more_tokens().

static int yaml_parser_fetch_plain_scalar | ( | yaml_parser_t * | parser) |  |
| static

Definition at line 1887 of file scanner.c.

References ENQUEUE, yaml_parser_s::simple_key_allowed, token, yaml_parser_s::tokens, yaml_parser_save_simple_key(), yaml_parser_scan_plain_scalar(), and yaml_token_delete().

Referenced by yaml_parser_fetch_next_token().

static int yaml_parser_fetch_stream_end | ( | yaml_parser_t * | parser) |  |
| static

Definition at line 1328 of file scanner.c.

References yaml_mark_s::column, ENQUEUE, yaml_mark_s::line, yaml_parser_s::mark, yaml_parser_s::simple_key_allowed, STREAM_END_TOKEN_INIT, token, yaml_parser_s::tokens, yaml_parser_remove_simple_key(), and yaml_parser_unroll_indent().

Referenced by yaml_parser_fetch_next_token().

static int yaml_parser_fetch_stream_start | ( | yaml_parser_t * | parser) |  |
| static

Definition at line 1290 of file scanner.c.

References yaml_parser_s::encoding, ENQUEUE, yaml_parser_s::indent, yaml_parser_s::mark, PUSH, yaml_parser_s::simple_key_allowed, yaml_parser_s::simple_keys, yaml_parser_s::stream_start_produced, STREAM_START_TOKEN_INIT, token, and yaml_parser_s::tokens.

Referenced by yaml_parser_fetch_next_token().

static int yaml_parser_fetch_tag | ( | yaml_parser_t * | parser) |  |
| static

Definition at line 1794 of file scanner.c.

References ENQUEUE, yaml_parser_s::simple_key_allowed, token, yaml_parser_s::tokens, yaml_parser_save_simple_key(), yaml_parser_scan_tag(), and yaml_token_delete().

Referenced by yaml_parser_fetch_next_token().

static int yaml_parser_fetch_value | ( | yaml_parser_t * | parser) |  |
| static

Definition at line 1682 of file scanner.c.

References yaml_mark_s::column, ENQUEUE, yaml_parser_s::flow_level, yaml_simple_key_s::mark, yaml_parser_s::mark, NULL, yaml_simple_key_s::possible, QUEUE_INSERT, yaml_parser_s::simple_key_allowed, yaml_parser_s::simple_keys, SKIP, token, TOKEN_INIT, yaml_simple_key_s::token_number, yaml_parser_s::tokens, yaml_parser_s::tokens_parsed, yaml_parser_s::top, YAML_BLOCK_MAPPING_START_TOKEN, YAML_KEY_TOKEN, yaml_parser_roll_indent(), yaml_parser_set_scanner_error(), and YAML_VALUE_TOKEN.

Referenced by yaml_parser_fetch_next_token().

static int yaml_parser_increase_flow_level | ( | yaml_parser_t * | parser) |  |
| static

Definition at line 1168 of file scanner.c.

References yaml_parser_s::flow_level, PUSH, and yaml_parser_s::simple_keys.

Referenced by yaml_parser_fetch_flow_collection_start().

static int yaml_parser_remove_simple_key | ( | yaml_parser_t * | parser) |  |
| static

Definition at line 1141 of file scanner.c.

References yaml_simple_key_s::mark, yaml_simple_key_s::possible, yaml_simple_key_s::required, yaml_parser_s::simple_keys, yaml_parser_s::top, and yaml_parser_set_scanner_error().

Referenced by yaml_parser_fetch_block_entry(), yaml_parser_fetch_block_scalar(), yaml_parser_fetch_directive(), yaml_parser_fetch_document_indicator(), yaml_parser_fetch_flow_collection_end(), yaml_parser_fetch_flow_entry(), yaml_parser_fetch_key(), yaml_parser_fetch_stream_end(), and yaml_parser_save_simple_key().

static int yaml_parser_roll_indent | ( | yaml_parser_t * | parser,
|  | int | column,
|  | int | number,
|  | yaml_token_type_t | type,
|  | yaml_mark_t | mark
| ) |  |
| static

Definition at line 1209 of file scanner.c.

References ENQUEUE, yaml_parser_s::flow_level, yaml_parser_s::indent, yaml_parser_s::indents, PUSH, QUEUE_INSERT, token, TOKEN_INIT, yaml_parser_s::tokens, and yaml_parser_s::tokens_parsed.

Referenced by yaml_parser_fetch_block_entry(), yaml_parser_fetch_key(), and yaml_parser_fetch_value().

static int yaml_parser_save_simple_key | ( | yaml_parser_t * | parser) |  |
| static

Definition at line 1097 of file scanner.c.

References assert, yaml_mark_s::column, yaml_parser_s::flow_level, yaml_parser_s::head, yaml_parser_s::indent, yaml_simple_key_s::mark, yaml_parser_s::mark, yaml_simple_key_s::possible, yaml_simple_key_s::required, yaml_parser_s::simple_key_allowed, yaml_parser_s::simple_keys, yaml_parser_s::tail, yaml_simple_key_s::token_number, yaml_parser_s::tokens, yaml_parser_s::tokens_parsed, yaml_parser_s::top, and yaml_parser_remove_simple_key().

Referenced by yaml_parser_fetch_anchor(), yaml_parser_fetch_flow_collection_start(), yaml_parser_fetch_flow_scalar(), yaml_parser_fetch_plain_scalar(), and yaml_parser_fetch_tag().

static int yaml_parser_scan_anchor | ( | yaml_parser_t * | parser,
|  | yaml_token_t * | token,
|  | yaml_token_type_t | type
| ) |  |
| static

Definition at line 2319 of file scanner.c.

References ALIAS_TOKEN_INIT, ANCHOR_TOKEN_INIT, yaml_parser_s::buffer, CACHE, CHECK, INITIAL_STRING_SIZE, IS_ALPHA, IS_BLANKZ, yaml_parser_s::mark, NULL_STRING, READ, SKIP, STRING_DEL, STRING_INIT, YAML_ANCHOR_TOKEN, and yaml_parser_set_scanner_error().

Referenced by yaml_parser_fetch_anchor().

static int yaml_parser_scan_block_scalar | ( | yaml_parser_t * | parser,
|  | yaml_token_t * | token,
|  | int | literal
| ) |  |
| static

Definition at line 2728 of file scanner.c.

References AS_DIGIT, yaml_parser_s::buffer, CACHE, CHECK, CLEAR, yaml_mark_s::column, yaml_parser_s::indent, INITIAL_STRING_SIZE, IS_BLANK, IS_BREAK, IS_BREAKZ, IS_DIGIT, IS_Z, JOIN, yaml_parser_s::mark, NULL_STRING, READ, READ_LINE, SCALAR_TOKEN_INIT, SKIP, SKIP_LINE, yaml_string_t::start, STRING_DEL, STRING_EXTEND, STRING_INIT, YAML_FOLDED_SCALAR_STYLE, YAML_LITERAL_SCALAR_STYLE, yaml_parser_scan_block_scalar_breaks(), and yaml_parser_set_scanner_error().

Referenced by yaml_parser_fetch_block_scalar().

static int yaml_parser_scan_block_scalar_breaks | ( | yaml_parser_t * | parser,
|  | int * | indent,
|  | yaml_string_t * | breaks,
|  | yaml_mark_t | start_mark,
|  | yaml_mark_t * | end_mark
| ) |  |
| static

Definition at line 2950 of file scanner.c.

References yaml_parser_s::buffer, CACHE, yaml_mark_s::column, if(), yaml_parser_s::indent, IS_BREAK, IS_SPACE, IS_TAB, yaml_parser_s::mark, READ_LINE, SKIP, and yaml_parser_set_scanner_error().

Referenced by yaml_parser_scan_block_scalar().

int yaml_parser_scan_directive | ( | yaml_parser_t * | parser,
|  | yaml_token_t * | token
| ) |  |
| static

Definition at line 1994 of file scanner.c.

References yaml_parser_s::buffer, CACHE, CHECK, IS_BLANK, IS_BREAK, IS_BREAKZ, major, yaml_parser_s::mark, minor, name, NULL, SKIP, SKIP_LINE, TAG_DIRECTIVE_TOKEN_INIT, VERSION_DIRECTIVE_TOKEN_INIT, yaml_free(), yaml_parser_scan_directive_name(), yaml_parser_scan_tag_directive_value(), yaml_parser_scan_version_directive_value(), and yaml_parser_set_scanner_error().

Referenced by yaml_parser_fetch_directive().

static int yaml_parser_scan_directive_name | ( | yaml_parser_t * | parser,
|  | yaml_mark_t | start_mark,
|  | yaml_char_t ** | name
| ) |  |
| static

Definition at line 2110 of file scanner.c.

References yaml_parser_s::buffer, CACHE, INITIAL_STRING_SIZE, IS_ALPHA, IS_BLANKZ, NULL_STRING, READ, STRING_DEL, STRING_INIT, and yaml_parser_set_scanner_error().

Referenced by yaml_parser_scan_directive().

static int yaml_parser_scan_flow_scalar | ( | yaml_parser_t * | parser,
|  | yaml_token_t * | token,
|  | int | single
| ) |  |
| static

Definition at line 3012 of file scanner.c.

References AS_HEX_AT, yaml_parser_s::buffer, CACHE, CHECK, CHECK_AT, CLEAR, yaml_mark_s::column, INITIAL_STRING_SIZE, IS_BLANK, IS_BLANKZ, IS_BLANKZ_AT, IS_BREAK, IS_BREAK_AT, IS_HEX_AT, IS_Z, JOIN, yaml_parser_s::mark, NULL_STRING, yaml_parser_s::pointer, READ, READ_LINE, SCALAR_TOKEN_INIT, SKIP, SKIP_LINE, yaml_string_t::start, STRING_DEL, STRING_EXTEND, STRING_INIT, YAML_DOUBLE_QUOTED_SCALAR_STYLE, yaml_parser_set_scanner_error(), and YAML_SINGLE_QUOTED_SCALAR_STYLE.

Referenced by yaml_parser_fetch_flow_scalar().

static int yaml_parser_scan_plain_scalar | ( | yaml_parser_t * | parser,
|  | yaml_token_t * | token
| ) |  |
| static

Definition at line 3380 of file scanner.c.

References yaml_parser_s::buffer, CACHE, CHECK, CHECK_AT, CLEAR, yaml_mark_s::column, yaml_parser_s::flow_level, yaml_parser_s::indent, INITIAL_STRING_SIZE, IS_BLANK, IS_BLANKZ, IS_BLANKZ_AT, IS_BREAK, IS_TAB, JOIN, yaml_parser_s::mark, NULL_STRING, yaml_string_t::pointer, READ, READ_LINE, SCALAR_TOKEN_INIT, yaml_parser_s::simple_key_allowed, SKIP, yaml_string_t::start, STRING_DEL, STRING_EXTEND, STRING_INIT, yaml_parser_set_scanner_error(), and YAML_PLAIN_SCALAR_STYLE.

Referenced by yaml_parser_fetch_plain_scalar().

static int yaml_parser_scan_tag | ( | yaml_parser_t * | parser,
|  | yaml_token_t * | token
| ) |  |
| static

Definition at line 2385 of file scanner.c.

References yaml_parser_s::buffer, CACHE, CHECK, CHECK_AT, IS_BLANKZ, yaml_parser_s::mark, NULL, SKIP, strlen(), TAG_TOKEN_INIT, yaml_free(), yaml_malloc(), yaml_parser_scan_tag_handle(), yaml_parser_scan_tag_uri(), and yaml_parser_set_scanner_error().

Referenced by yaml_parser_fetch_tag().

static int yaml_parser_scan_tag_directive_value | ( | yaml_parser_t * | parser,
|  | yaml_mark_t | mark,
|  | yaml_char_t ** | handle,
|  | yaml_char_t ** | prefix
| ) |  |
| static

Definition at line 2255 of file scanner.c.

References yaml_parser_s::buffer, CACHE, IS_BLANK, IS_BLANKZ, NULL, SKIP, yaml_free(), yaml_parser_scan_tag_handle(), yaml_parser_scan_tag_uri(), and yaml_parser_set_scanner_error().

Referenced by yaml_parser_scan_directive().

static int yaml_parser_scan_tag_handle | ( | yaml_parser_t * | parser,
|  | int | directive,
|  | yaml_mark_t | start_mark,
|  | yaml_char_t ** | handle
| ) |  |
| static

Definition at line 2500 of file scanner.c.

References yaml_parser_s::buffer, CACHE, CHECK, INITIAL_STRING_SIZE, IS_ALPHA, NULL_STRING, READ, STRING_DEL, STRING_INIT, and yaml_parser_set_scanner_error().

Referenced by yaml_parser_scan_tag(), and yaml_parser_scan_tag_directive_value().

static int yaml_parser_scan_tag_uri | ( | yaml_parser_t * | parser,
|  | int | directive,
|  | yaml_char_t * | head,
|  | yaml_mark_t | start_mark,
|  | yaml_char_t ** | uri
| ) |  |
| static

Definition at line 2567 of file scanner.c.

References yaml_parser_s::buffer, CACHE, CHECK, yaml_parser_s::error, INITIAL_STRING_SIZE, IS_ALPHA, NULL_STRING, READ, STRING_DEL, STRING_EXTEND, STRING_INIT, strlen(), YAML_MEMORY_ERROR, yaml_parser_scan_uri_escapes(), yaml_parser_set_scanner_error(), and yaml_string_extend().

Referenced by yaml_parser_scan_tag(), and yaml_parser_scan_tag_directive_value().

static int yaml_parser_scan_to_next_token | ( | yaml_parser_t * | parser) |  |
| static

Definition at line 1918 of file scanner.c.

References yaml_parser_s::buffer, CACHE, CHECK, yaml_mark_s::column, yaml_parser_s::flow_level, IS_BOM, IS_BREAK, IS_BREAKZ, yaml_parser_s::mark, yaml_parser_s::simple_key_allowed, SKIP, and SKIP_LINE.

Referenced by yaml_parser_fetch_next_token().

static int yaml_parser_scan_uri_escapes | ( | yaml_parser_t * | parser,
|  | int | directive,
|  | yaml_mark_t | start_mark,
|  | yaml_string_t * | string
| ) |  |
| static

Definition at line 2659 of file scanner.c.

References AS_HEX_AT, yaml_parser_s::buffer, CACHE, CHECK, IS_HEX_AT, SKIP, and yaml_parser_set_scanner_error().

Referenced by yaml_parser_scan_tag_uri().

static int yaml_parser_scan_version_directive_number | ( | yaml_parser_t * | parser,
|  | yaml_mark_t | start_mark,
|  | int * | number
| ) |  |
| static

Definition at line 2208 of file scanner.c.

References AS_DIGIT, yaml_parser_s::buffer, CACHE, IS_DIGIT, MAX_NUMBER_LENGTH, SKIP, and yaml_parser_set_scanner_error().

Referenced by yaml_parser_scan_version_directive_value().

static int yaml_parser_scan_version_directive_value | ( | yaml_parser_t * | parser,
|  | yaml_mark_t | start_mark,
|  | int * | major,
|  | int * | minor
| ) |  |
| static

Definition at line 2161 of file scanner.c.

References yaml_parser_s::buffer, CACHE, CHECK, IS_BLANK, SKIP, yaml_parser_scan_version_directive_number(), and yaml_parser_set_scanner_error().

Referenced by yaml_parser_scan_directive().

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

Definition at line 782 of file scanner.c.

References yaml_parser_s::context, yaml_parser_s::context_mark, yaml_parser_s::error, yaml_parser_s::mark, yaml_parser_s::problem, yaml_parser_s::problem_mark, and YAML_SCANNER_ERROR.

Referenced by yaml_parser_fetch_block_entry(), yaml_parser_fetch_key(), yaml_parser_fetch_next_token(), yaml_parser_fetch_value(), yaml_parser_remove_simple_key(), yaml_parser_scan_anchor(), yaml_parser_scan_block_scalar(), yaml_parser_scan_block_scalar_breaks(), yaml_parser_scan_directive(), yaml_parser_scan_directive_name(), yaml_parser_scan_flow_scalar(), yaml_parser_scan_plain_scalar(), yaml_parser_scan_tag(), yaml_parser_scan_tag_directive_value(), yaml_parser_scan_tag_handle(), yaml_parser_scan_tag_uri(), yaml_parser_scan_uri_escapes(), yaml_parser_scan_version_directive_number(), yaml_parser_scan_version_directive_value(), and yaml_parser_stale_simple_keys().

static int yaml_parser_stale_simple_keys | ( | yaml_parser_t * | parser) |  |
| static

Definition at line 1056 of file scanner.c.

References yaml_mark_s::index, yaml_mark_s::line, yaml_simple_key_s::mark, yaml_parser_s::mark, yaml_simple_key_s::possible, yaml_simple_key_s::required, yaml_parser_s::simple_keys, yaml_parser_s::start, yaml_parser_s::top, and yaml_parser_set_scanner_error().

Referenced by yaml_parser_fetch_more_tokens(), and yaml_parser_fetch_next_token().

static int yaml_parser_unroll_indent | ( | yaml_parser_t * | parser,
|  | int | column
| ) |  |
| static

Definition at line 1257 of file scanner.c.

References ENQUEUE, yaml_parser_s::flow_level, yaml_parser_s::indent, yaml_parser_s::indents, yaml_parser_s::mark, POP, token, TOKEN_INIT, yaml_parser_s::tokens, and YAML_BLOCK_END_TOKEN.

Referenced by yaml_parser_fetch_directive(), yaml_parser_fetch_document_indicator(), yaml_parser_fetch_next_token(), and yaml_parser_fetch_stream_end().