-
Notifications
You must be signed in to change notification settings - Fork 0
/
table.h
70 lines (62 loc) · 1.04 KB
/
table.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#pragma once
#ifndef TABLE_H
#define TABLE_H
#include "include.h"
#define SIZE_serviceWord 11
#define SIZE_separators 9
#define SIZE_operation 20
#define SIZE_columns 2
string const serviceWord[SIZE_serviceWord][SIZE_columns] =
{
{"int","W1"},
{"float","W2"},
{"char","W3"},
{"main","W4"},
{"if","W5"},
{"else","W6"},
{"while","W7"},
{"#include","W8"},
{"malloc","W9"},
{"sizeof","W10"},
{"return","W11"}
};
string const operations[SIZE_operation][SIZE_columns] =
{
{"+","O1"},
{"-","O2"},
{"*","O3"},
{"/","O4"},
{"=","O5"},
{"%","O6"},
{">","O7"},
{"<","O8"},
{"==","O9"},
{"!=","O10"},
{">=","O11"},
{"<=","O12"},
{"/=","O13"},
{"+=","O14"},
{"-=","O15"},
{"*=","O16"},
{"&&","O17"},
{"||","O18"},
{"--","O19"},
{"++","O20"}
};
string const separators[SIZE_separators][SIZE_columns] =
{
{"[","R1"},
{"]","R2"},
{"(","R3"},
{")","R4"},
{"{","R5"},
{"}","R6"},
{";","R7"},
{",","R8"},
//{"*","R9"},
{"","R9"}
};
map<string, string> identifier;
map<string, string> numberConst;
map<string, string> symbolsConst;
#endif