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 "eventids1.c"
#include "eventids2.c"
#include "ruby/regex.h"
#include "ruby/util.h"
#include "lex.c"

Go to the source code of this file.

Data Structures

struct  kw_assoc
struct  ripper_args

Defines

#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 is_notop_id(id)   ((id)>tLAST_TOKEN)
#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 is_asgn_or_id(id)
#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 UTF8_ENC()
#define STR_NEW(p, n)   rb_enc_str_new((p),(n),parser->enc)
#define STR_NEW0()   rb_enc_str_new(0,0,parser->enc)
#define STR_NEW2(p)   rb_enc_str_new((p),strlen(p),parser->enc)
#define STR_NEW3(p, n, e, func)   parser_str_new((p),(n),(e),(func),parser->enc)
#define ENC_SINGLE(cr)   ((cr)==ENC_CODERANGE_7BIT)
#define TOK_INTERN(mb)   rb_intern3(tok(), toklen(), parser->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 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 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 remove_begin(node)   (node)
#define rb_dvar_defined(id)   0
#define rb_local_defined(id)   0
#define get_id(id)   ripper_get_id(id)
#define get_value(val)   ripper_get_value(val)
#define assignable(lhs, node)   assignable_gen(parser, (lhs))
#define id_is_var(id)   id_is_var_gen(parser, (id))
#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
#define NODE_HEREDOC   NODE_ARRAY
#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 RIPPER_VERSION   "0.1.0"
#define dispatch0(n)   ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n))
#define dispatch1(n, a)   ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), (a))
#define dispatch2(n, a, b)   ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), (a), (b))
#define dispatch3(n, a, b, c)   ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c))
#define dispatch4(n, a, b, c, d)   ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d))
#define dispatch5(n, a, b, c, d, e)   ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e))
#define yyparse   ripper_yyparse
#define ripper_intern(s)   ID2SYM(rb_intern(s))
#define arg_new()   dispatch0(args_new)
#define arg_add(l, a)   dispatch2(args_add, (l), (a))
#define arg_add_star(l, a)   dispatch2(args_add_star, (l), (a))
#define arg_add_block(l, b)   dispatch2(args_add_block, (l), (b))
#define arg_add_optblock(l, b)   ((b)==Qundef? (l) : dispatch2(args_add_block, (l), (b)))
#define bare_assoc(v)   dispatch1(bare_assoc_hash, (v))
#define arg_add_assocs(l, b)   arg_add((l), bare_assoc(b))
#define args2mrhs(a)   dispatch1(mrhs_new_from_args, (a))
#define mrhs_new()   dispatch0(mrhs_new)
#define mrhs_add(l, a)   dispatch2(mrhs_add, (l), (a))
#define mrhs_add_star(l, a)   dispatch2(mrhs_add_star, (l), (a))
#define mlhs_new()   dispatch0(mlhs_new)
#define mlhs_add(l, a)   dispatch2(mlhs_add, (l), (a))
#define mlhs_add_star(l, a)   dispatch2(mlhs_add_star, (l), (a))
#define params_new(pars, opts, rest, pars2, blk)   dispatch5(params, (pars), (opts), (rest), (pars2), (blk))
#define blockvar_new(p, v)   dispatch2(block_var, (p), (v))
#define blockvar_add_star(l, a)   dispatch2(block_var_add_star, (l), (a))
#define blockvar_add_block(l, a)   dispatch2(block_var_add_block, (l), (a))
#define method_optarg(m, a)   ((a)==Qundef ? (m) : dispatch2(method_add_arg,(m),(a)))
#define method_arg(m, a)   dispatch2(method_add_arg,(m),(a))
#define method_add_block(m, b)   dispatch2(method_add_block, (m), (b))
#define escape_Qundef(x)   ((x)==Qundef ? Qnil : (x))
#define FIXME   0
#define ifndef_ripper(x)
#define rb_warn0(fmt)   ripper_warn0(parser, (fmt))
#define rb_warnI(fmt, a)   ripper_warnI(parser, (fmt), (a))
#define rb_warnS(fmt, a)   ripper_warnS(parser, (fmt), (a))
#define rb_warning0(fmt)   ripper_warning0(parser, (fmt))
#define rb_warningS(fmt, a)   ripper_warningS(parser, (fmt), (a))
#define rb_compile_error   ripper_compile_error
#define compile_error   ripper_compile_error
#define PARSER_ARG   parser,
#define token_info_push(token)
#define token_info_pop(token)
#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)   (void)(x)
#define set_yylval_num(x)   (void)(x)
#define set_yylval_id(x)   (void)(x)
#define set_yylval_name(x)   (void)(yylval.val = ripper_yylval_id(x))
#define set_yylval_literal(x)   (void)(x)
#define set_yylval_node(x)   (void)(x)
#define yylval_id()   yylval.id
#define ripper_flush(p)   ((p)->tokp = (p)->parser_lex_p)
#define yylval_rval   (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val))
#define SIGN_EXTEND_CHAR(c)   ((((unsigned char)(c)) ^ 128) - 128)
#define parser_encoding_name()   (parser->enc->name)
#define parser_mbclen()   mbclen((lex_p-1),lex_pend,parser->enc)
#define parser_precise_mbclen()   rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->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,parser->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)   ripper_flush_string_content(parser, (enc))
#define dispatch_heredoc_end()   ripper_dispatch_heredoc_end(parser)
#define arg_ambiguous()   (arg_ambiguous_gen(parser), 1)
#define str_copy(_s, _p, _n)
#define IS_ARG()   (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG)
#define IS_END()   (lex_state == EXPR_END || lex_state == EXPR_ENDARG || lex_state == EXPR_ENDFN)
#define IS_BEG()   (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS)
#define IS_SPCARG(c)   (IS_ARG() && space_seen && !ISSPACE(c))
#define IS_LABEL_POSSIBLE()   ((lex_state == EXPR_BEG && !cmd_state) || IS_ARG())
#define IS_LABEL_SUFFIX(n)   (peek_n(':',(n)) && !peek_n(':', (n)+1))
#define ambiguous_operator(op, syn)   dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn))
#define warn_balanced(op, syn)
#define no_digits()   do {yyerror("numeric literal without digits"); return 0;} while (0)
#define assignable_result(x)   get_value(lhs)
#define parser_yyerror(parser, x)   dispatch1(assign_error, lhs)
#define LVAR_USED   ((int)1 << (sizeof(int) * CHAR_BIT - 1))
#define parser_mark   ripper_parser_mark
#define parser_free   ripper_parser_free
#define validate(x)   ((x) = get_value(x))
#define ripper_initialized_p(r)   ((r)->parser_lex_input != 0)

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)
 CMDARG_PUSH (1)
