00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00031 #ifndef TDATA_T_H_
00032 #define TDATA_T_H_
00033
00034 #include "intmap_t.h"
00035
00037 typedef enum {
00039 tpc_bool,
00041 tpc_char,
00043 tpc_int,
00045 tpc_nil,
00047 tpc_string,
00049 tpc_resource
00050 } tprimitive_class_t;
00051
00053 typedef struct {
00055 tprimitive_class_t tpc;
00056 } tdata_primitive_t;
00057
00059 typedef struct {
00061 statns_t static_ref;
00062
00064 struct stree_csi *csi;
00065
00067 list_t targs;
00068 } tdata_object_t;
00069
00071 typedef struct {
00073 struct tdata_item *base_ti;
00074
00076 int rank;
00077
00079 list_t extents;
00080 } tdata_array_t;
00081
00086 typedef struct {
00088 list_t arg_ti;
00089
00091 struct tdata_item *varg_ti;
00092
00094 struct tdata_item *rtype;
00095 } tdata_fun_sig_t;
00096
00098 typedef struct {
00100 struct stree_deleg *deleg;
00101
00103 tdata_fun_sig_t *tsig;
00104 } tdata_deleg_t;
00105
00112 typedef struct {
00114 struct stree_enum *enum_d;
00115 } tdata_ebase_t;
00116
00118 typedef struct {
00120 struct stree_enum *enum_d;
00121 } tdata_enum_t;
00122
00124 typedef struct {
00126 struct stree_deleg *deleg;
00127
00129 tdata_fun_sig_t *tsig;
00130 } tdata_fun_t;
00131
00133 typedef struct {
00135 struct stree_targ *targ;
00136 } tdata_vref_t;
00137
00138 typedef enum {
00140 tic_tprimitive,
00142 tic_tobject,
00144 tic_tarray,
00146 tic_tdeleg,
00148 tic_tebase,
00150 tic_tenum,
00152 tic_tfun,
00154 tic_tvref,
00156 tic_ignore
00157 } titem_class_t;
00158
00160 typedef struct tdata_item {
00161 titem_class_t tic;
00162
00163 union {
00164 tdata_primitive_t *tprimitive;
00165 tdata_object_t *tobject;
00166 tdata_array_t *tarray;
00167 tdata_deleg_t *tdeleg;
00168 tdata_ebase_t *tebase;
00169 tdata_enum_t *tenum;
00170 tdata_fun_t *tfun;
00171 tdata_vref_t *tvref;
00172 } u;
00173 } tdata_item_t;
00174
00176 typedef struct {
00178 intmap_t tvv;
00179 } tdata_tvv_t;
00180
00181 #endif