Ruby  2.4.2p198(2017-09-14revision59899)
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
ripper.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"
Include dependency graph for ripper.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.5"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   1
 
#define YYPUSH   0
 
#define YYPULL   1
 
#define YYLSP_NEEDED   0
 
#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 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 ? show_bitstack(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 VTBL_DEBUG   0
 
#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 yyerror(msg)   parser_yyerror(parser, (msg))
 
#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 CALL_Q_P(q)   ((q) == 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)   cond_gen(parser, (node), FALSE)
 
#define method_cond(node)   cond_gen(parser, (node), TRUE)
 
#define new_if(cc, left, right)   new_if_gen(parser, (cc), (left), (right))
 
#define new_unless(cc, left, right)   new_if_gen(parser, (cc), (right), (left))
 
#define logop(type, node1, node2)   logop_gen(parser, (type), (node1), (node2))
 
#define value_expr(node)   value_expr_gen(parser, (node) = remove_begin(node))
 
#define void_expr0(node)   void_expr_gen(parser, (node))
 
#define void_expr(node)   void_expr0((node) = remove_begin(node))
 
#define void_stmts(node)   void_stmts_gen(parser, (node))
 
#define reduce_nodes(n)   reduce_nodes_gen(parser,(n))
 
#define block_dup_check(n1, n2)   block_dup_check_gen(parser,(n1),(n2))
 
#define block_append(h, t)   block_append_gen(parser,(h),(t))
 
#define list_append(l, i)   list_append_gen(parser,(l),(i))
 
#define arg_append(h, t)   arg_append_gen(parser,(h),(t))
 
#define arg_concat(h, t)   arg_concat_gen(parser,(h),(t))
 
#define literal_concat(h, t)   literal_concat_gen(parser,(h),(t))
 
#define new_evstr(n)   new_evstr_gen(parser,(n))
 
#define evstr2dstr(n)   evstr2dstr_gen(parser,(n))
 
#define call_bin_op(recv, id, arg1)   call_bin_op_gen(parser, (recv),(id),(arg1))
 
#define call_uni_op(recv, id)   call_uni_op_gen(parser, (recv),(id))
 
#define new_args(f, o, r, p, t)   new_args_gen(parser, (f),(o),(r),(p),(t))
 
#define new_args_tail(k, kr, b)   new_args_tail_gen(parser, (k),(kr),(b))
 
#define new_kw_arg(k)   ((k) ? NEW_KW_ARG(0, (k)) : 0)
 
#define ret_args(node)   ret_args_gen(parser, (node))
 
#define new_yield(node)   new_yield_gen(parser, (node))
 
#define dsym_node(node)   dsym_node_gen(parser, (node))
 
#define gettable(id)   gettable_gen(parser,(id))
 
#define assignable(id, node)   assignable_gen(parser, (id), (node))
 
#define aryset(node1, node2)   aryset_gen(parser, (node1), (node2))
 
#define attrset(node, q, id)   attrset_gen(parser, (node), (q), (id))
 
#define rb_backref_error(n)   rb_backref_error_gen(parser,(n))
 
#define node_assign(node1, node2)   node_assign_gen(parser, (node1), (node2))
 
#define new_attr_op_assign(lhs, type, attr, op, rhs)   new_attr_op_assign_gen(parser, (lhs), (type), (attr), (op), (rhs))
 
#define new_const_op_assign(lhs, op, rhs)   new_const_op_assign_gen(parser, (lhs), (op), (rhs))
 
#define const_path_field(w, n)   NEW_COLON2(w, n)
 
#define top_const_field(n)   NEW_COLON3(n)
 
#define const_decl(path)   const_decl_gen(parser, path)
 
#define var_field(n)   (n)
 
#define backref_assign_error(n, a)   (rb_backref_error(n), NEW_BEGIN(0))
 
#define new_hash(hash)   new_hash_gen(parser, (hash))
 
#define new_defined(expr)   NEW_DEFINED(remove_begin_all(expr))
 
#define new_regexp(node, opt)   new_regexp_gen(parser, node, opt)
 
#define new_xstring(node)   new_xstring_gen(parser, node)
 
#define new_string1(str)   (str)
 
#define new_brace_body(param, stmt)   NEW_ITER(param, stmt)
 
#define new_do_body(param, stmt)   NEW_ITER(param, stmt)
 
#define match_op(node1, node2)   match_op_gen(parser, (node1), (node2))
 
#define local_tbl()   local_tbl_gen(parser)
 
#define reg_compile(str, options)   reg_compile_gen(parser, (str), (options))
 
#define reg_fragment_setenc(str, options)   reg_fragment_setenc_gen(parser, (str), (options))
 
#define reg_fragment_check(str, options)   reg_fragment_check_gen(parser, (str), (options))
 
#define reg_named_capture_assign(regexp)   reg_named_capture_assign_gen(parser,(regexp))
 
#define heredoc_dedent(str)   parser_heredoc_dedent(parser, (str))
 
#define get_id(id)   (id)
 
#define get_value(val)   (val)
 
#define new_op_assign(lhs, op, rhs)   new_op_assign_gen(parser, (lhs), (op), (rhs))
 
#define formal_argument(id)   formal_argument_gen(parser, (id))
 
#define shadowing_lvar(name)   shadowing_lvar_gen(parser, (name))
 
#define new_bv(id)   new_bv_gen(parser, (id))
 
#define local_push(top)   local_push_gen(parser,(top))
 
#define local_pop()   local_pop_gen(parser)
 
#define local_var(id)   local_var_gen(parser, (id))
 
#define arg_var(id)   arg_var_gen(parser, (id))
 
#define local_id(id)   local_id_gen(parser, (id))
 
#define internal_id()   internal_id_gen(parser)
 
#define dyna_push()   dyna_push_gen(parser)
 
#define dyna_pop(node)   dyna_pop_gen(parser, (node))
 
#define dyna_in_block()   dyna_in_block_gen(parser)
 
#define dyna_var(id)   local_var(id)
 
#define dvar_defined(id)   dvar_defined_gen(parser, (id), 0)
 
#define dvar_defined_get(id)   dvar_defined_gen(parser, (id), 1)
 
#define dvar_curr(id)   dvar_curr_gen(parser, (id))
 
#define lvar_defined(id)   lvar_defined_gen(parser, (id))
 
#define RE_OPTION_ONCE   (1<<16)
 
#define RE_OPTION_ENCODING_SHIFT   8
 
#define RE_OPTION_ENCODING(e)   (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
 
#define RE_OPTION_ENCODING_IDX(o)   (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
 
#define RE_OPTION_ENCODING_NONE(o)   ((o)&RE_OPTION_ARG_ENCODING_NONE)
 
#define RE_OPTION_MASK   0xff
 
#define RE_OPTION_ARG_ENCODING_NONE   32
 
#define NODE_STRTERM   NODE_ZARRAY /* nothing to gc */
 
#define NODE_HEREDOC   NODE_ARRAY /* 1, 3 to gc */
 
#define SIGN_EXTEND(x, n)   (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1))
 
#define nd_func   u1.id
 
#define nd_term(node)   SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)
 
#define nd_paren(node)   (char)((node)->u2.id >> CHAR_BIT*2)
 
#define nd_nest   u3.cnt
 
#define ripper_id2sym(id)   id
 
#define Qnone   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 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_NEEDED   1
 
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
 
#define YYCOPY(To, From, Count)
 
#define YYFINAL   3
 
#define YYLAST   11794
 
#define YYNTOKENS   146
 
#define YYNNTS   217
 
#define YYNRULES   642
 
#define YYNSTATES   1085
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   353
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -876
 
#define YYTABLE_NINF   -643
 
#define yypact_value_is_default(yystate)   ((yystate) == (-876))
 
#define yytable_value_is_error(yytable_value)   ((yytable_value) == (-643))
 
#define yyerrok   (yyerrstatus = 0)
 
#define yyclearin   (yychar = YYEMPTY)
 
#define YYEMPTY   (-2)
 
#define YYEOF   0
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYFAIL   goto yyerrlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYTERROR   1
 
#define YYERRCODE   256
 
#define YYRHSLOC(Rhs, K)   ((Rhs)[K])
 
#define YYLLOC_DEFAULT(Current, Rhs, N)
 
#define YY_LOCATION_PRINT(File, Loc)   ((void) 0)
 
#define YYLEX   yylex (&yylval, 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 YYCASE_(N, S)
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 
#define YYSYNTAX_ERROR
 
#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 ripper_flush(p)   (void)(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 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_TERM_END   -1
 
#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 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 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 ambiguous_operator(op, syn)
 
#define warn_balanced(op, syn)
 
#define no_digits()   do {yyerror("numeric literal without digits"); return 0;} while (0)
 
#define parser_warning(node, mesg)   parser_warning(parser, (node), (mesg))
 
#define parser_warn(node, mesg)   parser_warn(parser, (node), (mesg))
 
#define assignable_result(x)   (x)
 
#define LVAR_USED   ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
 
#define subnodes(n1, n2)
 
#define HEAPCNT(n, size)   ((n) * (size) / sizeof(YYSTYPE))
 
#define NEWHEAP()   rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0)
 
#define ADD2HEAP(n, c, p)
 

Typedefs

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

Enumerations

enum  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

static enum lex_state_e trace_lex_state (enum lex_state_e from, enum lex_state_e to, int line)
 
static void show_bitstack (stack_type, const char *, int)
 
static int vtable_size (const struct vtable *tbl)
 
static struct vtablevtable_alloc (struct vtable *prev)
 
static void vtable_free (struct vtable *tbl)
 
static void vtable_add (struct vtable *tbl, ID id)
 
static void vtable_pop (struct vtable *tbl, int n)
 
static int vtable_included (const struct vtable *tbl, ID id)
 
static int parser_yyerror (struct parser_params *, const char *)
 
static int yylex (YYSTYPE *, struct parser_params *)
 
static NODEnode_newnode (struct parser_params *, enum node_type, VALUE, VALUE, VALUE)
 
static NODEcond_gen (struct parser_params *, NODE *, int)
 
static NODEnew_if_gen (struct parser_params *, NODE *, NODE *, NODE *)
 
static NODElogop_gen (struct parser_params *, enum node_type, NODE *, NODE *)
 
static NODEnewline_node (NODE *)
 
static void fixpos (NODE *, NODE *)
 
static int value_expr_gen (struct parser_params *, NODE *)
 
static void void_expr_gen (struct parser_params *, NODE *)
 
static NODEremove_begin (NODE *)
 
static NODEremove_begin_all (NODE *)
 
static void void_stmts_gen (struct parser_params *, NODE *)
 
static void reduce_nodes_gen (struct parser_params *, NODE **)
 
static void block_dup_check_gen (struct parser_params *, NODE *, NODE *)
 
static NODEblock_append_gen (struct parser_params *, NODE *, NODE *)
 
static NODElist_append_gen (struct parser_params *, NODE *, NODE *)
 
static NODElist_concat (NODE *, NODE *)
 
static NODEarg_append_gen (struct parser_params *, NODE *, NODE *)
 
static NODEarg_concat_gen (struct parser_params *, NODE *, NODE *)
 
static NODEliteral_concat_gen (struct parser_params *, NODE *, NODE *)
 
static int literal_concat0 (struct parser_params *, VALUE, VALUE)
 
static NODEnew_evstr_gen (struct parser_params *, NODE *)
 
static NODEevstr2dstr_gen (struct parser_params *, NODE *)
 
static NODEsplat_array (NODE *)
 
static NODEcall_bin_op_gen (struct parser_params *, NODE *, ID, NODE *)
 
static NODEcall_uni_op_gen (struct parser_params *, NODE *, ID)
 
static NODEnew_args_gen (struct parser_params *, NODE *, NODE *, ID, NODE *, NODE *)
 
static NODEnew_args_tail_gen (struct parser_params *, NODE *, ID, ID)
 
static VALUE negate_lit (VALUE)
 
static NODEret_args_gen (struct parser_params *, NODE *)
 
static NODEarg_blk_pass (NODE *, NODE *)
 
static NODEnew_yield_gen (struct parser_params *, NODE *)
 
static NODEdsym_node_gen (struct parser_params *, NODE *)
 
static NODEgettable_gen (struct parser_params *, ID)
 
static NODEassignable_gen (struct parser_params *, ID, NODE *)
 
static NODEaryset_gen (struct parser_params *, NODE *, NODE *)
 
static NODEattrset_gen (struct parser_params *, NODE *, ID, ID)
 
static void rb_backref_error_gen (struct parser_params *, NODE *)
 
static NODEnode_assign_gen (struct parser_params *, NODE *, NODE *)
 
static NODEnew_op_assign_gen (struct parser_params *parser, NODE *lhs, ID op, NODE *rhs)
 
static NODEnew_attr_op_assign_gen (struct parser_params *parser, NODE *lhs, ID atype, ID attr, ID op, NODE *rhs)
 
static NODEnew_const_op_assign_gen (struct parser_params *parser, NODE *lhs, ID op, NODE *rhs)
 
static NODEconst_decl_gen (struct parser_params *parser, NODE *path)
 
static NODEkwd_append (NODE *, NODE *)
 
static NODEnew_hash_gen (struct parser_params *parser, NODE *hash)
 
static NODEnew_regexp_gen (struct parser_params *, NODE *, int)
 
static NODEnew_xstring_gen (struct parser_params *, NODE *)
 
static NODEmatch_op_gen (struct parser_params *, NODE *, NODE *)
 
static IDlocal_tbl_gen (struct parser_params *)
 
static VALUE reg_compile_gen (struct parser_params *, VALUE, int)
 
static void reg_fragment_setenc_gen (struct parser_params *, VALUE, int)
 
static int reg_fragment_check_gen (struct parser_params *, VALUE, int)
 
static NODEreg_named_capture_assign_gen (struct parser_params *parser, VALUE regexp)
 
static NODEparser_heredoc_dedent (struct parser_params *, NODE *)
 
RUBY_FUNC_EXPORTED VALUE rb_parser_reg_compile (struct parser_params *parser, VALUE str, int options)
 
RUBY_FUNC_EXPORTED int rb_reg_fragment_setenc (struct parser_params *, VALUE, int)
 
static ID formal_argument_gen (struct parser_params *, ID)
 
