Ruby  2.0.0p247(2013-06-27revision41674)
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
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 "probes.h"
#include "id.c"
#include "ruby/regex.h"
#include "ruby/util.h"
#include "lex.c"

Go to the source code of this file.

Data Structures

struct  vtable
 
struct  local_vars
 
struct  token_info
 
struct  parser_params
 
union  yyalloc
 
struct  magic_comment
 
struct  reg_named_capture_assign_t
 
struct  symbols
 

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "2.3"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   1
 
#define YYLSP_NEEDED   0
 
#define YYTOKENTYPE
 
#define END_OF_INPUT   0
 
#define keyword_class   258
 
#define keyword_module   259
 
#define keyword_def   260
 
#define keyword_undef   261
 
#define keyword_begin   262
 
#define keyword_rescue   263
 
#define keyword_ensure   264
 
#define keyword_end   265
 
#define keyword_if   266
 
#define keyword_unless   267
 
#define keyword_then   268
 
#define keyword_elsif   269
 
#define keyword_else   270
 
#define keyword_case   271
 
#define keyword_when   272
 
#define keyword_while   273
 
#define keyword_until   274
 
#define keyword_for   275
 
#define keyword_break   276
 
#define keyword_next   277
 
#define keyword_redo   278
 
#define keyword_retry   279
 
#define keyword_in   280
 
#define keyword_do   281
 
#define keyword_do_cond   282
 
#define keyword_do_block   283
 
#define keyword_do_LAMBDA   284
 
#define keyword_return   285
 
#define keyword_yield   286
 
#define keyword_super   287
 
#define keyword_self   288
 
#define keyword_nil   289
 
#define keyword_true   290
 
#define keyword_false   291
 
#define keyword_and   292
 
#define keyword_or   293
 
#define keyword_not   294
 
#define modifier_if   295
 
#define modifier_unless   296
 
#define modifier_while   297
 
#define modifier_until   298
 
#define modifier_rescue   299
 
#define keyword_alias   300
 
#define keyword_defined   301
 
#define keyword_BEGIN   302
 
#define keyword_END   303
 
#define keyword__LINE__   304
 
#define keyword__FILE__   305
 
#define keyword__ENCODING__   306
 
#define tIDENTIFIER   307
 
#define tFID   308
 
#define tGVAR   309
 
#define tIVAR   310
 
#define tCONSTANT   311
 
#define tCVAR   312
 
#define tLABEL   313
 
#define tINTEGER   314
 
#define tFLOAT   315
 
#define tSTRING_CONTENT   316
 
#define tCHAR   317
 
#define tNTH_REF   318
 
#define tBACK_REF   319
 
#define tREGEXP_END   320
 
#define tUPLUS   130
 
#define tUMINUS   131
 
#define tPOW   132
 
#define tCMP   134
 
#define tEQ   139
 
#define tEQQ   140
 
#define tNEQ   141
 
#define tGEQ   138
 
#define tLEQ   137
 
#define tANDOP   321
 
#define tOROP   322
 
#define tMATCH   142
 
#define tNMATCH   143
 
#define tDOT2   128
 
#define tDOT3   129
 
#define tAREF   144
 
#define tASET   145
 
#define tLSHFT   135
 
#define tRSHFT   136
 
#define tCOLON2   323
 
#define tCOLON3   324
 
#define tOP_ASGN   325
 
#define tASSOC   326
 
#define tLPAREN   327
 
#define tLPAREN_ARG   328
 
#define tRPAREN   329
 
#define tLBRACK   330
 
#define tLBRACE   331
 
#define tLBRACE_ARG   332
 
#define tSTAR   333
 
#define tDSTAR   334
 
#define tAMPER   335
 
#define tLAMBDA   336
 
#define tSYMBEG   337
 
#define tSTRING_BEG   338
 
#define tXSTRING_BEG   339
 
#define tREGEXP_BEG   340
 
#define tWORDS_BEG   341
 
#define tQWORDS_BEG   342
 
#define tSYMBOLS_BEG   343
 
#define tQSYMBOLS_BEG   344
 
#define tSTRING_DBEG   345
 
#define tSTRING_DEND   346
 
#define tSTRING_DVAR   347
 
#define tSTRING_END   348
 
#define tLAMBEG   349
 
#define tLOWEST   350
 
#define tUMINUS_NUM   351
 
#define tLAST_TOKEN   352
 
#define PARSER_DEBUG   0
 
#define YYDEBUG   1
 
#define YYERROR_VERBOSE   1
 
#define YYSTACK_USE_ALLOCA   0
 
#define numberof(array)   (int)(sizeof(array) / sizeof((array)[0]))
 
#define YYMALLOC(size)   rb_parser_malloc(parser, (size))
 
#define YYREALLOC(ptr, size)   rb_parser_realloc(parser, (ptr), (size))
 
#define YYCALLOC(nelem, size)   rb_parser_calloc(parser, (nelem), (size))
 
#define YYFREE(ptr)   rb_parser_free(parser, (ptr))
 
#define malloc   YYMALLOC
 
#define realloc   YYREALLOC
 
#define calloc   YYCALLOC
 
#define free   YYFREE
 
#define REGISTER_SYMID(id, name)   register_symid((id), (name), strlen(name), enc)
 
#define is_notop_id(id)   ((id)>tLAST_OP_ID)
 
#define is_local_id(id)   (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
 
#define is_global_id(id)   (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
 
#define is_instance_id(id)   (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
 
#define is_attrset_id(id)   (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
 
#define is_const_id(id)   (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
 
#define is_class_id(id)   (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
 
#define is_junk_id(id)   (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)
 
#define id_type(id)   (is_notop_id(id) ? (int)((id)&ID_SCOPE_MASK) : -1)
 
#define is_asgn_or_id(id)
 
#define DEF_EXPR(n)   EXPR_##n = (1 << EXPR_##n##_bit)
 
#define IS_lex_state_for(x, ls)   ((x) & (ls))
 
#define IS_lex_state(ls)   IS_lex_state_for(lex_state, (ls))
 
#define BITSTACK_PUSH(stack, n)   ((stack) = ((stack)<<1)|((n)&1))
 
#define BITSTACK_POP(stack)   ((stack) = (stack) >> 1)
 
#define BITSTACK_LEXPOP(stack)   ((stack) = ((stack) >> 1) | ((stack) & 1))
 
#define BITSTACK_SET_P(stack)   ((stack)&1)
 
#define COND_PUSH(n)   BITSTACK_PUSH(cond_stack, (n))
 
#define COND_POP()   BITSTACK_POP(cond_stack)
 
#define COND_LEXPOP()   BITSTACK_LEXPOP(cond_stack)
 
#define COND_P()   BITSTACK_SET_P(cond_stack)
 
#define CMDARG_PUSH(n)   BITSTACK_PUSH(cmdarg_stack, (n))
 
#define CMDARG_POP()   BITSTACK_POP(cmdarg_stack)
 
#define CMDARG_LEXPOP()   BITSTACK_LEXPOP(cmdarg_stack)
 
#define CMDARG_P()   BITSTACK_SET_P(cmdarg_stack)
 
#define DVARS_INHERIT   ((void*)1)
 
#define DVARS_TOPSCOPE   NULL
 
#define DVARS_SPECIAL_P(tbl)   (!POINTER_P(tbl))
 
#define POINTER_P(val)   ((VALUE)(val) & ~(VALUE)3)
 
#define VTBL_DEBUG   0
 
#define STR_NEW(p, n)   rb_enc_str_new((p),(n),current_enc)
 
#define STR_NEW0()   rb_enc_str_new(0,0,current_enc)
 
#define STR_NEW2(p)   rb_enc_str_new((p),strlen(p),current_enc)
 
#define STR_NEW3(p, n, e, func)   parser_str_new((p),(n),(e),(func),current_enc)
 
#define ENC_SINGLE(cr)   ((cr)==ENC_CODERANGE_7BIT)
 
#define TOK_INTERN(mb)   rb_intern3(tok(), toklen(), current_enc)
 
#define yyerror(msg)   parser_yyerror(parser, (msg))
 
#define YYLEX_PARAM   parser
 
#define lex_strterm   (parser->parser_lex_strterm)
 
#define lex_state   (parser->parser_lex_state)
 
#define cond_stack   (parser->parser_cond_stack)
 
#define cmdarg_stack   (parser->parser_cmdarg_stack)
 
#define class_nest   (parser->parser_class_nest)
 
#define paren_nest   (parser->parser_paren_nest)
 
#define lpar_beg   (parser->parser_lpar_beg)
 
#define brace_nest   (parser->parser_brace_nest)
 
#define in_single   (parser->parser_in_single)
 
#define in_def   (parser->parser_in_def)
 
#define compile_for_eval   (parser->parser_compile_for_eval)
 
#define cur_mid   (parser->parser_cur_mid)
 
#define in_defined   (parser->parser_in_defined)
 
#define tokenbuf   (parser->parser_tokenbuf)
 
#define tokidx   (parser->parser_tokidx)
 
#define toksiz   (parser->parser_toksiz)
 
#define tokline   (parser->parser_tokline)
 
#define lex_input   (parser->parser_lex_input)
 
#define lex_lastline   (parser->parser_lex_lastline)
 
#define lex_nextline   (parser->parser_lex_nextline)
 
#define lex_pbeg   (parser->parser_lex_pbeg)
 
#define lex_p   (parser->parser_lex_p)
 
#define lex_pend   (parser->parser_lex_pend)
 
#define heredoc_end   (parser->parser_heredoc_end)
 
#define command_start   (parser->parser_command_start)
 
#define deferred_nodes   (parser->parser_deferred_nodes)
 
#define lex_gets_ptr   (parser->parser_lex_gets_ptr)
 
#define lex_gets   (parser->parser_lex_gets)
 
#define lvtbl   (parser->parser_lvtbl)
 
#define ruby__end__seen   (parser->parser_ruby__end__seen)
 
#define ruby_sourceline   (parser->parser_ruby_sourceline)
 
#define ruby_sourcefile   (parser->parser_ruby_sourcefile)
 
#define current_enc   (parser->enc)
 
#define yydebug   (parser->parser_yydebug)
 
#define ruby_eval_tree   (parser->parser_eval_tree)
 
#define ruby_eval_tree_begin   (parser->parser_eval_tree_begin)
 
#define ruby_debug_lines   (parser->debug_lines)
 
#define ruby_coverage   (parser->coverage)
 
#define yyparse   ruby_yyparse
 
#define rb_node_newnode(type, a1, a2, a3)   node_newnode(parser, (type), (a1), (a2), (a3))
 
#define cond(node)   cond_gen(parser, (node))
 
#define logop(type, node1, node2)   logop_gen(parser, (type), (node1), (node2))
 
#define value_expr(node)   value_expr_gen(parser, (node) = remove_begin(node))
 
#define void_expr0(node)   void_expr_gen(parser, (node))
 
#define void_expr(node)   void_expr0((node) = remove_begin(node))
 
#define void_stmts(node)   void_stmts_gen(parser, (node))
 
#define reduce_nodes(n)   reduce_nodes_gen(parser,(n))
 
#define block_dup_check(n1, n2)   block_dup_check_gen(parser,(n1),(n2))
 
#define block_append(h, t)   block_append_gen(parser,(h),(t))
 
#define list_append(l, i)   list_append_gen(parser,(l),(i))
 
#define list_concat(h, t)   list_concat_gen(parser,(h),(t))
 
#define arg_append(h, t)   arg_append_gen(parser,(h),(t))
 
#define arg_concat(h, t)   arg_concat_gen(parser,(h),(t))
 
#define literal_concat(h, t)   literal_concat_gen(parser,(h),(t))
 
#define new_evstr(n)   new_evstr_gen(parser,(n))
 
#define evstr2dstr(n)   evstr2dstr_gen(parser,(n))
 
#define call_bin_op(recv, id, arg1)   call_bin_op_gen(parser, (recv),(id),(arg1))
 
#define call_uni_op(recv, id)   call_uni_op_gen(parser, (recv),(id))
 
#define new_args(f, o, r, p, t)   new_args_gen(parser, (f),(o),(r),(p),(t))
 
#define new_args_tail(k, kr, b)   new_args_tail_gen(parser, (k),(kr),(b))
 
#define ret_args(node)   ret_args_gen(parser, (node))
 
#define new_yield(node)   new_yield_gen(parser, (node))
 
#define dsym_node(node)   dsym_node_gen(parser, (node))
 
#define gettable(id)   gettable_gen(parser,(id))
 
#define assignable(id, node)   assignable_gen(parser, (id), (node))
 
#define aryset(node1, node2)   aryset_gen(parser, (node1), (node2))
 
#define attrset(node, id)   attrset_gen(parser, (node), (id))
 
#define rb_backref_error(n)   rb_backref_error_gen(parser,(n))
 
#define node_assign(node1, node2)   node_assign_gen(parser, (node1), (node2))
 
#define new_attr_op_assign(lhs, type, attr, op, rhs)   new_attr_op_assign_gen(parser, (lhs), (attr), (op), (rhs))
 
#define new_const_op_assign(lhs, op, rhs)   new_const_op_assign_gen(parser, (lhs), (op), (rhs))
 
#define match_op(node1, node2)   match_op_gen(parser, (node1), (node2))
 
#define local_tbl()   local_tbl_gen(parser)
 
#define reg_compile(str, options)   reg_compile_gen(parser, (str), (options))
 
#define reg_fragment_setenc(str, options)   reg_fragment_setenc_gen(parser, (str), (options))
 
#define reg_fragment_check(str, options)   reg_fragment_check_gen(parser, (str), (options))
 
#define reg_named_capture_assign(regexp, match)   reg_named_capture_assign_gen(parser,(regexp),(match))
 
#define get_id(id)   (id)
 
#define get_value(val)   (val)
 
#define new_op_assign(lhs, op, rhs)   new_op_assign_gen(parser, (lhs), (op), (rhs))
 
#define formal_argument(id)   formal_argument_gen(parser, (id))
 
#define shadowing_lvar(name)   shadowing_lvar_gen(parser, (name))
 
#define new_bv(id)   new_bv_gen(parser, (id))
 
#define local_push(top)   local_push_gen(parser,(top))
 
#define local_pop()   local_pop_gen(parser)
 
#define local_var(id)   local_var_gen(parser, (id))
 
#define arg_var(id)   arg_var_gen(parser, (id))
 
#define local_id(id)   local_id_gen(parser, (id))
 
#define internal_id()   internal_id_gen(parser)
 
#define dyna_push()   dyna_push_gen(parser)
 
#define dyna_pop(node)   dyna_pop_gen(parser, (node))
 
#define dyna_in_block()   dyna_in_block_gen(parser)
 
#define dyna_var(id)   local_var(id)
 
#define dvar_defined(id)   dvar_defined_gen(parser, (id), 0)
 
#define dvar_defined_get(id)   dvar_defined_gen(parser, (id), 1)
 
#define dvar_curr(id)   dvar_curr_gen(parser, (id))
 
#define lvar_defined(id)   lvar_defined_gen(parser, (id))
 
#define RE_OPTION_ONCE   (1<<16)
 
#define RE_OPTION_ENCODING_SHIFT   8
 
#define RE_OPTION_ENCODING(e)   (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
 
#define RE_OPTION_ENCODING_IDX(o)   (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
 
#define RE_OPTION_ENCODING_NONE(o)   ((o)&RE_OPTION_ARG_ENCODING_NONE)
 
#define RE_OPTION_MASK   0xff
 
#define RE_OPTION_ARG_ENCODING_NONE   32
 
#define NODE_STRTERM   NODE_ZARRAY /* nothing to gc */
 
#define NODE_HEREDOC   NODE_ARRAY /* 1, 3 to gc */
 
#define SIGN_EXTEND(x, n)   (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1))
 
#define nd_func   u1.id
 
#define nd_term(node)   SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)
 
#define nd_paren(node)   (char)((node)->u2.id >> CHAR_BIT*2)
 
#define nd_nest   u3.cnt
 
#define Qnone   0
 
#define ifndef_ripper(x)   (x)
 
#define rb_warn0(fmt)   rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt))
 
#define rb_warnI(fmt, a)   rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a))
 
#define rb_warnS(fmt, a)   rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a))
 
#define rb_warn4S(file, line, fmt, a)   rb_compile_warn((file), (line), (fmt), (a))
 
#define rb_warning0(fmt)   rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt))
 
#define rb_warningS(fmt, a)   rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt), (a))
 
#define rb_compile_error   rb_compile_error_with_enc
 
#define compile_error   parser->nerr++,rb_compile_error_with_enc
 
#define PARSER_ARG   ruby_sourcefile, ruby_sourceline, current_enc,
 
#define token_info_push(token)   (RTEST(ruby_verbose) ? token_info_push(parser, (token)) : (void)0)
 
#define token_info_pop(token)   (RTEST(ruby_verbose) ? token_info_pop(parser, (token)) : (void)0)
 
#define YYERROR_VERBOSE   1
 
#define YYTOKEN_TABLE   0
 
#define YYSIZE_T   unsigned int
 
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
 
#define YY_(msgid)   msgid
 
#define YYUSE(e)   ((void) (e))
 
#define YYID(n)   (n)
 
#define YYSTACK_ALLOC   YYMALLOC
 
#define YYSTACK_FREE   YYFREE
 
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
 
#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
 
#define YYSTACK_BYTES(N)
 
#define YYCOPY(To, From, Count)
 
#define YYSTACK_RELOCATE(Stack)
 
#define YYFINAL   3
 
#define YYLAST   10982
 
#define YYNTOKENS   142
 
#define YYNNTS   197
 
#define YYNRULES   618
 
#define YYNSTATES   1055
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   352
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -804
 
#define YYTABLE_NINF   -619
 
#define yyerrok   (yyerrstatus = 0)
 
#define yyclearin   (yychar = YYEMPTY)
 
#define YYEMPTY   (-2)
 
#define YYEOF   0
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYFAIL   goto yyerrlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYTERROR   1
 
#define YYERRCODE   256
 
#define YYRHSLOC(Rhs, K)   ((Rhs)[K])
 
#define YYLLOC_DEFAULT(Current, Rhs, N)
 
#define YY_LOCATION_PRINT(File, Loc)   ((void) 0)
 
#define YYLEX   yylex (&yylval, YYLEX_PARAM)
 
#define YYFPRINTF   fprintf
 
#define YYDPRINTF(Args)
 
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
 
#define YY_STACK_PRINT(Bottom, Top)
 
#define YY_REDUCE_PRINT(Rule)
 
#define YYINITDEPTH   200
 
#define YYMAXDEPTH   10000
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 
#define yylval   (*((YYSTYPE*)(parser->parser_yylval)))
 
