9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Pietro Gagliardi <pietro10@mac.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] dag pic preprocessor
Date: Mon, 19 May 2008 16:45:36 -0400	[thread overview]
Message-ID: <DADCA2DA-173B-4E2B-ADD0-5F123139860A@mac.com> (raw)
In-Reply-To: <cf4af653e1e33047d61c983882d11401@quintile.net>

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.

north@research.att.com

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	other threads:[~2008-05-19 20:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-19 14:08 Steve Simon
2008-05-19 20:45 ` Pietro Gagliardi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DADCA2DA-173B-4E2B-ADD0-5F123139860A@mac.com \
    --to=pietro10@mac.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).