parse.c 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  vtable
struct  local_vars
struct  parser_params
union  yyalloc
struct  kw_assoc
struct  ripper_args

Defines

#define YYBISON   1
#define YYBISON_VERSION   "2.5"
#define YYSKELETON_NAME   "yacc.c"
#define YYPURE   1
#define YYPUSH   0
#define YYPULL   1
#define YYLSP_NEEDED   0
#define 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 YYERROR_VERBOSE   1
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
#define YYUSE(e)   ((void) (e))
#define YYID(n)   (n)
#define YYSTACK_FREE(Ptr)   do { /* empty */; } while (YYID (0))
#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
#define YYSTACK_BYTES(N)
#define YYCOPY_NEEDED   1
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
#define YYFINAL   3
#define YYLAST   10748
#define YYNTOKENS   148
#define YYNNTS   174
#define YYNRULES   573
#define YYNSTATES   991
#define YYUNDEFTOK   2
#define YYMAXUTOK   375
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
#define YYPACT_NINF   -747
#define YYTABLE_NINF   -574
#define yypact_value_is_default(yystate)   ((yystate) == (-747))
#define yytable_value_is_error(yytable_value)   ((yytable_value) == (-574))
#define yyerrok   (yyerrstatus = 0)
#define yyclearin   (yychar = YYEMPTY)
#define YYEMPTY   (-2)
#define YYEOF   0
#define YYACCEPT   goto yyacceptlab
#define YYABORT   goto yyabortlab
#define YYERROR   goto yyerrorlab
#define YYFAIL   goto yyerrlab
#define YYRECOVERING()   (!!yyerrstatus)
#define YYBACKUP(Token, Value)
#define YYTERROR   1
#define YYERRCODE   256
#define YYRHSLOC(Rhs, K)   ((Rhs)[K])
#define YYLEX   yylex (&yylval, YYLEX_PARAM)
#define YYDPRINTF(Args)
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
#define YY_STACK_PRINT(Bottom, Top)
#define YY_REDUCE_PRINT(Rule)
#define YYCASE_(N, S)
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
#define YYSYNTAX_ERROR
#define yylval   (*((YYSTYPE*)(parser->parser_yylval)))
#define nextc()   parser_nextc(parser)
#define pushback(c)   parser_pushback(parser, (c))
#define newtok()   parser_newtok(parser)
#define tokspace(n)   parser_tokspace(parser, (n))
#define tokadd(c)   parser_tokadd(parser, (c))
#define tok_hex(numlen)   parser_tok_hex(parser, (numlen))
#define read_escape(flags, e)   parser_read_escape(parser, (flags), (e))
#define tokadd_escape(e)   parser_tokadd_escape(parser, (e))
#define regx_options()   parser_regx_options(parser)
#define tokadd_string(f, t, p, n, e)   parser_tokadd_string(parser,(f),(t),(p),(n),(e))
#define parse_string(n)   parser_parse_string(parser,(n))
#define tokaddmbc(c, enc)   parser_tokaddmbc(parser, (c), (enc))
#define here_document(n)   parser_here_document(parser,(n))
#define heredoc_identifier()   parser_heredoc_identifier(parser)
#define heredoc_restore(n)   parser_heredoc_restore(parser,(n))
#define whole_match_p(e, l, i)   parser_whole_match_p(parser,(e),(l),(i))
#define set_yylval_str(x)   (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)

Typedefs

typedef VALUE stack_type
typedef unsigned char yytype_uint8
typedef short int yytype_int8
typedef unsigned short int yytype_uint16
typedef short int yytype_int16

Enumerations

enum  lex_state_e {
  EXPR_BEG, EXPR_END, EXPR_ENDARG, EXPR_ENDFN,
  EXPR_ARG, EXPR_CMDARG, EXPR_MID, EXPR_FNAME,
  EXPR_DOT, EXPR_CLASS, EXPR_VALUE, EXPR_MAX_STATE,
  EXPR_BEG, EXPR_END, EXPR_ENDARG, EXPR_ENDFN,
  EXPR_ARG, EXPR_CMDARG, EXPR_MID, EXPR_FNAME,
  EXPR_DOT, EXPR_CLASS, EXPR_VALUE, EXPR_MAX_STATE
}
enum  yytokentype {
  keyword_class = 258, keyword_module = 259, keyword_def = 260, keyword_undef = 261,
  keyword_begin = 262, keyword_rescue = 263, keyword_ensure = 264, keyword_end = 265,
  keyword_if = 266, keyword_unless = 267, keyword_then = 268, keyword_elsif = 269,
  keyword_else = 270, keyword_case = 271, keyword_when = 272, keyword_while = 273,
  keyword_until = 274, keyword_for = 275, keyword_break = 276, keyword_next = 277,
  keyword_redo = 278, keyword_retry = 279, keyword_in = 280, keyword_do = 281,
  keyword_do_cond = 282, keyword_do_block = 283, keyword_do_LAMBDA = 284, keyword_return = 285,
  keyword_yield = 286, keyword_super = 287, keyword_self = 288, keyword_nil = 289,
  keyword_true = 290, keyword_false = 291, keyword_and = 292, keyword_or = 293,
  keyword_not = 294, modifier_if = 295, modifier_unless = 296, modifier_while = 297,
  modifier_until = 298, modifier_rescue = 299, keyword_alias = 300, keyword_defined = 301,
  keyword_BEGIN = 302, keyword_END = 303, keyword__LINE__ = 304, keyword__FILE__ = 305,
  keyword__ENCODING__ = 306, tIDENTIFIER = 307, tFID = 308, tGVAR = 309,
  tIVAR = 310, tCONSTANT = 311, tCVAR = 312, tLABEL = 313,
  tINTEGER = 314, tFLOAT = 315, tSTRING_CONTENT = 316, tCHAR = 317,
  tNTH_REF = 318, tBACK_REF = 319, tREGEXP_END = 320, tUPLUS = 321,
  tUMINUS = 322, tPOW = 323, tCMP = 324, tEQ = 325,
  tEQQ = 326, tNEQ = 327, tGEQ = 328, tLEQ = 329,
  tANDOP = 330, tOROP = 331, tMATCH = 332, tNMATCH = 333,
  tDOT2 = 334, tDOT3 = 335, tAREF = 336, tASET = 337,
  tLSHFT = 338, tRSHFT = 339, tCOLON2 = 340, tCOLON3 = 341,
  tOP_ASGN = 342, tASSOC = 343, tLPAREN = 344, tLPAREN_ARG = 345,
  tRPAREN = 346, tLBRACK = 347, tLBRACE = 348, tLBRACE_ARG = 349,
  tSTAR = 350, tAMPER = 351, tLAMBDA = 352, tSYMBEG = 353,
  tSTRING_BEG = 354, tXSTRING_BEG = 355, tREGEXP_BEG = 356, tWORDS_BEG = 357,
  tQWORDS_BEG = 358, tSTRING_DBEG = 359, tSTRING_DVAR = 360, tSTRING_END = 361,
  tLAMBEG = 362, tLOWEST = 363, tUMINUS_NUM = 364, idNULL = 365,
  idRespond_to = 366, idIFUNC = 367, idCFUNC = 368, id_core_set_method_alias = 369,
  id_core_set_variable_alias = 370, id_core_undef_method = 371, id_core_define_method = 372, id_core_define_singleton_method = 373,
  id_core_set_postexe = 374, tLAST_TOKEN = 375, YAML_ANCHOR = 258, YAML_ALIAS = 259,
  YAML_TRANSFER = 260, YAML_TAGURI = 261, YAML_ITRANSFER = 262, YAML_WORD = 263,
  YAML_PLAIN = 264, YAML_BLOCK = 265, YAML_DOCSEP = 266, YAML_IOPEN = 267,
  YAML_INDENT = 268, YAML_IEND = 269, YAML_ANCHOR = 258, YAML_ALIAS = 259,
  YAML_TRANSFER = 260, YAML_TAGURI = 261, YAML_ITRANSFER = 262, YAML_WORD = 263,
  YAML_PLAIN = 264, YAML_BLOCK = 265, YAML_DOCSEP = 266, YAML_IOPEN = 267,
  YAML_INDENT = 268, YAML_IEND = 269, keyword_class = 258, keyword_module = 259,
  keyword_def = 260, keyword_undef = 261, keyword_begin = 262, keyword_rescue = 263,
  keyword_ensure = 264, keyword_end = 265, keyword_if = 266, keyword_unless = 267,
  keyword_then = 268, keyword_elsif = 269, keyword_else = 270, keyword_case = 271,
  keyword_when = 272, keyword_while = 273, keyword_until = 274, keyword_for = 275,
  keyword_break = 276, keyword_next = 277, keyword_redo = 278, keyword_retry = 279,
  keyword_in = 280, keyword_do = 281, keyword_do_cond = 282, keyword_do_block = 283,
  keyword_do_LAMBDA = 284, keyword_return = 285, keyword_yield = 286, keyword_super = 287,
  keyword_self = 288, keyword_nil = 289, keyword_true = 290, keyword_false = 291,
  keyword_and = 292, keyword_or = 293, keyword_not = 294, modifier_if = 295,
  modifier_unless = 296, modifier_while = 297, modifier_until = 298, modifier_rescue = 299,
  keyword_alias = 300, keyword_defined = 301, keyword_BEGIN = 302, keyword_END = 303,
  keyword__LINE__ = 304, keyword__FILE__ = 305, keyword__ENCODING__ = 306, tIDENTIFIER = 307,
  tFID = 308, tGVAR = 309, tIVAR = 310, tCONSTANT = 311,
  tCVAR = 312, tLABEL = 313, tINTEGER = 314, tFLOAT = 315,
  tSTRING_CONTENT = 316, tCHAR = 317, tNTH_REF = 318, tBACK_REF = 319,
  tREGEXP_END = 320, tUPLUS = 321, tUMINUS = 322, tPOW = 323,
  tCMP = 324, tEQ = 325, tEQQ = 326, tNEQ = 327,
  tGEQ = 328, tLEQ = 329, tANDOP = 330, tOROP = 331,
  tMATCH = 332, tNMATCH = 333, tDOT2 = 334, tDOT3 = 335,
  tAREF = 336, tASET = 337, tLSHFT = 338, tRSHFT = 339,
  tCOLON2 = 340, tCOLON3 = 341, tOP_ASGN = 342, tASSOC = 343,
  tLPAREN = 344, tLPAREN_ARG = 345, tRPAREN = 346, tLBRACK = 347,
  tLBRACE = 348, tLBRACE_ARG = 349, tSTAR = 350, tAMPER = 351,
  tLAMBDA = 352, tSYMBEG = 353, tSTRING_BEG = 354, tXSTRING_BEG = 355,
  tREGEXP_BEG = 356, tWORDS_BEG = 357, tQWORDS_BEG = 358, tSTRING_DBEG = 359,
  tSTRING_DVAR = 360, tSTRING_END = 361, tLAMBEG = 362, tLOWEST = 363,
  tUMINUS_NUM = 364, idNULL = 365, idRespond_to = 366, idIFUNC = 367,
  idCFUNC = 368, id_core_set_method_alias = 369, id_core_set_variable_alias = 370, id_core_undef_method = 371,
  id_core_define_method = 372, id_core_define_singleton_method = 373, id_core_set_postexe = 374, tLAST_TOKEN = 375,
  keyword_class = 258, keyword_module = 259, keyword_def = 260, keyword_undef = 261,
  keyword_begin = 262, keyword_rescue = 263, keyword_ensure = 264, keyword_end = 265,
  keyword_if = 266, keyword_unless = 267, keyword_then = 268, keyword_elsif = 269,
  keyword_else = 270, keyword_case = 271, keyword_when = 272, keyword_while = 273,
  keyword_until = 274, keyword_for = 275, keyword_break = 276, keyword_next = 277,
  keyword_redo = 278, keyword_retry = 279, keyword_in = 280, keyword_do = 281,
  keyword_do_cond = 282, keyword_do_block = 283, keyword_do_LAMBDA = 284, keyword_return = 285,
  keyword_yield = 286, keyword_super = 287, keyword_self = 288, keyword_nil = 289,
  keyword_true = 290, keyword_false = 291, keyword_and = 292, keyword_or = 293,
  keyword_not = 294, modifier_if = 295, modifier_unless = 296, modifier_while = 297,
  modifier_until = 298, modifier_rescue = 299, keyword_alias = 300, keyword_defined = 301,
  keyword_BEGIN = 302, keyword_END = 303, keyword__LINE__ = 304, keyword__FILE__ = 305,
  keyword__ENCODING__ = 306, tIDENTIFIER = 307, tFID = 308, tGVAR = 309,
  tIVAR = 310, tCONSTANT = 311, tCVAR = 312, tLABEL = 313,
  tINTEGER = 314, tFLOAT = 315, tSTRING_CONTENT = 316, tCHAR = 317,
  tNTH_REF = 318, tBACK_REF = 319, tREGEXP_END = 320, tUPLUS = 321,
  tUMINUS = 322, tPOW = 323, tCMP = 324, tEQ = 325,
  tEQQ = 326, tNEQ = 327, tGEQ = 328, tLEQ = 329,
  tANDOP = 330, tOROP = 331, tMATCH = 332, tNMATCH = 333,
  tDOT2 = 334, tDOT3 = 335, tAREF = 336, tASET = 337,
  tLSHFT = 338, tRSHFT = 339, tCOLON2 = 340, tCOLON3 = 341,
  tOP_ASGN = 342, tASSOC = 343, tLPAREN = 344, tLPAREN_ARG = 345,
  tRPAREN = 346, tLBRACK = 347, tLBRACE = 348, tLBRACE_ARG = 349,
  tSTAR = 350, tAMPER = 351, tLAMBDA = 352, tSYMBEG = 353,
  tSTRING_BEG = 354, tXSTRING_BEG = 355, tREGEXP_BEG = 356, tWORDS_BEG = 357,
  tQWORDS_BEG = 358, tSTRING_DBEG = 359, tSTRING_DVAR = 360, tSTRING_END = 361,
  tLAMBEG = 362, tLOWEST = 363, tUMINUS_NUM = 364, idNULL = 365,
  idRespond_to = 366, idIFUNC = 367, idCFUNC = 368, id_core_set_method_alias = 369,
  id_core_set_variable_alias = 370, id_core_undef_method = 371, id_core_define_method = 372, id_core_define_singleton_method = 373,
  id_core_set_postexe = 374, tLAST_TOKEN = 375
}
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