#define nextc()   parser_nextc(parser)
 
#define pushback(c)   parser_pushback(parser, (c))
 
#define newtok()   parser_newtok(parser)
 
#define tokspace(n)   parser_tokspace(parser, (n))
 
#define tokadd(c)   parser_tokadd(parser, (c))
 
#define tok_hex(numlen)   parser_tok_hex(parser, (numlen))
 
#define read_escape(flags, e)   parser_read_escape(parser, (flags), (e))
 
#define tokadd_escape(e)   parser_tokadd_escape(parser, (e))
 
#define regx_options()   parser_regx_options(parser)
 
#define tokadd_string(f, t, p, n, e)   parser_tokadd_string(parser,(f),(t),(p),(n),(e))
 
#define parse_string(n)   parser_parse_string(parser,(n))
 
#define tokaddmbc(c, enc)   parser_tokaddmbc(parser, (c), (enc))
 
#define here_document(n)   parser_here_document(parser,(n))
 
#define heredoc_identifier()   parser_heredoc_identifier(parser)
 
#define heredoc_restore(n)   parser_heredoc_restore(parser,(n))
 
#define whole_match_p(e, l, i)   parser_whole_match_p(parser,(e),(l),(i))
 
#define set_yylval_str(x)   (yylval.node = NEW_STR(x))
 
#define set_yylval_num(x)   (yylval.num = (x))
 
#define set_yylval_id(x)   (yylval.id = (x))
 
#define set_yylval_name(x)   (yylval.id = (x))
 
#define set_yylval_literal(x)   (yylval.node = NEW_LIT(x))
 
#define set_yylval_node(x)   (yylval.node = (x))
 
#define yylval_id()   (yylval.id)
 
#define ripper_flush(p)   (void)(p)
 
#define SIGN_EXTEND_CHAR(c)   ((((unsigned char)(c)) ^ 128) - 128)
 
#define parser_encoding_name()   (current_enc->name)
 
#define parser_mbclen()   mbclen((lex_p-1),lex_pend,current_enc)
 
#define parser_precise_mbclen()   rb_enc_precise_mbclen((lex_p-1),lex_pend,current_enc)
 
#define is_identchar(p, e, enc)   (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p)))
 
#define parser_is_identchar()   (!parser->eofp && is_identchar((lex_p-1),lex_pend,current_enc))
 
#define parser_isascii()   ISASCII(*(lex_p-1))
 
#define STR_FUNC_ESCAPE   0x01
 
#define STR_FUNC_EXPAND   0x02
 
#define STR_FUNC_REGEXP   0x04
 
#define STR_FUNC_QWORDS   0x08
 
#define STR_FUNC_SYMBOL   0x10
 
#define STR_FUNC_INDENT   0x20
 
#define lex_goto_eol(parser)   ((parser)->parser_lex_p = (parser)->parser_lex_pend)
 
#define lex_eol_p()   (lex_p >= lex_pend)
 
#define peek(c)   peek_n((c), 0)
 
#define peek_n(c, n)   (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n])
 
#define was_bol()   (lex_p == lex_pbeg + 1)
 
#define tokfix()   (tokenbuf[tokidx]='\0')
 
#define tok()   tokenbuf
 
#define toklen()   tokidx
 
#define toklast()   (tokidx>0?tokenbuf[tokidx-1]:0)
 
#define tokcopy(n)   memcpy(tokspace(n), lex_p - (n), (n))
 
#define ESCAPE_CONTROL   1
 
#define ESCAPE_META   2
 
#define tokadd_mbchar(c)   parser_tokadd_mbchar(parser, (c))
 
#define mixed_error(enc1, enc2)
 
#define mixed_escape(beg, enc1, enc2)
 
#define NEW_STRTERM(func, term, paren)   rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)
 
#define flush_string_content(enc)   ((void)(enc))
 
#define BIT(c, idx)   (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
 
#define SPECIAL_PUNCT(idx)
 
#define dispatch_heredoc_end()   ((void)0)
 
#define arg_ambiguous()   (arg_ambiguous_gen(parser), 1)
 
#define str_copy(_s, _p, _n)
 
#define IS_ARG()   IS_lex_state(EXPR_ARG_ANY)
 
#define IS_END()   IS_lex_state(EXPR_END_ANY)
 
#define IS_BEG()   IS_lex_state(EXPR_BEG_ANY)
 
#define IS_SPCARG(c)   (IS_ARG() && space_seen && !ISSPACE(c))
 
#define IS_LABEL_POSSIBLE()   ((IS_lex_state(EXPR_BEG | EXPR_ENDFN) && !cmd_state) || IS_ARG())
 
#define IS_LABEL_SUFFIX(n)   (peek_n(':',(n)) && !peek_n(':', (n)+1))
 
#define IS_AFTER_OPERATOR()   IS_lex_state(EXPR_FNAME | EXPR_DOT)
 
#define ambiguous_operator(op, syn)
 
#define warn_balanced(op, syn)
 
#define no_digits()   do {yyerror("numeric literal without digits"); return 0;} while (0)
 
#define parser_warning(node, mesg)   parser_warning(parser, (node), (mesg))
 
#define parser_warn(node, mesg)   parser_warn(parser, (node), (mesg))
 
#define assignable_result(x)   (x)
 
#define LVAR_USED   ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
 
#define subnodes(n1, n2)
 
#define op_tbl_count   numberof(op_tbl)
 
#define ENABLE_SELECTOR_NAMESPACE   0
 
#define HEAPCNT(n, size)   ((n) * (size) / sizeof(YYSTYPE))
 
#define NEWHEAP()   rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0)
 
#define ADD2HEAP(n, c, p)
 

Typedefs

typedef VALUE stack_type
 
typedef struct token_info token_info
 
typedef unsigned char yytype_uint8
 
typedef short int yytype_int8
 
typedef unsigned short int yytype_uint16
 
typedef short int yytype_int16
 
typedef long(* rb_magic_comment_length_t )(struct parser_params *parser, const char *name, long len)
 
typedef void(* rb_magic_comment_setter_t )(struct parser_params *parser, const char *name, const char *val)
 

Enumerations

enum  yytokentype {
  END_OF_INPUT = 0, 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 = 130, tUMINUS = 131, tPOW = 132, tCMP = 134,
  tEQ = 139, tEQQ = 140, tNEQ = 141, tGEQ = 138,
  tLEQ = 137, tANDOP = 321, tOROP = 322, tMATCH = 142,
  tNMATCH = 143, tDOT2 = 128, tDOT3 = 129, tAREF = 144,
  tASET = 145, tLSHFT = 135, tRSHFT = 136, tCOLON2 = 323,
  tCOLON3 = 324, tOP_ASGN = 325, tASSOC = 326, tLPAREN = 327,
  tLPAREN_ARG = 328, tRPAREN = 329, tLBRACK = 330, tLBRACE = 331,
  tLBRACE_ARG = 332, tSTAR = 333, tDSTAR = 334, tAMPER = 335,
  tLAMBDA = 336, tSYMBEG = 337, tSTRING_BEG = 338, tXSTRING_BEG = 339,
  tREGEXP_BEG = 340, tWORDS_BEG = 341, tQWORDS_BEG = 342, tSYMBOLS_BEG = 343,
  tQSYMBOLS_BEG = 344, tSTRING_DBEG = 345, tSTRING_DEND = 346, tSTRING_DVAR = 347,
  tSTRING_END = 348, tLAMBEG = 349, tLOWEST = 350, tUMINUS_NUM = 351,
  tLAST_TOKEN = 352, END_OF_INPUT = 0, 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 = 130, tUMINUS = 131, tPOW = 132,
  tCMP = 134, tEQ = 139, tEQQ = 140, tNEQ = 141,
  tGEQ = 138, tLEQ = 137, tANDOP = 321, tOROP = 322,
  tMATCH = 142, tNMATCH = 143, tDOT2 = 128, tDOT3 = 129,
  tAREF = 144, tASET = 145, tLSHFT = 135, tRSHFT = 136,
  tCOLON2 = 323, tCOLON3 = 324, tOP_ASGN = 325, tASSOC = 326,
  tLPAREN = 327, tLPAREN_ARG = 328, tRPAREN = 329, tLBRACK = 330,
  tLBRACE = 331, tLBRACE_ARG = 332, tSTAR = 333, tDSTAR = 334,
  tAMPER = 335, tLAMBDA = 336, tSYMBEG = 337, tSTRING_BEG = 338,
  tXSTRING_BEG = 339, tREGEXP_BEG = 340, tWORDS_BEG = 341, tQWORDS_BEG = 342,
  tSYMBOLS_BEG = 343, tQSYMBOLS_BEG = 344, tSTRING_DBEG = 345, tSTRING_DEND = 346,
  tSTRING_DVAR = 347, tSTRING_END = 348, tLAMBEG = 349, tLOWEST = 350,
  tUMINUS_NUM = 351, tLAST_TOKEN = 352, END_OF_INPUT = 0, 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 = 130, tUMINUS = 131,
  tPOW = 132, tCMP = 134, tEQ = 139, tEQQ = 140,
  tNEQ = 141, tGEQ = 138, tLEQ = 137, tANDOP = 321,
  tOROP = 322, tMATCH = 142, tNMATCH = 143, tDOT2 = 128,
  tDOT3 = 129, tAREF = 144, tASET = 145, tLSHFT = 135,
  tRSHFT = 136, tCOLON2 = 323, tCOLON3 = 324, tOP_ASGN = 325,
  tASSOC = 326, tLPAREN = 327, tLPAREN_ARG = 328, tRPAREN = 329,
  tLBRACK = 330, tLBRACE = 331, tLBRACE_ARG = 332, tSTAR = 333,
  tDSTAR = 334, tAMPER = 335, tLAMBDA = 336, tSYMBEG = 337,
  tSTRING_BEG = 338, tXSTRING_BEG = 339, tREGEXP_BEG = 340, tWORDS_BEG = 341,
  tQWORDS_BEG = 342, tSYMBOLS_BEG = 343, tQSYMBOLS_BEG = 344, tSTRING_DBEG = 345,
  tSTRING_DEND = 346, tSTRING_DVAR = 347, tSTRING_END = 348, tLAMBEG = 349,
  tLOWEST = 350, tUMINUS_NUM = 351, tLAST_TOKEN = 352, END_OF_INPUT = 0,
  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 = 130,
  tUMINUS = 131, tPOW = 132, tCMP = 134, tEQ = 139,
  tEQQ = 140, tNEQ = 141, tGEQ = 138, tLEQ = 137,
  tANDOP = 321, tOROP = 322, tMATCH = 142, tNMATCH = 143,
  tDOT2 = 128, tDOT3 = 129, tAREF = 144, tASET = 145,
  tLSHFT = 135, tRSHFT = 136, tCOLON2 = 323, tCOLON3 = 324,
  tOP_ASGN = 325, tASSOC = 326, tLPAREN = 327, tLPAREN_ARG = 328,
  tRPAREN = 329, tLBRACK = 330, tLBRACE = 331, tLBRACE_ARG = 332,
  tSTAR = 333, tDSTAR = 334, tAMPER = 335, tLAMBDA = 336,
  tSYMBEG = 337, tSTRING_BEG = 338, tXSTRING_BEG = 339, tREGEXP_BEG = 340,
  tWORDS_BEG = 341, tQWORDS_BEG = 342, tSYMBOLS_BEG = 343, tQSYMBOLS_BEG = 344,
  tSTRING_DBEG = 345, tSTRING_DEND = 346, tSTRING_DVAR = 347, tSTRING_END = 348,
  tLAMBEG = 349, tLOWEST = 350, tUMINUS_NUM = 351, tLAST_TOKEN = 352
}
 
enum  lex_state_bits {
  EXPR_BEG_bit, EXPR_END_bit, EXPR_ENDARG_bit, EXPR_ENDFN_bit,
  EXPR_ARG_bit, EXPR_CMDARG_bit, EXPR_MID_bit, EXPR_FNAME_bit,
  EXPR_DOT_bit, EXPR_CLASS_bit, EXPR_VALUE_bit, EXPR_MAX_STATE,
  EXPR_BEG_bit, EXPR_END_bit, EXPR_ENDARG_bit, EXPR_ENDFN_bit,
  EXPR_ARG_bit, EXPR_CMDARG_bit, EXPR_MID_bit, EXPR_FNAME_bit,
  EXPR_DOT_bit, EXPR_CLASS_bit, EXPR_VALUE_bit, EXPR_MAX_STATE,
  EXPR_BEG_bit, EXPR_END_bit, EXPR_ENDARG_bit, EXPR_ENDFN_bit,
  EXPR_ARG_bit, EXPR_CMDARG_bit, EXPR_MID_bit, EXPR_FNAME_bit,
  EXPR_DOT_bit, EXPR_CLASS_bit, EXPR_VALUE_bit, EXPR_MAX_STATE,
  EXPR_BEG_bit, EXPR_END_bit, EXPR_ENDARG_bit, EXPR_ENDFN_bit,
  EXPR_ARG_bit, EXPR_CMDARG_bit, EXPR_MID_bit, EXPR_FNAME_bit,
  EXPR_DOT_bit, EXPR_CLASS_bit, EXPR_VALUE_bit, EXPR_MAX_STATE
}
 
enum  lex_state_e {
  DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG),
  DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG),
  DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG),
  EXPR_BEG_ANY = (EXPR_BEG | EXPR_VALUE | EXPR_MID | EXPR_CLASS), EXPR_ARG_ANY = (EXPR_ARG | EXPR_CMDARG), EXPR_END_ANY = (EXPR_END | EXPR_ENDARG | EXPR_ENDFN), DEF_EXPR =(BEG),
  DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG),
  DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG),
  DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG), EXPR_BEG_ANY = (EXPR_BEG | EXPR_VALUE | EXPR_MID | EXPR_CLASS),
  EXPR_ARG_ANY = (EXPR_ARG | EXPR_CMDARG), EXPR_END_ANY = (EXPR_END | EXPR_ENDARG | EXPR_ENDFN), DEF_EXPR =(BEG), DEF_EXPR =(BEG),
  DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG),
  DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG),
  DEF_EXPR =(BEG), DEF_EXPR =(BEG), EXPR_BEG_ANY = (EXPR_BEG | EXPR_VALUE | EXPR_MID | EXPR_CLASS), EXPR_ARG_ANY = (EXPR_ARG | EXPR_CMDARG),
  EXPR_END_ANY = (EXPR_END | EXPR_ENDARG | EXPR_ENDFN), DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG),
  DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG),
  DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG), DEF_EXPR =(BEG),
  DEF_EXPR =(BEG), EXPR_BEG_ANY = (EXPR_BEG | EXPR_VALUE | EXPR_MID | EXPR_CLASS), EXPR_ARG_ANY = (EXPR_ARG | EXPR_CMDARG), EXPR_END_ANY = (EXPR_END | EXPR_ENDARG | EXPR_ENDFN)
}
 
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)
}
 

Functions

static ID register_symid (ID, const char *, long, rb_encoding *)
 
static ID register_symid_str (ID, VALUE)
 
static int vtable_size (const struct vtable *tbl)
 
static struct 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 NODEnode_newnode (struct parser_params *, enum node_type, VALUE, VALUE, VALUE)
 
static NODEcond_gen (struct parser_params *, NODE *)
 
static NODElogop_gen (struct parser_params *, enum node_type, NODE *, NODE *)
 
static NODEnewline_node (NODE *)
 
static void fixpos (NODE *, NODE *)
 
static int value_expr_gen (struct parser_params *, NODE *)
 
static void void_expr_gen (struct parser_params *, NODE *)
 
static NODEremove_begin (NODE *)
 
static void void_stmts_gen (struct parser_params *, NODE *)
 
static void reduce_nodes_gen (struct parser_params *, NODE **)
 
static void block_dup_check_gen (struct parser_params *, NODE *, NODE *)
 
static NODEblock_append_gen (struct parser_params *, NODE *, NODE *)
 
static NODElist_append_gen (struct parser_params *, NODE *, NODE *)
 
static NODElist_concat_gen (struct parser_params *, NODE *, NODE *)
 
static NODEarg_append_gen (struct parser_params *, NODE *, NODE *)
 
static NODEarg_concat_gen (struct parser_params *, NODE *, NODE *)
 
static NODEliteral_concat_gen (struct parser_params *, NODE *, NODE *)
 
static int literal_concat0 (struct parser_params *, VALUE, VALUE)
 
static NODEnew_evstr_gen (struct parser_params *, NODE *)
 
static NODEevstr2dstr_gen (struct parser_params *, NODE *)
 
static NODEsplat_array (NODE *)
 
static NODEcall_bin_op_gen (struct parser_params *, NODE *, ID, NODE *)
 
static NODEcall_uni_op_gen (struct parser_params *, NODE *, ID)
 
static NODEnew_args_gen (struct parser_params *, NODE *, NODE *, ID, NODE *, NODE *)
 
static NODEnew_args_tail_gen (struct parser_params *, NODE *, ID, ID)
 
static NODEnegate_lit (NODE *)
 
static NODEret_args_gen (struct parser_params *, NODE *)
 
static NODEarg_blk_pass (NODE *, NODE *)
 
static NODEnew_yield_gen (struct parser_params *, NODE *)
 
static NODEdsym_node_gen (struct parser_params *, NODE *)
 
static NODEgettable_gen (struct parser_params *, ID)
 
static NODEassignable_gen (struct parser_params *, ID, NODE *)
 
static NODEaryset_gen (struct parser_params *, NODE *, NODE *)
 
static NODEattrset_gen (struct parser_params *, NODE *, ID)
 
static void rb_backref_error_gen (struct parser_params *, NODE *)
 
static NODEnode_assign_gen (struct parser_params *, NODE *, NODE *)
 
static NODEnew_op_assign_gen (struct parser_params *parser, NODE *lhs, ID op, NODE *rhs)
 
static NODEnew_attr_op_assign_gen (struct parser_params *parser, NODE *lhs, ID attr, ID op, NODE *rhs)
 
static NODEnew_const_op_assign_gen (struct parser_params *parser, NODE *lhs, ID op, NODE *rhs)
 
static NODEmatch_op_gen (struct parser_params *, NODE *, NODE *)
 
static IDlocal_tbl_gen (struct parser_params *)
 
static void fixup_nodes (NODE **)
 
static VALUE reg_compile_gen (struct parser_params *, VALUE, int)
 
static void reg_fragment_setenc_gen (struct parser_params *, VALUE, int)
 
static int reg_fragment_check_gen (struct parser_params *, VALUE, int)
 
