Subject: Re: Help !

From: Zheng Gengbing <[email-masked]>
Date: Thu, 25 Apr 1996 14:53:23 +0800 (EAT)

On Wed, 24 Apr 1996, Zheng Qiang wrote:

> Hi,
> 
>   I want your help on the following problem :
> 
>   I failed to find the definition of this kind of llnd in the expression 
> var = <expression> in call statement . Just like the following :
> 
>  program main
>          call p(a=3,b)
>  end
> 
>    I am now using the EQ_OP in the ast to represent "=" in this statement. 
> But it will be mixed up with var .EQ. <expression>, I think.
> 
>    Could you please tell me the definition about this llnd ? Thanks.
> 

	In our version , we implemented this kind of llnd as : ( also according
to the AST defintion No.80 )

                            PROC_CALL
                               |
                          +----------+
                          |          |
                       EXPR_LIST
                          |
                    +----------------------+
                    |                      |
               KEYWORD_ARG               EXPR_LIST
                    |                      |
              +-----------+            +----------+
              |           |            |
         INT_VAL      KEYWORD_VAL   VAR_REF          
          (3)          ("a")         (b)

notes:
    keyword be looked as a string value and be stored in the field
"string_val" in the llnd KEYWORD_VAL . 

hope that will help you , by the way we have modified yacc action about 
this , below is our change :

actual_arg_spec
    :  name  EQUAL actual_arg {
          /*
          $$ = makeLlnd(fi,EQ_OP,LLNULL,LLNULL,SMNULL);
          $$ = makeEqLl($$,$1,$3,SMNULL);
          */
                                             /*the following added by Yanmi*/
          PTR_LLND        l;
          l=makeLlnd(fi,KEYWORD_VAL,LLNULL,LLNULL,SMNULL);
          l->entry.string_val=$1;
          l->type=global_string;
          $$=makeLlnd(fi,KEYWORD_ARG,$3,l,SMNULL);
          }
    |  actual_arg {
          $$ = $1;
          }
    ;

	Again , before you do your change about yacc actions , please 
take care of the both versions , do not do the repeat change .

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