static int vtable_size (const struct vtable *tbl)
static struct vtablevtable_alloc (struct vtable *prev)
static void vtable_free (struct vtable *tbl)
static void vtable_add (struct vtable *tbl, ID id)
static int vtable_included (const struct vtable *tbl, ID id)
static int parser_yyerror (struct parser_params *, const char *)
static int yylex (void *, void *)
static ID ripper_get_id (VALUE)
static VALUE ripper_get_value (VALUE)
static VALUE assignable_gen (struct parser_params *, VALUE)
static int id_is_var_gen (struct parser_params *parser, ID id)
static ID formal_argument_gen (struct parser_params *, ID)
static ID shadowing_lvar_gen (struct parser_params *, ID)
static void new_bv_gen (struct parser_params *, ID)
static void local_push_gen (struct parser_params *, int)
static void local_pop_gen (struct parser_params *)
static int local_var_gen (struct parser_params *, ID)
static int arg_var_gen (struct parser_params *, ID)
static int local_id_gen (struct parser_params *, ID)
static ID internal_id_gen (struct parser_params *)
static struct vtabledyna_push_gen (struct parser_params *)
static void dyna_pop_gen (struct parser_params *, const struct vtable *)
static int dyna_in_block_gen (struct parser_params *)
static int dvar_defined_gen (struct parser_params *, ID, int)
static int dvar_curr_gen (struct parser_params *, ID)
static int lvar_defined_gen (struct parser_params *, ID)
static VALUE ripper_dispatch0 (struct parser_params *, ID)
static VALUE ripper_dispatch1 (struct parser_params *, ID, VALUE)
static VALUE ripper_dispatch2 (struct parser_params *, ID, VALUE, VALUE)
static VALUE ripper_dispatch3 (struct parser_params *, ID, VALUE, VALUE, VALUE)
static VALUE ripper_dispatch4 (struct parser_params *, ID, VALUE, VALUE, VALUE, VALUE)
static VALUE ripper_dispatch5 (struct parser_params *, ID, VALUE, VALUE, VALUE, VALUE, VALUE)
static VALUE ripper_id2sym (ID)
static void ripper_warn0 (struct parser_params *, const char *)
static void ripper_warnI (struct parser_params *, const char *, int)
static void ripper_warning0 (struct parser_params *, const char *)
static void ripper_warningS (struct parser_params *, const char *, const char *)
static void ripper_compile_error (struct parser_params *, const char *fmt,...)
static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep, struct parser_params *parser)
static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep, struct parser_params *parser)
static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser)
static YYSIZE_T yystrlen (char *yystr) const
static char * yystpcpy (char *yydest, const char *yysrc)
static YYSIZE_T yytnamerr (char *yyres, const char *yystr)
static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
static void yydestruct (char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser) const
int yyparse ()
int yyparse (void *YYPARSE_PARAM)
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 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 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 void warn_unused_var (struct parser_params *parser, struct local_vars *local)
static void dyna_pop_1 (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 const char * keyword_id_to_str (ID id)
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

static ID ripper_id_gets
static const yytype_uint8 yytranslate []
static const yytype_uint16 yyprhs []
static const yytype_int16 yyrhs []
static const yytype_uint16 yyrline []
static const char *const yytname []
static const yytype_uint16 yyr1 []
static const yytype_uint8 yyr2 []
static const yytype_uint16 yydefact []
static const yytype_int16 yydefgoto []
static const yytype_int16 yypact []
static const yytype_int16 yypgoto []
static const yytype_int16 yytable []
static const yytype_int16 yycheck []
static const yytype_uint16 yystos []
static 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 12889 of file parse.c.

#define arg_add ( l,
 )     dispatch2(args_add, (l), (a))

Definition at line 583 of file parse.c.

#define arg_add_assocs ( l,
 )     arg_add((l), bare_assoc(b))

Definition at line 588 of file parse.c.

#define arg_add_block ( l,
 )     dispatch2(args_add_block, (l), (b))

Definition at line 585 of file parse.c.

#define arg_add_optblock ( l,
 )     ((b)==Qundef? (l) : dispatch2(args_add_block, (l), (b)))

Definition at line 586 of file parse.c.

#define arg_add_star ( l,
 )     dispatch2(args_add_star, (l), (a))

Definition at line 584 of file parse.c.

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

Definition at line 12550 of file parse.c.

 
#define arg_new (  )     dispatch0(args_new)

Definition at line 582 of file parse.c.

#define arg_var ( id   )     arg_var_gen(parser, (id))

Definition at line 508 of file parse.c.

#define args2mrhs (  )     dispatch1(mrhs_new_from_args, (a))

Definition at line 590 of file parse.c.

#define assignable ( lhs,
node   )     assignable_gen(parser, (lhs))

Definition at line 489 of file parse.c.

#define assignable_result (  )     get_value(lhs)
#define bare_assoc (  )     dispatch1(bare_assoc_hash, (v))

Definition at line 587 of file parse.c.

#define BITSTACK_LEXPOP ( stack   )     ((stack) = ((stack) >> 1) | ((stack) & 1))

Definition at line 138 of file parse.c.

#define BITSTACK_POP ( stack   )     ((stack) = (stack) >> 1)

Definition at line 137 of file parse.c.

#define BITSTACK_PUSH ( stack,
 )     ((stack) = ((stack)<<1)|((n)&1))

Definition at line 136 of file parse.c.

#define BITSTACK_SET_P ( stack   )     ((stack)&1)

Definition at line 139 of file parse.c.

#define blockvar_add_block ( l,
 )     dispatch2(block_var_add_block, (l), (a))

Definition at line 604 of file parse.c.

#define blockvar_add_star ( l,
 )     dispatch2(block_var_add_star, (l), (a))

Definition at line 603 of file parse.c.

#define blockvar_new ( p,
 )     dispatch2(block_var, (p), (v))

Definition at line 602 of file parse.c.

#define calloc   YYCALLOC

Definition at line 96 of file parse.c.

#define class_nest   (parser->parser_class_nest)

Definition at line 343 of file parse.c.

 
#define CMDARG_LEXPOP (  )     BITSTACK_LEXPOP(cmdarg_stack)