static NODEreg_named_capture_assign_gen (struct parser_params *parser, VALUE regexp, NODE *match)
 
static ID formal_argument_gen (struct parser_params *, ID)
 
static ID shadowing_lvar_gen (struct parser_params *, ID)
 
static void new_bv_gen (struct parser_params *, ID)
 
static void local_push_gen (struct parser_params *, int)
 
static void local_pop_gen (struct parser_params *)
 
static int local_var_gen (struct parser_params *, ID)
 
static int arg_var_gen (struct parser_params *, ID)
 
static int local_id_gen (struct parser_params *, ID)
 
static ID internal_id_gen (struct parser_params *)
 
static 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 void token_info_push (struct parser_params *, const char *token)
 
static void token_info_pop (struct parser_params *, const char *token)
 
 YYUSE (parser)
 
 YYUSE (yyoutput)
 
 switch (yytype)
 
else YYFPRINTF (yyoutput,"nterm %s (", yytname[yytype])
 
 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser)
 
 YYFPRINTF (yyoutput,")")
 
 YYFPRINTF (stderr," %d",*bottom)
 
 YYFPRINTF (stderr,"\n")
 
 YYFPRINTF (stderr,"Reducing stack by rule %d (line %lu):\n", yyrule-1, yylno)
 
 for (yyi=0;yyi< yynrhs;yyi++)
 
static YYSIZE_T yytnamerr (char *yyres, const char *yystr)
 
static YYSIZE_T yysyntax_error (char *yyresult, int yystate, int yychar)
 
 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp)
 
int yyparse ()
 
 YYDPRINTF ((stderr,"Starting parse\n"))
 
 if (yyss+yystacksize-1<=yyssp)
 
 YYDPRINTF ((stderr,"Entering state %d\n", yystate))
 
 if (yychar==YYEMPTY)
 
 if (yychar<=YYEOF)
 
 YY_SYMBOL_PRINT ("Next token is", yytoken,&yylval,&yylloc)
 
 if (yyn<=0)
 
 YY_SYMBOL_PRINT ("Shifting", yytoken,&yylval,&yylloc)
 
 YY_REDUCE_PRINT (yyn)
 
 switch (yyn)
 
 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn],&yyval,&yyloc)
 
 YYPOPSTACK (yylen)
 
 YY_STACK_PRINT (yyss, yyssp)
 
 if (yymsg_alloc< yysize &&yymsg_alloc< YYSTACK_ALLOC_MAXIMUM)
 
 if (yyerrstatus==3)
 
 for (;;)
 
 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp)
 
yyexhaustedlab YY_ ("memory exhausted"))
 
 while (yyssp!=yyss)
 
 YYSTACK_FREE (yyss)
 
 YYSTACK_FREE (yymsg)
 
return YYID (yyresult)
 
static int parser_regx_options (struct parser_params *)
 
static int parser_tokadd_string (struct parser_params *, int, int, int, long *, rb_encoding **)
 
static void parser_tokaddmbc (struct parser_params *parser, int c, rb_encoding *enc)
 
static int parser_parse_string (struct parser_params *, NODE *)
 
static int parser_here_document (struct parser_params *, NODE *)
 
static int token_info_get_column (struct parser_params *parser, const char *token)
 
static int token_info_has_nonspaces (struct parser_params *parser, const char *token)
 
static void parser_prepare (struct parser_params *parser)
 
static VALUE debug_lines (const char *f)
 
static VALUE coverage (const char *f, int n)
 
static int e_option_supplied (struct parser_params *parser)
 
static VALUE yycompile0 (VALUE arg)
 
static NODEyycompile (struct parser_params *parser, const char *f, int line)
 
static rb_encodingmust_be_ascii_compatible (VALUE s)
 
static VALUE lex_get_str (struct parser_params *parser, VALUE s)
 
static VALUE lex_getline (struct parser_params *parser)
 
static NODEparser_compile_string (volatile VALUE vparser, const char *f, VALUE s, int line)
 
NODErb_compile_string (const char *f, VALUE s, int line)
 
NODErb_parser_compile_string (volatile VALUE vparser, const char *f, VALUE s, int line)
 
NODErb_compile_cstr (const char *f, const char *s, int len, int line)
 
NODErb_parser_compile_cstr (volatile VALUE vparser, const char *f, const char *s, int len, int line)
 
static VALUE lex_io_gets (struct parser_params *parser, VALUE io)
 
NODErb_compile_file (const char *f, VALUE file, int start)
 
NODErb_parser_compile_file (volatile VALUE vparser, const char *f, VALUE file, int start)
 
static VALUE parser_str_new (const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0)
 
static int parser_nextc (struct parser_params *parser)
 
static void parser_pushback (struct parser_params *parser, int c)
 
static char * parser_newtok (struct parser_params *parser)
 
static char * parser_tokspace (struct parser_params *parser, int n)
 
static void parser_tokadd (struct parser_params *parser, int c)
 
static int parser_tok_hex (struct parser_params *parser, size_t *numlen)
 
static int parser_tokadd_utf8 (struct parser_params *parser, rb_encoding **encp, int string_literal, int symbol_literal, int regexp_literal)
 
static int parser_read_escape (struct parser_params *parser, int flags, rb_encoding **encp)
 
static int parser_tokadd_escape (struct parser_params *parser, rb_encoding **encp)
 
static void dispose_string (VALUE str)
 
static int parser_tokadd_mbchar (struct parser_params *parser, int c)
 
static int simple_re_meta (int c)
 
static int is_global_name_punct (const char c)
 
static int parser_peek_variable_name (struct parser_params *parser)
 
static int parser_heredoc_identifier (struct parser_params *parser)
 
static void parser_heredoc_restore (struct parser_params *parser, NODE *here)
 
static int parser_whole_match_p (struct parser_params *parser, const char *eos, long len, int indent)
 
static void arg_ambiguous_gen (struct parser_params *parser)
 
static long parser_encode_length (struct parser_params *parser, const char *name, long len)
 
static void parser_set_encode (struct parser_params *parser, const char *name)
 
static int comment_at_top (struct parser_params *parser)
 
static void magic_comment_encoding (struct parser_params *parser, const char *name, const char *val)
 
static void parser_set_token_info (struct parser_params *parser, const char *name, const char *val)
 
static const char * magic_comment_marker (const char *str, long len)
 
static int parser_magic_comment (struct parser_params *parser, const char *str, long len)
 
static void set_file_encoding (struct parser_params *parser, const char *str, const char *send)
 
static int parser_yylex (struct parser_params *parser)
 
static enum node_type nodetype (NODE *node)
 
static int nodeline (NODE *node)
 
static void parser_warning (struct parser_params *parser, NODE *node, const char *mesg)
 
static void parser_warn (struct parser_params *parser, NODE *node, const char *mesg)
 
static NODEswitch (id)
 
 switch (id_type(id))
 
static int is_private_local_id (ID name)
 
ID rb_id_attrset (ID id)
 
static int is_static_content (NODE *node)
 
static int assign_in_cond (struct parser_params *parser, NODE *node)
 
static void warn_unless_e_option (struct parser_params *parser, NODE *node, const char *str)
 
static void warning_unless_e_option (struct parser_params *parser, NODE *node, const char *str)
 
static NODEcond0 (struct parser_params *, NODE *)
 
static NODErange_op (struct parser_params *parser, NODE *node)
 
static int literal_node (NODE *node)
 
static void no_blockarg (struct parser_params *parser, NODE *node)
 
static void warn_unused_var (struct parser_params *parser, struct local_vars *local)
 
static IDvtable_tblcpy (ID *buf, const struct vtable *src)
 
static void dyna_pop_1 (struct parser_params *parser)
 
static int reg_named_capture_assign_iter (const OnigUChar *name, const OnigUChar *name_end, int back_num, int *back_refs, OnigRegex regex, void *arg0)
 
void rb_gc_mark_parser (void)
 
NODErb_parser_append_print (VALUE vparser, NODE *node)
 
NODErb_parser_while_loop (VALUE vparser, NODE *node, int chop, int split)
 
void Init_sym (void)
 
void rb_gc_mark_symbols (void)
 
static int is_special_global_name (const char *m, const char *e, rb_encoding *enc)
 
int rb_symname_p (const char *name)
 
int rb_enc_symname_p (const char *name, rb_encoding *enc)
 
static int rb_enc_symname_type (const char *name, long len, rb_encoding *enc)
 
int rb_enc_symname2_p (const char *name, long len, rb_encoding *enc)
 
static int rb_str_symname_type (VALUE name)
 
static int sym_check_asciionly (VALUE str)
 
static ID intern_str (VALUE str)
 
ID rb_intern3 (const char *name, long len, rb_encoding *enc)
 
ID rb_intern2 (const char *name, long len)
 
ID rb_intern (const char *name)
 
ID rb_intern_str (VALUE str)
 
VALUE rb_id2str (ID id)
 
const char * rb_id2name (ID id)
 
static int symbols_i (VALUE sym, ID value, VALUE ary)
 
VALUE rb_sym_all_symbols (void)
 
int rb_is_const_id (ID id)
 
int rb_is_class_id (ID id)
 
int rb_is_global_id (ID id)
 
int rb_is_instance_id (ID id)
 
int rb_is_attrset_id (ID id)
 
int rb_is_local_id (ID id)
 
int rb_is_junk_id (ID id)
 
ID rb_check_id (volatile VALUE *namep)
 Returns ID for the given name if it is interned already, or 0. More...
 
ID rb_check_id_cstr (const char *ptr, long len, rb_encoding *enc)
 
int rb_is_const_name (VALUE name)
 
int rb_is_class_name (VALUE name)
 
int rb_is_global_name (VALUE name)
 
int rb_is_instance_name (VALUE name)
 
int rb_is_attrset_name (VALUE name)
 
int rb_is_local_name (VALUE name)
 
int rb_is_method_name (VALUE name)
 
int rb_is_junk_name (VALUE name)
 
static void parser_initialize (struct parser_params *parser)
 
static void parser_mark (void *ptr)
 
static void parser_free (void *ptr)
 
static size_t parser_memsize (const void *ptr)
 
struct kwtablerb_reserved_word (const char *str, unsigned int len)
 
static struct parser_paramsparser_new (void)
 
VALUE rb_parser_new (void)
 
VALUE rb_parser_end_seen_p (VALUE vparser)
 
VALUE rb_parser_encoding (VALUE vparser)
 
VALUE rb_parser_get_yydebug (VALUE self)
 
VALUE rb_parser_set_yydebug (VALUE self, VALUE flag)
 
voidrb_parser_malloc (struct parser_params *parser, size_t size)
 
voidrb_parser_calloc (struct parser_params *parser, size_t nelem, size_t size)
 
voidrb_parser_realloc (struct parser_params *parser, void *ptr, size_t size)
 
void rb_parser_free (struct parser_params *parser, void *ptr)
 

Variables

static const yytype_uint8 yytranslate []
 
static const yytype_uint16 yyprhs []
 
static const yytype_int16 yyrhs []
 
static const yytype_uint16 yyrline []
 
static const char *const yytname []
 
static const yytype_uint16 yyr1 []
 
static const yytype_uint8 yyr2 []
 
static const yytype_uint16 yydefact []
 
static const yytype_int16 yydefgoto []
 
static const yytype_int16 yypact []
 
static const yytype_int16 yypgoto []
 
static const yytype_int16 yytable []
 
static const yytype_int16 yycheck []
 
static const yytype_uint16 yystos []
 
static void FILEyyoutput
 
int yytype
 
YYSTYPE const *const yyvaluep
 
struct parser_paramsparser
 
static void yytype_int16bottom
 
yytype_int16top
 
static void YYSTYPEyyvsp = yyvs
 
int yyrule
 
int yyi
 
unsigned long int yylno = yyrline[yyrule]
 
static YYSIZE_T const char * yystr
 
 continue
 
return yylen = 0
 
static char *char * yydest
 
const char * yysrc
 
const char * yys = yysrc
 
return yyd
 
static void const char * yymsg = "Deleting"
 
YYSTYPE yylval
 
int yynerrs = 0
 
int yystate = 0
 
int yyn = yytoken
 
int yyresult = 2
 
int yyerrstatus = 0
 
int yytoken = 0
 
char yymsgbuf [128]
 
YYSIZE_T yymsg_alloc = sizeof yymsgbuf
 
yytype_int16 yyssa [YYINITDEPTH]
 
yytype_int16yyss = yyssa
 
yytype_int16yyssp = yyss
 
YYSTYPE yyvsa [YYINITDEPTH]
 
YYSTYPEyyvs = yyvsa
 
YYSIZE_T yystacksize = YYINITDEPTH
 
YYSTYPE yyval = yyvsp[1-yylen]
 
 yychar = YYEMPTY
 
goto yysetstate
 
yynewstate __pad0__
 
yysetstate __pad1__
 
goto yybackup
 
yybackup __pad2__
 
goto yydefault
 
 else
 
 YYACCEPT
 
goto yynewstate
 
yydefault __pad3__
 
goto yyerrlab
 
goto yyreduce
 
yyreduce __pad4__
 
yyerrlab __pad5__
 
goto yyexhaustedlab
 
goto yyerrlab1
 
yyerrorlab __pad6__
 
yyerrlab1 __pad7__
 
yyacceptlab __pad8__
 
goto yyreturn
 
yyabortlab __pad9__
 
yyexhaustedlab __pad10__
 
yyreturn __pad11__
 
static const rb_data_type_t parser_data_type
 
RUBY_FUNC_EXPORTED const
unsigned int 
ruby_global_name_punct_bits [(0x7e-0x20+31)/32]
 
static struct magic_comment magic_comments []
 
static int
 
int t = parser_yylex(parser)
 
parser parser_yylval = lval
 
parser parser_yylval val = Qundef
 
error __pad12__
 
struct {
   ID   token
 
   const char *   name
 
op_tbl []
 
static struct symbols global_symbols = {tLAST_TOKEN}
 
static struct st_hash_type symhash
 

Macro Definition Documentation

#define ADD2HEAP (   n,
  c,
  p 
)
Value:
((parser->heap = (n))->u1.node = (p), \
(n)->u3.cnt = (c), (p))
ssize_t n
Definition: bigdecimal.c:5655
Win32OLEIDispatch * p
Definition: win32ole.c:786
struct parser_params * parser
Definition: ripper.c:4578
VpDivd * c
Definition: bigdecimal.c:1205
NODE * heap
Definition: ripper.c:523

Definition at line 16447 of file parse.c.

Referenced by rb_parser_calloc(), rb_parser_malloc(), and rb_parser_realloc().

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

Definition at line 12404 of file parse.c.

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

Definition at line 12068 of file parse.c.

Referenced by arg_ambiguous_gen(), and parser_yylex().

#define arg_append (   h,
  t 
)    arg_append_gen(parser,(h),(t))

Definition at line 681 of file parse.c.

Referenced by arg_append_gen(), node_assign_gen(), and switch().

#define arg_concat (   h,
  t 
)    arg_concat_gen(parser,(h),(t))

Definition at line 683 of file parse.c.

Referenced by arg_concat_gen(), and switch().

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

Definition at line 790 of file parse.c.

Referenced by new_args_tail_gen(), and switch().

#define aryset (   node1,
  node2 
)    aryset_gen(parser, (node1), (node2))

Definition at line 718 of file parse.c.

Referenced by switch().

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

Definition at line 715 of file parse.c.

Referenced by reg_named_capture_assign_iter(), and switch().

#define assignable_result (   x)    (x)

Referenced by switch().

#define attrset (   node,
  id 
)    attrset_gen(parser, (node), (id))

Definition at line 720 of file parse.c.

Referenced by switch().

#define BIT (   c,
  idx 
)    (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)

Definition at line 11728 of file parse.c.

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

Definition at line 402 of file parse.c.

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

Definition at line 401 of file parse.c.

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

Definition at line 400 of file parse.c.

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

Definition at line 403 of file parse.c.

#define block_append (   h,
  t 
)    block_append_gen(parser,(h),(t))
#define block_dup_check (   n1,
  n2 
)    block_dup_check_gen(parser,(n1),(n2))

Definition at line 672 of file parse.c.

Referenced by switch().

#define brace_nest   (parser->parser_brace_nest)

Definition at line 610 of file parse.c.

Referenced by parser_yylex(), and switch().

#define call_bin_op (   recv,
  id,
  arg1 
)    call_bin_op_gen(parser, (recv),(id),(arg1))

Definition at line 694 of file parse.c.

Referenced by switch().

#define call_uni_op (   recv,
  id 
)    call_uni_op_gen(parser, (recv),(id))

Definition at line 696 of file parse.c.

Referenced by switch().

#define calloc   YYCALLOC

Definition at line 334 of file parse.c.

#define class_nest   (parser->parser_class_nest)

Definition at line 607 of file parse.c.

#define CMDARG_LEXPOP ( )    BITSTACK_LEXPOP(cmdarg_stack)

Definition at line 412 of file parse.c.

Referenced by parser_yylex().

#define CMDARG_P ( )    BITSTACK_SET_P(cmdarg_stack)

Definition at line 413 of file parse.c.

Referenced by parser_yylex().

#define CMDARG_POP ( )    BITSTACK_POP(cmdarg_stack)

Definition at line 411 of file parse.c.

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

Definition at line 410 of file parse.c.

Referenced by parser_yylex(), and switch().

#define cmdarg_stack   (parser->parser_cmdarg_stack)

Definition at line 606 of file parse.c.

Referenced by switch().

#define command_start   (parser->parser_command_start)

Definition at line 627 of file parse.c.

#define compile_error   parser->nerr++,rb_compile_error_with_enc
#define compile_for_eval   (parser->parser_compile_for_eval)
#define cond (   node)    cond_gen(parser, (node))

Definition at line 654 of file parse.c.

Referenced by switch(), and value_expr_gen().

#define COND_LEXPOP ( )    BITSTACK_LEXPOP(cond_stack)

Definition at line 407 of file parse.c.

Referenced by parser_yylex().

#define COND_P ( )    BITSTACK_SET_P(cond_stack)

Definition at line 408 of file parse.c.

Referenced by parser_yylex().

#define COND_POP ( )    BITSTACK_POP(cond_stack)

Definition at line 406 of file parse.c.

Referenced by switch().

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

Definition at line 405 of file parse.c.

Referenced by parser_yylex(), and switch().

#define cond_stack   (parser->parser_cond_stack)

Definition at line 605 of file parse.c.

Referenced by switch().

#define cur_mid   (parser->parser_cur_mid)

Definition at line 614 of file parse.c.

Referenced by switch().

#define current_enc   (parser->enc)
#define DEF_EXPR (   n)    EXPR_##n = (1 << EXPR_##n##_bit)

