/* 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 function implementation file

#include "stack.h"

// initalize the stacks
void initStacks(struct Stack *st, struct StrStack *str_st)
{
     st->stack_ptr = 0;
     str_st->stack_ptr = 0;    
}

// Push a item into the stack
void Push(struct Stack *st, float var)
{
     if(st->stack_ptr < max_string_size)
     st->stack[st->stack_ptr++] = var;
     else
     printError("Stack overflow\n");
}
// Pop a item from the stack
float Pop(struct Stack *st)
{
      if(st->stack_ptr >= 0)
      return st->stack[--st->stack_ptr];
      else
      printError("Stack Underflow\n");
      return 0;
}

void StrPush(struct StrStack *st, const char *str)
{

}
char *StrPop(struct StrStack *st)
{
     return 0;
}

