Re: Grammar railroad diagram - Mailing list pgsql-hackers

From Domingo Alvarez Duarte
Subject Re: Grammar railroad diagram
Date
Msg-id ff6e5dee-79bf-c262-f8c4-88ec99c5479d@gmail.com
Whole thread Raw
In response to Re: Grammar railroad diagram  (Andres Freund <andres@anarazel.de>)
List 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



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: Incorrect usage of strtol, atoi for non-numeric junk inputs
Next
From: Masahiko Sawada
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum