/* Structures allocated for and updated during parse time that are the IR before writing to the output file */ #define BUF_SIZE 256 #define MAX_SUBCLASSES 16 #define MAX_SETS 256 #define MAX_ELES 256 #define MAX_REFS 256 #define MAX_MODELS 256 struct ref { int x, y, z, objref; }; struct ele { int odat_id; int parent_id;//offset into class set_stack }; struct set { int odat_id; int parent_id;//offset into CB int num_ele; int ele_index; //same as num_ele? struct ele ele_list[MAX_ELES]; }; //8 ids for each direction //fdat_id ordered by alphabetical direction struct model { char label[32]; int fdat_id[8]; }; struct vdat { char label[32]; int num_models; int msi; //model_stack_index struct model model_list[MAX_MODELS]; }; struct cdat { char label[32]; int num_subclasses; int num_sets; int subclass_index; int set_index; struct cdat* subclass_list[MAX_SUBCLASSES]; struct set set_list[MAX_SETS]; }; //Element or a set struct odat { char label[32]; int vdat_id; int class_id; int num_ref; int ref_index; struct ref ref_list[MAX_REFS]; }; struct cdat cdat_buf[BUF_SIZE]; struct odat odat_buf[BUF_SIZE]; struct vdat vdat_buf[BUF_SIZE]; //indexes for buffers int cbi = 0; int vbi = 0; int obi = 0; void insert_set(void); void insert_ref(int, int, int, int); void inc_cbi(void); void set_class_label(char*); void inc_subclass_index(void); void inc_subclass_index(void); void inc_ref(void); void inc_models(void);