Ruby 1.9.2p136(2010-12-25revision30365)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Defines | Functions | Variables

# ext/syck/bytecode.c File Reference

`#include "ruby/ruby.h"`
`#include "syck.h"`
`#include "gram.h"`
Include dependency graph for bytecode.c:

Go to the source code of this file.

## Defines
#define | QUOTELEN 128
#define | YYCTYPE char
#define | YYCURSOR parser->cursor
#define | YYMARKER parser->marker
#define | YYLIMIT parser->limit
#define | YYTOKEN parser->token
#define | YYTOKTMP parser->toktmp
#define | YYLINEPTR parser->lineptr
#define | YYLINECTPTR parser->linectptr
#define | YYLINE parser->linect
#define | YYFILL(n) syck_parser_read(parser)
#define | YYPOS(n) YYCURSOR = YYTOKEN + n
#define | CHK_NL(ptr) if ( *( ptr - 1 ) == '\n' && ptr > YYLINECTPTR ) { YYLINEPTR = ptr; YYLINE++; YYLINECTPTR = YYLINEPTR; }
#define | ADD_LEVEL(len, status) syck_parser_add_level( parser, len, status )
#define | POP_LEVEL() syck_parser_pop_level( parser )
#define | CURRENT_LEVEL() syck_parser_current_level( parser )
#define | FORCE_NEXT_TOKEN(tok) parser->force_token = tok;
#define | ADD_BYTE_LEVEL(lvl, len, s)
#define | ENSURE_YAML_IOPEN(last_lvl, lvl_type, to_len, reset)
#define | ENSURE_YAML_IEND(last_lvl, to_len)
#define | CAT(s, c, i, l)
## Functions
char * | get_inline (SyckParser *parser)
int | sycklex_bytecode_utf8 (YYSTYPE *sycklval, SyckParser *parser)
## Variables
SyckParser * | syck_parser_ptr

## Define Documentation

#define ADD_BYTE_LEVEL | ( |  | lvl,
|  |  | len,
|  |  | s
| ) |  |

Value:

    switch ( lvl->status ) \
            { \
                case syck_lvl_seq: \
                    lvl->ncount++; \
                    ADD_LEVEL(len, syck_lvl_open); \
                    YYPOS(0); \
                return '-'; \
            \
                case syck_lvl_map: \
                    lvl->ncount++; \
                    ADD_LEVEL(len, s); \
                break; \
            \
                case syck_lvl_open: \
                    lvl->status = s; \
                break; \
            \
                default: \
                    ADD_LEVEL(len, s); \
                break; \
            }

Definition at line 61 of file bytecode.c.

Referenced by sycklex_bytecode_utf8().

#define ADD_LEVEL | ( |  | len,
|  |  | status
| ) |  | syck_parser_add_level( parser, len, status )

Definition at line 48 of file bytecode.c.

#define CAT | ( |  | s,
|  |  | c,
|  |  | i,
|  |  | l
| ) |  |

Value:

    { \
                if ( i + 1 >= c ) \
                { \
                    c += QUOTELEN; \
                    S_REALLOC_N( s, char, c ); \
                } \
                s[i++] = l; \
                s[i] = '\0'; \
            }

Definition at line 119 of file bytecode.c.

Referenced by get_inline(), and sycklex_bytecode_utf8().

#define CHK_NL | ( |  | ptr | ) | if ( *( ptr - 1 ) == '\n' && ptr > YYLINECTPTR ) { YYLINEPTR = ptr; YYLINE++; YYLINECTPTR = YYLINEPTR; }

Definition at line 43 of file bytecode.c.

Referenced by get_inline(), and sycklex_bytecode_utf8().

#define CURRENT_LEVEL | ( |  | ) | syck_parser_current_level( parser )

Definition at line 50 of file bytecode.c.

Referenced by sycklex_bytecode_utf8().

#define ENSURE_YAML_IEND | ( |  | last_lvl,
|  |  | to_len
| ) |  |

Value:

    if ( last_lvl->spaces > to_len ) \
            { \
                syck_parser_pop_level( parser ); \
                YYPOS(0); \
                return YAML_IEND; \
            }

Definition at line 107 of file bytecode.c.

Referenced by sycklex_bytecode_utf8().

#define ENSURE_YAML_IOPEN | ( |  | last_lvl,
|  |  | lvl_type,
|  |  | to_len,
|  |  | reset
| ) |  |

