source: trunk/minix/commands/i386/asmconv/token.h@ 10

Last change on this file since 10 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 669 bytes
Line 
1/* token.h - token definition Author: Kees J. Bot
2 * 13 Dec 1993
3 */
4
5typedef enum toktype {
6 T_EOF,
7 T_CHAR,
8 T_WORD,
9 T_STRING
10} toktype_t;
11
12typedef struct token {
13 struct token *next;
14 long line;
15 toktype_t type;
16 int symbol; /* Single character symbol. */
17 char *name; /* Word, number, etc. */
18 size_t len; /* Length of string. */
19} token_t;
20
21#define S_LEFTSHIFT 0x100 /* << */
22#define S_RIGHTSHIFT 0x101 /* >> */
23
24void set_file(char *file, long line);
25void get_file(char **file, long *line);
26void parse_err(int err, token_t *where, const char *fmt, ...);
27void tok_init(char *file, int comment);
28token_t *get_token(int n);
29void skip_token(int n);
Note: See TracBrowser for help on using the repository browser.