Ruby  2.5.0dev(2017-10-22revision60238)
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 "symbol.h"
#include "regenc.h"
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include "probes.h"
#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
 

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "2.3"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   1
 
#define YYLSP_NEEDED   1
 
#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 tRATIONAL   316
 
#define tIMAGINARY   317
 
#define tSTRING_CONTENT   318
 
#define tCHAR   319
 
#define tNTH_REF   320
 
#define tBACK_REF   321
 
#define tREGEXP_END   322
 
#define tUPLUS   130
 
#define tUMINUS   131
 
#define tPOW   132
 
#define tCMP   133
 
#define tEQ   138
 
#define tEQQ   139
 
#define tNEQ   140
 
#define tGEQ   137
 
#define tLEQ   136
 
#define tANDOP   146
 
#define tOROP   147
 
#define tMATCH   141
 
#define tNMATCH   142
 
#define tDOT2   128
 
#define tDOT3   129
 
#define tAREF   143
 
#define tASET   144
 
#define tLSHFT   134
 
#define tRSHFT   135
 
#define tANDDOT   148
 
#define tCOLON2   145
 
#define tCOLON3   323
 
#define tOP_ASGN   324
 
#define tASSOC   325
 
#define tLPAREN   326
 
#define tLPAREN_ARG   327
 
#define tRPAREN   328
 
#define tLBRACK   329
 
#define tLBRACE   330
 
#define tLBRACE_ARG   331
 
#define tSTAR   332
 
#define tDSTAR   333
 
#define tAMPER   334
 
#define tLAMBDA   335
 
#define tSYMBEG   336
 
#define tSTRING_BEG   337
 
#define tXSTRING_BEG   338
 
#define tREGEXP_BEG   339
 
#define tWORDS_BEG   340
 
#define tQWORDS_BEG   341
 
#define tSYMBOLS_BEG   342
 
#define tQSYMBOLS_BEG   343
 
#define tSTRING_DBEG   344
 
#define tSTRING_DEND   345
 
#define tSTRING_DVAR   346
 
#define tSTRING_END   347
 
#define tLAMBEG   348
 
#define tLABEL_END   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 WARN_PAST_SCOPE   0
 
#define TAB_WIDTH   8
 
#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 YYFPRINTF   rb_parser_printf
 
#define YY_LOCATION_PRINT(File, Loc)
 
#define malloc   YYMALLOC
 
#define realloc   YYREALLOC
 
#define calloc   YYCALLOC
 
#define free   YYFREE
 
#define DEF_EXPR(n)   EXPR_##n = (1 << EXPR_##n##_bit)
 
#define IS_lex_state_for(x, ls)   ((x) & (ls))
 
#define IS_lex_state_all_for(x, ls)   (((x) & (ls)) == (ls))
 
#define IS_lex_state(ls)   IS_lex_state_for(lex_state, (ls))
 
#define IS_lex_state_all(ls)   IS_lex_state_all_for(lex_state, (ls))
 
#define SET_LEX_STATE(ls)
 
#define SHOW_BITSTACK(stack, name)   (yydebug ? rb_parser_show_bitstack(parser, stack, name, __LINE__) : (void)0)
 
#define BITSTACK_PUSH(stack, n)   (((stack) = ((stack)<<1)|((n)&1)), SHOW_BITSTACK(stack, #stack"(push)"))
 
#define BITSTACK_POP(stack)   (((stack) = (stack) >> 1), SHOW_BITSTACK(stack, #stack"(pop)"))
 
#define BITSTACK_LEXPOP(stack)   (((stack) = ((stack) >> 1) | ((stack) & 1)), SHOW_BITSTACK(stack, #stack"(lexpop)"))
 
#define BITSTACK_SET_P(stack)   (SHOW_BITSTACK(stack, #stack), (stack)&1)
 
#define BITSTACK_SET(stack, n)   ((stack)=(n), SHOW_BITSTACK(stack, #stack"(set)"))
 
#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 COND_SET(n)   BITSTACK_SET(cond_stack, (n))
 
#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 CMDARG_SET(n)   BITSTACK_SET(cmdarg_stack, (n))
 
#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 intern_cstr(n, l, en)   rb_intern3(n,l,en)
 
#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 TOK_INTERN()   intern_cstr(tok(), toklen(), current_enc)
 
#define yyerror0(msg)   parser_yyerror(parser, (msg))
 
#define yyerror(yylloc, parser, msg)   yyerror0(msg)
 
#define token_flush(p)   ((p)->lex.ptok = (p)->lex.pcur)
 
#define lex_strterm   (parser->lex.strterm)
 
#define lex_state   (parser->lex.state)
 
#define cond_stack   (parser->cond_stack)
 
#define cmdarg_stack   (parser->cmdarg_stack)
 
#define paren_nest   (parser->lex.paren_nest)
 
#define lpar_beg   (parser->lex.lpar_beg)
 
#define brace_nest   (parser->lex.brace_nest)
 
#define in_single   (parser->in_single)
 
#define in_def   (parser->in_def)
 
#define in_main   (parser->in_main)
 
#define in_defined   (parser->in_defined)
 
#define tokenbuf   (parser->tokenbuf)
 
#define tokidx   (parser->tokidx)
 
#define toksiz   (parser->toksiz)
 
#define tokline   (parser->tokline)
 
#define lex_input   (parser->lex.input)
 
#define lex_lastline   (parser->lex.lastline)
 
#define lex_nextline   (parser->lex.nextline)
 
#define lex_pbeg   (parser->lex.pbeg)
 
#define lex_p   (parser->lex.pcur)
 
#define lex_pend   (parser->lex.pend)
 
#define heredoc_end   (parser->heredoc_end)
 
#define heredoc_indent   (parser->heredoc_indent)
 
#define heredoc_line_indent   (parser->heredoc_line_indent)
 
#define command_start   (parser->command_start)
 
#define lex_gets_ptr   (parser->lex.gets_ptr)
 
#define lex_gets   (parser->lex.gets)
 
#define lvtbl   (parser->lvtbl)
 
#define ruby__end__seen   (parser->ruby__end__seen)
 
#define ruby_sourceline   (parser->ruby_sourceline)
 
#define ruby_sourcefile   (parser->ruby_sourcefile)
 
#define ruby_sourcefile_string   (parser->ruby_sourcefile_string)
 
#define current_enc   (parser->enc)
 
#define current_arg   (parser->cur_arg)
 
#define yydebug   (parser->yydebug)
 
#define compile_for_eval   (parser->base_block != 0 && !in_main)
 
#define ruby_eval_tree   (parser->eval_tree)
 
#define ruby_eval_tree_begin   (parser->eval_tree_begin)
 
#define ruby_debug_lines   (parser->debug_lines)
 
#define ruby_coverage   (parser->coverage)
 
#define tokp   lex.ptok
 
#define token_column   ((int)(parser->tokp - lex_pbeg))
 
#define CALL_Q_P(q)   ((q) == TOKEN2VAL(tANDDOT))
 
#define NODE_CALL_Q(q)   (CALL_Q_P(q) ? NODE_QCALL : NODE_CALL)
 
#define NEW_QCALL(q, r, m, a)   NEW_NODE(NODE_CALL_Q(q),r,m,a)
 
#define lambda_beginning_p()   (lpar_beg && lpar_beg == paren_nest)
 
#define yyparse   ruby_yyparse
 
#define rb_node_newnode(type, a1, a2, a3)   node_newnode(parser, (type), (a1), (a2), (a3))
 
#define cond(node, column)   cond_gen(parser, (node), FALSE, column)
 
#define method_cond(node, column)   cond_gen(parser, (node), TRUE, column)
 
#define new_nil()   NEW_NIL()
 
#define new_if(cc, left, right, column)   new_if_gen(parser, (cc), (left), (right), (column))
 
#define new_unless(cc, left, right, column)   new_unless_gen(parser, (cc), (left), (right), (column))
 
#define logop(id, node1, node2, column)
 
#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, column)   block_append_gen(parser,(h),(t),(column))
 
#define list_append(l, i, column)   list_append_gen(parser,(l),(i),(column))
 
#define arg_append(h, t, column)   arg_append_gen(parser,(h),(t),(column))
 
#define arg_concat(h, t, column)   arg_concat_gen(parser,(h),(t),(column))
 
#define literal_concat(h, t, column)   literal_concat_gen(parser,(h),(t),(column))
 
#define new_evstr(n, column)   new_evstr_gen(parser,(n),(column))
 
#define evstr2dstr(n, column)   evstr2dstr_gen(parser,(n),(column))
 
#define call_bin_op(recv, id, arg1, column)   call_bin_op_gen(parser, (recv),(id),(arg1),(column))
 
#define call_uni_op(recv, id, column)   call_uni_op_gen(parser, (recv),(id),(column))
 
#define new_qcall(q, r, m, a, column)   new_qcall_gen(parser,q,r,m,a,column)
 
#define new_command_qcall(q, r, m, a, column)   new_qcall_gen(parser,q,r,m,a,column)
 
#define new_command(m, a)   new_command_gen(parser, m, a)
 
#define method_add_block(m, b)   method_add_block_gen(parser, m, b)
 
#define new_args(f, o, r, p, t)   new_args_gen(parser, (f),(o),(r),(p),(t))
 
#define new_args_tail(k, kr, b, column)   new_args_tail_gen(parser, (k),(kr),(b),(column))
 
#define new_kw_arg(k, column)   new_kw_arg_gen(parser, k, column)
 
#define negate_lit(lit)   negate_lit_gen(parser, lit)
 
#define ret_args(node)   ret_args_gen(parser, (node))
 
#define new_yield(node, column)   new_yield_gen(parser, (node), (column))
 
#define dsym_node(node, column)   dsym_node_gen(parser, (node), (column))
 
#define gettable(id, column)   gettable_gen(parser,(id),(column))
 
#define assignable(id, node, column)   assignable_gen(parser, (id), (node), (column))
 
#define aryset(node1, node2, column)   aryset_gen(parser, (node1), (node2), (column))
 
#define attrset(node, q, id, column)   attrset_gen(parser, (node), (q), (id), (column))
 
#define rb_backref_error(n)   rb_backref_error_gen(parser,(n))
 
#define node_assign(node1, node2, column)   node_assign_gen(parser, (node1), (node2), (column))
 
#define new_op_assign(lhs, op, rhs, column)   new_op_assign_gen(parser, (lhs), (op), (rhs), (column))
 
#define new_attr_op_assign(lhs, type, attr, op, rhs, column)   new_attr_op_assign_gen(parser, (lhs), (type), (attr), (op), (rhs), (column))
 
#define new_const_op_assign(lhs, op, rhs, column)   new_const_op_assign_gen(parser, (lhs), (op), (rhs), (column))
 
#define const_path_field(w, n, column)   const_path_field_gen(parser, w, n, column)
 
#define top_const_field(n)   NEW_COLON3(n)
 
#define const_decl(path, column)   const_decl_gen(parser, path, column)
 
#define var_field(n)   (n)
 
#define backref_assign_error(n, a, column)   (rb_backref_error(n), new_begin(0, column))
 
#define new_hash(hash, column)   new_hash_gen(parser, (hash), column)
 
#define new_defined(expr, column)   new_defined_gen(parser, expr, column)
 
#define new_regexp(node, opt, column)   new_regexp_gen(parser, node, opt, column)
 
#define new_lit(sym, column)   new_lit_gen(parser, sym, column)
 
#define new_list(item, column)   new_list_gen(parser, item, column)
 
#define new_str(s, column)   new_str_gen(parser, s, column)
 
#define new_dvar(id, column)   new_dvar_gen(parser, id, column)
 
#define new_resbody(e, s, r, column)   new_resbody_gen(parser, (e),(s),(r),(column))
 
#define new_errinfo(column)   new_errinfo_gen(parser, column)
 
#define new_call(recv, mid, args, column)   new_call_gen(parser, recv,mid,args,column)
 
#define new_fcall(mid, args, column)   new_fcall_gen(parser, mid, args, column)
 
#define new_for(var, iter, body, column)   new_for_gen(parser, var, iter, body, column)
 
#define new_gvar(id, column)   new_gvar_gen(parser, id, column)
 
#define new_lvar(id, column)   new_lvar_gen(parser, id, column)
 
#define new_dstr(s, column)   new_dstr_gen(parser, s, column)
 
#define new_rescue(b, res, e, column)   new_rescue_gen(parser,b,res,e,column)
 
#define new_undef(i, column)   new_undef_gen(parser, i, column)
 
#define new_zarray(column)   new_zarray_gen(parser, column)
 
