Ruby  2.0.0p353(2013-11-22revision43784)
Data Structures | Defines | Typedefs | Enumerations | Functions | Variables
parse.y File Reference
#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  magic_comment
struct  reg_named_capture_assign_t
struct  symbols

Defines

#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 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 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 HEAPCNT(n, size)   ((n) * (size) / sizeof(YYSTYPE))
#define NEWHEAP()   rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0)
#define ADD2HEAP(n, c, p)
#define NEW_ERRINFO()   NEW_NODE(NODE_ERRINFO,0,0,0)

Typedefs

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)

Enumerations

enum  string_type {
  str_squote = (0), str_dquote = (STR_FUNC_EXPAND), str_xquote = (STR_FUNC_EXPAND), str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
  str_sword = (STR_FUNC_QWORDS), str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), str_ssym = (STR_FUNC_SYMBOL), str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND),
  str_squote = (0), str_dquote = (STR_FUNC_EXPAND), str_xquote = (STR_FUNC_EXPAND), str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
  str_sword = (STR_FUNC_QWORDS), str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), str_ssym = (STR_FUNC_SYMBOL), str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND),
  str_squote = (0), str_dquote = (STR_FUNC_EXPAND), str_xquote = (STR_FUNC_EXPAND), str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
  str_sword = (STR_FUNC_QWORDS), str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), str_ssym = (STR_FUNC_SYMBOL), str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND),
  str_squote = (0), str_dquote = (STR_FUNC_EXPAND), str_xquote = (STR_FUNC_EXPAND), str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
  str_sword = (STR_FUNC_QWORDS), str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), str_ssym = (STR_FUNC_SYMBOL), str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
}

Functions

 if ($2)
 fixpos ($$, $1) = $2
 if (!$$)$$ = NEW_BEGIN(0)
fcall nd_set_line ($$, tokline)
 CMDARG_PUSH (1)
 fixpos ($$, $2?$2:$5)
 if (!node)
else switch (nd_type(node))
 arg_var (shadowing_lvar(get_id($2)))
else if (!dyna_in_block()&&local_id($2)) yyerror("duplicated block argument name")
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 token_info_push (struct parser_params *parser, const char *token)
static void token_info_pop (struct parser_params *parser, const char *token)
static int parser_yyerror (struct parser_params *parser, const char *msg)
static void parser_prepare (struct parser_params *parser)
static VALUE debug_lines (const char *f)
static VALUE coverage (const char *f, int n)
static int e_option_supplied (struct parser_params *parser)
static VALUE yycompile0 (VALUE arg)
static NODEyycompile (struct parser_params *parser, const char *f, int line)
static rb_encodingmust_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 NODEparser_compile_string (volatile VALUE vparser, const char *f, VALUE s, int line)
NODErb_compile_string (const char *f, VALUE s, int line)
NODErb_parser_compile_string (volatile VALUE vparser, const char *f, VALUE s, int line)
NODErb_compile_cstr (const char *f, const char *s, int len, int line)
NODErb_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)
NODErb_compile_file (const char *f, VALUE file, int start)
NODErb_parser_compile_file (volatile VALUE vparser, const char *f, 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 ID formal_argument_gen (struct parser_params *parser, ID lhs)
static int lvar_defined_gen (struct parser_params *parser, ID id)
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)
 yylex (void *p)
static NODEnode_newnode (struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2)
static enum node_type nodetype (NODE *node)
static int nodeline (NODE *node)
static NODEnewline_node (NODE *node)
static void fixpos (NODE *node, NODE *orig)
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 NODEblock_append_gen (struct parser_params *parser, NODE *head, NODE *tail)
static NODElist_append_gen (struct parser_params *parser, NODE *list, NODE *item)
static NODElist_concat_gen (struct parser_params *parser, NODE *head, NODE *tail)
static int literal_concat0 (struct parser_params *parser, VALUE head, VALUE tail)
static NODEliteral_concat_gen (struct parser_params *parser, NODE *head, NODE *tail)
static NODEevstr2dstr_gen (struct parser_params *parser, NODE *node)
static NODEnew_evstr_gen (struct parser_params *parser, NODE *node)
static NODEcall_bin_op_gen (struct parser_params *parser, NODE *recv, ID id, NODE *arg1)
static NODEcall_uni_op_gen (struct parser_params *parser, NODE *recv, ID id)
static NODEmatch_op_gen (struct parser_params *parser, NODE *node1, NODE *node2)
static NODEgettable_gen (struct parser_params *parser, ID id)
static NODEassignable_gen (struct parser_params *parser, ID id, NODE *val)
static int is_private_local_id (ID name)
static ID shadowing_lvar_gen (struct parser_params *parser, ID name)
static void new_bv_gen (struct parser_params *parser, ID name)
static NODEaryset_gen (struct parser_params *parser, NODE *recv, NODE *idx)
static void block_dup_check_gen (struct parser_params *parser, NODE *node1, NODE *node2)
ID rb_id_attrset (ID id)
static NODEattrset_gen (struct parser_params *parser, NODE *recv, ID id)
static void rb_backref_error_gen (struct parser_params *parser, NODE *node)
static NODEarg_concat_gen (struct parser_params *parser, NODE *node1, NODE *node2)
static NODEarg_append_gen (struct parser_params *parser, NODE *node1, NODE *node2)
static NODEsplat_array (NODE *node)
static NODEnode_assign_gen (struct parser_params *parser, NODE *lhs, NODE *rhs)
static int value_expr_gen (struct parser_params *parser, NODE *node)
static void void_expr_gen (struct parser_params *parser, NODE *node)
static void void_stmts_gen (struct parser_params *parser, NODE *node)
static NODEremove_begin (NODE *node)
static void reduce_nodes_gen (struct parser_params *parser, NODE **body)
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 void fixup_nodes (NODE **rootnode)
static NODEcond0 (struct parser_params *, NODE *)
static NODErange_op (struct parser_params *parser, NODE *node)
static int literal_node (NODE *node)
static NODEcond_gen (struct parser_params *parser, NODE *node)
static NODElogop_gen (struct parser_params *parser, enum node_type type, NODE *left, NODE *right)
static void no_blockarg (struct parser_params *parser, NODE *node)
static NODEret_args_gen (struct parser_params *parser, NODE *node)
static NODEnew_yield_gen (struct parser_params *parser, NODE *node)
static NODEnegate_lit (NODE *node)
static NODEarg_blk_pass (NODE *node1, NODE *node2)
static NODEnew_args_gen (struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, NODE *tail)
static NODEnew_args_tail_gen (struct parser_params *parser, NODE *k, ID kr, ID b)
static NODEdsym_node_gen (struct parser_params *parser, NODE *node)
static NODEnew_op_assign_gen (struct parser_params *parser, NODE *lhs, ID op, NODE *rhs)
static NODEnew_attr_op_assign_gen (struct parser_params *parser, NODE *lhs, ID attr, ID op, NODE *rhs)
static NODEnew_const_op_assign_gen (struct parser_params *parser, NODE *lhs, ID op, NODE *rhs)
static void warn_unused_var (struct parser_params *parser, struct local_vars *local)
static void local_push_gen (struct parser_params *parser, int inherit_dvars)
static void local_pop_gen (struct parser_params *parser)
static IDvtable_tblcpy (ID *buf, const struct vtable *src)
static IDlocal_tbl_gen (struct parser_params *parser)
static int arg_var_gen (struct parser_params *parser, ID id)
static int local_var_gen (struct parser_params *parser, ID id)
static int local_id_gen (struct parser_params *parser, ID id)
static struct vtabledyna_push_gen (struct parser_params *parser)
static void dyna_pop_1 (struct parser_params *parser)
static void dyna_pop_gen (struct parser_params *parser, const struct vtable *lvargs)
static int dyna_in_block_gen (struct parser_params *parser)
static int dvar_defined_gen (struct parser_params *parser, ID id, int get)
static int dvar_curr_gen (struct parser_params *parser, ID id)
static void reg_fragment_setenc_gen (struct parser_params *parser, VALUE str, int options)
static int reg_fragment_check_gen (struct parser_params *parser, VALUE str, int options)
static int reg_named_capture_assign_iter (const OnigUChar *name, const OnigUChar *name_end, int back_num, int *back_refs, OnigRegex regex, void *arg0)
static NODEreg_named_capture_assign_gen (struct parser_params *parser, VALUE regexp, NODE *match)
static VALUE reg_compile_gen (struct parser_params *parser, VALUE str, int options)
void rb_gc_mark_parser (void)
NODErb_parser_append_print (VALUE vparser, NODE *node)
NODErb_parser_while_loop (VALUE vparser, NODE *node, int chop, int split)
void Init_sym (void)
void rb_gc_mark_symbols (void)
static ID internal_id_gen (struct parser_params *parser)
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)
int rb_enc_symname2_p (const char *name, long len, rb_encoding *enc)
static int rb_str_symname_type (VALUE name)
static ID register_symid (ID id, const char *name, long len, rb_encoding *enc)
static ID register_symid_str (ID id, VALUE str)
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.
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)
struct kwtablerb_reserved_word (const char *str, unsigned int len)
static struct parser_paramsparser_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

top_compstmt __pad0__
fixup_nodesdeferred_nodes
top_stmts __pad1__ = $1
top_stmt __pad2__
top_stmt bodystmt = NEW_BEGIN(0)
compstmt __pad3__
stmts __pad4__ = $1
stmt_or_begin __pad5__
command_asgn __pad6__
 lhs
expr __pad7__
expr_value __pad8__
command_call __pad9__
block_command __pad10__
block_command cmd_brace_block
fcall __pad11__ = ruby_sourceline
command __pad12__
 nd_args = $2
mlhs __pad13__
mlhs_inner __pad14__
mlhs_inner mlhs_basic
mlhs_item __pad15__
mlhs_head __pad16__
mlhs_post __pad17__
 mlhs_post
mlhs_node __pad18__
lhs __pad19__
cname __pad20__
 tCONSTANT
cpath __pad21__
fname __pad22__
fsym __pad23__ = $1
fitem __pad24__
 dsym
