checkpoint
[sbp.git] / tests / tibdoc.g
index adc6e5e..e77d53b 100644 (file)
@@ -43,18 +43,18 @@ Paragraph  ::= { "\"\"" ws text  }  => "blockquote"
              > { "---" "-"*      }  => "hr"
              > { text }             => "p"
 
-text       ::= item
-itemx      ::= ws item | ()
-item       ::= blockquote
-             > pre         itemx => []
-             > structured  itemx => []
-             > structuredx itemx => []
-             > styled      itemx => []
-             > qtext       itemx => []
-             > alphanum++  itemx => []
-             > symbol      itemx => []
-//             > sym++       itemx => []
-             > Paragraph   itemx => []
+text       ::= Item
+Itemx      ::= ws Item | ()
+Item       ::= blockquote
+             > pre         Itemx => []
+             > structured  Itemx => []
+             > structuredx Itemx => []
+             > styled      Itemx => []
+             > qtext       Itemx => []
+             > (alphanum++ => stringify) Itemx => []
+             > symbol      Itemx => []
+//             > sym++       Itemx => []
+             > Paragraph   Itemx => []
 
 symbol     ::= sym++
 
@@ -66,8 +66,8 @@ pre        ::= "[verbatim]" { ~[]+ } /ws => "verbatim"   // FIXME doesn't work
 
 styled     ::= "__" text "__"      => ul
              | "((" text "))"      => footnote
-             | ( "[[" text "]]"      => tt
-               >  "[" word "]"       => citation
+             | ( "[[" text "]]"    => tt
+               >  "[" word "]"     => citation
                )
              | "!!" text "!!"      => strikethrough
              | "^^" (word|block)   => superscript
@@ -117,7 +117,7 @@ host       ::= [0-9]+ "." [0-9]+ "." [0-9]+ "." [0-9]+ => "ip"
 
 // Tokens ///////////////////////////////////////////////////////////////////
 
-word     ::= alphanum++
+word     ::= alphanum++ => stringify
            | quoted
 
 quoted   ::= "\"" ((~[\"\\] | escaped)+) "\""