#define new_ivar(id, column)   new_ivar_gen(parser,id,column)
 
#define new_postarg(i, v, column)   new_postarg_gen(parser,i,v,column)
 
#define new_cdecl(v, val, path, column)   new_cdecl_gen(parser,v,val,path,column)
 
#define new_scope(a, b, column)   new_scope_gen(parser,a,b,column)
 
#define new_begin(b, column)   new_begin_gen(parser,b,column)
 
#define new_masgn(l, r, column)   new_masgn_gen(parser,l,r,column)
 
#define new_xstring(node, column)   new_xstring_gen(parser, node, column)
 
#define new_string1(str)   (str)
 
#define new_brace_body(param, stmt, column)   new_body_gen(parser, param, stmt, column)
 
#define new_do_body(param, stmt, column)   new_body_gen(parser, param, stmt, column)
 
#define match_op(node1, node2, column)   match_op_gen(parser, (node1), (node2), (column))
 
#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, column)   reg_named_capture_assign_gen(parser,(regexp),column)
 
#define heredoc_dedent(str)   parser_heredoc_dedent(parser, (str))
 
#define get_id(id)   (id)
 
#define get_value(val)   (val)
 
#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_ref(id, vidp)   local_id_gen(parser, (id), &(vidp))
 
#define local_id(id)   local_id_gen(parser, (id), NULL)
 
#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_ref(id, vidp)   dvar_defined_gen(parser, (id), &(vidp))
 
#define dvar_defined(id)   dvar_defined_gen(parser, (id), NULL)
 
#define dvar_curr(id)   dvar_curr_gen(parser, (id))
 
#define lvar_defined(id)   lvar_defined_gen(parser, (id))
 
#define METHOD_NOT   '!'
 
#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 TOKEN2ID(tok)
 
#define ID2VAL(id)   ((VALUE)(id))
 
#define TOKEN2VAL(t)   ID2VAL(t)
 
#define KWD2EID(t, v)   keyword_##t
 
#define Qnone   0
 
#define Qnull   0
 
#define ifndef_ripper(x)   (x)
 
#define rb_warn0(fmt)   WARN_CALL(WARN_ARGS(fmt, 1))
 
#define rb_warn1(fmt, a)   WARN_CALL(WARN_ARGS(fmt, 2), (a))
 
#define rb_warn2(fmt, a, b)   WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
 
#define rb_warn3(fmt, a, b, c)   WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
 
#define rb_warn4(fmt, a, b, c, d)   WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
 
#define rb_warning0(fmt)   WARNING_CALL(WARNING_ARGS(fmt, 1))
 
#define rb_warning1(fmt, a)   WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
 
#define rb_warning2(fmt, a, b)   WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
 
#define rb_warning3(fmt, a, b, c)   WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
 
#define rb_warning4(fmt, a, b, c, d)   WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
 
#define rb_warn0L(l, fmt)   WARN_CALL(WARN_ARGS_L(l, fmt, 1))
 
#define rb_warn1L(l, fmt, a)   WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
 
#define rb_warn2L(l, fmt, a, b)   WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
 
#define rb_warn3L(l, fmt, a, b, c)   WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
 
#define rb_warn4L(l, fmt, a, b, c, d)   WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
 
#define rb_warning0L(l, fmt)   WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
 
#define rb_warning1L(l, fmt, a)   WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
 
#define rb_warning2L(l, fmt, a, b)   WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
 
#define rb_warning3L(l, fmt, a, b, c)   WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
 
#define rb_warning4L(l, fmt, a, b, c, d)   WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
 
#define WARN_S_L(s, l)   s
 
#define WARN_S(s)   s
 
#define WARN_I(i)   i
 
#define WARN_ID(i)   rb_id2name(i)
 
#define PRIsWARN   PRIsVALUE
 
#define WARN_ARGS(fmt, n)   WARN_ARGS_L(ruby_sourceline,fmt,n)
 
#define WARN_ARGS_L(l, fmt, n)   ruby_sourcefile, (l), (fmt)
 
#define WARN_CALL   rb_compile_warn
 
#define WARNING_ARGS(fmt, n)   WARN_ARGS(fmt,n)
 
#define WARNING_ARGS_L(l, fmt, n)   WARN_ARGS_L(l,fmt,n)
 
#define WARNING_CALL   rb_compile_warning
 
#define compile_error   parser_compile_error
 
#define PARSER_ARG   parser,
 
#define token_info_push(token)   token_info_push_gen(parser, (token), rb_strlen_lit(token))
 
#define token_info_pop(token)   token_info_pop_gen(parser, (token), rb_strlen_lit(token))
 
#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   11649
 
#define YYNTOKENS   146
 
#define YYNNTS   219
 
#define YYNRULES   645
 
#define YYNSTATES   1086
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   352
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -884
 
#define YYTABLE_NINF   -646
 
#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 YYLEX   yylex (&yylval, &yylloc, parser)
 
#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), yylsp -= (N))
 
#define yylval   (*parser->lval)
 
#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 number_literal_suffix(f)   parser_number_literal_suffix(parser, (f))
 
#define set_number_literal(v, t, f)   parser_set_number_literal(parser, (v), (t), (f))
 
#define set_integer_literal(v, f)   parser_set_integer_literal(parser, (v), (f))
 
#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 literal_flush(p)   (parser->tokp = (p))
 
#define dispatch_scan_event(t)   ((void)0)
 
#define dispatch_delayed_token(t)   ((void)0)
 
#define has_delayed_token()   (0)
 
#define parser_encoding_name()   (current_enc->name)
 
#define parser_mbclen()   mbclen((lex_p-1),lex_pend,current_enc)
 
#define is_identchar(p, e, enc)   (rb_enc_isalnum((unsigned char)(*(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 vtable_alloc(prev)   vtable_alloc_gen(parser, __LINE__, prev)
 
#define vtable_free(tbl)   vtable_free_gen(parser, __LINE__, #tbl, tbl)
 
#define vtable_add(tbl, id)   vtable_add_gen(parser, __LINE__, #tbl, tbl, id)
 
#define vtable_pop(tbl, n)   vtable_pop_gen(parser, __LINE__, #tbl, tbl, n)
 
#define RUBY_DTRACE_PARSE_HOOK(name)
 
#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 STR_FUNC_LABEL   0x40
 
#define STR_FUNC_TERM   0x8000
 
#define lex_goto_eol(parser)   ((parser)->lex.pcur = (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 peekc()   peekc_n(0)
 
#define peekc_n(n)   (lex_p+(n) < lex_pend ? (unsigned char)lex_p[n] : -1)
 
#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 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) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
 
#define IS_SPCARG(c)   (IS_ARG() && space_seen && !ISSPACE(c))
 
#define IS_LABEL_POSSIBLE()
 
#define IS_LABEL_SUFFIX(n)   (peek_n(':',(n)) && !peek_n(':', (n)+1))
 
#define IS_AFTER_OPERATOR()   IS_lex_state(EXPR_FNAME | EXPR_DOT)
 
#define unterminated_literal(mesg)   yyerror0(mesg)
 
#define NUM_SUFFIX_R   (1<<0)
 
#define NUM_SUFFIX_I   (1<<1)
 
#define NUM_SUFFIX_ALL   3
 
#define dispatch_heredoc_end()   ((void)0)
 
#define arg_ambiguous(c)   (arg_ambiguous_gen(parser, (c)), 1)
 
#define str_copy(_s, _p, _n)
 
#define ambiguous_operator(tok, op, syn)
 
#define warn_balanced(tok, op, syn)
 
#define no_digits()   do {yyerror0("numeric literal without digits"); return 0;} while (0)
 
#define LVAR_USED   ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
 
#define parser_warning(node, mesg)   parser_warning(parser, (node), (mesg))
 
#define parser_warn(node, mesg)   parser_warn(parser, (node), (mesg))
 
#define assignable_result(x)   assignable_result0(x, column)
 
#define subnodes(n1, n2)
 
#define HEAPCNT(n, size)   ((n) * (size) / sizeof(YYSTYPE))
 
#define NEWHEAP()   (rb_imemo_alloc_t *)rb_imemo_new(imemo_alloc, 0, (VALUE)parser->heap, 0, 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, tRATIONAL = 316,
  tIMAGINARY = 317, tSTRING_CONTENT = 318, tCHAR = 319, tNTH_REF = 320,
  tBACK_REF = 321, tREGEXP_END = 322, tUPLUS = 130, tUMINUS = 131,
  tPOW = 132, tCMP = 133, tEQ = 138, tEQQ = 139,
  tNEQ = 140, tGEQ = 137, tLEQ = 136, tANDOP = 146,
  tOROP = 147, tMATCH = 141, tNMATCH = 142, tDOT2 = 128,
  tDOT3 = 129, tAREF = 143, tASET = 144, tLSHFT = 134,
  tRSHFT = 135, tANDDOT = 148, tCOLON2 = 145, tCOLON3 = 323,
  tOP_ASGN = 324, tASSOC = 325, tLPAREN = 326, tLPAREN_ARG = 327,
  tRPAREN = 328, tLBRACK = 329, tLBRACE = 330, tLBRACE_ARG = 331,
  tSTAR = 332, tDSTAR = 333, tAMPER = 334, tLAMBDA = 335,
  tSYMBEG = 336, tSTRING_BEG = 337, tXSTRING_BEG = 338, tREGEXP_BEG = 339,
  tWORDS_BEG = 340, tQWORDS_BEG = 341, tSYMBOLS_BEG = 342, tQSYMBOLS_BEG = 343,
  tSTRING_DBEG = 344, tSTRING_DEND = 345, tSTRING_DVAR = 346, tSTRING_END = 347,
  tLAMBEG = 348, tLABEL_END = 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,
  tRATIONAL = 316, tIMAGINARY = 317, tSTRING_CONTENT = 318, tCHAR = 319,
  tNTH_REF = 320, tBACK_REF = 321, tREGEXP_END = 322, tUPLUS = 130,
  tUMINUS = 131, tPOW = 132, tCMP = 133, tEQ = 138,
  tEQQ = 139, tNEQ = 140, tGEQ = 137, tLEQ = 136,
  tANDOP = 146, tOROP = 147, tMATCH = 141, tNMATCH = 142,
  tDOT2 = 128, tDOT3 = 129, tAREF = 143, tASET = 144,
  tLSHFT = 134, tRSHFT = 135, tANDDOT = 148, tCOLON2 = 145,
  tCOLON3 = 323, tOP_ASGN = 324, tASSOC = 325, tLPAREN = 326,
  tLPAREN_ARG = 327, tRPAREN = 328, tLBRACK = 329, tLBRACE = 330,
  tLBRACE_ARG = 331, tSTAR = 332, tDSTAR = 333, tAMPER = 334,
  tLAMBDA = 335, tSYMBEG = 336, tSTRING_BEG = 337, tXSTRING_BEG = 338,
  tREGEXP_BEG = 339, tWORDS_BEG = 340, tQWORDS_BEG = 341, tSYMBOLS_BEG = 342,
  tQSYMBOLS_BEG = 343, tSTRING_DBEG = 344, tSTRING_DEND = 345, tSTRING_DVAR = 346,
  tSTRING_END = 347, tLAMBEG = 348, tLABEL_END = 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, tRATIONAL = 316, tIMAGINARY = 317, tSTRING_CONTENT = 318,
  tCHAR = 319, tNTH_REF = 320, tBACK_REF = 321, tREGEXP_END = 322,
  tUPLUS = 130, tUMINUS = 131, tPOW = 132, tCMP = 133,
  tEQ = 138, tEQQ = 139, tNEQ = 140, tGEQ = 137,
  tLEQ = 136, tANDOP = 146, tOROP = 147, tMATCH = 141,
  tNMATCH = 142, tDOT2 = 128, tDOT3 = 129, tAREF = 143,
  tASET = 144, tLSHFT = 134, tRSHFT = 135, tANDDOT = 148,
  tCOLON2 = 145, tCOLON3 = 323, tOP_ASGN = 324, tASSOC = 325,
  tLPAREN = 326, tLPAREN_ARG = 327, tRPAREN = 328, tLBRACK = 329,
  tLBRACE = 330, tLBRACE_ARG = 331, tSTAR = 332, tDSTAR = 333,
  tAMPER = 334, tLAMBDA = 335, tSYMBEG = 336, tSTRING_BEG = 337,
  tXSTRING_BEG = 338, tREGEXP_BEG = 339, tWORDS_BEG = 340, tQWORDS_BEG = 341,
  tSYMBOLS_BEG = 342, tQSYMBOLS_BEG = 343, tSTRING_DBEG = 344, tSTRING_DEND = 345,
  tSTRING_DVAR = 346, tSTRING_END = 347, tLAMBEG = 348, tLABEL_END = 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_LABEL_bit, EXPR_LABELED_bit,
  EXPR_FITEM_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_LABEL_bit, EXPR_LABELED_bit, EXPR_FITEM_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),
  DEF_EXPR =(BEG), DEF_EXPR =(BEG), EXPR_VALUE = EXPR_BEG, EXPR_BEG_ANY = (EXPR_BEG | 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), DEF_EXPR =(BEG), DEF_EXPR =(BEG),
  EXPR_VALUE = EXPR_BEG, EXPR_BEG_ANY = (EXPR_BEG | EXPR_MID | EXPR_CLASS), EXPR_ARG_ANY = (EXPR_ARG | EXPR_CMDARG), EXPR_END_ANY = (EXPR_END | EXPR_ENDARG | EXPR_ENDFN)
}
 
