diff options
author | Karel Kočí <cynerd@email.cz> | 2015-05-01 20:55:43 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-05-01 20:55:43 +0200 |
commit | 3fb6326fc36c69aa0b66de4823b116d7c0a9486c (patch) | |
tree | e335cf1dac16f08048864d8c4189e66be8ea11eb /scripts/parse_kconfig/boolexpr.h | |
parent | cd1b4f5e954f925bb7689189a5c2fd5fef52d745 (diff) | |
download | linux-conf-perf-3fb6326fc36c69aa0b66de4823b116d7c0a9486c.tar.gz linux-conf-perf-3fb6326fc36c69aa0b66de4823b116d7c0a9486c.tar.bz2 linux-conf-perf-3fb6326fc36c69aa0b66de4823b116d7c0a9486c.zip |
parse_kconfig rewriten
parse_kconfig should now generate full dependency.
It is not transforming whole expression to CNF, but only pairs.
Diffstat (limited to 'scripts/parse_kconfig/boolexpr.h')
-rw-r--r-- | scripts/parse_kconfig/boolexpr.h | 34 |
1 files changed, 34 insertions, 0 deletions
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 <stdlib.h> +#include <stdbool.h> + +#include <kconfig/lkc.h> + +#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_ */ |