static ID shadowing_lvar_gen (struct parser_params *, ID)
 
static void new_bv_gen (struct parser_params *, ID)
 
static void local_push_gen (struct parser_params *, int)
 
static void local_pop_gen (struct parser_params *)
 
static void local_var_gen (struct parser_params *, ID)
 
static void arg_var_gen (struct parser_params *, ID)
 
static int local_id_gen (struct parser_params *, ID)
 
static ID internal_id_gen (struct parser_params *)
 
static const struct vtabledyna_push_gen (struct parser_params *)
 
static void dyna_pop_gen (struct parser_params *, const struct vtable *)
 
static int dyna_in_block_gen (struct parser_params *)
 
static int dvar_defined_gen (struct parser_params *, ID, int)
 
static int dvar_curr_gen (struct parser_params *, ID)
 
static int lvar_defined_gen (struct parser_params *, ID)
 
static void parser_compile_error (struct parser_params *, const char *fmt,...)
 
static void token_info_push_gen (struct parser_params *, const char *token, size_t len)
 
static void token_info_pop_gen (struct parser_params *, const char *token, size_t len)
 
static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep, struct parser_params *parser)
 
static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep, struct parser_params *parser)
 
static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop, parser)
 
static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser)
 
static YYSIZE_T yystrlen (char *yystr) const
 
static char * yystpcpy (char *yydest, const char *yysrc)
 
static YYSIZE_T yytnamerr (char *yyres, const char *yystr)
 
static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
 
static void yydestruct (char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser) const
 
int yyparse ()
 
int yyparse (struct parser_params *parser)
 
static int parser_regx_options (struct parser_params *)
 
static int parser_tokadd_string (struct parser_params *, int, int, int, long *, rb_encoding **)
 
static void parser_tokaddmbc (struct parser_params *parser, int c, rb_encoding *enc)
 
static int parser_parse_string (struct parser_params *, NODE *)
 
static int parser_here_document (struct parser_params *, NODE *)
 
static int token_info_get_column (struct parser_params *parser, const char *pend)
 
static int token_info_has_nonspaces (struct parser_params *parser, const char *pend)
 
static int parser_precise_mbclen (struct parser_params *parser, const char *p)
 
static void parser_prepare (struct parser_params *parser)
 
static VALUE debug_lines (VALUE fname)
 
static VALUE coverage (VALUE fname, int n)
 
static int e_option_supplied (struct parser_params *parser)
 
static VALUE yycompile0 (VALUE arg)
 
static NODEyycompile (struct parser_params *parser, VALUE fname, int line)
 
static rb_encodingmust_be_ascii_compatible (VALUE s)
 
static VALUE lex_get_str (struct parser_params *parser, VALUE s)
 
static VALUE lex_getline (struct parser_params *parser)
 
static NODEparser_compile_string (VALUE vparser, VALUE fname, VALUE s, int line)
 
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)
 
static VALUE lex_io_gets (struct parser_params *parser, VALUE io)
 
NODErb_compile_file (const char *f, VALUE file, int start)
 
NODErb_parser_compile_file (VALUE vparser, const char *f, VALUE file, int start)
 
NODErb_parser_compile_file_path (VALUE vparser, VALUE fname, VALUE file, int start)
 
static VALUE parser_str_new (const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0)
 
static int parser_nextline (struct parser_params *parser)
 
static int parser_cr (struct parser_params *parser, int c)
 
static int parser_nextc (struct parser_params *parser)
 
static void parser_pushback (struct parser_params *parser, int c)
 
static char * parser_newtok (struct parser_params *parser)
 
static char * parser_tokspace (struct parser_params *parser, int n)
 
static void parser_tokadd (struct parser_params *parser, int c)
 
static int parser_tok_hex (struct parser_params *parser, size_t *numlen)
 
static int parser_tokadd_codepoint (struct parser_params *parser, rb_encoding **encp, int regexp_literal, int wide)
 
static int parser_tokadd_utf8 (struct parser_params *parser, rb_encoding **encp, int string_literal, int symbol_literal, int regexp_literal)
 
static int parser_read_escape (struct parser_params *parser, int flags, rb_encoding **encp)
 
static int parser_tokadd_escape (struct parser_params *parser, rb_encoding **encp)
 
static void dispose_string (VALUE str)
 
static int parser_tokadd_mbchar (struct parser_params *parser, int c)
 
static int simple_re_meta (int c)
 
static int parser_update_heredoc_indent (struct parser_params *parser, int c)
 
static int parser_peek_variable_name (struct parser_params *parser)
 
static int parser_string_term (struct parser_params *parser, int func)
 
static int parser_heredoc_identifier (struct parser_params *parser)
 
static void parser_heredoc_restore (struct parser_params *parser, NODE *here)
 
static int dedent_string (VALUE string, int width)
 
static int parser_whole_match_p (struct parser_params *parser, const char *eos, long len, int indent)
 
static int parser_number_literal_suffix (struct parser_params *parser, int mask)
 
static int parser_set_number_literal (struct parser_params *parser, VALUE v, int type, int suffix)
 
static int parser_set_integer_literal (struct parser_params *parser, VALUE v, int suffix)
 
static void arg_ambiguous_gen (struct parser_params *parser, char c)
 
static long parser_encode_length (struct parser_params *parser, const char *name, long len)
 
static void parser_set_encode (struct parser_params *parser, const char *name)
 
static int comment_at_top (struct parser_params *parser)
 
static void magic_comment_encoding (struct parser_params *parser, const char *name, const char *val)
 
static int parser_get_bool (struct parser_params *parser, const char *name, const char *val)
 
static void parser_set_token_info (struct parser_params *parser, const char *name, const char *val)
 
static void parser_set_compile_option_flag (struct parser_params *parser, const char *name, const char *val)
 
static const char * magic_comment_marker (const char *str, long len)
 
static int parser_magic_comment (struct parser_params *parser, const char *str, long len)
 
static void set_file_encoding (struct parser_params *parser, const char *str, const char *send)
 
static VALUE parse_rational (struct parser_params *parser, char *str, int len, int seen_point)
 
static int parse_numeric (struct parser_params *parser, int c)
 
static int parse_qmark (struct parser_params *parser, int space_seen)
 
static int parse_percent (struct parser_params *parser, const int space_seen, const enum lex_state_e last_state)
 
static int tokadd_ident (struct parser_params *parser, int c)
 
static ID tokenize_ident (struct parser_params *parser, const enum lex_state_e last_state)
 
static int parse_numvar (struct parser_params *parser)
 
static int parse_gvar (struct parser_params *parser, const enum lex_state_e last_state)
 
static int parse_atmark (struct parser_params *parser, const enum lex_state_e last_state)
 
static int parse_ident (struct parser_params *parser, int c, int cmd_state)
 
static int parser_yylex (struct parser_params *parser)
 
static enum node_type nodetype (NODE *node)
 
static int nodeline (NODE *node)
 
static void parser_warning (struct parser_params *parser, NODE *node, const char *mesg)
 
static void parser_warn (struct parser_params *parser, NODE *node, const char *mesg)
 
static VALUE append_lex_state_name (enum lex_state_e state, VALUE buf)
 
static int is_private_local_id (ID name)
 
static int shadowing_lvar_0 (struct parser_params *parser, ID name)
 
static int is_static_content (NODE *node)
 
static int assign_in_cond (struct parser_params *parser, NODE *node)
 
static void warn_unless_e_option (struct parser_params *parser, NODE *node, const char *str)
 
static void warning_unless_e_option (struct parser_params *parser, NODE *node, const char *str)
 
static NODEcond0 (struct parser_params *, NODE *, int)
 
static NODErange_op (struct parser_params *parser, NODE *node)
 
static int literal_node (NODE *node)
 
static void no_blockarg (struct parser_params *parser, NODE *node)
 
static int append_literal_keys (st_data_t k, st_data_t v, st_data_t h)
 
static NODEremove_duplicate_keys (struct parser_params *parser, NODE *hash)
 
static void warn_unused_var (struct parser_params *parser, struct local_vars *local)
 
static void dyna_pop_vtable (struct parser_params *parser, struct vtable **vtblp)
 
static void dyna_pop_1 (struct parser_params *parser)
 
static void reg_fragment_enc_error (struct parser_params *parser, VALUE str, int c)
 
static int reg_named_capture_assign_iter (const OnigUChar *name, const OnigUChar *name_end, int back_num, int *back_refs, OnigRegex regex, void *arg0)
 
static VALUE parser_reg_compile (struct parser_params *parser, VALUE str, int options)
 
NODErb_parser_append_print (VALUE vparser, NODE *node)
 
NODErb_parser_while_loop (VALUE vparser, NODE *node, int chop, int split)
 
void rb_init_parse (void)
 
static void parser_initialize (struct parser_params *parser)
 
static void parser_mark (void *ptr)
 
static void parser_free (void *ptr)
 
static size_t parser_memsize (const void *ptr)
 
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

static const yytype_uint8 yytranslate []
 
static const yytype_uint16 yyprhs []
 
static const yytype_int16 yyrhs []
 
static const yytype_uint16 yyrline []
 
static const char *const yytname []
 
static const yytype_uint16 yyr1 []
 
static const yytype_uint8 yyr2 []
 
static const yytype_uint16 yydefact []
 
static const yytype_int16 yydefgoto []
 
static const yytype_int16 yypact []
 
static const yytype_int16 yypgoto []
 
static const yytype_int16 yytable []
 
static const yytype_int16 yycheck []
 
static const yytype_uint16 yystos []
 
static const rb_data_type_t parser_data_type
 
RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits [(0x7e - 0x20+31)/32]
 
static const struct magic_comment magic_comments []
 
static const char lex_state_names [][13]
 

Macro Definition Documentation

◆ ADD2HEAP

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

Definition at line 17852 of file ripper.c.

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

◆ ambiguous_operator

#define ambiguous_operator (   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 14079 of file ripper.c.

◆ arg_ambiguous

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

Definition at line 13674 of file ripper.c.

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

◆ arg_append

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

Definition at line 495 of file ripper.c.

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

◆ arg_concat

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

Definition at line 497 of file ripper.c.

Referenced by arg_concat_gen(), and yyparse().

◆ arg_var

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

Definition at line 672 of file ripper.c.

Referenced by new_args_tail_gen(), and yyparse().

◆ aryset

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

Definition at line 533 of file ripper.c.

Referenced by yyparse().

◆ assignable

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

Definition at line 530 of file ripper.c.

Referenced by reg_named_capture_assign_iter(), and yyparse().

◆ assignable_result

#define assignable_result (   x)    (x)

Referenced by assignable_gen().

◆ attrset

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

Definition at line 535 of file ripper.c.

Referenced by yyparse().

◆ backref_assign_error

#define backref_assign_error (   n,
 
)    (rb_backref_error(n), NEW_BEGIN(0))

Definition at line 554 of file ripper.c.

Referenced by yyparse().

◆ BIT

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

Definition at line 13121 of file ripper.c.

◆ BITSTACK_LEXPOP

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

Definition at line 174 of file ripper.c.

◆ BITSTACK_POP

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

Definition at line 173 of file ripper.c.

◆ BITSTACK_PUSH

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

Definition at line 172 of file ripper.c.

◆ BITSTACK_SET

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

Definition at line 176 of file ripper.c.

◆ BITSTACK_SET_P

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

Definition at line 175 of file ripper.c.

◆ block_append

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

◆ block_dup_check

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

Definition at line 487 of file ripper.c.

Referenced by yyparse().

◆ brace_nest

#define brace_nest   (parser->lex.brace_nest)

Definition at line 410 of file ripper.c.

Referenced by parser_yylex(), and yyparse().

◆ call_bin_op

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

Definition at line 508 of file ripper.c.

Referenced by yyparse().

◆ CALL_Q_P

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

Definition at line 449 of file ripper.c.

Referenced by attrset_gen(), and new_attr_op_assign_gen().

◆ call_uni_op

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

Definition at line 510 of file ripper.c.

Referenced by yyparse().

◆ calloc

#define calloc   YYCALLOC

◆ CMDARG_LEXPOP

#define CMDARG_LEXPOP ( )    BITSTACK_LEXPOP(cmdarg_stack)

Definition at line 186 of file ripper.c.

Referenced by parser_yylex(), and yyparse().

◆ CMDARG_P

#define CMDARG_P ( )    BITSTACK_SET_P(cmdarg_stack)

Definition at line 187 of file ripper.c.

Referenced by parse_ident().

◆ CMDARG_POP

#define CMDARG_POP ( )    BITSTACK_POP(cmdarg_stack)

Definition at line 185 of file ripper.c.

◆ CMDARG_PUSH

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

Definition at line 184 of file ripper.c.

Referenced by parser_yylex(), and yyparse().

◆ CMDARG_SET

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

Definition at line 188 of file ripper.c.

Referenced by local_pop_gen(), local_push_gen(), and yyparse().

◆ cmdarg_stack

#define cmdarg_stack   (parser->cmdarg_stack)

Definition at line 407 of file ripper.c.

Referenced by local_push_gen(), and yyparse().

◆ command_start

#define command_start   (parser->command_start)

◆ compile_error

#define compile_error   parser_compile_error

◆ compile_for_eval

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

Definition at line 442 of file ripper.c.

Referenced by local_push_gen(), parser_prepare(), yycompile0(), and yyparse().

◆ cond

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

Definition at line 464 of file ripper.c.

Referenced by iseq_peephole_optimize(), value_expr_gen(), and yyparse().

◆ COND_LEXPOP

#define COND_LEXPOP ( )    BITSTACK_LEXPOP(cond_stack)

Definition at line 180 of file ripper.c.

Referenced by parser_yylex().

◆ COND_P

#define COND_P ( )    BITSTACK_SET_P(cond_stack)

Definition at line 181 of file ripper.c.

Referenced by parse_ident(), and parser_yylex().

◆ COND_POP

#define COND_POP ( )    BITSTACK_POP(cond_stack)

Definition at line 179 of file ripper.c.

Referenced by yyparse().

◆ COND_PUSH

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

Definition at line 178 of file ripper.c.

Referenced by parser_yylex(), and yyparse().

◆ COND_SET

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

Definition at line 182 of file ripper.c.

Referenced by yyparse().

