summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-04 07:16:00 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-04 07:16:00 +0000
commit3ea95ff3477b22b26bd5ecbb3f4c5680aac59a58 (patch)
tree93514c73f93d968797dabc8e5615ab16b45a437c
parentcbe9159b078a984748bc5eddccd07f3b27edd508 (diff)
* parse.y (mlhs): should interpret single parenthesized left hand
side expression. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--parse.y13
2 files changed, 8 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 32b211e..745a9c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Oct 4 15:46:32 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * parse.y (mlhs): should interpret single parenthesized left hand
+ side expression.
+
Wed Oct 4 08:52:30 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* test/optparse/test_getopts.rb: changed the class name of test case
diff --git a/parse.y b/parse.y
index 4359705..21cbbfd 100644
--- a/parse.y
+++ b/parse.y
@@ -279,7 +279,7 @@ static void top_local_setup();
%type <node> f_arglist f_args f_optarg f_opt f_rest_arg f_block_arg opt_f_block_arg
%type <node> assoc_list assocs assoc undef_list backref string_dvar
%type <node> block_var opt_block_var brace_block cmd_brace_block do_block lhs none fitem
-%type <node> mlhs mlhs_head mlhs_basic mlhs_entry mlhs_item mlhs_node
+%type <node> mlhs mlhs_head mlhs_basic mlhs_item mlhs_node
%type <id> fsym variable sym symbol operation operation2 operation3
%type <id> cname fname op
%type <num> f_norm_arg f_arg
@@ -743,14 +743,7 @@ command : operation command_args %prec tLOWEST
;
mlhs : mlhs_basic
- | tLPAREN mlhs_entry ')'
- {
- $$ = $2;
- }
- ;
-
-mlhs_entry : mlhs_basic
- | tLPAREN mlhs_entry ')'
+ | tLPAREN mlhs ')'
{
$$ = NEW_MASGN(NEW_LIST($2), 0);
}
@@ -783,7 +776,7 @@ mlhs_basic : mlhs_head
;
mlhs_item : mlhs_node
- | tLPAREN mlhs_entry ')'
+ | tLPAREN mlhs ')'
{
$$ = $2;
}