home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource for Source: C/C++
/
Resource for Source - C-C++.iso
/
codelib1
/
v_01_06
/
1n06040b
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1995-11-01
|
314 b
|
27 lines
Listing 7
static int c;
int yylex(void)
{
int tc;
while (isspace(c) && c != '\n')
c = getchar();
if (isdigit(c))
{
yylval = 0;
do
yylval = 10 * yylval + c - '0';
while (isdigit(c = getchar()));
return INT;
}
else
{
tc = c;
c = getchar();
return tc;
}