diff options
author | Ted Lemon <source@isc.org> | 2000-02-05 17:41:21 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 2000-02-05 17:41:21 +0000 |
commit | 511a2f207f19be20fe189d690b12a0d4b4fa91e3 (patch) | |
tree | c0073eaa770897af30c78517ea54dda430ff1b59 /includes/tree.h | |
parent | 488b9286c5b00dd76db6de823da1456a984c1680 (diff) | |
download | isc-dhcp-511a2f207f19be20fe189d690b12a0d4b4fa91e3.tar.gz |
Definitions for typed variables and function calls.
Diffstat (limited to 'includes/tree.h')
-rw-r--r-- | includes/tree.h | 56 |
1 files changed, 45 insertions, 11 deletions
diff --git a/includes/tree.h b/includes/tree.h index 32484acc..0cac4f7c 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 -}; |