Ruby
2.0.0p594(2014-10-27revision48167)
|
#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 | 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 | timeval |
struct | timespec |
struct | timezone |
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_classext_struct |
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 | |
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 tINTEGER tPOW arg{$$=dispatch3(binary, $2, ripper_intern("**"), $4);$$=dispatch2(unary, ripper_intern("-@"),$$);}|tUMINUS_NUM tFLOAT 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: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;}lambda_body{lpar_beg=$ < num >2;$$=dispatch2(lambda, $3, $5);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:tINTEGER|tFLOAT|tUMINUS_NUM tINTEGER%prec tLOWEST{$$=dispatch2(unary, ripper_intern("-@"), $2);}|tUMINUS_NUM tFLOAT%prec tLOWEST{$$=dispatch2(unary, ripper_intern("-@"), $2);};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;}|f_args term{$$=$1;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_kw:tLABEL arg_value{arg_var(formal_argument(get_id($1)));$$=assignable($1, $2);$$=rb_assoc_new($$, $2);};f_block_kw:tLABEL primary_value{arg_var(formal_argument(get_id($1)));$$=assignable($1, $2);$$=rb_assoc_new($$, $2);};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:tIDENTIFIER '='arg_value{arg_var(formal_argument(get_id($1)));$$=assignable($1, $3);$$=rb_assoc_new($$, $3);};f_block_opt:tIDENTIFIER '='primary_value{arg_var(formal_argument(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 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(lines) ->klass=0;for(i=0;i < n;i++) RARRAY_PTR(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_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'&&peek('\n')){lex_p++;c= '\n';}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 char 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;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||(n > 0 &&p[len]!= '\n'&&p[len]!= '\r')) return FALSE;return strncmp(eos, p, len)==0;}#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);lex_strterm=0;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){long i, n=RARRAY_LEN(ruby_debug_lines);const VALUE *p=RARRAY_PTR(ruby_debug_lines);for(i=0;i< n;++i){rb_enc_associate_index(*p, 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 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)) { 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; 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; set_yylval_literal(rb_cstr_to_inum(tok(), 16, FALSE)); return tINTEGER; } 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; set_yylval_literal(rb_cstr_to_inum(tok(), 2, FALSE)); return tINTEGER; } 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; set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); return tINTEGER; } 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; set_yylval_literal(rb_cstr_to_inum(tok(), 8, FALSE)); return tINTEGER; } 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); set_yylval_literal(INT2FIX(0)); return tINTEGER; } } 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; } tokadd('.'); tokadd(c); is_float++; seen_point++; nondigit = 0; break; case 'e': case 'E': if (nondigit) { pushback(c); c = nondigit; goto decode_num; } if (seen_e) { goto decode_num; } tokadd(c); seen_e++; is_float++; nondigit = c; c = nextc(); if (c != '-' && c != '+') continue; tokadd(c); nondigit = c; 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) { double d = strtod(tok(), 0); if (errno == ERANGE) { rb_warningS("Float%s out of range", tok()); errno = 0; } set_yylval_literal(DBL2NUM(d)); return tFLOAT; } set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); return tINTEGER; } 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 |
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)) |
#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 |
#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<<(1<<ID_SCOPE_SHIFT)) & ~(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_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)) |
Definition at line 441 of file ripper.y.
Referenced by rb_ulong2num_inline().
#define new_const_op_assign | ( | lhs, | |
op, | |||
rhs | |||
) | new_const_op_assign_gen(parser, (lhs), (op), (rhs)) |
#define new_op_assign | ( | lhs, | |
op, | |||
rhs | |||
) | new_op_assign_gen(parser, (lhs), (op), (rhs)) |
Definition at line 486 of file ripper.y.
Referenced by rb_int2num_inline().
#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)) |
#define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ |
#define NODE_STRTERM NODE_ZARRAY /* nothing to gc */ |
#define parse_string | ( | n | ) | parser_parse_string(parser,(n)) |
#define PARSER_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 376 of file ripper.y.
Referenced by rb_int2num_inline(), and rb_ulong2num_inline().
#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 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 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_method_ids |
enum ruby_special_consts |
enum ruby_value_type |
enum st_retval |
enum yytokentype |
RUBY_EXTERN double acosh | ( | double | ) |
Definition at line 36 of file acosh.c.
Referenced by math_acosh().
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 | ( | void | rb_quad_packchar *, VALUE | ) |
DEPRECATED | ( | VALUE | rb_quad_unpackconst char *, int | ) |
DEPRECATED | ( | VALUE | rb_f_lambdavoid | ) |
DEPRECATED | ( | void | rb_thread_pollingvoid | ) |
DEPRECATED | ( | int | rb_thread_selectint, fd_set *, fd_set *, fd_set *, struct timeval * | ) |
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(), and rb_cloexec_dup2().
|
static |
|
static |
|
static |
dyna_pop | ( | $< vars > | ) |
|
static |
|
static |
RUBY_EXTERN int eaccess | ( | const char * | , |
int | |||
) |
Definition at line 1079 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 rb_big_pow().
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 7609 of file ripper.y.
References brace_nest, and tSTRING_DEND.
Definition at line 7624 of file ripper.y.
References lex_state, pushback, and warn_balanced.
Definition at line 7649 of file ripper.y.
References lex_state, set_yylval_id, and tOP_ASGN.
Definition at line 7655 of file ripper.y.
References arg_ambiguous, lex_strterm, NEW_STRTERM, str_regexp, tREGEXP_BEG, and void.
Definition at line 2461 of file vm.c.
Referenced by ruby_setup().
Definition at line 1652 of file vm_method.c.
Referenced by Init_eval().
Definition at line 1039 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 946 of file vm_backtrace.c.
Referenced by Init_VM().
Definition at line 1944 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(), double2timeval(), 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_interval_step_size(), nurat_div(), 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(), 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(), 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 | ( | PRINTF_ARGS(void rb_compile_bug(const char *, int, const char *,...), 3, 4) | ) |
NORETURN | ( | void | rb_async_bug_errnoconst char *, int | ) |
NORETURN | ( | void | rb_load_failVALUE, const char * | ) |
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 | ( | void | rb_memerrorvoid | ) |
NORETURN | ( | void | rb_num_zerodivvoid | ) |
NORETURN | ( | void | rb_insecure_operationvoid | ) |
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_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 | ) |
Definition at line 1824 of file numeric.c.
Referenced by int_downto_size(), int_upto_size(), num_step_size(), range_size(), and range_step_size().
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 | ( | void | ruby_debug_printfconst char *,..., |
1 | , | ||
2 | |||
) |
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 | ( | 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,...) | ) |
void rb_add_event_hook | ( | rb_event_hook_func_t | func, |
rb_event_flag_t | events, | ||
VALUE | data | ||
) |
Definition at line 135 of file vm_trace.c.
Referenced by ole_initialize(), rb_set_coverages(), and set_trace_func().
Definition at line 1203 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 863 of file variable.c.
Referenced by Init_load(), and m_core_set_variable_alias().
Definition at line 393 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(), and rb_reg_inspect().
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 744 of file vm_eval.c.
Referenced by exec_callback(), and if().
Definition at line 2792 of file object.c.
Referenced by dir_entries(), range_last(), rb_f_array(), and readline_attempted_completion_function().
Definition at line 1160 of file encoding.c.
rb_encoding* rb_ascii8bit_encoding | ( | void | ) |
Definition at line 1151 of file encoding.c.
Definition at line 817 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 1122 of file variable.c.
Referenced by 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_equal(), exc_to_s(), exit_status(), exit_success_p(), gzfile_error_inspect(), ignore_closed_stream(), inspect_enumerator(), lazy_drop_func(), lazy_drop_while_func(), lazy_take_func(), lazy_zip_arrays_func(), lazy_zip_func(), name_err_name(), name_err_to_s(), 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(), rb_using_module(), readline_attempted_completion_function(), readline_s_get_completion_case_fold(), readline_s_get_completion_proc(), reg_compile_gen(), slicebefore_i(), sockopt_data(), sockopt_family_m(), sockopt_level(), sockopt_optname(), stop_result(), syserr_eqq(), syserr_errno(), vm_call0_body(), and vm_getivar().
Definition at line 1604 of file variable.c.
Referenced by rb_dl_init_callbacks(), and rb_mod_autoload().
Definition at line 1765 of file variable.c.
Referenced by rb_const_get_0(), and vm_get_ev_const().
Definition at line 1810 of file variable.c.
Referenced by rb_mod_autoload_p().
|
static |
Definition at line 830 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 836 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 766 of file vm_backtrace.c.
Referenced by load_lock(), and rescue_callback().
Definition at line 413 of file vm_backtrace.c.
Referenced by exc_backtrace(), rb_check_backtrace(), and set_backtrace().
Definition at line 750 of file vm_backtrace.c.
Referenced by rb_vm_bugreport().
Definition at line 586 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 322 of file proc.c.
Referenced by call_trace_func(), Init_VM(), and rb_f_binding().
Definition at line 1119 of file vm_eval.c.
Referenced by argf_each_byte(), argf_each_char(), argf_each_codepoint(), argf_each_line(), chunk_i(), enum_all(), enum_any(), enum_chunk(), enum_collect(), enum_count(), enum_cycle(), enum_drop(), enum_drop_while(), enum_each_cons(), enum_each_entry(), enum_each_slice(), enum_each_with_index(), enum_each_with_object(), enum_find(), enum_find_all(), enum_find_index(), enum_first(), enum_flat_map(), enum_grep(), enum_group_by(), enum_inject(), enum_max(), enum_max_by(), enum_member(), enum_min(), enum_min_by(), enum_minmax(), enum_minmax_by(), enum_none(), enum_one(), enum_partition(), enum_reject(), enum_slice_before(), enum_sort_by(), enum_take(), enum_take_while(), enum_to_a(), enum_zip(), enumerator_block_call(), fdbm_replace(), fdbm_update(), fgdbm_replace(), fgdbm_update(), fsdbm_replace(), fsdbm_update(), join_der(), lazy_drop(), lazy_drop_while(), lazy_flat_map(), lazy_flat_map_each(), lazy_grep(), lazy_init_block_i(), lazy_initialize(), lazy_map(), lazy_reject(), lazy_select(), lazy_take(), lazy_take_while(), lazy_zip(), next_i(), ole_invoke(), ossl_pkcs7_set_certificates(), ossl_pkcs7_set_crls(), ossl_sslctx_setup(), ossl_x509name_initialize(), path_each_entry(), path_each_line(), path_open(), path_opendir(), path_s_glob(), path_sub(), range_each(), range_first(), range_step(), rb_ary_sort_by_bang(), save_env(), and slicebefore_i().
Definition at line 472 of file proc.c.
Referenced by Init_Proc(), Init_VM(), rb_f_lambda(), and rb_mod_define_method().
Definition at line 458 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(), 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 273 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 exec_recursive(), rb_catch(), and rb_f_catch().
Definition at line 301 of file re.c.
Referenced by parser_regx_options(), and reg_fragment_setenc_gen().
Definition at line 1141 of file vm_eval.c.
Referenced by take_items().
Definition at line 2413 of file object.c.
Referenced by ary_join_1(), check_exec_redirect_fd(), 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 408 of file vm_eval.c.
Referenced by convert_type(), enum_size(), enumerator_rewind(), 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 461 of file hash.c.
Referenced by get_hash(), 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 113 of file safe.c.
Referenced by constant_arg(), env_has_value(), env_rassoc(), rb_check_safe_str(), and rb_dlcfunc_call().
Definition at line 1509 of file string.c.
Referenced by ary_join_1(), constant_arg(), env_has_value(), env_rassoc(), 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_mod_const_get(), 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 2732 of file object.c.
Referenced by rand_random(), and rand_range().
Definition at line 2463 of file object.c.
Referenced by exit_initialize().
Definition at line 2443 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 389 of file variable.c.
Referenced by method_inspect(), mnew(), pst_inspect(), r_object0(), rb_define_class_id_under(), rb_define_module_id_under(), rb_io_s_new(), rb_mod_define_method(), rb_mod_remove_method(), rb_obj_alloc(), rb_obj_classname(), rb_thread_current_status(), rb_vm_bugreport(), remove_method(), thread_s_new(), and umethod_bind().
Definition at line 1503 of file object.c.
Referenced by Init_Object(), r_object0(), rb_mod_cmp(), rb_mod_define_method(), rb_mod_ge(), rb_mod_lt(), and rb_threadptr_pending_interrupt_include_p().
Definition at line 383 of file variable.c.
Referenced by cannot_be_coerced_into_BigDecimal(), dir_inspect(), error_print(), exc_inspect(), exc_to_s(), inspect_struct(), mString_to_json_raw_object(), name_err_mesg_to_str(), name_err_to_s(), rb_any_to_s(), rb_class2name(), 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_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(), set_const_visibility(), uninitialized_constant(), and w_extended().
Definition at line 1794 of file object.c.
Referenced by console_dev(), copy_stream_body(), each_entry_i(), float_value(), glob_i(), 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_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 261 of file variable.c.
Referenced by class2path(), ossl_cipher_init(), and rb_class_name().
Definition at line 171 of file object.c.
Referenced by class2path(), make_singleton_class(), 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 613 of file object.c.
Referenced by umethod_bind().
Definition at line 1824 of file object.c.
Referenced by get_digest_base_metadata(), Init_Object(), and ossl_asn1_default_tag().
Definition at line 46 of file vm_method.c.
Referenced by rb_include_module(), rb_prepend_module(), and top_using().
Definition at line 64 of file vm_method.c.
Referenced by obj_free(), set_const_visibility(), and set_method_visibility().
Definition at line 215 of file vm_trace.c.
Referenced by ruby_finalize_0(), and ruby_options().
Definition at line 225 of file io.c.
Referenced by ossl_obj2bio(), pty_getpty(), and ruby_dup().
Definition at line 232 of file io.c.
Referenced by io_reopen(), and rb_io_reopen().
Definition at line 308 of file io.c.
Referenced by rb_cloexec_dup(), and rb_cloexec_fcntl_dupfd().
Definition at line 209 of file io.c.
Referenced by chfunc(), console_dev(), fill_random_seed(), get_device_once(), load_file_internal(), rb_file_load_ok(), and sysopen_func().
Referenced by rb_execarg_run_options().
Definition at line 2103 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 2109 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 2097 of file variable.c.
Definition at line 1876 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_get(), save_env(), set_argv(), syserr_eqq(), syserr_initialize(), vm_get_ev_const(), and vm_set_main_stack().
Definition at line 1882 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_get(), and rb_path_to_class().
Definition at line 1870 of file variable.c.
Definition at line 2017 of file variable.c.
Referenced by rb_mod_constants(), and rb_mod_s_constants().
Definition at line 1938 of file variable.c.
Referenced by rb_mod_remove_const(), and ruby_init_prelude().
Definition at line 2141 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 2400 of file object.c.
Referenced by addrinfo_mload(), cParser_initialize(), cState_configure(), iseq_build_from_ary_body(), iseq_build_from_ary_exception(), m_core_hash_merge_kwd(), nucomp_s_convert(), 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 1047 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(), time_mdump(), and time_mload().
Definition at line 2561 of file object.c.
Referenced by JSON_parse_float(), rb_str_to_dbl(), and str2num().
Definition at line 1934 of file vm_eval.c.
Referenced by eval_string_with_cref(), f_current_dirname(), and rb_f_require_relative().
Definition at line 2409 of file variable.c.
Definition at line 2391 of file variable.c.
Referenced by rb_mod_cvar_defined(), and rb_mod_remove_cvar().
Definition at line 2364 of file variable.c.
Referenced by rb_cv_get(), and rb_mod_cvar_get().
Definition at line 2331 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 722 of file gc.c.
Referenced by iow_newobj().
VALUE rb_dbl_cmp | ( | double | , |
double | |||
) |
rb_encoding* rb_default_external_encoding | ( | void | ) |
Definition at line 1286 of file encoding.c.
rb_encoding* rb_default_internal_encoding | ( | void | ) |
Definition at line 1371 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_curses(), Init_date_core(), Init_dbm(), Init_digest(), Init_Dir(), Init_dlcfunc(), Init_dlhandle(), Init_dlptr(), 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_struct_define_without_accessor(), rb_undef_alloc_func(), rsock_init_addrinfo(), and setup_struct().
Definition at line 2419 of file variable.c.
Definition at line 2204 of file variable.c.
Referenced by Init_bigdecimal(), Init_Complex(), Init_cparse(), Init_curses(), 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_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_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 400 of file encoding.c.
Definition at line 2218 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 575 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 600 of file variable.c.
Referenced by Init_IO().
Definition at line 594 of file variable.c.
Referenced by Init_IO(), Init_String(), and ruby_prog_init().
Definition at line 606 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 1015 of file process.c.
Referenced by proc_detach(), and pty_detach_process().
Definition at line 1786 of file transcode.c.
Referenced by econv_s_asciicompat_encoding(), and make_writeconv().
void rb_econv_binmode | ( | rb_econv_t * | ec | ) |
Definition at line 1934 of file transcode.c.
Referenced by rb_io_binmode().
void rb_econv_check_error | ( | rb_econv_t * | ec | ) |
Definition at line 4194 of file transcode.c.
Referenced by fill_cbuf(), gzfile_getc(), and rb_econv_substr_append().
void rb_econv_close | ( | rb_econv_t * | ec | ) |
Definition at line 1702 of file transcode.c.
Referenced by allocate_converted_string(), clear_readconv(), clear_writeconv(), econv_free(), gzfile_reset(), rb_econv_open(), rb_econv_open_by_transcoder_entries(), rb_econv_open_opts(), rb_io_ascii8bit_binmode(), RUBY_ALIAS_FUNCTION(), 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 1446 of file transcode.c.
Referenced by allocate_converted_string(), econv_primitive_convert(), fill_cbuf(), finish_writeconv(), gzfile_getc(), rb_econv_substr_append(), RUBY_ALIAS_FUNCTION(), and transcode_loop().
int rb_econv_decorate_at_first | ( | rb_econv_t * | ec, |
const char * | decorator_name | ||
) |
Definition at line 1900 of file transcode.c.
int rb_econv_decorate_at_last | ( | rb_econv_t * | ec, |
const char * | decorator_name | ||
) |
Definition at line 1917 of file transcode.c.
Referenced by rb_econv_open().
const char* rb_econv_encoding_to_insert_output | ( | rb_econv_t * | ec | ) |
Definition at line 1503 of file transcode.c.
Referenced by econv_insert_output(), make_replacement(), rb_econv_insert_output(), and rb_econv_set_replacement().
Definition at line 3150 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 1587 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 4188 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 1067 of file transcode.c.
Referenced by allocate_converted_string(), and rb_econv_open_opts().
Definition at line 2028 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 2570 of file transcode.c.
Referenced by econv_init(), gzfile_reset(), make_readconv(), make_writeconv(), rb_gzfile_ecopts(), RUBY_ALIAS_FUNCTION(), and transcode_loop().
Definition at line 2519 of file transcode.c.
Referenced by io_encoding_set(), rb_econv_prepare_opts(), and rb_io_extract_modeenc().
Definition at line 2564 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 1753 of file transcode.c.
Referenced by econv_putback(), and fill_cbuf().
int rb_econv_putbackable | ( | rb_econv_t * | ec | ) |
Definition at line 1742 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 2190 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 1857 of file transcode.c.
VALUE rb_econv_str_convert | ( | rb_econv_t * | ec, |
VALUE | src, | ||
int | flags | ||
) |
Definition at line 1869 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 1813 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 1863 of file transcode.c.
int rb_enc_ascget | ( | const char * | p, |
const char * | e, | ||
int * | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 910 of file encoding.c.
VALUE rb_enc_associate | ( | VALUE | , |
rb_encoding * | |||
) |
Definition at line 766 of file encoding.c.
Definition at line 748 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 778 of file encoding.c.
int rb_enc_codelen | ( | int | code, |
rb_encoding * | enc | ||
) |
Definition at line 954 of file encoding.c.
unsigned int rb_enc_codepoint | ( | const char * | p, |
const char * | e, | ||
rb_encoding * | enc | ||
) |
Definition at line 948 of file encoding.c.
unsigned int rb_enc_codepoint_len | ( | const char * | p, |
const char * | e, | ||
int * | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 933 of file encoding.c.
rb_encoding* rb_enc_compatible | ( | VALUE | , |
VALUE | |||
) |
Definition at line 789 of file encoding.c.
Definition at line 856 of file encoding.c.
Definition at line 1300 of file encoding.c.
Definition at line 1380 of file encoding.c.
|
inlinestatic |
Definition at line 235 of file ripper.y.
Referenced by gzfile_getc(), gzfile_newstr(), opt_enc_index(), rb_reg_initialize(), rb_str_check_dummy_enc(), and set_base_encoding().
int rb_enc_fast_mbclen | ( | const char * | p, |
const char * | e, | ||
rb_encoding * | enc | ||
) |
Definition at line 880 of file encoding.c.
rb_encoding* rb_enc_find | ( | const char * | name | ) |
Definition at line 659 of file encoding.c.
Definition at line 635 of file encoding.c.
VALUE rb_enc_from_encoding | ( | rb_encoding * | enc | ) |
Definition at line 103 of file encoding.c.
rb_encoding* rb_enc_from_index | ( | int | idx | ) |
Definition at line 548 of file encoding.c.
rb_encoding* rb_enc_get | ( | VALUE | ) |
Definition at line 772 of file encoding.c.
Definition at line 690 of file encoding.c.
int rb_enc_mbclen | ( | const char * | p, |
const char * | e, | ||
rb_encoding * | enc | ||
) |
Definition at line 886 of file encoding.c.
char* rb_enc_nth | ( | const char * | , |
const char * | , | ||
long | , | ||
rb_encoding * | |||
) |
Definition at line 1583 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 2841 of file file.c.
Referenced by check_dirname().
char* rb_enc_path_last_separator | ( | const char * | , |
const char * | , | ||
rb_encoding * | |||
) |
char* rb_enc_path_next | ( | const char * | , |
const char * | , | ||
rb_encoding * | |||
) |
Definition at line 2759 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 2773 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 898 of file encoding.c.
VALUE rb_enc_reg_new | ( | const char * | , |
long | , | ||
rb_encoding * | , | ||
int | |||
) |
Definition at line 2506 of file re.c.
Referenced by rb_reg_new().
int rb_enc_replicate | ( | const char * | , |
rb_encoding * | |||
) |
Definition at line 343 of file encoding.c.
Definition at line 1338 of file encoding.c.
Definition at line 1424 of file encoding.c.
Definition at line 741 of file encoding.c.
Definition at line 340 of file string.c.
Referenced by file_path_convert(), fnmatch_brace(), rb_enc_compatible(), 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 2078 of file string.c.
Referenced by rb_reg_regsub(), str_gsub(), and strio_write().
Definition at line 327 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_new_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_transcode0(), sym_check_asciionly(), and w_symbol().
VALUE rb_enc_str_new | ( | const char * | , |
long | , | ||
rb_encoding * | |||
) |
Definition at line 439 of file string.c.
Referenced by append_fspath(), compile_snprintf(), do_opendir(), econv_get_replacement(), fix_string_encoding(), fole_missing(), foletypelib_name(), foletypelib_path(), get_user_from_path(), io_getc(), lex_get_str(), ole_wc2vstr(), parser_str_new(), prepare_getline_args(), 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_upto(), rb_w32_conv_from_wchar(), register_symid(), strftimev(), strio_getc(), strio_init(), strio_substr(), strio_ungetc(), sym_inspect(), time_strftime(), and transcode_loop().
long rb_enc_strlen | ( | const char * | , |
const char * | , | ||
rb_encoding * | |||
) |
Definition at line 1025 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 970 of file encoding.c.
int rb_enc_toupper | ( | int | c, |
rb_encoding * | enc | ||
) |
Definition at line 964 of file encoding.c.
VALUE rb_enc_uint_chr | ( | unsigned int | code, |
rb_encoding * | enc | ||
) |
Definition at line 2439 of file numeric.c.
Referenced by int_chr(), and rb_io_ungetc().
int rb_enc_unicode_p | ( | rb_encoding * | enc | ) |
Definition at line 459 of file encoding.c.
VALUE rb_enc_vsprintf | ( | rb_encoding * | , |
const char * | , | ||
va_list | |||
) |
Definition at line 1223 of file sprintf.c.
Referenced by rb_enc_raise(), rb_enc_sprintf(), rb_loaderror(), rb_loaderror_with_path(), and rb_vsprintf().
Definition at line 398 of file enumerator.c.
Definition at line 407 of file enumerator.c.
Definition at line 2887 of file hash.c.
Referenced by Init_Hash(), and rb_execarg_run_options().
Definition at line 2356 of file hash.c.
Referenced by security().
Definition at line 67 of file object.c.
Referenced by cdhash_cmp(), eql_i(), hash_equal(), rb_any_cmp(), and recursive_eql().
Definition at line 56 of file object.c.
Referenced by assoc_i(), chunk_ii(), count_i(), eql_i(), exc_equal(), find_index_i(), hash_equal(), Init_Object(), key_i(), member_i(), name_err_mesg_equal(), num_div(), num_eql(), num_remainder(), num_step(), 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 1443 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 1383 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 1399 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 3056 of file process.c.
Referenced by chfunc(), rb_exec_without_timer_thread(), and rb_f_exec().
Definition at line 97 of file eval_jump.c.
Definition at line 4875 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 4898 of file thread.c.
Referenced by range_hash(), rb_ary_hash(), rb_hash_hash(), and rb_struct_hash().
Definition at line 4886 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 1645 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 1934 of file process.c.
Referenced by rb_io_s_popen().
Definition at line 2291 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 2238 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 2246 of file process.c.
Referenced by rb_exec_arg_init(), and rb_execarg_new().
Definition at line 2227 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 2909 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 2265 of file process.c.
Referenced by rb_io_s_popen().
Definition at line 584 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(), ruby_script(), and set_arg0().
Definition at line 590 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 569 of file string.c.
Referenced by dir_each(), dir_read(), 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().
Definition at line 3653 of file process.c.
Referenced by Init_process().
Definition at line 2424 of file process.c.
Referenced by Init_process().
Definition at line 3623 of file process.c.
Referenced by Init_process().
Definition at line 847 of file variable.c.
Referenced by Init_eval().
Definition at line 364 of file signal.c.
Referenced by Init_process().
Definition at line 70 of file vm_method.c.
Referenced by rb_add_method(), and rb_add_method_cfunc().
Definition at line 806 of file load.c.
Referenced by Init_load().
Definition at line 437 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 646 of file variable.c.
Referenced by Init_eval().
Definition at line 706 of file variable.c.
Referenced by Init_eval(), and rb_f_trace_var().
Definition at line 202 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 523 of file load.c.
Referenced by autoload_provided(), and rb_provided().
Definition at line 3368 of file file.c.
Referenced by rb_f_require_relative(), and rb_file_s_absolute_path().
Definition at line 5154 of file file.c.
Referenced by Init_Dir().
Definition at line 1144 of file file.c.
Referenced by Init_Dir(), Init_File(), and rb_f_test().
Definition at line 3803 of file file.c.
Referenced by f_current_dirname(), rb_f_require_relative(), and rb_file_s_dirname().
Definition at line 3325 of file file.c.
Referenced by expand_include_path(), rb_file_identical_p(), and rb_file_s_expand_path().
Definition at line 3332 of file file.c.
Referenced by rb_construct_expanded_load_path(), and rb_feature_provided().
Definition at line 2961 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 5270 of file file.c.
Referenced by rb_f_load(), rb_find_file_ext_safe(), and rb_find_file_safe().
Definition at line 5491 of file io.c.
Referenced by gzfile_s_open(), and iseq_s_compile_file().
Definition at line 3388 of file file.c.
Referenced by Init_File().
Definition at line 3355 of file file.c.
Referenced by Init_File().
Definition at line 1237 of file encoding.c.
rb_encoding* rb_filesystem_encoding | ( | void | ) |
Definition at line 1246 of file encoding.c.
Definition at line 614 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 201 of file encoding.c.
Definition at line 5382 of file file.c.
Referenced by rb_f_load(), and rb_load().
Definition at line 5313 of file file.c.
Referenced by rb_find_file_ext(), and search_required().
Definition at line 5388 of file file.c.
Referenced by rb_find_file(), and search_required().
Definition at line 2568 of file numeric.c.
Referenced by fix_to_s(), ole_typedesc2val(), and rb_big2str0().
Definition at line 2673 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().
|
inlinestatic |
Definition at line 790 of file ripper.y.
Referenced by BigDecimal_to_f(), callback(), generic_to_value(), JSON_parse_float(), ole_variant2val(), rand_random(), rand_range(), and vtdate2rbtime().
VALUE rb_float_new_in_heap | ( | double | ) |
Definition at line 648 of file numeric.c.
Referenced by rb_float_new().
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 1028 of file variable.c.
Referenced by obj_free(), and rb_copy_generic_ivar().
Calls a method.
recv | receiver of the method |
mid | an ID that represents the name of the method |
n | the number of arguments |
... | arbitrary number of method arguments |
Definition at line 773 of file vm_eval.c.
Referenced by !RTEST(), add(), argument_error(), BigDecimal_power(), BigDecimal_to_i(), BigDecimal_to_r(), binomial_coefficient(), bsock_setsockopt(), call_next(), callback(), chunk_i(), chunk_ii(), cmp(), cmp_eq_recursive(), cmp_ge(), cmp_gt(), cmp_le(), cmp_lt(), code_page(), coerce_body(), const_missing(), convert_encoding(), copy_stream_fallback_body(), cParser_initialize(), cState_aref(), cState_aset(), cState_from_state_s(), default_inspect(), descending_factorial(), dir_inspect(), divmodv(), DupPrivPKeyPtr(), enum_cycle_size(), enum_each_cons_size(), enum_each_slice_size(), enum_find(), enum_zip(), eq(), error_print(), evs_length(), exc_message(), f_add(), f_cmp(), f_div(), f_eqeq_p(), f_ge_p(), f_gt_p(), f_le_p(), f_lt_p(), f_minus_one_p(), f_mul(), f_negative_p(), f_odd_p(), f_one_p(), f_sub(), f_to_f(), f_to_i(), f_zero_p(), fix_and(), fix_or(), fix_pow(), fix_xor(), flo_pow(), flo_quo(), fole_s_show_help(), foleparam_inspect(), foletype_s_ole_classes(), foletypelib_s_typelibs(), folevariable_inspect(), folevariant_value(), function_call(), generate_json(), generate_json_bignum(), generate_json_float(), generate_json_object(), generate_json_string(), generic_to_value(), get_backtrace(), GetConfigPtr(), GetPrivPKeyPtr(), GetVpValueWithPrec(), grep_i(), grep_iter_i(), gzfile_close(), gzfile_read_raw_partial(), gzfile_read_raw_rescue(), gzfile_reader_rewind(), gzfile_write_raw(), hash_default_value(), hidden_identity_hash_new(), if(), Init_generator(), Init_parser(), Init_syslog(), Init_win32ole(), initialize(), inject_op_i(), int_dotimes(), int_dotimes_size(), int_downto(), int_even_p(), int_odd_p(), int_round_0(), int_upto(), io_reader(), io_write(), is_negative(), is_one(), is_zero(), JSON_parse_array(), JSON_parse_object(), JSON_parse_string(), lazy_drop_size(), lazy_flat_map_func(), lazy_flat_map_to_ary(), lazy_grep_func(), lazy_grep_iter(), lazy_map_func(), lazy_reject_func(), lazy_select_func(), lazy_zip_arrays_func(), lazy_zip_func(), lexer_iter(), load_file_internal(), make_exception(), make_no_method_exception(), match_i(), max_by_i(), max_i(), min_by_i(), min_i(), minmax_by_i(), minmax_by_i_update(), minmax_i(), minmax_i_update(), mlambda(), mnew(), mObject_to_json(), mod(), mString_Extend_json_create(), mString_included_s(), mString_to_json_raw_object(), mul(), negate_lit(), negative_int_p(), num_abs(), num_div(), num_equal(), num_fdiv(), num_interval_step_size(), num_modulo(), num_nonzero_p(), num_quo(), num_remainder(), num_step(), num_to_int(), num_uminus(), nurat_div(), ole_invoke(), ole_typelib_from_itypeinfo(), ossl_call_client_cert_cb(), ossl_call_session_get_cb(), ossl_call_session_new_cb(), ossl_call_session_remove_cb(), ossl_call_tmp_dh_callback(), ossl_call_verify_cb_proc(), ossl_pkey_sign(), ossl_ssl_close(), ossl_ssl_initialize(), ossl_ssl_read_internal(), ossl_ssl_session_get_time(), ossl_ssl_session_set_time(), ossl_ssl_write_internal(), ossl_sslctx_flush_sessions(), ossl_to_der(), ossl_x509attr_get_value(), ossl_x509attr_initialize(), ossl_x509ext_initialize(), ossl_x509store_verify(), parse(), parse_main(), path_atime(), path_basename(), path_blockdev_p(), path_chardev_p(), path_chmod(), path_chown(), path_ctime(), path_directory_p(), path_dirname(), path_entries(), path_executable_p(), path_executable_real_p(), path_exist_p(), path_expand_path(), path_extname(), path_file_p(), path_fnmatch(), path_ftype(), path_grpowned_p(), path_lchmod(), path_lchown(), path_lstat(), path_make_link(), path_make_symlink(), path_mkdir(), path_mtime(), path_owned_p(), path_pipe_p(), path_readable_p(), path_readable_real_p(), path_readlink(), path_realdirpath(), path_realpath(), path_rename(), path_rmdir(), path_s_getwd(), path_setgid_p(), path_setuid_p(), path_size(), path_size_p(), path_socket_p(), path_split(), path_stat(), path_sticky_p(), path_symlink_p(), path_truncate(), path_utime(), path_world_readable_p(), path_world_writable_p(), path_writable_p(), path_writable_real_p(), path_zero_p(), positive_int_p(), protected_alias(), protected_empty(), protected_end_document(), protected_end_mapping(), protected_end_sequence(), protected_end_stream(), protected_start_stream(), quo(), r_le(), r_leave(), r_lt(), r_object0(), range_bsearch(), range_check(), range_each_func(), range_eqq(), range_max(), range_min(), range_step(), range_step_size(), rb_ary_bsearch(), rb_ary_cycle_size(), rb_ary_repeated_permutation_size(), rb_big_pow(), rb_class_inherited(), rb_cmpint(), rb_digest_class_s_digest(), rb_digest_instance_bubblebabble(), rb_digest_instance_digest(), rb_digest_instance_digest_bang(), rb_digest_instance_hexdigest(), rb_digest_instance_hexdigest_bang(), rb_digest_instance_length(), rb_digest_instance_new(), rb_digest_instance_to_s(), rb_enc_get_index(), rb_eql(), rb_equal(), rb_exc_new(), rb_exc_new3(), rb_gzreader_initialize(), rb_gzwriter_flush(), rb_gzwriter_initialize(), rb_hash(), rb_hash_default(), rb_inspect(), rb_int_pred(), rb_int_succ(), rb_io_flush(), rb_io_write(), rb_mod_include(), rb_mod_prepend(), rb_num_coerce_bin(), rb_num_coerce_bit(), rb_num_coerce_cmp(), rb_num_coerce_relop(), rb_obj_as_string(), rb_obj_clone(), rb_obj_dup(), rb_obj_extend(), rb_obj_init_dup_clone(), rb_obj_not_equal(), rb_obj_not_match(), rb_range_values(), rb_str_match(), rb_str_sum(), rb_str_upto(), rb_strftime_with_timespec(), rbtime2vtdate(), readline_attempted_completion_function(), recursive_cmp(), reduce0(), rescue_callback(), rt_complete_frags(), set_backtrace(), set_option_encoding_once(), set_state_ivars(), shift(), slicebefore_i(), slicebefore_ii(), sockopt_unpack(), sort_2(), sort_by_cmp(), ssl_renegotiation_cb(), step_i(), strscan_get_charpos(), sub(), switch(), sym_step_i(), syserr_eqq(), tcl_protect_core(), time_timespec(), transcode_io(), unknown_keyword_error(), unlink_body(), unlink_rescue(), vtdate2rbtime(), wadd(), wcmp(), wdivmod(), weq(), while(), wmul(), wquo(), writer(), and wsub().
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 804 of file vm_eval.c.
Referenced by asn1time_to_time(), basic_obj_respond_to(), callback(), check_funcall_exec(), check_match(), cleanup_iseq_build(), dir_open_dir(), getc_call(), io_getch(), lazy_drop_func(), lazy_drop_while_func(), lazy_flat_map_i(), lazy_take_func(), lazy_take_while_func(), method_missing(), mproc(), nucomp_f_complex(), nucomp_rationalize(), nurat_f_rational(), obj_respond_to(), path_binread(), path_each_line(), path_open(), path_read(), path_readlines(), path_s_glob(), path_sub(), path_sysopen(), r_byte(), r_byte1_buffered(), r_bytes1(), r_bytes1_buffered(), r_object0(), rand_range(), random_equal(), range_values(), rb_digest_class_s_bubblebabble(), rb_digest_class_s_hexdigest(), rb_eval_cmd(), rb_f_gets(), rb_f_open(), rb_f_putc(), rb_f_puts(), rb_f_readline(), rb_f_readlines(), rb_hash_flatten(), rb_io_set_encoding(), rb_obj_call_init(), rb_obj_respond_to(), rb_random_bytes(), rb_random_int32(), rb_random_real(), rb_random_ulong_limited(), rb_str_match_m(), require_libraries(), strio_readbyte(), strio_readchar(), strio_readline(), strio_sysread(), vm_call0_body(), and w_object().
Calls a method.
Same as rb_funcall2 but this function can call only public methods.
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 819 of file vm_eval.c.
Referenced by aref_fallback(), argf_close(), argf_forward(), argf_getbyte(), argf_getc(), argf_getline(), argf_readchar(), argf_readlines(), protected_scalar(), protected_start_document(), protected_start_mapping(), protected_start_sequence(), and rawmode_opt().
Definition at line 825 of file vm_eval.c.
Referenced by rb_f_chomp(), rb_f_chop(), rb_f_gsub(), and rb_f_sub().
Definition at line 833 of file vm_eval.c.
Referenced by sym_call().
Definition at line 3110 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 1484 of file gc.c.
Referenced by ruby_finalize_1().
Definition at line 1349 of file gc.c.
Referenced by init_copy().
Definition at line 3285 of file gc.c.
Referenced by Init_GC(), and tcl_protect_core().
Definition at line 3263 of file gc.c.
Referenced by if(), Init_GC(), and tcl_protect_core().
Definition at line 1457 of file gc.c.
Referenced by rb_threadptr_execute_interrupts().
Definition at line 2963 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(), RUBY_ALIAS_FUNCTION(), ruby_vm_destruct(), and switch().
Definition at line 2600 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_marks(), 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(), strio_mark(), strscan_mark(), thread_shield_mark(), time_mark(), tp_mark(), vm_mark_each_thread_func(), vm_trace_mark_event_hooks(), wmap_mark(), yielder_mark(), and zstream_mark().
Definition at line 211 of file encoding.c.
Definition at line 552 of file variable.c.
Referenced by gc_marks().
Definition at line 2549 of file gc.c.
Referenced by gc_marks(), JSON_mark(), mark_global_entry(), val_marker(), and var_marker().
Definition at line 2989 of file gc.c.
Referenced by Init_coverage(), Init_curses(), and rb_global_variable().
Definition at line 2982 of file gc.c.
Referenced by date__strptime_internal(), date_zone_to_diff(), Init_Bignum(), Init_date_core(), Init_Encoding(), Init_IO(), Init_load(), Init_marshal(), Init_Random(), Init_VM(), Init_win32ole(), power_cache_get_power0(), pruby_init(), rb_define_class_id_under(), rb_define_module_id_under(), rb_w32_init_file(), regcomp(), rt_complete_frags(), ruby_process_options(), and sym_to_proc().
Definition at line 3001 of file gc.c.
Referenced by curses_finalize().
Definition at line 904 of file variable.c.
unsigned long rb_genrand_ulong_limited | ( | unsigned long | i | ) |
Definition at line 908 of file random.c.
Referenced by big_sparse_p().
rb_alloc_func_t rb_get_alloc_func | ( | VALUE | ) |
Definition at line 499 of file vm_method.c.
Referenced by obj_alloc_by_klass(), r_leave(), rb_marshal_define_compat(), rb_obj_alloc(), and w_object().
Definition at line 54 of file eval_error.c.
Definition at line 5185 of file thread.c.
Referenced by clear_coverage(), coverage(), prepare_iseq_build(), rb_coverage_result(), and rb_coverage_start().
Definition at line 111 of file load.c.
Referenced by rb_feature_p(), rb_find_file_ext_safe(), and rb_find_file_safe().
Definition at line 593 of file signal.c.
Referenced by rb_threadptr_execute_interrupts().
Definition at line 224 of file file.c.
Referenced by apply2files(), rb_feature_provided(), and rb_file_s_path().
Definition at line 197 of file file.c.
Referenced by rb_construct_expanded_load_path(), and rb_get_path_check().
Definition at line 175 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 440 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 426 of file gc.c.
Referenced by Init_ossl_asn1(), Init_RandomSeed(), Init_Regexp(), Init_tcltklib(), and Init_tkutil().
Definition at line 813 of file variable.c.
Referenced by load_file(), and mSyslog_open().
Definition at line 804 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 66 of file hash.c.
Referenced by cdhash_hash(), hash_i(), nucomp_hash(), nurat_hash(), rb_any_hash(), recursive_hash(), and time_hash().
Definition at line 2823 of file object.c.
Referenced by rb_f_hash().
Definition at line 570 of file hash.c.
Referenced by cParser_initialize(), cState_configure(), cto_i(), dir_initialize(), econv_opts(), econv_primitive_convert(), extract_binmode(), generate_json_object(), group_by_i(), hash2ptr_dispparams(), hash2result(), Init_Hash(), io_s_write(), iseq_build_from_ary_body(), JSON_parse_object(), mString_Extend_json_create(), open_key_args(), 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_str_sub_bang(), rb_thread_variable_get(), rb_threadptr_pending_interrupt_check_mask(), realpath_rec(), recursive_list_access(), str_gsub(), tr_setup_table(), transcode_loop(), and zstream_run().
Referenced by add_activated_refinement(), ary_add_hash(), ary_add_hash_by(), cdhash_set_label_i(), check_exec_fds(), check_exec_fds_1(), check_exec_options_i_extract(), code_page(), core_hash_merge(), count_nodes(), count_objects(), count_objects_size(), coverage(), coverage_result_i(), cState_to_h(), cto_i(), date_zone_to_diff(), debug_lines(), env_select(), env_to_hash(), fdbm_invert(), fdbm_to_hash(), fgdbm_invert(), fgdbm_to_hash(), fsdbm_invert(), fsdbm_to_hash(), gc_profile_record_get(), gc_stat(), group_by_i(), Init_Hash(), Init_ossl_asn1(), Init_ossl_x509name(), io_s_write(), iseq_data_to_ary(), JSON_parse_object(), mString_to_json_raw_object(), ole_const_load(), ossl_dh_get_params(), ossl_dsa_get_params(), ossl_rsa_get_params(), ossl_sslctx_get_session_cache_stats(), pruby_register_instance(), r_object0(), rb_econv_prepare_options(), rb_enc_aliases_enc_i(), rb_hash_invert_i(), rb_hash_s_create(), rb_inflate_add_dictionary(), rb_mod_refine(), rb_struct_to_h(), rb_thread_variable_set(), rb_uninterruptible(), rb_using_refinement(), realpath_rec(), recursive_list_access(), recursive_push(), reg_named_captures_iter(), replace_i(), ripper_init_eventids1_table(), ripper_init_eventids2_table(), select_i(), separate_symbol(), set_state_ivars(), set_zero(), set_zero_i(), sig_list(), tr_setup_table(), tr_trans(), and when_vals().
Definition at line 1148 of file hash.c.
Referenced by Init_Hash(), and rb_hash_replace().
Definition at line 869 of file hash.c.
Referenced by Init_Hash(), pruby_unregister_instance(), recursive_pop(), and unknown_keyword_error().
Definition at line 969 of file hash.c.
Referenced by env_reject(), fdbm_reject(), fgdbm_reject(), fsdbm_reject(), Init_Hash(), and rb_hash_reject().
Definition at line 240 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 200 of file hash.c.
Referenced by env_replace(), env_update(), initialize(), inspect_hash(), iseq_data_to_ary(), iseq_set_sequence(), JSON_parse_string(), m_core_hash_merge_kwd(), rb_hash_assoc(), rb_hash_clear(), rb_hash_delete_if(), rb_hash_each_key(), rb_hash_each_pair(), rb_hash_each_value(), rb_hash_has_value(), rb_hash_invert(), rb_hash_keep_if(), rb_hash_key(), rb_hash_keys(), rb_hash_rassoc(), rb_hash_rehash(), 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(), rb_using_module(), recursive_eql(), recursive_hash(), and w_object().
Definition at line 36 of file hash.c.
Referenced by rb_coverage_result(), and rb_econv_prepare_options().
Definition at line 581 of file hash.c.
Referenced by ary_add_hash_by(), rb_ary_sample(), rb_ary_shuffle_bang(), rb_hash_lookup(), rb_io_extract_encoding_option(), recursive_check(), recursive_pop(), and recursive_push().
Definition at line 234 of file hash.c.
Referenced by allocate_cbsubst_info(), ary_tmp_hash_new(), check_exec_fds(), check_exec_options_i_extract(), 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(), env_select(), env_to_hash(), fdbm_invert(), fdbm_to_hash(), fgdbm_invert(), fgdbm_to_hash(), fsdbm_invert(), fsdbm_to_hash(), gc_profile_record_get(), gc_stat(), hidden_identity_hash_new(), Init_ossl_asn1(), Init_ossl_x509name(), Init_tkutil(), Init_VM(), io_s_write(), iseq_compile_each(), iseq_data_to_ary(), JSON_parse_object(), m_core_hash_from_ary(), 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_coverage_result(), rb_coverage_start(), rb_econv_prepare_options(), rb_enc_aliases(), rb_execarg_fixup(), rb_Hash(), rb_hash_invert(), rb_hash_select(), rb_hash_to_h(), rb_inflate_s_allocate(), rb_realpath_internal(), rb_reg_named_captures(), rb_struct_to_h(), rb_uninterruptible(), rb_w32_init_file(), recursive_list_access(), 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(), and vm_default_params().
st_index_t rb_hash_proc | ( | st_index_t | hash, |
VALUE | proc | ||
) |
Definition at line 783 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 1416 of file random.c.
Referenced by match_hash(), method_hash(), proc_hash(), rb_any_hash(), rb_obj_hash(), and recursive_hash().
Definition at line 266 of file hash.c.
Referenced by rb_hash_modify(), and rb_hash_replace().
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 2889 of file file.c.
Referenced by dir_s_home(), and rb_file_expand_path_internal().
Definition at line 683 of file encoding.c.
Definition at line 411 of file object.c.
Referenced by advice_arg_check(), cannot_be_coerced_into_BigDecimal(), coerce_failed(), control_frame_dump(), env_inspect(), get_exception_sym2type(), insn_data_to_s_detail(), insn_operand_intern(), inspect_ary(), inspect_enumerator(), inspect_i(), inspect_range(), inspect_struct(), iseq_build_from_ary_body(), method_inspect(), name_err_mesg_to_str(), rb_check_id(), rb_cmperr(), rb_hash_fetch_m(), rb_mod_to_s(), rb_p(), rb_stat_inspect(), rb_str_format(), rb_throw_obj(), rb_to_id(), rb_vmdebug_debug_print_post(), rb_vmdebug_proc_dump_raw(), recursive_pop(), ruby__sfvextra(), ruby_debug_print_value(), and vm_check_if_namespace().
VALUE rb_int2big | ( | SIGNED_VALUE | ) |
VALUE rb_int2big | ( | SIGNED_VALUE | ) |
VALUE rb_int2inum | ( | SIGNED_VALUE | ) |
VALUE rb_int2inum | ( | SIGNED_VALUE | ) |
Definition at line 1171 of file ripper.y.
References new_op_assign, and value_expr.
Definition at line 2405 of file numeric.c.
Referenced by enumerator_with_index_i().
Definition at line 2514 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 4654 of file io.c.
Referenced by argf_binmode_m(), argf_next_argv(), rb_io_binmode_m(), and rsock_init_sock().
Definition at line 4630 of file io.c.
Referenced by argf_next_argv(), io_reopen(), rb_io_init_copy(), and seek_before_access().
Definition at line 4233 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 1714 of file io.c.
Referenced by argf_eof(), and Init_IO().
Definition at line 7161 of file io.c.
Referenced by load_file_internal().
Definition at line 1478 of file io.c.
Referenced by Init_IO(), process_options(), rb_f_p_internal(), rb_file_flock(), rb_file_size(), rb_io_getbyte(), rb_io_init_copy(), and rb_io_s_popen().
Definition at line 622 of file io.c.
Referenced by io_reopen(), rb_io_init_copy(), and select_internal().
Definition at line 3713 of file io.c.
Referenced by argf_getbyte(), Init_IO(), io_strip_bom(), load_file_internal(), and rb_io_readbyte().
Definition at line 3122 of file io.c.
Referenced by argf_getline(), lex_io_gets(), load_file_internal(), and rb_gets().
Definition at line 6760 of file io.c.
Referenced by Init_IO(), and rb_f_print().
Definition at line 6925 of file io.c.
Referenced by Init_IO(), io_puts_ary(), rb_f_abort(), rb_f_puts(), and rb_warn_m().
Definition at line 3774 of file io.c.
Referenced by Init_IO(), io_strip_bom(), and load_file_internal().
Definition at line 1423 of file io.c.
Referenced by argf_write(), copy_stream_body(), copy_stream_fallback_body(), gc_profile_report(), marshal_dump(), 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 5160 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 1882 of file encoding.c.
Definition at line 1883 of file encoding.c.
Definition at line 1884 of file encoding.c.
Definition at line 1885 of file encoding.c.
Definition at line 1886 of file encoding.c.
Definition at line 1900 of file iseq.c.
Referenced by clone_method(), and vm_define_method().
Definition at line 1887 of file encoding.c.
Definition at line 1888 of file encoding.c.
Definition at line 1889 of file encoding.c.
Definition at line 1890 of file encoding.c.
Definition at line 1891 of file encoding.c.
Definition at line 1892 of file encoding.c.
Definition at line 1893 of file encoding.c.
Definition at line 1031 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 2586 of file variable.c.
Definition at line 2586 of file variable.c.
Referenced by call_trace_func(), callback(), cvar_front_klass(), 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(), rb_mod_to_s(), rb_thread_variable_get(), rb_thread_variable_p(), rb_thread_variable_set(), rb_thread_variables(), ruby_cleanup(), set_state_ivars(), ssl_renegotiation_cb(), and sysexit_status().
Definition at line 2594 of file variable.c.
Referenced by 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(), ruby_thread_init(), setup_exception(), switch(), and syserr_initialize().
st_index_t rb_ivar_count | ( | VALUE | ) |
Definition at line 1299 of file variable.c.
Referenced by rb_obj_inspect().
Definition at line 1204 of file variable.c.
Referenced by get_digest_base_metadata(), rb_obj_ivar_defined(), and struct_ivar_get().
Definition at line 1271 of file variable.c.
Referenced by inspect_obj(), rb_obj_instance_variables(), and w_objivar().
Definition at line 1116 of file variable.c.
Referenced by add_event_call_back(), chunk_i(), cState_aref(), 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_obj_ivar_get(), rb_undef(), reduce(), singleton_class_of(), slicebefore_i(), struct_ivar_get(), tcl_protect_core(), vm_getivar(), and zstream_run().
Definition at line 1128 of file variable.c.
Referenced by add_event_call_back(), cState_aset(), enc_set_index(), enum_chunk(), enum_slice_before(), enumerable_lazy(), eval_string_with_cref(), fev_initialize(), fev_set_handler(), gzfile_raise(), if(), Init_md5(), Init_rmd160(), Init_sha1(), initialize_params(), int_ossl_asn1_decode0_prim(), lazy_drop_func(), lazy_drop_while_func(), lazy_initialize(), lazy_set_method(), lazy_take_func(), lazy_zip_arrays_func(), lazy_zip_func(), make_econv_exception(), next_i(), nucomp_marshal_load(), nurat_marshal_load(), ole_method_params(), ole_variables(), olemethod_set_member(), oleparam_ole_param_from_index(), oletype_set_member(), ossl_sslctx_session_get_cb(), ossl_sslctx_session_new_cb(), ossl_start_ssl(), parse_main(), pipe_open(), r_ivar(), raise_loaderror(), range_dumper(), rb_class_path(), rb_inflate_s_allocate(), rb_io_init_copy(), rb_iv_set(), rb_mod_refine(), rb_name_class(), rb_obj_ivar_set(), rb_set_class_path(), rb_set_class_path_string(), rb_struct_define_without_accessor(), readline_s_set_completion_case_fold(), readline_s_set_completion_proc(), ruby_init_loadpath_safe(), set_strpath(), setup_struct(), sockopt_initialize(), time_mdump(), time_mload(), vm_call0_body(), and vm_setivar().
Definition at line 324 of file process.c.
Referenced by proc_wait(), proc_waitall(), rb_f_backquote(), rb_f_system(), and rb_io_close().
Definition at line 309 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 315 of file process.c.
Referenced by pipe_finalize(), proc_waitall(), rb_spawn_process(), rb_waitpid(), and waitall_each().
Definition at line 842 of file vm.c.
Referenced by Init_IO(), rb_io_print(), rb_reg_match2(), and uscore_get().
Definition at line 848 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 1715 of file rational.c.
Referenced by Init_Rational(), and nucomp_denominator().
Definition at line 638 of file load.c.
Referenced by rb_load_protect().
Definition at line 824 of file pepper_main.c.
Referenced by rb_load_internal().
Definition at line 1477 of file encoding.c.
Definition at line 1196 of file encoding.c.
rb_encoding* rb_locale_encoding | ( | void | ) |
Definition at line 1212 of file encoding.c.
Definition at line 596 of file string.c.
Referenced by curses_getch(), env_str_new(), and window_getch().
Definition at line 602 of file string.c.
Referenced by curses_getstr(), filename_completion_proc_call(), hist_each(), hist_get(), rb_remove_history(), readline_attempted_completion_function(), readline_readline(), time_mdump(), time_zone(), username_completion_proc_call(), and window_getstr().
Definition at line 772 of file vm_backtrace.c.
Definition at line 772 of file vm_backtrace.c.
Referenced by argument_error(), and parser_set_encode().
Definition at line 80 of file eval_jump.c.
Definition at line 990 of file variable.c.
Referenced by gc_mark_children().
Definition at line 1020 of file variable.c.
Referenced by gc_marks().
Definition at line 2413 of file gc.c.
Referenced by Init_win32ole(), mark_dump_arg(), and mark_load_arg().
Definition at line 2389 of file gc.c.
Referenced by mark_dump_arg().
Definition at line 2543 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 113 of file marshal.c.
Referenced by Init_Complex(), Init_Range(), Init_Rational(), and Init_vm_backtrace().
Definition at line 2123 of file marshal.c.
Referenced by date_s__load().
Definition at line 1189 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 741 of file math.c.
Referenced by m_log_bang().
Definition at line 179 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 1422 of file random.c.
Referenced by BigDecimal_hash(), d_lite_hash(), flo_hash(), match_hash(), nucomp_hash(), nurat_hash(), rb_big_hash(), rb_str_hash(), and reg_hash().
long rb_memsearch | ( | const void * | , |
long | , | ||
const void * | , | ||
long | , | ||
rb_encoding * | |||
) |
Definition at line 227 of file re.c.
Referenced by rb_str_index(), and rb_str_split_m().
Definition at line 1525 of file vm_method.c.
Referenced by check_funcall_missing(), hash_default_value(), make_no_method_exception(), method_missing(), mnew(), 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 795 of file vm_method.c.
Referenced by basic_obj_respond_to(), and rb_mod_method_defined().
Definition at line 1504 of file proc.c.
Referenced by Init_Proc(), and method_fallback().
Definition at line 1511 of file proc.c.
Referenced by bmcall(), and rb_method_call().
Definition at line 2511 of file variable.c.
Referenced by Init_Object().
Definition at line 1982 of file variable.c.
Referenced by rb_mod_const_of(), rb_mod_constants(), and rb_mod_s_constants().
Definition at line 1518 of file variable.c.
Referenced by Init_Object().
Definition at line 1995 of file variable.c.
Referenced by rb_mod_constants(), and rb_mod_s_constants().
Definition at line 2046 of file variable.c.
Referenced by Init_Object(), and rb_mod_s_constants().
Definition at line 1823 of file proc.c.
Referenced by rb_obj_method_arity().
Definition at line 1666 of file vm_eval.c.
Referenced by Init_vm_eval(), and rb_struct_s_def().
Definition at line 1692 of file vm_eval.c.
Referenced by Init_vm_eval(), and rb_mod_initialize().
Definition at line 210 of file variable.c.
Referenced by Init_Object().
Definition at line 1916 of file variable.c.
Referenced by console_dev(), Init_Object(), and new_struct().
Definition at line 2552 of file variable.c.
Referenced by Init_Object().
Definition at line 1464 of file string.c.
Referenced by rb_str_to_inum(), string_to_c(), string_to_c_strict(), string_to_r(), and string_to_r_strict().
Definition at line 4558 of file thread.c.
Referenced by io_binwrite().
Definition at line 4292 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 4182 of file thread.c.
Referenced by Init_Thread().
Definition at line 4170 of file thread.c.
Referenced by io_binwrite().
Definition at line 4368 of file thread.c.
Referenced by finish_writeconv(), Init_Thread(), and io_flush_buffer().
Definition at line 4486 of file thread.c.
Referenced by mutex_sleep().
Definition at line 4535 of file thread.c.
Referenced by fptr_finalize(), io_binwrite(), io_flush_buffer(), and rb_mutex_synchronize_m().
Definition at line 4209 of file thread.c.
Referenced by Init_Thread(), and rb_mutex_lock().
Definition at line 4423 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 377 of file variable.c.
Referenced by boot_defclass(), rb_define_class(), and rb_define_module_id().
Definition at line 677 of file gc.c.
Referenced by rb_node_newnode().
double rb_num2dbl | ( | VALUE | ) |
Definition at line 2742 of file object.c.
Referenced by thread_join_m().
SIGNED_VALUE rb_num2long | ( | VALUE | ) |
Definition at line 1963 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 2152 of file numeric.c.
Referenced by rb_num2short_inline().
Definition at line 1997 of file numeric.c.
Referenced by rb_num2ulong_inline(), and rb_num2ushort().
|
inlinestatic |
unsigned short rb_num2ushort | ( | VALUE | ) |
Definition at line 2170 of file numeric.c.
Referenced by rb_fix2ushort().
Definition at line 279 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 3224 of file numeric.c.
Referenced by rb_big_and(), rb_big_or(), and rb_big_xor().
Definition at line 286 of file numeric.c.
Referenced by BigDecimalCmp(), cmp_gen(), equal_gen(), fix_cmp(), flo_cmp(), nurat_cmp(), and rb_big_cmp().
Definition at line 197 of file numeric.c.
Referenced by rb_random_ulong_limited().
Definition at line 130 of file numeric.c.
Referenced by int_chr(), and rb_str_concat().
Definition at line 1740 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(), prep_window(), 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(), rsock_s_accept(), rsock_s_accept_nonblock(), and RUBY_ALIAS_FUNCTION().
Definition at line 895 of file string.c.
Referenced by ary_join_1(), compile_err_append(), exc_inspect(), fdbm_store(), init_libraries(), io_write(), 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_io_write_nonblock(), 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 194 of file object.c.
Referenced by ary_make_shared_copy(), cannot_be_coerced_into_BigDecimal(), coerce_failed(), conversion_mismatch(), convert_type(), copy_path_class(), d_lite_plus(), dup_obj(), dup_obj_as_complex(), encoded_dup(), exc_equal(), extract_user_token(), get_new_timeval(), get_timeval(), if(), Init_Object(), inspect_struct(), io_reopen(), mString_to_json_raw_object(), mSyslog_log(), name_err_mesg_equal(), NOINSERT_UPDATE_CALLBACK(), num_init_copy(), num_sadded(), 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_hash_dup(), 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_stat_cmp(), rb_str_dup(), rb_str_new_frozen(), rb_str_new_shared(), rb_str_substr(), rb_str_to_s(), rb_struct_eql(), rb_struct_equal(), rb_struct_initialize_m(), rb_struct_members(), rb_struct_members_m(), rb_tmp_class_path(), recursive_hash(), RUBY_ALIAS_FUNCTION(), setup_exception(), str_byte_substr(), str_gsub(), strscan_inspect(), syserr_initialize(), tcl_protect_core(), time_dup(), vm_search_super_method(), and window_subwin().
Definition at line 396 of file variable.c.
Referenced by addrinfo_inspect(), d_lite_inspect(), define_final(), define_final0(), divmodv(), econv_inspect(), enc_inspect(), enum_zip(), eval_string_with_cref(), folevariant_initialize(), generator_initialize(), init_copy(), inspect_enumerator(), iseq_inspect(), lazy_zip(), match_inspect(), method_inspect(), must_encoding(), must_respond_to(), nucomp_coerce(), num2i32(), num_exact(), nurat_coerce(), path_inspect(), proc_to_s(), rand_init(), range_bsearch(), range_each(), range_step(), rb_ary_bsearch(), rb_big_coerce(), rb_builtin_class_name(), rb_check_inheritable(), rb_check_safe_str(), rb_check_typeddata(), rb_cmperr(), rb_define_final(), rb_define_module(), rb_define_module_id_under(), rb_digest_instance_inspect(), rb_digest_instance_method_unimpl(), rb_error_untrusted(), 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(), rescue_callback(), setup_exception(), sockopt_inspect(), take_items(), time_timespec(), uscore_get(), vm_caller_setup_args(), w_object(), and wdivmod().
Definition at line 305 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_internal().
Definition at line 223 of file object.c.
Referenced by init_copy().
Definition at line 347 of file object.c.
Referenced by argf_initialize_copy(), chunk_i(), enumerator_each(), Init_Object(), path_initialize(), path_to_s(), rb_hash_merge(), rb_hash_reject(), rb_io_init_copy(), setup_exception(), and slicebefore_i().
Definition at line 870 of file encoding.c.
Definition at line 109 of file object.c.
Referenced by Init_Object(), and opt_eq_func().
Definition at line 1012 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_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(), set_arg0(), tcltklib_compile_info(), and vm_default_params().
Definition at line 1041 of file object.c.
Referenced by generic_ivar_set(), and Init_Object().
Definition at line 1690 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 363 of file object.c.
Referenced by Init_Object().
Definition at line 1595 of file vm_eval.c.
Referenced by if(), and Init_vm_eval().
Definition at line 1627 of file vm_eval.c.
Referenced by if(), and Init_vm_eval().
Definition at line 1368 of file variable.c.
Definition at line 556 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 593 of file object.c.
Referenced by case_when_optimizable_literal(), check_match(), cState_from_state_s(), discrete_object_p(), error_handle(), ev_advise(), eval_string_with_cref(), EVENTSINK_Invoke(), f_kind_of_p(), fole_s_const_load(), fole_s_show_help(), folemethod_initialize(), foleparam_initialize(), folevariant_initialize(), GetBNPtr(), gzfile_read_raw_rescue(), host_str(), if(), Init_Object(), 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_include(), 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 904 of file proc.c.
Referenced by method_eq(), rb_econv_prepare_options(), rb_mod_define_method(), and transcode_loop().
Definition at line 4135 of file thread.c.
Referenced by rb_objspace_call_finalizer().
Definition at line 91 of file proc.c.
Referenced by enumerator_initialize(), enumerator_size(), 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 1997 of file vm.c.
Referenced by rb_objspace_call_finalizer().
Definition at line 1215 of file proc.c.
Referenced by Init_Proc(), and wmap_allocate().
Definition at line 1831 of file proc.c.
Referenced by rb_obj_respond_to().
Definition at line 1400 of file variable.c.
Referenced by Init_Object().
Definition at line 1552 of file vm_method.c.
Referenced by if(), r_object0(), rb_respond_to(), and w_object().
Definition at line 901 of file object.c.
Referenced by Init_Object(), pack_pack(), path_taint(), rb_file_path(), rsock_s_recvfrom(), and rsock_s_recvfrom_nonblock().
Definition at line 884 of file object.c.
Referenced by Init_Object().
Definition at line 972 of file object.c.
Referenced by Init_Object().
Definition at line 920 of file object.c.
Referenced by Init_Object(), path_untaint(), and time_zone().
Definition at line 953 of file object.c.
Referenced by Init_Object().
Definition at line 938 of file object.c.
Referenced by Init_Object().
Definition at line 6974 of file io.c.
Referenced by rb_f_p_internal().
void* rb_parser_calloc | ( | struct parser_params * | , |
size_t | , | ||
size_t | |||
) |
Definition at line 889 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 | |||
) |
void* rb_parser_realloc | ( | struct parser_params * | , |
void * | , | ||
size_t | |||
) |
Definition at line 371 of file variable.c.
Referenced by convert_UTF8_to_JSON_ASCII(), Init_bubblebabble(), Init_generator(), Init_md5(), Init_ossl_digest(), Init_parser(), Init_rmd160(), Init_sha1(), Init_sha2(), Init_tcltklib(), and path2class().
Definition at line 5239 of file file.c.
Referenced by path_tainted_p().
Definition at line 331 of file variable.c.
Referenced by class2path(), path2class(), path2module(), r_object0(), and rb_path2class().
Definition at line 5588 of file io.c.
Referenced by pipe_open(), and rb_io_s_pipe().
Definition at line 681 of file proc.c.
Referenced by default_proc_arity_check(), proc_arity(), and rb_proc_parameters().
Definition at line 571 of file proc.c.
Referenced by enumerator_size(), generator_each(), proc_fallback(), rb_call_end_proc(), and yielder_yield().
Definition at line 584 of file proc.c.
Referenced by call_trace_func(), curry(), enumerator_size(), and tp_call_trace().
Definition at line 231 of file proc.c.
Referenced by default_proc_arity_check(), Init_Proc(), and proc_curry().
Definition at line 737 of file proc.c.
Referenced by Init_Proc(), and thread_initialize().
Definition at line 2018 of file proc.c.
Referenced by if(), make_curry_proc(), rb_fiber_new(), sym_to_proc(), and yielder_new().
Definition at line 566 of file load.c.
Referenced by InitVM_Enumerator().
Definition at line 996 of file random.c.
Referenced by random_bytes().
unsigned long rb_random_ulong_limited | ( | VALUE | rnd, |
unsigned long | limit | ||
) |
Definition at line 990 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 67 of file range.c.
Referenced by fixup_nodes().
Definition at line 966 of file range.c.
Referenced by range_values(), and rb_range_beg_len().
Definition at line 1753 of file rational.c.
Referenced by BigDecimal_to_r().
Definition at line 1745 of file rational.c.
Definition at line 1739 of file rational.c.
Definition at line 1679 of file rational.c.
Referenced by fix_divide().
Definition at line 3513 of file file.c.
Referenced by iseq_s_compile_file(), process_options(), rb_file_s_realdirpath(), rb_file_s_realpath(), rb_load_internal(), and ruby_init_loadpath_safe().
Definition at line 2476 of file re.c.
Referenced by rb_enc_reg_new(), rb_reg_compile(), and rb_reg_new_str().
Definition at line 1075 of file re.c.
Referenced by rb_str_subpat(), and rb_str_subpat_set().
Definition at line 2299 of file re.c.
Referenced by reg_fragment_check_gen().
Definition at line 2525 of file re.c.
Referenced by reg_compile_gen().
Definition at line 2488 of file re.c.
Referenced by rb_reg_new_str().
Definition at line 1483 of file re.c.
Referenced by last_match_getter(), match_to_s(), and vm_getspecial().
Definition at line 2741 of file re.c.
Referenced by Init_Regexp(), and rb_str_match().
Definition at line 2800 of file re.c.
Referenced by Init_Regexp().
Definition at line 1546 of file re.c.
Referenced by last_paren_match_getter(), and vm_getspecial().
Definition at line 1528 of file re.c.
Referenced by Init_Regexp(), postmatch_getter(), and vm_getspecial().
Definition at line 1501 of file re.c.
Referenced by Init_Regexp(), prematch_getter(), and vm_getspecial().
Definition at line 2519 of file re.c.
Referenced by date__strptime_internal(), proc_options(), and regcomp().
Definition at line 2482 of file re.c.
Referenced by r_object0(), rb_reg_new_ary(), rb_reg_regcomp(), and rb_reg_s_union().
Definition at line 1457 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 3078 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 194 of file vm_trace.c.
Referenced by rb_clear_trace_func(), rb_reset_coverages(), and set_trace_func().
Definition at line 714 of file vm_method.c.
Definition at line 708 of file vm_method.c.
Referenced by num_sadded().
Definition at line 1024 of file load.c.
Referenced by Init_bubblebabble(), Init_generator(), Init_md5(), Init_ossl_digest(), Init_parser(), Init_psych_parser(), Init_rmd160(), Init_sha1(), Init_sha2(), Init_tkutil(), and process_options().
Definition at line 934 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().
Definition at line 1443 of file random.c.
Referenced by rb_thread_atfork().
Definition at line 1591 of file vm_method.c.
Referenced by check_funcall_failed(), copy_stream_body(), copy_stream_fallback_body(), define_final(), discrete_object_p(), do_coerce(), enum_zip(), generate_json(), gzfile_close(), gzfile_write_raw(), hash_equal(), if(), lazy_flat_map_func(), 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_define_final(), 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 79 of file safe.c.
Referenced by apply2files(), bsock_do_not_rev_lookup_set(), bsock_do_not_reverse_lookup_set(), bsock_setsockopt(), check_dirname(), check_gid_switch(), check_uid_switch(), curses_init_screen(), dir_s_chdir(), dlhandle_sym(), env_assoc(), env_delete(), env_each_pair(), env_empty_p(), env_fetch(), env_has_key(), env_has_value(), env_inspect(), env_key(), env_keys(), env_rassoc(), env_select(), env_shift(), env_size(), env_to_a(), env_to_hash(), env_update(), env_values(), env_values_at(), etc_getgrgid(), etc_getgrnam(), etc_getlogin(), etc_getpwuid(), etc_group(), etc_passwd(), ev_advise(), fdbm_modify(), fev_off_event(), fiddle_handle_sym(), fole_free(), fole_initialize(), fole_respond_to(), fole_s_connect(), fole_s_const_load(), gc_stress_set(), get_pid(), get_ppid(), hist_delete_at(), hist_each(), hist_empty_p(), hist_get(), hist_length(), hist_pop(), hist_push(), hist_push_method(), hist_shift(), id2ref(), if(), io_write(), iseq_eval(), iseq_s_compile(), iseq_s_compile_file(), iseq_s_compile_option_set(), iseq_s_of(), iseq_to_a(), mSyslog_close(), mSyslog_set_mask(), ole_types_from_typelib(), os_each_obj(), proc_detach(), proc_wait(), proc_waitall(), rb_alias(), rb_check_safe_obj(), rb_define_const(), rb_dir_getwd(), rb_dl_free(), rb_dl_malloc(), rb_dl_ptr2value(), rb_dl_realloc(), rb_dlcfunc_new(), rb_dlhandle_initialize(), rb_dlptr_malloc(), rb_dlptr_new2(), rb_dlptr_s_allocate(), rb_env_size(), rb_execarg_addopt(), rb_export_method(), rb_f_abort(), rb_f_exit(), rb_f_exit_bang(), rb_f_getenv(), rb_f_kill(), rb_f_srand(), rb_f_trace_var(), rb_f_untrace_var(), rb_fiddle_free(), rb_fiddle_handle_initialize(), rb_fiddle_malloc(), rb_fiddle_ptr2value(), rb_fiddle_ptr_malloc(), rb_fiddle_ptr_new2(), rb_fiddle_ptr_s_allocate(), rb_fiddle_realloc(), 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_stat(), 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_gdbm_modify(), rb_include_module(), rb_io_autoclose_p(), rb_io_initialize(), rb_io_reopen(), rb_io_set_autoclose(), rb_io_syswrite(), rb_io_write_nonblock(), rb_ioctl(), rb_iseq_disasm(), rb_load_internal(), rb_obj_taint(), rb_obj_trust(), rb_obj_untaint(), rb_obj_untrust(), rb_prepend_module(), rb_realpath_internal(), rb_remove_history(), rb_secure_update(), rb_stat(), rb_stat_init(), rb_thread_abort_exc_set(), rb_thread_kill(), rb_thread_priority_set(), rb_thread_s_abort_exc_set(), rb_tracepoint_disable(), rb_tracepoint_enable(), rb_undef(), readline_readline(), readline_s_get_completion_case_fold(), readline_s_get_completion_proc(), readline_s_set_completion_case_fold(), readline_s_set_completion_proc(), readline_s_set_input(), readline_s_set_output(), remove_method(), rsock_bsock_send(), rsock_s_accept(), rsock_s_accept_nonblock(), rsock_sock_listen(), set_trace_func(), sig_trap(), sock_initialize(), sock_s_gethostbyname(), syslog_write(), tcp_s_gethostbyname(), test_check(), thgroup_add(), thread_add_trace_func_m(), thread_set_trace_func_m(), top_define_method(), top_include(), udp_bind(), udp_connect(), udp_init(), udp_send(), window_initialize(), and writable().
Definition at line 94 of file safe.c.
Referenced by rb_dlcfunc_call().
Definition at line 308 of file variable.c.
Referenced by Init_IO().
Definition at line 285 of file variable.c.
Referenced by rb_define_class_id_under(), and rb_define_module_id_under().
Definition at line 34 of file safe.c.
Referenced by check_autoload_required(), 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 856 of file vm.c.
Referenced by eval_string_with_cref(), rb_const_set(), and warn_print().
Definition at line 884 of file vm.c.
Referenced by ary_new(), call_trace_func(), empty_ary_alloc(), empty_hash_alloc(), empty_str_alloc(), error_pos(), error_print(), eval_string_with_cref(), m_core_hash_from_ary(), newobj(), rb_bug(), rb_const_set(), rb_exec(), rb_f_load(), rb_obj_alloc(), rb_require_safe(), rb_str_resurrect(), setup_exception(), str_new(), update_coverage(), and warn_print().
Definition at line 1560 of file ripper.y.
References NEW_MASGN.
Referenced by cannot_be_coerced_into_BigDecimal(), coerce_failed(), generic_ivar_set(), givar_i(), ivar_get(), markable_object_p(), r_object0(), rb_ivar_count(), rb_ivar_defined(), rb_ivar_foreach(), rb_obj_clone(), rb_obj_dup(), and rb_obj_remove_instance_variable().
Definition at line 10410 of file io.c.
Referenced by process_options().
Definition at line 2125 of file string.c.
Referenced by argf_read(), compile_err_append(), dir_inspect(), dt_lite_jisx0301(), eval_string_with_cref(), fc_path(), gzfile_error_inspect(), inspect_i(), inspect_range(), inspect_struct(), iso8601_timediv(), join_der_i(), make_version_str(), method_inspect(), name_err_mesg_to_str(), ole_raise(), ossl_sslctx_set_ciphers(), ossl_x509extfactory_create_ext(), parser_here_document(), path_sub_ext(), rand_random(), range_to_s(), rb_io_inspect(), rb_iseq_disasm(), rb_load_fail(), rb_mod_to_s(), rb_reg_s_union(), rb_set_class_path_string(), rb_stat_inspect(), rb_str_concat(), rb_str_ellipsize(), rb_str_insert(), reg_compile_gen(), sockopt_inspect(), strscan_concat(), sys_fail2(), tcl_protect_core(), and warn_print().
Definition at line 1423 of file string.c.
Referenced by pack_pack(), and pack_unpack().
Definition at line 1454 of file string.c.
Referenced by pack_unpack().
Definition at line 2109 of file string.c.
Referenced by 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 1951 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_str_buf_cat2(), rb_str_buf_cat_escaped_char(), rb_str_buf_new_cstr(), rb_str_cat(), unescape_escaped_nonascii(), unescape_nonascii(), w_nbyte(), zstream_append_buffer(), and zstream_append_input().
Definition at line 1961 of file string.c.
Referenced by addrinfo_inspect(), 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_exec_fillarg(), rb_reg_desc(), rb_reg_to_s(), and rb_stat_inspect().
Definition at line 2085 of file string.c.
Referenced by inspect_i(), prepare_getline_args(), and rb_reg_s_union().
Definition at line 4467 of file string.c.
Referenced by rb_reg_expr_str(), and rb_str_inspect().
VALUE rb_str_buf_new | ( | long | ) |
Definition at line 777 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_substr_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(), str_gsub(), zstream_append_buffer(), and zstream_append_input().
Definition at line 793 of file string.c.
Referenced by rb_load_fail().
size_t rb_str_capacity | ( | VALUE | ) |
Definition at line 360 of file string.c.
Referenced by append_fspath(), econv_primitive_convert(), rb_econv_substr_append(), rb_str_set_len(), and rb_str_vcatf().
Definition at line 1967 of file string.c.
Referenced by date_strftime_internal(), eval_string_with_cref(), flo_to_s(), inspect1(), inspect_range(), inspect_sockaddr(), 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(), and time_strftime().
Definition at line 1986 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_sockaddr(), inspect_struct(), make_inspect(), make_version_str(), name_err_mesg_to_str(), nucomp_inspect(), nurat_inspect(), ole_excepinfo2msg(), ole_hresult2msg(), ole_raise(), oletypelib_path(), ossl_make_error(), ossl_ssl_get_state(), ossl_sslctx_set_ciphers(), 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(), search_required(), sockopt_inspect(), sys_fail2(), and warn_print().
Definition at line 2312 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 232 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 2287 of file string.c.
Referenced by rb_str_cmp(), rb_str_hash_cmp(), and str_eql().
Definition at line 2166 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(), inspect_enumerator(), 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 563 of file string.c.
Referenced by append_fspath(), env_fetch(), env_str_new(), file_path_convert(), rb_external_str_new_with_enc(), rb_f_getenv(), rb_gzreader_ungetc(), rb_gzwriter_write(), 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 | ||
) |
Referenced by gzfile_newstr(), rb_str_conv_enc(), rb_strftime_with_timespec(), and ruby__sfvextra().
Definition at line 3351 of file string.c.
Referenced by econv_primitive_convert(), rb_str_splice_0(), and rb_str_subseq().
Definition at line 4634 of file string.c.
Referenced by Init_String(), inspect1(), inspect2(), make_econv_exception(), rb_econv_prepare_options(), and sockopt_inspect().
Definition at line 946 of file string.c.
Referenced by cannot_be_coerced_into_BigDecimal(), check_exec_redirect(), classname(), 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(), insn_operand_intern(), inspect_range(), iseq_compile_each(), 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_execarg_addopt(), 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_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_delete(), rb_str_downcase(), rb_str_encode_ospath(), 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_ALIAS_FUNCTION(), ruby_set_script_name(), and str_gsub().
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 7724 of file string.c.
Referenced by rb_hash_fetch_m(), and sys_fail2().
Definition at line 2867 of file transcode.c.
Referenced by do_writeconv(), econv_insert_output(), fix_string_encoding(), get_user_from_path(), rb_file_expand_path_internal(), rb_io_getline_1(), rb_str_ellipsize(), rb_str_encode_ospath(), rb_w32_conv_from_wchar(), and rb_w32_write_console().
Definition at line 230 of file file.c.
Referenced by apply2files(), check_dirname(), dir_initialize(), dir_s_chdir(), do_opendir(), load_file_internal(), 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_stat(), rb_stat_init(), rb_sysopen(), and realpath_rec().
Definition at line 2363 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().
Definition at line 626 of file string.c.
Referenced by curses_addstr(), and window_addstr().
VALUE rb_str_export_to_enc | ( | VALUE | , |
rb_encoding * | |||
) |
Definition at line 632 of file string.c.
Referenced by alias(), scalar(), start_document(), start_mapping(), start_sequence(), and transcode_string().
Definition at line 443 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 830 of file string.c.
Referenced by dispose_string(), and obj_free().
Definition at line 1798 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 2248 of file string.c.
Referenced by cdhash_hash(), match_hash(), path_hash(), rb_any_hash(), and rb_str_hash_m().
Definition at line 2258 of file string.c.
Referenced by cdhash_cmp(), and rb_any_cmp().
Definition at line 4512 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 7226 of file string.c.
Referenced by hash2ptr_dispparams(), hash2result(), Init_String(), JSON_parse_string(), rb_to_id(), set_state_ivars(), sym_capitalize(), sym_downcase(), sym_each_i(), sym_step_i(), sym_succ(), sym_swapcase(), and sym_upcase().
Definition at line 1182 of file string.c.
Referenced by Init_String(), reg_match_pos(), strscan_get_charpos(), and sym_length().
Referenced by rb_io_sysread(), rb_str_locktmp_ensure(), and readline_readline().
Definition at line 1831 of file string.c.
Referenced by io_fread(), and io_getpartial().
Definition at line 1369 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 1377 of file string.c.
Referenced by io_setstrbuf(), rb_str_append(), rb_str_cat(), and read_all().
Definition at line 425 of file string.c.
Referenced by addrinfo_inspect_sockaddr(), 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(), 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_new_cstr(), rb_str_plus(), rb_str_slice_bang(), rb_usascii_str_new(), rb_write_error2(), reg_named_captures_iter(), reg_names_iter(), RUBY_ALIAS_FUNCTION(), 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_int(), sockopt_s_linger(), str_new(), strio_getline(), strio_putc(), strio_read(), time_mdump(), time_strftime(), warn_print(), writer(), zstream_detach_buffer(), zstream_detach_input(), and zstream_expand_buffer_into().
Definition at line 447 of file string.c.
Referenced by addrinfo_mdump(), curses_keyname(), decorate_convpath(), dir_inspect(), econv_convpath(), finish_writeconv(), gc_profile_dump_on(), hist_to_s(), Init_readline(), inspect1(), load_file_internal(), 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 713 of file string.c.
Referenced by hash_aset_str(), io_write(), rb_check_argv(), rb_econv_prepare_options(), rb_file_open_generic(), rb_io_reopen(), rb_io_syswrite(), rb_set_class_path_string(), rb_str_subseq(), str_replace_shared_without_enc(), time_mload(), and yycompile().
Definition at line 677 of file string.c.
Referenced by rb_file_s_basename(), and rb_str_subseq().
Referenced by rb_str_ellipsize().
long rb_str_offset | ( | VALUE | , |
long | |||
) |
Definition at line 1611 of file string.c.
Referenced by reg_match_pos().
Definition at line 1236 of file string.c.
Referenced by Init_String().
Definition at line 7843 of file string.c.
Referenced by rb_id_quote_unprintable().
Definition at line 4034 of file string.c.
Referenced by Init_String(), and rb_str_init().
Definition at line 1854 of file string.c.
Referenced by append_fspath(), appendline(), argf_getpartial(), argf_read(), BigDecimal_dump(), BigDecimal_inspect(), BigDecimal_split(), BigDecimal_to_s(), copy_stream_body(), copy_stream_fallback_body(), econv_primitive_convert(), flo_to_s(), get_user_from_path(), 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_substr_append(), rb_enc_vsprintf(), rb_feature_p(), rb_file_expand_path_internal(), rb_gzfile_set_comment(), rb_gzfile_set_orig_name(), rb_home_dir(), rb_io_getline_fast(), rb_iseq_disasm(), rb_nkf_putchar(), rb_reg_quote(), rb_str_concat(), rb_str_format(), rb_str_vcatf(), realpath_rec(), RUBY_ALIAS_FUNCTION(), 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 952 of file string.c.
Referenced by gzfile_raise(), gzfile_reader_get_unused(), and obj_resurrect().
Definition at line 1838 of file string.c.
Referenced by appendline(), econv_primitive_convert(), io_set_read_length(), load_transcoder_entry(), 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_substr_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_format(), read_all(), rsock_s_recvfrom(), rsock_s_recvfrom_nonblock(), ruby__sfvwrite(), RUBY_ALIAS_FUNCTION(), and str_transcode0().
Definition at line 857 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 1658 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().
Definition at line 1669 of file string.c.
Referenced by check_dirname(), features_index_add(), match_array(), path_sub_ext(), rb_file_s_extname(), 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_split_m(), rb_str_sub_bang(), realpath_rec(), search_required(), str_gsub(), and zstream_shift_buffer().
Definition at line 1775 of file string.c.
Referenced by rb_io_putc(), rb_str_aref(), rb_str_aref_m(), rb_str_chr(), rb_str_rpartition(), set_state_ivars(), and strio_putc().
Definition at line 2988 of file string.c.
Referenced by Init_String(), rb_str_succ_bang(), and sym_succ().
Definition at line 7824 of file string.c.
Referenced by id_to_name(), and sym_inspect().
Definition at line 1268 of file string.c.
Referenced by Init_String().
VALUE rb_str_tmp_new | ( | long | ) |
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 2645 of file object.c.
Referenced by f_to_f(), rb_Float(), and rb_str_to_f().
Definition at line 849 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 1821 of file string.c.
Referenced by rb_io_sysread(), rb_str_locktmp_ensure(), and readline_readline().
Definition at line 3455 of file string.c.
Referenced by eval_string_with_cref(), rb_str_prepend(), and strio_ungetc().
Definition at line 1288 of file sprintf.c.
Referenced by compile_snprintf(), 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 830 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 836 of file strftime.c.
References Qnil, and rb_strftime_with_timespec().
Referenced by rb_strftime_alloc().
Definition at line 2764 of file object.c.
Referenced by exc_to_s(), GetBNPtr(), make_version_str(), ossl_sslctx_set_ciphers(), and rb_f_string().
Definition at line 1473 of file string.c.
Referenced by rb_string_value_cstr(), and rb_string_value_ptr().
Definition at line 240 of file struct.c.
Referenced by range_alloc().
Definition at line 698 of file struct.c.
Referenced by Init_Struct(), and struct_entry().
Definition at line 773 of file struct.c.
Referenced by Init_Struct().
Definition at line 279 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 246 of file struct.c.
Referenced by Init_Range().
Definition at line 98 of file struct.c.
Referenced by rb_struct_ref().
Definition at line 647 of file struct.c.
Referenced by Init_Struct().
Definition at line 414 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 345 of file vm_trace.c.
Referenced by yycompile().
Definition at line 7921 of file string.c.
Referenced by constant_arg(), ev_on_event(), fev_off_event(), fole_respond_to(), hash2named_arg(), Init_String(), location_base_label(), ole_invoke(), range_each(), range_step(), rb_mod_const_get(), reg_operand(), sym_aref(), sym_casecmp(), sym_cmp(), sym_match(), and sym_succ().
void rb_syswait | ( | rb_pid_t | pid | ) |
Definition at line 3676 of file process.c.
Referenced by rb_io_close().
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 479 of file string.c.
Referenced by addrinfo_firstonly_new(), addrinfo_list_new(), and init_addrinfo_getaddrinfo().
Definition at line 2909 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 3848 of file thread.c.
Referenced by pipe_open().
Definition at line 1095 of file thread.c.
Referenced by bigmul1_normal(), collect_all(), for(), io_binwrite(), rb_io_wait_readable(), rb_io_wait_writable(), and trap_check().
Definition at line 727 of file thread.c.
Referenced by rb_detach_process().
Definition at line 2355 of file thread.c.
Referenced by chdir_yield(), copy_stream_body(), dir_s_chdir(), if(), rb_autoload_load(), rb_autoloading_value(), rb_const_set(), rb_dl_get_last_error(), rb_dl_set_last_error(), recursive_list_access(), recursive_pop(), thread_s_current(), VpGetException(), VpGetPrecLimit(), and VpGetRoundMode().
Definition at line 1978 of file thread.c.
Referenced by exec_interrupts(), and maygvl_copy_stream_continue_p().
Definition at line 2083 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 3493 of file thread.c.
Referenced by maygvl_select(), rb_thread_select(), select_internal(), and select_single().
Definition at line 3442 of file thread.c.
Referenced by rb_io_wait_writable(), rsock_bsock_send(), and udp_send().
Definition at line 1112 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 1336 of file thread.c.
Referenced by do_ioctl(), io_flush_buffer_async(), rb_file_flock(), rb_io_flush(), rb_read_internal(), and rb_write_internal().
Definition at line 2138 of file thread.c.
Referenced by Init_Thread(), rb_thread_exit(), and rb_thread_s_kill().
Definition at line 2668 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 2753 of file thread.c.
Referenced by rb_detach_process(), rb_dl_set_last_error(), rb_thread_aset(), and recursive_list_access().
Definition at line 2376 of file thread.c.
Referenced by rb_thread_s_main().
Definition at line 1857 of file vm.c.
Referenced by cont_mark().
Definition at line 1835 of file vm.c.
Referenced by thread_start_func_2().
Definition at line 2269 of file thread.c.
Referenced by if(), and Init_Thread().
Definition at line 1143 of file thread.c.
Referenced by for(), if(), proc_waitall(), rb_thread_run(), rb_waitpid(), rbtk_EventCheckProc(), and thread_s_pass().
Definition at line 4660 of file thread.c.
Referenced by release_thread_shield().
Definition at line 4613 of file thread.c.
Referenced by load_lock().
Definition at line 4649 of file thread.c.
Referenced by release_thread_shield().
Definition at line 4629 of file thread.c.
Referenced by load_lock().
Definition at line 1120 of file thread.c.
Referenced by pipe_open().
Definition at line 1025 of file thread.c.
Referenced by for(), rb_f_sleep(), and rb_thread_fd_select().
Definition at line 2296 of file thread.c.
Referenced by Init_Thread().
Definition at line 3436 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 1071 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 2225 of file thread.c.
Referenced by if(), Init_Thread(), rb_thread_run(), and while().
Definition at line 2234 of file thread.c.
Referenced by rb_thread_wakeup().
Definition at line 2496 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 2390 of file time.c.
Referenced by stat_atime(), stat_ctime(), and stat_mtime().
VALUE rb_time_new | ( | time_t | , |
long | |||
) |
Definition at line 2364 of file time.c.
Referenced by rb_gzfile_mtime().
Definition at line 2519 of file time.c.
Referenced by rb_file_s_utime().
rb_encoding* rb_to_encoding | ( | VALUE | ) |
Definition at line 194 of file encoding.c.
Definition at line 146 of file encoding.c.
Definition at line 2718 of file object.c.
Referenced by pack_pack(), and rand_range().
Definition at line 8169 of file string.c.
Referenced by enum_inject(), 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_attr(), rb_mod_attr_accessor(), rb_mod_attr_reader(), rb_mod_attr_writer(), rb_mod_autoload(), rb_mod_const_missing(), rb_mod_const_set(), rb_mod_cvar_set(), rb_mod_define_method(), rb_mod_modfunc(), rb_obj_ivar_set(), rb_struct_s_def(), rb_thread_aref(), rb_thread_aset(), rb_thread_key_p(), rb_thread_variable_get(), rb_thread_variable_p(), rb_thread_variable_set(), send_internal(), and vm_call_opt_send().
Definition at line 2457 of file object.c.
Referenced by check_exec_redirect(), econv_args(), econv_primitive_convert(), enumerator_initialize(), enumerator_with_index(), fix_aref(), num2i32(), obj2vint(), pack_pack(), rand_init(), random_bytes(), random_load(), range_bsearch(), range_step(), range_step_size(), rb_big_lshift(), rb_big_pack(), rb_big_rshift(), rb_dlcfunc_call(), rb_execarg_addopt(), rb_f_rand(), rb_hash(), rb_num2long(), rb_num2ulong(), rb_quad_pack(), rb_random_ulong_limited(), time_nsec(), time_round(), and time_usec().
Definition at line 1896 of file encoding.c.
Definition at line 1902 of file encoding.c.
Referenced by trap_check().
Definition at line 716 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 * | |||
) |
|
inlinestatic |
Definition at line 1202 of file ripper.y.
References new_attr_op_assign, and value_expr.
Definition at line 861 of file vm_method.c.
Referenced by m_core_undef_method(), and rb_mod_undef_method().
Definition at line 493 of file vm_method.c.
Referenced by Init_Binding(), Init_Encoding(), 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 164 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 1190 of file encoding.c.
rb_encoding* rb_usascii_encoding | ( | void | ) |
Definition at line 1181 of file encoding.c.
Definition at line 431 of file string.c.
Referenced by date__strptime(), flo_to_s(), hexencode_str_new(), int_chr(), nil_to_s(), pack_unpack(), rb_ary_join(), rb_big2str0(), rb_id2str(), rb_io_getline_1(), rb_str_ellipsize(), and strftimev().
Referenced by eval_string_with_cref(), flo_to_s(), inspect_ary(), pruby_eval(), and rb_str_upto().
Definition at line 1175 of file encoding.c.
rb_encoding* rb_utf8_encoding | ( | void | ) |
Definition at line 1166 of file encoding.c.
int rb_uv_to_utf8 | ( | char | [6], |
unsigned | long | ||
) |
Definition at line 2165 of file pack.c.
Referenced by append_utf8(), and pack_pack().
VALUE rb_vm_backtrace_object | ( | ) |
Definition at line 532 of file vm_backtrace.c.
Referenced by setup_exception().
Definition at line 614 of file vm_dump.c.
Referenced by report_bug(), and sdr().
Definition at line 103 of file vm.c.
Referenced by rb_clear_cache(), rb_clear_cache_by_class(), rb_clear_cache_by_id(), rb_clear_cache_for_undef(), rb_const_remove(), and rb_const_set().
Definition at line 107 of file vm_exec.c.
Referenced by rb_iseq_translate_threaded_code().
Definition at line 128 of file vm.c.
Referenced by rb_const_get_0().
Definition at line 1618 of file vm.c.
Referenced by gc_marks().
Definition at line 235 of file vm.c.
Referenced by raise_method_missing(), rb_mod_const_missing(), and rb_vm_rewind_cfp().
Definition at line 1269 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 746 of file process.c.
Referenced by detach_process_watcher(), proc_wait(), proc_waitall(), pty_check(), rb_f_system(), and rb_syswait().
Definition at line 7099 of file io.c.
Referenced by rescue_callback().
Definition at line 7085 of file io.c.
Referenced by rb_write_error().
Definition at line 7105 of file io.c.
Referenced by compile_err_append(), compile_warn_print(), warn_print(), and warn_printf().
Definition at line 933 of file vm_eval.c.
Referenced by ary_add_hash_by(), ary_reject(), ary_reject_bang(), BigDecimal_save_exception_mode(), BigDecimal_save_limit(), BigDecimal_save_rounding_mode(), chdir_yield(), console_cooked(), console_noecho(), console_raw(), cycle_i(), d_lite_downto(), d_lite_step(), d_lite_upto(), dir_each(), dir_s_open(), drop_while_i(), each_cons_i(), each_entry_i(), each_i(), each_key_i(), each_pair_i(), each_slice_i(), each_val_i(), each_value_i(), enum_cycle(), enum_each_slice(), enum_reverse_each(), env_delete_m(), env_each_key(), env_each_pair(), env_each_value(), env_fetch(), fdbm_delete(), fdbm_delete_if(), fdbm_each_key(), fdbm_each_pair(), fdbm_each_value(), fdbm_fetch(), fdbm_s_open(), fdbm_select(), fgdbm_delete_if(), fgdbm_each_key(), fgdbm_each_pair(), fgdbm_each_value(), fgdbm_fetch(), fgdbm_s_open(), fgdbm_select(), find_all_i(), find_i(), fsdbm_delete(), fsdbm_delete_if(), fsdbm_each_key(), fsdbm_each_pair(), fsdbm_each_value(), fsdbm_fetch(), fsdbm_s_open(), fsdbm_select(), glob_i(), grep_iter_i(), group_by_i(), gzfile_wrap(), hist_each(), int_dotimes(), int_downto(), int_upto(), io_s_foreach(), lazy_grep_iter(), lazy_reject_func(), lazy_select_func(), max_by_i(), min_by_i(), minmax_by_i(), mSyslog_open(), num_step(), ole_each_sub(), os_obj_of_i(), ossl_asn1_decode0(), ossl_generate_cb(), ossl_pem_passwd_cb0(), p_gid_switch(), p_uid_switch(), partition_i(), pty_getpty(), pty_open(), range_each(), range_step(), rb_ary_bsearch(), rb_ary_collect(), rb_ary_collect_bang(), rb_ary_combination(), rb_ary_count(), rb_ary_cycle(), rb_ary_delete(), rb_ary_drop_while(), rb_ary_each(), rb_ary_each_index(), rb_ary_fetch(), rb_ary_fill(), rb_ary_index(), rb_ary_initialize(), rb_ary_permutation(), rb_ary_product(), rb_ary_repeated_combination(), rb_ary_repeated_permutation(), rb_ary_reverse_each(), rb_ary_rindex(), rb_ary_select(), rb_ary_select_bang(), rb_ary_take_while(), rb_ary_zip(), rb_callcc(), rb_dlhandle_initialize(), rb_f_open(), rb_fiddle_handle_initialize(), rb_gzreader_each(), rb_gzreader_each_byte(), rb_gzreader_each_char(), rb_hash_delete(), rb_hash_fetch_m(), rb_io_each_byte(), rb_io_each_char(), rb_io_each_codepoint(), rb_io_each_line(), rb_io_s_open(), rb_io_s_pipe(), rb_io_s_popen(), rb_mutex_synchronize_m(), rb_obj_tap(), rb_reg_match_m(), rb_str_enumerate_bytes(), rb_str_enumerate_chars(), rb_str_enumerate_codepoints(), rb_str_enumerate_lines(), rb_str_match_m(), rb_str_scan(), rb_str_sub_bang(), rb_str_upto(), rb_struct_each(), rb_struct_each_pair(), rb_struct_select(), rb_thread_s_handle_interrupt(), reject_i(), ruby_float_step(), sort_by_i(), step_i(), str_gsub(), strio_each(), strio_each_byte(), strio_each_char(), strio_each_codepoint(), strio_s_open(), sym_each_i(), sym_step_i(), tracepoint_disable_m(), tracepoint_enable_m(), window_attron(), yield_indexed_values(), zip_ary(), zip_i(), zstream_detach_buffer(), and zstream_expand_buffer().
Definition at line 944 of file vm_eval.c.
Referenced by delete_if_i(), each_with_index_i(), each_with_object_i(), enumerator_with_index_i(), enumerator_with_object_i(), env_reject_bang(), env_select(), env_select_bang(), env_update_i(), inject_i(), keep_if_i(), max_ii(), min_ii(), minmax_ii(), minmax_ii_update(), rb_hash_update_block_callback(), select_i(), and sort_1().
Definition at line 966 of file vm_eval.c.
Referenced by lazy_drop_while_func(), lazy_flat_map_func(), lazy_init_iterator(), lazy_map_func(), lazy_take_while_func(), and yielder_yield_i().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
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 323 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 3665 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 3858 of file file.c.
Referenced by path_sub_ext(), and rb_file_s_extname().
Definition at line 201 of file eval_error.c.
double ruby_float_mod | ( | double | x, |
double | y | ||
) |
Definition at line 1798 of file numeric.c.
Referenced by num_step(), and range_step().
int ruby_glob | ( | const char * | , |
int | , | ||
ruby_glob_func * | , | ||
VALUE | |||
) |
void* ruby_mimmalloc | ( | size_t | size | ) |
Definition at line 3664 of file gc.c.
Referenced by Init_BareVM().
Definition at line 11453 of file io.c.
Referenced by proc_options().
Definition at line 237 of file signal.c.
Referenced by pst_message().
Definition at line 1301 of file vsnprintf.c.
RUBY_EXTERN void setproctitle | ( | const char * | fmt, |
... | |||
) |
Definition at line 135 of file setproctitle.c.
Referenced by set_arg0().
|
static |
RUBY_EXTERN int signbit | ( | double | x | ) |
Definition at line 5 of file signbit.c.
Referenced by f_signbit(), math_atan2(), math_gamma(), and math_lgamma().
Definition at line 629 of file st.c.
Referenced by boot_defclass(), define_final0(), generic_ivar_set(), make_transcoder_entry(), method_entry_i(), move_refined_method(), rb_alias_variable(), rb_autoload(), rb_copy_generic_ivar(), rb_define_class(), rb_define_module(), 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 802 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(), and st_free_table().
Definition at line 663 of file st.c.
Referenced by init_copy(), rb_copy_generic_ivar(), rb_hash_dup(), rb_hash_initialize_copy(), rb_hash_s_create(), rb_hash_to_h(), rb_mod_init_copy(), and rb_singleton_class_clone_and_attach().
Referenced by autoload_delete(), constat_delete(), find_class_path(), flatten(), generic_ivar_remove(), r_leave(), rb_ary_and(), rb_ary_or(), rb_ary_uniq(), rb_ary_uniq_bang(), 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_undefine_final(), rb_waitpid(), remove_method(), run_final(), socklist_delete(), st_delete_wrap(), and wmap_finalize().
Referenced by rb_hash_delete_key().
Definition at line 1006 of file st.c.
Referenced by class_instance_method_list(), clear_coverage(), count_nodes(), count_objects(), count_objects_size(), count_tdata_objects(), enc_names(), exit_handler(), extract_keywords(), fc_i(), get_loaded_features_index(), include_modules_at(), mark_const_tbl(), mark_hash(), mark_m_tbl(), mark_marshal_compat_t(), mark_set(), mark_tbl(), proc_waitall(), rb_ary_uniq(), 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_name_list(), rb_execarg_extract_options(), rb_execarg_fixup(), rb_feature_p(), rb_free_const_table(), rb_free_m_table(), rb_mod_init_copy(), rb_obj_singleton_methods(), rb_objspace_call_finalizer(), rb_prepend_module(), rb_singleton_class_clone_and_attach(), 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(), thgroup_list(), transcode_search_path(), validate_labels(), wmap_free(), wmap_mark(), and wmap_memsize().
Definition at line 914 of file st.c.
Referenced by hash_foreach_call(), and st_foreach_safe().
Definition at line 133 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_table(), 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 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(), constat_handle(), fiber_init(), find_class_path(), flatten(), generic_ivar_set(), init_enc2cp(), Init_Exception(), init_heap(), Init_marshal(), 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_class_boot(), 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_module_new(), rb_obj_freeze(), rb_obj_singleton_methods(), rb_prepend_module(), rb_singleton_class_attached(), rb_singleton_class_clone_and_attach(), rb_thread_local_aset(), rb_waitpid(), reachable_objects_from(), socklist_insert(), 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 Init_load(), load_lock(), 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 rb_hash_tbl(), 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(), enc_register_at(), enc_set_default_encoding(), features_index_add_single(), find_class_path(), flatten(), generic_ivar_set(), Init_VM(), insn_make_insn_table(), iseq_compile_each(), iseq_load(), load_lock(), obj_alloc_by_klass(), ole_vstr2wc(), r_entry0(), r_prepare(), r_symreal(), rb_autoload(), rb_const_set(), rb_copy_generic_ivar(), rb_cvar_set(), rb_execarg_fixup(), rb_gc_copy_finalizer(), rb_hash_rehash_i(), rb_ivar_set(), rb_marshal_define_compat(), rb_method_entry_make(), rb_obj_freeze(), rb_singleton_class_attached(), rb_thread_atfork_internal(), rb_thread_local_aset(), rb_waitpid(), reachable_object_from_i(), register_label(), socklist_insert(), sv_i(), thread_create_core(), val2dispatch(), w_encoding(), w_object(), and wmap_aset().
Referenced by enc_alias_internal().
Referenced by add_opt_method(), autoload_data(), autoload_defined_p(), autoload_delete(), classname(), constat_handle(), constat_reset(), cv_i(), cvar_lookup_at(), define_final0(), eql_i(), fc_path(), features_index_add_single(), flatten(), 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(), ivar_get(), load_lock(), lookup_method_table(), make_transcoder_entry(), method_entry_i(), obj_alloc_by_klass(), ole_vstr2wc(), r_entry0(), r_leave(), r_object0(), r_symlink(), rb_alias_variable(), rb_ary_diff(), rb_autoload(), rb_check_id(), rb_check_id_cstr(), 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_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_set(), rb_mark_generic_ivar(), rb_method_entry_make(), rb_obj_frozen_p(), rb_obj_remove_instance_variable(), rb_thread_key_p(), rb_thread_local_aref(), 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(), transcode_search_path(), transcode_search_path_i(), val2dispatch(), vm_callee_setup_keyword_arg(), vm_get_ev_const(), vm_getivar(), vm_setivar(), w_class(), w_encoding(), w_object(), w_symbol(), wmap_aref(), and wmap_aset().
Definition at line 342 of file st.c.
Referenced by autoload_memsize(), fiber_memsize(), memsize_of(), rb_generic_ivar_memsize(), thread_memsize(), vm_memsize(), and wmap_memsize().
Definition at line 1575 of file st.c.
Referenced by STATIC_ASSERT().
st_index_t st_numhash | ( | st_data_t | ) |
Definition at line 1581 of file st.c.
Referenced by STATIC_ASSERT().
int st_update | ( | st_table * | table, |
st_data_t | key, | ||
st_update_callback_func * | func, | ||
st_data_t | arg | ||
) |
Definition at line 839 of file st.c.
Referenced by kwmerge_i(), load_unlock(), ruby_init_ext(), wmap_finalize(), and zone_str().
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(), and syserr_initialize().
RUBY_EXTERN size_t strlcat | ( | char * | , |
const char * | , | ||
size_t | |||
) |
Referenced by dln_load(), rb_file_expand_path_internal(), and rb_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 7630 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 |
Definition at line 861 of file vm_backtrace.c.
Referenced by rb_thread_backtrace_m().
Definition at line 867 of file vm_backtrace.c.
Referenced by rb_thread_backtrace_locations_m().
|
static |
|
static |
warn_balanced | ( | "/" | , |
"regexp literal" | |||
) |
void* xcalloc | ( | size_t | , |
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 tINTEGER tPOW arg { $$ = dispatch3(binary, $2, ripper_intern("**"), $4); $$ = dispatch2(unary, ripper_intern("-@"), $$); } | tUMINUS_NUM tFLOAT 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 : 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; } lambda_body { lpar_beg = $<num>2; $$ = dispatch2(lambda, $3, $5); 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 : tINTEGER | tFLOAT | tUMINUS_NUM tINTEGER %prec tLOWEST { $$ = dispatch2(unary, ripper_intern("-@"), $2); } | tUMINUS_NUM tFLOAT %prec tLOWEST { $$ = dispatch2(unary, ripper_intern("-@"), $2); } ;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; } | f_args term { $$ = $1; 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_kw : tLABEL arg_value { arg_var(formal_argument(get_id($1))); $$ = assignable($1, $2); $$ = rb_assoc_new($$, $2); } ;f_block_kw : tLABEL primary_value { arg_var(formal_argument(get_id($1))); $$ = assignable($1, $2); $$ = rb_assoc_new($$, $2); } ;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 : tIDENTIFIER '=' arg_value { arg_var(formal_argument(get_id($1))); $$ = assignable($1, $3); $$ = rb_assoc_new($$, $3); } ;f_block_opt : tIDENTIFIER '=' primary_value { arg_var(formal_argument(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 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(lines)->klass = 0; for (i = 0; i < n; i++) RARRAY_PTR(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_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' && peek('\n')) { lex_p++; c = '\n'; } 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 char 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; 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 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return FALSE; return strncmp(eos, p, len) == 0;}#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); lex_strterm = 0; 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) { long i, n = RARRAY_LEN(ruby_debug_lines); const VALUE *p = RARRAY_PTR(ruby_debug_lines); for (i = 0; i < n; ++i) { rb_enc_associate_index(*p, 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 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)) { 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; 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; set_yylval_literal(rb_cstr_to_inum(tok(), 16, FALSE)); return tINTEGER; } 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; set_yylval_literal(rb_cstr_to_inum(tok(), 2, FALSE)); return tINTEGER; } 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; set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); return tINTEGER; } 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; set_yylval_literal(rb_cstr_to_inum(tok(), 8, FALSE)); return tINTEGER; } 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); set_yylval_literal(INT2FIX(0)); return tINTEGER; } } 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; } tokadd('.'); tokadd(c); is_float++; seen_point++; nondigit = 0; break; case 'e': case 'E': if (nondigit) { pushback(c); c = nondigit; goto decode_num; } if (seen_e) { goto decode_num; } tokadd(c); seen_e++; is_float++; nondigit = c; c = nextc(); if (c != '-' && c != '+') continue; tokadd(c); nondigit = c; 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) { double d = strtod(tok(), 0); if (errno == ERANGE) { rb_warningS("Float %s out of range", tok()); errno = 0; } set_yylval_literal(DBL2NUM(d)); return tFLOAT; } set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); return tINTEGER; } case ')': case '] __pad16__ |
stmt_or_begin __pad5__ |
command_call __pad9__ |
Definition at line 1317 of file ripper.y.
Referenced by apply2files(), call_asynchronous(), chown_internal(), chunk_i(), connect_blocking(), detach_process_watcher(), econv_set_replacement(), enc_names_i(), eval_string_from_file_helper(), EVENTSINK_Invoke(), exc_initialize(), exec_recursive(), fcntl(), fnmatch_brace(), glob_brace(), gzfile_wrap(), hash_aset(), hash_foreach_iter(), Init_bigdecimal(), init_golf(), inspect_enumerator(), io_flush_buffer_sync(), iterate_check_method(), iterate_method(), kwmerge_ii(), lazy_zip_func(), mark_const_entry_i(), mark_entry(), mark_key(), mark_keyvalue(), mark_method_entry_i(), marshal_dump(), marshal_load(), match_inspect_name_iter(), new_wrap(), nogvl_getaddrinfo(), nogvl_getnameinfo(), nogvl_ioctl(), NOINSERT_UPDATE_CALLBACK(), nucomp_s_polar(), obj_ivar_each(), onig_foreach_name(), onig_scan_env_set_error_string(), onigenc_apply_all_case_fold_with_map(), onigenc_ascii_apply_all_case_fold(), ossl_asn1_decode0(), ossl_dh_initialize(), ossl_dsa_initialize(), ossl_pkcs12_initialize(), ossl_pkcs7_initialize(), ossl_rsa_initialize(), ossl_sslctx_set_session_cache_mode(), ossl_sslctx_set_session_cache_size(), ossl_x509_initialize(), ossl_x509crl_initialize(), ossl_x509name_initialize(), ossl_x509req_initialize(), path_initialize(), proc_options(), range_each_func(), rb_ary_aref(), rb_check_funcall_with_hook(), rb_dlcfunc_call(), rb_f_integer(), rb_glob2(), rb_hash_update_callback(), rb_hash_update_func_callback(), rb_io_ioctl(), rb_reg_s_union(), rb_str_format(), rb_suppress_tracing(), rb_syserr_new(), rb_vm_call_cfunc(), rb_w32_open(), rb_w32_uopen(), rb_w32_wopen(), rb_waitpid_blocking(), recursive_join(), recvfrom_blocking(), reg_named_capture_assign_gen(), reg_named_capture_assign_iter(), rsock_send_blocking(), rsock_sendto_blocking(), ruby_brace_expand(), ruby_brace_glob0(), ruby_each_words(), ruby_set_argv(), search_convpath_i(), set_rawmode(), set_unblock_function(), setup_narg(), slicebefore_i(), st_foreach(), st_foreach_check(), st_update(), step_i(), strio_first(), sym_step_i(), time_init_1(), trans_open_i(), udp_init(), utime_internal(), vm_yield_with_cfunc(), w_obj_each(), w_object(), w_symbol(), wgetch_func(), and wgetstr_func().
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 1293 of file ripper.y.
Referenced by rb_str_format().
keyword_BEGIN |
mlhs_node keyword_variable |
command_asgn lhs |
Definition at line 1271 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 124 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 419 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 182 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 |
struct th_update_param * param |
Definition at line 688 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 653 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 1425 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(), and rb_obj_alloc().
RUBY_EXTERN VALUE rb_cBignum |
RUBY_EXTERN VALUE rb_cBinding |
Definition at line 1429 of file ripper.y.
Referenced by binding_dup(), eval_string_with_cref(), Init_Binding(), proc_binding(), and rb_vm_make_binding().
RUBY_EXTERN VALUE rb_cClass |
Definition at line 1430 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 1433 of file ripper.y.
Referenced by if(), Init_curses(), Init_Exception(), Init_marshal(), Init_Object(), Init_stringio(), Init_transcode(), Init_win32ole(), marshal_dump(), marshal_load(), pruby_register_instance(), rb_execarg_new(), and rsock_init_addrinfo().
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 1434 of file ripper.y.
Referenced by Init_Object(), rb_class_of(), and special_singleton_class_of().
RUBY_EXTERN VALUE rb_cFile |
Definition at line 1437 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 1438 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 1439 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 1440 of file ripper.y.
Referenced by cState_from_state_s(), generate_json(), Init_Hash(), make_compile_option(), rb_hash_new(), rb_hash_to_h(), recursive_hash(), vm_redefinition_check_flag(), and w_object().
RUBY_EXTERN VALUE rb_cInteger |
Definition at line 1441 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 1442 of file ripper.y.
Referenced by console_dev(), Init_File(), Init_IO(), Init_nonblock(), Init_stringio(), Init_wait(), InitVM_console(), parse(), path_binread(), path_each_line(), path_read(), path_readlines(), path_sysopen(), 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 1444 of file ripper.y.
Referenced by Init_Proc(), rb_obj_method(), rb_obj_public_method(), and umethod_bind().
RUBY_EXTERN VALUE rb_cModule |
Definition at line 1445 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 1447 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 1448 of file ripper.y.
Referenced by case_when_optimizable_literal(), Init_bigdecimal(), Init_Complex(), Init_Numeric(), Init_Rational(), k_numeric_p(), range_include(), 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 1426 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_class_hierarchy(), Init_Complex(), Init_Cont(), Init_cparse(), Init_curses(), 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_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_const_defined_0(), rb_const_get_0(), rb_const_set(), rb_define_class(), rb_define_class_id(), rb_define_const(), rb_define_global_const(), rb_define_module(), rb_execarg_fixup(), rb_export_method(), rb_f_catch(), rb_method_entry_make(), 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_undef(), rb_uninterruptible(), remove_method(), 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 1449 of file ripper.y.
Referenced by Init_Proc(), m_core_set_postexe(), proc_dup(), rb_block_lambda(), rb_block_proc(), vm_callee_setup_arg_complex(), vm_make_proc_from_block(), vm_yield_setup_block_args(), and vm_yield_with_cfunc().
RUBY_EXTERN VALUE rb_cRandom |
Definition at line 1450 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 1451 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 1452 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 1454 of file ripper.y.
Referenced by Init_generator(), and w_object().
RUBY_EXTERN VALUE rb_cStat |
RUBY_EXTERN VALUE rb_cString |
Definition at line 1456 of file ripper.y.
Referenced by code_page(), generate_json(), Init_Complex(), Init_pack(), Init_Rational(), Init_String(), Init_transcode(), intern_str(), NOINSERT_UPDATE_CALLBACK(), opt_eq_func(), rb_any_cmp(), rb_check_id(), rb_check_id_cstr(), rb_dlptr_s_to_ptr(), rb_enc_vsprintf(), rb_fiddle_ptr_s_to_ptr(), rb_file_join(), rb_id2str(), rb_intern3(), rb_str_b(), rb_str_buf_new(), rb_str_new(), rb_str_resurrect(), rb_str_to_s(), rb_sym_to_s(), require_libraries(), 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 1457 of file ripper.y.
Referenced by Init_Struct(), rb_struct_define(), and struct_ivar_get().
RUBY_EXTERN VALUE rb_cSymbol |
Definition at line 1458 of file ripper.y.
Referenced by Init_String(), rb_class_of(), and vm_redefinition_check_flag().
RUBY_EXTERN VALUE rb_cThread |
Definition at line 1459 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 1460 of file ripper.y.
Referenced by asn1time_to_time(), date_to_time(), datetime_to_time(), discrete_object_p(), folevariant_initialize(), Init_date_core(), 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 1461 of file ripper.y.
Referenced by Init_Object(), rb_class_of(), and special_singleton_class_of().
RUBY_EXTERN VALUE rb_cUnboundMethod |
Definition at line 1462 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 490 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 1471 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 1486 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 1476 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 1498 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 1489 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 1482 of file ripper.y.
Referenced by BigDecimal_DoDivmod(), Init_Numeric(), and rb_num_zerodiv().
RUBY_EXTERN VALUE rb_fs |
Definition at line 487 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 1418 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 1414 of file ripper.y.
Referenced by Init_eval(), Init_eval_method(), Init_GC(), Init_IO(), Init_Object(), Init_Proc(), Init_vm_eval(), InitVM_Enumerator(), and rb_define_global_function().
RUBY_EXTERN VALUE rb_mMath |
Definition at line 1420 of file ripper.y.
Referenced by float_arg(), Init_Math(), and numeric_arg().
RUBY_EXTERN VALUE rb_mProcess |
RUBY_EXTERN VALUE rb_mWaitReadable |
Definition at line 1422 of file ripper.y.
Referenced by Init_IO(), io_getpartial(), read_would_block(), rsock_s_accept_nonblock(), and rsock_s_recvfrom_nonblock().
RUBY_EXTERN VALUE rb_mWaitWritable |
Definition at line 1423 of file ripper.y.
Referenced by Init_IO(), rb_io_write_nonblock(), sock_connect_nonblock(), and write_would_block().
RUBY_EXTERN VALUE rb_output_fs |
RUBY_EXTERN VALUE rb_output_rs |
Definition at line 491 of file ripper.y.
Referenced by Init_IO(), proc_options(), and rb_io_print().
RUBY_EXTERN VALUE rb_rs |
Definition at line 489 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 1500 of file ripper.y.
Referenced by Init_IO(), 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 1500 of file ripper.y.
Referenced by argf_close(), argf_next_argv(), Init_IO(), Init_readline(), load_file_internal(), and rb_stdio_set_default_encoding().
RUBY_EXTERN VALUE rb_stdout |
Definition at line 1500 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().
RUBY_EXTERN char* ruby_sourcefile |
RUBY_EXTERN int ruby_sourceline |
error stmt |
stmts terms stmt_or_begin |
primary_value tCOLON2 operation2 command_args prec tLOWEST |
return tOP_ASGN |
Definition at line 7668 of file ripper.y.
Referenced by if(), and parser_yylex().
error top_stmt |
Definition at line 7646 of file ripper.y.
Referenced by if(), and parser_yylex().
mlhs_head tSTAR |
Definition at line 1543 of file ripper.y.
Referenced by parser_yylex().
return tSYMBEG |
Definition at line 7642 of file ripper.y.
Referenced by parser_yylex().