jlp/doc/grammar.rst

28 lines
545 B
ReStructuredText
Raw Normal View History

CodePage -> DocBlock / CodeBlock
2011-08-23 21:26:02 +00:00
DocBlock -> DirectiveBlock / MarkdownBlock
2011-08-23 21:26:02 +00:00
Code Block -> !DOC_START RemainingLine
DirectiveBlock -> DOC_START DIRECTIVE_START (LongDirective / LineDirective)
2011-08-25 12:13:39 +00:00
MarkdownBlock -> MarkdownLine+
LongDirective ->
(AUTHOR_DIR / DOC_DIR / EXAMPLE_DIR) RemainingLine MarkdownBlock?
LineDirective -> ORG_DIR RemainingLine
2011-08-25 12:13:39 +00:00
MarkdownLine -> DOC_START !DIRECTIVE_START RemainingLine
RemainingLine -> (!EOL)+, EOL
2011-08-25 12:13:39 +00:00
Tokens
------
DOC_START -> "%% "
EOL -> "\n"
DIRECTIVE_START -> "@"