Definition at line 375 of file parse.c.

#define deferred_nodes   (parser->parser_deferred_nodes)

Definition at line 628 of file parse.c.

#define dispatch_heredoc_end ( )    ((void)0)

Definition at line 11953 of file parse.c.

Referenced by parser_here_document().

#define dsym_node (   node)    dsym_node_gen(parser, (node))

Definition at line 710 of file parse.c.

Referenced by switch().

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

Definition at line 807 of file parse.c.

Referenced by shadowing_lvar_gen(), and switch().

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

Definition at line 804 of file parse.c.

Referenced by gettable_gen(), reg_named_capture_assign_iter(), and switch().

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

Definition at line 805 of file parse.c.

Referenced by lvar_defined_gen(), and shadowing_lvar_gen().

#define DVARS_INHERIT   ((void*)1)

Definition at line 429 of file parse.c.

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

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

Definition at line 431 of file parse.c.

#define DVARS_TOPSCOPE   NULL

Definition at line 430 of file parse.c.

Referenced by dyna_in_block_gen(), and local_push_gen().

#define dyna_in_block ( )    dyna_in_block_gen(parser)

Definition at line 801 of file parse.c.

Referenced by gettable_gen(), lvar_defined_gen(), shadowing_lvar_gen(), and switch().

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

Definition at line 799 of file parse.c.

#define dyna_push ( )    dyna_push_gen(parser)

Definition at line 797 of file parse.c.

Referenced by switch().

#define dyna_var (   id)    local_var(id)

Definition at line 802 of file parse.c.

Referenced by new_bv_gen(), and switch().

#define ENABLE_SELECTOR_NAMESPACE   0

Definition at line 15519 of file parse.c.

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

Definition at line 595 of file parse.c.

Referenced by parser_yylex().

#define END_OF_INPUT   0

Definition at line 185 of file parse.c.

#define ESCAPE_CONTROL   1

Definition at line 11322 of file parse.c.

Referenced by parser_read_escape(), and parser_tokadd_escape().

#define ESCAPE_META   2

Definition at line 11323 of file parse.c.

Referenced by parser_read_escape(), and parser_tokadd_escape().

#define evstr2dstr (   n)    evstr2dstr_gen(parser,(n))

Definition at line 690 of file parse.c.

Referenced by switch().

#define flush_string_content (   enc)    ((void)(enc))

Definition at line 11721 of file parse.c.

Referenced by parser_here_document(), and parser_parse_string().

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

Definition at line 777 of file parse.c.

Referenced by switch().

#define free   YYFREE

Definition at line 335 of file parse.c.

#define get_id (   id)    (id)

Definition at line 750 of file parse.c.

Referenced by switch().

#define get_value (   val)    (val)

Definition at line 751 of file parse.c.

#define gettable (   id)    gettable_gen(parser,(id))
#define HEAPCNT (   n,
  size 
)    ((n) * (size) / sizeof(YYSTYPE))

Definition at line 16445 of file parse.c.

Referenced by rb_parser_calloc(), rb_parser_malloc(), and rb_parser_realloc().

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

Definition at line 10597 of file parse.c.

Referenced by parser_yylex().

#define heredoc_end   (parser->parser_heredoc_end)

Definition at line 626 of file parse.c.

Referenced by parser_heredoc_restore(), and parser_nextc().

#define heredoc_identifier ( )    parser_heredoc_identifier(parser)

Definition at line 10598 of file parse.c.

Referenced by parser_yylex().

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

Definition at line 10599 of file parse.c.

Referenced by parser_here_document().

#define id_type (   id)    (is_notop_id(id) ? (int)((id)&ID_SCOPE_MASK) : -1)

Definition at line 352 of file parse.c.

Referenced by gettable_gen().

#define ifndef_ripper (   x)    (x)

Definition at line 917 of file parse.c.

Referenced by local_push_gen(), and switch().

#define in_def   (parser->parser_in_def)

Definition at line 612 of file parse.c.

Referenced by switch().

#define in_defined   (parser->parser_in_defined)

Definition at line 615 of file parse.c.

Referenced by switch().

#define in_single   (parser->parser_in_single)

Definition at line 611 of file parse.c.

Referenced by switch().

#define internal_id ( )    internal_id_gen(parser)

Definition at line 794 of file parse.c.

Referenced by new_args_tail_gen(), and switch().

#define IS_AFTER_OPERATOR ( )    IS_lex_state(EXPR_FNAME | EXPR_DOT)

Definition at line 12401 of file parse.c.

Referenced by parser_yylex().

#define IS_ARG ( )    IS_lex_state(EXPR_ARG_ANY)

Definition at line 12395 of file parse.c.

Referenced by parser_yylex().

#define is_asgn_or_id (   id)
Value:
((is_notop_id(id)) && \
(((id)&ID_SCOPE_MASK) == ID_GLOBAL || \
((id)&ID_SCOPE_MASK) == ID_INSTANCE || \
((id)&ID_SCOPE_MASK) == ID_CLASS))
#define is_notop_id(id)
Definition: parse.c:344
#define ID_INSTANCE
#define ID_GLOBAL
#define ID_CLASS
const int id
Definition: nkf.c:209
#define ID_SCOPE_MASK

Definition at line 354 of file parse.c.

Referenced by new_op_assign_gen().

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

Definition at line 348 of file parse.c.

Referenced by intern_str(), rb_id2str(), and rb_is_attrset_id().

#define IS_BEG ( )    IS_lex_state(EXPR_BEG_ANY)

Definition at line 12397 of file parse.c.

Referenced by parser_yylex().

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

Definition at line 350 of file parse.c.

Referenced by rb_is_class_id().

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

Definition at line 349 of file parse.c.

Referenced by rb_is_const_id().

#define IS_END ( )    IS_lex_state(EXPR_END_ANY)

Definition at line 12396 of file parse.c.

Referenced by parser_yylex().

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

Definition at line 346 of file parse.c.

Referenced by rb_is_global_id().

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

Definition at line 10696 of file parse.c.

Referenced by intern_str(), is_special_global_name(), parser_yylex(), and rb_enc_symname_type().

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

Definition at line 347 of file parse.c.

Referenced by rb_is_instance_id().

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

Definition at line 351 of file parse.c.

Referenced by rb_is_junk_id().

#define IS_LABEL_POSSIBLE ( )    ((IS_lex_state(EXPR_BEG | EXPR_ENDFN) && !cmd_state) || IS_ARG())

Definition at line 12399 of file parse.c.

Referenced by parser_yylex().

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

Definition at line 12400 of file parse.c.

Referenced by parser_yylex().

#define IS_lex_state (   ls)    IS_lex_state_for(lex_state, (ls))

Definition at line 392 of file parse.c.

Referenced by parser_yylex().

#define IS_lex_state_for (   x,
  ls 
)    ((x) & (ls))

Definition at line 391 of file parse.c.

Referenced by parser_yylex().

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

Definition at line 344 of file parse.c.

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

Definition at line 12398 of file parse.c.

Referenced by parser_yylex().

#define keyword__ENCODING__   306

Definition at line 234 of file parse.c.

#define keyword__FILE__   305

Definition at line 233 of file parse.c.

#define keyword__LINE__   304

Definition at line 232 of file parse.c.

#define keyword_alias   300

Definition at line 228 of file parse.c.

#define keyword_and   292

Definition at line 220 of file parse.c.

#define keyword_begin   262

Definition at line 190 of file parse.c.

#define keyword_BEGIN   302

Definition at line 230 of file parse.c.

#define keyword_break   276

Definition at line 204 of file parse.c.

#define keyword_case   271

Definition at line 199 of file parse.c.

#define keyword_class   258

Definition at line 186 of file parse.c.

#define keyword_def   260

Definition at line 188 of file parse.c.

#define keyword_defined   301

Definition at line 229 of file parse.c.

#define keyword_do   281

Definition at line 209 of file parse.c.

#define keyword_do_block   283

Definition at line 211 of file parse.c.

#define keyword_do_cond   282

Definition at line 210 of file parse.c.

#define keyword_do_LAMBDA   284

Definition at line 212 of file parse.c.

#define keyword_else   270

Definition at line 198 of file parse.c.

#define keyword_elsif   269

Definition at line 197 of file parse.c.

#define keyword_end   265

Definition at line 193 of file parse.c.

#define keyword_END   303

Definition at line 231 of file parse.c.

#define keyword_ensure   264

Definition at line 192 of file parse.c.

#define keyword_false   291

Definition at line 219 of file parse.c.

#define keyword_for   275

Definition at line 203 of file parse.c.

#define keyword_if   266

Definition at line 194 of file parse.c.

#define keyword_in   280

Definition at line 208 of file parse.c.

#define keyword_module   259

Definition at line 187 of file parse.c.

#define keyword_next   277

Definition at line 205 of file parse.c.

#define keyword_nil   289

Definition at line 217 of file parse.c.

#define keyword_not   294

Definition at line 222 of file parse.c.

#define keyword_or   293

Definition at line 221 of file parse.c.

#define keyword_redo   278

Definition at line 206 of file parse.c.

#define keyword_rescue   263

Definition at line 191 of file parse.c.

#define keyword_retry   279

Definition at line 207 of file parse.c.

#define keyword_return   285

Definition at line 213 of file parse.c.

#define keyword_self   288

Definition at line 216 of file parse.c.

#define keyword_super   287

Definition at line 215 of file parse.c.

#define keyword_then   268

Definition at line 196 of file parse.c.

#define keyword_true   290

Definition at line 218 of file parse.c.

#define keyword_undef   261

Definition at line 189 of file parse.c.

#define keyword_unless   267

Definition at line 195 of file parse.c.

#define keyword_until   274

Definition at line 202 of file parse.c.

#define keyword_when   272

Definition at line 200 of file parse.c.

#define keyword_while   273

Definition at line 201 of file parse.c.

#define keyword_yield   286

Definition at line 214 of file parse.c.

#define lex_eol_p ( )    (lex_p >= lex_pend)

Definition at line 11118 of file parse.c.

Referenced by parser_yylex().

#define lex_gets   (parser->parser_lex_gets)

Definition at line 630 of file parse.c.

Referenced by parser_compile_string(), and rb_parser_compile_file().

#define lex_gets_ptr   (parser->parser_lex_gets_ptr)

Definition at line 629 of file parse.c.

Referenced by lex_get_str(), and parser_compile_string().

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

Definition at line 620 of file parse.c.

Referenced by parser_compile_string(), parser_nextc(), and rb_parser_compile_file().

#define lex_lastline   (parser->parser_lex_lastline)
#define lex_nextline   (parser->parser_lex_nextline)

Definition at line 622 of file parse.c.

Referenced by parser_nextc(), parser_yylex(), and yycompile0().

#define lex_p   (parser->parser_lex_p)
#define lex_pbeg   (parser->parser_lex_pbeg)
#define lex_pend   (parser->parser_lex_pend)
#define lex_state   (parser->parser_lex_state)

Definition at line 604 of file parse.c.

#define lex_strterm   (parser->parser_lex_strterm)
#define list_append (   l,
  i 
)    list_append_gen(parser,(l),(i))

Definition at line 677 of file parse.c.

Referenced by arg_append_gen(), evstr2dstr_gen(), literal_concat_gen(), and switch().

#define list_concat (   h,
  t 
)    list_concat_gen(parser,(h),(t))

Definition at line 679 of file parse.c.

Referenced by arg_concat_gen(), literal_concat_gen(), and switch().

#define literal_concat (   h,
  t 
)    literal_concat_gen(parser,(h),(t))

Definition at line 685 of file parse.c.

Referenced by switch().

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

Definition at line 786 of file parse.c.

Referenced by switch().

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

Definition at line 784 of file parse.c.

Referenced by switch().

#define local_tbl ( )    local_tbl_gen(parser)

Definition at line 737 of file parse.c.

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

Definition at line 788 of file parse.c.

Referenced by switch().

#define logop (   type,
  node1,
  node2 
)    logop_gen(parser, (type), (node1), (node2))

Definition at line 656 of file parse.c.

Referenced by switch().

#define lpar_beg   (parser->parser_lpar_beg)

Definition at line 609 of file parse.c.

Referenced by parser_yylex(), and switch().

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

Definition at line 810 of file parse.c.

Referenced by parser_yylex().

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

Definition at line 14201 of file parse.c.

Referenced by dvar_defined_gen(), local_id_gen(), shadowing_lvar_gen(), and warn_unused_var().

#define lvtbl   (parser->parser_lvtbl)
#define malloc   YYMALLOC

Definition at line 332 of file parse.c.

#define match_op (   node1,
  node2 
)    match_op_gen(parser, (node1), (node2))

Definition at line 734 of file parse.c.

Referenced by switch().

#define mixed_error (   enc1,
  enc2 
)
Value:
if (!errbuf) { \
size_t len = sizeof(mixed_msg) - 4; \
errbuf = ALLOCA_N(char, len); \
snprintf(errbuf, len, mixed_msg, \
rb_enc_name(enc1), \
yyerror(errbuf); \
}
size_t strlen(const char *)
gz enc2
Definition: zlib.c:2272
#define rb_enc_name(enc)
#define ALLOCA_N(type, n)
#define yyerror(msg)
Definition: parse.c:599
#define snprintf
size_t len
Definition: tcltklib.c:3568

Referenced by parser_tokadd_string().

#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)
gz enc2
Definition: zlib.c:2272
#define mixed_error(enc1, enc2)
#define const
Definition: strftime.c:102
#define lex_p
Definition: parse.c:624

Referenced by parser_tokadd_string().

#define modifier_if   295

Definition at line 223 of file parse.c.

#define modifier_rescue   299

Definition at line 227 of file parse.c.

#define modifier_unless   296

Definition at line 224 of file parse.c.

#define modifier_until   298

Definition at line 226 of file parse.c.

#define modifier_while   297

Definition at line 225 of file parse.c.

#define nd_func   u1.id

Definition at line 823 of file parse.c.

#define nd_nest   u3.cnt

Definition at line 830 of file parse.c.

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

Definition at line 829 of file parse.c.

Referenced by parser_parse_string().

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

Definition at line 827 of file parse.c.

Referenced by parser_parse_string().

#define new_args (   f,
  o,
  r,
  p,
  t 
)    new_args_gen(parser, (f),(o),(r),(p),(t))

Definition at line 699 of file parse.c.

Referenced by switch().

#define new_args_tail (   k,
  kr,
  b 
)    new_args_tail_gen(parser, (k),(kr),(b))

Definition at line 701 of file parse.c.

Referenced by switch().

#define new_attr_op_assign (   lhs,
  type,
  attr,
  op,
  rhs 
)    new_attr_op_assign_gen(parser, (lhs), (attr), (op), (rhs))

Definition at line 729 of file parse.c.

Referenced by switch().

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

Definition at line 781 of file parse.c.

Referenced by switch().

#define new_const_op_assign (   lhs,
  op,
  rhs 
)    new_const_op_assign_gen(parser, (lhs), (op), (rhs))

Definition at line 731 of file parse.c.

Referenced by switch().

#define new_evstr (   n)    new_evstr_gen(parser,(n))

Definition at line 688 of file parse.c.

Referenced by switch().

#define new_op_assign (   lhs,
  op,
  rhs 
)    new_op_assign_gen(parser, (lhs), (op), (rhs))

Definition at line 774 of file parse.c.

Referenced by switch().

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

Definition at line 11702 of file parse.c.

Referenced by parser_here_document(), and parser_yylex().

#define new_yield (   node)    new_yield_gen(parser, (node))

Definition at line 708 of file parse.c.

Referenced by switch().

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

Definition at line 16446 of file parse.c.

Referenced by rb_parser_calloc(), rb_parser_malloc(), and rb_parser_realloc().

#define newtok ( )    parser_newtok(parser)
#define nextc ( )    parser_nextc(parser)
#define no_digits ( )    do {yyerror("numeric literal without digits"); return 0;} while (0)

Referenced by parser_yylex().

#define node_assign (   node1,
  node2 
)    node_assign_gen(parser, (node1), (node2))

Definition at line 725 of file parse.c.

Referenced by reg_named_capture_assign_iter(), and switch().

#define NODE_HEREDOC   NODE_ARRAY /* 1, 3 to gc */

Definition at line 821 of file parse.c.

Referenced by parser_heredoc_identifier(), and parser_yylex().

#define NODE_STRTERM   NODE_ZARRAY /* nothing to gc */

Definition at line 820 of file parse.c.

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

Definition at line 326 of file parse.c.

Referenced by parser_magic_comment(), and rb_gc_mark_symbols().

#define op_tbl_count   numberof(op_tbl)

Definition at line 15516 of file parse.c.

Referenced by intern_str(), and rb_id2str().

#define paren_nest   (parser->parser_paren_nest)

Definition at line 608 of file parse.c.

Referenced by parser_yylex(), and switch().

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

Definition at line 10595 of file parse.c.

Referenced by parser_yylex().

#define PARSER_ARG   ruby_sourcefile, ruby_sourceline, current_enc,
#define PARSER_DEBUG   0

Definition at line 307 of file parse.c.

#define parser_encoding_name ( )    (current_enc->name)

Definition at line 10693 of file parse.c.

Referenced by parser_tokadd_mbchar().

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

Definition at line 10697 of file parse.c.

Referenced by parser_heredoc_identifier(), and parser_yylex().

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

Definition at line 10699 of file parse.c.

Referenced by parser_tokadd_string(), and parser_yylex().

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

Definition at line 10694 of file parse.c.

#define parser_precise_mbclen ( )    rb_enc_precise_mbclen((lex_p-1),lex_pend,current_enc)

Definition at line 10695 of file parse.c.

Referenced by parser_tokadd_mbchar().

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

Definition at line 13763 of file parse.c.

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

Definition at line 13756 of file parse.c.

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

Definition at line 11120 of file parse.c.

Referenced by parser_yylex().

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

Definition at line 916 of file parse.c.

Referenced by switch().

#define rb_backref_error (   n)    rb_backref_error_gen(parser,(n))

Definition at line 723 of file parse.c.

Referenced by switch().

#define rb_compile_error   rb_compile_error_with_enc

Definition at line 950 of file parse.c.

#define rb_node_newnode (   type,
  a1,
  a2,
  a3 
)    node_newnode(parser, (type), (a1), (a2), (a3))

Definition at line 651 of file parse.c.

#define rb_warn0 (   fmt)    rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt))

Definition at line 924 of file parse.c.

Referenced by cond0(), and switch().

#define rb_warn4S (   file,
  line,
  fmt,
  a 
)    rb_compile_warn((file), (line), (fmt), (a))

Definition at line 927 of file parse.c.

