Christopher Browne <cbbro...@gmail.com> writes: > An especially cool idea if we could automatically dig input directly from > src/backend/parser/gram.y
FWIW, I think the odds of getting desirable diagrams that way are nil. There are *way* too many things about our Bison grammar that can be described charitably as implementation details, or uncharitably as ugly hacks. It may or may not be useful to present the grammar as railroad diagrams or the like; but I think we need to expect that that'd be an abstraction of the syntax, not something that can be automatically reverse-engineered from the implementation. It might be more useful to try to generate pretty pictures from the SGML^H^H^H^HXML docs' <synopsis> sections. regards, tom lane