Ruby
2.0.0p648(2015-12-16revision53162)
|
#include "ruby/ruby.h"
#include "ruby/st.h"
#include "ruby/encoding.h"
#include "internal.h"
#include "node.h"
#include "parse.h"
#include "id.h"
#include "regenc.h"
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include "probes.h"
#include "id.c"
#include "ruby/regex.h"
#include "ruby/util.h"
#include "lex.c"
Go to the source code of this file.
Data Structures | |
struct | vtable |
struct | local_vars |
struct | token_info |
struct | parser_params |
union | yyalloc |
struct | magic_comment |
struct | reg_named_capture_assign_t |
struct | symbols |
Macros | |
#define | YYBISON 1 |
#define | YYBISON_VERSION "2.5" |
#define | YYSKELETON_NAME "yacc.c" |
#define | YYPURE 1 |
#define | YYPUSH 0 |
#define | YYPULL 1 |
#define | YYLSP_NEEDED 0 |
#define | PARSER_DEBUG 0 |
#define | YYDEBUG 1 |
#define | YYERROR_VERBOSE 1 |
#define | YYSTACK_USE_ALLOCA 0 |
#define | numberof(array) (int)(sizeof(array) / sizeof((array)[0])) |
#define | YYMALLOC(size) rb_parser_malloc(parser, (size)) |
#define | YYREALLOC(ptr, size) rb_parser_realloc(parser, (ptr), (size)) |
#define | YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size)) |
#define | YYFREE(ptr) rb_parser_free(parser, (ptr)) |
#define | malloc YYMALLOC |
#define | realloc YYREALLOC |
#define | calloc YYCALLOC |
#define | free YYFREE |
#define | REGISTER_SYMID(id, name) register_symid((id), (name), strlen(name), enc) |
#define | is_notop_id(id) ((id)>tLAST_OP_ID) |
#define | is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL) |
#define | is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL) |
#define | is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE) |
#define | is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET) |
#define | is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST) |
#define | is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS) |
#define | is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK) |
#define | id_type(id) (is_notop_id(id) ? (int)((id)&ID_SCOPE_MASK) : -1) |
#define | is_asgn_or_id(id) |
#define | DEF_EXPR(n) EXPR_##n = (1 << EXPR_##n##_bit) |
#define | IS_lex_state_for(x, ls) ((x) & (ls)) |
#define | IS_lex_state(ls) IS_lex_state_for(lex_state, (ls)) |
#define | BITSTACK_PUSH(stack, n) ((stack) = ((stack)<<1)|((n)&1)) |
#define | BITSTACK_POP(stack) ((stack) = (stack) >> 1) |
#define | BITSTACK_LEXPOP(stack) ((stack) = ((stack) >> 1) | ((stack) & 1)) |
#define | BITSTACK_SET_P(stack) ((stack)&1) |
#define | COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n)) |
#define | COND_POP() BITSTACK_POP(cond_stack) |
#define | COND_LEXPOP() BITSTACK_LEXPOP(cond_stack) |
#define | COND_P() BITSTACK_SET_P(cond_stack) |
#define | CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n)) |
#define | CMDARG_POP() BITSTACK_POP(cmdarg_stack) |
#define | CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack) |
#define | CMDARG_P() BITSTACK_SET_P(cmdarg_stack) |
#define | DVARS_INHERIT ((void*)1) |
#define | DVARS_TOPSCOPE NULL |
#define | DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl)) |
#define | POINTER_P(val) ((VALUE)(val) & ~(VALUE)3) |
#define | VTBL_DEBUG 0 |
#define | STR_NEW(p, n) rb_enc_str_new((p),(n),current_enc) |
#define | STR_NEW0() rb_enc_str_new(0,0,current_enc) |
#define | STR_NEW2(p) rb_enc_str_new((p),strlen(p),current_enc) |
#define | STR_NEW3(p, n, e, func) parser_str_new((p),(n),(e),(func),current_enc) |
#define | ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT) |
#define | TOK_INTERN(mb) rb_intern3(tok(), toklen(), current_enc) |
#define | yyerror(msg) parser_yyerror(parser, (msg)) |
#define | lex_strterm (parser->parser_lex_strterm) |
#define | lex_state (parser->parser_lex_state) |
#define | cond_stack (parser->parser_cond_stack) |
#define | cmdarg_stack (parser->parser_cmdarg_stack) |
#define | class_nest (parser->parser_class_nest) |
#define | paren_nest (parser->parser_paren_nest) |
#define | lpar_beg (parser->parser_lpar_beg) |
#define | brace_nest (parser->parser_brace_nest) |
#define | in_single (parser->parser_in_single) |
#define | in_def (parser->parser_in_def) |
#define | compile_for_eval (parser->parser_compile_for_eval) |
#define | cur_mid (parser->parser_cur_mid) |
#define | in_defined (parser->parser_in_defined) |
#define | tokenbuf (parser->parser_tokenbuf) |
#define | tokidx (parser->parser_tokidx) |
#define | toksiz (parser->parser_toksiz) |
#define | tokline (parser->parser_tokline) |
#define | lex_input (parser->parser_lex_input) |
#define | lex_lastline (parser->parser_lex_lastline) |
#define | lex_nextline (parser->parser_lex_nextline) |
#define | lex_pbeg (parser->parser_lex_pbeg) |
#define | lex_p (parser->parser_lex_p) |
#define | lex_pend (parser->parser_lex_pend) |
#define | heredoc_end (parser->parser_heredoc_end) |
#define | command_start (parser->parser_command_start) |
#define | deferred_nodes (parser->parser_deferred_nodes) |
#define | lex_gets_ptr (parser->parser_lex_gets_ptr) |
#define | lex_gets (parser->parser_lex_gets) |
#define | lvtbl (parser->parser_lvtbl) |
#define | ruby__end__seen (parser->parser_ruby__end__seen) |
#define | ruby_sourceline (parser->parser_ruby_sourceline) |
#define | ruby_sourcefile (parser->parser_ruby_sourcefile) |
#define | ruby_sourcefile_string (parser->parser_ruby_sourcefile_string) |
#define | current_enc (parser->enc) |
#define | yydebug (parser->parser_yydebug) |
#define | ruby_eval_tree (parser->parser_eval_tree) |
#define | ruby_eval_tree_begin (parser->parser_eval_tree_begin) |
#define | ruby_debug_lines (parser->debug_lines) |
#define | ruby_coverage (parser->coverage) |
#define | yyparse ruby_yyparse |
#define | rb_node_newnode(type, a1, a2, a3) node_newnode(parser, (type), (a1), (a2), (a3)) |
#define | cond(node) cond_gen(parser, (node)) |
#define | logop(type, node1, node2) logop_gen(parser, (type), (node1), (node2)) |
#define | value_expr(node) value_expr_gen(parser, (node) = remove_begin(node)) |
#define | void_expr0(node) void_expr_gen(parser, (node)) |
#define | void_expr(node) void_expr0((node) = remove_begin(node)) |
#define | void_stmts(node) void_stmts_gen(parser, (node)) |
#define | reduce_nodes(n) reduce_nodes_gen(parser,(n)) |
#define | block_dup_check(n1, n2) block_dup_check_gen(parser,(n1),(n2)) |
#define | block_append(h, t) block_append_gen(parser,(h),(t)) |
#define | list_append(l, i) list_append_gen(parser,(l),(i)) |
#define | list_concat(h, t) list_concat_gen(parser,(h),(t)) |
#define | arg_append(h, t) arg_append_gen(parser,(h),(t)) |
#define | arg_concat(h, t) arg_concat_gen(parser,(h),(t)) |
#define | literal_concat(h, t) literal_concat_gen(parser,(h),(t)) |
#define | new_evstr(n) new_evstr_gen(parser,(n)) |
#define | evstr2dstr(n) evstr2dstr_gen(parser,(n)) |
#define | call_bin_op(recv, id, arg1) call_bin_op_gen(parser, (recv),(id),(arg1)) |
#define | call_uni_op(recv, id) call_uni_op_gen(parser, (recv),(id)) |
#define | new_args(f, o, r, p, t) new_args_gen(parser, (f),(o),(r),(p),(t)) |
#define | new_args_tail(k, kr, b) new_args_tail_gen(parser, (k),(kr),(b)) |
#define | ret_args(node) ret_args_gen(parser, (node)) |
#define | new_yield(node) new_yield_gen(parser, (node)) |
#define | dsym_node(node) dsym_node_gen(parser, (node)) |
#define | gettable(id) gettable_gen(parser,(id)) |
#define | assignable(id, node) assignable_gen(parser, (id), (node)) |
#define | aryset(node1, node2) aryset_gen(parser, (node1), (node2)) |
#define | attrset(node, id) attrset_gen(parser, (node), (id)) |
#define | rb_backref_error(n) rb_backref_error_gen(parser,(n)) |
#define | node_assign(node1, node2) node_assign_gen(parser, (node1), (node2)) |
#define | new_attr_op_assign(lhs, type, attr, op, rhs) new_attr_op_assign_gen(parser, (lhs), (attr), (op), (rhs)) |
#define | new_const_op_assign(lhs, op, rhs) new_const_op_assign_gen(parser, (lhs), (op), (rhs)) |
#define | match_op(node1, node2) match_op_gen(parser, (node1), (node2)) |
#define | local_tbl() local_tbl_gen(parser) |
#define | reg_compile(str, options) reg_compile_gen(parser, (str), (options)) |
#define | reg_fragment_setenc(str, options) reg_fragment_setenc_gen(parser, (str), (options)) |
#define | reg_fragment_check(str, options) reg_fragment_check_gen(parser, (str), (options)) |
#define | reg_named_capture_assign(regexp, match) reg_named_capture_assign_gen(parser,(regexp),(match)) |
#define | get_id(id) (id) |
#define | get_value(val) (val) |
#define | new_op_assign(lhs, op, rhs) new_op_assign_gen(parser, (lhs), (op), (rhs)) |
#define | formal_argument(id) formal_argument_gen(parser, (id)) |
#define | shadowing_lvar(name) shadowing_lvar_gen(parser, (name)) |
#define | new_bv(id) new_bv_gen(parser, (id)) |
#define | local_push(top) local_push_gen(parser,(top)) |
#define | local_pop() local_pop_gen(parser) |
#define | local_var(id) local_var_gen(parser, (id)) |
#define | arg_var(id) arg_var_gen(parser, (id)) |
#define | local_id(id) local_id_gen(parser, (id)) |
#define | internal_id() internal_id_gen(parser) |
#define | dyna_push() dyna_push_gen(parser) |
#define | dyna_pop(node) dyna_pop_gen(parser, (node)) |
#define | dyna_in_block() dyna_in_block_gen(parser) |
#define | dyna_var(id) local_var(id) |
#define | dvar_defined(id) dvar_defined_gen(parser, (id), 0) |
#define | dvar_defined_get(id) dvar_defined_gen(parser, (id), 1) |
#define | dvar_curr(id) dvar_curr_gen(parser, (id)) |
#define | lvar_defined(id) lvar_defined_gen(parser, (id)) |
#define | RE_OPTION_ONCE (1<<16) |
#define | RE_OPTION_ENCODING_SHIFT 8 |
#define | RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT) |
#define | RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff) |
#define | RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE) |
#define | RE_OPTION_MASK 0xff |
#define | RE_OPTION_ARG_ENCODING_NONE 32 |
#define | NODE_STRTERM NODE_ZARRAY /* nothing to gc */ |
#define | NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ |
#define | SIGN_EXTEND(x, n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) |
#define | nd_func u1.id |
#define | nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) |
#define | nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2) |
#define | nd_nest u3.cnt |
#define | Qnone 0 |
#define | ifndef_ripper(x) (x) |
#define | rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt)) |
#define | rb_warnI(fmt, a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) |
#define | rb_warnS(fmt, a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) |
#define | rb_warn4S(file, line, fmt, a) rb_compile_warn((file), (line), (fmt), (a)) |
#define | rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt)) |
#define | rb_warningS(fmt, a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt), (a)) |
#define | rb_compile_error rb_compile_error_with_enc |
#define | compile_error parser->nerr++,rb_compile_error_with_enc |
#define | PARSER_ARG ruby_sourcefile, ruby_sourceline, current_enc, |
#define | token_info_push(token) (RTEST(ruby_verbose) ? token_info_push(parser, (token)) : (void)0) |
#define | token_info_pop(token) (RTEST(ruby_verbose) ? token_info_pop(parser, (token)) : (void)0) |
#define | YYERROR_VERBOSE 1 |
#define | YYTOKEN_TABLE 0 |
#define | YYTOKENTYPE |
#define | YYSIZE_T unsigned int |
#define | YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
#define | YY_(msgid) msgid |
#define | YYUSE(e) ((void) (e)) |
#define | YYID(n) (n) |
#define | YYSTACK_ALLOC YYMALLOC |
#define | YYSTACK_FREE YYFREE |
#define | YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
#define | YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
#define | YYSTACK_BYTES(N) |
#define | YYCOPY_NEEDED 1 |
#define | YYSTACK_RELOCATE(Stack_alloc, Stack) |
#define | YYCOPY(To, From, Count) |
#define | YYFINAL 3 |
#define | YYLAST 10700 |
#define | YYNTOKENS 142 |
#define | YYNNTS 199 |
#define | YYNRULES 620 |
#define | YYNSTATES 1057 |
#define | YYUNDEFTOK 2 |
#define | YYMAXUTOK 352 |
#define | YYTRANSLATE(YYX) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define | YYPACT_NINF -808 |
#define | YYTABLE_NINF -621 |
#define | yypact_value_is_default(yystate) ((yystate) == (-808)) |
#define | yytable_value_is_error(yytable_value) ((yytable_value) == (-621)) |
#define | yyerrok (yyerrstatus = 0) |
#define | yyclearin (yychar = YYEMPTY) |
#define | YYEMPTY (-2) |
#define | YYEOF 0 |
#define | YYACCEPT goto yyacceptlab |
#define | YYABORT goto yyabortlab |
#define | YYERROR goto yyerrorlab |
#define | YYFAIL goto yyerrlab |
#define | YYRECOVERING() (!!yyerrstatus) |
#define | YYBACKUP(Token, Value) |
#define | YYTERROR 1 |
#define | YYERRCODE 256 |
#define | YYRHSLOC(Rhs, K) ((Rhs)[K]) |
#define | YYLLOC_DEFAULT(Current, Rhs, N) |
#define | YY_LOCATION_PRINT(File, Loc) ((void) 0) |
#define | YYLEX yylex (&yylval, parser) |
#define | YYFPRINTF fprintf |
#define | YYDPRINTF(Args) |
#define | YY_SYMBOL_PRINT(Title, Type, Value, Location) |
#define | YY_STACK_PRINT(Bottom, Top) |
#define | YY_REDUCE_PRINT(Rule) |
#define | YYINITDEPTH 200 |
#define | YYMAXDEPTH 10000 |
#define | YYCASE_(N, S) |
#define | YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
#define | YYSYNTAX_ERROR |
#define | yylval (*((YYSTYPE*)(parser->parser_yylval))) |
#define | nextc() parser_nextc(parser) |
#define | pushback(c) parser_pushback(parser, (c)) |
#define | newtok() parser_newtok(parser) |
#define | tokspace(n) parser_tokspace(parser, (n)) |
#define | tokadd(c) parser_tokadd(parser, (c)) |
#define | tok_hex(numlen) parser_tok_hex(parser, (numlen)) |
#define | read_escape(flags, e) parser_read_escape(parser, (flags), (e)) |
#define | tokadd_escape(e) parser_tokadd_escape(parser, (e)) |
#define | regx_options() parser_regx_options(parser) |
#define | tokadd_string(f, t, p, n, e) parser_tokadd_string(parser,(f),(t),(p),(n),(e)) |
#define | parse_string(n) parser_parse_string(parser,(n)) |
#define | tokaddmbc(c, enc) parser_tokaddmbc(parser, (c), (enc)) |
#define | here_document(n) parser_here_document(parser,(n)) |
#define | heredoc_identifier() parser_heredoc_identifier(parser) |
#define | heredoc_restore(n) parser_heredoc_restore(parser,(n)) |
#define | whole_match_p(e, l, i) parser_whole_match_p(parser,(e),(l),(i)) |
#define | set_yylval_str(x) (yylval.node = NEW_STR(x)) |
#define | set_yylval_num(x) (yylval.num = (x)) |
#define | set_yylval_id(x) (yylval.id = (x)) |
#define | set_yylval_name(x) (yylval.id = (x)) |
#define | set_yylval_literal(x) (yylval.node = NEW_LIT(x)) |
#define | set_yylval_node(x) (yylval.node = (x)) |
#define | yylval_id() (yylval.id) |
#define | ripper_flush(p) (void)(p) |
#define | SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) |
#define | parser_encoding_name() (current_enc->name) |
#define | parser_mbclen() mbclen((lex_p-1),lex_pend,current_enc) |
#define | parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,current_enc) |
#define | is_identchar(p, e, enc) (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p))) |
#define | parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,current_enc)) |
#define | parser_isascii() ISASCII(*(lex_p-1)) |
#define | STR_FUNC_ESCAPE 0x01 |
#define | STR_FUNC_EXPAND 0x02 |
#define | STR_FUNC_REGEXP 0x04 |
#define | STR_FUNC_QWORDS 0x08 |
#define | STR_FUNC_SYMBOL 0x10 |
#define | STR_FUNC_INDENT 0x20 |
#define | lex_goto_eol(parser) ((parser)->parser_lex_p = (parser)->parser_lex_pend) |
#define | lex_eol_p() (lex_p >= lex_pend) |
#define | peek(c) peek_n((c), 0) |
#define | peek_n(c, n) (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n]) |
#define | was_bol() (lex_p == lex_pbeg + 1) |
#define | tokfix() (tokenbuf[tokidx]='\0') |
#define | tok() tokenbuf |
#define | toklen() tokidx |
#define | toklast() (tokidx>0?tokenbuf[tokidx-1]:0) |
#define | tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) |
#define | ESCAPE_CONTROL 1 |
#define | ESCAPE_META 2 |
#define | tokadd_mbchar(c) parser_tokadd_mbchar(parser, (c)) |
#define | mixed_error(enc1, enc2) |
#define | mixed_escape(beg, enc1, enc2) |
#define | NEW_STRTERM(func, term, paren) rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) |
#define | flush_string_content(enc) ((void)(enc)) |
#define | BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0) |
#define | SPECIAL_PUNCT(idx) |
#define | dispatch_heredoc_end() ((void)0) |
#define | arg_ambiguous() (arg_ambiguous_gen(parser), 1) |
#define | str_copy(_s, _p, _n) |
#define | IS_ARG() IS_lex_state(EXPR_ARG_ANY) |
#define | IS_END() IS_lex_state(EXPR_END_ANY) |
#define | IS_BEG() IS_lex_state(EXPR_BEG_ANY) |
#define | IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c)) |
#define | IS_LABEL_POSSIBLE() ((IS_lex_state(EXPR_BEG | EXPR_ENDFN) && !cmd_state) || IS_ARG()) |
#define | IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1)) |
#define | IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT) |
#define | ambiguous_operator(op, syn) |
#define | warn_balanced(op, syn) |
#define | no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0) |
#define | parser_warning(node, mesg) parser_warning(parser, (node), (mesg)) |
#define | parser_warn(node, mesg) parser_warn(parser, (node), (mesg)) |
#define | assignable_result(x) (x) |
#define | LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1)) |
#define | subnodes(n1, n2) |
#define | op_tbl_count numberof(op_tbl) |
#define | ENABLE_SELECTOR_NAMESPACE 0 |
#define | IDSET_ATTRSET_FOR_SYNTAX ((1U<<ID_LOCAL)|(1U<<ID_CONST)) |
#define | IDSET_ATTRSET_FOR_INTERN (~(~0U<<(1<<ID_SCOPE_SHIFT)) & ~(1U<<ID_ATTRSET)) |
#define | HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE)) |
#define | NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) |
#define | ADD2HEAP(n, c, p) |
Typedefs | |
typedef VALUE | stack_type |
typedef struct token_info | token_info |
typedef unsigned char | yytype_uint8 |
typedef short int | yytype_int8 |
typedef unsigned short int | yytype_uint16 |
typedef short int | yytype_int16 |
typedef long(* | rb_magic_comment_length_t) (struct parser_params *parser, const char *name, long len) |
typedef void(* | rb_magic_comment_setter_t) (struct parser_params *parser, const char *name, const char *val) |
Functions | |
static ID | register_symid (ID, const char *, long, rb_encoding *) |
static ID | register_symid_str (ID, VALUE) |
static int | vtable_size (const struct vtable *tbl) |
static struct vtable * | vtable_alloc (struct vtable *prev) |
static void | vtable_free (struct vtable *tbl) |
static void | vtable_add (struct vtable *tbl, ID id) |
static int | vtable_included (const struct vtable *tbl, ID id) |
static int | parser_yyerror (struct parser_params *, const char *) |
static int | yylex (void *, void *) |
static NODE * | node_newnode (struct parser_params *, enum node_type, VALUE, VALUE, VALUE) |
static NODE * | cond_gen (struct parser_params *, NODE *) |
static NODE * | logop_gen (struct parser_params *, enum node_type, NODE *, NODE *) |
static NODE * | newline_node (NODE *) |
static void | fixpos (NODE *, NODE *) |
static int | value_expr_gen (struct parser_params *, NODE *) |
static void | void_expr_gen (struct parser_params *, NODE *) |
static NODE * | remove_begin (NODE *) |
static void | void_stmts_gen (struct parser_params *, NODE *) |
static void | reduce_nodes_gen (struct parser_params *, NODE **) |
static void | block_dup_check_gen (struct parser_params *, NODE *, NODE *) |
static NODE * | block_append_gen (struct parser_params *, NODE *, NODE *) |
static NODE * | list_append_gen (struct parser_params *, NODE *, NODE *) |
static NODE * | list_concat_gen (struct parser_params *, NODE *, NODE *) |
static NODE * | arg_append_gen (struct parser_params *, NODE *, NODE *) |
static NODE * | arg_concat_gen (struct parser_params *, NODE *, NODE *) |
static NODE * | literal_concat_gen (struct parser_params *, NODE *, NODE *) |
static int | literal_concat0 (struct parser_params *, VALUE, VALUE) |
static NODE * | new_evstr_gen (struct parser_params *, NODE *) |
static NODE * | evstr2dstr_gen (struct parser_params *, NODE *) |
static NODE * | splat_array (NODE *) |
static NODE * | call_bin_op_gen (struct parser_params *, NODE *, ID, NODE *) |
static NODE * | call_uni_op_gen (struct parser_params *, NODE *, ID) |
static NODE * | new_args_gen (struct parser_params *, NODE *, NODE *, ID, NODE *, NODE *) |
static NODE * | new_args_tail_gen (struct parser_params *, NODE *, ID, ID) |
static NODE * | negate_lit (NODE *) |
static NODE * | ret_args_gen (struct parser_params *, NODE *) |
static NODE * | arg_blk_pass (NODE *, NODE *) |
static NODE * | new_yield_gen (struct parser_params *, NODE *) |
static NODE * | dsym_node_gen (struct parser_params *, NODE *) |
static NODE * | gettable_gen (struct parser_params *, ID) |
static NODE * | assignable_gen (struct parser_params *, ID, NODE *) |
static NODE * | aryset_gen (struct parser_params *, NODE *, NODE *) |
static NODE * | attrset_gen (struct parser_params *, NODE *, ID) |
static void | rb_backref_error_gen (struct parser_params *, NODE *) |
static NODE * | node_assign_gen (struct parser_params *, NODE *, NODE *) |
static NODE * | new_op_assign_gen (struct parser_params *parser, NODE *lhs, ID op, NODE *rhs) |
static NODE * | new_attr_op_assign_gen (struct parser_params *parser, NODE *lhs, ID attr, ID op, NODE *rhs) |
static NODE * | new_const_op_assign_gen (struct parser_params *parser, NODE *lhs, ID op, NODE *rhs) |
static NODE * | match_op_gen (struct parser_params *, NODE *, NODE *) |
static ID * | local_tbl_gen (struct parser_params *) |
static void | fixup_nodes (NODE **) |
static VALUE | reg_compile_gen (struct parser_params *, VALUE, int) |
static void | reg_fragment_setenc_gen (struct parser_params *, VALUE, int) |
static int | reg_fragment_check_gen (struct parser_params *, VALUE, int) |
static NODE * | reg_named_capture_assign_gen (struct parser_params *parser, VALUE regexp, NODE *match) |
static ID | formal_argument_gen (struct parser_params *, ID) |
static ID | shadowing_lvar_gen (struct parser_params *, ID) |
static void | new_bv_gen (struct parser_params *, ID) |
static void | local_push_gen (struct parser_params *, int) |
static void | local_pop_gen (struct parser_params *) |
static int | local_var_gen (struct parser_params *, ID) |
static int | arg_var_gen (struct parser_params *, ID) |
static int | local_id_gen (struct parser_params *, ID) |
static ID | internal_id_gen (struct parser_params *) |
static const struct vtable * | dyna_push_gen (struct parser_params *) |
static void | dyna_pop_gen (struct parser_params *, const struct vtable *) |
static int | dyna_in_block_gen (struct parser_params *) |
static int | dvar_defined_gen (struct parser_params *, ID, int) |
static int | dvar_curr_gen (struct parser_params *, ID) |
static int | lvar_defined_gen (struct parser_params *, ID) |
static void | token_info_push (struct parser_params *, const char *token) |
static void | token_info_pop (struct parser_params *, const char *token) |
static void | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep, struct parser_params *parser) |
static void | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep, struct parser_params *parser) |
static void | yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
static void | yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser) |
static YYSIZE_T | yystrlen (char *yystr) const |
static char * | yystpcpy (char *yydest, const char *yysrc) |
static YYSIZE_T | yytnamerr (char *yyres, const char *yystr) |
static int | yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) |
static void | yydestruct (char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser) const |
int | yyparse () |
int | yyparse (struct parser_params *parser) |
static int | parser_regx_options (struct parser_params *) |
static int | parser_tokadd_string (struct parser_params *, int, int, int, long *, rb_encoding **) |
static void | parser_tokaddmbc (struct parser_params *parser, int c, rb_encoding *enc) |
static int | parser_parse_string (struct parser_params *, NODE *) |
static int | parser_here_document (struct parser_params *, NODE *) |
static int | token_info_get_column (struct parser_params *parser, const char *token) |
static int | token_info_has_nonspaces (struct parser_params *parser, const char *token) |
static void | parser_prepare (struct parser_params *parser) |
static VALUE | debug_lines (VALUE fname) |
static VALUE | coverage (VALUE fname, int n) |
static int | e_option_supplied (struct parser_params *parser) |
static VALUE | yycompile0 (VALUE arg) |
static NODE * | yycompile (struct parser_params *parser, VALUE fname, int line) |
static rb_encoding * | must_be_ascii_compatible (VALUE s) |
static VALUE | lex_get_str (struct parser_params *parser, VALUE s) |
static VALUE | lex_getline (struct parser_params *parser) |
static NODE * | parser_compile_string (volatile VALUE vparser, VALUE fname, VALUE s, int line) |
NODE * | rb_compile_string (const char *f, VALUE s, int line) |
NODE * | rb_parser_compile_string (volatile VALUE vparser, const char *f, VALUE s, int line) |
NODE * | rb_parser_compile_string_path (volatile VALUE vparser, VALUE f, VALUE s, int line) |
NODE * | rb_compile_cstr (const char *f, const char *s, int len, int line) |
NODE * | rb_parser_compile_cstr (volatile VALUE vparser, const char *f, const char *s, int len, int line) |
static VALUE | lex_io_gets (struct parser_params *parser, VALUE io) |
NODE * | rb_compile_file (const char *f, VALUE file, int start) |
NODE * | rb_parser_compile_file (volatile VALUE vparser, const char *f, VALUE file, int start) |
NODE * | rb_parser_compile_file_path (volatile VALUE vparser, VALUE fname, VALUE file, int start) |
static VALUE | parser_str_new (const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0) |
static int | parser_nextc (struct parser_params *parser) |
static void | parser_pushback (struct parser_params *parser, int c) |
static char * | parser_newtok (struct parser_params *parser) |
static char * | parser_tokspace (struct parser_params *parser, int n) |
static void | parser_tokadd (struct parser_params *parser, int c) |
static int | parser_tok_hex (struct parser_params *parser, size_t *numlen) |
static int | parser_tokadd_utf8 (struct parser_params *parser, rb_encoding **encp, int string_literal, int symbol_literal, int regexp_literal) |
static int | parser_read_escape (struct parser_params *parser, int flags, rb_encoding **encp) |
static int | parser_tokadd_escape (struct parser_params *parser, rb_encoding **encp) |
static void | dispose_string (VALUE str) |
static int | parser_tokadd_mbchar (struct parser_params *parser, int c) |
static int | simple_re_meta (int c) |
static int | is_global_name_punct (const char c) |
static int | parser_peek_variable_name (struct parser_params *parser) |
static int | parser_heredoc_identifier (struct parser_params *parser) |
static void | parser_heredoc_restore (struct parser_params *parser, NODE *here) |
static int | parser_whole_match_p (struct parser_params *parser, const char *eos, long len, int indent) |
static void | arg_ambiguous_gen (struct parser_params *parser) |
static long | parser_encode_length (struct parser_params *parser, const char *name, long len) |
static void | parser_set_encode (struct parser_params *parser, const char *name) |
static int | comment_at_top (struct parser_params *parser) |
static void | magic_comment_encoding (struct parser_params *parser, const char *name, const char *val) |
static void | parser_set_token_info (struct parser_params *parser, const char *name, const char *val) |
static const char * | magic_comment_marker (const char *str, long len) |
static int | parser_magic_comment (struct parser_params *parser, const char *str, long len) |
static void | set_file_encoding (struct parser_params *parser, const char *str, const char *send) |
static int | parser_yylex (struct parser_params *parser) |
static enum node_type | nodetype (NODE *node) |
static int | nodeline (NODE *node) |
static void | parser_warning (struct parser_params *parser, NODE *node, const char *mesg) |
static void | parser_warn (struct parser_params *parser, NODE *node, const char *mesg) |
static int | is_private_local_id (ID name) |
ID | rb_id_attrset (ID id) |
static int | is_static_content (NODE *node) |
static int | assign_in_cond (struct parser_params *parser, NODE *node) |
static void | warn_unless_e_option (struct parser_params *parser, NODE *node, const char *str) |
static void | warning_unless_e_option (struct parser_params *parser, NODE *node, const char *str) |
static NODE * | cond0 (struct parser_params *, NODE *) |
static NODE * | range_op (struct parser_params *parser, NODE *node) |
static int | literal_node (NODE *node) |
static void | no_blockarg (struct parser_params *parser, NODE *node) |
static void | warn_unused_var (struct parser_params *parser, struct local_vars *local) |
static void | dyna_pop_1 (struct parser_params *parser) |
static int | reg_named_capture_assign_iter (const OnigUChar *name, const OnigUChar *name_end, int back_num, int *back_refs, OnigRegex regex, void *arg0) |
void | rb_gc_mark_parser (void) |
NODE * | rb_parser_append_print (VALUE vparser, NODE *node) |
NODE * | rb_parser_while_loop (VALUE vparser, NODE *node, int chop, int split) |
void | Init_sym (void) |
void | rb_gc_mark_symbols (void) |
static int | is_special_global_name (const char *m, const char *e, rb_encoding *enc) |
int | rb_symname_p (const char *name) |
int | rb_enc_symname_p (const char *name, rb_encoding *enc) |
static int | rb_enc_symname_type (const char *name, long len, rb_encoding *enc, unsigned int allowed_atttset) |
int | rb_enc_symname2_p (const char *name, long len, rb_encoding *enc) |
static int | rb_str_symname_type (VALUE name, unsigned int allowed_atttset) |
static int | sym_check_asciionly (VALUE str) |
static ID | intern_str (VALUE str) |
ID | rb_intern3 (const char *name, long len, rb_encoding *enc) |
ID | rb_intern2 (const char *name, long len) |
ID | rb_intern (const char *name) |
ID | rb_intern_str (VALUE str) |
VALUE | rb_id2str (ID id) |
const char * | rb_id2name (ID id) |
static int | symbols_i (VALUE sym, ID value, VALUE ary) |
VALUE | rb_sym_all_symbols (void) |
int | rb_is_const_id (ID id) |
int | rb_is_class_id (ID id) |
int | rb_is_global_id (ID id) |
int | rb_is_instance_id (ID id) |
int | rb_is_attrset_id (ID id) |
int | rb_is_local_id (ID id) |
int | rb_is_junk_id (ID id) |
ID | rb_check_id (volatile VALUE *namep) |
Returns ID for the given name if it is interned already, or 0. More... | |
ID | rb_check_id_cstr (const char *ptr, long len, rb_encoding *enc) |
int | rb_is_const_name (VALUE name) |
int | rb_is_class_name (VALUE name) |
int | rb_is_global_name (VALUE name) |
int | rb_is_instance_name (VALUE name) |
int | rb_is_attrset_name (VALUE name) |
int | rb_is_local_name (VALUE name) |
int | rb_is_method_name (VALUE name) |
int | rb_is_junk_name (VALUE name) |
static void | parser_initialize (struct parser_params *parser) |
static void | parser_mark (void *ptr) |
static void | parser_free (void *ptr) |
static size_t | parser_memsize (const void *ptr) |
const struct kwtable * | rb_reserved_word (const char *str, unsigned int len) |
static struct parser_params * | parser_new (void) |
VALUE | rb_parser_new (void) |
VALUE | rb_parser_end_seen_p (VALUE vparser) |
VALUE | rb_parser_encoding (VALUE vparser) |
VALUE | rb_parser_get_yydebug (VALUE self) |
VALUE | rb_parser_set_yydebug (VALUE self, VALUE flag) |
void * | rb_parser_malloc (struct parser_params *parser, size_t size) |
void * | rb_parser_calloc (struct parser_params *parser, size_t nelem, size_t size) |
void * | rb_parser_realloc (struct parser_params *parser, void *ptr, size_t size) |
void | rb_parser_free (struct parser_params *parser, void *ptr) |
Variables | |
static const yytype_uint8 | yytranslate [] |
static const yytype_uint16 | yyprhs [] |
static const yytype_int16 | yyrhs [] |
static const yytype_uint16 | yyrline [] |
static const char *const | yytname [] |
static const yytype_uint16 | yyr1 [] |
static const yytype_uint8 | yyr2 [] |
static const yytype_uint16 | yydefact [] |
static const yytype_int16 | yydefgoto [] |
static const yytype_int16 | yypact [] |
static const yytype_int16 | yypgoto [] |
static const yytype_int16 | yytable [] |
static const yytype_int16 | yycheck [] |
static const yytype_uint16 | yystos [] |
static const rb_data_type_t | parser_data_type |
RUBY_FUNC_EXPORTED const unsigned int | ruby_global_name_punct_bits [(0x7e - 0x20+31)/32] |
static const struct magic_comment | magic_comments [] |
static const char | id_type_names [][9] |
struct { | |
ID token | |
const char * name | |
} | op_tbl [] |
static struct symbols | global_symbols = {tLAST_TOKEN} |
static const struct st_hash_type | symhash |
#define ADD2HEAP | ( | n, | |
c, | |||
p | |||
) |
Definition at line 17361 of file parse.c.
Referenced by rb_parser_calloc(), rb_parser_malloc(), and rb_parser_realloc().
#define ambiguous_operator | ( | op, | |
syn | |||
) |
#define arg_ambiguous | ( | ) | (arg_ambiguous_gen(parser), 1) |
Definition at line 12946 of file parse.c.
Referenced by arg_ambiguous_gen(), and parser_yylex().
#define arg_append | ( | h, | |
t | |||
) | arg_append_gen(parser,(h),(t)) |
Definition at line 451 of file parse.c.
Referenced by arg_append_gen(), node_assign_gen(), and yyparse().
#define arg_concat | ( | h, | |
t | |||
) | arg_concat_gen(parser,(h),(t)) |
Definition at line 453 of file parse.c.
Referenced by arg_concat_gen(), and yyparse().
#define arg_var | ( | id | ) | arg_var_gen(parser, (id)) |
Definition at line 560 of file parse.c.
Referenced by new_args_tail_gen(), and yyparse().
#define aryset | ( | node1, | |
node2 | |||
) | aryset_gen(parser, (node1), (node2)) |
#define assignable | ( | id, | |
node | |||
) | assignable_gen(parser, (id), (node)) |
Definition at line 485 of file parse.c.
Referenced by reg_named_capture_assign_iter(), and yyparse().
#define assignable_result | ( | x | ) | (x) |
Referenced by assignable_gen().
#define attrset | ( | node, | |
id | |||
) | attrset_gen(parser, (node), (id)) |
#define BIT | ( | c, | |
idx | |||
) | (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0) |
#define BITSTACK_LEXPOP | ( | stack | ) | ((stack) = ((stack) >> 1) | ((stack) & 1)) |
#define BITSTACK_PUSH | ( | stack, | |
n | |||
) | ((stack) = ((stack)<<1)|((n)&1)) |
#define block_append | ( | h, | |
t | |||
) | block_append_gen(parser,(h),(t)) |
Definition at line 445 of file parse.c.
Referenced by rb_parser_append_print(), rb_parser_while_loop(), reg_named_capture_assign_gen(), reg_named_capture_assign_iter(), and yyparse().
#define block_dup_check | ( | n1, | |
n2 | |||
) | block_dup_check_gen(parser,(n1),(n2)) |
#define brace_nest (parser->parser_brace_nest) |
Definition at line 375 of file parse.c.
Referenced by parser_yylex(), and yyparse().
#define call_bin_op | ( | recv, | |
id, | |||
arg1 | |||
) | call_bin_op_gen(parser, (recv),(id),(arg1)) |
#define call_uni_op | ( | recv, | |
id | |||
) | call_uni_op_gen(parser, (recv),(id)) |
#define CMDARG_LEXPOP | ( | ) | BITSTACK_LEXPOP(cmdarg_stack) |
Definition at line 178 of file parse.c.
Referenced by parser_yylex().
#define CMDARG_P | ( | ) | BITSTACK_SET_P(cmdarg_stack) |
Definition at line 179 of file parse.c.
Referenced by parser_yylex().
#define CMDARG_POP | ( | ) | BITSTACK_POP(cmdarg_stack) |
#define CMDARG_PUSH | ( | n | ) | BITSTACK_PUSH(cmdarg_stack, (n)) |
Definition at line 176 of file parse.c.
Referenced by parser_yylex(), and yyparse().
#define cmdarg_stack (parser->parser_cmdarg_stack) |
Definition at line 371 of file parse.c.
Referenced by local_pop_gen(), local_push_gen(), and yyparse().
#define command_start (parser->parser_command_start) |
Definition at line 392 of file parse.c.
Referenced by parser_peek_variable_name(), parser_yylex(), and yyparse().
#define compile_error parser->nerr++,rb_compile_error_with_enc |
Definition at line 721 of file parse.c.
Referenced by assignable_gen(), block_dup_check_gen(), gettable_gen(), literal_concat0(), new_bv_gen(), no_blockarg(), parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), parser_regx_options(), parser_tokadd_mbchar(), parser_yyerror(), parser_yylex(), rb_backref_error_gen(), reg_compile_gen(), reg_fragment_check_gen(), reg_fragment_setenc_gen(), and yyparse().
#define compile_for_eval (parser->parser_compile_for_eval) |
Definition at line 378 of file parse.c.
Referenced by local_push_gen(), parser_compile_string(), rb_parser_compile_file_path(), yycompile0(), and yyparse().
#define cond | ( | node | ) | cond_gen(parser, (node)) |
Definition at line 424 of file parse.c.
Referenced by value_expr_gen(), and yyparse().
#define COND_LEXPOP | ( | ) | BITSTACK_LEXPOP(cond_stack) |
Definition at line 173 of file parse.c.
Referenced by parser_yylex().
#define COND_P | ( | ) | BITSTACK_SET_P(cond_stack) |
Definition at line 174 of file parse.c.
Referenced by parser_yylex().
#define COND_POP | ( | ) | BITSTACK_POP(cond_stack) |
#define COND_PUSH | ( | n | ) | BITSTACK_PUSH(cond_stack, (n)) |
Definition at line 171 of file parse.c.
Referenced by parser_yylex(), and yyparse().
#define cond_stack (parser->parser_cond_stack) |
#define cur_mid (parser->parser_cur_mid) |
#define current_enc (parser->enc) |
Definition at line 401 of file parse.c.
Referenced by gettable_gen(), lex_getline(), parser_here_document(), parser_nextc(), parser_parse_string(), parser_yyerror(), parser_yylex(), rb_parser_encoding(), and reg_fragment_setenc_gen().
#define deferred_nodes (parser->parser_deferred_nodes) |
Definition at line 393 of file parse.c.
Referenced by yycompile0(), and yyparse().
#define dispatch_heredoc_end | ( | ) | ((void)0) |
Definition at line 12828 of file parse.c.
Referenced by parser_here_document().
#define dsym_node | ( | node | ) | dsym_node_gen(parser, (node)) |
#define dvar_curr | ( | id | ) | dvar_curr_gen(parser, (id)) |
Definition at line 577 of file parse.c.
Referenced by assignable_gen(), and shadowing_lvar_gen().
#define dvar_defined | ( | id | ) | dvar_defined_gen(parser, (id), 0) |
Definition at line 574 of file parse.c.
Referenced by assignable_gen(), gettable_gen(), and reg_named_capture_assign_iter().
#define dvar_defined_get | ( | id | ) | dvar_defined_gen(parser, (id), 1) |
Definition at line 575 of file parse.c.
Referenced by lvar_defined_gen(), and shadowing_lvar_gen().
#define DVARS_INHERIT ((void*)1) |
Definition at line 196 of file parse.c.
Referenced by dvar_defined_gen(), local_id_gen(), and local_push_gen().
#define DVARS_TOPSCOPE NULL |
Definition at line 197 of file parse.c.
Referenced by dyna_in_block_gen(), and local_push_gen().
#define dyna_in_block | ( | ) | dyna_in_block_gen(parser) |
Definition at line 571 of file parse.c.
Referenced by assignable_gen(), gettable_gen(), lvar_defined_gen(), shadowing_lvar_gen(), and yyparse().
#define dyna_pop | ( | node | ) | dyna_pop_gen(parser, (node)) |
#define dyna_push | ( | ) | dyna_push_gen(parser) |
Definition at line 572 of file parse.c.
Referenced by assignable_gen(), and new_bv_gen().
#define ENC_SINGLE | ( | cr | ) | ((cr)==ENC_CODERANGE_7BIT) |
Definition at line 362 of file parse.c.
Referenced by parser_yylex().
#define ESCAPE_CONTROL 1 |
Definition at line 12197 of file parse.c.
Referenced by parser_read_escape(), and parser_tokadd_escape().
#define ESCAPE_META 2 |
Definition at line 12198 of file parse.c.
Referenced by parser_read_escape(), and parser_tokadd_escape().
#define evstr2dstr | ( | n | ) | evstr2dstr_gen(parser,(n)) |
#define flush_string_content | ( | enc | ) | ((void)(enc)) |
Definition at line 12596 of file parse.c.
Referenced by parser_here_document(), and parser_parse_string().
#define formal_argument | ( | id | ) | formal_argument_gen(parser, (id)) |
Definition at line 520 of file parse.c.
Referenced by assignable_gen(), and yyparse().
#define gettable | ( | id | ) | gettable_gen(parser,(id)) |
Definition at line 483 of file parse.c.
Referenced by new_op_assign_gen(), reg_named_capture_assign_gen(), reg_named_capture_assign_iter(), and yyparse().
Definition at line 17359 of file parse.c.
Referenced by rb_parser_calloc(), rb_parser_malloc(), and rb_parser_realloc().
#define here_document | ( | n | ) | parser_here_document(parser,(n)) |
Definition at line 11461 of file parse.c.
Referenced by parser_yylex().
#define heredoc_end (parser->parser_heredoc_end) |
Definition at line 391 of file parse.c.
Referenced by parser_heredoc_restore(), and parser_nextc().
#define heredoc_identifier | ( | ) | parser_heredoc_identifier(parser) |
Definition at line 11462 of file parse.c.
Referenced by parser_yylex().
#define heredoc_restore | ( | n | ) | parser_heredoc_restore(parser,(n)) |
Definition at line 11463 of file parse.c.
Referenced by parser_here_document().
#define id_type | ( | id | ) | (is_notop_id(id) ? (int)((id)&ID_SCOPE_MASK) : -1) |
Definition at line 118 of file parse.c.
Referenced by assignable_gen(), and gettable_gen().
#define IDSET_ATTRSET_FOR_INTERN (~(~0U<<(1<<ID_SCOPE_SHIFT)) & ~(1U<<ID_ATTRSET)) |
Definition at line 16546 of file parse.c.
Referenced by rb_is_attrset_name().
#define IDSET_ATTRSET_FOR_SYNTAX ((1U<<ID_LOCAL)|(1U<<ID_CONST)) |
Definition at line 16545 of file parse.c.
Referenced by rb_enc_symname2_p(), and rb_is_junk_name().
#define ifndef_ripper | ( | x | ) | (x) |
Definition at line 687 of file parse.c.
Referenced by local_push_gen(), and yyparse().
#define in_def (parser->parser_in_def) |
Definition at line 377 of file parse.c.
Referenced by assignable_gen(), and yyparse().
#define in_defined (parser->parser_in_defined) |
#define in_single (parser->parser_in_single) |
Definition at line 376 of file parse.c.
Referenced by assignable_gen(), and yyparse().
#define internal_id | ( | ) | internal_id_gen(parser) |
Definition at line 564 of file parse.c.
Referenced by new_args_tail_gen(), and yyparse().
#define IS_AFTER_OPERATOR | ( | ) | IS_lex_state(EXPR_FNAME | EXPR_DOT) |
Definition at line 13279 of file parse.c.
Referenced by parser_yylex().
#define IS_ARG | ( | ) | IS_lex_state(EXPR_ARG_ANY) |
Definition at line 13273 of file parse.c.
Referenced by parser_yylex().
#define is_asgn_or_id | ( | id | ) |
Definition at line 120 of file parse.c.
Referenced by new_op_assign_gen().
#define is_attrset_id | ( | id | ) | (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET) |
Definition at line 114 of file parse.c.
Referenced by intern_str(), rb_id2str(), and rb_is_attrset_id().
#define IS_BEG | ( | ) | IS_lex_state(EXPR_BEG_ANY) |
Definition at line 13275 of file parse.c.
Referenced by parser_yylex().
#define is_class_id | ( | id | ) | (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS) |
Definition at line 116 of file parse.c.
Referenced by rb_is_class_id().
#define is_const_id | ( | id | ) | (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST) |
Definition at line 115 of file parse.c.
Referenced by rb_is_const_id().
#define IS_END | ( | ) | IS_lex_state(EXPR_END_ANY) |
Definition at line 13274 of file parse.c.
Referenced by parser_yylex().
#define is_global_id | ( | id | ) | (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL) |
Definition at line 112 of file parse.c.
Referenced by rb_is_global_id().
Definition at line 11560 of file parse.c.
Referenced by intern_str(), is_special_global_name(), parser_yylex(), and rb_enc_symname_type().
#define is_instance_id | ( | id | ) | (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE) |
Definition at line 113 of file parse.c.
Referenced by rb_is_instance_id().
#define is_junk_id | ( | id | ) | (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK) |
Definition at line 117 of file parse.c.
Referenced by rb_is_junk_id().
#define IS_LABEL_POSSIBLE | ( | ) | ((IS_lex_state(EXPR_BEG | EXPR_ENDFN) && !cmd_state) || IS_ARG()) |
Definition at line 13277 of file parse.c.
Referenced by parser_yylex().
Definition at line 13278 of file parse.c.
Referenced by parser_yylex().
#define IS_lex_state | ( | ls | ) | IS_lex_state_for(lex_state, (ls)) |
Definition at line 158 of file parse.c.
Referenced by parser_yylex().
#define IS_lex_state_for | ( | x, | |
ls | |||
) | ((x) & (ls)) |
Definition at line 157 of file parse.c.
Referenced by parser_yylex().
#define is_local_id | ( | id | ) | (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL) |
Definition at line 111 of file parse.c.
Referenced by formal_argument_gen(), is_private_local_id(), new_bv_gen(), parser_yylex(), rb_is_local_id(), and yyparse().
#define is_notop_id | ( | id | ) | ((id)>tLAST_OP_ID) |
Definition at line 110 of file parse.c.
Referenced by rb_id_attrset().
Definition at line 13276 of file parse.c.
Referenced by parser_yylex().
Definition at line 11993 of file parse.c.
Referenced by parser_yylex().
#define lex_gets (parser->parser_lex_gets) |
Definition at line 395 of file parse.c.
Referenced by parser_compile_string(), and rb_parser_compile_file_path().
#define lex_gets_ptr (parser->parser_lex_gets_ptr) |
Definition at line 394 of file parse.c.
Referenced by lex_get_str(), and parser_compile_string().
#define lex_goto_eol | ( | parser | ) | ((parser)->parser_lex_p = (parser)->parser_lex_pend) |
Definition at line 11992 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_nextc(), and parser_yylex().
#define lex_input (parser->parser_lex_input) |
Definition at line 385 of file parse.c.
Referenced by parser_compile_string(), parser_nextc(), and rb_parser_compile_file_path().
#define lex_lastline (parser->parser_lex_lastline) |
Definition at line 386 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_heredoc_restore(), parser_nextc(), parser_prepare(), parser_yyerror(), parser_yylex(), and yycompile0().
#define lex_nextline (parser->parser_lex_nextline) |
Definition at line 387 of file parse.c.
Referenced by parser_nextc(), parser_yylex(), and yycompile0().
#define lex_p (parser->parser_lex_p) |
Definition at line 389 of file parse.c.
Referenced by comment_at_top(), parser_compile_string(), parser_here_document(), parser_heredoc_identifier(), parser_heredoc_restore(), parser_nextc(), parser_peek_variable_name(), parser_prepare(), parser_pushback(), parser_read_escape(), parser_tok_hex(), parser_tokadd_escape(), parser_tokadd_mbchar(), parser_tokadd_string(), parser_tokadd_utf8(), parser_yyerror(), parser_yylex(), rb_parser_compile_file_path(), token_info_get_column(), token_info_has_nonspaces(), and yycompile0().
#define lex_pbeg (parser->parser_lex_pbeg) |
Definition at line 388 of file parse.c.
Referenced by comment_at_top(), parser_compile_string(), parser_heredoc_identifier(), parser_heredoc_restore(), parser_nextc(), parser_prepare(), parser_pushback(), parser_whole_match_p(), parser_yyerror(), rb_parser_compile_file_path(), token_info_get_column(), token_info_has_nonspaces(), and yycompile0().
#define lex_pend (parser->parser_lex_pend) |
Definition at line 390 of file parse.c.
Referenced by parser_compile_string(), parser_here_document(), parser_heredoc_restore(), parser_nextc(), parser_peek_variable_name(), parser_prepare(), parser_tokadd_string(), parser_whole_match_p(), parser_yyerror(), parser_yylex(), rb_parser_compile_file_path(), and yycompile0().
#define lex_state (parser->parser_lex_state) |
Definition at line 369 of file parse.c.
Referenced by parser_yylex(), and yyparse().
#define lex_strterm (parser->parser_lex_strterm) |
Definition at line 368 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_yylex(), yycompile0(), and yyparse().
#define list_append | ( | l, | |
i | |||
) | list_append_gen(parser,(l),(i)) |
Definition at line 447 of file parse.c.
Referenced by arg_append_gen(), evstr2dstr_gen(), literal_concat_gen(), and yyparse().
#define list_concat | ( | h, | |
t | |||
) | list_concat_gen(parser,(h),(t)) |
Definition at line 449 of file parse.c.
Referenced by arg_concat_gen(), literal_concat_gen(), and yyparse().
#define literal_concat | ( | h, | |
t | |||
) | literal_concat_gen(parser,(h),(t)) |
#define local_id | ( | id | ) | local_id_gen(parser, (id)) |
Definition at line 562 of file parse.c.
Referenced by assignable_gen(), gettable_gen(), lvar_defined_gen(), reg_named_capture_assign_iter(), shadowing_lvar_gen(), and yyparse().
#define local_pop | ( | ) | local_pop_gen(parser) |
#define local_push | ( | top | ) | local_push_gen(parser,(top)) |
#define local_tbl | ( | ) | local_tbl_gen(parser) |
#define local_var | ( | id | ) | local_var_gen(parser, (id)) |
Definition at line 558 of file parse.c.
Referenced by assignable_gen().
#define lpar_beg (parser->parser_lpar_beg) |
Definition at line 374 of file parse.c.
Referenced by parser_yylex(), and yyparse().
#define lvar_defined | ( | id | ) | lvar_defined_gen(parser, (id)) |
Definition at line 580 of file parse.c.
Referenced by parser_yylex().
Definition at line 15078 of file parse.c.
Referenced by dvar_defined_gen(), local_id_gen(), shadowing_lvar_gen(), and warn_unused_var().
#define lvtbl (parser->parser_lvtbl) |
Definition at line 396 of file parse.c.
Referenced by arg_var_gen(), dvar_curr_gen(), dvar_defined_gen(), dyna_in_block_gen(), dyna_pop_1(), dyna_pop_gen(), dyna_push_gen(), internal_id_gen(), local_id_gen(), local_pop_gen(), local_push_gen(), local_tbl_gen(), local_var_gen(), and shadowing_lvar_gen().
#define match_op | ( | node1, | |
node2 | |||
) | match_op_gen(parser, (node1), (node2)) |
#define mixed_error | ( | enc1, | |
enc2 | |||
) |
Referenced by parser_tokadd_string().
#define mixed_escape | ( | beg, | |
enc1, | |||
enc2 | |||
) |
Referenced by parser_tokadd_string().
Definition at line 599 of file parse.c.
Referenced by parser_parse_string().
#define nd_term | ( | node | ) | SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) |
Definition at line 597 of file parse.c.
Referenced by parser_parse_string().
#define new_args | ( | f, | |
o, | |||
r, | |||
p, | |||
t | |||
) | new_args_gen(parser, (f),(o),(r),(p),(t)) |
#define new_args_tail | ( | k, | |
kr, | |||
b | |||
) | new_args_tail_gen(parser, (k),(kr),(b)) |
#define new_attr_op_assign | ( | lhs, | |
type, | |||
attr, | |||
op, | |||
rhs | |||
) | new_attr_op_assign_gen(parser, (lhs), (attr), (op), (rhs)) |
#define new_bv | ( | id | ) | new_bv_gen(parser, (id)) |
#define new_const_op_assign | ( | lhs, | |
op, | |||
rhs | |||
) | new_const_op_assign_gen(parser, (lhs), (op), (rhs)) |
#define new_evstr | ( | n | ) | new_evstr_gen(parser,(n)) |
#define new_op_assign | ( | lhs, | |
op, | |||
rhs | |||
) | new_op_assign_gen(parser, (lhs), (op), (rhs)) |
#define NEW_STRTERM | ( | func, | |
term, | |||
paren | |||
) | rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) |
Definition at line 12577 of file parse.c.
Referenced by parser_here_document(), and parser_yylex().
#define new_yield | ( | node | ) | new_yield_gen(parser, (node)) |
#define NEWHEAP | ( | ) | rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) |
Definition at line 17360 of file parse.c.
Referenced by rb_parser_calloc(), rb_parser_malloc(), and rb_parser_realloc().
#define newtok | ( | ) | parser_newtok(parser) |
Definition at line 11451 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), parser_regx_options(), and parser_yylex().
#define nextc | ( | ) | parser_nextc(parser) |
Definition at line 11449 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), parser_prepare(), parser_read_escape(), parser_regx_options(), parser_tokadd_escape(), parser_tokadd_string(), parser_tokadd_utf8(), and parser_yylex().
#define no_digits | ( | ) | do {yyerror("numeric literal without digits"); return 0;} while (0) |
Referenced by parser_yylex().
#define node_assign | ( | node1, | |
node2 | |||
) | node_assign_gen(parser, (node1), (node2)) |
Definition at line 495 of file parse.c.
Referenced by reg_named_capture_assign_iter(), and yyparse().
#define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ |
Definition at line 591 of file parse.c.
Referenced by parser_heredoc_identifier(), and parser_yylex().
#define NODE_STRTERM NODE_ZARRAY /* nothing to gc */ |
Definition at line 92 of file parse.c.
Referenced by parser_magic_comment(), and rb_gc_mark_symbols().
Definition at line 16421 of file parse.c.
Referenced by intern_str(), and rb_id2str().
#define paren_nest (parser->parser_paren_nest) |
Definition at line 373 of file parse.c.
Referenced by parser_yylex(), and yyparse().
#define parse_string | ( | n | ) | parser_parse_string(parser,(n)) |
Definition at line 11459 of file parse.c.
Referenced by parser_yylex().
#define PARSER_ARG ruby_sourcefile, ruby_sourceline, current_enc, |
Definition at line 722 of file parse.c.
Referenced by assignable_gen(), block_dup_check_gen(), gettable_gen(), literal_concat0(), new_bv_gen(), no_blockarg(), parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), parser_regx_options(), parser_tokadd_mbchar(), parser_yyerror(), parser_yylex(), rb_backref_error_gen(), reg_compile_gen(), reg_fragment_check_gen(), reg_fragment_setenc_gen(), and yyparse().
#define parser_encoding_name | ( | ) | (current_enc->name) |
Definition at line 11557 of file parse.c.
Referenced by parser_tokadd_mbchar().
#define parser_is_identchar | ( | ) | (!parser->eofp && is_identchar((lex_p-1),lex_pend,current_enc)) |
Definition at line 11561 of file parse.c.
Referenced by parser_heredoc_identifier(), and parser_yylex().
Definition at line 11563 of file parse.c.
Referenced by parser_tokadd_string(), and parser_yylex().
#define parser_mbclen | ( | ) | mbclen((lex_p-1),lex_pend,current_enc) |
#define parser_precise_mbclen | ( | ) | rb_enc_precise_mbclen((lex_p-1),lex_pend,current_enc) |
Definition at line 11559 of file parse.c.
Referenced by parser_tokadd_mbchar().
#define parser_warn | ( | node, | |
mesg | |||
) | parser_warn(parser, (node), (mesg)) |
Definition at line 14641 of file parse.c.
Referenced by assign_in_cond(), cond0(), and warn_unless_e_option().
#define parser_warning | ( | node, | |
mesg | |||
) | parser_warning(parser, (node), (mesg)) |
Definition at line 14634 of file parse.c.
Referenced by block_append_gen(), cond0(), value_expr_gen(), and warning_unless_e_option().
#define peek | ( | c | ) | peek_n((c), 0) |
Definition at line 11994 of file parse.c.
Referenced by parser_nextc(), parser_prepare(), parser_read_escape(), parser_tokadd_utf8(), and parser_yylex().
Definition at line 11995 of file parse.c.
Referenced by parser_yylex().
Definition at line 199 of file parse.c.
Referenced by dvar_defined_gen(), dyna_in_block_gen(), local_id_gen(), vtable_add(), vtable_free(), vtable_included(), and vtable_size().
#define pushback | ( | c | ) | parser_pushback(parser, (c)) |
Definition at line 11450 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), parser_prepare(), parser_read_escape(), parser_regx_options(), parser_tokadd_escape(), parser_tokadd_string(), and parser_yylex().
#define rb_backref_error | ( | n | ) | rb_backref_error_gen(parser,(n)) |
#define rb_compile_error rb_compile_error_with_enc |
#define rb_node_newnode | ( | type, | |
a1, | |||
a2, | |||
a3 | |||
) | node_newnode(parser, (type), (a1), (a2), (a3)) |
Definition at line 421 of file parse.c.
Referenced by node_newnode(), and parser_heredoc_identifier().
#define rb_warn0 | ( | fmt | ) | rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt)) |
#define rb_warn4S | ( | file, | |
line, | |||
fmt, | |||
a | |||
) | rb_compile_warn((file), (line), (fmt), (a)) |
Definition at line 697 of file parse.c.
Referenced by warn_unused_var().
#define rb_warnI | ( | fmt, | |
a | |||
) | rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) |
Definition at line 695 of file parse.c.
Referenced by parser_yylex().
#define rb_warning0 | ( | fmt | ) | rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt)) |
Definition at line 698 of file parse.c.
Referenced by arg_ambiguous_gen(), parser_yylex(), and value_expr_gen().
#define rb_warningS | ( | fmt, | |
a | |||
) | rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt), (a)) |
Definition at line 699 of file parse.c.
Referenced by parser_yylex(), reg_named_capture_assign_iter(), and shadowing_lvar_gen().
#define rb_warnS | ( | fmt, | |
a | |||
) | rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) |
Definition at line 696 of file parse.c.
Referenced by void_expr_gen().
#define RE_OPTION_ENCODING | ( | e | ) | (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT) |
Definition at line 584 of file parse.c.
Referenced by parser_regx_options().
#define RE_OPTION_ENCODING_IDX | ( | o | ) | (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff) |
Definition at line 585 of file parse.c.
Referenced by reg_fragment_setenc_gen().
#define RE_OPTION_ENCODING_NONE | ( | o | ) | ((o)&RE_OPTION_ARG_ENCODING_NONE) |
Definition at line 586 of file parse.c.
Referenced by reg_fragment_setenc_gen().
#define RE_OPTION_MASK 0xff |
Definition at line 587 of file parse.c.
Referenced by reg_compile_gen(), and yyparse().
#define RE_OPTION_ONCE (1<<16) |
Definition at line 582 of file parse.c.
Referenced by parser_regx_options(), and yyparse().
#define read_escape | ( | flags, | |
e | |||
) | parser_read_escape(parser, (flags), (e)) |
Definition at line 11455 of file parse.c.
Referenced by parser_read_escape(), parser_tokadd_string(), and parser_yylex().
#define reduce_nodes | ( | n | ) | reduce_nodes_gen(parser,(n)) |
#define reg_compile | ( | str, | |
options | |||
) | reg_compile_gen(parser, (str), (options)) |
#define reg_fragment_check | ( | str, | |
options | |||
) | reg_fragment_check_gen(parser, (str), (options)) |
#define reg_fragment_setenc | ( | str, | |
options | |||
) | reg_fragment_setenc_gen(parser, (str), (options)) |
Definition at line 514 of file parse.c.
Referenced by reg_compile_gen(), and reg_fragment_check_gen().
#define reg_named_capture_assign | ( | regexp, | |
match | |||
) | reg_named_capture_assign_gen(parser,(regexp),(match)) |
#define regx_options | ( | ) | parser_regx_options(parser) |
Definition at line 11457 of file parse.c.
Referenced by parser_parse_string().
#define ret_args | ( | node | ) | ret_args_gen(parser, (node)) |
Definition at line 11490 of file parse.c.
Referenced by parser_heredoc_identifier(), parser_heredoc_restore(), and parser_nextc().
#define ruby__end__seen (parser->parser_ruby__end__seen) |
Definition at line 397 of file parse.c.
Referenced by parser_yylex(), and rb_parser_end_seen_p().
#define ruby_coverage (parser->coverage) |
Definition at line 408 of file parse.c.
Referenced by lex_getline(), and yycompile0().
#define ruby_debug_lines (parser->debug_lines) |
Definition at line 407 of file parse.c.
Referenced by lex_getline(), parser_set_encode(), and yycompile0().
#define ruby_eval_tree (parser->parser_eval_tree) |
Definition at line 405 of file parse.c.
Referenced by yycompile0(), and yyparse().
#define ruby_eval_tree_begin (parser->parser_eval_tree_begin) |
Definition at line 406 of file parse.c.
Referenced by yycompile0(), and yyparse().
#define ruby_sourcefile (parser->parser_ruby_sourcefile) |
Definition at line 399 of file parse.c.
Referenced by e_option_supplied(), parser_set_encode(), parser_set_token_info(), parser_warn(), parser_warning(), reg_compile_gen(), token_info_pop(), warn_unused_var(), and yycompile().
#define ruby_sourcefile_string (parser->parser_ruby_sourcefile_string) |
Definition at line 400 of file parse.c.
Referenced by gettable_gen(), yycompile(), and yycompile0().
#define ruby_sourceline (parser->parser_ruby_sourceline) |
Definition at line 398 of file parse.c.
Referenced by local_var_gen(), new_args_gen(), new_args_tail_gen(), node_newnode(), parser_heredoc_identifier(), parser_heredoc_restore(), parser_newtok(), parser_nextc(), parser_parse_string(), parser_set_encode(), parser_set_token_info(), parser_yylex(), reg_compile_gen(), shadowing_lvar_gen(), token_info_pop(), token_info_push(), void_expr_gen(), yycompile(), yycompile0(), and yyparse().
#define set_yylval_id | ( | x | ) | (yylval.id = (x)) |
Definition at line 11469 of file parse.c.
Referenced by parser_yylex().
#define set_yylval_literal | ( | x | ) | (yylval.node = NEW_LIT(x)) |
Definition at line 11471 of file parse.c.
Referenced by parser_yylex().
#define set_yylval_name | ( | x | ) | (yylval.id = (x)) |
Definition at line 11470 of file parse.c.
Referenced by parser_yylex().
#define set_yylval_node | ( | x | ) | (yylval.node = (x)) |
Definition at line 11472 of file parse.c.
Referenced by parser_yylex().
#define set_yylval_num | ( | x | ) | (yylval.num = (x)) |
Definition at line 11468 of file parse.c.
Referenced by parser_parse_string().
#define set_yylval_str | ( | x | ) | (yylval.node = NEW_STR(x)) |
Definition at line 11467 of file parse.c.
Referenced by parser_here_document(), parser_parse_string(), and parser_yylex().
#define shadowing_lvar | ( | name | ) | shadowing_lvar_gen(parser, (name)) |
Definition at line 549 of file parse.c.
Referenced by formal_argument_gen(), new_bv_gen(), and yyparse().
#define SIGN_EXTEND | ( | x, | |
n | |||
) | (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) |
#define SIGN_EXTEND_CHAR | ( | c | ) | ((((unsigned char)(c)) ^ 128) - 128) |
#define SPECIAL_PUNCT | ( | idx | ) |
#define str_copy | ( | _s, | |
_p, | |||
_n | |||
) |
Referenced by parser_magic_comment().
#define STR_FUNC_ESCAPE 0x01 |
Definition at line 11957 of file parse.c.
Referenced by parser_tokadd_string().
#define STR_FUNC_EXPAND 0x02 |
Definition at line 11958 of file parse.c.
Referenced by parser_here_document(), parser_parse_string(), and parser_tokadd_string().
#define STR_FUNC_INDENT 0x20 |
Definition at line 11962 of file parse.c.
Referenced by parser_here_document(), and parser_heredoc_identifier().
#define STR_FUNC_QWORDS 0x08 |
Definition at line 11960 of file parse.c.
Referenced by parser_parse_string(), and parser_tokadd_string().
#define STR_FUNC_REGEXP 0x04 |
Definition at line 11959 of file parse.c.
Referenced by parser_parse_string(), parser_str_new(), and parser_tokadd_string().
#define STR_FUNC_SYMBOL 0x10 |
Definition at line 11961 of file parse.c.
Referenced by parser_tokadd_string().
#define STR_NEW | ( | p, | |
n | |||
) | rb_enc_str_new((p),(n),current_enc) |
Definition at line 358 of file parse.c.
Referenced by parser_here_document(), and parser_heredoc_identifier().
#define STR_NEW0 | ( | ) | rb_enc_str_new(0,0,current_enc) |
Definition at line 359 of file parse.c.
Referenced by yycompile0(), and yyparse().
#define STR_NEW2 | ( | p | ) | rb_enc_str_new((p),strlen(p),current_enc) |
Definition at line 360 of file parse.c.
Referenced by parser_yyerror().
#define STR_NEW3 | ( | p, | |
n, | |||
e, | |||
func | |||
) | parser_str_new((p),(n),(e),(func),current_enc) |
Definition at line 361 of file parse.c.
Referenced by parser_here_document(), parser_parse_string(), and parser_yylex().
#define subnodes | ( | n1, | |
n2 | |||
) |
Referenced by reduce_nodes_gen().
#define tok | ( | ) | tokenbuf |
Definition at line 12066 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), parser_regx_options(), and parser_yylex().
#define tok_hex | ( | numlen | ) | parser_tok_hex(parser, (numlen)) |
Definition at line 11454 of file parse.c.
Referenced by parser_read_escape(), and parser_tokadd_escape().
#define TOK_INTERN | ( | mb | ) | rb_intern3(tok(), toklen(), current_enc) |
Definition at line 363 of file parse.c.
Referenced by parser_yylex().
#define tokadd | ( | c | ) | parser_tokadd(parser, (c)) |
Definition at line 11453 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), parser_regx_options(), parser_tokadd_escape(), parser_tokadd_mbchar(), parser_tokadd_string(), parser_tokadd_utf8(), and parser_yylex().
#define tokadd_escape | ( | e | ) | parser_tokadd_escape(parser, (e)) |
Definition at line 11456 of file parse.c.
Referenced by parser_tokadd_string().
#define tokadd_mbchar | ( | c | ) | parser_tokadd_mbchar(parser, (c)) |
Definition at line 12428 of file parse.c.
Referenced by parser_heredoc_identifier(), parser_tokadd_string(), and parser_yylex().
#define tokadd_string | ( | f, | |
t, | |||
p, | |||
n, | |||
e | |||
) | parser_tokadd_string(parser,(f),(t),(p),(n),(e)) |
Definition at line 11458 of file parse.c.
Referenced by parser_here_document(), and parser_parse_string().
#define tokaddmbc | ( | c, | |
enc | |||
) | parser_tokaddmbc(parser, (c), (enc)) |
Definition at line 11460 of file parse.c.
Referenced by parser_tokadd_utf8(), and parser_yylex().
Definition at line 12122 of file parse.c.
Referenced by parser_tokadd_escape(), parser_tokadd_mbchar(), and parser_tokadd_utf8().
#define token_info_pop | ( | token | ) | (RTEST(ruby_verbose) ? token_info_pop(parser, (token)) : (void)0) |
#define token_info_push | ( | token | ) | (RTEST(ruby_verbose) ? token_info_push(parser, (token)) : (void)0) |
#define tokenbuf (parser->parser_tokenbuf) |
Definition at line 381 of file parse.c.
Referenced by parser_newtok(), parser_tokadd(), and parser_tokspace().
Definition at line 12065 of file parse.c.
Referenced by parser_heredoc_identifier(), parser_parse_string(), parser_regx_options(), and parser_yylex().
#define tokidx (parser->parser_tokidx) |
Definition at line 382 of file parse.c.
Referenced by parser_newtok(), parser_tokadd(), parser_tokspace(), and parser_yylex().
Definition at line 12068 of file parse.c.
Referenced by parser_yylex().
#define toklen | ( | ) | tokidx |
Definition at line 12067 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), parser_regx_options(), and parser_yylex().
#define tokline (parser->parser_tokline) |
Definition at line 384 of file parse.c.
Referenced by gettable_gen(), parser_newtok(), and yyparse().
#define toksiz (parser->parser_toksiz) |
Definition at line 383 of file parse.c.
Referenced by parser_newtok(), parser_tokadd(), and parser_tokspace().
#define tokspace | ( | n | ) | parser_tokspace(parser, (n)) |
Definition at line 11452 of file parse.c.
Referenced by parser_tokaddmbc().
#define value_expr | ( | node | ) | value_expr_gen(parser, (node) = remove_begin(node)) |
Definition at line 434 of file parse.c.
Referenced by call_bin_op_gen(), call_uni_op_gen(), logop_gen(), match_op_gen(), range_op(), value_expr_gen(), and yyparse().
#define void_expr | ( | node | ) | void_expr0((node) = remove_begin(node)) |
#define void_expr0 | ( | node | ) | void_expr_gen(parser, (node)) |
Definition at line 435 of file parse.c.
Referenced by void_stmts_gen().
#define void_stmts | ( | node | ) | void_stmts_gen(parser, (node)) |
#define VTBL_DEBUG 0 |
Definition at line 212 of file parse.c.
Referenced by vtable_add(), vtable_alloc(), and vtable_free().
#define warn_balanced | ( | op, | |
syn | |||
) |
Definition at line 13288 of file parse.c.
Referenced by parser_yylex().
Definition at line 12063 of file parse.c.
Referenced by parser_here_document(), and parser_yylex().
#define whole_match_p | ( | e, | |
l, | |||
i | |||
) | parser_whole_match_p(parser,(e),(l),(i)) |
Definition at line 11464 of file parse.c.
Referenced by parser_here_document(), and parser_yylex().
#define YY_ | ( | msgid | ) | msgid |
Definition at line 976 of file parse.c.
Referenced by yyparse(), and yysyntax_error().
#define YY_REDUCE_PRINT | ( | Rule | ) |
#define YY_STACK_PRINT | ( | Bottom, | |
Top | |||
) |
#define YY_SYMBOL_PRINT | ( | Title, | |
Type, | |||
Value, | |||
Location | |||
) |
#define YYBACKUP | ( | Token, | |
Value | |||
) |
#define YYCALLOC | ( | nelem, | |
size | |||
) | rb_parser_calloc(parser, (nelem), (size)) |
Referenced by yysyntax_error().
#define YYCOPY | ( | To, | |
From, | |||
Count | |||
) |
#define yydebug (parser->parser_yydebug) |
Definition at line 402 of file parse.c.
Referenced by rb_parser_get_yydebug(), and rb_parser_set_yydebug().
#define YYDPRINTF | ( | Args | ) |
#define YYEMPTY (-2) |
Definition at line 4309 of file parse.c.
Referenced by yyparse(), and yysyntax_error().
#define yyerror | ( | msg | ) | parser_yyerror(parser, (msg)) |
Definition at line 366 of file parse.c.
Referenced by assign_in_cond(), assignable_gen(), formal_argument_gen(), parser_read_escape(), parser_tok_hex(), parser_tokadd_escape(), parser_tokadd_utf8(), parser_yylex(), shadowing_lvar_gen(), value_expr_gen(), and yyparse().
#define YYFPRINTF fprintf |
Definition at line 4401 of file parse.c.
Referenced by yy_reduce_print(), yy_stack_print(), and yy_symbol_print().
#define YYFREE | ( | ptr | ) | rb_parser_free(parser, (ptr)) |
#define YYLAST 10700 |
Definition at line 1138 of file parse.c.
Referenced by yyparse(), and yysyntax_error().
#define YYLLOC_DEFAULT | ( | Current, | |
Rhs, | |||
N | |||
) |
#define yylval (*((YYSTYPE*)(parser->parser_yylval))) |
#define YYMALLOC | ( | size | ) | rb_parser_malloc(parser, (size)) |
#define YYNTOKENS 142 |
Definition at line 1141 of file parse.c.
Referenced by yy_symbol_print(), yy_symbol_value_print(), yyparse(), and yysyntax_error().
#define yypact_value_is_default | ( | yystate | ) | ((yystate) == (-808)) |
Definition at line 3114 of file parse.c.
Referenced by yyparse(), and yysyntax_error().
#define yyparse ruby_yyparse |
Definition at line 418 of file parse.c.
Referenced by yycompile0().
#define YYREALLOC | ( | ptr, | |
size | |||
) | rb_parser_realloc(parser, (ptr), (size)) |
#define YYSIZE_T unsigned int |
Definition at line 962 of file parse.c.
Referenced by yyparse(), yystrlen(), yysyntax_error(), and yytnamerr().
#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
Definition at line 1047 of file parse.c.
Referenced by yysyntax_error().
#define YYSTACK_BYTES | ( | N | ) |
#define YYSTACK_RELOCATE | ( | Stack_alloc, | |
Stack | |||
) |
Definition at line 1102 of file parse.c.
Referenced by yyparse().
#define YYSYNTAX_ERROR |
Referenced by yyparse().
#define yytable_value_is_error | ( | yytable_value | ) | ((yytable_value) == (-621)) |
Definition at line 3117 of file parse.c.
Referenced by yyparse(), and yysyntax_error().
#define YYTERROR 1 |
Definition at line 4351 of file parse.c.
Referenced by yyparse(), and yysyntax_error().
#define YYTRANSLATE | ( | YYX | ) | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define YYUSE | ( | e | ) | ((void) (e)) |
Definition at line 982 of file parse.c.
Referenced by yy_symbol_value_print(), and yydestruct().
typedef long(* rb_magic_comment_length_t) (struct parser_params *parser, const char *name, long len) |
typedef void(* rb_magic_comment_setter_t) (struct parser_params *parser, const char *name, const char *val) |
typedef VALUE stack_type |
typedef struct token_info token_info |
typedef short int yytype_int16 |
typedef short int yytype_int8 |
typedef unsigned short int yytype_uint16 |
typedef unsigned char yytype_uint8 |
enum lex_state_bits |
enum lex_state_e |
enum string_type |
enum yytokentype |
|
static |
Definition at line 12938 of file parse.c.
References arg_ambiguous, and rb_warning0.
|
static |
Definition at line 15221 of file parse.c.
References arg_append, list_append, nd_set_type, nd_type, NEW_ARGSPUSH, NEW_LIST, NODE_ARGSCAT, NODE_ARGSPUSH, NODE_ARRAY, and NODE_BLOCK_PASS.
|
static |
Definition at line 15196 of file parse.c.
References arg_concat, list_concat, nd_set_type, nd_type, NEW_ARGSCAT, NEW_LIST, NODE_ARGSCAT, NODE_ARGSPUSH, NODE_ARRAY, and NODE_BLOCK_PASS.
|
static |
Definition at line 16028 of file parse.c.
References lvtbl, vtable_add(), and vtable_size().
|
static |
|
static |
Definition at line 15538 of file parse.c.
References is_static_content(), nd_type, NODE_DASGN, NODE_DASGN_CURR, NODE_GASGN, NODE_IASGN, NODE_LASGN, NODE_MASGN, parser_warn, and yyerror.
Referenced by cond0().
|
static |
Definition at line 14989 of file parse.c.
References assignable_result, compile_error, dvar_curr, dvar_defined, dyna_in_block, dyna_var, get_id, ID_CLASS, ID_CONST, ID_GLOBAL, ID_INSTANCE, ID_LOCAL, id_type, in_def, in_single, keyword__ENCODING__, keyword__FILE__, keyword__LINE__, keyword_false, keyword_nil, keyword_self, keyword_true, local_id, local_var, NEW_CDECL, NEW_CVASGN, NEW_DASGN, NEW_DASGN_CURR, NEW_GASGN, NEW_IASGN, NEW_LASGN, PARSER_ARG, rb_id2name(), val, and yyerror.
|
static |
Definition at line 15175 of file parse.c.
References nd_type, NEW_ATTRASGN, NODE_SELF, and rb_id_attrset().
|
static |
Definition at line 14644 of file parse.c.
References fixpos(), head, nd_type, NEW_BLOCK, NODE_BLOCK, NODE_BREAK, NODE_FALSE, NODE_LIT, NODE_NEXT, NODE_NIL, NODE_REDO, NODE_RETRY, NODE_RETURN, NODE_SELF, NODE_STR, NODE_TRUE, parser_warning, RTEST, ruby_verbose, and tail.
|
static |
Definition at line 15127 of file parse.c.
References compile_error, nd_type, NODE_BLOCK_PASS, and PARSER_ARG.
|
static |
Definition at line 14863 of file parse.c.
References NEW_CALL, NEW_LIST, and value_expr.
|
static |
Definition at line 14871 of file parse.c.
References NEW_CALL, and value_expr.
|
static |
Definition at line 13019 of file parse.c.
References parser_params::has_shebang, ISSPACE, lex_p, lex_pbeg, parser_params::line_count, and p.
Referenced by magic_comment_encoding(), and parser_yylex().
|
static |
Definition at line 15645 of file parse.c.
References assign_in_cond(), e_option_supplied(), literal_node(), nd_set_type, nd_type, NEW_GVAR, NEW_MATCH2, NODE_AND, NODE_DOT2, NODE_DOT3, NODE_DREGX, NODE_DREGX_ONCE, NODE_DSTR, NODE_DSYM, NODE_EVSTR, NODE_FLIP2, NODE_FLIP3, NODE_LIT, NODE_MATCH, NODE_OR, NODE_STR, parser_warn, parser_warning, range_op(), rb_intern(), RB_TYPE_P, rb_warn0, RTEST, ruby_verbose, T_REGEXP, warn_unless_e_option(), and warning_unless_e_option().
Referenced by cond_gen(), and range_op().
|
static |
Definition at line 11721 of file parse.c.
References i, Qnil, RARRAY, RARRAY_PTR, rb_ary_new2(), rb_get_coverages(), rb_hash_aset(), RBASIC, and RTEST.
Referenced by yycompile0().
Definition at line 11705 of file parse.c.
References CONST_ID, hash(), rb_ary_new(), rb_cObject, rb_const_defined_at(), rb_const_get_at(), rb_hash_aset(), RB_TYPE_P, and T_HASH.
Referenced by yycompile0().
|
static |
Definition at line 12408 of file parse.c.
References rb_gc_force_recycle(), and rb_str_free().
Referenced by parser_here_document(), and parser_heredoc_restore().
|
static |
|
static |
Definition at line 16153 of file parse.c.
References lvtbl, and vtable_included().
|
static |
Definition at line 16122 of file parse.c.
References args, DVARS_INHERIT, i, LVAR_USED, lvtbl, POINTER_P, vtable::prev, rb_dvar_defined(), vtable::tbl, and vtable_included().
|
static |
Definition at line 16116 of file parse.c.
References DVARS_TOPSCOPE, lvtbl, and POINTER_P.
|
static |
Definition at line 16084 of file parse.c.
References lvtbl, vtable_free(), and warn_unused_var().
Referenced by dyna_pop_gen().
|
static |
Definition at line 16102 of file parse.c.
References dyna_pop_1(), lvtbl, and xfree().
|
static |
Definition at line 16073 of file parse.c.
References lvtbl, and vtable_alloc().
|
static |
Definition at line 11737 of file parse.c.
References ruby_sourcefile.
Referenced by cond0(), local_push_gen(), warn_unless_e_option(), warning_unless_e_option(), and yycompile0().
|
static |
Definition at line 14840 of file parse.c.
References list_append, nd_type, NEW_DSTR, NODE_EVSTR, and Qnil.
Definition at line 14621 of file parse.c.
References nd_line, and nd_set_line.
Referenced by block_append_gen(), new_attr_op_assign_gen(), new_const_op_assign_gen(), and yyparse().
|
static |
Definition at line 15577 of file parse.c.
References head, nd_set_type, nd_type, NODE_DOT2, NODE_DOT3, NODE_LIT, rb_gc_force_recycle(), rb_range_new(), type, and val.
Referenced by yyparse().
|
static |
Definition at line 12949 of file parse.c.
References is_local_id, shadowing_lvar, and yyerror.
|
static |
Definition at line 14912 of file parse.c.
References compile_error, current_enc, dvar_defined, dyna_in_block, ID_CLASS, ID_CONST, ID_GLOBAL, ID_INSTANCE, ID_LOCAL, id_type, INT2FIX, keyword__ENCODING__, keyword__FILE__, keyword__LINE__, keyword_false, keyword_nil, keyword_self, keyword_true, local_id, NEW_CONST, NEW_CVAR, NEW_DVAR, NEW_FALSE, NEW_GVAR, NEW_IVAR, NEW_LIT, NEW_LVAR, NEW_NIL, NEW_SELF, NEW_STR, NEW_TRUE, NEW_VCALL, PARSER_ARG, rb_enc_from_encoding(), rb_id2name(), rb_str_dup(), ruby_sourcefile_string, and tokline.
void Init_sym | ( | void | ) |
Definition at line 16471 of file parse.c.
References global_symbols, symbols::id_str, Init_id(), nodeline(), nodetype(), st_init_numtable_with_size(), st_init_table_with_size(), symbols::sym_id, and symhash.
Definition at line 16720 of file parse.c.
References global_symbols, i, id, ID_ATTRSET, ID_CLASS, ID_CONST, ID_GLOBAL, ID_INSTANCE, ID_JUNK, ID_LOCAL, ID_SCOPE_SHIFT, is_attrset_id, is_identchar, is_special_global_name(), ISASCII, last, symbols::last_id, RString::len, name, op_tbl, op_tbl_count, rb_cString, rb_enc_asciicompat, rb_enc_associate(), rb_enc_get(), rb_enc_isascii, rb_enc_isdigit, rb_enc_ispunct, rb_enc_isupper, rb_enc_mbclen(), rb_eRuntimeError, rb_id2str(), rb_id_attrset(), rb_intern3(), rb_raise(), rb_usascii_encoding(), register_symid_str(), RSTRING_GETMEM, RUBY_SPECIAL_SHIFT, sym_check_asciionly(), and tLAST_OP_ID.
Referenced by rb_intern3(), and rb_intern_str().
|
static |
Definition at line 16499 of file parse.c.
References ID_INTERNAL, ID_SCOPE_SHIFT, lvtbl, tLAST_TOKEN, and vtable_size().
|
inlinestatic |
Definition at line 12621 of file parse.c.
References ruby_global_name_punct_bits.
Referenced by is_special_global_name(), and parser_peek_variable_name().
|
static |
Definition at line 15068 of file parse.c.
References is_local_id, name, rb_id2str(), and RSTRING_PTR.
Referenced by shadowing_lvar_gen(), and warn_unused_var().
|
static |
Definition at line 16508 of file parse.c.
References is_global_name_punct(), is_identchar, ISASCII, rb_enc_isdigit, and rb_enc_mbclen().
Referenced by intern_str(), and rb_enc_symname_type().
|
static |
Definition at line 15514 of file parse.c.
References nd_type, NODE_ARRAY, NODE_FALSE, NODE_HASH, NODE_LIT, NODE_NIL, NODE_STR, NODE_TRUE, and NODE_ZARRAY.
Referenced by assign_in_cond().
|
static |
Definition at line 11823 of file parse.c.
References parser_params::enc, lex_gets_ptr, must_be_ascii_compatible(), Qnil, rb_enc_str_new(), RSTRING_LEN, and RSTRING_PTR.
Referenced by parser_compile_string().
|
static |
Definition at line 11843 of file parse.c.
References current_enc, must_be_ascii_compatible(), NIL_P, parser_params::parser_lex_gets, parser_params::parser_lex_input, Qnil, rb_ary_push(), rb_enc_associate(), ruby_coverage, and ruby_debug_lines.
Referenced by parser_nextc().
|
static |
Definition at line 11919 of file parse.c.
References rb_io_gets().
Referenced by rb_parser_compile_file_path().
|
static |
|
static |
|
static |
Definition at line 14742 of file parse.c.
References compile_error, head, NIL_P, PARSER_ARG, rb_enc_compatible(), rb_enc_get(), rb_enc_name, rb_str_buf_append(), rb_str_resize(), and tail.
Referenced by literal_concat_gen(), and yyparse().
|
static |
Definition at line 14759 of file parse.c.
References head, list_append, list_concat, literal_concat0(), nd_set_type, nd_type, NEW_DSTR, NEW_STR, NIL_P, NODE_ARRAY, NODE_DSTR, NODE_EVSTR, NODE_STR, Qnil, rb_gc_force_recycle(), and tail.
|
static |
Definition at line 15624 of file parse.c.
References nd_type, NODE_DREGX, NODE_DREGX_ONCE, NODE_DSTR, NODE_DSYM, NODE_EVSTR, NODE_FALSE, NODE_LIT, NODE_NIL, NODE_STR, and NODE_TRUE.
Referenced by cond0().
|
static |
Definition at line 16045 of file parse.c.
References args, DVARS_INHERIT, i, LVAR_USED, lvtbl, POINTER_P, vtable::prev, rb_local_defined(), vtable::tbl, and vtable_included().
|
static |
Definition at line 15987 of file parse.c.
References cmdarg_stack, lvtbl, vtable_free(), warn_unused_var(), and xfree().
|
static |
Definition at line 15970 of file parse.c.
References ALLOC, local_vars::args, cmdarg_stack, local_vars::cmdargs, compile_for_eval, DVARS_INHERIT, DVARS_TOPSCOPE, e_option_supplied(), ifndef_ripper, lvtbl, local_vars::prev, RTEST, ruby_verbose, local_vars::used, local_vars::vars, and vtable_alloc().
|
static |
|
static |
Definition at line 16035 of file parse.c.
References lvtbl, ruby_sourceline, vtable_add(), and vtable_size().
|
static |
|
static |
Definition at line 12960 of file parse.c.
References dvar_defined_get, dyna_in_block, and local_id.
|
static |
Definition at line 13035 of file parse.c.
References comment_at_top(), parser_set_encode(), and val.
|
static |
Definition at line 14878 of file parse.c.
References nd_type, NEW_CALL, NEW_LIST, NEW_MATCH2, NEW_MATCH3, NODE_DREGX, NODE_DREGX_ONCE, NODE_LIT, RB_TYPE_P, T_REGEXP, tMATCH, and value_expr.
|
static |
Definition at line 11813 of file parse.c.
References parser_params::enc, rb_eArgError, rb_enc_asciicompat, rb_enc_get(), and rb_raise().
Referenced by lex_get_str(), lex_getline(), rb_compile_string(), and rb_parser_compile_string_path().
|
static |
Definition at line 15796 of file parse.c.
References args, p, rb_long2int, ruby_sourceline, and tail.
|
static |
Definition at line 15818 of file parse.c.
References ALLOC, arg_var, args, internal_id, rb_args_info::kw_rest_arg, MEMZERO, NEW_DVAR, NEW_NODE, NODE_ARGS, and ruby_sourceline.
|
static |
Definition at line 15105 of file parse.c.
References compile_error, dyna_var, is_local_id, name, PARSER_ARG, rb_id2name(), and shadowing_lvar.
|
static |
|
static |
|
static |
Definition at line 15870 of file parse.c.
References gettable, is_asgn_or_id, NEW_BEGIN, NEW_CALL, NEW_LIST, NEW_OP_ASGN_AND, NEW_OP_ASGN_OR, tANDOP, and tOROP.
|
static |
Definition at line 15749 of file parse.c.
References NEW_YIELD, and no_blockarg().
Definition at line 14611 of file parse.c.
References RNode::flags, NODE_FL_NEWLINE, and remove_begin().
Referenced by reg_named_capture_assign_gen(), reg_named_capture_assign_iter(), and yyparse().
|
static |
Definition at line 15724 of file parse.c.
References compile_error, nd_type, NODE_BLOCK_PASS, and PARSER_ARG.
Referenced by new_yield_gen(), and ret_args_gen().
|
static |
Definition at line 15247 of file parse.c.
References arg_append, nd_type, NODE_ATTRASGN, NODE_CALL, NODE_CDECL, NODE_CVASGN, NODE_DASGN, NODE_DASGN_CURR, NODE_GASGN, NODE_IASGN, NODE_IASGN2, NODE_LASGN, and NODE_MASGN.
|
static |
Definition at line 14591 of file parse.c.
References nd_set_line, rb_node_newnode, ruby_sourceline, and type.
|
static |
|
static |
Definition at line 11866 of file parse.c.
References compile_for_eval, lex_get_str(), lex_gets, lex_gets_ptr, lex_input, lex_p, lex_pbeg, lex_pend, parser_data_type, RB_GC_GUARD, rb_parse_in_eval(), TypedData_Get_Struct, and yycompile().
Referenced by rb_compile_cstr(), rb_compile_string(), rb_parser_compile_cstr(), and rb_parser_compile_string_path().
|
static |
Definition at line 12967 of file parse.c.
References name, and rb_memcicmp().
Referenced by set_file_encoding().
|
static |
Definition at line 17224 of file parse.c.
References p, local_vars::prev, local_vars::vars, and xfree().
|
static |
Definition at line 12832 of file parse.c.
References compile_error, current_enc, dispatch_heredoc_end, dispose_string(), parser_params::enc, parser_params::eofp, flush_string_content, func, heredoc_restore, lex_goto_eol, lex_lastline, lex_p, lex_pend, lex_strterm, NEW_STRTERM, newtok, nextc, NIL_P, NULL, p, PARSER_ARG, parser_peek_variable_name(), pushback, rb_str_append(), rb_str_cat(), RSTRING_LEN, RSTRING_PTR, set_yylval_str, STR_FUNC_EXPAND, STR_FUNC_INDENT, STR_NEW, STR_NEW3, tok, tokadd, tokadd_string, toklen, tSTRING_CONTENT, tSTRING_END, was_bol, and whole_match_p.
|
static |
Definition at line 12722 of file parse.c.
References compile_error, func, lex_goto_eol, lex_lastline, lex_p, lex_pbeg, lex_strterm, nd_set_line, newtok, nextc, NODE_HEREDOC, PARSER_ARG, parser_is_identchar, pushback, rb_node_newnode, ripper_flush, ruby_sourceline, str_dquote, STR_FUNC_INDENT, STR_NEW, str_squote, str_xquote, tHEREDOC_BEG, tok, tokadd, tokadd_mbchar, tokfix, toklen, tSTRING_BEG, and tXSTRING_BEG.
|
static |
Definition at line 12785 of file parse.c.
References dispose_string(), heredoc_end, lex_lastline, lex_p, lex_pbeg, lex_pend, nd_line, rb_gc_force_recycle(), ripper_flush, RSTRING_LEN, RSTRING_PTR, and ruby_sourceline.
|
static |
Definition at line 17145 of file parse.c.
References parser_params::enc, parser_params::eofp, parser_params::heap, parser_params::is_ripper, NULL, parser_params::parser_brace_nest, parser_params::parser_class_nest, parser_params::parser_cmdarg_stack, parser_params::parser_command_start, parser_params::parser_compile_for_eval, parser_params::parser_cond_stack, parser_params::parser_cur_mid, parser_params::parser_deferred_nodes, parser_params::parser_eval_tree, parser_params::parser_eval_tree_begin, parser_params::parser_heredoc_end, parser_params::parser_in_def, parser_params::parser_in_defined, parser_params::parser_in_single, parser_params::parser_lex_p, parser_params::parser_lex_pbeg, parser_params::parser_lex_pend, parser_params::parser_lex_strterm, parser_params::parser_lpar_beg, parser_params::parser_lvtbl, parser_params::parser_paren_nest, parser_params::parser_ruby__end__seen, parser_params::parser_ruby_sourcefile, parser_params::parser_ruby_sourcefile_string, parser_params::parser_tokenbuf, parser_params::parser_tokidx, parser_params::parser_toksiz, Qfalse, Qnil, rb_utf8_encoding(), and TRUE.
Referenced by parser_new().
|
static |
Definition at line 13112 of file parse.c.
References FALSE, i, ISSPACE, magic_comment_marker(), magic_comments, name, numberof, p, RSTRING_PTR, str_copy, STRNCASECMP, TRUE, and val.
Referenced by parser_yylex().
|
static |
Definition at line 17198 of file parse.c.
References p, and rb_gc_mark().
|
static |
Definition at line 17241 of file parse.c.
References vtable::capa, p, local_vars::prev, size, and local_vars::vars.
|
static |
Definition at line 17279 of file parse.c.
References ALLOC_N, MEMZERO, p, and parser_initialize().
Referenced by rb_parser_new().
|
static |
|
inlinestatic |
Definition at line 11998 of file parse.c.
References current_enc, parser_params::eofp, heredoc_end, lex_getline(), lex_goto_eol, lex_input, lex_lastline, lex_nextline, lex_p, lex_pbeg, lex_pend, parser_params::line_count, NIL_P, peek, Qtrue, rb_enc_associate(), rb_str_buf_cat(), rb_str_buf_new(), ripper_flush, RSTRING_LEN, RSTRING_PTR, ruby_sourceline, and v.
|
static |
Definition at line 12664 of file parse.c.
References compile_error, current_enc, parser_params::enc, parser_params::eofp, flush_string_content, func, ISSPACE, nd_line, nd_paren, nd_term, newtok, nextc, PARSER_ARG, parser_peek_variable_name(), pushback, regx_options, ruby_sourceline, set_yylval_num, set_yylval_str, STR_FUNC_EXPAND, STR_FUNC_QWORDS, STR_FUNC_REGEXP, STR_NEW3, tok, tokadd, tokadd_string, tokfix, toklen, tREGEXP_END, tSTRING_CONTENT, and tSTRING_END.
|
static |
Definition at line 12628 of file parse.c.
References command_start, is_global_name_punct(), ISALPHA, ISASCII, ISDIGIT, lex_p, lex_pend, p, TRUE, tSTRING_DBEG, and tSTRING_DVAR.
Referenced by parser_here_document(), and parser_parse_string().
|
static |
Definition at line 13249 of file parse.c.
References parser_params::enc, EOF, parser_params::has_shebang, lex_lastline, lex_p, lex_pbeg, lex_pend, nextc, peek, pushback, rb_enc_get(), and rb_utf8_encoding().
Referenced by yycompile0().
|
static |
|
static |
Definition at line 12201 of file parse.c.
References ESCAPE_CONTROL, ESCAPE_META, ISASCII, lex_p, nextc, peek, pushback, read_escape, scan_oct, tok_hex, and yyerror.
|
static |
Definition at line 12372 of file parse.c.
References compile_error, ISALPHA, newtok, nextc, options(), PARSER_ARG, pushback, rb_ascii8bit_encindex(), rb_char_to_option_kcode(), RE_OPTION_ENCODING, RE_OPTION_ONCE, tok, tokadd, tokfix, and toklen.
|
static |
Definition at line 12987 of file parse.c.
References parser_params::enc, i, name, p, RARRAY_LEN, RARRAY_PTR, rb_ary_unshift(), rb_eArgError, rb_enc_asciicompat, rb_enc_associate_index(), rb_enc_find_index(), rb_enc_from_index(), rb_enc_name, rb_exc_raise(), rb_make_backtrace(), rb_make_exception(), rb_sprintf(), ruby_debug_lines, ruby_sourcefile, and ruby_sourceline.
Referenced by magic_comment_encoding(), and set_file_encoding().
|
static |
Definition at line 13044 of file parse.c.
References FALSE, name, p, parser_params::parser_token_info_enabled, rb_compile_warning(), ruby_sourcefile, ruby_sourceline, strcasecmp, TRUE, and val.
|
static |
Definition at line 11976 of file parse.c.
References parser_params::enc, ENC_CODERANGE_7BIT, func, p, rb_ascii8bit_encoding(), rb_enc_asciicompat, rb_enc_associate(), rb_enc_str_coderange(), rb_enc_str_new(), rb_usascii_encoding(), rb_utf8_encoding(), and STR_FUNC_REGEXP.
|
static |
|
static |
|
static |
Definition at line 12299 of file parse.c.
References ESCAPE_CONTROL, ESCAPE_META, lex_p, nextc, pushback, ruby_scan_oct(), tok_hex, tokadd, tokcopy, and yyerror.
|
static |
Definition at line 12415 of file parse.c.
References compile_error, lex_p, MBCLEN_CHARFOUND_P, PARSER_ARG, parser_encoding_name, parser_precise_mbclen, tokadd, and tokcopy.
|
static |
Definition at line 12444 of file parse.c.
References parser_params::enc, func, ISASCII, ISSPACE, lex_p, lex_pend, mixed_error, mixed_escape, nextc, parser_isascii, parser_tokadd_utf8(), pushback, read_escape, simple_re_meta(), STR_FUNC_ESCAPE, STR_FUNC_EXPAND, STR_FUNC_QWORDS, STR_FUNC_REGEXP, STR_FUNC_SYMBOL, tokadd, tokadd_escape, and tokadd_mbchar.
|
static |
Definition at line 12126 of file parse.c.
References lex_p, nextc, peek, rb_utf8_encoding(), scan_hex, tokadd, tokaddmbc, tokcopy, and yyerror.
Referenced by parser_tokadd_string(), and parser_yylex().
|
static |
Definition at line 12292 of file parse.c.
References parser_params::enc, rb_enc_codelen(), rb_enc_mbcput, and tokspace.
|
static |
|
static |
Definition at line 14637 of file parse.c.
References nd_line, rb_compile_warn(), and ruby_sourcefile.
|
static |
Definition at line 14630 of file parse.c.
References nd_line, rb_compile_warning(), and ruby_sourcefile.
|
static |
|
static |
Definition at line 11640 of file parse.c.
References ALLOCA_N, buf, compile_error, current_enc, i, lex_lastline, lex_p, lex_pbeg, lex_pend, MEMCPY, msg, NULL, p, PARSER_ARG, rb_compile_error_append(), rb_compile_error_with_enc(), rb_enc_get(), rb_enc_prev_char, and STR_NEW2.
Referenced by yyparse().
|
static |
Definition at line 13294 of file parse.c.
References arg_ambiguous, brace_nest, CMDARG_LEXPOP, CMDARG_P, CMDARG_PUSH, command_start, comment_at_top(), compile_error, COND_LEXPOP, COND_P, COND_PUSH, current_enc, DBL2NUM, ENC_CODERANGE_7BIT, ENC_CODERANGE_UNKNOWN, ENC_SINGLE, parser_params::eofp, errno, EXPR_ARG_ANY, EXPR_BEG_ANY, FALSE, here_document, heredoc_identifier, kwtable::id, INT2FIX, IS_AFTER_OPERATOR, IS_ARG, IS_BEG, IS_END, is_identchar, IS_LABEL_POSSIBLE, IS_LABEL_SUFFIX, IS_lex_state, IS_lex_state_for, is_local_id, IS_SPCARG, ISALNUM, ISASCII, ISDIGIT, ISSPACE, ISUPPER, ISXDIGIT, k__END__, keyword_do, keyword_do_block, keyword_do_cond, keyword_do_LAMBDA, lex_eol_p, lex_goto_eol, lex_lastline, lex_nextline, lex_p, lex_pend, lex_state, lex_strterm, lpar_beg, lvar_defined, kwtable::name, nd_type, NEW_BACK_REF, NEW_NTH_REF, NEW_STRTERM, newtok, nextc, no_digits, NODE_HEREDOC, paren_nest, parse_string, PARSER_ARG, parser_is_identchar, parser_isascii, parser_magic_comment(), parser_tokadd_utf8(), peek, peek_n, pushback, Qtrue, rb_cstr_to_inum(), rb_enc_isalnum, rb_enc_isspace, rb_gc_force_recycle(), rb_intern(), rb_reserved_word(), rb_warnI, rb_warning0, rb_warningS, read_escape, result, ruby__end__seen, ruby_sourceline, set_file_encoding(), set_yylval_id, set_yylval_literal, set_yylval_name, set_yylval_node, set_yylval_str, snprintf, kwtable::state, str_dquote, str_dsym, str_dword, STR_NEW3, str_regexp, str_squote, str_ssym, str_sword, str_xquote, strtod, tAMPER, tANDOP, tAREF, tASET, tASSOC, tBACK_REF, tCHAR, tCMP, tCOLON2, tCOLON3, tCOMMENT, tCONSTANT, tCVAR, tDOT2, tDOT3, tDSTAR, tEMBDOC, tEMBDOC_BEG, tEMBDOC_END, tEQ, tEQQ, tFID, tFLOAT, tGEQ, tGVAR, tIDENTIFIER, tIGNORED_NL, tINTEGER, tIVAR, tLABEL, tLAMBDA, tLAMBEG, tLBRACE, tLBRACE_ARG, tLBRACK, tLEQ, tLPAREN, tLPAREN_ARG, tLSHFT, tMATCH, tNEQ, tNMATCH, tNTH_REF, tok, TOK_INTERN, tokadd, tokadd_mbchar, tokaddmbc, token, tokfix, tokidx, toklast, toklen, tOP_ASGN, tOROP, tPOW, tQSYMBOLS_BEG, tQWORDS_BEG, tREGEXP_BEG, tREGEXP_END, tRSHFT, TRUE, tSP, tSTAR, tSTRING_BEG, tSTRING_DEND, tSTRING_END, tSYMBEG, tSYMBOLS_BEG, tUMINUS, tUMINUS_NUM, tUPLUS, tWORDS_BEG, tXSTRING_BEG, warn_balanced, was_bol, whole_match_p, and yyerror.
Referenced by yylex().
|
static |
Definition at line 15608 of file parse.c.
References cond0(), FIXNUM_P, nd_type, NEW_CALL, NEW_GVAR, NEW_LIST, NODE_LIT, rb_intern(), tEQ, type, value_expr, and warn_unless_e_option().
Referenced by cond0().
|
static |
Definition at line 15183 of file parse.c.
References compile_error, nd_type, NODE_BACK_REF, NODE_NTH_REF, and PARSER_ARG.
Returns ID for the given name if it is interned already, or 0.
namep | the pointer to the name object |
namep
must be a Symbol or a String, or possible to convert with to_str method. namep
is a Symbol or a String if non-zero value is returned, or is a String if 0 is returned. Definition at line 17016 of file parse.c.
References RString::as, RString::basic, RBasic::flags, global_symbols, RString::heap, id, RBasic::klass, name, NIL_P, OBJ_FREEZE, rb_check_string_type(), rb_cString, rb_enc_copy(), rb_eTypeError, RB_GC_GUARD, rb_id_attrset(), rb_inspect(), rb_is_attrset_name(), rb_raise(), RB_TYPE_P, RSTRING_LEN, RSTRING_NOEMBED, RSTRING_PTR, st_lookup(), SYM2ID, sym_check_asciionly(), symbols::sym_id, SYMBOL_P, and T_STRING.
ID rb_check_id_cstr | ( | const char * | ptr, |
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 17063 of file parse.c.
References RString::as, RString::basic, RBasic::flags, global_symbols, RString::heap, id, RBasic::klass, RString::len, name, RString::ptr, rb_cString, rb_enc_associate(), rb_id_attrset(), rb_is_attrset_name(), RSTRING_NOEMBED, st_lookup(), sym_check_asciionly(), symbols::sym_id, and T_STRING.
Definition at line 11905 of file parse.c.
References f, parser_compile_string(), rb_filesystem_str_new_cstr(), rb_parser_new(), and rb_str_new().
Definition at line 11925 of file parse.c.
References f, rb_parser_compile_file(), and rb_parser_new().
Definition at line 11885 of file parse.c.
References f, must_be_ascii_compatible(), parser_compile_string(), rb_filesystem_str_new_cstr(), and rb_parser_new().
int rb_enc_symname2_p | ( | const char * | name, |
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 16646 of file parse.c.
References IDSET_ATTRSET_FOR_SYNTAX, name, and rb_enc_symname_type().
Referenced by rb_enc_symname_p(), and reg_named_capture_assign_iter().
int rb_enc_symname_p | ( | const char * | name, |
rb_encoding * | enc | ||
) |
Definition at line 16540 of file parse.c.
References name, rb_enc_symname2_p(), and strlen().
Referenced by rb_symname_p().
|
static |
Definition at line 16549 of file parse.c.
References id, ID_ATTRSET, ID_CLASS, ID_CONST, ID_GLOBAL, ID_INSTANCE, ID_JUNK, ID_LOCAL, is_identchar, is_special_global_name(), ISASCII, name, rb_enc_isalpha, rb_enc_isupper, rb_enc_mbclen(), and type.
Referenced by rb_enc_symname2_p(), and rb_str_symname_type().
void rb_gc_mark_symbols | ( | void | ) |
Definition at line 16490 of file parse.c.
References global_symbols, symbols::id_str, numberof, symbols::op_sym, rb_gc_mark_locations, and rb_mark_tbl().
Definition at line 16922 of file parse.c.
References rb_id2str(), and RSTRING_PTR.
Referenced by assignable_gen(), gettable_gen(), new_bv_gen(), rb_id_attrset(), reg_named_capture_assign_iter(), shadowing_lvar_gen(), void_expr_gen(), vtable_add(), and warn_unused_var().
Definition at line 16856 of file parse.c.
References global_symbols, i, ID_CLASS, ID_CONST, ID_GLOBAL, ID_INSTANCE, ID_JUNK, ID_LOCAL, ID_SCOPE_MASK, symbols::id_str, is_attrset_id, name, OBJ_FREEZE, symbols::op_sym, op_tbl, op_tbl_count, rb_cString, rb_id2str(), rb_ispunct(), rb_str_cat(), rb_str_dup(), rb_usascii_str_new(), rb_usascii_str_new2(), RBASIC, register_symid_str(), st_lookup(), tLAST_TOKEN, and token.
Referenced by intern_str(), is_private_local_id(), and rb_id2name().
Definition at line 15146 of file parse.c.
References id, ID2SYM, ID_ATTRSET, ID_CLASS, ID_CONST, ID_GLOBAL, ID_INSTANCE, ID_JUNK, ID_LOCAL, ID_SCOPE_MASK, id_type_names, is_notop_id, PRIsVALUE, rb_id2name(), rb_name_error(), tAREF, and tASET.
Referenced by attrset_gen(), intern_str(), rb_check_id(), and rb_check_id_cstr().
Definition at line 16840 of file parse.c.
References name, rb_intern2(), and strlen().
Referenced by cond0(), parser_yylex(), range_op(), rb_parser_append_print(), rb_parser_while_loop(), reg_compile_gen(), reg_named_capture_assign_gen(), reg_named_capture_assign_iter(), and yyparse().
Definition at line 16833 of file parse.c.
References RString::len, name, rb_intern3(), and rb_usascii_encoding().
Referenced by rb_intern(), and yyparse().
ID rb_intern3 | ( | const char * | name, |
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 16698 of file parse.c.
References RString::as, RString::basic, RBasic::flags, global_symbols, RString::heap, intern_str(), RBasic::klass, RString::len, name, OBJ_FREEZE, rb_cString, rb_enc_associate(), rb_enc_str_new(), RSTRING_NOEMBED, st_lookup(), symbols::sym_id, and T_STRING.
Referenced by intern_str(), rb_intern2(), and reg_named_capture_assign_iter().
Definition at line 16846 of file parse.c.
References global_symbols, id, intern_str(), rb_str_dup(), st_lookup(), and symbols::sym_id.
Referenced by dsym_node_gen(), and yyparse().
int rb_is_attrset_id | ( | ID | id | ) |
Definition at line 16987 of file parse.c.
References is_attrset_id.
int rb_is_attrset_name | ( | VALUE | name | ) |
Definition at line 17115 of file parse.c.
References ID_ATTRSET, IDSET_ATTRSET_FOR_INTERN, name, and rb_str_symname_type().
Referenced by rb_check_id(), and rb_check_id_cstr().
int rb_is_class_id | ( | ID | id | ) |
Definition at line 16969 of file parse.c.
References is_class_id.
int rb_is_class_name | ( | VALUE | name | ) |
Definition at line 17097 of file parse.c.
References ID_CLASS, name, and rb_str_symname_type().
int rb_is_const_id | ( | ID | id | ) |
Definition at line 16963 of file parse.c.
References is_const_id.
int rb_is_const_name | ( | VALUE | name | ) |
Definition at line 17091 of file parse.c.
References ID_CONST, name, and rb_str_symname_type().
int rb_is_global_id | ( | ID | id | ) |
Definition at line 16975 of file parse.c.
References is_global_id.
int rb_is_global_name | ( | VALUE | name | ) |
Definition at line 17103 of file parse.c.
References ID_GLOBAL, name, and rb_str_symname_type().
int rb_is_instance_id | ( | ID | id | ) |
Definition at line 16981 of file parse.c.
References is_instance_id.
int rb_is_instance_name | ( | VALUE | name | ) |
Definition at line 17109 of file parse.c.
References ID_INSTANCE, name, and rb_str_symname_type().
int rb_is_junk_id | ( | ID | id | ) |
Definition at line 16999 of file parse.c.
References is_junk_id.
int rb_is_junk_name | ( | VALUE | name | ) |
Definition at line 17137 of file parse.c.
References IDSET_ATTRSET_FOR_SYNTAX, name, and rb_str_symname_type().
int rb_is_local_id | ( | ID | id | ) |
Definition at line 16993 of file parse.c.
References is_local_id.
int rb_is_local_name | ( | VALUE | name | ) |
Definition at line 17121 of file parse.c.
References ID_LOCAL, name, and rb_str_symname_type().
int rb_is_method_name | ( | VALUE | name | ) |
Definition at line 17127 of file parse.c.
References FALSE, ID_ATTRSET, ID_JUNK, ID_LOCAL, name, rb_str_symname_type(), and TRUE.
Definition at line 16324 of file parse.c.
References block_append, nd_type, NEW_ARRAY, NEW_FCALL, NEW_GVAR, NODE_PRELUDE, parser_data_type, rb_intern(), and TypedData_Get_Struct.
void* rb_parser_calloc | ( | struct parser_params * | parser, |
size_t | nelem, | ||
size_t | size | ||
) |
NODE* rb_parser_compile_cstr | ( | volatile VALUE | vparser, |
const char * | f, | ||
const char * | s, | ||
int | len, | ||
int | line | ||
) |
Definition at line 11912 of file parse.c.
References f, parser_compile_string(), rb_filesystem_str_new_cstr(), and rb_str_new().
Definition at line 11933 of file parse.c.
References f, rb_filesystem_str_new_cstr(), and rb_parser_compile_file_path().
Referenced by rb_compile_file().
Definition at line 11939 of file parse.c.
References compile_for_eval, lex_gets, lex_input, lex_io_gets(), lex_p, lex_pbeg, lex_pend, parser_data_type, RB_GC_GUARD, rb_parse_in_eval(), TypedData_Get_Struct, and yycompile().
Referenced by rb_parser_compile_file().
Definition at line 11892 of file parse.c.
References f, rb_filesystem_str_new_cstr(), and rb_parser_compile_string_path().
Definition at line 11898 of file parse.c.
References f, must_be_ascii_compatible(), and parser_compile_string().
Referenced by rb_parser_compile_string().
Definition at line 17319 of file parse.c.
References current_enc, parser_data_type, rb_enc_from_encoding(), and TypedData_Get_Struct.
Definition at line 17304 of file parse.c.
References parser_data_type, Qfalse, Qtrue, ruby__end__seen, and TypedData_Get_Struct.
void rb_parser_free | ( | struct parser_params * | parser, |
void * | ptr | ||
) |
Definition at line 17405 of file parse.c.
References parser_params::heap, RNode::node, NULL, rb_gc_force_recycle(), RNode::u2, and xfree().
Definition at line 17334 of file parse.c.
References parser_data_type, Qfalse, Qtrue, TypedData_Get_Struct, and yydebug.
void* rb_parser_malloc | ( | struct parser_params * | parser, |
size_t | size | ||
) |
VALUE rb_parser_new | ( | void | ) |
Definition at line 17290 of file parse.c.
References p, parser_data_type, parser_new(), and TypedData_Wrap_Struct.
Referenced by rb_compile_cstr(), rb_compile_file(), and rb_compile_string().
void* rb_parser_realloc | ( | struct parser_params * | parser, |
void * | ptr, | ||
size_t | size | ||
) |
Definition at line 17385 of file parse.c.
References ADD2HEAP, RNode::cnt, cnt, parser_params::heap, HEAPCNT, NEWHEAP, RNode::node, NULL, size, RNode::u1, RNode::u2, RNode::u3, and xrealloc.
Definition at line 17349 of file parse.c.
References parser_data_type, RTEST, TypedData_Get_Struct, and yydebug.
Definition at line 16356 of file parse.c.
References block_append, nd_type, NEW_CALL, NEW_GASGN, NEW_GVAR, NEW_OPT_N, NODE_PRELUDE, parser_data_type, rb_intern(), and TypedData_Get_Struct.
Definition at line 17273 of file parse.c.
References reserved_word().
Referenced by parser_yylex(), and reg_named_capture_assign_iter().
|
static |
Definition at line 16652 of file parse.c.
References name, rb_enc_get(), rb_enc_symname_type(), RB_GC_GUARD, RSTRING_LEN, StringValuePtr, and type.
Referenced by rb_is_attrset_name(), rb_is_class_name(), rb_is_const_name(), rb_is_global_name(), rb_is_instance_name(), rb_is_junk_name(), rb_is_local_name(), and rb_is_method_name().
VALUE rb_sym_all_symbols | ( | void | ) |
Definition at line 16954 of file parse.c.
References RString::ary, global_symbols, st_table::num_entries, rb_ary_new2(), st_foreach(), symbols::sym_id, and symbols_i().
int rb_symname_p | ( | const char * | name | ) |
Definition at line 16534 of file parse.c.
References name, rb_ascii8bit_encoding(), and rb_enc_symname_p().
|
static |
Definition at line 15453 of file parse.c.
References RNode::flags, nd_body, nd_else, nd_head, nd_next, nd_resq, nd_type, NEW_NIL, NODE_BEGIN, NODE_BLOCK, NODE_CASE, NODE_ENSURE, NODE_FL_NEWLINE, NODE_IF, NODE_NIL, NODE_RESCUE, NODE_RETURN, NODE_WHEN, and subnodes.
|
static |
Definition at line 16295 of file parse.c.
References compile_error, err, NIL_P, options(), PARSER_ARG, Qnil, rb_attr_get(), rb_errinfo, rb_intern(), rb_reg_compile(), rb_set_errinfo(), rb_str_append(), rb_str_cat(), RE_OPTION_MASK, reg_fragment_setenc, RSTRING_PTR, ruby_sourcefile, and ruby_sourceline.
|
static |
Definition at line 16200 of file parse.c.
References compile_error, err, options(), PARSER_ARG, Qnil, RB_GC_GUARD, rb_obj_as_string(), rb_reg_check_preprocess(), reg_fragment_setenc, and RSTRING_PTR.
|
static |
Definition at line 16161 of file parse.c.
References compile_error, current_enc, ENC_CODERANGE_7BIT, ENCODING_GET, ENCODING_IS_ASCII8BIT, ENCODING_SET, options(), PARSER_ARG, rb_ascii8bit_encoding(), rb_char_to_option_kcode(), rb_enc_associate(), rb_enc_get(), rb_enc_name, rb_enc_str_coderange(), rb_usascii_encoding(), RE_OPTION_ENCODING_IDX, and RE_OPTION_ENCODING_NONE.
|
static |
Definition at line 16263 of file parse.c.
References block_append, reg_named_capture_assign_t::enc, reg_named_capture_assign_t::fail_block, gettable, INT2FIX, match(), NEW_CALL, NEW_IF, NEW_LIST, NEW_LIT, newline_node(), reg_named_capture_assign_t::num, onig_foreach_name(), reg_named_capture_assign_t::parser, Qnil, rb_enc_get(), rb_intern(), reg_named_capture_assign_iter(), RREGEXP, and reg_named_capture_assign_t::succ_block.
|
static |
Definition at line 16223 of file parse.c.
References assignable, block_append, dvar_defined, parser_params::enc, reg_named_capture_assign_t::enc, reg_named_capture_assign_t::fail_block, gettable, ID2SYM, idAREF, ISASCII, local_id, MAX_WORD_LENGTH, name, NEW_BEGIN, NEW_CALL, NEW_LIST, NEW_LIT, newline_node(), node_assign, reg_named_capture_assign_t::num, reg_named_capture_assign_t::parser, Qnil, rb_enc_islower, rb_enc_symname2_p(), rb_id2name(), rb_intern(), rb_intern3(), rb_reserved_word(), rb_warningS, ST_CONTINUE, and reg_named_capture_assign_t::succ_block.
Referenced by reg_named_capture_assign_gen().
|
static |
Definition at line 16662 of file parse.c.
References name, rb_enc_str_new(), and register_symid_str().
Definition at line 16669 of file parse.c.
References global_symbols, id, symbols::id_str, OBJ_FREEZE, st_add_direct(), and symbols::sym_id.
Referenced by intern_str(), rb_id2str(), and register_symid().
Definition at line 15443 of file parse.c.
References nd_type, and NODE_BEGIN.
Referenced by newline_node(), and yyparse().
|
static |
Definition at line 15732 of file parse.c.
References nd_set_type, nd_type, no_blockarg(), NODE_ARRAY, and NODE_VALUES.
|
static |
Definition at line 13206 of file parse.c.
References ISALNUM, ISSPACE, parser_encode_length(), parser_set_encode(), rb_str_new(), rb_str_resize(), RSTRING_PTR, and STRNCASECMP.
Referenced by parser_yylex().
|
static |
Definition at line 15081 of file parse.c.
References dvar_curr, dvar_defined_get, dyna_in_block, is_private_local_id(), local_id, LVAR_USED, lvtbl, name, rb_id2name(), rb_warningS, ruby_sourceline, vtable_add(), and yyerror.
|
inlinestatic |
Definition at line 12431 of file parse.c.
Referenced by parser_tokadd_string().
Definition at line 15239 of file parse.c.
References nd_type, NODE_ARRAY, and NODE_SPLAT.
Referenced by yyparse().
|
static |
Definition at line 16678 of file parse.c.
References ENC_CODERANGE_7BIT, ENC_CODERANGE_BROKEN, FALSE, rb_eEncodingError, rb_enc_asciicompat, rb_enc_get(), rb_enc_str_coderange(), rb_raise(), and TRUE.
Referenced by intern_str(), rb_check_id(), and rb_check_id_cstr().
Definition at line 16931 of file parse.c.
References RString::ary, ID2SYM, rb_ary_push(), and ST_CONTINUE.
Referenced by rb_sym_all_symbols().
|
static |
Definition at line 11567 of file parse.c.
References lex_p, lex_pbeg, p, strlen(), and token.
Referenced by token_info_pop(), and token_info_push().
|
static |
Definition at line 11581 of file parse.c.
References lex_p, lex_pbeg, p, strlen(), and token.
Referenced by token_info_pop(), and token_info_push().
|
static |
Definition at line 11611 of file parse.c.
References token_info::column, token_info::linenum, token_info::next, token_info::nonspc, parser_params::parser_token_info, parser_params::parser_token_info_enabled, rb_compile_warn(), ruby_sourcefile, ruby_sourceline, token_info::token, token, token_info_get_column(), token_info_has_nonspaces(), and xfree().
|
static |
Definition at line 11594 of file parse.c.
References ALLOC, token_info::column, token_info::linenum, token_info::next, token_info::nonspc, parser_params::parser_token_info, parser_params::parser_token_info_enabled, ruby_sourceline, token_info::token, token, token_info_get_column(), and token_info_has_nonspaces().
|
static |
Definition at line 15278 of file parse.c.
References cond, FALSE, nd_type, NODE_AND, NODE_BEGIN, NODE_BLOCK, NODE_BREAK, NODE_DEFN, NODE_DEFS, NODE_IF, NODE_NEXT, NODE_OR, NODE_REDO, NODE_RETRY, NODE_RETURN, parser_warning, rb_warning0, TRUE, value_expr, and yyerror.
|
static |
Definition at line 15340 of file parse.c.
References nd_line, nd_type, NODE_BACK_REF, NODE_CALL, NODE_COLON2, NODE_COLON3, NODE_CONST, NODE_CVAR, NODE_DEFINED, NODE_DOT2, NODE_DOT3, NODE_DREGX, NODE_DREGX_ONCE, NODE_DSTR, NODE_DVAR, NODE_FALSE, NODE_GVAR, NODE_IVAR, NODE_LIT, NODE_LVAR, NODE_NIL, NODE_NTH_REF, NODE_SELF, NODE_STR, NODE_TRUE, rb_id2name(), rb_warnS, RTEST, ruby_sourceline, ruby_verbose, tCMP, tEQ, tGEQ, tLEQ, tNEQ, tPOW, tUMINUS, and tUPLUS.
|
static |
Definition at line 15429 of file parse.c.
References nd_type, NODE_BLOCK, RTEST, ruby_verbose, and void_expr0.
Definition at line 239 of file parse.c.
References id, POINTER_P, rb_bug(), rb_id2name(), REALLOC_N, vtable::tbl, and VTBL_DEBUG.
Referenced by arg_var_gen(), local_var_gen(), and shadowing_lvar_gen().
Definition at line 215 of file parse.c.
References ALLOC, ALLOC_N, vtable::prev, vtable::tbl, and VTBL_DEBUG.
Referenced by dyna_push_gen(), and local_push_gen().
|
static |
Definition at line 227 of file parse.c.
References POINTER_P, vtable::tbl, VTBL_DEBUG, and xfree().
Referenced by dyna_pop_1(), and local_pop_gen().
Definition at line 254 of file parse.c.
References i, POINTER_P, and vtable::tbl.
Referenced by dvar_curr_gen(), dvar_defined_gen(), local_id_gen(), and local_tbl_gen().
Definition at line 202 of file parse.c.
References POINTER_P, and vtable::pos.
Referenced by arg_var_gen(), internal_id_gen(), local_tbl_gen(), and local_var_gen().
|
static |
Definition at line 15565 of file parse.c.
References e_option_supplied(), and parser_warn.
Referenced by cond0(), and range_op().
|
static |
Definition at line 15950 of file parse.c.
References cnt, i, is_private_local_id(), LVAR_USED, vtable::pos, rb_bug(), rb_id2name(), rb_warn4S, ruby_sourcefile, vtable::tbl, local_vars::used, v, and local_vars::vars.
Referenced by dyna_pop_1(), and local_pop_gen().
|
static |
Definition at line 15571 of file parse.c.
References e_option_supplied(), and parser_warning.
Referenced by cond0().
|
static |
|
static |
|
static |
Definition at line 4467 of file parse.c.
References yy_symbol_value_print(), YYFPRINTF, YYNTOKENS, and yytname.
Referenced by yy_reduce_print().
|
static |
Definition at line 4433 of file parse.c.
References YYNTOKENS, and YYUSE.
Referenced by yy_symbol_print().
|
static |
Definition at line 11803 of file parse.c.
References rb_str_new_frozen(), rb_suppress_tracing(), RSTRING_PTR, ruby_sourcefile, ruby_sourcefile_string, ruby_sourceline, and yycompile0().
Referenced by parser_compile_string(), and rb_parser_compile_file_path().
Definition at line 11743 of file parse.c.
References compile_for_eval, coverage(), debug_lines(), deferred_nodes, e_option_supplied(), lex_lastline, lex_nextline, lex_p, lex_pbeg, lex_pend, lex_strterm, NEW_NIL, NEW_PRELUDE, parser_prepare(), parser_params::parser_ruby_sourcefile, parser_params::parser_ruby_sourceline, parser_params::parser_token_info_enabled, rb_ary_push(), rb_safe_level, RTEST, ruby_coverage, ruby_debug_lines, RUBY_DTRACE_PARSE_BEGIN, RUBY_DTRACE_PARSE_BEGIN_ENABLED, RUBY_DTRACE_PARSE_END, RUBY_DTRACE_PARSE_END_ENABLED, ruby_eval_tree, ruby_eval_tree_begin, ruby_sourcefile_string, ruby_sourceline, ruby_verbose, STR_NEW0, and yyparse.
Referenced by yycompile().
|
static |
Definition at line 4832 of file parse.c.
References YY_SYMBOL_PRINT, and YYUSE.
Referenced by yyparse().
|
static |
Definition at line 14564 of file parse.c.
References NIL_P, p, parser_yylex(), parser_params::parser_yylval, Qundef, and YYSTYPE::val.
int yyparse | ( | ) |
int yyparse | ( | struct parser_params * | parser | ) |
Definition at line 4892 of file parse.c.
References ALLOC_N, arg_append, arg_blk_pass(), arg_concat, arg_var, args, aryset, assignable, attrset, block_append, block_dup_check, brace_nest, buf, call_bin_op, call_uni_op, CMDARG_PUSH, cmdarg_stack, command_start, compile_error, compile_for_eval, cond, COND_POP, COND_PUSH, cond_stack, cur_mid, deferred_nodes, dsym_node, dyna_in_block, dyna_pop, dyna_push, evstr2dstr, FIXNUM_P, fixpos(), fixup_nodes(), formal_argument, get_id, gettable, head, YYSTYPE::id, id, ID2SYM, idAREF, idEq, ifndef_ripper, in_def, in_defined, in_single, INT2FIX, internal_id, is_local_id, keyword__ENCODING__, keyword__FILE__, keyword__LINE__, keyword_false, keyword_nil, keyword_self, keyword_true, lex_state, lex_strterm, list, list_append, list_concat, literal_concat, literal_concat0(), local_id, local_pop, local_push, logop, lpar_beg, match_op, nd_args, nd_body, nd_iter, nd_lit, nd_next, nd_plen, nd_set_line, nd_set_type, nd_type, nd_value, negate_lit(), NEW_ALIAS, new_args, NEW_ARGS_AUX, new_args_tail, NEW_ARGSCAT, new_attr_op_assign, NEW_BEGIN, NEW_BLOCK_PASS, NEW_BREAK, new_bv, NEW_CALL, NEW_CASE, NEW_CDECL, NEW_CLASS, NEW_COLON2, NEW_COLON3, new_const_op_assign, NEW_CVAR, NEW_DASGN_CURR, NEW_DEFINED, NEW_DEFN, NEW_DEFS, NEW_DOT2, NEW_DOT3, NEW_DSTR, NEW_DVAR, NEW_ENSURE, NEW_ERRINFO, NEW_EVSTR, new_evstr, NEW_FCALL, NEW_FOR, NEW_GVAR, NEW_HASH, NEW_IF, NEW_ITER, NEW_IVAR, NEW_KW_ARG, NEW_LAMBDA, NEW_LIST, NEW_LIT, NEW_LVAR, NEW_MASGN, NEW_MODULE, NEW_NEXT, NEW_NIL, NEW_NODE, NEW_OP_ASGN1, new_op_assign, NEW_OPT_ARG, NEW_POSTARG, NEW_POSTEXE, NEW_REDO, NEW_RESBODY, NEW_RESCUE, NEW_RETRY, NEW_RETURN, NEW_SCLASS, NEW_SCOPE, NEW_SPLAT, NEW_STR, NEW_SUPER, NEW_UNDEF, NEW_UNLESS, NEW_UNTIL, NEW_VALIAS, NEW_WHEN, NEW_WHILE, NEW_XSTR, NEW_YIELD, new_yield, NEW_ZARRAY, NEW_ZSUPER, newline_node(), NIL_P, YYSTYPE::node, NODE_AND, NODE_ARRAY, node_assign, NODE_BEGIN, NODE_BLOCK, NODE_BLOCK_PASS, NODE_DASGN, NODE_DASGN_CURR, NODE_DREGX, NODE_DREGX_ONCE, NODE_DSTR, NODE_DSYM, NODE_DXSTR, NODE_ENSURE, NODE_FL_NEWLINE, NODE_LASGN, NODE_LIT, NODE_MASGN, NODE_OR, NODE_RESCUE, NODE_SCOPE, NODE_SELF, NODE_STR, NODE_XSTR, NODE_YIELD, NODE_ZARRAY, NOEX_PRIVATE, NULL, YYSTYPE::num, one(), options(), paren_nest, PARSER_ARG, parser_yyerror(), Qnil, Qnone, rb_backref_error, rb_cArray, rb_gc_force_recycle(), rb_intern(), rb_intern2(), rb_intern_str(), rb_parse_in_main(), rb_str_intern(), rb_str_resize(), RB_TYPE_P, rb_warn0, RE_OPTION_MASK, RE_OPTION_ONCE, reduce_nodes, reg_compile, reg_fragment_check, reg_named_capture_assign, remove_begin(), ret_args, ruby_eval_tree, ruby_eval_tree_begin, ruby_sourceline, shadowing_lvar, splat_array(), STR_NEW0, T_REGEXP, tail, tANDOP, tAREF, tASET, tCMP, tDSTAR, tEQ, tEQQ, tGEQ, tLEQ, tLSHFT, tMATCH, tNEQ, tNMATCH, token_info_pop, token_info_push, tokline, tOROP, tPOW, tRSHFT, TRUE, tUMINUS, tUPLUS, YYSTYPE::val, value_expr, YYSTYPE::vars, void_expr, void_stmts, YY_, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerrok, yyerror, YYFINAL, YYID, YYINITDEPTH, YYLAST, YYLEX, yylval, YYMAXDEPTH, YYNTOKENS, yypact, yypact_value_is_default, yypgoto, YYPOPSTACK, yyr1, yyr2, YYSIZE_T, yyalloc::yyss_alloc, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystos, YYSYNTAX_ERROR, yytable, yytable_value_is_error, YYTERROR, YYTRANSLATE, yyalloc::yyvs_alloc, and zero().
|
static |
Definition at line 4620 of file parse.c.
Referenced by yytnamerr().
|
static |
Definition at line 4596 of file parse.c.
References YYSIZE_T.
Referenced by yysyntax_error(), and yytnamerr().
|
static |
Definition at line 4693 of file parse.c.
References YY_, YYCASE_, yycheck, YYEMPTY, YYLAST, YYNTOKENS, yypact, yypact_value_is_default, YYSIZE_T, YYSTACK_ALLOC_MAXIMUM, yystrlen(), yytable, yytable_value_is_error, YYTERROR, yytname, and yytnamerr().
Definition at line 4645 of file parse.c.
References YYSIZE_T, yystpcpy(), and yystrlen().
Referenced by yysyntax_error().
|
static |
|
static |
Definition at line 15134 of file parse.c.
Referenced by rb_id_attrset().
|
static |
Definition at line 13071 of file parse.c.
Referenced by parser_magic_comment().
const char* name |
Definition at line 16398 of file parse.c.
Referenced by intern_str(), is_private_local_id(), new_bv_gen(), parser_encode_length(), parser_magic_comment(), parser_set_encode(), parser_set_token_info(), rb_check_id(), rb_check_id_cstr(), rb_enc_symname2_p(), rb_enc_symname_p(), rb_enc_symname_type(), rb_id2str(), rb_intern(), rb_intern2(), rb_intern3(), rb_is_attrset_name(), rb_is_class_name(), rb_is_const_name(), rb_is_global_name(), rb_is_instance_name(), rb_is_junk_name(), rb_is_local_name(), rb_is_method_name(), rb_str_symname_type(), rb_symname_p(), reg_named_capture_assign_iter(), register_symid(), and shadowing_lvar_gen().
const { ... } op_tbl[] |
Referenced by intern_str(), and rb_id2str().
|
static |
Definition at line 11863 of file parse.c.
Referenced by parser_compile_string(), rb_parser_append_print(), rb_parser_compile_file_path(), rb_parser_encoding(), rb_parser_end_seen_p(), rb_parser_get_yydebug(), rb_parser_new(), rb_parser_set_yydebug(), and rb_parser_while_loop().
const unsigned int ruby_global_name_punct_bits[] |
Definition at line 12599 of file parse.c.
Referenced by is_global_name_punct().
|
static |
ID token |
Definition at line 16397 of file parse.c.
Referenced by parser_yylex(), rb_id2str(), token_info_get_column(), token_info_has_nonspaces(), token_info_pop(), and token_info_push().
|
static |
Definition at line 3120 of file parse.c.
Referenced by yyparse(), and yysyntax_error().
|
static |
|
static |
Definition at line 1873 of file parse.c.
Referenced by yyparse().
|
static |
Definition at line 1900 of file parse.c.
Referenced by yyparse(), and yysyntax_error().
|
static |
Definition at line 2011 of file parse.c.
Referenced by yyparse().
|
static |
Definition at line 1200 of file parse.c.
Referenced by yy_reduce_print().
|
static |
|
static |
Definition at line 1692 of file parse.c.
Referenced by yy_reduce_print(), and yyparse().
|
static |
Definition at line 1268 of file parse.c.
Referenced by yy_reduce_print().
|
static |
Definition at line 1463 of file parse.c.
Referenced by yy_reduce_print().
|
static |
|
static |
Definition at line 2039 of file parse.c.
Referenced by yyparse(), and yysyntax_error().
Definition at line 1534 of file parse.c.
Referenced by yy_symbol_print(), and yysyntax_error().
|
static |