Referenced by warn_unused_var().

#define rb_warnI (   fmt,
  a 
)    rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a))

Definition at line 925 of file parse.c.

Referenced by parser_yylex().

#define rb_warning0 (   fmt)    rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt))

Definition at line 928 of file parse.c.

Referenced by arg_ambiguous_gen(), parser_yylex(), and value_expr_gen().

#define rb_warningS (   fmt,
  a 
)    rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt), (a))

Definition at line 929 of file parse.c.

Referenced by parser_yylex(), reg_named_capture_assign_iter(), and shadowing_lvar_gen().

#define rb_warnS (   fmt,
  a 
)    rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a))

Definition at line 926 of file parse.c.

Referenced by void_expr_gen().

#define RE_OPTION_ARG_ENCODING_NONE   32

Definition at line 818 of file parse.c.

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

Definition at line 814 of file parse.c.

Referenced by parser_regx_options().

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

Definition at line 815 of file parse.c.

Referenced by reg_fragment_setenc_gen().

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

Definition at line 816 of file parse.c.

Referenced by reg_fragment_setenc_gen().

#define RE_OPTION_ENCODING_SHIFT   8

Definition at line 813 of file parse.c.

#define RE_OPTION_MASK   0xff

Definition at line 817 of file parse.c.

Referenced by reg_compile_gen(), and switch().

#define RE_OPTION_ONCE   (1<<16)

Definition at line 812 of file parse.c.

Referenced by parser_regx_options(), and switch().

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

Definition at line 10591 of file parse.c.

Referenced by parser_read_escape(), parser_tokadd_string(), and parser_yylex().

#define realloc   YYREALLOC

Definition at line 333 of file parse.c.

#define reduce_nodes (   n)    reduce_nodes_gen(parser,(n))

Definition at line 670 of file parse.c.

Referenced by switch().

#define reg_compile (   str,
  options 
)    reg_compile_gen(parser, (str), (options))

Definition at line 742 of file parse.c.

Referenced by switch().

#define reg_fragment_check (   str,
  options 
)    reg_fragment_check_gen(parser, (str), (options))

Definition at line 746 of file parse.c.

Referenced by switch().

#define reg_fragment_setenc (   str,
  options 
)    reg_fragment_setenc_gen(parser, (str), (options))

Definition at line 744 of file parse.c.

Referenced by reg_compile_gen(), and reg_fragment_check_gen().

#define reg_named_capture_assign (   regexp,
  match 
)    reg_named_capture_assign_gen(parser,(regexp),(match))

Definition at line 748 of file parse.c.

Referenced by switch().

#define REGISTER_SYMID (   id,
  name 
)    register_symid((id), (name), strlen(name), enc)

Definition at line 340 of file parse.c.

#define regx_options ( )    parser_regx_options(parser)

Definition at line 10593 of file parse.c.

Referenced by parser_parse_string().

#define ret_args (   node)    ret_args_gen(parser, (node))

Definition at line 705 of file parse.c.

Referenced by switch().

#define ripper_flush (   p)    (void)(p)

Definition at line 10626 of file parse.c.

Referenced by parser_heredoc_identifier(), parser_heredoc_restore(), and parser_nextc().

#define ruby__end__seen   (parser->parser_ruby__end__seen)

Definition at line 632 of file parse.c.

Referenced by parser_yylex(), and rb_parser_end_seen_p().

#define ruby_coverage   (parser->coverage)

Definition at line 642 of file parse.c.

Referenced by lex_getline(), and yycompile0().

#define ruby_debug_lines   (parser->debug_lines)

Definition at line 641 of file parse.c.

Referenced by lex_getline(), parser_set_encode(), and yycompile0().

#define ruby_eval_tree   (parser->parser_eval_tree)

Definition at line 639 of file parse.c.

Referenced by switch(), and yycompile0().

#define ruby_eval_tree_begin   (parser->parser_eval_tree_begin)

Definition at line 640 of file parse.c.

Referenced by switch(), and yycompile0().

#define ruby_sourcefile   (parser->parser_ruby_sourcefile)

Definition at line 634 of file parse.c.

#define ruby_sourceline   (parser->parser_ruby_sourceline)

Definition at line 633 of file parse.c.

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

Definition at line 10605 of file parse.c.

Referenced by parser_yylex().

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

Definition at line 10607 of file parse.c.

Referenced by parser_yylex().

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

Definition at line 10606 of file parse.c.

Referenced by parser_yylex().

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

Definition at line 10608 of file parse.c.

Referenced by parser_yylex().

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

Definition at line 10604 of file parse.c.

Referenced by parser_parse_string().

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

Definition at line 10603 of file parse.c.

Referenced by parser_here_document(), parser_parse_string(), and parser_yylex().

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

Definition at line 779 of file parse.c.

Referenced by formal_argument_gen(), new_bv_gen(), and switch().

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

Definition at line 822 of file parse.c.

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

Definition at line 10690 of file parse.c.

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

Definition at line 11729 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 RSTRING_PTR(str)
VALUE rb_str_resize(VALUE, long)
Definition: string.c:1846
VP_EXPORT void
Definition: bigdecimal.c:5083
#define MEMCPY(p1, p2, type, n)
#define STR_NEW(p, n)
Definition: parse.c:591

Referenced by parser_magic_comment().

#define STR_FUNC_ESCAPE   0x01

Definition at line 11082 of file parse.c.

Referenced by parser_tokadd_string().

#define STR_FUNC_EXPAND   0x02

Definition at line 11083 of file parse.c.

Referenced by parser_here_document(), parser_parse_string(), and parser_tokadd_string().

#define STR_FUNC_INDENT   0x20

Definition at line 11087 of file parse.c.

Referenced by parser_here_document(), and parser_heredoc_identifier().

#define STR_FUNC_QWORDS   0x08

Definition at line 11085 of file parse.c.

Referenced by parser_parse_string(), and parser_tokadd_string().

#define STR_FUNC_REGEXP   0x04

Definition at line 11084 of file parse.c.

Referenced by parser_parse_string(), parser_str_new(), and parser_tokadd_string().

#define STR_FUNC_SYMBOL   0x10

Definition at line 11086 of file parse.c.

Referenced by parser_tokadd_string().

#define STR_NEW (   p,
  n 
)    rb_enc_str_new((p),(n),current_enc)

Definition at line 591 of file parse.c.

Referenced by parser_here_document(), and parser_heredoc_identifier().

#define STR_NEW0 ( )    rb_enc_str_new(0,0,current_enc)

Definition at line 592 of file parse.c.

Referenced by switch(), and yycompile0().

#define STR_NEW2 (   p)    rb_enc_str_new((p),strlen(p),current_enc)

Definition at line 593 of file parse.c.

Referenced by parser_yyerror().

#define STR_NEW3 (   p,
  n,
  e,
  func 
)    parser_str_new((p),(n),(e),(func),current_enc)

Definition at line 594 of file parse.c.

Referenced by parser_here_document(), parser_parse_string(), and parser_yylex().

#define subnodes (   n1,
  n2 
)
Value:
((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
(!node->n2) ? (body = &node->n1, 1) : \
(reduce_nodes(&node->n1), body = &node->n2, 1))
#define reduce_nodes(n)
Definition: parse.c:670

Referenced by reduce_nodes_gen().

#define tAMPER   335

Definition at line 280 of file parse.c.

#define tANDOP   321

Definition at line 258 of file parse.c.

#define tAREF   144

Definition at line 264 of file parse.c.

#define tASET   145

Definition at line 265 of file parse.c.

#define tASSOC   326

Definition at line 271 of file parse.c.

#define tBACK_REF   319

Definition at line 247 of file parse.c.

#define tCHAR   317

Definition at line 245 of file parse.c.

#define tCMP   134

Definition at line 252 of file parse.c.

#define tCOLON2   323

Definition at line 268 of file parse.c.

#define tCOLON3   324

Definition at line 269 of file parse.c.

#define tCONSTANT   311

Definition at line 239 of file parse.c.

#define tCVAR   312

Definition at line 240 of file parse.c.

#define tDOT2   128

Definition at line 262 of file parse.c.

#define tDOT3   129

Definition at line 263 of file parse.c.

#define tDSTAR   334

Definition at line 279 of file parse.c.

#define tEQ   139

Definition at line 253 of file parse.c.

#define tEQQ   140

Definition at line 254 of file parse.c.

#define tFID   308

Definition at line 236 of file parse.c.

#define tFLOAT   315

Definition at line 243 of file parse.c.

#define tGEQ   138

Definition at line 256 of file parse.c.

#define tGVAR   309

Definition at line 237 of file parse.c.

#define tIDENTIFIER   307

Definition at line 235 of file parse.c.

#define tINTEGER   314

Definition at line 242 of file parse.c.

#define tIVAR   310

Definition at line 238 of file parse.c.

#define tLABEL   313

Definition at line 241 of file parse.c.

#define tLAMBDA   336

Definition at line 281 of file parse.c.

#define tLAMBEG   349

Definition at line 294 of file parse.c.

#define tLAST_TOKEN   352

Definition at line 297 of file parse.c.

#define tLBRACE   331

Definition at line 276 of file parse.c.

#define tLBRACE_ARG   332

Definition at line 277 of file parse.c.

#define tLBRACK   330

Definition at line 275 of file parse.c.

#define tLEQ   137

Definition at line 257 of file parse.c.

#define tLOWEST   350

Definition at line 295 of file parse.c.

#define tLPAREN   327

Definition at line 272 of file parse.c.

#define tLPAREN_ARG   328

Definition at line 273 of file parse.c.

#define tLSHFT   135

Definition at line 266 of file parse.c.

#define tMATCH   142

Definition at line 260 of file parse.c.

#define tNEQ   141

Definition at line 255 of file parse.c.

#define tNMATCH   143

Definition at line 261 of file parse.c.

#define tNTH_REF   318

Definition at line 246 of file parse.c.

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

Definition at line 10590 of file parse.c.

Referenced by parser_read_escape(), and parser_tokadd_escape().

#define TOK_INTERN (   mb)    rb_intern3(tok(), toklen(), current_enc)

Definition at line 596 of file parse.c.

Referenced by parser_yylex().

#define tokadd (   c)    parser_tokadd(parser, (c))
#define tokadd_escape (   e)    parser_tokadd_escape(parser, (e))

Definition at line 10592 of file parse.c.

Referenced by parser_tokadd_string().

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

Definition at line 11553 of file parse.c.

Referenced by parser_heredoc_identifier(), parser_tokadd_string(), and parser_yylex().

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

Definition at line 10594 of file parse.c.

Referenced by parser_here_document(), and parser_parse_string().

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

Definition at line 10596 of file parse.c.

Referenced by parser_tokadd_utf8(), and parser_yylex().

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

Definition at line 11247 of file parse.c.

Referenced by parser_tokadd_escape(), parser_tokadd_mbchar(), and parser_tokadd_utf8().

#define token_info_pop (   token)    (RTEST(ruby_verbose) ? token_info_pop(parser, (token)) : (void)0)

Definition at line 968 of file parse.c.

#define token_info_push (   token)    (RTEST(ruby_verbose) ? token_info_push(parser, (token)) : (void)0)

Definition at line 967 of file parse.c.

#define tokenbuf   (parser->parser_tokenbuf)

Definition at line 616 of file parse.c.

Referenced by parser_newtok(), parser_tokadd(), and parser_tokspace().

#define tokfix ( )    (tokenbuf[tokidx]='\0')
#define tokidx   (parser->parser_tokidx)

Definition at line 617 of file parse.c.

Referenced by parser_newtok(), parser_tokadd(), parser_tokspace(), and parser_yylex().

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

Definition at line 11193 of file parse.c.

Referenced by parser_yylex().

#define toklen ( )    tokidx
#define tokline   (parser->parser_tokline)

Definition at line 619 of file parse.c.

Referenced by gettable_gen(), parser_newtok(), and switch().

#define toksiz   (parser->parser_toksiz)

Definition at line 618 of file parse.c.

Referenced by parser_newtok(), parser_tokadd(), and parser_tokspace().

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

Definition at line 10588 of file parse.c.

Referenced by parser_tokaddmbc().

#define tOP_ASGN   325

Definition at line 270 of file parse.c.

#define tOROP   322

Definition at line 259 of file parse.c.

#define tPOW   132

Definition at line 251 of file parse.c.

#define tQSYMBOLS_BEG   344

Definition at line 289 of file parse.c.

#define tQWORDS_BEG   342

Definition at line 287 of file parse.c.

#define tREGEXP_BEG   340

Definition at line 285 of file parse.c.

#define tREGEXP_END   320

Definition at line 248 of file parse.c.

#define tRPAREN   329

Definition at line 274 of file parse.c.

#define tRSHFT   136

Definition at line 267 of file parse.c.

#define tSTAR   333

Definition at line 278 of file parse.c.

#define tSTRING_BEG   338

Definition at line 283 of file parse.c.

#define tSTRING_CONTENT   316

Definition at line 244 of file parse.c.

#define tSTRING_DBEG   345

Definition at line 290 of file parse.c.

#define tSTRING_DEND   346

Definition at line 291 of file parse.c.

#define tSTRING_DVAR   347

Definition at line 292 of file parse.c.

#define tSTRING_END   348

Definition at line 293 of file parse.c.

#define tSYMBEG   337

Definition at line 282 of file parse.c.

#define tSYMBOLS_BEG   343

Definition at line 288 of file parse.c.

#define tUMINUS   131

Definition at line 250 of file parse.c.

#define tUMINUS_NUM   351

Definition at line 296 of file parse.c.

#define tUPLUS   130

Definition at line 249 of file parse.c.

#define tWORDS_BEG   341

Definition at line 286 of file parse.c.

#define tXSTRING_BEG   339

Definition at line 284 of file parse.c.

#define value_expr (   node)    value_expr_gen(parser, (node) = remove_begin(node))
#define void_expr (   node)    void_expr0((node) = remove_begin(node))

Definition at line 666 of file parse.c.

Referenced by switch().

#define void_expr0 (   node)    void_expr_gen(parser, (node))

Definition at line 665 of file parse.c.

Referenced by void_stmts_gen().

#define void_stmts (   node)    void_stmts_gen(parser, (node))

Definition at line 668 of file parse.c.

Referenced by switch().

#define VTBL_DEBUG   0

Definition at line 445 of file parse.c.

Referenced by vtable_add(), vtable_alloc(), and vtable_free().

#define warn_balanced (   op,
  syn 
)
Value:
((void) \
(!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN|EXPR_ENDARG) && \
space_seen && !ISSPACE(c) && \
(ambiguous_operator(op, syn), 0)))
#define ambiguous_operator(op, syn)
Definition: parse.c:12404
VP_EXPORT void
Definition: bigdecimal.c:5083
#define IS_lex_state_for(x, ls)
Definition: parse.c:391
VpDivd * c
Definition: bigdecimal.c:1205
#define ISSPACE(c)
Definition: ruby.h:1632

Definition at line 12410 of file parse.c.

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

Definition at line 11188 of file parse.c.

Referenced by parser_here_document(), and parser_yylex().

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

Definition at line 10600 of file parse.c.

Referenced by parser_here_document(), and parser_yylex().

#define YY_ (   msgid)    msgid

Definition at line 1074 of file parse.c.

#define YY_LOCATION_PRINT (   File,
  Loc 
)    ((void) 0)

Definition at line 4524 of file parse.c.

#define YY_REDUCE_PRINT (   Rule)
Value:
do { \
yy_reduce_print (yyvsp, Rule, parser); \
} while (YYID (0))
#define yydebug
Definition: parse.c:636
#define YYID(n)
Definition: ripper.c:1087
struct parser_params * parser
Definition: ripper.c:4578
if(RB_TYPE_P(r, T_FLOAT))
Definition: bigdecimal.c:1186
static void YYSTYPE * yyvsp
Definition: parse.c:4664

Definition at line 4685 of file parse.c.

#define YY_STACK_PRINT (   Bottom,
  Top 
)
Value:
do { \
yy_stack_print ((Bottom), (Top)); \
} while (YYID (0))
#define yydebug
Definition: parse.c:636
#define YYID(n)
Definition: ripper.c:1087
if(RB_TYPE_P(r, T_FLOAT))
Definition: bigdecimal.c:1186

Definition at line 4646 of file parse.c.

#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)
Value:
do { \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
Type, Value, parser); \
YYFPRINTF (stderr, "\n"); \
} \
} while (YYID (0))
#define yydebug
Definition: parse.c:636
#define YYID(n)
Definition: ripper.c:1087
struct parser_params * parser
Definition: ripper.c:4578
if(RB_TYPE_P(r, T_FLOAT))
Definition: bigdecimal.c:1186
#define YYFPRINTF
Definition: ripper.c:4542

Definition at line 4551 of file parse.c.

#define YYABORT   goto yyabortlab

Definition at line 4453 of file parse.c.

Referenced by for(), and if().

#define YYACCEPT   goto yyacceptlab

Definition at line 4452 of file parse.c.

#define YYBACKUP (   Token,
  Value 
)
Value:
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
goto yybackup; \
} \
{ \
parser_yyerror (parser, YY_("syntax error: cannot back up")); \
} \
while (YYID (0))
#define YY_(msgid)
Definition: ripper.c:1074
#define YYPOPSTACK(N)
Definition: ripper.c:5057
#define YYID(n)
Definition: ripper.c:1087
while(a->frac[0]/shift==0)
Definition: bigdecimal.c:5117
#define YYTRANSLATE(YYX)
Definition: parse.c:1247
int yytoken
Definition: ripper.c:5029
return yylen
Definition: ripper.c:4742
#define YYERROR
Definition: parse.c:4454
static int parser_yyerror(struct parser_params *, const char *)
Definition: parse.c:10776
#define YYEMPTY
Definition: parse.c:4449
struct parser_params * parser
Definition: ripper.c:4578
else
Definition: bigdecimal.c:1192
if(RB_TYPE_P(r, T_FLOAT))
Definition: bigdecimal.c:1186
#define yylval
Definition: ripper.c:10644
goto yybackup
Definition: ripper.c:5165
yychar
Definition: ripper.c:5075

Definition at line 4465 of file parse.c.

#define YYBISON   1

Definition at line 47 of file parse.c.

#define YYBISON_VERSION   "2.3"

Definition at line 50 of file parse.c.

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

Definition at line 330 of file parse.c.

#define yyclearin   (yychar = YYEMPTY)

Definition at line 4448 of file parse.c.

