X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Fmeta.g;h=807f15f080c93a0453c3a452db883844f3ec69ae;hp=a9507ffc6b383a9f09c3ff0265fbb651c7260d9c;hb=5964a1161340a16d7dea471372737f2474576ceb;hpb=dd3c0147cea9d569a9e81b19c9b05c08c792d9c0 diff --git a/tests/meta.g b/tests/meta.g index a9507ff..807f15f 100644 --- a/tests/meta.g +++ b/tests/meta.g @@ -9,14 +9,12 @@ Conjuncts ::= Sequence | Sequence ^"&~" Elements /ws Elements ::= e*/ws -psy ::= Elements => "ps" - | psy !wp ^"/" !ws e - | psy ^"->" e /ws -psx ::= psy => "psy" -Sequence ::= Quoted => "qprod" - > psx => "psx" - | psx "=>" ^"[]" /ws - | psx ^"=>" ("()"|word|Quoted) /ws +PreSequence ::= Elements => "ps" + | PreSequence !wp ^"/" !ws e + | PreSequence ^"->" e /ws + | (Quoted|word) ^"::" PreSequence /ws + | PreSequence ^"=>" ("[]"|"()"|word|Quoted) /ws +Sequence ::= PreSequence => "psx" ec ::= ~[\-\]\\] | escaped @@ -24,12 +22,13 @@ ec ::= ~[\-\]\\] Range ::= ec => "range" | ec ^"-" ec -e ::= word => "nonTerminal" +e ::= + (Quoted|word) ^":" e + > word => "nonTerminal" | Quoted => "literal" | ^"()" | ^"{" Sequence "}" /ws | ^"[" Range* "]" - | e ^"++" /ws -> ~[/] | e ^"+" /ws -> ~[+] | e ^"++/" e /ws @@ -40,7 +39,7 @@ e ::= word => "nonTerminal" | e ^"*/" e /ws | ^"!" e /ws | e ^"?" /ws - | "^" Quoted /ws => caret + | ^"^" Quoted /ws | "(" word ^")" /ws > ^"(" RHS ")" /ws