doc: Generate keywords table automatically

Enterprise / PostgreSQL - Peter Eisentraut [eisentraut.org] - 7 May 2019 13:29 EDT

The SQL keywords table in the documentation had until now been generated by some ad hoc scripting outside the source tree once for each major release. This changes it to an automated process.

We have the PostgreSQL keywords available in a parseable format in parser/kwlist.h. For the relevant SQL standard versions, keep the keyword lists in new text files. A new script generate-keywords-table.pl pulls it all together and produces a DocBook table.

The final output in the documentation should be identical after this change.

Discussion: https://www.postgresql.org/message-id/flat/07daeadd-8c82-0d95-5e19-e350502cb749%402ndquadrant.com

b753bc0c84 doc: Generate keywords table automatically
doc/src/sgml/.gitignore | 1 +
doc/src/sgml/Makefile | 6 +-
doc/src/sgml/filelist.sgml | 1 +
doc/src/sgml/generate-keywords-table.pl | 122 +
doc/src/sgml/keywords.sgml | 5361 +---------------------
doc/src/sgml/keywords/sql1992-nonreserved.txt | 50 +
doc/src/sgml/keywords/sql1992-reserved.txt | 227 +
doc/src/sgml/keywords/sql2008-02-nonreserved.txt | 218 +
doc/src/sgml/keywords/sql2008-02-reserved.txt | 307 ++
doc/src/sgml/keywords/sql2008-09-nonreserved.txt | 23 +
doc/src/sgml/keywords/sql2008-09-reserved.txt | 13 +
doc/src/sgml/keywords/sql2008-14-nonreserved.txt | 29 +
doc/src/sgml/keywords/sql2008-14-reserved.txt | 20 +
doc/src/sgml/keywords/sql2011-02-nonreserved.txt | 219 +
doc/src/sgml/keywords/sql2011-02-reserved.txt | 324 ++
doc/src/sgml/keywords/sql2011-09-nonreserved.txt | 23 +
doc/src/sgml/keywords/sql2011-09-reserved.txt | 13 +
doc/src/sgml/keywords/sql2011-14-nonreserved.txt | 29 +
doc/src/sgml/keywords/sql2011-14-reserved.txt | 20 +
19 files changed, 1645 insertions(+), 5361 deletions(-)

Upstream: git.postgresql.org


  • Share