-
Notifications
You must be signed in to change notification settings - Fork 0
/
Calc.dot
198 lines (196 loc) · 11.5 KB
/
Calc.dot
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
digraph G {
concentrate = true
"$start -> start $end" [label="0: $start -> start $end", shape = doubleoctagon, fontcolor=blue, color=blue ]
"start -> input" [label="1: start -> input", shape = box, fontcolor=blue, color=blue ]
"STAR-1 -> STAR-1 line" [label="2: STAR-1 -> STAR-1 line", shape = box, fontcolor=blue, color=blue ]
"STAR-1 -> /* empty */" [label="3: STAR-1 -> /* empty */", shape = box, fontcolor=blue, color=blue ]
"input -> STAR-1" [label="4: input -> STAR-1", shape = box, fontcolor=blue, color=blue ]
"line -> '\\n'" [label="5: line -> '\\n'", shape = box, fontcolor=blue, color=blue ]
"line -> exp '\\n'" [label="6: line -> exp '\\n'", shape = box, fontcolor=blue, color=blue ]
"line -> error '\\n'" [label="7: line -> error '\\n'", shape = box, fontcolor=blue, color=blue ]
"exp -> NUM" [label="8: exp -> NUM", shape = box, fontcolor=blue, color=blue ]
"exp -> VAR" [label="9: exp -> VAR", shape = box, fontcolor=blue, color=blue ]
"exp -> VAR '=' exp" [label="10: exp -> VAR '=' exp", shape = box, fontcolor=blue, color=blue ]
"exp -> exp '+' exp" [label="11: exp -> exp '+' exp", shape = box, fontcolor=blue, color=blue ]
"exp -> exp '-' exp" [label="12: exp -> exp '-' exp", shape = box, fontcolor=blue, color=blue ]
"exp -> exp '*' exp" [label="13: exp -> exp '*' exp", shape = box, fontcolor=blue, color=blue ]
"exp -> exp '/' exp" [label="14: exp -> exp '/' exp", shape = box, fontcolor=blue, color=blue ]
"exp -> '-' exp" [label="15: exp -> '-' exp", shape = box, fontcolor=blue, color=blue ]
"exp -> exp '^' exp" [label="16: exp -> exp '^' exp", shape = box, fontcolor=blue, color=blue ]
"exp -> '(' exp ')'" [label="17: exp -> '(' exp ')'", shape = box, fontcolor=blue, color=blue ]
13 [shape = diamond, fontcolor=red, color=red]
23 [shape = diamond, fontcolor=red, color=red]
24 [shape = diamond, fontcolor=red, color=red]
25 [shape = diamond, fontcolor=red, color=red]
26 [shape = diamond, fontcolor=red, color=red]
27 [shape = diamond, fontcolor=red, color=red]
29 [shape = diamond, fontcolor=red, color=red]
0 -> 2 [label = "input", arrowhead = odot, color = "red", fontcolor = "red"]
0 -> 1 [label = "STAR-1", arrowhead = odot, color = "red", fontcolor = "red"]
0 -> 3 [label = "start", arrowhead = odot, color = "red", fontcolor = "red"]
0 -> "STAR-1 -> /* empty */" [label = "$default", arrowhead=dot, color = "blue", fontcolor = "blue"]
1 -> 7 [label = "'('"]
1 -> 4 [label = "'-'"]
1 -> 9 [label = "'\\n'"]
1 -> 5 [label = "NUM"]
1 -> 8 [label = "VAR"]
1 -> 10 [label = "error"]
1 -> 6 [label = "exp", arrowhead = odot, color = "red", fontcolor = "red"]
1 -> 11 [label = "line", arrowhead = odot, color = "red", fontcolor = "red"]
1 -> "input -> STAR-1" [label = "$end", arrowhead=dot, color = "blue", fontcolor = "blue"]
2 -> "start -> input" [label = "$default", arrowhead=dot, color = "blue", fontcolor = "blue"]
3 -> 12 [label = "$end"]
4 -> 7 [label = "'('"]
4 -> 4 [label = "'-'"]
4 -> 5 [label = "NUM"]
4 -> 8 [label = "VAR"]
4 -> 13 [label = "exp", arrowhead = odot, color = "red", fontcolor = "red"]
5 -> "exp -> NUM" [label = "$default", arrowhead=dot, color = "blue", fontcolor = "blue"]
6 -> 16 [label = "'*'"]
6 -> 17 [label = "'+'"]
6 -> 14 [label = "'-'"]
6 -> 19 [label = "'/'"]
6 -> 18 [label = "'\\n'"]
6 -> 15 [label = "'^'"]
7 -> 7 [label = "'('"]
7 -> 4 [label = "'-'"]
7 -> 5 [label = "NUM"]
7 -> 8 [label = "VAR"]
7 -> 20 [label = "exp", arrowhead = odot, color = "red", fontcolor = "red"]
8 -> 21 [label = "'='"]
8 -> "exp -> VAR" [label = "')'", arrowhead=dot, color = "blue", fontcolor = "blue"]
8 -> "exp -> VAR" [label = "'*'", arrowhead=dot, color = "blue", fontcolor = "blue"]
8 -> "exp -> VAR" [label = "'+'", arrowhead=dot, color = "blue", fontcolor = "blue"]
8 -> "exp -> VAR" [label = "'-'", arrowhead=dot, color = "blue", fontcolor = "blue"]
8 -> "exp -> VAR" [label = "'/'", arrowhead=dot, color = "blue", fontcolor = "blue"]
8 -> "exp -> VAR" [label = "'\n'", arrowhead=dot, color = "blue", fontcolor = "blue"]
8 -> "exp -> VAR" [label = "'^'", arrowhead=dot, color = "blue", fontcolor = "blue"]
9 -> "line -> '\\n'" [label = "$default", arrowhead=dot, color = "blue", fontcolor = "blue"]
10 -> 22 [label = "'\\n'"]
11 -> "STAR-1 -> STAR-1 line" [label = "$default", arrowhead=dot, color = "blue", fontcolor = "blue"]
12 [shape = doublecircle]
12 -> "$start -> start $end" [arrowhead = dot, color = blue]
13 -> 16 [label = "'*'"]
13 -> 17 [label = "'+'"]
13 -> 14 [label = "'-'"]
13 -> 19 [label = "'/'"]
13 -> 15 [label = "'^'"]
13 -> "exp -> '-' exp" [label = "')'", arrowhead=dot, color = "blue", fontcolor = "blue"]
13 -> "exp -> '-' exp" [label = "'\n'", arrowhead=dot, color = "blue", fontcolor = "blue"]
13 -> "exp -> '-' exp" [label = "'*'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
13 -> "exp -> '-' exp" [label = "'+'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
13 -> "exp -> '-' exp" [label = "'-'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
13 -> "exp -> '-' exp" [label = "'/'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
13 -> "exp -> '-' exp" [label = "'^'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
14 -> 7 [label = "'('"]
14 -> 4 [label = "'-'"]
14 -> 5 [label = "NUM"]
14 -> 8 [label = "VAR"]
14 -> 23 [label = "exp", arrowhead = odot, color = "red", fontcolor = "red"]
15 -> 7 [label = "'('"]
15 -> 4 [label = "'-'"]
15 -> 5 [label = "NUM"]
15 -> 8 [label = "VAR"]
15 -> 24 [label = "exp", arrowhead = odot, color = "red", fontcolor = "red"]
16 -> 7 [label = "'('"]
16 -> 4 [label = "'-'"]
16 -> 5 [label = "NUM"]
16 -> 8 [label = "VAR"]
16 -> 25 [label = "exp", arrowhead = odot, color = "red", fontcolor = "red"]
17 -> 7 [label = "'('"]
17 -> 4 [label = "'-'"]
17 -> 5 [label = "NUM"]
17 -> 8 [label = "VAR"]
17 -> 26 [label = "exp", arrowhead = odot, color = "red", fontcolor = "red"]
18 -> "line -> exp '\\n'" [label = "$default", arrowhead=dot, color = "blue", fontcolor = "blue"]
19 -> 7 [label = "'('"]
19 -> 4 [label = "'-'"]
19 -> 5 [label = "NUM"]
19 -> 8 [label = "VAR"]
19 -> 27 [label = "exp", arrowhead = odot, color = "red", fontcolor = "red"]
20 -> 28 [label = "')'"]
20 -> 16 [label = "'*'"]
20 -> 17 [label = "'+'"]
20 -> 14 [label = "'-'"]
20 -> 19 [label = "'/'"]
20 -> 15 [label = "'^'"]
21 -> 7 [label = "'('"]
21 -> 4 [label = "'-'"]
21 -> 5 [label = "NUM"]
21 -> 8 [label = "VAR"]
21 -> 29 [label = "exp", arrowhead = odot, color = "red", fontcolor = "red"]
22 -> "line -> error '\\n'" [label = "$default", arrowhead=dot, color = "blue", fontcolor = "blue"]
23 -> 16 [label = "'*'"]
23 -> 17 [label = "'+'"]
23 -> 14 [label = "'-'"]
23 -> 19 [label = "'/'"]
23 -> 15 [label = "'^'"]
23 -> "exp -> exp '-' exp" [label = "')'", arrowhead=dot, color = "blue", fontcolor = "blue"]
23 -> "exp -> exp '-' exp" [label = "'\n'", arrowhead=dot, color = "blue", fontcolor = "blue"]
23 -> "exp -> exp '-' exp" [label = "'*'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
23 -> "exp -> exp '-' exp" [label = "'+'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
23 -> "exp -> exp '-' exp" [label = "'-'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
23 -> "exp -> exp '-' exp" [label = "'/'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
23 -> "exp -> exp '-' exp" [label = "'^'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
24 -> 16 [label = "'*'"]
24 -> 17 [label = "'+'"]
24 -> 14 [label = "'-'"]
24 -> 19 [label = "'/'"]
24 -> 15 [label = "'^'"]
24 -> "exp -> exp '^' exp" [label = "')'", arrowhead=dot, color = "blue", fontcolor = "blue"]
24 -> "exp -> exp '^' exp" [label = "'\n'", arrowhead=dot, color = "blue", fontcolor = "blue"]
24 -> "exp -> exp '^' exp" [label = "'*'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
24 -> "exp -> exp '^' exp" [label = "'+'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
24 -> "exp -> exp '^' exp" [label = "'-'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
24 -> "exp -> exp '^' exp" [label = "'/'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
24 -> "exp -> exp '^' exp" [label = "'^'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
25 -> 16 [label = "'*'"]
25 -> 17 [label = "'+'"]
25 -> 14 [label = "'-'"]
25 -> 19 [label = "'/'"]
25 -> 15 [label = "'^'"]
25 -> "exp -> exp '*' exp" [label = "')'", arrowhead=dot, color = "blue", fontcolor = "blue"]
25 -> "exp -> exp '*' exp" [label = "'\n'", arrowhead=dot, color = "blue", fontcolor = "blue"]
25 -> "exp -> exp '*' exp" [label = "'*'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
25 -> "exp -> exp '*' exp" [label = "'+'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
25 -> "exp -> exp '*' exp" [label = "'-'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
25 -> "exp -> exp '*' exp" [label = "'/'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
25 -> "exp -> exp '*' exp" [label = "'^'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
26 -> 16 [label = "'*'"]
26 -> 17 [label = "'+'"]
26 -> 14 [label = "'-'"]
26 -> 19 [label = "'/'"]
26 -> 15 [label = "'^'"]
26 -> "exp -> exp '+' exp" [label = "')'", arrowhead=dot, color = "blue", fontcolor = "blue"]
26 -> "exp -> exp '+' exp" [label = "'\n'", arrowhead=dot, color = "blue", fontcolor = "blue"]
26 -> "exp -> exp '+' exp" [label = "'*'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
26 -> "exp -> exp '+' exp" [label = "'+'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
26 -> "exp -> exp '+' exp" [label = "'-'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
26 -> "exp -> exp '+' exp" [label = "'/'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
26 -> "exp -> exp '+' exp" [label = "'^'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
27 -> 16 [label = "'*'"]
27 -> 17 [label = "'+'"]
27 -> 14 [label = "'-'"]
27 -> 19 [label = "'/'"]
27 -> 15 [label = "'^'"]
27 -> "exp -> exp '/' exp" [label = "')'", arrowhead=dot, color = "blue", fontcolor = "blue"]
27 -> "exp -> exp '/' exp" [label = "'\n'", arrowhead=dot, color = "blue", fontcolor = "blue"]
27 -> "exp -> exp '/' exp" [label = "'*'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
27 -> "exp -> exp '/' exp" [label = "'+'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
27 -> "exp -> exp '/' exp" [label = "'-'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
27 -> "exp -> exp '/' exp" [label = "'/'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
27 -> "exp -> exp '/' exp" [label = "'^'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
28 -> "exp -> '(' exp ')'" [label = "$default", arrowhead=dot, color = "blue", fontcolor = "blue"]
29 -> 16 [label = "'*'"]
29 -> 17 [label = "'+'"]
29 -> 14 [label = "'-'"]
29 -> 19 [label = "'/'"]
29 -> 15 [label = "'^'"]
29 -> "exp -> VAR '=' exp" [label = "')'", arrowhead=dot, color = "blue", fontcolor = "blue"]
29 -> "exp -> VAR '=' exp" [label = "'\n'", arrowhead=dot, color = "blue", fontcolor = "blue"]
29 -> "exp -> VAR '=' exp" [label = "'*'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
29 -> "exp -> VAR '=' exp" [label = "'+'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
29 -> "exp -> VAR '=' exp" [label = "'-'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
29 -> "exp -> VAR '=' exp" [label = "'/'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
29 -> "exp -> VAR '=' exp" [label = "'^'", arrowhead=dot, style=dotted, color = "red", fontcolor = "red"]
}