enum  string_type {
  str_label = STR_FUNC_LABEL, 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_label = STR_FUNC_LABEL, 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

RUBY_SYMBOL_EXPORT_BEGIN VALUE rb_parser_reg_compile (struct parser_params *parser, VALUE str, int options)
 
int rb_reg_fragment_setenc (struct parser_params *, VALUE, int)
 
enum lex_state_e rb_parser_trace_lex_state (struct parser_params *, enum lex_state_e, enum lex_state_e, int)
 
VALUE rb_parser_lex_state_name (enum lex_state_e state)
 
void rb_parser_show_bitstack (struct parser_params *, stack_type, const char *, int)
 
 PRINTF_ARGS (void rb_parser_fatal(struct parser_params *parser, const char *fmt,...), 2, 3)
 
 PRINTF_ARGS (static void parser_compile_error(struct parser_params *, const char *fmt,...), 2, 3)
 
int yyparse ()
 
int yyparse (struct parser_params *parser)
 
NODErb_compile_string (const char *f, VALUE s, int line)
 
NODErb_parser_compile_string (VALUE vparser, const char *f, VALUE s, int line)
 
NODErb_parser_compile_string_path (VALUE vparser, VALUE f, VALUE s, int line)
 
NODErb_compile_cstr (const char *f, const char *s, int len, int line)
 
NODErb_parser_compile_cstr (VALUE vparser, const char *f, const char *s, int len, int line)
 
VALUE rb_io_gets_internal (VALUE io)
 
NODErb_compile_file (const char *f, VALUE file, int start)
 
NODErb_parser_compile_file (VALUE vparser, const char *f, VALUE file, int start)
 
NODErb_parser_compile_file_path (VALUE vparser, VALUE fname, VALUE file, int start)
 
void rb_parser_fatal (struct parser_params *parser, const char *fmt,...)
 
NODErb_parser_append_print (VALUE vparser, NODE *node)
 
NODErb_parser_while_loop (VALUE vparser, NODE *node, int chomp, int split)
 
void rb_init_parse (void)
 
const struct kwtablerb_reserved_word (const char *str, unsigned int len)
 
VALUE rb_parser_new (void)
 
VALUE rb_parser_set_context (VALUE vparser, const struct rb_block *base, int main)
 
VALUE rb_parser_end_seen_p (VALUE vparser)
 
VALUE rb_parser_encoding (VALUE vparser)
 
VALUE rb_parser_get_yydebug (VALUE self)
 
VALUE rb_parser_set_yydebug (VALUE self, VALUE flag)
 
void * rb_parser_malloc (struct parser_params *parser, size_t size)
 
void * rb_parser_calloc (struct parser_params *parser, size_t nelem, size_t size)
 
void * rb_parser_realloc (struct parser_params *parser, void *ptr, size_t size)
 
void rb_parser_free (struct parser_params *parser, void *ptr)
 
void rb_parser_printf (struct parser_params *parser, const char *fmt,...)
 

Variables

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

Macro Definition Documentation

◆ ADD2HEAP

#define ADD2HEAP (   n,
  c,
 
)
Value:
((parser->heap = (n))->ptr = (p), \
(n)->cnt = (c), (p))

Definition at line 17411 of file parse.c.

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

◆ ambiguous_operator

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

Definition at line 13257 of file parse.c.

◆ arg_ambiguous

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

Definition at line 12862 of file parse.c.

◆ arg_append

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

Definition at line 688 of file parse.c.

◆ arg_concat

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

Definition at line 690 of file parse.c.

◆ arg_var

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

Definition at line 962 of file parse.c.

◆ aryset

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

Definition at line 735 of file parse.c.

◆ assignable

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

Definition at line 732 of file parse.c.

◆ assignable_result

#define assignable_result (   x)    assignable_result0(x, column)

◆ attrset

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

Definition at line 737 of file parse.c.

◆ backref_assign_error

#define backref_assign_error (   n,
  a,
  column 
)    (rb_backref_error(n), new_begin(0, column))

Definition at line 758 of file parse.c.

◆ BIT

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

Definition at line 12269 of file parse.c.

◆ BITSTACK_LEXPOP

#define BITSTACK_LEXPOP (   stack)    (((stack) = ((stack) >> 1) | ((stack) & 1)), SHOW_BITSTACK(stack, #stack"(lexpop)"))

Definition at line 416 of file parse.c.

◆ BITSTACK_POP

#define BITSTACK_POP (   stack)    (((stack) = (stack) >> 1), SHOW_BITSTACK(stack, #stack"(pop)"))

Definition at line 415 of file parse.c.

◆ BITSTACK_PUSH

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

Definition at line 414 of file parse.c.

◆ BITSTACK_SET

#define BITSTACK_SET (   stack,
 
)    ((stack)=(n), SHOW_BITSTACK(stack, #stack"(set)"))

Definition at line 418 of file parse.c.

◆ BITSTACK_SET_P

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

Definition at line 417 of file parse.c.

◆ block_append

#define block_append (   h,
  t,
  column 
)    block_append_gen(parser,(h),(t),(column))

Definition at line 683 of file parse.c.

Referenced by rb_parser_append_print(), rb_parser_while_loop(), and yyparse().

◆ block_dup_check

#define block_dup_check (   n1,
  n2 
)    block_dup_check_gen(parser,(n1),(n2))

Definition at line 680 of file parse.c.

◆ brace_nest

#define brace_nest   (parser->lex.brace_nest)

Definition at line 579 of file parse.c.

◆ call_bin_op

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

Definition at line 701 of file parse.c.

◆ CALL_Q_P

#define CALL_Q_P (   q)    ((q) == TOKEN2VAL(tANDDOT))

Definition at line 621 of file parse.c.

◆ call_uni_op

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

Definition at line 703 of file parse.c.

◆ calloc

#define calloc   YYCALLOC

Definition at line 360 of file parse.c.

◆ CMDARG_LEXPOP

#define CMDARG_LEXPOP ( )    BITSTACK_LEXPOP(cmdarg_stack)

Definition at line 428 of file parse.c.

◆ CMDARG_P

#define CMDARG_P ( )    BITSTACK_SET_P(cmdarg_stack)

Definition at line 429 of file parse.c.

◆ CMDARG_POP

#define CMDARG_POP ( )    BITSTACK_POP(cmdarg_stack)

Definition at line 427 of file parse.c.

◆ CMDARG_PUSH

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

Definition at line 426 of file parse.c.

◆ CMDARG_SET

#define CMDARG_SET (   n)    BITSTACK_SET(cmdarg_stack, (n))

Definition at line 430 of file parse.c.

◆ cmdarg_stack

#define cmdarg_stack   (parser->cmdarg_stack)

Definition at line 576 of file parse.c.

◆ command_start

#define command_start   (parser->command_start)

Definition at line 597 of file parse.c.

◆ compile_error

#define compile_error   parser_compile_error

Definition at line 1179 of file parse.c.

◆ compile_for_eval

#define compile_for_eval   (parser->base_block != 0 && !in_main)

Definition at line 611 of file parse.c.

Referenced by yyparse().

◆ cond

#define cond (   node,
  column 
)    cond_gen(parser, (node), FALSE, column)

Definition at line 653 of file parse.c.

◆ COND_LEXPOP

#define COND_LEXPOP ( )    BITSTACK_LEXPOP(cond_stack)

Definition at line 422 of file parse.c.

◆ COND_P

#define COND_P ( )    BITSTACK_SET_P(cond_stack)

Definition at line 423 of file parse.c.

◆ COND_POP

#define COND_POP ( )    BITSTACK_POP(cond_stack)

Definition at line 421 of file parse.c.

◆ COND_PUSH

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

Definition at line 420 of file parse.c.

◆ COND_SET

#define COND_SET (   n)    BITSTACK_SET(cond_stack, (n))

Definition at line 424 of file parse.c.

◆ cond_stack

#define cond_stack   (parser->cond_stack)

Definition at line 575 of file parse.c.

◆ const_decl

#define const_decl (   path,
  column 
)    const_decl_gen(parser, path, column)

Definition at line 755 of file parse.c.

◆ const_path_field

#define const_path_field (   w,
  n,
  column 
)    const_path_field_gen(parser, w, n, column)

Definition at line 752 of file parse.c.

◆ current_arg

#define current_arg   (parser->cur_arg)

Definition at line 606 of file parse.c.

◆ current_enc

#define current_enc   (parser->enc)

Definition at line 605 of file parse.c.

Referenced by rb_parser_encoding(), and rb_reg_fragment_setenc().

◆ DEF_EXPR

#define DEF_EXPR (   n)    EXPR_##n = (1 << EXPR_##n##_bit)

Definition at line 381 of file parse.c.

◆ dispatch_delayed_token

#define dispatch_delayed_token (   t)    ((void)0)

Definition at line 10968 of file parse.c.

◆ dispatch_heredoc_end

#define dispatch_heredoc_end ( )    ((void)0)

Definition at line 12704 of file parse.c.

◆ dispatch_scan_event

#define dispatch_scan_event (   t)    ((void)0)

Definition at line 10967 of file parse.c.

◆ dsym_node

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

Definition at line 727 of file parse.c.

◆ dvar_curr

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

Definition at line 980 of file parse.c.

◆ dvar_defined

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

Definition at line 978 of file parse.c.

◆ dvar_defined_ref

#define dvar_defined_ref (   id,
  vidp 
)    dvar_defined_gen(parser, (id), &(vidp))

Definition at line 977 of file parse.c.

◆ DVARS_INHERIT

#define DVARS_INHERIT   ((void*)1)

Definition at line 450 of file parse.c.

◆ DVARS_SPECIAL_P

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

Definition at line 452 of file parse.c.

◆ DVARS_TOPSCOPE

#define DVARS_TOPSCOPE   NULL

Definition at line 451 of file parse.c.

◆ dyna_in_block

#define dyna_in_block ( )    dyna_in_block_gen(parser)

Definition at line 974 of file parse.c.

◆ dyna_pop

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

Definition at line 972 of file parse.c.

◆ dyna_push

#define dyna_push ( )    dyna_push_gen(parser)

Definition at line 970 of file parse.c.

◆ dyna_var

#define dyna_var (   id)    local_var(id)

Definition at line 975 of file parse.c.

◆ END_OF_INPUT

#define END_OF_INPUT   0

Definition at line 189 of file parse.c.

◆ ESCAPE_CONTROL

#define ESCAPE_CONTROL   1

Definition at line 11827 of file parse.c.

◆ ESCAPE_META

#define ESCAPE_META   2

Definition at line 11828 of file parse.c.

◆ evstr2dstr

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

Definition at line 697 of file parse.c.

◆ flush_string_content

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

Definition at line 12262 of file parse.c.

◆ formal_argument

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

Definition at line 949 of file parse.c.

◆ free

#define free   YYFREE

Definition at line 361 of file parse.c.

◆ get_id

#define get_id (   id)    (id)

Definition at line 860 of file parse.c.

◆ get_value

#define get_value (   val)    (val)

Definition at line 861 of file parse.c.

◆ gettable

#define gettable (   id,
  column 
)    gettable_gen(parser,(id),(column))

Definition at line 730 of file parse.c.

◆ has_delayed_token

#define has_delayed_token ( )    (0)

Definition at line 10969 of file parse.c.

◆ HEAPCNT

#define HEAPCNT (   n,
  size 
)    ((n) * (size) / sizeof(YYSTYPE))

Definition at line 17409 of file parse.c.

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

◆ here_document

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

Definition at line 10934 of file parse.c.

◆ heredoc_dedent