opt_rescue NEW_ERRINFO ())
 fixpos ($$, $2?$2:$5)
 if (!node)
else switch (nd_type(node))
 if (!($$=$2))
 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 VALUE ripper_yylval_id (ID x)
static int ripper_has_scan_event (struct parser_params *parser)
static VALUE ripper_scan_event_val (struct parser_params *parser, int t)
static void ripper_dispatch_scan_event (struct parser_params *parser, int t)
static void ripper_dispatch_ignored_scan_event (struct parser_params *parser, int t)
static void ripper_dispatch_delayed_token (struct parser_params *parser, int t)
static int parser_yyerror (struct parser_params *parser, const char *msg)
static void parser_prepare (struct parser_params *parser)
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 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 void ripper_flush_string_content (struct parser_params *parser, rb_encoding *enc)
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 ripper_dispatch_heredoc_end (struct parser_params *parser)
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 const char * magic_comment_marker (const char *str, long len)
static int parser_magic_comment (struct parser_params *parser, const char *str, long len)
static void set_file_encoding (struct parser_params *parser, const char *str, const char *send)
static int parser_yylex (struct parser_params *parser)
static int yylex (void *lval, void *p)
static int id_is_var_gen (struct parser_params *parser, ID id)
static VALUE assignable_gen (struct parser_params *parser, VALUE lhs)
static ID shadowing_lvar_gen (struct parser_params *parser, ID name)
static void new_bv_gen (struct parser_params *parser, ID name)
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 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 ID internal_id_gen (struct parser_params *parser)
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)
static VALUE ripper_dispatch0 (struct parser_params *parser, ID mid)
static VALUE ripper_dispatch1 (struct parser_params *parser, ID mid, VALUE a)
static VALUE ripper_dispatch2 (struct parser_params *parser, ID mid, VALUE a, VALUE b)
static VALUE ripper_dispatch3 (struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c)
static VALUE ripper_dispatch4 (struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
static VALUE ripper_dispatch5 (struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
static const char * keyword_id_to_str (ID id)
static VALUE ripper_id2sym (ID id)
static ID ripper_get_id (VALUE v)
static VALUE ripper_get_value (VALUE v)
static void ripper_compile_error (struct parser_params *parser, const char *fmt,...)
static void ripper_warn0 (struct parser_params *parser, const char *fmt)
static void ripper_warnI (struct parser_params *parser, const char *fmt, int a)
static void ripper_warning0 (struct parser_params *parser, const char *fmt)
static void ripper_warningS (struct parser_params *parser, const char *fmt, const char *str)
static VALUE ripper_lex_get_generic (struct parser_params *parser, VALUE src)
static VALUE ripper_s_allocate (VALUE klass)
static VALUE ripper_initialize (int argc, VALUE *argv, VALUE self)
static VALUE ripper_parse0 (VALUE parser_v)
static VALUE ripper_ensure (VALUE parser_v)
static VALUE ripper_parse (VALUE self)
static VALUE ripper_column (VALUE self)
static VALUE ripper_filename (VALUE self)
static VALUE ripper_lineno (VALUE self)
void InitVM_ripper (void)
void Init_ripper (void)

Variables

top_compstmt __pad0__
fixup_nodes & deferred_nodes
top_stmts __pad1__ = $1
top_stmt __pad2__
bodystmt __pad3__
compstmt __pad4__
stmts __pad5__ = $1
stmt __pad6__
command_asgn __pad7__
 lhs
expr __pad8__
expr_value __pad9__
command_call __pad10__
block_command __pad11__
cmd_brace_block __pad12__
command __pad13__ = ruby_sourceline
mlhs __pad14__
mlhs_inner __pad15__
mlhs_inner mlhs_basic
mlhs_item __pad16__
mlhs_head __pad17__
mlhs_post __pad18__
 mlhs_post
mlhs_node __pad19__
lhs __pad20__
cname __pad21__
 tCONSTANT
cpath __pad22__
fname __pad23__
fsym __pad24__ = $1
fitem __pad25__
 dsym
undef_list __pad26__
 undef_list
op __pad27__
reswords __pad28__
arg __pad29__
arg_value __pad30__
aref_args __pad31__
 args
paren_args __pad32__
opt_paren_args __pad33__
opt_call_args __pad34__
call_args __pad35__
command_args __pad36__ = NEW_LIST($1)
block_arg __pad37__
opt_block_arg __pad38__
args __pad39__
mrhs __pad40__
primary __pad41__
primary_value __pad42__
k_begin __pad43__
k_if __pad44__
k_unless __pad45__
k_while __pad46__
k_until __pad47__
k_case __pad48__
k_for __pad49__
k_class __pad50__
k_module __pad51__
k_def __pad52__
< num > k_end = ruby_sourceline
then __pad53__
do __pad54__
if_tail __pad55__
opt_else __pad56__
for_var __pad57__
f_marg __pad58__
f_marg_list __pad59__
 f_marg_list
f_margs __pad60__
block_param __pad61__
block_param f_block_optarg
opt_block_param __pad62__
block_param_def __pad63__
opt_bv_decl __pad64__
bv_decls __pad65__
bv_decls bvar
bvar __pad66__
lambda __pad67__
f_larglist __pad68__
lambda_body __pad69__
do_block __pad70__
block_call __pad71__ = ruby_sourceline
method_call __pad72__
brace_block __pad73__
case_body __pad74__ = ruby_sourceline
case_body cases
opt_rescue __pad75__
 none
exc_list __pad76__
exc_var __pad77__
opt_ensure __pad78__
literal __pad79__
strings __pad80__
string __pad81__
string string1
xstring __pad82__
regexp __pad83__
NODE * node = $2
NODE * list
NODE * prev
words __pad84__ = node
word_list __pad85__
word __pad86__
word qwords
qword_list __pad87__
string_contents __pad88__
xstring_contents __pad89__
regexp_contents __pad90__
string_content __pad91__
 lex_strterm = 0
 lex_state = EXPR_BEG
string_dvar __pad92__
symbol __pad93__
sym __pad94__ = $2
dsym __pad95__
numeric __pad96__
user_variable __pad97__
keyword_variable __pad98__
var_ref __pad99__
var_lhs __pad100__
backref __pad101__
superclass __pad102__
<'{lex_state=EXPR_BEG;}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;};f_args:f_arg','f_optarg','f_rest_argopt_f_block_arg{$$=new_args($1,
$3, $5, 0, $6);}|f_arg','f_optarg','f_rest_arg','f_argopt_f_block_arg{$$=new_args($1,
$3, $5, $7, $8);}|f_arg','f_optargopt_f_block_arg{$$=new_args($1,
$3, 0, 0, $4);}|f_arg','f_optarg','f_argopt_f_block_arg{$$=new_args($1,
$3, 0, $5, $6);}|f_arg','f_rest_argopt_f_block_arg{$$=new_args($1,
0, $3, 0, $4);}|f_arg','f_rest_arg','f_argopt_f_block_arg{$$=new_args($1,
0, $3, $5, $6);}|f_argopt_f_block_arg{$$=new_args($1,
0, 0, 0, $2);}|f_optarg','f_rest_argopt_f_block_arg{$$=new_args(0,
$1, $3, 0, $4);}|f_optarg','f_rest_arg','f_argopt_f_block_arg{$$=new_args(0,
$1, $3, $5, $6);}|f_optargopt_f_block_arg{$$=new_args(0,
$1, 0, 0, $2);}|f_optarg','f_argopt_f_block_arg{$$=new_args(0,
$1, 0, $3, $4);}|f_rest_argopt_f_block_arg{$$=new_args(0,
0, $1, 0, $2);}|f_rest_arg','f_argopt_f_block_arg{$$=new_args(0,
0, $1, $3, $4);}|f_block_arg{$$=new_args(0,
0, 0, 0, $1);}|{$$=new_args(0,
0, 0, 0, 0);};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 __pad103__
f_opt __pad104__
f_block_opt __pad105__ = assignable($1, $3) NEW_OPT_ARG(0, $$)
f_block_optarg __pad106__ = assignable($1, $3) NEW_OPT_ARG(0, $$)
f_optarg __pad107__
 f_optarg
