// Header file
// By: Nick Cash, 810:061-3
// Lab Project

// Parser by Nick Gammon
// You can find information about it at:
// http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4649

#ifndef INC_MAIN
#define INC_MAIN

#define PRINT_DEBUG    // do we want to print out any debug info?

#ifdef PRINT_DEBUG
//#define PRINT_COMP_DEBUG  // print comprehensive debug?
#endif

typedef struct var VAR;
typedef struct lines LINE;

struct var
{
  std::string name;
  int  value;   //value of int
};

struct lines
{
  int ref;                // actual line number
  std::string line_num;   // "label"
  std::string command;    // the command to execute
  std::string operand;    // 1 operand
  std::string operand2;   // 2nd option operand, used for if
  std::string data;       // the full string
};

// functions
void get_input( void );
void cleanup( void );
void execute( void );

bool parse_input( void );

int parse_expression( std::string z );

VAR *create_variable( std::string name, int value ); // will create and link a variable
VAR *find_variable( std::string name ); //return the variable, otherwise return null

std::string num_to_string( int i );

#endif // INC_MAIN