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

ruby-changes:22863

From: nobu <ko1@a...>
Date: Tue, 6 Mar 2012 01:24:26 +0900 (JST)
Subject: [ruby-changes:22863] nobu:r34912 (trunk): * parse.y (block_command, block_call): simplified rules.

nobu	2012-03-06 01:24:15 +0900 (Tue, 06 Mar 2012)

  New Revision: 34912

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34912

  Log:
    * parse.y (block_command, block_call): simplified rules.

  Modified files:
    trunk/ChangeLog
    trunk/parse.y

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 34911)
+++ ChangeLog	(revision 34912)
@@ -1,3 +1,7 @@
+Tue Mar  6 01:24:13 2012  Nobuyoshi Nakada  <nobu@r...>
+
+	* parse.y (block_command, block_call): simplified rules.
+
 Mon Mar  5 18:28:35 2012  Kazuhiro NISHIYAMA  <zn@m...>
 
 	* test/ruby/test_regexp.rb (TestRegexp#test_source): fix typo.
Index: parse.y
===================================================================
--- parse.y	(revision 34911)
+++ parse.y	(revision 34912)
@@ -1326,24 +1326,15 @@
 		;
 
 block_command	: block_call
-		| block_call '.' operation2 command_args
+		| block_call dot_or_colon operation2 command_args
 		    {
 		    /*%%%*/
 			$$ = NEW_CALL($1, $3, $4);
 		    /*%
-			$$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
+			$$ = dispatch3(call, $1, $2, $3);
 			$$ = method_arg($$, $4);
 		    %*/
 		    }
-		| block_call tCOLON2 operation2 command_args
-		    {
-		    /*%%%*/
-			$$ = NEW_CALL($1, $3, $4);
-		    /*%
-			$$ = dispatch3(call, $1, ripper_intern("::"), $3);
-			$$ = method_arg($$, $4);
-		    %*/
-		    }
 		;
 
 cmd_brace_block	: tLBRACE_ARG
@@ -3856,24 +3847,15 @@
 			$$ = method_add_block($1, $2);
 		    %*/
 		    }
-		| block_call '.' operation2 opt_paren_args
+		| block_call dot_or_colon operation2 opt_paren_args
 		    {
 		    /*%%%*/
 			$$ = NEW_CALL($1, $3, $4);
 		    /*%
-			$$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
+			$$ = dispatch3(call, $1, $2, $3);
 			$$ = method_optarg($$, $4);
 		    %*/
 		    }
-		| block_call tCOLON2 operation2 opt_paren_args
-		    {
-		    /*%%%*/
-			$$ = NEW_CALL($1, $3, $4);
-		    /*%
-			$$ = dispatch3(call, $1, ripper_intern("::"), $3);
-			$$ = method_optarg($$, $4);
-		    %*/
-		    }
 		;
 
 method_call	: operation

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

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