◆ cond_stack

#define cond_stack   (parser->cond_stack)

Definition at line 406 of file ripper.c.

Referenced by yyparse().

◆ const_decl

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

Definition at line 551 of file ripper.c.

Referenced by yyparse().

◆ const_path_field

#define const_path_field (   w,
 
)    NEW_COLON2(w, n)

Definition at line 548 of file ripper.c.

Referenced by ripper_init_eventids1(), and yyparse().

◆ current_arg

#define current_arg   (parser->cur_arg)

Definition at line 437 of file ripper.c.

Referenced by gettable_gen(), and yyparse().

◆ current_enc

#define current_enc   (parser->enc)

◆ DEF_EXPR

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

Definition at line 139 of file ripper.c.

◆ dispatch_delayed_token

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

Definition at line 11947 of file ripper.c.

Referenced by parser_here_document(), parser_set_integer_literal(), parser_yylex(), and yylex().

◆ dispatch_heredoc_end

#define dispatch_heredoc_end ( )    ((void)0)

Definition at line 13525 of file ripper.c.

Referenced by parser_here_document().

◆ dispatch_scan_event

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

◆ dsym_node

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

Definition at line 525 of file ripper.c.

Referenced by yyparse().

◆ dvar_curr

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

Definition at line 689 of file ripper.c.

Referenced by assignable_gen(), and shadowing_lvar_0().

◆ dvar_defined

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

Definition at line 686 of file ripper.c.

Referenced by assignable_gen(), gettable_gen(), and new_xstring_gen().

◆ dvar_defined_get

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

Definition at line 687 of file ripper.c.

Referenced by lvar_defined_gen(), and shadowing_lvar_0().

◆ DVARS_INHERIT

#define DVARS_INHERIT   ((void*)1)

Definition at line 208 of file ripper.c.

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

◆ DVARS_SPECIAL_P

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

Definition at line 210 of file ripper.c.

◆ DVARS_TOPSCOPE

#define DVARS_TOPSCOPE   NULL

Definition at line 209 of file ripper.c.

Referenced by dyna_in_block_gen(), and local_push_gen().

◆ dyna_in_block

#define dyna_in_block ( )    dyna_in_block_gen(parser)

◆ dyna_pop

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

Definition at line 681 of file ripper.c.

Referenced by yyparse().

◆ dyna_push

#define dyna_push ( )    dyna_push_gen(parser)

Definition at line 679 of file ripper.c.

Referenced by yyparse().

◆ dyna_var

#define dyna_var (   id)    local_var(id)

Definition at line 684 of file ripper.c.

Referenced by assignable_gen(), and new_bv_gen().

◆ ESCAPE_CONTROL

#define ESCAPE_CONTROL   1

Definition at line 12680 of file ripper.c.

Referenced by parser_read_escape(), and parser_tokadd_escape().

◆ ESCAPE_META

#define ESCAPE_META   2

Definition at line 12681 of file ripper.c.

Referenced by parser_read_escape(), and parser_tokadd_escape().

◆ evstr2dstr

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

Definition at line 504 of file ripper.c.

Referenced by yyparse().

◆ flush_string_content

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

Definition at line 13114 of file ripper.c.

Referenced by parser_here_document(), and parser_parse_string().

◆ formal_argument

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

Definition at line 659 of file ripper.c.

Referenced by yyparse().

◆ free

#define free   YYFREE

Definition at line 119 of file ripper.c.

◆ get_id

#define get_id (   id)    (id)

Definition at line 591 of file ripper.c.

Referenced by assignable_gen(), and yyparse().

◆ get_value

#define get_value (   val)    (val)

Definition at line 592 of file ripper.c.

Referenced by yyparse().

◆ gettable

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

Definition at line 528 of file ripper.c.

Referenced by new_op_assign_gen(), and yyparse().

◆ has_delayed_token

#define has_delayed_token ( )    (0)

◆ HEAPCNT

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

Definition at line 17850 of file ripper.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 11913 of file ripper.c.

Referenced by parser_yylex().

◆ heredoc_dedent

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

Definition at line 589 of file ripper.c.

Referenced by parser_heredoc_dedent(), ripper_init_eventids1(), and yyparse().

◆ heredoc_end

#define heredoc_end   (parser->heredoc_end)

Definition at line 425 of file ripper.c.

Referenced by parser_heredoc_restore(), parser_nextline(), and ripper_init_eventids2().

◆ heredoc_identifier

#define heredoc_identifier ( )    parser_heredoc_identifier(parser)

Definition at line 11914 of file ripper.c.

Referenced by parser_yylex().

◆ heredoc_indent

#define heredoc_indent   (parser->heredoc_indent)

◆ heredoc_line_indent

#define heredoc_line_indent   (parser->heredoc_line_indent)

◆ heredoc_restore

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

Definition at line 11915 of file ripper.c.

Referenced by parser_here_document().

◆ ifndef_ripper

#define ifndef_ripper (   x)    (x)

Definition at line 810 of file ripper.c.

Referenced by local_push_gen(), and yyparse().

◆ in_def

#define in_def   (parser->in_def)

Definition at line 412 of file ripper.c.

Referenced by assignable_gen(), const_decl_gen(), and yyparse().

◆ in_defined

#define in_defined   (parser->in_defined)

Definition at line 414 of file ripper.c.

Referenced by gettable_gen(), and yyparse().

◆ in_main

#define in_main   (parser->in_main)

Definition at line 413 of file ripper.c.

Referenced by rb_parser_set_context(), and yyparse().

◆ in_single

#define in_single   (parser->in_single)

Definition at line 411 of file ripper.c.

Referenced by assignable_gen(), const_decl_gen(), and yyparse().

◆ intern_cstr

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

Definition at line 392 of file ripper.c.

Referenced by reg_named_capture_assign_iter().

◆ internal_id

#define internal_id ( )    internal_id_gen(parser)

Definition at line 676 of file ripper.c.

Referenced by new_args_tail_gen(), and yyparse().

◆ IS_AFTER_OPERATOR

#define IS_AFTER_OPERATOR ( )    IS_lex_state(EXPR_FNAME | EXPR_DOT)

Definition at line 14076 of file ripper.c.

Referenced by parse_percent(), and parser_yylex().

◆ IS_ARG

#define IS_ARG ( )    IS_lex_state(EXPR_ARG_ANY)

Definition at line 14068 of file ripper.c.

Referenced by parse_qmark(), and parser_yylex().

◆ IS_BEG

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

Definition at line 14070 of file ripper.c.

Referenced by parse_percent(), and parser_yylex().

◆ IS_END

#define IS_END ( )    IS_lex_state(EXPR_END_ANY)

Definition at line 14069 of file ripper.c.

Referenced by parse_qmark(), and parser_yylex().

◆ is_identchar

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

Definition at line 12008 of file ripper.c.

Referenced by parse_qmark().

◆ IS_LABEL_POSSIBLE

#define IS_LABEL_POSSIBLE ( )
Value:
(\
(IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
IS_ARG())
#define IS_ARG()
Definition: ripper.c:14068
#define IS_lex_state(ls)
Definition: ripper.c:160

Definition at line 14072 of file ripper.c.

Referenced by parse_ident(), and parser_yylex().

◆ IS_LABEL_SUFFIX

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

Definition at line 14075 of file ripper.c.

Referenced by parse_ident(), and parser_yylex().

◆ IS_lex_state

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

Definition at line 160 of file ripper.c.

Referenced by parse_ident(), parse_percent(), and parser_yylex().

◆ IS_lex_state_all

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

Definition at line 161 of file ripper.c.

Referenced by parser_yylex().

◆ IS_lex_state_all_for

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

Definition at line 159 of file ripper.c.

◆ IS_lex_state_for

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

Definition at line 158 of file ripper.c.

Referenced by parse_gvar(), and parse_ident().

◆ IS_SPCARG

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

Definition at line 14071 of file ripper.c.

Referenced by parse_percent(), and parser_yylex().

◆ lambda_beginning_p

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

Definition at line 453 of file ripper.c.

Referenced by parse_ident(), and parser_yylex().

◆ lex_eol_p

#define lex_eol_p ( )    (lex_p >= lex_pend)

Definition at line 12448 of file ripper.c.

Referenced by parse_qmark().

◆ lex_gets

#define lex_gets   (parser->lex.gets)

◆ lex_gets_ptr

#define lex_gets_ptr   (parser->lex.gets_ptr)

Definition at line 429 of file ripper.c.

Referenced by lex_get_str(), and parser_compile_string().

◆ lex_goto_eol

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

◆ lex_input

#define lex_input   (parser->lex.input)

◆ lex_lastline

#define lex_lastline   (parser->lex.lastline)

◆ lex_nextline

#define lex_nextline   (parser->lex.nextline)

Definition at line 421 of file ripper.c.

Referenced by parser_mark(), parser_nextline(), parser_yylex(), and yycompile0().

◆ lex_p

#define lex_p   (parser->lex.pcur)

◆ lex_pbeg

#define lex_pbeg   (parser->lex.pbeg)

◆ lex_pend

#define lex_pend   (parser->lex.pend)

◆ lex_state

#define lex_state   (parser->lex.state)

Definition at line 405 of file ripper.c.

Referenced by parse_ident(), parser_yylex(), and yyparse().

◆ lex_strterm

#define lex_strterm   (parser->lex.strterm)

◆ list_append

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

Definition at line 492 of file ripper.c.

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

◆ literal_concat

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

Definition at line 499 of file ripper.c.

Referenced by yyparse().

◆ local_id

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

◆ local_pop

#define local_pop ( )    local_pop_gen(parser)

Definition at line 668 of file ripper.c.

Referenced by yyparse().

◆ local_push

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

Definition at line 666 of file ripper.c.

Referenced by yyparse().

◆ local_tbl

#define local_tbl ( )    local_tbl_gen(parser)

Definition at line 577 of file ripper.c.

◆ local_var

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

Definition at line 670 of file ripper.c.

Referenced by assignable_gen().

◆ logop

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

Definition at line 470 of file ripper.c.

Referenced by yyparse().

◆ lpar_beg

#define lpar_beg   (parser->lex.lpar_beg)

Definition at line 409 of file ripper.c.

Referenced by parse_ident(), parser_yylex(), and yyparse().

◆ lvar_defined

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

Definition at line 692 of file ripper.c.

Referenced by parse_ident().

◆ LVAR_USED

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

Definition at line 16195 of file ripper.c.

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

◆ lvtbl

#define lvtbl   (parser->lvtbl)

◆ malloc

#define malloc   YYMALLOC

◆ match_op

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

Definition at line 574 of file ripper.c.

Referenced by yyparse().

◆ method_cond

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

Definition at line 465 of file ripper.c.

Referenced by yyparse().

◆ 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)); \
yyerror(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

Referenced by parser_tokadd_string().

◆ 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: ripper.c:423

Referenced by parser_tokadd_string().

◆ nd_func

#define nd_func   u1.id

Definition at line 705 of file ripper.c.

◆ nd_nest

#define nd_nest   u3.cnt

Definition at line 712 of file ripper.c.

◆ nd_paren

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

Definition at line 711 of file ripper.c.

Referenced by parser_parse_string().

◆ nd_term

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

Definition at line 709 of file ripper.c.

Referenced by parser_parse_string().

◆ new_args

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

Definition at line 513 of file ripper.c.

Referenced by check_funcall_missing(), and yyparse().

◆ new_args_tail

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

Definition at line 515 of file ripper.c.

Referenced by yyparse().

◆ new_attr_op_assign

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

Definition at line 544 of file ripper.c.

Referenced by yyparse().

◆ new_brace_body

#define new_brace_body (   param,
  stmt 
)    NEW_ITER(param, stmt)

Definition at line 570 of file ripper.c.

Referenced by yyparse().

◆ new_bv

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

Definition at line 663 of file ripper.c.

Referenced by yyparse().

◆ new_const_op_assign

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

Definition at line 546 of file ripper.c.

Referenced by yyparse().

◆ new_defined

#define new_defined (   expr)    NEW_DEFINED(remove_begin_all(expr))

Definition at line 561 of file ripper.c.

Referenced by yyparse().

◆ new_do_body

#define new_do_body (   param,
  stmt 
)    NEW_ITER(param, stmt)

Definition at line 571 of file ripper.c.

Referenced by yyparse().

◆ new_evstr

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

Definition at line 502 of file ripper.c.

Referenced by yyparse().

◆ new_hash

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

Definition at line 559 of file ripper.c.

Referenced by yyparse().

◆ new_if

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

Definition at line 467 of file ripper.c.

Referenced by yyparse().

◆ new_kw_arg

#define new_kw_arg (   k)    ((k) ? NEW_KW_ARG(0, (k)) : 0)

Definition at line 516 of file ripper.c.

Referenced by yyparse().

◆ new_op_assign

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

Definition at line 652 of file ripper.c.

Referenced by yyparse().

◆ NEW_QCALL

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

Definition at line 451 of file ripper.c.

Referenced by yyparse().

◆ new_regexp

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

Definition at line 564 of file ripper.c.

Referenced by yyparse().

◆ new_string1

#define new_string1 (   str)    (str)

Definition at line 568 of file ripper.c.

Referenced by yyparse().

◆ NEW_STRTERM

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

Definition at line 13087 of file ripper.c.

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

◆ new_unless

#define new_unless (   cc,
  left,
  right 
)    new_if_gen(parser, (cc), (right), (left))

Definition at line 468 of file ripper.c.

Referenced by yyparse().

◆ new_xstring

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

Definition at line 567 of file ripper.c.

Referenced by yyparse().

◆ new_yield

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

Definition at line 523 of file ripper.c.

Referenced by yyparse().

◆ NEWHEAP

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

Definition at line 17851 of file ripper.c.

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

◆ newtok

#define newtok ( )    parser_newtok(parser)

◆ nextc

#define nextc ( )    parser_nextc(parser)

◆ no_digits

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

Referenced by parse_numeric(), and ruby_dtoa().

◆ node_assign

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

Definition at line 540 of file ripper.c.

Referenced by reg_named_capture_assign_iter(), and yyparse().

◆ NODE_CALL_Q

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

Definition at line 450 of file ripper.c.

◆ NODE_HEREDOC

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

Definition at line 703 of file ripper.c.

Referenced by parser_heredoc_identifier(), and parser_yylex().

◆ NODE_STRTERM

#define NODE_STRTERM   NODE_ZARRAY /* nothing to gc */

Definition at line 702 of file ripper.c.

◆ NUM_SUFFIX_ALL

#define NUM_SUFFIX_ALL   3

Definition at line 13448 of file ripper.c.

Referenced by parse_numeric().

◆ NUM_SUFFIX_I

#define NUM_SUFFIX_I   (1<<1)

◆ NUM_SUFFIX_R

#define NUM_SUFFIX_R   (1<<0)

◆ number_literal_suffix

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

Definition at line 11917 of file ripper.c.

Referenced by parse_numeric().

◆ paren_nest

#define paren_nest   (parser->lex.paren_nest)

Definition at line 408 of file ripper.c.

Referenced by parse_ident(), parser_yylex(), and yyparse().

◆ parse_string

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

Definition at line 11911 of file ripper.c.

Referenced by parser_yylex().

◆ PARSER_ARG

#define PARSER_ARG   parser,

◆ PARSER_DEBUG

#define PARSER_DEBUG   0

Definition at line 76 of file ripper.c.

◆ parser_encoding_name

#define parser_encoding_name ( )    (current_enc->name)

Definition at line 12006 of file ripper.c.

Referenced by parser_precise_mbclen().

◆ parser_is_identchar

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

◆ parser_isascii

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

Definition at line 12011 of file ripper.c.

Referenced by parse_percent(), parse_qmark(), and parser_tokadd_string().

◆ parser_mbclen

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

Definition at line 12007 of file ripper.c.

◆ parser_warn

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

Definition at line 15561 of file ripper.c.

Referenced by assign_in_cond(), cond0(), and warn_unless_e_option().

◆ parser_warning

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

Definition at line 15554 of file ripper.c.

Referenced by block_append_gen(), cond0(), and warning_unless_e_option().

◆ peek

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

◆ peek_n

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

Definition at line 12450 of file ripper.c.

Referenced by parse_ident().

◆ peekc

#define peekc ( )    peekc_n(0)

Definition at line 12451 of file ripper.c.

◆ peekc_n

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

Definition at line 12452 of file ripper.c.

Referenced by parser_number_literal_suffix().

◆ POINTER_P

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

◆ PRIsWARN

#define PRIsWARN   PRIsVALUE

Definition at line 855 of file ripper.c.

Referenced by gettable_gen(), shadowing_lvar_0(), and warn_unused_var().

◆ pushback

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

◆ Qnone

#define Qnone   0

Definition at line 809 of file ripper.c.

Referenced by yyparse().

◆ rb_backref_error

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

Definition at line 538 of file ripper.c.

◆ rb_node_newnode

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

Definition at line 461 of file ripper.c.

Referenced by node_newnode(), and parser_heredoc_identifier().

◆ rb_warn0

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

Definition at line 816 of file ripper.c.

Referenced by cond0(), parser_cr(), parser_heredoc_identifier(), and yyparse().

◆ rb_warn0L

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

Definition at line 826 of file ripper.c.

◆ rb_warn1

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

Definition at line 817 of file ripper.c.

Referenced by gettable_gen(), parse_numvar(), and parse_qmark().

◆ rb_warn1L

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

Definition at line 827 of file ripper.c.

Referenced by void_expr_gen(), and warn_unused_var().

◆ rb_warn2

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

Definition at line 818 of file ripper.c.

Referenced by parse_qmark().

◆ rb_warn2L

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

Definition at line 828 of file ripper.c.

◆ rb_warn3

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

Definition at line 819 of file ripper.c.

◆ rb_warn3L

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

Definition at line 829 of file ripper.c.

Referenced by token_info_pop_gen().

◆ rb_warn4

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

Definition at line 820 of file ripper.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 830 of file ripper.c.

◆ rb_warning0

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

Definition at line 821 of file ripper.c.

Referenced by parser_yylex(), and value_expr_gen().

◆ rb_warning0L

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

Definition at line 831 of file ripper.c.

◆ rb_warning1

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

◆ rb_warning1L

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

Definition at line 832 of file ripper.c.

◆ rb_warning2

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

Definition at line 823 of file ripper.c.

◆ rb_warning2L

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

Definition at line 833 of file ripper.c.

◆ rb_warning3

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

Definition at line 824 of file ripper.c.

◆ rb_warning3L

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

Definition at line 834 of file ripper.c.

◆ rb_warning4

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

Definition at line 825 of file ripper.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 835 of file ripper.c.

◆ RE_OPTION_ARG_ENCODING_NONE

#define RE_OPTION_ARG_ENCODING_NONE   32

Definition at line 700 of file ripper.c.

◆ RE_OPTION_ENCODING

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

Definition at line 696 of file ripper.c.

Referenced by parser_regx_options().

◆ RE_OPTION_ENCODING_IDX

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

Definition at line 697 of file ripper.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 698 of file ripper.c.

Referenced by rb_reg_fragment_setenc().

◆ RE_OPTION_ENCODING_SHIFT

#define RE_OPTION_ENCODING_SHIFT   8

Definition at line 695 of file ripper.c.

◆ RE_OPTION_MASK

#define RE_OPTION_MASK   0xff

Definition at line 699 of file ripper.c.

Referenced by new_regexp_gen(), and rb_parser_reg_compile().

◆ RE_OPTION_ONCE

#define RE_OPTION_ONCE   (1<<16)

Definition at line 694 of file ripper.c.

Referenced by new_regexp_gen(), and parser_regx_options().

◆ read_escape

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

Definition at line 11907 of file ripper.c.

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

◆ realloc

#define realloc   YYREALLOC

◆ reduce_nodes

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

Definition at line 485 of file ripper.c.

Referenced by yyparse().

◆ reg_compile

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

Definition at line 580 of file ripper.c.

Referenced by new_regexp_gen().

◆ reg_fragment_check

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

Definition at line 584 of file ripper.c.

Referenced by new_regexp_gen().

◆ reg_fragment_setenc

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

Definition at line 582 of file ripper.c.

Referenced by parser_reg_compile(), and reg_fragment_check_gen().

◆ reg_named_capture_assign

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

Definition at line 586 of file ripper.c.

Referenced by yyparse().

◆ regx_options

#define regx_options ( )    parser_regx_options(parser)

Definition at line 11909 of file ripper.c.

Referenced by parser_string_term().

◆ ret_args

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

Definition at line 520 of file ripper.c.

Referenced by yyparse().

◆ ripper_flush

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

◆ ripper_id2sym

#define ripper_id2sym (   id)    id

Definition at line 805 of file ripper.c.

Referenced by parser_compile_error(), and yyparse().

◆ ruby__end__seen

#define ruby__end__seen   (parser->ruby__end__seen)

Definition at line 432 of file ripper.c.

Referenced by parser_yylex(), and rb_parser_end_seen_p().

◆ ruby_coverage

#define ruby_coverage   (parser->coverage)

Definition at line 446 of file ripper.c.

Referenced by lex_getline(), and yycompile0().

◆ ruby_debug_lines

#define ruby_debug_lines   (parser->debug_lines)

Definition at line 445 of file ripper.c.

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

◆ 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: ripper.c:434
#define ruby_sourceline
Definition: ripper.c:433
const char * name
Definition: nkf.c:208

Referenced by yycompile0().

◆ ruby_eval_tree

#define ruby_eval_tree   (parser->eval_tree)

Definition at line 443 of file ripper.c.

Referenced by parser_mark(), yycompile0(), and yyparse().

◆ ruby_eval_tree_begin

#define ruby_eval_tree_begin   (parser->eval_tree_begin)

Definition at line 444 of file ripper.c.

Referenced by parser_mark(), yycompile0(), and yyparse().

◆ ruby_sourcefile

#define ruby_sourcefile   (parser->ruby_sourcefile)

◆ ruby_sourcefile_string

#define ruby_sourcefile_string   (parser->ruby_sourcefile_string)

◆ ruby_sourceline

#define ruby_sourceline   (parser->ruby_sourceline)

◆ set_integer_literal

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

Definition at line 11919 of file ripper.c.

Referenced by parse_numeric().

◆ SET_LEX_STATE

#define SET_LEX_STATE (   ls)
Value:
(lex_state = (yydebug ? trace_lex_state(lex_state, (ls), __LINE__) : \
(enum lex_state_e)(ls)))
#define lex_state
Definition: ripper.c:405
#define yydebug
Definition: ripper.c:438
static enum lex_state_e trace_lex_state(enum lex_state_e from, enum lex_state_e to, int line)
Definition: ripper.c:16073
lex_state_e
Definition: ripper.c:138

Definition at line 163 of file ripper.c.

Referenced by parse_atmark(), parse_gvar(), parse_ident(), parse_numeric(), parse_percent(), parse_qmark(), parser_set_number_literal(), parser_yylex(), and yyparse().

◆ set_number_literal

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

Definition at line 11918 of file ripper.c.

Referenced by parse_numeric(), and parser_set_integer_literal().

◆ set_yylval_id

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

Definition at line 11924 of file ripper.c.

Referenced by parse_percent(), and parser_yylex().

◆ set_yylval_literal

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

Definition at line 11926 of file ripper.c.

Referenced by parser_set_number_literal().

◆ set_yylval_name

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

Definition at line 11925 of file ripper.c.

Referenced by parse_gvar(), parse_ident(), and tokenize_ident().

◆ set_yylval_node

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

Definition at line 11927 of file ripper.c.

Referenced by parse_gvar().

◆ set_yylval_num

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

Definition at line 11923 of file ripper.c.

Referenced by parser_string_term().

◆ set_yylval_str

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

Definition at line 11922 of file ripper.c.

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

◆ shadowing_lvar

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

Definition at line 661 of file ripper.c.

Referenced by formal_argument_gen(), and yyparse().

◆ SHOW_BITSTACK

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

Definition at line 171 of file ripper.c.

◆ SIGN_EXTEND

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

Definition at line 704 of file ripper.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: ripper.c:13121

Definition at line 13122 of file ripper.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:2562
#define STR_NEW(p, n)
Definition: ripper.c:395
#define RSTRING_PTR(str)
Definition: ruby.h:982

Referenced by parser_magic_comment().

◆ STR_FUNC_ESCAPE

#define STR_FUNC_ESCAPE   0x01

Definition at line 12409 of file ripper.c.

Referenced by parser_tokadd_string().

◆ STR_FUNC_EXPAND

#define STR_FUNC_EXPAND   0x02

Definition at line 12410 of file ripper.c.

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

◆ STR_FUNC_INDENT

#define STR_FUNC_INDENT   0x20

Definition at line 12414 of file ripper.c.

Referenced by parser_here_document(), and parser_heredoc_identifier().

◆ STR_FUNC_LABEL

#define STR_FUNC_LABEL   0x40

Definition at line 12415 of file ripper.c.

Referenced by parser_yylex().

◆ STR_FUNC_QWORDS

#define STR_FUNC_QWORDS   0x08

Definition at line 12412 of file ripper.c.

Referenced by parser_parse_string(), and parser_tokadd_string().

◆ STR_FUNC_REGEXP

#define STR_FUNC_REGEXP   0x04

◆ STR_FUNC_SYMBOL

#define STR_FUNC_SYMBOL   0x10

Definition at line 12413 of file ripper.c.

Referenced by parser_tokadd_string().

◆ STR_NEW

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

◆ STR_NEW0

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

◆ STR_NEW2

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

Definition at line 397 of file ripper.c.

Referenced by parser_compile_error(), and parser_yyerror().

◆ STR_NEW3

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

Definition at line 398 of file ripper.c.

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

◆ STR_TERM_END

#define STR_TERM_END   -1

Definition at line 12416 of file ripper.c.

Referenced by parser_here_document(), and parser_parse_string().

◆ 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: ripper.c:485

Referenced by reduce_nodes_gen().

◆ TAB_WIDTH

#define TAB_WIDTH   8

Definition at line 99 of file ripper.c.

Referenced by dedent_string(), parser_update_heredoc_indent(), and token_info_get_column().

◆ tok

#define tok ( )    tokenbuf

◆ tok_hex

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

Definition at line 11906 of file ripper.c.

Referenced by parser_read_escape(), and parser_tokadd_escape().

◆ TOK_INTERN

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

Definition at line 399 of file ripper.c.

Referenced by parse_gvar(), parse_ident(), and tokenize_ident().

◆ tokadd

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

◆ tokadd_escape

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

Definition at line 11908 of file ripper.c.

Referenced by parser_tokadd_string().

◆ tokadd_mbchar

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

◆ tokadd_string

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

Definition at line 11910 of file ripper.c.

Referenced by parser_here_document(), and parser_parse_string().

◆ tokaddmbc

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

Definition at line 11912 of file ripper.c.

Referenced by parser_tokadd_codepoint().

◆ tokcopy

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

Definition at line 12599 of file ripper.c.

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

◆ token_info_pop

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

Definition at line 879 of file ripper.c.

Referenced by yyparse().

◆ token_info_push

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

Definition at line 878 of file ripper.c.

Referenced by parser_yylex(), and yyparse().

◆ tokenbuf

#define tokenbuf   (parser->tokenbuf)

◆ tokfix

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

◆ tokidx

#define tokidx   (parser->tokidx)

Definition at line 416 of file ripper.c.

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

◆ toklast

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

Definition at line 12545 of file ripper.c.

Referenced by parse_ident().

◆ toklen

#define toklen ( )    tokidx

◆ tokline

#define tokline   (parser->tokline)

Definition at line 418 of file ripper.c.

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

◆ toksiz

#define toksiz   (parser->toksiz)

Definition at line 417 of file ripper.c.

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

◆ tokspace

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

Definition at line 11904 of file ripper.c.

Referenced by parser_tokaddmbc().

◆ top_const_field

#define top_const_field (   n)    NEW_COLON3(n)

Definition at line 549 of file ripper.c.

Referenced by ripper_init_eventids1(), and yyparse().

◆ value_expr

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

◆ var_field

#define var_field (   n)    (n)

Definition at line 553 of file ripper.c.

Referenced by ripper_init_eventids1(), and yyparse().

◆ void_expr

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

Definition at line 481 of file ripper.c.

Referenced by yyparse().

◆ void_expr0

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

Definition at line 480 of file ripper.c.

Referenced by void_stmts_gen().

◆ void_stmts

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

Definition at line 483 of file ripper.c.

Referenced by yyparse().

◆ VTBL_DEBUG

#define VTBL_DEBUG   0

Definition at line 224 of file ripper.c.

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

◆ WARN_ARGS

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

Definition at line 856 of file ripper.c.

◆ WARN_ARGS_L

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

Definition at line 857 of file ripper.c.

◆ warn_balanced

#define warn_balanced (   op,
  syn 
)
Value:
((void) \
(!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
space_seen && !ISSPACE(c) && \
(ambiguous_operator(op, syn), 0)))
#define IS_lex_state_for(x, ls)
Definition: ripper.c:158
#define ambiguous_operator(op, syn)
Definition: ripper.c:14079
#define ISSPACE(c)
Definition: ruby.h:2124

Definition at line 14085 of file ripper.c.

Referenced by parse_percent(), and parser_yylex().

◆ WARN_CALL

#define WARN_CALL   rb_compile_warn

Definition at line 858 of file ripper.c.

◆ WARN_I

#define WARN_I (   i)    i

Definition at line 854 of file ripper.c.

Referenced by arg_ambiguous_gen(), parse_qmark(), and token_info_pop_gen().

◆ WARN_PAST_SCOPE

#define WARN_PAST_SCOPE   0

Definition at line 96 of file ripper.c.

◆ WARN_S

#define WARN_S (   s)    s

◆ WARN_S_L

#define WARN_S_L (   s,
 
)    s

Definition at line 852 of file ripper.c.

Referenced by parse_qmark().

◆ WARNING_ARGS

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

Definition at line 859 of file ripper.c.

◆ WARNING_ARGS_L

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

Definition at line 860 of file ripper.c.

◆ WARNING_CALL

#define WARNING_CALL   rb_compile_warning

Definition at line 861 of file ripper.c.

◆ was_bol

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

Definition at line 12540 of file ripper.c.

Referenced by parser_here_document(), and parser_yylex().

◆ whole_match_p

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

Definition at line 11916 of file ripper.c.

Referenced by parser_here_document(), and parser_yylex().

◆ YY_

#define YY_ (   msgid)    msgid

Definition at line 1117 of file ripper.c.

Referenced by yyparse(), and yysyntax_error().

◆ YY_LOCATION_PRINT

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

Definition at line 4771 of file ripper.c.

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)
Value:
do { \
if (yydebug) \
yy_reduce_print (yyvsp, Rule, parser); \
} while (YYID (0))
#define yydebug
Definition: ripper.c:438
#define YYID(n)
Definition: ripper.c:1130

Definition at line 4934 of file ripper.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: ripper.c:438
#define YYID(n)
Definition: ripper.c:1130

Definition at line 4895 of file ripper.c.

Referenced by yyparse().

◆ 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, parser); \
YYFPRINTF (parser, "\n"); \
} \
} while (YYID (0))
#define yydebug
Definition: ripper.c:438
#define YYID(n)
Definition: ripper.c:1130

Definition at line 4797 of file ripper.c.

Referenced by yydestruct(), and yyparse().

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 4700 of file ripper.c.

Referenced by yyparse().

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 4699 of file ripper.c.

Referenced by yyparse().

◆ YYBACKUP

