summaryrefslogtreecommitdiff
path: root/lexer.h
blob: 9c27d4dfbcb2c3bf28456911f7fe1d57dd44a637 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
/*!max:re2c*/
#define BUFSIZE 50

typedef struct {
	FILE *file;
	char buf[BUFSIZE + 1];
	char *lim, *cur, *tok;
	bool eof;
} lexer_t;

void init_lexer(lexer_t *in, FILE *file);
int lex(lexer_t *in);