Ruby  2.1.10p492(2016-04-01revision54464)
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
parse.c File Reference
#include "ruby/ruby.h"
#include "ruby/st.h"
#include "ruby/encoding.h"
#include "internal.h"
#include "node.h"
#include "parse.h"
#include "id.h"
#include "regenc.h"
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include "probes.h"
#include "id.c"
#include "ruby/regex.h"
#include "ruby/util.h"
#include "lex.c"

Go to the source code of this file.

Data Structures

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

Macros

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

Functions

static ID register_symid (ID, const char *, long, rb_encoding *)
 
static ID register_symid_str (ID, VALUE)
 
static int vtable_size (const struct vtable *tbl)
 
static struct vtablevtable_alloc (struct vtable *prev)
 
static void vtable_free (struct vtable *tbl)
 
static void vtable_add (struct vtable *tbl, ID id)
 
static int vtable_included (const struct vtable *tbl, ID id)
 
static int parser_yyerror (struct parser_params *, const char *)
 
static int yylex (void *, void *)
 
static NODEnode_newnode (struct parser_params *, enum node_type, VALUE, VALUE, VALUE)
 
static NODEcond_gen (struct parser_params *, NODE *)
 
static NODElogop_gen (struct parser_params *, enum node_type, NODE *, NODE *)
 
static NODEnewline_node (NODE *)
 
static void fixpos (NODE *, NODE *)
 
static int value_expr_gen (struct parser_params *, NODE *)
 
static void void_expr_gen (struct parser_params *, NODE *)
 
static NODEremove_begin (NODE *)
 
static 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_gen (struct parser_params *, NODE *, NODE *)
 
static NODEarg_append_gen (struct parser_params *, NODE *, NODE *)
 
static NODEarg_concat_gen (struct parser_params *, NODE *, NODE *)
 
static NODEliteral_concat_gen (struct parser_params *, NODE *, NODE *)
 
static int literal_concat0 (struct parser_params *, VALUE, VALUE)
 
static NODEnew_evstr_gen (struct parser_params *, NODE *)
 
static NODEevstr2dstr_gen (struct parser_params *, NODE *)
 
static NODEsplat_array (NODE *)
 
static NODEcall_bin_op_gen (struct parser_params *, NODE *, ID, NODE *)
 
static NODEcall_uni_op_gen (struct parser_params *, NODE *, ID)
 
static NODEnew_args_gen (struct parser_params *, NODE *, NODE *, ID, NODE *, NODE *)
 
static NODEnew_args_tail_gen (struct parser_params *, NODE *, ID, ID)
 
static NODEnegate_lit (NODE *)
 
static NODEret_args_gen (struct parser_params *, NODE *)
 
static NODEarg_blk_pass (NODE *, NODE *)
 
static NODEnew_yield_gen (struct parser_params *, NODE *)
 
static NODEdsym_node_gen (struct parser_params *, NODE *)
 
static NODEgettable_gen (struct parser_params *, ID)
 
static NODEassignable_gen (struct parser_params *, ID, NODE *)
 
static NODEaryset_gen (struct parser_params *, NODE *, NODE *)
 
static NODEattrset_gen (struct parser_params *, NODE *, ID)
 
static void rb_backref_error_gen (struct parser_params *, NODE *)
 
static NODEnode_assign_gen (struct parser_params *, NODE *, NODE *)
 
static NODEnew_op_assign_gen (struct parser_params *parser, NODE *lhs, ID op, NODE *rhs)
 
static NODEnew_attr_op_assign_gen (struct parser_params *parser, NODE *lhs, ID attr, ID op, NODE *rhs)
 
static NODEnew_const_op_assign_gen (struct parser_params *parser, NODE *lhs, ID op, NODE *rhs)
 
static NODEmatch_op_gen (struct parser_params *, NODE *, NODE *)
 
static IDlocal_tbl_gen (struct parser_params *)
 
static void fixup_nodes (NODE **)
 
static VALUE reg_compile_gen (struct parser_params *, VALUE, int)
 
static void reg_fragment_setenc_gen (struct parser_params *, VALUE, int)
 
static int reg_fragment_check_gen (struct parser_params *, VALUE, int)
 
static NODEreg_named_capture_assign_gen (struct parser_params *parser, VALUE regexp, NODE *match)
 
static ID formal_argument_gen (struct parser_params *, ID)
 
static ID shadowing_lvar_gen (struct parser_params *, ID)
 
static void new_bv_gen (struct parser_params *, ID)
 
static void local_push_gen (struct parser_params *, int)
 
static void local_pop_gen (struct parser_params *)
 
static int local_var_gen (struct parser_params *, ID)
 
static int arg_var_gen (struct parser_params *, ID)
 
static int local_id_gen (struct parser_params *, ID)
 
static ID internal_id_gen (struct parser_params *)
 
static 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 token_info_push (struct parser_params *, const char *token)
 
static void token_info_pop (struct parser_params *, const char *token)
 
static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep, struct parser_params *parser)
 
static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep, struct parser_params *parser)
 
static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
 
static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser)
 
static YYSIZE_T yystrlen (char *yystr) const
 
static char * yystpcpy (char *yydest, const char *yysrc)
 
static YYSIZE_T yytnamerr (char *yyres, const char *yystr)
 
static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
 
static void yydestruct (char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser) const
 
int yyparse ()
 
int yyparse (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 *token)
 
static int token_info_has_nonspaces (struct parser_params *parser, const char *token)
 
static void parser_prepare (struct parser_params *parser)
 
static VALUE debug_lines (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 (volatile VALUE vparser, VALUE fname, VALUE s, int line)
 
NODErb_compile_string (const char *f, VALUE s, int line)
 
NODErb_parser_compile_string (volatile VALUE vparser, const char *f, VALUE s, int line)
 
NODErb_parser_compile_string_path (volatile 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 (volatile VALUE vparser, const char *f, const char *s, int len, int line)
 
static VALUE lex_io_gets (struct parser_params *parser, VALUE io)
 
NODErb_compile_file (const char *f, VALUE file, int start)
 
NODErb_parser_compile_file (volatile VALUE vparser, const char *f, VALUE file, int start)
 
NODErb_parser_compile_file_path (volatile 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_nextc (struct parser_params *parser)
 
static void parser_pushback (struct parser_params *parser, int c)
 
static char * parser_newtok (struct parser_params *parser)
 
static char * parser_tokspace (struct parser_params *parser, int n)
 
static void parser_tokadd (struct parser_params *parser, int c)
 
static int parser_tok_hex (struct parser_params *parser, size_t *numlen)
 
static int parser_tokadd_utf8 (struct parser_params *parser, rb_encoding **encp, int string_literal, int symbol_literal, int regexp_literal)
 
static int parser_read_escape (struct parser_params *parser, int flags, rb_encoding **encp)
 
static int parser_tokadd_escape (struct parser_params *parser, rb_encoding **encp)
 
static void dispose_string (VALUE str)
 
static int parser_tokadd_mbchar (struct parser_params *parser, int c)
 
static int simple_re_meta (int c)
 
static int is_global_name_punct (const int c)
 
static int parser_peek_variable_name (struct parser_params *parser)
 
static int parser_heredoc_identifier (struct parser_params *parser)
 
static void parser_heredoc_restore (struct parser_params *parser, NODE *here)
 
static int parser_whole_match_p (struct parser_params *parser, const char *eos, long len, int indent)
 
static 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)
 
static long parser_encode_length (struct parser_params *parser, const char *name, long len)
 
static void parser_set_encode (struct parser_params *parser, const char *name)
 
static int comment_at_top (struct parser_params *parser)
 
static void magic_comment_encoding (struct parser_params *parser, const char *name, const char *val)
 
static void parser_set_token_info (struct parser_params *parser, const char *name, const char *val)
 
static const char * magic_comment_marker (const char *str, long len)
 
static int parser_magic_comment (struct parser_params *parser, const char *str, long len)
 
static void set_file_encoding (struct parser_params *parser, const char *str, const char *send)
 
static int parse_numvar (struct parser_params *parser)
 
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 int is_private_local_id (ID name)
 
static int shadowing_lvar_0 (struct parser_params *parser, ID name)
 
ID rb_id_attrset (ID id)
 
static int is_static_content (NODE *node)
 
static int assign_in_cond (struct parser_params *parser, NODE *node)
 
static void warn_unless_e_option (struct parser_params *parser, NODE *node, const char *str)
 
static void warning_unless_e_option (struct parser_params *parser, NODE *node, const char *str)
 
static NODEcond0 (struct parser_params *, NODE *)
 
static NODErange_op (struct parser_params *parser, NODE *node)
 
static int literal_node (NODE *node)
 
static void no_blockarg (struct parser_params *parser, NODE *node)
 
static void warn_unused_var (struct parser_params *parser, struct local_vars *local)
 
static void dyna_pop_1 (struct parser_params *parser)
 
static int reg_named_capture_assign_iter (const OnigUChar *name, const OnigUChar *name_end, int back_num, int *back_refs, OnigRegex regex, void *arg0)
 
void rb_gc_mark_parser (void)
 
NODErb_parser_append_print (VALUE vparser, NODE *node)
 
NODErb_parser_while_loop (VALUE vparser, NODE *node, int chop, int split)
 
void Init_sym (void)
 
void rb_gc_mark_symbols (int full_mark)
 
static int is_special_global_name (const char *m, const char *e, rb_encoding *enc)
 
int rb_symname_p (const char *name)
 
int rb_enc_symname_p (const char *name, rb_encoding *enc)
 
static int rb_enc_symname_type (const char *name, long len, rb_encoding *enc, unsigned int allowed_attrset)
 
int rb_enc_symname2_p (const char *name, long len, rb_encoding *enc)
 
static int rb_str_symname_type (VALUE name, unsigned int allowed_attrset)
 
static int sym_check_asciionly (VALUE str)
 
static ID intern_str (VALUE str)
 
static VALUE setup_fake_str (struct RString *fake_str, const char *name, long len)
 
ID rb_intern3 (const char *name, long len, rb_encoding *enc)
 
ID rb_intern2 (const char *name, long len)
 
ID rb_intern (const char *name)
 
ID rb_intern_str (VALUE str)
 
VALUE rb_id2str (ID id)
 
const char * rb_id2name (ID id)
 
static int symbols_i (VALUE sym, ID value, VALUE ary)
 
VALUE rb_sym_all_symbols (void)
 
int rb_is_const_id (ID id)
 
int rb_is_class_id (ID id)
 
int rb_is_global_id (ID id)
 
int rb_is_instance_id (ID id)
 
int rb_is_attrset_id (ID id)
 
int rb_is_local_id (ID id)
 
int rb_is_junk_id (ID id)
 
ID rb_check_id (volatile VALUE *namep)
 Returns ID for the given name if it is interned already, or 0. More...
 
ID rb_check_id_cstr (const char *ptr, long len, rb_encoding *enc)
 
int rb_is_const_name (VALUE name)
 
int rb_is_class_name (VALUE name)
 
int rb_is_global_name (VALUE name)
 
int rb_is_instance_name (VALUE name)
 
int rb_is_attrset_name (VALUE name)
 
int rb_is_local_name (VALUE name)
 
int rb_is_method_name (VALUE name)
 
int rb_is_junk_name (VALUE name)
 
static void parser_initialize (struct parser_params *parser)
 
static void parser_mark (void *ptr)
 
static void parser_free (void *ptr)
 
static size_t parser_memsize (const void *ptr)
 
const struct kwtablerb_reserved_word (const char *str, unsigned int len)
 
static struct parser_paramsparser_new (void)
 
VALUE rb_parser_new (void)
 
VALUE rb_parser_end_seen_p (VALUE vparser)
 
VALUE rb_parser_encoding (VALUE vparser)
 
VALUE rb_parser_get_yydebug (VALUE self)
 
VALUE rb_parser_set_yydebug (VALUE self, VALUE flag)
 
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)
 

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 id_type_names [][9]
 
struct {
   ID   token
 
   const char *   name
 
op_tbl []
 
static struct symbols global_symbols = {tLAST_TOKEN}
 
static const struct st_hash_type symhash
 

Macro Definition Documentation

◆ ADD2HEAP

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

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

◆ arg_ambiguous

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

Definition at line 13123 of file parse.c.

Referenced by arg_ambiguous_gen(), and parser_yylex().

◆ arg_append

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

Definition at line 455 of file parse.c.

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

◆ arg_concat

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

Definition at line 457 of file parse.c.

Referenced by arg_concat_gen(), and yyparse().

◆ arg_var

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

Definition at line 566 of file parse.c.

Referenced by new_args_tail_gen(), and yyparse().

◆ aryset

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

Definition at line 492 of file parse.c.

Referenced by yyparse().

◆ assignable

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

Definition at line 489 of file parse.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,
  id 
)    attrset_gen(parser, (node), (id))

Definition at line 494 of file parse.c.

Referenced by yyparse().

◆ BIT

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

Definition at line 12721 of file parse.c.

◆ BITSTACK_LEXPOP

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

Definition at line 168 of file parse.c.

◆ BITSTACK_POP

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

Definition at line 167 of file parse.c.

◆ BITSTACK_PUSH

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

Definition at line 166 of file parse.c.

◆ BITSTACK_SET_P

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

Definition at line 169 of file parse.c.

◆ block_append

#define block_append (   h,
  t 
)    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 446 of file parse.c.

