pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hannu Krosing <hannu@krosing.net>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Steve Atkins <steve@blighty.com>
Cc: pgsql-docs <pgsql-docs@postgresql.org>
Subject: Re: Railroad diagrams, a-la sqlite
Date: Sat, 17 Jul 2010 10:12:31 +0300
Message-ID: <1279350751.16803.7.camel@hvost> (raw)
In-Reply-To: <1279350162.16803.3.camel@hvost>
References: <2AACFC47-C121-4549-B015-AC4FCA9380CE@blighty.com>
	<4C413FDE.4040501@enterprisedb.com>
	<1279350162.16803.3.camel@hvost>

On Sat, 2010-07-17 at 10:02 +0300, Hannu Krosing wrote:
> On Sat, 2010-07-17 at 08:30 +0300, Heikki Linnakangas wrote:
> > On 17/07/10 07:33, Steve Atkins wrote:
> > > Has everyone seen the "railroad diagrams" sqlite use in their docs? http://www.sqlite.org/lang_createindex.html , as one example.
> > >
> > > Would it be nice to have the same sort of format in the postgresql docs? (Yeah, I'm volunteering, if people think they're a useful thing, 'cos I think they'd add a lot to our documentation.)
> > 
> > That would be nice. It would have to be automatically generated from the 
> > syntax descriptions we already have, otherwise it'd be unmaintainable. 
> > Also, the text representation would have to still be there in an alt tag 
> > - I note that the the sqlite docs don't have that.
> > 
> > Any idea how those sqlite images are generated?
> 
> I have used this:
> 
> http://www.informatik.uni-freiburg.de/~thiemann/haskell/ebnf2ps/
> 
> to make railroad diagrams from postgresql lex/yacc sources a few years
> ago, when looking into adding WITH support to pg.
> 
> As it takes extended BNF as input i had to convert pg's lex+yacc into
> eBNF, which IIRC I did using some python scripts + manual tweaking.

Now it's readme says it does support yacc as one of input formats, so it
may be a lot simpler .

> 
> > -- 
> >    Heikki Linnakangas
> >    EnterpriseDB   http://www.enterprisedb.com
> > 
> 
> 





view thread (15+ messages)  latest in thread

Message-ID: <1279350751.16803.7.camel@hvost>
Permalink:  ../1279350751.16803.7.camel@hvost/
Also on:    postgresql.org/message-id/1279350751.16803.7.camel@hvost

 · 

reply

Reply instructions:

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

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: hannu@krosing.net, heikki.linnakangas@enterprisedb.com, steve@blighty.com
  Subject: Re: Railroad diagrams, a-la sqlite
  In-Reply-To: <1279350751.16803.7.camel@hvost>

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

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox