This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
breakthroughpine64backup/Parser.cpp

64 lines
979 B
C++
Raw Normal View History

2015-10-12 17:19:07 -05:00
//#include "main.cpp"
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
bool password = true; // temp for a password needed function needed later.
string pass = "admin";
void setPassword()
{
password = !password;
}
vector<string> tokenize(string ss){
string tempString;
stringstream lineStream(ss);
vector<string> output;
while (lineStream >> tempString){
output.push_back(tempString);
}
return output;
}
void parseCmd(vector<string> input){
if(password){
if(pass == input[0]){
setPassword();
cout << "Success." << endl;
}
else{
cout << "Incorrect Password." << endl;
}
}
string cmd = toupper(input[0]);
else if(cmd == ""){
}
else if(cmd == ""){
}
else if(cmd == ""){
}
else if(cmd == ""){
}
else if(cmd == ""){
}
}
void parse(string input){
vector<string> listOfTokens = tokenize(input);
parseCmd(listOfTokens);
}