Documentation: List of DOCUMENT
grammar elements does not specify where REQ_PREFIX
belongs
#1670
Labels
Milestone
The StrictDoc grammar is positional. While that is kind of limiting, it's generally okay because the documentation makes it clear what elements go in which order.
But that's not the case for
REQ_PREFIX
, as I found out when I tried using it at theDOCUMENT
level.In the list of
DOCUMENT
grammar elements,REQ_PREFIX
is not listed. So it's unclear where it goes in the order.strictdoc/docs/strictdoc_01_user_guide.sdoc
Lines 503 to 530 in 590aaf1
In the only 2 mentions of
REQ_PREFIX
in the documentation, it is shown as ordered immediately after theTITLE
element of both theDOCUMENT
section andSECTION
... section.strictdoc/docs/strictdoc_01_user_guide.sdoc
Lines 1908 to 1920 in 590aaf1
So I placed it after
TITLE
forSECTION
headings, and it worked. But I got an error when I put it afterTITLE
for theDOCUMENT
heading. Thegrammar.py
file shows that forDOCUMENT
headings, it belongs betweenCLASSIFICATION
andROOT
.strictdoc/strictdoc/backend/sdoc/grammar/grammar.py
Lines 152 to 158 in 590aaf1
Sure enough, that solved my problem.
Please update the documentation to match the grammar definition for usability purposes... or don't be quite so strict with element placement and order. (I know, unlikely, but it IS an acceptable resolution to my issue 😄 )
The text was updated successfully, but these errors were encountered: