-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLAScanner.hpp
45 lines (35 loc) · 851 Bytes
/
LAScanner.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
/*
Dylan Jager-Kujawa
Matt Richardson
Dr. Strader
CSC 442
8 December 2015
Blocks World
LAScanner.hpp
*/
#ifndef LASCANNER
#define LASCANNER
#include <iostream>
#include <iomanip>
#include <fstream>
#include <stdexcept>
class LAScanner {
public:
LAScanner(std::string fileName);
LAScanner();
std::string getInputTable();
int getLineNumber();
std::string peek();
std::string nextToken();
private:
bool isSymbol(char c);
std::string charQueue; // The input file as a string.
int lineCount; // The current line number.
int pos; // The current index position when traversing charQueue.
bool currVar; // Is the token currently being read a <variable> token?
};
#endif
#ifndef FILENOTFOUNDEXCEPTION
#define FILENOTFOUNDEXCEPTION
class FileNotFoundException : std::exception { public: FileNotFoundException() {} };
#endif