#define YYBACKUP (   Token,
  Value 
)
Value:
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (1); \
goto yybackup; \
} \
else \
{ \
parser_yyerror (parser, YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (YYID (0))
#define YY_(msgid)
Definition: ripper.c:1117
if(len<=MAX_WORD_LENGTH &&len >=MIN_WORD_LENGTH)
Definition: zonetab.h:883
#define YYEMPTY
Definition: ripper.c:4696
#define YYID(n)
Definition: ripper.c:1130

Definition at line 4721 of file ripper.c.

◆ YYBISON

#define YYBISON   1

Definition at line 44 of file ripper.c.

◆ YYBISON_VERSION

#define YYBISON_VERSION   "2.5"

Definition at line 47 of file ripper.c.

◆ YYCALLOC

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

Definition at line 103 of file ripper.c.

◆ YYCASE_

#define YYCASE_ (   N,
  S 
)
Value:
case N: \
yyformat = S; \
break
#define N
Definition: lgamma_r.c:20
#define S(s)

Referenced by yysyntax_error().

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

Definition at line 4695 of file ripper.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: ripper.c:1130

Definition at line 1264 of file ripper.c.

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 1236 of file ripper.c.

◆ YYDEBUG

#define YYDEBUG   1

Definition at line 78 of file ripper.c.

◆ yydebug

#define yydebug   (parser->yydebug)

Definition at line 438 of file ripper.c.

Referenced by proc_options(), and process_options().

◆ YYDPRINTF

#define YYDPRINTF (   Args)
Value:
do { \
if (yydebug) \
YYFPRINTF Args; \
} while (YYID (0))
#define yydebug
Definition: ripper.c:438
#define YYID(n)
Definition: ripper.c:1130

Definition at line 4791 of file ripper.c.

Referenced by yyparse().

◆ YYEMPTY

#define YYEMPTY   (-2)

Definition at line 4696 of file ripper.c.

Referenced by yyparse(), and yysyntax_error().

◆ YYEOF

#define YYEOF   0

Definition at line 4697 of file ripper.c.

Referenced by yyparse().

◆ YYERRCODE

#define YYERRCODE   256

Definition at line 4739 of file ripper.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 4694 of file ripper.c.

Referenced by yyparse().

◆ yyerror

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

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 4701 of file ripper.c.

◆ YYERROR_VERBOSE [1/2]

#define YYERROR_VERBOSE   1

Definition at line 893 of file ripper.c.

◆ YYERROR_VERBOSE [2/2]

#define YYERROR_VERBOSE   1

Definition at line 893 of file ripper.c.

◆ YYFAIL

#define YYFAIL   goto yyerrlab

Definition at line 4711 of file ripper.c.

◆ YYFINAL

#define YYFINAL   3

Definition at line 1277 of file ripper.c.

Referenced by yyparse().

◆ YYFPRINTF

#define YYFPRINTF   rb_parser_printf

Definition at line 105 of file ripper.c.

Referenced by yy_reduce_print(), yy_stack_print(), and yy_symbol_print().

◆ YYFREE

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

Definition at line 104 of file ripper.c.

◆ YYID

#define YYID (   n)    (n)

Definition at line 1130 of file ripper.c.

Referenced by yyparse().

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 4955 of file ripper.c.

Referenced by yyparse().

◆ YYLAST

#define YYLAST   11794

Definition at line 1279 of file ripper.c.

Referenced by yyparse(), and yysyntax_error().

◆ YYLEX

#define YYLEX   yylex (&yylval, parser)

Definition at line 4780 of file ripper.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 YYRHSLOC(Rhs, K)
Definition: ripper.c:4746
#define N
Definition: lgamma_r.c:20
if(len<=MAX_WORD_LENGTH &&len >=MIN_WORD_LENGTH)
Definition: zonetab.h:883
#define YYID(n)
Definition: ripper.c:1130

Definition at line 4748 of file ripper.c.

◆ YYLSP_NEEDED

#define YYLSP_NEEDED   0

Definition at line 62 of file ripper.c.

◆ yylval

#define yylval   (*parser->lval)

Definition at line 11892 of file ripper.c.

Referenced by parser_here_document(), and yyparse().

◆ yylval_id

#define yylval_id ( )    (yylval.id)

Definition at line 11928 of file ripper.c.

◆ YYMALLOC

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

Definition at line 101 of file ripper.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 4966 of file ripper.c.

Referenced by yyparse().

◆ YYMAXUTOK

#define YYMAXUTOK   353

Definition at line 1292 of file ripper.c.

◆ YYNNTS

#define YYNNTS   217

Definition at line 1284 of file ripper.c.

◆ YYNRULES

#define YYNRULES   642

Definition at line 1286 of file ripper.c.

◆ YYNSTATES

#define YYNSTATES   1085

Definition at line 1288 of file ripper.c.

◆ YYNTOKENS

#define YYNTOKENS   146

Definition at line 1282 of file ripper.c.

Referenced by yy_symbol_print(), yy_symbol_value_print(), yyparse(), and yysyntax_error().

◆ YYPACT_NINF

#define YYPACT_NINF   -876

Definition at line 2060 of file ripper.c.

◆ yypact_value_is_default

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

Definition at line 3389 of file ripper.c.

Referenced by yyparse(), and yysyntax_error().

◆ yyparse

#define yyparse   ruby_yyparse

Definition at line 458 of file ripper.c.

Referenced by yycompile0(), and yydestruct().

◆ YYPOPSTACK

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

Referenced by yyparse().

◆ YYPULL

#define YYPULL   1

Definition at line 59 of file ripper.c.

◆ YYPURE

#define YYPURE   1

Definition at line 53 of file ripper.c.

◆ YYPUSH

#define YYPUSH   0

Definition at line 56 of file ripper.c.

◆ YYREALLOC

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

Definition at line 102 of file ripper.c.

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 4719 of file ripper.c.

◆ YYRHSLOC

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

Definition at line 4746 of file ripper.c.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 1107 of file ripper.c.

◆ YYSIZE_T

#define YYSIZE_T   unsigned int

Definition at line 1103 of file ripper.c.

Referenced by yyparse(), yystpcpy(), yystrlen(), yysyntax_error(), and yytnamerr().

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

Definition at line 50 of file ripper.c.

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 1185 of file ripper.c.

Referenced by yyparse().

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 1188 of file ripper.c.

Referenced by yysyntax_error().

◆ YYSTACK_BYTES

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

Definition at line 1232 of file ripper.c.

Referenced by yyparse().

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 1186 of file ripper.c.

Referenced by yyparse().

◆ YYSTACK_GAP_MAXIMUM

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

Definition at line 1228 of file ripper.c.

◆ YYSTACK_RELOCATE

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

Definition at line 1243 of file ripper.c.

Referenced by yyparse().

◆ YYSTACK_USE_ALLOCA

#define YYSTACK_USE_ALLOCA   0

Definition at line 80 of file ripper.c.

◆ YYSYNTAX_ERROR

#define YYSYNTAX_ERROR
Value:
yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)
static int yysyntax_error(YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
Definition: ripper.c:5080

Referenced by yyparse().

◆ YYTABLE_NINF

#define YYTABLE_NINF   -643

Definition at line 2204 of file ripper.c.

◆ yytable_value_is_error

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

Definition at line 3392 of file ripper.c.

Referenced by yyparse(), and yysyntax_error().

◆ YYTERROR

#define YYTERROR   1

Definition at line 4738 of file ripper.c.

Referenced by yyparse(), and yysyntax_error().

◆ YYTOKEN_TABLE

#define YYTOKEN_TABLE   0

Definition at line 900 of file ripper.c.

◆ YYTRANSLATE

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

Definition at line 1294 of file ripper.c.

Referenced by yyparse().

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

Definition at line 1291 of file ripper.c.

◆ YYUSE

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

Definition at line 1123 of file ripper.c.

Referenced by yy_symbol_value_print(), and yydestruct().

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 13780 of file ripper.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 13781 of file ripper.c.

◆ stack_type

typedef VALUE stack_type

Definition at line 168 of file ripper.c.

◆ token_info

typedef struct token_info token_info

◆ yytype_int16

typedef short int yytype_int16

Definition at line 1090 of file ripper.c.

◆ yytype_int8

typedef short int yytype_int8

Definition at line 1078 of file ripper.c.

◆ yytype_uint16

typedef unsigned short int yytype_uint16

Definition at line 1084 of file ripper.c.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 1069 of file ripper.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 121 of file ripper.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 138 of file ripper.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 12418 of file ripper.c.

Function Documentation

◆ append_lex_state_name()

static VALUE append_lex_state_name ( enum lex_state_e  state,
VALUE  buf 
)
static

Definition at line 16051 of file ripper.c.

References buf, EXPR_MAX_STATE, rb_str_cat(), and rb_str_cat_cstr().

Referenced by trace_lex_state().

◆ append_literal_keys()

static int append_literal_keys ( st_data_t  k,
st_data_t  v,
st_data_t  h 
)
static

Definition at line 16979 of file ripper.c.

References list_concat(), result, and ST_CONTINUE.

Referenced by remove_duplicate_keys().

◆ arg_ambiguous_gen()

static void arg_ambiguous_gen ( struct parser_params parser,
char  c 
)
static

Definition at line 13666 of file ripper.c.

References arg_ambiguous, rb_usascii_str_new(), rb_warning1, and WARN_I.

◆ arg_append_gen()

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

◆ arg_blk_pass()

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

Definition at line 16854 of file ripper.c.

Referenced by yyparse().

◆ arg_concat_gen()

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

◆ arg_var_gen()

static void arg_var_gen ( struct parser_params parser,
ID  id 
)
static

Definition at line 17236 of file ripper.c.

References lvtbl, and vtable_add().

◆ aryset_gen()

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

Definition at line 16244 of file ripper.c.

References NEW_ATTRASGN, and tASET.

◆ assign_in_cond()

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

◆ assignable_gen()

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

◆ attrset_gen()

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

Definition at line 16258 of file ripper.c.

References CALL_Q_P, NEW_ATTRASGN, and rb_id_attrset().

◆ block_append_gen()

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

◆ block_dup_check_gen()

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

Definition at line 16250 of file ripper.c.

References compile_error, nd_type, NODE_BLOCK_PASS, and PARSER_ARG.

◆ call_bin_op_gen()

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

Definition at line 15793 of file ripper.c.

References NEW_CALL, NEW_LIST, and value_expr.

◆ call_uni_op_gen()

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

Definition at line 15801 of file ripper.c.

References NEW_CALL, and value_expr.

◆ comment_at_top()

static int comment_at_top ( struct parser_params parser)
static

◆ cond0()

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

◆ cond_gen()

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

Definition at line 16756 of file ripper.c.

References cond0().

◆ const_decl_gen()

static NODE * const_decl_gen ( struct parser_params parser,
NODE path 
)
static

Definition at line 17108 of file ripper.c.

References in_def, in_single, new_attr_op_assign_gen(), NEW_CDECL, new_op_assign_gen(), and yyerror.

◆ coverage()

static VALUE coverage ( VALUE  fname,
int  n 
)
static

◆ debug_lines()

static VALUE debug_lines ( VALUE  fname)
static

◆ dedent_string()

static int dedent_string ( VALUE  string,
int  width 
)
static

◆ dispose_string()

static void dispose_string ( VALUE  str)
static

Definition at line 12891 of file ripper.c.

References rb_gc_force_recycle(), and rb_str_free().

Referenced by parser_here_document(), and parser_heredoc_restore().

◆ dsym_node_gen()

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

◆ dvar_curr_gen()

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

Definition at line 17370 of file ripper.c.

References lvtbl, and vtable_included().

◆ dvar_defined_gen()

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

◆ dyna_in_block_gen()

static int dyna_in_block_gen ( struct parser_params parser)
static

Definition at line 17333 of file ripper.c.

References DVARS_TOPSCOPE, lvtbl, and POINTER_P.

◆ dyna_pop_1()

static void dyna_pop_1 ( struct parser_params parser)
static

Definition at line 17305 of file ripper.c.

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

Referenced by dyna_pop_gen().

◆ dyna_pop_gen()

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

Definition at line 17319 of file ripper.c.

References dyna_pop_1(), lvtbl, and xfree().

◆ dyna_pop_vtable()

static void dyna_pop_vtable ( struct parser_params parser,
struct vtable **  vtblp 
)
static

Definition at line 17290 of file ripper.c.

References lvtbl, vtable::prev, and vtable_free().

Referenced by dyna_pop_1().

◆ dyna_push_gen()

static const struct vtable * dyna_push_gen ( struct parser_params parser)
static

Definition at line 17279 of file ripper.c.

References lvtbl, and vtable_alloc().

◆ e_option_supplied()

static int e_option_supplied ( struct parser_params parser)
static

◆ evstr2dstr_gen()

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

Definition at line 15770 of file ripper.c.

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

◆ fixpos()

static void fixpos ( NODE node,
NODE orig 
)
static

Definition at line 15541 of file ripper.c.

References nd_line, and nd_set_line.

Referenced by block_append_gen(), new_attr_op_assign_gen(), new_const_op_assign_gen(), and yyparse().

◆ formal_argument_gen()

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

Definition at line 13677 of file ripper.c.

References ID_CLASS, ID_CONST, ID_GLOBAL, ID_INSTANCE, ID_LOCAL, id_type(), shadowing_lvar, and yyerror.

◆ gettable_gen()

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

◆ internal_id_gen()

static ID internal_id_gen ( struct parser_params parser)
static

Definition at line 17619 of file ripper.c.

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

◆ is_private_local_id()

static int is_private_local_id ( ID  name)
static

Definition at line 16185 of file ripper.c.

References is_local_id, rb_id2str, and RSTRING_PTR.

Referenced by shadowing_lvar_0(), and warn_unused_var().

◆ is_static_content()

static int is_static_content ( NODE node)
static

Definition at line 16597 of file ripper.c.

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

Referenced by assign_in_cond().

◆ kwd_append()

static NODE * kwd_append ( NODE kwlist,
NODE kw 
)
static

Definition at line 15908 of file ripper.c.

Referenced by yyparse().

◆ lex_get_str()

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

Definition at line 12277 of file ripper.c.

References len, lex_gets_ptr, Qnil, rb_str_subseq(), RSTRING_LEN, and RSTRING_PTR.

Referenced by parser_compile_error(), and parser_compile_string().

◆ lex_getline()

static VALUE lex_getline ( struct parser_params parser)
static

◆ lex_io_gets()

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

Definition at line 12372 of file ripper.c.

References rb_io_gets_internal().

Referenced by rb_parser_compile_file_path().

◆ list_append_gen()

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

Definition at line 15618 of file ripper.c.

References last, list, and NEW_LIST.

◆ list_concat()

static NODE * list_concat ( NODE head,
NODE tail 
)
static

Definition at line 15638 of file ripper.c.

References last.

Referenced by append_literal_keys(), arg_concat_gen(), literal_concat_gen(), remove_duplicate_keys(), and yyparse().

◆ literal_concat0()

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

◆ literal_concat_gen()

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

◆ literal_node()

static int literal_node ( NODE node)
static

Definition at line 16675 of file ripper.c.

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

Referenced by cond0().

◆ local_id_gen()

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

◆ local_pop_gen()

static void local_pop_gen ( struct parser_params parser)
static

Definition at line 17188 of file ripper.c.

References CMDARG_SET, lvtbl, vtable::prev, vtable_free(), warn_unused_var(), and xfree().

◆ local_push_gen()

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

◆ local_tbl_gen()

static ID * local_tbl_gen ( struct parser_params parser)
static

Definition at line 17211 of file ripper.c.

References ALLOC_N, buf, cnt, id, lvtbl, MEMCPY, REALLOC_N, vtable_included(), and vtable_size().

◆ local_var_gen()

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

Definition at line 17242 of file ripper.c.

References lvtbl, ruby_sourceline, and vtable_add().

◆ logop_gen()

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

Definition at line 16771 of file ripper.c.

References nd_type, NEW_NODE, and value_expr.

◆ lvar_defined_gen()

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

Definition at line 13710 of file ripper.c.

References dvar_defined_get, dyna_in_block, and local_id.

◆ magic_comment_encoding()

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

Definition at line 13784 of file ripper.c.

References comment_at_top(), and parser_set_encode().

◆ magic_comment_marker()

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

Definition at line 13863 of file ripper.c.

Referenced by parser_magic_comment().

◆ match_op_gen()

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

◆ must_be_ascii_compatible()

static rb_encoding* must_be_ascii_compatible ( VALUE  s)
static

◆ negate_lit()

static VALUE negate_lit ( VALUE  lit)
static

◆ new_args_gen()

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

◆ new_args_tail_gen()

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

◆ new_attr_op_assign_gen()

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

Definition at line 17070 of file ripper.c.

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

Referenced by const_decl_gen().

◆ new_bv_gen()

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

◆ new_const_op_assign_gen()

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

Definition at line 17087 of file ripper.c.

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

◆ new_evstr_gen()

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

Definition at line 15779 of file ripper.c.

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

◆ new_hash_gen()

static NODE * new_hash_gen ( struct parser_params parser,
NODE hash 
)
static

Definition at line 17027 of file ripper.c.

References NEW_HASH, and remove_duplicate_keys().

◆ new_if_gen()

static NODE * new_if_gen ( struct parser_params parser,
NODE cc,
NODE left,
NODE right 
)
static

Definition at line 16763 of file ripper.c.

References cond0(), FALSE, NEW_IF, and newline_node().

◆ new_op_assign_gen()

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

◆ new_regexp_gen()

static NODE * new_regexp_gen ( struct parser_params parser,
NODE node,
int  options 
)
static

◆ new_xstring_gen()

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

◆ new_yield_gen()

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

Definition at line 16811 of file ripper.c.

References NEW_YIELD, and no_blockarg().

◆ newline_node()

static NODE * newline_node ( NODE node)
static

Definition at line 15531 of file ripper.c.

References RNode::flags, NODE_FL_NEWLINE, and remove_begin().

Referenced by new_if_gen(), and yyparse().

◆ no_blockarg()

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

Definition at line 16786 of file ripper.c.

References compile_error, nd_type, NODE_BLOCK_PASS, and PARSER_ARG.

Referenced by new_yield_gen(), and ret_args_gen().

◆ node_assign_gen()

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

◆ node_newnode()

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

Definition at line 15511 of file ripper.c.

References nd_set_line, rb_node_newnode, and ruby_sourceline.

◆ nodeline()

static int nodeline ( NODE node)
static

Definition at line 15525 of file ripper.c.

References nd_line.

Referenced by rb_init_parse().

◆ nodetype()

static enum node_type nodetype ( NODE node)
static

Definition at line 15519 of file ripper.c.

References nd_type.

Referenced by rb_init_parse().

◆ parse_atmark()

static int parse_atmark ( struct parser_params parser,
const enum lex_state_e  last_state 
)
static

◆ parse_gvar()

static int parse_gvar ( struct parser_params parser,
const enum lex_state_e  last_state 
)
static

◆ parse_ident()

static int parse_ident ( struct parser_params parser,
int  c,
int  cmd_state 
)
static

◆ parse_numeric()

static int parse_numeric ( struct parser_params parser,
int  c 
)
static

◆ parse_numvar()

static int parse_numvar ( struct parser_params parser)
static

Definition at line 14547 of file ripper.c.

References len, rb_warn1, ruby_scan_digits(), tok, toklen, and WARN_S.

Referenced by parse_gvar().

◆ parse_percent()

static int parse_percent ( struct parser_params parser,
const int  space_seen,
const enum lex_state_e  last_state 
)
static

◆ parse_qmark()

static int parse_qmark ( struct parser_params parser,
int  space_seen 
)
static

◆ parse_rational()

static VALUE parse_rational ( struct parser_params parser,
char *  str,
int  len,
int  seen_point 
)
static

Definition at line 14091 of file ripper.c.

References FALSE, memmove(), rb_cstr_to_inum(), rb_int_positive_pow(), and rb_rational_new().

Referenced by parse_numeric().

◆ parser_compile_error()

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

Definition at line 17929 of file ripper.c.

References argc, argv, buf, BUILTIN_TYPE, current_enc, parser_params::eofp, parser_params::error_buffer, parser_params::error_p, FIXNUM_P, id, ID2SYM, InitVM, INT2NUM, keyword__ENCODING__, keyword__FILE__, keyword__LINE__, keyword_alias, keyword_and, keyword_begin, keyword_BEGIN, keyword_break, keyword_case, keyword_class, keyword_def, keyword_defined, keyword_do, keyword_do_block, keyword_do_cond, keyword_else, keyword_elsif, keyword_end, keyword_END, keyword_ensure, keyword_false, keyword_for, keyword_if, keyword_in, keyword_module, keyword_next, keyword_nil, keyword_not, keyword_or, keyword_redo, keyword_rescue, keyword_retry, keyword_return, keyword_self, keyword_super, keyword_then, keyword_true, keyword_undef, keyword_unless, keyword_until, keyword_when, keyword_while, keyword_yield, lex_get_str(), lex_gets, lex_input, lex_p, lex_pbeg, LONG2NUM, modifier_if, modifier_rescue, modifier_unless, modifier_until, modifier_while, msg, name, nd_type, NIL_P, NULL, NUM2INT, OBJ_FREEZE, parser_initialize(), parser_prepare(), PRIsVALUE, Qfalse, Qnil, Qtrue, Qundef, rb_bug(), rb_cObject, rb_define_alloc_func(), rb_define_class(), rb_define_const(), rb_define_global_const(), rb_define_method(), rb_define_private_method(), rb_define_singleton_method(), rb_eArgError, rb_ensure(), rb_eTypeError, rb_funcall(), rb_funcallv_public(), rb_id2str, rb_intern, rb_intern2(), rb_intern_const, rb_io_gets(), rb_long2int, rb_mKernel, rb_obj_class(), rb_obj_classname(), rb_parser_encoding(), rb_parser_end_seen_p(), rb_parser_get_yydebug(), rb_parser_set_yydebug(), rb_raise(), rb_respond_to(), rb_scan_args(), rb_str_new_frozen(), rb_syntax_error_append(), rb_thread_current(), RB_TYPE_P, rb_usascii_str_new2, rb_vsprintf(), ripper_id2sym, ripper_init_eventids1(), ripper_init_eventids1_table(), ripper_init_eventids2(), ripper_init_eventids2_table(), RSTRING_PTR, ruby_sourcefile, ruby_sourcefile_string, ruby_sourceline, STR_NEW2, StringValue, SYMBOL_P, T_ARRAY, T_BIGNUM, T_COMPLEX, T_FILE, T_FLOAT, T_NODE, T_OBJECT, T_RATIONAL, T_STRING, TRUE, TypedData_Get_Struct, TypedData_Make_Struct, and ULONG2NUM.

◆ parser_compile_string()

static NODE* parser_compile_string ( VALUE  vparser,
VALUE  fname,
VALUE  s,
int  line 
)
static

◆ parser_cr()

static int parser_cr ( struct parser_params parser,
int  c 
)
static

Definition at line 12500 of file ripper.c.

References parser_params::cr_seen, lex_p, peek, rb_warn0, and TRUE.

Referenced by parser_nextc().

◆ parser_encode_length()

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

Definition at line 13717 of file ripper.c.

References len, and rb_memcicmp().

Referenced by set_file_encoding().

◆ parser_free()

static void parser_free ( void *  ptr)
static

◆ parser_get_bool()

static int parser_get_bool ( struct parser_params parser,
const char *  name,
const char *  val 
)
static

◆ parser_here_document()

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

◆ parser_heredoc_dedent()

static NODE * parser_heredoc_dedent ( struct parser_params parser,
NODE root 
)
static

◆ parser_heredoc_identifier()

static int parser_heredoc_identifier ( struct parser_params parser)
static

◆ parser_heredoc_restore()

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

◆ parser_initialize()

static void parser_initialize ( struct parser_params parser)
static

◆ parser_magic_comment()

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

◆ parser_mark()

static void parser_mark ( void *  ptr)
static

◆ parser_memsize()

static size_t parser_memsize ( const void *  ptr)
static

◆ parser_newtok()

static char* parser_newtok ( struct parser_params parser)
static

Definition at line 12548 of file ripper.c.

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

◆ parser_nextc()

static int parser_nextc ( struct parser_params parser)
inlinestatic

Definition at line 12515 of file ripper.c.

References lex_p, lex_pend, parser_cr(), parser_nextline(), and UNLIKELY.

◆ parser_nextline()

static int parser_nextline ( struct parser_params parser)
static

◆ parser_number_literal_suffix()

static int parser_number_literal_suffix ( struct parser_params parser,
int  mask 
)
static

◆ parser_parse_string()

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

◆ parser_peek_variable_name()

static int parser_peek_variable_name ( struct parser_params parser)
static

◆ parser_precise_mbclen()

static int parser_precise_mbclen ( struct parser_params parser,
const char *  p 
)
static

◆ parser_prepare()

static void parser_prepare ( struct parser_params parser)
static

◆ parser_pushback()

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

Definition at line 12531 of file ripper.c.

References lex_p, and lex_pbeg.

◆ parser_read_escape()

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

Definition at line 12684 of file ripper.c.

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

◆ parser_reg_compile()

static VALUE parser_reg_compile ( struct parser_params parser,
VALUE  str,
int  options 
)
static

Definition at line 17490 of file ripper.c.

References rb_parser_reg_compile(), and reg_fragment_setenc.

Referenced by new_xstring_gen(), and reg_compile_gen().

◆ parser_regx_options()

static int parser_regx_options ( struct parser_params parser)
static

◆ parser_set_compile_option_flag()

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

◆ parser_set_encode()

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

◆ parser_set_integer_literal()

static int parser_set_integer_literal ( struct parser_params parser,
VALUE  v,
int  suffix 
)
static

◆ parser_set_number_literal()

static int parser_set_number_literal ( struct parser_params parser,
VALUE  v,
int  type,
int  suffix 
)
static

◆ parser_set_token_info()

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

Definition at line 13812 of file ripper.c.

References parser_get_bool(), and parser_params::token_info_enabled.

◆ parser_str_new()

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

◆ parser_string_term()

static int parser_string_term ( struct parser_params parser,
int  func 
)
inlinestatic

◆ parser_tok_hex()

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

Definition at line 12586 of file ripper.c.

References lex_p, scan_hex, and yyerror.

◆ parser_tokadd()

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

Definition at line 12576 of file ripper.c.

References REALLOC_N, tokenbuf, tokidx, and toksiz.

◆ parser_tokadd_codepoint()

static int parser_tokadd_codepoint ( struct parser_params parser,
rb_encoding **  encp,
int  regexp_literal,
int  wide 
)
static

Definition at line 12602 of file ripper.c.

References FALSE, lex_p, rb_utf8_encoding(), scan_hex, tokadd, tokaddmbc, tokcopy, TRUE, and yyerror.

Referenced by parser_tokadd_utf8().

◆ parser_tokadd_escape()

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

Definition at line 12782 of file ripper.c.

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

◆ parser_tokadd_mbchar()

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

Definition at line 12898 of file ripper.c.

References len, lex_p, parser_precise_mbclen(), tokadd, and tokcopy.

◆ parser_tokadd_string()

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

◆ parser_tokadd_utf8()

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

Definition at line 12635 of file ripper.c.

References FALSE, ISSPACE, last, nextc, parser_tokadd_codepoint(), peek, pushback, tokadd, TRUE, and yyerror.

Referenced by parse_qmark(), and parser_tokadd_string().

◆ parser_tokaddmbc()

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

Definition at line 12775 of file ripper.c.

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

◆ parser_tokspace()

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

Definition at line 12564 of file ripper.c.

References REALLOC_N, tokenbuf, tokidx, and toksiz.

◆ parser_update_heredoc_indent()

static int parser_update_heredoc_indent ( struct parser_params parser,
int  c 
)
static

Definition at line 12924 of file ripper.c.

References FALSE, heredoc_indent, heredoc_line_indent, TAB_WIDTH, and TRUE.

Referenced by parser_here_document(), and parser_tokadd_string().

◆ parser_warn()

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

Definition at line 15557 of file ripper.c.

References nd_line, rb_compile_warn(), and ruby_sourcefile.

◆ parser_warning()

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

Definition at line 15550 of file ripper.c.

References nd_line, rb_compile_warning(), and ruby_sourcefile.

◆ parser_whole_match_p()

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

Definition at line 13428 of file ripper.c.

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

◆ parser_yyerror()

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

◆ parser_yylex()

static int parser_yylex ( struct parser_params parser)
static

Definition at line 14824 of file ripper.c.

References arg_ambiguous, brace_nest, CMDARG_LEXPOP, CMDARG_PUSH, command_start, comment_at_top(), compile_error, COND_LEXPOP, COND_P, COND_PUSH, dispatch_delayed_token, dispatch_scan_event, parser_params::eofp, EXPR_ARG_ANY, FALSE, here_document, heredoc_identifier, parser_params::in_kwarg, IS_AFTER_OPERATOR, IS_ARG, IS_BEG, IS_END, IS_LABEL_POSSIBLE, IS_LABEL_SUFFIX, IS_lex_state, IS_lex_state_all, IS_SPCARG, ISDIGIT, ISSPACE, k__END__, lambda_beginning_p, lex_goto_eol, lex_lastline, lex_nextline, lex_p, lex_pend, lex_state, lex_strterm, lpar_beg, nd_type, NEW_STRTERM, newtok, next_state(), nextc, NODE_HEREDOC, paren_nest, parse_atmark(), parse_gvar(), parse_ident(), parse_numeric(), parse_percent(), parse_qmark(), parse_string, PARSER_ARG, parser_is_identchar, parser_magic_comment(), peek, pushback, rb_gc_force_recycle(), rb_warning0, ruby__end__seen, ruby_sourceline, set_file_encoding(), SET_LEX_STATE, set_yylval_id, str_dquote, str_dsym, STR_FUNC_LABEL, str_label, str_regexp, str_squote, str_ssym, str_xquote, tAMPER, tANDDOT, tANDOP, tAREF, tASET, tASSOC, tCMP, tCOLON2, tCOLON3, tCOMMENT, tDOT2, tDOT3, tDSTAR, tEMBDOC, tEMBDOC_BEG, tEMBDOC_END, tEQ, tEQQ, tGEQ, tIGNORED_NL, tLABEL_END, tLAMBDA, tLAMBEG, tLBRACE, tLBRACE_ARG, tLBRACK, tLEQ, tLPAREN, tLPAREN_ARG, tLSHFT, tMATCH, tNEQ, tNMATCH, token, token_info_push, parser_params::token_seen, tOP_ASGN, tOROP, tPOW, tREGEXP_BEG, tREGEXP_END, tRSHFT, TRUE, tSP, tSTAR, tSTRING_BEG, tSTRING_DEND, tSTRING_END, tSYMBEG, tUMINUS, tUMINUS_NUM, tUPLUS, tXSTRING_BEG, warn_balanced, was_bol, whole_match_p, and yyerror.

Referenced by yylex().

◆ range_op()

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

Definition at line 16659 of file ripper.c.

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

Referenced by cond0().

◆ rb_backref_error_gen()

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

Definition at line 16265 of file ripper.c.

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

◆ rb_compile_cstr()

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

Definition at line 12356 of file ripper.c.

◆ rb_compile_file()

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

Definition at line 12378 of file ripper.c.

◆ rb_compile_string()

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

Definition at line 12336 of file ripper.c.

◆ rb_init_parse()

void rb_init_parse ( void  )

Definition at line 17610 of file ripper.c.

References nodeline(), and nodetype().

◆ rb_io_gets_internal()

VALUE rb_io_gets_internal ( VALUE  io)

Definition at line 3267 of file io.c.

Referenced by lex_io_gets(), and rb_parser_compile_cstr().

◆ rb_parser_append_print()

NODE* rb_parser_append_print ( VALUE  vparser,
NODE node 
)

Definition at line 17537 of file ripper.c.

Referenced by process_options().

◆ rb_parser_calloc()

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

Definition at line 17866 of file ripper.c.

◆ rb_parser_compile_cstr()

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

Definition at line 12363 of file ripper.c.

◆ rb_parser_compile_file()

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

Definition at line 12386 of file ripper.c.

Referenced by rb_compile_file().

◆ rb_parser_compile_file_path()

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

◆ rb_parser_compile_string()

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

Definition at line 12343 of file ripper.c.

Referenced by process_options().

◆ rb_parser_compile_string_path()

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

◆ rb_parser_encoding()

VALUE rb_parser_encoding ( VALUE  vparser)

Definition at line 17809 of file ripper.c.

Referenced by load_file_internal(), and parser_compile_error().

◆ rb_parser_end_seen_p()

VALUE rb_parser_end_seen_p ( VALUE  vparser)

Definition at line 17794 of file ripper.c.

Referenced by load_file_internal(), and parser_compile_error().

◆ rb_parser_free()

void rb_parser_free ( struct parser_params parser,
void *  ptr 
)

Definition at line 17896 of file ripper.c.

◆ rb_parser_get_yydebug()

VALUE rb_parser_get_yydebug ( VALUE  self)

Definition at line 17824 of file ripper.c.

Referenced by parser_compile_error().

◆ rb_parser_malloc()

void* rb_parser_malloc ( struct parser_params parser,
size_t  size 
)

Definition at line 17856 of file ripper.c.

◆ rb_parser_new()

VALUE rb_parser_new ( void  )

◆ rb_parser_printf()

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

Definition at line 17913 of file ripper.c.

◆ rb_parser_realloc()

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

Definition at line 17876 of file ripper.c.

◆ rb_parser_reg_compile()

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

Definition at line 17497 of file ripper.c.

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

Referenced by parser_reg_compile(), and reg_compile_gen().

◆ 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 17839 of file ripper.c.

Referenced by parser_compile_error(), and process_options().

◆ rb_parser_while_loop()

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

Definition at line 17569 of file ripper.c.

Referenced by process_options().

◆ 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 17733 of file ripper.c.

Referenced by parse_ident(), and reg_named_capture_assign_iter().

◆ reduce_nodes_gen()

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

◆ reg_compile_gen()

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

◆ reg_fragment_check_gen()

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

◆ reg_fragment_enc_error()

static void reg_fragment_enc_error ( struct parser_params parser,
VALUE  str,
int  c 
)
static

Definition at line 17377 of file ripper.c.

References compile_error, PARSER_ARG, rb_enc_get(), and rb_enc_name.

Referenced by reg_compile_gen(), and reg_fragment_setenc_gen().

◆ reg_fragment_setenc_gen()

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

Definition at line 17423 of file ripper.c.

References rb_reg_fragment_setenc(), and reg_fragment_enc_error().

◆ reg_named_capture_assign_gen()

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

◆ reg_named_capture_assign_iter()

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

◆ remove_begin()

static NODE * remove_begin ( NODE node)
static

Definition at line 16516 of file ripper.c.

References nd_type, and NODE_BEGIN.

Referenced by newline_node(), and yyparse().

◆ remove_begin_all()

static NODE * remove_begin_all ( NODE node)
static

Definition at line 16526 of file ripper.c.

References nd_type, and NODE_BEGIN.

◆ remove_duplicate_keys()

static NODE* remove_duplicate_keys ( struct parser_params parser,
NODE hash 
)
static

◆ ret_args_gen()

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

Definition at line 16794 of file ripper.c.

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

◆ set_file_encoding()

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

◆ shadowing_lvar_0()

static int shadowing_lvar_0 ( struct parser_params parser,
ID  name 
)
static

◆ shadowing_lvar_gen()

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

Definition at line 16223 of file ripper.c.

References name, and shadowing_lvar_0().

◆ show_bitstack()

static void show_bitstack ( stack_type  stack,
const char *  name,
int  line 
)
static

◆ simple_re_meta()

static int simple_re_meta ( int  c)
inlinestatic

Definition at line 12911 of file ripper.c.

References FALSE, and TRUE.

Referenced by parser_tokadd_string().

◆ splat_array()

static NODE * splat_array ( NODE node)
static

Definition at line 16321 of file ripper.c.

References nd_type, NODE_ARRAY, and NODE_SPLAT.

Referenced by yyparse().

◆ tokadd_ident()

static int tokadd_ident ( struct parser_params parser,
int  c 
)
static

Definition at line 14526 of file ripper.c.

References nextc, parser_is_identchar, pushback, and tokadd_mbchar.

Referenced by parse_atmark(), and parse_gvar().

◆ token_info_get_column()

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

Definition at line 12014 of file ripper.c.

References lex_pbeg, and TAB_WIDTH.

Referenced by token_info_pop_gen(), and token_info_push_gen().

◆ token_info_has_nonspaces()

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

Definition at line 12028 of file ripper.c.

References lex_pbeg.

Referenced by token_info_pop_gen(), and token_info_push_gen().

◆ token_info_pop_gen()

static void token_info_pop_gen ( struct parser_params parser,
const char *  token,
size_t  len 
)
static

◆ token_info_push_gen()

static void token_info_push_gen ( struct parser_params parser,
const char *  token,
size_t  len 
)
static

◆ tokenize_ident()

static ID tokenize_ident ( struct parser_params parser,
const enum lex_state_e  last_state 
)
static

Definition at line 14537 of file ripper.c.

References set_yylval_name, and TOK_INTERN.

Referenced by parse_atmark(), parse_gvar(), and parse_ident().

◆ trace_lex_state()

static enum lex_state_e trace_lex_state ( enum lex_state_e  from,
enum lex_state_e  to,
int  line 
)
static

◆ value_expr_gen()

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

◆ void_expr_gen()

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

◆ void_stmts_gen()

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

Definition at line 16502 of file ripper.c.

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

◆ vtable_add()

static void vtable_add ( struct vtable tbl,
ID  id 
)
static

◆ vtable_alloc()

static struct vtable* vtable_alloc ( struct vtable prev)
static

◆ vtable_free()

static void vtable_free ( struct vtable tbl)
static

Definition at line 239 of file ripper.c.

References POINTER_P, VTBL_DEBUG, and xfree().

Referenced by dyna_pop_1(), dyna_pop_vtable(), local_pop_gen(), and new_args_tail_gen().

◆ vtable_included()

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

Definition at line 275 of file ripper.c.

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

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

◆ vtable_pop()

static void vtable_pop ( struct vtable tbl,
int  n 
)
static

Definition at line 267 of file ripper.c.

References vtable::pos, and rb_bug().

Referenced by new_args_tail_gen().

◆ vtable_size()

static int vtable_size ( const struct vtable tbl)
static

Definition at line 214 of file ripper.c.

References POINTER_P, and vtable::pos.

Referenced by internal_id_gen(), local_tbl_gen(), and new_args_tail_gen().

◆ warn_unless_e_option()

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

Definition at line 16645 of file ripper.c.

References e_option_supplied(), and parser_warn.

Referenced by cond0(), and range_op().

◆ warn_unused_var()

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

◆ warning_unless_e_option()

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

Definition at line 16651 of file ripper.c.

References cond0(), e_option_supplied(), and parser_warning.

Referenced by cond0().

◆ yy_reduce_print()

static void yy_reduce_print ( YYSTYPE yyvsp,
int  yyrule,
struct parser_params parser 
)
static

Definition at line 4912 of file ripper.c.

References yy_symbol_print(), and YYFPRINTF.

◆ yy_stack_print()

static void yy_stack_print ( yytype_int16 yybottom,
yytype_int16 yytop,
parser   
)
static

Definition at line 4881 of file ripper.c.

References YYFPRINTF.

Referenced by yy_symbol_print().

◆ yy_symbol_print()

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

Definition at line 4854 of file ripper.c.

References yy_stack_print(), yy_symbol_value_print(), YYFPRINTF, and YYNTOKENS.

Referenced by yy_reduce_print(), and yy_symbol_value_print().

◆ yy_symbol_value_print()

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

Definition at line 4820 of file ripper.c.

References yy_symbol_print(), YYNTOKENS, and YYUSE.

Referenced by yy_symbol_print().

◆ yycompile()

static NODE* yycompile ( struct parser_params parser,
VALUE  fname,
int  line 
)
static

◆ yycompile0()

static VALUE yycompile0 ( VALUE  arg)
static

◆ yydestruct()

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

Definition at line 5219 of file ripper.c.

References YY_SYMBOL_PRINT, yyparse, and YYUSE.

Referenced by yyparse(), and yysyntax_error().

◆ yylex()

static int yylex ( YYSTYPE lval,
struct parser_params parser 
)
static

◆ yyparse() [1/2]

int yyparse ( )

◆ yyparse() [2/2]

int yyparse ( struct parser_params parser)

Definition at line 5279 of file ripper.c.

References alias, ALLOC_N, arg_append, arg_blk_pass(), arg_concat, arg_var, aryset, assignable, attrset, backref_assign_error, block_append, block_dup_check, brace_nest, buf, call_bin_op, call_uni_op, CMDARG_LEXPOP, CMDARG_PUSH, CMDARG_SET, cmdarg_stack, command_start, compile_error, compile_for_eval, cond, COND_POP, COND_PUSH, COND_SET, cond_stack, const_decl, const_path_field, current_arg, dsym_node, dyna_in_block, dyna_pop, dyna_push, END, evstr2dstr, fixpos(), formal_argument, get_id, get_value, gettable, hash(), heredoc_dedent, heredoc_indent, heredoc_line_indent, YYSTYPE::id, id, ID2SYM, idANDDOT, idANDOP, idCmp, idCOLON2, idEq, idEqq, idEqTilde, idGE, idGTGT, idLE, idLTLT, idNeq, idNeqTilde, idOROP, idPow, idUMinus, idUPlus, ifndef_ripper, in_def, in_defined, parser_params::in_kwarg, in_main, in_single, internal_id, is_local_id, keyword__ENCODING__, keyword__FILE__, keyword__LINE__, keyword_false, keyword_nil, keyword_self, keyword_true, kwd_append(), lex_state, lex_strterm, list_append, list_concat(), literal_concat, local_id, local_pop, local_push, logop, lpar_beg, match_op, method_cond, METHOD_VISI_PRIVATE, nd_args, nd_head, nd_iter, nd_lit, nd_next, nd_plen, nd_set_line, nd_set_type, nd_type, nd_value, negate_lit(), NEW_ALIAS, new_args, NEW_ARGS_AUX, new_args_tail, NEW_ARGSCAT, new_attr_op_assign, NEW_BEGIN, NEW_BLOCK_PASS, new_brace_body, NEW_BREAK, new_bv, NEW_CALL, NEW_CASE, NEW_CLASS, NEW_COLON2, NEW_COLON3, new_const_op_assign, NEW_CVAR, new_defined, NEW_DEFN, NEW_DEFS, new_do_body, NEW_DOT2, NEW_DOT3, NEW_DSTR, NEW_DVAR, NEW_ENSURE, NEW_ERRINFO, NEW_EVSTR, new_evstr, NEW_FCALL, NEW_FOR, NEW_GVAR, new_hash, new_if, NEW_IVAR, new_kw_arg, NEW_LAMBDA, NEW_LIST, NEW_LIT, NEW_LVAR, NEW_MASGN, NEW_MODULE, NEW_NEXT, NEW_NIL, NEW_NODE, NEW_OP_ASGN1, new_op_assign, NEW_OPT_ARG, NEW_POSTARG, NEW_POSTEXE, NEW_QCALL, NEW_REDO, new_regexp, NEW_RESBODY, NEW_RESCUE, NEW_RETRY, NEW_RETURN, NEW_SCLASS, NEW_SCOPE, NEW_SPLAT, NEW_STR, new_string1, NEW_SUPER, NEW_UNDEF, new_unless, NEW_UNTIL, NEW_VALIAS, NEW_WHEN, NEW_WHILE, new_xstring, NEW_YIELD, new_yield, NEW_ZARRAY, NEW_ZSUPER, newline_node(), YYSTYPE::node, NODE_AND, NODE_ARRAY, node_assign, NODE_BEGIN, NODE_BLOCK, NODE_BLOCK_PASS, NODE_DASGN, NODE_DASGN_CURR, NODE_DREGX, NODE_DSTR, NODE_DSYM, NODE_DXSTR, NODE_ENSURE, NODE_FL_NEWLINE, NODE_HASH, NODE_LASGN, NODE_LIT, NODE_MASGN, NODE_OR, NODE_RESCUE, NODE_SCOPE, NODE_SELF, NODE_STR, NODE_XSTR, NODE_YIELD, NODE_ZARRAY, NULL, YYSTYPE::num, paren_nest, PARSER_ARG, parser_yyerror(), Qnil, Qnone, Qundef, rb_ary_new3, rb_ary_push(), rb_assoc_new(), rb_fstring(), rb_gc_force_recycle(), rb_intern2(), rb_intern_str, rb_str_intern(), RB_TYPE_P, rb_warn0, reduce_nodes, reg_named_capture_assign, remove_begin(), ret_args, ripper_id2sym, RNODE, ruby_eval_tree, ruby_eval_tree_begin, ruby_sourceline, SET_LEX_STATE, shadowing_lvar, splat_array(), STR_NEW0, T_REGEXP, tANDDOT, tANDOP, tAREF, tASET, vtable::tbl, tCMP, tCOLON2, tDSTAR, tEQ, tEQQ, tGEQ, tLEQ, tLSHFT, tMATCH, tNEQ, tNMATCH, token_info_pop, token_info_push, tokline, top_const_field, tOROP, tPOW, tRSHFT, TRUE, tUMINUS, tUPLUS, YYSTYPE::val, val, value_expr, var_field, YYSTYPE::vars, void_expr, void_stmts, YY_, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerrok, yyerror, YYFINAL, YYID, YYINITDEPTH, YYLAST, YYLEX, yylval, YYMAXDEPTH, YYNTOKENS, yypact_value_is_default, YYPOPSTACK, YYSIZE_T, yyalloc::yyss_alloc, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, YYSYNTAX_ERROR, yytable_value_is_error, YYTERROR, YYTRANSLATE, and yyalloc::yyvs_alloc.

◆ yystpcpy()

static char* yystpcpy ( char *  yydest,
const char *  yysrc 
)
static

Definition at line 5007 of file ripper.c.

References YYSIZE_T.

Referenced by yystrlen(), and yytnamerr().

◆ yystrlen()

static YYSIZE_T yystrlen ( char *  yystr) const
static

Definition at line 4983 of file ripper.c.

References YYSIZE_T, and yystpcpy().

Referenced by yysyntax_error(), and yytnamerr().

◆ yysyntax_error()

static int yysyntax_error ( YYSIZE_T yymsg_alloc,
char **  yymsg,
yytype_int16 yyssp,
int  yytoken 
)
static

◆ yytnamerr()

static YYSIZE_T yytnamerr ( char *  yyres,
const char *  yystr 
)
static

Definition at line 5032 of file ripper.c.

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

Referenced by yysyntax_error().

Variable Documentation

◆ lex_state_names

const char lex_state_names[][13]
static
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 16044 of file ripper.c.

◆ magic_comments

const struct magic_comment magic_comments[]
static
Initial value:
= {
{"encoding", magic_comment_encoding, parser_encode_length},
{"frozen_string_literal", parser_set_compile_option_flag},
{"warn_indent", parser_set_token_info},
}
static long parser_encode_length(struct parser_params *parser, const char *name, long len)
Definition: ripper.c:13717
static void parser_set_token_info(struct parser_params *parser, const char *name, const char *val)
Definition: ripper.c:13812
static void magic_comment_encoding(struct parser_params *parser, const char *name, const char *val)
Definition: ripper.c:13784
static void parser_set_compile_option_flag(struct parser_params *parser, const char *name, const char *val)
Definition: ripper.c:13819

Definition at line 13852 of file ripper.c.

Referenced by parser_magic_comment().

◆ parser_data_type

static const rb_data_type_t parser_data_type
static
Initial value:
= {
"parser",
{
},
}
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1145
static size_t parser_memsize(const void *ptr)
Definition: ripper.c:17701
static void parser_free(void *ptr)
Definition: ripper.c:17677
static void parser_mark(void *ptr)
Definition: ripper.c:17649

Definition at line 12314 of file ripper.c.

◆ ruby_global_name_punct_bits

const unsigned int ruby_global_name_punct_bits
Initial value:
= {
}
#define SPECIAL_PUNCT(idx)
Definition: ripper.c:13122

Definition at line 13117 of file ripper.c.

◆ yycheck

const yytype_int16 yycheck[]
static

Definition at line 3395 of file ripper.c.

◆ yydefact

const yytype_uint16 yydefact[]
static

Definition at line 1918 of file ripper.c.

◆ yydefgoto

const yytype_int16 yydefgoto[]
static
Initial value:
=
{
-1, 1, 2, 68, 69, 70, 240, 576, 577, 256,
257, 452, 258, 443, 72, 527, 73, 363, 74, 75,
514, 699, 247, 77, 78, 259, 79, 80, 81, 472,
82, 213, 382, 383, 195, 196, 197, 198, 615, 565,
200, 84, 445, 215, 264, 532, 232, 758, 432, 433,
229, 230, 217, 419, 434, 520, 521, 85, 361, 262,
263, 645, 635, 365, 850, 366, 851, 745, 979, 748,
746, 601, 603, 755, 756, 928, 249, 87, 88, 89,
90, 91, 92, 93, 94, 95, 96, 726, 579, 734,
847, 848, 374, 780, 781, 782, 1036, 1004, 951, 897,
898, 878, 990, 991, 282, 283, 477, 785, 880, 668,
938, 323, 515, 97, 98, 724, 717, 574, 566, 321,
512, 511, 697, 698, 811, 695, 696, 809, 586, 978,
728, 841, 908, 912, 99, 100, 101, 102, 103, 104,
105, 294, 490, 106, 298, 107, 108, 296, 300, 290,
288, 292, 482, 688, 687, 802, 894, 949, 999, 806,
109, 289, 110, 111, 112, 220, 221, 115, 222, 223,
597, 747, 864, 865, 882, 788, 670, 671, 672, 892,
674, 675, 676, 677, 956, 957, 678, 679, 680, 681,
959, 960, 682, 683, 684, 685, 686, 791, 401, 602,
269, 435, 225, 118, 639, 568, 606, 600, 404, 307,
429, 430, 719, 463, 580, 369, 261
}

Definition at line 2032 of file ripper.c.

◆ yypact

const yytype_int16 yypact[]
static

Definition at line 2061 of file ripper.c.

◆ yypgoto

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-876, -876, -876, -382, -876, 15, -876, -543, 2, -876,
575, -876, 43, -876, -209, -325, 180, -58, -59, -876,
-592, -876, 817, -5, 950, -162, 20, -71, -876, -443,
-9, 2093, -302, 949, -56, -876, -12, -876, -876, 5,
-876, 1150, -876, 196, -876, 166, -27, 326, -332, 89,
-13, -876, -401, -159, 7, -876, -308, -26, -876, -876,
-876, -876, -876, -876, -876, -876, -876, -876, -876, -876,
-876, -876, -876, -876, -876, -876, 57, -876, -876, -876,
-876, -876, -876, -876, -876, -876, -876, 159, -356, -546,
38, -656, -876, -792, -817, 282, 150, -336, -876, 241,
-876, -749, -876, 41, -876, -876, -876, -876, -876, -876,
-876, 308, -876, -876, -876, -876, -876, -876, -876, -92,
-876, -876, 369, -876, -876, 555, -876, -876, -566, -876,
54, -876, -876, -876, -876, -876, -876, 978, -876, -876,
-876, -876, 777, -876, -876, -876, -876, -876, -876, 872,
1024, -876, 53, -876, -876, -876, -876, -876, -876, -876,
14, -876, 28, -876, -30, 1683, 1997, 988, 2151, 1319,
-876, -876, 158, -876, -457, 111, -586, -847, -415, -329,
-744, 178, -259, 300, 104, -876, -876, -876, 182, -757,
-875, 86, 316, -876, -721, -876, -70, -582, -876, -876,
-876, 105, -394, -876, -319, -876, -876, -83, -876, -42,
-25, 78, -535, -222, -64, -15, -2
}

Definition at line 2175 of file ripper.c.

◆ yyprhs

const yytype_uint16 yyprhs[]
static

Definition at line 1341 of file ripper.c.

◆ yyr1

const yytype_uint16 yyr1[]
static

Definition at line 1776 of file ripper.c.

◆ yyr2

const yytype_uint8 yyr2[]
static

Definition at line 1846 of file ripper.c.

◆ yyrhs

const yytype_int16 yyrhs[]
static

Definition at line 1411 of file ripper.c.

◆ yyrline

const yytype_uint16 yyrline[]
static

Definition at line 1609 of file ripper.c.

◆ yystos

const yytype_uint16 yystos[]
static

Definition at line 4581 of file ripper.c.

◆ yytable

const yytype_int16 yytable[]
static

Definition at line 2205 of file ripper.c.

◆ yytname

const char* const yytname[]
static

Definition at line 1682 of file ripper.c.

◆ yytranslate

const yytype_uint8 yytranslate[]
static

Definition at line 1298 of file ripper.c.