undef_list __pad25__
 undef_list
op __pad26__
reswords __pad27__
arg __pad28__
arg_value __pad29__
aref_args __pad30__
 args
paren_args __pad31__
opt_paren_args __pad32__
opt_call_args __pad33__
call_args __pad34__
command_args __pad35__ = NEW_LIST($1)
block_arg __pad36__
opt_block_arg __pad37__
args __pad38__
mrhs __pad39__
primary __pad40__
primary_value __pad41__
k_begin __pad42__
k_if __pad43__
k_unless __pad44__
k_while __pad45__
k_until __pad46__
k_case __pad47__
k_for __pad48__
k_class __pad49__
k_module __pad50__
k_def __pad51__
< num > k_end = ruby_sourceline
then __pad52__
do __pad53__
if_tail __pad54__
opt_else __pad55__
for_var __pad56__
f_marg __pad57__
f_marg_list __pad58__
 f_marg_list
f_margs __pad59__
block_args_tail __pad60__
opt_block_args_tail __pad61__
block_param __pad62__
block_param f_block_optarg
opt_block_param __pad63__
block_param_def __pad64__
opt_bv_decl __pad65__
 opt_nl
bv_decls __pad66__
bv_decls bvar
bvar __pad67__
lambda __pad68__
f_larglist __pad69__
lambda_body __pad70__
do_block __pad71__
block_call __pad72__ = ruby_sourceline
method_call __pad73__
brace_block __pad74__
case_body __pad75__ = ruby_sourceline
case_body cases
opt_rescue __pad76__
 none
exc_list __pad77__
exc_var __pad78__
opt_ensure __pad79__
literal __pad80__
strings __pad81__
string __pad82__
string string1
xstring __pad83__
regexp __pad84__
NODEnode = $2
NODElist
NODEprev
words __pad85__ = node
word_list __pad86__
word __pad87__
word symbols
symbol_list __pad88__
qwords __pad89__
qsymbols __pad90__
qword_list __pad91__
qsym_list __pad92__
string_contents __pad93__
xstring_contents __pad94__
regexp_contents __pad95__
string_content __pad96__
 lex_strterm = 0
 lex_state = EXPR_BEG
string_dvar __pad97__
symbol __pad98__
sym __pad99__ = $2
dsym __pad100__
numeric __pad101__ = dsym_node($2)
user_variable __pad102__
keyword_variable __pad103__
var_ref __pad104__
var_lhs __pad105__
backref __pad106__
superclass __pad107__
<'{lex_state=EXPR_BEG;command_start=TRUE;}expr_valueterm{$$=$3;}|errorterm{yyerrok;$$=0;};f_arglist:'('f_argsrparen{$$=$2;lex_state=EXPR_BEG;command_start=TRUE;}|f_argsterm{$$=$1;lex_state=EXPR_BEG;command_start=TRUE;};args_tail:f_kwarg','f_kwrestopt_f_block_arg{$$=new_args_tail($1,
$3, $4);}|f_kwargopt_f_block_arg{$$=new_args_tail($1,
Qnone,
$2);}|f_kwrestopt_f_block_arg{$$=new_args_tail(Qnone,
$1, $2);}|f_block_arg{$$=new_args_tail(Qnone,
Qnone, $1);};opt_args_tail:','args_tail{$$=$2;}|{$$=new_args_tail(Qnone,
Qnone, Qnone);};f_args:f_arg','f_optarg','f_rest_argopt_args_tail{$$=new_args($1,
$3, $5, Qnone, $6);}|f_arg','f_optarg','f_rest_arg','f_argopt_args_tail{$$=new_args($1,
$3, $5, $7, $8);}|f_arg','f_optargopt_args_tail{$$=new_args($1,
$3, Qnone, Qnone, $4);}|f_arg','f_optarg','f_argopt_args_tail{$$=new_args($1,
$3, Qnone, $5, $6);}|f_arg','f_rest_argopt_args_tail{$$=new_args($1,
Qnone, $3, Qnone, $4);}|f_arg','f_rest_arg','f_argopt_args_tail{$$=new_args($1,
Qnone,
$3, $5, $6);}|f_argopt_args_tail{$$=new_args($1,
Qnone, Qnone, Qnone,
$2);}|f_optarg','f_rest_argopt_args_tail{$$=new_args(Qnone,
$1, $3, Qnone, $4);}|f_optarg','f_rest_arg','f_argopt_args_tail{$$=new_args(Qnone,
$1, $3, $5, $6);}|f_optargopt_args_tail{$$=new_args(Qnone,
$1, Qnone, Qnone,
$2);}|f_optarg','f_argopt_args_tail{$$=new_args(Qnone,
$1, Qnone,
$3, $4);}|f_rest_argopt_args_tail{$$=new_args(Qnone,
Qnone, $1, Qnone,
$2);}|f_rest_arg','f_argopt_args_tail{$$=new_args(Qnone,
Qnone, $1, $3, $4);}|args_tail{$$=new_args(Qnone,
Qnone, Qnone, Qnone,
$1);}|{$$=new_args_tail(Qnone,
Qnone, Qnone);$$=new_args(Qnone,
Qnone, Qnone, Qnone,$$);};f_bad_arg:tCONSTANT{yyerror("formalargumentcannotbeaconstant");$$=0;}|tIVAR{yyerror("formalargumentcannotbeaninstancevariable");$$=0;}|tGVAR{yyerror("formalargumentcannotbeaglobalvariable");$$=0;}|tCVAR{yyerror("formalargumentcannotbeaclassvariable");$$=0;};f_norm_arg:f_bad_arg|tIDENTIFIER{formal_argument(get_id($1));$$=$1;};f_arg_item:f_norm_arg{arg_var(get_id($1));$$=NEW_ARGS_AUX($1,
1);}|tLPARENf_margsrparen{IDtid=internal_id();arg_var(tid);if(dyna_in_block()){$2-> 
nd_value = NEW_DVAR(tid)
 nd_next = $2
f_arg __pad108__
f_kw __pad109__
f_block_kw __pad110__ = assignable($1, $2) NEW_KW_ARG(0, $$)
f_block_kwarg __pad111__ = assignable($1, $2) NEW_KW_ARG(0, $$)
 f_block_kwarg
f_kwarg __pad112__
 f_kwarg
kwrest_mark __pad113__
f_kwrest __pad114__
f_opt __pad115__ = $2
f_block_opt __pad116__ = assignable($1, $3) NEW_OPT_ARG(0, $$)
f_block_optarg __pad117__ = assignable($1, $3) NEW_OPT_ARG(0, $$)
f_optarg __pad118__
 f_optarg
restarg_mark __pad119__
f_rest_arg __pad120__
blkarg_mark __pad121__ = $2
f_block_arg __pad122__
opt_f_block_arg __pad123__ = $2
singleton __pad124__
assoc_list __pad125__
assocs __pad126__
assoc __pad127__
operation __pad128__
operation2 __pad129__
operation3 __pad130__
dot_or_colon __pad131__
opt_terms __pad132__
opt_nl __pad133__
rparen __pad134__
rbracket __pad135__
trailer __pad136__
trailer term
terms __pad137__
none __pad138__
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 struct magic_comment magic_comments []
struct {
   ID   token
   const char *   name
op_tbl []
static struct symbols global_symbols
static struct st_hash_type symhash

Define Documentation

#define ADD2HEAP (   n,
  c,
 
)
Value:
((parser->heap = (n))->u1.node = (p), \
                           (n)->u3.cnt = (c), (p))

Definition at line 18922 of file parse.y.

#define ambiguous_operator (   op,
  syn 
)
Value:
( \
    rb_warning0("`"op"' after local variable is interpreted as binary operator"), \
    rb_warning0("even though it seems like "syn""))

Definition at line 14881 of file parse.y.

#define arg_ambiguous ( )    (arg_ambiguous_gen(parser), 1)

Definition at line 14545 of file parse.y.

#define arg_append (   h,
 
)    arg_append_gen(parser,(h),(t))
#define arg_concat (   h,
 
)    arg_concat_gen(parser,(h),(t))
#define arg_var (   id)    arg_var_gen(parser, (id))
#define aryset (   node1,
  node2 
)    aryset_gen(parser, (node1), (node2))
#define assignable (   id,
  node 
)    assignable_gen(parser, (id), (node))
#define assignable_result (   x)    (x)
#define attrset (   node,
  id 
)    attrset_gen(parser, (node), (id))
#define BIT (   c,
  idx 
)    (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)

Definition at line 14205 of file parse.y.

#define BITSTACK_LEXPOP (   stack)    ((stack) = ((stack) >> 1) | ((stack) & 1))
#define BITSTACK_POP (   stack)    ((stack) = (stack) >> 1)
#define BITSTACK_PUSH (   stack,
 
)    ((stack) = ((stack)<<1)|((n)&1))
#define BITSTACK_SET_P (   stack)    ((stack)&1)
#define block_append (   h,
 
)    block_append_gen(parser,(h),(t))
#define block_dup_check (   n1,
  n2 
)    block_dup_check_gen(parser,(n1),(n2))
#define brace_nest   (parser->parser_brace_nest)
#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 calloc   YYCALLOC
#define class_nest   (parser->parser_class_nest)
#define CMDARG_P ( )    BITSTACK_SET_P(cmdarg_stack)
#define CMDARG_POP ( )    BITSTACK_POP(cmdarg_stack)
#define CMDARG_PUSH (   n)    BITSTACK_PUSH(cmdarg_stack, (n))
#define cmdarg_stack   (parser->parser_cmdarg_stack)
#define command_start   (parser->parser_command_start)
#define compile_error   parser->nerr++,rb_compile_error_with_enc
#define compile_for_eval   (parser->parser_compile_for_eval)
#define cond (   node)    cond_gen(parser, (node))
#define COND_P ( )    BITSTACK_SET_P(cond_stack)
#define COND_POP ( )    BITSTACK_POP(cond_stack)
#define COND_PUSH (   n)    BITSTACK_PUSH(cond_stack, (n))
#define cond_stack   (parser->parser_cond_stack)
#define cur_mid   (parser->parser_cur_mid)
#define current_enc   (parser->enc)
#define DEF_EXPR (   n)    EXPR_##n = (1 << EXPR_##n##_bit)
#define deferred_nodes   (parser->parser_deferred_nodes)
#define dispatch_heredoc_end ( )    ((void)0)

