From 896e0e1bd8502a6d7f901f9e13bcd95df5d98635 Mon Sep 17 00:00:00 2001
From: Marvin Borner
Date: Fri, 26 May 2023 20:34:07 +0200
Subject: Abstract abstractification

---
 inc/parse.h | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 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..dd25806
--- /dev/null
+++ b/inc/parse.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2023, Marvin Borner <dev@marvinborner.de>
+// SPDX-License-Identifier: MIT
+
+#ifndef CALM_PARSE_H
+#define CALM_PARSE_H
+
+#include <lib/hash.h>
+
+typedef enum { INV, ABS, APP, VAR } term_type_t;
+
+struct term {
+	term_type_t type;
+	hash_t hash;
+	size_t refs;
+	union {
+		struct {
+			hash_t term;
+		} abs;
+		struct {
+			hash_t lhs;
+			hash_t rhs;
+		} app;
+		struct {
+			int index;
+		} var;
+	} u;
+};
+
+hash_t parse_blc(char **term);
+
+#endif
-- 
cgit v1.2.3