26 lines
684 B
ReStructuredText
26 lines
684 B
ReStructuredText
CodePage -> CodeBlock | DocBlock | CodePage
|
|
|
|
// lookahead 2 needed here
|
|
DocBlock -> DirectiveBlock | MarkdownBlock | DocBlock
|
|
|
|
DirectiveBlock ->
|
|
<DOC_START> <DIRECTIVE_START> "author" RemainingLine EOL MarkdownBlock? |
|
|
<DOC_START> <DIRECTIVE_START> "doc" RemainingLine EOL MarkdownBlock? |
|
|
<DOC_START> <DIRECTIVE_START> "example" RemainingLine EOL MarkdownBlock? |
|
|
<DOC_START> <DIRECTIVE_START> "org" OrgString EOL
|
|
|
|
MarkdownBlock -> MarkdownLine+
|
|
|
|
MarkdownLine ->
|
|
<DOC_START> NOT_DIRECTIVE_START RemainingLine <EOL>
|
|
|
|
RemainingLine -> NOT_EOL*
|
|
Tokens
|
|
------
|
|
|
|
DOC_START -> "%%"
|
|
EOL -> "\n"
|
|
NOT_EOL -> ~"\n"
|
|
DIRECTIVE_START -> "@"
|
|
NOT_DIRECTIVE_START -> ~"@"
|