restarg_mark __pad108__
f_rest_arg __pad109__
blkarg_mark __pad110__ = $2
f_block_arg __pad111__
opt_f_block_arg __pad112__ = $2
singleton __pad113__
assoc_list __pad114__
assocs __pad115__
assoc __pad116__
operation __pad117__
operation2 __pad118__
operation3 __pad119__
dot_or_colon __pad120__
opt_terms __pad121__
opt_nl __pad122__
rparen __pad123__
rbracket __pad124__
trailer __pad125__
trailer term
terms __pad126__
none __pad127__
static rb_data_type_t parser_data_type
RUBY_FUNC_EXPORTED const
unsigned int 
ruby_global_name_punct_bits [(0x7e-0x20+31)/32]
static struct kw_assoc keyword_to_name []

Define Documentation

#define ambiguous_operator ( op,
syn   )     dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn))

Definition at line 8079 of file parse.y.

#define arg_add ( l,
 )     dispatch2(args_add, (l), (a))
#define arg_add_assocs ( l,
 )     arg_add((l), bare_assoc(b))
#define arg_add_block ( l,
 )     dispatch2(args_add_block, (l), (b))
#define arg_add_optblock ( l,
 )     ((b)==Qundef? (l) : dispatch2(args_add_block, (l), (b)))
#define arg_add_star ( l,
 )     dispatch2(args_add_star, (l), (a))
 
#define arg_ambiguous (  )     (arg_ambiguous_gen(parser), 1)

Definition at line 7740 of file parse.y.

 
#define arg_new (  )     dispatch0(args_new)
#define arg_var ( id   )     arg_var_gen(parser, (id))
#define args2mrhs (  )     dispatch1(mrhs_new_from_args, (a))
#define assignable ( lhs,
node   )     assignable_gen(parser, (lhs))
#define assignable_result (  )     get_value(lhs)
#define bare_assoc (  )     dispatch1(bare_assoc_hash, (v))
#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 blockvar_add_block ( l,
 )     dispatch2(block_var_add_block, (l), (a))
#define blockvar_add_star ( l,
 )     dispatch2(block_var_add_star, (l), (a))
#define blockvar_new ( p,
 )     dispatch2(block_var, (p), (v))
#define calloc   YYCALLOC
#define class_nest   (parser->parser_class_nest)
 
#define CMDARG_LEXPOP (  )     BITSTACK_LEXPOP(cmdarg_stack)
 
#define CMDARG_P (  )     BITSTACK_SET_P(cmdarg_stack)
 
#define CMDARG_POP (  )     BITSTACK_POP(cmdarg_stack)
#define CMDARG_PUSH (  )     BITSTACK_PUSH(cmdarg_stack, (n))
#define cmdarg_stack   (parser->parser_cmdarg_stack)
#define command_start   (parser->parser_command_start)
#define compile_error   ripper_compile_error
#define compile_for_eval   (parser->parser_compile_for_eval)
 
#define COND_LEXPOP (  )     BITSTACK_LEXPOP(cond_stack)
 
#define COND_P (  )     BITSTACK_SET_P(cond_stack)
 
#define COND_POP (  )     BITSTACK_POP(cond_stack)
#define COND_PUSH (  )     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 deferred_nodes   (parser->parser_deferred_nodes)
#define dispatch0 (  )     ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n))
#define dispatch1 ( n,
 )     ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), (a))
#define dispatch2 ( n,
a,
 )     ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), (a), (b))
#define dispatch3 ( n,
a,
b,
 )     ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c))
#define dispatch4 ( n,
a,
b,
c,
 )     ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d))
#define dispatch5 ( n,
a,
b,
c,
d,
 )     ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e))
 
#define dispatch_heredoc_end (  )     ripper_dispatch_heredoc_end(parser)

Definition at line 7623 of file parse.y.

#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 ENC_SINGLE ( cr   )     ((cr)==ENC_CODERANGE_7BIT)
#define ESCAPE_CONTROL   1

Definition at line 7009 of file parse.y.

#define ESCAPE_META   2

Definition at line 7010 of file parse.y.

#define escape_Qundef (  )     ((x)==Qundef ? Qnil : (x))
#define FIXME   0
#define flush_string_content ( enc   )     ripper_flush_string_content(parser, (enc))

Definition at line 7391 of file parse.y.

