From 3baeb11a8fbcfcdbc31976d421f17b85503b3ecd Mon Sep 17 00:00:00 2001 From: WuKong Date: Fri, 4 Sep 2015 09:25:34 +0200 Subject: init attribute-based encryption Change-Id: Iba1a3d722110abf747a0fba366f3ebc911d25b25 --- moon-abe/pbc-0.5.14/pbc/pbc_tree.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 moon-abe/pbc-0.5.14/pbc/pbc_tree.h (limited to 'moon-abe/pbc-0.5.14/pbc/pbc_tree.h') diff --git a/moon-abe/pbc-0.5.14/pbc/pbc_tree.h b/moon-abe/pbc-0.5.14/pbc/pbc_tree.h new file mode 100644 index 00000000..2526ab61 --- /dev/null +++ b/moon-abe/pbc-0.5.14/pbc/pbc_tree.h @@ -0,0 +1,30 @@ +// Requires: +// * field.h +struct tree_s; +typedef struct tree_s *tree_ptr; +tree_ptr tree_new_z(const char* s); +tree_ptr tree_new_empty_stmt_list(void); +tree_ptr tree_new_empty_parms(void); +tree_ptr tree_new_define(tree_ptr id, tree_ptr parm, tree_ptr body); +tree_ptr tree_new_list(tree_ptr t); +tree_ptr tree_new_id(const char* s); +tree_ptr tree_new_assign(tree_ptr l, tree_ptr r); +tree_ptr tree_new_funcall(void); +void tree_append(tree_ptr f, tree_ptr p); +void tree_set_fun(tree_ptr dst, tree_ptr src); +void tree_eval_stmt(tree_ptr t); + +tree_ptr tree_new_neg(tree_ptr t); +tree_ptr tree_new_add(tree_ptr x, tree_ptr y); +tree_ptr tree_new_sub(tree_ptr x, tree_ptr y); +tree_ptr tree_new_mul(tree_ptr x, tree_ptr y); +tree_ptr tree_new_div(tree_ptr x, tree_ptr y); +tree_ptr tree_new_pow(tree_ptr x, tree_ptr y); +tree_ptr tree_new_eq(tree_ptr x, tree_ptr y); +tree_ptr tree_new_ne(tree_ptr x, tree_ptr y); +tree_ptr tree_new_le(tree_ptr x, tree_ptr y); +tree_ptr tree_new_ge(tree_ptr x, tree_ptr y); +tree_ptr tree_new_lt(tree_ptr x, tree_ptr y); +tree_ptr tree_new_gt(tree_ptr x, tree_ptr y); +tree_ptr tree_new_ternary(tree_ptr cond, tree_ptr t1, tree_ptr t2); +tree_ptr tree_new_item(tree_ptr x, tree_ptr y); -- cgit 1.2.3-korg