Referenced by yyparse().

◆ brace_nest

#define brace_nest   (parser->parser_brace_nest)

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

Referenced by yyparse().

◆ call_uni_op

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

Definition at line 470 of file parse.c.

Referenced by yyparse().

◆ calloc

#define calloc   YYCALLOC

Definition at line 98 of file parse.c.

◆ class_nest

#define class_nest   (parser->parser_class_nest)

Definition at line 375 of file parse.c.

◆ CMDARG_LEXPOP

#define CMDARG_LEXPOP ( )    BITSTACK_LEXPOP(cmdarg_stack)

Definition at line 178 of file parse.c.

Referenced by parser_yylex(), and yyparse().

◆ CMDARG_P

#define CMDARG_P ( )    BITSTACK_SET_P(cmdarg_stack)

Definition at line 179 of file parse.c.

Referenced by parser_yylex().

◆ CMDARG_POP

#define CMDARG_POP ( )    BITSTACK_POP(cmdarg_stack)

Definition at line 177 of file parse.c.

◆ CMDARG_PUSH

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

Definition at line 176 of file parse.c.

Referenced by parser_yylex(), and yyparse().

◆ cmdarg_stack

#define cmdarg_stack   (parser->parser_cmdarg_stack)

Definition at line 374 of file parse.c.

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

◆ command_start

#define command_start   (parser->parser_command_start)

Definition at line 395 of file parse.c.

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

◆ compile_error

#define compile_error   parser->nerr++,rb_compile_error_with_enc

◆ compile_for_eval

#define compile_for_eval   (parser->parser_compile_for_eval)

◆ cond

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

Definition at line 427 of file parse.c.

Referenced by value_expr_gen(), and yyparse().

◆ COND_LEXPOP

#define COND_LEXPOP ( )    BITSTACK_LEXPOP(cond_stack)

Definition at line 173 of file parse.c.

Referenced by parser_yylex().

◆ COND_P

#define COND_P ( )    BITSTACK_SET_P(cond_stack)

Definition at line 174 of file parse.c.

Referenced by parser_yylex().

◆ COND_POP

#define COND_POP ( )    BITSTACK_POP(cond_stack)

Definition at line 172 of file parse.c.

Referenced by yyparse().

◆ COND_PUSH

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

Definition at line 171 of file parse.c.

Referenced by parser_yylex(), and yyparse().

◆ cond_stack

#define cond_stack   (parser->parser_cond_stack)

Definition at line 373 of file parse.c.

Referenced by yyparse().

◆ cur_mid

#define cur_mid   (parser->parser_cur_mid)

Definition at line 382 of file parse.c.

Referenced by yyparse().

◆ current_enc

#define current_enc   (parser->enc)

◆ DEF_EXPR

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

Definition at line 140 of file parse.c.

◆ deferred_nodes

#define deferred_nodes   (parser->parser_deferred_nodes)

Definition at line 396 of file parse.c.

Referenced by yycompile0(), and yyparse().

◆ dispatch_heredoc_end

#define dispatch_heredoc_end ( )    ((void)0)

Definition at line 13006 of file parse.c.

Referenced by parser_here_document().

◆ dsym_node

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

Definition at line 484 of file parse.c.

Referenced by yyparse().

◆ dvar_curr

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

Definition at line 583 of file parse.c.

Referenced by assignable_gen(), and shadowing_lvar_0().

◆ dvar_defined

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

Definition at line 580 of file parse.c.

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

◆ dvar_defined_get

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

Definition at line 581 of file parse.c.

Referenced by lvar_defined_gen(), and shadowing_lvar_0().

◆ DVARS_INHERIT

#define DVARS_INHERIT   ((void*)1)

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

◆ DVARS_TOPSCOPE

#define DVARS_TOPSCOPE   NULL

Definition at line 197 of file parse.c.

Referenced by dyna_in_block_gen(), and local_push_gen().

◆ dyna_in_block

#define dyna_in_block ( )    dyna_in_block_gen(parser)

Definition at line 577 of file parse.c.

Referenced by assignable_gen(), gettable_gen(), lvar_defined_gen(), shadowing_lvar_0(), and yyparse().

◆ dyna_pop

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

Definition at line 575 of file parse.c.

Referenced by yyparse().

◆ dyna_push

#define dyna_push ( )    dyna_push_gen(parser)

Definition at line 573 of file parse.c.

Referenced by yyparse().

◆ dyna_var

#define dyna_var (   id)    local_var(id)

Definition at line 578 of file parse.c.

Referenced by assignable_gen(), and new_bv_gen().

◆ ENABLE_SELECTOR_NAMESPACE

#define ENABLE_SELECTOR_NAMESPACE   0

Definition at line 16663 of file parse.c.

◆ ENC_SINGLE

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

Definition at line 365 of file parse.c.

Referenced by parser_yylex().

◆ ESCAPE_CONTROL

#define ESCAPE_CONTROL   1

Definition at line 12315 of file parse.c.

Referenced by parser_read_escape(), and parser_tokadd_escape().

◆ ESCAPE_META

#define ESCAPE_META   2

Definition at line 12316 of file parse.c.

Referenced by parser_read_escape(), and parser_tokadd_escape().

◆ evstr2dstr

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

Definition at line 464 of file parse.c.

Referenced by yyparse().

◆ flush_string_content

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

Definition at line 12714 of file parse.c.

Referenced by parser_here_document(), and parser_parse_string().

◆ formal_argument

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

Definition at line 553 of file parse.c.

Referenced by yyparse().

◆ free

#define free   YYFREE

Definition at line 99 of file parse.c.

◆ get_id

#define get_id (   id)    (id)

Definition at line 526 of file parse.c.

Referenced by assignable_gen(), and yyparse().

◆ get_value

#define get_value (   val)    (val)

Definition at line 527 of file parse.c.

◆ gettable

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

◆ HEAPCNT

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

Definition at line 17610 of file parse.c.

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

◆ here_document

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

Definition at line 11569 of file parse.c.

Referenced by parser_yylex().

◆ heredoc_end

#define heredoc_end   (parser->parser_heredoc_end)

Definition at line 394 of file parse.c.

Referenced by parser_heredoc_restore(), and parser_nextc().

◆ heredoc_identifier

#define heredoc_identifier ( )    parser_heredoc_identifier(parser)

Definition at line 11570 of file parse.c.

Referenced by parser_yylex().

◆ heredoc_restore

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

Definition at line 11571 of file parse.c.

Referenced by parser_here_document().

◆ id_type

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

Definition at line 116 of file parse.c.

Referenced by assignable_gen(), and gettable_gen().

◆ IDSET_ATTRSET_FOR_INTERN

#define IDSET_ATTRSET_FOR_INTERN   (~(~0U<<ID_SCOPE_MASK) & ~(1U<<ID_ATTRSET))

Definition at line 16790 of file parse.c.

Referenced by rb_is_attrset_name().

◆ IDSET_ATTRSET_FOR_SYNTAX

#define IDSET_ATTRSET_FOR_SYNTAX   ((1U<<ID_LOCAL)|(1U<<ID_CONST))

Definition at line 16789 of file parse.c.

Referenced by rb_enc_symname2_p(), and rb_is_junk_name().

◆ ifndef_ripper

#define ifndef_ripper (   x)    (x)

Definition at line 695 of file parse.c.

Referenced by local_push_gen(), and yyparse().

◆ in_def

#define in_def   (parser->parser_in_def)

Definition at line 380 of file parse.c.

Referenced by assignable_gen(), and yyparse().

◆ in_defined

#define in_defined   (parser->parser_in_defined)

Definition at line 383 of file parse.c.

Referenced by yyparse().

◆ in_single

#define in_single   (parser->parser_in_single)

Definition at line 379 of file parse.c.

Referenced by assignable_gen(), and yyparse().

◆ internal_id

#define internal_id ( )    internal_id_gen(parser)

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

Referenced by parser_yylex().

◆ IS_ARG

