ncc: type_btde() is no longer used
[neatcc.git] / tok.h
blob01333ea996d8dea0278ccb12938eaa4cf212496d
1 #define BUFSIZE (1 << 12)
2 #define NAMELEN (1 << 7)
3 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
5 #define TOK2(a) ((a)[0] << 16 | (a)[1] << 8)
6 #define TOK3(a) ((a)[0] << 16 | (a)[1] << 8 | (a)[2])
8 enum tok {
9 TOK_EOF,
10 TOK_NAME = 256,
11 TOK_NUM,
12 TOK_VOID,
13 TOK_STATIC,
14 TOK_RETURN,
15 TOK_UNSIGNED,
16 TOK_SIGNED,
17 TOK_SHORT,
18 TOK_LONG,
19 TOK_INT,
20 TOK_CHAR,
21 TOK_STRUCT,
22 TOK_UNION,
23 TOK_ENUM,
24 TOK_TYPEDEF,
25 TOK_IF,
26 TOK_ELSE,
27 TOK_FOR,
28 TOK_WHILE,
29 TOK_DO,
30 TOK_SWITCH,
31 TOK_CASE,
32 TOK_SIZEOF,
33 TOK_STR,
34 TOK_BREAK,
35 TOK_CONTINUE,
36 TOK_DEFAULT,
39 void tok_init(int fd);
40 int tok_see(void);
41 int tok_get(void);
42 char *tok_id(void);
43 long tok_num(void);
44 int tok_str(char *out);