Subject: Re: 1.34

From: Zheng Gengbing <[email-masked]>
Date: Fri, 3 May 1996 18:58:58 +0800 (EAT)

On Thu, 2 May 1996, Guansong Zhang wrote:

> On May 2,  7:42pm, Zheng Gengbing wrote:
> > Subject: Re: 1.34
> >
> > Hi,
> >
> > 	I will report some problems I encounted  during my merge of hpf2dep,
> > which maybe helpful for you to adjust each other's program accordingly.
> >
> > 	1.  About  namelist_stmt:
> > 		the tag of the root of the LLND is NAME_LIST , instead of
> > 		COMM_LIST,which is only  appeared in common_stmt .
> >
> 
> if you are concerned with the following program, think it as OK now.
> 
> 
> program com
> namelist /e/k1,k2,/f/k3
> end
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       program com
>       namelist /e/k1,k2, /f/k3
>       end
> 
> ======================================
>

	Since the tree built by 1.34 is wrong , in the example above:
	     COMM_LIST	(e)	 
                |
            +----------+
            |          |
         +----+     COMM_LIST  (null)
       EXPR_LIST       |
                    +------+
                    |      |
                         COMM_LIST  (f)

	It should be :
	         NAME_LIST  (e)
                    |
            +--------------------+
            |                    |
         EXPR_LIST            NAME_LIST (f)
            |
      +-------------+
      |             |
    VAR_REF       EXPR_LIST
       (k1)          |
                 VAR_REF
                    (k2)

	However after I change NAME_LIST back to COMM_LIST , unparse also 
produced correct result . 
	But I insist that change COMM_LIST to NAME_LIST , COMM_LIST is used
in common_stmt . Please change it in unparse .

> 
> 
> > 	2.  Add  INTRIN_FUNC_CALL to indicate the intrinsic func call .
> > 	    This is the same as FUNC_CALL . Zhang GuanSong ,please add this
> > 	    to unparser. This will reduced most of the warinings in the
> > 	    unparse of hpfcc.
> 
> I assure you no problem, it is already OK here.
>

	But the current version I got can not accept INTRIN_FUNC_CALL . 

> >
> > 	4.  Why STAR_OP ?
> > 	    NON_LEN_OP & LEN_OP seem can do the job .
> >             Adding STAR_OP will bring great trouble to our parse of the AST.
> > 	    I think we can do some other compromise .
> >
> 
> I am puzzled at this, the new added is STAR_LIST, not STAR_OP.
> 
> Any way, the new added STAR_LIST doesn't solve the unparse problem. I think
> STAR_OP is also a problem to unparse. Can any one give me a clear definition of
> these two tags? Or we will discuss this later.
>

	Somebody add STAR_OP in the rule char_length .

> > 	6.  rule :actual_arg_spec_list , this llnd is wrong built .
> >                   NAMELIST_LIST is changed to EXPR_LIST .
> 
> Give me the example program related to this please.

	In fact , this is not a bug . Unparse can produce the same result .
correctly.

program d
call df(2,5)
end

	old version:
		NAME_LIST
                   |
              +-----------+
                          |
                        NAME_LIST

	according to AST specification , I changed NAME_LIST to EXPR_LIST.

> 
> >
> > 	7.  rule : actual_arg_spec , Zheng Qang reverse the llnd1 and llnd2,
> > 		he said this is good for unparse . But this will change the
> > 		ll.h from ,
> > 	struct   KEYWORD_ARG_S  {
> >         PTR_SYMB    null;
> >
> >         PTR_LLND    expr;  /* for the arg expression */
> >         PTR_LLND    keyword;   /* for the keyword string */
> >         };
> > 	to
> > 	struct   KEYWORD_ARG_S  {
> >         PTR_SYMB    null;
> >
> >         PTR_LLND    keyword;   /* for the keyword string */
> > 	PTR_LLND    expr;  /* for the arg expression */
> >
> > 	}
> >
> > 		I have not made up my mind if to do so . Can unparse really
> > 		cannot overcome this difficulty ?
> >
> 
> I asked hit to change this order, because at some where else, the order is
> different from here.
> 
> In fact it doesn't matter what order it is, just make them uninamously for
> KEYWORD_ARG, so unparse encoutered this tag know which son to translate first.
> 
> Let me know your decision, unparse will do adjust with no difficulty.
> 

	Ok, I will put the llnd like:

                                KEYWORD_ARG
                                     |
                           +------------------------+
                           |                        |
                        actual arg               KEYWORD_VAL

	I have done the change in f90.y .

> 
> Give me the first step result if you can, so I can check it with unparse.
> 

	Ok , you can get the -1.35  in ~/pact

***************************************************************************
*     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   *
***************************************************************************