From ff46181ae07a06e7039beac09dd9821fbb87026e Mon Sep 17 00:00:00 2001 From: keie Date: Mon, 21 Jan 1985 14:26:29 +0000 Subject: [PATCH] 1 - Changed the defintion of a local 's' into 'Sym' to avoid naming conflict. 2 - Added .integer, .Sptr and .cptr at appropiate places to uses of yylval. 3 - Removed unnecessary casts. 4 - Added a few /*NOSTRICT*/ comments to indicate awareness of lint complaints. --- lang/basic/src.old/basic.lex | 38 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/lang/basic/src.old/basic.lex b/lang/basic/src.old/basic.lex index d5020dfd3..e6cfe675a 100644 --- a/lang/basic/src.old/basic.lex +++ b/lang/basic/src.old/basic.lex @@ -224,7 +224,7 @@ char name[SIGNIFICANT+1]; lookup() { Key *k; - Symbol *s; + Symbol *Sym; char *c; int i, typech; @@ -239,7 +239,7 @@ lookup() if( isalnum( *(cptr+k->length) ) && k->token==FUNCTION) continue; cptr += k->length; - yylval= k->classvalue; + yylval.integer= k->classvalue; if(debug) printf("lookup:%d %d\n", k->classvalue,k->token); if( k->token == FUNCTION) @@ -261,17 +261,17 @@ lookup() if( isymtype!=DEFAULTTYPE) + if(Sym->symtype!=DEFAULTTYPE) { - if(typech && typech!=s->symtype && wflag) + if(typech && typech!=Sym->symtype && wflag) warning("type re-declared,ignored"); } if( typech) - s->symtype=typech; - if(debug) printf("lookup:%d Identifier\n",s); + Sym->symtype=typech; + if(debug) printf("lookup:%d Identifier\n",Sym); if( (name[0]=='f' || name[0]=='F') && (name[1]=='n' || name[1]=='N') ) return(FUNCTID); @@ -322,16 +322,17 @@ number() cptr=c; if( *c != '.'){ if( i1> MAXINT || i1': if( *(c+1)=='='){ - c++;c++;cptr=c; yylval= GESYM;return(RELOP); + c++;c++;cptr=c; yylval.integer= GESYM;return(RELOP); } - yylval= '>'; + yylval.integer= '>'; cptr++; return(RELOP); - break; case '<': if( *(c+1)=='='){ - c++; c++; cptr=c; yylval=LESYM; return(RELOP); + c++; c++; cptr=c; yylval.integer=LESYM; return(RELOP); } else if( *(c+1)=='>'){ - c++; c++; cptr=c; yylval=NESYM; return(RELOP); + c++; c++; cptr=c; yylval.integer=NESYM; return(RELOP); } - yylval= '<'; + yylval.integer= '<'; cptr++; return(RELOP); } -- 2.34.1