summaryrefslogtreecommitdiffstats
path: root/main.h
diff options
context:
space:
mode:
authorcebka@cebka-laptop <cebka@cebka-laptop>2008-10-13 19:06:07 +0400
committercebka@cebka-laptop <cebka@cebka-laptop>2008-10-13 19:06:07 +0400
commitda93e9d6351e238ff66d04b9a7a712f161e2defc (patch)
tree3613023247d7e80dc4e3fc74b9ebf6b9a1464662 /main.h
parent6c55c3314c9599fa1d97d7afd6a31b1982805265 (diff)
downloadrspamd-da93e9d6351e238ff66d04b9a7a712f161e2defc.tar.gz
rspamd-da93e9d6351e238ff66d04b9a7a712f161e2defc.zip
* Implement expression parser (convertor to inverse polish record)
* Improve configure system by implementing dependencies * Add .depend files for subdirs that requre it * Write simple test for expressions parser
Diffstat (limited to 'main.h')
-rw-r--r--main.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/main.h b/main.h
index adefa576f..f111ba1b4 100644
--- a/main.h
+++ b/main.h
@@ -56,6 +56,16 @@ enum script_type {
SCRIPT_MESSAGE,
};
+/* Logic expression */
+struct expression {
+ enum { EXPR_OPERAND, EXPR_OPERATION } type;
+ union {
+ void *operand;
+ char operation;
+ } content;
+ struct expression *next;
+};
+
/* Worker process structure */
struct rspamd_worker {
pid_t pid;
@@ -153,6 +163,7 @@ struct c_module {
};
void start_worker (struct rspamd_worker *worker, int listen_sock);
+struct expression* parse_expression (memory_pool_t *pool, char *line);
#endif