diff --git a/src/expr.h b/src/expr.h index 9623a084..e010bb5d 100644 --- a/src/expr.h +++ b/src/expr.h @@ -1,6 +1,6 @@ /***************************************************************/ /* */ -/* EXPR_NEW.H */ +/* EXPR.H */ /* */ /* Contains a few definitions used by expression pareser and */ /* evaluator. */ @@ -12,8 +12,6 @@ typedef struct udf_struct UserFunc; -expr_node *parse_expression(char const **e, int *r, Var *locals); - /* Define the types of values */ #define ERR_TYPE 0 #define INT_TYPE 1 diff --git a/src/protos.h b/src/protos.h index 58f2b26d..a7c13f9f 100644 --- a/src/protos.h +++ b/src/protos.h @@ -57,6 +57,8 @@ int DoSubst (ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int dse, int DoSubstFromString (char const *source, DynamicBuffer *dbuf, int dse, int tim); int ParseLiteralDate (char const **s, int *dse, int *tim); int ParseLiteralTime (char const **s, int *tim); +expr_node *parse_expression(char const **e, int *r, Var *locals); + int evaluate_expr_node(expr_node *node, Value *locals, Value *ans, int *nonconst); void print_expr_tree(expr_node *node, FILE *fp); expr_node *free_expr_tree(expr_node *node); @@ -152,7 +154,6 @@ int DoMsgCommand (char const *cmd, char const *msg, int is_queued); int ParseNonSpaceChar (ParsePtr p, int *err, int peek); unsigned int HashVal (char const *str); int DateOK (int y, int m, int d); -Operator *FindOperator (char const *name, Operator where[], int num); BuiltinFunc *FindBuiltinFunc (char const *name); int InsertIntoSortBuffer (int dse, int tim, char const *body, int typ, int prio); void IssueSortedReminders (void); diff --git a/src/types.h b/src/types.h index 48856d42..a0c161ec 100644 --- a/src/types.h +++ b/src/types.h @@ -22,14 +22,6 @@ typedef struct { } v; } Value; -/* Define the type of operators */ -typedef struct { - char const *name; - char prec; - char type; - int (*func)(void); -} Operator; - /* New-style expr_node structure and constants */ enum expr_node_type {