cleared out bad code in DBEngine
This commit is contained in:
commit
9f5d3e5346
2 changed files with 53 additions and 3 deletions
|
@ -3,10 +3,10 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "Relation.h"
|
#include "Relation.h"
|
||||||
|
|
||||||
//still in progress
|
//still in progress
|
||||||
class DBEngine {
|
class DBEngine {
|
||||||
vector<Relation> tables;
|
vector<Relation> tables;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DBEngine(){
|
DBEngine(){
|
||||||
|
@ -52,5 +52,5 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
50
LParser.cpp
Executable file
50
LParser.cpp
Executable file
|
@ -0,0 +1,50 @@
|
||||||
|
// Lexical Parser
|
||||||
|
// Test file
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include "DBEngine.h"
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int digit(char c)
|
||||||
|
{
|
||||||
|
if(isdigit(c))
|
||||||
|
{
|
||||||
|
return atoi(c);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
char alpha(char c)
|
||||||
|
{
|
||||||
|
toupper(c);
|
||||||
|
string a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
|
int x = 0;
|
||||||
|
while(x != a.length())
|
||||||
|
{
|
||||||
|
if(c == a[x])
|
||||||
|
{
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
x++;
|
||||||
|
}
|
||||||
|
return "?";
|
||||||
|
}
|
||||||
|
|
||||||
|
char space(char c)
|
||||||
|
{
|
||||||
|
if(c == " ")
|
||||||
|
{
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
return "?";
|
||||||
|
}
|
||||||
|
|
||||||
|
char arnold(char c)
|
||||||
|
{
|
||||||
|
if(c == ";")
|
||||||
|
{
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
return "?";
|
||||||
|
}
|
Reference in a new issue