aboutsummaryrefslogtreecommitdiffstats
path: root/src/tok.h
blob: 2e02c4077d44c1ef1faf04c57cfa46138c1e349a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef CONFCONF_TOK_H
#define CONFCONF_TOK_H

#include <stdio.h>

enum tok_type_e {
	      TOK_LBRACE = 0,
	      TOK_RBRACE = 1,
	       TOK_EQUAL = 2,
	       TOK_COMMA = 3,
	        TOK_BANG = 4,
	       TOK_QMARK = 5,
	   TOK_OP_STRUCT = 6,
	TOK_OP_HKEY_SIZE = 7,
	TOK_OP_HKEY_NAME = 8,
	  TOK_OP_FUN_SUF = 9,
	        TOK_UINT = 10,
	          TOK_ID = 11,
	      TOK_UNKNWN = 12,
	         TOK_END = 13,
};

struct tok_s {
	enum tok_type_e type;
	size_t line;
	size_t col;
	char *val;
};

struct tok_s tok_get(FILE *f);

#endif