From 5c8f9487ec11035cbd1accfb67f1a4943a2b8db1 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 11 Apr 2023 20:56:14 +0200 Subject: Bootstrapping --- inc/parse.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 inc/parse.h (limited to 'inc/parse.h') diff --git a/inc/parse.h b/inc/parse.h new file mode 100644 index 0000000..c8cafed --- /dev/null +++ b/inc/parse.h @@ -0,0 +1,22 @@ +// Copyright (c) 2023, Marvin Borner <dev@marvinborner.de> +// SPDX-License-Identifier: MIT + +#ifndef BLOC_PARSE_H +#define BLOC_PARSE_H + +#include <stddef.h> + +#include <term.h> +#include <spec.h> + +struct bloc_parsed { + size_t length; + struct term **entries; + struct term *term; +}; + +struct term *parse_blc(const char *term); +struct bloc_parsed *parse_bloc(const void *bloc); +struct term *from_bloc(struct bloc_parsed *bloc); + +#endif -- cgit v1.2.3