Finished basic grammar outline.

This commit is contained in:
Jonathan Bernard 2011-08-25 07:13:39 -05:00
parent 43c5c15ed7
commit 48eee1ca43
2 changed files with 28 additions and 8 deletions

View File

@ -3,4 +3,8 @@ Jonathan's Literate Programming
This project grew out of a desire for a documentation system that: This project grew out of a desire for a documentation system that:
* * generates all documentation from source-code comments,
* is capable of facilitating both JavaDoc-style API documentation as well as
literate programming style of documentation,
* has pluggable formatting (default to Markdown),

View File

@ -1,9 +1,25 @@
DocBlock -> Directive | MarkdownBlock CodePage -> CodeBlock | DocBlock | CodePage
Directive -> // lookahead 2 needed here
"@author" MarkdownBlock | DocBlock -> DirectiveBlock | MarkdownBlock | DocBlock
"@doc" MarkdownBlock |
"@example" MarkdownBlock |
"@org" LiteralString
MarkdownBlock -> 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 -> ~"@"