#define IS_ARG ( )    IS_lex_state(EXPR_ARG_ANY)

Definition at line 13450 of file parse.c.

Referenced by parser_yylex().

◆ is_asgn_or_id

#define is_asgn_or_id (   id)
Value:
((is_notop_id(id)) && \
(((id)&ID_SCOPE_MASK) == ID_GLOBAL || \
#define is_notop_id(id)
Definition: parse.c:108
const int id
Definition: nkf.c:209
#define ID_SCOPE_MASK
Definition: id.h:30
#define ID_INSTANCE
Definition: id.h:32
#define ID_GLOBAL
Definition: id.h:33
#define ID_CLASS
Definition: id.h:36

Definition at line 118 of file parse.c.

Referenced by new_op_assign_gen().

◆ is_attrset_id

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

Definition at line 112 of file parse.c.

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

◆ IS_BEG

#define IS_BEG ( )    IS_lex_state(EXPR_BEG_ANY)

Definition at line 13452 of file parse.c.

Referenced by parser_yylex().

◆ is_class_id

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

Definition at line 114 of file parse.c.

Referenced by rb_is_class_id().

◆ is_const_id

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

Definition at line 113 of file parse.c.

Referenced by rb_is_const_id().

◆ IS_END

#define IS_END ( )    IS_lex_state(EXPR_END_ANY)

Definition at line 13451 of file parse.c.

Referenced by parser_yylex().

◆ is_global_id

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

Definition at line 110 of file parse.c.

Referenced by rb_is_global_id().

◆ is_identchar

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

Definition at line 11671 of file parse.c.

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

◆ is_instance_id

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

Definition at line 111 of file parse.c.

Referenced by rb_is_instance_id().

◆ is_junk_id

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

Definition at line 115 of file parse.c.

Referenced by rb_is_junk_id().

◆ IS_LABEL_POSSIBLE

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

Definition at line 13454 of file parse.c.

Referenced by parser_yylex().

◆ IS_LABEL_SUFFIX

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

Definition at line 13455 of file parse.c.

Referenced by parser_yylex().

◆ IS_lex_state

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

Definition at line 158 of file parse.c.

Referenced by parser_yylex().

◆ IS_lex_state_for

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

Definition at line 157 of file parse.c.

Referenced by parser_yylex().

◆ is_local_id

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

◆ is_notop_id

#define is_notop_id (   id)    ((id)>tLAST_OP_ID)

Definition at line 108 of file parse.c.

Referenced by rb_id_attrset().

◆ IS_SPCARG

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

Definition at line 13453 of file parse.c.

Referenced by parser_yylex().

◆ lex_eol_p

#define lex_eol_p ( )    (lex_p >= lex_pend)

Definition at line 12105 of file parse.c.

Referenced by parser_yylex().

◆ lex_gets

#define lex_gets   (parser->parser_lex_gets)

Definition at line 398 of file parse.c.

Referenced by parser_compile_string(), and rb_parser_compile_file_path().

◆ lex_gets_ptr

#define lex_gets_ptr   (parser->parser_lex_gets_ptr)

Definition at line 397 of file parse.c.

Referenced by lex_get_str(), and parser_compile_string().

◆ lex_goto_eol

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

◆ lex_input

#define lex_input   (parser->parser_lex_input)

Definition at line 388 of file parse.c.

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

◆ lex_lastline

#define lex_lastline   (parser->parser_lex_lastline)

◆ lex_nextline

#define lex_nextline   (parser->parser_lex_nextline)

Definition at line 390 of file parse.c.

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

◆ lex_p

#define lex_p   (parser->parser_lex_p)

◆ lex_pbeg

#define lex_pbeg   (parser->parser_lex_pbeg)

◆ lex_pend

#define lex_pend   (parser->parser_lex_pend)

◆ lex_state

#define lex_state   (parser->parser_lex_state)

Definition at line 372 of file parse.c.

Referenced by parser_yylex(), and yyparse().

◆ lex_strterm

#define lex_strterm   (parser->parser_lex_strterm)

◆ list_append

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

Definition at line 451 of file parse.c.

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

◆ list_concat

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

Definition at line 453 of file parse.c.

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

◆ literal_concat

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

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

Referenced by yyparse().

◆ local_push

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

Definition at line 560 of file parse.c.

Referenced by yyparse().

◆ local_tbl

#define local_tbl ( )    local_tbl_gen(parser)

Definition at line 513 of file parse.c.

◆ local_var

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

Definition at line 564 of file parse.c.

Referenced by assignable_gen().

◆ logop

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

Definition at line 429 of file parse.c.

Referenced by yyparse().

◆ lpar_beg

#define lpar_beg   (parser->parser_lpar_beg)

Definition at line 377 of file parse.c.

Referenced by parser_yylex(), and yyparse().

◆ lvar_defined

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

Definition at line 586 of file parse.c.

Referenced by parser_yylex().

◆ LVAR_USED

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

Definition at line 15297 of file parse.c.

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

◆ lvtbl

#define lvtbl   (parser->parser_lvtbl)

◆ malloc

#define malloc   YYMALLOC

Definition at line 96 of file parse.c.

◆ match_op

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

Definition at line 510 of file parse.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:1345
#define rb_enc_name(enc)
Definition: encoding.h:125

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: parse.c:392

Referenced by parser_tokadd_string().

◆ nd_func

#define nd_func   u1.id

Definition at line 599 of file parse.c.

◆ nd_nest

#define nd_nest   u3.cnt

Definition at line 606 of file parse.c.

◆ nd_paren

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

Definition at line 605 of file parse.c.

Referenced by parser_parse_string().

◆ nd_term

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

Definition at line 603 of file parse.c.

Referenced by parser_parse_string().

◆ new_args

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

Definition at line 473 of file parse.c.

Referenced by yyparse().

◆ new_args_tail

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

Definition at line 475 of file parse.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), (attr), (op), (rhs))

Definition at line 503 of file parse.c.

Referenced by yyparse().

◆ new_bv

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

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

Referenced by yyparse().

◆ new_defined

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

Definition at line 507 of file parse.c.

Referenced by yyparse().

◆ new_evstr

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

Definition at line 462 of file parse.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 550 of file parse.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 12695 of file parse.c.

Referenced by parser_here_document(), and parser_yylex().

◆ new_yield

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

Definition at line 482 of file parse.c.

Referenced by yyparse().

◆ NEWHEAP

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

Definition at line 17611 of file parse.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 parser_yylex().

◆ node_assign

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

Definition at line 499 of file parse.c.

Referenced by reg_named_capture_assign_iter(), and yyparse().

◆ NODE_HEREDOC

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

Definition at line 597 of file parse.c.

Referenced by parser_heredoc_identifier(), and parser_yylex().

◆ NODE_STRTERM

#define NODE_STRTERM   NODE_ZARRAY /* nothing to gc */

Definition at line 596 of file parse.c.

◆ NUM_SUFFIX_ALL

#define NUM_SUFFIX_ALL   3

Definition at line 12941 of file parse.c.

Referenced by parser_yylex().

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

Referenced by parser_yylex().

◆ op_tbl_count

#define op_tbl_count   numberof(op_tbl)

Definition at line 16660 of file parse.c.

Referenced by intern_str(), and rb_id2str().

◆ paren_nest

#define paren_nest   (parser->parser_paren_nest)

Definition at line 376 of file parse.c.

Referenced by parser_yylex(), and yyparse().

◆ parse_string

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

Definition at line 11567 of file parse.c.

Referenced by parser_yylex().

◆ PARSER_ARG

#define PARSER_ARG   ruby_sourcefile, ruby_sourceline, current_enc,

◆ PARSER_DEBUG

#define PARSER_DEBUG   0

Definition at line 73 of file parse.c.

◆ parser_encoding_name

#define parser_encoding_name ( )    (current_enc->name)

Definition at line 11668 of file parse.c.

Referenced by parser_tokadd_mbchar().

◆ parser_is_identchar

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

Definition at line 11672 of file parse.c.

Referenced by parser_heredoc_identifier(), and parser_yylex().

◆ parser_isascii

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

Definition at line 11674 of file parse.c.

Referenced by parser_tokadd_string(), and parser_yylex().

◆ parser_mbclen

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

Definition at line 11669 of file parse.c.

◆ parser_precise_mbclen

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

Definition at line 11670 of file parse.c.

Referenced by parser_tokadd_mbchar().

◆ parser_warn

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

Definition at line 14860 of file parse.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 14853 of file parse.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 12107 of file parse.c.

Referenced by parser_yylex().

◆ POINTER_P

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

◆ pushback

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

◆ Qnone

#define Qnone   0

Definition at line 694 of file parse.c.

Referenced by yyparse().

◆ rb_backref_error

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

Definition at line 497 of file parse.c.

Referenced by yyparse().

◆ rb_compile_error

#define rb_compile_error   rb_compile_error_with_enc

Definition at line 728 of file parse.c.

◆ rb_node_newnode

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

Definition at line 424 of file parse.c.

Referenced by node_newnode(), and parser_heredoc_identifier().

◆ rb_warn0

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

Definition at line 702 of file parse.c.

Referenced by cond0(), and yyparse().

◆ rb_warn4S

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

Definition at line 705 of file parse.c.

Referenced by warn_unused_var().

◆ rb_warnI

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

Definition at line 703 of file parse.c.

Referenced by parser_yylex().

◆ rb_warning0

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

Definition at line 706 of file parse.c.

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

◆ rb_warningS

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

Definition at line 707 of file parse.c.

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

◆ rb_warnS

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

Definition at line 704 of file parse.c.

Referenced by parse_numvar(), and void_expr_gen().

◆ RE_OPTION_ARG_ENCODING_NONE

#define RE_OPTION_ARG_ENCODING_NONE   32

Definition at line 594 of file parse.c.

◆ RE_OPTION_ENCODING

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

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

Referenced by reg_fragment_setenc_gen().

◆ RE_OPTION_ENCODING_NONE

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

Definition at line 592 of file parse.c.

Referenced by reg_fragment_setenc_gen().

◆ RE_OPTION_ENCODING_SHIFT

#define RE_OPTION_ENCODING_SHIFT   8

Definition at line 589 of file parse.c.

◆ RE_OPTION_MASK

#define RE_OPTION_MASK   0xff

Definition at line 593 of file parse.c.

Referenced by reg_compile_gen(), and yyparse().

◆ RE_OPTION_ONCE

#define RE_OPTION_ONCE   (1<<16)

Definition at line 588 of file parse.c.

Referenced by parser_regx_options(), and yyparse().

◆ read_escape

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

Definition at line 11563 of file parse.c.

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

◆ realloc

#define realloc   YYREALLOC

Definition at line 97 of file parse.c.

