/* 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
*/

// stack header file


#ifndef _stack_h_
#define _stack_h_
#include "error.h"
#include "globals.h"


struct Stack {
       float stack[max_string_size]; // allow exactly 256*4 instruction pointers / items in the stack
       int stack_ptr;     
};

struct StrStack { 
      char str[20][256];
      int stack_ptr;   
};

void initStacks(struct Stack *st, struct StrStack *str_st);
void Push(struct Stack *st, float var);
float Pop(struct Stack *st);
void StrPush(struct StrStack *st, const char *str);
char *StrPop(struct StrStack *st);

#endif