#define heredoc_dedent (   str)    parser_heredoc_dedent(parser, (str))

Definition at line 858 of file parse.c.

◆ heredoc_end

#define heredoc_end   (parser->heredoc_end)

Definition at line 594 of file parse.c.

◆ heredoc_identifier

#define heredoc_identifier ( )    parser_heredoc_identifier(parser)

Definition at line 10935 of file parse.c.

◆ heredoc_indent

#define heredoc_indent   (parser->heredoc_indent)

Definition at line 595 of file parse.c.

◆ heredoc_line_indent

#define heredoc_line_indent   (parser->heredoc_line_indent)

Definition at line 596 of file parse.c.

◆ heredoc_restore

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

Definition at line 10936 of file parse.c.

◆ ID2VAL

#define ID2VAL (   id)    ((VALUE)(id))

Definition at line 1107 of file parse.c.

◆ ifndef_ripper

#define ifndef_ripper (   x)    (x)

Definition at line 1115 of file parse.c.

◆ in_def

#define in_def   (parser->in_def)

Definition at line 581 of file parse.c.

◆ in_defined

#define in_defined   (parser->in_defined)

Definition at line 583 of file parse.c.

◆ in_main

#define in_main   (parser->in_main)

Definition at line 582 of file parse.c.

Referenced by rb_parser_set_context(), and yyparse().

◆ in_single

#define in_single   (parser->in_single)

Definition at line 580 of file parse.c.

◆ intern_cstr

#define intern_cstr (   n,
  l,
  en 
)    rb_intern3(n,l,en)

Definition at line 559 of file parse.c.

◆ internal_id

#define internal_id ( )    internal_id_gen(parser)

Definition at line 967 of file parse.c.

◆ IS_AFTER_OPERATOR

#define IS_AFTER_OPERATOR ( )    IS_lex_state(EXPR_FNAME | EXPR_DOT)

Definition at line 12330 of file parse.c.

◆ IS_ARG

#define IS_ARG ( )    IS_lex_state(EXPR_ARG_ANY)

Definition at line 12322 of file parse.c.

◆ IS_BEG

#define IS_BEG ( )    (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))

Definition at line 12324 of file parse.c.

◆ IS_END

#define IS_END ( )    IS_lex_state(EXPR_END_ANY)

Definition at line 12323 of file parse.c.

◆ is_identchar

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

Definition at line 11029 of file parse.c.

◆ IS_LABEL_POSSIBLE

#define IS_LABEL_POSSIBLE ( )
Value:
(\
(IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
IS_ARG())
#define IS_lex_state(ls)
Definition: parse.c:402
#define IS_ARG()
Definition: parse.c:12322

Definition at line 12326 of file parse.c.

◆ IS_LABEL_SUFFIX

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

Definition at line 12329 of file parse.c.

◆ IS_lex_state

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

Definition at line 402 of file parse.c.

◆ IS_lex_state_all

#define IS_lex_state_all (   ls)    IS_lex_state_all_for(lex_state, (ls))

Definition at line 403 of file parse.c.

◆ IS_lex_state_all_for

#define IS_lex_state_all_for (   x,
  ls 
)    (((x) & (ls)) == (ls))

Definition at line 401 of file parse.c.

◆ IS_lex_state_for

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

Definition at line 400 of file parse.c.

◆ IS_SPCARG

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

Definition at line 12325 of file parse.c.

◆ keyword__ENCODING__

#define keyword__ENCODING__   306

Definition at line 238 of file parse.c.

◆ keyword__FILE__

#define keyword__FILE__   305

Definition at line 237 of file parse.c.

◆ keyword__LINE__

#define keyword__LINE__   304

Definition at line 236 of file parse.c.

◆ keyword_alias

#define keyword_alias   300

Definition at line 232 of file parse.c.

◆ keyword_and

#define keyword_and   292

Definition at line 224 of file parse.c.

◆ keyword_begin

#define keyword_begin   262

Definition at line 194 of file parse.c.

◆ keyword_BEGIN

#define keyword_BEGIN   302

Definition at line 234 of file parse.c.

◆ keyword_break

#define keyword_break   276

Definition at line 208 of file parse.c.

◆ keyword_case

#define keyword_case   271

Definition at line 203 of file parse.c.

◆ keyword_class

#define keyword_class   258

Definition at line 190 of file parse.c.

◆ keyword_def

#define keyword_def   260

Definition at line 192 of file parse.c.

◆ keyword_defined

#define keyword_defined   301

Definition at line 233 of file parse.c.

◆ keyword_do

#define keyword_do   281

Definition at line 213 of file parse.c.

◆ keyword_do_block

#define keyword_do_block   283

Definition at line 215 of file parse.c.

◆ keyword_do_cond

#define keyword_do_cond   282

Definition at line 214 of file parse.c.

◆ keyword_do_LAMBDA

#define keyword_do_LAMBDA   284

Definition at line 216 of file parse.c.

◆ keyword_else

#define keyword_else   270

Definition at line 202 of file parse.c.

◆ keyword_elsif

#define keyword_elsif   269

Definition at line 201 of file parse.c.

◆ keyword_end

#define keyword_end   265

Definition at line 197 of file parse.c.

◆ keyword_END

#define keyword_END   303

Definition at line 235 of file parse.c.

◆ keyword_ensure

#define keyword_ensure   264

Definition at line 196 of file parse.c.

◆ keyword_false

#define keyword_false   291

Definition at line 223 of file parse.c.

◆ keyword_for

#define keyword_for   275

Definition at line 207 of file parse.c.

◆ keyword_if

#define keyword_if   266

Definition at line 198 of file parse.c.

◆ keyword_in

#define keyword_in   280

Definition at line 212 of file parse.c.

◆ keyword_module

#define keyword_module   259

Definition at line 191 of file parse.c.

◆ keyword_next

#define keyword_next   277

Definition at line 209 of file parse.c.

◆ keyword_nil

#define keyword_nil   289

Definition at line 221 of file parse.c.

◆ keyword_not

#define keyword_not   294

Definition at line 226 of file parse.c.

◆ keyword_or

#define keyword_or   293

Definition at line 225 of file parse.c.

◆ keyword_redo

#define keyword_redo   278

Definition at line 210 of file parse.c.

◆ keyword_rescue

#define keyword_rescue   263

Definition at line 195 of file parse.c.

◆ keyword_retry

#define keyword_retry   279

Definition at line 211 of file parse.c.

◆ keyword_return

#define keyword_return   285

Definition at line 217 of file parse.c.

◆ keyword_self

#define keyword_self   288

Definition at line 220 of file parse.c.

◆ keyword_super

#define keyword_super   287

Definition at line 219 of file parse.c.

◆ keyword_then

#define keyword_then   268

Definition at line 200 of file parse.c.

◆ keyword_true

#define keyword_true   290

Definition at line 222 of file parse.c.

◆ keyword_undef

#define keyword_undef   261

Definition at line 193 of file parse.c.

◆ keyword_unless

#define keyword_unless   267

Definition at line 199 of file parse.c.

◆ keyword_until

#define keyword_until   274

Definition at line 206 of file parse.c.

◆ keyword_when

#define keyword_when   272

Definition at line 204 of file parse.c.

◆ keyword_while

#define keyword_while   273

Definition at line 205 of file parse.c.

◆ keyword_yield

#define keyword_yield   286

Definition at line 218 of file parse.c.

◆ KWD2EID

#define KWD2EID (   t,
 
)    keyword_##t

Definition at line 1109 of file parse.c.

◆ lambda_beginning_p

#define lambda_beginning_p ( )    (lpar_beg && lpar_beg == paren_nest)

Definition at line 625 of file parse.c.

◆ lex_eol_p

#define lex_eol_p ( )    (lex_p >= lex_pend)

Definition at line 11581 of file parse.c.

◆ lex_gets

#define lex_gets   (parser->lex.gets)

Definition at line 599 of file parse.c.

Referenced by rb_parser_compile_file_path().

◆ lex_gets_ptr

#define lex_gets_ptr   (parser->lex.gets_ptr)

Definition at line 598 of file parse.c.

◆ lex_goto_eol

#define lex_goto_eol (   parser)    ((parser)->lex.pcur = (parser)->lex.pend)

Definition at line 11580 of file parse.c.

◆ lex_input

#define lex_input   (parser->lex.input)

Definition at line 588 of file parse.c.

◆ lex_lastline

#define lex_lastline   (parser->lex.lastline)

Definition at line 589 of file parse.c.

◆ lex_nextline

#define lex_nextline   (parser->lex.nextline)

Definition at line 590 of file parse.c.

◆ lex_p

#define lex_p   (parser->lex.pcur)

Definition at line 592 of file parse.c.

◆ lex_pbeg

#define lex_pbeg   (parser->lex.pbeg)

Definition at line 591 of file parse.c.

◆ lex_pend

#define lex_pend   (parser->lex.pend)

Definition at line 593 of file parse.c.

◆ lex_state

#define lex_state   (parser->lex.state)

Definition at line 574 of file parse.c.

◆ lex_strterm

#define lex_strterm   (parser->lex.strterm)

Definition at line 573 of file parse.c.

◆ list_append

#define list_append (   l,
  i,
  column 
)    list_append_gen(parser,(l),(i),(column))

Definition at line 685 of file parse.c.

◆ literal_concat

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

Definition at line 692 of file parse.c.

◆ literal_flush

#define literal_flush (   p)    (parser->tokp = (p))

Definition at line 10966 of file parse.c.

◆ local_id

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

Definition at line 965 of file parse.c.

◆ local_id_ref

#define local_id_ref (   id,
  vidp 
)    local_id_gen(parser, (id), &(vidp))

Definition at line 964 of file parse.c.

◆ local_pop

#define local_pop ( )    local_pop_gen(parser)

Definition at line 958 of file parse.c.

Referenced by yyparse().

◆ local_push

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

Definition at line 956 of file parse.c.

Referenced by yyparse().

◆ local_tbl

#define local_tbl ( )    local_tbl_gen(parser)

Definition at line 846 of file parse.c.

◆ local_var

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

Definition at line 960 of file parse.c.

◆ logop

#define logop (   id,
  node1,
  node2,
  column 
)
Value:
logop_gen(parser, ((id)==idAND||(id)==idANDOP)?NODE_AND:NODE_OR, \
(node1), (node2), (column))
Definition: id.h:104
Definition: node.h:61
Definition: node.h:63

Definition at line 661 of file parse.c.

◆ lpar_beg

#define lpar_beg   (parser->lex.lpar_beg)

Definition at line 578 of file parse.c.

◆ lvar_defined

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

Definition at line 983 of file parse.c.

◆ LVAR_USED

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

Definition at line 14660 of file parse.c.

◆ lvtbl

#define lvtbl   (parser->lvtbl)

Definition at line 600 of file parse.c.

◆ malloc

#define malloc   YYMALLOC

Definition at line 358 of file parse.c.

◆ match_op

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

Definition at line 843 of file parse.c.

◆ method_add_block

#define method_add_block (   m,
 
)    method_add_block_gen(parser, m, b)

Definition at line 710 of file parse.c.

◆ method_cond

#define method_cond (   node,
  column 
)    cond_gen(parser, (node), TRUE, column)

Definition at line 654 of file parse.c.

◆ METHOD_NOT

#define METHOD_NOT   '!'

Definition at line 988 of file parse.c.

◆ mixed_error

#define mixed_error (   enc1,
  enc2 
)
Value:
if (!errbuf) { \
size_t len = sizeof(mixed_msg) - 4; \
len += strlen(rb_enc_name(enc1)); \
len += strlen(rb_enc_name(enc2)); \
errbuf = ALLOCA_N(char, len); \
snprintf(errbuf, len, mixed_msg, \
rb_enc_name(enc1), \
rb_enc_name(enc2)); \
yyerror0(errbuf); \
}
size_t strlen(const char *)
#define ALLOCA_N(type, n)
Definition: ruby.h:1593
#define rb_enc_name(enc)
Definition: encoding.h:171
register unsigned int len
Definition: zonetab.h:51

◆ mixed_escape

#define mixed_escape (   beg,
  enc1,
  enc2 
)
Value:
do { \
const char *pos = lex_p; \
lex_p = (beg); \
mixed_error((enc1), (enc2)); \
lex_p = pos; \
} while (0)
#define lex_p
Definition: parse.c:592

◆ modifier_if

#define modifier_if   295

Definition at line 227 of file parse.c.

◆ modifier_rescue

#define modifier_rescue   299

Definition at line 231 of file parse.c.

◆ modifier_unless

#define modifier_unless   296

