Re: Grammar railroad diagram

From: Domingo Alvarez Duarte <mingodad(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Grammar railroad diagram
Date: 2021-07-09 07:56:29
Message-ID: ff6e5dee-79bf-c262-f8c4-88ec99c5479d@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Andres !

There is two ways to achieve it:

-1 I just add the bison grammar in CocoR format here
https://github.com/mingodad/CocoR-CPP in the examples folder.

-2 I created an small extension to Bison to do the same and published
the patch here
https://github.com/mingodad/bison/commit/da84329ebe5f4bc111ef34b2d46088b655a217f3
(bison -e yourgramar.y)

And optionally to have the best railroad diagram we need to add the
"Tokens" manually.

Cheers !

On 9/7/21 4:36, Andres Freund wrote:
> Hi,
>
> On 2021-07-03 10:39:02 +0200, Domingo Alvarez Duarte wrote:
>> I've done a experimental tool to convert bison grammars to a kind of EBNF
>> understood by https://www.bottlecaps.de/rr/ui
> It'd be nice if you could share that tool. The diagrams this can generate
> are neat...
>
> Greetings,
>
> Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2021-07-09 08:30:24 Re: [PoC] Improve dead tuple storage for lazy vacuum
Previous Message Kyotaro Horiguchi 2021-07-09 07:50:28 Re: Incorrect usage of strtol, atoi for non-numeric junk inputs