-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCONSTANT.hpp
49 lines (47 loc) · 928 Bytes
/
CONSTANT.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
#include <bits/stdc++.h>
using namespace std;
void print(int state){
switch (state) {
case 0:
std::cout << "start";
break;
case 1:
std::cout << "int_i";
break;
case 2:
std::cout << "int_in";
break;
case 3:
std::cout << "int_int";
break;
case 4:
std::cout << "space";
break;
case 5:
std::cout << "id";
break;
case 6:
std::cout << "equals";
break;
case 7:
std::cout << "constant_int";
break;
case 8:
std::cout << "comma";
break;
default:
std::cout << "Error!!";
}
}
string STATE[] =
{
"start",
"int_i",
"int_in",
"int_int",
"space",
"id",
"equals",
"constant_int",
"comma"
};