Ruby
2.5.0dev(2017-10-22revision60238)
|
#include "ruby/ruby.h"
#include "ruby/st.h"
#include "ruby/encoding.h"
#include "internal.h"
#include "node.h"
#include "parse.h"
#include "symbol.h"
#include "regenc.h"
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include "probes.h"
#include "ruby/regex.h"
#include "ruby/util.h"
#include "lex.c"
Go to the source code of this file.
Data Structures | |
struct | vtable |
struct | local_vars |
struct | token_info |
struct | parser_params |
union | yyalloc |
struct | magic_comment |
struct | reg_named_capture_assign_t |
Macros | |
#define | YYBISON 1 |
#define | YYBISON_VERSION "2.3" |
#define | YYSKELETON_NAME "yacc.c" |
#define | YYPURE 1 |
#define | YYLSP_NEEDED 1 |
#define | YYTOKENTYPE |
#define | END_OF_INPUT 0 |
#define | keyword_class 258 |
#define | keyword_module 259 |
#define | keyword_def 260 |
#define | keyword_undef 261 |
#define | keyword_begin 262 |
#define | keyword_rescue 263 |
#define | keyword_ensure 264 |
#define | keyword_end 265 |
#define | keyword_if 266 |
#define | keyword_unless 267 |
#define | keyword_then 268 |
#define | keyword_elsif 269 |
#define | keyword_else 270 |
#define | keyword_case 271 |
#define | keyword_when 272 |
#define | keyword_while 273 |
#define | keyword_until 274 |
#define | keyword_for 275 |
#define | keyword_break 276 |
#define | keyword_next 277 |
#define | keyword_redo 278 |
#define | keyword_retry 279 |
#define | keyword_in 280 |
#define | keyword_do 281 |
#define | keyword_do_cond 282 |
#define | keyword_do_block 283 |
#define | keyword_do_LAMBDA 284 |
#define | keyword_return 285 |
#define | keyword_yield 286 |
#define | keyword_super 287 |
#define | keyword_self 288 |
#define | keyword_nil 289 |
#define | keyword_true 290 |
#define | keyword_false 291 |
#define | keyword_and 292 |
#define | keyword_or 293 |
#define | keyword_not 294 |
#define | modifier_if 295 |
#define | modifier_unless 296 |
#define | modifier_while 297 |
#define | modifier_until 298 |
#define | modifier_rescue 299 |
#define | keyword_alias 300 |
#define | keyword_defined 301 |
#define | keyword_BEGIN 302 |
#define | keyword_END 303 |
#define | keyword__LINE__ 304 |
#define | keyword__FILE__ 305 |
#define | keyword__ENCODING__ 306 |
#define | tIDENTIFIER 307 |
#define | tFID 308 |
#define | tGVAR 309 |
#define | tIVAR 310 |
#define | tCONSTANT 311 |
#define | tCVAR 312 |
#define | tLABEL 313 |
#define | tINTEGER 314 |
#define | tFLOAT 315 |
#define | tRATIONAL 316 |
#define | tIMAGINARY 317 |
#define | tSTRING_CONTENT 318 |
#define | tCHAR 319 |
#define | tNTH_REF 320 |
#define | tBACK_REF 321 |
#define | tREGEXP_END 322 |
#define | tUPLUS 130 |
#define | tUMINUS 131 |
#define | tPOW 132 |
#define | tCMP 133 |
#define | tEQ 138 |
#define | tEQQ 139 |
#define | tNEQ 140 |
#define | tGEQ 137 |
#define | tLEQ 136 |
#define | tANDOP 146 |
#define | tOROP 147 |
#define | tMATCH 141 |
#define | tNMATCH 142 |
#define | tDOT2 128 |
#define | tDOT3 129 |
#define | tAREF 143 |
#define | tASET 144 |
#define | tLSHFT 134 |
#define | tRSHFT 135 |
#define | tANDDOT 148 |
#define | tCOLON2 145 |
#define | tCOLON3 323 |
#define | tOP_ASGN 324 |
#define | tASSOC 325 |
#define | tLPAREN 326 |
#define | tLPAREN_ARG 327 |
#define | tRPAREN 328 |
#define | tLBRACK 329 |
#define | tLBRACE 330 |
#define | tLBRACE_ARG 331 |
#define | tSTAR 332 |
#define | tDSTAR 333 |
#define | tAMPER 334 |
#define | tLAMBDA 335 |
#define | tSYMBEG 336 |
#define | tSTRING_BEG 337 |
#define | tXSTRING_BEG 338 |
#define | tREGEXP_BEG 339 |
#define | tWORDS_BEG 340 |
#define | tQWORDS_BEG 341 |
#define | tSYMBOLS_BEG 342 |
#define | tQSYMBOLS_BEG 343 |
#define | tSTRING_DBEG 344 |
#define | tSTRING_DEND 345 |
#define | tSTRING_DVAR 346 |
#define | tSTRING_END 347 |
#define | tLAMBEG 348 |
#define | tLABEL_END 349 |
#define | tLOWEST 350 |
#define | tUMINUS_NUM 351 |
#define | tLAST_TOKEN 352 |
#define | PARSER_DEBUG 0 |
#define | YYDEBUG 1 |
#define | YYERROR_VERBOSE 1 |
#define | YYSTACK_USE_ALLOCA 0 |
#define | WARN_PAST_SCOPE 0 |
#define | TAB_WIDTH 8 |
#define | YYMALLOC(size) rb_parser_malloc(parser, (size)) |
#define | YYREALLOC(ptr, size) rb_parser_realloc(parser, (ptr), (size)) |
#define | YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size)) |
#define | YYFREE(ptr) rb_parser_free(parser, (ptr)) |
#define | YYFPRINTF rb_parser_printf |
#define | YY_LOCATION_PRINT(File, Loc) |
#define | malloc YYMALLOC |
#define | realloc YYREALLOC |
#define | calloc YYCALLOC |
#define | free YYFREE |
#define | DEF_EXPR(n) EXPR_##n = (1 << EXPR_##n##_bit) |
#define | IS_lex_state_for(x, ls) ((x) & (ls)) |
#define | IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls)) |
#define | IS_lex_state(ls) IS_lex_state_for(lex_state, (ls)) |
#define | IS_lex_state_all(ls) IS_lex_state_all_for(lex_state, (ls)) |
#define | SET_LEX_STATE(ls) |
#define | SHOW_BITSTACK(stack, name) (yydebug ? rb_parser_show_bitstack(parser, stack, name, __LINE__) : (void)0) |
#define | BITSTACK_PUSH(stack, n) (((stack) = ((stack)<<1)|((n)&1)), SHOW_BITSTACK(stack, #stack"(push)")) |
#define | BITSTACK_POP(stack) (((stack) = (stack) >> 1), SHOW_BITSTACK(stack, #stack"(pop)")) |
#define | BITSTACK_LEXPOP(stack) (((stack) = ((stack) >> 1) | ((stack) & 1)), SHOW_BITSTACK(stack, #stack"(lexpop)")) |
#define | BITSTACK_SET_P(stack) (SHOW_BITSTACK(stack, #stack), (stack)&1) |
#define | BITSTACK_SET(stack, n) ((stack)=(n), SHOW_BITSTACK(stack, #stack"(set)")) |
#define | COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n)) |
#define | COND_POP() BITSTACK_POP(cond_stack) |
#define | COND_LEXPOP() BITSTACK_LEXPOP(cond_stack) |
#define | COND_P() BITSTACK_SET_P(cond_stack) |
#define | COND_SET(n) BITSTACK_SET(cond_stack, (n)) |
#define | CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n)) |
#define | CMDARG_POP() BITSTACK_POP(cmdarg_stack) |
#define | CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack) |
#define | CMDARG_P() BITSTACK_SET_P(cmdarg_stack) |
#define | CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n)) |
#define | DVARS_INHERIT ((void*)1) |
#define | DVARS_TOPSCOPE NULL |
#define | DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl)) |
#define | POINTER_P(val) ((VALUE)(val) & ~(VALUE)3) |
#define | intern_cstr(n, l, en) rb_intern3(n,l,en) |
#define | STR_NEW(p, n) rb_enc_str_new((p),(n),current_enc) |
#define | STR_NEW0() rb_enc_str_new(0,0,current_enc) |
#define | STR_NEW2(p) rb_enc_str_new((p),strlen(p),current_enc) |
#define | STR_NEW3(p, n, e, func) parser_str_new((p),(n),(e),(func),current_enc) |
#define | TOK_INTERN() intern_cstr(tok(), toklen(), current_enc) |
#define | yyerror0(msg) parser_yyerror(parser, (msg)) |
#define | yyerror(yylloc, parser, msg) yyerror0(msg) |
#define | token_flush(p) ((p)->lex.ptok = (p)->lex.pcur) |
#define | lex_strterm (parser->lex.strterm) |
#define | lex_state (parser->lex.state) |
#define | cond_stack (parser->cond_stack) |
#define | cmdarg_stack (parser->cmdarg_stack) |
#define | paren_nest (parser->lex.paren_nest) |
#define | lpar_beg (parser->lex.lpar_beg) |
#define | brace_nest (parser->lex.brace_nest) |
#define | in_single (parser->in_single) |
#define | in_def (parser->in_def) |
#define | in_main (parser->in_main) |
#define | in_defined (parser->in_defined) |
#define | tokenbuf (parser->tokenbuf) |
#define | tokidx (parser->tokidx) |
#define | toksiz (parser->toksiz) |
#define | tokline (parser->tokline) |
#define | lex_input (parser->lex.input) |
#define | lex_lastline (parser->lex.lastline) |
#define | lex_nextline (parser->lex.nextline) |
#define | lex_pbeg (parser->lex.pbeg) |
#define | lex_p (parser->lex.pcur) |
#define | lex_pend (parser->lex.pend) |
#define | heredoc_end (parser->heredoc_end) |
#define | heredoc_indent (parser->heredoc_indent) |
#define | heredoc_line_indent (parser->heredoc_line_indent) |
#define | command_start (parser->command_start) |
#define | lex_gets_ptr (parser->lex.gets_ptr) |
#define | lex_gets (parser->lex.gets) |
#define | lvtbl (parser->lvtbl) |
#define | ruby__end__seen (parser->ruby__end__seen) |
#define | ruby_sourceline (parser->ruby_sourceline) |
#define | ruby_sourcefile (parser->ruby_sourcefile) |
#define | ruby_sourcefile_string (parser->ruby_sourcefile_string) |
#define | current_enc (parser->enc) |
#define | current_arg (parser->cur_arg) |
#define | yydebug (parser->yydebug) |
#define | compile_for_eval (parser->base_block != 0 && !in_main) |
#define | ruby_eval_tree (parser->eval_tree) |
#define | ruby_eval_tree_begin (parser->eval_tree_begin) |
#define | ruby_debug_lines (parser->debug_lines) |
#define | ruby_coverage (parser->coverage) |
#define | tokp lex.ptok |
#define | token_column ((int)(parser->tokp - lex_pbeg)) |
#define | CALL_Q_P(q) ((q) == TOKEN2VAL(tANDDOT)) |
#define | NODE_CALL_Q(q) (CALL_Q_P(q) ? NODE_QCALL : NODE_CALL) |
#define | NEW_QCALL(q, r, m, a) NEW_NODE(NODE_CALL_Q(q),r,m,a) |
#define | lambda_beginning_p() (lpar_beg && lpar_beg == paren_nest) |
#define | yyparse ruby_yyparse |
#define | rb_node_newnode(type, a1, a2, a3) node_newnode(parser, (type), (a1), (a2), (a3)) |
#define | cond(node, column) cond_gen(parser, (node), FALSE, column) |
#define | method_cond(node, column) cond_gen(parser, (node), TRUE, column) |
#define | new_nil() NEW_NIL() |
#define | new_if(cc, left, right, column) new_if_gen(parser, (cc), (left), (right), (column)) |
#define | new_unless(cc, left, right, column) new_unless_gen(parser, (cc), (left), (right), (column)) |
#define | logop(id, node1, node2, column) |
#define | value_expr(node) value_expr_gen(parser, (node) = remove_begin(node)) |
#define | void_expr0(node) void_expr_gen(parser, (node)) |
#define | void_expr(node) void_expr0((node) = remove_begin(node)) |
#define | void_stmts(node) void_stmts_gen(parser, (node)) |
#define | reduce_nodes(n) reduce_nodes_gen(parser,(n)) |
#define | block_dup_check(n1, n2) block_dup_check_gen(parser,(n1),(n2)) |
#define | block_append(h, t, column) block_append_gen(parser,(h),(t),(column)) |
#define | list_append(l, i, column) list_append_gen(parser,(l),(i),(column)) |
#define | arg_append(h, t, column) arg_append_gen(parser,(h),(t),(column)) |
#define | arg_concat(h, t, column) arg_concat_gen(parser,(h),(t),(column)) |
#define | literal_concat(h, t, column) literal_concat_gen(parser,(h),(t),(column)) |
#define | new_evstr(n, column) new_evstr_gen(parser,(n),(column)) |
#define | evstr2dstr(n, column) evstr2dstr_gen(parser,(n),(column)) |
#define | call_bin_op(recv, id, arg1, column) call_bin_op_gen(parser, (recv),(id),(arg1),(column)) |
#define | call_uni_op(recv, id, column) call_uni_op_gen(parser, (recv),(id),(column)) |
#define | new_qcall(q, r, m, a, column) new_qcall_gen(parser,q,r,m,a,column) |
#define | new_command_qcall(q, r, m, a, column) new_qcall_gen(parser,q,r,m,a,column) |
#define | new_command(m, a) new_command_gen(parser, m, a) |
#define | method_add_block(m, b) method_add_block_gen(parser, m, b) |
#define | new_args(f, o, r, p, t) new_args_gen(parser, (f),(o),(r),(p),(t)) |
#define | new_args_tail(k, kr, b, column) new_args_tail_gen(parser, (k),(kr),(b),(column)) |
#define | new_kw_arg(k, column) new_kw_arg_gen(parser, k, column) |
#define | negate_lit(lit) negate_lit_gen(parser, lit) |
#define | ret_args(node) ret_args_gen(parser, (node)) |
#define | new_yield(node, column) new_yield_gen(parser, (node), (column)) |
#define | dsym_node(node, column) dsym_node_gen(parser, (node), (column)) |
#define | gettable(id, column) gettable_gen(parser,(id),(column)) |
#define | assignable(id, node, column) assignable_gen(parser, (id), (node), (column)) |
#define | aryset(node1, node2, column) aryset_gen(parser, (node1), (node2), (column)) |
#define | attrset(node, q, id, column) attrset_gen(parser, (node), (q), (id), (column)) |
#define | rb_backref_error(n) rb_backref_error_gen(parser,(n)) |
#define | node_assign(node1, node2, column) node_assign_gen(parser, (node1), (node2), (column)) |
#define | new_op_assign(lhs, op, rhs, column) new_op_assign_gen(parser, (lhs), (op), (rhs), (column)) |
#define | new_attr_op_assign(lhs, type, attr, op, rhs, column) new_attr_op_assign_gen(parser, (lhs), (type), (attr), (op), (rhs), (column)) |
#define | new_const_op_assign(lhs, op, rhs, column) new_const_op_assign_gen(parser, (lhs), (op), (rhs), (column)) |
#define | const_path_field(w, n, column) const_path_field_gen(parser, w, n, column) |
#define | top_const_field(n) NEW_COLON3(n) |
#define | const_decl(path, column) const_decl_gen(parser, path, column) |
#define | var_field(n) (n) |
#define | backref_assign_error(n, a, column) (rb_backref_error(n), new_begin(0, column)) |
#define | new_hash(hash, column) new_hash_gen(parser, (hash), column) |
#define | new_defined(expr, column) new_defined_gen(parser, expr, column) |
#define | new_regexp(node, opt, column) new_regexp_gen(parser, node, opt, column) |
#define | new_lit(sym, column) new_lit_gen(parser, sym, column) |
#define | new_list(item, column) new_list_gen(parser, item, column) |
#define | new_str(s, column) new_str_gen(parser, s, column) |
#define | new_dvar(id, column) new_dvar_gen(parser, id, column) |
#define | new_resbody(e, s, r, column) new_resbody_gen(parser, (e),(s),(r),(column)) |
#define | new_errinfo(column) new_errinfo_gen(parser, column) |
#define | new_call(recv, mid, args, column) new_call_gen(parser, recv,mid,args,column) |
#define | new_fcall(mid, args, column) new_fcall_gen(parser, mid, args, column) |
#define | new_for(var, iter, body, column) new_for_gen(parser, var, iter, body, column) |
#define | new_gvar(id, column) new_gvar_gen(parser, id, column) |
#define | new_lvar(id, column) new_lvar_gen(parser, id, column) |
#define | new_dstr(s, column) new_dstr_gen(parser, s, column) |
#define | new_rescue(b, res, e, column) new_rescue_gen(parser,b,res,e,column) |
#define | new_undef(i, column) new_undef_gen(parser, i, column) |
#define | new_zarray(column) new_zarray_gen(parser, column) |
#define | new_ivar(id, column) new_ivar_gen(parser,id,column) |
#define | new_postarg(i, v, column) new_postarg_gen(parser,i,v,column) |
#define | new_cdecl(v, val, path, column) new_cdecl_gen(parser,v,val,path,column) |
#define | new_scope(a, b, column) new_scope_gen(parser,a,b,column) |
#define | new_begin(b, column) new_begin_gen(parser,b,column) |
#define | new_masgn(l, r, column) new_masgn_gen(parser,l,r,column) |
#define | new_xstring(node, column) new_xstring_gen(parser, node, column) |
#define | new_string1(str) (str) |
#define | new_brace_body(param, stmt, column) new_body_gen(parser, param, stmt, column) |
#define | new_do_body(param, stmt, column) new_body_gen(parser, param, stmt, column) |
#define | match_op(node1, node2, column) match_op_gen(parser, (node1), (node2), (column)) |
#define | local_tbl() local_tbl_gen(parser) |
#define | reg_compile(str, options) reg_compile_gen(parser, (str), (options)) |
#define | reg_fragment_setenc(str, options) reg_fragment_setenc_gen(parser, (str), (options)) |
#define | reg_fragment_check(str, options) reg_fragment_check_gen(parser, (str), (options)) |
#define | reg_named_capture_assign(regexp, column) reg_named_capture_assign_gen(parser,(regexp),column) |
#define | heredoc_dedent(str) parser_heredoc_dedent(parser, (str)) |
#define | get_id(id) (id) |
#define | get_value(val) (val) |
#define | formal_argument(id) formal_argument_gen(parser, (id)) |
#define | shadowing_lvar(name) shadowing_lvar_gen(parser, (name)) |
#define | new_bv(id) new_bv_gen(parser, (id)) |
#define | local_push(top) local_push_gen(parser,(top)) |
#define | local_pop() local_pop_gen(parser) |
#define | local_var(id) local_var_gen(parser, (id)) |
#define | arg_var(id) arg_var_gen(parser, (id)) |
#define | local_id_ref(id, vidp) local_id_gen(parser, (id), &(vidp)) |
#define | local_id(id) local_id_gen(parser, (id), NULL) |
#define | internal_id() internal_id_gen(parser) |
#define | dyna_push() dyna_push_gen(parser) |
#define | dyna_pop(node) dyna_pop_gen(parser, (node)) |
#define | dyna_in_block() dyna_in_block_gen(parser) |
#define | dyna_var(id) local_var(id) |
#define | dvar_defined_ref(id, vidp) dvar_defined_gen(parser, (id), &(vidp)) |
#define | dvar_defined(id) dvar_defined_gen(parser, (id), NULL) |
#define | dvar_curr(id) dvar_curr_gen(parser, (id)) |
#define | lvar_defined(id) lvar_defined_gen(parser, (id)) |
#define | METHOD_NOT '!' |
#define | RE_OPTION_ONCE (1<<16) |
#define | RE_OPTION_ENCODING_SHIFT 8 |
#define | RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT) |
#define | RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff) |
#define | RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE) |
#define | RE_OPTION_MASK 0xff |
#define | RE_OPTION_ARG_ENCODING_NONE 32 |
#define | NODE_STRTERM NODE_ZARRAY /* nothing to gc */ |
#define | NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ |
#define | SIGN_EXTEND(x, n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) |
#define | nd_func u1.id |
#define | nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) |
#define | nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2) |
#define | nd_nest u3.cnt |
#define | TOKEN2ID(tok) |
#define | ID2VAL(id) ((VALUE)(id)) |
#define | TOKEN2VAL(t) ID2VAL(t) |
#define | KWD2EID(t, v) keyword_##t |
#define | Qnone 0 |
#define | Qnull 0 |
#define | ifndef_ripper(x) (x) |
#define | rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1)) |
#define | rb_warn1(fmt, a) WARN_CALL(WARN_ARGS(fmt, 2), (a)) |
#define | rb_warn2(fmt, a, b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b)) |
#define | rb_warn3(fmt, a, b, c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c)) |
#define | rb_warn4(fmt, a, b, c, d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d)) |
#define | rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1)) |
#define | rb_warning1(fmt, a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a)) |
#define | rb_warning2(fmt, a, b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b)) |
#define | rb_warning3(fmt, a, b, c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c)) |
#define | rb_warning4(fmt, a, b, c, d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d)) |
#define | rb_warn0L(l, fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1)) |
#define | rb_warn1L(l, fmt, a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a)) |
#define | rb_warn2L(l, fmt, a, b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b)) |
#define | rb_warn3L(l, fmt, a, b, c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c)) |
#define | rb_warn4L(l, fmt, a, b, c, d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d)) |
#define | rb_warning0L(l, fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1)) |
#define | rb_warning1L(l, fmt, a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a)) |
#define | rb_warning2L(l, fmt, a, b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b)) |
#define | rb_warning3L(l, fmt, a, b, c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c)) |
#define | rb_warning4L(l, fmt, a, b, c, d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d)) |
#define | WARN_S_L(s, l) s |
#define | WARN_S(s) s |
#define | WARN_I(i) i |
#define | WARN_ID(i) rb_id2name(i) |
#define | PRIsWARN PRIsVALUE |
#define | WARN_ARGS(fmt, n) WARN_ARGS_L(ruby_sourceline,fmt,n) |
#define | WARN_ARGS_L(l, fmt, n) ruby_sourcefile, (l), (fmt) |
#define | WARN_CALL rb_compile_warn |
#define | WARNING_ARGS(fmt, n) WARN_ARGS(fmt,n) |
#define | WARNING_ARGS_L(l, fmt, n) WARN_ARGS_L(l,fmt,n) |
#define | WARNING_CALL rb_compile_warning |
#define | compile_error parser_compile_error |
#define | PARSER_ARG parser, |
#define | token_info_push(token) token_info_push_gen(parser, (token), rb_strlen_lit(token)) |
#define | token_info_pop(token) token_info_pop_gen(parser, (token), rb_strlen_lit(token)) |
#define | YYERROR_VERBOSE 1 |
#define | YYTOKEN_TABLE 0 |
#define | YYSIZE_T unsigned int |
#define | YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
#define | YY_(msgid) msgid |
#define | YYUSE(e) ((void) (e)) |
#define | YYID(n) (n) |
#define | YYSTACK_ALLOC YYMALLOC |
#define | YYSTACK_FREE YYFREE |
#define | YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
#define | YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
#define | YYSTACK_BYTES(N) |
#define | YYCOPY(To, From, Count) |
#define | YYSTACK_RELOCATE(Stack) |
#define | YYFINAL 3 |
#define | YYLAST 11649 |
#define | YYNTOKENS 146 |
#define | YYNNTS 219 |
#define | YYNRULES 645 |
#define | YYNSTATES 1086 |
#define | YYUNDEFTOK 2 |
#define | YYMAXUTOK 352 |
#define | YYTRANSLATE(YYX) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define | YYPACT_NINF -884 |
#define | YYTABLE_NINF -646 |
#define | yyerrok (yyerrstatus = 0) |
#define | yyclearin (yychar = YYEMPTY) |
#define | YYEMPTY (-2) |
#define | YYEOF 0 |
#define | YYACCEPT goto yyacceptlab |
#define | YYABORT goto yyabortlab |
#define | YYERROR goto yyerrorlab |
#define | YYFAIL goto yyerrlab |
#define | YYRECOVERING() (!!yyerrstatus) |
#define | YYBACKUP(Token, Value) |
#define | YYTERROR 1 |
#define | YYERRCODE 256 |
#define | YYRHSLOC(Rhs, K) ((Rhs)[K]) |
#define | YYLLOC_DEFAULT(Current, Rhs, N) |
#define | YYLEX yylex (&yylval, &yylloc, parser) |
#define | YYDPRINTF(Args) |
#define | YY_SYMBOL_PRINT(Title, Type, Value, Location) |
#define | YY_STACK_PRINT(Bottom, Top) |
#define | YY_REDUCE_PRINT(Rule) |
#define | YYINITDEPTH 200 |
#define | YYMAXDEPTH 10000 |
#define | YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) |
#define | yylval (*parser->lval) |
#define | nextc() parser_nextc(parser) |
#define | pushback(c) parser_pushback(parser, (c)) |
#define | newtok() parser_newtok(parser) |
#define | tokspace(n) parser_tokspace(parser, (n)) |
#define | tokadd(c) parser_tokadd(parser, (c)) |
#define | tok_hex(numlen) parser_tok_hex(parser, (numlen)) |
#define | read_escape(flags, e) parser_read_escape(parser, (flags), (e)) |
#define | tokadd_escape(e) parser_tokadd_escape(parser, (e)) |
#define | regx_options() parser_regx_options(parser) |
#define | tokadd_string(f, t, p, n, e) parser_tokadd_string(parser,(f),(t),(p),(n),(e)) |
#define | parse_string(n) parser_parse_string(parser,(n)) |
#define | tokaddmbc(c, enc) parser_tokaddmbc(parser, (c), (enc)) |
#define | here_document(n) parser_here_document(parser,(n)) |
#define | heredoc_identifier() parser_heredoc_identifier(parser) |
#define | heredoc_restore(n) parser_heredoc_restore(parser,(n)) |
#define | whole_match_p(e, l, i) parser_whole_match_p(parser,(e),(l),(i)) |
#define | number_literal_suffix(f) parser_number_literal_suffix(parser, (f)) |
#define | set_number_literal(v, t, f) parser_set_number_literal(parser, (v), (t), (f)) |
#define | set_integer_literal(v, f) parser_set_integer_literal(parser, (v), (f)) |
#define | set_yylval_str(x) (yylval.node = NEW_STR(x)) |
#define | set_yylval_num(x) (yylval.num = (x)) |
#define | set_yylval_id(x) (yylval.id = (x)) |
#define | set_yylval_name(x) (yylval.id = (x)) |
#define | set_yylval_literal(x) (yylval.node = NEW_LIT(x)) |
#define | set_yylval_node(x) (yylval.node = (x)) |
#define | yylval_id() (yylval.id) |
#define | literal_flush(p) (parser->tokp = (p)) |
#define | dispatch_scan_event(t) ((void)0) |
#define | dispatch_delayed_token(t) ((void)0) |
#define | has_delayed_token() (0) |
#define | parser_encoding_name() (current_enc->name) |
#define | parser_mbclen() mbclen((lex_p-1),lex_pend,current_enc) |
#define | is_identchar(p, e, enc) (rb_enc_isalnum((unsigned char)(*(p)),(enc)) || (*(p)) == '_' || !ISASCII(*(p))) |
#define | parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,current_enc)) |
#define | parser_isascii() ISASCII(*(lex_p-1)) |
#define | vtable_alloc(prev) vtable_alloc_gen(parser, __LINE__, prev) |
#define | vtable_free(tbl) vtable_free_gen(parser, __LINE__, #tbl, tbl) |
#define | vtable_add(tbl, id) vtable_add_gen(parser, __LINE__, #tbl, tbl, id) |
#define | vtable_pop(tbl, n) vtable_pop_gen(parser, __LINE__, #tbl, tbl, n) |
#define | RUBY_DTRACE_PARSE_HOOK(name) |
#define | STR_FUNC_ESCAPE 0x01 |
#define | STR_FUNC_EXPAND 0x02 |
#define | STR_FUNC_REGEXP 0x04 |
#define | STR_FUNC_QWORDS 0x08 |
#define | STR_FUNC_SYMBOL 0x10 |
#define | STR_FUNC_INDENT 0x20 |
#define | STR_FUNC_LABEL 0x40 |
#define | STR_FUNC_TERM 0x8000 |
#define | lex_goto_eol(parser) ((parser)->lex.pcur = (parser)->lex.pend) |
#define | lex_eol_p() (lex_p >= lex_pend) |
#define | peek(c) peek_n((c), 0) |
#define | peek_n(c, n) (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n]) |
#define | peekc() peekc_n(0) |
#define | peekc_n(n) (lex_p+(n) < lex_pend ? (unsigned char)lex_p[n] : -1) |
#define | was_bol() (lex_p == lex_pbeg + 1) |
#define | tokfix() (tokenbuf[tokidx]='\0') |
#define | tok() tokenbuf |
#define | toklen() tokidx |
#define | toklast() (tokidx>0?tokenbuf[tokidx-1]:0) |
#define | tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) |
#define | ESCAPE_CONTROL 1 |
#define | ESCAPE_META 2 |
#define | tokadd_mbchar(c) parser_tokadd_mbchar(parser, (c)) |
#define | mixed_error(enc1, enc2) |
#define | mixed_escape(beg, enc1, enc2) |
#define | NEW_STRTERM(func, term, paren) rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) |
#define | flush_string_content(enc) ((void)(enc)) |
#define | BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0) |
#define | SPECIAL_PUNCT(idx) |
#define | IS_ARG() IS_lex_state(EXPR_ARG_ANY) |
#define | IS_END() IS_lex_state(EXPR_END_ANY) |
#define | IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) |
#define | IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c)) |
#define | IS_LABEL_POSSIBLE() |
#define | IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1)) |
#define | IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT) |
#define | unterminated_literal(mesg) yyerror0(mesg) |
#define | NUM_SUFFIX_R (1<<0) |
#define | NUM_SUFFIX_I (1<<1) |
#define | NUM_SUFFIX_ALL 3 |
#define | dispatch_heredoc_end() ((void)0) |
#define | arg_ambiguous(c) (arg_ambiguous_gen(parser, (c)), 1) |
#define | str_copy(_s, _p, _n) |
#define | ambiguous_operator(tok, op, syn) |
#define | warn_balanced(tok, op, syn) |
#define | no_digits() do {yyerror0("numeric literal without digits"); return 0;} while (0) |
#define | LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1)) |
#define | parser_warning(node, mesg) parser_warning(parser, (node), (mesg)) |
#define | parser_warn(node, mesg) parser_warn(parser, (node), (mesg)) |
#define | assignable_result(x) assignable_result0(x, column) |
#define | subnodes(n1, n2) |
#define | HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE)) |
#define | NEWHEAP() (rb_imemo_alloc_t *)rb_imemo_new(imemo_alloc, 0, (VALUE)parser->heap, 0, 0) |
#define | ADD2HEAP(n, c, p) |
Typedefs | |
typedef VALUE | stack_type |
typedef struct token_info | token_info |
typedef unsigned char | yytype_uint8 |
typedef short int | yytype_int8 |
typedef unsigned short int | yytype_uint16 |
typedef short int | yytype_int16 |
typedef long(* | rb_magic_comment_length_t) (struct parser_params *parser, const char *name, long len) |
typedef void(* | rb_magic_comment_setter_t) (struct parser_params *parser, const char *name, const char *val) |
Variables | |
RUBY_FUNC_EXPORTED const unsigned int | ruby_global_name_punct_bits [(0x7e - 0x20+31)/32] |
const char | rb_parser_lex_state_names [][13] |
#define ADD2HEAP | ( | n, | |
c, | |||
p | |||
) |
Definition at line 17470 of file ripper.c.
Referenced by rb_parser_calloc(), rb_parser_malloc(), and rb_parser_realloc().
#define ambiguous_operator | ( | tok, | |
op, | |||
syn | |||
) |
#define arg_ambiguous | ( | c | ) | (arg_ambiguous_gen(parser, (c)), 1) |
#define arg_append | ( | h, | |
t, | |||
column | |||
) | arg_append_gen(parser,(h),(t),(column)) |
#define arg_concat | ( | h, | |
t, | |||
column | |||
) | arg_concat_gen(parser,(h),(t),(column)) |
#define aryset | ( | node1, | |
node2, | |||
column | |||
) | aryset_gen(parser, (node1), (node2), (column)) |
#define assignable_result | ( | x | ) | assignable_result0(x, column) |
#define backref_assign_error | ( | n, | |
a, | |||
column | |||
) | (rb_backref_error(n), new_begin(0, column)) |
#define BIT | ( | c, | |
idx | |||
) | (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0) |
#define BITSTACK_LEXPOP | ( | stack | ) | (((stack) = ((stack) >> 1) | ((stack) & 1)), SHOW_BITSTACK(stack, #stack"(lexpop)")) |
#define BITSTACK_POP | ( | stack | ) | (((stack) = (stack) >> 1), SHOW_BITSTACK(stack, #stack"(pop)")) |
#define BITSTACK_PUSH | ( | stack, | |
n | |||
) | (((stack) = ((stack)<<1)|((n)&1)), SHOW_BITSTACK(stack, #stack"(push)")) |
#define BITSTACK_SET | ( | stack, | |
n | |||
) | ((stack)=(n), SHOW_BITSTACK(stack, #stack"(set)")) |
#define BITSTACK_SET_P | ( | stack | ) | (SHOW_BITSTACK(stack, #stack), (stack)&1) |
#define block_append | ( | h, | |
t, | |||
column | |||
) | block_append_gen(parser,(h),(t),(column)) |
Definition at line 683 of file ripper.c.
Referenced by rb_parser_append_print(), rb_parser_while_loop(), and yyparse().
#define block_dup_check | ( | n1, | |
n2 | |||
) | block_dup_check_gen(parser,(n1),(n2)) |
#define calloc YYCALLOC |
Definition at line 360 of file ripper.c.
Referenced by compat_init_setproctitle(), Init_Method(), and rb_objspace_alloc().
#define CMDARG_LEXPOP | ( | ) | BITSTACK_LEXPOP(cmdarg_stack) |
#define CMDARG_P | ( | ) | BITSTACK_SET_P(cmdarg_stack) |
#define CMDARG_POP | ( | ) | BITSTACK_POP(cmdarg_stack) |
#define CMDARG_PUSH | ( | n | ) | BITSTACK_PUSH(cmdarg_stack, (n)) |
#define CMDARG_SET | ( | n | ) | BITSTACK_SET(cmdarg_stack, (n)) |
#define compile_for_eval (parser->base_block != 0 && !in_main) |
#define cond | ( | node, | |
column | |||
) | cond_gen(parser, (node), FALSE, column) |
#define COND_LEXPOP | ( | ) | BITSTACK_LEXPOP(cond_stack) |
#define COND_P | ( | ) | BITSTACK_SET_P(cond_stack) |
#define COND_POP | ( | ) | BITSTACK_POP(cond_stack) |
#define COND_PUSH | ( | n | ) | BITSTACK_PUSH(cond_stack, (n)) |
#define COND_SET | ( | n | ) | BITSTACK_SET(cond_stack, (n)) |
#define const_decl | ( | path, | |
column | |||
) | const_decl_gen(parser, path, column) |
#define const_path_field | ( | w, | |
n, | |||
column | |||
) | const_path_field_gen(parser, w, n, column) |
#define current_enc (parser->enc) |
Definition at line 605 of file ripper.c.
Referenced by rb_parser_encoding(), and rb_reg_fragment_setenc().
#define dsym_node | ( | node, | |
column | |||
) | dsym_node_gen(parser, (node), (column)) |
#define evstr2dstr | ( | n, | |
column | |||
) | evstr2dstr_gen(parser,(n),(column)) |
Definition at line 17468 of file ripper.c.
Referenced by rb_parser_calloc(), rb_parser_malloc(), and rb_parser_realloc().
#define here_document | ( | n | ) | parser_here_document(parser,(n)) |
#define heredoc_dedent | ( | str | ) | parser_heredoc_dedent(parser, (str)) |
#define heredoc_identifier | ( | ) | parser_heredoc_identifier(parser) |
#define heredoc_restore | ( | n | ) | parser_heredoc_restore(parser,(n)) |
#define in_main (parser->in_main) |
Definition at line 582 of file ripper.c.
Referenced by rb_parser_set_context(), and yyparse().
#define intern_cstr | ( | n, | |
l, | |||
en | |||
) | rb_intern3(n,l,en) |
#define IS_AFTER_OPERATOR | ( | ) | IS_lex_state(EXPR_FNAME | EXPR_DOT) |
#define IS_ARG | ( | ) | IS_lex_state(EXPR_ARG_ANY) |
#define IS_BEG | ( | ) | (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) |
#define IS_END | ( | ) | IS_lex_state(EXPR_END_ANY) |
#define is_identchar | ( | p, | |
e, | |||
enc | |||
) | (rb_enc_isalnum((unsigned char)(*(p)),(enc)) || (*(p)) == '_' || !ISASCII(*(p))) |
#define IS_LABEL_POSSIBLE | ( | ) |
#define IS_lex_state | ( | ls | ) | IS_lex_state_for(lex_state, (ls)) |
#define IS_lex_state_all | ( | ls | ) | IS_lex_state_all_for(lex_state, (ls)) |
#define IS_lex_state_all_for | ( | x, | |
ls | |||
) | (((x) & (ls)) == (ls)) |
#define keyword__ENCODING__ 306 |
Definition at line 238 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword__FILE__ 305 |
Definition at line 237 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword__LINE__ 304 |
Definition at line 236 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_alias 300 |
Definition at line 232 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_and 292 |
Definition at line 224 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_begin 262 |
Definition at line 194 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_BEGIN 302 |
Definition at line 234 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_break 276 |
Definition at line 208 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_case 271 |
Definition at line 203 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_class 258 |
Definition at line 190 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_def 260 |
Definition at line 192 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_defined 301 |
Definition at line 233 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_do 281 |
Definition at line 213 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_else 270 |
Definition at line 202 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_elsif 269 |
Definition at line 201 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_end 265 |
Definition at line 197 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_END 303 |
Definition at line 235 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_ensure 264 |
Definition at line 196 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_false 291 |
Definition at line 223 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_for 275 |
Definition at line 207 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_if 266 |
Definition at line 198 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_in 280 |
Definition at line 212 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_module 259 |
Definition at line 191 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_next 277 |
Definition at line 209 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_nil 289 |
Definition at line 221 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_not 294 |
Definition at line 226 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_or 293 |
Definition at line 225 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_redo 278 |
Definition at line 210 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_rescue 263 |
Definition at line 195 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_retry 279 |
Definition at line 211 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_return 285 |
Definition at line 217 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_self 288 |
Definition at line 220 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_super 287 |
Definition at line 219 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_then 268 |
Definition at line 200 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_true 290 |
Definition at line 222 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_undef 261 |
Definition at line 193 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_unless 267 |
Definition at line 199 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_until 274 |
Definition at line 206 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_when 272 |
Definition at line 204 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_while 273 |
Definition at line 205 of file ripper.c.
Referenced by rb_reserved_word().
#define keyword_yield 286 |
Definition at line 218 of file ripper.c.
Referenced by rb_reserved_word().
#define lambda_beginning_p | ( | ) | (lpar_beg && lpar_beg == paren_nest) |
#define lex_gets (parser->lex.gets) |
Definition at line 599 of file ripper.c.
Referenced by rb_parser_compile_file_path().
#define lex_goto_eol | ( | parser | ) | ((parser)->lex.pcur = (parser)->lex.pend) |
#define list_append | ( | l, | |
i, | |||
column | |||
) | list_append_gen(parser,(l),(i),(column)) |
#define literal_concat | ( | h, | |
t, | |||
column | |||
) | literal_concat_gen(parser,(h),(t),(column)) |
#define local_pop | ( | ) | local_pop_gen(parser) |
#define logop | ( | id, | |
node1, | |||
node2, | |||
column | |||
) |
#define malloc YYMALLOC |
Definition at line 358 of file ripper.c.
Referenced by rb_w32_conv_from_wstr(), rb_w32_get_environ(), rb_w32_mbstr_to_wstr(), rb_w32_wstr_to_mbstr(), ruby_mimmalloc(), ruby_setenv(), sdbm_open(), sdbm_prep(), sip_hash_final(), and sip_hash_new().
#define match_op | ( | node1, | |
node2, | |||
column | |||
) | match_op_gen(parser, (node1), (node2), (column)) |
#define method_add_block | ( | m, | |
b | |||
) | method_add_block_gen(parser, m, b) |
#define method_cond | ( | node, | |
column | |||
) | cond_gen(parser, (node), TRUE, column) |
#define mixed_error | ( | enc1, | |
enc2 | |||
) |
#define mixed_escape | ( | beg, | |
enc1, | |||
enc2 | |||
) |
#define modifier_if 295 |
Definition at line 227 of file ripper.c.
Referenced by rb_reserved_word().
#define modifier_rescue 299 |
Definition at line 231 of file ripper.c.
Referenced by rb_reserved_word().
#define modifier_unless 296 |
Definition at line 228 of file ripper.c.
Referenced by rb_reserved_word().
#define modifier_until 298 |
Definition at line 230 of file ripper.c.
Referenced by rb_reserved_word().
#define modifier_while 297 |
Definition at line 229 of file ripper.c.
Referenced by rb_reserved_word().
#define nd_term | ( | node | ) | SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) |
#define new_args_tail | ( | k, | |
kr, | |||
b, | |||
column | |||
) | new_args_tail_gen(parser, (k),(kr),(b),(column)) |
#define new_attr_op_assign | ( | lhs, | |
type, | |||
attr, | |||
op, | |||
rhs, | |||
column | |||
) | new_attr_op_assign_gen(parser, (lhs), (type), (attr), (op), (rhs), (column)) |
#define new_begin | ( | b, | |
column | |||
) | new_begin_gen(parser,b,column) |
#define new_brace_body | ( | param, | |
stmt, | |||
column | |||
) | new_body_gen(parser, param, stmt, column) |
#define new_call | ( | recv, | |
mid, | |||
args, | |||
column | |||
) | new_call_gen(parser, recv,mid,args,column) |
Definition at line 790 of file ripper.c.
Referenced by rb_parser_while_loop().
#define new_command_qcall | ( | q, | |
r, | |||
m, | |||
a, | |||
column | |||
) | new_qcall_gen(parser,q,r,m,a,column) |
#define new_const_op_assign | ( | lhs, | |
op, | |||
rhs, | |||
column | |||
) | new_const_op_assign_gen(parser, (lhs), (op), (rhs), (column)) |
#define new_defined | ( | expr, | |
column | |||
) | new_defined_gen(parser, expr, column) |
#define new_do_body | ( | param, | |
stmt, | |||
column | |||
) | new_body_gen(parser, param, stmt, column) |
#define new_dstr | ( | s, | |
column | |||
) | new_dstr_gen(parser, s, column) |
#define new_errinfo | ( | column | ) | new_errinfo_gen(parser, column) |
#define new_evstr | ( | n, | |
column | |||
) | new_evstr_gen(parser,(n),(column)) |
#define new_fcall | ( | mid, | |
args, | |||
column | |||
) | new_fcall_gen(parser, mid, args, column) |
Definition at line 793 of file ripper.c.
Referenced by rb_parser_append_print().
#define new_for | ( | var, | |
iter, | |||
body, | |||
column | |||
) | new_for_gen(parser, var, iter, body, column) |
Definition at line 799 of file ripper.c.
Referenced by rb_parser_append_print(), and rb_parser_while_loop().
#define new_hash | ( | hash, | |
column | |||
) | new_hash_gen(parser, (hash), column) |
#define new_if | ( | cc, | |
left, | |||
right, | |||
column | |||
) | new_if_gen(parser, (cc), (left), (right), (column)) |
#define new_kw_arg | ( | k, | |
column | |||
) | new_kw_arg_gen(parser, k, column) |
#define new_list | ( | item, | |
column | |||
) | new_list_gen(parser, item, column) |
#define new_masgn | ( | l, | |
r, | |||
column | |||
) | new_masgn_gen(parser,l,r,column) |
#define new_op_assign | ( | lhs, | |
op, | |||
rhs, | |||
column | |||
) | new_op_assign_gen(parser, (lhs), (op), (rhs), (column)) |
#define new_postarg | ( | i, | |
v, | |||
column | |||
) | new_postarg_gen(parser,i,v,column) |
#define NEW_QCALL | ( | q, | |
r, | |||
m, | |||
a | |||
) | NEW_NODE(NODE_CALL_Q(q),r,m,a) |
#define new_qcall | ( | q, | |
r, | |||
m, | |||
a, | |||
column | |||
) | new_qcall_gen(parser,q,r,m,a,column) |
#define new_regexp | ( | node, | |
opt, | |||
column | |||
) | new_regexp_gen(parser, node, opt, column) |
#define new_resbody | ( | e, | |
s, | |||
r, | |||
column | |||
) | new_resbody_gen(parser, (e),(s),(r),(column)) |
#define new_rescue | ( | b, | |
res, | |||
e, | |||
column | |||
) | new_rescue_gen(parser,b,res,e,column) |
#define new_scope | ( | a, | |
b, | |||
column | |||
) | new_scope_gen(parser,a,b,column) |
#define new_str | ( | s, | |
column | |||
) | new_str_gen(parser, s, column) |
#define NEW_STRTERM | ( | func, | |
term, | |||
paren | |||
) | rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) |
#define new_undef | ( | i, | |
column | |||
) | new_undef_gen(parser, i, column) |
#define new_unless | ( | cc, | |
left, | |||
right, | |||
column | |||
) | new_unless_gen(parser, (cc), (left), (right), (column)) |
#define new_xstring | ( | node, | |
column | |||
) | new_xstring_gen(parser, node, column) |
#define new_yield | ( | node, | |
column | |||
) | new_yield_gen(parser, (node), (column)) |
#define new_zarray | ( | column | ) | new_zarray_gen(parser, column) |
#define NEWHEAP | ( | ) | (rb_imemo_alloc_t *)rb_imemo_new(imemo_alloc, 0, (VALUE)parser->heap, 0, 0) |
Definition at line 17469 of file ripper.c.
Referenced by rb_parser_calloc(), rb_parser_malloc(), and rb_parser_realloc().
#define no_digits | ( | ) | do {yyerror0("numeric literal without digits"); return 0;} while (0) |
#define node_assign | ( | node1, | |
node2, | |||
column | |||
) | node_assign_gen(parser, (node1), (node2), (column)) |
#define NODE_CALL_Q | ( | q | ) | (CALL_Q_P(q) ? NODE_QCALL : NODE_CALL) |
#define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ |
#define NODE_STRTERM NODE_ZARRAY /* nothing to gc */ |
#define parse_string | ( | n | ) | parser_parse_string(parser,(n)) |
#define parser_encoding_name | ( | ) | (current_enc->name) |
#define parser_is_identchar | ( | ) | (!parser->eofp && is_identchar((lex_p-1),lex_pend,current_enc)) |
#define parser_mbclen | ( | ) | mbclen((lex_p-1),lex_pend,current_enc) |
#define parser_warn | ( | node, | |
mesg | |||
) | parser_warn(parser, (node), (mesg)) |
#define parser_warning | ( | node, | |
mesg | |||
) | parser_warning(parser, (node), (mesg)) |
#define rb_backref_error | ( | n | ) | rb_backref_error_gen(parser,(n)) |
#define rb_node_newnode | ( | type, | |
a1, | |||
a2, | |||
a3 | |||
) | node_newnode(parser, (type), (a1), (a2), (a3)) |
#define rb_warn0L | ( | l, | |
fmt | |||
) | WARN_CALL(WARN_ARGS_L(l, fmt, 1)) |
#define rb_warn1L | ( | l, | |
fmt, | |||
a | |||
) | WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a)) |
#define rb_warn2L | ( | l, | |
fmt, | |||
a, | |||
b | |||
) | WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b)) |
#define rb_warn3L | ( | l, | |
fmt, | |||
a, | |||
b, | |||
c | |||
) | WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c)) |
#define rb_warn4L | ( | l, | |
fmt, | |||
a, | |||
b, | |||
c, | |||
d | |||
) | WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d)) |
#define rb_warning0 | ( | fmt | ) | WARNING_CALL(WARNING_ARGS(fmt, 1)) |
#define rb_warning0L | ( | l, | |
fmt | |||
) | WARNING_CALL(WARNING_ARGS_L(l, fmt, 1)) |
#define rb_warning1 | ( | fmt, | |
a | |||
) | WARNING_CALL(WARNING_ARGS(fmt, 2), (a)) |
#define rb_warning1L | ( | l, | |
fmt, | |||
a | |||
) | WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a)) |
#define rb_warning2 | ( | fmt, | |
a, | |||
b | |||
) | WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b)) |
#define rb_warning2L | ( | l, | |
fmt, | |||
a, | |||
b | |||
) | WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b)) |
#define rb_warning3 | ( | fmt, | |
a, | |||
b, | |||
c | |||
) | WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c)) |
#define rb_warning3L | ( | l, | |
fmt, | |||
a, | |||
b, | |||
c | |||
) | WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c)) |
#define rb_warning4 | ( | fmt, | |
a, | |||
b, | |||
c, | |||
d | |||
) | WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d)) |
#define rb_warning4L | ( | l, | |
fmt, | |||
a, | |||
b, | |||
c, | |||
d | |||
) | WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d)) |
#define RE_OPTION_ENCODING | ( | e | ) | (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT) |
#define RE_OPTION_ENCODING_IDX | ( | o | ) | (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff) |
Definition at line 994 of file ripper.c.
Referenced by rb_reg_fragment_setenc().
#define RE_OPTION_ENCODING_NONE | ( | o | ) | ((o)&RE_OPTION_ARG_ENCODING_NONE) |
Definition at line 995 of file ripper.c.
Referenced by rb_reg_fragment_setenc().
#define RE_OPTION_MASK 0xff |
Definition at line 996 of file ripper.c.
Referenced by rb_parser_reg_compile().
#define read_escape | ( | flags, | |
e | |||
) | parser_read_escape(parser, (flags), (e)) |
#define reg_compile | ( | str, | |
options | |||
) | reg_compile_gen(parser, (str), (options)) |
#define reg_fragment_check | ( | str, | |
options | |||
) | reg_fragment_check_gen(parser, (str), (options)) |
#define reg_fragment_setenc | ( | str, | |
options | |||
) | reg_fragment_setenc_gen(parser, (str), (options)) |
#define reg_named_capture_assign | ( | regexp, | |
column | |||
) | reg_named_capture_assign_gen(parser,(regexp),column) |
#define ruby__end__seen (parser->ruby__end__seen) |
Definition at line 601 of file ripper.c.
Referenced by rb_parser_end_seen_p().
#define ruby_eval_tree (parser->eval_tree) |
#define ruby_sourcefile (parser->ruby_sourcefile) |
Definition at line 603 of file ripper.c.
Referenced by rb_parser_reg_compile().
#define ruby_sourcefile_string (parser->ruby_sourcefile_string) |
#define ruby_sourceline (parser->ruby_sourceline) |
Definition at line 602 of file ripper.c.
Referenced by rb_parser_reg_compile().
#define SET_LEX_STATE | ( | ls | ) |
#define set_yylval_literal | ( | x | ) | (yylval.node = NEW_LIT(x)) |
#define SHOW_BITSTACK | ( | stack, | |
name | |||
) | (yydebug ? rb_parser_show_bitstack(parser, stack, name, __LINE__) : (void)0) |
#define SIGN_EXTEND | ( | x, | |
n | |||
) | (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) |
#define SPECIAL_PUNCT | ( | idx | ) |
#define str_copy | ( | _s, | |
_p, | |||
_n | |||
) |
#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 subnodes | ( | n1, | |
n2 | |||
) |
#define tAREF 143 |
Definition at line 270 of file ripper.c.
Referenced by rb_id_attrset().
#define tASET 144 |
Definition at line 271 of file ripper.c.
Referenced by rb_id_attrset().
#define tok_hex | ( | numlen | ) | parser_tok_hex(parser, (numlen)) |
#define TOK_INTERN | ( | ) | intern_cstr(tok(), toklen(), current_enc) |
#define tokadd_escape | ( | e | ) | parser_tokadd_escape(parser, (e)) |
#define tokadd_mbchar | ( | c | ) | parser_tokadd_mbchar(parser, (c)) |
#define tokaddmbc | ( | c, | |
enc | |||
) | parser_tokaddmbc(parser, (c), (enc)) |
#define TOKEN2ID | ( | tok | ) |
#define token_info_pop | ( | token | ) | token_info_pop_gen(parser, (token), rb_strlen_lit(token)) |
#define token_info_push | ( | token | ) | token_info_push_gen(parser, (token), rb_strlen_lit(token)) |
#define top_const_field | ( | n | ) | NEW_COLON3(n) |
#define unterminated_literal | ( | mesg | ) | yyerror0(mesg) |
#define value_expr | ( | node | ) | value_expr_gen(parser, (node) = remove_begin(node)) |
#define void_expr | ( | node | ) | void_expr0((node) = remove_begin(node)) |
#define void_stmts | ( | node | ) | void_stmts_gen(parser, (node)) |
#define vtable_alloc | ( | prev | ) | vtable_alloc_gen(parser, __LINE__, prev) |
#define vtable_free | ( | tbl | ) | vtable_free_gen(parser, __LINE__, #tbl, tbl) |
#define vtable_pop | ( | tbl, | |
n | |||
) | vtable_pop_gen(parser, __LINE__, #tbl, tbl, n) |
#define WARN_ARGS | ( | fmt, | |
n | |||
) | WARN_ARGS_L(ruby_sourceline,fmt,n) |
#define WARN_ARGS_L | ( | l, | |
fmt, | |||
n | |||
) | ruby_sourcefile, (l), (fmt) |
#define warn_balanced | ( | tok, | |
op, | |||
syn | |||
) |
#define WARN_CALL rb_compile_warn |
#define WARN_ID | ( | i | ) | rb_id2name(i) |
#define WARNING_ARGS_L | ( | l, | |
fmt, | |||
n | |||
) | WARN_ARGS_L(l,fmt,n) |
#define WARNING_CALL rb_compile_warning |
#define whole_match_p | ( | e, | |
l, | |||
i | |||
) | parser_whole_match_p(parser,(e),(l),(i)) |
#define YY_LOCATION_PRINT | ( | File, | |
Loc | |||
) |
#define YY_REDUCE_PRINT | ( | Rule | ) |
#define YY_STACK_PRINT | ( | Bottom, | |
Top | |||
) |
#define YY_SYMBOL_PRINT | ( | Title, | |
Type, | |||
Value, | |||
Location | |||
) |
#define YYACCEPT goto yyacceptlab |
#define YYBACKUP | ( | Token, | |
Value | |||
) |
#define YYCALLOC | ( | nelem, | |
size | |||
) | rb_parser_calloc(parser, (nelem), (size)) |
#define YYCOPY | ( | To, | |
From, | |||
Count | |||
) |
#define YYDPRINTF | ( | Args | ) |
#define YYFPRINTF rb_parser_printf |
#define YYFREE | ( | ptr | ) | rb_parser_free(parser, (ptr)) |
#define YYLEX yylex (&yylval, &yylloc, parser) |
#define YYLLOC_DEFAULT | ( | Current, | |
Rhs, | |||
N | |||
) |
Definition at line 4896 of file ripper.c.
Referenced by yyparse().
#define YYMALLOC | ( | size | ) | rb_parser_malloc(parser, (size)) |
#define YYREALLOC | ( | ptr, | |
size | |||
) | rb_parser_realloc(parser, (ptr), (size)) |
#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
#define YYSTACK_BYTES | ( | N | ) |
Definition at line 1426 of file ripper.c.
Referenced by yyparse().
#define YYSTACK_RELOCATE | ( | Stack | ) |
Definition at line 1453 of file ripper.c.
Referenced by yyparse().
#define YYTRANSLATE | ( | YYX | ) | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
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) |
typedef VALUE stack_type |
typedef struct token_info token_info |
typedef short int yytype_int16 |
typedef short int yytype_int8 |
typedef unsigned short int yytype_uint16 |
typedef unsigned char yytype_uint8 |
enum lex_state_bits |
enum lex_state_e |
enum string_type |
enum yytokentype |
PRINTF_ARGS | ( | void | rb_parser_fatalstruct parser_params *parser, const char *fmt,..., |
2 | , | ||
3 | |||
) |
PRINTF_ARGS | ( | static void | parser_compile_errorstruct parser_params *, const char *fmt,..., |
2 | , | ||
3 | |||
) |
void* rb_parser_calloc | ( | struct parser_params * | parser, |
size_t | nelem, | ||
size_t | size | ||
) |
Definition at line 11577 of file ripper.c.
Referenced by rb_compile_file().
Definition at line 11583 of file ripper.c.
Referenced by rb_parser_compile_file().
Definition at line 11540 of file ripper.c.
Referenced by rb_parser_compile_string().
void rb_parser_fatal | ( | struct parser_params * | parser, |
const char * | fmt, | ||
... | |||
) |
Definition at line 15600 of file ripper.c.
References rb_str_new_cstr(), and rb_str_vcatf().
void rb_parser_free | ( | struct parser_params * | parser, |
void * | ptr | ||
) |
VALUE rb_parser_lex_state_name | ( | enum lex_state_e | state | ) |
void* rb_parser_malloc | ( | struct parser_params * | parser, |
size_t | size | ||
) |
VALUE rb_parser_new | ( | void | ) |
Definition at line 17357 of file ripper.c.
Referenced by rb_compile_file(), and rb_load_file_str().
void rb_parser_printf | ( | struct parser_params * | parser, |
const char * | fmt, | ||
... | |||
) |
void* rb_parser_realloc | ( | struct parser_params * | parser, |
void * | ptr, | ||
size_t | size | ||
) |
VALUE rb_parser_reg_compile | ( | struct parser_params * | parser, |
VALUE | str, | ||
int | options | ||
) |
Definition at line 17112 of file ripper.c.
References rb_reg_compile(), RE_OPTION_MASK, ruby_sourcefile, and ruby_sourceline.
void rb_parser_show_bitstack | ( | struct parser_params * | parser, |
stack_type | stack, | ||
const char * | name, | ||
int | line | ||
) |
Definition at line 15590 of file ripper.c.
References rb_sprintf().
enum lex_state_e rb_parser_trace_lex_state | ( | struct parser_params * | parser, |
enum lex_state_e | from, | ||
enum lex_state_e | to, | ||
int | line | ||
) |
Definition at line 15557 of file ripper.c.
References rb_str_new_cstr().
int rb_reg_fragment_setenc | ( | struct parser_params * | parser, |
VALUE | str, | ||
int | options | ||
) |
Definition at line 16999 of file ripper.c.
References current_enc, ENC_CODERANGE_7BIT, ENCODING_GET, ENCODING_IS_ASCII8BIT, ENCODING_SET, rb_ascii8bit_encoding(), rb_char_to_option_kcode(), rb_enc_associate(), rb_enc_str_coderange(), rb_usascii_encoding(), RE_OPTION_ENCODING_IDX, and RE_OPTION_ENCODING_NONE.
int yyparse | ( | ) |
int yyparse | ( | struct parser_params * | parser | ) |
Definition at line 5420 of file ripper.c.
References block_append, compile_for_eval, YYLTYPE::first_column, YYLTYPE::first_line, in_main, YYLTYPE::last_column, YYLTYPE::last_line, local_pop, local_push, nd_type, new_begin, new_scope, NODE_BLOCK, ruby_eval_tree, SET_LEX_STATE, YYSTYPE::val, val, void_expr, void_stmts, YY_, YY_REDUCE_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, YYDPRINTF, YYEMPTY, YYEOF, YYFINAL, YYINITDEPTH, YYLAST, YYLEX, YYLLOC_DEFAULT, yylval, YYMAXDEPTH, YYPACT_NINF, YYSIZE_T, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, YYTABLE_NINF, and YYTRANSLATE.
const char rb_parser_lex_state_names[][13] |
const unsigned int ruby_global_name_punct_bits |