20 likes | 86 Views
yylval = c - '0'; /* yylval is a global var */ while( isdigit( c=getchar() ) ) yylval = 10*yylval + (c - '0'); if (c >= 0) ungetc(c,stdin); return NUMBER;.
E N D
yylval = c - '0'; /* yylval is a global var */ while( isdigit( c=getchar() ) ) yylval = 10*yylval + (c - '0'); if (c >= 0) ungetc(c,stdin); return NUMBER;