Value:

    if ( last_lvl->spaces < to_len ) \
            { \
                if ( last_lvl->status == syck_lvl_iseq || last_lvl->status == syck_lvl_imap ) \
                { \
                    goto Document; \
                } \
                else \
                { \
                    ADD_LEVEL( to_len, lvl_type ); \
                    if ( reset == 1 ) YYPOS(0); \
                    return YAML_IOPEN; \
                } \
            }

Definition at line 88 of file bytecode.c.

#define FORCE_NEXT_TOKEN | ( |  | tok | ) | parser->force_token = tok;

Definition at line 55 of file bytecode.c.

Referenced by sycklex_bytecode_utf8().

#define POP_LEVEL | ( |  | ) | syck_parser_pop_level( parser )

Definition at line 49 of file bytecode.c.

Referenced by sycklex_bytecode_utf8().

#define QUOTELEN 128

Definition at line 14 of file bytecode.c.

#define YYCTYPE char

Definition at line 19 of file bytecode.c.

Referenced by get_inline(), and sycklex_bytecode_utf8().

#define YYCURSOR parser->cursor

Definition at line 20 of file bytecode.c.

Referenced by get_inline(), and sycklex_bytecode_utf8().

#define YYFILL | ( |  | n | ) | syck_parser_read(parser)

Definition at line 28 of file bytecode.c.

Referenced by get_inline(), and sycklex_bytecode_utf8().

#define YYLIMIT parser->limit

Definition at line 22 of file bytecode.c.

Referenced by get_inline(), and sycklex_bytecode_utf8().

#define YYLINE parser->linect

Definition at line 27 of file bytecode.c.

#define YYLINECTPTR parser->linectptr

Definition at line 26 of file bytecode.c.

#define YYLINEPTR parser->lineptr

Definition at line 25 of file bytecode.c.

#define YYMARKER parser->marker

Definition at line 21 of file bytecode.c.

Referenced by sycklex_bytecode_utf8().

#define YYPOS | ( |  | n | ) | YYCURSOR = YYTOKEN + n

Definition at line 38 of file bytecode.c.

Referenced by sycklex_bytecode_utf8().

#define YYTOKEN parser->token

Definition at line 23 of file bytecode.c.

Referenced by sycklex_bytecode_utf8().

#define YYTOKTMP parser->toktmp

Definition at line 24 of file bytecode.c.

## Function Documentation

char * get_inline | ( | SyckParser * | parser | ) |

Definition at line 1099 of file bytecode.c.

References CAT, CHK_NL, S_ALLOC_N, strscanner::str, tok, YYCTYPE, YYCURSOR, YYFILL, and YYLIMIT.

Referenced by sycklex_bytecode_utf8().

int sycklex_bytecode_utf8 | ( | YYSTYPE * | sycklval,
|  | SyckParser * | parser
| ) |  |

Definition at line 134 of file bytecode.c.

References ADD_BYTE_LEVEL, CAT, CHK_NL, count, CURRENT_LEVEL, _syck_node::data, _syck_level::domain, ENSURE_YAML_IEND, FORCE_NEXT_TOKEN, _syck_parser::force_token, free, get_inline(), _syck_parser::implicit_typing, YYSTYPE::name, _syck_level::ncount, YYSTYPE::nodeData, NULL, POP_LEVEL, S_ALLOC_N, S_MEMCPY, _syck_level::spaces, _syck_level::status, _syck_node::str, strscanner::str, strtod, syck_alloc_str(), syck_hdlr_remove_anchor(), syck_lvl_doc, syck_lvl_header, syck_lvl_map, syck_lvl_open, syck_lvl_seq, syck_lvl_str, syck_parser_read(), syck_strndup(), _syck_parser::taguri_expansion, tok, try_tag_implicit(), YAML_ALIAS, YAML_ANCHOR, YAML_DOCSEP, YAML_IEND, YAML_INDENT, YAML_IOPEN, YAML_ITRANSFER, YAML_PLAIN, YAML_TAGURI, YAML_TRANSFER, YYCTYPE, YYCURSOR, YYFILL, YYLIMIT, YYMARKER, YYPOS, and YYTOKEN.

Referenced by sycklex().

## Variable Documentation

SyckParser* syck_parser_ptr

Definition at line 233 of file token.c.