Update Parserv2.cpp

This commit is contained in:
scho4077 2015-09-22 21:51:39 -05:00
parent 52c801715c
commit 74bc10d0ad

View file

@ -112,27 +112,48 @@ vector<string> exitCMD(vector<string> input)
vector<string> createCMD(vector<string> input)
{
if (input[0] != "CREATE") {
cout << "Error, create keyword is missing." <<endl;
cout << "Error: create keyword is missing." <<endl;
return input;
}
cout << "\nPassing the following arguments to dbEngine: " << endl;
// CREATE TABLE relation-name ( typed-attribute-list ) PRIMARY KEY ( attribute-list )
cout << "command :" << input[0] << endl;
cout << "argument: " << input[1] << endl;
return input;
}
vector<string> openCMD(vector<string> input){
if (input[0] != "OPEN") {
cout << "Error: open keyword is missing." <<endl;
return input;
}
cout << "\nPassing the following arguments to dbEngine: " << endl;
cout << "command :" << input[0] << endl;
cout << "argument: " << input[1] << endl;
}
vector<string> openCMD(vector<string> input){
//
cout << "relation: " << input[1] << endl;
}
vector<string> closeCMD(vector<string> input){
//
if (input[0] != "CLOSE") {
cout << "Error: close keyword is missing." <<endl;
return input;
}
cout << "\nPassing the following arguments to dbEngine: " << endl;
cout << "command :" << input[0] << endl;
cout << "relation: " << input[1] << endl;
}
vector<string> saveCMD(vector<string> input){
//open-cmd ::== OPEN relation-name
//close-cmd ::== CLOSE relation-name
//save-cmd ::== SAVE relation-name
if (input[0] != "SAVE") {
cout << "Error: save keyword is missing." <<endl;
return input;
}
cout << "\nPassing the following arguments to dbEngine: " << endl;
cout << "command :" << input[0] << endl;
cout << "relation: " << input[1] << endl;
}
vector<string> updateCMD(vector<string> input){