X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=tests%2Ftibdoc.g;h=81061e57f8b7f21be3226c086c538cdec88511c8;hb=ebb5fe5647046306f415e31e4967b23169c9004e;hp=8b181753b817872e0777bdd3317c43bae9574311;hpb=1554add84875c4a9ea7cce33c70b5459cdab45fa;p=sbp.git diff --git a/tests/tibdoc.g b/tests/tibdoc.g index 8b18175..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 => "t" -itemx ::= ws item => "w" | () -item ::= blockquote => "b" - > pre itemx => "a" - > structured itemx => "1" - > structuredx itemx => "2" - > styled itemx => "3" - > qtext itemx => "4" - > alphanum++ itemx => "5" - > symbol itemx => "6" -// > sym++ itemx => [] - > Paragraph itemx => "7" +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++