class Scanner enum state IDENT NUMB COM ALE DELIM NEQ static char TW s

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
class Scanner {
enum state { H, IDENT, NUMB, COM, ALE, DELIM, NEQ };
static char* TW [ ];
static type_of_lex words [ ];
static char * TD [ ];
static type_of_lex dlms [ ];
state CS;
FILE *fp;
char c;
char buf [ 80 ];
int buf_top;
void clear ( ) ;
void add ( );
int look (const char * buf, char * * list);
void gc ( ) { c = fgetc ( fp ); }
public:
Scanner (const char * program);
Lex get_lex ();
};