#ifndef _PLY_SYM_H #define _PLY_SYM_H #include struct symtab; struct type; struct func; struct sym { struct symtab *st; const char *name; const struct func *func; struct type *type; /* irstate_t irs; */ }; struct symtab { struct sym **syms; size_t len; }; #define symtab_foreach(_st, _sym) \ for((_sym) = (_st)->syms; (_sym) < &(_st)->syms[(_st)->len]; (_sym)++) struct sym *sym_alloc(struct symtab *st, struct node *n, const struct func *func); void sym_dump(struct sym *sym, FILE *fp); void symtab_dump(struct symtab *st, FILE *fp); #endif /* _PLY_SYM_H */