Skip site navigation (1) Skip section navigation (2)

Re: Railroad diagrams, a-la sqlite

From: Hannu Krosing <hannu(at)krosing(dot)net>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Steve Atkins <steve(at)blighty(dot)com>, pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: Railroad diagrams, a-la sqlite
Date: 2010-07-17 07:02:42
Message-ID: 1279350162.16803.3.camel@hvost (view raw, whole thread or download thread mbox)
Lists: pgsql-docs
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? , 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:

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.

> -- 
>    Heikki Linnakangas
>    EnterpriseDB

In response to


pgsql-docs by date

Next:From: Hannu KrosingDate: 2010-07-17 07:12:31
Subject: Re: Railroad diagrams, a-la sqlite
Previous:From: Heikki LinnakangasDate: 2010-07-17 05:30:06
Subject: Re: Railroad diagrams, a-la sqlite

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group