diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2012-09-25 12:58:05 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2012-09-25 12:58:05 +0200 |
commit | b9a82851866f84ca306a2802b4ca50089a2fe683 (patch) | |
tree | 1f9928af8fc5f46589275992e6c6e7295e7a5924 /awk.h | |
parent | eb2698f49247c94c84e1e2c2304ba94d96c89bc9 (diff) | |
download | egawk-b9a82851866f84ca306a2802b4ca50089a2fe683.tar.gz egawk-b9a82851866f84ca306a2802b4ca50089a2fe683.tar.bz2 egawk-b9a82851866f84ca306a2802b4ca50089a2fe683.zip |
First cut at SYMTAB and FUNCTAB.
Diffstat (limited to 'awk.h')
-rw-r--r-- | awk.h | 31 |
1 files changed, 13 insertions, 18 deletions
@@ -314,7 +314,6 @@ typedef enum nodevals { Node_func, /* lnode is param. list, rnode is body */ Node_ext_func, /* extension function, code_ptr is builtin code */ - Node_hashnode, /* an identifier in the symbol table */ Node_array_ref, /* array passed by ref as parameter */ Node_array_tree, /* Hashed array tree (HAT) */ Node_array_leaf, /* Linear 1-D array */ @@ -462,17 +461,11 @@ typedef struct exp_node { #define nextp sub.nodep.l.lptr #define rnode sub.nodep.r.rptr -/* Node_hashnode, Node_param_list */ -#define hnext sub.nodep.r.rptr -#define hname vname -#define hlength sub.nodep.reserved -#define hcode sub.nodep.cnt -#define hvalue sub.nodep.x.extra +/* Node_param_list */ +#define param vname /* Node_param_list, Node_func */ #define param_cnt sub.nodep.l.ll -/* Node_param_list */ -#define param vname /* Node_func */ #define fparms sub.nodep.rn @@ -1373,15 +1366,15 @@ if (--val) \ /* array.c */ typedef enum sort_context { SORTED_IN = 1, ASORT, ASORTI } SORT_CTXT; enum assoc_list_flags { -AINDEX = 0x01, /* list of indices */ -AVALUE = 0x02, /* list of values */ -AINUM = 0x04, /* numeric index */ -AISTR = 0x08, /* string index */ -AVNUM = 0x10, /* numeric scalar value */ -AVSTR = 0x20, /* string scalar value */ -AASC = 0x40, /* ascending order */ -ADESC = 0x80, /* descending order */ -ADELETE = 0x100, /* need a single index; for use in do_delete_loop */ + AINDEX = 0x01, /* list of indices */ + AVALUE = 0x02, /* list of values */ + AINUM = 0x04, /* numeric index */ + AISTR = 0x08, /* string index */ + AVNUM = 0x10, /* numeric scalar value */ + AVSTR = 0x20, /* string scalar value */ + AASC = 0x40, /* ascending order */ + ADESC = 0x80, /* descending order */ + ADELETE = 0x100, /* need a single index; for use in do_delete_loop */ }; extern NODE *make_array(void); @@ -1671,6 +1664,8 @@ extern int get_numbase(const char *str, bool use_locale); /* symbol.c */ extern void load_symbols(); +extern void init_symbol_table(); +extern NODE *symbol_table; extern NODE *install_symbol(char *name, NODETYPE type); extern NODE *remove_symbol(NODE *r); extern void destroy_symbol(NODE *r); |