Update Parserv2.cpp
This commit is contained in:
parent
db3469594a
commit
3e7cc47af5
1 changed files with 3 additions and 11 deletions
14
Parserv2.cpp
14
Parserv2.cpp
|
@ -171,22 +171,14 @@ vector<string> deleteCMD(vector<string> input){
|
||||||
|
|
||||||
cout << "\nPassing the following arguments to dbEngine: " << endl;
|
cout << "\nPassing the following arguments to dbEngine: " << endl;
|
||||||
cout << "command :" << input[0] << endl;
|
cout << "command :" << input[0] << endl;
|
||||||
cout << "relation: " << input[1] << endl;
|
cout << "relation: " << input[2] << endl;
|
||||||
for (int i = 0; i < input.size(); ++i) {
|
for (int i = 0; i < input.size(); ++i) {
|
||||||
cout << input[i] << "\n";
|
cout << input[i] << "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main () {
|
int main () {
|
||||||
string ss = "INSERT INTO animals VALUES FROM ( Joe , cat , 4 ) ;";
|
string ss = "DELETE FROM animals WHERE (age == 12);";
|
||||||
string ss2 = "SHOW Dogs ;";
|
|
||||||
string ss3 = "EXIT ; ";
|
|
||||||
|
|
||||||
vector<string> listOfTokens = tokenize(ss);
|
vector<string> listOfTokens = tokenize(s);
|
||||||
vector<string> listOfTokens2 = tokenize(ss2);
|
|
||||||
vector<string> listOfTokens3 = tokenize(ss3);
|
|
||||||
|
|
||||||
par_line(listOfTokens);
|
|
||||||
par_line(listOfTokens2);
|
|
||||||
par_line(listOfTokens3);
|
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue