Ruby
2.1.10p492(2016-04-01revision54464)
|
#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 | timespec |
struct | timezone |
struct | RBasic |
struct | RObject |
struct | RClass |
struct | RFloat |
struct | RString |
struct | RArray |
struct | RRegexp |
struct | RHash |
struct | RFile |
struct | RRational |
struct | RComplex |
struct | RData |
struct | rb_data_type_struct |
struct | RTypedData |
struct | RStruct |
struct | RBignum |
struct | st_hash_type |
struct | st_table |
struct | rb_exec_arg |
struct | OnigCaseFoldCodeItem |
struct | OnigMetaCharTableType |
struct | OnigEncodingTypeST |
struct | OnigSyntaxType |
struct | OnigCaptureTreeNodeStruct |
struct | re_registers |
struct | OnigErrorInfo |
struct | OnigRepeatRange |
struct | re_pattern_buffer |
struct | OnigCompileInfo |
struct | rb_deprecated_classext_struct |
struct | rb_subclass_entry |
struct | rb_classext_struct |
struct | method_table_wrapper |
struct | RBasicRaw |
struct | rb_execarg |
struct | RNode |
struct | rb_global_entry |
struct | rb_args_info |
struct | OnigPairCaseFoldCodes |
struct | PosixBracketEntryType |
struct | vtable |
struct | local_vars |
struct | token_info |
struct | parser_params |
Variables | |
RUBY_SYMBOL_EXPORT_BEGIN typedef unsigned long | st_data_t |
primary_value['opt_call_args rbracket{$$=dispatch2(aref_field, $1, escape_Qundef($3));}|primary_value '.'tIDENTIFIER{$$=dispatch3(field, $1, ripper_id2sym('.'), $3);}|primary_value tCOLON2 tIDENTIFIER{$$=dispatch2(const_path_field, $1, $3);}|primary_value '.'tCONSTANT{$$=dispatch3(field, $1, ripper_id2sym('.'), $3);}|primary_value tCOLON2 tCONSTANT{yyerror("dynamic constant assignment");$$=dispatch2(const_path_field, $1, $3);}|tCOLON3 tCONSTANT{$$=dispatch1(top_const_field, $2);}|backref{$$=dispatch1(var_field, $1);$$=dispatch1(assign_error,$$);};lhs:user_variable{$$=assignable($1, 0);$$=dispatch1(var_field,$$);}|keyword_variable{$$=assignable($1, 0);$$=dispatch1(var_field,$$);}|primary_value '['opt_call_args rbracket{$$=dispatch2(aref_field, $1, escape_Qundef($3));}|primary_value '.'tIDENTIFIER{$$=dispatch3(field, $1, ripper_id2sym('.'), $3);}|primary_value tCOLON2 tIDENTIFIER{$$=dispatch3(field, $1, ripper_intern("::"), $3);}|primary_value '.'tCONSTANT{$$=dispatch3(field, $1, ripper_id2sym('.'), $3);}|primary_value tCOLON2 tCONSTANT{$$=dispatch2(const_path_field, $1, $3);if(in_def||in_single){$$=dispatch1(assign_error,$$);}}|tCOLON3 tCONSTANT{$$=dispatch1(top_const_field, $2);if(in_def||in_single){$$=dispatch1(assign_error,$$);}}|backref{$$=dispatch1(assign_error, $1);};cname:tIDENTIFIER{$$=dispatch1(class_name_error, $1);}|tCONSTANT;cpath:tCOLON3 cname{$$=dispatch1(top_const_ref, $2);}|cname{$$=dispatch1(const_ref, $1);}|primary_value tCOLON2 cname{$$=dispatch2(const_path_ref, $1, $3);};fname:tIDENTIFIER|tCONSTANT|tFID|op{lex_state=EXPR_ENDFN;$$=$1;}|reswords{lex_state=EXPR_ENDFN;$$=$1;};fsym:fname|symbol;fitem:fsym{$$=dispatch1(symbol_literal, $1);}|dsym;undef_list:fitem{$$=rb_ary_new3(1, $1);}|undef_list ','{lex_state=EXPR_FNAME;}fitem{rb_ary_push($1, $4);};op: '|'{ifndef_ripper($$= '|');}| '^'{ifndef_ripper($$= '^');}| '&'{ifndef_ripper($$= '&');}|tCMP{ifndef_ripper($$=tCMP);}|tEQ{ifndef_ripper($$=tEQ);}|tEQQ{ifndef_ripper($$=tEQQ);}|tMATCH{ifndef_ripper($$=tMATCH);}|tNMATCH{ifndef_ripper($$=tNMATCH);}| '> '{ifndef_ripper($$= '> ');}|tGEQ{ifndef_ripper($$=tGEQ);}| ' <'{ifndef_ripper($$= ' <');}|tLEQ{ifndef_ripper($$=tLEQ);}|tNEQ{ifndef_ripper($$=tNEQ);}|tLSHFT{ifndef_ripper($$=tLSHFT);}|tRSHFT{ifndef_ripper($$=tRSHFT);}| '+'{ifndef_ripper($$= '+');}| '-'{ifndef_ripper($$= '-');}| '*'{ifndef_ripper($$= '*');}|tSTAR{ifndef_ripper($$= '*');}| '/'{ifndef_ripper($$= '/');}| '%'{ifndef_ripper($$= '%');}|tPOW{ifndef_ripper($$=tPOW);}|tDSTAR{ifndef_ripper($$=tDSTAR);}| '!'{ifndef_ripper($$= '!');}| '~'{ifndef_ripper($$= '~');}|tUPLUS{ifndef_ripper($$=tUPLUS);}|tUMINUS{ifndef_ripper($$=tUMINUS);}|tAREF{ifndef_ripper($$=tAREF);}|tASET{ifndef_ripper($$=tASET);}| '`'{ifndef_ripper($$= '`');};reswords:keyword__LINE__|keyword__FILE__|keyword__ENCODING__|keyword_BEGIN|keyword_END|keyword_alias|keyword_and|keyword_begin|keyword_break|keyword_case|keyword_class|keyword_def|keyword_defined|keyword_do|keyword_else|keyword_elsif|keyword_end|keyword_ensure|keyword_false|keyword_for|keyword_in|keyword_module|keyword_next|keyword_nil|keyword_not|keyword_or|keyword_redo|keyword_rescue|keyword_retry|keyword_return|keyword_self|keyword_super|keyword_then|keyword_true|keyword_undef|keyword_when|keyword_yield|keyword_if|keyword_unless|keyword_while|keyword_until;arg:lhs '='arg{$$=dispatch2(assign, $1, $3);}|lhs '='arg modifier_rescue arg{$$=dispatch2(assign, $1, dispatch2(rescue_mod, $3, $5));}|var_lhs tOP_ASGN arg{value_expr($3);$$=new_op_assign($1, $2, $3);}|var_lhs tOP_ASGN arg modifier_rescue arg{$3=dispatch2(rescue_mod, $3, $5);$$=new_op_assign($1, $2, $3);}|primary_value '['opt_call_args rbracket tOP_ASGN arg{$1=dispatch2(aref_field, $1, escape_Qundef($3));$$=dispatch3(opassign, $1, $5, $6);}|primary_value '.'tIDENTIFIER tOP_ASGN arg{value_expr($5);$$=new_attr_op_assign($1, ripper_id2sym('.'), $3, $4, $5);}|primary_value '.'tCONSTANT tOP_ASGN arg{value_expr($5);$$=new_attr_op_assign($1, ripper_id2sym('.'), $3, $4, $5);}|primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg{value_expr($5);$$=new_attr_op_assign($1, ripper_intern("::"), $3, $4, $5);}|primary_value tCOLON2 tCONSTANT tOP_ASGN arg{$$=dispatch2(const_path_field, $1, $3);$$=dispatch3(opassign,$$, $4, $5);}|tCOLON3 tCONSTANT tOP_ASGN arg{$$=dispatch1(top_const_field, $2);$$=dispatch3(opassign,$$, $3, $4);}|backref tOP_ASGN arg{$$=dispatch1(var_field, $1);$$=dispatch3(opassign,$$, $2, $3);$$=dispatch1(assign_error,$$);}|arg tDOT2 arg{$$=dispatch2(dot2, $1, $3);}|arg tDOT3 arg{$$=dispatch2(dot3, $1, $3);}|arg '+'arg{$$=dispatch3(binary, $1, ID2SYM('+'), $3);}|arg '-'arg{$$=dispatch3(binary, $1, ID2SYM('-'), $3);}|arg '*'arg{$$=dispatch3(binary, $1, ID2SYM('*'), $3);}|arg '/'arg{$$=dispatch3(binary, $1, ID2SYM('/'), $3);}|arg '%'arg{$$=dispatch3(binary, $1, ID2SYM('%'), $3);}|arg tPOW arg{$$=dispatch3(binary, $1, ripper_intern("**"), $3);}|tUMINUS_NUM simple_numeric tPOW arg{$$=dispatch3(binary, $2, ripper_intern("**"), $4);$$=dispatch2(unary, ripper_intern("-@"),$$);}|tUPLUS arg{$$=dispatch2(unary, ripper_intern("+@"), $2);}|tUMINUS arg{$$=dispatch2(unary, ripper_intern("-@"), $2);}|arg '|'arg{$$=dispatch3(binary, $1, ID2SYM('|'), $3);}|arg '^'arg{$$=dispatch3(binary, $1, ID2SYM('^'), $3);}|arg '&'arg{$$=dispatch3(binary, $1, ID2SYM('&'), $3);}|arg tCMP arg{$$=dispatch3(binary, $1, ripper_intern(" <=>"), $3);}|arg '>'arg{$$=dispatch3(binary, $1, ID2SYM('>'), $3);}|arg tGEQ arg{$$=dispatch3(binary, $1, ripper_intern("> ="), $3);}|arg '<'arg{$$=dispatch3(binary, $1, ID2SYM('<'), $3);}|arg tLEQ arg{$$=dispatch3(binary, $1, ripper_intern(" <="), $3);}|arg tEQ arg{$$=dispatch3(binary, $1, ripper_intern("=="), $3);}|arg tEQQ arg{$$=dispatch3(binary, $1, ripper_intern("==="), $3);}|arg tNEQ arg{$$=dispatch3(binary, $1, ripper_intern("!="), $3);}|arg tMATCH arg{$$=dispatch3(binary, $1, ripper_intern("=~"), $3);}|arg tNMATCH arg{$$=dispatch3(binary, $1, ripper_intern("!~"), $3);}| '!'arg{$$=dispatch2(unary, ID2SYM('!'), $2);}| '~'arg{$$=dispatch2(unary, ID2SYM('~'), $2);}|arg tLSHFT arg{$$=dispatch3(binary, $1, ripper_intern(" <<"), $3);}|arg tRSHFT arg{$$=dispatch3(binary, $1, ripper_intern("> >"), $3);}|arg tANDOP arg{$$=dispatch3(binary, $1, ripper_intern("&&"), $3);}|arg tOROP arg{$$=dispatch3(binary, $1, ripper_intern("||"), $3);}|keyword_defined opt_nl{in_defined=1;}arg{in_defined=0;$$=dispatch1(defined, $4);}|arg '?'arg opt_nl ':'arg{$$=dispatch3(ifop, $1, $3, $6);}|primary{$$=$1;};arg_value:arg{$$=$1;};aref_args:none|args trailer{$$=$1;}|args ','assocs trailer{$$=arg_add_assocs($1, $3);}|assocs trailer{$$=arg_add_assocs(arg_new(), $1);};paren_args: '('opt_call_args rparen{$$=dispatch1(arg_paren, escape_Qundef($2));};opt_paren_args:none|paren_args;opt_call_args:none|call_args|args ','{$$=$1;}|args ','assocs ','{$$=arg_add_assocs($1, $3);}|assocs ','{$$=arg_add_assocs(arg_new(), $1);};call_args:command{$$=arg_add(arg_new(), $1);}|args opt_block_arg{$$=arg_add_optblock($1, $2);}|assocs opt_block_arg{$$=arg_add_assocs(arg_new(), $1);$$=arg_add_optblock($$, $2);}|args ','assocs opt_block_arg{$$=arg_add_optblock(arg_add_assocs($1, $3), $4);}|block_arg{$$=arg_add_block(arg_new(), $1);};command_args:{$< val > $=cmdarg_stack;CMDARG_PUSH(1);}call_args{cmdarg_stack=$ < val > 1;$$=$2;};block_arg:tAMPER arg_value{$$=$2;};opt_block_arg: ','block_arg{$$=$2;}|none{$$=0;};args:arg_value{$$=arg_add(arg_new(), $1);}|tSTAR arg_value{$$=arg_add_star(arg_new(), $2);}|args ','arg_value{$$=arg_add($1, $3);}|args ','tSTAR arg_value{$$=arg_add_star($1, $4);};mrhs_arg:mrhs|arg_value;mrhs:args ','arg_value{$$=mrhs_add(args2mrhs($1), $3);}|args ','tSTAR arg_value{$$=mrhs_add_star(args2mrhs($1), $4);}|tSTAR arg_value{$$=mrhs_add_star(mrhs_new(), $2);};primary:literal|strings|xstring|regexp|words|qwords|symbols|qsymbols|var_ref|backref|tFID{$$=method_arg(dispatch1(fcall, $1), arg_new());}|k_begin{$ < val >1=cmdarg_stack;cmdarg_stack=0;}bodystmt k_end{cmdarg_stack=$< val > 1;$$=dispatch1(begin, $3);}|tLPAREN_ARG{lex_state=EXPR_ENDARG;}rparen{$$=dispatch1(paren, 0);}|tLPAREN_ARG{$< val > 1=cmdarg_stack;cmdarg_stack=0;}expr{lex_state=EXPR_ENDARG;}rparen{cmdarg_stack=$ < val >1;$$=dispatch1(paren, $3);}|tLPAREN compstmt ')'{$$=dispatch1(paren, $2);}|primary_value tCOLON2 tCONSTANT{$$=dispatch2(const_path_ref, $1, $3);}|tCOLON3 tCONSTANT{$$=dispatch1(top_const_ref, $2);}|tLBRACK aref_args ']'{$$=dispatch1(array, escape_Qundef($2));}|tLBRACE assoc_list '}'{$$=dispatch1(hash, escape_Qundef($2));}|keyword_return{$$=dispatch0(return0);}|keyword_yield '('call_args rparen{$$=dispatch1(yield, dispatch1(paren, $3));}|keyword_yield '('rparen{$$=dispatch1(yield, dispatch1(paren, arg_new()));}|keyword_yield{$$=dispatch0(yield0);}|keyword_defined opt_nl '('{in_defined=1;}expr rparen{in_defined=0;$$=dispatch1(defined, $5);}|keyword_not '('expr rparen{$$=dispatch2(unary, ripper_intern("not"), $3);}|keyword_not '('rparen{$$=dispatch2(unary, ripper_intern("not"), Qnil);}|fcall brace_block{$$=method_arg(dispatch1(fcall, $1), arg_new());$$=method_add_block($$, $2);}|method_call|method_call brace_block{$$=method_add_block($1, $2);}|tLAMBDA lambda{$$=$2;}|k_if expr_value then compstmt if_tail k_end{$$=dispatch3(if, $2, $4, escape_Qundef($5));}|k_unless expr_value then compstmt opt_else k_end{$$=dispatch3(unless, $2, $4, escape_Qundef($5));}|k_while{COND_PUSH(1);}expr_value do{COND_POP();}compstmt k_end{$$=dispatch2(while, $3, $6);}|k_until{COND_PUSH(1);}expr_value do{COND_POP();}compstmt k_end{$$=dispatch2(until, $3, $6);}|k_case expr_value opt_terms case_body k_end{$$=dispatch2(case, $2, $4);}|k_case opt_terms case_body k_end{$$=dispatch2(case, Qnil, $3);}|k_for for_var keyword_in{COND_PUSH(1);}expr_value do{COND_POP();}compstmt k_end{$$=dispatch3(for, $2, $5, $8);}|k_class cpath superclass{yyerror("class definition in method body");local_push(0);}bodystmt k_end{$$=dispatch3(class, $2, $3, $5);local_pop();}|k_class tLSHFT expr{$< num > $=in_def;in_def=0;}term{$ < num > $=in_single;in_single=0;local_push(0);}bodystmt k_end{$$=dispatch2(sclass, $3, $7);local_pop();in_def=$ < num >4;in_single=$< num > 6;}|k_module cpath{yyerror("module definition in method body");local_push(0);}bodystmt k_end{$$=dispatch2(module, $2, $4);local_pop();}|k_def fname{$< id > $=cur_mid;cur_mid=$2;in_def++;local_push(0);}f_arglist bodystmt k_end{$$=dispatch3(def, $2, $4, $5);local_pop();in_def--;cur_mid=$ < id >3;}|k_def singleton dot_or_colon{lex_state=EXPR_FNAME;}fname{in_single++;lex_state=EXPR_ENDFN;local_push(0);}f_arglist bodystmt k_end{$$=dispatch5(defs, $2, $3, $5, $7, $8);local_pop();in_single--;}|keyword_break{$$=dispatch1(break, arg_new());}|keyword_next{$$=dispatch1(next, arg_new());}|keyword_redo{$$=dispatch0(redo);}|keyword_retry{$$=dispatch0(retry);};primary_value:primary{$$=$1;};k_begin:keyword_begin{token_info_push("begin");};k_if:keyword_if{token_info_push("if");};k_unless:keyword_unless{token_info_push("unless");};k_while:keyword_while{token_info_push("while");};k_until:keyword_until{token_info_push("until");};k_case:keyword_case{token_info_push("case");};k_for:keyword_for{token_info_push("for");};k_class:keyword_class{token_info_push("class");};k_module:keyword_module{token_info_push("module");};k_def:keyword_def{token_info_push("def");};k_end:keyword_end{token_info_pop("end");};then:term{$$=Qnil;}|keyword_then|term keyword_then{$$=$2;};do:term{$$=Qnil;}|keyword_do_cond;if_tail:opt_else|keyword_elsif expr_value then compstmt if_tail{$$=dispatch3(elsif, $2, $4, escape_Qundef($5));};opt_else:none|keyword_else compstmt{$$=dispatch1(else, $2);};for_var:lhs|mlhs;f_marg:f_norm_arg{$$=assignable($1, 0);$$=dispatch1(mlhs_paren,$$);}|tLPAREN f_margs rparen{$$=dispatch1(mlhs_paren, $2);};f_marg_list:f_marg{$$=mlhs_add(mlhs_new(), $1);}|f_marg_list ','f_marg{$$=mlhs_add($1, $3);};f_margs:f_marg_list{$$=$1;}|f_marg_list ','tSTAR f_norm_arg{$$=assignable($4, 0);$$=mlhs_add_star($1,$$);}|f_marg_list ','tSTAR f_norm_arg ','f_marg_list{$$=assignable($4, 0);$$=mlhs_add_star($1,$$);}|f_marg_list ','tSTAR{$$=mlhs_add_star($1, Qnil);}|f_marg_list ','tSTAR ','f_marg_list{$$=mlhs_add_star($1, $5);}|tSTAR f_norm_arg{$$=assignable($2, 0);$$=mlhs_add_star(mlhs_new(),$$);}|tSTAR f_norm_arg ','f_marg_list{$$=assignable($2, 0);$$=mlhs_add_star($$, $4);}|tSTAR{$$=mlhs_add_star(mlhs_new(), Qnil);}|tSTAR ','f_marg_list{$$=mlhs_add_star(mlhs_new(), Qnil);};block_args_tail:f_block_kwarg ','f_kwrest opt_f_block_arg{$$=new_args_tail($1, $3, $4);}|f_block_kwarg opt_f_block_arg{$$=new_args_tail($1, Qnone, $2);}|f_kwrest opt_f_block_arg{$$=new_args_tail(Qnone, $1, $2);}|f_block_arg{$$=new_args_tail(Qnone, Qnone, $1);};opt_block_args_tail: ','block_args_tail{$$=$2;}|{$$=new_args_tail(Qnone, Qnone, Qnone);};block_param:f_arg ','f_block_optarg ','f_rest_arg opt_block_args_tail{$$=new_args($1, $3, $5, Qnone, $6);}|f_arg ','f_block_optarg ','f_rest_arg ','f_arg opt_block_args_tail{$$=new_args($1, $3, $5, $7, $8);}|f_arg ','f_block_optarg opt_block_args_tail{$$=new_args($1, $3, Qnone, Qnone, $4);}|f_arg ','f_block_optarg ','f_arg opt_block_args_tail{$$=new_args($1, $3, Qnone, $5, $6);}|f_arg ','f_rest_arg opt_block_args_tail{$$=new_args($1, Qnone, $3, Qnone, $4);}|f_arg ','{$$=new_args($1, Qnone, 1, Qnone, new_args_tail(Qnone, Qnone, Qnone));dispatch1(excessed_comma,$$);}|f_arg ','f_rest_arg ','f_arg opt_block_args_tail{$$=new_args($1, Qnone, $3, $5, $6);}|f_arg opt_block_args_tail{$$=new_args($1, Qnone, Qnone, Qnone, $2);}|f_block_optarg ','f_rest_arg opt_block_args_tail{$$=new_args(Qnone, $1, $3, Qnone, $4);}|f_block_optarg ','f_rest_arg ','f_arg opt_block_args_tail{$$=new_args(Qnone, $1, $3, $5, $6);}|f_block_optarg opt_block_args_tail{$$=new_args(Qnone, $1, Qnone, Qnone, $2);}|f_block_optarg ','f_arg opt_block_args_tail{$$=new_args(Qnone, $1, Qnone, $3, $4);}|f_rest_arg opt_block_args_tail{$$=new_args(Qnone, Qnone, $1, Qnone, $2);}|f_rest_arg ','f_arg opt_block_args_tail{$$=new_args(Qnone, Qnone, $1, $3, $4);}|block_args_tail{$$=new_args(Qnone, Qnone, Qnone, Qnone, $1);};opt_block_param:none|block_param_def{command_start=TRUE;};block_param_def: '|'opt_bv_decl '|'{$$=blockvar_new(params_new(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil), escape_Qundef($2));}|tOROP{$$=blockvar_new(params_new(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil), Qnil);}| '|'block_param opt_bv_decl '|'{$$=blockvar_new(escape_Qundef($2), escape_Qundef($3));};opt_bv_decl:opt_nl{$$=0;}|opt_nl ';'bv_decls opt_nl{$$=$3;};bv_decls:bvar{$$=rb_ary_new3(1, $1);}|bv_decls ','bvar{rb_ary_push($1, $3);};bvar:tIDENTIFIER{new_bv(get_id($1));$$=get_value($1);}|f_bad_arg{$$=0;};lambda:{$ < vars > $=dyna_push();}{$ < num > $=lpar_beg;lpar_beg=++paren_nest;}f_larglist{$ < num > $=ruby_sourceline;}{$ < val > $=cmdarg_stack;cmdarg_stack=0;}lambda_body{lpar_beg=$ < num >2;cmdarg_stack=$< val > 5;CMDARG_LEXPOP();$$=dispatch2(lambda, $3, $6);dyna_pop($< vars > 1);};f_larglist: '('f_args opt_bv_decl ')'{$$=dispatch1(paren, $2);}|f_args{$$=$1;};lambda_body:tLAMBEG compstmt '}'{$$=$2;}|keyword_do_LAMBDA compstmt keyword_end{$$=$2;};do_block:keyword_do_block{$ < vars >1=dyna_push();}opt_block_param compstmt keyword_end{$$=dispatch2(do_block, escape_Qundef($3), $4);dyna_pop($< vars > 1);};block_call:command do_block{$$=method_add_block($1, $2);}|block_call dot_or_colon operation2 opt_paren_args{$$=dispatch3(call, $1, $2, $3);$$=method_optarg($$, $4);}|block_call dot_or_colon operation2 opt_paren_args brace_block{$$=dispatch4(command_call, $1, $2, $3, $4);$$=method_add_block($$, $5);}|block_call dot_or_colon operation2 command_args do_block{$$=dispatch4(command_call, $1, $2, $3, $4);$$=method_add_block($$, $5);};method_call:fcall paren_args{$$=method_arg(dispatch1(fcall, $1), $2);}|primary_value '.'operation2{}opt_paren_args{$$=dispatch3(call, $1, ripper_id2sym('.'), $3);$$=method_optarg($$, $5);}|primary_value tCOLON2 operation2{}paren_args{$$=dispatch3(call, $1, ripper_id2sym('.'), $3);$$=method_optarg($$, $5);}|primary_value tCOLON2 operation3{$$=dispatch3(call, $1, ripper_intern("::"), $3);}|primary_value '.'{}paren_args{$$=dispatch3(call, $1, ripper_id2sym('.'), ripper_intern("call"));$$=method_optarg($$, $4);}|primary_value tCOLON2{}paren_args{$$=dispatch3(call, $1, ripper_intern("::"), ripper_intern("call"));$$=method_optarg($$, $4);}|keyword_super paren_args{$$=dispatch1(super, $2);}|keyword_super{$$=dispatch0(zsuper);}|primary_value '['opt_call_args rbracket{$$=dispatch2(aref, $1, escape_Qundef($3));};brace_block: '{'{$ < vars >1=dyna_push();}opt_block_param compstmt '}'{$$=dispatch2(brace_block, escape_Qundef($3), $4);dyna_pop($< vars > 1);}|keyword_do{$< vars > 1=dyna_push();}opt_block_param compstmt keyword_end{$$=dispatch2(do_block, escape_Qundef($3), $4);dyna_pop($< vars > 1);};case_body:keyword_when args then compstmt cases{$$=dispatch3(when, $2, $4, escape_Qundef($5));};cases:opt_else|case_body;opt_rescue:keyword_rescue exc_list exc_var then compstmt opt_rescue{$$=dispatch4(rescue, escape_Qundef($2), escape_Qundef($3), escape_Qundef($5), escape_Qundef($6));}|none;exc_list:arg_value{$$=rb_ary_new3(1, $1);}|mrhs{$$=$1;}|none;exc_var:tASSOC lhs{$$=$2;}|none;opt_ensure:keyword_ensure compstmt{$$=dispatch1(ensure, $2);}|none;literal:numeric|symbol{$$=dispatch1(symbol_literal, $1);}|dsym;strings:string{$$=$1;};string:tCHAR|string1|string string1{$$=dispatch2(string_concat, $1, $2);};string1:tSTRING_BEG string_contents tSTRING_END{$$=dispatch1(string_literal, $2);};xstring:tXSTRING_BEG xstring_contents tSTRING_END{$$=dispatch1(xstring_literal, $2);};regexp:tREGEXP_BEG regexp_contents tREGEXP_END{$$=dispatch2(regexp_literal, $2, $3);};words:tWORDS_BEG ' 'tSTRING_END{$$=dispatch0(words_new);$$=dispatch1(array,$$);}|tWORDS_BEG word_list tSTRING_END{$$=dispatch1(array, $2);};word_list:{$$=dispatch0(words_new);}|word_list word ' '{$$=dispatch2(words_add, $1, $2);};word:string_content{$$=dispatch0(word_new);$$=dispatch2(word_add,$$, $1);}|word string_content{$$=dispatch2(word_add, $1, $2);};symbols:tSYMBOLS_BEG ' 'tSTRING_END{$$=dispatch0(symbols_new);$$=dispatch1(array,$$);}|tSYMBOLS_BEG symbol_list tSTRING_END{$$=dispatch1(array, $2);};symbol_list:{$$=dispatch0(symbols_new);}|symbol_list word ' '{$$=dispatch2(symbols_add, $1, $2);};qwords:tQWORDS_BEG ' 'tSTRING_END{$$=dispatch0(qwords_new);$$=dispatch1(array,$$);}|tQWORDS_BEG qword_list tSTRING_END{$$=dispatch1(array, $2);};qsymbols:tQSYMBOLS_BEG ' 'tSTRING_END{$$=dispatch0(qsymbols_new);$$=dispatch1(array,$$);}|tQSYMBOLS_BEG qsym_list tSTRING_END{$$=dispatch1(array, $2);};qword_list:{$$=dispatch0(qwords_new);}|qword_list tSTRING_CONTENT ' '{$$=dispatch2(qwords_add, $1, $2);};qsym_list:{$$=dispatch0(qsymbols_new);}|qsym_list tSTRING_CONTENT ' '{$$=dispatch2(qsymbols_add, $1, $2);};string_contents:{$$=dispatch0(string_content);}|string_contents string_content{$$=dispatch2(string_add, $1, $2);};xstring_contents:{$$=dispatch0(xstring_new);}|xstring_contents string_content{$$=dispatch2(xstring_add, $1, $2);};regexp_contents:{$$=dispatch0(regexp_new);}|regexp_contents string_content{$$=dispatch2(regexp_add, $1, $2);};string_content:tSTRING_CONTENT|tSTRING_DVAR{$ < node > $=lex_strterm;lex_strterm=0;lex_state=EXPR_BEG;}string_dvar{lex_strterm=$ < node >2;$$=dispatch1(string_dvar, $3);}|tSTRING_DBEG{$< val > 1=cond_stack;$< val > $=cmdarg_stack;cond_stack=0;cmdarg_stack=0;}{$ < node > $=lex_strterm;lex_strterm=0;lex_state=EXPR_BEG;}{$ < num > $=brace_nest;brace_nest=0;}compstmt tSTRING_DEND{cond_stack=$< val > 1;cmdarg_stack=$< val > 2;lex_strterm=$< node > 3;brace_nest=$< num > 4;$$=dispatch1(string_embexpr, $5);};string_dvar:tGVAR{$$=dispatch1(var_ref, $1);}|tIVAR{$$=dispatch1(var_ref, $1);}|tCVAR{$$=dispatch1(var_ref, $1);}|backref;symbol:tSYMBEG sym{lex_state=EXPR_END;$$=dispatch1(symbol, $2);};sym:fname|tIVAR|tGVAR|tCVAR;dsym:tSYMBEG xstring_contents tSTRING_END{lex_state=EXPR_END;$$=dispatch1(dyna_symbol, $2);};numeric:simple_numeric|tUMINUS_NUM simple_numeric%prec tLOWEST{$$=dispatch2(unary, ripper_intern("-@"), $2);};simple_numeric:tINTEGER|tFLOAT|tRATIONAL|tIMAGINARY;user_variable:tIDENTIFIER|tIVAR|tGVAR|tCONSTANT|tCVAR;keyword_variable:keyword_nil{ifndef_ripper($$=keyword_nil);}|keyword_self{ifndef_ripper($$=keyword_self);}|keyword_true{ifndef_ripper($$=keyword_true);}|keyword_false{ifndef_ripper($$=keyword_false);}|keyword__FILE__{ifndef_ripper($$=keyword__FILE__);}|keyword__LINE__{ifndef_ripper($$=keyword__LINE__);}|keyword__ENCODING__{ifndef_ripper($$=keyword__ENCODING__);};var_ref:user_variable{if(id_is_var(get_id($1))){$$=dispatch1(var_ref, $1);}else{$$=dispatch1(vcall, $1);}}|keyword_variable{$$=dispatch1(var_ref, $1);};var_lhs:user_variable{$$=assignable($1, 0);$$=dispatch1(var_field,$$);}|keyword_variable{$$=assignable($1, 0);$$=dispatch1(var_field,$$);};backref:tNTH_REF|tBACK_REF;superclass:term{$$=Qnil;}| ' <'{lex_state=EXPR_BEG;command_start=TRUE;}expr_value term{$$=$3;}|error term{yyerrok;$$=Qnil;};f_arglist: '('f_args rparen{$$=dispatch1(paren, $2);lex_state=EXPR_BEG;command_start=TRUE;}|{$ < num > $=parser-> parser_in_kwarg;parser-> parser_in_kwarg=1;}f_args term{parser-> parser_in_kwarg=$< num > 1;$$=$2;lex_state=EXPR_BEG;command_start=TRUE;};args_tail:f_kwarg ','f_kwrest opt_f_block_arg{$$=new_args_tail($1, $3, $4);}|f_kwarg opt_f_block_arg{$$=new_args_tail($1, Qnone, $2);}|f_kwrest opt_f_block_arg{$$=new_args_tail(Qnone, $1, $2);}|f_block_arg{$$=new_args_tail(Qnone, Qnone, $1);};opt_args_tail: ','args_tail{$$=$2;}|{$$=new_args_tail(Qnone, Qnone, Qnone);};f_args:f_arg ','f_optarg ','f_rest_arg opt_args_tail{$$=new_args($1, $3, $5, Qnone, $6);}|f_arg ','f_optarg ','f_rest_arg ','f_arg opt_args_tail{$$=new_args($1, $3, $5, $7, $8);}|f_arg ','f_optarg opt_args_tail{$$=new_args($1, $3, Qnone, Qnone, $4);}|f_arg ','f_optarg ','f_arg opt_args_tail{$$=new_args($1, $3, Qnone, $5, $6);}|f_arg ','f_rest_arg opt_args_tail{$$=new_args($1, Qnone, $3, Qnone, $4);}|f_arg ','f_rest_arg ','f_arg opt_args_tail{$$=new_args($1, Qnone, $3, $5, $6);}|f_arg opt_args_tail{$$=new_args($1, Qnone, Qnone, Qnone, $2);}|f_optarg ','f_rest_arg opt_args_tail{$$=new_args(Qnone, $1, $3, Qnone, $4);}|f_optarg ','f_rest_arg ','f_arg opt_args_tail{$$=new_args(Qnone, $1, $3, $5, $6);}|f_optarg opt_args_tail{$$=new_args(Qnone, $1, Qnone, Qnone, $2);}|f_optarg ','f_arg opt_args_tail{$$=new_args(Qnone, $1, Qnone, $3, $4);}|f_rest_arg opt_args_tail{$$=new_args(Qnone, Qnone, $1, Qnone, $2);}|f_rest_arg ','f_arg opt_args_tail{$$=new_args(Qnone, Qnone, $1, $3, $4);}|args_tail{$$=new_args(Qnone, Qnone, Qnone, Qnone, $1);}|{$$=new_args_tail(Qnone, Qnone, Qnone);$$=new_args(Qnone, Qnone, Qnone, Qnone,$$);};f_bad_arg:tCONSTANT{$$=dispatch1(param_error, $1);}|tIVAR{$$=dispatch1(param_error, $1);}|tGVAR{$$=dispatch1(param_error, $1);}|tCVAR{$$=dispatch1(param_error, $1);};f_norm_arg:f_bad_arg|tIDENTIFIER{formal_argument(get_id($1));$$=$1;};f_arg_item:f_norm_arg{arg_var(get_id($1));$$=get_value($1);}|tLPAREN f_margs rparen{ID tid=internal_id();arg_var(tid);$$=dispatch1(mlhs_paren, $2);};f_arg:f_arg_item{$$=rb_ary_new3(1, $1);}|f_arg ','f_arg_item{$$=rb_ary_push($1, $3);};f_label:tLABEL{arg_var(formal_argument(get_id($1)));$$=$1;};f_kw:f_label arg_value{$$=assignable($1, $2);$$=rb_assoc_new($$, $2);}|f_label{$$=assignable($1,(NODE *)-1);$$=rb_assoc_new($$, 0);};f_block_kw:f_label primary_value{$$=assignable($1, $2);$$=rb_assoc_new($$, $2);}|f_label{$$=assignable($1,(NODE *)-1);$$=rb_assoc_new($$, 0);};f_block_kwarg:f_block_kw{$$=rb_ary_new3(1, $1);}|f_block_kwarg ','f_block_kw{$$=rb_ary_push($1, $3);};f_kwarg:f_kw{$$=rb_ary_new3(1, $1);}|f_kwarg ','f_kw{$$=rb_ary_push($1, $3);};kwrest_mark:tPOW|tDSTAR;f_kwrest:kwrest_mark tIDENTIFIER{shadowing_lvar(get_id($2));$$=$2;}|kwrest_mark{$$=internal_id();};f_opt:f_norm_arg '='arg_value{arg_var(get_id($1));$$=assignable($1, $3);$$=rb_assoc_new($$, $3);};f_block_opt:f_norm_arg '='primary_value{arg_var(get_id($1));$$=assignable($1, $3);$$=rb_assoc_new($$, $3);};f_block_optarg:f_block_opt{$$=rb_ary_new3(1, $1);}|f_block_optarg ','f_block_opt{$$=rb_ary_push($1, $3);};f_optarg:f_opt{$$=rb_ary_new3(1, $1);}|f_optarg ','f_opt{$$=rb_ary_push($1, $3);};restarg_mark: '*'|tSTAR;f_rest_arg:restarg_mark tIDENTIFIER{arg_var(shadowing_lvar(get_id($2)));$$=dispatch1(rest_param, $2);}|restarg_mark{$$=dispatch1(rest_param, Qnil);};blkarg_mark: '&'|tAMPER;f_block_arg:blkarg_mark tIDENTIFIER{arg_var(shadowing_lvar(get_id($2)));$$=dispatch1(blockarg, $2);};opt_f_block_arg: ','f_block_arg{$$=$2;}|none{$$=Qundef;};singleton:var_ref{$$=$1;}| '('{lex_state=EXPR_BEG;}expr rparen{$$=dispatch1(paren, $3);};assoc_list:none|assocs trailer{$$=dispatch1(assoclist_from_args, $1);};assocs:assoc{$$=rb_ary_new3(1, $1);}|assocs ','assoc{$$=rb_ary_push($1, $3);};assoc:arg_value tASSOC arg_value{$$=dispatch2(assoc_new, $1, $3);}|tLABEL arg_value{$$=dispatch2(assoc_new, $1, $2);}|tDSTAR arg_value{$$=dispatch1(assoc_splat, $2);};;operation:tIDENTIFIER|tCONSTANT|tFID;operation2:tIDENTIFIER|tCONSTANT|tFID|op;operation3:tIDENTIFIER|tFID|op;dot_or_colon: '.'{$$=$ < val >1;}|tCOLON2{$$=$< val > 1;};opt_terms:|terms;opt_nl:| '\n';rparen:opt_nl ')';rbracket:opt_nl ']';trailer:| '\n'| ',';term: ';'{yyerrok;}| '\n';terms:term|terms ';'{yyerrok;};none:{$$=Qundef;};%%#define yylvalstatic 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 *);#define nextc()#define pushback(c)#define newtok()#define tokspace(n)#define tokadd(c)#define tok_hex(numlen)#define read_escape(flags, e)#define tokadd_escape(e)#define regx_options()#define tokadd_string(f, t, p, n, e)#define parse_string(n)#define tokaddmbc(c, enc)#define here_document(n)#define heredoc_identifier()#define heredoc_restore(n)#define whole_match_p(e, l, i)#define number_literal_suffix(f)#define set_number_literal(v, t, f)#define set_integer_literal(v, f)#define set_yylval_str(x)#define set_yylval_num(x)#define set_yylval_id(x)#define set_yylval_name(x)#define set_yylval_literal(x)#define set_yylval_node(x)#define yylval_id()#define ripper_flush(p)#define SIGN_EXTEND_CHAR(c)#define parser_encoding_name()#define parser_mbclen()#define parser_precise_mbclen()#define is_identchar(p, e, enc)#define parser_is_identchar()#define parser_isascii() static inttoken_info_get_column(struct parser_params *parser, const char *token){int column=1;const char *p,*pend=lex_p-strlen(token);for(p=lex_pbeg;p < pend;p++){if(*p== '\t'){column=(((column-1)/8)+1)*8;}column++;}return column;}static inttoken_info_has_nonspaces(struct parser_params *parser, const char *token){const char *p,*pend=lex_p-strlen(token);for(p=lex_pbeg;p < pend;p++){if(*p!= ' '&&*p!= '\t'){return 1;}}return 0;}static voidtoken_info_push(struct parser_params *parser, const char *token){token_info *ptinfo;if(!parser-> parser_token_info_enabled) return;ptinfo=ALLOC(token_info);ptinfo-> token=token;ptinfo->linenum=ruby_sourceline;ptinfo-> column=token_info_get_column(parser, token);ptinfo->nonspc=token_info_has_nonspaces(parser, token);ptinfo->next=parser-> parser_token_info;parser-> parser_token_info=ptinfo;}static voidtoken_info_pop(struct parser_params *parser, const char *token){int linenum;token_info *ptinfo=parser-> parser_token_info;if(!ptinfo) return;parser-> parser_token_info=ptinfo->next;if(token_info_get_column(parser, token)==ptinfo->column){goto finish;}linenum=ruby_sourceline;if(linenum==ptinfo-> linenum){goto finish;}if(token_info_has_nonspaces(parser, token)||ptinfo->nonspc){goto finish;}if(parser-> parser_token_info_enabled){rb_compile_warn(ruby_sourcefile, linenum,"mismatched indentations at '%s' with '%s' at %d", token, ptinfo->token, ptinfo->linenum);}finish:xfree(ptinfo);}static intparser_yyerror(struct parser_params *parser, const char *msg){const int max_line_margin=30;const char *p,*pe;char *buf;long len;int i;compile_error(PARSER_ARG"%s", msg);p=lex_p;while(lex_pbeg<=p){if(*p== '\n') break;p--;}p++;pe=lex_p;while(pe < lex_pend){if(*pe== '\n') break;pe++;}len=pe-p;if(len > 4){char *p2;const char *pre="",*post="";if(len > max_line_margin *2+10){if(lex_p-p > max_line_margin){p=rb_enc_prev_char(p, lex_p-max_line_margin, pe, rb_enc_get(lex_lastline));pre="...";}if(pe-lex_p > max_line_margin){pe=rb_enc_prev_char(lex_p, lex_p+max_line_margin, pe, rb_enc_get(lex_lastline));post="...";}len=pe-p;}buf=ALLOCA_N(char, len+2);MEMCPY(buf, p, char, len);buf[len]= '\0';rb_compile_error_with_enc(NULL, 0,(void *) current_enc,"%s%s%s", pre, buf, post);i=(int)(lex_p-p);p2=buf;pe=buf+len;while(p2 < pe){if(*p2!= '\t')*p2= ' ';p2++;}buf[i]= '^';buf[i+1]= '\0';rb_compile_error_append("%s%s", pre, buf);}return 0;}static void parser_prepare(struct parser_params *parser);static VALUEdebug_lines(VALUE fname){ID script_lines;CONST_ID(script_lines,"SCRIPT_LINES__");if(rb_const_defined_at(rb_cObject, script_lines)){VALUE hash=rb_const_get_at(rb_cObject, script_lines);if(RB_TYPE_P(hash, T_HASH)){VALUE lines=rb_ary_new();rb_hash_aset(hash, fname, lines);return lines;}}return 0;}static VALUEcoverage(VALUE fname, int n){VALUE coverages=rb_get_coverages();if(RTEST(coverages)&&RBASIC(coverages) -> klass==0){VALUE lines=rb_ary_new2(n);int i;RBASIC_CLEAR_CLASS(lines);for(i=0;i < n;i++) RARRAY_ASET(lines, i, Qnil);RARRAY(lines) -> as.heap.len=n;rb_hash_aset(coverages, fname, lines);return lines;}return 0;}static inte_option_supplied(struct parser_params *parser){return strcmp(ruby_sourcefile,"-e")==0;}static VALUEyycompile0(VALUE arg){int n;NODE *tree;struct parser_params *parser=(struct parser_params *) arg;if(!compile_for_eval &&rb_safe_level()==0){ruby_debug_lines=debug_lines(ruby_sourcefile_string);if(ruby_debug_lines &&ruby_sourceline > 0){VALUE str=STR_NEW0();n=ruby_sourceline;do{rb_ary_push(ruby_debug_lines, str);}while(--n);}if(!e_option_supplied(parser)){ruby_coverage=coverage(ruby_sourcefile_string, ruby_sourceline);}}parser-> last_cr_line=ruby_sourceline-1;parser_prepare(parser);deferred_nodes=0;parser-> parser_token_info_enabled=!compile_for_eval &&RTEST(ruby_verbose);if(RUBY_DTRACE_PARSE_BEGIN_ENABLED()){RUBY_DTRACE_PARSE_BEGIN(parser-> parser_ruby_sourcefile, parser-> parser_ruby_sourceline);}n=yyparse((void *) parser);if(RUBY_DTRACE_PARSE_END_ENABLED()){RUBY_DTRACE_PARSE_END(parser-> parser_ruby_sourcefile, parser-> parser_ruby_sourceline);}ruby_debug_lines=0;ruby_coverage=0;compile_for_eval=0;lex_strterm=0;lex_p=lex_pbeg=lex_pend=0;lex_lastline=lex_nextline=0;if(parser-> nerr){return 0;}tree=ruby_eval_tree;if(!tree){tree=NEW_NIL();}else if(ruby_eval_tree_begin){tree-> nd_body=NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body);}return(VALUE) tree;}static NODE *yycompile(struct parser_params *parser, VALUE fname, int line){ruby_sourcefile_string=rb_str_new_frozen(fname);ruby_sourcefile=RSTRING_PTR(fname);ruby_sourceline=line-1;return(NODE *) rb_suppress_tracing(yycompile0,(VALUE) parser);}static rb_encoding *must_be_ascii_compatible(VALUE s){rb_encoding *enc=rb_enc_get(s);if(!rb_enc_asciicompat(enc)){rb_raise(rb_eArgError,"invalid source encoding");}return enc;}static VALUElex_get_str(struct parser_params *parser, VALUE s){char *beg,*end,*pend;rb_encoding *enc=must_be_ascii_compatible(s);beg=RSTRING_PTR(s);if(lex_gets_ptr){if(RSTRING_LEN(s)==lex_gets_ptr) return Qnil;beg+=lex_gets_ptr;}pend=RSTRING_PTR(s)+RSTRING_LEN(s);end=beg;while(end < pend){if(*end++== '\n') break;}lex_gets_ptr=end-RSTRING_PTR(s);return rb_enc_str_new(beg, end-beg, enc);}static VALUElex_getline(struct parser_params *parser){VALUE line=(*parser->parser_lex_gets)(parser, parser->parser_lex_input);if(NIL_P(line)) return line;must_be_ascii_compatible(line);if(ruby_debug_lines){rb_enc_associate(line, current_enc);rb_ary_push(ruby_debug_lines, line);}if(ruby_coverage){rb_ary_push(ruby_coverage, Qnil);}return line;}static const rb_data_type_t parser_data_type;static NODE *parser_compile_string(volatile VALUE vparser, VALUE fname, VALUE s, int line){struct parser_params *parser;NODE *node;TypedData_Get_Struct(vparser, struct parser_params,&parser_data_type, parser);lex_gets=lex_get_str;lex_gets_ptr=0;lex_input=s;lex_pbeg=lex_p=lex_pend=0;compile_for_eval=rb_parse_in_eval();node=yycompile(parser, fname, line);RB_GC_GUARD(vparser);return node;}NODE *rb_compile_string(const char *f, VALUE s, int line){must_be_ascii_compatible(s);return parser_compile_string(rb_parser_new(), rb_filesystem_str_new_cstr(f), s, line);}NODE *rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line){return rb_parser_compile_string_path(vparser, rb_filesystem_str_new_cstr(f), s, line);}NODE *rb_parser_compile_string_path(volatile VALUE vparser, VALUE f, VALUE s, int line){must_be_ascii_compatible(s);return parser_compile_string(vparser, f, s, line);}NODE *rb_compile_cstr(const char *f, const char *s, int len, int line){VALUE str=rb_str_new(s, len);return parser_compile_string(rb_parser_new(), rb_filesystem_str_new_cstr(f), str, line);}NODE *rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line){VALUE str=rb_str_new(s, len);return parser_compile_string(vparser, rb_filesystem_str_new_cstr(f), str, line);}static VALUElex_io_gets(struct parser_params *parser, VALUE io){return rb_io_gets(io);}NODE *rb_compile_file(const char *f, VALUE file, int start){VALUE volatile vparser=rb_parser_new();return rb_parser_compile_file(vparser, f, file, start);}NODE *rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start){return rb_parser_compile_file_path(vparser, rb_filesystem_str_new_cstr(f), file, start);}NODE *rb_parser_compile_file_path(volatile VALUE vparser, VALUE fname, VALUE file, int start){struct parser_params *parser;NODE *node;TypedData_Get_Struct(vparser, struct parser_params,&parser_data_type, parser);lex_gets=lex_io_gets;lex_input=file;lex_pbeg=lex_p=lex_pend=0;compile_for_eval=rb_parse_in_eval();node=yycompile(parser, fname, start);RB_GC_GUARD(vparser);return node;}#define STR_FUNC_ESCAPE#define STR_FUNC_EXPAND#define STR_FUNC_REGEXP#define STR_FUNC_QWORDS#define STR_FUNC_SYMBOL#define STR_FUNC_INDENTenum 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)};static VALUEparser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0){VALUE str;str=rb_enc_str_new(p, n, enc);if(!(func &STR_FUNC_REGEXP)&&rb_enc_asciicompat(enc)){if(rb_enc_str_coderange(str)==ENC_CODERANGE_7BIT){}else if(enc0==rb_usascii_encoding()&&enc!=rb_utf8_encoding()){rb_enc_associate(str, rb_ascii8bit_encoding());}}return str;}#define lex_goto_eol(parser)#define lex_eol_p()#define peek(c)#define peek_n(c, n) static inline intparser_nextc(struct parser_params *parser){int c;if(lex_p==lex_pend){VALUE v=lex_nextline;lex_nextline=0;if(!v){return-1;if(!lex_input||NIL_P(v=lex_getline(parser))){parser-> eofp=Qtrue;lex_goto_eol(parser);return-1;}}{if(heredoc_end > 0){ruby_sourceline=heredoc_end;heredoc_end=0;}ruby_sourceline++;parser-> line_count++;lex_pbeg=lex_p=RSTRING_PTR(v);lex_pend=lex_p+RSTRING_LEN(v);ripper_flush(parser);lex_lastline=v;}}c=(unsigned char)*lex_p++;if(c== '\r'){if(peek('\n')){lex_p++;c= '\n';}else if(ruby_sourceline > parser->last_cr_line){parser-> last_cr_line=ruby_sourceline;rb_compile_warn(ruby_sourcefile, ruby_sourceline,"encountered \\r in middle of line, treated as a mere space");}}return c;}static voidparser_pushback(struct parser_params *parser, int c){if(c==-1) return;lex_p--;if(lex_p > lex_pbeg &&lex_p[0]== '\n'&&lex_p[-1]== '\r'){lex_p--;}}#define was_bol()#define tokfix()#define tok()#define toklen()#define toklast() static char *parser_newtok(struct parser_params *parser){tokidx=0;tokline=ruby_sourceline;if(!tokenbuf){toksiz=60;tokenbuf=ALLOC_N(char, 60);}if(toksiz > 4096){toksiz=60;REALLOC_N(tokenbuf, char, 60);}return tokenbuf;}static char *parser_tokspace(struct parser_params *parser, int n){tokidx+=n;if(tokidx > =toksiz){do{toksiz *=2;}while(toksiz < tokidx);REALLOC_N(tokenbuf, char, toksiz);}return &tokenbuf[tokidx-n];}static voidparser_tokadd(struct parser_params *parser, int c){tokenbuf[tokidx++]=(char) c;if(tokidx >=toksiz){toksiz *=2;REALLOC_N(tokenbuf, char, toksiz);}}static intparser_tok_hex(struct parser_params *parser, size_t *numlen){int c;c=scan_hex(lex_p, 2, numlen);if(!*numlen){yyerror("invalid hex escape");return 0;}lex_p+=*numlen;return c;}#define tokcopy(n) static intparser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, int string_literal, int symbol_literal, int regexp_literal){int codepoint;size_t numlen;if(regexp_literal){tokadd('\\');tokadd('u');}if(peek('{')){do{if(regexp_literal){tokadd(*lex_p);}nextc();codepoint=scan_hex(lex_p, 6,&numlen);if(numlen==0){yyerror("invalid Unicode escape");return 0;}if(codepoint > 0x10ffff){yyerror("invalid Unicode codepoint (too large)");return 0;}lex_p+=numlen;if(regexp_literal){tokcopy((int) numlen);}else if(codepoint >=0x80){*encp=rb_utf8_encoding();if(string_literal) tokaddmbc(codepoint,*encp);}else if(string_literal){tokadd(codepoint);}}while(string_literal &&(peek(' ')||peek('\t')));if(!peek('}')){yyerror("unterminated Unicode escape");return 0;}if(regexp_literal){tokadd('}');}nextc();}else{codepoint=scan_hex(lex_p, 4,&numlen);if(numlen< 4){yyerror("invalid Unicode escape");return 0;}lex_p+=4;if(regexp_literal){tokcopy(4);}else if(codepoint >=0x80){*encp=rb_utf8_encoding();if(string_literal) tokaddmbc(codepoint,*encp);}else if(string_literal){tokadd(codepoint);}}return codepoint;}#define ESCAPE_CONTROL#define ESCAPE_METAstatic intparser_read_escape(struct parser_params *parser, int flags, rb_encoding **encp){int c;size_t numlen;switch(c=nextc()){case '\\':return c;case 'n':return '\n';case 't':return '\t';case 'r':return '\r';case 'f':return '\f';case 'v':return '\13';case 'a':return '\007';case 'e':return 033;case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':pushback(c);c=scan_oct(lex_p, 3,&numlen);lex_p+=numlen;return c;case 'x':c=tok_hex(&numlen);if(numlen==0) return 0;return c;case 'b':return '\010';case 's':return ' ';case 'M':if(flags &ESCAPE_META) goto eof;if((c=nextc())!= '-'){pushback(c);goto eof;}if((c=nextc())== '\\'){if(peek('u')) goto eof;return read_escape(flags|ESCAPE_META, encp)|0x80;}else if(c==-1||!ISASCII(c)) goto eof;else{return((c &0xff)|0x80);}case 'C':if((c=nextc())!= '-'){pushback(c);goto eof;}case 'c':if(flags &ESCAPE_CONTROL) goto eof;if((c=nextc())== '\\'){if(peek('u')) goto eof;c=read_escape(flags|ESCAPE_CONTROL, encp);}else if(c== '?') return 0177;else if(c==-1||!ISASCII(c)) goto eof;return c &0x9f;eof:case-1:yyerror("Invalid escape character syntax");return '\0';default:return c;}}static voidparser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc){int len=rb_enc_codelen(c, enc);rb_enc_mbcput(c, tokspace(len), enc);}static intparser_tokadd_escape(struct parser_params *parser, rb_encoding **encp){int c;int flags=0;size_t numlen;first:switch(c=nextc()){case '\n':return 0;case '0':case '1':case '2':case '3':case '4':case '5':case '6':case '7':{ruby_scan_oct(--lex_p, 3,&numlen);if(numlen==0) goto eof;lex_p+=numlen;tokcopy((int) numlen+1);}return 0;case 'x':{tok_hex(&numlen);if(numlen==0) return-1;tokcopy((int) numlen+2);}return 0;case 'M':if(flags &ESCAPE_META) goto eof;if((c=nextc())!= '-'){pushback(c);goto eof;}tokcopy(3);flags|=ESCAPE_META;goto escaped;case 'C':if(flags &ESCAPE_CONTROL) goto eof;if((c=nextc())!= '-'){pushback(c);goto eof;}tokcopy(3);goto escaped;case 'c':if(flags &ESCAPE_CONTROL) goto eof;tokcopy(2);flags|=ESCAPE_CONTROL;escaped:if((c=nextc())== '\\'){goto first;}else if(c==-1) goto eof;tokadd(c);return 0;eof:case-1:yyerror("Invalid escape character syntax");return-1;default:tokadd('\\');tokadd(c);}return 0;}static intparser_regx_options(struct parser_params *parser){int kcode=0;int kopt=0;int options=0;int c, opt, kc;newtok();while(c=nextc(), ISALPHA(c)){if(c== 'o'){options|=RE_OPTION_ONCE;}else if(rb_char_to_option_kcode(c,&opt,&kc)){if(kc >=0){if(kc!=rb_ascii8bit_encindex()) kcode=c;kopt=opt;}else{options|=opt;}}else{tokadd(c);}}options|=kopt;pushback(c);if(toklen()){tokfix();compile_error(PARSER_ARG"unknown regexp option%s - %s", toklen() > 1?"s":"", tok());}return options|RE_OPTION_ENCODING(kcode);}static voiddispose_string(VALUE str){rb_str_free(str);rb_gc_force_recycle(str);}static intparser_tokadd_mbchar(struct parser_params *parser, int c){int len=parser_precise_mbclen();if(!MBCLEN_CHARFOUND_P(len)){compile_error(PARSER_ARG"invalid multibyte char (%s)", parser_encoding_name());return-1;}tokadd(c);lex_p+=--len;if(len > 0) tokcopy(len);return c;}#define tokadd_mbchar(c) static inline intsimple_re_meta(int c){switch(c){case '$':case '*':case '+':case '.':case '?':case '^':case '|':case ')':case ']':case '}':case '>':return TRUE;default:return FALSE;}}static intparser_tokadd_string(struct parser_params *parser, int func, int term, int paren, long *nest, rb_encoding **encp){int c;int has_nonascii=0;rb_encoding *enc=*encp;char *errbuf=0;static const char mixed_msg[]="%s mixed within %s source";#define mixed_error(enc1, enc2)#define mixed_escape(beg, enc1, enc2) while((c=nextc())!=-1){if(paren &&c==paren){++*nest;}else if(c==term){if(!nest||!*nest){pushback(c);break;}--*nest;}else if((func &STR_FUNC_EXPAND)&&c== '#'&&lex_p< lex_pend){int c2=*lex_p;if(c2== '$'||c2== '@'||c2== '{'){pushback(c);break;}}else if(c== '\\'){const char *beg=lex_p-1;c=nextc();switch(c){case '\n':if(func &STR_FUNC_QWORDS) break;if(func &STR_FUNC_EXPAND) continue;tokadd('\\');break;case '\\':if(func &STR_FUNC_ESCAPE) tokadd(c);break;case 'u':if((func &STR_FUNC_EXPAND)==0){tokadd('\\');break;}parser_tokadd_utf8(parser,&enc, 1, func &STR_FUNC_SYMBOL, func &STR_FUNC_REGEXP);if(has_nonascii &&enc!=*encp){mixed_escape(beg, enc,*encp);}continue;default:if(c==-1) return-1;if(!ISASCII(c)){if((func &STR_FUNC_EXPAND)==0) tokadd('\\');goto non_ascii;}if(func &STR_FUNC_REGEXP){if(c==term &&!simple_re_meta(c)){tokadd(c);continue;}pushback(c);if((c=tokadd_escape(&enc))< 0) return-1;if(has_nonascii &&enc!=*encp){mixed_escape(beg, enc,*encp);}continue;}else if(func &STR_FUNC_EXPAND){pushback(c);if(func &STR_FUNC_ESCAPE) tokadd('\\');c=read_escape(0,&enc);}else if((func &STR_FUNC_QWORDS)&&ISSPACE(c)){}else if(c!=term &&!(paren &&c==paren)){tokadd('\\');pushback(c);continue;}}}else if(!parser_isascii()){non_ascii:has_nonascii=1;if(enc!=*encp){mixed_error(enc,*encp);continue;}if(tokadd_mbchar(c)==-1) return-1;continue;}else if((func &STR_FUNC_QWORDS)&&ISSPACE(c)){pushback(c);break;}if(c &0x80){has_nonascii=1;if(enc!=*encp){mixed_error(enc,*encp);continue;}}tokadd(c);}*encp=enc;return c;}#define NEW_STRTERM(func, term, paren)#define flush_string_content(enc) RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e-0x20+31)/32];#define BIT(c, idx)#define SPECIAL_PUNCT(idx) const unsigned int ruby_global_name_punct_bits[]={SPECIAL_PUNCT(0), SPECIAL_PUNCT(1), SPECIAL_PUNCT(2),};static inline intis_global_name_punct(const int c){if(c<=0x20||0x7e< c) return 0;return(ruby_global_name_punct_bits[(c-0x20)/32] >>(c%32))&1;}static intparser_peek_variable_name(struct parser_params *parser){int c;const char *p=lex_p;if(p+1 >=lex_pend) return 0;c=*p++;switch(c){case '$':if((c=*p)== '-'){if(++p >=lex_pend) return 0;c=*p;}else if(is_global_name_punct(c)||ISDIGIT(c)){return tSTRING_DVAR;}break;case '@':if((c=*p)== '@'){if(++p >=lex_pend) return 0;c=*p;}break;case '{':lex_p=p;command_start=TRUE;return tSTRING_DBEG;default:return 0;}if(!ISASCII(c)||c== '_'||ISALPHA(c)) return tSTRING_DVAR;return 0;}static intparser_parse_string(struct parser_params *parser, NODE *quote){int func=(int) quote->nd_func;int term=nd_term(quote);int paren=nd_paren(quote);int c, space=0;rb_encoding *enc=current_enc;if(func==-1) return tSTRING_END;c=nextc();if((func &STR_FUNC_QWORDS)&&ISSPACE(c)){do{c=nextc();}while(ISSPACE(c));space=1;}if(c==term &&!quote->nd_nest){if(func &STR_FUNC_QWORDS){quote->nd_func=-1;return ' ';}if(!(func &STR_FUNC_REGEXP)) return tSTRING_END;set_yylval_num(regx_options());return tREGEXP_END;}if(space){pushback(c);return ' ';}newtok();if((func &STR_FUNC_EXPAND)&&c== '#'){int t=parser_peek_variable_name(parser);if(t) return t;tokadd('#');c=nextc();}pushback(c);if(tokadd_string(func, term, paren,"e->nd_nest,&enc)==-1){ruby_sourceline=nd_line(quote);if(func &STR_FUNC_REGEXP){compile_error(PARSER_ARG"unterminated regexp meets end of file");return tREGEXP_END;}else{compile_error(PARSER_ARG"unterminated string meets end of file");return tSTRING_END;}}tokfix();set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));flush_string_content(enc);return tSTRING_CONTENT;}static intparser_heredoc_identifier(struct parser_params *parser){int c=nextc(), term, func=0;long len;if(c== '-'){c=nextc();func=STR_FUNC_INDENT;}switch(c){case '\'':func|=str_squote;goto quoted;case '"': func |= str_dquote; goto quoted; case '`': func |= str_xquote; quoted: newtok(); tokadd(func); term = c; while ((c = nextc()) != -1 && c != term) { if (tokadd_mbchar(c) == -1) return 0; } if (c == -1) { compile_error(PARSER_ARG "unterminated here document identifier"); return 0; } break; default: if (!parser_is_identchar()) { pushback(c); if (func & STR_FUNC_INDENT) { pushback('-'); } return 0; } newtok(); term = '"';tokadd(func|=str_dquote);do{if(tokadd_mbchar(c)==-1) return 0;}while((c=nextc())!=-1 &&parser_is_identchar());pushback(c);break;}tokfix();len=lex_p-lex_pbeg;lex_goto_eol(parser);lex_strterm=rb_node_newnode(NODE_HEREDOC, STR_NEW(tok(), toklen()), len, lex_lastline);nd_set_line(lex_strterm, ruby_sourceline);ripper_flush(parser);return term== '`'?tXSTRING_BEG:tSTRING_BEG;}static voidparser_heredoc_restore(struct parser_params *parser, NODE *here){VALUE line;lex_strterm=0;line=here->nd_orig;lex_lastline=line;lex_pbeg=RSTRING_PTR(line);lex_pend=lex_pbeg+RSTRING_LEN(line);lex_p=lex_pbeg+here->nd_nth;heredoc_end=ruby_sourceline;ruby_sourceline=nd_line(here);dispose_string(here->nd_lit);rb_gc_force_recycle((VALUE) here);ripper_flush(parser);}static intparser_whole_match_p(struct parser_params *parser, const char *eos, long len, int indent){const char *p=lex_pbeg;long n;if(indent){while(*p &&ISSPACE(*p)) p++;}n=lex_pend-(p+len);if(n< 0) return FALSE;if(n > 0 &&p[len]!= '\n'){if(p[len]!= '\r') return FALSE;if(n<=1||p[len+1]!= '\n') return FALSE;}return strncmp(eos, p, len)==0;}#define NUM_SUFFIX_R#define NUM_SUFFIX_I#define NUM_SUFFIX_ALLstatic intparser_number_literal_suffix(struct parser_params *parser, int mask){int c, result=0;const char *lastp=lex_p;while((c=nextc())!=-1){if((mask &NUM_SUFFIX_I)&&c== 'i'){result|=(mask &NUM_SUFFIX_I);mask &=~NUM_SUFFIX_I;mask &=~NUM_SUFFIX_R;continue;}if((mask &NUM_SUFFIX_R)&&c== 'r'){result|=(mask &NUM_SUFFIX_R);mask &=~NUM_SUFFIX_R;continue;}if(!ISASCII(c)||ISALPHA(c)||c== '_'){lex_p=lastp;return 0;}pushback(c);break;}return result;}static intparser_set_number_literal(struct parser_params *parser, VALUE v, int type, int suffix){if(suffix &NUM_SUFFIX_I){v=rb_complex_raw(INT2FIX(0), v);type=tIMAGINARY;}set_yylval_literal(v);return type;}static intparser_set_integer_literal(struct parser_params *parser, VALUE v, int suffix){int type=tINTEGER;if(suffix &NUM_SUFFIX_R){v=rb_rational_raw1(v);type=tRATIONAL;}return set_number_literal(v, type, suffix);}#define dispatch_heredoc_end() static intparser_here_document(struct parser_params *parser, NODE *here){int c, func, indent=0;const char *eos,*p,*pend;long len;VALUE str=0;rb_encoding *enc=current_enc;eos=RSTRING_PTR(here->nd_lit);len=RSTRING_LEN(here->nd_lit)-1;indent=(func=*eos++)&STR_FUNC_INDENT;if((c=nextc())==-1){error:compile_error(PARSER_ARG"can't find string \"%s\" anywhere before EOF", eos);restore:heredoc_restore(lex_strterm);return 0;}if(was_bol()&&whole_match_p(eos, len, indent)){dispatch_heredoc_end();heredoc_restore(lex_strterm);return tSTRING_END;}if(!(func &STR_FUNC_EXPAND)){do{p=RSTRING_PTR(lex_lastline);pend=lex_pend;if(pend > p){switch(pend[-1]){case '\n':if(--pend==p||pend[-1]!= '\r'){pend++;break;}case '\r':--pend;}}rb_str_cat(str, p, pend-p);else str=STR_NEW(p, pend-p);if(pend< lex_pend) rb_str_cat(str,"\n", 1);lex_goto_eol(parser);if(nextc()==-1){if(str){dispose_string(str);str=0;}goto error;}}while(!whole_match_p(eos, len, indent));}else{newtok();if(c== '#'){int t=parser_peek_variable_name(parser);if(t) return t;tokadd('#');c=nextc();}do{pushback(c);if((c=tokadd_string(func, '\n', 0, NULL,&enc))==-1){if(parser->eofp) goto error;goto restore;}if(c!= '\n'){set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));flush_string_content(enc);return tSTRING_CONTENT;}tokadd(nextc());if((c=nextc())==-1) goto error;}while(!whole_match_p(eos, len, indent));str=STR_NEW3(tok(), toklen(), enc, func);}dispatch_heredoc_end();heredoc_restore(lex_strterm);lex_strterm=NEW_STRTERM(-1, 0, 0);set_yylval_str(str);return tSTRING_CONTENT;}static voidarg_ambiguous_gen(struct parser_params *parser){rb_warning0("ambiguous first argument; put parentheses or even spaces");}#define arg_ambiguous() static IDformal_argument_gen(struct parser_params *parser, ID lhs){yyerror("formal argument must be local variable");shadowing_lvar(lhs);return lhs;}static intlvar_defined_gen(struct parser_params *parser, ID id){return(dyna_in_block()&&dvar_defined_get(id))||local_id(id);}static longparser_encode_length(struct parser_params *parser, const char *name, long len){long nlen;if(len > 5 &&name[nlen=len-5]== '-'){return nlen;}if(len > 4 &&name[nlen=len-4]== '-'){return nlen;if(rb_memcicmp(name+nlen+1,"mac", 3)==0 &&!(len==8 &&rb_memcicmp(name,"utf8-mac", len)==0)) return nlen;}return len;}static voidparser_set_encode(struct parser_params *parser, const char *name){int idx=rb_enc_find_index(name);rb_encoding *enc;VALUE excargs[3];if(idx< 0){excargs[1]=rb_sprintf("unknown encoding name: %s", name);error:excargs[0]=rb_eArgError;excargs[2]=rb_make_backtrace();rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline));rb_exc_raise(rb_make_exception(3, excargs));}enc=rb_enc_from_index(idx);if(!rb_enc_asciicompat(enc)){excargs[1]=rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));goto error;}parser->enc=enc;if(ruby_debug_lines){VALUE lines=ruby_debug_lines;long i, n=RARRAY_LEN(lines);for(i=0;i< n;++i){rb_enc_associate_index(RARRAY_AREF(lines, i), idx);}}}static intcomment_at_top(struct parser_params *parser){const char *p=lex_pbeg,*pend=lex_p-1;if(parser->line_count!=(parser->has_shebang?2:1)) return 0;while(p< pend){if(!ISSPACE(*p)) return 0;p++;}return 1;}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);static voidmagic_comment_encoding(struct parser_params *parser, const char *name, const char *val){if(!comment_at_top(parser)){return;}parser_set_encode(parser, val);}static voidparser_set_token_info(struct parser_params *parser, const char *name, const char *val){int *p=&parser->parser_token_info_enabled;switch(*val){case 't':case 'T':if(strcasecmp(val,"true")==0){*p=TRUE;return;}break;case 'f':case 'F':if(strcasecmp(val,"false")==0){*p=FALSE;return;}break;}rb_compile_warning(ruby_sourcefile, ruby_sourceline,"invalid value for %s: %s", name, val);}struct magic_comment{const char *name;rb_magic_comment_setter_t func;rb_magic_comment_length_t length;};static const struct magic_comment magic_comments[]={{"coding", magic_comment_encoding, parser_encode_length},{"encoding", magic_comment_encoding, parser_encode_length},{"warn_indent", parser_set_token_info},};static const char *magic_comment_marker(const char *str, long len){long i=2;while(i< len){switch(str[i]){case '-':if(str[i-1]== '*'&&str[i-2]== '-'){return str+i+1;}i+=2;break;case '*':if(i+1 >=len) return 0;if(str[i+1]!= '-'){i+=4;}else if(str[i-1]!= '-'){i+=2;}else{return str+i+2;}break;default:i+=3;break;}}return 0;}static intparser_magic_comment(struct parser_params *parser, const char *str, long len){VALUE name=0, val=0;const char *beg,*end,*vbeg,*vend;#define str_copy(_s, _p, _n) if(len<=7) return FALSE;if(!(beg=magic_comment_marker(str, len))) return FALSE;if(!(end=magic_comment_marker(beg, str+len-beg))) return FALSE;str=beg;len=end-beg-3;while(len > 0){const struct magic_comment *p=magic_comments;char *s;int i;long n=0;for(;len > 0 &&*str;str++,--len){switch(*str){case '\'':case '"': case ':': case ';': continue; } if (!ISSPACE(*str)) break; } for (beg = str; len > 0; str++, --len) { switch (*str) { case '\'': case '"':case ':':case ';':break;default:if(ISSPACE(*str)) break;continue;}break;}for(end=str;len > 0 &&ISSPACE(*str);str++,--len);if(!len) break;if(*str!= ':') continue;do str++;while(--len > 0 &&ISSPACE(*str));if(!len) break;if(*str== '"') { for (vbeg = ++str; --len > 0 && *str != '"';str++){if(*str== '\\'){--len;++str;}}vend=str;if(len){--len;++str;}}else{for(vbeg=str;len > 0 &&*str!= '"' && *str != ';' && !ISSPACE(*str); --len, str++); vend = str; } while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; n = end - beg; str_copy(name, beg, n); s = RSTRING_PTR(name); for (i = 0; i < n; ++i) { if (s[i] == '-') s[i] = '_'; } do { if (STRNCASECMP(p->name, s, n) == 0) { n = vend - vbeg; if (p->length) { n = (*p->length)(parser, vbeg, n); } str_copy(val, vbeg, n); (*p->func)(parser, s, RSTRING_PTR(val)); break; } } while (++p < magic_comments + numberof(magic_comments)); } return TRUE;}static voidset_file_encoding(struct parser_params *parser, const char *str, const char *send){ int sep = 0; const char *beg = str; VALUE s; for (;;) { if (send - str <= 6) return; switch (str[6]) { case 'C': case 'c': str += 6; continue; case 'O': case 'o': str += 5; continue; case 'D': case 'd': str += 4; continue; case 'I': case 'i': str += 3; continue; case 'N': case 'n': str += 2; continue; case 'G': case 'g': str += 1; continue; case '=': case ':': sep = 1; str += 6; break; default: str += 6; if (ISSPACE(*str)) break; continue; } if (STRNCASECMP(str-6, "coding", 6) == 0) break; } for (;;) { do { if (++str >= send) return; } while (ISSPACE(*str)); if (sep) break; if (*str != '=' && *str != ':') return; sep = 1; str++; } beg = str; while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send); s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg)); parser_set_encode(parser, RSTRING_PTR(s)); rb_str_resize(s, 0);}static voidparser_prepare(struct parser_params *parser){ int c = nextc(); switch (c) { case '#': if (peek('!')) parser->has_shebang = 1; break; case 0xef: if (lex_pend - lex_p >= 2 && (unsigned char)lex_p[0] == 0xbb && (unsigned char)lex_p[1] == 0xbf) { parser->enc = rb_utf8_encoding(); lex_p += 2; lex_pbeg = lex_p; return; } break; case EOF: return; } pushback(c); parser->enc = rb_enc_get(lex_lastline);}#define IS_ARG() #define IS_END() #define IS_BEG() #define IS_SPCARG(c) #define IS_LABEL_POSSIBLE() #define IS_LABEL_SUFFIX(n) #define IS_AFTER_OPERATOR() #define ambiguous_operator(op, syn) #define warn_balanced(op, syn) static intparse_numvar(struct parser_params *parser){ size_t len; int overflow; unsigned long n = ruby_scan_digits(tok()+1, toklen()-1, 10, &len, &overflow); const unsigned long nth_ref_max = ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1; if (overflow || n > nth_ref_max) { rb_warnS("`%s'is too big for a number variable, always nil", tok()); return 0; } else { return (int)n; }}static intparser_yylex(struct parser_params *parser){ register int c; int space_seen = 0; int cmd_state; enum lex_state_e last_state; rb_encoding *enc; int mb; if (lex_strterm) { int token; if (nd_type(lex_strterm) == NODE_HEREDOC) { token = here_document(lex_strterm); if (token == tSTRING_END) { lex_strterm = 0; lex_state = EXPR_END; } } else { token = parse_string(lex_strterm); if (token == tSTRING_END || token == tREGEXP_END) { rb_gc_force_recycle((VALUE)lex_strterm); lex_strterm = 0; lex_state = EXPR_END; } } return token; } cmd_state = command_start; command_start = FALSE; retry: last_state = lex_state; switch (c = nextc()) { case '\0': case '\004': case '\032': case -1: return 0; case ' ': case '\t': case '\f': case '\r': case '\13': space_seen = 1; goto retry; case '#': if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) { if (comment_at_top(parser)) { set_file_encoding(parser, lex_p, lex_pend); } } lex_p = lex_pend; case '\n': if (IS_lex_state(EXPR_BEG | EXPR_VALUE | EXPR_CLASS | EXPR_FNAME | EXPR_DOT | EXPR_LABELARG)) { if (IS_lex_state(EXPR_LABELARG) && parser->parser_in_kwarg) { goto normal_newline; } goto retry; } while ((c = nextc())) { switch (c) { case ' ': case '\t': case '\f': case '\r': case '\13': space_seen = 1; break; case '.': { if ((c = nextc()) != '.') { pushback(c); pushback('.'); goto retry; } } default: --ruby_sourceline; lex_nextline = lex_lastline; case -1: lex_goto_eol(parser); goto normal_newline; } } normal_newline: command_start = TRUE; lex_state = EXPR_BEG; return '\n'; case '*': if ((c = nextc()) == '*') { if ((c = nextc()) == '=') { set_yylval_id(tPOW); lex_state = EXPR_BEG; return tOP_ASGN; } pushback(c); if (IS_SPCARG(c)) { rb_warning0("`**'interpreted as argument prefix"); c = tDSTAR; } else if (IS_BEG()) { c = tDSTAR; } else { warn_balanced("**", "argument prefix"); c = tPOW; } } else { if (c == '=') { set_yylval_id('*'); lex_state = EXPR_BEG; return tOP_ASGN; } pushback(c); if (IS_SPCARG(c)) { rb_warning0("`*'interpreted as argument prefix"); c = tSTAR; } else if (IS_BEG()) { c = tSTAR; } else { warn_balanced("*", "argument prefix"); c = '*'; } } lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; return c; case '!': c = nextc(); if (IS_AFTER_OPERATOR()) { lex_state = EXPR_ARG; if (c == '@') { return '!'; } } else { lex_state = EXPR_BEG; } if (c == '=') { return tNEQ; } if (c == '~') { return tNMATCH; } pushback(c); return '!'; case '=': if (was_bol()) { if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) { for (;;) { lex_goto_eol(parser); c = nextc(); if (c == -1) { compile_error(PARSER_ARG "embedded document meets end of file"); return 0; } if (c != '=') continue; if (strncmp(lex_p, "end", 3) == 0 && (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) { break; } } lex_goto_eol(parser); goto retry; } } lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; if ((c = nextc()) == '=') { if ((c = nextc()) == '=') { return tEQQ; } pushback(c); return tEQ; } if (c == '~') { return tMATCH; } else if (c == '>') { return tASSOC; } pushback(c); return '='; case '<': last_state = lex_state; c = nextc(); if (c == '<' && !IS_lex_state(EXPR_DOT | EXPR_CLASS) && !IS_END() && (!IS_ARG() || space_seen)) { int token = heredoc_identifier(); if (token) return token; } if (IS_AFTER_OPERATOR()) { lex_state = EXPR_ARG; } else { command_start = TRUE; lex_state = EXPR_BEG; } if (c == '=') { if ((c = nextc()) == '>') { return tCMP; } pushback(c); return tLEQ; } if (c == '<') { if ((c = nextc()) == '=') { set_yylval_id(tLSHFT); lex_state = EXPR_BEG; return tOP_ASGN; } pushback(c); warn_balanced("<<", "here document"); return tLSHFT; } pushback(c); return '<'; case '>': lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; if ((c = nextc()) == '=') { return tGEQ; } if (c == '>') { if ((c = nextc()) == '=') { set_yylval_id(tRSHFT); lex_state = EXPR_BEG; return tOP_ASGN; } pushback(c); return tRSHFT; } pushback(c); return '>'; case '"':lex_strterm=NEW_STRTERM(str_dquote, '"', 0); return tSTRING_BEG; case '`': if (IS_lex_state(EXPR_FNAME)) { lex_state = EXPR_ENDFN; return c; } if (IS_lex_state(EXPR_DOT)) { lex_state = EXPR_CMDARG; else lex_state = EXPR_ARG; return c; } lex_strterm = NEW_STRTERM(str_xquote, '`', 0); return tXSTRING_BEG; case '\'': lex_strterm = NEW_STRTERM(str_squote, '\'', 0); return tSTRING_BEG; case '?': if (IS_END()) { lex_state = EXPR_VALUE; return '?'; } c = nextc(); if (c == -1) { compile_error(PARSER_ARG "incomplete character syntax"); return 0; } if (rb_enc_isspace(c, current_enc)) { if (!IS_ARG()) { int c2 = 0; switch (c) { case ' ': c2 = 's'; break; case '\n': c2 = 'n'; break; case '\t': c2 = 't'; break; case '\v': c2 = 'v'; break; case '\r': c2 = 'r'; break; case '\f': c2 = 'f'; break; } if (c2) { rb_warnI("invalid character syntax;use?\\%c", c2); } } ternary: pushback(c); lex_state = EXPR_VALUE; return '?'; } newtok(); enc = current_enc; if (!parser_isascii()) { if (tokadd_mbchar(c) == -1) return 0; } else if ((rb_enc_isalnum(c, current_enc) || c == '_') && lex_p < lex_pend && is_identchar(lex_p, lex_pend, current_enc)) { goto ternary; } else if (c == '\\') { if (peek('u')) { nextc(); c = parser_tokadd_utf8(parser, &enc, 0, 0, 0); if (0x80 <= c) { tokaddmbc(c, enc); } else { tokadd(c); } } else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) { nextc(); if (tokadd_mbchar(c) == -1) return 0; } else { c = read_escape(0, &enc); tokadd(c); } } else { tokadd(c); } tokfix(); set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0)); lex_state = EXPR_END; return tCHAR; case '&': if ((c = nextc()) == '&') { lex_state = EXPR_BEG; if ((c = nextc()) == '=') { set_yylval_id(tANDOP); lex_state = EXPR_BEG; return tOP_ASGN; } pushback(c); return tANDOP; } else if (c == '=') { set_yylval_id('&'); lex_state = EXPR_BEG; return tOP_ASGN; } pushback(c); if (IS_SPCARG(c)) { rb_warning0("`&'interpreted as argument prefix"); c = tAMPER; } else if (IS_BEG()) { c = tAMPER; } else { warn_balanced("&", "argument prefix"); c = '&'; } lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; return c; case '|': if ((c = nextc()) == '|') { lex_state = EXPR_BEG; if ((c = nextc()) == '=') { set_yylval_id(tOROP); lex_state = EXPR_BEG; return tOP_ASGN; } pushback(c); return tOROP; } if (c == '=') { set_yylval_id('|'); lex_state = EXPR_BEG; return tOP_ASGN; } lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; pushback(c); return '|'; case '+': c = nextc(); if (IS_AFTER_OPERATOR()) { lex_state = EXPR_ARG; if (c == '@') { return tUPLUS; } pushback(c); return '+'; } if (c == '=') { set_yylval_id('+'); lex_state = EXPR_BEG; return tOP_ASGN; } if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { lex_state = EXPR_BEG; pushback(c); if (c != -1 && ISDIGIT(c)) { c = '+'; goto start_num; } return tUPLUS; } lex_state = EXPR_BEG; pushback(c); warn_balanced("+", "unary operator"); return '+'; case '-': c = nextc(); if (IS_AFTER_OPERATOR()) { lex_state = EXPR_ARG; if (c == '@') { return tUMINUS; } pushback(c); return '-'; } if (c == '=') { set_yylval_id('-'); lex_state = EXPR_BEG; return tOP_ASGN; } if (c == '>') { lex_state = EXPR_ENDFN; return tLAMBDA; } if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { lex_state = EXPR_BEG; pushback(c); if (c != -1 && ISDIGIT(c)) { return tUMINUS_NUM; } return tUMINUS; } lex_state = EXPR_BEG; pushback(c); warn_balanced("-", "unary operator"); return '-'; case '.': lex_state = EXPR_BEG; if ((c = nextc()) == '.') { if ((c = nextc()) == '.') { return tDOT3; } pushback(c); return tDOT2; } pushback(c); if (c != -1 && ISDIGIT(c)) { yyerror("no.< digit > floating literal anymore;put 0 before dot"); } lex_state = EXPR_DOT; return '.'; start_num: case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { int is_float, seen_point, seen_e, nondigit; int suffix; is_float = seen_point = seen_e = nondigit = 0; lex_state = EXPR_END; newtok(); if (c == '-' || c == '+') { tokadd(c); c = nextc(); } if (c == '0') {#define no_digits() int start = toklen(); c = nextc(); if (c == 'x' || c == 'X') { c = nextc(); if (c != -1 && ISXDIGIT(c)) { do { if (c == '_') { if (nondigit) break; nondigit = c; continue; } if (!ISXDIGIT(c)) break; nondigit = 0; tokadd(c); } while ((c = nextc()) != -1); } pushback(c); tokfix(); if (toklen() == start) { no_digits(); } else if (nondigit) goto trailing_uc; suffix = number_literal_suffix(NUM_SUFFIX_ALL); return set_integer_literal(rb_cstr_to_inum(tok(), 16, FALSE), suffix); } if (c == 'b' || c == 'B') { c = nextc(); if (c == '0' || c == '1') { do { if (c == '_') { if (nondigit) break; nondigit = c; continue; } if (c != '0' && c != '1') break; nondigit = 0; tokadd(c); } while ((c = nextc()) != -1); } pushback(c); tokfix(); if (toklen() == start) { no_digits(); } else if (nondigit) goto trailing_uc; suffix = number_literal_suffix(NUM_SUFFIX_ALL); return set_integer_literal(rb_cstr_to_inum(tok(), 2, FALSE), suffix); } if (c == 'd' || c == 'D') { c = nextc(); if (c != -1 && ISDIGIT(c)) { do { if (c == '_') { if (nondigit) break; nondigit = c; continue; } if (!ISDIGIT(c)) break; nondigit = 0; tokadd(c); } while ((c = nextc()) != -1); } pushback(c); tokfix(); if (toklen() == start) { no_digits(); } else if (nondigit) goto trailing_uc; suffix = number_literal_suffix(NUM_SUFFIX_ALL); return set_integer_literal(rb_cstr_to_inum(tok(), 10, FALSE), suffix); } if (c == '_') { goto octal_number; } if (c == 'o' || c == 'O') { c = nextc(); if (c == -1 || c == '_' || !ISDIGIT(c)) { no_digits(); } } if (c >= '0' && c <= '7') { octal_number: do { if (c == '_') { if (nondigit) break; nondigit = c; continue; } if (c < '0' || c > '9') break; if (c > '7') goto invalid_octal; nondigit = 0; tokadd(c); } while ((c = nextc()) != -1); if (toklen() > start) { pushback(c); tokfix(); if (nondigit) goto trailing_uc; suffix = number_literal_suffix(NUM_SUFFIX_ALL); return set_integer_literal(rb_cstr_to_inum(tok(), 8, FALSE), suffix); } if (nondigit) { pushback(c); goto trailing_uc; } } if (c > '7' && c <= '9') { invalid_octal: yyerror("Invalid octal digit"); } else if (c == '.' || c == 'e' || c == 'E') { tokadd('0'); } else { pushback(c); suffix = number_literal_suffix(NUM_SUFFIX_ALL); return set_integer_literal(INT2FIX(0), suffix); } } for (;;) { switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': nondigit = 0; tokadd(c); break; case '.': if (nondigit) goto trailing_uc; if (seen_point || seen_e) { goto decode_num; } else { int c0 = nextc(); if (c0 == -1 || !ISDIGIT(c0)) { pushback(c0); goto decode_num; } c = c0; } seen_point = toklen(); tokadd('.'); tokadd(c); is_float++; nondigit = 0; break; case 'e': case 'E': if (nondigit) { pushback(c); c = nondigit; goto decode_num; } if (seen_e) { goto decode_num; } nondigit = c; c = nextc(); if (c != '-' && c != '+' && !ISDIGIT(c)) { pushback(c); nondigit = 0; goto decode_num; } tokadd(nondigit); seen_e++; is_float++; tokadd(c); nondigit = (c == '-' || c == '+') ? c : 0; break; case '_': if (nondigit) goto decode_num; nondigit = c; break; default: goto decode_num; } c = nextc(); } decode_num: pushback(c); if (nondigit) { char tmp[30]; trailing_uc: snprintf(tmp, sizeof(tmp), "trailing`%c'in number", nondigit); yyerror(tmp); } tokfix(); if (is_float) { int type = tFLOAT; VALUE v; suffix = number_literal_suffix(seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL); if (suffix & NUM_SUFFIX_R) { char *point = &tok()[seen_point]; size_t fraclen = toklen()-seen_point-1; type = tRATIONAL; memmove(point, point+1, fraclen+1); v = rb_cstr_to_inum(tok(), 10, FALSE); v = rb_rational_new(v, rb_int_positive_pow(10, fraclen)); } else { double d = strtod(tok(), 0); if (errno == ERANGE) { rb_warningS("Float%s out of range", tok()); errno = 0; } v = DBL2NUM(d); } return set_number_literal(v, type, suffix); } suffix = number_literal_suffix(NUM_SUFFIX_ALL); return set_integer_literal(rb_cstr_to_inum(tok(), 10, FALSE), suffix); } case ')': case '] | __pad16__ |
RUBY_EXTERN VALUE | rb_mKernel |
RUBY_EXTERN VALUE | rb_mComparable |
RUBY_EXTERN VALUE | rb_mEnumerable |
RUBY_EXTERN VALUE | rb_mErrno |
RUBY_EXTERN VALUE | rb_mFileTest |
RUBY_EXTERN VALUE | rb_mGC |
RUBY_EXTERN VALUE | rb_mMath |
RUBY_EXTERN VALUE | rb_mProcess |
RUBY_EXTERN VALUE | rb_mWaitReadable |
RUBY_EXTERN VALUE | rb_mWaitWritable |
RUBY_EXTERN VALUE | rb_cBasicObject |
RUBY_EXTERN VALUE | rb_cObject |
RUBY_EXTERN VALUE | rb_cArray |
RUBY_EXTERN VALUE | rb_cBignum |
RUBY_EXTERN VALUE | rb_cBinding |
RUBY_EXTERN VALUE | rb_cClass |
RUBY_EXTERN VALUE | rb_cCont |
RUBY_EXTERN VALUE | rb_cDir |
RUBY_EXTERN VALUE | rb_cData |
RUBY_EXTERN VALUE | rb_cFalseClass |
RUBY_EXTERN VALUE | rb_cEncoding |
RUBY_EXTERN VALUE | rb_cEnumerator |
RUBY_EXTERN VALUE | rb_cFile |
RUBY_EXTERN VALUE | rb_cFixnum |
RUBY_EXTERN VALUE | rb_cFloat |
RUBY_EXTERN VALUE | rb_cHash |
RUBY_EXTERN VALUE | rb_cInteger |
RUBY_EXTERN VALUE | rb_cIO |
RUBY_EXTERN VALUE | rb_cMatch |
RUBY_EXTERN VALUE | rb_cMethod |
RUBY_EXTERN VALUE | rb_cModule |
RUBY_EXTERN VALUE | rb_cNameErrorMesg |
RUBY_EXTERN VALUE | rb_cNilClass |
RUBY_EXTERN VALUE | rb_cNumeric |
RUBY_EXTERN VALUE | rb_cProc |
RUBY_EXTERN VALUE | rb_cRandom |
RUBY_EXTERN VALUE | rb_cRange |
RUBY_EXTERN VALUE | rb_cRational |
RUBY_EXTERN VALUE | rb_cComplex |
RUBY_EXTERN VALUE | rb_cRegexp |
RUBY_EXTERN VALUE | rb_cStat |
RUBY_EXTERN VALUE | rb_cString |
RUBY_EXTERN VALUE | rb_cStruct |
RUBY_EXTERN VALUE | rb_cSymbol |
RUBY_EXTERN VALUE | rb_cThread |
RUBY_EXTERN VALUE | rb_cTime |
RUBY_EXTERN VALUE | rb_cTrueClass |
RUBY_EXTERN VALUE | rb_cUnboundMethod |
RUBY_EXTERN VALUE | rb_eException |
RUBY_EXTERN VALUE | rb_eStandardError |
RUBY_EXTERN VALUE | rb_eSystemExit |
RUBY_EXTERN VALUE | rb_eInterrupt |
RUBY_EXTERN VALUE | rb_eSignal |
RUBY_EXTERN VALUE | rb_eFatal |
RUBY_EXTERN VALUE | rb_eArgError |
RUBY_EXTERN VALUE | rb_eEOFError |
RUBY_EXTERN VALUE | rb_eIndexError |
RUBY_EXTERN VALUE | rb_eStopIteration |
RUBY_EXTERN VALUE | rb_eKeyError |
RUBY_EXTERN VALUE | rb_eRangeError |
RUBY_EXTERN VALUE | rb_eIOError |
RUBY_EXTERN VALUE | rb_eRuntimeError |
RUBY_EXTERN VALUE | rb_eSecurityError |
RUBY_EXTERN VALUE | rb_eSystemCallError |
RUBY_EXTERN VALUE | rb_eThreadError |
RUBY_EXTERN VALUE | rb_eTypeError |
RUBY_EXTERN VALUE | rb_eZeroDivError |
RUBY_EXTERN VALUE | rb_eNotImpError |
RUBY_EXTERN VALUE | rb_eNoMemError |
RUBY_EXTERN VALUE | rb_eNoMethodError |
RUBY_EXTERN VALUE | rb_eFloatDomainError |
RUBY_EXTERN VALUE | rb_eLocalJumpError |
RUBY_EXTERN VALUE | rb_eSysStackError |
RUBY_EXTERN VALUE | rb_eRegexpError |
RUBY_EXTERN VALUE | rb_eEncodingError |
RUBY_EXTERN VALUE | rb_eEncCompatError |
RUBY_EXTERN VALUE | rb_eScriptError |
RUBY_EXTERN VALUE | rb_eNameError |
RUBY_EXTERN VALUE | rb_eSyntaxError |
RUBY_EXTERN VALUE | rb_eLoadError |
RUBY_EXTERN VALUE | rb_eMathDomainError |
RUBY_EXTERN VALUE | rb_stdin |
RUBY_EXTERN VALUE | rb_stdout |
RUBY_EXTERN VALUE | rb_stderr |
RUBY_EXTERN VALUE | rb_fs |
RUBY_EXTERN VALUE | rb_output_fs |
RUBY_EXTERN VALUE | rb_rs |
RUBY_EXTERN VALUE | rb_default_rs |
RUBY_EXTERN VALUE | rb_output_rs |
RUBY_EXTERN int | ruby_sourceline |
RUBY_EXTERN char * | ruby_sourcefile |
RUBY_EXTERN VALUE | rb_argv0 |
ONIG_EXTERN OnigCaseFoldType | OnigDefaultCaseFoldFlag |
ONIG_EXTERN OnigEncodingType | OnigEncodingASCII |
ONIG_EXTERN const OnigSyntaxType | OnigSyntaxASIS |
ONIG_EXTERN const OnigSyntaxType | OnigSyntaxPosixBasic |
ONIG_EXTERN const OnigSyntaxType | OnigSyntaxPosixExtended |
ONIG_EXTERN const OnigSyntaxType | OnigSyntaxEmacs |
ONIG_EXTERN const OnigSyntaxType | OnigSyntaxGrep |
ONIG_EXTERN const OnigSyntaxType | OnigSyntaxGnuRegex |
ONIG_EXTERN const OnigSyntaxType | OnigSyntaxJava |
ONIG_EXTERN const OnigSyntaxType | OnigSyntaxPerl58 |
ONIG_EXTERN const OnigSyntaxType | OnigSyntaxPerl58_NG |
ONIG_EXTERN const OnigSyntaxType | OnigSyntaxPerl |
ONIG_EXTERN const OnigSyntaxType | OnigSyntaxRuby |
ONIG_EXTERN const OnigSyntaxType | OnigSyntaxPython |
ONIG_EXTERN const OnigSyntaxType * | OnigDefaultSyntax |
RUBY_EXTERN VALUE | rb_cEncoding |
const signed char | ruby_digit36_to_number_table [] |
ONIG_EXTERN const UChar | OnigEncISO_8859_1_ToLowerCaseTable [] |
ONIG_EXTERN const UChar | OnigEncISO_8859_1_ToUpperCaseTable [] |
ONIG_EXTERN OnigEncoding | OnigEncDefaultCharEncoding |
ONIG_EXTERN const UChar | OnigEncAsciiToLowerCaseTable [] |
ONIG_EXTERN const UChar | OnigEncAsciiToUpperCaseTable [] |
ONIG_EXTERN const unsigned short | OnigEncAsciiCtypeTable [] |
pure parser lex | param |
top_compstmt | __pad0__ |
top_stmts | __pad1__ |
top_stmt | |
top_stmt | __pad2__ |
top_stmt | bodystmt |
compstmt | __pad3__ |
stmts | __pad4__ |
stmt_or_begin | |
error | stmt |
stmt_or_begin | __pad5__ |
keyword_BEGIN | |
command_asgn | __pad6__ |
command_asgn | lhs |
expr | __pad7__ |
expr expr keyword_or | expr |
command_call | |
arg | |
expr_value | __pad8__ |
command_call | __pad9__ |
block_command | __pad10__ |
block_command | cmd_brace_block = method_arg($$, $4) |
opt_block_param | compstmt |
fcall | __pad11__ |
command | __pad12__ |
primary_value operation2 command_args prec | tLOWEST |
keyword_super | command_args |
keyword_return | call_args |
mlhs | __pad13__ |
mlhs | mlhs_inner |
mlhs | mlhs_basic |
mlhs_head | mlhs_item |
mlhs_head tSTAR | mlhs_node |
mlhs_head tSTAR | mlhs_post |
mlhs_head | tSTAR |
mlhs_item | __pad14__ = mlhs_add($$, $3) |
mlhs_item | mlhs_head |
mlhs_node | __pad15__ |
mlhs_node | keyword_variable |
case | __pad17__ |
else | lex_state = EXPR_ENDARG |
return | c |
case | __pad18__ |
return | tSYMBEG |
case | __pad19__ |
case return | tREGEXP_BEG |
return | |
case | __pad20__ |
return | tOP_ASGN |
case | |
__pad21__ | |
command_start = TRUE | |
__pad22__ | |
case | __pad23__ |
else | |
#define ambiguous_operator | ( | op, | |
syn | |||
) |
#define arg_ambiguous | ( | ) | (arg_ambiguous_gen(parser), 1) |
Referenced by if().
#define aryset | ( | node1, | |
node2 | |||
) | aryset_gen(parser, (node1), (node2)) |
#define assignable | ( | id, | |
node | |||
) | assignable_gen(parser, (id), (node)) |
#define assignable_result | ( | x | ) | (x) |
#define attrset | ( | node, | |
id | |||
) | attrset_gen(parser, (node), (id)) |
#define BITSTACK_LEXPOP | ( | stack | ) | ((stack) = ((stack) >> 1) | ((stack) & 1)) |
#define block_append | ( | h, | |
t | |||
) | block_append_gen(parser,(h),(t)) |
#define block_dup_check | ( | n1, | |
n2 | |||
) | block_dup_check_gen(parser,(n1),(n2)) |
#define brace_nest (parser->parser_brace_nest) |
#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)) |
Definition at line 412 of file ripper.y.
Referenced by rb_uint2num_inline().
#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 compile_error parser->nerr++,rb_compile_error_with_enc |
Definition at line 369 of file ripper.y.
Referenced by rb_uint2num_inline().
#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 dispatch_heredoc_end | ( | ) | ((void)0) |
#define dsym_node | ( | node | ) | dsym_node_gen(parser, (node)) |
#define dvar_defined | ( | id | ) | dvar_defined_gen(parser, (id), 0) |
#define dvar_defined_get | ( | id | ) | dvar_defined_gen(parser, (id), 1) |
#define dyna_in_block | ( | ) | dyna_in_block_gen(parser) |
#define dyna_pop | ( | node | ) | dyna_pop_gen(parser, (node)) |
#define dyna_push | ( | ) | dyna_push_gen(parser) |
#define ENABLE_SELECTOR_NAMESPACE 0 |
#define ENC_SINGLE | ( | cr | ) | ((cr)==ENC_CODERANGE_7BIT) |
#define ESCAPE_CONTROL 1 |
#define ESCAPE_META 2 |
#define formal_argument | ( | id | ) | formal_argument_gen(parser, (id)) |
#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 id_type | ( | id | ) | (is_notop_id(id) ? (int)((id)&ID_SCOPE_MASK) : -1) |
#define IDSET_ATTRSET_FOR_INTERN (~(~0U<<ID_SCOPE_MASK) & ~(1U<<ID_ATTRSET)) |
#define IDSET_ATTRSET_FOR_SYNTAX ((1U<<ID_LOCAL)|(1U<<ID_CONST)) |
#define internal_id | ( | ) | internal_id_gen(parser) |
#define IS_AFTER_OPERATOR | ( | ) | IS_lex_state(EXPR_FNAME | EXPR_DOT) |
#define IS_ARG | ( | ) | IS_lex_state(EXPR_ARG_ANY) |
#define is_asgn_or_id | ( | id | ) |
#define is_attrset_id | ( | id | ) | (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET) |
#define IS_BEG | ( | ) | IS_lex_state(EXPR_BEG_ANY) |
#define is_class_id | ( | id | ) | (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS) |
#define is_const_id | ( | id | ) | (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST) |
#define IS_END | ( | ) | IS_lex_state(EXPR_END_ANY) |
#define is_global_id | ( | id | ) | (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL) |
#define is_identchar | ( | p, | |
e, | |||
enc | |||
) | (rb_enc_isalnum((unsigned char)(*(p)),(enc)) || (*(p)) == '_' || !ISASCII(*(p))) |
#define is_instance_id | ( | id | ) | (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE) |
#define is_junk_id | ( | id | ) | (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK) |
#define IS_LABEL_POSSIBLE | ( | ) | ((IS_lex_state(EXPR_BEG | EXPR_ENDFN) && !cmd_state) || IS_ARG()) |
#define IS_lex_state | ( | ls | ) | IS_lex_state_for(lex_state, (ls)) |
#define is_local_id | ( | id | ) | (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL) |
#define is_notop_id | ( | id | ) | ((id)>tLAST_OP_ID) |
#define lex_strterm (parser->parser_lex_strterm) |
#define list_append | ( | l, | |
i | |||
) | list_append_gen(parser,(l),(i)) |
#define list_concat | ( | h, | |
t | |||
) | list_concat_gen(parser,(h),(t)) |
#define literal_concat | ( | h, | |
t | |||
) | literal_concat_gen(parser,(h),(t)) |
#define local_pop | ( | ) | local_pop_gen(parser) |
#define local_tbl | ( | ) | local_tbl_gen(parser) |
#define match_op | ( | node1, | |
node2 | |||
) | match_op_gen(parser, (node1), (node2)) |
#define mixed_error | ( | enc1, | |
enc2 | |||
) |
#define mixed_escape | ( | beg, | |
enc1, | |||
enc2 | |||
) |
#define nd_term | ( | node | ) | SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) |
#define new_args_tail | ( | k, | |
kr, | |||
b | |||
) | new_args_tail_gen(parser, (k),(kr),(b)) |
#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 new_op_assign | ( | lhs, | |
op, | |||
rhs | |||
) | new_op_assign_gen(parser, (lhs), (op), (rhs)) |
#define NEW_STRTERM | ( | func, | |
term, | |||
paren | |||
) | rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) |
#define new_yield | ( | node | ) | new_yield_gen(parser, (node)) |
#define NEWHEAP | ( | ) | rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) |
#define newtok | ( | ) | parser_newtok(parser) |
#define nextc | ( | ) | parser_nextc(parser) |
#define node_assign | ( | node1, | |
node2 | |||
) | node_assign_gen(parser, (node1), (node2)) |
Definition at line 441 of file ripper.y.
Referenced by rb_obj_write().
#define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ |
#define NODE_STRTERM NODE_ZARRAY /* nothing to gc */ |
#define NUM_SUFFIX_ALL 3 |
#define NUM_SUFFIX_I (1<<1) |
#define NUM_SUFFIX_R (1<<0) |
#define number_literal_suffix | ( | f | ) | parser_number_literal_suffix(parser, (f)) |
#define parse_string | ( | n | ) | parser_parse_string(parser,(n)) |
#define PARSER_ARG ruby_sourcefile, ruby_sourceline, current_enc, |
#define PARSER_DEBUG 0 |
#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_precise_mbclen | ( | ) | rb_enc_precise_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_compile_error rb_compile_error_with_enc |
#define rb_node_newnode | ( | type, | |
a1, | |||
a2, | |||
a3 | |||
) | node_newnode(parser, (type), (a1), (a2), (a3)) |
#define rb_warn0 | ( | fmt | ) | rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt)) |
#define rb_warn4S | ( | file, | |
line, | |||
fmt, | |||
a | |||
) | rb_compile_warn((file), (line), (fmt), (a)) |
#define rb_warnI | ( | fmt, | |
a | |||
) | rb_compile_warn(ruby_sourcefile, ruby_sourceline, (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_warnS | ( | fmt, | |
a | |||
) | rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) |
#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 reg_named_capture_assign | ( | regexp, | |
match | |||
) | reg_named_capture_assign_gen(parser,(regexp),(match)) |
#define regx_options | ( | ) | parser_regx_options(parser) |
#define ret_args | ( | node | ) | ret_args_gen(parser, (node)) |
#define ruby_debug_lines (parser->debug_lines) |
#define ruby_eval_tree_begin (parser->parser_eval_tree_begin) |
#define ruby_sourcefile_string (parser->parser_ruby_sourcefile_string) |
#define set_yylval_literal | ( | x | ) | (yylval.node = NEW_LIT(x)) |
#define set_yylval_name | ( | x | ) | (yylval.id = (x)) |
#define set_yylval_node | ( | x | ) | (yylval.node = (x)) |
#define set_yylval_num | ( | x | ) | (yylval.num = (x)) |
#define set_yylval_str | ( | x | ) | (yylval.node = NEW_STR(x)) |
#define shadowing_lvar | ( | name | ) | shadowing_lvar_gen(parser, (name)) |
#define str_copy | ( | _s, | |
_p, | |||
_n | |||
) |
#define STR_FUNC_ESCAPE 0x01 |
#define STR_FUNC_EXPAND 0x02 |
#define STR_FUNC_INDENT 0x20 |
#define STR_FUNC_QWORDS 0x08 |
#define STR_FUNC_REGEXP 0x04 |
#define STR_FUNC_SYMBOL 0x10 |
#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 tok | ( | ) | tokenbuf |
#define tok_hex | ( | numlen | ) | parser_tok_hex(parser, (numlen)) |
#define TOK_INTERN | ( | mb | ) | rb_intern3(tok(), toklen(), current_enc) |
#define tokadd | ( | c | ) | parser_tokadd(parser, (c)) |
#define tokadd_escape | ( | e | ) | parser_tokadd_escape(parser, (e)) |
#define tokadd_mbchar | ( | c | ) | parser_tokadd_mbchar(parser, (c)) |
#define toklen | ( | ) | tokidx |
#define tokspace | ( | n | ) | parser_tokspace(parser, (n)) |
#define value_expr | ( | node | ) | value_expr_gen(parser, (node) = remove_begin(node)) |
Definition at line 380 of file ripper.y.
Referenced by rb_obj_write().
#define void_expr | ( | node | ) | void_expr0((node) = remove_begin(node)) |
#define void_expr0 | ( | node | ) | void_expr_gen(parser, (node)) |
#define void_stmts | ( | node | ) | void_stmts_gen(parser, (node)) |
#define warn_balanced | ( | op, | |
syn | |||
) |
#define YYCALLOC | ( | nelem, | |
size | |||
) | rb_parser_calloc(parser, (nelem), (size)) |
#define YYDEBUG 1 |
#define YYERROR_VERBOSE 1 |
#define yylval (*((YYSTYPE*)(parser->parser_yylval))) |
#define yylval_id | ( | ) | (yylval.id) |
#define YYSTACK_USE_ALLOCA 0 |
typedef int(* OnigApplyAllCaseFoldFunc)(OnigCodePoint from, OnigCodePoint *to, int to_len, void *arg) |
typedef struct OnigCaptureTreeNodeStruct OnigCaptureTreeNode |
typedef unsigned int OnigCaseFoldType |
typedef unsigned int OnigCodePoint |
typedef size_t OnigDistance |
typedef OnigEncodingType* OnigEncoding |
typedef struct OnigEncodingTypeST OnigEncodingType |
typedef unsigned int OnigOptionType |
typedef ptrdiff_t OnigPosition |
typedef OnigRegexType* OnigRegex |
typedef struct re_pattern_buffer OnigRegexType |
typedef struct re_registers OnigRegion |
typedef VALUE rb_block_call_func(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg)) |
typedef struct rb_classext_struct rb_classext_t |
typedef struct rb_data_type_struct rb_data_type_t |
typedef struct rb_econv_t rb_econv_t |
typedef OnigEncodingType rb_encoding |
typedef unsigned long rb_event_flag_t |
typedef fd_set rb_fdset_t |
typedef unsigned long rb_serial_t |
typedef struct rb_subclass_entry rb_subclass_entry_t |
typedef OnigRegexType regex_t |
typedef char ruby_check_sizeof_long[SIZEOF_LONG==sizeof(long)?1:-1] |
typedef char st_check_for_sizeof_st_index_t[SIZEOF_VOIDP==(int) sizeof(st_index_t)?1:-1] |
typedef st_index_t st_hash_func(st_data_t) |
typedef st_data_t st_index_t |
typedef VALUE stack_type |
typedef struct token_info token_info |
static VALUE |
enum lex_state_bits |
enum lex_state_e |
enum node_type |
enum rb_econv_result_t |
enum ruby_id_types |
enum ruby_method_ids |
enum ruby_special_consts |
enum ruby_value_type |
enum st_retval |
enum yytokentype |
RUBY_SYMBOL_EXPORT_BEGIN RUBY_EXTERN double acosh | ( | double | ) |
Definition at line 36 of file acosh.c.
Referenced by math_acosh().
RUBY_SYMBOL_EXPORT_BEGIN void* alloca | ( | ) |
|
static |
|
static |
|
static |
|
static |
RUBY_EXTERN double asinh | ( | double | ) |
Definition at line 52 of file acosh.c.
Referenced by math_asinh().
|
static |
RUBY_EXTERN double atanh | ( | double | ) |
Definition at line 75 of file acosh.c.
Referenced by math_atanh().
|
static |
|
static |
|
static |
|
static |
|
static |
RUBY_EXTERN double cbrt | ( | double | ) |
Definition at line 4 of file cbrt.c.
Referenced by math_cbrt().
|
static |
RUBY_EXTERN char* crypt | ( | const char * | , |
const char * | |||
) |
Referenced by rb_str_crypt().
DEPRECATED | ( | VALUE | rb_big2str0VALUE, int, int | ) |
DEPRECATED | ( | VALUE | rb_big2ulong_packVALUE x | ) |
DEPRECATED | ( | void | rb_quad_packchar *, VALUE | ) |
DEPRECATED | ( | VALUE | rb_quad_unpackconst char *, int | ) |
DEPRECATED | ( | void | rb_thread_pollingvoid | ) |
DEPRECATED | ( | int | rb_thread_selectint, fd_set *, fd_set *, fd_set *, struct timeval * | ) |
DEPRECATED | ( | void | rb_gc_set_paramsvoid | ) |
DEPRECATED | ( | void | rb_check_safe_strVALUE | ) |
DEPRECATED | ( | int | rb_proc_exec_nint, VALUE *, const char * | ) |
DEPRECATED | ( | VALUE | rb_exec_arg_initint argc, VALUE *argv, int accept_shell, struct rb_exec_arg *e | ) |
DEPRECATED | ( | int | rb_exec_arg_addoptstruct rb_exec_arg *e, VALUE key, VALUE val | ) |
DEPRECATED | ( | void | rb_exec_arg_fixupstruct rb_exec_arg *e | ) |
DEPRECATED | ( | int | rb_run_exec_optionsconst struct rb_exec_arg *e, struct rb_exec_arg *s | ) |
DEPRECATED | ( | int | rb_run_exec_options_errconst struct rb_exec_arg *e, struct rb_exec_arg *s, char *, size_t | ) |
DEPRECATED | ( | int | rb_execconst struct rb_exec_arg * | ) |
DEPRECATED | ( | int | rb_exec_errconst struct rb_exec_arg *, char *, size_t | ) |
DEPRECATED | ( | rb_pid_t | rb_forkint *, int(*)(void *), void *, VALUE | ) |
DEPRECATED | ( | rb_pid_t | rb_fork_errint *, int(*)(void *, char *, size_t), void *, VALUE, char *, size_t | ) |
DEPRECATED | ( | VALUE | rb_struct_iv_getVALUE, const char * | ) |
DEPRECATED | ( | VALUE | rb_thread_blocking_regionrb_blocking_function_t *func, void *data1, rb_unblock_function_t *ubf, void *data2 | ) |
DEPRECATED | ( | void | rb_frame_popvoid | ) |
stmts dispatch0 | ( | stmts_new | ) |
Referenced by arg_ambiguous_gen(), and switch().
stmts dispatch0 | ( | void_stmt | ) |
|
static |
RUBY_EXTERN int dup2 | ( | int | , |
int | |||
) |
Definition at line 27 of file dup2.c.
Referenced by chfunc(), fill_standard_fds(), goruby_options(), main(), rb_cloexec_dup2(), and rb_w32_dup2().
|
static |
|
static |
|
static |
dyna_pop | ( | $< vars > | ) |
|
static |
|
static |
RUBY_EXTERN int eaccess | ( | const char * | , |
int | |||
) |
Definition at line 1147 of file file.c.
Referenced by dln_find_1(), rb_file_executable_p(), rb_file_readable_p(), and rb_file_writable_p().
RUBY_EXTERN double erf | ( | double | ) |
Definition at line 71 of file erf.c.
Referenced by math_erf().
RUBY_EXTERN double erfc | ( | double | ) |
Definition at line 81 of file erf.c.
Referenced by math_erfc().
|
static |
RUBY_EXTERN int ffs | ( | int | ) |
Definition at line 6 of file ffs.c.
Referenced by big2str_base_poweroftwo(), and rb_str_format().
RUBY_EXTERN int finite | ( | double | ) |
RUBY_EXTERN int flock | ( | int | , |
int | |||
) |
Definition at line 125 of file flock.c.
Referenced by rb_thread_flock().
|
static |
|
static |
RUBY_EXTERN double hypot | ( | double | , |
double | |||
) |
Definition at line 6 of file hypot.c.
Referenced by math_hypot().
if | ( | c | = = ')' | ) |
Definition at line 7753 of file ripper.y.
References brace_nest, and tSTRING_DEND.
Definition at line 7768 of file ripper.y.
References lex_state, pushback, and warn_balanced.
Definition at line 7793 of file ripper.y.
References lex_state, set_yylval_id, and tOP_ASGN.
Definition at line 7799 of file ripper.y.
References arg_ambiguous, lex_strterm, NEW_STRTERM, str_regexp, tREGEXP_BEG, and void.
Definition at line 2800 of file vm.c.
Referenced by ruby_setup().
Definition at line 1720 of file vm_method.c.
Referenced by Init_eval().
Definition at line 1661 of file gc.c.
Referenced by ruby_setup().
Definition at line 15 of file ripper.y.
Referenced by Init_sym().
Referenced by Init_BareVM().
Definition at line 183 of file newline.c.
Referenced by Init_transcode().
Referenced by ruby_init_prelude().
Definition at line 991 of file vm_backtrace.c.
Referenced by Init_VM().
Definition at line 1974 of file vm_eval.c.
Referenced by Init_eval().
|
static |
RUBY_EXTERN int isinf | ( | double | ) |
Definition at line 56 of file isinf.c.
Referenced by atanh(), BigMath_s_exp(), BigMath_s_log(), BSD_vfprintf(), c_valid_start_p(), c_virtual_sg(), dbl2big(), finite(), flo_cmp(), flo_is_finite_p(), flo_is_infinite_p(), flo_round(), flo_to_s(), float_denominator(), float_numerator(), float_value(), flodivmod(), generate_json_float(), guess_style(), m_julian_p(), m_proleptic_gregorian_p(), m_proleptic_julian_p(), math_atan2(), math_gamma(), math_lgamma(), num_step(), rand_range(), rb_big2dbl(), rb_big_fdiv(), rb_integer_float_cmp(), rb_integer_float_eq(), rb_str_format(), ruby_float_step(), ruby_float_step_size(), ruby_hdtoa(), ruby_num_interval_step_size(), s_virtual_sg(), VpDtoV(), and w_float().
RUBY_EXTERN int isnan | ( | double | ) |
RUBY_EXTERN double lgamma_r | ( | double | , |
int * | |||
) |
Definition at line 63 of file lgamma_r.c.
Referenced by math_lgamma().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
RUBY_EXTERN void* memmove | ( | void * | , |
const void * | , | ||
size_t | |||
) |
Definition at line 7 of file memmove.c.
Referenced by BigDecimal_split(), delpair(), extract_fd(), fill_cbuf(), flo_to_s(), io_shift_cbuf(), parser_yylex(), rb_ary_sample(), rb_str_drop_bytes(), rb_str_lstrip_bang(), rb_str_splice_0(), rb_str_sub_bang(), rb_str_succ(), rb_w32_fdclr(), rb_w32_strerror(), remove_backslashes(), strio_ungetbyte(), strio_write(), stub_sysinit(), sym_inspect(), VpFormatSt(), VpNmlz(), yaml_parser_update_buffer(), yaml_parser_update_raw_buffer(), yaml_queue_extend(), zstream_buffer_ungetbyte(), zstream_buffer_ungets(), zstream_discard_input(), and zstream_shift_buffer().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
NORETURN | ( | void | rb_cmperrVALUE, VALUE | ) |
NORETURN | ( | void | rb_invalid_strconst char *, const char * | ) |
NORETURN | ( | void | rb_error_frozenconst char * | ) |
NORETURN | ( | void | rb_error_arityint, int, int | ) |
NORETURN | ( | void | rb_exc_raiseVALUE | ) |
NORETURN | ( | void | rb_exc_fatalVALUE | ) |
NORETURN | ( | void | rb_jump_tagint | ) |
NORETURN | ( | PRINTF_ARGS(void rb_compile_bug(const char *, int, const char *,...), 3, 4) | ) |
NORETURN | ( | void | rb_async_bug_errnoconst char *, int | ) |
NORETURN | ( | void | rb_memerrorvoid | ) |
NORETURN | ( | void | rb_load_failVALUE, const char * | ) |
NORETURN | ( | void | rb_num_zerodivvoid | ) |
NORETURN | ( | void | rb_insecure_operationvoid | ) |
NORETURN | ( | void | rb_undefined_allocVALUE klass | ) |
NORETURN | ( | void | rb_bug_errnoconst char *, int | ) |
NORETURN | ( | void | rb_sys_failconst char * | ) |
NORETURN | ( | void | rb_sys_fail_strVALUE | ) |
NORETURN | ( | void | rb_mod_sys_failVALUE, const char * | ) |
NORETURN | ( | void | rb_mod_sys_fail_strVALUE, VALUE | ) |
NORETURN | ( | void | rb_readwrite_sys_failint, const char * | ) |
NORETURN | ( | void | rb_iter_breakvoid | ) |
NORETURN | ( | void | rb_iter_break_valueVALUE | ) |
NORETURN | ( | void | rb_exitint | ) |
NORETURN | ( | void | rb_notimplementvoid | ) |
NORETURN | ( | void | rb_syserr_failint, const char * | ) |
NORETURN | ( | void | rb_syserr_fail_strint, VALUE | ) |
NORETURN | ( | void | rb_mod_syserr_failVALUE, int, const char * | ) |
NORETURN | ( | void | rb_mod_syserr_fail_strVALUE, int, VALUE | ) |
NORETURN | ( | void | rb_throwconst char *, VALUE | ) |
NORETURN | ( | void | rb_throw_objVALUE, VALUE | ) |
ONIG_EXTERN int onigenc_ascii_apply_all_case_fold P_ | ( | (OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void *arg, OnigEncoding enc) | ) |
ONIG_EXTERN int onigenc_ascii_get_case_fold_codes_by_str P_ | ( | (OnigCaseFoldType flag, const OnigUChar *p, const OnigUChar *end, OnigCaseFoldCodeItem items[], OnigEncoding enc) | ) |
ONIG_EXTERN int onigenc_apply_all_case_fold_with_map P_ | ( | (int map_size, const OnigPairCaseFoldCodes map[], int ess_tsett_flag, OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void *arg) | ) |
ONIG_EXTERN int onigenc_get_case_fold_codes_by_str_with_map P_ | ( | (int map_size, const OnigPairCaseFoldCodes map[], int ess_tsett_flag, OnigCaseFoldType flag, const OnigUChar *p, const OnigUChar *end, OnigCaseFoldCodeItem items[]) | ) |
ONIG_EXTERN int onigenc_not_support_get_ctype_code_range P_ | ( | (OnigCtype ctype, OnigCodePoint *sb_out, const OnigCodePoint *ranges[], OnigEncoding enc) | ) |
ONIG_EXTERN int onigenc_is_mbc_newline_0x0a P_ | ( | (const UChar *p, const UChar *end, OnigEncoding enc) | ) |
ONIG_EXTERN int onigenc_ascii_mbc_case_fold P_ | ( | (OnigCaseFoldType flag, const UChar **p, const UChar *end, UChar *lower, OnigEncoding enc) | ) |
ONIG_EXTERN int onigenc_single_byte_mbc_enc_len P_ | ( | (const UChar *p, const UChar *e, OnigEncoding enc) | ) |
ONIG_EXTERN OnigCodePoint onigenc_single_byte_mbc_to_code P_ | ( | (const UChar *p, const UChar *end, OnigEncoding enc) | ) |
ONIG_EXTERN int onigenc_single_byte_code_to_mbc P_ | ( | (OnigCodePoint code, UChar *buf, OnigEncoding enc) | ) |
ONIG_EXTERN UChar* onigenc_single_byte_left_adjust_char_head P_ | ( | (const UChar *start, const UChar *s, const OnigUChar *end, OnigEncoding enc) | ) |
ONIG_EXTERN int onigenc_always_true_is_allowed_reverse_match P_ | ( | (const UChar *s, const UChar *end, OnigEncoding enc) | ) |
ONIG_EXTERN int onigenc_always_false_is_allowed_reverse_match P_ | ( | (const UChar *s, const UChar *end, OnigEncoding enc) | ) |
ONIG_EXTERN int onigenc_ascii_is_code_ctype P_ | ( | (OnigCodePoint code, unsigned int ctype, OnigEncoding enc) | ) |
ONIG_EXTERN OnigCodePoint onigenc_mbn_mbc_to_code P_ | ( | (OnigEncoding enc, const UChar *p, const UChar *end) | ) |
ONIG_EXTERN int onigenc_mbn_mbc_case_fold P_ | ( | (OnigEncoding enc, OnigCaseFoldType flag, const UChar **p, const UChar *end, UChar *lower) | ) |
ONIG_EXTERN int onigenc_mb2_code_to_mbc P_ | ( | (OnigEncoding enc, OnigCodePoint code, UChar *buf) | ) |
ONIG_EXTERN int onigenc_minimum_property_name_to_ctype P_ | ( | (OnigEncoding enc, UChar *p, UChar *end) | ) |
ONIG_EXTERN int onigenc_unicode_property_name_to_ctype P_ | ( | (OnigEncoding enc, UChar *p, UChar *end) | ) |
ONIG_EXTERN int onigenc_mb2_is_code_ctype P_ | ( | (OnigEncoding enc, OnigCodePoint code, unsigned int ctype) | ) |
ONIG_EXTERN int onigenc_mb4_code_to_mbc P_ | ( | (OnigEncoding enc, OnigCodePoint code, UChar *buf) | ) |
ONIG_EXTERN int onigenc_mb4_is_code_ctype P_ | ( | (OnigEncoding enc, OnigCodePoint code, unsigned int ctype) | ) |
ONIG_EXTERN int onigenc_unicode_is_code_ctype P_ | ( | (OnigCodePoint code, unsigned int ctype, OnigEncoding enc) | ) |
ONIG_EXTERN int onigenc_utf16_32_get_ctype_code_range P_ | ( | (OnigCtype ctype, OnigCodePoint *sb_out, const OnigCodePoint *ranges[], OnigEncoding enc) | ) |
ONIG_EXTERN int onigenc_unicode_ctype_code_range P_ | ( | (int ctype, const OnigCodePoint *ranges[]) | ) |
ONIG_EXTERN int onigenc_unicode_get_case_fold_codes_by_str P_ | ( | (OnigEncoding enc, OnigCaseFoldType flag, const OnigUChar *p, const OnigUChar *end, OnigCaseFoldCodeItem items[]) | ) |
ONIG_EXTERN int onigenc_unicode_mbc_case_fold P_ | ( | (OnigEncoding enc, OnigCaseFoldType flag, const UChar **pp, const UChar *end, UChar *fold) | ) |
ONIG_EXTERN int onigenc_unicode_apply_all_case_fold P_ | ( | (OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void *arg, OnigEncoding enc) | ) |
ONIG_EXTERN int onigenc_with_ascii_strncmp P_ | ( | (OnigEncoding enc, const UChar *p, const UChar *end, const UChar *sascii, int n) | ) |
ONIG_EXTERN int onigenc_with_ascii_strnicmp P_ | ( | (OnigEncoding enc, const UChar *p, const UChar *end, const UChar *sascii, int n) | ) |
ONIG_EXTERN UChar* onigenc_step P_ | ( | (OnigEncoding enc, const UChar *p, const UChar *end, int n) | ) |
int onig_is_in_code_range P_ | ( | (const UChar *p, OnigCodePoint code) | ) |
ONIG_EXTERN int onigenc_mbclen_approximate P_ | ( | (const OnigUChar *p, const OnigUChar *e, struct OnigEncodingTypeST *enc) | ) |
ONIG_EXTERN OnigUChar* onigenc_step_back P_ | ( | (OnigEncoding enc, const OnigUChar *start, const OnigUChar *s, const OnigUChar *end, int n) | ) |
ONIG_EXTERN int onigenc_init P_ | ( | (void) | ) |
ONIG_EXTERN OnigUChar* onigenc_get_right_adjust_char_head_with_prev P_ | ( | (OnigEncoding enc, const OnigUChar *start, const OnigUChar *s, const OnigUChar *end, const OnigUChar **prev) | ) |
ONIG_EXTERN OnigUChar* onigenc_get_prev_char_head P_ | ( | (OnigEncoding enc, const OnigUChar *start, const OnigUChar *s, const OnigUChar *end) | ) |
ONIG_EXTERN OnigUChar* onigenc_get_left_adjust_char_head P_ | ( | (OnigEncoding enc, const OnigUChar *start, const OnigUChar *s, const OnigUChar *end) | ) |
ONIG_EXTERN OnigUChar* onigenc_get_right_adjust_char_head P_ | ( | (OnigEncoding enc, const OnigUChar *start, const OnigUChar *s, const OnigUChar *end) | ) |
ONIG_EXTERN int onigenc_strlen P_ | ( | (OnigEncoding enc, const OnigUChar *p, const OnigUChar *end) | ) |
ONIG_EXTERN int onigenc_strlen_null P_ | ( | (OnigEncoding enc, const OnigUChar *p) | ) |
ONIG_EXTERN int onigenc_str_bytelen_null P_ | ( | (OnigEncoding enc, const OnigUChar *p) | ) |
void onig_null_warn P_ | ( | (const char *s) | ) |
ONIG_EXTERN int onig_init P_ | ( | (void) | ) |
ONIG_EXTERN void onig_set_warn_func P_ | ( | (OnigWarnFunc f) | ) |
ONIG_EXTERN void onig_set_verb_warn_func P_ | ( | (OnigWarnFunc f) | ) |
ONIG_EXTERN int onig_new P_ | ( | (OnigRegex *, const OnigUChar *pattern, const OnigUChar *pattern_end, OnigOptionType option, OnigEncoding enc, const OnigSyntaxType *syntax, OnigErrorInfo *einfo) | ) |
ONIG_EXTERN int onig_reg_init P_ | ( | (OnigRegex reg, OnigOptionType option, OnigCaseFoldType case_fold_flag, OnigEncoding enc, const OnigSyntaxType *syntax) | ) |
ONIG_EXTERN int onig_new_without_alloc P_ | ( | (OnigRegex, const OnigUChar *pattern, const OnigUChar *pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType *syntax, OnigErrorInfo *einfo) | ) |
ONIG_EXTERN int onig_new_deluxe P_ | ( | (OnigRegex *reg, const OnigUChar *pattern, const OnigUChar *pattern_end, OnigCompileInfo *ci, OnigErrorInfo *einfo) | ) |
ONIG_EXTERN void onig_free P_ | ( | (OnigRegex) | ) |
ONIG_EXTERN void onig_free_body P_ | ( | (OnigRegex) | ) |
ONIG_EXTERN int onig_recompile P_ | ( | (OnigRegex, const OnigUChar *pattern, const OnigUChar *pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType *syntax, OnigErrorInfo *einfo) | ) |
ONIG_EXTERN int onig_recompile_deluxe P_ | ( | (OnigRegex reg, const OnigUChar *pattern, const OnigUChar *pattern_end, OnigCompileInfo *ci, OnigErrorInfo *einfo) | ) |
ONIG_EXTERN OnigPosition onig_search P_ | ( | (OnigRegex, const OnigUChar *str, const OnigUChar *end, const OnigUChar *start, const OnigUChar *range, OnigRegion *region, OnigOptionType option) | ) |
ONIG_EXTERN OnigPosition onig_search_gpos P_ | ( | (OnigRegex, const OnigUChar *str, const OnigUChar *end, const OnigUChar *global_pos, const OnigUChar *start, const OnigUChar *range, OnigRegion *region, OnigOptionType option) | ) |
ONIG_EXTERN OnigPosition onig_match P_ | ( | (OnigRegex, const OnigUChar *str, const OnigUChar *end, const OnigUChar *at, OnigRegion *region, OnigOptionType option) | ) |
ONIG_EXTERN OnigRegion* onig_region_new P_ | ( | (void) | ) |
ONIG_EXTERN void onig_region_init P_ | ( | (OnigRegion *region) | ) |
ONIG_EXTERN void onig_region_free P_ | ( | (OnigRegion *region, int free_self) | ) |
ONIG_EXTERN void onig_region_copy P_ | ( | (OnigRegion *to, OnigRegion *from) | ) |
ONIG_EXTERN void onig_region_clear P_ | ( | (OnigRegion *region) | ) |
ONIG_EXTERN int onig_region_resize P_ | ( | (OnigRegion *region, int n) | ) |
ONIG_EXTERN int onig_region_set P_ | ( | (OnigRegion *region, int at, int beg, int end) | ) |
ONIG_EXTERN int onig_name_to_group_numbers P_ | ( | (OnigRegex reg, const OnigUChar *name, const OnigUChar *name_end, int **nums) | ) |
ONIG_EXTERN int onig_name_to_backref_number P_ | ( | (OnigRegex reg, const OnigUChar *name, const OnigUChar *name_end, OnigRegion *region) | ) |
ONIG_EXTERN int onig_foreach_name P_ | ( | (OnigRegex reg, int(*func)(const OnigUChar *, const OnigUChar *, int, int *, OnigRegex, void *), void *arg) | ) |
ONIG_EXTERN int onig_number_of_names P_ | ( | (OnigRegex reg) | ) |
ONIG_EXTERN int onig_number_of_captures P_ | ( | (OnigRegex reg) | ) |
ONIG_EXTERN int onig_number_of_capture_histories P_ | ( | (OnigRegex reg) | ) |
ONIG_EXTERN OnigCaptureTreeNode* onig_get_capture_tree P_ | ( | (OnigRegion *region) | ) |
ONIG_EXTERN int onig_capture_tree_traverse P_ | ( | (OnigRegion *region, int at, int(*callback_func)(int, OnigPosition, OnigPosition, int, int, void *), void *arg) | ) |
ONIG_EXTERN int onig_noname_group_capture_is_active P_ | ( | (OnigRegex reg) | ) |
ONIG_EXTERN OnigEncoding onig_get_encoding P_ | ( | (OnigRegex reg) | ) |
ONIG_EXTERN OnigOptionType onig_get_options P_ | ( | (OnigRegex reg) | ) |
ONIG_EXTERN OnigCaseFoldType onig_get_case_fold_flag P_ | ( | (OnigRegex reg) | ) |
ONIG_EXTERN const OnigSyntaxType* onig_get_syntax P_ | ( | (OnigRegex reg) | ) |
ONIG_EXTERN int onig_set_default_syntax P_ | ( | (const OnigSyntaxType *syntax) | ) |
ONIG_EXTERN void onig_copy_syntax P_ | ( | (OnigSyntaxType *to, const OnigSyntaxType *from) | ) |
ONIG_EXTERN unsigned int onig_get_syntax_op P_ | ( | (OnigSyntaxType *syntax) | ) |
ONIG_EXTERN unsigned int onig_get_syntax_op2 P_ | ( | (OnigSyntaxType *syntax) | ) |
ONIG_EXTERN unsigned int onig_get_syntax_behavior P_ | ( | (OnigSyntaxType *syntax) | ) |
ONIG_EXTERN OnigOptionType onig_get_syntax_options P_ | ( | (OnigSyntaxType *syntax) | ) |
ONIG_EXTERN void onig_set_syntax_op P_ | ( | (OnigSyntaxType *syntax, unsigned int op) | ) |
ONIG_EXTERN void onig_set_syntax_op2 P_ | ( | (OnigSyntaxType *syntax, unsigned int op2) | ) |
ONIG_EXTERN void onig_set_syntax_behavior P_ | ( | (OnigSyntaxType *syntax, unsigned int behavior) | ) |
ONIG_EXTERN void onig_set_syntax_options P_ | ( | (OnigSyntaxType *syntax, OnigOptionType options) | ) |
ONIG_EXTERN int onig_set_meta_char P_ | ( | (OnigSyntaxType *syntax, unsigned int what, OnigCodePoint code) | ) |
ONIG_EXTERN void onig_copy_encoding P_ | ( | (OnigEncoding to, OnigEncoding from) | ) |
ONIG_EXTERN int onig_set_default_case_fold_flag P_ | ( | (OnigCaseFoldType case_fold_flag) | ) |
ONIG_EXTERN unsigned int onig_get_match_stack_limit_size P_ | ( | (void) | ) |
ONIG_EXTERN int onig_set_match_stack_limit_size P_ | ( | (unsigned int size) | ) |
ONIG_EXTERN int onig_end P_ | ( | (void) | ) |
ONIG_EXTERN const char* onig_version P_ | ( | (void) | ) |
ONIG_EXTERN const char* onig_copyright P_ | ( | (void) | ) |
|
static |
PRINTF_ARGS | ( | VALUE | rb_enc_sprintfrb_encoding *, const char *,..., |
2 | , | ||
3 | |||
) |
PRINTF_ARGS | ( | NORETURN(void rb_enc_raise(rb_encoding *, VALUE, const char *,...)) | , |
3 | , | ||
4 | |||
) |
PRINTF_ARGS | ( | NORETURN(void rb_loaderror(const char *,...)) | , |
1 | , | ||
2 | |||
) |
PRINTF_ARGS | ( | NORETURN(void rb_name_error(ID, const char *,...)) | , |
2 | , | ||
3 | |||
) |
PRINTF_ARGS | ( | NORETURN(void rb_name_error_str(VALUE, const char *,...)) | , |
2 | , | ||
3 | |||
) |
PRINTF_ARGS | ( | void | rb_compile_errorconst char *, int, const char *,..., |
3 | , | ||
4 | |||
) |
PRINTF_ARGS | ( | void | rb_compile_error_with_encconst char *, int, void *, const char *,..., |
4 | , | ||
5 | |||
) |
PRINTF_ARGS | ( | void | rb_compile_error_appendconst char *,..., |
1 | , | ||
2 | |||
) |
PRINTF_ARGS | ( | void | ruby_debug_printfconst char *,..., |
1 | , | ||
2 | |||
) |
PRINTF_ARGS | ( | VALUE | rb_sprintfconst char *,..., |
1 | , | ||
2 | |||
) |
PRINTF_ARGS | ( | VALUE | rb_str_catfVALUE, const char *,..., |
2 | , | ||
3 | |||
) |
PRINTF_ARGS | ( | void | rb_warningconst char *,..., |
1 | , | ||
2 | |||
) |
PRINTF_ARGS | ( | void | rb_compile_warningconst char *, int, const char *,..., |
3 | , | ||
4 | |||
) |
PRINTF_ARGS | ( | void | rb_sys_warningconst char *,..., |
1 | , | ||
2 | |||
) |
PRINTF_ARGS | ( | void | rb_warnconst char *,..., |
1 | , | ||
2 | |||
) |
PRINTF_ARGS | ( | void | rb_compile_warnconst char *, int, const char *,..., |
3 | , | ||
4 | |||
) |
PRINTF_ARGS | ( | int | ruby_snprintfchar *str, size_t n, char const *fmt,..., |
3 | , | ||
4 | |||
) |
ONIG_EXTERN int onig_error_code_to_str PV_ | ( | (OnigUChar *s, OnigPosition err_code,...) | ) |
size_t rb_absint_numwords | ( | VALUE | val, |
size_t | word_numbits, | ||
size_t * | nlz_bits_ret | ||
) |
void rb_add_event_hook | ( | rb_event_hook_func_t | func, |
rb_event_flag_t | events, | ||
VALUE | data | ||
) |
Definition at line 145 of file vm_trace.c.
Referenced by ole_initialize(), rb_set_coverages(), and set_trace_func().
Definition at line 1255 of file vm_method.c.
Referenced by Init_signal(), Init_strscan(), m_core_set_method_alias(), rb_define_alias(), and rb_mod_alias_method().
Definition at line 869 of file variable.c.
Referenced by Init_load(), and m_core_set_variable_alias().
Definition at line 452 of file object.c.
Referenced by Init_Object(), name_err_mesg_to_str(), rb_hash_fetch_m(), rb_io_inspect(), rb_mod_to_s(), rb_obj_as_string(), rb_obj_basic_to_s_p(), rb_obj_inspect(), rb_reg_inspect(), and wmap_inspect_i().
Calls a method.
recv | receiver of the method |
mid | an ID that represents the name of the method |
args | an Array object which contains method arguments |
Definition at line 752 of file vm_eval.c.
Referenced by exec_callback(), and if().
Definition at line 3038 of file object.c.
Referenced by dir_entries(), range_last(), rb_f_array(), and readline_attempted_completion_function().
Definition at line 1251 of file encoding.c.
rb_encoding* rb_ascii8bit_encoding | ( | void | ) |
Definition at line 1242 of file encoding.c.
Definition at line 872 of file vm_method.c.
Referenced by Init_Exception(), Init_ossl_asn1(), Init_ossl_pkcs12(), Init_ossl_pkcs7(), Init_ossl_ssl(), Init_ossl_x509ext(), Init_ossl_x509store(), rb_define_attr(), rb_mod_attr(), rb_mod_attr_accessor(), rb_mod_attr_reader(), and rb_mod_attr_writer().
Definition at line 1127 of file variable.c.
Referenced by append_method(), ecerr_destination_encoding(), ecerr_destination_encoding_name(), ecerr_error_bytes(), ecerr_error_char(), ecerr_incomplete_input(), ecerr_readagain_bytes(), ecerr_source_encoding(), ecerr_source_encoding_name(), eval_string_with_cref(), exc_backtrace(), exc_backtrace_locations(), exc_cause(), exc_equal(), exc_setup_cause(), exc_to_s(), exit_status(), exit_success_p(), gzfile_error_inspect(), ignore_closed_stream(), inspect_enumerator(), name_err_name(), nometh_err_args(), ossl_asn1_get_asn1type(), private_iv_get(), pst_pid(), rb_mod_refine(), rb_mod_to_s(), rb_refinement_module_get_refined_class(), readline_attempted_completion_function(), readline_s_get_completion_case_fold(), readline_s_get_completion_proc(), reg_compile_gen(), sockopt_data(), sockopt_family_m(), sockopt_level(), sockopt_optname(), stop_result(), syserr_eqq(), syserr_errno(), using_module_recursive(), vm_call0_body(), and vm_getivar().
Definition at line 1607 of file variable.c.
Referenced by rb_dl_init_callbacks(), and rb_mod_autoload().
Definition at line 1769 of file variable.c.
Referenced by rb_const_get_0(), and vm_get_ev_const().
Definition at line 1814 of file variable.c.
Referenced by rb_mod_autoload_p().
|
static |
Definition at line 947 of file vm.c.
Referenced by date__httpdate(), date__iso8601(), date__jisx0301(), date__parse(), date__rfc2822(), date__rfc3339(), date__strptime_internal(), date__xmlschema(), last_match_getter(), last_paren_match_getter(), match_getter(), nucomp_s_convert(), nurat_s_convert(), postmatch_getter(), prematch_getter(), rb_reg_match_m(), rb_reg_s_last_match(), rb_reg_search(), rb_str_rpartition(), rb_str_split_m(), rb_str_sub_bang(), rb_str_subpat(), rb_str_subpat_set(), scan_once(), and str_gsub().
Definition at line 953 of file vm.c.
Referenced by date__httpdate(), date__iso8601(), date__jisx0301(), date__parse(), date__rfc2822(), date__rfc3339(), date__strptime_internal(), date__xmlschema(), match_setter(), nucomp_s_convert(), nurat_s_convert(), rb_reg_eqq(), rb_reg_match2(), rb_reg_match_m(), rb_reg_search(), rb_str_index_m(), rb_str_rindex_m(), and reg_match_pos().
Definition at line 782 of file vm_backtrace.c.
Referenced by rescue_callback().
Definition at line 417 of file vm_backtrace.c.
Referenced by exc_backtrace(), rb_check_backtrace(), and set_backtrace().
Definition at line 766 of file vm_backtrace.c.
Referenced by rb_vm_bugreport().
Definition at line 803 of file vm_backtrace.c.
Referenced by load_lock().
Definition at line 637 of file vm_backtrace.c.
Referenced by exc_backtrace_locations().
Definition at line 590 of file vm_backtrace.c.
Referenced by backtrace_dump_data(), exc_backtrace(), and set_backtrace().
SIGNED_VALUE rb_big2long | ( | VALUE | ) |
VALUE rb_big_unpack | ( | unsigned long * | buf, |
long | num_longs | ||
) |
Definition at line 326 of file proc.c.
Referenced by call_trace_func(), Init_VM(), and rb_f_binding().
Definition at line 871 of file proc.c.
Referenced by env_each_pair(), rb_ary_zip(), rb_hash_each_pair(), and rb_struct_each_pair().
Definition at line 640 of file proc.c.
Referenced by sym_to_proc().
Definition at line 634 of file proc.c.
Referenced by Init_Proc(), Init_VM(), rb_f_lambda(), and rb_mod_define_method().
Definition at line 620 of file proc.c.
Referenced by define_final(), enum_chunk(), enum_slice_before(), enumerator_initialize(), ev_on_event(), generator_initialize(), if(), Init_Proc(), Init_VM(), lazy_to_enum(), m_core_set_postexe(), obj_to_enum(), ossl_x509store_verify(), proc_call(), rb_f_at_exit(), rb_f_trace_var(), rb_fiber_init(), rb_hash_initialize(), rb_method_call(), rb_scan_args(), sig_trap(), thread_create_core(), tracepoint_new_s(), and yielder_initialize().
Definition at line 11 of file eval_jump.c.
Definition at line 18 of file inits.c.
Referenced by ruby_setup().
Definition at line 275 of file vm_eval.c.
Referenced by esignal_init(), exit_initialize(), float_denominator(), float_numerator(), fole_initialize(), gzfile_error_inspect(), interrupt_init(), lazy_super(), lazy_zip(), name_err_initialize(), ossl_ssl_initialize(), path_freeze(), path_taint(), path_untaint(), range_include(), range_max(), range_min(), strio_initialize(), and syserr_initialize().
Referenced by rb_catch(), and rb_f_catch().
VALUE rb_catch_protect | ( | VALUE | t, |
rb_block_call_func * | func, | ||
VALUE | data, | ||
int * | stateptr | ||
) |
Definition at line 1842 of file vm_eval.c.
Referenced by exec_recursive(), and rb_catch_obj().
Definition at line 333 of file re.c.
Referenced by parser_regx_options(), and reg_fragment_setenc_gen().
Definition at line 2652 of file object.c.
Referenced by ary_join_1(), check_exec_redirect_fd(), cState_configure(), rb_Array(), rb_check_array_type(), rb_check_hash_type(), rb_check_regexp_type(), rb_check_string_type(), rb_check_to_float(), rb_file_initialize(), rb_gzwriter_initialize(), rb_hash_set_default_proc(), rb_io_check_io(), rb_stat(), and vm_caller_setup_args().
Definition at line 410 of file vm_eval.c.
Referenced by convert_type(), enum_size(), enumerator_rewind(), enumerator_size(), error_print(), exc_equal(), flo_cmp(), invcmp_recursive(), io_call_close(), io_close(), is_integer_p(), iterate_check_method(), make_exception(), marshal_dump(), marshal_load(), num_exact(), path_initialize(), rb_dlptr_s_to_ptr(), rb_fiddle_ptr_s_to_ptr(), rb_get_path_check_to_string(), rb_str_cmp_m(), time_timespec(), and try_convert_to_exception().
Definition at line 597 of file hash.c.
Referenced by get_hash(), rawmode_opt(), rb_econv_prepare_options(), rb_exec_getargs(), rb_Hash(), rb_hash_s_try_convert(), rb_io_s_popen(), rb_scan_args(), rb_str_sub_bang(), str_gsub(), and vm_callee_setup_keyword_arg().
Returns ID for the given name if it is interned already, or 0.
namep | the pointer to the name object |
namep
must be a Symbol or a String, or possible to convert with to_str method. namep
is a Symbol or a String if non-zero value is returned, or is a String if 0 is returned. ID rb_check_id_cstr | ( | const char * | ptr, |
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 122 of file safe.c.
Referenced by constant_arg(), env_has_value(), env_rassoc(), rb_check_safe_str(), and rb_dlcfunc_call().
Definition at line 1678 of file string.c.
Referenced by ary_join_1(), check_setter_id(), constant_arg(), env_has_value(), env_rassoc(), error_print(), get_pat(), gzreader_gets(), io_encoding_set(), make_exception(), marshal_load(), month_arg(), prepare_getline_args(), range_each(), range_step(), rb_ary_join(), rb_ary_times(), rb_check_id(), rb_check_sockaddr_string_type(), rb_convert_to_integer(), rb_digest_instance_equal(), rb_f_kill(), rb_io_extract_encoding_option(), rb_str_format(), rb_str_index_m(), rb_str_partition(), rb_str_rindex_m(), rb_str_rpartition(), rb_str_s_try_convert(), rb_String(), rb_to_encoding_index(), rb_to_id(), reg_operand(), setup_narg(), strio_each(), strio_getline(), strio_readlines(), trap_handler(), and utc_offset_arg().
Definition at line 2977 of file object.c.
Referenced by rand_random(), and rand_range().
Definition at line 2706 of file object.c.
Referenced by exit_initialize().
Definition at line 2686 of file object.c.
Referenced by esignal_init(), num_exact(), rand_random(), rand_range(), range_include(), range_step(), rb_check_to_int(), rb_io_extract_modeenc(), rb_io_s_sysopen(), and sockopt_s_linger().
Definition at line 397 of file variable.c.
Referenced by dump_object(), mSyslog_inspect(), ossl_x509_inspect(), pst_inspect(), r_object0(), rb_clear_method_cache_by_class(), rb_define_class_id_under(), rb_define_module_id_under(), rb_io_s_new(), rb_mod_remove_method(), rb_obj_alloc(), rb_obj_classname(), rb_profile_frame_classpath(), rb_thread_current_status(), remove_method(), and thread_s_new().
Definition at line 1560 of file object.c.
Referenced by Init_Object(), r_object0(), rb_file_exists_p(), rb_mod_cmp(), rb_mod_define_method(), rb_mod_ge(), rb_mod_lt(), and rb_threadptr_pending_interrupt_include_p().
Definition at line 391 of file variable.c.
Referenced by cannot_be_coerced_into_BigDecimal(), dir_inspect(), error_print(), exc_inspect(), exc_to_s(), inspect_struct(), method_inspect(), mnew_from_me(), mString_to_json_raw_object(), name_err_mesg_to_str(), r_object0(), rb_any_to_s(), rb_const_get_0(), rb_const_remove(), rb_const_set(), rb_cvar_get(), rb_cvar_set(), rb_io_inspect(), rb_method_entry_make(), rb_method_name_error(), rb_mod_cvar_get(), rb_mod_define_method(), rb_mod_freeze(), rb_mod_remove_const(), rb_mod_remove_cvar(), rb_mod_to_s(), rb_obj_inspect(), rb_print_undef(), rb_print_undef_str(), rb_undef(), rb_vm_bugreport(), set_const_visibility(), umethod_bind(), uninitialized_constant(), w_extended(), and wmap_inspect().
Definition at line 1857 of file object.c.
Referenced by console_dev(), copy_stream_body(), float_value(), gzfile_wrap(), Init_Exception(), Init_IO(), Init_Object(), Init_Regexp(), io_new_instance(), JSON_parse_array(), JSON_parse_object(), make_no_method_exception(), mark(), new_wrap(), path_basename(), path_dirname(), path_entries(), path_expand_path(), path_f_pathname(), path_readlink(), path_realdirpath(), path_realpath(), path_s_getwd(), path_s_glob(), path_split(), path_sub(), path_sub_ext(), process_sflag(), rb_dl_dlopen(), rb_exit(), rb_f_abort(), rb_fiddle_new_function(), rb_io_initialize(), rb_io_s_new(), rb_io_s_open(), rb_name_error(), rb_name_error_str(), rb_readwrite_sys_fail(), rb_reg_s_union(), rb_struct_alloc(), rb_struct_new(), rb_syserr_new_str(), setup_struct(), strio_s_open(), and time_s_now().
Definition at line 257 of file variable.c.
Referenced by class2path(), inspect_enumerator(), ossl_cipher_init(), rb_class_name(), and rb_profile_frame_classpath().
Definition at line 281 of file variable.c.
Referenced by newobj_i().
Definition at line 204 of file object.c.
Referenced by class2path(), make_singleton_class(), rb_class2name(), rb_class_name(), rb_define_class(), rb_define_class_id_under(), rb_f_autoload(), rb_obj_alloc(), rb_obj_class(), uninitialized_constant(), w_class(), and w_uclass().
Definition at line 666 of file object.c.
Referenced by umethod_bind().
Definition at line 1887 of file object.c.
Referenced by get_digest_base_metadata(), Init_Object(), and ossl_asn1_default_tag().
Definition at line 52 of file vm_method.c.
Definition at line 60 of file vm_method.c.
Referenced by include_modules_at(), rb_const_remove(), rb_const_set(), and set_const_visibility().
Definition at line 66 of file vm_method.c.
Referenced by include_modules_at(), m_core_undef_method(), rb_add_refined_method_entry(), rb_export_method(), rb_method_entry_make(), rb_using_module(), and remove_method().
Definition at line 225 of file vm_trace.c.
Referenced by ruby_finalize_0(), and ruby_options().
Definition at line 244 of file io.c.
Referenced by ossl_obj2bio(), pty_getpty(), readline_s_set_input(), readline_s_set_output(), and ruby_dup().
Definition at line 251 of file io.c.
Referenced by io_reopen(), and rb_io_reopen().
Definition at line 323 of file io.c.
Referenced by rb_cloexec_dup(), and rb_cloexec_fcntl_dupfd().
Definition at line 228 of file io.c.
Referenced by chfunc(), console_dev(), fill_random_seed(), get_device_once(), load_file_internal(), loadopen_func(), and sysopen_func().
Referenced by rb_execarg_run_options().
Definition at line 2127 of file variable.c.
Referenced by console_dev(), Init_cparse(), Init_strscan(), rb_define_class(), rb_define_module(), rb_mod_const_defined(), and vm_get_ev_const().
Definition at line 2133 of file variable.c.
Referenced by debug_lines(), new_struct(), rb_const_remove(), rb_define_class_id_under(), rb_define_module_id_under(), rb_mod_const_defined(), rb_path_to_class(), and vm_search_const_defined_class().
Definition at line 2121 of file variable.c.
Definition at line 1880 of file variable.c.
Referenced by callback(), console_dev(), cState_from_state_s(), float_arg(), function_call(), generic_to_value(), Init_cparse(), Init_generator(), Init_objspace(), Init_parser(), Init_psych_parser(), Init_tcltklib(), Init_tkutil(), make_no_method_exception(), numeric_arg(), process_options(), rb_define_class(), rb_define_module(), rb_execarg_fixup(), rb_mod_const_defined(), rb_mod_const_get(), save_env(), set_argv(), syserr_eqq(), syserr_initialize(), vm_get_ev_const(), and vm_set_main_stack().
Definition at line 1886 of file variable.c.
Referenced by debug_lines(), Init_cparse(), mark(), path_unlink(), rb_define_class_id_under(), rb_define_module_id_under(), rb_mod_const_defined(), rb_mod_const_get(), and rb_path_to_class().
Definition at line 1874 of file variable.c.
Definition at line 2039 of file variable.c.
Referenced by rb_mod_constants(), and rb_mod_s_constants().
Definition at line 1942 of file variable.c.
Referenced by console_dev(), rb_mod_remove_const(), and ruby_init_prelude().
Definition at line 2163 of file variable.c.
Referenced by autoload_const_set(), boot_defclass(), cbsubst_init(), console_dev(), Init_class_hierarchy(), Init_strscan(), rb_autoload(), rb_define_class(), rb_define_class_id_under(), rb_define_const(), rb_define_module(), rb_define_module_id_under(), rb_mod_const_set(), and ruby_init_loadpath_safe().
Definition at line 2637 of file object.c.
Referenced by addrinfo_mload(), core_hash_merge_kwd(), cParser_initialize(), cState_configure(), iseq_build_from_ary_body(), iseq_build_from_ary_exception(), nucomp_s_convert(), numeric_quo(), nurat_s_convert(), open_key_args(), path_entries(), path_s_glob(), rb_execarg_fixup(), rb_Float(), rb_io_get_io(), rb_str_to_str(), rb_String(), rb_thread_s_handle_interrupt(), rb_to_float(), register_label(), strio_copy(), symbol2event_flag(), to_ary(), and to_hash().
Definition at line 1049 of file variable.c.
Referenced by d_lite_marshal_dump(), d_lite_marshal_load(), init_copy(), nucomp_marshal_dump(), nurat_marshal_dump(), rb_hash_dup_empty(), time_mdump(), and time_mload().
Definition at line 2806 of file object.c.
Referenced by JSON_parse_float(), rb_str_to_dbl(), and str2num().
Definition at line 1964 of file vm_eval.c.
Referenced by eval_string_with_cref(), f_current_dirname(), and rb_f_require_relative().
Definition at line 2429 of file variable.c.
Definition at line 2411 of file variable.c.
Referenced by rb_mod_cvar_defined(), and rb_mod_remove_cvar().
Definition at line 2384 of file variable.c.
Referenced by rb_cv_get(), and rb_mod_cvar_get().
Definition at line 2351 of file variable.c.
Referenced by rb_cv_set(), rb_define_class_variable(), and rb_mod_cvar_set().
VALUE rb_data_object_alloc | ( | VALUE | , |
void * | , | ||
RUBY_DATA_FUNC | , | ||
RUBY_DATA_FUNC | |||
) |
VALUE rb_data_typed_object_alloc | ( | VALUE | klass, |
void * | datap, | ||
const rb_data_type_t * | |||
) |
Definition at line 1376 of file gc.c.
Referenced by iow_newobj().
VALUE rb_dbl_cmp | ( | double | , |
double | |||
) |
VALUE rb_dbl_hash | ( | double | d | ) |
Definition at line 1122 of file numeric.c.
Referenced by flo_hash(), and rb_any_hash().
rb_encoding* rb_default_external_encoding | ( | void | ) |
Definition at line 1366 of file encoding.c.
Definition at line 3019 of file file.c.
Referenced by dir_s_home(), and rb_file_expand_path_internal().
rb_encoding* rb_default_internal_encoding | ( | void | ) |
Definition at line 1451 of file encoding.c.
void rb_define_alloc_func | ( | VALUE | , |
rb_alloc_func_t | |||
) |
Referenced by Init_Array(), Init_bigdecimal(), Init_Complex(), Init_Cont(), Init_date_core(), Init_dbm(), Init_digest(), Init_Dir(), Init_dlcfunc(), Init_dlhandle(), Init_dlptr(), Init_Encoding(), Init_fiddle_closure(), Init_fiddle_function(), Init_fiddle_handle(), Init_fiddle_pointer(), Init_File(), Init_GC(), Init_gdbm(), Init_generator(), Init_Hash(), Init_IO(), Init_ISeq(), Init_Object(), Init_ossl_bn(), Init_ossl_cipher(), Init_ossl_digest(), Init_ossl_hmac(), Init_ossl_ns_spki(), Init_ossl_pkcs12(), Init_ossl_pkcs7(), Init_ossl_pkey(), Init_ossl_ssl(), Init_ossl_ssl_session(), Init_ossl_x509attr(), Init_ossl_x509cert(), Init_ossl_x509crl(), Init_ossl_x509ext(), Init_ossl_x509name(), Init_ossl_x509req(), Init_ossl_x509revoked(), Init_ossl_x509store(), Init_parser(), Init_psych_emitter(), Init_psych_parser(), Init_Random(), Init_Rational(), Init_Regexp(), Init_sdbm(), Init_String(), Init_stringio(), Init_strscan(), Init_tcltklib(), Init_Thread(), Init_Time(), Init_transcode(), Init_vm_backtrace(), Init_win32ole(), Init_zlib(), InitVM_Enumerator(), rb_undef_alloc_func(), rsock_init_addrinfo(), setup_struct(), and struct_define_without_accessor().
Definition at line 2439 of file variable.c.
Definition at line 2228 of file variable.c.
Referenced by Init_bigdecimal(), Init_Bignum(), Init_Complex(), Init_cparse(), Init_date_core(), Init_dbm(), Init_dl(), Init_dlhandle(), Init_dlptr(), Init_etc(), Init_fcntl(), Init_fiddle(), Init_fiddle_function(), Init_fiddle_handle(), Init_fiddle_pointer(), Init_File(), Init_GC(), Init_gdbm(), Init_IO(), Init_marshal(), Init_Math(), Init_nkf(), Init_Numeric(), Init_openssl(), Init_ossl_asn1(), Init_ossl_config(), Init_ossl_pkcs7(), Init_ossl_ssl(), Init_ossl_x509name(), Init_process(), Init_psych_parser(), Init_Random(), Init_readline(), Init_Regexp(), Init_sizeof(), Init_tcltklib(), Init_Thread(), Init_tkutil(), Init_transcode(), Init_VM(), Init_win32ole(), Init_zlib(), ole_const_load(), rb_define_global_const(), rb_file_const(), ripper_init_eventids1_table(), ripper_init_eventids2_table(), set_encoding_const(), and set_syserr().
Definition at line 437 of file encoding.c.
Definition at line 2239 of file variable.c.
Referenced by Init_Hash(), Init_IO(), Init_Object(), Init_version(), Init_VM(), load_file_internal(), and ruby_prog_init().
Definition at line 585 of file variable.c.
Referenced by Init_IO(), Init_load(), rb_define_readonly_variable(), rb_define_variable(), rb_define_virtual_variable(), and ruby_prog_init().
Definition at line 610 of file variable.c.
Referenced by Init_IO().
Definition at line 604 of file variable.c.
Referenced by Init_IO(), Init_String(), and ruby_prog_init().
Definition at line 616 of file variable.c.
Referenced by Init_eval(), Init_IO(), Init_load(), Init_process(), Init_Regexp(), Init_safe(), and Init_Time().
VALUE rb_detach_process | ( | rb_pid_t | pid | ) |
Definition at line 1027 of file process.c.
Referenced by proc_detach(), and pty_detach_process().
VALUE rb_econv_append | ( | rb_econv_t * | ec, |
const char * | bytesrc, | ||
long | bytesize, | ||
VALUE | dst, | ||
int | flags | ||
) |
Definition at line 1811 of file transcode.c.
Referenced by rb_econv_substr_append().
Definition at line 1784 of file transcode.c.
Referenced by econv_s_asciicompat_encoding(), and make_writeconv().
void rb_econv_binmode | ( | rb_econv_t * | ec | ) |
Definition at line 1941 of file transcode.c.
Referenced by rb_io_binmode().
void rb_econv_check_error | ( | rb_econv_t * | ec | ) |
Definition at line 4219 of file transcode.c.
Referenced by fill_cbuf(), gzfile_getc(), and rb_econv_append().
void rb_econv_close | ( | rb_econv_t * | ec | ) |
Definition at line 1700 of file transcode.c.
Referenced by allocate_converted_string(), clear_readconv(), clear_writeconv(), econv_free(), gzfile_reset(), io_ascii8bit_binmode(), rb_econv_open(), rb_econv_open_by_transcoder_entries(), rb_econv_open_opts(), rb_str_conv_enc_opts(), and transcode_loop().
rb_econv_result_t rb_econv_convert | ( | rb_econv_t * | ec, |
const unsigned char ** | source_buffer_ptr, | ||
const unsigned char * | source_buffer_end, | ||
unsigned char ** | destination_buffer_ptr, | ||
unsigned char * | destination_buffer_end, | ||
int | flags | ||
) |
Definition at line 1444 of file transcode.c.
Referenced by allocate_converted_string(), econv_primitive_convert(), fill_cbuf(), finish_writeconv(), gzfile_getc(), rb_econv_append(), rb_str_conv_enc_opts(), and transcode_loop().
int rb_econv_decorate_at_first | ( | rb_econv_t * | ec, |
const char * | decorator_name | ||
) |
Definition at line 1907 of file transcode.c.
int rb_econv_decorate_at_last | ( | rb_econv_t * | ec, |
const char * | decorator_name | ||
) |
Definition at line 1924 of file transcode.c.
Referenced by rb_econv_open().
const char* rb_econv_encoding_to_insert_output | ( | rb_econv_t * | ec | ) |
Definition at line 1501 of file transcode.c.
Referenced by econv_insert_output(), make_replacement(), rb_econv_insert_output(), and rb_econv_set_replacement().
Definition at line 3168 of file transcode.c.
Referenced by rb_w32_write_console().
int rb_econv_insert_output | ( | rb_econv_t * | ec, |
const unsigned char * | str, | ||
size_t | len, | ||
const char * | str_encoding | ||
) |
Definition at line 1585 of file transcode.c.
Referenced by econv_insert_output(), output_hex_charref(), output_replacement_character(), and transcode_loop().
VALUE rb_econv_make_exception | ( | rb_econv_t * | ec | ) |
Definition at line 4213 of file transcode.c.
Referenced by fill_cbuf(), and finish_writeconv().
rb_econv_t* rb_econv_open | ( | const char * | source_encoding, |
const char * | destination_encoding, | ||
int | ecflags | ||
) |
Definition at line 1065 of file transcode.c.
Referenced by allocate_converted_string(), and rb_econv_open_opts().
Definition at line 2035 of file transcode.c.
Referenced by econv_init(), econv_s_search_convpath(), make_readconv(), make_writeconv(), and transcode_loop().
rb_econv_t* rb_econv_open_opts | ( | const char * | source_encoding, |
const char * | destination_encoding, | ||
int | ecflags, | ||
VALUE | ecopts | ||
) |
Definition at line 2577 of file transcode.c.
Referenced by econv_init(), gzfile_reset(), make_readconv(), make_writeconv(), rb_gzfile_ecopts(), rb_str_conv_enc_opts(), and transcode_loop().
Definition at line 2526 of file transcode.c.
Referenced by io_encoding_set(), rb_econv_prepare_opts(), and rb_io_extract_modeenc().
Definition at line 2571 of file transcode.c.
Referenced by econv_args(), rb_gzfile_ecopts(), and str_transcode().
void rb_econv_putback | ( | rb_econv_t * | ec, |
unsigned char * | p, | ||
int | n | ||
) |
Definition at line 1751 of file transcode.c.
Referenced by econv_putback(), and fill_cbuf().
int rb_econv_putbackable | ( | rb_econv_t * | ec | ) |
Definition at line 1740 of file transcode.c.
Referenced by econv_putback(), and fill_cbuf().
int rb_econv_set_replacement | ( | rb_econv_t * | ec, |
const unsigned char * | str, | ||
size_t | len, | ||
const char * | encname | ||
) |
Definition at line 2197 of file transcode.c.
Referenced by econv_set_replacement(), and rb_econv_open_opts().
VALUE rb_econv_str_append | ( | rb_econv_t * | ec, |
VALUE | src, | ||
VALUE | dst, | ||
int | flags | ||
) |
Definition at line 1864 of file transcode.c.
VALUE rb_econv_str_convert | ( | rb_econv_t * | ec, |
VALUE | src, | ||
int | flags | ||
) |
Definition at line 1876 of file transcode.c.
Referenced by do_writeconv(), and gzfile_newstr().
VALUE rb_econv_substr_append | ( | rb_econv_t * | ec, |
VALUE | src, | ||
long | byteoff, | ||
long | bytesize, | ||
VALUE | dst, | ||
int | flags | ||
) |
Definition at line 1854 of file transcode.c.
Referenced by rb_econv_str_append(), rb_econv_str_convert(), and rb_econv_substr_convert().
VALUE rb_econv_substr_convert | ( | rb_econv_t * | ec, |
VALUE | src, | ||
long | byteoff, | ||
long | bytesize, | ||
int | flags | ||
) |
Definition at line 1870 of file transcode.c.
int rb_enc_ascget | ( | const char * | p, |
const char * | e, | ||
int * | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 970 of file encoding.c.
VALUE rb_enc_associate | ( | VALUE | , |
rb_encoding * | |||
) |
Definition at line 826 of file encoding.c.
Definition at line 798 of file encoding.c.
int rb_enc_casefold | ( | char * | to, |
const char * | p, | ||
const char * | e, | ||
rb_encoding * | enc | ||
) |
rb_encoding* rb_enc_check | ( | VALUE | , |
VALUE | |||
) |
Definition at line 838 of file encoding.c.
int rb_enc_code_to_mbclen | ( | int | code, |
rb_encoding * | enc | ||
) |
Definition at line 1025 of file encoding.c.
int rb_enc_codelen | ( | int | code, |
rb_encoding * | enc | ||
) |
Definition at line 1014 of file encoding.c.
unsigned int rb_enc_codepoint | ( | const char * | p, |
const char * | e, | ||
rb_encoding * | enc | ||
) |
Definition at line 1008 of file encoding.c.
unsigned int rb_enc_codepoint_len | ( | const char * | p, |
const char * | e, | ||
int * | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 993 of file encoding.c.
rb_encoding* rb_enc_compatible | ( | VALUE | , |
VALUE | |||
) |
Definition at line 849 of file encoding.c.
Definition at line 916 of file encoding.c.
Definition at line 1380 of file encoding.c.
Definition at line 1460 of file encoding.c.
|
inlinestatic |
Definition at line 245 of file ripper.y.
Referenced by gzfile_getc(), gzfile_newstr(), opt_enc_index(), rb_reg_initialize(), rb_str_check_dummy_enc(), rb_str_scrub(), and set_base_encoding().
int rb_enc_fast_mbclen | ( | const char * | p, |
const char * | e, | ||
rb_encoding * | enc | ||
) |
Definition at line 940 of file encoding.c.
rb_encoding* rb_enc_find | ( | const char * | name | ) |
Definition at line 708 of file encoding.c.
Definition at line 684 of file encoding.c.
VALUE rb_enc_from_encoding | ( | rb_encoding * | enc | ) |
Definition at line 102 of file encoding.c.
rb_encoding* rb_enc_from_index | ( | int | idx | ) |
Definition at line 590 of file encoding.c.
rb_encoding* rb_enc_get | ( | VALUE | ) |
Definition at line 832 of file encoding.c.
Definition at line 739 of file encoding.c.
int rb_enc_mbclen | ( | const char * | p, |
const char * | e, | ||
rb_encoding * | enc | ||
) |
Definition at line 946 of file encoding.c.
char* rb_enc_nth | ( | const char * | , |
const char * | , | ||
long | , | ||
rb_encoding * | |||
) |
Definition at line 1752 of file string.c.
Referenced by rb_str_ellipsize(), and rb_str_format().
char* rb_enc_path_end | ( | const char * | , |
const char * | , | ||
rb_encoding * | |||
) |
Definition at line 2929 of file file.c.
Referenced by check_dirname().
char* rb_enc_path_last_separator | ( | const char * | , |
const char * | , | ||
rb_encoding * | |||
) |
Definition at line 2895 of file file.c.
Referenced by ruby_init_loadpath_safe().
char* rb_enc_path_next | ( | const char * | , |
const char * | , | ||
rb_encoding * | |||
) |
Definition at line 2847 of file file.c.
Referenced by rb_enc_path_skip_prefix(), and realpath_rec().
char* rb_enc_path_skip_prefix | ( | const char * | , |
const char * | , | ||
rb_encoding * | |||
) |
Definition at line 2861 of file file.c.
Referenced by check_dirname(), and ruby_glob0().
int rb_enc_precise_mbclen | ( | const char * | p, |
const char * | e, | ||
rb_encoding * | enc | ||
) |
Definition at line 958 of file encoding.c.
VALUE rb_enc_reg_new | ( | const char * | , |
long | , | ||
rb_encoding * | , | ||
int | |||
) |
Definition at line 2561 of file re.c.
Referenced by rb_reg_new().
int rb_enc_replicate | ( | const char * | , |
rb_encoding * | |||
) |
Definition at line 380 of file encoding.c.
Definition at line 1418 of file encoding.c.
Definition at line 1503 of file encoding.c.
Definition at line 790 of file encoding.c.
Definition at line 448 of file string.c.
Referenced by file_path_convert(), fnmatch_brace(), r_symreal(), rb_enc_compatible(), rb_file_expand_path_internal(), rb_inspect(), rb_reg_quote(), and rb_reg_s_union().
VALUE rb_enc_str_buf_cat | ( | VALUE | str, |
const char * | ptr, | ||
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 2250 of file string.c.
Referenced by rb_reg_regsub(), str_gsub(), and strio_write().
Definition at line 435 of file string.c.
Referenced by parser_str_new(), prepare_getline_args(), rb_econv_prepare_options(), rb_enc_compatible(), rb_enc_cr_str_buf_cat(), rb_enc_str_asciionly_p(), rb_external_str_with_enc(), rb_file_expand_path_internal(), rb_reg_initialize_str(), rb_reg_prepare_enc(), rb_reg_preprocess_dregexp(), rb_str_comparable(), rb_str_hash(), rb_str_is_ascii_only_p(), rb_str_succ(), rb_str_valid_encoding_p(), reg_fragment_setenc_gen(), str_compat_and_valid(), str_transcode0(), sym_check_asciionly(), and w_symbol().
VALUE rb_enc_str_new | ( | const char * | , |
long | , | ||
rb_encoding * | |||
) |
Definition at line 548 of file string.c.
Referenced by append_fspath(), compile_snprintf(), do_opendir(), econv_get_replacement(), fole_missing(), fstr_update_callback(), get_user_from_path(), io_getc(), lex_get_str(), ole_alloc_vstr(), parser_str_new(), prepare_getline_args(), rb_enc_str_new_cstr(), rb_enc_uint_chr(), rb_intern3(), rb_io_getline_1(), rb_push_glob(), rb_reg_initialize(), rb_reg_initialize_m(), rb_reg_source(), rb_str_scrub(), rb_str_upto(), rb_w32_conv_from_wchar(), reg_names_iter(), register_symid(), strftimev(), strio_getc(), strio_init(), strio_substr(), strio_ungetc(), sym_inspect(), time_strftime(), and transcode_loop().
VALUE rb_enc_str_new_cstr | ( | const char * | , |
rb_encoding * | |||
) |
long rb_enc_strlen | ( | const char * | , |
const char * | , | ||
rb_encoding * | |||
) |
Definition at line 1141 of file string.c.
Referenced by rb_str_format(), and update_char_offset().
int rb_enc_symname2_p | ( | const char * | , |
long | , | ||
rb_encoding * | |||
) |
int rb_enc_symname_p | ( | const char * | , |
rb_encoding * | |||
) |
int rb_enc_tolower | ( | int | c, |
rb_encoding * | enc | ||
) |
Definition at line 1037 of file encoding.c.
int rb_enc_toupper | ( | int | c, |
rb_encoding * | enc | ||
) |
Definition at line 1031 of file encoding.c.
VALUE rb_enc_uint_chr | ( | unsigned int | code, |
rb_encoding * | enc | ||
) |
Definition at line 2523 of file numeric.c.
Referenced by int_chr(), and rb_io_ungetc().
int rb_enc_unicode_p | ( | rb_encoding * | enc | ) |
Definition at line 496 of file encoding.c.
VALUE rb_enc_vsprintf | ( | rb_encoding * | , |
const char * | , | ||
va_list | |||
) |
Definition at line 1198 of file sprintf.c.
Referenced by rb_enc_raise(), rb_enc_sprintf(), rb_loaderror(), rb_loaderror_with_path(), and rb_vsprintf().
Definition at line 401 of file enumerator.c.
Definition at line 410 of file enumerator.c.
Definition at line 3225 of file hash.c.
Referenced by Init_Hash(), and rb_execarg_run_options().
Definition at line 2685 of file hash.c.
Referenced by security().
Definition at line 100 of file object.c.
Referenced by cdhash_cmp(), eql_i(), hash_equal(), rb_any_cmp(), and recursive_eql().
Definition at line 89 of file object.c.
Referenced by assoc_cmp(), assoc_i(), eql_i(), exc_equal(), hash_equal(), Init_Object(), key_i(), name_err_mesg_equal(), num_div(), num_eql(), num_remainder(), num_step_scan_args(), num_zero_p(), pst_equal(), range_bsearch(), rassoc_i(), rb_ary_assoc(), rb_ary_count(), rb_ary_delete(), rb_ary_equal(), rb_ary_includes(), rb_ary_index(), rb_ary_rassoc(), rb_ary_rindex(), rb_big_eq(), rb_hash_search_value(), rb_method_definition_eq(), rb_obj_cmp(), rb_str_equal(), recursive_equal(), syserr_eqq(), time_eql(), time_mdump(), and vtm_add_offset().
Definition at line 922 of file vm_insnhelper.c.
Referenced by rb_ary_index(), and rb_ary_rindex().
Definition at line 1471 of file vm_eval.c.
Referenced by rb_trace_eval(), run_single_final(), and signal_exec().
Evaluates the given string in an isolated binding.
Here "isolated" means the binding does not inherit any other binding. This behaves same as the binding for required libraries.
FILE will be "(eval)", and LINE starts from 1 in the evaluation.
str | Ruby code to evaluate. |
Exception | Raises an exception on error. |
Definition at line 1411 of file vm_eval.c.
Referenced by foletype_s_typelibs(), and rb_eval_string_protect().
Evaluates the given string in an isolated binding.
FILE will be "(eval)", and LINE starts from 1 in the evaluation.
str | Ruby code to evaluate. |
state | Being set to zero if succeeded. Nonzero if an error occurred. |
Definition at line 1427 of file vm_eval.c.
Referenced by rb_eval_string_wrap().
Evaluates the given string under a module binding in an isolated binding.
This is same as the binding for required libraries on "require('foo', true)".
FILE will be "(eval)", and LINE starts from 1 in the evaluation.
str | Ruby code to evaluate. |
state | Being set to zero if succeeded. Nonzero if an error occurred. |
int rb_exec_async_signal_safe | ( | const struct rb_execarg * | e, |
char * | errmsg, | ||
size_t | errmsg_buflen | ||
) |
Definition at line 3113 of file process.c.
Referenced by chfunc(), rb_exec_without_timer_thread(), and rb_f_exec().
Definition at line 112 of file eval_jump.c.
Definition at line 4992 of file thread.c.
Referenced by ary_join_1(), enumerator_inspect(), range_inspect(), rb_ary_inspect(), rb_file_join(), rb_hash_inspect(), rb_invcmp(), rb_io_puts(), rb_obj_inspect(), and rb_struct_inspect().
Definition at line 5003 of file thread.c.
Referenced by hash_equal(), range_eq(), range_eql(), rb_ary_cmp(), rb_ary_eql(), rb_ary_equal(), rb_struct_eql(), and rb_struct_equal().
Definition at line 1670 of file process.c.
Referenced by check_exec_options_i(), check_exec_options_i_extract(), pipe_open(), and rb_exec_arg_addopt().
Definition at line 1960 of file process.c.
Referenced by rb_io_s_popen().
Definition at line 2326 of file process.c.
Referenced by establishShell(), pipe_open(), rb_exec_arg_fixup(), rb_f_exec(), rb_f_spawn(), and rb_spawn_internal().
struct rb_execarg* rb_execarg_get | ( | VALUE | execarg_obj | ) |
Definition at line 2273 of file process.c.
Referenced by establishShell(), pipe_open(), rb_exec(), rb_exec_err(), rb_exec_fillarg(), rb_execarg_addopt(), rb_execarg_fixup(), rb_execarg_init(), rb_execarg_setenv(), rb_f_exec(), rb_f_spawn(), rb_run_exec_options(), rb_run_exec_options_err(), and rb_spawn_internal().
Definition at line 2281 of file process.c.
Referenced by rb_exec_arg_init(), and rb_execarg_new().
Definition at line 2262 of file process.c.
Referenced by establishShell(), pipe_open_s(), rb_f_exec(), rb_f_spawn(), rb_io_s_popen(), and rb_spawn_internal().
int rb_execarg_run_options | ( | const struct rb_execarg * | e, |
struct rb_execarg * | s, | ||
char * | errmsg, | ||
size_t | errmsg_buflen | ||
) |
Definition at line 2966 of file process.c.
Referenced by pipe_open(), rb_exec_async_signal_safe(), rb_run_exec_options(), rb_run_exec_options_err(), and rb_spawn_process().
Definition at line 2300 of file process.c.
Referenced by rb_io_s_popen().
Definition at line 707 of file string.c.
Referenced by fsdbm_delete(), fsdbm_delete_if(), fsdbm_each_key(), fsdbm_each_pair(), fsdbm_each_value(), fsdbm_fetch(), fsdbm_invert(), fsdbm_key(), fsdbm_keys(), fsdbm_select(), fsdbm_shift(), fsdbm_to_a(), fsdbm_to_hash(), fsdbm_values(), and ruby_script().
Definition at line 713 of file string.c.
Referenced by ruby_set_argv().
VALUE rb_external_str_new_with_enc | ( | const char * | ptr, |
long | len, | ||
rb_encoding * | |||
) |
Definition at line 686 of file string.c.
Referenced by dir_each(), dir_read(), etc_getlogin(), push_pattern(), rb_external_str_new(), rb_external_str_new_cstr(), rb_filesystem_str_new(), rb_filesystem_str_new_cstr(), rb_locale_str_new(), and rb_locale_str_new_cstr().
VALUE rb_external_str_with_enc | ( | VALUE | str, |
rb_encoding * | eenc | ||
) |
Definition at line 695 of file string.c.
References ENC_CODERANGE_7BIT, rb_ascii8bit_encoding(), rb_default_internal_encoding(), rb_enc_associate(), rb_enc_str_coderange(), rb_str_conv_enc(), rb_usascii_encoding(), and str.
Referenced by dir_each(), and rb_external_str_new_with_enc().
Definition at line 3741 of file process.c.
Referenced by Init_process().
Definition at line 2483 of file process.c.
Referenced by Init_process().
Definition at line 3712 of file process.c.
Referenced by Init_process().
Definition at line 853 of file variable.c.
Referenced by Init_eval().
Definition at line 385 of file signal.c.
Referenced by Init_process().
Definition at line 85 of file vm_method.c.
Referenced by rb_add_method(), and rb_add_method_cfunc().
Definition at line 817 of file load.c.
Referenced by Init_load().
Definition at line 415 of file sprintf.c.
Referenced by Init_Object(), iso8601_timediv(), jisx0301_date(), name_err_mesg_to_str(), rb_f_printf(), rb_io_printf(), and syslog_write().
Definition at line 656 of file variable.c.
Referenced by Init_eval().
Definition at line 715 of file variable.c.
Referenced by Init_eval(), and rb_f_trace_var().
Definition at line 221 of file io.c.
Referenced by fdbm_initialize(), fgdbm_initialize(), fgdbm_reorganize(), get_device_once(), ossl_pkey_new_from_file(), ossl_x509_new_from_file(), rb_io_reopen(), and rsock_socket0().
Definition at line 529 of file load.c.
Referenced by autoload_provided(), and rb_provided().
Definition at line 3476 of file file.c.
Referenced by rb_f_require_relative(), and rb_file_s_absolute_path().
Definition at line 5276 of file file.c.
Referenced by Init_Dir().
Definition at line 1216 of file file.c.
Referenced by Init_Dir(), Init_File(), rb_dir_exists_p(), and rb_f_test().
Definition at line 3911 of file file.c.
Referenced by f_current_dirname(), rb_f_require_relative(), and rb_file_s_dirname().
Definition at line 3422 of file file.c.
Referenced by expand_include_path(), rb_file_identical_p(), and rb_file_s_expand_path().
Definition at line 3429 of file file.c.
Referenced by rb_construct_expanded_load_path(), and rb_feature_provided().
Definition at line 3055 of file file.c.
Referenced by file_expand_path_1(), rb_file_expand_path_internal(), rb_find_file_ext_safe(), and rb_find_file_safe().
Definition at line 5398 of file file.c.
Referenced by rb_f_load(), rb_find_file_ext_safe(), and rb_find_file_safe().
Definition at line 5582 of file io.c.
Referenced by gzfile_s_open(), and iseq_s_compile_file().
Definition at line 3496 of file file.c.
Referenced by Init_File().
Definition at line 3463 of file file.c.
Referenced by Init_File().
Definition at line 1315 of file encoding.c.
rb_encoding* rb_filesystem_encoding | ( | void | ) |
Definition at line 1324 of file encoding.c.
Definition at line 737 of file string.c.
Referenced by env_fetch(), etc_sysconfdir(), etc_systmpdir(), load_path_getcwd(), rb_compile_cstr(), rb_compile_string(), rb_f_getenv(), rb_parser_compile_cstr(), rb_parser_compile_file(), rb_parser_compile_string(), and search_required().
rb_encoding* rb_find_encoding | ( | VALUE | ) |
Definition at line 226 of file encoding.c.
Definition at line 5508 of file file.c.
Referenced by rb_f_load(), and rb_load().
Definition at line 5443 of file file.c.
Referenced by rb_find_file_ext(), and search_required().
Definition at line 5514 of file file.c.
Referenced by rb_find_file(), and search_required().
Definition at line 2653 of file numeric.c.
Referenced by fix_to_s(), ole_typedesc2val(), and rb_big2str1().
Definition at line 2918 of file object.c.
Referenced by flo_coerce(), foletypelib_version(), int_round(), num_ceil(), num_coerce(), num_fdiv(), num_floor(), num_round(), num_truncate(), range_bsearch(), rb_f_float(), rb_num2dbl(), rb_str_format(), time_minus(), and time_to_f().
VALUE rb_float_new_in_heap | ( | double | ) |
Definition at line 642 of file numeric.c.
Referenced by rb_float_new_inline().
|
inlinestatic |
Definition at line 567 of file ripper.y.
Referenced by rb_float_new().
|
inlinestatic |
Definition at line 541 of file ripper.y.
Referenced by rb_float_value().
Definition at line 2038 of file rational.c.
Referenced by float_rationalize().
Definition at line 2022 of file rational.c.
Referenced by float_rationalize().
rb_pid_t rb_fork_async_signal_safe | ( | int * | status, |
int(*)(void *, char *, size_t) | chfunc, | ||
void * | charg, | ||
VALUE | fds, | ||
char * | errmsg, | ||
size_t | errmsg_buflen | ||
) |
Referenced by establishShell(), pipe_open(), and rb_spawn_process().
rb_pid_t rb_fork_ruby | ( | int * | status | ) |
Referenced by pipe_open().
Definition at line 1030 of file variable.c.
Referenced by obj_free(), and rb_copy_generic_ivar().
Definition at line 201 of file string.c.
Referenced by case_when_optimizable_literal(), compile_dstr_fragments(), eval_string_with_cref(), iseq_compile_each(), prepare_iseq_build(), rb_id2str(), rb_insns_name_array(), rb_reg_initialize(), register_symid_str(), switch(), and when_vals().
Definition at line 833 of file vm_eval.c.
Referenced by rb_f_chomp(), rb_f_chop(), rb_f_gsub(), and rb_f_sub().
Definition at line 841 of file vm_eval.c.
Referenced by sym_call().
Calls a method.
recv | receiver of the method |
mid | an ID that represents the name of the method |
argc | the number of arguments |
argv | pointer to an array of method arguments |
Definition at line 812 of file vm_eval.c.
Referenced by binomial_coefficient(), cmp_eq_recursive(), descending_factorial(), dump_output(), hash_recursive(), rb_ary_bsearch(), rb_ary_cycle_size(), rb_ary_repeated_permutation_size(), rb_io_write(), recursive_cmp(), and sort_2().
Definition at line 5193 of file gc.c.
Referenced by dir_initialize(), getDevice(), rb_fdopen(), rb_gc_start(), rb_pipe(), rb_sysopen(), rsock_s_accept(), rsock_socket(), and ruby_dup().
Definition at line 2144 of file gc.c.
Referenced by ruby_finalize_1().
Definition at line 1998 of file gc.c.
Referenced by init_copy().
size_t rb_gc_count | ( | void | ) |
Definition at line 5222 of file gc.c.
Referenced by gc_after_sweep(), gc_before_sweep(), gc_count(), gc_page_sweep(), mark_m_tbl_wrapper(), and newobj_i().
Definition at line 5641 of file gc.c.
Referenced by Init_GC(), and tcl_protect_core().
Definition at line 5619 of file gc.c.
Referenced by if(), Init_GC(), and tcl_protect_core().
Definition at line 4900 of file gc.c.
Referenced by dispose_string(), fixup_nodes(), if(), literal_concat_gen(), parser_heredoc_restore(), parser_yylex(), rb_ary_decrement_share(), rb_parser_free(), rb_str_conv_enc_opts(), ruby_vm_destruct(), and switch().
Definition at line 3607 of file gc.c.
Referenced by _thread_call_proc_arg_mark(), addrinfo_mark(), argf_mark(), autoload_i_mark(), backtrace_mark(), bm_mark(), call_queue_mark(), cont_mark(), cparse_params_mark(), d_lite_gc_mark(), dir_mark(), dlcfunc_mark(), dlptr_mark(), enumerator_mark(), eval_queue_mark(), fiber_mark(), fiddle_ptr_mark(), gc_mark_roots(), generator_mark(), givar_mark_i(), gzfile_mark(), invoke_queue_mark(), iow_mark(), location_mark(), location_mark_entry(), mark_dump_arg(), mark_exec_arg(), mark_marshal_compat_i(), parser_mark(), random_mark(), rb_mark_end_proc(), rb_thread_mark(), rb_vm_mark(), rb_vm_trace_mark_event_hooks(), strio_mark(), strscan_mark(), thread_shield_mark(), time_mark(), tp_mark(), vm_mark_each_thread_func(), wmap_mark(), yielder_mark(), and zstream_mark().
Definition at line 236 of file encoding.c.
Definition at line 562 of file variable.c.
Referenced by gc_mark_roots().
Definition at line 3540 of file gc.c.
Referenced by gc_mark_roots(), JSON_mark(), mark_global_entry(), val_marker(), and var_marker().
Definition at line 4930 of file gc.c.
Referenced by Init_coverage(), Init_readline(), and rb_global_variable().
Definition at line 4923 of file gc.c.
Referenced by compat_allocator_table(), date__strptime_internal(), date_zone_to_diff(), Init_date_core(), Init_Encoding(), Init_IO(), Init_load(), Init_Random(), Init_VM(), Init_win32ole(), power_cache_get_power(), pruby_init(), rb_define_class_id_under(), rb_define_module_id_under(), regcomp(), rt_complete_frags(), ruby_process_options(), and sym_to_proc().
Definition at line 3615 of file gc.c.
Referenced by fstr_update_callback().
Definition at line 4734 of file gc.c.
Referenced by rb_obj_written().
Definition at line 4785 of file gc.c.
Referenced by ary_memcpy(), rb_ary_modify(), rb_hash_keys(), and rb_hash_values().
Definition at line 4752 of file gc.c.
Referenced by rb_obj_wb_unprotect().
Definition at line 356 of file rational.c.
Definition at line 907 of file variable.c.
unsigned long rb_genrand_ulong_limited | ( | unsigned long | i | ) |
Definition at line 789 of file random.c.
Referenced by bary_sparse_p().
rb_alloc_func_t rb_get_alloc_func | ( | VALUE | ) |
Definition at line 525 of file vm_method.c.
Referenced by obj_alloc_by_klass(), r_fixup_compat(), r_object0(), rb_marshal_define_compat(), rb_obj_alloc(), and w_object().
Definition at line 55 of file eval_error.c.
Definition at line 5297 of file thread.c.
Referenced by clear_coverage(), coverage(), prepare_iseq_build(), rb_coverage_result(), and rb_coverage_start().
Definition at line 109 of file load.c.
Referenced by rb_feature_p(), rb_find_file_ext_safe(), and rb_find_file_safe().
Definition at line 696 of file signal.c.
Referenced by rb_threadptr_execute_interrupts().
Definition at line 226 of file file.c.
Referenced by apply2files(), rb_feature_provided(), and rb_file_s_path().
Definition at line 199 of file file.c.
Referenced by rb_construct_expanded_load_path(), and rb_get_path_check().
Definition at line 177 of file file.c.
Referenced by rb_construct_expanded_load_path(), and rb_get_path_check().
struct rb_global_entry* rb_global_entry | ( | ID | ) |
Definition at line 450 of file variable.c.
Referenced by iseq_build_from_ary_body(), rb_alias_variable(), rb_define_hooked_variable(), rb_f_trace_var(), rb_gv_get(), and rb_gv_set().
Definition at line 4965 of file gc.c.
Referenced by Init_openssl(), Init_ossl_asn1(), Init_RandomSeed(), Init_Regexp(), Init_tcltklib(), and Init_tkutil().
Definition at line 819 of file variable.c.
Referenced by load_file(), and mSyslog_open().
Definition at line 810 of file variable.c.
Referenced by process_sflag(), and restore_lineno().
VALUE rb_gvar_defined | ( | struct rb_global_entry * | ) |
VALUE rb_gvar_get | ( | struct rb_global_entry * | ) |
Referenced by rb_gv_get().
void rb_gvar_readonly_setter | ( | VALUE | val, |
ID | id, | ||
void * | data, | ||
struct rb_global_variable * | gvar | ||
) |
Referenced by Init_IO(), Init_load(), and ruby_prog_init().
VALUE rb_gvar_set | ( | struct rb_global_entry * | , |
VALUE | |||
) |
Referenced by rb_gv_set().
VALUE rb_gvar_undef_getter | ( | ID | id, |
void * | data, | ||
struct rb_global_variable * | gvar | ||
) |
void rb_gvar_undef_setter | ( | VALUE | val, |
ID | id, | ||
void * | data, | ||
struct rb_global_variable * | gvar | ||
) |
VALUE rb_gvar_val_getter | ( | ID | id, |
void * | data, | ||
struct rb_global_variable * | gvar | ||
) |
void rb_gvar_val_setter | ( | VALUE | val, |
ID | id, | ||
void * | data, | ||
struct rb_global_variable * | gvar | ||
) |
VALUE rb_gvar_var_getter | ( | ID | id, |
void * | data, | ||
struct rb_global_variable * | gvar | ||
) |
void rb_gvar_var_setter | ( | VALUE | val, |
ID | id, | ||
void * | data, | ||
struct rb_global_variable * | gvar | ||
) |
Definition at line 106 of file hash.c.
Referenced by cdhash_hash(), hash_i(), nucomp_hash(), nurat_hash(), range_hash(), rb_any_hash(), rb_ary_hash(), rb_struct_hash(), and time_hash().
Definition at line 3069 of file object.c.
Referenced by rb_f_hash().
Definition at line 706 of file hash.c.
Referenced by cParser_initialize(), cState_configure(), cto_i(), dump_output(), econv_opts(), econv_primitive_convert(), extract_binmode(), generate_json_object(), hash2ptr_dispparams(), hash2result(), Init_Hash(), io_read_nonblock(), io_s_write(), iseq_build_from_ary_body(), JSON_parse_object(), mString_Extend_json_create(), open_key_args(), ossl_ssl_read_internal(), ossl_ssl_write_nonblock(), parse_main(), pruby_get_instance(), rawmode_opt(), rb_econv_open_opts(), rb_econv_prepare_options(), rb_hash_values_at(), rb_io_extract_modeenc(), rb_io_initialize(), rb_io_write_nonblock(), rb_str_sub_bang(), rb_thread_variable_get(), rb_threadptr_pending_interrupt_check_mask(), realpath_rec(), recursive_list_access(), str_gsub(), str_transcode0(), strio_read_nonblock(), tr_setup_table(), transcode_loop(), and zstream_run().
Definition at line 1333 of file hash.c.
Referenced by Init_Hash(), and rb_hash_replace().
Definition at line 1005 of file hash.c.
Referenced by Init_Hash(), pruby_unregister_instance(), and recursive_pop().
Definition at line 1103 of file hash.c.
Referenced by env_reject(), fdbm_reject(), fgdbm_reject(), fsdbm_reject(), and Init_Hash().
Definition at line 329 of file hash.c.
Referenced by io_s_write(), and rb_using_refinement().
st_index_t rb_hash_end | ( | st_index_t | ) |
Definition at line 273 of file hash.c.
Referenced by core_hash_merge_kwd(), env_replace(), env_update(), initialize(), inspect_hash(), iseq_data_to_ary(), iseq_set_sequence(), JSON_parse_string(), rb_hash_assoc(), rb_hash_clear(), rb_hash_delete_if(), rb_hash_each_key(), rb_hash_each_pair(), rb_hash_each_value(), rb_hash_flatten(), rb_hash_has_value(), rb_hash_hash(), rb_hash_invert(), rb_hash_keep_if(), rb_hash_key(), rb_hash_keys(), rb_hash_rassoc(), rb_hash_rehash(), rb_hash_reject(), rb_hash_reject_bang(), rb_hash_replace(), rb_hash_select(), rb_hash_select_bang(), rb_hash_shift(), rb_hash_to_a(), rb_hash_update(), rb_hash_update_by(), rb_hash_values(), rb_thread_s_handle_interrupt(), rb_thread_variables(), reachable_objects_from_root(), recursive_eql(), using_module_recursive(), and w_object().
Definition at line 62 of file hash.c.
Referenced by rb_coverage_result(), and rb_econv_prepare_options().
Definition at line 1792 of file hash.c.
Referenced by Init_Hash().
Definition at line 717 of file hash.c.
Referenced by ary_add_hash(), ary_add_hash_by(), lookup2_call(), rb_hash_lookup(), rb_io_extract_encoding_option(), recursive_check(), recursive_pop(), and recursive_push().
Definition at line 307 of file hash.c.
Referenced by allocate_cbsubst_info(), ary_tmp_hash_new(), check_exec_fds(), check_exec_options_i_extract(), core_hash_from_ary(), count_nodes(), count_objects(), count_objects_size(), count_tdata_objects(), cState_to_h(), date__httpdate(), date__iso8601(), date__jisx0301(), date__parse(), date__rfc2822(), date__rfc3339(), date__xmlschema(), date_s__strptime_internal(), date_zone_to_diff(), enum_group_by(), enum_to_h(), env_select(), env_to_hash(), fdbm_invert(), fdbm_to_hash(), fgdbm_invert(), fgdbm_to_hash(), fsdbm_invert(), fsdbm_to_hash(), gc_latest_gc_info(), gc_profile_record_get(), gc_stat(), hidden_identity_hash_new(), ident_hash_new(), Init_BareVM(), Init_GC(), Init_ossl_asn1(), Init_ossl_x509name(), Init_sizeof(), Init_tkutil(), Init_VM(), io_s_write(), iseq_compile_each(), iseq_data_to_ary(), JSON_parse_object(), make_compile_option_value(), mString_to_json_raw_object(), nil_to_h(), ole_const_load(), ossl_dh_get_params(), ossl_dsa_get_params(), ossl_rsa_get_params(), ossl_sslctx_get_session_cache_stats(), pruby_init(), r_object0(), rb_ary_to_h(), rb_coverage_result(), rb_coverage_start(), rb_econv_prepare_options(), rb_enc_aliases(), rb_execarg_fixup(), rb_Hash(), rb_hash_invert(), rb_hash_reject(), rb_hash_select(), rb_hash_to_h(), rb_inflate_s_allocate(), rb_realpath_internal(), rb_reg_named_captures(), rb_struct_to_h(), rb_uninterruptible(), reachable_object_from_root_i(), reachable_objects_from_root(), recursive_push(), ripper_init_eventids1_table(), ripper_init_eventids2_table(), ruby_thread_init(), separate_symbol(), sig_list(), tr_setup_table(), tr_trans(), vm_callee_setup_keyword_arg(), vm_default_params(), and vm_stat().
st_index_t rb_hash_proc | ( | st_index_t | hash, |
VALUE | proc | ||
) |
Definition at line 985 of file proc.c.
Referenced by proc_hash(), and rb_hash_method_definition().
st_index_t rb_hash_start | ( | st_index_t | ) |
Definition at line 1296 of file random.c.
Referenced by match_hash(), method_hash(), proc_hash(), range_hash(), rb_ary_hash(), rb_hash_hash(), rb_objid_hash(), and rb_struct_hash().
Definition at line 353 of file hash.c.
Referenced by collect_values_of_values().
Definition at line 360 of file hash.c.
Referenced by clear_coverage(), ident_hash_new(), iseq_compile_each(), rb_ary_and(), rb_ary_diff(), rb_ary_uniq_bang(), rb_check_exec_env(), rb_check_exec_options(), rb_execarg_extract_options(), rb_extract_keywords(), and unknown_keyword_error().
st_index_t rb_hash_uint | ( | st_index_t | , |
st_index_t | |||
) |
st_index_t rb_hash_uint32 | ( | st_index_t | , |
uint32_t | |||
) |
VALUE rb_hash_update_by | ( | VALUE | hash1, |
VALUE | hash2, | ||
rb_hash_update_func * | func | ||
) |
Definition at line 1836 of file hash.c.
Referenced by Init_Hash(), rb_ary_or(), and rb_ary_uniq().
Definition at line 3002 of file file.c.
Referenced by dir_s_home(), and rb_file_expand_path_internal().
Definition at line 732 of file encoding.c.
Definition at line 470 of file object.c.
Referenced by advice_arg_check(), append_method(), cannot_be_coerced_into_BigDecimal(), coerce_failed(), control_frame_dump(), env_inspect(), get_exception_sym2type(), inspect_ary(), inspect_i(), inspect_range(), inspect_struct(), iseq_build_from_ary_body(), method_inspect(), name_err_mesg_to_str(), opobj_inspect(), ossl_x509_inspect(), rb_check_id(), rb_cmperr(), rb_hash_fetch_m(), rb_insn_operand_intern(), rb_mod_to_s(), rb_p(), rb_stat_inspect(), rb_str_format(), rb_throw_obj(), rb_vmdebug_debug_print_post(), rb_vmdebug_proc_dump_raw(), ruby__sfvextra(), ruby_debug_print_value(), vm_check_if_namespace(), and wmap_inspect_i().
VALUE rb_int2big | ( | SIGNED_VALUE | ) |
VALUE rb_int2inum | ( | SIGNED_VALUE | ) |
VALUE rb_int_positive_pow | ( | long | x, |
unsigned long | y | ||
) |
Definition at line 3056 of file numeric.c.
Referenced by parser_yylex().
Definition at line 2757 of file object.c.
Referenced by function_call(), get_freefunc(), ossl_x509stctx_set_time(), rb_dlcfunc_initialize(), rb_dlptr_initialize(), rb_dlptr_s_to_ptr(), rb_fiddle_ptr_initialize(), rb_fiddle_ptr_s_to_ptr(), rb_gzfile_set_mtime(), rb_str_format(), time_mdump(), time_to_time_t(), and value_to_generic().
ID rb_intern3 | ( | const char * | , |
long | , | ||
rb_encoding * | |||
) |
ID rb_interned_id_p | ( | const char * | , |
long | , | ||
rb_encoding * | |||
) |
Definition at line 4748 of file io.c.
Referenced by argf_binmode_m(), argf_next_argv(), rb_io_binmode_m(), and rsock_init_sock().
Definition at line 4702 of file io.c.
Referenced by argf_next_argv(), io_reopen(), rb_io_init_copy(), and seek_before_access().
Definition at line 4315 of file io.c.
Referenced by argf_next_argv(), bsock_close_read(), bsock_close_write(), console_dev(), gzfile_wrap(), io_s_write(), load_file_internal(), pty_close_pty(), rb_f_backquote(), rb_gets(), rb_io_close_m(), rb_io_close_read(), rb_io_close_write(), rb_io_s_binread(), rb_io_s_foreach(), rb_io_s_pipe(), rb_io_s_read(), and rb_io_s_readlines().
Definition at line 1745 of file io.c.
Referenced by argf_eof(), and Init_IO().
Definition at line 7247 of file io.c.
Referenced by load_file_internal().
Definition at line 1510 of file io.c.
Referenced by dump_output(), dump_result(), Init_IO(), process_options(), rb_f_p_internal(), rb_io_getbyte(), rb_io_init_copy(), and rb_io_s_popen().
Definition at line 1466 of file io.c.
Referenced by rb_file_flock(), rb_file_size(), and rb_io_flush().
Definition at line 627 of file io.c.
Referenced by io_reopen(), rb_io_init_copy(), and select_internal().
Definition at line 3795 of file io.c.
Referenced by argf_getbyte(), Init_IO(), io_strip_bom(), load_file_internal(), and rb_io_readbyte().
Definition at line 3189 of file io.c.
Referenced by argf_getline(), lex_io_gets(), load_file_internal(), and rb_gets().
Definition at line 6846 of file io.c.
Referenced by Init_IO(), and rb_f_print().
Definition at line 7011 of file io.c.
Referenced by Init_IO(), io_puts_ary(), rb_f_abort(), rb_f_puts(), and rb_warn_m().
Definition at line 3856 of file io.c.
Referenced by Init_IO(), io_strip_bom(), and load_file_internal().
Definition at line 1427 of file io.c.
Referenced by argf_write(), copy_stream_body(), copy_stream_fallback_body(), gc_profile_report(), marshal_dump(), oldbt_print_to(), process_options(), rb_f_printf(), rb_io_addstr(), rb_io_print(), rb_io_printf(), rb_io_putc(), rb_io_puts(), rb_obj_display(), rb_p(), rb_write_error2(), rb_write_error_str(), and w_nbyte().
Definition at line 5282 of file file.c.
Referenced by path_check_0(), rb_construct_expanded_load_path(), rb_file_expand_path_internal(), rb_find_file_ext_safe(), and rb_find_file_safe().
Definition at line 1938 of file encoding.c.
Definition at line 1939 of file encoding.c.
Definition at line 1940 of file encoding.c.
Definition at line 1941 of file encoding.c.
Definition at line 1942 of file encoding.c.
Definition at line 882 of file iseq.c.
Referenced by Init_ISeq(), and rb_profile_frame_absolute_path().
Definition at line 941 of file iseq.c.
Referenced by Init_ISeq(), and rb_profile_frame_base_label().
Definition at line 1923 of file iseq.c.
Referenced by clone_method(), and vm_define_method().
Definition at line 959 of file iseq.c.
Referenced by Init_ISeq(), iseq_location(), proc_binding(), proc_to_s(), rb_method_entry_make(), and rb_profile_frame_first_lineno().
Definition at line 967 of file iseq.c.
Referenced by rb_profile_frame_classpath(), and rb_profile_frame_singleton_method_p().
Definition at line 913 of file iseq.c.
Referenced by Init_ISeq(), and rb_profile_frame_label().
Definition at line 975 of file iseq.c.
Referenced by rb_profile_frame_method_name(), and rb_profile_frame_qualified_method_name().
Definition at line 858 of file iseq.c.
Referenced by Init_ISeq(), and rb_profile_frame_path().
Definition at line 1943 of file encoding.c.
Definition at line 1944 of file encoding.c.
Definition at line 1945 of file encoding.c.
Definition at line 1946 of file encoding.c.
Definition at line 1947 of file encoding.c.
Definition at line 1948 of file encoding.c.
Definition at line 1949 of file encoding.c.
Definition at line 1059 of file vm_eval.c.
Referenced by call_lexer(), method_proc(), rb_block_call(), rb_check_block_call(), and rb_proc_new().
Definition at line 2604 of file variable.c.
Referenced by callback(), esignal_signo(), function_call(), localjump_reason(), localjump_xvalue(), ossl_call_session_get_cb(), ossl_call_session_new_cb(), ossl_call_session_remove_cb(), ossl_ssl_setup(), ossl_sslctx_setup(), ossl_x509extfactory_create_ext(), ossl_x509stctx_initialize(), ossl_x509stctx_verify(), ossl_x509store_verify(), parse(), pst_to_i(), ruby_cleanup(), set_state_ivars(), ssl_renegotiation_cb(), and sysexit_status().
Definition at line 2612 of file variable.c.
Referenced by argument_error(), build_exception(), esignal_init(), exc_initialize(), exc_set_backtrace(), exit_initialize(), Init_VM(), initialize(), initialize_params(), make_localjump_error(), name_err_initialize(), nometh_err_initialize(), ossl_ssl_initialize(), ossl_sslctx_initialize(), ossl_x509extfactory_alloc(), ossl_x509extfactory_set_crl(), ossl_x509extfactory_set_issuer_cert(), ossl_x509extfactory_set_subject_cert(), ossl_x509extfactory_set_subject_req(), ossl_x509stctx_initialize(), ossl_x509store_initialize(), ossl_x509store_set_flags(), ossl_x509store_set_purpose(), ossl_x509store_set_time(), ossl_x509store_set_trust(), ossl_x509store_set_vfy_cb(), ossl_x509store_verify(), parse_keyword_arg_i(), raise_from_check(), rb_last_status_set(), setup_exception(), switch(), and syserr_initialize().
st_index_t rb_ivar_count | ( | VALUE | ) |
Definition at line 1302 of file variable.c.
Referenced by rb_obj_inspect().
Definition at line 1207 of file variable.c.
Referenced by copy_ivar_i(), get_digest_base_metadata(), rb_obj_ivar_defined(), and struct_ivar_get().
Definition at line 1274 of file variable.c.
Referenced by inspect_obj(), r_copy_ivar(), rb_obj_instance_variables(), and w_objivar().
Definition at line 1115 of file variable.c.
Referenced by add_event_call_back(), call_trace_func(), cState_aref(), cvar_front_klass(), echild_status(), EVENTSINK_Invoke(), fev_get_handler(), fev_off_event(), fole_s_show_help(), folemethod_event(), folemethod_name(), foleparam_name(), foletype_name(), folevariable_name(), get_digest_base_metadata(), get_strpath(), initialize_params(), lazy_drop_size(), lazy_size(), lazy_take_size(), method_inspect(), nucomp_loader(), nurat_loader(), ossl_start_ssl(), range_loader(), rb_enc_get_index(), rb_inflate_add_dictionary(), rb_iv_get(), rb_method_name_error(), rb_mod_to_s(), rb_obj_ivar_get(), rb_profile_frame_classpath(), rb_singleton_class_get(), rb_thread_variable_get(), rb_thread_variable_p(), rb_thread_variable_set(), rb_thread_variables(), rb_undef(), reduce(), singleton_class_of(), struct_ivar_get(), tcl_protect_core(), vm_getivar(), and zstream_run().
Definition at line 336 of file process.c.
Referenced by proc_wait(), proc_waitall(), rb_f_backquote(), rb_f_system(), and rb_io_close().
Definition at line 321 of file process.c.
Referenced by detach_process_watcher(), Init_process(), proc_wait2(), proc_waitall(), pty_check(), raise_from_check(), rb_f_system(), and waitall_each().
Definition at line 327 of file process.c.
Referenced by pipe_finalize(), proc_waitall(), rb_spawn_process(), rb_waitpid(), and waitall_each().
Definition at line 959 of file vm.c.
Referenced by Init_IO(), rb_io_print(), rb_reg_match2(), and uscore_get().
Definition at line 965 of file vm.c.
Referenced by argf_gets(), Init_IO(), rb_f_chomp(), rb_f_chop(), rb_f_gsub(), rb_f_sub(), rb_gets(), rb_gzreader_gets(), rb_io_gets_m(), and strio_gets().
Definition at line 1732 of file rational.c.
Referenced by Init_Rational(), and nucomp_denominator().
Definition at line 648 of file load.c.
Referenced by rb_load_protect().
Definition at line 824 of file pepper_main.c.
Definition at line 1776 of file ruby.c.
Referenced by rb_load_file(), and rb_load_internal0().
Definition at line 23 of file localeinit.c.
Definition at line 1287 of file encoding.c.
rb_encoding* rb_locale_encoding | ( | void | ) |
Definition at line 1309 of file encoding.c.
Definition at line 719 of file string.c.
Referenced by env_str_new().
Definition at line 725 of file string.c.
Referenced by filename_completion_proc_call(), hist_each(), hist_get(), rb_remove_history(), readline_attempted_completion_function(), readline_readline(), time_mdump(), time_zone(), and username_completion_proc_call().
Definition at line 817 of file vm_backtrace.c.
Definition at line 817 of file vm_backtrace.c.
Referenced by parser_set_encode().
Definition at line 80 of file eval_jump.c.
Definition at line 992 of file variable.c.
Referenced by gc_mark_children().
Definition at line 1022 of file variable.c.
Referenced by gc_mark_roots().
Definition at line 3384 of file gc.c.
Referenced by Init_win32ole(), mark_dump_arg(), and mark_load_arg().
Definition at line 3360 of file gc.c.
Referenced by mark_dump_arg().
Definition at line 3522 of file gc.c.
Referenced by autoload_mark(), mark_load_arg(), rb_gc_mark_symbols(), rb_mark_generic_ivar(), rb_thread_mark(), and rb_vm_mark().
void rb_marshal_define_compat | ( | VALUE | newclass, |
VALUE | oldclass, | ||
VALUE(*)(VALUE) | dumper, | ||
VALUE(*)(VALUE, VALUE) | loader | ||
) |
Definition at line 115 of file marshal.c.
Referenced by Init_Complex(), Init_Encoding(), Init_Range(), Init_Rational(), and Init_vm_backtrace().
Definition at line 2169 of file marshal.c.
Referenced by date_s__load().
Definition at line 1246 of file re.c.
Referenced by date__httpdate(), date__iso8601(), date__jisx0301(), date__parse(), date__rfc2822(), date__rfc3339(), date__strptime_internal(), date__xmlschema(), match_getter(), nucomp_s_convert(), nurat_s_convert(), and rb_reg_match_m().
Definition at line 896 of file math.c.
Referenced by m_log_bang().
Definition at line 198 of file io.c.
Referenced by cloexec_accept(), rb_cloexec_dup2(), rb_cloexec_fcntl_dupfd(), rb_cloexec_open(), rb_cloexec_pipe(), and rb_fd_fix_cloexec().
Definition at line 80 of file re.c.
Referenced by parser_encode_length(), and rb_file_identical_p().
st_index_t rb_memhash | ( | const void * | ptr, |
long | len | ||
) |
Definition at line 1302 of file random.c.
Referenced by BigDecimal_hash(), d_lite_hash(), match_hash(), nucomp_hash(), nurat_hash(), rb_big_hash(), rb_dbl_hash(), rb_str_hash(), and reg_hash().
long rb_memsearch | ( | const void * | , |
long | , | ||
const void * | , | ||
long | , | ||
rb_encoding * | |||
) |
Definition at line 253 of file re.c.
Referenced by rb_str_enumerate_lines(), rb_str_index(), and rb_str_split_m().
Definition at line 1585 of file vm_method.c.
Referenced by check_funcall_missing(), hash_default_value(), make_no_method_exception(), method_missing(), mnew_from_me(), obj_respond_to(), rb_mod_const_get(), rb_obj_respond_to(), rb_p(), send_internal(), set_backtrace(), and vm_call_opt_send().
Definition at line 848 of file vm_method.c.
Referenced by basic_obj_respond_to(), and rb_mod_method_defined().
Definition at line 1791 of file proc.c.
Referenced by Init_Proc(), and method_fallback().
Definition at line 1798 of file proc.c.
Referenced by bmcall(), and rb_method_call().
Definition at line 2531 of file variable.c.
Referenced by Init_Object().
Definition at line 2004 of file variable.c.
Referenced by rb_mod_const_of(), and rb_mod_s_constants().
Definition at line 1519 of file variable.c.
Referenced by Init_Object().
Definition at line 2017 of file variable.c.
Referenced by rb_mod_constants(), and rb_mod_s_constants().
Definition at line 2071 of file variable.c.
Referenced by Init_Object(), and rb_mod_s_constants().
Definition at line 2111 of file proc.c.
Referenced by rb_obj_method_arity().
Definition at line 1684 of file vm_eval.c.
Referenced by Init_vm_eval(), and rb_struct_s_def().
Definition at line 1712 of file vm_eval.c.
Referenced by Init_vm_eval(), and rb_mod_initialize().
Definition at line 206 of file variable.c.
Referenced by Init_Object().
Definition at line 1920 of file variable.c.
Referenced by Init_Object(), and new_struct().
Definition at line 2572 of file variable.c.
Referenced by Init_Object().
Definition at line 1579 of file string.c.
Referenced by dir_s_home(), rb_str2big_karatsuba(), rb_str2big_normal(), rb_str2big_poweroftwo(), rb_str_to_inum(), string_to_c(), string_to_c_strict(), string_to_r(), and string_to_r_strict().
Definition at line 4646 of file thread.c.
Referenced by io_binwrite().
Definition at line 4377 of file thread.c.
Referenced by Init_Thread(), rb_mutex_sleep(), rb_mutex_synchronize(), rb_thread_shield_new(), and rb_thread_shield_wait().
Definition at line 4267 of file thread.c.
Referenced by Init_Thread().
Definition at line 4255 of file thread.c.
Referenced by io_binwrite().
Definition at line 4453 of file thread.c.
Referenced by finish_writeconv(), Init_Thread(), and io_flush_buffer().
Definition at line 4571 of file thread.c.
Referenced by mutex_sleep().
Definition at line 4623 of file thread.c.
Referenced by fptr_finalize(), io_binwrite(), io_flush_buffer(), and rb_mutex_synchronize_m().
Definition at line 4294 of file thread.c.
Referenced by Init_Thread(), and rb_mutex_lock().
Definition at line 4508 of file thread.c.
Referenced by Init_Thread(), rb_mutex_sleep(), rb_mutex_synchronize(), rb_thread_shield_destroy(), rb_thread_shield_release(), and rb_thread_shield_wait().
Definition at line 385 of file variable.c.
Referenced by boot_defclass(), rb_define_class(), and rb_define_module_id().
rb_serial_t rb_next_class_serial | ( | void | ) |
Definition at line 92 of file vm.c.
Referenced by class_alloc(), and rb_class_clear_method_cache().
|
inlinestatic |
double rb_num2dbl | ( | VALUE | ) |
Definition at line 2987 of file object.c.
Referenced by thread_join_m().
SIGNED_VALUE rb_num2long | ( | VALUE | ) |
Definition at line 2038 of file numeric.c.
Referenced by rb_fix2short(), rb_num2fix(), rb_num2int(), rb_num2long_inline(), and rb_num2short().
short rb_num2short | ( | VALUE | ) |
Definition at line 2240 of file numeric.c.
Referenced by rb_num2short_inline().
Definition at line 2118 of file numeric.c.
Referenced by rb_num2ulong_inline().
|
inlinestatic |
unsigned short rb_num2ushort | ( | VALUE | ) |
Definition at line 2258 of file numeric.c.
Referenced by rb_fix2ushort().
Definition at line 285 of file numeric.c.
Referenced by f_addsub(), f_divide(), fix_divide(), fix_divmod(), fix_fdiv(), fix_minus(), fix_mod(), fix_mul(), fix_plus(), fix_pow(), flo_div(), flo_divmod(), flo_minus(), flo_mod(), flo_mul(), flo_plus(), flo_pow(), nucomp_expt(), nucomp_mul(), nurat_add(), nurat_div(), nurat_expt(), nurat_mul(), nurat_sub(), rb_big_divide(), rb_big_divmod(), rb_big_fdiv(), rb_big_minus(), rb_big_modulo(), rb_big_mul(), rb_big_plus(), rb_big_pow(), and rb_big_remainder().
Definition at line 3319 of file numeric.c.
Referenced by rb_big_and(), rb_big_or(), and rb_big_xor().
Definition at line 292 of file numeric.c.
Referenced by BigDecimalCmp(), cmp_gen(), equal_gen(), fix_cmp(), flo_cmp(), num_step(), nurat_cmp(), rb_big_cmp(), and ruby_num_interval_step_size().
Definition at line 197 of file numeric.c.
Referenced by rb_random_ulong_limited().
Definition at line 132 of file numeric.c.
Referenced by int_chr(), and rb_str_concat().
Definition at line 1804 of file object.c.
Referenced by bsock_s_for_fd(), build_exception(), enum_chunk(), enum_slice_before(), Init_Hash(), Init_Object(), Init_readline(), Init_Thread(), Init_tkutil(), Init_top_self(), int_ossl_asn1_decode0_cons(), int_ossl_asn1_decode0_prim(), obj_alloc_by_klass(), ossl_sslctx_session_new_cb(), ossl_sslctx_session_remove_cb(), pty_getpty(), pty_open(), r_object0(), rb_catch(), rb_class_new_instance(), rb_digest_class_s_digest(), rb_f_catch(), rb_io_s_for_fd(), rb_last_status_set(), rb_obj_clone(), rb_obj_dup(), rb_range_new(), rb_str_conv_enc_opts(), rsock_s_accept(), and rsock_s_accept_nonblock().
Definition at line 1011 of file string.c.
Referenced by ary_join_1(), compile_err_append(), exc_inspect(), fdbm_store(), init_libraries(), io_write(), io_write_nonblock(), pack_pack(), pruby_eval(), pruby_obj_to_var(), rand_random(), range_to_s(), rb_gzwriter_write(), rb_inspect(), rb_io_puts(), rb_io_syswrite(), rb_p(), rb_str_format(), rb_str_sub_bang(), readline_attempted_completion_function(), reg_fragment_check_gen(), ruby__sfvextra(), setup_exception(), str_gsub(), strio_write(), and tcl_protect_core().
Definition at line 226 of file object.c.
Referenced by ary_make_shared_copy(), BigDecimal_new(), cannot_be_coerced_into_BigDecimal(), coerce_failed(), copy_path_class(), d_lite_plus(), dup_obj(), dup_obj_as_complex(), enc_inspect(), encoded_dup(), exc_equal(), extract_user_token(), get_new_timeval(), get_timeval(), if(), Init_Object(), inspect_enumerator(), inspect_struct(), io_reopen(), mString_to_json_raw_object(), mSyslog_log(), name_err_mesg_equal(), not_encoding(), ossl_asn1_default_tag(), ossl_cipher_init(), ossl_x509_inspect(), path_basename(), path_dirname(), path_each_entry(), path_entries(), path_expand_path(), path_readlink(), path_realdirpath(), path_realpath(), path_split(), path_sub(), path_sub_ext(), random_equal(), rb_ary_slice_bang(), rb_ary_subseq(), rb_ary_times(), rb_ary_to_a(), rb_ary_uniq(), rb_digest_base_block_length(), rb_digest_base_copy(), rb_digest_base_digest_length(), rb_digest_base_finish(), rb_digest_base_reset(), rb_digest_base_update(), rb_dlptr_inspect(), rb_fiddle_ptr_inspect(), rb_hash_aset(), rb_hash_dup_empty(), rb_hash_to_h(), rb_ivar_set(), rb_obj_alloc(), rb_obj_clone(), rb_obj_dup(), rb_obj_init_copy(), rb_obj_is_instance_of(), rb_profile_frame_classpath(), rb_stat_cmp(), rb_str_dup(), rb_str_new_frozen(), rb_str_new_shared(), rb_str_new_with_class(), rb_str_substr(), rb_str_to_s(), rb_struct_eql(), rb_struct_equal(), rb_struct_hash(), rb_struct_initialize_m(), rb_struct_members(), rb_struct_members_m(), rb_tmp_class_path(), str_byte_substr(), str_gsub(), strscan_inspect(), syserr_initialize(), tcl_protect_core(), time_dup(), undumpable(), and vm_search_super_method().
Definition at line 406 of file variable.c.
Referenced by addrinfo_inspect(), BigDecimal_power(), check_type_val2variant(), convert_type(), d_lite_inspect(), divmodv(), econv_inspect(), enum_zip(), generator_initialize(), GetVpValueWithPrec(), init_copy(), iseq_inspect(), lazy_zip(), match_inspect(), method_inspect(), must_respond_to(), nucomp_coerce(), num_exact(), num_init_copy(), num_sadded(), nurat_coerce(), path_inspect(), proc_to_s(), range_bsearch(), range_each(), range_step(), rb_ary_bsearch(), rb_big_coerce(), rb_builtin_class_name(), rb_check_convert_type(), rb_check_inheritable(), rb_check_safe_str(), rb_check_typeddata(), rb_cmperr(), rb_convert_type(), rb_define_module(), rb_define_module_id_under(), rb_digest_instance_inspect(), rb_digest_instance_method_unimpl(), rb_f_kill(), rb_Hash(), rb_hash_set_default_proc(), rb_mod_define_method(), rb_obj_clone(), rb_obj_dup(), rb_stat_inspect(), rb_str_index_m(), rb_str_partition(), rb_str_rindex_m(), rb_str_rpartition(), rb_thread_inspect(), rb_to_float(), rb_to_integer(), rescue_callback(), setup_exception(), should_be_callable(), should_be_finalizable(), sockopt_inspect(), time_timespec(), uscore_get(), using_module_recursive(), vm_caller_setup_args(), w_object(), and wdivmod().
Definition at line 337 of file object.c.
Referenced by exc_exception(), Init_Object(), rb_digest_instance_digest(), rb_digest_instance_hexdigest(), rb_digest_instance_new(), rb_eval_string_wrap(), and rb_load_internal0().
Definition at line 255 of file object.c.
Referenced by init_copy().
Definition at line 406 of file object.c.
Referenced by argf_initialize_copy(), enumerator_each(), Init_Object(), path_initialize(), path_to_s(), rb_hash_merge(), rb_io_init_copy(), and setup_exception().
Definition at line 930 of file encoding.c.
Definition at line 142 of file object.c.
Referenced by Init_Object(), and opt_eq_func().
Definition at line 1070 of file object.c.
Referenced by console_dev(), env_str_new(), Init_eval(), Init_File(), Init_GC(), Init_Object(), Init_ossl_ssl(), Init_Proc(), Init_String(), Init_strscan(), Init_tcltklib(), Init_tkutil(), Init_VM(), mk_ary_of_str(), ossl_sslctx_setup(), prep_io(), process_options(), pty_getpty(), pty_open(), rb_ary_flatten_bang(), rb_ary_freeze(), rb_construct_expanded_load_path(), rb_f_getenv(), rb_hash_freeze(), rb_insns_name_array(), rb_mod_freeze(), rb_str_freeze(), rb_str_upto(), ruby_init_loadpath_safe(), run_finalizer(), tcltklib_compile_info(), and vm_default_params().
Definition at line 1096 of file object.c.
Referenced by dump_object(), generic_ivar_set(), and Init_Object().
Referenced by dump_object(), and Init_objspace_dump().
Definition at line 53 of file object.c.
Referenced by power_cache_get_power(), rb_coverage_start(), rsock_s_recvfrom(), vm_init2(), zstream_append_buffer(), zstream_append_input(), and zstream_expand_buffer_into().
Definition at line 2376 of file gc.c.
Referenced by exec_recursive(), Init_GC(), iow_internal_object_id(), rb_exec_recursive_paired(), rb_exec_recursive_paired_outer(), and rb_obj_hash().
Definition at line 422 of file object.c.
Referenced by Init_Object().
Definition at line 1613 of file vm_eval.c.
Referenced by if(), and Init_vm_eval().
Definition at line 1645 of file vm_eval.c.
Referenced by if(), and Init_vm_eval().
Definition at line 1371 of file variable.c.
Definition at line 609 of file object.c.
Referenced by error_handle(), Init_Object(), ossl_pkey_initialize(), ossl_ssl_session_initialize(), ossl_ssl_session_set_time(), ossl_sslctx_flush_sessions(), and ossl_sslctx_session_get_cb().
Definition at line 646 of file object.c.
Referenced by case_when_optimizable_literal(), check_match(), check_type_val2variant(), cState_from_state_s(), discrete_object_p(), error_handle(), ev_advise(), EVENTSINK_Invoke(), f_kind_of_p(), fole_s_const_load(), fole_s_show_help(), folemethod_initialize(), foleparam_initialize(), GetBNPtr(), gzfile_read_raw_rescue(), host_str(), if(), Init_Object(), linear_object_p(), make_exception(), ole_invoke(), ole_val2variant(), os_obj_of_i(), ossl_asn1cons_to_der(), ossl_asn1data_to_der(), ossl_bn_coerce(), ossl_bn_initialize(), parse(), path_cmp(), path_eq(), pending_exception_check0(), range_eq(), range_eql(), range_max(), range_size(), range_step(), range_step_size(), rb_ary_bsearch(), rb_check_to_float(), rb_check_to_integer(), rb_digest_instance_equal(), rb_dlptr2cptr(), rb_dlptr_aset(), rb_dlptr_cmp(), rb_dlptr_eql(), rb_dlptr_s_to_ptr(), rb_enumeratorize_with_size(), rb_fiddle_ptr2cptr(), rb_fiddle_ptr_aset(), rb_fiddle_ptr_cmp(), rb_fiddle_ptr_eql(), rb_fiddle_ptr_s_to_ptr(), rb_method_call_status(), rb_mod_eqq(), rb_range_values(), rb_rescue2(), rb_set_errinfo(), rb_stat_cmp(), rb_thread_pending_interrupt_p(), rb_to_float(), rb_to_integer(), ruby_cleanup(), setup_exception(), switch(), syserr_eqq(), tcl_protect_core(), thread_start_func_2(), total_i(), umethod_bind(), vm_call_method(), and vm_search_super_method().
Definition at line 1106 of file proc.c.
Referenced by method_eq(), rb_econv_prepare_options(), rb_mod_define_method(), and transcode_loop().
Definition at line 4220 of file thread.c.
Referenced by rb_objspace_call_finalizer().
Definition at line 94 of file proc.c.
Referenced by generator_initialize(), iseq_s_of(), rb_econv_prepare_options(), rb_hash_set_default_proc(), rb_mod_define_method(), set_trace_func(), thread_add_trace_func(), transcode_loop(), and vm_caller_setup_args().
Definition at line 2159 of file vm.c.
Referenced by rb_objspace_call_finalizer().
size_t rb_obj_memsize_of | ( | VALUE | ) |
Definition at line 2551 of file gc.c.
Referenced by cos_i(), dump_object(), iow_size(), memsize_of_m(), and total_i().
Definition at line 1450 of file proc.c.
Referenced by Init_Proc(), and wmap_allocate().
Definition at line 2119 of file proc.c.
Referenced by rb_obj_respond_to().
Definition at line 1403 of file variable.c.
Referenced by Init_Object().
Definition at line 1612 of file vm_method.c.
Referenced by if(), r_object0(), rb_respond_to(), should_be_callable(), and w_object().
Definition at line 62 of file object.c.
Referenced by Init_RandomSeed2(), rsock_s_recvfrom(), zstream_detach_buffer(), zstream_detach_input(), zstream_expand_buffer(), and zstream_shift_buffer().
Definition at line 967 of file object.c.
Referenced by Init_Object(), pack_pack(), path_taint(), rb_file_path(), rb_obj_untrust(), rsock_s_recvfrom(), and rsock_s_recvfrom_nonblock().
Definition at line 939 of file object.c.
Referenced by Init_Object(), and rb_obj_untrusted().
Definition at line 1034 of file object.c.
Referenced by Init_Object().
Definition at line 987 of file object.c.
Referenced by Init_Object(), path_untaint(), rb_obj_trust(), and time_zone().
Definition at line 1019 of file object.c.
Referenced by Init_Object().
Definition at line 1005 of file object.c.
Referenced by Init_Object().
|
inlinestatic |
|
inlinestatic |
Definition at line 1270 of file ripper.y.
References node_assign, and value_expr.
|
inlinestatic |
RUBY_SYMBOL_EXPORT_BEGIN const char* rb_objspace_data_type_name | ( | VALUE | obj | ) |
Definition at line 1394 of file gc.c.
Referenced by cto_i(), and type_name().
void rb_objspace_set_event_hook | ( | const rb_event_flag_t | event | ) |
Definition at line 1265 of file gc.c.
Referenced by recalc_add_ruby_vm_event_flags(), and recalc_remove_ruby_vm_event_flags().
Definition at line 7060 of file io.c.
Referenced by rb_f_p_internal().
void* rb_parser_calloc | ( | struct parser_params * | , |
size_t | , | ||
size_t | |||
) |
Definition at line 894 of file node.c.
Referenced by process_options().
void rb_parser_free | ( | struct parser_params * | , |
void * | |||
) |
void* rb_parser_malloc | ( | struct parser_params * | , |
size_t | |||
) |
RUBY_SYMBOL_EXPORT_BEGIN VALUE rb_parser_new | ( | void | ) |
void* rb_parser_realloc | ( | struct parser_params * | , |
void * | , | ||
size_t | |||
) |
Definition at line 379 of file variable.c.
Referenced by convert_UTF8_to_JSON(), convert_UTF8_to_JSON_ASCII(), dump_output(), Init_bubblebabble(), Init_generator(), Init_md5(), Init_ossl_digest(), Init_parser(), Init_rmd160(), Init_sha1(), Init_sha2(), Init_tcltklib(), and path2class().
Definition at line 5361 of file file.c.
Referenced by path_tainted_p().
Definition at line 339 of file variable.c.
Referenced by class2path(), path2class(), r_object0(), and rb_path2class().
Definition at line 5679 of file io.c.
Referenced by pipe_open(), and rb_io_s_pipe().
Definition at line 685 of file vm_dump.c.
Referenced by rb_vm_bugreport().
Definition at line 862 of file proc.c.
Referenced by default_proc_arity_check(), proc_arity(), and rb_proc_parameters().
Definition at line 744 of file proc.c.
Referenced by generator_each(), proc_fallback(), rb_call_end_proc(), and yielder_yield().
Definition at line 756 of file proc.c.
Referenced by call_trace_func(), curry(), tp_call_trace(), and vm_once_exec().
Definition at line 234 of file proc.c.
Referenced by default_proc_arity_check(), Init_Proc(), and proc_curry().
Definition at line 939 of file proc.c.
Referenced by Init_Proc(), and thread_initialize().
Definition at line 2312 of file proc.c.
Referenced by if(), make_curry_proc(), rb_fiber_new(), sym_to_proc(), and yielder_new().
Definition at line 572 of file load.c.
Referenced by Init_thread(), and InitVM_Enumerator().
Definition at line 877 of file random.c.
Referenced by random_bytes().
unsigned long rb_random_ulong_limited | ( | VALUE | rnd, |
unsigned long | limit | ||
) |
Definition at line 1020 of file range.c.
Referenced by rb_ary_aref(), rb_ary_aset(), rb_ary_fill(), rb_ary_slice_bang(), rb_get_values_at(), rb_str_aref(), rb_str_aset(), str_byte_aref(), and vm_backtrace_to_ary().
Definition at line 70 of file range.c.
Referenced by fixup_nodes().
Definition at line 996 of file range.c.
Referenced by range_values(), and rb_range_beg_len().
Definition at line 1770 of file rational.c.
Referenced by BigDecimal_to_r().
Definition at line 1762 of file rational.c.
Referenced by parser_yylex().
Definition at line 1756 of file rational.c.
Definition at line 1696 of file rational.c.
Referenced by fix_divide().
Definition at line 3621 of file file.c.
Referenced by iseq_s_compile_file(), process_options(), rb_file_s_realdirpath(), rb_file_s_realpath(), rb_load_internal0(), and ruby_init_loadpath_safe().
Definition at line 2531 of file re.c.
Referenced by rb_enc_reg_new(), rb_reg_compile(), and rb_reg_new_str().
Definition at line 1132 of file re.c.
Referenced by rb_str_subpat(), and rb_str_subpat_set().
Definition at line 2357 of file re.c.
Referenced by reg_fragment_check_gen().
Definition at line 2580 of file re.c.
Referenced by reg_compile_gen().
Definition at line 2543 of file re.c.
Referenced by rb_reg_new_str().
Definition at line 1541 of file re.c.
Referenced by last_match_getter(), match_to_s(), and vm_getspecial().
Definition at line 2797 of file re.c.
Referenced by Init_Regexp(), and rb_str_match().
Definition at line 2856 of file re.c.
Referenced by Init_Regexp().
Definition at line 1604 of file re.c.
Referenced by last_paren_match_getter(), and vm_getspecial().
Definition at line 1586 of file re.c.
Referenced by Init_Regexp(), postmatch_getter(), and vm_getspecial().
Definition at line 1559 of file re.c.
Referenced by Init_Regexp(), prematch_getter(), and vm_getspecial().
Definition at line 2574 of file re.c.
Referenced by date__strptime_internal(), proc_options(), and regcomp().
Definition at line 2537 of file re.c.
Referenced by r_object0(), rb_reg_new_ary(), rb_reg_regcomp(), and rb_reg_s_union().
Definition at line 1515 of file re.c.
Referenced by date__strptime_internal(), httpdate_type1_cb(), httpdate_type2_cb(), httpdate_type3_cb(), iso8601_bas_datetime_cb(), iso8601_ext_datetime_cb(), iso8601_ext_time_cb(), jisx0301_cb(), match_aref(), match_entry(), match_inspect(), parse_day_cb(), parse_ddd_cb(), parse_dot_cb(), parse_eu_cb(), parse_frag_cb(), parse_iso21_cb(), parse_iso22_cb(), parse_iso23_cb(), parse_iso24_cb(), parse_iso25_cb(), parse_iso26_cb(), parse_iso_cb(), parse_jis_cb(), parse_mday_cb(), parse_mon_cb(), parse_sla_cb(), parse_time2_cb(), parse_time_cb(), parse_us_cb(), parse_vms11_cb(), parse_vms12_cb(), parse_year_cb(), rb_reg_last_match(), rb_reg_match_last(), rb_reg_s_last_match(), rb_str_rpartition(), rb_str_sub_bang(), rb_str_subpat(), rfc2822_cb(), rfc3339_cb(), scan_once(), str_gsub(), vm_getspecial(), xmlschema_datetime_cb(), xmlschema_time_cb(), and xmlschema_trunc_cb().
Definition at line 3131 of file re.c.
Referenced by rb_reg_init_copy(), rb_reg_initialize_m(), rb_reg_options_m(), and w_object().
int rb_remove_event_hook | ( | rb_event_hook_func_t | func | ) |
Definition at line 204 of file vm_trace.c.
Referenced by rb_clear_trace_func(), rb_reset_coverages(), and set_trace_func().
Definition at line 767 of file vm_method.c.
Definition at line 761 of file vm_method.c.
Referenced by num_sadded().
Definition at line 1036 of file load.c.
Referenced by dump_output(), Init_bubblebabble(), Init_generator(), Init_md5(), Init_ossl_digest(), Init_parser(), Init_psych_parser(), Init_rmd160(), Init_sha1(), Init_sha2(), and Init_tkutil().
Definition at line 945 of file load.c.
Referenced by autoload_require(), load_transcoder_entry(), rb_f_require(), rb_f_require_relative(), rb_require(), and require_enc().
Referenced by rb_io_initialize(), and rsock_init_sock().
Definition at line 1323 of file random.c.
Referenced by rb_thread_atfork().
Definition at line 1651 of file vm_method.c.
Referenced by check_funcall_failed(), copy_stream_body(), copy_stream_fallback_body(), discrete_object_p(), do_coerce(), enum_zip(), enumerator_initialize(), generate_json(), gzfile_close(), gzfile_write_raw(), hash_equal(), if(), lazy_zip(), marshal_dump(), marshal_load(), must_respond_to(), num_exact(), ole_search_handler_method(), ossl_to_der_if_possible(), parse(), range_values(), rb_ary_equal(), rb_econv_prepare_options(), rb_f_open(), rb_gzreader_initialize(), rb_gzwriter_flush(), rb_gzwriter_initialize(), rb_range_values(), rb_str_equal(), readline_s_set_completion_proc(), and syserr_eqq().
Definition at line 88 of file safe.c.
Referenced by bsock_setsockopt(), check_dirname(), check_gid_switch(), check_uid_switch(), dir_s_chdir(), dlhandle_sym(), fiddle_handle_sym(), gc_stress_set(), get_pid(), get_ppid(), iseq_eval(), iseq_s_compile(), iseq_s_compile_file(), iseq_s_compile_option_set(), iseq_s_of(), iseq_to_a(), proc_detach(), proc_wait(), proc_waitall(), rb_dlhandle_initialize(), rb_execarg_addopt(), rb_f_kill(), rb_fiddle_handle_initialize(), rb_file_chmod(), rb_file_chown(), rb_file_executable_p(), rb_file_executable_real_p(), rb_file_flock(), rb_file_identical_p(), rb_file_lstat(), rb_file_readable_p(), rb_file_readable_real_p(), rb_file_s_chmod(), rb_file_s_chown(), rb_file_s_ftype(), rb_file_s_lstat(), rb_file_s_rename(), rb_file_s_umask(), rb_file_s_unlink(), rb_file_s_utime(), rb_file_symlink_p(), rb_file_writable_p(), rb_file_writable_real_p(), rb_ioctl(), rb_iseq_disasm(), rb_obj_untaint(), rb_realpath_internal(), rb_stat(), rb_stat_init(), rsock_s_accept(), rsock_s_accept_nonblock(), sig_trap(), sock_initialize(), sock_s_gethostbyname(), tcp_s_gethostbyname(), test_check(), udp_bind(), udp_connect(), and udp_init().
Definition at line 316 of file variable.c.
Referenced by Init_IO().
Definition at line 293 of file variable.c.
Referenced by rb_define_class_id_under(), and rb_define_module_id_under().
Definition at line 43 of file safe.c.
Referenced by check_autoload_required(), exec_end_procs_chain(), rb_autoload_load(), rb_eval_cmd(), rb_exec_end_proc(), rb_method_call_with_block(), rb_require_safe(), and reset_safe().
Referenced by Init_heap(), and th_init().
Definition at line 973 of file vm.c.
Referenced by eval_string_with_cref(), rb_const_set(), and warn_print().
Definition at line 1001 of file vm.c.
Referenced by ary_new(), call_trace_func(), core_hash_from_ary(), empty_ary_alloc(), empty_hash_alloc(), empty_str_alloc(), error_pos(), error_print(), eval_string_with_cref(), newobj_of(), rb_bug(), rb_clear_method_cache_by_class(), rb_const_set(), rb_exec(), rb_f_load(), rb_obj_alloc(), rb_require_safe(), rb_str_resurrect(), register_symid_str(), setup_exception(), str_new0(), update_coverage(), and warn_print().
Definition at line 1695 of file ripper.y.
Referenced by cannot_be_coerced_into_BigDecimal(), generic_ivar_set(), givar_i(), is_markable_object(), r_object0(), rb_ivar_count(), rb_ivar_defined(), rb_ivar_foreach(), rb_ivar_lookup(), rb_obj_clone(), rb_obj_dup(), and rb_obj_remove_instance_variable().
Definition at line 2636 of file variable.c.
Referenced by init_copy(), rb_mod_init_copy(), and rb_singleton_class_clone_and_attach().
Definition at line 2621 of file variable.c.
Referenced by find_class_path(), rb_cvar_set(), rb_ivar_set(), and rb_singleton_class_attached().
Definition at line 10586 of file io.c.
Referenced by process_options().
Definition at line 1538 of file string.c.
Referenced by pack_pack(), and pack_unpack().
Definition at line 1569 of file string.c.
Referenced by pack_unpack().
Definition at line 2281 of file string.c.
Referenced by append_method(), ary_join_0(), ary_join_1(), env_inspect(), exc_inspect(), gc_profile_result(), inspect_ary(), inspect_i(), literal_concat0(), match_inspect(), method_inspect(), rb_digest_instance_inspect(), rb_file_join(), rb_reg_preprocess_dregexp(), rb_str_append(), str_gsub(), and strio_write().
Definition at line 2123 of file string.c.
Referenced by append_utf8(), appendline(), encodes(), env_inspect(), exc_inspect(), fill_envp_buf_i(), json_string_unescape(), load_file_read_contents_callback(), match_inspect(), pack_pack(), pack_unpack(), parser_nextc(), qpencode(), rb_enc_cr_str_buf_cat(), rb_exec_fillarg(), rb_execarg_fixup(), rb_file_expand_path_internal(), rb_reg_expr_str(), rb_reg_to_s(), rb_str_buf_cat2(), rb_str_buf_cat_escaped_char(), rb_str_buf_new_cstr(), rb_str_cat(), rb_str_scrub(), unescape_escaped_nonascii(), unescape_nonascii(), w_nbyte(), zstream_append_buffer(), and zstream_append_input().
Definition at line 2133 of file string.c.
Referenced by addrinfo_inspect(), append_method(), env_inspect(), fill_envp_buf_i(), inspect_ary(), inspect_enumerator(), inspect_hash(), match_inspect(), method_inspect(), rb_digest_instance_inspect(), rb_enc_reg_error_desc(), rb_reg_desc(), rb_reg_to_s(), and rb_stat_inspect().
Definition at line 2257 of file string.c.
Referenced by inspect_i(), prepare_getline_args(), and rb_reg_s_union().
Definition at line 4750 of file string.c.
Referenced by rb_reg_expr_str(), and rb_str_inspect().
VALUE rb_str_buf_new | ( | long | ) |
Definition at line 891 of file string.c.
Referenced by appendline(), copy_stream_body(), copy_stream_fallback_body(), gc_profile_result(), JSON_parse_string(), marshal_dump(), pack_pack(), parser_nextc(), pst_to_s(), rb_ary_join(), rb_digest_instance_inspect(), rb_econv_append(), rb_enc_vsprintf(), rb_exec_fillarg(), rb_execarg_fixup(), rb_file_join(), rb_reg_preprocess(), rb_reg_regsub(), rb_reg_s_union(), rb_str_buf_new_cstr(), rb_str_format(), rb_str_inspect(), rb_str_scrub(), str_gsub(), zstream_append_buffer(), and zstream_append_input().
Definition at line 907 of file string.c.
Referenced by rb_load_fail().
size_t rb_str_capacity | ( | VALUE | ) |
Definition at line 468 of file string.c.
Referenced by append_fspath(), dump_object(), econv_primitive_convert(), rb_econv_append(), rb_str_set_len(), rb_str_vcatf(), and str_fill_term().
Definition at line 2139 of file string.c.
Referenced by date_strftime_internal(), eval_string_with_cref(), flo_to_s(), inspect1(), inspect_range(), io_getc(), io_shift_cbuf(), moreswitches(), ole_excepinfo2msg(), parser_here_document(), process_sflag(), r_bytes1_buffered(), range_to_s(), rb_file_dirname(), rb_id2str(), rb_io_inspect(), rb_str_cat2(), rb_str_concat(), rb_str_ellipsize(), realpath_rec(), reg_compile_gen(), rsock_inspect_sockaddr(), and time_strftime().
Definition at line 2158 of file string.c.
Referenced by addrinfo_inspect(), argf_next_argv(), cannot_be_coerced_into_BigDecimal(), clsid_from_remote(), compile_err_append(), compile_snprintf(), compile_warn_print(), cState_aset(), dir_inspect(), econv_description(), econv_inspect(), f_format(), fc_path(), foleparam_inspect(), folevariable_inspect(), gzfile_error_inspect(), insn_data_to_s_detail(), inspect2(), inspect_i(), inspect_obj(), inspect_struct(), make_inspect(), make_version_str(), name_err_mesg_to_str(), nucomp_inspect(), nurat_inspect(), oldbt_print_to(), ole_excepinfo2msg(), ole_hresult2msg(), ole_raise(), oletypelib_path(), ossl_make_error(), ossl_ssl_get_state(), ossl_sslctx_set_ciphers(), ossl_x509_inspect(), path_check_0(), proc_options(), process_sflag(), pst_inspect(), pst_message(), rb_econv_open_exc(), rb_find_file_ext_safe(), rb_io_inspect(), rb_iseq_disasm(), rb_iseq_disasm_insn(), rb_load_fail(), rb_mod_to_s(), rb_set_class_path(), rb_set_class_path_string(), realpath_rec(), rsock_inspect_sockaddr(), search_required(), sockopt_inspect(), sys_fail2(), warn_print(), wmap_inspect(), and wmap_inspect_i().
Definition at line 2485 of file string.c.
Referenced by iseq_location_setup(), ole_method_event(), ole_search_event(), ole_search_event_at(), oleclass_from_typelib(), oletypelib_search_registry(), rb_digest_instance_equal(), rb_str_cmp_m(), rb_str_upto(), sort_2(), typeinfo_from_ole(), and typelib_file_from_typelib().
long rb_str_coderange_scan_restartable | ( | const char * | , |
const char * | , | ||
rb_encoding * | , | ||
int * | |||
) |
Definition at line 340 of file string.c.
Referenced by fnmatch_brace(), rb_io_getline_fast(), rb_reg_expr_str(), rb_str_format(), read_all(), and str_encode_associate().
Definition at line 2460 of file string.c.
Referenced by rb_str_cmp(), rb_str_hash_cmp(), and str_eql().
Definition at line 2339 of file string.c.
Referenced by clsid_from_remote(), cState_aref(), cState_aset(), f_format(), foleparam_inspect(), folevariable_inspect(), Init_String(), insn_data_to_s_detail(), iseq_compile_each(), make_inspect(), nucomp_inspect(), nurat_inspect(), ole_typedesc2val(), oletypelib_path(), pruby_eval(), rb_iseq_disasm(), rb_iseq_disasm_insn(), rb_mod_to_s(), and strio_ungetc().
VALUE rb_str_conv_enc | ( | VALUE | str, |
rb_encoding * | from, | ||
rb_encoding * | to | ||
) |
Definition at line 680 of file string.c.
Referenced by append_fspath(), env_fetch(), env_str_new(), file_path_convert(), rb_external_str_with_enc(), rb_f_getenv(), rb_gzreader_ungetc(), rb_gzwriter_write(), rb_str_encode_ospath(), rb_str_export(), rb_str_export_locale(), rb_str_export_to_enc(), realpath_rec(), strio_ungetc(), and strio_write().
VALUE rb_str_conv_enc_opts | ( | VALUE | str, |
rb_encoding * | from, | ||
rb_encoding * | to, | ||
int | ecflags, | ||
VALUE | ecopts | ||
) |
Definition at line 607 of file string.c.
Referenced by gzfile_newstr(), rb_str_conv_enc(), rb_strftime_with_timespec(), rb_w32_conv_from_wchar(), rb_w32_write_console(), and ruby__sfvextra().
Definition at line 3640 of file string.c.
Referenced by econv_primitive_convert(), rb_str_splice_0(), and rb_str_subseq().
Definition at line 4902 of file string.c.
Referenced by Init_String(), inspect1(), inspect2(), make_econv_exception(), rb_econv_prepare_options(), and sockopt_inspect().
Definition at line 1062 of file string.c.
Referenced by cannot_be_coerced_into_BigDecimal(), convert_encoding(), cParser_source(), cState_aset(), date__parse(), dir_path(), econv_convert(), encoded_dup(), eval_string_with_cref(), exc_inspect(), fc_path(), fdbm_delete_if(), fgdbm_delete_if(), fsdbm_delete_if(), gettable_gen(), inspect_range(), make_inspectname(), name_err_mesg_to_str(), process_options(), range_to_s(), rb_class_path(), rb_class_path_no_cache(), rb_deflate_init_copy(), rb_file_path(), rb_find_file_ext_safe(), rb_gzfile_comment(), rb_gzfile_orig_name(), rb_gzfile_set_comment(), rb_gzfile_set_orig_name(), rb_id2str(), rb_insn_operand_intern(), rb_intern_str(), rb_mod_name(), rb_mod_to_s(), rb_set_class_path(), rb_set_class_path_string(), rb_str_aref(), rb_str_capitalize(), rb_str_chomp(), rb_str_conv_enc_opts(), rb_str_delete(), rb_str_downcase(), rb_str_justify(), rb_str_lstrip(), rb_str_reverse(), rb_str_rstrip(), rb_str_squeeze(), rb_str_strip(), rb_str_sub(), rb_str_swapcase(), rb_str_tr(), rb_str_tr_s(), rb_str_upcase(), rb_str_upto(), realpath_rec(), rsock_ipaddr(), ruby_set_script_name(), str_gsub(), and str_scrub().
Shortens str and adds three dots, an ellipsis, if it is longer than len characters.
str | the string to ellipsize. |
len | the maximum string length. |
Definition at line 7969 of file string.c.
Referenced by rb_hash_fetch_m(), and sys_fail2().
Definition at line 2884 of file transcode.c.
Referenced by do_writeconv(), econv_insert_output(), get_user_from_path(), rb_file_expand_path_internal(), rb_io_getline_1(), rb_reg_to_s(), rb_str_ellipsize(), and rb_str_enumerate_lines().
Definition at line 232 of file file.c.
Referenced by apply2files(), check_dirname(), dir_initialize(), dir_s_chdir(), do_opendir(), load_file_internal(), rb_execarg_addopt(), rb_f_load(), rb_file_chmod(), rb_file_chown(), rb_file_executable_p(), rb_file_executable_real_p(), rb_file_expand_path_internal(), rb_file_identical_p(), rb_file_lstat(), rb_file_readable_p(), rb_file_readable_real_p(), rb_file_s_ftype(), rb_file_s_lstat(), rb_file_s_rename(), rb_file_symlink_p(), rb_file_writable_p(), rb_file_writable_real_p(), rb_require_safe(), rb_stat(), rb_stat_init(), rb_sysopen(), realpath_rec(), and run_exec_open().
Definition at line 2542 of file string.c.
Referenced by init_addrinfo_getaddrinfo(), Init_String(), match_equal(), opt_eq_func(), path_eq(), rb_get_expanded_load_path(), and rb_str_upto().
VALUE rb_str_export_to_enc | ( | VALUE | , |
rb_encoding * | |||
) |
Definition at line 755 of file string.c.
Referenced by alias(), scalar(), start_document(), start_mapping(), start_sequence(), and transcode_string().
Definition at line 1669 of file string.c.
Referenced by rb_enc_associate_index().
Definition at line 421 of file sprintf.c.
Referenced by date_strftime_with_tmx(), rb_f_sprintf(), rb_str_format_m(), rb_str_upto(), and rb_strftime_with_timespec().
Definition at line 941 of file string.c.
Referenced by dispose_string(), and obj_free().
Definition at line 1967 of file string.c.
Referenced by get_loaded_features_index(), path_freeze(), rb_construct_expanded_load_path(), rb_provide_feature(), and ruby_init_loadpath_safe().
st_index_t rb_str_hash | ( | VALUE | ) |
Definition at line 2421 of file string.c.
Referenced by cdhash_hash(), match_hash(), path_hash(), rb_any_hash(), and rb_str_hash_m().
Definition at line 2431 of file string.c.
Referenced by cdhash_cmp(), fstring_cmp(), and rb_any_cmp().
Definition at line 4795 of file string.c.
Referenced by check_path_encoding(), gzfile_error_inspect(), id_to_name(), Init_String(), location_inspect_m(), match_inspect(), rb_str_quote_unprintable(), and sym_inspect().
Definition at line 7467 of file string.c.
Referenced by hash2ptr_dispparams(), hash2result(), if(), Init_String(), JSON_parse_string(), set_state_ivars(), switch(), sym_capitalize(), sym_downcase(), sym_succ(), sym_swapcase(), and sym_upcase().
Definition at line 1298 of file string.c.
Referenced by Init_String(), rb_str_each_char_size(), reg_match_pos(), strscan_get_charpos(), and sym_length().
Referenced by rb_io_sysread(), rb_str_locktmp_ensure(), and readline_readline().
Definition at line 2000 of file string.c.
Referenced by io_fread(), and io_getpartial().
Definition at line 1483 of file string.c.
Referenced by econv_primitive_convert(), io_set_read_length(), io_setstrbuf(), ossl_ssl_read_internal(), rb_file_expand_path_internal(), rb_str_setbyte(), rb_str_splice_0(), rb_str_sub_bang(), rb_str_vcatf(), rb_string_value_cstr(), setup_narg(), str_buf_cat(), string_to_c(), string_to_c_strict(), string_to_r(), string_to_r_strict(), strio_extend(), strio_read(), and strio_ungetbyte().
Definition at line 1491 of file string.c.
Referenced by io_setstrbuf(), rb_str_append(), rb_str_cat(), read_all(), and str_fill_term().
Definition at line 534 of file string.c.
Referenced by addrinfo_mdump(), addrinfo_to_sockaddr(), appendline(), argf_getpartial(), asn1str_to_str(), BigDecimal_dump(), BigDecimal_inspect(), BigDecimal_split(), BigDecimal_to_f(), BigDecimal_to_s(), bsock_getpeername(), bsock_getsockname(), bsock_getsockopt(), bubblebabble_str_new(), check_pipe_command(), cState_array_nl(), cState_indent(), cState_object_nl(), cState_space(), cState_space_before(), cState_to_h(), date_strftime_internal(), date_zone_to_diff(), decode_bstr(), decode_eoc(), dir_s_home(), econv_convert(), econv_description(), econv_finish(), econv_primitive_errinfo(), econv_putback(), env_fetch(), env_str_new(), extract_user_token(), gzfile_getc(), gzfile_read(), gzfile_read_all(), gzfile_read_header(), gzfile_readpartial(), gzreader_gets(), if(), infected_str_new(), inspect1(), inspect2(), int_chr(), int_ossl_asn1_decode0_prim(), io_getc(), io_setstrbuf(), io_shift_cbuf(), join_der(), load_file_internal(), load_file_read_contents(), load_transcoder_entry(), make_econv_exception(), match_to_s(), Messaging_HandleMessage(), name_to_backref_number(), ossl_asn1cons_to_der(), ossl_asn1data_to_der(), ossl_asn1eoc_initialize(), ossl_bn_to_s(), ossl_cipher_final(), ossl_cipher_update(), ossl_dh_compute_key(), ossl_dh_to_der(), ossl_digest_finish(), ossl_dsa_sign(), ossl_dsa_to_der(), ossl_hmac_s_digest(), ossl_make_error(), ossl_membio2str0(), ossl_pkcs12_to_der(), ossl_pkcs7_to_der(), ossl_pkey_sign(), ossl_rand_bytes(), ossl_rand_pseudo_bytes(), ossl_rsa_private_decrypt(), ossl_rsa_private_encrypt(), ossl_rsa_public_decrypt(), ossl_rsa_public_encrypt(), ossl_rsa_to_der(), ossl_spki_get_challenge(), ossl_spki_print(), ossl_spki_to_der(), ossl_ssl_read_internal(), ossl_ssl_session_to_der(), ossl_ssl_session_to_pem(), ossl_ssl_session_to_text(), ossl_sslctx_session_get_cb(), ossl_sslctx_set_ciphers(), ossl_str_new(), ossl_x509_to_der(), ossl_x509attr_get_value(), ossl_x509attr_to_der(), ossl_x509crl_get_signature_algorithm(), ossl_x509crl_to_der(), ossl_x509crl_to_pem(), ossl_x509crl_to_text(), ossl_x509ext_to_der(), ossl_x509name_to_a(), ossl_x509name_to_der(), ossl_x509req_get_signature_algorithm(), ossl_x509req_to_der(), ossl_x509req_to_pem(), ossl_x509req_to_text(), pack_pack(), parse(), proc_options(), r_bytes0(), r_bytes1_buffered(), rb_compile_cstr(), rb_digest_base_finish(), rb_enc_str_new(), rb_exc_new(), rb_execarg_fixup(), rb_execarg_run_options(), rb_f_backquote(), rb_f_getenv(), rb_file_dirname(), rb_file_join(), rb_file_s_basename(), rb_file_s_extname(), rb_gdbm_fetch(), rb_gdbm_firstkey(), rb_gdbm_nextkey(), rb_inflate_inflate(), rb_io_getline_fast(), rb_io_putc(), rb_io_ungetbyte(), rb_iseq_disasm(), rb_iseq_disasm_insn(), rb_nkf_convert(), rb_parser_compile_cstr(), rb_path_check(), rb_random_bytes(), rb_reg_compile(), rb_reg_quote(), rb_str_conv_enc_opts(), rb_str_enumerate_lines(), rb_str_format(), rb_str_new_cstr(), rb_str_plus(), rb_str_slice_bang(), rb_tainted_str_new(), rb_usascii_str_new(), rb_write_error2(), reg_named_captures_iter(), rsock_addrinfo_inspect_sockaddr(), ruby_init_loadpath_safe(), s3e(), set_file_encoding(), set_option_encoding_once(), sock_s_gethostbyaddr(), sock_s_pack_sockaddr_in(), sock_sockaddr(), sockopt_s_bool(), sockopt_s_byte(), sockopt_s_int(), sockopt_s_ipv4_multicast_loop(), sockopt_s_ipv4_multicast_ttl(), sockopt_s_linger(), str_new(), strio_getline(), strio_putc(), strio_read(), strio_substr(), time_mdump(), time_strftime(), warn_print(), writer(), zstream_detach_buffer(), zstream_detach_input(), and zstream_expand_buffer_into().
Definition at line 560 of file string.c.
Referenced by addrinfo_mdump(), decorate_convpath(), dir_inspect(), dump_output(), econv_convpath(), finish_writeconv(), gc_profile_dump_on(), hist_to_s(), Init_readline(), inspect1(), load_file_internal(), opobj_inspect(), ossl_make_error(), prep_io(), process_options(), pty_getpty(), pty_open(), rand_random(), rb_econv_open_exc(), rb_exec_fillarg(), rb_file_open(), rb_io_inspect(), rb_io_s_binread(), rb_iseq_defined_string(), rb_load_file(), rb_parser_dump_tree(), rb_path2class(), rb_strftime_with_timespec(), ruby_eval_string_from_file(), ruby_eval_string_from_file_protect(), ruby_init_loadpath_safe(), search_convpath_i(), sig_signame(), and sys_fail2().
Definition at line 833 of file string.c.
Referenced by fstr_update_callback(), hash_aset_str(), io_write(), rb_check_argv(), rb_econv_prepare_options(), rb_econv_substr_append(), rb_file_open_generic(), rb_io_reopen(), rb_io_syswrite(), rb_set_class_path_string(), rb_str_subseq(), set_arg0(), str_replace_shared_without_enc(), time_mload(), and yycompile().
Definition at line 799 of file string.c.
Referenced by rb_file_s_basename(), and rb_str_subseq().
Definition at line 874 of file string.c.
Referenced by rb_str_ellipsize().
long rb_str_offset | ( | VALUE | , |
long | |||
) |
Definition at line 1780 of file string.c.
Referenced by rb_str_rpartition(), and reg_match_pos().
Definition at line 1352 of file string.c.
Referenced by Init_String().
Definition at line 8403 of file string.c.
Referenced by rb_id_quote_unprintable().
Definition at line 4322 of file string.c.
Referenced by Init_String(), rb_str_init(), and str_scrub_bang().
Definition at line 2024 of file string.c.
Referenced by append_fspath(), appendline(), argf_getpartial(), argf_read(), big2str_generic(), BigDecimal_dump(), BigDecimal_inspect(), BigDecimal_split(), BigDecimal_to_s(), copy_home_path(), copy_stream_body(), copy_stream_fallback_body(), econv_primitive_convert(), flo_to_s(), get_user_from_path(), glob_helper(), gzfile_error_inspect(), gzfile_readpartial(), literal_concat0(), marshal_dump(), moreswitches(), ossl_cipher_update(), ossl_digest_finish(), ossl_ssl_read_internal(), r_object0(), rb_big2str0(), rb_econv_append(), rb_enc_vsprintf(), rb_feature_p(), rb_file_expand_path_internal(), rb_gzfile_set_comment(), rb_gzfile_set_orig_name(), rb_io_getline_fast(), rb_iseq_disasm(), rb_nkf_putchar(), rb_reg_quote(), rb_reg_to_s(), rb_str_concat(), rb_str_conv_enc_opts(), rb_str_format(), rb_str_vcatf(), realpath_rec(), ruby_init_loadpath_safe(), ruby_setenv(), set_file_encoding(), setup_narg(), str_shrink(), str_transcoding_resize(), strio_extend(), strio_init(), strio_read(), strio_truncate(), strio_ungetbyte(), strio_ungetc(), switch(), sym_inspect(), VpAlloc(), w_nbyte(), zstream_append_buffer(), zstream_detach_buffer(), zstream_discard_input(), zstream_expand_buffer(), and zstream_expand_buffer_into().
Definition at line 1068 of file string.c.
Referenced by gzfile_raise(), gzfile_reader_get_unused(), and obj_resurrect().
str | the string to be scrubbed |
repl | the replacement character |
Definition at line 8037 of file string.c.
Referenced by str_scrub(), str_scrub_bang(), and str_transcode0().
Definition at line 2007 of file string.c.
Referenced by appendline(), econv_primitive_convert(), io_set_read_length(), load_transcoder_entry(), ole_wc2vstr(), ossl_cipher_final(), ossl_cipher_update(), ossl_dh_compute_key(), ossl_dsa_sign(), ossl_pkey_sign(), ossl_rsa_private_decrypt(), ossl_rsa_private_encrypt(), ossl_rsa_public_decrypt(), ossl_rsa_public_encrypt(), ossl_ssl_read_internal(), ossl_x509attr_to_der(), pack_pack(), pack_unpack(), r_object0(), rb_econv_append(), rb_execarg_fixup(), rb_execarg_run_options(), rb_file_expand_path_internal(), rb_file_join(), rb_find_file_ext_safe(), rb_nkf_convert(), rb_realpath_internal(), rb_str_conv_enc_opts(), rb_str_format(), read_all(), rsock_s_recvfrom(), rsock_s_recvfrom_nonblock(), ruby__sfvwrite(), and str_transcode0().
Definition at line 972 of file string.c.
Referenced by rb_str_reverse_bang(), rb_str_succ_bang(), str_encode_bang(), and str_gsub().
long rb_str_sublen | ( | VALUE | , |
long | |||
) |
Definition at line 1827 of file string.c.
Referenced by rb_reg_match(), rb_reg_match2(), rb_str_aset(), rb_str_index_m(), rb_str_rindex_m(), and rb_str_rpartition().
char* rb_str_subpos | ( | VALUE | , |
long | , | ||
long * | |||
) |
Definition at line 1859 of file string.c.
Referenced by rb_str_substr().
Definition at line 1838 of file string.c.
Referenced by check_dirname(), features_index_add(), match_array(), path_sub_ext(), rb_file_s_extname(), rb_mod_const_defined(), rb_mod_const_get(), rb_realpath_internal(), rb_reg_match_post(), rb_reg_match_pre(), rb_reg_nth_match(), rb_reg_regsub(), rb_str_chop(), rb_str_ellipsize(), rb_str_enumerate_chars(), rb_str_enumerate_lines(), rb_str_partition(), rb_str_rpartition(), rb_str_split_m(), rb_str_sub_bang(), realpath_rec(), search_required(), str_gsub(), and zstream_shift_buffer().
Definition at line 1944 of file string.c.
Referenced by rb_io_putc(), rb_str_aref(), rb_str_aref_m(), rb_str_chr(), set_state_ivars(), and strio_putc().
Definition at line 3262 of file string.c.
Referenced by Init_String(), rb_str_succ_bang(), and sym_succ().
Definition at line 8384 of file string.c.
Referenced by id_to_name(), and sym_inspect().
Definition at line 1383 of file string.c.
Referenced by Init_String().
VALUE rb_str_tmp_new | ( | long | ) |
Definition at line 919 of file string.c.
Referenced by moreswitches(), rb_alloc_tmp_buffer(), rb_feature_p(), rb_find_file_ext_safe(), rb_find_file_safe(), str_transcode0(), and VpAlloc().
Definition at line 2890 of file object.c.
Referenced by f_to_f(), rb_Float(), and rb_str_to_f().
Definition at line 964 of file string.c.
Referenced by new_struct(), rb_gzfile_set_comment(), rb_gzfile_set_orig_name(), rb_string_value(), and reg_operand().
Definition at line 1990 of file string.c.
Referenced by rb_io_sysread(), rb_str_locktmp_ensure(), and readline_readline().
Definition at line 3744 of file string.c.
Referenced by eval_string_with_cref(), rb_str_prepend(), and strio_ungetc().
Definition at line 1263 of file sprintf.c.
Referenced by compile_snprintf(), dump_append(), rb_str_catf(), and warn_print().
size_t rb_strftime | ( | char * | s, |
size_t | maxsize, | ||
const char * | format, | ||
rb_encoding * | enc, | ||
const struct vtm * | vtm, | ||
VALUE | timev, | ||
int | gmt | ||
) |
Definition at line 831 of file strftime.c.
References NULL, and rb_strftime_with_timespec().
Referenced by rb_strftime_alloc().
size_t rb_strftime_timespec | ( | char * | s, |
size_t | maxsize, | ||
const char * | format, | ||
rb_encoding * | enc, | ||
const struct vtm * | vtm, | ||
struct timespec * | ts, | ||
int | gmt | ||
) |
Definition at line 837 of file strftime.c.
References Qnil, and rb_strftime_with_timespec().
Referenced by rb_strftime_alloc().
Definition at line 3009 of file object.c.
Referenced by exc_to_s(), GetBNPtr(), make_version_str(), ossl_sslctx_set_ciphers(), and rb_f_string().
Definition at line 1588 of file string.c.
Referenced by rb_string_value_cstr(), and rb_string_value_ptr().
Definition at line 235 of file struct.c.
Referenced by Init_thread(), and range_alloc().
Definition at line 757 of file struct.c.
Referenced by Init_Struct(), and struct_entry().
Definition at line 827 of file struct.c.
Referenced by Init_Struct().
Definition at line 327 of file struct.c.
Referenced by Init_etc(), and Init_process().
VALUE rb_struct_define_without_accessor | ( | const char * | , |
VALUE | , | ||
rb_alloc_func_t | , | ||
... | |||
) |
Definition at line 288 of file struct.c.
Referenced by Init_Range().
VALUE rb_struct_define_without_accessor_under | ( | VALUE | outer, |
const char * | class_name, | ||
VALUE | super, | ||
rb_alloc_func_t | alloc, | ||
... | |||
) |
Definition at line 270 of file struct.c.
Referenced by Init_thread().
Definition at line 97 of file struct.c.
Referenced by rb_struct_ref().
Definition at line 707 of file struct.c.
Referenced by Init_Struct(), and range_initialize_copy().
Definition at line 466 of file struct.c.
Referenced by r_object0().
Definition at line 53 of file struct.c.
Referenced by inspect_struct(), rb_struct_aref_id(), rb_struct_aset_id(), rb_struct_each_pair(), rb_struct_getmember(), rb_struct_set(), rb_struct_to_h(), and w_object().
Definition at line 39 of file struct.c.
Referenced by r_object0(), rb_struct_members(), and rb_struct_s_members_m().
Definition at line 390 of file vm_trace.c.
Referenced by yycompile().
Definition at line 8481 of file string.c.
Referenced by constant_arg(), ev_on_event(), fev_off_event(), fole_respond_to(), if(), Init_String(), location_base_label(), ole_invoke(), range_each(), range_step(), reg_operand(), sym_aref(), sym_casecmp(), sym_cmp(), sym_match(), and sym_succ().
void rb_syswait | ( | rb_pid_t | pid | ) |
Definition at line 3763 of file process.c.
Referenced by rb_io_close().
Definition at line 589 of file string.c.
Referenced by env_rassoc(), fdbm_delete(), fdbm_delete_if(), fdbm_each_key(), fdbm_each_pair(), fdbm_each_value(), fdbm_fetch(), fdbm_invert(), fdbm_key(), fdbm_keys(), fdbm_select(), fdbm_shift(), fdbm_to_a(), fdbm_to_hash(), fdbm_values(), for(), pack_unpack(), rb_dlptr_aref(), rb_dlptr_to_s(), rb_dlptr_to_str(), rb_external_str_new_with_enc(), rb_fiddle_ptr_aref(), rb_fiddle_ptr_to_s(), rb_fiddle_ptr_to_str(), rsock_s_recvfrom(), and rsock_s_recvfrom_nonblock().
Definition at line 598 of file string.c.
Referenced by addrinfo_firstonly_new(), addrinfo_list_new(), and init_addrinfo_getaddrinfo().
Definition at line 2994 of file thread.c.
Referenced by for(), io_writable_length(), rb_thread_polling(), rb_thread_schedule_limits(), rb_thread_stop(), rb_thread_terminate_all(), rb_waitpid(), and thread_start_func_2().
Definition at line 3935 of file thread.c.
Referenced by pipe_open().
Definition at line 745 of file thread.c.
Referenced by rb_detach_process().
Definition at line 2405 of file thread.c.
Referenced by chdir_yield(), copy_stream_body(), delete_current_thread(), dir_s_chdir(), exec_recursive(), if(), queue_do_pop(), rb_autoload_load(), rb_autoloading_value(), rb_condvar_wait(), rb_const_set(), rb_dl_get_last_error(), rb_dl_set_last_error(), rb_f_kill(), rb_szqueue_push(), recursive_list_access(), thread_s_current(), VpGetException(), VpGetPrecLimit(), and VpGetRoundMode().
Definition at line 2030 of file thread.c.
Referenced by exec_interrupts(), maygvl_copy_stream_continue_p(), and rb_f_kill().
Definition at line 2135 of file thread.c.
Referenced by io_reopen(), and rb_io_close().
int rb_thread_fd_select | ( | int | , |
rb_fdset_t * | , | ||
rb_fdset_t * | , | ||
rb_fdset_t * | , | ||
struct timeval * | |||
) |
Definition at line 3580 of file thread.c.
Referenced by maygvl_select(), rb_thread_select(), select_internal(), and select_single().
Definition at line 3529 of file thread.c.
Referenced by rb_io_wait_writable(), rsock_bsock_send(), and udp_send().
Definition at line 1160 of file thread.c.
Referenced by maygvl_copy_stream_continue_p().
VALUE rb_thread_io_blocking_region | ( | rb_blocking_function_t * | func, |
void * | data1, | ||
int | fd | ||
) |
Definition at line 1384 of file thread.c.
Referenced by do_ioctl(), io_flush_buffer_async(), rb_file_flock(), rb_io_flush_raw(), rb_read_internal(), and rb_write_internal().
Definition at line 2191 of file thread.c.
Referenced by Init_Thread(), rb_thread_exit(), and rb_thread_s_kill().
Definition at line 2765 of file thread.c.
Referenced by detach_process_pid(), rb_dl_get_last_error(), rb_thread_aref(), recursive_list_access(), VpGetException(), VpGetPrecLimit(), and VpGetRoundMode().
Definition at line 2858 of file thread.c.
Referenced by rb_detach_process(), rb_dl_set_last_error(), rb_thread_aset(), and recursive_list_access().
Definition at line 2426 of file thread.c.
Referenced by rb_thread_s_main().
Definition at line 2018 of file vm.c.
Referenced by cont_mark().
Definition at line 1996 of file vm.c.
Referenced by thread_start_func_2().
Definition at line 2322 of file thread.c.
Referenced by if(), and Init_Thread().
Definition at line 1191 of file thread.c.
Referenced by for(), if(), proc_waitall(), rb_thread_run(), rb_waitpid(), rbtk_EventCheckProc(), and thread_s_pass().
Definition at line 4749 of file thread.c.
Referenced by release_thread_shield().
Definition at line 4702 of file thread.c.
Referenced by load_lock().
Definition at line 4738 of file thread.c.
Referenced by release_thread_shield().
Definition at line 4718 of file thread.c.
Referenced by load_lock().
Definition at line 1168 of file thread.c.
Referenced by pipe_open().
Definition at line 1080 of file thread.c.
Referenced by queue_sleep(), rb_szqueue_push(), and rb_thread_stop().
Definition at line 1073 of file thread.c.
Referenced by for(), rb_f_sleep(), and rb_thread_fd_select().
Definition at line 2346 of file thread.c.
Referenced by Init_Thread().
Definition at line 3523 of file thread.c.
Referenced by ossl_ssl_read_internal(), rb_io_read_check(), rb_io_sysread(), rb_io_wait_readable(), rb_read_check(), rsock_s_accept(), and rsock_s_recvfrom().
Definition at line 1119 of file thread.c.
Referenced by rb_f_sleep(), rb_file_flock(), rb_thread_fd_select(), rb_thread_sleep(), rsock_connect(), and while().
Definition at line 2276 of file thread.c.
Referenced by if(), Init_Thread(), rb_thread_run(), and while().
Definition at line 2285 of file thread.c.
Referenced by rb_szqueue_max_set(), rb_thread_wakeup(), wakeup_all_threads(), and wakeup_first_thread().
Definition at line 2411 of file time.c.
Referenced by io_wait_readable(), io_wait_writable(), rb_f_select(), rb_f_sleep(), and rb_mutex_sleep().
VALUE rb_time_nano_new | ( | time_t | , |
long | |||
) |
Definition at line 2305 of file time.c.
Referenced by stat_atime(), stat_ctime(), and stat_mtime().
VALUE rb_time_new | ( | time_t | , |
long | |||
) |
Definition at line 2279 of file time.c.
Referenced by rb_gzfile_mtime().
Definition at line 2434 of file time.c.
Referenced by rb_file_s_utime().
rb_encoding* rb_to_encoding | ( | VALUE | ) |
Definition at line 219 of file encoding.c.
Definition at line 171 of file encoding.c.
Definition at line 2963 of file object.c.
Referenced by pack_pack(), and rand_range().
Definition at line 8734 of file string.c.
Referenced by check_setter_id(), enumerator_init(), fole_missing(), new_struct(), num_sadded(), obj_respond_to(), ole_search_handler_method(), rb_f_trace_var(), rb_mod_alias_method(), rb_mod_autoload(), rb_mod_const_missing(), rb_mod_define_method(), rb_mod_modfunc(), rb_struct_s_def(), rb_thread_aset(), rb_thread_variable_set(), send_internal(), and vm_call_opt_send().
Definition at line 2700 of file object.c.
Referenced by check_exec_redirect(), econv_args(), econv_primitive_convert(), enumerator_initialize(), enumerator_with_index(), fix_aref(), obj2vint(), pack_pack(), rand_init(), random_bytes(), random_load(), range_bsearch(), range_step(), range_step_size(), rb_absint_singlebit_p(), rb_absint_size(), rb_big_lshift(), rb_big_rshift(), rb_dlcfunc_call(), rb_execarg_addopt(), rb_f_rand(), rb_hash(), rb_integer_pack(), rb_num2long(), rb_num2ulong_internal(), rb_random_ulong_limited(), sockopt_s_ipv4_multicast_loop(), sockopt_s_ipv4_multicast_ttl(), time_nsec(), time_round(), and time_usec().
Definition at line 1952 of file encoding.c.
Definition at line 1958 of file encoding.c.
Referenced by trap_check().
Definition at line 861 of file signal.c.
Referenced by ruby_finalize_0().
int rb_typeddata_inherited_p | ( | const rb_data_type_t * | child, |
const rb_data_type_t * | parent | ||
) |
int rb_typeddata_is_kind_of | ( | VALUE | , |
const rb_data_type_t * | |||
) |
Definition at line 1299 of file ripper.y.
References call_uni_op, cond, and ripper_intern().
|
inlinestatic |
Definition at line 910 of file vm_method.c.
Referenced by m_core_undef_method(), and rb_mod_undef_method().
Definition at line 519 of file vm_method.c.
Referenced by Init_Binding(), Init_Numeric(), Init_Object(), Init_Proc(), Init_String(), Init_Struct(), Init_VM(), Init_vm_backtrace(), Init_vm_trace(), Init_zlib(), and ruby_Init_Continuation_body().
Definition at line 1911 of file gc.c.
Referenced by undefine_final().
Definition at line 183 of file io.c.
Referenced by chfunc(), console_dev(), fill_random_seed(), get_device_once(), io_reopen(), load_file_internal(), ossl_obj2bio(), prep_io(), pty_getpty(), rb_fd_fix_cloexec(), rb_file_load_ok(), rb_io_initialize(), rb_pipe(), rb_sysopen_internal(), rsock_init_sock(), rsock_s_accept(), rsock_s_accept_nonblock(), rsock_socket(), ruby_dup(), run_exec_dup2(), run_exec_dup2_child(), run_exec_open(), and save_redirect_fd().
Definition at line 1281 of file encoding.c.
rb_encoding* rb_usascii_encoding | ( | void | ) |
Definition at line 1272 of file encoding.c.
Definition at line 540 of file string.c.
Referenced by big2str_alloc(), big2str_base_poweroftwo(), date__strptime(), flo_to_s(), hexencode_str_new(), int_chr(), nil_to_s(), pack_unpack(), rb_ary_join(), rb_id2str(), rb_io_getline_1(), rb_str_ellipsize(), and strftimev().
Definition at line 569 of file string.c.
Referenced by eval_string_with_cref(), flo_to_s(), inspect_ary(), pruby_eval(), and rb_str_upto().
Definition at line 1266 of file encoding.c.
rb_encoding* rb_utf8_encoding | ( | void | ) |
Definition at line 1257 of file encoding.c.
int rb_uv_to_utf8 | ( | char | [6], |
unsigned | long | ||
) |
Definition at line 1900 of file pack.c.
Referenced by append_utf8(), and pack_pack().
Definition at line 536 of file vm_backtrace.c.
Referenced by argument_error(), and setup_exception().
Definition at line 713 of file vm_dump.c.
Referenced by report_bug(), and sdr().
Definition at line 118 of file vm_exec.c.
Referenced by rb_iseq_translate_threaded_code().
Definition at line 111 of file vm.c.
Referenced by rb_const_get_0().
Definition at line 1766 of file vm.c.
Referenced by gc_mark_roots().
Definition at line 281 of file vm.c.
Referenced by raise_method_missing(), rb_mod_const_missing(), and rb_vm_rewind_cfp().
Definition at line 906 of file vm_backtrace.c.
Referenced by rb_thread_backtrace_m().
Definition at line 912 of file vm_backtrace.c.
Referenced by rb_thread_backtrace_locations_m().
Definition at line 1244 of file sprintf.c.
Referenced by ole_raise(), ossl_make_error(), rb_compile_error_append(), rb_fatal(), rb_name_error(), rb_name_error_str(), rb_raise(), rb_sprintf(), and warn_printf().
Definition at line 758 of file process.c.
Referenced by detach_process_watcher(), proc_wait(), proc_waitall(), pty_check(), rb_f_system(), and rb_syswait().
Definition at line 7185 of file io.c.
Referenced by rescue_callback().
Definition at line 7171 of file io.c.
Referenced by rb_write_error().
Definition at line 7191 of file io.c.
Referenced by compile_err_append(), compile_warn_print(), warn_print(), and warn_printf().
Definition at line 981 of file vm_eval.c.
Referenced by if(), and rb_ary_zip().
Definition at line 303 of file ripper.y.
Referenced by rb_class_boot(), rb_mod_init_copy(), rb_module_new(), rb_prepend_module(), and rb_singleton_class_clone_and_attach().
Definition at line 320 of file ripper.y.
Referenced by add_activated_refinement(), class_alloc(), include_modules_at(), Init_VM(), make_metaclass(), rb_class_boot(), rb_class_initialize(), rb_include_class_new(), rb_mod_init_copy(), rb_mod_refine(), rb_prepend_module(), rb_singleton_class_clone_and_attach(), and rb_using_refinement().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
expr ripper_intern | ( | "and" | ) |
Referenced by rb_uint2num_inline(), and switch().
RUBY_EXTERN double round | ( | double | ) |
Definition at line 92 of file numeric.c.
Referenced by BigDecimal_power(), d_lite_plus(), dbl2ival(), fix_pow(), flo_pow(), flo_round(), offset_to_sec(), rb_big_pow(), and wholenum_p().
int ruby_brace_glob | ( | const char * | , |
int | , | ||
ruby_glob_func * | , | ||
VALUE | |||
) |
Definition at line 340 of file signal.c.
Referenced by ruby_cleanup().
const char* ruby_enc_find_basename | ( | const char * | name, |
long * | baselen, | ||
long * | alllen, | ||
rb_encoding * | enc | ||
) |
Definition at line 3773 of file file.c.
Referenced by rb_file_s_basename().
const char* ruby_enc_find_extname | ( | const char * | name, |
long * | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 3966 of file file.c.
Referenced by path_sub_ext(), and rb_file_s_extname().
Definition at line 206 of file eval_error.c.
double ruby_float_mod | ( | double | x, |
double | y | ||
) |
Definition at line 1791 of file numeric.c.
Referenced by num_step(), and range_step().
Definition at line 5736 of file gc.c.
Referenced by process_options(), and rb_gc_set_params().
int ruby_glob | ( | const char * | , |
int | , | ||
ruby_glob_func * | , | ||
VALUE | |||
) |
Definition at line 5329 of file thread.c.
Referenced by rb_f_kill().
Definition at line 6270 of file gc.c.
Referenced by ruby_vm_destruct().
void* ruby_mimmalloc | ( | size_t | size | ) |
Definition at line 6254 of file gc.c.
Referenced by Init_BareVM().
Definition at line 1822 of file numeric.c.
Referenced by int_downto_size(), int_upto_size(), num_step_size(), range_size(), and range_step_size().
unsigned long ruby_scan_digits | ( | const char * | str, |
ssize_t | len, | ||
int | base, | ||
size_t * | retlen, | ||
int * | overflow | ||
) |
Definition at line 79 of file util.c.
Referenced by parse_numvar(), and ruby_strtoul().
Definition at line 11636 of file io.c.
Referenced by proc_options().
Definition at line 254 of file signal.c.
Referenced by pst_message().
Definition at line 6237 of file gc.c.
Referenced by rb_ary_free(), rb_ary_initialize(), rb_ary_replace(), rb_ary_sort_bang(), rb_str_free(), ruby_xfree(), str_discard(), tr_trans(), wmap_final_func(), wmap_finalize(), and wmap_free_map().
Definition at line 6203 of file gc.c.
Referenced by ruby_xrealloc().
Referenced by ruby_xrealloc2(), wmap_aset_update(), and wmap_final_func().
Definition at line 1302 of file vsnprintf.c.
RUBY_EXTERN void setproctitle | ( | const char * | fmt, |
... | |||
) |
Definition at line 135 of file setproctitle.c.
Referenced by proc_setproctitle().
|
static |
RUBY_EXTERN int signbit | ( | double | x | ) |
Definition at line 5 of file signbit.c.
Referenced by f_signbit(), math_atan2(), math_gamma(), math_lgamma(), and num_step().
Definition at line 629 of file st.c.
Referenced by define_final0(), generic_ivar_set(), make_transcoder_entry(), make_unique_str(), method_entry_i(), move_refined_method(), rb_alias_variable(), rb_autoload(), rb_copy_generic_ivar(), rb_global_entry(), rb_ivar_set(), register_symid_str(), set_syserr(), transcode_search_path(), transcode_search_path_i(), w_object(), and w_symbol().
Definition at line 830 of file st.c.
Referenced by hash_foreach_ensure().
Definition at line 308 of file st.c.
Referenced by rb_hash_clear(), rb_hash_initialize_copy(), rb_thread_atfork_internal(), st_free_table(), and trace_object_allocations_clear().
Definition at line 663 of file st.c.
Referenced by rb_copy_generic_ivar(), rb_hash_dup(), rb_hash_initialize_copy(), rb_hash_s_create(), rb_hash_to_h(), and rb_st_copy().
Referenced by autoload_delete(), constat_delete(), delete_unique_str(), find_class_path(), flatten(), freeobj_i(), generic_ivar_remove(), r_fixup_compat(), rb_ary_and(), rb_const_remove(), rb_const_set(), rb_cvar_get(), rb_cvar_set(), rb_execarg_fixup(), rb_free_generic_ivar(), rb_hash_delete_key(), rb_mod_init_copy(), rb_mod_remove_cvar(), rb_obj_remove_instance_variable(), rb_objspace_call_finalizer(), rb_str_free(), rb_undefine_finalizer(), rb_waitpid(), remove_method(), run_final(), socklist_delete(), st_delete_wrap(), unknown_keyword_error(), and wmap_finalize().
Referenced by rb_hash_delete_key().
Definition at line 1034 of file st.c.
Referenced by class_instance_method_list(), clear_coverage(), collect_values_of_values(), count_nodes(), count_objects(), count_objects_size(), count_tdata_objects(), enc_names(), exit_handler(), fc_i(), get_loaded_features_index(), include_modules_at(), Init_String(), mark_const_tbl(), mark_hash(), mark_m_tbl_wrapper(), mark_marshal_compat_t(), mark_set(), mark_tbl(), object_allocations_reporter(), proc_waitall(), rb_ary_uniq_bang(), rb_check_deadlock(), rb_check_exec_env(), rb_check_exec_options(), rb_clear_trace_func(), rb_coverage_result(), rb_econv_asciicompat_encoding(), rb_enc_aliases(), rb_enc_foreach_name(), rb_enc_name_list(), rb_execarg_extract_options(), rb_execarg_fixup(), rb_extract_keywords(), rb_feature_p(), rb_free_const_table(), rb_free_m_tbl(), rb_local_constants(), rb_mod_init_copy(), rb_obj_singleton_methods(), rb_objspace_call_finalizer(), rb_prepend_module(), rb_singleton_class_clone_and_attach(), rb_st_copy(), rb_sym_all_symbols(), rb_thread_atfork_internal(), rb_thread_fd_close(), rb_thread_keys(), rb_thread_list(), rb_thread_terminate_all(), rb_vm_check_redefinition_by_prepend(), rb_vm_mark(), rb_waitpid(), reachable_objects_from(), rgengc_unprotect_logging_exit_func(), thgroup_list(), trace_object_allocations_clear(), transcode_search_path(), validate_labels(), wmap_each(), wmap_each_key(), wmap_each_value(), wmap_free(), wmap_inspect(), wmap_keys(), wmap_mark(), wmap_memsize(), and wmap_values().
Definition at line 942 of file st.c.
Referenced by hash_foreach_call(), and st_foreach_safe().
Definition at line 198 of file hash.c.
Referenced by cvar_list(), find_class_path(), givar_i(), mod_cvar_at(), obj_ivar_each(), rb_const_list(), rb_f_global_variables(), rb_gc_mark_global_tbl(), rb_ivar_foreach(), rb_mark_generic_ivar_tbl(), rb_mod_const_at(), and w_ivar().
Definition at line 334 of file st.c.
Referenced by ary_recycle_hash(), autoload_free(), class_instance_method_list(), clear_dump_arg(), clear_load_arg(), cvar_list(), exit_handler(), fiber_free(), flatten(), free_enc2cp(), generic_ivar_remove(), init_copy(), Init_win32ole(), iseq_build_from_ary_body(), iseq_data_to_ary(), iseq_load(), obj_free(), rb_const_list(), rb_copy_generic_ivar(), rb_free_const_table(), rb_free_generic_ivar(), rb_free_m_tbl(), rb_hash_initialize_copy(), rb_hash_rehash(), rb_mod_init_copy(), rb_obj_singleton_methods(), rb_objspace_call_finalizer(), ruby_vm_destruct(), st_copy(), thread_free(), transcode_search_path(), and wmap_free().
Referenced by make_unique_str(), and rb_feature_p().
st_index_t st_hash | ( | const void * | ptr, |
size_t | len, | ||
st_index_t | h | ||
) |
st_index_t st_hash_end | ( | st_index_t | h | ) |
st_index_t st_hash_start | ( | st_index_t | h | ) |
st_index_t st_hash_uint | ( | st_index_t | h, |
st_index_t | i | ||
) |
st_index_t st_hash_uint32 | ( | st_index_t | h, |
uint32_t | i | ||
) |
Definition at line 272 of file st.c.
Referenced by class_instance_method_list(), compat_allocator_table(), constat_handle(), fiber_init(), find_class_path(), flatten(), generic_ivar_set(), get_traceobj_arg(), init_enc2cp(), Init_Exception(), Init_heap(), Init_var_tables(), Init_VM(), Init_win32ole(), insn_make_insn_table(), iseq_compile_each(), iseq_data_to_ary(), iseq_load(), marshal_dump(), marshal_load(), mod_cvar_at(), rb_autoload(), rb_const_set(), rb_cvar_set(), rb_include_class_new(), rb_iseq_build_from_ary(), rb_ivar_set(), rb_mod_const_at(), rb_mod_init_copy(), rb_obj_freeze(), rb_obj_singleton_methods(), rb_singleton_class_attached(), rb_singleton_class_clone_and_attach(), rb_waitpid(), RCLASS_M_TBL_INIT(), reachable_objects_from(), ruby_register_rollback_func_for_ensure(), socklist_insert(), threadptr_local_aset(), vm_init_redefined_flag(), and wmap_allocate().
st_table* st_init_numtable_with_size | ( | st_index_t | ) |
Definition at line 278 of file st.c.
Referenced by Init_sym().
Definition at line 296 of file st.c.
Referenced by Init_transcode(), make_transcoder_entry(), rb_enc_init(), transcode_search_path(), and w_encoding().
st_table* st_init_strcasetable_with_size | ( | st_index_t | ) |
Definition at line 284 of file st.c.
Referenced by get_traceobj_arg(), Init_load(), load_lock(), rb_gc_unprotect_logging(), ruby_init_ext(), and zone_str().
st_table* st_init_strtable_with_size | ( | st_index_t | ) |
st_table* st_init_table | ( | const struct st_hash_type * | ) |
Definition at line 266 of file st.c.
Referenced by hash_tbl(), rb_fstring(), st_init_numtable(), st_init_strcasetable(), and st_init_strtable().
st_table* st_init_table_with_size | ( | const struct st_hash_type * | , |
st_index_t | |||
) |
Definition at line 229 of file st.c.
Referenced by Init_sym(), rb_hash_rehash(), st_init_numtable_with_size(), st_init_strcasetable_with_size(), st_init_strtable_with_size(), and st_init_table().
Referenced by add_opt_method(), clone_const(), constat_handle(), cv_i(), delete_unique_str(), enc_register_at(), enc_set_default_encoding(), features_index_add_single(), flatten(), generic_ivar_set(), Init_VM(), insn_make_insn_table(), iseq_compile_each(), iseq_load(), load_lock(), make_unique_str(), newobj_i(), obj_alloc_by_klass(), ole_vstr2wc(), r_entry0(), r_prepare(), r_symreal(), rb_autoload(), rb_const_set(), rb_copy_generic_ivar(), rb_execarg_fixup(), rb_gc_copy_finalizer(), rb_gc_unprotect_logging(), rb_hash_rehash_i(), rb_marshal_define_compat(), rb_method_entry_make(), rb_obj_freeze(), rb_st_insert_id_and_value(), rb_thread_atfork_internal(), rb_waitpid(), reachable_object_from_i(), register_label(), ruby_register_rollback_func_for_ensure(), socklist_insert(), sv_i(), thread_create_core(), threadptr_local_aset(), val2dispatch(), w_encoding(), w_object(), and wmap_aset().
Referenced by enc_alias_internal().
st_index_t st_keys | ( | st_table * | table, |
st_data_t * | keys, | ||
st_index_t | size | ||
) |
st_index_t st_keys_check | ( | st_table * | table, |
st_data_t * | keys, | ||
st_index_t | size, | ||
st_data_t | never | ||
) |
Definition at line 1136 of file st.c.
Referenced by rb_hash_keys().
Referenced by add_opt_method(), autoload_data(), autoload_defined_p(), autoload_delete(), classname(), constat_handle(), constat_reset(), cv_i(), cvar_lookup_at(), define_final0(), delete_unique_str(), eql_i(), fc_path(), features_index_add_single(), flatten(), freeobj_i(), generic_ivar_defined(), generic_ivar_get(), generic_ivar_remove(), generic_ivar_set(), get_syserr(), get_transcoder_entry(), iseq_build_from_ary_body(), iseq_compile_each(), iseq_data_to_ary(), iseq_load(), load_lock(), lookup_allocation_info(), lookup_method_table(), lookup_rollback_func(), make_transcoder_entry(), make_unique_str(), method_entry_i(), newobj_i(), obj_alloc_by_klass(), ole_vstr2wc(), r_entry0(), r_fixup_compat(), r_object0(), r_symlink(), rb_alias_variable(), rb_ary_diff(), rb_autoload(), rb_check_id(), rb_check_id_cstr(), rb_class_path_cached(), rb_const_defined_0(), rb_const_get_0(), rb_const_set(), rb_copy_generic_ivar(), rb_econv_asciicompat_encoding(), rb_enc_registered(), rb_f_untrace_var(), rb_feature_p(), rb_gc_copy_finalizer(), rb_gc_unprotect_logging(), rb_generic_ivar_memsize(), rb_generic_ivar_table(), rb_global_entry(), rb_hash_aref(), rb_hash_fetch_m(), rb_hash_has_key(), rb_hash_lookup2(), rb_id2str(), rb_intern3(), rb_intern_str(), rb_ivar_count(), rb_ivar_defined(), rb_ivar_foreach(), rb_ivar_lookup(), rb_ivar_set(), rb_mark_generic_ivar(), rb_method_entry_make(), rb_obj_frozen_p(), rb_obj_remove_instance_variable(), rb_thread_key_p(), rb_thread_variable_p(), rb_tmp_class_path(), rb_vm_check_redefinition_opt_method(), register_label(), remove_method(), set_const_visibility(), set_syserr(), socklist_lookup(), sv_i(), syserr_initialize(), threadptr_local_aref(), transcode_search_path(), transcode_search_path_i(), val2dispatch(), vm_get_ev_const(), vm_getivar(), vm_setivar(), w_class(), w_encoding(), w_object(), w_symbol(), and wmap_aref().
Definition at line 342 of file st.c.
Referenced by autoload_memsize(), fiber_memsize(), obj_memsize_of(), rb_generic_ivar_memsize(), thread_memsize(), vm_memsize(), and wmap_memsize().
Definition at line 1685 of file st.c.
Referenced by STATIC_ASSERT().
st_index_t st_numhash | ( | st_data_t | ) |
Definition at line 1691 of file st.c.
Referenced by STATIC_ASSERT().
Referenced by rb_hash_shift().
int st_update | ( | st_table * | table, |
st_data_t | key, | ||
st_update_callback_func * | func, | ||
st_data_t | arg | ||
) |
Definition at line 867 of file st.c.
Referenced by kwmerge_i(), load_unlock(), rb_ary_or(), rb_fstring(), ruby_init_ext(), tbl_update(), wmap_aset(), wmap_finalize(), and zone_str().
st_index_t st_values | ( | st_table * | table, |
st_data_t * | values, | ||
st_index_t | size | ||
) |
st_index_t st_values_check | ( | st_table * | table, |
st_data_t * | values, | ||
st_index_t | size, | ||
st_data_t | never | ||
) |
Definition at line 1177 of file st.c.
Referenced by rb_hash_values().
RUBY_EXTERN char* strchr | ( | const char * | , |
int | |||
) |
RUBY_EXTERN char* strerror | ( | int | ) |
Definition at line 11 of file strerror.c.
Referenced by argf_next_argv(), dln_load(), dln_strerror(), init_libraries_if_necessary(), inspect_errno(), load_file_internal(), Messaging_HandleMessage(), ossl_pkey_new_from_file(), ossl_x509_new_from_file(), rb_bug_errno(), rb_maygvl_fd_fix_cloexec(), rb_sys_warning(), rb_w32_strerror(), sys_warning_1(), syserr_initialize(), and thread_create_core().
RUBY_EXTERN size_t strlcat | ( | char * | , |
const char * | , | ||
size_t | |||
) |
Referenced by dln_load(), rb_file_expand_path_internal(), and w32_aspawn_flags().
RUBY_EXTERN size_t strlcpy | ( | char * | , |
const char * | , | ||
size_t | |||
) |
RUBY_EXTERN char* strrchr | ( | const char * | , |
int | |||
) |
RUBY_EXTERN char* strstr | ( | const char * | , |
const char * | |||
) |
Definition at line 8 of file strstr.c.
Referenced by if(), load_file_internal(), and Messaging_HandleMessage().
switch | ( | c | ) |
Definition at line 7774 of file ripper.y.
References lex_strterm, NEW_STRTERM, pushback, str_dsym, and str_ssym.
RUBY_EXTERN double tgamma | ( | double | ) |
Definition at line 72 of file tgamma.c.
Referenced by math_gamma().
|
static |
|
static |
|
static |
|
static |
|
static |
warn_balanced | ( | "/" | , |
"regexp literal" | |||
) |
void* xmalloc | ( | size_t | ) |
void* xmalloc2 | ( | size_t | , |
size_t | |||
) |
primary_value [' opt_call_args rbracket { $$ = dispatch2(aref_field, $1, escape_Qundef($3)); } | primary_value '.' tIDENTIFIER { $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); } | primary_value tCOLON2 tIDENTIFIER { $$ = dispatch2(const_path_field, $1, $3); } | primary_value '.' tCONSTANT { $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); } | primary_value tCOLON2 tCONSTANT { yyerror("dynamic constant assignment"); $$ = dispatch2(const_path_field, $1, $3); } | tCOLON3 tCONSTANT { $$ = dispatch1(top_const_field, $2); } | backref { $$ = dispatch1(var_field, $1); $$ = dispatch1(assign_error, $$); } ;lhs : user_variable { $$ = assignable($1, 0); $$ = dispatch1(var_field, $$); } | keyword_variable { $$ = assignable($1, 0); $$ = dispatch1(var_field, $$); } | primary_value '[' opt_call_args rbracket { $$ = dispatch2(aref_field, $1, escape_Qundef($3)); } | primary_value '.' tIDENTIFIER { $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); } | primary_value tCOLON2 tIDENTIFIER { $$ = dispatch3(field, $1, ripper_intern("::"), $3); } | primary_value '.' tCONSTANT { $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); } | primary_value tCOLON2 tCONSTANT { $$ = dispatch2(const_path_field, $1, $3); if (in_def || in_single) { $$ = dispatch1(assign_error, $$); } } | tCOLON3 tCONSTANT { $$ = dispatch1(top_const_field, $2); if (in_def || in_single) { $$ = dispatch1(assign_error, $$); } } | backref { $$ = dispatch1(assign_error, $1); } ;cname : tIDENTIFIER { $$ = dispatch1(class_name_error, $1); } | tCONSTANT ;cpath : tCOLON3 cname { $$ = dispatch1(top_const_ref, $2); } | cname { $$ = dispatch1(const_ref, $1); } | primary_value tCOLON2 cname { $$ = dispatch2(const_path_ref, $1, $3); } ;fname : tIDENTIFIER | tCONSTANT | tFID | op { lex_state = EXPR_ENDFN; $$ = $1; } | reswords { lex_state = EXPR_ENDFN; $$ = $1; } ;fsym : fname | symbol ;fitem : fsym { $$ = dispatch1(symbol_literal, $1); } | dsym ;undef_list : fitem { $$ = rb_ary_new3(1, $1); } | undef_list ',' {lex_state = EXPR_FNAME;} fitem { rb_ary_push($1, $4); } ;op : '|' { ifndef_ripper($$ = '|'); } | '^' { ifndef_ripper($$ = '^'); } | '&' { ifndef_ripper($$ = '&'); } | tCMP { ifndef_ripper($$ = tCMP); } | tEQ { ifndef_ripper($$ = tEQ); } | tEQQ { ifndef_ripper($$ = tEQQ); } | tMATCH { ifndef_ripper($$ = tMATCH); } | tNMATCH { ifndef_ripper($$ = tNMATCH); } | '>' { ifndef_ripper($$ = '>'); } | tGEQ { ifndef_ripper($$ = tGEQ); } | '<' { ifndef_ripper($$ = '<'); } | tLEQ { ifndef_ripper($$ = tLEQ); } | tNEQ { ifndef_ripper($$ = tNEQ); } | tLSHFT { ifndef_ripper($$ = tLSHFT); } | tRSHFT { ifndef_ripper($$ = tRSHFT); } | '+' { ifndef_ripper($$ = '+'); } | '-' { ifndef_ripper($$ = '-'); } | '*' { ifndef_ripper($$ = '*'); } | tSTAR { ifndef_ripper($$ = '*'); } | '/' { ifndef_ripper($$ = '/'); } | '%' { ifndef_ripper($$ = '%'); } | tPOW { ifndef_ripper($$ = tPOW); } | tDSTAR { ifndef_ripper($$ = tDSTAR); } | '!' { ifndef_ripper($$ = '!'); } | '~' { ifndef_ripper($$ = '~'); } | tUPLUS { ifndef_ripper($$ = tUPLUS); } | tUMINUS { ifndef_ripper($$ = tUMINUS); } | tAREF { ifndef_ripper($$ = tAREF); } | tASET { ifndef_ripper($$ = tASET); } | '`' { ifndef_ripper($$ = '`'); } ;reswords : keyword__LINE__ | keyword__FILE__ | keyword__ENCODING__ | keyword_BEGIN | keyword_END | keyword_alias | keyword_and | keyword_begin | keyword_break | keyword_case | keyword_class | keyword_def | keyword_defined | keyword_do | keyword_else | keyword_elsif | keyword_end | keyword_ensure | keyword_false | keyword_for | keyword_in | keyword_module | keyword_next | keyword_nil | keyword_not | keyword_or | keyword_redo | keyword_rescue | keyword_retry | keyword_return | keyword_self | keyword_super | keyword_then | keyword_true | keyword_undef | keyword_when | keyword_yield | keyword_if | keyword_unless | keyword_while | keyword_until ;arg : lhs '=' arg { $$ = dispatch2(assign, $1, $3); } | lhs '=' arg modifier_rescue arg { $$ = dispatch2(assign, $1, dispatch2(rescue_mod, $3, $5)); } | var_lhs tOP_ASGN arg { value_expr($3); $$ = new_op_assign($1, $2, $3); } | var_lhs tOP_ASGN arg modifier_rescue arg { $3 = dispatch2(rescue_mod, $3, $5); $$ = new_op_assign($1, $2, $3); } | primary_value '[' opt_call_args rbracket tOP_ASGN arg { $1 = dispatch2(aref_field, $1, escape_Qundef($3)); $$ = dispatch3(opassign, $1, $5, $6); } | primary_value '.' tIDENTIFIER tOP_ASGN arg { value_expr($5); $$ = new_attr_op_assign($1, ripper_id2sym('.'), $3, $4, $5); } | primary_value '.' tCONSTANT tOP_ASGN arg { value_expr($5); $$ = new_attr_op_assign($1, ripper_id2sym('.'), $3, $4, $5); } | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg { value_expr($5); $$ = new_attr_op_assign($1, ripper_intern("::"), $3, $4, $5); } | primary_value tCOLON2 tCONSTANT tOP_ASGN arg { $$ = dispatch2(const_path_field, $1, $3); $$ = dispatch3(opassign, $$, $4, $5); } | tCOLON3 tCONSTANT tOP_ASGN arg { $$ = dispatch1(top_const_field, $2); $$ = dispatch3(opassign, $$, $3, $4); } | backref tOP_ASGN arg { $$ = dispatch1(var_field, $1); $$ = dispatch3(opassign, $$, $2, $3); $$ = dispatch1(assign_error, $$); } | arg tDOT2 arg { $$ = dispatch2(dot2, $1, $3); } | arg tDOT3 arg { $$ = dispatch2(dot3, $1, $3); } | arg '+' arg { $$ = dispatch3(binary, $1, ID2SYM('+'), $3); } | arg '-' arg { $$ = dispatch3(binary, $1, ID2SYM('-'), $3); } | arg '*' arg { $$ = dispatch3(binary, $1, ID2SYM('*'), $3); } | arg '/' arg { $$ = dispatch3(binary, $1, ID2SYM('/'), $3); } | arg '%' arg { $$ = dispatch3(binary, $1, ID2SYM('%'), $3); } | arg tPOW arg { $$ = dispatch3(binary, $1, ripper_intern("**"), $3); } | tUMINUS_NUM simple_numeric tPOW arg { $$ = dispatch3(binary, $2, ripper_intern("**"), $4); $$ = dispatch2(unary, ripper_intern("-@"), $$); } | tUPLUS arg { $$ = dispatch2(unary, ripper_intern("+@"), $2); } | tUMINUS arg { $$ = dispatch2(unary, ripper_intern("-@"), $2); } | arg '|' arg { $$ = dispatch3(binary, $1, ID2SYM('|'), $3); } | arg '^' arg { $$ = dispatch3(binary, $1, ID2SYM('^'), $3); } | arg '&' arg { $$ = dispatch3(binary, $1, ID2SYM('&'), $3); } | arg tCMP arg { $$ = dispatch3(binary, $1, ripper_intern("<=>"), $3); } | arg '>' arg { $$ = dispatch3(binary, $1, ID2SYM('>'), $3); } | arg tGEQ arg { $$ = dispatch3(binary, $1, ripper_intern(">="), $3); } | arg '<' arg { $$ = dispatch3(binary, $1, ID2SYM('<'), $3); } | arg tLEQ arg { $$ = dispatch3(binary, $1, ripper_intern("<="), $3); } | arg tEQ arg { $$ = dispatch3(binary, $1, ripper_intern("=="), $3); } | arg tEQQ arg { $$ = dispatch3(binary, $1, ripper_intern("==="), $3); } | arg tNEQ arg { $$ = dispatch3(binary, $1, ripper_intern("!="), $3); } | arg tMATCH arg { $$ = dispatch3(binary, $1, ripper_intern("=~"), $3); } | arg tNMATCH arg { $$ = dispatch3(binary, $1, ripper_intern("!~"), $3); } | '!' arg { $$ = dispatch2(unary, ID2SYM('!'), $2); } | '~' arg { $$ = dispatch2(unary, ID2SYM('~'), $2); } | arg tLSHFT arg { $$ = dispatch3(binary, $1, ripper_intern("<<"), $3); } | arg tRSHFT arg { $$ = dispatch3(binary, $1, ripper_intern(">>"), $3); } | arg tANDOP arg { $$ = dispatch3(binary, $1, ripper_intern("&&"), $3); } | arg tOROP arg { $$ = dispatch3(binary, $1, ripper_intern("||"), $3); } | keyword_defined opt_nl {in_defined = 1;} arg { in_defined = 0; $$ = dispatch1(defined, $4); } | arg '?' arg opt_nl ':' arg { $$ = dispatch3(ifop, $1, $3, $6); } | primary { $$ = $1; } ;arg_value : arg { $$ = $1; } ;aref_args : none | args trailer { $$ = $1; } | args ',' assocs trailer { $$ = arg_add_assocs($1, $3); } | assocs trailer { $$ = arg_add_assocs(arg_new(), $1); } ;paren_args : '(' opt_call_args rparen { $$ = dispatch1(arg_paren, escape_Qundef($2)); } ;opt_paren_args : none | paren_args ;opt_call_args : none | call_args | args ',' { $$ = $1; } | args ',' assocs ',' { $$ = arg_add_assocs($1, $3); } | assocs ',' { $$ = arg_add_assocs(arg_new(), $1); } ;call_args : command { $$ = arg_add(arg_new(), $1); } | args opt_block_arg { $$ = arg_add_optblock($1, $2); } | assocs opt_block_arg { $$ = arg_add_assocs(arg_new(), $1); $$ = arg_add_optblock($$, $2); } | args ',' assocs opt_block_arg { $$ = arg_add_optblock(arg_add_assocs($1, $3), $4); } | block_arg { $$ = arg_add_block(arg_new(), $1); } ;command_args : { $<val>$ = cmdarg_stack; CMDARG_PUSH(1); } call_args { cmdarg_stack = $<val>1; $$ = $2; } ;block_arg : tAMPER arg_value { $$ = $2; } ;opt_block_arg : ',' block_arg { $$ = $2; } | none { $$ = 0; } ;args : arg_value { $$ = arg_add(arg_new(), $1); } | tSTAR arg_value { $$ = arg_add_star(arg_new(), $2); } | args ',' arg_value { $$ = arg_add($1, $3); } | args ',' tSTAR arg_value { $$ = arg_add_star($1, $4); } ;mrhs_arg : mrhs | arg_value ;mrhs : args ',' arg_value { $$ = mrhs_add(args2mrhs($1), $3); } | args ',' tSTAR arg_value { $$ = mrhs_add_star(args2mrhs($1), $4); } | tSTAR arg_value { $$ = mrhs_add_star(mrhs_new(), $2); } ;primary : literal | strings | xstring | regexp | words | qwords | symbols | qsymbols | var_ref | backref | tFID { $$ = method_arg(dispatch1(fcall, $1), arg_new()); } | k_begin { $<val>1 = cmdarg_stack; cmdarg_stack = 0; } bodystmt k_end { cmdarg_stack = $<val>1; $$ = dispatch1(begin, $3); } | tLPAREN_ARG {lex_state = EXPR_ENDARG;} rparen { $$ = dispatch1(paren, 0); } | tLPAREN_ARG { $<val>1 = cmdarg_stack; cmdarg_stack = 0; } expr {lex_state = EXPR_ENDARG;} rparen { cmdarg_stack = $<val>1; $$ = dispatch1(paren, $3); } | tLPAREN compstmt ')' { $$ = dispatch1(paren, $2); } | primary_value tCOLON2 tCONSTANT { $$ = dispatch2(const_path_ref, $1, $3); } | tCOLON3 tCONSTANT { $$ = dispatch1(top_const_ref, $2); } | tLBRACK aref_args ']' { $$ = dispatch1(array, escape_Qundef($2)); } | tLBRACE assoc_list '}' { $$ = dispatch1(hash, escape_Qundef($2)); } | keyword_return { $$ = dispatch0(return0); } | keyword_yield '(' call_args rparen { $$ = dispatch1(yield, dispatch1(paren, $3)); } | keyword_yield '(' rparen { $$ = dispatch1(yield, dispatch1(paren, arg_new())); } | keyword_yield { $$ = dispatch0(yield0); } | keyword_defined opt_nl '(' {in_defined = 1;} expr rparen { in_defined = 0; $$ = dispatch1(defined, $5); } | keyword_not '(' expr rparen { $$ = dispatch2(unary, ripper_intern("not"), $3); } | keyword_not '(' rparen { $$ = dispatch2(unary, ripper_intern("not"), Qnil); } | fcall brace_block { $$ = method_arg(dispatch1(fcall, $1), arg_new()); $$ = method_add_block($$, $2); } | method_call | method_call brace_block { $$ = method_add_block($1, $2); } | tLAMBDA lambda { $$ = $2; } | k_if expr_value then compstmt if_tail k_end { $$ = dispatch3(if, $2, $4, escape_Qundef($5)); } | k_unless expr_value then compstmt opt_else k_end { $$ = dispatch3(unless, $2, $4, escape_Qundef($5)); } | k_while {COND_PUSH(1);} expr_value do {COND_POP();} compstmt k_end { $$ = dispatch2(while, $3, $6); } | k_until {COND_PUSH(1);} expr_value do {COND_POP();} compstmt k_end { $$ = dispatch2(until, $3, $6); } | k_case expr_value opt_terms case_body k_end { $$ = dispatch2(case, $2, $4); } | k_case opt_terms case_body k_end { $$ = dispatch2(case, Qnil, $3); } | k_for for_var keyword_in {COND_PUSH(1);} expr_value do {COND_POP();} compstmt k_end { $$ = dispatch3(for, $2, $5, $8); } | k_class cpath superclass { yyerror("class definition in method body"); local_push(0); } bodystmt k_end { $$ = dispatch3(class, $2, $3, $5); local_pop(); } | k_class tLSHFT expr { $<num>$ = in_def; in_def = 0; } term { $<num>$ = in_single; in_single = 0; local_push(0); } bodystmt k_end { $$ = dispatch2(sclass, $3, $7); local_pop(); in_def = $<num>4; in_single = $<num>6; } | k_module cpath { yyerror("module definition in method body"); local_push(0); } bodystmt k_end { $$ = dispatch2(module, $2, $4); local_pop(); } | k_def fname { $<id>$ = cur_mid; cur_mid = $2; in_def++; local_push(0); } f_arglist bodystmt k_end { $$ = dispatch3(def, $2, $4, $5); local_pop(); in_def--; cur_mid = $<id>3; } | k_def singleton dot_or_colon {lex_state = EXPR_FNAME;} fname { in_single++; lex_state = EXPR_ENDFN; local_push(0); } f_arglist bodystmt k_end { $$ = dispatch5(defs, $2, $3, $5, $7, $8); local_pop(); in_single--; } | keyword_break { $$ = dispatch1(break, arg_new()); } | keyword_next { $$ = dispatch1(next, arg_new()); } | keyword_redo { $$ = dispatch0(redo); } | keyword_retry { $$ = dispatch0(retry); } ;primary_value : primary { $$ = $1; } ;k_begin : keyword_begin { token_info_push("begin"); } ;k_if : keyword_if { token_info_push("if"); } ;k_unless : keyword_unless { token_info_push("unless"); } ;k_while : keyword_while { token_info_push("while"); } ;k_until : keyword_until { token_info_push("until"); } ;k_case : keyword_case { token_info_push("case"); } ;k_for : keyword_for { token_info_push("for"); } ;k_class : keyword_class { token_info_push("class"); } ;k_module : keyword_module { token_info_push("module"); } ;k_def : keyword_def { token_info_push("def"); } ;k_end : keyword_end { token_info_pop("end"); } ;then : term { $$ = Qnil; } | keyword_then | term keyword_then { $$ = $2; } ;do : term { $$ = Qnil; } | keyword_do_cond ;if_tail : opt_else | keyword_elsif expr_value then compstmt if_tail { $$ = dispatch3(elsif, $2, $4, escape_Qundef($5)); } ;opt_else : none | keyword_else compstmt { $$ = dispatch1(else, $2); } ;for_var : lhs | mlhs ;f_marg : f_norm_arg { $$ = assignable($1, 0); $$ = dispatch1(mlhs_paren, $$); } | tLPAREN f_margs rparen { $$ = dispatch1(mlhs_paren, $2); } ;f_marg_list : f_marg { $$ = mlhs_add(mlhs_new(), $1); } | f_marg_list ',' f_marg { $$ = mlhs_add($1, $3); } ;f_margs : f_marg_list { $$ = $1; } | f_marg_list ',' tSTAR f_norm_arg { $$ = assignable($4, 0); $$ = mlhs_add_star($1, $$); } | f_marg_list ',' tSTAR f_norm_arg ',' f_marg_list { $$ = assignable($4, 0); $$ = mlhs_add_star($1, $$); } | f_marg_list ',' tSTAR { $$ = mlhs_add_star($1, Qnil); } | f_marg_list ',' tSTAR ',' f_marg_list { $$ = mlhs_add_star($1, $5); } | tSTAR f_norm_arg { $$ = assignable($2, 0); $$ = mlhs_add_star(mlhs_new(), $$); } | tSTAR f_norm_arg ',' f_marg_list { $$ = assignable($2, 0); $$ = mlhs_add_star($$, $4); } | tSTAR { $$ = mlhs_add_star(mlhs_new(), Qnil); } | tSTAR ',' f_marg_list { $$ = mlhs_add_star(mlhs_new(), Qnil); } ;block_args_tail : f_block_kwarg ',' f_kwrest opt_f_block_arg { $$ = new_args_tail($1, $3, $4); } | f_block_kwarg opt_f_block_arg { $$ = new_args_tail($1, Qnone, $2); } | f_kwrest opt_f_block_arg { $$ = new_args_tail(Qnone, $1, $2); } | f_block_arg { $$ = new_args_tail(Qnone, Qnone, $1); } ;opt_block_args_tail : ',' block_args_tail { $$ = $2; } | { $$ = new_args_tail(Qnone, Qnone, Qnone); } ;block_param : f_arg ',' f_block_optarg ',' f_rest_arg opt_block_args_tail { $$ = new_args($1, $3, $5, Qnone, $6); } | f_arg ',' f_block_optarg ',' f_rest_arg ',' f_arg opt_block_args_tail { $$ = new_args($1, $3, $5, $7, $8); } | f_arg ',' f_block_optarg opt_block_args_tail { $$ = new_args($1, $3, Qnone, Qnone, $4); } | f_arg ',' f_block_optarg ',' f_arg opt_block_args_tail { $$ = new_args($1, $3, Qnone, $5, $6); } | f_arg ',' f_rest_arg opt_block_args_tail { $$ = new_args($1, Qnone, $3, Qnone, $4); } | f_arg ',' { $$ = new_args($1, Qnone, 1, Qnone, new_args_tail(Qnone, Qnone, Qnone)); dispatch1(excessed_comma, $$); } | f_arg ',' f_rest_arg ',' f_arg opt_block_args_tail { $$ = new_args($1, Qnone, $3, $5, $6); } | f_arg opt_block_args_tail { $$ = new_args($1, Qnone, Qnone, Qnone, $2); } | f_block_optarg ',' f_rest_arg opt_block_args_tail { $$ = new_args(Qnone, $1, $3, Qnone, $4); } | f_block_optarg ',' f_rest_arg ',' f_arg opt_block_args_tail { $$ = new_args(Qnone, $1, $3, $5, $6); } | f_block_optarg opt_block_args_tail { $$ = new_args(Qnone, $1, Qnone, Qnone, $2); } | f_block_optarg ',' f_arg opt_block_args_tail { $$ = new_args(Qnone, $1, Qnone, $3, $4); } | f_rest_arg opt_block_args_tail { $$ = new_args(Qnone, Qnone, $1, Qnone, $2); } | f_rest_arg ',' f_arg opt_block_args_tail { $$ = new_args(Qnone, Qnone, $1, $3, $4); } | block_args_tail { $$ = new_args(Qnone, Qnone, Qnone, Qnone, $1); } ;opt_block_param : none | block_param_def { command_start = TRUE; } ;block_param_def : '|' opt_bv_decl '|' { $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), escape_Qundef($2)); } | tOROP { $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), Qnil); } | '|' block_param opt_bv_decl '|' { $$ = blockvar_new(escape_Qundef($2), escape_Qundef($3)); } ;opt_bv_decl : opt_nl { $$ = 0; } | opt_nl ';' bv_decls opt_nl { $$ = $3; } ;bv_decls : bvar { $$ = rb_ary_new3(1, $1); } | bv_decls ',' bvar { rb_ary_push($1, $3); } ;bvar : tIDENTIFIER { new_bv(get_id($1)); $$ = get_value($1); } | f_bad_arg { $$ = 0; } ;lambda : { $<vars>$ = dyna_push(); } { $<num>$ = lpar_beg; lpar_beg = ++paren_nest; } f_larglist { $<num>$ = ruby_sourceline; } { $<val>$ = cmdarg_stack; cmdarg_stack = 0; } lambda_body { lpar_beg = $<num>2; cmdarg_stack = $<val>5; CMDARG_LEXPOP(); $$ = dispatch2(lambda, $3, $6); dyna_pop($<vars>1); } ;f_larglist : '(' f_args opt_bv_decl ')' { $$ = dispatch1(paren, $2); } | f_args { $$ = $1; } ;lambda_body : tLAMBEG compstmt '}' { $$ = $2; } | keyword_do_LAMBDA compstmt keyword_end { $$ = $2; } ;do_block : keyword_do_block { $<vars>1 = dyna_push(); } opt_block_param compstmt keyword_end { $$ = dispatch2(do_block, escape_Qundef($3), $4); dyna_pop($<vars>1); } ;block_call : command do_block { $$ = method_add_block($1, $2); } | block_call dot_or_colon operation2 opt_paren_args { $$ = dispatch3(call, $1, $2, $3); $$ = method_optarg($$, $4); } | block_call dot_or_colon operation2 opt_paren_args brace_block { $$ = dispatch4(command_call, $1, $2, $3, $4); $$ = method_add_block($$, $5); } | block_call dot_or_colon operation2 command_args do_block { $$ = dispatch4(command_call, $1, $2, $3, $4); $$ = method_add_block($$, $5); } ;method_call : fcall paren_args { $$ = method_arg(dispatch1(fcall, $1), $2); } | primary_value '.' operation2 { } opt_paren_args { $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); $$ = method_optarg($$, $5); } | primary_value tCOLON2 operation2 { } paren_args { $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); $$ = method_optarg($$, $5); } | primary_value tCOLON2 operation3 { $$ = dispatch3(call, $1, ripper_intern("::"), $3); } | primary_value '.' { } paren_args { $$ = dispatch3(call, $1, ripper_id2sym('.'), ripper_intern("call")); $$ = method_optarg($$, $4); } | primary_value tCOLON2 { } paren_args { $$ = dispatch3(call, $1, ripper_intern("::"), ripper_intern("call")); $$ = method_optarg($$, $4); } | keyword_super paren_args { $$ = dispatch1(super, $2); } | keyword_super { $$ = dispatch0(zsuper); } | primary_value '[' opt_call_args rbracket { $$ = dispatch2(aref, $1, escape_Qundef($3)); } ;brace_block : '{' { $<vars>1 = dyna_push(); } opt_block_param compstmt '}' { $$ = dispatch2(brace_block, escape_Qundef($3), $4); dyna_pop($<vars>1); } | keyword_do { $<vars>1 = dyna_push(); } opt_block_param compstmt keyword_end { $$ = dispatch2(do_block, escape_Qundef($3), $4); dyna_pop($<vars>1); } ;case_body : keyword_when args then compstmt cases { $$ = dispatch3(when, $2, $4, escape_Qundef($5)); } ;cases : opt_else | case_body ;opt_rescue : keyword_rescue exc_list exc_var then compstmt opt_rescue { $$ = dispatch4(rescue, escape_Qundef($2), escape_Qundef($3), escape_Qundef($5), escape_Qundef($6)); } | none ;exc_list : arg_value { $$ = rb_ary_new3(1, $1); } | mrhs { $$ = $1; } | none ;exc_var : tASSOC lhs { $$ = $2; } | none ;opt_ensure : keyword_ensure compstmt { $$ = dispatch1(ensure, $2); } | none ;literal : numeric | symbol { $$ = dispatch1(symbol_literal, $1); } | dsym ;strings : string { $$ = $1; } ;string : tCHAR | string1 | string string1 { $$ = dispatch2(string_concat, $1, $2); } ;string1 : tSTRING_BEG string_contents tSTRING_END { $$ = dispatch1(string_literal, $2); } ;xstring : tXSTRING_BEG xstring_contents tSTRING_END { $$ = dispatch1(xstring_literal, $2); } ;regexp : tREGEXP_BEG regexp_contents tREGEXP_END { $$ = dispatch2(regexp_literal, $2, $3); } ;words : tWORDS_BEG ' ' tSTRING_END { $$ = dispatch0(words_new); $$ = dispatch1(array, $$); } | tWORDS_BEG word_list tSTRING_END { $$ = dispatch1(array, $2); } ;word_list : { $$ = dispatch0(words_new); } | word_list word ' ' { $$ = dispatch2(words_add, $1, $2); } ;word : string_content { $$ = dispatch0(word_new); $$ = dispatch2(word_add, $$, $1); } | word string_content { $$ = dispatch2(word_add, $1, $2); } ;symbols : tSYMBOLS_BEG ' ' tSTRING_END { $$ = dispatch0(symbols_new); $$ = dispatch1(array, $$); } | tSYMBOLS_BEG symbol_list tSTRING_END { $$ = dispatch1(array, $2); } ;symbol_list : { $$ = dispatch0(symbols_new); } | symbol_list word ' ' { $$ = dispatch2(symbols_add, $1, $2); } ;qwords : tQWORDS_BEG ' ' tSTRING_END { $$ = dispatch0(qwords_new); $$ = dispatch1(array, $$); } | tQWORDS_BEG qword_list tSTRING_END { $$ = dispatch1(array, $2); } ;qsymbols : tQSYMBOLS_BEG ' ' tSTRING_END { $$ = dispatch0(qsymbols_new); $$ = dispatch1(array, $$); } | tQSYMBOLS_BEG qsym_list tSTRING_END { $$ = dispatch1(array, $2); } ;qword_list : { $$ = dispatch0(qwords_new); } | qword_list tSTRING_CONTENT ' ' { $$ = dispatch2(qwords_add, $1, $2); } ;qsym_list : { $$ = dispatch0(qsymbols_new); } | qsym_list tSTRING_CONTENT ' ' { $$ = dispatch2(qsymbols_add, $1, $2); } ;string_contents : { $$ = dispatch0(string_content); } | string_contents string_content { $$ = dispatch2(string_add, $1, $2); } ;xstring_contents: { $$ = dispatch0(xstring_new); } | xstring_contents string_content { $$ = dispatch2(xstring_add, $1, $2); } ;regexp_contents: { $$ = dispatch0(regexp_new); } | regexp_contents string_content { $$ = dispatch2(regexp_add, $1, $2); } ;string_content : tSTRING_CONTENT | tSTRING_DVAR { $<node>$ = lex_strterm; lex_strterm = 0; lex_state = EXPR_BEG; } string_dvar { lex_strterm = $<node>2; $$ = dispatch1(string_dvar, $3); } | tSTRING_DBEG { $<val>1 = cond_stack; $<val>$ = cmdarg_stack; cond_stack = 0; cmdarg_stack = 0; } { $<node>$ = lex_strterm; lex_strterm = 0; lex_state = EXPR_BEG; } { $<num>$ = brace_nest; brace_nest = 0; } compstmt tSTRING_DEND { cond_stack = $<val>1; cmdarg_stack = $<val>2; lex_strterm = $<node>3; brace_nest = $<num>4; $$ = dispatch1(string_embexpr, $5); } ;string_dvar : tGVAR { $$ = dispatch1(var_ref, $1); } | tIVAR { $$ = dispatch1(var_ref, $1); } | tCVAR { $$ = dispatch1(var_ref, $1); } | backref ;symbol : tSYMBEG sym { lex_state = EXPR_END; $$ = dispatch1(symbol, $2); } ;sym : fname | tIVAR | tGVAR | tCVAR ;dsym : tSYMBEG xstring_contents tSTRING_END { lex_state = EXPR_END; $$ = dispatch1(dyna_symbol, $2); } ;numeric : simple_numeric | tUMINUS_NUM simple_numeric %prec tLOWEST { $$ = dispatch2(unary, ripper_intern("-@"), $2); } ;simple_numeric : tINTEGER | tFLOAT | tRATIONAL | tIMAGINARY ;user_variable : tIDENTIFIER | tIVAR | tGVAR | tCONSTANT | tCVAR ;keyword_variable: keyword_nil {ifndef_ripper($$ = keyword_nil);} | keyword_self {ifndef_ripper($$ = keyword_self);} | keyword_true {ifndef_ripper($$ = keyword_true);} | keyword_false {ifndef_ripper($$ = keyword_false);} | keyword__FILE__ {ifndef_ripper($$ = keyword__FILE__);} | keyword__LINE__ {ifndef_ripper($$ = keyword__LINE__);} | keyword__ENCODING__ {ifndef_ripper($$ = keyword__ENCODING__);} ;var_ref : user_variable { if (id_is_var(get_id($1))) { $$ = dispatch1(var_ref, $1); } else { $$ = dispatch1(vcall, $1); } } | keyword_variable { $$ = dispatch1(var_ref, $1); } ;var_lhs : user_variable { $$ = assignable($1, 0); $$ = dispatch1(var_field, $$); } | keyword_variable { $$ = assignable($1, 0); $$ = dispatch1(var_field, $$); } ;backref : tNTH_REF | tBACK_REF ;superclass : term { $$ = Qnil; } | '<' { lex_state = EXPR_BEG; command_start = TRUE; } expr_value term { $$ = $3; } | error term { yyerrok; $$ = Qnil; } ;f_arglist : '(' f_args rparen { $$ = dispatch1(paren, $2); lex_state = EXPR_BEG; command_start = TRUE; } | { $<num>$ = parser->parser_in_kwarg; parser->parser_in_kwarg = 1; } f_args term { parser->parser_in_kwarg = $<num>1; $$ = $2; lex_state = EXPR_BEG; command_start = TRUE; } ;args_tail : f_kwarg ',' f_kwrest opt_f_block_arg { $$ = new_args_tail($1, $3, $4); } | f_kwarg opt_f_block_arg { $$ = new_args_tail($1, Qnone, $2); } | f_kwrest opt_f_block_arg { $$ = new_args_tail(Qnone, $1, $2); } | f_block_arg { $$ = new_args_tail(Qnone, Qnone, $1); } ;opt_args_tail : ',' args_tail { $$ = $2; } | { $$ = new_args_tail(Qnone, Qnone, Qnone); } ;f_args : f_arg ',' f_optarg ',' f_rest_arg opt_args_tail { $$ = new_args($1, $3, $5, Qnone, $6); } | f_arg ',' f_optarg ',' f_rest_arg ',' f_arg opt_args_tail { $$ = new_args($1, $3, $5, $7, $8); } | f_arg ',' f_optarg opt_args_tail { $$ = new_args($1, $3, Qnone, Qnone, $4); } | f_arg ',' f_optarg ',' f_arg opt_args_tail { $$ = new_args($1, $3, Qnone, $5, $6); } | f_arg ',' f_rest_arg opt_args_tail { $$ = new_args($1, Qnone, $3, Qnone, $4); } | f_arg ',' f_rest_arg ',' f_arg opt_args_tail { $$ = new_args($1, Qnone, $3, $5, $6); } | f_arg opt_args_tail { $$ = new_args($1, Qnone, Qnone, Qnone, $2); } | f_optarg ',' f_rest_arg opt_args_tail { $$ = new_args(Qnone, $1, $3, Qnone, $4); } | f_optarg ',' f_rest_arg ',' f_arg opt_args_tail { $$ = new_args(Qnone, $1, $3, $5, $6); } | f_optarg opt_args_tail { $$ = new_args(Qnone, $1, Qnone, Qnone, $2); } | f_optarg ',' f_arg opt_args_tail { $$ = new_args(Qnone, $1, Qnone, $3, $4); } | f_rest_arg opt_args_tail { $$ = new_args(Qnone, Qnone, $1, Qnone, $2); } | f_rest_arg ',' f_arg opt_args_tail { $$ = new_args(Qnone, Qnone, $1, $3, $4); } | args_tail { $$ = new_args(Qnone, Qnone, Qnone, Qnone, $1); } | { $$ = new_args_tail(Qnone, Qnone, Qnone); $$ = new_args(Qnone, Qnone, Qnone, Qnone, $$); } ;f_bad_arg : tCONSTANT { $$ = dispatch1(param_error, $1); } | tIVAR { $$ = dispatch1(param_error, $1); } | tGVAR { $$ = dispatch1(param_error, $1); } | tCVAR { $$ = dispatch1(param_error, $1); } ;f_norm_arg : f_bad_arg | tIDENTIFIER { formal_argument(get_id($1)); $$ = $1; } ;f_arg_item : f_norm_arg { arg_var(get_id($1)); $$ = get_value($1); } | tLPAREN f_margs rparen { ID tid = internal_id(); arg_var(tid); $$ = dispatch1(mlhs_paren, $2); } ;f_arg : f_arg_item { $$ = rb_ary_new3(1, $1); } | f_arg ',' f_arg_item { $$ = rb_ary_push($1, $3); } ;f_label : tLABEL { arg_var(formal_argument(get_id($1))); $$ = $1; } ;f_kw : f_label arg_value { $$ = assignable($1, $2); $$ = rb_assoc_new($$, $2); } | f_label { $$ = assignable($1, (NODE *)-1); $$ = rb_assoc_new($$, 0); } ;f_block_kw : f_label primary_value { $$ = assignable($1, $2); $$ = rb_assoc_new($$, $2); } | f_label { $$ = assignable($1, (NODE *)-1); $$ = rb_assoc_new($$, 0); } ;f_block_kwarg : f_block_kw { $$ = rb_ary_new3(1, $1); } | f_block_kwarg ',' f_block_kw { $$ = rb_ary_push($1, $3); } ;f_kwarg : f_kw { $$ = rb_ary_new3(1, $1); } | f_kwarg ',' f_kw { $$ = rb_ary_push($1, $3); } ;kwrest_mark : tPOW | tDSTAR ;f_kwrest : kwrest_mark tIDENTIFIER { shadowing_lvar(get_id($2)); $$ = $2; } | kwrest_mark { $$ = internal_id(); } ;f_opt : f_norm_arg '=' arg_value { arg_var(get_id($1)); $$ = assignable($1, $3); $$ = rb_assoc_new($$, $3); } ;f_block_opt : f_norm_arg '=' primary_value { arg_var(get_id($1)); $$ = assignable($1, $3); $$ = rb_assoc_new($$, $3); } ;f_block_optarg : f_block_opt { $$ = rb_ary_new3(1, $1); } | f_block_optarg ',' f_block_opt { $$ = rb_ary_push($1, $3); } ;f_optarg : f_opt { $$ = rb_ary_new3(1, $1); } | f_optarg ',' f_opt { $$ = rb_ary_push($1, $3); } ;restarg_mark : '*' | tSTAR ;f_rest_arg : restarg_mark tIDENTIFIER { arg_var(shadowing_lvar(get_id($2))); $$ = dispatch1(rest_param, $2); } | restarg_mark { $$ = dispatch1(rest_param, Qnil); } ;blkarg_mark : '&' | tAMPER ;f_block_arg : blkarg_mark tIDENTIFIER { arg_var(shadowing_lvar(get_id($2))); $$ = dispatch1(blockarg, $2); } ;opt_f_block_arg : ',' f_block_arg { $$ = $2; } | none { $$ = Qundef; } ;singleton : var_ref { $$ = $1; } | '(' {lex_state = EXPR_BEG;} expr rparen { $$ = dispatch1(paren, $3); } ;assoc_list : none | assocs trailer { $$ = dispatch1(assoclist_from_args, $1); } ;assocs : assoc { $$ = rb_ary_new3(1, $1); } | assocs ',' assoc { $$ = rb_ary_push($1, $3); } ;assoc : arg_value tASSOC arg_value { $$ = dispatch2(assoc_new, $1, $3); } | tLABEL arg_value { $$ = dispatch2(assoc_new, $1, $2); } | tDSTAR arg_value { $$ = dispatch1(assoc_splat, $2); } ; ;operation : tIDENTIFIER | tCONSTANT | tFID ;operation2 : tIDENTIFIER | tCONSTANT | tFID | op ;operation3 : tIDENTIFIER | tFID | op ;dot_or_colon : '.' { $$ = $<val>1; } | tCOLON2 { $$ = $<val>1; } ;opt_terms : | terms ;opt_nl : | '\n' ;rparen : opt_nl ')' ;rbracket : opt_nl ']' ;trailer : | '\n' | ',' ;term : ';' {yyerrok;} | '\n' ;terms : term | terms ';' {yyerrok;} ;none : { $$ = Qundef; } ;%%#define yylvalstatic 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*);#define nextc() #define pushback(c) #define newtok() #define tokspace(n) #define tokadd(c) #define tok_hex(numlen) #define read_escape(flags,e) #define tokadd_escape(e) #define regx_options() #define tokadd_string(f,t,p,n,e) #define parse_string(n) #define tokaddmbc(c, enc) #define here_document(n) #define heredoc_identifier() #define heredoc_restore(n) #define whole_match_p(e,l,i) #define number_literal_suffix(f) #define set_number_literal(v, t, f) #define set_integer_literal(v, f) #define set_yylval_str(x) #define set_yylval_num(x) #define set_yylval_id(x) #define set_yylval_name(x) #define set_yylval_literal(x) #define set_yylval_node(x) #define yylval_id() #define ripper_flush(p) #define SIGN_EXTEND_CHAR(c) #define parser_encoding_name() #define parser_mbclen() #define parser_precise_mbclen() #define is_identchar(p,e,enc) #define parser_is_identchar() #define parser_isascii() static inttoken_info_get_column(struct parser_params *parser, const char *token){ int column = 1; const char *p, *pend = lex_p - strlen(token); for (p = lex_pbeg; p < pend; p++) { if (*p == '\t') { column = (((column - 1) / 8) + 1) * 8; } column++; } return column;}static inttoken_info_has_nonspaces(struct parser_params *parser, const char *token){ const char *p, *pend = lex_p - strlen(token); for (p = lex_pbeg; p < pend; p++) { if (*p != ' ' && *p != '\t') { return 1; } } return 0;}static voidtoken_info_push(struct parser_params *parser, const char *token){ token_info *ptinfo; if (!parser->parser_token_info_enabled) return; ptinfo = ALLOC(token_info); ptinfo->token = token; ptinfo->linenum = ruby_sourceline; ptinfo->column = token_info_get_column(parser, token); ptinfo->nonspc = token_info_has_nonspaces(parser, token); ptinfo->next = parser->parser_token_info; parser->parser_token_info = ptinfo;}static voidtoken_info_pop(struct parser_params *parser, const char *token){ int linenum; token_info *ptinfo = parser->parser_token_info; if (!ptinfo) return; parser->parser_token_info = ptinfo->next; if (token_info_get_column(parser, token) == ptinfo->column) { goto finish; } linenum = ruby_sourceline; if (linenum == ptinfo->linenum) { goto finish; } if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { goto finish; } if (parser->parser_token_info_enabled) { rb_compile_warn(ruby_sourcefile, linenum, "mismatched indentations at '%s' with '%s' at %d", token, ptinfo->token, ptinfo->linenum); } finish: xfree(ptinfo);}static intparser_yyerror(struct parser_params *parser, const char *msg){ const int max_line_margin = 30; const char *p, *pe; char *buf; long len; int i; compile_error(PARSER_ARG "%s", msg); p = lex_p; while (lex_pbeg <= p) { if (*p == '\n') break; p--; } p++; pe = lex_p; while (pe < lex_pend) { if (*pe == '\n') break; pe++; } len = pe - p; if (len > 4) { char *p2; const char *pre = "", *post = ""; if (len > max_line_margin * 2 + 10) { if (lex_p - p > max_line_margin) { p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline)); pre = "..."; } if (pe - lex_p > max_line_margin) { pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline)); post = "..."; } len = pe - p; } buf = ALLOCA_N(char, len+2); MEMCPY(buf, p, char, len); buf[len] = '\0'; rb_compile_error_with_enc(NULL, 0, (void *)current_enc, "%s%s%s", pre, buf, post); i = (int)(lex_p - p); p2 = buf; pe = buf + len; while (p2 < pe) { if (*p2 != '\t') *p2 = ' '; p2++; } buf[i] = '^'; buf[i+1] = '\0'; rb_compile_error_append("%s%s", pre, buf); } return 0;}static void parser_prepare(struct parser_params *parser);static VALUEdebug_lines(VALUE fname){ ID script_lines; CONST_ID(script_lines, "SCRIPT_LINES__"); if (rb_const_defined_at(rb_cObject, script_lines)) { VALUE hash = rb_const_get_at(rb_cObject, script_lines); if (RB_TYPE_P(hash, T_HASH)) { VALUE lines = rb_ary_new(); rb_hash_aset(hash, fname, lines); return lines; } } return 0;}static VALUEcoverage(VALUE fname, int n){ VALUE coverages = rb_get_coverages(); if (RTEST(coverages) && RBASIC(coverages)->klass == 0) { VALUE lines = rb_ary_new2(n); int i; RBASIC_CLEAR_CLASS(lines); for (i = 0; i < n; i++) RARRAY_ASET(lines, i, Qnil); RARRAY(lines)->as.heap.len = n; rb_hash_aset(coverages, fname, lines); return lines; } return 0;}static inte_option_supplied(struct parser_params *parser){ return strcmp(ruby_sourcefile, "-e") == 0;}static VALUEyycompile0(VALUE arg){ int n; NODE *tree; struct parser_params *parser = (struct parser_params *)arg; if (!compile_for_eval && rb_safe_level() == 0) { ruby_debug_lines = debug_lines(ruby_sourcefile_string); if (ruby_debug_lines && ruby_sourceline > 0) { VALUE str = STR_NEW0(); n = ruby_sourceline; do { rb_ary_push(ruby_debug_lines, str); } while (--n); } if (!e_option_supplied(parser)) { ruby_coverage = coverage(ruby_sourcefile_string, ruby_sourceline); } } parser->last_cr_line = ruby_sourceline - 1; parser_prepare(parser); deferred_nodes = 0; parser->parser_token_info_enabled = !compile_for_eval && RTEST(ruby_verbose); if (RUBY_DTRACE_PARSE_BEGIN_ENABLED()) { RUBY_DTRACE_PARSE_BEGIN(parser->parser_ruby_sourcefile, parser->parser_ruby_sourceline); } n = yyparse((void*)parser); if (RUBY_DTRACE_PARSE_END_ENABLED()) { RUBY_DTRACE_PARSE_END(parser->parser_ruby_sourcefile, parser->parser_ruby_sourceline); } ruby_debug_lines = 0; ruby_coverage = 0; compile_for_eval = 0; lex_strterm = 0; lex_p = lex_pbeg = lex_pend = 0; lex_lastline = lex_nextline = 0; if (parser->nerr) { return 0; } tree = ruby_eval_tree; if (!tree) { tree = NEW_NIL(); } else if (ruby_eval_tree_begin) { tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body); } return (VALUE)tree;}static NODE*yycompile(struct parser_params *parser, VALUE fname, int line){ ruby_sourcefile_string = rb_str_new_frozen(fname); ruby_sourcefile = RSTRING_PTR(fname); ruby_sourceline = line - 1; return (NODE *)rb_suppress_tracing(yycompile0, (VALUE)parser);}static rb_encoding *must_be_ascii_compatible(VALUE s){ rb_encoding *enc = rb_enc_get(s); if (!rb_enc_asciicompat(enc)) { rb_raise(rb_eArgError, "invalid source encoding"); } return enc;}static VALUElex_get_str(struct parser_params *parser, VALUE s){ char *beg, *end, *pend; rb_encoding *enc = must_be_ascii_compatible(s); beg = RSTRING_PTR(s); if (lex_gets_ptr) { if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil; beg += lex_gets_ptr; } pend = RSTRING_PTR(s) + RSTRING_LEN(s); end = beg; while (end < pend) { if (*end++ == '\n') break; } lex_gets_ptr = end - RSTRING_PTR(s); return rb_enc_str_new(beg, end - beg, enc);}static VALUElex_getline(struct parser_params *parser){ VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input); if (NIL_P(line)) return line; must_be_ascii_compatible(line); if (ruby_debug_lines) { rb_enc_associate(line, current_enc); rb_ary_push(ruby_debug_lines, line); } if (ruby_coverage) { rb_ary_push(ruby_coverage, Qnil); } return line;}static const rb_data_type_t parser_data_type;static NODE*parser_compile_string(volatile VALUE vparser, VALUE fname, VALUE s, int line){ struct parser_params *parser; NODE *node; TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); lex_gets = lex_get_str; lex_gets_ptr = 0; lex_input = s; lex_pbeg = lex_p = lex_pend = 0; compile_for_eval = rb_parse_in_eval(); node = yycompile(parser, fname, line); RB_GC_GUARD(vparser); return node;}NODE*rb_compile_string(const char *f, VALUE s, int line){ must_be_ascii_compatible(s); return parser_compile_string(rb_parser_new(), rb_filesystem_str_new_cstr(f), s, line);}NODE*rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line){ return rb_parser_compile_string_path(vparser, rb_filesystem_str_new_cstr(f), s, line);}NODE*rb_parser_compile_string_path(volatile VALUE vparser, VALUE f, VALUE s, int line){ must_be_ascii_compatible(s); return parser_compile_string(vparser, f, s, line);}NODE*rb_compile_cstr(const char *f, const char *s, int len, int line){ VALUE str = rb_str_new(s, len); return parser_compile_string(rb_parser_new(), rb_filesystem_str_new_cstr(f), str, line);}NODE*rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line){ VALUE str = rb_str_new(s, len); return parser_compile_string(vparser, rb_filesystem_str_new_cstr(f), str, line);}static VALUElex_io_gets(struct parser_params *parser, VALUE io){ return rb_io_gets(io);}NODE*rb_compile_file(const char *f, VALUE file, int start){ VALUE volatile vparser = rb_parser_new(); return rb_parser_compile_file(vparser, f, file, start);}NODE*rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start){ return rb_parser_compile_file_path(vparser, rb_filesystem_str_new_cstr(f), file, start);}NODE*rb_parser_compile_file_path(volatile VALUE vparser, VALUE fname, VALUE file, int start){ struct parser_params *parser; NODE *node; TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); lex_gets = lex_io_gets; lex_input = file; lex_pbeg = lex_p = lex_pend = 0; compile_for_eval = rb_parse_in_eval(); node = yycompile(parser, fname, start); RB_GC_GUARD(vparser); return node;}#define STR_FUNC_ESCAPE#define STR_FUNC_EXPAND#define STR_FUNC_REGEXP#define STR_FUNC_QWORDS#define STR_FUNC_SYMBOL#define STR_FUNC_INDENTenum 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)};static VALUEparser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0){ VALUE str; str = rb_enc_str_new(p, n, enc); if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) { if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { } else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) { rb_enc_associate(str, rb_ascii8bit_encoding()); } } return str;}#define lex_goto_eol(parser) #define lex_eol_p() #define peek(c) #define peek_n(c,n) static inline intparser_nextc(struct parser_params *parser){ int c; if (lex_p == lex_pend) { VALUE v = lex_nextline; lex_nextline = 0; if (!v) { return -1; if (!lex_input || NIL_P(v = lex_getline(parser))) { parser->eofp = Qtrue; lex_goto_eol(parser); return -1; } } { if (heredoc_end > 0) { ruby_sourceline = heredoc_end; heredoc_end = 0; } ruby_sourceline++; parser->line_count++; lex_pbeg = lex_p = RSTRING_PTR(v); lex_pend = lex_p + RSTRING_LEN(v); ripper_flush(parser); lex_lastline = v; } } c = (unsigned char)*lex_p++; if (c == '\r') { if (peek('\n')) { lex_p++; c = '\n'; } else if (ruby_sourceline > parser->last_cr_line) { parser->last_cr_line = ruby_sourceline; rb_compile_warn(ruby_sourcefile, ruby_sourceline, "encountered \\r in middle of line, treated as a mere space"); } } return c;}static voidparser_pushback(struct parser_params *parser, int c){ if (c == -1) return; lex_p--; if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') { lex_p--; }}#define was_bol() #define tokfix() #define tok() #define toklen() #define toklast() static char*parser_newtok(struct parser_params *parser){ tokidx = 0; tokline = ruby_sourceline; if (!tokenbuf) { toksiz = 60; tokenbuf = ALLOC_N(char, 60); } if (toksiz > 4096) { toksiz = 60; REALLOC_N(tokenbuf, char, 60); } return tokenbuf;}static char *parser_tokspace(struct parser_params *parser, int n){ tokidx += n; if (tokidx >= toksiz) { do {toksiz *= 2;} while (toksiz < tokidx); REALLOC_N(tokenbuf, char, toksiz); } return &tokenbuf[tokidx-n];}static voidparser_tokadd(struct parser_params *parser, int c){ tokenbuf[tokidx++] = (char)c; if (tokidx >= toksiz) { toksiz *= 2; REALLOC_N(tokenbuf, char, toksiz); }}static intparser_tok_hex(struct parser_params *parser, size_t *numlen){ int c; c = scan_hex(lex_p, 2, numlen); if (!*numlen) { yyerror("invalid hex escape"); return 0; } lex_p += *numlen; return c;}#define tokcopy(n) static intparser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, int string_literal, int symbol_literal, int regexp_literal){ int codepoint; size_t numlen; if (regexp_literal) { tokadd('\\'); tokadd('u'); } if (peek('{')) { do { if (regexp_literal) { tokadd(*lex_p); } nextc(); codepoint = scan_hex(lex_p, 6, &numlen); if (numlen == 0) { yyerror("invalid Unicode escape"); return 0; } if (codepoint > 0x10ffff) { yyerror("invalid Unicode codepoint (too large)"); return 0; } lex_p += numlen; if (regexp_literal) { tokcopy((int)numlen); } else if (codepoint >= 0x80) { *encp = rb_utf8_encoding(); if (string_literal) tokaddmbc(codepoint, *encp); } else if (string_literal) { tokadd(codepoint); } } while (string_literal && (peek(' ') || peek('\t'))); if (!peek('}')) { yyerror("unterminated Unicode escape"); return 0; } if (regexp_literal) { tokadd('}'); } nextc(); } else { codepoint = scan_hex(lex_p, 4, &numlen); if (numlen < 4) { yyerror("invalid Unicode escape"); return 0; } lex_p += 4; if (regexp_literal) { tokcopy(4); } else if (codepoint >= 0x80) { *encp = rb_utf8_encoding(); if (string_literal) tokaddmbc(codepoint, *encp); } else if (string_literal) { tokadd(codepoint); } } return codepoint;}#define ESCAPE_CONTROL#define ESCAPE_METAstatic intparser_read_escape(struct parser_params *parser, int flags, rb_encoding **encp){ int c; size_t numlen; switch (c = nextc()) { case '\\': return c; case 'n': return '\n'; case 't': return '\t'; case 'r': return '\r'; case 'f': return '\f'; case 'v': return '\13'; case 'a': return '\007'; case 'e': return 033; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': pushback(c); c = scan_oct(lex_p, 3, &numlen); lex_p += numlen; return c; case 'x': c = tok_hex(&numlen); if (numlen == 0) return 0; return c; case 'b': return '\010'; case 's': return ' '; case 'M': if (flags & ESCAPE_META) goto eof; if ((c = nextc()) != '-') { pushback(c); goto eof; } if ((c = nextc()) == '\\') { if (peek('u')) goto eof; return read_escape(flags|ESCAPE_META, encp) | 0x80; } else if (c == -1 || !ISASCII(c)) goto eof; else { return ((c & 0xff) | 0x80); } case 'C': if ((c = nextc()) != '-') { pushback(c); goto eof; } case 'c': if (flags & ESCAPE_CONTROL) goto eof; if ((c = nextc())== '\\') { if (peek('u')) goto eof; c = read_escape(flags|ESCAPE_CONTROL, encp); } else if (c == '?') return 0177; else if (c == -1 || !ISASCII(c)) goto eof; return c & 0x9f; eof: case -1: yyerror("Invalid escape character syntax"); return '\0'; default: return c; }}static voidparser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc){ int len = rb_enc_codelen(c, enc); rb_enc_mbcput(c, tokspace(len), enc);}static intparser_tokadd_escape(struct parser_params *parser, rb_encoding **encp){ int c; int flags = 0; size_t numlen; first: switch (c = nextc()) { case '\n': return 0; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': { ruby_scan_oct(--lex_p, 3, &numlen); if (numlen == 0) goto eof; lex_p += numlen; tokcopy((int)numlen + 1); } return 0; case 'x': { tok_hex(&numlen); if (numlen == 0) return -1; tokcopy((int)numlen + 2); } return 0; case 'M': if (flags & ESCAPE_META) goto eof; if ((c = nextc()) != '-') { pushback(c); goto eof; } tokcopy(3); flags |= ESCAPE_META; goto escaped; case 'C': if (flags & ESCAPE_CONTROL) goto eof; if ((c = nextc()) != '-') { pushback(c); goto eof; } tokcopy(3); goto escaped; case 'c': if (flags & ESCAPE_CONTROL) goto eof; tokcopy(2); flags |= ESCAPE_CONTROL; escaped: if ((c = nextc()) == '\\') { goto first; } else if (c == -1) goto eof; tokadd(c); return 0; eof: case -1: yyerror("Invalid escape character syntax"); return -1; default: tokadd('\\'); tokadd(c); } return 0;}static intparser_regx_options(struct parser_params *parser){ int kcode = 0; int kopt = 0; int options = 0; int c, opt, kc; newtok(); while (c = nextc(), ISALPHA(c)) { if (c == 'o') { options |= RE_OPTION_ONCE; } else if (rb_char_to_option_kcode(c, &opt, &kc)) { if (kc >= 0) { if (kc != rb_ascii8bit_encindex()) kcode = c; kopt = opt; } else { options |= opt; } } else { tokadd(c); } } options |= kopt; pushback(c); if (toklen()) { tokfix(); compile_error(PARSER_ARG "unknown regexp option%s - %s", toklen() > 1 ? "s" : "", tok()); } return options | RE_OPTION_ENCODING(kcode);}static voiddispose_string(VALUE str){ rb_str_free(str); rb_gc_force_recycle(str);}static intparser_tokadd_mbchar(struct parser_params *parser, int c){ int len = parser_precise_mbclen(); if (!MBCLEN_CHARFOUND_P(len)) { compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name()); return -1; } tokadd(c); lex_p += --len; if (len > 0) tokcopy(len); return c;}#define tokadd_mbchar(c) static inline intsimple_re_meta(int c){ switch (c) { case '$': case '*': case '+': case '.': case '?': case '^': case '|': case ')': case ']': case '}': case '>': return TRUE; default: return FALSE; }}static intparser_tokadd_string(struct parser_params *parser, int func, int term, int paren, long *nest, rb_encoding **encp){ int c; int has_nonascii = 0; rb_encoding *enc = *encp; char *errbuf = 0; static const char mixed_msg[] = "%s mixed within %s source";#define mixed_error(enc1, enc2) #define mixed_escape(beg, enc1, enc2) while ((c = nextc()) != -1) { if (paren && c == paren) { ++*nest; } else if (c == term) { if (!nest || !*nest) { pushback(c); break; } --*nest; } else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) { int c2 = *lex_p; if (c2 == '$' || c2 == '@' || c2 == '{') { pushback(c); break; } } else if (c == '\\') { const char *beg = lex_p - 1; c = nextc(); switch (c) { case '\n': if (func & STR_FUNC_QWORDS) break; if (func & STR_FUNC_EXPAND) continue; tokadd('\\'); break; case '\\': if (func & STR_FUNC_ESCAPE) tokadd(c); break; case 'u': if ((func & STR_FUNC_EXPAND) == 0) { tokadd('\\'); break; } parser_tokadd_utf8(parser, &enc, 1, func & STR_FUNC_SYMBOL, func & STR_FUNC_REGEXP); if (has_nonascii && enc != *encp) { mixed_escape(beg, enc, *encp); } continue; default: if (c == -1) return -1; if (!ISASCII(c)) { if ((func & STR_FUNC_EXPAND) == 0) tokadd('\\'); goto non_ascii; } if (func & STR_FUNC_REGEXP) { if (c == term && !simple_re_meta(c)) { tokadd(c); continue; } pushback(c); if ((c = tokadd_escape(&enc)) < 0) return -1; if (has_nonascii && enc != *encp) { mixed_escape(beg, enc, *encp); } continue; } else if (func & STR_FUNC_EXPAND) { pushback(c); if (func & STR_FUNC_ESCAPE) tokadd('\\'); c = read_escape(0, &enc); } else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { } else if (c != term && !(paren && c == paren)) { tokadd('\\'); pushback(c); continue; } } } else if (!parser_isascii()) { non_ascii: has_nonascii = 1; if (enc != *encp) { mixed_error(enc, *encp); continue; } if (tokadd_mbchar(c) == -1) return -1; continue; } else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { pushback(c); break; } if (c & 0x80) { has_nonascii = 1; if (enc != *encp) { mixed_error(enc, *encp); continue; } } tokadd(c); } *encp = enc; return c;}#define NEW_STRTERM(func, term, paren) #define flush_string_content(enc) RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];#define BIT(c, idx) #define SPECIAL_PUNCT(idx) const unsigned int ruby_global_name_punct_bits[] = { SPECIAL_PUNCT(0), SPECIAL_PUNCT(1), SPECIAL_PUNCT(2),};static inline intis_global_name_punct(const int c){ if (c <= 0x20 || 0x7e < c) return 0; return (ruby_global_name_punct_bits[(c - 0x20) / 32] >> (c % 32)) & 1;}static intparser_peek_variable_name(struct parser_params *parser){ int c; const char *p = lex_p; if (p + 1 >= lex_pend) return 0; c = *p++; switch (c) { case '$': if ((c = *p) == '-') { if (++p >= lex_pend) return 0; c = *p; } else if (is_global_name_punct(c) || ISDIGIT(c)) { return tSTRING_DVAR; } break; case '@': if ((c = *p) == '@') { if (++p >= lex_pend) return 0; c = *p; } break; case '{': lex_p = p; command_start = TRUE; return tSTRING_DBEG; default: return 0; } if (!ISASCII(c) || c == '_' || ISALPHA(c)) return tSTRING_DVAR; return 0;}static intparser_parse_string(struct parser_params *parser, NODE *quote){ int func = (int)quote->nd_func; int term = nd_term(quote); int paren = nd_paren(quote); int c, space = 0; rb_encoding *enc = current_enc; if (func == -1) return tSTRING_END; c = nextc(); if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { do {c = nextc();} while (ISSPACE(c)); space = 1; } if (c == term && !quote->nd_nest) { if (func & STR_FUNC_QWORDS) { quote->nd_func = -1; return ' '; } if (!(func & STR_FUNC_REGEXP)) return tSTRING_END; set_yylval_num(regx_options()); return tREGEXP_END; } if (space) { pushback(c); return ' '; } newtok(); if ((func & STR_FUNC_EXPAND) && c == '#') { int t = parser_peek_variable_name(parser); if (t) return t; tokadd('#'); c = nextc(); } pushback(c); if (tokadd_string(func, term, paren, "e->nd_nest, &enc) == -1) { ruby_sourceline = nd_line(quote); if (func & STR_FUNC_REGEXP) { compile_error(PARSER_ARG "unterminated regexp meets end of file"); return tREGEXP_END; } else { compile_error(PARSER_ARG "unterminated string meets end of file"); return tSTRING_END; } } tokfix(); set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); flush_string_content(enc); return tSTRING_CONTENT;}static intparser_heredoc_identifier(struct parser_params *parser){ int c = nextc(), term, func = 0; long len; if (c == '-') { c = nextc(); func = STR_FUNC_INDENT; } switch (c) { case '\'': func |= str_squote; goto quoted; case '"': func |= str_dquote; goto quoted; case '`': func |= str_xquote; quoted: newtok(); tokadd(func); term = c; while ((c = nextc()) != -1 && c != term) { if (tokadd_mbchar(c) == -1) return 0; } if (c == -1) { compile_error(PARSER_ARG "unterminated here document identifier"); return 0; } break; default: if (!parser_is_identchar()) { pushback(c); if (func & STR_FUNC_INDENT) { pushback('-'); } return 0; } newtok(); term = '"'; tokadd(func |= str_dquote); do { if (tokadd_mbchar(c) == -1) return 0; } while ((c = nextc()) != -1 && parser_is_identchar()); pushback(c); break; } tokfix(); len = lex_p - lex_pbeg; lex_goto_eol(parser); lex_strterm = rb_node_newnode(NODE_HEREDOC, STR_NEW(tok(), toklen()), len, lex_lastline); nd_set_line(lex_strterm, ruby_sourceline); ripper_flush(parser); return term == '`' ? tXSTRING_BEG : tSTRING_BEG;}static voidparser_heredoc_restore(struct parser_params *parser, NODE *here){ VALUE line; lex_strterm = 0; line = here->nd_orig; lex_lastline = line; lex_pbeg = RSTRING_PTR(line); lex_pend = lex_pbeg + RSTRING_LEN(line); lex_p = lex_pbeg + here->nd_nth; heredoc_end = ruby_sourceline; ruby_sourceline = nd_line(here); dispose_string(here->nd_lit); rb_gc_force_recycle((VALUE)here); ripper_flush(parser);}static intparser_whole_match_p(struct parser_params *parser, const char *eos, long len, int indent){ const char *p = lex_pbeg; long n; if (indent) { while (*p && ISSPACE(*p)) p++; } n = lex_pend - (p + len); if (n < 0) return FALSE; if (n > 0 && p[len] != '\n') { if (p[len] != '\r') return FALSE; if (n <= 1 || p[len+1] != '\n') return FALSE; } return strncmp(eos, p, len) == 0;}#define NUM_SUFFIX_R#define NUM_SUFFIX_I#define NUM_SUFFIX_ALLstatic intparser_number_literal_suffix(struct parser_params *parser, int mask){ int c, result = 0; const char *lastp = lex_p; while ((c = nextc()) != -1) { if ((mask & NUM_SUFFIX_I) && c == 'i') { result |= (mask & NUM_SUFFIX_I); mask &= ~NUM_SUFFIX_I; mask &= ~NUM_SUFFIX_R; continue; } if ((mask & NUM_SUFFIX_R) && c == 'r') { result |= (mask & NUM_SUFFIX_R); mask &= ~NUM_SUFFIX_R; continue; } if (!ISASCII(c) || ISALPHA(c) || c == '_') { lex_p = lastp; return 0; } pushback(c); break; } return result;}static intparser_set_number_literal(struct parser_params *parser, VALUE v, int type, int suffix){ if (suffix & NUM_SUFFIX_I) { v = rb_complex_raw(INT2FIX(0), v); type = tIMAGINARY; } set_yylval_literal(v); return type;}static intparser_set_integer_literal(struct parser_params *parser, VALUE v, int suffix){ int type = tINTEGER; if (suffix & NUM_SUFFIX_R) { v = rb_rational_raw1(v); type = tRATIONAL; } return set_number_literal(v, type, suffix);}#define dispatch_heredoc_end() static intparser_here_document(struct parser_params *parser, NODE *here){ int c, func, indent = 0; const char *eos, *p, *pend; long len; VALUE str = 0; rb_encoding *enc = current_enc; eos = RSTRING_PTR(here->nd_lit); len = RSTRING_LEN(here->nd_lit) - 1; indent = (func = *eos++) & STR_FUNC_INDENT; if ((c = nextc()) == -1) { error: compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos); restore: heredoc_restore(lex_strterm); return 0; } if (was_bol() && whole_match_p(eos, len, indent)) { dispatch_heredoc_end(); heredoc_restore(lex_strterm); return tSTRING_END; } if (!(func & STR_FUNC_EXPAND)) { do { p = RSTRING_PTR(lex_lastline); pend = lex_pend; if (pend > p) { switch (pend[-1]) { case '\n': if (--pend == p || pend[-1] != '\r') { pend++; break; } case '\r': --pend; } } rb_str_cat(str, p, pend - p); else str = STR_NEW(p, pend - p); if (pend < lex_pend) rb_str_cat(str, "\n", 1); lex_goto_eol(parser); if (nextc() == -1) { if (str) { dispose_string(str); str = 0; } goto error; } } while (!whole_match_p(eos, len, indent)); } else { newtok(); if (c == '#') { int t = parser_peek_variable_name(parser); if (t) return t; tokadd('#'); c = nextc(); } do { pushback(c); if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) { if (parser->eofp) goto error; goto restore; } if (c != '\n') { set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); flush_string_content(enc); return tSTRING_CONTENT; } tokadd(nextc()); if ((c = nextc()) == -1) goto error; } while (!whole_match_p(eos, len, indent)); str = STR_NEW3(tok(), toklen(), enc, func); } dispatch_heredoc_end(); heredoc_restore(lex_strterm); lex_strterm = NEW_STRTERM(-1, 0, 0); set_yylval_str(str); return tSTRING_CONTENT;}static voidarg_ambiguous_gen(struct parser_params *parser){ rb_warning0("ambiguous first argument; put parentheses or even spaces");}#define arg_ambiguous() static IDformal_argument_gen(struct parser_params *parser, ID lhs){ yyerror("formal argument must be local variable"); shadowing_lvar(lhs); return lhs;}static intlvar_defined_gen(struct parser_params *parser, ID id){ return (dyna_in_block() && dvar_defined_get(id)) || local_id(id);}static longparser_encode_length(struct parser_params *parser, const char *name, long len){ long nlen; if (len > 5 && name[nlen = len - 5] == '-') { return nlen; } if (len > 4 && name[nlen = len - 4] == '-') { return nlen; if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 && !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0)) return nlen; } return len;}static voidparser_set_encode(struct parser_params *parser, const char *name){ int idx = rb_enc_find_index(name); rb_encoding *enc; VALUE excargs[3]; if (idx < 0) { excargs[1] = rb_sprintf("unknown encoding name: %s", name); error: excargs[0] = rb_eArgError; excargs[2] = rb_make_backtrace(); rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline)); rb_exc_raise(rb_make_exception(3, excargs)); } enc = rb_enc_from_index(idx); if (!rb_enc_asciicompat(enc)) { excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc)); goto error; } parser->enc = enc; if (ruby_debug_lines) { VALUE lines = ruby_debug_lines; long i, n = RARRAY_LEN(lines); for (i = 0; i < n; ++i) { rb_enc_associate_index(RARRAY_AREF(lines, i), idx); } }}static intcomment_at_top(struct parser_params *parser){ const char *p = lex_pbeg, *pend = lex_p - 1; if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0; while (p < pend) { if (!ISSPACE(*p)) return 0; p++; } return 1;}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);static voidmagic_comment_encoding(struct parser_params *parser, const char *name, const char *val){ if (!comment_at_top(parser)) { return; } parser_set_encode(parser, val);}static voidparser_set_token_info(struct parser_params *parser, const char *name, const char *val){ int *p = &parser->parser_token_info_enabled; switch (*val) { case 't': case 'T': if (strcasecmp(val, "true") == 0) { *p = TRUE; return; } break; case 'f': case 'F': if (strcasecmp(val, "false") == 0) { *p = FALSE; return; } break; } rb_compile_warning(ruby_sourcefile, ruby_sourceline, "invalid value for %s: %s", name, val);}struct magic_comment { const char *name; rb_magic_comment_setter_t func; rb_magic_comment_length_t length;};static const struct magic_comment magic_comments[] = { {"coding", magic_comment_encoding, parser_encode_length}, {"encoding", magic_comment_encoding, parser_encode_length}, {"warn_indent", parser_set_token_info},};static const char *magic_comment_marker(const char *str, long len){ long i = 2; while (i < len) { switch (str[i]) { case '-': if (str[i-1] == '*' && str[i-2] == '-') { return str + i + 1; } i += 2; break; case '*': if (i + 1 >= len) return 0; if (str[i+1] != '-') { i += 4; } else if (str[i-1] != '-') { i += 2; } else { return str + i + 2; } break; default: i += 3; break; } } return 0;}static intparser_magic_comment(struct parser_params *parser, const char *str, long len){ VALUE name = 0, val = 0; const char *beg, *end, *vbeg, *vend;#define str_copy(_s, _p, _n) if (len <= 7) return FALSE; if (!(beg = magic_comment_marker(str, len))) return FALSE; if (!(end = magic_comment_marker(beg, str + len - beg))) return FALSE; str = beg; len = end - beg - 3; while (len > 0) { const struct magic_comment *p = magic_comments; char *s; int i; long n = 0; for (; len > 0 && *str; str++, --len) { switch (*str) { case '\'': case '"': case ':': case ';': continue; } if (!ISSPACE(*str)) break; } for (beg = str; len > 0; str++, --len) { switch (*str) { case '\'': case '"': case ':': case ';': break; default: if (ISSPACE(*str)) break; continue; } break; } for (end = str; len > 0 && ISSPACE(*str); str++, --len); if (!len) break; if (*str != ':') continue; do str++; while (--len > 0 && ISSPACE(*str)); if (!len) break; if (*str == '"') { for (vbeg = ++str; --len > 0 && *str != '"'; str++) { if (*str == '\\') { --len; ++str; } } vend = str; if (len) { --len; ++str; } } else { for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++); vend = str; } while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; n = end - beg; str_copy(name, beg, n); s = RSTRING_PTR(name); for (i = 0; i < n; ++i) { if (s[i] == '-') s[i] = '_'; } do { if (STRNCASECMP(p->name, s, n) == 0) { n = vend - vbeg; if (p->length) { n = (*p->length)(parser, vbeg, n); } str_copy(val, vbeg, n); (*p->func)(parser, s, RSTRING_PTR(val)); break; } } while (++p < magic_comments + numberof(magic_comments)); } return TRUE;}static voidset_file_encoding(struct parser_params *parser, const char *str, const char *send){ int sep = 0; const char *beg = str; VALUE s; for (;;) { if (send - str <= 6) return; switch (str[6]) { case 'C': case 'c': str += 6; continue; case 'O': case 'o': str += 5; continue; case 'D': case 'd': str += 4; continue; case 'I': case 'i': str += 3; continue; case 'N': case 'n': str += 2; continue; case 'G': case 'g': str += 1; continue; case '=': case ':': sep = 1; str += 6; break; default: str += 6; if (ISSPACE(*str)) break; continue; } if (STRNCASECMP(str-6, "coding", 6) == 0) break; } for (;;) { do { if (++str >= send) return; } while (ISSPACE(*str)); if (sep) break; if (*str != '=' && *str != ':') return; sep = 1; str++; } beg = str; while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send); s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg)); parser_set_encode(parser, RSTRING_PTR(s)); rb_str_resize(s, 0);}static voidparser_prepare(struct parser_params *parser){ int c = nextc(); switch (c) { case '#': if (peek('!')) parser->has_shebang = 1; break; case 0xef: if (lex_pend - lex_p >= 2 && (unsigned char)lex_p[0] == 0xbb && (unsigned char)lex_p[1] == 0xbf) { parser->enc = rb_utf8_encoding(); lex_p += 2; lex_pbeg = lex_p; return; } break; case EOF: return; } pushback(c); parser->enc = rb_enc_get(lex_lastline);}#define IS_ARG() #define IS_END() #define IS_BEG() #define IS_SPCARG(c) #define IS_LABEL_POSSIBLE() #define IS_LABEL_SUFFIX(n) #define IS_AFTER_OPERATOR() #define ambiguous_operator(op, syn) #define warn_balanced(op, syn) static intparse_numvar(struct parser_params *parser){ size_t len; int overflow; unsigned long n = ruby_scan_digits(tok()+1, toklen()-1, 10, &len, &overflow); const unsigned long nth_ref_max = ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1; if (overflow || n > nth_ref_max) { rb_warnS("`%s' is too big for a number variable, always nil", tok()); return 0; } else { return (int)n; }}static intparser_yylex(struct parser_params *parser){ register int c; int space_seen = 0; int cmd_state; enum lex_state_e last_state; rb_encoding *enc; int mb; if (lex_strterm) { int token; if (nd_type(lex_strterm) == NODE_HEREDOC) { token = here_document(lex_strterm); if (token == tSTRING_END) { lex_strterm = 0; lex_state = EXPR_END; } } else { token = parse_string(lex_strterm); if (token == tSTRING_END || token == tREGEXP_END) { rb_gc_force_recycle((VALUE)lex_strterm); lex_strterm = 0; lex_state = EXPR_END; } } return token; } cmd_state = command_start; command_start = FALSE; retry: last_state = lex_state; switch (c = nextc()) { case '\0': case '\004': case '\032': case -1: return 0; case ' ': case '\t': case '\f': case '\r': case '\13': space_seen = 1; goto retry; case '#': if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) { if (comment_at_top(parser)) { set_file_encoding(parser, lex_p, lex_pend); } } lex_p = lex_pend; case '\n': if (IS_lex_state(EXPR_BEG | EXPR_VALUE | EXPR_CLASS | EXPR_FNAME | EXPR_DOT | EXPR_LABELARG)) { if (IS_lex_state(EXPR_LABELARG) && parser->parser_in_kwarg) { goto normal_newline; } goto retry; } while ((c = nextc())) { switch (c) { case ' ': case '\t': case '\f': case '\r': case '\13': space_seen = 1; break; case '.': { if ((c = nextc()) != '.') { pushback(c); pushback('.'); goto retry; } } default: --ruby_sourceline; lex_nextline = lex_lastline; case -1: lex_goto_eol(parser); goto normal_newline; } } normal_newline: command_start = TRUE; lex_state = EXPR_BEG; return '\n'; case '*': if ((c = nextc()) == '*') { if ((c = nextc()) == '=') { set_yylval_id(tPOW); lex_state = EXPR_BEG; return tOP_ASGN; } pushback(c); if (IS_SPCARG(c)) { rb_warning0("`**' interpreted as argument prefix"); c = tDSTAR; } else if (IS_BEG()) { c = tDSTAR; } else { warn_balanced("**", "argument prefix"); c = tPOW; } } else { if (c == '=') { set_yylval_id('*'); lex_state = EXPR_BEG; return tOP_ASGN; } pushback(c); if (IS_SPCARG(c)) { rb_warning0("`*' interpreted as argument prefix"); c = tSTAR; } else if (IS_BEG()) { c = tSTAR; } else { warn_balanced("*", "argument prefix"); c = '*'; } } lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; return c; case '!': c = nextc(); if (IS_AFTER_OPERATOR()) { lex_state = EXPR_ARG; if (c == '@') { return '!'; } } else { lex_state = EXPR_BEG; } if (c == '=') { return tNEQ; } if (c == '~') { return tNMATCH; } pushback(c); return '!'; case '=': if (was_bol()) { if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) { for (;;) { lex_goto_eol(parser); c = nextc(); if (c == -1) { compile_error(PARSER_ARG "embedded document meets end of file"); return 0; } if (c != '=') continue; if (strncmp(lex_p, "end", 3) == 0 && (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) { break; } } lex_goto_eol(parser); goto retry; } } lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; if ((c = nextc()) == '=') { if ((c = nextc()) == '=') { return tEQQ; } pushback(c); return tEQ; } if (c == '~') { return tMATCH; } else if (c == '>') { return tASSOC; } pushback(c); return '='; case '<': last_state = lex_state; c = nextc(); if (c == '<' && !IS_lex_state(EXPR_DOT | EXPR_CLASS) && !IS_END() && (!IS_ARG() || space_seen)) { int token = heredoc_identifier(); if (token) return token; } if (IS_AFTER_OPERATOR()) { lex_state = EXPR_ARG; } else { command_start = TRUE; lex_state = EXPR_BEG; } if (c == '=') { if ((c = nextc()) == '>') { return tCMP; } pushback(c); return tLEQ; } if (c == '<') { if ((c = nextc()) == '=') { set_yylval_id(tLSHFT); lex_state = EXPR_BEG; return tOP_ASGN; } pushback(c); warn_balanced("<<", "here document"); return tLSHFT; } pushback(c); return '<'; case '>': lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; if ((c = nextc()) == '=') { return tGEQ; } if (c == '>') { if ((c = nextc()) == '=') { set_yylval_id(tRSHFT); lex_state = EXPR_BEG; return tOP_ASGN; } pushback(c); return tRSHFT; } pushback(c); return '>'; case '"': lex_strterm = NEW_STRTERM(str_dquote, '"', 0); return tSTRING_BEG; case '`': if (IS_lex_state(EXPR_FNAME)) { lex_state = EXPR_ENDFN; return c; } if (IS_lex_state(EXPR_DOT)) { lex_state = EXPR_CMDARG; else lex_state = EXPR_ARG; return c; } lex_strterm = NEW_STRTERM(str_xquote, '`', 0); return tXSTRING_BEG; case '\'': lex_strterm = NEW_STRTERM(str_squote, '\'', 0); return tSTRING_BEG; case '?': if (IS_END()) { lex_state = EXPR_VALUE; return '?'; } c = nextc(); if (c == -1) { compile_error(PARSER_ARG "incomplete character syntax"); return 0; } if (rb_enc_isspace(c, current_enc)) { if (!IS_ARG()) { int c2 = 0; switch (c) { case ' ': c2 = 's'; break; case '\n': c2 = 'n'; break; case '\t': c2 = 't'; break; case '\v': c2 = 'v'; break; case '\r': c2 = 'r'; break; case '\f': c2 = 'f'; break; } if (c2) { rb_warnI("invalid character syntax; use ?\\%c", c2); } } ternary: pushback(c); lex_state = EXPR_VALUE; return '?'; } newtok(); enc = current_enc; if (!parser_isascii()) { if (tokadd_mbchar(c) == -1) return 0; } else if ((rb_enc_isalnum(c, current_enc) || c == '_') && lex_p < lex_pend && is_identchar(lex_p, lex_pend, current_enc)) { goto ternary; } else if (c == '\\') { if (peek('u')) { nextc(); c = parser_tokadd_utf8(parser, &enc, 0, 0, 0); if (0x80 <= c) { tokaddmbc(c, enc); } else { tokadd(c); } } else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) { nextc(); if (tokadd_mbchar(c) == -1) return 0; } else { c = read_escape(0, &enc); tokadd(c); } } else { tokadd(c); } tokfix(); set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0)); lex_state = EXPR_END; return tCHAR; case '&': if ((c = nextc()) == '&') { lex_state = EXPR_BEG; if ((c = nextc()) == '=') { set_yylval_id(tANDOP); lex_state = EXPR_BEG; return tOP_ASGN; } pushback(c); return tANDOP; } else if (c == '=') { set_yylval_id('&'); lex_state = EXPR_BEG; return tOP_ASGN; } pushback(c); if (IS_SPCARG(c)) { rb_warning0("`&' interpreted as argument prefix"); c = tAMPER; } else if (IS_BEG()) { c = tAMPER; } else { warn_balanced("&", "argument prefix"); c = '&'; } lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; return c; case '|': if ((c = nextc()) == '|') { lex_state = EXPR_BEG; if ((c = nextc()) == '=') { set_yylval_id(tOROP); lex_state = EXPR_BEG; return tOP_ASGN; } pushback(c); return tOROP; } if (c == '=') { set_yylval_id('|'); lex_state = EXPR_BEG; return tOP_ASGN; } lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; pushback(c); return '|'; case '+': c = nextc(); if (IS_AFTER_OPERATOR()) { lex_state = EXPR_ARG; if (c == '@') { return tUPLUS; } pushback(c); return '+'; } if (c == '=') { set_yylval_id('+'); lex_state = EXPR_BEG; return tOP_ASGN; } if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { lex_state = EXPR_BEG; pushback(c); if (c != -1 && ISDIGIT(c)) { c = '+'; goto start_num; } return tUPLUS; } lex_state = EXPR_BEG; pushback(c); warn_balanced("+", "unary operator"); return '+'; case '-': c = nextc(); if (IS_AFTER_OPERATOR()) { lex_state = EXPR_ARG; if (c == '@') { return tUMINUS; } pushback(c); return '-'; } if (c == '=') { set_yylval_id('-'); lex_state = EXPR_BEG; return tOP_ASGN; } if (c == '>') { lex_state = EXPR_ENDFN; return tLAMBDA; } if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { lex_state = EXPR_BEG; pushback(c); if (c != -1 && ISDIGIT(c)) { return tUMINUS_NUM; } return tUMINUS; } lex_state = EXPR_BEG; pushback(c); warn_balanced("-", "unary operator"); return '-'; case '.': lex_state = EXPR_BEG; if ((c = nextc()) == '.') { if ((c = nextc()) == '.') { return tDOT3; } pushback(c); return tDOT2; } pushback(c); if (c != -1 && ISDIGIT(c)) { yyerror("no .<digit> floating literal anymore; put 0 before dot"); } lex_state = EXPR_DOT; return '.'; start_num: case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { int is_float, seen_point, seen_e, nondigit; int suffix; is_float = seen_point = seen_e = nondigit = 0; lex_state = EXPR_END; newtok(); if (c == '-' || c == '+') { tokadd(c); c = nextc(); } if (c == '0') {#define no_digits() int start = toklen(); c = nextc(); if (c == 'x' || c == 'X') { c = nextc(); if (c != -1 && ISXDIGIT(c)) { do { if (c == '_') { if (nondigit) break; nondigit = c; continue; } if (!ISXDIGIT(c)) break; nondigit = 0; tokadd(c); } while ((c = nextc()) != -1); } pushback(c); tokfix(); if (toklen() == start) { no_digits(); } else if (nondigit) goto trailing_uc; suffix = number_literal_suffix(NUM_SUFFIX_ALL); return set_integer_literal(rb_cstr_to_inum(tok(), 16, FALSE), suffix); } if (c == 'b' || c == 'B') { c = nextc(); if (c == '0' || c == '1') { do { if (c == '_') { if (nondigit) break; nondigit = c; continue; } if (c != '0' && c != '1') break; nondigit = 0; tokadd(c); } while ((c = nextc()) != -1); } pushback(c); tokfix(); if (toklen() == start) { no_digits(); } else if (nondigit) goto trailing_uc; suffix = number_literal_suffix(NUM_SUFFIX_ALL); return set_integer_literal(rb_cstr_to_inum(tok(), 2, FALSE), suffix); } if (c == 'd' || c == 'D') { c = nextc(); if (c != -1 && ISDIGIT(c)) { do { if (c == '_') { if (nondigit) break; nondigit = c; continue; } if (!ISDIGIT(c)) break; nondigit = 0; tokadd(c); } while ((c = nextc()) != -1); } pushback(c); tokfix(); if (toklen() == start) { no_digits(); } else if (nondigit) goto trailing_uc; suffix = number_literal_suffix(NUM_SUFFIX_ALL); return set_integer_literal(rb_cstr_to_inum(tok(), 10, FALSE), suffix); } if (c == '_') { goto octal_number; } if (c == 'o' || c == 'O') { c = nextc(); if (c == -1 || c == '_' || !ISDIGIT(c)) { no_digits(); } } if (c >= '0' && c <= '7') { octal_number: do { if (c == '_') { if (nondigit) break; nondigit = c; continue; } if (c < '0' || c > '9') break; if (c > '7') goto invalid_octal; nondigit = 0; tokadd(c); } while ((c = nextc()) != -1); if (toklen() > start) { pushback(c); tokfix(); if (nondigit) goto trailing_uc; suffix = number_literal_suffix(NUM_SUFFIX_ALL); return set_integer_literal(rb_cstr_to_inum(tok(), 8, FALSE), suffix); } if (nondigit) { pushback(c); goto trailing_uc; } } if (c > '7' && c <= '9') { invalid_octal: yyerror("Invalid octal digit"); } else if (c == '.' || c == 'e' || c == 'E') { tokadd('0'); } else { pushback(c); suffix = number_literal_suffix(NUM_SUFFIX_ALL); return set_integer_literal(INT2FIX(0), suffix); } } for (;;) { switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': nondigit = 0; tokadd(c); break; case '.': if (nondigit) goto trailing_uc; if (seen_point || seen_e) { goto decode_num; } else { int c0 = nextc(); if (c0 == -1 || !ISDIGIT(c0)) { pushback(c0); goto decode_num; } c = c0; } seen_point = toklen(); tokadd('.'); tokadd(c); is_float++; nondigit = 0; break; case 'e': case 'E': if (nondigit) { pushback(c); c = nondigit; goto decode_num; } if (seen_e) { goto decode_num; } nondigit = c; c = nextc(); if (c != '-' && c != '+' && !ISDIGIT(c)) { pushback(c); nondigit = 0; goto decode_num; } tokadd(nondigit); seen_e++; is_float++; tokadd(c); nondigit = (c == '-' || c == '+') ? c : 0; break; case '_': if (nondigit) goto decode_num; nondigit = c; break; default: goto decode_num; } c = nextc(); } decode_num: pushback(c); if (nondigit) { char tmp[30]; trailing_uc: snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit); yyerror(tmp); } tokfix(); if (is_float) { int type = tFLOAT; VALUE v; suffix = number_literal_suffix(seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL); if (suffix & NUM_SUFFIX_R) { char *point = &tok()[seen_point]; size_t fraclen = toklen()-seen_point-1; type = tRATIONAL; memmove(point, point+1, fraclen+1); v = rb_cstr_to_inum(tok(), 10, FALSE); v = rb_rational_new(v, rb_int_positive_pow(10, fraclen)); } else { double d = strtod(tok(), 0); if (errno == ERANGE) { rb_warningS("Float %s out of range", tok()); errno = 0; } v = DBL2NUM(d); } return set_number_literal(v, type, suffix); } suffix = number_literal_suffix(NUM_SUFFIX_ALL); return set_integer_literal(rb_cstr_to_inum(tok(), 10, FALSE), suffix); } case ')': case '] __pad16__ |
stmt_or_begin __pad5__ |
command_call __pad9__ |
keyword_next call_args |
primary_value tCOLON2 operation2 command_args cmd_brace_block = method_arg($$, $4) |
keyword_yield command_args |
command_call |
opt_block_param compstmt |
else |
keyword_not opt_nl expr |
Definition at line 1292 of file ripper.y.
Referenced by rb_str_format().
keyword_BEGIN |
mlhs_node keyword_variable |
command_asgn lhs |
Definition at line 1270 of file ripper.y.
Referenced by formal_argument_gen(), new_op_assign_gen(), and node_assign_gen().
tSTAR mlhs_node |
ONIG_EXTERN OnigCaseFoldType OnigDefaultCaseFoldFlag |
Definition at line 122 of file ripper.y.
Referenced by onig_get_default_case_fold_flag(), and onig_set_default_case_fold_flag().
ONIG_EXTERN const OnigSyntaxType* OnigDefaultSyntax |
Definition at line 417 of file ripper.y.
Referenced by make_regexp(), onig_set_default_syntax(), rb_reg_prepare_re(), and rb_reg_to_s().
ONIG_EXTERN const unsigned short OnigEncAsciiCtypeTable[] |
ONIG_EXTERN const UChar OnigEncAsciiToLowerCaseTable[] |
ONIG_EXTERN const UChar OnigEncAsciiToUpperCaseTable[] |
ONIG_EXTERN OnigEncoding OnigEncDefaultCharEncoding |
Definition at line 180 of file ripper.y.
Referenced by onigenc_get_default_encoding().
ONIG_EXTERN const UChar OnigEncISO_8859_1_ToLowerCaseTable[] |
ONIG_EXTERN const UChar OnigEncISO_8859_1_ToUpperCaseTable[] |
ONIG_EXTERN OnigEncodingType OnigEncodingASCII |
ONIG_EXTERN const OnigSyntaxType OnigSyntaxASIS |
ONIG_EXTERN const OnigSyntaxType OnigSyntaxEmacs |
ONIG_EXTERN const OnigSyntaxType OnigSyntaxGnuRegex |
ONIG_EXTERN const OnigSyntaxType OnigSyntaxGrep |
ONIG_EXTERN const OnigSyntaxType OnigSyntaxJava |
ONIG_EXTERN const OnigSyntaxType OnigSyntaxPerl |
ONIG_EXTERN const OnigSyntaxType OnigSyntaxPerl58 |
ONIG_EXTERN const OnigSyntaxType OnigSyntaxPerl58_NG |
ONIG_EXTERN const OnigSyntaxType OnigSyntaxPosixBasic |
ONIG_EXTERN const OnigSyntaxType OnigSyntaxPosixExtended |
ONIG_EXTERN const OnigSyntaxType OnigSyntaxPython |
ONIG_EXTERN const OnigSyntaxType OnigSyntaxRuby |
pure parser lex param |
Definition at line 696 of file ripper.y.
Referenced by check_exec_redirect(), ole_invoke(), ole_invoke2(), ole_method_params(), run_exec_open(), and unnamed_parameters().
RUBY_EXTERN VALUE rb_argv0 |
Definition at line 682 of file ripper.y.
Referenced by if(), Init_tcltklib(), ruby_open_tk_dll(), and ruby_tcltk_stubs().
RUBY_EXTERN VALUE rb_cArray |
RUBY_EXTERN VALUE rb_cBasicObject |
Definition at line 1560 of file ripper.y.
Referenced by class_init_copy_check(), Init_class_hierarchy(), Init_GC(), Init_Object(), Init_VM(), Init_vm_eval(), rb_class_initialize(), rb_class_superclass(), rb_clear_method_cache_by_class(), and rb_obj_alloc().
RUBY_EXTERN VALUE rb_cBignum |
RUBY_EXTERN VALUE rb_cBinding |
Definition at line 1564 of file ripper.y.
Referenced by binding_dup(), Init_Binding(), proc_binding(), and rb_vm_make_binding().
RUBY_EXTERN VALUE rb_cClass |
Definition at line 1565 of file ripper.y.
Referenced by Init_class_hierarchy(), Init_eval(), Init_Object(), make_metaclass(), rb_check_inheritable(), rb_class_boot(), and rb_include_class_new().
RUBY_EXTERN VALUE rb_cComplex |
RUBY_EXTERN VALUE rb_cCont |
RUBY_EXTERN VALUE rb_cData |
Definition at line 1568 of file ripper.y.
Referenced by compat_allocator_table(), if(), Init_Exception(), Init_Object(), Init_stringio(), Init_transcode(), Init_win32ole(), marshal_dump(), marshal_load(), pruby_register_instance(), rb_execarg_new(), rsock_init_addrinfo(), and rsock_init_sockifaddr().
RUBY_EXTERN VALUE rb_cDir |
RUBY_EXTERN VALUE rb_cEncoding |
RUBY_EXTERN VALUE rb_cEncoding |
RUBY_EXTERN VALUE rb_cEnumerator |
RUBY_EXTERN VALUE rb_cFalseClass |
Definition at line 1569 of file ripper.y.
Referenced by Init_Object(), rb_class_of(), and special_singleton_class_of().
RUBY_EXTERN VALUE rb_cFile |
Definition at line 1572 of file ripper.y.
Referenced by argf_next_argv(), console_dev(), copy_stream_body(), Init_Dir(), Init_IO(), path_atime(), path_basename(), path_chmod(), path_chown(), path_ctime(), path_dirname(), path_expand_path(), path_extname(), path_fnmatch(), path_ftype(), path_lchmod(), path_lchown(), path_lstat(), path_make_link(), path_make_symlink(), path_mtime(), path_open(), path_readlink(), path_realdirpath(), path_realpath(), path_rename(), path_split(), path_stat(), path_truncate(), path_utime(), pty_getpty(), pty_open(), rb_f_open(), rb_file_open(), rb_file_open_str(), rb_io_fdopen(), rb_io_open(), rb_io_open_with_args(), and unlink_rescue().
RUBY_EXTERN VALUE rb_cFixnum |
Definition at line 1573 of file ripper.y.
Referenced by generate_json(), Init_Numeric(), k_fixnum_p(), negative_int_p(), positive_int_p(), rb_class_of(), and vm_redefinition_check_flag().
RUBY_EXTERN VALUE rb_cFloat |
Definition at line 1574 of file ripper.y.
Referenced by generate_json(), Init_Complex(), Init_Numeric(), Init_Rational(), k_float_p(), opt_eq_func(), rb_class_of(), rb_float_new_in_heap(), and vm_redefinition_check_flag().
RUBY_EXTERN VALUE rb_cHash |
Definition at line 1575 of file ripper.y.
Referenced by cState_from_state_s(), generate_json(), has_extra_methods(), Init_Hash(), make_compile_option(), rb_hash_new(), rb_hash_to_h(), vm_redefinition_check_flag(), and w_object().
RUBY_EXTERN VALUE rb_cInteger |
Definition at line 1576 of file ripper.y.
Referenced by host_str(), Init_Bignum(), Init_Numeric(), Init_Rational(), k_integer_p(), range_max(), rb_check_to_integer(), and rb_to_integer().
RUBY_EXTERN VALUE rb_cIO |
Definition at line 1577 of file ripper.y.
Referenced by console_dev(), Init_File(), Init_IO(), Init_nonblock(), Init_stringio(), Init_wait(), InitVM_console(), parse(), path_binread(), path_binwrite(), path_each_line(), path_read(), path_readlines(), path_sysopen(), path_write(), pipe_open(), pty_open(), rb_dlptr_s_to_ptr(), rb_f_open(), rb_fiddle_ptr_s_to_ptr(), rb_io_fdopen(), and rsock_init_basicsocket().
RUBY_EXTERN VALUE rb_cMatch |
RUBY_EXTERN VALUE rb_cMethod |
Definition at line 1579 of file ripper.y.
Referenced by Init_Proc(), rb_obj_method(), rb_obj_public_method(), rb_obj_singleton_method(), and umethod_bind().
RUBY_EXTERN VALUE rb_cModule |
Definition at line 1580 of file ripper.y.
Referenced by check_match(), Init_class_hierarchy(), Init_eval(), Init_eval_method(), Init_load(), Init_Object(), Init_Proc(), Init_vm_eval(), rb_mod_s_constants(), rb_module_new(), rb_thread_pending_interrupt_p(), and rb_tmp_class_path().
RUBY_EXTERN VALUE rb_cNameErrorMesg |
RUBY_EXTERN VALUE rb_cNilClass |
Definition at line 1582 of file ripper.y.
Referenced by Init_Complex(), Init_Object(), Init_Rational(), rb_class_of(), and special_singleton_class_of().
RUBY_EXTERN VALUE rb_cNumeric |
Definition at line 1583 of file ripper.y.
Referenced by case_when_optimizable_literal(), Init_bigdecimal(), Init_Complex(), Init_Numeric(), Init_Rational(), k_numeric_p(), linear_object_p(), range_max(), range_size(), range_step(), range_step_size(), rb_ary_bsearch(), rb_check_to_float(), and rb_to_float().
RUBY_EXTERN VALUE rb_cObject |
Definition at line 1561 of file ripper.y.
Referenced by boot_defclass(), classname(), compile_colon2(), compile_cpath(), debug_lines(), defined_expr(), fc_path(), find_class_path(), Init_Array(), Init_Binding(), Init_bubblebabble(), Init_class_hierarchy(), Init_Complex(), Init_Cont(), Init_cparse(), Init_date_core(), Init_dbm(), Init_digest(), Init_Dir(), Init_dlcfunc(), Init_dlhandle(), Init_dlptr(), Init_Encoding(), Init_Exception(), Init_fiddle_closure(), Init_fiddle_function(), Init_fiddle_handle(), Init_fiddle_pointer(), Init_File(), Init_GC(), Init_gdbm(), Init_generator(), Init_Hash(), Init_IO(), Init_ISeq(), Init_md5(), Init_Numeric(), Init_Object(), Init_objspace(), Init_ossl_asn1(), Init_ossl_bn(), Init_ossl_cipher(), Init_ossl_config(), Init_ossl_hmac(), Init_ossl_ns_spki(), Init_ossl_pkcs12(), Init_ossl_pkcs7(), Init_ossl_pkey(), Init_ossl_ssl(), Init_ossl_ssl_session(), Init_ossl_x509attr(), Init_ossl_x509cert(), Init_ossl_x509crl(), Init_ossl_x509ext(), Init_ossl_x509name(), Init_ossl_x509req(), Init_ossl_x509revoked(), Init_ossl_x509store(), Init_parser(), Init_pathname(), Init_Proc(), Init_process(), Init_psych_emitter(), Init_psych_parser(), Init_psych_to_ruby(), Init_psych_yaml_tree(), Init_Random(), Init_Range(), Init_Rational(), Init_readline(), Init_Regexp(), Init_rmd160(), Init_sdbm(), Init_sha1(), Init_String(), Init_strscan(), Init_Struct(), Init_tcltklib(), Init_thread(), Init_Thread(), Init_Time(), Init_tkutil(), Init_top_self(), Init_VM(), Init_vm_backtrace(), Init_vm_trace(), Init_win32ole(), Init_zlib(), InitVM_Enumerator(), iseq_compile_each(), process_options(), range_dumper(), range_loader(), rb_alias(), rb_catch(), rb_class_inherited(), rb_class_initialize(), rb_clear_method_cache_by_class(), rb_const_defined_0(), rb_const_get_0(), rb_const_set(), rb_define_class(), rb_define_class_id(), rb_define_global_const(), rb_define_module(), rb_execarg_fixup(), rb_export_method(), rb_f_catch(), rb_method_entry_make(), rb_mod_const_defined(), rb_mod_const_get(), rb_mod_const_of(), rb_mod_modfunc(), rb_path_to_class(), rb_set_class_path(), rb_set_class_path_string(), rb_uninterruptible(), rb_using_module(), rsock_init_ancdata(), rsock_init_sockopt(), ruby_Init_Continuation_body(), ruby_init_loadpath_safe(), ruby_init_prelude(), save_env(), set_relation(), top_define_method(), top_include(), top_private(), top_public(), uninitialized_constant(), vm_search_const_defined_class(), vm_set_main_stack(), and vm_set_top_stack().
RUBY_EXTERN VALUE rb_cProc |
Definition at line 1584 of file ripper.y.
Referenced by Init_Proc(), proc_dup(), rb_block_lambda(), rb_block_proc(), vm_callee_setup_arg_complex(), vm_make_proc_from_block(), vm_make_proc_with_iseq(), vm_yield_setup_block_args(), and vm_yield_with_cfunc().
RUBY_EXTERN VALUE rb_cRandom |
Definition at line 1585 of file ripper.y.
Referenced by Init_Random(), rb_ary_sample(), rb_ary_shuffle_bang(), and try_get_rnd().
RUBY_EXTERN VALUE rb_cRange |
Definition at line 1586 of file ripper.y.
Referenced by Init_Range(), range_eq(), range_eql(), rb_range_new(), and rb_range_values().
RUBY_EXTERN VALUE rb_cRational |
Definition at line 1587 of file ripper.y.
Referenced by Init_Rational(), k_rational_p(), nurat_f_rational(), rb_Rational(), rb_rational_new(), and rb_rational_raw().
RUBY_EXTERN VALUE rb_cRegexp |
Definition at line 1589 of file ripper.y.
Referenced by Init_generator(), vm_redefinition_check_flag(), and w_object().
RUBY_EXTERN VALUE rb_cStat |
RUBY_EXTERN VALUE rb_cString |
Definition at line 1591 of file ripper.y.
Referenced by generate_json(), Init_Complex(), Init_pack(), Init_Rational(), Init_String(), Init_transcode(), intern_str(), opt_eq_func(), rb_any_cmp(), rb_dlptr_s_to_ptr(), rb_enc_str_new(), rb_enc_vsprintf(), rb_fiddle_ptr_s_to_ptr(), rb_file_join(), rb_hash_aset(), rb_id2str(), rb_str_b(), rb_str_buf_new(), rb_str_new(), rb_str_resurrect(), rb_str_to_s(), rb_sym_to_s(), require_libraries(), setup_fake_str(), vm_redefinition_check_flag(), w_object(), zstream_detach_buffer(), zstream_detach_input(), zstream_expand_buffer(), and zstream_shift_buffer().
RUBY_EXTERN VALUE rb_cStruct |
Definition at line 1592 of file ripper.y.
Referenced by Init_etc(), Init_process(), Init_Struct(), rb_struct_define(), rb_struct_define_under(), and struct_ivar_get().
RUBY_EXTERN VALUE rb_cSymbol |
Definition at line 1593 of file ripper.y.
Referenced by Init_String(), rb_class_of(), and vm_redefinition_check_flag().
RUBY_EXTERN VALUE rb_cThread |
Definition at line 1594 of file ripper.y.
Referenced by Init_Thread(), Init_VM(), Init_vm_backtrace(), Init_vm_trace(), and rb_thread_create().
RUBY_EXTERN VALUE rb_cTime |
Definition at line 1595 of file ripper.y.
Referenced by asn1time_to_time(), check_type_val2variant(), date_to_time(), datetime_to_time(), discrete_object_p(), Init_date_core(), linear_object_p(), ole_val2variant(), ossl_ssl_session_get_time(), ossl_ssl_session_set_time(), ossl_sslctx_flush_sessions(), vm_redefinition_check_flag(), and vtdate2rbtime().
RUBY_EXTERN VALUE rb_cTrueClass |
Definition at line 1596 of file ripper.y.
Referenced by Init_Object(), rb_class_of(), and special_singleton_class_of().
RUBY_EXTERN VALUE rb_cUnboundMethod |
Definition at line 1597 of file ripper.y.
Referenced by Init_Proc(), method_unbind(), rb_mod_instance_method(), and rb_mod_public_instance_method().
RUBY_EXTERN VALUE rb_default_rs |
Definition at line 519 of file ripper.y.
Referenced by argf_getline(), Init_IO(), prepare_getline_args(), rb_gets(), rb_io_getline_1(), rb_io_gets(), rb_io_puts(), rb_p(), rb_str_chomp_bang(), and rb_str_enumerate_lines().
RUBY_EXTERN VALUE rb_eArgError |
RUBY_EXTERN VALUE rb_eEncCompatError |
RUBY_EXTERN VALUE rb_eEncodingError |
RUBY_EXTERN VALUE rb_eEOFError |
Definition at line 1606 of file ripper.y.
Referenced by argf_getpartial(), copy_stream_fallback(), gzfile_read_raw(), gzfile_readpartial(), Init_IO(), rb_eof_error(), rb_gzreader_readbyte(), rb_gzreader_readchar(), and rb_gzreader_readline().
RUBY_EXTERN VALUE rb_eException |
RUBY_EXTERN VALUE rb_eFatal |
RUBY_EXTERN VALUE rb_eFloatDomainError |
Definition at line 1621 of file ripper.y.
Referenced by BigDecimal_to_i(), dbl2big(), Init_Numeric(), rb_cstr_to_rat(), string_to_r(), string_to_r_strict(), and VpException().
RUBY_EXTERN VALUE rb_eIndexError |
RUBY_EXTERN VALUE rb_eInterrupt |
RUBY_EXTERN VALUE rb_eIOError |
Definition at line 1611 of file ripper.y.
Referenced by argf_write_io(), check_modifiable(), copy_stream_body(), dir_closed(), finish_writeconv(), get_strio(), Init_IO(), Init_Thread(), io_close(), io_getc(), io_ungetbyte(), rb_io_check_byte_readable(), rb_io_check_char_readable(), rb_io_check_closed(), rb_io_check_initialized(), rb_io_check_writable(), rb_io_close_read(), rb_io_close_write(), rb_io_each_codepoint(), rb_io_sysread(), rb_io_sysseek(), rb_io_ungetc(), rb_io_wait_readable(), rb_io_wait_writable(), rb_thread_wait_fd_rw(), readable(), readline_readline(), remain_size(), rsock_s_recvfrom(), rsock_s_recvfrom_nonblock(), strio_close(), strio_close_read(), strio_close_write(), strio_seek(), strio_size(), and writable().
RUBY_EXTERN VALUE rb_eKeyError |
RUBY_EXTERN VALUE rb_eLoadError |
RUBY_EXTERN VALUE rb_eLocalJumpError |
RUBY_EXTERN VALUE rb_eMathDomainError |
Definition at line 1633 of file ripper.y.
Referenced by BigDecimal_power(), BigMath_s_log(), and Init_Math().
RUBY_EXTERN VALUE rb_eNameError |
RUBY_EXTERN VALUE rb_eNoMemError |
RUBY_EXTERN VALUE rb_eNoMethodError |
RUBY_EXTERN VALUE rb_eNotImpError |
RUBY_EXTERN VALUE rb_eRangeError |
RUBY_EXTERN VALUE rb_eRegexpError |
Definition at line 1624 of file ripper.y.
Referenced by Init_Regexp(), rb_enc_reg_error_desc(), rb_reg_preprocess_dregexp(), and rb_reg_raise().
RUBY_EXTERN VALUE rb_eRuntimeError |
RUBY_EXTERN VALUE rb_eScriptError |
RUBY_EXTERN VALUE rb_eSecurityError |
RUBY_EXTERN VALUE rb_eSignal |
RUBY_EXTERN VALUE rb_eStandardError |
RUBY_EXTERN VALUE rb_eStopIteration |
RUBY_EXTERN VALUE rb_eSyntaxError |
RUBY_EXTERN VALUE rb_eSysStackError |
RUBY_EXTERN VALUE rb_eSystemCallError |
RUBY_EXTERN VALUE rb_eSystemExit |
RUBY_EXTERN VALUE rb_eThreadError |
RUBY_EXTERN VALUE rb_eTypeError |
RUBY_EXTERN VALUE rb_eZeroDivError |
Definition at line 1617 of file ripper.y.
Referenced by BigDecimal_DoDivmod(), Init_Numeric(), and rb_num_zerodiv().
RUBY_EXTERN VALUE rb_fs |
Definition at line 516 of file ripper.y.
Referenced by Init_String(), proc_options(), and rb_str_split_m().
RUBY_EXTERN VALUE rb_mComparable |
RUBY_EXTERN VALUE rb_mEnumerable |
RUBY_EXTERN VALUE rb_mErrno |
RUBY_EXTERN VALUE rb_mFileTest |
Definition at line 1553 of file ripper.y.
Referenced by path_blockdev_p(), path_chardev_p(), path_directory_p(), path_executable_p(), path_executable_real_p(), path_exist_p(), path_file_p(), path_grpowned_p(), path_owned_p(), path_pipe_p(), path_readable_p(), path_readable_real_p(), path_setgid_p(), path_setuid_p(), path_size(), path_size_p(), path_socket_p(), path_sticky_p(), path_symlink_p(), path_world_readable_p(), path_world_writable_p(), path_writable_p(), path_writable_real_p(), and path_zero_p().
RUBY_EXTERN VALUE rb_mGC |
RUBY_EXTERN VALUE rb_mKernel |
Definition at line 1549 of file ripper.y.
Referenced by Init_eval(), Init_eval_method(), Init_GC(), Init_IO(), Init_Object(), Init_Proc(), Init_vm_eval(), InitVM_Enumerator(), rb_clear_method_cache_by_class(), and rb_define_global_function().
RUBY_EXTERN VALUE rb_mMath |
Definition at line 1555 of file ripper.y.
Referenced by float_arg(), Init_Math(), and numeric_arg().
RUBY_EXTERN VALUE rb_mProcess |
Definition at line 1556 of file ripper.y.
Referenced by ruby_prog_init(), and set_arg0().
RUBY_EXTERN VALUE rb_mWaitReadable |
Definition at line 1557 of file ripper.y.
Referenced by Init_IO(), Init_ossl_ssl(), and rb_readwrite_sys_fail().
RUBY_EXTERN VALUE rb_mWaitWritable |
Definition at line 1558 of file ripper.y.
Referenced by Init_IO(), Init_ossl_ssl(), and rb_readwrite_sys_fail().
RUBY_EXTERN VALUE rb_output_fs |
RUBY_EXTERN VALUE rb_output_rs |
Definition at line 520 of file ripper.y.
Referenced by Init_IO(), proc_options(), and rb_io_print().
RUBY_EXTERN VALUE rb_rs |
Definition at line 518 of file ripper.y.
Referenced by argf_getline(), gzreader_gets(), Init_IO(), prepare_getline_args(), proc_options(), rb_gets(), rb_str_chomp_bang(), rb_str_enumerate_lines(), and strio_getline().
RUBY_EXTERN VALUE rb_stderr |
Definition at line 1635 of file ripper.y.
Referenced by Init_IO(), load_lock(), rb_f_abort(), rb_io_s_popen(), rb_stdio_set_default_encoding(), rb_warn_m(), rb_write_error2(), and rb_write_error_str().
RUBY_EXTERN VALUE rb_stdin |
Definition at line 1635 of file ripper.y.
Referenced by argf_close(), argf_next_argv(), Init_IO(), load_file_internal(), and rb_stdio_set_default_encoding().
RUBY_EXTERN VALUE rb_stdout |
Definition at line 1635 of file ripper.y.
Referenced by argf_next_argv(), gc_profile_report(), Init_IO(), process_options(), rb_f_p_internal(), rb_f_print(), rb_f_printf(), rb_f_putc(), rb_f_puts(), rb_io_getbyte(), rb_io_s_popen(), rb_obj_display(), rb_p(), and rb_stdio_set_default_encoding().
const signed char ruby_digit36_to_number_table[] |
Definition at line 58 of file util.c.
Referenced by hex2num(), and ruby_scan_digits().
RUBY_EXTERN char* ruby_sourcefile |
RUBY_EXTERN int ruby_sourceline |
RUBY_SYMBOL_EXPORT_BEGIN typedef unsigned long st_data_t |
Definition at line 20 of file ripper.y.
Referenced by add_opt_method(), autoload_data(), autoload_defined_p(), autoload_delete(), class_instance_method_list(), classname(), clone_const(), constat_delete(), constat_handle(), constat_reset(), cv_i(), cvar_lookup_at(), define_final0(), delete_unique_str(), enc_alias_internal(), enc_dup_name(), enc_names(), enc_register_at(), enc_set_default_encoding(), eql_i(), fc_i(), fc_path(), features_index_add_single(), find_class_path(), flatten(), freeobj_i(), generic_ivar_defined(), generic_ivar_get(), generic_ivar_remove(), generic_ivar_set(), get_keys(), get_syserr(), get_transcoder_entry(), get_values(), hash_foreach_call(), hash_foreach_ensure(), include_modules_at(), Init_VM(), Init_w32_codepage(), iseq_build_from_ary_body(), iseq_compile_each(), iseq_data_to_ary(), iseq_load(), kwmerge_i(), load_lock(), load_unlock(), lookup_allocation_info(), lookup_method_table(), lookup_rollback_func(), make_transcoder_entry(), make_unique_str(), mark_const_tbl(), mark_hash(), mark_m_tbl_wrapper(), mark_set(), mark_tbl(), mod_cvar_at(), move_refined_method(), newobj_i(), obj_alloc_by_klass(), obj_ivar_each(), object_allocations_reporter(), ole_vstr2wc(), onig_st_insert_strend(), onig_st_lookup_strend(), parse_exp(), r_copy_ivar(), r_entry0(), r_fixup_compat(), r_object0(), r_prepare(), r_symlink(), r_symreal(), rb_alias_variable(), rb_ary_and(), rb_ary_or(), rb_autoload(), rb_check_deadlock(), rb_check_exec_env(), rb_check_exec_options(), rb_check_id(), rb_check_id_cstr(), rb_class_path_cached(), rb_clear_trace_func(), rb_const_defined_0(), rb_const_get_0(), rb_const_remove(), rb_const_set(), rb_copy_generic_ivar(), rb_cvar_get(), rb_cvar_set(), rb_econv_asciicompat_encoding(), rb_enc_aliases(), rb_enc_name_list(), rb_enc_registered(), rb_execarg_extract_options(), rb_execarg_fixup(), rb_extract_keywords(), rb_f_untrace_var(), rb_feature_p(), rb_free_generic_ivar(), rb_fstring(), rb_gc_copy_finalizer(), rb_gc_unprotect_logging(), rb_generic_ivar_memsize(), rb_generic_ivar_table(), rb_get_kwargs(), rb_global_entry(), rb_hash_aref(), rb_hash_delete_key(), rb_hash_fetch_m(), rb_hash_lookup2(), rb_hash_rehash_i(), rb_id2str(), rb_intern3(), rb_intern_str(), rb_ivar_count(), rb_ivar_defined(), rb_ivar_foreach(), rb_ivar_lookup(), rb_ivar_set(), rb_mark_generic_ivar(), rb_marshal_define_compat(), rb_method_entry_make(), rb_mod_const_at(), rb_mod_init_copy(), rb_mod_remove_cvar(), rb_obj_freeze(), rb_obj_remove_instance_variable(), rb_obj_singleton_methods(), rb_objspace_call_finalizer(), rb_prepend_module(), rb_singleton_class_clone_and_attach(), rb_st_copy(), rb_st_insert_id_and_value(), rb_str_free(), rb_thread_atfork_internal(), rb_thread_terminate_all(), rb_tmp_class_path(), rb_undefine_finalizer(), rb_vm_check_redefinition_by_prepend(), rb_vm_check_redefinition_opt_method(), rb_waitpid(), reachable_objects_from(), register_init_ext(), register_label(), register_symid_str(), remove_method(), ruby_init_ext(), ruby_register_rollback_func_for_ensure(), run_final(), set_const_visibility(), set_syserr(), socklist_delete(), socklist_insert(), socklist_lookup(), st_foreach(), st_foreach_check(), st_foreach_safe(), st_hash(), st_update(), sv_i(), syserr_initialize(), tbl_update(), thgroup_list(), thread_create_core(), threadptr_local_aref(), time_mload(), transcode_search_path(), transcode_search_path_i(), unknown_keyword_error(), unpack_entries(), val2dispatch(), validate_labels(), vm_get_ev_const(), vm_getivar(), vm_setivar(), w_class(), w_encoding(), w_ivar(), w_object(), w_objivar(), w_symbol(), wmap_aref(), wmap_aset(), wmap_aset_update(), wmap_each(), wmap_each_key(), wmap_each_value(), wmap_final_func(), wmap_finalize(), wmap_keys(), wmap_mark(), wmap_memsize(), wmap_values(), zone_str(), and zone_str_update().
error stmt |
stmts terms stmt_or_begin |
primary_value tCOLON2 operation2 command_args prec tLOWEST |
return tOP_ASGN |
Definition at line 7812 of file ripper.y.
Referenced by if(), and parser_yylex().
error top_stmt |
Definition at line 7790 of file ripper.y.
Referenced by if(), and parser_yylex().
mlhs_head tSTAR |
return tSYMBEG |
Definition at line 7786 of file ripper.y.
Referenced by parser_yylex().