summaryrefslogtreecommitdiff
path: root/head
diff options
context:
space:
mode:
authorChloe M. <chloe@aptel.org>2026-08-23 06:03:49 +0000
committerChloe M. <chloe@aptel.org>2026-08-23 06:05:14 +0000
commit4f3f4cb26d9eee09aebdd37765208943e9ef6214 (patch)
tree236256a8488f2c946006661337b81d8ad9231b5d /head
parent6153bf6edb45e4ad1759e3db69e3a7358ae28b4e (diff)
core: parser: Add parser groundwork
Signed-off-by: Chloe M. <chloe@aptel.org>
Diffstat (limited to 'head')
-rw-r--r--head/defconf/parser.h20
-rw-r--r--head/defconf/token.h1
2 files changed, 21 insertions, 0 deletions
diff --git a/head/defconf/parser.h b/head/defconf/parser.h
new file mode 100644
index 0000000..8306cd5
--- /dev/null
+++ b/head/defconf/parser.h
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2026, Apollo Telephone Laboratories.
+ * Provided under the BSD-3 clause.
+ */
+
+#ifndef DEFCONF_PARSER_H
+#define DEFCONF_PARSER_H 1
+
+#include "defconf/state.h"
+
+/*
+ * Begin parsing the configuration
+ *
+ * @state: Defconf state
+ *
+ * Returns zero on success
+ */
+int parse_begin(struct defconf_state *state);
+
+#endif /* !DEFCONF_PARSER_H */
diff --git a/head/defconf/token.h b/head/defconf/token.h
index e1abd0a..4a69311 100644
--- a/head/defconf/token.h
+++ b/head/defconf/token.h
@@ -16,6 +16,7 @@ typedef enum {
TT_FALSE, /* 'false' */
TT_INTLIT, /* [0-9]+ */
TT_IDENT, /* [ident] */
+ _TT_MAX
} tt_t;
/*