Definition at line 14430 of file parse.y.

#define dsym_node (   node)    dsym_node_gen(parser, (node))
#define dvar_curr (   id)    dvar_curr_gen(parser, (id))
#define dvar_defined (   id)    dvar_defined_gen(parser, (id), 0)
#define dvar_defined_get (   id)    dvar_defined_gen(parser, (id), 1)
#define DVARS_INHERIT   ((void*)1)
#define DVARS_SPECIAL_P (   tbl)    (!POINTER_P(tbl))
#define DVARS_TOPSCOPE   NULL
#define dyna_in_block ( )    dyna_in_block_gen(parser)
#define dyna_pop (   node)    dyna_pop_gen(parser, (node))
#define dyna_push ( )    dyna_push_gen(parser)
#define dyna_var (   id)    local_var(id)
#define ENABLE_SELECTOR_NAMESPACE   0

Definition at line 17994 of file parse.y.

#define ENC_SINGLE (   cr)    ((cr)==ENC_CODERANGE_7BIT)
#define ESCAPE_CONTROL   1

Definition at line 13799 of file parse.y.

#define ESCAPE_META   2

Definition at line 13800 of file parse.y.

#define evstr2dstr (   n)    evstr2dstr_gen(parser,(n))
#define flush_string_content (   enc)    ((void)(enc))

Definition at line 14198 of file parse.y.

#define formal_argument (   id)    formal_argument_gen(parser, (id))
#define free   YYFREE
#define get_id (   id)    (id)
#define get_value (   val)    (val)
#define gettable (   id)    gettable_gen(parser,(id))
#define HEAPCNT (   n,
  size 
)    ((n) * (size) / sizeof(YYSTYPE))

Definition at line 18920 of file parse.y.

#define here_document (   n)    parser_here_document(parser,(n))

Definition at line 13074 of file parse.y.

#define heredoc_end   (parser->parser_heredoc_end)
#define heredoc_identifier ( )    parser_heredoc_identifier(parser)

Definition at line 13075 of file parse.y.

#define heredoc_restore (   n)    parser_heredoc_restore(parser,(n))

Definition at line 13076 of file parse.y.

#define id_type (   id)    (is_notop_id(id) ? (int)((id)&ID_SCOPE_MASK) : -1)
#define ifndef_ripper (   x)    (x)
#define in_def   (parser->parser_in_def)
#define in_defined   (parser->parser_in_defined)
#define in_single   (parser->parser_in_single)
#define internal_id ( )    internal_id_gen(parser)
#define IS_AFTER_OPERATOR ( )    IS_lex_state(EXPR_FNAME | EXPR_DOT)

Definition at line 14878 of file parse.y.

#define IS_ARG ( )    IS_lex_state(EXPR_ARG_ANY)

Definition at line 14872 of file parse.y.

#define is_asgn_or_id (   id)
Value:
((is_notop_id(id)) && \
        (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \
         ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \
         ((id)&ID_SCOPE_MASK) == ID_CLASS))
#define is_attrset_id (   id)    (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
#define IS_BEG ( )    IS_lex_state(EXPR_BEG_ANY)

Definition at line 14874 of file parse.y.

#define is_class_id (   id)    (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
#define is_const_id (   id)    (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
#define IS_END ( )    IS_lex_state(EXPR_END_ANY)

Definition at line 14873 of file parse.y.

#define is_global_id (   id)    (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
#define is_identchar (   p,
  e,
  enc 
)    (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p)))

Definition at line 13173 of file parse.y.

#define is_instance_id (   id)    (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
#define is_junk_id (   id)    (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)
#define IS_LABEL_POSSIBLE ( )    ((IS_lex_state(EXPR_BEG | EXPR_ENDFN) && !cmd_state) || IS_ARG())

Definition at line 14876 of file parse.y.

#define IS_LABEL_SUFFIX (   n)    (peek_n(':',(n)) && !peek_n(':', (n)+1))

Definition at line 14877 of file parse.y.

#define IS_lex_state (   ls)    IS_lex_state_for(lex_state, (ls))
#define IS_lex_state_for (   x,
  ls 
)    ((x) & (ls))
#define is_local_id (   id)    (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
#define is_notop_id (   id)    ((id)>tLAST_OP_ID)
#define IS_SPCARG (   c)    (IS_ARG() && space_seen && !ISSPACE(c))

Definition at line 14875 of file parse.y.

#define lex_eol_p ( )    (lex_p >= lex_pend)

Definition at line 13595 of file parse.y.

#define lex_gets   (parser->parser_lex_gets)
#define lex_gets_ptr   (parser->parser_lex_gets_ptr)
#define lex_goto_eol (   parser)    ((parser)->parser_lex_p = (parser)->parser_lex_pend)

Definition at line 13594 of file parse.y.

#define lex_input   (parser->parser_lex_input)
#define lex_lastline   (parser->parser_lex_lastline)
#define lex_nextline   (parser->parser_lex_nextline)
#define lex_p   (parser->parser_lex_p)
#define lex_pbeg   (parser->parser_lex_pbeg)
#define lex_pend   (parser->parser_lex_pend)
#define lex_state   (parser->parser_lex_state)
#define lex_strterm   (parser->parser_lex_strterm)
#define list_append (   l,
 
)    list_append_gen(parser,(l),(i))
#define list_concat (   h,
 
)    list_concat_gen(parser,(h),(t))
#define literal_concat (   h,
 
)    literal_concat_gen(parser,(h),(t))
#define local_id (   id)    local_id_gen(parser, (id))
#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))
#define logop (   type,
  node1,
  node2 
)    logop_gen(parser, (type), (node1), (node2))
#define lpar_beg   (parser->parser_lpar_beg)
#define lvar_defined (   id)    lvar_defined_gen(parser, (id))
#define LVAR_USED   ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))

Definition at line 16678 of file parse.y.

#define lvtbl   (parser->parser_lvtbl)
#define malloc   YYMALLOC
#define match_op (   node1,
  node2 
)    match_op_gen(parser, (node1), (node2))
#define mixed_error (   enc1,
  enc2 
)
Value:
if (!errbuf) {  \
        size_t len = sizeof(mixed_msg) - 4;     \
        len += strlen(rb_enc_name(enc1));       \
        len += strlen(rb_enc_name(enc2));       \
        errbuf = ALLOCA_N(char, len);           \
        snprintf(errbuf, len, mixed_msg,        \
                 rb_enc_name(enc1),             \
                 rb_enc_name(enc2));            \
        yyerror(errbuf);                        \
    }
#define mixed_escape (   beg,
  enc1,
  enc2 
)
Value:
do {    \
        const char *pos = lex_p;                \
        lex_p = (beg);                          \
        mixed_error((enc1), (enc2));            \
        lex_p = pos;                            \
    } while (0)
#define nd_func   u1.id
#define nd_nest   u3.cnt
#define nd_paren (   node)    (char)((node)->u2.id >> CHAR_BIT*2)
#define nd_term (   node)    SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)
#define new_args (   f,
  o,
  r,
  p,
 
)    new_args_gen(parser, (f),(o),(r),(p),(t))
#define new_args_tail (   k,
  kr,
 
)    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_ERRINFO ( )    NEW_NODE(NODE_ERRINFO,0,0,0)
#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 14179 of file parse.y.

#define new_yield (   node)    new_yield_gen(parser, (node))
#define NEWHEAP ( )    rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0)

Definition at line 18921 of file parse.y.

#define newtok ( )    parser_newtok(parser)

Definition at line 13064 of file parse.y.

#define nextc ( )    parser_nextc(parser)

Definition at line 13062 of file parse.y.

#define no_digits ( )    do {yyerror("numeric literal without digits"); return 0;} while (0)
#define node_assign (   node1,
  node2 
)    node_assign_gen(parser, (node1), (node2))
#define NODE_HEREDOC   NODE_ARRAY /* 1, 3 to gc */
#define NODE_STRTERM   NODE_ZARRAY /* nothing to gc */
#define numberof (   array)    (int)(sizeof(array) / sizeof((array)[0]))
#define op_tbl_count   numberof(op_tbl)

Definition at line 17991 of file parse.y.

#define paren_nest   (parser->parser_paren_nest)
#define parse_string (   n)    parser_parse_string(parser,(n))

Definition at line 13072 of file parse.y.

#define PARSER_DEBUG   0
#define parser_encoding_name ( )    (current_enc->name)

Definition at line 13170 of file parse.y.

#define parser_is_identchar ( )    (!parser->eofp && is_identchar((lex_p-1),lex_pend,current_enc))

Definition at line 13174 of file parse.y.

#define parser_isascii ( )    ISASCII(*(lex_p-1))

Definition at line 13176 of file parse.y.

#define parser_mbclen ( )    mbclen((lex_p-1),lex_pend,current_enc)

Definition at line 13171 of file parse.y.

Definition at line 13172 of file parse.y.

#define parser_warn (   node,
  mesg 
)    parser_warn(parser, (node), (mesg))

Definition at line 16240 of file parse.y.

#define parser_warning (   node,
  mesg 
)    parser_warning(parser, (node), (mesg))

Definition at line 16233 of file parse.y.

#define peek (   c)    peek_n((c), 0)

Definition at line 13596 of file parse.y.

#define peek_n (   c,
 
)    (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n])

Definition at line 13597 of file parse.y.

#define POINTER_P (   val)    ((VALUE)(val) & ~(VALUE)3)
#define pushback (   c)    parser_pushback(parser, (c))

Definition at line 13063 of file parse.y.

