comparison lwlib/lw_expr.h @ 337:04c80c51b16a

Checkpoint development
author lost
date Fri, 12 Mar 2010 06:01:38 +0000
parents 9f58e3bca6e3
children 7b4123dce741
comparison
equal deleted inserted replaced
336:401587ab6a09 337:04c80c51b16a
61 struct lw_expr_priv 61 struct lw_expr_priv
62 { 62 {
63 int type; // type of term 63 int type; // type of term
64 int value; // integer value 64 int value; // integer value
65 void *value2; // misc pointer value 65 void *value2; // misc pointer value
66 int refcount; // reference count
67 struct lw_expr_opers *operands; // ptr to list of operands (for operators) 66 struct lw_expr_opers *operands; // ptr to list of operands (for operators)
68 }; 67 };
69 68
70 69
71 #else /* def ___lw_expr_c_seen___ */ 70 #else /* def ___lw_expr_c_seen___ */
72 71
73 typedef void * lw_expr_t; 72 typedef void * lw_expr_t;
74 73
75 extern lw_expr_t lwexpr_create(void); 74 extern lw_expr_t lwexpr_create(void);
76 extern void lwexpr_destroy(lw_expr_t E); 75 extern void lw_expr_destroy(lw_expr_t E);
77 extern lw_expr_t lw_expr_deref(lw_expr_t r);
78 extern lw_expr_t lw_expr_copy(lw_expr_t E); 76 extern lw_expr_t lw_expr_copy(lw_expr_t E);
79 extern void lw_expr_add_operand(lw_expr_t E, lw_expr_t O); 77 extern void lw_expr_add_operand(lw_expr_t E, lw_expr_t O);
80 extern lw_expr_t lw_expr_deepcopy(lw_expr_t E);
81 extern lw_expr_t lw_expr_build(int exprtype, ...); 78 extern lw_expr_t lw_expr_build(int exprtype, ...);
82 extern void lw_expr_print(lw_expr_t E); 79 extern void lw_expr_print(lw_expr_t E);
83 extern int lw_expr_compare(lw_expr_t E1, lw_expr_t E2); 80 extern int lw_expr_compare(lw_expr_t E1, lw_expr_t E2);
84 extern void lw_expr_simplify(lw_expr_t E); 81 extern void lw_expr_simplify(lw_expr_t E);
85 extern lw_expr_t lw_expr_build_noref(int exprtype, ...); 82
83 extern void lw_expr_set_special_handler(lw_expr_t (*fn)(int t, void *ptr));
84 extern void lw_expr_set_var_handler(lw_expr_t (*fn)(char *var));
86 85
87 #endif /* def ___lw_expr_c_seen___ */ 86 #endif /* def ___lw_expr_c_seen___ */
88 87
89 #endif /* ___lw_expr_h_seen___ */ 88 #endif /* ___lw_expr_h_seen___ */