Skip to content
Snippets Groups Projects
Unverified Commit a38c3e6e authored by Kevin Lyda's avatar Kevin Lyda
Browse files

First try at a graphviz graph.

parent b5cbab32
Branches attempt-1
No related tags found
No related merge requests found
Pipeline #6168 failed
......@@ -5,3 +5,4 @@
*.exe
*.obj
*.lzh
.*.swp
generate-call-graph.dot
......@@ -4,31 +4,31 @@ grep -E '^[^C].*(CALL|SUBROUTINE)' bulletin*.for \
| sed 's/ *! .*//;s/:.*\(CALL\|SUBROUTINE\) / \1 /;s/(.*//' \
| awk '
BEGIN {
e="flowchart LR"
e="graph {"
}
{
if ($1 != f) {
print e;
sg=$1; gsub(".for", "", sg);
print " subgraph " sg;
print " direction LR";
e=" end";
print " subgraph " sg " {";
e=" }";
}
}
$2 == "SUBROUTINE" {
f=$1; s=$3;
print " " s "(" s ")";
print " " s;
}
$2 == "CALL" {
if ($1 != f) {
f=$1; s="main";
print " " s "(" s ")";
print " " s;
}
print " " s " --> " $3;
print " " s " -> " $3;
}
END {
print e;
print "}";
}
' \
| sed 's/\$/__/g'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment