X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Ftibdoc.g;fp=tests%2Ftibdoc.g;h=4dc497ffd09ae6856335440df78f5d83a76b522a;hp=88ee6f8fd170e661f4f7adf723aa524ba7454e89;hb=3c03a0a1131b46a23ccfdeab2cb4fbd59ee05b7a;hpb=eec21f64634c3a76436a263254fc890b56b5b34d diff --git a/tests/tibdoc.g b/tests/tibdoc.g index 88ee6f8..4dc497f 100644 --- a/tests/tibdoc.g +++ b/tests/tibdoc.g @@ -59,7 +59,7 @@ s = Doc Doc = head:{Header} body:Body /ws Header = "header" attrs:{ KeyVal */ ws } /ws Body = {Section}*/ws -Section = SectionHeader Paragraphs /ws +Section = SectionHeader Paragraph* /ws SectionHeader = "==" SectionHeaderBody "==" SectionHeaderBody = "=" SectionHeaderBody "=" > !ws alphanum++ !ws @@ -70,10 +70,10 @@ blank = !sp "\n" !sp "\n" !ws KeyVal = key:word "=" val:text /ws wp = w++ num = [0-9]++ -Paragraphs = "[]":: { Blockquote:: "\"\" " text } Paragraphs - > "[]":: { HR:: "---" "-"* } Paragraphs - > "[]":: { P:: text } Paragraphs - > () + +Paragraph = Blockquote:: { "\"\" " text } + > HR:: { "---" "-"* } + > P:: { text } onums = nums !(". "|") ") any = ~[]* @@ -84,7 +84,7 @@ oli = !("# "|onums) (!ws text &~ any !(oli|uli)) text = Item Itemx = !ws Item | () -Item = blockquote +Item = "[]":: blockquote Itemx > "[]":: { UL:: uli+/ws } Itemx | "[]":: { OL:: oli+/ws } Itemx > "[]":: pre Itemx @@ -96,8 +96,7 @@ Item = blockquote > "[]":: (Symbol:: sym++) Itemx > "[]":: { Block:: text } Itemx -blockquote = Blockquote:: "\"\"" text "\"\"" - | Blockquote:: "\"\"" block +blockquote = Blockquote:: "\"\"" (block | text "\"\"") pre = Verbatim:: "[verbatim]" { ~[]+ } /ws // FIXME doesn't work