school/cs236/lexer/lexi.h

45 lines
1.8 KiB
C
Raw Normal View History

2016-04-06 20:46:32 -07:00
#ifndef __LEXI_H__
#define __LEXI_H__
#include <iostream>
#include <fstream>
#include <vector>
#include "token.h"
#include <cctype>
#include <string>
#include <sstream>
using namespace std;
class lexi {
public:
lexi(){}
vector<token> tokens;
string determiner(string, string);
vector<token> lexical_analyzer(vector<string>, string);
string type_simple(string, string);
string type_simple_string(string);
bool is_simple_string(string);
string det_type_simple_string(vector<string>&, int, int);
bool is_char_valid(char);
string string_finder(vector<string>&, int, int);
string comment_finder(vector<string>&, int, int);
string id_finder(vector<string>&, int, int);
string incorrect(string);
bool det_help_simple(string, string);
bool det_help_simple_string(string, string);
bool quick_help(string, string);
bool det_help_id(string);
string type_simple_caps(string, string);
bool simple_state(vector<string>&, string, string, string, int, int);
bool simple_state_string(vector<string>&, string, string, string, int, int);
bool simple_id(vector<string>&, string, string, string, int, int);
bool simple_comment(vector<string>&, string, string, string, int, int);
void write_to_file(string);
void write_to_file(string, int);
};
#endif