4. Automatic generation#
4.1. Automatic generation of paragraph syntax#
The Syntax paragraph of the commands in u4/u7 documents is generated automatically from the order catalog.
When new keywords are added, simply generate the new paragraph
and replace the previous one, in general, in file Syntaxe.rst
.
To do this, the developer only needs to have built a development version with the modified command catalog and to launch the vocabulary test case 01c by setting the environment variable CMD:
Make Vocab01C CMD = FIN
# or
. /Waf test -n vocabulary 01c CMD = FIN
This run produces file vocab01c.mpi.release.output
in a
temporary directory (the full name is displayed in the terminal).
In the middle of this file, we find the lines to be copied between the lines of
+++++
.
Save these lines (without +++++
) in file Syntaxe.rst
.
- note
Excerpts of the global syntax are found in some documents.
Before adding such an extract, you have to ask yourself if it contributes anything. compared to clicking on Syntax in the left menu. For simple keywords, there is no need to recall the syntax of the keyword.
Example:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Syntax
=====
.. code-block:: text
FIN (
◇ RETASSAGE =/"OUI ",
/"NON" (by default),
◇ INFO_RESU =/"OUI ",
/"NON" (by default),
◇ PROC0 =/"OUI ",
/"NON ",
)
◆: mandatory
◇: optional
: present by default
&: together
/: only one among
|: several possible choices
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++