◆ reduce_nodes

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

Definition at line 444 of file parse.c.

Referenced by yyparse().

◆ reg_compile

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

Definition at line 518 of file parse.c.

Referenced by yyparse().

◆ reg_fragment_check

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

Definition at line 522 of file parse.c.

Referenced by yyparse().

◆ reg_fragment_setenc

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

Definition at line 520 of file parse.c.

Referenced by reg_compile_gen(), and reg_fragment_check_gen().

◆ reg_named_capture_assign

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

Definition at line 524 of file parse.c.

Referenced by yyparse().

◆ REGISTER_SYMID

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

Definition at line 104 of file parse.c.

◆ regx_options

#define regx_options ( )    parser_regx_options(parser)

Definition at line 11565 of file parse.c.

Referenced by parser_parse_string().

◆ ret_args

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

Definition at line 479 of file parse.c.

Referenced by yyparse().

◆ ripper_flush

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

Definition at line 11601 of file parse.c.

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

◆ ruby__end__seen

#define ruby__end__seen   (parser->parser_ruby__end__seen)

Definition at line 400 of file parse.c.

Referenced by parser_yylex(), and rb_parser_end_seen_p().

◆ ruby_coverage

#define ruby_coverage   (parser->coverage)

Definition at line 411 of file parse.c.

Referenced by lex_getline(), and yycompile0().

◆ ruby_debug_lines

#define ruby_debug_lines   (parser->debug_lines)

Definition at line 410 of file parse.c.

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

◆ ruby_eval_tree

#define ruby_eval_tree   (parser->parser_eval_tree)

Definition at line 408 of file parse.c.

Referenced by yycompile0(), and yyparse().

◆ ruby_eval_tree_begin

#define ruby_eval_tree_begin   (parser->parser_eval_tree_begin)

Definition at line 409 of file parse.c.

Referenced by yycompile0(), and yyparse().

◆ ruby_sourcefile

#define ruby_sourcefile   (parser->parser_ruby_sourcefile)

◆ ruby_sourcefile_string

#define ruby_sourcefile_string   (parser->parser_ruby_sourcefile_string)

Definition at line 403 of file parse.c.

Referenced by gettable_gen(), yycompile(), and yycompile0().

◆ ruby_sourceline

#define ruby_sourceline   (parser->parser_ruby_sourceline)

◆ set_integer_literal

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

Definition at line 11575 of file parse.c.

Referenced by parser_yylex().

◆ set_number_literal

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

Definition at line 11574 of file parse.c.

Referenced by parser_set_integer_literal(), and parser_yylex().

◆ set_yylval_id

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

Definition at line 11580 of file parse.c.

Referenced by parser_yylex().

◆ set_yylval_literal

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

Definition at line 11582 of file parse.c.

Referenced by parser_set_number_literal().

◆ set_yylval_name

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

Definition at line 11581 of file parse.c.

Referenced by parser_yylex().

◆ set_yylval_node

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

Definition at line 11583 of file parse.c.

Referenced by parser_yylex().

◆ set_yylval_num

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

Definition at line 11579 of file parse.c.

Referenced by parser_parse_string().

◆ set_yylval_str

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

Definition at line 11578 of file parse.c.

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

◆ shadowing_lvar

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

Definition at line 555 of file parse.c.

Referenced by formal_argument_gen(), and yyparse().

◆ SIGN_EXTEND

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

Definition at line 598 of file parse.c.

◆ SIGN_EXTEND_CHAR

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

Definition at line 11665 of file parse.c.

◆ SPECIAL_PUNCT

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

Definition at line 12722 of file parse.c.

◆ str_copy

#define str_copy (   _s,
  _p,
  _n 
)
Value:
((_s) \
? (void)(rb_str_resize((_s), (_n)), \
MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
: (void)((_s) = STR_NEW((_p), (_n))))
VALUE rb_str_resize(VALUE, long)
Definition: string.c:2024
#define RSTRING_PTR(str)
Definition: ruby.h:845
#define STR_NEW(p, n)
Definition: parse.c:361

Referenced by parser_magic_comment().

◆ STR_FUNC_ESCAPE

#define STR_FUNC_ESCAPE   0x01

Definition at line 12069 of file parse.c.

Referenced by parser_tokadd_string().

◆ STR_FUNC_EXPAND

#define STR_FUNC_EXPAND   0x02

Definition at line 12070 of file parse.c.

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

◆ STR_FUNC_INDENT

#define STR_FUNC_INDENT   0x20

Definition at line 12074 of file parse.c.

Referenced by parser_here_document(), and parser_heredoc_identifier().

◆ STR_FUNC_QWORDS

#define STR_FUNC_QWORDS   0x08

Definition at line 12072 of file parse.c.

Referenced by parser_parse_string(), and parser_tokadd_string().

◆ STR_FUNC_REGEXP

#define STR_FUNC_REGEXP   0x04

Definition at line 12071 of file parse.c.

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

◆ STR_FUNC_SYMBOL

#define STR_FUNC_SYMBOL   0x10

Definition at line 12073 of file parse.c.

Referenced by parser_tokadd_string().

◆ STR_NEW

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

Definition at line 361 of file parse.c.

Referenced by parser_here_document(), and parser_heredoc_identifier().

◆ STR_NEW0

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

Definition at line 362 of file parse.c.

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

◆ STR_NEW2

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

Definition at line 363 of file parse.c.

Referenced by parser_yyerror().

◆ STR_NEW3

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

Definition at line 364 of file parse.c.

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

◆ subnodes

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

Referenced by reduce_nodes_gen().

◆ tok

#define tok ( )    tokenbuf

◆ tok_hex

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

Definition at line 11562 of file parse.c.

Referenced by parser_read_escape(), and parser_tokadd_escape().

◆ TOK_INTERN

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

Definition at line 366 of file parse.c.

Referenced by parser_yylex().

◆ tokadd

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

◆ tokadd_escape

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

Definition at line 11564 of file parse.c.

Referenced by parser_tokadd_string().

◆ tokadd_mbchar

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

Definition at line 12546 of file parse.c.

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

◆ tokadd_string

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

Definition at line 11566 of file parse.c.

Referenced by parser_here_document(), and parser_parse_string().

◆ tokaddmbc

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

Definition at line 11568 of file parse.c.

Referenced by parser_tokadd_utf8(), and parser_yylex().

◆ tokcopy

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

Definition at line 12240 of file parse.c.

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

◆ token_info_pop

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

Definition at line 746 of file parse.c.

Referenced by yyparse().

◆ token_info_push

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

Definition at line 745 of file parse.c.

Referenced by yyparse().

◆ tokenbuf

#define tokenbuf   (parser->parser_tokenbuf)

Definition at line 384 of file parse.c.

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

◆ tokfix

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

◆ tokidx

#define tokidx   (parser->parser_tokidx)

Definition at line 385 of file parse.c.

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

◆ toklast

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

Definition at line 12186 of file parse.c.

Referenced by parser_yylex().

◆ toklen

#define toklen ( )    tokidx

◆ tokline

#define tokline   (parser->parser_tokline)

Definition at line 387 of file parse.c.

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

◆ toksiz

#define toksiz   (parser->parser_toksiz)

Definition at line 386 of file parse.c.

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

◆ tokspace

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

Definition at line 11560 of file parse.c.

Referenced by parser_tokaddmbc().

◆ value_expr

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

◆ void_expr

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

Definition at line 440 of file parse.c.

Referenced by yyparse().

◆ void_expr0

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

Definition at line 439 of file parse.c.

Referenced by void_stmts_gen().

◆ void_stmts

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

Definition at line 442 of file parse.c.

Referenced by yyparse().

◆ VTBL_DEBUG

#define VTBL_DEBUG   0

Definition at line 212 of file parse.c.

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

◆ warn_balanced

#define warn_balanced (   op,
  syn 
)
Value:
((void) \
(!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN|EXPR_ENDARG) && \
space_seen && !ISSPACE(c) && \
(ambiguous_operator(op, syn), 0)))
#define ambiguous_operator(op, syn)
Definition: parse.c:13459
#define IS_lex_state_for(x, ls)
Definition: parse.c:157
#define ISSPACE(c)
Definition: ruby.h:1778

Definition at line 13465 of file parse.c.

Referenced by parser_yylex().

◆ was_bol

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

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

Referenced by parser_here_document(), and parser_yylex().

◆ YY_

#define YY_ (   msgid)    msgid

Definition at line 986 of file parse.c.

Referenced by yyparse(), and yysyntax_error().

◆ YY_LOCATION_PRINT

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

Definition at line 4474 of file parse.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: parse.c:405
#define YYID(n)
Definition: parse.c:999

Definition at line 4637 of file parse.c.

Referenced by yyparse().

◆ YY_STACK_PRINT

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

Definition at line 4598 of file parse.c.

Referenced by yyparse().

◆ YY_SYMBOL_PRINT

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

Definition at line 4500 of file parse.c.

Referenced by yydestruct(), and yyparse().

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 4403 of file parse.c.

Referenced by yyparse().

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 4402 of file parse.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))
if((ID)(DISPID) nameid !=nameid)
Definition: win32ole.c:770
#define YY_(msgid)
Definition: parse.c:986
#define YYEMPTY
Definition: parse.c:4399
#define YYID(n)
Definition: parse.c:999

Definition at line 4424 of file parse.c.

◆ YYBISON

#define YYBISON   1

Definition at line 44 of file parse.c.

◆ YYBISON_VERSION

#define YYBISON_VERSION   "2.5"

Definition at line 47 of file parse.c.

◆ YYCALLOC

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

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

◆ YYCOPY

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

Definition at line 1133 of file parse.c.

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 1105 of file parse.c.

◆ YYDEBUG

#define YYDEBUG   1

Definition at line 75 of file parse.c.

◆ yydebug

#define yydebug   (parser->parser_yydebug)

Definition at line 405 of file parse.c.

Referenced by rb_parser_get_yydebug(), and rb_parser_set_yydebug().

◆ YYDPRINTF

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

Definition at line 4494 of file parse.c.

Referenced by yyparse().

◆ YYEMPTY

#define YYEMPTY   (-2)

Definition at line 4399 of file parse.c.

Referenced by yyparse(), and yysyntax_error().

◆ YYEOF

#define YYEOF   0

Definition at line 4400 of file parse.c.

Referenced by yyparse().

◆ YYERRCODE

#define YYERRCODE   256

Definition at line 4442 of file parse.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 4397 of file parse.c.

Referenced by yyparse().

◆ yyerror

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

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 4404 of file parse.c.

◆ YYERROR_VERBOSE [1/2]

#define YYERROR_VERBOSE   1

Definition at line 764 of file parse.c.

