comparison lwlib/lw_expr.h @ 342:7b4123dce741

Added basic symbol registration
author lost@starbug
date Wed, 24 Mar 2010 21:30:31 -0600
parents 04c80c51b16a
children a82c55070624
comparison
equal deleted inserted replaced
341:4e1cff60c293 342:7b4123dce741
64 int value; // integer value 64 int value; // integer value
65 void *value2; // misc pointer value 65 void *value2; // misc pointer value
66 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)
67 }; 67 };
68 68
69 typedef lw_expr_t lw_expr_fn_t(int t, void *ptr);
70 typedef lw_expr_t lw_expr_fn2_t(char *var);
71
69 72
70 #else /* def ___lw_expr_c_seen___ */ 73 #else /* def ___lw_expr_c_seen___ */
71 74
72 typedef void * lw_expr_t; 75 typedef void * lw_expr_t;
73 76
78 extern lw_expr_t lw_expr_build(int exprtype, ...); 81 extern lw_expr_t lw_expr_build(int exprtype, ...);
79 extern void lw_expr_print(lw_expr_t E); 82 extern void lw_expr_print(lw_expr_t E);
80 extern int lw_expr_compare(lw_expr_t E1, lw_expr_t E2); 83 extern int lw_expr_compare(lw_expr_t E1, lw_expr_t E2);
81 extern void lw_expr_simplify(lw_expr_t E); 84 extern void lw_expr_simplify(lw_expr_t E);
82 85
83 extern void lw_expr_set_special_handler(lw_expr_t (*fn)(int t, void *ptr)); 86 typedef lw_expr_t lw_expr_fn_t(int t, void *ptr);
84 extern void lw_expr_set_var_handler(lw_expr_t (*fn)(char *var)); 87 typedef lw_expr_t lw_expr_fn2_t(char *var);
88
89 extern void lw_expr_set_special_handler(lw_expr_fn_t *fn);
90 extern void lw_expr_set_var_handler(lw_expr_fn2_t *fn);
85 91
86 #endif /* def ___lw_expr_c_seen___ */ 92 #endif /* def ___lw_expr_c_seen___ */
87 93
88 #endif /* ___lw_expr_h_seen___ */ 94 #endif /* ___lw_expr_h_seen___ */