/* sa.h */ typedef void Atype; extern struct Tsimple *t_void, *t_char, *t_int, *t_float; typedef struct L { Syntax *field; int position; struct L *rest; } structlink; struct Tgeneric { tagtype tag; }; struct Tsimple { tagtype tag; SymbolKind type; }; struct Tpointerto { tagtype tag; Atype *what; }; struct Tarrayof { tagtype tag; int size; int numels; Atype *what; }; struct Tstruct { tagtype tag; SymbolDescription *name; int size; structlink *fields; }; struct Tfunction { tagtype tag; Atype *returns; Syntax *params; int defined; }; typedef struct DR { Atype *type; int level; int place; struct DR *previous; } DeclarationRecord; void init_type_checker(void); void typecheck(Syntax *t); Atype *MakeBasicType(Syntax *t); void ProcessDeclaration(Syntax *item, Atype *basic, Atype **type, SymbolDescription **var); int is_function_type(Atype *t); int sizeoftype(Atype *t);