Ruby
1.9.3p551(2014-11-13revision48407)
|
#include "ruby/ruby.h"
Go to the source code of this file.
Data Structures | |
struct | cparse_params |
Variables | |
static VALUE | RaccBug |
static VALUE | CparseParams |
static ID | id_yydebug |
static ID | id_nexttoken |
static ID | id_onerror |
static ID | id_noreduce |
static ID | id_errstatus |
static ID | id_d_shift |
static ID | id_d_reduce |
static ID | id_d_accept |
static ID | id_d_read_token |
static ID | id_d_next_state |
static ID | id_d_e_pop |
#define AREF | ( | s, | |
idx | |||
) | ((0 <= idx && idx < RARRAY_LEN(s)) ? RARRAY_PTR(s)[idx] : Qnil) |
Definition at line 93 of file cparse.c.
Referenced by extract_user_token(), parse_main(), reduce0(), and vm_init_redefined_flag().
#define CP_FIN_ACCEPT 1 |
Definition at line 176 of file cparse.c.
Referenced by lexer_i(), and parse_main().
#define CP_FIN_CANTPOP 3 |
Definition at line 178 of file cparse.c.
Referenced by parse_main().
#define CP_FIN_EOT 2 |
Definition at line 177 of file cparse.c.
Referenced by parse_main().
#define CUT_TAIL | ( | s, | |
len | |||
) | cut_stack_tail(s, len) |
Definition at line 217 of file cparse.c.
Referenced by parse_main(), and reduce0().
#define D_puts | ( | msg | ) |
Definition at line 216 of file cparse.c.
Referenced by parse_main(), racc_cparse(), racc_yyparse(), and reduce0().
#define ERROR_TOKEN 1 |
Definition at line 30 of file cparse.c.
Referenced by parse_main().
#define FALSE 0 |
Definition at line 17 of file cparse.c.
Referenced by initialize_params(), and racc_cparse().
#define FINAL_TOKEN 0 |
Definition at line 31 of file cparse.c.
Referenced by initialize_params().
#define GET_TAIL | ( | s, | |
len | |||
) | get_stack_tail(s, len) |
Definition at line 63 of file cparse.c.
Referenced by basic_obj_respond_to(), bug_i(), call_trace_proc(), check_funcall(), chunk_ii(), collect_local_variables_in_iseq(), compile_colon2(), console_dev(), const_missing(), constant_to_sym(), count_objects(), count_objects_size(), cParser_initialize(), cState_configure(), cState_to_h(), cto_i(), cv_i(), defined_expr(), dir_initialize(), enum_zip(), exception_type2symbol(), exec_recursive(), gc_profile_record_get(), gc_profile_result(), gc_stat(), get_exception_sym2type(), gvar_i(), iconv_s_ctlmethods(), id2ref(), Init_Array(), Init_Enumerator(), Init_IO(), Init_ossl_ssl(), Init_syck(), Init_transcode(), ins_methods_push(), insn_make_insn_table(), insn_operand_intern(), int_ossl_asn1_decode0_cons(), int_ossl_asn1_decode0_prim(), iseq_compile_each(), iseq_data_to_ary(), iseq_load(), ivar_i(), list_i(), make_localjump_error(), make_struct(), method_missing(), method_name(), mnew(), ossl_asn1_class2sym(), ossl_asn1_initialize(), ossl_asn1eoc_initialize(), ossl_pkcs7_get_type(), ossl_sslctx_get_session_cache_stats(), r_object0(), rawmode_opt(), rb_catch(), rb_dlcfunc_calltype(), rb_exec_arg_prepare(), rb_f_exec(), rb_f_global_variables(), rb_f_local_variables(), rb_f_method_name(), rb_iseq_parameters(), rb_name_class(), rb_name_error(), rb_obj_respond_to(), rb_str_format(), rb_str_intern(), rb_struct_define(), rb_struct_define_without_accessor(), rb_struct_getmember(), rb_struct_s_def(), rb_throw(), realpath_rec(), recursive_list_access(), recursive_pop(), reg_named_capture_assign_iter(), register_label(), ripper_init_eventids1(), ripper_init_eventids2_table(), switch(), symbols_i(), thread_keys_i(), time_init_1(), unnamed_parameters(), vm_call0(), vm_call_method(), vm_method_missing(), and when_vals().
#define LAST_I | ( | s | ) | ((RARRAY_LEN(s) > 0) ? RARRAY_PTR(s)[RARRAY_LEN(s) - 1] : Qnil) |
Definition at line 124 of file cparse.c.
Referenced by parse_main(), and reduce0().
Definition at line 72 of file cparse.c.
Referenced by add(), bigand_int(), BigDecimal_to_i(), callback(), d_lite_minus(), d_lite_rshift(), date_zone_to_diff(), datetime_s_now(), f_addsub(), f_gcd(), f_imul(), fix_abs(), fix_and(), fix_divide(), fix_divmod(), fix_lshift(), fix_minus(), fix_mod(), fix_or(), fix_plus(), fix_succ(), fix_uminus(), fix_xor(), flatten(), generic_to_value(), GetVpValueWithPrec(), gmtimew(), Init_date_core(), init_leap_second_info(), initialize_params(), int_ossl_asn1_decode0_prim(), int_pow(), int_round_0(), localtimew(), mktime_do(), mul(), ossl_asn1_decode0(), ossl_sslctx_get_session_cache_mode(), ossl_sslctx_get_session_cache_size(), ossl_sslctx_get_session_cache_stats(), ossl_x509_get_version(), ossl_x509crl_get_version(), parse_ddd_cb(), parse_main(), parse_time2_cb(), quo(), r_bytes0(), rand_int(), rand_range(), range_max(), range_step(), rb_ary_count(), rb_ary_each_index(), rb_ary_fill(), rb_ary_index(), rb_ary_initialize(), rb_ary_length(), rb_ary_rindex(), rb_big_unpack(), rb_dlptr_size_get(), rb_exec_arg_addopt(), rb_int_pred(), rb_int_succ(), rb_obj_id(), rb_random_bytes(), rb_require_safe(), rb_str_bytesize(), rb_str_cmp_m(), rb_str_index_m(), rb_str_length(), rb_str_rindex_m(), rb_syck_io_str_read(), read_digits(), reduce0(), sec_fraction(), shift(), string_to_r_internal(), strio_get_lineno(), strio_get_pos(), strio_write(), struct_entry(), sub(), subs(), switch(), and timegmw_noleapsecond().
#define NEW_STACK | ( | ) | rb_ary_new2(STACK_INIT_LEN) |
Definition at line 121 of file cparse.c.
Referenced by initialize_params().
#define POP | ( | s | ) | rb_ary_pop(s) |
Definition at line 123 of file cparse.c.
Referenced by parse_main().
#define PUSH | ( | s, | |
i | |||
) | rb_ary_store(s, RARRAY_LEN(s), i) |
Definition at line 122 of file cparse.c.
Referenced by initialize_params(), reduce0(), and shift().
#define RACC_VERSION "1.4.5" |
Definition at line 27 of file cparse.c.
Referenced by Init_cparse().
#define REDUCE | ( | v, | |
act | |||
) |
Definition at line 437 of file cparse.c.
Referenced by parse_main().
Definition at line 66 of file cparse.c.
Referenced by check_exec_redirect(), check_exec_redirect_fd(), check_funcall_failed(), check_rounding_mode(), chunk_ii(), classname(), econv_opts(), esignal_init(), get_iconv_opt_i(), inspect_struct(), int_ossl_asn1_decode0_cons(), iseq_build_from_ary_body(), iseq_compile_each(), iseq_set_sequence(), iseq_specialized_instruction(), m_core_define_method(), m_core_define_singleton_method(), m_core_set_method_alias(), m_core_set_variable_alias(), m_core_undef_method(), make_struct(), match_aref(), match_backref_number(), ossl_asn1_initialize(), ossl_asn1_is_explicit(), ossl_asn1_tag_class(), ossl_asn1data_initialize(), ossl_pkcs7_sym2typeid(), ossl_sslctx_set_ssl_version(), r_object0(), raise_method_missing(), rb_dlcfunc_initialize(), rb_dlcfunc_set_calltype(), rb_enc_get_index(), rb_exec_arg_addopt(), rb_f_kill(), rb_iseq_build_from_ary(), rb_obj_id(), rb_struct_aref_id(), rb_struct_aset_id(), rb_struct_set(), rb_sym_to_s(), rb_to_id(), rsock_revlookup_flag(), rt_complete_frags(), sockopt_inspect(), switch(), sym_capitalize(), sym_downcase(), sym_empty(), sym_encoding(), sym_inspect(), sym_length(), sym_swapcase(), sym_to_proc(), sym_upcase(), tcl_protect_core(), trap_handler(), trap_signm(), value_to_id(), vm_call_method(), and w_object().
Definition at line 69 of file cparse.c.
Referenced by advice_arg_check(), case_when_optimizable_literal(), check_exec_redirect(), check_exec_redirect_fd(), chunk_ii(), constant_arg(), econv_opts(), enc_capable(), esignal_init(), get_iconv_opt_i(), iseq_build_from_ary_body(), iseq_compile_each(), ossl_asn1_initialize(), ossl_asn1_is_explicit(), ossl_asn1_tag_class(), ossl_asn1data_initialize(), raise_method_missing(), range_each(), range_step(), rb_any_cmp(), rb_check_type(), rb_enc_get_index(), rb_obj_id(), rb_struct_s_def(), reg_operand(), singleton_class_of(), sockopt_inspect(), sym_casecmp(), sym_cmp(), trap_handler(), value_to_id(), vm_call_method(), vm_define_method(), vm_throw(), and w_object().
#define TRUE 1 |
Definition at line 20 of file cparse.c.
Referenced by initialize_params(), and racc_yyparse().
#define vDEFAULT_TOKEN INT2FIX(DEFAULT_TOKEN) |
#define vERROR_TOKEN INT2FIX(ERROR_TOKEN) |
Definition at line 34 of file cparse.c.
Referenced by parse_main().
#define vFINAL_TOKEN INT2FIX(FINAL_TOKEN) |
Definition at line 35 of file cparse.c.
Referenced by parse_main().
|
static |
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 301 of file cparse.c.
References a, Check_Type, and T_ARRAY.
Referenced by initialize_params().
Definition at line 308 of file cparse.c.
References Check_Type, and T_HASH.
Referenced by initialize_params().
|
static |
Definition at line 278 of file cparse.c.
References lexer_i(), lexer_iter(), rb_iterate(), and cparse_params::value_v.
Referenced by racc_yyparse().
Definition at line 384 of file cparse.c.
References cparse_params::action_check, cparse_params::action_default, cparse_params::action_pointer, cparse_params::action_table, cparse_params::goto_check, cparse_params::goto_default, cparse_params::goto_pointer, cparse_params::goto_table, cparse_params::lexer, cparse_params::parser, rb_gc_mark(), cparse_params::reduce_table, cparse_params::retval, cparse_params::state, cparse_params::t, cparse_params::token_table, cparse_params::tstack, v, cparse_params::value_v, and cparse_params::vstack.
Referenced by racc_cparse(), and racc_yyparse().
Definition at line 112 of file cparse.c.
References rb_ary_pop().
|
static |
Definition at line 409 of file cparse.c.
References AREF, CLASS_OF, cparse_params::lex_is_iterator, cparse_params::lexmid, NIL_P, Qfalse, RARRAY_LEN, rb_class2name(), rb_eArgError, rb_eTypeError, rb_id2name(), rb_raise(), rb_str_new(), T_ARRAY, and TYPE.
Referenced by lexer_i(), and parse_main().
Definition at line 104 of file cparse.c.
References Qnil, RARRAY_LEN, RARRAY_PTR(), and rb_ary_new4().
Definition at line 795 of file cparse.c.
References CparseParams, id_d_accept, id_d_e_pop, id_d_next_state, id_d_read_token, id_d_reduce, id_d_shift, id_errstatus, id_nexttoken, id_noreduce, id_onerror, id_yydebug, racc_cparse(), RACC_VERSION, racc_yyparse(), RaccBug, rb_cObject, rb_const_defined(), rb_const_get(), rb_const_get_at(), rb_define_class_under(), rb_define_const(), rb_define_module(), rb_define_private_method(), rb_eRuntimeError, rb_intern, and rb_str_new2().
|
static |
Definition at line 321 of file cparse.c.
References cparse_params::action_check, cparse_params::action_default, cparse_params::action_pointer, cparse_params::action_table, assert_array(), assert_hash(), assert_integer(), Check_Type, cparse_params::curstate, Data_Get_Struct, cparse_params::debug, cparse_params::errstatus, FALSE, cparse_params::fin, FINAL_TOKEN, cparse_params::goto_check, cparse_params::goto_default, cparse_params::goto_pointer, cparse_params::goto_table, id_errstatus, id_yydebug, INT2FIX, cparse_params::lex_is_iterator, cparse_params::lexer, cparse_params::lexmid, LONG2NUM, cparse_params::nerr, NEW_STACK, NIL_P, cparse_params::nt_base, cparse_params::parser, parser, PUSH, Qnil, RaccBug, RARRAY_LEN, RARRAY_PTR(), rb_iv_set(), rb_ivar_get(), rb_ivar_set(), rb_raise(), cparse_params::reduce_n, cparse_params::reduce_table, cparse_params::retval, RTEST, cparse_params::shift_n, cparse_params::state, cparse_params::t, T_ARRAY, cparse_params::token_table, TRUE, cparse_params::tstack, cparse_params::use_result_var, v, value_to_id(), cparse_params::value_v, and cparse_params::vstack.
Referenced by racc_cparse(), and racc_yyparse().
Definition at line 285 of file cparse.c.
References CP_FIN_ACCEPT, Data_Get_Struct, extract_user_token(), cparse_params::fin, parse_main(), Qnil, rb_eArgError, rb_iter_break(), rb_raise(), tok, v, and val.
Referenced by call_lexer().
Definition at line 268 of file cparse.c.
References Data_Get_Struct, cparse_params::lexer, cparse_params::lexmid, Qnil, rb_funcall(), and v.
Referenced by call_lexer().
Definition at line 88 of file cparse.c.
References NUM2LONG().
Referenced by parse_main(), reduce(), and reduce0().
|
static |
Definition at line 453 of file cparse.c.
References cparse_params::action_check, cparse_params::action_default, cparse_params::action_pointer, cparse_params::action_table, AREF, CP_FIN_ACCEPT, CP_FIN_CANTPOP, CP_FIN_EOT, cparse_params::curstate, D_printf, D_puts, cparse_params::debug, ERROR_TOKEN, cparse_params::errstatus, extract_user_token(), cparse_params::fin, cparse_params::i, i, id_d_accept, id_d_e_pop, id_d_next_state, id_d_read_token, id_errstatus, id_nexttoken, id_onerror, LAST_I, cparse_params::lex_is_iterator, LONG2NUM, cparse_params::nerr, NIL_P, NUM2LONG(), num_to_long(), cparse_params::parser, POP, Qfalse, Qnil, RaccBug, RARRAY_LEN, RARRAY_PTR(), rb_eArgError, rb_funcall(), rb_hash_aref(), rb_ivar_set(), rb_raise(), REDUCE, cparse_params::reduce_n, cparse_params::retval, SHIFT, cparse_params::shift_n, cparse_params::state, cparse_params::t, cparse_params::token_table, cparse_params::tstack, vERROR_TOKEN, vFINAL_TOKEN, and cparse_params::vstack.
Referenced by lexer_i(), racc_cparse(), and racc_yyparse().
Definition at line 221 of file cparse.c.
References cparse_params_mark(), CparseParams, D_puts, Data_Make_Struct, FALSE, initialize_params(), cparse_params::lex_is_iterator, parse_main(), Qnil, cparse_params::retval, RTEST, cparse_params::sys_debug, and v.
Referenced by Init_cparse().
|
static |
Definition at line 238 of file cparse.c.
References call_lexer(), cparse_params_mark(), CparseParams, D_puts, Data_Make_Struct, cparse_params::fin, initialize_params(), cparse_params::lex_is_iterator, cparse_params::lexmid, parse_main(), Qnil, rb_eArgError, rb_id2name(), rb_raise(), cparse_params::retval, RTEST, cparse_params::sys_debug, TRUE, and v.
Referenced by Init_cparse().
|
static |
Definition at line 675 of file cparse.c.
References code, cparse_params::errstatus, id_errstatus, NUM2INT, num_to_long(), cparse_params::parser, rb_catch(), rb_ivar_get(), reduce0(), cparse_params::ruleno, and cparse_params::value_v.
Definition at line 685 of file cparse.c.
References AREF, cparse_params::curstate, CUT_TAIL, D_printf, D_puts, Data_Get_Struct, cparse_params::debug, GET_TAIL, cparse_params::goto_check, cparse_params::goto_default, cparse_params::goto_pointer, cparse_params::goto_table, i, id_d_reduce, id_noreduce, INT2FIX, LAST_I, len, LONG2NUM, NIL_P, cparse_params::nt_base, NUM2LONG(), num_to_long(), cparse_params::parser, PUSH, Qnil, Qundef, RaccBug, RARRAY_LEN, RARRAY_PTR(), rb_ary_new(), rb_funcall(), rb_raise(), cparse_params::reduce_table, cparse_params::ruleno, cparse_params::state, cparse_params::tstack, cparse_params::use_result_var, v, value_to_id(), and cparse_params::vstack.
Referenced by reduce().
|
static |
Definition at line 662 of file cparse.c.
References cparse_params::curstate, cparse_params::debug, id_d_shift, LONG2NUM, cparse_params::parser, PUSH, rb_funcall(), cparse_params::state, cparse_params::tstack, and cparse_params::vstack.
Definition at line 79 of file cparse.c.
References rb_eTypeError, rb_raise(), SYM2ID, and SYMBOL_P.
Referenced by initialize_params(), and reduce0().
|
static |
Definition at line 42 of file cparse.c.
Referenced by Init_cparse(), racc_cparse(), and racc_yyparse().
|
static |
Definition at line 52 of file cparse.c.
Referenced by Init_cparse(), and parse_main().
|
static |
Definition at line 55 of file cparse.c.
Referenced by Init_cparse(), and parse_main().
|
static |
Definition at line 54 of file cparse.c.
Referenced by Init_cparse(), and parse_main().
|
static |
Definition at line 53 of file cparse.c.
Referenced by Init_cparse(), and parse_main().
|
static |
Definition at line 51 of file cparse.c.
Referenced by Init_cparse(), and reduce0().
|
static |
Definition at line 50 of file cparse.c.
Referenced by Init_cparse(), and shift().
|
static |
Definition at line 48 of file cparse.c.
Referenced by Init_cparse(), initialize_params(), parse_main(), and reduce().
|
static |
Definition at line 45 of file cparse.c.
Referenced by Init_cparse(), and parse_main().
|
static |
Definition at line 47 of file cparse.c.
Referenced by Init_cparse(), and reduce0().
|
static |
Definition at line 46 of file cparse.c.
Referenced by Init_cparse(), and parse_main().
|
static |
Definition at line 44 of file cparse.c.
Referenced by Init_cparse(), and initialize_params().
|
static |
Definition at line 41 of file cparse.c.
Referenced by Init_cparse(), initialize_params(), parse_main(), and reduce0().