From: Ted Lemon Date: Sat, 5 Feb 2000 17:41:21 +0000 (+0000) Subject: Definitions for typed variables and function calls. X-Git-Tag: V3-BETA-2-PATCH-1~327 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=511a2f207f19be20fe189d690b12a0d4b4fa91e3;p=thirdparty%2Fdhcp.git Definitions for typed variables and function calls. --- diff --git a/includes/tree.h b/includes/tree.h index 32484acc2..0cac4f7cb 100644 --- a/includes/tree.h +++ b/includes/tree.h @@ -55,10 +55,43 @@ struct data_string { int terminated; }; +enum expression_context { + context_any, /* indefinite */ + context_boolean, + context_data, + context_numeric, + context_dns, + context_data_or_numeric, /* indefinite */ + context_function +}; + +struct fundef { + struct string_list *args; + struct executable_statement *statements; +}; + +struct binding_value { + int refcnt; + enum { + binding_boolean, + binding_data, + binding_numeric, + binding_dns, + binding_function + } type; + union value { + struct data_string data; + unsigned long intval; + int boolean; + ns_updrec *dns; + struct fundef fundef; + } value; +}; + struct binding { struct binding *next; char *name; - struct data_string value; + struct binding_value *value; }; struct binding_scope { @@ -112,7 +145,9 @@ enum expr_op { expr_variable_exists, expr_variable_reference, expr_filename, - expr_sname + expr_sname, + expr_arg, + expr_funcall }; struct expression { @@ -179,6 +214,14 @@ struct expression { struct expression *rrdata; } ns_delete, ns_exists, ns_not_exists; char *variable; + struct { + struct expression *val; + struct expression *next; + } arg; + struct { + char *name; + struct expression *arglist; + } funcall; } data; int flags; # define EXPR_EPHEMERAL 1 @@ -236,12 +279,3 @@ struct option { struct universe *universe; unsigned code; }; - -enum expression_context { - context_any, - context_boolean, - context_data, - context_numeric, - context_dns, - context_data_or_numeric -};