X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Fmeta.g;h=8be950d3eba351373e4c573f237fe796dc764f1d;hp=8a5b7e17f3573d7272e103a720bd40ecaa84aa8e;hb=56319e11eb20cb67c4221b0d7a2567ec3b2df002;hpb=5252cc15c0d998517bf566229cd0c9d04dcff348 diff --git a/tests/meta.g b/tests/meta.g index 8a5b7e1..8be950d 100644 --- a/tests/meta.g +++ b/tests/meta.g @@ -12,12 +12,16 @@ conjuncts ::= sequence | sequence ^"&" e*/ws /ws | sequence ^"&~" e*/ws /ws -ps ::= e*/ws => "ps" - | (e+/ws ws)? "^" quoted (ws e+/ws)? => "ps2" -psx ::= ps - | ps wp ^"/" ws e -sequence ::= psx - | psx ^"=>" (word|quoted) /ws +ps ::= e*/ws => "ps" + | (e+/ws ws)? "^" quoted (ws e+/ws)? => "ps2" +psy ::= ps + | ps wp ^"/" ws e +psx ::= psy ^"?=>" e /ws + | psy ^"!=>" e /ws + > psy +sequence ::= quoted => "qprod" + > psx + | psx ^"=>" (word|quoted) /ws ec ::= [~\-\]\\\~] | escaped @@ -32,10 +36,10 @@ e ::= word => "nonTerminal" | ^"[" range* "]" | ^"[~" range* "]" - | (e ws ^"**" > e ws ^"*") - | e ^"*/" e /ws - | (e ws ^"++" > e ws ^"+") - | e ^"+/" e /ws + | (e ^"++" /ws > e ^"+" /ws) + | (e ^"++/" e /ws > e ^"+/" e /ws) + | (e ^"**" /ws > e ^"*" /ws) + | (e ^"**/" e /ws > e ^"*/" e /ws) | e ^"?" /ws | "(" word ^")" /ws @@ -44,7 +48,7 @@ w !::= " " | "//" ([~\n]*) "\n" | "\n" | "\r" -word ::= [a-zA-Z0-9_]++ +word ::= [a-zA-Z0-9_]+ !=> [a-zA-Z0-9_] quoted ::= "\"" (([~\"\\] | escaped)+) "\"" | "\"\"" => "" escaped ::= "\\n" => "\n"