Subject: Re: STAR_LIST

From: Zheng Gengbing <[email-masked]>
Date: Sun, 5 May 1996 15:37:53 +0800 (EAT)

On Sat, 4 May 1996, Guansong Zhang wrote:

> On May 4,  7:01am, Zheng Qiang wrote:
> > Subject: Re: 1.34
> > > >
> > > > 	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.
> > >
> >
> >   I add the tag STAR_LIST to meet the requirement from unparse. In fact, you
> > said in a previous mail that unparse does not know how to deal with
> > EXPR_LIST because sometimes the seperator is ",", sometimes is "*". By
> > the way, I have successfully parsed it and dumped it.
> >
> > -----------
> > Zheng Qiang
> >-- End of excerpt from Zheng Qiang
> 
> Yes, I asked about this. But this is not well implemented in 1.34.
> 
> Any way, let's see what about in 1.45:
> 
> First, come back to bug report P:
> 
> ++++++++++++++++++++++++++++++++++++++
> program test
> CHARACTER          str*(x),    ss2*(y)
> 
> end
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       program test
>       character :: str,(x),ss2,(y)
>       end
> 
> ======================================
> 
> Above is tested on 1.45, in fact it is same as when I report this bug.
> 
> Let's see why unparse can not print out *. instead, only a ,
> 
> See the following simple version:
> 
> 
> ++++++++++++++++++++++++++++++++++++++
> program test
> CHARACTER         ss2*(y)
> 
> end
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       program test
>       character :: ss2,(y)
>       end
> 
> ======================================
> 
> And its dumpdep results:
> 
> ***L0W-LEVEL NODES***
> 
>     id    var    type    symb    ll1     ll2                     tag...
>     1-E   479     5-T    ----    ----    ----                       TYPE_OP
>     2-E   307     2-T     3-S    ----    ----                       VAR_REF
>     3-E   816    ----    ----     2-E    ----                    NON_LEN_OP
>     4-E   307    ----     4-S    ----    ----                       VAR_REF
>     5-E   312    ----    ----     3-E    ----                     EXPR_LIST
>     6-E   312    ----    ----     4-E     5-E                     EXPR_LIST
>     7-E   312    ----    ----     3-E    ----                     EXPR_LIST
>     8-E   312     9-T    ----     6-E    ----                     EXPR_LIST
> 
> Look at 6-E, when unparse come to this point, it find both its son are not
> null,
> it will unparse this way:
> 
> unparse ll1, print ",", unparse ll2
> 
> So, you see the above results. If unparse print "*" at this point, then see the
> previous program, the unparse result will be
> 
>       character :: str*(x)*ss2*(y)
> 
> Again, not correct.
> 
> (When HIT add star_list, you don't let 6-E tagged by this, Maybe I remember
> wrong, But I don't think unparse can deal with your changed version either.)
> 
> >From the above we can see, this def does not satisfy root-first-rule, unparse
> will consider it as a definition bug.
> 

	After I merged about STAR_LIST , it seems ok on this sample .

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