/* PURPOSE:
 *    SYMTAB.H: Public interface to the Symbol Table.
 * HISTORY:
 *    Ian D. Allen   idallen@freenet.carleton.ca
 */

#ifndef _SYMTAB_H_
#define _SYMTAB_H_

#include "mem.h"

#include "stack.h"

typedef struct Symtab {
	char *name;	/* name of the symbol in the table */
	Item i;		/* attributes of the symbol */
} Symtab;

	void
sym_init(void); 

	void 
sym_term(void); 


	Symtab *
sym_lookup(
	char *string	/*IN: name of symbol to look up */
); 

	Symtab *
sym_insert(
	char *string	/*IN: name of symbol to insert */
); 

	Symtab *
sym_update(
	Symtab *symp,	/*IN: location of symtab element to update */
	Item *itemp	/*IN: new contents */
); 

	Item *
sym_value(
	Symtab *symp	/*IN: location of symtab element */
); 

	void 
sym_free(
	Symtab *symp	/*IN: location of symtab element */
); 

	void 
sym_dump(
	FILE *fd,	/*IN: output stream for dump */
	Symtab *ptr	/*IN: location of symbol to dump */
); 


#endif /*_SYMTAB_H_*/
