Diff for /capa/capa51/pProj/capaGrammarDef.y between versions 1.7 and 1.8

version 1.7, 1999/12/07 19:10:47 version 1.8, 2000/02/09 22:10:24
Line 47 Line 47
 int   yylex();  int   yylex();
 void  yyerror(char*);  void  yyerror(char*);
 void  free_calc_expr(Symbol*);  void  free_calc_expr(Symbol*);
   void assign_pts (Symbol *, Symbol *, Symbol *);
 /******************************************************************************/  /******************************************************************************/
 /* GLOBAL VARIABLES                                                           */  /* GLOBAL VARIABLES                                                           */
 /******************************************************************************/  /******************************************************************************/
Line 287  statement    :  IDENTIFIER '=' calc_expr Line 288  statement    :  IDENTIFIER '=' calc_expr
              ;               ;
   
 rqo_def      :  rqo_speca             { rqo_1spec(); }  rqo_def      :  rqo_speca             { rqo_1spec(); }
              |  rqo_speca "," rqo_def { rqo_2spec(); }               |  rqo_speca ',' rqo_def { rqo_2spec(); }
              ;               ;
   
 rqo_speca    : an_integer                 {start_rqo_type(SINGLE);append_rqo($1);}  rqo_speca    : an_integer                 {start_rqo_type(SINGLE);append_rqo($1);}
              | an_integer "!"             {start_rqo_type(IMMOBILE);append_rqo($1);}               | an_integer '!'             {start_rqo_type(IMMOBILE);append_rqo($1);}
              | an_integer "-" an_integer  {start_rqo_type(RANGE);append_rqo($1);               | an_integer '-' an_integer  {start_rqo_type(RANGE);append_rqo($1);
                                            append_rqo($3);                                             append_rqo($3);
                                           }                                            }
              | an_integer "~" rqo_specb   {prefix_rqo($1);}               | an_integer '~' rqo_specb   {prefix_rqo($1);}
              | an_integer "+" rqo_specc   {prefix_rqo($1);}               | an_integer '+' rqo_specc   {prefix_rqo($1);}
              ;               ;
   
 rqo_specb    : an_integer                 {start_rqo_type(ALL_MIX);append_rqo($1);}  rqo_specb    : an_integer                 {start_rqo_type(ALL_MIX);append_rqo($1);}
              | an_integer "~" rqo_specb   {prefix_rqo($1);}               | an_integer '~' rqo_specb   {prefix_rqo($1);}
              | an_integer "+" an_integer  {start_rqo_type(LAST_FIXED);append_rqo($1);               | an_integer '+' an_integer  {start_rqo_type(LAST_FIXED);append_rqo($1);
                                            append_rqo($3);}                                             append_rqo($3);}
              ;               ;
   
 rqo_specc    : an_integer                 {start_rqo_type(ALL_FIXED);append_rqo($1);}  rqo_specc    : an_integer                 {start_rqo_type(ALL_FIXED);append_rqo($1);}
              | an_integer "+" rqo_specd   {prefix_rqo($1);}               | an_integer '+' rqo_specd   {prefix_rqo($1);}
              | an_integer "~" rqo_spece   {prefix_rqo($1);}               | an_integer '~' rqo_spece   {prefix_rqo($1);}
              ;               ;
   
 rqo_specd    : an_integer                 {start_rqo_type(ALL_FIXED);append_rqo($1);}  rqo_specd    : an_integer                 {start_rqo_type(ALL_FIXED);append_rqo($1);}
              | an_integer "+" rqo_specd   {prefix_rqo($1);}               | an_integer '+' rqo_specd   {prefix_rqo($1);}
              ;               ;
   
 rqo_spece    : an_integer                 {start_rqo_type(FIRST_FIXED);append_rqo($1);}  rqo_spece    : an_integer                 {start_rqo_type(FIRST_FIXED);append_rqo($1);}
              | an_integer "~" rqo_spece   {prefix_rqo($1);}               | an_integer '~' rqo_spece   {prefix_rqo($1);}
              | an_integer "+" an_integer  {start_rqo_type(BOTH_FIXED);append_rqo($1);               | an_integer '+' an_integer  {start_rqo_type(BOTH_FIXED);append_rqo($1);
                                            append_rqo($3);}                                             append_rqo($3);}
              ;               ;
   
Line 927  Symbol *name,*index;int free_symbols; Line 928  Symbol *name,*index;int free_symbols;
   sprintf(key,"%s[%s]",name->s_name,tmp);    sprintf(key,"%s[%s]",name->s_name,tmp);
       
   a_p = find_arrayid(name->s_name);   /* use the array name to search array tree */    a_p = find_arrayid(name->s_name);   /* use the array name to search array tree */
                                       /* */                                        /* did not check for error! */
   s_p = find_array_by_index(a_p,key); /* use the index portion to search along array linked list */    s_p = find_array_by_index(a_p,key); /* use the index portion to search along array linked list */
   capa_mfree((char *)tmp); capa_mfree((char *)key);    capa_mfree((char *)tmp); capa_mfree((char *)key);
       
Line 1798  assign_id_list( s ) Symbol *s; Line 1799  assign_id_list( s ) Symbol *s;
   }    }
 }  }
   
 void assign_pts ( Symbol* coord1, Symbol* coord2, Symbol* num) {  /* void assign_pts ( Symbol* coord1, Symbol* coord2, Symbol* num) { */
   void assign_pts (coord1, coord2, num)Symbol *coord1;Symbol *coord2;Symbol *num;
   {
   PointsList_t *pt;    PointsList_t *pt;
   if( LastPtsList != NULL ) {    if( LastPtsList != NULL ) {
     LastPtsList->pts_next = gen_ptslist( coord1, coord2, num );      LastPtsList->pts_next = gen_ptslist( coord1, coord2, num );

Removed from v.1.7  
changed lines
  Added in v.1.8


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>