◆ YYERROR_VERBOSE [2/2]

#define YYERROR_VERBOSE   1

Definition at line 764 of file parse.c.

◆ YYFAIL

#define YYFAIL   goto yyerrlab

Definition at line 4414 of file parse.c.

◆ YYFINAL

#define YYFINAL   3

Definition at line 1146 of file parse.c.

Referenced by yyparse().

◆ YYFPRINTF

#define YYFPRINTF   fprintf

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

◆ YYID

#define YYID (   n)    (n)

Definition at line 999 of file parse.c.

Referenced by yyparse().

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 4658 of file parse.c.

Referenced by yyparse().

◆ YYLAST

#define YYLAST   11083

Definition at line 1148 of file parse.c.

Referenced by yyparse(), and yysyntax_error().

◆ YYLEX

#define YYLEX   yylex (&yylval, parser)

Definition at line 4483 of file parse.c.

Referenced by yyparse().

◆ YYLLOC_DEFAULT

#define YYLLOC_DEFAULT (   Current,
  Rhs,
  N 
)
Value:
if (YYID (N)) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
} \
else \
{ \
(Current).first_line = (Current).last_line = \
YYRHSLOC (Rhs, 0).last_line; \
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
while (YYID (0))
#define N
Definition: lgamma_r.c:20
#define YYRHSLOC(Rhs, K)
Definition: parse.c:4449
if((ID)(DISPID) nameid !=nameid)
Definition: win32ole.c:770
#define YYID(n)
Definition: parse.c:999

Definition at line 4451 of file parse.c.

◆ YYLSP_NEEDED

#define YYLSP_NEEDED   0

Definition at line 62 of file parse.c.

◆ yylval

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

Definition at line 11548 of file parse.c.

Referenced by yyparse().

◆ yylval_id

#define yylval_id ( )    (yylval.id)

Definition at line 11584 of file parse.c.

◆ YYMALLOC

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

Definition at line 92 of file parse.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 4669 of file parse.c.

Referenced by yyparse().

◆ YYMAXUTOK

#define YYMAXUTOK   354

Definition at line 1161 of file parse.c.

◆ YYNNTS

#define YYNNTS   204

Definition at line 1153 of file parse.c.

◆ YYNRULES

#define YYNRULES   627

Definition at line 1155 of file parse.c.

◆ YYNSTATES

#define YYNSTATES   1060

Definition at line 1157 of file parse.c.

◆ YYNTOKENS

#define YYNTOKENS   144

Definition at line 1151 of file parse.c.

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

◆ YYPACT_NINF

#define YYPACT_NINF   -813

Definition at line 1912 of file parse.c.

◆ yypact_value_is_default

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

Definition at line 3166 of file parse.c.

Referenced by yyparse(), and yysyntax_error().

◆ yyparse

#define yyparse   ruby_yyparse

Definition at line 421 of file parse.c.

Referenced by yycompile0().

◆ YYPOPSTACK

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

Referenced by yyparse().

◆ YYPULL

#define YYPULL   1

Definition at line 59 of file parse.c.

◆ YYPURE

#define YYPURE   1

Definition at line 53 of file parse.c.

◆ YYPUSH

#define YYPUSH   0

Definition at line 56 of file parse.c.

◆ YYREALLOC

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

Definition at line 93 of file parse.c.

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 4422 of file parse.c.

◆ YYRHSLOC

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

Definition at line 4449 of file parse.c.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 976 of file parse.c.

◆ YYSIZE_T

#define YYSIZE_T   unsigned int

Definition at line 972 of file parse.c.

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

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

Definition at line 50 of file parse.c.

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 1054 of file parse.c.

Referenced by yyparse().

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 1057 of file parse.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: parse.c:1097
short int yytype_int16
Definition: ripper.c:959

Definition at line 1101 of file parse.c.

Referenced by yyparse().

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 1055 of file parse.c.

Referenced by yyparse().

◆ YYSTACK_GAP_MAXIMUM

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

Definition at line 1097 of file parse.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 YYSTACK_GAP_MAXIMUM
Definition: parse.c:1097
#define YYID(n)
Definition: parse.c:999

Definition at line 1112 of file parse.c.

Referenced by yyparse().

◆ YYSTACK_USE_ALLOCA

#define YYSTACK_USE_ALLOCA   0

Definition at line 77 of file parse.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: parse.c:4783

Referenced by yyparse().

◆ YYTABLE_NINF

#define YYTABLE_NINF   -628

Definition at line 2052 of file parse.c.

◆ yytable_value_is_error

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

Definition at line 3169 of file parse.c.

Referenced by yyparse(), and yysyntax_error().

◆ YYTERROR

#define YYTERROR   1

Definition at line 4441 of file parse.c.

Referenced by yyparse(), and yysyntax_error().

◆ YYTOKEN_TABLE

#define YYTOKEN_TABLE   0

Definition at line 771 of file parse.c.

◆ YYTOKENTYPE

#define YYTOKENTYPE

Definition at line 777 of file parse.c.

◆ YYTRANSLATE

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

Definition at line 1163 of file parse.c.

Referenced by yyparse().

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

Definition at line 1160 of file parse.c.

◆ YYUSE

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

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

◆ rb_magic_comment_setter_t

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

Definition at line 13209 of file parse.c.

◆ stack_type

typedef VALUE stack_type

Definition at line 164 of file parse.c.

◆ token_info

typedef struct token_info token_info

◆ yytype_int16

typedef short int yytype_int16

Definition at line 959 of file parse.c.

◆ yytype_int8

typedef short int yytype_int8

Definition at line 947 of file parse.c.

◆ yytype_uint16

typedef unsigned short int yytype_uint16

Definition at line 953 of file parse.c.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 938 of file parse.c.

Enumeration Type Documentation

◆ lex_state_bits

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

Definition at line 123 of file parse.c.

◆ lex_state_e

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

Definition at line 139 of file parse.c.

◆ string_type

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

Definition at line 12076 of file parse.c.

◆ yytokentype

Enumerator
END_OF_INPUT 
keyword_class 
keyword_module 
keyword_def 
keyword_undef 
keyword_begin 
keyword_rescue 
keyword_ensure 
keyword_end 
keyword_if 
keyword_unless 
keyword_then 
keyword_elsif 
keyword_else 
keyword_case 
keyword_when 
keyword_while 
keyword_until 
keyword_for 
keyword_break 
keyword_next 
keyword_redo 
keyword_retry 
keyword_in 
keyword_do 
keyword_do_cond 
keyword_do_block 
keyword_do_LAMBDA 
keyword_return 
keyword_yield 
keyword_super 
keyword_self 
keyword_nil 
keyword_true 
keyword_false 
keyword_and 
keyword_or 
keyword_not 
modifier_if 
modifier_unless 
modifier_while 
modifier_until 
modifier_rescue 
keyword_alias 
keyword_defined 
keyword_BEGIN 
keyword_END 
keyword__LINE__ 
keyword__FILE__ 
keyword__ENCODING__ 
tIDENTIFIER 
tFID 
tGVAR 
tIVAR 
tCONSTANT 
tCVAR 
tLABEL 
tINTEGER 
tFLOAT 
tRATIONAL 
tIMAGINARY 
tSTRING_CONTENT 
tCHAR 
tNTH_REF 
tBACK_REF 
tREGEXP_END 
tUPLUS 
tUMINUS 
tPOW 
tCMP 
tEQ 
tEQQ 
tNEQ 
tGEQ 
tLEQ 
tANDOP 
tOROP 
tMATCH 
tNMATCH 
tDOT2 
tDOT3 
tAREF 
tASET 
tLSHFT 
tRSHFT 
tCOLON2 
tCOLON3 
tOP_ASGN 
tASSOC 
tLPAREN 
tLPAREN_ARG 
tRPAREN 
tLBRACK 
tLBRACE 
tLBRACE_ARG 
tSTAR 
tDSTAR 
tAMPER 
tLAMBDA 
tSYMBEG 
tSTRING_BEG 
tXSTRING_BEG 
tREGEXP_BEG 
tWORDS_BEG 
tQWORDS_BEG 
tSYMBOLS_BEG 
tQSYMBOLS_BEG 
tSTRING_DBEG 
tSTRING_DEND 
tSTRING_DVAR 
tSTRING_END 
tLAMBEG 
tLOWEST 
tUMINUS_NUM 
tLAST_TOKEN 
END_OF_INPUT 
keyword_class 
keyword_module 
keyword_def 
keyword_undef 
keyword_begin 
keyword_rescue 
keyword_ensure 
keyword_end 
keyword_if 
keyword_unless 
keyword_then 
keyword_elsif 
keyword_else 
keyword_case 
keyword_when 
keyword_while 
keyword_until 
keyword_for 
keyword_break 
keyword_next 
keyword_redo 
keyword_retry 
keyword_in 
keyword_do 
keyword_do_cond 
keyword_do_block 
keyword_do_LAMBDA 
keyword_return 
keyword_yield 
keyword_super 
keyword_self 
keyword_nil 
keyword_true 
keyword_false 
keyword_and 
keyword_or 
keyword_not 
modifier_if 
modifier_unless 
modifier_while 
modifier_until 
modifier_rescue 
keyword_alias 
keyword_defined 
keyword_BEGIN 
keyword_END 
keyword__LINE__ 
keyword__FILE__ 
keyword__ENCODING__ 
tIDENTIFIER 
tFID 
tGVAR 
tIVAR 
tCONSTANT 
tCVAR 
tLABEL 
tINTEGER 
tFLOAT 
tRATIONAL 
tIMAGINARY 
tSTRING_CONTENT 
tCHAR 
tNTH_REF 
tBACK_REF 
tREGEXP_END 
tUPLUS 
tUMINUS 
tPOW 
tCMP 
tEQ 
tEQQ 
tNEQ 
tGEQ 
tLEQ 
tANDOP 
tOROP 
tMATCH 
tNMATCH 
tDOT2 
tDOT3 
tAREF 
tASET 
tLSHFT 
tRSHFT 
tCOLON2 
tCOLON3 
tOP_ASGN 
tASSOC 
tLPAREN 
tLPAREN_ARG 
tRPAREN 
tLBRACK 
tLBRACE 
tLBRACE_ARG 
tSTAR 
tDSTAR 
tAMPER 
tLAMBDA 
tSYMBEG 
tSTRING_BEG 
tXSTRING_BEG 
tREGEXP_BEG 
tWORDS_BEG 
tQWORDS_BEG 
tSYMBOLS_BEG 
tQSYMBOLS_BEG 
tSTRING_DBEG 
tSTRING_DEND 
tSTRING_DVAR 
tSTRING_END 
tLAMBEG 
tLOWEST 
tUMINUS_NUM 
tLAST_TOKEN 

Definition at line 780 of file parse.c.

Function Documentation

◆ arg_ambiguous_gen()

static void arg_ambiguous_gen ( struct parser_params parser)
static

Definition at line 13115 of file parse.c.

References arg_ambiguous, and rb_warning0.

◆ 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 16020 of file parse.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 int arg_var_gen ( struct parser_params parser,
ID  id 
)
static

Definition at line 16268 of file parse.c.

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

◆ aryset_gen()

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

Definition at line 15346 of file parse.c.

References nd_type, NEW_ATTRASGN, NODE_SELF, 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  id 
)
static

