-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathformulaparser.h
48 lines (37 loc) · 889 Bytes
/
formulaparser.h
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
/*
* File: formulaparser.h
* Author: kuestere
*
* Created on 29. September 2018, 16:04
*/
#ifndef FORMULAPARSER_H
#define FORMULAPARSER_H
#include <cstdlib>
#include <glibmm.h>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
class FormulaParser {
public:
FormulaParser(Glib::ustring input);
FormulaParser(const FormulaParser& orig);
virtual ~FormulaParser();
Glib::ustring formulaString;
int length = 0;
Glib::ustring::iterator pointer;
bool endOfString = false;
void advance();
gunichar fetch();
Glib::ustring scanForBond();
bool isDigit(gunichar c);
int scanForIndex();
gunichar scanForOpeningBracket();
bool isCharClosingBracket(gunichar closing);
bool followsClosingBracket();
string scanForElement();
private:
protected:
};
#endif /* FORMULAPARSER_H */