#define Qnone   0
#define rb_backref_error (   n)    rb_backref_error_gen(parser,(n))
#define rb_node_newnode (   type,
  a1,
  a2,
  a3 
)    node_newnode(parser, (type), (a1), (a2), (a3))
#define rb_warn0 (   fmt)    rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt))
#define rb_warn4S (   file,
  line,
  fmt,
 
)    rb_compile_warn((file), (line), (fmt), (a))
#define rb_warnI (   fmt,
 
)    rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a))
#define rb_warningS (   fmt,
 
)    rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt), (a))
#define rb_warnS (   fmt,
 
)    rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a))
#define RE_OPTION_ARG_ENCODING_NONE   32
#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_SHIFT   8
#define RE_OPTION_MASK   0xff
#define RE_OPTION_ONCE   (1<<16)
#define read_escape (   flags,
 
)    parser_read_escape(parser, (flags), (e))

Definition at line 13068 of file parse.y.

#define realloc   YYREALLOC
#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))
#define REGISTER_SYMID (   id,
  name 
)    register_symid((id), (name), strlen(name), enc)
#define regx_options ( )    parser_regx_options(parser)

Definition at line 13070 of file parse.y.

#define ret_args (   node)    ret_args_gen(parser, (node))
#define ripper_flush (   p)    (void)(p)

Definition at line 13103 of file parse.y.

#define ruby__end__seen   (parser->parser_ruby__end__seen)
#define ruby_coverage   (parser->coverage)
#define ruby_debug_lines   (parser->debug_lines)
#define ruby_eval_tree   (parser->parser_eval_tree)
#define ruby_eval_tree_begin   (parser->parser_eval_tree_begin)
#define ruby_sourcefile   (parser->parser_ruby_sourcefile)
#define ruby_sourceline   (parser->parser_ruby_sourceline)
#define set_yylval_id (   x)    (yylval.id = (x))

Definition at line 13082 of file parse.y.

#define set_yylval_literal (   x)    (yylval.node = NEW_LIT(x))

Definition at line 13084 of file parse.y.

#define set_yylval_name (   x)    (yylval.id = (x))

Definition at line 13083 of file parse.y.

#define set_yylval_node (   x)    (yylval.node = (x))

Definition at line 13085 of file parse.y.

#define set_yylval_num (   x)    (yylval.num = (x))

Definition at line 13081 of file parse.y.

#define set_yylval_str (   x)    (yylval.node = NEW_STR(x))

Definition at line 13080 of file parse.y.

#define shadowing_lvar (   name)    shadowing_lvar_gen(parser, (name))
#define SIGN_EXTEND (   x,
 
)    (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1))
#define SIGN_EXTEND_CHAR (   c)    ((((unsigned char)(c)) ^ 128) - 128)

Definition at line 13167 of file parse.y.

#define SPECIAL_PUNCT (   idx)
Value:
( \
        BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
        BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
        BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
        BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
        BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
        BIT('0', idx))

Definition at line 14206 of file parse.y.

#define str_copy (   _s,
  _p,
  _n 
)
Value:
((_s) \
        ? (void)(rb_str_resize((_s), (_n)), \
           MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
        : (void)((_s) = STR_NEW((_p), (_n))))
#define STR_FUNC_ESCAPE   0x01

Definition at line 13559 of file parse.y.

#define STR_FUNC_EXPAND   0x02

Definition at line 13560 of file parse.y.

#define STR_FUNC_INDENT   0x20

Definition at line 13564 of file parse.y.

#define STR_FUNC_QWORDS   0x08

Definition at line 13562 of file parse.y.

#define STR_FUNC_REGEXP   0x04

Definition at line 13561 of file parse.y.

#define STR_FUNC_SYMBOL   0x10

Definition at line 13563 of file parse.y.

#define STR_NEW (   p,
 
)    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 subnodes (   n1,
  n2 
)
Value:
((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
     (!node->n2) ? (body = &node->n1, 1) : \
     (reduce_nodes(&node->n1), body = &node->n2, 1))
#define tok ( )    tokenbuf

Definition at line 13668 of file parse.y.

#define tok_hex (   numlen)    parser_tok_hex(parser, (numlen))

Definition at line 13067 of file parse.y.

#define TOK_INTERN (   mb)    rb_intern3(tok(), toklen(), current_enc)
#define tokadd (   c)    parser_tokadd(parser, (c))

Definition at line 13066 of file parse.y.

#define tokadd_escape (   e)    parser_tokadd_escape(parser, (e))

Definition at line 13069 of file parse.y.

#define tokadd_mbchar (   c)    parser_tokadd_mbchar(parser, (c))

Definition at line 14030 of file parse.y.

#define tokadd_string (   f,
  t,
  p,
  n,
 
)    parser_tokadd_string(parser,(f),(t),(p),(n),(e))

Definition at line 13071 of file parse.y.

#define tokaddmbc (   c,
  enc 
)    parser_tokaddmbc(parser, (c), (enc))

Definition at line 13073 of file parse.y.

#define tokcopy (   n)    memcpy(tokspace(n), lex_p - (n), (n))

Definition at line 13724 of file parse.y.

#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)
#define tokfix ( )    (tokenbuf[tokidx]='\0')

Definition at line 13667 of file parse.y.

#define tokidx   (parser->parser_tokidx)
#define toklast ( )    (tokidx>0?tokenbuf[tokidx-1]:0)

Definition at line 13670 of file parse.y.

#define toklen ( )    tokidx

Definition at line 13669 of file parse.y.

#define tokline   (parser->parser_tokline)
#define toksiz   (parser->parser_toksiz)
#define tokspace (   n)    parser_tokspace(parser, (n))

Definition at line 13065 of file parse.y.

#define value_expr (   node)    value_expr_gen(parser, (node) = remove_begin(node))
#define void_expr (   node)    void_expr0((node) = remove_begin(node))
#define void_expr0 (   node)    void_expr_gen(parser, (node))
#define void_stmts (   node)    void_stmts_gen(parser, (node))
#define VTBL_DEBUG   0
#define warn_balanced (   op,
  syn 
)
Value:
((void) \
    (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN|EXPR_ENDARG) && \
     space_seen && !ISSPACE(c) && \
     (ambiguous_operator(op, syn), 0)))

Definition at line 14887 of file parse.y.

#define was_bol ( )    (lex_p == lex_pbeg + 1)

Definition at line 13665 of file parse.y.

#define whole_match_p (   e,
  l,
 
)    parser_whole_match_p(parser,(e),(l),(i))

Definition at line 13077 of file parse.y.

#define YYCALLOC (   nelem,
  size 
)    rb_parser_calloc(parser, (nelem), (size))
#define YYDEBUG   1
#define yydebug   (parser->parser_yydebug)
#define yyerror (   msg)    parser_yyerror(parser, (msg))
#define YYERROR_VERBOSE   1
#define YYFREE (   ptr)    rb_parser_free(parser, (ptr))
#define yylval   (*((YYSTYPE*)(parser->parser_yylval)))

Definition at line 13053 of file parse.y.

#define yylval_id ( )    (yylval.id)

Definition at line 13086 of file parse.y.

#define YYMALLOC (   size)    rb_parser_malloc(parser, (size))
#define yyparse   ruby_yyparse
#define YYREALLOC (   ptr,
  size 
)    rb_parser_realloc(parser, (ptr), (size))
#define YYSTACK_USE_ALLOCA   0

Typedef Documentation

typedef long(* rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len)

Definition at line 14630 of file parse.y.

typedef void(* rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val)

Definition at line 14631 of file parse.y.


Enumeration Type Documentation

Enumerator:
str_squote 
str_dquote 
str_xquote 
str_regexp 
str_sword 
str_dword 
str_ssym 
str_dsym 
str_squote 
str_dquote 
str_xquote 
str_regexp 
str_sword 
str_dword 
str_ssym 
str_dsym 
str_squote 
str_dquote 
str_xquote 
str_regexp 
str_sword 
str_dword 
str_ssym 
str_dsym 
str_squote 
str_dquote 
str_xquote 
str_regexp 
str_sword 
str_dword 
str_ssym 
str_dsym 

Definition at line 13566 of file parse.y.


Function Documentation

static void arg_ambiguous_gen ( struct parser_params parser) [static]

Definition at line 14537 of file parse.y.

static NODE* arg_append_gen ( struct parser_params parser,
NODE node1,
NODE node2 
) [static]

Definition at line 16789 of file parse.y.

static NODE* arg_blk_pass ( NODE node1,
NODE node2 
) [static]

Definition at line 17353 of file parse.y.

static NODE* arg_concat_gen ( struct parser_params parser,
NODE node1,
NODE node2 
) [static]

Definition at line 16764 of file parse.y.

static int arg_var_gen ( struct parser_params parser,
ID  id 
) [static]

Definition at line 17598 of file parse.y.

static NODE* aryset_gen ( struct parser_params parser,
NODE recv,
NODE idx 
) [static]

Definition at line 16719 of file parse.y.

static int assign_in_cond ( struct parser_params parser,
NODE node 
) [static]

Definition at line 17106 of file parse.y.

static NODE* assignable_gen ( struct parser_params parser,
ID  id,
NODE val 
) [static]

Definition at line 16589 of file parse.y.

static NODE* attrset_gen ( struct parser_params parser,
NODE recv,
ID  id 
) [static]

Definition at line 16743 of file parse.y.

static NODE* block_append_gen ( struct parser_params parser,
NODE head,
NODE tail 
) [static]

Definition at line 16243 of file parse.y.

static void block_dup_check_gen ( struct parser_params parser,
NODE node1,
NODE node2 
) [static]

Definition at line 16727 of file parse.y.

static NODE* call_bin_op_gen ( struct parser_params parser,
NODE recv,
ID  id,
NODE arg1 
) [static]

Definition at line 16462 of file parse.y.

static NODE* call_uni_op_gen ( struct parser_params parser,
NODE recv,
ID  id 
) [static]

Definition at line 16470 of file parse.y.

CMDARG_PUSH ( )
static int comment_at_top ( struct parser_params parser) [static]

Definition at line 14618 of file parse.y.

static NODE * cond0 ( struct parser_params parser,
NODE node 
) [static]

Definition at line 17213 of file parse.y.

