diff --git a/DBEngine.h b/DBEngine.h index 2b25e6f..792c36b 100755 --- a/DBEngine.h +++ b/DBEngine.h @@ -3,10 +3,10 @@ #include #include "Relation.h" -//still in progress +//still in progress class DBEngine { vector tables; - int size; + int size; public: DBEngine(){ @@ -52,5 +52,5 @@ public: } file.close(); - } + } }; diff --git a/LParser.cpp b/LParser.cpp new file mode 100755 index 0000000..2a17ee5 --- /dev/null +++ b/LParser.cpp @@ -0,0 +1,50 @@ +// Lexical Parser +// Test file + +#include +#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 "?"; +} \ No newline at end of file