From 4f3f4cb26d9eee09aebdd37765208943e9ef6214 Mon Sep 17 00:00:00 2001 From: "Chloe M." Date: Sun, 23 Aug 2026 06:03:49 +0000 Subject: core: parser: Add parser groundwork Signed-off-by: Chloe M. --- head/defconf/parser.h | 20 ++++++++++++++++++++ head/defconf/token.h | 1 + 2 files changed, 21 insertions(+) create mode 100644 head/defconf/parser.h (limited to 'head') 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; /* -- cgit v1.2.3