#define formal_argument ( id   )     formal_argument_gen(parser, (id))
#define free   YYFREE
#define get_id ( id   )     ripper_get_id(id)
#define get_value ( val   )     ripper_get_value(val)
#define here_document (  )     parser_here_document(parser,(n))

Definition at line 6296 of file parse.y.

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

Definition at line 6297 of file parse.y.

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

Definition at line 6298 of file parse.y.

#define id_is_var ( id   )     id_is_var_gen(parser, (id))
#define ifndef_ripper (  ) 
#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_ARG (  )     (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG)

Definition at line 8067 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 (  )     (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS)

Definition at line 8069 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 (  )     (lex_state == EXPR_END || lex_state == EXPR_ENDARG || lex_state == EXPR_ENDFN)

Definition at line 8068 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 6395 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 (  )     ((lex_state == EXPR_BEG && !cmd_state) || IS_ARG())

Definition at line 8071 of file parse.y.

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

Definition at line 8072 of file parse.y.

#define is_local_id ( id   )     (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
#define is_notop_id ( id   )     ((id)>tLAST_TOKEN)
#define IS_SPCARG (  )     (IS_ARG() && space_seen && !ISSPACE(c))

Definition at line 8070 of file parse.y.

 
#define lex_eol_p (  )     (lex_p >= lex_pend)

Definition at line 6807 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 6806 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 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_var ( id   )     local_var_gen(parser, (id));
#define lpar_beg   (parser->parser_lpar_beg)
#define lvar_defined ( id   )     lvar_defined_gen(parser, (id))
#define LVAR_USED   ((int)1 << (sizeof(int) * CHAR_BIT - 1))

Definition at line 9854 of file parse.y.

#define lvtbl   (parser->parser_lvtbl)
#define malloc   YYMALLOC
#define method_add_block ( m,
 )     dispatch2(method_add_block, (m), (b))
#define method_arg ( m,
 )     dispatch2(method_add_arg,(m),(a))
#define method_optarg ( m,
 )     ((a)==Qundef ? (m) : dispatch2(method_add_arg,(m),(a)))
#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 mlhs_add ( l,
 )     dispatch2(mlhs_add, (l), (a))
#define mlhs_add_star ( l,
 )     dispatch2(mlhs_add_star, (l), (a))
 
#define mlhs_new (  )     dispatch0(mlhs_new)
#define mrhs_add ( l,
 )     dispatch2(mrhs_add, (l), (a))
#define mrhs_add_star ( l,
 )     dispatch2(mrhs_add_star, (l), (a))
 
#define mrhs_new (  )     dispatch0(mrhs_new)
#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_bv ( id   )     new_bv_gen(parser, (id))
#define NEW_STRTERM ( func,
term,
paren   )     rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)

Definition at line 7374 of file parse.y.

 
#define newtok (  )     parser_newtok(parser)

Definition at line 6286 of file parse.y.

 
#define nextc (  )     parser_nextc(parser)

Definition at line 6284 of file parse.y.

 
#define no_digits (  )     do {yyerror("numeric literal without digits"); return 0;} while (0)
#define NODE_HEREDOC   NODE_ARRAY
#define NODE_STRTERM   NODE_ZARRAY
#define numberof ( array   )     (int)(sizeof(array) / sizeof((array)[0]))
#define params_new ( pars,
opts,
rest,
pars2,
blk   )     dispatch5(params, (pars), (opts), (rest), (pars2), (blk))
#define paren_nest   (parser->parser_paren_nest)
#define parse_string (  )     parser_parse_string(parser,(n))

Definition at line 6294 of file parse.y.

#define PARSER_ARG   parser,
 
#define parser_encoding_name (  )     (parser->enc->name)

Definition at line 6392 of file parse.y.

#define parser_free   ripper_parser_free

Definition at line 11583 of file parse.y.

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

Definition at line 6396 of file parse.y.

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

Definition at line 6398 of file parse.y.

#define parser_mark   ripper_parser_mark

Definition at line 11582 of file parse.y.

 
#define parser_mbclen (  )     mbclen((lex_p-1),lex_pend,parser->enc)

Definition at line 6393 of file parse.y.

 
#define parser_precise_mbclen (  )     rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc)

Definition at line 6394 of file parse.y.

#define parser_yyerror ( parser,
 )     dispatch1(assign_error, lhs)
#define peek (  )     peek_n((c), 0)

Definition at line 6808 of file parse.y.

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

Definition at line 6809 of file parse.y.

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

Definition at line 6285 of file parse.y.

#define rb_compile_error   ripper_compile_error
#define rb_dvar_defined ( id   )     0
#define rb_local_defined ( id   )     0
#define rb_warn0 ( fmt   )     ripper_warn0(parser, (fmt))
#define rb_warnI ( fmt,
 )     ripper_warnI(parser, (fmt), (a))
#define rb_warning0 ( fmt   )     ripper_warning0(parser, (fmt))
#define rb_warningS ( fmt,
 )     ripper_warningS(parser, (fmt), (a))
#define rb_warnS ( fmt,
 )     ripper_warnS(parser, (fmt), (a))
#define RE_OPTION_ARG_ENCODING_NONE   32
#define RE_OPTION_ENCODING (  )     (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
#define RE_OPTION_ENCODING_IDX (  )     (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
#define RE_OPTION_ENCODING_NONE (  )     ((o)&RE_OPTION_ARG_ENCODING_NONE)
#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 6290 of file parse.y.

#define realloc   YYREALLOC
 
#define regx_options (  )     parser_regx_options(parser)

Definition at line 6292 of file parse.y.

#define remove_begin ( node   )     (node)
#define ripper_flush (  )     ((p)->tokp = (p)->parser_lex_p)

Definition at line 6327 of file parse.y.

#define ripper_initialized_p (  )     ((r)->parser_lex_input != 0)

Definition at line 12095 of file parse.y.

#define ripper_intern (  )     ID2SYM(rb_intern(s))
#define RIPPER_VERSION   "0.1.0"
#define ruby__end__seen   (parser->parser_ruby__end__seen)
#define ruby_sourcefile   (parser->parser_ruby_sourcefile)
#define ruby_sourceline   (parser->parser_ruby_sourceline)
#define set_yylval_id (  )     (void)(x)

Definition at line 6317 of file parse.y.

#define set_yylval_literal (  )     (void)(x)

Definition at line 6319 of file parse.y.

#define set_yylval_name (  )     (void)(yylval.val = ripper_yylval_id(x))

