s = Doc
Doc = head:Header ws! body:Body
-Header = { "header" { KeyVal */ ws } /ws }
+Header = { "\\header" { KeyVal */ ws } /ws }
Body = { Section } */ws
Section = SectionHeader ws! Paragraph*
SectionHeader = "==" SectionHeaderBody "=="
blockquote
> { UL:: uli+/ws }
| { OL:: oli+/ws }
- > pre
+ > Verbatim
> link
> structured
> styled
blockquote = "adsfafewag"
//blockquote = Blockquote:: "\"\"" (block | text "\"\"")
-pre = Verbatim:: "[verbatim]" { ~[]+ } /ws // FIXME doesn't work
+Verbatim = "[verbatim]" ws! { (~[])++ }
styled = Underline:: "__" text "__"
| Footnote:: "((" text "))"
block = { text }
-link = LinkText:: text:({ text }) "->" href:(url|email)
- > LinkChars:: text:alphanum++ ws! "->" href:(url|email)
+link = text:({ text }|word) "->" href:(url|email)
structured = command & "\\" ([a-zA-Z0-9]++)! block?
> glyph
> email
> url
-glyph = Euro:: "(e)" | "(r)" | "(c)" | "(tm)" | emdash:: "--" | "..."
+glyph = euro:: "(e)"
+ | r:: "(r)"
+ | c:: "(c)"
+ | tm:: "(tm)"
+ | emdash:: "--"
+ | ellipses:: "..."
+ | cent:: "\\cent"
-command = Today:: "\\today"
- | LineBreak:: "\\br"
+command = "\\" [a-z]++
// URLs //////////////////////////////////////////////////////////////////////////////