parse.y (version "2000-12-18") 
Author Message
 parse.y (version "2000-12-18")

 This is not important, but in mrhs_basic there is :

mrhs_basic      : args ',' arg
                    {
                        value_expr($1);
                        $$ = list_append($1, $3);
                    }

 This must not be  ?    

                        value_expr($3);

Guy Decoux



Fri, 06 Jun 2003 21:03:32 GMT  
 parse.y (version "2000-12-18")
Hi,

In message "[ruby-talk:7570] parse.y (version "2000-12-18")"

| This is not important, but in mrhs_basic there is :
|
|mrhs_basic      : args ',' arg
|                    {
|                        value_expr($1);
|                        $$ = list_append($1, $3);
|                    }
|
| This must not be  ?    
|
|                        value_expr($3);
|

You are absolutely right (unlike me ;-).  Thank you.

                                                        matz.



Sat, 07 Jun 2003 00:10:59 GMT  
 parse.y (version "2000-12-18")

Quote:
> In message "[ruby-talk:7570] parse.y (version "2000-12-18")"

> | This is not important, but in mrhs_basic there is :
> |
> |mrhs_basic      : args ',' arg
> |                    {
> |                        value_expr($1);
> |                        $$ = list_append($1, $3);
> |                    }
> |
> | This must not be  ?    
> |
> |                        value_expr($3);

> You are absolutely right (unlike me ;-).  Thank you.

Is this a bug? Why would this be unimportant? What effect does it have on
Ruby syntax/semantics ?

matju



Sat, 07 Jun 2003 01:04:24 GMT  
 parse.y (version "2000-12-18")

M> Is this a bug?

 No,

M> Why would this be unimportant?

 value_expr() just check if the node contain one of the nodes RETURN,
 BREAK, NEXT, REDO,  RETRY, WHILE, UNTIL, CLASS, MODULE, DEFN, DEFS and in
 this case it send an error message (via yyerror())

M> What effect does it have on Ruby syntax/semantics ?

 Here an example :

pigeon% cat b.rb
#!./ruby
a, b = a, while 1 != 2 ; end
toto(a, while 1 != 2 ; end)
pigeon%

 with 1.6.1

pigeon% /usr/bin/ruby b.rb
b.rb:2: void value expression
b.rb:3: void value expression
pigeon%

 with the new version

pigeon% b.rb
./b.rb:3: void value expression
pigeon%

Guy Decoux



Sat, 07 Jun 2003 01:19:57 GMT  
 parse.y (version "2000-12-18")
Hi,

In message "[ruby-talk:7588] Re: parse.y (version "2000-12-18")"

|> | This must not be  ?    
|> |
|> |                        value_expr($3);

|Is this a bug? Why would this be unimportant? What effect does it have on
|Ruby syntax/semantics ?

This is a bug.  The difference are whether Ruby gives a error on the
case like "a = b, break".

                                                        matz.



Sat, 07 Jun 2003 07:05:24 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Parsing ""D""?

2. SRFI-18 "Multithreading support"

3. TOOLS EUROPE 97: 2nd CFP (12-15 May "1007", Paris)

4. Eiffel "Gotcha" #12 - onceness and invariants

5. TIP #12: The "Batteries Included" Distribution

6. TIP #12: The "Batteries Included" Distribution

7. TOOLS EUROPE 97: 2nd CFP (12-15 May "1007", Paris)

8. US-NYC - VisualWorks consultant developer - 12-18 month contract - Brokerage

9. Clarion Magazine Weekly Summary For August 12-18, 2001

10. FINAL CFP - 5th Annual Ada-Belgium Seminar - Monday 95/12/18

11. 5th Annual Ada-Belgium Seminar - 95/12/18 (Call for Participation)

12. FINAL CFP - 5th Annual Ada-Belgium Seminar - Monday 95/12/18

 

 
Powered by phpBB® Forum Software