Definition at line 228 of file parse.c.

◆ modifier_until

#define modifier_until   298

Definition at line 230 of file parse.c.

◆ modifier_while

#define modifier_while   297

Definition at line 229 of file parse.c.

◆ nd_func

#define nd_func   u1.id

Definition at line 1002 of file parse.c.

◆ nd_nest

#define nd_nest   u3.cnt

Definition at line 1009 of file parse.c.

◆ nd_paren

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

Definition at line 1008 of file parse.c.

◆ nd_term

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

Definition at line 1006 of file parse.c.

◆ negate_lit

#define negate_lit (   lit)    negate_lit_gen(parser, lit)

Definition at line 720 of file parse.c.

◆ new_args

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

Definition at line 713 of file parse.c.

◆ new_args_tail

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

Definition at line 715 of file parse.c.

◆ new_attr_op_assign

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

Definition at line 747 of file parse.c.

◆ new_begin

#define new_begin (   b,
  column 
)    new_begin_gen(parser,b,column)

Definition at line 829 of file parse.c.

Referenced by yyparse().

◆ new_brace_body

#define new_brace_body (   param,
  stmt,
  column 
)    new_body_gen(parser, param, stmt, column)

Definition at line 839 of file parse.c.

◆ new_bv

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

Definition at line 953 of file parse.c.

◆ new_call

#define new_call (   recv,
  mid,
  args,
  column 
)    new_call_gen(parser, recv,mid,args,column)

Definition at line 790 of file parse.c.

Referenced by rb_parser_while_loop().

◆ new_cdecl

#define new_cdecl (   v,
  val,
  path,
  column 
)    new_cdecl_gen(parser,v,val,path,column)

Definition at line 823 of file parse.c.

◆ new_command

#define new_command (   m,
 
)    new_command_gen(parser, m, a)

Definition at line 708 of file parse.c.

◆ new_command_qcall

#define new_command_qcall (   q,
  r,
  m,
  a,
  column 
)    new_qcall_gen(parser,q,r,m,a,column)

Definition at line 706 of file parse.c.

◆ new_const_op_assign

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

Definition at line 749 of file parse.c.

◆ new_defined

#define new_defined (   expr,
  column 
)    new_defined_gen(parser, expr, column)

Definition at line 766 of file parse.c.

◆ new_do_body

#define new_do_body (   param,
  stmt,
  column 
)    new_body_gen(parser, param, stmt, column)

Definition at line 840 of file parse.c.

◆ new_dstr

#define new_dstr (   s,
  column 
)    new_dstr_gen(parser, s, column)

Definition at line 805 of file parse.c.

◆ new_dvar

#define new_dvar (   id,
  column 
)    new_dvar_gen(parser, id, column)

Definition at line 781 of file parse.c.

◆ new_errinfo

#define new_errinfo (   column)    new_errinfo_gen(parser, column)

Definition at line 787 of file parse.c.

◆ new_evstr

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

Definition at line 695 of file parse.c.

◆ new_fcall

#define new_fcall (   mid,
  args,
  column 
)    new_fcall_gen(parser, mid, args, column)

Definition at line 793 of file parse.c.

Referenced by rb_parser_append_print().

◆ new_for

#define new_for (   var,
  iter,
  body,
  column 
)    new_for_gen(parser, var, iter, body, column)

Definition at line 796 of file parse.c.

◆ new_gvar

#define new_gvar (   id,
  column 
)    new_gvar_gen(parser, id, column)

Definition at line 799 of file parse.c.

Referenced by rb_parser_append_print(), and rb_parser_while_loop().

◆ new_hash

#define new_hash (   hash,
  column 
)    new_hash_gen(parser, (hash), column)

Definition at line 763 of file parse.c.

◆ new_if

#define new_if (   cc,
  left,
  right,
  column 
)    new_if_gen(parser, (cc), (left), (right), (column))

Definition at line 657 of file parse.c.

◆ new_ivar

#define new_ivar (   id,
  column 
)    new_ivar_gen(parser,id,column)

Definition at line 817 of file parse.c.

◆ new_kw_arg

#define new_kw_arg (   k,
  column 
)    new_kw_arg_gen(parser, k, column)

Definition at line 717 of file parse.c.

◆ new_list

#define new_list (   item,
  column 
)    new_list_gen(parser, item, column)

Definition at line 775 of file parse.c.

◆ new_lit

#define new_lit (   sym,
  column 
)    new_lit_gen(parser, sym, column)

Definition at line 772 of file parse.c.

◆ new_lvar

#define new_lvar (   id,
  column 
)    new_lvar_gen(parser, id, column)

Definition at line 802 of file parse.c.

◆ new_masgn

#define new_masgn (   l,
  r,
  column 
)    new_masgn_gen(parser,l,r,column)

Definition at line 832 of file parse.c.

◆ new_nil

#define new_nil ( )    NEW_NIL()

Definition at line 655 of file parse.c.

◆ new_op_assign

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

Definition at line 745 of file parse.c.

◆ new_postarg

#define new_postarg (   i,
  v,
  column 
)    new_postarg_gen(parser,i,v,column)

Definition at line 820 of file parse.c.

◆ NEW_QCALL

#define NEW_QCALL (   q,
  r,
  m,
 
)    NEW_NODE(NODE_CALL_Q(q),r,m,a)

Definition at line 623 of file parse.c.

◆ new_qcall

#define new_qcall (   q,
  r,
  m,
  a,
  column 
)    new_qcall_gen(parser,q,r,m,a,column)

Definition at line 705 of file parse.c.

◆ new_regexp

#define new_regexp (   node,
  opt,
  column 
)    new_regexp_gen(parser, node, opt, column)

Definition at line 769 of file parse.c.

◆ new_resbody

#define new_resbody (   e,
  s,
  r,
  column 
)    new_resbody_gen(parser, (e),(s),(r),(column))

Definition at line 784 of file parse.c.

◆ new_rescue

#define new_rescue (   b,
  res,
  e,
  column 
)    new_rescue_gen(parser,b,res,e,column)

Definition at line 808 of file parse.c.

◆ new_scope

#define new_scope (   a,
  b,
  column 
)    new_scope_gen(parser,a,b,column)

Definition at line 826 of file parse.c.

Referenced by yyparse().

◆ new_str

#define new_str (   s,
  column 
)    new_str_gen(parser, s, column)

Definition at line 778 of file parse.c.

◆ new_string1

#define new_string1 (   str)    (str)

Definition at line 836 of file parse.c.

◆ NEW_STRTERM

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

Definition at line 12235 of file parse.c.

◆ new_undef

#define new_undef (   i,
  column 
)    new_undef_gen(parser, i, column)

Definition at line 811 of file parse.c.

◆ new_unless

#define new_unless (   cc,
  left,
  right,
  column 
)    new_unless_gen(parser, (cc), (left), (right), (column))

Definition at line 659 of file parse.c.

◆ new_xstring

#define new_xstring (   node,
  column 
)    new_xstring_gen(parser, node, column)

Definition at line 835 of file parse.c.

◆ new_yield

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

Definition at line 725 of file parse.c.

◆ new_zarray

#define new_zarray (   column)    new_zarray_gen(parser, column)

Definition at line 814 of file parse.c.

◆ NEWHEAP

#define NEWHEAP ( )    (rb_imemo_alloc_t *)rb_imemo_new(imemo_alloc, 0, (VALUE)parser->heap, 0, 0)

Definition at line 17410 of file parse.c.

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

◆ newtok

#define newtok ( )    parser_newtok(parser)

Definition at line 10924 of file parse.c.

◆ nextc

#define nextc ( )    parser_nextc(parser)

Definition at line 10922 of file parse.c.

◆ no_digits

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

◆ node_assign

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

Definition at line 742 of file parse.c.

◆ NODE_CALL_Q

#define NODE_CALL_Q (   q)    (CALL_Q_P(q) ? NODE_QCALL : NODE_CALL)

Definition at line 622 of file parse.c.

◆ NODE_HEREDOC

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

Definition at line 1000 of file parse.c.

◆ NODE_STRTERM

#define NODE_STRTERM   NODE_ZARRAY /* nothing to gc */

Definition at line 999 of file parse.c.

◆ NUM_SUFFIX_ALL

#define NUM_SUFFIX_ALL   3

Definition at line 12625 of file parse.c.

◆ NUM_SUFFIX_I

#define NUM_SUFFIX_I   (1<<1)

Definition at line 12624 of file parse.c.

◆ NUM_SUFFIX_R

#define NUM_SUFFIX_R   (1<<0)

Definition at line 12623 of file parse.c.

◆ number_literal_suffix

#define number_literal_suffix (   f)    parser_number_literal_suffix(parser, (f))

Definition at line 10938 of file parse.c.

◆ paren_nest

#define paren_nest   (parser->lex.paren_nest)

Definition at line 577 of file parse.c.

◆ parse_string

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

Definition at line 10932 of file parse.c.

◆ PARSER_ARG

#define PARSER_ARG   parser,

Definition at line 1180 of file parse.c.

◆ PARSER_DEBUG

#define PARSER_DEBUG   0

Definition at line 318 of file parse.c.

◆ parser_encoding_name

#define parser_encoding_name ( )    (current_enc->name)

Definition at line 11027 of file parse.c.

◆ parser_is_identchar

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

Definition at line 11030 of file parse.c.

◆ parser_isascii

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

Definition at line 11032 of file parse.c.

◆ parser_mbclen

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

Definition at line 11028 of file parse.c.

◆ parser_warn

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

Definition at line 14716 of file parse.c.

◆ parser_warning

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

Definition at line 14709 of file parse.c.

◆ peek

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

Definition at line 11582 of file parse.c.

◆ peek_n

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

Definition at line 11583 of file parse.c.

◆ peekc

#define peekc ( )    peekc_n(0)

Definition at line 11584 of file parse.c.

◆ peekc_n

#define peekc_n (   n)    (lex_p+(n) < lex_pend ? (unsigned char)lex_p[n] : -1)

Definition at line 11585 of file parse.c.

◆ POINTER_P

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

Definition at line 453 of file parse.c.

◆ PRIsWARN

#define PRIsWARN   PRIsVALUE

Definition at line 1171 of file parse.c.

◆ pushback

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

Definition at line 10923 of file parse.c.

◆ Qnone

#define Qnone   0

Definition at line 1113 of file parse.c.

◆ Qnull

#define Qnull   0

Definition at line 1114 of file parse.c.

◆ rb_backref_error

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

Definition at line 740 of file parse.c.

◆ rb_node_newnode

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

Definition at line 650 of file parse.c.

◆ rb_warn0

#define rb_warn0 (   fmt)    WARN_CALL(WARN_ARGS(fmt, 1))

Definition at line 1122 of file parse.c.

◆ rb_warn0L

#define rb_warn0L (   l,
  fmt 
)    WARN_CALL(WARN_ARGS_L(l, fmt, 1))

Definition at line 1132 of file parse.c.

◆ rb_warn1

#define rb_warn1 (   fmt,
 
)    WARN_CALL(WARN_ARGS(fmt, 2), (a))

Definition at line 1123 of file parse.c.

◆ rb_warn1L

#define rb_warn1L (   l,
  fmt,
 
)    WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))

Definition at line 1133 of file parse.c.

◆ rb_warn2

#define rb_warn2 (   fmt,
  a,
 
)    WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))

Definition at line 1124 of file parse.c.

◆ rb_warn2L

#define rb_warn2L (   l,
  fmt,
  a,
 
)    WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))

Definition at line 1134 of file parse.c.

◆ rb_warn3

#define rb_warn3 (   fmt,
  a,
  b,
 
)    WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))

Definition at line 1125 of file parse.c.

◆ rb_warn3L

#define rb_warn3L (   l,
  fmt,
  a,
  b,
 
)    WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))

Definition at line 1135 of file parse.c.

◆ rb_warn4

#define rb_warn4 (   fmt,
  a,
  b,
  c,
 
)    WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))

Definition at line 1126 of file parse.c.

◆ rb_warn4L

#define rb_warn4L (   l,
  fmt,
  a,
  b,
  c,
 
)    WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))

Definition at line 1136 of file parse.c.

◆ rb_warning0

#define rb_warning0 (   fmt)    WARNING_CALL(WARNING_ARGS(fmt, 1))

Definition at line 1127 of file parse.c.

◆ rb_warning0L

#define rb_warning0L (   l,
  fmt 
)    WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))

Definition at line 1137 of file parse.c.

◆ rb_warning1

#define rb_warning1 (   fmt,
 
)    WARNING_CALL(WARNING_ARGS(fmt, 2), (a))

