X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Ftibdoc.g;h=81061e57f8b7f21be3226c086c538cdec88511c8;hp=2d026e878487351c3874af6c9f90b49a0eb585a3;hb=c366dacc334fe2e35835164f5a37d3eebb2ca6d5;hpb=b409afa0cf6d72a23703d9172812ab4fcd6a969b diff --git a/tests/tibdoc.g b/tests/tibdoc.g index 2d026e8..81061e5 100644 --- a/tests/tibdoc.g +++ b/tests/tibdoc.g @@ -20,38 +20,41 @@ nw ::= ~[\r\n\ ] ////////////////////////////////////////////////////////////////////////////// -s ::= {Doc} => top +s ::= Doc => top -Doc ::= Header Body /ws => doc -Header ::= "header" { kv */ ws } /ws => header +Doc ::= {Header} Body /ws => doc +Header ::= "header" { kv */ ws } /ws => header Body ::= Section*/ws => body -Section ::= SectionHeader Paragraph*/ws /ws => section +Section ::= { SectionHeader Paragraph* /ws => section } SectionHeader ::= "==" SectionHeaderBody "==" SectionHeaderBody ::= "=" SectionHeaderBody "=" > ws text ws +sp !::= " "** +blank ::= sp "\n" sp "\n" ws + kv ::= word "=" text /ws => kv1 num !::= [0-9]++ -Paragraph ::= { "\"\"" ws text } => "blockquote" - > { "*" " " ws text } => "ul" - > { "#" " " ws text } => "ol" - > { num " " ws text } => "ol" - > { "---" "-"* } => "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 => [] +Paragraph ::= { "\"\"" ws text } => "blockquote" + > { "*" " " ws text } => "ul" + > { "#" " " ws text } => "ol" + > { num " " ws text } => "ol" + > { "---" "-"* } => "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 => [] symbol ::= sym++