X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fmeta.g;h=d11981b5d8890588c9b874536c863f54684870cb;hb=f1321301726919a74918c3f09e58e78f66017644;hp=110964f90f33671d255319d8b195f691c07b2edb;hpb=445e76a3d7bad5831a9d66665c027c83d4504079;p=sbp.git diff --git a/tests/meta.g b/tests/meta.g index 110964f..d11981b 100644 --- a/tests/meta.g +++ b/tests/meta.g @@ -1,9 +1,10 @@ s ::= Grammar ws => "gram" -w !::= " " +w ::= " " | "\n" | "\r" -ws !::= w** | w** "//" (~[\n]*) "\n" !ws -wp !::= w++ +ws ::= w** => () + | w** "//" (~[\n]*) "\n" ws => () +wp ::= w++ Grammar ::= r +/ ws => "grammar" r ::= word ^"::=" alternatives /ws @@ -18,7 +19,7 @@ Conjuncts ::= Sequence ps ::= e*/ws => "ps" | (e+/ws !ws)? "^" Quoted (!ws e+/ws)? => "ps2" psy ::= ps - | ps wp ^"/" !ws e + | ps !wp ^"/" !ws e psx ::= psy => "psy" // | e "<-" psy /ws => "psyl" | psy "->" e /ws => "psyr" @@ -26,7 +27,7 @@ psx ::= psy => "psy" Sequence ::= Quoted => "qprod" > psx => "psx" | psx "=>" ^"[]" /ws - | psx ^"=>" (word|Quoted) /ws + | psx ^"=>" ("()"|word|Quoted) /ws ec ::= ~[\-\]\\] | escaped