From 3fb6326fc36c69aa0b66de4823b116d7c0a9486c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 1 May 2015 20:55:43 +0200 Subject: parse_kconfig rewriten parse_kconfig should now generate full dependency. It is not transforming whole expression to CNF, but only pairs. --- scripts/parse_kconfig/boolexpr.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 scripts/parse_kconfig/boolexpr.h (limited to 'scripts/parse_kconfig/boolexpr.h') diff --git a/scripts/parse_kconfig/boolexpr.h b/scripts/parse_kconfig/boolexpr.h new file mode 100644 index 0000000..52cd4a6 --- /dev/null +++ b/scripts/parse_kconfig/boolexpr.h @@ -0,0 +1,34 @@ +#include +#include + +#include + +#ifndef _BOOLEXPR_H_ +#define _BOOLEXPR_H_ + +#include "symlist.h" + +enum boolexpr_type { + BT_SYM, BT_TRUE, BT_FALSE, BT_OR, BT_AND, BT_NOT +}; + +struct boolexpr { + enum boolexpr_type type; + unsigned id; + struct boolexpr *left, *right; + + unsigned overusage; +}; + +struct boolexpr *boolexpr_kconfig(struct symlist *sl, struct expr *expr); + +struct boolexpr *boolexpr_true(); +struct boolexpr *boolexpr_false(); +struct boolexpr *boolexpr_sym(struct symlist *sl, struct symbol *sym); +struct boolexpr *boolexpr_or(struct boolexpr *e1, struct boolexpr *e2); +struct boolexpr *boolexpr_and(struct boolexpr *e1, struct boolexpr *e2); +struct boolexpr *boolexpr_not(struct boolexpr *e); +struct boolexpr *boolexpr_copy(struct boolexpr *e); +void boolexpr_free(struct boolexpr *e); + +#endif /* _BOOLEXPR_H_ */ -- cgit v1.2.3