[前][次][番号順一覧][スレッド一覧]

ruby-changes:5991

From: nobu <ko1@a...>
Date: Sat, 21 Jun 2008 16:29:20 +0900 (JST)
Subject: [ruby-changes:5991] Ruby:r17499 (trunk): * parse.y (call_args2, open_args): removed.

nobu	2008-06-21 16:29:05 +0900 (Sat, 21 Jun 2008)

  New Revision: 17499

  Modified files:
    trunk/ChangeLog
    trunk/parse.y

  Log:
    * parse.y (call_args2, open_args): removed.
    
    * parse.y (parser_yylex): unified warnings at space between method
      name and argument parenthese.  [ruby-dev:33943]


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/parse.y?r1=17499&r2=17498&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17499&r2=17498&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 17498)
+++ ChangeLog	(revision 17499)
@@ -1,3 +1,10 @@
+Sat Jun 21 16:29:02 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* parse.y (call_args2, open_args): removed.
+
+	* parse.y (parser_yylex): unified warnings at space between method
+	  name and argument parenthese.  [ruby-dev:33943]
+
 Sat Jun 21 16:21:07 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* numeric.c (flo_round): get rid of overflow.
Index: parse.y
===================================================================
--- parse.y	(revision 17498)
+++ parse.y	(revision 17499)
@@ -662,8 +662,8 @@
 %type <node> bodystmt compstmt stmts stmt expr arg primary command command_call method_call
 %type <node> expr_value arg_value primary_value
 %type <node> if_tail opt_else case_body cases opt_rescue exc_list exc_var opt_ensure
-%type <node> args call_args call_args2 opt_call_args
-%type <node> open_args paren_args opt_paren_args
+%type <node> args call_args opt_call_args
+%type <node> paren_args opt_paren_args
 %type <node> command_args aref_args opt_block_arg block_arg var_ref var_lhs
 %type <node> mrhs superclass block_call block_command
 %type <node> f_arglist f_args f_arg f_arg_item f_optarg f_marg f_marg_list f_margs
@@ -2358,60 +2358,11 @@
 		    %*/
 		;
 
-call_args2	: arg_value ',' args opt_block_arg
-		    {
-		    /*%%%*/
-			$$ = arg_blk_pass(list_concat(NEW_LIST($1),$3), $4);
-		    /*%
-			$$ = arg_add_optblock(arg_prepend($3, $1), $4);
-		    %*/
-		    }
-		| arg_value ',' block_arg
-		    {
-		    /*%%%*/
-			$$ = arg_blk_pass(NEW_LIST($1), $3);
-		    /*%
-			$$ = arg_add_block(arg_add(arg_new(), $1), $3);
-		    %*/
-		    }
-		| assocs opt_block_arg
-		    {
-		    /*%%%*/
-			$$ = NEW_LIST(NEW_HASH($1));
-			$$ = arg_blk_pass($$, $2);
-		    /*%
-			$$ = arg_add_assocs(arg_new(), $1);
-			$$ = arg_add_optblock($$, $2);
-		    %*/
-		    }
-		| arg_value ',' assocs opt_block_arg
-		    {
-		    /*%%%*/
-			$$ = arg_append(NEW_LIST($1), NEW_HASH($3));
-			$$ = arg_blk_pass($$, $4);
-		    /*%
-			$$ = arg_add_assocs(arg_add(arg_new(), $1), $3);
-			$$ = arg_add_optblock($$, $4);
-		    %*/
-		    }
-		| arg_value ',' args ',' assocs opt_block_arg
-		    {
-		    /*%%%*/
-			$$ = arg_append(list_concat(NEW_LIST($1),$3), NEW_HASH($5));
-			$$ = arg_blk_pass($$, $6);
-		    /*%
-			$$ = arg_add_assocs(arg_prepend($3, $1), $5);
-			$$ = arg_add_optblock($$, $6);
-		    %*/
-		    }
-		| block_arg
-		;
-
 command_args	:  {
 			$<num>$ = cmdarg_stack;
 			CMDARG_PUSH(1);
 		    }
-		  open_args
+		  call_args
 		    {
 			/* CMDARG_POP() */
 			cmdarg_stack = $<num>1;
@@ -2419,27 +2370,6 @@
 		    }
 		;
 
-open_args	: call_args
-		| tLPAREN_ARG  {lex_state = EXPR_ENDARG;} rparen
-		    {
-		    /*%%%*/
-			rb_warning0("don't put space before argument parentheses");
-			$$ = 0;
-		    /*%
-			$$ = dispatch1(space, dispatch1(arg_paren, arg_new()));
-		    %*/
-		    }
-		| tLPAREN_ARG call_args2 {lex_state = EXPR_ENDARG;} rparen
-		    {
-		    /*%%%*/
-			rb_warning0("don't put space before argument parentheses");
-			$$ = $2;
-		    /*%
-			$$ = dispatch1(space, dispatch1(arg_paren, $2));
-		    %*/
-		    }
-		;
-
 block_arg	: tAMPER arg_value
 		    {
 		    /*%%%*/
@@ -6897,13 +6827,9 @@
 	    c = tLPAREN;
 	}
 	else if (space_seen) {
-	    if (lex_state == EXPR_CMDARG) {
+	    if (IS_ARG()) {
 		c = tLPAREN_ARG;
 	    }
-	    else if (lex_state == EXPR_ARG) {
-		rb_warning0("don't put space before argument parentheses");
-		c = '(';
-	    }
 	}
 	paren_nest++;
 	COND_PUSH(0);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]