Definition at line 148 of file parse.c.

 
#define CMDARG_P (  )     BITSTACK_SET_P(cmdarg_stack)

Definition at line 149 of file parse.c.

 
#define CMDARG_POP (  )     BITSTACK_POP(cmdarg_stack)

Definition at line 147 of file parse.c.

#define CMDARG_PUSH (  )     BITSTACK_PUSH(cmdarg_stack, (n))

Definition at line 146 of file parse.c.

#define cmdarg_stack   (parser->parser_cmdarg_stack)

Definition at line 342 of file parse.c.

#define command_start   (parser->parser_command_start)

Definition at line 361 of file parse.c.

#define compile_error   ripper_compile_error

Definition at line 646 of file parse.c.

#define compile_for_eval   (parser->parser_compile_for_eval)

Definition at line 348 of file parse.c.

 
#define COND_LEXPOP (  )     BITSTACK_LEXPOP(cond_stack)

Definition at line 143 of file parse.c.

 
#define COND_P (  )     BITSTACK_SET_P(cond_stack)

Definition at line 144 of file parse.c.

 
#define COND_POP (  )     BITSTACK_POP(cond_stack)

Definition at line 142 of file parse.c.

#define COND_PUSH (  )     BITSTACK_PUSH(cond_stack, (n))

Definition at line 141 of file parse.c.

#define cond_stack   (parser->parser_cond_stack)

Definition at line 341 of file parse.c.

#define cur_mid   (parser->parser_cur_mid)

Definition at line 349 of file parse.c.

#define current_enc   (parser->enc)

Definition at line 369 of file parse.c.

#define deferred_nodes   (parser->parser_deferred_nodes)

Definition at line 362 of file parse.c.

#define dispatch0 (  )     ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n))

Definition at line 566 of file parse.c.

#define dispatch1 ( n,
 )     ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), (a))

Definition at line 567 of file parse.c.

#define dispatch2 ( n,
a,
 )     ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), (a), (b))

Definition at line 568 of file parse.c.

#define dispatch3 ( n,
a,
b,
 )     ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c))

Definition at line 569 of file parse.c.

#define dispatch4 ( n,
a,
b,
c,
 )     ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d))

Definition at line 570 of file parse.c.

#define dispatch5 ( n,
a,
b,
c,
d,
 )     ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e))

Definition at line 571 of file parse.c.

 
#define dispatch_heredoc_end (  )     ripper_dispatch_heredoc_end(parser)

Definition at line 12433 of file parse.c.

#define dvar_curr ( id   )     dvar_curr_gen(parser, (id))

Definition at line 525 of file parse.c.

#define dvar_defined ( id   )     dvar_defined_gen(parser, (id), 0)

Definition at line 522 of file parse.c.

#define dvar_defined_get ( id   )     dvar_defined_gen(parser, (id), 1)

Definition at line 523 of file parse.c.

#define DVARS_INHERIT   ((void*)1)

Definition at line 166 of file parse.c.

#define DVARS_SPECIAL_P ( tbl   )     (!POINTER_P(tbl))

Definition at line 168 of file parse.c.

#define DVARS_TOPSCOPE   NULL

Definition at line 167 of file parse.c.

 
#define dyna_in_block (  )     dyna_in_block_gen(parser)

Definition at line 519 of file parse.c.

#define dyna_pop ( node   )     dyna_pop_gen(parser, (node))

Definition at line 517 of file parse.c.

 
#define dyna_push (  )     dyna_push_gen(parser)

Definition at line 515 of file parse.c.

#define dyna_var ( id   )     local_var(id)

Definition at line 520 of file parse.c.

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

Definition at line 333 of file parse.c.

#define ESCAPE_CONTROL   1

Definition at line 11819 of file parse.c.

#define ESCAPE_META   2

Definition at line 11820 of file parse.c.

#define escape_Qundef (  )     ((x)==Qundef ? Qnil : (x))

Definition at line 610 of file parse.c.

#define FIXME   0

Definition at line 612 of file parse.c.

#define flush_string_content ( enc   )     ripper_flush_string_content(parser, (enc))

Definition at line 12201 of file parse.c.

#define formal_argument ( id   )     formal_argument_gen(parser, (id))

Definition at line 495 of file parse.c.

#define free   YYFREE

Definition at line 97 of file parse.c.

#define get_id ( id   )     ripper_get_id(id)

Definition at line 485 of file parse.c.

#define get_value ( val   )     ripper_get_value(val)

Definition at line 487 of file parse.c.

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

Definition at line 11106 of file parse.c.

#define heredoc_end   (parser->parser_heredoc_end)

Definition at line 360 of file parse.c.

 
#define heredoc_identifier (  )     parser_heredoc_identifier(parser)

Definition at line 11107 of file parse.c.

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

Definition at line 11108 of file parse.c.

#define id_is_var ( id   )     id_is_var_gen(parser, (id))

Definition at line 491 of file parse.c.

#define ifndef_ripper (  ) 

Definition at line 619 of file parse.c.

#define in_def   (parser->parser_in_def)

Definition at line 347 of file parse.c.

#define in_defined   (parser->parser_in_defined)

Definition at line 350 of file parse.c.

#define in_single   (parser->parser_in_single)

Definition at line 346 of file parse.c.

 
#define internal_id (  )     internal_id_gen(parser)

Definition at line 512 of file parse.c.

 
#define IS_ARG (  )     (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG)

Definition at line 12877 of file parse.c.

#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))

Definition at line 114 of file parse.c.

#define is_attrset_id ( id   )     (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)

Definition at line 109 of file parse.c.

 
#define IS_BEG (  )     (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS)

Definition at line 12879 of file parse.c.

#define is_class_id ( id   )     (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)

Definition at line 111 of file parse.c.

#define is_const_id ( id   )     (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)

Definition at line 110 of file parse.c.

 
#define IS_END (  )     (lex_state == EXPR_END || lex_state == EXPR_ENDARG || lex_state == EXPR_ENDFN)

Definition at line 12878 of file parse.c.

#define is_global_id ( id   )     (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)

Definition at line 107 of file parse.c.

#define is_identchar ( p,
e,
enc   )     (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p)))

Definition at line 11205 of file parse.c.

#define is_instance_id ( id   )     (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)

Definition at line 108 of file parse.c.

#define is_junk_id ( id   )     (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)

Definition at line 112 of file parse.c.

 
#define IS_LABEL_POSSIBLE (  )     ((lex_state == EXPR_BEG && !cmd_state) || IS_ARG())

Definition at line 12881 of file parse.c.

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

Definition at line 12882 of file parse.c.

#define is_local_id ( id   )     (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)

Definition at line 106 of file parse.c.

#define is_notop_id ( id   )     ((id)>tLAST_TOKEN)

Definition at line 105 of file parse.c.

#define IS_SPCARG (  )     (IS_ARG() && space_seen && !ISSPACE(c))

Definition at line 12880 of file parse.c.

 
#define lex_eol_p (  )     (lex_p >= lex_pend)

Definition at line 11617 of file parse.c.

#define lex_gets   (parser->parser_lex_gets)

Definition at line 364 of file parse.c.

#define lex_gets_ptr   (parser->parser_lex_gets_ptr)

Definition at line 363 of file parse.c.

#define lex_goto_eol ( parser   )     ((parser)->parser_lex_p = (parser)->parser_lex_pend)

Definition at line 11616 of file parse.c.

#define lex_input   (parser->parser_lex_input)

Definition at line 354 of file parse.c.

#define lex_lastline   (parser->parser_lex_lastline)

Definition at line 355 of file parse.c.

#define lex_nextline   (parser->parser_lex_nextline)

Definition at line 356 of file parse.c.

#define lex_p   (parser->parser_lex_p)

Definition at line 358 of file parse.c.

#define lex_pbeg   (parser->parser_lex_pbeg)

Definition at line 357 of file parse.c.

#define lex_pend   (parser->parser_lex_pend)

Definition at line 359 of file parse.c.

#define lex_state   (parser->parser_lex_state)

Definition at line 340 of file parse.c.

#define lex_strterm   (parser->parser_lex_strterm)

Definition at line 339 of file parse.c.

#define local_id ( id   )     local_id_gen(parser, (id))

Definition at line 510 of file parse.c.

 
#define local_pop (  )     local_pop_gen(parser)

Definition at line 504 of file parse.c.

#define local_push ( top   )     local_push_gen(parser,(top))

Definition at line 502 of file parse.c.

#define local_var ( id   )     local_var_gen(parser, (id));

Definition at line 506 of file parse.c.

#define lpar_beg   (parser->parser_lpar_beg)

Definition at line 345 of file parse.c.

#define lvar_defined ( id   )     lvar_defined_gen(parser, (id))

Definition at line 528 of file parse.c.

#define LVAR_USED   ((int)1 << (sizeof(int) * CHAR_BIT - 1))

Definition at line 14664 of file parse.c.

#define lvtbl   (parser->parser_lvtbl)

Definition at line 365 of file parse.c.

#define malloc   YYMALLOC

Definition at line 94 of file parse.c.

#define method_add_block ( m,
 )     dispatch2(method_add_block, (m), (b))

Definition at line 608 of file parse.c.

#define method_arg ( m,
 )     dispatch2(method_add_arg,(m),(a))

Definition at line 607 of file parse.c.

#define method_optarg ( m,
 )     ((a)==Qundef ? (m) : dispatch2(method_add_arg,(m),(a)))

Definition at line 606 of file parse.c.

#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))

Definition at line 596 of file parse.c.

#define mlhs_add_star ( l,
 )     dispatch2(mlhs_add_star, (l), (a))

Definition at line 597 of file parse.c.

 
#define mlhs_new (  )     dispatch0(mlhs_new)

Definition at line 595 of file parse.c.

#define mrhs_add ( l,
 )     dispatch2(mrhs_add, (l), (a))

Definition at line 592 of file parse.c.

#define mrhs_add_star ( l,
 )     dispatch2(mrhs_add_star, (l), (a))

Definition at line 593 of file parse.c.

 
#define mrhs_new (  )     dispatch0(mrhs_new)

Definition at line 591 of file parse.c.

#define nd_func   u1.id

Definition at line 541 of file parse.c.

#define nd_nest   u3.cnt

Definition at line 548 of file parse.c.

#define nd_paren ( node   )     (char)((node)->u2.id >> CHAR_BIT*2)

