#include // std::string #include // std::cout #include // std::stringstream #include #include using namespace std; /* as of now, this parser can take a string and break it into tokens */ vector tokenize(string ss) { string tempString; stringstream lineStream(ss); vector output; while (lineStream >> tempString) { output.push_back(tempString); } //testing--------------- cout<<"TokenList: "; for (int i = 0; i input) { // if (input[0] != "(") // { // cout<<"ERROR! missing parenthesis"< input) { cout<<"TokenList: "< input) { string relationName; cout<<"insert-cmd function was called"< input) //calls par_command() or par_query() depending on first item from token list { /* • Match the first item in the token list and determine weather this is a command or a query. • Call functions par_command() or par_query(); • After either par_command() or par_query() returns, make sure the line ends properly with “;” token */ string tempChar = input.back(); if (tempChar != ";") { cout<<"ERROR! missing semicolon "< listOfTokens = tokenize(ss); par_line(listOfTokens); }