Definition at line 6318 of file parse.y.

#define set_yylval_node (  )     (void)(x)

Definition at line 6320 of file parse.y.

#define set_yylval_num (  )     (void)(x)

Definition at line 6316 of file parse.y.

#define set_yylval_str (  )     (void)(x)

Definition at line 6315 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 (  )     ((((unsigned char)(c)) ^ 128) - 128)

Definition at line 6389 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 6771 of file parse.y.

#define STR_FUNC_EXPAND   0x02

Definition at line 6772 of file parse.y.

#define STR_FUNC_INDENT   0x20

Definition at line 6776 of file parse.y.

#define STR_FUNC_QWORDS   0x08

Definition at line 6774 of file parse.y.

#define STR_FUNC_REGEXP   0x04

Definition at line 6773 of file parse.y.

#define STR_FUNC_SYMBOL   0x10

Definition at line 6775 of file parse.y.

#define STR_NEW ( p,
 )     rb_enc_str_new((p),(n),parser->enc)
 
#define STR_NEW0 (  )     rb_enc_str_new(0,0,parser->enc)
#define STR_NEW2 (  )     rb_enc_str_new((p),strlen(p),parser->enc)
#define STR_NEW3 ( p,
n,
e,
func   )     parser_str_new((p),(n),(e),(func),parser->enc)
 
#define tok (  )     tokenbuf

Definition at line 6880 of file parse.y.

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

Definition at line 6289 of file parse.y.

#define TOK_INTERN ( mb   )     rb_intern3(tok(), toklen(), parser->enc)
#define tokadd (  )     parser_tokadd(parser, (c))

Definition at line 6288 of file parse.y.

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

Definition at line 6291 of file parse.y.

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

Definition at line 7242 of file parse.y.

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

Definition at line 6293 of file parse.y.

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

Definition at line 6295 of file parse.y.

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

Definition at line 6935 of file parse.y.

#define token_info_pop ( token   ) 
#define token_info_push ( token   ) 
#define tokenbuf   (parser->parser_tokenbuf)
 
#define tokfix (  )     (tokenbuf[tokidx]='\0')

Definition at line 6879 of file parse.y.

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

Definition at line 6882 of file parse.y.

 
#define toklen (  )     tokidx

Definition at line 6881 of file parse.y.

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

Definition at line 6287 of file parse.y.

 
#define UTF8_ENC (  ) 
Value:
(parser->utf8 ? parser->utf8 : \
                    (parser->utf8 = rb_utf8_encoding()))
#define validate (  )     ((x) = get_value(x))

Definition at line 11856 of file parse.y.

#define VTBL_DEBUG   0
#define warn_balanced ( op,
syn   ) 
Value:
((void) \
    (last_state != EXPR_CLASS && last_state != EXPR_DOT && \
     last_state != EXPR_FNAME && last_state != EXPR_ENDFN && \
     last_state != EXPR_ENDARG && \
     space_seen && !ISSPACE(c) && \
     (ambiguous_operator(op, syn), 0)))

Definition at line 8081 of file parse.y.

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

Definition at line 6877 of file parse.y.

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

Definition at line 6299 of file parse.y.

#define YYCALLOC ( nelem,
size   )     rb_parser_calloc(parser, (nelem), (size))
#define yydebug   (parser->parser_yydebug)
#define YYDEBUG   1
#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 6275 of file parse.y.

 
#define yylval_id (  )     yylval.id

Definition at line 6321 of file parse.y.

#define yylval_rval   (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val))

Definition at line 6329 of file parse.y.

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

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 6778 of file parse.y.


Function Documentation

static void arg_ambiguous_gen ( struct parser_params parser  )  [static]

Definition at line 7732 of file parse.y.

arg_var ( shadowing_lvar(get_id($2))   ) 
static int arg_var_gen ( struct parser_params parser,
ID  id 
) [static]

Definition at line 10636 of file parse.y.

References nd_type, and NODE_LASGN.

static VALUE assignable_gen ( struct parser_params parser,
VALUE  lhs 
) [static]

Definition at line 9774 of file parse.y.

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

Definition at line 7813 of file parse.y.

static void dispose_string ( VALUE  str  )  [static]

Definition at line 7220 of file parse.y.

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

Definition at line 10761 of file parse.y.

References parser_prepare(), and TypedData_Get_Struct.

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

Definition at line 10730 of file parse.y.

References parser_params::parser_lex_gets, and ripper_lex_get_generic().

static int dyna_in_block_gen ( struct parser_params parser  )  [static]

Definition at line 10724 of file parse.y.

References rb_scan_args(), and TypedData_Get_Struct.

static void dyna_pop_1 ( struct parser_params parser  )  [static]

Definition at line 10692 of file parse.y.

References rb_funcall(), and ripper_id_gets.

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

Definition at line 10710 of file parse.y.

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

Definition at line 10681 of file parse.y.

References rb_intern.

fixpos ( $$  ,
$2?$2:$  5 
)
method_call fixpos ( $$  ,
1 
) = $2

Referenced by parser_regx_options(), and yyparse().

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

Definition at line 7743 of file parse.y.

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

Definition at line 9754 of file parse.y.

References rb_enc_symname2_p(), and strlen().

else if ( dyna_in_block)&&local_id($2  ) 
if ( $$=$2  ) 

Definition at line 5618 of file parse.y.

if ( node  ) 

Definition at line 5303 of file parse.y.

if ( !$$   )  = NEW_BEGIN(0)
if ( 2  ) 
void Init_ripper ( void   ) 

Definition at line 12281 of file parse.y.

void InitVM_ripper ( void   ) 

Definition at line 12275 of file parse.y.

static ID internal_id_gen ( struct parser_params parser  )  [static]

Definition at line 11100 of file parse.y.

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

Definition at line 7418 of file parse.y.

static const char* keyword_id_to_str ( ID  id  )  [static]

Definition at line 11965 of file parse.y.

Referenced by local_pop_gen().

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

Definition at line 6647 of file parse.y.

Referenced by switch().

static VALUE lex_getline ( struct parser_params parser  )  [static]

Definition at line 6667 of file parse.y.

References parser_params::enc, lex_p, and rb_utf8_encoding().

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

Definition at line 10653 of file parse.y.

References rb_intern.

static void local_pop_gen ( struct parser_params parser  )  [static]

Definition at line 10590 of file parse.y.

