-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathquad.h
57 lines (49 loc) · 843 Bytes
/
quad.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
#ifndef QUAD_H
#define QUAD_H
#include "table_symbole.h"
// enumeration des types de quad
typedef enum quad_op{
//--- Sprint 1
print_i,
print_f,
return_prog,
create_string,
create_main,
//--- Sprint 2
use_var,
affectation,
affectation_var,
q_add,
q_sub,
q_mul,
q_div,
// Sprint3
q_equal,
q_nequal,
q_greater,
q_greaterOrEqual,
q_less,
q_lessOrEqual,
q_create_label,
q_goto,
//Sprint5
affectation_tab,
q_addrTab,
//Sprint7
q_empile,
q_depile,
q_fctRes,
q_returnFct,
q_endFct,
q_beginFct,
} quad_op;
// structure des quads
typedef struct quad_struct {
quad_op op; //operateur
Symbole arg1; //1er argument
Symbole arg2; //2eme argument
Symbole res; // resultat
struct quad_struct * next; //quad suivant
struct quad_struct * nextBool;
}std_quad , *quad;
#endif