X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Fmeta.g;h=807f15f080c93a0453c3a452db883844f3ec69ae;hp=3227dca94baf0b6eec65ca42c68e0f820a3411a2;hb=5964a1161340a16d7dea471372737f2474576ceb;hpb=665d5abdf0269ef5bd4cc4b93bb82b3f74bb0110 diff --git a/tests/meta.g b/tests/meta.g index 3227dca..807f15f 100644 --- a/tests/meta.g +++ b/tests/meta.g @@ -9,13 +9,12 @@ Conjuncts ::= Sequence | Sequence ^"&~" Elements /ws Elements ::= e*/ws -psy ::= Elements (!wp "/" !ws e)? => "ps2" -psx ::= psy => "psy" - | psy ^"->" e /ws -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 @@ -23,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 @@ -39,7 +39,7 @@ e ::= word => "nonTerminal" | e ^"*/" e /ws | ^"!" e /ws | e ^"?" /ws - | "^" Quoted /ws => caret + | ^"^" Quoted /ws | "(" word ^")" /ws > ^"(" RHS ")" /ws