From c1596a80afc2841e9368c950c82ffbf44c6987e1 Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 4 Jul 2007 09:32:45 +0000 Subject: * parse.y (mlhs_inner): new rule. [ruby-dev:31132] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ parse.y | 17 ++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 48e04571c2..6d1a23e929 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Jul 4 18:30:04 2007 Tanaka Akira + + * parse.y (mlhs_inner): new rule. [ruby-dev:31132] + Wed Jul 4 05:11:57 2007 Koichi Sasada * iseq.c (set_relation): added. diff --git a/parse.y b/parse.y index 88cb61bdec..328c7c604c 100644 --- a/parse.y +++ b/parse.y @@ -626,7 +626,7 @@ static void ripper_compile_error(struct parser_params*, const char *fmt, ...); %type bv_decls opt_bv_decl bvar %type lambda f_larglist lambda_body %type brace_block cmd_brace_block do_block lhs none fitem -%type mlhs mlhs_head mlhs_basic mlhs_item mlhs_node mlhs_post +%type mlhs mlhs_head mlhs_basic mlhs_item mlhs_node mlhs_post mlhs_inner %type fsym variable sym symbol operation operation2 operation3 %type cname fname op f_rest_arg f_block_arg opt_f_block_arg f_norm_arg /*%%%*/ @@ -1305,7 +1305,18 @@ command : operation command_args %prec tLOWEST ; mlhs : mlhs_basic - | tLPAREN mlhs rparen + | tLPAREN mlhs_inner rparen + { + /*%%%*/ + $$ = $2; + /*% + $$ = dispatch1(mlhs_paren, $2); + %*/ + } + ; + +mlhs_inner : mlhs_basic + | tLPAREN mlhs_inner rparen { /*%%%*/ $$ = NEW_MASGN(NEW_LIST($2), 0); @@ -1398,7 +1409,7 @@ mlhs_basic : mlhs_head ; mlhs_item : mlhs_node - | tLPAREN mlhs rparen + | tLPAREN mlhs_inner rparen { /*%%%*/ $$ = $2; -- cgit v1.2.3