Definition at line 15402 of file parse.c.

References nd_type, NEW_ATTRASGN, NODE_SELF, 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 15354 of file parse.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 15082 of file parse.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 15090 of file parse.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 
)
static

◆ cond_gen()

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

Definition at line 15934 of file parse.c.

References cond0().

◆ coverage()

static VALUE coverage ( VALUE  fname,
int  n 
)
static

Definition at line 11832 of file parse.c.

References Qnil, RARRAY, RARRAY_ASET, rb_ary_new2, rb_get_coverages(), rb_hash_aset(), RBASIC, RBASIC_CLEAR_CLASS, and RTEST.

Referenced by yycompile0().

◆ debug_lines()

static VALUE debug_lines ( VALUE  fname)
static

◆ dispose_string()

static void dispose_string ( VALUE  str)
static

Definition at line 12526 of file parse.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 16393 of file parse.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 16356 of file parse.c.

References DVARS_TOPSCOPE, lvtbl, and POINTER_P.

◆ dyna_pop_1()

static void dyna_pop_1 ( struct parser_params parser)
static

Definition at line 16324 of file parse.c.

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

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

◆ dyna_push_gen()

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

Definition at line 16313 of file parse.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 15059 of file parse.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 14840 of file parse.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().

◆ fixup_nodes()

static void fixup_nodes ( NODE **  rootnode)
static

Definition at line 15809 of file parse.c.

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

Referenced by yyparse().

◆ formal_argument_gen()

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

Definition at line 13126 of file parse.c.

References is_local_id, shadowing_lvar, and yyerror.

◆ gettable_gen()

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

◆ Init_sym()

void Init_sym ( void  )

◆ intern_str()

static ID intern_str ( VALUE  str)
static

◆ internal_id_gen()

static ID internal_id_gen ( struct parser_params parser)
static

Definition at line 16743 of file parse.c.

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

◆ is_global_name_punct()

static int is_global_name_punct ( const int  c)
inlinestatic

Definition at line 12739 of file parse.c.

References ruby_global_name_punct_bits.

Referenced by is_special_global_name(), and parser_peek_variable_name().

◆ is_private_local_id()

static int is_private_local_id ( ID  name)
static

Definition at line 15287 of file parse.c.

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

Referenced by shadowing_lvar_0(), and warn_unused_var().

◆ is_special_global_name()

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

Definition at line 16752 of file parse.c.

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

Referenced by intern_str(), and rb_enc_symname_type().

◆ is_static_content()

static int is_static_content ( NODE node)
static

Definition at line 15746 of file parse.c.

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

Referenced by assign_in_cond().

◆ lex_get_str()

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

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

References rb_io_gets().

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

References last, list, and NEW_LIST.

◆ list_concat_gen()

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

Definition at line 14937 of file parse.c.

References head, last, and tail.

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

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

Referenced by cond0().

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

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

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

◆ local_var_gen()

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

Definition at line 16275 of file parse.c.

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

◆ logop_gen()

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

Definition at line 15941 of file parse.c.

References nd_type, NEW_NODE, type, and value_expr.

◆ lvar_defined_gen()

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

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

References comment_at_top(), parser_set_encode(), and val.

◆ magic_comment_marker()

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

Definition at line 13256 of file parse.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 NODE * negate_lit ( NODE node)
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  attr,
ID  op,
NODE rhs 
)
static

Definition at line 16139 of file parse.c.

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

◆ new_bv_gen()

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

Definition at line 15332 of file parse.c.

References compile_error, dyna_var, is_local_id, name, PARSER_ARG, rb_id2name(), and shadowing_lvar_0().

◆ 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 16155 of file parse.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 15068 of file parse.c.

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

◆ new_op_assign_gen()

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

◆ new_yield_gen()

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

Definition at line 15981 of file parse.c.

References NEW_YIELD, and no_blockarg().

◆ newline_node()

static NODE * newline_node ( NODE node)
static

◆ no_blockarg()

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

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

References nd_set_line, rb_node_newnode, ruby_sourceline, and type.

◆ nodeline()

static int nodeline ( NODE node)
static

Definition at line 14824 of file parse.c.

References nd_line.

Referenced by Init_sym().

◆ nodetype()

static enum node_type nodetype ( NODE node)
static

Definition at line 14818 of file parse.c.

References nd_type.

Referenced by Init_sym().

◆ parse_numvar()

static int parse_numvar ( struct parser_params parser)
static

Definition at line 13471 of file parse.c.

References rb_warnS, ruby_scan_digits(), tok, and toklen.

Referenced by parser_yylex().

◆ parser_compile_string()

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

◆ parser_encode_length()

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

Definition at line 13144 of file parse.c.

References name, and rb_memcicmp().

Referenced by set_file_encoding().

◆ parser_free()

static void parser_free ( void *  ptr)
static

◆ parser_here_document()

static int parser_here_document ( struct parser_params parser,
NODE here 
)
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_new()

static struct parser_params* parser_new ( void  )
static

Definition at line 17530 of file parse.c.

References ALLOC_N, MEMZERO, and parser_initialize().

Referenced by rb_parser_new().

◆ parser_newtok()

static char* parser_newtok ( struct parser_params parser)
static

Definition at line 12189 of file parse.c.

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

◆ parser_nextc()

static int parser_nextc ( struct parser_params parser)
inlinestatic

◆ parser_number_literal_suffix()

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

Definition at line 12944 of file parse.c.

References ISALPHA, ISASCII, lex_p, nextc, NUM_SUFFIX_I, NUM_SUFFIX_R, pushback, and result.

◆ 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_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 12172 of file parse.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 12319 of file parse.c.

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

◆ parser_regx_options()

static int parser_regx_options ( struct parser_params parser)
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

Definition at line 12984 of file parse.c.

References NUM_SUFFIX_R, rb_rational_raw1, set_number_literal, tINTEGER, tRATIONAL, and type.

◆ parser_set_number_literal()

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

Definition at line 12973 of file parse.c.

References INT2FIX, NUM_SUFFIX_I, rb_complex_raw(), set_yylval_literal, tIMAGINARY, and type.

◆ parser_set_token_info()

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

◆ parser_str_new()

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

◆ parser_tok_hex()

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

Definition at line 12227 of file parse.c.

References lex_p, scan_hex, and yyerror.

◆ parser_tokadd()

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

Definition at line 12217 of file parse.c.

References REALLOC_N, tokenbuf, tokidx, and toksiz.

◆ parser_tokadd_escape()

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

Definition at line 12417 of file parse.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

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

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

Referenced by parser_tokadd_string(), and parser_yylex().

◆ parser_tokaddmbc()

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

Definition at line 12410 of file parse.c.

References parser_params::enc, rb_enc_codelen(), rb_enc_mbcput, and tokspace.

◆ parser_tokspace()

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

Definition at line 12205 of file parse.c.

References REALLOC_N, tokenbuf, tokidx, and toksiz.

◆ parser_warn()

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

Definition at line 14856 of file parse.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 14849 of file parse.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 12921 of file parse.c.

References FALSE, ISSPACE, 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 13492 of file parse.c.

References arg_ambiguous, brace_nest, CMDARG_LEXPOP, CMDARG_P, CMDARG_PUSH, command_start, comment_at_top(), compile_error, COND_LEXPOP, COND_P, COND_PUSH, current_enc, DBL2NUM, ENC_CODERANGE_7BIT, ENC_CODERANGE_UNKNOWN, ENC_SINGLE, parser_params::eofp, errno, EXPR_ARG_ANY, EXPR_BEG_ANY, FALSE, here_document, heredoc_identifier, kwtable::id, INT2FIX, IS_AFTER_OPERATOR, IS_ARG, IS_BEG, IS_END, is_identchar, IS_LABEL_POSSIBLE, IS_LABEL_SUFFIX, IS_lex_state, IS_lex_state_for, is_local_id, IS_SPCARG, ISALNUM, ISASCII, ISDIGIT, ISSPACE, ISUPPER, ISXDIGIT, k__END__, keyword_do, keyword_do_block, keyword_do_cond, keyword_do_LAMBDA, lex_eol_p, lex_goto_eol, lex_lastline, lex_nextline, lex_p, lex_pend, lex_state, lex_strterm, lpar_beg, lvar_defined, memmove(), kwtable::name, nd_type, NEW_BACK_REF, NEW_NTH_REF, NEW_STRTERM, newtok, nextc, no_digits, NODE_HEREDOC, NUM_SUFFIX_ALL, NUM_SUFFIX_I, NUM_SUFFIX_R, number_literal_suffix, paren_nest, parse_numvar(), parse_string, PARSER_ARG, parser_params::parser_in_kwarg, parser_is_identchar, parser_isascii, parser_magic_comment(), parser_tokadd_utf8(), peek, peek_n, pushback, Qtrue, rb_cstr_to_inum(), rb_enc_isalnum, rb_enc_isspace, rb_gc_force_recycle(), rb_int_positive_pow(), rb_intern(), rb_intern3(), rb_rational_new(), rb_reserved_word(), rb_warnI, rb_warning0, rb_warningS, read_escape, result, ruby__end__seen, ruby_sourceline, set_file_encoding(), set_integer_literal, set_number_literal, set_yylval_id, set_yylval_name, set_yylval_node, set_yylval_str, snprintf, kwtable::state, str_dquote, str_dsym, str_dword, STR_NEW3, str_regexp, str_squote, str_ssym, str_sword, str_xquote, strtod, tAMPER, tANDOP, tAREF, tASET, tASSOC, tBACK_REF, tCHAR, tCMP, tCOLON2, tCOLON3, tCOMMENT, tCONSTANT, tCVAR, tDOT2, tDOT3, tDSTAR, tEMBDOC, tEMBDOC_BEG, tEMBDOC_END, tEQ, tEQQ, tFID, tFLOAT, tGEQ, tGVAR, tIDENTIFIER, tIGNORED_NL, tIVAR, tLABEL, tLAMBDA, tLAMBEG, tLBRACE, tLBRACE_ARG, tLBRACK, tLEQ, tLPAREN, tLPAREN_ARG, tLSHFT, tMATCH, tNEQ, tNMATCH, tNTH_REF, tok, TOK_INTERN, tokadd, tokadd_mbchar, tokaddmbc, token, tokfix, tokidx, toklast, toklen, tOP_ASGN, tOROP, tPOW, tQSYMBOLS_BEG, tQWORDS_BEG, tRATIONAL, tREGEXP_BEG, tREGEXP_END, tRSHFT, TRUE, tSP, tSTAR, tSTRING_BEG, tSTRING_DEND, tSTRING_END, tSYMBEG, tSYMBOLS_BEG, tUMINUS, tUMINUS_NUM, tUPLUS, tWORDS_BEG, tXSTRING_BEG, type, 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 15840 of file parse.c.

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

