-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlexicon.hpp
More file actions
47 lines (34 loc) · 1.14 KB
/
lexicon.hpp
File metadata and controls
47 lines (34 loc) · 1.14 KB
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
#ifndef LEXICON_HPP
#define LEXICON_HPP
#include <cstring>
#include <fstream>
using namespace std;
extern string NT; //NextToken
extern const string IDENTIFIER_TOKEN;
extern const string INTEGER_TOKEN;
extern const string STRING_TOKEN;
extern const string OPERATOR_TOKEN;
extern const string KEYWORD_TOKEN;
extern const string UNDEFINED_TOKEN;
extern const string PUNCTUATION_TOKEN;
extern const string FCN_FORM_LABEL;
extern const string GAMMA_STD_LABEL;
extern const string LAMBDA_STD_LABEL;
extern const char *operatorArray;
extern const char *stringAllowedCharArray;
extern const char *stringAllowedEscapeCharArray;
extern const char *eolCharArray;
extern const char *punctuationArray;
extern string nextTokenType;
void scan(ifstream &file);
bool checkIfEOF(ifstream &file);
void readIdentifierToken(ifstream &file);
void readIntegerToken(ifstream &file);
bool isOperator(char c);
void readOperatorToken(ifstream &file);
bool isPunctuation(char c);
void readPunctuationChar(ifstream &file);
bool isStringAllowedChar(char c);
void readStringToken(ifstream &file);
void resolveIfCommentOrOperator(ifstream &file);
#endif //RPAL_INTERPRETER_LEXICON_H