jlp/doc/grammar.rst

30 lines
525 B
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 ->
(Directive / DocText)+
Directive ->
DocLineStart AT (LongDirective / ShortDirective)
2011-08-25 12:13:39 +00:00
LongDirective ->
("author" / "doc" / "example") RemainingLine DocText?
ShortDirective ->
("org" / "copyright") RemainingLine
DocText ->
(DocLineStart !AT RemainingLine)+
2011-08-25 12:13:39 +00:00
DocLineStart ->
Space* DOC_LINE_START Space?
CodeBlock ->
(!DocLineStart RemainingLine)+
RemainingLine ->
((!EOL)* EOL) / ((!EOL)+ EOI)