Branch: refs/heads/master
Revision: 9bfc06c
Author: dlongnecke-cray
Log Message:
Collect syntax productions in language spec into syntax.rst file (#16697)
Collect syntax productions in language spec into syntax.rst file (#16697)
This PR adds a script to doc/util
that collects all the productions
listed in syntax blocks throughout the RST language spec. The script
outputs the productions in alphabetical and application (breadth-
first, rooted on the start symbol ‘module-declaration-statement’)
order into the file doc/rst/language/spec/syntax.rst
.
This script restores behavior that was removed when the language spec
was converted to RST in #14303.
The script will complain if a production is defined but never applied.
It will also complain if two productions share the same name.
Add the import-statement
production as a nonterminal of the
statement
production, as it was not applied elsewhere.
Rename a few bad non-terminals that did not have corresponding
productions (e.g. ‘expr’ -> ‘expression’).