X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Fmeta.g;h=5723e6d1522bb71a9ef3f25357e705fdc201bd88;hp=0e3bce702e532a0a203dfdf95b931911cf6985cd;hb=107df9a4aee6ba593b64d3bbe8b2efac84596cad;hpb=4dc71faf407682a3cf47b7f339056b97a3986119 diff --git a/tests/meta.g b/tests/meta.g index 0e3bce7..5723e6d 100644 --- a/tests/meta.g +++ b/tests/meta.g @@ -4,8 +4,7 @@ grammar ::= r +/ ws => "grammar" r ::= word ^"::=" alternatives /ws | word ^"!::=" alternatives /ws -alternatives ::= equiAlt +/ (ws ">" ws) -equiAlt ::= conjuncts +/ (ws "|" ws) +alternatives ::= (conjuncts +/ (ws "|" ws)) +/ (ws ">" ws) conjuncts ::= sequence | sequence ^"&" e*/ws /ws @@ -21,10 +20,10 @@ ec ::= [~\-\]\\\~] range ::= ec => "range" | ec ^"-" ec -e ::= word => "nonTerminal" +e ::= word => "nonTerminal" | quoted => "literal" | ^"()" - | ^"{" sequence "}" /ws + | ^"{" sequence "}" /ws | ^"[" (range*) "]" | ^"[~" (range*) "]" | ^"^" quoted /ws