aboutsummaryrefslogtreecommitdiff
path: root/src/pinocchio.h
blob: 1a2567290d5f962fce953a49b4cd1e933265b99f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef PINOCCIO_H
#define PINOCCIO_H

#include <stdbool.h>
#include <stdint.h>

typedef struct eqn {
	int type;
	union {
		struct {
			struct eqn *lhs, *rhs;
		};
		char ch;
	};
} eqn_t;

typedef struct {
	eqn_t    *eqn;
	uint64_t vars;
} ast_t;

typedef struct {
	size_t len, cap;
	ast_t *buf;
} asts_t;

void astprocess(asts_t);
void user_error(const char *, ...)
#if __GNUC__
	__attribute__((format(printf, 1, 2)))
#endif
	;

#endif /* !PINOCCIO_H */