#define YYCOPY (   To,
  From,
  Count 
)
Value:
do \
{ \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (YYID (0))
#define YYID(n)
Definition: ripper.c:1087
int yyi
Definition: ripper.c:4668
while(a->frac[0]/shift==0)
Definition: bigdecimal.c:5117
for(v/=shifter=1)
Definition: bigdecimal.c:5677
#define YYSIZE_T
Definition: parse.c:1060

Definition at line 1200 of file parse.c.

#define YYDEBUG   1

Definition at line 309 of file parse.c.

#define yydebug   (parser->parser_yydebug)

Definition at line 636 of file parse.c.

#define YYDPRINTF (   Args)
Value:
do { \
YYFPRINTF Args; \
} while (YYID (0))
#define yydebug
Definition: parse.c:636
#define YYID(n)
Definition: ripper.c:1087
if(RB_TYPE_P(r, T_FLOAT))
Definition: bigdecimal.c:1186
#define YYFPRINTF
Definition: ripper.c:4542

Definition at line 4545 of file parse.c.

#define YYEMPTY   (-2)

Definition at line 4449 of file parse.c.

Referenced by if().

#define YYEOF   0

Definition at line 4450 of file parse.c.

Referenced by if().

#define YYERRCODE   256

Definition at line 4484 of file parse.c.

#define yyerrok   (yyerrstatus = 0)

Definition at line 4447 of file parse.c.

Referenced by switch().

#define yyerror (   msg)    parser_yyerror(parser, (msg))
#define YYERROR   goto yyerrorlab

Definition at line 4454 of file parse.c.

#define YYERROR_VERBOSE   1

Definition at line 983 of file parse.c.

#define YYERROR_VERBOSE   1

Definition at line 983 of file parse.c.

#define YYFAIL   goto yyerrlab

Definition at line 4461 of file parse.c.

#define YYFINAL   3

Definition at line 1230 of file parse.c.

#define YYFPRINTF   fprintf

Definition at line 4542 of file parse.c.

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

Definition at line 331 of file parse.c.

#define YYID (   n)    (n)

Definition at line 1087 of file parse.c.

#define YYINITDEPTH   200

Definition at line 4706 of file parse.c.

#define YYLAST   10982

Definition at line 1232 of file parse.c.

Referenced by for(), and yysyntax_error().

#define YYLEX   yylex (&yylval, YYLEX_PARAM)

Definition at line 4532 of file parse.c.

Referenced by if().

#define YYLEX_PARAM   parser

Definition at line 601 of file parse.c.

#define YYLLOC_DEFAULT (   Current,
  Rhs,
  N 
)
Value:
if (YYID (N)) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
} \
{ \
(Current).first_line = (Current).last_line = \
YYRHSLOC (Rhs, 0).last_line; \
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
while (YYID (0))
#define N
Definition: lgamma_r.c:20
#define YYRHSLOC(Rhs, K)
Definition: parse.c:4491
#define YYID(n)
Definition: ripper.c:1087
while(a->frac[0]/shift==0)
Definition: bigdecimal.c:5117
else
Definition: bigdecimal.c:1192
if(RB_TYPE_P(r, T_FLOAT))
Definition: bigdecimal.c:1186

Definition at line 4493 of file parse.c.

#define YYLSP_NEEDED   0

Definition at line 59 of file parse.c.

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

Definition at line 10576 of file parse.c.

#define yylval_id ( )    (yylval.id)

Definition at line 10609 of file parse.c.

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

Definition at line 328 of file parse.c.

#define YYMAXDEPTH   10000

Definition at line 4717 of file parse.c.

Referenced by if().

#define YYMAXUTOK   352

Definition at line 1245 of file parse.c.

#define YYNNTS   197

Definition at line 1237 of file parse.c.

#define YYNRULES   618

Definition at line 1239 of file parse.c.

#define YYNSTATES   1055

Definition at line 1241 of file parse.c.

#define YYNTOKENS   142

Definition at line 1235 of file parse.c.

Referenced by yysyntax_error().

#define YYPACT_NINF   -804

Definition at line 1988 of file parse.c.

Referenced by for(), and yysyntax_error().

#define yyparse   ruby_yyparse

Definition at line 648 of file parse.c.

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

Definition at line 5057 of file parse.c.

#define YYPURE   1

Definition at line 56 of file parse.c.

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

Definition at line 329 of file parse.c.

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 4463 of file parse.c.

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

Definition at line 4491 of file parse.c.

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 1064 of file parse.c.

Referenced by yysyntax_error().

#define YYSIZE_T   unsigned int

Definition at line 1060 of file parse.c.

Referenced by if(), yysyntax_error(), and yytnamerr().

#define YYSKELETON_NAME   "yacc.c"

Definition at line 53 of file parse.c.

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 1142 of file parse.c.

Referenced by if().

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 1145 of file parse.c.

Referenced by if().

#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
#define N
Definition: lgamma_r.c:20
#define YYSTACK_GAP_MAXIMUM
Definition: parse.c:1185
union YYSTYPE YYSTYPE
short int yytype_int16
Definition: ripper.c:1047

Definition at line 1189 of file parse.c.

Referenced by if().

#define YYSTACK_FREE   YYFREE

Definition at line 1143 of file parse.c.

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

Definition at line 1185 of file parse.c.

#define YYSTACK_RELOCATE (   Stack)
Value:
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (YYID (0))
#define YYCOPY(To, From, Count)
Definition: parse.c:1200
YYSIZE_T yystacksize
Definition: ripper.c:5059
#define YYSTACK_GAP_MAXIMUM
Definition: parse.c:1185
#define YYID(n)
Definition: ripper.c:1087
while(a->frac[0]/shift==0)
Definition: bigdecimal.c:5117
#define YYSIZE_T
Definition: parse.c:1060

Definition at line 1216 of file parse.c.

Referenced by if().

#define YYSTACK_USE_ALLOCA   0

Definition at line 311 of file parse.c.

#define YYTABLE_NINF   -619

Definition at line 2128 of file parse.c.

Referenced by if().

#define YYTERROR   1

Definition at line 4483 of file parse.c.

Referenced by for(), and yysyntax_error().

#define YYTOKEN_TABLE   0

Definition at line 990 of file parse.c.

#define YYTOKENTYPE

Definition at line 65 of file parse.c.

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

Definition at line 1247 of file parse.c.

Referenced by yysyntax_error().

#define YYUNDEFTOK   2

Definition at line 1244 of file parse.c.

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

Definition at line 1080 of file parse.c.

Typedef Documentation

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

Definition at line 12153 of file parse.c.

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

Definition at line 12154 of file parse.c.

typedef VALUE stack_type

Definition at line 398 of file parse.c.

typedef struct token_info token_info
typedef short int yytype_int16

Definition at line 1047 of file parse.c.

typedef short int yytype_int8

Definition at line 1035 of file parse.c.

typedef unsigned short int yytype_uint16

Definition at line 1041 of file parse.c.

typedef unsigned char yytype_uint8

Definition at line 1026 of file parse.c.

Enumeration Type Documentation

Enumerator
EXPR_BEG_bit 
EXPR_END_bit 
EXPR_ENDARG_bit 
EXPR_ENDFN_bit 
EXPR_ARG_bit 
EXPR_CMDARG_bit 
EXPR_MID_bit 
EXPR_FNAME_bit 
EXPR_DOT_bit 
EXPR_CLASS_bit 
EXPR_VALUE_bit 
EXPR_MAX_STATE 
EXPR_BEG_bit 
EXPR_END_bit 
EXPR_ENDARG_bit 
EXPR_ENDFN_bit 
EXPR_ARG_bit 
EXPR_CMDARG_bit 
EXPR_MID_bit 
EXPR_FNAME_bit 
EXPR_DOT_bit 
EXPR_CLASS_bit 
EXPR_VALUE_bit 
EXPR_MAX_STATE 
EXPR_BEG_bit 
EXPR_END_bit 
EXPR_ENDARG_bit 
EXPR_ENDFN_bit 
EXPR_ARG_bit 
EXPR_CMDARG_bit 
EXPR_MID_bit 
EXPR_FNAME_bit 
EXPR_DOT_bit 
EXPR_CLASS_bit 
EXPR_VALUE_bit 
EXPR_MAX_STATE 
EXPR_BEG_bit 
EXPR_END_bit 
EXPR_ENDARG_bit 
EXPR_ENDFN_bit 
EXPR_ARG_bit 
EXPR_CMDARG_bit 
EXPR_MID_bit 
EXPR_FNAME_bit 
EXPR_DOT_bit 
EXPR_CLASS_bit 
EXPR_VALUE_bit 
EXPR_MAX_STATE 

Definition at line 359 of file parse.c.

Enumerator
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
EXPR_BEG_ANY 
EXPR_ARG_ANY 
EXPR_END_ANY 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
EXPR_BEG_ANY 
EXPR_ARG_ANY 
EXPR_END_ANY 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
EXPR_BEG_ANY 
EXPR_ARG_ANY 
EXPR_END_ANY 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
DEF_EXPR 
EXPR_BEG_ANY 
EXPR_ARG_ANY 
EXPR_END_ANY 

Definition at line 374 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 

Definition at line 11089 of file parse.c.

Enumerator
END_OF_INPUT 
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 
tDSTAR 
tAMPER 
tLAMBDA 
tSYMBEG 
tSTRING_BEG 
tXSTRING_BEG 
tREGEXP_BEG 
tWORDS_BEG 
tQWORDS_BEG 
tSYMBOLS_BEG 
tQSYMBOLS_BEG 
tSTRING_DBEG 
tSTRING_DEND 
tSTRING_DVAR 
tSTRING_END 
tLAMBEG 
tLOWEST 
tUMINUS_NUM 
tLAST_TOKEN 
END_OF_INPUT 
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 
tDSTAR 
tAMPER 
tLAMBDA 
tSYMBEG 
tSTRING_BEG 
tXSTRING_BEG 
tREGEXP_BEG 
tWORDS_BEG 
tQWORDS_BEG 
tSYMBOLS_BEG 
tQSYMBOLS_BEG 
tSTRING_DBEG 
tSTRING_DEND 
tSTRING_DVAR 
tSTRING_END 
tLAMBEG 
tLOWEST 
tUMINUS_NUM 
tLAST_TOKEN 
END_OF_INPUT 
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 
tDSTAR 
tAMPER 
tLAMBDA 
tSYMBEG 
tSTRING_BEG 
tXSTRING_BEG 
tREGEXP_BEG 
tWORDS_BEG 
tQWORDS_BEG 
tSYMBOLS_BEG 
tQSYMBOLS_BEG 
tSTRING_DBEG 
tSTRING_DEND 
tSTRING_DVAR 
tSTRING_END 
tLAMBEG 
tLOWEST 
tUMINUS_NUM 
tLAST_TOKEN 
END_OF_INPUT 
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 
tDSTAR 
tAMPER 
tLAMBDA 
tSYMBEG 
tSTRING_BEG 
tXSTRING_BEG 
tREGEXP_BEG 
tWORDS_BEG 
tQWORDS_BEG 
tSYMBOLS_BEG 
tQSYMBOLS_BEG 
tSTRING_DBEG 
tSTRING_DEND 
tSTRING_DVAR 
tSTRING_END 
tLAMBEG 
tLOWEST 
tUMINUS_NUM 
tLAST_TOKEN 

Definition at line 68 of file parse.c.

Function Documentation

static void arg_ambiguous_gen ( struct parser_params parser)
static

Definition at line 12060 of file parse.c.

References arg_ambiguous, dispatch0(), and rb_warning0.

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

Definition at line 14876 of file parse.c.

Referenced by switch().

static NODE * arg_concat_gen ( struct parser_params parser,
NODE node1,
NODE node2 
)
static
static int arg_var_gen ( struct parser_params parser,
ID  id 
)
static

Definition at line 15121 of file parse.c.

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

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

Definition at line 14242 of file parse.c.

References nd_type, NEW_ATTRASGN, NODE_SELF, and tASET.

static int assign_in_cond ( struct parser_params parser,
NODE node 
)
static
static NODE* assignable_gen ( struct parser_params ,
ID  ,
NODE  
)
static
static NODE * attrset_gen ( struct parser_params parser,
NODE recv,
ID  id 
)
static

Definition at line 14266 of file parse.c.

References nd_type, NEW_ATTRASGN, NODE_SELF, and rb_id_attrset().

static NODE * block_append_gen ( struct parser_params parser,
NODE head,
NODE tail 
)
static
static void block_dup_check_gen ( struct parser_params parser,
NODE node1,
NODE node2 
)
static

Definition at line 14250 of file parse.c.

References compile_error, nd_type, NODE_BLOCK_PASS, and PARSER_ARG.

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

Definition at line 13985 of file parse.c.

References NEW_CALL, NEW_LIST, and value_expr.

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

Definition at line 13993 of file parse.c.

References NEW_CALL, and value_expr.

static int comment_at_top ( struct parser_params parser)
static
static NODE * cond0 ( struct parser_params parser,
NODE node 
)
static
static NODE * cond_gen ( struct parser_params parser,
NODE node 
)
static

Definition at line 14793 of file parse.c.

References cond0().

static VALUE coverage ( const char *  f,
int  n 
)
static
static VALUE debug_lines ( const char *  f)
static
static void dispose_string ( VALUE  str)
static

Definition at line 11533 of file parse.c.

References rb_gc_force_recycle(), and rb_str_free().

Referenced by parser_here_document(), and parser_heredoc_restore().

static NODE * dsym_node_gen ( struct parser_params parser,
NODE node 
)
static
static int dvar_curr_gen ( struct parser_params parser,
ID  id 
)
static

Definition at line 15246 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 15209 of file parse.c.

References DVARS_TOPSCOPE, lvtbl, and POINTER_P.

static void dyna_pop_1 ( struct parser_params parser)
static

Definition at line 15177 of file parse.c.

References lvtbl, tmp, 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 15195 of file parse.c.

References dyna_pop_1(), lvtbl, and xfree.

static struct vtable * dyna_push_gen ( struct parser_params parser)
static

Definition at line 15166 of file parse.c.

References lvtbl, and vtable_alloc().

static int e_option_supplied ( struct parser_params parser)
static
static NODE * evstr2dstr_gen ( struct parser_params parser,
NODE node 
)
static

Definition at line 13962 of file parse.c.

References list_append, nd_type, NEW_DSTR, NODE_EVSTR, and Qnil.

static void fixpos ( NODE node,
NODE orig 
)
static

Definition at line 13743 of file parse.c.

References nd_line, and nd_set_line.

static void fixup_nodes ( NODE **  rootnode)
static

Definition at line 14668 of file parse.c.

References head, nd_set_type, nd_type, NODE_DOT2, NODE_DOT3, NODE_LIT, rb_gc_force_recycle(), rb_range_new(), type, and val.

Referenced by switch().

for ( )

Definition at line 4675 of file parse.c.

for ( ;;  )

Definition at line 10481 of file parse.c.

References YY_STACK_PRINT, YYABORT, YYLAST, yyn, YYPACT_NINF, YYPOPSTACK, yyssp, yystate, and YYTERROR.

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

Definition at line 12071 of file parse.c.

References is_local_id, lhs, shadowing_lvar, and yyerror.

static NODE * gettable_gen ( struct parser_params parser,
ID  id 
)
static
if ( yyss+yystacksize-1<=  yyssp)
if ( yychar  = YYEMPTY)

Definition at line 5183 of file parse.c.

References YYDPRINTF, and YYLEX.

if ( yychar<=  YYEOF)

Definition at line 5189 of file parse.c.

References YYDPRINTF, and YYEOF.

if ( yyn<=  0)

Definition at line 5206 of file parse.c.

References yyerrlab, yyn, yyreduce, and YYTABLE_NINF.

if ( )

Definition at line 10397 of file parse.c.

References yymsgbuf, YYSIZE_T, YYSTACK_ALLOC, YYSTACK_ALLOC_MAXIMUM, and YYSTACK_FREE.

if ( yyerrstatus  = = 3)

Definition at line 10431 of file parse.c.

References YYABORT, YYEMPTY, and YYEOF.

void Init_sym ( void  )
static ID intern_str ( VALUE  str)
static
static ID internal_id_gen ( struct parser_params parser)
static

Definition at line 15594 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)
inlinestatic

Definition at line 11746 of file parse.c.

Referenced by is_special_global_name(), and parser_peek_variable_name().

static int is_private_local_id ( ID  name)
static

Definition at line 14191 of file parse.c.

References is_local_id, rb_id2str(), RSTRING_PTR, and s.

Referenced by shadowing_lvar_gen(), and warn_unused_var().

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

Definition at line 15603 of file parse.c.

References is_global_name_punct(), is_identchar, ISASCII, m, rb_enc_isdigit, and rb_enc_mbclen().

Referenced by intern_str(), and rb_enc_symname_type().

static int is_static_content ( NODE node)
static

Definition at line 14605 of file parse.c.

References nd_type, NODE_ARRAY, NODE_FALSE, NODE_HASH, NODE_LIT, NODE_NIL, NODE_STR, NODE_TRUE, and NODE_ZARRAY.

Referenced by assign_in_cond().

static VALUE lex_get_str ( struct parser_params parser,
VALUE  s 
)
static
static VALUE lex_getline ( struct parser_params parser)
static
static VALUE lex_io_gets ( struct parser_params parser,
VALUE  io 
)
static

Definition at line 11050 of file parse.c.

References rb_io_gets().

Referenced by rb_parser_compile_file().

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

Definition at line 13820 of file parse.c.

References last, list, and NEW_LIST.

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

Definition at line 13840 of file parse.c.

References head, last, and tail.

static int literal_concat0 ( struct parser_params parser,
VALUE  head,
VALUE  tail 
)
static
static NODE * literal_concat_gen ( struct parser_params parser,
NODE head,
NODE tail 
)
static
static int literal_node ( NODE node)
static

Definition at line 14715 of file parse.c.

References nd_type, NODE_DREGX, NODE_DREGX_ONCE, NODE_DSTR, NODE_DSYM, NODE_EVSTR, NODE_FALSE, NODE_LIT, NODE_NIL, NODE_STR, and NODE_TRUE.

Referenced by cond0().

static int local_id_gen ( struct parser_params parser,
ID  id 
)
static
static void local_pop_gen ( struct parser_params parser)
static

Definition at line 15076 of file parse.c.

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

static void local_push_gen ( struct parser_params parser,
int  inherit_dvars 
)
static
static ID * local_tbl_gen ( struct parser_params parser)
static

Definition at line 15106 of file parse.c.

References ALLOC_N, buf, cnt, lvtbl, vtable_size(), and vtable_tblcpy().

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

Definition at line 15128 of file parse.c.

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

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

Definition at line 14800 of file parse.c.

References nd_type, NEW_NODE, and value_expr.

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

Definition at line 12082 of file parse.c.

