Graphviz: statements
This commit is contained in:
parent
777522a048
commit
483832e7a4
|
@ -11,7 +11,7 @@ digraph fn_args {
|
|||
newrank=true;
|
||||
|
||||
A [label="for each type"];
|
||||
B [label="gen_type(GazType)" shape=diamond style=filled fillcolor=lightcoral];
|
||||
B [label="get_instant(GazType)" shape=diamond style=filled fillcolor=lightcoral];
|
||||
C [label="pack into var"];
|
||||
D [label="return" style=filled fillcolor=lightskyblue];
|
||||
A -> B -> C -> A;
|
||||
|
|
|
@ -21,6 +21,8 @@ digraph fn_gen_decl {
|
|||
j [label="push to const scope"];
|
||||
k [label="return" style=filled fillcolor=lightskyblue1];
|
||||
|
||||
{rank=same; b c e f g}
|
||||
|
||||
a -> b -> h;
|
||||
a -> c -> h;
|
||||
a -> e -> h;
|
||||
|
|
|
@ -13,7 +13,7 @@ digraph fn_gen_return {
|
|||
b [label="gen_if_statement_with_return()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
c [label="gen_loop_with_return()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
d [label="return"];
|
||||
e [label="gen_type()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
e [label="gen correct type"];
|
||||
f [label="return" style=filled fillcolor=lightskyblue1];
|
||||
|
||||
a -> b -> f;
|
||||
|
|
|
@ -4,7 +4,7 @@ digraph fn_get_instant {
|
|||
node [fontname = "cc wild words"];
|
||||
edge [fontname = "cc wild words"];
|
||||
|
||||
label="fn_gen_boolean()";
|
||||
label="fn_gen_instant(type: GazType)";
|
||||
fontname=lovebeat;
|
||||
rankdir=TB;
|
||||
newrank=true;
|
||||
|
|
31
graphviz/functions/statements/gen_assign.dot
Normal file
31
graphviz/functions/statements/gen_assign.dot
Normal file
|
@ -0,0 +1,31 @@
|
|||
digraph fn_gen_assignment {
|
||||
labelloc="t";
|
||||
graph [fontname = "cc wild words"];
|
||||
node [fontname = "cc wild words"];
|
||||
edge [fontname = "cc wild words"];
|
||||
|
||||
label="fn_gen_assignment(type: GazType)";
|
||||
fontname=lovebeat;
|
||||
rankdir=LR;
|
||||
newrank=true;
|
||||
|
||||
a [label="fork on type"];
|
||||
// read from stdinput
|
||||
b [label="gen_boolean()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
c [label="gen_character()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
d [label="create real"]
|
||||
e [label="gen_integer()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
f [label="gen_real()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
g [label="gen_tuple()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
k [label="return" style=filled fillcolor=lightskyblue1];
|
||||
|
||||
{rank=same; b c e f g}
|
||||
|
||||
a -> b -> k;
|
||||
a -> c -> k;
|
||||
a -> e -> k;
|
||||
a -> g -> k;
|
||||
a -> d;
|
||||
d -> e;
|
||||
d -> f -> k;
|
||||
}
|
32
graphviz/functions/statements/gen_if_statement.dot
Normal file
32
graphviz/functions/statements/gen_if_statement.dot
Normal file
|
@ -0,0 +1,32 @@
|
|||
digraph fn_gen_if_statement {
|
||||
labelloc="t";
|
||||
graph [fontname = "cc wild words"];
|
||||
node [fontname = "cc wild words"];
|
||||
edge [fontname = "cc wild words"];
|
||||
|
||||
label="fn_gen_if_statement(with_return: Option<GazType>)";
|
||||
fontname=lovebeat;
|
||||
rankdir=TB;
|
||||
newrank=true;
|
||||
|
||||
a [label="gen_boolean()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
b [label="push new scope"];
|
||||
c [label="gen_statement(with_return)" shape=diamond style=filled fillcolor=lightcoral];
|
||||
d [label="choice"];
|
||||
e [label="else if"];
|
||||
f [label="gen_if_statement(with_return)" shape=diamond style=filled fillcolor=lightcoral];
|
||||
g [label="else"];
|
||||
h [label="push new scope"];
|
||||
i [label="gen_statement(with_return)" shape=diamond style=filled fillcolor=lightcoral];
|
||||
j [label="return" style=filled fillcolor=lightskyblue1];
|
||||
|
||||
{rank=same; e g}
|
||||
{rank=same; f i}
|
||||
|
||||
a -> b -> c -> d;
|
||||
d -> e -> f -> d;
|
||||
d -> g -> h -> i -> j;
|
||||
d -> j;
|
||||
c -> c [dir=back];
|
||||
i -> i [dir=back];
|
||||
}
|
22
graphviz/functions/statements/gen_loop.dot
Normal file
22
graphviz/functions/statements/gen_loop.dot
Normal file
|
@ -0,0 +1,22 @@
|
|||
digraph fn_gen_loop {
|
||||
labelloc="t";
|
||||
graph [fontname = "cc wild words"];
|
||||
node [fontname = "cc wild words"];
|
||||
edge [fontname = "cc wild words"];
|
||||
|
||||
label="fn_gen_loop(with_return: Option<GazType>)";
|
||||
fontname=lovebeat;
|
||||
rankdir=TB;
|
||||
newrank=true;
|
||||
|
||||
a0 [label="choice"];
|
||||
a1 [label="infinite_loop"];
|
||||
a2 [label="gen_statement(with_break)" shape=diamond style=filled fillcolor=lightcoral];
|
||||
a3 [label="predicate_loop"];
|
||||
a4 [label="todo" style=filled fillcolor=magenta];
|
||||
a5 [label="return" style=filled fillcolor=lightskyblue1];
|
||||
|
||||
a0 -> a1 -> a2 -> a5;
|
||||
a0 -> a3 -> a4;
|
||||
a2 -> a2 [dir=back];
|
||||
}
|
17
graphviz/functions/statements/gen_std_output.dot
Normal file
17
graphviz/functions/statements/gen_std_output.dot
Normal file
|
@ -0,0 +1,17 @@
|
|||
digraph fn_gen_std_output {
|
||||
labelloc="t";
|
||||
graph [fontname = "cc wild words"];
|
||||
node [fontname = "cc wild words"];
|
||||
edge [fontname = "cc wild words"];
|
||||
|
||||
label="fn_gen_std_output(type: GazType)";
|
||||
fontname=lovebeat;
|
||||
rankdir=TB;
|
||||
newrank=true;
|
||||
|
||||
a [label="fork on type"];
|
||||
b [label="get_instant(type)" shape=diamond style=filled fillcolor=lightcoral];
|
||||
c [label="return" style=filled fillcolor=lightskyblue1];
|
||||
|
||||
a -> b -> c;
|
||||
}
|
|
@ -3,22 +3,21 @@ digraph flow {
|
|||
graph [fontname = "cc wild words"];
|
||||
node [fontname = "cc wild words"];
|
||||
edge [fontname = "cc wild words"];
|
||||
rank=TB;
|
||||
rankdir=LR;
|
||||
|
||||
A0 [label="Global" style=filled fillcolor=gold];
|
||||
B0 [label="declare global"];
|
||||
C0 [label="end generation"];
|
||||
D0 [label="for each undefined subroutine"];
|
||||
F0 [label="return" style=filled fillcolor=lightskyblue1];
|
||||
|
||||
node [shape=diamond style=filled fillcolor=lightsalmon];
|
||||
FA0 [label="fn_gen_global_type(GazType)"];
|
||||
FA0 [label="fn_gen_global_decl()"];
|
||||
FB0 [label="fn_gen_main()"];
|
||||
FC0 [label="fn_define_subroutine(SubRoutine)"];
|
||||
FD0 [label="fn_declare_subroutine()"];
|
||||
FE0 [label="fn_gen_typedef()"];
|
||||
|
||||
A0 -> B0 -> FA0 -> A0;
|
||||
A0 -> FA0 -> A0;
|
||||
A0 -> C0 -> FB0 -> D0;
|
||||
A0 -> FD0 -> A0;
|
||||
A0 -> FE0 -> A0;
|
||||
|
|
Loading…
Reference in a new issue