static NODE* cond_gen ( struct parser_params parser,
NODE node 
) [static]

Definition at line 17270 of file parse.y.

static VALUE coverage ( const char *  f,
int  n 
) [static]

Definition at line 13335 of file parse.y.

static VALUE debug_lines ( const char *  f) [static]

Definition at line 13318 of file parse.y.

static void dispose_string ( VALUE  str) [static]

Definition at line 14010 of file parse.y.

static NODE* dsym_node_gen ( struct parser_params parser,
NODE node 
) [static]

Definition at line 17411 of file parse.y.

static int dvar_curr_gen ( struct parser_params parser,
ID  id 
) [static]

Definition at line 17723 of file parse.y.

static int dvar_defined_gen ( struct parser_params parser,
ID  id,
int  get 
) [static]

Definition at line 17692 of file parse.y.

static int dyna_in_block_gen ( struct parser_params parser) [static]

Definition at line 17686 of file parse.y.

static void dyna_pop_1 ( struct parser_params parser) [static]

Definition at line 17654 of file parse.y.

static void dyna_pop_gen ( struct parser_params parser,
const struct vtable lvargs 
) [static]

Definition at line 17672 of file parse.y.

static struct vtable* dyna_push_gen ( struct parser_params parser) [static, read]

Definition at line 17643 of file parse.y.

static int e_option_supplied ( struct parser_params parser) [static]

Definition at line 13352 of file parse.y.

static NODE* evstr2dstr_gen ( struct parser_params parser,
NODE node 
) [static]

Definition at line 16439 of file parse.y.

fixpos ( $$  ,
1 
) = $2
fixpos ( $$  ,
$2?$2:$  5 
)
static void fixpos ( NODE node,
NODE orig 
) [static]

Definition at line 16220 of file parse.y.

static void fixup_nodes ( NODE **  rootnode) [static]

Definition at line 17145 of file parse.y.

static ID formal_argument_gen ( struct parser_params parser,
ID  lhs 
) [static]

Definition at line 14548 of file parse.y.

static NODE* gettable_gen ( struct parser_params parser,
ID  id 
) [static]

Definition at line 16511 of file parse.y.

if ( 2)
if ( !$$  ) = NEW_BEGIN(0)
if ( node)

Definition at line 11879 of file parse.y.

else if ( dyna_in_block)&&local_id($2)
void Init_sym ( void  )

Definition at line 18041 of file parse.y.

static ID intern_str ( VALUE  str) [static]

Definition at line 18285 of file parse.y.

static ID internal_id_gen ( struct parser_params parser) [static]

Definition at line 18069 of file parse.y.

static int is_global_name_punct ( const char  c) [inline, static]

Definition at line 14223 of file parse.y.

static int is_private_local_id ( ID  name) [static]

Definition at line 16668 of file parse.y.

static int is_special_global_name ( const char *  m,
const char *  e,
rb_encoding enc 
) [static]

Definition at line 18078 of file parse.y.

static int is_static_content ( NODE node) [static]

Definition at line 17082 of file parse.y.

static VALUE lex_get_str ( struct parser_params parser,
VALUE  s 
) [static]

Definition at line 13437 of file parse.y.

static VALUE lex_getline ( struct parser_params parser) [static]

Definition at line 13457 of file parse.y.

static VALUE lex_io_gets ( struct parser_params parser,
VALUE  io 
) [static]

Definition at line 13527 of file parse.y.

static NODE* list_append_gen ( struct parser_params parser,
NODE list,
NODE item 
) [static]

Definition at line 16297 of file parse.y.

static NODE* list_concat_gen ( struct parser_params parser,
NODE head,
NODE tail 
) [static]

Definition at line 16317 of file parse.y.

static int literal_concat0 ( struct parser_params parser,
VALUE  head,
VALUE  tail 
) [static]

Definition at line 16341 of file parse.y.

static NODE* literal_concat_gen ( struct parser_params parser,
NODE head,
NODE tail 
) [static]

Definition at line 16358 of file parse.y.

static int literal_node ( NODE node) [static]

Definition at line 17192 of file parse.y.

static int local_id_gen ( struct parser_params parser,
ID  id 
) [static]

Definition at line 17615 of file parse.y.

static void local_pop_gen ( struct parser_params parser) [static]

Definition at line 17553 of file parse.y.

static void local_push_gen ( struct parser_params parser,
int  inherit_dvars 
) [static]

Definition at line 17538 of file parse.y.

static ID* local_tbl_gen ( struct parser_params parser) [static]

Definition at line 17583 of file parse.y.

static int local_var_gen ( struct parser_params parser,
ID  id 
) [static]

Definition at line 17605 of file parse.y.

static NODE* logop_gen ( struct parser_params parser,
enum node_type  type,
NODE left,
NODE right 
) [static]

Definition at line 17277 of file parse.y.

static int lvar_defined_gen ( struct parser_params parser,
ID  id 
) [static]

Definition at line 14559 of file parse.y.

static void magic_comment_encoding ( struct parser_params parser,
const char *  name,
const char *  val 
) [static]

Definition at line 14634 of file parse.y.

static const char* magic_comment_marker ( const char *  str,
long  len 
) [static]

Definition at line 14678 of file parse.y.

static NODE* match_op_gen ( struct parser_params parser,
NODE node1,
NODE node2 
) [static]

Definition at line 16477 of file parse.y.

static rb_encoding* must_be_ascii_compatible ( VALUE  s) [static]

Definition at line 13427 of file parse.y.

fcall nd_set_line ( $$  ,
tokline   
)
static NODE* negate_lit ( NODE node) [static]

Definition at line 17325 of file parse.y.

static NODE* new_args_gen ( struct parser_params parser,
NODE m,
NODE o,
ID  r,
NODE p,
NODE tail 
) [static]

Definition at line 17364 of file parse.y.

static NODE* new_args_tail_gen ( struct parser_params parser,
NODE k,
ID  kr,
ID  b 
) [static]

Definition at line 17386 of file parse.y.

static NODE* new_attr_op_assign_gen ( struct parser_params parser,
NODE lhs,
ID  attr,
ID  op,
NODE rhs 
) [static]

Definition at line 17467 of file parse.y.

static void new_bv_gen ( struct parser_params parser,
ID  name 
) [static]

Definition at line 16705 of file parse.y.

static NODE* new_const_op_assign_gen ( struct parser_params parser,
NODE lhs,
ID  op,
NODE rhs 
) [static]

Definition at line 17483 of file parse.y.

static NODE* new_evstr_gen ( struct parser_params parser,
NODE node 
) [static]

Definition at line 16448 of file parse.y.

static NODE* new_op_assign_gen ( struct parser_params parser,
NODE lhs,
ID  op,
NODE rhs 
) [static]

Definition at line 17438 of file parse.y.

static NODE* new_yield_gen ( struct parser_params parser,
NODE node 
) [static]

Definition at line 17317 of file parse.y.

static NODE* newline_node ( NODE node) [static]

Definition at line 16210 of file parse.y.

static void no_blockarg ( struct parser_params parser,
NODE node 
) [static]

Definition at line 17292 of file parse.y.

static NODE* node_assign_gen ( struct parser_params parser,
NODE lhs,
NODE rhs 
) [static]

Definition at line 16815 of file parse.y.

static NODE* node_newnode ( struct parser_params parser,
enum node_type  type,
VALUE  a0,
VALUE  a1,
VALUE  a2 
) [static]

Definition at line 16190 of file parse.y.

static int nodeline ( NODE node) [static]

Definition at line 16204 of file parse.y.

static enum node_type nodetype ( NODE node) [static]

Definition at line 16198 of file parse.y.

static NODE* parser_compile_string ( volatile VALUE  vparser,
const char *  f,
VALUE  s,
int  line 
) [static]

Definition at line 13480 of file parse.y.

static long parser_encode_length ( struct parser_params parser,
const char *  name,
long  len 
) [static]

Definition at line 14566 of file parse.y.

static void parser_free ( void *  ptr) [static]

Definition at line 18777 of file parse.y.

static int parser_here_document ( struct parser_params parser,
NODE here 
) [static]

Definition at line 14434 of file parse.y.

static int parser_heredoc_identifier ( struct parser_params parser) [static]

Definition at line 14324 of file parse.y.

static void parser_heredoc_restore ( struct parser_params parser,
NODE here 
) [static]

Definition at line 14387 of file parse.y.

static void parser_initialize ( struct parser_params parser) [static]

Definition at line 18698 of file parse.y.

static int parser_magic_comment ( struct parser_params parser,
const char *  str,
long  len 
) [static]

Definition at line 14711 of file parse.y.

static void parser_mark ( void *  ptr) [static]

Definition at line 18751 of file parse.y.

static size_t parser_memsize ( const void *  ptr) [static]

Definition at line 18797 of file parse.y.

static struct parser_params* parser_new ( void  ) [static, read]

Definition at line 18840 of file parse.y.

static char* parser_newtok ( struct parser_params parser) [static]

Definition at line 13673 of file parse.y.

static int parser_nextc ( struct parser_params parser) [inline, static]

Definition at line 13600 of file parse.y.

static int parser_parse_string ( struct parser_params parser,
NODE quote 
) [static]

Definition at line 14266 of file parse.y.

static int parser_peek_variable_name ( struct parser_params parser) [static]

Definition at line 14230 of file parse.y.

static void parser_prepare ( struct parser_params parser) [static]

Definition at line 14848 of file parse.y.

static void parser_pushback ( struct parser_params parser,
int  c 
) [static]

Definition at line 13656 of file parse.y.

static int parser_read_escape ( struct parser_params parser,
int  flags,
rb_encoding **  encp 
) [static]

Definition at line 13803 of file parse.y.

static int parser_regx_options ( struct parser_params parser) [static]

Definition at line 13974 of file parse.y.

static void parser_set_encode ( struct parser_params parser,
const char *  name 
) [static]

Definition at line 14586 of file parse.y.

static void parser_set_token_info ( struct parser_params parser,
const char *  name,
const char *  val 
) [static]

Definition at line 14643 of file parse.y.

