Re: Grammar railroad diagram

2021-07-09 Thread Domingo Alvarez Duarte
kens from postgresql-13.3/src/include/parser/kwlist.h ABORT_P ::= "abort" ABSOLUTE_P ::= "absolute" ACCESS ::= "access" ACTION ::= "action" ... Cheers ! On 9/7/21 4:36, Andres Freund wrote: Hi, On 2021-07-03 10:39:02 +0200, Domingo Alvarez Duarte wro

Re: Grammar railroad diagram

2021-07-09 Thread Domingo Alvarez Duarte
/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 ex

Re: PostgreSQL-13.3 parser.y with positional references by named references

2021-07-07 Thread Domingo Alvarez Duarte
I understand the concerns but I would not qualify it as "minor developer-convenience feature". I'm not impartial because the initial suggestion was mine, just to add more options to be considered: What if the generated parser/lexer be present in the tarball distributions ? Cheers ! On 7/7/2

Re: Grammar railroad diagram

2021-07-06 Thread Domingo Alvarez Duarte
:51, Bruce Momjian wrote: On Sat, Jul 3, 2021 at 10:39:02AM +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 to generate railroad diagrams see bellow the converted 'postgresql-13.

PostgreSQL-13.3 parser.y with positional references by named references

2021-07-04 Thread Domingo Alvarez Duarte
Here https://gist.github.com/mingodad/49291e0e9505522c66fcd3fcea4a939d I posted the postgresql-13.3/src/backend/parser/gram.y with positional references by named references that is supported by bison for some time now. It was done with a custom script and some comments are missing, if there is