References dvar_defined_get, dyna_in_block, and local_id.

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

Definition at line 12157 of file parse.c.

References comment_at_top(), and parser_set_encode().

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

Definition at line 12201 of file parse.c.

Referenced by parser_magic_comment().

static NODE * match_op_gen ( struct parser_params parser,
NODE node1,
NODE node2 
)
static
static rb_encoding* must_be_ascii_compatible ( VALUE  s)
static
static NODE * negate_lit ( NODE node)
static

Definition at line 14848 of file parse.c.

References DBL2NUM, FIX2LONG, FLONUM_P, LONG2FIX, rb_funcall(), RFLOAT, RFLOAT_VALUE, T_BIGNUM, T_FIXNUM, T_FLOAT, tUMINUS, and TYPE.

Referenced by switch().

static NODE * new_args_gen ( struct parser_params parser,
NODE m,
NODE o,
ID  r,
NODE p,
NODE tail 
)
static
static NODE * new_args_tail_gen ( struct parser_params parser,
NODE k,
ID  kr,
ID  b 
)
static
static NODE * new_attr_op_assign_gen ( struct parser_params parser,
NODE lhs,
ID  attr,
ID  op,
NODE rhs 
)
static

Definition at line 14990 of file parse.c.

References fixpos(), NEW_OP_ASGN2, tANDOP, and tOROP.

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

Definition at line 14228 of file parse.c.

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

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

Definition at line 15006 of file parse.c.

References fixpos(), NEW_BEGIN, NEW_OP_CDECL, tANDOP, and tOROP.

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

Definition at line 13971 of file parse.c.

References head, nd_type, NEW_EVSTR, NODE_DSTR, NODE_EVSTR, and NODE_STR.

static NODE * new_op_assign_gen ( struct parser_params parser,
NODE lhs,
ID  op,
NODE rhs 
)
static
static NODE * new_yield_gen ( struct parser_params parser,
NODE node 
)
static

Definition at line 14840 of file parse.c.

References NEW_YIELD, and no_blockarg().

static NODE * newline_node ( NODE node)
static
static void no_blockarg ( struct parser_params parser,
NODE node 
)
static

Definition at line 14815 of file parse.c.

References compile_error, nd_type, NODE_BLOCK_PASS, and PARSER_ARG.

Referenced by new_yield_gen(), and ret_args_gen().

static NODE * node_assign_gen ( struct parser_params parser,
NODE lhs,
NODE rhs 
)
static
static NODE * node_newnode ( struct parser_params parser,
enum node_type  type,
VALUE  a0,
VALUE  a1,
VALUE  a2 
)
static

Definition at line 13713 of file parse.c.

References n, nd_set_line, rb_node_newnode, and ruby_sourceline.

static int nodeline ( NODE node)
static

Definition at line 13727 of file parse.c.

References nd_line.

Referenced by Init_sym().

static enum node_type nodetype ( NODE node)
static

Definition at line 13721 of file parse.c.

References nd_type.

Referenced by Init_sym().

static NODE* parser_compile_string ( volatile VALUE  vparser,
const char *  f,
VALUE  s,
int  line 
)
static
static long parser_encode_length ( struct parser_params parser,
const char *  name,
long  len 
)
static

Definition at line 12089 of file parse.c.

References len, and 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
static void parser_mark ( void ptr)
static
static size_t parser_memsize ( const void ptr)
static
static struct parser_params* parser_new ( void  )
static

Definition at line 16365 of file parse.c.

References ALLOC_N, MEMZERO, p, and parser_initialize().

Referenced by rb_parser_new().

static char* parser_newtok ( struct parser_params parser)
static

Definition at line 11196 of file parse.c.

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

static int parser_nextc ( struct parser_params parser)
inlinestatic
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 11179 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 11326 of file parse.c.

References c, 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 void parser_set_token_info ( struct parser_params parser,
const char *  name,
const char *  val 
)
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 11234 of file parse.c.

References c, lex_p, scan_hex, and yyerror.

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

Definition at line 11224 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 11424 of file parse.c.

References c, ESCAPE_CONTROL, ESCAPE_META, flags, 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 11251 of file parse.c.

References lex_p, nextc, peek, rb_utf8_encoding(), scan_hex, tokadd, tokaddmbc, tokcopy, and yyerror.

Referenced by parser_tokadd_string(), and parser_yylex().

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

Definition at line 11417 of file parse.c.

References len, rb_enc_codelen(), rb_enc_mbcput, and tokspace.

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

Definition at line 11212 of file parse.c.

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

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

Definition at line 13759 of file parse.c.

References nd_line, rb_compile_warn(), and ruby_sourcefile.

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

Definition at line 13752 of file parse.c.

References nd_line, rb_compile_warning(), and ruby_sourcefile.

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

Definition at line 11927 of file parse.c.

References FALSE, ISSPACE, len, lex_pbeg, lex_pend, and n.

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

Definition at line 12416 of file parse.c.

References arg_ambiguous, brace_nest, c, CMDARG_LEXPOP, CMDARG_P, CMDARG_PUSH, command_start, comment_at_top(), compile_error, COND_LEXPOP, COND_P, COND_PUSH, current_enc, d, DBL2NUM, enc, ENC_CODERANGE_7BIT, ENC_CODERANGE_UNKNOWN, ENC_SINGLE, parser_params::eofp, errno, EXPR_ARG_ANY, EXPR_BEG_ANY, FALSE, here_document, heredoc_identifier, kwtable::id, INT2FIX, IS_AFTER_OPERATOR, IS_ARG, IS_BEG, IS_END, is_identchar, IS_LABEL_POSSIBLE, IS_LABEL_SUFFIX, IS_lex_state, IS_lex_state_for, is_local_id, IS_SPCARG, ISALNUM, ISASCII, ISDIGIT, ISSPACE, ISUPPER, ISXDIGIT, k__END__, keyword_do, keyword_do_block, keyword_do_cond, keyword_do_LAMBDA, lex_eol_p, lex_goto_eol, lex_lastline, lex_nextline, lex_p, lex_pend, lex_state, lex_strterm, lpar_beg, lvar_defined, kwtable::name, nd_type, NEW_BACK_REF, NEW_NTH_REF, NEW_STRTERM, newtok, nextc, no_digits, NODE_HEREDOC, paren_nest, parse_string, PARSER_ARG, parser_is_identchar, parser_isascii, parser_magic_comment(), parser_tokadd_utf8(), peek, peek_n, pushback, Qtrue, rb_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, retry, 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, state, str_dquote, str_dsym, str_dword, STR_NEW3, str_regexp, str_squote, str_ssym, str_sword, str_xquote, strtod, tAMPER, tANDOP, tAREF, tASET, tASSOC, tBACK_REF, tCHAR, tCMP, tCOLON2, tCOLON3, tCOMMENT, tCONSTANT, tCVAR, tDOT2, tDOT3, tDSTAR, tEMBDOC, tEMBDOC_BEG, tEMBDOC_END, tEQ, tEQQ, tFID, tFLOAT, tGEQ, tGVAR, tIDENTIFIER, tIGNORED_NL, tINTEGER, tIVAR, tLABEL, tLAMBDA, tLAMBEG, tLBRACE, tLBRACE_ARG, tLBRACK, tLEQ, tLPAREN, tLPAREN_ARG, tLSHFT, tMATCH, tmp, tNEQ, tNMATCH, tNTH_REF, tok, TOK_INTERN, tokadd, tokadd_mbchar, tokaddmbc, token, tokfix, tokidx, toklast, toklen, tOP_ASGN, tOROP, tPOW, tQSYMBOLS_BEG, tQWORDS_BEG, tREGEXP_BEG, tREGEXP_END, tRSHFT, TRUE, tSP, tSTAR, tSTRING_BEG, tSTRING_DEND, tSTRING_END, tSYMBEG, tSYMBOLS_BEG, tUMINUS, tUMINUS_NUM, tUPLUS, tWORDS_BEG, tXSTRING_BEG, void, warn_balanced, was_bol, whole_match_p, and yyerror.

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

Definition at line 14699 of file parse.c.

References cond0(), FIXNUM_P, nd_type, NEW_CALL, NEW_GVAR, NEW_LIST, NODE_LIT, rb_intern, tEQ, type, value_expr, and warn_unless_e_option().

Referenced by cond0().

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

Definition at line 14274 of file parse.c.

References compile_error, nd_type, NODE_BACK_REF, NODE_NTH_REF, and PARSER_ARG.

ID rb_check_id ( volatile VALUE namep)

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

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

Definition at line 16094 of file parse.c.

References RString::as, RString::basic, RBasic::flags, global_symbols, RString::heap, id, RBasic::klass, name, NIL_P(), OBJ_FREEZE, rb_check_string_type(), rb_cString, rb_enc_copy(), rb_eTypeError, RB_GC_GUARD, rb_id_attrset(), rb_inspect(), rb_is_attrset_name(), rb_raise(), RB_TYPE_P, RSTRING_LEN, RSTRING_NOEMBED, RSTRING_PTR, st_lookup(), SYM2ID, sym_check_asciionly(), symbols::sym_id, SYMBOL_P, T_STRING, and tmp.

ID rb_check_id_cstr ( const char *  ptr,
long  len,
rb_encoding enc 
)
NODE* rb_compile_cstr ( const char *  f,
const char *  s,
int  len,
int  line 
)

Definition at line 11036 of file parse.c.

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

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

Definition at line 11056 of file parse.c.

References rb_parser_compile_file(), and rb_parser_new().

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

Definition at line 11022 of file parse.c.

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

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

Definition at line 15736 of file parse.c.

References rb_enc_symname_type().

int rb_enc_symname_p ( const char *  name,
rb_encoding enc 
)

Definition at line 15635 of file parse.c.

References rb_enc_symname2_p(), and strlen().

static int rb_enc_symname_type ( const char *  name,
long  len,
rb_encoding enc 
)
static
void rb_gc_mark_parser ( void  )

Definition at line 15412 of file parse.c.

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

Definition at line 16000 of file parse.c.

References rb_id2str(), and RSTRING_PTR.

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

Definition at line 14258 of file parse.c.

References id, and ID_ATTRSET.

ID rb_intern ( const char *  name)

Definition at line 15923 of file parse.c.

References rb_intern2(), and strlen().

ID rb_intern2 ( const char *  name,
long  len 
)

Definition at line 15916 of file parse.c.

References rb_intern3(), and rb_usascii_encoding().

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

Definition at line 15929 of file parse.c.

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

int rb_is_attrset_id ( ID  id)

Definition at line 16065 of file parse.c.

References is_attrset_id.

int rb_is_attrset_name ( VALUE  name)

Definition at line 16193 of file parse.c.

References ID_ATTRSET, and rb_str_symname_type().

int rb_is_class_id ( ID  id)

Definition at line 16047 of file parse.c.

References is_class_id.

int rb_is_class_name ( VALUE  name)

Definition at line 16175 of file parse.c.

References ID_CLASS, and rb_str_symname_type().

int rb_is_const_id ( ID  id)

Definition at line 16041 of file parse.c.

References is_const_id.

int rb_is_const_name ( VALUE  name)

Definition at line 16169 of file parse.c.

References ID_CONST, and rb_str_symname_type().

int rb_is_global_id ( ID  id)

Definition at line 16053 of file parse.c.

References is_global_id.

int rb_is_global_name ( VALUE  name)

Definition at line 16181 of file parse.c.

References ID_GLOBAL, and rb_str_symname_type().

int rb_is_instance_id ( ID  id)

Definition at line 16059 of file parse.c.

References is_instance_id.

int rb_is_instance_name ( VALUE  name)

Definition at line 16187 of file parse.c.

References ID_INSTANCE, and rb_str_symname_type().

int rb_is_junk_id ( ID  id)

Definition at line 16077 of file parse.c.

References is_junk_id.

int rb_is_junk_name ( VALUE  name)

Definition at line 16215 of file parse.c.

References rb_str_symname_type().

int rb_is_local_id ( ID  id)

Definition at line 16071 of file parse.c.

References is_local_id.

int rb_is_local_name ( VALUE  name)

Definition at line 16199 of file parse.c.

References ID_LOCAL, and rb_str_symname_type().

int rb_is_method_name ( VALUE  name)

Definition at line 16205 of file parse.c.

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

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

Definition at line 16461 of file parse.c.

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

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

Definition at line 11043 of file parse.c.

References parser_compile_string(), and rb_str_new().

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

Definition at line 11029 of file parse.c.

References must_be_ascii_compatible(), and parser_compile_string().

VALUE rb_parser_encoding ( VALUE  vparser)

Definition at line 16405 of file parse.c.

References current_enc, parser, rb_enc_from_encoding(), and TypedData_Get_Struct.

VALUE rb_parser_end_seen_p ( VALUE  vparser)

Definition at line 16390 of file parse.c.

References parser, Qfalse, Qtrue, ruby__end__seen, and TypedData_Get_Struct.

void rb_parser_free ( struct parser_params parser,
void ptr 
)

Definition at line 16491 of file parse.c.

References parser_params::heap, n, NULL, rb_gc_force_recycle(), and xfree.

VALUE rb_parser_get_yydebug ( VALUE  self)

Definition at line 16420 of file parse.c.

References parser, Qfalse, Qtrue, and TypedData_Get_Struct.

void* rb_parser_malloc ( struct parser_params parser,
size_t  size 
)

Definition at line 16451 of file parse.c.

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

VALUE rb_parser_new ( void  )

Definition at line 16376 of file parse.c.

References parser_new(), and TypedData_Wrap_Struct.

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

Definition at line 16435 of file parse.c.

References flag, parser, RTEST, and TypedData_Get_Struct.

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

Definition at line 16359 of file parse.c.

References reserved_word().

static int rb_str_symname_type ( VALUE  name)
static
VALUE rb_sym_all_symbols ( void  )
int rb_symname_p ( const char *  name)

Definition at line 15629 of file parse.c.

References rb_ascii8bit_encoding(), and rb_enc_symname_p().

static void reduce_nodes_gen ( struct parser_params parser,
NODE **  body 
)
static
static VALUE reg_compile_gen ( struct parser_params parser,
VALUE  str,
int  options 
)
static
static int reg_fragment_check_gen ( struct parser_params parser,
VALUE  str,
int  options 
)
static
static void reg_fragment_setenc_gen ( struct parser_params parser,
VALUE  str,
int  options 
)
static
static NODE * reg_named_capture_assign_gen ( struct parser_params parser,
VALUE  regexp,
NODE match 
)
static
static int reg_named_capture_assign_iter ( const OnigUChar name,
const OnigUChar name_end,
int  back_num,
int back_refs,
OnigRegex  regex,
void arg0 
)
static
static ID register_symid ( ID  id,
const char *  name,
long  len,
rb_encoding enc 
)
static

Definition at line 15752 of file parse.c.

References rb_enc_str_new(), and register_symid_str().

static ID register_symid_str ( ID  id,
VALUE  str 
)
static

Definition at line 15759 of file parse.c.

References global_symbols, id, symbols::id_str, OBJ_FREEZE, st_add_direct(), and symbols::sym_id.

Referenced by intern_str(), and register_symid().

static NODE * remove_begin ( NODE node)
static

Definition at line 14534 of file parse.c.

References n, nd_type, and NODE_BEGIN.

Referenced by newline_node(), and switch().

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

Definition at line 14823 of file parse.c.

References nd_set_type, nd_type, no_blockarg(), NODE_ARRAY, and NODE_VALUES.

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 int simple_re_meta ( int  c)
inlinestatic

Definition at line 11556 of file parse.c.

References FALSE, and TRUE.

Referenced by parser_tokadd_string().

static NODE * splat_array ( NODE node)
static

Definition at line 14330 of file parse.c.

References nd_type, NODE_ARRAY, and NODE_SPLAT.

Referenced by switch().

switch ( yytype  )

Definition at line 4590 of file parse.c.

switch ( yyn  )

Definition at line 5264 of file parse.c.

References ALLOC_N, arg_append, arg_blk_pass(), arg_concat, arg_var, args, aryset, assignable, attrset, block_append, block_dup_check, brace_nest, buf, call_bin_op, call_uni_op, CMDARG_PUSH, cmdarg_stack, command_start, compile_error, compile_for_eval, cond, COND_POP, COND_PUSH, cond_stack, cur_mid, deferred_nodes, dsym_node, dyna_in_block, dyna_pop, dyna_push, evstr2dstr, FIXNUM_P, fixpos(), fixup_nodes(), formal_argument, get_id, gettable, head, id, YYSTYPE::id, ID2SYM, idAREF, idEq, ifndef_ripper, in_def, in_defined, in_single, INT2FIX, internal_id, is_local_id, keyword__ENCODING__, keyword__FILE__, keyword__LINE__, keyword_false, keyword_nil, keyword_self, keyword_true, lex_state, lex_strterm, list, list_append, list_concat, literal_concat, literal_concat0(), local_id, local_pop, local_push, logop, lpar_beg, m, match_op, nd_args, nd_body, nd_iter, nd_lit, nd_next, nd_plen, nd_set_line, nd_set_type, nd_type, nd_value, negate_lit(), NEW_ALIAS, new_args, NEW_ARGS_AUX, new_args_tail, NEW_ARGSCAT, new_attr_op_assign, NEW_BEGIN, NEW_BLOCK_PASS, NEW_BREAK, new_bv, NEW_CALL, NEW_CASE, NEW_CDECL, NEW_CLASS, NEW_COLON2, NEW_COLON3, new_const_op_assign, NEW_CVAR, NEW_DASGN_CURR, NEW_DEFINED, NEW_DEFN, NEW_DEFS, NEW_DOT2, NEW_DOT3, NEW_DSTR, NEW_DVAR, NEW_ENSURE, NEW_ERRINFO, NEW_EVSTR, new_evstr, NEW_FCALL, NEW_FOR, NEW_GVAR, NEW_HASH, NEW_IF, NEW_ITER, NEW_IVAR, NEW_KW_ARG, NEW_LAMBDA, NEW_LIST, NEW_LIT, NEW_LVAR, NEW_MASGN, NEW_MODULE, NEW_NEXT, NEW_NIL, NEW_NODE, NEW_OP_ASGN1, new_op_assign, NEW_OPT_ARG, NEW_POSTARG, NEW_POSTEXE, NEW_REDO, NEW_RESBODY, NEW_RESCUE, NEW_RETRY, NEW_RETURN, NEW_SCLASS, NEW_SCOPE, NEW_SPLAT, NEW_STR, NEW_SUPER, NEW_UNDEF, NEW_UNLESS, NEW_UNTIL, NEW_VALIAS, NEW_WHEN, NEW_WHILE, NEW_XSTR, NEW_YIELD, new_yield, NEW_ZARRAY, NEW_ZSUPER, newline_node(), NIL_P(), YYSTYPE::node, NODE_AND, NODE_ARRAY, node_assign, NODE_BEGIN, NODE_BLOCK, NODE_BLOCK_PASS, NODE_DASGN, NODE_DASGN_CURR, NODE_DREGX, NODE_DREGX_ONCE, NODE_DSTR, NODE_DSYM, NODE_DXSTR, NODE_ENSURE, NODE_FL_NEWLINE, NODE_LASGN, NODE_LIT, NODE_MASGN, NODE_OR, NODE_RESCUE, NODE_SCOPE, NODE_SELF, NODE_STR, NODE_XSTR, NODE_YIELD, NODE_ZARRAY, NOEX_PRIVATE, NULL, YYSTYPE::num, one(), opts, paren_nest, PARSER_ARG, Qnil, Qnone, rb_backref_error, rb_cArray, rb_gc_force_recycle(), rb_intern, rb_intern2(), rb_intern_str, rb_parse_in_main(), rb_str_resize(), RB_TYPE_P, rb_warn0, RE_OPTION_MASK, RE_OPTION_ONCE, reduce_nodes, reg_compile, reg_fragment_check, reg_named_capture_assign, remove_begin(), ret_args, ripper_intern(), ruby_eval_tree, ruby_eval_tree_begin, ruby_sourceline, shadowing_lvar, splat_array(), src, STR_NEW0, T_REGEXP, tANDOP, tAREF, tASET, tbl, tCMP, tDSTAR, tEQ, tEQQ, tGEQ, tLEQ, tLSHFT, tMATCH, tNEQ, tNMATCH, token_info_pop, token_info_push, tokline, tOROP, tPOW, tRSHFT, TRUE, tUMINUS, tUPLUS, YYSTYPE::val, value_expr, YYSTYPE::vars, void_expr, void_stmts, yyerrok, yyerror, and zero().

