Subject: Re: data-implied-do

From: Zheng Gengbing <[email-masked]>
Date: Tue, 21 May 1996 09:15:29 +0800 (EAT)

On Mon, 20 May 1996, Guansong Zhang wrote:

> On May 20, 11:11am, Zheng Gengbing wrote:
> > Subject: Re: Putting our project onto internet
> > On Sun, 19 May 1996, Guansong Zhang wrote:
> >
> > > 3. implied do.
> > >
> > > In test1.f of old comprehensive set. We need to comment at two positions.
> One
> > > of them is a data statement. Here is the reason, please see the following
> > > program:
> > >
> > > program aa
> > > integer i(10), k(9)
> > > DATA var, (i(j),j=1,2), (k(j), j=1,2) /2,2,2,2,2/
> > > DATA var, (i(j),k(j),j=1,2) /2,2,2,2,2/
> > > end
> > >
> > > This program can be successfully parsed by compiler on IBM (with a
> warning).
> > > but failed for our project on line 4. The reason is that the second date
> > > statement has some kind of complicated implied do, while line 3, which
> express
> > > the same thing, can be parsed.
> > >
> > > ( In our implementation, I found DATA_IMPL_DO, I am not sure if the implied
> do
> > > at other place can be write as this too.)
> > >
> >
> > 	In fact , according to F90 specification , data_i_do_object_list
> > cannot separated by COMMA (,) , so the second data statement should not be
> > passed by hpf2dep . I think the compiler on IBM do a certain extension .
> 
> I checked this, please see the rule R535:
> 
> R535 data-implied-do IS (data-i-do-object-list, ......)
> 
> While,
> 
> R536 data-i-do-object IS arry-element
> 			.....
> 
> And Syntax rule 1.7 (In my book, "Fortran 90 handbook", it is appendix B, so
> B.1.7) Assumed Syntax Rules:
> 
> There is:
> 
> xyz-list means xyz [, xyz] ...
> 
> There for the second data statement can be produced using this rules. It is not
> an extension.
> 
> And I don't find the constraint you mentioned. You or I miss something?
> 

	You are right . I have modified the f90.y to fit the defintion .
It seems ok now .
	And like io_implied_do , I do the same change to the data_impiled_do's
do_variable_control:
	change from
		
			DATA_IMPLIED_DO
                             |
                       +-------------+
                                     |
                                 EXPR_LIST
                                     |
                                +--------+
                                         |
                                      EXPR_LIST
                                         |
                                    +---------+
                                              |

  to
               DDOT .

	You can do some improvement to unparser.

***************************************************************************
*     Zheng Gengbin                 *                                     *
*                                   *                                     *
*  Dept. of Computer Science        *  Phone:  86-10-2585088              *
*         & Technology              *  Email:                             *
*                                   *      [email-masked]   *
*  Peking University P.R.China      *  Mail:                              *
*                                   *      Room 1077 ,Building 47,        *
*                                   *      Peking University, P.R.China   *
***************************************************************************