Definition at line 1128 of file parse.c.

◆ rb_warning1L

#define rb_warning1L (   l,
  fmt,
 
)    WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))

Definition at line 1138 of file parse.c.

◆ rb_warning2

#define rb_warning2 (   fmt,
  a,
 
)    WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))

Definition at line 1129 of file parse.c.

◆ rb_warning2L

#define rb_warning2L (   l,
  fmt,
  a,
 
)    WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))

Definition at line 1139 of file parse.c.

◆ rb_warning3

#define rb_warning3 (   fmt,
  a,
  b,
 
)    WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))

Definition at line 1130 of file parse.c.

◆ rb_warning3L

#define rb_warning3L (   l,
  fmt,
  a,
  b,
 
)    WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))

Definition at line 1140 of file parse.c.

◆ rb_warning4

#define rb_warning4 (   fmt,
  a,
  b,
  c,
 
)    WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))

Definition at line 1131 of file parse.c.

◆ rb_warning4L

#define rb_warning4L (   l,
  fmt,
  a,
  b,
  c,
 
)    WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))

Definition at line 1141 of file parse.c.

◆ RE_OPTION_ARG_ENCODING_NONE

#define RE_OPTION_ARG_ENCODING_NONE   32

Definition at line 997 of file parse.c.

◆ RE_OPTION_ENCODING

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

Definition at line 993 of file parse.c.

◆ RE_OPTION_ENCODING_IDX

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

Definition at line 994 of file parse.c.

Referenced by rb_reg_fragment_setenc().

◆ RE_OPTION_ENCODING_NONE

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

Definition at line 995 of file parse.c.

Referenced by rb_reg_fragment_setenc().

◆ RE_OPTION_ENCODING_SHIFT

#define RE_OPTION_ENCODING_SHIFT   8

Definition at line 992 of file parse.c.

◆ RE_OPTION_MASK

#define RE_OPTION_MASK   0xff

Definition at line 996 of file parse.c.

Referenced by rb_parser_reg_compile().

◆ RE_OPTION_ONCE

#define RE_OPTION_ONCE   (1<<16)

Definition at line 991 of file parse.c.

◆ read_escape

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

Definition at line 10928 of file parse.c.

◆ realloc

#define realloc   YYREALLOC

Definition at line 359 of file parse.c.

◆ reduce_nodes

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

Definition at line 678 of file parse.c.

◆ reg_compile

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

Definition at line 849 of file parse.c.

◆ reg_fragment_check

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

Definition at line 853 of file parse.c.

◆ reg_fragment_setenc

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

Definition at line 851 of file parse.c.

◆ reg_named_capture_assign

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

Definition at line 855 of file parse.c.

◆ regx_options

#define regx_options ( )    parser_regx_options(parser)

Definition at line 10930 of file parse.c.

◆ ret_args

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

Definition at line 722 of file parse.c.

◆ ruby__end__seen

#define ruby__end__seen   (parser->ruby__end__seen)

Definition at line 601 of file parse.c.

Referenced by rb_parser_end_seen_p().

◆ ruby_coverage

#define ruby_coverage   (parser->coverage)

Definition at line 615 of file parse.c.

◆ ruby_debug_lines

#define ruby_debug_lines   (parser->debug_lines)

Definition at line 614 of file parse.c.

◆ RUBY_DTRACE_PARSE_HOOK

#define RUBY_DTRACE_PARSE_HOOK (   name)
Value:
if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
RUBY_DTRACE_PARSE_##name(ruby_sourcefile, ruby_sourceline); \
}
#define ruby_sourcefile
Definition: parse.c:603
#define ruby_sourceline
Definition: parse.c:602
const char * name
Definition: nkf.c:208

◆ ruby_eval_tree

#define ruby_eval_tree   (parser->eval_tree)

Definition at line 612 of file parse.c.

Referenced by yyparse().

◆ ruby_eval_tree_begin

#define ruby_eval_tree_begin   (parser->eval_tree_begin)

Definition at line 613 of file parse.c.

◆ ruby_sourcefile

#define ruby_sourcefile   (parser->ruby_sourcefile)

Definition at line 603 of file parse.c.

Referenced by rb_parser_reg_compile().

◆ ruby_sourcefile_string

#define ruby_sourcefile_string   (parser->ruby_sourcefile_string)

Definition at line 604 of file parse.c.

◆ ruby_sourceline

#define ruby_sourceline   (parser->ruby_sourceline)

Definition at line 602 of file parse.c.

Referenced by rb_parser_reg_compile().

◆ set_integer_literal

#define set_integer_literal (   v,
  f 
)    parser_set_integer_literal(parser, (v), (f))

Definition at line 10940 of file parse.c.

◆ SET_LEX_STATE

#define SET_LEX_STATE (   ls)
Value:
(yydebug ? \
rb_parser_trace_lex_state(parser, lex_state, (ls), __LINE__) : \
(enum lex_state_e)(ls)))
#define yydebug
Definition: parse.c:607
#define lex_state
Definition: parse.c:574
lex_state_e
Definition: ripper.c:380

Definition at line 405 of file parse.c.

Referenced by yyparse().

◆ set_number_literal

#define set_number_literal (   v,
  t,
  f 
)    parser_set_number_literal(parser, (v), (t), (f))

Definition at line 10939 of file parse.c.

◆ set_yylval_id

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

Definition at line 10945 of file parse.c.

◆ set_yylval_literal

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

Definition at line 10947 of file parse.c.

◆ set_yylval_name

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

Definition at line 10946 of file parse.c.

◆ set_yylval_node

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

Definition at line 10948 of file parse.c.

◆ set_yylval_num

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

Definition at line 10944 of file parse.c.

◆ set_yylval_str

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

Definition at line 10943 of file parse.c.

◆ shadowing_lvar

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

Definition at line 951 of file parse.c.

◆ SHOW_BITSTACK

#define SHOW_BITSTACK (   stack,
  name 
)    (yydebug ? rb_parser_show_bitstack(parser, stack, name, __LINE__) : (void)0)

Definition at line 413 of file parse.c.

◆ SIGN_EXTEND

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

Definition at line 1001 of file parse.c.

◆ SPECIAL_PUNCT

#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))
#define BIT(c, idx)
Definition: parse.c:12269

Definition at line 12270 of file parse.c.

◆ str_copy

#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))))
VALUE rb_str_resize(VALUE, long)
Definition: string.c:2644
#define RSTRING_PTR(str)
Definition: ruby.h:975
#define STR_NEW(p, n)
Definition: parse.c:562

◆ STR_FUNC_ESCAPE

#define STR_FUNC_ESCAPE   0x01

Definition at line 11542 of file parse.c.

◆ STR_FUNC_EXPAND

#define STR_FUNC_EXPAND   0x02

Definition at line 11543 of file parse.c.

◆ STR_FUNC_INDENT

#define STR_FUNC_INDENT   0x20

Definition at line 11547 of file parse.c.

◆ STR_FUNC_LABEL

#define STR_FUNC_LABEL   0x40

Definition at line 11548 of file parse.c.

◆ STR_FUNC_QWORDS

#define STR_FUNC_QWORDS   0x08

Definition at line 11545 of file parse.c.

◆ STR_FUNC_REGEXP

#define STR_FUNC_REGEXP   0x04

Definition at line 11544 of file parse.c.

◆ STR_FUNC_SYMBOL

#define STR_FUNC_SYMBOL   0x10

Definition at line 11546 of file parse.c.

◆ STR_FUNC_TERM

#define STR_FUNC_TERM   0x8000

Definition at line 11549 of file parse.c.

◆ STR_NEW

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

Definition at line 562 of file parse.c.

◆ STR_NEW0

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

Definition at line 563 of file parse.c.

◆ STR_NEW2

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

Definition at line 564 of file parse.c.

◆ STR_NEW3

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

Definition at line 565 of file parse.c.

◆ subnodes

#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:678

◆ TAB_WIDTH

#define TAB_WIDTH   8

Definition at line 341 of file parse.c.

◆ tAMPER

#define tAMPER   334

Definition at line 287 of file parse.c.

◆ tANDDOT

#define tANDDOT   148

Definition at line 274 of file parse.c.

◆ tANDOP

#define tANDOP   146

Definition at line 264 of file parse.c.

◆ tAREF

#define tAREF   143

Definition at line 270 of file parse.c.

◆ tASET

#define tASET   144

Definition at line 271 of file parse.c.

◆ tASSOC

#define tASSOC   325

Definition at line 278 of file parse.c.

◆ tBACK_REF

#define tBACK_REF   321

Definition at line 253 of file parse.c.

◆ tCHAR

#define tCHAR   319

Definition at line 251 of file parse.c.

◆ tCMP

#define tCMP   133

Definition at line 258 of file parse.c.

◆ tCOLON2

#define tCOLON2   145

Definition at line 275 of file parse.c.

◆ tCOLON3

#define tCOLON3   323

Definition at line 276 of file parse.c.

◆ tCONSTANT

#define tCONSTANT   311

Definition at line 243 of file parse.c.

◆ tCVAR

#define tCVAR   312

Definition at line 244 of file parse.c.

◆ tDOT2

#define tDOT2   128

Definition at line 268 of file parse.c.

◆ tDOT3

#define tDOT3   129

Definition at line 269 of file parse.c.

◆ tDSTAR

#define tDSTAR   333

Definition at line 286 of file parse.c.

◆ tEQ

#define tEQ   138

Definition at line 259 of file parse.c.

◆ tEQQ

#define tEQQ   139

Definition at line 260 of file parse.c.

◆ tFID

#define tFID   308

Definition at line 240 of file parse.c.

◆ tFLOAT

#define tFLOAT   315

Definition at line 247 of file parse.c.

◆ tGEQ

#define tGEQ   137

Definition at line 262 of file parse.c.

◆ tGVAR

#define tGVAR   309

Definition at line 241 of file parse.c.

◆ tIDENTIFIER

#define tIDENTIFIER   307

Definition at line 239 of file parse.c.

◆ tIMAGINARY

#define tIMAGINARY   317

Definition at line 249 of file parse.c.

◆ tINTEGER

#define tINTEGER   314

Definition at line 246 of file parse.c.

◆ tIVAR

#define tIVAR   310

Definition at line 242 of file parse.c.

◆ tLABEL

#define tLABEL   313

Definition at line 245 of file parse.c.

◆ tLABEL_END

#define tLABEL_END   349

Definition at line 302 of file parse.c.

◆ tLAMBDA

#define tLAMBDA   335

Definition at line 288 of file parse.c.

◆ tLAMBEG

#define tLAMBEG   348

Definition at line 301 of file parse.c.

◆ tLAST_TOKEN

#define tLAST_TOKEN   352

Definition at line 305 of file parse.c.

◆ tLBRACE

#define tLBRACE   330

Definition at line 283 of file parse.c.

◆ tLBRACE_ARG

#define tLBRACE_ARG   331

Definition at line 284 of file parse.c.

◆ tLBRACK

#define tLBRACK   329

Definition at line 282 of file parse.c.

◆ tLEQ

#define tLEQ   136

Definition at line 263 of file parse.c.

◆ tLOWEST

#define tLOWEST   350

Definition at line 303 of file parse.c.

◆ tLPAREN

#define tLPAREN   326

Definition at line 279 of file parse.c.

◆ tLPAREN_ARG

#define tLPAREN_ARG   327

Definition at line 280 of file parse.c.

◆ tLSHFT

#define tLSHFT   134

Definition at line 272 of file parse.c.

◆ tMATCH

#define tMATCH   141

Definition at line 266 of file parse.c.

◆ tNEQ

#define tNEQ   140

Definition at line 261 of file parse.c.

◆ tNMATCH

#define tNMATCH   142

Definition at line 267 of file parse.c.

◆ tNTH_REF

#define tNTH_REF   320

Definition at line 252 of file parse.c.

◆ tok

#define tok ( )    tokenbuf

Definition at line 11676 of file parse.c.

◆ tok_hex

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

Definition at line 10927 of file parse.c.

◆ TOK_INTERN

#define TOK_INTERN ( )    intern_cstr(tok(), toklen(), current_enc)

Definition at line 566 of file parse.c.

◆ tokadd

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

Definition at line 10926 of file parse.c.

◆ tokadd_escape

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

Definition at line 10929 of file parse.c.

◆ tokadd_mbchar

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

Definition at line 12054 of file parse.c.

◆ tokadd_string

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

Definition at line 10931 of file parse.c.

◆ tokaddmbc

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

Definition at line 10933 of file parse.c.

