-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLexer.hpp
54 lines (42 loc) · 1.65 KB
/
Lexer.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Lexer.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ckatz <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/06/27 08:53:08 by ckatz #+# #+# */
/* Updated: 2018/06/30 12:29:31 by ckatz ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LEXER_HPP
#define LEXER_HPP
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <cstring>
#include <vector>
class Lexer
{
public:
//Constructors
Lexer(void);
Lexer(Lexer const & src);
//Deconstructor
~Lexer(void);
// Getters
int getInputType(void) const;
std::vector<std::vector<std::string> > getListOfTokens(void) const;
// Setters
void setInputType(int inputType);
void setListOfTokens(std::vector<std::vector<std::string> > listOfTokens);
//Functions to read and tokenize file or input from std::in
void readFromStdin(void);
void readFromFile(std::string fileName);
virtual Lexer & operator=(Lexer const & src);
private:
int _inputType;
std::vector<std::vector<std::string> > _listOfTokens;
};
#endif