1986-03-26 15:11:02 +00:00
|
|
|
/* I D E N T I F I E R D E S C R I P T O R S T R U C T U R E */
|
|
|
|
|
|
|
|
/* $Header$ */
|
|
|
|
|
|
|
|
struct module {
|
1986-04-04 13:47:04 +00:00
|
|
|
int mo_priority; /* priority of a module */
|
|
|
|
int mo_scope; /* scope of this module */
|
1986-03-29 01:04:49 +00:00
|
|
|
#define mod_priority df_value.df_module.mo_priority
|
|
|
|
#define mod_scope df_value.df_module.mo_scope
|
1986-03-26 15:11:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct variable {
|
1986-04-04 13:47:04 +00:00
|
|
|
arith va_off; /* address or offset of variable */
|
1986-03-29 01:04:49 +00:00
|
|
|
#define var_off df_value.df_variable.va_off
|
1986-03-26 15:11:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct constant {
|
1986-03-29 01:04:49 +00:00
|
|
|
arith co_const; /* result of a constant expression */
|
|
|
|
#define con_const df_value.df_variable.con_const
|
1986-03-26 15:11:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct enumval {
|
1986-04-04 13:47:04 +00:00
|
|
|
unsigned int en_val; /* value of this enumeration literal */
|
|
|
|
struct def *en_next; /* next enumeration literal */
|
1986-03-29 01:04:49 +00:00
|
|
|
#define enm_val df_value.df_enum.en_val
|
|
|
|
#define enm_next df_value.df_enum.en_next
|
1986-03-26 15:11:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct field {
|
1986-03-29 01:04:49 +00:00
|
|
|
arith fd_off;
|
1986-03-26 15:11:02 +00:00
|
|
|
struct variant {
|
1986-03-29 01:04:49 +00:00
|
|
|
struct caselabellist *v_cases;
|
|
|
|
label v_casedescr;
|
|
|
|
struct def *v_varianttag;
|
|
|
|
} *fd_variant;
|
|
|
|
#define fld_off df_value.df_field.fd_off
|
|
|
|
#define fld_variant df_value.df_field.fd_variant
|
1986-03-26 15:11:02 +00:00
|
|
|
};
|
|
|
|
|
1986-04-04 13:47:04 +00:00
|
|
|
struct dfproc {
|
|
|
|
int pr_scope; /* scope number of procedure */
|
|
|
|
#define prc_scope df_value.df_proc.pr_scope
|
|
|
|
};
|
|
|
|
|
1986-03-26 15:11:02 +00:00
|
|
|
struct import {
|
1986-04-04 13:47:04 +00:00
|
|
|
struct def *im_def; /* imported definition */
|
1986-04-02 17:34:21 +00:00
|
|
|
#define imp_def df_value.df_import.im_def
|
1986-03-26 15:11:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct def { /* list of definitions for a name */
|
1986-03-29 01:04:49 +00:00
|
|
|
struct def *next; /* next definition in definitions chain */
|
|
|
|
struct def *df_nextinscope;
|
|
|
|
/* link all definitions in a scope */
|
1986-03-26 15:11:02 +00:00
|
|
|
struct idf *df_idf; /* link back to the name */
|
1986-04-04 13:47:04 +00:00
|
|
|
int df_scope; /* scope in which this definition resides */
|
|
|
|
short df_kind; /* the kind of this definition: */
|
|
|
|
#define D_MODULE 0x0001 /* a module */
|
|
|
|
#define D_PROCEDURE 0x0002 /* procedure of function */
|
|
|
|
#define D_VARIABLE 0x0004 /* a variable */
|
|
|
|
#define D_FIELD 0x0008 /* a field in a record */
|
|
|
|
#define D_TYPE 0x0010 /* a type */
|
|
|
|
#define D_ENUM 0x0020 /* an enumeration literal */
|
|
|
|
#define D_CONST 0x0040 /* a constant */
|
|
|
|
#define D_IMPORT 0x0080 /* an imported definition */
|
|
|
|
#define D_PROCHEAD 0x0100 /* a procedure heading in a definition module */
|
|
|
|
#define D_HIDDEN 0x0200 /* a hidden type */
|
|
|
|
#define D_HTYPE 0x0400 /* definition of a hidden type seen */
|
|
|
|
#define D_STDPROC 0x0800 /* a standard procedure */
|
|
|
|
#define D_STDFUNC 0x1000 /* a standard function */
|
|
|
|
#define D_ERROR 0x2000 /* a compiler generated definition for an
|
1986-03-27 17:37:41 +00:00
|
|
|
undefined variable
|
|
|
|
*/
|
1986-04-04 13:47:04 +00:00
|
|
|
#define D_ISEXPORTED 0x4000 /* not yet defined */
|
1986-03-26 15:11:02 +00:00
|
|
|
char df_flags;
|
1986-04-04 13:47:04 +00:00
|
|
|
#define D_ADDRESS 0x01 /* set if address was taken */
|
|
|
|
#define D_USED 0x02 /* set if used */
|
|
|
|
#define D_DEFINED 0x04 /* set if it is assigned a value */
|
|
|
|
#define D_VARPAR 0x08 /* set if it is a VAR parameter */
|
|
|
|
#define D_VALPAR 0x10 /* set if it is a value parameter */
|
|
|
|
#define D_EXPORTED 0x40 /* set if exported */
|
|
|
|
#define D_QEXPORTED 0x80 /* set if qualified exported */
|
1986-03-26 15:11:02 +00:00
|
|
|
struct type *df_type;
|
|
|
|
union {
|
|
|
|
struct module df_module;
|
|
|
|
struct variable df_variable;
|
|
|
|
struct constant df_constant;
|
|
|
|
struct enumval df_enum;
|
|
|
|
struct field df_field;
|
|
|
|
struct import df_import;
|
1986-04-04 13:47:04 +00:00
|
|
|
struct dfproc df_proc;
|
|
|
|
int df_stdname; /* define for standard name */
|
1986-03-26 15:11:02 +00:00
|
|
|
} df_value;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* ALLOCDEF "def" */
|
|
|
|
|
1986-03-27 17:37:41 +00:00
|
|
|
extern struct def
|
1986-03-26 15:11:02 +00:00
|
|
|
*define(),
|
1986-03-27 17:37:41 +00:00
|
|
|
*lookup(),
|
|
|
|
*ill_df;
|
|
|
|
|
|
|
|
#define NULLDEF ((struct def *) 0)
|