◆ tokcopy

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

Definition at line 11733 of file parse.c.

◆ TOKEN2ID

#define TOKEN2ID (   tok)
Value:
( \
tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
#define TOKEN2CONSTID(tok)
Definition: id.h:72
#define TOKEN2GLOBALID(tok)
Definition: id.h:71
#define TOKEN2CLASSID(tok)
Definition: id.h:73
#define TOKEN2INSTANCEID(tok)
Definition: id.h:70
#define tok()
Definition: parse.c:11676
#define TOKEN2ATTRSETID(tok)
Definition: id.h:74
#define TOKEN2LOCALID(tok)
Definition: id.h:69

Definition at line 1011 of file parse.c.

◆ TOKEN2VAL

#define TOKEN2VAL (   t)    ID2VAL(t)

Definition at line 1108 of file parse.c.

◆ token_column

#define token_column   ((int)(parser->tokp - lex_pbeg))

Definition at line 619 of file parse.c.

◆ token_flush

#define token_flush (   p)    ((p)->lex.ptok = (p)->lex.pcur)

Definition at line 571 of file parse.c.

◆ token_info_pop

#define token_info_pop (   token)    token_info_pop_gen(parser, (token), rb_strlen_lit(token))

Definition at line 1195 of file parse.c.

◆ token_info_push

#define token_info_push (   token)    token_info_push_gen(parser, (token), rb_strlen_lit(token))

Definition at line 1194 of file parse.c.

◆ tokenbuf

#define tokenbuf   (parser->tokenbuf)

Definition at line 584 of file parse.c.

◆ tokfix

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

Definition at line 11675 of file parse.c.

◆ tokidx

#define tokidx   (parser->tokidx)

Definition at line 585 of file parse.c.

◆ toklast

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

Definition at line 11678 of file parse.c.

◆ toklen

#define toklen ( )    tokidx

Definition at line 11677 of file parse.c.

◆ tokline

#define tokline   (parser->tokline)

Definition at line 587 of file parse.c.

◆ tokp

#define tokp   lex.ptok

Definition at line 617 of file parse.c.

◆ toksiz

#define toksiz   (parser->toksiz)

Definition at line 586 of file parse.c.

◆ tokspace

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

Definition at line 10925 of file parse.c.

◆ tOP_ASGN

#define tOP_ASGN   324

Definition at line 277 of file parse.c.

◆ top_const_field

#define top_const_field (   n)    NEW_COLON3(n)

Definition at line 753 of file parse.c.

◆ tOROP

#define tOROP   147

Definition at line 265 of file parse.c.

◆ tPOW

#define tPOW   132

Definition at line 257 of file parse.c.

◆ tQSYMBOLS_BEG

#define tQSYMBOLS_BEG   343

Definition at line 296 of file parse.c.

◆ tQWORDS_BEG

#define tQWORDS_BEG   341

Definition at line 294 of file parse.c.

◆ tRATIONAL

#define tRATIONAL   316

Definition at line 248 of file parse.c.

◆ tREGEXP_BEG

#define tREGEXP_BEG   339

Definition at line 292 of file parse.c.

◆ tREGEXP_END

#define tREGEXP_END   322

Definition at line 254 of file parse.c.

◆ tRPAREN

#define tRPAREN   328

Definition at line 281 of file parse.c.

◆ tRSHFT

#define tRSHFT   135

Definition at line 273 of file parse.c.

◆ tSTAR

#define tSTAR   332

Definition at line 285 of file parse.c.

◆ tSTRING_BEG

#define tSTRING_BEG   337

Definition at line 290 of file parse.c.

◆ tSTRING_CONTENT

#define tSTRING_CONTENT   318

Definition at line 250 of file parse.c.

◆ tSTRING_DBEG

#define tSTRING_DBEG   344

Definition at line 297 of file parse.c.

◆ tSTRING_DEND

#define tSTRING_DEND   345

Definition at line 298 of file parse.c.

◆ tSTRING_DVAR

#define tSTRING_DVAR   346

Definition at line 299 of file parse.c.

◆ tSTRING_END

#define tSTRING_END   347

Definition at line 300 of file parse.c.

◆ tSYMBEG

#define tSYMBEG   336

Definition at line 289 of file parse.c.

◆ tSYMBOLS_BEG

#define tSYMBOLS_BEG   342

Definition at line 295 of file parse.c.

◆ tUMINUS

#define tUMINUS   131

Definition at line 256 of file parse.c.

◆ tUMINUS_NUM

#define tUMINUS_NUM   351

Definition at line 304 of file parse.c.

◆ tUPLUS

#define tUPLUS   130

Definition at line 255 of file parse.c.

◆ tWORDS_BEG

#define tWORDS_BEG   340

Definition at line 293 of file parse.c.

◆ tXSTRING_BEG

#define tXSTRING_BEG   338

Definition at line 291 of file parse.c.

◆ unterminated_literal

#define unterminated_literal (   mesg)    yyerror0(mesg)

◆ value_expr

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

Definition at line 672 of file parse.c.

◆ var_field

#define var_field (   n)    (n)

Definition at line 757 of file parse.c.

◆ void_expr

#define void_expr (   node)    void_expr0((node) = remove_begin(node))

Definition at line 674 of file parse.c.

Referenced by yyparse().

◆ void_expr0

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

Definition at line 673 of file parse.c.

◆ void_stmts

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

Definition at line 676 of file parse.c.

Referenced by yyparse().

◆ vtable_add

#define vtable_add (   tbl,
  id 
)    vtable_add_gen(parser, __LINE__, #tbl, tbl, id)

Definition at line 11248 of file parse.c.

◆ vtable_alloc

#define vtable_alloc (   prev)    vtable_alloc_gen(parser, __LINE__, prev)

Definition at line 11208 of file parse.c.

◆ vtable_free

#define vtable_free (   tbl)    vtable_free_gen(parser, __LINE__, #tbl, tbl)

Definition at line 11226 of file parse.c.

◆ vtable_pop

#define vtable_pop (   tbl,
 
)    vtable_pop_gen(parser, __LINE__, #tbl, tbl, n)

Definition at line 11265 of file parse.c.

◆ WARN_ARGS

#define WARN_ARGS (   fmt,
 
)    WARN_ARGS_L(ruby_sourceline,fmt,n)

Definition at line 1172 of file parse.c.

◆ WARN_ARGS_L

#define WARN_ARGS_L (   l,
  fmt,
 
)    ruby_sourcefile, (l), (fmt)

Definition at line 1173 of file parse.c.

◆ warn_balanced

#define warn_balanced (   tok,
  op,
  syn 
)
Value:
((void) \
(!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
space_seen && !ISSPACE(c) && \
(ambiguous_operator(tok, op, syn), 0)), \
(enum yytokentype)(tok))
#define IS_lex_state_for(x, ls)
Definition: parse.c:400
yytokentype
Definition: parse.c:68
#define ambiguous_operator(tok, op, syn)
Definition: parse.c:13257
#define tok()
Definition: parse.c:11676
#define ISSPACE(c)
Definition: ruby.h:2145

Definition at line 13264 of file parse.c.

◆ WARN_CALL

#define WARN_CALL   rb_compile_warn

Definition at line 1174 of file parse.c.

◆ WARN_I

#define WARN_I (   i)    i

Definition at line 1169 of file parse.c.

◆ WARN_ID

#define WARN_ID (   i)    rb_id2name(i)

Definition at line 1170 of file parse.c.

◆ WARN_PAST_SCOPE

#define WARN_PAST_SCOPE   0

Definition at line 338 of file parse.c.

◆ WARN_S

#define WARN_S (   s)    s

Definition at line 1168 of file parse.c.

◆ WARN_S_L

#define WARN_S_L (   s,
 
)    s

Definition at line 1167 of file parse.c.

◆ WARNING_ARGS

#define WARNING_ARGS (   fmt,
 
)    WARN_ARGS(fmt,n)

Definition at line 1175 of file parse.c.

◆ WARNING_ARGS_L

#define WARNING_ARGS_L (   l,
  fmt,
 
)    WARN_ARGS_L(l,fmt,n)

Definition at line 1176 of file parse.c.

◆ WARNING_CALL

#define WARNING_CALL   rb_compile_warning

Definition at line 1177 of file parse.c.

◆ was_bol

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

Definition at line 11673 of file parse.c.

◆ whole_match_p

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

Definition at line 10937 of file parse.c.

◆ YY_

#define YY_ (   msgid)    msgid

Definition at line 1309 of file parse.c.

Referenced by yyparse().

◆ YY_LOCATION_PRINT

#define YY_LOCATION_PRINT (   File,
  Loc 
)
Value:
rb_parser_printf(parser, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
(Loc).last_line, (Loc).last_column)
void rb_parser_printf(struct parser_params *parser, const char *fmt,...)
Definition: parse.c:17472

Definition at line 349 of file parse.c.

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)
Value:
do { \
if (yydebug) \
yy_reduce_print (yyvsp, yylsp, Rule, parser); \
} while (YYID (0))
#define yydebug
Definition: parse.c:607
#define YYID(n)
Definition: parse.c:1322

Definition at line 5094 of file parse.c.

Referenced by yyparse().

◆ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)
Value:
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top), parser); \
} while (YYID (0))
#define yydebug
Definition: parse.c:607
#define YYID(n)
Definition: parse.c:1322

Definition at line 5054 of file parse.c.

◆ YY_SYMBOL_PRINT

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

Definition at line 4954 of file parse.c.

Referenced by yyparse().

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 4856 of file parse.c.

Referenced by yyparse().

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 4855 of file parse.c.

Referenced by yyparse().

◆ YYBACKUP

#define YYBACKUP (   Token,
  Value 
)
Value:
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \
goto yybackup; \
} \
else \
{ \
yyerror (&yylloc, parser, YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (YYID (0))
if(len<=MAX_WORD_LENGTH &&len >=MIN_WORD_LENGTH)
Definition: zonetab.h:883
#define YYTRANSLATE(YYX)
Definition: parse.c:1484
#define YY_(msgid)
Definition: parse.c:1309
#define YYEMPTY
Definition: parse.c:4852
#define YYID(n)
Definition: parse.c:1322

Definition at line 4868 of file parse.c.

◆ YYBISON

#define YYBISON   1

Definition at line 47 of file parse.c.

◆ YYBISON_VERSION

#define YYBISON_VERSION   "2.3"

Definition at line 50 of file parse.c.

◆ YYCALLOC

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

Definition at line 345 of file parse.c.

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

Definition at line 4851 of file parse.c.

◆ YYCOPY

#define YYCOPY (   To,
  From,
  Count 
)
Value:
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (YYID (0))
#define YYID(n)
Definition: parse.c:1322

Definition at line 1437 of file parse.c.

◆ YYDEBUG

#define YYDEBUG   1

Definition at line 320 of file parse.c.

◆ yydebug

#define yydebug   (parser->yydebug)

Definition at line 607 of file parse.c.

◆ YYDPRINTF

#define YYDPRINTF (   Args)
Value:
do { \
if (yydebug) \
YYFPRINTF Args; \
} while (YYID (0))
#define yydebug
Definition: parse.c:607
#define YYID(n)
Definition: parse.c:1322

Definition at line 4948 of file parse.c.

Referenced by yyparse().

◆ YYEMPTY

#define YYEMPTY   (-2)

Definition at line 4852 of file parse.c.

Referenced by yyparse().

◆ YYEOF

#define YYEOF   0

Definition at line 4853 of file parse.c.

Referenced by yyparse().

◆ YYERRCODE

#define YYERRCODE   256

Definition at line 4887 of file parse.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 4850 of file parse.c.

◆ yyerror

#define yyerror (   yylloc,
  parser,
  msg 
)    yyerror0(msg)

Definition at line 570 of file parse.c.

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 4857 of file parse.c.

◆ yyerror0

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

Definition at line 569 of file parse.c.

◆ YYERROR_VERBOSE [1/2]

#define YYERROR_VERBOSE   1

Definition at line 1206 of file parse.c.

◆ YYERROR_VERBOSE [2/2]

#define YYERROR_VERBOSE   1

Definition at line 1206 of file parse.c.

◆ YYFAIL

#define YYFAIL   goto yyerrlab

Definition at line 4864 of file parse.c.

◆ YYFINAL

#define YYFINAL   3

Definition at line 1467 of file parse.c.

Referenced by yyparse().

◆ YYFPRINTF

#define YYFPRINTF   rb_parser_printf

Definition at line 347 of file parse.c.

◆ YYFREE

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

Definition at line 346 of file parse.c.

◆ YYID

