// interp.cpp Dave Reed 3/1/05 // // This simple interpreter reads and executes SILLY programs. // Currently, it handles simple assignments, output, and if statements. /////////////////////////////////////////////////////////////////////////////// #include #include #include "Token.h" #include "Tokenizer.h" #include "VarTable.h" #include "Statement.h" using namespace std; int main() { string filename; cout << "Enter the program file name: "; cin >> filename; Tokenizer program(filename); VarTable variables; Statement * stmt = Statement::GetNext(program); while (stmt != NULL) { stmt->Execute(variables); stmt = Statement::GetNext(program); } return 0; }