Referenced by cond0().

◆ rb_backref_error_gen()

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

Definition at line 15410 of file parse.c.

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

◆ rb_check_id()

ID rb_check_id ( volatile VALUE namep)

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

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

Definition at line 17275 of file parse.c.

References global_symbols, id, name, NIL_P, OBJ_FREEZE, rb_check_string_type(), rb_enc_copy(), rb_eTypeError, RB_GC_GUARD, rb_id_attrset(), rb_inspect(), rb_is_attrset_name(), rb_raise(), RB_TYPE_P, RSTRING_LEN, RSTRING_PTR, setup_fake_str(), st_data_t, st_lookup(), SYM2ID, sym_check_asciionly(), symbols::sym_id, SYMBOL_P, and T_STRING.

◆ rb_check_id_cstr()

ID rb_check_id_cstr ( const char *  ptr,
long  len,
rb_encoding enc 
)

◆ rb_compile_cstr()

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

◆ rb_compile_file()

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

Definition at line 12037 of file parse.c.

References f, rb_parser_compile_file(), and rb_parser_new().

◆ rb_compile_string()

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

◆ rb_enc_symname2_p()

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

Definition at line 16889 of file parse.c.

References IDSET_ATTRSET_FOR_SYNTAX, name, and rb_enc_symname_type().

Referenced by rb_enc_symname_p(), and reg_named_capture_assign_iter().

◆ rb_enc_symname_p()

int rb_enc_symname_p ( const char *  name,
rb_encoding enc 
)

Definition at line 16784 of file parse.c.

References name, rb_enc_symname2_p(), and strlen().

Referenced by rb_symname_p().

◆ rb_enc_symname_type()

static int rb_enc_symname_type ( const char *  name,
long  len,
rb_encoding enc,
unsigned int  allowed_attrset 
)
static

◆ rb_gc_mark_parser()

void rb_gc_mark_parser ( void  )

Definition at line 16558 of file parse.c.

◆ rb_gc_mark_symbols()

void rb_gc_mark_symbols ( int  full_mark)

◆ rb_id2name()

const char* rb_id2name ( ID  id)

◆ rb_id2str()

VALUE rb_id2str ( ID  id)

◆ rb_id_attrset()

ID rb_id_attrset ( ID  id)

◆ rb_intern()

ID rb_intern ( const char *  name)

◆ rb_intern2()

ID rb_intern2 ( const char *  name,
long  len 
)

Definition at line 17088 of file parse.c.

References RString::len, name, rb_intern3(), and rb_usascii_encoding().

Referenced by rb_intern(), and yyparse().

◆ rb_intern3()

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

◆ rb_intern_str()

ID rb_intern_str ( VALUE  str)

Definition at line 17101 of file parse.c.

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

Referenced by dsym_node_gen(), and yyparse().

◆ rb_is_attrset_id()

int rb_is_attrset_id ( ID  id)

Definition at line 17246 of file parse.c.

References is_attrset_id.

◆ rb_is_attrset_name()

int rb_is_attrset_name ( VALUE  name)

Definition at line 17364 of file parse.c.

References ID_ATTRSET, IDSET_ATTRSET_FOR_INTERN, name, and rb_str_symname_type().

Referenced by rb_check_id(), and rb_check_id_cstr().

◆ rb_is_class_id()

int rb_is_class_id ( ID  id)

Definition at line 17228 of file parse.c.

References is_class_id.

◆ rb_is_class_name()

int rb_is_class_name ( VALUE  name)

Definition at line 17346 of file parse.c.

References ID_CLASS, name, and rb_str_symname_type().

◆ rb_is_const_id()

int rb_is_const_id ( ID  id)

Definition at line 17222 of file parse.c.

References is_const_id.

◆ rb_is_const_name()

int rb_is_const_name ( VALUE  name)

Definition at line 17340 of file parse.c.

References ID_CONST, name, and rb_str_symname_type().

◆ rb_is_global_id()

int rb_is_global_id ( ID  id)

Definition at line 17234 of file parse.c.

References is_global_id.

◆ rb_is_global_name()

int rb_is_global_name ( VALUE  name)

Definition at line 17352 of file parse.c.

References ID_GLOBAL, name, and rb_str_symname_type().

◆ rb_is_instance_id()

int rb_is_instance_id ( ID  id)

Definition at line 17240 of file parse.c.

References is_instance_id.

◆ rb_is_instance_name()

int rb_is_instance_name ( VALUE  name)

Definition at line 17358 of file parse.c.

References ID_INSTANCE, name, and rb_str_symname_type().

◆ rb_is_junk_id()

int rb_is_junk_id ( ID  id)

Definition at line 17258 of file parse.c.

References is_junk_id.

◆ rb_is_junk_name()

int rb_is_junk_name ( VALUE  name)

Definition at line 17386 of file parse.c.

References IDSET_ATTRSET_FOR_SYNTAX, name, and rb_str_symname_type().

◆ rb_is_local_id()

int rb_is_local_id ( ID  id)

Definition at line 17252 of file parse.c.

References is_local_id.

◆ rb_is_local_name()

int rb_is_local_name ( VALUE  name)

Definition at line 17370 of file parse.c.

References ID_LOCAL, name, and rb_str_symname_type().

◆ rb_is_method_name()

int rb_is_method_name ( VALUE  name)

Definition at line 17376 of file parse.c.

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

◆ rb_parser_append_print()

NODE* rb_parser_append_print ( VALUE  vparser,
NODE node 
)

◆ rb_parser_calloc()

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

Definition at line 17626 of file parse.c.

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

◆ rb_parser_compile_cstr()

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

Definition at line 12024 of file parse.c.

References f, parser_compile_string(), rb_filesystem_str_new_cstr(), and rb_str_new().

◆ rb_parser_compile_file()

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

Definition at line 12045 of file parse.c.

References f, rb_filesystem_str_new_cstr(), and rb_parser_compile_file_path().

Referenced by rb_compile_file().

◆ rb_parser_compile_file_path()

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

◆ rb_parser_compile_string()

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

Definition at line 12004 of file parse.c.

References f, rb_filesystem_str_new_cstr(), and rb_parser_compile_string_path().

◆ rb_parser_compile_string_path()

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

Definition at line 12010 of file parse.c.

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

Referenced by rb_parser_compile_string().

◆ rb_parser_encoding()

VALUE rb_parser_encoding ( VALUE  vparser)

Definition at line 17570 of file parse.c.

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

◆ rb_parser_end_seen_p()

VALUE rb_parser_end_seen_p ( VALUE  vparser)

Definition at line 17555 of file parse.c.

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

◆ rb_parser_free()

void rb_parser_free ( struct parser_params parser,
void *  ptr 
)

Definition at line 17656 of file parse.c.

References parser_params::heap, RNode::node, NULL, rb_gc_force_recycle(), RNode::u2, and xfree().

◆ rb_parser_get_yydebug()

VALUE rb_parser_get_yydebug ( VALUE  self)

Definition at line 17585 of file parse.c.

References parser_data_type, Qfalse, Qtrue, TypedData_Get_Struct, and yydebug.

◆ rb_parser_malloc()

void* rb_parser_malloc ( struct parser_params parser,
size_t  size 
)

Definition at line 17616 of file parse.c.

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

◆ rb_parser_new()

VALUE rb_parser_new ( void  )

Definition at line 17541 of file parse.c.

References parser_data_type, parser_new(), and TypedData_Wrap_Struct.

Referenced by rb_compile_cstr(), rb_compile_file(), and rb_compile_string().

◆ rb_parser_realloc()

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

◆ rb_parser_set_yydebug()

VALUE rb_parser_set_yydebug ( VALUE  self,
VALUE  flag 
)

Definition at line 17600 of file parse.c.

References parser_data_type, RTEST, TypedData_Get_Struct, and yydebug.

◆ rb_parser_while_loop()

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

◆ rb_reserved_word()

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

Definition at line 17524 of file parse.c.

References reserved_word().

Referenced by parser_yylex(), and reg_named_capture_assign_iter().

◆ rb_str_symname_type()

static int rb_str_symname_type ( VALUE  name,
unsigned int  allowed_attrset 
)
static

◆ rb_sym_all_symbols()

VALUE rb_sym_all_symbols ( void  )

◆ rb_symname_p()

int rb_symname_p ( const char *  name)

Definition at line 16778 of file parse.c.

References name, rb_ascii8bit_encoding(), and rb_enc_symname_p().

◆ 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_setenc_gen()

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

◆ reg_named_capture_assign_gen()

static NODE * reg_named_capture_assign_gen ( struct parser_params parser,
VALUE  regexp,
NODE match 
)
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

◆ register_symid()

static ID register_symid ( ID  id,
const char *  name,
long  len,
rb_encoding enc 
)
static

Definition at line 16905 of file parse.c.

References name, rb_enc_str_new(), and register_symid_str().

◆ register_symid_str()

static ID register_symid_str ( ID  id,
VALUE  str 
)
static

◆ remove_begin()

static NODE * remove_begin ( NODE node)
static

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

References nd_type, and NODE_BEGIN.

◆ ret_args_gen()

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

Definition at line 15964 of file parse.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

◆ setup_fake_str()

static VALUE setup_fake_str ( struct RString fake_str,
const char *  name,
long  len 
)
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 15325 of file parse.c.

References name, and shadowing_lvar_0().

◆ simple_re_meta()

static int simple_re_meta ( int  c)
inlinestatic

Definition at line 12549 of file parse.c.

References FALSE, and TRUE.

Referenced by parser_tokadd_string().

◆ splat_array()

static NODE * splat_array ( NODE node)
static

Definition at line 15466 of file parse.c.

References nd_type, NODE_ARRAY, and NODE_SPLAT.

Referenced by yyparse().

◆ sym_check_asciionly()

static int sym_check_asciionly ( VALUE  str)
static

◆ symbols_i()

static int symbols_i ( VALUE  sym,
ID  value,
VALUE  ary 
)
static