Definition at line 547 of file parse.c.

#define nd_term ( node   )     SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)

Definition at line 545 of file parse.c.

#define new_bv ( id   )     new_bv_gen(parser, (id))

Definition at line 499 of file parse.c.

#define NEW_STRTERM ( func,
term,
paren   )     rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)

Definition at line 12184 of file parse.c.

 
#define newtok (  )     parser_newtok(parser)

Definition at line 11096 of file parse.c.

 
#define nextc (  )     parser_nextc(parser)

Definition at line 11094 of file parse.c.

 
#define no_digits (  )     do {yyerror("numeric literal without digits"); return 0;} while (0)
#define NODE_HEREDOC   NODE_ARRAY

Definition at line 539 of file parse.c.

#define NODE_STRTERM   NODE_ZARRAY

Definition at line 538 of file parse.c.

#define numberof ( array   )     (int)(sizeof(array) / sizeof((array)[0]))

Definition at line 88 of file parse.c.

#define params_new ( pars,
opts,
rest,
pars2,
blk   )     dispatch5(params, (pars), (opts), (rest), (pars2), (blk))

Definition at line 599 of file parse.c.

#define paren_nest   (parser->parser_paren_nest)

Definition at line 344 of file parse.c.

#define parse_string (  )     parser_parse_string(parser,(n))

Definition at line 11104 of file parse.c.

#define PARSER_ARG   parser,

Definition at line 647 of file parse.c.

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

Definition at line 11202 of file parse.c.

#define parser_free   ripper_parser_free

Definition at line 16393 of file parse.c.

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

Definition at line 11206 of file parse.c.

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

Definition at line 11208 of file parse.c.

#define parser_mark   ripper_parser_mark

Definition at line 16392 of file parse.c.

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

Definition at line 11203 of file parse.c.

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

Definition at line 11204 of file parse.c.

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

Definition at line 11618 of file parse.c.

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

Definition at line 11619 of file parse.c.

#define POINTER_P ( val   )     ((VALUE)(val) & ~(VALUE)3)

Definition at line 169 of file parse.c.

#define pushback (  )     parser_pushback(parser, (c))

Definition at line 11095 of file parse.c.

#define rb_compile_error   ripper_compile_error

Definition at line 645 of file parse.c.

#define rb_dvar_defined ( id   )     0

Definition at line 482 of file parse.c.

#define rb_local_defined ( id   )     0

Definition at line 483 of file parse.c.

#define rb_warn0 ( fmt   )     ripper_warn0(parser, (fmt))

Definition at line 629 of file parse.c.

#define rb_warnI ( fmt,
 )     ripper_warnI(parser, (fmt), (a))

Definition at line 630 of file parse.c.

#define rb_warning0 ( fmt   )     ripper_warning0(parser, (fmt))

Definition at line 632 of file parse.c.

#define rb_warningS ( fmt,
 )     ripper_warningS(parser, (fmt), (a))

Definition at line 633 of file parse.c.

#define rb_warnS ( fmt,
 )     ripper_warnS(parser, (fmt), (a))

Definition at line 631 of file parse.c.

#define RE_OPTION_ARG_ENCODING_NONE   32

Definition at line 536 of file parse.c.

#define RE_OPTION_ENCODING (  )     (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)

Definition at line 532 of file parse.c.

#define RE_OPTION_ENCODING_IDX (  )     (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)

Definition at line 533 of file parse.c.

#define RE_OPTION_ENCODING_NONE (  )     ((o)&RE_OPTION_ARG_ENCODING_NONE)

Definition at line 534 of file parse.c.

#define RE_OPTION_ENCODING_SHIFT   8

Definition at line 531 of file parse.c.

#define RE_OPTION_MASK   0xff

Definition at line 535 of file parse.c.

#define RE_OPTION_ONCE   (1<<16)

Definition at line 530 of file parse.c.

#define read_escape ( flags,
 )     parser_read_escape(parser, (flags), (e))

Definition at line 11100 of file parse.c.

#define realloc   YYREALLOC

Definition at line 95 of file parse.c.

 
#define regx_options (  )     parser_regx_options(parser)

Definition at line 11102 of file parse.c.

#define remove_begin ( node   )     (node)

Definition at line 481 of file parse.c.

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

Definition at line 11137 of file parse.c.

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

Definition at line 16905 of file parse.c.

#define ripper_intern (  )     ID2SYM(rb_intern(s))

Definition at line 575 of file parse.c.

#define RIPPER_VERSION   "0.1.0"

Definition at line 553 of file parse.c.

#define ruby__end__seen   (parser->parser_ruby__end__seen)

Definition at line 366 of file parse.c.

#define ruby_sourcefile   (parser->parser_ruby_sourcefile)

Definition at line 368 of file parse.c.

#define ruby_sourceline   (parser->parser_ruby_sourceline)

Definition at line 367 of file parse.c.

#define set_yylval_id (  )     (void)(x)

Definition at line 11127 of file parse.c.

#define set_yylval_literal (  )     (void)(x)

Definition at line 11129 of file parse.c.

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

Definition at line 11128 of file parse.c.

#define set_yylval_node (  )     (void)(x)

Definition at line 11130 of file parse.c.

#define set_yylval_num (  )     (void)(x)

Definition at line 11126 of file parse.c.

#define set_yylval_str (  )     (void)(x)

Definition at line 11125 of file parse.c.

#define shadowing_lvar ( name   )     shadowing_lvar_gen(parser, (name))

Definition at line 497 of file parse.c.

#define SIGN_EXTEND ( x,
 )     (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1))

Definition at line 540 of file parse.c.

#define SIGN_EXTEND_CHAR (  )     ((((unsigned char)(c)) ^ 128) - 128)

Definition at line 11199 of file parse.c.

#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 11581 of file parse.c.

#define STR_FUNC_EXPAND   0x02

Definition at line 11582 of file parse.c.

#define STR_FUNC_INDENT   0x20

Definition at line 11586 of file parse.c.

#define STR_FUNC_QWORDS   0x08

Definition at line 11584 of file parse.c.

#define STR_FUNC_REGEXP   0x04

Definition at line 11583 of file parse.c.

#define STR_FUNC_SYMBOL   0x10

Definition at line 11585 of file parse.c.

#define STR_NEW ( p,
 )     rb_enc_str_new((p),(n),parser->enc)

Definition at line 329 of file parse.c.

 
#define STR_NEW0 (  )     rb_enc_str_new(0,0,parser->enc)

Definition at line 330 of file parse.c.

#define STR_NEW2 (  )     rb_enc_str_new((p),strlen(p),parser->enc)

Definition at line 331 of file parse.c.

#define STR_NEW3 ( p,
n,
e,
func   )     parser_str_new((p),(n),(e),(func),parser->enc)

Definition at line 332 of file parse.c.

 
#define tok (  )     tokenbuf

Definition at line 11690 of file parse.c.

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

Definition at line 11099 of file parse.c.

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

Definition at line 334 of file parse.c.

#define tokadd (  )     parser_tokadd(parser, (c))

Definition at line 11098 of file parse.c.

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

Definition at line 11101 of file parse.c.

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

Definition at line 12052 of file parse.c.

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

Definition at line 11103 of file parse.c.

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

Definition at line 11105 of file parse.c.

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

Definition at line 11745 of file parse.c.

#define token_info_pop ( token   ) 

Definition at line 670 of file parse.c.

#define token_info_push ( token   ) 

Definition at line 669 of file parse.c.

#define tokenbuf   (parser->parser_tokenbuf)

Definition at line 351 of file parse.c.

 
#define tokfix (  )     (tokenbuf[tokidx]='\0')

Definition at line 11689 of file parse.c.

#define tokidx   (parser->parser_tokidx)

Definition at line 352 of file parse.c.

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

Definition at line 11692 of file parse.c.

 
#define toklen (  )     tokidx

Definition at line 11691 of file parse.c.

#define toksiz   (parser->parser_toksiz)

Definition at line 353 of file parse.c.

#define tokspace (  )     parser_tokspace(parser, (n))

Definition at line 11097 of file parse.c.

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

Definition at line 327 of file parse.c.

#define validate (  )     ((x) = get_value(x))

Definition at line 16666 of file parse.c.

#define VTBL_DEBUG   0

Definition at line 182 of file parse.c.

#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 12891 of file parse.c.

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

Definition at line 11687 of file parse.c.

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

Definition at line 11109 of file parse.c.

#define YY_REDUCE_PRINT ( Rule   ) 
Value:
do {                                    \
  if (yydebug)                          \
    yy_reduce_print (yyvsp, Rule, parser); \
} while (YYID (0))

Definition at line 4433 of file parse.c.

#define YY_STACK_PRINT ( Bottom,
Top   ) 
Value:
do {                                                            \
  if (yydebug)                                                  \
    yy_stack_print ((Bottom), (Top));                           \
} while (YYID (0))

Definition at line 4394 of file parse.c.

#define YY_SYMBOL_PRINT ( Title,
Type,
Value,
Location   ) 
Value:
do {                                                                      \
  if (yydebug)                                                            \
    {                                                                     \
      YYFPRINTF (stderr, "%s ", Title);                                   \
      yy_symbol_print (stderr,                                            \
                  Type, Value, parser); \
      YYFPRINTF (stderr, "\n");                                           \
    }                                                                     \
} while (YYID (0))

Definition at line 4296 of file parse.c.

#define YYABORT   goto yyabortlab

Definition at line 4199 of file parse.c.

#define YYACCEPT   goto yyacceptlab

Definition at line 4198 of file parse.c.

#define YYBACKUP ( Token,
Value   ) 
Value:
do                                                              \
  if (yychar == YYEMPTY && yylen == 1)                          \
    {                                                           \
      yychar = (Token);                                         \
      yylval = (Value);                                         \
      YYPOPSTACK (1);                                           \
      goto yybackup;                                            \
    }                                                           \
  else                                                          \
    {                                                           \
      parser_yyerror (parser, YY_("syntax error: cannot back up")); \
      YYERROR;                                                  \
    }                                                           \
while (YYID (0))

Definition at line 4220 of file parse.c.

#define YYBISON   1

Definition at line 44 of file parse.c.

#define YYBISON_VERSION   "2.5"

Definition at line 47 of file parse.c.

#define YYCALLOC ( nelem,
size   )     rb_parser_calloc(parser, (nelem), (size))

