diagen.sh (derived from diagram generator) is a simple tool for creating UML-like diagrams of classes (types), and flowcharts. In fact, this is a set of m4 macros expanding into DOT language statements.
diagen.sh needs Graphviz to be installed on your system.
Usage:
./diagen.sh infile.gv.m4 outfile.svg
DIAGRAM
CLASS(Foo)
ATTRIBUTE(bar)
STATIC ATTRIBUTE(baz)
OPERATION(qux())
STATIC OPERATION(quux())
END
END
DIAGRAM
NOTE(Blah blah blah, FooBar)
END
DIAGRAM
INTERFACE(Foo)
ATTRIBUTE(bar)
OPERATION(baz())
END
END
DIAGRAM
ABSTRACT CLASS(Foo)
ATTRIBUTE(bar)
ABSTRACT ATTRIBUTE(baz)
END
END
DIAGRAM
ENUMERATION(Foo)
LITERAL(bar)
LITERAL(baz)
LITERAL(qux)
END
END
DIAGRAM
PACKAGE(foobar)
Foo
Bar
END
END
DIAGRAM
MODULE(foo)
OPERATION(bar())
OPERATION(baz())
END
NESTINGS
{Qux Quux} -> foo
END
END
DIAGRAM
COMPONENT(foo)
COLLABORATION(bar)
USECASE(baz)
NODE(qux)
ARTIFACT(quux)
END
DIAGRAM
ASSOCIATIONS
Foo1 -> Bar1
END
BIDIRECTIONAL ASSOCIATIONS
Foo2 -> Bar2
END
GENERALIZATIONS
Foo3 -> Bar3
END
DEPENDENCIES
Foo4 -> Bar4
END
AGGREGATIONS
Foo5 -> Bar5
END
COMPOSITIONS
Foo6 -> Bar6
END
IMPLEMENTATIONS
Foo7 -> Bar7
END
END
BEHAVIOR DIAGRAM
INITIAL_NODE(in)
FINAL_NODE(fn)
DECISION(foo)
MERGE(m)
in -> foo
TRANSITION(foo -> bar, true)
TRANSITION(foo -> baz, false)
{bar baz} -> m -> fn
END
BEHAVIOR DIAGRAM
INITIAL_NODE(in)
FINAL_NODE(fn)
FORK(f)
JOIN(j)
in -> f -> {foo bar} -> j -> fn
END
BEHAVIOR DIAGRAM
INITIAL_NODE(in)
FINAL_NODE(fn)
SUPERACTION(barbaz)
bar -> baz
END
in -> foo -> bar
baz -> qux -> fn
END