jlp/doc/grammar.rst

58 lines
1.1 KiB
ReStructuredText
Raw Normal View History

SourceFile ->
(Block / DocBlock / CodeBlock)+
2011-08-23 21:26:02 +00:00
Block ->
DocBlock CodeBlock
2011-08-23 21:26:02 +00:00
DocBlock ->
(SDocBlock / MDocBlock)
SDocBlock ->
(SDirective / SDocText)+
2011-08-25 12:13:39 +00:00
MDocBlock ->
MDOC_START (!MDOC_END / MDirective / MDocText)* MDOC_END
CodeBlock ->
(RemainingCodeLine)+
SDirective ->
SDocLineStart AT (SLongDirective / SShortDirective)
2011-08-25 12:13:39 +00:00
MDirective ->
MDocLineStart? AT (MLongDirective / MShortDirective)
SLongDirective ->
("api" / "example") RemainingSDocLine SDocText?
MLongDirective ->
("api" / "example") RemainingMDocLine MDocText?
SShortDirective ->
("author" / "org" / "copyright") RemainingSDocLine
MShortDirective ->
("author" / "org" / "copyright") RemainingMDocLine
SDocText ->
(SDocLineStart !AT RemainingSDocLine)+
MDocText ->
(MDocLineStart? !AT RemainingMDocLine)+
SDocLineStart ->
SPACE* SDOC_START SPACE?
MDocLineStart ->
SPACE* !MDOC_END MDOC_LINE_START SPACE?
RemainingSDocLine ->
((!EOL)* EOL) / ((!EOL)+ EOI)
RemainingMDocLine ->
((!(EOL / MDOC_END))* EOL) / ((!MDOC_END)+)
RemainingCodeLine ->
((!(EOL / MDOC_START / SDocLineStart))* EOL) /
(!(MDOC_START / SDocLineStart))+