From f61858b1164eab2afd67c3814b79d50a386a92c0 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 24 Jun 1998 04:38:10 +0000 Subject: thread->thred git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index de14f4f6ea..2ae06640fe 100644 --- a/parse.y +++ b/parse.y @@ -180,7 +180,7 @@ static void top_local_setup(); %type f_arglist f_args f_optarg f_opt f_block_arg opt_f_block_arg %type array assoc_list assocs assoc undef_list %type iter_var opt_iter_var iter_block iter_do_block -%type mlhs mlhs_head mlhs_tail lhs backref +%type mlhs mlhs_head mlhs_tail mlhs_basic mlhs_item lhs backref %type variable symbol operation %type cname fname op f_rest_arg %type f_arg @@ -433,13 +433,21 @@ command_call : operation call_args fixpos($$, $2); } -mlhs : mlhs_head +mlhs : mlhs_basic + | tLPAREN mlhs_item ')' { - $$ = NEW_MASGN(NEW_LIST($1), 0); + $$ = $2; } - | tLPAREN mlhs ')' + +mlhs_item : mlhs_basic + | tLPAREN mlhs_item ')' { - $$ = $2; + $$ = NEW_MASGN(NEW_LIST($2), 0); + } + +mlhs_basic : mlhs_head + { + $$ = NEW_MASGN(NEW_LIST($1), 0); } | mlhs_head tSTAR lhs { @@ -459,7 +467,7 @@ mlhs : mlhs_head } mlhs_head : lhs ',' - | tLPAREN mlhs ')' ',' + | tLPAREN mlhs_item ')' ',' { $$ = $2; } @@ -468,7 +476,7 @@ mlhs_tail : lhs { $$ = NEW_LIST($1); } - | tLPAREN mlhs ')' + | tLPAREN mlhs_item ')' { $$ = NEW_LIST($2); } @@ -853,6 +861,7 @@ mrhs : args } | args ',' tSTAR arg { + value_expr($4); $$ = arg_add($1, $4); } | tSTAR arg -- cgit v1.2.3