References ID2SYM, keyword_id_to_str(), rb_bug(), rb_id2name(), rb_intern, rb_intern2(), tANDOP, and tOROP.

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

Definition at line 10575 of file parse.y.

References keyword__ENCODING__.

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

Definition at line 10643 of file parse.y.

References rb_vsprintf().

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

Definition at line 7754 of file parse.y.

References rb_intern.

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

Definition at line 7873 of file parse.y.

static rb_encoding* must_be_ascii_compatible ( VALUE  s  )  [static]

Definition at line 6637 of file parse.y.

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

Definition at line 9881 of file parse.y.

References ID_JUNK.

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

Definition at line 7761 of file parse.y.

static void parser_free ( void *  ptr  )  [static]

Definition at line 11613 of file parse.y.

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

Definition at line 7629 of file parse.y.

static int parser_heredoc_identifier ( struct parser_params parser  )  [static]

Definition at line 7519 of file parse.y.

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

Definition at line 7582 of file parse.y.

References nextc, pushback, tAREF, and tASET.

static void parser_initialize ( struct parser_params parser  )  [static]

Definition at line 11535 of file parse.y.

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

Definition at line 7906 of file parse.y.

References pushback.

static void parser_mark ( void *  ptr  )  [static]

Definition at line 11587 of file parse.y.

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

Definition at line 11633 of file parse.y.

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

Definition at line 6885 of file parse.y.

References ISSPACE, lex_goto_eol, lex_p, ripper_dispatch_scan_event(), tEMBDOC, tEMBDOC_BEG, and TRUE.

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

Definition at line 6812 of file parse.y.

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

Definition at line 7461 of file parse.y.

static int parser_peek_variable_name ( struct parser_params parser  )  [static]

Definition at line 7425 of file parse.y.

static void parser_prepare ( struct parser_params parser  )  [static]

Definition at line 8043 of file parse.y.

References NODE_FL_NEWLINE, and remove_begin.

Referenced by dvar_curr_gen().

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

Definition at line 6868 of file parse.y.

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

Definition at line 7013 of file parse.y.

static int parser_regx_options ( struct parser_params parser  )  [static]

Definition at line 7184 of file parse.y.

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

Definition at line 7781 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 6790 of file parse.y.

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

Definition at line 6922 of file parse.y.

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

Definition at line 6912 of file parse.y.

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

Definition at line 7111 of file parse.y.

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

Definition at line 7229 of file parse.y.

References tDOT3.

static int parser_tokadd_string ( struct parser_params parser,
int  func,
int  term,
int  paren,
long *  nest,
rb_encoding **  encp 
) [static]
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 6938 of file parse.y.

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

Definition at line 7104 of file parse.y.

References EXPR_BEG, lex_state, nextc, set_yylval_id, tANDOP, and tOP_ASGN.

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

Definition at line 6900 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 7599 of file parse.y.

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

Definition at line 6475 of file parse.y.

static int parser_yylex ( struct parser_params parser  )  [static]

Definition at line 8089 of file parse.y.

References NEW_BLOCK, and NODE_BLOCK.

static VALUE ripper_column ( VALUE  self  )  [static]

Definition at line 12201 of file parse.y.

static void ripper_compile_error ( struct parser_params parser,
const char *  fmt,
  ... 
) [static]

Definition at line 12030 of file parse.y.

static VALUE ripper_dispatch0 ( struct parser_params parser,
ID  mid 
) [static]

Definition at line 11859 of file parse.y.

static VALUE ripper_dispatch1 ( struct parser_params parser,
ID  mid,
VALUE  a 
) [static]

Definition at line 11865 of file parse.y.

static VALUE ripper_dispatch2 ( struct parser_params parser,
ID  mid,
VALUE  a,
VALUE  b 
) [static]

Definition at line 11872 of file parse.y.

static VALUE ripper_dispatch3 ( struct parser_params parser,
ID  mid,
VALUE  a,
VALUE  b,
VALUE  c 
) [static]

Definition at line 11880 of file parse.y.

static VALUE ripper_dispatch4 ( struct parser_params parser,
ID  mid,
VALUE  a,
VALUE  b,
VALUE  c,
VALUE  d 
) [static]

Definition at line 11889 of file parse.y.

static VALUE ripper_dispatch5 ( struct parser_params parser,
ID  mid,
VALUE  a,
VALUE  b,
VALUE  c,
VALUE  d,
VALUE  e 
) [static]

Definition at line 11899 of file parse.y.

static void ripper_dispatch_delayed_token ( struct parser_params parser,
int  t 
) [static]

Definition at line 6363 of file parse.y.

static void ripper_dispatch_heredoc_end ( struct parser_params parser  )  [static]

Definition at line 7615 of file parse.y.

static void ripper_dispatch_ignored_scan_event ( struct parser_params parser,
int  t 
) [static]

Definition at line 6356 of file parse.y.

References is_local_id, and yyerror.

static void ripper_dispatch_scan_event ( struct parser_params parser,
int  t 
) [static]

Definition at line 6349 of file parse.y.

Referenced by parser_newtok().

static VALUE ripper_ensure ( VALUE  parser_v  )  [static]

Definition at line 12157 of file parse.y.

static VALUE ripper_filename ( VALUE  self  )  [static]

Definition at line 12222 of file parse.y.

static void ripper_flush_string_content ( struct parser_params parser,
rb_encoding enc 
) [static]

Definition at line 7379 of file parse.y.

static ID ripper_get_id ( VALUE  v  )  [static]

Definition at line 12009 of file parse.y.

static VALUE ripper_get_value ( VALUE  v  )  [static]

Definition at line 12019 of file parse.y.

static int ripper_has_scan_event ( struct parser_params parser  )  [static]

Definition at line 6332 of file parse.y.

static VALUE ripper_id2sym ( ID  id  )  [static]

Definition at line 11978 of file parse.y.

static VALUE ripper_initialize ( int  argc,
VALUE argv,
VALUE  self 
) [static]

Definition at line 12108 of file parse.y.

static VALUE ripper_lex_get_generic ( struct parser_params parser,
VALUE  src 
) [static]

Definition at line 12077 of file parse.y.

Referenced by dvar_defined_gen().

static VALUE ripper_lineno ( VALUE  self  )  [static]

Definition at line 12241 of file parse.y.

static VALUE ripper_parse ( VALUE  self  )  [static]

Definition at line 12173 of file parse.y.

