Class: Ruby30Parser
- Inherits:
-
RubyParser::Parser
- Object
- Racc::Parser
- RubyParser::Parser
- Ruby30Parser
- Includes:
- RubyLexer::State::Values
- Defined in:
- lib/ruby30_parser.rb
Direct Known Subclasses
Constant Summary collapse
- Racc_arg =
[ racc_action_table, racc_action_check, racc_action_default, racc_action_pointer, racc_goto_table, racc_goto_check, racc_goto_default, racc_goto_pointer, racc_nt_base, racc_reduce_table, racc_token_table, racc_shift_n, racc_reduce_n, racc_use_result_var ]
- Racc_token_to_s_table =
[ "$end", "error", "kCLASS", "kMODULE", "kDEF", "kUNDEF", "kBEGIN", "kRESCUE", "kENSURE", "kEND", "kIF", "kUNLESS", "kTHEN", "kELSIF", "kELSE", "kCASE", "kWHEN", "kWHILE", "kUNTIL", "kFOR", "kBREAK", "kNEXT", "kREDO", "kRETRY", "kIN", "kDO", "kDO_COND", "kDO_BLOCK", "kDO_LAMBDA", "kRETURN", "kYIELD", "kSUPER", "kSELF", "kNIL", "kTRUE", "kFALSE", "kAND", "kOR", "kNOT", "kIF_MOD", "kUNLESS_MOD", "kWHILE_MOD", "kUNTIL_MOD", "kRESCUE_MOD", "kALIAS", "kDEFINED", "klBEGIN", "klEND", "k__LINE__", "k__FILE__", "k__ENCODING__", "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", "tCONSTANT", "tLABEL", "tCVAR", "tNTH_REF", "tBACK_REF", "tSTRING_CONTENT", "tINTEGER", "tFLOAT", "tREGEXP_END", "tUPLUS", "tUMINUS", "tUMINUS_NUM", "tPOW", "tCMP", "tEQ", "tEQQ", "tNEQ", "tGEQ", "tLEQ", "tANDOP", "tOROP", "tMATCH", "tNMATCH", "tDOT", "tDOT2", "tDOT3", "tAREF", "tASET", "tLSHFT", "tRSHFT", "tCOLON2", "tCOLON3", "tOP_ASGN", "tASSOC", "tLPAREN", "tLPAREN2", "tRPAREN", "tLPAREN_ARG", "tLBRACK", "tLBRACK2", "tRBRACK", "tLBRACE", "tLBRACE_ARG", "tSTAR", "tSTAR2", "tAMPER", "tAMPER2", "tTILDE", "tPERCENT", "tDIVIDE", "tPLUS", "tMINUS", "tLT", "tGT", "tPIPE", "tBANG", "tCARET", "tLCURLY", "tRCURLY", "tBACK_REF2", "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", "tWORDS_BEG", "tQWORDS_BEG", "tSTRING_DBEG", "tSTRING_DVAR", "tSTRING_END", "tSTRING", "tSYMBOL", "tNL", "tEH", "tCOLON", "tCOMMA", "tSPACE", "tSEMI", "tLAMBDA", "tLAMBEG", "tDSTAR", "tCHAR", "tSYMBOLS_BEG", "tQSYMBOLS_BEG", "tSTRING_DEND", "tUBANG", "tRATIONAL", "tIMAGINARY", "tLABEL_END", "tLONELY", "tBDOT2", "tBDOT3", "tLOWEST", "tEQL", "$start", "program", "top_compstmt", "@1", "top_stmts", "opt_terms", "none", "top_stmt", "terms", "stmt", "begin_block", "@2", "bodystmt", "@3", "compstmt", "opt_rescue", "k_else", "opt_ensure", "@4", "stmts", "stmt_or_begin", "fitem", "undef_list", "expr_value", "command_asgn", "mlhs", "command_call", "lhs", "mrhs", "mrhs_arg", "expr", "@5", "command_rhs", "var_lhs", "primary_value", "opt_call_args", "rbracket", "call_op", "backref", "opt_nl", "arg", "expr_value_do", "do", "@6", "@7", "command", "block_command", "block_call", "call_op2", "operation2", "command_args", "cmd_brace_block", "brace_body", "fcall", "@8", "operation", "k_return", "call_args", "mlhs_basic", "mlhs_inner", "rparen", "mlhs_head", "mlhs_item", "mlhs_node", "mlhs_post", "user_variable", "keyword_variable", "cname", "cpath", "fname", "op", "reswords", "fsym", "symbol", "dsym", "@9", "arg_rhs", "simple_numeric", "rel_expr", "primary", "relop", "@10", "arg_value", "aref_args", "args", "trailer", "assocs", "paren_args", "opt_paren_args", "opt_block_arg", "block_arg", "@11", "literal", "strings", "xstring", "regexp", "words", "qwords", "symbols", "qsymbols", "var_ref", "k_begin", "k_end", "assoc_list", "brace_block", "method_call", "lambda", "k_if", "then", "if_tail", "k_unless", "opt_else", "k_while", "k_until", "k_case", "case_body", "k_for", "for_var", "k_class", "superclass", "term", "k_module", "k_def", "f_arglist", "singleton", "dot_or_colon", "@12", "@13", "@14", "@15", "@16", "@17", "@18", "@19", "@20", "@21", "@22", "@23", "@24", "@25", "@26", "@27", "k_do", "k_do_block", "k_rescue", "k_ensure", "k_when", "k_elsif", "f_marg", "f_norm_arg", "f_margs", "f_marg_list", "block_args_tail", "f_block_kwarg", "f_kwrest", "opt_f_block_arg", "f_block_arg", "opt_block_args_tail", "block_param", "f_arg", "f_block_optarg", "f_rest_arg", "opt_block_param", "block_param_def", "opt_bv_decl", "bv_decls", "bvar", "f_bad_arg", "f_larglist", "lambda_body", "@28", "@29", "f_args", "do_block", "do_body", "operation3", "@30", "@31", "@32", "@33", "@34", "@35", "@36", "cases", "@37", "exc_list", "exc_var", "numeric", "string", "string1", "string_contents", "xstring_contents", "regexp_contents", "word_list", "word", "string_content", "symbol_list", "@38", "qword_list", "qsym_list", "string_dvar", "@39", "@40", "sym", "@41", "args_tail", "@42", "f_kwarg", "opt_args_tail", "f_optarg", "f_arg_asgn", "f_arg_item", "f_label", "f_kw", "f_block_kw", "kwrest_mark", "f_opt", "f_block_opt", "restarg_mark", "blkarg_mark", "@43", "assoc" ]
- Racc_debug_parser =
false
Constants included from RubyLexer::State::Values
RubyLexer::State::Values::EXPR_ARG, RubyLexer::State::Values::EXPR_ARG_ANY, RubyLexer::State::Values::EXPR_BEG, RubyLexer::State::Values::EXPR_BEG_ANY, RubyLexer::State::Values::EXPR_CLASS, RubyLexer::State::Values::EXPR_CMDARG, RubyLexer::State::Values::EXPR_DOT, RubyLexer::State::Values::EXPR_END, RubyLexer::State::Values::EXPR_ENDARG, RubyLexer::State::Values::EXPR_ENDFN, RubyLexer::State::Values::EXPR_END_ANY, RubyLexer::State::Values::EXPR_FITEM, RubyLexer::State::Values::EXPR_FNAME, RubyLexer::State::Values::EXPR_LAB, RubyLexer::State::Values::EXPR_LABEL, RubyLexer::State::Values::EXPR_LABELED, RubyLexer::State::Values::EXPR_LIT, RubyLexer::State::Values::EXPR_MID, RubyLexer::State::Values::EXPR_NONE, RubyLexer::State::Values::EXPR_NUM, RubyLexer::State::Values::EXPR_PAD, RubyLexer::State::Values::EXPR_PAR, RubyLexer::State::Values::STR_DQUOTE, RubyLexer::State::Values::STR_DSYM, RubyLexer::State::Values::STR_DWORD, RubyLexer::State::Values::STR_FUNC_BORING, RubyLexer::State::Values::STR_FUNC_ESCAPE, RubyLexer::State::Values::STR_FUNC_EXPAND, RubyLexer::State::Values::STR_FUNC_ICNTNT, RubyLexer::State::Values::STR_FUNC_INDENT, RubyLexer::State::Values::STR_FUNC_LABEL, RubyLexer::State::Values::STR_FUNC_LIST, RubyLexer::State::Values::STR_FUNC_QWORDS, RubyLexer::State::Values::STR_FUNC_REGEXP, RubyLexer::State::Values::STR_FUNC_SYMBOL, RubyLexer::State::Values::STR_FUNC_TERM, RubyLexer::State::Values::STR_REGEXP, RubyLexer::State::Values::STR_SQUOTE, RubyLexer::State::Values::STR_SSYM, RubyLexer::State::Values::STR_SWORD, RubyLexer::State::Values::STR_XQUOTE
Constants included from RubyParserStuff
RubyParserStuff::ARG_TYPES, RubyParserStuff::ENCODING_ORDER, RubyParserStuff::JUMP_TYPE, RubyParserStuff::TAB_WIDTH, RubyParserStuff::VERSION
Instance Attribute Summary
Attributes included from RubyParserStuff
#canonicalize_conditions, #comments, #env, #file, #in_def, #in_kwarg, #in_single, #last_token_type, #lexer
Instance Method Summary collapse
-
#_reduce_1(val, _values, result) ⇒ Object
reduce 0 omitted.
- #_reduce_10(val, _values, result) ⇒ Object
- #_reduce_100(val, _values, result) ⇒ Object
- #_reduce_101(val, _values, result) ⇒ Object
- #_reduce_102(val, _values, result) ⇒ Object
- #_reduce_103(val, _values, result) ⇒ Object
- #_reduce_104(val, _values, result) ⇒ Object
- #_reduce_105(val, _values, result) ⇒ Object
- #_reduce_106(val, _values, result) ⇒ Object
- #_reduce_107(val, _values, result) ⇒ Object
- #_reduce_108(val, _values, result) ⇒ Object
- #_reduce_109(val, _values, result) ⇒ Object
- #_reduce_11(val, _values, result) ⇒ Object
- #_reduce_110(val, _values, result) ⇒ Object
- #_reduce_111(val, _values, result) ⇒ Object
- #_reduce_112(val, _values, result) ⇒ Object
- #_reduce_113(val, _values, result) ⇒ Object
- #_reduce_114(val, _values, result) ⇒ Object
- #_reduce_115(val, _values, result) ⇒ Object
- #_reduce_116(val, _values, result) ⇒ Object
- #_reduce_117(val, _values, result) ⇒ Object
-
#_reduce_119(val, _values, result) ⇒ Object
reduce 118 omitted.
- #_reduce_12(val, _values, result) ⇒ Object
- #_reduce_120(val, _values, result) ⇒ Object
- #_reduce_121(val, _values, result) ⇒ Object
-
#_reduce_125(val, _values, result) ⇒ Object
reduce 124 omitted.
- #_reduce_126(val, _values, result) ⇒ Object
-
#_reduce_129(val, _values, result) ⇒ Object
reduce 128 omitted.
- #_reduce_13(val, _values, result) ⇒ Object
-
#_reduce_131(val, _values, result) ⇒ Object
reduce 130 omitted.
- #_reduce_132(val, _values, result) ⇒ Object
- #_reduce_133(val, _values, result) ⇒ Object
- #_reduce_14(val, _values, result) ⇒ Object
- #_reduce_15(val, _values, result) ⇒ Object
- #_reduce_16(val, _values, result) ⇒ Object
-
#_reduce_19(val, _values, result) ⇒ Object
reduce 18 omitted.
- #_reduce_2(val, _values, result) ⇒ Object
- #_reduce_20(val, _values, result) ⇒ Object
-
#_reduce_206(val, _values, result) ⇒ Object
reduce 205 omitted.
- #_reduce_207(val, _values, result) ⇒ Object
- #_reduce_208(val, _values, result) ⇒ Object
- #_reduce_209(val, _values, result) ⇒ Object
- #_reduce_210(val, _values, result) ⇒ Object
- #_reduce_211(val, _values, result) ⇒ Object
- #_reduce_212(val, _values, result) ⇒ Object
- #_reduce_213(val, _values, result) ⇒ Object
- #_reduce_214(val, _values, result) ⇒ Object
- #_reduce_215(val, _values, result) ⇒ Object
- #_reduce_216(val, _values, result) ⇒ Object
- #_reduce_217(val, _values, result) ⇒ Object
- #_reduce_218(val, _values, result) ⇒ Object
- #_reduce_219(val, _values, result) ⇒ Object
-
#_reduce_22(val, _values, result) ⇒ Object
reduce 21 omitted.
- #_reduce_220(val, _values, result) ⇒ Object
- #_reduce_221(val, _values, result) ⇒ Object
- #_reduce_222(val, _values, result) ⇒ Object
- #_reduce_223(val, _values, result) ⇒ Object
- #_reduce_224(val, _values, result) ⇒ Object
- #_reduce_225(val, _values, result) ⇒ Object
- #_reduce_226(val, _values, result) ⇒ Object
- #_reduce_227(val, _values, result) ⇒ Object
- #_reduce_228(val, _values, result) ⇒ Object
- #_reduce_229(val, _values, result) ⇒ Object
- #_reduce_23(val, _values, result) ⇒ Object
- #_reduce_230(val, _values, result) ⇒ Object
- #_reduce_231(val, _values, result) ⇒ Object
- #_reduce_232(val, _values, result) ⇒ Object
- #_reduce_233(val, _values, result) ⇒ Object
- #_reduce_234(val, _values, result) ⇒ Object
-
#_reduce_236(val, _values, result) ⇒ Object
reduce 235 omitted.
- #_reduce_237(val, _values, result) ⇒ Object
- #_reduce_238(val, _values, result) ⇒ Object
- #_reduce_239(val, _values, result) ⇒ Object
- #_reduce_24(val, _values, result) ⇒ Object
- #_reduce_240(val, _values, result) ⇒ Object
- #_reduce_241(val, _values, result) ⇒ Object
- #_reduce_242(val, _values, result) ⇒ Object
- #_reduce_243(val, _values, result) ⇒ Object
- #_reduce_244(val, _values, result) ⇒ Object
- #_reduce_245(val, _values, result) ⇒ Object
- #_reduce_246(val, _values, result) ⇒ Object
- #_reduce_247(val, _values, result) ⇒ Object
- #_reduce_248(val, _values, result) ⇒ Object
- #_reduce_25(val, _values, result) ⇒ Object
-
#_reduce_254(val, _values, result) ⇒ Object
reduce 253 omitted.
- #_reduce_255(val, _values, result) ⇒ Object
- #_reduce_256(val, _values, result) ⇒ Object
-
#_reduce_258(val, _values, result) ⇒ Object
reduce 257 omitted.
- #_reduce_259(val, _values, result) ⇒ Object
- #_reduce_26(val, _values, result) ⇒ Object
- #_reduce_260(val, _values, result) ⇒ Object
-
#_reduce_262(val, _values, result) ⇒ Object
reduce 261 omitted.
- #_reduce_263(val, _values, result) ⇒ Object
-
#_reduce_268(val, _values, result) ⇒ Object
reduce 267 omitted.
- #_reduce_269(val, _values, result) ⇒ Object
- #_reduce_27(val, _values, result) ⇒ Object
- #_reduce_270(val, _values, result) ⇒ Object
- #_reduce_271(val, _values, result) ⇒ Object
- #_reduce_272(val, _values, result) ⇒ Object
- #_reduce_273(val, _values, result) ⇒ Object
- #_reduce_274(val, _values, result) ⇒ Object
- #_reduce_275(val, _values, result) ⇒ Object
- #_reduce_276(val, _values, result) ⇒ Object
- #_reduce_277(val, _values, result) ⇒ Object
- #_reduce_278(val, _values, result) ⇒ Object
- #_reduce_279(val, _values, result) ⇒ Object
- #_reduce_28(val, _values, result) ⇒ Object
-
#_reduce_281(val, _values, result) ⇒ Object
reduce 280 omitted.
- #_reduce_282(val, _values, result) ⇒ Object
- #_reduce_283(val, _values, result) ⇒ Object
- #_reduce_284(val, _values, result) ⇒ Object
- #_reduce_285(val, _values, result) ⇒ Object
- #_reduce_286(val, _values, result) ⇒ Object
- #_reduce_287(val, _values, result) ⇒ Object
- #_reduce_288(val, _values, result) ⇒ Object
- #_reduce_289(val, _values, result) ⇒ Object
- #_reduce_29(val, _values, result) ⇒ Object
- #_reduce_3(val, _values, result) ⇒ Object
- #_reduce_30(val, _values, result) ⇒ Object
-
#_reduce_300(val, _values, result) ⇒ Object
reduce 299 omitted.
- #_reduce_301(val, _values, result) ⇒ Object
- #_reduce_302(val, _values, result) ⇒ Object
- #_reduce_303(val, _values, result) ⇒ Object
- #_reduce_304(val, _values, result) ⇒ Object
- #_reduce_305(val, _values, result) ⇒ Object
- #_reduce_306(val, _values, result) ⇒ Object
- #_reduce_307(val, _values, result) ⇒ Object
- #_reduce_308(val, _values, result) ⇒ Object
- #_reduce_309(val, _values, result) ⇒ Object
- #_reduce_31(val, _values, result) ⇒ Object
- #_reduce_310(val, _values, result) ⇒ Object
- #_reduce_311(val, _values, result) ⇒ Object
- #_reduce_312(val, _values, result) ⇒ Object
- #_reduce_313(val, _values, result) ⇒ Object
- #_reduce_314(val, _values, result) ⇒ Object
- #_reduce_315(val, _values, result) ⇒ Object
- #_reduce_316(val, _values, result) ⇒ Object
- #_reduce_317(val, _values, result) ⇒ Object
- #_reduce_318(val, _values, result) ⇒ Object
- #_reduce_319(val, _values, result) ⇒ Object
- #_reduce_32(val, _values, result) ⇒ Object
- #_reduce_320(val, _values, result) ⇒ Object
- #_reduce_321(val, _values, result) ⇒ Object
-
#_reduce_323(val, _values, result) ⇒ Object
reduce 322 omitted.
- #_reduce_324(val, _values, result) ⇒ Object
- #_reduce_325(val, _values, result) ⇒ Object
- #_reduce_326(val, _values, result) ⇒ Object
- #_reduce_327(val, _values, result) ⇒ Object
- #_reduce_328(val, _values, result) ⇒ Object
- #_reduce_329(val, _values, result) ⇒ Object
- #_reduce_33(val, _values, result) ⇒ Object
- #_reduce_330(val, _values, result) ⇒ Object
- #_reduce_331(val, _values, result) ⇒ Object
- #_reduce_332(val, _values, result) ⇒ Object
- #_reduce_333(val, _values, result) ⇒ Object
- #_reduce_334(val, _values, result) ⇒ Object
- #_reduce_335(val, _values, result) ⇒ Object
- #_reduce_336(val, _values, result) ⇒ Object
- #_reduce_337(val, _values, result) ⇒ Object
- #_reduce_338(val, _values, result) ⇒ Object
- #_reduce_339(val, _values, result) ⇒ Object
- #_reduce_34(val, _values, result) ⇒ Object
- #_reduce_340(val, _values, result) ⇒ Object
- #_reduce_341(val, _values, result) ⇒ Object
- #_reduce_342(val, _values, result) ⇒ Object
- #_reduce_343(val, _values, result) ⇒ Object
- #_reduce_344(val, _values, result) ⇒ Object
- #_reduce_345(val, _values, result) ⇒ Object
- #_reduce_346(val, _values, result) ⇒ Object
- #_reduce_347(val, _values, result) ⇒ Object
- #_reduce_348(val, _values, result) ⇒ Object
- #_reduce_349(val, _values, result) ⇒ Object
- #_reduce_350(val, _values, result) ⇒ Object
- #_reduce_351(val, _values, result) ⇒ Object
- #_reduce_352(val, _values, result) ⇒ Object
-
#_reduce_36(val, _values, result) ⇒ Object
reduce 35 omitted.
- #_reduce_37(val, _values, result) ⇒ Object
-
#_reduce_378(val, _values, result) ⇒ Object
reduce 377 omitted.
- #_reduce_38(val, _values, result) ⇒ Object
-
#_reduce_380(val, _values, result) ⇒ Object
reduce 379 omitted.
-
#_reduce_382(val, _values, result) ⇒ Object
reduce 381 omitted.
-
#_reduce_384(val, _values, result) ⇒ Object
reduce 383 omitted.
- #_reduce_385(val, _values, result) ⇒ Object
- #_reduce_386(val, _values, result) ⇒ Object
- #_reduce_387(val, _values, result) ⇒ Object
- #_reduce_388(val, _values, result) ⇒ Object
- #_reduce_389(val, _values, result) ⇒ Object
- #_reduce_390(val, _values, result) ⇒ Object
- #_reduce_391(val, _values, result) ⇒ Object
- #_reduce_392(val, _values, result) ⇒ Object
- #_reduce_393(val, _values, result) ⇒ Object
- #_reduce_394(val, _values, result) ⇒ Object
- #_reduce_395(val, _values, result) ⇒ Object
- #_reduce_396(val, _values, result) ⇒ Object
- #_reduce_397(val, _values, result) ⇒ Object
- #_reduce_398(val, _values, result) ⇒ Object
- #_reduce_399(val, _values, result) ⇒ Object
-
#_reduce_40(val, _values, result) ⇒ Object
reduce 39 omitted.
- #_reduce_400(val, _values, result) ⇒ Object
-
#_reduce_402(val, _values, result) ⇒ Object
reduce 401 omitted.
- #_reduce_403(val, _values, result) ⇒ Object
- #_reduce_404(val, _values, result) ⇒ Object
- #_reduce_405(val, _values, result) ⇒ Object
- #_reduce_406(val, _values, result) ⇒ Object
- #_reduce_407(val, _values, result) ⇒ Object
- #_reduce_408(val, _values, result) ⇒ Object
- #_reduce_409(val, _values, result) ⇒ Object
- #_reduce_41(val, _values, result) ⇒ Object
- #_reduce_410(val, _values, result) ⇒ Object
- #_reduce_411(val, _values, result) ⇒ Object
- #_reduce_412(val, _values, result) ⇒ Object
- #_reduce_413(val, _values, result) ⇒ Object
- #_reduce_414(val, _values, result) ⇒ Object
- #_reduce_415(val, _values, result) ⇒ Object
- #_reduce_416(val, _values, result) ⇒ Object
- #_reduce_417(val, _values, result) ⇒ Object
- #_reduce_418(val, _values, result) ⇒ Object
- #_reduce_419(val, _values, result) ⇒ Object
- #_reduce_42(val, _values, result) ⇒ Object
- #_reduce_420(val, _values, result) ⇒ Object
- #_reduce_421(val, _values, result) ⇒ Object
-
#_reduce_423(val, _values, result) ⇒ Object
reduce 422 omitted.
- #_reduce_424(val, _values, result) ⇒ Object
- #_reduce_425(val, _values, result) ⇒ Object
- #_reduce_426(val, _values, result) ⇒ Object
-
#_reduce_428(val, _values, result) ⇒ Object
reduce 427 omitted.
- #_reduce_429(val, _values, result) ⇒ Object
- #_reduce_43(val, _values, result) ⇒ Object
- #_reduce_430(val, _values, result) ⇒ Object
- #_reduce_431(val, _values, result) ⇒ Object
- #_reduce_432(val, _values, result) ⇒ Object
- #_reduce_433(val, _values, result) ⇒ Object
- #_reduce_434(val, _values, result) ⇒ Object
- #_reduce_435(val, _values, result) ⇒ Object
- #_reduce_436(val, _values, result) ⇒ Object
- #_reduce_437(val, _values, result) ⇒ Object
- #_reduce_438(val, _values, result) ⇒ Object
- #_reduce_439(val, _values, result) ⇒ Object
- #_reduce_44(val, _values, result) ⇒ Object
- #_reduce_440(val, _values, result) ⇒ Object
- #_reduce_441(val, _values, result) ⇒ Object
- #_reduce_442(val, _values, result) ⇒ Object
- #_reduce_443(val, _values, result) ⇒ Object
- #_reduce_444(val, _values, result) ⇒ Object
- #_reduce_445(val, _values, result) ⇒ Object
- #_reduce_446(val, _values, result) ⇒ Object
- #_reduce_447(val, _values, result) ⇒ Object
- #_reduce_448(val, _values, result) ⇒ Object
- #_reduce_449(val, _values, result) ⇒ Object
- #_reduce_45(val, _values, result) ⇒ Object
- #_reduce_450(val, _values, result) ⇒ Object
- #_reduce_451(val, _values, result) ⇒ Object
- #_reduce_452(val, _values, result) ⇒ Object
- #_reduce_453(val, _values, result) ⇒ Object
- #_reduce_454(val, _values, result) ⇒ Object
- #_reduce_455(val, _values, result) ⇒ Object
- #_reduce_456(val, _values, result) ⇒ Object
- #_reduce_457(val, _values, result) ⇒ Object
- #_reduce_458(val, _values, result) ⇒ Object
- #_reduce_459(val, _values, result) ⇒ Object
- #_reduce_46(val, _values, result) ⇒ Object
- #_reduce_460(val, _values, result) ⇒ Object
- #_reduce_461(val, _values, result) ⇒ Object
-
#_reduce_464(val, _values, result) ⇒ Object
reduce 463 omitted.
- #_reduce_465(val, _values, result) ⇒ Object
- #_reduce_466(val, _values, result) ⇒ Object
-
#_reduce_469(val, _values, result) ⇒ Object
reduce 468 omitted.
- #_reduce_47(val, _values, result) ⇒ Object
-
#_reduce_471(val, _values, result) ⇒ Object
reduce 470 omitted.
-
#_reduce_473(val, _values, result) ⇒ Object
reduce 472 omitted.
- #_reduce_474(val, _values, result) ⇒ Object
-
#_reduce_476(val, _values, result) ⇒ Object
reduce 475 omitted.
- #_reduce_477(val, _values, result) ⇒ Object
-
#_reduce_479(val, _values, result) ⇒ Object
reduce 478 omitted.
- #_reduce_48(val, _values, result) ⇒ Object
- #_reduce_480(val, _values, result) ⇒ Object
- #_reduce_481(val, _values, result) ⇒ Object
- #_reduce_482(val, _values, result) ⇒ Object
- #_reduce_483(val, _values, result) ⇒ Object
- #_reduce_484(val, _values, result) ⇒ Object
- #_reduce_485(val, _values, result) ⇒ Object
- #_reduce_486(val, _values, result) ⇒ Object
- #_reduce_487(val, _values, result) ⇒ Object
-
#_reduce_489(val, _values, result) ⇒ Object
reduce 488 omitted.
- #_reduce_49(val, _values, result) ⇒ Object
- #_reduce_490(val, _values, result) ⇒ Object
- #_reduce_491(val, _values, result) ⇒ Object
- #_reduce_492(val, _values, result) ⇒ Object
- #_reduce_493(val, _values, result) ⇒ Object
- #_reduce_494(val, _values, result) ⇒ Object
- #_reduce_495(val, _values, result) ⇒ Object
- #_reduce_496(val, _values, result) ⇒ Object
- #_reduce_497(val, _values, result) ⇒ Object
- #_reduce_498(val, _values, result) ⇒ Object
- #_reduce_499(val, _values, result) ⇒ Object
- #_reduce_500(val, _values, result) ⇒ Object
- #_reduce_501(val, _values, result) ⇒ Object
- #_reduce_502(val, _values, result) ⇒ Object
- #_reduce_503(val, _values, result) ⇒ Object
- #_reduce_504(val, _values, result) ⇒ Object
- #_reduce_505(val, _values, result) ⇒ Object
- #_reduce_506(val, _values, result) ⇒ Object
- #_reduce_507(val, _values, result) ⇒ Object
- #_reduce_508(val, _values, result) ⇒ Object
- #_reduce_509(val, _values, result) ⇒ Object
- #_reduce_510(val, _values, result) ⇒ Object
- #_reduce_511(val, _values, result) ⇒ Object
- #_reduce_512(val, _values, result) ⇒ Object
- #_reduce_513(val, _values, result) ⇒ Object
- #_reduce_514(val, _values, result) ⇒ Object
- #_reduce_515(val, _values, result) ⇒ Object
- #_reduce_516(val, _values, result) ⇒ Object
-
#_reduce_518(val, _values, result) ⇒ Object
reduce 517 omitted.
- #_reduce_519(val, _values, result) ⇒ Object
-
#_reduce_52(val, _values, result) ⇒ Object
reduce 51 omitted.
-
#_reduce_524(val, _values, result) ⇒ Object
reduce 523 omitted.
-
#_reduce_526(val, _values, result) ⇒ Object
reduce 525 omitted.
- #_reduce_53(val, _values, result) ⇒ Object
-
#_reduce_536(val, _values, result) ⇒ Object
reduce 535 omitted.
- #_reduce_537(val, _values, result) ⇒ Object
- #_reduce_538(val, _values, result) ⇒ Object
- #_reduce_539(val, _values, result) ⇒ Object
- #_reduce_54(val, _values, result) ⇒ Object
- #_reduce_540(val, _values, result) ⇒ Object
- #_reduce_541(val, _values, result) ⇒ Object
- #_reduce_542(val, _values, result) ⇒ Object
- #_reduce_543(val, _values, result) ⇒ Object
- #_reduce_544(val, _values, result) ⇒ Object
- #_reduce_545(val, _values, result) ⇒ Object
- #_reduce_546(val, _values, result) ⇒ Object
- #_reduce_547(val, _values, result) ⇒ Object
- #_reduce_548(val, _values, result) ⇒ Object
- #_reduce_549(val, _values, result) ⇒ Object
- #_reduce_55(val, _values, result) ⇒ Object
- #_reduce_550(val, _values, result) ⇒ Object
- #_reduce_551(val, _values, result) ⇒ Object
- #_reduce_552(val, _values, result) ⇒ Object
- #_reduce_553(val, _values, result) ⇒ Object
- #_reduce_554(val, _values, result) ⇒ Object
- #_reduce_555(val, _values, result) ⇒ Object
- #_reduce_556(val, _values, result) ⇒ Object
- #_reduce_557(val, _values, result) ⇒ Object
-
#_reduce_559(val, _values, result) ⇒ Object
reduce 558 omitted.
- #_reduce_560(val, _values, result) ⇒ Object
- #_reduce_561(val, _values, result) ⇒ Object
- #_reduce_562(val, _values, result) ⇒ Object
- #_reduce_563(val, _values, result) ⇒ Object
- #_reduce_564(val, _values, result) ⇒ Object
- #_reduce_565(val, _values, result) ⇒ Object
- #_reduce_566(val, _values, result) ⇒ Object
- #_reduce_567(val, _values, result) ⇒ Object
- #_reduce_568(val, _values, result) ⇒ Object
- #_reduce_569(val, _values, result) ⇒ Object
-
#_reduce_57(val, _values, result) ⇒ Object
reduce 56 omitted.
- #_reduce_570(val, _values, result) ⇒ Object
- #_reduce_571(val, _values, result) ⇒ Object
- #_reduce_572(val, _values, result) ⇒ Object
- #_reduce_573(val, _values, result) ⇒ Object
- #_reduce_574(val, _values, result) ⇒ Object
- #_reduce_575(val, _values, result) ⇒ Object
- #_reduce_576(val, _values, result) ⇒ Object
- #_reduce_577(val, _values, result) ⇒ Object
- #_reduce_578(val, _values, result) ⇒ Object
- #_reduce_579(val, _values, result) ⇒ Object
- #_reduce_58(val, _values, result) ⇒ Object
-
#_reduce_581(val, _values, result) ⇒ Object
reduce 580 omitted.
-
#_reduce_584(val, _values, result) ⇒ Object
reduce 583 omitted.
- #_reduce_585(val, _values, result) ⇒ Object
- #_reduce_586(val, _values, result) ⇒ Object
-
#_reduce_588(val, _values, result) ⇒ Object
reduce 587 omitted.
- #_reduce_589(val, _values, result) ⇒ Object
- #_reduce_59(val, _values, result) ⇒ Object
- #_reduce_590(val, _values, result) ⇒ Object
- #_reduce_591(val, _values, result) ⇒ Object
-
#_reduce_593(val, _values, result) ⇒ Object
reduce 592 omitted.
-
#_reduce_595(val, _values, result) ⇒ Object
reduce 594 omitted.
-
#_reduce_598(val, _values, result) ⇒ Object
reduce 597 omitted.
- #_reduce_599(val, _values, result) ⇒ Object
-
#_reduce_6(val, _values, result) ⇒ Object
reduce 5 omitted.
- #_reduce_60(val, _values, result) ⇒ Object
- #_reduce_600(val, _values, result) ⇒ Object
- #_reduce_601(val, _values, result) ⇒ Object
- #_reduce_602(val, _values, result) ⇒ Object
- #_reduce_603(val, _values, result) ⇒ Object
- #_reduce_604(val, _values, result) ⇒ Object
- #_reduce_605(val, _values, result) ⇒ Object
-
#_reduce_608(val, _values, result) ⇒ Object
reduce 607 omitted.
- #_reduce_609(val, _values, result) ⇒ Object
-
#_reduce_612(val, _values, result) ⇒ Object
reduce 611 omitted.
- #_reduce_613(val, _values, result) ⇒ Object
- #_reduce_614(val, _values, result) ⇒ Object
-
#_reduce_616(val, _values, result) ⇒ Object
reduce 615 omitted.
- #_reduce_617(val, _values, result) ⇒ Object
- #_reduce_618(val, _values, result) ⇒ Object
-
#_reduce_621(val, _values, result) ⇒ Object
reduce 620 omitted.
- #_reduce_622(val, _values, result) ⇒ Object
- #_reduce_623(val, _values, result) ⇒ Object
- #_reduce_624(val, _values, result) ⇒ Object
- #_reduce_625(val, _values, result) ⇒ Object
-
#_reduce_64(val, _values, result) ⇒ Object
reduce 63 omitted.
- #_reduce_65(val, _values, result) ⇒ Object
-
#_reduce_651(val, _values, result) ⇒ Object
reduce 650 omitted.
-
#_reduce_654(val, _values, result) ⇒ Object
reduce 653 omitted.
- #_reduce_655(val, _values, result) ⇒ Object
- #_reduce_66(val, _values, result) ⇒ Object
- #_reduce_67(val, _values, result) ⇒ Object
- #_reduce_68(val, _values, result) ⇒ Object
- #_reduce_69(val, _values, result) ⇒ Object
- #_reduce_70(val, _values, result) ⇒ Object
- #_reduce_71(val, _values, result) ⇒ Object
- #_reduce_72(val, _values, result) ⇒ Object
- #_reduce_73(val, _values, result) ⇒ Object
- #_reduce_74(val, _values, result) ⇒ Object
- #_reduce_75(val, _values, result) ⇒ Object
- #_reduce_76(val, _values, result) ⇒ Object
- #_reduce_77(val, _values, result) ⇒ Object
- #_reduce_78(val, _values, result) ⇒ Object
-
#_reduce_80(val, _values, result) ⇒ Object
reduce 79 omitted.
-
#_reduce_82(val, _values, result) ⇒ Object
reduce 81 omitted.
- #_reduce_83(val, _values, result) ⇒ Object
- #_reduce_84(val, _values, result) ⇒ Object
- #_reduce_85(val, _values, result) ⇒ Object
- #_reduce_86(val, _values, result) ⇒ Object
- #_reduce_87(val, _values, result) ⇒ Object
- #_reduce_88(val, _values, result) ⇒ Object
- #_reduce_89(val, _values, result) ⇒ Object
-
#_reduce_9(val, _values, result) ⇒ Object
reduce 8 omitted.
- #_reduce_90(val, _values, result) ⇒ Object
- #_reduce_91(val, _values, result) ⇒ Object
- #_reduce_92(val, _values, result) ⇒ Object
-
#_reduce_94(val, _values, result) ⇒ Object
reduce 93 omitted.
- #_reduce_95(val, _values, result) ⇒ Object
- #_reduce_96(val, _values, result) ⇒ Object
- #_reduce_97(val, _values, result) ⇒ Object
- #_reduce_98(val, _values, result) ⇒ Object
- #_reduce_99(val, _values, result) ⇒ Object
- #_reduce_none(val, _values, result) ⇒ Object
Methods inherited from RubyParser::Parser
Methods included from RubyParserStuff
#_racc_do_reduce, #arg_concat, #argl, #args, #array_to_hash, #aryset, #assignable, #backref_assign_error, #block_append, #block_dup_check, #block_var, #call_args, #clean_mlhs, #cond, #debug20, #dedent, #dedent_size, #dedent_string, deprecate, #do_parse, #gettable, #hack_encoding, #handle_encoding, #initialize, #invert_block_call, #inverted?, #list_append, #list_prepend, #literal_concat, #logical_op, #new_aref, #new_assign, #new_attrasgn, #new_begin, #new_body, #new_brace_body, #new_call, #new_case, #new_class, #new_compstmt, #new_const_op_asgn, #new_defn, #new_defs, #new_do_body, #new_for, #new_hash, #new_if, #new_iter, #new_masgn, #new_masgn_arg, #new_match, #new_module, #new_op_asgn, #new_op_asgn1, #new_op_asgn2, #new_qsym_list, #new_qsym_list_entry, #new_qword_list, #new_qword_list_entry, #new_regexp, #new_resbody, #new_rescue, #new_sclass, #new_string, #new_super, #new_symbol_list, #new_symbol_list_entry, #new_undef, #new_until, #new_until_or_while, #new_when, #new_while, #new_word_list, #new_word_list_entry, #new_xstring, #new_yield, #next_token, #on_error, #process, #remove_begin, #reset, #ret_args, #s, #syntax_error, #void_stmts, #warning, #whitespace_width
Instance Method Details
#_reduce_1(val, _values, result) ⇒ Object
reduce 0 omitted
3635 3636 3637 3638 3639 |
# File 'lib/ruby30_parser.rb', line 3635 def _reduce_1(val, _values, result) self.lexer.lex_state = EXPR_BEG result end |
#_reduce_10(val, _values, result) ⇒ Object
3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 |
# File 'lib/ruby30_parser.rb', line 3681 def _reduce_10(val, _values, result) (_, lineno), _, iter = val iter.line lineno (_, preexe,) = iter preexe.line lineno result = iter result end |
#_reduce_100(val, _values, result) ⇒ Object
4290 4291 4292 4293 4294 |
# File 'lib/ruby30_parser.rb', line 4290 def _reduce_100(val, _values, result) result = self.assignable val[0] result end |
#_reduce_101(val, _values, result) ⇒ Object
4296 4297 4298 4299 4300 |
# File 'lib/ruby30_parser.rb', line 4296 def _reduce_101(val, _values, result) result = self.aryset val[0], val[2] result end |
#_reduce_102(val, _values, result) ⇒ Object
4302 4303 4304 4305 4306 |
# File 'lib/ruby30_parser.rb', line 4302 def _reduce_102(val, _values, result) result = new_attrasgn val[0], val[2], val[1] result end |
#_reduce_103(val, _values, result) ⇒ Object
4308 4309 4310 4311 4312 4313 |
# File 'lib/ruby30_parser.rb', line 4308 def _reduce_103(val, _values, result) recv, _, id = val result = new_attrasgn recv, id result end |
#_reduce_104(val, _values, result) ⇒ Object
4315 4316 4317 4318 4319 |
# File 'lib/ruby30_parser.rb', line 4315 def _reduce_104(val, _values, result) result = new_attrasgn val[0], val[2], val[1] result end |
#_reduce_105(val, _values, result) ⇒ Object
4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 |
# File 'lib/ruby30_parser.rb', line 4321 def _reduce_105(val, _values, result) if (self.in_def || self.in_single > 0) then debug20 7 yyerror "dynamic constant assignment" end expr, _, id = val l = expr.line result = s(:const, s(:colon2, expr, id.to_sym).line(l), nil).line l result end |
#_reduce_106(val, _values, result) ⇒ Object
4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 |
# File 'lib/ruby30_parser.rb', line 4335 def _reduce_106(val, _values, result) if (self.in_def || self.in_single > 0) then debug20 8 yyerror "dynamic constant assignment" end _, id = val l = lexer.lineno result = s(:const, nil, s(:colon3, id.to_sym).line(l)).line l result end |
#_reduce_107(val, _values, result) ⇒ Object
4349 4350 4351 4352 4353 |
# File 'lib/ruby30_parser.rb', line 4349 def _reduce_107(val, _values, result) self.backref_assign_error val[0] result end |
#_reduce_108(val, _values, result) ⇒ Object
4355 4356 4357 4358 4359 4360 4361 |
# File 'lib/ruby30_parser.rb', line 4355 def _reduce_108(val, _values, result) line = lexer.lineno result = self.assignable val[0] result.line = line result end |
#_reduce_109(val, _values, result) ⇒ Object
4363 4364 4365 4366 4367 4368 4369 4370 |
# File 'lib/ruby30_parser.rb', line 4363 def _reduce_109(val, _values, result) line = lexer.lineno result = self.assignable val[0] result.line = line debug20 9, val, result result end |
#_reduce_11(val, _values, result) ⇒ Object
3693 3694 3695 3696 |
# File 'lib/ruby30_parser.rb', line 3693 def _reduce_11(val, _values, result) result = lexer.lineno result end |
#_reduce_110(val, _values, result) ⇒ Object
4372 4373 4374 4375 4376 4377 |
# File 'lib/ruby30_parser.rb', line 4372 def _reduce_110(val, _values, result) lhs, _, args, _ = val result = self.aryset lhs, args result end |
#_reduce_111(val, _values, result) ⇒ Object
4379 4380 4381 4382 4383 4384 |
# File 'lib/ruby30_parser.rb', line 4379 def _reduce_111(val, _values, result) lhs, op, id = val result = new_attrasgn lhs, id, op result end |
#_reduce_112(val, _values, result) ⇒ Object
4386 4387 4388 4389 4390 4391 |
# File 'lib/ruby30_parser.rb', line 4386 def _reduce_112(val, _values, result) lhs, _, id = val result = new_attrasgn lhs, id result end |
#_reduce_113(val, _values, result) ⇒ Object
4393 4394 4395 4396 4397 |
# File 'lib/ruby30_parser.rb', line 4393 def _reduce_113(val, _values, result) result = new_attrasgn val[0], val[2], val[1] result end |
#_reduce_114(val, _values, result) ⇒ Object
4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 |
# File 'lib/ruby30_parser.rb', line 4399 def _reduce_114(val, _values, result) expr, _, id = val if (self.in_def || self.in_single > 0) then debug20 10 yyerror "dynamic constant assignment" end l = expr.line result = s(:const, s(:colon2, expr, id.to_sym).line(l)).line l result end |
#_reduce_115(val, _values, result) ⇒ Object
4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 |
# File 'lib/ruby30_parser.rb', line 4413 def _reduce_115(val, _values, result) _, id = val if (self.in_def || self.in_single > 0) then debug20 11 yyerror "dynamic constant assignment" end l = lexer.lineno result = s(:const, s(:colon3, id.to_sym).line(l)).line l result end |
#_reduce_116(val, _values, result) ⇒ Object
4427 4428 4429 4430 4431 |
# File 'lib/ruby30_parser.rb', line 4427 def _reduce_116(val, _values, result) self.backref_assign_error val[0] result end |
#_reduce_117(val, _values, result) ⇒ Object
4433 4434 4435 4436 4437 |
# File 'lib/ruby30_parser.rb', line 4433 def _reduce_117(val, _values, result) yyerror "class/module name must be CONSTANT" result end |
#_reduce_119(val, _values, result) ⇒ Object
reduce 118 omitted
4441 4442 4443 4444 4445 4446 |
# File 'lib/ruby30_parser.rb', line 4441 def _reduce_119(val, _values, result) _, name = val result = s(:colon3, name.to_sym).line lexer.lineno result end |
#_reduce_12(val, _values, result) ⇒ Object
3698 3699 3700 3701 3702 3703 |
# File 'lib/ruby30_parser.rb', line 3698 def _reduce_12(val, _values, result) _, line, stmt, _ = val result = new_iter s(:preexe).line(line), 0, stmt result end |
#_reduce_120(val, _values, result) ⇒ Object
4448 4449 4450 4451 4452 |
# File 'lib/ruby30_parser.rb', line 4448 def _reduce_120(val, _values, result) result = val[0].to_sym result end |
#_reduce_121(val, _values, result) ⇒ Object
4454 4455 4456 4457 4458 4459 4460 4461 |
# File 'lib/ruby30_parser.rb', line 4454 def _reduce_121(val, _values, result) pval, _, name = val result = s(:colon2, pval, name.to_sym) result.line pval.line result end |
#_reduce_125(val, _values, result) ⇒ Object
reduce 124 omitted
4469 4470 4471 4472 4473 4474 |
# File 'lib/ruby30_parser.rb', line 4469 def _reduce_125(val, _values, result) lexer.lex_state = EXPR_END result = val[0] result end |
#_reduce_126(val, _values, result) ⇒ Object
4476 4477 4478 4479 4480 4481 4482 |
# File 'lib/ruby30_parser.rb', line 4476 def _reduce_126(val, _values, result) (sym, _line), = val lexer.lex_state = EXPR_END result = sym result end |
#_reduce_129(val, _values, result) ⇒ Object
reduce 128 omitted
4488 4489 4490 4491 4492 4493 |
# File 'lib/ruby30_parser.rb', line 4488 def _reduce_129(val, _values, result) id, = val result = s(:lit, id.to_sym).line lexer.lineno result end |
#_reduce_13(val, _values, result) ⇒ Object
3705 3706 3707 3708 3709 3710 |
# File 'lib/ruby30_parser.rb', line 3705 def _reduce_13(val, _values, result) res = _values[-2] yyerror "else without rescue is useless" unless res result end |
#_reduce_131(val, _values, result) ⇒ Object
reduce 130 omitted
4497 4498 4499 4500 4501 |
# File 'lib/ruby30_parser.rb', line 4497 def _reduce_131(val, _values, result) result = new_undef val[0] result end |
#_reduce_132(val, _values, result) ⇒ Object
4503 4504 4505 4506 4507 |
# File 'lib/ruby30_parser.rb', line 4503 def _reduce_132(val, _values, result) lexer.lex_state = EXPR_FNAME result end |
#_reduce_133(val, _values, result) ⇒ Object
4509 4510 4511 4512 4513 |
# File 'lib/ruby30_parser.rb', line 4509 def _reduce_133(val, _values, result) result = new_undef val[0], val[3] result end |
#_reduce_14(val, _values, result) ⇒ Object
3712 3713 3714 3715 3716 3717 3718 |
# File 'lib/ruby30_parser.rb', line 3712 def _reduce_14(val, _values, result) body, resc, _, _, els, ens = val result = new_body [body, resc, els, ens] result end |
#_reduce_15(val, _values, result) ⇒ Object
3720 3721 3722 3723 3724 3725 3726 |
# File 'lib/ruby30_parser.rb', line 3720 def _reduce_15(val, _values, result) body, resc, ens = val result = new_body [body, resc, nil, ens] result end |
#_reduce_16(val, _values, result) ⇒ Object
3728 3729 3730 3731 3732 |
# File 'lib/ruby30_parser.rb', line 3728 def _reduce_16(val, _values, result) result = new_compstmt val result end |
#_reduce_19(val, _values, result) ⇒ Object
reduce 18 omitted
3738 3739 3740 3741 3742 |
# File 'lib/ruby30_parser.rb', line 3738 def _reduce_19(val, _values, result) result = self.block_append val[0], val[2] result end |
#_reduce_2(val, _values, result) ⇒ Object
3641 3642 3643 3644 3645 3646 3647 3648 |
# File 'lib/ruby30_parser.rb', line 3641 def _reduce_2(val, _values, result) result = new_compstmt val lexer.cond.pop # local_pop lexer.cmdarg.pop result end |
#_reduce_20(val, _values, result) ⇒ Object
3744 3745 3746 3747 3748 3749 |
# File 'lib/ruby30_parser.rb', line 3744 def _reduce_20(val, _values, result) result = val[1] debug20 2, val, result result end |
#_reduce_206(val, _values, result) ⇒ Object
reduce 205 omitted
4659 4660 4661 4662 4663 |
# File 'lib/ruby30_parser.rb', line 4659 def _reduce_206(val, _values, result) result = new_assign val[0], val[2] result end |
#_reduce_207(val, _values, result) ⇒ Object
4665 4666 4667 4668 4669 |
# File 'lib/ruby30_parser.rb', line 4665 def _reduce_207(val, _values, result) result = new_op_asgn val result end |
#_reduce_208(val, _values, result) ⇒ Object
4671 4672 4673 4674 4675 |
# File 'lib/ruby30_parser.rb', line 4671 def _reduce_208(val, _values, result) result = new_op_asgn1 val result end |
#_reduce_209(val, _values, result) ⇒ Object
4677 4678 4679 4680 4681 |
# File 'lib/ruby30_parser.rb', line 4677 def _reduce_209(val, _values, result) result = new_op_asgn2 val result end |
#_reduce_210(val, _values, result) ⇒ Object
4683 4684 4685 4686 4687 |
# File 'lib/ruby30_parser.rb', line 4683 def _reduce_210(val, _values, result) result = new_op_asgn2 val result end |
#_reduce_211(val, _values, result) ⇒ Object
4689 4690 4691 4692 4693 4694 4695 |
# File 'lib/ruby30_parser.rb', line 4689 def _reduce_211(val, _values, result) lhs, _, id, op, rhs = val result = s(:op_asgn, lhs, rhs, id.to_sym, op.to_sym).line lhs.line result end |
#_reduce_212(val, _values, result) ⇒ Object
4697 4698 4699 4700 4701 4702 4703 4704 |
# File 'lib/ruby30_parser.rb', line 4697 def _reduce_212(val, _values, result) lhs1, _, lhs2, op, rhs = val lhs = s(:colon2, lhs1, lhs2.to_sym).line lhs1.line result = new_const_op_asgn [lhs, op, rhs] result end |
#_reduce_213(val, _values, result) ⇒ Object
4706 4707 4708 4709 4710 |
# File 'lib/ruby30_parser.rb', line 4706 def _reduce_213(val, _values, result) result = self.lexer.lineno result end |
#_reduce_214(val, _values, result) ⇒ Object
4712 4713 4714 4715 4716 4717 4718 4719 |
# File 'lib/ruby30_parser.rb', line 4712 def _reduce_214(val, _values, result) _, lhs, line, op, rhs = val lhs = s(:colon3, lhs.to_sym).line line result = new_const_op_asgn [lhs, op, rhs] result end |
#_reduce_215(val, _values, result) ⇒ Object
4721 4722 4723 4724 4725 4726 4727 |
# File 'lib/ruby30_parser.rb', line 4721 def _reduce_215(val, _values, result) # TODO: lhs = var_field val[0] asgn = new_op_asgn val result = self.backref_assign_error asgn result end |
#_reduce_216(val, _values, result) ⇒ Object
4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 |
# File 'lib/ruby30_parser.rb', line 4729 def _reduce_216(val, _values, result) v1, v2 = val[0], val[2] if v1.node_type == :lit and v2.node_type == :lit and Integer === v1.last and Integer === v2.last then result = s(:lit, (v1.last)..(v2.last)).line v1.line else result = s(:dot2, v1, v2).line v1.line end result end |
#_reduce_217(val, _values, result) ⇒ Object
4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 |
# File 'lib/ruby30_parser.rb', line 4740 def _reduce_217(val, _values, result) v1, v2 = val[0], val[2] if v1.node_type == :lit and v2.node_type == :lit and Integer === v1.last and Integer === v2.last then result = s(:lit, (v1.last)...(v2.last)).line v1.line else result = s(:dot3, v1, v2).line v1.line end result end |
#_reduce_218(val, _values, result) ⇒ Object
4751 4752 4753 4754 4755 4756 4757 4758 |
# File 'lib/ruby30_parser.rb', line 4751 def _reduce_218(val, _values, result) v1, _ = val v2 = nil result = s(:dot2, v1, v2).line v1.line result end |
#_reduce_219(val, _values, result) ⇒ Object
4760 4761 4762 4763 4764 4765 4766 4767 |
# File 'lib/ruby30_parser.rb', line 4760 def _reduce_219(val, _values, result) v1, _ = val v2 = nil result = s(:dot3, v1, v2).line v1.line result end |
#_reduce_22(val, _values, result) ⇒ Object
reduce 21 omitted
3753 3754 3755 3756 3757 |
# File 'lib/ruby30_parser.rb', line 3753 def _reduce_22(val, _values, result) yyerror "BEGIN is permitted only at toplevel" result end |
#_reduce_220(val, _values, result) ⇒ Object
4769 4770 4771 4772 4773 4774 4775 4776 |
# File 'lib/ruby30_parser.rb', line 4769 def _reduce_220(val, _values, result) _, v2, = val v1 = nil result = s(:dot2, v1, v2).line v2.line result end |
#_reduce_221(val, _values, result) ⇒ Object
4778 4779 4780 4781 4782 4783 4784 4785 |
# File 'lib/ruby30_parser.rb', line 4778 def _reduce_221(val, _values, result) _, v2 = val v1 = nil result = s(:dot3, v1, v2).line v2.line result end |
#_reduce_222(val, _values, result) ⇒ Object
4787 4788 4789 4790 4791 |
# File 'lib/ruby30_parser.rb', line 4787 def _reduce_222(val, _values, result) result = new_call val[0], :+, argl(val[2]) result end |
#_reduce_223(val, _values, result) ⇒ Object
4793 4794 4795 4796 4797 |
# File 'lib/ruby30_parser.rb', line 4793 def _reduce_223(val, _values, result) result = new_call val[0], :-, argl(val[2]) result end |
#_reduce_224(val, _values, result) ⇒ Object
4799 4800 4801 4802 4803 |
# File 'lib/ruby30_parser.rb', line 4799 def _reduce_224(val, _values, result) result = new_call val[0], :*, argl(val[2]) result end |
#_reduce_225(val, _values, result) ⇒ Object
4805 4806 4807 4808 4809 |
# File 'lib/ruby30_parser.rb', line 4805 def _reduce_225(val, _values, result) result = new_call val[0], :"/", argl(val[2]) result end |
#_reduce_226(val, _values, result) ⇒ Object
4811 4812 4813 4814 4815 |
# File 'lib/ruby30_parser.rb', line 4811 def _reduce_226(val, _values, result) result = new_call val[0], :"%", argl(val[2]) result end |
#_reduce_227(val, _values, result) ⇒ Object
4817 4818 4819 4820 4821 |
# File 'lib/ruby30_parser.rb', line 4817 def _reduce_227(val, _values, result) result = new_call val[0], :**, argl(val[2]) result end |
#_reduce_228(val, _values, result) ⇒ Object
4823 4824 4825 4826 4827 4828 4829 |
# File 'lib/ruby30_parser.rb', line 4823 def _reduce_228(val, _values, result) lit = s(:lit, val[1]).line lexer.lineno result = new_call(new_call(lit, :"**", argl(val[3])), :"-@") result end |
#_reduce_229(val, _values, result) ⇒ Object
4831 4832 4833 4834 4835 |
# File 'lib/ruby30_parser.rb', line 4831 def _reduce_229(val, _values, result) result = new_call val[1], :"+@" result end |
#_reduce_23(val, _values, result) ⇒ Object
3759 3760 3761 3762 3763 |
# File 'lib/ruby30_parser.rb', line 3759 def _reduce_23(val, _values, result) lexer.lex_state = EXPR_FNAME result end |
#_reduce_230(val, _values, result) ⇒ Object
4837 4838 4839 4840 4841 |
# File 'lib/ruby30_parser.rb', line 4837 def _reduce_230(val, _values, result) result = new_call val[1], :"-@" result end |
#_reduce_231(val, _values, result) ⇒ Object
4843 4844 4845 4846 4847 |
# File 'lib/ruby30_parser.rb', line 4843 def _reduce_231(val, _values, result) result = new_call val[0], :"|", argl(val[2]) result end |
#_reduce_232(val, _values, result) ⇒ Object
4849 4850 4851 4852 4853 |
# File 'lib/ruby30_parser.rb', line 4849 def _reduce_232(val, _values, result) result = new_call val[0], :"^", argl(val[2]) result end |
#_reduce_233(val, _values, result) ⇒ Object
4855 4856 4857 4858 4859 |
# File 'lib/ruby30_parser.rb', line 4855 def _reduce_233(val, _values, result) result = new_call val[0], :"&", argl(val[2]) result end |
#_reduce_234(val, _values, result) ⇒ Object
4861 4862 4863 4864 4865 |
# File 'lib/ruby30_parser.rb', line 4861 def _reduce_234(val, _values, result) result = new_call val[0], :"<=>", argl(val[2]) result end |
#_reduce_236(val, _values, result) ⇒ Object
reduce 235 omitted
4869 4870 4871 4872 4873 |
# File 'lib/ruby30_parser.rb', line 4869 def _reduce_236(val, _values, result) result = new_call val[0], :"==", argl(val[2]) result end |
#_reduce_237(val, _values, result) ⇒ Object
4875 4876 4877 4878 4879 |
# File 'lib/ruby30_parser.rb', line 4875 def _reduce_237(val, _values, result) result = new_call val[0], :"===", argl(val[2]) result end |
#_reduce_238(val, _values, result) ⇒ Object
4881 4882 4883 4884 4885 |
# File 'lib/ruby30_parser.rb', line 4881 def _reduce_238(val, _values, result) result = new_call val[0], :"!=", argl(val[2]) result end |
#_reduce_239(val, _values, result) ⇒ Object
4887 4888 4889 4890 4891 4892 |
# File 'lib/ruby30_parser.rb', line 4887 def _reduce_239(val, _values, result) lhs, _, rhs = val result = new_match lhs, rhs result end |
#_reduce_24(val, _values, result) ⇒ Object
3765 3766 3767 3768 3769 3770 |
# File 'lib/ruby30_parser.rb', line 3765 def _reduce_24(val, _values, result) (_, line), lhs, _, rhs = val result = s(:alias, lhs, rhs).line(line).line line result end |
#_reduce_240(val, _values, result) ⇒ Object
4894 4895 4896 4897 4898 4899 |
# File 'lib/ruby30_parser.rb', line 4894 def _reduce_240(val, _values, result) lhs, _, rhs = val result = s(:not, new_match(lhs, rhs)).line lhs.line result end |
#_reduce_241(val, _values, result) ⇒ Object
4901 4902 4903 4904 4905 4906 4907 |
# File 'lib/ruby30_parser.rb', line 4901 def _reduce_241(val, _values, result) _, arg = val result = new_call arg, :"!" result.line arg.line result end |
#_reduce_242(val, _values, result) ⇒ Object
4909 4910 4911 4912 4913 |
# File 'lib/ruby30_parser.rb', line 4909 def _reduce_242(val, _values, result) result = new_call value_expr(val[1]), :"~" result end |
#_reduce_243(val, _values, result) ⇒ Object
4915 4916 4917 4918 4919 4920 4921 |
# File 'lib/ruby30_parser.rb', line 4915 def _reduce_243(val, _values, result) val[0] = value_expr val[0] val[2] = value_expr val[2] result = new_call val[0], :"\<\<", argl(val[2]) result end |
#_reduce_244(val, _values, result) ⇒ Object
4923 4924 4925 4926 4927 4928 4929 |
# File 'lib/ruby30_parser.rb', line 4923 def _reduce_244(val, _values, result) val[0] = value_expr val[0] val[2] = value_expr val[2] result = new_call val[0], :">>", argl(val[2]) result end |
#_reduce_245(val, _values, result) ⇒ Object
4931 4932 4933 4934 4935 |
# File 'lib/ruby30_parser.rb', line 4931 def _reduce_245(val, _values, result) result = logical_op :and, val[0], val[2] result end |
#_reduce_246(val, _values, result) ⇒ Object
4937 4938 4939 4940 4941 |
# File 'lib/ruby30_parser.rb', line 4937 def _reduce_246(val, _values, result) result = logical_op :or, val[0], val[2] result end |
#_reduce_247(val, _values, result) ⇒ Object
4943 4944 4945 4946 4947 4948 |
# File 'lib/ruby30_parser.rb', line 4943 def _reduce_247(val, _values, result) (_, line), _, arg = val result = s(:defined, arg).line line result end |
#_reduce_248(val, _values, result) ⇒ Object
4950 4951 4952 4953 4954 4955 |
# File 'lib/ruby30_parser.rb', line 4950 def _reduce_248(val, _values, result) c, _, t, _, _, f = val result = s(:if, c, t, f).line c.line result end |
#_reduce_25(val, _values, result) ⇒ Object
3772 3773 3774 3775 3776 3777 |
# File 'lib/ruby30_parser.rb', line 3772 def _reduce_25(val, _values, result) (_, line), lhs, rhs = val result = s(:valias, lhs.to_sym, rhs.to_sym).line line result end |
#_reduce_254(val, _values, result) ⇒ Object
reduce 253 omitted
4967 4968 4969 4970 4971 4972 |
# File 'lib/ruby30_parser.rb', line 4967 def _reduce_254(val, _values, result) lhs, op, rhs = val result = new_call lhs, op.to_sym, argl(rhs) result end |
#_reduce_255(val, _values, result) ⇒ Object
4974 4975 4976 4977 4978 4979 4980 |
# File 'lib/ruby30_parser.rb', line 4974 def _reduce_255(val, _values, result) lhs, op, rhs = val warn "comparison '%s' after comparison", op result = new_call lhs, op.to_sym, argl(rhs) result end |
#_reduce_256(val, _values, result) ⇒ Object
4982 4983 4984 4985 4986 |
# File 'lib/ruby30_parser.rb', line 4982 def _reduce_256(val, _values, result) result = value_expr(val[0]) result end |
#_reduce_258(val, _values, result) ⇒ Object
reduce 257 omitted
4990 4991 4992 4993 4994 |
# File 'lib/ruby30_parser.rb', line 4990 def _reduce_258(val, _values, result) result = args [val[0]] result end |
#_reduce_259(val, _values, result) ⇒ Object
4996 4997 4998 4999 5000 |
# File 'lib/ruby30_parser.rb', line 4996 def _reduce_259(val, _values, result) result = args [val[0], array_to_hash(val[2])] result end |
#_reduce_26(val, _values, result) ⇒ Object
3779 3780 3781 3782 3783 3784 |
# File 'lib/ruby30_parser.rb', line 3779 def _reduce_26(val, _values, result) (_, line), lhs, rhs = val result = s(:valias, lhs.to_sym, :"$#{rhs}").line line result end |
#_reduce_260(val, _values, result) ⇒ Object
5002 5003 5004 5005 5006 |
# File 'lib/ruby30_parser.rb', line 5002 def _reduce_260(val, _values, result) result = args [array_to_hash(val[0])] result end |
#_reduce_262(val, _values, result) ⇒ Object
reduce 261 omitted
5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 |
# File 'lib/ruby30_parser.rb', line 5010 def _reduce_262(val, _values, result) body, (_, line), resbody = val body = value_expr body resbody = remove_begin resbody ary = s(:array).line line result = new_rescue(body, new_resbody(ary, resbody)) result end |
#_reduce_263(val, _values, result) ⇒ Object
5021 5022 5023 5024 5025 5026 |
# File 'lib/ruby30_parser.rb', line 5021 def _reduce_263(val, _values, result) _, args, _ = val result = args result end |
#_reduce_268(val, _values, result) ⇒ Object
reduce 267 omitted
5036 5037 5038 5039 5040 |
# File 'lib/ruby30_parser.rb', line 5036 def _reduce_268(val, _values, result) result = args val result end |
#_reduce_269(val, _values, result) ⇒ Object
5042 5043 5044 5045 5046 |
# File 'lib/ruby30_parser.rb', line 5042 def _reduce_269(val, _values, result) result = args [val[0], array_to_hash(val[2])] result end |
#_reduce_27(val, _values, result) ⇒ Object
3786 3787 3788 3789 3790 |
# File 'lib/ruby30_parser.rb', line 3786 def _reduce_27(val, _values, result) yyerror "can't make alias for the number variables" result end |
#_reduce_270(val, _values, result) ⇒ Object
5048 5049 5050 5051 5052 |
# File 'lib/ruby30_parser.rb', line 5048 def _reduce_270(val, _values, result) result = args [array_to_hash(val[0])] result end |
#_reduce_271(val, _values, result) ⇒ Object
5054 5055 5056 5057 5058 5059 |
# File 'lib/ruby30_parser.rb', line 5054 def _reduce_271(val, _values, result) warning "parenthesize argument(s) for future version" result = call_args val result end |
#_reduce_272(val, _values, result) ⇒ Object
5061 5062 5063 5064 5065 |
# File 'lib/ruby30_parser.rb', line 5061 def _reduce_272(val, _values, result) result = call_args val result end |
#_reduce_273(val, _values, result) ⇒ Object
5067 5068 5069 5070 5071 |
# File 'lib/ruby30_parser.rb', line 5067 def _reduce_273(val, _values, result) result = call_args [array_to_hash(val[0]), val[1]] result end |
#_reduce_274(val, _values, result) ⇒ Object
5073 5074 5075 5076 5077 |
# File 'lib/ruby30_parser.rb', line 5073 def _reduce_274(val, _values, result) result = call_args [val[0], array_to_hash(val[2]), val[3]] result end |
#_reduce_275(val, _values, result) ⇒ Object
5079 5080 5081 5082 5083 |
# File 'lib/ruby30_parser.rb', line 5079 def _reduce_275(val, _values, result) result = call_args val result end |
#_reduce_276(val, _values, result) ⇒ Object
5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 |
# File 'lib/ruby30_parser.rb', line 5085 def _reduce_276(val, _values, result) # parse26.y line 2200 # If call_args starts with a open paren '(' or # '[', look-ahead reading of the letters calls # CMDARG_PUSH(0), but the push must be done # after CMDARG_PUSH(1). So this code makes them # consistent by first cancelling the premature # CMDARG_PUSH(0), doing CMDARG_PUSH(1), and # finally redoing CMDARG_PUSH(0). result = yychar = self.last_token_type.first lookahead = [:tLPAREN, :tLPAREN_ARG, :tLPAREN2, :tLBRACK, :tLBRACK2].include?(yychar) lexer.cmdarg.pop if lookahead lexer.cmdarg.push true lexer.cmdarg.push false if lookahead result end |
#_reduce_277(val, _values, result) ⇒ Object
5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 |
# File 'lib/ruby30_parser.rb', line 5105 def _reduce_277(val, _values, result) yychar, args = val # call_args can be followed by tLBRACE_ARG (that # does CMDARG_PUSH(0) in the lexer) but the push # must be done after CMDARG_POP() in the parser. # So this code does CMDARG_POP() to pop 0 pushed # by tLBRACE_ARG, CMDARG_POP() to pop 1 pushed # by command_args, and CMDARG_PUSH(0) to restore # back the flag set by tLBRACE_ARG. lookahead = [:tLBRACE_ARG].include?(yychar) lexer.cmdarg.pop if lookahead lexer.cmdarg.pop lexer.cmdarg.push false if lookahead result = args result end |
#_reduce_278(val, _values, result) ⇒ Object
5125 5126 5127 5128 5129 5130 |
# File 'lib/ruby30_parser.rb', line 5125 def _reduce_278(val, _values, result) _, arg = val result = s(:block_pass, arg).line arg.line result end |
#_reduce_279(val, _values, result) ⇒ Object
5132 5133 5134 5135 5136 |
# File 'lib/ruby30_parser.rb', line 5132 def _reduce_279(val, _values, result) result = val[1] result end |
#_reduce_28(val, _values, result) ⇒ Object
3792 3793 3794 3795 3796 |
# File 'lib/ruby30_parser.rb', line 3792 def _reduce_28(val, _values, result) result = val[1] result end |
#_reduce_281(val, _values, result) ⇒ Object
reduce 280 omitted
5140 5141 5142 5143 5144 5145 5146 5147 |
# File 'lib/ruby30_parser.rb', line 5140 def _reduce_281(val, _values, result) arg, = val lineno = arg.line || lexer.lineno # HACK result = s(:array, arg).line lineno result end |
#_reduce_282(val, _values, result) ⇒ Object
5149 5150 5151 5152 5153 5154 |
# File 'lib/ruby30_parser.rb', line 5149 def _reduce_282(val, _values, result) _, arg = val result = s(:array, s(:splat, arg).line(arg.line)).line arg.line result end |
#_reduce_283(val, _values, result) ⇒ Object
5156 5157 5158 5159 5160 5161 |
# File 'lib/ruby30_parser.rb', line 5156 def _reduce_283(val, _values, result) args, _, id = val result = self.list_append args, id result end |
#_reduce_284(val, _values, result) ⇒ Object
5163 5164 5165 5166 5167 5168 5169 5170 |
# File 'lib/ruby30_parser.rb', line 5163 def _reduce_284(val, _values, result) # TODO: the line number from tSTAR has been dropped args, _, _, id = val line = lexer.lineno result = self.list_append args, s(:splat, id).line(line) result end |
#_reduce_285(val, _values, result) ⇒ Object
5172 5173 5174 5175 5176 |
# File 'lib/ruby30_parser.rb', line 5172 def _reduce_285(val, _values, result) result = new_masgn_arg val[0] result end |
#_reduce_286(val, _values, result) ⇒ Object
5178 5179 5180 5181 5182 |
# File 'lib/ruby30_parser.rb', line 5178 def _reduce_286(val, _values, result) result = new_masgn_arg val[0], :wrap result end |
#_reduce_287(val, _values, result) ⇒ Object
5184 5185 5186 5187 5188 |
# File 'lib/ruby30_parser.rb', line 5184 def _reduce_287(val, _values, result) result = val[0] << val[2] result end |
#_reduce_288(val, _values, result) ⇒ Object
5190 5191 5192 5193 5194 5195 5196 |
# File 'lib/ruby30_parser.rb', line 5190 def _reduce_288(val, _values, result) # TODO: make all tXXXX terminals include lexer.lineno arg, _, _, splat = val result = self.arg_concat arg, splat result end |
#_reduce_289(val, _values, result) ⇒ Object
5198 5199 5200 5201 5202 5203 |
# File 'lib/ruby30_parser.rb', line 5198 def _reduce_289(val, _values, result) _, arg = val result = s(:splat, arg).line arg.line result end |
#_reduce_29(val, _values, result) ⇒ Object
3798 3799 3800 3801 3802 3803 |
# File 'lib/ruby30_parser.rb', line 3798 def _reduce_29(val, _values, result) t, _, c = val result = new_if c, t, nil result end |
#_reduce_3(val, _values, result) ⇒ Object
3650 3651 3652 3653 3654 3655 |
# File 'lib/ruby30_parser.rb', line 3650 def _reduce_3(val, _values, result) stmt, _ = val result = stmt result end |
#_reduce_30(val, _values, result) ⇒ Object
3805 3806 3807 3808 3809 3810 |
# File 'lib/ruby30_parser.rb', line 3805 def _reduce_30(val, _values, result) f, _, c = val result = new_if c, nil, f result end |
#_reduce_300(val, _values, result) ⇒ Object
reduce 299 omitted
5225 5226 5227 5228 5229 5230 |
# File 'lib/ruby30_parser.rb', line 5225 def _reduce_300(val, _values, result) msg, = val result = new_call nil, msg.to_sym result end |
#_reduce_301(val, _values, result) ⇒ Object
5232 5233 5234 5235 5236 5237 |
# File 'lib/ruby30_parser.rb', line 5232 def _reduce_301(val, _values, result) lexer.cmdarg.push false result = self.lexer.lineno result end |
#_reduce_302(val, _values, result) ⇒ Object
5239 5240 5241 5242 5243 5244 |
# File 'lib/ruby30_parser.rb', line 5239 def _reduce_302(val, _values, result) lexer.cmdarg.pop result = new_begin val result end |
#_reduce_303(val, _values, result) ⇒ Object
5246 5247 5248 5249 5250 5251 |
# File 'lib/ruby30_parser.rb', line 5246 def _reduce_303(val, _values, result) lexer.lex_state = EXPR_ENDARG result = lexer.lineno result end |
#_reduce_304(val, _values, result) ⇒ Object
5253 5254 5255 5256 5257 5258 |
# File 'lib/ruby30_parser.rb', line 5253 def _reduce_304(val, _values, result) _, line, _ = val result = s(:begin).line line result end |
#_reduce_305(val, _values, result) ⇒ Object
5260 5261 5262 5263 5264 |
# File 'lib/ruby30_parser.rb', line 5260 def _reduce_305(val, _values, result) lexer.lex_state = EXPR_ENDARG result end |
#_reduce_306(val, _values, result) ⇒ Object
5266 5267 5268 5269 5270 5271 5272 |
# File 'lib/ruby30_parser.rb', line 5266 def _reduce_306(val, _values, result) _, stmt, _, _, = val # warning "(...) interpreted as grouped expression" result = stmt result end |
#_reduce_307(val, _values, result) ⇒ Object
5274 5275 5276 5277 5278 5279 5280 5281 |
# File 'lib/ruby30_parser.rb', line 5274 def _reduce_307(val, _values, result) _, stmt, _ = val result = stmt result ||= s(:nil).line lexer.lineno result.paren = true result end |
#_reduce_308(val, _values, result) ⇒ Object
5283 5284 5285 5286 5287 5288 5289 |
# File 'lib/ruby30_parser.rb', line 5283 def _reduce_308(val, _values, result) expr, _, id = val result = s(:colon2, expr, id.to_sym).line expr.line result end |
#_reduce_309(val, _values, result) ⇒ Object
5291 5292 5293 5294 5295 5296 5297 |
# File 'lib/ruby30_parser.rb', line 5291 def _reduce_309(val, _values, result) _, id = val result = s(:colon3, id.to_sym).line lexer.lineno result end |
#_reduce_31(val, _values, result) ⇒ Object
3812 3813 3814 3815 3816 3817 |
# File 'lib/ruby30_parser.rb', line 3812 def _reduce_31(val, _values, result) e, _, c = val result = new_while e, c, true result end |
#_reduce_310(val, _values, result) ⇒ Object
5299 5300 5301 5302 |
# File 'lib/ruby30_parser.rb', line 5299 def _reduce_310(val, _values, result) result = lexer.lineno result end |
#_reduce_311(val, _values, result) ⇒ Object
5304 5305 5306 5307 5308 5309 5310 5311 |
# File 'lib/ruby30_parser.rb', line 5304 def _reduce_311(val, _values, result) _, line, args, _ = val result = args || s(:array) result.sexp_type = :array # aref_args is :args result.line line result end |
#_reduce_312(val, _values, result) ⇒ Object
5313 5314 5315 5316 5317 |
# File 'lib/ruby30_parser.rb', line 5313 def _reduce_312(val, _values, result) result = self.lexer.lineno result end |
#_reduce_313(val, _values, result) ⇒ Object
5319 5320 5321 5322 5323 |
# File 'lib/ruby30_parser.rb', line 5319 def _reduce_313(val, _values, result) result = new_hash val result end |
#_reduce_314(val, _values, result) ⇒ Object
5325 5326 5327 5328 5329 5330 |
# File 'lib/ruby30_parser.rb', line 5325 def _reduce_314(val, _values, result) (_, line), = val result = s(:return).line line result end |
#_reduce_315(val, _values, result) ⇒ Object
5332 5333 5334 5335 5336 |
# File 'lib/ruby30_parser.rb', line 5332 def _reduce_315(val, _values, result) result = new_yield val[2] result end |
#_reduce_316(val, _values, result) ⇒ Object
5338 5339 5340 5341 5342 |
# File 'lib/ruby30_parser.rb', line 5338 def _reduce_316(val, _values, result) result = new_yield result end |
#_reduce_317(val, _values, result) ⇒ Object
5344 5345 5346 5347 5348 |
# File 'lib/ruby30_parser.rb', line 5344 def _reduce_317(val, _values, result) result = new_yield result end |
#_reduce_318(val, _values, result) ⇒ Object
5350 5351 5352 5353 5354 5355 5356 |
# File 'lib/ruby30_parser.rb', line 5350 def _reduce_318(val, _values, result) (_, line), _, _, arg, _ = val result = s(:defined, arg).line line result end |
#_reduce_319(val, _values, result) ⇒ Object
5358 5359 5360 5361 5362 5363 |
# File 'lib/ruby30_parser.rb', line 5358 def _reduce_319(val, _values, result) _, _, lhs, _ = val result = new_call lhs, :"!" result end |
#_reduce_32(val, _values, result) ⇒ Object
3819 3820 3821 3822 3823 3824 |
# File 'lib/ruby30_parser.rb', line 3819 def _reduce_32(val, _values, result) e, _, c = val result = new_until e, c, true result end |
#_reduce_320(val, _values, result) ⇒ Object
5365 5366 5367 5368 5369 |
# File 'lib/ruby30_parser.rb', line 5365 def _reduce_320(val, _values, result) debug20 14, val, result result end |
#_reduce_321(val, _values, result) ⇒ Object
5371 5372 5373 5374 5375 5376 5377 5378 5379 |
# File 'lib/ruby30_parser.rb', line 5371 def _reduce_321(val, _values, result) call, iter = val iter.insert 1, call result = iter # FIX: probably not: call.line = iter.line result end |
#_reduce_323(val, _values, result) ⇒ Object
reduce 322 omitted
5383 5384 5385 5386 5387 5388 5389 5390 |
# File 'lib/ruby30_parser.rb', line 5383 def _reduce_323(val, _values, result) call, iter = val[0], val[1] block_dup_check call, iter iter.insert 1, call # FIX result = iter result end |
#_reduce_324(val, _values, result) ⇒ Object
5392 5393 5394 5395 5396 |
# File 'lib/ruby30_parser.rb', line 5392 def _reduce_324(val, _values, result) result = val[1] # TODO: fix lineno result end |
#_reduce_325(val, _values, result) ⇒ Object
5398 5399 5400 5401 5402 5403 |
# File 'lib/ruby30_parser.rb', line 5398 def _reduce_325(val, _values, result) _, c, _, t, f, _ = val result = new_if c, t, f result end |
#_reduce_326(val, _values, result) ⇒ Object
5405 5406 5407 5408 5409 5410 |
# File 'lib/ruby30_parser.rb', line 5405 def _reduce_326(val, _values, result) _, c, _, t, f, _ = val result = new_if c, f, t result end |
#_reduce_327(val, _values, result) ⇒ Object
5412 5413 5414 5415 5416 5417 |
# File 'lib/ruby30_parser.rb', line 5412 def _reduce_327(val, _values, result) _, cond, body, _ = val result = new_while body, cond, true result end |
#_reduce_328(val, _values, result) ⇒ Object
5419 5420 5421 5422 5423 5424 |
# File 'lib/ruby30_parser.rb', line 5419 def _reduce_328(val, _values, result) _, cond, body, _ = val result = new_until body, cond, true result end |
#_reduce_329(val, _values, result) ⇒ Object
5426 5427 5428 5429 5430 5431 |
# File 'lib/ruby30_parser.rb', line 5426 def _reduce_329(val, _values, result) (_, line), expr, _, body, _ = val result = new_case expr, body, line result end |
#_reduce_33(val, _values, result) ⇒ Object
3826 3827 3828 3829 3830 3831 3832 3833 |
# File 'lib/ruby30_parser.rb', line 3826 def _reduce_33(val, _values, result) body, _, resbody = val resbody = new_resbody s(:array).line(resbody.line), resbody result = new_rescue body, resbody result end |
#_reduce_330(val, _values, result) ⇒ Object
5433 5434 5435 5436 5437 5438 |
# File 'lib/ruby30_parser.rb', line 5433 def _reduce_330(val, _values, result) (_, line), _, body, _ = val result = new_case nil, body, line result end |
#_reduce_331(val, _values, result) ⇒ Object
5440 5441 5442 5443 5444 5445 |
# File 'lib/ruby30_parser.rb', line 5440 def _reduce_331(val, _values, result) _, var, _, iter, body, _ = val result = new_for iter, var, body result end |
#_reduce_332(val, _values, result) ⇒ Object
5447 5448 5449 5450 5451 |
# File 'lib/ruby30_parser.rb', line 5447 def _reduce_332(val, _values, result) result = self.lexer.lineno result end |
#_reduce_333(val, _values, result) ⇒ Object
5453 5454 5455 5456 5457 5458 5459 5460 5461 |
# File 'lib/ruby30_parser.rb', line 5453 def _reduce_333(val, _values, result) self.comments.push self.lexer.comments if (self.in_def || self.in_single > 0) then yyerror "class definition in method body" end self.env.extend result end |
#_reduce_334(val, _values, result) ⇒ Object
5463 5464 5465 5466 5467 5468 5469 |
# File 'lib/ruby30_parser.rb', line 5463 def _reduce_334(val, _values, result) result = new_class val self.env.unextend self.lexer.comments # we don't care about comments in the body result end |
#_reduce_335(val, _values, result) ⇒ Object
5471 5472 5473 5474 5475 |
# File 'lib/ruby30_parser.rb', line 5471 def _reduce_335(val, _values, result) result = self.lexer.lineno result end |
#_reduce_336(val, _values, result) ⇒ Object
5477 5478 5479 5480 5481 5482 |
# File 'lib/ruby30_parser.rb', line 5477 def _reduce_336(val, _values, result) result = self.in_def self.in_def = false result end |
#_reduce_337(val, _values, result) ⇒ Object
5484 5485 5486 5487 5488 5489 5490 |
# File 'lib/ruby30_parser.rb', line 5484 def _reduce_337(val, _values, result) result = self.in_single self.in_single = 0 self.env.extend result end |
#_reduce_338(val, _values, result) ⇒ Object
5492 5493 5494 5495 5496 5497 5498 |
# File 'lib/ruby30_parser.rb', line 5492 def _reduce_338(val, _values, result) result = new_sclass val self.env.unextend self.lexer.comments # we don't care about comments in the body result end |
#_reduce_339(val, _values, result) ⇒ Object
5500 5501 5502 5503 5504 |
# File 'lib/ruby30_parser.rb', line 5500 def _reduce_339(val, _values, result) result = self.lexer.lineno result end |
#_reduce_34(val, _values, result) ⇒ Object
3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 |
# File 'lib/ruby30_parser.rb', line 3835 def _reduce_34(val, _values, result) (_, line), _, stmt, _ = val if (self.in_def || self.in_single > 0) then debug20 3 yyerror "END in method; use at_exit" end result = new_iter s(:postexe).line(line), 0, stmt result end |
#_reduce_340(val, _values, result) ⇒ Object
5506 5507 5508 5509 5510 5511 5512 5513 5514 |
# File 'lib/ruby30_parser.rb', line 5506 def _reduce_340(val, _values, result) self.comments.push self.lexer.comments yyerror "module definition in method body" if self.in_def or self.in_single > 0 self.env.extend result end |
#_reduce_341(val, _values, result) ⇒ Object
5516 5517 5518 5519 5520 5521 5522 |
# File 'lib/ruby30_parser.rb', line 5516 def _reduce_341(val, _values, result) result = new_module val self.env.unextend self.lexer.comments # we don't care about comments in the body result end |
#_reduce_342(val, _values, result) ⇒ Object
5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 |
# File 'lib/ruby30_parser.rb', line 5524 def _reduce_342(val, _values, result) result = self.in_def self.in_def = true # group = local_push self.env.extend lexer.cmdarg.push false lexer.cond.push false self.comments.push self.lexer.comments result end |
#_reduce_343(val, _values, result) ⇒ Object
5537 5538 5539 5540 |
# File 'lib/ruby30_parser.rb', line 5537 def _reduce_343(val, _values, result) result = lexer.lineno result end |
#_reduce_344(val, _values, result) ⇒ Object
5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 |
# File 'lib/ruby30_parser.rb', line 5542 def _reduce_344(val, _values, result) in_def = val[2] result = new_defn val lexer.cond.pop # group = local_pop lexer.cmdarg.pop self.env.unextend self.in_def = in_def self.lexer.comments # we don't care about comments in the body result end |
#_reduce_345(val, _values, result) ⇒ Object
5557 5558 5559 5560 5561 |
# File 'lib/ruby30_parser.rb', line 5557 def _reduce_345(val, _values, result) lexer.lex_state = EXPR_FNAME result end |
#_reduce_346(val, _values, result) ⇒ Object
5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 |
# File 'lib/ruby30_parser.rb', line 5563 def _reduce_346(val, _values, result) result = [self.in_def, lexer.lineno] self.in_single += 1 # TODO: remove? self.in_def = true # local_push self.env.extend lexer.cmdarg.push false lexer.cond.push false lexer.lex_state = EXPR_ENDFN|EXPR_LABEL self.comments.push self.lexer.comments result end |
#_reduce_347(val, _values, result) ⇒ Object
5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 |
# File 'lib/ruby30_parser.rb', line 5579 def _reduce_347(val, _values, result) _, _recv, _, _, _name, (in_def, _lineno), _args, _body, _ = val result = new_defs val lexer.cond.pop # group = local_pop lexer.cmdarg.pop self.env.unextend self.in_def = in_def self.in_single -= 1 # TODO: restore cur_arg ? what's cur_arg? self.lexer.comments # we don't care about comments in the body result end |
#_reduce_348(val, _values, result) ⇒ Object
5598 5599 5600 5601 5602 5603 |
# File 'lib/ruby30_parser.rb', line 5598 def _reduce_348(val, _values, result) (_, line), = val result = s(:break).line line result end |
#_reduce_349(val, _values, result) ⇒ Object
5605 5606 5607 5608 5609 5610 |
# File 'lib/ruby30_parser.rb', line 5605 def _reduce_349(val, _values, result) (_, line), = val result = s(:next).line line result end |
#_reduce_350(val, _values, result) ⇒ Object
5612 5613 5614 5615 5616 5617 |
# File 'lib/ruby30_parser.rb', line 5612 def _reduce_350(val, _values, result) (_, line), = val result = s(:redo).line line result end |
#_reduce_351(val, _values, result) ⇒ Object
5619 5620 5621 5622 5623 5624 |
# File 'lib/ruby30_parser.rb', line 5619 def _reduce_351(val, _values, result) (_, line), = val result = s(:retry).line line result end |
#_reduce_352(val, _values, result) ⇒ Object
5626 5627 5628 5629 5630 |
# File 'lib/ruby30_parser.rb', line 5626 def _reduce_352(val, _values, result) result = value_expr(val[0]) result end |
#_reduce_36(val, _values, result) ⇒ Object
reduce 35 omitted
3850 3851 3852 3853 3854 |
# File 'lib/ruby30_parser.rb', line 3850 def _reduce_36(val, _values, result) result = new_masgn val[0], val[2], :wrap result end |
#_reduce_37(val, _values, result) ⇒ Object
3856 3857 3858 3859 3860 3861 |
# File 'lib/ruby30_parser.rb', line 3856 def _reduce_37(val, _values, result) lhs, _, rhs = val result = new_assign lhs, s(:svalue, rhs).line(rhs.line) result end |
#_reduce_378(val, _values, result) ⇒ Object
reduce 377 omitted
5682 5683 5684 5685 5686 5687 5688 |
# File 'lib/ruby30_parser.rb', line 5682 def _reduce_378(val, _values, result) (_, line), c, _, t, rest = val result = s(:if, c, t, rest).line line result end |
#_reduce_38(val, _values, result) ⇒ Object
3863 3864 3865 3866 3867 |
# File 'lib/ruby30_parser.rb', line 3863 def _reduce_38(val, _values, result) result = new_masgn val[0], val[2] result end |
#_reduce_380(val, _values, result) ⇒ Object
reduce 379 omitted
5692 5693 5694 5695 5696 |
# File 'lib/ruby30_parser.rb', line 5692 def _reduce_380(val, _values, result) result = val[1] result end |
#_reduce_382(val, _values, result) ⇒ Object
reduce 381 omitted
5700 5701 5702 5703 5704 |
# File 'lib/ruby30_parser.rb', line 5700 def _reduce_382(val, _values, result) val[0].delete_at 1 if val[0][1].nil? # HACK result end |
#_reduce_384(val, _values, result) ⇒ Object
reduce 383 omitted
5708 5709 5710 5711 5712 |
# File 'lib/ruby30_parser.rb', line 5708 def _reduce_384(val, _values, result) result = val[1] result end |
#_reduce_385(val, _values, result) ⇒ Object
5714 5715 5716 5717 5718 5719 5720 |
# File 'lib/ruby30_parser.rb', line 5714 def _reduce_385(val, _values, result) sym, = val result = s(:array, sym).line lexer.lineno result end |
#_reduce_386(val, _values, result) ⇒ Object
5722 5723 5724 5725 5726 |
# File 'lib/ruby30_parser.rb', line 5722 def _reduce_386(val, _values, result) result = list_append val[0], val[2] result end |
#_reduce_387(val, _values, result) ⇒ Object
5728 5729 5730 5731 5732 5733 5734 |
# File 'lib/ruby30_parser.rb', line 5728 def _reduce_387(val, _values, result) args, = val result = block_var args result end |
#_reduce_388(val, _values, result) ⇒ Object
5736 5737 5738 5739 5740 5741 5742 |
# File 'lib/ruby30_parser.rb', line 5736 def _reduce_388(val, _values, result) args, _, _, splat = val result = block_var args, "*#{splat}".to_sym result end |
#_reduce_389(val, _values, result) ⇒ Object
5744 5745 5746 5747 5748 5749 5750 |
# File 'lib/ruby30_parser.rb', line 5744 def _reduce_389(val, _values, result) args, _, _, splat, _, args2 = val result = block_var args, "*#{splat}".to_sym, args2 result end |
#_reduce_390(val, _values, result) ⇒ Object
5752 5753 5754 5755 5756 5757 5758 |
# File 'lib/ruby30_parser.rb', line 5752 def _reduce_390(val, _values, result) args, _, _ = val result = block_var args, :* result end |
#_reduce_391(val, _values, result) ⇒ Object
5760 5761 5762 5763 5764 5765 5766 |
# File 'lib/ruby30_parser.rb', line 5760 def _reduce_391(val, _values, result) args, _, _, _, args2 = val result = block_var args, :*, args2 result end |
#_reduce_392(val, _values, result) ⇒ Object
5768 5769 5770 5771 5772 5773 5774 |
# File 'lib/ruby30_parser.rb', line 5768 def _reduce_392(val, _values, result) _, splat = val result = block_var :"*#{splat}" result end |
#_reduce_393(val, _values, result) ⇒ Object
5776 5777 5778 5779 5780 5781 5782 |
# File 'lib/ruby30_parser.rb', line 5776 def _reduce_393(val, _values, result) _, splat, _, args = val result = block_var :"*#{splat}", args result end |
#_reduce_394(val, _values, result) ⇒ Object
5784 5785 5786 5787 5788 |
# File 'lib/ruby30_parser.rb', line 5784 def _reduce_394(val, _values, result) result = block_var :* result end |
#_reduce_395(val, _values, result) ⇒ Object
5790 5791 5792 5793 5794 5795 5796 |
# File 'lib/ruby30_parser.rb', line 5790 def _reduce_395(val, _values, result) _, _, args = val result = block_var :*, args result end |
#_reduce_396(val, _values, result) ⇒ Object
5798 5799 5800 5801 5802 |
# File 'lib/ruby30_parser.rb', line 5798 def _reduce_396(val, _values, result) result = call_args val result end |
#_reduce_397(val, _values, result) ⇒ Object
5804 5805 5806 5807 5808 |
# File 'lib/ruby30_parser.rb', line 5804 def _reduce_397(val, _values, result) result = call_args val result end |
#_reduce_398(val, _values, result) ⇒ Object
5810 5811 5812 5813 5814 |
# File 'lib/ruby30_parser.rb', line 5810 def _reduce_398(val, _values, result) result = call_args val result end |
#_reduce_399(val, _values, result) ⇒ Object
5816 5817 5818 5819 5820 5821 5822 |
# File 'lib/ruby30_parser.rb', line 5816 def _reduce_399(val, _values, result) line = lexer.lineno result = call_args val # TODO: push line down result.line line result end |
#_reduce_40(val, _values, result) ⇒ Object
reduce 39 omitted
3871 3872 3873 3874 3875 |
# File 'lib/ruby30_parser.rb', line 3871 def _reduce_40(val, _values, result) result = new_assign val[0], val[2] result end |
#_reduce_400(val, _values, result) ⇒ Object
5824 5825 5826 5827 5828 |
# File 'lib/ruby30_parser.rb', line 5824 def _reduce_400(val, _values, result) result = args val result end |
#_reduce_402(val, _values, result) ⇒ Object
reduce 401 omitted
5832 5833 5834 5835 5836 |
# File 'lib/ruby30_parser.rb', line 5832 def _reduce_402(val, _values, result) result = args val result end |
#_reduce_403(val, _values, result) ⇒ Object
5838 5839 5840 5841 5842 |
# File 'lib/ruby30_parser.rb', line 5838 def _reduce_403(val, _values, result) result = args val result end |
#_reduce_404(val, _values, result) ⇒ Object
5844 5845 5846 5847 5848 |
# File 'lib/ruby30_parser.rb', line 5844 def _reduce_404(val, _values, result) result = args val result end |
#_reduce_405(val, _values, result) ⇒ Object
5850 5851 5852 5853 5854 |
# File 'lib/ruby30_parser.rb', line 5850 def _reduce_405(val, _values, result) result = args val result end |
#_reduce_406(val, _values, result) ⇒ Object
5856 5857 5858 5859 5860 |
# File 'lib/ruby30_parser.rb', line 5856 def _reduce_406(val, _values, result) result = args val result end |
#_reduce_407(val, _values, result) ⇒ Object
5862 5863 5864 5865 5866 |
# File 'lib/ruby30_parser.rb', line 5862 def _reduce_407(val, _values, result) result = args(val) << nil result end |
#_reduce_408(val, _values, result) ⇒ Object
5868 5869 5870 5871 5872 |
# File 'lib/ruby30_parser.rb', line 5868 def _reduce_408(val, _values, result) result = args val result end |
#_reduce_409(val, _values, result) ⇒ Object
5874 5875 5876 5877 5878 |
# File 'lib/ruby30_parser.rb', line 5874 def _reduce_409(val, _values, result) result = args val result end |
#_reduce_41(val, _values, result) ⇒ Object
3877 3878 3879 3880 3881 |
# File 'lib/ruby30_parser.rb', line 3877 def _reduce_41(val, _values, result) result = new_op_asgn val result end |
#_reduce_410(val, _values, result) ⇒ Object
5880 5881 5882 5883 5884 |
# File 'lib/ruby30_parser.rb', line 5880 def _reduce_410(val, _values, result) result = args val result end |
#_reduce_411(val, _values, result) ⇒ Object
5886 5887 5888 5889 5890 |
# File 'lib/ruby30_parser.rb', line 5886 def _reduce_411(val, _values, result) result = args val result end |
#_reduce_412(val, _values, result) ⇒ Object
5892 5893 5894 5895 5896 |
# File 'lib/ruby30_parser.rb', line 5892 def _reduce_412(val, _values, result) result = args val result end |
#_reduce_413(val, _values, result) ⇒ Object
5898 5899 5900 5901 5902 |
# File 'lib/ruby30_parser.rb', line 5898 def _reduce_413(val, _values, result) result = args val result end |
#_reduce_414(val, _values, result) ⇒ Object
5904 5905 5906 5907 5908 |
# File 'lib/ruby30_parser.rb', line 5904 def _reduce_414(val, _values, result) result = args val result end |
#_reduce_415(val, _values, result) ⇒ Object
5910 5911 5912 5913 5914 |
# File 'lib/ruby30_parser.rb', line 5910 def _reduce_415(val, _values, result) result = args val result end |
#_reduce_416(val, _values, result) ⇒ Object
5916 5917 5918 5919 5920 |
# File 'lib/ruby30_parser.rb', line 5916 def _reduce_416(val, _values, result) result = args val result end |
#_reduce_417(val, _values, result) ⇒ Object
5922 5923 5924 5925 |
# File 'lib/ruby30_parser.rb', line 5922 def _reduce_417(val, _values, result) result = 0 result end |
#_reduce_418(val, _values, result) ⇒ Object
5927 5928 5929 5930 5931 |
# File 'lib/ruby30_parser.rb', line 5927 def _reduce_418(val, _values, result) self.lexer.command_start = true result end |
#_reduce_419(val, _values, result) ⇒ Object
5933 5934 5935 5936 5937 5938 |
# File 'lib/ruby30_parser.rb', line 5933 def _reduce_419(val, _values, result) # TODO: current_arg = 0 result = args val result end |
#_reduce_42(val, _values, result) ⇒ Object
3883 3884 3885 3886 3887 |
# File 'lib/ruby30_parser.rb', line 3883 def _reduce_42(val, _values, result) result = new_op_asgn1 val result end |
#_reduce_420(val, _values, result) ⇒ Object
5940 5941 5942 5943 5944 |
# File 'lib/ruby30_parser.rb', line 5940 def _reduce_420(val, _values, result) result = s(:args).line lexer.lineno result end |
#_reduce_421(val, _values, result) ⇒ Object
5946 5947 5948 5949 5950 5951 |
# File 'lib/ruby30_parser.rb', line 5946 def _reduce_421(val, _values, result) # TODO: current_arg = 0 result = args val result end |
#_reduce_423(val, _values, result) ⇒ Object
reduce 422 omitted
5955 5956 5957 5958 5959 |
# File 'lib/ruby30_parser.rb', line 5955 def _reduce_423(val, _values, result) result = args val result end |
#_reduce_424(val, _values, result) ⇒ Object
5961 5962 5963 5964 5965 |
# File 'lib/ruby30_parser.rb', line 5961 def _reduce_424(val, _values, result) result = args val result end |
#_reduce_425(val, _values, result) ⇒ Object
5967 5968 5969 5970 5971 |
# File 'lib/ruby30_parser.rb', line 5967 def _reduce_425(val, _values, result) result = args val result end |
#_reduce_426(val, _values, result) ⇒ Object
5973 5974 5975 5976 5977 5978 5979 |
# File 'lib/ruby30_parser.rb', line 5973 def _reduce_426(val, _values, result) id, = val line = lexer.lineno result = s(:shadow, id.to_sym).line line result end |
#_reduce_428(val, _values, result) ⇒ Object
reduce 427 omitted
5983 5984 5985 5986 5987 5988 5989 5990 |
# File 'lib/ruby30_parser.rb', line 5983 def _reduce_428(val, _values, result) self.env.extend :dynamic result = [lexer.lineno, lexer.lpar_beg] lexer.paren_nest += 1 lexer.lpar_beg = lexer.paren_nest result end |
#_reduce_429(val, _values, result) ⇒ Object
5992 5993 5994 5995 5996 |
# File 'lib/ruby30_parser.rb', line 5992 def _reduce_429(val, _values, result) lexer.cmdarg.push false result end |
#_reduce_43(val, _values, result) ⇒ Object
3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 |
# File 'lib/ruby30_parser.rb', line 3889 def _reduce_43(val, _values, result) prim, _, id, opasgn, rhs = val result = s(:op_asgn, prim, rhs, id.to_sym, opasgn.to_sym) if val[1] == '&.' result.sexp_type = :safe_op_asgn end result.line = val[0].line result end |
#_reduce_430(val, _values, result) ⇒ Object
5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 |
# File 'lib/ruby30_parser.rb', line 5998 def _reduce_430(val, _values, result) (line, lpar), args, _cmdarg, body = val lexer.lpar_beg = lpar lexer.cmdarg.pop call = s(:lambda).line line result = new_iter call, args, body result.line = line self.env.unextend # TODO: dynapush & dynapop result end |
#_reduce_431(val, _values, result) ⇒ Object
6012 6013 6014 6015 6016 |
# File 'lib/ruby30_parser.rb', line 6012 def _reduce_431(val, _values, result) result = args val result end |
#_reduce_432(val, _values, result) ⇒ Object
6018 6019 6020 6021 6022 6023 |
# File 'lib/ruby30_parser.rb', line 6018 def _reduce_432(val, _values, result) result = val[0] result = 0 if result == s(:args) result end |
#_reduce_433(val, _values, result) ⇒ Object
6025 6026 6027 6028 6029 |
# File 'lib/ruby30_parser.rb', line 6025 def _reduce_433(val, _values, result) result = val[1] result end |
#_reduce_434(val, _values, result) ⇒ Object
6031 6032 6033 6034 6035 |
# File 'lib/ruby30_parser.rb', line 6031 def _reduce_434(val, _values, result) result = val[1] result end |
#_reduce_435(val, _values, result) ⇒ Object
6037 6038 6039 6040 6041 6042 |
# File 'lib/ruby30_parser.rb', line 6037 def _reduce_435(val, _values, result) (_, line), iter, _ = val result = iter.line line result end |
#_reduce_436(val, _values, result) ⇒ Object
6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 |
# File 'lib/ruby30_parser.rb', line 6044 def _reduce_436(val, _values, result) # TODO: ## if (nd_type($1) == NODE_YIELD) { ## compile_error(PARSER_ARG "block given to yield"); syntax_error "Both block arg and actual block given." if val[0].block_pass? val = invert_block_call val if inverted? val cmd, blk = val result = blk result.insert 1, cmd result end |
#_reduce_437(val, _values, result) ⇒ Object
6062 6063 6064 6065 6066 |
# File 'lib/ruby30_parser.rb', line 6062 def _reduce_437(val, _values, result) result = new_call val[0], val[2].to_sym, val[3] result end |
#_reduce_438(val, _values, result) ⇒ Object
6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 |
# File 'lib/ruby30_parser.rb', line 6068 def _reduce_438(val, _values, result) iter1, _, name, args, iter2 = val call = new_call iter1, name.to_sym, args iter2.insert 1, call result = iter2 result end |
#_reduce_439(val, _values, result) ⇒ Object
6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 |
# File 'lib/ruby30_parser.rb', line 6079 def _reduce_439(val, _values, result) iter1, _, name, args, iter2 = val call = new_call iter1, name.to_sym, args iter2.insert 1, call result = iter2 result end |
#_reduce_44(val, _values, result) ⇒ Object
3900 3901 3902 3903 3904 3905 3906 3907 3908 |
# File 'lib/ruby30_parser.rb', line 3900 def _reduce_44(val, _values, result) result = s(:op_asgn, val[0], val[4], val[2].to_sym, val[3].to_sym) if val[1] == '&.' result.sexp_type = :safe_op_asgn end result.line = val[0].line result end |
#_reduce_440(val, _values, result) ⇒ Object
6090 6091 6092 6093 6094 |
# File 'lib/ruby30_parser.rb', line 6090 def _reduce_440(val, _values, result) result = self.lexer.lineno result end |
#_reduce_441(val, _values, result) ⇒ Object
6096 6097 6098 6099 6100 6101 6102 6103 |
# File 'lib/ruby30_parser.rb', line 6096 def _reduce_441(val, _values, result) call, lineno, args = val result = call.concat args.sexp_body if args result.line lineno result end |
#_reduce_442(val, _values, result) ⇒ Object
6105 6106 6107 6108 6109 |
# File 'lib/ruby30_parser.rb', line 6105 def _reduce_442(val, _values, result) result = new_call val[0], val[2].to_sym, val[3], val[1] result end |
#_reduce_443(val, _values, result) ⇒ Object
6111 6112 6113 6114 6115 |
# File 'lib/ruby30_parser.rb', line 6111 def _reduce_443(val, _values, result) result = new_call val[0], val[2].to_sym, val[3] result end |
#_reduce_444(val, _values, result) ⇒ Object
6117 6118 6119 6120 6121 |
# File 'lib/ruby30_parser.rb', line 6117 def _reduce_444(val, _values, result) result = new_call val[0], val[2].to_sym result end |
#_reduce_445(val, _values, result) ⇒ Object
6123 6124 6125 6126 6127 |
# File 'lib/ruby30_parser.rb', line 6123 def _reduce_445(val, _values, result) result = new_call val[0], :call, val[2], val[1] result end |
#_reduce_446(val, _values, result) ⇒ Object
6129 6130 6131 6132 6133 |
# File 'lib/ruby30_parser.rb', line 6129 def _reduce_446(val, _values, result) result = new_call val[0], :call, val[2] result end |
#_reduce_447(val, _values, result) ⇒ Object
6135 6136 6137 6138 6139 |
# File 'lib/ruby30_parser.rb', line 6135 def _reduce_447(val, _values, result) result = new_super val[1] result end |
#_reduce_448(val, _values, result) ⇒ Object
6141 6142 6143 6144 6145 |
# File 'lib/ruby30_parser.rb', line 6141 def _reduce_448(val, _values, result) result = s(:zsuper).line lexer.lineno result end |
#_reduce_449(val, _values, result) ⇒ Object
6147 6148 6149 6150 6151 |
# File 'lib/ruby30_parser.rb', line 6147 def _reduce_449(val, _values, result) result = new_aref val result end |
#_reduce_45(val, _values, result) ⇒ Object
3910 3911 3912 3913 3914 3915 3916 |
# File 'lib/ruby30_parser.rb', line 3910 def _reduce_45(val, _values, result) lhs1, _, lhs2, op, rhs = val result = s(:op_asgn, lhs1, rhs, lhs2.to_sym, op.to_sym) result end |
#_reduce_450(val, _values, result) ⇒ Object
6153 6154 6155 6156 6157 6158 |
# File 'lib/ruby30_parser.rb', line 6153 def _reduce_450(val, _values, result) self.env.extend :dynamic result = self.lexer.lineno result end |
#_reduce_451(val, _values, result) ⇒ Object
6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 |
# File 'lib/ruby30_parser.rb', line 6160 def _reduce_451(val, _values, result) _, line, body, _ = val result = body result.line = line self.env.unextend result end |
#_reduce_452(val, _values, result) ⇒ Object
6171 6172 6173 6174 6175 6176 |
# File 'lib/ruby30_parser.rb', line 6171 def _reduce_452(val, _values, result) self.env.extend :dynamic result = self.lexer.lineno result end |
#_reduce_453(val, _values, result) ⇒ Object
6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 |
# File 'lib/ruby30_parser.rb', line 6178 def _reduce_453(val, _values, result) _, line, body, _ = val result = body result.line = line self.env.unextend result end |
#_reduce_454(val, _values, result) ⇒ Object
6189 6190 6191 6192 |
# File 'lib/ruby30_parser.rb', line 6189 def _reduce_454(val, _values, result) self.env.extend :dynamic; result = self.lexer.lineno result end |
#_reduce_455(val, _values, result) ⇒ Object
6194 6195 6196 6197 |
# File 'lib/ruby30_parser.rb', line 6194 def _reduce_455(val, _values, result) result = lexer.cmdarg.store(false) result end |
#_reduce_456(val, _values, result) ⇒ Object
6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 |
# File 'lib/ruby30_parser.rb', line 6199 def _reduce_456(val, _values, result) line, cmdarg, param, cmpstmt = val result = new_brace_body param, cmpstmt, line self.env.unextend lexer.cmdarg.restore cmdarg lexer.cmdarg.pop # because of: cmdarg_stack >> 1 ? result end |
#_reduce_457(val, _values, result) ⇒ Object
6210 6211 6212 6213 |
# File 'lib/ruby30_parser.rb', line 6210 def _reduce_457(val, _values, result) self.env.extend :dynamic; result = self.lexer.lineno result end |
#_reduce_458(val, _values, result) ⇒ Object
6215 6216 6217 6218 |
# File 'lib/ruby30_parser.rb', line 6215 def _reduce_458(val, _values, result) lexer.cmdarg.push false result end |
#_reduce_459(val, _values, result) ⇒ Object
6220 6221 6222 6223 6224 6225 6226 6227 6228 |
# File 'lib/ruby30_parser.rb', line 6220 def _reduce_459(val, _values, result) line, _cmdarg, param, cmpstmt = val result = new_do_body param, cmpstmt, line lexer.cmdarg.pop self.env.unextend result end |
#_reduce_46(val, _values, result) ⇒ Object
3918 3919 3920 3921 3922 3923 3924 |
# File 'lib/ruby30_parser.rb', line 3918 def _reduce_46(val, _values, result) lhs1, _, lhs2, op, rhs = val result = s(:op_asgn, lhs1, rhs, lhs2.to_sym, op.to_sym) result end |
#_reduce_460(val, _values, result) ⇒ Object
6230 6231 6232 6233 6234 |
# File 'lib/ruby30_parser.rb', line 6230 def _reduce_460(val, _values, result) result = self.lexer.lineno result end |
#_reduce_461(val, _values, result) ⇒ Object
6236 6237 6238 6239 6240 6241 6242 |
# File 'lib/ruby30_parser.rb', line 6236 def _reduce_461(val, _values, result) result = new_when(val[2], val[4]) result.line = val[1] result << val[5] if val[5] result end |
#_reduce_464(val, _values, result) ⇒ Object
reduce 463 omitted
6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 |
# File 'lib/ruby30_parser.rb', line 6248 def _reduce_464(val, _values, result) (_, line), klasses, var, _, body, rest = val klasses ||= s(:array) klasses << new_assign(var, s(:gvar, :"$!").line(var.line)) if var klasses.line line result = new_resbody(klasses, body) result << rest if rest # UGH, rewritten above result end |
#_reduce_465(val, _values, result) ⇒ Object
6261 6262 6263 6264 6265 |
# File 'lib/ruby30_parser.rb', line 6261 def _reduce_465(val, _values, result) result = nil result end |
#_reduce_466(val, _values, result) ⇒ Object
6267 6268 6269 6270 6271 6272 |
# File 'lib/ruby30_parser.rb', line 6267 def _reduce_466(val, _values, result) arg, = val result = s(:array, arg).line arg.line result end |
#_reduce_469(val, _values, result) ⇒ Object
reduce 468 omitted
6278 6279 6280 6281 6282 |
# File 'lib/ruby30_parser.rb', line 6278 def _reduce_469(val, _values, result) result = val[1] result end |
#_reduce_47(val, _values, result) ⇒ Object
3926 3927 3928 3929 3930 |
# File 'lib/ruby30_parser.rb', line 3926 def _reduce_47(val, _values, result) self.backref_assign_error val[0] result end |
#_reduce_471(val, _values, result) ⇒ Object
reduce 470 omitted
6286 6287 6288 6289 6290 6291 6292 |
# File 'lib/ruby30_parser.rb', line 6286 def _reduce_471(val, _values, result) (_, line), body = val result = body || s(:nil).line(line) result end |
#_reduce_473(val, _values, result) ⇒ Object
reduce 472 omitted
6296 6297 6298 6299 6300 6301 6302 |
# File 'lib/ruby30_parser.rb', line 6296 def _reduce_473(val, _values, result) line = lexer.lineno result = s(:lit, val[0]) result.line = line result end |
#_reduce_474(val, _values, result) ⇒ Object
6304 6305 6306 6307 6308 6309 6310 |
# File 'lib/ruby30_parser.rb', line 6304 def _reduce_474(val, _values, result) line = lexer.lineno result = s(:lit, val[0]) result.line = line result end |
#_reduce_476(val, _values, result) ⇒ Object
reduce 475 omitted
6314 6315 6316 6317 6318 6319 6320 |
# File 'lib/ruby30_parser.rb', line 6314 def _reduce_476(val, _values, result) str, = val str = s(:dstr, str.value) if str.sexp_type == :evstr result = str result end |
#_reduce_477(val, _values, result) ⇒ Object
6322 6323 6324 6325 6326 |
# File 'lib/ruby30_parser.rb', line 6322 def _reduce_477(val, _values, result) debug20 23, val, result result end |
#_reduce_479(val, _values, result) ⇒ Object
reduce 478 omitted
6330 6331 6332 6333 6334 |
# File 'lib/ruby30_parser.rb', line 6330 def _reduce_479(val, _values, result) result = self.literal_concat val[0], val[1] result end |
#_reduce_48(val, _values, result) ⇒ Object
3932 3933 3934 3935 3936 3937 |
# File 'lib/ruby30_parser.rb', line 3932 def _reduce_48(val, _values, result) expr, = val result = value_expr expr result end |
#_reduce_480(val, _values, result) ⇒ Object
6336 6337 6338 6339 6340 6341 6342 6343 6344 |
# File 'lib/ruby30_parser.rb', line 6336 def _reduce_480(val, _values, result) _, str, (_, func) = val str = dedent str if func =~ RubyLexer::STR_FUNC_ICNTNT result = str result end |
#_reduce_481(val, _values, result) ⇒ Object
6346 6347 6348 6349 6350 |
# File 'lib/ruby30_parser.rb', line 6346 def _reduce_481(val, _values, result) result = new_string val result end |
#_reduce_482(val, _values, result) ⇒ Object
6352 6353 6354 6355 6356 6357 |
# File 'lib/ruby30_parser.rb', line 6352 def _reduce_482(val, _values, result) result = new_xstring val # TODO: dedent?!?! SERIOUSLY?!? result end |
#_reduce_483(val, _values, result) ⇒ Object
6359 6360 6361 6362 6363 |
# File 'lib/ruby30_parser.rb', line 6359 def _reduce_483(val, _values, result) result = new_regexp val result end |
#_reduce_484(val, _values, result) ⇒ Object
6365 6366 6367 6368 6369 |
# File 'lib/ruby30_parser.rb', line 6365 def _reduce_484(val, _values, result) result = s(:array).line lexer.lineno result end |
#_reduce_485(val, _values, result) ⇒ Object
6371 6372 6373 6374 6375 |
# File 'lib/ruby30_parser.rb', line 6371 def _reduce_485(val, _values, result) result = val[1] result end |
#_reduce_486(val, _values, result) ⇒ Object
6377 6378 6379 6380 6381 |
# File 'lib/ruby30_parser.rb', line 6377 def _reduce_486(val, _values, result) result = new_word_list result end |
#_reduce_487(val, _values, result) ⇒ Object
6383 6384 6385 6386 6387 |
# File 'lib/ruby30_parser.rb', line 6383 def _reduce_487(val, _values, result) result = val[0].dup << new_word_list_entry(val) result end |
#_reduce_489(val, _values, result) ⇒ Object
reduce 488 omitted
6391 6392 6393 6394 6395 |
# File 'lib/ruby30_parser.rb', line 6391 def _reduce_489(val, _values, result) result = self.literal_concat val[0], val[1] result end |
#_reduce_49(val, _values, result) ⇒ Object
3939 3940 3941 3942 3943 3944 3945 3946 3947 |
# File 'lib/ruby30_parser.rb', line 3939 def _reduce_49(val, _values, result) expr, (_, line), resbody = val expr = value_expr expr ary = s(:array).line line result = new_rescue(expr, new_resbody(ary, resbody)) result end |
#_reduce_490(val, _values, result) ⇒ Object
6397 6398 6399 6400 6401 |
# File 'lib/ruby30_parser.rb', line 6397 def _reduce_490(val, _values, result) result = s(:array).line lexer.lineno result end |
#_reduce_491(val, _values, result) ⇒ Object
6403 6404 6405 6406 |
# File 'lib/ruby30_parser.rb', line 6403 def _reduce_491(val, _values, result) result = lexer.lineno result end |
#_reduce_492(val, _values, result) ⇒ Object
6408 6409 6410 6411 6412 6413 6414 |
# File 'lib/ruby30_parser.rb', line 6408 def _reduce_492(val, _values, result) _, line, list, _, = val list.line = line result = list result end |
#_reduce_493(val, _values, result) ⇒ Object
6416 6417 6418 6419 6420 |
# File 'lib/ruby30_parser.rb', line 6416 def _reduce_493(val, _values, result) result = new_symbol_list.line lexer.lineno result end |
#_reduce_494(val, _values, result) ⇒ Object
6422 6423 6424 6425 6426 6427 |
# File 'lib/ruby30_parser.rb', line 6422 def _reduce_494(val, _values, result) list, * = val result = list.dup << new_symbol_list_entry(val) result end |
#_reduce_495(val, _values, result) ⇒ Object
6429 6430 6431 6432 6433 |
# File 'lib/ruby30_parser.rb', line 6429 def _reduce_495(val, _values, result) result = s(:array).line lexer.lineno result end |
#_reduce_496(val, _values, result) ⇒ Object
6435 6436 6437 6438 6439 |
# File 'lib/ruby30_parser.rb', line 6435 def _reduce_496(val, _values, result) result = val[1] result end |
#_reduce_497(val, _values, result) ⇒ Object
6441 6442 6443 6444 6445 |
# File 'lib/ruby30_parser.rb', line 6441 def _reduce_497(val, _values, result) result = s(:array).line lexer.lineno # FIX result end |
#_reduce_498(val, _values, result) ⇒ Object
6447 6448 6449 6450 6451 |
# File 'lib/ruby30_parser.rb', line 6447 def _reduce_498(val, _values, result) result = val[1] result end |
#_reduce_499(val, _values, result) ⇒ Object
6453 6454 6455 6456 6457 |
# File 'lib/ruby30_parser.rb', line 6453 def _reduce_499(val, _values, result) result = new_qword_list result end |
#_reduce_500(val, _values, result) ⇒ Object
6459 6460 6461 6462 6463 |
# File 'lib/ruby30_parser.rb', line 6459 def _reduce_500(val, _values, result) result = val[0].dup << new_qword_list_entry(val) result end |
#_reduce_501(val, _values, result) ⇒ Object
6465 6466 6467 6468 6469 |
# File 'lib/ruby30_parser.rb', line 6465 def _reduce_501(val, _values, result) result = new_qsym_list result end |
#_reduce_502(val, _values, result) ⇒ Object
6471 6472 6473 6474 6475 |
# File 'lib/ruby30_parser.rb', line 6471 def _reduce_502(val, _values, result) result = val[0].dup << new_qsym_list_entry(val) result end |
#_reduce_503(val, _values, result) ⇒ Object
6477 6478 6479 6480 6481 |
# File 'lib/ruby30_parser.rb', line 6477 def _reduce_503(val, _values, result) result = s(:str, "").line lexer.lineno result end |
#_reduce_504(val, _values, result) ⇒ Object
6483 6484 6485 6486 6487 6488 |
# File 'lib/ruby30_parser.rb', line 6483 def _reduce_504(val, _values, result) v1, v2 = val result = literal_concat v1, v2 result end |
#_reduce_505(val, _values, result) ⇒ Object
6490 6491 6492 6493 6494 |
# File 'lib/ruby30_parser.rb', line 6490 def _reduce_505(val, _values, result) result = nil result end |
#_reduce_506(val, _values, result) ⇒ Object
6496 6497 6498 6499 6500 6501 |
# File 'lib/ruby30_parser.rb', line 6496 def _reduce_506(val, _values, result) v1, v2 = val result = literal_concat v1, v2 result end |
#_reduce_507(val, _values, result) ⇒ Object
6503 6504 6505 6506 6507 |
# File 'lib/ruby30_parser.rb', line 6503 def _reduce_507(val, _values, result) result = nil result end |
#_reduce_508(val, _values, result) ⇒ Object
6509 6510 6511 6512 6513 6514 |
# File 'lib/ruby30_parser.rb', line 6509 def _reduce_508(val, _values, result) v1, v2 = val result = literal_concat v1, v2 result end |
#_reduce_509(val, _values, result) ⇒ Object
6516 6517 6518 6519 6520 |
# File 'lib/ruby30_parser.rb', line 6516 def _reduce_509(val, _values, result) result = new_string val result end |
#_reduce_510(val, _values, result) ⇒ Object
6522 6523 6524 6525 6526 6527 6528 6529 |
# File 'lib/ruby30_parser.rb', line 6522 def _reduce_510(val, _values, result) result = lexer.lex_strterm lexer.lex_strterm = nil lexer.lex_state = EXPR_BEG result end |
#_reduce_511(val, _values, result) ⇒ Object
6531 6532 6533 6534 6535 6536 6537 |
# File 'lib/ruby30_parser.rb', line 6531 def _reduce_511(val, _values, result) _, strterm, str = val lexer.lex_strterm = strterm result = s(:evstr, str).line str.line result end |
#_reduce_512(val, _values, result) ⇒ Object
6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 |
# File 'lib/ruby30_parser.rb', line 6539 def _reduce_512(val, _values, result) result = [lexer.lex_strterm, lexer.brace_nest, lexer.string_nest, # TODO: remove lexer.lex_state, lexer.lineno, ] lexer.cmdarg.push false lexer.cond.push false lexer.lex_strterm = nil lexer.brace_nest = 0 lexer.string_nest = 0 lexer.lex_state = EXPR_BEG result end |
#_reduce_513(val, _values, result) ⇒ Object
6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 |
# File 'lib/ruby30_parser.rb', line 6559 def _reduce_513(val, _values, result) _, memo, stmt, _ = val lex_strterm, brace_nest, string_nest, oldlex_state, line = memo # TODO: heredoc_indent lexer.lex_strterm = lex_strterm lexer.brace_nest = brace_nest lexer.string_nest = string_nest lexer.cmdarg.pop lexer.cond.pop lexer.lex_state = oldlex_state case stmt when Sexp then case stmt.sexp_type when :str, :dstr, :evstr then result = stmt else result = s(:evstr, stmt).line line end when nil then result = s(:evstr).line line else debug20 25 raise "unknown string body: #{stmt.inspect}" end result end |
#_reduce_514(val, _values, result) ⇒ Object
6592 6593 6594 6595 |
# File 'lib/ruby30_parser.rb', line 6592 def _reduce_514(val, _values, result) result = s(:gvar, val[0].to_sym).line lexer.lineno result end |
#_reduce_515(val, _values, result) ⇒ Object
6597 6598 6599 6600 |
# File 'lib/ruby30_parser.rb', line 6597 def _reduce_515(val, _values, result) result = s(:ivar, val[0].to_sym).line lexer.lineno result end |
#_reduce_516(val, _values, result) ⇒ Object
6602 6603 6604 6605 |
# File 'lib/ruby30_parser.rb', line 6602 def _reduce_516(val, _values, result) result = s(:cvar, val[0].to_sym).line lexer.lineno result end |
#_reduce_518(val, _values, result) ⇒ Object
reduce 517 omitted
6609 6610 6611 6612 6613 6614 |
# File 'lib/ruby30_parser.rb', line 6609 def _reduce_518(val, _values, result) lexer.lex_state = EXPR_END result = val[1].to_sym result end |
#_reduce_519(val, _values, result) ⇒ Object
6616 6617 6618 6619 6620 |
# File 'lib/ruby30_parser.rb', line 6616 def _reduce_519(val, _values, result) result = val[0].to_sym result end |
#_reduce_52(val, _values, result) ⇒ Object
reduce 51 omitted
3953 3954 3955 3956 3957 3958 |
# File 'lib/ruby30_parser.rb', line 3953 def _reduce_52(val, _values, result) lhs, _, rhs = val result = logical_op :and, lhs, rhs result end |
#_reduce_524(val, _values, result) ⇒ Object
reduce 523 omitted
6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 |
# File 'lib/ruby30_parser.rb', line 6630 def _reduce_524(val, _values, result) _, result, _ = val lexer.lex_state = EXPR_END result ||= s(:str, "").line lexer.lineno case result.sexp_type when :dstr then result.sexp_type = :dsym when :str then result = s(:lit, result.last.to_sym).line result.line when :evstr then result = s(:dsym, "", result).line result.line else debug20 26, val, result end result end |
#_reduce_526(val, _values, result) ⇒ Object
reduce 525 omitted
6653 6654 6655 6656 6657 |
# File 'lib/ruby30_parser.rb', line 6653 def _reduce_526(val, _values, result) result = -val[1] # TODO: pt_testcase result end |
#_reduce_53(val, _values, result) ⇒ Object
3960 3961 3962 3963 3964 3965 |
# File 'lib/ruby30_parser.rb', line 3960 def _reduce_53(val, _values, result) lhs, _, rhs = val result = logical_op :or, lhs, rhs result end |
#_reduce_536(val, _values, result) ⇒ Object
reduce 535 omitted
6677 6678 6679 6680 |
# File 'lib/ruby30_parser.rb', line 6677 def _reduce_536(val, _values, result) result = s(:nil).line lexer.lineno result end |
#_reduce_537(val, _values, result) ⇒ Object
6682 6683 6684 6685 |
# File 'lib/ruby30_parser.rb', line 6682 def _reduce_537(val, _values, result) result = s(:self).line lexer.lineno result end |
#_reduce_538(val, _values, result) ⇒ Object
6687 6688 6689 6690 |
# File 'lib/ruby30_parser.rb', line 6687 def _reduce_538(val, _values, result) result = s(:true).line lexer.lineno result end |
#_reduce_539(val, _values, result) ⇒ Object
6692 6693 6694 6695 |
# File 'lib/ruby30_parser.rb', line 6692 def _reduce_539(val, _values, result) result = s(:false).line lexer.lineno result end |
#_reduce_54(val, _values, result) ⇒ Object
3967 3968 3969 3970 3971 3972 3973 |
# File 'lib/ruby30_parser.rb', line 3967 def _reduce_54(val, _values, result) (_, line), _, expr = val result = new_call(expr, :"!").line line # REFACTOR: call_uni_op result end |
#_reduce_540(val, _values, result) ⇒ Object
6697 6698 6699 6700 |
# File 'lib/ruby30_parser.rb', line 6697 def _reduce_540(val, _values, result) result = s(:str, self.file).line lexer.lineno result end |
#_reduce_541(val, _values, result) ⇒ Object
6702 6703 6704 6705 |
# File 'lib/ruby30_parser.rb', line 6702 def _reduce_541(val, _values, result) result = s(:lit, lexer.lineno).line lexer.lineno result end |
#_reduce_542(val, _values, result) ⇒ Object
6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 |
# File 'lib/ruby30_parser.rb', line 6707 def _reduce_542(val, _values, result) l = lexer.lineno result = if defined? Encoding then s(:colon2, s(:const, :Encoding).line(l), :UTF_8).line l else s(:str, "Unsupported!").line l end result end |
#_reduce_543(val, _values, result) ⇒ Object
6719 6720 6721 6722 6723 6724 |
# File 'lib/ruby30_parser.rb', line 6719 def _reduce_543(val, _values, result) var = val[0] result = Sexp === var ? var : self.gettable(var) result end |
#_reduce_544(val, _values, result) ⇒ Object
6726 6727 6728 6729 6730 6731 |
# File 'lib/ruby30_parser.rb', line 6726 def _reduce_544(val, _values, result) var = val[0] result = Sexp === var ? var : self.gettable(var) result end |
#_reduce_545(val, _values, result) ⇒ Object
6733 6734 6735 6736 6737 |
# File 'lib/ruby30_parser.rb', line 6733 def _reduce_545(val, _values, result) result = self.assignable val[0] result end |
#_reduce_546(val, _values, result) ⇒ Object
6739 6740 6741 6742 6743 6744 |
# File 'lib/ruby30_parser.rb', line 6739 def _reduce_546(val, _values, result) result = self.assignable val[0] debug20 29, val, result result end |
#_reduce_547(val, _values, result) ⇒ Object
6746 6747 6748 6749 |
# File 'lib/ruby30_parser.rb', line 6746 def _reduce_547(val, _values, result) result = s(:nth_ref, val[0]).line lexer.lineno result end |
#_reduce_548(val, _values, result) ⇒ Object
6751 6752 6753 6754 |
# File 'lib/ruby30_parser.rb', line 6751 def _reduce_548(val, _values, result) result = s(:back_ref, val[0]).line lexer.lineno result end |
#_reduce_549(val, _values, result) ⇒ Object
6756 6757 6758 6759 6760 6761 |
# File 'lib/ruby30_parser.rb', line 6756 def _reduce_549(val, _values, result) lexer.lex_state = EXPR_BEG lexer.command_start = true result end |
#_reduce_55(val, _values, result) ⇒ Object
3975 3976 3977 3978 3979 3980 3981 3982 |
# File 'lib/ruby30_parser.rb', line 3975 def _reduce_55(val, _values, result) _, cmd = val result = new_call(cmd, :"!").line cmd.line # TODO: fix line number to tBANG... but causes BAD shift/reduce conflict # REFACTOR: call_uni_op -- see parse26.y result end |
#_reduce_550(val, _values, result) ⇒ Object
6763 6764 6765 6766 6767 |
# File 'lib/ruby30_parser.rb', line 6763 def _reduce_550(val, _values, result) result = val[2] result end |
#_reduce_551(val, _values, result) ⇒ Object
6769 6770 6771 6772 6773 |
# File 'lib/ruby30_parser.rb', line 6769 def _reduce_551(val, _values, result) result = nil result end |
#_reduce_552(val, _values, result) ⇒ Object
6775 6776 6777 6778 6779 6780 6781 |
# File 'lib/ruby30_parser.rb', line 6775 def _reduce_552(val, _values, result) result = val[1] self.lexer.lex_state = EXPR_BEG self.lexer.command_start = true result end |
#_reduce_553(val, _values, result) ⇒ Object
6783 6784 6785 6786 6787 6788 6789 |
# File 'lib/ruby30_parser.rb', line 6783 def _reduce_553(val, _values, result) result = self.in_kwarg self.in_kwarg = true self.lexer.lex_state |= EXPR_LABEL result end |
#_reduce_554(val, _values, result) ⇒ Object
6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 |
# File 'lib/ruby30_parser.rb', line 6791 def _reduce_554(val, _values, result) kwarg, args, _ = val self.in_kwarg = kwarg result = args lexer.lex_state = EXPR_BEG lexer.command_start = true result end |
#_reduce_555(val, _values, result) ⇒ Object
6802 6803 6804 6805 6806 |
# File 'lib/ruby30_parser.rb', line 6802 def _reduce_555(val, _values, result) result = args val result end |
#_reduce_556(val, _values, result) ⇒ Object
6808 6809 6810 6811 6812 |
# File 'lib/ruby30_parser.rb', line 6808 def _reduce_556(val, _values, result) result = args val result end |
#_reduce_557(val, _values, result) ⇒ Object
6814 6815 6816 6817 6818 |
# File 'lib/ruby30_parser.rb', line 6814 def _reduce_557(val, _values, result) result = args val result end |
#_reduce_559(val, _values, result) ⇒ Object
reduce 558 omitted
6822 6823 6824 6825 6826 |
# File 'lib/ruby30_parser.rb', line 6822 def _reduce_559(val, _values, result) result = val[1] result end |
#_reduce_560(val, _values, result) ⇒ Object
6828 6829 6830 6831 6832 |
# File 'lib/ruby30_parser.rb', line 6828 def _reduce_560(val, _values, result) result = nil result end |
#_reduce_561(val, _values, result) ⇒ Object
6834 6835 6836 6837 6838 |
# File 'lib/ruby30_parser.rb', line 6834 def _reduce_561(val, _values, result) result = args val result end |
#_reduce_562(val, _values, result) ⇒ Object
6840 6841 6842 6843 6844 |
# File 'lib/ruby30_parser.rb', line 6840 def _reduce_562(val, _values, result) result = args val result end |
#_reduce_563(val, _values, result) ⇒ Object
6846 6847 6848 6849 6850 |
# File 'lib/ruby30_parser.rb', line 6846 def _reduce_563(val, _values, result) result = args val result end |
#_reduce_564(val, _values, result) ⇒ Object
6852 6853 6854 6855 6856 |
# File 'lib/ruby30_parser.rb', line 6852 def _reduce_564(val, _values, result) result = args val result end |
#_reduce_565(val, _values, result) ⇒ Object
6858 6859 6860 6861 6862 |
# File 'lib/ruby30_parser.rb', line 6858 def _reduce_565(val, _values, result) result = args val result end |
#_reduce_566(val, _values, result) ⇒ Object
6864 6865 6866 6867 6868 |
# File 'lib/ruby30_parser.rb', line 6864 def _reduce_566(val, _values, result) result = args val result end |
#_reduce_567(val, _values, result) ⇒ Object
6870 6871 6872 6873 6874 |
# File 'lib/ruby30_parser.rb', line 6870 def _reduce_567(val, _values, result) result = args val result end |
#_reduce_568(val, _values, result) ⇒ Object
6876 6877 6878 6879 6880 |
# File 'lib/ruby30_parser.rb', line 6876 def _reduce_568(val, _values, result) result = args val result end |
#_reduce_569(val, _values, result) ⇒ Object
6882 6883 6884 6885 6886 |
# File 'lib/ruby30_parser.rb', line 6882 def _reduce_569(val, _values, result) result = args val result end |
#_reduce_57(val, _values, result) ⇒ Object
reduce 56 omitted
3986 3987 3988 3989 3990 |
# File 'lib/ruby30_parser.rb', line 3986 def _reduce_57(val, _values, result) result = value_expr(val[0]) result end |
#_reduce_570(val, _values, result) ⇒ Object
6888 6889 6890 6891 6892 |
# File 'lib/ruby30_parser.rb', line 6888 def _reduce_570(val, _values, result) result = args val result end |
#_reduce_571(val, _values, result) ⇒ Object
6894 6895 6896 6897 6898 |
# File 'lib/ruby30_parser.rb', line 6894 def _reduce_571(val, _values, result) result = args val result end |
#_reduce_572(val, _values, result) ⇒ Object
6900 6901 6902 6903 6904 |
# File 'lib/ruby30_parser.rb', line 6900 def _reduce_572(val, _values, result) result = args val result end |
#_reduce_573(val, _values, result) ⇒ Object
6906 6907 6908 6909 6910 |
# File 'lib/ruby30_parser.rb', line 6906 def _reduce_573(val, _values, result) result = args val result end |
#_reduce_574(val, _values, result) ⇒ Object
6912 6913 6914 6915 6916 |
# File 'lib/ruby30_parser.rb', line 6912 def _reduce_574(val, _values, result) result = args val result end |
#_reduce_575(val, _values, result) ⇒ Object
6918 6919 6920 6921 6922 |
# File 'lib/ruby30_parser.rb', line 6918 def _reduce_575(val, _values, result) result = args val result end |
#_reduce_576(val, _values, result) ⇒ Object
6924 6925 6926 6927 6928 |
# File 'lib/ruby30_parser.rb', line 6924 def _reduce_576(val, _values, result) yyerror "formal argument cannot be a constant" result end |
#_reduce_577(val, _values, result) ⇒ Object
6930 6931 6932 6933 6934 |
# File 'lib/ruby30_parser.rb', line 6930 def _reduce_577(val, _values, result) yyerror "formal argument cannot be an instance variable" result end |
#_reduce_578(val, _values, result) ⇒ Object
6936 6937 6938 6939 6940 |
# File 'lib/ruby30_parser.rb', line 6936 def _reduce_578(val, _values, result) yyerror "formal argument cannot be a global variable" result end |
#_reduce_579(val, _values, result) ⇒ Object
6942 6943 6944 6945 6946 |
# File 'lib/ruby30_parser.rb', line 6942 def _reduce_579(val, _values, result) yyerror "formal argument cannot be a class variable" result end |
#_reduce_58(val, _values, result) ⇒ Object
3992 3993 3994 3995 3996 |
# File 'lib/ruby30_parser.rb', line 3992 def _reduce_58(val, _values, result) lexer.cond.push true result end |
#_reduce_581(val, _values, result) ⇒ Object
reduce 580 omitted
6950 6951 6952 6953 6954 6955 6956 6957 |
# File 'lib/ruby30_parser.rb', line 6950 def _reduce_581(val, _values, result) identifier = val[0].to_sym self.env[identifier] = :lvar result = identifier result end |
#_reduce_584(val, _values, result) ⇒ Object
reduce 583 omitted
6963 6964 6965 6966 6967 |
# File 'lib/ruby30_parser.rb', line 6963 def _reduce_584(val, _values, result) result = val[1] result end |
#_reduce_585(val, _values, result) ⇒ Object
6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 |
# File 'lib/ruby30_parser.rb', line 6969 def _reduce_585(val, _values, result) arg, = val case arg when Symbol then result = s(:args, arg).line lexer.lineno when Sexp then result = arg else debug20 32 raise "Unknown f_arg type: #{val.inspect}" end result end |
#_reduce_586(val, _values, result) ⇒ Object
6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 |
# File 'lib/ruby30_parser.rb', line 6985 def _reduce_586(val, _values, result) list, _, item = val if list.sexp_type == :args then result = list else result = s(:args, list).line list.line end result << item result end |
#_reduce_588(val, _values, result) ⇒ Object
reduce 587 omitted
7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 |
# File 'lib/ruby30_parser.rb', line 7001 def _reduce_588(val, _values, result) # TODO: new_kw_arg (label, line), arg = val identifier = label.to_sym self.env[identifier] = :lvar kwarg = s(:kwarg, identifier, arg).line line result = s(:array, kwarg).line line result end |
#_reduce_589(val, _values, result) ⇒ Object
7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 |
# File 'lib/ruby30_parser.rb', line 7014 def _reduce_589(val, _values, result) (label, line), = val id = label.to_sym self.env[id] = :lvar result = s(:array, s(:kwarg, id).line(line)).line line result end |
#_reduce_59(val, _values, result) ⇒ Object
3998 3999 4000 4001 4002 |
# File 'lib/ruby30_parser.rb', line 3998 def _reduce_59(val, _values, result) lexer.cond.pop result end |
#_reduce_590(val, _values, result) ⇒ Object
7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 |
# File 'lib/ruby30_parser.rb', line 7025 def _reduce_590(val, _values, result) # TODO: new_kw_arg (label, line), expr = val id = label.to_sym self.env[id] = :lvar result = s(:array, s(:kwarg, id, expr).line(line)).line line result end |
#_reduce_591(val, _values, result) ⇒ Object
7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 |
# File 'lib/ruby30_parser.rb', line 7036 def _reduce_591(val, _values, result) # TODO: new_kw_arg (label, line), = val id = label.to_sym self.env[id] = :lvar result = s(:array, s(:kwarg, id).line(line)).line line result end |
#_reduce_593(val, _values, result) ⇒ Object
reduce 592 omitted
7049 7050 7051 7052 7053 7054 |
# File 'lib/ruby30_parser.rb', line 7049 def _reduce_593(val, _values, result) list, _, item = val result = list << item.last result end |
#_reduce_595(val, _values, result) ⇒ Object
reduce 594 omitted
7058 7059 7060 7061 7062 |
# File 'lib/ruby30_parser.rb', line 7058 def _reduce_595(val, _values, result) result = args val result end |
#_reduce_598(val, _values, result) ⇒ Object
reduce 597 omitted
7068 7069 7070 7071 7072 7073 7074 |
# File 'lib/ruby30_parser.rb', line 7068 def _reduce_598(val, _values, result) name = val[1].to_sym self.assignable name result = :"**#{name}" result end |
#_reduce_599(val, _values, result) ⇒ Object
7076 7077 7078 7079 7080 |
# File 'lib/ruby30_parser.rb', line 7076 def _reduce_599(val, _values, result) result = :"**" result end |
#_reduce_6(val, _values, result) ⇒ Object
reduce 5 omitted
3661 3662 3663 3664 3665 |
# File 'lib/ruby30_parser.rb', line 3661 def _reduce_6(val, _values, result) result = self.block_append val[0], val[2] result end |
#_reduce_60(val, _values, result) ⇒ Object
4004 4005 4006 4007 4008 4009 |
# File 'lib/ruby30_parser.rb', line 4004 def _reduce_60(val, _values, result) _, expr, _, _ = val result = expr result end |
#_reduce_600(val, _values, result) ⇒ Object
7082 7083 7084 7085 7086 7087 |
# File 'lib/ruby30_parser.rb', line 7082 def _reduce_600(val, _values, result) result = self.assignable val[0], val[2] # TODO: detect duplicate names result end |
#_reduce_601(val, _values, result) ⇒ Object
7089 7090 7091 7092 7093 |
# File 'lib/ruby30_parser.rb', line 7089 def _reduce_601(val, _values, result) result = self.assignable val[0], val[2] result end |
#_reduce_602(val, _values, result) ⇒ Object
7095 7096 7097 7098 7099 7100 |
# File 'lib/ruby30_parser.rb', line 7095 def _reduce_602(val, _values, result) optblk, = val result = s(:block, optblk).line optblk.line result end |
#_reduce_603(val, _values, result) ⇒ Object
7102 7103 7104 7105 7106 7107 7108 |
# File 'lib/ruby30_parser.rb', line 7102 def _reduce_603(val, _values, result) optarg, _, optblk = val result = optarg result << optblk result end |
#_reduce_604(val, _values, result) ⇒ Object
7110 7111 7112 7113 7114 7115 |
# File 'lib/ruby30_parser.rb', line 7110 def _reduce_604(val, _values, result) opt, = val result = s(:block, opt).line opt.line result end |
#_reduce_605(val, _values, result) ⇒ Object
7117 7118 7119 7120 7121 |
# File 'lib/ruby30_parser.rb', line 7117 def _reduce_605(val, _values, result) result = self.block_append val[0], val[2] result end |
#_reduce_608(val, _values, result) ⇒ Object
reduce 607 omitted
7127 7128 7129 7130 7131 7132 7133 7134 |
# File 'lib/ruby30_parser.rb', line 7127 def _reduce_608(val, _values, result) # TODO: differs from parse.y - needs tests name = val[1].to_sym self.assignable name result = :"*#{name}" result end |
#_reduce_609(val, _values, result) ⇒ Object
7136 7137 7138 7139 7140 7141 7142 |
# File 'lib/ruby30_parser.rb', line 7136 def _reduce_609(val, _values, result) name = :"*" self.env[name] = :lvar result = name result end |
#_reduce_612(val, _values, result) ⇒ Object
reduce 611 omitted
7148 7149 7150 7151 7152 7153 7154 7155 |
# File 'lib/ruby30_parser.rb', line 7148 def _reduce_612(val, _values, result) identifier = val[1].to_sym self.env[identifier] = :lvar result = "&#{identifier}".to_sym result end |
#_reduce_613(val, _values, result) ⇒ Object
7157 7158 7159 7160 7161 |
# File 'lib/ruby30_parser.rb', line 7157 def _reduce_613(val, _values, result) result = val[1] result end |
#_reduce_614(val, _values, result) ⇒ Object
7163 7164 7165 7166 7167 |
# File 'lib/ruby30_parser.rb', line 7163 def _reduce_614(val, _values, result) result = nil result end |
#_reduce_616(val, _values, result) ⇒ Object
reduce 615 omitted
7171 7172 7173 7174 7175 |
# File 'lib/ruby30_parser.rb', line 7171 def _reduce_616(val, _values, result) lexer.lex_state = EXPR_BEG result end |
#_reduce_617(val, _values, result) ⇒ Object
7177 7178 7179 7180 7181 7182 7183 |
# File 'lib/ruby30_parser.rb', line 7177 def _reduce_617(val, _values, result) result = val[2] yyerror "Can't define single method for literals." if result.sexp_type == :lit result end |
#_reduce_618(val, _values, result) ⇒ Object
7185 7186 7187 7188 7189 |
# File 'lib/ruby30_parser.rb', line 7185 def _reduce_618(val, _values, result) result = s(:array).line lexer.lineno result end |
#_reduce_621(val, _values, result) ⇒ Object
reduce 620 omitted
7195 7196 7197 7198 7199 7200 7201 7202 7203 |
# File 'lib/ruby30_parser.rb', line 7195 def _reduce_621(val, _values, result) list = val[0].dup more = val[2].sexp_body list.push(*more) unless more.empty? result = list result.sexp_type = :hash result end |
#_reduce_622(val, _values, result) ⇒ Object
7205 7206 7207 7208 7209 7210 |
# File 'lib/ruby30_parser.rb', line 7205 def _reduce_622(val, _values, result) v1, _, v2 = val result = s(:array, v1, v2).line v1.line result end |
#_reduce_623(val, _values, result) ⇒ Object
7212 7213 7214 7215 7216 7217 7218 7219 |
# File 'lib/ruby30_parser.rb', line 7212 def _reduce_623(val, _values, result) (label, line), arg = val lit = s(:lit, label.to_sym).line line result = s(:array, lit, arg).line line result end |
#_reduce_624(val, _values, result) ⇒ Object
7221 7222 7223 7224 7225 7226 7227 |
# File 'lib/ruby30_parser.rb', line 7221 def _reduce_624(val, _values, result) _, sym, _, value = val sym.sexp_type = :dsym result = s(:array, sym, value).line sym.line result end |
#_reduce_625(val, _values, result) ⇒ Object
7229 7230 7231 7232 7233 7234 7235 |
# File 'lib/ruby30_parser.rb', line 7229 def _reduce_625(val, _values, result) _, arg = val line = arg.line result = s(:array, s(:kwsplat, arg).line(line)).line line result end |
#_reduce_64(val, _values, result) ⇒ Object
reduce 63 omitted
4017 4018 4019 4020 4021 4022 |
# File 'lib/ruby30_parser.rb', line 4017 def _reduce_64(val, _values, result) blk, _, msg, args = val result = new_call(blk, msg.to_sym, args).line blk.line result end |
#_reduce_65(val, _values, result) ⇒ Object
4024 4025 4026 4027 4028 4029 |
# File 'lib/ruby30_parser.rb', line 4024 def _reduce_65(val, _values, result) # self.env.extend(:dynamic) result = self.lexer.lineno result end |
#_reduce_651(val, _values, result) ⇒ Object
reduce 650 omitted
7287 7288 7289 7290 |
# File 'lib/ruby30_parser.rb', line 7287 def _reduce_651(val, _values, result) yyerrok result end |
#_reduce_654(val, _values, result) ⇒ Object
reduce 653 omitted
7296 7297 7298 7299 |
# File 'lib/ruby30_parser.rb', line 7296 def _reduce_654(val, _values, result) yyerrok result end |
#_reduce_655(val, _values, result) ⇒ Object
7301 7302 7303 7304 |
# File 'lib/ruby30_parser.rb', line 7301 def _reduce_655(val, _values, result) result = nil; result end |
#_reduce_66(val, _values, result) ⇒ Object
4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 |
# File 'lib/ruby30_parser.rb', line 4031 def _reduce_66(val, _values, result) _, line, body, _ = val result = body result.line = line # self.env.unextend result end |
#_reduce_67(val, _values, result) ⇒ Object
4042 4043 4044 4045 4046 4047 |
# File 'lib/ruby30_parser.rb', line 4042 def _reduce_67(val, _values, result) msg, = val result = new_call(nil, msg.to_sym).line lexer.lineno result end |
#_reduce_68(val, _values, result) ⇒ Object
4049 4050 4051 4052 4053 4054 |
# File 'lib/ruby30_parser.rb', line 4049 def _reduce_68(val, _values, result) call, args = val result = call.concat args.sexp_body result end |
#_reduce_69(val, _values, result) ⇒ Object
4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 |
# File 'lib/ruby30_parser.rb', line 4056 def _reduce_69(val, _values, result) call, args, block = val result = call.concat args.sexp_body if block then block_dup_check result, block result, operation = block, result result.insert 1, operation end result end |
#_reduce_70(val, _values, result) ⇒ Object
4071 4072 4073 4074 4075 4076 |
# File 'lib/ruby30_parser.rb', line 4071 def _reduce_70(val, _values, result) lhs, callop, op, args = val result = new_call lhs, op.to_sym, args, callop result end |
#_reduce_71(val, _values, result) ⇒ Object
4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 |
# File 'lib/ruby30_parser.rb', line 4078 def _reduce_71(val, _values, result) recv, _, msg, args, block = val call = new_call recv, msg.to_sym, args, val[1] block_dup_check call, block block.insert 1, call result = block result end |
#_reduce_72(val, _values, result) ⇒ Object
4090 4091 4092 4093 4094 |
# File 'lib/ruby30_parser.rb', line 4090 def _reduce_72(val, _values, result) result = new_call val[0], val[2].to_sym, val[3] result end |
#_reduce_73(val, _values, result) ⇒ Object
4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 |
# File 'lib/ruby30_parser.rb', line 4096 def _reduce_73(val, _values, result) recv, _, msg, args, block = val call = new_call recv, msg.to_sym, args block_dup_check call, block block.insert 1, call result = block result end |
#_reduce_74(val, _values, result) ⇒ Object
4108 4109 4110 4111 4112 |
# File 'lib/ruby30_parser.rb', line 4108 def _reduce_74(val, _values, result) result = new_super val[1] result end |
#_reduce_75(val, _values, result) ⇒ Object
4114 4115 4116 4117 4118 4119 4120 |
# File 'lib/ruby30_parser.rb', line 4114 def _reduce_75(val, _values, result) (_, line), args = val result = new_yield args result.line line # TODO: push to new_yield result end |
#_reduce_76(val, _values, result) ⇒ Object
4122 4123 4124 4125 4126 4127 |
# File 'lib/ruby30_parser.rb', line 4122 def _reduce_76(val, _values, result) line = val[0].last result = s(:return, ret_args(val[1])).line(line) result end |
#_reduce_77(val, _values, result) ⇒ Object
4129 4130 4131 4132 4133 4134 |
# File 'lib/ruby30_parser.rb', line 4129 def _reduce_77(val, _values, result) (_, line), args = val result = s(:break, ret_args(args)).line line result end |
#_reduce_78(val, _values, result) ⇒ Object
4136 4137 4138 4139 4140 4141 |
# File 'lib/ruby30_parser.rb', line 4136 def _reduce_78(val, _values, result) line = val[0].last result = s(:next, ret_args(val[1])).line(line) result end |
#_reduce_80(val, _values, result) ⇒ Object
reduce 79 omitted
4145 4146 4147 4148 4149 |
# File 'lib/ruby30_parser.rb', line 4145 def _reduce_80(val, _values, result) result = val[1] result end |
#_reduce_82(val, _values, result) ⇒ Object
reduce 81 omitted
4153 4154 4155 4156 4157 4158 4159 4160 |
# File 'lib/ruby30_parser.rb', line 4153 def _reduce_82(val, _values, result) _, arg, _ = val l = arg.line result = s(:masgn, s(:array, arg).line(l)).line l result end |
#_reduce_83(val, _values, result) ⇒ Object
4162 4163 4164 4165 4166 4167 |
# File 'lib/ruby30_parser.rb', line 4162 def _reduce_83(val, _values, result) head, = val result = s(:masgn, head).line head.line result end |
#_reduce_84(val, _values, result) ⇒ Object
4169 4170 4171 4172 4173 4174 |
# File 'lib/ruby30_parser.rb', line 4169 def _reduce_84(val, _values, result) lhs, rhs = val result = s(:masgn, lhs << rhs.compact).line lhs.line result end |
#_reduce_85(val, _values, result) ⇒ Object
4176 4177 4178 4179 4180 4181 4182 |
# File 'lib/ruby30_parser.rb', line 4176 def _reduce_85(val, _values, result) head, _, tail = val head << s(:splat, tail).line(tail.line) result = s(:masgn, head).line head.line result end |
#_reduce_86(val, _values, result) ⇒ Object
4184 4185 4186 4187 4188 4189 4190 4191 4192 |
# File 'lib/ruby30_parser.rb', line 4184 def _reduce_86(val, _values, result) ary1, _, splat, _, ary2 = val result = list_append ary1, s(:splat, splat).line(splat.line) result.concat ary2.sexp_body result = s(:masgn, result).line result.line result end |
#_reduce_87(val, _values, result) ⇒ Object
4194 4195 4196 4197 4198 4199 4200 |
# File 'lib/ruby30_parser.rb', line 4194 def _reduce_87(val, _values, result) head, _ = val l = head.line result = s(:masgn, head << s(:splat).line(l)).line l result end |
#_reduce_88(val, _values, result) ⇒ Object
4202 4203 4204 4205 4206 4207 4208 4209 |
# File 'lib/ruby30_parser.rb', line 4202 def _reduce_88(val, _values, result) head, _, _, post = val ary = list_append head, s(:splat).line(head.line) ary.concat post.sexp_body result = s(:masgn, ary).line ary.line result end |
#_reduce_89(val, _values, result) ⇒ Object
4211 4212 4213 4214 4215 4216 4217 4218 4219 |
# File 'lib/ruby30_parser.rb', line 4211 def _reduce_89(val, _values, result) _, node = val l = node.line splat = s(:splat, node).line l ary = s(:array, splat).line l result = s(:masgn, ary).line l result end |
#_reduce_9(val, _values, result) ⇒ Object
reduce 8 omitted
3671 3672 3673 3674 3675 3676 3677 3678 3679 |
# File 'lib/ruby30_parser.rb', line 3671 def _reduce_9(val, _values, result) if (self.in_def || self.in_single > 0) then debug20 1 yyerror "BEGIN in method" end self.env.extend result end |
#_reduce_90(val, _values, result) ⇒ Object
4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 |
# File 'lib/ruby30_parser.rb', line 4221 def _reduce_90(val, _values, result) _, node, _, post = val splat = s(:splat, node).line node.line ary = s(:array, splat).line splat.line ary.concat post.sexp_body result = s(:masgn, ary).line ary.line result end |
#_reduce_91(val, _values, result) ⇒ Object
4232 4233 4234 4235 4236 4237 |
# File 'lib/ruby30_parser.rb', line 4232 def _reduce_91(val, _values, result) l = lexer.lineno result = s(:masgn, s(:array, s(:splat).line(l)).line(l)).line l result end |
#_reduce_92(val, _values, result) ⇒ Object
4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 |
# File 'lib/ruby30_parser.rb', line 4239 def _reduce_92(val, _values, result) _, _, post = val l = post.line splat = s(:splat).line l ary = s(:array, splat, *post.sexp_body).line l result = s(:masgn, ary).line l result end |
#_reduce_94(val, _values, result) ⇒ Object
reduce 93 omitted
4252 4253 4254 4255 4256 |
# File 'lib/ruby30_parser.rb', line 4252 def _reduce_94(val, _values, result) result = val[1] result end |
#_reduce_95(val, _values, result) ⇒ Object
4258 4259 4260 4261 4262 4263 |
# File 'lib/ruby30_parser.rb', line 4258 def _reduce_95(val, _values, result) lhs, _ = val result = s(:array, lhs).line lhs.line result end |
#_reduce_96(val, _values, result) ⇒ Object
4265 4266 4267 4268 4269 |
# File 'lib/ruby30_parser.rb', line 4265 def _reduce_96(val, _values, result) result = val[0] << val[1].compact result end |
#_reduce_97(val, _values, result) ⇒ Object
4271 4272 4273 4274 4275 4276 |
# File 'lib/ruby30_parser.rb', line 4271 def _reduce_97(val, _values, result) item, = val result = s(:array, item).line item.line result end |
#_reduce_98(val, _values, result) ⇒ Object
4278 4279 4280 4281 4282 |
# File 'lib/ruby30_parser.rb', line 4278 def _reduce_98(val, _values, result) result = list_append val[0], val[2] result end |
#_reduce_99(val, _values, result) ⇒ Object
4284 4285 4286 4287 4288 |
# File 'lib/ruby30_parser.rb', line 4284 def _reduce_99(val, _values, result) result = self.assignable val[0] result end |
#_reduce_none(val, _values, result) ⇒ Object
7306 7307 7308 |
# File 'lib/ruby30_parser.rb', line 7306 def _reduce_none(val, _values, result) val[0] end |