#define YYID (   n)    (n)

Definition at line 1322 of file parse.c.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 5115 of file parse.c.

Referenced by yyparse().

◆ YYLAST

#define YYLAST   11649

Definition at line 1469 of file parse.c.

Referenced by yyparse().

◆ YYLEX

#define YYLEX   yylex (&yylval, &yylloc, parser)

Definition at line 4937 of file parse.c.

Referenced by yyparse().

◆ YYLLOC_DEFAULT

#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; \
} \
else \
{ \
(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:4894
if(len<=MAX_WORD_LENGTH &&len >=MIN_WORD_LENGTH)
Definition: zonetab.h:883
#define YYID(n)
Definition: parse.c:1322

Definition at line 4896 of file parse.c.

Referenced by yyparse().

◆ YYLSP_NEEDED

#define YYLSP_NEEDED   1

Definition at line 59 of file parse.c.

◆ yylval

#define yylval   (*parser->lval)

Definition at line 10913 of file parse.c.

Referenced by yyparse().

◆ yylval_id

#define yylval_id ( )    (yylval.id)

Definition at line 10949 of file parse.c.

◆ YYMALLOC

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

Definition at line 343 of file parse.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 5126 of file parse.c.

Referenced by yyparse().

◆ YYMAXUTOK

#define YYMAXUTOK   352

Definition at line 1482 of file parse.c.

◆ YYNNTS

#define YYNNTS   219

Definition at line 1474 of file parse.c.

◆ YYNRULES

#define YYNRULES   645

Definition at line 1476 of file parse.c.

◆ YYNSTATES

#define YYNSTATES   1086

Definition at line 1478 of file parse.c.

◆ YYNTOKENS

#define YYNTOKENS   146

Definition at line 1472 of file parse.c.

◆ YYPACT_NINF

#define YYPACT_NINF   -884

Definition at line 2251 of file parse.c.

Referenced by yyparse().

◆ yyparse

#define yyparse   ruby_yyparse

Definition at line 647 of file parse.c.

◆ YYPOPSTACK

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

◆ YYPURE

#define YYPURE   1

Definition at line 56 of file parse.c.

◆ YYREALLOC

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

Definition at line 344 of file parse.c.

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 4866 of file parse.c.

◆ YYRHSLOC

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

Definition at line 4894 of file parse.c.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 1299 of file parse.c.

◆ YYSIZE_T

#define YYSIZE_T   unsigned int

Definition at line 1295 of file parse.c.

Referenced by yyparse().

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

Definition at line 53 of file parse.c.

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 1377 of file parse.c.

Referenced by yyparse().

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 1380 of file parse.c.

◆ YYSTACK_BYTES

#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
#define N
Definition: lgamma_r.c:20
#define YYSTACK_GAP_MAXIMUM
Definition: parse.c:1422
union YYSTYPE YYSTYPE
Definition: parse.h:302
short int yytype_int16
Definition: ripper.c:1282

Definition at line 1426 of file parse.c.

Referenced by yyparse().

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 1378 of file parse.c.

Referenced by yyparse().

◆ YYSTACK_GAP_MAXIMUM

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

Definition at line 1422 of file parse.c.

◆ YYSTACK_RELOCATE

#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 YYSTACK_GAP_MAXIMUM
Definition: parse.c:1422
#define YYID(n)
Definition: parse.c:1322

Definition at line 1453 of file parse.c.

Referenced by yyparse().

◆ YYSTACK_USE_ALLOCA

#define YYSTACK_USE_ALLOCA   0

Definition at line 322 of file parse.c.

◆ YYTABLE_NINF

#define YYTABLE_NINF   -646

Definition at line 2396 of file parse.c.

Referenced by yyparse().

◆ YYTERROR

#define YYTERROR   1

Definition at line 4886 of file parse.c.

◆ YYTOKEN_TABLE

#define YYTOKEN_TABLE   0

Definition at line 1213 of file parse.c.

◆ YYTOKENTYPE

#define YYTOKENTYPE

Definition at line 65 of file parse.c.

◆ YYTRANSLATE

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

Definition at line 1484 of file parse.c.

Referenced by yyparse().

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

Definition at line 1481 of file parse.c.

◆ YYUSE

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

Definition at line 1315 of file parse.c.

Typedef Documentation

◆ rb_magic_comment_length_t

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

Definition at line 12968 of file parse.c.

◆ rb_magic_comment_setter_t

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

Definition at line 12969 of file parse.c.

◆ stack_type

typedef VALUE stack_type

Definition at line 411 of file parse.c.

◆ token_info

typedef struct token_info token_info

◆ yytype_int16

typedef short int yytype_int16

Definition at line 1282 of file parse.c.

◆ yytype_int8

typedef short int yytype_int8

Definition at line 1270 of file parse.c.

◆ yytype_uint16

typedef unsigned short int yytype_uint16

Definition at line 1276 of file parse.c.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 1261 of file parse.c.

Enumeration Type Documentation

◆ lex_state_bits

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_LABEL_bit 
EXPR_LABELED_bit 
EXPR_FITEM_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_LABEL_bit 
EXPR_LABELED_bit 
EXPR_FITEM_bit 
EXPR_MAX_STATE 

Definition at line 363 of file parse.c.

◆ lex_state_e

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 
DEF_EXPR 
DEF_EXPR 
EXPR_VALUE 
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 
DEF_EXPR 
DEF_EXPR 
EXPR_VALUE 
EXPR_BEG_ANY 
EXPR_ARG_ANY 
EXPR_END_ANY 

Definition at line 380 of file parse.c.

◆ string_type

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

Definition at line 11551 of file parse.c.

◆ yytokentype

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 
tRATIONAL 
tIMAGINARY 
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 
tANDDOT 
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 
tLABEL_END 
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 
tRATIONAL 
tIMAGINARY 
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 
tANDDOT 
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 
tLABEL_END 
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 
tRATIONAL 
tIMAGINARY 
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 
tANDDOT 
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 
tLABEL_END 
tLOWEST 
tUMINUS_NUM 
tLAST_TOKEN 

Definition at line 68 of file parse.c.

Function Documentation

◆ PRINTF_ARGS() [1/2]

PRINTF_ARGS ( void   rb_parser_fatalstruct parser_params *parser, const char *fmt,...,
,
 
)

◆ PRINTF_ARGS() [2/2]

PRINTF_ARGS ( static void   parser_compile_errorstruct parser_params *, const char *fmt,...,
,
 
)

◆ rb_compile_cstr()

NODE* rb_compile_cstr ( const char *  f,
const char *  s,
int  len,
int  line 
)

Definition at line 11489 of file parse.c.

References rb_str_new().

◆ rb_compile_file()

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

Definition at line 11511 of file parse.c.

References rb_parser_compile_file(), and rb_parser_new().

◆ rb_compile_string()

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

Definition at line 11469 of file parse.c.

◆ rb_init_parse()

void rb_init_parse ( void  )

Definition at line 17167 of file parse.c.

◆ rb_io_gets_internal()

VALUE rb_io_gets_internal ( VALUE  io)

Definition at line 3287 of file io.c.

References GetOpenFile.

◆ rb_parser_append_print()

NODE* rb_parser_append_print ( VALUE  vparser,
NODE node 
)

◆ rb_parser_calloc()

void* rb_parser_calloc ( struct parser_params parser,
size_t  nelem,
size_t  size 
)

Definition at line 17425 of file parse.c.

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

◆ rb_parser_compile_cstr()

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

Definition at line 11496 of file parse.c.

References rb_str_new().

◆ rb_parser_compile_file()

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

Definition at line 11519 of file parse.c.

References rb_filesystem_str_new_cstr(), and rb_parser_compile_file_path().

Referenced by rb_compile_file().

◆ rb_parser_compile_file_path()

NODE* rb_parser_compile_file_path ( VALUE  vparser,
VALUE  fname,
VALUE  file,
int  start 
)

Definition at line 11525 of file parse.c.

References lex_gets, and TypedData_Get_Struct.

Referenced by rb_parser_compile_file().

◆ rb_parser_compile_string()

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

Definition at line 11476 of file parse.c.

References rb_filesystem_str_new_cstr(), and rb_parser_compile_string_path().

◆ rb_parser_compile_string_path()

NODE* rb_parser_compile_string_path ( VALUE  vparser,
VALUE  f,
VALUE  s,
int  line 
)

Definition at line 11482 of file parse.c.

Referenced by rb_parser_compile_string().

◆ rb_parser_encoding()

VALUE rb_parser_encoding ( VALUE  vparser)

Definition at line 17368 of file parse.c.

References current_enc, rb_enc_from_encoding(), and TypedData_Get_Struct.

◆ rb_parser_end_seen_p()

VALUE rb_parser_end_seen_p ( VALUE  vparser)

Definition at line 17353 of file parse.c.

References Qfalse, Qtrue, ruby__end__seen, and TypedData_Get_Struct.

◆ rb_parser_fatal()

void rb_parser_fatal ( struct parser_params parser,
const char *  fmt,
  ... 
)

Definition at line 15542 of file parse.c.

References rb_str_new_cstr(), and rb_str_vcatf().

◆ rb_parser_free()

void rb_parser_free ( struct parser_params parser,
void *  ptr 
)

◆ rb_parser_get_yydebug()

VALUE rb_parser_get_yydebug ( VALUE  self)

Definition at line 17383 of file parse.c.

References Qfalse, Qtrue, and TypedData_Get_Struct.

◆ rb_parser_lex_state_name()

VALUE rb_parser_lex_state_name ( enum lex_state_e  state)

Definition at line 15513 of file parse.c.

◆ rb_parser_malloc()

void* rb_parser_malloc ( struct parser_params parser,
size_t  size 
)

Definition at line 17415 of file parse.c.

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

◆ rb_parser_new()

VALUE rb_parser_new ( void  )

Definition at line 17298 of file parse.c.

References TypedData_Make_Struct.

Referenced by rb_compile_file().

◆ rb_parser_printf()

void rb_parser_printf ( struct parser_params parser,
const char *  fmt,
  ... 
)

◆ rb_parser_realloc()

void* rb_parser_realloc ( struct parser_params parser,
void *  ptr,
size_t  size 
)

◆ rb_parser_reg_compile()

RUBY_SYMBOL_EXPORT_BEGIN VALUE rb_parser_reg_compile ( struct parser_params parser,
VALUE  str,
int  options 
)

Definition at line 17053 of file parse.c.

References rb_reg_compile(), RE_OPTION_MASK, ruby_sourcefile, and ruby_sourceline.

◆ rb_parser_set_context()

VALUE rb_parser_set_context ( VALUE  vparser,
const struct rb_block base,
int  main 
)

◆ rb_parser_set_yydebug()

VALUE rb_parser_set_yydebug ( VALUE  self,
VALUE  flag 
)

Definition at line 17398 of file parse.c.

References RTEST, and TypedData_Get_Struct.

◆ rb_parser_show_bitstack()

void rb_parser_show_bitstack ( struct parser_params parser,
stack_type  stack,
const char *  name,
int  line 
)

Definition at line 15532 of file parse.c.

References rb_sprintf().

◆ rb_parser_trace_lex_state()

enum lex_state_e rb_parser_trace_lex_state ( struct parser_params parser,
enum lex_state_e  from,
enum lex_state_e  to,
int  line 
)

Definition at line 15499 of file parse.c.

References rb_str_new_cstr().

◆ rb_parser_while_loop()

NODE* rb_parser_while_loop ( VALUE  vparser,
NODE node,
int  chomp,
int  split 
)

◆ rb_reg_fragment_setenc()

int rb_reg_fragment_setenc ( struct parser_params parser,
VALUE  str,
int  options 
)

◆ rb_reserved_word()

const struct kwtable* rb_reserved_word ( const char *  str,
unsigned int  len 
)

Definition at line 17292 of file parse.c.

◆ yyparse() [1/2]

int yyparse ( )

◆ yyparse() [2/2]

int yyparse ( struct parser_params parser)

Variable Documentation

◆ rb_parser_lex_state_names

const char rb_parser_lex_state_names[][13]
Initial value:
= {
"EXPR_BEG", "EXPR_END", "EXPR_ENDARG", "EXPR_ENDFN", "EXPR_ARG",
"EXPR_CMDARG", "EXPR_MID", "EXPR_FNAME", "EXPR_DOT", "EXPR_CLASS",
"EXPR_LABEL", "EXPR_LABELED","EXPR_FITEM",
}

Definition at line 15456 of file parse.c.

◆ ruby_global_name_punct_bits

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

Definition at line 12265 of file parse.c.