Definition at line 17190 of file parse.c.

References RString::ary, ID2SYM, rb_ary_push(), and ST_CONTINUE.

Referenced by rb_sym_all_symbols().

◆ token_info_get_column()

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

Definition at line 11678 of file parse.c.

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

Referenced by token_info_pop(), and token_info_push().

◆ token_info_has_nonspaces()

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

Definition at line 11692 of file parse.c.

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

Referenced by token_info_pop(), and token_info_push().

◆ token_info_pop()

static void token_info_pop ( struct parser_params parser,
const char *  token 
)
static

◆ token_info_push()

static void token_info_push ( struct parser_params parser,
const char *  token 
)
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 15651 of file parse.c.

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

◆ vtable_add()

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

Definition at line 239 of file parse.c.

References id, POINTER_P, rb_bug(), rb_id2name(), REALLOC_N, vtable::tbl, and VTBL_DEBUG.

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

◆ vtable_alloc()

static struct vtable* vtable_alloc ( struct vtable prev)
static

Definition at line 215 of file parse.c.

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

Referenced by dyna_push_gen(), and local_push_gen().

◆ vtable_free()

static void vtable_free ( struct vtable tbl)
static

Definition at line 227 of file parse.c.

References POINTER_P, vtable::tbl, VTBL_DEBUG, and xfree().

Referenced by dyna_pop_1(), and local_pop_gen().

◆ vtable_included()

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

Definition at line 254 of file parse.c.

References POINTER_P, and vtable::tbl.

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

◆ vtable_size()

static int vtable_size ( const struct vtable tbl)
static

Definition at line 202 of file parse.c.

References POINTER_P, and vtable::pos.

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

◆ warn_unless_e_option()

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

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

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

References yy_symbol_print(), YYFPRINTF, yyprhs, yyr2, yyrhs, and yyrline.

◆ yy_stack_print()

static void yy_stack_print ( yytype_int16 yybottom,
yytype_int16 yytop 
)
static

Definition at line 4584 of file parse.c.

References YYFPRINTF.

◆ yy_symbol_print()

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

Definition at line 4557 of file parse.c.

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

Referenced by yy_reduce_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 4523 of file parse.c.

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

References YY_SYMBOL_PRINT, and YYUSE.

Referenced by yyparse().

◆ yylex()

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

Definition at line 14783 of file parse.c.

References NIL_P, parser_yylex(), parser_params::parser_yylval, Qundef, t(), and YYSTYPE::val.

◆ yyparse() [1/2]

int yyparse ( )

◆ yyparse() [2/2]

int yyparse ( struct parser_params parser)

Definition at line 4982 of file parse.c.

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

◆ yystpcpy()

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

Definition at line 4710 of file parse.c.

Referenced by yytnamerr().

◆ yystrlen()

static YYSIZE_T yystrlen ( char *  yystr) const
static

Definition at line 4686 of file parse.c.

References YYSIZE_T.

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

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

Referenced by yysyntax_error().

Variable Documentation

◆ global_symbols

struct symbols global_symbols = {tLAST_TOKEN}
static

◆ id_type_names

const char id_type_names[][9]
static
Initial value:
= {
"LOCAL",
"INSTANCE",
"",
"GLOBAL",
"ATTRSET",
"CONST",
"CLASS",
"JUNK",
}

Definition at line 15361 of file parse.c.

Referenced by rb_id_attrset().

◆ magic_comments

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

Definition at line 13248 of file parse.c.

Referenced by parser_magic_comment().

◆ name

const char* name

◆ op_tbl

const { ... } op_tbl[]
Initial value:
= {
{tDOT2, ".."},
{tDOT3, "..."},
{tPOW, "**"},
{tDSTAR, "**"},
{tUPLUS, "+@"},
{tUMINUS, "-@"},
{tCMP, "<=>"},
{tGEQ, ">="},
{tLEQ, "<="},
{tEQ, "=="},
{tEQQ, "==="},
{tNEQ, "!="},
{tMATCH, "=~"},
{tNMATCH, "!~"},
{tAREF, "[]"},
{tASET, "[]="},
{tLSHFT, "<<"},
{tRSHFT, ">>"},
{tCOLON2, "::"},
}
Definition: parse.c:864
Definition: parse.c:849
Definition: parse.c:877
Definition: parse.c:850
Definition: parse.c:862
Definition: parse.c:855
Definition: parse.c:852
Definition: parse.c:860
Definition: parse.c:854
Definition: parse.c:851
Definition: parse.c:861
Definition: parse.c:863
Definition: parse.c:866
Definition: parse.c:848
Definition: parse.c:847
Definition: parse.c:858
Definition: parse.c:865
Definition: parse.c:859
Definition: parse.c:853

Referenced by intern_str(), and rb_id2str().

◆ parser_data_type

static const rb_data_type_t parser_data_type
static
Initial value:
= {
"parser",
{
},
}
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1015
static size_t parser_memsize(const void *ptr)
Definition: parse.c:17491
static void parser_free(void *ptr)
Definition: parse.c:17474
static void parser_mark(void *ptr)
Definition: parse.c:17448
#define NULL
Definition: _sdbm.c:102

Definition at line 11975 of file parse.c.

Referenced by parser_compile_string(), rb_parser_append_print(), rb_parser_compile_file_path(), rb_parser_encoding(), rb_parser_end_seen_p(), rb_parser_get_yydebug(), rb_parser_new(), rb_parser_set_yydebug(), and rb_parser_while_loop().

◆ ruby_global_name_punct_bits

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

Definition at line 12717 of file parse.c.

Referenced by is_global_name_punct().

◆ symhash

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

Definition at line 16678 of file parse.c.

Referenced by Init_sym().

◆ token

ID token

◆ yycheck

const yytype_int16 yycheck[]
static

Definition at line 3172 of file parse.c.

Referenced by yyparse(), and yysyntax_error().

◆ yydefact

const yytype_uint16 yydefact[]
static

Definition at line 1774 of file parse.c.

Referenced by yyparse().

◆ yydefgoto

const yytype_int16 yydefgoto[]
static
Initial value:
=
{
-1, 1, 2, 68, 69, 70, 239, 568, 569, 255,
256, 448, 257, 439, 72, 73, 360, 74, 75, 510,
691, 246, 77, 78, 258, 79, 80, 81, 468, 82,
212, 379, 380, 195, 196, 197, 198, 606, 557, 200,
84, 441, 214, 263, 231, 749, 428, 429, 228, 229,
216, 415, 430, 516, 517, 85, 358, 261, 262, 636,
626, 362, 847, 363, 848, 733, 989, 737, 734, 930,
595, 597, 747, 936, 248, 87, 88, 89, 90, 91,
92, 93, 94, 95, 96, 714, 571, 722, 844, 845,
371, 771, 772, 773, 959, 896, 800, 687, 688, 801,
971, 972, 281, 282, 473, 776, 877, 659, 945, 322,
511, 97, 98, 712, 705, 566, 558, 320, 508, 507,
578, 988, 716, 838, 916, 920, 99, 100, 101, 102,
103, 104, 105, 293, 486, 106, 297, 107, 108, 295,
299, 289, 287, 291, 478, 678, 677, 793, 891, 797,
109, 288, 110, 111, 112, 219, 220, 115, 221, 222,
590, 736, 745, 746, 879, 779, 661, 662, 889, 664,
665, 666, 667, 805, 806, 668, 669, 670, 671, 808,
809, 672, 673, 674, 675, 676, 782, 398, 596, 268,
431, 224, 118, 630, 560, 401, 306, 425, 426, 707,
459, 572, 366, 260
}

Definition at line 1885 of file parse.c.

Referenced by yyparse().

◆ yypact

const yytype_int16 yypact[]
static

Definition at line 1913 of file parse.c.

Referenced by yyparse(), and yysyntax_error().

◆ yypgoto

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-813, -813, -813, -361, -813, 29, -813, -540, -29, -813,
515, -813, 43, -813, -301, -63, -71, 21, -813, -174,
-813, 797, -10, 869, -158, 16, -76, -813, -395, 8,
1783, -325, 870, -53, -813, -5, -813, -813, 3, -813,
1127, -813, -19, -813, -67, 257, -317, 118, -3, -813,
-390, -181, -4, -813, -313, -15, -813, -813, -813, -813,
-813, -813, -813, -813, -813, -813, -813, -813, -813, -813,
-813, -813, -813, -813, 55, -813, -813, -813, -813, -813,
-813, -813, -813, -813, -813, -541, -344, -527, -45, -631,
-813, -770, -784, 210, 290, 172, -813, -425, -813, -663,
-813, -31, -813, -813, -813, -813, -813, -813, -813, 236,
-813, -813, -813, -813, -813, -813, -813, -96, -813, -813,
-556, -813, -34, -813, -813, -813, -813, -813, -813, 889,
-813, -813, -813, -813, 691, -813, -813, -813, -813, -813,
-813, -813, 933, -813, -97, -813, -813, -813, -813, -813,
0, -813, 6, -813, -11, 1321, 1524, 897, 1945, 1604,
-813, -813, 58, -813, -404, -154, -323, -812, 123, -717,
87, 76, 215, 101, -813, -813, -813, -69, -711, -629,
106, 237, -813, -616, -813, -44, -626, -813, -813, -813,
98, -392, -813, -319, -813, 624, -46, -26, -168, -565,
-207, -28, -13, -2
}

Definition at line 2024 of file parse.c.

Referenced by yyparse().

◆ yyprhs

const yytype_uint16 yyprhs[]
static

Definition at line 1210 of file parse.c.

Referenced by yy_reduce_print().

◆ yyr1

const yytype_uint16 yyr1[]
static

Definition at line 1636 of file parse.c.

Referenced by yyparse().

◆ yyr2

const yytype_uint8 yyr2[]
static

Definition at line 1704 of file parse.c.

Referenced by yy_reduce_print(), and yyparse().

◆ yyrhs

const yytype_int16 yyrhs[]
static

Definition at line 1278 of file parse.c.

Referenced by yy_reduce_print().

◆ yyrline

const yytype_uint16 yyrline[]
static

Definition at line 1474 of file parse.c.

Referenced by yy_reduce_print().

◆ yystos

const yytype_uint16 yystos[]
static

Definition at line 4287 of file parse.c.

Referenced by yyparse().

◆ yytable

const yytype_int16 yytable[]
static

Definition at line 2053 of file parse.c.

Referenced by yyparse(), and yysyntax_error().

◆ yytname

const char* const yytname[]
static

Definition at line 1545 of file parse.c.

Referenced by yy_symbol_print(), and yysyntax_error().

◆ yytranslate

const yytype_uint8 yytranslate[]
static

Definition at line 1167 of file parse.c.