| 1 |
/* Copyright (C) 2000 Free Software Foundation. |
| 2 |
|
| 3 |
by Manfred Hollstein <[email protected]> */ |
| 4 |
|
| 5 |
void abort (void); |
| 6 |
void exit (int); |
| 7 |
|
| 8 |
void *temporary_obstack; |
| 9 |
|
| 10 |
static int input (void); |
| 11 |
static int ISALNUM (int ch); |
| 12 |
static void obstack_1grow (void **ptr, int ch); |
| 13 |
|
| 14 |
int yylex (void); |
| 15 |
int main (void); |
| 16 |
|
| 17 |
int main (void) |
| 18 |
{ |
| 19 |
int ch = yylex (); |
| 20 |
|
| 21 |
exit (0); |
| 22 |
} |
| 23 |
|
| 24 |
int yylex (void) |
| 25 |
{ |
| 26 |
int ch; |
| 27 |
|
| 28 |
#ifndef WORK_AROUND |
| 29 |
for (;;) |
| 30 |
{ |
| 31 |
ch = input (); |
| 32 |
if (ISALNUM (ch)) |
| 33 |
obstack_1grow (&temporary_obstack, ch); |
| 34 |
else if (ch != '_') |
| 35 |
break; |
| 36 |
} |
| 37 |
#else |
| 38 |
do |
| 39 |
{ |
| 40 |
ch = input (); |
| 41 |
if (ISALNUM (ch)) |
| 42 |
obstack_1grow (&temporary_obstack, ch); |
| 43 |
} while (ch == '_'); |
| 44 |
#endif |
| 45 |
|
| 46 |
return ch; |
| 47 |
} |
| 48 |
|
| 49 |
static int input (void) |
| 50 |
{ |
| 51 |
return 0; |
| 52 |
} |
| 53 |
|
| 54 |
static int ISALNUM (int ch) |
| 55 |
{ |
| 56 |
return ((ch >= 'A' && ch <= 'Z') |
| 57 |
|| (ch >= 'a' && ch <= 'z') |
| 58 |
|| (ch >= '0' && ch <= '0')); |
| 59 |
} |
| 60 |
|
| 61 |
static void obstack_1grow (void **ptr, int ch) |
| 62 |
{ |
| 63 |
} |