checkpoint
[sbp.git] / tests / tibdoc.g
index f93c5dd..a1414d0 100644 (file)
@@ -57,7 +57,7 @@ nw         = ~[\r\n\ ]
 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 "=="
@@ -87,7 +87,7 @@ Item*/ws     =
                blockquote
              > { UL:: uli+/ws }           
              | { OL:: oli+/ws }           
-             > pre                        
+             > Verbatim
              > link                       
              > structured                 
              > styled                     
@@ -101,7 +101,7 @@ word = Chars:: bareword
 blockquote = "adsfafewag"
 //blockquote   = Blockquote:: "\"\"" (block | text "\"\"")
              
-pre          = Verbatim:: "[verbatim]" { ~[]+ } /ws   // FIXME doesn't work
+Verbatim     = "[verbatim]" ws! { (~[])++ }
 
 styled       = Underline::     "__" text "__"      
              | Footnote::      "((" text "))"      
@@ -117,18 +117,22 @@ styled       = Underline::     "__" 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 //////////////////////////////////////////////////////////////////////////////