[#5218] Ruby Book Eng tl, ch1 question — Jon Babcock <jon@...>

13 messages 2000/10/02

[#5404] Object.foo, setters and so on — "Hal E. Fulton" <hal9000@...>

OK, here is what I think I know.

14 messages 2000/10/11

[#5425] Ruby Book Eng. tl, 9.8.11 -- seishitsu ? — Jon Babcock <jon@...>

18 messages 2000/10/11
[#5427] RE: Ruby Book Eng. tl, 9.8.11 -- seishitsu ? — OZAWA -Crouton- Sakuro <crouton@...> 2000/10/11

At Thu, 12 Oct 2000 03:49:46 +0900,

[#5429] Re: Ruby Book Eng. tl, 9.8.11 -- seishitsu ? — Jon Babcock <jon@...> 2000/10/11

Thanks for the input.

[#5432] Re: Ruby Book Eng. tl, 9.8.11 -- seishitsu ? — Yasushi Shoji <yashi@...> 2000/10/11

At Thu, 12 Oct 2000 04:53:41 +0900,

[#5516] Re: Some newbye question — ts <decoux@...>

>>>>> "D" == Davide Marchignoli <marchign@di.unipi.it> writes:

80 messages 2000/10/13
[#5531] Re: Some newbye question — matz@... (Yukihiro Matsumoto) 2000/10/14

Hi,

[#5544] Re: Some newbye question — Davide Marchignoli <marchign@...> 2000/10/15

On Sat, 14 Oct 2000, Yukihiro Matsumoto wrote:

[#5576] Re: local variables (nested, in-block, parameters, etc.) — Dave Thomas <Dave@...> 2000/10/16

matz@zetabits.com (Yukihiro Matsumoto) writes:

[#5617] Re: local variables (nested, in-block, parameters, etc.) — "Brian F. Feldman" <green@...> 2000/10/16

Dave Thomas <Dave@thomases.com> wrote:

[#5705] Dynamic languages, SWOT ? — Hugh Sasse Staff Elec Eng <hgs@...>

There has been discussion on this list/group from time to time about

16 messages 2000/10/20
[#5712] Re: Dynamic languages, SWOT ? — Charles Hixson <charleshixsn@...> 2000/10/20

Hugh Sasse Staff Elec Eng wrote:

[#5882] [RFC] Towards a new synchronisation primitive — hipster <hipster@...4all.nl>

Hello fellow rubyists,

21 messages 2000/10/26

[ruby-talk:5391] Re: Allowing *ary's in the middle of a camma separated list

From: Aleksi Niemel<aleksi.niemela@...>
Date: 2000-10-10 16:56:29 UTC
List: ruby-talk #5391
Guy stated, and proposed a grammar change:
>  I know nothing about ruby, but you just need to change args no ?

Well, to begin with, your statement about yourself is a school example of
understatement :).

And to continue, I think you're right about the parsing change, though as I
know nothing about Ruby (see the pattern :), I can't say for sure.

Anyway, if that's the way it could go, here's a patch. If you look at it,
provided it works, it will simplify the grammar a lot.

I can't say either if this is what we really want, but I tried to
investigate if semantics for lhs-variants get changed, and found nothing.
Anyway, I don't have access to proper development machine right now, so I
couldn't compile nor test the code of real parser, nor if it affects lhs or
f_args. So no guarantees.

Bison didn't report any warning or conflicts. (Few "development" versions
did. :)

The patch is taken against 1.6.0 source from 2000-09-07. Humm...maybe I
should get latest on this machine too...

	- Aleksi

--- ../ruby/ruby/parse.y	Mon Sep 11 22:25:36 2000
+++ parse.y	Tue Oct 10 18:36:11 2000
@@ -884,20 +884,10 @@
 		    {
 			$$ = $1;
 		    }
-		| args ',' tSTAR arg opt_nl
-		    {
-			value_expr($4);
-			$$ = arg_concat($1, $4);
-		    }
 		| assocs trailer
 		    {
 			$$ = NEW_LIST(NEW_HASH($1));
 		    }
-		| tSTAR arg opt_nl
-		    {
-			value_expr($2);
-			$$ = NEW_RESTARGS($2);
-		    }
 
 opt_call_args	: none
 		| call_args opt_nl
@@ -922,12 +912,6 @@
 		    {
 			$$ = arg_blk_pass($1, $2);
 		    }
-		| args ',' tSTAR arg opt_block_arg
-		    {
-			value_expr($4);
-			$$ = arg_concat($1, $4);
-			$$ = arg_blk_pass($$, $5);
-		    }
 		| assocs ','
 		    {
 			$$ = NEW_LIST(NEW_HASH($1));
@@ -958,11 +942,6 @@
 			$$ = arg_concat(list_append($1, NEW_HASH($3)), $6);
 			$$ = arg_blk_pass($$, $7);
 		    }
-		| tSTAR arg opt_block_arg
-		    {
-			value_expr($2);
-			$$ = arg_blk_pass(NEW_RESTARGS($2), $3);
-		    }
 		| block_arg
 
 block_arg	: tAMPER arg
@@ -982,11 +961,21 @@
 			value_expr($1);
 			$$ = NEW_LIST($1);
 		    }
+                | tSTAR arg
+                    {
+                        value_expr($2);
+                        $$ = $2;
+		    }
 		| args ',' arg
 		    {
 			value_expr($3);
 			$$ = list_append($1, $3);
 		    }
+                | args ',' tSTAR arg
+                    {
+                        value_expr($4);
+                        $$ = arg_concat($1, $4);
+		    }
 
 mrhs		: args
 		    {
@@ -1000,16 +989,6 @@
 			    $$ = $1;
 			}
 		    }
-		| args ',' tSTAR arg
-		    {
-			value_expr($4);
-			$$ = arg_concat($1, $4);
-		    }
-		| tSTAR arg
-		    {
-			value_expr($2);
-			$$ = $2;
-		    }
 
 ret_args	: call_args
 		    {
@@ -1469,16 +1448,6 @@
 		    }
 
 when_args	: args
-		| args ',' tSTAR arg
-		    {
-			value_expr($4);
-			$$ = list_append($1, NEW_WHEN($4, 0, 0));
-		    }
-		| tSTAR arg
-		    {
-			value_expr($2);
-			$$ = NEW_LIST(NEW_WHEN($2, 0, 0));
-		    }
 
 cases		: opt_else
 		| case_body



In This Thread

Prev Next