static VALUE parser_str_new ( const char *  p,
long  n,
rb_encoding enc,
int  func,
rb_encoding enc0 
) [static]

Definition at line 13578 of file parse.y.

static int parser_tok_hex ( struct parser_params parser,
size_t *  numlen 
) [static]

Definition at line 13711 of file parse.y.

static void parser_tokadd ( struct parser_params parser,
int  c 
) [static]

Definition at line 13701 of file parse.y.

static int parser_tokadd_escape ( struct parser_params parser,
rb_encoding **  encp 
) [static]

Definition at line 13901 of file parse.y.

static int parser_tokadd_mbchar ( struct parser_params parser,
int  c 
) [static]

Definition at line 14017 of file parse.y.

static int parser_tokadd_string ( struct parser_params parser,
int  func,
int  term,
int  paren,
long *  nest,
rb_encoding **  encp 
) [static]

Definition at line 14046 of file parse.y.

static int parser_tokadd_utf8 ( struct parser_params parser,
rb_encoding **  encp,
int  string_literal,
int  symbol_literal,
int  regexp_literal 
) [static]

Definition at line 13728 of file parse.y.

static void parser_tokaddmbc ( struct parser_params parser,
int  c,
rb_encoding enc 
) [static]

Definition at line 13894 of file parse.y.

static char* parser_tokspace ( struct parser_params parser,
int  n 
) [static]

Definition at line 13689 of file parse.y.

static void parser_warn ( struct parser_params parser,
NODE node,
const char *  mesg 
) [static]

Definition at line 16236 of file parse.y.

static void parser_warning ( struct parser_params parser,
NODE node,
const char *  mesg 
) [static]

Definition at line 16229 of file parse.y.

static int parser_whole_match_p ( struct parser_params parser,
const char *  eos,
long  len,
int  indent 
) [static]

Definition at line 14404 of file parse.y.

static int parser_yyerror ( struct parser_params parser,
const char *  msg 
) [static]

Definition at line 13253 of file parse.y.

static int parser_yylex ( struct parser_params parser) [static]

Definition at line 14893 of file parse.y.

static NODE* range_op ( struct parser_params parser,
NODE node 
) [static]

Definition at line 17176 of file parse.y.

static void rb_backref_error_gen ( struct parser_params parser,
NODE node 
) [static]

Definition at line 16751 of file parse.y.

ID rb_check_id ( volatile VALUE namep)

Returns ID for the given name if it is interned already, or 0.

Parameters:
namepthe pointer to the name object
Returns:
the ID for *namep
Precondition:
the object referred by namep must be a Symbol or a String, or possible to convert with to_str method.
Postcondition:
the object referred by namep is a Symbol or a String if non-zero value is returned, or is a String if 0 is returned.

Definition at line 18569 of file parse.y.

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 
)
NODE* rb_compile_cstr ( const char *  f,
const char *  s,
int  len,
int  line 
)

Definition at line 13513 of file parse.y.

References parser_compile_string(), rb_parser_new(), and rb_str_new().

NODE* rb_compile_file ( const char *  f,
VALUE  file,
int  start 
)

Definition at line 13533 of file parse.y.

References rb_parser_compile_file(), and rb_parser_new().

NODE* rb_compile_string ( const char *  f,
VALUE  s,
int  line 
)

Definition at line 13499 of file parse.y.

References must_be_ascii_compatible(), parser_compile_string(), and rb_parser_new().

int rb_enc_symname2_p ( const char *  name,
long  len,
rb_encoding enc 
)

Definition at line 18211 of file parse.y.

References rb_enc_symname_type().

int rb_enc_symname_p ( const char *  name,
rb_encoding enc 
)

Definition at line 18110 of file parse.y.

References rb_enc_symname2_p(), and strlen().

static int rb_enc_symname_type ( const char *  name,
long  len,
rb_encoding enc 
) [static]

Definition at line 18116 of file parse.y.

void rb_gc_mark_parser ( void  )

Definition at line 17889 of file parse.y.

void rb_gc_mark_symbols ( void  )
const char* rb_id2name ( ID  id)

Definition at line 18475 of file parse.y.

References rb_id2str(), and RSTRING_PTR.

VALUE rb_id2str ( ID  id)
ID rb_id_attrset ( ID  id)

Definition at line 16735 of file parse.y.

References id, and ID_ATTRSET.

ID rb_intern ( const char *  name)

Definition at line 18398 of file parse.y.

References rb_intern, rb_intern2(), and strlen().

ID rb_intern2 ( const char *  name,
long  len 
)

Definition at line 18391 of file parse.y.

References rb_intern3(), and rb_usascii_encoding().

ID rb_intern3 ( const char *  name,
long  len,
rb_encoding enc 
)

Definition at line 18404 of file parse.y.

References global_symbols, id, intern_str(), rb_str_dup(), st_lookup(), and symbols::sym_id.

int rb_is_attrset_id ( ID  id)

Definition at line 18540 of file parse.y.

References is_attrset_id.

int rb_is_attrset_name ( VALUE  name)

Definition at line 18668 of file parse.y.

References ID_ATTRSET, and rb_str_symname_type().

int rb_is_class_id ( ID  id)

Definition at line 18522 of file parse.y.

References is_class_id.

int rb_is_class_name ( VALUE  name)

Definition at line 18650 of file parse.y.

References ID_CLASS, and rb_str_symname_type().

int rb_is_const_id ( ID  id)

Definition at line 18516 of file parse.y.

References is_const_id.

int rb_is_const_name ( VALUE  name)

Definition at line 18644 of file parse.y.

References ID_CONST, and rb_str_symname_type().

int rb_is_global_id ( ID  id)

Definition at line 18528 of file parse.y.

References is_global_id.

int rb_is_global_name ( VALUE  name)

Definition at line 18656 of file parse.y.

References ID_GLOBAL, and rb_str_symname_type().

int rb_is_instance_id ( ID  id)

Definition at line 18534 of file parse.y.

References is_instance_id.

int rb_is_instance_name ( VALUE  name)

Definition at line 18662 of file parse.y.

References ID_INSTANCE, and rb_str_symname_type().

int rb_is_junk_id ( ID  id)

Definition at line 18552 of file parse.y.

References is_junk_id.

int rb_is_junk_name ( VALUE  name)

Definition at line 18690 of file parse.y.

References rb_str_symname_type().

int rb_is_local_id ( ID  id)

Definition at line 18546 of file parse.y.

References is_local_id.

int rb_is_local_name ( VALUE  name)

Definition at line 18674 of file parse.y.

References ID_LOCAL, and rb_str_symname_type().

int rb_is_method_name ( VALUE  name)

Definition at line 18680 of file parse.y.

References FALSE, ID_ATTRSET, ID_JUNK, ID_LOCAL, rb_str_symname_type(), and TRUE.

NODE* rb_parser_append_print ( VALUE  vparser,
NODE node 
)
void* rb_parser_calloc ( struct parser_params parser,
size_t  nelem,
size_t  size 
)

Definition at line 18936 of file parse.y.

References ADD2HEAP, cnt, HEAPCNT, NEWHEAP, and xcalloc.

NODE* rb_parser_compile_cstr ( volatile VALUE  vparser,
const char *  f,
const char *  s,
int  len,
int  line 
)

Definition at line 13520 of file parse.y.

References parser_compile_string(), and rb_str_new().

NODE* rb_parser_compile_file ( volatile VALUE  vparser,
const char *  f,
VALUE  file,
int  start 
)
NODE* rb_parser_compile_string ( volatile VALUE  vparser,
const char *  f,
VALUE  s,
int  line 
)

Definition at line 13506 of file parse.y.

References must_be_ascii_compatible(), and parser_compile_string().

Definition at line 18880 of file parse.y.

References current_enc, rb_enc_from_encoding(), and TypedData_Get_Struct.

Definition at line 18865 of file parse.y.

References Qfalse, Qtrue, ruby__end__seen, and TypedData_Get_Struct.

void rb_parser_free ( struct parser_params parser,
void *  ptr 
)

Definition at line 18966 of file parse.y.

References parser_params::heap, RNode::node, NULL, prev, rb_gc_force_recycle(), RNode::u2, and xfree().

Definition at line 18895 of file parse.y.

References Qfalse, Qtrue, and TypedData_Get_Struct.

void* rb_parser_malloc ( struct parser_params parser,
size_t  size 
)

Definition at line 18926 of file parse.y.

References ADD2HEAP, cnt, HEAPCNT, NEWHEAP, and xmalloc.

VALUE rb_parser_new ( void  )

Definition at line 18851 of file parse.y.

References parser_new(), and TypedData_Wrap_Struct.

void* rb_parser_realloc ( struct parser_params parser,
void *  ptr,
size_t  size 
)
VALUE rb_parser_set_yydebug ( VALUE  self,
VALUE  flag 
)

Definition at line 18910 of file parse.y.

References RTEST, and TypedData_Get_Struct.

NODE* rb_parser_while_loop ( VALUE  vparser,
NODE node,
int  chop,
int  split 
)
struct kwtable* rb_reserved_word ( const char *  str,
unsigned int  len 
) [read]

Definition at line 18834 of file parse.y.

References reserved_word().

static int rb_str_symname_type ( VALUE  name) [static]

Definition at line 18217 of file parse.y.

int rb_symname_p ( const char *  name)

Definition at line 18104 of file parse.y.

References rb_ascii8bit_encoding(), and rb_enc_symname_p().

static void reduce_nodes_gen ( struct parser_params parser,
NODE **  body 
) [static]

Definition at line 17021 of file parse.y.

static VALUE reg_compile_gen ( struct parser_params parser,
VALUE  str,
int  options 
) [static]

Definition at line 17865 of file parse.y.

static int reg_fragment_check_gen ( struct parser_params parser,
VALUE  str,
int  options 
) [static]

Definition at line 17770 of file parse.y.

static void reg_fragment_setenc_gen ( struct parser_params parser,
VALUE  str,
int  options 
) [static]

Definition at line 17731 of file parse.y.

static NODE* reg_named_capture_assign_gen ( struct parser_params parser,
VALUE  regexp,
NODE match 
) [static]

