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.
dmspine64backup/LParser.cpp

50 lines
535 B
C++
Raw Normal View History

2015-09-16 16:43:49 -05:00
// Lexical Parser
2015-09-16 17:28:32 -05:00
// 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 "?";
}