X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Ftibdoc.g;h=adc6e5e1c6d1da37718e6d176675ebed4ad21759;hp=2d026e878487351c3874af6c9f90b49a0eb585a3;hb=08aa6cdd07a882fdedf7a6d5c7bd0d754460965b;hpb=03dd839af8e8d1a6c2f69c5410da6d19fbbe3931 diff --git a/tests/tibdoc.g b/tests/tibdoc.g index 2d026e8..adc6e5e 100644 --- a/tests/tibdoc.g +++ b/tests/tibdoc.g @@ -20,25 +20,28 @@ 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" +Paragraph ::= { "\"\"" ws text } => "blockquote" + > { "*" " " ws text } => "ul" + > { "#" " " ws text } => "ol" + > { num " " ws text } => "ol" + > { "---" "-"* } => "hr" + > { text } => "p" text ::= item itemx ::= ws item | ()