On May 19, 2008, at 10:08 AM, Steve Simon wrote:

Hi,

I want to draw some DAGs. Dot (part of graphviz) seems to be the
way to do it these days, however looking at the sources I wondered
if there was a smaller simpler way to do this.

I found a reference to dag, a pic preprocessor which seems to
be a forunner of dot. Is the source available anywhere?

http://citeseer.ist.psu.edu/gansner89dag.html

-Steve


I asked about that. Got one response so far, but no code yet.

[EMAIL PROTECTED]

I think you can make a simple dot preprocessor using awk and pipes (GraphViz is in /n/sources/extra):

        BEGIN { in_it = 0 }

        /^\.begin (dot|neato)/ { in_it = 1; program = $2 " -Tpic"; next }
        /^\.end/ { close(program); in_it = 0; next }

        !in_it { print; next }

        { print | program }

        END { if (in_it) print "unclosed graph" | "cat 1>&2" }



Reply via email to