Definition at line 92 of file parse.c.

#define YYCASE_ ( N,
S   ) 
Value:
case N:                               \
        yyformat = S;                       \
      break
#define yyclearin   (yychar = YYEMPTY)

Definition at line 4194 of file parse.c.

#define YYCOPY_NEEDED   1

Definition at line 1029 of file parse.c.

#define yydebug   (parser->parser_yydebug)

Definition at line 370 of file parse.c.

#define YYDEBUG   1

Definition at line 72 of file parse.c.

#define YYDPRINTF ( Args   ) 
Value:
do {                                            \
  if (yydebug)                                  \
    YYFPRINTF Args;                             \
} while (YYID (0))

Definition at line 4290 of file parse.c.

#define YYEMPTY   (-2)

Definition at line 4195 of file parse.c.

#define YYEOF   0

Definition at line 4196 of file parse.c.

#define YYERRCODE   256

Definition at line 4238 of file parse.c.

#define yyerrok   (yyerrstatus = 0)

Definition at line 4193 of file parse.c.

#define YYERROR   goto yyerrorlab

Definition at line 4200 of file parse.c.

#define yyerror ( msg   )     parser_yyerror(parser, (msg))

Definition at line 337 of file parse.c.

#define YYERROR_VERBOSE   1

Definition at line 685 of file parse.c.

#define YYERROR_VERBOSE   1

Definition at line 685 of file parse.c.

#define YYFAIL   goto yyerrlab

Definition at line 4210 of file parse.c.

#define YYFINAL   3

Definition at line 1070 of file parse.c.

#define YYFREE ( ptr   )     rb_parser_free(parser, (ptr))

Definition at line 93 of file parse.c.

#define YYID (  )     (n)

Definition at line 923 of file parse.c.

#define YYLAST   10748

Definition at line 1072 of file parse.c.

#define YYLEX   yylex (&yylval, YYLEX_PARAM)

Definition at line 4277 of file parse.c.

#define YYLSP_NEEDED   0

Definition at line 62 of file parse.c.

#define yylval   (*((YYSTYPE*)(parser->parser_yylval)))

Definition at line 11085 of file parse.c.

 
#define yylval_id (  )     yylval.id

Definition at line 11131 of file parse.c.

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

Definition at line 11139 of file parse.c.

#define YYMALLOC ( size   )     rb_parser_malloc(parser, (size))

Definition at line 90 of file parse.c.

#define YYMAXUTOK   375

Definition at line 1085 of file parse.c.

#define YYNNTS   174

Definition at line 1077 of file parse.c.

#define YYNRULES   573

Definition at line 1079 of file parse.c.

#define YYNSTATES   991

Definition at line 1081 of file parse.c.

#define YYNTOKENS   148

Definition at line 1075 of file parse.c.

#define YYPACT_NINF   -747

Definition at line 1791 of file parse.c.

#define yypact_value_is_default ( yystate   )     ((yystate) == (-747))

Definition at line 3002 of file parse.c.

#define yyparse   ripper_yyparse

Definition at line 573 of file parse.c.

#define YYPOPSTACK (  )     (yyvsp -= (N), yyssp -= (N))
#define YYPULL   1

Definition at line 59 of file parse.c.

#define YYPURE   1

Definition at line 53 of file parse.c.

#define YYPUSH   0

Definition at line 56 of file parse.c.

#define YYREALLOC ( ptr,
size   )     rb_parser_realloc(parser, (ptr), (size))

Definition at line 91 of file parse.c.

 
#define YYRECOVERING (  )     (!!yyerrstatus)

Definition at line 4218 of file parse.c.

#define YYRHSLOC ( Rhs,
 )     ((Rhs)[K])

Definition at line 4245 of file parse.c.

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 900 of file parse.c.

#define YYSKELETON_NAME   "yacc.c"

Definition at line 50 of file parse.c.

#define YYSTACK_BYTES (  ) 
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
      + YYSTACK_GAP_MAXIMUM)

Definition at line 1025 of file parse.c.

#define YYSTACK_FREE ( Ptr   )     do { /* empty */; } while (YYID (0))

Definition at line 969 of file parse.c.

#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)

Definition at line 1021 of file parse.c.

#define YYSTACK_RELOCATE ( Stack_alloc,
Stack   ) 
Value:
do                                                                      \
      {                                                                 \
        YYSIZE_T yynewbytes;                                            \
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
        Stack = &yyptr->Stack_alloc;                                    \
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
        yyptr += yynewbytes / sizeof (*yyptr);                          \
      }                                                                 \
    while (YYID (0))

Definition at line 1036 of file parse.c.

#define YYSTACK_USE_ALLOCA   0

Definition at line 74 of file parse.c.

#define YYSYNTAX_ERROR
Value:
yysyntax_error (&yymsg_alloc, &yymsg, \
                                        yyssp, yytoken)
#define YYTABLE_NINF   -574

Definition at line 1922 of file parse.c.

#define yytable_value_is_error ( yytable_value   )     ((yytable_value) == (-574))

Definition at line 3005 of file parse.c.

#define YYTERROR   1

Definition at line 4237 of file parse.c.

#define YYTRANSLATE ( YYX   )     ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

Definition at line 1087 of file parse.c.

#define YYUNDEFTOK   2

Definition at line 1084 of file parse.c.

#define YYUSE (  )     ((void) (e))

Definition at line 916 of file parse.c.


Typedef Documentation

typedef VALUE stack_type

Definition at line 134 of file parse.c.

typedef short int yytype_int16

Definition at line 883 of file parse.c.

typedef short int yytype_int8

Definition at line 871 of file parse.c.

typedef unsigned short int yytype_uint16

Definition at line 877 of file parse.c.

typedef unsigned char yytype_uint8

Definition at line 862 of file parse.c.


Enumeration Type Documentation

Enumerator:
EXPR_BEG 
EXPR_END 
EXPR_ENDARG 
EXPR_ENDFN 
EXPR_ARG 
EXPR_CMDARG 
EXPR_MID 
EXPR_FNAME 
EXPR_DOT 
EXPR_CLASS 
EXPR_VALUE 
EXPR_MAX_STATE 
EXPR_BEG 
EXPR_END 
EXPR_ENDARG 
EXPR_ENDFN 
EXPR_ARG 
EXPR_CMDARG 
EXPR_MID 
EXPR_FNAME 
EXPR_DOT 
EXPR_CLASS 
EXPR_VALUE 
EXPR_MAX_STATE 

Definition at line 119 of file parse.c.

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 11588 of file parse.c.

Enumerator:
keyword_class 
keyword_module 
keyword_def 
keyword_undef 
keyword_begin 
keyword_rescue 
keyword_ensure 
keyword_end 
keyword_if 
keyword_unless 
keyword_then 
keyword_elsif 
keyword_else 
keyword_case 
keyword_when 
keyword_while 
keyword_until 
keyword_for 
keyword_break 
keyword_next 
keyword_redo 
keyword_retry 
keyword_in 
keyword_do 
keyword_do_cond 
keyword_do_block 
keyword_do_LAMBDA 
keyword_return 
keyword_yield 
keyword_super 
keyword_self 
keyword_nil 
keyword_true 
keyword_false 
keyword_and 
keyword_or 
keyword_not 
modifier_if 
modifier_unless 
modifier_while 
modifier_until 
modifier_rescue 
keyword_alias 
keyword_defined 
keyword_BEGIN 
keyword_END 
keyword__LINE__ 
keyword__FILE__ 
keyword__ENCODING__ 
tIDENTIFIER 
tFID 
tGVAR 
tIVAR 
tCONSTANT 
tCVAR 
tLABEL 
tINTEGER 
tFLOAT 
tSTRING_CONTENT 
tCHAR 
tNTH_REF 
tBACK_REF 
tREGEXP_END 
tUPLUS 
tUMINUS 
tPOW 
tCMP 
tEQ 
tEQQ 
tNEQ 
tGEQ 
tLEQ 
tANDOP 
tOROP 
tMATCH 
tNMATCH 
tDOT2 
tDOT3 
tAREF 
tASET 
tLSHFT 
tRSHFT 
tCOLON2 
tCOLON3 
tOP_ASGN 
tASSOC 
tLPAREN 
tLPAREN_ARG 
tRPAREN 
tLBRACK 
tLBRACE 
tLBRACE_ARG 
tSTAR 
tAMPER 
tLAMBDA 
tSYMBEG 
tSTRING_BEG 
tXSTRING_BEG 
tREGEXP_BEG 
tWORDS_BEG 
tQWORDS_BEG 
tSTRING_DBEG 
tSTRING_DVAR 
tSTRING_END 
tLAMBEG 
tLOWEST 
tUMINUS_NUM 
idNULL 
idRespond_to 
idIFUNC 
idCFUNC 
id_core_set_method_alias 
id_core_set_variable_alias 
id_core_undef_method 
id_core_define_method 
id_core_define_singleton_method 
id_core_set_postexe 
tLAST_TOKEN 
YAML_ANCHOR 
YAML_ALIAS 
YAML_TRANSFER 
YAML_TAGURI 
YAML_ITRANSFER 
YAML_WORD 
YAML_PLAIN 
YAML_BLOCK 
YAML_DOCSEP 
YAML_IOPEN 
YAML_INDENT 
YAML_IEND 
YAML_ANCHOR 
YAML_ALIAS 
YAML_TRANSFER 
YAML_TAGURI 
YAML_ITRANSFER 
YAML_WORD 
YAML_PLAIN 
YAML_BLOCK 
YAML_DOCSEP 
YAML_IOPEN 
YAML_INDENT 
YAML_IEND 
keyword_class 
keyword_module 
keyword_def 
keyword_undef 
keyword_begin 
keyword_rescue 
keyword_ensure 
keyword_end 
keyword_if 
keyword_unless 
keyword_then 
keyword_elsif 
keyword_else 
keyword_case 
keyword_when 
keyword_while 
keyword_until 
keyword_for 
keyword_break 
keyword_next 
keyword_redo 
keyword_retry 
keyword_in 
keyword_do 
keyword_do_cond 
keyword_do_block 
keyword_do_LAMBDA 
keyword_return 
keyword_yield 
keyword_super 
keyword_self 
keyword_nil 
keyword_true 
keyword_false 
keyword_and 
keyword_or 
keyword_not 
modifier_if 
modifier_unless 
modifier_while 
modifier_until 
modifier_rescue 
keyword_alias 
keyword_defined 
keyword_BEGIN 
keyword_END 
keyword__LINE__ 
keyword__FILE__ 
keyword__ENCODING__ 
tIDENTIFIER 
tFID 
tGVAR 
tIVAR 
tCONSTANT 
tCVAR 
tLABEL 
tINTEGER 
tFLOAT 
tSTRING_CONTENT 
tCHAR 
tNTH_REF 
tBACK_REF 
tREGEXP_END 
tUPLUS 
tUMINUS 
tPOW 
tCMP 
tEQ 
tEQQ 
tNEQ 
tGEQ 
tLEQ 
tANDOP 
tOROP 
tMATCH 
tNMATCH 
tDOT2 
tDOT3 
tAREF 
tASET 
tLSHFT 
tRSHFT 
tCOLON2 
tCOLON3 
tOP_ASGN 
tASSOC 
tLPAREN 
tLPAREN_ARG 
tRPAREN 
tLBRACK 
tLBRACE 
tLBRACE_ARG 
tSTAR 
tAMPER 
tLAMBDA 
tSYMBEG 
tSTRING_BEG 
tXSTRING_BEG 
tREGEXP_BEG 
tWORDS_BEG 
tQWORDS_BEG 
tSTRING_DBEG 
tSTRING_DVAR 
tSTRING_END 
tLAMBEG 
tLOWEST 
tUMINUS_NUM 
idNULL 
idRespond_to 
idIFUNC 
idCFUNC 
id_core_set_method_alias 
id_core_set_variable_alias 
id_core_undef_method 
id_core_define_method 
id_core_define_singleton_method 
id_core_set_postexe 
tLAST_TOKEN 
keyword_class 
keyword_module 
keyword_def 
keyword_undef 
keyword_begin 
keyword_rescue 
keyword_ensure 
keyword_end 
keyword_if 
keyword_unless 
keyword_then 
keyword_elsif 
keyword_else 
keyword_case 
keyword_when 
keyword_while 
keyword_until 
keyword_for 
keyword_break 
keyword_next 
keyword_redo 
keyword_retry 
keyword_in 
keyword_do 
keyword_do_cond 
keyword_do_block 
keyword_do_LAMBDA 
keyword_return 
keyword_yield 
keyword_super 
keyword_self 
keyword_nil 
keyword_true 
keyword_false 
keyword_and 
keyword_or 
keyword_not 
modifier_if 
modifier_unless 
modifier_while 
modifier_until 
modifier_rescue 
keyword_alias 
keyword_defined 
keyword_BEGIN 
keyword_END 
keyword__LINE__ 
keyword__FILE__ 
keyword__ENCODING__ 
tIDENTIFIER 
tFID 
tGVAR 
tIVAR 
tCONSTANT 
tCVAR 
tLABEL 
tINTEGER 
tFLOAT 
tSTRING_CONTENT 
tCHAR 
tNTH_REF 
tBACK_REF 
tREGEXP_END 
tUPLUS 
tUMINUS 
tPOW 
tCMP 
tEQ 
tEQQ 
tNEQ 
tGEQ 
tLEQ 
tANDOP 
tOROP 
tMATCH 
tNMATCH 
tDOT2 
tDOT3 
tAREF 
tASET 
tLSHFT 
tRSHFT 
tCOLON2 
tCOLON3 
tOP_ASGN 
tASSOC 
tLPAREN 
tLPAREN_ARG 
tRPAREN 
tLBRACK 
tLBRACE 
tLBRACE_ARG 
tSTAR 
tAMPER 
tLAMBDA 
tSYMBEG 
tSTRING_BEG 
tXSTRING_BEG 
tREGEXP_BEG 
tWORDS_BEG 
tQWORDS_BEG 
tSTRING_DBEG 
tSTRING_DVAR 
tSTRING_END 
tLAMBEG 
tLOWEST 
tUMINUS_NUM 
idNULL 
idRespond_to 
idIFUNC 
idCFUNC 
id_core_set_method_alias 
id_core_set_variable_alias 
id_core_undef_method 
id_core_define_method 
id_core_define_singleton_method 
id_core_set_postexe 
tLAST_TOKEN 

Definition at line 701 of file parse.c.


Function Documentation

static void arg_ambiguous_gen ( struct parser_params parser  )  [static]

Definition at line 12542 of file parse.c.

References arg_ambiguous, dispatch0, and rb_warning0.

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

Definition at line 15446 of file parse.c.

References lvtbl, vtable_add(), and vtable_size().

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

Definition at line 12623 of file parse.c.

References parser_params::has_shebang, ISSPACE, lex_p, lex_pbeg, and parser_params::line_count.

Referenced by parser_yylex().

static void dispose_string ( VALUE  str  )  [static]

Definition at line 12030 of file parse.c.

References rb_gc_force_recycle(), RBASIC, RSTRING_NOEMBED, RSTRING_PTR, and xfree.

Referenced by parser_here_document(), and parser_heredoc_restore().

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

Definition at line 15571 of file parse.c.

References lvtbl, and vtable_included().

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

Definition at line 15534 of file parse.c.

References DVARS_TOPSCOPE, lvtbl, and POINTER_P.

static void dyna_pop_1 ( struct parser_params parser  )  [static]

Definition at line 15502 of file parse.c.

References lvtbl, vtable_free(), and warn_unused_var().

Referenced by dyna_pop_gen().

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

Definition at line 15520 of file parse.c.

References dyna_pop_1(), lvtbl, and xfree.

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

Definition at line 15491 of file parse.c.

References lvtbl, and vtable_alloc().

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

Definition at line 12553 of file parse.c.

References is_local_id, shadowing_lvar, and yyerror.

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

Definition at line 17085 of file parse.c.

References rb_data_type_struct::parent, and RTYPEDDATA_TYPE.

static ID internal_id_gen ( struct parser_params parser  )  [static]

Definition at line 15910 of file parse.c.

References ID_INTERNAL, ID_SCOPE_SHIFT, lvtbl, tLAST_TOKEN, and vtable_size().

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

Definition at line 12228 of file parse.c.

Referenced by parser_peek_variable_name().

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

Definition at line 16775 of file parse.c.

References kw_assoc::id, keyword_to_name, kw_assoc::name, and NULL.

Referenced by ripper_id2sym().

static VALUE lex_get_str ( struct parser_params parser,
VALUE  s 
) [static]
static VALUE lex_getline ( struct parser_params parser  )  [static]
static int local_id_gen ( struct parser_params parser,
ID  id 
) [static]
static void local_pop_gen ( struct parser_params parser  )  [static]

Definition at line 15400 of file parse.c.

References cmdarg_stack, lvtbl, vtable_free(), warn_unused_var(), and xfree.

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

Definition at line 15453 of file parse.c.

References lvtbl, ruby_sourceline, vtable_add(), and vtable_size().

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

Definition at line 12564 of file parse.c.

References dvar_defined_get, dyna_in_block, and local_id.

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

Definition at line 12683 of file parse.c.

Referenced by parser_magic_comment().

static rb_encoding* must_be_ascii_compatible ( VALUE  s  )  [static]

Definition at line 11447 of file parse.c.

References parser_params::enc, rb_eArgError, rb_enc_asciicompat, rb_enc_get(), and rb_raise().

Referenced by lex_get_str(), and lex_getline().

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

Definition at line 14691 of file parse.c.

References compile_error, dyna_var, is_local_id, PARSER_ARG, rb_id2name(), and shadowing_lvar.

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

Definition at line 12571 of file parse.c.

References rb_memcicmp().

Referenced by set_file_encoding().

static void parser_free ( void *  ptr  )  [static]
static int parser_here_document ( struct parser_params parser,
NODE *  here 
) [static]
static int parser_heredoc_identifier ( struct parser_params parser  )  [static]
static void parser_heredoc_restore ( struct parser_params parser,
NODE *  here 
) [static]
static void parser_initialize ( struct parser_params parser  )  [static]
static int parser_magic_comment ( struct parser_params parser,
const char *  str,
long  len 
) [static]

Definition at line 12716 of file parse.c.

References dispatch2, FALSE, ISSPACE, magic_comment_marker(), numberof, RSTRING_PTR, str_copy, STRNCASECMP, and TRUE.

Referenced by parser_yylex().

static void parser_mark ( void *  ptr  )  [static]
static size_t parser_memsize ( const void *  ptr  )  [static]
static char* parser_newtok ( struct parser_params parser  )  [static]

Definition at line 11695 of file parse.c.

References ALLOC_N, REALLOC_N, tokenbuf, tokidx, and toksiz.

static int parser_nextc ( struct parser_params parser  )  [inline, static]
static int parser_parse_string ( struct parser_params parser,
NODE *  quote 
) [static]
static int parser_peek_variable_name ( struct parser_params parser  )  [static]
static void parser_prepare ( struct parser_params parser  )  [static]
static void parser_pushback ( struct parser_params parser,
int  c 
) [static]

Definition at line 11678 of file parse.c.

References lex_p, and lex_pbeg.

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

Definition at line 11823 of file parse.c.

References ESCAPE_CONTROL, ESCAPE_META, ISASCII, lex_p, nextc, peek, pushback, read_escape, scan_oct, tok_hex, and yyerror.

static int parser_regx_options ( struct parser_params parser  )  [static]
static void parser_set_encode ( struct parser_params parser,
const char *  name 
) [static]
static VALUE parser_str_new ( const char *  p,
long  n,
rb_encoding enc,
int  func,
rb_encoding enc0 
) [static]
static int parser_tok_hex ( struct parser_params parser,
size_t *  numlen 
) [static]

Definition at line 11732 of file parse.c.

References lex_p, scan_hex, and yyerror.

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

Definition at line 11722 of file parse.c.

References REALLOC_N, tokenbuf, tokidx, and toksiz.

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

Definition at line 11921 of file parse.c.

References ESCAPE_CONTROL, ESCAPE_META, lex_p, nextc, pushback, ruby_scan_oct(), tok_hex, tokadd, tokcopy, and yyerror.

static int parser_tokadd_mbchar ( struct parser_params parser,
int  c 
) [static]
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 11748 of file parse.c.

References lex_p, nextc, peek, scan_hex, tokadd, tokaddmbc, tokcopy, UTF8_ENC, and yyerror.

