/* MasC interpreter/compiler
   (Master Assembly Script Container)
   written by Jared Bruni
   
   After reading Writing Compilers and Interpreters A approach using C++ by Ronald Mak
   and the Dragon Book
   code completly re-written but using concepts teached in this book
*/
// Symbol Table header file


#ifndef __symbol_tabel_H_
#define __symbol_tabel_H_

#include<stdio.h>
#include "globals.h"
#include<string.h>
#include<stdlib.h>
#include<stdio.h>


struct symNode {
       char *str;
       short sym_tab;
       int line;
       float value;
       char str_value[max_string_size];
       struct symNode *next; 
       enum var_type vtype;   
};

struct symTbl {
       struct symNode root;
       struct symNode *tail;
       int node_count;
       int sym_tab;
};


void initTable(struct symTbl *stable);
struct symNode *Enter(struct symTbl *stable,  struct symNode *node, const char *str);
struct symNode *Search(struct symNode *node, const char *str);
void symNode_Print(struct symNode *node);

#endif

