X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Ftibdoc.g;h=a2f5cacac3fad3e838888e932aad54ee3c5fd85b;hp=1df3fb80ee6e86e142fe9fb181b3bc49c5f24aa8;hb=f7f669e438822dd46922e3d3b1c880fdec998a9b;hpb=92632cd2b60dc20e157128696edc81e3a07eaec6 diff --git a/tests/tibdoc.g b/tests/tibdoc.g index 1df3fb8..a2f5cac 100644 --- a/tests/tibdoc.g +++ b/tests/tibdoc.g @@ -37,27 +37,30 @@ kv ::= word "=" text /ws => kv1 wp !::= w++ num !::= [0-9]++ Paragraph ::= { "\"\"" ws text } => "blockquote" - > uli+/ws => "ul" - > { "# " text } => "ol" - > { num " " ws text } => "ol" > { "---" "-"* } => "hr" > { text } => "p" -uli ::= { "* " text } => "li" + +onums !::= nums (". "|") ") +any !::= ~[]* + +uli ::= "* " (ws text &~ any (oli|uli)) => "li" +oli ::= ("# "|onums) (ws text &~ any (oli|uli)) => "li" text ::= Item => text Itemx ::= ws Item | () Item ::= blockquote - > pre Itemx => [] - > structured Itemx => [] - > structuredx Itemx => [] - > styled Itemx => [] - > qtext Itemx => [] - > (alphanum++ => stringify) Itemx => [] - > symbol Itemx => [] - > (sym++ => stringify) Itemx => [] - > Paragraph => "" - > Paragraph Itemx => [] + > { uli+/ws => "ul" } Itemx => [] + | { oli+/ws => "ol" } Itemx => [] + > pre Itemx => [] + > structured Itemx => [] + > structuredx Itemx => [] + > styled Itemx => [] + > qtext Itemx => [] + > (alphanum++ => stringify) Itemx => [] + > symbol Itemx => [] + > (sym++ => stringify) Itemx => [] + > Paragraph Itemx => [] blockquote ::= "\"\"" text "\"\"" => "blockquote" | "\"\"" block => "blockquote"