Definition at line 17833 of file parse.y.

static int reg_named_capture_assign_iter ( const OnigUChar name,
const OnigUChar name_end,
int  back_num,
int *  back_refs,
OnigRegex  regex,
void *  arg0 
) [static]

Definition at line 17793 of file parse.y.

static ID register_symid ( ID  id,
const char *  name,
long  len,
rb_encoding enc 
) [static]

Definition at line 18227 of file parse.y.

static ID register_symid_str ( ID  id,
VALUE  str 
) [static]

Definition at line 18234 of file parse.y.

static NODE* remove_begin ( NODE node) [static]

Definition at line 17011 of file parse.y.

static NODE* ret_args_gen ( struct parser_params parser,
NODE node 
) [static]

Definition at line 17300 of file parse.y.

static void set_file_encoding ( struct parser_params parser,
const char *  str,
const char *  send 
) [static]

Definition at line 14805 of file parse.y.

static ID shadowing_lvar_gen ( struct parser_params parser,
ID  name 
) [static]

Definition at line 16681 of file parse.y.

static int simple_re_meta ( int  c) [inline, static]

Definition at line 14033 of file parse.y.

static NODE* splat_array ( NODE node) [static]

Definition at line 16807 of file parse.y.

else switch ( nd_type(node )

Definition at line 11950 of file parse.y.

Referenced by dump_node().

static int sym_check_asciionly ( VALUE  str) [static]

Definition at line 18243 of file parse.y.

static int symbols_i ( VALUE  sym,
ID  value,
VALUE  ary 
) [static]

Definition at line 18484 of file parse.y.

static int token_info_get_column ( struct parser_params parser,
const char *  token 
) [static]

Definition at line 13180 of file parse.y.

static int token_info_has_nonspaces ( struct parser_params parser,
const char *  token 
) [static]

Definition at line 13194 of file parse.y.

static void token_info_pop ( struct parser_params parser,
const char *  token 
) [static]

Definition at line 13224 of file parse.y.

static void token_info_push ( struct parser_params parser,
const char *  token 
) [static]

Definition at line 13207 of file parse.y.

static int value_expr_gen ( struct parser_params parser,
NODE node 
) [static]

Definition at line 16846 of file parse.y.

static void void_expr_gen ( struct parser_params parser,
NODE node 
) [static]

Definition at line 16908 of file parse.y.

static void void_stmts_gen ( struct parser_params parser,
NODE node 
) [static]

Definition at line 16997 of file parse.y.

static ID* vtable_tblcpy ( ID buf,
const struct vtable src 
) [static]

Definition at line 17568 of file parse.y.

static void warn_unless_e_option ( struct parser_params parser,
NODE node,
const char *  str 
) [static]

Definition at line 17133 of file parse.y.

static void warn_unused_var ( struct parser_params parser,
struct local_vars local 
) [static]

Definition at line 17518 of file parse.y.

static void warning_unless_e_option ( struct parser_params parser,
NODE node,
const char *  str 
) [static]

Definition at line 17139 of file parse.y.

static NODE* yycompile ( struct parser_params parser,
const char *  f,
int  line 
) [static]

Definition at line 13418 of file parse.y.

static VALUE yycompile0 ( VALUE  arg) [static]

Definition at line 13358 of file parse.y.

yylex ( void *  p)

Definition at line 16165 of file parse.y.


Variable Documentation

top_compstmt __pad0__

Definition at line 8936 of file parse.y.

Definition at line 12345 of file parse.y.

numeric __pad101__ = dsym_node($2)

Definition at line 12347 of file parse.y.

user_variable __pad102__

Definition at line 12372 of file parse.y.

keyword_variable __pad103__

Definition at line 12381 of file parse.y.

var_ref __pad104__

Definition at line 12388 of file parse.y.

var_lhs __pad105__

Definition at line 12411 of file parse.y.

backref __pad106__

Definition at line 12411 of file parse.y.

superclass __pad107__

Definition at line 12438 of file parse.y.

f_arg __pad108__

Definition at line 12645 of file parse.y.

f_kw __pad109__

Definition at line 12645 of file parse.y.

block_command __pad10__

Definition at line 9391 of file parse.y.

f_block_kw __pad110__ = assignable($1, $2) NEW_KW_ARG(0, $$)

Definition at line 12672 of file parse.y.

Definition at line 12684 of file parse.y.

Definition at line 12699 of file parse.y.

kwrest_mark __pad113__

Definition at line 12724 of file parse.y.

f_kwrest __pad114__

Definition at line 12746 of file parse.y.

f_opt __pad115__ = $2

Definition at line 12747 of file parse.y.

f_block_opt __pad116__ = assignable($1, $3) NEW_OPT_ARG(0, $$)

Definition at line 12760 of file parse.y.

Definition at line 12772 of file parse.y.

Definition at line 12787 of file parse.y.

restarg_mark __pad119__

Definition at line 12811 of file parse.y.

Definition at line 9403 of file parse.y.

f_rest_arg __pad120__

Definition at line 12835 of file parse.y.

blkarg_mark __pad121__ = $2

Definition at line 12839 of file parse.y.

f_block_arg __pad122__

Definition at line 12863 of file parse.y.

opt_f_block_arg __pad123__ = $2

Definition at line 12869 of file parse.y.

singleton __pad124__

Definition at line 12869 of file parse.y.

assoc_list __pad125__

Definition at line 12927 of file parse.y.

assocs __pad126__

Definition at line 12938 of file parse.y.

assoc __pad127__

Definition at line 12938 of file parse.y.

operation __pad128__

Definition at line 12938 of file parse.y.

operation2 __pad129__

Definition at line 12994 of file parse.y.

command __pad12__

Definition at line 9429 of file parse.y.

operation3 __pad130__

Definition at line 12999 of file parse.y.

dot_or_colon __pad131__

Definition at line 13011 of file parse.y.

opt_terms __pad132__

Definition at line 13015 of file parse.y.

Definition at line 13019 of file parse.y.

rparen __pad134__

Definition at line 13022 of file parse.y.

rbracket __pad135__

Definition at line 13025 of file parse.y.

trailer __pad136__

Definition at line 13029 of file parse.y.

terms __pad137__

Definition at line 13034 of file parse.y.

Definition at line 13038 of file parse.y.

mlhs __pad13__

Definition at line 9537 of file parse.y.

Definition at line 9548 of file parse.y.

mlhs_item __pad15__

Definition at line 9548 of file parse.y.

Definition at line 9656 of file parse.y.

Definition at line 9656 of file parse.y.

mlhs_node __pad18__

Definition at line 9684 of file parse.y.

Definition at line 9684 of file parse.y.

top_stmts __pad1__ = $1

Definition at line 8945 of file parse.y.

cname __pad20__

Definition at line 9853 of file parse.y.

cpath __pad21__

Definition at line 9869 of file parse.y.

fname __pad22__

Definition at line 9890 of file parse.y.

fsym __pad23__ = $1

Definition at line 9898 of file parse.y.

fitem __pad24__

Definition at line 9918 of file parse.y.

Definition at line 9929 of file parse.y.

Definition at line 9934 of file parse.y.

reswords __pad27__

Definition at line 9974 of file parse.y.

arg __pad28__

Definition at line 9993 of file parse.y.

arg_value __pad29__

Definition at line 10390 of file parse.y.

top_stmt __pad2__

Definition at line 8978 of file parse.y.

aref_args __pad30__

Definition at line 10397 of file parse.y.

paren_args __pad31__

Definition at line 10404 of file parse.y.

opt_paren_args __pad32__

Definition at line 10430 of file parse.y.

opt_call_args __pad33__

Definition at line 10438 of file parse.y.

call_args __pad34__

Definition at line 10438 of file parse.y.

command_args __pad35__ = NEW_LIST($1)

Definition at line 10464 of file parse.y.

block_arg __pad36__

Definition at line 10515 of file parse.y.

opt_block_arg __pad37__

Definition at line 10525 of file parse.y.

Definition at line 10525 of file parse.y.

mrhs __pad39__

Definition at line 10581 of file parse.y.

compstmt __pad3__

Definition at line 9033 of file parse.y.

primary __pad40__

Definition at line 10581 of file parse.y.

primary_value __pad41__

Definition at line 10581 of file parse.y.

k_begin __pad42__

Definition at line 11097 of file parse.y.

k_if __pad43__

Definition at line 11103 of file parse.y.

k_unless __pad44__

Definition at line 11109 of file parse.y.

k_while __pad45__

Definition at line 11115 of file parse.y.

k_until __pad46__

Definition at line 11121 of file parse.y.

k_case __pad47__

Definition at line 11127 of file parse.y.

k_for __pad48__

Definition at line 11133 of file parse.y.

k_class __pad49__

Definition at line 11139 of file parse.y.

stmts __pad4__ = $1

Definition at line 9042 of file parse.y.

k_module __pad50__

Definition at line 11145 of file parse.y.

k_def __pad51__

Definition at line 11151 of file parse.y.

then __pad52__

Definition at line 11167 of file parse.y.

Definition at line 11188 of file parse.y.

if_tail __pad54__

Definition at line 11196 of file parse.y.

opt_else __pad55__

Definition at line 11202 of file parse.y.

Definition at line 11213 of file parse.y.

f_marg __pad57__

Definition at line 11221 of file parse.y.

Definition at line 11221 of file parse.y.

f_margs __pad59__

Definition at line 11245 of file parse.y.

stmt_or_begin __pad5__

Definition at line 9075 of file parse.y.

block_args_tail __pad60__

Definition at line 11245 of file parse.y.

opt_block_args_tail __pad61__

Definition at line 11245 of file parse.y.

block_param __pad62__

Definition at line 11245 of file parse.y.

opt_block_param __pad63__

Definition at line 11245 of file parse.y.

block_param_def __pad64__

Definition at line 11436 of file parse.y.

opt_bv_decl __pad65__

Definition at line 11464 of file parse.y.

Definition at line 11479 of file parse.y.

Definition at line 11499 of file parse.y.

lambda __pad68__

Definition at line 11509 of file parse.y.

f_larglist __pad69__

Definition at line 11533 of file parse.y.

command_asgn __pad6__

Definition at line 9312 of file parse.y.

lambda_body __pad70__

Definition at line 11551 of file parse.y.

do_block __pad71__

Definition at line 11561 of file parse.y.

block_call __pad72__ = ruby_sourceline

Definition at line 11567 of file parse.y.

method_call __pad73__

Definition at line 11633 of file parse.y.

brace_block __pad74__

Definition at line 11746 of file parse.y.

Definition at line 11752 of file parse.y.

opt_rescue __pad76__

Definition at line 11810 of file parse.y.

exc_list __pad77__

Definition at line 11829 of file parse.y.

exc_var __pad78__

Definition at line 11843 of file parse.y.

opt_ensure __pad79__

Definition at line 11855 of file parse.y.

expr __pad7__

Definition at line 9339 of file parse.y.

literal __pad80__

Definition at line 11867 of file parse.y.

strings __pad81__

Definition at line 11878 of file parse.y.

string __pad82__

Definition at line 11885 of file parse.y.

Definition at line 11912 of file parse.y.

Definition at line 11934 of file parse.y.

Definition at line 11999 of file parse.y.

word_list __pad86__

Definition at line 12023 of file parse.y.

word __pad87__

Definition at line 12041 of file parse.y.

symbol_list __pad88__

Definition at line 12078 of file parse.y.

qwords __pad89__

Definition at line 12098 of file parse.y.

expr_value __pad8__

Definition at line 9339 of file parse.y.

qsymbols __pad90__

Definition at line 12117 of file parse.y.

qword_list __pad91__

Definition at line 12136 of file parse.y.

qsym_list __pad92__

Definition at line 12154 of file parse.y.

string_contents __pad93__

Definition at line 12176 of file parse.y.

xstring_contents __pad94__

Definition at line 12194 of file parse.y.

regexp_contents __pad95__

Definition at line 12212 of file parse.y.

string_content __pad96__

Definition at line 12249 of file parse.y.

string_dvar __pad97__

Definition at line 12297 of file parse.y.

symbol __pad98__

Definition at line 12324 of file parse.y.

sym __pad99__ = $2

Definition at line 12330 of file parse.y.

command_call __pad9__

Definition at line 9381 of file parse.y.

Definition at line 10404 of file parse.y.

top_stmt bodystmt = NEW_BEGIN(0)

Definition at line 8995 of file parse.y.

Definition at line 11479 of file parse.y.

case_body cases

Definition at line 11752 of file parse.y.

block_command cmd_brace_block

Definition at line 9391 of file parse.y.

Definition at line 8942 of file parse.y.

Definition at line 9924 of file parse.y.

Definition at line 12699 of file parse.y.

Definition at line 11245 of file parse.y.

Definition at line 12724 of file parse.y.

f_margs f_marg_list

Definition at line 11245 of file parse.y.

Definition at line 12811 of file parse.y.

struct symbols global_symbols [static]

Definition at line 11157 of file parse.y.

lex_state = EXPR_BEG

Definition at line 12256 of file parse.y.

Definition at line 12255 of file parse.y.

lhs
Initial value:
 node_assign($1, $3)' command_asgn
                    {
                    
                        value_expr($3);
                        $$ = node_assign($1, $3);
                    
                    }

Definition at line 9323 of file parse.y.

Definition at line 11946 of file parse.y.

struct magic_comment magic_comments[] [static]
Initial value:

Definition at line 14670 of file parse.y.

Definition at line 9548 of file parse.y.

Definition at line 9684 of file parse.y.

const char* name

Definition at line 17968 of file parse.y.

nd_args = $2

Definition at line 9435 of file parse.y.

Referenced by dump_node(), and yyparse().

nd_next = $2

Definition at line 12640 of file parse.y.

Referenced by dump_node(), reduce_nodes_gen(), and yyparse().

<'{lex_state=EXPR_BEG;command_start=TRUE;}expr_valueterm{$$=$3;}|errorterm{yyerrok;$$=0;};f_arglist:'('f_argsrparen{$$=$2;lex_state=EXPR_BEG;command_start=TRUE;}|f_argsterm{$$=$1;lex_state=EXPR_BEG;command_start=TRUE;};args_tail:f_kwarg','f_kwrestopt_f_block_arg{$$=new_args_tail($1,$3,$4);}|f_kwargopt_f_block_arg{$$=new_args_tail($1,Qnone,$2);}|f_kwrestopt_f_block_arg{$$=new_args_tail(Qnone,$1,$2);}|f_block_arg{$$=new_args_tail(Qnone,Qnone,$1);};opt_args_tail:','args_tail{$$=$2;}|{$$=new_args_tail(Qnone,Qnone,Qnone);};f_args:f_arg','f_optarg','f_rest_argopt_args_tail{$$=new_args($1,$3,$5,Qnone,$6);}|f_arg','f_optarg','f_rest_arg','f_argopt_args_tail{$$=new_args($1,$3,$5,$7,$8);}|f_arg','f_optargopt_args_tail{$$=new_args($1,$3,Qnone,Qnone,$4);}|f_arg','f_optarg','f_argopt_args_tail{$$=new_args($1,$3,Qnone,$5,$6);}|f_arg','f_rest_argopt_args_tail{$$=new_args($1,Qnone,$3,Qnone,$4);}|f_arg','f_rest_arg','f_argopt_args_tail{$$=new_args($1,Qnone,$3,$5,$6);}|f_argopt_args_tail{$$=new_args($1,Qnone,Qnone,Qnone,$2);}|f_optarg','f_rest_argopt_args_tail{$$=new_args(Qnone,$1,$3,Qnone,$4);}|f_optarg','f_rest_arg','f_argopt_args_tail{$$=new_args(Qnone,$1,$3,$5,$6);}|f_optargopt_args_tail{$$=new_args(Qnone,$1,Qnone,Qnone,$2);}|f_optarg','f_argopt_args_tail{$$=new_args(Qnone,$1,Qnone,$3,$4);}|f_rest_argopt_args_tail{$$=new_args(Qnone,Qnone,$1,Qnone,$2);}|f_rest_arg','f_argopt_args_tail{$$=new_args(Qnone,Qnone,$1,$3,$4);}|args_tail{$$=new_args(Qnone,Qnone,Qnone,Qnone,$1);}|{$$=new_args_tail(Qnone,Qnone,Qnone);$$=new_args(Qnone,Qnone,Qnone,Qnone,$$);};f_bad_arg:tCONSTANT{yyerror("formalargumentcannotbeaconstant");$$=0;}|tIVAR{yyerror("formalargumentcannotbeaninstancevariable");$$=0;}|tGVAR{yyerror("formalargumentcannotbeaglobalvariable");$$=0;}|tCVAR{yyerror("formalargumentcannotbeaclassvariable");$$=0;};f_norm_arg:f_bad_arg|tIDENTIFIER{formal_argument(get_id($1));$$=$1;};f_arg_item:f_norm_arg{arg_var(get_id($1));$$=NEW_ARGS_AUX($1,1);}|tLPARENf_margsrparen{IDtid=internal_id();arg_var(tid);if(dyna_in_block()){$2-> nd_value = NEW_DVAR(tid)

Definition at line 12634 of file parse.y.

Referenced by dump_node(), and yyparse().

NODE* node = $2

Definition at line 11945 of file parse.y.

Referenced by addrinfo_s_getaddrinfo(), compile_array_(), compile_tree(), cond0(), count_nodes(), defined_expr(), divide_look_behind_alternatives(), dsym_node_gen(), evstr2dstr_gen(), expand_case_fold_make_rem_string(), fixup_nodes(), get_head_value_node(), get_min_match_length(), iseq_compile_each(), iseq_s_compile_file(), iseq_set_arguments(), literal_concat_gen(), logop_gen(), match_at(), negate_lit(), new_args_tail_gen(), new_evstr_gen(), newline_node(), node_new(), node_new_anychar(), node_new_backref(), node_new_call(), node_new_cclass(), node_new_cclass_by_codepoint_range(), node_new_ctype(), node_new_enclose(), node_new_enclose_memory(), node_new_list(), node_new_option(), node_new_quantifier(), node_new_str(), node_new_str_raw(), noname_disable_map(), onig_node_new_alt(), onig_node_new_anchor(), optimize_node_left(), parse_branch(), parse_char_class(), parse_string(), parse_subexp(), parser_compile_string(), push_ensure_entry(), rb_getaddrinfo(), rb_iseq_compile_with_option(), rb_iterate(), rb_load_internal(), rb_parser_append_print(), rb_parser_compile_file(), rb_parser_while_loop(), rb_proc_get_iseq(), rb_proc_min_max_arity(), reduce_nodes_gen(), remove_begin(), ret_args_gen(), ruby_debug_print_node(), scan_env_set_mem_node(), splat_array(), subexp_inf_recursive_check(), unset_addr_list_add(), yaml_document_add_mapping(), yaml_document_add_scalar(), yaml_document_add_sequence(), yaml_document_delete(), yaml_emitter_anchor_node(), yaml_emitter_delete_document_and_anchors(), yaml_emitter_dump_node(), yaml_parser_load_mapping(), yaml_parser_load_scalar(), yaml_parser_load_sequence(), and yyparse().

Definition at line 11824 of file parse.y.

struct { ... } op_tbl[] [static]

Definition at line 11471 of file parse.y.

Initial value:
 {
    "parser",
    {
        parser_mark,
        parser_free,
        parser_memsize,
    },
}

Definition at line 13477 of file parse.y.

Initial value:

Definition at line 14201 of file parse.y.

string string1

Definition at line 11885 of file parse.y.

word symbols

Definition at line 12041 of file parse.y.

struct st_hash_type symhash [static]
Initial value:

Definition at line 18008 of file parse.y.

Definition at line 9864 of file parse.y.

trailer term

Definition at line 13029 of file parse.y.

Definition at line 17967 of file parse.y.

Definition at line 9934 of file parse.y.