X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=tests%2Fmeta.g;h=e7f3524397dc615bd5b252fc60b08f836879e076;hb=d824fe4034e79260f1f065d1040a39571897cd95;hp=5dafc7d42224140d1ce4c37eb70a2b79e360d0a0;hpb=8991d0265d2d0ded4b7a680fcc2a6794c95d9f01;p=sbp.git diff --git a/tests/meta.g b/tests/meta.g index 5dafc7d..e7f3524 100644 --- a/tests/meta.g +++ b/tests/meta.g @@ -1,4 +1,4 @@ -s ::= Grammar ws => "gram" +s ::= !ws Grammar ws => "gram" Grammar ::= NonTerminal +/ ws => "grammar" NonTerminal ::= word ^"::=" RHS /ws @@ -9,16 +9,12 @@ Conjuncts ::= Sequence | Sequence ^"&~" Elements /ws Elements ::= e*/ws -ps ::= Elements => "ps" - | (e+/ws !ws)? ^"^" Quoted (!ws e+/ws)? -psy ::= ps - | ps !wp ^"/" !ws e -psx ::= psy => "psy" - | psy ^"->" e /ws +psy ::= Elements => "ps" + | psy !wp ^"/" !ws e + | psy ^"->" e /ws + | psy "=>" ("[]"|"()"|word|Quoted) /ws => goo Sequence ::= Quoted => "qprod" - > psx => "psx" - | psx "=>" ^"[]" /ws - | psx ^"=>" ("()"|word|Quoted) /ws + > psy => "psx" ec ::= ~[\-\]\\] | escaped @@ -42,6 +38,7 @@ e ::= word => "nonTerminal" | e ^"*/" e /ws | ^"!" e /ws | e ^"?" /ws + | ^"^" Quoted /ws | "(" word ^")" /ws > ^"(" RHS ")" /ws