Referenced by parser_tokadd_string(), and parser_yylex().

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

Definition at line 11914 of file parse.c.

References rb_enc_codelen(), rb_enc_mbcput, and tokspace.

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

Definition at line 11710 of file parse.c.

References REALLOC_N, tokenbuf, tokidx, and toksiz.

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

Definition at line 12409 of file parse.c.

References FALSE, ISSPACE, lex_pbeg, and lex_pend.

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

Definition at line 12899 of file parse.c.

References arg_ambiguous, CMDARG_LEXPOP, CMDARG_P, CMDARG_PUSH, command_start, comment_at_top(), compile_error, COND_LEXPOP, COND_P, COND_PUSH, DBL2NUM, parser_params::enc, ENC_CODERANGE_7BIT, ENC_CODERANGE_UNKNOWN, ENC_SINGLE, parser_params::eofp, errno, EXPR_ARG, EXPR_BEG, EXPR_CLASS, EXPR_CMDARG, EXPR_DOT, EXPR_END, EXPR_ENDARG, EXPR_ENDFN, EXPR_FNAME, EXPR_VALUE, FALSE, here_document, heredoc_identifier, kwtable::id, INT2FIX, IS_ARG, IS_BEG, IS_END, is_identchar, IS_LABEL_POSSIBLE, IS_LABEL_SUFFIX, is_local_id, IS_SPCARG, ISALNUM, ISASCII, ISDIGIT, ISSPACE, ISUPPER, ISXDIGIT, k__END__, keyword_do, keyword_do_block, keyword_do_cond, keyword_do_LAMBDA, lex_eol_p, lex_goto_eol, lex_lastline, lex_nextline, lex_p, lex_pend, lex_state, lex_strterm, lpar_beg, lvar_defined, kwtable::name, nd_type, NEW_BACK_REF, NEW_NTH_REF, NEW_STRTERM, newtok, nextc, no_digits, NODE_HEREDOC, paren_nest, parse_string, PARSER_ARG, parser_is_identchar, parser_isascii, parser_magic_comment(), parser_tokadd_utf8(), peek, peek_n, pushback, Qtrue, rb_compile_error, rb_cstr_to_inum(), rb_enc_isalnum, rb_enc_isspace, rb_gc_force_recycle(), rb_intern, rb_reserved_word(), rb_warnI, rb_warning0, rb_warningS, read_escape, result, ripper_dispatch_scan_event(), ruby__end__seen, ruby_sourceline, set_file_encoding(), set_yylval_id, set_yylval_literal, set_yylval_name, set_yylval_node, set_yylval_str, snprintf, kwtable::state, str_dquote, str_dsym, str_dword, STR_NEW3, str_regexp, str_squote, str_ssym, str_sword, str_xquote, strtod, tAMPER, tANDOP, tAREF, tASET, tASSOC, tBACK_REF, tCHAR, tCMP, tCOLON2, tCOLON3, tCOMMENT, tCONSTANT, tCVAR, tDOT2, tDOT3, tEMBDOC, tEMBDOC_BEG, tEMBDOC_END, tEQ, tEQQ, term, tFID, tFLOAT, tGEQ, tGVAR, tIDENTIFIER, tIGNORED_NL, tINTEGER, tIVAR, tLABEL, tLAMBDA, tLAMBEG, tLBRACE, tLBRACE_ARG, tLBRACK, tLEQ, tLPAREN, tLPAREN_ARG, tLSHFT, tMATCH, tNEQ, tNMATCH, tNTH_REF, tok, TOK_INTERN, tokadd, tokadd_mbchar, tokaddmbc, tokfix, tokidx, toklast, toklen, parser_params::tokp, tOP_ASGN, tOROP, tPOW, tQWORDS_BEG, tREGEXP_BEG, tREGEXP_END, tRSHFT, TRUE, tSP, tSTAR, tSTRING_BEG, tSTRING_END, tSYMBEG, tUMINUS, tUMINUS_NUM, tUPLUS, tWORDS_BEG, tXSTRING_BEG, warn_balanced, was_bol, whole_match_p, and yyerror.

Referenced by yylex().

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

Definition at line 16840 of file parse.c.

References args, rb_funcall(), rb_intern, rb_vsprintf(), and parser_params::value.

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

Definition at line 16669 of file parse.c.

References rb_funcall(), and parser_params::value.

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

Definition at line 16675 of file parse.c.

References rb_funcall(), validate, and parser_params::value.

Referenced by ripper_dispatch_delayed_token(), and ripper_scan_event_val().

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

Definition at line 16682 of file parse.c.

References rb_funcall(), validate, and parser_params::value.

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

Definition at line 16690 of file parse.c.

References rb_funcall(), validate, and parser_params::value.

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

Definition at line 16699 of file parse.c.

References rb_funcall(), validate, and parser_params::value.

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

Definition at line 16709 of file parse.c.

References rb_funcall(), validate, and parser_params::value.

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

Definition at line 11166 of file parse.c.

References ripper_has_scan_event(), and ripper_scan_event_val().

Referenced by ripper_dispatch_heredoc_end().

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

Definition at line 16967 of file parse.c.

References parser_params::parsing_thread, Qnil, and TypedData_Get_Struct.

Referenced by ripper_parse().

static VALUE ripper_filename ( VALUE  self  )  [static]
static void ripper_flush_string_content ( struct parser_params parser,
rb_encoding enc 
) [static]
static ID ripper_get_id ( VALUE  v  )  [static]

Definition at line 16819 of file parse.c.

References nd_type, NODE_LASGN, RB_TYPE_P, and T_NODE.

static VALUE ripper_get_value ( VALUE  v  )  [static]

Definition at line 16829 of file parse.c.

References nd_type, NODE_LASGN, Qnil, Qundef, RB_TYPE_P, and T_NODE.

static int ripper_has_scan_event ( struct parser_params parser  )  [static]
static VALUE ripper_id2sym ( ID  id  )  [static]

Definition at line 16788 of file parse.c.

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

static VALUE ripper_initialize ( int  argc,
VALUE argv,
VALUE  self 
) [static]
static VALUE ripper_lex_get_generic ( struct parser_params parser,
VALUE  src 
) [static]

Definition at line 16887 of file parse.c.

References rb_funcall(), and ripper_id_gets.

Referenced by ripper_initialize().

static VALUE ripper_lineno ( VALUE  self  )  [static]
static VALUE ripper_parse ( VALUE  self  )  [static]
static VALUE ripper_parse0 ( VALUE  parser_v  )  [static]

Definition at line 16956 of file parse.c.

References parser_prepare(), and TypedData_Get_Struct.

Referenced by ripper_parse().

static VALUE ripper_s_allocate ( VALUE  klass  )  [static]

Definition at line 16893 of file parse.c.

References ALLOC_N, MEMZERO, TypedData_Wrap_Struct, and parser_params::value.

Referenced by Init_ripper().

static VALUE ripper_scan_event_val ( struct parser_params parser,
int  t 
) [static]
static void ripper_warn0 ( struct parser_params parser,
const char *  fmt 
) [static]

Definition at line 16852 of file parse.c.

References rb_funcall(), rb_intern, STR_NEW2, and parser_params::value.

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

Definition at line 16858 of file parse.c.

References INT2NUM(), rb_funcall(), rb_intern, STR_NEW2, and parser_params::value.

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

Definition at line 16874 of file parse.c.

References rb_funcall(), rb_intern, STR_NEW2, and parser_params::value.

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

Definition at line 16880 of file parse.c.

References rb_funcall(), rb_intern, STR_NEW2, and parser_params::value.

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

Definition at line 11121 of file parse.c.

References ID2SYM, and NEW_LASGN.

static void set_file_encoding ( struct parser_params parser,
const char *  str,
const char *  send 
) [static]
static ID shadowing_lvar_gen ( struct parser_params parser,
ID  name 
) [static]
static void vtable_add ( struct vtable tbl,
ID  id 
) [static]

Definition at line 209 of file parse.c.

References POINTER_P, rb_bug(), rb_id2name(), REALLOC_N, and VTBL_DEBUG.

Referenced by arg_var_gen(), local_var_gen(), and shadowing_lvar_gen().

static struct vtable* vtable_alloc ( struct vtable prev  )  [static, read]

Definition at line 185 of file parse.c.

References ALLOC, ALLOC_N, vtable::capa, vtable::pos, vtable::prev, vtable::tbl, and VTBL_DEBUG.

Referenced by dyna_push_gen(), and local_push_gen().

static void vtable_free ( struct vtable tbl  )  [static]

Definition at line 197 of file parse.c.

References POINTER_P, VTBL_DEBUG, and xfree.

Referenced by dyna_pop_1(), and local_pop_gen().

static int vtable_included ( const struct vtable tbl,
ID  id 
) [static]

Definition at line 224 of file parse.c.

References POINTER_P, vtable::pos, and vtable::tbl.

Referenced by dvar_curr_gen(), dvar_defined_gen(), and local_id_gen().

static int vtable_size ( const struct vtable tbl  )  [static]

Definition at line 172 of file parse.c.

References POINTER_P, and vtable::pos.

Referenced by arg_var_gen(), internal_id_gen(), and local_var_gen().

static void warn_unused_var ( struct parser_params parser,
struct local_vars local 
) [static]
static void yy_reduce_print ( YYSTYPE yyvsp,
int  yyrule,
struct parser_params parser 
) [static]

Definition at line 4411 of file parse.c.

References yy_symbol_print(), and YYFPRINTF.

static void yy_stack_print ( yytype_int16 yybottom,
yytype_int16 yytop 
) [static]

Definition at line 4380 of file parse.c.

References YYFPRINTF.

static void yy_symbol_print ( FILE yyoutput,
int  yytype,
YYSTYPE const * const  yyvaluep,
struct parser_params parser 
) [static]

Definition at line 4353 of file parse.c.

References yy_symbol_value_print(), YYFPRINTF, and YYNTOKENS.

Referenced by yy_reduce_print().

static void yy_symbol_value_print ( FILE yyoutput,
int  yytype,
YYSTYPE const * const  yyvaluep,
struct parser_params parser 
) [static]

Definition at line 4319 of file parse.c.

References YYNTOKENS, and YYUSE.

Referenced by yy_symbol_print().

static void yydestruct ( char *  yymsg,
int  yytype,
YYSTYPE yyvaluep,
struct parser_params parser 
) const [static]