static NODE* switch ( id  )
switch ( id_type(id )
static int sym_check_asciionly ( VALUE  str)
static
static int symbols_i ( VALUE  sym,
ID  value,
VALUE  ary 
)
static

Definition at line 16009 of file parse.c.

References ID2SYM, rb_ary_push(), and ST_CONTINUE.

Referenced by rb_sym_all_symbols().

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

Definition at line 10703 of file parse.c.

References lex_p, lex_pbeg, p, and strlen().

Referenced by token_info_pop(), and token_info_push().

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

Definition at line 10717 of file parse.c.

References lex_p, lex_pbeg, p, and strlen().

Referenced by token_info_pop(), and token_info_push().

static void token_info_pop ( struct parser_params parser,
const char *  token 
)
static
static void token_info_push ( struct parser_params parser,
const char *  token 
)
static
static int value_expr_gen ( struct parser_params parser,
NODE node 
)
static
static void void_expr_gen ( struct parser_params parser,
NODE node 
)
static
static void void_stmts_gen ( struct parser_params parser,
NODE node 
)
static

Definition at line 14520 of file parse.c.

References nd_type, NODE_BLOCK, RTEST, ruby_verbose, and void_expr0.

static void vtable_add ( struct vtable tbl,
ID  id 
)
static
static struct vtable* vtable_alloc ( struct vtable prev)
static

Definition at line 448 of file parse.c.

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

Referenced by dyna_push_gen(), and local_push_gen().

static void vtable_free ( struct vtable tbl)
static

Definition at line 460 of file parse.c.

References POINTER_P, vtable::tbl, 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 487 of file parse.c.

References i, 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 435 of file parse.c.

References POINTER_P, and vtable::pos.

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

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

Definition at line 15091 of file parse.c.

References buf, cnt, i, vtable::tbl, and vtable_size().

Referenced by local_tbl_gen().

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

Definition at line 14656 of file parse.c.

References e_option_supplied(), and parser_warn.

Referenced by cond0(), and range_op().

static void warn_unused_var ( struct parser_params parser,
struct local_vars local 
)
static
static void warning_unless_e_option ( struct parser_params parser,
NODE node,
const char *  str 
)
static

Definition at line 14662 of file parse.c.

References e_option_supplied(), and parser_warning.

Referenced by cond0().

while ( yyssp!  = yyss)

Definition at line 10552 of file parse.c.

References YYPOPSTACK.

yyexhaustedlab YY_ ( "memory exhausted"  )
YY_REDUCE_PRINT ( yyn  )
YY_STACK_PRINT ( yyss  ,
yyssp   
)
YY_SYMBOL_PRINT ( yymsg  ,
yytype  ,
yyvaluep  ,
yylocationp   
)
YY_SYMBOL_PRINT ( "Next token is"  ,
yytoken  ,
yylval,
yylloc 
)
YY_SYMBOL_PRINT ( "Shifting"  ,
yytoken  ,
yylval,
yylloc 
)
YY_SYMBOL_PRINT ( )
YY_SYMBOL_PRINT ( "Shifting"  ,
yystos  [yyn],
yyvsp  ,
yylsp   
)
yy_symbol_value_print ( yyoutput  ,
yytype  ,
yyvaluep  ,
parser   
)
static NODE* yycompile ( struct parser_params parser,
const char *  f,
int  line 
)
static
static VALUE yycompile0 ( VALUE  arg)
static
YYDPRINTF ( (stderr,"Starting parse\n")  )
YYDPRINTF ( (stderr,"Entering state %d\n", yystate)  )
else YYFPRINTF ( yyoutput  )
YYFPRINTF ( yyoutput  ,
 
)
YYFPRINTF ( stderr  ,
" %d"  ,
bottom 
)
YYFPRINTF ( stderr  ,
"\n"   
)
YYFPRINTF ( stderr  ,
"Reducing stack by rule %d (line %lu):\n ,
yyrule 1,
yylno   
)
return YYID ( yyresult  )
static int yylex ( void ,
void  
)
static
int yyparse ( )
YYPOPSTACK ( yylen  )
YYSTACK_FREE ( yyss  )
YYSTACK_FREE ( yymsg  )
static YYSIZE_T yysyntax_error ( char *  yyresult,
int  yystate,
int  yychar 
)
static
static YYSIZE_T yytnamerr ( char *  yyres,
const char *  yystr 
)
static

Definition at line 4784 of file parse.c.

References yyn, YYSIZE_T, and yystr.

Referenced by yysyntax_error().

YYUSE ( parser  )
YYUSE ( yyoutput  )

Variable Documentation

yynewstate __pad0__

Definition at line 5093 of file parse.c.

yyexhaustedlab __pad10__

Definition at line 10539 of file parse.c.

yyreturn __pad11__

Definition at line 10546 of file parse.c.

error __pad12__

Definition at line 14185 of file parse.c.

yysetstate __pad1__

Definition at line 5096 of file parse.c.

yybackup __pad2__

Definition at line 5176 of file parse.c.

yydefault __pad3__

Definition at line 5239 of file parse.c.

yyreduce __pad4__

Definition at line 5250 of file parse.c.

yyerrlab __pad5__

Definition at line 10391 of file parse.c.

yyerrorlab __pad6__

Definition at line 10464 of file parse.c.

yyerrlab1 __pad7__

Definition at line 10479 of file parse.c.

yyacceptlab __pad8__

Definition at line 10524 of file parse.c.

yyabortlab __pad9__

Definition at line 10531 of file parse.c.

void yytype_int16* bottom
static

Definition at line 4636 of file parse.c.

continue
Initial value:
{
return yylen
Definition: ripper.c:4742
#define YYSIZE_T
Definition: parse.c:1060

Definition at line 4738 of file parse.c.

else
Initial value:
{
#define YYTRANSLATE(YYX)
Definition: parse.c:1247
int yytoken
Definition: ripper.c:5029
yychar
Definition: ripper.c:5075

Definition at line 5195 of file parse.c.

struct symbols global_symbols = {tLAST_TOKEN}
static
int
static
Initial value:
{
struct parser_params *parser = (struct parser_params*)p
Win32OLEIDispatch * p
Definition: win32ole.c:786
struct parser_params * parser
Definition: ripper.c:4578

Definition at line 13690 of file parse.c.

struct magic_comment magic_comments[]
static
Initial value:
= {
{"warn_indent", parser_set_token_info},
}
static long parser_encode_length(struct parser_params *parser, const char *name, long len)
Definition: parse.c:12089
static void magic_comment_encoding(struct parser_params *parser, const char *name, const char *val)
Definition: parse.c:12157
static void parser_set_token_info(struct parser_params *parser, const char *name, const char *val)
Definition: parse.c:12166

Definition at line 12193 of file parse.c.

Referenced by parser_magic_comment().

const char* name

Definition at line 15491 of file parse.c.

struct { ... } op_tbl[]
Initial value:
= {
{tDOT2, ".."},
{tDOT3, "..."},
{'+', "+(binary)"},
{'-', "-(binary)"},
{tPOW, "**"},
{tDSTAR, "**"},
{tUPLUS, "+@"},
{tUMINUS, "-@"},
{tCMP, "<=>"},
{tGEQ, ">="},
{tLEQ, "<="},
{tEQ, "=="},
{tEQQ, "==="},
{tNEQ, "!="},
{tMATCH, "=~"},
{tNMATCH, "!~"},
{tAREF, "[]"},
{tASET, "[]="},
{tLSHFT, "<<"},
{tRSHFT, ">>"},
{tCOLON2, "::"},
}
#define tEQ
Definition: ripper.c:253
#define tEQQ
Definition: ripper.c:254
#define tMATCH
Definition: ripper.c:260
#define tCMP
Definition: ripper.c:252
#define tGEQ
Definition: ripper.c:256
#define tRSHFT
Definition: ripper.c:267
#define tNMATCH
Definition: ripper.c:261
#define tDOT2
Definition: ripper.c:262
#define tLEQ
Definition: ripper.c:257
#define tPOW
Definition: ripper.c:251
#define tAREF
Definition: ripper.c:264
#define tDOT3
Definition: ripper.c:263
#define tUPLUS
Definition: ripper.c:249
#define tASET
Definition: ripper.c:265
#define tNEQ
Definition: ripper.c:255
#define tCOLON2
Definition: ripper.c:268
#define tLSHFT
Definition: ripper.c:266
#define tUMINUS
Definition: ripper.c:250
#define tDSTAR
Definition: ripper.c:279

Referenced by intern_str(), and rb_id2str().

yyreturn parser

Definition at line 4578 of file parse.c.

static const rb_data_type_t parser_data_type
static
Initial value:
= {
"parser",
{
},
}
static size_t parser_memsize(const void *ptr)
Definition: parse.c:16322
static void parser_free(void *ptr)
Definition: parse.c:16302
static void parser_mark(void *ptr)
Definition: parse.c:16276

Definition at line 11000 of file parse.c.

parser parser_yylval = lval

Definition at line 13695 of file parse.c.

const unsigned int ruby_global_name_punct_bits[]
Initial value:
= {
}
#define SPECIAL_PUNCT(idx)
Definition: parse.c:11729

Definition at line 11724 of file parse.c.

struct st_hash_type symhash
static
Initial value:
= {
}
st_index_t rb_str_hash(VALUE)
Definition: string.c:2237
int rb_str_hash_cmp(VALUE, VALUE)
Definition: string.c:2247

Definition at line 15533 of file parse.c.

Definition at line 13692 of file parse.c.

ID token

Definition at line 15490 of file parse.c.

Definition at line 4637 of file parse.c.

Definition at line 13696 of file parse.c.

YYACCEPT

Definition at line 5215 of file parse.c.

goto yybackup

Definition at line 5165 of file parse.c.

yychar = YYEMPTY

Definition at line 5075 of file parse.c.

const yytype_int16 yycheck[]
static

Definition at line 3232 of file parse.c.

return yyd

Definition at line 4770 of file parse.c.

const yytype_uint16 yydefact[]
static

Definition at line 1851 of file parse.c.

goto yydefault

Definition at line 5178 of file parse.c.

const yytype_int16 yydefgoto[]
static
Initial value:
=
{
-1, 1, 2, 66, 67, 68, 236, 567, 568, 252,
253, 446, 254, 437, 70, 71, 358, 72, 73, 510,
690, 243, 75, 76, 255, 77, 78, 79, 467, 80,
209, 377, 378, 192, 193, 194, 195, 605, 556, 197,
82, 439, 211, 260, 228, 748, 426, 427, 225, 226,
213, 413, 428, 516, 83, 356, 259, 452, 625, 360,
848, 361, 849, 732, 988, 736, 733, 931, 594, 596,
746, 936, 245, 85, 86, 87, 88, 89, 90, 91,
92, 93, 94, 713, 570, 721, 845, 846, 369, 772,
773, 774, 960, 899, 803, 686, 687, 804, 970, 971,
278, 279, 472, 658, 779, 320, 511, 95, 96, 711,
704, 565, 557, 318, 508, 507, 577, 987, 715, 839,
917, 921, 97, 98, 99, 100, 101, 102, 103, 290,
485, 104, 294, 105, 106, 292, 296, 286, 284, 288,
477, 676, 675, 794, 892, 798, 107, 285, 108, 109,
216, 217, 112, 218, 219, 589, 735, 744, 881, 781,
745, 661, 662, 663, 664, 665, 806, 807, 666, 667,
668, 669, 809, 810, 670, 671, 672, 673, 674, 783,
396, 595, 265, 429, 221, 115, 629, 559, 399, 304,
423, 424, 706, 457, 571, 364, 257
}

Definition at line 1962 of file parse.c.

char* char* yydest
static

Definition at line 4760 of file parse.c.

goto yyerrlab

Definition at line 5241 of file parse.c.

goto yyerrlab1

Definition at line 10452 of file parse.c.

yyerrstatus = 0

Definition at line 5027 of file parse.c.

goto yyexhaustedlab

Definition at line 10423 of file parse.c.

int yyi
Initial value:
{
int yynrhs = yyr2[yyrule]
static const yytype_uint8 yyr2[]
Definition: parse.c:1782
int yyrule
Definition: ripper.c:4665

Definition at line 4668 of file parse.c.

yylen = 0

Definition at line 4742 of file parse.c.

unsigned long int yylno = yyrline[yyrule]

Definition at line 4671 of file parse.c.

yyreturn & yylval
Initial value:
{
int yychar
yychar
Definition: ripper.c:5075

Definition at line 5013 of file parse.c.

char * yymsg = "Deleting"
static

Definition at line 4945 of file parse.c.

YYSIZE_T yymsg_alloc = sizeof yymsgbuf

Definition at line 5034 of file parse.c.

char yymsgbuf[128]

Definition at line 5032 of file parse.c.

yyn = yytoken

Definition at line 5024 of file parse.c.

yynerrs = 0

Definition at line 5021 of file parse.c.

goto yynewstate

Definition at line 5232 of file parse.c.

static void FILE * yyoutput
static

Definition at line 4575 of file parse.c.

const yytype_int16 yypact[]
static

Definition at line 1989 of file parse.c.

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-804, -804, -804, -386, -804, 41, -804, -542, 285, -804,
527, -804, 35, -804, -310, -43, -70, 19, -804, -187,
-804, 680, 9, 887, -154, 27, -73, -804, -404, 6,
1733, -328, 886, -52, -804, -24, -804, -804, 13, -804,
1007, -804, 909, -804, -72, 271, -336, 141, 5, -804,
-320, -212, 58, -313, -21, -804, -804, -804, -804, -804,
-804, -804, -804, -804, -804, -804, -804, -804, -804, -804,
-804, -804, 49, -804, -804, -804, -804, -804, -804, -804,
-804, -804, -804, -520, -348, -519, -36, -634, -804, -803,
-773, 214, 300, 37, -804, -405, -804, -653, -804, -18,
-804, -804, -804, -804, -804, 246, -804, -804, -804, -804,
-804, -804, -804, -95, -804, -804, -535, -804, -22, -804,
-804, -804, -804, -804, -804, 908, -804, -804, -804, -804,
714, -804, -804, -804, -804, -804, -804, -804, 940, -804,
-116, -804, -804, -804, -804, -804, 2, -804, 7, -804,
1388, 1539, 906, 1901, 1724, -804, -804, 73, -450, -410,
-412, -769, -627, -718, -134, 228, 111, -804, -804, -804,
-83, -721, -786, 114, 233, -804, -574, -804, -463, -579,
-804, -804, -804, 102, -374, -804, -322, -804, 622, -29,
-15, -221, -578, -243, -62, -11, -2
}

Definition at line 2100 of file parse.c.

const yytype_uint16 yyprhs[]
static

Definition at line 1294 of file parse.c.

const yytype_uint16 yyr1[]
static

Definition at line 1715 of file parse.c.

const yytype_uint8 yyr2[]
static

Definition at line 1782 of file parse.c.

goto yyreduce

Definition at line 5242 of file parse.c.

yyresult = 2

Definition at line 5025 of file parse.c.

goto yyreturn

Definition at line 10525 of file parse.c.

const yytype_int16 yyrhs[]
static

Definition at line 1361 of file parse.c.

const yytype_uint16 yyrline[]
static

Definition at line 1556 of file parse.c.

int yyrule

Definition at line 4665 of file parse.c.

const char* yys = yysrc

Definition at line 4765 of file parse.c.

goto yysetstate

Definition at line 5085 of file parse.c.

const char* yysrc

Definition at line 4761 of file parse.c.

Definition at line 5047 of file parse.c.

Definition at line 5046 of file parse.c.

yyssp = yyss

Definition at line 5048 of file parse.c.

YYSIZE_T yystacksize = YYINITDEPTH

Definition at line 5059 of file parse.c.

yystate = 0

Definition at line 5023 of file parse.c.

const yytype_uint16 yystos[]
static

Definition at line 4337 of file parse.c.

YYSIZE_T const char* yystr
static

Definition at line 4736 of file parse.c.

Referenced by yytnamerr().

const yytype_int16 yytable[]
static

Definition at line 2129 of file parse.c.

const char* const yytname[]
static

Definition at line 1626 of file parse.c.

yyreturn yytoken = 0

Definition at line 5029 of file parse.c.

const yytype_uint8 yytranslate[]
static

Definition at line 1251 of file parse.c.

int yytype

Definition at line 4576 of file parse.c.

yyval = yyvsp[1-yylen]

Definition at line 5063 of file parse.c.

YYSTYPE* yyvaluep

Definition at line 4577 of file parse.c.

YYSTYPE* yyvs = yyvsa

Definition at line 5052 of file parse.c.

Definition at line 5051 of file parse.c.

* yyvsp = yyvs
static

Definition at line 4664 of file parse.c.