2011-08-25 12:13:39 +00:00
|
|
|
CodePage -> CodeBlock | DocBlock | CodePage
|
2011-08-23 21:26:02 +00:00
|
|
|
|
2011-08-25 12:13:39 +00:00
|
|
|
// lookahead 2 needed here
|
|
|
|
DocBlock -> DirectiveBlock | MarkdownBlock | DocBlock
|
2011-08-23 21:26:02 +00:00
|
|
|
|
2011-08-25 12:13:39 +00:00
|
|
|
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 -> ~"@"
|