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

version 1.6, 1999/11/08 22:30:02 version 1.7, 1999/12/07 19:10:47
Line 1088  append_warn(type,str) int type;char *str Line 1088  append_warn(type,str) int type;char *str
 /*********** if *b is a constant symbol, destroy (free) b ********************/  /*********** if *b is a constant symbol, destroy (free) b ********************/
 /*********** if *a is a var symbol, create a new symbol **********************/  /*********** if *a is a var symbol, create a new symbol **********************/
 /*                 do not free(*a)     */  /*                 do not free(*a)     */
 /*           */  /*  If either a or b is invalid it propagates the error up the parse tree    */
 Symbol *  Symbol *
 symbols_op(a, b, op) Symbol *a; Symbol *b; int op;  symbols_op(a, b, op) Symbol *a; Symbol *b; int op;
 {  {
Line 1103  if( a->s_type == IDENTIFIER || b->s_type Line 1103  if( a->s_type == IDENTIFIER || b->s_type
    if(a->s_type == IDENTIFIER) { /* a is IDENTIFIER */     if(a->s_type == IDENTIFIER) { /* a is IDENTIFIER */
      sprintf(warn_msg,"var \"%s\" not defined before use.\n", a->s_name);       sprintf(warn_msg,"var \"%s\" not defined before use.\n", a->s_name);
      capa_msg(MESSAGE_ERROR,warn_msg);       capa_msg(MESSAGE_ERROR,warn_msg);
      return (b);       return (a);
    } else { /* b is IDENTIFIER */     } else { /* b is IDENTIFIER */
      sprintf(warn_msg,       sprintf(warn_msg,"var \"%s\" not defined before use.\n",b->s_name);
       "var \"%s\" not defined before use.\n",b->s_name);  
      capa_msg(MESSAGE_ERROR,warn_msg);       capa_msg(MESSAGE_ERROR,warn_msg);
      return (a);       return (b);
    }     }
  } else {  /* a and b are neither identifiers */   } else {  /* a and b are neither identifiers */
   if( (a->s_type == I_VAR) ||    if( (a->s_type == I_VAR) ||

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


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