aboutsummaryrefslogtreecommitdiffstats
path: root/src/tok.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tok.h')
-rw-r--r--src/tok.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/tok.h b/src/tok.h
new file mode 100644
index 0000000..2e02c40
--- /dev/null
+++ b/src/tok.h
@@ -0,0 +1,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