static VALUE ripper_parse0 ( VALUE  parser_v  )  [static]

Definition at line 12146 of file parse.y.

static VALUE ripper_s_allocate ( VALUE  klass  )  [static]

Definition at line 12083 of file parse.y.

static VALUE ripper_scan_event_val ( struct parser_params parser,
int  t 
) [static]

Definition at line 6340 of file parse.y.

static void ripper_warn0 ( struct parser_params parser,
const char *  fmt 
) [static]

Definition at line 12042 of file parse.y.

static void ripper_warnI ( struct parser_params parser,
const char *  fmt,
int  a 
) [static]

Definition at line 12048 of file parse.y.

static void ripper_warning0 ( struct parser_params parser,
const char *  fmt 
) [static]

Definition at line 12064 of file parse.y.

static void ripper_warningS ( struct parser_params parser,
const char *  fmt,
const char *  str 
) [static]

Definition at line 12070 of file parse.y.

static VALUE ripper_yylval_id ( ID  x  )  [inline, static]

Definition at line 6311 of file parse.y.

References newtok.

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

Definition at line 8000 of file parse.y.

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

Definition at line 9857 of file parse.y.

else switch ( nd_type(node  ) 
static void warn_unused_var ( struct parser_params parser,
struct local_vars local 
) [static]

Definition at line 10555 of file parse.y.

References keyword_yield.

static int yylex ( void *  lval,
void *  p 
) [static]

Definition at line 9379 of file parse.y.


Variable Documentation

top_compstmt __pad0__

Definition at line 2200 of file parse.y.

var_lhs __pad100__

Definition at line 5701 of file parse.y.

backref __pad101__

Definition at line 5701 of file parse.y.

superclass __pad102__

Definition at line 5728 of file parse.y.

f_arg __pad103__

Definition at line 5965 of file parse.y.

f_opt __pad104__

Definition at line 5965 of file parse.y.

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

Definition at line 5992 of file parse.y.

f_block_optarg __pad106__ = assignable($1, $3) NEW_OPT_ARG(0, $$)

Definition at line 6004 of file parse.y.

Definition at line 6019 of file parse.y.

restarg_mark __pad108__

Definition at line 6043 of file parse.y.

f_rest_arg __pad109__

Definition at line 6067 of file parse.y.

command_call __pad10__

Definition at line 2684 of file parse.y.

blkarg_mark __pad110__ = $2

Definition at line 6071 of file parse.y.

f_block_arg __pad111__

Definition at line 6095 of file parse.y.

opt_f_block_arg __pad112__ = $2

Definition at line 6101 of file parse.y.

singleton __pad113__

Definition at line 6101 of file parse.y.

assoc_list __pad114__

Definition at line 6159 of file parse.y.

assocs __pad115__

Definition at line 6170 of file parse.y.

assoc __pad116__

Definition at line 6170 of file parse.y.

operation __pad117__

Definition at line 6170 of file parse.y.

operation2 __pad118__

Definition at line 6216 of file parse.y.

operation3 __pad119__

Definition at line 6221 of file parse.y.

block_command __pad11__

Definition at line 2694 of file parse.y.

dot_or_colon __pad120__

Definition at line 6233 of file parse.y.

opt_terms __pad121__

Definition at line 6237 of file parse.y.

opt_nl __pad122__

Definition at line 6241 of file parse.y.

rparen __pad123__

Definition at line 6244 of file parse.y.

rbracket __pad124__

Definition at line 6247 of file parse.y.

trailer __pad125__

Definition at line 6251 of file parse.y.

terms __pad126__

Definition at line 6256 of file parse.y.

Definition at line 6260 of file parse.y.

cmd_brace_block __pad12__

Definition at line 2694 of file parse.y.

Definition at line 2715 of file parse.y.

mlhs __pad14__

Definition at line 2838 of file parse.y.

Definition at line 2849 of file parse.y.

mlhs_item __pad16__

Definition at line 2849 of file parse.y.

Definition at line 2957 of file parse.y.

Definition at line 2957 of file parse.y.

mlhs_node __pad19__

Definition at line 2985 of file parse.y.

top_stmts __pad1__ = $1

Definition at line 2209 of file parse.y.

Definition at line 2985 of file parse.y.

cname __pad21__

Definition at line 3154 of file parse.y.

cpath __pad22__

Definition at line 3170 of file parse.y.

fname __pad23__

Definition at line 3191 of file parse.y.

fsym __pad24__ = $1

Definition at line 3199 of file parse.y.

fitem __pad25__

Definition at line 3219 of file parse.y.

Definition at line 3230 of file parse.y.

Definition at line 3235 of file parse.y.

reswords __pad28__

Definition at line 3274 of file parse.y.

arg __pad29__

Definition at line 3293 of file parse.y.

top_stmt __pad2__

Definition at line 2242 of file parse.y.

arg_value __pad30__

Definition at line 3773 of file parse.y.

aref_args __pad31__

Definition at line 3780 of file parse.y.

paren_args __pad32__

Definition at line 3787 of file parse.y.

opt_paren_args __pad33__

Definition at line 3813 of file parse.y.

opt_call_args __pad34__

Definition at line 3821 of file parse.y.

call_args __pad35__

Definition at line 3821 of file parse.y.

command_args __pad36__ = NEW_LIST($1)

Definition at line 3847 of file parse.y.

block_arg __pad37__

Definition at line 3898 of file parse.y.

opt_block_arg __pad38__

Definition at line 3908 of file parse.y.

Definition at line 3908 of file parse.y.

bodystmt __pad3__

Definition at line 2267 of file parse.y.

mrhs __pad40__

Definition at line 3964 of file parse.y.

primary __pad41__

Definition at line 3964 of file parse.y.

primary_value __pad42__

Definition at line 3964 of file parse.y.

k_begin __pad43__

Definition at line 4470 of file parse.y.

k_if __pad44__

Definition at line 4476 of file parse.y.

k_unless __pad45__

Definition at line 4482 of file parse.y.

k_while __pad46__

Definition at line 4488 of file parse.y.

k_until __pad47__

Definition at line 4494 of file parse.y.

k_case __pad48__

Definition at line 4500 of file parse.y.

k_for __pad49__

Definition at line 4506 of file parse.y.

compstmt __pad4__

Definition at line 2300 of file parse.y.

k_class __pad50__

Definition at line 4512 of file parse.y.

k_module __pad51__

Definition at line 4518 of file parse.y.

k_def __pad52__

Definition at line 4524 of file parse.y.

then __pad53__

Definition at line 4540 of file parse.y.

Definition at line 4561 of file parse.y.

if_tail __pad55__

Definition at line 4569 of file parse.y.

opt_else __pad56__

Definition at line 4575 of file parse.y.

Definition at line 4586 of file parse.y.

f_marg __pad58__

Definition at line 4594 of file parse.y.

Definition at line 4594 of file parse.y.

stmts __pad5__ = $1

Definition at line 2309 of file parse.y.

f_margs __pad60__

Definition at line 4618 of file parse.y.

block_param __pad61__

Definition at line 4618 of file parse.y.

opt_block_param __pad62__

Definition at line 4618 of file parse.y.

block_param_def __pad63__

Definition at line 4837 of file parse.y.

opt_bv_decl __pad64__

Definition at line 4865 of file parse.y.

Definition at line 4877 of file parse.y.

Definition at line 4897 of file parse.y.

lambda __pad67__

Definition at line 4907 of file parse.y.

f_larglist __pad68__

Definition at line 4928 of file parse.y.

lambda_body __pad69__

Definition at line 4946 of file parse.y.

stmt __pad6__

Definition at line 2342 of file parse.y.

do_block __pad70__

Definition at line 4956 of file parse.y.

block_call __pad71__ = ruby_sourceline

Definition at line 4962 of file parse.y.

method_call __pad72__

Definition at line 5013 of file parse.y.

brace_block __pad73__

Definition at line 5102 of file parse.y.

Definition at line 5108 of file parse.y.

opt_rescue __pad75__

Definition at line 5166 of file parse.y.

exc_list __pad76__

Definition at line 5185 of file parse.y.

exc_var __pad77__

Definition at line 5199 of file parse.y.

opt_ensure __pad78__

Definition at line 5211 of file parse.y.

literal __pad79__

Definition at line 5223 of file parse.y.

command_asgn __pad7__

Definition at line 2615 of file parse.y.

strings __pad80__

Definition at line 5234 of file parse.y.

string __pad81__

Definition at line 5241 of file parse.y.

Definition at line 5268 of file parse.y.

Definition at line 5290 of file parse.y.

Definition at line 5355 of file parse.y.

word_list __pad85__

Definition at line 5379 of file parse.y.

word __pad86__

Definition at line 5397 of file parse.y.

qword_list __pad87__

Definition at line 5434 of file parse.y.

string_contents __pad88__

Definition at line 5452 of file parse.y.

xstring_contents __pad89__

Definition at line 5470 of file parse.y.

expr __pad8__

Definition at line 2642 of file parse.y.

regexp_contents __pad90__

Definition at line 5488 of file parse.y.

string_content __pad91__

Definition at line 5525 of file parse.y.

string_dvar __pad92__

Definition at line 5568 of file parse.y.

symbol __pad93__

Definition at line 5595 of file parse.y.

sym __pad94__ = $2

Definition at line 5601 of file parse.y.

Definition at line 5616 of file parse.y.

numeric __pad96__

Definition at line 5642 of file parse.y.

user_variable __pad97__

Definition at line 5662 of file parse.y.

keyword_variable __pad98__

Definition at line 5671 of file parse.y.

var_ref __pad99__

Definition at line 5678 of file parse.y.

expr_value __pad9__

Definition at line 2642 of file parse.y.

Definition at line 3787 of file parse.y.

Definition at line 4877 of file parse.y.

case_body cases

Definition at line 5108 of file parse.y.

fixup_nodes& deferred_nodes

Definition at line 2206 of file parse.y.

Definition at line 3225 of file parse.y.

Definition at line 4618 of file parse.y.

f_margs f_marg_list

Definition at line 4618 of file parse.y.

Definition at line 6043 of file parse.y.

Definition at line 4530 of file parse.y.

struct kw_assoc keyword_to_name[] [static]
lex_state = EXPR_BEG

Definition at line 5532 of file parse.y.

Definition at line 5531 of file parse.y.

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

Definition at line 2626 of file parse.y.

NODE* list

Definition at line 5302 of file parse.y.

Definition at line 2849 of file parse.y.

Definition at line 2985 of file parse.y.

nd_next = $2

Definition at line 5960 of file parse.y.

<'{lex_state=EXPR_BEG;}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;};f_args:f_arg','f_optarg','f_rest_argopt_f_block_arg{$$=new_args($1,$3,$5,0,$6);}|f_arg','f_optarg','f_rest_arg','f_argopt_f_block_arg{$$=new_args($1,$3,$5,$7,$8);}|f_arg','f_optargopt_f_block_arg{$$=new_args($1,$3,0,0,$4);}|f_arg','f_optarg','f_argopt_f_block_arg{$$=new_args($1,$3,0,$5,$6);}|f_arg','f_rest_argopt_f_block_arg{$$=new_args($1,0,$3,0,$4);}|f_arg','f_rest_arg','f_argopt_f_block_arg{$$=new_args($1,0,$3,$5,$6);}|f_argopt_f_block_arg{$$=new_args($1,0,0,0,$2);}|f_optarg','f_rest_argopt_f_block_arg{$$=new_args(0,$1,$3,0,$4);}|f_optarg','f_rest_arg','f_argopt_f_block_arg{$$=new_args(0,$1,$3,$5,$6);}|f_optargopt_f_block_arg{$$=new_args(0,$1,0,0,$2);}|f_optarg','f_argopt_f_block_arg{$$=new_args(0,$1,0,$3,$4);}|f_rest_argopt_f_block_arg{$$=new_args(0,0,$1,0,$2);}|f_rest_arg','f_argopt_f_block_arg{$$=new_args(0,0,$1,$3,$4);}|f_block_arg{$$=new_args(0,0,0,0,$1);}|{$$=new_args(0,0,0,0,0);};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 5954 of file parse.y.

NODE* node = $2

Definition at line 5180 of file parse.y.

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

Definition at line 6685 of file parse.y.

NODE * prev
word qwords

Definition at line 5397 of file parse.y.

RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e-0x20+31)/32]

Definition at line 7396 of file parse.y.

string string1

Definition at line 5241 of file parse.y.

Definition at line 3165 of file parse.y.

trailer term

Definition at line 6251 of file parse.y.

Definition at line 3235 of file parse.y.


Generated on 27 Nov 2014 for Ruby by  doxygen 1.6.1