-
Notifications
You must be signed in to change notification settings - Fork 1
/
AST
218 lines (214 loc) · 5.6 KB
/
AST
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
digraph {
ordering=out;
ranksep=.4;
bgcolor="lightgrey"; node [shape=box, fixedsize=false, fontsize=12, fontname="Helvetica-bold", fontcolor="blue"
width=.25, height=.25, color="black", fillcolor="white", style="filled, solid, bold"];
edge [arrowsize=.5, color="black", style="bold"]
n0 [label="LIST_FUNCTIONS"];
n1 [label="function"];
n1 [label="function"];
n2 [label="test1"];
n3 [label="PARAMS"];
n3 [label="PARAMS"];
n4 [label="int"];
n4 [label="int"];
n5 [label="i"];
n6 [label="int"];
n6 [label="int"];
n7 [label="j"];
n8 [label="LIST_INSTR"];
n8 [label="LIST_INSTR"];
n9 [label="return"];
n9 [label="return"];
n10 [label="-"];
n10 [label="-"];
n11 [label="+"];
n11 [label="+"];
n12 [label="i"];
n13 [label="/"];
n13 [label="/"];
n14 [label="j"];
n15 [label="i"];
n16 [label="j"];
n17 [label="function"];
n17 [label="function"];
n18 [label="main"];
n19 [label="PARAMS"];
n20 [label="LIST_INSTR"];
n20 [label="LIST_INSTR"];
n21 [label="SPEED"];
n21 [label="SPEED"];
n22 [label="20"];
n23 [label="VOL"];
n23 [label="VOL"];
n24 [label="60"];
n25 [label="PLAYABLE"];
n25 [label="PLAYABLE"];
n26 [label="PACK"];
n26 [label="PACK"];
n27 [label="NOTE"];
n27 [label="NOTE"];
n28 [label="D"];
n29 [label="NOTE"];
n29 [label="NOTE"];
n30 [label="F"];
n31 [label="NOTE"];
n31 [label="NOTE"];
n32 [label="A"];
n33 [label="8"];
n34 [label="*"];
n35 [label="NOTEASSIGN"];
n35 [label="NOTEASSIGN"];
n36 [label="Cc"];
n37 [label="CHORD"];
n37 [label="CHORD"];
n38 [label="NOTE"];
n38 [label="NOTE"];
n39 [label="C"];
n40 [label="5"];
n41 [label="NOTE"];
n41 [label="NOTE"];
n42 [label="E"];
n43 [label="b"];
n44 [label="3"];
n45 [label="NOTE"];
n45 [label="NOTE"];
n46 [label="G"];
n47 [label="2"];
n48 [label="for"];
n48 [label="for"];
n49 [label="ASSIGN"];
n49 [label="ASSIGN"];
n50 [label="i"];
n51 [label="0"];
n52 [label="<"];
n52 [label="<"];
n53 [label="i"];
n54 [label="8"];
n55 [label="ASSIGN"];
n55 [label="ASSIGN"];
n56 [label="i"];
n57 [label="+"];
n57 [label="+"];
n58 [label="i"];
n59 [label="1"];
n60 [label="LIST_INSTR"];
n60 [label="LIST_INSTR"];
n61 [label="if"];
n61 [label="if"];
n62 [label="="];
n62 [label="="];
n63 [label="%"];
n63 [label="%"];
n64 [label="i"];
n65 [label="2"];
n66 [label="0"];
n67 [label="LIST_INSTR"];
n67 [label="LIST_INSTR"];
n68 [label="PLAYABLE"];
n68 [label="PLAYABLE"];
n69 [label="Cc"];
n70 [label="4"];
n71 [label="LIST_INSTR"];
n71 [label="LIST_INSTR"];
n72 [label="PLAYABLE"];
n72 [label="PLAYABLE"];
n73 [label="CHORD"];
n73 [label="CHORD"];
n74 [label="NOTE"];
n74 [label="NOTE"];
n75 [label="D"];
n76 [label="5"];
n77 [label="NOTE"];
n77 [label="NOTE"];
n78 [label="F"];
n79 [label="3"];
n80 [label="NOTE"];
n80 [label="NOTE"];
n81 [label="A"];
n82 [label="2"];
n83 [label="8"];
n0 -> n1 // "LIST_FUNCTIONS" -> "function"
n1 -> n2 // "function" -> "test1"
n1 -> n3 // "function" -> "PARAMS"
n3 -> n4 // "PARAMS" -> "int"
n4 -> n5 // "int" -> "i"
n3 -> n6 // "PARAMS" -> "int"
n6 -> n7 // "int" -> "j"
n1 -> n8 // "function" -> "LIST_INSTR"
n8 -> n9 // "LIST_INSTR" -> "return"
n9 -> n10 // "return" -> "-"
n10 -> n11 // "-" -> "+"
n11 -> n12 // "+" -> "i"
n11 -> n13 // "+" -> "/"
n13 -> n14 // "/" -> "j"
n13 -> n15 // "/" -> "i"
n10 -> n16 // "-" -> "j"
n0 -> n17 // "LIST_FUNCTIONS" -> "function"
n17 -> n18 // "function" -> "main"
n17 -> n19 // "function" -> "PARAMS"
n17 -> n20 // "function" -> "LIST_INSTR"
n20 -> n21 // "LIST_INSTR" -> "SPEED"
n21 -> n22 // "SPEED" -> "20"
n20 -> n23 // "LIST_INSTR" -> "VOL"
n23 -> n24 // "VOL" -> "60"
n20 -> n25 // "LIST_INSTR" -> "PLAYABLE"
n25 -> n26 // "PLAYABLE" -> "PACK"
n26 -> n27 // "PACK" -> "NOTE"
n27 -> n28 // "NOTE" -> "D"
n26 -> n29 // "PACK" -> "NOTE"
n29 -> n30 // "NOTE" -> "F"
n26 -> n31 // "PACK" -> "NOTE"
n31 -> n32 // "NOTE" -> "A"
n25 -> n33 // "PLAYABLE" -> "8"
n25 -> n34 // "PLAYABLE" -> "*"
n20 -> n35 // "LIST_INSTR" -> "NOTEASSIGN"
n35 -> n36 // "NOTEASSIGN" -> "Cc"
n35 -> n37 // "NOTEASSIGN" -> "CHORD"
n37 -> n38 // "CHORD" -> "NOTE"
n38 -> n39 // "NOTE" -> "C"
n38 -> n40 // "NOTE" -> "5"
n37 -> n41 // "CHORD" -> "NOTE"
n41 -> n42 // "NOTE" -> "E"
n41 -> n43 // "NOTE" -> "b"
n41 -> n44 // "NOTE" -> "3"
n37 -> n45 // "CHORD" -> "NOTE"
n45 -> n46 // "NOTE" -> "G"
n45 -> n47 // "NOTE" -> "2"
n20 -> n48 // "LIST_INSTR" -> "for"
n48 -> n49 // "for" -> "ASSIGN"
n49 -> n50 // "ASSIGN" -> "i"
n49 -> n51 // "ASSIGN" -> "0"
n48 -> n52 // "for" -> "<"
n52 -> n53 // "<" -> "i"
n52 -> n54 // "<" -> "8"
n48 -> n55 // "for" -> "ASSIGN"
n55 -> n56 // "ASSIGN" -> "i"
n55 -> n57 // "ASSIGN" -> "+"
n57 -> n58 // "+" -> "i"
n57 -> n59 // "+" -> "1"
n48 -> n60 // "for" -> "LIST_INSTR"
n60 -> n61 // "LIST_INSTR" -> "if"
n61 -> n62 // "if" -> "="
n62 -> n63 // "=" -> "%"
n63 -> n64 // "%" -> "i"
n63 -> n65 // "%" -> "2"
n62 -> n66 // "=" -> "0"
n61 -> n67 // "if" -> "LIST_INSTR"
n67 -> n68 // "LIST_INSTR" -> "PLAYABLE"
n68 -> n69 // "PLAYABLE" -> "Cc"
n68 -> n70 // "PLAYABLE" -> "4"
n61 -> n71 // "if" -> "LIST_INSTR"
n71 -> n72 // "LIST_INSTR" -> "PLAYABLE"
n72 -> n73 // "PLAYABLE" -> "CHORD"
n73 -> n74 // "CHORD" -> "NOTE"
n74 -> n75 // "NOTE" -> "D"
n74 -> n76 // "NOTE" -> "5"
n73 -> n77 // "CHORD" -> "NOTE"
n77 -> n78 // "NOTE" -> "F"
n77 -> n79 // "NOTE" -> "3"
n73 -> n80 // "CHORD" -> "NOTE"
n80 -> n81 // "NOTE" -> "A"
n80 -> n82 // "NOTE" -> "2"
n72 -> n83 // "PLAYABLE" -> "8"
}