ruby-changes:14750
From: knu <ko1@a...>
Date: Sun, 7 Feb 2010 04:18:46 +0900 (JST)
Subject: [ruby-changes:14750] Ruby:r26609 (ruby_1_8): * parse.y: Get rid of tags for Ripper, pointless in 1.8.
knu 2010-02-07 04:04:07 +0900 (Sun, 07 Feb 2010) New Revision: 26609 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26609 Log: * parse.y: Get rid of tags for Ripper, pointless in 1.8. Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/parse.y Index: ruby_1_8/parse.y =================================================================== --- ruby_1_8/parse.y (revision 26608) +++ ruby_1_8/parse.y (revision 26609) @@ -773,83 +773,43 @@ mlhs_basic : mlhs_head { - /*%%%*/ $$ = NEW_MASGN($1, 0); - /*% - $$ = $1; - %*/ } | mlhs_head mlhs_item { - /*%%%*/ $$ = NEW_MASGN(list_append($1,$2), 0); - /*% - $$ = mlhs_add($1, $2); - %*/ } | mlhs_head tSTAR mlhs_node { - /*%%%*/ $$ = NEW_MASGN($1, $3); - /*% - $$ = mlhs_add_star($1, $3); - %*/ } | mlhs_head tSTAR mlhs_node ',' mlhs_post { - /*%%%*/ $$ = NEW_MASGN($1, NEW_POSTARG($3,$5)); - /*% - $$ = mlhs_add_star($1, $3); - %*/ } | mlhs_head tSTAR { - /*%%%*/ $$ = NEW_MASGN($1, -1); - /*% - $$ = mlhs_add_star($1, Qnil); - %*/ } | mlhs_head tSTAR ',' mlhs_post { - /*%%%*/ $$ = NEW_MASGN($1, NEW_POSTARG((NODE *)-1, $4)); - /*% - $$ = mlhs_add_star($1, Qnil); - %*/ } | tSTAR mlhs_node { - /*%%%*/ $$ = NEW_MASGN(0, $2); - /*% - $$ = mlhs_add_star(mlhs_new(), $2); - %*/ } | tSTAR mlhs_node ',' mlhs_post { - /*%%%*/ $$ = NEW_MASGN(0, NEW_POSTARG($2,$4)); - /*% - $$ = mlhs_add_star(mlhs_new(), $2); - %*/ } | tSTAR { - /*%%%*/ $$ = NEW_MASGN(0, -1); - /*% - $$ = mlhs_add_star(mlhs_new(), Qnil); - %*/ } | tSTAR ',' mlhs_post { - /*%%%*/ $$ = NEW_MASGN(0, NEW_POSTARG((NODE *)-1, $3)); - /*% - $$ = mlhs_add_star(mlhs_new(), Qnil); - %*/ } ; @@ -872,19 +832,11 @@ mlhs_post : mlhs_item { - /*%%%*/ $$ = NEW_LIST($1); - /*% - $$ = mlhs_add(mlhs_new(), $1); - %*/ } | mlhs_post ',' mlhs_item { - /*%%%*/ $$ = list_append($1, $3); - /*% - $$ = mlhs_add($1, $3); - %*/ } ; @@ -1331,11 +1283,7 @@ } | args ',' assocs trailer { - /*%%%*/ $$ = arg_append($1, NEW_HASH($3)); - /*% - $$ = arg_add_assocs($1, $3); - %*/ } | assocs trailer { @@ -1454,11 +1402,7 @@ } | tSTAR arg_value { - /*%%%*/ if (!($$ = splat_array($2))) $$ = NEW_SPLAT($2); - /*% - $$ = arg_add_star(arg_new(), $2); - %*/ } | args ',' arg_value { @@ -1466,7 +1410,6 @@ } | args ',' tSTAR arg_value { - /*%%%*/ NODE *n1; if ((nd_type($4) == NODE_ARRAY) && (n1 = splat_array($1)) != 0) { $$ = list_concat(n1, $4); @@ -1474,9 +1417,6 @@ else { $$ = arg_concat($1, $4); } - /*% - $$ = arg_add_star($1, $4); - %*/ } ; @@ -1486,11 +1426,7 @@ } | tSTAR arg_value { - /*%%%*/ $$ = NEW_SPLAT($2); - /*% - $$ = arg_add_star(arg_new(), $2); - %*/ } | args2 ',' arg_value { @@ -1498,7 +1434,6 @@ } | args2 ',' tSTAR arg_value { - /*%%%*/ NODE *n1; if ((nd_type($4) == NODE_ARRAY) && (n1 = splat_array($1)) != 0) { $$ = list_concat(n1, $4); @@ -1506,9 +1441,6 @@ else { $$ = arg_concat($1, $4); } - /*% - $$ = arg_add_star($1, $4); - %*/ } ; @@ -1979,15 +1911,11 @@ } | primary_value '[' opt_call_args ']' { - /*%%%*/ if ($1 && nd_type($1) == NODE_SELF) $$ = NEW_FCALL(tAREF, $3); else $$ = NEW_CALL($1, tAREF, $3); fixpos($$, $1); - /*% - $$ = dispatch2(aref, $1, escape_Qundef($3)); - %*/ } ; @@ -2377,123 +2305,63 @@ f_args : f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg { - /*%%%*/ $$ = new_args($1, $3, $5, 0, $6); - /*% - $$ = params_new($1, $3, $5, Qnil, escape_Qundef($6)); - %*/ } | f_arg ',' f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg { - /*%%%*/ $$ = new_args($1, $3, $5, $7, $8); - /*% - $$ = params_new($1, $3, $5, $7, escape_Qundef($8)); - %*/ } | f_arg ',' f_optarg opt_f_block_arg { - /*%%%*/ $$ = new_args($1, $3, 0, 0, $4); - /*% - $$ = params_new($1, $3, Qnil, Qnil, escape_Qundef($4)); - %*/ } | f_arg ',' f_optarg ',' f_arg opt_f_block_arg { - /*%%%*/ $$ = new_args($1, $3, 0, $5, $6); - /*% - $$ = params_new($1, $3, Qnil, $5, escape_Qundef($6)); - %*/ } | f_arg ',' f_rest_arg opt_f_block_arg { - /*%%%*/ $$ = new_args($1, 0, $3, 0, $4); - /*% - $$ = params_new($1, Qnil, $3, Qnil, escape_Qundef($4)); - %*/ } | f_arg ',' f_rest_arg ',' f_arg opt_f_block_arg { - /*%%%*/ $$ = new_args($1, 0, $3, $5, $6); - /*% - $$ = params_new($1, Qnil, $3, $5, escape_Qundef($6)); - %*/ } | f_arg opt_f_block_arg { - /*%%%*/ $$ = new_args($1, 0, 0, 0, $2); - /*% - $$ = params_new($1, Qnil, Qnil, Qnil,escape_Qundef($2)); - %*/ } | f_optarg ',' f_rest_arg opt_f_block_arg { - /*%%%*/ $$ = new_args(0, $1, $3, 0, $4); - /*% - $$ = params_new(Qnil, $1, $3, Qnil, escape_Qundef($4)); - %*/ } | f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg { - /*%%%*/ $$ = new_args(0, $1, $3, $5, $6); - /*% - $$ = params_new(Qnil, $1, $3, $5, escape_Qundef($6)); - %*/ } | f_optarg opt_f_block_arg { - /*%%%*/ $$ = new_args(0, $1, 0, 0, $2); - /*% - $$ = params_new(Qnil, $1, Qnil, Qnil,escape_Qundef($2)); - %*/ } | f_optarg ',' f_arg opt_f_block_arg { - /*%%%*/ $$ = new_args(0, $1, 0, $3, $4); - /*% - $$ = params_new(Qnil, $1, Qnil, $3, escape_Qundef($4)); - %*/ } | f_rest_arg opt_f_block_arg { - /*%%%*/ $$ = new_args(0, 0, $1, 0, $2); - /*% - $$ = params_new(Qnil, Qnil, $1, Qnil,escape_Qundef($2)); - %*/ } | f_rest_arg ',' f_arg opt_f_block_arg { - /*%%%*/ $$ = new_args(0, 0, $1, $3, $4); - /*% - $$ = params_new(Qnil, Qnil, $1, $3, escape_Qundef($4)); - %*/ } | f_block_arg { - /*%%%*/ $$ = new_args(0, 0, 0, 0, $1); - /*% - $$ = params_new(Qnil, Qnil, Qnil, Qnil, $1); - %*/ } | /* none */ { - /*%%%*/ $$ = new_args(0, 0, 0, 0, 0); - /*% - $$ = params_new(Qnil, Qnil, Qnil, Qnil, Qnil); - %*/ } ; @@ -2656,11 +2524,7 @@ } | tLABEL arg_value { - /*%%%*/ $$ = list_append(NEW_LIST(NEW_LIT(ID2SYM($1))), $2); - /*% - $$ = dispatch2(assoc_new, $1, $2); - %*/ } ; Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 26608) +++ ruby_1_8/ChangeLog (revision 26609) @@ -1,3 +1,7 @@ +Sun Feb 7 04:02:08 2010 Akinori MUSHA <knu@i...> + + * parse.y: Get rid of tags for Ripper, pointless in 1.8. + Sat Feb 6 02:06:01 2010 Akinori MUSHA <knu@i...> * test/ruby/test_array.rb (TestArray#test_splat): Add test cases -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/