Definition at line 4718 of file parse.c.

References YY_SYMBOL_PRINT, and YYUSE.

Referenced by yyparse().

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

Definition at line 4768 of file parse.c.

References ALLOC_N, arg_var, args, assignable, buf, CMDARG_PUSH, cmdarg_stack, command_start, compile_error, compile_for_eval, COND_POP, COND_PUSH, cond_stack, cur_mid, deferred_nodes, dyna_in_block, dyna_pop, dyna_push, EXPR_BEG, EXPR_END, EXPR_ENDARG, EXPR_ENDFN, EXPR_FNAME, FIXNUM_P, fixpos(), formal_argument, get_id, YYSTYPE::id, ID2SYM, ifndef_ripper, in_def, in_defined, in_single, INT2FIX, internal_id, is_asgn_or_id, is_local_id, keyword__ENCODING__, keyword__FILE__, keyword__LINE__, keyword_false, keyword_nil, keyword_self, keyword_true, lex_state, lex_strterm, list, local_id, local_pop, local_push, lpar_beg, nd_aid, nd_args, nd_body, nd_iter, nd_lit, nd_next, nd_plen, nd_set_line, nd_set_type, nd_type, nd_value, nd_vid, NEW_ALIAS, NEW_ARGS_AUX, NEW_ARGSCAT, NEW_BEGIN, NEW_BLOCK_PASS, NEW_BREAK, new_bv, NEW_CALL, NEW_CASE, NEW_CDECL, NEW_CLASS, NEW_COLON2, NEW_COLON3, NEW_CVAR, NEW_DASGN_CURR, NEW_DEFINED, NEW_DEFN, NEW_DEFS, NEW_DOT2, NEW_DOT3, NEW_DSTR, NEW_DVAR, NEW_ENSURE, NEW_ERRINFO, NEW_EVSTR, NEW_FCALL, NEW_FOR, NEW_GVAR, NEW_HASH, NEW_IF, NEW_ITER, NEW_IVAR, NEW_LAMBDA, NEW_LIST, NEW_LIT, NEW_LVAR, NEW_MASGN, NEW_MODULE, NEW_NEXT, NEW_NIL, NEW_NODE, NEW_OP_ASGN1, NEW_OP_ASGN2, NEW_OP_ASGN_AND, NEW_OP_ASGN_OR, NEW_OPT_ARG, NEW_POSTARG, NEW_POSTEXE, NEW_REDO, NEW_RESBODY, NEW_RESCUE, NEW_RETRY, NEW_RETURN, NEW_SCLASS, NEW_SCOPE, NEW_SPLAT, NEW_STR, NEW_SUPER, NEW_UNDEF, NEW_UNLESS, NEW_UNTIL, NEW_VALIAS, NEW_WHEN, NEW_WHILE, NEW_XSTR, NEW_YIELD, NEW_ZARRAY, NEW_ZSUPER, NIL_P, YYSTYPE::node, node, NODE_AND, NODE_ARRAY, NODE_BEGIN, NODE_BLOCK, NODE_BLOCK_PASS, NODE_DASGN, NODE_DASGN_CURR, NODE_DREGX, NODE_DREGX_ONCE, NODE_DSTR, NODE_DSYM, NODE_DXSTR, NODE_ENSURE, NODE_FL_NEWLINE, NODE_LASGN, NODE_LIT, NODE_MASGN, NODE_OR, NODE_RESCUE, NODE_SCOPE, NODE_SELF, NODE_STR, NODE_XSTR, NODE_YIELD, NODE_ZARRAY, NOEX_PRIVATE, NULL, YYSTYPE::num, one(), options(), paren_nest, PARSER_ARG, parser_yyerror, prev, Qfalse, Qnil, rb_cArray, rb_gc_force_recycle(), rb_intern, rb_intern2(), rb_intern_str(), rb_parse_in_main(), rb_str_resize(), rb_warn0, rb_warning0, RE_OPTION_MASK, RE_OPTION_ONCE, remove_begin, ruby_sourceline, shadowing_lvar, STR_NEW0, T_REGEXP, tANDOP, tAREF, tASET, tCMP, tEQ, tEQQ, tGEQ, tLEQ, tLSHFT, tMATCH, tNEQ, tNMATCH, token_info_pop, token_info_push, tOROP, tPOW, tRSHFT, TRUE, tUMINUS, tUPLUS, TYPE, YYSTYPE::val, YYSTYPE::vars, YY_, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yychar, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerrok, yyerror, YYFINAL, YYID, YYINITDEPTH, YYLAST, YYLEX, yylval, YYMAXDEPTH, yynerrs, YYNTOKENS, yypact_value_is_default, YYPOPSTACK, YYSIZE_T, yyalloc::yyss_alloc, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, YYSYNTAX_ERROR, yytable_value_is_error, YYTERROR, YYTRANSLATE, yyalloc::yyvs_alloc, and zero().

int yyparse (  ) 
static char* yystpcpy ( char *  yydest,
const char *  yysrc 
) [static]

Definition at line 4506 of file parse.c.

Referenced by yytnamerr().

static YYSIZE_T yystrlen ( char *  yystr  )  const [static]

Definition at line 4482 of file parse.c.

References YYSIZE_T.

Referenced by yysyntax_error(), and yytnamerr().

static int yysyntax_error ( YYSIZE_T *  yymsg_alloc,
char **  yymsg,
yytype_int16 yyssp,
int  yytoken 
) [static]
static YYSIZE_T yytnamerr ( char *  yyres,
const char *  yystr 
) [static]

Definition at line 4531 of file parse.c.

References YYSIZE_T, yystpcpy(), and yystrlen().

Referenced by yysyntax_error().


Variable Documentation

struct kw_assoc keyword_to_name[] [static]

Referenced by keyword_id_to_str().

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

Definition at line 11495 of file parse.c.

ID ripper_id_gets [static]

Definition at line 557 of file parse.c.

Referenced by Init_ripper(), ripper_initialize(), and ripper_lex_get_generic().

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

Definition at line 12206 of file parse.c.

const yytype_int16 yycheck[] [static]

Definition at line 3008 of file parse.c.

const yytype_uint16 yydefact[] [static]

Definition at line 1662 of file parse.c.

const yytype_int16 yydefgoto[] [static]
Initial value:
{
      -1,     1,     2,    64,    65,    66,   229,   539,   540,   244,
     245,   421,    68,    69,   339,    70,    71,   583,   719,    72,
      73,   246,    74,    75,    76,   449,    77,   202,   358,   359,
     186,   187,   188,   189,   584,   536,   191,    79,   423,   204,
     250,   529,   674,   410,   411,   218,   219,   206,   397,   412,
     488,    80,   337,   435,   604,   341,   800,   342,   801,   697,
     926,   701,   698,   875,   566,   568,   711,   880,   237,    82,
      83,    84,    85,    86,    87,    88,    89,    90,    91,   678,
     542,   686,   797,   798,   350,   738,   739,   740,   763,   654,
     655,   764,   844,   845,   268,   269,   454,   633,   745,   301,
     483,    92,    93,   388,   577,   576,   549,   925,   680,   791,
     861,   865,    94,    95,    96,    97,    98,    99,   100,   280,
     467,   101,   282,   276,   274,   278,   459,   646,   645,   755,
     759,   102,   275,   103,   104,   209,   210,   107,   211,   212,
     561,   700,   709,   710,   635,   636,   637,   638,   639,   766,
     767,   640,   641,   642,   643,   836,   747,   377,   567,   255,
     413,   214,   238,   608,   531,   571,   290,   407,   408,   670,
     439,   543,   345,   248
}

Definition at line 1767 of file parse.c.

const yytype_int16 yypact[] [static]

Definition at line 1792 of file parse.c.

const yytype_int16 yypgoto[] [static]
Initial value:
{
    -747,  -747,  -747,   452,  -747,    28,  -747,  -545,   277,  -747,
      39,  -747,  -293,   184,   -58,    71,  -747,  -169,  -747,    -7,
     791,  -142,   -13,   -37,  -747,  -396,   -29,  1623,  -312,   788,
     -54,  -747,   -25,  -747,  -747,    20,  -747,  1066,  -747,   -45,
    -747,    11,    47,  -324,   115,     5,  -747,  -322,  -196,    53,
    -295,     8,  -747,  -747,  -747,  -747,  -747,  -747,  -747,  -747,
    -747,  -747,  -747,  -747,  -747,  -747,  -747,  -747,     2,  -747,
    -747,  -747,  -747,  -747,  -747,  -747,  -747,  -747,  -747,   205,
    -338,  -516,   -72,  -618,  -747,  -722,  -671,   147,  -747,  -489,
    -747,  -600,  -747,   -12,  -747,  -747,  -747,  -747,  -747,  -747,
    -747,  -747,  -747,   798,  -747,  -747,  -531,  -747,   -50,  -747,
    -747,  -747,  -747,  -747,  -747,   811,  -747,  -747,  -747,  -747,
    -747,  -747,  -747,  -747,   856,  -747,  -140,  -747,  -747,  -747,
    -747,     7,  -747,    12,  -747,  1268,  1605,   823,  1289,  1575,
    -747,  -747,    35,  -387,  -697,  -568,  -690,   273,  -696,  -746,
      72,   181,  -747,  -526,  -747,  -449,   270,  -747,  -747,  -747,
      97,  -360,   758,  -276,  -747,  -747,   -56,    -4,   278,  -585,
    -214,     6,   -18,    -2
}

Definition at line 1897 of file parse.c.

const yytype_uint16 yyprhs[] [static]

Definition at line 1136 of file parse.c.

const yytype_uint16 yyr1[] [static]

Definition at line 1534 of file parse.c.

const yytype_uint8 yyr2[] [static]

Definition at line 1597 of file parse.c.

const yytype_int16 yyrhs[] [static]

Definition at line 1199 of file parse.c.

const yytype_uint16 yyrline[] [static]

Definition at line 1381 of file parse.c.

const yytype_uint16 yystos[] [static]

Definition at line 4089 of file parse.c.

const yytype_int16 yytable[] [static]

Definition at line 1923 of file parse.c.

const char* const yytname[] [static]

Definition at line 1447 of file parse.c.

const yytype_uint8 yytranslate[] [static]

Definition at line 1091 of file parse.c.


Generated on 27 Nov 2014 for Ruby by  doxygen 1.6.1