typedef enum objtype { objFUNC, /* functions */ objGVAR, /* global variables */ objGARR, /* global arrays */ objLVAR, /* local variables (include arguments) */ objLARR /* local arrays */ } ObjType; typedef struct object { ObjType type; /* objFUNC objGVAR objGARR objLVAR objLARR */ char *name; /* name name name name name */ int args; /* args */ int offset; /* offset offset */ int size; /* size size size */ struct object *scope; /* scope scope */ } *Obj; typedef struct node { int type; /* divert from TOKEN code */ int num; /* for NUM nodes */ char *str; /* for STR nodes */ char *name; /* for SYM nodes */ struct object *obj; /* for SYM nodes */ struct node *left,*right; /* for other nodes */ struct node *third; /* for FUNC_DEF and IF */ } *Tree; #define YYSTYPE Tree #define NUL 0